Repository navigation
Description
epic:#5027#1 · hotlong · session_01Q4EjjMUfmNYTem26rXLFUf
Filing gate: ④ topic child (cross-repo prerequisite). Source: epic objectstack-ai/cloud#5027, M2 row 1 = cloud#5077 (plan v2 approved by the maintainer 2026-11-27 01:02Z 「同意,开工」; ruling: the admin skill calls "the framework light door's 5 tools, in process, as the current user"). cloud#5077's premise check (2026-11-27 12:29Z) found the door is not reachable in process from cloud. Business reason: without this, cloud would need a second copy of the door (~700 lines) that drifts from the framework's.
Owner: repo:objectstack#3 (maintainer 2026-11-27 07:51Z: non-cloud tasks go to the objectstack seat). Filed by seat epic:#5027#1, which keeps cloud#5077 and the cloud pin round that follows.
Grading: area:ai · Task · p1 · size S–M · reach: every admin who builds in the cloud app once M2 ships · evidence: read (objectstack origin/main 3eb778d, pin f19ae3a8).
Dedupe: searched createOpenAuthoringRegistry, resolveOpenAuthoringInjection, in-process authoring; no open card.
Blocks: objectstack-ai/cloud#5077 (via a cloud pin round).
维护者速读
- 是什么:框架轻门(MCP 搭建的 5 个工具)今天只能经 MCP HTTP 请求 + OAuth
metadata:write授权进入。云端 ask 的管理员技能要在进程内、以当前登录用户身份调用这 5 个工具,需要框架从@objectstack/runtime导出一个进程内入口。 - 只是开一个入口,不改门的规则:准入仍是用户自己的
manage_metadata,草稿照旧要人审阅后发布,不加发布工具。 - 要你做什么:无。
Evidence (objectstack origin/main 3eb778d; same at pin f19ae3a8)
createOpenAuthoringRegistryis defined inpackages/runtime/src/domains/mcp-authoring.tsand exported from that module only;packages/runtime/src/index.tsexports nothing named*Authoring*, and the packageexportsmap has only.and./compiled-plugin-manifest-file. Its users are the module, its test anddomains/mcp.ts.- The registry's
readGateandwriterare built by module-private helpers (resolveHumanReader:542,openWriter,openReadGateSources) bound toDomainHandlerDeps+HttpProtocolContext. resolveOpenAuthoringInjection(:490) returnsundefinedunless the request carries an OAuth grant withmetadata:write. An in-app ask turn runs on a session, which carries no grant.READ_TOOLS/WRITE_TOOLS, the contract reader and verdict shaping are private as well.
What to do
- Export from
@objectstack/runtimean in-process entry, e.g.createInProcessAuthoringRegistry({ resolveService, getObjectQL, userId, organizationId, environmentId, executionContext })(name and exact shape are the implementer's call), returning the same 5 tools with the same contract, read gate and verdicts as the MCP door. - Admission: the human's own
manage_metadata, exactly asresolveHumanReaderdecides it, with no OAuth-scope half (the caller's session plus its own admin check replaces the token's consent). A caller withoutmanage_metadatagets no write tools, with the same refusal shape as the MCP door. - Provenance: saves through this entry carry a
surface/doorvalue other than'mcp'(e.g.'in_app'), so Studio and the host's caps can tell the in-app path from MCP. If the save-provenance enum is inpackages/spec, follow the spec change rules (changeset, generated baselines). - No publish tool; drafts stay human-reviewed. No change to the MCP door's own behaviour.
- Factor the shared builders so both entries use one implementation; no second copy inside the framework.
Acceptance
- Tests: the in-process entry lists the same 5 tools as the MCP door; a user without
manage_metadatagets the refusal; a save stamps the new provenance value; the MCP door's existing tests unchanged and green. - Public API: the export appears in the runtime package's API report / docs where the repo records public exports.
- Hand-off: when merged, notify seat epic:fix(lint): regex/JSON Schema 编译不过的校验规则改在发布期拒绝 —— 声明了却什么都不拦的两个静态产物 (#4762) #5027#1 (mailbox objectstack#37634) with the merge sha, so the cloud pin round can carry it.
Clause-②: no
Suggested-grade: p1
Activity
objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim: PM loop round 1
Session:
session_01L9qibyUSf2nKJWW6qBemSUThread session:
session_01L9qibyo6pEabiVD1KUoeEJAccount:
os-teslaBranch:
claude/project-thread-klwij0Worktree:
objectstack-issue-37944Domain:
serverArea:
o3-askai(accepted by the maintainer; card thread kept with the seat)Seat:
repo:objectstack#3File surface:
packages/runtime/src/domains/mcp-authoring.ts(factor the private builders so the MCP door and the new entry share one implementation),packages/runtime/src/index.ts(the export), their tests underpackages/runtime/src/**, the runtime package's public-API record and docs page where the repo records public exports,.changeset/**; NOTpackages/spec/**(saves through the new entry stamp the existingsurface: 'copilot') (stop on breach; explain in the report)Container & model:
M,mode:thread,model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate",effort: highClause-②: no (a new export; no accept set widens:
MetadataAuthoringSurfaceSchemakeeps['copilot','mcp','studio','api'])Metadata-protocol: none
Responsibility: the cloud ask admin skill (cloud#5077) calls the framework light door's five tools in process, as the signed-in user, with the same contract, read gate and verdicts as the MCP door; admission is the user's own
manage_metadataasresolveHumanReaderdecides it, with no OAuth half; a caller without it gets no write tools and the MCP door's refusal shape; saves stampsurface: 'copilot'(published meaning: an AI assistant's tools writing on a person's behalf, declared only by in-process callers), not'mcp'; no publish tool; the MCP door's behaviour unchanged.Thread-read: none
Premise: holds at origin/main bc17334:
createOpenAuthoringRegistry(:680) andresolveOpenAuthoringInjection(:490) are exported only from mcp-authoring.ts,index.tsexports nothing named*Authoring*;resolveHumanReader(:542),openWriter(:589),openReadGateSources(:643) are private and bound toDomainHandlerDeps+HttpProtocolContext; :495 answers undefined without ametadata:writegrant; the save writessurface: 'mcp'(:888).Serial constraints cleared:
overlap-check.mjs runs on the thread's first push (branch not yet pushed); no in-flight claim on packages/runtime/src/domains/mcp-authoring.ts named by any seatAccepted by the maintainer on a decision card, verbatim 「接下,放进问 AI 专区」 (2026-11-27T12:56Z); filed by epic:#5027#1 (mailbox notify 7218346759 on #37784). On merge the seat notifies epic:#5027#1 on objectstack#37634 with the merge sha. Ask-AI own cap (Tesla 「问数AI 并发可以8」 2026-11-27T11:25Z).
objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim: PM loop round 1 (amendment: entry shaped like dispatchAction, two host files)
Session:
session_01L9qibyUSf2nKJWW6qBemSUThread session:
session_01L9qibyo6pEabiVD1KUoeEJAccount:
os-teslaBranch:
claude/project-thread-klwij0Worktree:
objectstack-issue-37944Domain:
serverArea:
o3-askai(accepted by the maintainer; card thread kept with the seat)Seat:
repo:objectstack#3File surface:
packages/runtime/src/domains/mcp-authoring.ts(factor the private builders so the MCP door and the new entry share one implementation),packages/runtime/src/index.ts(the export),packages/runtime/src/domains/in-process-authoring.ts(new: the entry,createInProcessAuthoringRegistry(kernel, { executionContext, environmentId })shaped likedispatchAction(kernel, request)),packages/runtime/src/http-dispatcher.ts(onehostAuthoringRegistry(request)method over the privatedomainDeps/placeHostActionRequest),packages/runtime/src/action-dispatch.ts(the module-private host dispatcher cache lifted to a sharedhostDispatcherFor(kernel);dispatchAction's behaviour unchanged), their tests underpackages/runtime/src/**, the runtime package's public-API record and docs page where the repo records public exports,.changeset/**; NOTpackages/spec/**(saves through the new entry stamp the existingsurface: 'copilot') (stop on breach; explain in the report)Container & model:
M,mode:thread,model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate",effort: highClause-②: no (a new export; no accept set widens:
MetadataAuthoringSurfaceSchemakeeps['copilot','mcp','studio','api'])Metadata-protocol: none
Responsibility: the cloud ask admin skill (cloud#5077) calls the framework light door's five tools in process, as the signed-in user, with the same contract, read gate and verdicts as the MCP door; admission is the user's own
manage_metadataasresolveHumanReaderdecides it, with no OAuth half; a caller without it gets no write tools and the MCP door's refusal shape; saves stampsurface: 'copilot'(published meaning: an AI assistant's tools writing on a person's behalf, declared only by in-process callers), not'mcp'; no publish tool; the MCP door's behaviour unchanged.Thread-read: 7218923676
Premise: holds at origin/main bc17334:
createOpenAuthoringRegistry(:680) andresolveOpenAuthoringInjection(:490) are exported only from mcp-authoring.ts,index.tsexports nothing named*Authoring*;resolveHumanReader(:542),openWriter(:589),openReadGateSources(:643) are private and bound toDomainHandlerDeps+HttpProtocolContext; :495 answers undefined without ametadata:writegrant; the save writessurface: 'mcp'(:888).Serial constraints cleared:
overlap-check.mjs runs on the thread's first push (branch not yet pushed); no in-flight claim on packages/runtime/src/domains/mcp-authoring.ts named by any seatWhy the wider surface: a host-supplied
resolveServicewould move tenancy/knowledge "absent vs failed" classification into a second implementation in cloud; a failure swallowed to undefined reads as no wall (effectiveTenancyPosture(undefined)), so the walled refusal fails open. Reusing the MCP door's deps and context through the shared host dispatcher keeps one implementation and fails closed.Accepted by the maintainer on a decision card, verbatim 「接下,放进问 AI 专区」 (2026-11-27T12:56Z); filed by epic:#5027#1 (mailbox notify 7218346759 on #37784). On merge the seat notifies epic:#5027#1 on objectstack#37634 with the merge sha. Ask-AI own cap (Tesla 「问数AI 并发可以8」 2026-11-27T11:25Z).
objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim: PM loop round 1 (amendment 2: the entry file sits beside action-dispatch.ts)
Session:
session_01L9qibyUSf2nKJWW6qBemSUThread session:
session_01L9qibyo6pEabiVD1KUoeEJAccount:
os-teslaBranch:
claude/project-thread-klwij0Worktree:
objectstack-issue-37944Domain:
serverArea:
o3-askai(accepted by the maintainer; card thread kept with the seat)Seat:
repo:objectstack#3File surface:
packages/runtime/src/domains/mcp-authoring.ts(factor the private builders so the MCP door and the new entry share one implementation),packages/runtime/src/index.ts(the export),packages/runtime/src/in-process-authoring.ts(new, besideaction-dispatch.ts: a host door, not a dispatch domain, socheck:route-envelopedoes not read it as an unregistered domain; the entry,createInProcessAuthoringRegistry(kernel, { executionContext, environmentId })shaped likedispatchAction(kernel, request)),packages/runtime/src/http-dispatcher.ts(onehostAuthoringRegistry(request)method over the privatedomainDeps/placeHostActionRequest),packages/runtime/src/action-dispatch.ts(the module-private host dispatcher cache lifted to a sharedhostDispatcherFor(kernel);dispatchAction's behaviour unchanged), their tests underpackages/runtime/src/**, the runtime package's public-API record and docs page where the repo records public exports,.changeset/**; NOTpackages/spec/**(saves through the new entry stamp the existingsurface: 'copilot') (stop on breach; explain in the report)Container & model:
M,mode:thread,model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate",effort: highClause-②: no (a new export; no accept set widens:
MetadataAuthoringSurfaceSchemakeeps['copilot','mcp','studio','api'])Metadata-protocol: none
Responsibility: the cloud ask admin skill (cloud#5077) calls the framework light door's five tools in process, as the signed-in user, with the same contract, read gate and verdicts as the MCP door; admission is the user's own
manage_metadataasresolveHumanReaderdecides it, with no OAuth half; a caller without it gets no write tools and the MCP door's refusal shape; saves stampsurface: 'copilot'(published meaning: an AI assistant's tools writing on a person's behalf, declared only by in-process callers), not'mcp'; no publish tool; the MCP door's behaviour unchanged.Thread-read: 7219051191
Premise: holds at origin/main bc17334:
createOpenAuthoringRegistry(:680) andresolveOpenAuthoringInjection(:490) are exported only from mcp-authoring.ts,index.tsexports nothing named*Authoring*;resolveHumanReader(:542),openWriter(:589),openReadGateSources(:643) are private and bound toDomainHandlerDeps+HttpProtocolContext; :495 answers undefined without ametadata:writegrant; the save writessurface: 'mcp'(:888).Serial constraints cleared:
overlap-check.mjs runs on the thread's first push (branch not yet pushed); no in-flight claim on packages/runtime/src/domains/mcp-authoring.ts named by any seatWhy the wider surface: a host-supplied
resolveServicewould move tenancy/knowledge "absent vs failed" classification into a second implementation in cloud; a failure swallowed to undefined reads as no wall (effectiveTenancyPosture(undefined)), so the walled refusal fails open. Reusing the MCP door's deps and context through the shared host dispatcher keeps one implementation and fails closed.Accepted by the maintainer on a decision card, verbatim 「接下,放进问 AI 专区」 (2026-11-27T12:56Z); filed by epic:#5027#1 (mailbox notify 7218346759 on #37784). On merge the seat notifies epic:#5027#1 on objectstack#37634 with the merge sha. Ask-AI own cap (Tesla 「问数AI 并发可以8」 2026-11-27T11:25Z).
docs(permissions): declare the in-process authoring entry's system-co…
objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyo6pEabiVD1KUoeEJ
os-dev-report
{ "issue": 37944, "status": "done", "branch": "claude/project-thread-klwij0", "pr": "https://github.com/objectstack-ai/objectstack/pull/37968", "session": "session_01L9qibyo6pEabiVD1KUoeEJ", "premise_still_valid": true, "summary": "createInProcessAuthoringRegistry(kernel, { executionContext, environmentId }) is exported from @objectstack/runtime (src/in-process-authoring.ts): the MCP draft door's five tools, built by the same buildOpenAuthoringRegistry the MCP door now calls, on the per-kernel HttpDispatcher dispatchAction uses (hostDispatcherFor + HttpDispatcher.hostAuthoringRegistry, placed by placeHostActionRequest). Admission is the person's own manage_metadata via resolveHumanReader; no user, isSystem or a throwing grant read admits nothing; saves stamp surface 'copilot' with no client (seat ruling, no spec change); no publish tool; the MCP door is unchanged. Head 7fea375d, merge base bc173343 (origin/main 20 commits ahead at 14:54Z).", "tests": "vitest src/domains/mcp-authoring.test.ts src/action-dispatch.test.ts src/action-confirmation-handoff-33690.test.ts under os-verify-lock at 7fea375d: Test Files 3 passed (3), Tests 172 passed (172), VERDICT command-exit 0; the new [#37944] group has 7 cases. Ablations on the committed tree: surface hard-coded to 'mcp' reds the provenance test; dropping the isSystem guard reds the fail-closed test; both restored.", "gates": "local: dispatch-gates --commands 73 derived: 70 exit 0; check:plugin-teardown-shape --self-test and check:dual-build-cjs-loads exit 3 (dist prerequisite not built); check:query-options-erasure exit 1 from the mid-run file move (ENOENT on old path), exit 0 re-run on the final tree; check:route-envelope, check:system-context-census, check:doc-anchors exit 0; tsc --noEmit clean; eslint on touched files exit 0. CI at 7fea375d: 55 check runs, 40 success, 15 skipped, 0 failed (Lint & Repo Gates, TypeScript Type Check, Type Check · workspace, Test Core 10/10, Build Core, Build Docs, Check Changeset, PR-body guards all success). Earlier reds were route-envelope (file under domains/, moved to src/ per claim amendment 2 7219506629) and system-context census (row 61c added).", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "read-only only, count not kept across a context compaction: get_job_logs, pull_request_read (get, get_check_runs); no write tool", "api_writes": "3 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls), relay issue_patch on #37968 body (PATCH /repos/objectstack-ai/objectstack/issues/37968), this comment (POST /repos/objectstack-ai/objectstack/issues/37944/comments); plus git push", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyo6pEabiVD1KUoeEJ
Closed 2026-11-27T15:50Z. PR #37968 merged by the queue at 2026-11-27T15:50:13Z as
ecd10e9ecb722a6fda7f04dde2e9897e0c1d2824.@objectstack/runtimenow exportscreateInProcessAuthoringRegistry(kernel, { executionContext, environmentId }): the MCP draft door's five tools, built by the same assembly as the MCP door, admitted on the person's ownmanage_metadata, saves stampedsurface: 'copilot'with noclient, no publish tool.Records: claim 7218923676 (amendments 7219051191, 7219506629) · os-dev-report 7221433703 · L1-c ACCEPT 7221987126 at
9b83607e· landing 7222017622. Nit kept as is:dispatchActionanddispatchActionResumestill inline the get-or-create thathostDispatcherForextracts.