@dev.sail.money/sailor 1.2.0-75 → 1.2.0-77
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/README.md +4 -1
- package/package.json +2 -1
- package/packages/cli/dist/index.cjs +296 -206
- package/packages/sdk/dist/intelligence.d.ts +1 -1
- package/packages/sdk/dist/intelligence.js +1 -1
- package/scripts/check-docs.mjs +1 -1
- package/scripts/check-init.mjs +16 -13
- package/scripts/check-update.mjs +177 -0
- package/templates/default/.agents/skills/sail-automation/SKILL.md +50 -0
- package/templates/default/.agents/skills/sail-automation/references/docker-vm.md +113 -0
- package/templates/default/.agents/skills/sail-automation/references/github-actions.md +50 -0
- package/templates/default/.agents/skills/sail-automation/references/local-daemon.md +34 -0
- package/templates/default/.agents/skills/sail-automation/references/self-hosted-runner.md +72 -0
- package/templates/default/.agents/skills/sail-onboarding/SKILL.md +2 -0
- package/templates/default/AGENTS.md +1 -1
- package/templates/default/Dockerfile +18 -0
- package/templates/default/_dockerignore +15 -0
- package/templates/default/.agents/skills/sail-ci/SKILL.md +0 -63
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sail-ci
|
|
3
|
-
description: Run the agent unattended — cloud (GitHub Actions cron + workflow_dispatch), a local OS service (sailor service install), or on-demand via the trigger seam (sailor trigger github) — with cadence guidance and the committed-keystore trust model. Use after sailor run --once works.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Sail CI — automating the agent
|
|
7
|
-
|
|
8
|
-
Confirm `sailor run --once` works first. Three hosts run the same loop; pick by latency, privacy, and ops:
|
|
9
|
-
|
|
10
|
-
- **Cloud** — GitHub Actions cron + `workflow_dispatch`. Zero infra; cron drifts (see Cadence).
|
|
11
|
-
- **Local daemon** — `sailor service install`. Private, no committed keys, lower latency, no GitHub — you run the host.
|
|
12
|
-
- **Event-driven** — an external system fires a run via the trigger seam (a keeper/watcher on a price move or deposit). The direction, not yet built; today the seam is `sailor trigger github`.
|
|
13
|
-
|
|
14
|
-
## Cadence
|
|
15
|
-
|
|
16
|
-
Match the interval to volatility: **LP / perp → minutes; DCA / rebalance → daily; treasury → hourly–daily.** Actions cron is a *heartbeat/backstop* that drifts and skips under load — not low-latency; for that, use an external trigger or the local daemon.
|
|
17
|
-
|
|
18
|
-
## Cloud: GitHub Actions
|
|
19
|
-
|
|
20
|
-
`.github/workflows/agent-tick.yml` runs `npx sailor run --once` on cron (default hourly `0 * * * *`, a generic placeholder — tune `cron` to your strategy per Cadence above; `workflow_dispatch` enables manual/external runs), via `npm ci`. `CHAIN_ID` comes from the repo variable (default `8453`).
|
|
21
|
-
|
|
22
|
-
1. **Export** — `sailor keys export-ci` writes the geth-v3 encrypted `ci-keystore.json` (raw key never exposed) and allowlists it in `.gitignore`.
|
|
23
|
-
2. **Commit** the non-secret files (`npm install` first for the lockfile):
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
git add ci-keystore.json package-lock.json .sail/account.json .sail/config.json .sail/mandate.json
|
|
27
|
-
git commit -m "chore: add CI keystore and sail state" && git push
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
3. **Secrets** (Settings → Secrets and variables → Actions): `SAIL_PASSPHRASE`, `RPC_URL`. If not Base, set the repo **variable** `CHAIN_ID`.
|
|
31
|
-
4. **Drive with `gh`** (needs the `workflow` scope — `gh auth login --scopes workflow`):
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
gh secret set SAIL_PASSPHRASE && gh secret set RPC_URL
|
|
35
|
-
gh workflow run agent-tick.yml # manual run
|
|
36
|
-
gh run list --workflow agent-tick.yml # history
|
|
37
|
-
gh run view --log # latest logs
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## On-demand / external trigger
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
sailor trigger github # fire workflow_dispatch — the same job cron runs
|
|
44
|
-
# --reason <text> --ref <branch> --workflow <file> --repo <owner/repo> --json
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Wakes the agent between cron ticks — the seam keepers, watchers, or your backend call.
|
|
48
|
-
|
|
49
|
-
## Local daemon
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
sailor service install --interval 300 # launchd/systemd/Task Scheduler; restarts on crash
|
|
53
|
-
sailor service status | stop | uninstall
|
|
54
|
-
sailor service logs -f # .sail/agent.log
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
`--project`/`--chain` scope it; `--force` overrides a TCC path or unresolved passphrase.
|
|
58
|
-
|
|
59
|
-
## Keys & trust
|
|
60
|
-
|
|
61
|
-
Cloud commits only the **encrypted** keystore; `SAIL_PASSPHRASE` is a secret, never committed (the same value the dashboard stores locally at `0600`). Whoever triggers or submits, the on-chain **mandate is the backstop**, bounding the manager regardless of host — choose cloud vs local with that in mind.
|
|
62
|
-
|
|
63
|
-
A failing run's logs show the same stderr as the local runner (`reverted: <txHash>`, `skipped: no registered permission…`) — debug with the sail-transactions skill.
|