@ours.network/fleet 1.1.0-nightly.26 → 1.1.0-nightly.28
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 +12 -4
- package/dist/application/task-room-service.d.ts +1 -1
- package/dist/application/task-room-service.js +43 -12
- package/dist/build-info.json +4 -4
- package/dist/creation.js +4 -2
- package/dist/docs.d.ts +1 -1
- package/dist/docs.js +8 -2
- package/dist/owner-channel/channel.d.ts +11 -0
- package/dist/owner-channel/channel.js +136 -15
- package/dist/owner-channel/commands.d.ts +17 -0
- package/dist/owner-channel/commands.js +47 -0
- package/dist/owner-channel/ours-client.d.ts +19 -0
- package/dist/owner-channel/ours-client.js +3 -0
- package/dist/rooms-tasks/cli.js +2 -0
- package/dist/rooms-tasks/close.js +2 -2
- package/dist/rooms-tasks/cowork-adapter.d.ts +4 -0
- package/dist/rooms-tasks/cowork-adapter.js +7 -0
- package/dist/rooms-tasks/types.d.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -78,8 +78,7 @@ The state dir contract:
|
|
|
78
78
|
|
|
79
79
|
| What | Why | Install |
|
|
80
80
|
|---|---|---|
|
|
81
|
-
| Node ≥
|
|
82
|
-
| Node ≥ 22 | Claude roles using `session: acp` | required by the maintained Claude ACP adapter |
|
|
81
|
+
| Node ≥ 22 | runs `ours-fleet` and its maintained adapters | nodejs.org, `apt`, or `brew` |
|
|
83
82
|
| a harness CLI, logged in | the agent itself | e.g. Claude Code (`claude`) or Codex CLI (`codex`) |
|
|
84
83
|
| `ours` CLI + shared daemon | identity + agent-to-agent messaging | `npm i -g @ours.network/cli && ours daemon start` |
|
|
85
84
|
|
|
@@ -99,8 +98,8 @@ Native Codex roles use the logged-in Codex CLI's `app-server` command directly.
|
|
|
99
98
|
The maintained Codex and Claude ACP adapters remain bundled optional dependencies
|
|
100
99
|
and are resolved internally; users do not install adapter commands or add them to
|
|
101
100
|
`PATH`. Explicit `session_options.codex_app_server.command` and
|
|
102
|
-
`session_options.acp.command` overrides remain available.
|
|
103
|
-
|
|
101
|
+
`session_options.acp.command` overrides remain available. ours-fleet and its
|
|
102
|
+
maintained adapters require Node 22 or newer.
|
|
104
103
|
|
|
105
104
|
Each OS user manages their own fleet — to host roles under a sandboxed account,
|
|
106
105
|
become that account and repeat.
|
|
@@ -1060,6 +1059,15 @@ unchanged. The registry in `src/owner-channel/commands.ts` is the single source
|
|
|
1060
1059
|
of truth — `/help` renders exactly that table, so adding an entry there is the
|
|
1061
1060
|
whole registration step for a new command.
|
|
1062
1061
|
|
|
1062
|
+
The supervisor also advertises every primary registry entry through ours typed
|
|
1063
|
+
commands. The menu's `arguments` field is converted back to the exact text after
|
|
1064
|
+
the slash command name and enters the same dispatcher, so validation, replies,
|
|
1065
|
+
lifecycle effects, and audit behavior stay identical. Aliases remain available
|
|
1066
|
+
as slash commands but are not duplicated in the typed menu. Typed handlers
|
|
1067
|
+
re-check the authenticated sender CID against the live Owner boundary before
|
|
1068
|
+
dispatch; the SDK completion result is `null` because the existing correlated
|
|
1069
|
+
owner-channel reply remains the command result.
|
|
1070
|
+
|
|
1063
1071
|
| Command | Effect |
|
|
1064
1072
|
| --- | --- |
|
|
1065
1073
|
| `/help` (alias `/commands`) | list all deterministic owner-channel commands |
|
|
@@ -22,7 +22,7 @@ export interface TaskSettlementPlan {
|
|
|
22
22
|
settlementRequired: boolean;
|
|
23
23
|
}
|
|
24
24
|
export type TaskRecoveryIssue = {
|
|
25
|
-
code: 'terminal_pending' | 'waiting_cowork' | 'waiting_owner_invite' | 'owner_cid_mismatch' | 'waiting_seats' | 'provisioning_resumed';
|
|
25
|
+
code: 'terminal_pending' | 'waiting_cowork' | 'waiting_owner_authorization' | 'waiting_owner_invite' | 'owner_cid_mismatch' | 'waiting_seats' | 'provisioning_resumed';
|
|
26
26
|
} | {
|
|
27
27
|
code: 'member_failed';
|
|
28
28
|
stepIndex: number;
|
|
@@ -16,6 +16,7 @@ import { withFileLock } from '../atomic-file.js';
|
|
|
16
16
|
import { launchFleetWorker } from '../rooms-tasks/external-worker.js';
|
|
17
17
|
import { storedRoomLaunchPolicy, TASK_CANCELLABLE_STATES, TASK_TERMINAL_STATES } from '../rooms-tasks/types.js';
|
|
18
18
|
import { deriveTaskRoomName } from '../rooms-tasks/task-room-name.js';
|
|
19
|
+
const OWNER_ROOM_COMMANDS = ['list-members', 'remove-member'];
|
|
19
20
|
function recordCanonicalRoomCreated(room) {
|
|
20
21
|
recordFleetAuditPresentation({ kind: 'room', operation: 'create',
|
|
21
22
|
eventId: `room-created:${room.created_at}`, id: room.room_id,
|
|
@@ -235,15 +236,17 @@ export class TaskRoomApplicationService {
|
|
|
235
236
|
const ready = task.state === 'active' && room?.state === 'active'
|
|
236
237
|
&& active === expected && launched === expected;
|
|
237
238
|
const blocker = task.outcome?.summary ?? task.blocked?.reason ?? room?.saga.error;
|
|
238
|
-
const nextAction = room?.provisioning_detail === '
|
|
239
|
-
? '
|
|
240
|
-
: room?.provisioning_detail === '
|
|
241
|
-
? '
|
|
242
|
-
: room?.provisioning_detail === '
|
|
243
|
-
? '
|
|
244
|
-
:
|
|
245
|
-
?
|
|
246
|
-
:
|
|
239
|
+
const nextAction = room?.provisioning_detail === 'waiting_owner_authorization'
|
|
240
|
+
? 'Restore ours-cowork, then await the same task to retry Owner command authorization.'
|
|
241
|
+
: room?.provisioning_detail === 'waiting_owner_invite'
|
|
242
|
+
? 'Rotate rooms.owner.public_invite, then await the same task.'
|
|
243
|
+
: room?.provisioning_detail === 'owner_cid_mismatch'
|
|
244
|
+
? 'Verify rooms.owner.expected_cid, rotate the Owner invite, then await the same task.'
|
|
245
|
+
: room?.provisioning_detail === 'waiting_cowork'
|
|
246
|
+
? 'Restore ours-cowork, then await the same task.'
|
|
247
|
+
: failed
|
|
248
|
+
? `Correct the blocker, then run ours-fleet task recover ${task.task_id}.`
|
|
249
|
+
: undefined;
|
|
247
250
|
return {
|
|
248
251
|
kind: failed ? 'failed' : ready ? 'ready' : 'in_progress', task, room,
|
|
249
252
|
handle: { command: `ours-fleet task await ${task.task_id}`, task_id: task.task_id },
|
|
@@ -462,7 +465,9 @@ export class TaskRoomApplicationService {
|
|
|
462
465
|
return { kind: 'provisioning_resume_failed', task, room, issues };
|
|
463
466
|
}
|
|
464
467
|
}
|
|
465
|
-
if (room.
|
|
468
|
+
if (room.saga.phase === 'attach_owner'
|
|
469
|
+
|| room.provisioning_detail === 'waiting_owner_authorization'
|
|
470
|
+
|| room.provisioning_detail === 'waiting_owner_invite'
|
|
466
471
|
|| room.provisioning_detail === 'owner_cid_mismatch') {
|
|
467
472
|
try {
|
|
468
473
|
await this.recoverRoom({ actor: input.actor, roomId: room.room_id });
|
|
@@ -484,6 +489,8 @@ export class TaskRoomApplicationService {
|
|
|
484
489
|
};
|
|
485
490
|
if (room.provisioning_detail === 'waiting_cowork')
|
|
486
491
|
issues.push({ code: 'waiting_cowork' });
|
|
492
|
+
if (room.provisioning_detail === 'waiting_owner_authorization')
|
|
493
|
+
issues.push({ code: 'waiting_owner_authorization' });
|
|
487
494
|
if (room.provisioning_detail === 'waiting_owner_invite')
|
|
488
495
|
issues.push({ code: 'waiting_owner_invite' });
|
|
489
496
|
if (room.provisioning_detail === 'owner_cid_mismatch')
|
|
@@ -631,14 +638,27 @@ export class TaskRoomApplicationService {
|
|
|
631
638
|
throw new Error(error);
|
|
632
639
|
}
|
|
633
640
|
}
|
|
641
|
+
if (orchestration?.owner_seat_cid) {
|
|
642
|
+
const ownerCid = orchestration.owner_seat_cid.toLowerCase();
|
|
643
|
+
const ownerSeat = room.seats.find(seat => seat.identity_cid.toLowerCase() === ownerCid && seat.seat_state !== 'removed');
|
|
644
|
+
if (ownerSeat)
|
|
645
|
+
await adapter.setRoleCommands(input.roomId, {
|
|
646
|
+
role: ownerSeat.role, commands: [...OWNER_ROOM_COMMANDS],
|
|
647
|
+
});
|
|
648
|
+
}
|
|
634
649
|
if (orchestration && !orchestration.owner_seat_cid
|
|
635
|
-
&& (orchestration.
|
|
650
|
+
&& (orchestration.saga.phase === 'attach_owner'
|
|
651
|
+
|| orchestration.provisioning_detail === 'waiting_owner_authorization'
|
|
652
|
+
|| orchestration.provisioning_detail === 'waiting_owner_invite'
|
|
636
653
|
|| orchestration.provisioning_detail === 'owner_cid_mismatch')) {
|
|
637
654
|
const expected = cfg.rooms.owner.expected_cid.toLowerCase();
|
|
638
655
|
const existing = (await adapter.getSeats(input.roomId))
|
|
639
656
|
.find(seat => seat.identity_cid.toLowerCase() === expected && seat.seat_state !== 'removed');
|
|
640
657
|
if (!existing && !cfg.ownerInvite)
|
|
641
658
|
throw new ConfigError('rooms.owner: configure public_invite or public_invite_file before recovery');
|
|
659
|
+
await adapter.setRoleCommands(input.roomId, {
|
|
660
|
+
role: existing?.role ?? cfg.rooms.owner.role, commands: [...OWNER_ROOM_COMMANDS],
|
|
661
|
+
});
|
|
642
662
|
let acceptedCid = existing?.identity_cid;
|
|
643
663
|
if (!acceptedCid)
|
|
644
664
|
acceptedCid = (await adapter.acceptInvite(input.roomId, cfg.ownerInvite, {
|
|
@@ -654,6 +674,8 @@ export class TaskRoomApplicationService {
|
|
|
654
674
|
issues.push('Recovery guidance is recorded; inspect role logs for diagnostics.');
|
|
655
675
|
if (orchestration?.provisioning_detail === 'waiting_cowork')
|
|
656
676
|
issues.push('Check ours-cowork service status');
|
|
677
|
+
if (orchestration?.provisioning_detail === 'waiting_owner_authorization')
|
|
678
|
+
issues.push('Restore Cowork availability, then re-run recover');
|
|
657
679
|
if (orchestration?.provisioning_detail === 'waiting_owner_invite')
|
|
658
680
|
issues.push('Rotate rooms.owner.public_invite in config, then re-run recover');
|
|
659
681
|
if (orchestration?.provisioning_detail === 'waiting_seats')
|
|
@@ -951,8 +973,17 @@ export class TaskRoomApplicationService {
|
|
|
951
973
|
await checkpointFleetAuditPresentations();
|
|
952
974
|
room = advanceSaga(room.room_id, 'create_room', 1);
|
|
953
975
|
if (attachOwner) {
|
|
976
|
+
room = advanceSaga(room.room_id, 'attach_owner', 2);
|
|
977
|
+
try {
|
|
978
|
+
await cowork.setRoleCommands(room.room_id, {
|
|
979
|
+
role: rooms.owner.role, commands: [...OWNER_ROOM_COMMANDS],
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
catch (error) {
|
|
983
|
+
setSagaError(room.room_id, error instanceof Error ? error.message : String(error), 'Restore Cowork availability, then run room recover to configure Owner command authorization.', 'waiting_owner_authorization');
|
|
984
|
+
throw error;
|
|
985
|
+
}
|
|
954
986
|
try {
|
|
955
|
-
room = advanceSaga(room.room_id, 'attach_owner', 2);
|
|
956
987
|
const accepted = await cowork.acceptInvite(room.room_id, cfg.ownerInvite, {
|
|
957
988
|
role: rooms.owner.role, expected_cid: rooms.owner.expected_cid,
|
|
958
989
|
});
|
package/dist/build-info.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.1.0-nightly.
|
|
3
|
-
"buildId": "
|
|
4
|
-
"commit": "
|
|
2
|
+
"version": "1.1.0-nightly.28",
|
|
3
|
+
"buildId": "761c569df66f",
|
|
4
|
+
"commit": "c03ee4d380feb9e12fcc503785f3d81203026c2a",
|
|
5
5
|
"dirty": true,
|
|
6
|
-
"builtAt": "2026-09-
|
|
6
|
+
"builtAt": "2026-09-04T14:31:02.540Z",
|
|
7
7
|
"capabilities": [
|
|
8
8
|
"monitor.interrupt.after_tool"
|
|
9
9
|
]
|
package/dist/creation.js
CHANGED
|
@@ -258,11 +258,13 @@ export function daemonIdentityProvisioner(env = process.env, attachClient = atta
|
|
|
258
258
|
const before = await client.listIdentities();
|
|
259
259
|
const existing = before.find(identity => identity.name === name);
|
|
260
260
|
if (existing) {
|
|
261
|
+
if (!('kind' in existing))
|
|
262
|
+
throw new Error(`identity '${name}' is quarantined; refusing to replace it`);
|
|
261
263
|
if (existing.temp)
|
|
262
264
|
throw new Error(`identity '${name}' exists but is temporary; refusing to convert or adopt it`);
|
|
263
265
|
return; // another reconciler won the create race
|
|
264
266
|
}
|
|
265
|
-
if (!before.some(identity => identity.kind === 'root'))
|
|
267
|
+
if (!before.some(identity => 'kind' in identity && identity.kind === 'root'))
|
|
266
268
|
throw new Error(`cannot create role identity '${name}': this host has no Human identity; run ours onboarding first`);
|
|
267
269
|
let createdHere = false;
|
|
268
270
|
try {
|
|
@@ -279,7 +281,7 @@ export function daemonIdentityProvisioner(env = process.env, attachClient = atta
|
|
|
279
281
|
// accept only the compatible permanent identity now visible.
|
|
280
282
|
const after = await client.listIdentities();
|
|
281
283
|
const raced = after.find(identity => identity.name === name);
|
|
282
|
-
if (!raced || raced.temp)
|
|
284
|
+
if (!raced || !('kind' in raced) || raced.temp)
|
|
283
285
|
throw error;
|
|
284
286
|
}
|
|
285
287
|
if (createdHere && profile.persona && client.setPersona)
|
package/dist/docs.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Keep this concise enough to place directly in an agent context. Unlike
|
|
5
5
|
* Commander's per-command help, this describes how the pieces compose.
|
|
6
6
|
*/
|
|
7
|
-
export declare const AI_DOCS = "# ours-fleet reference\n\nours-fleet runs persistent or temporary, identity-bound AI roles through a\nprovider-neutral managed-session interface:\n\n- harness: `claude-code` or `codex`\n- session: `acp` (default) or `codex-app-server` (Codex only)\n- lifetime: permanent (supervised, restartable) or `spawn --temp`\n\n## Discover and validate\n\n```sh\nours-fleet docs # this complete reference (`man` is an alias)\nours-fleet help <command> # exact flags for one command\nours-fleet config [-c FILE] # validate and print the merged plan; no changes\nours-fleet doctor [-c FILE] [--harness codex|claude-code]\nours-fleet version [--json] # build identity, capabilities, every install on PATH\n```\n\nConfiguration v2 is `~/fleet.yaml` plus typed bare documents under the exact\nstem directories `~/fleet/agents`, `~/fleet/agent_templates`, `~/fleet/roles`, `~/fleet/brains`, and\n`~/fleet/room_templates`.\nThe manifest owns fleet-wide operational defaults and automation; each Agent\nselects one inline/ref Role and Brain and carries its operational fields.\nAgent Templates under `~/fleet/agent_templates` are inert reusable launch definitions;\nonly explicit files under `~/fleet/agents` are persistent lifecycle instances.\nRoom members use `agent_template` and receive immutable content-addressed snapshots.\nAn Agent Template may declare up to 64 temporary-only named `loops`; persistent Agent\ninstances reject them. Each loop requires `interval` (1m..30d) and bounded\nnonblank `prompt`, with optional `enabled` (default true), `initial_delay`\n(default interval, 0s..30d), and `jitter` (default 0s, < interval, <=1h).\nExecution is fixed skip-if-busy with no ordinary missed-tick backlog/replay;\nrestart recovery may preserve at most one recent late occurrence.\nLegacy top-level `roles:` and `fleet.d` are rejected. Validate the complete\ntrusted source set with `config` and `doctor` before starting or restarting.\n\nPermanent `spawn` writes `~/fleet/agents/Name.yaml`. The web console edits an\nexplicit `{manifest, agents, agent_templates}` model while Role/Brain presets remain read-only.\nIts aggregate revision includes every Agent/Role/Brain/Room-template source, previews a\nredacted per-document diff in an exact-stem private staging tree, and saves under\none root lock with a private multi-file backup and full rollback. A no-op is\nbyte-identical and creates no backup.\n\n## Build identity and install provenance\n\n`--version` prints a semver and nothing else, and a semver does NOT identify an\nartifact. Version bumps land in a release commit of their own, so every build cut\nbetween two releases carries the PREVIOUS version while already containing new\nbehaviour. One host ran two installs that both reported 0.16.0 \u2014 same version,\ndifferent build. One accepted `monitor.interrupt: after_tool`, the other\nrejected it as invalid. Their\n`dist/cli.js` were byte-identical \u2014 the divergence was in other modules.\n\nEvery build therefore stamps `dist/build-info.json` with a build id (first 12 hex\nof a sha256 over the rest of `dist/`), the commit it was cut from, and the\ncapability tokens the shipped code declares \u2014 for example\n`monitor.interrupt.after_tool`. Ask any executable what it is:\n\n```sh\nours-fleet version # ours-fleet 0.17.0+9f1c2a3b4d5e, capabilities, PATH installs\nours-fleet version --json # the same as machine-readable JSON, no environment values\n```\n\nRead a capability, never a version number, to decide whether a setting is\nsupported. When a build rejects a value it knows the name of, it says which\ncapability is missing and which build rejected it, because another install on the\nsame host may accept the identical file. `config` prints the build that resolved\nthe plan; `status <Name>` says so when the build reporting on a role is not the\none that created it (roles record their creating build in `creation.json`).\n\n`ours-fleet doctor` runs an `install` check that lists every `ours-fleet` on\nPATH plus the one executing, and FAILS when two installs share a semver but are\ndifferent builds, or when the running artifact is a DIFFERENT artifact from the\none PATH resolves to. A second prefix holding identical content is not a skew\nand is not reported. A PATH entry the shell would not execute \u2014 a directory, or\na file without its execute bit \u2014 is not counted as an install at all.\nInstalls built before this stamp existed report `+unknown`; they are compared by\nhashing their `dist/` instead, so two pre-provenance installs are still told\napart. To fix a flagged host, remove or update the stale install \u2014 do not rely on\nPATH order.\n\n## Lifecycle and console commands\n\n```sh\nours-fleet init [-c FILE] # interactive missing-default seed; TTY required\nours-fleet up|down [Name...]\nours-fleet restart [Name...] # preserve/resume harness context\nours-fleet force-restart [Name...] # fresh context; briefing is reloaded\nours-fleet ls\nours-fleet status|peek|attach|logs Name\nours-fleet logs -f Name\nours-fleet send Name \"prompt\"\nours-fleet rm Name\nours-fleet watchdog-report <name> [run-id] [--list] [--json]\nours-fleet watchdog-run <name>\n```\n\n`init` is an interactive missing-default workflow that preserves existing files byte-for-byte.\nIt names the resolved manifest and split directory, asks a default-No confirmation,\nthen subscriptions (Codex, Claude, or both), model assignment (one explicit model for\nevery job or explicit development/review/coordination choices), one reasoning level,\nand a final default-No review. Quick/Balanced/Thorough generate low/medium/high.\nModel pickers show packaged supported IDs; catalog membership is not a recommendation\nor entitlement claim. Run `ours-fleet doctor` for local Codex availability; Claude\nentitlement is checked when a role launches. The generated brains contain no\n`model_chain`, so Fleet never silently substitutes another model.\n\nAt either confirmation, N, Enter, Escape, Ctrl-C, Ctrl-D, or EOF cancels. In a picker,\nEscape, Ctrl-C, Ctrl-D, or EOF cancels; Enter records the highlight or continues a\nnon-empty multi-select, N is ignored, and an empty subscription selection remains blocked.\nEvery cancellation before final approval performs no host or configuration mutation.\nRedirected/non-TTY invocation is refused with the same guarantee. After the final Yes,\nhost setup precedes publication. Path ownership/type/mode/symlink and\nsame-filesystem checks run before host setup and again under a per-setup lock. Publication\nstages and validates the complete combined setup, backs up whichever old target(s) exist,\nand retains a private recovery record. A hard process/host termination cannot promise\nrollback; inspect host integration and private init stage/recovery evidence.\n\n`peek`, `attach`, and text `send` use the structured agent session.\nAttachment also accepts `/permit <permission-id> <option-id>`, `/interrupt`,\nand `/detach`.\n\n## Local web console\n\nThe npm package includes the web console; installed users do not clone the repo\nor run `npm run build`:\n\n```sh\nnpm i -g @ours.network/fleet\nours-fleet init\nours-fleet doctor\nours-fleet web # install/update service, start, pair browser\n```\n\nThe normal command uses stable `http://127.0.0.1:49271/`, installs an\nowner-level systemd user service (Linux) or LaunchAgent (macOS), and opens a\nfive-minute one-use pairing link in the local browser. After pairing, bookmark\nthe plain URL or install the PWA. To pair a new, signed-out, or revoked browser,\nrun `ours-fleet web open`.\n\n```sh\nours-fleet web status\nours-fleet web start|stop|restart\nours-fleet web open\nours-fleet web revoke-all # revoke every browser and active session\nours-fleet web uninstall\nours-fleet web serve --port 0 --no-open # isolated foreground/testing mode\n```\n\nThe console is IPv4-loopback-only by default. Both `localhost` and\n`127.0.0.1` are accepted locally. For an nginx/TLS reverse proxy, keep the\ndefault bind and declare the exact browser origin:\n\n`ours-fleet web install --public-origin https://fleet.example.com --password-file /secure/fleet-password`\n\nFleet reads the password file during setup and persists only a salted scrypt\nverifier. New browsers authenticate and retain rotating HttpOnly/SameSite\ntrusted-device credentials. If nginx already authenticates, the operator may\ndeliberately select `--no-password`; the CLI and browser warn that anyone\nreaching the origin can control the fleet. First setup requires an explicit\nchoice: `--password-file` or `--pairing` for protected access, or\n`--no-password` for intentional unprotected access.\n\nUse `--bind ADDRESS` only for an intentional direct listen. A non-loopback\nbind is rejected unless `--public-origin` is also present. Host/Origin checks\nuse the declaration and do not trust forwarded headers. Configure nginx to\nproxy HTTP and WebSocket upgrades to `127.0.0.1:49271` and terminate TLS;\nfleet accepts nginx's loopback upstream Host, so no Host rewrite is required.\nBrowser credentials add Secure for HTTPS, and `revoke-all` invalidates all\ntrusted devices. Role creation offers harness-scoped known-model choices\nwhile still accepting a typed model ID; blank explicitly uses the selected\nharness's own default.\n\n## Spawn\n\n```sh\nours-fleet spawn [--temp] [Name | --name Name] \\\n --brain BRAIN_ID --role ROLE_ID \\\n --cwd /absolute/path --identity Identity --coordinator Coordinator \\\n --approval ask|auto|allow \\\n --filesystem read-only|workspace|unrestricted \\\n --unattended deny|wait --isolation-file /path/isolation.yaml\n```\n\nPermanent spawn writes `~/fleet/agents/Name.yaml` and starts a supervised role.\n`--temp` writes active state under `~/.ours-fleet/tmp` and starts an independent\ntransient supervisor (a collected systemd unit or submitted launchd job). It is\nnot enabled across reboot and does not die when the role that spawned it restarts.\nBrain definitions own the managed session backend. When a temporary role's bound identity\ncloses or its session ends, the supervisor, monitor and live roster entry retire\ntogether; state moves intact to `~/.ours-fleet/recovery/temporary` with a\ntermination record. Failed launches use the same archive rather than deleting\ntheir briefing, provenance, logs or partial supervisor metadata.\n\nNamed `down` and `rm` commands can target an exact state-backed temporary role\neven though it is absent from merged fleet YAML. The recorded transient unit/job\nis authoritative. Missing/incomplete ownership metadata is reconciled only from\nan exact `_run-temp <role>` process-table match: one match may be adopted, zero\nsettles as stopped, and ambiguity or an unreadable table fails closed. Launching\nrecords receive a bounded grace so a not-yet-registered transient unit cannot be\nmistaken for a stopped one. Stale recorded supervisors are reclaimed in bounded\nbatches by moving their state to the same recovery archive, never by blind deletion.\n\nEvery temporary role creates a new session-owned identity by calling ours MCP\n`create_temporary_identity` with its exact assigned name. It never binds a\npre-existing identity and never falls back to permanent `create_identity`.\nFleet does not inspect, preserve, or provision an ours identity for temporary\nspawn; creation belongs exclusively to the launched temporary agent session.\nCollisions, missing tool support, and creation errors stop safely without\nforce-adopting or deleting identity state. Permanent roles\nare provisioned by fleet before launch and never delegate normal identity\ncreation to the harness.\n\nThe temporary supervisor treats its first positive identity observation as the\nlifecycle readiness gate: a cold harness may take as long as needed to read its\nbriefing and bind, without a fixed first-bind retirement timer. After readiness,\nonly sustained authoritative absence closes the role. Unreachable, malformed, or\nvalid-but-empty daemon indexes are ambiguous and reset closure debounce rather\nthan becoming cleanup authority.\n\nInside a managed role, public `ours-fleet` commands cross an authenticated\nsupervisor attribution boundary before Commander parsing. The original CLI remains\nthe executor inside the role's existing OS sandbox, and ordinary CLI validation is\nthe source of truth. Hidden worker entry points remain internal; public lifecycle and\noperator commands are not restricted by the proxy.\n\nCommand invocation, raw argv, read-only work, validation failures, and generic\noutcomes are never forwarded to the Owner-visible channel. Fleet announces only\nconfirmed Agent, Task, and Room lifecycle changes. Local diagnostics retain\nstructurally redacted command metadata. Lifecycle delivery uncertainty is logged,\nnever recursively announced, and never reruns or blindly retries an effect.\nRoom participant summaries describe creation and activation. Fleet has no public\npost-create Room membership mutation, so it does not claim a separate membership event.\n\nOmitted Brain and Role selections, working directory, coordinator, neutral permissions,\nand fleet monitor policy inherit from the calling Agent. Explicit options always win.\nIdentity, mission/profile text, environment, owner routing, auth proxy, room startup,\nisolation, worklog, and sensitive inline Brain values never inherit implicitly.\nThis automatic proxy is a convenience and\nattribution mechanism, not an isolation boundary: an unrestricted role can still\ninvoke another binary path directly. Host/operator shells keep the ordinary direct\nCLI behavior.\n\nBrain owns harness, session, model, reasoning effort, token limits, and native harness\noptions. Removed runtime flags are rejected with migration guidance rather than silently\nreinterpreted. A selection is a stable ID or an explicit `inline:{...}` mapping.\n\nPackaged Developer, Critic, and LocalCoordinator Agent Templates set\n`monitor: { mode: fleet, interrupt: after_tool }`. Every member of the standard\n`single`, `pair`, and `team` Room Templates therefore resolves to fleet-owned,\nafter-tool delivery. Explicit per-member and custom Agent Template values remain\nauthoritative and merge key by key.\n\n## fleet.yaml\n\n```yaml\napi_version: ours.network/fleet/v2\nvars:\n work_root: /home/me/work\nstart_stagger_ms: 0\ndefaults:\n permissions:\n approval: ask\n filesystem: workspace\n unattended: deny\n monitor:\n mode: fleet # fleet (default) | native\nwatchdogs:\n nightwatch: # [A-Za-z0-9_-], must not collide with a role name\n coordinator: FleetCoordinator # required \u2014 where alerts go\n # everything below is optional\n enabled: true # default true; false = configured but never scheduled\n interval: 10m # default 10m; 30s | 10m | 2h, minimum 1m\n watch: [Alice, CodexReviewer] # explicit lists are exact; omit for configured + live temp roles\n agent: { ref: WatchdogAgent } # required: declared Agent ID, or canonical inline Agent definition\n identity: Watchdog-nightwatch # default: Watchdog-<name>\n timeout: 5m # default 5m; a run past this is killed and recorded as error\n keep_reports: 50 # default 50 reports retained per watchdog\n alert_cooldown: 60m # default 60m before the same finding alerts again\n prompt_file: /abs/extra.md # optional extra focus, APPENDED to the fixed contract\n```\n\nAn Agent is a separate bare document under `~/fleet/agents/<ID>.yaml`:\n\n```yaml\nrole: { inline: { mission: Coordinate work and delegate implementation. } }\nbrain: { inline: { harness: codex, session: codex-app-server, model: gpt-model-id } }\nidentity: Coordinator\ncwd: ${work_root}/project\noversee: [{ agent: Worker, interval: 5m }]\n```\n\nA watchdog observes and reports; it never restarts, stops, spawns, or removes a\nrole, answers a pending permission, edits a workspace, or approves anything on\nthe owner's behalf. `watchdogs:` may appear only in the base config\n(`~/fleet.yaml` or `-c FILE`); Agent/Role/Brain documents never own it.\nThe selected Agent owns Brain, Role, permissions, isolation, and every other\nagent setting. Legacy watchdog `harness`, `model`, `session`, and\n`isolation` fields fail with migration guidance.\nWhen `watch:` is omitted, each run watches the configured roles plus temporary\nfleet roles that are live when the run starts. An explicit `watch:` list is\nnever augmented.\n\nAgent operational values override manifest operational defaults. Role and Brain\nownership never cross-merges. `${name}` substitutes entries from `vars`.\nBrain fields include `max_tokens` and `autocompact_pct`; isolation is Agent-owned.\nUse README.md for the complete isolation policy and resource-cap schema.\n\nSupervised roles connect to the operator-configured ours daemon; they do not own its\nlifecycle. Fleet strips the obsolete, presence-sensitive `OURS_AUTOSTART` variable from\nagent-session children; `ours-mcp proxy` is client-only and never starts a daemon. Start\nthe shared daemon only through an explicit operator or installer/setup flow.\n\n## Rooms and tasks\n\n`init` materializes editable `single`, `pair`, and `team` Room templates plus\ntheir exact-cased Agent, Role, and Brain presets. The command prints the packaged\npreset revision and source directory. Inspect provenance and content before use:\n\n```sh\nours-fleet config [-c FILE]\nours-fleet template list [-c FILE]\nours-fleet template show team [-c FILE]\nours-fleet task create --title \"Solo task\" --template single [-c FILE]\nours-fleet task create --title \"Reviewed change\" --template pair [-c FILE]\nours-fleet task create --title \"Phased delivery\" --template team [-c FILE]\nours-fleet spawn --temp Scout --role SELECTION --brain SELECTION --loops-file PRIVATE.yaml\nours-fleet task start TASK --member developer --loops-file PRIVATE.yaml\nours-fleet task start TASK --member critic --no-loops\n```\n\n`--loops-file` must be an owner-only, non-symlink regular file <=1 MB containing\nexactly one top-level non-empty `loops:` mapping. `--no-loops` explicitly\ndisables loops. They are mutually exclusive and rejected for permanent spawn.\nFor a grouped room member the whole CLI block overrides its Agent Template;\nthe template overrides omission. Omission preserves historical no-loop behavior\nand never inherits manifest wildcard loops. Fleet validates before side effects,\nseals normalized timings plus exact private prompts, and reuses that snapshot for\nidempotent start, retry, recovery, and replacement. Trusted authoring and the\nprivate sealed runtime retain exact prompts; resolved launch, task, room,\nprovenance, and audit presentations show source, policy, timing, prompt bytes,\nand prompt SHA-256 instead of prompt text.\n\nAn alternate manifest `-c /path/custom.yaml` uses `/path/custom/` as its split\nroot. Repeated init only fills missing files and never adopts a newer default.\nExact known revision-3 through revision-5 packaged-bootstrap and generated role defaults have an exact-semantic,\nfail-closed migration (dry-run by default):\n\n`ours-fleet migrate-role-defaults [-c FILE]`\n`ours-fleet migrate-role-defaults [-c FILE] --write`\n\nReview removals, replacements, additions, preserved custom files, staging path,\nand recovery path. Same-named custom files stay byte-identical; dangling custom\nreferences refuse publication, and a successful rerun is a no-op. For explicit\nsingle-file adoption, copy from init's reported packaged source beside the target\nas `.new-default`, inspect `diff -u TARGET TARGET.new-default`, then replace it.\n\nThe exact generated six-worker legacy starter Agent set has its own fail-closed\nmigration (dry-run by default):\n\n`ours-fleet migrate-agent-templates [-c FILE]`\n`ours-fleet migrate-agent-templates [-c FILE] --write`\n\nReview the dry-run moves, addition, staging path, and retained recovery-backup path\nbefore `--write`. Customized/partial known starters and unsafe trees refuse without\nmutation; unrelated custom persistent Agents remain persistent. A manifest-level template\nmay shadow a same-named file only with `override_builtin: true` and a higher\nversion; this compatibility marker is deprecated and reported as a diagnostic.\n\nRooms always use `ours-cowork`; there is no room-provider selector. Configure\nthe cowork daemon connection and room owner directly:\n\n```yaml\nrooms:\n cowork:\n config: /home/me/.ours-cowork/config.json\n owner:\n expected_cid: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n public_invite_file: /home/me/.ours-fleet/owner-room-invite.txt\n defaults:\n template: team\n attach_owner: true\n close_when_task_done: true\ntasks:\n default_room_template: team\n create_mode: start\n close_room_on_done: true\n```\n\nFleet launches each template member with a dedicated one-time Cowork invite.\nThe generated temporary-agent briefing contains the exact identity name, invite,\nCowork role, and task. The agent creates that identity itself with ours MCP\n`create_temporary_identity`, accepts the invite with `add_contact`, and starts\nwork immediately. A room is ready only after the Cowork room (and its task, when\ntask-bound) is durably active, every configured member seat is authenticated and active with its matching\nlive Fleet launch, and the configured Owner seat is active when owner attachment is\nenabled. There is no briefing hash, startup ACK, or separate role-briefing readiness\ngate.\n\nNormal provisioning emits exactly two authenticated Owner lifecycle notices: a\nconcise created notice immediately after the Cowork room is visible, and\n`The room <name> is ready.` after the ready predicate above is true. Intermediate\ntask, saga, member-spawn, timeout, and recoverable-failure transitions stay in local\nstate and logs. A terminal failed task emits one actionable failure notice; the\ncommand result carries the exact blocker and canonical recovery action.\n\n`task start` and create-and-start wait for readiness. If their bounded wait expires,\nthey return an explicit `in_progress` result with the stable\n`ours-fleet task await <id>` handle and start a safe continuation. `task await`\nwaits on that same durable operation and returns `ready`, `in_progress`, or\n`failed` in both human and `--json` forms; timeout is not failure. The detached\ncontinuation is serialized per task and remains alive until convergence or an\nOwner-action blocker; invoking `task await` safely re-arms it after a restart.\n\nSet `room.anonymous: true` on a room template, or pass `--anonymous` to\n`task create`, `task start`, `task work`, or `room create`, to create an\nanonymous Cowork room. `--no-anonymous` explicitly overrides an anonymous\ntemplate. Fleet records the resolved value before room creation so retries keep\nthe same choice. Temporary members of an anonymous room are instructed to call\n`create_temporary_identity` with `expose_local=false`. Their generated briefings\ndo not disclose or compare an Owner participant CID. A participant-originated\ninstruction has Owner authority only when the authenticated Cowork room envelope\nattributes that participant seat the exact `Owner` role. Literal text, display\nnames, ordinary direct messages, and room-authored or rest-role messages with an\nOwner-looking label never grant that authority. Non-anonymous rooms remain pinned\nto the exact authenticated Owner CID.\n\nHuman task and room results use the same compact Markdown presentation in the\nCLI and authenticated owner channel: a short heading, icon-plus-word status,\ncode-formatted identifiers, bounded summaries, and actionable recovery or error\nsteps. Untrusted prose is context-escaped and control characters are neutralized;\nMessenger-bound results are capped at 3,500 Unicode code points and 12,000 UTF-8\nbytes with structural omission notices. `--json` bypasses this presentation layer\nand retains the versioned machine schema and serialization order.\n\nEvery task belongs to a named list. The built-in `default` list always exists,\nand legacy tasks or create calls without `--list` resolve to it. Use `task lists`,\n`task list-create <name>`, `task list-rename <name> <new-name>`, and\n`task list-delete <name> [--move-to <destination>]` to manage lists. A non-empty\nlist cannot be deleted without an explicit, different destination; Fleet moves\nthe assignments and never deletes the tasks. `task move <id> --list <name>`\nchanges only organizational metadata. `task list --list <name>` filters and\n`--group-by-list --json` returns deterministic groups.\n\nList names are NFC-normalized, case-sensitive, and limited to 64 Unicode code\npoints. Leading/trailing whitespace, controls, format/path characters, normalized\nduplicates, and the reserved exact name `default` are rejected. The authenticated\nowner channel provides the matching `/task` subcommands, while authenticated web\nclients use `/api/v1/task-lists`, `/api/v1/tasks`, and\n`/api/v1/tasks/:id/list`; every adapter delegates to the same application service.\nMessenger's multiline command grammar treats surrounding whitespace on each\nvalue line as transport framing; the canonical value passed to the shared service\nis the trimmed line. CLI arguments and REST strings are passed verbatim.\n\nOlder prerelease files with the exact legacy `provider: cowork` key under\n`rooms:` still load, but the key is ignored and omitted from resolved\nconfiguration. Remove it when editing the file. Any other legacy value is an\nerror. The optional `rooms.owner.provider` setting is separate and defaults to\n`messenger-server`.\n\nFinish and Delete are distinct terminal task actions:\n\n`ours-fleet task finish <id>` moves an active or review task to `done` and\ndeletes its associated Cowork room after retiring its members. The room then\ndisappears from normal Fleet and Cowork views; its brief, messages, repository\nreferences, and attachments are not retained as an inspectable archive.\nThe prerelease configuration names `tasks.close_room_on_done` and\n`rooms.defaults.close_when_task_done` are retained for compatibility, but\n`true` now means this close-then-delete behavior.\n\n`ours-fleet room delete <id> <id>` is the canonical destructive room command.\n`room close <id> <id>` remains a deprecated alias with identical deletion\nsemantics. Older prerelease `closed` room records are deleted directly the next\ntime `room list` reconciles Fleet with Cowork.\n\n`ours-fleet task delete <id> <id>` permanently deletes a task in ANY lifecycle\nstate \u2014 backlog, provisioning, active, blocked, review, done, cancelled, failed,\nor partially settled. The exact task ID is required twice for confirmation. A\ndurable deletion intent is persisted before any side effect; the cleanup worker\nthen retires managed room members with evidence, closes and deletes an attached\nroom (tolerating already-missing remote rooms), releases the sealed launch\nsnapshot, and unlinks the task record last. While cleanup settles the task is\nhidden from normal listings and every lifecycle mutation is rejected; if\ncleanup cannot complete (for example Cowork is unreachable), the deletion stays\nin a precise recoverable state \u2014 repeat the delete command or run\n`task recover <id>` to converge after outages, crashes, or restarts. Deletion\nnever fabricates a `done` transition. A metadata-only deletion receipt\n(acceptance actor, original state, timestamps, completion) is retained under\n`deletion-receipts/` as durable audit evidence. An already-missing task is an\nidempotent no-op. The Owner-channel equivalent is `/task delete <id> <id>`; the\nmanagement API equivalent is `DELETE /api/v1/tasks/<id>?confirm=<id>` (200 when\nsettled, 202 while pending; `GET /api/v1/tasks?includeDeleting=true` exposes\ndeletion-pending tasks to operators).\n\n## Permissions\n\nPrefer the harness-neutral `permissions` block:\n\n- `approval: ask|auto|allow`: portable permission policy. `deny` remains a\n deprecated, fail-closed compatibility alias for existing fleet files.\n- `filesystem: read-only|workspace|unrestricted`: filesystem intent\n- `unattended: deny|wait`: what a managed session does when no console can\n answer a request\n\nThe backend translates this common intent. Native Codex app-server roles reject\npermission aliases in `harness_options`; Codex ACP and Claude retain their\nlegacy native-override compatibility. Do not choose `allow`/`unrestricted`\nor Claude `bypassPermissions` without explicit authorization.\n\n### Creation-time isolation\n\n`ours-fleet spawn --isolation-file <path>` supplies a role's sandbox policy at\ncreation, so the FIRST launch is already confined \u2014 a role that only gains\n`isolation:` on a later `up` ran unsandboxed until then.\n\nThe file holds exactly the `isolation:` mapping documented above and nothing\nelse \u2014 the same schema, validated by the same code, so a policy written here\ncannot mean something different from the identical block in fleet.yaml:\n\n```yaml\nnetwork: deny\nfs:\n read: [/opt/reference]\nresources:\n mem: 2G\n```\n\nInvalid files are rejected before anything is created: no config, no state\ndirectory, no identity reservation. Works for both permanent and `--temp` roles.\n\n### Never-prompt failure\n\nThe failure this section exists to prevent leaves no error message anywhere.\n\nAn unattended role has no console. When the harness needs a permission decision\nthere is nobody to ask, so the request is refused INSIDE the harness \u2014 no\nprompt, no error, no log line. The agent simply does less than its briefing told\nit to, reports success, and nothing distinguishes that from having done the\nwork. Two settings produce it:\n\n1. a permission mode that suppresses the prompt without granting the action\n (Claude `dontAsk`, which is why neutral `allow` maps to\n `bypassPermissions` instead); and\n2. `unattended: deny`, which refuses every request that reaches it.\n\n**Automatic decisions are now recorded.** Every permission request decided\nwithout a human emits a completed event into\n`~/.ours-fleet/agents/<Name>/.session-events.jsonl` carrying the decision,\nwhether policy or a person made it, the policy that produced it\n(`permissions.unattended=deny` vs `permissions.approval=deny`/`=allow`),\nthe reason, and the option selected. `ours-fleet peek` and `attach` render\nthem. Automatic denial asks for a one-shot rejection, never a standing one, so a\nsingle unattended refusal cannot disable a tool for the rest of the session.\n\nA role that can auto-deny logs one line at startup saying so.\n\nTo detect an under-permissioned role BEFORE it runs, use the capability floor\nbelow: `ours-fleet doctor` fails such a role rather than letting it discover\nthe problem silently at work.\n\n### The unattended capability floor\n\nAn unattended role has no console, so a permission request cannot be answered \u2014\nit is refused, silently, inside the harness. The agent then does less than it\nwas told to and reports no error. To make that visible before launch,\n`ours-fleet config` and `ours-fleet doctor` resolve each role's neutral\npermissions through its harness and check the result against a fixed floor:\n\n- `read-state` \u2014 read its briefing, ROUTINES.md, and WORKLOG.md\n- `write-state` \u2014 append its WORKLOG and its own state files\n- `messaging` \u2014 bind its identity, send and receive ours mail\n- `monitor` \u2014 arm and observe its mail monitor\n- `workspace-edit` \u2014 edit and test files in its working directory\n- `status-commands` \u2014 run the inspection commands its briefing prescribes\n\n`doctor` reports this per role as `unattended floor: <Role>`. A role with\n`unattended: deny` that cannot meet the floor FAILS doctor, because it will\ndeny those requests with nobody to see it; with `unattended: wait` it warns,\nbecause a human can still attach and answer.\n\nSecurity meaning: native Codex maps `ask` \u2192 `untrusted`, `auto` \u2192\n`on-request`, and `allow` \u2192 `never`; its independent filesystem mapping is\n`read-only` \u2192 `read-only`, `workspace` \u2192 `workspace-write`, and\n`unrestricted` \u2192 `danger-full-access`. Users configure only the Fleet names.\nClaude maps `ask` to `default`, `auto` to `acceptEdits`, and `allow` to\n`bypassPermissions`. Codex ACP retains its adapter-specific coupled modes:\n`auto` selects `agent`, while `allow` selects `agent-full-access`. These\nmodes genuinely permit the actions the role was authorized to take \u2014\n`dontAsk` only suppresses the prompt while still refusing the action. Nothing\nother than an explicit `allow` becomes non-interactive. Legacy `deny` keeps\nits conservative Codex `on-request` / Claude `plan` translation. `allow` is therefore a real grant and\nrequires explicit authorization; per-role `isolation:` remains the outer\nboundary that a permission mode cannot cross.\n\nACP carries agent-advertised session mode IDs and `session/set_mode`, but those\nIDs are agent-specific and ACP defines no portable permission-policy capability.\nFleet therefore uses the ACP primitive where an adapter exposes a matching mode\nand otherwise performs the harness translation above. The bundled Codex ACP\nadapter couples approval and sandboxing in its advertised mode IDs. Neutral\n`allow` therefore selects `agent-full-access` and widens `filesystem:\nworkspace` or `read-only` to `danger-full-access`; neutral `auto` selects\n`agent` and `workspace-write` even when the neutral filesystem value differs.\nAn explicit `harness_options.sandbox` selects its corresponding ACP preset and\nstill wins, as does an explicit native approval override. `config` and\n`doctor` report a coupled-mode mismatch as approximate. Use per-role\n`isolation:` as the outer boundary for an `allow` ACP role. The live session\nreports both its effective normalized mode and the exact native mode selected.\n\nSee also: `spawn --approval/--filesystem/--unattended` set this intent at\ncreation, and `ours-fleet config` prints each role's neutral settings, their\nnative translation, and any warning \u2014 the same text `doctor` reports.\n\nClaude `harness_options`: `permission_mode` (default, acceptEdits, plan,\ndontAsk, bypassPermissions), `plugins`, `mem_palace`,\n`mem_palace_midsession_autosave`, `mcp_servers` and `mcp_servers_only`.\n\n`mcp_servers` declares MCP servers for the role, in `.mcp.json`'s own shape\n(a map of name to `{ command, args, env }`, or `{ type: http|sse, url,\nheaders }`). By default they are ADDED to whatever the OS user running the role\nalready has configured. The Claude Code adapter sends them in `session/new`.\n\nWhen `mcp_servers` is absent, Fleet sends ACP's protocol-required empty\n`mcpServers` array without an exclusive override, so the agent keeps its inherited\nservers. An explicitly empty configured set is different: Fleet preserves that intent\nthrough the bundled adapter's compatibility path and disables every inherited server.\n\n`mcp_servers_only: true` makes the declared set EXCLUSIVE through\n`strictMcpConfig`. It is all-or-nothing and it ignores every\nother MCP configuration: project `.mcp.json`, user settings, and **plugins**.\nThe ours connector is normally installed as a plugin, so a strict role that does\nnot re-declare it has no `send_message` and no `get_messages` \u2014 it cannot even\nreport that it has gone mute. Fleet therefore refuses a strict role whose\n`mcp_servers` does not name the connector; declare it explicitly, e.g.\n`ours: { command: ours-mcp, args: [proxy] }`.\n\nBoth options, and `plugins`, reach an ACP session through the bundled Claude ACP\nagent's `_meta` vocabulary. A role that sets `session_options.acp.command` runs\nan agent fleet did not choose and cannot be promised them, so that combination is\nrefused at validation rather than accepted and dropped. This narrows a role's\ntool surface; it does not stop the harness deferring tool schemas, which is the\nharness's own decision.\n\nCodex `harness_options`: `launcher` (auto, ours-codex, codex), `search`,\n`config`, `add_dirs`, and `monitor`; Codex ACP additionally supports\n`profile`. Native app-server roles reject `profile` because Codex does not\naccept `--profile` for `app-server`. They\nmust express approval and filesystem authority through the shared\n`permissions:` block, never through harness options. The adapter translates\n`ask|auto|allow` to Codex `untrusted|on-request|never` and translates\n`read-only|workspace|unrestricted` to Codex\n`read-only|workspace-write|danger-full-access`. Native `config` currently\nallows only `model_reasoning_effort`; ACP retains the broader Codex config surface.\n\nFor Codex, the opt-in `session: codex-app-server` directly runs Codex's native\nJSONL app server behind Fleet's provider-neutral session contract. It supports native item\nstreaming, commentary/final phases, prompt admission, steering, interruption,\npermission requests, durable conversation projection, and thread resume. Packaged\nCodex brains and the init wizard continue to select `session: acp` for compatibility;\nClaude Code also uses ACP. Native Codex defaults to `codex app-server` (or `ours-codex app-server`\nwhen launcher auto finds it). Override the exact command when necessary:\n\n`session_options: { codex_app_server: { command: [codex, app-server] } }`\n\nAn exact command override receives no appended profile, search, or subcommand\narguments. Native sessions persist their Codex thread in Fleet's `.session-id`\nand participate in its bounded fresh/resume recovery; cross-provider conversation\nportability is never assumed.\n\n## ACP adapters\n\nThe maintained `@agentclientprotocol/codex-acp` and\n`@agentclientprotocol/claude-agent-acp` runtimes are bundled automatically as\noptional ours-fleet dependencies. The supervisor resolves their executable\nentrypoints internally, so default ACP roles do not depend on global PATH.\nThe maintained Claude adapter requires Node 22; Codex ACP continues to work on\nthe ours-fleet core minimum of Node 20.\n\nOverride an adapter only when necessary with `session_options.acp.command`\n(string or argv list). If optional dependencies were deliberately omitted,\nours-fleet falls back to a compatible globally installed `codex-acp` or\n`claude-agent-acp`. `ours-fleet doctor -c FILE` verifies the resolved adapter.\n\n## Reliable mail wake\n\n`monitor.mode` selects exactly one wake owner:\n\n- `fleet` (default): the ours-fleet supervisor consumes body-free daemon\n events and advances its durable cursor only after delivery is accepted. ACP\n uses live steering when supported and falls back to structured\n `session/prompt`.\n- `native`: ours-fleet starts no supervisor monitor; the generated briefing\n instructs Claude Code or Codex to arm its harness-native wake mechanism.\n\nSet `monitor.interrupt: true` in fleet mode to cancel active work before every\nconfigured wake. Set it to `after_tool` to preserve an active ACP tool (and any\npending permission), then steer the wake at the first tool-terminal boundary\nwithout cancellation. A hung boundary is bounded at 120 seconds and falls back\nto non-cancelling steering/queueing; adapters without authenticated tool events\nuse the same conservative fallback. Explicit human/control interrupts remain\nimmediate. The policy is content-blind because the supervisor cannot inspect\nencrypted message bodies. Message bodies are released only when the role calls\nthe ours `get_messages` tool.\n\nThe default is `false`. For a temporary role whose mission intentionally arrives\nafter its readiness announcement, set `mode: fleet` and `interrupt: true`\nexplicitly. The readiness announcement does not change the transport: the\nmission remains ordinary ours mail, fleet injects only the body-free wake, and\nthe role calls `get_messages` before acting. Every later configured wake uses\nthe same interruption policy.\n\nLegacy `monitor.enabled: true|false` remains accepted as an alias for\n`mode: fleet|native`; use `mode` in new configuration. Codex's separate\n`harness_options.monitor: true` is native-monitor consent, not monitor-owner\nselection.\nInspect `ours-fleet status Name`, `peek Name`, role logs, and\n`~/.ours-fleet/agents/Name/.monitor-status` when diagnosing delivery.\n\n## Trusted owner channel\n\nAny managed role may declare a separate ours identity which fleet \u2014 never the agent \u2014\ncreates when missing and binds:\n\n```yaml\nowner_channel:\n identity: Coordinator Owner Channel\n owners: [authenticated-owner-contact-cid]\n agent: authenticated-managed-agent-cid\n interrupt: false\n progress_interval_ms: 30000\n comments: true\n attachments:\n enabled: true\n max_files_per_request: 4\n max_file_bytes: 10485760\n max_request_bytes: 20971520\n retention_ms: 86400000\n```\n\nPermanent role identities are also reconciled before launch. Fleet creates a\nmissing role identity with local exposure and local auto-accept enabled. A\nmissing owner-channel identity uses the safer inverse policy: both are disabled.\nThe short provisioning lease is released before the agent or channel binds.\nTemporary role identities remain connector-owned because their creating lease\ndefines their cleanup lifetime.\n\nThis does not replace the role identity. Normal identity mail remains untrusted\npeer input: the agent reads it through `get_messages` and replies through\n`send_message`. Mail arriving on the dedicated channel from a CID in `owners`\nis injected as a direct `[fleet-owner]` prompt. Mail from the exact `agent`\nCID is forwarded as a new message to the latest authenticated owner conversation;\nits files may also be relayed through this channel. A reply reference selects the\nowner of that authenticated source wire instead of the latest conversation.\nEvery other CID is rejected and warned about without reflecting its body. Fleet sends\naccepted/queued/progress/interrupted/failure notices and routes the ACP turn's\nfinal assistant text back to the authenticated sender with its source wire ID.\nFor file replies of every kind \u2014 a response artifact, a proactive note, or an\nin-turn attachment \u2014 the agent calls ours `send_file` to the channel identity\nand may pair it with a reply-linked caption; fleet, not the agent, chooses the\nowner. That is the only delivery route an agent is given: a tool call either\ndelivers or reports an error, where a file written to disk does neither.\nOwner messages whose trimmed text starts with `/` are deterministic\nsupervisor commands and never enter the model: `/help` (alias `/commands`),\n`/status`, `/comments [status|on|off]`, `/interrupt`, `/clear`,\n`/compact`, `/model <model-id>`, `/restart`, `/force-restart`, `/ls`,\n`/peek`, `/worklog`, and\n`/version`. Unknown or malformed commands answer with the help text instead of\nbeing forwarded; plain messages reach the agent unchanged. `/clear`,\n`/compact`, and `/model` are forwarded only when the role's bundled ACP\nadapter executes them locally (claude-code: all three; codex: `/compact`\nonly) and are otherwise refused with a notice, so slash text never reaches the\nmodel as a prompt.\n\nWhile a request runs, the agent's live ACP commentary is relayed as messages\nprefixed with the single stable label `\uD83D\uDFE1 Live update:`, so an owner can see\nexactly which messages the setting controls. `owner_channel.comments`\n(default `true`, so existing channels keep their current behavior) is the\nRESTART BASELINE; `/comments on|off` changes only the running session and is\ndeliberately not persisted, so a restart always returns to the checked-in\nconfiguration. `/comments status` reports the live value, the baseline, and\nwhether the backend emits live comments at all. Suppressing live comments never\nsuppresses receipts, progress notices, or the final answer.\n\nOwner documents, images, and voice messages use the same authenticated sender\nand source-wire boundary. Fleet inspects body-free metadata first and rejects\ndisabled, over-count, or over-size requests before selective\nretrieval. Unauthorized CIDs are never retrieved or answered. Reply-linked text\nand files from the same sender become one ordered request; a file-only wake also\nstarts a turn. Retrieved bytes must match their structured size and SHA-256,\nwhile MIME values, extensions, file categories, and declared-versus-detected mismatches\nremain report-only metadata. Symlinks or non-regular paths fail closed. Sanitized copies live only in a mode-0700 request directory as\nmode-0600 files and are removed after completion or bounded stale retention.\n\nThe legacy `attachments.allowed_mime` key is accepted and ignored so existing\nconfigurations keep loading; it is omitted from resolved configuration and cannot\naffect admission.\n\nVoice prompts include a bounded transcript only when typed daemon metadata reports success.\nFailure or unavailability is explicit and preserves the private audio path as the\ninput for direct review. Run `ours config show --json` and inspect `sttConfigured` without\nrevealing provider credentials.\nA mode-0600 message claim journal stores only wire ID, persistent-history\nsequence, and claim time. Fleet journals the exact body-free oldest-first slice\nbefore calling `getMessages` with that slice length, rejects a returned set\nmismatch, and loads a crash-recovered body only through `getHistoryItem`.\nThe attachment crash journal contains only authenticated CID and wire routing\ndata; it never stores captions, filenames, paths, transcript text, or bytes.\nJournaled read files resume through `getFileInfo` and `fetchFile`. A claimed\nagent caption is loaded from history and rejoined before the group is admitted. Fleet\nresolves one authenticated owner route before retrieving bytes, admits every file\nbefore emitting the caption or any file, and sends every part to that same route.\nUnknown correlated routes remain queued without retrieval and receive one bounded\ncorrelated notice. Admission rejection consumes the whole group with one NACK;\nonce emission starts, a transport error becomes terminal uncertain delivery and\nthe group is never blind-retried. Bounded v2 source-wire routing state is migrated\nfrom v1 on read. Corrupt state disables attachment admission rather than weakening\nprovenance checks.\n\nThe channel identity must be unique and must not be a role identity. The bridge\npersists bounded wire IDs only, never message/reply plaintext, and requeues input\nbefore starting its turn for at-least-once crash recovery. It currently requires\nthe structured agent-session interface so correlated final replies retain their\ndelivery guarantee.\n\n### Live contact and owner administration\n\nThe supervisor which is already running the managed role remains the sole binder of\n`owner_channel.identity`. The CLI reaches that exact live `OwnerChannel`\nthrough the role's token-authenticated, mode-0600 Unix control socket for contact\ninspection and setup; it never starts another ours client and never force-binds:\n\nRapid supervised restart is serialized by a role-scoped single-binder lease.\nThe predecessor closes its authenticated control socket and MCP proxy before\nreleasing ownership. The replacement waits at most five seconds and retries the\ndaemon bind only when PID/start-marker metadata proves the holder was the same\nrole and owner-channel identity. Foreign, live, corrupt, or otherwise\nunverifiable ownership remains fail-closed; fleet never uses `force=true`.\n\nIf that matching predecessor misses the bound, its still-authenticated control\nroute may send one fixed, digest-deduplicated recovery notice through the latest\nauthenticated owner conversation (or the sole configured owner). Notice\nplaintext is never persisted. With no safe deterministic route fleet guesses no\nrecipient and leaves the actionable failure in the web console and role logs.\nThe remote recovery action is `/restart`; inspect repeated failures with\n`ours-fleet logs <Role>` or the web console.\n\n```sh\nours-fleet owner-channel contact list <Role>\nours-fleet owner-channel contact invite <Role> [--name <label>]\nours-fleet owner-channel contact add <Role> (--invite-file <path> | --invite-stdin) [--name <label>]\nours-fleet owner-channel owner list <Role>\nours-fleet owner-channel owner authorize <Role> <exact-64-hex-contact-cid>\nours-fleet owner-channel owner revoke <Role> <exact-64-hex-contact-cid>\n```\n\nContact establishment and owner authorization are separate security steps.\n`contact add` never authorizes: invite redemption is pending until the peer\nverifies it. Once `contact list` reports the established contact, authorize\nits exact immutable CID explicitly. Invite creation emits invite material only\non stdout; acceptance reads it from a file or stdin, not argv.\n\nConfigured `owners` remain the baseline. On legacy channels without `agent`,\nlive authorizations/revocations are an immediately effective, restart-persistent\noverlay. Managed-agent CID gating makes fleet configuration authoritative and\ndisables live owner mutation and direct control-socket sends. `owner list` labels\nbaseline versus dynamic entries and effective status. The atomic mode-0600 file\ncontains bounded CIDs and audit actions only. Corruption disables all effective\nowners and refuses mutation rather than resurrecting authority; revoking the\nlast effective owner is always refused.\n\nA missing/stopped role, role without `owner_channel`, unavailable\nMCP client, or a role entering shutdown returns an actionable error with no\nside effects. Management uses no network listener and never logs or persists\ninvite material.\n\nFor any non-final message\u2014progress, blocker, suggestion, or later proactive note\u2014\nthe managed agent calls ordinary ours `send_message` to the channel identity.\nFleet checks only that the authenticated sender CID exactly equals `agent`, then\nforwards the text as a new message. There is no task/request/update type, phase,\nreply correlation, or owner recipient argument. A sole owner is the safe fallback;\nwith multiple owners and no inbound route history the relay fails closed. Devices\nsharing one identity share its CID; separate owner identities hand off the route\nwhen either sends channel mail. The ACP final is separate: fleet extracts it from\nthe completed turn and deterministically replies to the initiating owner wire.\n\nThe bounded mode-0600 route state stores CIDs, wire IDs, timestamps, delivery state,\nand hashes but never message plaintext. Unauthorized attempts produce a bounded\nCID-only owner warning; attempted bodies are neither reflected nor persisted.\n\nFor a mobile owner, establish the contact first, wait for peer verification,\nauthorize its exact CID, and revoke that same CID when access ends. The bounded\nmode-0600 CID overlay survives supervisor restart and remains fail-closed on\ncorruption. Update bodies remain memory-only. After a crash/restart, unfinished\ndeferred owner input follows the existing at-least-once replay path; the restarted\nsupervisor remains the sole binder.\n\n## Stable config and YAML migration\n\n`ours-fleet config --json` emits schemaVersion 1 resolved plans. Environment\nvalues and mission/persona/bio bodies are withheld; environment keys are sorted\nand values are marked redacted. Additive fields may appear in schema 1, while a\nremoval or semantic reuse requires a new schema version.\n\nYAML parsing always rejects duplicate keys. The current default\n`--yaml-mode compat` warns with file/line/column for anchors, aliases, explicit\ntags, non-scalar keys, and multiple documents. Use `--yaml-mode strict` in CI\nnow; strict becomes the next-major default and compat is the temporary migration\nescape hatch.\n\n## Bounded worklogs, auth proxy, and model recovery\n\nWORKLOG rotation is enabled by default with\n`worklog: { max_kb: 1024, keep_tail_kb: 256, max_archives: 12 }`. Maps may\noverride individual values; `worklog: false` on a role or in defaults opts out.\nFleet rotates only at that role's launch/resume lifecycle boundary. Concurrent\nchanges defer rotation. The active file keeps a bounded UTF-8 tail and advances\nto a line boundary when a complete line fits. If one logical line alone exceeds\nthe budget, its newest suffix remains and the rotation manifest records the\nmid-line start and omitted byte count. The complete prior inode receives a\ncollision-safe UTC archive name, and\n`.worklog-rotation.json` records restart provenance. `max_archives` bounds\nrecent archives beside WORKLOG.md; older complete archives move to\n`WORKLOG.archives/` without deletion. All archives share the role's sensitive\nstate boundary. Fleet refuses a symlinked/non-regular live log or a symlinked\ncold-archive boundary before replacing the live path and best-effort removes a\nduplicate publication left by a detected failure while the original inode is\nstill available. The manifest records SHA-256 digests for the archive and live\nbytes observed when it is written. These checks address ordinary path hazards,\nnot intentional path mutation by a malicious concurrent process with the same\nUnix authority; that is outside the threat model and requires OS-level isolation.\n\nACP tool diffs are bounded before entering web conversation events. Existing\nsmall before/after diffs are unchanged. Oversized whole-file snapshots are\nreduced to the actual changed region plus path, operation, original byte counts,\ndigest, and omission metadata. Each retained side is a newest-content UTF-8 tail\nof at most 64 KiB, advanced to a line boundary when a complete line fits. An\noverlong single line keeps its newest suffix and explicitly records a mid-line\nstart. Paths retain at most a 4 KiB suffix with byte count, digest, and omitted\nprefix metadata; the complete normalized update is capped at 320 KiB. A large\nappend therefore retains current appended content, not the historical prefix.\nThe live web-console transcript includes only the current runner generation and\nexcludes adapter session/load replay. Replayed events remain durable with\nagent_replay provenance for diagnosis and recovery.\n\n`auth_proxy: { kind: anthropic, base_url, required, health_url }` is Claude-only\nand loopback-only. Fleet injects only ANTHROPIC_BASE_URL and doctor rejects\ncredential env keys. The privileged reference companion is\n`contrib/anthropic-auth-proxy.mjs`; deploy it separately as a dedicated account\nwith a 0600 token file and per-role listener access. Fleet never installs it or\nreads its credential.\n\n`model_chain` is an ordered authorization list and its first entry must equal\n`model`. Only sustained high-confidence entitlement/quota 429 evidence advances\none entry. Transient 429, overload, auth, policy, and unknown errors never\ndown-shift. Runtime state is atomic in .model-recovery.json; exhaustion is\nfail-closed and held down. Change the declared chain/model and restart to\nreconcile explicitly; no chain preserves detection-only behavior.\n";
|
|
7
|
+
export declare const AI_DOCS = "# ours-fleet reference\n\nours-fleet runs persistent or temporary, identity-bound AI roles through a\nprovider-neutral managed-session interface:\n\n- harness: `claude-code` or `codex`\n- session: `acp` (default) or `codex-app-server` (Codex only)\n- lifetime: permanent (supervised, restartable) or `spawn --temp`\n\n## Discover and validate\n\n```sh\nours-fleet docs # this complete reference (`man` is an alias)\nours-fleet help <command> # exact flags for one command\nours-fleet config [-c FILE] # validate and print the merged plan; no changes\nours-fleet doctor [-c FILE] [--harness codex|claude-code]\nours-fleet version [--json] # build identity, capabilities, every install on PATH\n```\n\nConfiguration v2 is `~/fleet.yaml` plus typed bare documents under the exact\nstem directories `~/fleet/agents`, `~/fleet/agent_templates`, `~/fleet/roles`, `~/fleet/brains`, and\n`~/fleet/room_templates`.\nThe manifest owns fleet-wide operational defaults and automation; each Agent\nselects one inline/ref Role and Brain and carries its operational fields.\nAgent Templates under `~/fleet/agent_templates` are inert reusable launch definitions;\nonly explicit files under `~/fleet/agents` are persistent lifecycle instances.\nRoom members use `agent_template` and receive immutable content-addressed snapshots.\nAn Agent Template may declare up to 64 temporary-only named `loops`; persistent Agent\ninstances reject them. Each loop requires `interval` (1m..30d) and bounded\nnonblank `prompt`, with optional `enabled` (default true), `initial_delay`\n(default interval, 0s..30d), and `jitter` (default 0s, < interval, <=1h).\nExecution is fixed skip-if-busy with no ordinary missed-tick backlog/replay;\nrestart recovery may preserve at most one recent late occurrence.\nLegacy top-level `roles:` and `fleet.d` are rejected. Validate the complete\ntrusted source set with `config` and `doctor` before starting or restarting.\n\nPermanent `spawn` writes `~/fleet/agents/Name.yaml`. The web console edits an\nexplicit `{manifest, agents, agent_templates}` model while Role/Brain presets remain read-only.\nIts aggregate revision includes every Agent/Role/Brain/Room-template source, previews a\nredacted per-document diff in an exact-stem private staging tree, and saves under\none root lock with a private multi-file backup and full rollback. A no-op is\nbyte-identical and creates no backup.\n\n## Build identity and install provenance\n\n`--version` prints a semver and nothing else, and a semver does NOT identify an\nartifact. Version bumps land in a release commit of their own, so every build cut\nbetween two releases carries the PREVIOUS version while already containing new\nbehaviour. One host ran two installs that both reported 0.16.0 \u2014 same version,\ndifferent build. One accepted `monitor.interrupt: after_tool`, the other\nrejected it as invalid. Their\n`dist/cli.js` were byte-identical \u2014 the divergence was in other modules.\n\nEvery build therefore stamps `dist/build-info.json` with a build id (first 12 hex\nof a sha256 over the rest of `dist/`), the commit it was cut from, and the\ncapability tokens the shipped code declares \u2014 for example\n`monitor.interrupt.after_tool`. Ask any executable what it is:\n\n```sh\nours-fleet version # ours-fleet 0.17.0+9f1c2a3b4d5e, capabilities, PATH installs\nours-fleet version --json # the same as machine-readable JSON, no environment values\n```\n\nRead a capability, never a version number, to decide whether a setting is\nsupported. When a build rejects a value it knows the name of, it says which\ncapability is missing and which build rejected it, because another install on the\nsame host may accept the identical file. `config` prints the build that resolved\nthe plan; `status <Name>` says so when the build reporting on a role is not the\none that created it (roles record their creating build in `creation.json`).\n\n`ours-fleet doctor` runs an `install` check that lists every `ours-fleet` on\nPATH plus the one executing, and FAILS when two installs share a semver but are\ndifferent builds, or when the running artifact is a DIFFERENT artifact from the\none PATH resolves to. A second prefix holding identical content is not a skew\nand is not reported. A PATH entry the shell would not execute \u2014 a directory, or\na file without its execute bit \u2014 is not counted as an install at all.\nInstalls built before this stamp existed report `+unknown`; they are compared by\nhashing their `dist/` instead, so two pre-provenance installs are still told\napart. To fix a flagged host, remove or update the stale install \u2014 do not rely on\nPATH order.\n\n## Lifecycle and console commands\n\n```sh\nours-fleet init [-c FILE] # interactive missing-default seed; TTY required\nours-fleet up|down [Name...]\nours-fleet restart [Name...] # preserve/resume harness context\nours-fleet force-restart [Name...] # fresh context; briefing is reloaded\nours-fleet ls\nours-fleet status|peek|attach|logs Name\nours-fleet logs -f Name\nours-fleet send Name \"prompt\"\nours-fleet rm Name\nours-fleet watchdog-report <name> [run-id] [--list] [--json]\nours-fleet watchdog-run <name>\n```\n\n`init` is an interactive missing-default workflow that preserves existing files byte-for-byte.\nIt names the resolved manifest and split directory, asks a default-No confirmation,\nthen subscriptions (Codex, Claude, or both), model assignment (one explicit model for\nevery job or explicit development/review/coordination choices), one reasoning level,\nand a final default-No review. Quick/Balanced/Thorough generate low/medium/high.\nModel pickers show packaged supported IDs; catalog membership is not a recommendation\nor entitlement claim. Run `ours-fleet doctor` for local Codex availability; Claude\nentitlement is checked when a role launches. The generated brains contain no\n`model_chain`, so Fleet never silently substitutes another model.\n\nAt either confirmation, N, Enter, Escape, Ctrl-C, Ctrl-D, or EOF cancels. In a picker,\nEscape, Ctrl-C, Ctrl-D, or EOF cancels; Enter records the highlight or continues a\nnon-empty multi-select, N is ignored, and an empty subscription selection remains blocked.\nEvery cancellation before final approval performs no host or configuration mutation.\nRedirected/non-TTY invocation is refused with the same guarantee. After the final Yes,\nhost setup precedes publication. Path ownership/type/mode/symlink and\nsame-filesystem checks run before host setup and again under a per-setup lock. Publication\nstages and validates the complete combined setup, backs up whichever old target(s) exist,\nand retains a private recovery record. A hard process/host termination cannot promise\nrollback; inspect host integration and private init stage/recovery evidence.\n\n`peek`, `attach`, and text `send` use the structured agent session.\nAttachment also accepts `/permit <permission-id> <option-id>`, `/interrupt`,\nand `/detach`.\n\n## Local web console\n\nThe npm package includes the web console; installed users do not clone the repo\nor run `npm run build`:\n\n```sh\nnpm i -g @ours.network/fleet\nours-fleet init\nours-fleet doctor\nours-fleet web # install/update service, start, pair browser\n```\n\nThe normal command uses stable `http://127.0.0.1:49271/`, installs an\nowner-level systemd user service (Linux) or LaunchAgent (macOS), and opens a\nfive-minute one-use pairing link in the local browser. After pairing, bookmark\nthe plain URL or install the PWA. To pair a new, signed-out, or revoked browser,\nrun `ours-fleet web open`.\n\n```sh\nours-fleet web status\nours-fleet web start|stop|restart\nours-fleet web open\nours-fleet web revoke-all # revoke every browser and active session\nours-fleet web uninstall\nours-fleet web serve --port 0 --no-open # isolated foreground/testing mode\n```\n\nThe console is IPv4-loopback-only by default. Both `localhost` and\n`127.0.0.1` are accepted locally. For an nginx/TLS reverse proxy, keep the\ndefault bind and declare the exact browser origin:\n\n`ours-fleet web install --public-origin https://fleet.example.com --password-file /secure/fleet-password`\n\nFleet reads the password file during setup and persists only a salted scrypt\nverifier. New browsers authenticate and retain rotating HttpOnly/SameSite\ntrusted-device credentials. If nginx already authenticates, the operator may\ndeliberately select `--no-password`; the CLI and browser warn that anyone\nreaching the origin can control the fleet. First setup requires an explicit\nchoice: `--password-file` or `--pairing` for protected access, or\n`--no-password` for intentional unprotected access.\n\nUse `--bind ADDRESS` only for an intentional direct listen. A non-loopback\nbind is rejected unless `--public-origin` is also present. Host/Origin checks\nuse the declaration and do not trust forwarded headers. Configure nginx to\nproxy HTTP and WebSocket upgrades to `127.0.0.1:49271` and terminate TLS;\nfleet accepts nginx's loopback upstream Host, so no Host rewrite is required.\nBrowser credentials add Secure for HTTPS, and `revoke-all` invalidates all\ntrusted devices. Role creation offers harness-scoped known-model choices\nwhile still accepting a typed model ID; blank explicitly uses the selected\nharness's own default.\n\n## Spawn\n\n```sh\nours-fleet spawn [--temp] [Name | --name Name] \\\n --brain BRAIN_ID --role ROLE_ID \\\n --cwd /absolute/path --identity Identity --coordinator Coordinator \\\n --approval ask|auto|allow \\\n --filesystem read-only|workspace|unrestricted \\\n --unattended deny|wait --isolation-file /path/isolation.yaml\n```\n\nPermanent spawn writes `~/fleet/agents/Name.yaml` and starts a supervised role.\n`--temp` writes active state under `~/.ours-fleet/tmp` and starts an independent\ntransient supervisor (a collected systemd unit or submitted launchd job). It is\nnot enabled across reboot and does not die when the role that spawned it restarts.\nBrain definitions own the managed session backend. When a temporary role's bound identity\ncloses or its session ends, the supervisor, monitor and live roster entry retire\ntogether; state moves intact to `~/.ours-fleet/recovery/temporary` with a\ntermination record. Failed launches use the same archive rather than deleting\ntheir briefing, provenance, logs or partial supervisor metadata.\n\nNamed `down` and `rm` commands can target an exact state-backed temporary role\neven though it is absent from merged fleet YAML. The recorded transient unit/job\nis authoritative. Missing/incomplete ownership metadata is reconciled only from\nan exact `_run-temp <role>` process-table match: one match may be adopted, zero\nsettles as stopped, and ambiguity or an unreadable table fails closed. Launching\nrecords receive a bounded grace so a not-yet-registered transient unit cannot be\nmistaken for a stopped one. Stale recorded supervisors are reclaimed in bounded\nbatches by moving their state to the same recovery archive, never by blind deletion.\n\nEvery temporary role creates a new session-owned identity by calling ours MCP\n`create_temporary_identity` with its exact assigned name. It never binds a\npre-existing identity and never falls back to permanent `create_identity`.\nFleet does not inspect, preserve, or provision an ours identity for temporary\nspawn; creation belongs exclusively to the launched temporary agent session.\nCollisions, missing tool support, and creation errors stop safely without\nforce-adopting or deleting identity state. Permanent roles\nare provisioned by fleet before launch and never delegate normal identity\ncreation to the harness.\n\nThe temporary supervisor treats its first positive identity observation as the\nlifecycle readiness gate: a cold harness may take as long as needed to read its\nbriefing and bind, without a fixed first-bind retirement timer. After readiness,\nonly sustained authoritative absence closes the role. Unreachable, malformed, or\nvalid-but-empty daemon indexes are ambiguous and reset closure debounce rather\nthan becoming cleanup authority.\n\nInside a managed role, public `ours-fleet` commands cross an authenticated\nsupervisor attribution boundary before Commander parsing. The original CLI remains\nthe executor inside the role's existing OS sandbox, and ordinary CLI validation is\nthe source of truth. Hidden worker entry points remain internal; public lifecycle and\noperator commands are not restricted by the proxy.\n\nCommand invocation, raw argv, read-only work, validation failures, and generic\noutcomes are never forwarded to the Owner-visible channel. Fleet announces only\nconfirmed Agent, Task, and Room lifecycle changes. Local diagnostics retain\nstructurally redacted command metadata. Lifecycle delivery uncertainty is logged,\nnever recursively announced, and never reruns or blindly retries an effect.\nRoom participant summaries describe creation and activation. Fleet has no public\npost-create Room membership mutation, so it does not claim a separate membership event.\n\nOmitted Brain and Role selections, working directory, coordinator, neutral permissions,\nand fleet monitor policy inherit from the calling Agent. Explicit options always win.\nIdentity, mission/profile text, environment, owner routing, auth proxy, room startup,\nisolation, worklog, and sensitive inline Brain values never inherit implicitly.\nThis automatic proxy is a convenience and\nattribution mechanism, not an isolation boundary: an unrestricted role can still\ninvoke another binary path directly. Host/operator shells keep the ordinary direct\nCLI behavior.\n\nBrain owns harness, session, model, reasoning effort, token limits, and native harness\noptions. Removed runtime flags are rejected with migration guidance rather than silently\nreinterpreted. A selection is a stable ID or an explicit `inline:{...}` mapping.\n\nPackaged Developer, Critic, and LocalCoordinator Agent Templates set\n`monitor: { mode: fleet, interrupt: after_tool }`. Every member of the standard\n`single`, `pair`, and `team` Room Templates therefore resolves to fleet-owned,\nafter-tool delivery. Explicit per-member and custom Agent Template values remain\nauthoritative and merge key by key.\n\n## fleet.yaml\n\n```yaml\napi_version: ours.network/fleet/v2\nvars:\n work_root: /home/me/work\nstart_stagger_ms: 0\ndefaults:\n permissions:\n approval: ask\n filesystem: workspace\n unattended: deny\n monitor:\n mode: fleet # fleet (default) | native\nwatchdogs:\n nightwatch: # [A-Za-z0-9_-], must not collide with a role name\n coordinator: FleetCoordinator # required \u2014 where alerts go\n # everything below is optional\n enabled: true # default true; false = configured but never scheduled\n interval: 10m # default 10m; 30s | 10m | 2h, minimum 1m\n watch: [Alice, CodexReviewer] # explicit lists are exact; omit for configured + live temp roles\n agent: { ref: WatchdogAgent } # required: declared Agent ID, or canonical inline Agent definition\n identity: Watchdog-nightwatch # default: Watchdog-<name>\n timeout: 5m # default 5m; a run past this is killed and recorded as error\n keep_reports: 50 # default 50 reports retained per watchdog\n alert_cooldown: 60m # default 60m before the same finding alerts again\n prompt_file: /abs/extra.md # optional extra focus, APPENDED to the fixed contract\n```\n\nAn Agent is a separate bare document under `~/fleet/agents/<ID>.yaml`:\n\n```yaml\nrole: { inline: { mission: Coordinate work and delegate implementation. } }\nbrain: { inline: { harness: codex, session: codex-app-server, model: gpt-model-id } }\nidentity: Coordinator\ncwd: ${work_root}/project\noversee: [{ agent: Worker, interval: 5m }]\n```\n\nA watchdog observes and reports; it never restarts, stops, spawns, or removes a\nrole, answers a pending permission, edits a workspace, or approves anything on\nthe owner's behalf. `watchdogs:` may appear only in the base config\n(`~/fleet.yaml` or `-c FILE`); Agent/Role/Brain documents never own it.\nThe selected Agent owns Brain, Role, permissions, isolation, and every other\nagent setting. Legacy watchdog `harness`, `model`, `session`, and\n`isolation` fields fail with migration guidance.\nWhen `watch:` is omitted, each run watches the configured roles plus temporary\nfleet roles that are live when the run starts. An explicit `watch:` list is\nnever augmented.\n\nAgent operational values override manifest operational defaults. Role and Brain\nownership never cross-merges. `${name}` substitutes entries from `vars`.\nBrain fields include `max_tokens` and `autocompact_pct`; isolation is Agent-owned.\nUse README.md for the complete isolation policy and resource-cap schema.\n\nSupervised roles connect to the operator-configured ours daemon; they do not own its\nlifecycle. Fleet strips the obsolete, presence-sensitive `OURS_AUTOSTART` variable from\nagent-session children; `ours-mcp proxy` is client-only and never starts a daemon. Start\nthe shared daemon only through an explicit operator or installer/setup flow.\n\n## Rooms and tasks\n\n`init` materializes editable `single`, `pair`, and `team` Room templates plus\ntheir exact-cased Agent, Role, and Brain presets. The command prints the packaged\npreset revision and source directory. Inspect provenance and content before use:\n\n```sh\nours-fleet config [-c FILE]\nours-fleet template list [-c FILE]\nours-fleet template show team [-c FILE]\nours-fleet task create --title \"Solo task\" --template single [-c FILE]\nours-fleet task create --title \"Reviewed change\" --template pair [-c FILE]\nours-fleet task create --title \"Phased delivery\" --template team [-c FILE]\nours-fleet spawn --temp Scout --role SELECTION --brain SELECTION --loops-file PRIVATE.yaml\nours-fleet task start TASK --member developer --loops-file PRIVATE.yaml\nours-fleet task start TASK --member critic --no-loops\n```\n\n`--loops-file` must be an owner-only, non-symlink regular file <=1 MB containing\nexactly one top-level non-empty `loops:` mapping. `--no-loops` explicitly\ndisables loops. They are mutually exclusive and rejected for permanent spawn.\nFor a grouped room member the whole CLI block overrides its Agent Template;\nthe template overrides omission. Omission preserves historical no-loop behavior\nand never inherits manifest wildcard loops. Fleet validates before side effects,\nseals normalized timings plus exact private prompts, and reuses that snapshot for\nidempotent start, retry, recovery, and replacement. Trusted authoring and the\nprivate sealed runtime retain exact prompts; resolved launch, task, room,\nprovenance, and audit presentations show source, policy, timing, prompt bytes,\nand prompt SHA-256 instead of prompt text.\n\nAn alternate manifest `-c /path/custom.yaml` uses `/path/custom/` as its split\nroot. Repeated init only fills missing files and never adopts a newer default.\nExact known revision-3 through revision-5 packaged-bootstrap and generated role defaults have an exact-semantic,\nfail-closed migration (dry-run by default):\n\n`ours-fleet migrate-role-defaults [-c FILE]`\n`ours-fleet migrate-role-defaults [-c FILE] --write`\n\nReview removals, replacements, additions, preserved custom files, staging path,\nand recovery path. Same-named custom files stay byte-identical; dangling custom\nreferences refuse publication, and a successful rerun is a no-op. For explicit\nsingle-file adoption, copy from init's reported packaged source beside the target\nas `.new-default`, inspect `diff -u TARGET TARGET.new-default`, then replace it.\n\nThe exact generated six-worker legacy starter Agent set has its own fail-closed\nmigration (dry-run by default):\n\n`ours-fleet migrate-agent-templates [-c FILE]`\n`ours-fleet migrate-agent-templates [-c FILE] --write`\n\nReview the dry-run moves, addition, staging path, and retained recovery-backup path\nbefore `--write`. Customized/partial known starters and unsafe trees refuse without\nmutation; unrelated custom persistent Agents remain persistent. A manifest-level template\nmay shadow a same-named file only with `override_builtin: true` and a higher\nversion; this compatibility marker is deprecated and reported as a diagnostic.\n\nRooms always use `ours-cowork`; there is no room-provider selector. Configure\nthe cowork daemon connection and room owner directly:\n\n```yaml\nrooms:\n cowork:\n config: /home/me/.ours-cowork/config.json\n owner:\n expected_cid: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n public_invite_file: /home/me/.ours-fleet/owner-room-invite.txt\n defaults:\n template: team\n attach_owner: true\n close_when_task_done: true\ntasks:\n default_room_template: team\n create_mode: start\n close_room_on_done: true\n```\n\nFleet launches each template member with a dedicated one-time Cowork invite.\nThe generated temporary-agent briefing contains the exact identity name, invite,\nCowork role, and task. The agent creates that identity itself with ours MCP\n`create_temporary_identity`, accepts the invite with `add_contact`, and starts\nwork immediately. A room is ready only after the Cowork room (and its task, when\ntask-bound) is durably active, every configured member seat is authenticated and active with its matching\nlive Fleet launch, and the configured Owner seat is active when owner attachment is\nenabled. There is no briefing hash, startup ACK, or separate role-briefing readiness\ngate.\n\nNormal provisioning emits exactly two authenticated Owner lifecycle notices: a\nconcise created notice immediately after the Cowork room is visible, and\n`The room <name> is ready.` after the ready predicate above is true. Intermediate\ntask, saga, member-spawn, timeout, and recoverable-failure transitions stay in local\nstate and logs. A terminal failed task emits one actionable failure notice; the\ncommand result carries the exact blocker and canonical recovery action.\n\n`task start` and create-and-start wait for readiness. If their bounded wait expires,\nthey return an explicit `in_progress` result with the stable\n`ours-fleet task await <id>` handle and start a safe continuation. `task await`\nwaits on that same durable operation and returns `ready`, `in_progress`, or\n`failed` in both human and `--json` forms; timeout is not failure. The detached\ncontinuation is serialized per task and remains alive until convergence or an\nOwner-action blocker; invoking `task await` safely re-arms it after a restart.\n\nSet `room.anonymous: true` on a room template, or pass `--anonymous` to\n`task create`, `task start`, `task work`, or `room create`, to create an\nanonymous Cowork room. `--no-anonymous` explicitly overrides an anonymous\ntemplate. Fleet records the resolved value before room creation so retries keep\nthe same choice. Temporary members of an anonymous room are instructed to call\n`create_temporary_identity` with `expose_local=false`. Their generated briefings\ndo not disclose or compare an Owner participant CID. A participant-originated\ninstruction has Owner authority only when the authenticated Cowork room envelope\nattributes that participant seat the exact `Owner` role. Literal text, display\nnames, ordinary direct messages, and room-authored or rest-role messages with an\nOwner-looking label never grant that authority. Non-anonymous rooms remain pinned\nto the exact authenticated Owner CID.\n\nHuman task and room results use the same compact Markdown presentation in the\nCLI and authenticated owner channel: a short heading, icon-plus-word status,\ncode-formatted identifiers, bounded summaries, and actionable recovery or error\nsteps. Untrusted prose is context-escaped and control characters are neutralized;\nMessenger-bound results are capped at 3,500 Unicode code points and 12,000 UTF-8\nbytes with structural omission notices. `--json` bypasses this presentation layer\nand retains the versioned machine schema and serialization order.\n\nEvery task belongs to a named list. The built-in `default` list always exists,\nand legacy tasks or create calls without `--list` resolve to it. Use `task lists`,\n`task list-create <name>`, `task list-rename <name> <new-name>`, and\n`task list-delete <name> [--move-to <destination>]` to manage lists. A non-empty\nlist cannot be deleted without an explicit, different destination; Fleet moves\nthe assignments and never deletes the tasks. `task move <id> --list <name>`\nchanges only organizational metadata. `task list --list <name>` filters and\n`--group-by-list --json` returns deterministic groups.\n\nList names are NFC-normalized, case-sensitive, and limited to 64 Unicode code\npoints. Leading/trailing whitespace, controls, format/path characters, normalized\nduplicates, and the reserved exact name `default` are rejected. The authenticated\nowner channel provides the matching `/task` subcommands, while authenticated web\nclients use `/api/v1/task-lists`, `/api/v1/tasks`, and\n`/api/v1/tasks/:id/list`; every adapter delegates to the same application service.\nMessenger's multiline command grammar treats surrounding whitespace on each\nvalue line as transport framing; the canonical value passed to the shared service\nis the trimmed line. CLI arguments and REST strings are passed verbatim.\n\nOlder prerelease files with the exact legacy `provider: cowork` key under\n`rooms:` still load, but the key is ignored and omitted from resolved\nconfiguration. Remove it when editing the file. Any other legacy value is an\nerror. The optional `rooms.owner.provider` setting is separate and defaults to\n`messenger-server`.\n\nFinish and Delete are distinct terminal task actions:\n\n`ours-fleet task finish <id>` moves an active or review task to `done` and\ndeletes its associated Cowork room after retiring its members. The room then\ndisappears from normal Fleet and Cowork views; its brief, messages, repository\nreferences, and attachments are not retained as an inspectable archive.\nThe prerelease configuration names `tasks.close_room_on_done` and\n`rooms.defaults.close_when_task_done` are retained for compatibility, but\n`true` now means this close-then-delete behavior.\n\n`ours-fleet room delete <id> <id>` is the canonical destructive room command.\n`room close <id> <id>` remains a deprecated alias with identical deletion\nsemantics. Older prerelease `closed` room records are deleted directly the next\ntime `room list` reconciles Fleet with Cowork.\n\n`ours-fleet task delete <id> <id>` permanently deletes a task in ANY lifecycle\nstate \u2014 backlog, provisioning, active, blocked, review, done, cancelled, failed,\nor partially settled. The exact task ID is required twice for confirmation. A\ndurable deletion intent is persisted before any side effect; the cleanup worker\nthen retires managed room members with evidence, closes and deletes an attached\nroom (tolerating already-missing remote rooms), releases the sealed launch\nsnapshot, and unlinks the task record last. While cleanup settles the task is\nhidden from normal listings and every lifecycle mutation is rejected; if\ncleanup cannot complete (for example Cowork is unreachable), the deletion stays\nin a precise recoverable state \u2014 repeat the delete command or run\n`task recover <id>` to converge after outages, crashes, or restarts. Deletion\nnever fabricates a `done` transition. A metadata-only deletion receipt\n(acceptance actor, original state, timestamps, completion) is retained under\n`deletion-receipts/` as durable audit evidence. An already-missing task is an\nidempotent no-op. The Owner-channel equivalent is `/task delete <id> <id>`; the\nmanagement API equivalent is `DELETE /api/v1/tasks/<id>?confirm=<id>` (200 when\nsettled, 202 while pending; `GET /api/v1/tasks?includeDeleting=true` exposes\ndeletion-pending tasks to operators).\n\n## Permissions\n\nPrefer the harness-neutral `permissions` block:\n\n- `approval: ask|auto|allow`: portable permission policy. `deny` remains a\n deprecated, fail-closed compatibility alias for existing fleet files.\n- `filesystem: read-only|workspace|unrestricted`: filesystem intent\n- `unattended: deny|wait`: what a managed session does when no console can\n answer a request\n\nThe backend translates this common intent. Native Codex app-server roles reject\npermission aliases in `harness_options`; Codex ACP and Claude retain their\nlegacy native-override compatibility. Do not choose `allow`/`unrestricted`\nor Claude `bypassPermissions` without explicit authorization.\n\n### Creation-time isolation\n\n`ours-fleet spawn --isolation-file <path>` supplies a role's sandbox policy at\ncreation, so the FIRST launch is already confined \u2014 a role that only gains\n`isolation:` on a later `up` ran unsandboxed until then.\n\nThe file holds exactly the `isolation:` mapping documented above and nothing\nelse \u2014 the same schema, validated by the same code, so a policy written here\ncannot mean something different from the identical block in fleet.yaml:\n\n```yaml\nnetwork: deny\nfs:\n read: [/opt/reference]\nresources:\n mem: 2G\n```\n\nInvalid files are rejected before anything is created: no config, no state\ndirectory, no identity reservation. Works for both permanent and `--temp` roles.\n\n### Never-prompt failure\n\nThe failure this section exists to prevent leaves no error message anywhere.\n\nAn unattended role has no console. When the harness needs a permission decision\nthere is nobody to ask, so the request is refused INSIDE the harness \u2014 no\nprompt, no error, no log line. The agent simply does less than its briefing told\nit to, reports success, and nothing distinguishes that from having done the\nwork. Two settings produce it:\n\n1. a permission mode that suppresses the prompt without granting the action\n (Claude `dontAsk`, which is why neutral `allow` maps to\n `bypassPermissions` instead); and\n2. `unattended: deny`, which refuses every request that reaches it.\n\n**Automatic decisions are now recorded.** Every permission request decided\nwithout a human emits a completed event into\n`~/.ours-fleet/agents/<Name>/.session-events.jsonl` carrying the decision,\nwhether policy or a person made it, the policy that produced it\n(`permissions.unattended=deny` vs `permissions.approval=deny`/`=allow`),\nthe reason, and the option selected. `ours-fleet peek` and `attach` render\nthem. Automatic denial asks for a one-shot rejection, never a standing one, so a\nsingle unattended refusal cannot disable a tool for the rest of the session.\n\nA role that can auto-deny logs one line at startup saying so.\n\nTo detect an under-permissioned role BEFORE it runs, use the capability floor\nbelow: `ours-fleet doctor` fails such a role rather than letting it discover\nthe problem silently at work.\n\n### The unattended capability floor\n\nAn unattended role has no console, so a permission request cannot be answered \u2014\nit is refused, silently, inside the harness. The agent then does less than it\nwas told to and reports no error. To make that visible before launch,\n`ours-fleet config` and `ours-fleet doctor` resolve each role's neutral\npermissions through its harness and check the result against a fixed floor:\n\n- `read-state` \u2014 read its briefing, ROUTINES.md, and WORKLOG.md\n- `write-state` \u2014 append its WORKLOG and its own state files\n- `messaging` \u2014 bind its identity, send and receive ours mail\n- `monitor` \u2014 arm and observe its mail monitor\n- `workspace-edit` \u2014 edit and test files in its working directory\n- `status-commands` \u2014 run the inspection commands its briefing prescribes\n\n`doctor` reports this per role as `unattended floor: <Role>`. A role with\n`unattended: deny` that cannot meet the floor FAILS doctor, because it will\ndeny those requests with nobody to see it; with `unattended: wait` it warns,\nbecause a human can still attach and answer.\n\nSecurity meaning: native Codex maps `ask` \u2192 `untrusted`, `auto` \u2192\n`on-request`, and `allow` \u2192 `never`; its independent filesystem mapping is\n`read-only` \u2192 `read-only`, `workspace` \u2192 `workspace-write`, and\n`unrestricted` \u2192 `danger-full-access`. Users configure only the Fleet names.\nClaude maps `ask` to `default`, `auto` to `acceptEdits`, and `allow` to\n`bypassPermissions`. Codex ACP retains its adapter-specific coupled modes:\n`auto` selects `agent`, while `allow` selects `agent-full-access`. These\nmodes genuinely permit the actions the role was authorized to take \u2014\n`dontAsk` only suppresses the prompt while still refusing the action. Nothing\nother than an explicit `allow` becomes non-interactive. Legacy `deny` keeps\nits conservative Codex `on-request` / Claude `plan` translation. `allow` is therefore a real grant and\nrequires explicit authorization; per-role `isolation:` remains the outer\nboundary that a permission mode cannot cross.\n\nACP carries agent-advertised session mode IDs and `session/set_mode`, but those\nIDs are agent-specific and ACP defines no portable permission-policy capability.\nFleet therefore uses the ACP primitive where an adapter exposes a matching mode\nand otherwise performs the harness translation above. The bundled Codex ACP\nadapter couples approval and sandboxing in its advertised mode IDs. Neutral\n`allow` therefore selects `agent-full-access` and widens `filesystem:\nworkspace` or `read-only` to `danger-full-access`; neutral `auto` selects\n`agent` and `workspace-write` even when the neutral filesystem value differs.\nAn explicit `harness_options.sandbox` selects its corresponding ACP preset and\nstill wins, as does an explicit native approval override. `config` and\n`doctor` report a coupled-mode mismatch as approximate. Use per-role\n`isolation:` as the outer boundary for an `allow` ACP role. The live session\nreports both its effective normalized mode and the exact native mode selected.\n\nSee also: `spawn --approval/--filesystem/--unattended` set this intent at\ncreation, and `ours-fleet config` prints each role's neutral settings, their\nnative translation, and any warning \u2014 the same text `doctor` reports.\n\nClaude `harness_options`: `permission_mode` (default, acceptEdits, plan,\ndontAsk, bypassPermissions), `plugins`, `mem_palace`,\n`mem_palace_midsession_autosave`, `mcp_servers` and `mcp_servers_only`.\n\n`mcp_servers` declares MCP servers for the role, in `.mcp.json`'s own shape\n(a map of name to `{ command, args, env }`, or `{ type: http|sse, url,\nheaders }`). By default they are ADDED to whatever the OS user running the role\nalready has configured. The Claude Code adapter sends them in `session/new`.\n\nWhen `mcp_servers` is absent, Fleet sends ACP's protocol-required empty\n`mcpServers` array without an exclusive override, so the agent keeps its inherited\nservers. An explicitly empty configured set is different: Fleet preserves that intent\nthrough the bundled adapter's compatibility path and disables every inherited server.\n\n`mcp_servers_only: true` makes the declared set EXCLUSIVE through\n`strictMcpConfig`. It is all-or-nothing and it ignores every\nother MCP configuration: project `.mcp.json`, user settings, and **plugins**.\nThe ours connector is normally installed as a plugin, so a strict role that does\nnot re-declare it has no `send_message` and no `get_messages` \u2014 it cannot even\nreport that it has gone mute. Fleet therefore refuses a strict role whose\n`mcp_servers` does not name the connector; declare it explicitly, e.g.\n`ours: { command: ours-mcp, args: [proxy] }`.\n\nBoth options, and `plugins`, reach an ACP session through the bundled Claude ACP\nagent's `_meta` vocabulary. A role that sets `session_options.acp.command` runs\nan agent fleet did not choose and cannot be promised them, so that combination is\nrefused at validation rather than accepted and dropped. This narrows a role's\ntool surface; it does not stop the harness deferring tool schemas, which is the\nharness's own decision.\n\nCodex `harness_options`: `launcher` (auto, ours-codex, codex), `search`,\n`config`, `add_dirs`, and `monitor`; Codex ACP additionally supports\n`profile`. Native app-server roles reject `profile` because Codex does not\naccept `--profile` for `app-server`. They\nmust express approval and filesystem authority through the shared\n`permissions:` block, never through harness options. The adapter translates\n`ask|auto|allow` to Codex `untrusted|on-request|never` and translates\n`read-only|workspace|unrestricted` to Codex\n`read-only|workspace-write|danger-full-access`. Native `config` currently\nallows only `model_reasoning_effort`; ACP retains the broader Codex config surface.\n\nFor Codex, the opt-in `session: codex-app-server` directly runs Codex's native\nJSONL app server behind Fleet's provider-neutral session contract. It supports native item\nstreaming, commentary/final phases, prompt admission, steering, interruption,\npermission requests, durable conversation projection, and thread resume. Packaged\nCodex brains and the init wizard continue to select `session: acp` for compatibility;\nClaude Code also uses ACP. Native Codex defaults to `codex app-server` (or `ours-codex app-server`\nwhen launcher auto finds it). Override the exact command when necessary:\n\n`session_options: { codex_app_server: { command: [codex, app-server] } }`\n\nAn exact command override receives no appended profile, search, or subcommand\narguments. Native sessions persist their Codex thread in Fleet's `.session-id`\nand participate in its bounded fresh/resume recovery; cross-provider conversation\nportability is never assumed.\n\n## ACP adapters\n\nThe maintained `@agentclientprotocol/codex-acp` and\n`@agentclientprotocol/claude-agent-acp` runtimes are bundled automatically as\noptional ours-fleet dependencies. The supervisor resolves their executable\nentrypoints internally, so default ACP roles do not depend on global PATH.\nours-fleet and both maintained adapters require Node 22 or newer.\n\nOverride an adapter only when necessary with `session_options.acp.command`\n(string or argv list). If optional dependencies were deliberately omitted,\nours-fleet falls back to a compatible globally installed `codex-acp` or\n`claude-agent-acp`. `ours-fleet doctor -c FILE` verifies the resolved adapter.\n\n## Reliable mail wake\n\n`monitor.mode` selects exactly one wake owner:\n\n- `fleet` (default): the ours-fleet supervisor consumes body-free daemon\n events and advances its durable cursor only after delivery is accepted. ACP\n uses live steering when supported and falls back to structured\n `session/prompt`.\n- `native`: ours-fleet starts no supervisor monitor; the generated briefing\n instructs Claude Code or Codex to arm its harness-native wake mechanism.\n\nSet `monitor.interrupt: true` in fleet mode to cancel active work before every\nconfigured wake. Set it to `after_tool` to preserve an active ACP tool (and any\npending permission), then steer the wake at the first tool-terminal boundary\nwithout cancellation. A hung boundary is bounded at 120 seconds and falls back\nto non-cancelling steering/queueing; adapters without authenticated tool events\nuse the same conservative fallback. Explicit human/control interrupts remain\nimmediate. The policy is content-blind because the supervisor cannot inspect\nencrypted message bodies. Message bodies are released only when the role calls\nthe ours `get_messages` tool.\n\nThe default is `false`. For a temporary role whose mission intentionally arrives\nafter its readiness announcement, set `mode: fleet` and `interrupt: true`\nexplicitly. The readiness announcement does not change the transport: the\nmission remains ordinary ours mail, fleet injects only the body-free wake, and\nthe role calls `get_messages` before acting. Every later configured wake uses\nthe same interruption policy.\n\nLegacy `monitor.enabled: true|false` remains accepted as an alias for\n`mode: fleet|native`; use `mode` in new configuration. Codex's separate\n`harness_options.monitor: true` is native-monitor consent, not monitor-owner\nselection.\nInspect `ours-fleet status Name`, `peek Name`, role logs, and\n`~/.ours-fleet/agents/Name/.monitor-status` when diagnosing delivery.\n\n## Trusted owner channel\n\nAny managed role may declare a separate ours identity which fleet \u2014 never the agent \u2014\ncreates when missing and binds:\n\n```yaml\nowner_channel:\n identity: Coordinator Owner Channel\n owners: [authenticated-owner-contact-cid]\n agent: authenticated-managed-agent-cid\n interrupt: false\n progress_interval_ms: 30000\n comments: true\n attachments:\n enabled: true\n max_files_per_request: 4\n max_file_bytes: 10485760\n max_request_bytes: 20971520\n retention_ms: 86400000\n```\n\nPermanent role identities are also reconciled before launch. Fleet creates a\nmissing role identity with local exposure and local auto-accept enabled. A\nmissing owner-channel identity uses the safer inverse policy: both are disabled.\nThe short provisioning lease is released before the agent or channel binds.\nTemporary role identities remain connector-owned because their creating lease\ndefines their cleanup lifetime.\n\nThis does not replace the role identity. Normal identity mail remains untrusted\npeer input: the agent reads it through `get_messages` and replies through\n`send_message`. Mail arriving on the dedicated channel from a CID in `owners`\nis injected as a direct `[fleet-owner]` prompt. Mail from the exact `agent`\nCID is forwarded as a new message to the latest authenticated owner conversation;\nits files may also be relayed through this channel. A reply reference selects the\nowner of that authenticated source wire instead of the latest conversation.\nEvery other CID is rejected and warned about without reflecting its body. Fleet sends\naccepted/queued/progress/interrupted/failure notices and routes the ACP turn's\nfinal assistant text back to the authenticated sender with its source wire ID.\nFor file replies of every kind \u2014 a response artifact, a proactive note, or an\nin-turn attachment \u2014 the agent calls ours `send_file` to the channel identity\nand may pair it with a reply-linked caption; fleet, not the agent, chooses the\nowner. That is the only delivery route an agent is given: a tool call either\ndelivers or reports an error, where a file written to disk does neither.\nOwner messages whose trimmed text starts with `/` are deterministic\nsupervisor commands and never enter the model: `/help` (alias `/commands`),\n`/status`, `/comments [status|on|off]`, `/interrupt`, `/clear`,\n`/compact`, `/model <model-id>`, `/restart`, `/force-restart`, `/ls`,\n`/peek`, `/worklog`, and\n`/version`. Unknown or malformed commands answer with the help text instead of\nbeing forwarded; plain messages reach the agent unchanged. `/clear`,\n`/compact`, and `/model` are forwarded only when the role's bundled ACP\nadapter executes them locally (claude-code: all three; codex: `/compact`\nonly) and are otherwise refused with a notice, so slash text never reaches the\nmodel as a prompt.\n\nThe supervisor advertises the same primary registry entries as recipient-scoped\nours typed commands. Their single arguments field is converted back to the text\nafter the slash command name and enters the same dispatcher; aliases stay\nslash-only. Typed handlers repeat the live authenticated Owner-CID check before\ndispatch and return a null protocol completion because the existing correlated\nowner-channel reply remains the result.\n\nWhile a request runs, the agent's live ACP commentary is relayed as messages\nprefixed with the single stable label `\uD83D\uDFE1 Live update:`, so an owner can see\nexactly which messages the setting controls. `owner_channel.comments`\n(default `true`, so existing channels keep their current behavior) is the\nRESTART BASELINE; `/comments on|off` changes only the running session and is\ndeliberately not persisted, so a restart always returns to the checked-in\nconfiguration. `/comments status` reports the live value, the baseline, and\nwhether the backend emits live comments at all. Suppressing live comments never\nsuppresses receipts, progress notices, or the final answer.\n\nOwner documents, images, and voice messages use the same authenticated sender\nand source-wire boundary. Fleet inspects body-free metadata first and rejects\ndisabled, over-count, or over-size requests before selective\nretrieval. Unauthorized CIDs are never retrieved or answered. Reply-linked text\nand files from the same sender become one ordered request; a file-only wake also\nstarts a turn. Retrieved bytes must match their structured size and SHA-256,\nwhile MIME values, extensions, file categories, and declared-versus-detected mismatches\nremain report-only metadata. Symlinks or non-regular paths fail closed. Sanitized copies live only in a mode-0700 request directory as\nmode-0600 files and are removed after completion or bounded stale retention.\n\nThe legacy `attachments.allowed_mime` key is accepted and ignored so existing\nconfigurations keep loading; it is omitted from resolved configuration and cannot\naffect admission.\n\nVoice prompts include a bounded transcript only when typed daemon metadata reports success.\nFailure or unavailability is explicit and preserves the private audio path as the\ninput for direct review. Run `ours config show --json` and inspect `sttConfigured` without\nrevealing provider credentials.\nA mode-0600 message claim journal stores only wire ID, persistent-history\nsequence, and claim time. Fleet journals the exact body-free oldest-first slice\nbefore calling `getMessages` with that slice length, rejects a returned set\nmismatch, and loads a crash-recovered body only through `getHistoryItem`.\nThe attachment crash journal contains only authenticated CID and wire routing\ndata; it never stores captions, filenames, paths, transcript text, or bytes.\nJournaled read files resume through `getFileInfo` and `fetchFile`. A claimed\nagent caption is loaded from history and rejoined before the group is admitted. Fleet\nresolves one authenticated owner route before retrieving bytes, admits every file\nbefore emitting the caption or any file, and sends every part to that same route.\nUnknown correlated routes remain queued without retrieval and receive one bounded\ncorrelated notice. Admission rejection consumes the whole group with one NACK;\nonce emission starts, a transport error becomes terminal uncertain delivery and\nthe group is never blind-retried. Bounded v2 source-wire routing state is migrated\nfrom v1 on read. Corrupt state disables attachment admission rather than weakening\nprovenance checks.\n\nThe channel identity must be unique and must not be a role identity. The bridge\npersists bounded wire IDs only, never message/reply plaintext, and requeues input\nbefore starting its turn for at-least-once crash recovery. It currently requires\nthe structured agent-session interface so correlated final replies retain their\ndelivery guarantee.\n\n### Live contact and owner administration\n\nThe supervisor which is already running the managed role remains the sole binder of\n`owner_channel.identity`. The CLI reaches that exact live `OwnerChannel`\nthrough the role's token-authenticated, mode-0600 Unix control socket for contact\ninspection and setup; it never starts another ours client and never force-binds:\n\nRapid supervised restart is serialized by a role-scoped single-binder lease.\nThe predecessor closes its authenticated control socket and MCP proxy before\nreleasing ownership. The replacement waits at most five seconds and retries the\ndaemon bind only when PID/start-marker metadata proves the holder was the same\nrole and owner-channel identity. Foreign, live, corrupt, or otherwise\nunverifiable ownership remains fail-closed; fleet never uses `force=true`.\n\nIf that matching predecessor misses the bound, its still-authenticated control\nroute may send one fixed, digest-deduplicated recovery notice through the latest\nauthenticated owner conversation (or the sole configured owner). Notice\nplaintext is never persisted. With no safe deterministic route fleet guesses no\nrecipient and leaves the actionable failure in the web console and role logs.\nThe remote recovery action is `/restart`; inspect repeated failures with\n`ours-fleet logs <Role>` or the web console.\n\n```sh\nours-fleet owner-channel contact list <Role>\nours-fleet owner-channel contact invite <Role> [--name <label>]\nours-fleet owner-channel contact add <Role> (--invite-file <path> | --invite-stdin) [--name <label>]\nours-fleet owner-channel owner list <Role>\nours-fleet owner-channel owner authorize <Role> <exact-64-hex-contact-cid>\nours-fleet owner-channel owner revoke <Role> <exact-64-hex-contact-cid>\n```\n\nContact establishment and owner authorization are separate security steps.\n`contact add` never authorizes: invite redemption is pending until the peer\nverifies it. Once `contact list` reports the established contact, authorize\nits exact immutable CID explicitly. Invite creation emits invite material only\non stdout; acceptance reads it from a file or stdin, not argv.\n\nConfigured `owners` remain the baseline. On legacy channels without `agent`,\nlive authorizations/revocations are an immediately effective, restart-persistent\noverlay. Managed-agent CID gating makes fleet configuration authoritative and\ndisables live owner mutation and direct control-socket sends. `owner list` labels\nbaseline versus dynamic entries and effective status. The atomic mode-0600 file\ncontains bounded CIDs and audit actions only. Corruption disables all effective\nowners and refuses mutation rather than resurrecting authority; revoking the\nlast effective owner is always refused.\n\nA missing/stopped role, role without `owner_channel`, unavailable\nMCP client, or a role entering shutdown returns an actionable error with no\nside effects. Management uses no network listener and never logs or persists\ninvite material.\n\nFor any non-final message\u2014progress, blocker, suggestion, or later proactive note\u2014\nthe managed agent calls ordinary ours `send_message` to the channel identity.\nFleet checks only that the authenticated sender CID exactly equals `agent`, then\nforwards the text as a new message. There is no task/request/update type, phase,\nreply correlation, or owner recipient argument. A sole owner is the safe fallback;\nwith multiple owners and no inbound route history the relay fails closed. Devices\nsharing one identity share its CID; separate owner identities hand off the route\nwhen either sends channel mail. The ACP final is separate: fleet extracts it from\nthe completed turn and deterministically replies to the initiating owner wire.\n\nThe bounded mode-0600 route state stores CIDs, wire IDs, timestamps, delivery state,\nand hashes but never message plaintext. Unauthorized attempts produce a bounded\nCID-only owner warning; attempted bodies are neither reflected nor persisted.\n\nFor a mobile owner, establish the contact first, wait for peer verification,\nauthorize its exact CID, and revoke that same CID when access ends. The bounded\nmode-0600 CID overlay survives supervisor restart and remains fail-closed on\ncorruption. Update bodies remain memory-only. After a crash/restart, unfinished\ndeferred owner input follows the existing at-least-once replay path; the restarted\nsupervisor remains the sole binder.\n\n## Stable config and YAML migration\n\n`ours-fleet config --json` emits schemaVersion 1 resolved plans. Environment\nvalues and mission/persona/bio bodies are withheld; environment keys are sorted\nand values are marked redacted. Additive fields may appear in schema 1, while a\nremoval or semantic reuse requires a new schema version.\n\nYAML parsing always rejects duplicate keys. The current default\n`--yaml-mode compat` warns with file/line/column for anchors, aliases, explicit\ntags, non-scalar keys, and multiple documents. Use `--yaml-mode strict` in CI\nnow; strict becomes the next-major default and compat is the temporary migration\nescape hatch.\n\n## Bounded worklogs, auth proxy, and model recovery\n\nWORKLOG rotation is enabled by default with\n`worklog: { max_kb: 1024, keep_tail_kb: 256, max_archives: 12 }`. Maps may\noverride individual values; `worklog: false` on a role or in defaults opts out.\nFleet rotates only at that role's launch/resume lifecycle boundary. Concurrent\nchanges defer rotation. The active file keeps a bounded UTF-8 tail and advances\nto a line boundary when a complete line fits. If one logical line alone exceeds\nthe budget, its newest suffix remains and the rotation manifest records the\nmid-line start and omitted byte count. The complete prior inode receives a\ncollision-safe UTC archive name, and\n`.worklog-rotation.json` records restart provenance. `max_archives` bounds\nrecent archives beside WORKLOG.md; older complete archives move to\n`WORKLOG.archives/` without deletion. All archives share the role's sensitive\nstate boundary. Fleet refuses a symlinked/non-regular live log or a symlinked\ncold-archive boundary before replacing the live path and best-effort removes a\nduplicate publication left by a detected failure while the original inode is\nstill available. The manifest records SHA-256 digests for the archive and live\nbytes observed when it is written. These checks address ordinary path hazards,\nnot intentional path mutation by a malicious concurrent process with the same\nUnix authority; that is outside the threat model and requires OS-level isolation.\n\nACP tool diffs are bounded before entering web conversation events. Existing\nsmall before/after diffs are unchanged. Oversized whole-file snapshots are\nreduced to the actual changed region plus path, operation, original byte counts,\ndigest, and omission metadata. Each retained side is a newest-content UTF-8 tail\nof at most 64 KiB, advanced to a line boundary when a complete line fits. An\noverlong single line keeps its newest suffix and explicitly records a mid-line\nstart. Paths retain at most a 4 KiB suffix with byte count, digest, and omitted\nprefix metadata; the complete normalized update is capped at 320 KiB. A large\nappend therefore retains current appended content, not the historical prefix.\nThe live web-console transcript includes only the current runner generation and\nexcludes adapter session/load replay. Replayed events remain durable with\nagent_replay provenance for diagnosis and recovery.\n\n`auth_proxy: { kind: anthropic, base_url, required, health_url }` is Claude-only\nand loopback-only. Fleet injects only ANTHROPIC_BASE_URL and doctor rejects\ncredential env keys. The privileged reference companion is\n`contrib/anthropic-auth-proxy.mjs`; deploy it separately as a dedicated account\nwith a 0600 token file and per-role listener access. Fleet never installs it or\nreads its credential.\n\n`model_chain` is an ordered authorization list and its first entry must equal\n`model`. Only sustained high-confidence entitlement/quota 429 evidence advances\none entry. Transient 429, overload, auth, policy, and unknown errors never\ndown-shift. Runtime state is atomic in .model-recovery.json; exhaustion is\nfail-closed and held down. Change the declared chain/model and restart to\nreconcile explicitly; no chain preserves detection-only behavior.\n";
|
|
8
8
|
/**
|
|
9
9
|
* What every shipped spawn-skill variant must say, and must not say.
|
|
10
10
|
*
|
package/dist/docs.js
CHANGED
|
@@ -678,8 +678,7 @@ The maintained \`@agentclientprotocol/codex-acp\` and
|
|
|
678
678
|
\`@agentclientprotocol/claude-agent-acp\` runtimes are bundled automatically as
|
|
679
679
|
optional ours-fleet dependencies. The supervisor resolves their executable
|
|
680
680
|
entrypoints internally, so default ACP roles do not depend on global PATH.
|
|
681
|
-
|
|
682
|
-
the ours-fleet core minimum of Node 20.
|
|
681
|
+
ours-fleet and both maintained adapters require Node 22 or newer.
|
|
683
682
|
|
|
684
683
|
Override an adapter only when necessary with \`session_options.acp.command\`
|
|
685
684
|
(string or argv list). If optional dependencies were deliberately omitted,
|
|
@@ -776,6 +775,13 @@ adapter executes them locally (claude-code: all three; codex: \`/compact\`
|
|
|
776
775
|
only) and are otherwise refused with a notice, so slash text never reaches the
|
|
777
776
|
model as a prompt.
|
|
778
777
|
|
|
778
|
+
The supervisor advertises the same primary registry entries as recipient-scoped
|
|
779
|
+
ours typed commands. Their single arguments field is converted back to the text
|
|
780
|
+
after the slash command name and enters the same dispatcher; aliases stay
|
|
781
|
+
slash-only. Typed handlers repeat the live authenticated Owner-CID check before
|
|
782
|
+
dispatch and return a null protocol completion because the existing correlated
|
|
783
|
+
owner-channel reply remains the result.
|
|
784
|
+
|
|
779
785
|
While a request runs, the agent's live ACP commentary is relayed as messages
|
|
780
786
|
prefixed with the single stable label \`🟡 Live update:\`, so an owner can see
|
|
781
787
|
exactly which messages the setting controls. \`owner_channel.comments\`
|
|
@@ -176,6 +176,8 @@ export declare class OwnerChannel implements OwnerChannelHandle {
|
|
|
176
176
|
* (a crash must replay them) but must not be queued twice while live.
|
|
177
177
|
*/
|
|
178
178
|
private readonly inFlight;
|
|
179
|
+
/** SDK handlers entered during the current getMessages call. */
|
|
180
|
+
private readonly typedHandlersEntered;
|
|
179
181
|
/** Wires already NACKed to the managed agent, so a history replay stays quiet. */
|
|
180
182
|
private readonly relayNacks;
|
|
181
183
|
/**
|
|
@@ -275,6 +277,15 @@ export declare class OwnerChannel implements OwnerChannelHandle {
|
|
|
275
277
|
* agent itself can execute /force-restart, /model, or any other command.
|
|
276
278
|
*/
|
|
277
279
|
private handleCommand;
|
|
280
|
+
/**
|
|
281
|
+
* Register one typed adapter per primary slash command. The adapter performs
|
|
282
|
+
* the live CID check before constructing the same slash text and entering the
|
|
283
|
+
* existing dispatcher; its null SDK result avoids duplicating the ordinary
|
|
284
|
+
* owner-channel replies that remain the command's result contract.
|
|
285
|
+
*/
|
|
286
|
+
private registerTypedCommands;
|
|
287
|
+
private handleRecoveredTypedCommand;
|
|
288
|
+
private handleTypedCommand;
|
|
278
289
|
/** Queue raw slash text to the harness and report the turn's outcome. */
|
|
279
290
|
private runHarnessCommand;
|
|
280
291
|
/**
|
|
@@ -14,7 +14,7 @@ import { pickBackend } from '../supervisor/index.js';
|
|
|
14
14
|
import { ACP_CANCEL_DEADLINE_EXCEEDED, CODEX_APP_SERVER_CANCEL_DEADLINE_EXCEEDED, SessionControlError, } from '../session/types.js';
|
|
15
15
|
import { VERSION } from '../version.js';
|
|
16
16
|
import { renderMarkdownFailure, renderMarkdownResult, roomStatus, taskStatus, } from '../rooms-tasks/markdown.js';
|
|
17
|
-
import { dispatchOwnerCommand, fleetCliOps, isOwnerCommandText, } from './commands.js';
|
|
17
|
+
import { dispatchOwnerCommand, fleetCliOps, isOwnerCommandText, ownerTypedCommandCatalog, ownerTypedCommandText, } from './commands.js';
|
|
18
18
|
import { beginFleetAuditCollection, consumeFleetAuditCollection, FleetCommandAuditStore, lifecycleEventDigestBasis, renderFleetLifecycleEvent, setFleetAuditLifecycleCheckpoint, } from '../fleet-command-audit.js';
|
|
19
19
|
import { OURS_BOUND_ELSEWHERE, OursSdkClient, oursErrorCode, } from './ours-client.js';
|
|
20
20
|
import { ownerNotices, } from './notices.js';
|
|
@@ -79,6 +79,8 @@ export class OwnerChannel {
|
|
|
79
79
|
* (a crash must replay them) but must not be queued twice while live.
|
|
80
80
|
*/
|
|
81
81
|
inFlight = new Set();
|
|
82
|
+
/** SDK handlers entered during the current getMessages call. */
|
|
83
|
+
typedHandlersEntered = new Set();
|
|
82
84
|
/** Wires already NACKed to the managed agent, so a history replay stays quiet. */
|
|
83
85
|
relayNacks = new Set();
|
|
84
86
|
/**
|
|
@@ -173,6 +175,7 @@ export class OwnerChannel {
|
|
|
173
175
|
for (;;) {
|
|
174
176
|
try {
|
|
175
177
|
await this.client.bindIdentity(this.options.config.identity);
|
|
178
|
+
await this.registerTypedCommands();
|
|
176
179
|
break;
|
|
177
180
|
}
|
|
178
181
|
catch (error) {
|
|
@@ -424,6 +427,9 @@ export class OwnerChannel {
|
|
|
424
427
|
if (superseded())
|
|
425
428
|
throw new Error('owner recovery epoch superseded');
|
|
426
429
|
await this.recoveryStage('bind', this.client.bindIdentity(this.options.config.identity), deadlineAt);
|
|
430
|
+
if (superseded())
|
|
431
|
+
throw new Error('owner recovery epoch superseded');
|
|
432
|
+
await this.recoveryStage('register_commands', this.registerTypedCommands(), deadlineAt);
|
|
427
433
|
if (superseded())
|
|
428
434
|
throw new Error('owner recovery epoch superseded');
|
|
429
435
|
// Journal-aware drain is the only operation allowed to mark owner mail
|
|
@@ -884,27 +890,61 @@ export class OwnerChannel {
|
|
|
884
890
|
throw new Error('the ours daemon returned invalid unread message metadata');
|
|
885
891
|
const preflight = listed.slice(0, OWNER_MESSAGE_BATCH_LIMIT);
|
|
886
892
|
const now = Date.now();
|
|
887
|
-
const
|
|
888
|
-
|
|
889
|
-
if (
|
|
893
|
+
const metadata = preflight.map(item => ({ item, claim: this.messageClaim(item, now),
|
|
894
|
+
kind: item.message_kind }));
|
|
895
|
+
if (metadata.some(item => !['text', 'command', 'command_result'].includes(item.kind)))
|
|
896
|
+
throw new Error('the ours daemon returned an unknown unread message kind');
|
|
897
|
+
// The SDK marks the entire batch read before invoking typed handlers. Claim
|
|
898
|
+
// every text AND command row first: if an earlier lifecycle handler exits
|
|
899
|
+
// this process, a later command is recovered from persistent history even
|
|
900
|
+
// though its SDK handler was never entered. Command-result rows are inert.
|
|
901
|
+
const recoverable = metadata.filter(item => item.kind !== 'command_result');
|
|
902
|
+
const claims = recoverable.map(item => item.claim);
|
|
903
|
+
const textClaims = metadata.filter(item => item.kind === 'text').map(item => item.claim);
|
|
904
|
+
const textClaimKeys = new Set(textClaims.map(item => `${item.seq}\0${item.wireId}`));
|
|
905
|
+
const preflightKeys = new Set(metadata.map(item => `${item.claim.seq}\0${item.claim.wireId}`));
|
|
906
|
+
if (preflightKeys.size !== metadata.length)
|
|
890
907
|
throw new Error('the ours daemon returned duplicate unread message metadata');
|
|
891
908
|
this.messageRecovery.claim(claims);
|
|
892
909
|
let fresh = [];
|
|
893
910
|
let remaining = 0;
|
|
894
911
|
// SDK batchLimit rejects zero. An empty preflight is a read-only drain.
|
|
895
|
-
if (
|
|
896
|
-
const payload = await this.client.getMessages(
|
|
897
|
-
if (!payload || !Array.isArray(payload.messages)
|
|
912
|
+
if (preflight.length) {
|
|
913
|
+
const payload = await this.client.getMessages(preflight.length);
|
|
914
|
+
if (!payload || !Array.isArray(payload.messages) || !Array.isArray(payload.command_results)
|
|
915
|
+
|| !Number.isSafeInteger(payload.commands_handled) || payload.commands_handled < 0
|
|
898
916
|
|| !Number.isSafeInteger(payload.remaining) || payload.remaining < 0)
|
|
899
917
|
throw new Error('the ours daemon returned an invalid claimed message batch');
|
|
900
918
|
fresh = payload.messages.map(message => this.historyMessage(message));
|
|
901
919
|
remaining = payload.remaining;
|
|
902
|
-
const expected =
|
|
920
|
+
const expected = textClaimKeys;
|
|
903
921
|
const actual = new Set(fresh.map(item => `${item.seq}\0${item.wire_id}`));
|
|
904
|
-
if (fresh.length !==
|
|
922
|
+
if (fresh.length !== textClaims.length || actual.size !== fresh.length
|
|
905
923
|
|| actual.size !== expected.size
|
|
906
924
|
|| [...expected].some(item => !actual.has(item)))
|
|
907
925
|
throw new Error('the ours daemon claimed a different message batch than fleet journaled');
|
|
926
|
+
const expectedCommands = metadata.filter(item => item.kind === 'command');
|
|
927
|
+
if (payload.commands_handled !== expectedCommands.length)
|
|
928
|
+
throw new Error('the ours daemon handled a different typed-command batch than fleet inspected');
|
|
929
|
+
const expectedResults = new Set(metadata.filter(item => item.kind === 'command_result')
|
|
930
|
+
.map(item => `${item.claim.seq}\0${item.claim.wireId}`));
|
|
931
|
+
const actualResults = new Set(payload.command_results
|
|
932
|
+
.map(item => `${item.seq}\0${item.wire_id}`));
|
|
933
|
+
if (actualResults.size !== payload.command_results.length
|
|
934
|
+
|| actualResults.size !== expectedResults.size
|
|
935
|
+
|| [...expectedResults].some(item => !actualResults.has(item)))
|
|
936
|
+
throw new Error('the ours daemon returned a different typed-command result batch than fleet inspected');
|
|
937
|
+
for (const item of expectedCommands) {
|
|
938
|
+
// Invalid envelopes and unregistered commands never enter a handler;
|
|
939
|
+
// the SDK has already returned handler_failed, so consume those now.
|
|
940
|
+
// Entered harness commands keep their claim until async completion.
|
|
941
|
+
if (!this.typedHandlersEntered.has(item.claim.wireId))
|
|
942
|
+
this.state.remember(item.claim.wireId);
|
|
943
|
+
this.typedHandlersEntered.delete(item.claim.wireId);
|
|
944
|
+
}
|
|
945
|
+
for (const item of metadata)
|
|
946
|
+
if (item.kind === 'command_result')
|
|
947
|
+
this.state.remember(item.claim.wireId);
|
|
908
948
|
}
|
|
909
949
|
const merged = new Map();
|
|
910
950
|
for (const message of [...recovered, ...fresh]) {
|
|
@@ -1160,6 +1200,8 @@ export class OwnerChannel {
|
|
|
1160
1200
|
const wireId = this.wireId(message);
|
|
1161
1201
|
if (!wireId || this.state.has(wireId) || this.inFlight.has(wireId))
|
|
1162
1202
|
return false;
|
|
1203
|
+
if (message.message_kind === 'command')
|
|
1204
|
+
return this.handleRecoveredTypedCommand(message, wireId);
|
|
1163
1205
|
const sender = this.sender(message);
|
|
1164
1206
|
if (this.isAgentSender(sender.id)) {
|
|
1165
1207
|
try {
|
|
@@ -1406,6 +1448,84 @@ export class OwnerChannel {
|
|
|
1406
1448
|
if (!this.inFlight.has(wireId))
|
|
1407
1449
|
this.state.remember(wireId);
|
|
1408
1450
|
}
|
|
1451
|
+
/**
|
|
1452
|
+
* Register one typed adapter per primary slash command. The adapter performs
|
|
1453
|
+
* the live CID check before constructing the same slash text and entering the
|
|
1454
|
+
* existing dispatcher; its null SDK result avoids duplicating the ordinary
|
|
1455
|
+
* owner-channel replies that remain the command's result contract.
|
|
1456
|
+
*/
|
|
1457
|
+
registerTypedCommands() {
|
|
1458
|
+
const commands = ownerTypedCommandCatalog().map(definition => ({
|
|
1459
|
+
name: definition.name,
|
|
1460
|
+
description: definition.description,
|
|
1461
|
+
input_schema: definition.input_schema,
|
|
1462
|
+
handler: (input, context) => {
|
|
1463
|
+
this.typedHandlersEntered.add(context.request_wire_id);
|
|
1464
|
+
return this.handleTypedCommand(definition.name, input, context);
|
|
1465
|
+
},
|
|
1466
|
+
}));
|
|
1467
|
+
return this.client.registerCommands(commands);
|
|
1468
|
+
}
|
|
1469
|
+
async handleRecoveredTypedCommand(message, wireId) {
|
|
1470
|
+
let payload;
|
|
1471
|
+
try {
|
|
1472
|
+
const parsed = JSON.parse(String(message.body ?? message.text ?? ''));
|
|
1473
|
+
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)
|
|
1474
|
+
|| Object.keys(parsed).length !== 2
|
|
1475
|
+
|| typeof parsed.command !== 'string'
|
|
1476
|
+
|| !('arguments' in parsed))
|
|
1477
|
+
throw new Error('invalid command payload');
|
|
1478
|
+
payload = parsed;
|
|
1479
|
+
}
|
|
1480
|
+
catch {
|
|
1481
|
+
// The original SDK attempt would have emitted handler_failed without
|
|
1482
|
+
// entering Fleet. Recovery mirrors that terminal no-effect outcome.
|
|
1483
|
+
this.state.remember(wireId);
|
|
1484
|
+
return true;
|
|
1485
|
+
}
|
|
1486
|
+
const sender = this.sender(message);
|
|
1487
|
+
try {
|
|
1488
|
+
await this.handleTypedCommand(payload.command, payload.arguments, {
|
|
1489
|
+
sender_cid: sender.id, sender_name: sender.name, request_wire_id: wireId,
|
|
1490
|
+
});
|
|
1491
|
+
}
|
|
1492
|
+
catch (error) {
|
|
1493
|
+
// Expected handler failures (unauthorized/invalid typed input) are
|
|
1494
|
+
// terminal and already recorded, just as the SDK swallows them.
|
|
1495
|
+
if (!this.state.has(wireId))
|
|
1496
|
+
throw error;
|
|
1497
|
+
}
|
|
1498
|
+
return true;
|
|
1499
|
+
}
|
|
1500
|
+
async handleTypedCommand(name, input, context) {
|
|
1501
|
+
const sender = { id: context.sender_cid, name: context.sender_name };
|
|
1502
|
+
const wireId = context.request_wire_id;
|
|
1503
|
+
if (!this.isEffectiveOwner(sender.id)) {
|
|
1504
|
+
this.options.log(`[${this.options.role}] owner channel ignored unauthorized typed-command sender `
|
|
1505
|
+
+ `${sender.id || '<unknown>'}`);
|
|
1506
|
+
await this.warnOwnerOfUnauthorizedSender(sender.id);
|
|
1507
|
+
if (wireId)
|
|
1508
|
+
this.state.remember(wireId);
|
|
1509
|
+
throw new Error('typed owner command denied');
|
|
1510
|
+
}
|
|
1511
|
+
try {
|
|
1512
|
+
try {
|
|
1513
|
+
this.conversations.recordInbound(sender.id, wireId);
|
|
1514
|
+
}
|
|
1515
|
+
catch (error) {
|
|
1516
|
+
this.logError('owner conversation route update failed', error);
|
|
1517
|
+
}
|
|
1518
|
+
await this.handleCommand(sender, ownerTypedCommandText(name, input), wireId);
|
|
1519
|
+
return null;
|
|
1520
|
+
}
|
|
1521
|
+
catch (error) {
|
|
1522
|
+
// Structural typed-input failures are terminal handler_failed outcomes,
|
|
1523
|
+
// not indefinitely replayable work.
|
|
1524
|
+
if (wireId)
|
|
1525
|
+
this.state.remember(wireId);
|
|
1526
|
+
throw error;
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1409
1529
|
/** Queue raw slash text to the harness and report the turn's outcome. */
|
|
1410
1530
|
async runHarnessCommand(sender, command, wireId) {
|
|
1411
1531
|
const requestId = this.requestId(wireId);
|
|
@@ -1528,12 +1648,13 @@ export class OwnerChannel {
|
|
|
1528
1648
|
}
|
|
1529
1649
|
const { task, room, issues } = begin.result;
|
|
1530
1650
|
const hints = issues.map(issue => issue.code === 'waiting_cowork' ? 'Cowork socket unreachable'
|
|
1531
|
-
: issue.code === '
|
|
1532
|
-
: issue.code === '
|
|
1533
|
-
: issue.code === '
|
|
1534
|
-
: issue.code === '
|
|
1535
|
-
: issue.code === '
|
|
1536
|
-
: issue.code
|
|
1651
|
+
: issue.code === 'waiting_owner_authorization' ? 'Owner command authorization is not configured'
|
|
1652
|
+
: issue.code === 'waiting_owner_invite' ? 'Owner invite missing or invalid'
|
|
1653
|
+
: issue.code === 'owner_cid_mismatch' ? 'Owner CID mismatch'
|
|
1654
|
+
: issue.code === 'member_failed' ? `Member failed at step ${issue.stepIndex}`
|
|
1655
|
+
: issue.code === 'resume_failed' ? `Resume failed: ${issue.error}`
|
|
1656
|
+
: issue.code === 'provisioning_resumed' ? 'Provisioning resumed successfully'
|
|
1657
|
+
: issue.code);
|
|
1537
1658
|
await this.send(sender.id, renderMarkdownResult({
|
|
1538
1659
|
icon: '🛟', title: 'Task recovery',
|
|
1539
1660
|
fields: [{ label: 'Task', value: task.task_id, kind: 'code' },
|
|
@@ -115,6 +115,11 @@ export interface OwnerCommand {
|
|
|
115
115
|
summary: string;
|
|
116
116
|
execute(ctx: OwnerCommandContext, args: string): Promise<void>;
|
|
117
117
|
}
|
|
118
|
+
export interface OwnerTypedCommandDefinition {
|
|
119
|
+
name: string;
|
|
120
|
+
description: string;
|
|
121
|
+
input_schema: Record<string, unknown>;
|
|
122
|
+
}
|
|
118
123
|
/**
|
|
119
124
|
* Commands each harness's bundled ACP adapter verifiably executes locally,
|
|
120
125
|
* pinned by test/acp-adapter-commands.test.ts against the shipped adapter
|
|
@@ -131,6 +136,18 @@ export declare const HARNESS_LOCAL_COMMANDS: Record<string, readonly string[]>;
|
|
|
131
136
|
* registration step for a new command.
|
|
132
137
|
*/
|
|
133
138
|
export declare const ownerCommands: OwnerCommand[];
|
|
139
|
+
/**
|
|
140
|
+
* Project the slash-command registry into the SDK catalog. Only primary names
|
|
141
|
+
* are advertised: aliases remain accepted by the slash dispatcher without
|
|
142
|
+
* cluttering the typed menu with duplicate actions.
|
|
143
|
+
*
|
|
144
|
+
* Typed arguments deliberately stay as the exact text following the command
|
|
145
|
+
* name. That adapter is what lets typed and slash invocations share every
|
|
146
|
+
* existing parser, usage error, lifecycle guard, and result path.
|
|
147
|
+
*/
|
|
148
|
+
export declare function ownerTypedCommandCatalog(): OwnerTypedCommandDefinition[];
|
|
149
|
+
/** Convert one typed invocation back into the canonical slash input. */
|
|
150
|
+
export declare function ownerTypedCommandText(name: string, input: unknown): string;
|
|
134
151
|
/** Trimmed slash-prefixed text is a command attempt and is never forwarded. */
|
|
135
152
|
export declare const isOwnerCommandText: (text: string) => boolean;
|
|
136
153
|
export declare function ownerCommandHelp(error?: string): string;
|
|
@@ -706,6 +706,53 @@ export const ownerCommands = [
|
|
|
706
706
|
},
|
|
707
707
|
},
|
|
708
708
|
];
|
|
709
|
+
/**
|
|
710
|
+
* Project the slash-command registry into the SDK catalog. Only primary names
|
|
711
|
+
* are advertised: aliases remain accepted by the slash dispatcher without
|
|
712
|
+
* cluttering the typed menu with duplicate actions.
|
|
713
|
+
*
|
|
714
|
+
* Typed arguments deliberately stay as the exact text following the command
|
|
715
|
+
* name. That adapter is what lets typed and slash invocations share every
|
|
716
|
+
* existing parser, usage error, lifecycle guard, and result path.
|
|
717
|
+
*/
|
|
718
|
+
export function ownerTypedCommandCatalog() {
|
|
719
|
+
return ownerCommands.map(command => {
|
|
720
|
+
const usage = command.usage ?? `/${command.name}`;
|
|
721
|
+
const suffix = usage.slice(usage.indexOf(' ') + 1);
|
|
722
|
+
const acceptsArguments = usage.includes(' ');
|
|
723
|
+
const requiresArguments = acceptsArguments && !suffix.startsWith('[');
|
|
724
|
+
return {
|
|
725
|
+
name: command.name,
|
|
726
|
+
description: `${command.summary} (${usage})`,
|
|
727
|
+
input_schema: {
|
|
728
|
+
type: 'object',
|
|
729
|
+
properties: acceptsArguments ? {
|
|
730
|
+
arguments: {
|
|
731
|
+
type: 'string', title: 'Arguments',
|
|
732
|
+
description: `Text after /${command.name}. Usage: ${usage}`,
|
|
733
|
+
},
|
|
734
|
+
} : {},
|
|
735
|
+
...(requiresArguments ? { required: ['arguments'] } : {}),
|
|
736
|
+
},
|
|
737
|
+
};
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
/** Convert one typed invocation back into the canonical slash input. */
|
|
741
|
+
export function ownerTypedCommandText(name, input) {
|
|
742
|
+
const command = ownerCommands.find(entry => entry.name === name);
|
|
743
|
+
if (!command)
|
|
744
|
+
throw new Error(`unknown typed owner command: ${name}`);
|
|
745
|
+
if (!input || typeof input !== 'object' || Array.isArray(input))
|
|
746
|
+
throw new Error('typed owner command arguments must be an object');
|
|
747
|
+
const record = input;
|
|
748
|
+
if (Object.keys(record).some(key => key !== 'arguments'))
|
|
749
|
+
throw new Error('typed owner command arguments contain an unknown field');
|
|
750
|
+
const value = record.arguments;
|
|
751
|
+
if (value !== undefined && typeof value !== 'string')
|
|
752
|
+
throw new Error('typed owner command arguments must be text');
|
|
753
|
+
const args = value?.trim() ?? '';
|
|
754
|
+
return `/${command.name}${args ? ` ${args}` : ''}`;
|
|
755
|
+
}
|
|
709
756
|
/** Trimmed slash-prefixed text is a command attempt and is never forwarded. */
|
|
710
757
|
export const isOwnerCommandText = (text) => text.trim().startsWith('/');
|
|
711
758
|
export function ownerCommandHelp(error) {
|
|
@@ -23,6 +23,22 @@ export type OursRetrievedFiles = Res<'getFiles'>;
|
|
|
23
23
|
export type OursRetrievedFile = OursRetrievedFiles['files'][number];
|
|
24
24
|
export type OursHistoryFile = NonNullable<Res<'getFileInfo'>>;
|
|
25
25
|
export type OursNotificationEvent = NotificationEvent;
|
|
26
|
+
export type OursJsonValue = null | boolean | number | string | OursJsonValue[] | {
|
|
27
|
+
[key: string]: OursJsonValue;
|
|
28
|
+
};
|
|
29
|
+
export interface OursCommandContext {
|
|
30
|
+
readonly sender_cid: string;
|
|
31
|
+
readonly sender_name: string;
|
|
32
|
+
readonly request_wire_id: string;
|
|
33
|
+
}
|
|
34
|
+
export interface OursRegisteredCommand {
|
|
35
|
+
name: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
input_schema: {
|
|
38
|
+
[key: string]: OursJsonValue;
|
|
39
|
+
};
|
|
40
|
+
handler(argumentsValue: OursJsonValue, context: Readonly<OursCommandContext>): OursJsonValue | Promise<OursJsonValue>;
|
|
41
|
+
}
|
|
26
42
|
export declare class OursWatchDeadlineError extends OursDaemonError {
|
|
27
43
|
}
|
|
28
44
|
/**
|
|
@@ -41,6 +57,8 @@ export interface OursOps {
|
|
|
41
57
|
start(): Promise<void>;
|
|
42
58
|
/** Bind this session's identity. Throws `BOUND_ELSEWHERE` when it is held live. */
|
|
43
59
|
bindIdentity(name: string): Promise<void>;
|
|
60
|
+
/** Replace the bound identity's advertised typed-command catalog and handlers. */
|
|
61
|
+
registerCommands(commands: OursRegisteredCommand[]): Promise<void>;
|
|
44
62
|
listContacts(): Promise<OursContactsView>;
|
|
45
63
|
generateInvite(name?: string): Promise<OursInviteResult>;
|
|
46
64
|
addContact(a: {
|
|
@@ -114,6 +132,7 @@ export declare class OursSdkClient implements OursOps {
|
|
|
114
132
|
constructor(env?: Record<string, string>, log?: (line: string) => void, deps?: OursSdkClientDeps);
|
|
115
133
|
start(): Promise<void>;
|
|
116
134
|
bindIdentity(name: string): Promise<void>;
|
|
135
|
+
registerCommands(commands: OursRegisteredCommand[]): Promise<void>;
|
|
117
136
|
listContacts(): Promise<OursContactsView>;
|
|
118
137
|
generateInvite(name?: string): Promise<OursInviteResult>;
|
|
119
138
|
addContact(a: {
|
|
@@ -140,6 +140,9 @@ export class OursSdkClient {
|
|
|
140
140
|
// from an identity, it waits for the bounded handoff window and then fails.
|
|
141
141
|
await this.ops().chooseIdentity({ name, force: false });
|
|
142
142
|
}
|
|
143
|
+
async registerCommands(commands) {
|
|
144
|
+
await this.ops().registerCommands(commands);
|
|
145
|
+
}
|
|
143
146
|
async listContacts() {
|
|
144
147
|
return this.ops().listContacts();
|
|
145
148
|
}
|
package/dist/rooms-tasks/cli.js
CHANGED
|
@@ -1196,6 +1196,8 @@ export function registerTaskCommands(parent, cOpt) {
|
|
|
1196
1196
|
return 'Cowork management socket unreachable — check ours-cowork service';
|
|
1197
1197
|
if (issue.code === 'waiting_owner_invite')
|
|
1198
1198
|
return 'Owner invite invalid or expired — rotate rooms.owner.public_invite in config';
|
|
1199
|
+
if (issue.code === 'waiting_owner_authorization')
|
|
1200
|
+
return 'Owner command authorization is not configured — restore ours-cowork and retry';
|
|
1199
1201
|
if (issue.code === 'owner_cid_mismatch')
|
|
1200
1202
|
return 'Owner CID mismatch — verify rooms.owner.expected_cid matches Messenger identity';
|
|
1201
1203
|
if (issue.code === 'member_failed')
|
|
@@ -67,13 +67,13 @@ async function withIdentityClient(work) {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
function listedIdentity(rows, name) {
|
|
70
|
-
return rows.find(row => row.name === name);
|
|
70
|
+
return rows.find((row) => row.name === name && 'cid' in row);
|
|
71
71
|
}
|
|
72
72
|
/** Report whether any daemon identity — under any name — carries this exact CID. */
|
|
73
73
|
export async function identityCidPresent(cid) {
|
|
74
74
|
return withIdentityClient(async (client) => {
|
|
75
75
|
const rows = await client.listIdentities();
|
|
76
|
-
return rows.some(row => row.cid
|
|
76
|
+
return rows.some(row => 'cid' in row && row.cid.toLowerCase() === cid.toLowerCase());
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
export async function removeExactMemberIdentity(seat) {
|
|
@@ -73,6 +73,10 @@ export interface CoworkAdapter {
|
|
|
73
73
|
role: string;
|
|
74
74
|
text: string;
|
|
75
75
|
}): Promise<CoworkRoleBriefingInfo>;
|
|
76
|
+
setRoleCommands(roomId: string, opts: {
|
|
77
|
+
role: string;
|
|
78
|
+
commands: Array<'list-members' | 'remove-member'>;
|
|
79
|
+
}): Promise<void>;
|
|
76
80
|
getHistory(roomId: string, opts?: {
|
|
77
81
|
after?: number;
|
|
78
82
|
limit?: number;
|
|
@@ -390,6 +390,13 @@ export function createCoworkAdapter(options = {}) {
|
|
|
390
390
|
throw new CoworkProtocolError('room.participants', 'result must be an array');
|
|
391
391
|
return result.map((seat) => projectSeat(seat, 'room.participants'));
|
|
392
392
|
},
|
|
393
|
+
async setRoleCommands(roomId, opts) {
|
|
394
|
+
const result = await call('room.command.role.set', {
|
|
395
|
+
room_id: roomId, role: opts.role, commands: opts.commands,
|
|
396
|
+
});
|
|
397
|
+
if (!Array.isArray(result))
|
|
398
|
+
throw new CoworkProtocolError('room.command.role.set', 'result must be an array');
|
|
399
|
+
},
|
|
393
400
|
async recoverRoom(roomId) {
|
|
394
401
|
// Cowork performs packet/state reconciliation during daemon recovery.
|
|
395
402
|
// Its `room.recover` RPC is specifically invite-receipt recovery, so a
|
|
@@ -133,7 +133,7 @@ export interface SagaCursor {
|
|
|
133
133
|
error?: string;
|
|
134
134
|
recovery_hint?: string;
|
|
135
135
|
}
|
|
136
|
-
export type ProvisioningDetail = 'waiting_cowork' | 'waiting_owner_invite' | 'owner_cid_mismatch' | 'member_failed' | 'waiting_seats' | 'uncertain';
|
|
136
|
+
export type ProvisioningDetail = 'waiting_cowork' | 'waiting_owner_authorization' | 'waiting_owner_invite' | 'owner_cid_mismatch' | 'member_failed' | 'waiting_seats' | 'uncertain';
|
|
137
137
|
export interface RoomRoleBriefingDefinition {
|
|
138
138
|
role: string;
|
|
139
139
|
text: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ours.network/fleet",
|
|
3
|
-
"version": "1.1.0-nightly.
|
|
3
|
+
"version": "1.1.0-nightly.28",
|
|
4
4
|
"description": "Harness-agnostic fleet of persistent, identity-bound AI agents. Declarative fleet.yaml, managed native/ACP sessions, supervision, and ours.network messaging.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "FSL-1.1-Apache-2.0",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"LICENSE"
|
|
22
22
|
],
|
|
23
23
|
"engines": {
|
|
24
|
-
"node": ">=
|
|
24
|
+
"node": ">=22"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@fastify/static": "^10.1.2",
|
|
42
42
|
"@fastify/websocket": "^11.2.0",
|
|
43
43
|
"@ours.network/cli": "1.0.1",
|
|
44
|
-
"@ours.network/sdk": "3.0
|
|
44
|
+
"@ours.network/sdk": "3.7.0",
|
|
45
45
|
"commander": "^12.1.0",
|
|
46
46
|
"fastify": "^5.4.0",
|
|
47
47
|
"react": "^19.1.1",
|