@ours.network/fleet 1.1.0-nightly.7 → 1.1.0-nightly.8
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 +23 -4
- package/dist/application/task-room-service.d.ts +1 -1
- package/dist/build-info.json +4 -4
- package/dist/cli.js +6 -2
- package/dist/config-yaml.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +49 -2
- package/dist/docs.d.ts +1 -1
- package/dist/docs.js +26 -3
- package/dist/init-guidance.d.ts +1 -1
- package/dist/init-guidance.js +4 -3
- package/dist/owner-channel/commands.js +3 -9
- package/dist/preset-bootstrap.d.ts +10 -0
- package/dist/preset-bootstrap.js +85 -0
- package/dist/rooms-tasks/cli.js +4 -4
- package/dist/rooms-tasks/config.js +0 -4
- package/dist/rooms-tasks/templates.d.ts +0 -1
- package/dist/rooms-tasks/templates.js +9 -76
- package/dist/rooms-tasks/types.d.ts +2 -1
- package/dist/web/fleet-config-service.js +4 -3
- package/package.json +2 -1
- package/presets/fleet/agents/Agent.yaml +3 -0
- package/presets/fleet/agents/Architect.yaml +3 -0
- package/presets/fleet/agents/Critic.yaml +3 -0
- package/presets/fleet/agents/Developer.yaml +3 -0
- package/presets/fleet/agents/Secretary.yaml +3 -0
- package/presets/fleet/agents/Tester.yaml +3 -0
- package/presets/fleet/brains/claude-default.yaml +5 -0
- package/presets/fleet/roles/Agent.yaml +6 -0
- package/presets/fleet/roles/Architect.yaml +6 -0
- package/presets/fleet/roles/Critic.yaml +6 -0
- package/presets/fleet/roles/Developer.yaml +6 -0
- package/presets/fleet/roles/Secretary.yaml +6 -0
- package/presets/fleet/roles/Tester.yaml +6 -0
- package/presets/fleet/room_templates/pair.yaml +11 -0
- package/presets/fleet/room_templates/single.yaml +8 -0
- package/presets/fleet/room_templates/team.yaml +12 -0
- package/presets/fleet.yaml +7 -0
- package/presets/manifest.json +5 -0
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ brain: { inline: { harness: codex, session: acp } }
|
|
|
43
43
|
## How it works
|
|
44
44
|
|
|
45
45
|
```
|
|
46
|
-
~/fleet.yaml + ~/fleet/{agents,roles,brains}/*.yaml your declaration
|
|
46
|
+
~/fleet.yaml + ~/fleet/{agents,roles,brains,room_templates}/*.yaml your declaration
|
|
47
47
|
│ ours-fleet up
|
|
48
48
|
▼
|
|
49
49
|
briefing.md per role ──► agent session adapter ──► ACP client/session ──► ACP agent
|
|
@@ -91,7 +91,7 @@ equivalent); logs land in `~/.ours-fleet/logs/`.
|
|
|
91
91
|
|
|
92
92
|
```sh
|
|
93
93
|
npm i -g @ours.network/fleet
|
|
94
|
-
ours-fleet init # units/dirs/linger
|
|
94
|
+
ours-fleet init # units/dirs/linger + missing standard presets
|
|
95
95
|
ours-fleet doctor # verifies everything above, with actionable messages
|
|
96
96
|
```
|
|
97
97
|
|
|
@@ -107,8 +107,8 @@ become that account and repeat.
|
|
|
107
107
|
## Quickstart
|
|
108
108
|
|
|
109
109
|
```sh
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
ours-fleet init # safe to repeat: creates missing files, never replaces edits
|
|
111
|
+
ours-fleet config # validates Agents, Roles, Brains, and Room templates
|
|
112
112
|
$EDITOR ~/fleet/agents/*.yaml # compose Role + Brain and operational settings
|
|
113
113
|
ours-fleet up # boot the fleet (staggered)
|
|
114
114
|
ours-fleet ls # running consoles
|
|
@@ -442,6 +442,25 @@ installer/setup flows remain responsible for starting it.
|
|
|
442
442
|
|
|
443
443
|
### Rooms and tasks
|
|
444
444
|
|
|
445
|
+
Init installs editable `single`, `pair`, and `team` definitions under
|
|
446
|
+
`~/fleet/room_templates/`, plus every exact-cased Agent, Role, and Brain they
|
|
447
|
+
reference. Inspect them with `ours-fleet template list` and
|
|
448
|
+
`ours-fleet template show team`. After configuring the authenticated owner below:
|
|
449
|
+
|
|
450
|
+
```sh
|
|
451
|
+
ours-fleet task create --title "Solo task" --template single
|
|
452
|
+
ours-fleet task create --title "Reviewed change" --template pair
|
|
453
|
+
ours-fleet task create --title "Phased delivery" --template team
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
`ours-fleet init -c /path/custom.yaml` seeds `/path/custom/` instead. Init reports
|
|
457
|
+
the packaged preset revision and source directory and only seeds missing files.
|
|
458
|
+
It never upgrades an edited preset. To adopt a newer packaged file explicitly,
|
|
459
|
+
copy the reported source file beside the existing target as `.new-default`, review
|
|
460
|
+
`diff -u`, then replace the target yourself. This is the sole adoption operation;
|
|
461
|
+
rerunning init is not an update. Users upgrading from hardcoded templates should
|
|
462
|
+
run init once (with the same `-c` selection they normally use).
|
|
463
|
+
|
|
445
464
|
Rooms always use `ours-cowork`; there is no room-provider selector. Configure
|
|
446
465
|
the cowork daemon connection and the room owner directly:
|
|
447
466
|
|
|
@@ -179,7 +179,7 @@ export declare class TaskRoomApplicationService {
|
|
|
179
179
|
name: string;
|
|
180
180
|
version: number;
|
|
181
181
|
description: string;
|
|
182
|
-
|
|
182
|
+
sourceFile?: string;
|
|
183
183
|
room?: import("../rooms-tasks/types.js").TemplateRoomConfig;
|
|
184
184
|
contract?: string;
|
|
185
185
|
members: import("../rooms-tasks/types.js").TemplateMemberSlot[];
|
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.8",
|
|
3
|
+
"buildId": "871d3c2bae20",
|
|
4
|
+
"commit": "cfd589d27e88eb95710df1f037a4c13e22eedb79",
|
|
5
5
|
"dirty": true,
|
|
6
|
-
"builtAt": "2026-08-
|
|
6
|
+
"builtAt": "2026-08-31T09:40:52.301Z",
|
|
7
7
|
"capabilities": [
|
|
8
8
|
"monitor.interrupt.after_tool"
|
|
9
9
|
]
|
package/dist/cli.js
CHANGED
|
@@ -8,6 +8,7 @@ import { createInterface } from 'node:readline';
|
|
|
8
8
|
import { Command } from 'commander';
|
|
9
9
|
import { VERSION } from './version.js';
|
|
10
10
|
import { INIT_COMPLETION_GUIDANCE } from './init-guidance.js';
|
|
11
|
+
import { bootstrapPresets } from './preset-bootstrap.js';
|
|
11
12
|
import { analyzeInstalls, buildInfo, buildLabel, discoverInstalls, runningLabel, } from './provenance.js';
|
|
12
13
|
import { agentDir, agentsRoot, tmpRoot, logsRoot, deriveXdgRuntimeDir } from './paths.js';
|
|
13
14
|
import { findRole, loadConfig, ROLE_NAME_RE } from './config.js';
|
|
@@ -1264,12 +1265,15 @@ cOpt(program.command('doctor').description('prerequisite report'))
|
|
|
1264
1265
|
if (!rep.ok)
|
|
1265
1266
|
throw new FleetCliExit(1);
|
|
1266
1267
|
});
|
|
1267
|
-
program.command('init').description('
|
|
1268
|
-
.action(async () => {
|
|
1268
|
+
cOpt(program.command('init').description('idempotent host setup plus missing packaged presets'))
|
|
1269
|
+
.action(async (opts) => {
|
|
1269
1270
|
for (const d of [agentsRoot(), tmpRoot(), logsRoot()])
|
|
1270
1271
|
mkdirSync(d, { recursive: true });
|
|
1271
1272
|
for (const m of await pickBackend().init(binPath))
|
|
1272
1273
|
console.log(m);
|
|
1274
|
+
const seeded = bootstrapPresets(opts.configuration);
|
|
1275
|
+
console.log(`Packaged preset revision ${seeded.revision}: ${seeded.sourceRoot}`);
|
|
1276
|
+
console.log(`Created ${seeded.created.length}; preserved ${seeded.preserved.length} existing file(s).`);
|
|
1273
1277
|
console.log(INIT_COMPLETION_GUIDANCE);
|
|
1274
1278
|
});
|
|
1275
1279
|
const webCommand = cOpt(program.command('web').description('start or open the secure localhost fleet web console'))
|
package/dist/config-yaml.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type YamlMode = 'compat' | 'strict';
|
|
2
|
-
export type ConfigDiagnosticKind = 'anchor' | 'alias' | 'explicit-tag' | 'non-scalar-key' | 'multiple-documents';
|
|
2
|
+
export type ConfigDiagnosticKind = 'anchor' | 'alias' | 'explicit-tag' | 'non-scalar-key' | 'multiple-documents' | 'deprecated-field';
|
|
3
3
|
export interface ConfigDiagnostic {
|
|
4
4
|
severity: 'warning';
|
|
5
5
|
kind: ConfigDiagnosticKind;
|
package/dist/config.d.ts
CHANGED
|
@@ -220,7 +220,7 @@ export interface FleetConfig {
|
|
|
220
220
|
files: string[];
|
|
221
221
|
configMode?: 'split-v2';
|
|
222
222
|
sourceDocuments?: Array<{
|
|
223
|
-
kind: 'Manifest' | 'Agent' | 'Role' | 'Brain';
|
|
223
|
+
kind: 'Manifest' | 'Agent' | 'Role' | 'Brain' | 'RoomTemplate';
|
|
224
224
|
id?: string;
|
|
225
225
|
path: string;
|
|
226
226
|
}>;
|
package/dist/config.js
CHANGED
|
@@ -265,6 +265,35 @@ function readKindDirectory(root, kind, required, yamlMode, diagnostics, files) {
|
|
|
265
265
|
}
|
|
266
266
|
return result;
|
|
267
267
|
}
|
|
268
|
+
function readRoomTemplateDirectory(root, yamlMode, diagnostics, files) {
|
|
269
|
+
if (!existsSync(root))
|
|
270
|
+
return {};
|
|
271
|
+
assertTrustedPath(root, 'directory');
|
|
272
|
+
const result = {};
|
|
273
|
+
const sources = new Map();
|
|
274
|
+
const names = readdirSync(root)
|
|
275
|
+
.filter(name => ['.yaml', '.yml'].includes(extname(name).toLowerCase())).sort();
|
|
276
|
+
for (const filename of names) {
|
|
277
|
+
const file = join(root, filename);
|
|
278
|
+
assertTrustedPath(file, 'file');
|
|
279
|
+
const id = basename(filename, extname(filename));
|
|
280
|
+
const previous = sources.get(id);
|
|
281
|
+
if (previous)
|
|
282
|
+
throw new ConfigError(`E_DUPLICATE_ID: room template '${id}' defined by both ${previous} and ${file}`);
|
|
283
|
+
const parsed = parseFleetDocument(file, readFileSync(file, 'utf8'), yamlMode);
|
|
284
|
+
diagnostics.push(...parsed.diagnostics);
|
|
285
|
+
if (parsed.value.override_builtin === true)
|
|
286
|
+
diagnostics.push({
|
|
287
|
+
severity: 'warning', kind: 'deprecated-field', file, line: 1, column: 1,
|
|
288
|
+
message: `${file}: override_builtin is deprecated and ignored for a file-backed Room template`,
|
|
289
|
+
});
|
|
290
|
+
files.push(file);
|
|
291
|
+
const validated = validateRoomTemplatesConfig({ [id]: parsed.value }, file)[id];
|
|
292
|
+
result[id] = { ...validated, sourceFile: file };
|
|
293
|
+
sources.set(id, file);
|
|
294
|
+
}
|
|
295
|
+
return result;
|
|
296
|
+
}
|
|
268
297
|
function selection(raw, kind, agentFile, presets, allowed) {
|
|
269
298
|
if (!isPlainObject(raw))
|
|
270
299
|
schemaError(agentFile, `/${kind}`, 'must be { ref } or { inline }');
|
|
@@ -586,6 +615,9 @@ export function loadConfig(configPath, options = {}) {
|
|
|
586
615
|
let ownerInvite;
|
|
587
616
|
let roomTemplates;
|
|
588
617
|
let tasks;
|
|
618
|
+
const fileTemplates = readRoomTemplateDirectory(join(splitRootFor(base), 'room_templates'), options.yamlMode ?? 'compat', diagnostics, files);
|
|
619
|
+
if (Object.keys(fileTemplates).length)
|
|
620
|
+
roomTemplates = fileTemplates;
|
|
589
621
|
for (const { file, doc } of docs) {
|
|
590
622
|
if (doc.rooms !== undefined) {
|
|
591
623
|
if (rooms)
|
|
@@ -598,7 +630,21 @@ export function loadConfig(configPath, options = {}) {
|
|
|
598
630
|
}
|
|
599
631
|
if (doc.room_templates !== undefined) {
|
|
600
632
|
const validated = validateRoomTemplatesConfig(deepSub(doc.room_templates, vars), file);
|
|
601
|
-
|
|
633
|
+
const raw = doc.room_templates;
|
|
634
|
+
for (const [name, template] of Object.entries(validated)) {
|
|
635
|
+
const shadowed = roomTemplates?.[name];
|
|
636
|
+
const marker = raw[name]?.override_builtin;
|
|
637
|
+
if (shadowed && (marker !== true || template.version <= shadowed.version))
|
|
638
|
+
throw new ConfigError(`${file}: room_templates.${name} shadows file preset ${shadowed.sourceFile}; `
|
|
639
|
+
+ 'set override_builtin: true and use a higher version');
|
|
640
|
+
if (marker === true)
|
|
641
|
+
diagnostics.push({
|
|
642
|
+
severity: 'warning', kind: 'deprecated-field', file, line: 1, column: 1,
|
|
643
|
+
message: `${file}: room_templates.${name}.override_builtin is deprecated; `
|
|
644
|
+
+ 'it is retained only as an explicit manifest-over-file migration marker',
|
|
645
|
+
});
|
|
646
|
+
roomTemplates = { ...(roomTemplates ?? {}), [name]: { ...template, sourceFile: file } };
|
|
647
|
+
}
|
|
602
648
|
}
|
|
603
649
|
if (doc.tasks !== undefined) {
|
|
604
650
|
if (tasks)
|
|
@@ -616,7 +662,8 @@ export function loadConfig(configPath, options = {}) {
|
|
|
616
662
|
return { kind: 'Manifest', path };
|
|
617
663
|
const parent = basename(dirname(path));
|
|
618
664
|
const kind = parent === 'agents' ? 'Agent'
|
|
619
|
-
: parent === 'roles' ? 'Role'
|
|
665
|
+
: parent === 'roles' ? 'Role'
|
|
666
|
+
: parent === 'room_templates' ? 'RoomTemplate' : 'Brain';
|
|
620
667
|
return { kind, id: basename(path, extname(path)), path };
|
|
621
668
|
}),
|
|
622
669
|
};
|
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 the\nstructured ACP session path:\n\n- harness: `claude-code` or `codex`\n- session: `acp` (default and only supported value)\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/roles`, and `~/fleet/brains`.\nThe manifest owns fleet-wide operational defaults and automation; each Agent\nselects one inline/ref Role and Brain and carries its operational fields.\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}` model while Role/Brain presets remain read-only.\nIts aggregate revision includes every Agent/Role/Brain 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\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`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 ACP 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 ACP role, every `ours-fleet` CLI attempt first crosses one\nauthenticated supervisor audit boundary before Commander parsing or side effects.\nThe original CLI remains the executor inside the role's existing OS sandbox. The\nsupervisor writes a deterministic, structurally redacted raw argv invocation to the\nrole's existing Owner-visible channel, then permits explicit Agent/Task/Room/template\nand safe read-only routes. Operator lifecycle/control, hidden worker, and unknown\nroutes are denied but remain audited. A correlated outcome repeats the same redacted\nargv and records a safe success/failure classification plus known resource IDs.\n\nInvocation delivery must be confirmed before execution. Delivery ambiguity fails\nclosed. If outcome delivery becomes uncertain after an effect, Fleet records the\nknown effect state and never reruns or blindly retries it. Durable correlation state\nmakes incomplete and uncertain attempts observable across supervisor restart. Spawn\nstill uses the typed supervisor creation service for inheritance, but its former\nstandalone announcement is replaced by the canonical audit pair.\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\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: acp, 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\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. Fleet activates the room from Cowork's authenticated seat; there\nis no briefing hash, startup ACK, or separate role-briefing readiness gate.\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>` removes only a `done` task's Fleet backlog\nrecord. The exact task ID is required twice for confirmation. Delete rejects every\nother task state, never changes any room state, and reports an already-missing\ntask as an idempotent no-op. The Owner-channel equivalent is\n`/task delete <id> <id>`.\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 ACP does when no console can answer a request\n\nThe backend translates this common intent. Harness-native settings in\n`harness_options` take precedence where supplied. Do not choose\n`allow`/`unrestricted`, Codex `never`/`danger-full-access`, or Claude\n`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: `ask` maps to Codex `untrusted` and Claude `default`.\n`auto` selects Codex ACP `agent` (`on-request` + `workspace-write`) and\nClaude `acceptEdits`. `approval: allow` selects Codex ACP's fully\nnon-interactive yolo mode, reported as `agent-full-access` (`never` +\n`danger-full-access`), and Claude `bypassPermissions`. These modes genuinely\npermit 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), `sandbox`\n(read-only, workspace-write, danger-full-access), `approval` or\n`permission_mode` (untrusted, on-request, never), `profile`, `search`,\n`config`, `add_dirs`, and `monitor`.\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\nAn ACP 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 backed by ACP so correlated final replies\nretain their delivery guarantee.\n\n### Live contact and owner administration\n\nThe supervisor which is already running the ACP 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 the\nstructured ACP session path:\n\n- harness: `claude-code` or `codex`\n- session: `acp` (default and only supported value)\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/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.\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}` 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] # seed missing presets; never replace an existing file\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`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 ACP 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 ACP role, every `ours-fleet` CLI attempt first crosses one\nauthenticated supervisor audit boundary before Commander parsing or side effects.\nThe original CLI remains the executor inside the role's existing OS sandbox. The\nsupervisor writes a deterministic, structurally redacted raw argv invocation to the\nrole's existing Owner-visible channel, then permits explicit Agent/Task/Room/template\nand safe read-only routes. Operator lifecycle/control, hidden worker, and unknown\nroutes are denied but remain audited. A correlated outcome repeats the same redacted\nargv and records a safe success/failure classification plus known resource IDs.\n\nInvocation delivery must be confirmed before execution. Delivery ambiguity fails\nclosed. If outcome delivery becomes uncertain after an effect, Fleet records the\nknown effect state and never reruns or blindly retries it. Durable correlation state\nmakes incomplete and uncertain attempts observable across supervisor restart. Spawn\nstill uses the typed supervisor creation service for inheritance, but its former\nstandalone announcement is replaced by the canonical audit pair.\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\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: acp, 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]\n```\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.\nFor explicit adoption, copy one file from init's reported packaged source beside\nthe target as `.new-default`, inspect `diff -u TARGET TARGET.new-default`, then\nreplace TARGET yourself. Upgrades from hardcoded templates require one\n`ours-fleet init` (or `init -c FILE`) migration pass. 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. Fleet activates the room from Cowork's authenticated seat; there\nis no briefing hash, startup ACK, or separate role-briefing readiness gate.\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>` removes only a `done` task's Fleet backlog\nrecord. The exact task ID is required twice for confirmation. Delete rejects every\nother task state, never changes any room state, and reports an already-missing\ntask as an idempotent no-op. The Owner-channel equivalent is\n`/task delete <id> <id>`.\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 ACP does when no console can answer a request\n\nThe backend translates this common intent. Harness-native settings in\n`harness_options` take precedence where supplied. Do not choose\n`allow`/`unrestricted`, Codex `never`/`danger-full-access`, or Claude\n`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: `ask` maps to Codex `untrusted` and Claude `default`.\n`auto` selects Codex ACP `agent` (`on-request` + `workspace-write`) and\nClaude `acceptEdits`. `approval: allow` selects Codex ACP's fully\nnon-interactive yolo mode, reported as `agent-full-access` (`never` +\n`danger-full-access`), and Claude `bypassPermissions`. These modes genuinely\npermit 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), `sandbox`\n(read-only, workspace-write, danger-full-access), `approval` or\n`permission_mode` (untrusted, on-request, never), `profile`, `search`,\n`config`, `add_dirs`, and `monitor`.\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\nAn ACP 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 backed by ACP so correlated final replies\nretain their delivery guarantee.\n\n### Live contact and owner administration\n\nThe supervisor which is already running the ACP 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
|
@@ -24,7 +24,8 @@ ours-fleet version [--json] # build identity, capabilities, every in
|
|
|
24
24
|
\`\`\`
|
|
25
25
|
|
|
26
26
|
Configuration v2 is \`~/fleet.yaml\` plus typed bare documents under the exact
|
|
27
|
-
stem directories \`~/fleet/agents\`, \`~/fleet/roles\`,
|
|
27
|
+
stem directories \`~/fleet/agents\`, \`~/fleet/roles\`, \`~/fleet/brains\`, and
|
|
28
|
+
\`~/fleet/room_templates\`.
|
|
28
29
|
The manifest owns fleet-wide operational defaults and automation; each Agent
|
|
29
30
|
selects one inline/ref Role and Brain and carries its operational fields.
|
|
30
31
|
Legacy top-level \`roles:\` and \`fleet.d\` are rejected. Validate the complete
|
|
@@ -32,7 +33,7 @@ trusted source set with \`config\` and \`doctor\` before starting or restarting.
|
|
|
32
33
|
|
|
33
34
|
Permanent \`spawn\` writes \`~/fleet/agents/Name.yaml\`. The web console edits an
|
|
34
35
|
explicit \`{manifest, agents}\` model while Role/Brain presets remain read-only.
|
|
35
|
-
Its aggregate revision includes every Agent/Role/Brain source, previews a
|
|
36
|
+
Its aggregate revision includes every Agent/Role/Brain/Room-template source, previews a
|
|
36
37
|
redacted per-document diff in an exact-stem private staging tree, and saves under
|
|
37
38
|
one root lock with a private multi-file backup and full rollback. A no-op is
|
|
38
39
|
byte-identical and creates no backup.
|
|
@@ -78,7 +79,7 @@ PATH order.
|
|
|
78
79
|
## Lifecycle and console commands
|
|
79
80
|
|
|
80
81
|
\`\`\`sh
|
|
81
|
-
ours-fleet init
|
|
82
|
+
ours-fleet init [-c FILE] # seed missing presets; never replace an existing file
|
|
82
83
|
ours-fleet up|down [Name...]
|
|
83
84
|
ours-fleet restart [Name...] # preserve/resume harness context
|
|
84
85
|
ours-fleet force-restart [Name...] # fresh context; briefing is reloaded
|
|
@@ -284,6 +285,28 @@ the shared daemon only through an explicit operator or installer/setup flow.
|
|
|
284
285
|
|
|
285
286
|
## Rooms and tasks
|
|
286
287
|
|
|
288
|
+
\`init\` materializes editable \`single\`, \`pair\`, and \`team\` Room templates plus
|
|
289
|
+
their exact-cased Agent, Role, and Brain presets. The command prints the packaged
|
|
290
|
+
preset revision and source directory. Inspect provenance and content before use:
|
|
291
|
+
|
|
292
|
+
\`\`\`sh
|
|
293
|
+
ours-fleet config [-c FILE]
|
|
294
|
+
ours-fleet template list [-c FILE]
|
|
295
|
+
ours-fleet template show team [-c FILE]
|
|
296
|
+
ours-fleet task create --title "Solo task" --template single [-c FILE]
|
|
297
|
+
ours-fleet task create --title "Reviewed change" --template pair [-c FILE]
|
|
298
|
+
ours-fleet task create --title "Phased delivery" --template team [-c FILE]
|
|
299
|
+
\`\`\`
|
|
300
|
+
|
|
301
|
+
An alternate manifest \`-c /path/custom.yaml\` uses \`/path/custom/\` as its split
|
|
302
|
+
root. Repeated init only fills missing files and never adopts a newer default.
|
|
303
|
+
For explicit adoption, copy one file from init's reported packaged source beside
|
|
304
|
+
the target as \`.new-default\`, inspect \`diff -u TARGET TARGET.new-default\`, then
|
|
305
|
+
replace TARGET yourself. Upgrades from hardcoded templates require one
|
|
306
|
+
\`ours-fleet init\` (or \`init -c FILE\`) migration pass. A manifest-level template
|
|
307
|
+
may shadow a same-named file only with \`override_builtin: true\` and a higher
|
|
308
|
+
version; this compatibility marker is deprecated and reported as a diagnostic.
|
|
309
|
+
|
|
287
310
|
Rooms always use \`ours-cowork\`; there is no room-provider selector. Configure
|
|
288
311
|
the cowork daemon connection and room owner directly:
|
|
289
312
|
|
package/dist/init-guidance.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const INIT_COMPLETION_GUIDANCE = "\nNext:\n
|
|
1
|
+
export declare const INIT_COMPLETION_GUIDANCE = "\nNext:\n ours-fleet config\n ours-fleet template list\n edit the seeded manifest and fleet/{agents,roles,brains,room_templates}/*.yaml\n configure rooms.owner, then create a task with --template single, pair, or team";
|
package/dist/init-guidance.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export const INIT_COMPLETION_GUIDANCE = `
|
|
2
2
|
Next:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
edit
|
|
3
|
+
ours-fleet config
|
|
4
|
+
ours-fleet template list
|
|
5
|
+
edit the seeded manifest and fleet/{agents,roles,brains,room_templates}/*.yaml
|
|
6
|
+
configure rooms.owner, then create a task with --template single, pair, or team`;
|
|
@@ -598,10 +598,7 @@ export const ownerCommands = [
|
|
|
598
598
|
const templates = ctx.listTemplateQueries();
|
|
599
599
|
if (!templates.length)
|
|
600
600
|
return ctx.reply('📐 No templates.');
|
|
601
|
-
const lines = templates.map(t => {
|
|
602
|
-
const tag = t.builtin ? ' (built-in)' : '';
|
|
603
|
-
return `${t.name}@${t.version}${tag} ${t.description}`;
|
|
604
|
-
});
|
|
601
|
+
const lines = templates.map(t => `${t.name}@${t.version} ${t.description} [file: ${t.sourceFile ?? 'manifest'}]`);
|
|
605
602
|
await ctx.reply(`📐 Templates:\n${lines.join('\n')}`);
|
|
606
603
|
}),
|
|
607
604
|
},
|
|
@@ -627,7 +624,7 @@ export const ownerCommands = [
|
|
|
627
624
|
const lines = [
|
|
628
625
|
`📐 Template: ${t.name}@${t.version}`,
|
|
629
626
|
`Description: ${t.description}`,
|
|
630
|
-
|
|
627
|
+
`Source: ${t.sourceFile ?? 'manifest'}`,
|
|
631
628
|
...(t.contract ? [`Contract: ${t.contract}`] : []),
|
|
632
629
|
'Members:',
|
|
633
630
|
...t.members.map(m => ` ${m.slot} (${m.role}) ×${m.count} → `
|
|
@@ -646,10 +643,7 @@ export const ownerCommands = [
|
|
|
646
643
|
const templates = ctx.listTemplateQueries();
|
|
647
644
|
if (!templates.length)
|
|
648
645
|
return ctx.reply('📐 No templates.');
|
|
649
|
-
const lines = templates.map(t => {
|
|
650
|
-
const tag = t.builtin ? ' (built-in)' : '';
|
|
651
|
-
return `${t.name}@${t.version}${tag} ${t.description}`;
|
|
652
|
-
});
|
|
646
|
+
const lines = templates.map(t => `${t.name}@${t.version} ${t.description} [file: ${t.sourceFile ?? 'manifest'}]`);
|
|
653
647
|
await ctx.reply(`📐 Templates:\n${lines.join('\n')}`);
|
|
654
648
|
break;
|
|
655
649
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface BootstrapResult {
|
|
2
|
+
revision: number;
|
|
3
|
+
sourceRoot: string;
|
|
4
|
+
configPath: string;
|
|
5
|
+
created: string[];
|
|
6
|
+
preserved: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare const packagedPresetRoot: () => string;
|
|
9
|
+
/** Seed packaged defaults without replacing a single existing byte. */
|
|
10
|
+
export declare function bootstrapPresets(configuration?: string): BootstrapResult;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { constants, copyFileSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, chmodSync, } from 'node:fs';
|
|
2
|
+
import { dirname, join, relative, resolve, sep } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { defaultConfigPath } from './paths.js';
|
|
5
|
+
import { splitRootFor } from './config.js';
|
|
6
|
+
export const packagedPresetRoot = () => fileURLToPath(new URL('../presets', import.meta.url));
|
|
7
|
+
function assertSafeExisting(path, kind) {
|
|
8
|
+
const stat = lstatSync(path);
|
|
9
|
+
if (stat.isSymbolicLink())
|
|
10
|
+
throw new Error(`preset bootstrap refuses symlink target: ${path}`);
|
|
11
|
+
if (kind === 'file' ? !stat.isFile() : !stat.isDirectory())
|
|
12
|
+
throw new Error(`preset bootstrap expected ${kind}: ${path}`);
|
|
13
|
+
const uid = process.getuid?.();
|
|
14
|
+
if (uid !== undefined && stat.uid !== uid)
|
|
15
|
+
throw new Error(`preset bootstrap refuses target owned by uid ${stat.uid}: ${path}`);
|
|
16
|
+
if ((stat.mode & 0o022) !== 0)
|
|
17
|
+
throw new Error(`preset bootstrap refuses group/world-writable target: ${path}`);
|
|
18
|
+
}
|
|
19
|
+
function ensureDirectory(path) {
|
|
20
|
+
const parent = dirname(path);
|
|
21
|
+
if (parent !== path && !existsSync(parent))
|
|
22
|
+
ensureDirectory(parent);
|
|
23
|
+
if (existsSync(path)) {
|
|
24
|
+
assertSafeExisting(path, 'directory');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
mkdirSync(path, { mode: 0o700 });
|
|
28
|
+
}
|
|
29
|
+
function seedFile(source, target, result) {
|
|
30
|
+
ensureDirectory(dirname(target));
|
|
31
|
+
if (existsSync(target)) {
|
|
32
|
+
assertSafeExisting(target, 'file');
|
|
33
|
+
result.preserved.push(target);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
copyFileSync(source, target, constants.COPYFILE_EXCL);
|
|
38
|
+
chmodSync(target, 0o600);
|
|
39
|
+
result.created.push(target);
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
if (error.code !== 'EEXIST')
|
|
43
|
+
throw error;
|
|
44
|
+
assertSafeExisting(target, 'file');
|
|
45
|
+
result.preserved.push(target);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function presetFiles(root) {
|
|
49
|
+
const files = [];
|
|
50
|
+
const visit = (directory) => {
|
|
51
|
+
for (const entry of readdirSync(directory, { withFileTypes: true })) {
|
|
52
|
+
const path = join(directory, entry.name);
|
|
53
|
+
if (entry.isDirectory())
|
|
54
|
+
visit(path);
|
|
55
|
+
else if (entry.isFile())
|
|
56
|
+
files.push(path);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
visit(root);
|
|
60
|
+
return files.sort();
|
|
61
|
+
}
|
|
62
|
+
/** Seed packaged defaults without replacing a single existing byte. */
|
|
63
|
+
export function bootstrapPresets(configuration = defaultConfigPath()) {
|
|
64
|
+
const sourceRoot = packagedPresetRoot();
|
|
65
|
+
const manifest = JSON.parse(readFileSync(join(sourceRoot, 'manifest.json'), 'utf8'));
|
|
66
|
+
if (manifest.schema_version !== 1 || !Number.isInteger(manifest.preset_revision))
|
|
67
|
+
throw new Error(`invalid packaged preset manifest: ${join(sourceRoot, 'manifest.json')}`);
|
|
68
|
+
const configPath = resolve(configuration);
|
|
69
|
+
const result = {
|
|
70
|
+
revision: manifest.preset_revision, sourceRoot, configPath, created: [], preserved: [],
|
|
71
|
+
};
|
|
72
|
+
ensureDirectory(dirname(configPath));
|
|
73
|
+
seedFile(join(sourceRoot, 'fleet.yaml'), configPath, result);
|
|
74
|
+
const sourceSplit = join(sourceRoot, 'fleet');
|
|
75
|
+
const targetSplit = splitRootFor(configPath);
|
|
76
|
+
if (existsSync(targetSplit))
|
|
77
|
+
assertSafeExisting(targetSplit, 'directory');
|
|
78
|
+
for (const source of presetFiles(sourceSplit)) {
|
|
79
|
+
const rel = relative(sourceSplit, source);
|
|
80
|
+
if (rel.startsWith('..') || rel.includes(`..${sep}`))
|
|
81
|
+
throw new Error(`invalid packaged preset path: ${source}`);
|
|
82
|
+
seedFile(source, join(targetSplit, rel), result);
|
|
83
|
+
}
|
|
84
|
+
return result;
|
|
85
|
+
}
|
package/dist/rooms-tasks/cli.js
CHANGED
|
@@ -43,7 +43,7 @@ function taskRoomPublicFailure(error) {
|
|
|
43
43
|
case 'template_not_found': return {
|
|
44
44
|
legacy: `template not found: ${f.template ?? 'requested-template'}`, kind: 'not_found',
|
|
45
45
|
detail: `The requested template ${f.template ?? ''}`.trim() + ' was not found.',
|
|
46
|
-
action: 'Run ours-fleet
|
|
46
|
+
action: 'Run ours-fleet init to seed missing file-backed presets, then run ours-fleet template list.',
|
|
47
47
|
};
|
|
48
48
|
case 'template_mismatch': return {
|
|
49
49
|
legacy: `template ${f.requested ?? 'requested-template'} does not match room ${f.room ?? 'requested-room'}'s provisioned template ${f.provisioned ?? 'recorded-template'}`,
|
|
@@ -446,12 +446,11 @@ export function registerTemplateCommands(parent, cOpt) {
|
|
|
446
446
|
return;
|
|
447
447
|
}
|
|
448
448
|
if (!templates.length) {
|
|
449
|
-
console.log('No templates configured.');
|
|
449
|
+
console.log('No templates configured. Run ours-fleet init to seed missing file-backed presets.');
|
|
450
450
|
return;
|
|
451
451
|
}
|
|
452
452
|
for (const t of templates) {
|
|
453
|
-
|
|
454
|
-
console.log(`${t.name}@${t.version}${tag} ${t.description}`);
|
|
453
|
+
console.log(`${t.name}@${t.version} ${t.description} [file: ${t.sourceFile ?? 'manifest'}]`);
|
|
455
454
|
}
|
|
456
455
|
}
|
|
457
456
|
catch (e) {
|
|
@@ -469,6 +468,7 @@ export function registerTemplateCommands(parent, cOpt) {
|
|
|
469
468
|
return;
|
|
470
469
|
}
|
|
471
470
|
console.log(`${t.name}@${t.version} ${t.description}`);
|
|
471
|
+
console.log(`Source: ${t.sourceFile ?? 'manifest'}`);
|
|
472
472
|
if (t.contract)
|
|
473
473
|
console.log(`\nContract:\n${t.contract}`);
|
|
474
474
|
console.log(`\nMembers:`);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { createHash } from 'node:crypto';
|
|
3
3
|
import { ROOMS_KEYS as RK, ROOMS_OWNER_KEYS as ROK, ROOMS_COWORK_KEYS as RCK, ROOMS_DEFAULTS_KEYS as RDK, TASKS_KEYS as TK, TEMPLATE_KEYS as TPK, TEMPLATE_MEMBER_KEYS as TMK, } from './types.js';
|
|
4
|
-
import { BUILTIN_TEMPLATES } from './templates.js';
|
|
5
4
|
import { isSensitiveConfigKey } from '../sensitive-config.js';
|
|
6
5
|
const isPlainObject = (v) => v !== null && typeof v === 'object' && !Array.isArray(v);
|
|
7
6
|
const CID_RE = /^[0-9a-fA-F]{64}$/;
|
|
@@ -117,9 +116,6 @@ export function validateRoomTemplatesConfig(raw, path) {
|
|
|
117
116
|
if (!isPlainObject(tplRaw))
|
|
118
117
|
throw new RoomsTasksConfigError(path, `room_templates.${name}: must be a mapping`);
|
|
119
118
|
rejectUnknown(tplRaw, [...TPK, 'name'], path, `room_templates.${name}`);
|
|
120
|
-
const isBuiltinOverride = BUILTIN_TEMPLATES.some(b => b.name === name);
|
|
121
|
-
if (isBuiltinOverride && !tplRaw.override_builtin)
|
|
122
|
-
throw new RoomsTasksConfigError(path, `room_templates.${name}: overrides built-in template; set override_builtin: true and bump version`);
|
|
123
119
|
const version = tplRaw.version;
|
|
124
120
|
if (version === undefined || !Number.isInteger(version) || version < 1)
|
|
125
121
|
throw new RoomsTasksConfigError(path, `room_templates.${name}.version: required positive integer`);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { TemplateDefinition, TemplateSnapshot } from './types.js';
|
|
2
|
-
export declare const BUILTIN_TEMPLATES: readonly TemplateDefinition[];
|
|
3
2
|
export declare function hashTemplate(t: TemplateDefinition): string;
|
|
4
3
|
export declare function snapshotTemplate(t: TemplateDefinition): TemplateSnapshot;
|
|
5
4
|
export declare function resolveTemplate(name: string, customTemplates: Record<string, TemplateDefinition>): TemplateDefinition | undefined;
|
|
@@ -1,54 +1,4 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
|
-
const TEAM = {
|
|
3
|
-
name: 'team',
|
|
4
|
-
version: 1,
|
|
5
|
-
builtin: true,
|
|
6
|
-
description: 'Phased task pipeline: Architect specifies, Developer implements, Tester verifies',
|
|
7
|
-
room: { quiet_membership: false, anonymous: false },
|
|
8
|
-
contract: [
|
|
9
|
-
'Architect produces a spec and posts it to the room. Work pauses for owner approval.',
|
|
10
|
-
'Developer implements per approved spec.',
|
|
11
|
-
'Tester verifies spec conformance and test coverage.',
|
|
12
|
-
'Completion requires tester sign-off.',
|
|
13
|
-
].join('\n'),
|
|
14
|
-
members: [
|
|
15
|
-
{ slot: 'architect', role: 'Architect', count: 1, agent: { ref: 'Architect' } },
|
|
16
|
-
{ slot: 'developer', role: 'Developer', count: 1, agent: { ref: 'Developer' } },
|
|
17
|
-
{ slot: 'tester', role: 'Tester', count: 1, agent: { ref: 'Tester' } },
|
|
18
|
-
],
|
|
19
|
-
};
|
|
20
|
-
const PAIR = {
|
|
21
|
-
name: 'pair',
|
|
22
|
-
version: 1,
|
|
23
|
-
builtin: true,
|
|
24
|
-
description: 'Deliberation pair: Secretary writes code, Critic reviews — every decision deliberated together',
|
|
25
|
-
room: { quiet_membership: false, anonymous: false },
|
|
26
|
-
contract: [
|
|
27
|
-
'Secretary and Critic deliberate every decision together before acting.',
|
|
28
|
-
'Secretary writes code; Critic reviews and challenges.',
|
|
29
|
-
'No material change lands without both agreeing.',
|
|
30
|
-
'Completion requires joint sign-off.',
|
|
31
|
-
].join('\n'),
|
|
32
|
-
members: [
|
|
33
|
-
{ slot: 'secretary', role: 'Secretary', count: 1, agent: { ref: 'Secretary' } },
|
|
34
|
-
{ slot: 'critic', role: 'Critic', count: 1, agent: { ref: 'Critic' } },
|
|
35
|
-
],
|
|
36
|
-
};
|
|
37
|
-
const SINGLE = {
|
|
38
|
-
name: 'single',
|
|
39
|
-
version: 1,
|
|
40
|
-
builtin: true,
|
|
41
|
-
description: 'Solo agent: one general-purpose agent works the task with owner oversight',
|
|
42
|
-
room: { quiet_membership: false, anonymous: false },
|
|
43
|
-
contract: [
|
|
44
|
-
'Agent works the task autonomously, consulting the owner when blocked.',
|
|
45
|
-
'Owner reviews and approves completion.',
|
|
46
|
-
].join('\n'),
|
|
47
|
-
members: [
|
|
48
|
-
{ slot: 'agent', role: 'Agent', count: 1, agent: { ref: 'Agent' } },
|
|
49
|
-
],
|
|
50
|
-
};
|
|
51
|
-
export const BUILTIN_TEMPLATES = [TEAM, PAIR, SINGLE];
|
|
52
2
|
export function hashTemplate(t) {
|
|
53
3
|
const canonical = JSON.stringify({
|
|
54
4
|
name: t.name, version: t.version, description: t.description,
|
|
@@ -57,38 +7,21 @@ export function hashTemplate(t) {
|
|
|
57
7
|
return createHash('sha256').update(canonical).digest('hex');
|
|
58
8
|
}
|
|
59
9
|
export function snapshotTemplate(t) {
|
|
60
|
-
|
|
10
|
+
const { sourceFile: _, ...semantic } = t;
|
|
11
|
+
return { ...semantic, content_hash: hashTemplate(t) };
|
|
61
12
|
}
|
|
62
13
|
export function resolveTemplate(name, customTemplates) {
|
|
63
14
|
const atIdx = name.lastIndexOf('@');
|
|
64
15
|
const baseName = atIdx > 0 ? name.slice(0, atIdx) : name;
|
|
65
16
|
const versionStr = atIdx > 0 ? name.slice(atIdx + 1) : undefined;
|
|
66
17
|
const version = versionStr ? parseInt(versionStr, 10) : undefined;
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return custom;
|
|
72
|
-
}
|
|
73
|
-
const builtin = BUILTIN_TEMPLATES.find(b => b.name === baseName);
|
|
74
|
-
if (builtin) {
|
|
75
|
-
if (version !== undefined && builtin.version !== version)
|
|
76
|
-
return undefined;
|
|
77
|
-
return builtin;
|
|
78
|
-
}
|
|
79
|
-
return undefined;
|
|
18
|
+
const template = customTemplates[baseName];
|
|
19
|
+
if (!template || (version !== undefined && template.version !== version))
|
|
20
|
+
return undefined;
|
|
21
|
+
return template;
|
|
80
22
|
}
|
|
81
23
|
export function listTemplates(customTemplates) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
result.push({ ...t, name });
|
|
86
|
-
if (BUILTIN_TEMPLATES.some(b => b.name === name))
|
|
87
|
-
overridden.add(name);
|
|
88
|
-
}
|
|
89
|
-
for (const b of BUILTIN_TEMPLATES) {
|
|
90
|
-
if (!overridden.has(b.name))
|
|
91
|
-
result.push(b);
|
|
92
|
-
}
|
|
93
|
-
return result.sort((a, b) => a.name.localeCompare(b.name));
|
|
24
|
+
return Object.entries(customTemplates)
|
|
25
|
+
.map(([name, template]) => ({ ...template, name }))
|
|
26
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
94
27
|
}
|
|
@@ -205,7 +205,8 @@ export interface TemplateDefinition {
|
|
|
205
205
|
name: string;
|
|
206
206
|
version: number;
|
|
207
207
|
description: string;
|
|
208
|
-
|
|
208
|
+
/** Authoring provenance only; excluded from snapshots and semantic hashes. */
|
|
209
|
+
sourceFile?: string;
|
|
209
210
|
room?: TemplateRoomConfig;
|
|
210
211
|
contract?: string;
|
|
211
212
|
members: TemplateMemberSlot[];
|
|
@@ -12,7 +12,7 @@ import { isSensitiveConfigKey } from '../sensitive-config.js';
|
|
|
12
12
|
export const REDACTED_ENV_VALUE = '__OURS_FLEET_SECRET_REDACTED__';
|
|
13
13
|
const MAX_CONFIG_BYTES = 256 * 1024;
|
|
14
14
|
const DIFF_CONTEXT_LINES = 3;
|
|
15
|
-
const KINDS = ['agents', 'roles', 'brains'];
|
|
15
|
+
const KINDS = ['agents', 'roles', 'brains', 'room_templates'];
|
|
16
16
|
const emptyReport = () => ({ ok: true, checks: [] });
|
|
17
17
|
export class FleetConfigService {
|
|
18
18
|
path;
|
|
@@ -176,7 +176,8 @@ function readSources(manifest) {
|
|
|
176
176
|
}
|
|
177
177
|
trustedDirectory(dir);
|
|
178
178
|
for (const name of readdirSync(dir).sort()) {
|
|
179
|
-
if (kind === 'agents'
|
|
179
|
+
if ((kind === 'agents' || kind === 'room_templates')
|
|
180
|
+
&& !['.yaml', '.yml'].includes(extname(name).toLowerCase()))
|
|
180
181
|
continue;
|
|
181
182
|
documents.set(join(kind, name), trustedFile(join(dir, name)));
|
|
182
183
|
}
|
|
@@ -222,7 +223,7 @@ function renderProposal(current, model) {
|
|
|
222
223
|
? render(current.documents.get(oldRel), doc) : stringify(doc));
|
|
223
224
|
}
|
|
224
225
|
for (const [rel, source] of current.documents)
|
|
225
|
-
if (rel.startsWith('roles/') || rel.startsWith('brains/'))
|
|
226
|
+
if (rel.startsWith('roles/') || rel.startsWith('brains/') || rel.startsWith('room_templates/'))
|
|
226
227
|
next.set(rel, source);
|
|
227
228
|
return next;
|
|
228
229
|
}
|
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.8",
|
|
4
4
|
"description": "Harness-agnostic fleet of persistent, identity-bound AI agents. Declarative fleet.yaml, ACP sessions, supervision, and ours.network messaging.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "FSL-1.1-Apache-2.0",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"dist",
|
|
17
17
|
"contrib",
|
|
18
18
|
"examples",
|
|
19
|
+
"presets",
|
|
19
20
|
"README.md",
|
|
20
21
|
"LICENSE"
|
|
21
22
|
],
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
mission: Complete the assigned task safely and report a verifiable result.
|
|
2
|
+
persona: |
|
|
3
|
+
Work autonomously within the stated scope. Inspect before changing, preserve unrelated
|
|
4
|
+
state, test material work, and ask the owner when authority or intent is ambiguous.
|
|
5
|
+
Do not expand scope, publish, deploy, or claim completion without evidence.
|
|
6
|
+
bio: General-purpose task agent; engage for one bounded task with owner oversight.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
mission: Produce an implementable specification for the assigned goal.
|
|
2
|
+
persona: |
|
|
3
|
+
Map constraints, interfaces, risks, acceptance criteria, and migration behavior before
|
|
4
|
+
implementation. Resolve ambiguity with the owner and hand off a bounded design. Do not
|
|
5
|
+
implement or approve deployment unless the task explicitly expands your role.
|
|
6
|
+
bio: Solution architect; engage to turn a goal into a bounded, reviewable specification.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
mission: Independently challenge the proposed solution and verify its evidence.
|
|
2
|
+
persona: |
|
|
3
|
+
Audit assumptions, safety boundaries, regressions, tests, and delivery claims. Explain
|
|
4
|
+
concrete objections and acceptance criteria; do not edit the implementation or block
|
|
5
|
+
on taste alone. Sign off only when material risks have evidence-backed resolution.
|
|
6
|
+
bio: Independent reviewer; engage to challenge design, implementation, and verification.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
mission: Implement the approved specification with maintainable code and tests.
|
|
2
|
+
persona: |
|
|
3
|
+
Make the smallest coherent change that satisfies the specification. Preserve unrelated
|
|
4
|
+
work, validate behavior in proportion to risk, and report deviations immediately. Do
|
|
5
|
+
not redesign approved scope, waive failing tests, publish, or deploy without authority.
|
|
6
|
+
bio: Implementation specialist; engage after a specification is approved.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
mission: Implement the agreed solution and maintain the task's shared record.
|
|
2
|
+
persona: |
|
|
3
|
+
Turn agreed decisions into focused code, documentation, and tests. Keep collaborators
|
|
4
|
+
informed with compact evidence and preserve unrelated state. Pause material work for
|
|
5
|
+
required review; do not merge, publish, or widen scope without owner authorization.
|
|
6
|
+
bio: Implementing partner and record keeper; engage to deliver reviewed changes.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
mission: Verify that the implementation satisfies the approved specification.
|
|
2
|
+
persona: |
|
|
3
|
+
Test observable behavior, failure paths, compatibility, and regression risk independently.
|
|
4
|
+
Report reproducible evidence and distinguish defects from preferences. Do not repair the
|
|
5
|
+
implementation or sign off with unresolved material failures.
|
|
6
|
+
bio: Independent verifier; engage to assess conformance, safety, and regression coverage.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
description: "Deliberation pair: Secretary writes code, Critic reviews — every decision deliberated together"
|
|
3
|
+
room: { quiet_membership: false, anonymous: false }
|
|
4
|
+
contract: |
|
|
5
|
+
Secretary and Critic deliberate every decision together before acting.
|
|
6
|
+
Secretary writes code; Critic reviews and challenges.
|
|
7
|
+
No material change lands without both agreeing.
|
|
8
|
+
Completion requires joint sign-off.
|
|
9
|
+
members:
|
|
10
|
+
- { slot: secretary, role: Secretary, count: 1, agent: { ref: Secretary } }
|
|
11
|
+
- { slot: critic, role: Critic, count: 1, agent: { ref: Critic } }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
description: "Solo agent: one general-purpose agent works the task with owner oversight"
|
|
3
|
+
room: { quiet_membership: false, anonymous: false }
|
|
4
|
+
contract: |
|
|
5
|
+
Agent works the task autonomously, consulting the owner when blocked.
|
|
6
|
+
Owner reviews and approves completion.
|
|
7
|
+
members:
|
|
8
|
+
- { slot: agent, role: Agent, count: 1, agent: { ref: Agent } }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
description: "Phased task pipeline: Architect specifies, Developer implements, Tester verifies"
|
|
3
|
+
room: { quiet_membership: false, anonymous: false }
|
|
4
|
+
contract: |
|
|
5
|
+
Architect produces a spec and posts it to the room. Work pauses for owner approval.
|
|
6
|
+
Developer implements per approved spec.
|
|
7
|
+
Tester verifies spec conformance and test coverage.
|
|
8
|
+
Completion requires tester sign-off.
|
|
9
|
+
members:
|
|
10
|
+
- { slot: architect, role: Architect, count: 1, agent: { ref: Architect } }
|
|
11
|
+
- { slot: developer, role: Developer, count: 1, agent: { ref: Developer } }
|
|
12
|
+
- { slot: tester, role: Tester, count: 1, agent: { ref: Tester } }
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
api_version: ours.network/fleet/v2
|
|
2
|
+
|
|
3
|
+
defaults:
|
|
4
|
+
permissions: { approval: ask, filesystem: workspace, unattended: deny }
|
|
5
|
+
|
|
6
|
+
# Rooms require an authenticated owner CID/invite before they can be started.
|
|
7
|
+
# See `ours-fleet docs`, then add `rooms:` and `tasks:` here.
|