Repository navigation
docs(skills): teach os environments use-runtime and os mcp connect - #31225
Conversation
The platform skill's operations reference and the deployment docs now teach the self-hosted deploy target (`os environments use-runtime`, the self-hosted `os deploy` sequence, `--confirm-access-upgrade`, the `os package install` fallback) and `os mcp connect`, each sentence read from the merged CLI code. connect-mcp.mdx points to `os mcp connect` before the hand-typed `claude mcp add` lines. operations.md pays by cutting restatement in the same file and two rows that misstated `os login` / `os register`; the measured remainder raises its token-ratchet row under the standing ruling. Two eval cases added. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAnBUEjCrpMSAcQv3Gp
|
domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7 Contract reviewServed-tier: ① Derived judgmentsInputs: card #31143 (body; scope comment 6708465377; triage 6708594558; claim 6711070771; "Claim confirmations" 6711424579 with the two mid-flight rulings), the PR body (the same as /mnt/project-files/card-31143/body-v1.md, apart from one trailing blank line), the order at /mnt/project-files/skills-seat3/order-31143.md, the gate record gates-e15e06e1.txt (87 commands, all exit 0), the commit and the net diff. Each taught fact was checked against code:
② Semver level
③ Boundary flags
④ Design judgment
Verdict: PASS |
… edge cases The `os dev` row says the dev admin is seeded while no login exists yet (the seed's real gate), not on an empty database. The CLI reference's self-hosted `os deploy` steps say a runtime that predates the dry run installs anyway and the command exits 1, and drop the restart case the inline install path refuses at the install step. `os mcp connect`'s server name is described as lower-cased. The token-ratchet row follows the new measurement down. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAnBUEjCrpMSAcQv3Gp
|
domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7 Contract reviewServed-tier: ① Derived judgments
② Semver levelUnchanged: ③ Boundary flagsThe 3 files are all inside the claim. No new file was added. Main has moved since the base, and nothing that landed touches these files. ④ Design judgmentThe delta does only what the first record asked for. One nit:
Verdict: PASS |
|
domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7 维护者速读
席位核对 — ACCEPT · domain:skills#3 · head
|
Requested by Irene · project thread
Fixes #31143
Clause-②: no
Metadata-protocol: none
dispatch-gates --tierreads a MANDATORY model tier forskills/**(clause ① of the model-tiering ruling); it is waived by the standing order of the maintainer in this project (2026-11-03), and this card ran on the project's default model. The dispatching seat runs the contract review.Cross-seat note:
content/docs/deployment/cli.mdxandcontent/docs/deployment/publish-and-preview.mdxare folded into thisdomain:skillscard by the triage (6708594558), so the skill and the docs say the same thing.content/docs/ai/connect-mcp.mdx§ "Claude Code (one command)" (the page that gives theclaude mcp addline) was confirmed by the seat by name before it was edited.维护者速读
operations.md新增os environments use-runtime与os mcp connect两行,os deploy行加自托管目标的流程(构建 → 试运行计划 → 内联安装 →hotLoaded即上线,--confirm-access-upgrade),os package install行写明不带-u时回落到记住的运行时;cli.mdx新增「Deploy to a self-hosted runtime」「To a self-hosted runtime」「MCP /os mcp connect」三节并更新 install 的-u/-t默认值;publish-and-preview.mdx加一段;connect-mcp.mdx在手敲claude mcp add之前先介绍os mcp connect;评测加两例。os devdeploy key can target a self-hosted runtime (Docker Enterprise or Community) — remembered target and credential, install-local underneath, the same plan and Q3 refusal (epic cloud#3652, self-hosted parity) #30888(PR feat(cli): os deploy and the os dev d key deploy to a self-hosted runtime remembered by os environments use-runtime #31137)与os mcp connect: register the active environment's MCP server with the developer's MCP client in one command, letting the client run the environment's own OAuth (epic cloud#3652; the single-authorization-server question stays on its Later decision card) #30889(PR feat(cli): os mcp connect registers your environment's MCP server with Claude Code #31149)已合并,文档和技能没教,开发者与 AI 仍手敲地址、令牌和claude mcp add(docs + skill: teachos environments use-runtimeand the self-hostedos deploytarget (follow-up owed by #30888 / PR #31137) #31143)。operations.md先删 8 处同文件重述/错述(−594 字节),余额 +53 token 按常设裁决 6513306068 提高该行上限 3287 → 3340;发@objectstack/skillspatch;回滚即 revert。skills/objectstack-platform/references/operations.md的 § Environments & deploy 表,以及下方「删减与去处」表(含席位裁定删除的os login/os register两行错述)。node scripts/check-skills-token-ratchet.mjs,预期退出 0,operations.md 3340 / 3340。skills/**属 Tier H(人合),需要os-zhuang或hotlong的一次 approval,之后席位落地。What changes
1. The platform skill (
skills/objectstack-platform/references/operations.md)The skill rows stay short and the full sequence lives in the CLI reference (the order's preference).
2. The docs
content/docs/deployment/cli.mdx: ause-runtimerow in § Cloud Environments; new § "Deploy to a self-hosted runtime" (examples, the key and its probe,--no-verify, storage, which ofuse-runtime/switchwins,--forget, a flag table); §os deploynames the self-hosted target in its lead, gains a--confirm-access-upgraderow and a "To a self-hosted runtime" subsection (the four steps and thedkey); new § MCP /os mcp connect(examples, environment resolution,--url, names,--client,--print, failure exits, no token, revoke, a flag table); §os package install's-uand-trows now give the remembered runtime as the default.content/docs/deployment/publish-and-preview.mdx§ 3 "Install a version": one paragraph on remembering a runtime withuse-runtimesoos deployand thedkey deploy there, theos package installfallback, and how to target the cloud again.content/docs/ai/connect-mcp.mdx§ "Claude Code (one command)": one paragraph plus a fence before the hand-typed lines, which stay.Code site per taught sentence (
main66bf5b4a)os environments use-runtime <url> --token <key>;-treadsOS_RUNTIME_TOKENpackages/cli/src/commands/environments/use-runtime.tsargs.url(L40–L42),flags.token(L45–L49)GET /api/v1/marketplace/install-local; 401/403, 404, unreachable refused, nothing recordeduse-runtime.tsL93–L100,probeRuntime(L142–L178)--no-verifyrecords anyway (a container not up yet)use-runtime.tsverifyflag (L50–L54,allowNo), header L21–L25normalizeRuntimeUrl(L118–L135)--forgetdrops the record; cloud is the target again; not with a urluse-runtime.tsL65–L77;forgetRuntimeTarget(packages/cli/src/utils/runtime-target.tsL65–L69)~/.objectstack/cloud.json, 0600, its own record; key sent only to its urlpackages/cli/src/utils/cloud-config.tsheader L31–L44,getCloudCredentialsPathL106,writeFile(..., { mode: 0o600 })L132;runtime-target.tsheader L23–L27cloud-config.tsdeleteCloudConfigL193–L195,writeCloudConfigL187–L190 (header L40–L43)os environments switch <id>(when recorded in cloud.json) makes the cloud the target again, keeping the runtimepackages/cli/src/commands/environments/switch.tsL78–L79;activateCloudDeployTarget(runtime-target.tsL76–L81)os deploywith a runtime target and no--envdeploys there;--envnames a cloud environmentpackages/cli/src/commands/deploy.tsL152–L156hotLoaded⇒ 0deploy.tsdeployToRuntimeL288–L335, header L49–L71;install.tsL511–L522 (dry run ignored ⇒ INSTALLED, exit 1) and L617–L622 (an inline manifest whose register throws is refused422 PLUGIN_REGISTER_FAILED)--confirm-access-upgrade <token>passed through; refused when the target is the clouddeploy.tsflag L138–L142, L157–L164, L320dkey runs the sameos deploy, no cloud login askedpackages/cli/src/utils/dev-deploy-key.tsheader L26–L31,deployKeyHintL74–L75, L118os package installwith no-u: the remembered runtime (its key when no-t/--emailand the url is its own), elsehttp://localhost:3000runtime-target.tsruntimeInstallTargetL92–L108,DEFAULT_RUNTIME_INSTALL_URLL38;packages/cli/src/commands/package/install.tsflags L218–L234, L328–L337os mcp connectresolves the cloud environment asos deploy:--env, active, only; none/several refused naming--env; a remembered runtime is not consultedpackages/cli/src/commands/mcp/connect.tsheader L8–L15,resolveInstallTargetcall L202–L212 (no runtime-target read in the file)/api/v1/mcp; registered under its slug / display name / id, lower-cased, other runs →-connect.tsMCP_ENDPOINT_PATHL54,environmentServerNameL78–L84, L234–L235--urlskips the cloud, adds/api/v1/mcp, refuses a URL ending in it, nameobjectstackconnect.tsmcpUrlFromBaseL91–L113, L182–L191;OBJECTSTACK_MCP_SERVER_NAME = 'objectstack'(packages/mcp/src/skill-md.tsL51)--nameoverrides (letters, digits,-,_)connect.tsflag L143–L145,SERVER_NAMEL60, L173–L177--client claude-codeis the only value and the default; runsclaude mcp add --transport http NAME URLconnect.tsMCP_CLIENTSL57, flag L146–L150,claudeMcpAddArgsL63–L65--printprints the endpoint and the line, runs nothing; other clients add the endpoint themselvesconnect.tsflag L151–L154, header L35–L41, L243–L248claudemissing orclaude mcp addfailing exits non-zero; remove or pick another--nameconnect.tsL251–L270--tokenonly finds the environment; sign-in via/mcp; revoke in Account → Connect an AI Assistantconnect.tsheader L24–L33,tokenflag L161–L165, L273–L281Token readings and every deletion's home
node scripts/check-skills-token-ratchet.mjson freshmain66bf5b4a:operations.md3285 / 3287 (headroom 2). With the teaching added: 3489 (+202 over). After the deletions below and the review's S1 correction: 3340, 13140 → 13360 bytes (+220 net: −594 cut, +814 added). The remainder, +53 measured, raises only that file's row 3287 → 3340, pinned at the measurement, under the standing maintainer ruling 2026-10-27, verbatim and untranslated: 「A:先削重复,余额按实测提高」 (ruling record 6513306068 on #27847). No other row changes. (The seat's ruling expected about +47; the extra 6 tokens are an accuracy fix found after it: the MCP row first said "theos deployenvironment", but with a self-hosted targetos deploygoes to the runtime whileos mcp connectstill resolves a cloud environment, so the row now says "the cloud environment (picked asos deploypicks it)".)Every deletion, with every fact it held and where each survives (seat ruling: cuts 1–7 accepted):
os devrow: " — idempotent, never overwrites an existing account" (53)packages/cli/src/commands/dev.tsL777–L781; −2 bytes)field(missingrecord.) fails here." (47)os validaterefuses a bare field refrecord.<field>existence checkos lintis a separate style/convention pass and does not replaceos validate.)" (86)os lintrow ("Style/convention lint on metadata files") and the rule of thumb ("never report … done untilos validatepasses")Invalid origin403 / CORS failures)" list: reverse-proxy upstream,OS_AUTH_URL/baseURL+callbackURL,OS_TRUSTED_ORIGINS. The word "502" is the one fact not restated.3000default; it collides easily on shared hosts." (72)PORT=8080 os start" and the resolution chain showing3000as the defaultos login/logout/whoami· "Auth against the ObjectStack cloud control plane" (88)os loginauthenticates against the runtime server and storescredentials.json(login.tsL240–L253); cloud auth isos cloud logincontent/docs/deployment/cli.mdx§ Authentication; theos cloud loginrow stays in the skillos register· "Register the local stack as a deployable target" (68)os registercreates an account and stores credentials (register.tsL64)content/docs/deployment/cli.mdx§ AuthenticationCut 6 joins its two lines into one (the deletion spans the line break); no other line is rewrapped. No test or script pins any cut text (grepped
packages/,scripts/,.claude/,skills/,content/; onlypackages/skills/distand CHANGELOGs carry copies).Eval cases (
skills/objectstack-platform/evals/config-plugins-ops.json)use-runtime <url> --token <key>, probe and--no-verify,cloud.json(0600) across login/logout, thenos deploy/d: build, dry-run plan, inline install, live onhotLoaded,--confirm-access-upgrade;os package installfallback;--forget/switchback.must_contain:os environments use-runtime,--token;must_not_contain:os deploy --url(no such flag).os devserver too." →os mcp connect(runsclaude mcp add --transport http <name> <url>, environment asos deploypicks it, named after it),--url http://localhost:3000registered asobjectstack,--name,--printfor other clients, no token,/mcpsign-in.must_contain:os mcp connect,--url;must_not_contain:--client cursor(the only client isclaude-code).Swept the skill's evals for the old claims: no case encodes the cut text,
os login/os register, or thelocalhost:3000install default; case 5'sos lintand case 17's cloudos deploystay true.Other sites found (not edited)
content/docs/ai/agents.mdxL99 andcontent/docs/getting-started/build-with-claude-code.mdxL477–L502 still give only the hand-typedclaude mcp addline;content/docs/releases/v16.mdxis release history.packages/cli/src/commands/environments/create.ts(--activate) does not callactivateCloudDeployTarget, so onlyos environments switchreturns the deploy target to the cloud; the docs teach onlyswitch. Whethercreate --activateshould too is a CLI question, not a teaching one.Gates
Head
4e0b6486(two commits on merge base66bf5b4a; the second is the review delta: S1, N3, N4, N7 and the N6 re-flow of the one raggedos mcp connectparagraph).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderives the same 87 commands as ate15e06e1; all 87 exited 0, 0 NOT MEASURED among them. Each ran withtimeout 900underNODE_OPTIONS=--max-old-space-size=8192, afterpnpm install --frozen-lockfileand a fullpnpm build(exit 0). The list with each exit code:gates-4e0b6486.txtin the card folder (round 1:gates-e15e06e1.txt, 87/87 exit 0). It includespnpm check:skill-identifier-liveness,pnpm --filter @objectstack/spec run check:skill-refs,pnpm check:skill-compatibility,node scripts/check-skills-token-ratchet.mjs(and--self-test),pnpm check:doc-authoring,pnpm check:doc-anchors,pnpm --filter @objectstack/spec run check:docs,pnpm check:cli-command-ids,pnpm check:cli-examples-parityandnode scripts/check-empty-changeset.mjs --base origin/main.The CI-only steps dispatch-gates names as NOT MEASURED (Build Docs, Build Core, the type-check lanes, dogfood and shard attestation) run in CI.
node scripts/check-commit-card-trailers.mjs --range origin/main..HEADexit 0 before the push.