@skrr-ai/cli 0.1.49 → 0.1.51
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 +5 -4
- package/dist/base-command.js +75 -6
- package/dist/commands/agents/chat.d.ts +14 -0
- package/dist/commands/agents/chat.js +37 -1
- package/dist/commands/agents/create.js +14 -7
- package/dist/commands/agents/show.d.ts +9 -0
- package/dist/commands/agents/show.js +53 -0
- package/dist/commands/agents/update.d.ts +9 -0
- package/dist/commands/agents/update.js +38 -5
- package/dist/commands/balance/show.d.ts +34 -0
- package/dist/commands/balance/show.js +92 -2
- package/dist/commands/code/index.d.ts +1 -0
- package/dist/commands/code/index.js +49 -5
- package/dist/commands/code/run.js +5 -1
- package/dist/commands/commitments/cycles.d.ts +19 -0
- package/dist/commands/commitments/cycles.js +46 -0
- package/dist/commands/commitments/doctor.d.ts +1 -0
- package/dist/commands/commitments/doctor.js +19 -4
- package/dist/commands/commitments/effective-policy.js +40 -1
- package/dist/commands/commitments/explain.d.ts +17 -0
- package/dist/commands/commitments/explain.js +40 -0
- package/dist/commands/commitments/next-tick.js +3 -1
- package/dist/commands/commitments/preflight.js +10 -0
- package/dist/commands/commitments/show.js +11 -1
- package/dist/commands/daemon/config.d.ts +15 -0
- package/dist/commands/daemon/config.js +38 -0
- package/dist/commands/daemon/index.js +1 -0
- package/dist/commands/daemon/status.js +15 -1
- package/dist/commands/goals/create.d.ts +1 -0
- package/dist/commands/goals/create.js +22 -0
- package/dist/commands/harnesses/models.d.ts +54 -0
- package/dist/commands/harnesses/models.js +100 -7
- package/dist/commands/harnesses/show.d.ts +11 -0
- package/dist/commands/harnesses/show.js +35 -0
- package/dist/commands/harnesses/update.d.ts +28 -1
- package/dist/commands/harnesses/update.js +73 -10
- package/dist/commands/logout.js +12 -1
- package/dist/commands/machines/dedicated/index.js +1 -1
- package/dist/commands/machines/dedicated/sign-in.js +4 -1
- package/dist/commands/machines/dedicated/terminal/kill.d.ts +21 -0
- package/dist/commands/machines/dedicated/terminal/kill.js +55 -0
- package/dist/commands/machines/dedicated/terminal/ls.d.ts +22 -0
- package/dist/commands/machines/dedicated/terminal/ls.js +70 -0
- package/dist/commands/machines/dedicated/terminal/rename.d.ts +23 -0
- package/dist/commands/machines/dedicated/terminal/rename.js +64 -0
- package/dist/commands/machines/dedicated/terminal.d.ts +9 -0
- package/dist/commands/machines/dedicated/terminal.js +27 -2
- package/dist/commands/machines/hosted/connect.js +2 -2
- package/dist/commands/machines/hosted/destroy.js +1 -1
- package/dist/commands/machines/hosted/exec.js +1 -1
- package/dist/commands/machines/hosted/list.js +1 -1
- package/dist/commands/machines/hosted/pause.js +1 -1
- package/dist/commands/machines/hosted/pull.js +1 -1
- package/dist/commands/machines/hosted/resume.js +1 -1
- package/dist/commands/machines/hosted/start.js +2 -2
- package/dist/commands/machines/hosted/status.js +2 -1
- package/dist/commands/outbox/list.d.ts +12 -1
- package/dist/commands/outbox/list.js +31 -2
- package/dist/commands/revoke-daemon.js +9 -0
- package/dist/commands/spaces/create.d.ts +1 -0
- package/dist/commands/spaces/create.js +17 -0
- package/dist/commands/spaces/show.js +5 -0
- package/dist/commands/spaces/update.d.ts +1 -0
- package/dist/commands/spaces/update.js +16 -0
- package/dist/commands/tasks/create.d.ts +1 -0
- package/dist/commands/tasks/create.js +6 -0
- package/dist/commands/tasks/list.js +1 -0
- package/dist/commands/tasks/show.js +45 -0
- package/dist/commands/tasks/update.d.ts +1 -0
- package/dist/commands/tasks/update.js +22 -0
- package/dist/commands/tasks/upsert.d.ts +1 -0
- package/dist/commands/tasks/upsert.js +16 -0
- package/dist/lib/agent-config.d.ts +2 -0
- package/dist/lib/agent-config.js +3 -1
- package/dist/lib/agentic-stream.d.ts +68 -1
- package/dist/lib/agentic-stream.js +294 -7
- package/dist/lib/api-fetch.js +19 -0
- package/dist/lib/auth-core-init.d.ts +2 -10
- package/dist/lib/auth-core-init.js +20 -67
- package/dist/lib/auth-failure.d.ts +33 -0
- package/dist/lib/auth-failure.js +65 -0
- package/dist/lib/auth-storage.d.ts +14 -0
- package/dist/lib/auth-storage.js +14 -0
- package/dist/lib/commitments.d.ts +37 -2
- package/dist/lib/commitments.js +148 -0
- package/dist/lib/daemonBroker.d.ts +134 -31
- package/dist/lib/daemonBroker.js +376 -31
- package/dist/lib/dedicated-lease-command.d.ts +14 -0
- package/dist/lib/dedicated-lease-command.js +30 -1
- package/dist/lib/dedicated-machines.js +8 -25
- package/dist/lib/dedicated-service-command.d.ts +11 -3
- package/dist/lib/dedicated-service-command.js +20 -3
- package/dist/lib/dedicated-service.d.ts +46 -0
- package/dist/lib/dedicated-service.js +85 -7
- package/dist/lib/dedicated-terminal.d.ts +21 -0
- package/dist/lib/dedicated-terminal.js +104 -9
- package/dist/lib/delegated-cli.js +4 -1
- package/dist/lib/exec-runtime-binary.d.ts +3 -1
- package/dist/lib/exec-runtime-binary.js +4 -2
- package/dist/lib/first-party-harness-broker.d.ts +10 -0
- package/dist/lib/first-party-harness-broker.js +13 -1
- package/dist/lib/first-party-harness-doctor.js +41 -1
- package/dist/lib/first-party-harness-managed.d.ts +4 -3
- package/dist/lib/first-party-harness-project-trust.d.ts +125 -0
- package/dist/lib/first-party-harness-project-trust.js +364 -0
- package/dist/lib/first-party-harness.d.ts +9 -2
- package/dist/lib/first-party-harness.js +6 -5
- package/dist/lib/harnesses.d.ts +10 -0
- package/dist/lib/hosted-machines.d.ts +10 -1
- package/dist/lib/hosted-machines.js +36 -2
- package/dist/lib/live-runtime-binary.d.ts +40 -0
- package/dist/lib/live-runtime-binary.js +193 -0
- package/dist/lib/login.d.ts +23 -0
- package/dist/lib/login.js +60 -10
- package/dist/lib/machine-spend-cap.d.ts +23 -0
- package/dist/lib/machine-spend-cap.js +68 -0
- package/dist/lib/message-intent.js +3 -1
- package/dist/lib/node-adapter.js +15 -3
- package/dist/lib/tasks.d.ts +20 -0
- package/dist/lib/tasks.js +54 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/cliHandoffWire.d.ts +90 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/cliHandoffWire.js +113 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialEnvelopeBridge.d.ts +2 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialEnvelopeBridge.js +26 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialSession.d.ts +47 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialSession.js +69 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.d.ts +133 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.js +189 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/deviceIdentityBridge.js +41 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +3 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +25 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/loopbackHttp.d.ts +32 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/loopbackHttp.js +268 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineId.d.ts +2 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineId.js +11 -10
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineUuid.d.ts +36 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineUuid.js +156 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/messages.d.ts +8 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/messages.js +9 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.d.ts +8 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.js +16 -10
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refreshClassification.d.ts +6 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refreshClassification.js +32 -9
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.d.ts +81 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.js +87 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/spawnEnv.d.ts +22 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/spawnEnv.js +61 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/types.d.ts +6 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/cliHandoffWire.d.ts +90 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/cliHandoffWire.js +105 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialEnvelopeBridge.d.ts +2 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialEnvelopeBridge.js +25 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialSession.d.ts +47 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialSession.js +66 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.d.ts +133 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.js +182 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/deviceIdentityBridge.js +41 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +3 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +10 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/loopbackHttp.d.ts +32 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/loopbackHttp.js +257 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineId.d.ts +2 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineId.js +11 -10
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineUuid.d.ts +36 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineUuid.js +147 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/messages.d.ts +8 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/messages.js +9 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.d.ts +8 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.js +16 -10
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refreshClassification.d.ts +6 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refreshClassification.js +31 -9
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.d.ts +81 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.js +80 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/spawnEnv.d.ts +22 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/spawnEnv.js +58 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/types.d.ts +6 -1
- package/dist/node_modules/@skrr-ai/auth-core/package.json +61 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +3418 -3344
- package/oclif.manifest.json +24813 -24242
- package/package.json +4 -1
|
@@ -135,6 +135,12 @@ class SpacesUpdate extends base_command_1.BaseCommand {
|
|
|
135
135
|
description: 'Default task template for new tasks in this space — a template id, reference, or ' +
|
|
136
136
|
'exact title (the server resolves it to the template). Pass "none" to clear.',
|
|
137
137
|
}),
|
|
138
|
+
'working-directory': core_1.Flags.string({
|
|
139
|
+
description: "Space-level working directory for this space's local Harness runs — an absolute " +
|
|
140
|
+
"path on the executing daemon's filesystem. The middle layer of task → space → " +
|
|
141
|
+
'agent: a per-task override wins, the agent default applies when neither is set. ' +
|
|
142
|
+
'Pass "none" to clear.',
|
|
143
|
+
}),
|
|
138
144
|
};
|
|
139
145
|
async run() {
|
|
140
146
|
this.requireAuth();
|
|
@@ -159,11 +165,21 @@ class SpacesUpdate extends base_command_1.BaseCommand {
|
|
|
159
165
|
autoStartOnBacklogExit: flags['auto-start-on-backlog-exit'],
|
|
160
166
|
triageExternalIntake: flags['triage-external-intake'],
|
|
161
167
|
defaultTaskTemplateId: clearable(flags['default-task-template']),
|
|
168
|
+
// Per-space working-directory default. 'none'/'clear'/'null' ⇒ null
|
|
169
|
+
// ($unset → resolution falls through to the agent default).
|
|
170
|
+
workingDirectory: (0, tasks_1.workingDirectoryFromFlag)(flags['working-directory']),
|
|
162
171
|
estimateScale: flags['estimate-scale'],
|
|
163
172
|
estimateScaleMigration: flags['estimate-migration'],
|
|
164
173
|
defaultEstimate: flags['default-estimate'],
|
|
165
174
|
useDefaultEstimateForUnestimated: flags['use-default-estimate'],
|
|
166
175
|
});
|
|
176
|
+
// Post-merge, so --working-directory and --from-json are checked
|
|
177
|
+
// identically. A relative path stores fine and then silently falls back on
|
|
178
|
+
// the daemon at run time — refuse it here, where the mistake can be named.
|
|
179
|
+
const workingDirectoryError = (0, tasks_1.workingDirectoryValidationError)(payload.workingDirectory);
|
|
180
|
+
if (workingDirectoryError) {
|
|
181
|
+
this.error(workingDirectoryError, { exit: 2 });
|
|
182
|
+
}
|
|
167
183
|
// Worktree-isolation default lives on the space's deliveryPolicy subdoc,
|
|
168
184
|
// which the API replaces wholesale on update. Merge into the policy the user
|
|
169
185
|
// supplied via --from-json, else the space's current policy, so setting just
|
|
@@ -65,6 +65,7 @@ export default class TasksCreate extends BaseCommand {
|
|
|
65
65
|
estimate: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
66
66
|
tag: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
67
67
|
'label-id': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
68
|
+
'working-directory': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
68
69
|
worktree: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
69
70
|
'lifecycle-definition': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
70
71
|
'lifecycle-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -221,10 +221,16 @@ class TasksCreate extends base_command_1.BaseCommand {
|
|
|
221
221
|
}),
|
|
222
222
|
tag: core_1.Flags.string({ description: 'Tag (repeatable)', multiple: true }),
|
|
223
223
|
'label-id': core_1.Flags.string({
|
|
224
|
+
aliases: ['label'],
|
|
224
225
|
description: 'Attach a task label (repeatable) — id, or a name from `skrr labels list --applicable-to task`. ' +
|
|
225
226
|
'An unknown name is refused, never created. Manage labels with `skrr labels`.',
|
|
226
227
|
multiple: true,
|
|
227
228
|
}),
|
|
229
|
+
'working-directory': core_1.Flags.string({
|
|
230
|
+
description: "Working directory for this task's local Harness runs — an absolute path on " +
|
|
231
|
+
"the daemon's filesystem. Overrides the agent's default; omit to inherit the " +
|
|
232
|
+
'agent default, then the daemon session default.',
|
|
233
|
+
}),
|
|
228
234
|
worktree: core_1.Flags.boolean({
|
|
229
235
|
allowNo: true,
|
|
230
236
|
description: "Isolate this task's autonomous runs in a one-shot git worktree (--worktree), " +
|
|
@@ -380,6 +380,7 @@ class TasksList extends base_command_1.BaseCommand {
|
|
|
380
380
|
multiple: true,
|
|
381
381
|
}),
|
|
382
382
|
'label-id': core_1.Flags.string({
|
|
383
|
+
aliases: ['label'],
|
|
383
384
|
description: 'Filter to tasks carrying EVERY listed label id (repeatable, AND-intersection)',
|
|
384
385
|
multiple: true,
|
|
385
386
|
}),
|
|
@@ -402,6 +402,51 @@ class TasksShow extends base_command_1.BaseCommand {
|
|
|
402
402
|
this.log(`Result: ${priorLine}`);
|
|
403
403
|
}
|
|
404
404
|
this.log(`Executor: ${taskExecutorLabel(t, this.config.bin)}`);
|
|
405
|
+
// Effective run directory, resolved the same way the server resolves it —
|
|
406
|
+
// most specific scope wins: task → space → agent. The daemon layers below
|
|
407
|
+
// (session.defaultCwd → --cwd) are the daemon's own and cannot be read
|
|
408
|
+
// here, so when no owned layer wins the row is omitted rather than
|
|
409
|
+
// labelled "inherited". Two extra reads, paid only when the row can say
|
|
410
|
+
// something (a detail view).
|
|
411
|
+
if (typeof t.workingDirectory === 'string' && t.workingDirectory) {
|
|
412
|
+
this.log(`Directory: ${t.workingDirectory} (task)`);
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
let spaceDir = null;
|
|
416
|
+
let agentDir = null;
|
|
417
|
+
if (typeof t.spaceId === 'string' && t.spaceId) {
|
|
418
|
+
try {
|
|
419
|
+
const space = (await data_provider_1.dataService.getSpace(t.spaceId));
|
|
420
|
+
if (typeof space?.workingDirectory === 'string' && space.workingDirectory) {
|
|
421
|
+
spaceDir = space.workingDirectory;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
catch {
|
|
425
|
+
// Unreadable space → no claim, not a wrong one.
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
if (!spaceDir) {
|
|
429
|
+
const agentRef = (typeof t.driAgentId === 'string' && t.driAgentId) ||
|
|
430
|
+
(Array.isArray(t.assigneeAgentIds) ? t.assigneeAgentIds[0] : null);
|
|
431
|
+
if (agentRef) {
|
|
432
|
+
try {
|
|
433
|
+
const agentRow = (await data_provider_1.dataService.getAgentById({
|
|
434
|
+
agent_id: agentRef,
|
|
435
|
+
}));
|
|
436
|
+
if (typeof agentRow?.workingDirectory === 'string' && agentRow.workingDirectory) {
|
|
437
|
+
agentDir = agentRow.workingDirectory;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
catch {
|
|
441
|
+
// Same rule: unreadable → silence.
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
const inheritedDir = spaceDir ?? agentDir;
|
|
446
|
+
if (inheritedDir) {
|
|
447
|
+
this.log(`Directory: ${inheritedDir} (${spaceDir ? 'space' : 'agent'} default)`);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
405
450
|
this.log(`Priority: ${t.priority ?? '-'}`);
|
|
406
451
|
this.log(`Parent: ${t.parentId ?? '-'}`);
|
|
407
452
|
this.log(`Space: ${t.spaceId ?? '-'}`);
|
|
@@ -58,6 +58,7 @@ export default class TasksUpdate extends BaseCommand {
|
|
|
58
58
|
tag: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
59
59
|
'label-id': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
60
60
|
'repair-release-pins': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
61
|
+
'working-directory': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
61
62
|
worktree: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
62
63
|
};
|
|
63
64
|
run(): Promise<void>;
|
|
@@ -158,6 +158,7 @@ class TasksUpdate extends base_command_1.BaseCommand {
|
|
|
158
158
|
}),
|
|
159
159
|
tag: core_1.Flags.string({ description: 'Replace tags (repeatable)', multiple: true }),
|
|
160
160
|
'label-id': core_1.Flags.string({
|
|
161
|
+
aliases: ['label'],
|
|
161
162
|
description: 'Replace the task labels with these ids (repeatable, whole-list). ' +
|
|
162
163
|
'Use `skrr tasks labels attach/detach` for incremental changes.',
|
|
163
164
|
multiple: true,
|
|
@@ -167,6 +168,11 @@ class TasksUpdate extends base_command_1.BaseCommand {
|
|
|
167
168
|
'rejected with AGENT_RELEASE_PIN_STATE_INVALID: pins that govern no current ' +
|
|
168
169
|
'assignee are dropped and broken ones are re-resolved (recorded in the activity log).',
|
|
169
170
|
}),
|
|
171
|
+
'working-directory': core_1.Flags.string({
|
|
172
|
+
description: "Working directory for this task's local Harness runs — an absolute path on " +
|
|
173
|
+
'the daemon\'s filesystem. Overrides the agent\'s default. Pass "none" to ' +
|
|
174
|
+
'clear back to inheriting the agent default.',
|
|
175
|
+
}),
|
|
170
176
|
worktree: core_1.Flags.boolean({
|
|
171
177
|
allowNo: true,
|
|
172
178
|
description: "Isolate this task's autonomous runs in a git worktree (--worktree) or force " +
|
|
@@ -347,6 +353,10 @@ class TasksUpdate extends base_command_1.BaseCommand {
|
|
|
347
353
|
// Worktree isolation override. --worktree ⇒ 'ephemeral', --no-worktree ⇒
|
|
348
354
|
// 'shared', omitted ⇒ unchanged. (Clear-to-inherit via --from-json.)
|
|
349
355
|
executionIsolation: (0, tasks_2.executionIsolationFromWorktreeFlag)(flags.worktree),
|
|
356
|
+
// Per-task working-directory override. --working-directory <abs path> ⇒
|
|
357
|
+
// set; "none"/"clear"/"null" ⇒ null (clears → inherit the agent
|
|
358
|
+
// default); omitted ⇒ unchanged.
|
|
359
|
+
workingDirectory: (0, tasks_2.workingDirectoryFromFlag)(flags['working-directory']),
|
|
350
360
|
// A mutation option, not a field — `undefined` unless explicitly asked
|
|
351
361
|
// for, so it never counts toward the "nothing to update" check below.
|
|
352
362
|
repairReleasePins: flags['repair-release-pins'] ? true : undefined,
|
|
@@ -360,6 +370,18 @@ class TasksUpdate extends base_command_1.BaseCommand {
|
|
|
360
370
|
retryable: false,
|
|
361
371
|
});
|
|
362
372
|
}
|
|
373
|
+
// Post-merge, so flag and --from-json inputs are checked identically. A
|
|
374
|
+
// relative path stores fine and then silently falls back at run time —
|
|
375
|
+
// refuse it here, where the mistake can still be named.
|
|
376
|
+
const workingDirectoryError = (0, tasks_2.workingDirectoryValidationError)(payload.workingDirectory);
|
|
377
|
+
if (workingDirectoryError) {
|
|
378
|
+
this.failWithCliError({
|
|
379
|
+
message: workingDirectoryError,
|
|
380
|
+
code: 'INVALID_TASK_WORKING_DIRECTORY',
|
|
381
|
+
exit: 2,
|
|
382
|
+
retryable: false,
|
|
383
|
+
});
|
|
384
|
+
}
|
|
363
385
|
if (payloadKeys.length === 0) {
|
|
364
386
|
this.failWithCliError({
|
|
365
387
|
message: 'Nothing to update. Pass at least one flag (e.g. --title) or --from-json.',
|
|
@@ -20,6 +20,7 @@ export default class TasksUpsert extends BaseCommand {
|
|
|
20
20
|
'assignee-user': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
21
21
|
'execution-mode': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
22
|
'due-date': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
23
|
+
'working-directory': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
23
24
|
tag: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
24
25
|
};
|
|
25
26
|
run(): Promise<void>;
|
|
@@ -57,6 +57,10 @@ class TasksUpsert extends base_command_1.BaseCommand {
|
|
|
57
57
|
options: ['agent', 'human'],
|
|
58
58
|
}),
|
|
59
59
|
'due-date': core_1.Flags.string({ description: 'Due date (ISO string)' }),
|
|
60
|
+
'working-directory': core_1.Flags.string({
|
|
61
|
+
description: "Working directory for this task's local Harness runs — an absolute path on " +
|
|
62
|
+
'the daemon\'s filesystem. Pass "none" to clear an existing override.',
|
|
63
|
+
}),
|
|
60
64
|
tag: core_1.Flags.string({ description: 'Replace/create tag (repeatable)', multiple: true }),
|
|
61
65
|
};
|
|
62
66
|
async run() {
|
|
@@ -75,6 +79,18 @@ class TasksUpsert extends base_command_1.BaseCommand {
|
|
|
75
79
|
});
|
|
76
80
|
}
|
|
77
81
|
const payload = (0, tasks_1.buildTaskCreatePayload)(body, flags);
|
|
82
|
+
// Checked here, not inside validateTaskCreatePayload's create-leg call —
|
|
83
|
+
// an upsert that resolves to UPDATE never reaches that validator, and a
|
|
84
|
+
// relative path would silently no-op at run time on the daemon.
|
|
85
|
+
const workingDirectoryError = (0, tasks_1.workingDirectoryValidationError)(payload.workingDirectory);
|
|
86
|
+
if (workingDirectoryError) {
|
|
87
|
+
this.failWithCliError({
|
|
88
|
+
message: workingDirectoryError,
|
|
89
|
+
code: 'INVALID_TASK_WORKING_DIRECTORY',
|
|
90
|
+
exit: 2,
|
|
91
|
+
retryable: false,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
78
94
|
let scope;
|
|
79
95
|
try {
|
|
80
96
|
scope = await (0, tasks_1.resolveTaskCreateScope)(payload);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const COMMITMENT_RESPONSIBILITY_LEVELS: readonly ["reasoning_only", "full_ownership"];
|
|
2
2
|
export declare const REASONING_TOOL_ESCAPES: readonly ["bash", "browser"];
|
|
3
|
+
/** Warning printed by the three retired Commitment permission flags (OSK-11975). */
|
|
4
|
+
export declare const COMMITMENT_PERMISSION_FLAG_RETIRED = "This setting no longer has any effect: Commitment runs use the agent's own permissions.";
|
|
3
5
|
export declare const RELEASE_INSTALL_CHANNELS: readonly ["latest", "manual"];
|
|
4
6
|
/**
|
|
5
7
|
* `09:00-18:00` or `09:00-18:00@America/Los_Angeles`, or a JSON object.
|
package/dist/lib/agent-config.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RELEASE_INSTALL_CHANNELS = exports.REASONING_TOOL_ESCAPES = exports.COMMITMENT_RESPONSIBILITY_LEVELS = void 0;
|
|
3
|
+
exports.RELEASE_INSTALL_CHANNELS = exports.COMMITMENT_PERMISSION_FLAG_RETIRED = exports.REASONING_TOOL_ESCAPES = exports.COMMITMENT_RESPONSIBILITY_LEVELS = void 0;
|
|
4
4
|
exports.parseWorkingHoursFlag = parseWorkingHoursFlag;
|
|
5
5
|
exports.mergeAgentConfigFlags = mergeAgentConfigFlags;
|
|
6
6
|
const prompt_1 = require("./prompt");
|
|
7
7
|
const agent_visual_refs_1 = require("./agent-visual-refs");
|
|
8
8
|
exports.COMMITMENT_RESPONSIBILITY_LEVELS = ['reasoning_only', 'full_ownership'];
|
|
9
9
|
exports.REASONING_TOOL_ESCAPES = ['bash', 'browser'];
|
|
10
|
+
/** Warning printed by the three retired Commitment permission flags (OSK-11975). */
|
|
11
|
+
exports.COMMITMENT_PERMISSION_FLAG_RETIRED = "This setting no longer has any effect: Commitment runs use the agent's own permissions.";
|
|
10
12
|
exports.RELEASE_INSTALL_CHANNELS = ['latest', 'manual'];
|
|
11
13
|
/**
|
|
12
14
|
* `09:00-18:00` or `09:00-18:00@America/Los_Angeles`, or a JSON object.
|
|
@@ -94,6 +94,20 @@ export type AgenticStreamOptions = {
|
|
|
94
94
|
/** How long to keep trying to attach before reporting a detach. Default 30s. */
|
|
95
95
|
attachTimeoutMs?: number;
|
|
96
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* What a permission request would DO, in one line a person can judge.
|
|
99
|
+
*
|
|
100
|
+
* The prompt used to be `Allow tool <name>?` and nothing else, so a shell
|
|
101
|
+
* approval read "Allow tool unknown? [y/N]" and a person approved a command
|
|
102
|
+
* they never saw (OSK-12119). The command, or else the path, or else the
|
|
103
|
+
* arguments, is the part that decides the answer.
|
|
104
|
+
*
|
|
105
|
+
* The text is chosen by the agent and printed to a terminal, so control
|
|
106
|
+
* characters are escaped: an embedded carriage return or escape sequence could
|
|
107
|
+
* otherwise redraw the line and show the person a different command than the
|
|
108
|
+
* one they are approving.
|
|
109
|
+
*/
|
|
110
|
+
export declare function describePermissionTarget(toolInput: unknown): string | null;
|
|
97
111
|
/**
|
|
98
112
|
* Small Node-side adapter for the existing Agentic Socket.IO contract.
|
|
99
113
|
* It deliberately normalizes only lifecycle/text/tool events; the server's
|
|
@@ -159,6 +173,25 @@ export type ProjectedToolEvent = {
|
|
|
159
173
|
* of the run. The pairing is unambiguous within a turn.
|
|
160
174
|
*/
|
|
161
175
|
export declare function projectDaemonToolEvents(envelopes: unknown[], namesByCall: Map<string, string>): ProjectedToolEvent[];
|
|
176
|
+
/**
|
|
177
|
+
* WHO or WHAT decided a permission request, as a reader needs it (OSK-12113).
|
|
178
|
+
*
|
|
179
|
+
* `by` names the surface or fallback that resolved the ask and is a closed wire
|
|
180
|
+
* enum; `basis` beside it says what decided. The distinction is the finding: an
|
|
181
|
+
* edit acceptEdits applied on its own was recorded `by: "cli"`, which read as
|
|
182
|
+
* the CLI user having approved something nobody was asked about.
|
|
183
|
+
*/
|
|
184
|
+
export declare function describePermissionDecider(ev: {
|
|
185
|
+
by?: unknown;
|
|
186
|
+
basis?: unknown;
|
|
187
|
+
mode?: unknown;
|
|
188
|
+
surface?: unknown;
|
|
189
|
+
}): string;
|
|
190
|
+
/**
|
|
191
|
+
* Daemon `permission-resolved` envelopes as `permission.resolved` events, named
|
|
192
|
+
* by the tool their `permission-ask` announced and carrying who decided.
|
|
193
|
+
*/
|
|
194
|
+
export declare function projectPermissionResolutions(envelopes: unknown[], toolsByRequest: Map<string, string>): AgenticStreamEvent[];
|
|
162
195
|
/**
|
|
163
196
|
* The part of a cumulative snapshot that has not been shown yet.
|
|
164
197
|
*
|
|
@@ -262,8 +295,32 @@ export type SeqGap = {
|
|
|
262
295
|
from: number;
|
|
263
296
|
to: number;
|
|
264
297
|
};
|
|
298
|
+
/**
|
|
299
|
+
* `service` envelopes that carry a `notice` — words for the person, not
|
|
300
|
+
* diagnostics — projected as `session.notice` events. Today the only notice is
|
|
301
|
+
* `harness-session-reset`: the local harness could not resume its previous
|
|
302
|
+
* session and began a new one, so its local working context is gone.
|
|
303
|
+
*/
|
|
304
|
+
export declare function projectSessionNotices(envelopes: unknown[]): AgenticStreamEvent[];
|
|
265
305
|
export declare function detectSeqGap(highestApplied: number, incoming: number): SeqGap | null;
|
|
266
|
-
|
|
306
|
+
/**
|
|
307
|
+
* The notice a reader sees when chunks went missing.
|
|
308
|
+
*
|
|
309
|
+
* It names `run.result` only when this client will actually fill `run.result`
|
|
310
|
+
* from the persisted message (`recordBackfill`). The sentence used to promise
|
|
311
|
+
* it unconditionally, while `run.result.text` was folded from the envelopes
|
|
312
|
+
* that DID arrive — so the one run told to trust `run.result` was the run whose
|
|
313
|
+
* `run.result.text` was empty, with the answer only in the record (OSK-12132).
|
|
314
|
+
*/
|
|
315
|
+
export declare function seqGapNotice(gap: SeqGap, options?: {
|
|
316
|
+
recordBackfill?: boolean;
|
|
317
|
+
}): string;
|
|
318
|
+
/**
|
|
319
|
+
* The permission mode a `run.started` reports, and where it came from
|
|
320
|
+
* (OSK-12089). `null` when the event carries no mode report at all — a cloud
|
|
321
|
+
* turn from an older server, say — so nothing is claimed.
|
|
322
|
+
*/
|
|
323
|
+
export declare function describeRunPermission(event: AgenticStreamEvent): string | null;
|
|
267
324
|
export declare class AgenticStreamClient {
|
|
268
325
|
private readonly options;
|
|
269
326
|
private socket;
|
|
@@ -291,6 +348,8 @@ export declare class AgenticStreamClient {
|
|
|
291
348
|
private readonly seenLifecycle;
|
|
292
349
|
/** `call` → tool name, so a daemon `tool-call-end` can be named (OSK-7730). */
|
|
293
350
|
private readonly toolNamesByCall;
|
|
351
|
+
/** `permission-ask` requestId → tool name, to name its resolution (OSK-12113). */
|
|
352
|
+
private readonly toolNamesByPermission;
|
|
294
353
|
/** Text already written to the terminal, for suffix-only rendering. */
|
|
295
354
|
private renderedText;
|
|
296
355
|
private idleTimer;
|
|
@@ -372,6 +431,14 @@ export declare class AgenticStreamClient {
|
|
|
372
431
|
private emitToolEvent;
|
|
373
432
|
private emit;
|
|
374
433
|
private finish;
|
|
434
|
+
/**
|
|
435
|
+
* The answer as the durable record holds it, for a run whose stream had a
|
|
436
|
+
* hole. Bounded: the record is written before the terminal event is sent, so
|
|
437
|
+
* it is normally there at once, and a record that stays silent must not hold
|
|
438
|
+
* the run open — the reader then gets what the stream delivered.
|
|
439
|
+
*/
|
|
440
|
+
private readRecordedText;
|
|
441
|
+
private settle;
|
|
375
442
|
/**
|
|
376
443
|
* OSK-2944 — a transient connect failure must not end an ACCEPTED run.
|
|
377
444
|
*
|