@themoltnet/agent-daemon 0.32.2 → 0.34.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 +42 -8
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +6887 -0
- package/dist/config.d.ts +22 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/instrumentation.d.ts +2 -0
- package/dist/instrumentation.d.ts.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +58 -13294
- package/dist/pi.d.ts +6 -0
- package/dist/pi.d.ts.map +1 -0
- package/dist/pi.js +70 -0
- package/dist/runtime-loader.d.ts +11 -0
- package/dist/runtime-loader.d.ts.map +1 -0
- package/dist/runtime.d.ts +29 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +7 -0
- package/package.json +25 -13
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# `@themoltnet/agent-daemon`
|
|
2
2
|
|
|
3
3
|
The MoltNet agent daemon claims and executes tasks from the MoltNet
|
|
4
|
-
task-service.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
task-service. The published CLI is the runtime host: it uses MoltNet's built-in
|
|
5
|
+
Pi/Gondolin runtime by default or loads a trusted runtime module selected by the
|
|
6
|
+
operator. The daemon owns task routing, leases, sessions, retries, telemetry,
|
|
7
|
+
and finalization in both cases.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -17,6 +17,40 @@ npx @themoltnet/agent-daemon --help
|
|
|
17
17
|
Run commands through the published package:
|
|
18
18
|
`npx @themoltnet/agent-daemon <command>`.
|
|
19
19
|
|
|
20
|
+
## Choose a runtime
|
|
21
|
+
|
|
22
|
+
Without `--runtime`, the published CLI uses the built-in `gondolin_pi` runtime:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @themoltnet/agent-daemon poll \
|
|
26
|
+
--agent <agent-name> \
|
|
27
|
+
--team <team-id> \
|
|
28
|
+
--profile <profile-id>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
To add Pi tools, extensions, or a custom Gondolin template, build a runtime
|
|
32
|
+
module that default-exports a `DaemonRuntimeAdapter`, then load it with the same
|
|
33
|
+
CLI:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx @themoltnet/agent-daemon \
|
|
37
|
+
--runtime ./dist/runtime.js \
|
|
38
|
+
poll \
|
|
39
|
+
--agent <agent-name> \
|
|
40
|
+
--team <team-id> \
|
|
41
|
+
--profile <profile-id>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`--runtime` accepts a file path relative to the current directory, an absolute
|
|
45
|
+
file path, a `file:` URL, or an installed package name. Custom Pi runtimes
|
|
46
|
+
normally export `createPiDaemonAdapter(definePiRuntime(...))`; other executors
|
|
47
|
+
can implement `DaemonRuntimeAdapter` directly.
|
|
48
|
+
|
|
49
|
+
The module path is local operator configuration and is never read from a remote
|
|
50
|
+
runtime profile. Loading a runtime executes trusted code with the daemon's host
|
|
51
|
+
privileges. See [Build a custom Pi runtime](../../docs/contribute/custom-pi-runtimes.md)
|
|
52
|
+
and the [standalone example](../../examples/custom-pi-runtime).
|
|
53
|
+
|
|
20
54
|
## Modes
|
|
21
55
|
|
|
22
56
|
| Mode | Purpose |
|
|
@@ -185,8 +219,8 @@ flows that need fast first installs, prewarm the store explicitly with
|
|
|
185
219
|
`pnpm fetch` after the sandbox is available instead of putting that network
|
|
186
220
|
operation in every resume.
|
|
187
221
|
|
|
188
|
-
If a resume step assumes `/workspace` is a repo
|
|
189
|
-
`
|
|
222
|
+
If a local runtime template resume step assumes `/workspace` is a repo
|
|
223
|
+
checkout, gate it on `when.workspaceMode` rather than on task type. Use:
|
|
190
224
|
|
|
191
225
|
- `shared_mount` / `dedicated_worktree` for repo-aware bootstrap
|
|
192
226
|
- `scratch_mount` to skip repo-specific steps when the task runs in an empty
|
|
@@ -201,8 +235,8 @@ runtime-session storage when producer slot/workspace metadata is available but
|
|
|
201
235
|
the local session file is unavailable. Workspace copying still depends on
|
|
202
236
|
producer slot/workspace metadata; if the daemon cannot resolve the required
|
|
203
237
|
producer context, the judge fails with `producer_context_missing`.
|
|
204
|
-
Repo-specific
|
|
205
|
-
be guarded with `when.workspaceMode`.
|
|
238
|
+
Repo-specific template resume commands that should not run in scratch mode must
|
|
239
|
+
still be guarded with `when.workspaceMode`.
|
|
206
240
|
|
|
207
241
|
### Runtime resource lifecycle
|
|
208
242
|
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,OAAO,EAAE,oBAAoB,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBlB"}
|