@skrr-ai/cli 0.1.213 → 0.1.215
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/agents/relationship/clear.d.ts +12 -0
- package/dist/commands/agents/relationship/clear.js +26 -0
- package/dist/commands/agents/relationship/edit.d.ts +15 -0
- package/dist/commands/agents/relationship/edit.js +40 -0
- package/dist/commands/agents/relationship/show.d.ts +12 -0
- package/dist/commands/agents/relationship/show.js +35 -0
- package/dist/commands/tasks/ask.d.ts +3 -2
- package/dist/commands/tasks/ask.js +4 -3
- package/dist/commands/tasks/chat/exchange.d.ts +3 -2
- package/dist/commands/tasks/chat/exchange.js +18 -6
- package/dist/commands/tasks/chat/rotate.js +5 -2
- package/dist/commands/tasks/show.d.ts +6 -1
- package/dist/commands/tasks/show.js +19 -5
- package/dist/generated/agent-guides.json +20 -20
- package/dist/lib/inbound-messages.js +7 -0
- package/dist/lib/task-asset-upload.d.ts +7 -0
- package/dist/lib/task-asset-upload.js +114 -44
- package/dist/lib/task-operations.d.ts +16 -0
- package/dist/lib/task-operations.js +39 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/personAskWindow.d.ts +23 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/personAskWindow.js +28 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.d.ts +16 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.js +110 -15
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/runtime.d.ts +7 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/personAskWindow.d.ts +23 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/personAskWindow.js +23 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.d.ts +16 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.js +179 -17
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/runtime.d.ts +7 -2
- package/dist/node_modules/@skrr-ai/auth-core/package.json +10 -0
- package/dist/node_modules/@skrr-ai/data-provider/index.js +10767 -10760
- package/oclif.manifest.json +265 -7
- package/package.json +2 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class AgentsRelationshipClear extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
agentId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
|
+
const base_command_1 = require("../../../base-command");
|
|
6
|
+
class AgentsRelationshipClear extends base_command_1.BaseCommand {
|
|
7
|
+
static description = "Clear this agent's relationship context. The continuity Duty writes a fresh one after the next material change in the conversation.";
|
|
8
|
+
static examples = ['<%= config.bin %> agents relationship clear <agent-id>'];
|
|
9
|
+
static args = { agentId: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
10
|
+
static flags = { json: core_1.Flags.boolean({ description: 'Output JSON' }) };
|
|
11
|
+
async run() {
|
|
12
|
+
this.requireAuth();
|
|
13
|
+
const { args, flags } = await this.parse(AgentsRelationshipClear);
|
|
14
|
+
let result;
|
|
15
|
+
try {
|
|
16
|
+
result = await data_provider_1.dataService.clearAgentRelationshipContext(args.agentId);
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
this.handleApiError(err);
|
|
20
|
+
}
|
|
21
|
+
if (flags.json)
|
|
22
|
+
return this.log(this.agentJson(args.agentId, result));
|
|
23
|
+
this.log(`Agent ${args.agentId}: relationship context cleared`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = AgentsRelationshipClear;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class AgentsRelationshipEdit extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
agentId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
summary: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
focus: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
question: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
|
+
const base_command_1 = require("../../../base-command");
|
|
6
|
+
class AgentsRelationshipEdit extends base_command_1.BaseCommand {
|
|
7
|
+
static description = "Replace this agent's relationship context with what you give here. The whole projection is replaced, so pass every focus and question you want kept.";
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> agents relationship edit <agent-id> --summary "Alert on unconfirmed developing stories too" --focus "NVDA export controls"',
|
|
10
|
+
];
|
|
11
|
+
static args = { agentId: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
12
|
+
static flags = {
|
|
13
|
+
summary: core_1.Flags.string({ description: 'What the agent should understand about the work now' }),
|
|
14
|
+
focus: core_1.Flags.string({ description: 'A current focus (repeatable)', multiple: true }),
|
|
15
|
+
question: core_1.Flags.string({ description: 'An open question (repeatable)', multiple: true }),
|
|
16
|
+
json: core_1.Flags.boolean({ description: 'Output JSON' }),
|
|
17
|
+
};
|
|
18
|
+
async run() {
|
|
19
|
+
this.requireAuth();
|
|
20
|
+
const { args, flags } = await this.parse(AgentsRelationshipEdit);
|
|
21
|
+
if (!flags.summary && !flags.focus?.length && !flags.question?.length) {
|
|
22
|
+
this.error('Give --summary, --focus or --question; use `relationship clear` to remove it.');
|
|
23
|
+
}
|
|
24
|
+
let result;
|
|
25
|
+
try {
|
|
26
|
+
result = await data_provider_1.dataService.setAgentRelationshipContext(args.agentId, {
|
|
27
|
+
summary: flags.summary,
|
|
28
|
+
currentFocus: flags.focus,
|
|
29
|
+
openQuestions: flags.question,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
this.handleApiError(err);
|
|
34
|
+
}
|
|
35
|
+
if (flags.json)
|
|
36
|
+
return this.log(this.agentJson(args.agentId, result));
|
|
37
|
+
this.log(`Agent ${args.agentId}: relationship context replaced`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.default = AgentsRelationshipEdit;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class AgentsRelationshipShow extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
agentId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
|
+
const base_command_1 = require("../../../base-command");
|
|
6
|
+
class AgentsRelationshipShow extends base_command_1.BaseCommand {
|
|
7
|
+
static description = "Show the relationship context every Duty turn of this agent is given: a bounded summary kept by the agent's conversation continuity Duty. It can be older than the Duty's own directive; the directive wins where they disagree.";
|
|
8
|
+
static examples = ['<%= config.bin %> agents relationship show <agent-id>'];
|
|
9
|
+
static args = { agentId: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
10
|
+
static flags = { json: core_1.Flags.boolean({ description: 'Output JSON' }) };
|
|
11
|
+
async run() {
|
|
12
|
+
this.requireAuth();
|
|
13
|
+
const { args, flags } = await this.parse(AgentsRelationshipShow);
|
|
14
|
+
let result;
|
|
15
|
+
try {
|
|
16
|
+
result = await data_provider_1.dataService.getAgentRelationshipContext(args.agentId);
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
this.handleApiError(err);
|
|
20
|
+
}
|
|
21
|
+
if (flags.json)
|
|
22
|
+
return this.log(this.agentJson(args.agentId, result));
|
|
23
|
+
const context = result.context;
|
|
24
|
+
if (!context)
|
|
25
|
+
return this.log('No relationship context is set.');
|
|
26
|
+
if (context.summary)
|
|
27
|
+
this.log(`Summary: ${context.summary}`);
|
|
28
|
+
for (const item of context.currentFocus ?? [])
|
|
29
|
+
this.log(`Focus: ${item}`);
|
|
30
|
+
for (const item of context.openQuestions ?? [])
|
|
31
|
+
this.log(`Open question: ${item}`);
|
|
32
|
+
this.log(`Updated: ${context.updatedAt ?? 'unknown'}${context.editedBy ? ` (edited by ${context.editedBy})` : ''}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = AgentsRelationshipShow;
|
|
@@ -2,8 +2,9 @@ import { type AskTaskHumanInputBody } from '@skrr-ai/data-provider';
|
|
|
2
2
|
import { BaseCommand } from '../../base-command';
|
|
3
3
|
/**
|
|
4
4
|
* `--expires`: an ISO date-time, or a length of time from now (`30m`, `4h`, `2d`).
|
|
5
|
-
* The server keeps the workspace's longest wait and refuses a
|
|
6
|
-
* with the limit in its words; this only turns the flag into a
|
|
5
|
+
* The server keeps the workspace's longest wait, when it set one, and refuses a
|
|
6
|
+
* later deadline with the limit in its words; this only turns the flag into a
|
|
7
|
+
* time. Without the flag a question waits until it is answered (OSK-33441).
|
|
7
8
|
*/
|
|
8
9
|
export declare function parseAskExpiry(value: string | undefined, now?: number): string | undefined;
|
|
9
10
|
/**
|
|
@@ -11,8 +11,9 @@ const RELATIVE_EXPIRY_RE = /^(\d+)\s*(m|h|d)$/i;
|
|
|
11
11
|
const UNIT_MS = { m: 60_000, h: 3_600_000, d: 86_400_000 };
|
|
12
12
|
/**
|
|
13
13
|
* `--expires`: an ISO date-time, or a length of time from now (`30m`, `4h`, `2d`).
|
|
14
|
-
* The server keeps the workspace's longest wait and refuses a
|
|
15
|
-
* with the limit in its words; this only turns the flag into a
|
|
14
|
+
* The server keeps the workspace's longest wait, when it set one, and refuses a
|
|
15
|
+
* later deadline with the limit in its words; this only turns the flag into a
|
|
16
|
+
* time. Without the flag a question waits until it is answered (OSK-33441).
|
|
16
17
|
*/
|
|
17
18
|
function parseAskExpiry(value, now = Date.now()) {
|
|
18
19
|
if (value === undefined)
|
|
@@ -133,7 +134,7 @@ class TasksAsk extends base_command_1.BaseCommand {
|
|
|
133
134
|
header: core_1.Flags.string({ description: 'A short label for the question (80 characters)' }),
|
|
134
135
|
'no-free-text': core_1.Flags.boolean({ description: 'Only the options may be chosen, not words' }),
|
|
135
136
|
expires: core_1.Flags.string({
|
|
136
|
-
description:
|
|
137
|
+
description: 'When it stops waiting: an ISO date-time or 30m, 4h, 2d (default: it waits until answered, unless the workspace set a longest wait, which is also the maximum)',
|
|
137
138
|
}),
|
|
138
139
|
key: core_1.Flags.string({
|
|
139
140
|
description: 'Your key for this question: the same key returns the same question, and names only one',
|
|
@@ -7,8 +7,8 @@ import { BaseCommand } from '../../../base-command';
|
|
|
7
7
|
*
|
|
8
8
|
* --close-input stop collecting more user messages into this exchange; the
|
|
9
9
|
* agent responds to what it already has.
|
|
10
|
-
* --interrupt
|
|
11
|
-
*
|
|
10
|
+
* --interrupt inject --text into the RUNNING response; the server refuses an
|
|
11
|
+
* interrupt that carries no text.
|
|
12
12
|
* --cancel terminate the exchange.
|
|
13
13
|
*/
|
|
14
14
|
export default class TasksChatExchange extends BaseCommand {
|
|
@@ -23,6 +23,7 @@ export default class TasksChatExchange extends BaseCommand {
|
|
|
23
23
|
'close-input': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
24
24
|
interrupt: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
25
25
|
cancel: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
26
|
+
text: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
27
|
reason: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
28
|
'command-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
28
29
|
};
|
|
@@ -12,15 +12,16 @@ const task_extras_1 = require("../../../lib/task-extras");
|
|
|
12
12
|
*
|
|
13
13
|
* --close-input stop collecting more user messages into this exchange; the
|
|
14
14
|
* agent responds to what it already has.
|
|
15
|
-
* --interrupt
|
|
16
|
-
*
|
|
15
|
+
* --interrupt inject --text into the RUNNING response; the server refuses an
|
|
16
|
+
* interrupt that carries no text.
|
|
17
17
|
* --cancel terminate the exchange.
|
|
18
18
|
*/
|
|
19
19
|
class TasksChatExchange extends base_command_1.BaseCommand {
|
|
20
20
|
static description = 'Close input on, interrupt, or cancel a task chat exchange';
|
|
21
21
|
static examples = [
|
|
22
22
|
'<%= config.bin %> tasks chat exchange task_abc ex_123 --close-input',
|
|
23
|
-
'<%= config.bin %> tasks chat exchange task_abc ex_123 --interrupt --
|
|
23
|
+
'<%= config.bin %> tasks chat exchange task_abc ex_123 --interrupt --text "stop, wrong file; use src/a.ts"',
|
|
24
|
+
'<%= config.bin %> tasks chat exchange task_abc ex_123 --cancel --reason "wrong file"',
|
|
24
25
|
'<%= config.bin %> tasks chat exchange task_abc ex_123 --cancel',
|
|
25
26
|
];
|
|
26
27
|
static args = {
|
|
@@ -34,14 +35,21 @@ class TasksChatExchange extends base_command_1.BaseCommand {
|
|
|
34
35
|
exclusive: ['cancel', 'interrupt'],
|
|
35
36
|
}),
|
|
36
37
|
interrupt: core_1.Flags.boolean({
|
|
37
|
-
description: '
|
|
38
|
+
description: 'Inject --text into the running response',
|
|
38
39
|
exclusive: ['cancel', 'close-input'],
|
|
39
40
|
}),
|
|
40
41
|
cancel: core_1.Flags.boolean({
|
|
41
42
|
description: 'Terminate the exchange',
|
|
42
43
|
exclusive: ['interrupt', 'close-input'],
|
|
43
44
|
}),
|
|
44
|
-
|
|
45
|
+
text: core_1.Flags.string({
|
|
46
|
+
description: 'What to tell the running response (required with --interrupt)',
|
|
47
|
+
dependsOn: ['interrupt'],
|
|
48
|
+
}),
|
|
49
|
+
reason: core_1.Flags.string({
|
|
50
|
+
description: 'Why the exchange is cancelled (--cancel only; the other two record none)',
|
|
51
|
+
dependsOn: ['cancel'],
|
|
52
|
+
}),
|
|
45
53
|
'command-id': core_1.Flags.string({
|
|
46
54
|
description: 'Actor-scoped command id for idempotency (generated when omitted)',
|
|
47
55
|
}),
|
|
@@ -52,6 +60,9 @@ class TasksChatExchange extends base_command_1.BaseCommand {
|
|
|
52
60
|
if (!flags['close-input'] && !flags.interrupt && !flags.cancel) {
|
|
53
61
|
this.error('Pass --close-input, --interrupt, or --cancel.');
|
|
54
62
|
}
|
|
63
|
+
if (flags.interrupt && !flags.text?.trim()) {
|
|
64
|
+
this.error('--interrupt needs --text: the server injects it into the running response.');
|
|
65
|
+
}
|
|
55
66
|
const taskId = await this.resolveTaskReference(args.id);
|
|
56
67
|
// Every mutation on this surface requires an actor-scoped command id; the
|
|
57
68
|
// server refuses to generate one, because a server-minted id cannot make a
|
|
@@ -59,7 +70,8 @@ class TasksChatExchange extends base_command_1.BaseCommand {
|
|
|
59
70
|
const commandId = flags['command-id'] ?? `cli-${(0, node_crypto_1.randomUUID)()}`;
|
|
60
71
|
const body = {
|
|
61
72
|
commandId,
|
|
62
|
-
...(flags.
|
|
73
|
+
...(flags.interrupt ? { text: flags.text } : {}),
|
|
74
|
+
...(flags.cancel && flags.reason ? { reason: flags.reason } : {}),
|
|
63
75
|
};
|
|
64
76
|
let result;
|
|
65
77
|
try {
|
|
@@ -15,14 +15,17 @@ class TasksChatRotate extends base_command_1.BaseCommand {
|
|
|
15
15
|
static description = 'Start a fresh chat epoch (old transcript stays in history)';
|
|
16
16
|
static examples = [
|
|
17
17
|
'<%= config.bin %> tasks chat rotate task_abc123',
|
|
18
|
-
'<%= config.bin %> tasks chat rotate task_abc123 --reason
|
|
18
|
+
'<%= config.bin %> tasks chat rotate task_abc123 --reason deleted_repair --yes',
|
|
19
19
|
];
|
|
20
20
|
static args = {
|
|
21
21
|
id: core_1.Args.string({ ignoreStdin: true, description: 'Task ID', required: true }),
|
|
22
22
|
};
|
|
23
23
|
static flags = {
|
|
24
24
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
25
|
-
reason: core_1.Flags.string({
|
|
25
|
+
reason: core_1.Flags.string({
|
|
26
|
+
description: 'Why it is rotated (the server accepts only these two; default fresh_context)',
|
|
27
|
+
options: ['fresh_context', 'deleted_repair'],
|
|
28
|
+
}),
|
|
26
29
|
yes: core_1.Flags.boolean({ char: 'y', description: 'Skip confirmation prompt' }),
|
|
27
30
|
};
|
|
28
31
|
async run() {
|
|
@@ -70,7 +70,8 @@ export declare function labelsLine(labelIds?: string[], nameById?: Map<string, s
|
|
|
70
70
|
*/
|
|
71
71
|
export declare function taskExecutorLabel(t: Record<string, unknown>, bin?: string): string;
|
|
72
72
|
/**
|
|
73
|
-
* The `Next step:` lines for a Task that nobody has been chosen to do
|
|
73
|
+
* The `Next step:` lines for a Task that nobody has been chosen to do, or whose Result is waiting
|
|
74
|
+
* on a Review.
|
|
74
75
|
*
|
|
75
76
|
* `Why:` said "Choose an executor and assignee before this Task can start" (or,
|
|
76
77
|
* for a started Task, that nobody is assigned) and nothing said how
|
|
@@ -80,6 +81,10 @@ export declare function taskExecutorLabel(t: Record<string, unknown>, bin?: stri
|
|
|
80
81
|
* started Task nobody is assigned to that carries a Result); the rest are listed by
|
|
81
82
|
* `tasks actionability`.
|
|
82
83
|
*
|
|
84
|
+
* The one other reason that prints is `review_required`: `Moved by:` said a person owns the next
|
|
85
|
+
* step and nothing said what it was (OSK-33352). Its commands need the Result's id, which only
|
|
86
|
+
* the Task carries, so they come from `reviewDecisionRemedies` rather than the action map.
|
|
87
|
+
*
|
|
83
88
|
* Pure and exported so the wording is testable without an oclif runtime.
|
|
84
89
|
*/
|
|
85
90
|
export declare function nextStepLines(t: Record<string, unknown>, bin?: string): string[];
|
|
@@ -165,8 +165,11 @@ const ASSIGNMENT_ACTIONS = new Set(['assign_task', 'set_execution_mode']);
|
|
|
165
165
|
* started with nobody assigned (OSK-20258), where the assignment says who is doing it.
|
|
166
166
|
*/
|
|
167
167
|
const ASSIGNMENT_REASONS = new Set(['assignment_required', 'started_without_assignee']);
|
|
168
|
+
/** The reason whose next step is a Review of the current Result (OSK-33352). */
|
|
169
|
+
const REVIEW_REASON = 'review_required';
|
|
168
170
|
/**
|
|
169
|
-
* The `Next step:` lines for a Task that nobody has been chosen to do
|
|
171
|
+
* The `Next step:` lines for a Task that nobody has been chosen to do, or whose Result is waiting
|
|
172
|
+
* on a Review.
|
|
170
173
|
*
|
|
171
174
|
* `Why:` said "Choose an executor and assignee before this Task can start" (or,
|
|
172
175
|
* for a started Task, that nobody is assigned) and nothing said how
|
|
@@ -176,6 +179,10 @@ const ASSIGNMENT_REASONS = new Set(['assignment_required', 'started_without_assi
|
|
|
176
179
|
* started Task nobody is assigned to that carries a Result); the rest are listed by
|
|
177
180
|
* `tasks actionability`.
|
|
178
181
|
*
|
|
182
|
+
* The one other reason that prints is `review_required`: `Moved by:` said a person owns the next
|
|
183
|
+
* step and nothing said what it was (OSK-33352). Its commands need the Result's id, which only
|
|
184
|
+
* the Task carries, so they come from `reviewDecisionRemedies` rather than the action map.
|
|
185
|
+
*
|
|
179
186
|
* Pure and exported so the wording is testable without an oclif runtime.
|
|
180
187
|
*/
|
|
181
188
|
function nextStepLines(t, bin = 'skrr') {
|
|
@@ -183,6 +190,16 @@ function nextStepLines(t, bin = 'skrr') {
|
|
|
183
190
|
if (!actionability || actionability.state === 'terminal')
|
|
184
191
|
return [];
|
|
185
192
|
const allowed = (Array.isArray(actionability.allowedActions) ? actionability.allowedActions : []).filter((row) => Boolean(row) && typeof row.action === 'string');
|
|
193
|
+
const ref = (typeof t.identifier === 'string' && t.identifier) ||
|
|
194
|
+
(typeof t.id === 'string' && t.id) ||
|
|
195
|
+
'<task-id>';
|
|
196
|
+
const asNextStep = (rows) => rows.map((row, index) => `${index === 0 ? 'Next step:' : ''}`.padEnd(13) + row);
|
|
197
|
+
if (actionability.reasonCode === REVIEW_REASON) {
|
|
198
|
+
const resultId = typeof t.currentResultId === 'string' && t.currentResultId ? t.currentResultId : undefined;
|
|
199
|
+
return asNextStep((0, task_operations_1.taskActionRemedyRows)((0, task_operations_1.reviewDecisionRemedies)(ref, resultId, bin, {
|
|
200
|
+
closable: allowed.some((row) => row.action === 'complete_task'),
|
|
201
|
+
})));
|
|
202
|
+
}
|
|
186
203
|
// A started Task nobody is assigned to that carries a Result may simply be done: the server
|
|
187
204
|
// offers closing it beside the assignment, and its reason names closing first (OSK-20258).
|
|
188
205
|
const closable = actionability.reasonCode === 'started_without_assignee';
|
|
@@ -191,15 +208,12 @@ function nextStepLines(t, bin = 'skrr') {
|
|
|
191
208
|
!actions.some((row) => row.action === 'assign_task')) {
|
|
192
209
|
actions.unshift({ action: 'assign_task' });
|
|
193
210
|
}
|
|
194
|
-
const ref = (typeof t.identifier === 'string' && t.identifier) ||
|
|
195
|
-
(typeof t.id === 'string' && t.id) ||
|
|
196
|
-
'<task-id>';
|
|
197
211
|
const rows = (0, task_operations_1.taskActionRemedyRows)(actions.flatMap((row) => (0, task_operations_1.taskActionRemedies)(row.action, ref, row.targetId, bin, {
|
|
198
212
|
allowedActions: allowed,
|
|
199
213
|
task: t,
|
|
200
214
|
reasonCode: actionability.reasonCode,
|
|
201
215
|
})));
|
|
202
|
-
return rows
|
|
216
|
+
return asNextStep(rows);
|
|
203
217
|
}
|
|
204
218
|
function resolverLabel(by, names) {
|
|
205
219
|
if (!by || typeof by !== 'object' || !by.kind)
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"id": "dependencies",
|
|
45
45
|
"title": "Dependencies",
|
|
46
46
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
47
|
-
"tokens":
|
|
47
|
+
"tokens": 731,
|
|
48
48
|
"aliases": [],
|
|
49
49
|
"explains": [
|
|
50
50
|
"CYCLE",
|
|
@@ -786,7 +786,7 @@
|
|
|
786
786
|
]
|
|
787
787
|
}
|
|
788
788
|
],
|
|
789
|
-
"hash": "
|
|
789
|
+
"hash": "fecd8dd12d61ab425e3eff713afd770787c098e437014c90bb1c369227dff3c8",
|
|
790
790
|
"tokens": 574
|
|
791
791
|
},
|
|
792
792
|
"routedIndex": {
|
|
@@ -834,7 +834,7 @@
|
|
|
834
834
|
"id": "dependencies",
|
|
835
835
|
"title": "Dependencies",
|
|
836
836
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
837
|
-
"tokens":
|
|
837
|
+
"tokens": 731,
|
|
838
838
|
"aliases": [],
|
|
839
839
|
"explains": [
|
|
840
840
|
"CYCLE",
|
|
@@ -1448,7 +1448,7 @@
|
|
|
1448
1448
|
]
|
|
1449
1449
|
}
|
|
1450
1450
|
],
|
|
1451
|
-
"hash": "
|
|
1451
|
+
"hash": "c839e3fbf739eb1459639c876dad11e7e481b7539dd96d953eab4c7f82a25b32",
|
|
1452
1452
|
"tokens": 506
|
|
1453
1453
|
},
|
|
1454
1454
|
"cards": {
|
|
@@ -1464,7 +1464,7 @@
|
|
|
1464
1464
|
"task-management"
|
|
1465
1465
|
],
|
|
1466
1466
|
"body": "## Concept model\n\n`skrr` is the durable record for work that must outlive this conversation.\n\n| Record | Question it answers |\n| --- | --- |\n| **Task** | What is owed, and where does it stand? |\n| **Expectation** | What must be true before the Task can close? |\n| **Update** | What meaningfully changed while the work ran? |\n| **Resume Point** | Where can an interrupted Run safely continue? |\n| **Result** | What did the work conclude or return? |\n| **Deliverable** | Which exact Resource version did the work produce? |\n| **Review** | Did another actor accept one exact Result? |\n| **Comment** | What does somebody need to answer? |\n| **Activity** | What happened, for the audit? A Run transcript is telemetry, not Activity. |\n\n## Decide\n\n- **Create a Task** without asking when work needs tracking across steps, sessions or a\n follow-up. Search first so you do not duplicate one, and create none for an action that\n finishes now.\n\nSearch with `skrr tasks list --q \"<query>\"`.\n\n- **Place it** in the Space the work clearly belongs to, or leave it unscoped. A new Space is a\n new boundary, never a home made for one Task.\n- **Update, Comment or Result**: an Update records a fact a later reader or Run needs; a Comment\n asks for a reply; the Result is the conclusion, submitted once. Never put a Result in a\n Comment, a transcript in Updates, or \"approved\" on a domain verdict such as NO-SHIP.\n- **Ask a person** one decision per question: the question in one line under 140 characters, the\n choices as options with the one you recommend marked, and the evidence and trade-off in the\n question's context, shown beneath it. Outside a Run there is no message beside the question, so\n the context is the only place the background goes. Mark it owner only when it concerns payment,\n sending outside, deletion, permissions, secrets, another person, or a choice redoing work cannot\n repair; otherwise the Agent that gave you the work may answer it.\n\nAsk with `skrr tasks ask <task> --question \"<one line>\" --option <a> --option <b> --recommended <n> --context \"<evidence>\"`.\n\n- **Keep its status true** while you work it: started when you begin, closed when the work is\n done, a `blocker` Update when it stops. Review is where a Review the Task's `reviewPolicy`\n requires is waited for, never a place to hand finished work over.\n\n## Workflow\n\n### Close out\n\n1. Record what exists: each Deliverable, bound to the Expectation it answers.\n2. Read what is still owed: `skrr tasks expectations <task>`.\n3. Assess each Expectation you verified, citing evidence; one you could not check is `unmet`, with the reason.\n4. Close it: `skrr tasks complete <task> --summary \"…\"` submits the Result and closes the Task in\n one step. When its `reviewPolicy` is `required`, submit with `skrr tasks result submit` and move\n it to review instead: a Review is owed, and your close as the owner would skip it.\n5. Read the Task back and report that state, not the one you intended.\n\nAn unmet Expectation or a `changes_requested` Review does not stop a close; it is recorded on it.\nSo if the work does not hold up, leave the Task open, say which Expectation failed, and record what\nblocks it as a `blocker` Update; its shape is in `updates`.\n\n## Authority\n\n| Actor | May do | Only a person may do |\n| --- | --- | --- |\n| Agent | Create and work Tasks; record Updates, Deliverables and Results; assess any Expectation that takes a judgement, citing evidence; review a Result another actor submitted | Waive an Expectation; confirm a Deliverable; make an attachment a Run input; close past a required Review |\n| Person | Everything in both columns | — |\n\nThe server cannot always tell an Agent from the person whose login it holds, so an accepted call\nis not permission: the right-hand column stays a person's even when the call would succeed. Never\nsupply or invent an Agent identity; the platform records who wrote each record.\nInside a Task's Run that is the Agent; in a session started with a person's login, it is that person.\n\nA required Review (`reviewPolicy` `required`) refuses a close only by a non-owner. The owner, and\nan Agent acting for the owner, can close without it, and that is the owner's decision. A non-owner\ncloses past it with `--force`, which records the override.\n\n## Live state\n\n- `skrr tasks show <task> --json` — status, Expectations, assignment and the Task URL.\n- `skrr tasks expectations <task>` — what is owed, with ids, and how far each one got.\n- `skrr tasks actionability <task>` — who can move the Task next, and why.\n- `skrr tasks review-queue --space <space-id>` — every judgement still outstanding in a Space.\n\n## Related guides\n\n- `spaces` — which Space, Project or Goal work belongs to, and who may work in a Space.\n- `agents` — which Agent you are, and where it runs.\n- `duties` — coming back to work later, and what an Agent keeps true over time.",
|
|
1467
|
-
"hash": "
|
|
1467
|
+
"hash": "3cc5bca8bb5d431ffe7616fc58dcb5f25ff0d8d9b6121d9cc3c1ddd74c2e262a",
|
|
1468
1468
|
"tokens": 1441,
|
|
1469
1469
|
"sections": [
|
|
1470
1470
|
{
|
|
@@ -1497,7 +1497,7 @@
|
|
|
1497
1497
|
"id": "dependencies",
|
|
1498
1498
|
"title": "Dependencies",
|
|
1499
1499
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
1500
|
-
"tokens":
|
|
1500
|
+
"tokens": 731,
|
|
1501
1501
|
"aliases": [],
|
|
1502
1502
|
"explains": [
|
|
1503
1503
|
"CYCLE",
|
|
@@ -2308,7 +2308,7 @@
|
|
|
2308
2308
|
"id": "dependencies",
|
|
2309
2309
|
"title": "Dependencies",
|
|
2310
2310
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
2311
|
-
"tokens":
|
|
2311
|
+
"tokens": 731,
|
|
2312
2312
|
"aliases": [],
|
|
2313
2313
|
"explains": [
|
|
2314
2314
|
"CYCLE",
|
|
@@ -2518,7 +2518,7 @@
|
|
|
2518
2518
|
"id": "dependencies",
|
|
2519
2519
|
"title": "Dependencies",
|
|
2520
2520
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
2521
|
-
"tokens":
|
|
2521
|
+
"tokens": 731,
|
|
2522
2522
|
"aliases": [],
|
|
2523
2523
|
"explains": [
|
|
2524
2524
|
"CYCLE",
|
|
@@ -2691,9 +2691,9 @@
|
|
|
2691
2691
|
"TASK_TREE_DEPTH_LIMIT_EXCEEDED",
|
|
2692
2692
|
"TASK_TREE_CHILD_LIMIT_EXCEEDED"
|
|
2693
2693
|
],
|
|
2694
|
-
"body": "Read this when you split work into a tree of Tasks or make one Task wait for another.\n\n## Two relations\n\n- A **child** is part of its parent: child statuses roll up, and when every child is terminal the\n parent can close by itself, with unmet obligations recorded. A child has the same author,\n workspace, Space, Duty and Goal as its parent.\n- A **dependency** says what must finish first. \"A waits for B\" is written on A as \"A is blocked by\n B\"; the server keeps the reverse edge.\n\n## A tree in one call\n\n`skrr tasks create-tree --from-json tree.json` creates every node of a file like this, children\nunder their parent and `blockedByTempIds` as dependencies:\n\n```json\n{\n \"nodes\": [\n {\n \"tempId\": \"root\",\n \"title\": \"Move invoicing to the new payment provider\",\n \"children\": [\n { \"tempId\": \"map\", \"title\": \"Map every invoice field to the provider's schema\" },\n { \"tempId\": \"build\", \"title\": \"Build the invoice export\", \"blockedByTempIds\": [\"map\"] },\n { \"tempId\": \"verify\", \"title\": \"Reconcile one month of exported invoices\", \"blockedByTempIds\": [\"build\"] }\n ]\n }\n ]\n}\n```\n\nNodes are keyed by the file (or by `--external-key-prefix`), so running it again finds the same\nTasks. After an incomplete result, run the unchanged file again with `--resume`: it confirms the\nnodes that exist and creates only the missing ones. Changing the file can name new Tasks.\n`--readback` rereads what was declared, and `--verify` and `--verify-spec` only read.\n\nBetween existing Tasks, `skrr tasks update <task-A> --add-blocked-by <task-B>` makes A wait for B\nand `--remove-blocked-by` undoes it.\n\n## Refusals\n\n| Code | Cause | Fix |\n| --- | --- | --- |\n| `CYCLE` | The edge would make a Task its own parent or blocker, directly or through others. | Remove that edge. |\n| `TASK_DEPENDENCY_TARGET_NOT_FOUND` | A dependency names a Task that does not exist. | Use an existing Task's id or identifier. |\n| `TASK_PARENT_NOT_FOUND` | The parent does not exist, or you cannot see it. | Create the parent first. |\n| `TASK_PARENT_SCOPE_MISMATCH` | The parent has another author, workspace, Space, Duty or Goal. | Choose a parent in the same scope. |\n| `TASK_TREE_DEPTH_LIMIT_EXCEEDED` | The new Task would sit deeper than a tree allows; the message names the limit. | Attach it higher up, or make it a dependency instead of a child. |\n| `TASK_TREE_CHILD_LIMIT_EXCEEDED` | The parent already has as many children as it allows; the message names the limit. | Group the work under a new intermediate child. |",
|
|
2695
|
-
"hash": "
|
|
2696
|
-
"tokens":
|
|
2694
|
+
"body": "Read this when you split work into a tree of Tasks or make one Task wait for another.\n\n## Two relations\n\n- A **child** is part of its parent: child statuses roll up, and when every child is terminal the\n parent can close by itself, with unmet obligations recorded. A child has the same author,\n workspace, Space, Duty and Goal as its parent.\n- A **dependency** says what must finish first. \"A waits for B\" is written on A as \"A is blocked by\n B\"; the server keeps the reverse edge.\n\n## A tree in one call\n\n`skrr tasks create-tree --from-json tree.json` creates every node of a file like this, children\nunder their parent and `blockedByTempIds` as dependencies:\n\n```json\n{\n \"nodes\": [\n {\n \"tempId\": \"root\",\n \"title\": \"Move invoicing to the new payment provider\",\n \"children\": [\n { \"tempId\": \"map\", \"title\": \"Map every invoice field to the provider's schema\" },\n { \"tempId\": \"build\", \"title\": \"Build the invoice export\", \"blockedByTempIds\": [\"map\"] },\n { \"tempId\": \"verify\", \"title\": \"Reconcile one month of exported invoices\", \"blockedByTempIds\": [\"build\"] }\n ]\n }\n ]\n}\n```\n\nNodes are keyed by the file (or by `--external-key-prefix`), so running it again finds the same\nTasks. After an incomplete result, run the unchanged file again with `--resume`: it confirms the\nnodes that exist and creates only the missing ones. Changing the file can name new Tasks.\n`--readback` rereads what was declared, and `--verify` and `--verify-spec` only read.\n\nBetween existing Tasks, `skrr tasks update <task-A> --add-blocked-by <task-B>` makes A wait for B\nand `--remove-blocked-by` undoes it.\n\n## Who wakes you when work you dispatched ends\n\n- Dispatched from your main chat: the Run's Result, failure or question comes back to that chat.\n- From a thread, a scheduled conversation or another Task: nothing wakes you.\n- A bounded `spawn_agent` child: call `wait_agent` before your turn ends.\n- Otherwise, or when unsure, follow it yourself: `skrr tasks watch <task>`.\n\n## Refusals\n\n| Code | Cause | Fix |\n| --- | --- | --- |\n| `CYCLE` | The edge would make a Task its own parent or blocker, directly or through others. | Remove that edge. |\n| `TASK_DEPENDENCY_TARGET_NOT_FOUND` | A dependency names a Task that does not exist. | Use an existing Task's id or identifier. |\n| `TASK_PARENT_NOT_FOUND` | The parent does not exist, or you cannot see it. | Create the parent first. |\n| `TASK_PARENT_SCOPE_MISMATCH` | The parent has another author, workspace, Space, Duty or Goal. | Choose a parent in the same scope. |\n| `TASK_TREE_DEPTH_LIMIT_EXCEEDED` | The new Task would sit deeper than a tree allows; the message names the limit. | Attach it higher up, or make it a dependency instead of a child. |\n| `TASK_TREE_CHILD_LIMIT_EXCEEDED` | The parent already has as many children as it allows; the message names the limit. | Group the work under a new intermediate child. |",
|
|
2695
|
+
"hash": "21be777c9ee00cbc5fd7ce41a59e41c3761ce61bf80891667a4f9f8f5d407aad",
|
|
2696
|
+
"tokens": 731,
|
|
2697
2697
|
"sections": [
|
|
2698
2698
|
{
|
|
2699
2699
|
"id": "records",
|
|
@@ -2725,7 +2725,7 @@
|
|
|
2725
2725
|
"id": "dependencies",
|
|
2726
2726
|
"title": "Dependencies",
|
|
2727
2727
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
2728
|
-
"tokens":
|
|
2728
|
+
"tokens": 731,
|
|
2729
2729
|
"aliases": [],
|
|
2730
2730
|
"explains": [
|
|
2731
2731
|
"CYCLE",
|
|
@@ -2944,7 +2944,7 @@
|
|
|
2944
2944
|
"id": "dependencies",
|
|
2945
2945
|
"title": "Dependencies",
|
|
2946
2946
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
2947
|
-
"tokens":
|
|
2947
|
+
"tokens": 731,
|
|
2948
2948
|
"aliases": [],
|
|
2949
2949
|
"explains": [
|
|
2950
2950
|
"CYCLE",
|
|
@@ -3151,7 +3151,7 @@
|
|
|
3151
3151
|
"id": "dependencies",
|
|
3152
3152
|
"title": "Dependencies",
|
|
3153
3153
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
3154
|
-
"tokens":
|
|
3154
|
+
"tokens": 731,
|
|
3155
3155
|
"aliases": [],
|
|
3156
3156
|
"explains": [
|
|
3157
3157
|
"CYCLE",
|
|
@@ -3361,7 +3361,7 @@
|
|
|
3361
3361
|
"id": "dependencies",
|
|
3362
3362
|
"title": "Dependencies",
|
|
3363
3363
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
3364
|
-
"tokens":
|
|
3364
|
+
"tokens": 731,
|
|
3365
3365
|
"aliases": [],
|
|
3366
3366
|
"explains": [
|
|
3367
3367
|
"CYCLE",
|
|
@@ -3571,7 +3571,7 @@
|
|
|
3571
3571
|
"id": "dependencies",
|
|
3572
3572
|
"title": "Dependencies",
|
|
3573
3573
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
3574
|
-
"tokens":
|
|
3574
|
+
"tokens": 731,
|
|
3575
3575
|
"aliases": [],
|
|
3576
3576
|
"explains": [
|
|
3577
3577
|
"CYCLE",
|
|
@@ -3783,7 +3783,7 @@
|
|
|
3783
3783
|
"id": "dependencies",
|
|
3784
3784
|
"title": "Dependencies",
|
|
3785
3785
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
3786
|
-
"tokens":
|
|
3786
|
+
"tokens": 731,
|
|
3787
3787
|
"aliases": [],
|
|
3788
3788
|
"explains": [
|
|
3789
3789
|
"CYCLE",
|
|
@@ -3993,7 +3993,7 @@
|
|
|
3993
3993
|
"id": "dependencies",
|
|
3994
3994
|
"title": "Dependencies",
|
|
3995
3995
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
3996
|
-
"tokens":
|
|
3996
|
+
"tokens": 731,
|
|
3997
3997
|
"aliases": [],
|
|
3998
3998
|
"explains": [
|
|
3999
3999
|
"CYCLE",
|
|
@@ -4201,7 +4201,7 @@
|
|
|
4201
4201
|
"id": "dependencies",
|
|
4202
4202
|
"title": "Dependencies",
|
|
4203
4203
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
4204
|
-
"tokens":
|
|
4204
|
+
"tokens": 731,
|
|
4205
4205
|
"aliases": [],
|
|
4206
4206
|
"explains": [
|
|
4207
4207
|
"CYCLE",
|
|
@@ -4404,7 +4404,7 @@
|
|
|
4404
4404
|
"id": "dependencies",
|
|
4405
4405
|
"title": "Dependencies",
|
|
4406
4406
|
"readWhen": "you split work into a tree of Tasks or make one Task wait for another",
|
|
4407
|
-
"tokens":
|
|
4407
|
+
"tokens": 731,
|
|
4408
4408
|
"aliases": [],
|
|
4409
4409
|
"explains": [
|
|
4410
4410
|
"CYCLE",
|
|
@@ -52,6 +52,13 @@ exports.HELD_COPY = {
|
|
|
52
52
|
: 'Your agent is in a long step. It will see this when the step ends.',
|
|
53
53
|
glance_unavailable: () => 'Your agent will see this at its next step.',
|
|
54
54
|
queue_paused: () => 'Paused. This sends when you resume.',
|
|
55
|
+
last_reply_unconfirmed: (d) => {
|
|
56
|
+
const until = (0, data_provider_1.messageHeldUntil)({ detail: d });
|
|
57
|
+
const waits = "Waiting for your agent's last reply to be confirmed, so nothing is done twice.";
|
|
58
|
+
return until
|
|
59
|
+
? `${waits} Sends by itself by ${until.toLocaleTimeString(undefined, { hour: 'numeric', minute: '2-digit' })}.`
|
|
60
|
+
: `${waits} Sends by itself.`;
|
|
61
|
+
},
|
|
55
62
|
};
|
|
56
63
|
exports.FAILED_COPY = {
|
|
57
64
|
agent_unavailable: 'Not delivered: this agent is no longer available.',
|
|
@@ -35,6 +35,13 @@ export interface UploadedTaskAsset {
|
|
|
35
35
|
* local file, which is a different version for any canonicalized image.
|
|
36
36
|
*/
|
|
37
37
|
digest?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The name and type the server STORED, as `tasks attachments list` shows them. The server
|
|
40
|
+
* decides both from the bytes: PNG bytes named `shot.tsx` are kept as `shot.png`, `image/png`,
|
|
41
|
+
* and a component file whose first markup is an `<svg>` is kept as `text/plain`. Only a
|
|
42
|
+
* response that names neither falls back to the local name and the type guessed from its
|
|
43
|
+
* extension; a ready attachment row always names both (OSK-33381).
|
|
44
|
+
*/
|
|
38
45
|
filename: string;
|
|
39
46
|
mimeType: string;
|
|
40
47
|
/** True when the server returned an existing row for the same sha256. */
|