Skip to content

fix(agent-package): drop node-local pcc_generate_ui from the public package - #427

Closed
LamaSu wants to merge 1 commit into
masterfrom
fix/aeo-drop-node-local-generate-ui
Closed

LamaSu wants to merge 1 commit into
masterfrom
fix/aeo-drop-node-local-generate-ui

Conversation

@LamaSu

@LamaSu LamaSu commented Sep 28, 2026

Copy link
Copy Markdown
Owner

What

The public agent package listed pcc_generate_ui with the endpoint http://localhost:3200/api/generate. That URL is pcc-node's local UI server (packages/pcc-node/pcc_node/ui_server.py:88). The gateway has no such route. So every external agent that called this tool, and the gateway's /mcp (which advertises the package's tools), was sent to its own machine.

This PR removes the tool from the public package. It doesn't repoint it: a relative /api/generate would just 404 on the gateway. genui owns the tool and asked for removal (bus #2313). Agents that want UI use the governed renderer render_pcc_dashboard.

Ledger R43 part (a), former N16. Draft allowed by the steward (#2449). Merging is the operator's call.

Changes (3 files)

  • apps/dashboard/public/agent-package.json
    • Removes the one entry. Nothing else in the package mentions the tool: not the prompt, examples, categories or ui field.
    • Version 2.19.1 → 2.19.2.
    • toolCount and metadata.tool_count both equal tools.length (252). metadata.tool_count had drifted to 254.
    • The file was rewritten with JSON.stringify(…, 2), which I checked reproduces it byte-for-byte, so the diff is only the change.
  • scripts/polish-agent-package-claude-max.mjs: TARGET_VERSION goes 2.19.0 → 2.19.2. The committed pack was already at 2.19.1, so the canonical writer would have downgraded it on its next run.
  • packages/gateway/src/__tests__/agent-package-public-endpoints.test.ts (new):
    • every tool endpoint is a relative gateway path, with no scheme and no host;
    • pcc_generate_ui isn't in the package;
    • the seam: the real /mcp tools/list, driven through its handshake, doesn't advertise it, and does advertise every package tool;
    • direct tests of the path predicate.

Evidence

Run in an isolated worktree on the DGX Spark.

  • Red, package unchanged: the new test fails 2 and passes 3. The only offender reported is pcc_generate_ui -> {"method":"POST","path":"http://localhost:3200/api/generate"}; the other 252 tools already pass.
  • Seam red: with PCC_AGENT_PACKAGE_PATH pointed at master's package, the real /mcp tools/list returns 255 tools, including pcc_generate_ui, and the test fails.
  • Green: the new test passes 7 of 7. Together with every package-reading and /mcp suite (auto-feedback, well-known-aeo, tool-search, snippet, contributors, http-mcp, mcp-apps, docs-mcp, mcp-typed-operations, mcp-apps-assets, pizza-llm-bootstrap), 12 files and 175 of 175 tests pass. Re-run 2026-09-28.
  • Full gateway suite on this code:
    • 186 of 188 files pass; 2,934 tests pass, 6 are skipped, 0 fail.
    • The two files that fail do so at load time (capture.test.ts, capture-3d.test.ts: "Failed to load url @pcc/verifier/dist/…"). That's the unbuilt workspace dist/ in my worktree, not a test failure; CI builds before it tests.
  • tsc: the gateway's tsconfig excludes src/__tests__/**, and no other .ts file changed.

After merge

  • pcc-adk (feat(adk): @pcc/adk skeleton with a pinned agent package and a clean external install check (R4 D1) #411) pins the package by version plus sha256, so its pin needs regenerating. Its resolver already refuses this tool.
  • The hand-typed tool counts on public pages are now off by one more (253 → 252). Generating those counts is PX-16a (my follow-up) and the copy belongs to pcc-launch.
  • Still hazardous, not fixed here: the older version-bump scripts (update-agent-package-v2.13/v2.14/v2.19) still stamp old versions if someone runs them. R43 part (c) collapses the writers into one and retires them.

Review

Board rule (1) requires cross-family review for Gate A/B rows and for anything touching money, evidence, assurance, auth or physical safety. This is a Gate C row and touches none of those. I'll build a review pack if the steward wants one.

🤖 Generated with Claude Code

…ackage

The public agent package listed pcc_generate_ui with the endpoint
http://localhost:3200/api/generate. That is pcc-node's local UI server
(packages/pcc-node/pcc_node/ui_server.py), not a gateway route. Every
external agent that called the tool was sent to its own machine, and so
was the gateway's /mcp, which advertises the package's tools. genui ruled
the tool node-local (bus #2313): remove it from the public package rather
than repoint it, because a relative /api/generate would 404 on the gateway.

- apps/dashboard/public/agent-package.json: remove the entry; version
  2.19.2; toolCount and metadata.tool_count both set to tools.length (252).
  metadata.tool_count had drifted to 254.
- scripts/polish-agent-package-claude-max.mjs: TARGET_VERSION 2.19.0 ->
  2.19.2. The committed pack was already 2.19.1, so the canonical writer
  would have downgraded it on its next run.
- packages/gateway/src/__tests__/agent-package-public-endpoints.test.ts:
  every tool endpoint must be a relative gateway path; pcc_generate_ui is
  absent from the package and from the real /mcp tools/list; /mcp
  advertises every package tool.

Ledger R43 part (a), former N16 (steward #2449).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@LamaSu

LamaSu commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

Folded into #452 as bd2f714 (head f282e9e), per the steward (#4191) and adk (#4244); adk is the single writer of agent-package.json.

Checked on f282e9e:

  • pcc_generate_ui is absent.
  • toolCount = metadata.tool_count = tools.length = 253.
  • packages/gateway/src/__tests__/agent-package-public-endpoints.test.ts is byte-identical to this PR's and passes 7/7.

Closing this PR. The branch stays.

@LamaSu LamaSu closed this Sep 30, 2026
LamaSu added a commit that referenced this pull request Oct 3, 2026
fix(agent-pack): only true statements, attempt reporting, #427 folded in, the operator's thesis (ADK item 2: N75, N76, rehearsal R0, contract v1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant