@skrr-ai/cli 0.1.208 → 0.1.210
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/base-command.js +2 -1
- package/dist/commands/agent/message/no-reply.js +1 -1
- package/dist/commands/agent/message/react.d.ts +23 -0
- package/dist/commands/agent/message/react.js +128 -0
- package/dist/commands/agent/message/resolve.js +1 -1
- package/dist/commands/agent/message/retract.js +1 -1
- package/dist/commands/agent/message/send.d.ts +8 -13
- package/dist/commands/agent/message/send.js +60 -28
- package/dist/commands/agents/access/approve.js +1 -1
- package/dist/commands/agents/access/deny.js +1 -1
- package/dist/commands/agents/access/list.js +3 -1
- package/dist/commands/agents/access/reach.js +1 -1
- package/dist/commands/agents/access/revoke.js +1 -1
- package/dist/commands/agents/always-on/recovery-review.d.ts +10 -0
- package/dist/commands/agents/always-on/recovery-review.js +45 -0
- package/dist/commands/agents/chat.d.ts +22 -0
- package/dist/commands/agents/chat.js +400 -90
- package/dist/commands/agents/import.js +3 -3
- package/dist/commands/agents/manager/status.js +7 -6
- package/dist/commands/agents/not-for-task.d.ts +24 -0
- package/dist/commands/agents/not-for-task.js +64 -0
- package/dist/commands/agents/schedule-overview.d.ts +20 -0
- package/dist/commands/agents/schedule-overview.js +35 -2
- package/dist/commands/agents/shared-memory.js +1 -1
- package/dist/commands/agents/stop.d.ts +23 -0
- package/dist/commands/agents/stop.js +61 -0
- package/dist/commands/agents/update.d.ts +7 -0
- package/dist/commands/agents/update.js +45 -2
- package/dist/commands/convos/messages.js +5 -0
- package/dist/commands/convos/transcript.js +2 -2
- package/dist/commands/daemon/logs.d.ts +3 -1
- package/dist/commands/daemon/logs.js +6 -2
- package/dist/commands/dm/work.js +38 -9
- package/dist/commands/duties/advance-next.js +1 -1
- package/dist/commands/duties/preflight.js +17 -13
- package/dist/commands/duties/show.js +5 -0
- package/dist/commands/followups/watch-pr.js +2 -1
- package/dist/commands/harnesses/evaluations/evidence.js +2 -2
- package/dist/commands/harnesses/evaluations/grant.js +1 -1
- package/dist/commands/harnesses/evaluations/revoke.js +1 -1
- package/dist/commands/harnesses/evaluations/show.js +1 -1
- package/dist/commands/harnesses/rollouts/grant.js +1 -1
- package/dist/commands/harnesses/rollouts/revoke.js +1 -1
- package/dist/commands/machines/hosted/identity-evaluations/revoke.js +1 -1
- package/dist/commands/machines/hosted/identity-evaluations/show.js +1 -1
- package/dist/commands/memory/consolidation/undo.js +1 -0
- package/dist/commands/messages/list.js +9 -1
- package/dist/commands/slack/mutes.js +1 -1
- package/dist/commands/slack/unmute.js +1 -1
- package/dist/commands/tasks/actionability.js +1 -0
- package/dist/commands/tasks/ask.d.ts +2 -0
- package/dist/commands/tasks/ask.js +7 -1
- package/dist/commands/tasks/bulk-update.js +12 -0
- package/dist/commands/tasks/deliverable/add.d.ts +2 -0
- package/dist/commands/tasks/deliverable/add.js +25 -6
- package/dist/commands/tasks/input/show.d.ts +2 -0
- package/dist/commands/tasks/input/show.js +18 -3
- package/dist/commands/tasks/list.d.ts +8 -0
- package/dist/commands/tasks/list.js +50 -9
- package/dist/commands/tasks/move.d.ts +2 -10
- package/dist/commands/tasks/move.js +7 -18
- package/dist/commands/tasks/resource/add.d.ts +2 -0
- package/dist/commands/tasks/resource/add.js +11 -1
- package/dist/commands/tasks/result/show.js +19 -7
- package/dist/commands/tasks/show.d.ts +4 -3
- package/dist/commands/tasks/show.js +20 -8
- package/dist/commands/tasks/start.js +35 -16
- package/dist/commands/tasks/update.js +3 -0
- package/dist/commands/tasks/wait.js +2 -2
- package/dist/generated/agent-guides.json +483 -183
- package/dist/lib/agent-proactive-baseline.js +4 -1
- package/dist/lib/chat-stop.d.ts +17 -0
- package/dist/lib/chat-stop.js +70 -0
- package/dist/lib/cloud-reply.d.ts +21 -0
- package/dist/lib/cloud-reply.js +52 -0
- package/dist/lib/duties.d.ts +10 -0
- package/dist/lib/duties.js +111 -7
- package/dist/lib/duty-ledgers.js +19 -2
- package/dist/lib/file-mime.js +8 -0
- package/dist/lib/inbound-messages.d.ts +156 -0
- package/dist/lib/inbound-messages.js +375 -0
- package/dist/lib/message-intent.d.ts +18 -2
- package/dist/lib/message-intent.js +23 -1
- package/dist/lib/preflight-copy.d.ts +16 -1
- package/dist/lib/preflight-copy.js +33 -1
- package/dist/lib/space-resolver.d.ts +9 -0
- package/dist/lib/space-resolver.js +13 -0
- package/dist/lib/task-operations.d.ts +2 -0
- package/dist/lib/task-operations.js +28 -4
- package/dist/lib/task-preflight.js +1 -0
- package/dist/lib/task-review-notice.d.ts +21 -0
- package/dist/lib/task-review-notice.js +46 -0
- package/dist/lib/task-version.d.ts +9 -0
- package/dist/lib/task-version.js +16 -0
- package/dist/lib/task-work.js +5 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialEnvelopeBridge.js +6 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/managedWorkRuntime.d.ts +5 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/managedWorkRuntime.js +21 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialEnvelopeBridge.js +45 -15
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/managedWorkRuntime.d.ts +5 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/managedWorkRuntime.js +31 -5
- package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +12307 -11838
- package/oclif.manifest.json +307 -23
- package/package.json +6 -2
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RESOURCE_ADD_FIELD_FLAGS = void 0;
|
|
3
4
|
const node_crypto_1 = require("node:crypto");
|
|
4
5
|
const core_1 = require("@oclif/core");
|
|
5
6
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
6
7
|
const base_command_1 = require("../../../base-command");
|
|
7
8
|
const tasks_1 = require("../../../lib/tasks");
|
|
8
9
|
const RESOURCE_ROLES = ['input', 'reference', 'evidence', 'attachment', 'deliverable'];
|
|
10
|
+
/** The body paths `resource add` writes from a flag, as `handleApiError` reads them back. */
|
|
11
|
+
exports.RESOURCE_ADD_FIELD_FLAGS = Object.freeze({
|
|
12
|
+
runId: '--run-id',
|
|
13
|
+
});
|
|
9
14
|
class TasksResourceAdd extends base_command_1.BaseCommand {
|
|
10
15
|
static description = 'Link an exact input, reference, evidence item, attachment, or deliverable to a task';
|
|
11
16
|
static examples = [
|
|
@@ -37,7 +42,9 @@ class TasksResourceAdd extends base_command_1.BaseCommand {
|
|
|
37
42
|
'content-digest': core_1.Flags.string({ description: 'Integrity digest for this exact version' }),
|
|
38
43
|
expectation: core_1.Flags.string({ multiple: true, description: 'Expectation id this supports' }),
|
|
39
44
|
'result-id': core_1.Flags.string({ description: 'Result version this Resource supports' }),
|
|
40
|
-
'run-id': core_1.Flags.string({
|
|
45
|
+
'run-id': core_1.Flags.string({
|
|
46
|
+
description: 'Task Run that produced or observed it. Not the id `tasks checkout` prints: a checkout is not a Task Run',
|
|
47
|
+
}),
|
|
41
48
|
'idempotency-key': core_1.Flags.string({ description: 'Stable retry key' }),
|
|
42
49
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
43
50
|
};
|
|
@@ -60,6 +67,9 @@ class TasksResourceAdd extends base_command_1.BaseCommand {
|
|
|
60
67
|
runId: flags['run-id'],
|
|
61
68
|
idempotencyKey: flags['idempotency-key'] || `task-resource_${(0, node_crypto_1.randomUUID)()}`,
|
|
62
69
|
};
|
|
70
|
+
// A refusal about the cited Run names `runId`; the person typed --run-id (OSK-33349).
|
|
71
|
+
if (flags['run-id'])
|
|
72
|
+
this.requestFieldFlags = exports.RESOURCE_ADD_FIELD_FLAGS;
|
|
63
73
|
let result;
|
|
64
74
|
try {
|
|
65
75
|
result = await data_provider_1.dataService.recordTaskResource(args.task, payload);
|
|
@@ -65,7 +65,10 @@ class TasksResultShow extends base_command_1.BaseCommand {
|
|
|
65
65
|
static flags = {
|
|
66
66
|
task: core_1.Flags.string({ description: 'Task id; overrides runtime context' }),
|
|
67
67
|
history: core_1.Flags.boolean({ description: 'Include superseded Result versions' }),
|
|
68
|
-
result: core_1.Flags.string({
|
|
68
|
+
result: core_1.Flags.string({
|
|
69
|
+
description: 'Read one immutable Result by id',
|
|
70
|
+
exclusive: ['history'],
|
|
71
|
+
}),
|
|
69
72
|
json: core_1.Flags.boolean({ description: 'Output JSON' }),
|
|
70
73
|
};
|
|
71
74
|
async run() {
|
|
@@ -73,8 +76,11 @@ class TasksResultShow extends base_command_1.BaseCommand {
|
|
|
73
76
|
const { args, flags } = await this.parse(TasksResultShow);
|
|
74
77
|
const task = (0, task_resolver_1.resolveTaskIdentity)({ positionalId: args.task, flagTask: flags.task });
|
|
75
78
|
if (flags.result) {
|
|
76
|
-
const scopeKey = process.env.OVERSKY_SPACE_REVIEW_WORK === '1' || process.env.OVERSKY_SPACE_GOAL_WORK === '1'
|
|
77
|
-
|
|
79
|
+
const scopeKey = process.env.OVERSKY_SPACE_REVIEW_WORK === '1' || process.env.OVERSKY_SPACE_GOAL_WORK === '1'
|
|
80
|
+
? 'reviewSpaceId'
|
|
81
|
+
: process.env.OVERSKY_SPACE_NOTEBOOK_RESULT === '1'
|
|
82
|
+
? 'notebookSpaceId'
|
|
83
|
+
: undefined;
|
|
78
84
|
const spaceId = process.env.OVERSKY_SESSION_SPACE_ID;
|
|
79
85
|
if (scopeKey && !spaceId)
|
|
80
86
|
this.error('This evidence read requires a bound Space.', { exit: 2 });
|
|
@@ -83,9 +89,15 @@ class TasksResultShow extends base_command_1.BaseCommand {
|
|
|
83
89
|
try {
|
|
84
90
|
const exact = await (0, api_fetch_1.apiFetch)(`${path}${query}`);
|
|
85
91
|
if (flags.json)
|
|
86
|
-
return this.
|
|
87
|
-
return this.log([
|
|
88
|
-
|
|
92
|
+
return this.printJsonResult(exact);
|
|
93
|
+
return this.log([
|
|
94
|
+
`Result v${exact.version} ${exact.id}`,
|
|
95
|
+
exact.summary,
|
|
96
|
+
exact.body,
|
|
97
|
+
...describeResultDetail(exact),
|
|
98
|
+
]
|
|
99
|
+
.filter(Boolean)
|
|
100
|
+
.join('\n'));
|
|
89
101
|
}
|
|
90
102
|
catch (error) {
|
|
91
103
|
return this.handleApiError(error);
|
|
@@ -99,7 +111,7 @@ class TasksResultShow extends base_command_1.BaseCommand {
|
|
|
99
111
|
this.handleApiError(error);
|
|
100
112
|
}
|
|
101
113
|
if (flags.json)
|
|
102
|
-
return this.
|
|
114
|
+
return this.printJsonResult(result);
|
|
103
115
|
const current = result.results.find((row) => row.id === result.currentResultId);
|
|
104
116
|
if (!current)
|
|
105
117
|
return this.log(await (0, task_legacy_1.emptyCanonicalView)(task.id, 'Result'));
|
|
@@ -73,11 +73,12 @@ export declare function taskExecutorLabel(t: Record<string, unknown>, bin?: stri
|
|
|
73
73
|
* The `Next step:` lines for a Task that nobody has been chosen to do.
|
|
74
74
|
*
|
|
75
75
|
* `Why:` said "Choose an executor and assignee before this Task can start" (or,
|
|
76
|
-
* for a started Task, that
|
|
76
|
+
* for a started Task, that nobody is assigned) and nothing said how
|
|
77
77
|
* to do that (OSK-24355). The commands come from the one action→command map
|
|
78
78
|
* (`taskActionRemedies`), keyed by the actions the server declared, with the
|
|
79
|
-
* Task's ref filled in. Only the assignment actions print here
|
|
80
|
-
* listed by
|
|
79
|
+
* Task's ref filled in. Only the assignment actions print here (and closing, for a
|
|
80
|
+
* started Task nobody is assigned to that carries a Result); the rest are listed by
|
|
81
|
+
* `tasks actionability`.
|
|
81
82
|
*
|
|
82
83
|
* Pure and exported so the wording is testable without an oclif runtime.
|
|
83
84
|
*/
|
|
@@ -160,15 +160,21 @@ function taskExecutorLabel(t, bin = 'skrr') {
|
|
|
160
160
|
}
|
|
161
161
|
/** The server actions whose commands `tasks show` prints under `Why:`: who does the Task. */
|
|
162
162
|
const ASSIGNMENT_ACTIONS = new Set(['assign_task', 'set_execution_mode']);
|
|
163
|
+
/**
|
|
164
|
+
* Reasons whose next step is an assignment: nobody has been chosen to do the Task, or it was
|
|
165
|
+
* started with nobody assigned (OSK-20258), where the assignment says who is doing it.
|
|
166
|
+
*/
|
|
167
|
+
const ASSIGNMENT_REASONS = new Set(['assignment_required', 'started_without_assignee']);
|
|
163
168
|
/**
|
|
164
169
|
* The `Next step:` lines for a Task that nobody has been chosen to do.
|
|
165
170
|
*
|
|
166
171
|
* `Why:` said "Choose an executor and assignee before this Task can start" (or,
|
|
167
|
-
* for a started Task, that
|
|
172
|
+
* for a started Task, that nobody is assigned) and nothing said how
|
|
168
173
|
* to do that (OSK-24355). The commands come from the one action→command map
|
|
169
174
|
* (`taskActionRemedies`), keyed by the actions the server declared, with the
|
|
170
|
-
* Task's ref filled in. Only the assignment actions print here
|
|
171
|
-
* listed by
|
|
175
|
+
* Task's ref filled in. Only the assignment actions print here (and closing, for a
|
|
176
|
+
* started Task nobody is assigned to that carries a Result); the rest are listed by
|
|
177
|
+
* `tasks actionability`.
|
|
172
178
|
*
|
|
173
179
|
* Pure and exported so the wording is testable without an oclif runtime.
|
|
174
180
|
*/
|
|
@@ -177,15 +183,22 @@ function nextStepLines(t, bin = 'skrr') {
|
|
|
177
183
|
if (!actionability || actionability.state === 'terminal')
|
|
178
184
|
return [];
|
|
179
185
|
const allowed = (Array.isArray(actionability.allowedActions) ? actionability.allowedActions : []).filter((row) => Boolean(row) && typeof row.action === 'string');
|
|
180
|
-
|
|
181
|
-
|
|
186
|
+
// A started Task nobody is assigned to that carries a Result may simply be done: the server
|
|
187
|
+
// offers closing it beside the assignment, and its reason names closing first (OSK-20258).
|
|
188
|
+
const closable = actionability.reasonCode === 'started_without_assignee';
|
|
189
|
+
const actions = allowed.filter((row) => ASSIGNMENT_ACTIONS.has(row.action) || (closable && row.action === 'complete_task'));
|
|
190
|
+
if (ASSIGNMENT_REASONS.has(String(actionability.reasonCode)) &&
|
|
182
191
|
!actions.some((row) => row.action === 'assign_task')) {
|
|
183
192
|
actions.unshift({ action: 'assign_task' });
|
|
184
193
|
}
|
|
185
194
|
const ref = (typeof t.identifier === 'string' && t.identifier) ||
|
|
186
195
|
(typeof t.id === 'string' && t.id) ||
|
|
187
196
|
'<task-id>';
|
|
188
|
-
const rows = (0, task_operations_1.taskActionRemedyRows)(actions.flatMap((row) => (0, task_operations_1.taskActionRemedies)(row.action, ref, row.targetId, bin, {
|
|
197
|
+
const rows = (0, task_operations_1.taskActionRemedyRows)(actions.flatMap((row) => (0, task_operations_1.taskActionRemedies)(row.action, ref, row.targetId, bin, {
|
|
198
|
+
allowedActions: allowed,
|
|
199
|
+
task: t,
|
|
200
|
+
reasonCode: actionability.reasonCode,
|
|
201
|
+
})));
|
|
189
202
|
return rows.map((row, index) => `${index === 0 ? 'Next step:' : ''}`.padEnd(13) + row);
|
|
190
203
|
}
|
|
191
204
|
function resolverLabel(by, names) {
|
|
@@ -487,8 +500,7 @@ class TasksShow extends base_command_1.BaseCommand {
|
|
|
487
500
|
this.log(`Status: ${t.status ?? '-'}`);
|
|
488
501
|
// The read a version-checked write is fenced on. Printed with the flag that
|
|
489
502
|
// uses it, because a number on its own does not say what it is for.
|
|
490
|
-
|
|
491
|
-
this.log(`Version: ${version} (update only from this read: --expected-version ${version})`);
|
|
503
|
+
this.log((0, task_version_1.taskVersionLine)((0, task_version_1.taskVersionOf)(t)));
|
|
492
504
|
// Immediately under Status, because "failed" is the row that raises the
|
|
493
505
|
// question and this is the answer to it.
|
|
494
506
|
for (const line of taskFailureLines(t, this.config.bin))
|
|
@@ -13,8 +13,7 @@ const task_admission_1 = require("../../lib/task-admission");
|
|
|
13
13
|
const http_error_1 = require("../../lib/http-error");
|
|
14
14
|
const TASK_START_REQUEST_ID_PATTERN = /^[A-Za-z0-9._:/-]{1,200}$/;
|
|
15
15
|
class TasksStart extends base_command_1.BaseCommand {
|
|
16
|
-
static description = 'Request execution of a Task by its assigned Agent. ' +
|
|
17
|
-
'Alias: tasks execute';
|
|
16
|
+
static description = 'Request execution of a Task by its assigned Agent. ' + 'Alias: tasks execute';
|
|
18
17
|
// `tasks execute` is the verb a first-time user reaches for, and it was
|
|
19
18
|
// "not a command" (OSK-12128). One command, two names.
|
|
20
19
|
static aliases = ['tasks:execute'];
|
|
@@ -38,7 +37,10 @@ class TasksStart extends base_command_1.BaseCommand {
|
|
|
38
37
|
};
|
|
39
38
|
static flags = {
|
|
40
39
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
41
|
-
'dry-run': core_1.Flags.boolean({
|
|
40
|
+
'dry-run': core_1.Flags.boolean({
|
|
41
|
+
description: 'Preview effective unattended execution prerequisites without creating a Run or checking out a branch',
|
|
42
|
+
exclusive: ['branch'],
|
|
43
|
+
}),
|
|
42
44
|
task: core_1.Flags.string({
|
|
43
45
|
description: 'Task ID; overrides daemon runtime context',
|
|
44
46
|
}),
|
|
@@ -56,8 +58,15 @@ class TasksStart extends base_command_1.BaseCommand {
|
|
|
56
58
|
description: 'Stable idempotency key for this logical start. Reuse it after a lost response; inspect it with tasks start-receipt.',
|
|
57
59
|
}),
|
|
58
60
|
'orchestration-version': core_1.Flags.integer({ hidden: true, min: 0 }),
|
|
59
|
-
'orchestration-assign-agent': core_1.Flags.string({
|
|
60
|
-
|
|
61
|
+
'orchestration-assign-agent': core_1.Flags.string({
|
|
62
|
+
hidden: true,
|
|
63
|
+
dependsOn: ['orchestration-version'],
|
|
64
|
+
}),
|
|
65
|
+
'orchestration-failed-run': core_1.Flags.string({
|
|
66
|
+
hidden: true,
|
|
67
|
+
dependsOn: ['orchestration-version'],
|
|
68
|
+
exclusive: ['orchestration-assign-agent'],
|
|
69
|
+
}),
|
|
61
70
|
};
|
|
62
71
|
async run() {
|
|
63
72
|
this.requireAuth();
|
|
@@ -65,8 +74,13 @@ class TasksStart extends base_command_1.BaseCommand {
|
|
|
65
74
|
const orchestrationVersion = flags['orchestration-version'];
|
|
66
75
|
const assignAgentId = flags['orchestration-assign-agent'];
|
|
67
76
|
const failedRunId = flags['orchestration-failed-run'];
|
|
68
|
-
if (orchestrationVersion !== undefined &&
|
|
69
|
-
|
|
77
|
+
if (orchestrationVersion !== undefined &&
|
|
78
|
+
(process.env.OVERSKY_SPACE_ORCHESTRATION_WORK !== '1' ||
|
|
79
|
+
!flags['request-id'] ||
|
|
80
|
+
flags.branch ||
|
|
81
|
+
flags['dry-run'] ||
|
|
82
|
+
flags.skill ||
|
|
83
|
+
flags.capability?.length)) {
|
|
70
84
|
this.error('A scoped orchestration start requires the Duty runtime, a Task version and a request id.', { exit: 2 });
|
|
71
85
|
}
|
|
72
86
|
let taskIdentity;
|
|
@@ -106,7 +120,9 @@ class TasksStart extends base_command_1.BaseCommand {
|
|
|
106
120
|
if (!(0, task_admission_1.isAdmissionPreview)(preview)) {
|
|
107
121
|
this.failWithCliError({
|
|
108
122
|
message: 'The server did not return a confirmed execution preview. Update the server before using --dry-run.',
|
|
109
|
-
code: 'TASK_START_PREVIEW_UNSUPPORTED',
|
|
123
|
+
code: 'TASK_START_PREVIEW_UNSUPPORTED',
|
|
124
|
+
exit: 2,
|
|
125
|
+
retryable: false,
|
|
110
126
|
});
|
|
111
127
|
}
|
|
112
128
|
const blocked = (0, task_admission_1.isAdmissionBlocked)(preview.executionAdmission);
|
|
@@ -175,19 +191,20 @@ class TasksStart extends base_command_1.BaseCommand {
|
|
|
175
191
|
: null;
|
|
176
192
|
if (prior && prior.state !== 'unknown') {
|
|
177
193
|
if (flags.json)
|
|
178
|
-
this.
|
|
194
|
+
this.printJsonResult(prior);
|
|
179
195
|
else
|
|
180
196
|
this.log(`Start request ${requestId} is ${prior.state}. Inspect it with ${this.config.bin} tasks start-receipt ${taskId} --request-id ${requestId}.`);
|
|
181
197
|
return;
|
|
182
198
|
}
|
|
183
199
|
const input = await data_provider_1.dataService.submitTaskConversationInput(taskId, {
|
|
184
|
-
action: 'start',
|
|
200
|
+
action: 'start',
|
|
201
|
+
commandKey: requestId,
|
|
185
202
|
expectedWorkflowGeneration: chat.workflowGeneration,
|
|
186
203
|
expectedAuthorizationGeneration: chat.authorizationGeneration,
|
|
187
204
|
expectedSpecVersion: chat.startInput.specVersion,
|
|
188
205
|
});
|
|
189
206
|
if (flags.json) {
|
|
190
|
-
this.
|
|
207
|
+
this.printJsonResult({ taskId, requestId, input, ...(branch ? { branch } : {}) });
|
|
191
208
|
}
|
|
192
209
|
else {
|
|
193
210
|
if (branch)
|
|
@@ -202,7 +219,9 @@ class TasksStart extends base_command_1.BaseCommand {
|
|
|
202
219
|
result = await data_provider_1.dataService.startTask(taskId, {
|
|
203
220
|
...(flags.skill ? { skillId: flags.skill } : {}),
|
|
204
221
|
...(flags.capability?.length ? { requestedCapabilities: flags.capability } : {}),
|
|
205
|
-
...(orchestrationVersion !== undefined
|
|
222
|
+
...(orchestrationVersion !== undefined
|
|
223
|
+
? { orchestration: { expectedVersion: orchestrationVersion, assignAgentId, failedRunId } }
|
|
224
|
+
: {}),
|
|
206
225
|
requestId,
|
|
207
226
|
});
|
|
208
227
|
}
|
|
@@ -213,7 +232,7 @@ class TasksStart extends base_command_1.BaseCommand {
|
|
|
213
232
|
const waiting = waitingForMachine(err);
|
|
214
233
|
if (waiting) {
|
|
215
234
|
if (flags.json) {
|
|
216
|
-
this.
|
|
235
|
+
this.printJsonResult({
|
|
217
236
|
waiting: true,
|
|
218
237
|
code: 'TASK_WAITING_FOR_MACHINE',
|
|
219
238
|
taskId,
|
|
@@ -221,7 +240,7 @@ class TasksStart extends base_command_1.BaseCommand {
|
|
|
221
240
|
requestId,
|
|
222
241
|
...(branch ? { branch } : {}),
|
|
223
242
|
...waiting,
|
|
224
|
-
}
|
|
243
|
+
});
|
|
225
244
|
return;
|
|
226
245
|
}
|
|
227
246
|
if (branch) {
|
|
@@ -243,13 +262,13 @@ class TasksStart extends base_command_1.BaseCommand {
|
|
|
243
262
|
}
|
|
244
263
|
if (flags.json) {
|
|
245
264
|
const receipt = result.receipt || { requestId, state: 'accepted' };
|
|
246
|
-
this.
|
|
265
|
+
this.printJsonResult({
|
|
247
266
|
...result,
|
|
248
267
|
receipt,
|
|
249
268
|
taskId,
|
|
250
269
|
task: { ...taskIdentity, id: taskId },
|
|
251
270
|
...(branch ? { branch } : {}),
|
|
252
|
-
}
|
|
271
|
+
});
|
|
253
272
|
return;
|
|
254
273
|
}
|
|
255
274
|
this.log(`Accepted start request for task ${taskId}${flags.skill ? ` with skill ${flags.skill}` : ''}`);
|
|
@@ -627,6 +627,9 @@ class TasksUpdate extends base_command_1.BaseCommand {
|
|
|
627
627
|
return;
|
|
628
628
|
}
|
|
629
629
|
this.log(`Updated task ${label} — ${t.title ?? '(no title)'}`);
|
|
630
|
+
const versionLine = (0, task_version_1.writtenTaskVersionLine)(t);
|
|
631
|
+
if (versionLine)
|
|
632
|
+
this.log(versionLine);
|
|
630
633
|
if (flags.unassigned)
|
|
631
634
|
this.log(`Executor intent: ${(0, tasks_2.taskAssignmentPreview)(t).executor.mode || 'unspecified'}; assignment: unassigned. No Run requested.`);
|
|
632
635
|
if (unchanged)
|
|
@@ -137,7 +137,7 @@ class TasksWait extends base_command_1.BaseCommand {
|
|
|
137
137
|
snapshot.tasks.every((task) => (0, task_execution_1.satisfiesWaitTarget)(task, flags.until));
|
|
138
138
|
if (failed || satisfied) {
|
|
139
139
|
if (flags.json) {
|
|
140
|
-
this.
|
|
140
|
+
this.printJsonResult(snapshot, { ok: !failed });
|
|
141
141
|
}
|
|
142
142
|
else {
|
|
143
143
|
this.log(formatProgress(snapshot));
|
|
@@ -194,7 +194,7 @@ class TasksWait extends base_command_1.BaseCommand {
|
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
196
196
|
if (flags.json) {
|
|
197
|
-
this.
|
|
197
|
+
this.printJsonResult(response);
|
|
198
198
|
return;
|
|
199
199
|
}
|
|
200
200
|
for (const line of armedWaitLines(shownRef, response))
|