Repository navigation
docs(skills, client): deciding an in-app AI pending action is the person's own act, on their signed-in session - #34230
Conversation
…son's own act, on their signed-in session The objectstack-ai skill, the client SDK page and the client.ai.pendingActions docblock taught approve/reject through the REST route on any credential. The in-app door's confirmation rule (in-app-pending-action-decided-by-person) has only the person the call ran as decide, on their signed-in session; a token, even their own, is refused. Listing stays as written. One eval case added. Claude-Session: https://claude.ai/code/session_01ADHkmSoMtbbwL3w3kwCmky Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 8 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 3 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 21 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 9b9135e8221898dee66527c1c4d5e168840fe633 && git checkout 9b9135e8221898dee66527c1c4d5e168840fe633
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin bf76922925917c9841d69b4a5eda77762fc136cf 2ff4b92cb69e58a4d0bd6fa15c76e89bb10ca437 && git checkout -B drift-repro bf76922925917c9841d69b4a5eda77762fc136cf && git merge --no-ff 2ff4b92cb69e58a4d0bd6fa15c76e89bb10ca437
node scripts/docs-audit/affected-docs.mjs --json bf76922925917c9841d69b4a5eda77762fc136cf
|
…es their pending action on their own session Claude-Session: https://claude.ai/code/session_01ADHkmSoMtbbwL3w3kwCmky Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmSoMtbbwL3w3kwCmky Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmSoMtbbwL3w3kwCmky Co-authored-by: Claude <noreply@anthropic.com>
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Contract-review-handoff: review#2 — CONTRACT_REVIEW_TIER unavailable (maintainer quota limit on the review tier, 2026-11-16T02:08Z) · head 3690b8e Owed: the at-tier review that Seat's L1 read on this head, for the reviewer to confirm or overturn:
|
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 3690b8e · 2026-11-16T02:10Z |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract reviewServed-tier: Read at 2026-11-16T02:14Z. First review of this head; claim: comment 6905370348; lane request 6905360702 on mailbox #33873 (the lane's at-tier reviewer was unavailable). Independence: implemented in an os-steve project thread, dispatched by domain:skills#2 (os-steve); reviewed by os-tesla, who neither dispatched nor implemented it. No prior record on this PR; findings are numbered fresh and continue no earlier id. ① Derived judgmentsRead against the contract PR #34001 landed (
② Semver level
CI on this head: 72 check-runs, all completed; 60 success, 12 skipped (opt-in and path-gated jobs), none failed, none running. ③ Boundary flags
④ Design judgmentNo must-fix. S1 (should-fix) — S2 (should-fix) — the skill, both docs pages and the docblocks name "an API key or token" as refused and stop there. The contract's point 2, the S3 (should-fix) — N1 (nit) — N2 (nit) — N3 (nit) — eval 6 assertions: N4 (nit) — the changeset says the four places "now say what the confirmation rule says" and states the refusals without condition. One clause that the door enforces this from the runtime release that carries the in-app door, not from this package release, would keep a changelog reader from taking it as that release note; the migration entry tells them to look for exactly that note. Against the card's scenario (an operator script on a token told to approve the queue): the skill, as written, turns that request down and points at listing and at Implemented-by: VERDICT: PASS |
…nd rule 5, drop the ai:approve precondition, tighten eval 6 Claude-Session: https://claude.ai/code/session_01ADHkmSoMtbbwL3w3kwCmky Co-authored-by: Claude <noreply@anthropic.com>
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Contract-review-handoff: review#2 — CONTRACT_REVIEW_TIER unavailable (maintainer quota limit on the review tier, 2026-11-16T02:42Z) · head f407440 Owed: the delta review of fix round 1 against record 6905434558 (PASS on The seat's L1 read of
|
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head f407440 · 2026-11-16T02:43Z |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract reviewServed-tier: Read at 2026-11-16T02:46Z. Delta review of this head against PASS 6905434558 at 3690b8e; claim: comment 6905842681; lane request 6905824119 on mailbox #33873 (the lane's at-tier reviewer was unavailable). Independence: implemented in an os-steve project thread, dispatched by domain:skills#2 (os-steve); reviewed by os-tesla, who neither dispatched nor implemented it. Delta read: one fix commit ① Derived judgmentsRead against Prior findings, by id:
Other judgments on the delta:
② Semver levelUnchanged and right: CI on this head ( CI completed before posting: 72 check-runs on this head, 60 success, 12 skipped, none failed. ③ Boundary flags
④ Design judgmentNo must-fix. S1 (should-fix) — continues prior S2 (introduced by its fix). N1 (nit) — new. N2 (nit) — continues prior N3, not a regression. Against the card's scenario (an operator script on a token told to approve the queue): the skill turns the request down, points at listing and at Implemented-by: VERDICT: PASS |
…the queue item, keep list/get on the token client Claude-Session: https://claude.ai/code/session_01ADHkmSoMtbbwL3w3kwCmky Co-authored-by: Claude <noreply@anthropic.com>
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv CI note (2026-11-16T03:09Z), head |
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Contract-review-handoff: review#2 — CONTRACT_REVIEW_TIER unavailable (maintainer quota limit on the review tier, 2026-11-16T03:10Z) · head 769aad7 Owed: the delta review of fix round 2 against record 6905889120 (PASS on The seat's L1 read, for the reviewer to confirm or overturn:
|
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 769aad7 · 2026-11-16T03:14Z |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract reviewServed-tier: Read at 2026-11-16T03:18Z. Delta review of this head against PASS 6905889120 at f407440; claim: comment 6906277216; lane request 6906212339 on mailbox #33873 (the lane's at-tier reviewer was unavailable). Independence: implemented in an os-steve project thread, dispatched by domain:skills#2 (os-steve); reviewed by os-tesla, who neither dispatched nor implemented it. Delta read: one commit ① Derived judgmentsRead against Prior findings, by id:
Other judgments on the delta:
② Semver levelUnchanged and right: CI on this head ( CI completed before posting: 72 check-runs on this head, 58 success, 12 skipped, 2 failure (the one app-shell case named above, in a file this PR does not touch). ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. N1 (nit) — new. N2 (nit) — continues prior N2, not asked. The eval's Against the card's scenario (an operator script on a token told to approve the queue): the skill turns the request down, points at listing and at Implemented-by: VERDICT: PASS |
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv 维护者速读
席位核对Verdict: ACCEPT, held for the maintainer · head
|
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Flake reading 2026-11-16T21:11Z, CI run 43794489196 on head
|
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Second failure read 2026-11-16T21:25Z: the re-run (job 133616305813) failed on the same case, (b) CONTROL at 1011 ms. A re-run reuses the run's original merge base ( |
Requested by Steve · project thread
Fixes #34189
Clause-②: no
Metadata-protocol: none
维护者速读
objectstack-ai、client-sdk.mdx、actions-as-tools.mdx的 ObjectOS 提示框和client.ai.pendingActions的注释改成:批准或拒绝应用内 AI 待批动作,只能由发起那次调用的本人,在应用里用自己的登录会话来做;令牌(哪怕是本人的)和 AI 身份都会被拒,只能列出,不能决定;模型自己的确认不算数。加了一个 eval 用例。in-app-pending-action-decided-by-person的规则由 cloud#4607 在应用内的门落地后,这四处还在教「用令牌或 SDK 调 POST 去决定」,照做会被拒。skills/objectstack-ai/SKILL.md的 Human-in-the-loop 段;content/docs/api/client-sdk.mdx的 Pending actions 注释;packages/client/src/index.ts的pendingActions注释。node scripts/check-skills-token-ratchet.mjs | grep objectstack-ai/SKILL预期 6068 / 6801,全绿。What changes
Four teaching sites now say what the in-app door's confirmation rule says: deciding (approve or reject) an in-app AI pending action is the person's own act, on their signed-in session to the app. Listing stays as written.
skills/objectstack-ai/SKILL.md, Human-in-the-loop paragraph: drops "an operator approves or rejects … (or viaGET/POST /api/v1/ai/pending-actions/...)". The queue is listed in the inbox or viaGET /api/v1/ai/pending-actions. Only the person the call ran as decides, in the app on their signed-in session. Another user'sai:approvedoes not decide it. An API key or token (even the person's own) is refused, and so is an AI identity and any call that arrives through an AI door. "The model's own confirmation does not decide the item, and neither does aconfirmon the call: the item waits for the person." A second approver goes through the approvals engine (held). The next sentence now reads "Whether your action is queued". Frontmatter untouched.content/docs/api/client-sdk.mdx: the "Listing takesai:read, deciding takesai:approve" comment moves aboveapprove. It keeps theai:readlisting sentence and now says, as the skill does, that only the person the call ran as decides, on their signed-in session. Another user'sai:approvedoes not decide it. A client on an API key or token (even the person's own) lists and does not decide, and an AI identity is refused too. The block's closing "These methods are for … server code, jobs, CLIs, tests" now excepts approve and reject.packages/client/src/index.ts: thependingActionsnamespace docblock and theapprove/rejectdocblocks say the same, AI identity included. The existing "ai:readvsai:approve, handle the 403" paragraph is unchanged. Docblock text only, no code change.content/docs/ai/actions-as-tools.mdx, ObjectOS callout (about line 236): one sentence. "an operator resolves it from the AI Pending Actions Studio inbox (approve re-runs the same dispatcher; reject records a reason)" now says only the person the call ran as decides it in the inbox, on their own signed-in session. Another user'sai:approvedoes not decide it, and an API key, a token or an AI identity is refused. Approve runs the action as that person with every gate re-checked; reject records a reason. Sources: the spec contract's in-app door section, points 1-3 (Who decides, Which credential, As whom it runs: "never as a synthetic AI principal, through the same admitted sequence as any action call, every gate and permission re-checked"). The seat widened the claimed surface to this sentence (card comment 6905036822). Review N1 also changed "operators expect single-click yes/no" to "people expect". Nothing else in the callout changes.skills/objectstack-ai/evals/skills-tools-knowledge.json: case 6. An operator script on an API token is asked to approve the queue. Expected: list via the token, decide in the app on the person's session. An AI identity is refused too, and the model's own confirmation does not count.must_containispendingActions.list,signed-in sessionandrefused.must_not_containispendingActions.approve(. Self-consistent: nomust_containstring is inmust_not_contain, andexpected_outputcontains everymust_containstring and neithermust_not_containstring..changeset/34189-pending-action-decide-session.md:@objectstack/skillspatch,@objectstack/clientpatch (the docblock ships in its.d.ts). It says the door enforces this from the runtime release that carries the in-app door, not from this package release.Premise check (on
origin/maindfb8ed3)/api/v1/ai/pending-actions/:id/approve|reject.git grep pending-actionsoverpackages/services/**andpackages/plugins/**has no hits. The only hits are the client (packages/client/src/index.ts) and the protocol schemas (packages/spec/src/api/protocol.zod.ts4386 and 4403). The door is served by the AI service in cloud, and its refusal is cloud#4607, which this container cannot read. So no refusal code is quoted here. The text says "refused" and names no code. The client's existingai:approve403 note is kept as written.ai:approvedoes not" comes frompackages/spec/src/contracts/ai-service.ts, "The in-app assistant door: the same rule, its own channel", point 1 (Who decides).held" comes from point 1: "A host that wants a second person to approve the write uses the existingheldoutcome".packages/spec/src/migrations/entries/semantic/18.in-app-pending-action-decided-by-person.ts(replacement) says the same, from the release whose in-app door enforces it.ai:read" is the client's existing text. The spec pinai-service.test.tsholds thatlistPendingActionscarries none of the deciding points.GET/POST /api/v1/ai/pending-actions/...)". client-sdk.mdx:426-427 "Listing takesai:read, deciding takesai:approve— a caller that can see the queue may still be refused on approve. Handle the 403." The client docblock taught only theai:readvsai:approvesplit.Tests
pnpm --filter @objectstack/client test: Test Files 58 passed (58), Tests 812 passed (812).pnpm --filter @objectstack/client typecheck: exit 0, underos-verify-lock.Acceptance notes
skills/**mandates CONTRACT_REVIEW_TIER (dispatch-gates --tier: MANDATORY, no one-line exit). Measured quota exemption, on the maintainer's 2026-11-15 21:53Z 「fable 不多了,后续契约复审找review 席位」: this PR was authored at the thread's default tier, never lower. The at-tier L2 review is review#2's. Tier H: stays draft.skills/objectstack-ai/SKILL.mdwent from 23736 to 24291 bytes, 427 to 434 lines and 5929 to 6068 tokens (+139; review round 2 added 14). The ceiling is 6801, so the ratchet row does not move. Whole package (sum of everyskills/*/SKILL.md): 4593 to 4600 lines, 59219 to 59358 tokens. Bundle total: 248073 at the round-2 head. The eval file went from 1081 to 1343 tokens; eval fixtures are measured, not ratcheted.content/docs/ai/actions-as-tools.mdxtaught the same superseded route. Round 1 reported it to the seat. The seat widened the surface (6905036822), and round 2 fixes that one sentence.Review round 1 (review#2 record 6905434558, PASS on 3690b8e; seat fix order r1)
confirmcounts. Eval 6's expected output names both. The client docblocks,client-sdk.mdxandactions-as-tools.mdxadd "an AI identity" in their existing clause.ai:approveprecondition is dropped fromclient-sdk.mdx, which now uses the skill's wording. The class-level client docblock had no precondition. Its new paragraph now says "another user'sai:approvedoes not decide it", and its oldai:readvsai:approve403 paragraph stays.actions-as-tools.mdx"operators expect" now reads "people expect". Only that word changed.client-sdk.mdx's closing comment adds "(approve and reject excepted: those are the person's own act in the app)".must_contain"list" is now "pendingActions.list", and "/approve" is dropped frommust_not_contain. The expected output contains everymust_containstring and nomust_not_containstring. A script asserted this.Review round 2 (review#2 record 6905889120, PASS on f407440; seat fix order r2)
confirmon the call: the item waits for the person." The MCP table rows (delete_record,delete_records,run_action) are untouched. Eval 6 is unchanged.client-sdk.mdxwere reordered so that the list/get clause speaks only of the API-key/token client: "a client on an API key or token (even the person's own) can list and get, never decide; an AI identity is refused too". The two places are kept consistent.Verification
Round 4 head 769aad7.
dispatch-gatesreported no STALE TREE, so there was no merge this round; the round 3 merge oforigin/main7be32d3 stands.@objectstack/clientwas rebuilt first, and itstypecheckandtestran in the same lock (os-verify-lockVERDICT command-exit 0; Test Files 58 passed (58), Tests 812 passed (812)).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackgave 102 commands, and all of them pluscheck:skill-refswere run on 769aad7. The earlier rounds ran the same set at cf09e9f (after a fullpnpm build), at 3690b8e and at f407440. All of them were green.node scripts/pm/dispatch-gates.mjs --ranat 769aad7 reported: "102 derived famil(ies) accounted for — 102 run, 0 NOT-MEASURED (a DERIVED zero)". All 103 recorded commands exited 0, includingcheck:skill-docs,check:skill-refsandcheck:skill-examples.Notes on the run
node scripts/check-plugin-teardown-shape.mjs --self-testneeds its pinned fixture commit 621a487 in a shallow clone (git fetch --no-tags origin 621a487607881c66b2899b7e3477115229a156b4). With it, the self-test exits 0 with 48 cases.node scripts/check-skills-token-ratchet.mjsreadsskills/objectstack-ai/SKILL.md is 6068 tokens (ceiling 6801; headroom 733).Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintis a CI-owned repo scan, not run locally (the diff is prose and docblock text).main, one pull request.packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmSoMtbbwL3w3kwCmky