awb-agent-manager 1.6.278 → 1.6.280
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 +150 -253
- package/dist/lib/account-scope.d.ts +2 -0
- package/dist/lib/account-scope.js +24 -0
- package/dist/lib/account-scope.js.map +1 -0
- package/dist/lib/agent-context-contract.js +1 -1
- package/dist/lib/agent-context-contract.js.map +1 -1
- package/dist/lib/agent-manager-commands.js +15 -14
- package/dist/lib/agent-manager-commands.js.map +1 -1
- package/dist/lib/agent-session-runner.d.ts +2 -2
- package/dist/lib/agent-session-runner.js +3 -1
- package/dist/lib/agent-session-runner.js.map +1 -1
- package/dist/lib/base-session-manager.d.ts +2 -2
- package/dist/lib/base-session-manager.js +2 -2
- package/dist/lib/base-session-manager.js.map +1 -1
- package/dist/lib/chat-session-manager.js +3 -3
- package/dist/lib/chat-session-manager.js.map +1 -1
- package/dist/lib/clis/codex/sessions.js +2 -0
- package/dist/lib/clis/codex/sessions.js.map +1 -1
- package/dist/lib/config.d.ts +1 -1
- package/dist/lib/config.js +3 -2
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/error-log-uploader.js +1 -1
- package/dist/lib/error-log-uploader.js.map +1 -1
- package/dist/lib/event-dispatcher.d.ts +1 -1
- package/dist/lib/event-dispatcher.js +36 -35
- package/dist/lib/event-dispatcher.js.map +1 -1
- package/dist/lib/instance-heartbeat.d.ts +1 -1
- package/dist/lib/instance-heartbeat.js +1 -1
- package/dist/lib/instance-heartbeat.js.map +1 -1
- package/dist/lib/managed-agent-context.d.ts +1 -1
- package/dist/lib/managed-agent-context.js +1 -1
- package/dist/lib/managed-agent-context.js.map +1 -1
- package/dist/lib/managed-agent-store.d.ts +7 -7
- package/dist/lib/managed-agent-store.js +19 -18
- package/dist/lib/managed-agent-store.js.map +1 -1
- package/dist/lib/operational-chat-fallback.d.ts +1 -1
- package/dist/lib/operational-chat-fallback.js +8 -8
- package/dist/lib/operational-chat-fallback.js.map +1 -1
- package/dist/lib/prompts.js +4 -4
- package/dist/lib/prompts.js.map +1 -1
- package/dist/lib/rest.d.ts +9 -9
- package/dist/lib/rest.js +25 -24
- package/dist/lib/rest.js.map +1 -1
- package/dist/lib/run-provisioner.d.ts +1 -1
- package/dist/lib/run-provisioner.js +5 -4
- package/dist/lib/run-provisioner.js.map +1 -1
- package/dist/lib/setup.d.ts +1 -1
- package/dist/lib/setup.js +6 -5
- package/dist/lib/setup.js.map +1 -1
- package/dist/lib/subagent-manager.js +5 -5
- package/dist/lib/subagent-manager.js.map +1 -1
- package/dist/lib/subagent-monitor.d.ts +1 -1
- package/dist/lib/subagent-monitor.js +6 -6
- package/dist/lib/subagent-monitor.js.map +1 -1
- package/dist/lib/terminal-runner.d.ts +1 -1
- package/dist/lib/ticket-ref-capture.js +10 -10
- package/dist/lib/ticket-ref-capture.js.map +1 -1
- package/dist/main.js +15 -10
- package/dist/main.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,277 +1,132 @@
|
|
|
1
1
|
# awb-agent-manager
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
SSE + REST, owns managed Agent execution, advertises runtime capabilities, and
|
|
5
|
-
supports Hermes over the official ACP stdio protocol alongside registered CLI
|
|
6
|
-
adapters.
|
|
3
|
+
The host-side execution service for [AI Workflow Board](../../README.md). Run it on the machine where your AI CLIs, repositories, and native session history live, then pair that machine with an AWB server.
|
|
7
4
|
|
|
8
|
-
agent-manager
|
|
9
|
-
subagent supervision, fs browser, instance heartbeats, and CLI lifecycle
|
|
10
|
-
management.
|
|
11
|
-
|
|
12
|
-
The package, binary, config directory, and API retain the `agent-manager` name
|
|
13
|
-
for compatibility. Architecturally it is an execution-plane service: AWB owns
|
|
14
|
-
durable Agent identity, authorization, work state, skills, collaboration
|
|
15
|
-
policy, and audit history. There is no editor/plugin execution fallback.
|
|
16
|
-
|
|
17
|
-
See [the Runtime Host reference](../../docs/agent-manager.md) and
|
|
18
|
-
[the Hermes runtime guide](../../docs/hermes-runtime.md).
|
|
5
|
+
The architectural name is **Runtime Host**. The npm package, binary, configuration directory, and API retain `agent-manager` for compatibility. The manager handles SSE delivery, ticket/chat execution, subagent supervision, native CLI sessions, terminals, filesystem browsing, heartbeats, and CLI lifecycle. AWB owns work, authorization, runtime selection, policy, and audit records. Native transcripts remain with the CLI.
|
|
19
6
|
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
└─────────────────────────────────────┬─┘ │
|
|
27
|
-
│ HTTP (Bearer key) │
|
|
28
|
-
▼ │
|
|
29
|
-
┌─────────────────────────────────────────────────────────────────┐│
|
|
30
|
-
│ awb-agent-manager (this package) ││
|
|
31
|
-
│ ├── EventStream SSE consumer + reconnect ││
|
|
32
|
-
│ ├── EventDispatcher route → ticket / chat / fs / command ││
|
|
33
|
-
│ ├── ManagedAgents isolate / start / stop Agent runtimes ││
|
|
34
|
-
│ ├── HermesRuntime one ACP process per durable AWB Agent ││
|
|
35
|
-
│ └── InstanceHeartbeat per-process registry ping ──────────────┘
|
|
36
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
37
|
-
│ stdio
|
|
38
|
-
▼
|
|
39
|
-
hermes-acp / claude / codex / antigravity / pi / custom CLI
|
|
7
|
+
```text
|
|
8
|
+
AWB server: work, accounts, permissions, MCP tools
|
|
9
|
+
↕ SSE + REST
|
|
10
|
+
awb-agent-manager: processes, sessions, terminals, capabilities
|
|
11
|
+
↕ CLI / ACP
|
|
12
|
+
Installed runtimes + repositories + native CLI history
|
|
40
13
|
```
|
|
41
14
|
|
|
42
|
-
|
|
15
|
+
For the full application setup, start with the [main README](../../README.md). Deep reference: [Runtime Host](../../docs/agent-manager.md), [Agent Sessions](../../docs/agent-sessions.md), and [CLI modules](../../docs/cli-modules.md).
|
|
43
16
|
|
|
44
|
-
|
|
17
|
+
## Requirements
|
|
45
18
|
|
|
46
|
-
|
|
47
|
-
npm
|
|
48
|
-
|
|
49
|
-
|
|
19
|
+
- **Node.js 22+** for the published manager; **22.12+** when building the entire AWB repository.
|
|
20
|
+
- npm, and connectivity to the AWB server.
|
|
21
|
+
- A supported CLI installed/configured as the OS user running the manager. Installing this package does not install or sign in to every CLI.
|
|
22
|
+
- Git for repository checkout/worktrees. Browser terminals also need the optional PTY dependency to load successfully.
|
|
50
23
|
|
|
51
|
-
|
|
52
|
-
covers **our** tarball, but the ~95 transitive dependencies below it are
|
|
53
|
-
re-resolved from the registry at install time, and `npm i -g` would otherwise
|
|
54
|
-
run any `preinstall`/`postinstall` they carry as your user — no CVE required.
|
|
55
|
-
This package's published tree has **zero** install-script packages
|
|
56
|
-
(`scripts/audit-published-deps.mjs` re-checks that every night), and bin
|
|
57
|
-
linking is npm core rather than a lifecycle script, so the flag costs nothing.
|
|
58
|
-
|
|
59
|
-
Published to the public npm registry as
|
|
60
|
-
[`awb-agent-manager`](https://www.npmjs.com/package/awb-agent-manager) (unscoped);
|
|
61
|
-
`npm i -g` always pulls the latest release. Publishing is automated by
|
|
62
|
-
[`.github/workflows/publish-agent-manager.yml`](../../.github/workflows/publish-agent-manager.yml):
|
|
63
|
-
a push to `main` that touches the agent-manager **source** triggers a publish
|
|
64
|
-
whose version is **computed at publish time** as the npm registry `latest` +
|
|
65
|
-
patch (see [`scripts/compute-publish-version.mjs`](scripts/compute-publish-version.mjs)),
|
|
66
|
-
and that version is stamped into the tarball but **not committed back to
|
|
67
|
-
`main`**. So the `version` field in this `package.json` is only a *seed floor*
|
|
68
|
-
for the first-ever publish and is expected to trail npm's `latest` — a lower
|
|
69
|
-
value here is **by design, not drift** (ticket 433f6cbd removed the old
|
|
70
|
-
manual-bump model).
|
|
71
|
-
|
|
72
|
-
> **npm is the only distribution channel.** Self-update never fetches, checks
|
|
73
|
-
> out, or builds from a git remote — it verifies the published SLSA provenance
|
|
74
|
-
> and then runs `npm install -g awb-agent-manager@<verified version>`. When npm
|
|
75
|
-
> isn't reachable the admin badge reads "manual updates only" and nothing is
|
|
76
|
-
> updated automatically.
|
|
77
|
-
|
|
78
|
-
### Update channel
|
|
79
|
-
|
|
80
|
-
`AWB_AGENT_MANAGER_UPDATE_CHANNEL` selects what self-update tracks:
|
|
24
|
+
The host can run multiple runtimes. Ticket/chat/team/automation RuntimeSpecs and native session forms select the CLI per execution; there is no manager-wide CLI selection during setup. Capabilities and models are reported to AWB and determine what the UI offers.
|
|
81
25
|
|
|
82
|
-
|
|
83
|
-
|---|---|
|
|
84
|
-
| _(unset)_ / `latest` | Track the published release line (default). |
|
|
85
|
-
| any dist-tag (e.g. `next`) | Track a pre-release line published by the same provenance-signed workflow. |
|
|
86
|
-
| exact version (e.g. `1.6.99`) | Pin to one published build. |
|
|
87
|
-
| `off` | Disable auto-update entirely; the admin badge reads "(pinned)". |
|
|
88
|
-
|
|
89
|
-
The value is validated against the npm dist-tag/version charset — anything else
|
|
90
|
-
falls back to `latest`, so the env var can't inject arguments into the
|
|
91
|
-
`npm view` / `npm install -g` calls.
|
|
92
|
-
|
|
93
|
-
### Testing an unpublished build
|
|
94
|
-
|
|
95
|
-
Use npm's own local-tarball install — no git checkout, no registry publish:
|
|
26
|
+
## Install
|
|
96
27
|
|
|
97
28
|
```bash
|
|
98
|
-
npm
|
|
99
|
-
npm pack -w apps/agent-manager # → awb-agent-manager-<v>.tgz
|
|
100
|
-
npm i -g ./awb-agent-manager-<v>.tgz
|
|
101
|
-
export AWB_AGENT_MANAGER_UPDATE_CHANNEL=off # keep your build installed
|
|
29
|
+
npm i -g --ignore-scripts awb-agent-manager
|
|
102
30
|
awb-agent-manager --version
|
|
103
31
|
```
|
|
104
32
|
|
|
105
|
-
|
|
106
|
-
behaves exactly like a released build. Drop the env var (or set it back to
|
|
107
|
-
`latest`) to rejoin the release line. For a shared pre-release, publish to a
|
|
108
|
-
dist-tag instead (`npm publish --tag next`) and point testers at
|
|
109
|
-
`AWB_AGENT_MANAGER_UPDATE_CHANNEL=next` — that path keeps the provenance gate
|
|
110
|
-
armed, which a local tarball does not.
|
|
33
|
+
npm is the release/update channel. Self-update verifies the published package's provenance and installs from npm; it does not fetch or build a Git checkout. The `--ignore-scripts` flag matches self-update's installation path.
|
|
111
34
|
|
|
112
|
-
|
|
35
|
+
## Pair and start
|
|
113
36
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
-e AWB_AGENT_MANAGER_HOME=/data \
|
|
118
|
-
ghcr.io/parnmanas/awb-agent-manager:latest
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
The image bundles `node:22-alpine` plus the manager binary. Mount a host
|
|
122
|
-
directory for `AWB_AGENT_MANAGER_HOME` so config + lockfile survive container
|
|
123
|
-
restarts. Bind-mount each agent's working directory the same way (e.g.
|
|
124
|
-
`-v $HOME/repos:/repos`) and configure those paths inside AWB.
|
|
125
|
-
|
|
126
|
-
## First run — pairing with an AWB server
|
|
127
|
-
|
|
128
|
-
The manager bootstraps from a one-time pairing token minted by an AWB admin.
|
|
129
|
-
After redeeming, the manager stores its API key and agent identity in
|
|
130
|
-
`$AWB_AGENT_MANAGER_HOME/config.json` (default
|
|
131
|
-
`~/.config/awb-agent-manager/config.json`).
|
|
132
|
-
|
|
133
|
-
1. **Mint** — In the AWB UI: _Workspace → AI Agents → Agent Manager Runtime → Pair manager…_.
|
|
134
|
-
The dialog returns a raw token (long-form) and a 6-char display code; copy
|
|
135
|
-
either. Both are shown only once. TTL 10 minutes, single-use.
|
|
136
|
-
2. **Run the wizard** — On the host that will run the manager:
|
|
37
|
+
1. Sign in to AWB as an administrator and open **Hosts** (`/hosts`) → **Runtime Hosts** → **Pair manager…**.
|
|
38
|
+
2. Copy the pairing token or six-character code. Both are single-use and expire after ten minutes; an AWB server restart also invalidates outstanding tokens.
|
|
39
|
+
3. Run the wizard on the execution machine:
|
|
137
40
|
|
|
138
41
|
```bash
|
|
139
42
|
awb-agent-manager setup
|
|
140
43
|
```
|
|
141
44
|
|
|
142
|
-
|
|
143
|
-
- AWB server URL (e.g. `https://awb.example.com:7700`)
|
|
144
|
-
- Pairing token (paste from step 1)
|
|
145
|
-
- CLI to drive (`claude` / `codex` / `antigravity` / `pi`, default `claude`)
|
|
45
|
+
It asks for the **server base URL** and **pairing token**. For a local server use `http://localhost:7701`; for another machine use its reachable hostname or deployed HTTPS URL. Do not append `/mcp`.
|
|
146
46
|
|
|
147
|
-
|
|
148
|
-
`~/.config/awb-agent-manager/config.json` with mode 0600. Output:
|
|
47
|
+
4. Start in the foreground:
|
|
149
48
|
|
|
49
|
+
```bash
|
|
50
|
+
awb-agent-manager
|
|
150
51
|
```
|
|
151
|
-
✓ paired
|
|
152
|
-
agent_id <uuid>
|
|
153
|
-
workspace_id <uuid>
|
|
154
|
-
apiKey awb_abcd***xyz9
|
|
155
|
-
✓ wrote ~/.config/awb-agent-manager/config.json (mode 0600)
|
|
156
52
|
|
|
157
|
-
|
|
158
|
-
```
|
|
53
|
+
5. Confirm the host is online in AWB. Use **Sessions → New session**, select a ticket assignee, or declare a team/automation runtime to start work. There is no New Managed Agent creation step.
|
|
159
54
|
|
|
160
|
-
|
|
55
|
+
Setup redeems `/api/agent-manager/pair/redeem` and writes **both** `config.json` and `agent.json` with private file permissions where supported. New pairings create a Runtime Host and a host-bound key. The compatibility `agent_id` field contains the Host identity; it does not refer to an Agent database row. `account_id` is the canonical ownership field.
|
|
161
56
|
|
|
162
|
-
|
|
163
|
-
awb-agent-manager setup \
|
|
164
|
-
--url https://awb.example.com:7700 \
|
|
165
|
-
--token ABCXYZ123 \
|
|
166
|
-
--cli claude \
|
|
167
|
-
--non-interactive
|
|
168
|
-
```
|
|
57
|
+
Non-interactive setup:
|
|
169
58
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
4. **Add managed agents** — Back in AWB, open _Workspace → AI Agents_ and
|
|
179
|
-
choose _New Managed Agent_. Pick the CLI (`claude` / `codex` / `antigravity` / `pi` / `custom`),
|
|
180
|
-
point at a working directory, and leave _Spawn on this manager after create_
|
|
181
|
-
on for one-click setup. The manager provisions a per-agent apiKey, writes its
|
|
182
|
-
on-disk config + mcp-config.json, and starts routing matching ticket /
|
|
183
|
-
chat / mention events to subagents that run under that agent's identity.
|
|
184
|
-
|
|
185
|
-
Managed Codex agents also receive native MCP entries in their isolated
|
|
186
|
-
`CODEX_HOME/config.toml`. AWB is marked `required = true`, uses the
|
|
187
|
-
per-process `AWB_API_KEY` bearer token, and fails the Codex run if the MCP
|
|
188
|
-
endpoint cannot initialize. Manager restart/rehydrate and
|
|
189
|
-
`refresh_mcp_config` both repair this native config automatically.
|
|
190
|
-
|
|
191
|
-
**PI has no credential concept at all** (not even the optional per-agent
|
|
192
|
-
credential every other adapter supports) — every spawn simply inherits
|
|
193
|
-
whatever the operator already configured on the manager host via `pi
|
|
194
|
-
/login` (including a credential-free local llama.cpp server). **PI has no
|
|
195
|
-
*native* MCP client** — its own upstream philosophy is "No MCP, build an
|
|
196
|
-
extension that adds MCP support" — so instead of a native `mcp.json`,
|
|
197
|
-
`prepareCliHome` writes a small dependency-free pi extension
|
|
198
|
-
(`~/.pi/agent/extensions/awb-mcp-bridge.ts`, regenerated on every
|
|
199
|
-
spawn_agent) that hand-rolls the MCP `initialize`/`tools/list`/`tools/call`
|
|
200
|
-
handshake against AWB's Streamable HTTP endpoint using only pi's own
|
|
201
|
-
`pi.registerTool()` API and Node's built-in `fetch` — no
|
|
202
|
-
`@modelcontextprotocol/sdk` or other npm dependency, so there is no
|
|
203
|
-
per-spawn `npm install` network-failure mode. A managed PI agent therefore
|
|
204
|
-
calls `get_ticket` / `add_comment` / `move_ticket` itself, same as
|
|
205
|
-
claude/codex (see `cli-adapters/pi.ts` for the verified wire details and
|
|
206
|
-
ticket d5a6100d for the end-to-end transcript).
|
|
207
|
-
|
|
208
|
-
On manager restart, agents previously spawned this way auto-rehydrate
|
|
209
|
-
from disk — no need to re-click Spawn.
|
|
59
|
+
```bash
|
|
60
|
+
awb-agent-manager setup \
|
|
61
|
+
--url https://awb.example.com \
|
|
62
|
+
--token YOUR_PAIRING_TOKEN \
|
|
63
|
+
--instance-id my-workstation \
|
|
64
|
+
--non-interactive
|
|
65
|
+
```
|
|
210
66
|
|
|
211
|
-
|
|
67
|
+
`--instance-id` is optional (default `<hostname>-<random>`). `setup --force` overwrites an existing pairing configuration; back it up when replacing a host binding used by saved specs.
|
|
212
68
|
|
|
213
|
-
|
|
214
|
-
boot/logon and auto-restarts on crash. The installer detects your host's
|
|
215
|
-
service manager and dispatches accordingly:
|
|
69
|
+
## Run as a background service
|
|
216
70
|
|
|
217
|
-
|
|
218
|
-
|------------------------------|------------------------|----------------------------------------------------|
|
|
219
|
-
| Linux + systemd | systemd unit | `~/.config/systemd/user/awb-agent-manager.service` |
|
|
220
|
-
| Linux + Synology DSM | rc.d boot script | `/usr/local/etc/rc.d/awb-agent-manager.sh` |
|
|
221
|
-
| Linux without systemd | sysvinit | `/etc/init.d/awb-agent-manager` |
|
|
222
|
-
| macOS | launchd | `~/Library/LaunchAgents/com.awb.agent-manager.plist` |
|
|
223
|
-
| Windows | Task Scheduler | task `awb-agent-manager` (logon trigger) |
|
|
71
|
+
After verifying a foreground connection, stop that process and install the service:
|
|
224
72
|
|
|
225
73
|
```bash
|
|
226
|
-
# user scope (no admin/sudo) — runs at logon, recommended for laptops
|
|
227
74
|
awb-agent-manager service install
|
|
75
|
+
```
|
|
228
76
|
|
|
229
|
-
|
|
230
|
-
awb-agent-manager service install --system
|
|
77
|
+
The installer detects the platform, writes the service definition, and registers it. Ensure the service's OS user can find and run your CLIs, read its login configuration, and access the chosen working folders.
|
|
231
78
|
|
|
232
|
-
|
|
233
|
-
|
|
79
|
+
| Host | Backend | Default user/system location |
|
|
80
|
+
| --- | --- | --- |
|
|
81
|
+
| Linux with systemd | systemd | `~/.config/systemd/user/awb-agent-manager.service` |
|
|
82
|
+
| Synology DSM | rc.d boot script | `/usr/local/etc/rc.d/awb-agent-manager.sh` |
|
|
83
|
+
| Linux without systemd | sysvinit | `/etc/init.d/awb-agent-manager` |
|
|
84
|
+
| macOS | launchd | `~/Library/LaunchAgents/com.awb.agent-manager.plist` |
|
|
85
|
+
| Windows | Task Scheduler | Task `awb-agent-manager` (logon trigger) |
|
|
234
86
|
|
|
235
|
-
|
|
87
|
+
```bash
|
|
88
|
+
awb-agent-manager service install --dry-run # preview only
|
|
89
|
+
awb-agent-manager service install --system # boot/system scope; needs elevation
|
|
236
90
|
awb-agent-manager service install --platform sysvinit
|
|
237
|
-
|
|
238
|
-
# remove
|
|
239
|
-
awb-agent-manager service uninstall [--system]
|
|
91
|
+
awb-agent-manager service uninstall
|
|
240
92
|
```
|
|
241
93
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
The task launches through a hidden `wscript.exe` wrapper, so no npm/Node
|
|
251
|
-
console window appears. When replacing a legacy task that was registered
|
|
252
|
-
by an Administrator shell, the installer requests UAC approval automatically.
|
|
253
|
-
- macOS uses `launchctl bootstrap` on modern macOS and falls back to
|
|
254
|
-
`launchctl load -w` on older releases. Logs land in `/tmp/awb-agent-manager.log`.
|
|
94
|
+
For system-scope removal, use `service uninstall --system`.
|
|
95
|
+
|
|
96
|
+
- Linux user services normally stop at logout. `sudo loginctl enable-linger "$USER"` keeps the service running after logout.
|
|
97
|
+
- Synology and sysvinit require system scope because their service directories are root-owned.
|
|
98
|
+
- Windows user tasks start at logon. System scope uses a boot-time task running as `LocalSystem`; that account has different files, credentials, and PATH from your user. The service uses a hidden script wrapper to avoid a console window.
|
|
99
|
+
- macOS uses launchd; logs are written to `/tmp/awb-agent-manager.log`.
|
|
100
|
+
|
|
101
|
+
See [process ownership](../../docs/agent-manager.md#process-and-session-ownership) and [self-update policy](../../docs/agent-manager.md#self-update-policy) before changing an existing service.
|
|
255
102
|
|
|
256
103
|
## Configuration
|
|
257
104
|
|
|
258
|
-
|
|
259
|
-
|--------------------------------------------------|------------------|
|
|
260
|
-
| `--config <path>` flag | 1 (highest) |
|
|
261
|
-
| `$AWB_AGENT_MANAGER_HOME/config.json` | 2 |
|
|
262
|
-
| `$XDG_CONFIG_HOME/awb-agent-manager/config.json` | 3 (Linux) |
|
|
263
|
-
| `%APPDATA%\awb-agent-manager\config.json` | 3 (Windows) |
|
|
264
|
-
| `~/.config/awb-agent-manager/config.json` | 4 (fallback) |
|
|
105
|
+
Config search order:
|
|
265
106
|
|
|
266
|
-
|
|
107
|
+
| Priority | Source |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| 1 | `--config <path>` |
|
|
110
|
+
| 2 | `$AWB_AGENT_MANAGER_HOME/config.json` |
|
|
111
|
+
| 3 | `$XDG_CONFIG_HOME/awb-agent-manager/config.json` on Linux, or `%APPDATA%\awb-agent-manager\config.json` on Windows |
|
|
112
|
+
| 4 | `~/.config/awb-agent-manager/config.json` |
|
|
113
|
+
|
|
114
|
+
Pairing writes a configuration of this shape:
|
|
267
115
|
|
|
268
116
|
```json
|
|
269
117
|
{
|
|
270
118
|
"url": "https://awb.example.com",
|
|
271
|
-
"apiKey": "<
|
|
272
|
-
"
|
|
273
|
-
"agent_id": "<
|
|
274
|
-
"
|
|
119
|
+
"apiKey": "<host key from pairing>",
|
|
120
|
+
"account_id": "<pairing account UUID>",
|
|
121
|
+
"agent_id": "<Runtime Host UUID>",
|
|
122
|
+
"host_id": "<Runtime Host UUID>"
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Optional delegation settings can be added:
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
275
130
|
"delegation": {
|
|
276
131
|
"enabled": true,
|
|
277
132
|
"max_concurrent_subagents": 4
|
|
@@ -279,43 +134,85 @@ Schema (`config.json`):
|
|
|
279
134
|
}
|
|
280
135
|
```
|
|
281
136
|
|
|
282
|
-
|
|
137
|
+
Legacy `workspace_id` config is still read as `account_id`. The owner UUID and existing credential/MCP filename suffixes and native session home paths are preserved. A paired host supervises authorized work across accounts; selecting an account is not needed for ordinary host use.
|
|
138
|
+
|
|
139
|
+
| Flag | Purpose |
|
|
140
|
+
| --- | --- |
|
|
141
|
+
| `-c, --config <path>` | Override config path. |
|
|
142
|
+
| `--account <id>` | Optional manual `account_id` override. |
|
|
143
|
+
| `-w, --workspace <id>` | Deprecated alias for `--account`. |
|
|
144
|
+
| `--runtime-profile <path\|none>` | Manager-run profile override. |
|
|
145
|
+
| `-f, --force` | Lock takeover; supervised managers hand restart to their service. |
|
|
146
|
+
| `--dry-run` | Load config and exit without starting execution. |
|
|
147
|
+
| `-h, --help` | Show commands and current options. |
|
|
148
|
+
| `-v, --version` | Print the installed binary's version. |
|
|
283
149
|
|
|
284
|
-
|
|
285
|
-
|-------------------------|---------------------------------------------------------|
|
|
286
|
-
| `-c, --config <path>` | Override config.json path |
|
|
287
|
-
| `-w, --workspace <id>` | Override `workspace_id` from config |
|
|
288
|
-
| `-f, --force` | Take over a lockfile owned by a stale or live owner |
|
|
289
|
-
| `--dry-run` | Load config, log what would happen, exit |
|
|
290
|
-
| `-h, --help` | Show full usage |
|
|
291
|
-
| `-v, --version` | Print version |
|
|
150
|
+
Signals on platforms that support them:
|
|
292
151
|
|
|
293
|
-
|
|
152
|
+
| Signal | Behavior |
|
|
153
|
+
| --- | --- |
|
|
154
|
+
| `SIGTERM` / `SIGINT` | Graceful drain, release lock, exit. |
|
|
155
|
+
| `SIGHUP` | Reload config/delegation tunables. |
|
|
156
|
+
| `SIGUSR1` | Request npm self-update, draining before restart. |
|
|
157
|
+
| `SIGUSR2` | Restart in place without installing a package. |
|
|
294
158
|
|
|
295
|
-
|
|
296
|
-
|--------------|-----------------------------------------------------------|
|
|
297
|
-
| `SIGTERM`/`SIGINT` | Graceful drain (stop subagents, release lock) |
|
|
298
|
-
| `SIGHUP` | Re-read `config.json` (delegation tunables hot-reload) |
|
|
299
|
-
| `SIGUSR1` | Self-update: verify provenance, drain sessions, `npm install -g` latest, re-exec (git checkout is fallback-only when npm is unavailable) |
|
|
300
|
-
| `SIGUSR2` | Unconditional restart: re-exec in place, no version check / install / build. Use for on-disk config that's only read at startup (e.g. `--runtime-profile`), where SIGUSR1 would no-op because the package version didn't change |
|
|
159
|
+
The service retains runtime-local files for resume/recovery. These filesystem identities are separate from optional **Agent templates**, which only copy reusable preferences into new execution forms.
|
|
301
160
|
|
|
302
|
-
##
|
|
161
|
+
## Updates
|
|
162
|
+
|
|
163
|
+
Hosts shows the running version, installed version, and whether restart is required. Installing a newer global package does not replace code already loaded by the process; use the Hosts update/restart action to apply it.
|
|
164
|
+
|
|
165
|
+
`AWB_AGENT_MANAGER_UPDATE_CHANNEL` selects the update target:
|
|
166
|
+
|
|
167
|
+
| Value | Behavior |
|
|
168
|
+
| --- | --- |
|
|
169
|
+
| unset / `latest` | Published release line. |
|
|
170
|
+
| dist-tag, e.g. `next` | A release line published by the same provenance-signed workflow. |
|
|
171
|
+
| exact version | Pin the update target to that published version. |
|
|
172
|
+
| `off` | Disable automatic updates. |
|
|
173
|
+
|
|
174
|
+
The channel selects **what** can be installed; update policy controls **when**. Automatic scheduled updates use the documented approval policy. Manual actions, draining, retry/backoff, and service restart details are in [self-update policy](../../docs/agent-manager.md#self-update-policy).
|
|
175
|
+
|
|
176
|
+
The [publishing workflow](../../.github/workflows/publish-agent-manager.yml) computes the release version at publish time and records it in the tarball/tag, without committing it back to `main`. The source `package.json` version is a seed floor and may lag the published release. Do not bump it manually. README/test-only changes do not trigger a package publish.
|
|
177
|
+
|
|
178
|
+
## Development and unpublished builds
|
|
179
|
+
|
|
180
|
+
From the repository root:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
npm ci --ignore-scripts
|
|
184
|
+
npm run build # client + server + manager
|
|
185
|
+
npm run dev:agent-manager # local manager, requires pairing config
|
|
186
|
+
npm test -w awb-agent-manager
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
To test the compiled binary without starting it:
|
|
303
190
|
|
|
304
191
|
```bash
|
|
305
|
-
|
|
306
|
-
npm install # workspace install at the repo root also works
|
|
307
|
-
npm run build # tsc → dist/
|
|
308
|
-
npm run dev # tsx watch src/main.ts
|
|
309
|
-
node dist/main.js -h
|
|
192
|
+
node apps/agent-manager/dist/main.js --help
|
|
310
193
|
```
|
|
311
194
|
|
|
312
|
-
|
|
195
|
+
To install an unpublished local package:
|
|
313
196
|
|
|
314
197
|
```bash
|
|
315
|
-
|
|
316
|
-
npm
|
|
317
|
-
|
|
198
|
+
npm run build -w awb-agent-manager
|
|
199
|
+
npm pack -w awb-agent-manager
|
|
200
|
+
# Replace the filename with the tarball printed by npm pack.
|
|
201
|
+
npm i -g --ignore-scripts "./awb-agent-manager-<version>.tgz"
|
|
318
202
|
```
|
|
319
203
|
|
|
320
|
-
|
|
321
|
-
|
|
204
|
+
Set `AWB_AGENT_MANAGER_UPDATE_CHANNEL=off` **in the environment of the process/service** so automatic updates do not replace that build. Restore the normal channel to return to published releases. A local tarball is for local testing and does not have registry provenance.
|
|
205
|
+
|
|
206
|
+
Manager source/wire changes require a full repository build and coordinated server changes. Follow the [release runbook](../../docs/runbooks/agent-manager-release.md).
|
|
207
|
+
|
|
208
|
+
## Troubleshooting
|
|
209
|
+
|
|
210
|
+
- **Host offline:** verify the URL/key, network access, and service logs. Re-pair with a fresh token if the binding was lost.
|
|
211
|
+
- **CLI missing in AWB:** check the executable and login as the service's OS user, then refresh capabilities/models in Hosts.
|
|
212
|
+
- **Session does not resume:** preserve the native CLI history and manager homes; check the pinned credential/backend and [session troubleshooting](../../docs/agent-sessions.md#운영-메모).
|
|
213
|
+
- **Terminals unavailable:** the optional PTY module must load on that platform. See [Terminals](../../docs/terminals.md).
|
|
214
|
+
- **Updated but behavior is old:** compare running and installed versions; restart the supervised process through Hosts.
|
|
215
|
+
|
|
216
|
+
## License
|
|
217
|
+
|
|
218
|
+
[MIT](LICENSE).
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export function normalizeAccountScope(value) {
|
|
2
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
3
|
+
return value;
|
|
4
|
+
const record = value;
|
|
5
|
+
if (!Object.prototype.hasOwnProperty.call(record, 'workspace_id'))
|
|
6
|
+
return value;
|
|
7
|
+
const normalized = { ...record };
|
|
8
|
+
if (normalized.account_id === undefined)
|
|
9
|
+
normalized.account_id = record.workspace_id;
|
|
10
|
+
delete normalized.workspace_id;
|
|
11
|
+
return normalized;
|
|
12
|
+
}
|
|
13
|
+
export function normalizeAccountEnvelope(value) {
|
|
14
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
15
|
+
return value;
|
|
16
|
+
let normalized = normalizeAccountScope(value);
|
|
17
|
+
for (const key of ['payload', 'args', 'run_provision', 'ticket', 'ticket_context']) {
|
|
18
|
+
const child = normalizeAccountEnvelope(normalized[key]);
|
|
19
|
+
if (child !== normalized[key])
|
|
20
|
+
normalized = { ...normalized, [key]: child };
|
|
21
|
+
}
|
|
22
|
+
return normalized;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=account-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-scope.js","sourceRoot":"","sources":["../../src/lib/account-scope.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,qBAAqB,CAAI,KAAQ;IAC/C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9E,MAAM,MAAM,GAAG,KAAgC,CAAC;IAChD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,cAAc,CAAC;QAAE,OAAO,KAAK,CAAC;IAChF,MAAM,UAAU,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC;IACjC,IAAI,UAAU,CAAC,UAAU,KAAK,SAAS;QAAE,UAAU,CAAC,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC;IACrF,OAAO,UAAU,CAAC,YAAY,CAAC;IAC/B,OAAO,UAAe,CAAC;AACzB,CAAC;AAMD,MAAM,UAAU,wBAAwB,CAAI,KAAQ;IAClD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9E,IAAI,UAAU,GAAG,qBAAqB,CAAC,KAAK,CAA4B,CAAC;IACzE,KAAK,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,gBAAgB,CAAC,EAAE,CAAC;QACnF,MAAM,KAAK,GAAG,wBAAwB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;QACxD,IAAI,KAAK,KAAK,UAAU,CAAC,GAAG,CAAC;YAAE,UAAU,GAAG,EAAE,GAAG,UAAU,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC;IAC9E,CAAC;IACD,OAAO,UAAe,CAAC;AACzB,CAAC"}
|
|
@@ -117,7 +117,7 @@ export function buildAgentContextContract(input) {
|
|
|
117
117
|
version: AGENT_CONTEXT_VERSION,
|
|
118
118
|
authority: ['system_policy', 'role_instructions', 'project_instructions', 'task', 'prior_progress'],
|
|
119
119
|
assignment: {
|
|
120
|
-
|
|
120
|
+
accountId: compact(ticket.account_id, 256),
|
|
121
121
|
...(boardId ? { boardId } : {}),
|
|
122
122
|
ticketId: compact(ticket.id, 256),
|
|
123
123
|
role: compact(input.role, 120),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-context-contract.js","sourceRoot":"","sources":["../../src/lib/agent-context-contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE5E,MAAM,CAAC,MAA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