Repository navigation
fix(agent-pack): only true statements, attempt reporting, #427 folded in, the operator's thesis (ADK item 2: N75, N76, rehearsal R0, contract v1) - #452
Merged
Conversation
…s, announce, install (item 2a; N75, N76) ADK track item 2, part a: adk is the agent pack's single writer (steward #3877). Every change below was wrong on master ac86a40, and the new test agent-pack-truth.test.ts failed 5/5 there before these edits. - N76: the system prompt and the dashboard skill named POST /api/onboard/session/start. No such route exists; template-session serves POST /api/onboard/start (server.ts:815, template-session.ts:252), which is what the pcc_onboard_session_start tool already calls. - N75: kernel_announce_capabilities said it "register[s] what the kernel can do". The route acknowledges and stores nothing. Its description now says so and points to create_capability (POST /api/capabilities). - Packages that do not exist anywhere: @pcc/operator-agent-runtime, @pcc/evidence-judge and @pcc/decompose-skill (the system prompt, an example and the dashboard skill). Operator polling now points at the pcc-node daemon. - Counts: the dashboard skill said 249 tools and metadata.tool_count said 254; the package holds 253. Prose now says 250+, and the metadata says 253. - Install: pip install pcc-node finds nothing while 0.1.0 is yanked, so the skill, prompt and CLAUDE.md ask for 'pcc-node>=0.1.1' (item 1). - The package goes to version 2.19.2, and lastUpdated moves. - scripts/polish-agent-package-claude-max.mjs is retired: it now exits 1. Re-running it on master's package drops the "Report failures automatically" trigger that agent-package-auto-feedback.test.ts pins, brings back the dead route and packages, and downgrades the version to 2.19.0. Checked on a scratch copy. CLAUDE.md said "Idempotent. Re-run when the framing changes"; it now says the script is retired. CLAUDE.md's stale 249 and ~9000-char lines are corrected too. The new test pins all of it: the route, packages that exist in the repo, tool counts (exact counts must equal, N+ must be <=), the announce text, and >=0.1.1 on every pip install in the pack. All 5 cases fail at ac86a40 and pass here. With the 7 existing tests that read the package: 98 passed, 1 skipped. Not in this commit: phase-outcome and idea reporting in painpoints' item-3 shape (item 2b; the contract was requested in bus #3936). agent: pcc-adk (4f6668ed) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ver sign evidence (item 2a) The pack's install line from the previous commit, `pip install 'pcc-node>=0.1.1'`, installs a node without pynacl (the optional crypto extra). Without it, the node cannot register a signing key (register_signing_key raises LogSigningRefused) or sign machine logs (log_capture.py refuses the HMAC fallback). A node installed that way can never produce evidence that verifies, so it can never reach a verified run. It would be a false success for every operator who follows the pack. - The pack and CLAUDE.md now say `pip install 'pcc-node[crypto]>=0.1.1'`. - agent-pack-truth.test.ts now requires the crypto (or all) extra on every pip install of pcc-node in the pack. Removing the extra from one skill copy fails it. The package tests: 98 passed, 1 skipped. agent: pcc-adk (4f6668ed) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…8, G8, G9) Dress rehearsal R0 (refvertical, returns/pcc-refvertical-work/rehearsal/ R0-findings.md) had a fresh agent onboard a simulated instrument from this pack against a gateway built from master. The pack's single writer re-checked each finding in the code before changing anything (returns/pcc-adk-work/r0-pack-triage.md). The new checks failed 8/8 before this commit. - P1: the pack resolved every call against production. It now resolves against the gateway you were given (PCC_BASE, else the origin the package came from), with production only the default. The quickstarts read process.env.PCC_BASE, and the skills' curl examples use "$PCC_BASE". - P4: /api/capabilities/types is the union of built-in template types (flat), registered types and CSD types (capabilities.ts:184-197), not "the complete, live list … authoritative". A listed type may have no operator. - P5: onboard_machine documents `operator`. Without it the registration is recorded as 0x000…/"Unknown" (onboard.ts:85-88), and prove cannot match its owner (onboard.ts:241). - P6: JobOffer uses the served names: claimedByKernelId, posterDid, requireHeartbeat, deliveredAt… (job-offers-store.ts:122). The offer has no `evidence` field, and an operator cannot PATCH an offer (poster-only; board N81), so the pack stops telling agents to. - P7: job-status `completed` only sets the status, with no evidence or settlement, and then pcc_job_complete answers 409. So: finish with pcc_job_complete, never by setting completed first. - P8: the gateway serves no /api/oracle route (404 in R0). The oracle tools no longer claim to be "the critical path". - G8 (N83 docs): register-device requires kernelId, deviceId, type and adapterType (setup.ts:548). `type` is the device role (machine|sensor|camera). The route accepts octoprint, modbus, opcua, sila, ipp, generic-http and mock, and refuses opentrons. - G9 (N83 docs): POST /api/storage takes the raw bytes with a binary Content-Type; JSON and multipart are refused (storage.ts:47,138). This is fixed in the prompt, skills and examples. Not reproduced, or not the pack's: P2's "toolCount: 3" (the only toolCount is 253), P3 (a gateway built without the dashboard; a full build serves the pack). Tests: 11 new checks in agent-pack-truth.test.ts, three of them line-based rules for the skills. Mutation-checked. Package tests: 109 passed, 1 skipped. agent: pcc-adk (4f6668ed) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tract v1 (item 2b)
ADK track item 2b. Painpoints' attempt reporting contract v1
(returns/pcc-painpoints-work/item3-attempt-reporting-contract-v1.md, bus
#4008) goes into the pack. It implements operator R7, "an attempt is the
entire experience".
- A new tool, pcc_report_attempt (POST /api/feedback, kind "attempt",
unauthenticated). It is typed to the contract:
- the phase enum is the runbook's phases plus session;
- the outcome enum has 7 values;
- sessionId (UUID v4, once per attempt) and seq;
- logs, phases roll-up, ids, device, harness, pack, env, tokens (null plus
source, never guessed), and one proposal per attempt;
- consent.transcript is fixed at false, and there is no transcript field.
summary is required, because until item 3's server side merges the gateway
keeps only the classic fields.
- A new top-level attempt_reporting section: the contract, tool, endpoint,
phases, outcomes, when to report, and the rules.
- The operator path in the system prompt now says to report each phase, success
or failure, plus a session roll-up. The existing "Report failures
automatically" trigger for pcc_report is unchanged.
- toolCount and metadata.tool_count are now 254.
Tests: 3 new contract checks with the contract's literal lists; they failed
before this commit. Package tests: 112 passed, 1 skipped. /mcp passes schemas
through as raw JSON Schema (http-mcp-server.ts:155), so the null-union types
are served as written.
agent: pcc-adk (4f6668ed)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…status completed This corrects this PR's own P7 text (6b04c23). It told agents "to finish a job, call pcc_job_complete". But pcc-node, and R0's working operator, finish a job with POST /api/operator/evidence and then job-status completed (ws_client.py:151,180). pcc_job_complete (PUT /api/jobs/:id/complete) is the finish for jobs run through execution scopes. After the node path it answers 409, and after an evidence submission its claim guard refuses the job anyway (paid-job-flow.ts). Following the old text would have sent agents into the same 409. - operator_update_job_status names the node's two-call finish. It says that completed marks the job done, and that the timeline's "settled" does not yet release escrow (board G1). Don't call pcc_job_complete afterwards. - pcc_job_complete says it finishes jobs run through execution scopes, and answers 409 after a node's finish. - The P7 test now pins both. Package tests: 112 passed, 1 skipped. agent: pcc-adk (4f6668ed) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
LamaSu
added a commit
that referenced
this pull request
Sep 29, 2026
…AUDE.md to #452 Realigns this PR with the status board (v3.131) and adk's #452. - adk is the single writer of the agent pack and the pcc skill (steward #3992), and #452 already fixes CLAUDE.md's counts and pip lines. So the two skill copies and CLAUDE.md go back to master's text here. - pcc-node installs now use #452's form, pip install "pcc-node[crypto]>=0.1.1", instead of "not installable right now". 0.1.1 is due on PyPI by 10-01 (board ADK item 1), and nothing merges before Oct 5, so the command is right whenever this text is read. The floor also keeps everyone off the yanked 0.1.0, which ships the N66 shell executor. The command uses double quotes, so it works in cmd.exe too. The landing page's pip CTAs and PyPI links come back with the floor; its GitHub links still point to the repo. - install.html (on the steward's list): it says 250+ tools instead of 230+, and drops the stale "~207 KB" size (the pack is 265 KB). Its hand-off prompt now provisions the key before the template call that needs it, says @pcc/kernel is not on npm (so work in a clone), and names MachineAdapter's real methods. - docs/MCP_INSTALL.md becomes a pointer to the one public copy, which #414 fixes, instead of a second copy that drifts and still says npx @pcc/mcp-server. The guard test now pins #452's floor rule instead of "no pip install". It also catches quoted installs, uvx and JSON-escaped newlines, covers docs/MCP_INSTALL.md, and accepts `claude mcp add` with trailing options. 5 of its 7 tests fail against master's files, and all 7 pass here. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…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> (cherry picked from commit c577627)
… in cmd.exe aeo's note on #4177: 'pcc-node[crypto]>=0.1.1' in single quotes breaks in Windows cmd.exe, which does not treat single quotes as quoting. Double quotes work in bash, zsh, PowerShell and cmd.exe. The seven install lines (CLAUDE.md, both SKILL.md copies, skills/pcc.md and the package's system_prompt) now use them; agent-pack-truth's install check accepts either. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tagline launch's #2877 (product-steward #2574, steward #2807), handed to adk as the pack's single writer (aeo #4177): the package description now opens with the thesis, with the public-beta sentence beside it, and the polish script writes the same description so a polish run keeps it. launch's #4168: CLAUDE.md and both SKILL.md copies still defined PCC as "AWS for the physical world", which the positioning registry forbids; the thesis replaces it, beta sentence beside. launch's findClaimViolations (wt-launch-positioning @18da2579, which has the thesis and retired-tagline rules) over the six files this PR touches: master 3 hits (retired-tagline), this commit 0. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…, bind claims to code Verdict 102f on #452 (answered from text). 14 new checks failed at f282e9e; now 255 tests pass across the 16 agent-package and /mcp test files: - F1 (HIGH): the node finish now says a receipt counts only with stored: true for this jobId, and that 200 with stored: false is never followed by completed (operator_update_job_status, operator_push_evidence). pcc-node's own check is in #442. - F2: the dashboard skill no longer reads an offer's "evidence" field or a top-level status. GET /api/job-offers/:id answers {offer, events}, and evidence comes as storage CIDs or from a job's evidence route. - F3: pcc_report_attempt's schema enforces contract v1: - additionalProperties: false everywhere, so a transcript is refused; - a UUID v4 sessionId, ids of at most 200 chars of [A-Za-z0-9:._/-] or null, tokens of 0 or more, and a sha256:<64 hex> digest; - a roll-up (phases) allowed only on phase: session. Tests validate through Fastify's own ajv. - F4: every >=0.1.1 install line has a pinned-commit fallback (release r2) until 0.1.1 is on PyPI. The install check is broadened and can no longer pass vacuously. - F5: the N76, N75, oracle and create_capability claims are bound to the code that serves them (template-session prefix, announceCapabilities writing nothing, no /api/oracle route, POST /api/capabilities). - F6: an @pcc package the pack tells agents to install must be publishable. - F8: the dashboard skill leads with the thesis and the public-beta line, and Base settlement is qualified as a test network. - F9: the retired polish script is a refusal stub. Importing it does nothing; the old in-module rewrite code is gone. A test import of the previous version rewrote the package, which this commit also prevents. Also, for pcc-node 0.1.1: no copy says the node daemon takes or polls jobs. It keeps the kernel online; jobs run through the operating agent. Version 2.19.3. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ontract v1, and claims are bound to the running gateway (verdict 102g) Each finding was reproduced at f48d1cf first. The new "verdict 102g" block in agent-pack-truth.test.ts has 8 failing checks on the old pack files. - F1 (HIGH) and F2: on this gateway any authenticated key can post a delivered event to POST /api/job-offers/:id/events, with no evidence, and nothing ever sets settled. The pack no longer waits for settled or delivered as an outcome, in any copy: the system prompt, the four examples, the JobOffer DTO's meanings and polling advice, the dashboard skill and both SKILL.md copies. It says delivered is a claim and tells agents to report only what evidence shows. The system prompt's stale inline JobOffer shape now points at the DTO: offer.status, claimedByKernelId, requirements, and no evidence field. The skill's "an operator cannot deliver on an offer" became the events route. A binding test drives the real gateway: a stranger's key marks an offer delivered, so the text must change if the route ever requires a claimant or evidence. - F3: pcc_report_attempt's schema is contract v1 exactly. summary is optional (the description still says to send it while today's server needs it). Unknown phases, outcomes and harness names are accepted, with the known lists kept as the first anyOf branch. budget-stop is accepted, harness.label is allowed, and every optional member admits null. - F4: no copy says pcc-node start provisions a key by itself; it needs PCC_API_KEY or --api-key, because the gateway refuses the empty-email provisioning 0.1.1 sends (a binding test injects it). operator_poll_jobs no longer says the daemon calls it. - F5: the route claims are checked in the real gateway, built with createGateway() and not started: onboarding's route, the oracle tools' 404s, announcements storing nothing, and create_capability storing a capability. A mutant that stores announcements through a differently named helper passed the old textual test and fails the new one. - F6 (LOW): the install tests are named for what they check. The pip matcher accepts flags before install and wrapped lines, and pins any pcc-node version spec to >=0.1.1. Two earlier tests encoded what this verdict changed: the closed phase and outcome enums, and summary as required. They now pin the known lists as the anyOf branch and the contract's required fields. Pack tests: 55 passed. agent: pcc-adk (4f6668ed) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nt may be null, and the bindings close their gaps (verdict 102h)
Each finding was reproduced first.
- HIGH: the system prompt and the dashboard skill told agents to "trust the
gateway's verified flag". The flag means only that the poster's
sourceVerifyUrl answered 2xx without placed:false or valid:false. A binding
test drives the real gateway: an offer pointed at a local server that
answers 200 {} is verified while still open, with no work and no evidence.
Both copies and the DTO now say verified is not proof of fulfillment or
delivery, and a negative test pins that in every copy. The new text check
fails on the bf315c3 pack files.
- MEDIUM: pcc_report_attempt's consent admits null, like every other
optional member. The null test now covers it, and it fails on the bf315c3
schema.
- MEDIUM: the oracle claim is checked against the gateway's route table (no
/api/oracle path), and against the router's own "Route ... not found" 404 for
a body carrying every required field. A mutant route that 404s {} but serves
a valid body fails the new test. The announcement claim counts rows in the
capabilities table itself after 250 ms, and checks the by-kernel listing.
- LOW: every detected pcc-node install line must name >=0.1.1 or the pinned
commit. A mutant "pip --isolated install pcc-node" fails the test.
Pack and job-offer tests: 95 passed.
agent: pcc-adk (4f6668ed)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
LamaSu
marked this pull request as ready for review
October 3, 2026 07:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADK track item 2: the agent pack tells agents only true things (N75, N76), plus attempt reporting, #427 and the thesis
adk is the agent pack's single writer (steward #3877). Every change here was wrong on master
ac86a404. The newagent-pack-truth.test.tsfailed 5 of 5 there before the edits.POST /api/onboard/session/start, which doesn't exist.POST /api/onboard/start: template-session is mounted at/api/onboard(server.ts:815, template-session.ts:252). Thepcc_onboard_session_starttool already called this route.kernel_announce_capabilitiescreate_capability(POST /api/capabilities).@pcc/operator-agent-runtime,@pcc/evidence-judge,@pcc/decompose-skillin the prompt, an example and the skill.metadata.tool_countsays 254; the package holds 253.pip install pcc-node, which finds nothing while 0.1.0 is yanked. Without thecryptoextra, a node cannot register a signing key or sign evidence (register.pyandlog_capture.pyfail closed), so it can never reach a verified run.pip install 'pcc-node[crypto]>=0.1.1'in the skill, prompt and CLAUDE.md (item 1 publishes 0.1.1). Added in 52015b2.scripts/polish-agent-package-claude-max.mjsagent-package-auto-feedback.test.tspins, brought back the dead route and packages, and downgraded the version to 2.19.0.The package moves to v2.19.2, with a new
lastUpdated.Rehearsal R0 fixes (6b04c23)
Dress rehearsal R0 ran a fresh agent against a master gateway, and it found places where the pack disagreed with the code (refvertical,
R0-findings.md). Each one was re-checked in the code first; the triage is inreturns/pcc-adk-work/r0-pack-triage.md.PCC_BASE), with production only the default. Covers the prompt, the quickstarts and the skills' curl examples./api/capabilities/typesis described as it is: templates, registered and CSD types, some with no operator.onboard_machinedocumentsoperator. Without it the owner is 0x000…/"Unknown".claimedByKernelId, …), and drops theevidencefield it doesn't have. The pack no longer says an operator can PATCH an offer (it is poster-only).POST /api/operator/evidence, then job-statuscompleted; that's what pcc-node does, and the escrow is not released yet (G1).pcc_job_completeis for jobs run through execution scopes, and after a node finish it answers 409./api/oracleroute.deviceId,adapterType).typeis the role, and the adapter list is the route's (noopentrons).11 new checks, three of them line-based rules for the skills. Package tests: 109 passed, 1 skipped.
Item 2b: attempt reporting (d74c5c3)
The pack now follows painpoints' contract v1 (
returns/pcc-painpoints-work/item3-attempt-reporting-contract-v1.md):pcc_report_attempttool:POST /api/feedback,kind: "attempt", with the phases enum (the runbook's phases plussession), 7 outcomes, and a UUIDsessionIdplusseq.consent.transcriptis fixed at false, and there is no transcript field;summaryis required until item 3's server side lands;attempt_reportingsection;toolCountis now 254.Merge note: #411's
@pcc/adkpin must be regenerated after this merges (pnpm --filter @pcc/adk generate).Re-freeze with #427 and two text asks (bd2f714, 46354b6, f282e9e)
Reviews are paused until Oct 5 (#4022), so the steward asked (#4191) for #427 to be folded in here rather than reviewed separately. aeo closes #427 once this head is up.
-x, aeo's commit and itsagent-package-public-endpoints.test.ts): the node-localpcc_generate_uitool is removed. Its endpoint was pcc-node's local UI server,http://localhost:3200/api/generate, not a gateway route. The only conflict was the counts; they are set from the list itself: 253 tools (toolCount=metadata.tool_count=tools.length), version 2.19.2.pip install "pcc-node[crypto]>=0.1.1"lines use double quotes, which work in cmd.exe (aeo #4177). Single quotes break there.findClaimViolations(the positioning registry) over the six files: master 3 hits (retired tagline), this head 0.Tests at f282e9e:
agent-packageandcli, 21 passed;OnboardLandingPage, 12 passed.The guard
packages/gateway/src/__tests__/agent-pack-truth.test.tsreadsagent-package.jsonand all three skill copies. It checks five things:@pcc/*names that exist in this repo;N+must be ≤ the count);pcc-node[crypto]>=0.1.1on everypip installof pcc-node.With the 7 existing tests that read the package: 98 passed, 1 skipped. Mutation-checked: putting back
tool_count: 254fails it.Merge-order note (#411)
#411's
@pcc/adkpinsagent-package.jsonby sha256 (it is generated insrc/generated/agent-pin.ts).pnpm --filter @pcc/adk generate(a narrow confirmation pass).Not in this PR
install.html:151("230+ tools");AGENTS.md:29,47(pip install pcc-node) and:76(pcc_setup_*names).🤖 Generated with Claude Code