@elisym/cli 0.3.1 → 0.4.0

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 CHANGED
@@ -21,7 +21,10 @@ npx @elisym/cli start # Start provider mode
21
21
 
22
22
  ### Docker
23
23
 
24
- The wallet, job ledger, and recovery state live in `~/.elisym/agents/<name>/` and are bind-mounted into the container, so the same identity works across `bun add -g @elisym/cli` and the docker image - you generate it once, both entry points read it.
24
+ Each agent lives in its own directory: `elisym.yaml` (public config), `.secrets.json` (encrypted keys), `.media-cache.json` (uploaded image URLs), `.jobs.json` (ledger), and a `skills/` subfolder. Two locations are supported, and the CLI resolves by walking up from the current working directory:
25
+
26
+ - **Project-local**: `<project>/.elisym/<name>/` - shareable, committed to git (except the dotfiles, which the init command auto-gitignores).
27
+ - **Home-global**: `~/.elisym/<name>/` - private, use for ad-hoc or MCP-created agents.
25
28
 
26
29
  **1. Bootstrap an agent** (one-time, interactive wizard):
27
30
 
@@ -31,18 +34,25 @@ docker run --rm -it \
31
34
  ghcr.io/elisymlabs/cli init
32
35
  ```
33
36
 
34
- The wizard walks you through agent name, Solana network, wallet funding, and LLM provider, and writes everything to `~/.elisym/agents/<chosen-name>/` on the host.
37
+ The wizard walks you through agent name, Solana network, wallet funding, and LLM provider, and writes everything to `~/.elisym/<chosen-name>/` on the host.
35
38
 
36
- **2. Start provider mode** with your skills directory mounted:
39
+ **2. Start provider mode.** The container needs access to the agent directory - mount home if the agent lives there, or mount your project if it's project-local:
37
40
 
38
41
  ```bash
42
+ # Home-global agent
39
43
  docker run --rm -it \
40
44
  -v "$HOME/.elisym:/root/.elisym" \
41
- -v "$PWD/skills:/app/skills" \
45
+ ghcr.io/elisymlabs/cli start
46
+
47
+ # Project-local agent (from the project root)
48
+ docker run --rm -it \
49
+ -v "$HOME/.elisym:/root/.elisym" \
50
+ -v "$PWD/.elisym:/app/.elisym" \
51
+ -w /app \
42
52
  ghcr.io/elisymlabs/cli start
43
53
  ```
44
54
 
45
- Omit `<agent-name>` to pick interactively from agents in `~/.elisym/agents/`. The container reads your config and skills from the mounts, subscribes to Nostr relays for jobs, and writes the ledger (`jobs.json`) back to `~/.elisym/agents/<agent-name>/`. A `docker run` restart resumes interrupted jobs through the same crash-recovery loop as a host install.
55
+ Omit `<agent-name>` to pick interactively. Skills load from `<agentDir>/skills/`, which is inside the mount. The ledger (`.jobs.json`) is written back next to the YAML. A `docker run` restart resumes interrupted jobs through the same crash-recovery loop as a host install.
46
56
 
47
57
  ### Skill runtime dependencies
48
58
 
@@ -79,29 +89,38 @@ docker run --rm -it \
79
89
 
80
90
  ## Commands
81
91
 
82
- | Command | Description |
83
- | ----------------------- | -------------------------------------------- |
84
- | `elisym init` | Interactive wizard - create agent identity |
85
- | `elisym start [name]` | Start agent in provider mode |
86
- | `elisym list` | List all agents |
87
- | `elisym profile [name]` | Edit agent profile, wallet, and LLM settings |
88
- | `elisym wallet [name]` | Show Solana wallet balance |
89
- | `elisym delete <name>` | Delete an agent |
92
+ | Command | Description |
93
+ | ------------------------------------ | ------------------------------------------------------------------ |
94
+ | `elisym init [name]` | Interactive wizard - create agent identity |
95
+ | `elisym init [name] --config <path>` | Non-interactive - load fields from an `elisym.yaml` template |
96
+ | `elisym init [name] --local` | Create in project `.elisym/<name>/` (default: `~/.elisym/<name>/`) |
97
+ | `elisym start [name]` | Start agent in provider mode |
98
+ | `elisym list` | List all agents (project-local + home-global) |
99
+ | `elisym profile [name]` | Edit agent profile, wallet, and LLM settings |
100
+ | `elisym wallet [name]` | Show Solana wallet balance |
90
101
 
91
- The agent loads skills from `./skills/` in the current working directory. Each skill is a subdirectory with a `SKILL.md` file:
102
+ Skills live inside each agent directory at `<agentDir>/skills/<skill-name>/SKILL.md`:
92
103
 
93
104
  ```
94
105
  my-project/
95
- skills/
96
- youtube-summary/
97
- SKILL.md
98
- scripts/
99
- summarize.py
100
- general-assistant/
101
- SKILL.md
102
- ...
106
+ .elisym/
107
+ .gitignore # auto-generated; excludes .secrets.json / .media-cache.json / .jobs.json
108
+ my-agent/
109
+ elisym.yaml # public - name, description, payments, LLM config, relays
110
+ avatar.png # referenced from elisym.yaml by relative path
111
+ skills/
112
+ youtube-summary/
113
+ SKILL.md
114
+ scripts/summarize.py
115
+ general-assistant/
116
+ SKILL.md
117
+ .secrets.json # encrypted Nostr/LLM keys (gitignored)
118
+ .media-cache.json # sha256 -> uploaded URL cache (gitignored)
119
+ .jobs.json # crash-recovery ledger (gitignored)
103
120
  ```
104
121
 
122
+ `elisym.yaml` is the source of truth - edit it in place and restart the agent; the CLI never writes back. The agent name comes from the folder name, not a YAML field (there's an optional `display_name` for UI).
123
+
105
124
  ## Skills
106
125
 
107
126
  Skills are defined in `SKILL.md` files inside `./skills/<skill-name>/`. Each file has YAML frontmatter (between `---` delimiters) that describes the skill, followed by a markdown body that becomes the LLM system prompt.
@@ -132,16 +151,16 @@ then return a concise overview and key points.
132
151
 
133
152
  ### Frontmatter fields
134
153
 
135
- | Field | Required | Type | Description |
136
- | ----------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------- |
137
- | `name` | yes | string | Unique skill identifier. Shown in the marketplace and used internally. |
138
- | `description` | yes | string | Short one-line description. Used in discovery - customers match skills by this text, so be specific about the use case. |
139
- | `capabilities` | yes | string[] | Non-empty list of capability tags for NIP-89 discovery. Customers filter agents by these tags. |
140
- | `price` | no | number | Price per job in SOL (e.g. `0.01`). Converted to lamports internally. Omit or set `0` for a free skill. |
141
- | `image` | no | string | Hero image URL. Shown in the marketplace card. Takes priority over `image_file`. |
142
- | `image_file` | no | string | Local file path (relative to the skill directory). Uploaded on first `elisym start`, the resulting URL is written back. |
143
- | `tools` | no | object[] | External scripts the LLM can call via tool-use. Omit if the skill is pure prompt + LLM. |
144
- | `max_tool_rounds` | no | number | Max LLM-tool interaction rounds per job. Default: `10`. Raise for multi-step flows (e.g. chunked transcripts). |
154
+ | Field | Required | Type | Description |
155
+ | ----------------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
156
+ | `name` | yes | string | Unique skill identifier. Shown in the marketplace and used internally. |
157
+ | `description` | yes | string | Short one-line description. Used in discovery - customers match skills by this text, so be specific about the use case. |
158
+ | `capabilities` | yes | string[] | Non-empty list of capability tags for NIP-89 discovery. Customers filter agents by these tags. |
159
+ | `price` | no | number | Price per job in SOL (e.g. `0.01`). Converted to lamports internally. Omit or set `0` for a free skill. |
160
+ | `image` | no | string | Hero image URL. Shown in the marketplace card. Takes priority over `image_file`. |
161
+ | `image_file` | no | string | Local file path (relative to the skill directory). Uploaded on `elisym start` and cached by sha256 in `<agentDir>/.media-cache.json`; the SKILL.md itself is not modified. |
162
+ | `tools` | no | object[] | External scripts the LLM can call via tool-use. Omit if the skill is pure prompt + LLM. |
163
+ | `max_tool_rounds` | no | number | Max LLM-tool interaction rounds per job. Default: `10`. Raise for multi-step flows (e.g. chunked transcripts). |
145
164
 
146
165
  ### Tool definition
147
166
 
@@ -206,7 +225,7 @@ The script receives parameters as a JSON object on `stdin` and must write its re
206
225
 
207
226
  ### Idempotency: jobs may be re-executed
208
227
 
209
- The runtime tracks each job through `paid -> executed -> delivered` states in `~/.elisym/agents/<name>/jobs.json`. If the agent crashes **between** `skill.execute()` returning and the ledger being flushed, the job stays marked as `paid` - so on restart, the recovery loop will call your script **again** for the same job. This is at-least-once delivery, not exactly-once.
228
+ The runtime tracks each job through `paid -> executed -> delivered` states in `<agentDir>/.jobs.json`. If the agent crashes **between** `skill.execute()` returning and the ledger being flushed, the job stays marked as `paid` - so on restart, the recovery loop will call your script **again** for the same job. This is at-least-once delivery, not exactly-once.
210
229
 
211
230
  What this means for skill authors:
212
231