voratiq 0.1.0-beta.20 → 0.1.0-beta.21

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 (85) hide show
  1. package/dist/agents/runtime/policy.d.ts +1 -1
  2. package/dist/bin.js +50 -19
  3. package/dist/cli/contract.d.ts +35 -5
  4. package/dist/cli/contract.js +42 -5
  5. package/dist/cli/list.js +4 -1
  6. package/dist/cli/message.d.ts +28 -0
  7. package/dist/cli/message.js +147 -0
  8. package/dist/cli/operator-envelope.d.ts +22 -1
  9. package/dist/cli/operator-envelope.js +48 -3
  10. package/dist/cli/reduce.js +5 -2
  11. package/dist/cli/verify.js +6 -2
  12. package/dist/commands/list/command.d.ts +1 -0
  13. package/dist/commands/list/command.js +117 -7
  14. package/dist/commands/message/command.d.ts +23 -0
  15. package/dist/commands/message/command.js +215 -0
  16. package/dist/commands/message/errors.d.ts +9 -0
  17. package/dist/commands/message/errors.js +20 -0
  18. package/dist/commands/message/lifecycle.d.ts +14 -0
  19. package/dist/commands/message/lifecycle.js +128 -0
  20. package/dist/commands/reduce/command.d.ts +1 -0
  21. package/dist/commands/reduce/command.js +3 -1
  22. package/dist/commands/reduce/targets.d.ts +1 -0
  23. package/dist/commands/reduce/targets.js +48 -2
  24. package/dist/commands/shared/resolve-stage-competitors.js +4 -1
  25. package/dist/commands/verify/command.d.ts +1 -0
  26. package/dist/commands/verify/command.js +2 -1
  27. package/dist/commands/verify/max-parallel.d.ts +1 -1
  28. package/dist/commands/verify/max-parallel.js +3 -1
  29. package/dist/commands/verify/targets.d.ts +2 -1
  30. package/dist/commands/verify/targets.js +154 -22
  31. package/dist/configs/agents/defaults.js +25 -25
  32. package/dist/configs/orchestration/bootstrap.d.ts +6 -1
  33. package/dist/configs/orchestration/bootstrap.js +27 -6
  34. package/dist/configs/orchestration/types.d.ts +25 -10
  35. package/dist/configs/orchestration/types.js +10 -6
  36. package/dist/configs/verification/types.d.ts +5 -0
  37. package/dist/configs/verification/types.js +3 -0
  38. package/dist/contracts/list.d.ts +38 -4
  39. package/dist/contracts/list.js +30 -1
  40. package/dist/domain/message/competition/adapter.d.ts +36 -0
  41. package/dist/domain/message/competition/adapter.js +197 -0
  42. package/dist/domain/message/competition/prompt.d.ts +8 -0
  43. package/dist/domain/message/competition/prompt.js +29 -0
  44. package/dist/domain/message/model/mutators.d.ts +17 -0
  45. package/dist/domain/message/model/mutators.js +107 -0
  46. package/dist/domain/message/model/types.d.ts +100 -0
  47. package/dist/domain/message/model/types.js +87 -0
  48. package/dist/domain/message/persistence/adapter.d.ts +43 -0
  49. package/dist/domain/message/persistence/adapter.js +124 -0
  50. package/dist/domain/reduce/competition/adapter.d.ts +1 -0
  51. package/dist/domain/reduce/competition/adapter.js +57 -4
  52. package/dist/domain/reduce/competition/prompt.d.ts +1 -1
  53. package/dist/domain/reduce/model/types.d.ts +3 -0
  54. package/dist/domain/reduce/model/types.js +2 -1
  55. package/dist/domain/verify/competition/adapter.js +8 -5
  56. package/dist/domain/verify/competition/programmatic.js +3 -0
  57. package/dist/domain/verify/competition/prompt.js +6 -0
  58. package/dist/domain/verify/competition/rubric.js +7 -1
  59. package/dist/domain/verify/competition/shared-layout.d.ts +42 -2
  60. package/dist/domain/verify/competition/shared-layout.js +92 -21
  61. package/dist/domain/verify/competition/target.d.ts +17 -0
  62. package/dist/domain/verify/model/types.d.ts +20 -2
  63. package/dist/domain/verify/model/types.js +15 -2
  64. package/dist/mcp/server.d.ts +2 -2
  65. package/dist/mcp/server.js +30 -13
  66. package/dist/policy/verification.js +2 -0
  67. package/dist/preflight/index.d.ts +2 -0
  68. package/dist/preflight/index.js +3 -1
  69. package/dist/render/transcripts/list.d.ts +2 -0
  70. package/dist/render/transcripts/list.js +24 -0
  71. package/dist/render/transcripts/message.d.ts +72 -0
  72. package/dist/render/transcripts/message.js +362 -0
  73. package/dist/render/transcripts/stage-progress.d.ts +1 -1
  74. package/dist/render/transcripts/verify.d.ts +4 -0
  75. package/dist/render/transcripts/verify.js +7 -1
  76. package/dist/render/utils/transcript-shell.d.ts +1 -1
  77. package/dist/render/utils/transcript-shell.js +6 -0
  78. package/dist/status/index.d.ts +21 -0
  79. package/dist/status/index.js +30 -0
  80. package/dist/workspace/setup.js +13 -7
  81. package/dist/workspace/structure.d.ts +14 -6
  82. package/dist/workspace/structure.js +25 -9
  83. package/dist/workspace/verification-defaults.d.ts +1 -1
  84. package/dist/workspace/verification-defaults.js +255 -0
  85. package/package.json +15 -16
@@ -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,11 +147,30 @@ 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
  }
@@ -304,12 +330,13 @@ async function registerCommands(program, argv) {
304
330
  const wantsHelp = argv.includes("--help") || argv.includes("-h");
305
331
  const wantsVersion = argv.includes("--version") || argv.includes("-v");
306
332
  const knownCommandNames = new Set([
307
- "auto",
308
333
  "init",
309
334
  "spec",
310
335
  "run",
311
- "verify",
312
336
  "reduce",
337
+ "verify",
338
+ "message",
339
+ "auto",
313
340
  "apply",
314
341
  "list",
315
342
  "prune",
@@ -322,12 +349,13 @@ async function registerCommands(program, argv) {
322
349
  return;
323
350
  }
324
351
  if (loadAll) {
325
- program.addCommand((await import("./cli/auto.js")).createAutoCommand());
326
352
  program.addCommand((await import("./cli/init.js")).createInitCommand());
327
353
  program.addCommand((await import("./cli/spec.js")).createSpecCommand());
328
354
  program.addCommand((await import("./cli/run.js")).createRunCommand());
329
355
  program.addCommand((await import("./cli/reduce.js")).createReduceCommand());
330
356
  program.addCommand((await import("./cli/verify.js")).createVerifyCommand());
357
+ program.addCommand((await import("./cli/message.js")).createMessageCommand());
358
+ program.addCommand((await import("./cli/auto.js")).createAutoCommand());
331
359
  program.addCommand((await import("./cli/apply.js")).createApplyCommand());
332
360
  program.addCommand((await import("./cli/list.js")).createListCommand());
333
361
  program.addCommand((await import("./cli/prune.js")).createPruneCommand());
@@ -338,9 +366,6 @@ async function registerCommands(program, argv) {
338
366
  case "init":
339
367
  program.addCommand((await import("./cli/init.js")).createInitCommand());
340
368
  break;
341
- case "list":
342
- program.addCommand((await import("./cli/list.js")).createListCommand());
343
- break;
344
369
  case "spec":
345
370
  program.addCommand((await import("./cli/spec.js")).createSpecCommand());
346
371
  break;
@@ -353,12 +378,18 @@ async function registerCommands(program, argv) {
353
378
  case "verify":
354
379
  program.addCommand((await import("./cli/verify.js")).createVerifyCommand());
355
380
  break;
381
+ case "message":
382
+ program.addCommand((await import("./cli/message.js")).createMessageCommand());
383
+ break;
356
384
  case "auto":
357
385
  program.addCommand((await import("./cli/auto.js")).createAutoCommand());
358
386
  break;
359
387
  case "apply":
360
388
  program.addCommand((await import("./cli/apply.js")).createApplyCommand());
361
389
  break;
390
+ case "list":
391
+ program.addCommand((await import("./cli/list.js")).createListCommand());
392
+ break;
362
393
  case "prune":
363
394
  program.addCommand((await import("./cli/prune.js")).createPruneCommand());
364
395
  break;
@@ -1,13 +1,14 @@
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"];
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";
11
12
  reduce: "reduce";
12
13
  apply: "apply";
13
14
  spec: "spec";
@@ -16,6 +17,7 @@ export declare const externalExecutionOperatorSchema: z.ZodEnum<{
16
17
  prune: "prune";
17
18
  }>;
18
19
  export declare const externalInspectionOperatorSchema: z.ZodEnum<{
20
+ message: "message";
19
21
  reduce: "reduce";
20
22
  spec: "spec";
21
23
  run: "run";
@@ -44,6 +46,7 @@ export declare const externalRunExecutionInputSchema: z.ZodObject<{
44
46
  export declare const externalReduceExecutionInputSchema: z.ZodObject<{
45
47
  target: z.ZodObject<{
46
48
  type: z.ZodEnum<{
49
+ message: "message";
47
50
  reduce: "reduce";
48
51
  spec: "spec";
49
52
  run: "run";
@@ -56,9 +59,17 @@ export declare const externalReduceExecutionInputSchema: z.ZodObject<{
56
59
  maxParallel: z.ZodOptional<z.ZodNumber>;
57
60
  extraContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
58
61
  }, z.core.$strict>;
62
+ export declare const externalMessageExecutionInputSchema: z.ZodObject<{
63
+ prompt: z.ZodString;
64
+ agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
65
+ profile: z.ZodOptional<z.ZodString>;
66
+ maxParallel: z.ZodOptional<z.ZodNumber>;
67
+ extraContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
68
+ }, z.core.$strict>;
59
69
  export declare const externalVerifyExecutionInputSchema: z.ZodObject<{
60
70
  target: z.ZodObject<{
61
71
  kind: z.ZodEnum<{
72
+ message: "message";
62
73
  reduce: "reduce";
63
74
  spec: "spec";
64
75
  run: "run";
@@ -88,6 +99,7 @@ export declare const externalPruneExecutionInputSchema: z.ZodDiscriminatedUnion<
88
99
  }, z.core.$strict>], "scope">;
89
100
  export declare const externalListTableInputSchema: z.ZodObject<{
90
101
  operator: z.ZodEnum<{
102
+ message: "message";
91
103
  reduce: "reduce";
92
104
  spec: "spec";
93
105
  run: "run";
@@ -99,6 +111,7 @@ export declare const externalListTableInputSchema: z.ZodObject<{
99
111
  }, z.core.$strict>;
100
112
  export declare const externalListDetailInputSchema: z.ZodObject<{
101
113
  operator: z.ZodEnum<{
114
+ message: "message";
102
115
  reduce: "reduce";
103
116
  spec: "spec";
104
117
  run: "run";
@@ -111,6 +124,7 @@ export declare const externalListDetailInputSchema: z.ZodObject<{
111
124
  }, z.core.$strict>;
112
125
  export declare const externalListInspectionInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
113
126
  operator: z.ZodEnum<{
127
+ message: "message";
114
128
  reduce: "reduce";
115
129
  spec: "spec";
116
130
  run: "run";
@@ -121,6 +135,7 @@ export declare const externalListInspectionInputSchema: z.ZodDiscriminatedUnion<
121
135
  mode: z.ZodLiteral<"table">;
122
136
  }, z.core.$strict>, z.ZodObject<{
123
137
  operator: z.ZodEnum<{
138
+ message: "message";
124
139
  reduce: "reduce";
125
140
  spec: "spec";
126
141
  run: "run";
@@ -151,6 +166,7 @@ export declare const externalExecutionInputSchemas: {
151
166
  readonly reduce: z.ZodObject<{
152
167
  target: z.ZodObject<{
153
168
  type: z.ZodEnum<{
169
+ message: "message";
154
170
  reduce: "reduce";
155
171
  spec: "spec";
156
172
  run: "run";
@@ -166,6 +182,7 @@ export declare const externalExecutionInputSchemas: {
166
182
  readonly verify: z.ZodObject<{
167
183
  target: z.ZodObject<{
168
184
  kind: z.ZodEnum<{
185
+ message: "message";
169
186
  reduce: "reduce";
170
187
  spec: "spec";
171
188
  run: "run";
@@ -177,6 +194,13 @@ export declare const externalExecutionInputSchemas: {
177
194
  maxParallel: z.ZodOptional<z.ZodNumber>;
178
195
  extraContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
179
196
  }, z.core.$strict>;
197
+ readonly message: z.ZodObject<{
198
+ prompt: z.ZodString;
199
+ agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
200
+ profile: z.ZodOptional<z.ZodString>;
201
+ maxParallel: z.ZodOptional<z.ZodNumber>;
202
+ extraContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
203
+ }, z.core.$strict>;
180
204
  readonly apply: z.ZodObject<{
181
205
  runId: z.ZodString;
182
206
  agentId: z.ZodString;
@@ -198,6 +222,7 @@ export declare const externalInspectionInputSchemas: {
198
222
  readonly list: {
199
223
  readonly table: z.ZodObject<{
200
224
  operator: z.ZodEnum<{
225
+ message: "message";
201
226
  reduce: "reduce";
202
227
  spec: "spec";
203
228
  run: "run";
@@ -209,6 +234,7 @@ export declare const externalInspectionInputSchemas: {
209
234
  }, z.core.$strict>;
210
235
  readonly detail: z.ZodObject<{
211
236
  operator: z.ZodEnum<{
237
+ message: "message";
212
238
  reduce: "reduce";
213
239
  spec: "spec";
214
240
  run: "run";
@@ -221,6 +247,7 @@ export declare const externalInspectionInputSchemas: {
221
247
  }, z.core.$strict>;
222
248
  readonly union: z.ZodDiscriminatedUnion<[z.ZodObject<{
223
249
  operator: z.ZodEnum<{
250
+ message: "message";
224
251
  reduce: "reduce";
225
252
  spec: "spec";
226
253
  run: "run";
@@ -231,6 +258,7 @@ export declare const externalInspectionInputSchemas: {
231
258
  mode: z.ZodLiteral<"table">;
232
259
  }, z.core.$strict>, z.ZodObject<{
233
260
  operator: z.ZodEnum<{
261
+ message: "message";
234
262
  reduce: "reduce";
235
263
  spec: "spec";
236
264
  run: "run";
@@ -246,13 +274,14 @@ export declare const externalInspectionInputSchemas: {
246
274
  export type ExternalSpecExecutionInput = z.infer<typeof externalSpecExecutionInputSchema>;
247
275
  export type ExternalRunExecutionInput = z.infer<typeof externalRunExecutionInputSchema>;
248
276
  export type ExternalReduceExecutionInput = z.infer<typeof externalReduceExecutionInputSchema>;
277
+ export type ExternalMessageExecutionInput = z.infer<typeof externalMessageExecutionInputSchema>;
249
278
  export type ExternalVerifyExecutionInput = z.infer<typeof externalVerifyExecutionInputSchema>;
250
279
  export type ExternalApplyExecutionInput = z.infer<typeof externalApplyExecutionInputSchema>;
251
280
  export type ExternalPruneExecutionInput = z.infer<typeof externalPruneExecutionInputSchema>;
252
281
  export type ExternalListInspectionInput = z.infer<typeof externalListInspectionInputSchema>;
253
282
  export declare const externalAdapterContractReference: {
254
283
  readonly execution: {
255
- readonly operators: readonly ["spec", "run", "reduce", "verify", "apply", "prune"];
284
+ readonly operators: readonly ["spec", "run", "reduce", "verify", "message", "apply", "prune"];
256
285
  readonly envelope: {
257
286
  readonly authoritativeType: "OperatorResultEnvelope";
258
287
  readonly versioned: true;
@@ -262,12 +291,12 @@ export declare const externalAdapterContractReference: {
262
291
  readonly inspection: {
263
292
  readonly command: "list";
264
293
  readonly jsonOnly: true;
265
- readonly operators: readonly ["spec", "run", "reduce", "verify"];
294
+ readonly operators: readonly ["spec", "run", "reduce", "verify", "message"];
266
295
  readonly modes: readonly ["table", "detail"];
267
296
  readonly authoritativeType: "ListJsonOutput";
268
297
  readonly versioned: false;
269
298
  };
270
- readonly excludedCommands: readonly ["auto", "init"];
299
+ readonly excludedCommands: readonly ["init", "auto"];
271
300
  readonly compatibility: {
272
301
  readonly additiveChangesAreNonBreaking: true;
273
302
  readonly breakingChangesRequireExecutionEnvelopeVersionBump: true;
@@ -291,6 +320,7 @@ export interface PruneCommandSelection {
291
320
  export declare function parseSpecExecutionCommandOptions(options: unknown, command: Command): ExternalSpecExecutionInput;
292
321
  export declare function parseRunExecutionCommandOptions(options: unknown, command: Command): ExternalRunExecutionInput;
293
322
  export declare function parseReduceExecutionCommandOptions(options: unknown, command: Command): ExternalReduceExecutionInput;
323
+ export declare function parseMessageExecutionCommandOptions(options: unknown, command: Command): ExternalMessageExecutionInput;
294
324
  export declare function parseVerifyExecutionCommandOptions(options: unknown, command: Command): ExternalVerifyExecutionInput;
295
325
  export declare function parseApplyExecutionCommandOptions(options: unknown, command: Command): ExternalApplyExecutionInput;
296
326
  export declare function parseExternalPruneExecutionInput(input: unknown): ExternalPruneExecutionInput;
@@ -14,6 +14,7 @@ export const externalExecutionOperators = [
14
14
  "run",
15
15
  "reduce",
16
16
  "verify",
17
+ "message",
17
18
  "apply",
18
19
  "prune",
19
20
  ];
@@ -46,7 +47,7 @@ export const externalReduceExecutionInputSchema = z
46
47
  .object({
47
48
  target: z
48
49
  .object({
49
- type: z.enum(["spec", "run", "verify", "reduce"]),
50
+ type: z.enum(["spec", "run", "reduce", "verify", "message"]),
50
51
  id: nonEmptyStringSchema,
51
52
  })
52
53
  .strict(),
@@ -56,11 +57,20 @@ export const externalReduceExecutionInputSchema = z
56
57
  extraContext: optionalNonEmptyStringArraySchema,
57
58
  })
58
59
  .strict();
60
+ export const externalMessageExecutionInputSchema = z
61
+ .object({
62
+ prompt: nonEmptyStringSchema,
63
+ agentIds: optionalNonEmptyStringArraySchema,
64
+ profile: nonEmptyStringSchema.optional(),
65
+ maxParallel: positiveIntegerSchema.optional(),
66
+ extraContext: optionalNonEmptyStringArraySchema,
67
+ })
68
+ .strict();
59
69
  export const externalVerifyExecutionInputSchema = z
60
70
  .object({
61
71
  target: z
62
72
  .object({
63
- kind: z.enum(["spec", "run", "reduce"]),
73
+ kind: z.enum(["spec", "run", "reduce", "message"]),
64
74
  sessionId: nonEmptyStringSchema,
65
75
  })
66
76
  .strict(),
@@ -116,6 +126,7 @@ export const externalExecutionInputSchemas = {
116
126
  run: externalRunExecutionInputSchema,
117
127
  reduce: externalReduceExecutionInputSchema,
118
128
  verify: externalVerifyExecutionInputSchema,
129
+ message: externalMessageExecutionInputSchema,
119
130
  apply: externalApplyExecutionInputSchema,
120
131
  prune: externalPruneExecutionInputSchema,
121
132
  };
@@ -143,7 +154,7 @@ export const externalAdapterContractReference = {
143
154
  authoritativeType: "ListJsonOutput",
144
155
  versioned: false,
145
156
  },
146
- excludedCommands: ["auto", "init"],
157
+ excludedCommands: ["init", "auto"],
147
158
  compatibility: {
148
159
  additiveChangesAreNonBreaking: true,
149
160
  breakingChangesRequireExecutionEnvelopeVersionBump: true,
@@ -189,8 +200,19 @@ const reduceCommandActionOptionsSchema = z
189
200
  .object({
190
201
  spec: nonEmptyStringSchema.optional(),
191
202
  run: nonEmptyStringSchema.optional(),
192
- verify: nonEmptyStringSchema.optional(),
193
203
  reduce: nonEmptyStringSchema.optional(),
204
+ verify: nonEmptyStringSchema.optional(),
205
+ message: nonEmptyStringSchema.optional(),
206
+ agent: z.array(nonEmptyStringSchema).optional(),
207
+ profile: nonEmptyStringSchema.optional(),
208
+ maxParallel: positiveIntegerSchema.optional(),
209
+ extraContext: z.array(nonEmptyStringSchema).optional(),
210
+ json: z.boolean().optional(),
211
+ })
212
+ .strict();
213
+ const messageCommandActionOptionsSchema = z
214
+ .object({
215
+ prompt: nonEmptyStringSchema,
194
216
  agent: z.array(nonEmptyStringSchema).optional(),
195
217
  profile: nonEmptyStringSchema.optional(),
196
218
  maxParallel: positiveIntegerSchema.optional(),
@@ -203,6 +225,7 @@ const verifyCommandActionOptionsSchema = z
203
225
  spec: nonEmptyStringSchema.optional(),
204
226
  run: nonEmptyStringSchema.optional(),
205
227
  reduce: nonEmptyStringSchema.optional(),
228
+ message: nonEmptyStringSchema.optional(),
206
229
  agent: z.array(nonEmptyStringSchema).optional(),
207
230
  profile: nonEmptyStringSchema.optional(),
208
231
  maxParallel: positiveIntegerSchema.optional(),
@@ -225,6 +248,7 @@ const listCommandActionOptionsSchema = z
225
248
  run: z.union([z.literal(true), nonEmptyStringSchema]).optional(),
226
249
  reduce: z.union([z.literal(true), nonEmptyStringSchema]).optional(),
227
250
  verify: z.union([z.literal(true), nonEmptyStringSchema]).optional(),
251
+ message: z.union([z.literal(true), nonEmptyStringSchema]).optional(),
228
252
  limit: positiveIntegerSchema.optional(),
229
253
  verbose: z.boolean().optional(),
230
254
  json: z.boolean().optional(),
@@ -266,8 +290,9 @@ export function parseReduceExecutionCommandOptions(options, command) {
266
290
  const selected = resolveExclusiveStringSelection([
267
291
  { key: "spec", flag: "--spec", value: "spec" },
268
292
  { key: "run", flag: "--run", value: "run" },
269
- { key: "verify", flag: "--verify", value: "verify" },
270
293
  { key: "reduce", flag: "--reduce", value: "reduce" },
294
+ { key: "verify", flag: "--verify", value: "verify" },
295
+ { key: "message", flag: "--message", value: "message" },
271
296
  ], parsed, command, "target flag");
272
297
  return parseCommandOptions(externalReduceExecutionInputSchema, {
273
298
  target: {
@@ -280,12 +305,23 @@ export function parseReduceExecutionCommandOptions(options, command) {
280
305
  extraContext: normalizeOptionalStringArray(parsed.extraContext),
281
306
  }, command);
282
307
  }
308
+ export function parseMessageExecutionCommandOptions(options, command) {
309
+ const parsed = parseCommandOptions(messageCommandActionOptionsSchema, options, command);
310
+ return parseCommandOptions(externalMessageExecutionInputSchema, {
311
+ prompt: parsed.prompt,
312
+ agentIds: normalizeOptionalStringArray(parsed.agent),
313
+ profile: parsed.profile,
314
+ maxParallel: parsed.maxParallel,
315
+ extraContext: normalizeOptionalStringArray(parsed.extraContext),
316
+ }, command);
317
+ }
283
318
  export function parseVerifyExecutionCommandOptions(options, command) {
284
319
  const parsed = parseCommandOptions(verifyCommandActionOptionsSchema, options, command);
285
320
  const selected = resolveExclusiveStringSelection([
286
321
  { key: "spec", flag: "--spec", value: "spec" },
287
322
  { key: "run", flag: "--run", value: "run" },
288
323
  { key: "reduce", flag: "--reduce", value: "reduce" },
324
+ { key: "message", flag: "--message", value: "message" },
289
325
  ], parsed, command, "target flag");
290
326
  return parseCommandOptions(externalVerifyExecutionInputSchema, {
291
327
  target: {
@@ -328,6 +364,7 @@ export function parseListInspectionCommandOptions(options, command) {
328
364
  { key: "run", flag: "--run", value: "run" },
329
365
  { key: "reduce", flag: "--reduce", value: "reduce" },
330
366
  { key: "verify", flag: "--verify", value: "verify" },
367
+ { key: "message", flag: "--message", value: "message" },
331
368
  ], parsed, command, "operator flag");
332
369
  return parseCommandOptions(externalListInspectionInputSchema, {
333
370
  operator: selected.value,
package/dist/cli/list.js CHANGED
@@ -2,7 +2,7 @@ import { Command } from "commander";
2
2
  import { executeListCommand } from "../commands/list/command.js";
3
3
  import { resolveCliContext } from "../preflight/index.js";
4
4
  import { parsePositiveInteger } from "../utils/validators.js";
5
- import { resolveWorkspacePath, VORATIQ_REDUCTION_FILE, VORATIQ_VERIFICATION_FILE, } from "../workspace/structure.js";
5
+ import { resolveWorkspacePath, VORATIQ_MESSAGE_FILE, VORATIQ_REDUCTION_FILE, VORATIQ_VERIFICATION_FILE, } from "../workspace/structure.js";
6
6
  import { parseListInspectionCommandOptions } from "./contract.js";
7
7
  import { writeCommandOutput } from "./output.js";
8
8
  export async function runListCommand(options) {
@@ -15,6 +15,8 @@ export async function runListCommand(options) {
15
15
  runsFilePath: workspacePaths.runsFile,
16
16
  reductionsFilePath: workspacePaths.reductionsFile ??
17
17
  resolveWorkspacePath(root, VORATIQ_REDUCTION_FILE),
18
+ messagesFilePath: workspacePaths.messagesFile ??
19
+ resolveWorkspacePath(root, VORATIQ_MESSAGE_FILE),
18
20
  verificationsFilePath: workspacePaths.verificationsFile ??
19
21
  resolveWorkspacePath(root, VORATIQ_VERIFICATION_FILE),
20
22
  operator: options.operator,
@@ -42,6 +44,7 @@ export function createListCommand() {
42
44
  .option("--run [session-id]", "List run sessions or show one run session")
43
45
  .option("--reduce [session-id]", "List reduction sessions or show one reduction session")
44
46
  .option("--verify [session-id]", "List verification sessions or show one verification session")
47
+ .option("--message [session-id]", "List message sessions or show one message session")
45
48
  .option("--limit <count>", "Show only the N most recent sessions (default: 10)", parseLimitOption)
46
49
  .option("--verbose", "Show all statuses for the selected operator in table mode")
47
50
  .option("--json", "Emit machine-readable list output")
@@ -0,0 +1,28 @@
1
+ import { Command } from "commander";
2
+ import { type CommandOutputWriter } from "./output.js";
3
+ export interface MessageCommandOptions {
4
+ prompt: string;
5
+ agentIds?: string[];
6
+ profile?: string;
7
+ maxParallel?: number;
8
+ extraContext?: string[];
9
+ json?: boolean;
10
+ stdout?: Pick<NodeJS.WriteStream, "write"> & {
11
+ isTTY?: boolean;
12
+ };
13
+ stderr?: Pick<NodeJS.WriteStream, "write"> & {
14
+ isTTY?: boolean;
15
+ };
16
+ writeOutput?: CommandOutputWriter;
17
+ }
18
+ export interface MessageCommandResult {
19
+ body: string;
20
+ sessionId: string;
21
+ status: "queued" | "running" | "succeeded" | "failed" | "aborted";
22
+ outputArtifacts: ReadonlyArray<{
23
+ agentId: string;
24
+ outputPath?: string;
25
+ }>;
26
+ }
27
+ export declare function runMessageCommand(options: MessageCommandOptions): Promise<MessageCommandResult>;
28
+ export declare function createMessageCommand(): Command;