@skrr-ai/cli 0.1.211 → 0.1.213
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/dist/commands/duties/action-proposal.js +2 -1
- package/dist/commands/duties/action-proposals.d.ts +1 -0
- package/dist/commands/duties/action-proposals.js +8 -0
- package/dist/commands/tasks/expectations.js +2 -2
- package/dist/commands/tasks/review-queue.js +1 -1
- package/dist/lib/duties.js +4 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/managedWorkRuntime.d.ts +21 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/managedWorkRuntime.js +20 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.d.ts +41 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.js +282 -9
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/runtime.d.ts +5 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/managedWorkRuntime.d.ts +21 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/managedWorkRuntime.js +26 -10
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.d.ts +41 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.js +460 -18
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/runtime.d.ts +5 -0
- package/dist/node_modules/@skrr-ai/data-provider/index.js +10003 -9996
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
|
@@ -4,6 +4,7 @@ const core_1 = require("@oclif/core");
|
|
|
4
4
|
const base_command_1 = require("../../base-command");
|
|
5
5
|
const duties_1 = require("../../lib/duties");
|
|
6
6
|
const duty_history_source_1 = require("../../lib/duty-history-source");
|
|
7
|
+
const action_proposals_1 = require("./action-proposals");
|
|
7
8
|
const ACTION_PROPOSAL_UNAVAILABLE = 'Action proposals are unavailable because their source cannot be verified.';
|
|
8
9
|
/** Read the exact Action Bundle execution receipt before any retry. */
|
|
9
10
|
class DutiesActionProposal extends base_command_1.BaseCommand {
|
|
@@ -37,7 +38,7 @@ class DutiesActionProposal extends base_command_1.BaseCommand {
|
|
|
37
38
|
else {
|
|
38
39
|
const proposal = result.proposal;
|
|
39
40
|
const execution = result.execution;
|
|
40
|
-
this.log(`Action Bundle: ${
|
|
41
|
+
this.log(`Action Bundle: ${proposal?.status ? (0, action_proposals_1.proposalStatusLabel)(proposal) : 'unknown'}`);
|
|
41
42
|
this.log(`Operation: ${String(execution?.operationId || 'unavailable')}`);
|
|
42
43
|
const receipt = execution?.receipt;
|
|
43
44
|
this.log(`Receipt: ${String(receipt?.state || 'unknown')}`);
|
|
@@ -5,6 +5,7 @@ import { BaseCommand } from '../../base-command';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function proposalStatusLabel(proposal: {
|
|
7
7
|
status?: string;
|
|
8
|
+
voidedBy?: string;
|
|
8
9
|
executionReceipt?: Record<string, unknown>;
|
|
9
10
|
}): string;
|
|
10
11
|
export default class DutiesActionProposals extends BaseCommand {
|
|
@@ -6,11 +6,19 @@ const data_provider_1 = require("@skrr-ai/data-provider");
|
|
|
6
6
|
const base_command_1 = require("../../base-command");
|
|
7
7
|
const duties_1 = require("../../lib/duties");
|
|
8
8
|
const format_1 = require("../../lib/format");
|
|
9
|
+
/** Why a held bundle the Duty no longer accepts can never be approved or run (`voidedBy`, OSK-33415). */
|
|
10
|
+
const VOIDED_BY_LABEL = {
|
|
11
|
+
duty_not_active: 'void: Duty not active',
|
|
12
|
+
duty_version_changed: 'void: Duty changed since',
|
|
13
|
+
};
|
|
9
14
|
/**
|
|
10
15
|
* An approved bundle waiting out the owner's quiet hours reads as held, with
|
|
11
16
|
* the instant it sends, never as a bare `approved` that looks stuck.
|
|
12
17
|
*/
|
|
13
18
|
function proposalStatusLabel(proposal) {
|
|
19
|
+
if (proposal.voidedBy && (proposal.status === 'proposed' || proposal.status === 'approved')) {
|
|
20
|
+
return VOIDED_BY_LABEL[proposal.voidedBy] || `void: ${proposal.voidedBy}`;
|
|
21
|
+
}
|
|
14
22
|
const hold = proposal.executionReceipt?.hold;
|
|
15
23
|
if (proposal.status === 'approved' && hold?.until) {
|
|
16
24
|
return `held until ${hold.untilLabel || hold.until}`;
|
|
@@ -91,7 +91,7 @@ function assessorSuffix(expectation) {
|
|
|
91
91
|
if (!['met', 'waived', 'unmet'].includes(expectation.state))
|
|
92
92
|
return '';
|
|
93
93
|
// A person's judgement names its channel, then any tool their CLI declared, marked as declared.
|
|
94
|
-
return ` (${(0, task_closure_1.describeAssessor)(expectation.assessedByKind, expectation.assessedByVia, expectation.assessedByDeclaredTool)})`;
|
|
94
|
+
return ` (${(0, task_closure_1.describeAssessor)(expectation.assessedByKind, expectation.assessedByVia, expectation.assessedByDeclaredTool, { coordinator: expectation.assessedByCoordinator })})`;
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
97
|
* A judgement made about a Result that is no longer the current one (OSK-15431).
|
|
@@ -226,7 +226,7 @@ class TasksExpectations extends base_command_1.BaseCommand {
|
|
|
226
226
|
`${rejectedRows.length === 1 ? 'it' : 'them'}:`);
|
|
227
227
|
for (const row of rejectedRows) {
|
|
228
228
|
const who = row.assessedByKind
|
|
229
|
-
? ` by ${(0, task_closure_1.describeAssessor)(row.assessedByKind, row.assessedByVia, row.assessedByDeclaredTool)}`
|
|
229
|
+
? ` by ${(0, task_closure_1.describeAssessor)(row.assessedByKind, row.assessedByVia, row.assessedByDeclaredTool, { coordinator: row.assessedByCoordinator })}`
|
|
230
230
|
: '';
|
|
231
231
|
const when = row.assessedAt ? ` on ${String(row.assessedAt).slice(0, 10)}` : '';
|
|
232
232
|
this.log(` ${row.id}${who}${when}${row.reason ? `: ${row.reason}` : ''}`);
|
|
@@ -256,7 +256,7 @@ class TasksReviewQueue extends base_command_1.BaseCommand {
|
|
|
256
256
|
? ` on ${String(expectation.assessedAt).slice(0, 10)}`
|
|
257
257
|
: '';
|
|
258
258
|
const why = expectation.reason ? `: ${expectation.reason}` : '';
|
|
259
|
-
const who = (0, task_closure_1.describeAssessor)(expectation.assessedByKind, expectation.assessedByVia, expectation.assessedByDeclaredTool);
|
|
259
|
+
const who = (0, task_closure_1.describeAssessor)(expectation.assessedByKind, expectation.assessedByVia, expectation.assessedByDeclaredTool, { coordinator: expectation.assessedByCoordinator });
|
|
260
260
|
this.log(` ${decision} by ${who}${when}${why}`);
|
|
261
261
|
}
|
|
262
262
|
if (expectation.evidenceLevel) {
|
package/dist/lib/duties.js
CHANGED
|
@@ -2768,7 +2768,8 @@ function renderDutyCases(response, log, options = {}) {
|
|
|
2768
2768
|
id: text(item.id),
|
|
2769
2769
|
status: text(item.status),
|
|
2770
2770
|
severity: text(item.severity),
|
|
2771
|
-
|
|
2771
|
+
// A Case's subject in words when the server could read one (OSK-33346); its key otherwise.
|
|
2772
|
+
subject: text(firstValue(item, ['subjectTitle', 'subjectKey', 'kind']), ''),
|
|
2772
2773
|
facts: text(item.factCount, '0'),
|
|
2773
2774
|
hypotheses: text(item.hypothesisCount, '0'),
|
|
2774
2775
|
receipts: text(item.receiptCount, '0'),
|
|
@@ -2802,7 +2803,8 @@ function renderDutyCaseDetail(response, log, options = {}) {
|
|
|
2802
2803
|
}
|
|
2803
2804
|
const maxEntries = options.maxEntries ?? 10;
|
|
2804
2805
|
log(`Case: ${text(data.id)} (${text(data.status)})`);
|
|
2805
|
-
|
|
2806
|
+
const subjectTitle = text(data.subjectTitle, '');
|
|
2807
|
+
log(`Subject: ${subjectTitle ? `${subjectTitle} (${text(data.subjectKey, '-')})` : text(data.subjectKey, '-')} · kind ${text(data.kind, '-')}`);
|
|
2806
2808
|
log(`Severity: ${text(data.severity, '-')} · revision ${text(data.caseRevision, '-')} · epoch ${text(data.activeEpoch, '-')}`);
|
|
2807
2809
|
log(`Detected: ${text(data.firstDetectedAt, '-')} · last observed ${text(data.lastObservedAt, '-')}`);
|
|
2808
2810
|
log(`Contents: ${text(data.factCount, '0')} facts · ${text(data.hypothesisCount, '0')} hypotheses · ${text(data.actionCount, '0')} actions · ${text(data.receiptCount, '0')} receipts`);
|
|
@@ -10,9 +10,23 @@ export declare const MANAGED_WORK_ACP_CAPABILITY: {
|
|
|
10
10
|
export declare const MANAGED_WORK_ACP_MANAGER = "managed_work_acp_manager_v1";
|
|
11
11
|
export declare const MANAGED_WORK_ACP_WORKER = "managed_work_acp_worker_v1";
|
|
12
12
|
export declare const MANAGED_WORK_ACP_RECORDS = "managed_work_acp_task_records_v1";
|
|
13
|
+
/**
|
|
14
|
+
* The interaction roles in which the model is offered NO tool and answers once: a Task coordinator
|
|
15
|
+
* turn (`task_coordinator`) and a glance at a message beside running work (`chat_glance`). Neither
|
|
16
|
+
* is implied by the manager profile an adapter enforces, so each adapter names the ones it runs
|
|
17
|
+
* (`answerOnlyRoles`). An adapter that does not name a role is refused it by the server and by the
|
|
18
|
+
* daemon, and the caller falls back: a coordinator to the platform's template, a glance to a cloud
|
|
19
|
+
* reply when its owner allowed one, otherwise the message is held until the work ends.
|
|
20
|
+
*
|
|
21
|
+
* The first-party ACP engine names none. Its manager profile is a closed role enum, which in
|
|
22
|
+
* 0.1.0-rc.13 is `main_manager`, `task_reporter` and `task_discussion`, so it rejects both of these
|
|
23
|
+
* before its model runs. Add a role here only with an engine release whose enum holds it.
|
|
24
|
+
*/
|
|
25
|
+
export declare const MANAGED_WORK_ANSWER_ONLY_ROLES: readonly ["task_coordinator", "chat_glance"];
|
|
26
|
+
export type ManagedWorkAnswerOnlyRole = (typeof MANAGED_WORK_ANSWER_ONLY_ROLES)[number];
|
|
13
27
|
export declare function managedWorkAdapter(provider: unknown): {
|
|
14
28
|
readonly engine: "sdk";
|
|
15
|
-
readonly
|
|
29
|
+
readonly answerOnlyRoles: readonly ["task_coordinator", "chat_glance"];
|
|
16
30
|
readonly manager: readonly ["native_interaction_profiles_v1", "sdk_pre_tool_use_exact_allowlist"];
|
|
17
31
|
readonly worker: readonly ["native_task_work_controls_v1", "sdk_pre_tool_use_task_work_controls"];
|
|
18
32
|
readonly taskRecords: readonly ["native_task_record_applicability_v1", "sdk_pre_tool_use_task_record_applicability"];
|
|
@@ -24,7 +38,7 @@ export declare function managedWorkAdapter(provider: unknown): {
|
|
|
24
38
|
readonly taskRecords: readonly ["managed_work_acp_task_records_v1", "acp_task_record_applicability"];
|
|
25
39
|
} | {
|
|
26
40
|
readonly engine: "app-server";
|
|
27
|
-
readonly
|
|
41
|
+
readonly answerOnlyRoles: readonly ["task_coordinator", "chat_glance"];
|
|
28
42
|
readonly freshSession: true;
|
|
29
43
|
readonly toolTransport: "daemon_rpc";
|
|
30
44
|
readonly manager: readonly ["managed_work_codex_manager_v1", "app_server_scoped_dynamic_tools"];
|
|
@@ -32,14 +46,18 @@ export declare function managedWorkAdapter(provider: unknown): {
|
|
|
32
46
|
readonly taskRecords: readonly ["managed_work_codex_task_records_v1", "app_server_canonical_task_records"];
|
|
33
47
|
} | {
|
|
34
48
|
readonly engine: "rpc";
|
|
35
|
-
readonly
|
|
49
|
+
readonly answerOnlyRoles: readonly ["task_coordinator", "chat_glance"];
|
|
36
50
|
readonly freshSession: true;
|
|
37
51
|
readonly toolTransport: "daemon_rpc";
|
|
38
52
|
readonly manager: readonly ["managed_work_pi_manager_v1", "pi_rpc_exact_tool_scope"];
|
|
39
53
|
readonly worker: readonly ["managed_work_pi_worker_v1", "pi_rpc_governed_work_tools"];
|
|
40
54
|
readonly taskRecords: readonly ["managed_work_pi_task_records_v1", "pi_rpc_canonical_task_records"];
|
|
41
55
|
} | undefined;
|
|
56
|
+
/** Whether this harness can run `role`, one of the answer-only roles, with no tool offered to its model. */
|
|
57
|
+
export declare function managedWorkSupportsAnswerOnlyRole(provider: unknown, role: unknown): boolean;
|
|
42
58
|
/** Whether this harness can run a Task coordinator turn with no tool offered to its model. */
|
|
43
59
|
export declare function managedWorkSupportsTaskCoordinator(provider: unknown): boolean;
|
|
60
|
+
/** Whether this harness can run a glance (`chat_glance`) with no tool offered to its model. */
|
|
61
|
+
export declare function managedWorkSupportsChatGlance(provider: unknown): boolean;
|
|
44
62
|
export declare function managedWorkCapabilities(provider: string): string[];
|
|
45
63
|
export declare function advertisesManagedWorkAcp(value: unknown, worker: boolean, records: boolean): boolean;
|
|
@@ -23,9 +23,12 @@ __export(managedWorkRuntime_exports, {
|
|
|
23
23
|
MANAGED_WORK_ACP_META: () => MANAGED_WORK_ACP_META,
|
|
24
24
|
MANAGED_WORK_ACP_RECORDS: () => MANAGED_WORK_ACP_RECORDS,
|
|
25
25
|
MANAGED_WORK_ACP_WORKER: () => MANAGED_WORK_ACP_WORKER,
|
|
26
|
+
MANAGED_WORK_ANSWER_ONLY_ROLES: () => MANAGED_WORK_ANSWER_ONLY_ROLES,
|
|
26
27
|
advertisesManagedWorkAcp: () => advertisesManagedWorkAcp,
|
|
27
28
|
managedWorkAdapter: () => managedWorkAdapter,
|
|
28
29
|
managedWorkCapabilities: () => managedWorkCapabilities,
|
|
30
|
+
managedWorkSupportsAnswerOnlyRole: () => managedWorkSupportsAnswerOnlyRole,
|
|
31
|
+
managedWorkSupportsChatGlance: () => managedWorkSupportsChatGlance,
|
|
29
32
|
managedWorkSupportsTaskCoordinator: () => managedWorkSupportsTaskCoordinator
|
|
30
33
|
});
|
|
31
34
|
module.exports = __toCommonJS(managedWorkRuntime_exports);
|
|
@@ -40,10 +43,11 @@ const MANAGED_WORK_ACP_CAPABILITY = {
|
|
|
40
43
|
const MANAGED_WORK_ACP_MANAGER = "managed_work_acp_manager_v1";
|
|
41
44
|
const MANAGED_WORK_ACP_WORKER = "managed_work_acp_worker_v1";
|
|
42
45
|
const MANAGED_WORK_ACP_RECORDS = "managed_work_acp_task_records_v1";
|
|
46
|
+
const MANAGED_WORK_ANSWER_ONLY_ROLES = ["task_coordinator", "chat_glance"];
|
|
43
47
|
const adapters = {
|
|
44
48
|
claude: {
|
|
45
49
|
engine: "sdk",
|
|
46
|
-
|
|
50
|
+
answerOnlyRoles: MANAGED_WORK_ANSWER_ONLY_ROLES,
|
|
47
51
|
manager: ["native_interaction_profiles_v1", "sdk_pre_tool_use_exact_allowlist"],
|
|
48
52
|
worker: ["native_task_work_controls_v1", "sdk_pre_tool_use_task_work_controls"],
|
|
49
53
|
taskRecords: [
|
|
@@ -60,7 +64,7 @@ const adapters = {
|
|
|
60
64
|
},
|
|
61
65
|
codex: {
|
|
62
66
|
engine: "app-server",
|
|
63
|
-
|
|
67
|
+
answerOnlyRoles: MANAGED_WORK_ANSWER_ONLY_ROLES,
|
|
64
68
|
freshSession: true,
|
|
65
69
|
toolTransport: "daemon_rpc",
|
|
66
70
|
manager: ["managed_work_codex_manager_v1", "app_server_scoped_dynamic_tools"],
|
|
@@ -69,7 +73,7 @@ const adapters = {
|
|
|
69
73
|
},
|
|
70
74
|
pi: {
|
|
71
75
|
engine: "rpc",
|
|
72
|
-
|
|
76
|
+
answerOnlyRoles: MANAGED_WORK_ANSWER_ONLY_ROLES,
|
|
73
77
|
freshSession: true,
|
|
74
78
|
toolTransport: "daemon_rpc",
|
|
75
79
|
manager: ["managed_work_pi_manager_v1", "pi_rpc_exact_tool_scope"],
|
|
@@ -83,9 +87,17 @@ function managedWorkAdapter(provider) {
|
|
|
83
87
|
const name = ["claude-code", "claude_code", "local-claude-code"].includes(provider) ? "claude" : (0, import_firstPartyHarness.canonicalHarnessProvider)(provider);
|
|
84
88
|
return Object.hasOwn(adapters, name) ? adapters[name] : void 0;
|
|
85
89
|
}
|
|
86
|
-
function
|
|
90
|
+
function managedWorkSupportsAnswerOnlyRole(provider, role) {
|
|
87
91
|
const adapter = managedWorkAdapter(provider);
|
|
88
|
-
|
|
92
|
+
if (!adapter || !("answerOnlyRoles" in adapter))
|
|
93
|
+
return false;
|
|
94
|
+
return adapter.answerOnlyRoles.includes(role);
|
|
95
|
+
}
|
|
96
|
+
function managedWorkSupportsTaskCoordinator(provider) {
|
|
97
|
+
return managedWorkSupportsAnswerOnlyRole(provider, "task_coordinator");
|
|
98
|
+
}
|
|
99
|
+
function managedWorkSupportsChatGlance(provider) {
|
|
100
|
+
return managedWorkSupportsAnswerOnlyRole(provider, "chat_glance");
|
|
89
101
|
}
|
|
90
102
|
function managedWorkCapabilities(provider) {
|
|
91
103
|
const adapter = managedWorkAdapter(provider);
|
|
@@ -104,8 +116,11 @@ function advertisesManagedWorkAcp(value, worker, records) {
|
|
|
104
116
|
MANAGED_WORK_ACP_META,
|
|
105
117
|
MANAGED_WORK_ACP_RECORDS,
|
|
106
118
|
MANAGED_WORK_ACP_WORKER,
|
|
119
|
+
MANAGED_WORK_ANSWER_ONLY_ROLES,
|
|
107
120
|
advertisesManagedWorkAcp,
|
|
108
121
|
managedWorkAdapter,
|
|
109
122
|
managedWorkCapabilities,
|
|
123
|
+
managedWorkSupportsAnswerOnlyRole,
|
|
124
|
+
managedWorkSupportsChatGlance,
|
|
110
125
|
managedWorkSupportsTaskCoordinator
|
|
111
126
|
});
|
|
@@ -1,4 +1,42 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
1
2
|
import { type ReauthState, type TokenPair } from './types.js';
|
|
3
|
+
interface PendingLockFsCall {
|
|
4
|
+
op: string;
|
|
5
|
+
path?: string;
|
|
6
|
+
startedAt: number;
|
|
7
|
+
}
|
|
8
|
+
interface LockAcquireState {
|
|
9
|
+
/** Callback-style calls proper-lockfile made whose callback has not run. */
|
|
10
|
+
pending: Set<PendingLockFsCall>;
|
|
11
|
+
/** Set when the deadline passes; from then on it makes no file-system call. */
|
|
12
|
+
abandoned: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* mkdir calls of the lock directory: one per retry attempt, plus one more
|
|
15
|
+
* inside an attempt after a stale takeover or a stat that found no directory.
|
|
16
|
+
*/
|
|
17
|
+
mkdirCalls: number;
|
|
18
|
+
/** When it started, which is when its deadline started. */
|
|
19
|
+
startedAt: number;
|
|
20
|
+
}
|
|
21
|
+
export declare const __authLockTesting: {
|
|
22
|
+
acquireDeadlineMs: number;
|
|
23
|
+
asyncFsProbeMs: number;
|
|
24
|
+
/**
|
|
25
|
+
* The `fs` proper-lockfile uses: Node's own. Its default, graceful-fs 4.2,
|
|
26
|
+
* retries EMFILE only for open, readFile, writeFile, appendFile, copyFile and
|
|
27
|
+
* readdir, none of which it calls; for realpath, mkdir, stat, utimes and
|
|
28
|
+
* rmdir graceful-fs changes only how `stat` reports a negative uid or gid.
|
|
29
|
+
*/
|
|
30
|
+
fs: typeof fs;
|
|
31
|
+
lockPaths: Map<string, {
|
|
32
|
+
blockers: Set<unknown>;
|
|
33
|
+
passedOver: Set<unknown>;
|
|
34
|
+
waiters: Set<unknown>;
|
|
35
|
+
}>;
|
|
36
|
+
probes: Map<string, unknown>;
|
|
37
|
+
/** The wrapper every proper-lockfile call goes through (`trackedLockFs`). */
|
|
38
|
+
trackFs(base: typeof fs, state: LockAcquireState, onPendingChange: () => void): typeof fs;
|
|
39
|
+
};
|
|
2
40
|
declare function authLockPath(): string;
|
|
3
41
|
declare function reauthFlagPath(): string;
|
|
4
42
|
/**
|
|
@@ -89,8 +127,9 @@ export interface LockExitHandlerOptions {
|
|
|
89
127
|
export declare function installLockExitHandlers(options?: LockExitHandlerOptions): void;
|
|
90
128
|
/**
|
|
91
129
|
* Acquire the cross-process auth lock, run the body, release on `finally`.
|
|
92
|
-
* Throws
|
|
93
|
-
* `
|
|
130
|
+
* Throws ELOCKED once proper-lockfile's retries are spent (about 19 s), and a
|
|
131
|
+
* `TransientAuthFailure` if the acquire is still pending at
|
|
132
|
+
* `LOCK_ACQUIRE_DEADLINE_MS` (OSK-33422).
|
|
94
133
|
*
|
|
95
134
|
* We lock a sentinel file (auth.lock) that we create/touch if missing —
|
|
96
135
|
* locking the real auth.json would race with atomic-rename writes.
|
|
@@ -32,6 +32,7 @@ __export(refresh_exports, {
|
|
|
32
32
|
LOCK_SIGNAL_FALLBACK_EXIT_MS: () => LOCK_SIGNAL_FALLBACK_EXIT_MS,
|
|
33
33
|
REAUTH_FLAG_PATH_FN: () => reauthFlagPath,
|
|
34
34
|
UNKNOWN_401_BUDGET: () => UNKNOWN_401_BUDGET,
|
|
35
|
+
__authLockTesting: () => __authLockTesting,
|
|
35
36
|
__refreshDiagnostics: () => __refreshDiagnostics,
|
|
36
37
|
__resetUnknown401StreaksForTest: () => __resetUnknown401StreaksForTest,
|
|
37
38
|
clearReauthState: () => clearReauthState,
|
|
@@ -58,6 +59,285 @@ const REVOKE_DAEMON_REFRESH_SESSION_REPORTED_RE = /\/+$/;
|
|
|
58
59
|
const LOCK_STALE_MS = 5e3;
|
|
59
60
|
const LOCK_RETRY_MS = 100;
|
|
60
61
|
const LOCK_MAX_RETRIES = 50;
|
|
62
|
+
const LOCK_ACQUIRE_DEADLINE_MS = 6e4;
|
|
63
|
+
const LOCK_ASYNC_FS_PROBE_MS = 1e3;
|
|
64
|
+
const CALLS_UNSAFE_TO_OUTLIVE = /* @__PURE__ */ new Set(["rmdir", "utimes"]);
|
|
65
|
+
const MAX_PASSED_OVER = 1;
|
|
66
|
+
const lockPaths = /* @__PURE__ */ new Map();
|
|
67
|
+
const probeStats = /* @__PURE__ */ new Map();
|
|
68
|
+
const __authLockTesting = {
|
|
69
|
+
acquireDeadlineMs: LOCK_ACQUIRE_DEADLINE_MS,
|
|
70
|
+
asyncFsProbeMs: LOCK_ASYNC_FS_PROBE_MS,
|
|
71
|
+
fs: import_node_fs.default,
|
|
72
|
+
lockPaths,
|
|
73
|
+
probes: probeStats,
|
|
74
|
+
trackFs: (base, state, onPendingChange) => trackedLockFs(base, state, onPendingChange)
|
|
75
|
+
};
|
|
76
|
+
function abandonedError(op) {
|
|
77
|
+
return Object.assign(new Error(`The auth lock acquire was abandoned at its deadline (${op})`), {
|
|
78
|
+
code: "EABANDONED"
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function trackedLockFs(base, state, onPendingChange) {
|
|
82
|
+
return new Proxy(base, {
|
|
83
|
+
get(target, prop, receiver) {
|
|
84
|
+
const value = Reflect.get(target, prop, receiver);
|
|
85
|
+
if (typeof value !== "function")
|
|
86
|
+
return value;
|
|
87
|
+
return (...args) => {
|
|
88
|
+
const callback = args[args.length - 1];
|
|
89
|
+
if (typeof callback !== "function")
|
|
90
|
+
return Reflect.apply(value, target, args);
|
|
91
|
+
const op = String(prop);
|
|
92
|
+
const answer = callback;
|
|
93
|
+
if (state.abandoned) {
|
|
94
|
+
process.nextTick(answer, abandonedError(op));
|
|
95
|
+
return void 0;
|
|
96
|
+
}
|
|
97
|
+
if (op === "mkdir")
|
|
98
|
+
state.mkdirCalls += 1;
|
|
99
|
+
const call = {
|
|
100
|
+
op,
|
|
101
|
+
...typeof args[0] === "string" ? { path: args[0] } : {},
|
|
102
|
+
startedAt: Date.now()
|
|
103
|
+
};
|
|
104
|
+
state.pending.add(call);
|
|
105
|
+
const settle = () => {
|
|
106
|
+
state.pending.delete(call);
|
|
107
|
+
onPendingChange();
|
|
108
|
+
};
|
|
109
|
+
args[args.length - 1] = (...result) => {
|
|
110
|
+
settle();
|
|
111
|
+
if (state.abandoned) {
|
|
112
|
+
answer(abandonedError(op));
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
answer(...result);
|
|
116
|
+
};
|
|
117
|
+
try {
|
|
118
|
+
return Reflect.apply(value, target, args);
|
|
119
|
+
} catch (err) {
|
|
120
|
+
settle();
|
|
121
|
+
throw err;
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
async function probeAsyncFs(base, dir, ms) {
|
|
128
|
+
let probe = probeStats.get(dir);
|
|
129
|
+
const reusedAfterMs = probe ? Date.now() - probe.startedAt : null;
|
|
130
|
+
if (!probe) {
|
|
131
|
+
const started = {
|
|
132
|
+
answer: base.promises.stat(dir).then(() => "answered", () => "failed"),
|
|
133
|
+
startedAt: Date.now()
|
|
134
|
+
};
|
|
135
|
+
probeStats.set(dir, started);
|
|
136
|
+
void started.answer.then(() => {
|
|
137
|
+
if (probeStats.get(dir) === started)
|
|
138
|
+
probeStats.delete(dir);
|
|
139
|
+
});
|
|
140
|
+
probe = started;
|
|
141
|
+
}
|
|
142
|
+
let timer;
|
|
143
|
+
const noAnswer = new Promise((resolve) => {
|
|
144
|
+
timer = setTimeout(() => resolve("no_answer"), ms);
|
|
145
|
+
});
|
|
146
|
+
try {
|
|
147
|
+
return { result: await Promise.race([probe.answer, noAnswer]), reusedAfterMs };
|
|
148
|
+
} finally {
|
|
149
|
+
clearTimeout(timer);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
function asyncFsProbeText(probe, ms) {
|
|
153
|
+
if (probe.result === "answered")
|
|
154
|
+
return "an async stat of the auth config directory answered";
|
|
155
|
+
if (probe.result === "failed")
|
|
156
|
+
return "an async stat of the auth config directory failed";
|
|
157
|
+
return probe.reusedAfterMs === null ? `a fresh async stat of the auth config directory did not answer within ${ms} ms` : `an async stat of the auth config directory started ${formatLockWait(probe.reusedAfterMs)} ago has still not answered`;
|
|
158
|
+
}
|
|
159
|
+
function describePendingCalls(pending, now) {
|
|
160
|
+
const calls = [...pending].sort((a, b) => a.startedAt - b.startedAt).map((call) => ({
|
|
161
|
+
op: call.op,
|
|
162
|
+
...call.path ? { file: import_node_path.default.basename(call.path) } : {},
|
|
163
|
+
pendingMs: now - call.startedAt
|
|
164
|
+
}));
|
|
165
|
+
const text = calls.map((call) => `${call.op}${call.file ? ` ${call.file}` : ""} (${call.pendingMs} ms)`).join(", ");
|
|
166
|
+
return { calls, text };
|
|
167
|
+
}
|
|
168
|
+
async function acquireAuthLock(lockPath, daemonId) {
|
|
169
|
+
const { acquireDeadlineMs, asyncFsProbeMs, fs: baseFs } = __authLockTesting;
|
|
170
|
+
(0, import_liveState.assertMayMutateLiveState)(`${lockPath}.lock`, "take the auth lock");
|
|
171
|
+
const arrivedAt = Date.now();
|
|
172
|
+
const probe = () => probeAsyncFs(baseFs, import_node_path.default.dirname(lockPath), asyncFsProbeMs);
|
|
173
|
+
const pathState = lockPaths.get(lockPath) ?? {
|
|
174
|
+
blockers: /* @__PURE__ */ new Set(),
|
|
175
|
+
passedOver: /* @__PURE__ */ new Set(),
|
|
176
|
+
waiters: /* @__PURE__ */ new Set()
|
|
177
|
+
};
|
|
178
|
+
lockPaths.set(lockPath, pathState);
|
|
179
|
+
if (pathState.blockers.size > 0) {
|
|
180
|
+
const outcome = await waitForBlockers(pathState, acquireDeadlineMs, probe);
|
|
181
|
+
if (outcome !== "clear") {
|
|
182
|
+
const waitedMs2 = Date.now() - arrivedAt;
|
|
183
|
+
throw lockAcquireTimeout({
|
|
184
|
+
lockPath,
|
|
185
|
+
daemonId,
|
|
186
|
+
waitedMs: waitedMs2,
|
|
187
|
+
queuedMs: waitedMs2,
|
|
188
|
+
mkdirCalls: 0,
|
|
189
|
+
pending: outcome.pending,
|
|
190
|
+
asyncFs: outcome.asyncFs,
|
|
191
|
+
passedOver: outcome.passedOver,
|
|
192
|
+
waitedBehindEarlier: true,
|
|
193
|
+
acquireDeadlineMs,
|
|
194
|
+
asyncFsProbeMs
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
const state = {
|
|
199
|
+
pending: /* @__PURE__ */ new Set(),
|
|
200
|
+
abandoned: false,
|
|
201
|
+
mkdirCalls: 0,
|
|
202
|
+
startedAt: Date.now()
|
|
203
|
+
};
|
|
204
|
+
const acquiring = import_proper_lockfile.default.lock(lockPath, {
|
|
205
|
+
stale: LOCK_STALE_MS,
|
|
206
|
+
retries: {
|
|
207
|
+
retries: LOCK_MAX_RETRIES,
|
|
208
|
+
minTimeout: LOCK_RETRY_MS,
|
|
209
|
+
maxTimeout: LOCK_RETRY_MS * 4,
|
|
210
|
+
factor: 1.5,
|
|
211
|
+
// The deadline timer keeps a waiting CLI alive. After the deadline, an
|
|
212
|
+
// abandoned acquire's remaining retries (each refused without a
|
|
213
|
+
// file-system call) must not.
|
|
214
|
+
unref: true
|
|
215
|
+
},
|
|
216
|
+
fs: trackedLockFs(baseFs, state, () => {
|
|
217
|
+
if (state.abandoned && state.pending.size === 0)
|
|
218
|
+
clearBlocker(pathState, state);
|
|
219
|
+
})
|
|
220
|
+
});
|
|
221
|
+
void acquiring.catch(() => void 0);
|
|
222
|
+
let timer;
|
|
223
|
+
const deadline = new Promise((resolve) => {
|
|
224
|
+
timer = setTimeout(() => resolve("deadline"), acquireDeadlineMs);
|
|
225
|
+
});
|
|
226
|
+
let result;
|
|
227
|
+
try {
|
|
228
|
+
result = await Promise.race([acquiring, deadline]);
|
|
229
|
+
} finally {
|
|
230
|
+
clearTimeout(timer);
|
|
231
|
+
}
|
|
232
|
+
if (result !== "deadline")
|
|
233
|
+
return result;
|
|
234
|
+
state.abandoned = true;
|
|
235
|
+
const waitedMs = Date.now() - arrivedAt;
|
|
236
|
+
const pending = describePendingCalls(state.pending, Date.now());
|
|
237
|
+
let asyncFs = null;
|
|
238
|
+
if (state.pending.size > 0) {
|
|
239
|
+
pathState.blockers.add(state);
|
|
240
|
+
asyncFs = await probe();
|
|
241
|
+
passOver(pathState, state, asyncFs.result);
|
|
242
|
+
}
|
|
243
|
+
throw lockAcquireTimeout({
|
|
244
|
+
lockPath,
|
|
245
|
+
daemonId,
|
|
246
|
+
waitedMs,
|
|
247
|
+
queuedMs: state.startedAt - arrivedAt,
|
|
248
|
+
mkdirCalls: state.mkdirCalls,
|
|
249
|
+
pending,
|
|
250
|
+
asyncFs,
|
|
251
|
+
passedOver: pathState.blockers.has(state) ? passedOverCalls(pathState) : null,
|
|
252
|
+
waitedBehindEarlier: false,
|
|
253
|
+
acquireDeadlineMs,
|
|
254
|
+
asyncFsProbeMs
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
function clearBlocker(pathState, state) {
|
|
258
|
+
pathState.passedOver.delete(state);
|
|
259
|
+
if (pathState.blockers.delete(state))
|
|
260
|
+
releaseWaitersIfClear(pathState);
|
|
261
|
+
}
|
|
262
|
+
function passOver(pathState, state, asyncFs) {
|
|
263
|
+
if (!pathState.blockers.has(state) || asyncFs === "no_answer")
|
|
264
|
+
return;
|
|
265
|
+
if ([...state.pending].some((call) => CALLS_UNSAFE_TO_OUTLIVE.has(call.op)))
|
|
266
|
+
return;
|
|
267
|
+
if (pathState.passedOver.size >= MAX_PASSED_OVER)
|
|
268
|
+
return;
|
|
269
|
+
pathState.blockers.delete(state);
|
|
270
|
+
pathState.passedOver.add(state);
|
|
271
|
+
releaseWaitersIfClear(pathState);
|
|
272
|
+
}
|
|
273
|
+
function passedOverCalls(pathState) {
|
|
274
|
+
const [held] = pathState.passedOver;
|
|
275
|
+
return held ? describePendingCalls(held.pending, Date.now()) : null;
|
|
276
|
+
}
|
|
277
|
+
function releaseWaitersIfClear(pathState) {
|
|
278
|
+
if (pathState.blockers.size > 0)
|
|
279
|
+
return;
|
|
280
|
+
const waiters = [...pathState.waiters];
|
|
281
|
+
pathState.waiters.clear();
|
|
282
|
+
for (const waiter of waiters)
|
|
283
|
+
waiter.release();
|
|
284
|
+
}
|
|
285
|
+
function waitForBlockers(pathState, deadlineMs, probe) {
|
|
286
|
+
return new Promise((resolve) => {
|
|
287
|
+
const giveUp = async () => {
|
|
288
|
+
const asyncFs = await probe();
|
|
289
|
+
for (const blocker of [...pathState.blockers])
|
|
290
|
+
passOver(pathState, blocker, asyncFs.result);
|
|
291
|
+
if (!pathState.waiters.has(waiter))
|
|
292
|
+
return;
|
|
293
|
+
pathState.waiters.delete(waiter);
|
|
294
|
+
const [oldest] = pathState.blockers;
|
|
295
|
+
resolve({
|
|
296
|
+
pending: describePendingCalls(oldest?.pending ?? /* @__PURE__ */ new Set(), Date.now()),
|
|
297
|
+
asyncFs,
|
|
298
|
+
passedOver: passedOverCalls(pathState)
|
|
299
|
+
});
|
|
300
|
+
};
|
|
301
|
+
const timer = setTimeout(() => void giveUp(), deadlineMs);
|
|
302
|
+
const waiter = {
|
|
303
|
+
release: () => {
|
|
304
|
+
clearTimeout(timer);
|
|
305
|
+
resolve("clear");
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
pathState.waiters.add(waiter);
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
function formatLockWait(ms) {
|
|
312
|
+
return ms < 1e3 ? `${ms} ms` : `${Math.round(ms / 1e3)} s`;
|
|
313
|
+
}
|
|
314
|
+
function lockAcquireTimeout(options) {
|
|
315
|
+
const { lockPath, daemonId, mkdirCalls, waitedBehindEarlier, asyncFs, passedOver } = options;
|
|
316
|
+
const { calls, text } = options.pending;
|
|
317
|
+
(0, import_runtime.emitAuthTelemetry)({
|
|
318
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
319
|
+
eventType: "auth",
|
|
320
|
+
success: false,
|
|
321
|
+
metadata: {
|
|
322
|
+
event: "refresh_lock_acquire_timeout",
|
|
323
|
+
waitedMs: options.waitedMs,
|
|
324
|
+
queuedMs: options.queuedMs,
|
|
325
|
+
mkdirCalls,
|
|
326
|
+
waitedBehindEarlier,
|
|
327
|
+
pendingFsCalls: calls,
|
|
328
|
+
asyncFsProbe: asyncFs?.result ?? "not_run",
|
|
329
|
+
asyncFsProbeReused: asyncFs ? asyncFs.reusedAfterMs !== null : false,
|
|
330
|
+
passedOverPendingFsCalls: passedOver?.calls ?? [],
|
|
331
|
+
...daemonId ? { daemonId } : {}
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
const lockFile = import_node_path.default.basename(lockPath);
|
|
335
|
+
const probeText = asyncFs ? `; ${asyncFsProbeText(asyncFs, options.asyncFsProbeMs)}` : "";
|
|
336
|
+
const passedOverText = passedOver ? ` An acquire this process already passed over is still waiting on ${passedOver.text}, and no other is passed over while it waits, so new acquires wait until one of these calls answers or the process restarts.` : "";
|
|
337
|
+
const message = waitedBehindEarlier ? `The auth lock (${lockFile}) was not acquired: it waited ${formatLockWait(options.waitedMs)} behind an earlier acquire in this process, which is still waiting on ${text || "no file-system call"}${probeText}.${passedOverText}` : `The auth lock (${lockFile}) was not acquired within ${formatLockWait(options.acquireDeadlineMs)} (${mkdirCalls} mkdir call${mkdirCalls === 1 ? "" : "s"} on the lock directory). Pending file-system calls: ${calls.length ? text : "none (it was between retries)"}${probeText}.${passedOverText}`;
|
|
338
|
+
(0, import_runtime.getAuthLogger)().warn(`[auth/refresh] ${message}`);
|
|
339
|
+
return new import_types.TransientAuthFailure(message);
|
|
340
|
+
}
|
|
61
341
|
let _exitHandlersInstalled = false;
|
|
62
342
|
const _authLockHeld = new import_node_async_hooks.AsyncLocalStorage();
|
|
63
343
|
function authLockPath() {
|
|
@@ -140,15 +420,7 @@ async function withAuthLock(body, daemonId) {
|
|
|
140
420
|
success: true,
|
|
141
421
|
metadata: { event: "refresh_lock_acquiring", ...daemonId ? { daemonId } : {} }
|
|
142
422
|
});
|
|
143
|
-
const release = await
|
|
144
|
-
stale: LOCK_STALE_MS,
|
|
145
|
-
retries: {
|
|
146
|
-
retries: LOCK_MAX_RETRIES,
|
|
147
|
-
minTimeout: LOCK_RETRY_MS,
|
|
148
|
-
maxTimeout: LOCK_RETRY_MS * 4,
|
|
149
|
-
factor: 1.5
|
|
150
|
-
}
|
|
151
|
-
});
|
|
423
|
+
const release = await acquireAuthLock(lockPath, daemonId);
|
|
152
424
|
const acquiredAt = Date.now();
|
|
153
425
|
(0, import_runtime.emitAuthTelemetry)({
|
|
154
426
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -556,6 +828,7 @@ function clearReauthState() {
|
|
|
556
828
|
LOCK_SIGNAL_FALLBACK_EXIT_MS,
|
|
557
829
|
REAUTH_FLAG_PATH_FN,
|
|
558
830
|
UNKNOWN_401_BUDGET,
|
|
831
|
+
__authLockTesting,
|
|
559
832
|
__refreshDiagnostics,
|
|
560
833
|
__resetUnknown401StreaksForTest,
|
|
561
834
|
clearReauthState,
|
|
@@ -28,6 +28,11 @@ export interface AuthKillSwitches {
|
|
|
28
28
|
* refresh_lock_acquired — {daemonId, waitedMs}
|
|
29
29
|
* refresh_lock_retry — {daemonId, attempt, errorCode}
|
|
30
30
|
* refresh_lock_released — {daemonId, heldForMs}
|
|
31
|
+
* refresh_lock_acquire_timeout — {daemonId, waitedMs, queuedMs, mkdirCalls,
|
|
32
|
+
* waitedBehindEarlier, pendingFsCalls: [{op, file?,
|
|
33
|
+
* pendingMs}], asyncFsProbe: answered|failed|no_answer|
|
|
34
|
+
* not_run, asyncFsProbeReused: boolean,
|
|
35
|
+
* passedOverPendingFsCalls: [{op, file?, pendingMs}]}
|
|
31
36
|
* refresh_race_resolved — {daemonId, sourceTokenAdopted: boolean}
|
|
32
37
|
*/
|
|
33
38
|
export interface AuthTelemetryEvent {
|
|
@@ -10,9 +10,23 @@ export declare const MANAGED_WORK_ACP_CAPABILITY: {
|
|
|
10
10
|
export declare const MANAGED_WORK_ACP_MANAGER = "managed_work_acp_manager_v1";
|
|
11
11
|
export declare const MANAGED_WORK_ACP_WORKER = "managed_work_acp_worker_v1";
|
|
12
12
|
export declare const MANAGED_WORK_ACP_RECORDS = "managed_work_acp_task_records_v1";
|
|
13
|
+
/**
|
|
14
|
+
* The interaction roles in which the model is offered NO tool and answers once: a Task coordinator
|
|
15
|
+
* turn (`task_coordinator`) and a glance at a message beside running work (`chat_glance`). Neither
|
|
16
|
+
* is implied by the manager profile an adapter enforces, so each adapter names the ones it runs
|
|
17
|
+
* (`answerOnlyRoles`). An adapter that does not name a role is refused it by the server and by the
|
|
18
|
+
* daemon, and the caller falls back: a coordinator to the platform's template, a glance to a cloud
|
|
19
|
+
* reply when its owner allowed one, otherwise the message is held until the work ends.
|
|
20
|
+
*
|
|
21
|
+
* The first-party ACP engine names none. Its manager profile is a closed role enum, which in
|
|
22
|
+
* 0.1.0-rc.13 is `main_manager`, `task_reporter` and `task_discussion`, so it rejects both of these
|
|
23
|
+
* before its model runs. Add a role here only with an engine release whose enum holds it.
|
|
24
|
+
*/
|
|
25
|
+
export declare const MANAGED_WORK_ANSWER_ONLY_ROLES: readonly ["task_coordinator", "chat_glance"];
|
|
26
|
+
export type ManagedWorkAnswerOnlyRole = (typeof MANAGED_WORK_ANSWER_ONLY_ROLES)[number];
|
|
13
27
|
export declare function managedWorkAdapter(provider: unknown): {
|
|
14
28
|
readonly engine: "sdk";
|
|
15
|
-
readonly
|
|
29
|
+
readonly answerOnlyRoles: readonly ["task_coordinator", "chat_glance"];
|
|
16
30
|
readonly manager: readonly ["native_interaction_profiles_v1", "sdk_pre_tool_use_exact_allowlist"];
|
|
17
31
|
readonly worker: readonly ["native_task_work_controls_v1", "sdk_pre_tool_use_task_work_controls"];
|
|
18
32
|
readonly taskRecords: readonly ["native_task_record_applicability_v1", "sdk_pre_tool_use_task_record_applicability"];
|
|
@@ -24,7 +38,7 @@ export declare function managedWorkAdapter(provider: unknown): {
|
|
|
24
38
|
readonly taskRecords: readonly ["managed_work_acp_task_records_v1", "acp_task_record_applicability"];
|
|
25
39
|
} | {
|
|
26
40
|
readonly engine: "app-server";
|
|
27
|
-
readonly
|
|
41
|
+
readonly answerOnlyRoles: readonly ["task_coordinator", "chat_glance"];
|
|
28
42
|
readonly freshSession: true;
|
|
29
43
|
readonly toolTransport: "daemon_rpc";
|
|
30
44
|
readonly manager: readonly ["managed_work_codex_manager_v1", "app_server_scoped_dynamic_tools"];
|
|
@@ -32,14 +46,18 @@ export declare function managedWorkAdapter(provider: unknown): {
|
|
|
32
46
|
readonly taskRecords: readonly ["managed_work_codex_task_records_v1", "app_server_canonical_task_records"];
|
|
33
47
|
} | {
|
|
34
48
|
readonly engine: "rpc";
|
|
35
|
-
readonly
|
|
49
|
+
readonly answerOnlyRoles: readonly ["task_coordinator", "chat_glance"];
|
|
36
50
|
readonly freshSession: true;
|
|
37
51
|
readonly toolTransport: "daemon_rpc";
|
|
38
52
|
readonly manager: readonly ["managed_work_pi_manager_v1", "pi_rpc_exact_tool_scope"];
|
|
39
53
|
readonly worker: readonly ["managed_work_pi_worker_v1", "pi_rpc_governed_work_tools"];
|
|
40
54
|
readonly taskRecords: readonly ["managed_work_pi_task_records_v1", "pi_rpc_canonical_task_records"];
|
|
41
55
|
} | undefined;
|
|
56
|
+
/** Whether this harness can run `role`, one of the answer-only roles, with no tool offered to its model. */
|
|
57
|
+
export declare function managedWorkSupportsAnswerOnlyRole(provider: unknown, role: unknown): boolean;
|
|
42
58
|
/** Whether this harness can run a Task coordinator turn with no tool offered to its model. */
|
|
43
59
|
export declare function managedWorkSupportsTaskCoordinator(provider: unknown): boolean;
|
|
60
|
+
/** Whether this harness can run a glance (`chat_glance`) with no tool offered to its model. */
|
|
61
|
+
export declare function managedWorkSupportsChatGlance(provider: unknown): boolean;
|
|
44
62
|
export declare function managedWorkCapabilities(provider: string): string[];
|
|
45
63
|
export declare function advertisesManagedWorkAcp(value: unknown, worker: boolean, records: boolean): boolean;
|