Repository navigation
registry: copy the agents' names from srcfl/ftw-webapp - #69
Conversation
The registry now names agents: roles agent, support and release, six scopes with the verbs run, hold and request, an agent scope on each op, the capability access.agents, eight refusals and two push kinds. Contract.swift takes the scopes, the capability and the refusals, which ContractTests reads back. The app does not use them yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09a85385e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # is the release check, which reads a health summary and nothing else. | ||
| agent: | ||
| label: Assistant | ||
| scopes: [ftw.live.read, ftw.history.read, ftw.plan.read, ftw.health.read, ftw.events.read, ftw.logs.read, ftw.config.read, ftw.diag.run, ftw.dispatch.hold, ftw.goals.request] |
There was a problem hiding this comment.
Assign update requests to an agent role
The registry states that each agent role's scope list is the maximum a grant of that kind may carry, but none of the three new agent roles includes the new ftw.update.request scope (and release is explicitly limited to health reads). Consequently, an agent can never be granted permission to request an update, so any update-request flow will be rejected regardless of owner approval; add the scope to the intended role or defer declaring it until such a role exists.
Useful? React with 👍 / 👎.
…ftw-webapp Contract.swift takes E_CLOCK_SKEW, which ContractTests reads back. The other new blocks (agent_args, reads) and the ops' agent scopes are not names this app spells yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
Copies the agents' names from srcfl/ftw-webapp#90 into
protocol/registry.yaml, byte for byte, and updatesContract.swiftsoContractTestsreads them back: six scopes (ftw.logs.read,ftw.config.read,ftw.diag.run,ftw.dispatch.hold,ftw.goals.request,ftw.update.request), the capabilityaccess.agents, and eight refusals with their retry flags.The app does not use them yet. The Access list, the approval key in the Secure Enclave and the grant offer screen come later;
docs/agents.mdin srcfl/ftw (#1642) specifies them, andgo/protocol/testdata/approval-vectors.jsonthere holds the signature vectors the phone must replay.Paired PRs
docs/agents.mdand the vectors.Tests
ContractTestschecks scopes, ops, capabilities and errors against the file. CI (FTWKit and the iPhone app) passes. Not run locally: other sessions held the Mac's Swift toolchain.After the review (adversarial, at f557f6d)
Fixed before merge, the three blockers and everything that changes signed bytes or wire shapes:
tun: falseand no copy scopes; only FTW Cloud'skeyspart opens an agent's session, never/v1/app,/v1/app/onceor the relay (docs/protocol-cloud.md). Offers are signed (SignedOffer {o, kid, sig},protocol.OpenOffer) by a pinned offer key, live at most 10 minutes, carryclientHostandverified, leavehomeempty, and a support offer comes only fromSupportClientID.battery.holdandloadpoint.boostlose their agent scope. A newagent_argsblock allowlists each op's arguments, with labels (sovoltage,max_amps_per_phaseand the rest stay with owners). Holds carry their setter, an owner's hold wins (E_NEEDS_OWNER), an agent clears only its own,maxWis |W|, and revoke or expiry ends an agent's holds.agent.confirmsigns[reqId, agent, op, sha256(args)]; request ids are 128 bits; anatMsfrom before the box started is refused.agent_argsand the op's own checks.byisstaff:<id>orbot:<name>, refused from any session but support.agent.widensigns the row's key.Roster.noise); typed readslive.get,loadpoints.get,cars.get,drivers.getin a registryreadstable, cursors on logs and events, agent ids under the box's own key.approval.key.settakesprevSig, audit rows carrycount,agent.decided,E_CLOCK_SKEW, push kindsagent.expiring,approval.key.set,owner.added,ftw.update.requestmarked reserved,E_NOT_FOUNDworded for any id (the car contract can reuse it).Vectors regenerated: approval (widen and confirm bytes changed), a signed offer, and the roster (with
noiseand an agent row).🤖 Generated with Claude Code