voratiq 0.1.0-beta.20 → 0.1.0-beta.22

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 (194) hide show
  1. package/README.md +18 -22
  2. package/dist/agents/launch/chat.d.ts +3 -1
  3. package/dist/agents/launch/chat.js +2 -0
  4. package/dist/agents/runtime/policy.d.ts +1 -1
  5. package/dist/bin.js +78 -26
  6. package/dist/cli/auto.js +1 -0
  7. package/dist/cli/contract.d.ts +58 -19
  8. package/dist/cli/contract.js +44 -5
  9. package/dist/cli/doctor.d.ts +12 -0
  10. package/dist/cli/doctor.js +115 -0
  11. package/dist/cli/list.js +7 -1
  12. package/dist/cli/message.d.ts +28 -0
  13. package/dist/cli/message.js +147 -0
  14. package/dist/cli/operator-envelope.d.ts +37 -3
  15. package/dist/cli/operator-envelope.js +109 -4
  16. package/dist/cli/reduce.js +5 -2
  17. package/dist/cli/run.js +2 -0
  18. package/dist/cli/verify.d.ts +1 -1
  19. package/dist/cli/verify.js +54 -11
  20. package/dist/commands/auto/command.d.ts +1 -0
  21. package/dist/commands/auto/command.js +22 -12
  22. package/dist/commands/auto/errors.js +1 -1
  23. package/dist/commands/doctor/agents.d.ts +5 -0
  24. package/dist/commands/{init → doctor}/agents.js +37 -19
  25. package/dist/commands/doctor/command.d.ts +22 -0
  26. package/dist/commands/doctor/command.js +99 -0
  27. package/dist/commands/doctor/environment.d.ts +2 -0
  28. package/dist/commands/{init → doctor}/environment.js +38 -6
  29. package/dist/commands/{init/types.d.ts → doctor/fix-types.d.ts} +30 -9
  30. package/dist/commands/doctor/fix.d.ts +2 -0
  31. package/dist/commands/{init/command.js → doctor/fix.js} +106 -10
  32. package/dist/commands/doctor/reconcile.d.ts +2 -0
  33. package/dist/commands/doctor/reconcile.js +101 -0
  34. package/dist/commands/interactive/lifecycle.d.ts +2 -0
  35. package/dist/commands/interactive/lifecycle.js +8 -0
  36. package/dist/commands/list/command.d.ts +2 -0
  37. package/dist/commands/list/command.js +241 -272
  38. package/dist/commands/list/normalization.d.ts +56 -0
  39. package/dist/commands/list/normalization.js +317 -0
  40. package/dist/commands/message/command.d.ts +24 -0
  41. package/dist/commands/message/command.js +236 -0
  42. package/dist/commands/message/errors.d.ts +18 -0
  43. package/dist/commands/message/errors.js +36 -0
  44. package/dist/commands/message/lifecycle.d.ts +14 -0
  45. package/dist/commands/message/lifecycle.js +128 -0
  46. package/dist/commands/reduce/command.d.ts +1 -0
  47. package/dist/commands/reduce/command.js +19 -18
  48. package/dist/commands/reduce/errors.d.ts +2 -2
  49. package/dist/commands/reduce/errors.js +3 -3
  50. package/dist/commands/reduce/targets.d.ts +1 -0
  51. package/dist/commands/reduce/targets.js +59 -4
  52. package/dist/commands/root-launcher/command.js +12 -6
  53. package/dist/commands/run/command.d.ts +1 -0
  54. package/dist/commands/run/command.js +4 -1
  55. package/dist/commands/run/record-init.d.ts +2 -0
  56. package/dist/commands/run/record-init.js +2 -1
  57. package/dist/commands/run/spec-provenance.d.ts +37 -0
  58. package/dist/commands/run/spec-provenance.js +384 -0
  59. package/dist/commands/run/validation.d.ts +4 -0
  60. package/dist/commands/run/validation.js +25 -62
  61. package/dist/commands/shared/resolve-stage-competitors.js +4 -1
  62. package/dist/commands/spec/command.js +19 -6
  63. package/dist/commands/spec/errors.d.ts +5 -0
  64. package/dist/commands/spec/errors.js +9 -0
  65. package/dist/commands/verify/agents.d.ts +4 -2
  66. package/dist/commands/verify/agents.js +4 -11
  67. package/dist/commands/verify/command.d.ts +1 -0
  68. package/dist/commands/verify/command.js +17 -6
  69. package/dist/commands/verify/errors.d.ts +12 -0
  70. package/dist/commands/verify/errors.js +22 -0
  71. package/dist/commands/verify/max-parallel.d.ts +1 -1
  72. package/dist/commands/verify/max-parallel.js +3 -1
  73. package/dist/commands/verify/targets.d.ts +2 -1
  74. package/dist/commands/verify/targets.js +256 -28
  75. package/dist/competition/shared/preflight.d.ts +1 -1
  76. package/dist/competition/shared/preflight.js +15 -2
  77. package/dist/configs/agents/defaults.js +25 -25
  78. package/dist/configs/orchestration/bootstrap.d.ts +6 -1
  79. package/dist/configs/orchestration/bootstrap.js +27 -6
  80. package/dist/configs/orchestration/types.d.ts +25 -10
  81. package/dist/configs/orchestration/types.js +10 -6
  82. package/dist/configs/verification/types.d.ts +5 -0
  83. package/dist/configs/verification/types.js +3 -0
  84. package/dist/contracts/list.d.ts +130 -116
  85. package/dist/contracts/list.js +54 -77
  86. package/dist/domain/interactive/persistence/adapter.d.ts +23 -0
  87. package/dist/domain/interactive/persistence/adapter.js +42 -0
  88. package/dist/domain/message/competition/adapter.d.ts +36 -0
  89. package/dist/domain/message/competition/adapter.js +197 -0
  90. package/dist/domain/message/competition/prompt.d.ts +8 -0
  91. package/dist/domain/message/competition/prompt.js +29 -0
  92. package/dist/domain/message/model/mutators.d.ts +17 -0
  93. package/dist/domain/message/model/mutators.js +107 -0
  94. package/dist/domain/message/model/types.d.ts +132 -0
  95. package/dist/domain/message/model/types.js +112 -0
  96. package/dist/domain/message/persistence/adapter.d.ts +43 -0
  97. package/dist/domain/message/persistence/adapter.js +124 -0
  98. package/dist/domain/reduce/competition/adapter.d.ts +1 -0
  99. package/dist/domain/reduce/competition/adapter.js +78 -11
  100. package/dist/domain/reduce/competition/finalize.d.ts +7 -0
  101. package/dist/domain/reduce/competition/finalize.js +19 -0
  102. package/dist/domain/reduce/competition/prompt.d.ts +1 -1
  103. package/dist/domain/reduce/model/types.d.ts +6 -3
  104. package/dist/domain/reduce/model/types.js +2 -1
  105. package/dist/domain/run/competition/agents/artifacts.js +4 -2
  106. package/dist/domain/run/competition/errors.d.ts +1 -1
  107. package/dist/domain/run/competition/errors.js +4 -7
  108. package/dist/domain/run/model/types.d.ts +384 -0
  109. package/dist/domain/run/model/types.js +87 -0
  110. package/dist/domain/spec/competition/adapter.d.ts +1 -0
  111. package/dist/domain/spec/competition/adapter.js +6 -1
  112. package/dist/domain/spec/model/types.d.ts +3 -0
  113. package/dist/domain/spec/model/types.js +5 -0
  114. package/dist/domain/verify/competition/adapter.js +8 -5
  115. package/dist/domain/verify/competition/finalize.d.ts +9 -0
  116. package/dist/domain/verify/competition/finalize.js +22 -3
  117. package/dist/domain/verify/competition/programmatic.js +3 -0
  118. package/dist/domain/verify/competition/prompt.js +6 -0
  119. package/dist/domain/verify/competition/rubric.js +7 -1
  120. package/dist/domain/verify/competition/shared-layout.d.ts +42 -2
  121. package/dist/domain/verify/competition/shared-layout.js +92 -21
  122. package/dist/domain/verify/competition/target.d.ts +17 -0
  123. package/dist/domain/verify/model/types.d.ts +22 -4
  124. package/dist/domain/verify/model/types.js +15 -2
  125. package/dist/interactive/providers/mcp.d.ts +1 -0
  126. package/dist/interactive/providers/mcp.js +45 -7
  127. package/dist/interactive/substrate.js +20 -3
  128. package/dist/mcp/server.d.ts +2 -2
  129. package/dist/mcp/server.js +51 -17
  130. package/dist/policy/verification.js +20 -1
  131. package/dist/preflight/agents.d.ts +24 -0
  132. package/dist/preflight/agents.js +71 -0
  133. package/dist/preflight/environment.d.ts +6 -0
  134. package/dist/preflight/environment.js +17 -0
  135. package/dist/preflight/formatting.d.ts +5 -0
  136. package/dist/preflight/formatting.js +20 -0
  137. package/dist/preflight/index.d.ts +4 -0
  138. package/dist/preflight/index.js +7 -9
  139. package/dist/preflight/operator.d.ts +32 -0
  140. package/dist/preflight/operator.js +40 -0
  141. package/dist/preflight/settings.d.ts +2 -0
  142. package/dist/preflight/settings.js +17 -0
  143. package/dist/render/transcripts/interactive.d.ts +16 -0
  144. package/dist/render/transcripts/interactive.js +42 -0
  145. package/dist/render/transcripts/list.d.ts +43 -0
  146. package/dist/render/transcripts/list.js +173 -0
  147. package/dist/render/transcripts/message.d.ts +73 -0
  148. package/dist/render/transcripts/message.js +361 -0
  149. package/dist/render/transcripts/reduce.d.ts +1 -0
  150. package/dist/render/transcripts/reduce.js +21 -21
  151. package/dist/render/transcripts/root-launcher.js +2 -12
  152. package/dist/render/transcripts/run.d.ts +3 -0
  153. package/dist/render/transcripts/run.js +30 -4
  154. package/dist/render/transcripts/spec.js +5 -8
  155. package/dist/render/transcripts/stage-progress.d.ts +1 -1
  156. package/dist/render/transcripts/verify.d.ts +9 -3
  157. package/dist/render/transcripts/verify.js +44 -25
  158. package/dist/render/utils/duration.d.ts +5 -0
  159. package/dist/render/utils/duration.js +6 -0
  160. package/dist/render/utils/runs.d.ts +1 -0
  161. package/dist/render/utils/runs.js +1 -0
  162. package/dist/render/utils/transcript-shell.d.ts +2 -1
  163. package/dist/render/utils/transcript-shell.js +24 -5
  164. package/dist/status/index.d.ts +21 -0
  165. package/dist/status/index.js +30 -0
  166. package/dist/utils/errors.d.ts +2 -1
  167. package/dist/utils/errors.js +3 -1
  168. package/dist/utils/git.d.ts +1 -1
  169. package/dist/utils/git.js +25 -2
  170. package/dist/utils/list-target.d.ts +4 -0
  171. package/dist/utils/list-target.js +35 -0
  172. package/dist/utils/terminal.d.ts +1 -0
  173. package/dist/utils/terminal.js +11 -0
  174. package/dist/workspace/chat/artifacts.d.ts +7 -0
  175. package/dist/workspace/chat/artifacts.js +94 -3
  176. package/dist/workspace/errors.js +2 -2
  177. package/dist/workspace/managed-state.d.ts +32 -0
  178. package/dist/workspace/managed-state.js +103 -0
  179. package/dist/workspace/setup.js +78 -8
  180. package/dist/workspace/shim.d.ts +1 -0
  181. package/dist/workspace/shim.js +3 -3
  182. package/dist/workspace/structure.d.ts +15 -6
  183. package/dist/workspace/structure.js +26 -9
  184. package/dist/workspace/verification-defaults.d.ts +1 -1
  185. package/dist/workspace/verification-defaults.js +255 -0
  186. package/package.json +16 -17
  187. package/dist/cli/init.d.ts +0 -15
  188. package/dist/cli/init.js +0 -70
  189. package/dist/commands/init/agents.d.ts +0 -4
  190. package/dist/commands/init/command.d.ts +0 -2
  191. package/dist/commands/init/environment.d.ts +0 -2
  192. package/dist/render/transcripts/init.d.ts +0 -7
  193. package/dist/render/transcripts/init.js +0 -83
  194. /package/dist/commands/{init/types.js → doctor/fix-types.js} +0 -0
package/README.md CHANGED
@@ -1,15 +1,11 @@
1
1
  # Voratiq
2
2
 
3
- Agent ensembles to design, generate, and select the best code for every task.
3
+ Run workflows, delegate to swarms, and verify outputs before you apply them.
4
4
 
5
- ![`voratiq auto --spec .voratiq/spec/categorical-performance-by-taxonomy.md`](https://raw.githubusercontent.com/voratiq/voratiq/main/assets/run-demo.png)
6
-
7
- No single model wins every task. Run several, keep the best result. [Here's why that works](https://voratiq.com/blog/selection-rather-than-prediction/).
5
+ Voratiq provides composable operators for structured multi-agent workflows, with durable artifacts and session history that keep each step inspectable as work unfolds.
8
6
 
9
7
  ## Installation
10
8
 
11
- Install via npm:
12
-
13
9
  ```bash
14
10
  npm install -g voratiq
15
11
  ```
@@ -23,7 +19,7 @@ npm install -g voratiq
23
19
  - macOS: `ripgrep`
24
20
  - Linux (Debian/Ubuntu): `bubblewrap`, `socat`, `ripgrep`
25
21
 
26
- See the [sandbox runtime docs](https://github.com/anthropic-experimental/sandbox-runtime/blob/1bafa66a2c3ebc52569fc0c1a868e85e778f66a0/README.md#platform-specific-dependencies) for guidance on the platform-specific dependencies.
22
+ See the [sandbox runtime docs](https://github.com/anthropic-experimental/sandbox-runtime/blob/1bafa66a2c3ebc52569fc0c1a868e85e778f66a0/README.md#platform-specific-dependencies) for platform-specific dependencies.
27
23
 
28
24
  Windows is not currently supported.
29
25
 
@@ -31,40 +27,40 @@ Windows is not currently supported.
31
27
 
32
28
  ## Quick Start
33
29
 
34
- Get started with a single command:
30
+ From a git repo root, run:
35
31
 
36
32
  ```bash
37
33
  voratiq
38
34
  ```
39
35
 
40
- This drops you into an interactive session with an agent of your choice.
41
-
42
- That agent gets access to Voratiq tools for orchestration and verification.
36
+ That opens an interactive agent session with access to Voratiq's operators.
43
37
 
44
- Describe what you want built, and the agent can use those tools to:
38
+ From there, the agent can:
45
39
 
46
- - turn your request into a structured execution plan
47
- - delegate work to a custom-designed swarm or a multi-stage workflow
48
- - verify outputs and compare alternatives before choosing what to keep
49
- - track outcomes across runs to learn which agents and workflows work best
40
+ - run multi-step workflows with explicit stages
41
+ - delegate work to swarms of agents
42
+ - verify outputs before applying them
43
+ - use different workflow architectures for different tasks
44
+ - inspect session history and artifacts
50
45
 
51
- You keep the native interactive workflow, with more execution depth and control.
46
+ For more information, see the [getting started](https://github.com/voratiq/voratiq/blob/main/docs/getting-started.md) guide.
52
47
 
53
48
  ## Documentation
54
49
 
55
50
  Start here:
56
51
 
57
- - [Tutorial](https://github.com/voratiq/voratiq/blob/main/docs/tutorial.md) - End-to-end walkthrough
52
+ - [Getting Started](https://github.com/voratiq/voratiq/blob/main/docs/getting-started.md) - Which workflow to use and how to run it
53
+ - [How It Works](https://github.com/voratiq/voratiq/blob/main/docs/how-it-works.md) - Operators, verification, and artifacts
58
54
  - [CLI Reference](https://github.com/voratiq/voratiq/blob/main/docs/cli-reference.md) - Commands and options
59
- - [Core Concepts](https://github.com/voratiq/voratiq/blob/main/docs/core-concepts.md) - Workflow model and design rationale
55
+ - [Troubleshooting](https://github.com/voratiq/voratiq/blob/main/docs/troubleshooting.md) - Common setup and runtime issues
60
56
 
61
57
  Configuration:
62
58
 
63
59
  - [Agents](https://github.com/voratiq/voratiq/blob/main/docs/configs/agents.md) - Agent catalog and invocation details
64
- - [Orchestration](https://github.com/voratiq/voratiq/blob/main/docs/configs/orchestration.md) - Which agents run at each stage
65
- - [Verification](https://github.com/voratiq/voratiq/blob/main/docs/configs/verification.md) - How agent outputs are checked and scored before selection
66
- - [Environment](https://github.com/voratiq/voratiq/blob/main/docs/configs/environment.md) - Runtime dependencies for agents
60
+ - [Environment](https://github.com/voratiq/voratiq/blob/main/docs/configs/environment.md) - Runtime dependencies for agent execution
67
61
  - [Sandbox](https://github.com/voratiq/voratiq/blob/main/docs/configs/sandbox.md) - Network and filesystem restrictions
62
+ - [Orchestration](https://github.com/voratiq/voratiq/blob/main/docs/configs/orchestration.md) - Which agents participate at each workflow stage
63
+ - [Verification](https://github.com/voratiq/voratiq/blob/main/docs/configs/verification.md) - How verification is configured across stages
68
64
 
69
65
  ## License
70
66
 
@@ -1,4 +1,4 @@
1
- import { type ProviderTranscriptBaseline } from "../../workspace/chat/artifacts.js";
1
+ import { type ProviderTranscriptBaseline, type ProviderTranscriptSelectionHint } from "../../workspace/chat/artifacts.js";
2
2
  import type { ChatArtifactFormat } from "../../workspace/chat/types.js";
3
3
  export interface LaunchArtifactCaptureResult {
4
4
  readonly captured: boolean;
@@ -10,11 +10,13 @@ export interface LaunchArtifactCaptureResult {
10
10
  export interface LaunchArtifactCaptureContext {
11
11
  readonly searchEnv?: NodeJS.ProcessEnv;
12
12
  readonly baseline?: ProviderTranscriptBaseline;
13
+ readonly selectionHint?: ProviderTranscriptSelectionHint;
13
14
  }
14
15
  export declare function prepareProviderArtifactCaptureContext(options: {
15
16
  providerId: string | undefined;
16
17
  sessionRoot: string;
17
18
  searchEnv?: NodeJS.ProcessEnv;
19
+ selectionHint?: ProviderTranscriptSelectionHint;
18
20
  }): Promise<LaunchArtifactCaptureContext | undefined>;
19
21
  export declare function collectProviderArtifacts(options: {
20
22
  providerId: string | undefined;
@@ -11,6 +11,7 @@ export async function prepareProviderArtifactCaptureContext(options) {
11
11
  agentRoot: options.sessionRoot,
12
12
  searchEnv: options.searchEnv,
13
13
  }),
14
+ selectionHint: options.selectionHint,
14
15
  };
15
16
  }
16
17
  export async function collectProviderArtifacts(options) {
@@ -23,6 +24,7 @@ export async function collectProviderArtifacts(options) {
23
24
  agentRoot: options.sessionRoot,
24
25
  searchEnv: options.captureContext?.searchEnv,
25
26
  baseline: options.captureContext?.baseline,
27
+ selectionHint: options.captureContext?.selectionHint,
26
28
  });
27
29
  const format = result.format;
28
30
  if ((result.status === "captured" || result.status === "already-exists") &&
@@ -1,6 +1,6 @@
1
1
  import type { SandboxFilesystemConfig, SandboxNetworkConfig } from "../../configs/sandbox/types.js";
2
2
  import type { SandboxPolicyOverrides } from "./types.js";
3
- export type SandboxStageId = "run" | "spec" | "verify" | "reduce";
3
+ export type SandboxStageId = "spec" | "run" | "reduce" | "verify" | "message";
4
4
  export interface BuildSandboxPolicyInput {
5
5
  stageId: SandboxStageId;
6
6
  root: string;
package/dist/bin.js CHANGED
@@ -65,6 +65,13 @@ async function handleSignal(signal) {
65
65
  process.exit(exitCode);
66
66
  }
67
67
  async function flushPendingHistory() {
68
+ try {
69
+ const { flushAllSpecRecordBuffers } = await import("./domain/spec/persistence/adapter.js");
70
+ await flushAllSpecRecordBuffers();
71
+ }
72
+ catch (error) {
73
+ console.warn(`[voratiq] Failed to flush spec history buffers: ${error.message}`);
74
+ }
68
75
  try {
69
76
  const { flushAllRunRecordBuffers } = await import("./domain/run/persistence/adapter.js");
70
77
  await flushAllRunRecordBuffers();
@@ -73,32 +80,32 @@ async function flushPendingHistory() {
73
80
  console.warn(`[voratiq] Failed to flush run history buffers: ${error.message}`);
74
81
  }
75
82
  try {
76
- const { flushAllVerificationRecordBuffers } = await import("./domain/verify/persistence/adapter.js");
77
- await flushAllVerificationRecordBuffers();
83
+ const { flushAllReductionRecordBuffers } = await import("./domain/reduce/persistence/adapter.js");
84
+ await flushAllReductionRecordBuffers();
78
85
  }
79
86
  catch (error) {
80
- console.warn(`[voratiq] Failed to flush verification history buffers: ${error.message}`);
87
+ console.warn(`[voratiq] Failed to flush reduction history buffers: ${error.message}`);
81
88
  }
82
89
  try {
83
- const { flushAllInteractiveSessionBuffers } = await import("./domain/interactive/persistence/adapter.js");
84
- await flushAllInteractiveSessionBuffers();
90
+ const { flushAllVerificationRecordBuffers } = await import("./domain/verify/persistence/adapter.js");
91
+ await flushAllVerificationRecordBuffers();
85
92
  }
86
93
  catch (error) {
87
- console.warn(`[voratiq] Failed to flush interactive history buffers: ${error.message}`);
94
+ console.warn(`[voratiq] Failed to flush verification history buffers: ${error.message}`);
88
95
  }
89
96
  try {
90
- const { flushAllSpecRecordBuffers } = await import("./domain/spec/persistence/adapter.js");
91
- await flushAllSpecRecordBuffers();
97
+ const { flushAllMessageRecordBuffers } = await import("./domain/message/persistence/adapter.js");
98
+ await flushAllMessageRecordBuffers();
92
99
  }
93
100
  catch (error) {
94
- console.warn(`[voratiq] Failed to flush spec history buffers: ${error.message}`);
101
+ console.warn(`[voratiq] Failed to flush message history buffers: ${error.message}`);
95
102
  }
96
103
  try {
97
- const { flushAllReductionRecordBuffers } = await import("./domain/reduce/persistence/adapter.js");
98
- await flushAllReductionRecordBuffers();
104
+ const { flushAllInteractiveSessionBuffers } = await import("./domain/interactive/persistence/adapter.js");
105
+ await flushAllInteractiveSessionBuffers();
99
106
  }
100
107
  catch (error) {
101
- console.warn(`[voratiq] Failed to flush reduction history buffers: ${error.message}`);
108
+ console.warn(`[voratiq] Failed to flush interactive history buffers: ${error.message}`);
102
109
  }
103
110
  }
104
111
  async function terminateActiveRunSafe(status, context) {
@@ -140,16 +147,50 @@ async function terminateActiveInteractiveSafe(status, context) {
140
147
  return normalizedError;
141
148
  }
142
149
  }
150
+ async function terminateActiveMessageSafe(status, context) {
151
+ try {
152
+ const { terminateActiveMessage } = await import("./commands/message/lifecycle.js");
153
+ await terminateActiveMessage(status);
154
+ return null;
155
+ }
156
+ catch (error) {
157
+ const { toErrorMessage } = await import("./utils/errors.js");
158
+ const normalizedError = error instanceof Error ? error : new Error(toErrorMessage(error));
159
+ console.error(`[voratiq] Failed to teardown message after ${context}: ${toErrorMessage(error)}`);
160
+ return normalizedError;
161
+ }
162
+ }
143
163
  async function terminateActiveSessionsSafe(status, context) {
144
164
  const runError = await terminateActiveRunSafe(status, context);
145
165
  const verificationError = await terminateActiveVerificationSafe(status, context);
146
166
  const interactiveError = await terminateActiveInteractiveSafe(status, context);
147
- const errors = [runError, verificationError, interactiveError].filter((error) => error instanceof Error);
167
+ const messageError = await terminateActiveMessageSafe(status, context);
168
+ const errors = [
169
+ runError,
170
+ verificationError,
171
+ interactiveError,
172
+ messageError,
173
+ ].filter((error) => error instanceof Error);
148
174
  if (errors.length > 1) {
149
175
  return new AggregateError(errors, `Failed to teardown active sessions after ${context}`);
150
176
  }
151
177
  return errors[0] ?? null;
152
178
  }
179
+ function renderRootLauncherGitGuidance(options) {
180
+ const lines = [];
181
+ if (options.reason === "not_repository_root") {
182
+ lines.push("Bare `voratiq` launches an interactive session from a repository root.", "", `Current directory: ${options.cwd}`);
183
+ if (options.repositoryRoot) {
184
+ lines.push(`Repository root: ${options.repositoryRoot}`);
185
+ }
186
+ lines.push("", "Next step:", options.repositoryRoot
187
+ ? ` cd ${options.repositoryRoot} && voratiq`
188
+ : " Switch to the repository root and rerun `voratiq`.");
189
+ return lines.join("\n");
190
+ }
191
+ lines.push("Bare `voratiq` launches an interactive session from a git repository root.", "", `Current directory: ${options.cwd}`, "", "Next steps:", " git init", " voratiq", "", "Or switch to an existing repository root and rerun `voratiq`.");
192
+ return lines.join("\n");
193
+ }
153
194
  export async function runCli(argv = process.argv) {
154
195
  installProcessGuards();
155
196
  const { Command, CommanderError } = await import("commander");
@@ -162,7 +203,7 @@ export async function runCli(argv = process.argv) {
162
203
  const localVersion = (await import("./utils/version.js")).getVoratiqVersion();
163
204
  program
164
205
  .name("voratiq")
165
- .description("Agent ensembles to design, generate, and select the best code for every task.")
206
+ .description("Run workflows, delegate to swarms, and verify outputs before you apply them.")
166
207
  .enablePositionalOptions()
167
208
  .version(localVersion, "-v, --version", "print the Voratiq version")
168
209
  .exitOverride()
@@ -228,7 +269,13 @@ export async function runCli(argv = process.argv) {
228
269
  (error.reason === "no_repository" ||
229
270
  error.reason === "not_repository_root")) {
230
271
  const { writeCommandOutput } = await import("./cli/output.js");
231
- writeCommandOutput({ body: program.helpInformation() });
272
+ writeCommandOutput({
273
+ body: renderRootLauncherGitGuidance({
274
+ cwd: process.cwd(),
275
+ reason: error.reason,
276
+ repositoryRoot: error.repositoryRoot,
277
+ }),
278
+ });
232
279
  return;
233
280
  }
234
281
  const { toCliError } = await import("./cli/errors.js");
@@ -304,15 +351,16 @@ async function registerCommands(program, argv) {
304
351
  const wantsHelp = argv.includes("--help") || argv.includes("-h");
305
352
  const wantsVersion = argv.includes("--version") || argv.includes("-v");
306
353
  const knownCommandNames = new Set([
307
- "auto",
308
- "init",
309
354
  "spec",
310
355
  "run",
311
- "verify",
312
356
  "reduce",
357
+ "verify",
358
+ "message",
359
+ "auto",
313
360
  "apply",
314
361
  "list",
315
362
  "prune",
363
+ "doctor",
316
364
  "mcp",
317
365
  ]);
318
366
  const loadAll = commandName === undefined ||
@@ -322,25 +370,20 @@ async function registerCommands(program, argv) {
322
370
  return;
323
371
  }
324
372
  if (loadAll) {
325
- program.addCommand((await import("./cli/auto.js")).createAutoCommand());
326
- program.addCommand((await import("./cli/init.js")).createInitCommand());
327
373
  program.addCommand((await import("./cli/spec.js")).createSpecCommand());
328
374
  program.addCommand((await import("./cli/run.js")).createRunCommand());
329
375
  program.addCommand((await import("./cli/reduce.js")).createReduceCommand());
330
376
  program.addCommand((await import("./cli/verify.js")).createVerifyCommand());
377
+ program.addCommand((await import("./cli/message.js")).createMessageCommand());
378
+ program.addCommand((await import("./cli/auto.js")).createAutoCommand());
331
379
  program.addCommand((await import("./cli/apply.js")).createApplyCommand());
332
380
  program.addCommand((await import("./cli/list.js")).createListCommand());
333
381
  program.addCommand((await import("./cli/prune.js")).createPruneCommand());
382
+ program.addCommand((await import("./cli/doctor.js")).createDoctorCommand());
334
383
  program.addCommand((await import("./cli/mcp.js")).createMcpCommand());
335
384
  return;
336
385
  }
337
386
  switch (commandName) {
338
- case "init":
339
- program.addCommand((await import("./cli/init.js")).createInitCommand());
340
- break;
341
- case "list":
342
- program.addCommand((await import("./cli/list.js")).createListCommand());
343
- break;
344
387
  case "spec":
345
388
  program.addCommand((await import("./cli/spec.js")).createSpecCommand());
346
389
  break;
@@ -353,15 +396,24 @@ async function registerCommands(program, argv) {
353
396
  case "verify":
354
397
  program.addCommand((await import("./cli/verify.js")).createVerifyCommand());
355
398
  break;
399
+ case "message":
400
+ program.addCommand((await import("./cli/message.js")).createMessageCommand());
401
+ break;
356
402
  case "auto":
357
403
  program.addCommand((await import("./cli/auto.js")).createAutoCommand());
358
404
  break;
359
405
  case "apply":
360
406
  program.addCommand((await import("./cli/apply.js")).createApplyCommand());
361
407
  break;
408
+ case "list":
409
+ program.addCommand((await import("./cli/list.js")).createListCommand());
410
+ break;
362
411
  case "prune":
363
412
  program.addCommand((await import("./cli/prune.js")).createPruneCommand());
364
413
  break;
414
+ case "doctor":
415
+ program.addCommand((await import("./cli/doctor.js")).createDoctorCommand());
416
+ break;
365
417
  case "mcp":
366
418
  program.addCommand((await import("./cli/mcp.js")).createMcpCommand());
367
419
  break;
package/dist/cli/auto.js CHANGED
@@ -157,6 +157,7 @@ export async function runAutoCommand(options, runtime = {}) {
157
157
  selectedSpecPath: result.selectedSpecPath,
158
158
  selection: result.selection?.decision,
159
159
  selectionWarnings: result.selection?.warnings,
160
+ warningMessage: result.warningMessage,
160
161
  })),
161
162
  runApplyStage: async (input) => runApplyCommand({
162
163
  runId: input.runId,
@@ -1,25 +1,28 @@
1
1
  import { type Command } from "commander";
2
2
  import { z } from "zod";
3
3
  import { type ListMode, type ListOperator } from "../contracts/list.js";
4
- export declare const externalExecutionOperators: readonly ["spec", "run", "reduce", "verify", "apply", "prune"];
5
- export declare const externalInspectionOperators: readonly ["spec", "run", "reduce", "verify"];
4
+ export declare const externalExecutionOperators: readonly ["spec", "run", "reduce", "verify", "message", "apply", "prune"];
5
+ export declare const externalInspectionOperators: readonly ["spec", "run", "reduce", "verify", "message", "interactive"];
6
6
  export declare const externalInspectionModes: readonly ["table", "detail"];
7
7
  export type ExternalExecutionOperator = (typeof externalExecutionOperators)[number];
8
8
  export type ExternalInspectionOperator = ListOperator;
9
9
  export type ExternalInspectionMode = ListMode;
10
10
  export declare const externalExecutionOperatorSchema: z.ZodEnum<{
11
+ message: "message";
12
+ spec: "spec";
11
13
  reduce: "reduce";
12
14
  apply: "apply";
13
- spec: "spec";
14
15
  run: "run";
15
16
  verify: "verify";
16
17
  prune: "prune";
17
18
  }>;
18
19
  export declare const externalInspectionOperatorSchema: z.ZodEnum<{
19
- reduce: "reduce";
20
+ message: "message";
20
21
  spec: "spec";
22
+ reduce: "reduce";
21
23
  run: "run";
22
24
  verify: "verify";
25
+ interactive: "interactive";
23
26
  }>;
24
27
  export declare const externalInspectionModeSchema: z.ZodEnum<{
25
28
  detail: "detail";
@@ -44,8 +47,9 @@ export declare const externalRunExecutionInputSchema: z.ZodObject<{
44
47
  export declare const externalReduceExecutionInputSchema: z.ZodObject<{
45
48
  target: z.ZodObject<{
46
49
  type: z.ZodEnum<{
47
- reduce: "reduce";
50
+ message: "message";
48
51
  spec: "spec";
52
+ reduce: "reduce";
49
53
  run: "run";
50
54
  verify: "verify";
51
55
  }>;
@@ -56,11 +60,19 @@ export declare const externalReduceExecutionInputSchema: z.ZodObject<{
56
60
  maxParallel: z.ZodOptional<z.ZodNumber>;
57
61
  extraContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
58
62
  }, z.core.$strict>;
63
+ export declare const externalMessageExecutionInputSchema: z.ZodObject<{
64
+ prompt: z.ZodString;
65
+ agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
66
+ profile: z.ZodOptional<z.ZodString>;
67
+ maxParallel: z.ZodOptional<z.ZodNumber>;
68
+ extraContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
69
+ }, z.core.$strict>;
59
70
  export declare const externalVerifyExecutionInputSchema: z.ZodObject<{
60
71
  target: z.ZodObject<{
61
72
  kind: z.ZodEnum<{
62
- reduce: "reduce";
73
+ message: "message";
63
74
  spec: "spec";
75
+ reduce: "reduce";
64
76
  run: "run";
65
77
  }>;
66
78
  sessionId: z.ZodString;
@@ -88,10 +100,12 @@ export declare const externalPruneExecutionInputSchema: z.ZodDiscriminatedUnion<
88
100
  }, z.core.$strict>], "scope">;
89
101
  export declare const externalListTableInputSchema: z.ZodObject<{
90
102
  operator: z.ZodEnum<{
91
- reduce: "reduce";
103
+ message: "message";
92
104
  spec: "spec";
105
+ reduce: "reduce";
93
106
  run: "run";
94
107
  verify: "verify";
108
+ interactive: "interactive";
95
109
  }>;
96
110
  verbose: z.ZodOptional<z.ZodBoolean>;
97
111
  limit: z.ZodOptional<z.ZodNumber>;
@@ -99,10 +113,12 @@ export declare const externalListTableInputSchema: z.ZodObject<{
99
113
  }, z.core.$strict>;
100
114
  export declare const externalListDetailInputSchema: z.ZodObject<{
101
115
  operator: z.ZodEnum<{
102
- reduce: "reduce";
116
+ message: "message";
103
117
  spec: "spec";
118
+ reduce: "reduce";
104
119
  run: "run";
105
120
  verify: "verify";
121
+ interactive: "interactive";
106
122
  }>;
107
123
  verbose: z.ZodOptional<z.ZodBoolean>;
108
124
  limit: z.ZodOptional<z.ZodNumber>;
@@ -111,20 +127,24 @@ export declare const externalListDetailInputSchema: z.ZodObject<{
111
127
  }, z.core.$strict>;
112
128
  export declare const externalListInspectionInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
113
129
  operator: z.ZodEnum<{
114
- reduce: "reduce";
130
+ message: "message";
115
131
  spec: "spec";
132
+ reduce: "reduce";
116
133
  run: "run";
117
134
  verify: "verify";
135
+ interactive: "interactive";
118
136
  }>;
119
137
  verbose: z.ZodOptional<z.ZodBoolean>;
120
138
  limit: z.ZodOptional<z.ZodNumber>;
121
139
  mode: z.ZodLiteral<"table">;
122
140
  }, z.core.$strict>, z.ZodObject<{
123
141
  operator: z.ZodEnum<{
124
- reduce: "reduce";
142
+ message: "message";
125
143
  spec: "spec";
144
+ reduce: "reduce";
126
145
  run: "run";
127
146
  verify: "verify";
147
+ interactive: "interactive";
128
148
  }>;
129
149
  verbose: z.ZodOptional<z.ZodBoolean>;
130
150
  limit: z.ZodOptional<z.ZodNumber>;
@@ -151,8 +171,9 @@ export declare const externalExecutionInputSchemas: {
151
171
  readonly reduce: z.ZodObject<{
152
172
  target: z.ZodObject<{
153
173
  type: z.ZodEnum<{
154
- reduce: "reduce";
174
+ message: "message";
155
175
  spec: "spec";
176
+ reduce: "reduce";
156
177
  run: "run";
157
178
  verify: "verify";
158
179
  }>;
@@ -166,8 +187,9 @@ export declare const externalExecutionInputSchemas: {
166
187
  readonly verify: z.ZodObject<{
167
188
  target: z.ZodObject<{
168
189
  kind: z.ZodEnum<{
169
- reduce: "reduce";
190
+ message: "message";
170
191
  spec: "spec";
192
+ reduce: "reduce";
171
193
  run: "run";
172
194
  }>;
173
195
  sessionId: z.ZodString;
@@ -177,6 +199,13 @@ export declare const externalExecutionInputSchemas: {
177
199
  maxParallel: z.ZodOptional<z.ZodNumber>;
178
200
  extraContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
179
201
  }, z.core.$strict>;
202
+ readonly message: z.ZodObject<{
203
+ prompt: z.ZodString;
204
+ agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
205
+ profile: z.ZodOptional<z.ZodString>;
206
+ maxParallel: z.ZodOptional<z.ZodNumber>;
207
+ extraContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
208
+ }, z.core.$strict>;
180
209
  readonly apply: z.ZodObject<{
181
210
  runId: z.ZodString;
182
211
  agentId: z.ZodString;
@@ -198,10 +227,12 @@ export declare const externalInspectionInputSchemas: {
198
227
  readonly list: {
199
228
  readonly table: z.ZodObject<{
200
229
  operator: z.ZodEnum<{
201
- reduce: "reduce";
230
+ message: "message";
202
231
  spec: "spec";
232
+ reduce: "reduce";
203
233
  run: "run";
204
234
  verify: "verify";
235
+ interactive: "interactive";
205
236
  }>;
206
237
  verbose: z.ZodOptional<z.ZodBoolean>;
207
238
  limit: z.ZodOptional<z.ZodNumber>;
@@ -209,10 +240,12 @@ export declare const externalInspectionInputSchemas: {
209
240
  }, z.core.$strict>;
210
241
  readonly detail: z.ZodObject<{
211
242
  operator: z.ZodEnum<{
212
- reduce: "reduce";
243
+ message: "message";
213
244
  spec: "spec";
245
+ reduce: "reduce";
214
246
  run: "run";
215
247
  verify: "verify";
248
+ interactive: "interactive";
216
249
  }>;
217
250
  verbose: z.ZodOptional<z.ZodBoolean>;
218
251
  limit: z.ZodOptional<z.ZodNumber>;
@@ -221,20 +254,24 @@ export declare const externalInspectionInputSchemas: {
221
254
  }, z.core.$strict>;
222
255
  readonly union: z.ZodDiscriminatedUnion<[z.ZodObject<{
223
256
  operator: z.ZodEnum<{
224
- reduce: "reduce";
257
+ message: "message";
225
258
  spec: "spec";
259
+ reduce: "reduce";
226
260
  run: "run";
227
261
  verify: "verify";
262
+ interactive: "interactive";
228
263
  }>;
229
264
  verbose: z.ZodOptional<z.ZodBoolean>;
230
265
  limit: z.ZodOptional<z.ZodNumber>;
231
266
  mode: z.ZodLiteral<"table">;
232
267
  }, z.core.$strict>, z.ZodObject<{
233
268
  operator: z.ZodEnum<{
234
- reduce: "reduce";
269
+ message: "message";
235
270
  spec: "spec";
271
+ reduce: "reduce";
236
272
  run: "run";
237
273
  verify: "verify";
274
+ interactive: "interactive";
238
275
  }>;
239
276
  verbose: z.ZodOptional<z.ZodBoolean>;
240
277
  limit: z.ZodOptional<z.ZodNumber>;
@@ -246,13 +283,14 @@ export declare const externalInspectionInputSchemas: {
246
283
  export type ExternalSpecExecutionInput = z.infer<typeof externalSpecExecutionInputSchema>;
247
284
  export type ExternalRunExecutionInput = z.infer<typeof externalRunExecutionInputSchema>;
248
285
  export type ExternalReduceExecutionInput = z.infer<typeof externalReduceExecutionInputSchema>;
286
+ export type ExternalMessageExecutionInput = z.infer<typeof externalMessageExecutionInputSchema>;
249
287
  export type ExternalVerifyExecutionInput = z.infer<typeof externalVerifyExecutionInputSchema>;
250
288
  export type ExternalApplyExecutionInput = z.infer<typeof externalApplyExecutionInputSchema>;
251
289
  export type ExternalPruneExecutionInput = z.infer<typeof externalPruneExecutionInputSchema>;
252
290
  export type ExternalListInspectionInput = z.infer<typeof externalListInspectionInputSchema>;
253
291
  export declare const externalAdapterContractReference: {
254
292
  readonly execution: {
255
- readonly operators: readonly ["spec", "run", "reduce", "verify", "apply", "prune"];
293
+ readonly operators: readonly ["spec", "run", "reduce", "verify", "message", "apply", "prune"];
256
294
  readonly envelope: {
257
295
  readonly authoritativeType: "OperatorResultEnvelope";
258
296
  readonly versioned: true;
@@ -262,12 +300,12 @@ export declare const externalAdapterContractReference: {
262
300
  readonly inspection: {
263
301
  readonly command: "list";
264
302
  readonly jsonOnly: true;
265
- readonly operators: readonly ["spec", "run", "reduce", "verify"];
303
+ readonly operators: readonly ["spec", "run", "reduce", "verify", "message", "interactive"];
266
304
  readonly modes: readonly ["table", "detail"];
267
305
  readonly authoritativeType: "ListJsonOutput";
268
306
  readonly versioned: false;
269
307
  };
270
- readonly excludedCommands: readonly ["auto", "init"];
308
+ readonly excludedCommands: readonly ["auto", "doctor"];
271
309
  readonly compatibility: {
272
310
  readonly additiveChangesAreNonBreaking: true;
273
311
  readonly breakingChangesRequireExecutionEnvelopeVersionBump: true;
@@ -291,6 +329,7 @@ export interface PruneCommandSelection {
291
329
  export declare function parseSpecExecutionCommandOptions(options: unknown, command: Command): ExternalSpecExecutionInput;
292
330
  export declare function parseRunExecutionCommandOptions(options: unknown, command: Command): ExternalRunExecutionInput;
293
331
  export declare function parseReduceExecutionCommandOptions(options: unknown, command: Command): ExternalReduceExecutionInput;
332
+ export declare function parseMessageExecutionCommandOptions(options: unknown, command: Command): ExternalMessageExecutionInput;
294
333
  export declare function parseVerifyExecutionCommandOptions(options: unknown, command: Command): ExternalVerifyExecutionInput;
295
334
  export declare function parseApplyExecutionCommandOptions(options: unknown, command: Command): ExternalApplyExecutionInput;
296
335
  export declare function parseExternalPruneExecutionInput(input: unknown): ExternalPruneExecutionInput;