Skip to content

Commit f68a672

Browse files
committed
Add provider-backed public launch SDK helpers
1 parent b25b4d0 commit f68a672

7 files changed

Lines changed: 653 additions & 13 deletions

File tree

‎docs/CURRENT_STATE.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A local/test Agent Bonds v1 accountability surface exists for objective off-chai
1616

1717
On 2026-05-13 a small Base mainnet canary deployment was broadcast for V0 testing. It is documented in `docs/DEPLOYMENTS/2026-05-13-base-canary-v0.md`. A guarded Base mainnet canary reader now exists for those known canary addresses and small explicit block ranges. This is not a production launch and does not change the production/mainnet-readiness guardrails.
1818

19-
On 2026-05-21 the repo gained a public-agent local/test stack: shared `BaseOnchainAgentMemory` runtime integration, public agent class/tool/profile/lineage/fuel/bond/receipt contracts, `AgentFactory`, swarm policy/registry/budget/factory contracts, deterministic public launch helpers, control-plane and SDK/CLI discovery/preview methods, direct calldata builders for `AgentFactory.launchAgent(...)` and `SwarmFactory.createSwarm(...)`, dashboard projection, Foundry tests, a local Foundry e2e script, and Base Sepolia public-agent deployment/readback tooling with a configured public testnet deployer plan. This is public for review and local/testnet experimentation only; it is not a production launch or audited runtime.
19+
On 2026-05-21 the repo gained a public-agent local/test stack: shared `BaseOnchainAgentMemory` runtime integration, public agent class/tool/profile/lineage/fuel/bond/receipt contracts, `AgentFactory`, swarm policy/registry/budget/factory contracts, deterministic public launch helpers, control-plane and SDK/CLI discovery/preview methods, direct calldata builders plus EIP-1193 provider submission/receipt-decoding helpers for `AgentFactory.launchAgent(...)` and `SwarmFactory.createSwarm(...)`, dashboard projection, Foundry tests, a local Foundry e2e script, and Base Sepolia public-agent deployment/readback tooling with a configured public testnet deployer plan. This is public for review and local/testnet experimentation only; it is not a production launch or audited runtime.
2020

2121
The public-facing app story includes the mobile operator layer. The shared dashboard surface is packaged as browser/desktop and a committed Android Capacitor shell, while iOS remains an explicitly documented product track until an Xcode project and CI lane are added. Mobile is positioned as the always-available operator console for Agent Bonds, receipts, recourse, wallet/budget state, public-agent monitoring, and future alerting.
2222

@@ -86,7 +86,7 @@ Public-agent stack:
8686
- Shared `BaseOnchainAgentMemory` runtime integration exists.
8787
- Public agent class/tool/profile/lineage/fuel/bond/receipt contracts and `AgentFactory` exist.
8888
- Swarm policy/registry/budget/factory contracts exist.
89-
- Deterministic public launch helpers, control-plane discovery/preview methods, SDK/CLI smoke lanes, direct calldata builders, dashboard projection, Foundry tests, a local Foundry e2e script, and Base Sepolia public-agent deploy/readback tooling exist.
89+
- Deterministic public launch helpers, control-plane discovery/preview methods, SDK/CLI smoke lanes, direct calldata builders plus EIP-1193 provider submission/receipt-decoding helpers, dashboard projection, Foundry tests, a local Foundry e2e script, and Base Sepolia public-agent deploy/readback tooling exist.
9090
- This is public for review and local/testnet experimentation only; it is not a production launch or audited runtime.
9191

9292
Mobile operator layer:

‎docs/PUBLIC_AGENT_NETWORK_RELEASE.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ The current public-agent network stack includes:
1616
- launch-bond escrow and memory-fuel vault flows;
1717
- public launch preview, launch intent, discovery, and prototype projection methods in the control-plane;
1818
- public agent class/tool helpers and deterministic launch-root builders in `services/flowmemory`;
19-
- contract-aligned launch digest helpers plus direct calldata builders for SDK and signer integrations;
19+
- contract-aligned launch digest helpers, direct calldata builders, EIP-712 typed-data signing requests, EIP-1193 provider submission helpers, receipt polling, and event decoding for SDK and signer integrations;
2020
- swarm policy, identity, membership, lifecycle, factory, and budget vault contracts;
2121
- public swarm preview, launch intent, replay, prototype projection methods, and direct create-call builders;
22-
- public SDK and CLI wrappers for discovery, public launch/swarm projections, and local CLI smoke;
22+
- public SDK and CLI wrappers for discovery, public launch/swarm projections, direct contract preparation/submission helpers, and local CLI smoke;
2323
- dashboard public-network view backed by deterministic local data;
2424
- Foundry tests for public contracts and a local script that exercises agent launch plus swarm budget lifecycle;
2525
- Base Sepolia public-agent deployment, source-verification, and bounded event-readback tooling with a configured public testnet deployer plan in `fixtures/deployments/public-agent-network-base-sepolia-plan.json`.

‎docs/PUBLIC_AGENT_NETWORK_TECHNICAL_GUIDE.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ The open swarm-born-agent work is tracked in issue #168.
103103

104104
Public-agent methods include class/tool discovery, launch preview, launch intent, prototype launch record, and discovery projection. Public-swarm methods include class discovery, launch preview, prototype swarm record, and replay projection.
105105

106-
Current methods are local/control-plane projections. The public helper layer also includes direct calldata builders for `AgentFactory.launchAgent(...)` and `SwarmFactory.createSwarm(...)`, so a signer or wallet can prepare contract-ready transaction data without accepting raw secrets into the repo.
106+
Current methods are local/control-plane projections. The public helper layer also includes direct calldata builders for `AgentFactory.launchAgent(...)` and `SwarmFactory.createSwarm(...)`, EIP-712 typed-data request builders for owner signatures, EIP-1193 provider-backed submission helpers, receipt polling, and public-agent/swarm event decoding. These helpers are designed for wallet/provider integrations; they do not accept raw private keys by default.
107107

108108
### Public SDK and CLI
109109

110-
The public SDK/CLI surface wraps public-agent and swarm commands for class/tool discovery, launch preview, launch intent, launch projection, agent discovery, swarm projection, swarm replay, and direct local/test contract-call preparation. External users should exercise it through `npm run public:test:quick` and `npm run public:test:cli` rather than older internal command names.
110+
The public SDK/CLI surface wraps public-agent and swarm commands for class/tool discovery, launch preview, launch intent, launch projection, agent discovery, swarm projection, swarm replay, and direct local/test contract-call preparation. External users should exercise it through `npm run public:test:quick` and `npm run public:test:cli` rather than older internal command names. Direct contract submission should use an external wallet or provider implementing `request({ method, params })`; raw deployer keys, RPC credentials, and wallet secrets stay outside the SDK and outside Git.
111111

112112
### Agent Memory SDK
113113

‎docs/PUBLIC_RELEASE_GAPS.md‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,14 @@ Missing work:
3636

3737
Tracking issue: https://github.com/FlowmemoryAI/FlowMemory/issues/166
3838

39-
Current state: the public helper layer exposes control-plane wrappers, FlowMemory helpers produce deterministic roots plus contract-aligned launch hashes, and direct calldata builders now exist for `AgentFactory.launchAgent` and `SwarmFactory.createSwarm`. Direct transaction submission is not yet a complete SDK surface.
39+
Current state: the public helper layer exposes control-plane wrappers, deterministic roots, contract-aligned launch hashes, direct calldata builders, EIP-712 typed-data signing requests, EIP-1193 provider-backed submission helpers, transaction receipt polling, and public-agent/swarm receipt event decoding. The SDK does not accept raw private keys by default.
4040

4141
Missing work:
4242

43-
- signer-provider abstraction that does not accept raw secrets by default;
44-
- provider-backed submission for `AgentFactory.launchAgent`;
45-
- provider-backed submission for `SwarmFactory.createSwarm`;
46-
- receipt polling and event decoding;
47-
- test coverage against local Anvil broadcast logs.
43+
- local Anvil SDK e2e that prepares, signs through an external provider, submits `AgentFactory.launchAgent`, waits for the receipt, and checks decoded launch/fuel/bond events;
44+
- local Anvil SDK e2e that submits `SwarmFactory.createSwarm`, waits for the receipt, and checks decoded swarm/budget events;
45+
- negative local Anvil coverage for nonce replay and bad class/toolset through the direct SDK lane;
46+
- public evidence from those local Anvil broadcast logs.
4847

4948
### 4. Public-network dashboard live data
5049

‎services/flowmemory-sdk/src/index.ts‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,29 @@ export {
88
} from "./client.ts";
99
export { redactFlowMemoryText, redactJsonValue } from "./redact.ts";
1010
export {
11+
PUBLIC_AGENT_CONTRACT_EVENT_TOPICS,
1112
buildPublicAgentLaunchTransaction,
13+
buildPublicAgentLaunchTypedData,
1214
buildPublicSwarmCreateTransaction,
15+
decodePublicContractReceipt,
16+
signPublicAgentLaunchIntent,
17+
submitPreparedContractTransaction,
18+
submitPublicAgentLaunchTransaction,
19+
submitPublicSwarmCreateTransaction,
20+
waitForTransactionReceipt,
21+
type DecodedPublicContractEvent,
22+
type DecodedPublicContractReceipt,
23+
type Eip1193Provider,
24+
type EvmTransactionReceipt,
25+
type EvmTransactionReceiptLog,
1326
type PreparedContractTransaction,
1427
type PreparedPublicAgentLaunchTransaction,
1528
type PreparedPublicSwarmCreateTransaction,
1629
type PublicAgentLaunchPaymentInput,
30+
type PublicAgentLaunchTypedData,
31+
type PublicAgentLaunchTypedDataRequest,
1732
type PublicSwarmMemberInput,
1833
type PublicSwarmMemberType,
34+
type SubmittedContractTransaction,
35+
type WaitForTransactionReceiptOptions,
1936
} from "./public-contracts.ts";

0 commit comments

Comments
 (0)