@themoltnet/agent-daemon 0.56.2 → 0.57.1

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.
Files changed (3) hide show
  1. package/README.md +42 -39
  2. package/dist/cli.js +2127 -2049
  3. package/package.json +10 -9
package/README.md CHANGED
@@ -8,21 +8,30 @@ and finalization in both cases.
8
8
 
9
9
  ## Install
10
10
 
11
+ Install the signed bundle, then use `moltnet-agent` for normal operation:
12
+
13
+ ```bash
14
+ curl -fsSL https://themolt.net/install/agent | sh
15
+ moltnet-agent --help
16
+ ```
17
+
18
+ On platforms with Node.js, npm remains the portable fallback. A global install
19
+ provides the same `moltnet-agent` executable; `npx` can run the package ad hoc:
20
+
11
21
  ```bash
12
22
  npm i -g @themoltnet/agent-daemon
13
- # or, ad-hoc:
23
+ moltnet-agent --help
24
+
25
+ # Ad hoc fallback; downloads the npm package when needed.
14
26
  npx @themoltnet/agent-daemon --help
15
27
  ```
16
28
 
17
- Run commands through the published package:
18
- `npx @themoltnet/agent-daemon <command>`.
19
-
20
29
  ## Choose a runtime
21
30
 
22
31
  Without `--runtime`, the published CLI uses the built-in `gondolin_pi` runtime:
23
32
 
24
33
  ```bash
25
- npx @themoltnet/agent-daemon poll \
34
+ moltnet-agent poll \
26
35
  --agent <agent-name> \
27
36
  --team <team-id> \
28
37
  --profile <profile-id>
@@ -33,7 +42,7 @@ module that default-exports a `DaemonRuntimeAdapter`, then load it with the same
33
42
  CLI:
34
43
 
35
44
  ```bash
36
- npx @themoltnet/agent-daemon \
45
+ moltnet-agent \
37
46
  --runtime ./dist/runtime.js \
38
47
  poll \
39
48
  --agent <agent-name> \
@@ -67,11 +76,11 @@ and the [standalone example](../../examples/custom-pi-runtime).
67
76
  | `sync-sessions` | Repair remote runtime-session uploads from local daemon slots. |
68
77
 
69
78
  ```bash
70
- npx @themoltnet/agent-daemon once --task-id <uuid>
71
- npx @themoltnet/agent-daemon poll --task-types fulfill_brief,assess_brief
72
- npx @themoltnet/agent-daemon poll --task-types freeform
73
- npx @themoltnet/agent-daemon drain
74
- npx @themoltnet/agent-daemon sync-sessions --team <uuid> --agent <name> --dry-run
79
+ moltnet-agent once --task-id <uuid>
80
+ moltnet-agent poll --task-types fulfill_brief,assess_brief
81
+ moltnet-agent poll --task-types freeform
82
+ moltnet-agent drain
83
+ moltnet-agent sync-sessions --team <uuid> --agent <name> --dry-run
75
84
  ```
76
85
 
77
86
  ## Configuration
@@ -89,9 +98,18 @@ All config flows from environment variables. The daemon reads them in
89
98
  | `MOLTNET_AGENT_KEY` | no | Team- or identity-scoped agent key. Overrides `moltnet.json`. |
90
99
  | `MOLTNET_PRIVATE_KEY` | configless `once`, `poll`, `drain` | Base64 Ed25519 seed used by daemon-owned executor attestation. |
91
100
 
92
- For config-based runs, the agent's `moltnet.json` and gitconfig live next to
93
- each other in `.moltnet/<agent>/`. Provision them once via
94
- [`moltnet agents init`](../../docs/start/install-and-initialize.md#initialize-an-autonomous-agent).
101
+ For config-based runs, the agent's `moltnet.json` lives in the central store
102
+ (`~/.config/moltnet/identities/<agent>/`) or, for an external config, next to
103
+ its gitconfig in `.moltnet/<agent>/`. Three paths create it:
104
+
105
+ - The Console's Local Runtime page creates a managed agent through the Agent
106
+ Server: keypair and agent key generated on this machine, stored under the
107
+ store's `secrets/` directory, no CLI involved.
108
+ - [`moltnet register`](../../docs/start/install-and-initialize.md#register-an-agent)
109
+ creates an OAuth2 identity from the CLI; add a stored agent key with
110
+ `moltnet agents keys create --store` before running the daemon.
111
+ - [`moltnet agents init`](../../docs/start/install-and-initialize.md#coding-agents-initialize-an-identity)
112
+ does the same for coding agents that need git and GitHub.
95
113
 
96
114
  **The daemon runs on an agent key only.** OAuth2 client_credentials is not
97
115
  accepted: it hands the daemon the full 17-scope agent grant against a six-scope
@@ -178,26 +196,13 @@ Codex subscription OAuth with `moltnet-agent providers`. The canonical command
178
196
  guide and local/Ollama Cloud examples are in
179
197
  [Running Agents: Provider Management](../../docs/operate/running-agents.md#provider-management).
180
198
 
181
- The daemon resolves Pi config from the repository-local `.pi` directory by
182
- default for direct runs. On startup, if `PI_CODING_AGENT_DIR` is not already set, the daemon
183
- sets it to `<repo-root>/.pi` before creating Pi sessions. This keeps daemon
184
- runs deterministic and avoids inheriting user-level `~/.pi/agent` state.
185
-
186
- Repo-local `.pi/settings.json` and `.pi/models.json` are intended to be
187
- committed. `models.json` should reference provider keys by environment-variable
188
- name, for example `"apiKey": "OLLAMA_API_KEY"`, not contain secret values.
189
- Repo-local `.pi/auth.json` may exist for local subscription auth, but is
190
- gitignored. Without `.pi/auth.json`, Pi falls back to environment-variable
191
- provider keys:
192
-
193
- ```bash
194
- export ANTHROPIC_API_KEY=sk-ant-...
195
- # or any other provider listed in
196
- # https://github.com/badlogic/pi-mono/blob/main/packages/ai/src/env-api-keys.ts
197
- ```
199
+ Direct runs use that provider store when it has a provider or a login, layered
200
+ over the repository-local `.pi`; `PI_CODING_AGENT_DIR` overrides both. See
201
+ [Running Agents: Repository Pi Config](../../docs/operate/running-agents.md#repository-pi-config).
198
202
 
199
- To force a non-repo Pi directory, set
200
- `PI_CODING_AGENT_DIR=/abs/path/to/.pi-or-agent-dir` before starting the daemon.
203
+ Committed `.pi/models.json` should reference provider keys by environment
204
+ variable name, for example `"apiKey": "$OLLAMA_API_KEY"`, never secret values.
205
+ `.pi/auth.json` is gitignored.
201
206
 
202
207
  ### Observability
203
208
 
@@ -264,12 +269,10 @@ registered task type; unknown task-type names remain invalid.
264
269
  ### Prerequisites
265
270
 
266
271
  - Docker running.
267
- - Pi config for the model provider you'll drive the daemon with. Local daemon
268
- runs default `PI_CODING_AGENT_DIR` to repo-local `.pi`, so committed
269
- `.pi/settings.json` and `.pi/models.json` must list the provider/model. For
270
- subscription auth, put your local token blob in `.pi/auth.json`; it is
271
- gitignored. For API-key auth, keep `.pi/auth.json` absent and export the
272
- provider key referenced by `.pi/models.json`, for example `OLLAMA_API_KEY`.
272
+ - A Pi provider for the profile's provider/model: configure it with
273
+ `moltnet-agent providers set` or `providers login`, or list it in
274
+ `.pi/models.json` and export the key it references, for example
275
+ `OLLAMA_API_KEY`.
273
276
  - `ssh-keygen` on `PATH`.
274
277
  - A runtime profile in the target team. The profile supplies provider, model,
275
278
  sandbox policy, and runtime defaults. The daemon resolves the configured