@h-rig/contracts 0.0.6-alpha.0
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/README.md +14 -0
- package/dist/src/artifact.js +53 -0
- package/dist/src/baseSchemas.js +66 -0
- package/dist/src/config.js +214 -0
- package/dist/src/conversation.js +95 -0
- package/dist/src/editor.js +55 -0
- package/dist/src/engine.js +2278 -0
- package/dist/src/git.js +193 -0
- package/dist/src/graph.js +93 -0
- package/dist/src/index.js +4545 -0
- package/dist/src/ipc.js +1 -0
- package/dist/src/keybindings.js +119 -0
- package/dist/src/model.js +64 -0
- package/dist/src/orchestration.js +1031 -0
- package/dist/src/plugin.js +102 -0
- package/dist/src/policy.js +56 -0
- package/dist/src/project.js +107 -0
- package/dist/src/provider.js +1013 -0
- package/dist/src/providerRuntime.js +1630 -0
- package/dist/src/remote.js +1474 -0
- package/dist/src/review.js +58 -0
- package/dist/src/rig.js +2374 -0
- package/dist/src/runtime.js +1043 -0
- package/dist/src/server.js +1053 -0
- package/dist/src/serviceFabric.js +1066 -0
- package/dist/src/task-source.js +1 -0
- package/dist/src/terminal.js +158 -0
- package/dist/src/validation.js +60 -0
- package/dist/src/workspace.js +1030 -0
- package/dist/src/ws.js +2968 -0
- package/package.json +28 -0
|
@@ -0,0 +1,4545 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/contracts/src/baseSchemas.ts
|
|
3
|
+
import { Schema } from "effect";
|
|
4
|
+
var TrimmedString = Schema.Trim;
|
|
5
|
+
var TrimmedNonEmptyString = TrimmedString.check(Schema.isNonEmpty());
|
|
6
|
+
var NonNegativeInt = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
|
|
7
|
+
var PositiveInt = Schema.Int.check(Schema.isGreaterThanOrEqualTo(1));
|
|
8
|
+
var IsoDateTime = Schema.String;
|
|
9
|
+
var makeEntityId = (brand) => TrimmedNonEmptyString.pipe(Schema.brand(brand));
|
|
10
|
+
var ThreadId = makeEntityId("ThreadId");
|
|
11
|
+
var ProjectId = makeEntityId("ProjectId");
|
|
12
|
+
var WorkspaceId = makeEntityId("WorkspaceId");
|
|
13
|
+
var GraphId = makeEntityId("GraphId");
|
|
14
|
+
var TaskId = makeEntityId("TaskId");
|
|
15
|
+
var RunId = makeEntityId("RunId");
|
|
16
|
+
var EngineRuntimeId = makeEntityId("EngineRuntimeId");
|
|
17
|
+
var ConversationId = makeEntityId("ConversationId");
|
|
18
|
+
var ActionId = makeEntityId("ActionId");
|
|
19
|
+
var ArtifactId = makeEntityId("ArtifactId");
|
|
20
|
+
var WorktreeId = makeEntityId("WorktreeId");
|
|
21
|
+
var ValidationResultId = makeEntityId("ValidationResultId");
|
|
22
|
+
var ReviewResultId = makeEntityId("ReviewResultId");
|
|
23
|
+
var CommandId = makeEntityId("CommandId");
|
|
24
|
+
var EventId = makeEntityId("EventId");
|
|
25
|
+
var MessageId = makeEntityId("MessageId");
|
|
26
|
+
var TurnId = makeEntityId("TurnId");
|
|
27
|
+
var ProviderItemId = makeEntityId("ProviderItemId");
|
|
28
|
+
var RuntimeSessionId = makeEntityId("RuntimeSessionId");
|
|
29
|
+
var RuntimeItemId = makeEntityId("RuntimeItemId");
|
|
30
|
+
var RuntimeRequestId = makeEntityId("RuntimeRequestId");
|
|
31
|
+
var RuntimeTaskId = makeEntityId("RuntimeTaskId");
|
|
32
|
+
var ApprovalRequestId = makeEntityId("ApprovalRequestId");
|
|
33
|
+
var CheckpointRef = makeEntityId("CheckpointRef");
|
|
34
|
+
var RemoteEndpointId = makeEntityId("RemoteEndpointId");
|
|
35
|
+
// packages/contracts/src/workspace.ts
|
|
36
|
+
import { Schema as Schema4 } from "effect";
|
|
37
|
+
|
|
38
|
+
// packages/contracts/src/orchestration.ts
|
|
39
|
+
import { Option, Schema as Schema3, SchemaIssue, Struct } from "effect";
|
|
40
|
+
|
|
41
|
+
// packages/contracts/src/model.ts
|
|
42
|
+
import { Schema as Schema2 } from "effect";
|
|
43
|
+
var CODEX_REASONING_EFFORT_OPTIONS = ["xhigh", "high", "medium", "low"];
|
|
44
|
+
var CodexModelOptions = Schema2.Struct({
|
|
45
|
+
reasoningEffort: Schema2.optional(Schema2.Literals(CODEX_REASONING_EFFORT_OPTIONS)),
|
|
46
|
+
fastMode: Schema2.optional(Schema2.Boolean)
|
|
47
|
+
});
|
|
48
|
+
var ClaudeModelOptions = Schema2.Struct({});
|
|
49
|
+
var ProviderModelOptions = Schema2.Struct({
|
|
50
|
+
codex: Schema2.optional(CodexModelOptions),
|
|
51
|
+
claude: Schema2.optional(ClaudeModelOptions)
|
|
52
|
+
});
|
|
53
|
+
var MODEL_OPTIONS_BY_PROVIDER = {
|
|
54
|
+
codex: [
|
|
55
|
+
{ slug: "gpt-5.4", name: "GPT-5.4" },
|
|
56
|
+
{ slug: "gpt-5.3-codex", name: "GPT-5.3 Codex" },
|
|
57
|
+
{ slug: "gpt-5.3-codex-spark", name: "GPT-5.3 Codex Spark" },
|
|
58
|
+
{ slug: "gpt-5.2-codex", name: "GPT-5.2 Codex" },
|
|
59
|
+
{ slug: "gpt-5.2", name: "GPT-5.2" }
|
|
60
|
+
],
|
|
61
|
+
claude: [
|
|
62
|
+
{ slug: "claude-sonnet-4-6", name: "Claude Sonnet 4.6" },
|
|
63
|
+
{ slug: "claude-opus-4-1", name: "Claude Opus 4.1" },
|
|
64
|
+
{ slug: "claude-3-7-sonnet-latest", name: "Claude 3.7 Sonnet" }
|
|
65
|
+
]
|
|
66
|
+
};
|
|
67
|
+
var DEFAULT_MODEL_BY_PROVIDER = {
|
|
68
|
+
codex: "gpt-5.4",
|
|
69
|
+
claude: "claude-sonnet-4-6"
|
|
70
|
+
};
|
|
71
|
+
var MODEL_SLUG_ALIASES_BY_PROVIDER = {
|
|
72
|
+
codex: {
|
|
73
|
+
"5.4": "gpt-5.4",
|
|
74
|
+
"5.3": "gpt-5.3-codex",
|
|
75
|
+
"gpt-5.3": "gpt-5.3-codex",
|
|
76
|
+
"5.3-spark": "gpt-5.3-codex-spark",
|
|
77
|
+
"gpt-5.3-spark": "gpt-5.3-codex-spark"
|
|
78
|
+
},
|
|
79
|
+
claude: {
|
|
80
|
+
sonnet: "claude-sonnet-4-6",
|
|
81
|
+
opus: "claude-opus-4-1",
|
|
82
|
+
"3.7-sonnet": "claude-3-7-sonnet-latest"
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
var REASONING_EFFORT_OPTIONS_BY_PROVIDER = {
|
|
86
|
+
codex: CODEX_REASONING_EFFORT_OPTIONS,
|
|
87
|
+
claude: []
|
|
88
|
+
};
|
|
89
|
+
var DEFAULT_REASONING_EFFORT_BY_PROVIDER = {
|
|
90
|
+
codex: "high",
|
|
91
|
+
claude: null
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// packages/contracts/src/orchestration.ts
|
|
95
|
+
var ORCHESTRATION_WS_METHODS = {
|
|
96
|
+
getSnapshot: "orchestration.getSnapshot",
|
|
97
|
+
dispatchCommand: "orchestration.dispatchCommand",
|
|
98
|
+
getTurnDiff: "orchestration.getTurnDiff",
|
|
99
|
+
getFullThreadDiff: "orchestration.getFullThreadDiff",
|
|
100
|
+
replayEvents: "orchestration.replayEvents"
|
|
101
|
+
};
|
|
102
|
+
var ORCHESTRATION_WS_CHANNELS = {
|
|
103
|
+
domainEvent: "orchestration.domainEvent"
|
|
104
|
+
};
|
|
105
|
+
var ProviderKind = Schema3.Literals(["codex", "claude"]);
|
|
106
|
+
var ProviderApprovalPolicy = Schema3.Literals([
|
|
107
|
+
"untrusted",
|
|
108
|
+
"on-failure",
|
|
109
|
+
"on-request",
|
|
110
|
+
"never"
|
|
111
|
+
]);
|
|
112
|
+
var ProviderSandboxMode = Schema3.Literals([
|
|
113
|
+
"read-only",
|
|
114
|
+
"workspace-write",
|
|
115
|
+
"danger-full-access"
|
|
116
|
+
]);
|
|
117
|
+
var ProviderServiceTier = Schema3.Literals(["fast", "flex"]);
|
|
118
|
+
var DEFAULT_PROVIDER_KIND = "codex";
|
|
119
|
+
var RuntimeMode = Schema3.Literals(["approval-required", "full-access"]);
|
|
120
|
+
var DEFAULT_RUNTIME_MODE = "full-access";
|
|
121
|
+
var ProviderInteractionMode = Schema3.Literals(["default", "plan"]);
|
|
122
|
+
var DEFAULT_PROVIDER_INTERACTION_MODE = "default";
|
|
123
|
+
var ProviderRequestKind = Schema3.Literals(["command", "file-read", "file-change"]);
|
|
124
|
+
var AssistantDeliveryMode = Schema3.Literals(["buffered", "streaming"]);
|
|
125
|
+
var ProviderApprovalDecision = Schema3.Literals([
|
|
126
|
+
"accept",
|
|
127
|
+
"acceptForSession",
|
|
128
|
+
"decline",
|
|
129
|
+
"cancel"
|
|
130
|
+
]);
|
|
131
|
+
var ProviderUserInputAnswers = Schema3.Record(Schema3.String, Schema3.Unknown);
|
|
132
|
+
var PROVIDER_SEND_TURN_MAX_INPUT_CHARS = 120000;
|
|
133
|
+
var PROVIDER_SEND_TURN_MAX_ATTACHMENTS = 8;
|
|
134
|
+
var PROVIDER_SEND_TURN_MAX_IMAGE_BYTES = 10 * 1024 * 1024;
|
|
135
|
+
var PROVIDER_SEND_TURN_MAX_IMAGE_DATA_URL_CHARS = 14000000;
|
|
136
|
+
var CHAT_ATTACHMENT_ID_MAX_CHARS = 128;
|
|
137
|
+
var CorrelationId = CommandId;
|
|
138
|
+
var ChatAttachmentId = TrimmedNonEmptyString.check(Schema3.isMaxLength(CHAT_ATTACHMENT_ID_MAX_CHARS), Schema3.isPattern(/^[a-z0-9_-]+$/i));
|
|
139
|
+
var ChatImageAttachment = Schema3.Struct({
|
|
140
|
+
type: Schema3.Literal("image"),
|
|
141
|
+
id: ChatAttachmentId,
|
|
142
|
+
name: TrimmedNonEmptyString.check(Schema3.isMaxLength(255)),
|
|
143
|
+
mimeType: TrimmedNonEmptyString.check(Schema3.isMaxLength(100), Schema3.isPattern(/^image\//i)),
|
|
144
|
+
sizeBytes: NonNegativeInt.check(Schema3.isLessThanOrEqualTo(PROVIDER_SEND_TURN_MAX_IMAGE_BYTES))
|
|
145
|
+
});
|
|
146
|
+
var UploadChatImageAttachment = Schema3.Struct({
|
|
147
|
+
type: Schema3.Literal("image"),
|
|
148
|
+
name: TrimmedNonEmptyString.check(Schema3.isMaxLength(255)),
|
|
149
|
+
mimeType: TrimmedNonEmptyString.check(Schema3.isMaxLength(100), Schema3.isPattern(/^image\//i)),
|
|
150
|
+
sizeBytes: NonNegativeInt.check(Schema3.isLessThanOrEqualTo(PROVIDER_SEND_TURN_MAX_IMAGE_BYTES)),
|
|
151
|
+
dataUrl: TrimmedNonEmptyString.check(Schema3.isMaxLength(PROVIDER_SEND_TURN_MAX_IMAGE_DATA_URL_CHARS))
|
|
152
|
+
});
|
|
153
|
+
var ChatAttachment = Schema3.Union([ChatImageAttachment]);
|
|
154
|
+
var UploadChatAttachment = Schema3.Union([UploadChatImageAttachment]);
|
|
155
|
+
var ProjectScriptIcon = Schema3.Literals([
|
|
156
|
+
"play",
|
|
157
|
+
"test",
|
|
158
|
+
"lint",
|
|
159
|
+
"configure",
|
|
160
|
+
"build",
|
|
161
|
+
"debug"
|
|
162
|
+
]);
|
|
163
|
+
var ProjectScript = Schema3.Struct({
|
|
164
|
+
id: TrimmedNonEmptyString,
|
|
165
|
+
name: TrimmedNonEmptyString,
|
|
166
|
+
command: TrimmedNonEmptyString,
|
|
167
|
+
icon: ProjectScriptIcon,
|
|
168
|
+
runOnWorktreeCreate: Schema3.Boolean
|
|
169
|
+
});
|
|
170
|
+
var OrchestrationProject = Schema3.Struct({
|
|
171
|
+
id: ProjectId,
|
|
172
|
+
title: TrimmedNonEmptyString,
|
|
173
|
+
workspaceRoot: TrimmedNonEmptyString,
|
|
174
|
+
defaultModel: Schema3.NullOr(TrimmedNonEmptyString),
|
|
175
|
+
scripts: Schema3.Array(ProjectScript),
|
|
176
|
+
createdAt: IsoDateTime,
|
|
177
|
+
updatedAt: IsoDateTime,
|
|
178
|
+
deletedAt: Schema3.NullOr(IsoDateTime)
|
|
179
|
+
});
|
|
180
|
+
var OrchestrationMessageRole = Schema3.Literals(["user", "assistant", "system"]);
|
|
181
|
+
var OrchestrationMessage = Schema3.Struct({
|
|
182
|
+
id: MessageId,
|
|
183
|
+
role: OrchestrationMessageRole,
|
|
184
|
+
text: Schema3.String,
|
|
185
|
+
attachments: Schema3.optional(Schema3.Array(ChatAttachment)),
|
|
186
|
+
turnId: Schema3.NullOr(TurnId),
|
|
187
|
+
streaming: Schema3.Boolean,
|
|
188
|
+
createdAt: IsoDateTime,
|
|
189
|
+
updatedAt: IsoDateTime
|
|
190
|
+
});
|
|
191
|
+
var OrchestrationProposedPlanId = TrimmedNonEmptyString;
|
|
192
|
+
var OrchestrationProposedPlan = Schema3.Struct({
|
|
193
|
+
id: OrchestrationProposedPlanId,
|
|
194
|
+
turnId: Schema3.NullOr(TurnId),
|
|
195
|
+
planMarkdown: TrimmedNonEmptyString,
|
|
196
|
+
createdAt: IsoDateTime,
|
|
197
|
+
updatedAt: IsoDateTime
|
|
198
|
+
});
|
|
199
|
+
var OrchestrationSessionStatus = Schema3.Literals([
|
|
200
|
+
"idle",
|
|
201
|
+
"starting",
|
|
202
|
+
"running",
|
|
203
|
+
"ready",
|
|
204
|
+
"interrupted",
|
|
205
|
+
"stopped",
|
|
206
|
+
"error"
|
|
207
|
+
]);
|
|
208
|
+
var OrchestrationSession = Schema3.Struct({
|
|
209
|
+
threadId: ThreadId,
|
|
210
|
+
status: OrchestrationSessionStatus,
|
|
211
|
+
providerName: Schema3.NullOr(TrimmedNonEmptyString),
|
|
212
|
+
runtimeMode: RuntimeMode.pipe(Schema3.withDecodingDefault(() => DEFAULT_RUNTIME_MODE)),
|
|
213
|
+
activeTurnId: Schema3.NullOr(TurnId),
|
|
214
|
+
lastError: Schema3.NullOr(TrimmedNonEmptyString),
|
|
215
|
+
updatedAt: IsoDateTime
|
|
216
|
+
});
|
|
217
|
+
var OrchestrationCheckpointFile = Schema3.Struct({
|
|
218
|
+
path: TrimmedNonEmptyString,
|
|
219
|
+
kind: TrimmedNonEmptyString,
|
|
220
|
+
additions: NonNegativeInt,
|
|
221
|
+
deletions: NonNegativeInt
|
|
222
|
+
});
|
|
223
|
+
var OrchestrationCheckpointStatus = Schema3.Literals(["ready", "missing", "error"]);
|
|
224
|
+
var OrchestrationCheckpointSummary = Schema3.Struct({
|
|
225
|
+
turnId: TurnId,
|
|
226
|
+
checkpointTurnCount: NonNegativeInt,
|
|
227
|
+
checkpointRef: CheckpointRef,
|
|
228
|
+
status: OrchestrationCheckpointStatus,
|
|
229
|
+
files: Schema3.Array(OrchestrationCheckpointFile),
|
|
230
|
+
assistantMessageId: Schema3.NullOr(MessageId),
|
|
231
|
+
completedAt: IsoDateTime
|
|
232
|
+
});
|
|
233
|
+
var OrchestrationThreadActivityTone = Schema3.Literals([
|
|
234
|
+
"info",
|
|
235
|
+
"tool",
|
|
236
|
+
"approval",
|
|
237
|
+
"error"
|
|
238
|
+
]);
|
|
239
|
+
var OrchestrationThreadActivity = Schema3.Struct({
|
|
240
|
+
id: EventId,
|
|
241
|
+
tone: OrchestrationThreadActivityTone,
|
|
242
|
+
kind: TrimmedNonEmptyString,
|
|
243
|
+
summary: TrimmedNonEmptyString,
|
|
244
|
+
payload: Schema3.Unknown,
|
|
245
|
+
turnId: Schema3.NullOr(TurnId),
|
|
246
|
+
sequence: Schema3.optional(NonNegativeInt),
|
|
247
|
+
createdAt: IsoDateTime
|
|
248
|
+
});
|
|
249
|
+
var OrchestrationLatestTurnState = Schema3.Literals([
|
|
250
|
+
"running",
|
|
251
|
+
"interrupted",
|
|
252
|
+
"completed",
|
|
253
|
+
"error"
|
|
254
|
+
]);
|
|
255
|
+
var OrchestrationLatestTurn = Schema3.Struct({
|
|
256
|
+
turnId: TurnId,
|
|
257
|
+
state: OrchestrationLatestTurnState,
|
|
258
|
+
requestedAt: IsoDateTime,
|
|
259
|
+
startedAt: Schema3.NullOr(IsoDateTime),
|
|
260
|
+
completedAt: Schema3.NullOr(IsoDateTime),
|
|
261
|
+
assistantMessageId: Schema3.NullOr(MessageId)
|
|
262
|
+
});
|
|
263
|
+
var OrchestrationThread = Schema3.Struct({
|
|
264
|
+
id: ThreadId,
|
|
265
|
+
projectId: ProjectId,
|
|
266
|
+
title: TrimmedNonEmptyString,
|
|
267
|
+
model: TrimmedNonEmptyString,
|
|
268
|
+
runtimeMode: RuntimeMode,
|
|
269
|
+
interactionMode: ProviderInteractionMode.pipe(Schema3.withDecodingDefault(() => DEFAULT_PROVIDER_INTERACTION_MODE)),
|
|
270
|
+
branch: Schema3.NullOr(TrimmedNonEmptyString),
|
|
271
|
+
worktreePath: Schema3.NullOr(TrimmedNonEmptyString),
|
|
272
|
+
latestTurn: Schema3.NullOr(OrchestrationLatestTurn),
|
|
273
|
+
createdAt: IsoDateTime,
|
|
274
|
+
updatedAt: IsoDateTime,
|
|
275
|
+
deletedAt: Schema3.NullOr(IsoDateTime),
|
|
276
|
+
messages: Schema3.Array(OrchestrationMessage),
|
|
277
|
+
proposedPlans: Schema3.Array(OrchestrationProposedPlan).pipe(Schema3.withDecodingDefault(() => [])),
|
|
278
|
+
activities: Schema3.Array(OrchestrationThreadActivity),
|
|
279
|
+
checkpoints: Schema3.Array(OrchestrationCheckpointSummary),
|
|
280
|
+
session: Schema3.NullOr(OrchestrationSession)
|
|
281
|
+
});
|
|
282
|
+
var OrchestrationReadModel = Schema3.Struct({
|
|
283
|
+
snapshotSequence: NonNegativeInt,
|
|
284
|
+
projects: Schema3.Array(OrchestrationProject),
|
|
285
|
+
threads: Schema3.Array(OrchestrationThread),
|
|
286
|
+
updatedAt: IsoDateTime
|
|
287
|
+
});
|
|
288
|
+
var ProjectCreateCommand = Schema3.Struct({
|
|
289
|
+
type: Schema3.Literal("project.create"),
|
|
290
|
+
commandId: CommandId,
|
|
291
|
+
projectId: ProjectId,
|
|
292
|
+
title: TrimmedNonEmptyString,
|
|
293
|
+
workspaceRoot: TrimmedNonEmptyString,
|
|
294
|
+
defaultModel: Schema3.optional(TrimmedNonEmptyString),
|
|
295
|
+
createdAt: IsoDateTime
|
|
296
|
+
});
|
|
297
|
+
var ProjectMetaUpdateCommand = Schema3.Struct({
|
|
298
|
+
type: Schema3.Literal("project.meta.update"),
|
|
299
|
+
commandId: CommandId,
|
|
300
|
+
projectId: ProjectId,
|
|
301
|
+
title: Schema3.optional(TrimmedNonEmptyString),
|
|
302
|
+
workspaceRoot: Schema3.optional(TrimmedNonEmptyString),
|
|
303
|
+
defaultModel: Schema3.optional(TrimmedNonEmptyString),
|
|
304
|
+
scripts: Schema3.optional(Schema3.Array(ProjectScript))
|
|
305
|
+
});
|
|
306
|
+
var ProjectDeleteCommand = Schema3.Struct({
|
|
307
|
+
type: Schema3.Literal("project.delete"),
|
|
308
|
+
commandId: CommandId,
|
|
309
|
+
projectId: ProjectId
|
|
310
|
+
});
|
|
311
|
+
var ThreadCreateCommand = Schema3.Struct({
|
|
312
|
+
type: Schema3.Literal("thread.create"),
|
|
313
|
+
commandId: CommandId,
|
|
314
|
+
threadId: ThreadId,
|
|
315
|
+
projectId: ProjectId,
|
|
316
|
+
title: TrimmedNonEmptyString,
|
|
317
|
+
model: TrimmedNonEmptyString,
|
|
318
|
+
runtimeMode: RuntimeMode,
|
|
319
|
+
interactionMode: ProviderInteractionMode.pipe(Schema3.withDecodingDefault(() => DEFAULT_PROVIDER_INTERACTION_MODE)),
|
|
320
|
+
branch: Schema3.NullOr(TrimmedNonEmptyString),
|
|
321
|
+
worktreePath: Schema3.NullOr(TrimmedNonEmptyString),
|
|
322
|
+
createdAt: IsoDateTime
|
|
323
|
+
});
|
|
324
|
+
var ThreadDeleteCommand = Schema3.Struct({
|
|
325
|
+
type: Schema3.Literal("thread.delete"),
|
|
326
|
+
commandId: CommandId,
|
|
327
|
+
threadId: ThreadId
|
|
328
|
+
});
|
|
329
|
+
var ThreadMetaUpdateCommand = Schema3.Struct({
|
|
330
|
+
type: Schema3.Literal("thread.meta.update"),
|
|
331
|
+
commandId: CommandId,
|
|
332
|
+
threadId: ThreadId,
|
|
333
|
+
title: Schema3.optional(TrimmedNonEmptyString),
|
|
334
|
+
model: Schema3.optional(TrimmedNonEmptyString),
|
|
335
|
+
branch: Schema3.optional(Schema3.NullOr(TrimmedNonEmptyString)),
|
|
336
|
+
worktreePath: Schema3.optional(Schema3.NullOr(TrimmedNonEmptyString))
|
|
337
|
+
});
|
|
338
|
+
var ThreadRuntimeModeSetCommand = Schema3.Struct({
|
|
339
|
+
type: Schema3.Literal("thread.runtime-mode.set"),
|
|
340
|
+
commandId: CommandId,
|
|
341
|
+
threadId: ThreadId,
|
|
342
|
+
runtimeMode: RuntimeMode,
|
|
343
|
+
createdAt: IsoDateTime
|
|
344
|
+
});
|
|
345
|
+
var ThreadInteractionModeSetCommand = Schema3.Struct({
|
|
346
|
+
type: Schema3.Literal("thread.interaction-mode.set"),
|
|
347
|
+
commandId: CommandId,
|
|
348
|
+
threadId: ThreadId,
|
|
349
|
+
interactionMode: ProviderInteractionMode,
|
|
350
|
+
createdAt: IsoDateTime
|
|
351
|
+
});
|
|
352
|
+
var ThreadTurnStartCommand = Schema3.Struct({
|
|
353
|
+
type: Schema3.Literal("thread.turn.start"),
|
|
354
|
+
commandId: CommandId,
|
|
355
|
+
threadId: ThreadId,
|
|
356
|
+
message: Schema3.Struct({
|
|
357
|
+
messageId: MessageId,
|
|
358
|
+
role: Schema3.Literal("user"),
|
|
359
|
+
text: Schema3.String,
|
|
360
|
+
attachments: Schema3.Array(ChatAttachment)
|
|
361
|
+
}),
|
|
362
|
+
provider: Schema3.optional(ProviderKind),
|
|
363
|
+
model: Schema3.optional(TrimmedNonEmptyString),
|
|
364
|
+
serviceTier: Schema3.optional(Schema3.NullOr(ProviderServiceTier)),
|
|
365
|
+
modelOptions: Schema3.optional(ProviderModelOptions),
|
|
366
|
+
assistantDeliveryMode: Schema3.optional(AssistantDeliveryMode),
|
|
367
|
+
runtimeMode: RuntimeMode.pipe(Schema3.withDecodingDefault(() => DEFAULT_RUNTIME_MODE)),
|
|
368
|
+
interactionMode: ProviderInteractionMode.pipe(Schema3.withDecodingDefault(() => DEFAULT_PROVIDER_INTERACTION_MODE)),
|
|
369
|
+
createdAt: IsoDateTime
|
|
370
|
+
});
|
|
371
|
+
var ClientThreadTurnStartCommand = Schema3.Struct({
|
|
372
|
+
type: Schema3.Literal("thread.turn.start"),
|
|
373
|
+
commandId: CommandId,
|
|
374
|
+
threadId: ThreadId,
|
|
375
|
+
message: Schema3.Struct({
|
|
376
|
+
messageId: MessageId,
|
|
377
|
+
role: Schema3.Literal("user"),
|
|
378
|
+
text: Schema3.String,
|
|
379
|
+
attachments: Schema3.Array(UploadChatAttachment)
|
|
380
|
+
}),
|
|
381
|
+
provider: Schema3.optional(ProviderKind),
|
|
382
|
+
model: Schema3.optional(TrimmedNonEmptyString),
|
|
383
|
+
serviceTier: Schema3.optional(Schema3.NullOr(ProviderServiceTier)),
|
|
384
|
+
modelOptions: Schema3.optional(ProviderModelOptions),
|
|
385
|
+
assistantDeliveryMode: Schema3.optional(AssistantDeliveryMode),
|
|
386
|
+
runtimeMode: RuntimeMode,
|
|
387
|
+
interactionMode: ProviderInteractionMode,
|
|
388
|
+
createdAt: IsoDateTime
|
|
389
|
+
});
|
|
390
|
+
var ThreadTurnInterruptCommand = Schema3.Struct({
|
|
391
|
+
type: Schema3.Literal("thread.turn.interrupt"),
|
|
392
|
+
commandId: CommandId,
|
|
393
|
+
threadId: ThreadId,
|
|
394
|
+
turnId: Schema3.optional(TurnId),
|
|
395
|
+
createdAt: IsoDateTime
|
|
396
|
+
});
|
|
397
|
+
var ThreadApprovalRespondCommand = Schema3.Struct({
|
|
398
|
+
type: Schema3.Literal("thread.approval.respond"),
|
|
399
|
+
commandId: CommandId,
|
|
400
|
+
threadId: ThreadId,
|
|
401
|
+
requestId: ApprovalRequestId,
|
|
402
|
+
decision: ProviderApprovalDecision,
|
|
403
|
+
createdAt: IsoDateTime
|
|
404
|
+
});
|
|
405
|
+
var ThreadUserInputRespondCommand = Schema3.Struct({
|
|
406
|
+
type: Schema3.Literal("thread.user-input.respond"),
|
|
407
|
+
commandId: CommandId,
|
|
408
|
+
threadId: ThreadId,
|
|
409
|
+
requestId: ApprovalRequestId,
|
|
410
|
+
answers: ProviderUserInputAnswers,
|
|
411
|
+
createdAt: IsoDateTime
|
|
412
|
+
});
|
|
413
|
+
var ThreadCheckpointRevertCommand = Schema3.Struct({
|
|
414
|
+
type: Schema3.Literal("thread.checkpoint.revert"),
|
|
415
|
+
commandId: CommandId,
|
|
416
|
+
threadId: ThreadId,
|
|
417
|
+
turnCount: NonNegativeInt,
|
|
418
|
+
createdAt: IsoDateTime
|
|
419
|
+
});
|
|
420
|
+
var ThreadSessionStopCommand = Schema3.Struct({
|
|
421
|
+
type: Schema3.Literal("thread.session.stop"),
|
|
422
|
+
commandId: CommandId,
|
|
423
|
+
threadId: ThreadId,
|
|
424
|
+
createdAt: IsoDateTime
|
|
425
|
+
});
|
|
426
|
+
var DispatchableClientOrchestrationCommand = Schema3.Union([
|
|
427
|
+
ProjectCreateCommand,
|
|
428
|
+
ProjectMetaUpdateCommand,
|
|
429
|
+
ProjectDeleteCommand,
|
|
430
|
+
ThreadCreateCommand,
|
|
431
|
+
ThreadDeleteCommand,
|
|
432
|
+
ThreadMetaUpdateCommand,
|
|
433
|
+
ThreadRuntimeModeSetCommand,
|
|
434
|
+
ThreadInteractionModeSetCommand,
|
|
435
|
+
ThreadTurnStartCommand,
|
|
436
|
+
ThreadTurnInterruptCommand,
|
|
437
|
+
ThreadApprovalRespondCommand,
|
|
438
|
+
ThreadUserInputRespondCommand,
|
|
439
|
+
ThreadCheckpointRevertCommand,
|
|
440
|
+
ThreadSessionStopCommand
|
|
441
|
+
]);
|
|
442
|
+
var ClientOrchestrationCommand = Schema3.Union([
|
|
443
|
+
ProjectCreateCommand,
|
|
444
|
+
ProjectMetaUpdateCommand,
|
|
445
|
+
ProjectDeleteCommand,
|
|
446
|
+
ThreadCreateCommand,
|
|
447
|
+
ThreadDeleteCommand,
|
|
448
|
+
ThreadMetaUpdateCommand,
|
|
449
|
+
ThreadRuntimeModeSetCommand,
|
|
450
|
+
ThreadInteractionModeSetCommand,
|
|
451
|
+
ClientThreadTurnStartCommand,
|
|
452
|
+
ThreadTurnInterruptCommand,
|
|
453
|
+
ThreadApprovalRespondCommand,
|
|
454
|
+
ThreadUserInputRespondCommand,
|
|
455
|
+
ThreadCheckpointRevertCommand,
|
|
456
|
+
ThreadSessionStopCommand
|
|
457
|
+
]);
|
|
458
|
+
var ThreadSessionSetCommand = Schema3.Struct({
|
|
459
|
+
type: Schema3.Literal("thread.session.set"),
|
|
460
|
+
commandId: CommandId,
|
|
461
|
+
threadId: ThreadId,
|
|
462
|
+
session: OrchestrationSession,
|
|
463
|
+
createdAt: IsoDateTime
|
|
464
|
+
});
|
|
465
|
+
var ThreadMessageAssistantDeltaCommand = Schema3.Struct({
|
|
466
|
+
type: Schema3.Literal("thread.message.assistant.delta"),
|
|
467
|
+
commandId: CommandId,
|
|
468
|
+
threadId: ThreadId,
|
|
469
|
+
messageId: MessageId,
|
|
470
|
+
delta: Schema3.String,
|
|
471
|
+
turnId: Schema3.optional(TurnId),
|
|
472
|
+
createdAt: IsoDateTime
|
|
473
|
+
});
|
|
474
|
+
var ThreadMessageAssistantCompleteCommand = Schema3.Struct({
|
|
475
|
+
type: Schema3.Literal("thread.message.assistant.complete"),
|
|
476
|
+
commandId: CommandId,
|
|
477
|
+
threadId: ThreadId,
|
|
478
|
+
messageId: MessageId,
|
|
479
|
+
turnId: Schema3.optional(TurnId),
|
|
480
|
+
createdAt: IsoDateTime
|
|
481
|
+
});
|
|
482
|
+
var ThreadProposedPlanUpsertCommand = Schema3.Struct({
|
|
483
|
+
type: Schema3.Literal("thread.proposed-plan.upsert"),
|
|
484
|
+
commandId: CommandId,
|
|
485
|
+
threadId: ThreadId,
|
|
486
|
+
proposedPlan: OrchestrationProposedPlan,
|
|
487
|
+
createdAt: IsoDateTime
|
|
488
|
+
});
|
|
489
|
+
var ThreadTurnDiffCompleteCommand = Schema3.Struct({
|
|
490
|
+
type: Schema3.Literal("thread.turn.diff.complete"),
|
|
491
|
+
commandId: CommandId,
|
|
492
|
+
threadId: ThreadId,
|
|
493
|
+
turnId: TurnId,
|
|
494
|
+
completedAt: IsoDateTime,
|
|
495
|
+
checkpointRef: CheckpointRef,
|
|
496
|
+
status: OrchestrationCheckpointStatus,
|
|
497
|
+
files: Schema3.Array(OrchestrationCheckpointFile),
|
|
498
|
+
assistantMessageId: Schema3.optional(MessageId),
|
|
499
|
+
checkpointTurnCount: NonNegativeInt,
|
|
500
|
+
createdAt: IsoDateTime
|
|
501
|
+
});
|
|
502
|
+
var ThreadActivityAppendCommand = Schema3.Struct({
|
|
503
|
+
type: Schema3.Literal("thread.activity.append"),
|
|
504
|
+
commandId: CommandId,
|
|
505
|
+
threadId: ThreadId,
|
|
506
|
+
activity: OrchestrationThreadActivity,
|
|
507
|
+
createdAt: IsoDateTime
|
|
508
|
+
});
|
|
509
|
+
var ThreadRevertCompleteCommand = Schema3.Struct({
|
|
510
|
+
type: Schema3.Literal("thread.revert.complete"),
|
|
511
|
+
commandId: CommandId,
|
|
512
|
+
threadId: ThreadId,
|
|
513
|
+
turnCount: NonNegativeInt,
|
|
514
|
+
createdAt: IsoDateTime
|
|
515
|
+
});
|
|
516
|
+
var InternalOrchestrationCommand = Schema3.Union([
|
|
517
|
+
ThreadSessionSetCommand,
|
|
518
|
+
ThreadMessageAssistantDeltaCommand,
|
|
519
|
+
ThreadMessageAssistantCompleteCommand,
|
|
520
|
+
ThreadProposedPlanUpsertCommand,
|
|
521
|
+
ThreadTurnDiffCompleteCommand,
|
|
522
|
+
ThreadActivityAppendCommand,
|
|
523
|
+
ThreadRevertCompleteCommand
|
|
524
|
+
]);
|
|
525
|
+
var OrchestrationCommand = Schema3.Union([
|
|
526
|
+
DispatchableClientOrchestrationCommand,
|
|
527
|
+
InternalOrchestrationCommand
|
|
528
|
+
]);
|
|
529
|
+
var OrchestrationEventType = Schema3.Literals([
|
|
530
|
+
"project.created",
|
|
531
|
+
"project.meta-updated",
|
|
532
|
+
"project.deleted",
|
|
533
|
+
"thread.created",
|
|
534
|
+
"thread.deleted",
|
|
535
|
+
"thread.meta-updated",
|
|
536
|
+
"thread.runtime-mode-set",
|
|
537
|
+
"thread.interaction-mode-set",
|
|
538
|
+
"thread.message-sent",
|
|
539
|
+
"thread.turn-start-requested",
|
|
540
|
+
"thread.turn-interrupt-requested",
|
|
541
|
+
"thread.approval-response-requested",
|
|
542
|
+
"thread.user-input-response-requested",
|
|
543
|
+
"thread.checkpoint-revert-requested",
|
|
544
|
+
"thread.reverted",
|
|
545
|
+
"thread.session-stop-requested",
|
|
546
|
+
"thread.session-set",
|
|
547
|
+
"thread.proposed-plan-upserted",
|
|
548
|
+
"thread.turn-diff-completed",
|
|
549
|
+
"thread.activity-appended"
|
|
550
|
+
]);
|
|
551
|
+
var OrchestrationAggregateKind = Schema3.Literals(["project", "thread"]);
|
|
552
|
+
var OrchestrationActorKind = Schema3.Literals(["client", "server", "provider"]);
|
|
553
|
+
var ProjectCreatedPayload = Schema3.Struct({
|
|
554
|
+
projectId: ProjectId,
|
|
555
|
+
title: TrimmedNonEmptyString,
|
|
556
|
+
workspaceRoot: TrimmedNonEmptyString,
|
|
557
|
+
defaultModel: Schema3.NullOr(TrimmedNonEmptyString),
|
|
558
|
+
scripts: Schema3.Array(ProjectScript),
|
|
559
|
+
createdAt: IsoDateTime,
|
|
560
|
+
updatedAt: IsoDateTime
|
|
561
|
+
});
|
|
562
|
+
var ProjectMetaUpdatedPayload = Schema3.Struct({
|
|
563
|
+
projectId: ProjectId,
|
|
564
|
+
title: Schema3.optional(TrimmedNonEmptyString),
|
|
565
|
+
workspaceRoot: Schema3.optional(TrimmedNonEmptyString),
|
|
566
|
+
defaultModel: Schema3.optional(Schema3.NullOr(TrimmedNonEmptyString)),
|
|
567
|
+
scripts: Schema3.optional(Schema3.Array(ProjectScript)),
|
|
568
|
+
updatedAt: IsoDateTime
|
|
569
|
+
});
|
|
570
|
+
var ProjectDeletedPayload = Schema3.Struct({
|
|
571
|
+
projectId: ProjectId,
|
|
572
|
+
deletedAt: IsoDateTime
|
|
573
|
+
});
|
|
574
|
+
var ThreadCreatedPayload = Schema3.Struct({
|
|
575
|
+
threadId: ThreadId,
|
|
576
|
+
projectId: ProjectId,
|
|
577
|
+
title: TrimmedNonEmptyString,
|
|
578
|
+
model: TrimmedNonEmptyString,
|
|
579
|
+
runtimeMode: RuntimeMode.pipe(Schema3.withDecodingDefault(() => DEFAULT_RUNTIME_MODE)),
|
|
580
|
+
interactionMode: ProviderInteractionMode.pipe(Schema3.withDecodingDefault(() => DEFAULT_PROVIDER_INTERACTION_MODE)),
|
|
581
|
+
branch: Schema3.NullOr(TrimmedNonEmptyString),
|
|
582
|
+
worktreePath: Schema3.NullOr(TrimmedNonEmptyString),
|
|
583
|
+
createdAt: IsoDateTime,
|
|
584
|
+
updatedAt: IsoDateTime
|
|
585
|
+
});
|
|
586
|
+
var ThreadDeletedPayload = Schema3.Struct({
|
|
587
|
+
threadId: ThreadId,
|
|
588
|
+
deletedAt: IsoDateTime
|
|
589
|
+
});
|
|
590
|
+
var ThreadMetaUpdatedPayload = Schema3.Struct({
|
|
591
|
+
threadId: ThreadId,
|
|
592
|
+
title: Schema3.optional(TrimmedNonEmptyString),
|
|
593
|
+
model: Schema3.optional(TrimmedNonEmptyString),
|
|
594
|
+
branch: Schema3.optional(Schema3.NullOr(TrimmedNonEmptyString)),
|
|
595
|
+
worktreePath: Schema3.optional(Schema3.NullOr(TrimmedNonEmptyString)),
|
|
596
|
+
updatedAt: IsoDateTime
|
|
597
|
+
});
|
|
598
|
+
var ThreadRuntimeModeSetPayload = Schema3.Struct({
|
|
599
|
+
threadId: ThreadId,
|
|
600
|
+
runtimeMode: RuntimeMode,
|
|
601
|
+
updatedAt: IsoDateTime
|
|
602
|
+
});
|
|
603
|
+
var ThreadInteractionModeSetPayload = Schema3.Struct({
|
|
604
|
+
threadId: ThreadId,
|
|
605
|
+
interactionMode: ProviderInteractionMode.pipe(Schema3.withDecodingDefault(() => DEFAULT_PROVIDER_INTERACTION_MODE)),
|
|
606
|
+
updatedAt: IsoDateTime
|
|
607
|
+
});
|
|
608
|
+
var ThreadMessageSentPayload = Schema3.Struct({
|
|
609
|
+
threadId: ThreadId,
|
|
610
|
+
messageId: MessageId,
|
|
611
|
+
role: OrchestrationMessageRole,
|
|
612
|
+
text: Schema3.String,
|
|
613
|
+
attachments: Schema3.optional(Schema3.Array(ChatAttachment)),
|
|
614
|
+
turnId: Schema3.NullOr(TurnId),
|
|
615
|
+
streaming: Schema3.Boolean,
|
|
616
|
+
createdAt: IsoDateTime,
|
|
617
|
+
updatedAt: IsoDateTime
|
|
618
|
+
});
|
|
619
|
+
var ThreadTurnStartRequestedPayload = Schema3.Struct({
|
|
620
|
+
threadId: ThreadId,
|
|
621
|
+
messageId: MessageId,
|
|
622
|
+
provider: Schema3.optional(ProviderKind),
|
|
623
|
+
model: Schema3.optional(TrimmedNonEmptyString),
|
|
624
|
+
serviceTier: Schema3.optional(Schema3.NullOr(ProviderServiceTier)),
|
|
625
|
+
modelOptions: Schema3.optional(ProviderModelOptions),
|
|
626
|
+
assistantDeliveryMode: Schema3.optional(AssistantDeliveryMode),
|
|
627
|
+
runtimeMode: RuntimeMode.pipe(Schema3.withDecodingDefault(() => DEFAULT_RUNTIME_MODE)),
|
|
628
|
+
interactionMode: ProviderInteractionMode.pipe(Schema3.withDecodingDefault(() => DEFAULT_PROVIDER_INTERACTION_MODE)),
|
|
629
|
+
createdAt: IsoDateTime
|
|
630
|
+
});
|
|
631
|
+
var ThreadTurnInterruptRequestedPayload = Schema3.Struct({
|
|
632
|
+
threadId: ThreadId,
|
|
633
|
+
turnId: Schema3.optional(TurnId),
|
|
634
|
+
createdAt: IsoDateTime
|
|
635
|
+
});
|
|
636
|
+
var ThreadApprovalResponseRequestedPayload = Schema3.Struct({
|
|
637
|
+
threadId: ThreadId,
|
|
638
|
+
requestId: ApprovalRequestId,
|
|
639
|
+
decision: ProviderApprovalDecision,
|
|
640
|
+
createdAt: IsoDateTime
|
|
641
|
+
});
|
|
642
|
+
var ThreadUserInputResponseRequestedPayload = Schema3.Struct({
|
|
643
|
+
threadId: ThreadId,
|
|
644
|
+
requestId: ApprovalRequestId,
|
|
645
|
+
answers: ProviderUserInputAnswers,
|
|
646
|
+
createdAt: IsoDateTime
|
|
647
|
+
});
|
|
648
|
+
var ThreadCheckpointRevertRequestedPayload = Schema3.Struct({
|
|
649
|
+
threadId: ThreadId,
|
|
650
|
+
turnCount: NonNegativeInt,
|
|
651
|
+
createdAt: IsoDateTime
|
|
652
|
+
});
|
|
653
|
+
var ThreadRevertedPayload = Schema3.Struct({
|
|
654
|
+
threadId: ThreadId,
|
|
655
|
+
turnCount: NonNegativeInt
|
|
656
|
+
});
|
|
657
|
+
var ThreadSessionStopRequestedPayload = Schema3.Struct({
|
|
658
|
+
threadId: ThreadId,
|
|
659
|
+
createdAt: IsoDateTime
|
|
660
|
+
});
|
|
661
|
+
var ThreadSessionSetPayload = Schema3.Struct({
|
|
662
|
+
threadId: ThreadId,
|
|
663
|
+
session: OrchestrationSession
|
|
664
|
+
});
|
|
665
|
+
var ThreadProposedPlanUpsertedPayload = Schema3.Struct({
|
|
666
|
+
threadId: ThreadId,
|
|
667
|
+
proposedPlan: OrchestrationProposedPlan
|
|
668
|
+
});
|
|
669
|
+
var ThreadTurnDiffCompletedPayload = Schema3.Struct({
|
|
670
|
+
threadId: ThreadId,
|
|
671
|
+
turnId: TurnId,
|
|
672
|
+
checkpointTurnCount: NonNegativeInt,
|
|
673
|
+
checkpointRef: CheckpointRef,
|
|
674
|
+
status: OrchestrationCheckpointStatus,
|
|
675
|
+
files: Schema3.Array(OrchestrationCheckpointFile),
|
|
676
|
+
assistantMessageId: Schema3.NullOr(MessageId),
|
|
677
|
+
completedAt: IsoDateTime
|
|
678
|
+
});
|
|
679
|
+
var ThreadActivityAppendedPayload = Schema3.Struct({
|
|
680
|
+
threadId: ThreadId,
|
|
681
|
+
activity: OrchestrationThreadActivity
|
|
682
|
+
});
|
|
683
|
+
var OrchestrationEventMetadata = Schema3.Struct({
|
|
684
|
+
providerTurnId: Schema3.optional(TrimmedNonEmptyString),
|
|
685
|
+
providerItemId: Schema3.optional(ProviderItemId),
|
|
686
|
+
adapterKey: Schema3.optional(TrimmedNonEmptyString),
|
|
687
|
+
requestId: Schema3.optional(ApprovalRequestId),
|
|
688
|
+
ingestedAt: Schema3.optional(IsoDateTime)
|
|
689
|
+
});
|
|
690
|
+
var EventBaseFields = {
|
|
691
|
+
sequence: NonNegativeInt,
|
|
692
|
+
eventId: EventId,
|
|
693
|
+
aggregateKind: OrchestrationAggregateKind,
|
|
694
|
+
aggregateId: Schema3.Union([ProjectId, ThreadId]),
|
|
695
|
+
occurredAt: IsoDateTime,
|
|
696
|
+
commandId: Schema3.NullOr(CommandId),
|
|
697
|
+
causationEventId: Schema3.NullOr(EventId),
|
|
698
|
+
correlationId: Schema3.NullOr(CommandId),
|
|
699
|
+
metadata: OrchestrationEventMetadata
|
|
700
|
+
};
|
|
701
|
+
var PersistedEventBaseFields = {
|
|
702
|
+
sequence: NonNegativeInt,
|
|
703
|
+
eventId: EventId,
|
|
704
|
+
aggregateKind: OrchestrationAggregateKind,
|
|
705
|
+
streamId: Schema3.Union([ProjectId, ThreadId]),
|
|
706
|
+
streamVersion: NonNegativeInt,
|
|
707
|
+
occurredAt: IsoDateTime,
|
|
708
|
+
commandId: Schema3.NullOr(CommandId),
|
|
709
|
+
causationEventId: Schema3.NullOr(EventId),
|
|
710
|
+
correlationId: Schema3.NullOr(CommandId),
|
|
711
|
+
actorKind: OrchestrationActorKind,
|
|
712
|
+
metadata: OrchestrationEventMetadata
|
|
713
|
+
};
|
|
714
|
+
var OrchestrationEvent = Schema3.Union([
|
|
715
|
+
Schema3.Struct({
|
|
716
|
+
...EventBaseFields,
|
|
717
|
+
type: Schema3.Literal("project.created"),
|
|
718
|
+
payload: ProjectCreatedPayload
|
|
719
|
+
}),
|
|
720
|
+
Schema3.Struct({
|
|
721
|
+
...EventBaseFields,
|
|
722
|
+
type: Schema3.Literal("project.meta-updated"),
|
|
723
|
+
payload: ProjectMetaUpdatedPayload
|
|
724
|
+
}),
|
|
725
|
+
Schema3.Struct({
|
|
726
|
+
...EventBaseFields,
|
|
727
|
+
type: Schema3.Literal("project.deleted"),
|
|
728
|
+
payload: ProjectDeletedPayload
|
|
729
|
+
}),
|
|
730
|
+
Schema3.Struct({
|
|
731
|
+
...EventBaseFields,
|
|
732
|
+
type: Schema3.Literal("thread.created"),
|
|
733
|
+
payload: ThreadCreatedPayload
|
|
734
|
+
}),
|
|
735
|
+
Schema3.Struct({
|
|
736
|
+
...EventBaseFields,
|
|
737
|
+
type: Schema3.Literal("thread.deleted"),
|
|
738
|
+
payload: ThreadDeletedPayload
|
|
739
|
+
}),
|
|
740
|
+
Schema3.Struct({
|
|
741
|
+
...EventBaseFields,
|
|
742
|
+
type: Schema3.Literal("thread.meta-updated"),
|
|
743
|
+
payload: ThreadMetaUpdatedPayload
|
|
744
|
+
}),
|
|
745
|
+
Schema3.Struct({
|
|
746
|
+
...EventBaseFields,
|
|
747
|
+
type: Schema3.Literal("thread.runtime-mode-set"),
|
|
748
|
+
payload: ThreadRuntimeModeSetPayload
|
|
749
|
+
}),
|
|
750
|
+
Schema3.Struct({
|
|
751
|
+
...EventBaseFields,
|
|
752
|
+
type: Schema3.Literal("thread.interaction-mode-set"),
|
|
753
|
+
payload: ThreadInteractionModeSetPayload
|
|
754
|
+
}),
|
|
755
|
+
Schema3.Struct({
|
|
756
|
+
...EventBaseFields,
|
|
757
|
+
type: Schema3.Literal("thread.message-sent"),
|
|
758
|
+
payload: ThreadMessageSentPayload
|
|
759
|
+
}),
|
|
760
|
+
Schema3.Struct({
|
|
761
|
+
...EventBaseFields,
|
|
762
|
+
type: Schema3.Literal("thread.turn-start-requested"),
|
|
763
|
+
payload: ThreadTurnStartRequestedPayload
|
|
764
|
+
}),
|
|
765
|
+
Schema3.Struct({
|
|
766
|
+
...EventBaseFields,
|
|
767
|
+
type: Schema3.Literal("thread.turn-interrupt-requested"),
|
|
768
|
+
payload: ThreadTurnInterruptRequestedPayload
|
|
769
|
+
}),
|
|
770
|
+
Schema3.Struct({
|
|
771
|
+
...EventBaseFields,
|
|
772
|
+
type: Schema3.Literal("thread.approval-response-requested"),
|
|
773
|
+
payload: ThreadApprovalResponseRequestedPayload
|
|
774
|
+
}),
|
|
775
|
+
Schema3.Struct({
|
|
776
|
+
...EventBaseFields,
|
|
777
|
+
type: Schema3.Literal("thread.user-input-response-requested"),
|
|
778
|
+
payload: ThreadUserInputResponseRequestedPayload
|
|
779
|
+
}),
|
|
780
|
+
Schema3.Struct({
|
|
781
|
+
...EventBaseFields,
|
|
782
|
+
type: Schema3.Literal("thread.checkpoint-revert-requested"),
|
|
783
|
+
payload: ThreadCheckpointRevertRequestedPayload
|
|
784
|
+
}),
|
|
785
|
+
Schema3.Struct({
|
|
786
|
+
...EventBaseFields,
|
|
787
|
+
type: Schema3.Literal("thread.reverted"),
|
|
788
|
+
payload: ThreadRevertedPayload
|
|
789
|
+
}),
|
|
790
|
+
Schema3.Struct({
|
|
791
|
+
...EventBaseFields,
|
|
792
|
+
type: Schema3.Literal("thread.session-stop-requested"),
|
|
793
|
+
payload: ThreadSessionStopRequestedPayload
|
|
794
|
+
}),
|
|
795
|
+
Schema3.Struct({
|
|
796
|
+
...EventBaseFields,
|
|
797
|
+
type: Schema3.Literal("thread.session-set"),
|
|
798
|
+
payload: ThreadSessionSetPayload
|
|
799
|
+
}),
|
|
800
|
+
Schema3.Struct({
|
|
801
|
+
...EventBaseFields,
|
|
802
|
+
type: Schema3.Literal("thread.proposed-plan-upserted"),
|
|
803
|
+
payload: ThreadProposedPlanUpsertedPayload
|
|
804
|
+
}),
|
|
805
|
+
Schema3.Struct({
|
|
806
|
+
...EventBaseFields,
|
|
807
|
+
type: Schema3.Literal("thread.turn-diff-completed"),
|
|
808
|
+
payload: ThreadTurnDiffCompletedPayload
|
|
809
|
+
}),
|
|
810
|
+
Schema3.Struct({
|
|
811
|
+
...EventBaseFields,
|
|
812
|
+
type: Schema3.Literal("thread.activity-appended"),
|
|
813
|
+
payload: ThreadActivityAppendedPayload
|
|
814
|
+
})
|
|
815
|
+
]);
|
|
816
|
+
var OrchestrationPersistedEvent = Schema3.Union([
|
|
817
|
+
Schema3.Struct({
|
|
818
|
+
...PersistedEventBaseFields,
|
|
819
|
+
eventType: Schema3.Literal("project.created"),
|
|
820
|
+
payload: ProjectCreatedPayload
|
|
821
|
+
}),
|
|
822
|
+
Schema3.Struct({
|
|
823
|
+
...PersistedEventBaseFields,
|
|
824
|
+
eventType: Schema3.Literal("project.meta-updated"),
|
|
825
|
+
payload: ProjectMetaUpdatedPayload
|
|
826
|
+
}),
|
|
827
|
+
Schema3.Struct({
|
|
828
|
+
...PersistedEventBaseFields,
|
|
829
|
+
eventType: Schema3.Literal("project.deleted"),
|
|
830
|
+
payload: ProjectDeletedPayload
|
|
831
|
+
}),
|
|
832
|
+
Schema3.Struct({
|
|
833
|
+
...PersistedEventBaseFields,
|
|
834
|
+
eventType: Schema3.Literal("thread.created"),
|
|
835
|
+
payload: ThreadCreatedPayload
|
|
836
|
+
}),
|
|
837
|
+
Schema3.Struct({
|
|
838
|
+
...PersistedEventBaseFields,
|
|
839
|
+
eventType: Schema3.Literal("thread.deleted"),
|
|
840
|
+
payload: ThreadDeletedPayload
|
|
841
|
+
}),
|
|
842
|
+
Schema3.Struct({
|
|
843
|
+
...PersistedEventBaseFields,
|
|
844
|
+
eventType: Schema3.Literal("thread.meta-updated"),
|
|
845
|
+
payload: ThreadMetaUpdatedPayload
|
|
846
|
+
}),
|
|
847
|
+
Schema3.Struct({
|
|
848
|
+
...PersistedEventBaseFields,
|
|
849
|
+
eventType: Schema3.Literal("thread.runtime-mode-set"),
|
|
850
|
+
payload: ThreadRuntimeModeSetPayload
|
|
851
|
+
}),
|
|
852
|
+
Schema3.Struct({
|
|
853
|
+
...PersistedEventBaseFields,
|
|
854
|
+
eventType: Schema3.Literal("thread.interaction-mode-set"),
|
|
855
|
+
payload: ThreadInteractionModeSetPayload
|
|
856
|
+
}),
|
|
857
|
+
Schema3.Struct({
|
|
858
|
+
...PersistedEventBaseFields,
|
|
859
|
+
eventType: Schema3.Literal("thread.message-sent"),
|
|
860
|
+
payload: ThreadMessageSentPayload
|
|
861
|
+
}),
|
|
862
|
+
Schema3.Struct({
|
|
863
|
+
...PersistedEventBaseFields,
|
|
864
|
+
eventType: Schema3.Literal("thread.turn-start-requested"),
|
|
865
|
+
payload: ThreadTurnStartRequestedPayload
|
|
866
|
+
}),
|
|
867
|
+
Schema3.Struct({
|
|
868
|
+
...PersistedEventBaseFields,
|
|
869
|
+
eventType: Schema3.Literal("thread.turn-interrupt-requested"),
|
|
870
|
+
payload: ThreadTurnInterruptRequestedPayload
|
|
871
|
+
}),
|
|
872
|
+
Schema3.Struct({
|
|
873
|
+
...PersistedEventBaseFields,
|
|
874
|
+
eventType: Schema3.Literal("thread.approval-response-requested"),
|
|
875
|
+
payload: ThreadApprovalResponseRequestedPayload
|
|
876
|
+
}),
|
|
877
|
+
Schema3.Struct({
|
|
878
|
+
...PersistedEventBaseFields,
|
|
879
|
+
eventType: Schema3.Literal("thread.user-input-response-requested"),
|
|
880
|
+
payload: ThreadUserInputResponseRequestedPayload
|
|
881
|
+
}),
|
|
882
|
+
Schema3.Struct({
|
|
883
|
+
...PersistedEventBaseFields,
|
|
884
|
+
eventType: Schema3.Literal("thread.checkpoint-revert-requested"),
|
|
885
|
+
payload: ThreadCheckpointRevertRequestedPayload
|
|
886
|
+
}),
|
|
887
|
+
Schema3.Struct({
|
|
888
|
+
...PersistedEventBaseFields,
|
|
889
|
+
eventType: Schema3.Literal("thread.reverted"),
|
|
890
|
+
payload: ThreadRevertedPayload
|
|
891
|
+
}),
|
|
892
|
+
Schema3.Struct({
|
|
893
|
+
...PersistedEventBaseFields,
|
|
894
|
+
eventType: Schema3.Literal("thread.session-stop-requested"),
|
|
895
|
+
payload: ThreadSessionStopRequestedPayload
|
|
896
|
+
}),
|
|
897
|
+
Schema3.Struct({
|
|
898
|
+
...PersistedEventBaseFields,
|
|
899
|
+
eventType: Schema3.Literal("thread.session-set"),
|
|
900
|
+
payload: ThreadSessionSetPayload
|
|
901
|
+
}),
|
|
902
|
+
Schema3.Struct({
|
|
903
|
+
...PersistedEventBaseFields,
|
|
904
|
+
eventType: Schema3.Literal("thread.proposed-plan-upserted"),
|
|
905
|
+
payload: ThreadProposedPlanUpsertedPayload
|
|
906
|
+
}),
|
|
907
|
+
Schema3.Struct({
|
|
908
|
+
...PersistedEventBaseFields,
|
|
909
|
+
eventType: Schema3.Literal("thread.turn-diff-completed"),
|
|
910
|
+
payload: ThreadTurnDiffCompletedPayload
|
|
911
|
+
}),
|
|
912
|
+
Schema3.Struct({
|
|
913
|
+
...PersistedEventBaseFields,
|
|
914
|
+
eventType: Schema3.Literal("thread.activity-appended"),
|
|
915
|
+
payload: ThreadActivityAppendedPayload
|
|
916
|
+
})
|
|
917
|
+
]);
|
|
918
|
+
var OrchestrationCommandReceiptStatus = Schema3.Literals(["accepted", "rejected"]);
|
|
919
|
+
var TurnCountRange = Schema3.Struct({
|
|
920
|
+
fromTurnCount: NonNegativeInt,
|
|
921
|
+
toTurnCount: NonNegativeInt
|
|
922
|
+
}).check(Schema3.makeFilter((input) => input.fromTurnCount <= input.toTurnCount || new SchemaIssue.InvalidValue(Option.some(input.fromTurnCount), {
|
|
923
|
+
message: "fromTurnCount must be less than or equal to toTurnCount"
|
|
924
|
+
}), { identifier: "OrchestrationTurnDiffRange" }));
|
|
925
|
+
var ThreadTurnDiff = TurnCountRange.mapFields(Struct.assign({
|
|
926
|
+
threadId: ThreadId,
|
|
927
|
+
diff: Schema3.String
|
|
928
|
+
}), { unsafePreserveChecks: true });
|
|
929
|
+
var ProviderSessionRuntimeStatus = Schema3.Literals([
|
|
930
|
+
"starting",
|
|
931
|
+
"running",
|
|
932
|
+
"stopped",
|
|
933
|
+
"error"
|
|
934
|
+
]);
|
|
935
|
+
var ProjectionThreadTurnStatus = Schema3.Literals([
|
|
936
|
+
"running",
|
|
937
|
+
"completed",
|
|
938
|
+
"interrupted",
|
|
939
|
+
"error"
|
|
940
|
+
]);
|
|
941
|
+
var ProjectionCheckpointRow = Schema3.Struct({
|
|
942
|
+
threadId: ThreadId,
|
|
943
|
+
turnId: TurnId,
|
|
944
|
+
checkpointTurnCount: NonNegativeInt,
|
|
945
|
+
checkpointRef: CheckpointRef,
|
|
946
|
+
status: OrchestrationCheckpointStatus,
|
|
947
|
+
files: Schema3.Array(OrchestrationCheckpointFile),
|
|
948
|
+
assistantMessageId: Schema3.NullOr(MessageId),
|
|
949
|
+
completedAt: IsoDateTime
|
|
950
|
+
});
|
|
951
|
+
var ProjectionPendingApprovalStatus = Schema3.Literals(["pending", "resolved"]);
|
|
952
|
+
var ProjectionPendingApprovalDecision = Schema3.NullOr(ProviderApprovalDecision);
|
|
953
|
+
var DispatchResult = Schema3.Struct({
|
|
954
|
+
sequence: NonNegativeInt
|
|
955
|
+
});
|
|
956
|
+
var OrchestrationGetSnapshotInput = Schema3.Struct({});
|
|
957
|
+
var OrchestrationGetSnapshotResult = OrchestrationReadModel;
|
|
958
|
+
var OrchestrationGetTurnDiffInput = TurnCountRange.mapFields(Struct.assign({ threadId: ThreadId }), { unsafePreserveChecks: true });
|
|
959
|
+
var OrchestrationGetTurnDiffResult = ThreadTurnDiff;
|
|
960
|
+
var OrchestrationGetFullThreadDiffInput = Schema3.Struct({
|
|
961
|
+
threadId: ThreadId,
|
|
962
|
+
toTurnCount: NonNegativeInt
|
|
963
|
+
});
|
|
964
|
+
var OrchestrationGetFullThreadDiffResult = ThreadTurnDiff;
|
|
965
|
+
var OrchestrationReplayEventsInput = Schema3.Struct({
|
|
966
|
+
fromSequenceExclusive: NonNegativeInt
|
|
967
|
+
});
|
|
968
|
+
var OrchestrationReplayEventsResult = Schema3.Array(OrchestrationEvent);
|
|
969
|
+
var OrchestrationRpcSchemas = {
|
|
970
|
+
getSnapshot: {
|
|
971
|
+
input: OrchestrationGetSnapshotInput,
|
|
972
|
+
output: OrchestrationGetSnapshotResult
|
|
973
|
+
},
|
|
974
|
+
dispatchCommand: {
|
|
975
|
+
input: ClientOrchestrationCommand,
|
|
976
|
+
output: DispatchResult
|
|
977
|
+
},
|
|
978
|
+
getTurnDiff: {
|
|
979
|
+
input: OrchestrationGetTurnDiffInput,
|
|
980
|
+
output: OrchestrationGetTurnDiffResult
|
|
981
|
+
},
|
|
982
|
+
getFullThreadDiff: {
|
|
983
|
+
input: OrchestrationGetFullThreadDiffInput,
|
|
984
|
+
output: OrchestrationGetFullThreadDiffResult
|
|
985
|
+
},
|
|
986
|
+
replayEvents: {
|
|
987
|
+
input: OrchestrationReplayEventsInput,
|
|
988
|
+
output: OrchestrationReplayEventsResult
|
|
989
|
+
}
|
|
990
|
+
};
|
|
991
|
+
|
|
992
|
+
// packages/contracts/src/workspace.ts
|
|
993
|
+
var WorkspaceSourceKind = Schema4.Literals(["native", "rig-import", "manual", "remote"]);
|
|
994
|
+
var WorkspaceTopologyStatus = Schema4.Literals(["empty", "ready", "degraded"]);
|
|
995
|
+
var WorkspaceRemoteFleetStatus = Schema4.Literals(["empty", "ready", "degraded"]);
|
|
996
|
+
var WorkspaceServiceFabricStatus = Schema4.Literals([
|
|
997
|
+
"empty",
|
|
998
|
+
"booting",
|
|
999
|
+
"ready",
|
|
1000
|
+
"degraded",
|
|
1001
|
+
"stopped"
|
|
1002
|
+
]);
|
|
1003
|
+
var WorkspaceRemoteHostStatus = Schema4.Literals([
|
|
1004
|
+
"registering",
|
|
1005
|
+
"ready",
|
|
1006
|
+
"busy",
|
|
1007
|
+
"degraded",
|
|
1008
|
+
"draining",
|
|
1009
|
+
"offline",
|
|
1010
|
+
"quarantined"
|
|
1011
|
+
]);
|
|
1012
|
+
var WorkspaceTopologyServiceSummary = Schema4.Struct({
|
|
1013
|
+
name: TrimmedNonEmptyString,
|
|
1014
|
+
relativeRootPath: TrimmedNonEmptyString,
|
|
1015
|
+
runtime: TrimmedNonEmptyString,
|
|
1016
|
+
port: Schema4.NullOr(Schema4.Number),
|
|
1017
|
+
healthcheck: Schema4.NullOr(TrimmedNonEmptyString),
|
|
1018
|
+
sourceOfTruth: Schema4.Struct({
|
|
1019
|
+
code: Schema4.NullOr(TrimmedNonEmptyString),
|
|
1020
|
+
tests: Schema4.NullOr(TrimmedNonEmptyString),
|
|
1021
|
+
infra: Schema4.NullOr(TrimmedNonEmptyString),
|
|
1022
|
+
deploy: Schema4.NullOr(TrimmedNonEmptyString),
|
|
1023
|
+
dependencies: Schema4.NullOr(TrimmedNonEmptyString)
|
|
1024
|
+
}),
|
|
1025
|
+
splitReadyChecklist: Schema4.Array(TrimmedNonEmptyString)
|
|
1026
|
+
});
|
|
1027
|
+
var WorkspaceTopologySummary = Schema4.Struct({
|
|
1028
|
+
compiledAt: IsoDateTime,
|
|
1029
|
+
status: WorkspaceTopologyStatus,
|
|
1030
|
+
manifestCount: Schema4.Number,
|
|
1031
|
+
serviceCount: Schema4.Number,
|
|
1032
|
+
services: Schema4.Array(WorkspaceTopologyServiceSummary),
|
|
1033
|
+
warnings: Schema4.Array(Schema4.String)
|
|
1034
|
+
});
|
|
1035
|
+
var WorkspaceRemoteHostSummary = Schema4.Struct({
|
|
1036
|
+
id: TrimmedNonEmptyString,
|
|
1037
|
+
name: TrimmedNonEmptyString,
|
|
1038
|
+
baseUrl: TrimmedNonEmptyString,
|
|
1039
|
+
workspacePath: Schema4.NullOr(TrimmedNonEmptyString),
|
|
1040
|
+
transport: TrimmedNonEmptyString,
|
|
1041
|
+
hostname: Schema4.NullOr(TrimmedNonEmptyString),
|
|
1042
|
+
region: Schema4.NullOr(TrimmedNonEmptyString),
|
|
1043
|
+
labels: Schema4.Array(TrimmedNonEmptyString),
|
|
1044
|
+
capabilities: Schema4.Array(TrimmedNonEmptyString),
|
|
1045
|
+
runtimeAdapters: Schema4.Array(TrimmedNonEmptyString),
|
|
1046
|
+
status: WorkspaceRemoteHostStatus,
|
|
1047
|
+
currentLeaseCount: Schema4.Number,
|
|
1048
|
+
lastHeartbeatAt: Schema4.NullOr(IsoDateTime),
|
|
1049
|
+
registeredAt: IsoDateTime,
|
|
1050
|
+
manifestPath: TrimmedNonEmptyString
|
|
1051
|
+
});
|
|
1052
|
+
var WorkspaceRemoteFleetSummary = Schema4.Struct({
|
|
1053
|
+
updatedAt: IsoDateTime,
|
|
1054
|
+
status: WorkspaceRemoteFleetStatus,
|
|
1055
|
+
manifestCount: Schema4.Number,
|
|
1056
|
+
hostCount: Schema4.Number,
|
|
1057
|
+
onlineHostCount: Schema4.Number,
|
|
1058
|
+
hosts: Schema4.Array(WorkspaceRemoteHostSummary),
|
|
1059
|
+
warnings: Schema4.Array(Schema4.String)
|
|
1060
|
+
});
|
|
1061
|
+
var WorkspaceServiceFabricServiceSummary = Schema4.Struct({
|
|
1062
|
+
name: TrimmedNonEmptyString,
|
|
1063
|
+
relativeRootPath: TrimmedNonEmptyString,
|
|
1064
|
+
mode: Schema4.Literals(["stub", "process"]),
|
|
1065
|
+
port: Schema4.Number,
|
|
1066
|
+
healthcheck: TrimmedNonEmptyString,
|
|
1067
|
+
routePrefix: Schema4.NullOr(TrimmedNonEmptyString),
|
|
1068
|
+
status: Schema4.Literals(["planned", "booting", "healthy", "degraded", "failed", "stopped"]),
|
|
1069
|
+
pid: Schema4.NullOr(Schema4.Number),
|
|
1070
|
+
logPath: Schema4.NullOr(TrimmedNonEmptyString)
|
|
1071
|
+
});
|
|
1072
|
+
var WorkspaceServiceFabricSummary = Schema4.Struct({
|
|
1073
|
+
updatedAt: IsoDateTime,
|
|
1074
|
+
status: WorkspaceServiceFabricStatus,
|
|
1075
|
+
serviceCount: Schema4.Number,
|
|
1076
|
+
healthyServiceCount: Schema4.Number,
|
|
1077
|
+
stateDir: TrimmedNonEmptyString,
|
|
1078
|
+
services: Schema4.Array(WorkspaceServiceFabricServiceSummary),
|
|
1079
|
+
warnings: Schema4.Array(Schema4.String)
|
|
1080
|
+
});
|
|
1081
|
+
var WorkspaceSummary = Schema4.Struct({
|
|
1082
|
+
id: WorkspaceId,
|
|
1083
|
+
title: TrimmedNonEmptyString,
|
|
1084
|
+
rootPath: TrimmedNonEmptyString,
|
|
1085
|
+
sourceKind: WorkspaceSourceKind,
|
|
1086
|
+
defaultRuntimeAdapter: Schema4.optional(TrimmedNonEmptyString),
|
|
1087
|
+
defaultProvider: Schema4.optional(ProviderKind),
|
|
1088
|
+
defaultModel: Schema4.NullOr(TrimmedNonEmptyString),
|
|
1089
|
+
topology: Schema4.optional(WorkspaceTopologySummary),
|
|
1090
|
+
remoteFleet: Schema4.optional(WorkspaceRemoteFleetSummary),
|
|
1091
|
+
serviceFabric: Schema4.optional(WorkspaceServiceFabricSummary),
|
|
1092
|
+
createdAt: IsoDateTime,
|
|
1093
|
+
updatedAt: IsoDateTime
|
|
1094
|
+
});
|
|
1095
|
+
// packages/contracts/src/graph.ts
|
|
1096
|
+
import { Schema as Schema5 } from "effect";
|
|
1097
|
+
var TaskStatus = Schema5.Literals([
|
|
1098
|
+
"draft",
|
|
1099
|
+
"open",
|
|
1100
|
+
"ready",
|
|
1101
|
+
"queued",
|
|
1102
|
+
"running",
|
|
1103
|
+
"in_progress",
|
|
1104
|
+
"under_review",
|
|
1105
|
+
"blocked",
|
|
1106
|
+
"unknown",
|
|
1107
|
+
"completed",
|
|
1108
|
+
"failed",
|
|
1109
|
+
"cancelled",
|
|
1110
|
+
"closed"
|
|
1111
|
+
]);
|
|
1112
|
+
var GraphSummary = Schema5.Struct({
|
|
1113
|
+
id: GraphId,
|
|
1114
|
+
workspaceId: WorkspaceId,
|
|
1115
|
+
title: TrimmedNonEmptyString,
|
|
1116
|
+
description: Schema5.NullOr(Schema5.String),
|
|
1117
|
+
createdAt: IsoDateTime,
|
|
1118
|
+
updatedAt: IsoDateTime
|
|
1119
|
+
});
|
|
1120
|
+
var TaskSummary = Schema5.Struct({
|
|
1121
|
+
id: TaskId,
|
|
1122
|
+
workspaceId: WorkspaceId,
|
|
1123
|
+
graphId: Schema5.NullOr(GraphId),
|
|
1124
|
+
externalId: Schema5.NullOr(TrimmedNonEmptyString),
|
|
1125
|
+
title: TrimmedNonEmptyString,
|
|
1126
|
+
description: Schema5.String,
|
|
1127
|
+
status: TaskStatus,
|
|
1128
|
+
priority: Schema5.NullOr(PositiveInt),
|
|
1129
|
+
role: Schema5.NullOr(TrimmedNonEmptyString),
|
|
1130
|
+
scope: Schema5.Array(TrimmedNonEmptyString),
|
|
1131
|
+
validationKeys: Schema5.Array(TrimmedNonEmptyString),
|
|
1132
|
+
sourceIssueId: Schema5.optional(Schema5.NullOr(TrimmedNonEmptyString)),
|
|
1133
|
+
dependencies: Schema5.optional(Schema5.Array(TrimmedNonEmptyString)),
|
|
1134
|
+
parentChildDeps: Schema5.optional(Schema5.Array(TrimmedNonEmptyString)),
|
|
1135
|
+
metadata: Schema5.Unknown,
|
|
1136
|
+
createdAt: IsoDateTime,
|
|
1137
|
+
updatedAt: IsoDateTime
|
|
1138
|
+
});
|
|
1139
|
+
var QueueEntry = Schema5.Struct({
|
|
1140
|
+
taskId: TaskId,
|
|
1141
|
+
score: NonNegativeInt,
|
|
1142
|
+
unblockCount: NonNegativeInt,
|
|
1143
|
+
position: NonNegativeInt
|
|
1144
|
+
});
|
|
1145
|
+
// packages/contracts/src/runtime.ts
|
|
1146
|
+
import { Schema as Schema6 } from "effect";
|
|
1147
|
+
var RunKind = Schema6.Literals(["adhoc", "task", "batch", "validation", "review"]);
|
|
1148
|
+
var RunMode = Schema6.Literals(["interactive", "autonomous", "supervised"]);
|
|
1149
|
+
var RunStatus = Schema6.Literals([
|
|
1150
|
+
"created",
|
|
1151
|
+
"queued",
|
|
1152
|
+
"preparing",
|
|
1153
|
+
"running",
|
|
1154
|
+
"waiting-approval",
|
|
1155
|
+
"waiting-user-input",
|
|
1156
|
+
"validating",
|
|
1157
|
+
"reviewing",
|
|
1158
|
+
"completed",
|
|
1159
|
+
"failed",
|
|
1160
|
+
"cancelled",
|
|
1161
|
+
"paused"
|
|
1162
|
+
]);
|
|
1163
|
+
var EngineSandboxMode = Schema6.Literals([
|
|
1164
|
+
"read-only",
|
|
1165
|
+
"workspace-write",
|
|
1166
|
+
"danger-full-access"
|
|
1167
|
+
]);
|
|
1168
|
+
var IsolationMode = Schema6.Literals(["none", "env", "worktree"]);
|
|
1169
|
+
var RuntimeStatus = Schema6.Literals([
|
|
1170
|
+
"prepared",
|
|
1171
|
+
"starting",
|
|
1172
|
+
"running",
|
|
1173
|
+
"interrupted",
|
|
1174
|
+
"exited",
|
|
1175
|
+
"failed",
|
|
1176
|
+
"destroyed"
|
|
1177
|
+
]);
|
|
1178
|
+
var RunExecutionTarget = Schema6.Literals(["local", "remote"]);
|
|
1179
|
+
var RunSummary = Schema6.Struct({
|
|
1180
|
+
id: RunId,
|
|
1181
|
+
workspaceId: WorkspaceId,
|
|
1182
|
+
taskId: Schema6.NullOr(TaskId),
|
|
1183
|
+
title: TrimmedNonEmptyString,
|
|
1184
|
+
runKind: RunKind,
|
|
1185
|
+
mode: RunMode,
|
|
1186
|
+
runtimeMode: RuntimeMode,
|
|
1187
|
+
interactionMode: ProviderInteractionMode,
|
|
1188
|
+
status: RunStatus,
|
|
1189
|
+
runtimeAdapter: TrimmedNonEmptyString,
|
|
1190
|
+
model: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1191
|
+
initialPrompt: Schema6.NullOr(Schema6.String),
|
|
1192
|
+
executionTarget: Schema6.optional(RunExecutionTarget),
|
|
1193
|
+
remoteHostId: Schema6.optional(Schema6.NullOr(TrimmedNonEmptyString)),
|
|
1194
|
+
remoteLeaseId: Schema6.optional(Schema6.NullOr(TrimmedNonEmptyString)),
|
|
1195
|
+
remoteLeaseClaimedAt: Schema6.optional(Schema6.NullOr(IsoDateTime)),
|
|
1196
|
+
activeRuntimeId: Schema6.NullOr(EngineRuntimeId),
|
|
1197
|
+
latestMessageId: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1198
|
+
pendingApprovalCount: NonNegativeInt,
|
|
1199
|
+
pendingUserInputCount: NonNegativeInt,
|
|
1200
|
+
branch: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1201
|
+
worktreePath: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1202
|
+
errorText: Schema6.NullOr(Schema6.String),
|
|
1203
|
+
createdAt: IsoDateTime,
|
|
1204
|
+
updatedAt: IsoDateTime,
|
|
1205
|
+
startedAt: Schema6.NullOr(IsoDateTime),
|
|
1206
|
+
completedAt: Schema6.NullOr(IsoDateTime)
|
|
1207
|
+
});
|
|
1208
|
+
var RuntimeSummary = Schema6.Struct({
|
|
1209
|
+
id: EngineRuntimeId,
|
|
1210
|
+
workspaceId: WorkspaceId,
|
|
1211
|
+
runId: RunId,
|
|
1212
|
+
adapterKind: TrimmedNonEmptyString,
|
|
1213
|
+
executionTarget: Schema6.optional(RunExecutionTarget),
|
|
1214
|
+
remoteHostId: Schema6.optional(Schema6.NullOr(TrimmedNonEmptyString)),
|
|
1215
|
+
status: RuntimeStatus,
|
|
1216
|
+
sandboxMode: EngineSandboxMode,
|
|
1217
|
+
isolationMode: IsolationMode,
|
|
1218
|
+
workspaceDir: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1219
|
+
homeDir: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1220
|
+
tmpDir: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1221
|
+
cacheDir: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1222
|
+
logsDir: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1223
|
+
stateDir: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1224
|
+
sessionDir: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1225
|
+
sessionLogPath: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1226
|
+
pid: Schema6.NullOr(NonNegativeInt),
|
|
1227
|
+
startedAt: Schema6.NullOr(IsoDateTime),
|
|
1228
|
+
updatedAt: IsoDateTime,
|
|
1229
|
+
exitedAt: Schema6.NullOr(IsoDateTime)
|
|
1230
|
+
});
|
|
1231
|
+
var ApprovalStatus = Schema6.Literals(["pending", "resolved"]);
|
|
1232
|
+
var ApprovalSummary = Schema6.Struct({
|
|
1233
|
+
id: TrimmedNonEmptyString,
|
|
1234
|
+
runId: RunId,
|
|
1235
|
+
actionId: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1236
|
+
requestKind: TrimmedNonEmptyString,
|
|
1237
|
+
status: ApprovalStatus,
|
|
1238
|
+
payload: Schema6.Unknown,
|
|
1239
|
+
createdAt: IsoDateTime,
|
|
1240
|
+
resolvedAt: Schema6.NullOr(IsoDateTime)
|
|
1241
|
+
});
|
|
1242
|
+
var UserInputRequestSummary = Schema6.Struct({
|
|
1243
|
+
id: TrimmedNonEmptyString,
|
|
1244
|
+
runId: RunId,
|
|
1245
|
+
status: ApprovalStatus,
|
|
1246
|
+
payload: Schema6.Unknown,
|
|
1247
|
+
createdAt: IsoDateTime,
|
|
1248
|
+
resolvedAt: Schema6.NullOr(IsoDateTime)
|
|
1249
|
+
});
|
|
1250
|
+
var WorktreeSummary = Schema6.Struct({
|
|
1251
|
+
id: WorktreeId,
|
|
1252
|
+
workspaceId: WorkspaceId,
|
|
1253
|
+
runId: RunId,
|
|
1254
|
+
taskId: Schema6.NullOr(TaskId),
|
|
1255
|
+
branchName: TrimmedNonEmptyString,
|
|
1256
|
+
path: TrimmedNonEmptyString,
|
|
1257
|
+
status: TrimmedNonEmptyString,
|
|
1258
|
+
createdAt: IsoDateTime,
|
|
1259
|
+
cleanedAt: Schema6.NullOr(IsoDateTime)
|
|
1260
|
+
});
|
|
1261
|
+
// packages/contracts/src/conversation.ts
|
|
1262
|
+
import { Schema as Schema7 } from "effect";
|
|
1263
|
+
var EngineMessageRole = Schema7.Literals(["user", "assistant", "system"]);
|
|
1264
|
+
var EngineMessageState = Schema7.Literals([
|
|
1265
|
+
"streaming",
|
|
1266
|
+
"completed",
|
|
1267
|
+
"interrupted",
|
|
1268
|
+
"errored"
|
|
1269
|
+
]);
|
|
1270
|
+
var ConversationSummary = Schema7.Struct({
|
|
1271
|
+
id: ConversationId,
|
|
1272
|
+
runId: RunId,
|
|
1273
|
+
title: TrimmedNonEmptyString,
|
|
1274
|
+
createdAt: IsoDateTime,
|
|
1275
|
+
updatedAt: IsoDateTime
|
|
1276
|
+
});
|
|
1277
|
+
var EngineMessage = Schema7.Struct({
|
|
1278
|
+
id: MessageId,
|
|
1279
|
+
conversationId: ConversationId,
|
|
1280
|
+
role: EngineMessageRole,
|
|
1281
|
+
text: Schema7.String,
|
|
1282
|
+
attachments: Schema7.Array(Schema7.Unknown),
|
|
1283
|
+
state: EngineMessageState,
|
|
1284
|
+
createdAt: IsoDateTime,
|
|
1285
|
+
completedAt: Schema7.NullOr(IsoDateTime)
|
|
1286
|
+
});
|
|
1287
|
+
var EngineAction = Schema7.Struct({
|
|
1288
|
+
id: ActionId,
|
|
1289
|
+
runId: RunId,
|
|
1290
|
+
messageId: Schema7.NullOr(MessageId),
|
|
1291
|
+
actionType: TrimmedNonEmptyString,
|
|
1292
|
+
title: TrimmedNonEmptyString,
|
|
1293
|
+
detail: Schema7.NullOr(Schema7.String),
|
|
1294
|
+
state: TrimmedNonEmptyString,
|
|
1295
|
+
payload: Schema7.Unknown,
|
|
1296
|
+
startedAt: IsoDateTime,
|
|
1297
|
+
completedAt: Schema7.NullOr(IsoDateTime)
|
|
1298
|
+
});
|
|
1299
|
+
var EngineLogTone = Schema7.Literals(["thinking", "tool", "info", "error"]);
|
|
1300
|
+
var EngineRunLog = Schema7.Struct({
|
|
1301
|
+
id: TrimmedNonEmptyString,
|
|
1302
|
+
runId: RunId,
|
|
1303
|
+
title: TrimmedNonEmptyString,
|
|
1304
|
+
detail: Schema7.NullOr(Schema7.String),
|
|
1305
|
+
tone: EngineLogTone,
|
|
1306
|
+
status: Schema7.NullOr(TrimmedNonEmptyString),
|
|
1307
|
+
payload: Schema7.Unknown,
|
|
1308
|
+
createdAt: IsoDateTime
|
|
1309
|
+
});
|
|
1310
|
+
// packages/contracts/src/plugin.ts
|
|
1311
|
+
import { Schema as Schema8 } from "effect";
|
|
1312
|
+
var ValidatorCategory = Schema8.Literals([
|
|
1313
|
+
"boundary",
|
|
1314
|
+
"contract",
|
|
1315
|
+
"integration",
|
|
1316
|
+
"regression",
|
|
1317
|
+
"external",
|
|
1318
|
+
"custom"
|
|
1319
|
+
]);
|
|
1320
|
+
var ValidatorRegistration = Schema8.Struct({
|
|
1321
|
+
id: Schema8.String,
|
|
1322
|
+
category: ValidatorCategory,
|
|
1323
|
+
description: Schema8.optional(Schema8.String)
|
|
1324
|
+
});
|
|
1325
|
+
var HookEvent = Schema8.Literals([
|
|
1326
|
+
"PreToolUse",
|
|
1327
|
+
"PostToolUse",
|
|
1328
|
+
"UserPromptSubmit",
|
|
1329
|
+
"Stop",
|
|
1330
|
+
"SessionStart",
|
|
1331
|
+
"SessionEnd"
|
|
1332
|
+
]);
|
|
1333
|
+
var HookMatcher = Schema8.Union([
|
|
1334
|
+
Schema8.Struct({ kind: Schema8.Literal("all") }),
|
|
1335
|
+
Schema8.Struct({ kind: Schema8.Literal("tool"), name: Schema8.String }),
|
|
1336
|
+
Schema8.Struct({ kind: Schema8.Literal("glob"), pattern: Schema8.String })
|
|
1337
|
+
]);
|
|
1338
|
+
var HookRegistration = Schema8.Struct({
|
|
1339
|
+
id: Schema8.String,
|
|
1340
|
+
event: HookEvent,
|
|
1341
|
+
matcher: HookMatcher,
|
|
1342
|
+
command: Schema8.optional(Schema8.String),
|
|
1343
|
+
description: Schema8.optional(Schema8.String)
|
|
1344
|
+
});
|
|
1345
|
+
var SkillRegistration = Schema8.Struct({
|
|
1346
|
+
id: Schema8.String,
|
|
1347
|
+
path: Schema8.String,
|
|
1348
|
+
description: Schema8.optional(Schema8.String)
|
|
1349
|
+
});
|
|
1350
|
+
var RepoSourceRegistration = Schema8.Struct({
|
|
1351
|
+
id: Schema8.String,
|
|
1352
|
+
url: Schema8.String,
|
|
1353
|
+
defaultPath: Schema8.optional(Schema8.String),
|
|
1354
|
+
description: Schema8.optional(Schema8.String),
|
|
1355
|
+
defaultBranch: Schema8.optional(Schema8.String),
|
|
1356
|
+
remoteEnvVar: Schema8.optional(Schema8.String),
|
|
1357
|
+
checkoutEnvVar: Schema8.optional(Schema8.String)
|
|
1358
|
+
});
|
|
1359
|
+
var AgentRoleRegistration = Schema8.Struct({
|
|
1360
|
+
id: Schema8.String,
|
|
1361
|
+
defaultModel: Schema8.optional(Schema8.String),
|
|
1362
|
+
description: Schema8.optional(Schema8.String)
|
|
1363
|
+
});
|
|
1364
|
+
var TaskFieldExtension = Schema8.Struct({
|
|
1365
|
+
id: Schema8.String,
|
|
1366
|
+
fieldName: Schema8.String,
|
|
1367
|
+
schemaJson: Schema8.String
|
|
1368
|
+
});
|
|
1369
|
+
var TaskSourceKind = Schema8.String;
|
|
1370
|
+
var TaskSourceRegistration = Schema8.Struct({
|
|
1371
|
+
id: Schema8.String,
|
|
1372
|
+
kind: Schema8.String,
|
|
1373
|
+
description: Schema8.optional(Schema8.String)
|
|
1374
|
+
});
|
|
1375
|
+
var CliCommandRegistration = Schema8.Struct({
|
|
1376
|
+
id: Schema8.String,
|
|
1377
|
+
command: Schema8.String,
|
|
1378
|
+
description: Schema8.optional(Schema8.String)
|
|
1379
|
+
});
|
|
1380
|
+
var PluginContributes = Schema8.Struct({
|
|
1381
|
+
validators: Schema8.optional(Schema8.Array(ValidatorRegistration)),
|
|
1382
|
+
hooks: Schema8.optional(Schema8.Array(HookRegistration)),
|
|
1383
|
+
skills: Schema8.optional(Schema8.Array(SkillRegistration)),
|
|
1384
|
+
repoSources: Schema8.optional(Schema8.Array(RepoSourceRegistration)),
|
|
1385
|
+
agentRoles: Schema8.optional(Schema8.Array(AgentRoleRegistration)),
|
|
1386
|
+
taskFieldSchemas: Schema8.optional(Schema8.Array(TaskFieldExtension)),
|
|
1387
|
+
taskSources: Schema8.optional(Schema8.Array(TaskSourceRegistration)),
|
|
1388
|
+
cliCommands: Schema8.optional(Schema8.Array(CliCommandRegistration))
|
|
1389
|
+
});
|
|
1390
|
+
var RigPlugin = Schema8.Struct({
|
|
1391
|
+
name: Schema8.String,
|
|
1392
|
+
version: Schema8.String,
|
|
1393
|
+
contributes: Schema8.optional(PluginContributes)
|
|
1394
|
+
});
|
|
1395
|
+
// packages/contracts/src/config.ts
|
|
1396
|
+
import { Schema as Schema9 } from "effect";
|
|
1397
|
+
var WorkspaceIsolation = Schema9.Literals([
|
|
1398
|
+
"worktree",
|
|
1399
|
+
"directory"
|
|
1400
|
+
]);
|
|
1401
|
+
var ScopeSearchPrefix = Schema9.Struct({
|
|
1402
|
+
prefix: Schema9.String,
|
|
1403
|
+
matchStartsWith: Schema9.optional(Schema9.Array(Schema9.String)),
|
|
1404
|
+
matchExact: Schema9.optional(Schema9.Array(Schema9.String))
|
|
1405
|
+
});
|
|
1406
|
+
var ScopeNormalizationRules = Schema9.Struct({
|
|
1407
|
+
stripPrefixes: Schema9.optional(Schema9.Array(Schema9.String)),
|
|
1408
|
+
searchPrefixes: Schema9.optional(Schema9.Array(ScopeSearchPrefix))
|
|
1409
|
+
});
|
|
1410
|
+
var WorkspaceConfig = Schema9.Struct({
|
|
1411
|
+
mainRepo: Schema9.String,
|
|
1412
|
+
isolation: WorkspaceIsolation,
|
|
1413
|
+
scopeNormalization: Schema9.optional(ScopeNormalizationRules)
|
|
1414
|
+
});
|
|
1415
|
+
var TaskSourceConfig = Schema9.Struct({
|
|
1416
|
+
kind: Schema9.String,
|
|
1417
|
+
path: Schema9.optional(Schema9.String),
|
|
1418
|
+
owner: Schema9.optional(Schema9.String),
|
|
1419
|
+
repo: Schema9.optional(Schema9.String),
|
|
1420
|
+
labels: Schema9.optional(Schema9.Array(Schema9.String)),
|
|
1421
|
+
state: Schema9.optional(Schema9.Literals(["open", "closed", "all"])),
|
|
1422
|
+
url: Schema9.optional(Schema9.String),
|
|
1423
|
+
options: Schema9.optional(Schema9.Record(Schema9.String, Schema9.Unknown))
|
|
1424
|
+
});
|
|
1425
|
+
var RuntimeHarness = Schema9.Literals(["pi", "claude-code", "codex"]);
|
|
1426
|
+
var RigRuntimeMode = Schema9.Literals(["yolo", "approval-required"]);
|
|
1427
|
+
var RuntimeConfig = Schema9.Struct({
|
|
1428
|
+
agentRoles: Schema9.optional(Schema9.Record(Schema9.String, Schema9.Unknown)),
|
|
1429
|
+
timeouts: Schema9.optional(Schema9.Record(Schema9.String, Schema9.Number)),
|
|
1430
|
+
harness: Schema9.optional(RuntimeHarness),
|
|
1431
|
+
model: Schema9.optional(Schema9.String),
|
|
1432
|
+
mode: Schema9.optional(RigRuntimeMode)
|
|
1433
|
+
});
|
|
1434
|
+
var ProjectIdentity = Schema9.Struct({
|
|
1435
|
+
name: Schema9.String,
|
|
1436
|
+
repo: Schema9.optional(Schema9.String)
|
|
1437
|
+
});
|
|
1438
|
+
var PlanningConfig = Schema9.Struct({
|
|
1439
|
+
mode: Schema9.optional(Schema9.Literals(["auto", "always", "off"])),
|
|
1440
|
+
requireForLabels: Schema9.optional(Schema9.Array(Schema9.String)),
|
|
1441
|
+
skipForLabels: Schema9.optional(Schema9.Array(Schema9.String))
|
|
1442
|
+
});
|
|
1443
|
+
var GitHubProjectStatusConfig = Schema9.Struct({
|
|
1444
|
+
enabled: Schema9.optional(Schema9.Boolean),
|
|
1445
|
+
projectId: Schema9.optional(Schema9.String),
|
|
1446
|
+
statusFieldId: Schema9.optional(Schema9.String),
|
|
1447
|
+
statuses: Schema9.optional(Schema9.Struct({
|
|
1448
|
+
running: Schema9.optional(Schema9.String),
|
|
1449
|
+
prOpen: Schema9.optional(Schema9.String),
|
|
1450
|
+
ciFixing: Schema9.optional(Schema9.String),
|
|
1451
|
+
done: Schema9.optional(Schema9.String),
|
|
1452
|
+
needsAttention: Schema9.optional(Schema9.String)
|
|
1453
|
+
}))
|
|
1454
|
+
});
|
|
1455
|
+
var GitHubConfig = Schema9.Struct({
|
|
1456
|
+
issueUpdates: Schema9.optional(Schema9.Literals(["lifecycle", "minimal", "off"])),
|
|
1457
|
+
projects: Schema9.optional(GitHubProjectStatusConfig)
|
|
1458
|
+
});
|
|
1459
|
+
var AutomationConfig = Schema9.Struct({
|
|
1460
|
+
maxValidationAttempts: Schema9.optional(Schema9.Number),
|
|
1461
|
+
maxPrFixIterations: Schema9.optional(Schema9.Number)
|
|
1462
|
+
});
|
|
1463
|
+
var PullRequestConfig = Schema9.Struct({
|
|
1464
|
+
mode: Schema9.optional(Schema9.Literals(["auto", "ask", "off"])),
|
|
1465
|
+
watchChecks: Schema9.optional(Schema9.Boolean),
|
|
1466
|
+
autoFixChecks: Schema9.optional(Schema9.Boolean),
|
|
1467
|
+
autoFixReview: Schema9.optional(Schema9.Boolean)
|
|
1468
|
+
});
|
|
1469
|
+
var MergeConfig = Schema9.Struct({
|
|
1470
|
+
mode: Schema9.optional(Schema9.Literals(["auto", "off", "pr-ready"])),
|
|
1471
|
+
method: Schema9.optional(Schema9.Literals(["repo-default", "squash", "merge", "rebase"])),
|
|
1472
|
+
deleteBranch: Schema9.optional(Schema9.Union([Schema9.Literal("repo-default"), Schema9.Boolean])),
|
|
1473
|
+
allowedFailures: Schema9.optional(Schema9.Array(Schema9.String)),
|
|
1474
|
+
bypass: Schema9.optional(Schema9.Boolean)
|
|
1475
|
+
});
|
|
1476
|
+
var IssueAnalysisConfig = Schema9.Struct({
|
|
1477
|
+
enabled: Schema9.optional(Schema9.Boolean),
|
|
1478
|
+
harness: Schema9.optional(Schema9.Literal("pi")),
|
|
1479
|
+
model: Schema9.optional(Schema9.String),
|
|
1480
|
+
mode: Schema9.optional(Schema9.Literals(["continuous", "off"]))
|
|
1481
|
+
});
|
|
1482
|
+
var ReviewConfig = Schema9.Struct({
|
|
1483
|
+
mode: Schema9.optional(Schema9.Literals(["off", "advisory", "required"])),
|
|
1484
|
+
provider: Schema9.optional(Schema9.Literal("greptile"))
|
|
1485
|
+
});
|
|
1486
|
+
var RigConfig = Schema9.Struct({
|
|
1487
|
+
project: ProjectIdentity,
|
|
1488
|
+
plugins: Schema9.Array(RigPlugin),
|
|
1489
|
+
taskSource: TaskSourceConfig,
|
|
1490
|
+
workspace: WorkspaceConfig,
|
|
1491
|
+
runtime: Schema9.optional(RuntimeConfig),
|
|
1492
|
+
planning: Schema9.optional(PlanningConfig),
|
|
1493
|
+
github: Schema9.optional(GitHubConfig),
|
|
1494
|
+
automation: Schema9.optional(AutomationConfig),
|
|
1495
|
+
pr: Schema9.optional(PullRequestConfig),
|
|
1496
|
+
merge: Schema9.optional(MergeConfig),
|
|
1497
|
+
review: Schema9.optional(ReviewConfig),
|
|
1498
|
+
issueAnalysis: Schema9.optional(IssueAnalysisConfig)
|
|
1499
|
+
});
|
|
1500
|
+
// packages/contracts/src/policy.ts
|
|
1501
|
+
import { Schema as Schema10 } from "effect";
|
|
1502
|
+
var PolicyDecision = Schema10.Literals(["allow", "warn", "block"]);
|
|
1503
|
+
var PolicyMode = Schema10.Literals(["off", "observe", "enforce"]);
|
|
1504
|
+
var PolicyDecisionSummary = Schema10.Struct({
|
|
1505
|
+
id: TrimmedNonEmptyString,
|
|
1506
|
+
runId: RunId,
|
|
1507
|
+
actionId: Schema10.NullOr(ActionId),
|
|
1508
|
+
decision: PolicyDecision,
|
|
1509
|
+
mode: PolicyMode,
|
|
1510
|
+
matchedRules: Schema10.Array(TrimmedNonEmptyString),
|
|
1511
|
+
reason: Schema10.String,
|
|
1512
|
+
createdAt: IsoDateTime
|
|
1513
|
+
});
|
|
1514
|
+
// packages/contracts/src/validation.ts
|
|
1515
|
+
import { Schema as Schema11 } from "effect";
|
|
1516
|
+
var ValidationStatus = Schema11.Literals([
|
|
1517
|
+
"pending",
|
|
1518
|
+
"running",
|
|
1519
|
+
"passed",
|
|
1520
|
+
"failed",
|
|
1521
|
+
"skipped"
|
|
1522
|
+
]);
|
|
1523
|
+
var ValidationSummary = Schema11.Struct({
|
|
1524
|
+
id: ValidationResultId,
|
|
1525
|
+
runId: RunId,
|
|
1526
|
+
taskId: Schema11.NullOr(TaskId),
|
|
1527
|
+
validatorKey: TrimmedNonEmptyString,
|
|
1528
|
+
status: ValidationStatus,
|
|
1529
|
+
output: Schema11.Unknown,
|
|
1530
|
+
startedAt: IsoDateTime,
|
|
1531
|
+
completedAt: Schema11.NullOr(IsoDateTime)
|
|
1532
|
+
});
|
|
1533
|
+
// packages/contracts/src/review.ts
|
|
1534
|
+
import { Schema as Schema12 } from "effect";
|
|
1535
|
+
var ReviewMode = Schema12.Literals(["off", "advisory", "required"]);
|
|
1536
|
+
var ReviewStatus = Schema12.Literals(["pending", "running", "approved", "rejected", "error"]);
|
|
1537
|
+
var ReviewSummary = Schema12.Struct({
|
|
1538
|
+
id: ReviewResultId,
|
|
1539
|
+
runId: RunId,
|
|
1540
|
+
taskId: Schema12.NullOr(TaskId),
|
|
1541
|
+
provider: TrimmedNonEmptyString,
|
|
1542
|
+
mode: ReviewMode,
|
|
1543
|
+
status: ReviewStatus,
|
|
1544
|
+
summary: Schema12.NullOr(Schema12.String),
|
|
1545
|
+
output: Schema12.Unknown,
|
|
1546
|
+
createdAt: IsoDateTime,
|
|
1547
|
+
completedAt: Schema12.NullOr(IsoDateTime)
|
|
1548
|
+
});
|
|
1549
|
+
// packages/contracts/src/artifact.ts
|
|
1550
|
+
import { Schema as Schema13 } from "effect";
|
|
1551
|
+
var ArtifactSummary = Schema13.Struct({
|
|
1552
|
+
id: ArtifactId,
|
|
1553
|
+
runId: RunId,
|
|
1554
|
+
taskId: Schema13.NullOr(TaskId),
|
|
1555
|
+
kind: TrimmedNonEmptyString,
|
|
1556
|
+
label: TrimmedNonEmptyString,
|
|
1557
|
+
path: Schema13.NullOr(TrimmedNonEmptyString),
|
|
1558
|
+
url: Schema13.NullOr(TrimmedNonEmptyString),
|
|
1559
|
+
metadata: Schema13.Record(Schema13.String, Schema13.Unknown),
|
|
1560
|
+
createdAt: IsoDateTime
|
|
1561
|
+
});
|
|
1562
|
+
// packages/contracts/src/engine.ts
|
|
1563
|
+
import { Schema as Schema15 } from "effect";
|
|
1564
|
+
|
|
1565
|
+
// packages/contracts/src/remote.ts
|
|
1566
|
+
import { Schema as Schema14 } from "effect";
|
|
1567
|
+
var RemoteEndpoint = Schema14.Struct({
|
|
1568
|
+
id: RemoteEndpointId,
|
|
1569
|
+
alias: TrimmedNonEmptyString,
|
|
1570
|
+
host: TrimmedNonEmptyString,
|
|
1571
|
+
port: Schema14.Int.check(Schema14.isGreaterThanOrEqualTo(1)).check(Schema14.isLessThanOrEqualTo(65535)),
|
|
1572
|
+
token: Schema14.String,
|
|
1573
|
+
tokenConfigured: Schema14.optional(Schema14.Boolean),
|
|
1574
|
+
autoConnect: Schema14.optional(Schema14.Boolean),
|
|
1575
|
+
addedAt: IsoDateTime,
|
|
1576
|
+
lastConnectedAt: Schema14.NullOr(IsoDateTime)
|
|
1577
|
+
});
|
|
1578
|
+
var RemoteConnectionStatus = Schema14.Literals([
|
|
1579
|
+
"disconnected",
|
|
1580
|
+
"connecting",
|
|
1581
|
+
"authenticating",
|
|
1582
|
+
"connected",
|
|
1583
|
+
"reconnecting",
|
|
1584
|
+
"error"
|
|
1585
|
+
]);
|
|
1586
|
+
var RemoteConnectionSummary = Schema14.Struct({
|
|
1587
|
+
endpointId: RemoteEndpointId,
|
|
1588
|
+
status: RemoteConnectionStatus,
|
|
1589
|
+
error: Schema14.NullOr(Schema14.String),
|
|
1590
|
+
connectedAt: Schema14.NullOr(IsoDateTime),
|
|
1591
|
+
tokenExpiresAt: Schema14.NullOr(IsoDateTime),
|
|
1592
|
+
latencyMs: Schema14.NullOr(Schema14.Number),
|
|
1593
|
+
subscribedEvents: Schema14.Array(Schema14.String)
|
|
1594
|
+
});
|
|
1595
|
+
var RemoteConnectionStatusChanged = Schema14.Struct({
|
|
1596
|
+
endpointId: Schema14.String,
|
|
1597
|
+
endpointAlias: Schema14.String,
|
|
1598
|
+
status: RemoteConnectionStatus,
|
|
1599
|
+
previousStatus: RemoteConnectionStatus,
|
|
1600
|
+
error: Schema14.NullOr(Schema14.String),
|
|
1601
|
+
connectedAt: Schema14.NullOr(Schema14.String),
|
|
1602
|
+
latencyMs: Schema14.NullOr(Schema14.Number),
|
|
1603
|
+
timestamp: Schema14.String
|
|
1604
|
+
});
|
|
1605
|
+
var EnrichedRemoteEvent = Schema14.Struct({
|
|
1606
|
+
endpointId: Schema14.String,
|
|
1607
|
+
endpointAlias: Schema14.String,
|
|
1608
|
+
receivedAt: Schema14.String,
|
|
1609
|
+
originalTimestamp: Schema14.optional(Schema14.NullOr(Schema14.String)),
|
|
1610
|
+
event: Schema14.Unknown
|
|
1611
|
+
});
|
|
1612
|
+
var RemoteOrchestratorState = Schema14.Struct({
|
|
1613
|
+
activeTaskId: Schema14.NullOr(Schema14.String),
|
|
1614
|
+
activeIteration: Schema14.NullOr(Schema14.Number),
|
|
1615
|
+
maxIterations: Schema14.Number,
|
|
1616
|
+
isPaused: Schema14.Boolean,
|
|
1617
|
+
isRunning: Schema14.Boolean,
|
|
1618
|
+
totalCompleted: NonNegativeInt,
|
|
1619
|
+
totalFailed: NonNegativeInt,
|
|
1620
|
+
lastActivity: Schema14.NullOr(IsoDateTime)
|
|
1621
|
+
});
|
|
1622
|
+
var RemoteOrchestrationSummary = Schema14.Struct({
|
|
1623
|
+
orchestrationId: TrimmedNonEmptyString,
|
|
1624
|
+
endpointId: RemoteEndpointId,
|
|
1625
|
+
status: Schema14.Literals(["running", "paused", "stopped", "completed"]),
|
|
1626
|
+
totalTasks: NonNegativeInt,
|
|
1627
|
+
totalGroups: NonNegativeInt,
|
|
1628
|
+
maxParallelism: NonNegativeInt,
|
|
1629
|
+
startedAt: IsoDateTime
|
|
1630
|
+
});
|
|
1631
|
+
var RemoteIterationOutput = Schema14.Struct({
|
|
1632
|
+
taskId: Schema14.optional(Schema14.String),
|
|
1633
|
+
iteration: Schema14.optional(Schema14.Number),
|
|
1634
|
+
output: Schema14.optional(Schema14.String),
|
|
1635
|
+
startedAt: Schema14.optional(IsoDateTime),
|
|
1636
|
+
endedAt: Schema14.optional(IsoDateTime),
|
|
1637
|
+
durationMs: Schema14.optional(Schema14.Number),
|
|
1638
|
+
isRunning: Schema14.optional(Schema14.Boolean)
|
|
1639
|
+
});
|
|
1640
|
+
var RemoteRunnerRegisterInput = Schema14.Struct({
|
|
1641
|
+
workspaceId: WorkspaceId,
|
|
1642
|
+
hostId: TrimmedNonEmptyString,
|
|
1643
|
+
name: TrimmedNonEmptyString,
|
|
1644
|
+
baseUrl: TrimmedNonEmptyString,
|
|
1645
|
+
workspacePath: Schema14.optional(TrimmedNonEmptyString),
|
|
1646
|
+
transport: Schema14.optional(TrimmedNonEmptyString),
|
|
1647
|
+
hostname: Schema14.optional(TrimmedNonEmptyString),
|
|
1648
|
+
region: Schema14.optional(TrimmedNonEmptyString),
|
|
1649
|
+
labels: Schema14.optional(Schema14.Array(TrimmedNonEmptyString)),
|
|
1650
|
+
capabilities: Schema14.optional(Schema14.Array(TrimmedNonEmptyString)),
|
|
1651
|
+
runtimeAdapters: Schema14.optional(Schema14.Array(TrimmedNonEmptyString)),
|
|
1652
|
+
status: Schema14.optional(WorkspaceRemoteHostStatus),
|
|
1653
|
+
currentLeaseCount: Schema14.optional(Schema14.Number)
|
|
1654
|
+
});
|
|
1655
|
+
var RemoteRunnerHeartbeatInput = Schema14.Struct({
|
|
1656
|
+
workspaceId: WorkspaceId,
|
|
1657
|
+
hostId: TrimmedNonEmptyString,
|
|
1658
|
+
status: WorkspaceRemoteHostStatus,
|
|
1659
|
+
currentLeaseCount: Schema14.optional(Schema14.Number),
|
|
1660
|
+
observedAt: Schema14.optional(IsoDateTime)
|
|
1661
|
+
});
|
|
1662
|
+
var RemoteRunnerLifecycleResult = Schema14.Struct({
|
|
1663
|
+
ok: Schema14.Boolean,
|
|
1664
|
+
workspaceId: WorkspaceId,
|
|
1665
|
+
hostId: TrimmedNonEmptyString,
|
|
1666
|
+
acceptedAt: IsoDateTime,
|
|
1667
|
+
heartbeatIntervalMs: Schema14.Number
|
|
1668
|
+
});
|
|
1669
|
+
var RemoteRunClaimInput = Schema14.Struct({
|
|
1670
|
+
workspaceId: WorkspaceId,
|
|
1671
|
+
hostId: TrimmedNonEmptyString,
|
|
1672
|
+
runtimeAdapters: Schema14.optional(Schema14.Array(TrimmedNonEmptyString))
|
|
1673
|
+
});
|
|
1674
|
+
var RemoteRunLeaseSummary = Schema14.Struct({
|
|
1675
|
+
leaseId: TrimmedNonEmptyString,
|
|
1676
|
+
runId: TrimmedNonEmptyString,
|
|
1677
|
+
workspaceId: WorkspaceId,
|
|
1678
|
+
title: TrimmedNonEmptyString,
|
|
1679
|
+
runtimeAdapter: TrimmedNonEmptyString,
|
|
1680
|
+
model: Schema14.NullOr(TrimmedNonEmptyString),
|
|
1681
|
+
runtimeMode: RuntimeMode,
|
|
1682
|
+
interactionMode: ProviderInteractionMode,
|
|
1683
|
+
executionTarget: RunExecutionTarget,
|
|
1684
|
+
remoteHostId: Schema14.NullOr(TrimmedNonEmptyString),
|
|
1685
|
+
claimedAt: IsoDateTime
|
|
1686
|
+
});
|
|
1687
|
+
var RemoteRunConversationEntry = Schema14.Struct({
|
|
1688
|
+
role: Schema14.Literals(["user", "assistant", "system"]),
|
|
1689
|
+
text: Schema14.String,
|
|
1690
|
+
createdAt: IsoDateTime
|
|
1691
|
+
});
|
|
1692
|
+
var RemoteRunExecutionBundle = Schema14.Struct({
|
|
1693
|
+
workspaceId: WorkspaceId,
|
|
1694
|
+
runId: TrimmedNonEmptyString,
|
|
1695
|
+
leaseId: TrimmedNonEmptyString,
|
|
1696
|
+
workspacePath: Schema14.NullOr(TrimmedNonEmptyString),
|
|
1697
|
+
runtimeAdapter: TrimmedNonEmptyString,
|
|
1698
|
+
model: Schema14.NullOr(TrimmedNonEmptyString),
|
|
1699
|
+
runtimeMode: RuntimeMode,
|
|
1700
|
+
interactionMode: ProviderInteractionMode,
|
|
1701
|
+
prompt: Schema14.String,
|
|
1702
|
+
conversation: Schema14.Array(RemoteRunConversationEntry),
|
|
1703
|
+
taskId: Schema14.NullOr(TrimmedNonEmptyString),
|
|
1704
|
+
taskTitle: Schema14.NullOr(TrimmedNonEmptyString)
|
|
1705
|
+
});
|
|
1706
|
+
var RemoteRunClaimResult = Schema14.Struct({
|
|
1707
|
+
ok: Schema14.Boolean,
|
|
1708
|
+
workspaceId: WorkspaceId,
|
|
1709
|
+
hostId: TrimmedNonEmptyString,
|
|
1710
|
+
acceptedAt: IsoDateTime,
|
|
1711
|
+
lease: Schema14.NullOr(RemoteRunLeaseSummary),
|
|
1712
|
+
bundle: Schema14.NullOr(RemoteRunExecutionBundle)
|
|
1713
|
+
});
|
|
1714
|
+
var RemoteRunReleaseInput = Schema14.Struct({
|
|
1715
|
+
workspaceId: WorkspaceId,
|
|
1716
|
+
hostId: TrimmedNonEmptyString,
|
|
1717
|
+
runId: TrimmedNonEmptyString,
|
|
1718
|
+
leaseId: TrimmedNonEmptyString,
|
|
1719
|
+
status: Schema14.optional(WorkspaceRemoteHostStatus)
|
|
1720
|
+
});
|
|
1721
|
+
var RemoteRunReleaseResult = Schema14.Struct({
|
|
1722
|
+
ok: Schema14.Boolean,
|
|
1723
|
+
workspaceId: WorkspaceId,
|
|
1724
|
+
hostId: TrimmedNonEmptyString,
|
|
1725
|
+
runId: TrimmedNonEmptyString,
|
|
1726
|
+
leaseId: TrimmedNonEmptyString,
|
|
1727
|
+
acceptedAt: IsoDateTime
|
|
1728
|
+
});
|
|
1729
|
+
var RemoteRunStartInput = Schema14.Struct({
|
|
1730
|
+
workspaceId: WorkspaceId,
|
|
1731
|
+
hostId: TrimmedNonEmptyString,
|
|
1732
|
+
runId: TrimmedNonEmptyString,
|
|
1733
|
+
leaseId: TrimmedNonEmptyString
|
|
1734
|
+
});
|
|
1735
|
+
var RemoteRunStartResult = Schema14.Struct({
|
|
1736
|
+
ok: Schema14.Boolean,
|
|
1737
|
+
workspaceId: WorkspaceId,
|
|
1738
|
+
hostId: TrimmedNonEmptyString,
|
|
1739
|
+
runId: TrimmedNonEmptyString,
|
|
1740
|
+
leaseId: TrimmedNonEmptyString,
|
|
1741
|
+
runtimeId: TrimmedNonEmptyString,
|
|
1742
|
+
acceptedAt: IsoDateTime
|
|
1743
|
+
});
|
|
1744
|
+
var RemoteRunLogInput = Schema14.Struct({
|
|
1745
|
+
workspaceId: WorkspaceId,
|
|
1746
|
+
hostId: TrimmedNonEmptyString,
|
|
1747
|
+
runId: TrimmedNonEmptyString,
|
|
1748
|
+
leaseId: TrimmedNonEmptyString,
|
|
1749
|
+
title: TrimmedNonEmptyString,
|
|
1750
|
+
detail: Schema14.optional(Schema14.String),
|
|
1751
|
+
tone: Schema14.optional(EngineLogTone),
|
|
1752
|
+
status: Schema14.optional(TrimmedNonEmptyString),
|
|
1753
|
+
payload: Schema14.optional(Schema14.Unknown)
|
|
1754
|
+
});
|
|
1755
|
+
var RemoteRunMessageInput = Schema14.Struct({
|
|
1756
|
+
workspaceId: WorkspaceId,
|
|
1757
|
+
hostId: TrimmedNonEmptyString,
|
|
1758
|
+
runId: TrimmedNonEmptyString,
|
|
1759
|
+
leaseId: TrimmedNonEmptyString,
|
|
1760
|
+
messageId: Schema14.optional(TrimmedNonEmptyString),
|
|
1761
|
+
text: Schema14.String,
|
|
1762
|
+
state: Schema14.optional(Schema14.Literals(["streaming", "completed"]))
|
|
1763
|
+
});
|
|
1764
|
+
var RemoteRunMutationResult = Schema14.Struct({
|
|
1765
|
+
ok: Schema14.Boolean,
|
|
1766
|
+
workspaceId: WorkspaceId,
|
|
1767
|
+
hostId: TrimmedNonEmptyString,
|
|
1768
|
+
runId: TrimmedNonEmptyString,
|
|
1769
|
+
leaseId: TrimmedNonEmptyString,
|
|
1770
|
+
acceptedAt: IsoDateTime
|
|
1771
|
+
});
|
|
1772
|
+
var RemoteRunCompleteInput = Schema14.Struct({
|
|
1773
|
+
workspaceId: WorkspaceId,
|
|
1774
|
+
hostId: TrimmedNonEmptyString,
|
|
1775
|
+
runId: TrimmedNonEmptyString,
|
|
1776
|
+
leaseId: TrimmedNonEmptyString
|
|
1777
|
+
});
|
|
1778
|
+
var RemoteRunFailInput = Schema14.Struct({
|
|
1779
|
+
workspaceId: WorkspaceId,
|
|
1780
|
+
hostId: TrimmedNonEmptyString,
|
|
1781
|
+
runId: TrimmedNonEmptyString,
|
|
1782
|
+
leaseId: TrimmedNonEmptyString,
|
|
1783
|
+
errorText: Schema14.optional(Schema14.String)
|
|
1784
|
+
});
|
|
1785
|
+
var RemoteRunArtifactInput = Schema14.Struct({
|
|
1786
|
+
workspaceId: WorkspaceId,
|
|
1787
|
+
hostId: TrimmedNonEmptyString,
|
|
1788
|
+
runId: TrimmedNonEmptyString,
|
|
1789
|
+
leaseId: TrimmedNonEmptyString,
|
|
1790
|
+
kind: TrimmedNonEmptyString,
|
|
1791
|
+
label: TrimmedNonEmptyString,
|
|
1792
|
+
filename: TrimmedNonEmptyString,
|
|
1793
|
+
contentType: TrimmedNonEmptyString,
|
|
1794
|
+
contentBase64: TrimmedNonEmptyString
|
|
1795
|
+
});
|
|
1796
|
+
var RemoteRunArtifactResult = Schema14.Struct({
|
|
1797
|
+
ok: Schema14.Boolean,
|
|
1798
|
+
workspaceId: WorkspaceId,
|
|
1799
|
+
hostId: TrimmedNonEmptyString,
|
|
1800
|
+
runId: TrimmedNonEmptyString,
|
|
1801
|
+
leaseId: TrimmedNonEmptyString,
|
|
1802
|
+
acceptedAt: IsoDateTime,
|
|
1803
|
+
artifactPath: TrimmedNonEmptyString
|
|
1804
|
+
});
|
|
1805
|
+
var RemoteRunArtifactSummary = Schema14.Struct({
|
|
1806
|
+
workspaceId: WorkspaceId,
|
|
1807
|
+
runId: TrimmedNonEmptyString,
|
|
1808
|
+
hostId: TrimmedNonEmptyString,
|
|
1809
|
+
leaseId: TrimmedNonEmptyString,
|
|
1810
|
+
kind: TrimmedNonEmptyString,
|
|
1811
|
+
label: TrimmedNonEmptyString,
|
|
1812
|
+
filename: TrimmedNonEmptyString,
|
|
1813
|
+
contentType: TrimmedNonEmptyString,
|
|
1814
|
+
uploadedAt: IsoDateTime,
|
|
1815
|
+
byteSize: Schema14.Number,
|
|
1816
|
+
artifactPath: TrimmedNonEmptyString,
|
|
1817
|
+
downloadPath: TrimmedNonEmptyString
|
|
1818
|
+
});
|
|
1819
|
+
var RemoteRunArtifactsResult = Schema14.Struct({
|
|
1820
|
+
workspaceId: WorkspaceId,
|
|
1821
|
+
runId: TrimmedNonEmptyString,
|
|
1822
|
+
artifacts: Schema14.Array(RemoteRunArtifactSummary)
|
|
1823
|
+
});
|
|
1824
|
+
|
|
1825
|
+
// packages/contracts/src/engine.ts
|
|
1826
|
+
var EngineEvent = Schema15.Struct({
|
|
1827
|
+
id: EventId,
|
|
1828
|
+
sequence: NonNegativeInt,
|
|
1829
|
+
createdAt: IsoDateTime,
|
|
1830
|
+
type: TrimmedNonEmptyString,
|
|
1831
|
+
aggregateId: TrimmedNonEmptyString,
|
|
1832
|
+
payload: Schema15.Unknown
|
|
1833
|
+
});
|
|
1834
|
+
var EngineReadModel = Schema15.Struct({
|
|
1835
|
+
snapshotSequence: NonNegativeInt,
|
|
1836
|
+
workspaces: Schema15.Array(WorkspaceSummary),
|
|
1837
|
+
graphs: Schema15.Array(GraphSummary),
|
|
1838
|
+
tasks: Schema15.Array(TaskSummary),
|
|
1839
|
+
runs: Schema15.Array(RunSummary),
|
|
1840
|
+
runtimes: Schema15.Array(RuntimeSummary),
|
|
1841
|
+
conversations: Schema15.Array(ConversationSummary),
|
|
1842
|
+
messages: Schema15.Array(EngineMessage),
|
|
1843
|
+
actions: Schema15.Array(EngineAction),
|
|
1844
|
+
logs: Schema15.Array(EngineRunLog),
|
|
1845
|
+
approvals: Schema15.Array(ApprovalSummary),
|
|
1846
|
+
userInputs: Schema15.optional(Schema15.Array(UserInputRequestSummary)),
|
|
1847
|
+
validations: Schema15.Array(ValidationSummary),
|
|
1848
|
+
reviews: Schema15.Array(ReviewSummary),
|
|
1849
|
+
artifacts: Schema15.Array(ArtifactSummary),
|
|
1850
|
+
policyDecisions: Schema15.Array(PolicyDecisionSummary),
|
|
1851
|
+
queue: Schema15.Array(QueueEntry),
|
|
1852
|
+
worktrees: Schema15.Array(WorktreeSummary),
|
|
1853
|
+
remoteEndpoints: Schema15.Array(RemoteEndpoint),
|
|
1854
|
+
remoteConnections: Schema15.Array(RemoteConnectionSummary),
|
|
1855
|
+
remoteOrchestrations: Schema15.Array(RemoteOrchestrationSummary),
|
|
1856
|
+
updatedAt: IsoDateTime
|
|
1857
|
+
});
|
|
1858
|
+
var RuntimeAdapterKind = Schema15.Literals(["codex", "claude-code", "pi"]);
|
|
1859
|
+
var WorkspaceRegisterCommand = Schema15.Struct({
|
|
1860
|
+
type: Schema15.Literal("workspace.register"),
|
|
1861
|
+
commandId: CommandId,
|
|
1862
|
+
workspaceId: WorkspaceId,
|
|
1863
|
+
title: TrimmedNonEmptyString,
|
|
1864
|
+
rootPath: TrimmedNonEmptyString,
|
|
1865
|
+
defaultModel: Schema15.optional(TrimmedNonEmptyString),
|
|
1866
|
+
createdAt: IsoDateTime
|
|
1867
|
+
});
|
|
1868
|
+
var WorkspaceImportRigCommand = Schema15.Struct({
|
|
1869
|
+
type: Schema15.Literal("workspace.importRig"),
|
|
1870
|
+
commandId: CommandId,
|
|
1871
|
+
workspaceId: WorkspaceId,
|
|
1872
|
+
rootPath: TrimmedNonEmptyString,
|
|
1873
|
+
title: Schema15.optional(TrimmedNonEmptyString),
|
|
1874
|
+
createdAt: IsoDateTime
|
|
1875
|
+
});
|
|
1876
|
+
var RunCreateAdhocCommand = Schema15.Struct({
|
|
1877
|
+
type: Schema15.Literal("run.createAdhoc"),
|
|
1878
|
+
commandId: CommandId,
|
|
1879
|
+
runId: RunId,
|
|
1880
|
+
workspaceId: WorkspaceId,
|
|
1881
|
+
title: TrimmedNonEmptyString,
|
|
1882
|
+
runtimeAdapter: Schema15.optional(RuntimeAdapterKind),
|
|
1883
|
+
model: Schema15.optional(TrimmedNonEmptyString),
|
|
1884
|
+
executionTarget: Schema15.optional(RunExecutionTarget),
|
|
1885
|
+
remoteHostId: Schema15.optional(TrimmedNonEmptyString),
|
|
1886
|
+
runtimeMode: RuntimeMode.pipe(Schema15.withDecodingDefault(() => DEFAULT_RUNTIME_MODE)),
|
|
1887
|
+
interactionMode: ProviderInteractionMode.pipe(Schema15.withDecodingDefault(() => DEFAULT_PROVIDER_INTERACTION_MODE)),
|
|
1888
|
+
initialPrompt: Schema15.optional(Schema15.String),
|
|
1889
|
+
createdAt: IsoDateTime
|
|
1890
|
+
});
|
|
1891
|
+
var RunCreateForTaskCommand = Schema15.Struct({
|
|
1892
|
+
type: Schema15.Literal("run.createForTask"),
|
|
1893
|
+
commandId: CommandId,
|
|
1894
|
+
runId: RunId,
|
|
1895
|
+
workspaceId: WorkspaceId,
|
|
1896
|
+
taskId: TaskId,
|
|
1897
|
+
runtimeAdapter: Schema15.optional(RuntimeAdapterKind),
|
|
1898
|
+
model: Schema15.optional(TrimmedNonEmptyString),
|
|
1899
|
+
executionTarget: Schema15.optional(RunExecutionTarget),
|
|
1900
|
+
remoteHostId: Schema15.optional(TrimmedNonEmptyString),
|
|
1901
|
+
runtimeMode: RuntimeMode.pipe(Schema15.withDecodingDefault(() => DEFAULT_RUNTIME_MODE)),
|
|
1902
|
+
interactionMode: ProviderInteractionMode.pipe(Schema15.withDecodingDefault(() => DEFAULT_PROVIDER_INTERACTION_MODE)),
|
|
1903
|
+
createdAt: IsoDateTime
|
|
1904
|
+
});
|
|
1905
|
+
var RunSubmitUserMessageCommand = Schema15.Struct({
|
|
1906
|
+
type: Schema15.Literal("run.submitUserMessage"),
|
|
1907
|
+
commandId: CommandId,
|
|
1908
|
+
runId: RunId,
|
|
1909
|
+
messageId: MessageId,
|
|
1910
|
+
text: Schema15.String,
|
|
1911
|
+
attachments: Schema15.optional(Schema15.Array(Schema15.Unknown)),
|
|
1912
|
+
createdAt: IsoDateTime
|
|
1913
|
+
});
|
|
1914
|
+
var RunInterruptCommand = Schema15.Struct({
|
|
1915
|
+
type: Schema15.Literal("run.interrupt"),
|
|
1916
|
+
commandId: CommandId,
|
|
1917
|
+
runId: RunId,
|
|
1918
|
+
createdAt: IsoDateTime
|
|
1919
|
+
});
|
|
1920
|
+
var RunStopCommand = Schema15.Struct({
|
|
1921
|
+
type: Schema15.Literal("run.stop"),
|
|
1922
|
+
commandId: CommandId,
|
|
1923
|
+
runId: RunId,
|
|
1924
|
+
createdAt: IsoDateTime
|
|
1925
|
+
});
|
|
1926
|
+
var RunSetRuntimeModeCommand = Schema15.Struct({
|
|
1927
|
+
type: Schema15.Literal("run.setRuntimeMode"),
|
|
1928
|
+
commandId: CommandId,
|
|
1929
|
+
runId: RunId,
|
|
1930
|
+
runtimeMode: RuntimeMode,
|
|
1931
|
+
createdAt: IsoDateTime
|
|
1932
|
+
});
|
|
1933
|
+
var RunSetInteractionModeCommand = Schema15.Struct({
|
|
1934
|
+
type: Schema15.Literal("run.setInteractionMode"),
|
|
1935
|
+
commandId: CommandId,
|
|
1936
|
+
runId: RunId,
|
|
1937
|
+
interactionMode: ProviderInteractionMode,
|
|
1938
|
+
createdAt: IsoDateTime
|
|
1939
|
+
});
|
|
1940
|
+
var RunRespondApprovalCommand = Schema15.Struct({
|
|
1941
|
+
type: Schema15.Literal("run.respondApproval"),
|
|
1942
|
+
commandId: CommandId,
|
|
1943
|
+
runId: RunId,
|
|
1944
|
+
requestId: ApprovalRequestId,
|
|
1945
|
+
decision: ProviderApprovalDecision,
|
|
1946
|
+
createdAt: IsoDateTime
|
|
1947
|
+
});
|
|
1948
|
+
var RunRespondUserInputCommand = Schema15.Struct({
|
|
1949
|
+
type: Schema15.Literal("run.respondUserInput"),
|
|
1950
|
+
commandId: CommandId,
|
|
1951
|
+
runId: RunId,
|
|
1952
|
+
requestId: ApprovalRequestId,
|
|
1953
|
+
answers: ProviderUserInputAnswers,
|
|
1954
|
+
createdAt: IsoDateTime
|
|
1955
|
+
});
|
|
1956
|
+
var RuntimePrepareCommand = Schema15.Struct({
|
|
1957
|
+
type: Schema15.Literal("runtime.prepare"),
|
|
1958
|
+
commandId: CommandId,
|
|
1959
|
+
runId: RunId,
|
|
1960
|
+
workspaceId: WorkspaceId,
|
|
1961
|
+
adapter: RuntimeAdapterKind,
|
|
1962
|
+
executionTarget: Schema15.optional(RunExecutionTarget),
|
|
1963
|
+
remoteHostId: Schema15.optional(TrimmedNonEmptyString),
|
|
1964
|
+
model: Schema15.optional(TrimmedNonEmptyString),
|
|
1965
|
+
createdAt: IsoDateTime
|
|
1966
|
+
});
|
|
1967
|
+
var RuntimeAttachCommand = Schema15.Struct({
|
|
1968
|
+
type: Schema15.Literal("runtime.attach"),
|
|
1969
|
+
commandId: CommandId,
|
|
1970
|
+
runId: RunId,
|
|
1971
|
+
runtimeId: EngineRuntimeId,
|
|
1972
|
+
createdAt: IsoDateTime
|
|
1973
|
+
});
|
|
1974
|
+
var RuntimeDetachCommand = Schema15.Struct({
|
|
1975
|
+
type: Schema15.Literal("runtime.detach"),
|
|
1976
|
+
commandId: CommandId,
|
|
1977
|
+
runId: RunId,
|
|
1978
|
+
reason: TrimmedNonEmptyString,
|
|
1979
|
+
createdAt: IsoDateTime
|
|
1980
|
+
});
|
|
1981
|
+
var GraphUpdateTaskStatusCommand = Schema15.Struct({
|
|
1982
|
+
type: Schema15.Literal("graph.updateTaskStatus"),
|
|
1983
|
+
commandId: CommandId,
|
|
1984
|
+
taskId: TaskId,
|
|
1985
|
+
status: TaskStatus,
|
|
1986
|
+
createdAt: IsoDateTime
|
|
1987
|
+
});
|
|
1988
|
+
var TaskEnqueueCommand = Schema15.Struct({
|
|
1989
|
+
type: Schema15.Literal("task.enqueue"),
|
|
1990
|
+
commandId: CommandId,
|
|
1991
|
+
taskId: TaskId,
|
|
1992
|
+
score: NonNegativeInt,
|
|
1993
|
+
createdAt: IsoDateTime
|
|
1994
|
+
});
|
|
1995
|
+
var WorkspaceHydrateImportedStateCommand = Schema15.Struct({
|
|
1996
|
+
type: Schema15.Literal("workspace.hydrateImportedState"),
|
|
1997
|
+
commandId: CommandId,
|
|
1998
|
+
workspaceId: WorkspaceId,
|
|
1999
|
+
rootPath: Schema15.optional(Schema15.String),
|
|
2000
|
+
graph: GraphSummary,
|
|
2001
|
+
tasks: Schema15.Array(TaskSummary),
|
|
2002
|
+
runs: Schema15.Array(RunSummary),
|
|
2003
|
+
runtimes: Schema15.Array(RuntimeSummary),
|
|
2004
|
+
actions: Schema15.Array(EngineAction),
|
|
2005
|
+
logs: Schema15.optional(Schema15.Array(EngineRunLog)),
|
|
2006
|
+
validations: Schema15.Array(ValidationSummary),
|
|
2007
|
+
reviews: Schema15.Array(ReviewSummary),
|
|
2008
|
+
artifacts: Schema15.Array(ArtifactSummary),
|
|
2009
|
+
policyDecisions: Schema15.Array(PolicyDecisionSummary),
|
|
2010
|
+
queue: Schema15.Array(QueueEntry),
|
|
2011
|
+
createdAt: IsoDateTime
|
|
2012
|
+
});
|
|
2013
|
+
var WorkspaceCompileTopologyCommand = Schema15.Struct({
|
|
2014
|
+
type: Schema15.Literal("workspace.compileTopology"),
|
|
2015
|
+
commandId: CommandId,
|
|
2016
|
+
workspaceId: WorkspaceId,
|
|
2017
|
+
rootPath: TrimmedNonEmptyString,
|
|
2018
|
+
topology: WorkspaceTopologySummary,
|
|
2019
|
+
createdAt: IsoDateTime
|
|
2020
|
+
});
|
|
2021
|
+
var WorkspaceSyncRemoteFleetCommand = Schema15.Struct({
|
|
2022
|
+
type: Schema15.Literal("workspace.syncRemoteFleet"),
|
|
2023
|
+
commandId: CommandId,
|
|
2024
|
+
workspaceId: WorkspaceId,
|
|
2025
|
+
rootPath: TrimmedNonEmptyString,
|
|
2026
|
+
remoteFleet: WorkspaceRemoteFleetSummary,
|
|
2027
|
+
createdAt: IsoDateTime
|
|
2028
|
+
});
|
|
2029
|
+
var WorkspaceSyncServiceFabricCommand = Schema15.Struct({
|
|
2030
|
+
type: Schema15.Literal("workspace.syncServiceFabric"),
|
|
2031
|
+
commandId: CommandId,
|
|
2032
|
+
workspaceId: WorkspaceId,
|
|
2033
|
+
rootPath: TrimmedNonEmptyString,
|
|
2034
|
+
serviceFabric: WorkspaceServiceFabricSummary,
|
|
2035
|
+
createdAt: IsoDateTime
|
|
2036
|
+
});
|
|
2037
|
+
var WorkspaceRegisterRemoteHostCommand = Schema15.Struct({
|
|
2038
|
+
type: Schema15.Literal("workspace.registerRemoteHost"),
|
|
2039
|
+
commandId: CommandId,
|
|
2040
|
+
workspaceId: WorkspaceId,
|
|
2041
|
+
host: Schema15.Struct({
|
|
2042
|
+
id: TrimmedNonEmptyString,
|
|
2043
|
+
name: TrimmedNonEmptyString,
|
|
2044
|
+
baseUrl: TrimmedNonEmptyString,
|
|
2045
|
+
workspacePath: Schema15.NullOr(TrimmedNonEmptyString),
|
|
2046
|
+
transport: TrimmedNonEmptyString,
|
|
2047
|
+
hostname: Schema15.NullOr(TrimmedNonEmptyString),
|
|
2048
|
+
region: Schema15.NullOr(TrimmedNonEmptyString),
|
|
2049
|
+
labels: Schema15.Array(TrimmedNonEmptyString),
|
|
2050
|
+
capabilities: Schema15.Array(TrimmedNonEmptyString),
|
|
2051
|
+
runtimeAdapters: Schema15.Array(TrimmedNonEmptyString),
|
|
2052
|
+
status: Schema15.Literals([
|
|
2053
|
+
"registering",
|
|
2054
|
+
"ready",
|
|
2055
|
+
"busy",
|
|
2056
|
+
"degraded",
|
|
2057
|
+
"draining",
|
|
2058
|
+
"offline",
|
|
2059
|
+
"quarantined"
|
|
2060
|
+
]),
|
|
2061
|
+
currentLeaseCount: Schema15.Number,
|
|
2062
|
+
lastHeartbeatAt: Schema15.NullOr(IsoDateTime),
|
|
2063
|
+
registeredAt: IsoDateTime,
|
|
2064
|
+
manifestPath: TrimmedNonEmptyString
|
|
2065
|
+
}),
|
|
2066
|
+
createdAt: IsoDateTime
|
|
2067
|
+
});
|
|
2068
|
+
var WorkspaceUpdateRemoteHostStatusCommand = Schema15.Struct({
|
|
2069
|
+
type: Schema15.Literal("workspace.updateRemoteHostStatus"),
|
|
2070
|
+
commandId: CommandId,
|
|
2071
|
+
workspaceId: WorkspaceId,
|
|
2072
|
+
hostId: TrimmedNonEmptyString,
|
|
2073
|
+
status: Schema15.Literals([
|
|
2074
|
+
"registering",
|
|
2075
|
+
"ready",
|
|
2076
|
+
"busy",
|
|
2077
|
+
"degraded",
|
|
2078
|
+
"draining",
|
|
2079
|
+
"offline",
|
|
2080
|
+
"quarantined"
|
|
2081
|
+
]),
|
|
2082
|
+
currentLeaseCount: Schema15.optional(Schema15.Number),
|
|
2083
|
+
lastHeartbeatAt: Schema15.optional(IsoDateTime),
|
|
2084
|
+
createdAt: IsoDateTime
|
|
2085
|
+
});
|
|
2086
|
+
var RunClaimRemoteLeaseCommand = Schema15.Struct({
|
|
2087
|
+
type: Schema15.Literal("run.claimRemoteLease"),
|
|
2088
|
+
commandId: CommandId,
|
|
2089
|
+
runId: RunId,
|
|
2090
|
+
hostId: TrimmedNonEmptyString,
|
|
2091
|
+
leaseId: TrimmedNonEmptyString,
|
|
2092
|
+
createdAt: IsoDateTime
|
|
2093
|
+
});
|
|
2094
|
+
var RunReleaseRemoteLeaseCommand = Schema15.Struct({
|
|
2095
|
+
type: Schema15.Literal("run.releaseRemoteLease"),
|
|
2096
|
+
commandId: CommandId,
|
|
2097
|
+
runId: RunId,
|
|
2098
|
+
leaseId: TrimmedNonEmptyString,
|
|
2099
|
+
createdAt: IsoDateTime
|
|
2100
|
+
});
|
|
2101
|
+
var RuntimeRecordMessageCommand = Schema15.Struct({
|
|
2102
|
+
type: Schema15.Literal("runtime.recordMessage"),
|
|
2103
|
+
commandId: CommandId,
|
|
2104
|
+
runId: RunId,
|
|
2105
|
+
messageId: MessageId,
|
|
2106
|
+
role: EngineMessageRole,
|
|
2107
|
+
text: Schema15.String,
|
|
2108
|
+
state: EngineMessageState,
|
|
2109
|
+
attachments: Schema15.optional(Schema15.Array(Schema15.Unknown)),
|
|
2110
|
+
createdAt: IsoDateTime,
|
|
2111
|
+
completedAt: Schema15.optional(IsoDateTime)
|
|
2112
|
+
});
|
|
2113
|
+
var RuntimeStartActionCommand = Schema15.Struct({
|
|
2114
|
+
type: Schema15.Literal("runtime.startAction"),
|
|
2115
|
+
commandId: CommandId,
|
|
2116
|
+
runId: RunId,
|
|
2117
|
+
actionId: ActionId,
|
|
2118
|
+
messageId: Schema15.optional(MessageId),
|
|
2119
|
+
actionType: TrimmedNonEmptyString,
|
|
2120
|
+
title: TrimmedNonEmptyString,
|
|
2121
|
+
detail: Schema15.optional(Schema15.String),
|
|
2122
|
+
payload: Schema15.Unknown,
|
|
2123
|
+
createdAt: IsoDateTime
|
|
2124
|
+
});
|
|
2125
|
+
var RuntimeCompleteActionCommand = Schema15.Struct({
|
|
2126
|
+
type: Schema15.Literal("runtime.completeAction"),
|
|
2127
|
+
commandId: CommandId,
|
|
2128
|
+
runId: RunId,
|
|
2129
|
+
actionId: ActionId,
|
|
2130
|
+
state: TrimmedNonEmptyString,
|
|
2131
|
+
detail: Schema15.optional(Schema15.String),
|
|
2132
|
+
payload: Schema15.Unknown,
|
|
2133
|
+
createdAt: IsoDateTime
|
|
2134
|
+
});
|
|
2135
|
+
var RuntimeRecordLogCommand = Schema15.Struct({
|
|
2136
|
+
type: Schema15.Literal("runtime.recordLog"),
|
|
2137
|
+
commandId: CommandId,
|
|
2138
|
+
runId: RunId,
|
|
2139
|
+
logId: TrimmedNonEmptyString,
|
|
2140
|
+
title: TrimmedNonEmptyString,
|
|
2141
|
+
detail: Schema15.optional(Schema15.String),
|
|
2142
|
+
tone: EngineLogTone,
|
|
2143
|
+
status: Schema15.optional(TrimmedNonEmptyString),
|
|
2144
|
+
payload: Schema15.optional(Schema15.Unknown),
|
|
2145
|
+
createdAt: IsoDateTime
|
|
2146
|
+
});
|
|
2147
|
+
var RuntimeUpdateMetadataCommand = Schema15.Struct({
|
|
2148
|
+
type: Schema15.Literal("runtime.updateMetadata"),
|
|
2149
|
+
commandId: CommandId,
|
|
2150
|
+
runId: RunId,
|
|
2151
|
+
runtimeId: EngineRuntimeId,
|
|
2152
|
+
sandboxMode: Schema15.optional(EngineSandboxMode),
|
|
2153
|
+
isolationMode: Schema15.optional(IsolationMode),
|
|
2154
|
+
workspaceDir: Schema15.optional(Schema15.NullOr(TrimmedNonEmptyString)),
|
|
2155
|
+
homeDir: Schema15.optional(Schema15.NullOr(TrimmedNonEmptyString)),
|
|
2156
|
+
tmpDir: Schema15.optional(Schema15.NullOr(TrimmedNonEmptyString)),
|
|
2157
|
+
cacheDir: Schema15.optional(Schema15.NullOr(TrimmedNonEmptyString)),
|
|
2158
|
+
logsDir: Schema15.optional(Schema15.NullOr(TrimmedNonEmptyString)),
|
|
2159
|
+
stateDir: Schema15.optional(Schema15.NullOr(TrimmedNonEmptyString)),
|
|
2160
|
+
sessionDir: Schema15.optional(Schema15.NullOr(TrimmedNonEmptyString)),
|
|
2161
|
+
sessionLogPath: Schema15.optional(Schema15.NullOr(TrimmedNonEmptyString)),
|
|
2162
|
+
pid: Schema15.optional(NonNegativeInt),
|
|
2163
|
+
worktreePath: Schema15.optional(Schema15.NullOr(TrimmedNonEmptyString)),
|
|
2164
|
+
branch: Schema15.optional(Schema15.NullOr(TrimmedNonEmptyString)),
|
|
2165
|
+
createdAt: IsoDateTime
|
|
2166
|
+
});
|
|
2167
|
+
var RuntimeRequestApprovalCommand = Schema15.Struct({
|
|
2168
|
+
type: Schema15.Literal("runtime.requestApproval"),
|
|
2169
|
+
commandId: CommandId,
|
|
2170
|
+
runId: RunId,
|
|
2171
|
+
requestId: ApprovalRequestId,
|
|
2172
|
+
requestKind: TrimmedNonEmptyString,
|
|
2173
|
+
actionId: Schema15.optional(ActionId),
|
|
2174
|
+
payload: Schema15.Unknown,
|
|
2175
|
+
createdAt: IsoDateTime
|
|
2176
|
+
});
|
|
2177
|
+
var RuntimeRequestUserInputCommand = Schema15.Struct({
|
|
2178
|
+
type: Schema15.Literal("runtime.requestUserInput"),
|
|
2179
|
+
commandId: CommandId,
|
|
2180
|
+
runId: RunId,
|
|
2181
|
+
requestId: ApprovalRequestId,
|
|
2182
|
+
payload: Schema15.Unknown,
|
|
2183
|
+
createdAt: IsoDateTime
|
|
2184
|
+
});
|
|
2185
|
+
var RunMarkCompletedCommand = Schema15.Struct({
|
|
2186
|
+
type: Schema15.Literal("run.markCompleted"),
|
|
2187
|
+
commandId: CommandId,
|
|
2188
|
+
runId: RunId,
|
|
2189
|
+
createdAt: IsoDateTime
|
|
2190
|
+
});
|
|
2191
|
+
var RunMarkFailedCommand = Schema15.Struct({
|
|
2192
|
+
type: Schema15.Literal("run.markFailed"),
|
|
2193
|
+
commandId: CommandId,
|
|
2194
|
+
runId: RunId,
|
|
2195
|
+
errorText: Schema15.optional(Schema15.String),
|
|
2196
|
+
createdAt: IsoDateTime
|
|
2197
|
+
});
|
|
2198
|
+
var RunSetStatusCommand = Schema15.Struct({
|
|
2199
|
+
type: Schema15.Literal("run.setStatus"),
|
|
2200
|
+
commandId: CommandId,
|
|
2201
|
+
runId: RunId,
|
|
2202
|
+
status: Schema15.Literals(["created", "queued", "preparing", "running", "validating", "reviewing", "paused"]),
|
|
2203
|
+
createdAt: IsoDateTime
|
|
2204
|
+
});
|
|
2205
|
+
var RuntimeRecordValidationCommand = Schema15.Struct({
|
|
2206
|
+
type: Schema15.Literal("runtime.recordValidation"),
|
|
2207
|
+
commandId: CommandId,
|
|
2208
|
+
runId: RunId,
|
|
2209
|
+
taskId: Schema15.optional(Schema15.NullOr(TaskId)),
|
|
2210
|
+
validationId: ValidationResultId,
|
|
2211
|
+
validatorKey: TrimmedNonEmptyString,
|
|
2212
|
+
status: Schema15.Literals(["pending", "running", "passed", "failed", "skipped"]),
|
|
2213
|
+
output: Schema15.Unknown,
|
|
2214
|
+
startedAt: IsoDateTime,
|
|
2215
|
+
completedAt: Schema15.optional(Schema15.NullOr(IsoDateTime)),
|
|
2216
|
+
createdAt: IsoDateTime
|
|
2217
|
+
});
|
|
2218
|
+
var RuntimeRecordReviewCommand = Schema15.Struct({
|
|
2219
|
+
type: Schema15.Literal("runtime.recordReview"),
|
|
2220
|
+
commandId: CommandId,
|
|
2221
|
+
runId: RunId,
|
|
2222
|
+
taskId: Schema15.optional(Schema15.NullOr(TaskId)),
|
|
2223
|
+
reviewId: ReviewResultId,
|
|
2224
|
+
provider: TrimmedNonEmptyString,
|
|
2225
|
+
mode: Schema15.Literals(["off", "advisory", "required"]),
|
|
2226
|
+
status: Schema15.Literals(["pending", "running", "approved", "rejected", "error"]),
|
|
2227
|
+
summary: Schema15.optional(Schema15.NullOr(Schema15.String)),
|
|
2228
|
+
output: Schema15.Unknown,
|
|
2229
|
+
createdAt: IsoDateTime,
|
|
2230
|
+
completedAt: Schema15.optional(Schema15.NullOr(IsoDateTime))
|
|
2231
|
+
});
|
|
2232
|
+
var RuntimeRegisterArtifactCommand = Schema15.Struct({
|
|
2233
|
+
type: Schema15.Literal("runtime.registerArtifact"),
|
|
2234
|
+
commandId: CommandId,
|
|
2235
|
+
runId: RunId,
|
|
2236
|
+
taskId: Schema15.optional(Schema15.NullOr(TaskId)),
|
|
2237
|
+
artifactId: ArtifactId,
|
|
2238
|
+
kind: TrimmedNonEmptyString,
|
|
2239
|
+
label: TrimmedNonEmptyString,
|
|
2240
|
+
path: Schema15.optional(Schema15.NullOr(TrimmedNonEmptyString)),
|
|
2241
|
+
url: Schema15.optional(Schema15.NullOr(TrimmedNonEmptyString)),
|
|
2242
|
+
metadata: Schema15.optional(Schema15.Record(Schema15.String, Schema15.Unknown)),
|
|
2243
|
+
createdAt: IsoDateTime
|
|
2244
|
+
});
|
|
2245
|
+
var RemoteRegisterEndpointCommand = Schema15.Struct({
|
|
2246
|
+
type: Schema15.Literal("remote.registerEndpoint"),
|
|
2247
|
+
commandId: CommandId,
|
|
2248
|
+
endpoint: RemoteEndpoint,
|
|
2249
|
+
createdAt: IsoDateTime
|
|
2250
|
+
});
|
|
2251
|
+
var RemoteRemoveEndpointCommand = Schema15.Struct({
|
|
2252
|
+
type: Schema15.Literal("remote.removeEndpoint"),
|
|
2253
|
+
commandId: CommandId,
|
|
2254
|
+
endpointId: RemoteEndpointId,
|
|
2255
|
+
createdAt: IsoDateTime
|
|
2256
|
+
});
|
|
2257
|
+
var RemoteUpdateEndpointCommand = Schema15.Struct({
|
|
2258
|
+
type: Schema15.Literal("remote.updateEndpoint"),
|
|
2259
|
+
commandId: CommandId,
|
|
2260
|
+
endpointId: RemoteEndpointId,
|
|
2261
|
+
updates: Schema15.Unknown,
|
|
2262
|
+
createdAt: IsoDateTime
|
|
2263
|
+
});
|
|
2264
|
+
var RemoteConnectCommand = Schema15.Struct({
|
|
2265
|
+
type: Schema15.Literal("remote.connect"),
|
|
2266
|
+
commandId: CommandId,
|
|
2267
|
+
endpointId: RemoteEndpointId,
|
|
2268
|
+
createdAt: IsoDateTime
|
|
2269
|
+
});
|
|
2270
|
+
var RemoteDisconnectCommand = Schema15.Struct({
|
|
2271
|
+
type: Schema15.Literal("remote.disconnect"),
|
|
2272
|
+
commandId: CommandId,
|
|
2273
|
+
endpointId: RemoteEndpointId,
|
|
2274
|
+
createdAt: IsoDateTime
|
|
2275
|
+
});
|
|
2276
|
+
var RemotePauseCommand = Schema15.Struct({
|
|
2277
|
+
type: Schema15.Literal("remote.pause"),
|
|
2278
|
+
commandId: CommandId,
|
|
2279
|
+
endpointId: RemoteEndpointId,
|
|
2280
|
+
createdAt: IsoDateTime
|
|
2281
|
+
});
|
|
2282
|
+
var RemoteResumeCommand = Schema15.Struct({
|
|
2283
|
+
type: Schema15.Literal("remote.resume"),
|
|
2284
|
+
commandId: CommandId,
|
|
2285
|
+
endpointId: RemoteEndpointId,
|
|
2286
|
+
createdAt: IsoDateTime
|
|
2287
|
+
});
|
|
2288
|
+
var RemoteStopCommand = Schema15.Struct({
|
|
2289
|
+
type: Schema15.Literal("remote.stop"),
|
|
2290
|
+
commandId: CommandId,
|
|
2291
|
+
endpointId: RemoteEndpointId,
|
|
2292
|
+
createdAt: IsoDateTime
|
|
2293
|
+
});
|
|
2294
|
+
var RemoteContinueCommand = Schema15.Struct({
|
|
2295
|
+
type: Schema15.Literal("remote.continue"),
|
|
2296
|
+
commandId: CommandId,
|
|
2297
|
+
endpointId: RemoteEndpointId,
|
|
2298
|
+
createdAt: IsoDateTime
|
|
2299
|
+
});
|
|
2300
|
+
var RemoteCreateRunForTaskCommand = Schema15.Struct({
|
|
2301
|
+
type: Schema15.Literal("remote.createRunForTask"),
|
|
2302
|
+
commandId: CommandId,
|
|
2303
|
+
endpointId: RemoteEndpointId,
|
|
2304
|
+
taskId: TrimmedNonEmptyString,
|
|
2305
|
+
runId: TrimmedNonEmptyString,
|
|
2306
|
+
workspaceId: TrimmedNonEmptyString,
|
|
2307
|
+
runtimeMode: Schema15.optional(Schema15.String),
|
|
2308
|
+
interactionMode: Schema15.optional(Schema15.String),
|
|
2309
|
+
createdAt: IsoDateTime
|
|
2310
|
+
});
|
|
2311
|
+
var RemoteRefreshTasksCommand = Schema15.Struct({
|
|
2312
|
+
type: Schema15.Literal("remote.refreshTasks"),
|
|
2313
|
+
commandId: CommandId,
|
|
2314
|
+
endpointId: RemoteEndpointId,
|
|
2315
|
+
createdAt: IsoDateTime
|
|
2316
|
+
});
|
|
2317
|
+
var RemoteAddIterationsCommand = Schema15.Struct({
|
|
2318
|
+
type: Schema15.Literal("remote.addIterations"),
|
|
2319
|
+
commandId: CommandId,
|
|
2320
|
+
endpointId: RemoteEndpointId,
|
|
2321
|
+
count: Schema15.Int.check(Schema15.isGreaterThanOrEqualTo(1)),
|
|
2322
|
+
createdAt: IsoDateTime
|
|
2323
|
+
});
|
|
2324
|
+
var RemoteRemoveIterationsCommand = Schema15.Struct({
|
|
2325
|
+
type: Schema15.Literal("remote.removeIterations"),
|
|
2326
|
+
commandId: CommandId,
|
|
2327
|
+
endpointId: RemoteEndpointId,
|
|
2328
|
+
count: Schema15.Int.check(Schema15.isGreaterThanOrEqualTo(1)),
|
|
2329
|
+
createdAt: IsoDateTime
|
|
2330
|
+
});
|
|
2331
|
+
var RemoteOrchestrateStartCommand = Schema15.Struct({
|
|
2332
|
+
type: Schema15.Literal("remote.orchestrate.start"),
|
|
2333
|
+
commandId: CommandId,
|
|
2334
|
+
endpointId: RemoteEndpointId,
|
|
2335
|
+
maxWorkers: Schema15.optional(Schema15.Int),
|
|
2336
|
+
maxIterations: Schema15.optional(Schema15.Int),
|
|
2337
|
+
directMerge: Schema15.optional(Schema15.Boolean),
|
|
2338
|
+
createdAt: IsoDateTime
|
|
2339
|
+
});
|
|
2340
|
+
var RemoteOrchestratePauseCommand = Schema15.Struct({
|
|
2341
|
+
type: Schema15.Literal("remote.orchestrate.pause"),
|
|
2342
|
+
commandId: CommandId,
|
|
2343
|
+
endpointId: RemoteEndpointId,
|
|
2344
|
+
orchestrationId: TrimmedNonEmptyString,
|
|
2345
|
+
createdAt: IsoDateTime
|
|
2346
|
+
});
|
|
2347
|
+
var RemoteOrchestrateResumeCommand = Schema15.Struct({
|
|
2348
|
+
type: Schema15.Literal("remote.orchestrate.resume"),
|
|
2349
|
+
commandId: CommandId,
|
|
2350
|
+
endpointId: RemoteEndpointId,
|
|
2351
|
+
orchestrationId: TrimmedNonEmptyString,
|
|
2352
|
+
createdAt: IsoDateTime
|
|
2353
|
+
});
|
|
2354
|
+
var RemoteOrchestrateStopCommand = Schema15.Struct({
|
|
2355
|
+
type: Schema15.Literal("remote.orchestrate.stop"),
|
|
2356
|
+
commandId: CommandId,
|
|
2357
|
+
endpointId: RemoteEndpointId,
|
|
2358
|
+
orchestrationId: TrimmedNonEmptyString,
|
|
2359
|
+
createdAt: IsoDateTime
|
|
2360
|
+
});
|
|
2361
|
+
var RemoteGetPromptPreviewCommand = Schema15.Struct({
|
|
2362
|
+
type: Schema15.Literal("remote.getPromptPreview"),
|
|
2363
|
+
commandId: CommandId,
|
|
2364
|
+
endpointId: RemoteEndpointId,
|
|
2365
|
+
taskId: TrimmedNonEmptyString,
|
|
2366
|
+
createdAt: IsoDateTime
|
|
2367
|
+
});
|
|
2368
|
+
var RemoteGetIterationOutputCommand = Schema15.Struct({
|
|
2369
|
+
type: Schema15.Literal("remote.getIterationOutput"),
|
|
2370
|
+
commandId: CommandId,
|
|
2371
|
+
endpointId: RemoteEndpointId,
|
|
2372
|
+
taskId: TrimmedNonEmptyString,
|
|
2373
|
+
createdAt: IsoDateTime
|
|
2374
|
+
});
|
|
2375
|
+
var EngineCommand = Schema15.Union([
|
|
2376
|
+
WorkspaceRegisterCommand,
|
|
2377
|
+
WorkspaceImportRigCommand,
|
|
2378
|
+
WorkspaceHydrateImportedStateCommand,
|
|
2379
|
+
WorkspaceCompileTopologyCommand,
|
|
2380
|
+
WorkspaceSyncRemoteFleetCommand,
|
|
2381
|
+
WorkspaceSyncServiceFabricCommand,
|
|
2382
|
+
WorkspaceRegisterRemoteHostCommand,
|
|
2383
|
+
WorkspaceUpdateRemoteHostStatusCommand,
|
|
2384
|
+
RunClaimRemoteLeaseCommand,
|
|
2385
|
+
RunReleaseRemoteLeaseCommand,
|
|
2386
|
+
RunCreateAdhocCommand,
|
|
2387
|
+
RunCreateForTaskCommand,
|
|
2388
|
+
RunMarkCompletedCommand,
|
|
2389
|
+
RunMarkFailedCommand,
|
|
2390
|
+
RunSetStatusCommand,
|
|
2391
|
+
RunSubmitUserMessageCommand,
|
|
2392
|
+
RunInterruptCommand,
|
|
2393
|
+
RunStopCommand,
|
|
2394
|
+
RunSetRuntimeModeCommand,
|
|
2395
|
+
RunSetInteractionModeCommand,
|
|
2396
|
+
RunRespondApprovalCommand,
|
|
2397
|
+
RunRespondUserInputCommand,
|
|
2398
|
+
RuntimePrepareCommand,
|
|
2399
|
+
RuntimeAttachCommand,
|
|
2400
|
+
RuntimeDetachCommand,
|
|
2401
|
+
RuntimeRecordMessageCommand,
|
|
2402
|
+
RuntimeStartActionCommand,
|
|
2403
|
+
RuntimeCompleteActionCommand,
|
|
2404
|
+
RuntimeRecordLogCommand,
|
|
2405
|
+
RuntimeUpdateMetadataCommand,
|
|
2406
|
+
RuntimeRequestApprovalCommand,
|
|
2407
|
+
RuntimeRequestUserInputCommand,
|
|
2408
|
+
RuntimeRecordValidationCommand,
|
|
2409
|
+
RuntimeRecordReviewCommand,
|
|
2410
|
+
RuntimeRegisterArtifactCommand,
|
|
2411
|
+
GraphUpdateTaskStatusCommand,
|
|
2412
|
+
TaskEnqueueCommand,
|
|
2413
|
+
RemoteRegisterEndpointCommand,
|
|
2414
|
+
RemoteRemoveEndpointCommand,
|
|
2415
|
+
RemoteUpdateEndpointCommand,
|
|
2416
|
+
RemoteConnectCommand,
|
|
2417
|
+
RemoteDisconnectCommand,
|
|
2418
|
+
RemotePauseCommand,
|
|
2419
|
+
RemoteResumeCommand,
|
|
2420
|
+
RemoteStopCommand,
|
|
2421
|
+
RemoteContinueCommand,
|
|
2422
|
+
RemoteCreateRunForTaskCommand,
|
|
2423
|
+
RemoteRefreshTasksCommand,
|
|
2424
|
+
RemoteAddIterationsCommand,
|
|
2425
|
+
RemoteRemoveIterationsCommand,
|
|
2426
|
+
RemoteOrchestrateStartCommand,
|
|
2427
|
+
RemoteOrchestratePauseCommand,
|
|
2428
|
+
RemoteOrchestrateResumeCommand,
|
|
2429
|
+
RemoteOrchestrateStopCommand,
|
|
2430
|
+
RemoteGetPromptPreviewCommand,
|
|
2431
|
+
RemoteGetIterationOutputCommand
|
|
2432
|
+
]);
|
|
2433
|
+
var EngineDispatchResult = Schema15.Struct({
|
|
2434
|
+
sequence: NonNegativeInt
|
|
2435
|
+
});
|
|
2436
|
+
var EngineGetSnapshotInput = Schema15.Struct({});
|
|
2437
|
+
var EngineReplayEventsInput = Schema15.Struct({
|
|
2438
|
+
fromSequenceExclusive: NonNegativeInt
|
|
2439
|
+
});
|
|
2440
|
+
var EngineReplayEventsResult = Schema15.Array(EngineEvent);
|
|
2441
|
+
var EngineGetTaskArtifactsInput = Schema15.Struct({
|
|
2442
|
+
taskId: TaskId
|
|
2443
|
+
});
|
|
2444
|
+
var EngineGetTaskArtifactsResult = Schema15.Array(ArtifactSummary);
|
|
2445
|
+
var EngineRpcSchemas = {
|
|
2446
|
+
getSnapshot: {
|
|
2447
|
+
input: EngineGetSnapshotInput,
|
|
2448
|
+
output: EngineReadModel
|
|
2449
|
+
},
|
|
2450
|
+
dispatch: {
|
|
2451
|
+
input: EngineCommand,
|
|
2452
|
+
output: EngineDispatchResult
|
|
2453
|
+
},
|
|
2454
|
+
replayEvents: {
|
|
2455
|
+
input: EngineReplayEventsInput,
|
|
2456
|
+
output: EngineReplayEventsResult
|
|
2457
|
+
},
|
|
2458
|
+
getTaskArtifacts: {
|
|
2459
|
+
input: EngineGetTaskArtifactsInput,
|
|
2460
|
+
output: EngineGetTaskArtifactsResult
|
|
2461
|
+
}
|
|
2462
|
+
};
|
|
2463
|
+
var EngineRuntimeDefaults = Schema15.Struct({
|
|
2464
|
+
runtimeAdapter: TrimmedNonEmptyString,
|
|
2465
|
+
runMode: RunMode,
|
|
2466
|
+
sandboxMode: EngineSandboxMode,
|
|
2467
|
+
isolationMode: IsolationMode
|
|
2468
|
+
});
|
|
2469
|
+
// packages/contracts/src/rig.ts
|
|
2470
|
+
import { Schema as Schema16 } from "effect";
|
|
2471
|
+
var RIG_WS_METHODS = {
|
|
2472
|
+
getSnapshot: "rig.getSnapshot",
|
|
2473
|
+
replayEvents: "rig.replayEvents",
|
|
2474
|
+
listWorkspaces: "rig.listWorkspaces",
|
|
2475
|
+
getWorkspace: "rig.getWorkspace",
|
|
2476
|
+
getRunLogs: "rig.getRunLogs",
|
|
2477
|
+
createAdhocRun: "rig.createAdhocRun",
|
|
2478
|
+
createTaskRun: "rig.createTaskRun",
|
|
2479
|
+
deleteRun: "rig.deleteRun",
|
|
2480
|
+
enqueueTask: "rig.enqueueTask",
|
|
2481
|
+
resumeRun: "rig.resumeRun",
|
|
2482
|
+
submitRunMessage: "rig.submitRunMessage",
|
|
2483
|
+
interruptRun: "rig.interruptRun",
|
|
2484
|
+
stopRun: "rig.stopRun",
|
|
2485
|
+
resolveApproval: "rig.resolveApproval",
|
|
2486
|
+
resolveUserInput: "rig.resolveUserInput",
|
|
2487
|
+
getTaskArtifacts: "rig.getTaskArtifacts"
|
|
2488
|
+
};
|
|
2489
|
+
var RIG_WS_CHANNELS = {
|
|
2490
|
+
snapshotInvalidated: "rig.snapshotInvalidated",
|
|
2491
|
+
event: "rig.event",
|
|
2492
|
+
runLogAppended: "rig.runLogAppended"
|
|
2493
|
+
};
|
|
2494
|
+
var RigSnapshotInvalidatedPayload = Schema16.Struct({
|
|
2495
|
+
sequence: NonNegativeInt,
|
|
2496
|
+
updatedAt: IsoDateTime,
|
|
2497
|
+
reason: Schema16.optional(TrimmedNonEmptyString)
|
|
2498
|
+
});
|
|
2499
|
+
var RigSnapshot = EngineReadModel;
|
|
2500
|
+
var RigGetSnapshotInput = Schema16.Struct({});
|
|
2501
|
+
var RigReplayEventsInput = Schema16.Struct({
|
|
2502
|
+
fromSequenceExclusive: NonNegativeInt
|
|
2503
|
+
});
|
|
2504
|
+
var RigReplayEventsResult = Schema16.Array(EngineEvent);
|
|
2505
|
+
var RigListWorkspacesInput = Schema16.Struct({});
|
|
2506
|
+
var RigListWorkspacesResult = Schema16.Array(WorkspaceSummary);
|
|
2507
|
+
var RigGetWorkspaceInput = Schema16.Struct({
|
|
2508
|
+
workspaceId: WorkspaceId
|
|
2509
|
+
});
|
|
2510
|
+
var RigGetWorkspaceResult = Schema16.Struct({
|
|
2511
|
+
workspace: Schema16.NullOr(WorkspaceSummary),
|
|
2512
|
+
tasks: Schema16.Array(TaskSummary),
|
|
2513
|
+
runs: Schema16.Array(RunSummary),
|
|
2514
|
+
approvals: Schema16.Array(ApprovalSummary),
|
|
2515
|
+
userInputs: Schema16.Array(UserInputRequestSummary),
|
|
2516
|
+
artifacts: Schema16.Array(ArtifactSummary),
|
|
2517
|
+
updatedAt: IsoDateTime
|
|
2518
|
+
});
|
|
2519
|
+
var RigRawRunLogEntry = Schema16.Record(Schema16.String, Schema16.Unknown);
|
|
2520
|
+
var RigGetRunLogsInput = Schema16.Struct({
|
|
2521
|
+
runId: RunId,
|
|
2522
|
+
limit: Schema16.optional(PositiveInt.check(Schema16.isLessThanOrEqualTo(500))),
|
|
2523
|
+
cursor: Schema16.optional(Schema16.String)
|
|
2524
|
+
});
|
|
2525
|
+
var RigGetRunLogsResult = Schema16.Struct({
|
|
2526
|
+
entries: Schema16.Array(RigRawRunLogEntry),
|
|
2527
|
+
nextCursor: Schema16.NullOr(Schema16.String),
|
|
2528
|
+
hasMore: Schema16.Boolean
|
|
2529
|
+
});
|
|
2530
|
+
var RigRunLogAppendedPayload = Schema16.Struct({
|
|
2531
|
+
runId: RunId,
|
|
2532
|
+
entry: RigRawRunLogEntry
|
|
2533
|
+
});
|
|
2534
|
+
var RigCreateAdhocRunInput = Schema16.Struct({
|
|
2535
|
+
commandId: CommandId,
|
|
2536
|
+
runId: RunId,
|
|
2537
|
+
workspaceId: WorkspaceId,
|
|
2538
|
+
title: Schema16.String,
|
|
2539
|
+
runtimeAdapter: Schema16.optional(RuntimeAdapterKind),
|
|
2540
|
+
model: Schema16.optional(Schema16.String),
|
|
2541
|
+
runtimeMode: RuntimeMode.pipe(Schema16.withDecodingDefault(() => DEFAULT_RUNTIME_MODE)),
|
|
2542
|
+
interactionMode: ProviderInteractionMode.pipe(Schema16.withDecodingDefault(() => DEFAULT_PROVIDER_INTERACTION_MODE)),
|
|
2543
|
+
executionTarget: Schema16.optional(RunExecutionTarget),
|
|
2544
|
+
remoteHostId: Schema16.optional(Schema16.String),
|
|
2545
|
+
initialPrompt: Schema16.optional(Schema16.String),
|
|
2546
|
+
createdAt: IsoDateTime
|
|
2547
|
+
});
|
|
2548
|
+
var RigCreateTaskRunInput = Schema16.Struct({
|
|
2549
|
+
commandId: CommandId,
|
|
2550
|
+
runId: RunId,
|
|
2551
|
+
workspaceId: WorkspaceId,
|
|
2552
|
+
taskId: TaskId,
|
|
2553
|
+
runtimeAdapter: Schema16.optional(RuntimeAdapterKind),
|
|
2554
|
+
model: Schema16.optional(Schema16.String),
|
|
2555
|
+
runtimeMode: RuntimeMode.pipe(Schema16.withDecodingDefault(() => DEFAULT_RUNTIME_MODE)),
|
|
2556
|
+
interactionMode: ProviderInteractionMode.pipe(Schema16.withDecodingDefault(() => DEFAULT_PROVIDER_INTERACTION_MODE)),
|
|
2557
|
+
executionTarget: Schema16.optional(RunExecutionTarget),
|
|
2558
|
+
remoteHostId: Schema16.optional(Schema16.String),
|
|
2559
|
+
createdAt: IsoDateTime
|
|
2560
|
+
});
|
|
2561
|
+
var RigEnqueueTaskInput = Schema16.Struct({
|
|
2562
|
+
commandId: CommandId,
|
|
2563
|
+
taskId: TaskId,
|
|
2564
|
+
score: Schema16.optional(Schema16.Number),
|
|
2565
|
+
createdAt: IsoDateTime
|
|
2566
|
+
});
|
|
2567
|
+
var RigDeleteRunInput = Schema16.Struct({
|
|
2568
|
+
commandId: CommandId,
|
|
2569
|
+
runId: RunId,
|
|
2570
|
+
purgeTaskArtifacts: Schema16.optional(Schema16.Boolean),
|
|
2571
|
+
createdAt: IsoDateTime
|
|
2572
|
+
});
|
|
2573
|
+
var RigResumeRunInput = Schema16.Struct({
|
|
2574
|
+
commandId: CommandId,
|
|
2575
|
+
runId: RunId,
|
|
2576
|
+
promptOverride: Schema16.optional(Schema16.String),
|
|
2577
|
+
createdAt: IsoDateTime
|
|
2578
|
+
});
|
|
2579
|
+
var RigSubmitRunMessageInput = Schema16.Struct({
|
|
2580
|
+
commandId: CommandId,
|
|
2581
|
+
runId: RunId,
|
|
2582
|
+
messageId: MessageId,
|
|
2583
|
+
text: Schema16.String,
|
|
2584
|
+
attachments: Schema16.optional(Schema16.Array(Schema16.Unknown)),
|
|
2585
|
+
createdAt: IsoDateTime
|
|
2586
|
+
});
|
|
2587
|
+
var RigInterruptRunInput = Schema16.Struct({
|
|
2588
|
+
commandId: CommandId,
|
|
2589
|
+
runId: RunId,
|
|
2590
|
+
createdAt: IsoDateTime
|
|
2591
|
+
});
|
|
2592
|
+
var RigStopRunInput = Schema16.Struct({
|
|
2593
|
+
commandId: CommandId,
|
|
2594
|
+
runId: RunId,
|
|
2595
|
+
createdAt: IsoDateTime
|
|
2596
|
+
});
|
|
2597
|
+
var RigResolveApprovalInput = Schema16.Struct({
|
|
2598
|
+
commandId: CommandId,
|
|
2599
|
+
runId: RunId,
|
|
2600
|
+
requestId: ApprovalRequestId,
|
|
2601
|
+
decision: ProviderApprovalDecision,
|
|
2602
|
+
createdAt: IsoDateTime
|
|
2603
|
+
});
|
|
2604
|
+
var RigResolveUserInputInput = Schema16.Struct({
|
|
2605
|
+
commandId: CommandId,
|
|
2606
|
+
runId: RunId,
|
|
2607
|
+
requestId: ApprovalRequestId,
|
|
2608
|
+
answers: ProviderUserInputAnswers,
|
|
2609
|
+
createdAt: IsoDateTime
|
|
2610
|
+
});
|
|
2611
|
+
var RigGetTaskArtifactsInput = Schema16.Struct({
|
|
2612
|
+
taskId: TaskId
|
|
2613
|
+
});
|
|
2614
|
+
var RigGetTaskArtifactsResult = Schema16.Array(ArtifactSummary);
|
|
2615
|
+
var RigMutationResult = Schema16.Struct({
|
|
2616
|
+
sequence: NonNegativeInt
|
|
2617
|
+
});
|
|
2618
|
+
// packages/contracts/src/terminal.ts
|
|
2619
|
+
import { Schema as Schema17 } from "effect";
|
|
2620
|
+
var DEFAULT_TERMINAL_ID = "default";
|
|
2621
|
+
var TrimmedNonEmptyStringSchema = TrimmedNonEmptyString;
|
|
2622
|
+
var TerminalColsSchema = Schema17.Int.check(Schema17.isGreaterThanOrEqualTo(20)).check(Schema17.isLessThanOrEqualTo(400));
|
|
2623
|
+
var TerminalRowsSchema = Schema17.Int.check(Schema17.isGreaterThanOrEqualTo(5)).check(Schema17.isLessThanOrEqualTo(200));
|
|
2624
|
+
var TerminalIdSchema = TrimmedNonEmptyStringSchema.check(Schema17.isMaxLength(128));
|
|
2625
|
+
var TerminalEnvKeySchema = Schema17.String.check(Schema17.isPattern(/^[A-Za-z_][A-Za-z0-9_]*$/)).check(Schema17.isMaxLength(128));
|
|
2626
|
+
var TerminalEnvValueSchema = Schema17.String.check(Schema17.isMaxLength(8192));
|
|
2627
|
+
var TerminalEnvSchema = Schema17.Record(TerminalEnvKeySchema, TerminalEnvValueSchema).check(Schema17.isMaxProperties(128));
|
|
2628
|
+
var TerminalIdWithDefaultSchema = TerminalIdSchema.pipe(Schema17.withDecodingDefault(() => DEFAULT_TERMINAL_ID));
|
|
2629
|
+
var TerminalThreadInput = Schema17.Struct({
|
|
2630
|
+
threadId: TrimmedNonEmptyStringSchema
|
|
2631
|
+
});
|
|
2632
|
+
var TerminalSessionInput = Schema17.Struct({
|
|
2633
|
+
...TerminalThreadInput.fields,
|
|
2634
|
+
terminalId: TerminalIdWithDefaultSchema
|
|
2635
|
+
});
|
|
2636
|
+
var TerminalOpenInput = Schema17.Struct({
|
|
2637
|
+
...TerminalSessionInput.fields,
|
|
2638
|
+
cwd: TrimmedNonEmptyStringSchema,
|
|
2639
|
+
cols: Schema17.optional(TerminalColsSchema),
|
|
2640
|
+
rows: Schema17.optional(TerminalRowsSchema),
|
|
2641
|
+
env: Schema17.optional(TerminalEnvSchema)
|
|
2642
|
+
});
|
|
2643
|
+
var TerminalWriteInput = Schema17.Struct({
|
|
2644
|
+
...TerminalSessionInput.fields,
|
|
2645
|
+
data: Schema17.String.check(Schema17.isNonEmpty()).check(Schema17.isMaxLength(65536))
|
|
2646
|
+
});
|
|
2647
|
+
var TerminalResizeInput = Schema17.Struct({
|
|
2648
|
+
...TerminalSessionInput.fields,
|
|
2649
|
+
cols: TerminalColsSchema,
|
|
2650
|
+
rows: TerminalRowsSchema
|
|
2651
|
+
});
|
|
2652
|
+
var TerminalClearInput = TerminalSessionInput;
|
|
2653
|
+
var TerminalRestartInput = Schema17.Struct({
|
|
2654
|
+
...TerminalThreadInput.fields,
|
|
2655
|
+
cwd: TrimmedNonEmptyStringSchema,
|
|
2656
|
+
cols: TerminalColsSchema,
|
|
2657
|
+
rows: TerminalRowsSchema,
|
|
2658
|
+
env: Schema17.optional(TerminalEnvSchema)
|
|
2659
|
+
});
|
|
2660
|
+
var TerminalCloseInput = Schema17.Struct({
|
|
2661
|
+
...TerminalThreadInput.fields,
|
|
2662
|
+
terminalId: Schema17.optional(TerminalIdSchema),
|
|
2663
|
+
deleteHistory: Schema17.optional(Schema17.Boolean)
|
|
2664
|
+
});
|
|
2665
|
+
var TerminalSessionStatus = Schema17.Literals(["starting", "running", "exited", "error"]);
|
|
2666
|
+
var TerminalSessionSnapshot = Schema17.Struct({
|
|
2667
|
+
threadId: Schema17.String.check(Schema17.isNonEmpty()),
|
|
2668
|
+
terminalId: Schema17.String.check(Schema17.isNonEmpty()),
|
|
2669
|
+
cwd: Schema17.String.check(Schema17.isNonEmpty()),
|
|
2670
|
+
status: TerminalSessionStatus,
|
|
2671
|
+
pid: Schema17.NullOr(Schema17.Int.check(Schema17.isGreaterThan(0))),
|
|
2672
|
+
history: Schema17.String,
|
|
2673
|
+
exitCode: Schema17.NullOr(Schema17.Int),
|
|
2674
|
+
exitSignal: Schema17.NullOr(Schema17.String),
|
|
2675
|
+
updatedAt: Schema17.String
|
|
2676
|
+
});
|
|
2677
|
+
var TerminalEventBaseSchema = Schema17.Struct({
|
|
2678
|
+
threadId: Schema17.String.check(Schema17.isNonEmpty()),
|
|
2679
|
+
terminalId: Schema17.String.check(Schema17.isNonEmpty()),
|
|
2680
|
+
createdAt: Schema17.String
|
|
2681
|
+
});
|
|
2682
|
+
var TerminalStartedEvent = Schema17.Struct({
|
|
2683
|
+
...TerminalEventBaseSchema.fields,
|
|
2684
|
+
type: Schema17.Literal("started"),
|
|
2685
|
+
snapshot: TerminalSessionSnapshot
|
|
2686
|
+
});
|
|
2687
|
+
var TerminalOutputEvent = Schema17.Struct({
|
|
2688
|
+
...TerminalEventBaseSchema.fields,
|
|
2689
|
+
type: Schema17.Literal("output"),
|
|
2690
|
+
data: Schema17.String
|
|
2691
|
+
});
|
|
2692
|
+
var TerminalExitedEvent = Schema17.Struct({
|
|
2693
|
+
...TerminalEventBaseSchema.fields,
|
|
2694
|
+
type: Schema17.Literal("exited"),
|
|
2695
|
+
exitCode: Schema17.NullOr(Schema17.Int),
|
|
2696
|
+
exitSignal: Schema17.NullOr(Schema17.String)
|
|
2697
|
+
});
|
|
2698
|
+
var TerminalErrorEvent = Schema17.Struct({
|
|
2699
|
+
...TerminalEventBaseSchema.fields,
|
|
2700
|
+
type: Schema17.Literal("error"),
|
|
2701
|
+
message: Schema17.String.check(Schema17.isNonEmpty())
|
|
2702
|
+
});
|
|
2703
|
+
var TerminalClearedEvent = Schema17.Struct({
|
|
2704
|
+
...TerminalEventBaseSchema.fields,
|
|
2705
|
+
type: Schema17.Literal("cleared")
|
|
2706
|
+
});
|
|
2707
|
+
var TerminalRestartedEvent = Schema17.Struct({
|
|
2708
|
+
...TerminalEventBaseSchema.fields,
|
|
2709
|
+
type: Schema17.Literal("restarted"),
|
|
2710
|
+
snapshot: TerminalSessionSnapshot
|
|
2711
|
+
});
|
|
2712
|
+
var TerminalActivityEvent = Schema17.Struct({
|
|
2713
|
+
...TerminalEventBaseSchema.fields,
|
|
2714
|
+
type: Schema17.Literal("activity"),
|
|
2715
|
+
hasRunningSubprocess: Schema17.Boolean
|
|
2716
|
+
});
|
|
2717
|
+
var TerminalEvent = Schema17.Union([
|
|
2718
|
+
TerminalStartedEvent,
|
|
2719
|
+
TerminalOutputEvent,
|
|
2720
|
+
TerminalExitedEvent,
|
|
2721
|
+
TerminalErrorEvent,
|
|
2722
|
+
TerminalClearedEvent,
|
|
2723
|
+
TerminalRestartedEvent,
|
|
2724
|
+
TerminalActivityEvent
|
|
2725
|
+
]);
|
|
2726
|
+
// packages/contracts/src/provider.ts
|
|
2727
|
+
import { Schema as Schema18 } from "effect";
|
|
2728
|
+
var TrimmedNonEmptyStringSchema2 = TrimmedNonEmptyString;
|
|
2729
|
+
var ProviderSessionStatus = Schema18.Literals([
|
|
2730
|
+
"connecting",
|
|
2731
|
+
"ready",
|
|
2732
|
+
"running",
|
|
2733
|
+
"error",
|
|
2734
|
+
"closed"
|
|
2735
|
+
]);
|
|
2736
|
+
var ProviderSession = Schema18.Struct({
|
|
2737
|
+
provider: ProviderKind,
|
|
2738
|
+
status: ProviderSessionStatus,
|
|
2739
|
+
runtimeMode: RuntimeMode,
|
|
2740
|
+
cwd: Schema18.optional(TrimmedNonEmptyStringSchema2),
|
|
2741
|
+
model: Schema18.optional(TrimmedNonEmptyStringSchema2),
|
|
2742
|
+
threadId: ThreadId,
|
|
2743
|
+
resumeCursor: Schema18.optional(Schema18.Unknown),
|
|
2744
|
+
activeTurnId: Schema18.optional(TurnId),
|
|
2745
|
+
createdAt: IsoDateTime,
|
|
2746
|
+
updatedAt: IsoDateTime,
|
|
2747
|
+
lastError: Schema18.optional(TrimmedNonEmptyStringSchema2)
|
|
2748
|
+
});
|
|
2749
|
+
var CodexProviderStartOptions = Schema18.Struct({
|
|
2750
|
+
binaryPath: Schema18.optional(TrimmedNonEmptyStringSchema2),
|
|
2751
|
+
homePath: Schema18.optional(TrimmedNonEmptyStringSchema2)
|
|
2752
|
+
});
|
|
2753
|
+
var ProviderStartOptions = Schema18.Struct({
|
|
2754
|
+
codex: Schema18.optional(CodexProviderStartOptions)
|
|
2755
|
+
});
|
|
2756
|
+
var ProviderSessionStartInput = Schema18.Struct({
|
|
2757
|
+
threadId: ThreadId,
|
|
2758
|
+
provider: Schema18.optional(ProviderKind),
|
|
2759
|
+
cwd: Schema18.optional(TrimmedNonEmptyStringSchema2),
|
|
2760
|
+
model: Schema18.optional(TrimmedNonEmptyStringSchema2),
|
|
2761
|
+
modelOptions: Schema18.optional(ProviderModelOptions),
|
|
2762
|
+
resumeCursor: Schema18.optional(Schema18.Unknown),
|
|
2763
|
+
serviceTier: Schema18.optional(Schema18.NullOr(ProviderServiceTier)),
|
|
2764
|
+
approvalPolicy: Schema18.optional(ProviderApprovalPolicy),
|
|
2765
|
+
sandboxMode: Schema18.optional(ProviderSandboxMode),
|
|
2766
|
+
providerOptions: Schema18.optional(ProviderStartOptions),
|
|
2767
|
+
runtimeMode: RuntimeMode
|
|
2768
|
+
});
|
|
2769
|
+
var ProviderSendTurnInput = Schema18.Struct({
|
|
2770
|
+
threadId: ThreadId,
|
|
2771
|
+
input: Schema18.optional(TrimmedNonEmptyStringSchema2.check(Schema18.isMaxLength(PROVIDER_SEND_TURN_MAX_INPUT_CHARS))),
|
|
2772
|
+
attachments: Schema18.optional(Schema18.Array(ChatAttachment).check(Schema18.isMaxLength(PROVIDER_SEND_TURN_MAX_ATTACHMENTS))),
|
|
2773
|
+
model: Schema18.optional(TrimmedNonEmptyStringSchema2),
|
|
2774
|
+
serviceTier: Schema18.optional(Schema18.NullOr(ProviderServiceTier)),
|
|
2775
|
+
modelOptions: Schema18.optional(ProviderModelOptions),
|
|
2776
|
+
interactionMode: Schema18.optional(ProviderInteractionMode)
|
|
2777
|
+
});
|
|
2778
|
+
var ProviderTurnStartResult = Schema18.Struct({
|
|
2779
|
+
threadId: ThreadId,
|
|
2780
|
+
turnId: TurnId,
|
|
2781
|
+
resumeCursor: Schema18.optional(Schema18.Unknown)
|
|
2782
|
+
});
|
|
2783
|
+
var ProviderInterruptTurnInput = Schema18.Struct({
|
|
2784
|
+
threadId: ThreadId,
|
|
2785
|
+
turnId: Schema18.optional(TurnId)
|
|
2786
|
+
});
|
|
2787
|
+
var ProviderStopSessionInput = Schema18.Struct({
|
|
2788
|
+
threadId: ThreadId
|
|
2789
|
+
});
|
|
2790
|
+
var ProviderRespondToRequestInput = Schema18.Struct({
|
|
2791
|
+
threadId: ThreadId,
|
|
2792
|
+
requestId: ApprovalRequestId,
|
|
2793
|
+
decision: ProviderApprovalDecision
|
|
2794
|
+
});
|
|
2795
|
+
var ProviderRespondToUserInputInput = Schema18.Struct({
|
|
2796
|
+
threadId: ThreadId,
|
|
2797
|
+
requestId: ApprovalRequestId,
|
|
2798
|
+
answers: ProviderUserInputAnswers
|
|
2799
|
+
});
|
|
2800
|
+
var ProviderEventKind = Schema18.Literals(["session", "notification", "request", "error"]);
|
|
2801
|
+
var ProviderEvent = Schema18.Struct({
|
|
2802
|
+
id: EventId,
|
|
2803
|
+
kind: ProviderEventKind,
|
|
2804
|
+
provider: ProviderKind,
|
|
2805
|
+
threadId: ThreadId,
|
|
2806
|
+
createdAt: IsoDateTime,
|
|
2807
|
+
method: TrimmedNonEmptyStringSchema2,
|
|
2808
|
+
message: Schema18.optional(TrimmedNonEmptyStringSchema2),
|
|
2809
|
+
turnId: Schema18.optional(TurnId),
|
|
2810
|
+
itemId: Schema18.optional(ProviderItemId),
|
|
2811
|
+
requestId: Schema18.optional(ApprovalRequestId),
|
|
2812
|
+
requestKind: Schema18.optional(ProviderRequestKind),
|
|
2813
|
+
textDelta: Schema18.optional(Schema18.String),
|
|
2814
|
+
payload: Schema18.optional(Schema18.Unknown)
|
|
2815
|
+
});
|
|
2816
|
+
// packages/contracts/src/providerRuntime.ts
|
|
2817
|
+
import { Schema as Schema19 } from "effect";
|
|
2818
|
+
var TrimmedNonEmptyStringSchema3 = TrimmedNonEmptyString;
|
|
2819
|
+
var UnknownRecordSchema = Schema19.Record(Schema19.String, Schema19.Unknown);
|
|
2820
|
+
var RuntimeEventRawSource = Schema19.Literals([
|
|
2821
|
+
"codex.app-server.notification",
|
|
2822
|
+
"codex.app-server.request",
|
|
2823
|
+
"codex.eventmsg",
|
|
2824
|
+
"codex.sdk.thread-event",
|
|
2825
|
+
"claude.cli.stream-json"
|
|
2826
|
+
]);
|
|
2827
|
+
var RuntimeEventRaw = Schema19.Struct({
|
|
2828
|
+
source: RuntimeEventRawSource,
|
|
2829
|
+
method: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
2830
|
+
messageType: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
2831
|
+
payload: Schema19.Unknown
|
|
2832
|
+
});
|
|
2833
|
+
var ProviderRequestId = TrimmedNonEmptyStringSchema3;
|
|
2834
|
+
var ProviderRefs = Schema19.Struct({
|
|
2835
|
+
providerTurnId: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
2836
|
+
providerItemId: Schema19.optional(ProviderItemId),
|
|
2837
|
+
providerRequestId: Schema19.optional(ProviderRequestId)
|
|
2838
|
+
});
|
|
2839
|
+
var RuntimeSessionState = Schema19.Literals([
|
|
2840
|
+
"starting",
|
|
2841
|
+
"ready",
|
|
2842
|
+
"running",
|
|
2843
|
+
"waiting",
|
|
2844
|
+
"stopped",
|
|
2845
|
+
"error"
|
|
2846
|
+
]);
|
|
2847
|
+
var RuntimeThreadState = Schema19.Literals([
|
|
2848
|
+
"active",
|
|
2849
|
+
"idle",
|
|
2850
|
+
"archived",
|
|
2851
|
+
"closed",
|
|
2852
|
+
"compacted",
|
|
2853
|
+
"error"
|
|
2854
|
+
]);
|
|
2855
|
+
var RuntimeTurnState = Schema19.Literals([
|
|
2856
|
+
"completed",
|
|
2857
|
+
"failed",
|
|
2858
|
+
"interrupted",
|
|
2859
|
+
"cancelled"
|
|
2860
|
+
]);
|
|
2861
|
+
var RuntimePlanStepStatus = Schema19.Literals(["pending", "inProgress", "completed"]);
|
|
2862
|
+
var RuntimeItemStatus = Schema19.Literals(["inProgress", "completed", "failed", "declined"]);
|
|
2863
|
+
var RuntimeContentStreamKind = Schema19.Literals([
|
|
2864
|
+
"assistant_text",
|
|
2865
|
+
"reasoning_text",
|
|
2866
|
+
"reasoning_summary_text",
|
|
2867
|
+
"plan_text",
|
|
2868
|
+
"command_output",
|
|
2869
|
+
"file_change_output",
|
|
2870
|
+
"unknown"
|
|
2871
|
+
]);
|
|
2872
|
+
var RuntimeSessionExitKind = Schema19.Literals(["graceful", "error"]);
|
|
2873
|
+
var RuntimeErrorClass = Schema19.Literals([
|
|
2874
|
+
"provider_error",
|
|
2875
|
+
"transport_error",
|
|
2876
|
+
"permission_error",
|
|
2877
|
+
"validation_error",
|
|
2878
|
+
"unknown"
|
|
2879
|
+
]);
|
|
2880
|
+
var CanonicalItemType = Schema19.Literals([
|
|
2881
|
+
"user_message",
|
|
2882
|
+
"assistant_message",
|
|
2883
|
+
"reasoning",
|
|
2884
|
+
"plan",
|
|
2885
|
+
"command_execution",
|
|
2886
|
+
"file_change",
|
|
2887
|
+
"mcp_tool_call",
|
|
2888
|
+
"dynamic_tool_call",
|
|
2889
|
+
"collab_agent_tool_call",
|
|
2890
|
+
"web_search",
|
|
2891
|
+
"image_view",
|
|
2892
|
+
"review_entered",
|
|
2893
|
+
"review_exited",
|
|
2894
|
+
"context_compaction",
|
|
2895
|
+
"error",
|
|
2896
|
+
"unknown"
|
|
2897
|
+
]);
|
|
2898
|
+
var CanonicalRequestType = Schema19.Literals([
|
|
2899
|
+
"command_execution_approval",
|
|
2900
|
+
"file_read_approval",
|
|
2901
|
+
"file_change_approval",
|
|
2902
|
+
"apply_patch_approval",
|
|
2903
|
+
"exec_command_approval",
|
|
2904
|
+
"tool_user_input",
|
|
2905
|
+
"dynamic_tool_call",
|
|
2906
|
+
"auth_tokens_refresh",
|
|
2907
|
+
"unknown"
|
|
2908
|
+
]);
|
|
2909
|
+
var ProviderRuntimeEventType = Schema19.Literals([
|
|
2910
|
+
"session.started",
|
|
2911
|
+
"session.configured",
|
|
2912
|
+
"session.state.changed",
|
|
2913
|
+
"session.exited",
|
|
2914
|
+
"thread.started",
|
|
2915
|
+
"thread.state.changed",
|
|
2916
|
+
"thread.metadata.updated",
|
|
2917
|
+
"thread.token-usage.updated",
|
|
2918
|
+
"thread.realtime.started",
|
|
2919
|
+
"thread.realtime.item-added",
|
|
2920
|
+
"thread.realtime.audio.delta",
|
|
2921
|
+
"thread.realtime.error",
|
|
2922
|
+
"thread.realtime.closed",
|
|
2923
|
+
"turn.started",
|
|
2924
|
+
"turn.completed",
|
|
2925
|
+
"turn.aborted",
|
|
2926
|
+
"turn.plan.updated",
|
|
2927
|
+
"turn.proposed.delta",
|
|
2928
|
+
"turn.proposed.completed",
|
|
2929
|
+
"turn.diff.updated",
|
|
2930
|
+
"item.started",
|
|
2931
|
+
"item.updated",
|
|
2932
|
+
"item.completed",
|
|
2933
|
+
"content.delta",
|
|
2934
|
+
"request.opened",
|
|
2935
|
+
"request.resolved",
|
|
2936
|
+
"user-input.requested",
|
|
2937
|
+
"user-input.resolved",
|
|
2938
|
+
"task.started",
|
|
2939
|
+
"task.progress",
|
|
2940
|
+
"task.completed",
|
|
2941
|
+
"hook.started",
|
|
2942
|
+
"hook.progress",
|
|
2943
|
+
"hook.completed",
|
|
2944
|
+
"tool.progress",
|
|
2945
|
+
"tool.summary",
|
|
2946
|
+
"auth.status",
|
|
2947
|
+
"account.updated",
|
|
2948
|
+
"account.rate-limits.updated",
|
|
2949
|
+
"mcp.status.updated",
|
|
2950
|
+
"mcp.oauth.completed",
|
|
2951
|
+
"model.rerouted",
|
|
2952
|
+
"config.warning",
|
|
2953
|
+
"deprecation.notice",
|
|
2954
|
+
"files.persisted",
|
|
2955
|
+
"runtime.warning",
|
|
2956
|
+
"runtime.error"
|
|
2957
|
+
]);
|
|
2958
|
+
var SessionStartedType = Schema19.Literal("session.started");
|
|
2959
|
+
var SessionConfiguredType = Schema19.Literal("session.configured");
|
|
2960
|
+
var SessionStateChangedType = Schema19.Literal("session.state.changed");
|
|
2961
|
+
var SessionExitedType = Schema19.Literal("session.exited");
|
|
2962
|
+
var ThreadStartedType = Schema19.Literal("thread.started");
|
|
2963
|
+
var ThreadStateChangedType = Schema19.Literal("thread.state.changed");
|
|
2964
|
+
var ThreadMetadataUpdatedType = Schema19.Literal("thread.metadata.updated");
|
|
2965
|
+
var ThreadTokenUsageUpdatedType = Schema19.Literal("thread.token-usage.updated");
|
|
2966
|
+
var ThreadRealtimeStartedType = Schema19.Literal("thread.realtime.started");
|
|
2967
|
+
var ThreadRealtimeItemAddedType = Schema19.Literal("thread.realtime.item-added");
|
|
2968
|
+
var ThreadRealtimeAudioDeltaType = Schema19.Literal("thread.realtime.audio.delta");
|
|
2969
|
+
var ThreadRealtimeErrorType = Schema19.Literal("thread.realtime.error");
|
|
2970
|
+
var ThreadRealtimeClosedType = Schema19.Literal("thread.realtime.closed");
|
|
2971
|
+
var TurnStartedType = Schema19.Literal("turn.started");
|
|
2972
|
+
var TurnCompletedType = Schema19.Literal("turn.completed");
|
|
2973
|
+
var TurnAbortedType = Schema19.Literal("turn.aborted");
|
|
2974
|
+
var TurnPlanUpdatedType = Schema19.Literal("turn.plan.updated");
|
|
2975
|
+
var TurnProposedDeltaType = Schema19.Literal("turn.proposed.delta");
|
|
2976
|
+
var TurnProposedCompletedType = Schema19.Literal("turn.proposed.completed");
|
|
2977
|
+
var TurnDiffUpdatedType = Schema19.Literal("turn.diff.updated");
|
|
2978
|
+
var ItemStartedType = Schema19.Literal("item.started");
|
|
2979
|
+
var ItemUpdatedType = Schema19.Literal("item.updated");
|
|
2980
|
+
var ItemCompletedType = Schema19.Literal("item.completed");
|
|
2981
|
+
var ContentDeltaType = Schema19.Literal("content.delta");
|
|
2982
|
+
var RequestOpenedType = Schema19.Literal("request.opened");
|
|
2983
|
+
var RequestResolvedType = Schema19.Literal("request.resolved");
|
|
2984
|
+
var UserInputRequestedType = Schema19.Literal("user-input.requested");
|
|
2985
|
+
var UserInputResolvedType = Schema19.Literal("user-input.resolved");
|
|
2986
|
+
var TaskStartedType = Schema19.Literal("task.started");
|
|
2987
|
+
var TaskProgressType = Schema19.Literal("task.progress");
|
|
2988
|
+
var TaskCompletedType = Schema19.Literal("task.completed");
|
|
2989
|
+
var HookStartedType = Schema19.Literal("hook.started");
|
|
2990
|
+
var HookProgressType = Schema19.Literal("hook.progress");
|
|
2991
|
+
var HookCompletedType = Schema19.Literal("hook.completed");
|
|
2992
|
+
var ToolProgressType = Schema19.Literal("tool.progress");
|
|
2993
|
+
var ToolSummaryType = Schema19.Literal("tool.summary");
|
|
2994
|
+
var AuthStatusType = Schema19.Literal("auth.status");
|
|
2995
|
+
var AccountUpdatedType = Schema19.Literal("account.updated");
|
|
2996
|
+
var AccountRateLimitsUpdatedType = Schema19.Literal("account.rate-limits.updated");
|
|
2997
|
+
var McpStatusUpdatedType = Schema19.Literal("mcp.status.updated");
|
|
2998
|
+
var McpOauthCompletedType = Schema19.Literal("mcp.oauth.completed");
|
|
2999
|
+
var ModelReroutedType = Schema19.Literal("model.rerouted");
|
|
3000
|
+
var ConfigWarningType = Schema19.Literal("config.warning");
|
|
3001
|
+
var DeprecationNoticeType = Schema19.Literal("deprecation.notice");
|
|
3002
|
+
var FilesPersistedType = Schema19.Literal("files.persisted");
|
|
3003
|
+
var RuntimeWarningType = Schema19.Literal("runtime.warning");
|
|
3004
|
+
var RuntimeErrorType = Schema19.Literal("runtime.error");
|
|
3005
|
+
var ProviderRuntimeEventBase = Schema19.Struct({
|
|
3006
|
+
eventId: EventId,
|
|
3007
|
+
provider: ProviderKind,
|
|
3008
|
+
threadId: ThreadId,
|
|
3009
|
+
createdAt: IsoDateTime,
|
|
3010
|
+
turnId: Schema19.optional(TurnId),
|
|
3011
|
+
itemId: Schema19.optional(RuntimeItemId),
|
|
3012
|
+
requestId: Schema19.optional(RuntimeRequestId),
|
|
3013
|
+
providerRefs: Schema19.optional(ProviderRefs),
|
|
3014
|
+
raw: Schema19.optional(RuntimeEventRaw)
|
|
3015
|
+
});
|
|
3016
|
+
var SessionStartedPayload = Schema19.Struct({
|
|
3017
|
+
message: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3018
|
+
resume: Schema19.optional(Schema19.Unknown)
|
|
3019
|
+
});
|
|
3020
|
+
var SessionConfiguredPayload = Schema19.Struct({
|
|
3021
|
+
config: UnknownRecordSchema
|
|
3022
|
+
});
|
|
3023
|
+
var SessionStateChangedPayload = Schema19.Struct({
|
|
3024
|
+
state: RuntimeSessionState,
|
|
3025
|
+
reason: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3026
|
+
detail: Schema19.optional(Schema19.Unknown)
|
|
3027
|
+
});
|
|
3028
|
+
var SessionExitedPayload = Schema19.Struct({
|
|
3029
|
+
reason: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3030
|
+
recoverable: Schema19.optional(Schema19.Boolean),
|
|
3031
|
+
exitKind: Schema19.optional(RuntimeSessionExitKind)
|
|
3032
|
+
});
|
|
3033
|
+
var ThreadStartedPayload = Schema19.Struct({
|
|
3034
|
+
providerThreadId: Schema19.optional(TrimmedNonEmptyStringSchema3)
|
|
3035
|
+
});
|
|
3036
|
+
var ThreadStateChangedPayload = Schema19.Struct({
|
|
3037
|
+
state: RuntimeThreadState,
|
|
3038
|
+
detail: Schema19.optional(Schema19.Unknown)
|
|
3039
|
+
});
|
|
3040
|
+
var ThreadMetadataUpdatedPayload = Schema19.Struct({
|
|
3041
|
+
name: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3042
|
+
metadata: Schema19.optional(UnknownRecordSchema)
|
|
3043
|
+
});
|
|
3044
|
+
var ThreadTokenUsageUpdatedPayload = Schema19.Struct({
|
|
3045
|
+
usage: Schema19.Unknown
|
|
3046
|
+
});
|
|
3047
|
+
var ThreadRealtimeStartedPayload = Schema19.Struct({
|
|
3048
|
+
realtimeSessionId: Schema19.optional(TrimmedNonEmptyStringSchema3)
|
|
3049
|
+
});
|
|
3050
|
+
var ThreadRealtimeItemAddedPayload = Schema19.Struct({
|
|
3051
|
+
item: Schema19.Unknown
|
|
3052
|
+
});
|
|
3053
|
+
var ThreadRealtimeAudioDeltaPayload = Schema19.Struct({
|
|
3054
|
+
audio: Schema19.Unknown
|
|
3055
|
+
});
|
|
3056
|
+
var ThreadRealtimeErrorPayload = Schema19.Struct({
|
|
3057
|
+
message: TrimmedNonEmptyStringSchema3
|
|
3058
|
+
});
|
|
3059
|
+
var ThreadRealtimeClosedPayload = Schema19.Struct({
|
|
3060
|
+
reason: Schema19.optional(TrimmedNonEmptyStringSchema3)
|
|
3061
|
+
});
|
|
3062
|
+
var TurnStartedPayload = Schema19.Struct({
|
|
3063
|
+
model: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3064
|
+
effort: Schema19.optional(TrimmedNonEmptyStringSchema3)
|
|
3065
|
+
});
|
|
3066
|
+
var TurnCompletedPayload = Schema19.Struct({
|
|
3067
|
+
state: RuntimeTurnState,
|
|
3068
|
+
stopReason: Schema19.optional(Schema19.NullOr(TrimmedNonEmptyStringSchema3)),
|
|
3069
|
+
usage: Schema19.optional(Schema19.Unknown),
|
|
3070
|
+
modelUsage: Schema19.optional(UnknownRecordSchema),
|
|
3071
|
+
totalCostUsd: Schema19.optional(Schema19.Number),
|
|
3072
|
+
errorMessage: Schema19.optional(TrimmedNonEmptyStringSchema3)
|
|
3073
|
+
});
|
|
3074
|
+
var TurnAbortedPayload = Schema19.Struct({
|
|
3075
|
+
reason: TrimmedNonEmptyStringSchema3
|
|
3076
|
+
});
|
|
3077
|
+
var RuntimePlanStep = Schema19.Struct({
|
|
3078
|
+
step: TrimmedNonEmptyStringSchema3,
|
|
3079
|
+
status: RuntimePlanStepStatus
|
|
3080
|
+
});
|
|
3081
|
+
var TurnPlanUpdatedPayload = Schema19.Struct({
|
|
3082
|
+
explanation: Schema19.optional(Schema19.NullOr(TrimmedNonEmptyStringSchema3)),
|
|
3083
|
+
plan: Schema19.Array(RuntimePlanStep)
|
|
3084
|
+
});
|
|
3085
|
+
var TurnProposedDeltaPayload = Schema19.Struct({
|
|
3086
|
+
delta: Schema19.String
|
|
3087
|
+
});
|
|
3088
|
+
var TurnProposedCompletedPayload = Schema19.Struct({
|
|
3089
|
+
planMarkdown: TrimmedNonEmptyStringSchema3
|
|
3090
|
+
});
|
|
3091
|
+
var TurnDiffUpdatedPayload = Schema19.Struct({
|
|
3092
|
+
unifiedDiff: Schema19.String
|
|
3093
|
+
});
|
|
3094
|
+
var ItemLifecyclePayload = Schema19.Struct({
|
|
3095
|
+
itemType: CanonicalItemType,
|
|
3096
|
+
status: Schema19.optional(RuntimeItemStatus),
|
|
3097
|
+
title: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3098
|
+
detail: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3099
|
+
data: Schema19.optional(Schema19.Unknown)
|
|
3100
|
+
});
|
|
3101
|
+
var ContentDeltaPayload = Schema19.Struct({
|
|
3102
|
+
streamKind: RuntimeContentStreamKind,
|
|
3103
|
+
delta: Schema19.String,
|
|
3104
|
+
contentIndex: Schema19.optional(Schema19.Int),
|
|
3105
|
+
summaryIndex: Schema19.optional(Schema19.Int)
|
|
3106
|
+
});
|
|
3107
|
+
var RequestOpenedPayload = Schema19.Struct({
|
|
3108
|
+
requestType: CanonicalRequestType,
|
|
3109
|
+
detail: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3110
|
+
args: Schema19.optional(Schema19.Unknown)
|
|
3111
|
+
});
|
|
3112
|
+
var RequestResolvedPayload = Schema19.Struct({
|
|
3113
|
+
requestType: CanonicalRequestType,
|
|
3114
|
+
decision: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3115
|
+
resolution: Schema19.optional(Schema19.Unknown)
|
|
3116
|
+
});
|
|
3117
|
+
var UserInputQuestionOption = Schema19.Struct({
|
|
3118
|
+
label: TrimmedNonEmptyStringSchema3,
|
|
3119
|
+
description: TrimmedNonEmptyStringSchema3
|
|
3120
|
+
});
|
|
3121
|
+
var UserInputQuestion = Schema19.Struct({
|
|
3122
|
+
id: TrimmedNonEmptyStringSchema3,
|
|
3123
|
+
header: TrimmedNonEmptyStringSchema3,
|
|
3124
|
+
question: TrimmedNonEmptyStringSchema3,
|
|
3125
|
+
options: Schema19.Array(UserInputQuestionOption)
|
|
3126
|
+
});
|
|
3127
|
+
var UserInputRequestedPayload = Schema19.Struct({
|
|
3128
|
+
questions: Schema19.Array(UserInputQuestion)
|
|
3129
|
+
});
|
|
3130
|
+
var UserInputResolvedPayload = Schema19.Struct({
|
|
3131
|
+
answers: UnknownRecordSchema
|
|
3132
|
+
});
|
|
3133
|
+
var TaskStartedPayload = Schema19.Struct({
|
|
3134
|
+
taskId: RuntimeTaskId,
|
|
3135
|
+
description: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3136
|
+
taskType: Schema19.optional(TrimmedNonEmptyStringSchema3)
|
|
3137
|
+
});
|
|
3138
|
+
var TaskProgressPayload = Schema19.Struct({
|
|
3139
|
+
taskId: RuntimeTaskId,
|
|
3140
|
+
description: TrimmedNonEmptyStringSchema3,
|
|
3141
|
+
usage: Schema19.optional(Schema19.Unknown),
|
|
3142
|
+
lastToolName: Schema19.optional(TrimmedNonEmptyStringSchema3)
|
|
3143
|
+
});
|
|
3144
|
+
var TaskCompletedPayload = Schema19.Struct({
|
|
3145
|
+
taskId: RuntimeTaskId,
|
|
3146
|
+
status: Schema19.Literals(["completed", "failed", "stopped"]),
|
|
3147
|
+
summary: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3148
|
+
usage: Schema19.optional(Schema19.Unknown)
|
|
3149
|
+
});
|
|
3150
|
+
var HookStartedPayload = Schema19.Struct({
|
|
3151
|
+
hookId: TrimmedNonEmptyStringSchema3,
|
|
3152
|
+
hookName: TrimmedNonEmptyStringSchema3,
|
|
3153
|
+
hookEvent: TrimmedNonEmptyStringSchema3
|
|
3154
|
+
});
|
|
3155
|
+
var HookProgressPayload = Schema19.Struct({
|
|
3156
|
+
hookId: TrimmedNonEmptyStringSchema3,
|
|
3157
|
+
output: Schema19.optional(Schema19.String),
|
|
3158
|
+
stdout: Schema19.optional(Schema19.String),
|
|
3159
|
+
stderr: Schema19.optional(Schema19.String)
|
|
3160
|
+
});
|
|
3161
|
+
var HookCompletedPayload = Schema19.Struct({
|
|
3162
|
+
hookId: TrimmedNonEmptyStringSchema3,
|
|
3163
|
+
outcome: Schema19.Literals(["success", "error", "cancelled"]),
|
|
3164
|
+
output: Schema19.optional(Schema19.String),
|
|
3165
|
+
stdout: Schema19.optional(Schema19.String),
|
|
3166
|
+
stderr: Schema19.optional(Schema19.String),
|
|
3167
|
+
exitCode: Schema19.optional(Schema19.Int)
|
|
3168
|
+
});
|
|
3169
|
+
var ToolProgressPayload = Schema19.Struct({
|
|
3170
|
+
toolUseId: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3171
|
+
toolName: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3172
|
+
summary: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3173
|
+
elapsedSeconds: Schema19.optional(Schema19.Number)
|
|
3174
|
+
});
|
|
3175
|
+
var ToolSummaryPayload = Schema19.Struct({
|
|
3176
|
+
summary: TrimmedNonEmptyStringSchema3,
|
|
3177
|
+
precedingToolUseIds: Schema19.optional(Schema19.Array(TrimmedNonEmptyStringSchema3))
|
|
3178
|
+
});
|
|
3179
|
+
var AuthStatusPayload = Schema19.Struct({
|
|
3180
|
+
isAuthenticating: Schema19.optional(Schema19.Boolean),
|
|
3181
|
+
output: Schema19.optional(Schema19.Array(Schema19.String)),
|
|
3182
|
+
error: Schema19.optional(TrimmedNonEmptyStringSchema3)
|
|
3183
|
+
});
|
|
3184
|
+
var AccountUpdatedPayload = Schema19.Struct({
|
|
3185
|
+
account: Schema19.Unknown
|
|
3186
|
+
});
|
|
3187
|
+
var AccountRateLimitsUpdatedPayload = Schema19.Struct({
|
|
3188
|
+
rateLimits: Schema19.Unknown
|
|
3189
|
+
});
|
|
3190
|
+
var McpStatusUpdatedPayload = Schema19.Struct({
|
|
3191
|
+
status: Schema19.Unknown
|
|
3192
|
+
});
|
|
3193
|
+
var McpOauthCompletedPayload = Schema19.Struct({
|
|
3194
|
+
success: Schema19.Boolean,
|
|
3195
|
+
name: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3196
|
+
error: Schema19.optional(TrimmedNonEmptyStringSchema3)
|
|
3197
|
+
});
|
|
3198
|
+
var ModelReroutedPayload = Schema19.Struct({
|
|
3199
|
+
fromModel: TrimmedNonEmptyStringSchema3,
|
|
3200
|
+
toModel: TrimmedNonEmptyStringSchema3,
|
|
3201
|
+
reason: TrimmedNonEmptyStringSchema3
|
|
3202
|
+
});
|
|
3203
|
+
var ConfigWarningPayload = Schema19.Struct({
|
|
3204
|
+
summary: TrimmedNonEmptyStringSchema3,
|
|
3205
|
+
details: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3206
|
+
path: Schema19.optional(TrimmedNonEmptyStringSchema3),
|
|
3207
|
+
range: Schema19.optional(Schema19.Unknown)
|
|
3208
|
+
});
|
|
3209
|
+
var DeprecationNoticePayload = Schema19.Struct({
|
|
3210
|
+
summary: TrimmedNonEmptyStringSchema3,
|
|
3211
|
+
details: Schema19.optional(TrimmedNonEmptyStringSchema3)
|
|
3212
|
+
});
|
|
3213
|
+
var FilesPersistedPayload = Schema19.Struct({
|
|
3214
|
+
files: Schema19.Array(Schema19.Struct({
|
|
3215
|
+
filename: TrimmedNonEmptyStringSchema3,
|
|
3216
|
+
fileId: TrimmedNonEmptyStringSchema3
|
|
3217
|
+
})),
|
|
3218
|
+
failed: Schema19.optional(Schema19.Array(Schema19.Struct({
|
|
3219
|
+
filename: TrimmedNonEmptyStringSchema3,
|
|
3220
|
+
error: TrimmedNonEmptyStringSchema3
|
|
3221
|
+
})))
|
|
3222
|
+
});
|
|
3223
|
+
var RuntimeWarningPayload = Schema19.Struct({
|
|
3224
|
+
message: TrimmedNonEmptyStringSchema3,
|
|
3225
|
+
detail: Schema19.optional(Schema19.Unknown)
|
|
3226
|
+
});
|
|
3227
|
+
var RuntimeErrorPayload = Schema19.Struct({
|
|
3228
|
+
message: TrimmedNonEmptyStringSchema3,
|
|
3229
|
+
class: Schema19.optional(RuntimeErrorClass),
|
|
3230
|
+
detail: Schema19.optional(Schema19.Unknown)
|
|
3231
|
+
});
|
|
3232
|
+
var ProviderRuntimeSessionStartedEvent = Schema19.Struct({
|
|
3233
|
+
...ProviderRuntimeEventBase.fields,
|
|
3234
|
+
type: SessionStartedType,
|
|
3235
|
+
payload: SessionStartedPayload
|
|
3236
|
+
});
|
|
3237
|
+
var ProviderRuntimeSessionConfiguredEvent = Schema19.Struct({
|
|
3238
|
+
...ProviderRuntimeEventBase.fields,
|
|
3239
|
+
type: SessionConfiguredType,
|
|
3240
|
+
payload: SessionConfiguredPayload
|
|
3241
|
+
});
|
|
3242
|
+
var ProviderRuntimeSessionStateChangedEvent = Schema19.Struct({
|
|
3243
|
+
...ProviderRuntimeEventBase.fields,
|
|
3244
|
+
type: SessionStateChangedType,
|
|
3245
|
+
payload: SessionStateChangedPayload
|
|
3246
|
+
});
|
|
3247
|
+
var ProviderRuntimeSessionExitedEvent = Schema19.Struct({
|
|
3248
|
+
...ProviderRuntimeEventBase.fields,
|
|
3249
|
+
type: SessionExitedType,
|
|
3250
|
+
payload: SessionExitedPayload
|
|
3251
|
+
});
|
|
3252
|
+
var ProviderRuntimeThreadStartedEvent = Schema19.Struct({
|
|
3253
|
+
...ProviderRuntimeEventBase.fields,
|
|
3254
|
+
type: ThreadStartedType,
|
|
3255
|
+
payload: ThreadStartedPayload
|
|
3256
|
+
});
|
|
3257
|
+
var ProviderRuntimeThreadStateChangedEvent = Schema19.Struct({
|
|
3258
|
+
...ProviderRuntimeEventBase.fields,
|
|
3259
|
+
type: ThreadStateChangedType,
|
|
3260
|
+
payload: ThreadStateChangedPayload
|
|
3261
|
+
});
|
|
3262
|
+
var ProviderRuntimeThreadMetadataUpdatedEvent = Schema19.Struct({
|
|
3263
|
+
...ProviderRuntimeEventBase.fields,
|
|
3264
|
+
type: ThreadMetadataUpdatedType,
|
|
3265
|
+
payload: ThreadMetadataUpdatedPayload
|
|
3266
|
+
});
|
|
3267
|
+
var ProviderRuntimeThreadTokenUsageUpdatedEvent = Schema19.Struct({
|
|
3268
|
+
...ProviderRuntimeEventBase.fields,
|
|
3269
|
+
type: ThreadTokenUsageUpdatedType,
|
|
3270
|
+
payload: ThreadTokenUsageUpdatedPayload
|
|
3271
|
+
});
|
|
3272
|
+
var ProviderRuntimeThreadRealtimeStartedEvent = Schema19.Struct({
|
|
3273
|
+
...ProviderRuntimeEventBase.fields,
|
|
3274
|
+
type: ThreadRealtimeStartedType,
|
|
3275
|
+
payload: ThreadRealtimeStartedPayload
|
|
3276
|
+
});
|
|
3277
|
+
var ProviderRuntimeThreadRealtimeItemAddedEvent = Schema19.Struct({
|
|
3278
|
+
...ProviderRuntimeEventBase.fields,
|
|
3279
|
+
type: ThreadRealtimeItemAddedType,
|
|
3280
|
+
payload: ThreadRealtimeItemAddedPayload
|
|
3281
|
+
});
|
|
3282
|
+
var ProviderRuntimeThreadRealtimeAudioDeltaEvent = Schema19.Struct({
|
|
3283
|
+
...ProviderRuntimeEventBase.fields,
|
|
3284
|
+
type: ThreadRealtimeAudioDeltaType,
|
|
3285
|
+
payload: ThreadRealtimeAudioDeltaPayload
|
|
3286
|
+
});
|
|
3287
|
+
var ProviderRuntimeThreadRealtimeErrorEvent = Schema19.Struct({
|
|
3288
|
+
...ProviderRuntimeEventBase.fields,
|
|
3289
|
+
type: ThreadRealtimeErrorType,
|
|
3290
|
+
payload: ThreadRealtimeErrorPayload
|
|
3291
|
+
});
|
|
3292
|
+
var ProviderRuntimeThreadRealtimeClosedEvent = Schema19.Struct({
|
|
3293
|
+
...ProviderRuntimeEventBase.fields,
|
|
3294
|
+
type: ThreadRealtimeClosedType,
|
|
3295
|
+
payload: ThreadRealtimeClosedPayload
|
|
3296
|
+
});
|
|
3297
|
+
var ProviderRuntimeTurnStartedEvent = Schema19.Struct({
|
|
3298
|
+
...ProviderRuntimeEventBase.fields,
|
|
3299
|
+
type: TurnStartedType,
|
|
3300
|
+
payload: TurnStartedPayload
|
|
3301
|
+
});
|
|
3302
|
+
var ProviderRuntimeTurnCompletedEvent = Schema19.Struct({
|
|
3303
|
+
...ProviderRuntimeEventBase.fields,
|
|
3304
|
+
type: TurnCompletedType,
|
|
3305
|
+
payload: TurnCompletedPayload
|
|
3306
|
+
});
|
|
3307
|
+
var ProviderRuntimeTurnAbortedEvent = Schema19.Struct({
|
|
3308
|
+
...ProviderRuntimeEventBase.fields,
|
|
3309
|
+
type: TurnAbortedType,
|
|
3310
|
+
payload: TurnAbortedPayload
|
|
3311
|
+
});
|
|
3312
|
+
var ProviderRuntimeTurnPlanUpdatedEvent = Schema19.Struct({
|
|
3313
|
+
...ProviderRuntimeEventBase.fields,
|
|
3314
|
+
type: TurnPlanUpdatedType,
|
|
3315
|
+
payload: TurnPlanUpdatedPayload
|
|
3316
|
+
});
|
|
3317
|
+
var ProviderRuntimeTurnProposedDeltaEvent = Schema19.Struct({
|
|
3318
|
+
...ProviderRuntimeEventBase.fields,
|
|
3319
|
+
type: TurnProposedDeltaType,
|
|
3320
|
+
payload: TurnProposedDeltaPayload
|
|
3321
|
+
});
|
|
3322
|
+
var ProviderRuntimeTurnProposedCompletedEvent = Schema19.Struct({
|
|
3323
|
+
...ProviderRuntimeEventBase.fields,
|
|
3324
|
+
type: TurnProposedCompletedType,
|
|
3325
|
+
payload: TurnProposedCompletedPayload
|
|
3326
|
+
});
|
|
3327
|
+
var ProviderRuntimeTurnDiffUpdatedEvent = Schema19.Struct({
|
|
3328
|
+
...ProviderRuntimeEventBase.fields,
|
|
3329
|
+
type: TurnDiffUpdatedType,
|
|
3330
|
+
payload: TurnDiffUpdatedPayload
|
|
3331
|
+
});
|
|
3332
|
+
var ProviderRuntimeItemStartedEvent = Schema19.Struct({
|
|
3333
|
+
...ProviderRuntimeEventBase.fields,
|
|
3334
|
+
type: ItemStartedType,
|
|
3335
|
+
payload: ItemLifecyclePayload
|
|
3336
|
+
});
|
|
3337
|
+
var ProviderRuntimeItemUpdatedEvent = Schema19.Struct({
|
|
3338
|
+
...ProviderRuntimeEventBase.fields,
|
|
3339
|
+
type: ItemUpdatedType,
|
|
3340
|
+
payload: ItemLifecyclePayload
|
|
3341
|
+
});
|
|
3342
|
+
var ProviderRuntimeItemCompletedEvent = Schema19.Struct({
|
|
3343
|
+
...ProviderRuntimeEventBase.fields,
|
|
3344
|
+
type: ItemCompletedType,
|
|
3345
|
+
payload: ItemLifecyclePayload
|
|
3346
|
+
});
|
|
3347
|
+
var ProviderRuntimeContentDeltaEvent = Schema19.Struct({
|
|
3348
|
+
...ProviderRuntimeEventBase.fields,
|
|
3349
|
+
type: ContentDeltaType,
|
|
3350
|
+
payload: ContentDeltaPayload
|
|
3351
|
+
});
|
|
3352
|
+
var ProviderRuntimeRequestOpenedEvent = Schema19.Struct({
|
|
3353
|
+
...ProviderRuntimeEventBase.fields,
|
|
3354
|
+
type: RequestOpenedType,
|
|
3355
|
+
payload: RequestOpenedPayload
|
|
3356
|
+
});
|
|
3357
|
+
var ProviderRuntimeRequestResolvedEvent = Schema19.Struct({
|
|
3358
|
+
...ProviderRuntimeEventBase.fields,
|
|
3359
|
+
type: RequestResolvedType,
|
|
3360
|
+
payload: RequestResolvedPayload
|
|
3361
|
+
});
|
|
3362
|
+
var ProviderRuntimeUserInputRequestedEvent = Schema19.Struct({
|
|
3363
|
+
...ProviderRuntimeEventBase.fields,
|
|
3364
|
+
type: UserInputRequestedType,
|
|
3365
|
+
payload: UserInputRequestedPayload
|
|
3366
|
+
});
|
|
3367
|
+
var ProviderRuntimeUserInputResolvedEvent = Schema19.Struct({
|
|
3368
|
+
...ProviderRuntimeEventBase.fields,
|
|
3369
|
+
type: UserInputResolvedType,
|
|
3370
|
+
payload: UserInputResolvedPayload
|
|
3371
|
+
});
|
|
3372
|
+
var ProviderRuntimeTaskStartedEvent = Schema19.Struct({
|
|
3373
|
+
...ProviderRuntimeEventBase.fields,
|
|
3374
|
+
type: TaskStartedType,
|
|
3375
|
+
payload: TaskStartedPayload
|
|
3376
|
+
});
|
|
3377
|
+
var ProviderRuntimeTaskProgressEvent = Schema19.Struct({
|
|
3378
|
+
...ProviderRuntimeEventBase.fields,
|
|
3379
|
+
type: TaskProgressType,
|
|
3380
|
+
payload: TaskProgressPayload
|
|
3381
|
+
});
|
|
3382
|
+
var ProviderRuntimeTaskCompletedEvent = Schema19.Struct({
|
|
3383
|
+
...ProviderRuntimeEventBase.fields,
|
|
3384
|
+
type: TaskCompletedType,
|
|
3385
|
+
payload: TaskCompletedPayload
|
|
3386
|
+
});
|
|
3387
|
+
var ProviderRuntimeHookStartedEvent = Schema19.Struct({
|
|
3388
|
+
...ProviderRuntimeEventBase.fields,
|
|
3389
|
+
type: HookStartedType,
|
|
3390
|
+
payload: HookStartedPayload
|
|
3391
|
+
});
|
|
3392
|
+
var ProviderRuntimeHookProgressEvent = Schema19.Struct({
|
|
3393
|
+
...ProviderRuntimeEventBase.fields,
|
|
3394
|
+
type: HookProgressType,
|
|
3395
|
+
payload: HookProgressPayload
|
|
3396
|
+
});
|
|
3397
|
+
var ProviderRuntimeHookCompletedEvent = Schema19.Struct({
|
|
3398
|
+
...ProviderRuntimeEventBase.fields,
|
|
3399
|
+
type: HookCompletedType,
|
|
3400
|
+
payload: HookCompletedPayload
|
|
3401
|
+
});
|
|
3402
|
+
var ProviderRuntimeToolProgressEvent = Schema19.Struct({
|
|
3403
|
+
...ProviderRuntimeEventBase.fields,
|
|
3404
|
+
type: ToolProgressType,
|
|
3405
|
+
payload: ToolProgressPayload
|
|
3406
|
+
});
|
|
3407
|
+
var ProviderRuntimeToolSummaryEvent = Schema19.Struct({
|
|
3408
|
+
...ProviderRuntimeEventBase.fields,
|
|
3409
|
+
type: ToolSummaryType,
|
|
3410
|
+
payload: ToolSummaryPayload
|
|
3411
|
+
});
|
|
3412
|
+
var ProviderRuntimeAuthStatusEvent = Schema19.Struct({
|
|
3413
|
+
...ProviderRuntimeEventBase.fields,
|
|
3414
|
+
type: AuthStatusType,
|
|
3415
|
+
payload: AuthStatusPayload
|
|
3416
|
+
});
|
|
3417
|
+
var ProviderRuntimeAccountUpdatedEvent = Schema19.Struct({
|
|
3418
|
+
...ProviderRuntimeEventBase.fields,
|
|
3419
|
+
type: AccountUpdatedType,
|
|
3420
|
+
payload: AccountUpdatedPayload
|
|
3421
|
+
});
|
|
3422
|
+
var ProviderRuntimeAccountRateLimitsUpdatedEvent = Schema19.Struct({
|
|
3423
|
+
...ProviderRuntimeEventBase.fields,
|
|
3424
|
+
type: AccountRateLimitsUpdatedType,
|
|
3425
|
+
payload: AccountRateLimitsUpdatedPayload
|
|
3426
|
+
});
|
|
3427
|
+
var ProviderRuntimeMcpStatusUpdatedEvent = Schema19.Struct({
|
|
3428
|
+
...ProviderRuntimeEventBase.fields,
|
|
3429
|
+
type: McpStatusUpdatedType,
|
|
3430
|
+
payload: McpStatusUpdatedPayload
|
|
3431
|
+
});
|
|
3432
|
+
var ProviderRuntimeMcpOauthCompletedEvent = Schema19.Struct({
|
|
3433
|
+
...ProviderRuntimeEventBase.fields,
|
|
3434
|
+
type: McpOauthCompletedType,
|
|
3435
|
+
payload: McpOauthCompletedPayload
|
|
3436
|
+
});
|
|
3437
|
+
var ProviderRuntimeModelReroutedEvent = Schema19.Struct({
|
|
3438
|
+
...ProviderRuntimeEventBase.fields,
|
|
3439
|
+
type: ModelReroutedType,
|
|
3440
|
+
payload: ModelReroutedPayload
|
|
3441
|
+
});
|
|
3442
|
+
var ProviderRuntimeConfigWarningEvent = Schema19.Struct({
|
|
3443
|
+
...ProviderRuntimeEventBase.fields,
|
|
3444
|
+
type: ConfigWarningType,
|
|
3445
|
+
payload: ConfigWarningPayload
|
|
3446
|
+
});
|
|
3447
|
+
var ProviderRuntimeDeprecationNoticeEvent = Schema19.Struct({
|
|
3448
|
+
...ProviderRuntimeEventBase.fields,
|
|
3449
|
+
type: DeprecationNoticeType,
|
|
3450
|
+
payload: DeprecationNoticePayload
|
|
3451
|
+
});
|
|
3452
|
+
var ProviderRuntimeFilesPersistedEvent = Schema19.Struct({
|
|
3453
|
+
...ProviderRuntimeEventBase.fields,
|
|
3454
|
+
type: FilesPersistedType,
|
|
3455
|
+
payload: FilesPersistedPayload
|
|
3456
|
+
});
|
|
3457
|
+
var ProviderRuntimeWarningEvent = Schema19.Struct({
|
|
3458
|
+
...ProviderRuntimeEventBase.fields,
|
|
3459
|
+
type: RuntimeWarningType,
|
|
3460
|
+
payload: RuntimeWarningPayload
|
|
3461
|
+
});
|
|
3462
|
+
var ProviderRuntimeErrorEvent = Schema19.Struct({
|
|
3463
|
+
...ProviderRuntimeEventBase.fields,
|
|
3464
|
+
type: RuntimeErrorType,
|
|
3465
|
+
payload: RuntimeErrorPayload
|
|
3466
|
+
});
|
|
3467
|
+
var ProviderRuntimeEventV2 = Schema19.Union([
|
|
3468
|
+
ProviderRuntimeSessionStartedEvent,
|
|
3469
|
+
ProviderRuntimeSessionConfiguredEvent,
|
|
3470
|
+
ProviderRuntimeSessionStateChangedEvent,
|
|
3471
|
+
ProviderRuntimeSessionExitedEvent,
|
|
3472
|
+
ProviderRuntimeThreadStartedEvent,
|
|
3473
|
+
ProviderRuntimeThreadStateChangedEvent,
|
|
3474
|
+
ProviderRuntimeThreadMetadataUpdatedEvent,
|
|
3475
|
+
ProviderRuntimeThreadTokenUsageUpdatedEvent,
|
|
3476
|
+
ProviderRuntimeThreadRealtimeStartedEvent,
|
|
3477
|
+
ProviderRuntimeThreadRealtimeItemAddedEvent,
|
|
3478
|
+
ProviderRuntimeThreadRealtimeAudioDeltaEvent,
|
|
3479
|
+
ProviderRuntimeThreadRealtimeErrorEvent,
|
|
3480
|
+
ProviderRuntimeThreadRealtimeClosedEvent,
|
|
3481
|
+
ProviderRuntimeTurnStartedEvent,
|
|
3482
|
+
ProviderRuntimeTurnCompletedEvent,
|
|
3483
|
+
ProviderRuntimeTurnAbortedEvent,
|
|
3484
|
+
ProviderRuntimeTurnPlanUpdatedEvent,
|
|
3485
|
+
ProviderRuntimeTurnProposedDeltaEvent,
|
|
3486
|
+
ProviderRuntimeTurnProposedCompletedEvent,
|
|
3487
|
+
ProviderRuntimeTurnDiffUpdatedEvent,
|
|
3488
|
+
ProviderRuntimeItemStartedEvent,
|
|
3489
|
+
ProviderRuntimeItemUpdatedEvent,
|
|
3490
|
+
ProviderRuntimeItemCompletedEvent,
|
|
3491
|
+
ProviderRuntimeContentDeltaEvent,
|
|
3492
|
+
ProviderRuntimeRequestOpenedEvent,
|
|
3493
|
+
ProviderRuntimeRequestResolvedEvent,
|
|
3494
|
+
ProviderRuntimeUserInputRequestedEvent,
|
|
3495
|
+
ProviderRuntimeUserInputResolvedEvent,
|
|
3496
|
+
ProviderRuntimeTaskStartedEvent,
|
|
3497
|
+
ProviderRuntimeTaskProgressEvent,
|
|
3498
|
+
ProviderRuntimeTaskCompletedEvent,
|
|
3499
|
+
ProviderRuntimeHookStartedEvent,
|
|
3500
|
+
ProviderRuntimeHookProgressEvent,
|
|
3501
|
+
ProviderRuntimeHookCompletedEvent,
|
|
3502
|
+
ProviderRuntimeToolProgressEvent,
|
|
3503
|
+
ProviderRuntimeToolSummaryEvent,
|
|
3504
|
+
ProviderRuntimeAuthStatusEvent,
|
|
3505
|
+
ProviderRuntimeAccountUpdatedEvent,
|
|
3506
|
+
ProviderRuntimeAccountRateLimitsUpdatedEvent,
|
|
3507
|
+
ProviderRuntimeMcpStatusUpdatedEvent,
|
|
3508
|
+
ProviderRuntimeMcpOauthCompletedEvent,
|
|
3509
|
+
ProviderRuntimeModelReroutedEvent,
|
|
3510
|
+
ProviderRuntimeConfigWarningEvent,
|
|
3511
|
+
ProviderRuntimeDeprecationNoticeEvent,
|
|
3512
|
+
ProviderRuntimeFilesPersistedEvent,
|
|
3513
|
+
ProviderRuntimeWarningEvent,
|
|
3514
|
+
ProviderRuntimeErrorEvent
|
|
3515
|
+
]);
|
|
3516
|
+
var ProviderRuntimeEvent = ProviderRuntimeEventV2;
|
|
3517
|
+
var ProviderRuntimeToolKind = Schema19.Literals([
|
|
3518
|
+
"command",
|
|
3519
|
+
"file-read",
|
|
3520
|
+
"file-change",
|
|
3521
|
+
"other"
|
|
3522
|
+
]);
|
|
3523
|
+
var ProviderRuntimeTurnStatus = RuntimeTurnState;
|
|
3524
|
+
// packages/contracts/src/ws.ts
|
|
3525
|
+
import { Schema as Schema24, Struct as Struct2 } from "effect";
|
|
3526
|
+
|
|
3527
|
+
// packages/contracts/src/git.ts
|
|
3528
|
+
import { Schema as Schema20 } from "effect";
|
|
3529
|
+
var TrimmedNonEmptyStringSchema4 = TrimmedNonEmptyString;
|
|
3530
|
+
var GitStackedAction = Schema20.Literals(["commit", "commit_push", "commit_push_pr"]);
|
|
3531
|
+
var GitCommitStepStatus = Schema20.Literals(["created", "skipped_no_changes"]);
|
|
3532
|
+
var GitPushStepStatus = Schema20.Literals([
|
|
3533
|
+
"pushed",
|
|
3534
|
+
"skipped_not_requested",
|
|
3535
|
+
"skipped_up_to_date"
|
|
3536
|
+
]);
|
|
3537
|
+
var GitBranchStepStatus = Schema20.Literals(["created", "skipped_not_requested"]);
|
|
3538
|
+
var GitPrStepStatus = Schema20.Literals([
|
|
3539
|
+
"created",
|
|
3540
|
+
"opened_existing",
|
|
3541
|
+
"skipped_not_requested"
|
|
3542
|
+
]);
|
|
3543
|
+
var GitStatusPrState = Schema20.Literals(["open", "closed", "merged"]);
|
|
3544
|
+
var GitBranch = Schema20.Struct({
|
|
3545
|
+
name: TrimmedNonEmptyStringSchema4,
|
|
3546
|
+
isRemote: Schema20.optional(Schema20.Boolean),
|
|
3547
|
+
remoteName: Schema20.optional(TrimmedNonEmptyStringSchema4),
|
|
3548
|
+
current: Schema20.Boolean,
|
|
3549
|
+
isDefault: Schema20.Boolean,
|
|
3550
|
+
worktreePath: TrimmedNonEmptyStringSchema4.pipe(Schema20.NullOr)
|
|
3551
|
+
});
|
|
3552
|
+
var GitWorktree = Schema20.Struct({
|
|
3553
|
+
path: TrimmedNonEmptyStringSchema4,
|
|
3554
|
+
branch: TrimmedNonEmptyStringSchema4
|
|
3555
|
+
});
|
|
3556
|
+
var GitStatusInput = Schema20.Struct({
|
|
3557
|
+
cwd: TrimmedNonEmptyStringSchema4
|
|
3558
|
+
});
|
|
3559
|
+
var GitPullInput = Schema20.Struct({
|
|
3560
|
+
cwd: TrimmedNonEmptyStringSchema4
|
|
3561
|
+
});
|
|
3562
|
+
var GitReadWorkingTreePatchInput = Schema20.Struct({
|
|
3563
|
+
cwd: TrimmedNonEmptyStringSchema4,
|
|
3564
|
+
relativePath: Schema20.optional(TrimmedNonEmptyStringSchema4)
|
|
3565
|
+
});
|
|
3566
|
+
var GitRunStackedActionInput = Schema20.Struct({
|
|
3567
|
+
cwd: TrimmedNonEmptyStringSchema4,
|
|
3568
|
+
action: GitStackedAction,
|
|
3569
|
+
commitMessage: Schema20.optional(TrimmedNonEmptyStringSchema4.check(Schema20.isMaxLength(1e4))),
|
|
3570
|
+
featureBranch: Schema20.optional(Schema20.Boolean)
|
|
3571
|
+
});
|
|
3572
|
+
var GitListBranchesInput = Schema20.Struct({
|
|
3573
|
+
cwd: TrimmedNonEmptyStringSchema4
|
|
3574
|
+
});
|
|
3575
|
+
var GitCreateWorktreeInput = Schema20.Struct({
|
|
3576
|
+
cwd: TrimmedNonEmptyStringSchema4,
|
|
3577
|
+
branch: TrimmedNonEmptyStringSchema4,
|
|
3578
|
+
newBranch: TrimmedNonEmptyStringSchema4,
|
|
3579
|
+
path: Schema20.NullOr(TrimmedNonEmptyStringSchema4)
|
|
3580
|
+
});
|
|
3581
|
+
var GitRemoveWorktreeInput = Schema20.Struct({
|
|
3582
|
+
cwd: TrimmedNonEmptyStringSchema4,
|
|
3583
|
+
path: TrimmedNonEmptyStringSchema4,
|
|
3584
|
+
force: Schema20.optional(Schema20.Boolean)
|
|
3585
|
+
});
|
|
3586
|
+
var GitCreateBranchInput = Schema20.Struct({
|
|
3587
|
+
cwd: TrimmedNonEmptyStringSchema4,
|
|
3588
|
+
branch: TrimmedNonEmptyStringSchema4
|
|
3589
|
+
});
|
|
3590
|
+
var GitCheckoutInput = Schema20.Struct({
|
|
3591
|
+
cwd: TrimmedNonEmptyStringSchema4,
|
|
3592
|
+
branch: TrimmedNonEmptyStringSchema4
|
|
3593
|
+
});
|
|
3594
|
+
var GitInitInput = Schema20.Struct({
|
|
3595
|
+
cwd: TrimmedNonEmptyStringSchema4
|
|
3596
|
+
});
|
|
3597
|
+
var GitStatusPr = Schema20.Struct({
|
|
3598
|
+
number: PositiveInt,
|
|
3599
|
+
title: TrimmedNonEmptyStringSchema4,
|
|
3600
|
+
url: Schema20.String,
|
|
3601
|
+
baseBranch: TrimmedNonEmptyStringSchema4,
|
|
3602
|
+
headBranch: TrimmedNonEmptyStringSchema4,
|
|
3603
|
+
state: GitStatusPrState
|
|
3604
|
+
});
|
|
3605
|
+
var GitStatusResult = Schema20.Struct({
|
|
3606
|
+
branch: TrimmedNonEmptyStringSchema4.pipe(Schema20.NullOr),
|
|
3607
|
+
hasWorkingTreeChanges: Schema20.Boolean,
|
|
3608
|
+
workingTree: Schema20.Struct({
|
|
3609
|
+
files: Schema20.Array(Schema20.Struct({
|
|
3610
|
+
path: TrimmedNonEmptyStringSchema4,
|
|
3611
|
+
insertions: NonNegativeInt,
|
|
3612
|
+
deletions: NonNegativeInt
|
|
3613
|
+
})),
|
|
3614
|
+
insertions: NonNegativeInt,
|
|
3615
|
+
deletions: NonNegativeInt
|
|
3616
|
+
}),
|
|
3617
|
+
hasUpstream: Schema20.Boolean,
|
|
3618
|
+
aheadCount: NonNegativeInt,
|
|
3619
|
+
behindCount: NonNegativeInt,
|
|
3620
|
+
pr: Schema20.NullOr(GitStatusPr)
|
|
3621
|
+
});
|
|
3622
|
+
var GitListBranchesResult = Schema20.Struct({
|
|
3623
|
+
branches: Schema20.Array(GitBranch),
|
|
3624
|
+
isRepo: Schema20.Boolean
|
|
3625
|
+
});
|
|
3626
|
+
var GitCreateWorktreeResult = Schema20.Struct({
|
|
3627
|
+
worktree: GitWorktree
|
|
3628
|
+
});
|
|
3629
|
+
var GitRunStackedActionResult = Schema20.Struct({
|
|
3630
|
+
action: GitStackedAction,
|
|
3631
|
+
branch: Schema20.Struct({
|
|
3632
|
+
status: GitBranchStepStatus,
|
|
3633
|
+
name: Schema20.optional(TrimmedNonEmptyStringSchema4)
|
|
3634
|
+
}),
|
|
3635
|
+
commit: Schema20.Struct({
|
|
3636
|
+
status: GitCommitStepStatus,
|
|
3637
|
+
commitSha: Schema20.optional(TrimmedNonEmptyStringSchema4),
|
|
3638
|
+
subject: Schema20.optional(TrimmedNonEmptyStringSchema4)
|
|
3639
|
+
}),
|
|
3640
|
+
push: Schema20.Struct({
|
|
3641
|
+
status: GitPushStepStatus,
|
|
3642
|
+
branch: Schema20.optional(TrimmedNonEmptyStringSchema4),
|
|
3643
|
+
upstreamBranch: Schema20.optional(TrimmedNonEmptyStringSchema4),
|
|
3644
|
+
setUpstream: Schema20.optional(Schema20.Boolean)
|
|
3645
|
+
}),
|
|
3646
|
+
pr: Schema20.Struct({
|
|
3647
|
+
status: GitPrStepStatus,
|
|
3648
|
+
url: Schema20.optional(Schema20.String),
|
|
3649
|
+
number: Schema20.optional(PositiveInt),
|
|
3650
|
+
baseBranch: Schema20.optional(TrimmedNonEmptyStringSchema4),
|
|
3651
|
+
headBranch: Schema20.optional(TrimmedNonEmptyStringSchema4),
|
|
3652
|
+
title: Schema20.optional(TrimmedNonEmptyStringSchema4)
|
|
3653
|
+
})
|
|
3654
|
+
});
|
|
3655
|
+
var GitPullResult = Schema20.Struct({
|
|
3656
|
+
status: Schema20.Literals(["pulled", "skipped_up_to_date"]),
|
|
3657
|
+
branch: TrimmedNonEmptyStringSchema4,
|
|
3658
|
+
upstreamBranch: TrimmedNonEmptyStringSchema4.pipe(Schema20.NullOr)
|
|
3659
|
+
});
|
|
3660
|
+
var GitReadWorkingTreePatchResult = Schema20.Struct({
|
|
3661
|
+
diff: Schema20.String
|
|
3662
|
+
});
|
|
3663
|
+
|
|
3664
|
+
// packages/contracts/src/keybindings.ts
|
|
3665
|
+
import { Schema as Schema21 } from "effect";
|
|
3666
|
+
var MAX_KEYBINDING_VALUE_LENGTH = 64;
|
|
3667
|
+
var MAX_KEYBINDING_WHEN_LENGTH = 256;
|
|
3668
|
+
var MAX_WHEN_EXPRESSION_DEPTH = 64;
|
|
3669
|
+
var MAX_SCRIPT_ID_LENGTH = 24;
|
|
3670
|
+
var MAX_KEYBINDINGS_COUNT = 256;
|
|
3671
|
+
var STATIC_KEYBINDING_COMMANDS = [
|
|
3672
|
+
"terminal.toggle",
|
|
3673
|
+
"terminal.split",
|
|
3674
|
+
"terminal.new",
|
|
3675
|
+
"terminal.close",
|
|
3676
|
+
"diff.toggle",
|
|
3677
|
+
"chat.new",
|
|
3678
|
+
"chat.newLocal",
|
|
3679
|
+
"editor.openFavorite"
|
|
3680
|
+
];
|
|
3681
|
+
var SCRIPT_RUN_COMMAND_PATTERN = Schema21.TemplateLiteral([
|
|
3682
|
+
Schema21.Literal("script."),
|
|
3683
|
+
Schema21.NonEmptyString.check(Schema21.isMaxLength(MAX_SCRIPT_ID_LENGTH), Schema21.isPattern(/^[a-z0-9][a-z0-9-]*$/)),
|
|
3684
|
+
Schema21.Literal(".run")
|
|
3685
|
+
]);
|
|
3686
|
+
var KeybindingCommand = Schema21.Union([
|
|
3687
|
+
Schema21.Literals(STATIC_KEYBINDING_COMMANDS),
|
|
3688
|
+
SCRIPT_RUN_COMMAND_PATTERN
|
|
3689
|
+
]);
|
|
3690
|
+
var KeybindingValue = TrimmedString.check(Schema21.isMinLength(1), Schema21.isMaxLength(MAX_KEYBINDING_VALUE_LENGTH));
|
|
3691
|
+
var KeybindingWhen = TrimmedString.check(Schema21.isMinLength(1), Schema21.isMaxLength(MAX_KEYBINDING_WHEN_LENGTH));
|
|
3692
|
+
var KeybindingRule = Schema21.Struct({
|
|
3693
|
+
key: KeybindingValue,
|
|
3694
|
+
command: KeybindingCommand,
|
|
3695
|
+
when: Schema21.optional(KeybindingWhen)
|
|
3696
|
+
});
|
|
3697
|
+
var KeybindingsConfig = Schema21.Array(KeybindingRule).check(Schema21.isMaxLength(MAX_KEYBINDINGS_COUNT));
|
|
3698
|
+
var KeybindingShortcut = Schema21.Struct({
|
|
3699
|
+
key: KeybindingValue,
|
|
3700
|
+
metaKey: Schema21.Boolean,
|
|
3701
|
+
ctrlKey: Schema21.Boolean,
|
|
3702
|
+
shiftKey: Schema21.Boolean,
|
|
3703
|
+
altKey: Schema21.Boolean,
|
|
3704
|
+
modKey: Schema21.Boolean
|
|
3705
|
+
});
|
|
3706
|
+
var KeybindingWhenNode = Schema21.Union([
|
|
3707
|
+
Schema21.Struct({
|
|
3708
|
+
type: Schema21.Literal("identifier"),
|
|
3709
|
+
name: Schema21.NonEmptyString
|
|
3710
|
+
}),
|
|
3711
|
+
Schema21.Struct({
|
|
3712
|
+
type: Schema21.Literal("not"),
|
|
3713
|
+
node: Schema21.suspend(() => KeybindingWhenNode)
|
|
3714
|
+
}),
|
|
3715
|
+
Schema21.Struct({
|
|
3716
|
+
type: Schema21.Literal("and"),
|
|
3717
|
+
left: Schema21.suspend(() => KeybindingWhenNode),
|
|
3718
|
+
right: Schema21.suspend(() => KeybindingWhenNode)
|
|
3719
|
+
}),
|
|
3720
|
+
Schema21.Struct({
|
|
3721
|
+
type: Schema21.Literal("or"),
|
|
3722
|
+
left: Schema21.suspend(() => KeybindingWhenNode),
|
|
3723
|
+
right: Schema21.suspend(() => KeybindingWhenNode)
|
|
3724
|
+
})
|
|
3725
|
+
]);
|
|
3726
|
+
var ResolvedKeybindingRule = Schema21.Struct({
|
|
3727
|
+
command: KeybindingCommand,
|
|
3728
|
+
shortcut: KeybindingShortcut,
|
|
3729
|
+
whenAst: Schema21.optional(KeybindingWhenNode)
|
|
3730
|
+
}).annotate({ parseOptions: { onExcessProperty: "ignore" } });
|
|
3731
|
+
var ResolvedKeybindingsConfig = Schema21.Array(ResolvedKeybindingRule).check(Schema21.isMaxLength(MAX_KEYBINDINGS_COUNT));
|
|
3732
|
+
|
|
3733
|
+
// packages/contracts/src/project.ts
|
|
3734
|
+
import { Schema as Schema22 } from "effect";
|
|
3735
|
+
var PROJECT_SEARCH_ENTRIES_MAX_LIMIT = 200;
|
|
3736
|
+
var PROJECT_LIST_DIRECTORY_MAX_LIMIT = 500;
|
|
3737
|
+
var PROJECT_WRITE_FILE_PATH_MAX_LENGTH = 512;
|
|
3738
|
+
var PROJECT_READ_FILE_MAX_BYTES = 512 * 1024;
|
|
3739
|
+
var ProjectSearchEntriesInput = Schema22.Struct({
|
|
3740
|
+
cwd: TrimmedNonEmptyString,
|
|
3741
|
+
query: TrimmedNonEmptyString.check(Schema22.isMaxLength(256)),
|
|
3742
|
+
limit: PositiveInt.check(Schema22.isLessThanOrEqualTo(PROJECT_SEARCH_ENTRIES_MAX_LIMIT))
|
|
3743
|
+
});
|
|
3744
|
+
var ProjectEntryKind = Schema22.Literals(["file", "directory"]);
|
|
3745
|
+
var ProjectEntry = Schema22.Struct({
|
|
3746
|
+
path: TrimmedNonEmptyString,
|
|
3747
|
+
kind: ProjectEntryKind,
|
|
3748
|
+
parentPath: Schema22.optional(TrimmedNonEmptyString)
|
|
3749
|
+
});
|
|
3750
|
+
var ProjectSearchEntriesResult = Schema22.Struct({
|
|
3751
|
+
entries: Schema22.Array(ProjectEntry),
|
|
3752
|
+
truncated: Schema22.Boolean
|
|
3753
|
+
});
|
|
3754
|
+
var ProjectListDirectoryInput = Schema22.Struct({
|
|
3755
|
+
cwd: TrimmedNonEmptyString,
|
|
3756
|
+
relativePath: TrimmedNonEmptyString.check(Schema22.isMaxLength(PROJECT_WRITE_FILE_PATH_MAX_LENGTH)),
|
|
3757
|
+
limit: PositiveInt.check(Schema22.isLessThanOrEqualTo(PROJECT_LIST_DIRECTORY_MAX_LIMIT))
|
|
3758
|
+
});
|
|
3759
|
+
var ProjectDirectoryEntry = Schema22.Struct({
|
|
3760
|
+
name: TrimmedNonEmptyString,
|
|
3761
|
+
relativePath: TrimmedNonEmptyString,
|
|
3762
|
+
kind: ProjectEntryKind,
|
|
3763
|
+
sizeBytes: Schema22.optional(NonNegativeInt),
|
|
3764
|
+
modifiedAt: Schema22.optional(Schema22.String)
|
|
3765
|
+
});
|
|
3766
|
+
var ProjectListDirectoryResult = Schema22.Struct({
|
|
3767
|
+
entries: Schema22.Array(ProjectDirectoryEntry),
|
|
3768
|
+
truncated: Schema22.Boolean
|
|
3769
|
+
});
|
|
3770
|
+
var ProjectWriteFileInput = Schema22.Struct({
|
|
3771
|
+
cwd: TrimmedNonEmptyString,
|
|
3772
|
+
relativePath: TrimmedNonEmptyString.check(Schema22.isMaxLength(PROJECT_WRITE_FILE_PATH_MAX_LENGTH)),
|
|
3773
|
+
contents: Schema22.String
|
|
3774
|
+
});
|
|
3775
|
+
var ProjectWriteFileResult = Schema22.Struct({
|
|
3776
|
+
relativePath: TrimmedNonEmptyString
|
|
3777
|
+
});
|
|
3778
|
+
var ProjectReadFileInput = Schema22.Struct({
|
|
3779
|
+
cwd: TrimmedNonEmptyString,
|
|
3780
|
+
relativePath: TrimmedNonEmptyString.check(Schema22.isMaxLength(PROJECT_WRITE_FILE_PATH_MAX_LENGTH))
|
|
3781
|
+
});
|
|
3782
|
+
var ProjectReadFileResult = Schema22.Struct({
|
|
3783
|
+
relativePath: TrimmedNonEmptyString,
|
|
3784
|
+
contents: Schema22.String,
|
|
3785
|
+
truncated: Schema22.Boolean,
|
|
3786
|
+
sizeBytes: NonNegativeInt,
|
|
3787
|
+
maxBytes: PositiveInt
|
|
3788
|
+
});
|
|
3789
|
+
var PROJECT_READ_FILE_MAX_BYTES_VALUE = PROJECT_READ_FILE_MAX_BYTES;
|
|
3790
|
+
|
|
3791
|
+
// packages/contracts/src/editor.ts
|
|
3792
|
+
import { Schema as Schema23 } from "effect";
|
|
3793
|
+
var EDITORS = [
|
|
3794
|
+
{ id: "cursor", label: "Cursor", command: "cursor" },
|
|
3795
|
+
{ id: "vscode", label: "VS Code", command: "code" },
|
|
3796
|
+
{ id: "zed", label: "Zed", command: "zed" },
|
|
3797
|
+
{ id: "file-manager", label: "File Manager", command: null }
|
|
3798
|
+
];
|
|
3799
|
+
var EditorId = Schema23.Literals(EDITORS.map((e) => e.id));
|
|
3800
|
+
var OpenInEditorInput = Schema23.Struct({
|
|
3801
|
+
cwd: TrimmedNonEmptyString,
|
|
3802
|
+
editor: EditorId
|
|
3803
|
+
});
|
|
3804
|
+
|
|
3805
|
+
// packages/contracts/src/ws.ts
|
|
3806
|
+
var WS_METHODS = {
|
|
3807
|
+
projectsList: "projects.list",
|
|
3808
|
+
projectsAdd: "projects.add",
|
|
3809
|
+
projectsRemove: "projects.remove",
|
|
3810
|
+
projectsListDirectory: "projects.listDirectory",
|
|
3811
|
+
projectsSearchEntries: "projects.searchEntries",
|
|
3812
|
+
projectsReadFile: "projects.readFile",
|
|
3813
|
+
projectsWriteFile: "projects.writeFile",
|
|
3814
|
+
shellOpenInEditor: "shell.openInEditor",
|
|
3815
|
+
gitPull: "git.pull",
|
|
3816
|
+
gitStatus: "git.status",
|
|
3817
|
+
gitReadWorkingTreePatch: "git.readWorkingTreePatch",
|
|
3818
|
+
gitRunStackedAction: "git.runStackedAction",
|
|
3819
|
+
gitListBranches: "git.listBranches",
|
|
3820
|
+
gitCreateWorktree: "git.createWorktree",
|
|
3821
|
+
gitRemoveWorktree: "git.removeWorktree",
|
|
3822
|
+
gitCreateBranch: "git.createBranch",
|
|
3823
|
+
gitCheckout: "git.checkout",
|
|
3824
|
+
gitInit: "git.init",
|
|
3825
|
+
terminalOpen: "terminal.open",
|
|
3826
|
+
terminalWrite: "terminal.write",
|
|
3827
|
+
terminalResize: "terminal.resize",
|
|
3828
|
+
terminalClear: "terminal.clear",
|
|
3829
|
+
terminalRestart: "terminal.restart",
|
|
3830
|
+
terminalClose: "terminal.close",
|
|
3831
|
+
serverGetConfig: "server.getConfig",
|
|
3832
|
+
serverUpsertKeybinding: "server.upsertKeybinding",
|
|
3833
|
+
remoteListEndpoints: "remote.listEndpoints",
|
|
3834
|
+
remoteRegisterEndpoint: "remote.registerEndpoint",
|
|
3835
|
+
remoteRemoveEndpoint: "remote.removeEndpoint",
|
|
3836
|
+
remoteUpdateEndpoint: "remote.updateEndpoint",
|
|
3837
|
+
remoteTestEndpoint: "remote.testEndpoint",
|
|
3838
|
+
remoteConnect: "remote.connect",
|
|
3839
|
+
remoteDisconnect: "remote.disconnect",
|
|
3840
|
+
remotePause: "remote.pause",
|
|
3841
|
+
remoteResume: "remote.resume",
|
|
3842
|
+
remoteStop: "remote.stop",
|
|
3843
|
+
remoteContinue: "remote.continue",
|
|
3844
|
+
remoteCreateRunForTask: "remote.createRunForTask",
|
|
3845
|
+
remoteRefreshTasks: "remote.refreshTasks",
|
|
3846
|
+
remoteAddIterations: "remote.addIterations",
|
|
3847
|
+
remoteRemoveIterations: "remote.removeIterations",
|
|
3848
|
+
remoteOrchestrateStart: "remote.orchestrate.start",
|
|
3849
|
+
remoteOrchestratePause: "remote.orchestrate.pause",
|
|
3850
|
+
remoteOrchestrateResume: "remote.orchestrate.resume",
|
|
3851
|
+
remoteOrchestrateStop: "remote.orchestrate.stop",
|
|
3852
|
+
remoteOrchestrateState: "remote.orchestrate.state",
|
|
3853
|
+
remotePromptPreview: "remote.promptPreview",
|
|
3854
|
+
remoteIterationOutput: "remote.iterationOutput",
|
|
3855
|
+
remoteTerminalOpen: "remote.terminal.open",
|
|
3856
|
+
remoteTerminalWrite: "remote.terminal.write",
|
|
3857
|
+
remoteTerminalResize: "remote.terminal.resize",
|
|
3858
|
+
remoteTerminalClose: "remote.terminal.close"
|
|
3859
|
+
};
|
|
3860
|
+
var WS_CHANNELS = {
|
|
3861
|
+
terminalEvent: "terminal.event",
|
|
3862
|
+
serverWelcome: "server.welcome",
|
|
3863
|
+
serverConfigUpdated: "server.configUpdated",
|
|
3864
|
+
remoteConnectionChanged: "remote.connectionChanged",
|
|
3865
|
+
remoteEvent: "remote.event"
|
|
3866
|
+
};
|
|
3867
|
+
var tagRequestBody = (tag, schema) => schema.mapFields(Struct2.assign({ _tag: Schema24.tag(tag) }), { unsafePreserveChecks: true });
|
|
3868
|
+
var WebSocketRequestBody = Schema24.Union([
|
|
3869
|
+
tagRequestBody(RIG_WS_METHODS.getSnapshot, RigGetSnapshotInput),
|
|
3870
|
+
tagRequestBody(RIG_WS_METHODS.replayEvents, RigReplayEventsInput),
|
|
3871
|
+
tagRequestBody(RIG_WS_METHODS.listWorkspaces, RigListWorkspacesInput),
|
|
3872
|
+
tagRequestBody(RIG_WS_METHODS.getWorkspace, RigGetWorkspaceInput),
|
|
3873
|
+
tagRequestBody(RIG_WS_METHODS.createAdhocRun, RigCreateAdhocRunInput),
|
|
3874
|
+
tagRequestBody(RIG_WS_METHODS.createTaskRun, RigCreateTaskRunInput),
|
|
3875
|
+
tagRequestBody(RIG_WS_METHODS.deleteRun, RigDeleteRunInput),
|
|
3876
|
+
tagRequestBody(RIG_WS_METHODS.enqueueTask, RigEnqueueTaskInput),
|
|
3877
|
+
tagRequestBody(RIG_WS_METHODS.resumeRun, RigResumeRunInput),
|
|
3878
|
+
tagRequestBody(RIG_WS_METHODS.submitRunMessage, RigSubmitRunMessageInput),
|
|
3879
|
+
tagRequestBody(RIG_WS_METHODS.interruptRun, RigInterruptRunInput),
|
|
3880
|
+
tagRequestBody(RIG_WS_METHODS.stopRun, RigStopRunInput),
|
|
3881
|
+
tagRequestBody(RIG_WS_METHODS.resolveApproval, RigResolveApprovalInput),
|
|
3882
|
+
tagRequestBody(RIG_WS_METHODS.resolveUserInput, RigResolveUserInputInput),
|
|
3883
|
+
tagRequestBody(RIG_WS_METHODS.getTaskArtifacts, RigGetTaskArtifactsInput),
|
|
3884
|
+
tagRequestBody(WS_METHODS.projectsListDirectory, ProjectListDirectoryInput),
|
|
3885
|
+
tagRequestBody(WS_METHODS.projectsSearchEntries, ProjectSearchEntriesInput),
|
|
3886
|
+
tagRequestBody(WS_METHODS.projectsReadFile, ProjectReadFileInput),
|
|
3887
|
+
tagRequestBody(WS_METHODS.projectsWriteFile, ProjectWriteFileInput),
|
|
3888
|
+
tagRequestBody(WS_METHODS.shellOpenInEditor, OpenInEditorInput),
|
|
3889
|
+
tagRequestBody(WS_METHODS.gitPull, GitPullInput),
|
|
3890
|
+
tagRequestBody(WS_METHODS.gitStatus, GitStatusInput),
|
|
3891
|
+
tagRequestBody(WS_METHODS.gitReadWorkingTreePatch, GitReadWorkingTreePatchInput),
|
|
3892
|
+
tagRequestBody(WS_METHODS.gitRunStackedAction, GitRunStackedActionInput),
|
|
3893
|
+
tagRequestBody(WS_METHODS.gitListBranches, GitListBranchesInput),
|
|
3894
|
+
tagRequestBody(WS_METHODS.gitCreateWorktree, GitCreateWorktreeInput),
|
|
3895
|
+
tagRequestBody(WS_METHODS.gitRemoveWorktree, GitRemoveWorktreeInput),
|
|
3896
|
+
tagRequestBody(WS_METHODS.gitCreateBranch, GitCreateBranchInput),
|
|
3897
|
+
tagRequestBody(WS_METHODS.gitCheckout, GitCheckoutInput),
|
|
3898
|
+
tagRequestBody(WS_METHODS.gitInit, GitInitInput),
|
|
3899
|
+
tagRequestBody(WS_METHODS.terminalOpen, TerminalOpenInput),
|
|
3900
|
+
tagRequestBody(WS_METHODS.terminalWrite, TerminalWriteInput),
|
|
3901
|
+
tagRequestBody(WS_METHODS.terminalResize, TerminalResizeInput),
|
|
3902
|
+
tagRequestBody(WS_METHODS.terminalClear, TerminalClearInput),
|
|
3903
|
+
tagRequestBody(WS_METHODS.terminalRestart, TerminalRestartInput),
|
|
3904
|
+
tagRequestBody(WS_METHODS.terminalClose, TerminalCloseInput),
|
|
3905
|
+
tagRequestBody(WS_METHODS.serverGetConfig, Schema24.Struct({})),
|
|
3906
|
+
tagRequestBody(WS_METHODS.serverUpsertKeybinding, KeybindingRule),
|
|
3907
|
+
tagRequestBody(WS_METHODS.remoteListEndpoints, Schema24.Struct({})),
|
|
3908
|
+
tagRequestBody(WS_METHODS.remoteRegisterEndpoint, Schema24.Struct({
|
|
3909
|
+
alias: TrimmedNonEmptyString,
|
|
3910
|
+
host: TrimmedNonEmptyString,
|
|
3911
|
+
port: Schema24.Int,
|
|
3912
|
+
token: Schema24.optional(TrimmedNonEmptyString),
|
|
3913
|
+
autoConnect: Schema24.optional(Schema24.Boolean)
|
|
3914
|
+
})),
|
|
3915
|
+
tagRequestBody(WS_METHODS.remoteRemoveEndpoint, Schema24.Struct({
|
|
3916
|
+
endpointId: TrimmedNonEmptyString
|
|
3917
|
+
})),
|
|
3918
|
+
tagRequestBody(WS_METHODS.remoteUpdateEndpoint, Schema24.Struct({
|
|
3919
|
+
endpointId: TrimmedNonEmptyString,
|
|
3920
|
+
alias: Schema24.optional(TrimmedNonEmptyString),
|
|
3921
|
+
host: Schema24.optional(TrimmedNonEmptyString),
|
|
3922
|
+
port: Schema24.optional(Schema24.Int),
|
|
3923
|
+
token: Schema24.optional(TrimmedNonEmptyString),
|
|
3924
|
+
autoConnect: Schema24.optional(Schema24.Boolean)
|
|
3925
|
+
})),
|
|
3926
|
+
tagRequestBody(WS_METHODS.remoteTestEndpoint, Schema24.Struct({
|
|
3927
|
+
host: TrimmedNonEmptyString,
|
|
3928
|
+
port: Schema24.Int,
|
|
3929
|
+
token: Schema24.optional(TrimmedNonEmptyString)
|
|
3930
|
+
})),
|
|
3931
|
+
tagRequestBody(WS_METHODS.remoteConnect, Schema24.Struct({
|
|
3932
|
+
endpointId: TrimmedNonEmptyString
|
|
3933
|
+
})),
|
|
3934
|
+
tagRequestBody(WS_METHODS.remoteDisconnect, Schema24.Struct({
|
|
3935
|
+
endpointId: TrimmedNonEmptyString
|
|
3936
|
+
})),
|
|
3937
|
+
tagRequestBody(WS_METHODS.remotePause, Schema24.Struct({ endpointId: TrimmedNonEmptyString })),
|
|
3938
|
+
tagRequestBody(WS_METHODS.remoteResume, Schema24.Struct({ endpointId: TrimmedNonEmptyString })),
|
|
3939
|
+
tagRequestBody(WS_METHODS.remoteStop, Schema24.Struct({ endpointId: TrimmedNonEmptyString })),
|
|
3940
|
+
tagRequestBody(WS_METHODS.remoteContinue, Schema24.Struct({ endpointId: TrimmedNonEmptyString })),
|
|
3941
|
+
tagRequestBody(WS_METHODS.remoteCreateRunForTask, Schema24.Struct({
|
|
3942
|
+
endpointId: TrimmedNonEmptyString,
|
|
3943
|
+
taskId: TrimmedNonEmptyString,
|
|
3944
|
+
runId: TrimmedNonEmptyString,
|
|
3945
|
+
workspaceId: TrimmedNonEmptyString,
|
|
3946
|
+
runtimeMode: Schema24.optional(Schema24.String),
|
|
3947
|
+
interactionMode: Schema24.optional(Schema24.String)
|
|
3948
|
+
})),
|
|
3949
|
+
tagRequestBody(WS_METHODS.remoteRefreshTasks, Schema24.Struct({ endpointId: TrimmedNonEmptyString })),
|
|
3950
|
+
tagRequestBody(WS_METHODS.remoteAddIterations, Schema24.Struct({
|
|
3951
|
+
endpointId: TrimmedNonEmptyString,
|
|
3952
|
+
count: Schema24.Int
|
|
3953
|
+
})),
|
|
3954
|
+
tagRequestBody(WS_METHODS.remoteRemoveIterations, Schema24.Struct({
|
|
3955
|
+
endpointId: TrimmedNonEmptyString,
|
|
3956
|
+
count: Schema24.Int
|
|
3957
|
+
})),
|
|
3958
|
+
tagRequestBody(WS_METHODS.remoteOrchestrateStart, Schema24.Struct({
|
|
3959
|
+
endpointId: TrimmedNonEmptyString,
|
|
3960
|
+
maxWorkers: Schema24.optional(Schema24.Int),
|
|
3961
|
+
maxIterations: Schema24.optional(Schema24.Int),
|
|
3962
|
+
directMerge: Schema24.optional(Schema24.Boolean)
|
|
3963
|
+
})),
|
|
3964
|
+
tagRequestBody(WS_METHODS.remoteOrchestratePause, Schema24.Struct({
|
|
3965
|
+
endpointId: TrimmedNonEmptyString,
|
|
3966
|
+
orchestrationId: TrimmedNonEmptyString
|
|
3967
|
+
})),
|
|
3968
|
+
tagRequestBody(WS_METHODS.remoteOrchestrateResume, Schema24.Struct({
|
|
3969
|
+
endpointId: TrimmedNonEmptyString,
|
|
3970
|
+
orchestrationId: TrimmedNonEmptyString
|
|
3971
|
+
})),
|
|
3972
|
+
tagRequestBody(WS_METHODS.remoteOrchestrateStop, Schema24.Struct({
|
|
3973
|
+
endpointId: TrimmedNonEmptyString,
|
|
3974
|
+
orchestrationId: TrimmedNonEmptyString
|
|
3975
|
+
})),
|
|
3976
|
+
tagRequestBody(WS_METHODS.remoteOrchestrateState, Schema24.Struct({
|
|
3977
|
+
endpointId: TrimmedNonEmptyString,
|
|
3978
|
+
orchestrationId: TrimmedNonEmptyString
|
|
3979
|
+
})),
|
|
3980
|
+
tagRequestBody(WS_METHODS.remotePromptPreview, Schema24.Struct({
|
|
3981
|
+
endpointId: TrimmedNonEmptyString,
|
|
3982
|
+
taskId: TrimmedNonEmptyString
|
|
3983
|
+
})),
|
|
3984
|
+
tagRequestBody(WS_METHODS.remoteIterationOutput, Schema24.Struct({
|
|
3985
|
+
endpointId: TrimmedNonEmptyString,
|
|
3986
|
+
taskId: TrimmedNonEmptyString
|
|
3987
|
+
})),
|
|
3988
|
+
tagRequestBody(WS_METHODS.remoteTerminalOpen, Schema24.Struct({
|
|
3989
|
+
endpointId: TrimmedNonEmptyString,
|
|
3990
|
+
threadId: Schema24.String,
|
|
3991
|
+
terminalId: Schema24.String,
|
|
3992
|
+
cwd: Schema24.optional(Schema24.String),
|
|
3993
|
+
env: Schema24.optional(Schema24.Unknown)
|
|
3994
|
+
})),
|
|
3995
|
+
tagRequestBody(WS_METHODS.remoteTerminalWrite, Schema24.Struct({
|
|
3996
|
+
endpointId: TrimmedNonEmptyString,
|
|
3997
|
+
threadId: Schema24.String,
|
|
3998
|
+
terminalId: Schema24.String,
|
|
3999
|
+
data: Schema24.String
|
|
4000
|
+
})),
|
|
4001
|
+
tagRequestBody(WS_METHODS.remoteTerminalResize, Schema24.Struct({
|
|
4002
|
+
endpointId: TrimmedNonEmptyString,
|
|
4003
|
+
threadId: Schema24.String,
|
|
4004
|
+
terminalId: Schema24.String,
|
|
4005
|
+
cols: Schema24.Number,
|
|
4006
|
+
rows: Schema24.Number
|
|
4007
|
+
})),
|
|
4008
|
+
tagRequestBody(WS_METHODS.remoteTerminalClose, Schema24.Struct({
|
|
4009
|
+
endpointId: TrimmedNonEmptyString,
|
|
4010
|
+
threadId: Schema24.String,
|
|
4011
|
+
terminalId: Schema24.String
|
|
4012
|
+
}))
|
|
4013
|
+
]);
|
|
4014
|
+
var WebSocketRequest = Schema24.Struct({
|
|
4015
|
+
id: TrimmedNonEmptyString,
|
|
4016
|
+
body: WebSocketRequestBody
|
|
4017
|
+
});
|
|
4018
|
+
var WebSocketResponse = Schema24.Struct({
|
|
4019
|
+
id: TrimmedNonEmptyString,
|
|
4020
|
+
result: Schema24.optional(Schema24.Unknown),
|
|
4021
|
+
error: Schema24.optional(Schema24.Struct({
|
|
4022
|
+
message: Schema24.String
|
|
4023
|
+
}))
|
|
4024
|
+
});
|
|
4025
|
+
var WsPush = Schema24.Struct({
|
|
4026
|
+
type: Schema24.Literal("push"),
|
|
4027
|
+
channel: TrimmedNonEmptyString,
|
|
4028
|
+
data: Schema24.Unknown
|
|
4029
|
+
});
|
|
4030
|
+
var EngineGetSnapshotResult = EngineReadModel;
|
|
4031
|
+
var EngineReplayEventsWsResult = EngineReplayEventsResult;
|
|
4032
|
+
var WsResponse = Schema24.Union([WebSocketResponse, WsPush]);
|
|
4033
|
+
var WsWelcomePayload = Schema24.Struct({
|
|
4034
|
+
cwd: TrimmedNonEmptyString,
|
|
4035
|
+
projectName: TrimmedNonEmptyString,
|
|
4036
|
+
bootstrapProjectId: Schema24.optional(ProjectId),
|
|
4037
|
+
bootstrapThreadId: Schema24.optional(ThreadId)
|
|
4038
|
+
});
|
|
4039
|
+
// packages/contracts/src/server.ts
|
|
4040
|
+
import { Schema as Schema25 } from "effect";
|
|
4041
|
+
var KeybindingsMalformedConfigIssue = Schema25.Struct({
|
|
4042
|
+
kind: Schema25.Literal("keybindings.malformed-config"),
|
|
4043
|
+
message: TrimmedNonEmptyString
|
|
4044
|
+
});
|
|
4045
|
+
var KeybindingsInvalidEntryIssue = Schema25.Struct({
|
|
4046
|
+
kind: Schema25.Literal("keybindings.invalid-entry"),
|
|
4047
|
+
message: TrimmedNonEmptyString,
|
|
4048
|
+
index: Schema25.Number
|
|
4049
|
+
});
|
|
4050
|
+
var ServerConfigIssue = Schema25.Union([
|
|
4051
|
+
KeybindingsMalformedConfigIssue,
|
|
4052
|
+
KeybindingsInvalidEntryIssue
|
|
4053
|
+
]);
|
|
4054
|
+
var ServerConfigIssues = Schema25.Array(ServerConfigIssue);
|
|
4055
|
+
var ServerProviderStatusState = Schema25.Literals(["ready", "warning", "error"]);
|
|
4056
|
+
var ServerProviderAuthStatus = Schema25.Literals([
|
|
4057
|
+
"authenticated",
|
|
4058
|
+
"unauthenticated",
|
|
4059
|
+
"unknown"
|
|
4060
|
+
]);
|
|
4061
|
+
var ServerProviderStatus = Schema25.Struct({
|
|
4062
|
+
provider: ProviderKind,
|
|
4063
|
+
status: ServerProviderStatusState,
|
|
4064
|
+
available: Schema25.Boolean,
|
|
4065
|
+
authStatus: ServerProviderAuthStatus,
|
|
4066
|
+
checkedAt: IsoDateTime,
|
|
4067
|
+
message: Schema25.optional(TrimmedNonEmptyString)
|
|
4068
|
+
});
|
|
4069
|
+
var ServerProviderStatuses = Schema25.Array(ServerProviderStatus);
|
|
4070
|
+
var ServerConfig = Schema25.Struct({
|
|
4071
|
+
cwd: TrimmedNonEmptyString,
|
|
4072
|
+
rigRoot: Schema25.NullOr(TrimmedNonEmptyString),
|
|
4073
|
+
keybindingsConfigPath: TrimmedNonEmptyString,
|
|
4074
|
+
keybindings: ResolvedKeybindingsConfig,
|
|
4075
|
+
issues: ServerConfigIssues,
|
|
4076
|
+
providers: ServerProviderStatuses,
|
|
4077
|
+
availableEditors: Schema25.Array(EditorId)
|
|
4078
|
+
});
|
|
4079
|
+
var ServerUpsertKeybindingInput = KeybindingRule;
|
|
4080
|
+
var ServerUpsertKeybindingResult = Schema25.Struct({
|
|
4081
|
+
keybindings: ResolvedKeybindingsConfig,
|
|
4082
|
+
issues: ServerConfigIssues
|
|
4083
|
+
});
|
|
4084
|
+
var ServerConfigUpdatedPayload = Schema25.Struct({
|
|
4085
|
+
issues: ServerConfigIssues,
|
|
4086
|
+
providers: ServerProviderStatuses
|
|
4087
|
+
});
|
|
4088
|
+
// packages/contracts/src/serviceFabric.ts
|
|
4089
|
+
import { Schema as Schema26 } from "effect";
|
|
4090
|
+
var ServiceFabricWorkspaceInput = Schema26.Struct({
|
|
4091
|
+
workspaceId: WorkspaceId
|
|
4092
|
+
});
|
|
4093
|
+
var ServiceFabricUpInput = Schema26.Struct({
|
|
4094
|
+
workspaceId: WorkspaceId,
|
|
4095
|
+
services: Schema26.optional(Schema26.Array(TrimmedNonEmptyString))
|
|
4096
|
+
});
|
|
4097
|
+
var ServiceFabricUpResult = Schema26.Struct({
|
|
4098
|
+
plan: Schema26.Struct({
|
|
4099
|
+
generatedAt: IsoDateTime,
|
|
4100
|
+
serviceCount: Schema26.Number,
|
|
4101
|
+
services: Schema26.Array(Schema26.Struct({
|
|
4102
|
+
name: TrimmedNonEmptyString,
|
|
4103
|
+
relativeRootPath: TrimmedNonEmptyString,
|
|
4104
|
+
absoluteRootPath: TrimmedNonEmptyString,
|
|
4105
|
+
port: Schema26.Number,
|
|
4106
|
+
healthcheck: TrimmedNonEmptyString,
|
|
4107
|
+
routePrefix: Schema26.NullOr(TrimmedNonEmptyString),
|
|
4108
|
+
mode: Schema26.Literals(["stub", "process"]),
|
|
4109
|
+
command: Schema26.NullOr(Schema26.String),
|
|
4110
|
+
environment: Schema26.Unknown
|
|
4111
|
+
})),
|
|
4112
|
+
warnings: Schema26.Array(Schema26.String)
|
|
4113
|
+
}),
|
|
4114
|
+
state: Schema26.Struct({
|
|
4115
|
+
generatedAt: IsoDateTime,
|
|
4116
|
+
rootPath: TrimmedNonEmptyString,
|
|
4117
|
+
services: Schema26.Array(Schema26.Struct({
|
|
4118
|
+
name: TrimmedNonEmptyString,
|
|
4119
|
+
pid: Schema26.Number,
|
|
4120
|
+
mode: Schema26.Literals(["stub", "process"]),
|
|
4121
|
+
port: Schema26.Number,
|
|
4122
|
+
healthcheck: TrimmedNonEmptyString,
|
|
4123
|
+
routePrefix: Schema26.NullOr(TrimmedNonEmptyString),
|
|
4124
|
+
relativeRootPath: TrimmedNonEmptyString,
|
|
4125
|
+
logPath: TrimmedNonEmptyString
|
|
4126
|
+
}))
|
|
4127
|
+
}),
|
|
4128
|
+
summary: WorkspaceServiceFabricSummary
|
|
4129
|
+
});
|
|
4130
|
+
export {
|
|
4131
|
+
WsWelcomePayload,
|
|
4132
|
+
WsResponse,
|
|
4133
|
+
WsPush,
|
|
4134
|
+
WorktreeSummary,
|
|
4135
|
+
WorktreeId,
|
|
4136
|
+
WorkspaceUpdateRemoteHostStatusCommand,
|
|
4137
|
+
WorkspaceTopologySummary,
|
|
4138
|
+
WorkspaceTopologyStatus,
|
|
4139
|
+
WorkspaceTopologyServiceSummary,
|
|
4140
|
+
WorkspaceSyncServiceFabricCommand,
|
|
4141
|
+
WorkspaceSyncRemoteFleetCommand,
|
|
4142
|
+
WorkspaceSummary,
|
|
4143
|
+
WorkspaceSourceKind,
|
|
4144
|
+
WorkspaceServiceFabricSummary,
|
|
4145
|
+
WorkspaceServiceFabricStatus,
|
|
4146
|
+
WorkspaceServiceFabricServiceSummary,
|
|
4147
|
+
WorkspaceRemoteHostSummary,
|
|
4148
|
+
WorkspaceRemoteHostStatus,
|
|
4149
|
+
WorkspaceRemoteFleetSummary,
|
|
4150
|
+
WorkspaceRemoteFleetStatus,
|
|
4151
|
+
WorkspaceRegisterRemoteHostCommand,
|
|
4152
|
+
WorkspaceRegisterCommand,
|
|
4153
|
+
WorkspaceIsolation,
|
|
4154
|
+
WorkspaceImportRigCommand,
|
|
4155
|
+
WorkspaceId,
|
|
4156
|
+
WorkspaceHydrateImportedStateCommand,
|
|
4157
|
+
WorkspaceConfig,
|
|
4158
|
+
WorkspaceCompileTopologyCommand,
|
|
4159
|
+
WebSocketResponse,
|
|
4160
|
+
WebSocketRequest,
|
|
4161
|
+
WS_METHODS,
|
|
4162
|
+
WS_CHANNELS,
|
|
4163
|
+
ValidatorRegistration,
|
|
4164
|
+
ValidatorCategory,
|
|
4165
|
+
ValidationSummary,
|
|
4166
|
+
ValidationStatus,
|
|
4167
|
+
ValidationResultId,
|
|
4168
|
+
UserInputRequestSummary,
|
|
4169
|
+
UserInputQuestion,
|
|
4170
|
+
TurnId,
|
|
4171
|
+
TurnCountRange,
|
|
4172
|
+
TrimmedString,
|
|
4173
|
+
TrimmedNonEmptyString,
|
|
4174
|
+
ThreadTurnStartRequestedPayload,
|
|
4175
|
+
ThreadTurnStartCommand,
|
|
4176
|
+
ThreadTurnInterruptRequestedPayload,
|
|
4177
|
+
ThreadTurnDiffCompletedPayload,
|
|
4178
|
+
ThreadTurnDiff,
|
|
4179
|
+
ThreadSessionStopRequestedPayload,
|
|
4180
|
+
ThreadSessionSetPayload,
|
|
4181
|
+
ThreadRuntimeModeSetPayload,
|
|
4182
|
+
ThreadRevertedPayload,
|
|
4183
|
+
ThreadProposedPlanUpsertedPayload,
|
|
4184
|
+
ThreadMetaUpdatedPayload,
|
|
4185
|
+
ThreadMessageSentPayload,
|
|
4186
|
+
ThreadInteractionModeSetPayload,
|
|
4187
|
+
ThreadId,
|
|
4188
|
+
ThreadDeletedPayload,
|
|
4189
|
+
ThreadCreatedPayload,
|
|
4190
|
+
ThreadCheckpointRevertRequestedPayload,
|
|
4191
|
+
ThreadApprovalResponseRequestedPayload,
|
|
4192
|
+
ThreadActivityAppendedPayload,
|
|
4193
|
+
TerminalWriteInput,
|
|
4194
|
+
TerminalThreadInput,
|
|
4195
|
+
TerminalSessionStatus,
|
|
4196
|
+
TerminalSessionSnapshot,
|
|
4197
|
+
TerminalRestartInput,
|
|
4198
|
+
TerminalResizeInput,
|
|
4199
|
+
TerminalOpenInput,
|
|
4200
|
+
TerminalEvent,
|
|
4201
|
+
TerminalCloseInput,
|
|
4202
|
+
TerminalClearInput,
|
|
4203
|
+
TaskSummary,
|
|
4204
|
+
TaskStatus,
|
|
4205
|
+
TaskSourceRegistration,
|
|
4206
|
+
TaskSourceKind,
|
|
4207
|
+
TaskSourceConfig,
|
|
4208
|
+
TaskId,
|
|
4209
|
+
TaskFieldExtension,
|
|
4210
|
+
TaskEnqueueCommand,
|
|
4211
|
+
SkillRegistration,
|
|
4212
|
+
ServiceFabricWorkspaceInput,
|
|
4213
|
+
ServiceFabricUpResult,
|
|
4214
|
+
ServiceFabricUpInput,
|
|
4215
|
+
ServerUpsertKeybindingResult,
|
|
4216
|
+
ServerUpsertKeybindingInput,
|
|
4217
|
+
ServerProviderStatusState,
|
|
4218
|
+
ServerProviderStatus,
|
|
4219
|
+
ServerProviderAuthStatus,
|
|
4220
|
+
ServerConfigUpdatedPayload,
|
|
4221
|
+
ServerConfigIssue,
|
|
4222
|
+
ServerConfig,
|
|
4223
|
+
ScopeSearchPrefix,
|
|
4224
|
+
ScopeNormalizationRules,
|
|
4225
|
+
SCRIPT_RUN_COMMAND_PATTERN,
|
|
4226
|
+
RuntimeUpdateMetadataCommand,
|
|
4227
|
+
RuntimeTaskId,
|
|
4228
|
+
RuntimeSummary,
|
|
4229
|
+
RuntimeStatus,
|
|
4230
|
+
RuntimeStartActionCommand,
|
|
4231
|
+
RuntimeSessionId,
|
|
4232
|
+
RuntimeRequestUserInputCommand,
|
|
4233
|
+
RuntimeRequestId,
|
|
4234
|
+
RuntimeRequestApprovalCommand,
|
|
4235
|
+
RuntimeRegisterArtifactCommand,
|
|
4236
|
+
RuntimeRecordValidationCommand,
|
|
4237
|
+
RuntimeRecordReviewCommand,
|
|
4238
|
+
RuntimeRecordMessageCommand,
|
|
4239
|
+
RuntimeRecordLogCommand,
|
|
4240
|
+
RuntimePrepareCommand,
|
|
4241
|
+
RuntimeMode,
|
|
4242
|
+
RuntimeItemId,
|
|
4243
|
+
RuntimeHarness,
|
|
4244
|
+
RuntimeEventRaw,
|
|
4245
|
+
RuntimeDetachCommand,
|
|
4246
|
+
RuntimeConfig,
|
|
4247
|
+
RuntimeCompleteActionCommand,
|
|
4248
|
+
RuntimeAttachCommand,
|
|
4249
|
+
RuntimeAdapterKind,
|
|
4250
|
+
RunSummary,
|
|
4251
|
+
RunSubmitUserMessageCommand,
|
|
4252
|
+
RunStopCommand,
|
|
4253
|
+
RunStatus,
|
|
4254
|
+
RunSetStatusCommand,
|
|
4255
|
+
RunSetRuntimeModeCommand,
|
|
4256
|
+
RunSetInteractionModeCommand,
|
|
4257
|
+
RunRespondUserInputCommand,
|
|
4258
|
+
RunRespondApprovalCommand,
|
|
4259
|
+
RunReleaseRemoteLeaseCommand,
|
|
4260
|
+
RunMode,
|
|
4261
|
+
RunMarkFailedCommand,
|
|
4262
|
+
RunMarkCompletedCommand,
|
|
4263
|
+
RunKind,
|
|
4264
|
+
RunInterruptCommand,
|
|
4265
|
+
RunId,
|
|
4266
|
+
RunExecutionTarget,
|
|
4267
|
+
RunCreateForTaskCommand,
|
|
4268
|
+
RunCreateAdhocCommand,
|
|
4269
|
+
RunClaimRemoteLeaseCommand,
|
|
4270
|
+
RigSubmitRunMessageInput,
|
|
4271
|
+
RigStopRunInput,
|
|
4272
|
+
RigSnapshotInvalidatedPayload,
|
|
4273
|
+
RigSnapshot,
|
|
4274
|
+
RigRuntimeMode,
|
|
4275
|
+
RigRunLogAppendedPayload,
|
|
4276
|
+
RigResumeRunInput,
|
|
4277
|
+
RigResolveUserInputInput,
|
|
4278
|
+
RigResolveApprovalInput,
|
|
4279
|
+
RigReplayEventsResult,
|
|
4280
|
+
RigReplayEventsInput,
|
|
4281
|
+
RigRawRunLogEntry,
|
|
4282
|
+
RigPlugin,
|
|
4283
|
+
RigMutationResult,
|
|
4284
|
+
RigListWorkspacesResult,
|
|
4285
|
+
RigListWorkspacesInput,
|
|
4286
|
+
RigInterruptRunInput,
|
|
4287
|
+
RigGetWorkspaceResult,
|
|
4288
|
+
RigGetWorkspaceInput,
|
|
4289
|
+
RigGetTaskArtifactsResult,
|
|
4290
|
+
RigGetTaskArtifactsInput,
|
|
4291
|
+
RigGetSnapshotInput,
|
|
4292
|
+
RigGetRunLogsResult,
|
|
4293
|
+
RigGetRunLogsInput,
|
|
4294
|
+
RigEnqueueTaskInput,
|
|
4295
|
+
RigDeleteRunInput,
|
|
4296
|
+
RigCreateTaskRunInput,
|
|
4297
|
+
RigCreateAdhocRunInput,
|
|
4298
|
+
RigConfig,
|
|
4299
|
+
ReviewSummary,
|
|
4300
|
+
ReviewStatus,
|
|
4301
|
+
ReviewResultId,
|
|
4302
|
+
ReviewMode,
|
|
4303
|
+
ReviewConfig,
|
|
4304
|
+
ResolvedKeybindingsConfig,
|
|
4305
|
+
ResolvedKeybindingRule,
|
|
4306
|
+
RepoSourceRegistration,
|
|
4307
|
+
RemoteUpdateEndpointCommand,
|
|
4308
|
+
RemoteStopCommand,
|
|
4309
|
+
RemoteRunnerRegisterInput,
|
|
4310
|
+
RemoteRunnerLifecycleResult,
|
|
4311
|
+
RemoteRunnerHeartbeatInput,
|
|
4312
|
+
RemoteRunStartResult,
|
|
4313
|
+
RemoteRunStartInput,
|
|
4314
|
+
RemoteRunReleaseResult,
|
|
4315
|
+
RemoteRunReleaseInput,
|
|
4316
|
+
RemoteRunMutationResult,
|
|
4317
|
+
RemoteRunMessageInput,
|
|
4318
|
+
RemoteRunLogInput,
|
|
4319
|
+
RemoteRunLeaseSummary,
|
|
4320
|
+
RemoteRunFailInput,
|
|
4321
|
+
RemoteRunExecutionBundle,
|
|
4322
|
+
RemoteRunConversationEntry,
|
|
4323
|
+
RemoteRunCompleteInput,
|
|
4324
|
+
RemoteRunClaimResult,
|
|
4325
|
+
RemoteRunClaimInput,
|
|
4326
|
+
RemoteRunArtifactsResult,
|
|
4327
|
+
RemoteRunArtifactSummary,
|
|
4328
|
+
RemoteRunArtifactResult,
|
|
4329
|
+
RemoteRunArtifactInput,
|
|
4330
|
+
RemoteResumeCommand,
|
|
4331
|
+
RemoteRemoveIterationsCommand,
|
|
4332
|
+
RemoteRemoveEndpointCommand,
|
|
4333
|
+
RemoteRegisterEndpointCommand,
|
|
4334
|
+
RemoteRefreshTasksCommand,
|
|
4335
|
+
RemotePauseCommand,
|
|
4336
|
+
RemoteOrchestratorState,
|
|
4337
|
+
RemoteOrchestrationSummary,
|
|
4338
|
+
RemoteOrchestrateStopCommand,
|
|
4339
|
+
RemoteOrchestrateStartCommand,
|
|
4340
|
+
RemoteOrchestrateResumeCommand,
|
|
4341
|
+
RemoteOrchestratePauseCommand,
|
|
4342
|
+
RemoteIterationOutput,
|
|
4343
|
+
RemoteGetPromptPreviewCommand,
|
|
4344
|
+
RemoteGetIterationOutputCommand,
|
|
4345
|
+
RemoteEndpointId,
|
|
4346
|
+
RemoteEndpoint,
|
|
4347
|
+
RemoteDisconnectCommand,
|
|
4348
|
+
RemoteCreateRunForTaskCommand,
|
|
4349
|
+
RemoteContinueCommand,
|
|
4350
|
+
RemoteConnectionSummary,
|
|
4351
|
+
RemoteConnectionStatusChanged,
|
|
4352
|
+
RemoteConnectionStatus,
|
|
4353
|
+
RemoteConnectCommand,
|
|
4354
|
+
RemoteAddIterationsCommand,
|
|
4355
|
+
RIG_WS_METHODS,
|
|
4356
|
+
RIG_WS_CHANNELS,
|
|
4357
|
+
REASONING_EFFORT_OPTIONS_BY_PROVIDER,
|
|
4358
|
+
QueueEntry,
|
|
4359
|
+
PullRequestConfig,
|
|
4360
|
+
ProviderUserInputAnswers,
|
|
4361
|
+
ProviderTurnStartResult,
|
|
4362
|
+
ProviderStopSessionInput,
|
|
4363
|
+
ProviderSessionStartInput,
|
|
4364
|
+
ProviderSessionRuntimeStatus,
|
|
4365
|
+
ProviderSession,
|
|
4366
|
+
ProviderServiceTier,
|
|
4367
|
+
ProviderSendTurnInput,
|
|
4368
|
+
ProviderSandboxMode,
|
|
4369
|
+
ProviderRuntimeTurnStatus,
|
|
4370
|
+
ProviderRuntimeEventV2,
|
|
4371
|
+
ProviderRuntimeEvent,
|
|
4372
|
+
ProviderRespondToUserInputInput,
|
|
4373
|
+
ProviderRespondToRequestInput,
|
|
4374
|
+
ProviderRequestKind,
|
|
4375
|
+
ProviderModelOptions,
|
|
4376
|
+
ProviderKind,
|
|
4377
|
+
ProviderItemId,
|
|
4378
|
+
ProviderInterruptTurnInput,
|
|
4379
|
+
ProviderInteractionMode,
|
|
4380
|
+
ProviderEvent,
|
|
4381
|
+
ProviderApprovalPolicy,
|
|
4382
|
+
ProviderApprovalDecision,
|
|
4383
|
+
ProjectionPendingApprovalStatus,
|
|
4384
|
+
ProjectionPendingApprovalDecision,
|
|
4385
|
+
ProjectWriteFileResult,
|
|
4386
|
+
ProjectWriteFileInput,
|
|
4387
|
+
ProjectSearchEntriesResult,
|
|
4388
|
+
ProjectSearchEntriesInput,
|
|
4389
|
+
ProjectScriptIcon,
|
|
4390
|
+
ProjectScript,
|
|
4391
|
+
ProjectReadFileResult,
|
|
4392
|
+
ProjectReadFileInput,
|
|
4393
|
+
ProjectMetaUpdatedPayload,
|
|
4394
|
+
ProjectListDirectoryResult,
|
|
4395
|
+
ProjectListDirectoryInput,
|
|
4396
|
+
ProjectIdentity,
|
|
4397
|
+
ProjectId,
|
|
4398
|
+
ProjectEntry,
|
|
4399
|
+
ProjectDirectoryEntry,
|
|
4400
|
+
ProjectDeletedPayload,
|
|
4401
|
+
ProjectCreatedPayload,
|
|
4402
|
+
ProjectCreateCommand,
|
|
4403
|
+
PositiveInt,
|
|
4404
|
+
PolicyMode,
|
|
4405
|
+
PolicyDecisionSummary,
|
|
4406
|
+
PolicyDecision,
|
|
4407
|
+
PluginContributes,
|
|
4408
|
+
PlanningConfig,
|
|
4409
|
+
PROVIDER_SEND_TURN_MAX_INPUT_CHARS,
|
|
4410
|
+
PROVIDER_SEND_TURN_MAX_IMAGE_BYTES,
|
|
4411
|
+
PROVIDER_SEND_TURN_MAX_ATTACHMENTS,
|
|
4412
|
+
PROJECT_READ_FILE_MAX_BYTES_VALUE,
|
|
4413
|
+
OrchestrationThreadActivityTone,
|
|
4414
|
+
OrchestrationThreadActivity,
|
|
4415
|
+
OrchestrationThread,
|
|
4416
|
+
OrchestrationSessionStatus,
|
|
4417
|
+
OrchestrationSession,
|
|
4418
|
+
OrchestrationRpcSchemas,
|
|
4419
|
+
OrchestrationReplayEventsInput,
|
|
4420
|
+
OrchestrationReadModel,
|
|
4421
|
+
OrchestrationProposedPlanId,
|
|
4422
|
+
OrchestrationProposedPlan,
|
|
4423
|
+
OrchestrationProject,
|
|
4424
|
+
OrchestrationPersistedEvent,
|
|
4425
|
+
OrchestrationMessageRole,
|
|
4426
|
+
OrchestrationMessage,
|
|
4427
|
+
OrchestrationLatestTurn,
|
|
4428
|
+
OrchestrationGetTurnDiffResult,
|
|
4429
|
+
OrchestrationGetTurnDiffInput,
|
|
4430
|
+
OrchestrationGetSnapshotInput,
|
|
4431
|
+
OrchestrationGetFullThreadDiffResult,
|
|
4432
|
+
OrchestrationGetFullThreadDiffInput,
|
|
4433
|
+
OrchestrationEventType,
|
|
4434
|
+
OrchestrationEventMetadata,
|
|
4435
|
+
OrchestrationEvent,
|
|
4436
|
+
OrchestrationCommandReceiptStatus,
|
|
4437
|
+
OrchestrationCommand,
|
|
4438
|
+
OrchestrationCheckpointSummary,
|
|
4439
|
+
OrchestrationCheckpointStatus,
|
|
4440
|
+
OrchestrationCheckpointFile,
|
|
4441
|
+
OrchestrationAggregateKind,
|
|
4442
|
+
OrchestrationActorKind,
|
|
4443
|
+
OpenInEditorInput,
|
|
4444
|
+
ORCHESTRATION_WS_METHODS,
|
|
4445
|
+
ORCHESTRATION_WS_CHANNELS,
|
|
4446
|
+
NonNegativeInt,
|
|
4447
|
+
MessageId,
|
|
4448
|
+
MergeConfig,
|
|
4449
|
+
MODEL_SLUG_ALIASES_BY_PROVIDER,
|
|
4450
|
+
MODEL_OPTIONS_BY_PROVIDER,
|
|
4451
|
+
MAX_WHEN_EXPRESSION_DEPTH,
|
|
4452
|
+
MAX_SCRIPT_ID_LENGTH,
|
|
4453
|
+
MAX_KEYBINDING_VALUE_LENGTH,
|
|
4454
|
+
MAX_KEYBINDINGS_COUNT,
|
|
4455
|
+
KeybindingsConfig,
|
|
4456
|
+
KeybindingWhenNode,
|
|
4457
|
+
KeybindingShortcut,
|
|
4458
|
+
KeybindingRule,
|
|
4459
|
+
KeybindingCommand,
|
|
4460
|
+
ItemLifecyclePayload,
|
|
4461
|
+
IssueAnalysisConfig,
|
|
4462
|
+
IsolationMode,
|
|
4463
|
+
IsoDateTime,
|
|
4464
|
+
HookRegistration,
|
|
4465
|
+
HookMatcher,
|
|
4466
|
+
HookEvent,
|
|
4467
|
+
GraphUpdateTaskStatusCommand,
|
|
4468
|
+
GraphSummary,
|
|
4469
|
+
GraphId,
|
|
4470
|
+
GitStatusResult,
|
|
4471
|
+
GitStatusInput,
|
|
4472
|
+
GitStackedAction,
|
|
4473
|
+
GitRunStackedActionResult,
|
|
4474
|
+
GitRunStackedActionInput,
|
|
4475
|
+
GitRemoveWorktreeInput,
|
|
4476
|
+
GitReadWorkingTreePatchResult,
|
|
4477
|
+
GitReadWorkingTreePatchInput,
|
|
4478
|
+
GitPullResult,
|
|
4479
|
+
GitPullInput,
|
|
4480
|
+
GitListBranchesResult,
|
|
4481
|
+
GitListBranchesInput,
|
|
4482
|
+
GitInitInput,
|
|
4483
|
+
GitHubProjectStatusConfig,
|
|
4484
|
+
GitHubConfig,
|
|
4485
|
+
GitCreateWorktreeResult,
|
|
4486
|
+
GitCreateWorktreeInput,
|
|
4487
|
+
GitCreateBranchInput,
|
|
4488
|
+
GitCheckoutInput,
|
|
4489
|
+
GitBranch,
|
|
4490
|
+
EventId,
|
|
4491
|
+
EnrichedRemoteEvent,
|
|
4492
|
+
EngineSandboxMode,
|
|
4493
|
+
EngineRuntimeId,
|
|
4494
|
+
EngineRuntimeDefaults,
|
|
4495
|
+
EngineRunLog,
|
|
4496
|
+
EngineRpcSchemas,
|
|
4497
|
+
EngineReplayEventsWsResult,
|
|
4498
|
+
EngineReplayEventsResult,
|
|
4499
|
+
EngineReplayEventsInput,
|
|
4500
|
+
EngineReadModel,
|
|
4501
|
+
EngineMessageState,
|
|
4502
|
+
EngineMessageRole,
|
|
4503
|
+
EngineMessage,
|
|
4504
|
+
EngineLogTone,
|
|
4505
|
+
EngineGetTaskArtifactsResult,
|
|
4506
|
+
EngineGetTaskArtifactsInput,
|
|
4507
|
+
EngineGetSnapshotResult,
|
|
4508
|
+
EngineGetSnapshotInput,
|
|
4509
|
+
EngineEvent,
|
|
4510
|
+
EngineDispatchResult,
|
|
4511
|
+
EngineCommand,
|
|
4512
|
+
EngineAction,
|
|
4513
|
+
EditorId,
|
|
4514
|
+
EDITORS,
|
|
4515
|
+
DispatchResult,
|
|
4516
|
+
DEFAULT_TERMINAL_ID,
|
|
4517
|
+
DEFAULT_RUNTIME_MODE,
|
|
4518
|
+
DEFAULT_REASONING_EFFORT_BY_PROVIDER,
|
|
4519
|
+
DEFAULT_PROVIDER_KIND,
|
|
4520
|
+
DEFAULT_PROVIDER_INTERACTION_MODE,
|
|
4521
|
+
DEFAULT_MODEL_BY_PROVIDER,
|
|
4522
|
+
CorrelationId,
|
|
4523
|
+
ConversationSummary,
|
|
4524
|
+
ConversationId,
|
|
4525
|
+
CommandId,
|
|
4526
|
+
CodexModelOptions,
|
|
4527
|
+
ClientOrchestrationCommand,
|
|
4528
|
+
CliCommandRegistration,
|
|
4529
|
+
ClaudeModelOptions,
|
|
4530
|
+
CheckpointRef,
|
|
4531
|
+
ChatImageAttachment,
|
|
4532
|
+
ChatAttachment,
|
|
4533
|
+
CanonicalRequestType,
|
|
4534
|
+
CanonicalItemType,
|
|
4535
|
+
CODEX_REASONING_EFFORT_OPTIONS,
|
|
4536
|
+
AutomationConfig,
|
|
4537
|
+
AssistantDeliveryMode,
|
|
4538
|
+
ArtifactSummary,
|
|
4539
|
+
ArtifactId,
|
|
4540
|
+
ApprovalSummary,
|
|
4541
|
+
ApprovalStatus,
|
|
4542
|
+
ApprovalRequestId,
|
|
4543
|
+
AgentRoleRegistration,
|
|
4544
|
+
ActionId
|
|
4545
|
+
};
|