@h-rig/contracts 0.0.6-alpha.157 → 0.0.6-alpha.158

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 (126) hide show
  1. package/dist/index.cjs +2340 -6832
  2. package/dist/index.mjs +2116 -6608
  3. package/dist/src/agent-roles.d.ts +8 -0
  4. package/dist/src/browser.d.ts +34 -4
  5. package/dist/src/browser.js +8 -1
  6. package/dist/src/capability-id.d.ts +22 -0
  7. package/dist/src/capability-id.js +8 -0
  8. package/dist/src/cli-output.d.ts +24 -0
  9. package/dist/src/cli-runner.d.ts +43 -0
  10. package/dist/src/cli-runner.js +13 -0
  11. package/dist/src/collab-session-viewer.d.ts +36 -0
  12. package/dist/src/collab-session-viewer.js +13 -0
  13. package/dist/src/config.d.ts +11 -0
  14. package/dist/src/config.js +279 -1098
  15. package/dist/src/control-plane-types.d.ts +41 -1
  16. package/dist/src/control-plane-types.js +9 -25
  17. package/dist/src/dependency-preflight.d.ts +43 -0
  18. package/dist/src/dependency-preflight.js +13 -0
  19. package/dist/src/doctor.d.ts +67 -4
  20. package/dist/src/doctor.js +8 -9
  21. package/dist/src/errors.d.ts +13 -0
  22. package/dist/src/errors.js +17 -0
  23. package/dist/src/github.d.ts +43 -0
  24. package/dist/src/github.js +12 -1
  25. package/dist/src/graph.d.ts +37 -0
  26. package/dist/src/graph.js +13 -0
  27. package/dist/src/guard.d.ts +111 -0
  28. package/dist/src/guard.js +6 -0
  29. package/dist/src/harness-events.d.ts +8 -0
  30. package/dist/src/harness-events.js +1 -0
  31. package/dist/src/help-catalog.d.ts +17 -10
  32. package/dist/src/help-catalog.js +9 -651
  33. package/dist/src/host.d.ts +41 -0
  34. package/dist/src/host.js +13 -0
  35. package/dist/src/identity.d.ts +44 -0
  36. package/dist/src/identity.js +1 -0
  37. package/dist/src/index.d.ts +27 -7
  38. package/dist/src/index.js +2116 -6608
  39. package/dist/src/isolation.d.ts +207 -15
  40. package/dist/src/isolation.js +8 -1
  41. package/dist/src/kernel.d.ts +11 -0
  42. package/dist/src/kernel.js +7 -0
  43. package/dist/src/layout.d.ts +49 -0
  44. package/dist/src/layout.js +10 -0
  45. package/dist/src/lifecycle-capabilities.d.ts +99 -0
  46. package/dist/src/lifecycle-capabilities.js +18 -1
  47. package/dist/src/managed-repos.d.ts +79 -16
  48. package/dist/src/managed-repos.js +12 -1
  49. package/dist/src/memory.d.ts +52 -4
  50. package/dist/src/memory.js +8 -1
  51. package/dist/src/notify.d.ts +46 -0
  52. package/dist/src/notify.js +13 -0
  53. package/dist/src/orchestration.d.ts +0 -3652
  54. package/dist/src/orchestration.js +28 -964
  55. package/dist/src/plugin-hooks.js +22 -3
  56. package/dist/src/plugin.d.ts +47 -0
  57. package/dist/src/plugin.js +24 -3
  58. package/dist/src/prompt.d.ts +29 -0
  59. package/dist/src/prompt.js +13 -0
  60. package/dist/src/provider-instructions.d.ts +26 -4
  61. package/dist/src/provider-instructions.js +8 -1
  62. package/dist/src/provider.js +1 -824
  63. package/dist/src/remote.d.ts +0 -8
  64. package/dist/src/remote.js +229 -1075
  65. package/dist/src/run-discovery.d.ts +79 -0
  66. package/dist/src/run-discovery.js +13 -0
  67. package/dist/src/run-dispatch.d.ts +34 -0
  68. package/dist/src/run-dispatch.js +13 -0
  69. package/dist/src/run-identity.d.ts +47 -0
  70. package/dist/src/run-identity.js +13 -0
  71. package/dist/src/run-journal.d.ts +0 -236
  72. package/dist/src/run-journal.js +249 -1321
  73. package/dist/src/run-read-model.d.ts +234 -0
  74. package/dist/src/run-read-model.js +13 -0
  75. package/dist/src/run-record.d.ts +0 -11
  76. package/dist/src/run-record.js +0 -16
  77. package/dist/src/run-registry-backbone.d.ts +56 -0
  78. package/dist/src/run-registry-backbone.js +13 -0
  79. package/dist/src/run-session-journal.d.ts +1 -25
  80. package/dist/src/run-session-journal.js +0 -1731
  81. package/dist/src/run-status.d.ts +0 -2
  82. package/dist/src/run-status.js +0 -11
  83. package/dist/src/run-timeline.d.ts +0 -3
  84. package/dist/src/run-timeline.js +0 -1498
  85. package/dist/src/runtime-task-context.d.ts +82 -0
  86. package/dist/src/runtime-task-context.js +1 -0
  87. package/dist/src/runtime.js +66 -904
  88. package/dist/src/session-asset-materializer.d.ts +35 -0
  89. package/dist/src/session-asset-materializer.js +13 -0
  90. package/dist/src/setup.d.ts +47 -0
  91. package/dist/src/setup.js +13 -0
  92. package/dist/src/supervisor-journal.js +117 -955
  93. package/dist/src/task-data.d.ts +239 -0
  94. package/dist/src/task-data.js +13 -0
  95. package/dist/src/task-graph-primitives.d.ts +0 -21
  96. package/dist/src/task-graph-primitives.js +0 -318
  97. package/dist/src/task-source.d.ts +65 -0
  98. package/dist/src/task-source.js +12 -0
  99. package/dist/src/task-state-metadata.d.ts +21 -0
  100. package/dist/src/task-state-metadata.js +1 -0
  101. package/dist/src/tool-materializer.d.ts +36 -0
  102. package/dist/src/tool-materializer.js +13 -0
  103. package/dist/src/tool-registry.d.ts +3 -0
  104. package/dist/src/tool-registry.js +58 -0
  105. package/dist/src/toolchain-sources.d.ts +54 -0
  106. package/dist/src/toolchain-sources.js +17 -0
  107. package/dist/src/workflow-journal.d.ts +0 -32
  108. package/dist/src/workflow-journal.js +0 -371
  109. package/dist/src/workspace-config.d.ts +18 -0
  110. package/dist/src/workspace-config.js +13 -0
  111. package/dist/src/workspace.js +73 -911
  112. package/package.json +1 -1
  113. package/dist/src/engine.d.ts +0 -2789
  114. package/dist/src/engine.js +0 -2392
  115. package/dist/src/ipc.d.ts +0 -248
  116. package/dist/src/providerRuntime.d.ts +0 -3949
  117. package/dist/src/providerRuntime.js +0 -1633
  118. package/dist/src/rig.d.ts +0 -783
  119. package/dist/src/rig.js +0 -2537
  120. package/dist/src/server.d.ts +0 -106
  121. package/dist/src/server.js +0 -1056
  122. package/dist/src/serviceFabric.d.ts +0 -62
  123. package/dist/src/serviceFabric.js +0 -1069
  124. package/dist/src/ws.d.ts +0 -747
  125. package/dist/src/ws.js +0 -3126
  126. /package/dist/src/{ipc.js → agent-roles.js} +0 -0
@@ -0,0 +1,234 @@
1
+ /**
2
+ * Run read-model capability vocabulary.
3
+ *
4
+ * This file defines the contracts-only service seam that run-owner plugins can
5
+ * provide to CLI, cockpit, supervisor, and doctor surfaces. The OMP session is
6
+ * the journal source of truth: read-model implementations must key projections
7
+ * by the canonical run id/session id (`runId === sessionId`). Dispatch handles,
8
+ * worktree paths, and relay metadata are metadata only, never identity keys.
9
+ *
10
+ * Pure: types + one branded id, no folding, defaults, coercion, IO, or provider
11
+ * implementation.
12
+ */
13
+ import type { CapabilityId } from "./capability-id";
14
+ import type { RigStatsData } from "./cli-output";
15
+ import type { RunDiscoveryFilter } from "./run-discovery";
16
+ import type { RunJournalProjection } from "./run-journal";
17
+ import type { RunRecord, UnifiedInboxRequest } from "./run-record";
18
+ import type { RunInboxResolutionInit, RunSessionCustomEntry } from "./run-session-journal";
19
+ import type { TaskRecord } from "./task-source";
20
+ export type RunReadModelSource = RunRecord["source"] | "all";
21
+ export type RunReadModelRunSelector = {
22
+ /** Exact run id/session id, task id, or unique run-id prefix chosen by the caller. */
23
+ readonly id: string;
24
+ /** Prefer interpreting `id` as this kind when the caller already knows it. */
25
+ readonly kind?: "run-id" | "task-id" | "run-id-prefix" | "any";
26
+ };
27
+ export interface RunReadModelListInput {
28
+ readonly projectRoot: string;
29
+ readonly taskId?: string | null;
30
+ readonly source?: RunReadModelSource;
31
+ readonly includeInactive?: boolean;
32
+ readonly discoveryFilter?: RunDiscoveryFilter;
33
+ }
34
+ export interface RunReadModelGetInput {
35
+ readonly projectRoot: string;
36
+ readonly selector: RunReadModelRunSelector;
37
+ readonly discoveryFilter?: RunDiscoveryFilter;
38
+ }
39
+ export interface RunReadModelProjectionInput {
40
+ readonly projectRoot: string;
41
+ /** Canonical run id/session id. */
42
+ readonly runId: string;
43
+ readonly sessionPath?: string | null;
44
+ readonly discoveryFilter?: RunDiscoveryFilter;
45
+ }
46
+ export interface RunReadModelDetailsInput extends RunReadModelGetInput {
47
+ readonly includeLogs?: boolean;
48
+ readonly includeSourceTask?: boolean;
49
+ }
50
+ export interface RunReadModelInboxInput {
51
+ readonly projectRoot: string;
52
+ readonly kind?: "approval" | "input" | "all";
53
+ readonly runId?: string | null;
54
+ readonly taskId?: string | null;
55
+ readonly discoveryFilter?: RunDiscoveryFilter;
56
+ }
57
+ export interface RunReadModelStatsInput {
58
+ readonly projectRoot: string;
59
+ /** ISO timestamp lower bound, or null for all-time. */
60
+ readonly since?: string | null;
61
+ /** Optional caller-supplied records, used when the surface already listed runs. */
62
+ readonly runs?: readonly RunRecord[];
63
+ readonly discoveryFilter?: RunDiscoveryFilter;
64
+ }
65
+ export interface RunReadModelInspectRowsInput {
66
+ readonly projectRoot: string;
67
+ readonly runs?: readonly RunRecord[];
68
+ readonly pendingInbox?: number | null;
69
+ readonly discoveryFilter?: RunDiscoveryFilter;
70
+ }
71
+ export interface RunReadModelControlTargetInput {
72
+ readonly projectRoot: string;
73
+ /** Canonical run id/session id. */
74
+ readonly runId: string;
75
+ readonly taskId?: string | null;
76
+ readonly purpose?: "attach" | "steer" | "stop" | "pause" | "resume" | "resolve-inbox";
77
+ readonly discoveryFilter?: RunDiscoveryFilter;
78
+ }
79
+ export type RunReadModelControl = {
80
+ readonly kind: "steer";
81
+ readonly message: string;
82
+ } | {
83
+ readonly kind: "stop";
84
+ readonly reason: string;
85
+ } | {
86
+ readonly kind: "pause";
87
+ } | {
88
+ readonly kind: "resume";
89
+ };
90
+ export interface RunReadModelControlInput {
91
+ readonly projectRoot: string;
92
+ /** Canonical run id/session id. */
93
+ readonly runId: string;
94
+ readonly control: RunReadModelControl;
95
+ readonly requestedBy?: string | null;
96
+ readonly discoveryFilter?: RunDiscoveryFilter;
97
+ }
98
+ export interface RunReadModelControlResult {
99
+ readonly runId: string;
100
+ readonly kind: RunReadModelControl["kind"];
101
+ readonly status: "delivered" | "not-found" | "not-live" | "unsupported";
102
+ readonly delivered: boolean;
103
+ readonly detail?: string | null;
104
+ }
105
+ export interface RunReadModelInboxResolutionInput {
106
+ readonly projectRoot: string;
107
+ /** Canonical run id/session id. */
108
+ readonly runId: string;
109
+ readonly resolution: RunInboxResolutionInit;
110
+ readonly requestedBy?: string | null;
111
+ readonly discoveryFilter?: RunDiscoveryFilter;
112
+ }
113
+ export interface RunReadModelRemoveRegistryEntryInput {
114
+ readonly projectRoot: string;
115
+ /** Canonical run id/session id. */
116
+ readonly runId: string;
117
+ }
118
+ export interface RunReadModelRemoveRegistryEntryResult {
119
+ /** Canonical run id/session id. */
120
+ readonly runId: string;
121
+ readonly removed: boolean;
122
+ }
123
+ export interface RunReadModelInboxCounts {
124
+ readonly approvals: number;
125
+ readonly inputs: number;
126
+ readonly total: number;
127
+ }
128
+ export interface RunReadModelInboxRecord {
129
+ readonly runId: string;
130
+ readonly taskId: string | null;
131
+ readonly requestId: string;
132
+ readonly kind: "approval" | "input";
133
+ readonly status: "pending";
134
+ readonly title: string;
135
+ readonly body?: string | null;
136
+ readonly prompt: string;
137
+ readonly requestedAt: string | null;
138
+ readonly payload: unknown;
139
+ readonly source: "run";
140
+ }
141
+ export interface RunReadModelInboxResolutionResult {
142
+ readonly runId: string;
143
+ readonly requestId: string;
144
+ readonly kind: "approval" | "input";
145
+ readonly status: "resolved" | "not-found" | "not-live" | "unsupported";
146
+ readonly delivered: boolean;
147
+ readonly detail?: string | null;
148
+ }
149
+ export interface RunReadModelControlTarget {
150
+ /** Canonical run id/session id. */
151
+ readonly runId: string;
152
+ readonly taskId: string | null;
153
+ readonly sessionId: string | null;
154
+ readonly sessionPath: string | null;
155
+ readonly joinLink: string | null;
156
+ readonly webLink: string | null;
157
+ readonly relayUrl: string | null;
158
+ readonly collabCwd: string | null;
159
+ readonly live: boolean;
160
+ readonly stale: boolean;
161
+ readonly canDeliver: boolean;
162
+ readonly reason?: string | null;
163
+ }
164
+ export type RunReadModelStats = RigStatsData;
165
+ export type RunReadModelStatusPhase = "starting" | "active" | "waiting" | "paused" | "needs-attention" | "completed" | "failed" | "stopped" | "unknown";
166
+ export type RunReadModelStatusRole = "success" | "action-yellow" | "active-cyan" | "failure" | "muted" | "neutral";
167
+ export interface RunReadModelRunClassification {
168
+ readonly status: string;
169
+ readonly phase: RunReadModelStatusPhase;
170
+ readonly role: RunReadModelStatusRole;
171
+ readonly rank: number;
172
+ readonly isActive: boolean;
173
+ readonly isTerminal: boolean;
174
+ readonly isNeedsAttention: boolean;
175
+ }
176
+ export interface RunReadModelInspectRow {
177
+ readonly id: string;
178
+ readonly label: string;
179
+ readonly currentValue: string;
180
+ readonly values?: readonly string[];
181
+ readonly heading?: boolean;
182
+ readonly description?: string;
183
+ }
184
+ export interface RunReadModelFailureSummary {
185
+ readonly kind: string;
186
+ readonly summary: string;
187
+ readonly detail?: string | null;
188
+ readonly retryable?: boolean | null;
189
+ }
190
+ export interface RunReadModelDetails {
191
+ readonly run: RunRecord;
192
+ readonly projection: RunJournalProjection;
193
+ readonly pendingInbox: readonly UnifiedInboxRequest[];
194
+ readonly inboxCounts: RunReadModelInboxCounts;
195
+ readonly sourceTask?: TaskRecord | null;
196
+ readonly sessionEntries?: readonly RunSessionCustomEntry[];
197
+ readonly failures: readonly RunReadModelFailureSummary[];
198
+ readonly logs: readonly string[];
199
+ }
200
+ export interface RunReadModelInspectResult {
201
+ readonly details: RunReadModelDetails;
202
+ readonly classification: RunReadModelRunClassification;
203
+ readonly rows: readonly RunReadModelInspectRow[];
204
+ }
205
+ /**
206
+ * Multi-method run read-model service capability.
207
+ *
208
+ * Providers own the executable discovery/folding/classification/control-target
209
+ * lookup. Consumers depend only on this contracts vocabulary and resolve the
210
+ * provider through the typed capability seam.
211
+ */
212
+ export interface RunReadModelService {
213
+ readonly listRuns: (input: RunReadModelListInput) => Promise<readonly RunRecord[]>;
214
+ readonly getRun: (input: RunReadModelGetInput) => Promise<RunRecord | null>;
215
+ readonly getRunProjection: (input: RunReadModelProjectionInput) => Promise<RunJournalProjection | null>;
216
+ readonly getRunDetails: (input: RunReadModelDetailsInput) => Promise<RunReadModelDetails | null>;
217
+ readonly inspectRun: (input: RunReadModelDetailsInput) => Promise<RunReadModelInspectResult | null>;
218
+ readonly listInboxRecords: (input: RunReadModelInboxInput) => Promise<readonly RunReadModelInboxRecord[]>;
219
+ readonly getInboxCounts: (input: RunReadModelInboxInput) => Promise<RunReadModelInboxCounts>;
220
+ readonly resolveInboxRequest: (input: RunReadModelInboxResolutionInput) => Promise<RunReadModelInboxResolutionResult>;
221
+ readonly getStats: (input: RunReadModelStatsInput) => Promise<RunReadModelStats>;
222
+ readonly getInspectRows: (input: RunReadModelInspectRowsInput) => Promise<readonly RunReadModelInspectRow[]>;
223
+ readonly deliverControl: (input: RunReadModelControlInput) => Promise<RunReadModelControlResult>;
224
+ readonly classifyRun: (run: RunRecord) => RunReadModelRunClassification;
225
+ readonly resolveControlTarget: (input: RunReadModelControlTargetInput) => Promise<RunReadModelControlTarget | null>;
226
+ readonly removeRunRegistryEntry: (input: RunReadModelRemoveRegistryEntryInput) => Promise<RunReadModelRemoveRegistryEntryResult>;
227
+ }
228
+ /** Stable id string for the run read-model service capability. */
229
+ export declare const RUN_READ_MODEL_CAPABILITY_ID = "rig.runs.read-model";
230
+ /**
231
+ * Branded run read-model capability id. `defineCapability(RUN_READ_MODEL)`
232
+ * (provider and consumers independently) resolves to a `RunReadModelService`.
233
+ */
234
+ export declare const RUN_READ_MODEL: CapabilityId<RunReadModelService>;
@@ -0,0 +1,13 @@
1
+ // @bun
2
+ // packages/contracts/src/capability-id.ts
3
+ function makeCapabilityId(id) {
4
+ return id;
5
+ }
6
+
7
+ // packages/contracts/src/run-read-model.ts
8
+ var RUN_READ_MODEL_CAPABILITY_ID = "rig.runs.read-model";
9
+ var RUN_READ_MODEL = makeCapabilityId(RUN_READ_MODEL_CAPABILITY_ID);
10
+ export {
11
+ RUN_READ_MODEL_CAPABILITY_ID,
12
+ RUN_READ_MODEL
13
+ };
@@ -43,14 +43,3 @@ export interface RunRecord {
43
43
  /** The full folded journal (empty projection when no journal was readable). */
44
44
  readonly projection: RunJournalProjection;
45
45
  }
46
- /**
47
- * Index runs by their task id, keeping only the most-recently-updated run per
48
- * task. Pure run primitive relocated out of the dissolved @rig/client facade
49
- * (the META vocabulary floor is the correct home for a typed, policy-free run
50
- * coercion that multiple plugins build projections on).
51
- */
52
- export declare function latestRunByTaskId<T extends {
53
- readonly taskId: string | null;
54
- readonly updatedAt: string | null;
55
- readonly startedAt: string | null;
56
- }>(runs: readonly T[]): Map<string, T>;
@@ -1,17 +1 @@
1
1
  // @bun
2
- // packages/contracts/src/run-record.ts
3
- function latestRunByTaskId(runs) {
4
- const byTask = new Map;
5
- const stamp = (run) => Date.parse(run.updatedAt ?? run.startedAt ?? "") || 0;
6
- for (const run of runs) {
7
- if (!run.taskId)
8
- continue;
9
- const current = byTask.get(run.taskId);
10
- if (!current || stamp(run) >= stamp(current))
11
- byTask.set(run.taskId, run);
12
- }
13
- return byTask;
14
- }
15
- export {
16
- latestRunByTaskId
17
- };
@@ -0,0 +1,56 @@
1
+ import type { CapabilityId } from "./capability-id";
2
+ import type { RigWorkflowOwner } from "./workflow-journal";
3
+ import type { RunRecord } from "./run-record";
4
+ import type { RunStatus } from "./runtime";
5
+ /**
6
+ * cap:run-registry-backbone — transport-owned relay/registry room publication.
7
+ *
8
+ * The transport plugin owns the concrete @rig/relay-registry client. Run workers
9
+ * publish journal-derived projections through this structural seam so the worker
10
+ * lifecycle engine does not import the relay-registry implementation package.
11
+ */
12
+ export declare const RUN_REGISTRY_BACKBONE_CAPABILITY_ID = "transport.run-registry-backbone";
13
+ export type RunRegistryOwner = RigWorkflowOwner;
14
+ export type RunRegistryStatus = RunStatus | "starting" | "waiting-input";
15
+ export type RunRegistryRunProjection = Pick<RunRecord, "runId" | "taskId" | "title" | "status" | "source" | "startedAt" | "updatedAt" | "completedAt" | "joinLink" | "webLink" | "relayUrl" | "sessionPath" | "prUrl" | "worktreePath" | "pendingApprovals" | "pendingInputs" | "steeringCount" | "stallCount" | "errorSummary" | "timeline" | "collabCwd"> & {
16
+ readonly cwd?: string | null;
17
+ readonly dispatchHandle?: string | null;
18
+ };
19
+ export interface RunRegistryRegisterRoomInput {
20
+ readonly roomId: string;
21
+ readonly owner: RunRegistryOwner;
22
+ readonly repo: string;
23
+ readonly title: string;
24
+ readonly status: RunRegistryStatus;
25
+ readonly joinLink: string;
26
+ readonly webLink: string;
27
+ readonly relayUrl: string;
28
+ readonly startedAt: string;
29
+ readonly cwd?: string;
30
+ readonly sessionPath?: string;
31
+ readonly pid?: number;
32
+ readonly projection?: RunRegistryRunProjection;
33
+ }
34
+ export interface RunRegistryClient {
35
+ readonly registerRoom: (room: RunRegistryRegisterRoomInput) => Promise<unknown>;
36
+ readonly heartbeatRoom: (roomId: string, status: RunRegistryStatus, projection?: RunRegistryRunProjection) => Promise<unknown>;
37
+ readonly removeRoom: (roomId: string) => Promise<boolean>;
38
+ }
39
+ export interface RunWorkerProjectionConnection {
40
+ readonly ready: Promise<void>;
41
+ push(projection: RunRegistryRunProjection): void;
42
+ close(): void;
43
+ }
44
+ export interface RunRegistryBackboneService {
45
+ readonly createRegistryClient: (options: {
46
+ readonly baseUrl: string;
47
+ readonly namespaceKey: string;
48
+ }) => RunRegistryClient;
49
+ readonly connectWorkerProjection: (options: {
50
+ readonly baseUrl: string;
51
+ readonly namespaceKey: string;
52
+ readonly runId: string;
53
+ }) => RunWorkerProjectionConnection;
54
+ readonly coerceRegistryStatus: (value: unknown, fallback: RunRegistryStatus) => RunRegistryStatus;
55
+ }
56
+ export declare const RUN_REGISTRY_BACKBONE: CapabilityId<RunRegistryBackboneService>;
@@ -0,0 +1,13 @@
1
+ // @bun
2
+ // packages/contracts/src/capability-id.ts
3
+ function makeCapabilityId(id) {
4
+ return id;
5
+ }
6
+
7
+ // packages/contracts/src/run-registry-backbone.ts
8
+ var RUN_REGISTRY_BACKBONE_CAPABILITY_ID = "transport.run-registry-backbone";
9
+ var RUN_REGISTRY_BACKBONE = makeCapabilityId(RUN_REGISTRY_BACKBONE_CAPABILITY_ID);
10
+ export {
11
+ RUN_REGISTRY_BACKBONE_CAPABILITY_ID,
12
+ RUN_REGISTRY_BACKBONE
13
+ };
@@ -1,4 +1,4 @@
1
- import { type RunJournalEvent, type RunJournalProjection } from "./run-journal";
1
+ import { type RunJournalEvent } from "./run-journal";
2
2
  type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
3
3
  export type RunJournalEventInit = DistributiveOmit<RunJournalEvent, "v" | "seq" | "at" | "runId">;
4
4
  export declare const RIG_RUN_STATUS_CHANGED = "rig.run.status-changed";
@@ -17,21 +17,9 @@ export declare const RIG_RUN_PIPELINE_RESOLVED = "rig.run.pipeline-resolved";
17
17
  export declare const RIG_RUN_STAGE_OUTCOME = "rig.run.stage-outcome";
18
18
  export declare const RIG_STOP_SENTINEL = "<<RIG_STOP";
19
19
  export declare const RIG_STOP_SENTINEL_END = ">>";
20
- export declare function buildStopSentinel(runId: string, reason?: string | null, requestedBy?: string): string;
21
- export declare function parseStopSentinel(text: string, expectedRunId: string): {
22
- reason: string | null;
23
- } | null;
24
20
  export declare const RIG_PAUSE_SENTINEL = "<<RIG_PAUSE";
25
21
  export declare const RIG_RESUME_SENTINEL = "<<RIG_RESUME";
26
22
  export declare const RIG_CONTROL_SENTINEL_END = ">>";
27
- export declare function buildPauseSentinel(runId: string, requestedBy?: string): string;
28
- export declare function parsePauseSentinel(text: string, expectedRunId: string): {
29
- requestedBy: string | null;
30
- } | null;
31
- export declare function buildResumeSentinel(runId: string, requestedBy?: string): string;
32
- export declare function parseResumeSentinel(text: string, expectedRunId: string): {
33
- requestedBy: string | null;
34
- } | null;
35
23
  export type RunInboxResolutionSentinel = {
36
24
  kind: "approval";
37
25
  requestId: string;
@@ -55,16 +43,6 @@ export type RunInboxResolutionInit = {
55
43
  requestId: string;
56
44
  answers: Record<string, string>;
57
45
  };
58
- export declare function buildInboxResolutionSentinel(runId: string, resolution: RunInboxResolutionInit, requestedBy?: string): string;
59
- export declare function parseInboxResolutionSentinel(text: string, expectedRunId: string): RunInboxResolutionSentinel | null;
60
- /**
61
- * The OMP session id embedded in a session journal filename
62
- * (`<ISO-timestamp>_<sessionId>.jsonl`). This is a run's CANONICAL id — the same
63
- * id OMP hosts as the collab roomId and the relay registry + operator CLI key on.
64
- * A run's dispatch/worktree id is different; this is what links them, so stop /
65
- * steer / discovery all resolve a run by one id (the OMP session id).
66
- */
67
- export declare function sessionIdFromSessionFile(sessionPath: string | null | undefined): string | null;
68
46
  export declare const CUSTOM_TYPE_FOR: {
69
47
  readonly "status-changed": "rig.run.status-changed";
70
48
  readonly "record-patch": "rig.run.record-patch";
@@ -88,6 +66,4 @@ export type RunSessionCustomEntry = {
88
66
  customType?: string;
89
67
  data?: unknown;
90
68
  };
91
- export declare function isRunSessionCustomType(customType: string | undefined): customType is RunSessionCustomType;
92
- export declare function foldRunSessionEntries(entries: ReadonlyArray<RunSessionCustomEntry>, runId: string): RunJournalProjection;
93
69
  export {};