@h-rig/contracts 0.0.6-alpha.10 → 0.0.6-alpha.100
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.
- package/dist/index.cjs +5903 -0
- package/dist/index.mjs +5862 -0
- package/dist/src/artifact.d.ts +13 -0
- package/dist/src/artifact.js +3 -0
- package/dist/src/baseSchemas.d.ts +63 -0
- package/dist/src/baseSchemas.js +6 -0
- package/dist/src/cli-output.d.ts +324 -0
- package/dist/src/cli-output.js +190 -0
- package/dist/src/config.d.ts +371 -0
- package/dist/src/config.js +26 -3
- package/dist/src/conversation.d.ts +50 -0
- package/dist/src/conversation.js +3 -0
- package/dist/src/editor.d.ts +25 -0
- package/dist/src/editor.js +3 -0
- package/dist/src/engine.d.ts +2789 -0
- package/dist/src/engine.js +7 -2
- package/dist/src/git.d.ts +144 -0
- package/dist/src/git.js +3 -0
- package/dist/src/graph.d.ts +39 -0
- package/dist/src/graph.js +3 -0
- package/dist/src/help-catalog.d.ts +34 -0
- package/dist/src/help-catalog.js +405 -0
- package/dist/src/index.d.ts +37 -0
- package/dist/src/index.js +2534 -1219
- package/dist/src/ipc.d.ts +248 -0
- package/dist/src/keybindings.d.ts +71 -0
- package/dist/src/keybindings.js +3 -0
- package/dist/src/model.d.ts +77 -0
- package/dist/src/orchestration.d.ts +3695 -0
- package/dist/src/orchestration.js +3 -0
- package/dist/src/pi-session.d.ts +113 -0
- package/dist/src/pi-session.js +1 -0
- package/dist/src/plugin-hooks.d.ts +51 -0
- package/dist/src/plugin-hooks.js +112 -0
- package/dist/src/plugin.d.ts +230 -0
- package/dist/src/policy.d.ts +16 -0
- package/dist/src/policy.js +3 -0
- package/dist/src/project.d.ts +71 -0
- package/dist/src/project.js +3 -0
- package/dist/src/protocol-version.d.ts +21 -0
- package/dist/src/protocol-version.js +6 -0
- package/dist/src/provider.d.ts +105 -0
- package/dist/src/provider.js +3 -0
- package/dist/src/providerRuntime.d.ts +3949 -0
- package/dist/src/providerRuntime.js +3 -0
- package/dist/src/remote.d.ts +326 -0
- package/dist/src/remote.js +7 -2
- package/dist/src/review.d.ts +18 -0
- package/dist/src/review.js +3 -0
- package/dist/src/rig.d.ts +783 -0
- package/dist/src/rig.js +58 -4
- package/dist/src/run-journal.d.ts +763 -0
- package/dist/src/run-journal.js +1509 -0
- package/dist/src/run-session-journal.d.ts +53 -0
- package/dist/src/run-session-journal.js +1582 -0
- package/dist/src/run-status.d.ts +12 -0
- package/dist/src/run-status.js +38 -0
- package/dist/src/runtime.d.ts +103 -0
- package/dist/src/runtime.js +7 -2
- package/dist/src/server.d.ts +106 -0
- package/dist/src/server.js +3 -0
- package/dist/src/serviceFabric.d.ts +62 -0
- package/dist/src/serviceFabric.js +3 -0
- package/dist/src/task-source.d.ts +28 -0
- package/dist/src/terminal.d.ts +130 -0
- package/dist/src/terminal.js +3 -0
- package/dist/src/validation.d.ts +14 -0
- package/dist/src/validation.js +3 -0
- package/dist/src/workspace.d.ts +204 -0
- package/dist/src/workspace.js +3 -0
- package/dist/src/ws.d.ts +747 -0
- package/dist/src/ws.js +52 -3
- package/package.json +6 -3
|
@@ -0,0 +1,371 @@
|
|
|
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
|
+
/**
|
|
78
|
+
* Rig backbone + placement, surfaced so EVERY value Rig would otherwise compute
|
|
79
|
+
* or hardcode is settable from `rig.config.ts`. Resolution order everywhere is
|
|
80
|
+
* ambient env → `rig.config.ts` → computed default (the default is the value Rig
|
|
81
|
+
* computes today, e.g. host `where.rig-does.work`). All optional: omit and you get
|
|
82
|
+
* the computed default with zero config.
|
|
83
|
+
*
|
|
84
|
+
* - `host` : the shared collab/discovery backbone host. relayUrl + registryUrl
|
|
85
|
+
* derive from it (`wss://<host>`, `https://<host>/registry`) unless
|
|
86
|
+
* set explicitly below.
|
|
87
|
+
* - `relayUrl`/`registryUrl`/`registrySecret` : explicit overrides of the derived
|
|
88
|
+
* backbone endpoints + the registry HMAC secret.
|
|
89
|
+
* - `sshTarget`/`checkout` : remote run PLACEMENT (which machine executes a run,
|
|
90
|
+
* and the checkout dir there) — formerly only in endpoints.toml /
|
|
91
|
+
* connection.json, now surfaceable here too.
|
|
92
|
+
*/
|
|
93
|
+
export declare const RigServerConfig: Schema.Struct<{
|
|
94
|
+
readonly host: Schema.optional<Schema.String>;
|
|
95
|
+
readonly relayUrl: Schema.optional<Schema.String>;
|
|
96
|
+
readonly registryUrl: Schema.optional<Schema.String>;
|
|
97
|
+
readonly registrySecret: Schema.optional<Schema.String>;
|
|
98
|
+
readonly sshTarget: Schema.optional<Schema.String>;
|
|
99
|
+
readonly checkout: Schema.optional<Schema.String>;
|
|
100
|
+
}>;
|
|
101
|
+
export type RigServerConfig = typeof RigServerConfig.Type;
|
|
102
|
+
export declare const RuntimeConfig: Schema.Struct<{
|
|
103
|
+
readonly agentRoles: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
104
|
+
readonly timeouts: Schema.optional<Schema.$Record<Schema.String, Schema.Number>>;
|
|
105
|
+
readonly harness: Schema.optional<Schema.Literals<readonly ["pi", "claude-code", "codex"]>>;
|
|
106
|
+
readonly model: Schema.optional<Schema.String>;
|
|
107
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["yolo", "approval-required"]>>;
|
|
108
|
+
readonly pi: Schema.optional<Schema.Struct<{
|
|
109
|
+
readonly packages: Schema.optional<Schema.$Array<Schema.String>>;
|
|
110
|
+
}>>;
|
|
111
|
+
/** Backbone (relay/registry) + remote placement; computed defaults under the hood. */
|
|
112
|
+
readonly server: Schema.optional<Schema.Struct<{
|
|
113
|
+
readonly host: Schema.optional<Schema.String>;
|
|
114
|
+
readonly relayUrl: Schema.optional<Schema.String>;
|
|
115
|
+
readonly registryUrl: Schema.optional<Schema.String>;
|
|
116
|
+
readonly registrySecret: Schema.optional<Schema.String>;
|
|
117
|
+
readonly sshTarget: Schema.optional<Schema.String>;
|
|
118
|
+
readonly checkout: Schema.optional<Schema.String>;
|
|
119
|
+
}>>;
|
|
120
|
+
}>;
|
|
121
|
+
export type RuntimeConfig = typeof RuntimeConfig.Type;
|
|
122
|
+
export declare const ProjectIdentity: Schema.Struct<{
|
|
123
|
+
readonly name: Schema.String;
|
|
124
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
125
|
+
}>;
|
|
126
|
+
export type ProjectIdentity = typeof ProjectIdentity.Type;
|
|
127
|
+
export declare const PlanningConfig: Schema.Struct<{
|
|
128
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["auto", "always", "off"]>>;
|
|
129
|
+
readonly requireForLabels: Schema.optional<Schema.$Array<Schema.String>>;
|
|
130
|
+
readonly skipForLabels: Schema.optional<Schema.$Array<Schema.String>>;
|
|
131
|
+
}>;
|
|
132
|
+
export type PlanningConfig = typeof PlanningConfig.Type;
|
|
133
|
+
export declare const GitHubProjectStatusConfig: Schema.Struct<{
|
|
134
|
+
readonly enabled: Schema.optional<Schema.Boolean>;
|
|
135
|
+
readonly projectId: Schema.optional<Schema.String>;
|
|
136
|
+
readonly statusFieldId: Schema.optional<Schema.String>;
|
|
137
|
+
readonly statuses: Schema.optional<Schema.Struct<{
|
|
138
|
+
readonly running: Schema.optional<Schema.String>;
|
|
139
|
+
readonly prOpen: Schema.optional<Schema.String>;
|
|
140
|
+
readonly ciFixing: Schema.optional<Schema.String>;
|
|
141
|
+
readonly merging: Schema.optional<Schema.String>;
|
|
142
|
+
readonly done: Schema.optional<Schema.String>;
|
|
143
|
+
readonly needsAttention: Schema.optional<Schema.String>;
|
|
144
|
+
}>>;
|
|
145
|
+
}>;
|
|
146
|
+
export type GitHubProjectStatusConfig = typeof GitHubProjectStatusConfig.Type;
|
|
147
|
+
export declare const GitHubConfig: Schema.Struct<{
|
|
148
|
+
readonly issueUpdates: Schema.optional<Schema.Literals<readonly ["lifecycle", "minimal", "off"]>>;
|
|
149
|
+
readonly projects: Schema.optional<Schema.Struct<{
|
|
150
|
+
readonly enabled: Schema.optional<Schema.Boolean>;
|
|
151
|
+
readonly projectId: Schema.optional<Schema.String>;
|
|
152
|
+
readonly statusFieldId: Schema.optional<Schema.String>;
|
|
153
|
+
readonly statuses: Schema.optional<Schema.Struct<{
|
|
154
|
+
readonly running: Schema.optional<Schema.String>;
|
|
155
|
+
readonly prOpen: Schema.optional<Schema.String>;
|
|
156
|
+
readonly ciFixing: Schema.optional<Schema.String>;
|
|
157
|
+
readonly merging: Schema.optional<Schema.String>;
|
|
158
|
+
readonly done: Schema.optional<Schema.String>;
|
|
159
|
+
readonly needsAttention: Schema.optional<Schema.String>;
|
|
160
|
+
}>>;
|
|
161
|
+
}>>;
|
|
162
|
+
}>;
|
|
163
|
+
export type GitHubConfig = typeof GitHubConfig.Type;
|
|
164
|
+
export declare const AutomationConfig: Schema.Struct<{
|
|
165
|
+
readonly maxValidationAttempts: Schema.optional<Schema.Number>;
|
|
166
|
+
readonly maxPrFixIterations: Schema.optional<Schema.Number>;
|
|
167
|
+
}>;
|
|
168
|
+
export type AutomationConfig = typeof AutomationConfig.Type;
|
|
169
|
+
export declare const PullRequestConfig: Schema.Struct<{
|
|
170
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["auto", "ask", "off"]>>;
|
|
171
|
+
readonly watchChecks: Schema.optional<Schema.Boolean>;
|
|
172
|
+
readonly autoFixChecks: Schema.optional<Schema.Boolean>;
|
|
173
|
+
readonly autoFixReview: Schema.optional<Schema.Boolean>;
|
|
174
|
+
readonly pendingTimeoutMs: Schema.optional<Schema.Number>;
|
|
175
|
+
readonly pendingPollMs: Schema.optional<Schema.Number>;
|
|
176
|
+
}>;
|
|
177
|
+
export type PullRequestConfig = typeof PullRequestConfig.Type;
|
|
178
|
+
export declare const MergeConfig: Schema.Struct<{
|
|
179
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["auto", "off", "pr-ready"]>>;
|
|
180
|
+
readonly method: Schema.optional<Schema.Literals<readonly ["repo-default", "squash", "merge", "rebase"]>>;
|
|
181
|
+
readonly deleteBranch: Schema.optional<Schema.Union<readonly [Schema.Literal<"repo-default">, Schema.Boolean]>>;
|
|
182
|
+
readonly allowedFailures: Schema.optional<Schema.$Array<Schema.String>>;
|
|
183
|
+
readonly bypass: Schema.optional<Schema.Boolean>;
|
|
184
|
+
}>;
|
|
185
|
+
export type MergeConfig = typeof MergeConfig.Type;
|
|
186
|
+
export declare const IssueAnalysisConfig: Schema.Struct<{
|
|
187
|
+
readonly enabled: Schema.optional<Schema.Boolean>;
|
|
188
|
+
readonly harness: Schema.optional<Schema.Literal<"pi">>;
|
|
189
|
+
readonly model: Schema.optional<Schema.String>;
|
|
190
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["continuous", "off"]>>;
|
|
191
|
+
}>;
|
|
192
|
+
export type IssueAnalysisConfig = typeof IssueAnalysisConfig.Type;
|
|
193
|
+
export declare const ReviewConfig: Schema.Struct<{
|
|
194
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["off", "advisory", "required"]>>;
|
|
195
|
+
readonly provider: Schema.optional<Schema.Literal<"greptile">>;
|
|
196
|
+
}>;
|
|
197
|
+
export type ReviewConfig = typeof ReviewConfig.Type;
|
|
198
|
+
export declare const RigConfig: Schema.Struct<{
|
|
199
|
+
readonly project: Schema.Struct<{
|
|
200
|
+
readonly name: Schema.String;
|
|
201
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
202
|
+
}>;
|
|
203
|
+
readonly plugins: Schema.$Array<Schema.Struct<{
|
|
204
|
+
readonly name: Schema.String;
|
|
205
|
+
readonly version: Schema.String;
|
|
206
|
+
readonly contributes: Schema.optional<Schema.Struct<{
|
|
207
|
+
readonly validators: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
208
|
+
readonly id: Schema.String;
|
|
209
|
+
readonly category: Schema.Literals<readonly ["boundary", "contract", "integration", "regression", "external", "custom"]>;
|
|
210
|
+
readonly description: Schema.optional<Schema.String>;
|
|
211
|
+
}>>>;
|
|
212
|
+
readonly hooks: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
213
|
+
readonly id: Schema.String;
|
|
214
|
+
readonly event: Schema.Literals<readonly ["PreToolUse", "PostToolUse", "UserPromptSubmit", "Stop", "SessionStart", "SessionEnd"]>;
|
|
215
|
+
readonly matcher: Schema.Union<readonly [Schema.Struct<{
|
|
216
|
+
readonly kind: Schema.Literal<"all">;
|
|
217
|
+
}>, Schema.Struct<{
|
|
218
|
+
readonly kind: Schema.Literal<"tool">;
|
|
219
|
+
readonly name: Schema.String;
|
|
220
|
+
}>, Schema.Struct<{
|
|
221
|
+
readonly kind: Schema.Literal<"glob">;
|
|
222
|
+
readonly pattern: Schema.String;
|
|
223
|
+
}>]>;
|
|
224
|
+
readonly command: Schema.optional<Schema.String>;
|
|
225
|
+
readonly description: Schema.optional<Schema.String>;
|
|
226
|
+
}>>>;
|
|
227
|
+
readonly skills: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
228
|
+
readonly id: Schema.String;
|
|
229
|
+
readonly path: Schema.String;
|
|
230
|
+
readonly description: Schema.optional<Schema.String>;
|
|
231
|
+
}>>>;
|
|
232
|
+
readonly repoSources: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
233
|
+
readonly id: Schema.String;
|
|
234
|
+
readonly url: Schema.String;
|
|
235
|
+
readonly defaultPath: Schema.optional<Schema.String>;
|
|
236
|
+
readonly description: Schema.optional<Schema.String>;
|
|
237
|
+
readonly defaultBranch: Schema.optional<Schema.String>;
|
|
238
|
+
readonly remoteEnvVar: Schema.optional<Schema.String>;
|
|
239
|
+
readonly checkoutEnvVar: Schema.optional<Schema.String>;
|
|
240
|
+
}>>>;
|
|
241
|
+
readonly agentRoles: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
242
|
+
readonly id: Schema.String;
|
|
243
|
+
readonly defaultModel: Schema.optional<Schema.String>;
|
|
244
|
+
readonly description: Schema.optional<Schema.String>;
|
|
245
|
+
}>>>;
|
|
246
|
+
readonly taskFieldSchemas: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
247
|
+
readonly id: Schema.String;
|
|
248
|
+
readonly fieldName: Schema.String;
|
|
249
|
+
readonly schemaJson: Schema.String;
|
|
250
|
+
}>>>;
|
|
251
|
+
readonly taskSources: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
252
|
+
readonly id: Schema.String;
|
|
253
|
+
readonly kind: Schema.String;
|
|
254
|
+
readonly description: Schema.optional<Schema.String>;
|
|
255
|
+
}>>>;
|
|
256
|
+
readonly cliCommands: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
257
|
+
readonly id: Schema.String;
|
|
258
|
+
readonly command: Schema.String;
|
|
259
|
+
readonly description: Schema.optional<Schema.String>;
|
|
260
|
+
}>>>;
|
|
261
|
+
}>>;
|
|
262
|
+
}>>;
|
|
263
|
+
readonly taskSource: Schema.Struct<{
|
|
264
|
+
readonly kind: Schema.String;
|
|
265
|
+
readonly path: Schema.optional<Schema.String>;
|
|
266
|
+
readonly owner: Schema.optional<Schema.String>;
|
|
267
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
268
|
+
readonly labels: Schema.optional<Schema.$Array<Schema.String>>;
|
|
269
|
+
readonly state: Schema.optional<Schema.Literals<readonly ["open", "closed", "all"]>>;
|
|
270
|
+
readonly url: Schema.optional<Schema.String>;
|
|
271
|
+
readonly options: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
272
|
+
}>;
|
|
273
|
+
readonly workspace: Schema.Struct<{
|
|
274
|
+
readonly mainRepo: Schema.String;
|
|
275
|
+
/** Canonical name for the checkout axis; `isolation` is the deprecated alias. */
|
|
276
|
+
readonly checkout: Schema.optional<Schema.Literals<readonly ["worktree", "directory"]>>;
|
|
277
|
+
/** @deprecated Renamed to `checkout` — worktrees are git hygiene, not isolation. */
|
|
278
|
+
readonly isolation: Schema.optional<Schema.Literals<readonly ["worktree", "directory"]>>;
|
|
279
|
+
readonly sandbox: Schema.optional<Schema.Literals<readonly ["enforce", "auto", "off"]>>;
|
|
280
|
+
readonly scopeNormalization: Schema.optional<Schema.Struct<{
|
|
281
|
+
readonly stripPrefixes: Schema.optional<Schema.$Array<Schema.String>>;
|
|
282
|
+
readonly searchPrefixes: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
283
|
+
readonly prefix: Schema.String;
|
|
284
|
+
readonly matchStartsWith: Schema.optional<Schema.$Array<Schema.String>>;
|
|
285
|
+
readonly matchExact: Schema.optional<Schema.$Array<Schema.String>>;
|
|
286
|
+
}>>>;
|
|
287
|
+
}>>;
|
|
288
|
+
}>;
|
|
289
|
+
readonly runtime: Schema.optional<Schema.Struct<{
|
|
290
|
+
readonly agentRoles: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
291
|
+
readonly timeouts: Schema.optional<Schema.$Record<Schema.String, Schema.Number>>;
|
|
292
|
+
readonly harness: Schema.optional<Schema.Literals<readonly ["pi", "claude-code", "codex"]>>;
|
|
293
|
+
readonly model: Schema.optional<Schema.String>;
|
|
294
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["yolo", "approval-required"]>>;
|
|
295
|
+
readonly pi: Schema.optional<Schema.Struct<{
|
|
296
|
+
readonly packages: Schema.optional<Schema.$Array<Schema.String>>;
|
|
297
|
+
}>>;
|
|
298
|
+
/** Backbone (relay/registry) + remote placement; computed defaults under the hood. */
|
|
299
|
+
readonly server: Schema.optional<Schema.Struct<{
|
|
300
|
+
readonly host: Schema.optional<Schema.String>;
|
|
301
|
+
readonly relayUrl: Schema.optional<Schema.String>;
|
|
302
|
+
readonly registryUrl: Schema.optional<Schema.String>;
|
|
303
|
+
readonly registrySecret: Schema.optional<Schema.String>;
|
|
304
|
+
readonly sshTarget: Schema.optional<Schema.String>;
|
|
305
|
+
readonly checkout: Schema.optional<Schema.String>;
|
|
306
|
+
}>>;
|
|
307
|
+
}>>;
|
|
308
|
+
readonly planning: Schema.optional<Schema.Struct<{
|
|
309
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["auto", "always", "off"]>>;
|
|
310
|
+
readonly requireForLabels: Schema.optional<Schema.$Array<Schema.String>>;
|
|
311
|
+
readonly skipForLabels: Schema.optional<Schema.$Array<Schema.String>>;
|
|
312
|
+
}>>;
|
|
313
|
+
readonly github: Schema.optional<Schema.Struct<{
|
|
314
|
+
readonly issueUpdates: Schema.optional<Schema.Literals<readonly ["lifecycle", "minimal", "off"]>>;
|
|
315
|
+
readonly projects: Schema.optional<Schema.Struct<{
|
|
316
|
+
readonly enabled: Schema.optional<Schema.Boolean>;
|
|
317
|
+
readonly projectId: Schema.optional<Schema.String>;
|
|
318
|
+
readonly statusFieldId: Schema.optional<Schema.String>;
|
|
319
|
+
readonly statuses: Schema.optional<Schema.Struct<{
|
|
320
|
+
readonly running: Schema.optional<Schema.String>;
|
|
321
|
+
readonly prOpen: Schema.optional<Schema.String>;
|
|
322
|
+
readonly ciFixing: Schema.optional<Schema.String>;
|
|
323
|
+
readonly merging: Schema.optional<Schema.String>;
|
|
324
|
+
readonly done: Schema.optional<Schema.String>;
|
|
325
|
+
readonly needsAttention: Schema.optional<Schema.String>;
|
|
326
|
+
}>>;
|
|
327
|
+
}>>;
|
|
328
|
+
}>>;
|
|
329
|
+
readonly automation: Schema.optional<Schema.Struct<{
|
|
330
|
+
readonly maxValidationAttempts: Schema.optional<Schema.Number>;
|
|
331
|
+
readonly maxPrFixIterations: Schema.optional<Schema.Number>;
|
|
332
|
+
}>>;
|
|
333
|
+
readonly pr: Schema.optional<Schema.Struct<{
|
|
334
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["auto", "ask", "off"]>>;
|
|
335
|
+
readonly watchChecks: Schema.optional<Schema.Boolean>;
|
|
336
|
+
readonly autoFixChecks: Schema.optional<Schema.Boolean>;
|
|
337
|
+
readonly autoFixReview: Schema.optional<Schema.Boolean>;
|
|
338
|
+
readonly pendingTimeoutMs: Schema.optional<Schema.Number>;
|
|
339
|
+
readonly pendingPollMs: Schema.optional<Schema.Number>;
|
|
340
|
+
}>>;
|
|
341
|
+
readonly merge: Schema.optional<Schema.Struct<{
|
|
342
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["auto", "off", "pr-ready"]>>;
|
|
343
|
+
readonly method: Schema.optional<Schema.Literals<readonly ["repo-default", "squash", "merge", "rebase"]>>;
|
|
344
|
+
readonly deleteBranch: Schema.optional<Schema.Union<readonly [Schema.Literal<"repo-default">, Schema.Boolean]>>;
|
|
345
|
+
readonly allowedFailures: Schema.optional<Schema.$Array<Schema.String>>;
|
|
346
|
+
readonly bypass: Schema.optional<Schema.Boolean>;
|
|
347
|
+
}>>;
|
|
348
|
+
readonly review: Schema.optional<Schema.Struct<{
|
|
349
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["off", "advisory", "required"]>>;
|
|
350
|
+
readonly provider: Schema.optional<Schema.Literal<"greptile">>;
|
|
351
|
+
}>>;
|
|
352
|
+
readonly issueAnalysis: Schema.optional<Schema.Struct<{
|
|
353
|
+
readonly enabled: Schema.optional<Schema.Boolean>;
|
|
354
|
+
readonly harness: Schema.optional<Schema.Literal<"pi">>;
|
|
355
|
+
readonly model: Schema.optional<Schema.String>;
|
|
356
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["continuous", "off"]>>;
|
|
357
|
+
}>>;
|
|
358
|
+
/**
|
|
359
|
+
* Generic env-override map: the single escape hatch that makes EVERY env-driven
|
|
360
|
+
* value (the dozens of `RIG_*` / `RIG_BAKED_*` / `RIG_BROWSER_*` knobs, plus any
|
|
361
|
+
* computed value that reads an env var) settable from `rig.config.ts` without a
|
|
362
|
+
* typed field per knob. The CLI applies these to `process.env` at startup
|
|
363
|
+
* FILL-IF-UNSET, so the precedence is:
|
|
364
|
+
* ambient process env at run time (top winner)
|
|
365
|
+
* → `rig.config.ts` (this `env` map + typed sections)
|
|
366
|
+
* → computed default / derived value (under the hood).
|
|
367
|
+
* i.e. `RIG_X=… rig …` always beats the config; the config beats the default.
|
|
368
|
+
*/
|
|
369
|
+
readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
370
|
+
}>;
|
|
371
|
+
export type RigConfig = typeof RigConfig.Type;
|
package/dist/src/config.js
CHANGED
|
@@ -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
|
-
|
|
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,25 @@ 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
|
+
});
|
|
129
|
+
var RigServerConfig = Schema2.Struct({
|
|
130
|
+
host: Schema2.optional(Schema2.String),
|
|
131
|
+
relayUrl: Schema2.optional(Schema2.String),
|
|
132
|
+
registryUrl: Schema2.optional(Schema2.String),
|
|
133
|
+
registrySecret: Schema2.optional(Schema2.String),
|
|
134
|
+
sshTarget: Schema2.optional(Schema2.String),
|
|
135
|
+
checkout: Schema2.optional(Schema2.String)
|
|
136
|
+
});
|
|
122
137
|
var RuntimeConfig = Schema2.Struct({
|
|
123
138
|
agentRoles: Schema2.optional(Schema2.Record(Schema2.String, Schema2.Unknown)),
|
|
124
139
|
timeouts: Schema2.optional(Schema2.Record(Schema2.String, Schema2.Number)),
|
|
125
140
|
harness: Schema2.optional(RuntimeHarness),
|
|
126
141
|
model: Schema2.optional(Schema2.String),
|
|
127
|
-
mode: Schema2.optional(RigRuntimeMode)
|
|
142
|
+
mode: Schema2.optional(RigRuntimeMode),
|
|
143
|
+
pi: Schema2.optional(PiRuntimeConfig),
|
|
144
|
+
server: Schema2.optional(RigServerConfig)
|
|
128
145
|
});
|
|
129
146
|
var ProjectIdentity = Schema2.Struct({
|
|
130
147
|
name: Schema2.String,
|
|
@@ -143,6 +160,7 @@ var GitHubProjectStatusConfig = Schema2.Struct({
|
|
|
143
160
|
running: Schema2.optional(Schema2.String),
|
|
144
161
|
prOpen: Schema2.optional(Schema2.String),
|
|
145
162
|
ciFixing: Schema2.optional(Schema2.String),
|
|
163
|
+
merging: Schema2.optional(Schema2.String),
|
|
146
164
|
done: Schema2.optional(Schema2.String),
|
|
147
165
|
needsAttention: Schema2.optional(Schema2.String)
|
|
148
166
|
}))
|
|
@@ -192,22 +210,27 @@ var RigConfig = Schema2.Struct({
|
|
|
192
210
|
pr: Schema2.optional(PullRequestConfig),
|
|
193
211
|
merge: Schema2.optional(MergeConfig),
|
|
194
212
|
review: Schema2.optional(ReviewConfig),
|
|
195
|
-
issueAnalysis: Schema2.optional(IssueAnalysisConfig)
|
|
213
|
+
issueAnalysis: Schema2.optional(IssueAnalysisConfig),
|
|
214
|
+
env: Schema2.optional(Schema2.Record(Schema2.String, Schema2.String))
|
|
196
215
|
});
|
|
197
216
|
export {
|
|
217
|
+
WorkspaceSandbox,
|
|
198
218
|
WorkspaceIsolation,
|
|
199
219
|
WorkspaceConfig,
|
|
220
|
+
WorkspaceCheckout,
|
|
200
221
|
TaskSourceConfig,
|
|
201
222
|
ScopeSearchPrefix,
|
|
202
223
|
ScopeNormalizationRules,
|
|
203
224
|
RuntimeHarness,
|
|
204
225
|
RuntimeConfig,
|
|
226
|
+
RigServerConfig,
|
|
205
227
|
RigRuntimeMode,
|
|
206
228
|
RigConfig,
|
|
207
229
|
ReviewConfig,
|
|
208
230
|
PullRequestConfig,
|
|
209
231
|
ProjectIdentity,
|
|
210
232
|
PlanningConfig,
|
|
233
|
+
PiRuntimeConfig,
|
|
211
234
|
MergeConfig,
|
|
212
235
|
IssueAnalysisConfig,
|
|
213
236
|
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;
|
package/dist/src/conversation.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,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;
|
package/dist/src/editor.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");
|