@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
@@ -0,0 +1,316 @@
1
+ import { Schema } from "effect";
2
+ export declare const WorkspaceIsolation: Schema.Literals<readonly ["worktree", "directory"]>;
3
+ export type WorkspaceIsolation = typeof WorkspaceIsolation.Type;
4
+ /**
5
+ * Git checkout strategy for agent workspaces. This is git HYGIENE (parallel
6
+ * runs don't trample each other), NOT a security boundary — the security
7
+ * boundary is `workspace.sandbox`.
8
+ */
9
+ export declare const WorkspaceCheckout: Schema.Literals<readonly ["worktree", "directory"]>;
10
+ export type WorkspaceCheckout = typeof WorkspaceCheckout.Type;
11
+ /**
12
+ * Security sandbox mode for agent processes (macOS seatbelt / Linux bwrap).
13
+ * "enforce" (the default) refuses to run unsandboxed when no backend is
14
+ * available; "auto" degrades to unsandboxed with a warning; "off" opts out
15
+ * explicitly.
16
+ */
17
+ export declare const WorkspaceSandbox: Schema.Literals<readonly ["enforce", "auto", "off"]>;
18
+ export type WorkspaceSandbox = typeof WorkspaceSandbox.Type;
19
+ export declare const ScopeSearchPrefix: Schema.Struct<{
20
+ readonly prefix: Schema.String;
21
+ readonly matchStartsWith: Schema.optional<Schema.$Array<Schema.String>>;
22
+ readonly matchExact: Schema.optional<Schema.$Array<Schema.String>>;
23
+ }>;
24
+ export type ScopeSearchPrefix = typeof ScopeSearchPrefix.Type;
25
+ export declare const ScopeNormalizationRules: Schema.Struct<{
26
+ readonly stripPrefixes: Schema.optional<Schema.$Array<Schema.String>>;
27
+ readonly searchPrefixes: Schema.optional<Schema.$Array<Schema.Struct<{
28
+ readonly prefix: Schema.String;
29
+ readonly matchStartsWith: Schema.optional<Schema.$Array<Schema.String>>;
30
+ readonly matchExact: Schema.optional<Schema.$Array<Schema.String>>;
31
+ }>>>;
32
+ }>;
33
+ export type ScopeNormalizationRules = typeof ScopeNormalizationRules.Type;
34
+ export declare const WorkspaceConfig: Schema.Struct<{
35
+ readonly mainRepo: Schema.String;
36
+ /** Canonical name for the checkout axis; `isolation` is the deprecated alias. */
37
+ readonly checkout: Schema.optional<Schema.Literals<readonly ["worktree", "directory"]>>;
38
+ /** @deprecated Renamed to `checkout` — worktrees are git hygiene, not isolation. */
39
+ readonly isolation: Schema.optional<Schema.Literals<readonly ["worktree", "directory"]>>;
40
+ readonly sandbox: Schema.optional<Schema.Literals<readonly ["enforce", "auto", "off"]>>;
41
+ readonly scopeNormalization: Schema.optional<Schema.Struct<{
42
+ readonly stripPrefixes: Schema.optional<Schema.$Array<Schema.String>>;
43
+ readonly searchPrefixes: Schema.optional<Schema.$Array<Schema.Struct<{
44
+ readonly prefix: Schema.String;
45
+ readonly matchStartsWith: Schema.optional<Schema.$Array<Schema.String>>;
46
+ readonly matchExact: Schema.optional<Schema.$Array<Schema.String>>;
47
+ }>>>;
48
+ }>>;
49
+ }>;
50
+ export type WorkspaceConfig = typeof WorkspaceConfig.Type;
51
+ export declare const TaskSourceConfig: Schema.Struct<{
52
+ readonly kind: Schema.String;
53
+ readonly path: Schema.optional<Schema.String>;
54
+ readonly owner: Schema.optional<Schema.String>;
55
+ readonly repo: Schema.optional<Schema.String>;
56
+ readonly labels: Schema.optional<Schema.$Array<Schema.String>>;
57
+ readonly state: Schema.optional<Schema.Literals<readonly ["open", "closed", "all"]>>;
58
+ readonly url: Schema.optional<Schema.String>;
59
+ readonly options: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
60
+ }>;
61
+ export type TaskSourceConfig = typeof TaskSourceConfig.Type;
62
+ export declare const RuntimeHarness: Schema.Literals<readonly ["pi", "claude-code", "codex"]>;
63
+ export type RuntimeHarness = typeof RuntimeHarness.Type;
64
+ export declare const RigRuntimeMode: Schema.Literals<readonly ["yolo", "approval-required"]>;
65
+ export type RigRuntimeMode = typeof RigRuntimeMode.Type;
66
+ /**
67
+ * Pi harness configuration. `packages` lists Pi extension packages (npm
68
+ * specifiers like "pi-subagents" or "pi-web-access@1.2.0", or git sources)
69
+ * that Rig materializes into the workspace's `.pi/settings.json`. Pi
70
+ * auto-installs missing packages at session start, so worker sessions on
71
+ * remote hosts pick them up with no extra provisioning.
72
+ */
73
+ export declare const PiRuntimeConfig: Schema.Struct<{
74
+ readonly packages: Schema.optional<Schema.$Array<Schema.String>>;
75
+ }>;
76
+ export type PiRuntimeConfig = typeof PiRuntimeConfig.Type;
77
+ export declare const RuntimeConfig: Schema.Struct<{
78
+ readonly agentRoles: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
79
+ readonly timeouts: Schema.optional<Schema.$Record<Schema.String, Schema.Number>>;
80
+ readonly harness: Schema.optional<Schema.Literals<readonly ["pi", "claude-code", "codex"]>>;
81
+ readonly model: Schema.optional<Schema.String>;
82
+ readonly mode: Schema.optional<Schema.Literals<readonly ["yolo", "approval-required"]>>;
83
+ readonly pi: Schema.optional<Schema.Struct<{
84
+ readonly packages: Schema.optional<Schema.$Array<Schema.String>>;
85
+ }>>;
86
+ }>;
87
+ export type RuntimeConfig = typeof RuntimeConfig.Type;
88
+ export declare const ProjectIdentity: Schema.Struct<{
89
+ readonly name: Schema.String;
90
+ readonly repo: Schema.optional<Schema.String>;
91
+ }>;
92
+ export type ProjectIdentity = typeof ProjectIdentity.Type;
93
+ export declare const PlanningConfig: Schema.Struct<{
94
+ readonly mode: Schema.optional<Schema.Literals<readonly ["auto", "always", "off"]>>;
95
+ readonly requireForLabels: Schema.optional<Schema.$Array<Schema.String>>;
96
+ readonly skipForLabels: Schema.optional<Schema.$Array<Schema.String>>;
97
+ }>;
98
+ export type PlanningConfig = typeof PlanningConfig.Type;
99
+ export declare const GitHubProjectStatusConfig: Schema.Struct<{
100
+ readonly enabled: Schema.optional<Schema.Boolean>;
101
+ readonly projectId: Schema.optional<Schema.String>;
102
+ readonly statusFieldId: Schema.optional<Schema.String>;
103
+ readonly statuses: Schema.optional<Schema.Struct<{
104
+ readonly running: Schema.optional<Schema.String>;
105
+ readonly prOpen: Schema.optional<Schema.String>;
106
+ readonly ciFixing: Schema.optional<Schema.String>;
107
+ readonly merging: Schema.optional<Schema.String>;
108
+ readonly done: Schema.optional<Schema.String>;
109
+ readonly needsAttention: Schema.optional<Schema.String>;
110
+ }>>;
111
+ }>;
112
+ export type GitHubProjectStatusConfig = typeof GitHubProjectStatusConfig.Type;
113
+ export declare const GitHubConfig: Schema.Struct<{
114
+ readonly issueUpdates: Schema.optional<Schema.Literals<readonly ["lifecycle", "minimal", "off"]>>;
115
+ readonly projects: Schema.optional<Schema.Struct<{
116
+ readonly enabled: Schema.optional<Schema.Boolean>;
117
+ readonly projectId: Schema.optional<Schema.String>;
118
+ readonly statusFieldId: Schema.optional<Schema.String>;
119
+ readonly statuses: Schema.optional<Schema.Struct<{
120
+ readonly running: Schema.optional<Schema.String>;
121
+ readonly prOpen: Schema.optional<Schema.String>;
122
+ readonly ciFixing: Schema.optional<Schema.String>;
123
+ readonly merging: Schema.optional<Schema.String>;
124
+ readonly done: Schema.optional<Schema.String>;
125
+ readonly needsAttention: Schema.optional<Schema.String>;
126
+ }>>;
127
+ }>>;
128
+ }>;
129
+ export type GitHubConfig = typeof GitHubConfig.Type;
130
+ export declare const AutomationConfig: Schema.Struct<{
131
+ readonly maxValidationAttempts: Schema.optional<Schema.Number>;
132
+ readonly maxPrFixIterations: Schema.optional<Schema.Number>;
133
+ }>;
134
+ export type AutomationConfig = typeof AutomationConfig.Type;
135
+ export declare const PullRequestConfig: Schema.Struct<{
136
+ readonly mode: Schema.optional<Schema.Literals<readonly ["auto", "ask", "off"]>>;
137
+ readonly watchChecks: Schema.optional<Schema.Boolean>;
138
+ readonly autoFixChecks: Schema.optional<Schema.Boolean>;
139
+ readonly autoFixReview: Schema.optional<Schema.Boolean>;
140
+ readonly pendingTimeoutMs: Schema.optional<Schema.Number>;
141
+ readonly pendingPollMs: Schema.optional<Schema.Number>;
142
+ }>;
143
+ export type PullRequestConfig = typeof PullRequestConfig.Type;
144
+ export declare const MergeConfig: Schema.Struct<{
145
+ readonly mode: Schema.optional<Schema.Literals<readonly ["auto", "off", "pr-ready"]>>;
146
+ readonly method: Schema.optional<Schema.Literals<readonly ["repo-default", "squash", "merge", "rebase"]>>;
147
+ readonly deleteBranch: Schema.optional<Schema.Union<readonly [Schema.Literal<"repo-default">, Schema.Boolean]>>;
148
+ readonly allowedFailures: Schema.optional<Schema.$Array<Schema.String>>;
149
+ readonly bypass: Schema.optional<Schema.Boolean>;
150
+ }>;
151
+ export type MergeConfig = typeof MergeConfig.Type;
152
+ export declare const IssueAnalysisConfig: Schema.Struct<{
153
+ readonly enabled: Schema.optional<Schema.Boolean>;
154
+ readonly harness: Schema.optional<Schema.Literal<"pi">>;
155
+ readonly model: Schema.optional<Schema.String>;
156
+ readonly mode: Schema.optional<Schema.Literals<readonly ["continuous", "off"]>>;
157
+ }>;
158
+ export type IssueAnalysisConfig = typeof IssueAnalysisConfig.Type;
159
+ export declare const ReviewConfig: Schema.Struct<{
160
+ readonly mode: Schema.optional<Schema.Literals<readonly ["off", "advisory", "required"]>>;
161
+ readonly provider: Schema.optional<Schema.Literal<"greptile">>;
162
+ }>;
163
+ export type ReviewConfig = typeof ReviewConfig.Type;
164
+ export declare const RigConfig: Schema.Struct<{
165
+ readonly project: Schema.Struct<{
166
+ readonly name: Schema.String;
167
+ readonly repo: Schema.optional<Schema.String>;
168
+ }>;
169
+ readonly plugins: Schema.$Array<Schema.Struct<{
170
+ readonly name: Schema.String;
171
+ readonly version: Schema.String;
172
+ readonly contributes: Schema.optional<Schema.Struct<{
173
+ readonly validators: Schema.optional<Schema.$Array<Schema.Struct<{
174
+ readonly id: Schema.String;
175
+ readonly category: Schema.Literals<readonly ["boundary", "contract", "integration", "regression", "external", "custom"]>;
176
+ readonly description: Schema.optional<Schema.String>;
177
+ }>>>;
178
+ readonly hooks: Schema.optional<Schema.$Array<Schema.Struct<{
179
+ readonly id: Schema.String;
180
+ readonly event: Schema.Literals<readonly ["PreToolUse", "PostToolUse", "UserPromptSubmit", "Stop", "SessionStart", "SessionEnd"]>;
181
+ readonly matcher: Schema.Union<readonly [Schema.Struct<{
182
+ readonly kind: Schema.Literal<"all">;
183
+ }>, Schema.Struct<{
184
+ readonly kind: Schema.Literal<"tool">;
185
+ readonly name: Schema.String;
186
+ }>, Schema.Struct<{
187
+ readonly kind: Schema.Literal<"glob">;
188
+ readonly pattern: Schema.String;
189
+ }>]>;
190
+ readonly command: Schema.optional<Schema.String>;
191
+ readonly description: Schema.optional<Schema.String>;
192
+ }>>>;
193
+ readonly skills: Schema.optional<Schema.$Array<Schema.Struct<{
194
+ readonly id: Schema.String;
195
+ readonly path: Schema.String;
196
+ readonly description: Schema.optional<Schema.String>;
197
+ }>>>;
198
+ readonly repoSources: Schema.optional<Schema.$Array<Schema.Struct<{
199
+ readonly id: Schema.String;
200
+ readonly url: Schema.String;
201
+ readonly defaultPath: Schema.optional<Schema.String>;
202
+ readonly description: Schema.optional<Schema.String>;
203
+ readonly defaultBranch: Schema.optional<Schema.String>;
204
+ readonly remoteEnvVar: Schema.optional<Schema.String>;
205
+ readonly checkoutEnvVar: Schema.optional<Schema.String>;
206
+ }>>>;
207
+ readonly agentRoles: Schema.optional<Schema.$Array<Schema.Struct<{
208
+ readonly id: Schema.String;
209
+ readonly defaultModel: Schema.optional<Schema.String>;
210
+ readonly description: Schema.optional<Schema.String>;
211
+ }>>>;
212
+ readonly taskFieldSchemas: Schema.optional<Schema.$Array<Schema.Struct<{
213
+ readonly id: Schema.String;
214
+ readonly fieldName: Schema.String;
215
+ readonly schemaJson: Schema.String;
216
+ }>>>;
217
+ readonly taskSources: Schema.optional<Schema.$Array<Schema.Struct<{
218
+ readonly id: Schema.String;
219
+ readonly kind: Schema.String;
220
+ readonly description: Schema.optional<Schema.String>;
221
+ }>>>;
222
+ readonly cliCommands: Schema.optional<Schema.$Array<Schema.Struct<{
223
+ readonly id: Schema.String;
224
+ readonly command: Schema.String;
225
+ readonly description: Schema.optional<Schema.String>;
226
+ }>>>;
227
+ }>>;
228
+ }>>;
229
+ readonly taskSource: Schema.Struct<{
230
+ readonly kind: Schema.String;
231
+ readonly path: Schema.optional<Schema.String>;
232
+ readonly owner: Schema.optional<Schema.String>;
233
+ readonly repo: Schema.optional<Schema.String>;
234
+ readonly labels: Schema.optional<Schema.$Array<Schema.String>>;
235
+ readonly state: Schema.optional<Schema.Literals<readonly ["open", "closed", "all"]>>;
236
+ readonly url: Schema.optional<Schema.String>;
237
+ readonly options: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
238
+ }>;
239
+ readonly workspace: Schema.Struct<{
240
+ readonly mainRepo: Schema.String;
241
+ /** Canonical name for the checkout axis; `isolation` is the deprecated alias. */
242
+ readonly checkout: Schema.optional<Schema.Literals<readonly ["worktree", "directory"]>>;
243
+ /** @deprecated Renamed to `checkout` — worktrees are git hygiene, not isolation. */
244
+ readonly isolation: Schema.optional<Schema.Literals<readonly ["worktree", "directory"]>>;
245
+ readonly sandbox: Schema.optional<Schema.Literals<readonly ["enforce", "auto", "off"]>>;
246
+ readonly scopeNormalization: Schema.optional<Schema.Struct<{
247
+ readonly stripPrefixes: Schema.optional<Schema.$Array<Schema.String>>;
248
+ readonly searchPrefixes: Schema.optional<Schema.$Array<Schema.Struct<{
249
+ readonly prefix: Schema.String;
250
+ readonly matchStartsWith: Schema.optional<Schema.$Array<Schema.String>>;
251
+ readonly matchExact: Schema.optional<Schema.$Array<Schema.String>>;
252
+ }>>>;
253
+ }>>;
254
+ }>;
255
+ readonly runtime: Schema.optional<Schema.Struct<{
256
+ readonly agentRoles: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
257
+ readonly timeouts: Schema.optional<Schema.$Record<Schema.String, Schema.Number>>;
258
+ readonly harness: Schema.optional<Schema.Literals<readonly ["pi", "claude-code", "codex"]>>;
259
+ readonly model: Schema.optional<Schema.String>;
260
+ readonly mode: Schema.optional<Schema.Literals<readonly ["yolo", "approval-required"]>>;
261
+ readonly pi: Schema.optional<Schema.Struct<{
262
+ readonly packages: Schema.optional<Schema.$Array<Schema.String>>;
263
+ }>>;
264
+ }>>;
265
+ readonly planning: Schema.optional<Schema.Struct<{
266
+ readonly mode: Schema.optional<Schema.Literals<readonly ["auto", "always", "off"]>>;
267
+ readonly requireForLabels: Schema.optional<Schema.$Array<Schema.String>>;
268
+ readonly skipForLabels: Schema.optional<Schema.$Array<Schema.String>>;
269
+ }>>;
270
+ readonly github: Schema.optional<Schema.Struct<{
271
+ readonly issueUpdates: Schema.optional<Schema.Literals<readonly ["lifecycle", "minimal", "off"]>>;
272
+ readonly projects: Schema.optional<Schema.Struct<{
273
+ readonly enabled: Schema.optional<Schema.Boolean>;
274
+ readonly projectId: Schema.optional<Schema.String>;
275
+ readonly statusFieldId: Schema.optional<Schema.String>;
276
+ readonly statuses: Schema.optional<Schema.Struct<{
277
+ readonly running: Schema.optional<Schema.String>;
278
+ readonly prOpen: Schema.optional<Schema.String>;
279
+ readonly ciFixing: Schema.optional<Schema.String>;
280
+ readonly merging: Schema.optional<Schema.String>;
281
+ readonly done: Schema.optional<Schema.String>;
282
+ readonly needsAttention: Schema.optional<Schema.String>;
283
+ }>>;
284
+ }>>;
285
+ }>>;
286
+ readonly automation: Schema.optional<Schema.Struct<{
287
+ readonly maxValidationAttempts: Schema.optional<Schema.Number>;
288
+ readonly maxPrFixIterations: Schema.optional<Schema.Number>;
289
+ }>>;
290
+ readonly pr: Schema.optional<Schema.Struct<{
291
+ readonly mode: Schema.optional<Schema.Literals<readonly ["auto", "ask", "off"]>>;
292
+ readonly watchChecks: Schema.optional<Schema.Boolean>;
293
+ readonly autoFixChecks: Schema.optional<Schema.Boolean>;
294
+ readonly autoFixReview: Schema.optional<Schema.Boolean>;
295
+ readonly pendingTimeoutMs: Schema.optional<Schema.Number>;
296
+ readonly pendingPollMs: Schema.optional<Schema.Number>;
297
+ }>>;
298
+ readonly merge: Schema.optional<Schema.Struct<{
299
+ readonly mode: Schema.optional<Schema.Literals<readonly ["auto", "off", "pr-ready"]>>;
300
+ readonly method: Schema.optional<Schema.Literals<readonly ["repo-default", "squash", "merge", "rebase"]>>;
301
+ readonly deleteBranch: Schema.optional<Schema.Union<readonly [Schema.Literal<"repo-default">, Schema.Boolean]>>;
302
+ readonly allowedFailures: Schema.optional<Schema.$Array<Schema.String>>;
303
+ readonly bypass: Schema.optional<Schema.Boolean>;
304
+ }>>;
305
+ readonly review: Schema.optional<Schema.Struct<{
306
+ readonly mode: Schema.optional<Schema.Literals<readonly ["off", "advisory", "required"]>>;
307
+ readonly provider: Schema.optional<Schema.Literal<"greptile">>;
308
+ }>>;
309
+ readonly issueAnalysis: Schema.optional<Schema.Struct<{
310
+ readonly enabled: Schema.optional<Schema.Boolean>;
311
+ readonly harness: Schema.optional<Schema.Literal<"pi">>;
312
+ readonly model: Schema.optional<Schema.String>;
313
+ readonly mode: Schema.optional<Schema.Literals<readonly ["continuous", "off"]>>;
314
+ }>>;
315
+ }>;
316
+ export type RigConfig = typeof RigConfig.Type;
@@ -93,6 +93,8 @@ var WorkspaceIsolation = Schema2.Literals([
93
93
  "worktree",
94
94
  "directory"
95
95
  ]);
96
+ var WorkspaceCheckout = WorkspaceIsolation;
97
+ var WorkspaceSandbox = Schema2.Literals(["enforce", "auto", "off"]);
96
98
  var ScopeSearchPrefix = Schema2.Struct({
97
99
  prefix: Schema2.String,
98
100
  matchStartsWith: Schema2.optional(Schema2.Array(Schema2.String)),
@@ -104,7 +106,9 @@ var ScopeNormalizationRules = Schema2.Struct({
104
106
  });
105
107
  var WorkspaceConfig = Schema2.Struct({
106
108
  mainRepo: Schema2.String,
107
- isolation: WorkspaceIsolation,
109
+ checkout: Schema2.optional(WorkspaceCheckout),
110
+ isolation: Schema2.optional(WorkspaceIsolation),
111
+ sandbox: Schema2.optional(WorkspaceSandbox),
108
112
  scopeNormalization: Schema2.optional(ScopeNormalizationRules)
109
113
  });
110
114
  var TaskSourceConfig = Schema2.Struct({
@@ -119,12 +123,16 @@ var TaskSourceConfig = Schema2.Struct({
119
123
  });
120
124
  var RuntimeHarness = Schema2.Literals(["pi", "claude-code", "codex"]);
121
125
  var RigRuntimeMode = Schema2.Literals(["yolo", "approval-required"]);
126
+ var PiRuntimeConfig = Schema2.Struct({
127
+ packages: Schema2.optional(Schema2.Array(Schema2.String))
128
+ });
122
129
  var RuntimeConfig = Schema2.Struct({
123
130
  agentRoles: Schema2.optional(Schema2.Record(Schema2.String, Schema2.Unknown)),
124
131
  timeouts: Schema2.optional(Schema2.Record(Schema2.String, Schema2.Number)),
125
132
  harness: Schema2.optional(RuntimeHarness),
126
133
  model: Schema2.optional(Schema2.String),
127
- mode: Schema2.optional(RigRuntimeMode)
134
+ mode: Schema2.optional(RigRuntimeMode),
135
+ pi: Schema2.optional(PiRuntimeConfig)
128
136
  });
129
137
  var ProjectIdentity = Schema2.Struct({
130
138
  name: Schema2.String,
@@ -143,6 +151,7 @@ var GitHubProjectStatusConfig = Schema2.Struct({
143
151
  running: Schema2.optional(Schema2.String),
144
152
  prOpen: Schema2.optional(Schema2.String),
145
153
  ciFixing: Schema2.optional(Schema2.String),
154
+ merging: Schema2.optional(Schema2.String),
146
155
  done: Schema2.optional(Schema2.String),
147
156
  needsAttention: Schema2.optional(Schema2.String)
148
157
  }))
@@ -195,8 +204,10 @@ var RigConfig = Schema2.Struct({
195
204
  issueAnalysis: Schema2.optional(IssueAnalysisConfig)
196
205
  });
197
206
  export {
207
+ WorkspaceSandbox,
198
208
  WorkspaceIsolation,
199
209
  WorkspaceConfig,
210
+ WorkspaceCheckout,
200
211
  TaskSourceConfig,
201
212
  ScopeSearchPrefix,
202
213
  ScopeNormalizationRules,
@@ -208,6 +219,7 @@ export {
208
219
  PullRequestConfig,
209
220
  ProjectIdentity,
210
221
  PlanningConfig,
222
+ PiRuntimeConfig,
211
223
  MergeConfig,
212
224
  IssueAnalysisConfig,
213
225
  GitHubProjectStatusConfig,
@@ -0,0 +1,50 @@
1
+ import { Schema } from "effect";
2
+ export declare const EngineMessageRole: Schema.Literals<readonly ["user", "assistant", "system"]>;
3
+ export type EngineMessageRole = typeof EngineMessageRole.Type;
4
+ export declare const EngineMessageState: Schema.Literals<readonly ["streaming", "completed", "interrupted", "errored"]>;
5
+ export type EngineMessageState = typeof EngineMessageState.Type;
6
+ export declare const ConversationSummary: Schema.Struct<{
7
+ readonly id: Schema.brand<Schema.Trim, "ConversationId">;
8
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
9
+ readonly title: Schema.Trim;
10
+ readonly createdAt: Schema.String;
11
+ readonly updatedAt: Schema.String;
12
+ }>;
13
+ export type ConversationSummary = typeof ConversationSummary.Type;
14
+ export declare const EngineMessage: Schema.Struct<{
15
+ readonly id: Schema.brand<Schema.Trim, "MessageId">;
16
+ readonly conversationId: Schema.brand<Schema.Trim, "ConversationId">;
17
+ readonly role: Schema.Literals<readonly ["user", "assistant", "system"]>;
18
+ readonly text: Schema.String;
19
+ readonly attachments: Schema.$Array<Schema.Unknown>;
20
+ readonly state: Schema.Literals<readonly ["streaming", "completed", "interrupted", "errored"]>;
21
+ readonly createdAt: Schema.String;
22
+ readonly completedAt: Schema.NullOr<Schema.String>;
23
+ }>;
24
+ export type EngineMessage = typeof EngineMessage.Type;
25
+ export declare const EngineAction: Schema.Struct<{
26
+ readonly id: Schema.brand<Schema.Trim, "ActionId">;
27
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
28
+ readonly messageId: Schema.NullOr<Schema.brand<Schema.Trim, "MessageId">>;
29
+ readonly actionType: Schema.Trim;
30
+ readonly title: Schema.Trim;
31
+ readonly detail: Schema.NullOr<Schema.String>;
32
+ readonly state: Schema.Trim;
33
+ readonly payload: Schema.Unknown;
34
+ readonly startedAt: Schema.String;
35
+ readonly completedAt: Schema.NullOr<Schema.String>;
36
+ }>;
37
+ export type EngineAction = typeof EngineAction.Type;
38
+ export declare const EngineLogTone: Schema.Literals<readonly ["thinking", "tool", "info", "error"]>;
39
+ export type EngineLogTone = typeof EngineLogTone.Type;
40
+ export declare const EngineRunLog: Schema.Struct<{
41
+ readonly id: Schema.Trim;
42
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
43
+ readonly title: Schema.Trim;
44
+ readonly detail: Schema.NullOr<Schema.String>;
45
+ readonly tone: Schema.Literals<readonly ["thinking", "tool", "info", "error"]>;
46
+ readonly status: Schema.NullOr<Schema.Trim>;
47
+ readonly payload: Schema.Unknown;
48
+ readonly createdAt: Schema.String;
49
+ }>;
50
+ export type EngineRunLog = typeof EngineRunLog.Type;
@@ -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,25 @@
1
+ import { Schema } from "effect";
2
+ export declare const EDITORS: readonly [{
3
+ readonly id: "cursor";
4
+ readonly label: "Cursor";
5
+ readonly command: "cursor";
6
+ }, {
7
+ readonly id: "vscode";
8
+ readonly label: "VS Code";
9
+ readonly command: "code";
10
+ }, {
11
+ readonly id: "zed";
12
+ readonly label: "Zed";
13
+ readonly command: "zed";
14
+ }, {
15
+ readonly id: "file-manager";
16
+ readonly label: "File Manager";
17
+ readonly command: null;
18
+ }];
19
+ export declare const EditorId: Schema.Literals<("cursor" | "vscode" | "zed" | "file-manager")[]>;
20
+ export type EditorId = typeof EditorId.Type;
21
+ export declare const OpenInEditorInput: Schema.Struct<{
22
+ readonly cwd: Schema.Trim;
23
+ readonly editor: Schema.Literals<("cursor" | "vscode" | "zed" | "file-manager")[]>;
24
+ }>;
25
+ export type OpenInEditorInput = typeof OpenInEditorInput.Type;
@@ -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");