@dev.sail.money/sailor 0.0.2 → 0.1.0-local
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.
- package/AGENTS.md +140 -111
- package/LICENSE +21 -21
- package/README.md +430 -337
- package/docs/PERMISSION_MODEL.md +93 -93
- package/examples/permissions/BoundedApproveAndCallBatch.sol +179 -0
- package/examples/permissions/BoundedBet_Limitless_Base.sol +97 -96
- package/examples/permissions/BoundedBorrow_AaveV3_Arbitrum.sol +94 -94
- package/examples/permissions/BoundedPerp_GMXv2_Arbitrum.sol +154 -143
- package/examples/permissions/BoundedStake_Venice_Base.sol +85 -0
- package/examples/permissions/BoundedSupply_AaveV3_Arbitrum.sol +82 -0
- package/examples/permissions/BoundedSwap_UniswapV3_Base.sol +116 -113
- package/examples/permissions/BoundedSwap_UniswapV4_Unichain.sol +150 -144
- package/examples/permissions/BoundedTransfer_ERC20_Ethereum.sol +73 -73
- package/examples/permissions/BoundedVault_ERC4626_Base.sol +97 -0
- package/examples/permissions/README.md +79 -52
- package/examples/permissions/SailCalldata.sol +118 -0
- package/examples/permissions/foundry.toml +10 -10
- package/examples/permissions/interfaces/IBatchPermission.sol +38 -0
- package/examples/permissions/interfaces/IPermission.sol +18 -18
- package/package.json +45 -39
- package/packages/cli/README.md +34 -34
- package/packages/cli/dist/index.cjs +4571 -2944
- package/packages/cli/dist/server.cjs +1252 -2010
- package/packages/sdk/README.md +65 -65
- package/packages/sdk/dist/chains.d.ts +12 -0
- package/packages/sdk/dist/chains.d.ts.map +1 -0
- package/packages/sdk/dist/chains.js +94 -0
- package/packages/sdk/dist/chains.js.map +1 -0
- package/packages/sdk/dist/deployments.d.ts +14 -7
- package/packages/sdk/dist/deployments.d.ts.map +1 -1
- package/packages/sdk/dist/deployments.js +132 -141
- package/packages/sdk/dist/deployments.js.map +1 -1
- package/packages/sdk/dist/index.d.ts +3 -2
- package/packages/sdk/dist/index.d.ts.map +1 -1
- package/packages/sdk/dist/index.js +3 -2
- package/packages/sdk/dist/index.js.map +1 -1
- package/packages/sdk/dist/intelligence.d.ts +1 -1
- package/packages/sdk/dist/intelligence.js +1 -1
- package/packages/sdk/dist/lifi.d.ts +17 -0
- package/packages/sdk/dist/lifi.d.ts.map +1 -1
- package/packages/sdk/dist/lifi.js +24 -0
- package/packages/sdk/dist/lifi.js.map +1 -1
- package/packages/sdk/dist/safe.d.ts +83 -0
- package/packages/sdk/dist/safe.d.ts.map +1 -1
- package/packages/sdk/dist/safe.js +92 -1
- package/packages/sdk/dist/safe.js.map +1 -1
- package/packages/sdk/dist/templates/ammLiquidity.d.ts +24 -11
- package/packages/sdk/dist/templates/ammLiquidity.d.ts.map +1 -1
- package/packages/sdk/dist/templates/ammLiquidity.js +39 -31
- package/packages/sdk/dist/templates/ammLiquidity.js.map +1 -1
- package/packages/sdk/dist/templates/approveAndCallBatch.d.ts +24 -10
- package/packages/sdk/dist/templates/approveAndCallBatch.d.ts.map +1 -1
- package/packages/sdk/dist/templates/approveAndCallBatch.js +36 -23
- package/packages/sdk/dist/templates/approveAndCallBatch.js.map +1 -1
- package/packages/sdk/dist/templates/boundedBorrow.d.ts +19 -9
- package/packages/sdk/dist/templates/boundedBorrow.d.ts.map +1 -1
- package/packages/sdk/dist/templates/boundedBorrow.js +28 -19
- package/packages/sdk/dist/templates/boundedBorrow.js.map +1 -1
- package/packages/sdk/dist/templates/boundedSwap.d.ts +19 -9
- package/packages/sdk/dist/templates/boundedSwap.d.ts.map +1 -1
- package/packages/sdk/dist/templates/boundedSwap.js +30 -20
- package/packages/sdk/dist/templates/boundedSwap.js.map +1 -1
- package/packages/sdk/dist/templates/defiBundle.d.ts +35 -9
- package/packages/sdk/dist/templates/defiBundle.d.ts.map +1 -1
- package/packages/sdk/dist/templates/defiBundle.js +84 -22
- package/packages/sdk/dist/templates/defiBundle.js.map +1 -1
- package/packages/sdk/dist/templates/pendle.d.ts +23 -8
- package/packages/sdk/dist/templates/pendle.d.ts.map +1 -1
- package/packages/sdk/dist/templates/pendle.js +34 -14
- package/packages/sdk/dist/templates/pendle.js.map +1 -1
- package/packages/sdk/dist/templates/transferTarget.d.ts +11 -3
- package/packages/sdk/dist/templates/transferTarget.d.ts.map +1 -1
- package/packages/sdk/dist/templates/transferTarget.js +14 -7
- package/packages/sdk/dist/templates/transferTarget.js.map +1 -1
- package/packages/sdk/dist/types.d.ts +19 -1
- package/packages/sdk/dist/types.d.ts.map +1 -1
- package/packages/sdk/package.json +80 -52
- package/packages/ui/dist/assets/{add-DaJhwIBV.js → add-BxpXfVWe.js} +1 -1
- package/packages/ui/dist/assets/{all-wallets-BUxsqWXi.js → all-wallets-BKTn_sWK.js} +1 -1
- package/packages/ui/dist/assets/{app-store-DkltwTqE.js → app-store-CfuKbwxR.js} +1 -1
- package/packages/ui/dist/assets/{apple-owVOeaIT.js → apple-BKSBbNYg.js} +1 -1
- package/packages/ui/dist/assets/{arrow-bottom-D2mmNJve.js → arrow-bottom-D4bG6gZi.js} +1 -1
- package/packages/ui/dist/assets/{arrow-bottom-circle-CbNYijx-.js → arrow-bottom-circle-BNTs1p0T.js} +1 -1
- package/packages/ui/dist/assets/{arrow-left-DJB61s4C.js → arrow-left-2uee3vYv.js} +1 -1
- package/packages/ui/dist/assets/{arrow-right-BBrsQ9R4.js → arrow-right-BktjMV6h.js} +1 -1
- package/packages/ui/dist/assets/{arrow-top-Cil6bOc8.js → arrow-top-Izu28fX4.js} +1 -1
- package/packages/ui/dist/assets/{bank-CbwEmRo3.js → bank-USBaAyFM.js} +1 -1
- package/packages/ui/dist/assets/{basic-CLNfjw3m.js → basic-C_9KjTEH.js} +1 -1
- package/packages/ui/dist/assets/{browser-B5TtF4Pb.js → browser-DAEMAKV7.js} +1 -1
- package/packages/ui/dist/assets/{card-CO7BVB-C.js → card-DT8yDkKN.js} +1 -1
- package/packages/ui/dist/assets/{ccip-2W7K3_J3.js → ccip-CkqfGSxX.js} +1 -1
- package/packages/ui/dist/assets/{checkmark-BEtSHq9m.js → checkmark-CsgdEXFj.js} +1 -1
- package/packages/ui/dist/assets/{checkmark-bold-D9xGHzPE.js → checkmark-bold-D2gjOQo2.js} +1 -1
- package/packages/ui/dist/assets/{chevron-bottom-BDztht6i.js → chevron-bottom-tprFynYV.js} +1 -1
- package/packages/ui/dist/assets/{chevron-left-EV4GFNbc.js → chevron-left-D2Zj1gNB.js} +1 -1
- package/packages/ui/dist/assets/{chevron-right-B4_bB9oR.js → chevron-right-D1rRuAVe.js} +1 -1
- package/packages/ui/dist/assets/{chevron-top-D54xPNzF.js → chevron-top-24dL1mbL.js} +1 -1
- package/packages/ui/dist/assets/{chrome-store-DYUpAJJq.js → chrome-store-Vy-5niYX.js} +1 -1
- package/packages/ui/dist/assets/{clock-Ca1T1Soz.js → clock-qBjLnVdJ.js} +1 -1
- package/packages/ui/dist/assets/{close-BZqWjurK.js → close-DARDwgcu.js} +1 -1
- package/packages/ui/dist/assets/{coinPlaceholder-e6fl2XDo.js → coinPlaceholder-BvpIbPlD.js} +1 -1
- package/packages/ui/dist/assets/{compass-DCLC7zIh.js → compass-BMTO0ayt.js} +1 -1
- package/packages/ui/dist/assets/{copy-Th2AaD-O.js → copy-PaXeRHza.js} +1 -1
- package/packages/ui/dist/assets/{core-Ckx_cyuH.js → core-BFnStQd-.js} +3 -3
- package/packages/ui/dist/assets/cursor-BDvw-B17.js +3 -0
- package/packages/ui/dist/assets/{cursor-transparent-BKHeABKB.js → cursor-transparent-BEMdi-8q.js} +1 -1
- package/packages/ui/dist/assets/{desktop-CBjY8t6F.js → desktop-CfuLLThw.js} +1 -1
- package/packages/ui/dist/assets/{disconnect-DbSs2cli.js → disconnect-DhwgJMiR.js} +1 -1
- package/packages/ui/dist/assets/{discord-ZlLOAUkM.js → discord-po8qoN1s.js} +1 -1
- package/packages/ui/dist/assets/{etherscan-CKUrqWYN.js → etherscan-BEsz0_yx.js} +1 -1
- package/packages/ui/dist/assets/{events-CiKP71cK.js → events-Bz33Unzu.js} +1 -1
- package/packages/ui/dist/assets/{exclamation-triangle-DA1QzFiO.js → exclamation-triangle-7CjTAGOQ.js} +1 -1
- package/packages/ui/dist/assets/{extension-BVJkmvpJ.js → extension-CmxjEWEt.js} +1 -1
- package/packages/ui/dist/assets/{external-link-D_bsR7B2.js → external-link-CmQ--bNS.js} +1 -1
- package/packages/ui/dist/assets/{facebook-CmFmhojx.js → facebook-CIBn9b65.js} +1 -1
- package/packages/ui/dist/assets/{fallback-Ofl6uSnB.js → fallback-DATyrQlb.js} +1 -1
- package/packages/ui/dist/assets/{farcaster-Co-M3Ss8.js → farcaster-OJ3Jasxg.js} +1 -1
- package/packages/ui/dist/assets/{filters-B1WwNaFU.js → filters-D4x09zeL.js} +1 -1
- package/packages/ui/dist/assets/{github-CP4fP6gn.js → github-ZlIuMArp.js} +1 -1
- package/packages/ui/dist/assets/{google-CsOIXJ6V.js → google-Gwg85sfv.js} +1 -1
- package/packages/ui/dist/assets/{help-circle-DiMkomdF.js → help-circle-D1uOWYcX.js} +1 -1
- package/packages/ui/dist/assets/{id-lmscL5LX.js → id-C0-5UdYk.js} +1 -1
- package/packages/ui/dist/assets/{image-B-ubJrY5.js → image-D_DUsv8-.js} +1 -1
- package/packages/ui/dist/assets/{index-CZR1Qjhs.js → index-BCzex_R6.js} +1 -1
- package/packages/ui/dist/assets/index-BUhrHLpY.js +1775 -0
- package/packages/ui/dist/assets/index-Cq02kQmy.css +1 -0
- package/packages/ui/dist/assets/{index-BaukYv-x.js → index-CrYzBWfD.js} +1 -1
- package/packages/ui/dist/assets/{index-CF0KMmke.js → index-DdbJhIdl.js} +3 -3
- package/packages/ui/dist/assets/{index-DVgfCzCo.js → index-DiojfeVM.js} +1 -1
- package/packages/ui/dist/assets/{index-Dbh5V1Z0.js → index-izd7vu_r.js} +1 -1
- package/packages/ui/dist/assets/{index.es-C78cE5SI.js → index.es-DdkHhQAj.js} +4 -4
- package/packages/ui/dist/assets/{info-Cqg57EVo.js → info-CiRd_kEG.js} +1 -1
- package/packages/ui/dist/assets/{info-circle-DkeSWNKV.js → info-circle-ypxjqarK.js} +1 -1
- package/packages/ui/dist/assets/{lightbulb-DNlO4qKh.js → lightbulb-B-pxLxd8.js} +1 -1
- package/packages/ui/dist/assets/{mail-kVQ8Jb9Y.js → mail-BYmicuVZ.js} +1 -1
- package/packages/ui/dist/assets/{metamask-sdk-CBalSvz7.js → metamask-sdk-Ccl6DG7Q.js} +1 -1
- package/packages/ui/dist/assets/{mobile-BEteuhF7.js → mobile-CtP5PqVT.js} +1 -1
- package/packages/ui/dist/assets/{more-DBWmXQli.js → more-6C2733we.js} +1 -1
- package/packages/ui/dist/assets/{network-placeholder-Dg1uUHiL.js → network-placeholder-CdhxMzqd.js} +1 -1
- package/packages/ui/dist/assets/{nftPlaceholder-i3AHSiD9.js → nftPlaceholder-DVmTWEAY.js} +1 -1
- package/packages/ui/dist/assets/{off-BtMm0fi2.js → off-DNYLughs.js} +1 -1
- package/packages/ui/dist/assets/{parseSignature-Cb5FlWWg.js → parseSignature-Dq2B5Bu3.js} +1 -1
- package/packages/ui/dist/assets/{play-store-iKKkXa6a.js → play-store-D7Qut5ta.js} +1 -1
- package/packages/ui/dist/assets/{plus-CA5NaRtb.js → plus-kqMyjt3q.js} +1 -1
- package/packages/ui/dist/assets/{qr-code-D2kiqR7h.js → qr-code-DiUCWRbz.js} +1 -1
- package/packages/ui/dist/assets/{recycle-horizontal-Dcme7R03.js → recycle-horizontal-Boe3XiS-.js} +1 -1
- package/packages/ui/dist/assets/{refresh-Dega3sDp.js → refresh-CrBgBQYO.js} +1 -1
- package/packages/ui/dist/assets/{reown-logo-xNkksyWJ.js → reown-logo-CFZCCHSx.js} +1 -1
- package/packages/ui/dist/assets/{search-HYl7NO8x.js → search-ChTDrghU.js} +1 -1
- package/packages/ui/dist/assets/{secp256k1-Cxd6_SiH.js → secp256k1-DAV5Q_FR.js} +1 -1
- package/packages/ui/dist/assets/{send-CJU8CUAo.js → send-DLFbBFe1.js} +1 -1
- package/packages/ui/dist/assets/{swapHorizontal-IMUKiUre.js → swapHorizontal-BEs3emfG.js} +1 -1
- package/packages/ui/dist/assets/{swapHorizontalBold-CNYnNJ9-.js → swapHorizontalBold-CC-Hfa7W.js} +1 -1
- package/packages/ui/dist/assets/{swapHorizontalMedium-B9VxEYsT.js → swapHorizontalMedium-BmR0H8DC.js} +1 -1
- package/packages/ui/dist/assets/{swapHorizontalRoundedBold-Dz33l_Jh.js → swapHorizontalRoundedBold-BdP5NGIH.js} +1 -1
- package/packages/ui/dist/assets/{swapVertical-CHUmjVJ0.js → swapVertical-CPrGEJPY.js} +1 -1
- package/packages/ui/dist/assets/{telegram-kl9S2mbU.js → telegram-CxNoZ80Q.js} +1 -1
- package/packages/ui/dist/assets/{three-dots-U5lhA1Am.js → three-dots-BRa6SBpL.js} +1 -1
- package/packages/ui/dist/assets/{twitch-KTEUWXEp.js → twitch-BC338bG5.js} +1 -1
- package/packages/ui/dist/assets/{twitterIcon-BHiq8mRg.js → twitterIcon-BGZmt2i9.js} +1 -1
- package/packages/ui/dist/assets/{verify-CfN-BXNd.js → verify-CEstW0zw.js} +1 -1
- package/packages/ui/dist/assets/{verify-filled-DwZccetj.js → verify-filled-OkZb0weU.js} +1 -1
- package/packages/ui/dist/assets/{w3m-modal-CS-PFqPE.js → w3m-modal-pS09ECwE.js} +1 -1
- package/packages/ui/dist/assets/{wallet-DVlGkhOY.js → wallet-BXVKCgC9.js} +1 -1
- package/packages/ui/dist/assets/{wallet-placeholder-CvR_iEWX.js → wallet-placeholder-C_kNhB1c.js} +1 -1
- package/packages/ui/dist/assets/{walletconnect-8pZBDvVI.js → walletconnect-CRKIuUHH.js} +1 -1
- package/packages/ui/dist/assets/{warning-circle-ylLEE0Yp.js → warning-circle-DB2NnwlJ.js} +1 -1
- package/packages/ui/dist/assets/{x-C_TBsTMj.js → x-DT4RmwL5.js} +1 -1
- package/packages/ui/dist/index.html +14 -14
- package/scripts/check-docs.mjs +262 -262
- package/scripts/check-init.mjs +108 -109
- package/scripts/postinstall.js +81 -366
- package/templates/custom-mandate/.sail/contracts/interfaces/IPermission.sol +18 -18
- package/templates/custom-mandate/README.md +116 -85
- package/templates/custom-mandate/foundry.toml +8 -8
- package/templates/custom-mandate/mandates/BoundedCallPermission.sol +41 -35
- package/templates/custom-mandate/mandates/README.md +16 -16
- package/templates/custom-mandate/mandates/SailCalldata.sol +118 -0
- package/templates/{dca-rebalancer → default}/.cursor/rules +25 -25
- package/templates/default/.env.example +20 -0
- package/templates/{dca-rebalancer → default}/.github/workflows/agent-tick.yml +33 -32
- package/templates/{dca-rebalancer → default}/.sail/README.md +13 -13
- package/templates/{dca-rebalancer → default}/.sail/config.json +10 -10
- package/templates/default/AGENTS.md +171 -0
- package/templates/{dca-rebalancer → default}/CLAUDE.md +2 -2
- package/templates/default/README.md +16 -0
- package/templates/{dca-rebalancer → default}/_gitignore +13 -13
- package/templates/{dca-rebalancer → default}/docs/PERMISSION_MODEL.md +93 -93
- package/templates/default/examples/dca/README.md +16 -0
- package/templates/default/examples/dca/agent.ts +174 -0
- package/templates/{dca-rebalancer/src → default/examples/dca}/mandate.ts +45 -67
- package/templates/{dca-rebalancer → default}/package.json +17 -17
- package/templates/default/src/agent.ts +37 -0
- package/templates/default/src/config.ts +24 -0
- package/templates/default/src/mandate.ts +22 -0
- package/templates/default/tsconfig.json +17 -0
- package/templates/{dca-rebalancer → default}/ui/README.md +3 -3
- package/templates/lifi-permissions/LifiBoundedApprovePermissionCloneable.sol +84 -84
- package/templates/lifi-permissions/LifiDiamondSwapPermissionCloneable.sol +97 -97
- package/templates/lifi-permissions/README.md +53 -53
- package/packages/ui/dist/assets/cursor-DV7rOqbJ.js +0 -3
- package/packages/ui/dist/assets/index-CKxgNxS9.css +0 -1
- package/packages/ui/dist/assets/index-Q2Yai4Fe.js +0 -2103
- package/templates/dca-rebalancer/.env.example +0 -6
- package/templates/dca-rebalancer/AGENTS.md +0 -246
- package/templates/dca-rebalancer/AGENT_PLAYBOOK.md +0 -110
- package/templates/dca-rebalancer/README.md +0 -16
- package/templates/dca-rebalancer/src/agent.ts +0 -253
- package/templates/dca-rebalancer/src/config.ts +0 -27
- package/templates/dca-rebalancer/tsconfig.json +0 -8
- /package/templates/{dca-rebalancer → default}/.sail/.gitkeep +0 -0
package/README.md
CHANGED
|
@@ -1,337 +1,430 @@
|
|
|
1
|
-
# Sailor
|
|
2
|
-
|
|
3
|
-
> A toolkit for building and operating Sail Protocol SMAs with AI agents.
|
|
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.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## What's inside
|
|
10
|
-
|
|
11
|
-
| Package | Name | Role |
|
|
12
|
-
|---|---|---|
|
|
13
|
-
| `packages/sdk` | `@sail/sdk` | TypeScript library
|
|
14
|
-
| `packages/cli` |
|
|
15
|
-
| `packages/
|
|
16
|
-
| `
|
|
17
|
-
| `templates/
|
|
18
|
-
| `templates/
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
sailor
|
|
93
|
-
sailor
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
sailor init
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
sailor ui
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
browser
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
sailor
|
|
197
|
-
sailor
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
1
|
+
# Sailor
|
|
2
|
+
|
|
3
|
+
> A toolkit for building and operating Sail Protocol SMAs with AI agents.
|
|
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.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## What's inside
|
|
10
|
+
|
|
11
|
+
| Package | Name | Role |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| `packages/sdk` | `@sail/sdk` (internal) | TypeScript library: SailorClient, EIP-712 helpers, ABIs, chain registry |
|
|
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 |
|
|
16
|
+
| `templates/default` | — | Default agent starter (neutral; what `sailor init` scaffolds) |
|
|
17
|
+
| `templates/custom-mandate` | — | Solidity reference: IPermission scaffold (not a project template) |
|
|
18
|
+
| `templates/lifi-permissions` | — | Solidity reference: LiFi clone permission contracts (not a project template) |
|
|
19
|
+
|
|
20
|
+
---
|
|
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.
|
|
31
|
+
|
|
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.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Roles
|
|
37
|
+
|
|
38
|
+
Sailor operates the three roles Sail Protocol separates:
|
|
39
|
+
|
|
40
|
+
| Role | Authority | Held by |
|
|
41
|
+
|---|---|---|
|
|
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` |
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
|
|
50
|
+
### Start a new agent project (recommended)
|
|
51
|
+
|
|
52
|
+
Open your AI coding assistant and run in its terminal:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
npx sailor init my-agent
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Then say **"start"** — your assistant takes it from there.
|
|
59
|
+
|
|
60
|
+
### Global CLI (for direct sailor commands)
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
npm install -g @sail.money/sailor
|
|
64
|
+
sailor init my-agent
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Quickstart
|
|
70
|
+
|
|
71
|
+
Prerequisites:
|
|
72
|
+
|
|
73
|
+
- Node.js 18+
|
|
74
|
+
- A wallet (MetaMask or Rabby)
|
|
75
|
+
- 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`.
|
|
77
|
+
|
|
78
|
+
### Recommended — assistant-driven
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npx sailor init my-agent && cd my-agent
|
|
82
|
+
npm install
|
|
83
|
+
```
|
|
84
|
+
|
|
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.
|
|
86
|
+
|
|
87
|
+
### Direct CLI reference (advanced)
|
|
88
|
+
|
|
89
|
+
For users who prefer the terminal:
|
|
90
|
+
|
|
91
|
+
```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
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`sailor run` writes reverted transactions to stderr as `reverted: <txHash> (gas used: N)`; successful dispatches are appended to `.sail/activity.jsonl`.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Templates
|
|
106
|
+
|
|
107
|
+
`sailor init` scaffolds a new agent project from a template. By default it
|
|
108
|
+
writes into the **current directory**; pass a name to create a subdirectory.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
sailor init # scaffold into cwd
|
|
112
|
+
sailor init my-agent # create ./my-agent/ and scaffold there
|
|
113
|
+
sailor init --template default # explicit (same as default)
|
|
114
|
+
sailor init my-agent --template <name> # named subdirectory + specific template
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Available templates
|
|
118
|
+
|
|
119
|
+
| Template | Description |
|
|
120
|
+
|---|---|
|
|
121
|
+
| `default` | Neutral agent starter. Includes a blank agent loop, Foundry workspace for permission contracts, GitHub Actions cron job, and the operator guide (`AGENTS.md`). For a complete worked example see `examples/dca/`. **Default.** |
|
|
122
|
+
|
|
123
|
+
### What makes a valid template
|
|
124
|
+
|
|
125
|
+
A valid template is any directory under `templates/` that contains a
|
|
126
|
+
`package.json`. Directories without one (e.g. `custom-mandate`,
|
|
127
|
+
`lifi-permissions`) are Solidity reference sources, not project scaffolds, and
|
|
128
|
+
are excluded from the available list.
|
|
129
|
+
|
|
130
|
+
### Adding a template
|
|
131
|
+
|
|
132
|
+
1. Create a directory under `templates/<your-template-name>/`.
|
|
133
|
+
2. Add a `package.json` (the `name` field is patched to the project name on
|
|
134
|
+
init).
|
|
135
|
+
3. Add a `.sail/` workspace structure if the agent needs local state.
|
|
136
|
+
4. The template will appear automatically in `sailor init --template <name>`.
|
|
137
|
+
|
|
138
|
+
Template files are bundled into the published `sailor` npm package via the
|
|
139
|
+
`files` field in the root `package.json`.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Dashboard (`sailor ui`)
|
|
144
|
+
|
|
145
|
+
The Sailor dashboard is a local React app served at `http://localhost:3333`.
|
|
146
|
+
It shows live account state, mandate health, signer balances, and recent
|
|
147
|
+
activity — all read from the project's `.sail/` directory with no hosted
|
|
148
|
+
backend.
|
|
149
|
+
|
|
150
|
+
### Commands
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
sailor ui # start the dashboard (same as sailor ui start)
|
|
154
|
+
sailor ui start # start the dashboard at http://localhost:3333
|
|
155
|
+
sailor ui stop # stop the running dashboard
|
|
156
|
+
sailor ui status # show whether the dashboard is running + pid
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### How it works
|
|
160
|
+
|
|
161
|
+
`sailor ui start` spawns a bundled Express server (`server.cjs`) that:
|
|
162
|
+
|
|
163
|
+
- Serves the pre-built React UI as static files on `/`
|
|
164
|
+
- Exposes a local API on `/api` that reads `.sail/` state from the current
|
|
165
|
+
working directory
|
|
166
|
+
|
|
167
|
+
The server PID is written to `.sail/runtime/ui.json` on start. `sailor ui stop`
|
|
168
|
+
reads that file, sends `SIGTERM` to the server process, and removes the file.
|
|
169
|
+
This means you can start the dashboard in one terminal and stop it from another.
|
|
170
|
+
|
|
171
|
+
### Running in the background
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# macOS / Linux
|
|
175
|
+
sailor ui start &
|
|
176
|
+
sailor ui status # ● running http://localhost:3333 (pid 12345)
|
|
177
|
+
sailor ui stop # Stopped Sailor UI (pid 12345).
|
|
178
|
+
|
|
179
|
+
# Windows (PowerShell)
|
|
180
|
+
Start-Job { sailor ui start }
|
|
181
|
+
sailor ui status
|
|
182
|
+
sailor ui stop
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Agent-driven onboarding & custom mandates
|
|
188
|
+
|
|
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.
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
sailor keys generate # manager (agent) key
|
|
197
|
+
sailor station start & # signing daemon (serves the UI)
|
|
198
|
+
# 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
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Agents author their own permission contracts and deploy them from the scaffolded
|
|
205
|
+
Foundry workspace (`mandates/`, with `@sail/interfaces/IPermission.sol` vendored
|
|
206
|
+
under `.sail/contracts/`):
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
forge build
|
|
210
|
+
sailor mandate deploy --contract MyMandate \
|
|
211
|
+
--args '["0xPermissionSigner", ["0xTarget"]]' \
|
|
212
|
+
--attach --sma 0xSafe
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
`deploy` emits a contract-creation signing request (the owner signs it in the
|
|
216
|
+
browser); the deployed address is read from the receipt and tracked in
|
|
217
|
+
`.sail/state/mandates.json`. `attach` reads the signer nonce, has the owner sign
|
|
218
|
+
a `RegisterPermission` EIP-712 message, then the agent submits
|
|
219
|
+
`kernel.registerPermission` with the exact registration fee. Every command takes
|
|
220
|
+
`--json` for headless agent use; set `SAIL_PASSPHRASE` to unlock the manager key
|
|
221
|
+
non-interactively.
|
|
222
|
+
|
|
223
|
+
`sailor mandate sign` reconciles against the live on-chain `getPermissions()` call
|
|
224
|
+
before building the mandate payload — permissions revoked on-chain are excluded even
|
|
225
|
+
if they remain in the local `.sail/state/mandates.json` (which is an append-only
|
|
226
|
+
historical record and is never modified by the reconciliation).
|
|
227
|
+
|
|
228
|
+
### GitHub Actions CI
|
|
229
|
+
|
|
230
|
+
The scaffolded `.github/workflows/agent-tick.yml` runs `sailor run --once` on a
|
|
231
|
+
cron schedule using `npm ci` (no pnpm required). Setup:
|
|
232
|
+
|
|
233
|
+
1. `sailor keys export-ci` — copies the encrypted agent wallet to `ci-keystore.json`
|
|
234
|
+
in the project root and allowlists it in `.gitignore`. The geth v3 keystore is
|
|
235
|
+
safe to commit; the raw private key is never exposed.
|
|
236
|
+
2. Commit `ci-keystore.json`, `.sail/account.json`, and `.sail/mandate.json`.
|
|
237
|
+
3. Add two repository secrets (Settings → Secrets → Actions):
|
|
238
|
+
- `SAIL_PASSPHRASE` — the passphrase that encrypts the agent wallet
|
|
239
|
+
- `RPC_URL` — your RPC endpoint
|
|
240
|
+
|
|
241
|
+
The workflow copies `ci-keystore.json` to `.sail/keys/manager.json`, then calls
|
|
242
|
+
`npx sailor run --once` with `SAIL_PASSPHRASE` set so the key is unlocked
|
|
243
|
+
non-interactively. No private key ever appears in the workflow file or in secrets.
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Packages
|
|
248
|
+
|
|
249
|
+
Sailor ships as a **single npm package** — the SDK is bundled inside it and exposed via a subpath export:
|
|
250
|
+
|
|
251
|
+
| Package | Contents |
|
|
252
|
+
|---|---|
|
|
253
|
+
| `@sail.money/sailor` | CLI binary, UI server, templates, examples, and SDK |
|
|
254
|
+
|
|
255
|
+
The SDK is available as a subpath export for use in agent code:
|
|
256
|
+
|
|
257
|
+
```ts
|
|
258
|
+
import type { Agent, AgentContext, Dispatch } from '@sail.money/sailor/sdk'
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### npm (`publish-npm.yml`)
|
|
262
|
+
|
|
263
|
+
Published to the public npm registry under the `@sail.money` scope.
|
|
264
|
+
|
|
265
|
+
| Trigger | Package | Version | dist-tag |
|
|
266
|
+
|---|---|---|---|
|
|
267
|
+
| Tag push (`v*`) | `@sail.money/sailor` | `1.0.0` | `latest` |
|
|
268
|
+
| Manual dispatch | `@dev.sail.money/sailor` | `1.0.0-42` | `dev` |
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
npm install @sail.money/sailor # latest stable (tag push)
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
For dev builds, the package name changes scope to `@dev.sail.money`. Use an alias so your import paths stay the same:
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
npm install "@sail.money/sailor@npm:@dev.sail.money/sailor@dev"
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
This installs the latest dev build and makes it available as `@sail.money/sailor` locally — `@sail.money/sailor/sdk` imports continue to work unchanged.
|
|
281
|
+
|
|
282
|
+
### GitHub Packages (`publish.yml`)
|
|
283
|
+
|
|
284
|
+
Published to GitHub Packages under the `@sail-money` scope for internal testing — no public npm registry required.
|
|
285
|
+
|
|
286
|
+
| Trigger | Package | dist-tag |
|
|
287
|
+
|---|---|---|
|
|
288
|
+
| Merge to `main` | `@sail-money/sailor` | `latest` |
|
|
289
|
+
| Manual dispatch | `@sail-money/sailor-dev` | `dev` |
|
|
290
|
+
|
|
291
|
+
Both builds require an alias since the package scope differs from `@sail.money`:
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
npm install "@sail.money/sailor@npm:@sail-money/sailor@latest" --registry https://npm.pkg.github.com
|
|
295
|
+
npm install "@sail.money/sailor@npm:@sail-money/sailor-dev@dev" --registry https://npm.pkg.github.com
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Or pin in `package.json`:
|
|
299
|
+
|
|
300
|
+
```json
|
|
301
|
+
"dependencies": {
|
|
302
|
+
"@sail.money/sailor": "npm:@sail-money/sailor@latest"
|
|
303
|
+
}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
```json
|
|
307
|
+
"dependencies": {
|
|
308
|
+
"@sail.money/sailor": "npm:@sail-money/sailor-dev@dev"
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
Either way, `@sail.money/sailor/sdk` imports work unchanged.
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
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
|
+
## Security model
|
|
347
|
+
|
|
348
|
+
- 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.
|
|
349
|
+
- The Owner key controls the Safe and is never read by Sailor. Mandate signing requires a deliberate action by the permission signer.
|
|
350
|
+
- The manager key is encrypted on disk using geth keystore v3 (scrypt + aes-128-ctr) and is never transmitted.
|
|
351
|
+
- The session can be paused instantly via `sailor session pause` or the dashboard stop button; this does not affect Safe custody.
|
|
352
|
+
- All addresses passed to the CLI are normalized with `getAddress()` (EIP-55 checksum). Mixed-case or lowercase inputs are accepted and canonicalized before any on-chain call or state write.
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## State of the project
|
|
357
|
+
|
|
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.
|
|
359
|
+
|
|
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.
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## Deployments
|
|
365
|
+
|
|
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
|
+
|
|
392
|
+
### Base Sepolia (84532)
|
|
393
|
+
|
|
394
|
+
| Contract | Address |
|
|
395
|
+
|---|---|
|
|
396
|
+
| SailKernel | `0xf1D0F4C9893612627409948BAa9d82a01a373799` |
|
|
397
|
+
| SailGovernance | `0xEaD44bC6999E7b00b9b2E11c1660248DC2a30993` |
|
|
398
|
+
| Timelock | `0x97B863e392C9859336788D5Ec454527d33C95B74` |
|
|
399
|
+
| PermissionFactory | `0xdfF6a2272F667cDf78Af4681b9c88A219998db95` |
|
|
400
|
+
| StandardFeePolicy | `0x05570F7973b46Eb9Ed4518422891EFC26BD58b97` |
|
|
401
|
+
| SafeModuleEnabler | `0xB2C2B52d94412e3472C9fb2B52186eA12a935869` |
|
|
402
|
+
| Treasury | `0xB01dCE443d052e44b7D13726c0EC9fFB7f5815B6` |
|
|
403
|
+
|
|
404
|
+
### Unichain (130)
|
|
405
|
+
|
|
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
|
+
|
|
408
|
+
| Contract | Address |
|
|
409
|
+
|---|---|
|
|
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).
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
## Contributing
|
|
423
|
+
|
|
424
|
+
Sailor and Sail Protocol are separate repositories with separate concerns. Protocol questions — SailKernel internals, permission templates, MandateFactory, fee policies — belong in the [SailProtocol](../SailProtocol) repository. Sailor questions — the SDK, CLI, dashboard, and agent templates — belong here.
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
428
|
+
## License
|
|
429
|
+
|
|
430
|
+
MIT
|