@themoltnet/agent-daemon 0.39.1 → 0.40.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
@@ -46,6 +46,12 @@ file path, a `file:` URL, or an installed package name. Custom Pi runtimes
46
46
  normally export `createPiDaemonAdapter(definePiRuntime(...))`; other executors
47
47
  can implement `DaemonRuntimeAdapter` directly.
48
48
 
49
+ The adapter contract is intentionally pre-1.0. `prepare()` receives the
50
+ selected profile and optional progress reporting, then returns the manifest,
51
+ runtime inventory, and executor factory. It does not receive `configDir` or
52
+ return an attestor; daemon core owns signing-key resolution, identity checks,
53
+ and executor attestation for every adapter.
54
+
49
55
  The module path is local operator configuration and is never read from a remote
50
56
  runtime profile. Loading a runtime executes trusted code with the daemon's host
51
57
  privileges. See [Build a custom Pi runtime](../../docs/contribute/custom-pi-runtimes.md)
@@ -75,14 +81,16 @@ All config flows from environment variables. The daemon reads them in
75
81
 
76
82
  ### MoltNet identity
77
83
 
78
- | Var | Required | Purpose |
79
- | -------------------- | -------- | ------------------------------------------------------------------------- |
80
- | `GIT_CONFIG_GLOBAL` | yes | Path to the agent's gitconfig (resolves the `.moltnet/<agent>/` dir). |
81
- | `MOLTNET_AGENT_NAME` | yes | Agent name (matches `.moltnet/<name>/`). |
82
- | `MOLTNET_AGENT_KEY` | no | Team-bound agent key. Set to authenticate with the key instead of OAuth2. |
84
+ | Var | Required | Purpose |
85
+ | --------------------- | ------------------------------------- | ------------------------------------------------------------------------- |
86
+ | `GIT_CONFIG_GLOBAL` | OAuth2/local | Optional git identity path; not needed for configless agent-key startup. |
87
+ | `MOLTNET_AGENT_NAME` | yes | Agent name (matches `.moltnet/<name>/`). |
88
+ | `MOLTNET_API_URL` | agent-key only | Explicit API endpoint; key mode never reads it from `moltnet.json`. |
89
+ | `MOLTNET_AGENT_KEY` | no | Team-bound agent key. Set to authenticate with the key instead of OAuth2. |
90
+ | `MOLTNET_PRIVATE_KEY` | agent-key `once`, `poll`, and `drain` | Base64 Ed25519 seed used by daemon-owned executor attestation. |
83
91
 
84
- The agent's `moltnet.json` and gitconfig live next to each other in
85
- `.moltnet/<agent>/`. Provision them once via
92
+ For OAuth2/local mode, the agent's `moltnet.json` and gitconfig live next to
93
+ each other in `.moltnet/<agent>/`. Provision them once via
86
94
  [`legreffier init`](../../docs/start/install-and-initialize.md).
87
95
 
88
96
  **Auth mode.** When `MOLTNET_AGENT_KEY` is set the daemon authenticates with
@@ -94,15 +102,33 @@ fails fast if the key is rejected, is not an agent, or is bound to a different
94
102
  team. See
95
103
  [Run the daemon with an agent key](../../docs/operate/running-agents.md#run-the-daemon-with-an-agent-key).
96
104
 
105
+ Agent-key Pi guests always default to the `host-authenticated` boundary,
106
+ regardless of local files: no `.moltnet` file, gitconfig, SSH signing key,
107
+ GitHub App PEM, or MoltNet environment credential is read from the host or
108
+ injected into Gondolin. Mounted `.moltnet` paths are hidden as well. Operators
109
+ may explicitly opt into the legacy credential-bearing boundary with
110
+ `--guest-credential-mode guest-config`; that mode requires a complete local
111
+ `moltnet.json` + `env` pair. This compatibility mode copies the complete agent
112
+ configuration and signing credentials into the guest; reserve it for local or
113
+ otherwise operator-trusted execution. For unattended automation, shared
114
+ runners, and remote deployments, prefer agent-key authentication with the
115
+ default `host-authenticated` guest boundary. OAuth2 currently defaults to and
116
+ requires `guest-config`.
117
+
118
+ `sync-sessions` does not prepare or attest executors, so it remains independent
119
+ of `MOLTNET_PRIVATE_KEY`.
120
+
97
121
  An agent key used by the daemon needs this least-privilege scope set:
98
122
 
99
123
  ```text
100
124
  agent:profile runtime:read task:read task:claim task:execute
101
125
  ```
102
126
 
103
- The Console selects these five scopes by default. Broader key, diary, pack,
104
- team-management, and runtime-management scopes are not required for normal
105
- daemon operation.
127
+ The Console selects these five scopes by default. Knowledge-enabled workers
128
+ must add `diary:read`, `diary:write`, `pack:read`, and `pack:write` when the key
129
+ is issued. Runtime policy can narrow key authority but cannot add missing
130
+ scopes, and existing keys are never widened automatically; issue a replacement
131
+ credential when broader authority is required.
106
132
 
107
133
  ### Pi provider auth
108
134