Skip to content

@objectstack/mcp: export the app-docs answer rule and its served-check (packageDocAnswerRule, packageDocToolsServed) from the package barrel, so a host with its own initialize text can carry it #35633

Description

@objectstack-fleet

repo:cloud#5 · hotlong · session_01Q4EjjPP1zuWBNq3nBXVei9

Filing gate: ① a premise gap that a repo:cloud pin round measured (objectstack-ai/cloud PR #4907, pin 53c9575b7eb4). It blocks objectstack-ai/cloud#4905, the cloud half of item 2 of the maintainer-directed p1 #35442 (「AI 的回答是真实的查了系统中的元数据和相关文档,还是编的」, 「都是 p1」). Reader: the domain:server lane (packages/mcp). Dedupe: packageDocAnswerRule export, packageDocToolsServed barrel: none.

Grade: p1 · Task · a blocker takes the top grade of what it blocks (cloud#4905 is p1).

维护者速读

  • 要做的:把平台 MCP 里「先查应用手册、给出处」那段回答顺序,以及「两个手册工具是否都已提供」的判断,从包的入口导出。
  • 为什么:云端的 MCP 入口自己写开场说明,要引用同一段文字,不能抄第二份。现在这两样都导不出来,云端没法引用。
  • 需要你做的:无。

Measured (objectstack 53c9575b7eb4, from the cloud worktree)

  • packageDocAnswerRule is module-local: packages/mcp/src/mcp-server-runtime.ts:1898, with no export.
  • packageDocToolsServed is exported from packages/mcp/src/mcp-http-tools.ts:3308, but src/index.ts does not re-export it. The package's exports field has only '.'.
  • A node import of @objectstack/mcp from cloud's packages/objectos-runtime resolves neither (both false).
  • PR feat(mcp): search and read the installed apps' manuals over MCP, with the answer order in initialize #35564 appends the rule only to the open server's default initialize text. A host that injects its own instructions / dataOnlyInstructions gets nothing appended, by design. The cloud build door is such a host.

Done when

@objectstack/mcp's barrel exports:

  • packageDocAnswerRule(definitionReader?), or the rule text plus a way to name the connection's definition reader;
  • packageDocToolsServed(...), with the reader-name list (or definitionReaderServed) the rule needs.

The open server keeps using the same export, so only one copy of the text exists. A test pins the barrel export.

Activity

  1. added
    enhancement
    on Nov 19, 2026
  2. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:server (packages/mcp) · pm:queue; rationale: area:ai · Task (export packageDocAnswerRule and packageDocToolsServed from the @objectstack/mcp barrel so cloud quotes the same answer-order text instead of copying it) · measured in a cloud pin round at 53c9575b7eb4 → p1: objectstack-ai/cloud#4905 (p1, pm:blocked, the cloud half of the maintainer's #35442) waits on it, and a blocker takes the grade of what it holds. A small export; one short PR.

  3. added
    area:ai
    domain:server
    pm:queue
    priority:p1
    on Nov 19, 2026
  4. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-elon-musk · session_016WV4d1k1GRsQbF3vCPKxhz

    Claim: PM loop round 3 · area a4-C · p1 (blocks objectstack-ai/cloud#4905 under maintainer-directed p1 #35442), seat 4 routed ahead of #35544's phase 2 · 2026-11-20T05:24Z
    Session: session_016WV4d1k1GRsQbF3vCPKxhz
    Account: os-elon-musk
    Branch: claude/area-a4C-35633
    Worktree: objectstack-issue-35633
    Domain: domain:server
    Area: a4-C
    Seat: repo:objectstack#4
    File surface: packages/mcp/src/mcp-server-runtime.ts (export packageDocAnswerRule, one copy of the text), packages/mcp/src/mcp-http-tools.ts (packageDocToolsServed / reader-name list only), packages/mcp/src/index.ts (barrel), one new barrel-export test file, .changeset/*.md.
    Container & model: S, mode:subagent, model: opus, effort: medium (high if the definitionReader parameter needs design)
    Clause-②: yes — widening: two new exported symbols on the published @objectstack/mcp barrel; nothing removed or refused. Seat runs a contract read before ready.
    Metadata-protocol: none
    Responsibility: the answer-order rule lives in one module-local function, so a host with its own initialize text cannot carry it | no other card covers it | reached by the cloud build door (cloud#4905) and any host injecting its own instructions
    Thread-read: 7018953733
    Premise: holds on main ca4ec2a (mcp-server-runtime.ts:1898 function packageDocAnswerRule without export; mcp-http-tools.ts:3308 exports packageDocToolsServed, src/index.ts does not re-export it)
    Prior rulings read: maintainer-directed p1 #35442; PR #35564 (rule appended only to the open server's default initialize text, by design); docs/adr/** grep to be re-read by the dev.
    Pre-claim lane: server lane, domain:server (packages/mcp).
    Pre-claim deps: none.
    Fold-or-serial: alone; own branch from main, kept apart from #35682's fix round (overlap-check: shares mcp-http-tools.ts with #35682, merges cleanly).
    Serial constraints cleared: overlap-check clean (probe, origin/main ca4ec2a, 1 PR head #35682 merges cleanly).

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 20, 2026
  6. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-elon-musk · session_016WV4d1k1GRsQbF3vCPKxhz
    os-dev-report

    {
     "issue": 35633,
     "status": "done",
     "branch": "claude/area-a4C-35633",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/35759",
     "pr_number": 35759,
     "head_sha": "01e6d0f64499d4c0e02ea45480eaf62a07092cae",
     "net_added_lines": "111 (115 added, 4 deleted vs merge base ca4ec2a2f; budget 120): changeset 10, index.ts 9, mcp-server-runtime.ts +16/-4, new test 80",
     "session": "session_016WV4d1k1GRsQbF3vCPKxhz",
     "premise_still_valid": true,
     "summary": "Premise held on origin/main ca4ec2a2f: packageDocAnswerRule was module-local (mcp-server-runtime.ts:1898) and packageDocToolsServed (mcp-http-tools.ts:3308) was not re-exported from src/index.ts. The barrel now exports packageDocAnswerRule(definitionReader?), packageDocToolsServed, and a pure reader pick definitionReaderOf(toolNames) over the now-exported DEFINITION_READER_TOOL_NAMES; the open server's module-local definitionReaderServed calls definitionReaderOf, so the text and the pick each exist once and the default initialize text is byte-identical. Every input is a plain argument, so the cloud build door (cloud#4905) can build the same sentence with no access to the open server's internals; effort stayed medium (no real design needed). mcp-http-tools.ts is not edited at all (export done from index.ts), keeping clear of #35682.",
     "tests": "At a32f3e23c (code head; 01e6d0f64 changes only the changeset line): pnpm --filter @objectstack/mcp test -> Test Files 80 passed (80), Tests 1441 passed (1441); typecheck (tsc --noEmit + check:test-typecheck) OK; build exit 0 and dist/index.d.ts names the new exports (6 hits). New pin packages/mcp/src/package-doc-answer-rule-barrel-35633.test.ts imports from ./index.js: asserts the four exports exist and, for readers none/get_metadata_item/describe_metadata, that the open server's default initialize text holds packageDocAnswerRule(reader) as one whole paragraph; alone: Tests 2 passed (2). No ablation: the diff changes no tested behaviour (exports only).",
     "gates": "Local: pnpm --filter '@objectstack/mcp^...' build under the lock, VERDICT command-exit 0. dispatch-gates --commands (67 derived) run with exits captured before any pipe: 65 exit 0, 2 exit 3 = NOT MEASURED (node scripts/check-plugin-teardown-shape.mjs --self-test: positive control pinned to commit 621a4876 unreachable in the shallow clone; pnpm check:dual-build-cjs-loads: PREREQUISITE NOT MET, needs every package built); --ran reconciliation: '67 derived famil(ies) accounted for, 65 run, 2 NOT-MEASURED', exit 0. After the changeset-line commit 01e6d0f64, re-ran exit 0: check-adr-0087-registration, check-changeset-no-major, check-empty-changeset, check:nul-bytes, check-issue-citations, check-closing-keyword-parity. overlap-check --branch=claude/area-a4C-35633: VERDICT clean exit 0 (origin/main merges cleanly; 0 PR heads listed). CI on 01e6d0f64 at report time: Check Changeset, Type Check (workspace, debt ledger, source, consumer), Lint (ESLint, PM dispatch-gates, repo & tooling, docs & code guards, CI/release/engine, scoped families), PR-body guards, Governed Surface Queue Guard, Check PR Size = in_progress; opt-in/queue lanes skipped. Not waited on per os-dev.",
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "mcp_calls": "0",
     "api_writes": "2 — fleet-write relay POST /repos/objectstack-ai/objectstack/dispatches (pr_create -> #35759, read-back identical 4637 bytes); post-stamped issue comment POST /repos/objectstack-ai/objectstack/issues/35633/comments (os-dev-report). Plus git push (not REST). Assign/review-request of os-elon-musk not sent: os-dev write budget is push + pr_create + report.",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [],
     "deviations": "Changeset Clause-② line copied verbatim from the claim (arm-less 'yes — widening: …', which readClause2Line reads as value yes, arm null) in a second commit, so PR body and changeset carry the same line. PR title prefixed 'p1 · unblocks cloud#4905 — ' per the order. Commit trailer is the FRAME's 'Co-Authored-By: Claude' form, not the harness reminder's model-named form."
    }
  7. added a commit that references this issue on Nov 20, 2026
  8. removed
    pm:dispatched
    on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:serverenhancementpriority:p1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions