Merge remote-tracking branch 'public-gh/master' into release-automation-followups
* public-gh/master: fix: advance canary after partial publish fix: add npm provenance package metadata fix: correct codeowners maintainer handle fix: validate canary release path in CI chore(lockfile): refresh pnpm-lock.yaml (#900) fix: guard os.userInfo() for UID-only containers, exclude HOME from cache key fix(opencode-local): resolve HOME from os.userInfo() for model discovery # Conflicts: # pnpm-lock.yaml
This commit is contained in:
commit
605b21d5de
19 changed files with 186 additions and 731 deletions
|
|
@ -16,10 +16,13 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/paperclipai/paperclip.git",
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
"directory": "cli"
|
"directory": "cli"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/paperclipai/paperclip",
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "@paperclipai/adapter-utils",
|
"name": "@paperclipai/adapter-utils",
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
|
"directory": "packages/adapter-utils"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "@paperclipai/adapter-claude-local",
|
"name": "@paperclipai/adapter-claude-local",
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
|
"directory": "packages/adapters/claude-local"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "@paperclipai/adapter-codex-local",
|
"name": "@paperclipai/adapter-codex-local",
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
|
"directory": "packages/adapters/codex-local"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "@paperclipai/adapter-cursor-local",
|
"name": "@paperclipai/adapter-cursor-local",
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
|
"directory": "packages/adapters/cursor-local"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "@paperclipai/adapter-gemini-local",
|
"name": "@paperclipai/adapter-gemini-local",
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
|
"directory": "packages/adapters/gemini-local"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "@paperclipai/adapter-openclaw-gateway",
|
"name": "@paperclipai/adapter-openclaw-gateway",
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
|
"directory": "packages/adapters/openclaw-gateway"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "@paperclipai/adapter-opencode-local",
|
"name": "@paperclipai/adapter-opencode-local",
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
|
"directory": "packages/adapters/opencode-local"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { createHash } from "node:crypto";
|
import { createHash } from "node:crypto";
|
||||||
|
import os from "node:os";
|
||||||
import type { AdapterModel } from "@paperclipai/adapter-utils";
|
import type { AdapterModel } from "@paperclipai/adapter-utils";
|
||||||
import {
|
import {
|
||||||
asString,
|
asString,
|
||||||
|
|
@ -20,7 +21,7 @@ function resolveOpenCodeCommand(input: unknown): string {
|
||||||
|
|
||||||
const discoveryCache = new Map<string, { expiresAt: number; models: AdapterModel[] }>();
|
const discoveryCache = new Map<string, { expiresAt: number; models: AdapterModel[] }>();
|
||||||
const VOLATILE_ENV_KEY_PREFIXES = ["PAPERCLIP_", "npm_", "NPM_"] as const;
|
const VOLATILE_ENV_KEY_PREFIXES = ["PAPERCLIP_", "npm_", "NPM_"] as const;
|
||||||
const VOLATILE_ENV_KEY_EXACT = new Set(["PWD", "OLDPWD", "SHLVL", "_", "TERM_SESSION_ID"]);
|
const VOLATILE_ENV_KEY_EXACT = new Set(["PWD", "OLDPWD", "SHLVL", "_", "TERM_SESSION_ID", "HOME"]);
|
||||||
|
|
||||||
function dedupeModels(models: AdapterModel[]): AdapterModel[] {
|
function dedupeModels(models: AdapterModel[]): AdapterModel[] {
|
||||||
const seen = new Set<string>();
|
const seen = new Set<string>();
|
||||||
|
|
@ -107,7 +108,19 @@ export async function discoverOpenCodeModels(input: {
|
||||||
const command = resolveOpenCodeCommand(input.command);
|
const command = resolveOpenCodeCommand(input.command);
|
||||||
const cwd = asString(input.cwd, process.cwd());
|
const cwd = asString(input.cwd, process.cwd());
|
||||||
const env = normalizeEnv(input.env);
|
const env = normalizeEnv(input.env);
|
||||||
const runtimeEnv = normalizeEnv(ensurePathInEnv({ ...process.env, ...env }));
|
// Ensure HOME points to the actual running user's home directory.
|
||||||
|
// When the server is started via `runuser -u <user>`, HOME may still
|
||||||
|
// reflect the parent process (e.g. /root), causing OpenCode to miss
|
||||||
|
// provider auth credentials stored under the target user's home.
|
||||||
|
let resolvedHome: string | undefined;
|
||||||
|
try {
|
||||||
|
resolvedHome = os.userInfo().homedir || undefined;
|
||||||
|
} catch {
|
||||||
|
// os.userInfo() throws a SystemError when the current UID has no
|
||||||
|
// /etc/passwd entry (e.g. `docker run --user 1234` with a minimal
|
||||||
|
// image). Fall back to process.env.HOME.
|
||||||
|
}
|
||||||
|
const runtimeEnv = normalizeEnv(ensurePathInEnv({ ...process.env, ...env, ...(resolvedHome ? { HOME: resolvedHome } : {}) }));
|
||||||
|
|
||||||
const result = await runChildProcess(
|
const result = await runChildProcess(
|
||||||
`opencode-models-${Date.now()}-${Math.random().toString(16).slice(2)}`,
|
`opencode-models-${Date.now()}-${Math.random().toString(16).slice(2)}`,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "@paperclipai/adapter-pi-local",
|
"name": "@paperclipai/adapter-pi-local",
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
|
"directory": "packages/adapters/pi-local"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "@paperclipai/db",
|
"name": "@paperclipai/db",
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
|
"directory": "packages/db"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "@paperclipai/create-paperclip-plugin",
|
"name": "@paperclipai/create-paperclip-plugin",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
|
"directory": "packages/plugins/create-paperclip-plugin"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": {
|
"bin": {
|
||||||
"create-paperclip-plugin": "./dist/index.js"
|
"create-paperclip-plugin": "./dist/index.js"
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,16 @@
|
||||||
"name": "@paperclipai/plugin-sdk",
|
"name": "@paperclipai/plugin-sdk",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Stable public API for Paperclip plugins — worker-side context and UI bridge hooks",
|
"description": "Stable public API for Paperclip plugins — worker-side context and UI bridge hooks",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
|
"directory": "packages/plugins/sdk"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "@paperclipai/shared",
|
"name": "@paperclipai/shared",
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
|
"directory": "packages/shared"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
|
|
|
||||||
707
pnpm-lock.yaml
generated
707
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -94,6 +94,7 @@ const publishPkg = {
|
||||||
license: cliPkg.license,
|
license: cliPkg.license,
|
||||||
repository: cliPkg.repository,
|
repository: cliPkg.repository,
|
||||||
homepage: cliPkg.homepage,
|
homepage: cliPkg.homepage,
|
||||||
|
bugs: cliPkg.bugs,
|
||||||
files: cliPkg.files,
|
files: cliPkg.files,
|
||||||
engines: { node: ">=20" },
|
engines: { node: ">=20" },
|
||||||
dependencies: sortedDeps,
|
dependencies: sortedDeps,
|
||||||
|
|
|
||||||
|
|
@ -133,29 +133,38 @@ NODE
|
||||||
|
|
||||||
next_canary_version() {
|
next_canary_version() {
|
||||||
local stable_version="$1"
|
local stable_version="$1"
|
||||||
local versions_json
|
shift
|
||||||
|
|
||||||
versions_json="$(npm view paperclipai versions --json 2>/dev/null || echo '[]')"
|
node - "$stable_version" "$@" <<'NODE'
|
||||||
|
|
||||||
node - "$stable_version" "$versions_json" <<'NODE'
|
|
||||||
const stable = process.argv[2];
|
const stable = process.argv[2];
|
||||||
const versionsArg = process.argv[3];
|
const packageNames = process.argv.slice(3);
|
||||||
|
const { execSync } = require("node:child_process");
|
||||||
let versions = [];
|
|
||||||
try {
|
|
||||||
const parsed = JSON.parse(versionsArg);
|
|
||||||
versions = Array.isArray(parsed) ? parsed : [parsed];
|
|
||||||
} catch {
|
|
||||||
versions = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
const pattern = new RegExp(`^${stable.replace(/\./g, '\\.')}-canary\\.(\\d+)$`);
|
const pattern = new RegExp(`^${stable.replace(/\./g, '\\.')}-canary\\.(\\d+)$`);
|
||||||
let max = -1;
|
let max = -1;
|
||||||
|
|
||||||
for (const version of versions) {
|
for (const packageName of packageNames) {
|
||||||
const match = version.match(pattern);
|
let versions = [];
|
||||||
if (!match) continue;
|
|
||||||
max = Math.max(max, Number(match[1]));
|
try {
|
||||||
|
const raw = execSync(`npm view ${JSON.stringify(packageName)} versions --json`, {
|
||||||
|
encoding: "utf8",
|
||||||
|
stdio: ["ignore", "pipe", "ignore"],
|
||||||
|
}).trim();
|
||||||
|
|
||||||
|
if (raw) {
|
||||||
|
const parsed = JSON.parse(raw);
|
||||||
|
versions = Array.isArray(parsed) ? parsed : [parsed];
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
versions = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const version of versions) {
|
||||||
|
const match = version.match(pattern);
|
||||||
|
if (!match) continue;
|
||||||
|
max = Math.max(max, Number(match[1]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
process.stdout.write(`${stable}-canary.${max + 1}`);
|
process.stdout.write(`${stable}-canary.${max + 1}`);
|
||||||
|
|
|
||||||
|
|
@ -122,9 +122,14 @@ TARGET_STABLE_VERSION="$(stable_version_for_date "$RELEASE_DATE")"
|
||||||
TARGET_PUBLISH_VERSION="$TARGET_STABLE_VERSION"
|
TARGET_PUBLISH_VERSION="$TARGET_STABLE_VERSION"
|
||||||
DIST_TAG="latest"
|
DIST_TAG="latest"
|
||||||
|
|
||||||
|
PUBLIC_PACKAGE_INFO="$(list_public_package_info)"
|
||||||
|
mapfile -t PUBLIC_PACKAGE_NAMES < <(printf '%s\n' "$PUBLIC_PACKAGE_INFO" | cut -f2)
|
||||||
|
|
||||||
|
[ -n "$PUBLIC_PACKAGE_INFO" ] || release_fail "no public packages were found in the workspace."
|
||||||
|
|
||||||
if [ "$channel" = "canary" ]; then
|
if [ "$channel" = "canary" ]; then
|
||||||
require_on_master_branch
|
require_on_master_branch
|
||||||
TARGET_PUBLISH_VERSION="$(next_canary_version "$TARGET_STABLE_VERSION")"
|
TARGET_PUBLISH_VERSION="$(next_canary_version "$TARGET_STABLE_VERSION" "${PUBLIC_PACKAGE_NAMES[@]}")"
|
||||||
DIST_TAG="canary"
|
DIST_TAG="canary"
|
||||||
tag_name="$(canary_tag_name "$TARGET_PUBLISH_VERSION")"
|
tag_name="$(canary_tag_name "$TARGET_PUBLISH_VERSION")"
|
||||||
else
|
else
|
||||||
|
|
@ -136,11 +141,6 @@ NOTES_FILE="$(release_notes_file "$TARGET_STABLE_VERSION")"
|
||||||
require_clean_worktree
|
require_clean_worktree
|
||||||
require_npm_publish_auth "$dry_run"
|
require_npm_publish_auth "$dry_run"
|
||||||
|
|
||||||
PUBLIC_PACKAGE_INFO="$(list_public_package_info)"
|
|
||||||
PUBLIC_PACKAGE_NAMES="$(printf '%s\n' "$PUBLIC_PACKAGE_INFO" | cut -f2)"
|
|
||||||
|
|
||||||
[ -n "$PUBLIC_PACKAGE_INFO" ] || release_fail "no public packages were found in the workspace."
|
|
||||||
|
|
||||||
if [ "$channel" = "stable" ] && [ ! -f "$NOTES_FILE" ]; then
|
if [ "$channel" = "stable" ] && [ ! -f "$NOTES_FILE" ]; then
|
||||||
release_fail "stable release notes file is required at $NOTES_FILE before publishing stable."
|
release_fail "stable release notes file is required at $NOTES_FILE before publishing stable."
|
||||||
fi
|
fi
|
||||||
|
|
@ -158,7 +158,7 @@ while IFS= read -r package_name; do
|
||||||
if npm_package_version_exists "$package_name" "$TARGET_PUBLISH_VERSION"; then
|
if npm_package_version_exists "$package_name" "$TARGET_PUBLISH_VERSION"; then
|
||||||
release_fail "npm version ${package_name}@${TARGET_PUBLISH_VERSION} already exists."
|
release_fail "npm version ${package_name}@${TARGET_PUBLISH_VERSION} already exists."
|
||||||
fi
|
fi
|
||||||
done <<< "$PUBLIC_PACKAGE_NAMES"
|
done <<< "$(printf '%s\n' "${PUBLIC_PACKAGE_NAMES[@]}")"
|
||||||
|
|
||||||
release_info ""
|
release_info ""
|
||||||
release_info "==> Release plan"
|
release_info "==> Release plan"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "@paperclipai/server",
|
"name": "@paperclipai/server",
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/paperclipai/paperclip",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paperclipai/paperclip",
|
||||||
|
"directory": "server"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue