Repository navigation
Guard, agents and shared payload (David, Day 0) - #4
Merged
Merged
Conversation
…ents Resolve add/add conflicts: union of both .gitignore files, workspace includes apps/*, packages/* and scripts, lockfile regenerated with pnpm 9.15.9.
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.
David's Day 0–5 work that doesn't depend on testnet: the shared payload and schemas, Guard (rules engine and signer), the agents service, the audit verifier, CI and docs. Nothing in it needs a key or a deployed contract.
pnpm mockruns the whole flow locally.Start with docs/decisions-pending.md. It lists where this departs from or adds to PRD v2. Items 1–2 change the rules hash Isaac needs for Vault init (H3).
What's in it
.env.exampleBasketPayloadV1, hash and ed25519 signing, plus the shared vectorpackages/shared/vectors/basket-v1.json. Cross-checked byte for byte against Rustborsh1.x,sha2anded25519-dalek; the matching Rust struct is invectors/README.md.docs/api.md, andpnpm mock(the real pipeline with an in-process Guard, mock Vault and fake wallet)openai/gpt-oss-120b, strict structured output) instead of Anthropic. Team decision; supersedes PRD §13 and D-10. Livepnpm llm:checkpassed.rules_hashis in decisions-pending item 2.pnpm snapshot:checkpnpm guard assess,rules:hash,keygenLast-Event-IDreplay, approval watcherGET /v1/audit/:id,pnpm verify:audit, andverifyEvidenceBundle()in@checkpoint/sharedfor the web audit pagedocs/architecture.md, a README section draft, and the CI workflowFor Isaac
CAR74z4PpMpNAmCnmaRY3dPrjFUSMrswynTah4oSsBrY. The secret is on David's machine and in the password manager.get_policy,get_owner_state,get_balance,get_approvalandget_basketwith the shapes inpackages/shared/src/vault-views.ts(table indocs/api.md). Please confirm or change them (decisions item 8). Guard fails closed on any other shape.packages/agents/src/settlement.tsis the slot for your Settlement module. Its interface isexecute(payload_b64, signature_b64) → { tx_hash }.GUARD_DEV=1does not let Guard sign rule-breaking baskets.over-cap.tscan sign directly with the shared payload helpers (decisions item 11).For Patrick
@checkpoint/sharedexports the same schemas, the SSE reducer (replayRequest/reduceRequest),decodePayloadandbasketHashHexfor the local hash check, andverifyEvidenceBundle. All are browser-safe, soapps/web/src/lib/agents/{types,reducer}.tsandlib/payload.tscould import them instead of keeping copies.data/snapshot/fixtures/adversarial.jsonsaycapture_method: "manual". Decision #5 proposes"fixture", so the UI and README can label synthetic rows. Until they're relabelled,snapshot:checkreports 7 errors and Guard won't loaddata/snapshot. The CI step is non-blocking for now. Your item keys match the ones Guard expects.Merge notes
Phantomcall/main(P/day0 snapshot web #2, Redesign the landing page, plus the desk, basket approval and Vault pages (P-0.2, P-1.2, P-2.1, P-2.2, P-3.1) #3). The add/add conflicts in.gitignore,pnpm-workspace.yamlandpnpm-lock.yamlare resolved; the lockfile is regenerated with pnpm 9.15.9.apps/**for now; it flagged 3 errors in the web code.Testing
pnpm test: 149 tests pass, covering the payload vector, rule boundaries, the Guard API, the pipeline end to end, SSE replay, acknowledgement re-plan, expiry, cancel, AT-13, AT-14, verify:audit and the Groq client with fallback.pnpm typecheckpasses for all workspaces, includingapps/web.pnpm lintand Prettier are clean..env: a request went tofinal(PartiallyPaid, with vendor-06 failing as designed), andverify:auditprinted PASS.