How shane2512/steward works
Steward lets an owner connect a wallet, express treasury intent as a mandate, review and activate its compiled policy, and authorize a bounded Spend Permission. The worker then gathers treasury context, screens untrusted text, obtains a SERV proposal, and subjects it to deterministic policy and risk checks before wallet execution and chain confirmation. Owners can also approve escalations, inspect decisions and audit history, or freeze and sweep funds through a separate signed path. The worker pipeline excerpt is partial; stage relationships follow the README’s documented architecture, while uncertain implementation details are omitted.
Main entry points: schema.ts Postgres records · pipeline.ts Decision pipeline · executor.ts Wallet executor · route.ts Mandate compilation
Components 22
Owner application
- Steward dashboard
apps/web/app/app/page.tsx - Onboarding flow
apps/web/components/onboarding/OnboardingFlow.tsx - Dashboard aggregation
apps/web/app/api/dashboard/route.ts - Audit and exports
apps/web/app/api/audit/route.ts
Owner controls
- Mandate compilation
apps/web/app/api/mandate/compile/route.ts - Policy review
apps/web/app/api/policy/route.ts - Recipient allowlist
apps/web/app/api/recipients/route.ts - Spend permission
apps/web/app/api/spend-permission/route.ts - Freeze and recovery
apps/web/app/api/freeze/route.ts - Owner fund sweep
apps/web/app/api/sweep/route.ts
Autonomous decisions
- Decision scheduler
apps/worker/src/loop.ts - Decision pipeline
apps/worker/src/pipeline.ts - Treasury context
packages/context/src/build.ts - SERV reasoning
packages/reasoning/src/index.ts - Deterministic policy
packages/policy/src/evaluate.ts - Simulation risk gate
packages/risk/src/simulate.ts
Treasury execution
- Wallet executor
packages/wallet/src/executor.ts - Coinbase AgentKit
packages/wallet/src/agentkit.ts
State and audit
- Postgres records
packages/db/src/schema.ts
Other components
- Treasury owner
- Base treasury chain
- SERV inference
Connections 30
- Treasury owner → Onboarding flow: sets up
- Onboarding flow → Mandate compilation: submits mandate
- Treasury owner → Policy review: reviews and signs
- Treasury owner → Recipient allowlist: signs recipient
- Treasury owner → Spend permission: grants permission
- Mandate compilation → SERV reasoning: compiles mandate
- Mandate compilation → Postgres records: stores mandate
- Policy review → Postgres records: reads and activates
- Recipient allowlist → Postgres records: reads and writes
- Spend permission → Postgres records: stores grant
- Decision scheduler → Decision pipeline: runs iterations
- Decision pipeline → Treasury context: builds context
- Decision pipeline → SERV reasoning: screens and proposes
- Decision pipeline → Deterministic policy: evaluates proposal
- Decision pipeline → Simulation risk gate: simulates calls
- Decision pipeline → Wallet executor: executes allowed
- SERV reasoning → SERV inference: requests inference
- Decision pipeline → Postgres records: records decisions
- Treasury context → Postgres records: reads treasury state
- Wallet executor → Coinbase AgentKit: dispatches actions
- Coinbase AgentKit → Base treasury chain: sends transactions
- Base treasury chain → Wallet executor: confirms transactions
- Treasury owner → Freeze and recovery: signs freeze
- Freeze and recovery → Postgres records: freezes and audits
- Treasury owner → Owner fund sweep: requests signed sweep
- Owner fund sweep → Wallet executor: invokes sweep
- Dashboard aggregation → Postgres records: reads decisions and state
- Steward dashboard → Dashboard aggregation: loads dashboard
- Audit and exports → Postgres records: reads audit records
- Steward dashboard → Audit and exports: requests history