@h-rig/contracts 0.0.6-alpha.90 → 0.0.6-alpha.91

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 (42) hide show
  1. package/dist/index.cjs +563 -2
  2. package/dist/index.mjs +565 -2
  3. package/dist/src/artifact.js +3 -0
  4. package/dist/src/baseSchemas.d.ts +6 -0
  5. package/dist/src/baseSchemas.js +6 -0
  6. package/dist/src/cli-output.d.ts +90 -0
  7. package/dist/src/cli-output.js +38 -2
  8. package/dist/src/conversation.js +3 -0
  9. package/dist/src/editor.js +3 -0
  10. package/dist/src/engine.js +3 -0
  11. package/dist/src/git.js +3 -0
  12. package/dist/src/graph.js +3 -0
  13. package/dist/src/help-catalog.d.ts +30 -0
  14. package/dist/src/help-catalog.js +351 -0
  15. package/dist/src/index.d.ts +4 -0
  16. package/dist/src/index.js +565 -2
  17. package/dist/src/ipc.d.ts +2 -1
  18. package/dist/src/keybindings.js +3 -0
  19. package/dist/src/orchestration.js +3 -0
  20. package/dist/src/policy.js +3 -0
  21. package/dist/src/project.js +3 -0
  22. package/dist/src/provider.js +3 -0
  23. package/dist/src/providerRuntime.js +3 -0
  24. package/dist/src/remote.js +3 -0
  25. package/dist/src/review.js +3 -0
  26. package/dist/src/rig.d.ts +30 -0
  27. package/dist/src/rig.js +26 -0
  28. package/dist/src/run-journal.d.ts +4 -4
  29. package/dist/src/run-journal.js +3 -0
  30. package/dist/src/run-session-journal.d.ts +53 -0
  31. package/dist/src/run-session-journal.js +1582 -0
  32. package/dist/src/run-status.d.ts +12 -0
  33. package/dist/src/run-status.js +38 -0
  34. package/dist/src/runtime.js +3 -0
  35. package/dist/src/server.js +3 -0
  36. package/dist/src/serviceFabric.js +3 -0
  37. package/dist/src/terminal.js +3 -0
  38. package/dist/src/validation.js +3 -0
  39. package/dist/src/workspace.js +3 -0
  40. package/dist/src/ws.d.ts +14 -0
  41. package/dist/src/ws.js +25 -0
  42. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -40,11 +40,19 @@ var __export = (target, all) => {
40
40
  // packages/contracts/src/index.ts
41
41
  var exports_src = {};
42
42
  __export(exports_src, {
43
+ sessionIdFromSessionFile: () => sessionIdFromSessionFile,
43
44
  reduceRunJournal: () => reduceRunJournal,
45
+ parseStopSentinel: () => parseStopSentinel,
46
+ normalizeRunStatusToken: () => normalizeRunStatusToken,
44
47
  isTerminalRunStatus: () => isTerminalRunStatus,
48
+ isRunSessionCustomType: () => isRunSessionCustomType,
49
+ isOperatorActiveRunStatus: () => isOperatorActiveRunStatus,
45
50
  isActiveRunStatus: () => isActiveRunStatus,
51
+ helpCatalog: () => helpCatalog,
52
+ foldRunSessionEntries: () => foldRunSessionEntries,
46
53
  decodeRunJournalEvent: () => decodeRunJournalEvent,
47
54
  canTransitionRunStatus: () => canTransitionRunStatus,
55
+ buildStopSentinel: () => buildStopSentinel,
48
56
  assertRunStatusTransition: () => assertRunStatusTransition,
49
57
  WsWelcomePayload: () => WsWelcomePayload,
50
58
  WsResponse: () => WsResponse,
@@ -128,6 +136,8 @@ __export(exports_src, {
128
136
  TaskId: () => TaskId,
129
137
  TaskFieldExtension: () => TaskFieldExtension,
130
138
  TaskEnqueueCommand: () => TaskEnqueueCommand,
139
+ TYPE_FOR_CUSTOM: () => TYPE_FOR_CUSTOM,
140
+ TOP_LEVEL_SECTIONS: () => TOP_LEVEL_SECTIONS,
131
141
  TERMINAL_RUN_STATUSES: () => TERMINAL_RUN_STATUSES,
132
142
  SkillRegistration: () => SkillRegistration,
133
143
  ServiceFabricWorkspaceInput: () => ServiceFabricWorkspaceInput,
@@ -143,6 +153,10 @@ __export(exports_src, {
143
153
  ServerConfig: () => ServerConfig,
144
154
  ScopeSearchPrefix: () => ScopeSearchPrefix,
145
155
  ScopeNormalizationRules: () => ScopeNormalizationRules,
156
+ Schema: () => import_effect30.Schema,
157
+ SafeRunId: () => SafeRunId,
158
+ SafePathSegment: () => SafePathSegment,
159
+ SafeGitRefComponent: () => SafeGitRefComponent,
146
160
  SCRIPT_RUN_COMMAND_PATTERN: () => SCRIPT_RUN_COMMAND_PATTERN,
147
161
  RuntimeUpdateMetadataCommand: () => RuntimeUpdateMetadataCommand,
148
162
  RuntimeTaskId: () => RuntimeTaskId,
@@ -216,7 +230,9 @@ __export(exports_src, {
216
230
  RigStatsData: () => RigStatsData,
217
231
  RigSnapshotInvalidatedPayload: () => RigSnapshotInvalidatedPayload,
218
232
  RigSnapshot: () => RigSnapshot,
233
+ RigServerUseOutput: () => RigServerUseOutput,
219
234
  RigServerStatusOutput: () => RigServerStatusOutput,
235
+ RigServerRepairLinkOutput: () => RigServerRepairLinkOutput,
220
236
  RigRuntimeMode: () => RigRuntimeMode,
221
237
  RigRunSteeringQueuedPayload: () => RigRunSteeringQueuedPayload,
222
238
  RigRunShowOutput: () => RigRunShowOutput,
@@ -229,6 +245,8 @@ __export(exports_src, {
229
245
  RigReplayEventsInput: () => RigReplayEventsInput,
230
246
  RigRawRunLogEntry: () => RigRawRunLogEntry,
231
247
  RigQueuedRunSteeringMessage: () => RigQueuedRunSteeringMessage,
248
+ RigQueueRunSteeringResult: () => RigQueueRunSteeringResult,
249
+ RigQueueRunSteeringInput: () => RigQueueRunSteeringInput,
232
250
  RigPlugin: () => RigPlugin,
233
251
  RigMutationResult: () => RigMutationResult,
234
252
  RigListWorkspacesResult: () => RigListWorkspacesResult,
@@ -311,6 +329,20 @@ __export(exports_src, {
311
329
  RUN_STATUS_TRANSITIONS: () => RUN_STATUS_TRANSITIONS,
312
330
  RIG_WS_METHODS: () => RIG_WS_METHODS,
313
331
  RIG_WS_CHANNELS: () => RIG_WS_CHANNELS,
332
+ RIG_STOP_SENTINEL_END: () => RIG_STOP_SENTINEL_END,
333
+ RIG_STOP_SENTINEL: () => RIG_STOP_SENTINEL,
334
+ RIG_RUN_TIMELINE_ENTRY: () => RIG_RUN_TIMELINE_ENTRY,
335
+ RIG_RUN_STEERING: () => RIG_RUN_STEERING,
336
+ RIG_RUN_STATUS_CHANGED: () => RIG_RUN_STATUS_CHANGED,
337
+ RIG_RUN_STALL_DETECTED: () => RIG_RUN_STALL_DETECTED,
338
+ RIG_RUN_RECORD_PATCH: () => RIG_RUN_RECORD_PATCH,
339
+ RIG_RUN_LOG_ENTRY: () => RIG_RUN_LOG_ENTRY,
340
+ RIG_RUN_INPUT_RESOLVED: () => RIG_RUN_INPUT_RESOLVED,
341
+ RIG_RUN_INPUT_REQUESTED: () => RIG_RUN_INPUT_REQUESTED,
342
+ RIG_RUN_CLOSEOUT_PHASE: () => RIG_RUN_CLOSEOUT_PHASE,
343
+ RIG_RUN_APPROVAL_RESOLVED: () => RIG_RUN_APPROVAL_RESOLVED,
344
+ RIG_RUN_APPROVAL_REQUESTED: () => RIG_RUN_APPROVAL_REQUESTED,
345
+ RIG_RUN_ADOPTED: () => RIG_RUN_ADOPTED,
314
346
  RIG_PROTOCOL_VERSION: () => RIG_PROTOCOL_VERSION,
315
347
  REASONING_EFFORT_OPTIONS_BY_PROVIDER: () => REASONING_EFFORT_OPTIONS_BY_PROVIDER,
316
348
  QueueEntry: () => QueueEntry,
@@ -369,6 +401,7 @@ __export(exports_src, {
369
401
  PROVIDER_SEND_TURN_MAX_IMAGE_BYTES: () => PROVIDER_SEND_TURN_MAX_IMAGE_BYTES,
370
402
  PROVIDER_SEND_TURN_MAX_ATTACHMENTS: () => PROVIDER_SEND_TURN_MAX_ATTACHMENTS,
371
403
  PROJECT_READ_FILE_MAX_BYTES_VALUE: () => PROJECT_READ_FILE_MAX_BYTES_VALUE,
404
+ PRIMARY_GROUPS: () => PRIMARY_GROUPS,
372
405
  OrchestrationThreadActivityTone: () => OrchestrationThreadActivityTone,
373
406
  OrchestrationThreadActivity: () => OrchestrationThreadActivity,
374
407
  OrchestrationThread: () => OrchestrationThread,
@@ -402,6 +435,7 @@ __export(exports_src, {
402
435
  OpenInEditorInput: () => OpenInEditorInput,
403
436
  ORCHESTRATION_WS_METHODS: () => ORCHESTRATION_WS_METHODS,
404
437
  ORCHESTRATION_WS_CHANNELS: () => ORCHESTRATION_WS_CHANNELS,
438
+ OPERATOR_INACTIVE_RUN_STATUSES: () => OPERATOR_INACTIVE_RUN_STATUSES,
405
439
  NonNegativeInt: () => NonNegativeInt,
406
440
  MessageId: () => MessageId,
407
441
  MergeConfig: () => MergeConfig,
@@ -493,6 +527,7 @@ __export(exports_src, {
493
527
  CliServerConnection: () => CliServerConnection,
494
528
  CliRunRecord: () => CliRunRecord,
495
529
  CliRepoConnectionState: () => CliRepoConnectionState,
530
+ CliRemoteProjectLink: () => CliRemoteProjectLink,
496
531
  CliInboxRecord: () => CliInboxRecord,
497
532
  CliDoctorCheck: () => CliDoctorCheck,
498
533
  CliCommandRegistration: () => CliCommandRegistration,
@@ -502,6 +537,7 @@ __export(exports_src, {
502
537
  ChatAttachment: () => ChatAttachment,
503
538
  CanonicalRequestType: () => CanonicalRequestType,
504
539
  CanonicalItemType: () => CanonicalItemType,
540
+ CUSTOM_TYPE_FOR: () => CUSTOM_TYPE_FOR,
505
541
  CODEX_REASONING_EFFORT_OPTIONS: () => CODEX_REASONING_EFFORT_OPTIONS,
506
542
  CLI_OUTPUT_VERSION: () => CLI_OUTPUT_VERSION,
507
543
  AutomationConfig: () => AutomationConfig,
@@ -514,9 +550,13 @@ __export(exports_src, {
514
550
  ApprovalDecision: () => ApprovalDecision,
515
551
  AgentRoleRegistration: () => AgentRoleRegistration,
516
552
  ActionId: () => ActionId,
553
+ ALL_GROUPS: () => ALL_GROUPS,
554
+ ADVANCED_GROUPS: () => ADVANCED_GROUPS,
555
+ ADVANCED_COMMANDS: () => ADVANCED_COMMANDS,
517
556
  ACTIVE_RUN_STATUSES: () => ACTIVE_RUN_STATUSES
518
557
  });
519
558
  module.exports = __toCommonJS(exports_src);
559
+ var import_effect30 = require("effect");
520
560
 
521
561
  // packages/contracts/src/baseSchemas.ts
522
562
  var import_effect = require("effect");
@@ -532,6 +572,9 @@ var WorkspaceId = makeEntityId("WorkspaceId");
532
572
  var GraphId = makeEntityId("GraphId");
533
573
  var TaskId = makeEntityId("TaskId");
534
574
  var RunId = makeEntityId("RunId");
575
+ var SafePathSegment = TrimmedNonEmptyString.check(import_effect.Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(import_effect.Schema.brand("SafePathSegment"));
576
+ var SafeRunId = TrimmedNonEmptyString.check(import_effect.Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/)).pipe(import_effect.Schema.brand("SafeRunId"));
577
+ var SafeGitRefComponent = TrimmedNonEmptyString.check(import_effect.Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(import_effect.Schema.brand("SafeGitRefComponent"));
535
578
  var EngineRuntimeId = makeEntityId("EngineRuntimeId");
536
579
  var ConversationId = makeEntityId("ConversationId");
537
580
  var ActionId = makeEntityId("ActionId");
@@ -2220,6 +2263,127 @@ function reduceRunJournal(events) {
2220
2263
  anomalies
2221
2264
  };
2222
2265
  }
2266
+ // packages/contracts/src/run-session-journal.ts
2267
+ var RIG_RUN_STATUS_CHANGED = "rig.run.status-changed";
2268
+ var RIG_RUN_RECORD_PATCH = "rig.run.record-patch";
2269
+ var RIG_RUN_TIMELINE_ENTRY = "rig.run.timeline-entry";
2270
+ var RIG_RUN_LOG_ENTRY = "rig.run.log-entry";
2271
+ var RIG_RUN_APPROVAL_REQUESTED = "rig.run.approval-requested";
2272
+ var RIG_RUN_APPROVAL_RESOLVED = "rig.run.approval-resolved";
2273
+ var RIG_RUN_INPUT_REQUESTED = "rig.run.input-requested";
2274
+ var RIG_RUN_INPUT_RESOLVED = "rig.run.input-resolved";
2275
+ var RIG_RUN_STEERING = "rig.run.steering";
2276
+ var RIG_RUN_ADOPTED = "rig.run.adopted";
2277
+ var RIG_RUN_STALL_DETECTED = "rig.run.stall-detected";
2278
+ var RIG_RUN_CLOSEOUT_PHASE = "rig.run.closeout-phase";
2279
+ var RIG_STOP_SENTINEL = "<<RIG_STOP";
2280
+ var RIG_STOP_SENTINEL_END = ">>";
2281
+ function buildStopSentinel(runId, reason, requestedBy = "rig") {
2282
+ const cleanReason = reason?.replace(/[>\n\r]/g, " ").trim();
2283
+ return `${RIG_STOP_SENTINEL} runId=${runId} requestedBy=${requestedBy}${cleanReason ? ` reason=${cleanReason}` : ""}${RIG_STOP_SENTINEL_END}`;
2284
+ }
2285
+ function parseStopSentinel(text, expectedRunId) {
2286
+ const start = text.indexOf(RIG_STOP_SENTINEL);
2287
+ if (start < 0)
2288
+ return null;
2289
+ const end = text.indexOf(RIG_STOP_SENTINEL_END, start);
2290
+ const body = text.slice(start + RIG_STOP_SENTINEL.length, end >= 0 ? end : undefined).trim();
2291
+ const runId = body.match(/(?:^|\s)runId=([^\s>]+)/)?.[1] ?? "";
2292
+ if (runId && runId !== expectedRunId)
2293
+ return null;
2294
+ const reason = body.match(/(?:^|\s)reason=(.+)$/)?.[1]?.trim() ?? null;
2295
+ return { reason };
2296
+ }
2297
+ function sessionIdFromSessionFile(sessionPath) {
2298
+ if (!sessionPath)
2299
+ return null;
2300
+ const file = sessionPath.split(/[\\/]/).pop() ?? "";
2301
+ const match = file.match(/_([0-9a-fA-F][0-9a-fA-F-]{7,})\.jsonl$/);
2302
+ return match?.[1] ?? null;
2303
+ }
2304
+ var CUSTOM_TYPE_FOR = {
2305
+ "status-changed": RIG_RUN_STATUS_CHANGED,
2306
+ "record-patch": RIG_RUN_RECORD_PATCH,
2307
+ "timeline-entry": RIG_RUN_TIMELINE_ENTRY,
2308
+ "log-entry": RIG_RUN_LOG_ENTRY,
2309
+ "approval-requested": RIG_RUN_APPROVAL_REQUESTED,
2310
+ "approval-resolved": RIG_RUN_APPROVAL_RESOLVED,
2311
+ "input-requested": RIG_RUN_INPUT_REQUESTED,
2312
+ "input-resolved": RIG_RUN_INPUT_RESOLVED,
2313
+ steering: RIG_RUN_STEERING,
2314
+ adopted: RIG_RUN_ADOPTED,
2315
+ "stall-detected": RIG_RUN_STALL_DETECTED,
2316
+ "closeout-phase": RIG_RUN_CLOSEOUT_PHASE
2317
+ };
2318
+ var TYPE_FOR_CUSTOM = {
2319
+ [RIG_RUN_STATUS_CHANGED]: "status-changed",
2320
+ [RIG_RUN_RECORD_PATCH]: "record-patch",
2321
+ [RIG_RUN_TIMELINE_ENTRY]: "timeline-entry",
2322
+ [RIG_RUN_LOG_ENTRY]: "log-entry",
2323
+ [RIG_RUN_APPROVAL_REQUESTED]: "approval-requested",
2324
+ [RIG_RUN_APPROVAL_RESOLVED]: "approval-resolved",
2325
+ [RIG_RUN_INPUT_REQUESTED]: "input-requested",
2326
+ [RIG_RUN_INPUT_RESOLVED]: "input-resolved",
2327
+ [RIG_RUN_STEERING]: "steering",
2328
+ [RIG_RUN_ADOPTED]: "adopted",
2329
+ [RIG_RUN_STALL_DETECTED]: "stall-detected",
2330
+ [RIG_RUN_CLOSEOUT_PHASE]: "closeout-phase"
2331
+ };
2332
+ function isRunSessionCustomType(customType) {
2333
+ return customType !== undefined && Object.hasOwn(TYPE_FOR_CUSTOM, customType);
2334
+ }
2335
+ function foldRunSessionEntries(entries, runId) {
2336
+ const events = [];
2337
+ entries.forEach((entry, index) => {
2338
+ if (entry.type !== "custom" || !isRunSessionCustomType(entry.customType))
2339
+ return;
2340
+ const data = entry.data !== null && typeof entry.data === "object" ? entry.data : {};
2341
+ const stamped = {
2342
+ v: 1,
2343
+ seq: index + 1,
2344
+ at: typeof data.at === "string" ? data.at : new Date(0).toISOString(),
2345
+ runId,
2346
+ ...data,
2347
+ type: TYPE_FOR_CUSTOM[entry.customType]
2348
+ };
2349
+ try {
2350
+ events.push(decodeRunJournalEvent(stamped));
2351
+ } catch {}
2352
+ });
2353
+ return reduceRunJournal(events);
2354
+ }
2355
+ // packages/contracts/src/run-status.ts
2356
+ var OPERATOR_INACTIVE_RUN_STATUSES = new Set([
2357
+ "completed",
2358
+ "complete",
2359
+ "done",
2360
+ "success",
2361
+ "succeeded",
2362
+ "passed",
2363
+ "failed",
2364
+ "failure",
2365
+ "error",
2366
+ "errored",
2367
+ "stopped",
2368
+ "cancelled",
2369
+ "canceled",
2370
+ "aborted",
2371
+ "abort",
2372
+ "merged",
2373
+ "closed",
2374
+ "skipped",
2375
+ "needs-attention",
2376
+ "needs_attention"
2377
+ ]);
2378
+ function normalizeRunStatusToken(status) {
2379
+ return String(status ?? "").trim().toLowerCase().replace(/\s+/g, "-");
2380
+ }
2381
+ function isOperatorActiveRunStatus(status) {
2382
+ const normalized = normalizeRunStatusToken(status);
2383
+ if (!normalized)
2384
+ return false;
2385
+ return !OPERATOR_INACTIVE_RUN_STATUSES.has(normalized);
2386
+ }
2223
2387
  // packages/contracts/src/conversation.ts
2224
2388
  var import_effect8 = require("effect");
2225
2389
  var EngineMessageRole = import_effect8.Schema.Literals(["user", "assistant", "system"]);
@@ -3470,6 +3634,7 @@ var RIG_WS_METHODS = {
3470
3634
  enqueueTask: "rig.enqueueTask",
3471
3635
  resumeRun: "rig.resumeRun",
3472
3636
  submitRunMessage: "rig.submitRunMessage",
3637
+ queueRunSteering: "rig.queueRunSteering",
3473
3638
  interruptRun: "rig.interruptRun",
3474
3639
  stopRun: "rig.stopRun",
3475
3640
  resolveApproval: "rig.resolveApproval",
@@ -3555,6 +3720,9 @@ var RigCreateAdhocRunInput = import_effect18.Schema.Struct({
3555
3720
  executionTarget: import_effect18.Schema.optional(RunExecutionTarget),
3556
3721
  remoteHostId: import_effect18.Schema.optional(import_effect18.Schema.String),
3557
3722
  initialPrompt: import_effect18.Schema.optional(import_effect18.Schema.String),
3723
+ baselineMode: import_effect18.Schema.optional(import_effect18.Schema.Literals(["head", "dirty-snapshot"])),
3724
+ prMode: import_effect18.Schema.optional(import_effect18.Schema.Literals(["auto", "ask", "off"])),
3725
+ initiatedBy: import_effect18.Schema.optional(import_effect18.Schema.String),
3558
3726
  createdAt: IsoDateTime
3559
3727
  });
3560
3728
  var RigCreateTaskRunInput = import_effect18.Schema.Struct({
@@ -3568,6 +3736,10 @@ var RigCreateTaskRunInput = import_effect18.Schema.Struct({
3568
3736
  interactionMode: ProviderInteractionMode.pipe(import_effect18.Schema.withDecodingDefault(() => DEFAULT_PROVIDER_INTERACTION_MODE)),
3569
3737
  executionTarget: import_effect18.Schema.optional(RunExecutionTarget),
3570
3738
  remoteHostId: import_effect18.Schema.optional(import_effect18.Schema.String),
3739
+ initialPrompt: import_effect18.Schema.optional(import_effect18.Schema.String),
3740
+ baselineMode: import_effect18.Schema.optional(import_effect18.Schema.Literals(["head", "dirty-snapshot"])),
3741
+ prMode: import_effect18.Schema.optional(import_effect18.Schema.Literals(["auto", "ask", "off"])),
3742
+ initiatedBy: import_effect18.Schema.optional(import_effect18.Schema.String),
3571
3743
  createdAt: IsoDateTime
3572
3744
  });
3573
3745
  var RigEnqueueTaskInput = import_effect18.Schema.Struct({
@@ -3596,6 +3768,19 @@ var RigSubmitRunMessageInput = import_effect18.Schema.Struct({
3596
3768
  attachments: import_effect18.Schema.optional(import_effect18.Schema.Array(import_effect18.Schema.Unknown)),
3597
3769
  createdAt: IsoDateTime
3598
3770
  });
3771
+ var RigQueueRunSteeringInput = import_effect18.Schema.Struct({
3772
+ commandId: CommandId,
3773
+ runId: RunId,
3774
+ message: TrimmedNonEmptyString,
3775
+ actor: import_effect18.Schema.optional(import_effect18.Schema.String),
3776
+ createdAt: IsoDateTime
3777
+ });
3778
+ var RigQueueRunSteeringResult = import_effect18.Schema.Struct({
3779
+ sequence: NonNegativeInt,
3780
+ runId: RunId,
3781
+ queued: import_effect18.Schema.Boolean,
3782
+ message: RigQueuedRunSteeringMessage
3783
+ });
3599
3784
  var RigInterruptRunInput = import_effect18.Schema.Struct({
3600
3785
  commandId: CommandId,
3601
3786
  runId: RunId,
@@ -4888,6 +5073,7 @@ var WebSocketRequestBody = import_effect26.Schema.Union([
4888
5073
  tagRequestBody(RIG_WS_METHODS.enqueueTask, RigEnqueueTaskInput),
4889
5074
  tagRequestBody(RIG_WS_METHODS.resumeRun, RigResumeRunInput),
4890
5075
  tagRequestBody(RIG_WS_METHODS.submitRunMessage, RigSubmitRunMessageInput),
5076
+ tagRequestBody(RIG_WS_METHODS.queueRunSteering, RigQueueRunSteeringInput),
4891
5077
  tagRequestBody(RIG_WS_METHODS.interruptRun, RigInterruptRunInput),
4892
5078
  tagRequestBody(RIG_WS_METHODS.stopRun, RigStopRunInput),
4893
5079
  tagRequestBody(RIG_WS_METHODS.resolveApproval, RigResolveApprovalInput),
@@ -5184,7 +5370,25 @@ var CliRepoConnectionState = import_effect29.Schema.Struct({
5184
5370
  selected: import_effect29.Schema.String,
5185
5371
  project: import_effect29.Schema.optional(import_effect29.Schema.String),
5186
5372
  linkedAt: import_effect29.Schema.optional(import_effect29.Schema.String),
5187
- serverProjectRoot: import_effect29.Schema.optional(import_effect29.Schema.String)
5373
+ serverProjectRoot: import_effect29.Schema.optional(import_effect29.Schema.String),
5374
+ serverProjectRootAlias: import_effect29.Schema.optional(import_effect29.Schema.String),
5375
+ serverProjectRootBaseUrl: import_effect29.Schema.optional(import_effect29.Schema.String)
5376
+ });
5377
+ var CliRemoteProjectLink = import_effect29.Schema.Struct({
5378
+ ok: import_effect29.Schema.Boolean,
5379
+ status: import_effect29.Schema.String,
5380
+ alias: import_effect29.Schema.optional(import_effect29.Schema.String),
5381
+ baseUrl: import_effect29.Schema.optional(import_effect29.Schema.String),
5382
+ repoSlug: import_effect29.Schema.optional(import_effect29.Schema.String),
5383
+ serverProjectRoot: import_effect29.Schema.optional(import_effect29.Schema.String),
5384
+ source: import_effect29.Schema.optional(import_effect29.Schema.String),
5385
+ prepared: import_effect29.Schema.optional(import_effect29.Schema.Boolean),
5386
+ validated: import_effect29.Schema.optional(import_effect29.Schema.Boolean),
5387
+ statusCode: import_effect29.Schema.optional(import_effect29.Schema.Number),
5388
+ message: import_effect29.Schema.String,
5389
+ hint: import_effect29.Schema.String,
5390
+ next: import_effect29.Schema.optional(import_effect29.Schema.String),
5391
+ skippedCandidates: import_effect29.Schema.optional(import_effect29.Schema.Array(import_effect29.Schema.String))
5188
5392
  });
5189
5393
  var RigTaskListOutput = import_effect29.Schema.Struct({
5190
5394
  v: import_effect29.Schema.Literal(1),
@@ -5217,15 +5421,30 @@ var RigRunShowOutput = import_effect29.Schema.Struct({
5217
5421
  command: import_effect29.Schema.Literal("run show"),
5218
5422
  data: CliRunRecord
5219
5423
  });
5424
+ var RigServerUseOutput = import_effect29.Schema.Struct({
5425
+ v: import_effect29.Schema.Literal(1),
5426
+ command: import_effect29.Schema.Literal("server use"),
5427
+ data: import_effect29.Schema.Struct({
5428
+ selected: import_effect29.Schema.String,
5429
+ repo: import_effect29.Schema.NullOr(CliRepoConnectionState),
5430
+ remoteProjectLink: import_effect29.Schema.NullOr(CliRemoteProjectLink)
5431
+ })
5432
+ });
5220
5433
  var RigServerStatusOutput = import_effect29.Schema.Struct({
5221
5434
  v: import_effect29.Schema.Literal(1),
5222
5435
  command: import_effect29.Schema.Literal("server status"),
5223
5436
  data: import_effect29.Schema.Struct({
5224
5437
  selected: import_effect29.Schema.String,
5225
5438
  repo: import_effect29.Schema.NullOr(CliRepoConnectionState),
5226
- connections: import_effect29.Schema.Record(import_effect29.Schema.String, CliServerConnection)
5439
+ connections: import_effect29.Schema.Record(import_effect29.Schema.String, CliServerConnection),
5440
+ remoteProjectLink: import_effect29.Schema.NullOr(CliRemoteProjectLink)
5227
5441
  })
5228
5442
  });
5443
+ var RigServerRepairLinkOutput = import_effect29.Schema.Struct({
5444
+ v: import_effect29.Schema.Literal(1),
5445
+ command: import_effect29.Schema.Literal("server repair-link"),
5446
+ data: CliRemoteProjectLink
5447
+ });
5229
5448
  var RigInboxApprovalsOutput = import_effect29.Schema.Struct({
5230
5449
  v: import_effect29.Schema.Literal(1),
5231
5450
  command: import_effect29.Schema.Literal("inbox approvals"),
@@ -5274,4 +5493,346 @@ var RigStatsOutput = import_effect29.Schema.Struct({
5274
5493
  });
5275
5494
  // packages/contracts/src/protocol-version.ts
5276
5495
  var RIG_PROTOCOL_VERSION = 1;
5496
+ // packages/contracts/src/help-catalog.ts
5497
+ function helpCatalog() {
5498
+ return { sections: TOP_LEVEL_SECTIONS, groups: ALL_GROUPS };
5499
+ }
5500
+ var TOP_LEVEL_SECTIONS = [
5501
+ {
5502
+ title: "Open Rig",
5503
+ subtitle: "normal UX \u2014 bare rig opens the bundled Rig Cockpit inside OMP",
5504
+ commands: [
5505
+ { command: "rig", description: "Open Rig Cockpit with OMP collaboration substrate for the current workspace." },
5506
+ { command: "rig --workspace <path>", description: "Open Rig Cockpit for another workspace." },
5507
+ { command: "/rig", description: "Inside OMP, reopen the Rig Cockpit." },
5508
+ { command: "rig join <link>", description: "Join an encrypted OMP collaborative session from another operator." }
5509
+ ]
5510
+ },
5511
+ {
5512
+ title: "Server",
5513
+ subtitle: "select execution placement before reading or dispatching work",
5514
+ commands: [
5515
+ { command: "Cockpit Server", description: "Show the selected local or remote server target and project-root link." },
5516
+ { command: "Server target \u2192 Local", description: "Use local execution placement for the selected project." },
5517
+ { command: "Server target \u2192 Remote", description: "Use remote execution placement with the server-host project root preserved." }
5518
+ ]
5519
+ },
5520
+ {
5521
+ title: "Tasks",
5522
+ subtitle: "configured task source on the selected target feeds task detail",
5523
+ commands: [
5524
+ { command: "Cockpit Tasks", description: "List tasks from the selected server target's configured task source." },
5525
+ { command: "Task detail", description: "Review task id, title, body, source status, labels, and issue URL before dispatch." },
5526
+ { command: "Task detail \u2192 Dispatch", description: "Submit the selected task run through the selected target, then attach the collaborative OMP session." },
5527
+ { command: "rig triage", description: "Run the configured issueAnalysis pass once; use cron/launchd/CI to schedule continuous triage." }
5528
+ ]
5529
+ },
5530
+ {
5531
+ title: "Runs",
5532
+ subtitle: "dispatched Rig runs attach through collaborative OMP sessions",
5533
+ commands: [
5534
+ { command: "OMP Runs screen", description: "Open dispatched runs, collaboration links, cwd, identity, status, and inbox counts." },
5535
+ { command: "rig join <link>", description: "Join a shared OMP session without changing execution placement." },
5536
+ { command: "OMP collab guest view", description: "Watch the shared transcript live; write links can prompt the originating session." }
5537
+ ]
5538
+ },
5539
+ {
5540
+ title: "Inbox + Doctor",
5541
+ subtitle: "approvals, user prompts, and health checks live inside Rig/OMP",
5542
+ commands: [
5543
+ { command: "OMP Inbox screen", description: "Review and answer pending approval/user-input workflow entries." },
5544
+ { command: "/rig inbox", description: "Open the inbox screen from inside OMP." },
5545
+ { command: "OMP Doctor screen", description: "Probe session discovery, collaboration registry, selected target, and workflow-entry health." }
5546
+ ]
5547
+ },
5548
+ {
5549
+ title: "Extend",
5550
+ subtitle: "plugins and OMP extensions shape the worker environment",
5551
+ commands: [
5552
+ { command: "rig.config.ts plugins", description: "Register task sources, validators, hooks, skills, roles, and workflow metadata." },
5553
+ { command: "runtime.pi.packages", description: "Declare team-wide OMP/Pi extension packages for sessions and workers." }
5554
+ ]
5555
+ }
5556
+ ];
5557
+ var PRIMARY_GROUPS = [
5558
+ {
5559
+ name: "server",
5560
+ summary: "Compatibility server selector; the product Server target screen lives in Rig Cockpit.",
5561
+ usage: ["rig server <status|list|add|use|repair-link|start> [options]"],
5562
+ commands: [
5563
+ { command: "status", description: "Legacy automation-only: show the selected server and project-root link.", primary: true },
5564
+ { command: "use local", description: "Legacy automation-only: switch this repo to local execution placement.", primary: true },
5565
+ { command: "add <alias> <url>", description: "Legacy automation-only: save a remote server URL.", primary: true },
5566
+ { command: "use <alias>", description: "Legacy automation-only: select a remote execution target alias.", primary: true },
5567
+ { command: "repair-link [--prepare|--backfill-only] [--repo owner/repo]", description: "Legacy automation-only: repair a server-host checkout link.", primary: true },
5568
+ { command: "list", description: "Legacy automation-only: list saved local/remote server aliases.", primary: true },
5569
+ { command: "start [--host <host>] [--port <n>]", description: "Legacy diagnostic-only: start a local rig-server process." }
5570
+ ],
5571
+ examples: [
5572
+ "rig server status # legacy automation only",
5573
+ "rig server use local # legacy automation only"
5574
+ ],
5575
+ next: ["For normal UX, run bare `rig`, open Cockpit Server, then continue to Tasks."]
5576
+ },
5577
+ {
5578
+ name: "task",
5579
+ summary: "Legacy automation-only task-source inspection and dispatch helpers.",
5580
+ usage: ["rig task <list|next|show|run> [options]"],
5581
+ commands: [
5582
+ { command: "list [--assignee <login|me|@me>] [--state open|closed]", description: "Legacy automation-only: list tasks from the configured source.", primary: true },
5583
+ { command: "next [filters]", description: "Legacy automation-only: render the next matching task card.", primary: true },
5584
+ { command: "show <id>|--task <id> [--raw]", description: "Legacy automation-only: show a task payload for scripts.", primary: true },
5585
+ { command: "run [#<issue>|<task-id>|--task <id>]", description: "Legacy/fenced: dispatch through the old task-run CLI path; not the task-detail dispatch path.", primary: true },
5586
+ { command: "ready", description: "Legacy automation-only: list task IDs that old dispatch can run now." },
5587
+ { command: "validate|verify [--task <id>]", description: "Legacy automation-only: run configured task checks/review gates." },
5588
+ { command: "details --task <id>", description: "Legacy automation-only: show full task info from the configured source." },
5589
+ { command: "reopen [--task <id> | --all] [--reason <text>]", description: "Legacy automation-only: reopen closed task(s) in the configured source." },
5590
+ { command: "artifacts|artifact-dir|artifact-write", description: "Legacy automation-only: inspect or write task artifacts." }
5591
+ ],
5592
+ examples: [
5593
+ "rig task list --assignee @me --limit 20 # legacy automation only",
5594
+ "rig task show 123 --raw # legacy automation only",
5595
+ "rig task run #123 --runtime-adapter pi # explicit legacy dispatch only"
5596
+ ],
5597
+ next: ["For normal UX, run bare `rig`, use Cockpit Server/Tasks, then dispatch from Task detail."]
5598
+ },
5599
+ {
5600
+ name: "run",
5601
+ summary: "Legacy automation-only run-record inspection; OMP Runs/collab is the live surface.",
5602
+ usage: ["rig run <list|status|show|steer|stop|resume|restart> [options]"],
5603
+ commands: [
5604
+ { command: "list", description: "Legacy automation-only: list old run records from selected server/local state.", primary: true },
5605
+ { command: "status", description: "Legacy automation-only: render old active/recent run-record groups; not live OMP status.", primary: true },
5606
+ { command: "show <id>|--run <id> [--raw]", description: "Legacy automation-only: show an old run-record payload for scripts.", primary: true },
5607
+ { command: "attach <run-id>|--run <id>", description: "Legacy/fenced: not the Rig Cockpit attach path; use OMP Runs or `rig join <link>`.", primary: true },
5608
+ { command: "steer <run-id> --message <text>", description: "Legacy automation-only: queue steering into an old live worker.", primary: true },
5609
+ { command: "stop [<run-id>|--run <id>]", description: "Legacy automation-only: request stop for old run records.", primary: true },
5610
+ { command: "resume [<run-id>]", description: "Legacy automation-only: resume an interrupted old run record." },
5611
+ { command: "restart [<run-id>]", description: "Legacy automation-only: re-dispatch an old run from a clean runtime." },
5612
+ { command: "timeline --run <id> [--follow]", description: "Legacy automation-only: stream raw old timeline events." },
5613
+ { command: "replay <run-id>|--run <id> [--with-session]", description: "Legacy automation-only: print an old consolidated run timeline." },
5614
+ { command: "delete|cleanup", description: "Legacy automation-only: remove completed old run records/artifacts." }
5615
+ ],
5616
+ examples: [
5617
+ "rig run list # legacy automation only",
5618
+ "rig run show <run-id> # legacy automation only",
5619
+ "rig run stop <run-id> # legacy automation only"
5620
+ ],
5621
+ next: [
5622
+ "For live sessions, use bare `rig`, the OMP Runs screen, or `rig join <collab-link>`.",
5623
+ "Use `--json` only for scripts that still consume legacy compatibility records."
5624
+ ]
5625
+ },
5626
+ {
5627
+ name: "inbox",
5628
+ summary: "Legacy automation-only request view; normal UX is the OMP Inbox screen.",
5629
+ usage: ["rig inbox <approvals|approve|inputs|respond> [options]"],
5630
+ commands: [
5631
+ { command: "approvals [--run <id>] [--task <id>]", description: "Legacy automation-only: list pending approval records.", primary: true },
5632
+ { command: "inputs [--run <id>] [--task <id>]", description: "Legacy automation-only: list pending user-input records.", primary: true },
5633
+ { command: "approve --run <id> --request <id> --decision approve|reject", description: "Legacy automation-only: resolve an approval record." },
5634
+ { command: "respond --run <id> --request <id> --answer key=value", description: "Legacy automation-only: answer a user-input record." }
5635
+ ],
5636
+ examples: [
5637
+ "rig inbox approvals # legacy automation only"
5638
+ ],
5639
+ next: ["For normal UX, use bare `rig`, then the OMP Inbox screen."]
5640
+ },
5641
+ {
5642
+ name: "stats",
5643
+ summary: "Legacy automation-only metrics over old run records; not the OMP live UX.",
5644
+ usage: ["rig stats [show] [--since <7d|30d|ISO date>]"],
5645
+ commands: [
5646
+ { command: "show [--since <window>]", description: "Legacy automation-only: totals, completion/failure rates, run time, steering, stalls, approvals.", primary: true }
5647
+ ],
5648
+ examples: [
5649
+ "rig stats --json # legacy automation only"
5650
+ ],
5651
+ next: ["For normal UX, use the OMP Runs screen."]
5652
+ },
5653
+ {
5654
+ name: "inspect",
5655
+ summary: "Legacy automation-only artifact/log inspection; normal UX is OMP session history.",
5656
+ usage: ["rig inspect <logs|artifacts|failures|graph|audit> --task <id>"],
5657
+ commands: [
5658
+ { command: "logs --task <id>", description: "Legacy automation-only: latest old run log for a task.", primary: true },
5659
+ { command: "artifacts --task <id>", description: "Legacy automation-only: list completion artifacts.", primary: true },
5660
+ { command: "failures --task <id>", description: "Legacy automation-only: recorded failures for a task.", primary: true },
5661
+ { command: "graph", description: "Legacy automation-only: task dependency graph." },
5662
+ { command: "audit", description: "Legacy automation-only: controlled-command audit trail." }
5663
+ ],
5664
+ examples: ["rig inspect logs --task <id> # legacy automation only"],
5665
+ next: ["For normal UX, use the OMP Runs screen and OMP session history."]
5666
+ },
5667
+ {
5668
+ name: "repo",
5669
+ summary: "Repository sync/baseline helpers for the Rig-managed checkout.",
5670
+ usage: ["rig repo <sync|reset-baseline>"],
5671
+ commands: [
5672
+ { command: "sync", description: "Sync project repository state.", primary: true },
5673
+ { command: "reset-baseline", description: "Reset the managed baseline for the repo." }
5674
+ ],
5675
+ examples: ["rig repo sync"]
5676
+ },
5677
+ {
5678
+ name: "plugin",
5679
+ summary: "Plugin listing, validation, and plugin-contributed commands.",
5680
+ usage: ["rig plugin <list|validate|run> [options]"],
5681
+ commands: [
5682
+ { command: "list", description: "List plugins declared in rig.config.ts and their contributions.", primary: true },
5683
+ { command: "validate --task <id>", description: "Run plugin-contributed validators for a task.", primary: true },
5684
+ { command: "run <command-id> [args...]", description: "Execute a plugin-contributed CLI command (also callable as `rig <command-id>`)." }
5685
+ ],
5686
+ examples: ["rig plugin list", "rig plugin run <command-id>"]
5687
+ },
5688
+ {
5689
+ name: "init",
5690
+ summary: "Legacy automation-only config bootstrap/repair helper; not root onboarding.",
5691
+ usage: ["rig init [--yes] [--server local|remote] [--repo owner/repo] [--remote-url <url>]"],
5692
+ commands: [
5693
+ { command: "init", description: "Legacy/fenced setup wizard for compatibility projects; not onboarding.", primary: true },
5694
+ { command: "init --demo", description: "Legacy/fenced offline demo project for compatibility tests.", primary: true },
5695
+ { command: "init --yes", description: "Legacy/fenced non-interactive setup for old automation.", primary: true },
5696
+ { command: "init --server remote --remote-url <url>", description: "Legacy/fenced remote server link setup.", primary: true },
5697
+ { command: "init --repair", description: "Legacy/fenced repair of missing private compatibility state." }
5698
+ ],
5699
+ examples: [
5700
+ "rig init --demo # legacy compatibility only",
5701
+ "rig init --repair # legacy compatibility only"
5702
+ ],
5703
+ next: ["For onboarding and normal UX, run bare `rig`, then use Cockpit Server/Tasks and dispatch from Task detail."]
5704
+ },
5705
+ {
5706
+ name: "doctor",
5707
+ summary: "Diagnostic-only compatibility checks; normal health lives in the OMP Doctor screen.",
5708
+ usage: ["rig doctor"],
5709
+ commands: [
5710
+ { command: "doctor", description: "Diagnostic/legacy-only: check compatibility setup/runtime state; not onboarding.", primary: true },
5711
+ { command: "check", description: "Diagnostic/legacy-only spelling for compatibility checks." }
5712
+ ],
5713
+ examples: ["rig doctor --json # legacy diagnostic automation only"],
5714
+ next: ["For normal UX, use the OMP Doctor screen."]
5715
+ },
5716
+ {
5717
+ name: "github",
5718
+ summary: "Legacy automation-only GitHub auth helpers for selected compatibility servers.",
5719
+ usage: ["rig github auth <status|import-gh|token>"],
5720
+ commands: [
5721
+ { command: "auth status", description: "Legacy automation-only: show GitHub auth state.", primary: true },
5722
+ { command: "auth import-gh", description: "Legacy automation-only: import the current `gh` token into the selected server." },
5723
+ { command: "auth token --token <token>", description: "Legacy automation-only: store a token on the selected server." }
5724
+ ],
5725
+ examples: ["rig github auth status # legacy automation only"],
5726
+ next: ["For normal UX, use bare `rig` and the OMP extension cockpit."]
5727
+ }
5728
+ ];
5729
+ var ADVANCED_GROUPS = [
5730
+ {
5731
+ name: "setup",
5732
+ summary: "Legacy automation-only setup bootstrap/check helpers.",
5733
+ usage: ["rig setup <bootstrap|check|preflight>"],
5734
+ commands: [
5735
+ { command: "bootstrap", description: "Legacy automation-only: bootstrap local setup dependencies.", primary: true },
5736
+ { command: "check", description: "Legacy automation-only: check local setup state (toolchain, deps, config).", primary: true },
5737
+ { command: "preflight", description: "Legacy automation-only: run preflight checks before an old run.", primary: true }
5738
+ ]
5739
+ },
5740
+ {
5741
+ name: "profile",
5742
+ summary: "Runtime profile/model defaults.",
5743
+ usage: ["rig profile <show|set>"],
5744
+ commands: [
5745
+ { command: "show", description: "Show the active execution profile.", primary: true },
5746
+ { command: "set [--model <model>] [--runtime <runtime>] [--plugin <plugin>]", description: "Set model/runtime/plugin profile defaults.", primary: true }
5747
+ ]
5748
+ },
5749
+ {
5750
+ name: "review",
5751
+ summary: "Inspect or change completion review gate policy.",
5752
+ usage: ["rig review <show|set>"],
5753
+ commands: [
5754
+ { command: "show", description: "Show current review gate settings." },
5755
+ { command: "set <off|advisory|required> [--provider <provider>]", description: "Change review strictness/provider (e.g. --provider greptile)." }
5756
+ ],
5757
+ examples: ["rig review show", "rig review set required --provider greptile"],
5758
+ next: ["For normal workflow handoffs, use the OMP Inbox screen."]
5759
+ },
5760
+ {
5761
+ name: "pi",
5762
+ summary: "Manage Pi extension packages for this project (community extensions from npm/git).",
5763
+ usage: ["rig pi <list|add|remove|search> [args]"],
5764
+ commands: [
5765
+ { command: "list", description: "Show project and user Pi extension packages." },
5766
+ { command: "add <source>", description: "Add an npm/git Pi extension to .pi/settings.json (auto-installs at next session)." },
5767
+ { command: "remove <source>", description: "Remove an operator-added Pi extension." },
5768
+ { command: "search [term]", description: "Discover Pi extension packages on the npm registry." }
5769
+ ],
5770
+ examples: ["rig pi search subagents", "rig pi add pi-subagents", "rig pi list"],
5771
+ next: ["Config-managed extensions: declare `runtime: { pi: { packages: [...] } }` in rig.config.ts \u2014 workers pick them up automatically."]
5772
+ },
5773
+ {
5774
+ name: "queue",
5775
+ summary: "Run task queues locally.",
5776
+ usage: ["rig queue run [--workers <n>] [--max-tasks <n>] [--action validate|verify|pipeline] [--isolation off|worktree] [--no-runtime-reuse] [--fail-fast] [--skip-project-sync]"],
5777
+ commands: [
5778
+ { command: "run [--workers <n>] [--max-tasks <n>] [--action validate|verify|pipeline] [--isolation off|worktree] [--no-runtime-reuse] [--fail-fast] [--skip-project-sync]", description: "Process queue work: drain matching tasks with N workers, optional per-task action and isolation.", primary: true }
5779
+ ]
5780
+ },
5781
+ {
5782
+ name: "agent",
5783
+ summary: "Runtime agent workspace helpers.",
5784
+ usage: ["rig agent <list|prepare|run|cleanup>"],
5785
+ commands: [
5786
+ { command: "list", description: "List prepared agent runtimes.", primary: true },
5787
+ { command: "prepare [--id <id>] [--mode <mode>] [--task <task>]", description: "Prepare an isolated agent runtime workspace.", primary: true },
5788
+ { command: "run [--id <id>] [--mode <mode>] [--task <task>] [--skip-project-sync]", description: "Prepare (if needed) and run an agent in its workspace.", primary: true },
5789
+ { command: "cleanup [--all] [--id <id>]", description: "Remove prepared agent workspaces.", primary: true }
5790
+ ]
5791
+ },
5792
+ { name: "inspector", summary: "Event stream and drift scanners.", usage: ["rig inspector <stream|scan-upstream-drift>"], commands: [{ command: "stream", description: "Stream events." }] },
5793
+ {
5794
+ name: "dist",
5795
+ summary: "Build/install packaged Rig CLI.",
5796
+ usage: ["rig dist <build|install|doctor|rebuild-agent>"],
5797
+ commands: [
5798
+ { command: "build [--output-dir <dir>]", description: "Build the distributable Rig CLI.", primary: true },
5799
+ { command: "install [--scope <scope>] [--path <path>]", description: "Install the built CLI to a scope/path.", primary: true },
5800
+ { command: "doctor", description: "Diagnose the dist toolchain and install state.", primary: true },
5801
+ { command: "rebuild-agent", description: "Rebuild the agent runtime image, pruning stale images.", primary: true }
5802
+ ]
5803
+ },
5804
+ { name: "workspace", summary: "Workspace topology/service helpers.", usage: ["rig workspace <summary|topology|remote-hosts>"], commands: [{ command: "summary", description: "Show workspace summary." }] },
5805
+ {
5806
+ name: "remote",
5807
+ summary: "Legacy automation-only remote orchestration controls.",
5808
+ usage: ["rig remote <status|tasks|watch|pause|resume|continue|stop|refresh|add-iterations|remove-iterations|endpoint ...>"],
5809
+ commands: [
5810
+ { command: "status [--remote <alias>]", description: "Legacy automation-only: show old remote orchestration state.", primary: true },
5811
+ { command: "tasks [--remote <alias>]", description: "Legacy automation-only: list the old remote's tracked tasks.", primary: true },
5812
+ { command: "watch [--remote <alias>] [--seconds <n>] [--event <type>]", description: "Legacy automation-only: stream old remote orchestration events.", primary: true },
5813
+ { command: "pause [--remote <alias>]", description: "Legacy automation-only: pause old remote orchestration.", primary: true },
5814
+ { command: "resume [--remote <alias>] [--max-workers <n>] [--max-iterations <n>] [--direct-merge]", description: "Legacy automation-only: resume old remote orchestration with optional tuning.", primary: true },
5815
+ { command: "continue [--remote <alias>]", description: "Legacy automation-only: continue a paused old remote.", primary: true },
5816
+ { command: "stop [--remote <alias>]", description: "Legacy automation-only: stop old remote orchestration.", primary: true },
5817
+ { command: "refresh [--remote <alias>]", description: "Legacy automation-only: refresh old remote state.", primary: true },
5818
+ { command: "add-iterations [--count <n>] [--remote <alias>]", description: "Legacy automation-only: grant an old remote more iterations.", primary: true },
5819
+ { command: "remove-iterations [--count <n>] [--remote <alias>]", description: "Legacy automation-only: reduce an old remote's iteration budget.", primary: true },
5820
+ { command: "endpoint list", description: "Legacy automation-only: list configured remote endpoints.", primary: true },
5821
+ { command: "endpoint add --alias <alias> --host <host> --port <n> [--token <token>]", description: "Legacy automation-only: register a remote endpoint.", primary: true },
5822
+ { command: "endpoint remove --alias <alias>", description: "Legacy automation-only: remove a remote endpoint.", primary: true },
5823
+ { command: "endpoint test [--alias <alias>]", description: "Legacy diagnostic-only: test connectivity to a remote endpoint.", primary: true },
5824
+ { command: "endpoint doctor", description: "Legacy diagnostic-only: diagnose remote endpoint configuration.", primary: true }
5825
+ ]
5826
+ },
5827
+ { name: "git", summary: "Pass through to Rig git-flow helper.", usage: ["rig git <args...>"], commands: [{ command: "<args...>", description: "Advanced git flow operations." }] },
5828
+ { name: "harness", summary: "Pass through to runtime harness CLI.", usage: ["rig harness <args...>"], commands: [{ command: "<args...>", description: "Advanced harness operations." }] },
5829
+ { name: "test", summary: "Project test wrappers.", usage: ["rig test <unit|e2e|all>"], commands: [{ command: "all", description: "Run configured project tests." }] }
5830
+ ];
5831
+ var ADVANCED_COMMANDS = [
5832
+ { command: "rig server task-run ...", description: "Internal legacy server-owned task execution entry point." },
5833
+ { command: "rig server notify-test [--event <type>]", description: "Internal diagnostic event notification smoke command." },
5834
+ { command: "rig run start|start-serial|start-parallel", description: "Legacy/internal queue starters; not the Rig Cockpit task-detail dispatch path." },
5835
+ { command: "rig remote orchestrate-*", description: "Legacy automation-only remote orchestration commands." }
5836
+ ];
5837
+ var ALL_GROUPS = [...PRIMARY_GROUPS, ...ADVANCED_GROUPS];
5277
5838
  })