@skrr-ai/cli 0.1.108 → 0.1.109
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 +10 -0
- package/dist/base-command.d.ts +59 -0
- package/dist/base-command.js +118 -7
- package/dist/commands/agents/update.d.ts +14 -0
- package/dist/commands/agents/update.js +40 -1
- package/dist/commands/commitments/accounting.js +7 -2
- package/dist/commands/commitments/cost.d.ts +11 -0
- package/dist/commands/commitments/cost.js +26 -3
- package/dist/commands/commitments/create.js +2 -1
- package/dist/commands/commitments/operating-review.d.ts +15 -0
- package/dist/commands/commitments/operating-review.js +103 -50
- package/dist/commands/commitments/update.js +12 -5
- package/dist/commands/doctor.js +9 -0
- package/dist/commands/goals/list.js +6 -1
- package/dist/commands/grants/rotate.js +4 -0
- package/dist/commands/login.js +42 -14
- package/dist/commands/machines/list.js +28 -6
- package/dist/commands/projects/show.js +1 -1
- package/dist/commands/revoke-daemon.js +2 -1
- package/dist/commands/spaces/workflows/archive.d.ts +1 -0
- package/dist/commands/spaces/workflows/archive.js +1 -0
- package/dist/commands/spaces/workflows/artifact.d.ts +1 -0
- package/dist/commands/spaces/workflows/artifact.js +1 -0
- package/dist/commands/spaces/workflows/cancel-node.d.ts +1 -0
- package/dist/commands/spaces/workflows/cancel-node.js +1 -0
- package/dist/commands/spaces/workflows/cancel.d.ts +1 -0
- package/dist/commands/spaces/workflows/cancel.js +6 -2
- package/dist/commands/spaces/workflows/create.d.ts +1 -0
- package/dist/commands/spaces/workflows/create.js +7 -1
- package/dist/commands/spaces/workflows/events.d.ts +1 -0
- package/dist/commands/spaces/workflows/events.js +1 -0
- package/dist/commands/spaces/workflows/fixtures/create.d.ts +1 -0
- package/dist/commands/spaces/workflows/fixtures/create.js +1 -0
- package/dist/commands/spaces/workflows/fixtures/list.d.ts +1 -0
- package/dist/commands/spaces/workflows/fixtures/list.js +1 -0
- package/dist/commands/spaces/workflows/lifecycle-diagnostics.d.ts +1 -0
- package/dist/commands/spaces/workflows/lifecycle-diagnostics.js +1 -0
- package/dist/commands/spaces/workflows/list.d.ts +1 -0
- package/dist/commands/spaces/workflows/list.js +1 -0
- package/dist/commands/spaces/workflows/node-types.d.ts +2 -0
- package/dist/commands/spaces/workflows/node-types.js +24 -6
- package/dist/commands/spaces/workflows/pause.d.ts +1 -0
- package/dist/commands/spaces/workflows/pause.js +1 -0
- package/dist/commands/spaces/workflows/plan/show.d.ts +1 -0
- package/dist/commands/spaces/workflows/plan/show.js +1 -0
- package/dist/commands/spaces/workflows/plan/update.d.ts +1 -0
- package/dist/commands/spaces/workflows/plan/update.js +1 -0
- package/dist/commands/spaces/workflows/proposals/apply.d.ts +1 -0
- package/dist/commands/spaces/workflows/proposals/apply.js +1 -0
- package/dist/commands/spaces/workflows/proposals/confirm.d.ts +1 -0
- package/dist/commands/spaces/workflows/proposals/confirm.js +1 -0
- package/dist/commands/spaces/workflows/proposals/create.d.ts +1 -0
- package/dist/commands/spaces/workflows/proposals/create.js +1 -0
- package/dist/commands/spaces/workflows/proposals/dismiss.d.ts +1 -0
- package/dist/commands/spaces/workflows/proposals/dismiss.js +1 -0
- package/dist/commands/spaces/workflows/proposals/list.d.ts +1 -0
- package/dist/commands/spaces/workflows/proposals/list.js +1 -0
- package/dist/commands/spaces/workflows/publish.d.ts +1 -0
- package/dist/commands/spaces/workflows/publish.js +9 -0
- package/dist/commands/spaces/workflows/reconcile.d.ts +1 -0
- package/dist/commands/spaces/workflows/reconcile.js +1 -0
- package/dist/commands/spaces/workflows/resume.d.ts +1 -0
- package/dist/commands/spaces/workflows/resume.js +1 -0
- package/dist/commands/spaces/workflows/retry.d.ts +1 -0
- package/dist/commands/spaces/workflows/retry.js +1 -0
- package/dist/commands/spaces/workflows/run.d.ts +1 -0
- package/dist/commands/spaces/workflows/run.js +14 -7
- package/dist/commands/spaces/workflows/runs.d.ts +1 -0
- package/dist/commands/spaces/workflows/runs.js +1 -0
- package/dist/commands/spaces/workflows/show.d.ts +25 -0
- package/dist/commands/spaces/workflows/show.js +42 -4
- package/dist/commands/spaces/workflows/signal.d.ts +12 -0
- package/dist/commands/spaces/workflows/signal.js +40 -2
- package/dist/commands/spaces/workflows/start.d.ts +1 -0
- package/dist/commands/spaces/workflows/start.js +1 -0
- package/dist/commands/spaces/workflows/task-execution/create.d.ts +1 -0
- package/dist/commands/spaces/workflows/task-execution/create.js +1 -0
- package/dist/commands/spaces/workflows/test.d.ts +1 -0
- package/dist/commands/spaces/workflows/test.js +1 -0
- package/dist/commands/spaces/workflows/triggers/create.d.ts +1 -0
- package/dist/commands/spaces/workflows/triggers/create.js +1 -0
- package/dist/commands/spaces/workflows/triggers/fire.d.ts +1 -0
- package/dist/commands/spaces/workflows/triggers/fire.js +1 -0
- package/dist/commands/spaces/workflows/triggers/list.d.ts +1 -0
- package/dist/commands/spaces/workflows/triggers/list.js +1 -0
- package/dist/commands/spaces/workflows/triggers/update.d.ts +1 -0
- package/dist/commands/spaces/workflows/triggers/update.js +1 -0
- package/dist/commands/spaces/workflows/update.d.ts +1 -0
- package/dist/commands/spaces/workflows/update.js +4 -0
- package/dist/commands/spaces/workflows/validate.d.ts +1 -0
- package/dist/commands/spaces/workflows/validate.js +15 -0
- package/dist/commands/tasks/activity.js +6 -2
- package/dist/commands/tasks/bulk-update.d.ts +1 -0
- package/dist/commands/tasks/bulk-update.js +7 -0
- package/dist/commands/tasks/complete.js +2 -1
- package/dist/commands/tasks/create-tree.d.ts +69 -0
- package/dist/commands/tasks/create-tree.js +413 -47
- package/dist/commands/tasks/list.d.ts +2 -0
- package/dist/commands/tasks/list.js +19 -1
- package/dist/commands/tasks/rearm-recurrence.d.ts +22 -0
- package/dist/commands/tasks/rearm-recurrence.js +68 -0
- package/dist/commands/tasks/show.d.ts +1 -0
- package/dist/commands/tasks/show.js +17 -3
- package/dist/commands/tasks/timeline.js +4 -0
- package/dist/commands/tasks/update.d.ts +1 -0
- package/dist/commands/tasks/update.js +6 -1
- package/dist/commands/triggers/create.js +8 -2
- package/dist/commands/triggers/parse-intent.d.ts +7 -0
- package/dist/commands/triggers/parse-intent.js +31 -9
- package/dist/commands/workspaces/grants.js +23 -3
- package/dist/commands/workspaces/members.d.ts +20 -0
- package/dist/commands/workspaces/members.js +64 -0
- package/dist/commands/workspaces/stewardship.js +14 -2
- package/dist/help.js +12 -0
- package/dist/hooks/command-not-found.js +27 -1
- package/dist/lib/command-miss.d.ts +52 -2
- package/dist/lib/command-miss.js +187 -18
- package/dist/lib/commitment-loop-status.d.ts +8 -0
- package/dist/lib/commitment-loop-status.js +45 -0
- package/dist/lib/commitments.d.ts +16 -2
- package/dist/lib/commitments.js +48 -8
- package/dist/lib/daemon-command-hint.d.ts +15 -0
- package/dist/lib/daemon-command-hint.js +21 -0
- package/dist/lib/daemon-setup.js +10 -1
- package/dist/lib/daemonBrokerRefusal.js +3 -2
- package/dist/lib/daemonHandoff.js +2 -1
- package/dist/lib/deployed-build.d.ts +43 -0
- package/dist/lib/deployed-build.js +66 -0
- package/dist/lib/grants.d.ts +27 -1
- package/dist/lib/grants.js +39 -21
- package/dist/lib/json-mode.d.ts +11 -0
- package/dist/lib/json-mode.js +19 -0
- package/dist/lib/json-output.d.ts +25 -0
- package/dist/lib/json-output.js +30 -0
- package/dist/lib/list-output.d.ts +9 -0
- package/dist/lib/list-output.js +20 -1
- package/dist/lib/local-daemon-readiness.d.ts +90 -0
- package/dist/lib/local-daemon-readiness.js +143 -0
- package/dist/lib/machines.d.ts +117 -0
- package/dist/lib/machines.js +139 -0
- package/dist/lib/managed-instruction-local.d.ts +2 -0
- package/dist/lib/managed-instruction-local.js +2 -0
- package/dist/lib/profile-machine-identity-guard.d.ts +18 -0
- package/dist/lib/profile-machine-identity-guard.js +29 -0
- package/dist/lib/request-field-flags.d.ts +20 -0
- package/dist/lib/request-field-flags.js +34 -0
- package/dist/lib/stewardship-output.d.ts +1 -1
- package/dist/lib/stewardship-output.js +26 -30
- package/dist/lib/task-batch.d.ts +61 -4
- package/dist/lib/task-batch.js +316 -80
- package/dist/lib/task-economics.d.ts +5 -0
- package/dist/lib/task-economics.js +15 -0
- package/dist/lib/task-recurrence-outcome.d.ts +6 -6
- package/dist/lib/task-recurrence-outcome.js +27 -3
- package/dist/lib/tasks.d.ts +39 -0
- package/dist/lib/tasks.js +132 -0
- package/dist/lib/triggers.d.ts +31 -1
- package/dist/lib/triggers.js +55 -1
- package/dist/lib/workflow-issues.d.ts +14 -0
- package/dist/lib/workflow-issues.js +32 -0
- package/dist/lib/workflow-run-view.d.ts +55 -0
- package/dist/lib/workflow-run-view.js +105 -0
- package/dist/lib/workspaces.d.ts +31 -4
- package/dist/lib/workspaces.js +43 -0
- package/dist/lib/write-target.d.ts +29 -0
- package/dist/lib/write-target.js +72 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/workspaceIsolationProbeWire.d.ts +51 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/workspaceIsolationProbeWire.js +50 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/workspaceIsolationProbeWire.d.ts +51 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/workspaceIsolationProbeWire.js +46 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +11 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +6718 -6370
- package/oclif.manifest.json +376 -52
- package/package.json +19 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../../base-command';
|
|
2
2
|
export default class SpacesWorkflowsFixturesCreate extends BaseCommand {
|
|
3
|
+
static aliases: string[];
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
5
6
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -6,6 +6,7 @@ const base_command_1 = require("../../../../base-command");
|
|
|
6
6
|
const prompt_1 = require("../../../../lib/prompt");
|
|
7
7
|
const space_output_1 = require("../../../../lib/space-output");
|
|
8
8
|
class SpacesWorkflowsFixturesCreate extends base_command_1.BaseCommand {
|
|
9
|
+
static aliases = ['workflows:fixtures:create'];
|
|
9
10
|
static description = 'Create a reusable fixture from a node output or an existing workflow run';
|
|
10
11
|
static args = {
|
|
11
12
|
spaceId: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../../base-command';
|
|
2
2
|
export default class SpacesWorkflowsFixturesList extends BaseCommand {
|
|
3
|
+
static aliases: string[];
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
5
6
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -6,6 +6,7 @@ const base_command_1 = require("../../../../base-command");
|
|
|
6
6
|
const format_1 = require("../../../../lib/format");
|
|
7
7
|
const space_output_1 = require("../../../../lib/space-output");
|
|
8
8
|
class SpacesWorkflowsFixturesList extends base_command_1.BaseCommand {
|
|
9
|
+
static aliases = ['workflows:fixtures:list'];
|
|
9
10
|
static description = 'List reusable node-output fixtures for a workflow';
|
|
10
11
|
static args = {
|
|
11
12
|
spaceId: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../base-command';
|
|
2
2
|
export default class SpacesWorkflowsLifecycleDiagnostics extends BaseCommand {
|
|
3
|
+
static aliases: string[];
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
5
6
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -4,6 +4,7 @@ const core_1 = require("@oclif/core");
|
|
|
4
4
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
5
|
const base_command_1 = require("../../../base-command");
|
|
6
6
|
class SpacesWorkflowsLifecycleDiagnostics extends base_command_1.BaseCommand {
|
|
7
|
+
static aliases = ['workflows:lifecycle-diagnostics'];
|
|
7
8
|
static description = 'Bounded lifecycle operational counters for a Space — pending effect age, repairs, transition conflicts, orphan stages';
|
|
8
9
|
static args = {
|
|
9
10
|
spaceId: core_1.Args.string({ required: true, ignoreStdin: true, description: 'Owning Space ID' }),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../base-command';
|
|
2
2
|
export default class SpacesWorkflowsList extends BaseCommand {
|
|
3
|
+
static aliases: string[];
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
5
6
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -6,6 +6,7 @@ const base_command_1 = require("../../../base-command");
|
|
|
6
6
|
const format_1 = require("../../../lib/format");
|
|
7
7
|
const space_output_1 = require("../../../lib/space-output");
|
|
8
8
|
class SpacesWorkflowsList extends base_command_1.BaseCommand {
|
|
9
|
+
static aliases = ['workflows:list'];
|
|
9
10
|
static description = 'List durable workflow definitions in a space';
|
|
10
11
|
static args = { spaceId: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
11
12
|
static flags = { json: core_1.Flags.boolean({ description: 'Output JSON' }) };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type WorkflowNodeType } from '@skrr-ai/data-provider';
|
|
2
2
|
import { BaseCommand } from '../../../base-command';
|
|
3
3
|
export declare function workflowNodeTypeReference(type: WorkflowNodeType): {
|
|
4
|
+
childInput?: import("@skrr-ai/data-provider").WorkflowNodeChildInput | undefined;
|
|
4
5
|
type: WorkflowNodeType;
|
|
5
6
|
typeVersion: number;
|
|
6
7
|
label: string;
|
|
@@ -33,6 +34,7 @@ export declare function workflowNodeTypeReference(type: WorkflowNodeType): {
|
|
|
33
34
|
outcomes: import("@skrr-ai/data-provider").WorkflowOutcomeSpec[];
|
|
34
35
|
};
|
|
35
36
|
export default class SpacesWorkflowsNodeTypes extends BaseCommand {
|
|
37
|
+
static aliases: string[];
|
|
36
38
|
static description: string;
|
|
37
39
|
static examples: string[];
|
|
38
40
|
static args: {
|
|
@@ -20,15 +20,22 @@ function workflowNodeTypeReference(type) {
|
|
|
20
20
|
label: definition.label,
|
|
21
21
|
description: definition.description,
|
|
22
22
|
requiredConfig: definition.requiredConfig,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
/*
|
|
24
|
+
* Every manifest field is a key of `node.config` — the inspector writes
|
|
25
|
+
* `config[field.name]`. A loop's or review loop's `join` field is its batch
|
|
26
|
+
* policy (`config.join: { policy, quorum }`); the node-level `join`
|
|
27
|
+
* ('all' | 'any') is a different thing, how incoming EDGES admit the node.
|
|
28
|
+
* This used to print `join` for the former, so an author following it put a
|
|
29
|
+
* policy object where only 'all' | 'any' is legal (OSK-15327).
|
|
30
|
+
*/
|
|
31
|
+
fields: definition.fields.map((field) => ({ ...field, path: `config.${field.name}` })),
|
|
27
32
|
defaultNode: node,
|
|
28
33
|
outcomes: definition.outcomes(node),
|
|
34
|
+
...(definition.childInput ? { childInput: definition.childInput } : {}),
|
|
29
35
|
};
|
|
30
36
|
}
|
|
31
37
|
class SpacesWorkflowsNodeTypes extends base_command_1.BaseCommand {
|
|
38
|
+
static aliases = ['workflows:node-types'];
|
|
32
39
|
static description = 'Read node config fields, defaults and review lens preset choices from the installed CLI catalog (no server requests)';
|
|
33
40
|
static examples = [
|
|
34
41
|
'<%= config.bin %> spaces workflows node-types',
|
|
@@ -59,7 +66,10 @@ class SpacesWorkflowsNodeTypes extends base_command_1.BaseCommand {
|
|
|
59
66
|
const note = 'Installed CLI authoring reference. Defaults may require configuration; fill required fields and agent choices, then validate the draft against your server before publishing.';
|
|
60
67
|
if (flags.json) {
|
|
61
68
|
this.log(JSON.stringify({
|
|
62
|
-
object: 'workflow_node_catalog',
|
|
69
|
+
object: 'workflow_node_catalog',
|
|
70
|
+
source: 'installed_cli',
|
|
71
|
+
note,
|
|
72
|
+
nodeTypes: references,
|
|
63
73
|
}, null, 2));
|
|
64
74
|
return;
|
|
65
75
|
}
|
|
@@ -72,11 +82,19 @@ class SpacesWorkflowsNodeTypes extends base_command_1.BaseCommand {
|
|
|
72
82
|
this.log(`Required config keys: ${reference.requiredConfig.join(', ') || 'none declared'}`);
|
|
73
83
|
for (const field of reference.fields) {
|
|
74
84
|
const choices = field.options?.length
|
|
75
|
-
? ` (${field.options.map((option) => option.value).join(', ')})`
|
|
85
|
+
? ` (${field.options.map((option) => option.value).join(', ')})`
|
|
86
|
+
: '';
|
|
76
87
|
this.log(` ${field.path}: ${field.label}${choices}`);
|
|
77
88
|
if (field.help)
|
|
78
89
|
this.log(` ${field.help}`);
|
|
79
90
|
}
|
|
91
|
+
this.log(` join: how incoming edges admit this node (all | any)`);
|
|
92
|
+
if (reference.childInput) {
|
|
93
|
+
this.log(`Body input: ${reference.childInput.summary}`);
|
|
94
|
+
for (const field of reference.childInput.fields) {
|
|
95
|
+
this.log(` $input.${field.name}: ${field.description}`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
80
98
|
this.log(`Default node: ${JSON.stringify(reference.defaultNode, null, 2)}`);
|
|
81
99
|
}
|
|
82
100
|
if (!args.type)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../base-command';
|
|
2
2
|
export default class SpacesWorkflowsPause extends BaseCommand {
|
|
3
|
+
static aliases: string[];
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
5
6
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -4,6 +4,7 @@ const core_1 = require("@oclif/core");
|
|
|
4
4
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
5
|
const base_command_1 = require("../../../base-command");
|
|
6
6
|
class SpacesWorkflowsPause extends base_command_1.BaseCommand {
|
|
7
|
+
static aliases = ['workflows:pause'];
|
|
7
8
|
static description = 'Pause a workflow node without cancelling its run';
|
|
8
9
|
static args = {
|
|
9
10
|
spaceId: core_1.Args.string({ description: 'Owning Space ID', required: true, ignoreStdin: true }),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../../base-command';
|
|
2
2
|
/** Read the mutable, run-scoped plan rather than the immutable workflow version. */
|
|
3
3
|
export default class SpacesWorkflowsPlanShow extends BaseCommand {
|
|
4
|
+
static aliases: string[];
|
|
4
5
|
static description: string;
|
|
5
6
|
static args: {
|
|
6
7
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -5,6 +5,7 @@ const data_provider_1 = require("@skrr-ai/data-provider");
|
|
|
5
5
|
const base_command_1 = require("../../../../base-command");
|
|
6
6
|
/** Read the mutable, run-scoped plan rather than the immutable workflow version. */
|
|
7
7
|
class SpacesWorkflowsPlanShow extends base_command_1.BaseCommand {
|
|
8
|
+
static aliases = ['workflows:plan:show'];
|
|
8
9
|
static description = 'Show the mutable Run Plan for a workflow run';
|
|
9
10
|
static args = {
|
|
10
11
|
spaceId: core_1.Args.string({ description: 'Owning Space ID', required: true, ignoreStdin: true }),
|
|
@@ -7,6 +7,7 @@ export declare function buildRunPlanUpdatePayload(body: Record<string, unknown>,
|
|
|
7
7
|
presentationRevision?: number;
|
|
8
8
|
}): RunPlanPatch;
|
|
9
9
|
export default class SpacesWorkflowsPlanUpdate extends BaseCommand {
|
|
10
|
+
static aliases: string[];
|
|
10
11
|
static description: string;
|
|
11
12
|
static args: {
|
|
12
13
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -26,6 +26,7 @@ function buildRunPlanUpdatePayload(body, overrides) {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
class SpacesWorkflowsPlanUpdate extends base_command_1.BaseCommand {
|
|
29
|
+
static aliases = ['workflows:plan:update'];
|
|
29
30
|
static description = 'Apply revision-fenced mutations to a workflow Run Plan';
|
|
30
31
|
static args = {
|
|
31
32
|
spaceId: core_1.Args.string({ description: 'Owning Space ID', required: true, ignoreStdin: true }),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../../base-command';
|
|
2
2
|
export default class SpacesWorkflowsProposalsApply extends BaseCommand {
|
|
3
|
+
static aliases: string[];
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
5
6
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -5,6 +5,7 @@ const data_provider_1 = require("@skrr-ai/data-provider");
|
|
|
5
5
|
const base_command_1 = require("../../../../base-command");
|
|
6
6
|
const prompt_1 = require("../../../../lib/prompt");
|
|
7
7
|
class SpacesWorkflowsProposalsApply extends base_command_1.BaseCommand {
|
|
8
|
+
static aliases = ['workflows:proposals:apply'];
|
|
8
9
|
static description = 'Apply a reviewed workflow proposal directly to the mutable draft';
|
|
9
10
|
static args = {
|
|
10
11
|
spaceId: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../../base-command';
|
|
2
2
|
export default class SpacesWorkflowsProposalsConfirm extends BaseCommand {
|
|
3
|
+
static aliases: string[];
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
5
6
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -5,6 +5,7 @@ const data_provider_1 = require("@skrr-ai/data-provider");
|
|
|
5
5
|
const base_command_1 = require("../../../../base-command");
|
|
6
6
|
const prompt_1 = require("../../../../lib/prompt");
|
|
7
7
|
class SpacesWorkflowsProposalsConfirm extends base_command_1.BaseCommand {
|
|
8
|
+
static aliases = ['workflows:proposals:confirm'];
|
|
8
9
|
static description = 'Issue a one-time, 10-minute confirmation ID for agent-mediated proposal Apply';
|
|
9
10
|
static args = {
|
|
10
11
|
spaceId: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
@@ -4,6 +4,7 @@ import { BaseCommand } from '../../../../base-command';
|
|
|
4
4
|
* The API compiles it and binds it to the current semantic/layout revisions.
|
|
5
5
|
*/
|
|
6
6
|
export default class SpacesWorkflowsProposalsCreate extends BaseCommand {
|
|
7
|
+
static aliases: string[];
|
|
7
8
|
static description: string;
|
|
8
9
|
static args: {
|
|
9
10
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -10,6 +10,7 @@ const space_output_1 = require("../../../../lib/space-output");
|
|
|
10
10
|
* The API compiles it and binds it to the current semantic/layout revisions.
|
|
11
11
|
*/
|
|
12
12
|
class SpacesWorkflowsProposalsCreate extends base_command_1.BaseCommand {
|
|
13
|
+
static aliases = ['workflows:proposals:create'];
|
|
13
14
|
static description = 'Create a revision-bound workflow proposal for Canvas review without changing the draft';
|
|
14
15
|
static args = {
|
|
15
16
|
spaceId: core_1.Args.string({ description: 'Owning Space ID', required: true, ignoreStdin: true }),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../../base-command';
|
|
2
2
|
export default class SpacesWorkflowsProposalsDismiss extends BaseCommand {
|
|
3
|
+
static aliases: string[];
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
5
6
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -5,6 +5,7 @@ const data_provider_1 = require("@skrr-ai/data-provider");
|
|
|
5
5
|
const base_command_1 = require("../../../../base-command");
|
|
6
6
|
const prompt_1 = require("../../../../lib/prompt");
|
|
7
7
|
class SpacesWorkflowsProposalsDismiss extends base_command_1.BaseCommand {
|
|
8
|
+
static aliases = ['workflows:proposals:dismiss'];
|
|
8
9
|
static description = 'Dismiss a workflow proposal without changing the current draft';
|
|
9
10
|
static args = {
|
|
10
11
|
spaceId: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../../base-command';
|
|
2
2
|
export default class SpacesWorkflowsProposalsList extends BaseCommand {
|
|
3
|
+
static aliases: string[];
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
5
6
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -5,6 +5,7 @@ const data_provider_1 = require("@skrr-ai/data-provider");
|
|
|
5
5
|
const base_command_1 = require("../../../../base-command");
|
|
6
6
|
const format_1 = require("../../../../lib/format");
|
|
7
7
|
class SpacesWorkflowsProposalsList extends base_command_1.BaseCommand {
|
|
8
|
+
static aliases = ['workflows:proposals:list'];
|
|
8
9
|
static description = 'List reviewable workflow proposals and their revision freshness';
|
|
9
10
|
static args = {
|
|
10
11
|
spaceId: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../base-command';
|
|
2
2
|
export default class SpacesWorkflowsPublish extends BaseCommand {
|
|
3
|
+
static aliases: string[];
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
5
6
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -4,7 +4,9 @@ const core_1 = require("@oclif/core");
|
|
|
4
4
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
5
|
const base_command_1 = require("../../../base-command");
|
|
6
6
|
const space_output_1 = require("../../../lib/space-output");
|
|
7
|
+
const workflow_issues_1 = require("../../../lib/workflow-issues");
|
|
7
8
|
class SpacesWorkflowsPublish extends base_command_1.BaseCommand {
|
|
9
|
+
static aliases = ['workflows:publish'];
|
|
8
10
|
static description = 'Validate and publish an immutable workflow version';
|
|
9
11
|
static args = {
|
|
10
12
|
spaceId: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
@@ -30,6 +32,13 @@ class SpacesWorkflowsPublish extends base_command_1.BaseCommand {
|
|
|
30
32
|
this.log(`Published workflow version ${String(version.version)} (${String(version.id)})`);
|
|
31
33
|
if (decorated.url)
|
|
32
34
|
this.log(`URL: ${decorated.url}`);
|
|
35
|
+
// Published, not refused (owner decision 2026-10-15) — so the warning has to be loud here.
|
|
36
|
+
const warnings = version.warnings ?? [];
|
|
37
|
+
if (warnings.length) {
|
|
38
|
+
this.warn(`Published with ${warnings.length} warning${warnings.length === 1 ? '' : 's'} — runs of this version will hit ${warnings.length === 1 ? 'it' : 'them'}:`);
|
|
39
|
+
for (const line of (0, workflow_issues_1.formatWorkflowIssues)(warnings))
|
|
40
|
+
this.log(line);
|
|
41
|
+
}
|
|
33
42
|
}
|
|
34
43
|
}
|
|
35
44
|
exports.default = SpacesWorkflowsPublish;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../base-command';
|
|
2
2
|
export default class SpacesWorkflowsReconcile extends BaseCommand {
|
|
3
|
+
static aliases: string[];
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
5
6
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -5,6 +5,7 @@ const data_provider_1 = require("@skrr-ai/data-provider");
|
|
|
5
5
|
const base_command_1 = require("../../../base-command");
|
|
6
6
|
const space_output_1 = require("../../../lib/space-output");
|
|
7
7
|
class SpacesWorkflowsReconcile extends base_command_1.BaseCommand {
|
|
8
|
+
static aliases = ['workflows:reconcile'];
|
|
8
9
|
static description = 'Reconcile a workflow run after a task completion or interrupted delivery';
|
|
9
10
|
static args = {
|
|
10
11
|
spaceId: core_1.Args.string({ description: 'Owning Space ID', required: true, ignoreStdin: true }),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../base-command';
|
|
2
2
|
export default class SpacesWorkflowsResume extends BaseCommand {
|
|
3
|
+
static aliases: string[];
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
5
6
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -4,6 +4,7 @@ const core_1 = require("@oclif/core");
|
|
|
4
4
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
5
|
const base_command_1 = require("../../../base-command");
|
|
6
6
|
class SpacesWorkflowsResume extends base_command_1.BaseCommand {
|
|
7
|
+
static aliases = ['workflows:resume'];
|
|
7
8
|
static description = 'Resume a paused workflow node';
|
|
8
9
|
static args = {
|
|
9
10
|
spaceId: core_1.Args.string({ description: 'Owning Space ID', required: true, ignoreStdin: true }),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../base-command';
|
|
2
2
|
export default class SpacesWorkflowsRetry extends BaseCommand {
|
|
3
|
+
static aliases: string[];
|
|
3
4
|
static description: string;
|
|
4
5
|
static args: {
|
|
5
6
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -5,6 +5,7 @@ const data_provider_1 = require("@skrr-ai/data-provider");
|
|
|
5
5
|
const base_command_1 = require("../../../base-command");
|
|
6
6
|
const space_output_1 = require("../../../lib/space-output");
|
|
7
7
|
class SpacesWorkflowsRetry extends base_command_1.BaseCommand {
|
|
8
|
+
static aliases = ['workflows:retry'];
|
|
8
9
|
static description = 'Start a retry run from a previous workflow run';
|
|
9
10
|
static args = {
|
|
10
11
|
spaceId: core_1.Args.string({ description: 'Owning Space ID', required: true, ignoreStdin: true }),
|
|
@@ -26,6 +26,7 @@ export declare function describeLoopItemsNote(node: {
|
|
|
26
26
|
} | null;
|
|
27
27
|
}): string;
|
|
28
28
|
export default class SpacesWorkflowsRun extends BaseCommand {
|
|
29
|
+
static aliases: string[];
|
|
29
30
|
static description: string;
|
|
30
31
|
static args: {
|
|
31
32
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -8,6 +8,7 @@ const base_command_1 = require("../../../base-command");
|
|
|
8
8
|
const format_1 = require("../../../lib/format");
|
|
9
9
|
const space_output_1 = require("../../../lib/space-output");
|
|
10
10
|
const workflow_run_budget_1 = require("../../../lib/workflow-run-budget");
|
|
11
|
+
const workflow_run_view_1 = require("../../../lib/workflow-run-view");
|
|
11
12
|
/**
|
|
12
13
|
* A run node's human-facing attention note, or '' when nothing is wrong.
|
|
13
14
|
*
|
|
@@ -60,6 +61,7 @@ function describeLoopItemsNote(node) {
|
|
|
60
61
|
return '';
|
|
61
62
|
}
|
|
62
63
|
class SpacesWorkflowsRun extends base_command_1.BaseCommand {
|
|
64
|
+
static aliases = ['workflows:run'];
|
|
63
65
|
static description = 'Inspect a workflow run and each durable node state';
|
|
64
66
|
static args = {
|
|
65
67
|
spaceId: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
@@ -97,26 +99,31 @@ class SpacesWorkflowsRun extends base_command_1.BaseCommand {
|
|
|
97
99
|
this.log(line);
|
|
98
100
|
if (runUrl)
|
|
99
101
|
this.log(`URL: ${runUrl}`);
|
|
100
|
-
|
|
102
|
+
// Graph order (the server's topological depth), not node-creation order (OSK-15325).
|
|
103
|
+
const nodes = (0, workflow_run_view_1.orderNodesByGraph)((run.nodes || []));
|
|
101
104
|
if (nodes.length) {
|
|
102
105
|
const rows = nodes.map((node) => ({
|
|
103
106
|
key: String(node.nodeKey ?? '-'),
|
|
104
107
|
type: String(node.nodeType ?? '-'),
|
|
105
108
|
status: String(node.status ?? '-'),
|
|
106
109
|
task: String(node.taskId ?? '-'),
|
|
107
|
-
|
|
110
|
+
detail: (0, workflow_run_view_1.describeNodeDetail)(node, describeNodeAttention(node)),
|
|
108
111
|
}));
|
|
109
112
|
(0, format_1.renderTable)(rows, [
|
|
110
113
|
{ key: 'key', header: 'NODE' },
|
|
111
114
|
{ key: 'type', header: 'TYPE' },
|
|
112
115
|
{ key: 'status', header: 'STATUS' },
|
|
113
116
|
{ key: 'task', header: 'TASK' },
|
|
114
|
-
// Only widen to
|
|
115
|
-
// so a
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
: []),
|
|
117
|
+
// Only widen to a DETAIL column when a node has something to say (needs eyes, is
|
|
118
|
+
// waiting on something, or is a loop with progress), so a plain run stays a clean
|
|
119
|
+
// four-column table (OSK-4988).
|
|
120
|
+
...(rows.some((row) => row.detail) ? [{ key: 'detail', header: 'DETAIL' }] : []),
|
|
119
121
|
], (line) => this.log(line));
|
|
122
|
+
for (const line of (0, workflow_run_view_1.describePartialOutcomes)(nodes))
|
|
123
|
+
this.log(line);
|
|
124
|
+
for (const line of (0, workflow_run_view_1.describeSignalHints)(args.spaceId, args.runId, nodes, this.config.bin)) {
|
|
125
|
+
this.log(line);
|
|
126
|
+
}
|
|
120
127
|
for (const node of nodes) {
|
|
121
128
|
const note = describeLoopItemsNote(node);
|
|
122
129
|
if (note)
|
|
@@ -19,6 +19,7 @@ export declare const WORKFLOW_RUNS_COLUMNS: Array<{
|
|
|
19
19
|
maxWidth?: number;
|
|
20
20
|
}>;
|
|
21
21
|
export default class SpacesWorkflowsRuns extends BaseCommand {
|
|
22
|
+
static aliases: string[];
|
|
22
23
|
static description: string;
|
|
23
24
|
static args: {
|
|
24
25
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -22,6 +22,7 @@ exports.WORKFLOW_RUNS_COLUMNS = [
|
|
|
22
22
|
{ key: 'id', header: 'RUN ID' },
|
|
23
23
|
];
|
|
24
24
|
class SpacesWorkflowsRuns extends base_command_1.BaseCommand {
|
|
25
|
+
static aliases = ['workflows:runs'];
|
|
25
26
|
static description = 'List recent workflow runs in a space';
|
|
26
27
|
static args = {
|
|
27
28
|
spaceId: core_1.Args.string({ description: 'Owning Space ID', required: true, ignoreStdin: true }),
|
|
@@ -1,6 +1,31 @@
|
|
|
1
|
+
import { type WorkflowDefinition, type WorkflowVersion } from '@skrr-ai/data-provider';
|
|
1
2
|
import { BaseCommand } from '../../../base-command';
|
|
3
|
+
/**
|
|
4
|
+
* Which run duration limit applies, and which only sits in the draft.
|
|
5
|
+
*
|
|
6
|
+
* Publish freezes `maxDurationMs` ON the version; the definition's top-level
|
|
7
|
+
* `maxDurationMs` is the head (draft) value and reaches runs only at the next
|
|
8
|
+
* publish. `show` printed neither, and its JSON carried only the draft value at
|
|
9
|
+
* the top level, so an unpublished edit read as the live limit (OSK-15335).
|
|
10
|
+
* `null` is "no limit", a decision as real as a number.
|
|
11
|
+
*/
|
|
12
|
+
export declare function workflowRunLimits(workflow: Pick<WorkflowDefinition, 'maxDurationMs' | 'publishedVersionId' | 'currentVersion'> & {
|
|
13
|
+
versions?: Array<Pick<WorkflowVersion, 'id' | 'version' | 'maxDurationMs'>>;
|
|
14
|
+
}): {
|
|
15
|
+
published: {
|
|
16
|
+
versionId: string;
|
|
17
|
+
version: number;
|
|
18
|
+
maxDurationMs: number | null;
|
|
19
|
+
} | null;
|
|
20
|
+
draft: {
|
|
21
|
+
maxDurationMs: number | null;
|
|
22
|
+
/** True when publishing would change the limit the next start gets. */
|
|
23
|
+
unpublishedChange: boolean;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
2
26
|
/** Show a definition and its immutable published versions. */
|
|
3
27
|
export default class SpacesWorkflowsShow extends BaseCommand {
|
|
28
|
+
static aliases: string[];
|
|
4
29
|
static description: string;
|
|
5
30
|
static args: {
|
|
6
31
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -1,11 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workflowRunLimits = workflowRunLimits;
|
|
3
4
|
const core_1 = require("@oclif/core");
|
|
4
5
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
6
|
const base_command_1 = require("../../../base-command");
|
|
6
7
|
const space_output_1 = require("../../../lib/space-output");
|
|
8
|
+
/**
|
|
9
|
+
* Which run duration limit applies, and which only sits in the draft.
|
|
10
|
+
*
|
|
11
|
+
* Publish freezes `maxDurationMs` ON the version; the definition's top-level
|
|
12
|
+
* `maxDurationMs` is the head (draft) value and reaches runs only at the next
|
|
13
|
+
* publish. `show` printed neither, and its JSON carried only the draft value at
|
|
14
|
+
* the top level, so an unpublished edit read as the live limit (OSK-15335).
|
|
15
|
+
* `null` is "no limit", a decision as real as a number.
|
|
16
|
+
*/
|
|
17
|
+
function workflowRunLimits(workflow) {
|
|
18
|
+
const published = workflow.publishedVersionId
|
|
19
|
+
? (workflow.versions ?? []).find((version) => version.id === workflow.publishedVersionId)
|
|
20
|
+
: undefined;
|
|
21
|
+
const draftMs = workflow.maxDurationMs ?? null;
|
|
22
|
+
const publishedMs = published ? (published.maxDurationMs ?? null) : null;
|
|
23
|
+
return {
|
|
24
|
+
published: published
|
|
25
|
+
? { versionId: published.id, version: published.version, maxDurationMs: publishedMs }
|
|
26
|
+
: null,
|
|
27
|
+
draft: {
|
|
28
|
+
maxDurationMs: draftMs,
|
|
29
|
+
/** True when publishing would change the limit the next start gets. */
|
|
30
|
+
unpublishedChange: published ? draftMs !== publishedMs : draftMs !== null,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function describeLimit(ms) {
|
|
35
|
+
return ms === null ? 'no run limit' : `run limit ${(0, data_provider_1.describeWorkflowDuration)(ms)}`;
|
|
36
|
+
}
|
|
7
37
|
/** Show a definition and its immutable published versions. */
|
|
8
38
|
class SpacesWorkflowsShow extends base_command_1.BaseCommand {
|
|
39
|
+
static aliases = ['workflows:show'];
|
|
9
40
|
static description = 'Show a workflow definition, draft revisions, and published versions';
|
|
10
41
|
static args = {
|
|
11
42
|
spaceId: core_1.Args.string({ description: 'Owning Space ID', required: true, ignoreStdin: true }),
|
|
@@ -27,15 +58,22 @@ class SpacesWorkflowsShow extends base_command_1.BaseCommand {
|
|
|
27
58
|
this.handleApiError(error);
|
|
28
59
|
return;
|
|
29
60
|
}
|
|
61
|
+
const runLimits = workflowRunLimits(workflow);
|
|
30
62
|
if (flags.json) {
|
|
31
|
-
this.log(JSON.stringify((0, space_output_1.withWorkflowUrl)(this.cliConfig.baseURL, args.spaceId, workflow, {
|
|
32
|
-
workflowId: args.workflowId,
|
|
33
|
-
}), null, 2));
|
|
63
|
+
this.log(JSON.stringify((0, space_output_1.withWorkflowUrl)(this.cliConfig.baseURL, args.spaceId, { ...workflow, runLimits }, { workflowId: args.workflowId }), null, 2));
|
|
34
64
|
return;
|
|
35
65
|
}
|
|
36
66
|
this.log(`ID: ${workflow.id}`);
|
|
37
67
|
this.log(`Title: ${workflow.title}`);
|
|
38
|
-
|
|
68
|
+
if (runLimits.published) {
|
|
69
|
+
this.log(`Published version: ${runLimits.published.version} (${describeLimit(runLimits.published.maxDurationMs)}; the next start gets this)`);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
this.log(`Published version: ${workflow.currentVersion || 'not published'}`);
|
|
73
|
+
}
|
|
74
|
+
if (runLimits.draft.unpublishedChange) {
|
|
75
|
+
this.log(`Draft run limit: ${describeLimit(runLimits.draft.maxDurationMs)} — not published yet; publish to apply it`);
|
|
76
|
+
}
|
|
39
77
|
this.log(`Semantic revision: ${workflow.draft.semanticRevision}`);
|
|
40
78
|
this.log(`Presentation revision:${workflow.draft.presentationRevision}`);
|
|
41
79
|
this.log(`Versions: ${workflow.versions.length}`);
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* The lines after a signal landed. "run X is succeeded" alone hid a loop item that failed in a
|
|
4
|
+
* run that nonetheless succeeded (OSK-15325), and said nothing about what the run waits on next.
|
|
5
|
+
*/
|
|
6
|
+
export declare function describeSignalResult(spaceId: string, runId: string, nodeKey: string, outcome: string, run: {
|
|
7
|
+
id?: string;
|
|
8
|
+
status?: string;
|
|
9
|
+
nodes?: unknown[];
|
|
10
|
+
} | undefined, bin?: string): string[];
|
|
2
11
|
export declare function parseSignalPayload(value: string | undefined): unknown;
|
|
3
12
|
export default class SpacesWorkflowsSignal extends BaseCommand {
|
|
13
|
+
static aliases: string[];
|
|
14
|
+
static summary: string;
|
|
4
15
|
static description: string;
|
|
16
|
+
static examples: string[];
|
|
5
17
|
static args: {
|
|
6
18
|
spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
19
|
runId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|