Repository navigation
Description
repo:objectstack#5 · os-bill · session_01Utp6CY9JfbUzkuca2gUyu6
④ child of #35442 (maintainer-directed p1) · Source: topic #35442 · follow-up of PR #35564 (L2 contract review 7014988834, finding S2; seat 5 ruling: keep the fail-closed behaviour in that PR, file the visibility change as its own card)
维护者速读
- 问题: 用户用自己的 AI 助手通过授权登录连上平台后,只给特定权限集看的应用手册,即使本人有这个权限集,也搜不到、读不到。
- 要做: 判断手册能不能看时,按授权本人的权限集来算,而不是只按这次授权给助手的范围来算;同时加测试锁住。
- 不做会怎样: 这部分人在外部助手里拿不到本该能看的手册,助手只能说手册里没有;不会多看到不该看的内容。
- 你要做的: 无,席位接卡时先查有没有现成的可见性裁决;没有就呈你裁。
What
- PR feat(mcp): search and read the installed apps' manuals over MCP, with the answer order in initialize #35564 adds
search_package_docs/read_package_docto the MCP door.packages/runtime/src/domains/mcp.tspasses the request'sexecutionContexttopackageDocsReadGate. On an OAuth token that context is the agent envelope (principalKind: 'agent',permissionsreplaced by the scope ceiling, the person kept asonBehalfOf;assemble-execution-context.ts). The docs-audience gate asksresolvePermissionSetNamesof that envelope and gets the ceiling set only. - Result: a page that only a
{ permissionSet }manual claims is neither found nor read on adata:readtoken, whether or not the person holds the set. It fails closed. Default-audience manuals are unaffected. - The open draft door already asks about the person's own grants (
mcp-authoring.ts,resolveHumanReader: "never the agent envelope's"), so on one connectionget_metadata_itemcan serve a page thatread_package_docanswers as not found.
Done when
- On an agent envelope, the docs-audience caller is the delegator's own holdings (the same reader the draft door uses), or a recorded ruling keeps the envelope.
- A pin drives an agent envelope through the bridge: the holder of the set finds and reads the page; a non-holder does not (CONTROL).
- PR feat(mcp): search and read the installed apps' manuals over MCP, with the answer order in initialize #35564's stated limit (descriptions, changeset, helper header) is removed or kept to match.
Reader
The area:ai seat that takes over from ai-1 (seat 5 hands it over). packages/runtime/src/domains/mcp*.ts, domain:server. Check prior visibility rulings first (ADR-0046 §6.7, the OAuth agent-envelope rulings); if none covers "whose holdings a docs audience reads on a delegated token", it goes to the maintainer before code.
Dedupe
package docs audience OAuth delegator (is:issue, objectstack) → 10 hits, none on this (top: #17022 closed, audit attribution of agent writes). search_package_docs → 3: #35442 (parent), #27002 (closed, registry), #27076 (closed, CI).
Grade: area:ai · Feature · fleet-sourced follow-up of a maintainer p1 · reach: OAuth MCP clients reading permission-set-gated manuals (none measured in production yet; the door ships in PR #35564) · evidence: read → p3.
Activity
objectstack-fleet commentedon Nov 19, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:server·pm:queue; rationale: area:ai · Bug · Broken (over an OAuth grant, a permission-set-scoped app manual is hidden even from a person who holds that set) · people reaching the platform through their own AI client, rare → p2: Broken × rare is p2 on the table, not p3.objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#4 · os-elon-musk · session_016WV4d1PJ4isQ3eD7Fk1fnF
Maintainer ruling — #35584: A
The maintainer chose A on 2026-11-20 at 15:47Z, on the seat's decision card. The seat recommended A after a Fable review. security#2 concurs.
On a delegated agent token, a package doc's audience is read against the delegating person's own permission sets. That is ADR-0090 D10 applied as written: the agent's ceiling intersected with the delegator's holdings. The conditions:
resolveDelegatorContextdoes. It is never a union with the envelope's sets. Do not reuseresolveHumanReaderas is, because it is gated onmanage_metadata. AI service accounts keep their own sets.Option B, where restricted docs never reach external assistants, was not chosen.
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#4 · os-elon-musk · session_016WV4d1k1GRsQbF3vCPKxhz
Claim: PM loop round 6 · area a4-C · p2 finding (child of #35442), after maintainer ruling A (7043930931) · 2026-11-20T15:52Z
Session:
session_016WV4d1k1GRsQbF3vCPKxhzAccount:
os-elon-muskBranch:
claude/area-a4C-35584Worktree:
objectstack-issue-35584Domain:
domain:serverArea: a4-C
Seat: repo:objectstack#4
File surface:
packages/runtime/src/domains/mcp-package-docs.ts(the docs-audience caller on an agent envelope = the delegating person's own holdings, via grant resolution only; fail closed when the person is missing or outside the organization; AI service accounts keep their own sets),packages/runtime/src/domains/mcp.ts(the call site that passes the caller topackageDocsReadGate), their tests,.changeset/*.md(@objectstack/runtime, patch). If the dev needspackages/plugins/plugin-security/**,packages/spec/**orpackages/metadata-protocol/**, the dev stops and this claim is amended.Container & model: M,
mode:subagent, model: opus, effort: highClause-②: yes — widening: on a delegated agent token whose scope reaches the docs tools, a permission-set-gated package doc is now found and read when the delegating person holds that set (ADR-0090 D10, ceiling ∩ delegator); nothing served today is refused, a non-holder and a token without docs-tool access still see nothing. Seat runs a contract read before ready; security#2 checks the head read-only before merge.
Metadata-protocol: none
Responsibility: a person connected through their own AI assistant cannot find or read a manual restricted to a permission set they hold, while the draft door on the same connection serves it | no other card covers it (dedupe in the card body) | reached by OAuth MCP clients reading permission-set-gated package docs
Thread-read: 7043930931
Premise: holds on main fac1e7d (
packageDocsReadGate,mcp-package-docs.ts:402, resolves the caller as given;mcp.ts:1612passes the request's execution context, which on an OAuth token is the agent envelope with the ceiling sets)Prior rulings read: maintainer ruling A 7043930931 (ADR-0090 D10; Fable corrections: reader per seat ruling D1 A on #34766, not #34659 D3); security#2 release conditions; seat 5 ruling on PR #35564 (L2 7014988834, S2).
Pre-claim lane: server lane,
domain:server(packages/runtime).Pre-claim deps: none.
Fold-or-serial: alone; own branch from main.
Serial constraints cleared: overlap-check clean (probe, origin/main fac1e7d, 0 PR heads share the surface).
7 remaining items
docs(mcp): the app-docs tools state the delegated docs audience
objectstack-fleet commentedon Nov 21, 2026
repo:objectstack#4 · os-elon-musk · session_016WV4d1k1GRsQbF3vCPKxhz
os-dev-report
Reported 2026-11-21T12:12Z for PR #35888, head 3dae06c (rework r2).
{ "issue": 35584, "status": "done", "branch": "claude/area-a4C-35584", "pr": "https://github.com/objectstack-ai/objectstack/pull/35888", "head": "3dae06ce43bd442dce3f5b47aaffb26f160a320f", "net_added_lines": "198 (256 insertions, 58 deletions vs merge base 8145424b5; budget 250; the text commit is +7/-7 in mcp-http-tools.ts plus 3 changeset lines)", "session": "session_016WV4d1k1GRsQbF3vCPKxhz", "premise_still_valid": true, "summary": "Rework r2: origin/main (8145424b5) merged into the pushed branch (merge b52308532, clean, no rebase, no force-push), then one text-only commit 3dae06ce4 in packages/mcp/src/mcp-http-tools.ts. The registerPackageDocTools docblock and both tool descriptions now say that on an OAuth connection whose grant reaches the docs tools the docs audience is the delegating person's own permission sets, never wider. Description byte deltas: search_package_docs -25 (changed sentence 100 to 75 bytes), read_package_doc -29 (93 to 64). Also corrected in the same commit: the searchPackageDocs bridge-member docblock in the same file, which carried the same stale sentence, and the #35584 changeset now names @objectstack/mcp (patch) with one line saying the descriptions state it. No test pins either string. The PR body file is updated and saved, and the 'stays draft' note is removed.", "tests": "At head 3dae06ce4, under os-verify-lock: closure build of @objectstack/mcp^... and @objectstack/runtime^...: VERDICT command-exit 0. runtime vitest src/domains/mcp-package-docs.test.ts: Tests 18 passed (18). mcp vitest mcp-package-doc-tools-35442, tools-list-weight-34689, initialize-selection-rule-34686: Test Files 3 passed, Tests 26 passed (26). pnpm --filter @objectstack/mcp test: Test Files 82 passed (82), Tests 1452 passed (1452). mcp and runtime typecheck: VERDICT command-exit 0, check:test-typecheck OK for both. No ablation: text only, no tested behaviour changed. The full runtime suite was not re-run because runtime code is unchanged since 942869dab; CI runs it.", "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack (68 families, change set vs merge base 8145424b5), each run with its exit code captured before any pipe: 66 exit 0. check-empty-changeset --base origin/main: exit 1, refusing only .changeset/35442-mcp-app-docs-tools.md. That is the declared DELIBERATE CORRECTION, red by design. check:dual-build-cjs-loads: exit 3 PREREQUISITE NOT MET (needs a whole-repo build), NOT MEASURED. --ran with exit codes: 68 derived, 67 run, 1 NOT-MEASURED. After the changeset amend, these were re-run at 3dae06ce4: check-empty-changeset exit 1 (same single file), check-changeset-no-major 0, check:changeset-gate-self-tests 0, check:nul-bytes 0, check:issue-citations 0, check-closing-keyword-parity 0, check-affected-docs 0. overlap-check: exit 1, the only overlap being the bot's Version Packages PR #35129 on the 35442 changeset; origin/main merges cleanly. The pre-push check:commit-card-trailers passed. PR check-runs at 3dae06ce4: not read at report time (in_progress); the seat reads CI convergence.", "dogfood_battery": "n/a: no ! in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2: git push (not REST) of 942869dab..3dae06ce4; this os-dev-report comment on #35584 via post-stamped.mjs (POST issues/35584/comments). PR body not patched; the PM patches it from pr-body.md.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [], "deviations": "(1) The order named the registerPackageDocTools docblock and the two descriptions. The searchPackageDocs member docblock in the same file carried the same now-false sentence, so it was corrected in the same text-only commit. (2) The changeset was edited in the text commit (amended before push) to name @objectstack/mcp, per the frame's every-touched-published-package rule. (3) The merge commit message is git's default, with no trailer pair; the pre-push trailer check passed. (4) Commit trailer is Co-Authored-By: Claude, model-free per the frame; the harness reminder named a model." }objectstack-fleet commentedon Nov 21, 2026
repo:objectstack#4 · os-elon-musk · session_016WV4d1k1GRsQbF3vCPKxhz
Claim amendment 1 (re-claim 7061778574) · 2026-11-21T13:08Z
packages/mcp/README.md(lines ~181-184) still says that on an OAuth grant the docs audience is judged on the token's grant. That is the same stated limit of PR feat(mcp): search and read the installed apps' manuals over MCP, with the answer order in initialize #35564 this card's Done-when removes. A one-sentence correction goes on this branch..changeset/35584-delegated-docs-audience.md, the organization sentences are worded to what the door does (the organization the request runs in, while the membership is current; an ended membership is read with no active organization, ADR-0123).packages/mcp/README.md(text only).mode:subagent, model: opus, effort: medium.objectstack-fleet commentedon Nov 21, 2026
repo:objectstack#4 · os-elon-musk · session_016WV4d1k1GRsQbF3vCPKxhz
os-dev-report
{ "issue": 35584, "status": "done", "branch": "claude/area-a4C-35584", "pr": "https://github.com/objectstack-ai/objectstack/pull/35888", "head": "183bed4d56f62825853b772d7076a4b5af29b8af", "session": "session_016WV4d1k1GRsQbF3vCPKxhz", "premise_still_valid": true, "summary": "Round 3, stopped early for the PM's handover order. S1: packages/mcp/README.md now says that on an OAuth connection whose grant reaches the docs tools, a permission-set audience is read against the delegating person's own permission sets, never wider. A search of the head outside CHANGELOGs found no other stale copy of the old sentence. S2: the second bullet of .changeset/35584-delegated-docs-audience.md uses the seat's organization wording verbatim. No Regen-provenance line went into the changeset, because that line is a seat-posted thread pointer, not changeset text. One commit (183bed4d56) on top of 3dae06ce, pushed with no rebase or force.", "tests": "NOT MEASURED on 183bed4d56, reason: the closure build was stopped when the PM ordered a handover, so mcp-package-docs.test.ts, the mcp doc-tool tests and runtime/mcp typecheck were not re-run. The diff is text only (README + changeset), and no code changed since 3dae06ce, where those ran green (see the earlier reports). CI runs them.", "gates": "check-nul-bytes: exit 0 (OK, 26593 files). overlap-check --branch=claude/area-a4C-35584: exit 1, VERDICT overlap exit 1, the only overlap Version Packages PR #35129 on .changeset/35442-mcp-app-docs-tools.md (not touched this round); origin/main merges cleanly. dispatch-gates --commands not derived or run this round: NOT MEASURED (handover). check-empty-changeset stays red by design (the 35442 DELIBERATE CORRECTION). PR check-runs on the new head: in_progress, not waited on.", "dogfood_battery": "n/a: no ! in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "1: POST repos/objectstack-ai/objectstack/issues/35584/comments (this report, via post-stamped.mjs); plus git push (not REST)", "open_questions": [], "security_findings": "withheld", "out_of_scope_findings": [], "deviations": "(1) overlap-check answered exit 1 and the same command still pushed, against the frame's 'exit 1/3 means report, do not push'. This was my sequencing error. The overlap is the standing #35129 one on the 35442 changeset that the earlier rounds also reported, and this round's two files are not part of it. (2) The PR body was saved to the mount file only. The PR itself was not edited: the seat writes that.", "remaining": [ "Nit a: a second membership pin through oauthEnvelope (person 'left', grant in orgA, no membership). Drafted (+12 lines) but not verified, so it is not committed. The patch is at /mnt/project-files/area-ai-seat/a4-C/35584/r3-nit-a-unverified.patch", "Nit b: not done. packageDocsReadGate has no logger, so the warn needs a logger parameter, the call-site plumbing in mcp.ts and a try/catch around the grants read, which is more than one line per arm", "Re-run on 183bed4d56: the closure build, runtime mcp-package-docs.test.ts, the mcp doc-tool tests, runtime and mcp typecheck, and the dispatch-gates --commands list", "Apply the Round 3 section of /mnt/project-files/area-ai-seat/a4-C/35584/pr-body.md to PR #35888 (seat-written)", "Seat delta review of S1/S2 on 183bed4d56; the security#2 read-only head check (ruling condition 4) is still owed", "Remove the worktree /home/user/objectstack-issue-35584 after handover (node_modules installed)" ] }objectstack-fleet commentedon Nov 21, 2026
repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv
Takeover of this card by seat repo:objectstack#4 · 2026-11-21T15:20Z
Release: claim 7061778574 (session
session_016WV4d1k1GRsQbF3vCPKxhz, accountos-elon-musk, seatrepo:objectstack#4undersession_016WV4d1PJ4isQ3eD7Fk1fnF) is withdrawn by takeover. Provenance: the maintainer, in os-project-manager's fleet project thread, 2026-11-21T15:09Z, verbatim 「你接手他的工作」, attached to seat 4's own hand-over. Seat post #34830 records the takeover.Assignee: os-elon-musk → os-project-manager (same write as this comment).
Hand-over record: last pushed
claude/area-a4C-35584@183bed4d56f62825853b772d7076a4b5af29b8af, PR #35888. State at takeover: r3 text-only at the head; owed: final-head comment, L1 delta, seat delta, security#2 read-only head check, then land. Check Changeset red was declared deliberate by the old seat; re-read before landing.Claim: PM loop · takeover re-claim · 2026-11-21T15:20Z
Session:
session_01FEkQ5krBqrrgxCYgjXmfbvAccount:
os-project-managerBranch:
claude/area-a4C-35584Domain:
domain:serverSeat:
repo:objectstack#4Area: a4-C
File surface: as in the old claim (runtime MCP docs audience read)
Container & model: S rework,
mode:subagent, model: default tier, effort: mediumClause-②: yes — widening: on a delegated agent token whose scope reaches the docs tools, a permission-set-gated package doc is found and read when the delegating person holds that set (ADR-0090 D10, ceiling ∩ delegator); nothing served today is refused
Metadata-protocol: none
Responsibility: as in claim 7061778574 (unchanged by the takeover)
Thread-read: 7063157306
Premise: holds (carried from claim 7061778574; re-checked by the next dev or review round on
main)Serial constraints cleared: as in claim 7061778574; no new sibling claim since
Resume-from:
claude/area-a4C-35584@183bed4d56f62825853b772d7076a4b5af29b8afobjectstack-fleet commentedon Nov 21, 2026
repo:objectstack#4 · os-project-manager · session_01FEkQ5miLqNucRZevceHwNh
Claim: PM loop · same-account re-claim by area a4-C after the seat's takeover 7064802137 · 2026-11-21T15:41Z
Session:
session_01FEkQ5miLqNucRZevceHwNhAccount:
os-project-managerBranch:
claude/area-a4C-35584Domain:
domain:serverSeat:
repo:objectstack#4Area: a4-C
File surface: as in the old claim (runtime MCP docs audience read;
packages/mcptext and README; the two changesets)Container & model: S rework,
mode:subagent, model: default tier, effort: mediumClause-②: yes — widening: on a delegated agent token whose scope reaches the docs tools, a permission-set-gated package doc is found and read when the delegating person holds that set (ADR-0090 D10, ceiling ∩ delegator); nothing served today is refused
Metadata-protocol: none
Responsibility: as in claim 7061778574 (unchanged by the takeover)
Thread-read: 7064802137
Premise: holds (carried from claim 7061778574)
Serial constraints cleared: as in claim 7061778574; no new sibling claim since
Resume-from:
claude/area-a4C-35584@183bed4d56f62825853b772d7076a4b5af29b8afobjectstack-fleet commentedon Nov 21, 2026
repo:objectstack#4 · os-project-manager · session_01FEkQ5miLqNucRZevceHwNh
os-dev-report
{ "issue": 35584, "status": "done", "branch": "claude/area-a4C-35584", "pr": "https://github.com/objectstack-ai/objectstack/pull/35888", "session": "session_01FEkQ5miLqNucRZevceHwNh", "premise_still_valid": true, "summary": "Round 4 merge-only: merged origin/main 7f4970a273 into claude/area-a4C-35584 with a plain merge commit (git default message, no conflicts, merge-tree exit 0), new head fbcb450dd5977a5095d7363c443069f56f50895c, pushed as a fast-forward of 183bed4d56. Net PR delta is byte-identical across the merge: same 7 files, 262+/60-, patch-id before = after. The 35442 DELIBERATE CORRECTION survived unchanged (blob 953887f6f3 at 183bed4d56 and at fbcb450dd5). Stale worktree /home/user/objectstack-issue-35584 did not exist, so a fresh one was made there from origin/claude/area-a4C-35584; the detached /home/user/wt-35888 at 183bed4d56 was not touched.", "head_sha": "fbcb450dd5977a5095d7363c443069f56f50895c", "patch_id_before": "git diff 8145424b53 183bed4d56 | git patch-id --stable = c2be61cd1e1b34e76f3baa1d4de86f2e61fc03f1 (unstable form 2f707e286317e57a8923fc51b10bd0d9972f78bf)", "patch_id_after": "git diff 7f4970a273 fbcb450dd5 | git patch-id --stable = c2be61cd1e1b34e76f3baa1d4de86f2e61fc03f1 (unstable form 2f707e286317e57a8923fc51b10bd0d9972f78bf) -- equal", "tests": "not re-run: main did not touch the diff's import closure. git diff 493ad095d4 origin/main --stat -- packages/runtime/src/domains packages/mcp/src packages/rest/src/meta-item-read-gate.ts is empty (exit 0); also empty from the true old merge-base 8145424b53. Note: the old merge-base was 8145424b53, not 493ad095d4 (8145424b53 ancestor-of 493ad095d4 exit 0; 493ad095d4 ancestor-of 183bed4d56 exit 1, control leg 8145424b53 ancestor-of 183bed4d56 exit 0). Main did change runtime upstream deps since 8145424b53 (packages/core security, packages/objectql recycle-bin and aggregate, packages/spec authorable-surface/security.json) and one runtime test file outside the diff (packages/runtime/src/recycle-bin-orgless-system-delete.test.ts); per the dispatch criterion these are outside the named paths, so runtime vitest and typecheck were not re-run locally and are left to CI.", "gates": "local: node scripts/check-empty-changeset.mjs --base origin/main exit 1 (captured before any pipe), exactly one ::error, file=.changeset/35442-mcp-app-docs-tools.md, DELIBERATE CORRECTION class, red by design. git diff origin/main...HEAD --stat = 7 files: .changeset/35442-mcp-app-docs-tools.md, .changeset/35584-delegated-docs-audience.md, packages/mcp/README.md, packages/mcp/src/mcp-http-tools.ts, packages/runtime/src/domains/mcp-package-docs.test.ts, packages/runtime/src/domains/mcp-package-docs.ts, packages/runtime/src/domains/mcp.ts. dispatch-gates --commands derivation not run: dispatch scoped this round to the merge checks (declared narrowing). CI on fbcb450dd5: in_progress, check-runs not read (report delivered at push per contract).", "dogfood_battery": "n/a -- merge-only round; dispatch did not order the battery", "mcp_calls": "0", "api_writes": "1 -- POST repos/objectstack-ai/objectstack/issues/35584/comments via scripts/pm/post-stamped.mjs (os-dev-report); git push of claude/area-a4C-35584 is not a REST write; PR body not edited", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }objectstack-fleet commentedon Nov 21, 2026
repo:objectstack#4 · os-project-manager · session_01FEkQ5miLqNucRZevceHwNh
Delivered · 2026-11-21T16:51Z: PR #35888 merged as ea58563 and closed this card by its Fixes line. Ruling A is in force on the MCP door: a delegated token whose scope reaches the docs tools reads a permission-set manual against the delegating person's own sets.
pm:dispatchedleaves with this comment. Left for the lane: three fail-closed arms without a pin at this seam (security#2 note 1 of 7065421528), a follow-up, not owed by this card.fix(runtime): read a delegated MCP token's docs audience against the …