@ours.network/fleet 2.4.4 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -32
- package/dist/agent-ours/mcp-endpoint.d.ts +3 -0
- package/dist/agent-ours/mcp-endpoint.js +3 -0
- package/dist/agent-ours/service.d.ts +3 -0
- package/dist/agent-ours/service.js +19 -2
- package/dist/application/conversation-history.js +2 -2
- package/dist/application/fleet-query-service.js +4 -1
- package/dist/application/role-creation-service.js +0 -3
- package/dist/application/session-control.d.ts +3 -0
- package/dist/application/session-control.js +5 -0
- package/dist/application/types.d.ts +5 -0
- package/dist/build-info.json +4 -4
- package/dist/cli.js +2 -3
- package/dist/config.d.ts +9 -2
- package/dist/config.js +15 -4
- package/dist/docs.d.ts +5 -7
- package/dist/docs.js +38 -46
- package/dist/doctor.js +4 -6
- package/dist/file-delivery/store.d.ts +12 -0
- package/dist/file-delivery/store.js +24 -2
- package/dist/fleet-command-audit.js +3 -2
- package/dist/fleet-proxy.js +0 -1
- package/dist/harness/hermes-permissions.js +1 -1
- package/dist/harness/hermes-session.js +0 -1
- package/dist/init-wizard.js +2 -2
- package/dist/lifecycle-summary.d.ts +3 -2
- package/dist/lifecycle-summary.js +2 -3
- package/dist/notifications/status-producer.d.ts +37 -0
- package/dist/notifications/status-producer.js +146 -0
- package/dist/permissions.d.ts +2 -3
- package/dist/permissions.js +3 -3
- package/dist/preset-migration.js +12 -0
- package/dist/rooms-tasks/cli.js +2 -6
- package/dist/rooms-tasks/deletion.js +3 -0
- package/dist/rooms-tasks/member-overrides.d.ts +2 -1
- package/dist/rooms-tasks/member-overrides.js +1 -4
- package/dist/rooms-tasks/task-contributions.d.ts +15 -0
- package/dist/rooms-tasks/task-contributions.js +13 -2
- package/dist/runner.js +24 -8
- package/dist/session/acp.d.ts +9 -29
- package/dist/session/acp.js +31 -308
- package/dist/session/codex-app-server.d.ts +9 -6
- package/dist/session/codex-app-server.js +19 -58
- package/dist/session/control.d.ts +5 -0
- package/dist/session/control.js +19 -3
- package/dist/session/conversation-types.d.ts +3 -2
- package/dist/session/status-notice.d.ts +24 -0
- package/dist/session/status-notice.js +38 -0
- package/dist/session/types.d.ts +2 -0
- package/dist/spawn.d.ts +1 -2
- package/dist/spawn.js +2 -6
- package/dist/statuses/permission-projection.d.ts +53 -0
- package/dist/statuses/permission-projection.js +317 -0
- package/dist/statuses/status-answers.d.ts +31 -0
- package/dist/statuses/status-answers.js +85 -0
- package/dist/statuses/status-feed.d.ts +85 -0
- package/dist/statuses/status-feed.js +122 -0
- package/dist/statuses/status-kinds.d.ts +15 -0
- package/dist/statuses/status-kinds.js +12 -0
- package/dist/statuses/status-ledger.d.ts +21 -0
- package/dist/statuses/status-ledger.js +80 -0
- package/dist/statuses/status-routes.d.ts +43 -0
- package/dist/statuses/status-routes.js +140 -0
- package/dist/statuses/status-store.d.ts +257 -0
- package/dist/statuses/status-store.js +605 -0
- package/dist/statuses/status-tools.d.ts +21 -0
- package/dist/statuses/status-tools.js +126 -0
- package/dist/supervisor/manager.js +11 -0
- package/dist/web/resource-views.d.ts +3 -1
- package/dist/web/resource-views.js +6 -2
- package/dist/web/server.js +15 -0
- package/docs/acp-files.md +9 -7
- package/docs/validation/managed-cli-permissions.md +1 -1
- package/examples/fleet/agents/Alice.yaml +1 -1
- package/examples/fleet/agents/FleetCoordinator.yaml +1 -1
- package/examples/fleet.yaml +0 -1
- package/package.json +2 -2
- package/presets/fleet/agent_templates/Critic.yaml +1 -1
- package/presets/fleet/agent_templates/Developer.yaml +1 -1
- package/presets/fleet/agent_templates/Engineer.yaml +1 -1
- package/presets/fleet/agent_templates/LocalCoordinator.yaml +1 -1
- package/presets/fleet/agents/FleetCoordinator.yaml +1 -1
- package/presets/fleet.yaml +1 -1
- package/presets/manifest.json +1 -1
package/README.md
CHANGED
|
@@ -389,7 +389,6 @@ defaults:
|
|
|
389
389
|
permissions: # common intent, translated by each harness/backend
|
|
390
390
|
approval: ask # ask | auto | allow (`deny` is a deprecated alias)
|
|
391
391
|
filesystem: workspace # read-only | workspace | unrestricted
|
|
392
|
-
unattended: deny # deny | wait
|
|
393
392
|
monitor:
|
|
394
393
|
mode: fleet # fleet (default) | native
|
|
395
394
|
worklog: # built-ins shown; set false to opt out
|
|
@@ -403,7 +402,7 @@ Agent Template document (\`~/fleet/agent_templates/Worker.yaml\`) is inert and r
|
|
|
403
402
|
```yaml
|
|
404
403
|
role: { ref: developer }
|
|
405
404
|
brain: { ref: claude-default }
|
|
406
|
-
permissions: { approval: ask, filesystem: workspace
|
|
405
|
+
permissions: { approval: ask, filesystem: workspace }
|
|
407
406
|
monitor: { mode: fleet, interrupt: after_tool }
|
|
408
407
|
loops: # optional; temporary launches only
|
|
409
408
|
progress:
|
|
@@ -826,31 +825,31 @@ owner-channel task route; a no-op Coordinator pass should complete silently.
|
|
|
826
825
|
|
|
827
826
|
### Never-prompt failure
|
|
828
827
|
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
agent does less than its briefing told it to, reports
|
|
832
|
-
distinguishes that from having done the work.
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
828
|
+
A permission mode that suppresses the prompt without granting the action
|
|
829
|
+
(Claude `dontAsk`) refuses a request **inside the harness** — no prompt, no
|
|
830
|
+
error, no log line. The agent does less than its briefing told it to, reports
|
|
831
|
+
success, and nothing distinguishes that from having done the work.
|
|
832
|
+
|
|
833
|
+
Every request that reaches Fleet waits for the Owner's answer, in the agent's
|
|
834
|
+
session or in the feed, with no timeout and no automatic denial, attached
|
|
835
|
+
console or not. It ends without an answer only when its turn or session really
|
|
836
|
+
ends. The retired `unattended` key is accepted and ignored, with one startup
|
|
837
|
+
warning naming the role. Fleet never decides a raised request itself:
|
|
838
|
+
`approval` only selects the harness's native mode, which decides whether a
|
|
839
|
+
request is raised at all, and the deprecated `deny` alias no longer refuses
|
|
840
|
+
anything. Owner decisions, and requests ended with their turn or session
|
|
841
|
+
(recorded as cancelled), are written to
|
|
842
|
+
`~/.ours-fleet/agents/<Name>/.session-events.jsonl` with the reason, and
|
|
843
|
+
`ours-fleet peek`/`attach` render them.
|
|
844
|
+
|
|
845
|
+
To catch an under-permissioned role **before** it runs, see the capability floor
|
|
846
|
+
below — `ours-fleet doctor` warns about it.
|
|
848
847
|
|
|
849
848
|
### The unattended capability floor
|
|
850
849
|
|
|
851
|
-
A fleet role runs with
|
|
852
|
-
|
|
853
|
-
|
|
850
|
+
A fleet role usually runs with nobody watching. Below the floor, each action of
|
|
851
|
+
its own briefing raises a permission request that waits for the Owner, and the
|
|
852
|
+
agent makes no progress meanwhile.
|
|
854
853
|
|
|
855
854
|
`ours-fleet config` and `ours-fleet doctor` therefore resolve each role's
|
|
856
855
|
neutral `permissions:` through its harness adapter and check what the resulting
|
|
@@ -865,10 +864,8 @@ native settings actually grant, against a fixed floor:
|
|
|
865
864
|
| `workspace-edit` | edit and test files in its working directory |
|
|
866
865
|
| `status-commands` | run the inspection commands its briefing prescribes |
|
|
867
866
|
|
|
868
|
-
`doctor` reports this per role as `unattended floor: <Role>`. A role
|
|
869
|
-
|
|
870
|
-
those requests with nobody to see it. With `unattended: wait` it **warns**,
|
|
871
|
-
since a human can still attach a console and answer.
|
|
867
|
+
`doctor` reports this per role as `unattended floor: <Role>`. A role that cannot
|
|
868
|
+
meet the floor **warns**: those requests will wait for the Owner's answer.
|
|
872
869
|
|
|
873
870
|
**Security meaning.** For native Codex, Fleet translates `ask` → `untrusted`,
|
|
874
871
|
`auto` → `on-request`, and `allow` → `never`; users configure only the Fleet
|
|
@@ -1396,7 +1393,6 @@ model: gpt-5.4
|
|
|
1396
1393
|
permissions:
|
|
1397
1394
|
approval: auto
|
|
1398
1395
|
filesystem: read-only
|
|
1399
|
-
unattended: deny
|
|
1400
1396
|
harness_options:
|
|
1401
1397
|
launcher: auto
|
|
1402
1398
|
monitor: true
|
|
@@ -1701,9 +1697,10 @@ or a model's claim does not prove that a tool works. Fleet adds no probe prompt.
|
|
|
1701
1697
|
|
|
1702
1698
|
These modes cover dangerous terminal command prompts and `write_file`/`patch`.
|
|
1703
1699
|
They do not provide universal approval for browser, memory, skills, delegation
|
|
1704
|
-
or MCP side effects. Native protected-action floors remain. Fleet
|
|
1705
|
-
|
|
1706
|
-
seconds
|
|
1700
|
+
or MCP side effects. Native protected-action floors remain. Fleet waits for the
|
|
1701
|
+
Owner without a timeout; Hermes's own tested native dangerous-command timeout of
|
|
1702
|
+
60 seconds still ends an unanswered request, which Fleet records as ended when
|
|
1703
|
+
its turn finishes. Workspace confinement is approximate without verified enforcing Fleet
|
|
1707
1704
|
isolation; unrestricted filesystem mode is also available. Read-only mode,
|
|
1708
1705
|
legacy approval `deny`, Fleet provider overrides, effort, model chains, native
|
|
1709
1706
|
monitoring and `after_tool` are unsupported.
|
|
@@ -7,6 +7,7 @@ import { FileCallbacks } from './file-rpc.js';
|
|
|
7
7
|
import type { AgentOursRuntime } from './runtime.js';
|
|
8
8
|
import { type ReminderToolBackend } from '../reminders/tools.js';
|
|
9
9
|
import { type TaskToolBinding } from '../rooms-tasks/task-tools.js';
|
|
10
|
+
import { type StatusToolBinding } from '../statuses/status-tools.js';
|
|
10
11
|
export interface EndpointOptions {
|
|
11
12
|
socket: string;
|
|
12
13
|
capability: string;
|
|
@@ -20,6 +21,8 @@ export interface EndpointOptions {
|
|
|
20
21
|
reminders?: () => ReminderToolBackend | undefined;
|
|
21
22
|
/** Task Progress / To review tools for the task this agent was launched for. */
|
|
22
23
|
task?: () => TaskToolBinding | undefined;
|
|
24
|
+
/** Status publish/close/get for this agent, with or without a task. */
|
|
25
|
+
status?: () => StatusToolBinding | undefined;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
28
|
* Listen on the bridge socket. A close unlinks it, but a predecessor that ended
|
|
@@ -8,6 +8,7 @@ import { FileCallbacks } from './file-rpc.js';
|
|
|
8
8
|
import { Wire } from './wire.js';
|
|
9
9
|
import { registerReminderTools } from '../reminders/tools.js';
|
|
10
10
|
import { registerTaskTools } from '../rooms-tasks/task-tools.js';
|
|
11
|
+
import { registerStatusTools } from '../statuses/status-tools.js';
|
|
11
12
|
const ORPHAN_PROBE_TIMEOUT_MS = 1_000;
|
|
12
13
|
function listenOnce(server, path) {
|
|
13
14
|
return new Promise((resolve, reject) => {
|
|
@@ -133,6 +134,8 @@ export async function startMcpEndpoint(options) {
|
|
|
133
134
|
registerReminderTools(mcp, options.reminders, admit);
|
|
134
135
|
if (options.task)
|
|
135
136
|
registerTaskTools(mcp, options.task, admit);
|
|
137
|
+
if (options.status)
|
|
138
|
+
registerStatusTools(mcp, options.status, admit);
|
|
136
139
|
wire.onClose = () => {
|
|
137
140
|
clearTimeout(deadline);
|
|
138
141
|
sockets.delete(wire);
|
|
@@ -5,6 +5,7 @@ import type { ResolvedRole } from '../config.js';
|
|
|
5
5
|
import { AgentOursRuntime } from './runtime.js';
|
|
6
6
|
import { startMcpEndpoint } from './mcp-endpoint.js';
|
|
7
7
|
import type { TaskToolBinding } from '../rooms-tasks/task-tools.js';
|
|
8
|
+
import type { StatusToolBinding } from '../statuses/status-tools.js';
|
|
8
9
|
export declare const privateRuntimeRoot: () => string;
|
|
9
10
|
export interface ManagedAgentService {
|
|
10
11
|
runtime: AgentOursRuntime;
|
|
@@ -30,6 +31,8 @@ export declare function currentChatFileHandler(options: {
|
|
|
30
31
|
}): NonNullable<Parameters<typeof startMcpEndpoint>[0]['currentChatFile']>;
|
|
31
32
|
/** Task membership comes from supervisor launch records, re-read per call so a restart cannot leave it stale. */
|
|
32
33
|
export declare function taskToolBinding(role: ResolvedRole, stateDir: string, cid: string | undefined): TaskToolBinding | undefined;
|
|
34
|
+
/** Every agent may publish statuses; the mission binding is added only when the supervisor launched it for a task. */
|
|
35
|
+
export declare function statusToolBinding(role: ResolvedRole, stateDir: string, cid: string | undefined): StatusToolBinding;
|
|
33
36
|
/** Only trusted launch orchestration may write this descriptor, never the child. */
|
|
34
37
|
export declare function storeRoomSecret(role: ResolvedRole): void;
|
|
35
38
|
export declare function storeTemporaryLaunch(role: ResolvedRole, action: string): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { chatFilePath } from '../file-delivery/reader.js';
|
|
2
|
-
import { ArtifactStore } from '../file-delivery/store.js';
|
|
2
|
+
import { ArtifactStore, artifactStoreKey, readDeliveredFile } from '../file-delivery/store.js';
|
|
3
|
+
import { conversationHasAttachment } from '../application/conversation-history.js';
|
|
3
4
|
import { resolve, basename, extname } from 'node:path';
|
|
4
5
|
import { socketPath as privateSocketPath } from '../socket-path.js';
|
|
5
6
|
import { randomBytes, randomUUID } from 'node:crypto';
|
|
@@ -36,7 +37,7 @@ export function currentChatFileHandler(options) {
|
|
|
36
37
|
const name = input.filename ?? basename(input.path);
|
|
37
38
|
if (!name || Buffer.byteLength(name) > 240 || /[\/\\\x00-\x1f]/.test(name) || name === '.' || name === '..')
|
|
38
39
|
throw Error('INVALID_FILENAME');
|
|
39
|
-
const mime = input.mime ?? { '.txt': 'text/plain', '.md': 'text/markdown', '.pdf': 'application/pdf', '.json': 'application/json', '.html': 'text/html', '.png': 'image/png' }[extname(name).toLowerCase()] ?? 'application/octet-stream';
|
|
40
|
+
const mime = input.mime ?? { '.txt': 'text/plain', '.md': 'text/markdown', '.pdf': 'application/pdf', '.json': 'application/json', '.html': 'text/html', '.png': 'image/png', '.jpg': 'image/jpeg', '.jpeg': 'image/jpeg', '.gif': 'image/gif', '.webp': 'image/webp' }[extname(name).toLowerCase()] ?? 'application/octet-stream';
|
|
40
41
|
if (mime.length > 200 || !/^[A-Za-z0-9.+-]+\/[A-Za-z0-9.+-]+$/.test(mime))
|
|
41
42
|
throw Error('INVALID_MIME');
|
|
42
43
|
return sender(input, extra.signal, async (binding) => {
|
|
@@ -61,6 +62,21 @@ export function taskToolBinding(role, stateDir, cid) {
|
|
|
61
62
|
return undefined;
|
|
62
63
|
return { taskId, role: role.name, ...(cid ? { identityCid: cid } : {}), taskOwned: !!owned };
|
|
63
64
|
}
|
|
65
|
+
/** Every agent may publish statuses; the mission binding is added only when the supervisor launched it for a task. */
|
|
66
|
+
export function statusToolBinding(role, stateDir, cid) {
|
|
67
|
+
const task = taskToolBinding(role, stateDir, cid);
|
|
68
|
+
return {
|
|
69
|
+
role: role.name, ...(cid ? { identityCid: cid } : {}), ...(role.identity ? { displayName: role.identity } : {}), ...(task ? { task } : {}),
|
|
70
|
+
// Only files this agent itself delivered in its current conversation incarnation resolve.
|
|
71
|
+
attachment: async (id) => {
|
|
72
|
+
const { record } = await readDeliveredFile(stateDir, id);
|
|
73
|
+
// Only a file the Owner actually received in this conversation; an unpublished copy never resolves.
|
|
74
|
+
if (!await conversationHasAttachment(stateDir, record))
|
|
75
|
+
throw Error('ARTIFACT_NOT_PUBLISHED');
|
|
76
|
+
return { id: record.id, name: record.name, media_type: record.mimeType, size: record.size, sha256: record.sha256, store: artifactStoreKey(stateDir) };
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
64
80
|
function roomSecretPath(role) {
|
|
65
81
|
const startup = role.roomMemberStartup;
|
|
66
82
|
return join(privateRuntimeRoot(), 'room-inputs', binderKey(startup.room_identity_cid, JSON.stringify([role.name, startup.invite_id])) + '.json');
|
|
@@ -272,6 +288,7 @@ export async function prepareManagedAgent(role, stateDir, temporary) {
|
|
|
272
288
|
remoteDaemonFiles: true,
|
|
273
289
|
reminders: () => reminders,
|
|
274
290
|
task: () => taskToolBinding(role, stateDir, runtime.snapshot.cid),
|
|
291
|
+
status: () => statusToolBinding(role, stateDir, runtime.snapshot.cid),
|
|
275
292
|
currentChatFile: currentChatFileHandler({
|
|
276
293
|
role, cwd, store: new ArtifactStore(stateDir), sender: () => fileSender,
|
|
277
294
|
privateState: [privateRuntimeRoot(), join(stateRoot(), 'private-file-delivery'), profile.configPath, profile.credentialPath],
|
|
@@ -2,7 +2,7 @@ import { createReadStream } from 'node:fs';
|
|
|
2
2
|
import { open, readFile, readdir, stat } from 'node:fs/promises';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { createInterface } from 'node:readline';
|
|
5
|
-
const HISTORICAL_KINDS = ['file.attached', 'fleet.task_created', 'prompt.admitted', 'message.chunk', 'message.replace', 'tool.upsert', 'tool.content_chunk', 'turn.completed'];
|
|
5
|
+
const HISTORICAL_KINDS = ['file.attached', 'fleet.task_created', 'status.published', 'status.updated', 'status.answered', 'status.closed', 'prompt.admitted', 'message.chunk', 'message.replace', 'tool.upsert', 'tool.content_chunk', 'turn.completed'];
|
|
6
6
|
/** Whether a ledger event belongs in the conversation: the live generation, or history of the resumed ACP session. */
|
|
7
7
|
export function conversationEventVisible(event, sessionGeneration, resumedSessionId) {
|
|
8
8
|
return event.source !== 'agent_replay' && (event.sessionGeneration === sessionGeneration || (!!resumedSessionId && HISTORICAL_KINDS.includes(event.kind) && event.acpSessionId === resumedSessionId));
|
|
@@ -343,7 +343,7 @@ export async function resumedConversationPage(stateDir, request, live, expectedS
|
|
|
343
343
|
const cursor = Number(event.seq);
|
|
344
344
|
if (!Number.isSafeInteger(cursor) || cursor <= after)
|
|
345
345
|
continue;
|
|
346
|
-
const historical = ['file.attached', 'fleet.task_created', 'prompt.admitted', 'message.chunk', 'message.replace', 'tool.upsert', 'tool.content_chunk', 'turn.completed'].includes(event.kind);
|
|
346
|
+
const historical = ['file.attached', 'fleet.task_created', 'status.published', 'status.updated', 'status.answered', 'status.closed', 'prompt.admitted', 'message.chunk', 'message.replace', 'tool.upsert', 'tool.content_chunk', 'turn.completed'].includes(event.kind);
|
|
347
347
|
const visible = event.source !== 'agent_replay' && (event.sessionGeneration === live.snapshot.sessionGeneration || (historical && event.acpSessionId === sessionId));
|
|
348
348
|
if (!visible) {
|
|
349
349
|
next = String(cursor);
|
|
@@ -6,6 +6,7 @@ import { SessionControlError } from '../session/types.js';
|
|
|
6
6
|
import { readExitRecord, readRestartLedger } from '../runner.js';
|
|
7
7
|
import { readDaemonRecoveryStatus } from '../daemon-recovery.js';
|
|
8
8
|
import { roleCapabilities } from './capabilities.js';
|
|
9
|
+
import { sessionIdentityCid } from '../statuses/status-ledger.js';
|
|
9
10
|
import { FleetError } from './errors.js';
|
|
10
11
|
const clean = (value, max = 512) => value.replace(/[\0-\x08\x0b\x0c\x0e-\x1f\x7f]/g, '').trim().slice(0, max);
|
|
11
12
|
function boundedText(path, max = 16 * 1024) {
|
|
@@ -150,8 +151,10 @@ export class FleetQueryService {
|
|
|
150
151
|
backend: this.options.supervisor.id, liveness: live.state,
|
|
151
152
|
nativeState: live.detail.split(/\s/)[0], detail: clean(live.detail),
|
|
152
153
|
};
|
|
154
|
+
// The agent's own identity: the author of its statuses, independent of any owner channel.
|
|
155
|
+
const identityCid = dir ? sessionIdentityCid(dir) : undefined;
|
|
153
156
|
return {
|
|
154
|
-
roleId: role.id, observedAt,
|
|
157
|
+
roleId: role.id, observedAt, ...(identityCid ? { identityCid } : {}),
|
|
155
158
|
overall: sessionOverall(supervisor, session, restart, monitor, isolation, problems),
|
|
156
159
|
supervisor, session,
|
|
157
160
|
restart: {
|
|
@@ -148,8 +148,6 @@ export class RoleCreationService {
|
|
|
148
148
|
: 'approval=allow maps to an elevated native permission mode');
|
|
149
149
|
if (request.permissions.filesystem === 'unrestricted')
|
|
150
150
|
warnings.push('filesystem=unrestricted grants access outside the workspace');
|
|
151
|
-
if (request.permissions.unattended === 'wait')
|
|
152
|
-
warnings.push('unattended permission requests may hold until a controller attaches');
|
|
153
151
|
if (request.lifetime === 'temporary')
|
|
154
152
|
warnings.push('temporary sessions are gone on exit or reboot');
|
|
155
153
|
const existingIdentity = await this.checkIdentity(request.name);
|
|
@@ -338,7 +336,6 @@ export class RoleCreationService {
|
|
|
338
336
|
identity: request.name, brain: request.brain, role: request.role, cwd: request.cwd,
|
|
339
337
|
coordinator: request.coordinator,
|
|
340
338
|
approval: request.permissions.approval, filesystem: request.permissions.filesystem,
|
|
341
|
-
unattended: request.permissions.unattended,
|
|
342
339
|
monitorConfig: request.monitor,
|
|
343
340
|
configPath: this.options.configPath,
|
|
344
341
|
surface: creationActionId ? 'web' : undefined, creationActionId,
|
|
@@ -78,6 +78,8 @@ export interface RoleSessionControl {
|
|
|
78
78
|
actorBrowserSession: string;
|
|
79
79
|
expectedSessionGeneration?: string;
|
|
80
80
|
requireIdle?: boolean;
|
|
81
|
+
/** Admit only into a session bound to this identity; refused by supervisors without `identity_bound_prompts`. */
|
|
82
|
+
expectedIdentityCid?: string;
|
|
81
83
|
source: 'owner_admin_console';
|
|
82
84
|
}): Promise<PromptReceipt>;
|
|
83
85
|
interruptPromptV2?(request: {
|
|
@@ -137,6 +139,7 @@ export declare class RoleSessionControlAdapter implements RoleSessionControl {
|
|
|
137
139
|
actorBrowserSession: string;
|
|
138
140
|
expectedSessionGeneration?: string;
|
|
139
141
|
requireIdle?: boolean;
|
|
142
|
+
expectedIdentityCid?: string;
|
|
140
143
|
source: 'owner_admin_console';
|
|
141
144
|
}): Promise<PromptReceipt>;
|
|
142
145
|
interruptPromptV2(request: {
|
|
@@ -137,6 +137,8 @@ export class RoleSessionControlAdapter {
|
|
|
137
137
|
const features = request.requireIdle ? (await this.describe()).features : undefined;
|
|
138
138
|
if (request.requireIdle && (!request.expectedSessionGeneration || !features?.includes('idle_bound_prompts')))
|
|
139
139
|
throw new FleetError('capability_unavailable', 'Live voice requires an updated supervisor.');
|
|
140
|
+
if (request.expectedIdentityCid !== undefined && !(await this.describe()).features.includes('identity_bound_prompts'))
|
|
141
|
+
throw new FleetError('capability_unavailable', 'This agent\'s supervisor cannot verify its identity at admission; update it.');
|
|
140
142
|
let command = 'submit_prompt_v2';
|
|
141
143
|
if (request.expectedSessionGeneration) {
|
|
142
144
|
if ((await this.describe()).features.includes('generation_bound_prompts'))
|
|
@@ -151,6 +153,7 @@ export class RoleSessionControlAdapter {
|
|
|
151
153
|
return await this.call(command, {
|
|
152
154
|
commandId: request.commandId, text: request.text, actor: request.actorBrowserSession,
|
|
153
155
|
source: request.source, expectedSessionGeneration: request.expectedSessionGeneration, requireIdle: request.requireIdle,
|
|
156
|
+
...(request.expectedIdentityCid === undefined ? {} : { expectedIdentityCid: request.expectedIdentityCid }),
|
|
154
157
|
});
|
|
155
158
|
}
|
|
156
159
|
catch (error) {
|
|
@@ -159,6 +162,8 @@ export class RoleSessionControlAdapter {
|
|
|
159
162
|
throw new FleetError('stale_state', 'Agent session changed. Record a new voice message.');
|
|
160
163
|
if (fleetError.message.includes('voice_busy:'))
|
|
161
164
|
throw new FleetError('conflict', 'Agent is already working. Wait for the current turn.');
|
|
165
|
+
if (fleetError.message.includes('identity_mismatch:'))
|
|
166
|
+
throw new FleetError('forbidden', 'identity_mismatch: the agent session is bound to a different identity');
|
|
162
167
|
if (fleetError.message.includes('idempotency_conflict'))
|
|
163
168
|
throw new FleetError('idempotency_conflict', 'this command id was already used with a different prompt body');
|
|
164
169
|
throw fleetError;
|
|
@@ -60,6 +60,11 @@ export interface Problem {
|
|
|
60
60
|
export interface RoleStatus {
|
|
61
61
|
roleId: string;
|
|
62
62
|
observedAt: string;
|
|
63
|
+
/**
|
|
64
|
+
* The managed agent's identity CID, from its session bridge descriptor: the author of its
|
|
65
|
+
* statuses and the address of its feed. Absent until the agent's bridge has bound an identity.
|
|
66
|
+
*/
|
|
67
|
+
identityCid?: string;
|
|
63
68
|
overall: 'ready' | 'busy' | 'attention' | 'offline' | 'unknown';
|
|
64
69
|
supervisor: {
|
|
65
70
|
backend: 'systemd' | 'launchd' | 'none';
|
package/dist/build-info.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.
|
|
3
|
-
"buildId": "
|
|
4
|
-
"commit": "
|
|
2
|
+
"version": "2.5.0",
|
|
3
|
+
"buildId": "829a402b8c23",
|
|
4
|
+
"commit": "cad470c5f10468c6115c3f9398e143f8c0835d65",
|
|
5
5
|
"dirty": false,
|
|
6
|
-
"builtAt": "2026-12-
|
|
6
|
+
"builtAt": "2026-12-03T21:34:44.941Z",
|
|
7
7
|
"capabilities": [
|
|
8
8
|
"service.refresh-v1",
|
|
9
9
|
"managed-cli.codex-reasoning-effort-v1",
|
package/dist/cli.js
CHANGED
|
@@ -313,7 +313,7 @@ cOpt(program.command('config').description('validate + print the merged plan (no
|
|
|
313
313
|
+ `(${r.owner_channel.owners.length} authorized sender(s), `
|
|
314
314
|
+ `interrupt=${r.owner_channel.interrupt})`);
|
|
315
315
|
console.log(` permissions: approval=${r.permissions.approval} `
|
|
316
|
-
+ `filesystem=${r.permissions.filesystem}
|
|
316
|
+
+ `filesystem=${r.permissions.filesystem}`);
|
|
317
317
|
if (perms?.supported)
|
|
318
318
|
console.log(` native: ${formatNative(perms.native)}`
|
|
319
319
|
+ `${perms.exact ? '' : ' (not an exact representation)'}`);
|
|
@@ -1214,7 +1214,6 @@ cOpt(program.command('spawn [name]').description('spawn a new agent (permanent b
|
|
|
1214
1214
|
.option('--coordinator <name>', 'announce target')
|
|
1215
1215
|
.option('--approval <mode>', 'fleet permission mode: ask|auto|allow (Codex ACP allow selects agent-full-access; deny is deprecated)')
|
|
1216
1216
|
.option('--filesystem <mode>', 'common filesystem intent: read-only|workspace|unrestricted')
|
|
1217
|
-
.option('--unattended <mode>', 'permission behavior without a console: deny|wait')
|
|
1218
1217
|
.option('--isolation-file <path>', 'file holding an isolation: mapping (same schema as fleet.yaml)')
|
|
1219
1218
|
.option('--loops-file <path>', 'owner-only YAML containing exactly loops: for this temporary agent')
|
|
1220
1219
|
.option('--no-loops', 'explicitly disable temporary-agent loops')
|
|
@@ -1232,7 +1231,7 @@ cOpt(program.command('spawn [name]').description('spawn a new agent (permanent b
|
|
|
1232
1231
|
brain: parseAgentSelection(opts.brain, 'brain'), role: parseAgentSelection(opts.role, 'role'),
|
|
1233
1232
|
identity: opts.identity, cwd: opts.cwd, coordinator: opts.coordinator,
|
|
1234
1233
|
approval: opts.approval,
|
|
1235
|
-
filesystem: opts.filesystem,
|
|
1234
|
+
filesystem: opts.filesystem,
|
|
1236
1235
|
isolationFile: opts.isolationFile, configPath: opts.configuration,
|
|
1237
1236
|
loopsFile: opts.loopsFile, noLoops: opts.loops === false,
|
|
1238
1237
|
loopSource: opts.loopsFile || opts.loops === false ? 'cli' : 'omitted',
|
package/dist/config.d.ts
CHANGED
|
@@ -33,7 +33,6 @@ export type FleetPermissionMode = 'ask' | 'auto' | 'allow';
|
|
|
33
33
|
/** `deny` is a deprecated, fail-closed compatibility alias retained for old fleet files. */
|
|
34
34
|
export type ApprovalMode = FleetPermissionMode | 'deny';
|
|
35
35
|
export type FilesystemMode = 'read-only' | 'workspace' | 'unrestricted';
|
|
36
|
-
export type UnattendedMode = 'deny' | 'wait';
|
|
37
36
|
/** Monitor wake policy: preserve legacy booleans and add one explicit safe boundary. */
|
|
38
37
|
export type MonitorInterrupt = boolean | 'after_tool';
|
|
39
38
|
/**
|
|
@@ -56,8 +55,14 @@ export declare function validateFileDelivery(value: unknown): FileDeliveryConfig
|
|
|
56
55
|
export interface CommonPermissions {
|
|
57
56
|
approval: ApprovalMode;
|
|
58
57
|
filesystem: FilesystemMode;
|
|
59
|
-
unattended: UnattendedMode;
|
|
60
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Permission keys that are retired: still accepted in a configuration and ignored, with a startup warning naming the
|
|
61
|
+
* role. `unattended` (deny | wait) is gone because every permission request waits for the Owner (D6).
|
|
62
|
+
*/
|
|
63
|
+
export declare const RETIRED_PERMISSION_KEYS: readonly ["unattended"];
|
|
64
|
+
/** The retired keys present in a role's resolved permission input (role and defaults). */
|
|
65
|
+
export declare function retiredPermissionKeys(defaults: unknown, role: unknown): string[];
|
|
61
66
|
export interface SessionOptions {
|
|
62
67
|
acp?: {
|
|
63
68
|
/** ACP agent command and arguments. Defaults are supplied by the harness adapter. */
|
|
@@ -227,6 +232,8 @@ export interface ResolvedRole extends Omit<RoleConfig, 'model' | 'owner_channel'
|
|
|
227
232
|
* contradict, and must not be warned at.
|
|
228
233
|
*/
|
|
229
234
|
permissionsDeclared: boolean;
|
|
235
|
+
/** Retired permission keys this role's configuration still contains; ignored, warned about at start. */
|
|
236
|
+
retiredPermissions?: string[];
|
|
230
237
|
identity: string;
|
|
231
238
|
model?: string;
|
|
232
239
|
sourceFile: string;
|
package/dist/config.js
CHANGED
|
@@ -43,6 +43,17 @@ export function validateFileDelivery(value) {
|
|
|
43
43
|
throw new ConfigError('file_delivery is retired and ignored; it accepts only the legacy enabled:boolean and directory:string keys');
|
|
44
44
|
return value;
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Permission keys that are retired: still accepted in a configuration and ignored, with a startup warning naming the
|
|
48
|
+
* role. `unattended` (deny | wait) is gone because every permission request waits for the Owner (D6).
|
|
49
|
+
*/
|
|
50
|
+
export const RETIRED_PERMISSION_KEYS = ['unattended'];
|
|
51
|
+
/** The retired keys present in a role's resolved permission input (role and defaults). */
|
|
52
|
+
export function retiredPermissionKeys(defaults, role) {
|
|
53
|
+
const present = (value) => isPlainObject(value) ? Object.keys(value) : [];
|
|
54
|
+
const keys = new Set([...present(defaults), ...present(role)]);
|
|
55
|
+
return RETIRED_PERMISSION_KEYS.filter(key => keys.has(key));
|
|
56
|
+
}
|
|
46
57
|
/** Default wake sources when a role does not list its own. */
|
|
47
58
|
export const DEFAULT_WAKE_SOURCES = ['message_received', 'file_received', 'local_contact_request', 'pending_message'];
|
|
48
59
|
const MONITOR_KEYS = [
|
|
@@ -669,6 +680,7 @@ export function loadConfig(configPath, options = {}) {
|
|
|
669
680
|
const session = resolveSession(r.session ?? defaults.session, file, name);
|
|
670
681
|
const sessionOptions = resolveSessionOptions(defaults.session_options, r.session_options, session, file, name);
|
|
671
682
|
const permissions = resolvePermissions(defaults.permissions, r.permissions, file, name);
|
|
683
|
+
const retiredPermissions = retiredPermissionKeys(defaults.permissions, r.permissions);
|
|
672
684
|
const permissionsDeclared = r.permissions !== undefined || defaults.permissions !== undefined;
|
|
673
685
|
const defaultHarnessOptions = defaults.harness_options;
|
|
674
686
|
if (defaultHarnessOptions !== undefined
|
|
@@ -736,6 +748,7 @@ export function loadConfig(configPath, options = {}) {
|
|
|
736
748
|
session_options: sessionOptions,
|
|
737
749
|
permissions,
|
|
738
750
|
permissionsDeclared,
|
|
751
|
+
...(retiredPermissions.length ? { retiredPermissions } : {}),
|
|
739
752
|
identity: r.identity ?? name,
|
|
740
753
|
model,
|
|
741
754
|
model_chain: modelChain,
|
|
@@ -1136,7 +1149,7 @@ export function resolvePermissions(defaults, role, file = 'config', name = 'role
|
|
|
1136
1149
|
...(defaults ?? {}),
|
|
1137
1150
|
...(role ?? {}),
|
|
1138
1151
|
};
|
|
1139
|
-
const allowed = ['approval', 'filesystem',
|
|
1152
|
+
const allowed = ['approval', 'filesystem', ...RETIRED_PERMISSION_KEYS];
|
|
1140
1153
|
const bad = Object.keys(merged).filter(k => !allowed.includes(k));
|
|
1141
1154
|
if (bad.length)
|
|
1142
1155
|
throw new ConfigError(`${file}: role '${name}' permissions: unknown key(s) ${bad.join(', ')}`);
|
|
@@ -1146,12 +1159,10 @@ export function resolvePermissions(defaults, role, file = 'config', name = 'role
|
|
|
1146
1159
|
if (merged.filesystem !== undefined
|
|
1147
1160
|
&& !['read-only', 'workspace', 'unrestricted'].includes(merged.filesystem))
|
|
1148
1161
|
throw new ConfigError(`${file}: role '${name}' permissions.filesystem must be one of: read-only, workspace, unrestricted`);
|
|
1149
|
-
|
|
1150
|
-
throw new ConfigError(`${file}: role '${name}' permissions.unattended must be one of: deny, wait`);
|
|
1162
|
+
// A retired key is accepted with any value and ignored (see RETIRED_PERMISSION_KEYS).
|
|
1151
1163
|
return {
|
|
1152
1164
|
approval: merged.approval ?? 'ask',
|
|
1153
1165
|
filesystem: merged.filesystem ?? 'workspace',
|
|
1154
|
-
unattended: merged.unattended ?? 'deny',
|
|
1155
1166
|
};
|
|
1156
1167
|
}
|
|
1157
1168
|
/** Validate the top-level `start_stagger_ms` (supervisor launch spacing); default 0. */
|