@dev.sail.money/sailor 0.1.0-local → 1.0.0-39
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 +139 -140
- package/LICENSE +21 -21
- package/README.md +428 -430
- package/docs/PERMISSION_MODEL.md +93 -93
- package/examples/permissions/BoundedApproveAndCallBatch.sol +179 -179
- package/examples/permissions/BoundedBet_Limitless_Base.sol +97 -97
- package/examples/permissions/BoundedBorrow_AaveV3_Arbitrum.sol +94 -94
- package/examples/permissions/BoundedPerp_GMXv2_Arbitrum.sol +154 -154
- package/examples/permissions/BoundedStake_Venice_Base.sol +85 -85
- package/examples/permissions/BoundedSupply_AaveV3_Arbitrum.sol +82 -82
- package/examples/permissions/BoundedSwap_UniswapV3_Base.sol +116 -116
- package/examples/permissions/BoundedSwap_UniswapV4_Unichain.sol +150 -150
- package/examples/permissions/BoundedTransfer_ERC20_Ethereum.sol +73 -73
- package/examples/permissions/BoundedVault_ERC4626_Base.sol +97 -97
- package/examples/permissions/README.md +79 -79
- package/examples/permissions/SailCalldata.sol +118 -118
- package/examples/permissions/foundry.toml +10 -10
- package/examples/permissions/interfaces/IBatchPermission.sol +38 -38
- package/examples/permissions/interfaces/IPermission.sol +18 -18
- package/package.json +44 -45
- package/packages/cli/README.md +34 -34
- package/packages/cli/dist/index.cjs +734 -705
- package/packages/cli/dist/server.cjs +627 -538
- package/packages/sdk/README.md +65 -65
- package/packages/sdk/dist/intelligence.d.ts +1 -1
- package/packages/sdk/dist/intelligence.js +1 -1
- package/packages/sdk/package.json +80 -80
- package/packages/ui/dist/assets/{add-BxpXfVWe.js → add-Gzf62xlX.js} +1 -1
- package/packages/ui/dist/assets/{all-wallets-BKTn_sWK.js → all-wallets-O-pI4o8v.js} +1 -1
- package/packages/ui/dist/assets/{app-store-CfuKbwxR.js → app-store-CeSLaOaQ.js} +1 -1
- package/packages/ui/dist/assets/{apple-BKSBbNYg.js → apple-FGNyQM-D.js} +1 -1
- package/packages/ui/dist/assets/{arrow-bottom-D4bG6gZi.js → arrow-bottom-C1fusORF.js} +1 -1
- package/packages/ui/dist/assets/{arrow-bottom-circle-BNTs1p0T.js → arrow-bottom-circle-AvK1VEpN.js} +1 -1
- package/packages/ui/dist/assets/{arrow-left-2uee3vYv.js → arrow-left-Bu-hq4Ep.js} +1 -1
- package/packages/ui/dist/assets/{arrow-right-BktjMV6h.js → arrow-right-XbZESmct.js} +1 -1
- package/packages/ui/dist/assets/{arrow-top-Izu28fX4.js → arrow-top-DvkVHbhX.js} +1 -1
- package/packages/ui/dist/assets/{bank-USBaAyFM.js → bank-DTThWRvC.js} +1 -1
- package/packages/ui/dist/assets/{basic-C_9KjTEH.js → basic-B9AMgqFE.js} +1 -1
- package/packages/ui/dist/assets/{browser-DAEMAKV7.js → browser-Bhnivm4i.js} +1 -1
- package/packages/ui/dist/assets/{card-DT8yDkKN.js → card-DjIlyU55.js} +1 -1
- package/packages/ui/dist/assets/{ccip-CkqfGSxX.js → ccip-DPAiKntc.js} +1 -1
- package/packages/ui/dist/assets/{checkmark-CsgdEXFj.js → checkmark-DSVYfoVl.js} +1 -1
- package/packages/ui/dist/assets/{checkmark-bold-D2gjOQo2.js → checkmark-bold-BFkw_Q5g.js} +1 -1
- package/packages/ui/dist/assets/{chevron-bottom-tprFynYV.js → chevron-bottom-CyCgyOwY.js} +1 -1
- package/packages/ui/dist/assets/{chevron-left-D2Zj1gNB.js → chevron-left-DTuO2WLr.js} +1 -1
- package/packages/ui/dist/assets/{chevron-right-D1rRuAVe.js → chevron-right-DwB5FZj8.js} +1 -1
- package/packages/ui/dist/assets/{chevron-top-24dL1mbL.js → chevron-top-DKukdWvg.js} +1 -1
- package/packages/ui/dist/assets/{chrome-store-Vy-5niYX.js → chrome-store-Csz4L9Ls.js} +1 -1
- package/packages/ui/dist/assets/{clock-qBjLnVdJ.js → clock-Bg6488Gw.js} +1 -1
- package/packages/ui/dist/assets/{close-DARDwgcu.js → close-BxAJGBxP.js} +1 -1
- package/packages/ui/dist/assets/{coinPlaceholder-BvpIbPlD.js → coinPlaceholder-CCJVgW9w.js} +1 -1
- package/packages/ui/dist/assets/{compass-BMTO0ayt.js → compass-CSQSZaqJ.js} +1 -1
- package/packages/ui/dist/assets/{copy-PaXeRHza.js → copy-CqlzXVB-.js} +1 -1
- package/packages/ui/dist/assets/{core-BFnStQd-.js → core-ClvdTrpG.js} +3 -3
- package/packages/ui/dist/assets/cursor-CKKwWhGQ.js +3 -0
- package/packages/ui/dist/assets/{cursor-transparent-BEMdi-8q.js → cursor-transparent-C1VOGz11.js} +1 -1
- package/packages/ui/dist/assets/{desktop-CfuLLThw.js → desktop-QiLednKV.js} +1 -1
- package/packages/ui/dist/assets/{disconnect-DhwgJMiR.js → disconnect-Bx2TgkML.js} +1 -1
- package/packages/ui/dist/assets/{discord-po8qoN1s.js → discord-6MWX5Rbb.js} +1 -1
- package/packages/ui/dist/assets/{etherscan-BEsz0_yx.js → etherscan-CodIrmJK.js} +1 -1
- package/packages/ui/dist/assets/{events-Bz33Unzu.js → events-DOEm-LTy.js} +1 -1
- package/packages/ui/dist/assets/{exclamation-triangle-7CjTAGOQ.js → exclamation-triangle-Dwr5oCsh.js} +1 -1
- package/packages/ui/dist/assets/{extension-CmxjEWEt.js → extension-C-SoZx1s.js} +1 -1
- package/packages/ui/dist/assets/{external-link-CmQ--bNS.js → external-link-BiDYH90C.js} +1 -1
- package/packages/ui/dist/assets/{facebook-CIBn9b65.js → facebook-Bm27AlfS.js} +1 -1
- package/packages/ui/dist/assets/{fallback-DATyrQlb.js → fallback-Bwpmpy13.js} +1 -1
- package/packages/ui/dist/assets/{farcaster-OJ3Jasxg.js → farcaster-CSW-SjzS.js} +1 -1
- package/packages/ui/dist/assets/{filters-D4x09zeL.js → filters-j3dR7AJK.js} +1 -1
- package/packages/ui/dist/assets/{github-ZlIuMArp.js → github-CQMTSSgW.js} +1 -1
- package/packages/ui/dist/assets/{google-Gwg85sfv.js → google-BBIVBfAd.js} +1 -1
- package/packages/ui/dist/assets/{help-circle-D1uOWYcX.js → help-circle-CEvTLelF.js} +1 -1
- package/packages/ui/dist/assets/{id-C0-5UdYk.js → id-CYRVgSgN.js} +1 -1
- package/packages/ui/dist/assets/{image-D_DUsv8-.js → image-Cm9Ep5G0.js} +1 -1
- package/packages/ui/dist/assets/{index-DdbJhIdl.js → index-4wdo7Ga_.js} +3 -3
- package/packages/ui/dist/assets/{index-CrYzBWfD.js → index-BrP8m1ZI.js} +1 -1
- package/packages/ui/dist/assets/index-C2PQCECq.css +1 -0
- package/packages/ui/dist/assets/{index-DiojfeVM.js → index-DZ07nuwB.js} +1 -1
- package/packages/ui/dist/assets/{index-BCzex_R6.js → index-De_P6mNS.js} +1 -1
- package/packages/ui/dist/assets/index-DrQ9A8dp.js +1775 -0
- package/packages/ui/dist/assets/{index-izd7vu_r.js → index-Z55BVE94.js} +1 -1
- package/packages/ui/dist/assets/{index.es-DdkHhQAj.js → index.es-DnT9Uzwt.js} +4 -4
- package/packages/ui/dist/assets/{info-CiRd_kEG.js → info-DdYqiFMu.js} +1 -1
- package/packages/ui/dist/assets/{info-circle-ypxjqarK.js → info-circle-DkD9oY-S.js} +1 -1
- package/packages/ui/dist/assets/{lightbulb-B-pxLxd8.js → lightbulb-7Q3AhpSP.js} +1 -1
- package/packages/ui/dist/assets/{mail-BYmicuVZ.js → mail-CPagdnfp.js} +1 -1
- package/packages/ui/dist/assets/{metamask-sdk-Ccl6DG7Q.js → metamask-sdk-CQ4tzR6A.js} +1 -1
- package/packages/ui/dist/assets/{mobile-CtP5PqVT.js → mobile-01GVSpey.js} +1 -1
- package/packages/ui/dist/assets/{more-6C2733we.js → more-BPXPYrvy.js} +1 -1
- package/packages/ui/dist/assets/{network-placeholder-CdhxMzqd.js → network-placeholder-CII8WrTF.js} +1 -1
- package/packages/ui/dist/assets/{nftPlaceholder-DVmTWEAY.js → nftPlaceholder-DG5rjRzx.js} +1 -1
- package/packages/ui/dist/assets/{off-DNYLughs.js → off-eemo7R2q.js} +1 -1
- package/packages/ui/dist/assets/{parseSignature-Dq2B5Bu3.js → parseSignature-CaRSntRi.js} +1 -1
- package/packages/ui/dist/assets/{play-store-D7Qut5ta.js → play-store-SIqMwLur.js} +1 -1
- package/packages/ui/dist/assets/{plus-kqMyjt3q.js → plus-DemTM2Nx.js} +1 -1
- package/packages/ui/dist/assets/{qr-code-DiUCWRbz.js → qr-code-BjolKhQv.js} +1 -1
- package/packages/ui/dist/assets/{recycle-horizontal-Boe3XiS-.js → recycle-horizontal-BluxSqWj.js} +1 -1
- package/packages/ui/dist/assets/{refresh-CrBgBQYO.js → refresh-Cto5auO0.js} +1 -1
- package/packages/ui/dist/assets/{reown-logo-CFZCCHSx.js → reown-logo-lrWmaeNj.js} +1 -1
- package/packages/ui/dist/assets/{search-ChTDrghU.js → search-SNmrxLL7.js} +1 -1
- package/packages/ui/dist/assets/{secp256k1-DAV5Q_FR.js → secp256k1-SI0Bxirn.js} +1 -1
- package/packages/ui/dist/assets/{send-DLFbBFe1.js → send-Do8kdKTu.js} +1 -1
- package/packages/ui/dist/assets/{swapHorizontal-BEs3emfG.js → swapHorizontal-HBP1koQV.js} +1 -1
- package/packages/ui/dist/assets/{swapHorizontalBold-CC-Hfa7W.js → swapHorizontalBold-B9g1LqXn.js} +1 -1
- package/packages/ui/dist/assets/{swapHorizontalMedium-BmR0H8DC.js → swapHorizontalMedium-C8JebI_2.js} +1 -1
- package/packages/ui/dist/assets/{swapHorizontalRoundedBold-BdP5NGIH.js → swapHorizontalRoundedBold-37eEYoAp.js} +1 -1
- package/packages/ui/dist/assets/{swapVertical-CPrGEJPY.js → swapVertical-DmacpIGs.js} +1 -1
- package/packages/ui/dist/assets/{telegram-CxNoZ80Q.js → telegram-Dq_CUch4.js} +1 -1
- package/packages/ui/dist/assets/{three-dots-BRa6SBpL.js → three-dots-DbkqGUCU.js} +1 -1
- package/packages/ui/dist/assets/{twitch-BC338bG5.js → twitch-iG0Ncwwy.js} +1 -1
- package/packages/ui/dist/assets/{twitterIcon-BGZmt2i9.js → twitterIcon-CNbKQx87.js} +1 -1
- package/packages/ui/dist/assets/{verify-CEstW0zw.js → verify-BfXT7L3L.js} +1 -1
- package/packages/ui/dist/assets/{verify-filled-OkZb0weU.js → verify-filled-BxqxA6xc.js} +1 -1
- package/packages/ui/dist/assets/{w3m-modal-pS09ECwE.js → w3m-modal-DeDYqwYJ.js} +1 -1
- package/packages/ui/dist/assets/{wallet-BXVKCgC9.js → wallet-BXsUR9Tj.js} +1 -1
- package/packages/ui/dist/assets/{wallet-placeholder-C_kNhB1c.js → wallet-placeholder-bbWbfkZu.js} +1 -1
- package/packages/ui/dist/assets/{walletconnect-CRKIuUHH.js → walletconnect-WsTWE17z.js} +1 -1
- package/packages/ui/dist/assets/{warning-circle-DB2NnwlJ.js → warning-circle-cNSUigh6.js} +1 -1
- package/packages/ui/dist/assets/{x-DT4RmwL5.js → x-gNtNGE0N.js} +1 -1
- package/packages/ui/dist/index.html +14 -14
- package/scripts/check-docs.mjs +262 -262
- package/scripts/check-init.mjs +108 -108
- package/templates/custom-mandate/.sail/contracts/interfaces/IPermission.sol +18 -18
- package/templates/custom-mandate/README.md +116 -116
- package/templates/custom-mandate/foundry.toml +8 -8
- package/templates/custom-mandate/mandates/BoundedCallPermission.sol +41 -41
- package/templates/custom-mandate/mandates/README.md +16 -16
- package/templates/custom-mandate/mandates/SailCalldata.sol +118 -118
- package/templates/default/.cursor/rules +25 -25
- package/templates/default/.env.example +20 -20
- package/templates/default/.github/workflows/agent-tick.yml +33 -33
- package/templates/default/.sail/README.md +13 -13
- package/templates/default/.sail/config.json +10 -10
- package/templates/default/AGENTS.md +171 -171
- package/templates/default/CLAUDE.md +2 -2
- package/templates/default/README.md +16 -16
- package/templates/default/_gitignore +13 -13
- package/templates/default/docs/PERMISSION_MODEL.md +93 -93
- package/templates/default/examples/dca/README.md +16 -16
- package/templates/default/examples/dca/agent.ts +174 -174
- package/templates/default/examples/dca/mandate.ts +45 -45
- package/templates/default/package.json +17 -17
- package/templates/default/src/agent.ts +37 -37
- package/templates/default/src/config.ts +24 -24
- package/templates/default/src/mandate.ts +22 -22
- package/templates/default/tsconfig.json +17 -17
- package/templates/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-BDvw-B17.js +0 -3
- package/packages/ui/dist/assets/index-BUhrHLpY.js +0 -1775
- package/packages/ui/dist/assets/index-Cq02kQmy.css +0 -1
- package/scripts/postinstall.js +0 -81
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.26;
|
|
3
|
-
|
|
4
|
-
// Mirrors SailProtocol contracts/interfaces/IBatchPermission.sol. A batch-aware
|
|
5
|
-
// permission gates `dispatchBatch` — an ordered array of subcalls executed as one
|
|
6
|
-
// atomic transaction. Exactly ONE batch permission is consulted per batch dispatch
|
|
7
|
-
// (selective model), and it owns validation of every subcall AND the cross-call
|
|
8
|
-
// invariants (ordering, matching amounts, mandatory cleanup) that no per-call
|
|
9
|
-
// IPermission can express.
|
|
10
|
-
|
|
11
|
-
/// @notice A single subcall in a batch dispatch.
|
|
12
|
-
/// @dev The kernel executes each Call as safe.execTransactionFromModule(target, value, data, 0)
|
|
13
|
-
/// — operation is always CALL, never DELEGATECALL.
|
|
14
|
-
struct Call {
|
|
15
|
-
address target; // MUST NOT equal the kernel (enforced by the kernel)
|
|
16
|
-
uint256 value; // native ETH forwarded (wei)
|
|
17
|
-
bytes data; // calldata for the subcall
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/// @notice Execution context passed to evaluateBatch on each batch dispatch (read-only snapshot).
|
|
21
|
-
struct BatchContext {
|
|
22
|
-
address account; // the Safe (SMA) whose assets are moved
|
|
23
|
-
address manager; // the delegated signer who authorised the batch
|
|
24
|
-
address submitter; // msg.sender of the dispatch (may differ from manager via a relayer)
|
|
25
|
-
address permission; // this batch permission contract
|
|
26
|
-
bytes32 batchHash; // keccak256(abi.encode(calls)) — stable id for the exact sequence
|
|
27
|
-
uint256 blockTimestamp; // block.timestamp at dispatch
|
|
28
|
-
uint256 blockNumber; // block.number at dispatch
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
interface IBatchPermission {
|
|
32
|
-
/// @notice Validate an entire batch of subcalls. Called via staticcall under a gas cap;
|
|
33
|
-
/// a revert / OOG / malformed return is treated as `false` (fail-closed).
|
|
34
|
-
function evaluateBatch(Call[] calldata calls, BatchContext calldata ctx) external view returns (bool);
|
|
35
|
-
|
|
36
|
-
/// @notice Marker the kernel uses (try/catch) to detect batch-aware permissions. MUST return true.
|
|
37
|
-
function isBatchPermission() external pure returns (bool);
|
|
38
|
-
}
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
|
+
|
|
4
|
+
// Mirrors SailProtocol contracts/interfaces/IBatchPermission.sol. A batch-aware
|
|
5
|
+
// permission gates `dispatchBatch` — an ordered array of subcalls executed as one
|
|
6
|
+
// atomic transaction. Exactly ONE batch permission is consulted per batch dispatch
|
|
7
|
+
// (selective model), and it owns validation of every subcall AND the cross-call
|
|
8
|
+
// invariants (ordering, matching amounts, mandatory cleanup) that no per-call
|
|
9
|
+
// IPermission can express.
|
|
10
|
+
|
|
11
|
+
/// @notice A single subcall in a batch dispatch.
|
|
12
|
+
/// @dev The kernel executes each Call as safe.execTransactionFromModule(target, value, data, 0)
|
|
13
|
+
/// — operation is always CALL, never DELEGATECALL.
|
|
14
|
+
struct Call {
|
|
15
|
+
address target; // MUST NOT equal the kernel (enforced by the kernel)
|
|
16
|
+
uint256 value; // native ETH forwarded (wei)
|
|
17
|
+
bytes data; // calldata for the subcall
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/// @notice Execution context passed to evaluateBatch on each batch dispatch (read-only snapshot).
|
|
21
|
+
struct BatchContext {
|
|
22
|
+
address account; // the Safe (SMA) whose assets are moved
|
|
23
|
+
address manager; // the delegated signer who authorised the batch
|
|
24
|
+
address submitter; // msg.sender of the dispatch (may differ from manager via a relayer)
|
|
25
|
+
address permission; // this batch permission contract
|
|
26
|
+
bytes32 batchHash; // keccak256(abi.encode(calls)) — stable id for the exact sequence
|
|
27
|
+
uint256 blockTimestamp; // block.timestamp at dispatch
|
|
28
|
+
uint256 blockNumber; // block.number at dispatch
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface IBatchPermission {
|
|
32
|
+
/// @notice Validate an entire batch of subcalls. Called via staticcall under a gas cap;
|
|
33
|
+
/// a revert / OOG / malformed return is treated as `false` (fail-closed).
|
|
34
|
+
function evaluateBatch(Call[] calldata calls, BatchContext calldata ctx) external view returns (bool);
|
|
35
|
+
|
|
36
|
+
/// @notice Marker the kernel uses (try/catch) to detect batch-aware permissions. MUST return true.
|
|
37
|
+
function isBatchPermission() external pure returns (bool);
|
|
38
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.26;
|
|
3
|
-
|
|
4
|
-
struct Context {
|
|
5
|
-
address account;
|
|
6
|
-
address manager;
|
|
7
|
-
address submitter;
|
|
8
|
-
address target;
|
|
9
|
-
bytes4 selector;
|
|
10
|
-
uint256 value;
|
|
11
|
-
uint256 blockTimestamp;
|
|
12
|
-
uint256 blockNumber;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface IPermission {
|
|
16
|
-
function evaluate(bytes calldata txData, Context calldata ctx) external view returns (bool);
|
|
17
|
-
function discriminator() external view returns (bytes32);
|
|
18
|
-
}
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
|
+
|
|
4
|
+
struct Context {
|
|
5
|
+
address account;
|
|
6
|
+
address manager;
|
|
7
|
+
address submitter;
|
|
8
|
+
address target;
|
|
9
|
+
bytes4 selector;
|
|
10
|
+
uint256 value;
|
|
11
|
+
uint256 blockTimestamp;
|
|
12
|
+
uint256 blockNumber;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface IPermission {
|
|
16
|
+
function evaluate(bytes calldata txData, Context calldata ctx) external view returns (bool);
|
|
17
|
+
function discriminator() external view returns (bytes32);
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dev.sail.money/sailor",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Operator toolkit for Sail Protocol",
|
|
5
|
-
"bin": {
|
|
6
|
-
"sailor": "packages/cli/dist/index.cjs"
|
|
7
|
-
},
|
|
8
|
-
"exports": {
|
|
9
|
-
"./sdk": {
|
|
10
|
-
"import": "./packages/sdk/dist/index.js",
|
|
11
|
-
"types": "./packages/sdk/dist/index.d.ts"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"packages/cli/dist",
|
|
16
|
-
"packages/sdk/dist",
|
|
17
|
-
"packages/sdk/package.json",
|
|
18
|
-
"packages/ui/dist",
|
|
19
|
-
"templates",
|
|
20
|
-
"examples",
|
|
21
|
-
"docs",
|
|
22
|
-
"scripts",
|
|
23
|
-
"README.md",
|
|
24
|
-
"AGENTS.md"
|
|
25
|
-
],
|
|
26
|
-
"scripts": {
|
|
27
|
-
"build": "pnpm --filter @sail/sdk build && pnpm --filter sailor build && pnpm --filter sailor-ui build",
|
|
28
|
-
"test": "pnpm --filter sailor-ui test",
|
|
29
|
-
"test:ui": "pnpm --filter sailor-ui test:ui",
|
|
30
|
-
"link:cli": "pnpm link --global",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@dev.sail.money/sailor",
|
|
3
|
+
"version": "1.0.0-39",
|
|
4
|
+
"description": "Operator toolkit for Sail Protocol",
|
|
5
|
+
"bin": {
|
|
6
|
+
"sailor": "packages/cli/dist/index.cjs"
|
|
7
|
+
},
|
|
8
|
+
"exports": {
|
|
9
|
+
"./sdk": {
|
|
10
|
+
"import": "./packages/sdk/dist/index.js",
|
|
11
|
+
"types": "./packages/sdk/dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"packages/cli/dist",
|
|
16
|
+
"packages/sdk/dist",
|
|
17
|
+
"packages/sdk/package.json",
|
|
18
|
+
"packages/ui/dist",
|
|
19
|
+
"templates",
|
|
20
|
+
"examples",
|
|
21
|
+
"docs",
|
|
22
|
+
"scripts",
|
|
23
|
+
"README.md",
|
|
24
|
+
"AGENTS.md"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "pnpm --filter @sail/sdk build && pnpm --filter sailor build && pnpm --filter sailor-ui build",
|
|
28
|
+
"test": "pnpm --filter sailor-ui test",
|
|
29
|
+
"test:ui": "pnpm --filter sailor-ui test:ui",
|
|
30
|
+
"link:cli": "pnpm link --global",
|
|
31
|
+
"typecheck": "pnpm --filter @sail/sdk build && pnpm -r typecheck",
|
|
32
|
+
"docs:check": "node scripts/check-docs.mjs",
|
|
33
|
+
"init:check": "node scripts/check-init.mjs",
|
|
34
|
+
"eval": "node evals/run.mjs",
|
|
35
|
+
"lint": "biome check ."
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@biomejs/biome": "^1.9.0",
|
|
39
|
+
"typescript": "^5.5.0"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"tsx": "^4.22.4"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/packages/cli/README.md
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
# sailor
|
|
2
|
-
|
|
3
|
-
Start a new agent project with `npx sailor init <name>` from inside your AI coding
|
|
4
|
-
assistant, or install globally for direct command use and CI/CD.
|
|
5
|
-
|
|
6
|
-
CLI operator toolkit for Sail Protocol. Run `sailor --help` to see all commands.
|
|
7
|
-
|
|
8
|
-
```sh
|
|
9
|
-
npm install -g sailor
|
|
10
|
-
sailor init my-fund
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Commands
|
|
14
|
-
|
|
15
|
-
- `sailor init [name]` — scaffold a new agent project from a template
|
|
16
|
-
- `sailor keys generate|show` — generate/show the agent wallet and mandate signer keys
|
|
17
|
-
- `sailor account create` — create a new SMA on-chain
|
|
18
|
-
- `sailor onboard` — set up an SMA, register a permission, and confirm the agent is operational
|
|
19
|
-
- `sailor mandate prepare` — review the permissions attached to your SMA
|
|
20
|
-
- `sailor mandate sign` — confirm the permissions authorized for your SMA
|
|
21
|
-
- `sailor mandate deploy` — deploy a Foundry-compiled permission contract
|
|
22
|
-
- `sailor mandate attach` — register an already-deployed permission on an SMA
|
|
23
|
-
- `sailor mandate revoke` — revoke permission(s) from an SMA
|
|
24
|
-
- `sailor mandate templates` — how to author your own permission contract
|
|
25
|
-
- `sailor mandate list` — list permission contracts deployed from this project
|
|
26
|
-
- `sailor owner connect|show` — detect and persist the project owner (your connected wallet)
|
|
27
|
-
- `sailor scan` — discover the owner's SMAs, their permissions, and local keys
|
|
28
|
-
- `sailor status` — show account, permission, and session status
|
|
29
|
-
- `sailor doctor` — read-only preflight before dispatching (gas-free)
|
|
30
|
-
- `sailor run` — run the agent execution loop
|
|
31
|
-
- `sailor session pause|resume` — control the agent session
|
|
32
|
-
- `sailor station start|status|stop` — manage the browser signing daemon
|
|
33
|
-
- `sailor ui start|stop|status` — start/stop the local dashboard
|
|
34
|
-
```
|
|
1
|
+
# sailor
|
|
2
|
+
|
|
3
|
+
Start a new agent project with `npx sailor init <name>` from inside your AI coding
|
|
4
|
+
assistant, or install globally for direct command use and CI/CD.
|
|
5
|
+
|
|
6
|
+
CLI operator toolkit for Sail Protocol. Run `sailor --help` to see all commands.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npm install -g sailor
|
|
10
|
+
sailor init my-fund
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
- `sailor init [name]` — scaffold a new agent project from a template
|
|
16
|
+
- `sailor keys generate|show` — generate/show the agent wallet and mandate signer keys
|
|
17
|
+
- `sailor account create` — create a new SMA on-chain
|
|
18
|
+
- `sailor onboard` — set up an SMA, register a permission, and confirm the agent is operational
|
|
19
|
+
- `sailor mandate prepare` — review the permissions attached to your SMA
|
|
20
|
+
- `sailor mandate sign` — confirm the permissions authorized for your SMA
|
|
21
|
+
- `sailor mandate deploy` — deploy a Foundry-compiled permission contract
|
|
22
|
+
- `sailor mandate attach` — register an already-deployed permission on an SMA
|
|
23
|
+
- `sailor mandate revoke` — revoke permission(s) from an SMA
|
|
24
|
+
- `sailor mandate templates` — how to author your own permission contract
|
|
25
|
+
- `sailor mandate list` — list permission contracts deployed from this project
|
|
26
|
+
- `sailor owner connect|show` — detect and persist the project owner (your connected wallet)
|
|
27
|
+
- `sailor scan` — discover the owner's SMAs, their permissions, and local keys
|
|
28
|
+
- `sailor status` — show account, permission, and session status
|
|
29
|
+
- `sailor doctor` — read-only preflight before dispatching (gas-free)
|
|
30
|
+
- `sailor run` — run the agent execution loop
|
|
31
|
+
- `sailor session pause|resume` — control the agent session
|
|
32
|
+
- `sailor station start|status|stop` — manage the browser signing daemon
|
|
33
|
+
- `sailor ui start|stop|status` — start/stop the local dashboard
|
|
34
|
+
```
|