@h-rig/contracts 0.0.6-alpha.9 → 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 (73) hide show
  1. package/dist/index.cjs +5838 -0
  2. package/dist/index.mjs +5797 -0
  3. package/dist/src/artifact.d.ts +13 -0
  4. package/dist/src/artifact.js +3 -0
  5. package/dist/src/baseSchemas.d.ts +63 -0
  6. package/dist/src/baseSchemas.js +6 -0
  7. package/dist/src/cli-output.d.ts +324 -0
  8. package/dist/src/cli-output.js +190 -0
  9. package/dist/src/config.d.ts +316 -0
  10. package/dist/src/config.js +14 -2
  11. package/dist/src/conversation.d.ts +50 -0
  12. package/dist/src/conversation.js +3 -0
  13. package/dist/src/editor.d.ts +25 -0
  14. package/dist/src/editor.js +3 -0
  15. package/dist/src/engine.d.ts +2789 -0
  16. package/dist/src/engine.js +7 -2
  17. package/dist/src/git.d.ts +144 -0
  18. package/dist/src/git.js +3 -0
  19. package/dist/src/graph.d.ts +39 -0
  20. package/dist/src/graph.js +3 -0
  21. package/dist/src/help-catalog.d.ts +30 -0
  22. package/dist/src/help-catalog.js +351 -0
  23. package/dist/src/index.d.ts +37 -0
  24. package/dist/src/index.js +2469 -1219
  25. package/dist/src/ipc.d.ts +248 -0
  26. package/dist/src/keybindings.d.ts +71 -0
  27. package/dist/src/keybindings.js +3 -0
  28. package/dist/src/model.d.ts +77 -0
  29. package/dist/src/orchestration.d.ts +3695 -0
  30. package/dist/src/orchestration.js +3 -0
  31. package/dist/src/pi-session.d.ts +113 -0
  32. package/dist/src/pi-session.js +1 -0
  33. package/dist/src/plugin-hooks.d.ts +51 -0
  34. package/dist/src/plugin-hooks.js +112 -0
  35. package/dist/src/plugin.d.ts +230 -0
  36. package/dist/src/policy.d.ts +16 -0
  37. package/dist/src/policy.js +3 -0
  38. package/dist/src/project.d.ts +71 -0
  39. package/dist/src/project.js +3 -0
  40. package/dist/src/protocol-version.d.ts +21 -0
  41. package/dist/src/protocol-version.js +6 -0
  42. package/dist/src/provider.d.ts +105 -0
  43. package/dist/src/provider.js +3 -0
  44. package/dist/src/providerRuntime.d.ts +3949 -0
  45. package/dist/src/providerRuntime.js +3 -0
  46. package/dist/src/remote.d.ts +326 -0
  47. package/dist/src/remote.js +7 -2
  48. package/dist/src/review.d.ts +18 -0
  49. package/dist/src/review.js +3 -0
  50. package/dist/src/rig.d.ts +783 -0
  51. package/dist/src/rig.js +58 -4
  52. package/dist/src/run-journal.d.ts +763 -0
  53. package/dist/src/run-journal.js +1509 -0
  54. package/dist/src/run-session-journal.d.ts +53 -0
  55. package/dist/src/run-session-journal.js +1582 -0
  56. package/dist/src/run-status.d.ts +12 -0
  57. package/dist/src/run-status.js +38 -0
  58. package/dist/src/runtime.d.ts +103 -0
  59. package/dist/src/runtime.js +7 -2
  60. package/dist/src/server.d.ts +106 -0
  61. package/dist/src/server.js +3 -0
  62. package/dist/src/serviceFabric.d.ts +62 -0
  63. package/dist/src/serviceFabric.js +3 -0
  64. package/dist/src/task-source.d.ts +28 -0
  65. package/dist/src/terminal.d.ts +130 -0
  66. package/dist/src/terminal.js +3 -0
  67. package/dist/src/validation.d.ts +14 -0
  68. package/dist/src/validation.js +3 -0
  69. package/dist/src/workspace.d.ts +204 -0
  70. package/dist/src/workspace.js +3 -0
  71. package/dist/src/ws.d.ts +747 -0
  72. package/dist/src/ws.js +52 -3
  73. package/package.json +6 -3
@@ -16,6 +16,9 @@ var WorkspaceId = makeEntityId("WorkspaceId");
16
16
  var GraphId = makeEntityId("GraphId");
17
17
  var TaskId = makeEntityId("TaskId");
18
18
  var RunId = makeEntityId("RunId");
19
+ var SafePathSegment = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafePathSegment"));
20
+ var SafeRunId = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/)).pipe(Schema.brand("SafeRunId"));
21
+ var SafeGitRefComponent = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafeGitRefComponent"));
19
22
  var EngineRuntimeId = makeEntityId("EngineRuntimeId");
20
23
  var ConversationId = makeEntityId("ConversationId");
21
24
  var ActionId = makeEntityId("ActionId");
@@ -1069,12 +1072,14 @@ var RunStatus = Schema9.Literals([
1069
1072
  "running",
1070
1073
  "waiting-approval",
1071
1074
  "waiting-user-input",
1075
+ "paused",
1072
1076
  "validating",
1073
1077
  "reviewing",
1078
+ "closing-out",
1079
+ "needs-attention",
1074
1080
  "completed",
1075
1081
  "failed",
1076
- "cancelled",
1077
- "paused"
1082
+ "stopped"
1078
1083
  ]);
1079
1084
  var EngineSandboxMode = Schema9.Literals([
1080
1085
  "read-only",
@@ -0,0 +1,144 @@
1
+ import { Schema } from "effect";
2
+ export declare const GitStackedAction: Schema.Literals<readonly ["commit", "commit_push", "commit_push_pr"]>;
3
+ export type GitStackedAction = typeof GitStackedAction.Type;
4
+ export declare const GitBranch: Schema.Struct<{
5
+ readonly name: Schema.Trim;
6
+ readonly isRemote: Schema.optional<Schema.Boolean>;
7
+ readonly remoteName: Schema.optional<Schema.Trim>;
8
+ readonly current: Schema.Boolean;
9
+ readonly isDefault: Schema.Boolean;
10
+ readonly worktreePath: Schema.NullOr<Schema.Trim>;
11
+ }>;
12
+ export type GitBranch = typeof GitBranch.Type;
13
+ export declare const GitStatusInput: Schema.Struct<{
14
+ readonly cwd: Schema.Trim;
15
+ }>;
16
+ export type GitStatusInput = typeof GitStatusInput.Type;
17
+ export declare const GitPullInput: Schema.Struct<{
18
+ readonly cwd: Schema.Trim;
19
+ }>;
20
+ export type GitPullInput = typeof GitPullInput.Type;
21
+ export declare const GitReadWorkingTreePatchInput: Schema.Struct<{
22
+ readonly cwd: Schema.Trim;
23
+ readonly relativePath: Schema.optional<Schema.Trim>;
24
+ }>;
25
+ export type GitReadWorkingTreePatchInput = typeof GitReadWorkingTreePatchInput.Type;
26
+ export declare const GitRunStackedActionInput: Schema.Struct<{
27
+ readonly cwd: Schema.Trim;
28
+ readonly action: Schema.Literals<readonly ["commit", "commit_push", "commit_push_pr"]>;
29
+ readonly commitMessage: Schema.optional<Schema.Trim>;
30
+ readonly featureBranch: Schema.optional<Schema.Boolean>;
31
+ }>;
32
+ export type GitRunStackedActionInput = typeof GitRunStackedActionInput.Type;
33
+ export declare const GitListBranchesInput: Schema.Struct<{
34
+ readonly cwd: Schema.Trim;
35
+ }>;
36
+ export type GitListBranchesInput = typeof GitListBranchesInput.Type;
37
+ export declare const GitCreateWorktreeInput: Schema.Struct<{
38
+ readonly cwd: Schema.Trim;
39
+ readonly branch: Schema.Trim;
40
+ readonly newBranch: Schema.Trim;
41
+ readonly path: Schema.NullOr<Schema.Trim>;
42
+ }>;
43
+ export type GitCreateWorktreeInput = typeof GitCreateWorktreeInput.Type;
44
+ export declare const GitRemoveWorktreeInput: Schema.Struct<{
45
+ readonly cwd: Schema.Trim;
46
+ readonly path: Schema.Trim;
47
+ readonly force: Schema.optional<Schema.Boolean>;
48
+ }>;
49
+ export type GitRemoveWorktreeInput = typeof GitRemoveWorktreeInput.Type;
50
+ export declare const GitCreateBranchInput: Schema.Struct<{
51
+ readonly cwd: Schema.Trim;
52
+ readonly branch: Schema.Trim;
53
+ }>;
54
+ export type GitCreateBranchInput = typeof GitCreateBranchInput.Type;
55
+ export declare const GitCheckoutInput: Schema.Struct<{
56
+ readonly cwd: Schema.Trim;
57
+ readonly branch: Schema.Trim;
58
+ }>;
59
+ export type GitCheckoutInput = typeof GitCheckoutInput.Type;
60
+ export declare const GitInitInput: Schema.Struct<{
61
+ readonly cwd: Schema.Trim;
62
+ }>;
63
+ export type GitInitInput = typeof GitInitInput.Type;
64
+ export declare const GitStatusResult: Schema.Struct<{
65
+ readonly branch: Schema.NullOr<Schema.Trim>;
66
+ readonly hasWorkingTreeChanges: Schema.Boolean;
67
+ readonly workingTree: Schema.Struct<{
68
+ readonly files: Schema.$Array<Schema.Struct<{
69
+ readonly path: Schema.Trim;
70
+ readonly insertions: Schema.Int;
71
+ readonly deletions: Schema.Int;
72
+ }>>;
73
+ readonly insertions: Schema.Int;
74
+ readonly deletions: Schema.Int;
75
+ }>;
76
+ readonly hasUpstream: Schema.Boolean;
77
+ readonly aheadCount: Schema.Int;
78
+ readonly behindCount: Schema.Int;
79
+ readonly pr: Schema.NullOr<Schema.Struct<{
80
+ readonly number: Schema.Int;
81
+ readonly title: Schema.Trim;
82
+ readonly url: Schema.String;
83
+ readonly baseBranch: Schema.Trim;
84
+ readonly headBranch: Schema.Trim;
85
+ readonly state: Schema.Literals<readonly ["open", "closed", "merged"]>;
86
+ }>>;
87
+ }>;
88
+ export type GitStatusResult = typeof GitStatusResult.Type;
89
+ export declare const GitListBranchesResult: Schema.Struct<{
90
+ readonly branches: Schema.$Array<Schema.Struct<{
91
+ readonly name: Schema.Trim;
92
+ readonly isRemote: Schema.optional<Schema.Boolean>;
93
+ readonly remoteName: Schema.optional<Schema.Trim>;
94
+ readonly current: Schema.Boolean;
95
+ readonly isDefault: Schema.Boolean;
96
+ readonly worktreePath: Schema.NullOr<Schema.Trim>;
97
+ }>>;
98
+ readonly isRepo: Schema.Boolean;
99
+ }>;
100
+ export type GitListBranchesResult = typeof GitListBranchesResult.Type;
101
+ export declare const GitCreateWorktreeResult: Schema.Struct<{
102
+ readonly worktree: Schema.Struct<{
103
+ readonly path: Schema.Trim;
104
+ readonly branch: Schema.Trim;
105
+ }>;
106
+ }>;
107
+ export type GitCreateWorktreeResult = typeof GitCreateWorktreeResult.Type;
108
+ export declare const GitRunStackedActionResult: Schema.Struct<{
109
+ readonly action: Schema.Literals<readonly ["commit", "commit_push", "commit_push_pr"]>;
110
+ readonly branch: Schema.Struct<{
111
+ readonly status: Schema.Literals<readonly ["created", "skipped_not_requested"]>;
112
+ readonly name: Schema.optional<Schema.Trim>;
113
+ }>;
114
+ readonly commit: Schema.Struct<{
115
+ readonly status: Schema.Literals<readonly ["created", "skipped_no_changes"]>;
116
+ readonly commitSha: Schema.optional<Schema.Trim>;
117
+ readonly subject: Schema.optional<Schema.Trim>;
118
+ }>;
119
+ readonly push: Schema.Struct<{
120
+ readonly status: Schema.Literals<readonly ["pushed", "skipped_not_requested", "skipped_up_to_date"]>;
121
+ readonly branch: Schema.optional<Schema.Trim>;
122
+ readonly upstreamBranch: Schema.optional<Schema.Trim>;
123
+ readonly setUpstream: Schema.optional<Schema.Boolean>;
124
+ }>;
125
+ readonly pr: Schema.Struct<{
126
+ readonly status: Schema.Literals<readonly ["created", "opened_existing", "skipped_not_requested"]>;
127
+ readonly url: Schema.optional<Schema.String>;
128
+ readonly number: Schema.optional<Schema.Int>;
129
+ readonly baseBranch: Schema.optional<Schema.Trim>;
130
+ readonly headBranch: Schema.optional<Schema.Trim>;
131
+ readonly title: Schema.optional<Schema.Trim>;
132
+ }>;
133
+ }>;
134
+ export type GitRunStackedActionResult = typeof GitRunStackedActionResult.Type;
135
+ export declare const GitPullResult: Schema.Struct<{
136
+ readonly status: Schema.Literals<readonly ["pulled", "skipped_up_to_date"]>;
137
+ readonly branch: Schema.Trim;
138
+ readonly upstreamBranch: Schema.NullOr<Schema.Trim>;
139
+ }>;
140
+ export type GitPullResult = typeof GitPullResult.Type;
141
+ export declare const GitReadWorkingTreePatchResult: Schema.Struct<{
142
+ readonly diff: Schema.String;
143
+ }>;
144
+ export type GitReadWorkingTreePatchResult = typeof GitReadWorkingTreePatchResult.Type;
package/dist/src/git.js CHANGED
@@ -16,6 +16,9 @@ var WorkspaceId = makeEntityId("WorkspaceId");
16
16
  var GraphId = makeEntityId("GraphId");
17
17
  var TaskId = makeEntityId("TaskId");
18
18
  var RunId = makeEntityId("RunId");
19
+ var SafePathSegment = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafePathSegment"));
20
+ var SafeRunId = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/)).pipe(Schema.brand("SafeRunId"));
21
+ var SafeGitRefComponent = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafeGitRefComponent"));
19
22
  var EngineRuntimeId = makeEntityId("EngineRuntimeId");
20
23
  var ConversationId = makeEntityId("ConversationId");
21
24
  var ActionId = makeEntityId("ActionId");
@@ -0,0 +1,39 @@
1
+ import { Schema } from "effect";
2
+ export declare const TaskStatus: Schema.Literals<readonly ["draft", "open", "ready", "queued", "running", "in_progress", "under_review", "blocked", "unknown", "completed", "failed", "cancelled", "closed"]>;
3
+ export type TaskStatus = typeof TaskStatus.Type;
4
+ export declare const GraphSummary: Schema.Struct<{
5
+ readonly id: Schema.brand<Schema.Trim, "GraphId">;
6
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
7
+ readonly title: Schema.Trim;
8
+ readonly description: Schema.NullOr<Schema.String>;
9
+ readonly createdAt: Schema.String;
10
+ readonly updatedAt: Schema.String;
11
+ }>;
12
+ export type GraphSummary = typeof GraphSummary.Type;
13
+ export declare const TaskSummary: Schema.Struct<{
14
+ readonly id: Schema.brand<Schema.Trim, "TaskId">;
15
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
16
+ readonly graphId: Schema.NullOr<Schema.brand<Schema.Trim, "GraphId">>;
17
+ readonly externalId: Schema.NullOr<Schema.Trim>;
18
+ readonly title: Schema.Trim;
19
+ readonly description: Schema.String;
20
+ readonly status: Schema.Literals<readonly ["draft", "open", "ready", "queued", "running", "in_progress", "under_review", "blocked", "unknown", "completed", "failed", "cancelled", "closed"]>;
21
+ readonly priority: Schema.NullOr<Schema.Int>;
22
+ readonly role: Schema.NullOr<Schema.Trim>;
23
+ readonly scope: Schema.$Array<Schema.Trim>;
24
+ readonly validationKeys: Schema.$Array<Schema.Trim>;
25
+ readonly sourceIssueId: Schema.optional<Schema.NullOr<Schema.Trim>>;
26
+ readonly dependencies: Schema.optional<Schema.$Array<Schema.Trim>>;
27
+ readonly parentChildDeps: Schema.optional<Schema.$Array<Schema.Trim>>;
28
+ readonly metadata: Schema.Unknown;
29
+ readonly createdAt: Schema.String;
30
+ readonly updatedAt: Schema.String;
31
+ }>;
32
+ export type TaskSummary = typeof TaskSummary.Type;
33
+ export declare const QueueEntry: Schema.Struct<{
34
+ readonly taskId: Schema.brand<Schema.Trim, "TaskId">;
35
+ readonly score: Schema.Int;
36
+ readonly unblockCount: Schema.Int;
37
+ readonly position: Schema.Int;
38
+ }>;
39
+ export type QueueEntry = typeof QueueEntry.Type;
package/dist/src/graph.js CHANGED
@@ -16,6 +16,9 @@ var WorkspaceId = makeEntityId("WorkspaceId");
16
16
  var GraphId = makeEntityId("GraphId");
17
17
  var TaskId = makeEntityId("TaskId");
18
18
  var RunId = makeEntityId("RunId");
19
+ var SafePathSegment = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafePathSegment"));
20
+ var SafeRunId = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/)).pipe(Schema.brand("SafeRunId"));
21
+ var SafeGitRefComponent = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafeGitRefComponent"));
19
22
  var EngineRuntimeId = makeEntityId("EngineRuntimeId");
20
23
  var ConversationId = makeEntityId("ConversationId");
21
24
  var ActionId = makeEntityId("ActionId");
@@ -0,0 +1,30 @@
1
+ export type HelpCommand = {
2
+ command: string;
3
+ description: string;
4
+ primary?: boolean;
5
+ };
6
+ export type HelpGroup = {
7
+ name: string;
8
+ summary: string;
9
+ usage: string[];
10
+ commands: HelpCommand[];
11
+ examples?: string[];
12
+ next?: string[];
13
+ advanced?: string[];
14
+ };
15
+ export type TopLevelSection = {
16
+ title: string;
17
+ subtitle: string;
18
+ commands: HelpCommand[];
19
+ };
20
+ /** Catalog DATA for the app's help view — the view builds its own layout
21
+ * from these; the render* functions below remain for plain/script output. */
22
+ export declare function helpCatalog(): {
23
+ sections: readonly TopLevelSection[];
24
+ groups: readonly HelpGroup[];
25
+ };
26
+ export declare const TOP_LEVEL_SECTIONS: TopLevelSection[];
27
+ export declare const PRIMARY_GROUPS: HelpGroup[];
28
+ export declare const ADVANCED_GROUPS: HelpGroup[];
29
+ export declare const ADVANCED_COMMANDS: HelpCommand[];
30
+ export declare const ALL_GROUPS: HelpGroup[];
@@ -0,0 +1,351 @@
1
+ // @bun
2
+ // packages/contracts/src/help-catalog.ts
3
+ function helpCatalog() {
4
+ return { sections: TOP_LEVEL_SECTIONS, groups: ALL_GROUPS };
5
+ }
6
+ var TOP_LEVEL_SECTIONS = [
7
+ {
8
+ title: "Open Rig",
9
+ subtitle: "normal UX \u2014 bare rig opens the bundled Rig Cockpit inside OMP",
10
+ commands: [
11
+ { command: "rig", description: "Open Rig Cockpit with OMP collaboration substrate for the current workspace." },
12
+ { command: "rig --workspace <path>", description: "Open Rig Cockpit for another workspace." },
13
+ { command: "/rig", description: "Inside OMP, reopen the Rig Cockpit." },
14
+ { command: "rig join <link>", description: "Join an encrypted OMP collaborative session from another operator." }
15
+ ]
16
+ },
17
+ {
18
+ title: "Server",
19
+ subtitle: "select execution placement before reading or dispatching work",
20
+ commands: [
21
+ { command: "Cockpit Server", description: "Show the selected local or remote server target and project-root link." },
22
+ { command: "Server target \u2192 Local", description: "Use local execution placement for the selected project." },
23
+ { command: "Server target \u2192 Remote", description: "Use remote execution placement with the server-host project root preserved." }
24
+ ]
25
+ },
26
+ {
27
+ title: "Tasks",
28
+ subtitle: "configured task source on the selected target feeds task detail",
29
+ commands: [
30
+ { command: "Cockpit Tasks", description: "List tasks from the selected server target's configured task source." },
31
+ { command: "Task detail", description: "Review task id, title, body, source status, labels, and issue URL before dispatch." },
32
+ { command: "Task detail \u2192 Dispatch", description: "Submit the selected task run through the selected target, then attach the collaborative OMP session." },
33
+ { command: "rig triage", description: "Run the configured issueAnalysis pass once; use cron/launchd/CI to schedule continuous triage." }
34
+ ]
35
+ },
36
+ {
37
+ title: "Runs",
38
+ subtitle: "dispatched Rig runs attach through collaborative OMP sessions",
39
+ commands: [
40
+ { command: "OMP Runs screen", description: "Open dispatched runs, collaboration links, cwd, identity, status, and inbox counts." },
41
+ { command: "rig join <link>", description: "Join a shared OMP session without changing execution placement." },
42
+ { command: "OMP collab guest view", description: "Watch the shared transcript live; write links can prompt the originating session." }
43
+ ]
44
+ },
45
+ {
46
+ title: "Inbox + Doctor",
47
+ subtitle: "approvals, user prompts, and health checks live inside Rig/OMP",
48
+ commands: [
49
+ { command: "OMP Inbox screen", description: "Review and answer pending approval/user-input workflow entries." },
50
+ { command: "/rig inbox", description: "Open the inbox screen from inside OMP." },
51
+ { command: "OMP Doctor screen", description: "Probe session discovery, collaboration registry, selected target, and workflow-entry health." }
52
+ ]
53
+ },
54
+ {
55
+ title: "Extend",
56
+ subtitle: "plugins and OMP extensions shape the worker environment",
57
+ commands: [
58
+ { command: "rig.config.ts plugins", description: "Register task sources, validators, hooks, skills, roles, and workflow metadata." },
59
+ { command: "runtime.pi.packages", description: "Declare team-wide OMP/Pi extension packages for sessions and workers." }
60
+ ]
61
+ }
62
+ ];
63
+ var PRIMARY_GROUPS = [
64
+ {
65
+ name: "server",
66
+ summary: "Compatibility server selector; the product Server target screen lives in Rig Cockpit.",
67
+ usage: ["rig server <status|list|add|use|repair-link|start> [options]"],
68
+ commands: [
69
+ { command: "status", description: "Legacy automation-only: show the selected server and project-root link.", primary: true },
70
+ { command: "use local", description: "Legacy automation-only: switch this repo to local execution placement.", primary: true },
71
+ { command: "add <alias> <url>", description: "Legacy automation-only: save a remote server URL.", primary: true },
72
+ { command: "use <alias>", description: "Legacy automation-only: select a remote execution target alias.", primary: true },
73
+ { command: "repair-link [--prepare|--backfill-only] [--repo owner/repo]", description: "Legacy automation-only: repair a server-host checkout link.", primary: true },
74
+ { command: "list", description: "Legacy automation-only: list saved local/remote server aliases.", primary: true },
75
+ { command: "start [--host <host>] [--port <n>]", description: "Legacy diagnostic-only: start a local rig-server process." }
76
+ ],
77
+ examples: [
78
+ "rig server status # legacy automation only",
79
+ "rig server use local # legacy automation only"
80
+ ],
81
+ next: ["For normal UX, run bare `rig`, open Cockpit Server, then continue to Tasks."]
82
+ },
83
+ {
84
+ name: "task",
85
+ summary: "Legacy automation-only task-source inspection and dispatch helpers.",
86
+ usage: ["rig task <list|next|show|run> [options]"],
87
+ commands: [
88
+ { command: "list [--assignee <login|me|@me>] [--state open|closed]", description: "Legacy automation-only: list tasks from the configured source.", primary: true },
89
+ { command: "next [filters]", description: "Legacy automation-only: render the next matching task card.", primary: true },
90
+ { command: "show <id>|--task <id> [--raw]", description: "Legacy automation-only: show a task payload for scripts.", primary: true },
91
+ { 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 },
92
+ { command: "ready", description: "Legacy automation-only: list task IDs that old dispatch can run now." },
93
+ { command: "validate|verify [--task <id>]", description: "Legacy automation-only: run configured task checks/review gates." },
94
+ { command: "details --task <id>", description: "Legacy automation-only: show full task info from the configured source." },
95
+ { command: "reopen [--task <id> | --all] [--reason <text>]", description: "Legacy automation-only: reopen closed task(s) in the configured source." },
96
+ { command: "artifacts|artifact-dir|artifact-write", description: "Legacy automation-only: inspect or write task artifacts." }
97
+ ],
98
+ examples: [
99
+ "rig task list --assignee @me --limit 20 # legacy automation only",
100
+ "rig task show 123 --raw # legacy automation only",
101
+ "rig task run #123 --runtime-adapter pi # explicit legacy dispatch only"
102
+ ],
103
+ next: ["For normal UX, run bare `rig`, use Cockpit Server/Tasks, then dispatch from Task detail."]
104
+ },
105
+ {
106
+ name: "run",
107
+ summary: "Legacy automation-only run-record inspection; OMP Runs/collab is the live surface.",
108
+ usage: ["rig run <list|status|show|steer|stop|resume|restart> [options]"],
109
+ commands: [
110
+ { command: "list", description: "Legacy automation-only: list old run records from selected server/local state.", primary: true },
111
+ { command: "status", description: "Legacy automation-only: render old active/recent run-record groups; not live OMP status.", primary: true },
112
+ { command: "show <id>|--run <id> [--raw]", description: "Legacy automation-only: show an old run-record payload for scripts.", primary: true },
113
+ { command: "attach <run-id>|--run <id>", description: "Legacy/fenced: not the Rig Cockpit attach path; use OMP Runs or `rig join <link>`.", primary: true },
114
+ { command: "steer <run-id> --message <text>", description: "Legacy automation-only: queue steering into an old live worker.", primary: true },
115
+ { command: "stop [<run-id>|--run <id>]", description: "Legacy automation-only: request stop for old run records.", primary: true },
116
+ { command: "resume [<run-id>]", description: "Legacy automation-only: resume an interrupted old run record." },
117
+ { command: "restart [<run-id>]", description: "Legacy automation-only: re-dispatch an old run from a clean runtime." },
118
+ { command: "timeline --run <id> [--follow]", description: "Legacy automation-only: stream raw old timeline events." },
119
+ { command: "replay <run-id>|--run <id> [--with-session]", description: "Legacy automation-only: print an old consolidated run timeline." },
120
+ { command: "delete|cleanup", description: "Legacy automation-only: remove completed old run records/artifacts." }
121
+ ],
122
+ examples: [
123
+ "rig run list # legacy automation only",
124
+ "rig run show <run-id> # legacy automation only",
125
+ "rig run stop <run-id> # legacy automation only"
126
+ ],
127
+ next: [
128
+ "For live sessions, use bare `rig`, the OMP Runs screen, or `rig join <collab-link>`.",
129
+ "Use `--json` only for scripts that still consume legacy compatibility records."
130
+ ]
131
+ },
132
+ {
133
+ name: "inbox",
134
+ summary: "Legacy automation-only request view; normal UX is the OMP Inbox screen.",
135
+ usage: ["rig inbox <approvals|approve|inputs|respond> [options]"],
136
+ commands: [
137
+ { command: "approvals [--run <id>] [--task <id>]", description: "Legacy automation-only: list pending approval records.", primary: true },
138
+ { command: "inputs [--run <id>] [--task <id>]", description: "Legacy automation-only: list pending user-input records.", primary: true },
139
+ { command: "approve --run <id> --request <id> --decision approve|reject", description: "Legacy automation-only: resolve an approval record." },
140
+ { command: "respond --run <id> --request <id> --answer key=value", description: "Legacy automation-only: answer a user-input record." }
141
+ ],
142
+ examples: [
143
+ "rig inbox approvals # legacy automation only"
144
+ ],
145
+ next: ["For normal UX, use bare `rig`, then the OMP Inbox screen."]
146
+ },
147
+ {
148
+ name: "stats",
149
+ summary: "Legacy automation-only metrics over old run records; not the OMP live UX.",
150
+ usage: ["rig stats [show] [--since <7d|30d|ISO date>]"],
151
+ commands: [
152
+ { command: "show [--since <window>]", description: "Legacy automation-only: totals, completion/failure rates, run time, steering, stalls, approvals.", primary: true }
153
+ ],
154
+ examples: [
155
+ "rig stats --json # legacy automation only"
156
+ ],
157
+ next: ["For normal UX, use the OMP Runs screen."]
158
+ },
159
+ {
160
+ name: "inspect",
161
+ summary: "Legacy automation-only artifact/log inspection; normal UX is OMP session history.",
162
+ usage: ["rig inspect <logs|artifacts|failures|graph|audit> --task <id>"],
163
+ commands: [
164
+ { command: "logs --task <id>", description: "Legacy automation-only: latest old run log for a task.", primary: true },
165
+ { command: "artifacts --task <id>", description: "Legacy automation-only: list completion artifacts.", primary: true },
166
+ { command: "failures --task <id>", description: "Legacy automation-only: recorded failures for a task.", primary: true },
167
+ { command: "graph", description: "Legacy automation-only: task dependency graph." },
168
+ { command: "audit", description: "Legacy automation-only: controlled-command audit trail." }
169
+ ],
170
+ examples: ["rig inspect logs --task <id> # legacy automation only"],
171
+ next: ["For normal UX, use the OMP Runs screen and OMP session history."]
172
+ },
173
+ {
174
+ name: "repo",
175
+ summary: "Repository sync/baseline helpers for the Rig-managed checkout.",
176
+ usage: ["rig repo <sync|reset-baseline>"],
177
+ commands: [
178
+ { command: "sync", description: "Sync project repository state.", primary: true },
179
+ { command: "reset-baseline", description: "Reset the managed baseline for the repo." }
180
+ ],
181
+ examples: ["rig repo sync"]
182
+ },
183
+ {
184
+ name: "plugin",
185
+ summary: "Plugin listing, validation, and plugin-contributed commands.",
186
+ usage: ["rig plugin <list|validate|run> [options]"],
187
+ commands: [
188
+ { command: "list", description: "List plugins declared in rig.config.ts and their contributions.", primary: true },
189
+ { command: "validate --task <id>", description: "Run plugin-contributed validators for a task.", primary: true },
190
+ { command: "run <command-id> [args...]", description: "Execute a plugin-contributed CLI command (also callable as `rig <command-id>`)." }
191
+ ],
192
+ examples: ["rig plugin list", "rig plugin run <command-id>"]
193
+ },
194
+ {
195
+ name: "init",
196
+ summary: "Legacy automation-only config bootstrap/repair helper; not root onboarding.",
197
+ usage: ["rig init [--yes] [--server local|remote] [--repo owner/repo] [--remote-url <url>]"],
198
+ commands: [
199
+ { command: "init", description: "Legacy/fenced setup wizard for compatibility projects; not onboarding.", primary: true },
200
+ { command: "init --demo", description: "Legacy/fenced offline demo project for compatibility tests.", primary: true },
201
+ { command: "init --yes", description: "Legacy/fenced non-interactive setup for old automation.", primary: true },
202
+ { command: "init --server remote --remote-url <url>", description: "Legacy/fenced remote server link setup.", primary: true },
203
+ { command: "init --repair", description: "Legacy/fenced repair of missing private compatibility state." }
204
+ ],
205
+ examples: [
206
+ "rig init --demo # legacy compatibility only",
207
+ "rig init --repair # legacy compatibility only"
208
+ ],
209
+ next: ["For onboarding and normal UX, run bare `rig`, then use Cockpit Server/Tasks and dispatch from Task detail."]
210
+ },
211
+ {
212
+ name: "doctor",
213
+ summary: "Diagnostic-only compatibility checks; normal health lives in the OMP Doctor screen.",
214
+ usage: ["rig doctor"],
215
+ commands: [
216
+ { command: "doctor", description: "Diagnostic/legacy-only: check compatibility setup/runtime state; not onboarding.", primary: true },
217
+ { command: "check", description: "Diagnostic/legacy-only spelling for compatibility checks." }
218
+ ],
219
+ examples: ["rig doctor --json # legacy diagnostic automation only"],
220
+ next: ["For normal UX, use the OMP Doctor screen."]
221
+ },
222
+ {
223
+ name: "github",
224
+ summary: "Legacy automation-only GitHub auth helpers for selected compatibility servers.",
225
+ usage: ["rig github auth <status|import-gh|token>"],
226
+ commands: [
227
+ { command: "auth status", description: "Legacy automation-only: show GitHub auth state.", primary: true },
228
+ { command: "auth import-gh", description: "Legacy automation-only: import the current `gh` token into the selected server." },
229
+ { command: "auth token --token <token>", description: "Legacy automation-only: store a token on the selected server." }
230
+ ],
231
+ examples: ["rig github auth status # legacy automation only"],
232
+ next: ["For normal UX, use bare `rig` and the OMP extension cockpit."]
233
+ }
234
+ ];
235
+ var ADVANCED_GROUPS = [
236
+ {
237
+ name: "setup",
238
+ summary: "Legacy automation-only setup bootstrap/check helpers.",
239
+ usage: ["rig setup <bootstrap|check|preflight>"],
240
+ commands: [
241
+ { command: "bootstrap", description: "Legacy automation-only: bootstrap local setup dependencies.", primary: true },
242
+ { command: "check", description: "Legacy automation-only: check local setup state (toolchain, deps, config).", primary: true },
243
+ { command: "preflight", description: "Legacy automation-only: run preflight checks before an old run.", primary: true }
244
+ ]
245
+ },
246
+ {
247
+ name: "profile",
248
+ summary: "Runtime profile/model defaults.",
249
+ usage: ["rig profile <show|set>"],
250
+ commands: [
251
+ { command: "show", description: "Show the active execution profile.", primary: true },
252
+ { command: "set [--model <model>] [--runtime <runtime>] [--plugin <plugin>]", description: "Set model/runtime/plugin profile defaults.", primary: true }
253
+ ]
254
+ },
255
+ {
256
+ name: "review",
257
+ summary: "Inspect or change completion review gate policy.",
258
+ usage: ["rig review <show|set>"],
259
+ commands: [
260
+ { command: "show", description: "Show current review gate settings." },
261
+ { command: "set <off|advisory|required> [--provider <provider>]", description: "Change review strictness/provider (e.g. --provider greptile)." }
262
+ ],
263
+ examples: ["rig review show", "rig review set required --provider greptile"],
264
+ next: ["For normal workflow handoffs, use the OMP Inbox screen."]
265
+ },
266
+ {
267
+ name: "pi",
268
+ summary: "Manage Pi extension packages for this project (community extensions from npm/git).",
269
+ usage: ["rig pi <list|add|remove|search> [args]"],
270
+ commands: [
271
+ { command: "list", description: "Show project and user Pi extension packages." },
272
+ { command: "add <source>", description: "Add an npm/git Pi extension to .pi/settings.json (auto-installs at next session)." },
273
+ { command: "remove <source>", description: "Remove an operator-added Pi extension." },
274
+ { command: "search [term]", description: "Discover Pi extension packages on the npm registry." }
275
+ ],
276
+ examples: ["rig pi search subagents", "rig pi add pi-subagents", "rig pi list"],
277
+ next: ["Config-managed extensions: declare `runtime: { pi: { packages: [...] } }` in rig.config.ts \u2014 workers pick them up automatically."]
278
+ },
279
+ {
280
+ name: "queue",
281
+ summary: "Run task queues locally.",
282
+ usage: ["rig queue run [--workers <n>] [--max-tasks <n>] [--action validate|verify|pipeline] [--isolation off|worktree] [--no-runtime-reuse] [--fail-fast] [--skip-project-sync]"],
283
+ commands: [
284
+ { 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 }
285
+ ]
286
+ },
287
+ {
288
+ name: "agent",
289
+ summary: "Runtime agent workspace helpers.",
290
+ usage: ["rig agent <list|prepare|run|cleanup>"],
291
+ commands: [
292
+ { command: "list", description: "List prepared agent runtimes.", primary: true },
293
+ { command: "prepare [--id <id>] [--mode <mode>] [--task <task>]", description: "Prepare an isolated agent runtime workspace.", primary: true },
294
+ { command: "run [--id <id>] [--mode <mode>] [--task <task>] [--skip-project-sync]", description: "Prepare (if needed) and run an agent in its workspace.", primary: true },
295
+ { command: "cleanup [--all] [--id <id>]", description: "Remove prepared agent workspaces.", primary: true }
296
+ ]
297
+ },
298
+ { name: "inspector", summary: "Event stream and drift scanners.", usage: ["rig inspector <stream|scan-upstream-drift>"], commands: [{ command: "stream", description: "Stream events." }] },
299
+ {
300
+ name: "dist",
301
+ summary: "Build/install packaged Rig CLI.",
302
+ usage: ["rig dist <build|install|doctor|rebuild-agent>"],
303
+ commands: [
304
+ { command: "build [--output-dir <dir>]", description: "Build the distributable Rig CLI.", primary: true },
305
+ { command: "install [--scope <scope>] [--path <path>]", description: "Install the built CLI to a scope/path.", primary: true },
306
+ { command: "doctor", description: "Diagnose the dist toolchain and install state.", primary: true },
307
+ { command: "rebuild-agent", description: "Rebuild the agent runtime image, pruning stale images.", primary: true }
308
+ ]
309
+ },
310
+ { name: "workspace", summary: "Workspace topology/service helpers.", usage: ["rig workspace <summary|topology|remote-hosts>"], commands: [{ command: "summary", description: "Show workspace summary." }] },
311
+ {
312
+ name: "remote",
313
+ summary: "Legacy automation-only remote orchestration controls.",
314
+ usage: ["rig remote <status|tasks|watch|pause|resume|continue|stop|refresh|add-iterations|remove-iterations|endpoint ...>"],
315
+ commands: [
316
+ { command: "status [--remote <alias>]", description: "Legacy automation-only: show old remote orchestration state.", primary: true },
317
+ { command: "tasks [--remote <alias>]", description: "Legacy automation-only: list the old remote's tracked tasks.", primary: true },
318
+ { command: "watch [--remote <alias>] [--seconds <n>] [--event <type>]", description: "Legacy automation-only: stream old remote orchestration events.", primary: true },
319
+ { command: "pause [--remote <alias>]", description: "Legacy automation-only: pause old remote orchestration.", primary: true },
320
+ { 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 },
321
+ { command: "continue [--remote <alias>]", description: "Legacy automation-only: continue a paused old remote.", primary: true },
322
+ { command: "stop [--remote <alias>]", description: "Legacy automation-only: stop old remote orchestration.", primary: true },
323
+ { command: "refresh [--remote <alias>]", description: "Legacy automation-only: refresh old remote state.", primary: true },
324
+ { command: "add-iterations [--count <n>] [--remote <alias>]", description: "Legacy automation-only: grant an old remote more iterations.", primary: true },
325
+ { command: "remove-iterations [--count <n>] [--remote <alias>]", description: "Legacy automation-only: reduce an old remote's iteration budget.", primary: true },
326
+ { command: "endpoint list", description: "Legacy automation-only: list configured remote endpoints.", primary: true },
327
+ { command: "endpoint add --alias <alias> --host <host> --port <n> [--token <token>]", description: "Legacy automation-only: register a remote endpoint.", primary: true },
328
+ { command: "endpoint remove --alias <alias>", description: "Legacy automation-only: remove a remote endpoint.", primary: true },
329
+ { command: "endpoint test [--alias <alias>]", description: "Legacy diagnostic-only: test connectivity to a remote endpoint.", primary: true },
330
+ { command: "endpoint doctor", description: "Legacy diagnostic-only: diagnose remote endpoint configuration.", primary: true }
331
+ ]
332
+ },
333
+ { name: "git", summary: "Pass through to Rig git-flow helper.", usage: ["rig git <args...>"], commands: [{ command: "<args...>", description: "Advanced git flow operations." }] },
334
+ { name: "harness", summary: "Pass through to runtime harness CLI.", usage: ["rig harness <args...>"], commands: [{ command: "<args...>", description: "Advanced harness operations." }] },
335
+ { name: "test", summary: "Project test wrappers.", usage: ["rig test <unit|e2e|all>"], commands: [{ command: "all", description: "Run configured project tests." }] }
336
+ ];
337
+ var ADVANCED_COMMANDS = [
338
+ { command: "rig server task-run ...", description: "Internal legacy server-owned task execution entry point." },
339
+ { command: "rig server notify-test [--event <type>]", description: "Internal diagnostic event notification smoke command." },
340
+ { command: "rig run start|start-serial|start-parallel", description: "Legacy/internal queue starters; not the Rig Cockpit task-detail dispatch path." },
341
+ { command: "rig remote orchestrate-*", description: "Legacy automation-only remote orchestration commands." }
342
+ ];
343
+ var ALL_GROUPS = [...PRIMARY_GROUPS, ...ADVANCED_GROUPS];
344
+ export {
345
+ helpCatalog,
346
+ TOP_LEVEL_SECTIONS,
347
+ PRIMARY_GROUPS,
348
+ ALL_GROUPS,
349
+ ADVANCED_GROUPS,
350
+ ADVANCED_COMMANDS
351
+ };