@dev.sail.money/sailor 1.2.1-84 → 1.2.1-86

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev.sail.money/sailor",
3
- "version": "1.2.1-84",
3
+ "version": "1.2.1-86",
4
4
  "description": "Operator toolkit for Sail Protocol",
5
5
  "bin": {
6
6
  "sailor": "packages/cli/dist/index.cjs"
@@ -5,7 +5,7 @@
5
5
  * Do not edit manually — run `pnpm build` to regenerate.
6
6
  *
7
7
  * Spec version : 1.2.0
8
- * Generated at : 2026-06-19T08:06:19.872Z
8
+ * Generated at : 2026-06-19T14:03:47.666Z
9
9
  */
10
10
  export declare const SAIL_INTELLIGENCE_BASE_URL = "https://api.sail.money";
11
11
  export declare const SAIL_INTELLIGENCE_DOCS_URL = "https://api.sail.money/docs";
@@ -5,7 +5,7 @@
5
5
  * Do not edit manually — run `pnpm build` to regenerate.
6
6
  *
7
7
  * Spec version : 1.2.0
8
- * Generated at : 2026-06-19T08:06:19.872Z
8
+ * Generated at : 2026-06-19T14:03:47.666Z
9
9
  */
10
10
  export const SAIL_INTELLIGENCE_BASE_URL = "https://api.sail.money";
11
11
  export const SAIL_INTELLIGENCE_DOCS_URL = "https://api.sail.money/docs";
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: sail-extend
3
- description: Recipes for extending a live agent with notifications (Telegram, email) and a strategy-specific dashboard. Use when the agent is running and the user asks for run/transaction alerts, monitoring, or a custom view of their strategy.
3
+ description: Recipes for extending a live agent with notifications (Telegram, email) and a strategy-specific dashboard. Use once the agent is live to offer and build run/transaction alerts, monitoring, or a custom view of the strategy — stage 5 of onboarding. Offer this proactively when the agent goes live, not only when the operator asks; the operator may opt out.
4
4
  ---
5
5
 
6
6
  # Sail extend — notifications and custom dashboards
7
7
 
8
- These are user-land code the assistant writes into this project on request — not Sailor features. Build them only once the agent is live.
8
+ These are user-land code the assistant writes into this project — not Sailor features. Once the agent is live (stage 5 of onboarding), proactively offer the operator run/transaction notifications and a strategy-specific dashboard — one line on each — and build whatever they accept. Build only once the agent is live; the operator may decline, but the offer is not optional.
9
9
 
10
10
  ## Notifications
11
11
 
@@ -9,7 +9,16 @@ The lifecycle is an ordered set of gates. **The order is the correctness model**
9
9
 
10
10
  ## Gate 1 — Pin the strategy bounds with the user
11
11
 
12
- Establish, explicitly: tokens, amounts, venues, slippage, recipients. Philosophy: **every meaningful financial bound is enforced on-chain in Solidity**; only frequency/cadence lives in agent TypeScript. If a bound matters and it is not in a permission contract, it is not a bound.
12
+ Every constraint a strategy needs is one of two kinds, and you must tell the operator which is which so they sign knowing what is enforced where:
13
+
14
+ - **Safety bounds** — protect against loss or theft: amount caps, recipient allowlists, venue/router allowlists, slippage/min-out floors, LTV ceilings, and the like. These are enforced **on-chain in a permission contract, default-ON**. Dropping one requires an explicit, stated justification — never a silent omission. **If a bound matters and it is not in a permission contract, it is not a bound.**
15
+ - **Strategy parameters** — express *how* the strategy runs, not a theft/loss surface: cadence/frequency, schedule, rebalance timing. These live in **agent logic** by nature — permissions are stateless, and these are not safety surfaces (the safety bounds hold regardless of timing). If the operator states one (e.g. a cadence), it is a required agent-side guard that must be **wired and confirmed before go-live** — not optional, never silently dropped — but do not try to push it on-chain.
16
+
17
+ **Enumerate** from the operator's stated strategy *and* from what the protocol can express for the venues involved — do not work from a fixed checklist. Explain what each constraint protects against, classify it as a safety bound (on-chain) or a strategy parameter (agent-side), and say so to the operator.
18
+
19
+ **Precedence.** Operator intent and the strategy's stated bounds outrank any example. If the operator asks for a constraint an example omits, include it — never let an example's shape narrow the mandate below what the operator requested.
20
+
21
+ Examples are illustrations, not the supported set. Sail supports any token, venue, protocol, pool, or contract expressible as a permission — never treat an example's specific addresses as the only ones available. When the operator names something not in your examples, resolve it from authoritative sources (official docs, canonical lists, block explorers) and verify on-chain before binding a mandate to it. Caps are denominated in base units — a token decimals mismatch (USDC is 6, most ERC-20s are 18) silently mis-sizes every bound; confirm decimals on-chain before sizing caps.
13
22
 
14
23
  ## Gate 2 — Enumerate approvals and pick the execution model
15
24
 
@@ -20,7 +20,7 @@ Stage machine keyed off `.sail/`. Read the state, enter at the right stage, neve
20
20
  | `config.json` has `chainId: null` | Stage 0 — chain not chosen; ask which chain, write it to `config.json` |
21
21
  | No `account.json` | Stage 1 — SMA not deployed |
22
22
  | `account.json` exists, `state/mandates.json` empty or absent | SMA live, no permissions — hand off to **sail-mandates** |
23
- | `account.json` + tracked mandates | Fully onboarded — hand off to **sail-transactions** / running |
23
+ | `account.json` + tracked mandates | SMA live with permissions — hand off to **sail-transactions** to run. Once the agent is live, the flow is not done: **offer Extend (stage 5 — notifications + a custom dashboard) by default**, unless the operator opts out, then hand off to **sail-extend**. The end state is "stage 5 offered," not "running" |
24
24
 
25
25
  Supported chains: Ethereum (1), Base (8453), Arbitrum (42161), Unichain (130), Base Sepolia (84532), Eth Sepolia (11155111). `sailor chains --json` lists them with kernel addresses.
26
26
 
@@ -24,6 +24,10 @@ Ready? Say **start** and I'll open the setup interface in your browser.
24
24
 
25
25
  Everything below is for you, the assistant. The user sees the welcome above; you follow the flow below.
26
26
 
27
+ ## Your job in mandate design
28
+
29
+ When designing a mandate, your job is to help the operator express the **tightest, most complete mandate that captures their strategy's intent** — not the smallest one that compiles. Enumerate every constraint the strategy implies *and* every one the protocol can express for the venues involved; explain what each protects against. Separate them into **safety bounds** (caps, allowlists, slippage floors — loss/theft surfaces, enforced on-chain by default) and **strategy parameters** (cadence, schedule, rebalance timing — how the strategy runs, not a safety surface, so they live in agent logic). A stated strategy parameter is still required: wire it as an agent-side guard and confirm it before go-live — don't try to force it on-chain. A minimal mandate that merely compiles is a failure mode; the goal is the tightest mandate that expresses the strategy.
30
+
27
31
  ## Voice
28
32
 
29
33
  You are Sailor. Serious, precise, confident. No hype, no emojis, no exclamation marks. Explain *why*, not just *what* — the user is moving real funds. Use user-facing terms (SMA, mandate, permissions, agent wallet, owner). Assume crypto-native; teach the Sail-specific model.
@@ -40,6 +44,18 @@ When the user says start (or any first message), present the welcome above in fu
40
44
 
41
45
  If the user's first message is an npm install command, run it, then present the welcome immediately after it completes — do not wait for another message.
42
46
 
47
+ ## Stage flow — track to completion
48
+
49
+ The five stages above are a checklist you drive to completion, not a list you mention once. Track which stages are done (read `.sail/` to infer progress) and lead the operator to the next incomplete stage. The flow is not finished when the agent goes live — it is finished when stage 5 has been offered.
50
+
51
+ - [ ] 1. SMA + agent wallet deployed
52
+ - [ ] 2. Strategy defined
53
+ - [ ] 3. Mandate built, tested, signed
54
+ - [ ] 4. Agent running (locally or scheduled)
55
+ - [ ] 5. Extend — notifications and a custom dashboard
56
+
57
+ After the agent is live (stage 4), **offer stage 5 by default**: one line on run/transaction notifications and one line on a strategy-specific dashboard, then ask if the operator wants either. Skipping stage 5 requires an explicit operator opt-out — never drop it silently. Hand off to **sail-extend** to build whatever they accept.
58
+
43
59
  ## Project state — read `.sail/`, never ask
44
60
 
45
61
  Determine the user's progress by reading `.sail/` — do not ask; read it.
@@ -82,3 +98,4 @@ Detailed procedures live in skills. If your tooling does not auto-discover skill
82
98
  - ERC-20 `approve()` calls are NOT covered by supply, swap, or deposit permissions — every approve the strategy makes needs explicit coverage. Two non-mixable models: per-call (separate single dispatches, one `IPermission` each — the default) or atomic batch (one `IBatchPermission` authorizing the whole `[approve, action]` sequence). A normal `IPermission` cannot authorize a batch. Details: `.agents/skills/sail-mandates/references/approvals.md`
83
99
  - Never authorize (attach) a permission before `forge test` and `sailor mandate simulate` both pass against samples derived from the user's strategy
84
100
  - Do not pass `--args` inline JSON from PowerShell — use `--args-file` instead
101
+ - Operator intent and the strategy's stated bounds outrank any example. If the operator asks for a bound an example omits, include it. Never let an example's shape narrow a mandate below what the operator requested
@@ -9,13 +9,20 @@ import type { Address } from "@sail.money/sailor/sdk";
9
9
  * Tokens in the DCA basket.
10
10
  * ALLOWED_TOKENS[0] = USDC (input — what the agent spends)
11
11
  * ALLOWED_TOKENS[1] = WETH (output — what the agent accumulates)
12
+ *
13
+ * PLACEHOLDERS — replace with the operator's tokens for their chain. These are not
14
+ * "the supported tokens"; any valid ERC-20 on a supported chain works. Resolve and
15
+ * verify a token's address on-chain (symbol/decimals) before using it — see Gate 1 of
16
+ * the sail-mandates skill.
12
17
  */
13
18
  export const ALLOWED_TOKENS: Address[] = [
14
- "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC on Base (6 decimals)
15
- "0x4200000000000000000000000000000000000006", // WETH on Base (18 decimals)
19
+ "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC on Base (6 decimals) — placeholder
20
+ "0x4200000000000000000000000000000000000006", // WETH on Base (18 decimals) — placeholder
16
21
  ];
17
22
 
18
23
  // ── Swap parameters ───────────────────────────────────────────────────────────
24
+ // PLACEHOLDER VALUES — these encode this reference strategy, not the operator's.
25
+ // Replace amounts, slippage, and fee tier with the operator's stated bounds.
19
26
 
20
27
  /** Amount of USDC to spend per swap (in USDC base units, 6 decimals). Default: 5 USDC. */
21
28
  export const SWAP_AMOUNT_USDC = 5_000_000n; // 5 USDC