Commit 29bc2a9
Production-harden AGW: workspace restructure, delegated signing, and skill catalog (#4)
* feat: add Privy-backed delegated signer sessions
* feat(app): add Privy delegated onboarding flow
* Implement delegated AGW MCP signer onboarding
* Use AGW address as canonical session wallet
* Fix Privy wallet RPC: hex chain_id, chain_type, and error propagation
Privy API requires chain_id as hex-prefixed string (0x2b74) not decimal
(11124). Also adds missing chain_type field to RPC body and improves
error parsing to surface actual Privy error messages through the proxy.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Replace AgwActionAdapter with AbstractClient from agw-client
Use @abstract-foundation/agw-client's createAbstractClient directly
with a custom EIP-1193 provider that routes signing RPCs to Privy's
REST API. This replaces the manual transaction building in
AgwActionAdapter with agw-client's native AA handling (tx preparation,
EIP-712 signing, hook fetching, serialization, broadcasting).
Key changes:
- New src/agw/client.ts: custom transport + AbstractClient factory
- Delete src/agw/actions.ts: fully replaced by AbstractClient
- SessionManager.getAbstractClient(): lazy-cached client creation
- All 7 tool handlers simplified to use AbstractClient methods
- Privy RPC response: handle signature/signed_transaction/result fields
- Privy signTypedData: strip caip2/chain_type, convert primaryType
- Bundle agw-client via noExternal to fix broken ESM exports
- Proxy route: strip caip2/chain_type for signTypedData forwarding
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Increase default policy expiry from 1 hour to 30 days
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: move agw runtime into workspace packages
* chore: promote agw as the published product surface
* chore: remove legacy runtime and stale repo artifacts
* refactor: harden agw core command contracts
* feat: align agw cli and extension surfaces
* test: lock article parity behavior
* chore: remove ZeroEx API integration and related artifacts
This commit removes the `AGW_ZEROEX_API_KEY` from the public runtime configuration, deletes the ZeroEx configuration and quote adapter files, and updates related documentation and tests to reflect these changes. The `MYRIAD` app has also been removed from the app registry.
* feat: add AGW CLI banner image and update README
This commit introduces a new banner image for the AGW CLI and updates the README to include the banner at the top, enhancing the visual presentation of the project documentation.
* Use live Portal data for AGW app discovery
* Improve AGW installation and packaging guidance
* Refresh shipped AGW skills for agent workflows
* Restructure wallet read schemas and align public field paths
Replace flat balance arrays with structured nativeBalance/tokenBalances
objects, add tokenAddresses input, surface session and explorer context,
and update all field-path references across docs and skills.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Harden Aborean discovery with exact-pair factory lookup
Prefer direct getPool reads over DexScreener when an exact pair is
named. Add factory query examples, clarify that DexScreener misses
are not proof of absence, and align wallet field paths.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Update .gitignore to include additional file patterns
* Rename CLI package from agw to agw-cli
Rename the publishable CLI package directory, npm package name, binary
entry point, and all references across source, configs, docs, and tests
so the installed command becomes `agw-cli` and the npm identifier
becomes `@abstract-foundation/agw-cli`.
Also fix copy-button positioning in the companion app code blocks so
the button stays pinned on horizontal scroll and gets a backdrop blur
to avoid text overlap.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix publish workflow filter and session wizard chain resolution
Address cursor bot PR feedback:
1. Update publish workflow pnpm filter from @abstract-foundation/agw
to @abstract-foundation/agw-cli so releases actually publish.
2. Replace hardcoded abstractTestnet in useSessionWizardState with
chain resolution from the store's chainId, set by SessionFlowClient
on mount. Mainnet users were hitting the wrong chain for AGW account
derivation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Remove duplicate lockfile and favicon causing Next.js conflicts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Rename skills to gerund form per Anthropic naming conventions
Adopt official gerund naming (`verb-ing-object`) for all shipped skills
to improve discoverability and align with Anthropic's skill authoring
best practices. Update all cross-references in app-catalog, tests,
OpenAI agent YAML files, and README.
Renames:
- agw-auth-session → authenticating-with-agw
- agw-wallet-reads → reading-agw-wallet
- agw-tx-discipline → executing-agw-transactions
- agw-portal-discovery → discovering-abstract-portal
- protocol-aborean → trading-on-aborean
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add trading-on-uniswap skill for Uniswap V2+V3 swaps on Abstract
New skill covering token swaps, price quotes, and basic LP operations
via Uniswap V2 and V3 on Abstract mainnet and testnet. Includes all
deployed contract addresses, function signatures, approval+swap
batching patterns, V2 vs V3 decision guidance, slippage calculations,
and error handling reference.
Key content:
- SKILL.md: swap workflow, V2/V3 decision tree, batching guide
- references/contracts.md: all V2+V3 addresses (mainnet + testnet)
- references/v2-entrypoints.md: router swap/quote/LP signatures
- references/v3-entrypoints.md: SwapRouter02, QuoterV2, NFT manager
Clarifies that agw tx calls requires raw hex calldata (not ABI-level
args), while agw contract write supports ABI-level for readability.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add managing-agent-identity skill for ERC-8004 on Abstract
New skill for AI agent identity registration and reputation management
via the ERC-8004 Trustless Agents standard on Abstract. Covers both
IdentityRegistry (agent registration, metadata, wallet management) and
ReputationRegistry (feedback, summaries, revocation).
Includes mainnet and testnet contract addresses (deterministic CREATE2
deploys identical across 20+ EVM chains), complete interface
documentation, and the agentURI registration file schema.
Key fix vs baseline: teaches correct `register(string agentURI)`
signature — baselines hallucinate `registerAgent(address, string)`
which would revert on-chain.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add bridging-to-abstract and building-on-abstract skills
bridging-to-abstract: Covers native Ethereum bridge (L1↔L2 deposit/
withdrawal with timing and two-step finalization) and six third-party
bridges (Relay, Jumper, Stargate, Symbiosis, thirdweb, deBridge).
Includes Relay API for programmatic bridge quotes, bridge selection
decision tree, and common failure troubleshooting.
building-on-abstract: Developer onboarding skill covering project
scaffolding (create-abstract-app), smart contract deployment via
Foundry/Hardhat, AGW client and React SDK integration, paymaster
development (General and Approval-Based flows), session keys with
Policy Registry, and critical ZKsync VM EVM differences. Includes
all 17 system contract addresses and network configuration.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add upvoting-on-abstract skill for Abstract Portal voting
New skill for the on-chain AbstractVoting contract at
0x3b50de27506f0a8c1f4122a1e6f470009a76ce2a. Covers vote cost
queries, remaining vote checks, casting votes (payable with correct
value), checking vote counts per app/epoch, and epoch mechanics.
Includes full verified contract ABI, error handling reference
(InvalidValue, AlreadyVotedFor, UsedAllVotes, etc.), and the
complete voting workflow from cost check through execution.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix ABI format in skills: use full JSON objects, not human-readable strings
The AGW CLI schema validation requires ABI array elements to be JSON
objects (with type, name, inputs, outputs, stateMutability fields),
not human-readable strings like "function balanceOf(address) view
returns (uint256)". The latter fails with "json.abi[0] must be an
object" at the validation layer before reaching viem.
Converted all SKILL.md task-map examples to full JSON ABI format
and added an "ABI Format" section to each affected skill explaining
the requirement. Reference files retain human-readable signatures
for documentation purposes.
Verified on-chain via direct RPC eth_call:
- IdentityRegistry.balanceOf() ✓
- AbstractVoting.voteCost() = 0 (free), currentEpoch() = 317 ✓
- UniswapV2Router.getAmountsOut(0.1 ETH) = 190.22 USDC ✓
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix auth state race conditions and redesign authorization page
Resolve login loop caused by Privy SDK state transitions resetting the
wizard to not_logged_in during async AGW on-chain verification. Add a
resolving intermediate step, fix effect dependency array to use primitive
signerAddress instead of user object, gate login redirect on embedded
wallet readiness, and surface explicit errors for missing AGW and RPC
failures with proper retry paths.
Redesign the SelectPolicy authorization screen as a clean OAuth-style
consent page: safety limits shown as prominent pills derived from actual
policy defaults, compact permission checklist in plain English, simplified
consent text, and green Approve Access CTA.
Unify policy constants so the UI preview, preset definitions, and
server-side Privy policy all reference the same source of truth in
config.ts and default-policy.ts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add mining-with-bigcoin skill for Bigcoin game on Abstract
New skill for the Bigcoin virtual mining simulator. Covers facility
purchase/upgrade, miner buying, reward claiming, hashrate checking,
and merge mining. Includes full MainV2 game contract interface
discovered via Abscan verified source and on-chain state reads.
Contracts verified on mainnet via RPC eth_call:
- Game proxy: 0x89eb96a0a157f935de38d548b79af511d424e33a
- BIG token: 0xdf70075737e9f96b078ab4461eee3e055e061223
- Bigtoshi NFT: 0xb1eefa4f7b3987468441baa339e147a2cfee3d36
- pendingRewards(), getBigcoinPerBlock(), ownerToFacility() all ✓
- Current emission: ~0.039 BIG/block (after 6 halvings)
Includes all 9 facility tiers with costs, capacity, and power output.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix pre-merge review items: env docs, skills list, stray console.error
- Add missing server-side env vars to app/.env.example (PRIVY_APP_ID,
PRIVY_APP_SECRET, callback signing keys)
- Add 6 missing skills to README table (uniswap, bridging, building,
identity, upvoting, bigcoin)
- Remove redundant console.error in useSessionWizardState (error
already surfaced via markCreationError)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Override vulnerable transitive deps to fix CI audit
Add pnpm.overrides for hono >=4.12.4, @hono/node-server >=1.19.10,
express-rate-limit >=8.2.2, and socket.io-parser >=4.2.6 in both
root and app package.json. All are transitive deps from wagmi and
@modelcontextprotocol/sdk — floor constraints allow future patches.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix CI app job: install full workspace so overrides apply
The app job was running pnpm --dir app install which bypasses the
workspace root and its pnpm.overrides. Switch to full workspace
install so transitive dependency overrides take effect for the
audit step.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix CI: use valid registry app ID in test, suppress tsdown bundle warning
- policy-validation test referenced app ID '12' which doesn't exist
in the trimmed registry (only '136'/Gacha remains after seed removal).
Update to '136' so callPolicies resolve correctly.
- Add inlineOnly: false to tsdown config to prevent the intentional
@abstract-foundation/agw-client bundling from exiting non-zero.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Use shared Privy policy instead of creating one per session
Replace per-provision policy creation with a single pre-created policy
referenced by PRIVY_DEFAULT_POLICY_ID env var. This eliminates unbounded
policy sprawl in the Privy account — previously every session provision
created an identical policy with a unique expiry timestamp.
- Add getDefaultPolicyId() reading from env
- Export buildDefaultCapabilitySummary for direct use in provision route
- Remove createPolicy from privy-api.ts (zero callers)
- Remove buildDefaultPolicyRequest (dead code, 90 lines of rules generation)
- Update tests to cover live code paths
- Add PRIVY_DEFAULT_POLICY_ID to .env.example
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add script to create default Privy policy
One-time helper to create the shared wallet policy via Privy API.
Reads credentials from .env.local, outputs the policy ID to set
as PRIVY_DEFAULT_POLICY_ID.
Usage: npx tsx scripts/create-default-policy.ts [chainId]
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent ecf06e5 commit 29bc2a9
240 files changed
Lines changed: 28617 additions & 20697 deletions
File tree
- .github/workflows
- app
- meta
- public
- scripts
- src
- app
- api/session
- callback-key
- finalize-init
- provision
- revoke
- rpc
- login
- session
- new
- revoke
- assets
- icons
- login
- components
- SessionWizard
- steps
- hooks
- lib
- __tests__
- server
- providers
- stores
- docs/guide
- meta
- packages
- agw-cli
- extensions
- claude-code
- .claude-plugin
- gemini
- skills
- authenticating-with-agw
- agents
- bridging-to-abstract
- references
- building-on-abstract
- references
- discovering-abstract-portal
- agents
- executing-agw-transactions
- agents
- managing-agent-identity
- references
- mining-with-bigcoin
- references
- reading-agw-wallet
- agents
- trading-on-aborean
- agents
- references
- trading-on-uniswap
- references
- upvoting-on-abstract
- references
- src
- config
- agw-core
- src
- agw
- audit
- auth
- config
- errors
- execution
- handlers
- integrations
- abstract-rpc
- portal
- policy
- privy
- registry
- session
- tools
- utils
- scripts
- src
- auth
- config
- integrations/zeroex
- server
- session
- tools
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
0 commit comments