@h-rig/contracts 0.0.6-alpha.15 → 0.0.6-alpha.150
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 +7456 -0
- package/dist/index.mjs +7415 -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 +536 -0
- package/dist/src/config.js +1592 -162
- package/dist/src/conversation.d.ts +50 -0
- package/dist/src/conversation.js +3 -0
- package/dist/src/drift.d.ts +28 -0
- package/dist/src/drift.js +69 -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 +127 -13
- package/dist/src/git.d.ts +144 -0
- package/dist/src/git.js +3 -0
- package/dist/src/graph.d.ts +323 -0
- package/dist/src/graph.js +124 -1
- package/dist/src/help-catalog.d.ts +34 -0
- package/dist/src/help-catalog.js +655 -0
- package/dist/src/index.d.ts +46 -0
- package/dist/src/index.js +4095 -1228
- package/dist/src/ipc.d.ts +248 -0
- package/dist/src/kernel.d.ts +221 -0
- package/dist/src/kernel.js +269 -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/planning.d.ts +64 -0
- package/dist/src/planning.js +90 -0
- package/dist/src/plugin-hooks.d.ts +51 -0
- package/dist/src/plugin-hooks.js +375 -0
- package/dist/src/plugin.d.ts +416 -0
- package/dist/src/plugin.js +332 -64
- 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 +16 -10
- 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 +178 -15
- package/dist/src/rollups.d.ts +41 -0
- package/dist/src/rollups.js +70 -0
- package/dist/src/run-journal.d.ts +930 -0
- package/dist/src/run-journal.js +1641 -0
- package/dist/src/run-record.d.ts +45 -0
- package/dist/src/run-record.js +1 -0
- package/dist/src/run-session-journal.d.ts +93 -0
- package/dist/src/run-session-journal.js +1809 -0
- package/dist/src/run-status.d.ts +12 -0
- package/dist/src/run-status.js +38 -0
- package/dist/src/run-timeline.d.ts +10 -0
- package/dist/src/run-timeline.js +1499 -0
- package/dist/src/runtime.d.ts +103 -0
- package/dist/src/runtime.js +9 -4
- 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 +5 -2
- package/dist/src/stage.d.ts +245 -0
- package/dist/src/stage.js +169 -0
- package/dist/src/supervisor-journal.d.ts +205 -0
- package/dist/src/supervisor-journal.js +1246 -0
- package/dist/src/task-source.d.ts +37 -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/workflow-journal.d.ts +124 -0
- package/dist/src/workflow-journal.js +389 -0
- package/dist/src/workspace.d.ts +204 -0
- package/dist/src/workspace.js +5 -2
- package/dist/src/ws.d.ts +747 -0
- package/dist/src/ws.js +172 -14
- package/package.json +51 -4
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/contracts/src/kernel.ts
|
|
3
|
+
import { Schema as Schema3 } from "effect";
|
|
4
|
+
|
|
5
|
+
// packages/contracts/src/baseSchemas.ts
|
|
6
|
+
import { Schema } from "effect";
|
|
7
|
+
var TrimmedString = Schema.Trim;
|
|
8
|
+
var TrimmedNonEmptyString = TrimmedString.check(Schema.isNonEmpty());
|
|
9
|
+
var NonNegativeInt = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
|
|
10
|
+
var PositiveInt = Schema.Int.check(Schema.isGreaterThanOrEqualTo(1));
|
|
11
|
+
var IsoDateTime = Schema.String;
|
|
12
|
+
var makeEntityId = (brand) => TrimmedNonEmptyString.pipe(Schema.brand(brand));
|
|
13
|
+
var ThreadId = makeEntityId("ThreadId");
|
|
14
|
+
var ProjectId = makeEntityId("ProjectId");
|
|
15
|
+
var WorkspaceId = makeEntityId("WorkspaceId");
|
|
16
|
+
var GraphId = makeEntityId("GraphId");
|
|
17
|
+
var TaskId = makeEntityId("TaskId");
|
|
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"));
|
|
22
|
+
var EngineRuntimeId = makeEntityId("EngineRuntimeId");
|
|
23
|
+
var ConversationId = makeEntityId("ConversationId");
|
|
24
|
+
var ActionId = makeEntityId("ActionId");
|
|
25
|
+
var ArtifactId = makeEntityId("ArtifactId");
|
|
26
|
+
var WorktreeId = makeEntityId("WorktreeId");
|
|
27
|
+
var ValidationResultId = makeEntityId("ValidationResultId");
|
|
28
|
+
var ReviewResultId = makeEntityId("ReviewResultId");
|
|
29
|
+
var CommandId = makeEntityId("CommandId");
|
|
30
|
+
var EventId = makeEntityId("EventId");
|
|
31
|
+
var MessageId = makeEntityId("MessageId");
|
|
32
|
+
var TurnId = makeEntityId("TurnId");
|
|
33
|
+
var ProviderItemId = makeEntityId("ProviderItemId");
|
|
34
|
+
var RuntimeSessionId = makeEntityId("RuntimeSessionId");
|
|
35
|
+
var RuntimeItemId = makeEntityId("RuntimeItemId");
|
|
36
|
+
var RuntimeRequestId = makeEntityId("RuntimeRequestId");
|
|
37
|
+
var RuntimeTaskId = makeEntityId("RuntimeTaskId");
|
|
38
|
+
var ApprovalRequestId = makeEntityId("ApprovalRequestId");
|
|
39
|
+
var CheckpointRef = makeEntityId("CheckpointRef");
|
|
40
|
+
var RemoteEndpointId = makeEntityId("RemoteEndpointId");
|
|
41
|
+
|
|
42
|
+
// packages/contracts/src/stage.ts
|
|
43
|
+
import { Schema as Schema2 } from "effect";
|
|
44
|
+
var StageKind = Schema2.Literals(["transform", "gate", "observe"]);
|
|
45
|
+
var StageId = TrimmedNonEmptyString.pipe(Schema2.brand("StageId"));
|
|
46
|
+
var StageContext = Schema2.Struct({
|
|
47
|
+
runId: RunId,
|
|
48
|
+
taskId: Schema2.optional(Schema2.NullOr(TaskId)),
|
|
49
|
+
state: Schema2.Unknown,
|
|
50
|
+
metadata: Schema2.optional(Schema2.Record(Schema2.String, Schema2.Unknown))
|
|
51
|
+
});
|
|
52
|
+
var StageDescriptor = Schema2.Struct({
|
|
53
|
+
id: StageId,
|
|
54
|
+
kind: StageKind,
|
|
55
|
+
before: Schema2.optional(Schema2.Array(StageId)),
|
|
56
|
+
after: Schema2.optional(Schema2.Array(StageId)),
|
|
57
|
+
priority: Schema2.Number.pipe(Schema2.withDecodingDefault(() => 0)),
|
|
58
|
+
protected: Schema2.Boolean.pipe(Schema2.withDecodingDefault(() => false))
|
|
59
|
+
});
|
|
60
|
+
var StageContinueResult = Schema2.Struct({
|
|
61
|
+
kind: Schema2.Literal("continue"),
|
|
62
|
+
ctx: StageContext
|
|
63
|
+
});
|
|
64
|
+
var StageAllowResult = Schema2.Struct({
|
|
65
|
+
kind: Schema2.Literal("allow")
|
|
66
|
+
});
|
|
67
|
+
var StageBlockResult = Schema2.Struct({
|
|
68
|
+
kind: Schema2.Literal("block"),
|
|
69
|
+
reason: TrimmedNonEmptyString
|
|
70
|
+
});
|
|
71
|
+
var StageResult = Schema2.Union([
|
|
72
|
+
StageContinueResult,
|
|
73
|
+
StageAllowResult,
|
|
74
|
+
StageBlockResult
|
|
75
|
+
]);
|
|
76
|
+
var StageWrapperDescriptor = Schema2.Struct({
|
|
77
|
+
id: TrimmedNonEmptyString,
|
|
78
|
+
priority: Schema2.Number.pipe(Schema2.withDecodingDefault(() => 0))
|
|
79
|
+
});
|
|
80
|
+
var StageMutationOp = Schema2.Literals(["insert", "remove", "replace", "wrap", "reorder"]);
|
|
81
|
+
var InsertStageMutation = Schema2.Struct({
|
|
82
|
+
op: Schema2.Literal("insert"),
|
|
83
|
+
stage: StageDescriptor,
|
|
84
|
+
contributedBy: Schema2.optional(TrimmedNonEmptyString)
|
|
85
|
+
});
|
|
86
|
+
var RemoveStageMutation = Schema2.Struct({
|
|
87
|
+
op: Schema2.Literal("remove"),
|
|
88
|
+
id: StageId,
|
|
89
|
+
contributedBy: Schema2.optional(TrimmedNonEmptyString)
|
|
90
|
+
});
|
|
91
|
+
var ReplaceStageMutation = Schema2.Struct({
|
|
92
|
+
op: Schema2.Literal("replace"),
|
|
93
|
+
id: StageId,
|
|
94
|
+
stage: StageDescriptor,
|
|
95
|
+
contributedBy: Schema2.optional(TrimmedNonEmptyString)
|
|
96
|
+
});
|
|
97
|
+
var WrapStageMutation = Schema2.Struct({
|
|
98
|
+
op: Schema2.Literal("wrap"),
|
|
99
|
+
id: StageId,
|
|
100
|
+
around: StageWrapperDescriptor,
|
|
101
|
+
contributedBy: Schema2.optional(TrimmedNonEmptyString)
|
|
102
|
+
});
|
|
103
|
+
var ReorderStageMutation = Schema2.Struct({
|
|
104
|
+
op: Schema2.Literal("reorder"),
|
|
105
|
+
id: StageId,
|
|
106
|
+
before: Schema2.optional(Schema2.Array(StageId)),
|
|
107
|
+
after: Schema2.optional(Schema2.Array(StageId)),
|
|
108
|
+
contributedBy: Schema2.optional(TrimmedNonEmptyString)
|
|
109
|
+
});
|
|
110
|
+
var StageMutation = Schema2.Union([
|
|
111
|
+
InsertStageMutation,
|
|
112
|
+
RemoveStageMutation,
|
|
113
|
+
ReplaceStageMutation,
|
|
114
|
+
WrapStageMutation,
|
|
115
|
+
ReorderStageMutation
|
|
116
|
+
]);
|
|
117
|
+
var ResolutionGrantUse = Schema2.Struct({
|
|
118
|
+
kind: Schema2.Literal("kernel-replacement"),
|
|
119
|
+
target: TrimmedNonEmptyString,
|
|
120
|
+
pluginId: TrimmedNonEmptyString
|
|
121
|
+
});
|
|
122
|
+
var ResolutionRecordEntry = Schema2.Struct({
|
|
123
|
+
stageId: StageId,
|
|
124
|
+
contributedBy: TrimmedNonEmptyString,
|
|
125
|
+
removedBy: Schema2.optional(TrimmedNonEmptyString),
|
|
126
|
+
replacedBy: Schema2.optional(TrimmedNonEmptyString),
|
|
127
|
+
wrappedBy: Schema2.optional(Schema2.Array(TrimmedNonEmptyString)),
|
|
128
|
+
droppedAnchors: Schema2.optional(Schema2.Array(StageId)),
|
|
129
|
+
isProtected: Schema2.Boolean
|
|
130
|
+
});
|
|
131
|
+
var ResolvedPipeline = Schema2.Struct({
|
|
132
|
+
runId: Schema2.optional(RunId),
|
|
133
|
+
order: Schema2.Array(StageId),
|
|
134
|
+
record: Schema2.Array(ResolutionRecordEntry),
|
|
135
|
+
cycles: Schema2.Array(Schema2.Array(StageId)),
|
|
136
|
+
grantUses: Schema2.optional(Schema2.Array(ResolutionGrantUse)),
|
|
137
|
+
resolvedAt: Schema2.optional(IsoDateTime)
|
|
138
|
+
});
|
|
139
|
+
var StageRunOutcome = Schema2.Struct({
|
|
140
|
+
stageId: StageId,
|
|
141
|
+
result: StageResult,
|
|
142
|
+
startedAt: IsoDateTime,
|
|
143
|
+
finishedAt: IsoDateTime
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
// packages/contracts/src/kernel.ts
|
|
147
|
+
var CapabilityTag = Schema3.Literals([
|
|
148
|
+
"kernel",
|
|
149
|
+
"journal",
|
|
150
|
+
"stage-runner",
|
|
151
|
+
"transport",
|
|
152
|
+
"loader-policy"
|
|
153
|
+
]);
|
|
154
|
+
var CapabilityProviderRef = Schema3.Struct({
|
|
155
|
+
capability: CapabilityTag,
|
|
156
|
+
pluginId: TrimmedNonEmptyString
|
|
157
|
+
});
|
|
158
|
+
var CapabilityReplacement = Schema3.Struct({
|
|
159
|
+
capability: CapabilityTag,
|
|
160
|
+
providerPluginId: TrimmedNonEmptyString
|
|
161
|
+
});
|
|
162
|
+
var CapabilityReplacementSpec = Schema3.Union([
|
|
163
|
+
CapabilityReplacement,
|
|
164
|
+
TrimmedNonEmptyString
|
|
165
|
+
]);
|
|
166
|
+
var PluginMeta = Schema3.Struct({
|
|
167
|
+
id: TrimmedNonEmptyString,
|
|
168
|
+
version: TrimmedNonEmptyString,
|
|
169
|
+
provides: Schema3.Array(CapabilityTag),
|
|
170
|
+
requires: Schema3.optional(Schema3.Array(CapabilityTag)),
|
|
171
|
+
replaces: Schema3.optional(Schema3.Array(CapabilityReplacementSpec))
|
|
172
|
+
});
|
|
173
|
+
var LoadedPluginDescriptor = Schema3.Struct({
|
|
174
|
+
meta: PluginMeta,
|
|
175
|
+
provides: Schema3.Array(CapabilityTag),
|
|
176
|
+
contributes: Schema3.Unknown,
|
|
177
|
+
runtime: Schema3.Unknown
|
|
178
|
+
});
|
|
179
|
+
var KernelReplacementGrant = Schema3.Struct({
|
|
180
|
+
pluginId: TrimmedNonEmptyString,
|
|
181
|
+
grantedBy: Schema3.optional(TrimmedNonEmptyString),
|
|
182
|
+
reason: Schema3.optional(Schema3.String)
|
|
183
|
+
});
|
|
184
|
+
var CapabilityGrants = Schema3.Struct({
|
|
185
|
+
capabilityPrecedence: Schema3.optional(Schema3.Record(Schema3.String, Schema3.Array(TrimmedNonEmptyString))),
|
|
186
|
+
kernelReplacementGrants: Schema3.optional(Schema3.Array(KernelReplacementGrant))
|
|
187
|
+
});
|
|
188
|
+
var KernelBootErrorCode = Schema3.Literals([
|
|
189
|
+
"BootIncoherent",
|
|
190
|
+
"AmbiguousCapability",
|
|
191
|
+
"MissingCapability",
|
|
192
|
+
"KernelReplacementDenied",
|
|
193
|
+
"PipelineUnresolvable"
|
|
194
|
+
]);
|
|
195
|
+
var KernelBootError = Schema3.Struct({
|
|
196
|
+
code: KernelBootErrorCode,
|
|
197
|
+
message: TrimmedNonEmptyString,
|
|
198
|
+
capability: Schema3.optional(CapabilityTag),
|
|
199
|
+
stageId: Schema3.optional(TrimmedNonEmptyString),
|
|
200
|
+
pluginIds: Schema3.optional(Schema3.Array(TrimmedNonEmptyString))
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
class BootIncoherent extends Error {
|
|
204
|
+
code = "BootIncoherent";
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
class AmbiguousCapability extends Error {
|
|
208
|
+
code = "AmbiguousCapability";
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
class MissingCapability extends Error {
|
|
212
|
+
code = "MissingCapability";
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
class KernelReplacementDenied extends Error {
|
|
216
|
+
code = "KernelReplacementDenied";
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
class PipelineUnresolvable extends Error {
|
|
220
|
+
code = "PipelineUnresolvable";
|
|
221
|
+
}
|
|
222
|
+
var CapabilityResolutionStatus = Schema3.Literals(["resolved", "ambiguous", "missing", "replaced"]);
|
|
223
|
+
var CapabilityResolutionRecord = Schema3.Struct({
|
|
224
|
+
capability: CapabilityTag,
|
|
225
|
+
status: CapabilityResolutionStatus,
|
|
226
|
+
selectedPluginId: Schema3.NullOr(TrimmedNonEmptyString),
|
|
227
|
+
candidatePluginIds: Schema3.Array(TrimmedNonEmptyString),
|
|
228
|
+
precedenceUsed: Schema3.Boolean,
|
|
229
|
+
replacementUsed: Schema3.optional(CapabilityReplacement),
|
|
230
|
+
error: Schema3.optional(Schema3.String)
|
|
231
|
+
});
|
|
232
|
+
var KernelResolutionRecord = Schema3.Struct({
|
|
233
|
+
resolvedAt: IsoDateTime,
|
|
234
|
+
capabilities: Schema3.Array(CapabilityResolutionRecord),
|
|
235
|
+
pipeline: Schema3.optional(ResolvedPipeline)
|
|
236
|
+
});
|
|
237
|
+
var BootResultDescriptor = Schema3.Struct({
|
|
238
|
+
kernelPluginId: TrimmedNonEmptyString,
|
|
239
|
+
pluginIds: Schema3.Array(TrimmedNonEmptyString),
|
|
240
|
+
resolution: KernelResolutionRecord
|
|
241
|
+
});
|
|
242
|
+
var JournalEvent = Schema3.Struct({
|
|
243
|
+
type: TrimmedNonEmptyString,
|
|
244
|
+
runId: Schema3.optional(RunId),
|
|
245
|
+
at: IsoDateTime,
|
|
246
|
+
payload: Schema3.Unknown
|
|
247
|
+
});
|
|
248
|
+
export {
|
|
249
|
+
PluginMeta,
|
|
250
|
+
PipelineUnresolvable,
|
|
251
|
+
MissingCapability,
|
|
252
|
+
LoadedPluginDescriptor,
|
|
253
|
+
KernelResolutionRecord,
|
|
254
|
+
KernelReplacementGrant,
|
|
255
|
+
KernelReplacementDenied,
|
|
256
|
+
KernelBootErrorCode,
|
|
257
|
+
KernelBootError,
|
|
258
|
+
JournalEvent,
|
|
259
|
+
CapabilityTag,
|
|
260
|
+
CapabilityResolutionStatus,
|
|
261
|
+
CapabilityResolutionRecord,
|
|
262
|
+
CapabilityReplacementSpec,
|
|
263
|
+
CapabilityReplacement,
|
|
264
|
+
CapabilityProviderRef,
|
|
265
|
+
CapabilityGrants,
|
|
266
|
+
BootResultDescriptor,
|
|
267
|
+
BootIncoherent,
|
|
268
|
+
AmbiguousCapability
|
|
269
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const MAX_KEYBINDING_VALUE_LENGTH = 64;
|
|
3
|
+
export declare const MAX_WHEN_EXPRESSION_DEPTH = 64;
|
|
4
|
+
export declare const MAX_SCRIPT_ID_LENGTH = 24;
|
|
5
|
+
export declare const MAX_KEYBINDINGS_COUNT = 256;
|
|
6
|
+
export declare const SCRIPT_RUN_COMMAND_PATTERN: Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.String, Schema.Literal<".run">]>;
|
|
7
|
+
export declare const KeybindingCommand: Schema.Union<readonly [Schema.Literals<readonly ["terminal.toggle", "terminal.split", "terminal.new", "terminal.close", "diff.toggle", "chat.new", "chat.newLocal", "editor.openFavorite"]>, Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.String, Schema.Literal<".run">]>]>;
|
|
8
|
+
export type KeybindingCommand = typeof KeybindingCommand.Type;
|
|
9
|
+
export declare const KeybindingRule: Schema.Struct<{
|
|
10
|
+
readonly key: Schema.Trim;
|
|
11
|
+
readonly command: Schema.Union<readonly [Schema.Literals<readonly ["terminal.toggle", "terminal.split", "terminal.new", "terminal.close", "diff.toggle", "chat.new", "chat.newLocal", "editor.openFavorite"]>, Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.String, Schema.Literal<".run">]>]>;
|
|
12
|
+
readonly when: Schema.optional<Schema.Trim>;
|
|
13
|
+
}>;
|
|
14
|
+
export type KeybindingRule = typeof KeybindingRule.Type;
|
|
15
|
+
export declare const KeybindingsConfig: Schema.$Array<Schema.Struct<{
|
|
16
|
+
readonly key: Schema.Trim;
|
|
17
|
+
readonly command: Schema.Union<readonly [Schema.Literals<readonly ["terminal.toggle", "terminal.split", "terminal.new", "terminal.close", "diff.toggle", "chat.new", "chat.newLocal", "editor.openFavorite"]>, Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.String, Schema.Literal<".run">]>]>;
|
|
18
|
+
readonly when: Schema.optional<Schema.Trim>;
|
|
19
|
+
}>>;
|
|
20
|
+
export type KeybindingsConfig = typeof KeybindingsConfig.Type;
|
|
21
|
+
export declare const KeybindingShortcut: Schema.Struct<{
|
|
22
|
+
readonly key: Schema.Trim;
|
|
23
|
+
readonly metaKey: Schema.Boolean;
|
|
24
|
+
readonly ctrlKey: Schema.Boolean;
|
|
25
|
+
readonly shiftKey: Schema.Boolean;
|
|
26
|
+
readonly altKey: Schema.Boolean;
|
|
27
|
+
readonly modKey: Schema.Boolean;
|
|
28
|
+
}>;
|
|
29
|
+
export type KeybindingShortcut = typeof KeybindingShortcut.Type;
|
|
30
|
+
export declare const KeybindingWhenNode: Schema.Schema<KeybindingWhenNode>;
|
|
31
|
+
export type KeybindingWhenNode = {
|
|
32
|
+
type: "identifier";
|
|
33
|
+
name: string;
|
|
34
|
+
} | {
|
|
35
|
+
type: "not";
|
|
36
|
+
node: KeybindingWhenNode;
|
|
37
|
+
} | {
|
|
38
|
+
type: "and";
|
|
39
|
+
left: KeybindingWhenNode;
|
|
40
|
+
right: KeybindingWhenNode;
|
|
41
|
+
} | {
|
|
42
|
+
type: "or";
|
|
43
|
+
left: KeybindingWhenNode;
|
|
44
|
+
right: KeybindingWhenNode;
|
|
45
|
+
};
|
|
46
|
+
export declare const ResolvedKeybindingRule: Schema.Struct<{
|
|
47
|
+
readonly command: Schema.Union<readonly [Schema.Literals<readonly ["terminal.toggle", "terminal.split", "terminal.new", "terminal.close", "diff.toggle", "chat.new", "chat.newLocal", "editor.openFavorite"]>, Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.String, Schema.Literal<".run">]>]>;
|
|
48
|
+
readonly shortcut: Schema.Struct<{
|
|
49
|
+
readonly key: Schema.Trim;
|
|
50
|
+
readonly metaKey: Schema.Boolean;
|
|
51
|
+
readonly ctrlKey: Schema.Boolean;
|
|
52
|
+
readonly shiftKey: Schema.Boolean;
|
|
53
|
+
readonly altKey: Schema.Boolean;
|
|
54
|
+
readonly modKey: Schema.Boolean;
|
|
55
|
+
}>;
|
|
56
|
+
readonly whenAst: Schema.optional<Schema.Schema<KeybindingWhenNode>>;
|
|
57
|
+
}>;
|
|
58
|
+
export type ResolvedKeybindingRule = typeof ResolvedKeybindingRule.Type;
|
|
59
|
+
export declare const ResolvedKeybindingsConfig: Schema.$Array<Schema.Struct<{
|
|
60
|
+
readonly command: Schema.Union<readonly [Schema.Literals<readonly ["terminal.toggle", "terminal.split", "terminal.new", "terminal.close", "diff.toggle", "chat.new", "chat.newLocal", "editor.openFavorite"]>, Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.String, Schema.Literal<".run">]>]>;
|
|
61
|
+
readonly shortcut: Schema.Struct<{
|
|
62
|
+
readonly key: Schema.Trim;
|
|
63
|
+
readonly metaKey: Schema.Boolean;
|
|
64
|
+
readonly ctrlKey: Schema.Boolean;
|
|
65
|
+
readonly shiftKey: Schema.Boolean;
|
|
66
|
+
readonly altKey: Schema.Boolean;
|
|
67
|
+
readonly modKey: Schema.Boolean;
|
|
68
|
+
}>;
|
|
69
|
+
readonly whenAst: Schema.optional<Schema.Schema<KeybindingWhenNode>>;
|
|
70
|
+
}>>;
|
|
71
|
+
export type ResolvedKeybindingsConfig = typeof ResolvedKeybindingsConfig.Type;
|
package/dist/src/keybindings.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,77 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { ProviderKind } from "./orchestration";
|
|
3
|
+
export declare const CODEX_REASONING_EFFORT_OPTIONS: readonly ["xhigh", "high", "medium", "low"];
|
|
4
|
+
export type CodexReasoningEffort = (typeof CODEX_REASONING_EFFORT_OPTIONS)[number];
|
|
5
|
+
export declare const CodexModelOptions: Schema.Struct<{
|
|
6
|
+
readonly reasoningEffort: Schema.optional<Schema.Literals<readonly ["xhigh", "high", "medium", "low"]>>;
|
|
7
|
+
readonly fastMode: Schema.optional<Schema.Boolean>;
|
|
8
|
+
}>;
|
|
9
|
+
export type CodexModelOptions = typeof CodexModelOptions.Type;
|
|
10
|
+
export declare const ClaudeModelOptions: Schema.Struct<{}>;
|
|
11
|
+
export type ClaudeModelOptions = typeof ClaudeModelOptions.Type;
|
|
12
|
+
export declare const ProviderModelOptions: Schema.Struct<{
|
|
13
|
+
readonly codex: Schema.optional<Schema.Struct<{
|
|
14
|
+
readonly reasoningEffort: Schema.optional<Schema.Literals<readonly ["xhigh", "high", "medium", "low"]>>;
|
|
15
|
+
readonly fastMode: Schema.optional<Schema.Boolean>;
|
|
16
|
+
}>>;
|
|
17
|
+
readonly claude: Schema.optional<Schema.Struct<{}>>;
|
|
18
|
+
}>;
|
|
19
|
+
export type ProviderModelOptions = typeof ProviderModelOptions.Type;
|
|
20
|
+
export declare const MODEL_OPTIONS_BY_PROVIDER: {
|
|
21
|
+
readonly codex: readonly [{
|
|
22
|
+
readonly slug: "gpt-5.4";
|
|
23
|
+
readonly name: "GPT-5.4";
|
|
24
|
+
}, {
|
|
25
|
+
readonly slug: "gpt-5.3-codex";
|
|
26
|
+
readonly name: "GPT-5.3 Codex";
|
|
27
|
+
}, {
|
|
28
|
+
readonly slug: "gpt-5.3-codex-spark";
|
|
29
|
+
readonly name: "GPT-5.3 Codex Spark";
|
|
30
|
+
}, {
|
|
31
|
+
readonly slug: "gpt-5.2-codex";
|
|
32
|
+
readonly name: "GPT-5.2 Codex";
|
|
33
|
+
}, {
|
|
34
|
+
readonly slug: "gpt-5.2";
|
|
35
|
+
readonly name: "GPT-5.2";
|
|
36
|
+
}];
|
|
37
|
+
readonly claude: readonly [{
|
|
38
|
+
readonly slug: "claude-sonnet-4-6";
|
|
39
|
+
readonly name: "Claude Sonnet 4.6";
|
|
40
|
+
}, {
|
|
41
|
+
readonly slug: "claude-opus-4-1";
|
|
42
|
+
readonly name: "Claude Opus 4.1";
|
|
43
|
+
}, {
|
|
44
|
+
readonly slug: "claude-3-7-sonnet-latest";
|
|
45
|
+
readonly name: "Claude 3.7 Sonnet";
|
|
46
|
+
}];
|
|
47
|
+
};
|
|
48
|
+
export type ModelOptionsByProvider = typeof MODEL_OPTIONS_BY_PROVIDER;
|
|
49
|
+
type BuiltInModelSlug = ModelOptionsByProvider[ProviderKind][number]["slug"];
|
|
50
|
+
export type ModelSlug = BuiltInModelSlug | (string & {});
|
|
51
|
+
export declare const DEFAULT_MODEL_BY_PROVIDER: {
|
|
52
|
+
readonly codex: "gpt-5.4";
|
|
53
|
+
readonly claude: "claude-sonnet-4-6";
|
|
54
|
+
};
|
|
55
|
+
export declare const MODEL_SLUG_ALIASES_BY_PROVIDER: {
|
|
56
|
+
readonly codex: {
|
|
57
|
+
readonly "5.4": "gpt-5.4";
|
|
58
|
+
readonly "5.3": "gpt-5.3-codex";
|
|
59
|
+
readonly "gpt-5.3": "gpt-5.3-codex";
|
|
60
|
+
readonly "5.3-spark": "gpt-5.3-codex-spark";
|
|
61
|
+
readonly "gpt-5.3-spark": "gpt-5.3-codex-spark";
|
|
62
|
+
};
|
|
63
|
+
readonly claude: {
|
|
64
|
+
readonly sonnet: "claude-sonnet-4-6";
|
|
65
|
+
readonly opus: "claude-opus-4-1";
|
|
66
|
+
readonly "3.7-sonnet": "claude-3-7-sonnet-latest";
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export declare const REASONING_EFFORT_OPTIONS_BY_PROVIDER: {
|
|
70
|
+
readonly codex: readonly ["xhigh", "high", "medium", "low"];
|
|
71
|
+
readonly claude: readonly [];
|
|
72
|
+
};
|
|
73
|
+
export declare const DEFAULT_REASONING_EFFORT_BY_PROVIDER: {
|
|
74
|
+
readonly codex: "high";
|
|
75
|
+
readonly claude: null;
|
|
76
|
+
};
|
|
77
|
+
export {};
|