Repository navigation
feat(cli): os skills install, update and status at the server's version, with or without a project - #35060
Conversation
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNCAXyGfBQFZBwixH
The MCP open server names os skills install --version in its skills install line; docs and changeset. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNCAXyGfBQFZBwixH
📓 Docs Drift CheckThis PR changes 2 package(s): 7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 48 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin d5a045a501cbdcb182c48bc76b661e5c725b19a2 && git checkout d5a045a501cbdcb182c48bc76b661e5c725b19a2
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 301b7c11c5f24a52db706f9016155293c066756d bbb4b559c725123927de8e0950ec5ecb77f49d97 && git checkout -B drift-repro 301b7c11c5f24a52db706f9016155293c066756d && git merge --no-ff bbb4b559c725123927de8e0950ec5ecb77f49d97
node scripts/docs-audit/affected-docs.mjs --json 301b7c11c5f24a52db706f9016155293c066756d
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg L1: ACCEPT · 2026-11-18T01:43ZHead-sha: 3dcccc7 席位核对PR shape.
Not governed. CI. Green on this head: 41 success, 15 expected skips. (1) The overlap-check exit 1. The one conflict is #34791 against (2) Body readings at The version source. The catalog.
Ownership.
Status. It reports the installed and expected versions, plus missing, modified and extra skills. Only a version mismatch, a missing skill or a modified skill is a mismatch. It exits 0, or 1 with The MCP line. Tests and evidence. Twenty-two cases, including the Done-when end to end (install in an empty directory, then status reports a mismatch after the server moves) and every refusal above. The MCP pin was red first. The two ablation legs are ownership and status mismatch. The live registry run is in the report. Must-fixNone. Should-fix
Notes
Next: S1, a small code change that gets a delta read. Then the seat's opus L2 for the Clause-② declaration, then o3-G lands. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract-review-claim: session_01WGufzgh1zkZzDXL36ckWAG · head |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract reviewServed-tier: Face: declaration. The PR body and the changeset both carry ① Derived judgmentsThe accept-set and public-surface changes the diff implies, each named right or wrong:
② Semver level
③ Boundary flagsThe dev's
SQL push-down (Prime Directive 5): not applicable. The diff is CLI filesystem and registry I/O plus MCP prose. There is no id materialisation, no query, and no in-app join. Must-fix: none. Should-fix:
Nits:
Implemented-by: VERDICT: PASS |
The npm pack invocation is built by npmPackInvocation, behaviour unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNCAXyGfBQFZBwixH
Refuses a backslash or a colon in a tarball path segment and in a recorded skill or file name, validates recorded names with the catalog name rule, resolves every target under the skills root before the first write, and quotes the npm pack destination where Windows runs it through a shell. The pending initialize-instructions changeset names os skills install. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNCAXyGfBQFZBwixH
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract-review-claim: session_01WGufzgh1zkZzDXL36ckWAG · head |
|
repo:objectstack#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg L1: ACCEPT · 2026-11-18T02:22ZHead-sha: bbb4b55 席位核对
Delta
Must-fixNone. Should-fixNone. Notes
NextThis ACCEPT is conditional on CI. Every check except |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract reviewServed-tier: Face: declaration. The PR body and both changesets carry This is a delta review of Inputs: card #34773 (body, triage 6963599108, claim 6963642503, os-dev report 6966410576); PR #35060 (body at this head, file list, docs-drift advisory 6965683534, L1-c ACCEPT 6966450600, the seat's record 6966546222, contract-review claim 6967088374, L1-c delta ACCEPT 6967097514); the diffs Check-runs on this head, all completed (read 2026-11-18, about 02:45Z): 41 success, 19 skipped, 2 failure, 2 cancelled.
No other job failed. ① Derived judgments
② Semver level
Deliberate correction, line by line, against (Below, ‹version› stands for the note's angle-bracketed placeholder; the record format forbids angle brackets.)
Deliberate correction confirmed: ③ Boundary flags
Must-fix: none. Should-fix: none. Nits:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgNCAXyGfBQFZBwixH Landing · 2026-11-18T02:45Z
Ready + auto-merge into the queue, carrying the declared red. Area o3-G (repo:objectstack#3) watches it to MERGED and closes out #34773. |
Requested by Yibo Wang · project thread
Fixes #34773
Clause-②: yes (widening: a new published CLI command group,
os skills install | update | status)Metadata-protocol: none
维护者速读
os skills install / update / status三个命令,在有或没有项目的目录里,把已发布的@objectstack/skills按服务器版本装进.claude/skills/,并能更新和核对;MCP 开放服务的安装提示改为这条命令。update只动自己装过的技能,用户自己的技能目录从不触碰;回滚即撤销本 PR。packages/cli/src/utils/skills-command.ts(拒绝条件与写入顺序)、packages/cli/src/utils/skills-install-state.ts(planSkillsWrite的归属判断)、packages/cli/src/utils/skills-catalog.ts(npm pack读取与 tar 解包)。node packages/cli/bin/run.js skills install --version 18.5.0,预期装入 11 个技能并写出.claude/skills/.objectstack-skills.json;再运行skills status --version 18.6.0 --check,预期退出码 1 并提示版本不一致。What changes
os skills installcopies the published@objectstack/skillscatalog at one version into the agent's skills directory (.claude/skills/under the current directory,--diroverrides). It works in an empty directory with nopackage.json, and in a project; it reads and writes nopackage.json.--version V(exact; ranges and tags refused), else--target T(a target environment URL or a restriction profile file, read by the sameloadRestrictionProfileasos validate --target, takingversions.skills), else the CLI's own version.@objectstack/skillsand@objectstack/cliare in onefixedgroup of.changeset/config.json, so the CLI's version names the catalog written for it.npm packin the current directory, so the user's.npmrcfiles andnpm_config_*variables (registry, scope mapping, credentials, proxy) apply; there was no existing registry helper to reuse. No third-party installer. The tarball is unpacked in process (readTarGz: ustar, prefix, paxpath, GNU long name, checksum checked), and onlypackage/dist/skills/NAME/**for each NAME holding aSKILL.mdis kept. The tarball must declare@objectstack/skillsat the requested version; a link, a path leaving the tree, or an empty catalog is refused. A version the registry does not publish is refused with a sentence naming it..objectstack-skills.jsonbeside the skills: package, version, every file of every catalog skill with its SHA-256.os skills update). A same-named directory the record does not name (for example oneskills experimental_synccopied) is refused, naming it;--forcereplaces it ("adopted" in the output).os skills updatemoves the recorded catalog to the resolved version: replaces each recorded skill, removes recorded skills the new version dropped, adds new ones. A skill directory the record does not name is never written, replaced or removed: a new catalog skill whose name collides with one is refused even under--force. A recorded skill changed locally is refused, naming the files, unless--force. No record: refused, namingos skills install.os skills statusreports installed versus expected version (same order),missing,modified(changed / removed / added files) andextra(directories the record does not name: listed, never judged). Mismatch = no record, another version, or any missing or modified skill. Exits 0; with--check, 1 on a mismatch. The registry is not read. All three commands take--json(one document on stdout).@objectstack/mcp: the open server'sinitializeskills install line now reads... install that version into the agent's skills directory with the ObjectStack CLI, with or without a project: os skills install --version VERSION (where the CLI is not installed: npx -p @objectstack/cli@VERSION os skills install --version VERSION).instead ofpnpm add -D @objectstack/skills@VERSION, which needed a project. The README describes the new line. The mcp: the open door's initialize instructions carry the ask-data selection rule and the skills install line; /mcp/skill renders from the published skill #34686 line is not yet on npm (@objectstack/mcp18.5.0 tarball carries noPublished skillstext, published 2026-11-15), so the pending mcp: the open door's initialize instructions carry the ask-data selection rule and the skills install line; /mcp/skill renders from the published skill #34686 changeset is corrected to name the new command (see DELIBERATE CORRECTION below) rather than this changeset declaring a same-release supersession.skillstopic inpackages/cli/package.jsonoclif.topics.content/docs/deployment/cli.mdxgains a### Skillssection (all three commands, flags table);content/docs/ai/skills.mdxleads its install section withos skillsfor users with and without a project, keeps theexperimental_syncpath, and namesinstall --forceto move a synced project over;content/docs/ai/connect-mcp.mdxdescribes the new install line and the MCP-only path..changeset/34773-os-skills-install.md:@objectstack/cliand@objectstack/mcppatch(Metadata-protocolnonetakespatch, per the Check Changeset level axis).Tests
packages/cli/test/skills-commands.test.ts(unit tier), 22 tests. Seams:skillsRegistry.fetchTarball(the registry, answering tarballs the test builds or "not published") andfetch(the target's published restriction profile). No network.package.json,install --target URLinstalls the server's version; after the server's profile moves to 18.6.0,status --target URL --check --jsonexits 1 withinstalledVersion 18.5.0, expectedVersion 18.6.0, mismatch true.--dir; version order (--version, target URL, target file, CLI fallback, and--versionwith--targetrefused); unknown version refused and nothing written; non-exact version refused before the registry is asked; install over a record refused; conflict refused then--forceadopts.my-ownuntouched; a new catalog skill colliding with a user directory refused even with--force; local edit refused unless--force; no record refused.--check), missing/modified/extra with only missing and modified counting, nothing installed.packages/mcp/src/initialize-selection-rule-34686.test.ts: new case pinsos skills install --version OWN_VERSION, thenpx -p @objectstack/cli@OWN_VERSIONform and nopnpm add. Red first against the old line, then green.Run readings (head bec9bdc)
pnpm --filter @objectstack/cli exec vitest run --project unit --maxWorkers=2 test/skills-commands.test.ts: Test Files 1 passed, Tests 22 passed (VERDICT command-exit 0).× names os skills install --version at that version, and no project-only install—AssertionError: expected 'ObjectStack MCP Server. The tools thi…' to contain 'os skills install --version 18.5.0', Tests 1 failed / 7 passed. After the change: 8 passed.pnpm --filter @objectstack/mcp test && pnpm --filter @objectstack/mcp typecheck: Test Files 71 passed, Tests 1254 passed;check:test-typecheck: OK; VERDICT command-exit 0.pnpm --filter @objectstack/cli typecheck:check:test-typecheck: OK — @objectstack/cli's test layer compiles; VERDICT command-exit 0.pnpm --filter @objectstack/cli exec vitest run --project unit --maxWorkers=2: Test Files 427 passed (427), Tests 6085 passed (6085); VERDICT command-exit 0. Theintegrationtier is declared to CI: the diff touches no integration-tier file, nobin/entry and notest/helpers/serve-process.ts.planSkillsWrite's conflict branch replaced withelse if (false) conflicts.push(name); /* ABLATION-A1 */viascripts/ablation-replace.mjs(anchor 1 → 0, blob 0b64350b7d4c → 9c901ed004bf). Red:install refuses a same-named directory it did not install, and --force adopts it,update never touches a directory it did not install; Tests 2 failed / 20 passed. Restored: blob == HEAD,git diff HEADempty. A first A1 attempt replaced the line with anelsethat left a danglingelse(transform error, "no tests"): a vacuous run, discarded and rerun as above.mismatch: !versionMatches || missing.length > 0→mismatch: /* ABLATION-A2 */ missing.length > 0(blob f1cef08e9596 → a70e150850d1). Red: the Done-when test,status: a version mismatch exits 0 by default and 1 with --check,status with nothing installed; Tests 3 failed / 19 passed. Restored: blob == HEAD,git diff HEADempty.node packages/cli/bin/run.js skills install --version 18.5.0installed 11 skills (objectstack-databyte-identical,diff -r, to thenpm packtarball'sdist/skills/objectstack-data);status --version 18.5.0 --checkexit 0;status --check(CLI fallback 18.5.0) exit 0;update --version 99.0.0exit 1,@objectstack/skills 99.0.0 is not published on the npm registry this environment uses (npm pack @objectstack/skills@99.0.0: No matching version found for @objectstack/skills@99.0.0.). Nothing was written.;update --version 18.4.0exit 0, thenstatus --checkexit 1,The catalog is 18.4.0, not 18.5.0.Review round (S1, S2, S3, N1)
.,.., or holds a backslash or a colon (isSafePathSegment,skills-catalog.ts).applySkillsWriteresolves every target (dropped skills, skill roots, files) and refuses any that does not lie strictly under the skills root, before the first write.readSkillsManifestvalidates recorded skill names with the catalog's ownSKILL_NAMErule and recorded file paths with the S1 segment rule, so an empty name can no longer makeupdate --forceremove the skills directory itself.npm pack. The invocation is built bynpmPackInvocation; undershell: true(win32) the--pack-destinationpath is quoted, so a temp path with a space stays one argument.npmPackInvocationwith behaviour unchanged;test/skills-commands.test.tsthen reads 5 failed / 25 passed:refuses a Windows separator or a drive letter in a path segment,refuses a catalog file whose target resolves outside the skills directory, and writes nothing there,refuses a record naming a skill or a file with a Windows separator or a drive letter,on Windows runs through a shell and quotes the destination, so a path with a space stays one argument,a malformed record is refused whole > an empty skill name(the..and backslash-name rows were already refused and stay as controls). Commit bbb4b55 fixes them: 30 passed;pnpm --filter @objectstack/cli typecheckexit 0.DELIBERATE CORRECTION
.changeset/34686-initialize-selection-rule.mdis a pending release note (not yet on npm: the@objectstack/mcp18.5.0 tarball carries noPublished skillstext) that this PR makes false, so it is corrected here andcheck-empty-changesetstays red on it by design. Its install-line bullet now reads: "The skills install line:Published skills: @objectstack/skills <version>with the command that installs it into the agent's skills directory, with or without a project,os skills install --version <version>, at this package's own version (released together with@objectstack/skills), not theversionoption." The sentence in.changeset/34773-os-skills-install.mdthat said this PR supersedes thepnpm add -Dwording in the same release is removed, since that wording no longer ships.Acceptance notes
os validate --targethas no default target, so there is no implicit active target to reuse; the order is--version,--target, the CLI's version. Not invented here.RESTRICTION_PROFILE_ROUTE(/api/v1/discovery/restriction-profile) is served by cloud only (its docblock inrestriction-profile.ts), so--target http://localhost:3000againstos devis refused by the validate reader's own 404 sentence. For an open server the version reaches the user through the MCPinitializeline, which now carries--version VERSION. Noted, not filed: it is the reader's existing behaviour./mcp/skillcarries no install line. The order said the install line ridesinitializeand/mcp/skill; ona841e26b23onlyskillsInstallLineinmcp-server-runtime.ts(theinitializetext) carries it (git grep "Published skills": one source hit). Only that one changed.skills-reference.mdxpage andpackages/skills/README.mdstill document thepnpm add -Dplusexperimental_syncpath, which keeps working;skills.mdxnow leads withos skills. Left for the skills lane.Verification (local gate subset, head bec9bdc)
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 118 families derived fromobjectstack-ai/objectstackatbec9bdc5cb. All 118 run, exit codes captured before any pipe;--ranreconciliation:118 derived, 115 run, 3 NOT-MEASURED, 0 UNRUN.check:skill-examples(needs@objectstack/client-reactbuilt),check:dual-build-cjs-loads(needs a full build),check:i18n-coverage(examples/app-showcaseconfig failed to lint without a full build).check:cli-command-ids(1401 command-id literal(s) across 461 file(s) outside packages/cli all resolve, 115 ids derived),check:cli-examples-parity,check:cli-test-child-env,check:doc-anchors,check:doc-authoring,check:docs-transcript-drift,check:nul-bytes,check:published-files,check:changeset-fixed,check-empty-changeset,check-changeset-no-major(base axis),check:test-source-alias,check:cross-package-test-inputs.node scripts/pm/overlap-check.mjs --branch=claude/issue-34773-os-skills-install:VERDICT clean exit 0(origin/main merges cleanly; fix(auth)!: a server outside development mode refuses a development seed credential #34717 and chore: version packages #33849 sharepackages/cli/package.json, both merge cleanly).node scripts/pm/check-governed-merges.mjs --branch claude/issue-34773-os-skills-install:0 of 15 path(s) hit the register, NOT governed; 1518 changed lines.Generated by Claude Code