@themoltnet/agent-daemon 0.42.1 → 0.44.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
@@ -81,13 +81,13 @@ All config flows from environment variables. The daemon reads them in
81
81
 
82
82
  ### MoltNet identity
83
83
 
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. |
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- or identity-scoped agent key. Set to authenticate instead of OAuth2. |
90
+ | `MOLTNET_PRIVATE_KEY` | agent-key `once`, `poll`, and `drain` | Base64 Ed25519 seed used by daemon-owned executor attestation. |
91
91
 
92
92
  For OAuth2/local mode, the agent's `moltnet.json` and gitconfig live next to
93
93
  each other in `.moltnet/<agent>/`. Provision them once via
@@ -96,24 +96,47 @@ each other in `.moltnet/<agent>/`. Provision them once via
96
96
  **Auth mode.** When `MOLTNET_AGENT_KEY` is set the daemon authenticates with
97
97
  that key as an opaque bearer token (no OAuth2 exchange); otherwise it uses the
98
98
  OAuth2 client-credentials from `moltnet.json`. The key is read from the
99
- environment only — never store it in `moltnet.json`. Because a key is bound to
100
- exactly one team, the daemon reconciles `--team` against the key at startup and
101
- fails fast if the key is rejected, is not an agent, or is bound to a different
102
- team. See
99
+ environment only — never store it in `moltnet.json`. The daemon reconciles a
100
+ team-bound key against `--team` at startup; an identity-scoped key may select
101
+ any team where the agent is authorized. It fails fast if the key is rejected,
102
+ is not an agent, or a team binding mismatches. See
103
103
  [Run the daemon with an agent key](../../docs/operate/running-agents.md#run-the-daemon-with-an-agent-key).
104
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`.
105
+ Daemon authentication and guest credential projection are two separate
106
+ boundaries. How the daemon authenticates (an agent key, or OAuth2 resolved
107
+ from `.moltnet/<agent>/moltnet.json` through the host secret provider) decides
108
+ how the host-side SDK `Agent` is built. `--guest-credential-mode` decides
109
+ whether the local agent credential tree is copied into Gondolin. Pi guests
110
+ default to the `host-authenticated` boundary in **both** auth modes, regardless
111
+ of local files: no `.moltnet` file, gitconfig, SSH signing key, GitHub App PEM,
112
+ or MoltNet environment credential is injected into Gondolin, and mounted
113
+ `.moltnet` paths are hidden. Structured MoltNet tools execute through the
114
+ host-side `Agent`. Operators may explicitly opt into the legacy
115
+ credential-bearing boundary with `--guest-credential-mode guest-config`; that
116
+ mode requires a complete local `moltnet.json` + `env` pair and copies the
117
+ complete agent configuration and signing credentials into the guest. Reserve it
118
+ for local or otherwise operator-trusted tasks that genuinely need guest-shell
119
+ MoltNet CLI, Git signing, or GitHub authentication. OAuth2 daemons that relied
120
+ on the previous `guest-config` default for such tasks must now pass the flag
121
+ explicitly.
122
+
123
+ Trusted custom runtimes can deliver destination-bound HTTP credentials without
124
+ switching to `guest-config`: the guest receives an opaque placeholder and the
125
+ Gondolin host proxy substitutes the value only for the attested protocol,
126
+ hostname pattern, and port (HTTPS/443 by default). See
127
+ [Host-brokered HTTP credentials](../../docs/operate/running-agents.md#host-brokered-http-credentials).
128
+ This does not provide diary or Git commit signing; private-key operations remain
129
+ host capabilities.
130
+
131
+ Host capabilities replace the last reason for `guest-config`: the stock runtime
132
+ declares `agent-signing`, so `git commit -S` and `moltnet entry create-signed`
133
+ work inside the guest while the seed stays on the host (the daemon injects a
134
+ signer bound to the authenticated identity and projects a non-secret gitconfig,
135
+ an `SSH_AUTH_SOCK` service, and `MOLTNET_SIGNER_URL`). Grant
136
+ `capability:agent-signing` (or per-operation `capability:agent-signing:<op>`)
137
+ in the tool policy. `--git-author "Name <email>"` / `MOLTNET_GIT_AUTHOR`
138
+ overrides the projected git identity. See
139
+ [Host capabilities](../../docs/operate/running-agents.md#host-capabilities).
117
140
 
118
141
  `sync-sessions` does not prepare or attest executors, so it remains independent
119
142
  of `MOLTNET_PRIVATE_KEY`.