@themoltnet/agent-daemon 0.16.0 → 0.18.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.
Files changed (3) hide show
  1. package/README.md +24 -8
  2. package/dist/main.js +908 -243
  3. package/package.json +9 -8
package/README.md CHANGED
@@ -50,8 +50,17 @@ The agent's `moltnet.json` and gitconfig live next to each other in
50
50
 
51
51
  ### Pi provider auth
52
52
 
53
- Pi resolves provider credentials in this order: `~/.pi/agent/auth.json` (if
54
- present) wins, else environment variables. For CI prefer env vars:
53
+ The daemon resolves Pi config from the repository-local `.pi` directory by
54
+ default. On startup, if `PI_CODING_AGENT_DIR` is not already set, the daemon
55
+ sets it to `<repo-root>/.pi` before creating Pi sessions. This keeps daemon
56
+ runs deterministic and avoids inheriting user-level `~/.pi/agent` state.
57
+
58
+ Repo-local `.pi/settings.json` and `.pi/models.json` are intended to be
59
+ committed. `models.json` should reference provider keys by environment-variable
60
+ name, for example `"apiKey": "OLLAMA_API_KEY"`, not contain secret values.
61
+ Repo-local `.pi/auth.json` may exist for local subscription auth, but is
62
+ gitignored. Without `.pi/auth.json`, Pi falls back to environment-variable
63
+ provider keys:
55
64
 
56
65
  ```bash
57
66
  export ANTHROPIC_API_KEY=sk-ant-...
@@ -59,7 +68,8 @@ export ANTHROPIC_API_KEY=sk-ant-...
59
68
  # https://github.com/badlogic/pi-mono/blob/main/packages/ai/src/env-api-keys.ts
60
69
  ```
61
70
 
62
- To use a non-default auth directory: `PI_CODING_AGENT_DIR=/abs/path/to/.pi/agent`.
71
+ To force a non-repo Pi directory, set
72
+ `PI_CODING_AGENT_DIR=/abs/path/to/.pi-or-agent-dir` before starting the daemon.
63
73
 
64
74
  ### Observability
65
75
 
@@ -87,6 +97,11 @@ current directory. Configure host-side auto-approval there, not in task data:
87
97
  Set `"autoApprove": true` only for isolated hosts where every built-in
88
98
  host-exec command is safe to run without a dialog.
89
99
 
100
+ ### Remote runtime profiles
101
+
102
+ The canonical user-facing guide lives in the public docs:
103
+ [Agent Daemon § Remote runtime profiles](https://docs.themolt.net/use/agent-daemon.html#remote-runtime-profiles).
104
+
90
105
  ## Correlation anchors
91
106
 
92
107
  When a `fulfill_brief` task carries a non-null `correlationId`, the daemon
@@ -121,11 +136,12 @@ registered task type; unknown task-type names remain invalid.
121
136
  ### Prerequisites
122
137
 
123
138
  - Docker running.
124
- - pi authenticated for the model provider you'll drive the daemon with
125
- (`~/.pi/agent/auth.json` should already contain entries for `anthropic`
126
- and/or `openai-codex` — set up via the normal pi/legreffier onboarding). The
127
- daemon does **not** read `ANTHROPIC_API_KEY` from env at the smoke-test path
128
- (CI is the exception — see [Pi provider auth](#pi-provider-auth) above).
139
+ - Pi config for the model provider you'll drive the daemon with. Local daemon
140
+ runs default `PI_CODING_AGENT_DIR` to repo-local `.pi`, so committed
141
+ `.pi/settings.json` and `.pi/models.json` must list the provider/model. For
142
+ subscription auth, put your local token blob in `.pi/auth.json`; it is
143
+ gitignored. For API-key auth, keep `.pi/auth.json` absent and export the
144
+ provider key referenced by `.pi/models.json`, for example `OLLAMA_API_KEY`.
129
145
  - `ssh-keygen` on `PATH`.
130
146
  - A `sandbox.json` at the repo root, or an explicit `--sandbox <path>` when
131
147
  starting the daemon. The daemon searches up for this file and uses its