Repository navigation
Description
repo:objectstack#4 · os-elon-musk · session_016WV4d1PJ4isQ3eD7Fk1fnF
Filing gate: ④ a child of the MCP build line #35152, split out of #34778. It is the follow-up that #34778's landing left owed: seat record 7025763862 on PR #35665, item 5: 「草稿门不提供 schema 读取,另立席位卡」. Source: fleet. Reader: the domain:server lane (packages/runtime/src/domains/mcp-authoring.ts, packages/mcp). Dedupe: schema draft door mcp (open) found #34778, #34659 and #34689, and none of them covers it. mcp schema contract metadata type found none.
Grade: p2 · area:ai · Feature · evidence read on main cceb5c626d3c. It inherits the grade of #34778 (p2), the card it splits from, as #35264 did from #34780. The ruled procedure of #34778 (#34691 S3 = A: inspect, read the contract, save, read the verdict) has no door for its second step.
维护者速读
- 要做的:在 MCP 草稿门上加一个只读入口,让外部 AI 客户端能读到某个元数据类型(流程、仪表盘等)允许写哪些字段、哪些必填。
- 为什么:现在只用 MCP 搭建的客户端看不到这份规则。环境里还没有同类条目时,它只能猜字段,靠保存被拒一次次试,搭建慢,也容易出错。Studio 和 REST 早就能读到同一份规则。
- 需要你做的:无。
Measured (objectstack main cceb5c626d3c)
- The draft door serves exactly five tools:
list_metadata_items,get_metadata_item,list_drafts,save_metadata_draftanddelete_metadata_draft(packages/runtime/src/domains/mcp-authoring.ts:194-304). Each takes atypestring (:176-180), and none returns that type's schema, required keys or create seed.get_metadata_itemreturns one existing item.save_metadata_drafttakesitemas a bare{ type: 'object' }(:272). - The open server's other reads do not cover it either.
describe_objectreturns a data object's fields (packages/mcp/src/mcp-http-tools.ts:3685-3698). Themetadata_typesresource lists type names only,{ types, totalCount }(packages/mcp/src/mcp-server-runtime.ts:2422-2440). - The platform already builds the contract.
getMetaTypesderives a JSON Schema per type fromgetMetadataTypeSchemaand adds acreateSeed(packages/metadata-protocol/src/protocol-discovery-and-bases.ts:612,:647-657). REST serves this asGET /meta/types(packages/rest/src/meta-collection-routes.ts:274), and Studio's forms read it. MCP does not expose it. - The shipped skill works around the gap.
skills/objectstack-mcp-build/SKILL.md:50-55says: where the client cannot read files, "read a published item of the same type, and let the save check you". A type with no published item in the environment therefore has no contract source on the door. The client learns the shape only from the Zod refusals ofsave_metadata_draft.
Done when
- A client on the draft door, holding
metadata:writeand the caller'smanage_metadata, can read one type's contract in a single call: its JSON Schema (from the samegetMetadataTypeSchemapath as/meta/types) and its create seed, where one exists. A type with no schema is answered as such and never with an empty object. This can be a sixth read tool or a field on an existing read, whichever the PR measures as smaller intools/list. It must not undo mcp: slim the open door's tool list (40 KB at tools/list; validate_expression alone is 7.8 KB) #34689's slimming, and its byte cost goes in the PR. - Test (on
examples/app-crm): the read forflowreturns a schema whose required keys matchgetMetadataTypeSchema('flow'). A token withoutmetadata:write, and an API key, do not see it. skills/objectstack-mcp-build/SKILL.mdsection 3 names the new read in place of the "read a published item" fallback. That is a skills-lane follow-up and part of this card's acceptance.- Amended 2026-11-20 (seat ruling, route (a), PR feat(runtime): the MCP draft door answers a metadata type's contract #35871): the "single call" is a field on
list_metadata_items(contract: true). By default it answers a lean one-level contract (required keys, a per-key summary, adrillJSON Pointer per nested key, the create seed);contractPathanswers the full served sub-schema at a pointer. Every reply is capped at 24 KiB, so the full schema is reached by path rather than in one reply. Both forms come from the samegetMetaTypesconverter output. Basis: L1 C1 7043023208 (reply size), seat record 7045153244.
Out of scope
- Any publish path, and any change to what a save accepts. Hosted (cloud) door registries.
Relations
- Parent: [Epic line 2] MCP build: the open draft door, and the checks and probes its verdict rests on #35152. Split from: skills: a thin "build over MCP" procedure skill for the open draft door #34778 (closed, completed). Bears on the door-mode eval rounds parked on [Epic] Measurement: the eval rounds and scenario cards this epic reads its results from #35154 (comment 7031811704) and Maintainer action: run one door-mode scenario round at five repetitions per arm and file it as an eval-run (split from #34780) #35264.
Activity
objectstack-fleet commentedon Nov 20, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:server·pm:queue; rationale: area:ai · Feature (the MCP draft door serves no read of a metadata type's contract, so a door-only client cannot see a type's shape) · line 3 of the maintainer's MCP order under epic #34659 (MCP build, #35152) → p2 as set · size M.objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#4 · os-elon-musk · session_016WV4d1k1GRsQbF3vCPKxhz
Claim: PM loop round 5 · area a4-C · p2 (MCP build line #35152), seat 4 routed after #35256 · 2026-11-20T13:35Z
Session:
session_016WV4d1k1GRsQbF3vCPKxhzAccount:
os-elon-muskBranch:
claude/area-a4C-35761Worktree:
objectstack-issue-35761Domain:
domain:serverArea: a4-C
Seat: repo:objectstack#4
File surface:
packages/runtime/src/domains/mcp-authoring.ts(one read of a type's contract on the open draft door: a sixth read tool or a field on an existing read, whichever measures smaller intools/list; JSON Schema from the samegetMetadataTypeSchemapath asGET /meta/types, plus the create seed where one exists; a type with no schema answered as such), its tests,skills/objectstack-mcp-build/SKILL.mdsection 3 (name the new read in place of the "read a published item" fallback; card acceptance),.changeset/*.md(@objectstack/runtimeand@objectstack/skills, patch). The skills path makes this Tier H at landing (approver APPROVED). If the dev needspackages/metadata-protocol/**,packages/mcp/**orpackages/spec/**, the dev stops and this claim is amended.Container & model: M,
mode:subagent, model: opus, effort: highClause-②: yes — widening: one new read on the draft door behind the same
metadata:writegrant andmanage_metadatacheck; no save, publish or existing read changes, so nothing accepted today is refused. Seat runs a contract read before ready.Metadata-protocol: none
Responsibility: a door-only MCP client cannot read a type's contract before it saves, so for a type with no published item it learns the shape only from save refusals | no other card covers it (dedupe in the card body) | reached by every MCP client building through the open draft door and by the objectstack-mcp-build skill
Thread-read: 7025763862
Premise: holds on main 3c038eb (draft door serves five tools,
mcp-authoring.ts:239-341, none returns a type schema;getMetaTypesderives JSON Schema viagetMetadataTypeSchema,protocol-discovery-and-bases.ts:647; SKILL.md section 3 still says "read a published item of the same type")Prior rulings read: seat record 7025763862 on PR #35665 item 5; #34691 S3 = A; #34689 tools/list slimming (byte cost goes in the PR).
Pre-claim lane: server lane,
domain:server(packages/runtime), plus the skills file the card names.Pre-claim deps: none.
Fold-or-serial: alone; own branch from main.
Serial constraints cleared: overlap-check clean (probe, origin/main 3c038eb, 1 PR head #35129 shares skills/objectstack-mcp-build/SKILL.md, merges cleanly).
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#4 · os-elon-musk · session_016WV4d1k1GRsQbF3vCPKxhz
os-dev-report
Reported 2026-11-20T14:39Z.
{ "issue": 35761, "status": "done", "branch": "claude/area-a4C-35761", "pr": "https://github.com/objectstack-ai/objectstack/pull/35871", "pr_number": 35871, "head_sha": "9ce91ec010e6fdf8696a59c0c19f33a17a8d63da", "net_added_lines": 131, "diff_lines": "137 insertions, 6 deletions vs merge base 3c038eb15: mcp-authoring.ts +40/-1, mcp-authoring.test.ts +82/-3, SKILL.md +3/-2, changeset +12/-0", "tools_list_bytes": { "main_five_tools": 5341, "sixth_tool_get_metadata_type_contract": 5912, "sixth_tool_delta": 571, "flag_contract_on_list_metadata_items": 5526, "flag_delta": 185, "chosen": "flag", "method": "real MCPServerRuntime.handleHttpRequest tools/list round-trip, authoring-only host, metadata:write grant, tool definitions dumped from createOpenAuthoringRegistry(...).getAll(); temporary measuring files deleted" }, "session": "session_016WV4d1k1GRsQbF3vCPKxhz", "premise_still_valid": true, "summary": "Premises re-measured on origin/main 3c038eb15: the draft door served five tools and none answered a type schema; getMetaTypes builds each entry's JSON Schema from getMetadataTypeSchema via toJsonSchemaSafe plus createSeed; SKILL.md section 3 still said to read a published item. list_metadata_items now takes an optional contract: true and answers contract { schema, createSeed } read off the protocol's own getMetaTypes entry (the /meta/types path, no second converter); a schemaless or unlisted type answers schema: null with a reason, a protocol without getMetaTypes refuses 503. The read sits behind the list's gates: the metadata:write plus manage_metadata admission, the type-level read admission and the unknown-type refusal; the plain reply is unchanged. The flag was chosen over a sixth tool because it costs tools/list 185 bytes against 571. SKILL.md section 3 names the read and keeps the save as the final check, and it stays at its 1,226-token ceiling.", "tests": "head 38fe8c60d (the later commit 9ce91ec01 edits SKILL.md only): pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/mcp-authoring.test.ts -> Tests 46 passed (46); pnpm --filter @objectstack/runtime test under os-verify-lock -> VERDICT command-exit 0, Test Files 634 passed (634), Tests 11711 passed | 25 skipped; pnpm --filter @objectstack/runtime typecheck -> exit 0, check:test-typecheck OK. New pins: 4 cases in describe '[#35761] list_metadata_items with contract: true ...' (through the real /mcp domain and the real identity door) plus one real-protocol case in the app-crm block (ObjectStackProtocolImplementation over SQLite with the boot type registry: flow with no item stored answers the /meta/types entry's schema; its required keys equal z.toJSONSchema(getMetadataTypeSchema('flow')).required, and its createSeed equals getMetadataCreateSeed('flow')). That is the existing mcp-authoring test level; no real app boot was run. Ablation (one-shot, src resolved by relative import so no dist leg): scripts/ablation-replace.mjs replaced the no-schema guard in typeContractOf with 'if (true) {', mutation landed (anchor 1->0, blob 983064538085->5875419304be) -> 'a type with no schema is answered schema: null ...' red, Tests 1 failed | 45 passed; restored with git checkout HEAD, hash-object equals HEAD blob 983064538085, git diff HEAD empty. @objectstack/skills has no test script (pnpm --filter exit 0 runs nothing); its build (sync-catalog --self-test and sync) passed in the closure build.", "gates": "local, head 9ce91ec01: node scripts/pm/dispatch-gates.mjs --commands derived 83 families (same list re-derived after the second commit); --ran accounts for 83 of 83. 80 exit 0. node scripts/check-skills-token-ratchet.mjs exit 1 on the first head (SKILL.md 1243 over its 1226 ceiling by 17), paid by deleting text in section 3; re-run on 9ce91ec01 exit 0 (1226/1226), with check:skill-docs, check:skill-links, check:skill-compatibility, check:skill-frame-sync, check:skill-identifier-liveness, check:nul-bytes, check:doc-authoring, check-changeset-no-major, check-adr-0087-registration and check-empty-changeset, all exit 0. NOT MEASURED: check-plugin-teardown-shape.mjs --self-test, reason: exit 3 PREREQUISITE, the pinned positive-control commit is unreachable in a shallow clone (not deepened: shared .git); NOT MEASURED: check:dual-build-cjs-loads, reason: exit 3 PREREQUISITE, needs every package's dist and only the runtime/mcp closures were built. overlap-check --branch=claude/area-a4C-35761: VERDICT clean exit 0. CI on head 9ce91ec01 at report time: 18 check-runs in_progress, 5 completed/skipped, 0 failed; no conclusion read yet (in_progress is the honest value).", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 — relay pr_create (repository_dispatch to objectstack-ai/objectstack, run 44755369087, POST /repos/objectstack-ai/objectstack/pulls -> #35871); os-dev-report comment via post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/35761/comments). Plus git push x3 (empty branch, two commits).", "open_questions": [], "deviations": [ "PR assignee and reviewer not set: the frame forbids assignees in pr_create and calls a later assign best-effort if os-dev.md allows; os-dev.md's write budget is push, pr_create and the report, so no fourth write was made. The relay read-back lists assignees: none.", "PR body: the frame's first-line attribution HTML comment is the one os-dev.md exempts; the frame wants the last line to be the robot line, so the session URL is a 'Session:' prose line just above it, not the session-URL footer form.", "Commit trailers use the model-free pair the frame and AGENTS.md name, not the harness reminder's model-named Co-Authored-By.", "The claim's file surface held: no file outside mcp-authoring.ts, its test, SKILL.md section 3 and the changeset was edited. Temporary measuring and dump test files were created in packages/runtime and packages/mcp and deleted in the same command." ], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed: list_metadata_items applies the type-level read admission to the contract, so a type whose /meta read needs a capability (datasource) refuses its contract to a user who lacks it, while the GET /meta/types handler applies no per-type read gate before getMetaTypes. That is stricter, not looser, and the same user cannot save that type anyway." ] }