Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 24
- name: Verify the live testnet lifecycle (Relay mocked)
- name: Verify the testnet lifecycle (Relay and Hyperliquid orders mocked)
run: .github/scripts/testnet-run.sh
- name: Record testnet coverage and outcome
if: always()
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ For **testnet**, use an explicitly supported test origin chain/token and its
`originDecimals` from `agent-cli schema fund`. Chain 42161 and the default origin
token are mainnet values; do not send real funds to a testnet example. Relay
HyperCore testnet routes may be unavailable. If no route is known, stop funding.
The CI lifecycle harness uses mocked Relay and pre-funded test collateral.
The CI lifecycle harness uses mocked Relay and mocked Hyperliquid orders.

Show the returned `qrAscii`, deposit address, origin chain/token, minimum, fees,
expected receipt, and expiry. The user transfers only the quoted origin token.
Expand Down
7 changes: 4 additions & 3 deletions apps/docs/content/docs/skill.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Use `--network testnet` during testing; never silently change to mainnet.
origin chain/token, minimum, fees, expected received amount and expiry. On
testnet, do not treat the default Arbitrum mainnet chain/token as a test route:
use an explicitly supported test chain/token and `originDecimals`, or the
credential-gated CI harness with mocked Relay and pre-funded test collateral.
credential-gated CI harness with mocked Relay and mocked Hyperliquid orders.
If no test route is known, stop funding and report the missing route. The user
transfers the quoted origin token. If `signatureSteps` require signatures,
show the exact payload and submit each via `deposit` in returned order.
Expand Down Expand Up @@ -164,8 +164,9 @@ Offline skill tests validate the documented command examples against CLI schemas
Mocked lifecycle tests exercise resumable approvals, pending funding, events
and failure handling. These checks do **not** prove a live agent or
exchange run. The nightly testnet lifecycle uses only a company-owned disposable
CI master account and separate test Privy app, real Hyperliquid testnet and Privy,
and an explicitly mocked Relay route backed by already funded test collateral.
CI master account and separate test Privy app, live Privy and Hyperliquid
approvals/revocation, and explicitly mocked Relay plus mocked Hyperliquid orders
that never reach the exchange. Test USDC pre-funding is not required for that job.
The same harness supports a caller-controlled external wallet approval adapter
on a clean QA runner; its private key stays in that wallet. It never transfers
real funds. Missing CI credentials fail the job; a skipped or
Expand Down
7 changes: 4 additions & 3 deletions apps/docs/public/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Use `--network testnet` during testing; never silently change to mainnet.
origin chain/token, minimum, fees, expected received amount and expiry. On
testnet, do not treat the default Arbitrum mainnet chain/token as a test route:
use an explicitly supported test chain/token and `originDecimals`, or the
credential-gated CI harness with mocked Relay and pre-funded test collateral.
credential-gated CI harness with mocked Relay and mocked Hyperliquid orders.
If no test route is known, stop funding and report the missing route. The user
transfers the quoted origin token. If `signatureSteps` require signatures,
show the exact payload and submit each via `deposit` in returned order.
Expand Down Expand Up @@ -150,8 +150,9 @@ Offline skill tests validate the documented command examples against CLI schemas
Mocked lifecycle tests exercise resumable approvals, pending funding, events
and failure handling. These checks do **not** prove a live agent or
exchange run. The nightly testnet lifecycle uses only a company-owned disposable
CI master account and separate test Privy app, real Hyperliquid testnet and Privy,
and an explicitly mocked Relay route backed by already funded test collateral.
CI master account and separate test Privy app, live Privy and Hyperliquid
approvals/revocation, and explicitly mocked Relay plus mocked Hyperliquid orders
that never reach the exchange. Test USDC pre-funding is not required for that job.
The same harness supports a caller-controlled external wallet approval adapter
on a clean QA runner; its private key stays in that wallet. It never transfers
real funds. Missing CI credentials fail the job; a skipped or
Expand Down
2 changes: 1 addition & 1 deletion docs/ACCEPTANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Node 22.12 minimum.
| #29–#32 | Locked sequence journal across independent writers/restarts, replay/types/follow, exact fill fee units; log filtering/redaction; runner heartbeat/staleness and deposit polling; mocked-clock expiry blocking and once-per-threshold warnings. |
| #33–#36 | New approval verified before signer handoff/old revocation, resumable rotation and immediate local revocation tests; fsynced cross-process hash-chain with intent/decision/signature digest/response/fill linkage; tamper/redaction tests and linked full-lifecycle records. CLI/RPC pre-schema hex/mnemonic detector and threat model. |
| #37–#38 | Skill source/frontmatter/error-catalog tests and every documented command input parsed through actual CLI schemas offline; user-owned Privy, ordered external approvals, bounded polling, exchange reconciliation and supported-test-route guidance; install/custody README, generated command reference and static Pages site. The skill deliverable is complete; the unproven coding-agent testnet session is tracked explicitly in #39. |
| #39 | Offline CLI/SDK/RPC lifecycle plus fifteen-stage testnet harness with external wallet approval adapter or separate CI-only disposable signer; exact prices, correlated events, post-rotation trading, partial-rotation cleanup and zero orders/agents/positions verification. Schema 2 reports/CI summaries validate stage and service evidence; Relay remains mocked. Missing configuration fails explicitly. Nightly live evidence and the independent coding-agent skill session remain pending. |
| #39 | Offline CLI/SDK/RPC lifecycle plus fifteen-stage testnet harness with external wallet approval adapter or separate CI-only disposable signer; exact prices, correlated events, post-rotation trading, partial-rotation cleanup and zero orders/agents/positions verification. Schema 2 reports/CI summaries validate stage and service evidence; Relay and Hyperliquid orders are mocked and blocked from the exchange. Missing configuration fails explicitly. Nightly live evidence and the independent coding-agent skill session remain pending. |
| #40–#42 | Script-free packed global installation and installed bunx smoke, executable bin, license and matching skill versions; Node 22.12/24 install CI; Linux/macOS ARM/x64 native binary smoke; changesets/tagged-main/version/token-publish/asset pipeline with candidate-only manual runs. Publishing and public registry verification await the `BLOXWAP_PUBLISH` gate. |
| #49 | Token guard rejects declarations anywhere in formatted/minified CSS. Unit regression and a mutation of global.css prove docs:check rejects the issue's exact same-line copy. |

Expand Down
10 changes: 6 additions & 4 deletions docs/PROGRESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
| #36 | done | Pre-schema recursive CLI/RPC secret detector, BIP39-like seed rejection, private authorization refs and env/log/error scrubbing; threat model docs. |
| #37 | done | Skill content, packaged/embedded installation, schema-validated examples and public /SKILL.md hosting are complete. Frontmatter, gotchas, error handling, discovery links and source parity are verified. The unverified live coding-agent testnet criterion is explicitly transferred to #39. |
| #38 | done | Install/testnet README, custody architecture, schema-generated command reference and static docs site with gated Pages workflow. |
| #39 | partial | Fifteen-stage testnet harness supports external wallet signing and separate CI-only disposable keys, exact exchange reconciliation, correlated WebSocket/follow/replay events, post-rotation trading, audit verification, partial-rotation cleanup and zero orders/agents/positions checks. Schema 2 reports and CI summaries require evidence. Offline regressions pass; nightly live journals and the independent coding-agent skill session transferred from #37 still require dedicated QA configuration and evidence. |
| #39 | partial | Fifteen-stage testnet harness supports external wallet signing and separate CI-only disposable keys, exact price reconciliation, correlated WebSocket/follow/replay events, post-rotation trading, audit verification, partial-rotation cleanup and zero orders/agents/positions checks. Hyperliquid order placement/modify/cancel (and the order-book/order-update responses those stages use) are explicitly mocked and blocked from the exchange; approvals, account reads and Privy stay live. Schema 2 reports and CI summaries require evidence and record order coverage as mocked. Offline regressions pass; nightly journals and the independent coding-agent skill session transferred from #37 still require dedicated QA configuration and evidence. Test USDC pre-funding is no longer required. |
| #40 | partial | Script-free tarball global install and actual installed bunx help/schema smoke pass locally; executable/skill/license checks and Node 22.12/24 macOS/Linux CI. Public registry installation awaits publication. |
| #41 | partial | Validated Changesets patch workflow with optional version PR, native binary smoke/checksums, tagged-main version gates, exact tested tarball publication and registry verification. Publish runs on the Mac mini fleet with the organization `NPM_TOKEN` (no OIDC trusted publishing or automatic provenance). Manual candidates cannot publish. Actual release needs the publishing gate; organization policy blocks automatic version PRs, so the default workflow uploads a reviewable patch. |
| #42 | done | Final packaged flow audited and corrected (network/config isolation, exact loss/exposure/receipt checks, trigger preservation, readiness and stream errors). Skill shipped/embedded in npm and compiled CLI; Claude/Codex installation with CODEX_HOME, version synchronization, idempotency and overwrite protection. |
Expand Down Expand Up @@ -80,9 +80,11 @@ This is release preparation; public npm installation is still pending.

#39 now supports caller-controlled external wallet approvals alongside the
separate disposable CI signer, with fifteen evidence-checked stages, correlated
events and interrupted-rotation cleanup. Runner shutdown is confirmed before
journal export. Build, lint, typecheck, 229 offline CLI tests, docs checks and the
static docs build pass. Nightly CI maps `AGENT_CLI_TEST_MASTER_KEY`, `AGENT_CLI_PRIVY_APP_ID` and
events and interrupted-rotation cleanup. Hyperliquid order placement, modification
and cancellation never reach the exchange: the preload mocks those endpoints and
fails closed if an order request escapes. 30 test USDC pre-funding is not required.
Runner shutdown is confirmed before journal export. Nightly CI maps
`AGENT_CLI_TEST_MASTER_KEY`, `AGENT_CLI_PRIVY_APP_ID` and
`AGENT_CLI_PRIVY_APP_SECRET` from the `testnet` environment onto the harness
`BLOXWAP_*` variables. Live journals and the independent coding-agent session
are still not claimed.
8 changes: 5 additions & 3 deletions docs/issues/39.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ the user's master key never enters the CLI or harness. The dedicated CI signer
is a separate test-only mode. See [setup and protocol](../testnet.md).

Fifteen stages reconcile both approvals, settlement, runner readiness, exact
exchange prices, correlated open/canceled events and replay, post-rotation
trading, final revocation and audit integrity. Cleanup tracks both run-owned
agents before approvals and verifies no remaining orders, agents or positions.
prices, correlated open/canceled events and replay, post-rotation trading,
final revocation and audit integrity. Order placement, modification and
cancellation are mocked and blocked from the exchange; approvals, account
reads and Privy stay live. Cleanup tracks both run-owned agents before
approvals and verifies no remaining live orders, agents or positions.
Schema 2 reports and CI summaries reject incomplete evidence and preserve the
separate, unverified coding-agent session requirement.

Expand Down
42 changes: 25 additions & 17 deletions docs/testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,32 +82,40 @@ not a production CLI key-import feature. Missing secrets fail the nightly job.

## Account preparation and coverage

Pre-fund the dedicated Hyperliquid **testnet** account with at least 30 test USDC.
It must have no positions, open orders or leftover agent approvals. Use a clean
The dedicated Hyperliquid **testnet** account must have no positions, open orders
or leftover agent approvals. 30 test USDC pre-funding is **not** required: the
harness never places, modifies or cancels orders on the exchange. Use a clean
OS account or container: the harness refuses existing `~/.bloxwap` state, and
never changes the CLI's state location. Do not use a mainnet account or real funds.

Hyperliquid testnet and Privy calls are real. Relay is explicitly mocked at the
testnet URL: the quote has zero expected output and settlement relies on existing
test collateral. No token transfer or bridge execution is claimed. The preload
blocks mainnet Hyperliquid and Relay HTTP endpoints in CLI child processes.
Privy and Hyperliquid agent approvals/revocation stay live, as do account info
reads (balances, positions, open orders, extra agents) and non-order WebSocket
subscriptions. Order placement, modification and cancellation — including the
order-book info and order-update WebSocket responses those stages reconcile
against — are explicitly mocked, the same way Relay is mocked. No order request
is forwarded to Hyperliquid. Fund-moving exchange actions (withdrawals, transfers
and similar) are blocked, not executed. Relay is mocked at the testnet URL: the
quote has zero expected output and no token transfer or bridge execution is
claimed. The preload blocks mainnet Hyperliquid and Relay HTTP endpoints and
fails loudly if a Hyperliquid order request escapes to the live exchange.

Fifteen stages verify both init approvals, funding QR/settlement, runner signing
and readiness, resting post-only orders, exact exchange prices after modification,
and readiness, mocked resting post-only orders, exact prices after modification,
cancellation, correlated open/canceled WebSocket events, cursor replay, signer
rotation and old-agent revocation, an order/cancel with the new signer, final
revocation, audit integrity and streamed-event delivery. `ok:true` alone never
counts as exchange acceptance. Orders use BTC with a 50 test USD notional/position
rotation and old-agent revocation, a mocked order/cancel with the new signer,
final revocation, audit integrity and streamed-event delivery. `ok:true` alone
never counts as acceptance. Orders use BTC with a 50 test USD notional/position
cap and a two-open-order limit; the suite does not request fills.

Cleanup records both agent addresses/names before approvals so an interrupted
rotation can revoke either or both. It cancels orders before revocation and
verifies zero orders, approved agents and positions. Unknown approvals are left
untouched and make cleanup fail. Existing local revocation is never bypassed to
cancel orders. Failed cleanup requires owner review of the dedicated test account.
A forced job termination can interrupt cleanup, so inspect timed-out runs too.
The harness also confirms runner process exit and removal of its PID/socket
before exporting journals; a shutdown timeout fails the report.
rotation can revoke either or both. It cancels harness-owned mocked orders
before revocation and verifies the live account still has zero orders, approved
agents and positions. Unknown approvals are left untouched and make cleanup fail.
Existing local revocation is never bypassed to cancel orders. Failed cleanup
requires owner review of the dedicated test account. A forced job termination
can interrupt cleanup, so inspect timed-out runs too. The harness also confirms
runner process exit and removal of its PID/socket before exporting journals; a
shutdown timeout fails the report.

## Evidence

Expand Down
7 changes: 4 additions & 3 deletions packages/agent-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Use `--network testnet` during testing; never silently change to mainnet.
origin chain/token, minimum, fees, expected received amount and expiry. On
testnet, do not treat the default Arbitrum mainnet chain/token as a test route:
use an explicitly supported test chain/token and `originDecimals`, or the
credential-gated CI harness with mocked Relay and pre-funded test collateral.
credential-gated CI harness with mocked Relay and mocked Hyperliquid orders.
If no test route is known, stop funding and report the missing route. The user
transfers the quoted origin token. If `signatureSteps` require signatures,
show the exact payload and submit each via `deposit` in returned order.
Expand Down Expand Up @@ -150,8 +150,9 @@ Offline skill tests validate the documented command examples against CLI schemas
Mocked lifecycle tests exercise resumable approvals, pending funding, events
and failure handling. These checks do **not** prove a live agent or
exchange run. The nightly testnet lifecycle uses only a company-owned disposable
CI master account and separate test Privy app, real Hyperliquid testnet and Privy,
and an explicitly mocked Relay route backed by already funded test collateral.
CI master account and separate test Privy app, live Privy and Hyperliquid
approvals/revocation, and explicitly mocked Relay plus mocked Hyperliquid orders
that never reach the exchange. Test USDC pre-funding is not required for that job.
The same harness supports a caller-controlled external wallet approval adapter
on a clean QA runner; its private key stays in that wallet. It never transfers
real funds. Missing CI credentials fail the job; a skipped or
Expand Down
Loading
Loading