@ours.network/fleet 2.4.4 → 2.5.1
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 +3 -3
- 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/dist/rooms-tasks/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import { launchFleetWorker, presentFleetWorkerLifecycle } from './external-worke
|
|
|
7
7
|
import { resolveTemplate, snapshotTemplate, } from './templates.js';
|
|
8
8
|
import { parseGroupedMemberArgs, readMembersFile } from './member-overrides.js';
|
|
9
9
|
const MEMBER_ARG_FLAGS = new Set([
|
|
10
|
-
'--member', '--agent-template', '--brain', '--role', '--approval', '--filesystem',
|
|
10
|
+
'--member', '--agent-template', '--brain', '--role', '--approval', '--filesystem',
|
|
11
11
|
'--cwd', '--model', '--effort', '--loops-file', '--no-loops',
|
|
12
12
|
]);
|
|
13
13
|
export function cliMemberOverrides(membersFile, argv = process.argv.slice(2)) {
|
|
@@ -377,7 +377,7 @@ function safePermissionsSummary(definition) {
|
|
|
377
377
|
if (!permissions || typeof permissions !== 'object' || Array.isArray(permissions))
|
|
378
378
|
return undefined;
|
|
379
379
|
const policy = permissions;
|
|
380
|
-
const fields = ['approval', 'filesystem'
|
|
380
|
+
const fields = ['approval', 'filesystem'].flatMap(key => typeof policy[key] === 'string' ? [`${key}=${policy[key]}`] : []);
|
|
381
381
|
return fields.length ? fields.join(',') : undefined;
|
|
382
382
|
}
|
|
383
383
|
function auditTask(operation, task, previousState, newState = task.state, revision) {
|
|
@@ -712,7 +712,6 @@ export function registerTaskCommands(parent, cOpt) {
|
|
|
712
712
|
.option('--role <id>', 'Role preset for the current member block')
|
|
713
713
|
.option('--approval <mode>', 'approval for the current member block')
|
|
714
714
|
.option('--filesystem <mode>', 'filesystem for the current member block')
|
|
715
|
-
.option('--unattended <mode>', 'unattended policy for the current member block')
|
|
716
715
|
.option('--cwd <path>', 'working directory for the current member block')
|
|
717
716
|
.option('--model <id>', 'model for the current member block')
|
|
718
717
|
.option('--effort <level>', 'reasoning effort for the current member block')
|
|
@@ -1016,7 +1015,6 @@ export function registerTaskCommands(parent, cOpt) {
|
|
|
1016
1015
|
.option('--role <id>', 'Role preset for current member')
|
|
1017
1016
|
.option('--approval <mode>', 'approval for current member')
|
|
1018
1017
|
.option('--filesystem <mode>', 'filesystem for current member')
|
|
1019
|
-
.option('--unattended <mode>', 'unattended policy for current member')
|
|
1020
1018
|
.option('--cwd <path>', 'working directory for current member')
|
|
1021
1019
|
.option('--model <id>', 'model for current member')
|
|
1022
1020
|
.option('--effort <level>', 'reasoning effort for current member')
|
|
@@ -1501,7 +1499,6 @@ export function registerTaskCommands(parent, cOpt) {
|
|
|
1501
1499
|
.option('--role <id>', 'Role preset for current member')
|
|
1502
1500
|
.option('--approval <mode>', 'approval for current member')
|
|
1503
1501
|
.option('--filesystem <mode>', 'filesystem for current member')
|
|
1504
|
-
.option('--unattended <mode>', 'unattended policy for current member')
|
|
1505
1502
|
.option('--cwd <path>', 'working directory for current member')
|
|
1506
1503
|
.option('--model <id>', 'model for current member')
|
|
1507
1504
|
.option('--effort <level>', 'reasoning effort for current member')
|
|
@@ -1615,7 +1612,6 @@ export function registerRoomCommands(parent, cOpt) {
|
|
|
1615
1612
|
.option('--role <id>', 'Role preset for current member')
|
|
1616
1613
|
.option('--approval <mode>', 'approval for current member')
|
|
1617
1614
|
.option('--filesystem <mode>', 'filesystem for current member')
|
|
1618
|
-
.option('--unattended <mode>', 'unattended policy for current member')
|
|
1619
1615
|
.option('--cwd <path>', 'working directory for current member')
|
|
1620
1616
|
.option('--model <id>', 'model for current member')
|
|
1621
1617
|
.option('--effort <level>', 'reasoning effort for current member')
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { deleteTaskStatuses } from '../statuses/status-store.js';
|
|
1
2
|
import { eraseMemberArtifacts } from './erasure.js';
|
|
2
3
|
import { assertMemberNotPermanent } from './member-ownership.js';
|
|
3
4
|
import { retireTaskMemberService } from './task-service-retirement.js';
|
|
@@ -273,6 +274,8 @@ export async function settleTaskDeletion(input) {
|
|
|
273
274
|
}
|
|
274
275
|
// Retained To review files go with the task; the pending deletion already refuses new attachments.
|
|
275
276
|
deleteTaskReviewStore(taskId);
|
|
277
|
+
// Statuses associated with the mission go with it; the authors' other statuses stay.
|
|
278
|
+
deleteTaskStatuses(taskId);
|
|
276
279
|
unlinkDeletedTask(taskId);
|
|
277
280
|
}
|
|
278
281
|
catch (error) {
|
|
@@ -7,7 +7,8 @@ export interface MemberOverride {
|
|
|
7
7
|
role?: string;
|
|
8
8
|
approval?: 'ask' | 'auto' | 'allow';
|
|
9
9
|
filesystem?: 'read-only' | 'workspace' | 'unrestricted';
|
|
10
|
-
|
|
10
|
+
/** Retired (D6): accepted in existing member files and records, and ignored. */
|
|
11
|
+
unattended?: unknown;
|
|
11
12
|
cwd?: string;
|
|
12
13
|
model?: string;
|
|
13
14
|
effort?: string;
|
|
@@ -14,7 +14,7 @@ export function hashMemberOverrides(overrides) {
|
|
|
14
14
|
const OPTION_FIELDS = {
|
|
15
15
|
'--agent-template': 'agent_template', '--brain': 'brain', '--role': 'role',
|
|
16
16
|
'--approval': 'approval', '--filesystem': 'filesystem',
|
|
17
|
-
'--
|
|
17
|
+
'--cwd': 'cwd', '--model': 'model', '--effort': 'effort',
|
|
18
18
|
};
|
|
19
19
|
/** Parse only the ordered member-option subsequence supplied by the CLI action. */
|
|
20
20
|
export function parseGroupedMemberArgs(argv) {
|
|
@@ -90,7 +90,6 @@ function validateMemberOverride(value, where) {
|
|
|
90
90
|
throw new Error(`${where}: unknown key '${unknown[0]}'`);
|
|
91
91
|
const allowed = {
|
|
92
92
|
approval: ['ask', 'auto', 'allow'], filesystem: ['read-only', 'workspace', 'unrestricted'],
|
|
93
|
-
unattended: ['deny', 'wait'],
|
|
94
93
|
};
|
|
95
94
|
for (const [key, choices] of Object.entries(allowed))
|
|
96
95
|
if (item[key] !== undefined && !choices.includes(item[key]))
|
|
@@ -154,8 +153,6 @@ export function prepareExecutionPlan(template, cfg, overrides = {}) {
|
|
|
154
153
|
permissions.approval = input.approval;
|
|
155
154
|
if (input.filesystem)
|
|
156
155
|
permissions.filesystem = input.filesystem;
|
|
157
|
-
if (input.unattended)
|
|
158
|
-
permissions.unattended = input.unattended;
|
|
159
156
|
if (Object.keys(permissions).length)
|
|
160
157
|
definition.permissions = permissions;
|
|
161
158
|
if (input.cwd)
|
|
@@ -14,6 +14,13 @@ export interface ContributionItem {
|
|
|
14
14
|
unread: boolean;
|
|
15
15
|
entry_id?: string;
|
|
16
16
|
revision?: number;
|
|
17
|
+
/** The agent that wrote the entry or last changed the package; absent for the local operator. */
|
|
18
|
+
author?: {
|
|
19
|
+
role: string;
|
|
20
|
+
identity_cid?: string;
|
|
21
|
+
};
|
|
22
|
+
/** The current review package is empty: the request was cleared. */
|
|
23
|
+
review_cleared?: boolean;
|
|
17
24
|
}
|
|
18
25
|
/** What one task had when it was listed; the bulk read acknowledges nothing beyond it. */
|
|
19
26
|
export interface ContributionCutoff {
|
|
@@ -38,6 +45,14 @@ export declare function listTaskContributions(options?: {
|
|
|
38
45
|
cutoff: ContributionCutoff[];
|
|
39
46
|
unavailable: number;
|
|
40
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* Every projected Progress entry and current To review package, oldest first, with canonical read state.
|
|
50
|
+
* `unavailable` counts task records that could not be read: their items are missing from `items`.
|
|
51
|
+
*/
|
|
52
|
+
export declare function allTaskContributions(): {
|
|
53
|
+
items: ContributionItem[];
|
|
54
|
+
unavailable: number;
|
|
55
|
+
};
|
|
41
56
|
export type ContributionReadResult = {
|
|
42
57
|
task_id: string;
|
|
43
58
|
} & ({
|
|
@@ -28,6 +28,8 @@ function reviewExcerpt(task) {
|
|
|
28
28
|
return files ? `${files} attached ${files === 1 ? 'file' : 'files'}` : 'The review request was cleared.';
|
|
29
29
|
}
|
|
30
30
|
const time = (at) => { const value = Date.parse(at); return Number.isFinite(value) ? value : 0; };
|
|
31
|
+
const agentAuthor = (author) => author.kind === 'agent'
|
|
32
|
+
? { author: { role: author.role, ...(author.identity_cid ? { identity_cid: author.identity_cid.toUpperCase() } : {}) } } : {};
|
|
31
33
|
function project(task, stamp) {
|
|
32
34
|
const base = {
|
|
33
35
|
task_id: task.task_id, ...(task.key ? { mission_key: task.key } : {}), task_title: task.title, task_state: task.state,
|
|
@@ -35,13 +37,14 @@ function project(task, stamp) {
|
|
|
35
37
|
const reads = task.contribution_reads, seen = new Set(reads?.progress_read);
|
|
36
38
|
const items = (task.progress ?? []).map(entry => ({
|
|
37
39
|
...base, id: `p:${task.task_id}:${entry.id}`, kind: 'progress', at: entry.at, order: time(entry.at),
|
|
38
|
-
excerpt: excerpt(entry.text), unread: !!reads && !seen.has(entry.id), entry_id: entry.id,
|
|
40
|
+
excerpt: excerpt(entry.text), unread: !!reads && !seen.has(entry.id), entry_id: entry.id, ...agentAuthor(entry.author),
|
|
39
41
|
}));
|
|
40
42
|
const unread = contributionUnread(task);
|
|
41
43
|
if (task.review) {
|
|
42
44
|
const revision = reviewRevision(task.review);
|
|
43
45
|
items.push({ ...base, id: `r:${task.task_id}:${revision}`, kind: 'review', at: task.review.updated_at,
|
|
44
|
-
order: time(task.review.updated_at), excerpt: reviewExcerpt(task), unread: unread.review, revision
|
|
46
|
+
order: time(task.review.updated_at), excerpt: reviewExcerpt(task), unread: unread.review, revision, ...agentAuthor(task.review.updated_by),
|
|
47
|
+
...(!task.review.markdown.trim() && !task.review.artifacts.length ? { review_cleared: true } : {}) });
|
|
45
48
|
}
|
|
46
49
|
const progress = task.progress ?? [];
|
|
47
50
|
return { stamp, items, unread: unread.progress + (unread.review ? 1 : 0),
|
|
@@ -150,6 +153,14 @@ export function listTaskContributions(options = {}) {
|
|
|
150
153
|
unavailable,
|
|
151
154
|
};
|
|
152
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Every projected Progress entry and current To review package, oldest first, with canonical read state.
|
|
158
|
+
* `unavailable` counts task records that could not be read: their items are missing from `items`.
|
|
159
|
+
*/
|
|
160
|
+
export function allTaskContributions() {
|
|
161
|
+
const unavailable = refresh();
|
|
162
|
+
return { items: [...index()].reverse().map(({ order: _order, ...item }) => item), unavailable };
|
|
163
|
+
}
|
|
153
164
|
/** Read every task of a captured cutoff up to that cutoff, each under its own lock; one task's outcome never blocks another. */
|
|
154
165
|
export function readTaskContributions(cutoff) {
|
|
155
166
|
return cutoff.map(({ task_id, progress, progress_last, review }) => {
|
package/dist/runner.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { readProvenance } from './creation.js';
|
|
2
|
+
import { sessionIdentityCid, startStatusLedger } from './statuses/status-ledger.js';
|
|
2
3
|
import { firstManagedSessionMayStart, managedRecoveryPath, readManagedRecovery, writeManagedRecovery } from './managed-recovery.js';
|
|
3
4
|
import { StartupTelemetry } from './startup-telemetry.js';
|
|
4
5
|
import { managedStartupPrompt, managedTaskPrompt, worklogRecordsPriorWork } from './startup-prompt.js';
|
|
5
6
|
import { createLayoutControl } from './rooms-tasks/layout-control.js';
|
|
6
7
|
import { TemporaryChatIdle } from './temp-idle.js';
|
|
7
8
|
import { taskSupervisorMayRun, taskMemberRetirementProof } from './task-supervision.js';
|
|
8
|
-
import { prepareManagedAgent, releaseManagedAgent } from './agent-ours/service.js';
|
|
9
|
+
import { prepareManagedAgent, releaseManagedAgent, taskToolBinding } from './agent-ours/service.js';
|
|
10
|
+
import { startPermissionProjection } from './statuses/permission-projection.js';
|
|
9
11
|
import { prepareManagedHarness } from './agent-ours/harness.js';
|
|
10
12
|
import { prepareManagedCliLaunch } from './managed-cli.js';
|
|
11
13
|
import { existsSync, readFileSync, writeFileSync, rmSync, mkdirSync, realpathSync } from 'node:fs';
|
|
@@ -716,12 +718,11 @@ export async function runOnce(name, opts = {}, partialDeps = {}) {
|
|
|
716
718
|
]));
|
|
717
719
|
{
|
|
718
720
|
const perms = role.permissions ?? resolvePermissions(undefined, undefined);
|
|
719
|
-
|
|
720
|
-
//
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
`permission requests are automatically denied once each (reject_once) and the turn continues`);
|
|
721
|
+
void perms;
|
|
722
|
+
// A configuration may still carry the retired `unattended` key: it is ignored, said once at startup.
|
|
723
|
+
for (const key of role.retiredPermissions ?? [])
|
|
724
|
+
deps.log(`[${name}] warning: permissions.${key} is retired and ignored — every permission request `
|
|
725
|
+
+ `waits for the Owner's answer in the session or the feed`);
|
|
725
726
|
startupTelemetry.mark('harness_starting');
|
|
726
727
|
agentSession = await managedService.runtime.startHarness(() => deps.startAgentSession(adapter.agentSession, {
|
|
727
728
|
managedOurs: managedHarness.ours,
|
|
@@ -781,7 +782,15 @@ export async function runOnce(name, opts = {}, partialDeps = {}) {
|
|
|
781
782
|
saveRecovery({ active: activePrompts.size > 0 });
|
|
782
783
|
}
|
|
783
784
|
});
|
|
784
|
-
|
|
785
|
+
// Pending harness permission requests appear in the feed and push until the harness resolves them.
|
|
786
|
+
const permissions = startPermissionProjection(agentSession, { stateDir: dir, binding: () => {
|
|
787
|
+
const cid = sessionIdentityCid(dir);
|
|
788
|
+
if (!cid)
|
|
789
|
+
return undefined;
|
|
790
|
+
const task = taskToolBinding(role, dir, cid);
|
|
791
|
+
return { identityCid: cid, role: role.name, ...(role.identity ? { displayName: role.identity } : {}), ...(task ? { taskId: task.taskId } : {}) };
|
|
792
|
+
} }, line => deps.log(`[${name}] ${line}`));
|
|
793
|
+
unsubscribeRecovery = () => { unsubscribeFailure(); unsubscribeStartup?.(); unsubscribeTelemetry?.(); unsubscribeContinuity?.(); permissions.stop(); };
|
|
785
794
|
if (role.owner_channel) {
|
|
786
795
|
try {
|
|
787
796
|
ownerBinder = await deps.acquireOwnerBinder(dir, name, role.owner_channel.identity);
|
|
@@ -831,6 +840,13 @@ export async function runOnce(name, opts = {}, partialDeps = {}) {
|
|
|
831
840
|
retire: async () => { layoutRetiring = true; await arbiter.close(); },
|
|
832
841
|
}));
|
|
833
842
|
await control.start();
|
|
843
|
+
// The conversation follows the statuses this role's identity authored (published, answered, closed...).
|
|
844
|
+
if (agentSession.recordStatusNotices) {
|
|
845
|
+
const session = agentSession;
|
|
846
|
+
const ledger = startStatusLedger(dir, entries => session.recordStatusNotices(entries), line => deps.log(`[${name}] ${line}`));
|
|
847
|
+
const previous = unsubscribeRecovery;
|
|
848
|
+
unsubscribeRecovery = () => { ledger.stop(); previous?.(); };
|
|
849
|
+
}
|
|
834
850
|
}
|
|
835
851
|
catch (error) {
|
|
836
852
|
await ownerChannel?.close().catch(() => undefined);
|
package/dist/session/acp.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { FileDeliveryInput, CopyChatFile, DeliveredFile } from '../file-delivery/types.js';
|
|
2
2
|
import { type TaskNoticeBinding, type TaskCreatedNotice } from './task-notice.js';
|
|
3
|
+
import { type StatusLedgerEntry } from './status-notice.js';
|
|
3
4
|
import * as acp from '@agentclientprotocol/sdk';
|
|
4
5
|
import type { CommonPermissions } from '../config.js';
|
|
5
6
|
import type { AcpMcpServer } from '../harness/types.js';
|
|
@@ -110,10 +111,6 @@ export interface AcpSessionOptions {
|
|
|
110
111
|
cancelGraceMs?: number;
|
|
111
112
|
/** Test seam for SIGTERM -> SIGKILL escalation after an ignored cancellation. */
|
|
112
113
|
cancelTerminateGraceMs?: number;
|
|
113
|
-
/** How long a pending permission may wait for a human before it expires. */
|
|
114
|
-
permissionTimeoutMs?: number;
|
|
115
|
-
/** Grace after the last controller detaches before the unattended policy applies. */
|
|
116
|
-
controllerGraceMs?: number;
|
|
117
114
|
/** Test seam; production uses AFTER_TOOL_BOUNDARY_TIMEOUT_MS. */
|
|
118
115
|
afterToolBoundaryTimeoutMs?: number;
|
|
119
116
|
/** Test seam; production uses STEERING_OCCUPANCY_IDLE_MS. */
|
|
@@ -171,10 +168,7 @@ export declare class AcpSession implements AgentSession {
|
|
|
171
168
|
private agentCapabilities?;
|
|
172
169
|
private runtimeModel?;
|
|
173
170
|
private reasoningEffort?;
|
|
174
|
-
private controllerCount;
|
|
175
171
|
private closing;
|
|
176
|
-
/** Armed when the last controller detaches; unattended policy applies on fire. */
|
|
177
|
-
private controllerGrace?;
|
|
178
172
|
private cancelEscalation?;
|
|
179
173
|
private cancelForceKill?;
|
|
180
174
|
private cancelRecoveryReason?;
|
|
@@ -363,13 +357,14 @@ export declare class AcpSession implements AgentSession {
|
|
|
363
357
|
respondPermissionV2(permissionId: string, optionId: string, sessionGeneration: string): 'accepted' | 'stale';
|
|
364
358
|
eventsSince(seq: number): SessionEvent[];
|
|
365
359
|
subscribe(listener: (event: SessionEvent) => void): () => void;
|
|
366
|
-
setControllerAttached(attached: boolean): void;
|
|
367
|
-
private armControllerGrace;
|
|
368
360
|
/**
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
|
|
372
|
-
|
|
361
|
+
* Controllers come and go; a pending permission request never depends on one being attached. It waits for the
|
|
362
|
+
* Owner's answer (session or feed) until the turn or session really ends (D6).
|
|
363
|
+
*/
|
|
364
|
+
setControllerAttached(_attached: boolean): void;
|
|
365
|
+
/**
|
|
366
|
+
* End one pending request because its turn or session really ended (cancel, close, a withdrawn tool call), and
|
|
367
|
+
* leave the same durable evidence a decision would. It is never a decision: the agent sees it as cancelled.
|
|
373
368
|
*/
|
|
374
369
|
private settlePendingAutomatically;
|
|
375
370
|
exitResult(): ExitRecord | null;
|
|
@@ -394,22 +389,6 @@ export declare class AcpSession implements AgentSession {
|
|
|
394
389
|
private runSinglePrompt;
|
|
395
390
|
private steerPrompt;
|
|
396
391
|
private requestPermission;
|
|
397
|
-
/**
|
|
398
|
-
* Resolve a permission request from policy alone and leave a record of it.
|
|
399
|
-
* Nothing else in the system can observe an automatic decision, so an
|
|
400
|
-
* unrecorded one is indistinguishable from a request that was never made.
|
|
401
|
-
*/
|
|
402
|
-
private settleAutomatically;
|
|
403
|
-
private withinAutomaticBoundary;
|
|
404
|
-
/**
|
|
405
|
-
* Codex ACP 1.1.7 marks its protected MCP elicitation bridge on a locationless
|
|
406
|
-
* execute request. The marker is meaningful only together with the runner's
|
|
407
|
-
* independently supplied, adapter-authenticated metadata vocabulary and effective
|
|
408
|
-
* mode: an arbitrary ACP process cannot gain this path by copying `_meta` alone.
|
|
409
|
-
* Exact option ids/kinds bind recognition to the protected-MCP shape and keep
|
|
410
|
-
* malformed requests on the ordinary fail-closed path.
|
|
411
|
-
*/
|
|
412
|
-
private isEffectiveCodexProtectedMcpApproval;
|
|
413
392
|
/** Pinned codex-acp 1.1.7 structured metadata, never stderr or assistant text. */
|
|
414
393
|
private recordStallMetadata;
|
|
415
394
|
private recordUpdate;
|
|
@@ -425,6 +404,7 @@ export declare class AcpSession implements AgentSession {
|
|
|
425
404
|
private recordConversationUpdate;
|
|
426
405
|
taskNoticeBinding(): TaskNoticeBinding | undefined;
|
|
427
406
|
recordTaskCreated(binding: TaskNoticeBinding, notice: TaskCreatedNotice): void;
|
|
407
|
+
recordStatusNotices(entries: StatusLedgerEntry[]): number;
|
|
428
408
|
conversationPage(request?: {
|
|
429
409
|
after?: string;
|
|
430
410
|
limit?: number;
|