@dev.sail.money/sailor 0.0.2-31 → 0.0.2-35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/AGENTS.md +11 -12
  2. package/README.md +122 -124
  3. package/package.json +1 -2
  4. package/packages/cli/dist/index.cjs +68 -21
  5. package/packages/cli/dist/server.cjs +20 -9
  6. package/packages/sdk/dist/intelligence.d.ts +1 -1
  7. package/packages/sdk/dist/intelligence.js +1 -1
  8. package/packages/ui/dist/assets/{add-B0J2XPqD.js → add-BqSzokiL.js} +1 -1
  9. package/packages/ui/dist/assets/{all-wallets-DAWTUGbI.js → all-wallets-DRghRzBH.js} +1 -1
  10. package/packages/ui/dist/assets/{app-store-B-bz9zO1.js → app-store-CHQohbxT.js} +1 -1
  11. package/packages/ui/dist/assets/{apple-CW_aatUl.js → apple-DyXS52Cz.js} +1 -1
  12. package/packages/ui/dist/assets/{arrow-bottom-D9xphoWP.js → arrow-bottom-CvZE3jWY.js} +1 -1
  13. package/packages/ui/dist/assets/{arrow-bottom-circle-D-N3HlXh.js → arrow-bottom-circle-BP_2WEkR.js} +1 -1
  14. package/packages/ui/dist/assets/{arrow-left-DofAd9ta.js → arrow-left--QDrrrK2.js} +1 -1
  15. package/packages/ui/dist/assets/{arrow-right-CLBZVLVF.js → arrow-right-AdmPdxdO.js} +1 -1
  16. package/packages/ui/dist/assets/{arrow-top-B47Y4sI6.js → arrow-top-Bwg6vVDn.js} +1 -1
  17. package/packages/ui/dist/assets/{bank-CVHPZeNC.js → bank-Cz2q0uEn.js} +1 -1
  18. package/packages/ui/dist/assets/{basic-CijTV8XG.js → basic-yFwOroQX.js} +1 -1
  19. package/packages/ui/dist/assets/{browser-D12J6hPl.js → browser-oL-NMPhY.js} +1 -1
  20. package/packages/ui/dist/assets/{card-suad8wBG.js → card-CF8mKo0W.js} +1 -1
  21. package/packages/ui/dist/assets/{ccip-Bev57e2Y.js → ccip-C4BRVTyT.js} +1 -1
  22. package/packages/ui/dist/assets/{checkmark-DSzbM9ge.js → checkmark-CGcssumz.js} +1 -1
  23. package/packages/ui/dist/assets/{checkmark-bold-Ctlpy8fR.js → checkmark-bold-CEx1x56A.js} +1 -1
  24. package/packages/ui/dist/assets/{chevron-bottom-DD4PYpsh.js → chevron-bottom-B17SVO6Z.js} +1 -1
  25. package/packages/ui/dist/assets/{chevron-left-HJzgI5fr.js → chevron-left-Bmlagpn4.js} +1 -1
  26. package/packages/ui/dist/assets/{chevron-right-BAJMtoWG.js → chevron-right-Ce0oTagP.js} +1 -1
  27. package/packages/ui/dist/assets/{chevron-top-CSTGBRNq.js → chevron-top-Ou3mYfjQ.js} +1 -1
  28. package/packages/ui/dist/assets/{chrome-store-CSgmzP0o.js → chrome-store-DWdtrqUk.js} +1 -1
  29. package/packages/ui/dist/assets/{clock-BGKXrbjA.js → clock-gBTuGt5c.js} +1 -1
  30. package/packages/ui/dist/assets/{close-B-9LI-cc.js → close-c4Ordvo2.js} +1 -1
  31. package/packages/ui/dist/assets/{coinPlaceholder-C9zB6O8f.js → coinPlaceholder-DKx_73vx.js} +1 -1
  32. package/packages/ui/dist/assets/{compass-DNbNVsgN.js → compass-Blxk0h-Z.js} +1 -1
  33. package/packages/ui/dist/assets/{copy-r_J027hY.js → copy-Cn01fjX1.js} +1 -1
  34. package/packages/ui/dist/assets/{core-CuWvvvu4.js → core-KcoX-IO2.js} +3 -3
  35. package/packages/ui/dist/assets/cursor-D7a2ynBo.js +3 -0
  36. package/packages/ui/dist/assets/{cursor-transparent-By6KxbOE.js → cursor-transparent-DiQTwo8L.js} +1 -1
  37. package/packages/ui/dist/assets/{desktop-DRMmsjrd.js → desktop-c0OGFp4k.js} +1 -1
  38. package/packages/ui/dist/assets/{disconnect-C69Z8KUW.js → disconnect-D6nYEXxt.js} +1 -1
  39. package/packages/ui/dist/assets/{discord-p3AKvqDk.js → discord-CU6UsGj5.js} +1 -1
  40. package/packages/ui/dist/assets/{etherscan-C2zTiWaN.js → etherscan-H4xFZDt1.js} +1 -1
  41. package/packages/ui/dist/assets/{events-DKTfpIHs.js → events-Bh5TaEvc.js} +1 -1
  42. package/packages/ui/dist/assets/{exclamation-triangle-D4IJznwI.js → exclamation-triangle-k3JV87dF.js} +1 -1
  43. package/packages/ui/dist/assets/{extension-C0y2g1tg.js → extension-Db7in92k.js} +1 -1
  44. package/packages/ui/dist/assets/{external-link-fkbBBTcW.js → external-link-M8ucb8_c.js} +1 -1
  45. package/packages/ui/dist/assets/{facebook-nsIgKROR.js → facebook-DqyDwZLk.js} +1 -1
  46. package/packages/ui/dist/assets/{fallback-DHv3hSPW.js → fallback-CpXrChod.js} +1 -1
  47. package/packages/ui/dist/assets/{farcaster-CzBHn8fo.js → farcaster-BhXVEUn7.js} +1 -1
  48. package/packages/ui/dist/assets/{filters-gW1TGI8D.js → filters-BsmF8Lsr.js} +1 -1
  49. package/packages/ui/dist/assets/{github-D9UuzE25.js → github-CTlGk78L.js} +1 -1
  50. package/packages/ui/dist/assets/{google-DxUfChw6.js → google-IbDv5sDf.js} +1 -1
  51. package/packages/ui/dist/assets/{help-circle-2dNDsXrX.js → help-circle-CxsLWQrd.js} +1 -1
  52. package/packages/ui/dist/assets/{id-rNBDU8mz.js → id-CiF75iBE.js} +1 -1
  53. package/packages/ui/dist/assets/{image-C9Peu4QW.js → image-B5bE_jY7.js} +1 -1
  54. package/packages/ui/dist/assets/{index-B1wosqUU.js → index-C4oDoM-t.js} +1 -1
  55. package/packages/ui/dist/assets/{index-JwrWbcaz.js → index-CGF5V3MX.js} +1 -1
  56. package/packages/ui/dist/assets/{index-_F9WbMAT.js → index-CNQ6HiTi.js} +3 -3
  57. package/packages/ui/dist/assets/{index-BzT0MJhc.js → index-DE_m8aQ1.js} +78 -78
  58. package/packages/ui/dist/assets/{index-4lrTXbkY.js → index-DKKjEVeH.js} +1 -1
  59. package/packages/ui/dist/assets/{index-B1aFIpJ0.js → index-DcrJPNJt.js} +1 -1
  60. package/packages/ui/dist/assets/{index.es-wlYgJouQ.js → index.es-B6xObjNP.js} +4 -4
  61. package/packages/ui/dist/assets/{info-cGbqKpFv.js → info-DPW3VbOc.js} +1 -1
  62. package/packages/ui/dist/assets/{info-circle-B8Xfr9A0.js → info-circle-lcMYVscf.js} +1 -1
  63. package/packages/ui/dist/assets/{lightbulb-CM2m-PnZ.js → lightbulb-DZeX-zL3.js} +1 -1
  64. package/packages/ui/dist/assets/{mail-_qO7Zcxu.js → mail-BXAoBPf-.js} +1 -1
  65. package/packages/ui/dist/assets/{metamask-sdk-Dy961bnw.js → metamask-sdk-EP1I3cQl.js} +1 -1
  66. package/packages/ui/dist/assets/{mobile-C6TDJh2K.js → mobile-Bacg80DQ.js} +1 -1
  67. package/packages/ui/dist/assets/{more-3pPTR0Gx.js → more-HXg_jFBb.js} +1 -1
  68. package/packages/ui/dist/assets/{network-placeholder-BtFT2yZA.js → network-placeholder-BeKgcBFu.js} +1 -1
  69. package/packages/ui/dist/assets/{nftPlaceholder-BfBZEH1N.js → nftPlaceholder-CbZ8lpZw.js} +1 -1
  70. package/packages/ui/dist/assets/{off-Bg5cnmyC.js → off-DbC3cKAC.js} +1 -1
  71. package/packages/ui/dist/assets/{parseSignature-CSIsnC1G.js → parseSignature-Diak-ncT.js} +1 -1
  72. package/packages/ui/dist/assets/{play-store-Dg32m5PL.js → play-store-CGxL9l1V.js} +1 -1
  73. package/packages/ui/dist/assets/{plus-Ce97GbOa.js → plus-Bxn8ifny.js} +1 -1
  74. package/packages/ui/dist/assets/{qr-code-D3KdZWUh.js → qr-code-86kM91qz.js} +1 -1
  75. package/packages/ui/dist/assets/{recycle-horizontal-DOKfyzVh.js → recycle-horizontal-Cn7PmrIT.js} +1 -1
  76. package/packages/ui/dist/assets/{refresh-DSjW7q17.js → refresh-Dsn4oWtE.js} +1 -1
  77. package/packages/ui/dist/assets/{reown-logo-B0n-8waR.js → reown-logo-BfLGU5kY.js} +1 -1
  78. package/packages/ui/dist/assets/{search-CL2iyGid.js → search-BkrouRbM.js} +1 -1
  79. package/packages/ui/dist/assets/{secp256k1-DdqDRGog.js → secp256k1-DnPEOQhM.js} +1 -1
  80. package/packages/ui/dist/assets/{send-C_Rm4fzj.js → send-Bj15h9aG.js} +1 -1
  81. package/packages/ui/dist/assets/{swapHorizontal-0d_94RdY.js → swapHorizontal-DHL_fMHx.js} +1 -1
  82. package/packages/ui/dist/assets/{swapHorizontalBold-BukSRa8V.js → swapHorizontalBold-CZFfrlj9.js} +1 -1
  83. package/packages/ui/dist/assets/{swapHorizontalMedium-DvroDkEf.js → swapHorizontalMedium-BbRRKxwu.js} +1 -1
  84. package/packages/ui/dist/assets/{swapHorizontalRoundedBold-BAehcn9y.js → swapHorizontalRoundedBold-BCd9TFoe.js} +1 -1
  85. package/packages/ui/dist/assets/{swapVertical-kblIte_7.js → swapVertical-DUlxeXRd.js} +1 -1
  86. package/packages/ui/dist/assets/{telegram-DHLO89MI.js → telegram-Z7oqwOYs.js} +1 -1
  87. package/packages/ui/dist/assets/{three-dots-ctb5FHLw.js → three-dots-N_HHY4eF.js} +1 -1
  88. package/packages/ui/dist/assets/{twitch-CK_fCqNu.js → twitch-LHuomK7F.js} +1 -1
  89. package/packages/ui/dist/assets/{twitterIcon-BCngN3WD.js → twitterIcon-aqwTGFUp.js} +1 -1
  90. package/packages/ui/dist/assets/{verify-Dy-B59vy.js → verify-Dk65Ky3F.js} +1 -1
  91. package/packages/ui/dist/assets/{verify-filled-DHDHx8Lk.js → verify-filled-CYnRVU40.js} +1 -1
  92. package/packages/ui/dist/assets/{w3m-modal-DRNXP3Ww.js → w3m-modal-CIO-YdMF.js} +1 -1
  93. package/packages/ui/dist/assets/{wallet-DriPOF7d.js → wallet-NSBhLacz.js} +1 -1
  94. package/packages/ui/dist/assets/{wallet-placeholder-B4ukOjpR.js → wallet-placeholder-DZOTp3gD.js} +1 -1
  95. package/packages/ui/dist/assets/{walletconnect-Cjl1Ki75.js → walletconnect-T36vfDCB.js} +1 -1
  96. package/packages/ui/dist/assets/{warning-circle-C7eCTFhJ.js → warning-circle-D3dtMC5l.js} +1 -1
  97. package/packages/ui/dist/assets/{x-B8jYZY9t.js → x-wOYd1xe3.js} +1 -1
  98. package/packages/ui/dist/index.html +1 -1
  99. package/packages/ui/dist/assets/cursor-0ZcCqvYy.js +0 -3
  100. package/scripts/postinstall.js +0 -56
package/AGENTS.md CHANGED
@@ -28,16 +28,15 @@ Use the user-facing terms in all CLI output, prompts, and errors. The code ident
28
28
 
29
29
  ## Dispatch model
30
30
 
31
- Active kernels vary by chain verified on-chain via `DISPATCH_TYPEHASH()`:
31
+ All six chains share the same kernel at the same CREATE2 address, verified on-chain via `DISPATCH_TYPEHASH()`:
32
32
 
33
- | Chain | Kernel | Model | DISPATCH_TYPEHASH |
34
- |---|---|---|---|
35
- | Base 8453 | `0x6319d3dfDDe3804ba93D65752b00c52bFb05a1ab` | **selective** | `0xbe50c539...` |
36
- | Base Sepolia 84532 | `0xf1D0F4C9893612627409948BAa9d82a01a373799` | **selective** | `0xbe50c539...` |
37
- | Arbitrum 42161 | `0x2716B12832DED0EF5688519c5Fe069EFc0374E02` | **selective** | `0xbe50c539...` |
38
- | Unichain 130 | `0xD985029960a9B7C2E7E38e102C448b8b8539B156` | **selective** | `0xbe50c539...` |
33
+ | Kernel (all 6 chains) | Model | DISPATCH_TYPEHASH |
34
+ |---|---|---|
35
+ | `0x02ABC18B65A328de2e749F56ba79ACF2718a6659` | **selective** | `0xbe50c539...` |
36
+
37
+ Supported chains: Ethereum (1), Base (8453), Arbitrum (42161), Unichain (130), Base Sepolia (84532), Eth Sepolia (11155111).
39
38
 
40
- All four kernels are live and bootstrapped (genesis allowlist set, `createAccount` verified working, zero fees). Unichain (130) additionally has the full permission-template suite deployed and source-verified (7 shared + 12 standalone) it is the only chain with templates so far; the other three have core only. `packages/sdk/src/deployments.ts` is the canonical source of truth for kernel addresses, templates, and metadata.
39
+ All six kernels are live and bootstrapped (genesis allowlist set, `createAccount` verified working, zero fees). No templates are deployed against the current kernel on any chain yet`knownTemplates` and `standaloneTemplates` are empty for all six entries. `packages/sdk/src/deployments.ts` is the canonical source of truth for kernel addresses, templates, and metadata.
41
40
 
42
41
  **Always use `detectKernelCapabilities` for the real model** — it reads the on-chain typehash and
43
42
  overrides the static label in `deployments.ts`. The static label is a fallback for offline use only.
@@ -56,11 +55,11 @@ Pass the detected value — never hardcode the type shape.
56
55
 
57
56
  ## Active addresses
58
57
 
59
- All four chain records in `packages/sdk/src/deployments.ts` are live — no commented-out or pending
58
+ All six chain records in `packages/sdk/src/deployments.ts` are live — no commented-out or pending
60
59
  addresses remain. This file is the source of truth this guide mirrors.
61
60
 
62
61
  - `packages/sdk/src/deployments.ts` — `SailDeployment` records; canonical source of truth
63
- - `packages/chains/src/index.ts` — `ChainConfig` per chainId; kept in sync with deployments
62
+ - `packages/sdk/src/chains.ts` — `ChainConfig` per chainId; canonical per-chain registry
64
63
 
65
64
  ## Key files
66
65
 
@@ -78,10 +77,10 @@ addresses remain. This file is the source of truth this guide mirrors.
78
77
 
79
78
  ```bash
80
79
  pnpm install
81
- pnpm build # builds all packages; dependency order: sdk → chains → cli → ui
80
+ pnpm build # builds all packages; dependency order: sdk → cli → ui
82
81
  ```
83
82
 
84
- Build order matters — `cli` imports from `sdk` and `chains`.
83
+ Build order matters — `cli` imports from `sdk`.
85
84
 
86
85
  ## Test
87
86
 
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Sailor
2
2
 
3
- > A toolkit for building and operating Sail Protocol SMAs with AI agents.
3
+ > The operator toolkit for Sail Protocol — SDK, CLI, and local dashboard for building and running mandated agents.
4
4
 
5
- Sailor is the operator layer for [Sail Protocol](../SailProtocol): the tooling an agent builder uses to create a Separately Managed Account, bound it with permissions, and run a strategy against it. It wraps the on-chain primitives — SailKernel dispatch, MandateFactory registration, EIP-712 mandate signing behind a TypeScript SDK, a CLI, and a local dashboard. An agent is an async function that receives context and returns intended transactions; Sailor previews each through the kernel, executes the approved ones, and records what happened. It does not deploy the protocol or author new permission templates — that lives in Sail Protocol. It sits one level up: turning a deployed SailKernel into something an operator can actually drive.
5
+ Sailor is the off-chain operator layer for [Sail Protocol](https://github.com/sail-money/SailProtocol): the tooling an operator uses to create a Separately Managed Account, register a mandate, and run a strategy agent against it. It wraps SailKernel dispatch, MandateFactory registration, and EIP-712 mandate signing behind a TypeScript SDK, a CLI, and a local dashboard. It does not deploy the protocol or author permission templates — those live in Sail Protocol. It targets already-deployed SailKernel instances and gives operators the tooling to drive them.
6
6
 
7
7
  ---
8
8
 
@@ -10,38 +10,60 @@ Sailor is the operator layer for [Sail Protocol](../SailProtocol): the tooling a
10
10
 
11
11
  | Package | Name | Role |
12
12
  |---|---|---|
13
- | `packages/sdk` | `@sail/sdk` (internal) | TypeScript library: SailorClient, EIP-712 helpers, ABIs, chain registry |
13
+ | `packages/sdk` | `@sail.money/sdk` / `@sail.money/sailor/sdk` | TypeScript library: SailorClient, EIP-712 helpers, ABIs, deployment registry, chain registry |
14
14
  | `packages/cli` | `@sail.money/sailor` | CLI for account setup, mandate signing, and agent execution |
15
- | `packages/ui` | `sailor-ui` | Local dashboard running on localhost:3333 |
15
+ | `packages/ui` | `sailor-ui` | Local dashboard running at localhost:3333 |
16
16
  | `templates/default` | — | Default agent starter (neutral; what `sailor init` scaffolds) |
17
17
  | `templates/custom-mandate` | — | Solidity reference: IPermission scaffold (not a project template) |
18
18
  | `templates/lifi-permissions` | — | Solidity reference: LiFi clone permission contracts (not a project template) |
19
19
 
20
20
  ---
21
21
 
22
- ## How it works
23
-
24
- The path from nothing to a running agent is five stages, guided by your AI coding assistant through the scaffolded `AGENTS.md`:
25
-
26
- 1. **Deploy your SMA and create your agent wallet** — done in the browser. Your owner wallet never leaves it.
27
- 2. **Define your strategy** — describe what you want your agent to do. The assistant asks the right questions to establish on-chain bounds (tokens, amounts, venues), then helps design the permission contracts.
28
- 3. **Build, test, and sign your mandate** — the assistant authors the permission contracts, proves in plain English what each one permits and blocks, deploys them, and walks you through signing to authorize.
29
- 4. **Run** `sailor run` executes your agent locally on a schedule, or via the GitHub Actions workflow the scaffold provides.
30
- 5. **Extend** *(optional)* the assistant can wire notifications (Telegram, email) and build a custom dashboard tailored to your strategy.
22
+ ## Protocol model
23
+
24
+ ```mermaid
25
+ flowchart TD
26
+ Owner["**Owner**<br/>holds the Safe · signs the mandate"]
27
+ Manager["**Manager**<br/>agent · signs dispatches"]
28
+ SMA["**SMA**<br/>Safe · holds assets · executes"]
29
+ Mandate["**Mandate**<br/>set of permission contracts"]
30
+ Kernel["**Sail Kernel**<br/>evaluates permission · trusted core<br/>dispatches to Safe on success"]
31
+
32
+ Owner -- "01 deploys & owns" --> SMA
33
+ Owner -- "02 signs mandate (EIP-712)" --> Mandate
34
+ Owner -- "03 appoints · instant revocation" --> Manager
35
+ Manager -- "04 signs dispatch (EIP-712)" --> Kernel
36
+ Mandate -- "05 defines bounds" --> Kernel
37
+ Kernel -- "06 ✓ executes · ✗ outside mandate: reverts" --> SMA
38
+ ```
31
39
 
32
- Run `npx sailor init my-agent`, open the scaffolded folder in Claude Code, Cursor, Codex, or any AI coding assistant, and say **"start"**. The `AGENTS.md` in the project drives the assistant through all five stages.
40
+ Sailor is the operator tooling that drives the Manager/dispatch and mandate-registration flows (steps 02–05).
33
41
 
34
42
  ---
35
43
 
36
44
  ## Roles
37
45
 
38
- Sailor operates the three roles Sail Protocol separates:
46
+ Sail Protocol separates three authority roles. Sailor operates all of them:
39
47
 
40
48
  | Role | Authority | Held by |
41
49
  |---|---|---|
42
- | **Owner** | Holds the Safe. Custody anchor. | The LP (Safe owner) — same wallet as MetaMask |
43
- | **Permission Signer** | Signs mandate registration and revocation via EIP-712. | Same as Owner, or a separate key |
44
- | **Manager** | Executes dispatches within permitted bounds. Signs each dispatch. | The agent key — encrypted in `.sail/keys/manager.json` |
50
+ | **Owner** | Holds the Safe. Custody anchor. Always self-custodial. | The LP (Safe owner) |
51
+ | **Permission Signer** | Authorizes the mandate. Signs registration and revocation via EIP-712. | Same as Owner, or a separate signing key |
52
+ | **Manager** | Executes dispatches within mandate bounds. Signs each dispatch. | The agent wallet — encrypted in `.sail/keys/manager.json` |
53
+
54
+ ---
55
+
56
+ ## How it works
57
+
58
+ The path from nothing to a running agent follows the protocol lifecycle:
59
+
60
+ 1. **Deploy your SMA** — `sailor onboard --new-sma` creates the SMA on-chain. `sailor account predict` computes the deterministic address in advance. The same owner, permission signer, manager, and salt produce the same SMA address on every supported chain.
61
+ 2. **Author your permissions** — describe what the agent may do. Permission contracts encode the bounds: tokens, amounts, venues, call targets. Author them in the scaffolded Foundry workspace.
62
+ 3. **Simulate, deploy, and sign your mandate** — `sailor mandate simulate` probes a permission off-chain before authorizing it. `sailor mandate deploy --attach` deploys and registers it on-chain. `sailor mandate sign` builds and signs the registration payload against live on-chain state.
63
+ 4. **Run** — `sailor run` executes the agent locally on a schedule, or via the GitHub Actions workflow the scaffold provides.
64
+ 5. **Operate** — `sailor doctor` checks kernel health and gas balances; `sailor chains` lists supported chains and deployment addresses; `sailor session pause` instantly revokes dispatch rights without touching Safe custody.
65
+
66
+ Run `npx sailor init my-agent`, open the scaffolded folder in Claude Code, Cursor, or any AI coding assistant, and say **"start"**. The `AGENTS.md` in the project guides the assistant through all five stages.
45
67
 
46
68
  ---
47
69
 
@@ -49,13 +71,24 @@ Sailor operates the three roles Sail Protocol separates:
49
71
 
50
72
  ### Start a new agent project (recommended)
51
73
 
52
- Open your AI coding assistant and run in its terminal:
74
+ Create a folder, step into it, then install and init:
53
75
 
54
- ```sh
55
- npx sailor init my-agent
76
+ ```bash
77
+ # bash / zsh / macOS
78
+ mkdir my-agent && cd my-agent && npm i @sail.money/sailor && npx sailor init
56
79
  ```
57
80
 
58
- Then say **"start"** — your assistant takes it from there.
81
+ ```powershell
82
+ # PowerShell (Windows)
83
+ mkdir my-agent ; cd my-agent ; npm i @sail.money/sailor ; npx sailor init
84
+ ```
85
+
86
+ Then open the folder in your AI coding assistant and say **"start"**.
87
+
88
+ > **npx shortcut** — skips the explicit install; npm downloads sailor on the fly:
89
+ > ```sh
90
+ > mkdir my-agent && cd my-agent && npx sailor init
91
+ > ```
59
92
 
60
93
  ### Global CLI (for direct sailor commands)
61
94
 
@@ -71,31 +104,49 @@ sailor init my-agent
71
104
  Prerequisites:
72
105
 
73
106
  - Node.js 18+
74
- - A wallet (MetaMask or Rabby)
107
+ - A wallet (MetaMask, Rabby, Phantom, and more)
75
108
  - An RPC URL (e.g. Alchemy free tier)
76
- - A supported chain: **Base, Base Sepolia, Arbitrum, or Unichain** — verified deployments are bundled in `@sail.money/sailor`.
109
+ - A supported chain: **Ethereum, Base, Arbitrum, Unichain, Base Sepolia, or Eth Sepolia** — verified deployments are bundled in `@sail.money/sailor`.
77
110
 
78
111
  ### Recommended — assistant-driven
79
112
 
80
113
  ```bash
81
- npx sailor init my-agent && cd my-agent
82
- npm install
114
+ # bash / zsh / macOS
115
+ mkdir my-agent && cd my-agent && npm i @sail.money/sailor && npx sailor init && npm install
83
116
  ```
84
117
 
85
- Open this folder in Claude Code, Cursor, Codex, or any AI coding assistant and say **"start"**. The scaffolded `AGENTS.md` guides the assistant through all five stages — SMA deployment, strategy definition, mandate authoring, running, and automation. No manual steps required.
118
+ ```powershell
119
+ # PowerShell (Windows)
120
+ mkdir my-agent ; cd my-agent ; npm i @sail.money/sailor ; npx sailor init ; npm install
121
+ ```
86
122
 
87
- ### Direct CLI reference (advanced)
123
+ Open this folder in Claude Code, Cursor, Codex, or any AI coding assistant and say **"start"**. The scaffolded `AGENTS.md` guides the assistant through all five stages — SMA deployment, strategy definition, mandate authoring, running, and automation. No manual steps required.
88
124
 
89
- For users who prefer the terminal:
125
+ ### Direct CLI reference
90
126
 
91
127
  ```bash
92
- sailor capabilities # what you can build on this chain — read-only, no gas
93
- sailor doctor # kernel model + RPC reachability + gas balances
94
- sailor ui start # open http://localhost:3333 to deploy SMA + create agent wallet
95
- sailor run --once # single tick confirm it works before automating
96
- sailor run # start the agent (continuous)
97
- sailor keys export-ci # copy the encrypted agent wallet to ci-keystore.json for CI commits
98
- sailor mandate sign # sign a mandate reconciles against live on-chain permissions first
128
+ # Discovery
129
+ sailor chains # list supported chains and kernel addresses
130
+ sailor capabilities # what you can build on this chain read-only, no gas
131
+ sailor doctor # kernel model + RPC reachability + gas balances
132
+
133
+ # SMA setup
134
+ sailor account predict # compute deterministic SMA address before deploying
135
+ sailor onboard --new-sma # deploy SMA and optionally attach a mandate
136
+
137
+ # Mandate lifecycle
138
+ sailor mandate simulate # probe a permission off-chain (no gas) before registering
139
+ sailor mandate sign # sign the mandate — reconciles against live on-chain state
140
+ sailor mandate deploy # deploy a Foundry-compiled permission contract
141
+ sailor mandate attach # register an already-deployed permission on an SMA
142
+
143
+ # Agent operation
144
+ sailor run --once # single tick — confirm it works before automating
145
+ sailor run # start the agent (continuous)
146
+ sailor keys export-ci # copy encrypted agent wallet to ci-keystore.json for CI
147
+
148
+ # Dashboard
149
+ sailor ui start # open http://localhost:3333
99
150
  ```
100
151
 
101
152
  `sailor run` writes reverted transactions to stderr as `reverted: <txHash> (gas used: N)`; successful dispatches are appended to `.sail/activity.jsonl`.
@@ -186,19 +237,19 @@ sailor ui stop
186
237
 
187
238
  ## Agent-driven onboarding & custom mandates
188
239
 
189
- For chains with a bundled Sail deployment (Base, Base Sepolia, Arbitrum, Unichain), an agent can drive the whole
190
- setup through a browser **signing station**. The station is a local HTTP +
191
- WebSocket daemon that bridges the CLI and the owner's wallet: the agent never
192
- holds the owner key — it pushes signing requests, the owner approves them in the
193
- browser, and the agent submits the transactions it's allowed to.
240
+ On any of the six supported chains, an agent can drive the whole setup through
241
+ a browser **signing station**. The station is a local HTTP + WebSocket daemon
242
+ that bridges the CLI and the owner's wallet: the agent never holds the owner
243
+ key — it pushes signing requests, the owner approves them in the browser, and
244
+ the agent submits the transactions it's allowed to.
194
245
 
195
246
  ```bash
196
- sailor keys generate # manager (agent) key
197
- sailor station start & # signing daemon (serves the UI)
247
+ sailor keys generate # create the manager (agent) key
248
+ sailor station start & # signing daemon (serves the UI)
198
249
  # owner opens the printed URL once and connects their wallet
199
- sailor owner connect # detect & persist the owner
200
- sailor scan # discover the owner's Safes + state
201
- sailor onboard --new-sma # create an SMA + (optionally) attach a mandate
250
+ sailor owner connect # detect & persist the owner
251
+ sailor scan # discover the owner's Safes + state
252
+ sailor onboard --new-sma # create an SMA + (optionally) attach a mandate
202
253
  ```
203
254
 
204
255
  Agents author their own permission contracts and deploy them from the scaffolded
@@ -258,14 +309,16 @@ The SDK is available as a subpath export for use in agent code:
258
309
  import type { Agent, AgentContext, Dispatch } from '@sail.money/sailor/sdk'
259
310
  ```
260
311
 
312
+ The SDK is also published separately as `@sail.money/sdk` for projects that consume it independently of the CLI.
313
+
261
314
  ### npm (`publish-npm.yml`)
262
315
 
263
316
  Published to the public npm registry under the `@sail.money` scope.
264
317
 
265
318
  | Trigger | Package | Version | dist-tag |
266
319
  |---|---|---|---|
267
- | Tag push (`v*`) | `@sail.money/sailor` | `1.0.0` | `latest` |
268
- | Manual dispatch | `@dev.sail.money/sailor` | `1.0.0-42` | `dev` |
320
+ | Tag push (`v*`) | `@sail.money/sailor` | `0.1.0` | `latest` |
321
+ | Manual dispatch | `@dev.sail.money/sailor` | `0.1.0-42` | `dev` |
269
322
 
270
323
  ```bash
271
324
  npm install @sail.money/sailor # latest stable (tag push)
@@ -313,36 +366,6 @@ Either way, `@sail.money/sailor/sdk` imports work unchanged.
313
366
 
314
367
  ---
315
368
 
316
- ## Architecture
317
-
318
- ```
319
- ┌────────────────────┐ ┌────────────────────┐
320
- │ Permission Signer │ │ Manager/Agent │
321
- │ MetaMask / local │ │ .sail/keys/manager │
322
- └─────────┬──────────┘ └─────────┬──────────┘
323
- │ │
324
- │ EIP-712 mandate │ dispatch
325
- ▼ ▼
326
- ┌─────────────────────────────────────────────────────────────────────┐
327
- │ SailKernel │
328
- │ (Sail Protocol) │
329
- └─────────┬───────────────────────┬───────────────────────┬───────────┘
330
- │ │ │
331
- │ registration │ execution │ evaluation
332
- ▼ ▼ ▼
333
- ┌────────────────────┐ ┌────────────────────┐ ┌────────────────────┐
334
- │ MandateFactory │ │ Safe │ │ Permissions │
335
- │ (register perms) │ │ (custody) │ │ (named, per-call) │
336
- └────────────────────┘ └────────────────────┘ └────────────────────┘
337
-
338
- sailor CLI / @sail.money/sailor/sdk drive both signing paths above.
339
- .sail/ (account · mandate · activity) ──→ sailor-ui (localhost:3333)
340
- ```
341
-
342
- The CLI and SDK sit between the operator and SailKernel: they build the EIP-712 payloads, submit dispatches, and read kernel state via viem. The permission signer authorizes the mandate — registration runs through MandateFactory — while the manager key signs each dispatch the kernel evaluates against a named permission before executing it through the Safe. All local state — the deployed account, the signed mandate, and the agent's activity log — lives under `.sail/` on disk, which the dashboard reads through a small local server. Sailor never holds the Owner key and runs no hosted backend; the wallet talks to the chain directly.
343
-
344
- ---
345
-
346
369
  ## Security model
347
370
 
348
371
  - The agent signs dispatches; the kernel evaluates the named permission on every call. A permission returning false or exceeding its gas cap is treated as denial — fail-closed.
@@ -355,67 +378,42 @@ The CLI and SDK sit between the operator and SailKernel: they build the EIP-712
355
378
 
356
379
  ## State of the project
357
380
 
358
- Sailor is functional and published as [`@sail.money/sailor`](https://www.npmjs.com/package/@sail.money/sailor) on npm (v0.0.1). The SDK, CLI, keystore, mandate flows, agent runner, and dashboard are implemented and have been exercised end to end against Base Sepolia.
381
+ Sailor is functional and published as [`@sail.money/sailor`](https://www.npmjs.com/package/@sail.money/sailor) on npm (v0.1.0). The SDK, CLI, keystore, mandate flows, agent runner, and dashboard are implemented and have been exercised end to end.
382
+
383
+ The Sail Protocol trusted core is deployed on six chains — Ethereum, Base, Arbitrum, Unichain, Base Sepolia, and Eth Sepolia — via CREATE2, with every core contract at the same address on every chain. All six run the selective dispatch model with zero fees and are bootstrapped with a genesis allowlist so `createAccount` is usable immediately. These deployments are under an ongoing external audit by [Octane Security](https://octane.security) and are not final — do not use them with funds you are not prepared to lose.
359
384
 
360
- The Sail Protocol trusted core is deployed on Base, Base Sepolia, Arbitrum, and Unichain as staging deployments for testing ahead of a formal launch. All four run the selective dispatch model, with verified deployments bundled in `@sail.money/sailor`. These deployments are under an ongoing external audit by [Octane Security](https://octane.security) and are not final — do not use them with funds you are not prepared to lose. Permission templates are not yet deployed against the Base, Arbitrum, and Base Sepolia kernels; **Unichain** ships the full template suite (7 shared + 12 standalone, source-verified) and its template registries are populated. The remaining template registries will be filled in as templates are deployed on the other chains and at mainnet launch.
385
+ Permission templates have not yet been deployed against the current kernel on any chain; `knownTemplates` and `standaloneTemplates` are empty for all six chains in `packages/sdk/src/deployments.ts` and will be populated as templates are deployed and verified against the new kernel.
361
386
 
362
387
  ---
363
388
 
364
389
  ## Deployments
365
390
 
366
- The Sail Protocol trusted core is live on the following chains as **staging deployments** ahead of a formal launch. All addresses are bundled in `@sail.money/sailor` and run the selective dispatch model with zero fees. Permission templates are not yet deployed against the Base, Arbitrum, and Base Sepolia kernels; **Unichain** ships the full template suite (7 shared + 12 standalone, source-verified on uniscan.xyz) and has its onboarding allowlists seeded at genesis.
367
-
368
- ### Base (8453)
369
-
370
- | Contract | Address |
371
- |---|---|
372
- | SailKernel | `0x6319d3dfDDe3804ba93D65752b00c52bFb05a1ab` |
373
- | SailGovernance | `0x7E897D919872b1587577617ffFC42113679d0C50` |
374
- | Timelock | `0x8eC3Ca951E193C6E3713A70022454d7A1f083281` |
375
- | PermissionFactory | `0x7724EACd97C8601d5AC244Aadbf76ad87353Ff31` |
376
- | StandardFeePolicy | `0x65850a8D5050aeAade68289ff96c4F119a24B82e` |
377
- | SafeModuleEnabler | `0xC84EdE78f93291A1fab19F51c4c7e938AB302Edf` |
378
- | Treasury | `0xB01dCE443d052e44b7D13726c0EC9fFB7f5815B6` |
379
-
380
- ### Arbitrum (42161)
381
-
382
- | Contract | Address |
383
- |---|---|
384
- | SailKernel | `0x2716B12832DED0EF5688519c5Fe069EFc0374E02` |
385
- | SailGovernance | `0xd6AbB7A1036ADc7958Abffec9Da03450c5a2Ec8e` |
386
- | Timelock | `0x114CB7110C780f7E3a6093AfE0B52463a569857C` |
387
- | PermissionFactory | `0x23681A8A4C9819D8EaB37E46B858da6F3c85E683` |
388
- | StandardFeePolicy | `0xAdfB986D48480bC67a7cF3751d30599161632e0D` |
389
- | SafeModuleEnabler | `0xabe2a6D03F592BC602cA1dBDCD885ba2493274f9` |
390
- | Treasury | `0xB01dCE443d052e44b7D13726c0EC9fFB7f5815B6` |
391
+ All core contracts are deployed at the same address on every supported chain via CREATE2 (commit `1199b33`, 2026-06-09). An SMA created with the same owner, permission signer, manager, fee policy, and salt has the same address on every supported chain.
391
392
 
392
- ### Base Sepolia (84532)
393
+ ### Core addresses (identical on all 6 chains)
393
394
 
394
395
  | Contract | Address |
395
396
  |---|---|
396
- | SailKernel | `0xf1D0F4C9893612627409948BAa9d82a01a373799` |
397
- | SailGovernance | `0xEaD44bC6999E7b00b9b2E11c1660248DC2a30993` |
398
- | Timelock | `0x97B863e392C9859336788D5Ec454527d33C95B74` |
399
- | PermissionFactory | `0xdfF6a2272F667cDf78Af4681b9c88A219998db95` |
400
- | StandardFeePolicy | `0x05570F7973b46Eb9Ed4518422891EFC26BD58b97` |
401
- | SafeModuleEnabler | `0xB2C2B52d94412e3472C9fb2B52186eA12a935869` |
397
+ | SailKernel | `0x02ABC18B65A328de2e749F56ba79ACF2718a6659` |
398
+ | SailGovernance | `0x7A478118715791728BDE3bc7A4D7ECfdEB89C6EC` |
399
+ | TimelockController | `0xE48Ba8DB6d748adafD13155c3590f62e58a77f56` |
400
+ | MandateFactory | `0x14EDd6c2a56EfC0d71E215ab13094B9AF90543d2` |
401
+ | StandardFeePolicy | `0xe7B5901b839cFFDEd9D4108A22712C8BfdA1D80D` |
402
+ | SafeModuleEnabler | `0x7897Cb53a4be4a2eaAf46D60573C4Fd83b33fE1F` |
402
403
  | Treasury | `0xB01dCE443d052e44b7D13726c0EC9fFB7f5815B6` |
403
404
 
404
- ### Unichain (130)
405
+ These addresses are bundled in `@sail.money/sailor` and exposed via `getSailDeployment(chainId)` in the SDK. The Protocol repository is the canonical source of truth for deployment details — see [deployments/addresses.md](https://github.com/sail-money/Protocol/blob/main/deployments/addresses.md).
405
406
 
406
- First chain to ship the full permission-template suite (7 shared + 12 standalone, source-verified on [uniscan.xyz](https://uniscan.xyz)). Genesis allowlist bootstrap — onboarding usable without the 48h timelock.
407
+ ### Supported chains
407
408
 
408
- | Contract | Address |
409
+ | Chain | Chain ID |
409
410
  |---|---|
410
- | SailKernel | `0xD985029960a9B7C2E7E38e102C448b8b8539B156` |
411
- | SailGovernance | `0xAb5C90ECfF2763f6f20f8E553E3b8778dD9C349A` |
412
- | Timelock | `0xd44FbBB37f01e235E0EE5386948F216d36D0CEf2` |
413
- | PermissionFactory | `0x8edDb62Aa49CeB837abf2653be2d93Ad9Fe6777D` |
414
- | StandardFeePolicy | `0x7bBA8BE3c01c972757aA4a230A00D58aB600A1F1` |
415
- | SafeModuleEnabler | `0xFE9227A9F2baf704060c604466df354a5A137b9B` |
416
- | Treasury | `0xB01dCE443d052e44b7D13726c0EC9fFB7f5815B6` |
417
-
418
- The 19 template addresses are in `packages/sdk/src/deployments.ts` (`knownTemplates` + `standaloneTemplates` for chain 130).
411
+ | Ethereum | 1 |
412
+ | Base | 8453 |
413
+ | Arbitrum | 42161 |
414
+ | Unichain | 130 |
415
+ | Base Sepolia | 84532 |
416
+ | Eth Sepolia | 11155111 |
419
417
 
420
418
  ---
421
419
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev.sail.money/sailor",
3
- "version": "0.0.2-31",
3
+ "version": "0.0.2-35",
4
4
  "description": "Operator toolkit for Sail Protocol",
5
5
  "bin": {
6
6
  "sailor": "packages/cli/dist/index.cjs"
@@ -28,7 +28,6 @@
28
28
  "test": "pnpm --filter sailor-ui test",
29
29
  "test:ui": "pnpm --filter sailor-ui test:ui",
30
30
  "link:cli": "pnpm link --global",
31
- "postinstall": "node scripts/postinstall.js",
32
31
  "typecheck": "pnpm --filter @sail/sdk build && pnpm -r typecheck",
33
32
  "docs:check": "node scripts/check-docs.mjs",
34
33
  "init:check": "node scripts/check-init.mjs",