@skrr-ai/cli 0.1.108 → 0.1.110

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.
Files changed (202) hide show
  1. package/README.md +10 -0
  2. package/dist/base-command.d.ts +74 -0
  3. package/dist/base-command.js +182 -24
  4. package/dist/commands/agents/triggers/create.js +1 -1
  5. package/dist/commands/agents/triggers/update.js +1 -1
  6. package/dist/commands/agents/update.d.ts +25 -0
  7. package/dist/commands/agents/update.js +98 -3
  8. package/dist/commands/commitments/accounting.js +7 -2
  9. package/dist/commands/commitments/cost.d.ts +11 -0
  10. package/dist/commands/commitments/cost.js +26 -3
  11. package/dist/commands/commitments/create.js +2 -1
  12. package/dist/commands/commitments/operating-review.d.ts +15 -0
  13. package/dist/commands/commitments/operating-review.js +103 -50
  14. package/dist/commands/commitments/update.js +12 -5
  15. package/dist/commands/daemon/install.js +17 -1
  16. package/dist/commands/daemon/login.js +14 -0
  17. package/dist/commands/doctor.js +9 -0
  18. package/dist/commands/goals/list.js +6 -1
  19. package/dist/commands/grants/rotate.js +4 -0
  20. package/dist/commands/harnesses/prune.d.ts +26 -0
  21. package/dist/commands/harnesses/prune.js +172 -0
  22. package/dist/commands/login.js +53 -14
  23. package/dist/commands/machines/list.js +28 -6
  24. package/dist/commands/projects/show.js +1 -1
  25. package/dist/commands/revoke-daemon.js +2 -1
  26. package/dist/commands/spaces/workflows/archive.d.ts +1 -0
  27. package/dist/commands/spaces/workflows/archive.js +1 -0
  28. package/dist/commands/spaces/workflows/artifact.d.ts +1 -0
  29. package/dist/commands/spaces/workflows/artifact.js +1 -0
  30. package/dist/commands/spaces/workflows/cancel-node.d.ts +1 -0
  31. package/dist/commands/spaces/workflows/cancel-node.js +1 -0
  32. package/dist/commands/spaces/workflows/cancel.d.ts +1 -0
  33. package/dist/commands/spaces/workflows/cancel.js +6 -2
  34. package/dist/commands/spaces/workflows/create.d.ts +1 -0
  35. package/dist/commands/spaces/workflows/create.js +7 -1
  36. package/dist/commands/spaces/workflows/events.d.ts +1 -0
  37. package/dist/commands/spaces/workflows/events.js +1 -0
  38. package/dist/commands/spaces/workflows/fixtures/create.d.ts +1 -0
  39. package/dist/commands/spaces/workflows/fixtures/create.js +1 -0
  40. package/dist/commands/spaces/workflows/fixtures/list.d.ts +1 -0
  41. package/dist/commands/spaces/workflows/fixtures/list.js +1 -0
  42. package/dist/commands/spaces/workflows/lifecycle-diagnostics.d.ts +1 -0
  43. package/dist/commands/spaces/workflows/lifecycle-diagnostics.js +1 -0
  44. package/dist/commands/spaces/workflows/list.d.ts +1 -0
  45. package/dist/commands/spaces/workflows/list.js +1 -0
  46. package/dist/commands/spaces/workflows/node-types.d.ts +2 -0
  47. package/dist/commands/spaces/workflows/node-types.js +24 -6
  48. package/dist/commands/spaces/workflows/pause.d.ts +1 -0
  49. package/dist/commands/spaces/workflows/pause.js +1 -0
  50. package/dist/commands/spaces/workflows/plan/show.d.ts +1 -0
  51. package/dist/commands/spaces/workflows/plan/show.js +1 -0
  52. package/dist/commands/spaces/workflows/plan/update.d.ts +1 -0
  53. package/dist/commands/spaces/workflows/plan/update.js +1 -0
  54. package/dist/commands/spaces/workflows/proposals/apply.d.ts +1 -0
  55. package/dist/commands/spaces/workflows/proposals/apply.js +1 -0
  56. package/dist/commands/spaces/workflows/proposals/confirm.d.ts +1 -0
  57. package/dist/commands/spaces/workflows/proposals/confirm.js +1 -0
  58. package/dist/commands/spaces/workflows/proposals/create.d.ts +1 -0
  59. package/dist/commands/spaces/workflows/proposals/create.js +1 -0
  60. package/dist/commands/spaces/workflows/proposals/dismiss.d.ts +1 -0
  61. package/dist/commands/spaces/workflows/proposals/dismiss.js +1 -0
  62. package/dist/commands/spaces/workflows/proposals/list.d.ts +1 -0
  63. package/dist/commands/spaces/workflows/proposals/list.js +1 -0
  64. package/dist/commands/spaces/workflows/publish.d.ts +1 -0
  65. package/dist/commands/spaces/workflows/publish.js +9 -0
  66. package/dist/commands/spaces/workflows/reconcile.d.ts +1 -0
  67. package/dist/commands/spaces/workflows/reconcile.js +1 -0
  68. package/dist/commands/spaces/workflows/resume.d.ts +1 -0
  69. package/dist/commands/spaces/workflows/resume.js +1 -0
  70. package/dist/commands/spaces/workflows/retry.d.ts +1 -0
  71. package/dist/commands/spaces/workflows/retry.js +1 -0
  72. package/dist/commands/spaces/workflows/run.d.ts +1 -0
  73. package/dist/commands/spaces/workflows/run.js +14 -7
  74. package/dist/commands/spaces/workflows/runs.d.ts +1 -0
  75. package/dist/commands/spaces/workflows/runs.js +1 -0
  76. package/dist/commands/spaces/workflows/show.d.ts +25 -0
  77. package/dist/commands/spaces/workflows/show.js +42 -4
  78. package/dist/commands/spaces/workflows/signal.d.ts +12 -0
  79. package/dist/commands/spaces/workflows/signal.js +40 -2
  80. package/dist/commands/spaces/workflows/start.d.ts +1 -0
  81. package/dist/commands/spaces/workflows/start.js +4 -1
  82. package/dist/commands/spaces/workflows/task-execution/create.d.ts +1 -0
  83. package/dist/commands/spaces/workflows/task-execution/create.js +1 -0
  84. package/dist/commands/spaces/workflows/test.d.ts +1 -0
  85. package/dist/commands/spaces/workflows/test.js +1 -0
  86. package/dist/commands/spaces/workflows/triggers/create.d.ts +1 -0
  87. package/dist/commands/spaces/workflows/triggers/create.js +1 -0
  88. package/dist/commands/spaces/workflows/triggers/fire.d.ts +1 -0
  89. package/dist/commands/spaces/workflows/triggers/fire.js +1 -0
  90. package/dist/commands/spaces/workflows/triggers/list.d.ts +1 -0
  91. package/dist/commands/spaces/workflows/triggers/list.js +1 -0
  92. package/dist/commands/spaces/workflows/triggers/update.d.ts +1 -0
  93. package/dist/commands/spaces/workflows/triggers/update.js +1 -0
  94. package/dist/commands/spaces/workflows/update.d.ts +1 -0
  95. package/dist/commands/spaces/workflows/update.js +4 -0
  96. package/dist/commands/spaces/workflows/validate.d.ts +1 -0
  97. package/dist/commands/spaces/workflows/validate.js +27 -2
  98. package/dist/commands/tasks/activity.js +17 -3
  99. package/dist/commands/tasks/bulk-update.d.ts +1 -0
  100. package/dist/commands/tasks/bulk-update.js +7 -0
  101. package/dist/commands/tasks/complete.js +2 -1
  102. package/dist/commands/tasks/create-tree.d.ts +69 -0
  103. package/dist/commands/tasks/create-tree.js +413 -47
  104. package/dist/commands/tasks/list.d.ts +2 -0
  105. package/dist/commands/tasks/list.js +25 -3
  106. package/dist/commands/tasks/rearm-recurrence.d.ts +22 -0
  107. package/dist/commands/tasks/rearm-recurrence.js +87 -0
  108. package/dist/commands/tasks/show.d.ts +9 -0
  109. package/dist/commands/tasks/show.js +79 -33
  110. package/dist/commands/tasks/timeline.js +4 -0
  111. package/dist/commands/tasks/unschedule.js +5 -1
  112. package/dist/commands/tasks/update.d.ts +1 -0
  113. package/dist/commands/tasks/update.js +17 -2
  114. package/dist/commands/triggers/audit.js +12 -3
  115. package/dist/commands/triggers/create.js +9 -3
  116. package/dist/commands/triggers/fire-detail.d.ts +7 -0
  117. package/dist/commands/triggers/fire-detail.js +30 -12
  118. package/dist/commands/triggers/fire.js +13 -3
  119. package/dist/commands/triggers/parse-intent.d.ts +7 -0
  120. package/dist/commands/triggers/parse-intent.js +31 -9
  121. package/dist/commands/triggers/update.js +1 -1
  122. package/dist/commands/workspaces/grants.js +20 -3
  123. package/dist/commands/workspaces/members.d.ts +20 -0
  124. package/dist/commands/workspaces/members.js +64 -0
  125. package/dist/commands/workspaces/stewardship.js +14 -2
  126. package/dist/help.js +12 -0
  127. package/dist/hooks/command-not-found.js +27 -1
  128. package/dist/lib/command-miss.d.ts +52 -2
  129. package/dist/lib/command-miss.js +187 -18
  130. package/dist/lib/commitment-loop-status.d.ts +8 -0
  131. package/dist/lib/commitment-loop-status.js +45 -0
  132. package/dist/lib/commitment-product.js +5 -2
  133. package/dist/lib/commitments.d.ts +18 -3
  134. package/dist/lib/commitments.js +85 -45
  135. package/dist/lib/daemon-command-hint.d.ts +15 -0
  136. package/dist/lib/daemon-command-hint.js +21 -0
  137. package/dist/lib/daemon-machine-identity-copy.d.ts +14 -0
  138. package/dist/lib/daemon-machine-identity-copy.js +27 -0
  139. package/dist/lib/daemon-machine-identity.d.ts +27 -0
  140. package/dist/lib/daemon-machine-identity.js +61 -0
  141. package/dist/lib/daemon-setup.js +10 -1
  142. package/dist/lib/daemonBrokerRefusal.js +3 -2
  143. package/dist/lib/daemonHandoff.d.ts +19 -1
  144. package/dist/lib/daemonHandoff.js +61 -1
  145. package/dist/lib/deployed-build.d.ts +43 -0
  146. package/dist/lib/deployed-build.js +66 -0
  147. package/dist/lib/grants.d.ts +27 -1
  148. package/dist/lib/grants.js +39 -21
  149. package/dist/lib/harnesses.d.ts +71 -0
  150. package/dist/lib/harnesses.js +70 -0
  151. package/dist/lib/json-mode.d.ts +11 -0
  152. package/dist/lib/json-mode.js +19 -0
  153. package/dist/lib/json-output.d.ts +25 -0
  154. package/dist/lib/json-output.js +30 -0
  155. package/dist/lib/list-output.d.ts +10 -1
  156. package/dist/lib/list-output.js +22 -1
  157. package/dist/lib/local-daemon-readiness.d.ts +90 -0
  158. package/dist/lib/local-daemon-readiness.js +143 -0
  159. package/dist/lib/machines.d.ts +117 -0
  160. package/dist/lib/machines.js +139 -0
  161. package/dist/lib/managed-instruction-local.d.ts +2 -0
  162. package/dist/lib/managed-instruction-local.js +2 -0
  163. package/dist/lib/profile-machine-identity-guard.d.ts +18 -0
  164. package/dist/lib/profile-machine-identity-guard.js +39 -0
  165. package/dist/lib/request-field-flags.d.ts +20 -0
  166. package/dist/lib/request-field-flags.js +34 -0
  167. package/dist/lib/stewardship-output.d.ts +1 -1
  168. package/dist/lib/stewardship-output.js +26 -30
  169. package/dist/lib/task-batch.d.ts +61 -4
  170. package/dist/lib/task-batch.js +316 -80
  171. package/dist/lib/task-economics.d.ts +15 -0
  172. package/dist/lib/task-economics.js +39 -2
  173. package/dist/lib/task-recurrence-outcome.d.ts +6 -6
  174. package/dist/lib/task-recurrence-outcome.js +27 -3
  175. package/dist/lib/tasks.d.ts +39 -0
  176. package/dist/lib/tasks.js +132 -0
  177. package/dist/lib/triggers.d.ts +42 -1
  178. package/dist/lib/triggers.js +98 -2
  179. package/dist/lib/workflow-issues.d.ts +14 -0
  180. package/dist/lib/workflow-issues.js +32 -0
  181. package/dist/lib/workflow-run-view.d.ts +59 -0
  182. package/dist/lib/workflow-run-view.js +110 -0
  183. package/dist/lib/workspaces.d.ts +48 -4
  184. package/dist/lib/workspaces.js +55 -0
  185. package/dist/lib/write-target.d.ts +29 -0
  186. package/dist/lib/write-target.js +72 -0
  187. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +1 -1
  188. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +5 -3
  189. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineUuid.d.ts +60 -0
  190. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineUuid.js +130 -6
  191. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/workspaceIsolationProbeWire.d.ts +51 -0
  192. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/workspaceIsolationProbeWire.js +50 -0
  193. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +1 -1
  194. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +1 -1
  195. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineUuid.d.ts +60 -0
  196. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineUuid.js +128 -6
  197. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/workspaceIsolationProbeWire.d.ts +51 -0
  198. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/workspaceIsolationProbeWire.js +46 -0
  199. package/dist/node_modules/@skrr-ai/auth-core/package.json +11 -1
  200. package/dist/node_modules/@skrr-ai/data-provider/index.js +7523 -7140
  201. package/oclif.manifest.json +473 -59
  202. package/package.json +28 -1
@@ -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
- fields: definition.fields.map((field) => ({
24
- ...field,
25
- path: field.name === 'join' ? 'join' : `config.${field.name}`,
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', source: 'installed_cli', note, nodeTypes: references,
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
- const nodes = (run.nodes || []);
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
- attention: describeNodeAttention(node),
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 an ATTENTION column when a node actually needs eyes,
115
- // so a healthy run stays a clean four-column table (OSK-4988).
116
- ...(rows.some((row) => row.attention)
117
- ? [{ key: 'attention', header: 'ATTENTION' }]
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
- this.log(`Published version: ${workflow.currentVersion || 'not published'}`);
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>>;
@@ -1,11 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.describeSignalResult = describeSignalResult;
3
4
  exports.parseSignalPayload = parseSignalPayload;
4
5
  const core_1 = require("@oclif/core");
5
6
  const data_provider_1 = require("@skrr-ai/data-provider");
6
7
  const base_command_1 = require("../../../base-command");
7
8
  const prompt_1 = require("../../../lib/prompt");
8
9
  const space_output_1 = require("../../../lib/space-output");
10
+ const workflow_run_view_1 = require("../../../lib/workflow-run-view");
11
+ /**
12
+ * The lines after a signal landed. "run X is succeeded" alone hid a loop item that failed in a
13
+ * run that nonetheless succeeded (OSK-15325), and said nothing about what the run waits on next.
14
+ */
15
+ function describeSignalResult(spaceId, runId, nodeKey, outcome, run, bin = 'skrr') {
16
+ const id = run?.id ?? runId;
17
+ const lines = [`Signalled ${nodeKey} with ${outcome}; run ${id} is ${run?.status ?? 'updated'}.`];
18
+ const nodes = (0, workflow_run_view_1.orderNodesByGraph)((run?.nodes ?? []));
19
+ lines.push(...(0, workflow_run_view_1.describePartialOutcomes)(nodes));
20
+ lines.push(...(0, workflow_run_view_1.describeSignalHints)(spaceId, id, nodes, bin));
21
+ return lines;
22
+ }
9
23
  const OUTCOMES = ['success', 'failure', 'true', 'false'];
10
24
  function parseSignalPayload(value) {
11
25
  if (value === undefined)
@@ -18,7 +32,29 @@ function parseSignalPayload(value) {
18
32
  }
19
33
  }
20
34
  class SpacesWorkflowsSignal extends base_command_1.BaseCommand {
21
- static description = 'Resolve a waiting approval or event node in a workflow run';
35
+ static aliases = ['workflows:signal'];
36
+ static summary = 'Resolve a waiting approval or event node in a workflow run';
37
+ /*
38
+ * The two ways to resolve a wait live under different topics — a person
39
+ * signals here, a machine event resolves through a `workflow_signal`
40
+ * trigger — and neither help pointed at the other (OSK-15315).
41
+ */
42
+ static description = [
43
+ 'Needs Space edit access; a token with edit access may call the same signal API.',
44
+ 'The event key a node waits on describes the wait and does not itself authorize a signal.',
45
+ '',
46
+ 'To let a machine event resolve an event wait instead, author a workflow_signal trigger on the Space:',
47
+ ' skrr triggers create --scope space_oracle --ref spaceId=<space-id> --kind event \\',
48
+ ' --entity <entity> --event <event> --mode workflow_signal --workflow-event-key <key>',
49
+ 'It resolves only event waits parked on exactly that key, never an approval.',
50
+ '',
51
+ 'A node that was already resolved, is not waiting yet, or waits on its own work (a loop, a',
52
+ 'child run, a Task) is refused with what the run found, and nothing changes.',
53
+ ].join('\n');
54
+ static examples = [
55
+ '<%= config.bin %> workflows signal <space-id> <run-id> approval_1 --outcome success',
56
+ '<%= config.bin %> workflows signal <space-id> <run-id> wait_event_1 --payload \'{"approved":true}\'',
57
+ ];
22
58
  static args = {
23
59
  spaceId: core_1.Args.string({ description: 'Owning Space ID', required: true, ignoreStdin: true }),
24
60
  runId: core_1.Args.string({ description: 'Workflow run ID', required: true, ignoreStdin: true }),
@@ -70,7 +106,9 @@ class SpacesWorkflowsSignal extends base_command_1.BaseCommand {
70
106
  return;
71
107
  }
72
108
  const run = result.run;
73
- this.log(`Signalled ${args.nodeKey} with ${flags.outcome}; run ${run?.id ?? args.runId} is ${run?.status ?? 'updated'}.`);
109
+ for (const line of describeSignalResult(args.spaceId, args.runId, args.nodeKey, String(flags.outcome), run, this.config.bin)) {
110
+ this.log(line);
111
+ }
74
112
  }
75
113
  }
76
114
  exports.default = SpacesWorkflowsSignal;
@@ -17,6 +17,7 @@ export declare function formatStartedRunLine(result: {
17
17
  };
18
18
  }): string;
19
19
  export default class SpacesWorkflowsStart extends BaseCommand {
20
+ static aliases: string[];
20
21
  static description: string;
21
22
  static args: {
22
23
  spaceId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
@@ -21,6 +21,7 @@ function formatStartedRunLine(result) {
21
21
  return `${verb} workflow run ${result.run.id} (${result.run.status})${version}`;
22
22
  }
23
23
  class SpacesWorkflowsStart extends base_command_1.BaseCommand {
24
+ static aliases = ['workflows:start'];
24
25
  static description = 'Start a durable run of a published workflow';
25
26
  static args = {
26
27
  spaceId: core_1.Args.string({ required: true, ignoreStdin: true }),
@@ -79,8 +80,10 @@ class SpacesWorkflowsStart extends base_command_1.BaseCommand {
79
80
  return;
80
81
  }
81
82
  const decorated = (0, space_output_1.withWorkflowUrl)(this.cliConfig.baseURL, args.spaceId, result, { workflowId: args.workflowId, runId: result.run.id });
83
+ // The id this command created, at the top where a script looks for it, instead of only
84
+ // inside `run` (OSK-16494). The nested run is unchanged.
82
85
  if (flags.json)
83
- return this.log(JSON.stringify(decorated, null, 2));
86
+ return this.log(JSON.stringify({ runId: result.run.id, status: result.run.status, ...decorated }, null, 2));
84
87
  this.log(formatStartedRunLine(result));
85
88
  // The run someone just started is the one they most want to watch, so the
86
89
  // link comes before the command that prints the same thing as text.
@@ -1,6 +1,7 @@
1
1
  import { BaseCommand } from '../../../../base-command';
2
2
  /** Compile existing Space Tasks into one durable, observable execution run. */
3
3
  export default class SpacesWorkflowsTaskExecutionCreate 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>>;
@@ -6,6 +6,7 @@ const base_command_1 = require("../../../../base-command");
6
6
  const space_output_1 = require("../../../../lib/space-output");
7
7
  /** Compile existing Space Tasks into one durable, observable execution run. */
8
8
  class SpacesWorkflowsTaskExecutionCreate extends base_command_1.BaseCommand {
9
+ static aliases = ['workflows:task-execution:create'];
9
10
  static description = 'Create and start an execution workflow over existing Space Tasks';
10
11
  static args = {
11
12
  spaceId: core_1.Args.string({ required: true, ignoreStdin: true }),