@h-rig/contracts 0.0.6-alpha.13 → 0.0.6-alpha.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6585 -0
- package/dist/index.mjs +6544 -0
- package/dist/src/artifact.d.ts +13 -0
- package/dist/src/artifact.js +3 -0
- package/dist/src/baseSchemas.d.ts +63 -0
- package/dist/src/baseSchemas.js +6 -0
- package/dist/src/cli-output.d.ts +324 -0
- package/dist/src/cli-output.js +190 -0
- package/dist/src/config.d.ts +368 -0
- package/dist/src/config.js +27 -5
- package/dist/src/conversation.d.ts +50 -0
- package/dist/src/conversation.js +3 -0
- package/dist/src/editor.d.ts +25 -0
- package/dist/src/editor.js +3 -0
- package/dist/src/engine.d.ts +2789 -0
- package/dist/src/engine.js +19 -13
- package/dist/src/git.d.ts +144 -0
- package/dist/src/git.js +3 -0
- package/dist/src/graph.d.ts +39 -0
- package/dist/src/graph.js +3 -0
- package/dist/src/help-catalog.d.ts +34 -0
- package/dist/src/help-catalog.js +577 -0
- package/dist/src/index.d.ts +40 -0
- package/dist/src/index.js +3223 -1226
- package/dist/src/ipc.d.ts +248 -0
- package/dist/src/keybindings.d.ts +71 -0
- package/dist/src/keybindings.js +3 -0
- package/dist/src/model.d.ts +77 -0
- package/dist/src/orchestration.d.ts +3695 -0
- package/dist/src/orchestration.js +3 -0
- package/dist/src/pi-session.d.ts +113 -0
- package/dist/src/pi-session.js +1 -0
- package/dist/src/plugin-hooks.d.ts +51 -0
- package/dist/src/plugin-hooks.js +112 -0
- package/dist/src/plugin.d.ts +230 -0
- package/dist/src/policy.d.ts +16 -0
- package/dist/src/policy.js +3 -0
- package/dist/src/project.d.ts +71 -0
- package/dist/src/project.js +3 -0
- package/dist/src/protocol-version.d.ts +21 -0
- package/dist/src/protocol-version.js +6 -0
- package/dist/src/provider.d.ts +105 -0
- package/dist/src/provider.js +3 -0
- package/dist/src/providerRuntime.d.ts +3949 -0
- package/dist/src/providerRuntime.js +3 -0
- package/dist/src/remote.d.ts +326 -0
- package/dist/src/remote.js +16 -10
- package/dist/src/review.d.ts +18 -0
- package/dist/src/review.js +3 -0
- package/dist/src/rig.d.ts +783 -0
- package/dist/src/rig.js +70 -15
- package/dist/src/run-journal.d.ts +763 -0
- package/dist/src/run-journal.js +1509 -0
- package/dist/src/run-record.d.ts +45 -0
- package/dist/src/run-record.js +1 -0
- package/dist/src/run-session-journal.d.ts +89 -0
- package/dist/src/run-session-journal.js +1671 -0
- package/dist/src/run-status.d.ts +12 -0
- package/dist/src/run-status.js +38 -0
- package/dist/src/run-timeline.d.ts +10 -0
- package/dist/src/run-timeline.js +1377 -0
- package/dist/src/runtime.d.ts +103 -0
- package/dist/src/runtime.js +9 -4
- package/dist/src/server.d.ts +106 -0
- package/dist/src/server.js +3 -0
- package/dist/src/serviceFabric.d.ts +62 -0
- package/dist/src/serviceFabric.js +5 -2
- package/dist/src/task-source.d.ts +28 -0
- package/dist/src/terminal.d.ts +130 -0
- package/dist/src/terminal.js +3 -0
- package/dist/src/validation.d.ts +14 -0
- package/dist/src/validation.js +3 -0
- package/dist/src/workflow-journal.d.ts +124 -0
- package/dist/src/workflow-journal.js +389 -0
- package/dist/src/workspace.d.ts +204 -0
- package/dist/src/workspace.js +5 -2
- package/dist/src/ws.d.ts +747 -0
- package/dist/src/ws.js +64 -14
- package/package.json +6 -3
|
@@ -16,6 +16,9 @@ var WorkspaceId = makeEntityId("WorkspaceId");
|
|
|
16
16
|
var GraphId = makeEntityId("GraphId");
|
|
17
17
|
var TaskId = makeEntityId("TaskId");
|
|
18
18
|
var RunId = makeEntityId("RunId");
|
|
19
|
+
var SafePathSegment = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafePathSegment"));
|
|
20
|
+
var SafeRunId = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/)).pipe(Schema.brand("SafeRunId"));
|
|
21
|
+
var SafeGitRefComponent = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafeGitRefComponent"));
|
|
19
22
|
var EngineRuntimeId = makeEntityId("EngineRuntimeId");
|
|
20
23
|
var ConversationId = makeEntityId("ConversationId");
|
|
21
24
|
var ActionId = makeEntityId("ActionId");
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const RemoteEndpoint: Schema.Struct<{
|
|
3
|
+
readonly id: Schema.brand<Schema.Trim, "RemoteEndpointId">;
|
|
4
|
+
readonly alias: Schema.Trim;
|
|
5
|
+
readonly host: Schema.Trim;
|
|
6
|
+
readonly port: Schema.Int;
|
|
7
|
+
readonly token: Schema.String;
|
|
8
|
+
readonly tokenConfigured: Schema.optional<Schema.Boolean>;
|
|
9
|
+
readonly autoConnect: Schema.optional<Schema.Boolean>;
|
|
10
|
+
readonly addedAt: Schema.String;
|
|
11
|
+
readonly lastConnectedAt: Schema.NullOr<Schema.String>;
|
|
12
|
+
}>;
|
|
13
|
+
export type RemoteEndpoint = typeof RemoteEndpoint.Type;
|
|
14
|
+
export declare const RemoteConnectionStatus: Schema.Literals<readonly ["disconnected", "connecting", "authenticating", "connected", "reconnecting", "error"]>;
|
|
15
|
+
export type RemoteConnectionStatus = typeof RemoteConnectionStatus.Type;
|
|
16
|
+
export declare const RemoteConnectionSummary: Schema.Struct<{
|
|
17
|
+
readonly endpointId: Schema.brand<Schema.Trim, "RemoteEndpointId">;
|
|
18
|
+
readonly status: Schema.Literals<readonly ["disconnected", "connecting", "authenticating", "connected", "reconnecting", "error"]>;
|
|
19
|
+
readonly error: Schema.NullOr<Schema.String>;
|
|
20
|
+
readonly connectedAt: Schema.NullOr<Schema.String>;
|
|
21
|
+
readonly tokenExpiresAt: Schema.NullOr<Schema.String>;
|
|
22
|
+
readonly latencyMs: Schema.NullOr<Schema.Number>;
|
|
23
|
+
readonly subscribedEvents: Schema.$Array<Schema.String>;
|
|
24
|
+
}>;
|
|
25
|
+
export type RemoteConnectionSummary = typeof RemoteConnectionSummary.Type;
|
|
26
|
+
export declare const RemoteConnectionStatusChanged: Schema.Struct<{
|
|
27
|
+
readonly endpointId: Schema.String;
|
|
28
|
+
readonly endpointAlias: Schema.String;
|
|
29
|
+
readonly status: Schema.Literals<readonly ["disconnected", "connecting", "authenticating", "connected", "reconnecting", "error"]>;
|
|
30
|
+
readonly previousStatus: Schema.Literals<readonly ["disconnected", "connecting", "authenticating", "connected", "reconnecting", "error"]>;
|
|
31
|
+
readonly error: Schema.NullOr<Schema.String>;
|
|
32
|
+
readonly connectedAt: Schema.NullOr<Schema.String>;
|
|
33
|
+
readonly latencyMs: Schema.NullOr<Schema.Number>;
|
|
34
|
+
readonly timestamp: Schema.String;
|
|
35
|
+
}>;
|
|
36
|
+
export type RemoteConnectionStatusChanged = typeof RemoteConnectionStatusChanged.Type;
|
|
37
|
+
export declare const EnrichedRemoteEvent: Schema.Struct<{
|
|
38
|
+
readonly endpointId: Schema.String;
|
|
39
|
+
readonly endpointAlias: Schema.String;
|
|
40
|
+
readonly receivedAt: Schema.String;
|
|
41
|
+
readonly originalTimestamp: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
42
|
+
readonly event: Schema.Unknown;
|
|
43
|
+
}>;
|
|
44
|
+
export type EnrichedRemoteEvent = typeof EnrichedRemoteEvent.Type;
|
|
45
|
+
export declare const RemoteOrchestratorState: Schema.Struct<{
|
|
46
|
+
readonly activeTaskId: Schema.NullOr<Schema.String>;
|
|
47
|
+
readonly activeIteration: Schema.NullOr<Schema.Number>;
|
|
48
|
+
readonly maxIterations: Schema.Number;
|
|
49
|
+
readonly isPaused: Schema.Boolean;
|
|
50
|
+
readonly isRunning: Schema.Boolean;
|
|
51
|
+
readonly totalCompleted: Schema.Int;
|
|
52
|
+
readonly totalFailed: Schema.Int;
|
|
53
|
+
readonly lastActivity: Schema.NullOr<Schema.String>;
|
|
54
|
+
}>;
|
|
55
|
+
export type RemoteOrchestratorState = typeof RemoteOrchestratorState.Type;
|
|
56
|
+
export declare const RemoteOrchestrationSummary: Schema.Struct<{
|
|
57
|
+
readonly orchestrationId: Schema.Trim;
|
|
58
|
+
readonly endpointId: Schema.brand<Schema.Trim, "RemoteEndpointId">;
|
|
59
|
+
readonly status: Schema.Literals<readonly ["running", "paused", "stopped", "completed"]>;
|
|
60
|
+
readonly totalTasks: Schema.Int;
|
|
61
|
+
readonly totalGroups: Schema.Int;
|
|
62
|
+
readonly maxParallelism: Schema.Int;
|
|
63
|
+
readonly startedAt: Schema.String;
|
|
64
|
+
}>;
|
|
65
|
+
export type RemoteOrchestrationSummary = typeof RemoteOrchestrationSummary.Type;
|
|
66
|
+
export declare const RemoteIterationOutput: Schema.Struct<{
|
|
67
|
+
readonly taskId: Schema.optional<Schema.String>;
|
|
68
|
+
readonly iteration: Schema.optional<Schema.Number>;
|
|
69
|
+
readonly output: Schema.optional<Schema.String>;
|
|
70
|
+
readonly startedAt: Schema.optional<Schema.String>;
|
|
71
|
+
readonly endedAt: Schema.optional<Schema.String>;
|
|
72
|
+
readonly durationMs: Schema.optional<Schema.Number>;
|
|
73
|
+
readonly isRunning: Schema.optional<Schema.Boolean>;
|
|
74
|
+
}>;
|
|
75
|
+
export type RemoteIterationOutput = typeof RemoteIterationOutput.Type;
|
|
76
|
+
export declare const RemoteRunnerRegisterInput: Schema.Struct<{
|
|
77
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
78
|
+
readonly hostId: Schema.Trim;
|
|
79
|
+
readonly name: Schema.Trim;
|
|
80
|
+
readonly baseUrl: Schema.Trim;
|
|
81
|
+
readonly workspacePath: Schema.optional<Schema.Trim>;
|
|
82
|
+
readonly transport: Schema.optional<Schema.Trim>;
|
|
83
|
+
readonly hostname: Schema.optional<Schema.Trim>;
|
|
84
|
+
readonly region: Schema.optional<Schema.Trim>;
|
|
85
|
+
readonly labels: Schema.optional<Schema.$Array<Schema.Trim>>;
|
|
86
|
+
readonly capabilities: Schema.optional<Schema.$Array<Schema.Trim>>;
|
|
87
|
+
readonly runtimeAdapters: Schema.optional<Schema.$Array<Schema.Literal<"pi">>>;
|
|
88
|
+
readonly status: Schema.optional<Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>>;
|
|
89
|
+
readonly currentLeaseCount: Schema.optional<Schema.Number>;
|
|
90
|
+
}>;
|
|
91
|
+
export type RemoteRunnerRegisterInput = typeof RemoteRunnerRegisterInput.Type;
|
|
92
|
+
export declare const RemoteRunnerHeartbeatInput: Schema.Struct<{
|
|
93
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
94
|
+
readonly hostId: Schema.Trim;
|
|
95
|
+
readonly status: Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>;
|
|
96
|
+
readonly currentLeaseCount: Schema.optional<Schema.Number>;
|
|
97
|
+
readonly observedAt: Schema.optional<Schema.String>;
|
|
98
|
+
}>;
|
|
99
|
+
export type RemoteRunnerHeartbeatInput = typeof RemoteRunnerHeartbeatInput.Type;
|
|
100
|
+
export declare const RemoteRunnerLifecycleResult: Schema.Struct<{
|
|
101
|
+
readonly ok: Schema.Boolean;
|
|
102
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
103
|
+
readonly hostId: Schema.Trim;
|
|
104
|
+
readonly acceptedAt: Schema.String;
|
|
105
|
+
readonly heartbeatIntervalMs: Schema.Number;
|
|
106
|
+
}>;
|
|
107
|
+
export type RemoteRunnerLifecycleResult = typeof RemoteRunnerLifecycleResult.Type;
|
|
108
|
+
export declare const RemoteRunClaimInput: Schema.Struct<{
|
|
109
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
110
|
+
readonly hostId: Schema.Trim;
|
|
111
|
+
readonly runtimeAdapters: Schema.optional<Schema.$Array<Schema.Literal<"pi">>>;
|
|
112
|
+
}>;
|
|
113
|
+
export type RemoteRunClaimInput = typeof RemoteRunClaimInput.Type;
|
|
114
|
+
export declare const RemoteRunLeaseSummary: Schema.Struct<{
|
|
115
|
+
readonly leaseId: Schema.Trim;
|
|
116
|
+
readonly runId: Schema.Trim;
|
|
117
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
118
|
+
readonly title: Schema.Trim;
|
|
119
|
+
readonly runtimeAdapter: Schema.Literal<"pi">;
|
|
120
|
+
readonly model: Schema.NullOr<Schema.Trim>;
|
|
121
|
+
readonly runtimeMode: Schema.Literals<readonly ["approval-required", "full-access"]>;
|
|
122
|
+
readonly interactionMode: Schema.Literals<readonly ["default", "plan"]>;
|
|
123
|
+
readonly executionTarget: Schema.Literals<readonly ["local", "remote"]>;
|
|
124
|
+
readonly remoteHostId: Schema.NullOr<Schema.Trim>;
|
|
125
|
+
readonly claimedAt: Schema.String;
|
|
126
|
+
}>;
|
|
127
|
+
export type RemoteRunLeaseSummary = typeof RemoteRunLeaseSummary.Type;
|
|
128
|
+
export declare const RemoteRunConversationEntry: Schema.Struct<{
|
|
129
|
+
readonly role: Schema.Literals<readonly ["user", "assistant", "system"]>;
|
|
130
|
+
readonly text: Schema.String;
|
|
131
|
+
readonly createdAt: Schema.String;
|
|
132
|
+
}>;
|
|
133
|
+
export type RemoteRunConversationEntry = typeof RemoteRunConversationEntry.Type;
|
|
134
|
+
export declare const RemoteRunExecutionBundle: Schema.Struct<{
|
|
135
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
136
|
+
readonly runId: Schema.Trim;
|
|
137
|
+
readonly leaseId: Schema.Trim;
|
|
138
|
+
readonly workspacePath: Schema.NullOr<Schema.Trim>;
|
|
139
|
+
readonly runtimeAdapter: Schema.Literal<"pi">;
|
|
140
|
+
readonly model: Schema.NullOr<Schema.Trim>;
|
|
141
|
+
readonly runtimeMode: Schema.Literals<readonly ["approval-required", "full-access"]>;
|
|
142
|
+
readonly interactionMode: Schema.Literals<readonly ["default", "plan"]>;
|
|
143
|
+
readonly prompt: Schema.String;
|
|
144
|
+
readonly conversation: Schema.$Array<Schema.Struct<{
|
|
145
|
+
readonly role: Schema.Literals<readonly ["user", "assistant", "system"]>;
|
|
146
|
+
readonly text: Schema.String;
|
|
147
|
+
readonly createdAt: Schema.String;
|
|
148
|
+
}>>;
|
|
149
|
+
readonly taskId: Schema.NullOr<Schema.Trim>;
|
|
150
|
+
readonly taskTitle: Schema.NullOr<Schema.Trim>;
|
|
151
|
+
}>;
|
|
152
|
+
export type RemoteRunExecutionBundle = typeof RemoteRunExecutionBundle.Type;
|
|
153
|
+
export declare const RemoteRunClaimResult: Schema.Struct<{
|
|
154
|
+
readonly ok: Schema.Boolean;
|
|
155
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
156
|
+
readonly hostId: Schema.Trim;
|
|
157
|
+
readonly acceptedAt: Schema.String;
|
|
158
|
+
readonly lease: Schema.NullOr<Schema.Struct<{
|
|
159
|
+
readonly leaseId: Schema.Trim;
|
|
160
|
+
readonly runId: Schema.Trim;
|
|
161
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
162
|
+
readonly title: Schema.Trim;
|
|
163
|
+
readonly runtimeAdapter: Schema.Literal<"pi">;
|
|
164
|
+
readonly model: Schema.NullOr<Schema.Trim>;
|
|
165
|
+
readonly runtimeMode: Schema.Literals<readonly ["approval-required", "full-access"]>;
|
|
166
|
+
readonly interactionMode: Schema.Literals<readonly ["default", "plan"]>;
|
|
167
|
+
readonly executionTarget: Schema.Literals<readonly ["local", "remote"]>;
|
|
168
|
+
readonly remoteHostId: Schema.NullOr<Schema.Trim>;
|
|
169
|
+
readonly claimedAt: Schema.String;
|
|
170
|
+
}>>;
|
|
171
|
+
readonly bundle: Schema.NullOr<Schema.Struct<{
|
|
172
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
173
|
+
readonly runId: Schema.Trim;
|
|
174
|
+
readonly leaseId: Schema.Trim;
|
|
175
|
+
readonly workspacePath: Schema.NullOr<Schema.Trim>;
|
|
176
|
+
readonly runtimeAdapter: Schema.Literal<"pi">;
|
|
177
|
+
readonly model: Schema.NullOr<Schema.Trim>;
|
|
178
|
+
readonly runtimeMode: Schema.Literals<readonly ["approval-required", "full-access"]>;
|
|
179
|
+
readonly interactionMode: Schema.Literals<readonly ["default", "plan"]>;
|
|
180
|
+
readonly prompt: Schema.String;
|
|
181
|
+
readonly conversation: Schema.$Array<Schema.Struct<{
|
|
182
|
+
readonly role: Schema.Literals<readonly ["user", "assistant", "system"]>;
|
|
183
|
+
readonly text: Schema.String;
|
|
184
|
+
readonly createdAt: Schema.String;
|
|
185
|
+
}>>;
|
|
186
|
+
readonly taskId: Schema.NullOr<Schema.Trim>;
|
|
187
|
+
readonly taskTitle: Schema.NullOr<Schema.Trim>;
|
|
188
|
+
}>>;
|
|
189
|
+
}>;
|
|
190
|
+
export type RemoteRunClaimResult = typeof RemoteRunClaimResult.Type;
|
|
191
|
+
export declare const RemoteRunReleaseInput: Schema.Struct<{
|
|
192
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
193
|
+
readonly hostId: Schema.Trim;
|
|
194
|
+
readonly runId: Schema.Trim;
|
|
195
|
+
readonly leaseId: Schema.Trim;
|
|
196
|
+
readonly status: Schema.optional<Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>>;
|
|
197
|
+
}>;
|
|
198
|
+
export type RemoteRunReleaseInput = typeof RemoteRunReleaseInput.Type;
|
|
199
|
+
export declare const RemoteRunReleaseResult: Schema.Struct<{
|
|
200
|
+
readonly ok: Schema.Boolean;
|
|
201
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
202
|
+
readonly hostId: Schema.Trim;
|
|
203
|
+
readonly runId: Schema.Trim;
|
|
204
|
+
readonly leaseId: Schema.Trim;
|
|
205
|
+
readonly acceptedAt: Schema.String;
|
|
206
|
+
}>;
|
|
207
|
+
export type RemoteRunReleaseResult = typeof RemoteRunReleaseResult.Type;
|
|
208
|
+
export declare const RemoteRunStartInput: Schema.Struct<{
|
|
209
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
210
|
+
readonly hostId: Schema.Trim;
|
|
211
|
+
readonly runId: Schema.Trim;
|
|
212
|
+
readonly leaseId: Schema.Trim;
|
|
213
|
+
}>;
|
|
214
|
+
export type RemoteRunStartInput = typeof RemoteRunStartInput.Type;
|
|
215
|
+
export declare const RemoteRunStartResult: Schema.Struct<{
|
|
216
|
+
readonly ok: Schema.Boolean;
|
|
217
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
218
|
+
readonly hostId: Schema.Trim;
|
|
219
|
+
readonly runId: Schema.Trim;
|
|
220
|
+
readonly leaseId: Schema.Trim;
|
|
221
|
+
readonly runtimeId: Schema.Trim;
|
|
222
|
+
readonly acceptedAt: Schema.String;
|
|
223
|
+
}>;
|
|
224
|
+
export type RemoteRunStartResult = typeof RemoteRunStartResult.Type;
|
|
225
|
+
export declare const RemoteRunLogInput: Schema.Struct<{
|
|
226
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
227
|
+
readonly hostId: Schema.Trim;
|
|
228
|
+
readonly runId: Schema.Trim;
|
|
229
|
+
readonly leaseId: Schema.Trim;
|
|
230
|
+
readonly title: Schema.Trim;
|
|
231
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
232
|
+
readonly tone: Schema.optional<Schema.Literals<readonly ["thinking", "tool", "info", "error"]>>;
|
|
233
|
+
readonly status: Schema.optional<Schema.Trim>;
|
|
234
|
+
readonly payload: Schema.optional<Schema.Unknown>;
|
|
235
|
+
}>;
|
|
236
|
+
export type RemoteRunLogInput = typeof RemoteRunLogInput.Type;
|
|
237
|
+
export declare const RemoteRunMessageInput: Schema.Struct<{
|
|
238
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
239
|
+
readonly hostId: Schema.Trim;
|
|
240
|
+
readonly runId: Schema.Trim;
|
|
241
|
+
readonly leaseId: Schema.Trim;
|
|
242
|
+
readonly messageId: Schema.optional<Schema.Trim>;
|
|
243
|
+
readonly text: Schema.String;
|
|
244
|
+
readonly state: Schema.optional<Schema.Literals<readonly ["streaming", "completed"]>>;
|
|
245
|
+
}>;
|
|
246
|
+
export type RemoteRunMessageInput = typeof RemoteRunMessageInput.Type;
|
|
247
|
+
export declare const RemoteRunMutationResult: Schema.Struct<{
|
|
248
|
+
readonly ok: Schema.Boolean;
|
|
249
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
250
|
+
readonly hostId: Schema.Trim;
|
|
251
|
+
readonly runId: Schema.Trim;
|
|
252
|
+
readonly leaseId: Schema.Trim;
|
|
253
|
+
readonly acceptedAt: Schema.String;
|
|
254
|
+
}>;
|
|
255
|
+
export type RemoteRunMutationResult = typeof RemoteRunMutationResult.Type;
|
|
256
|
+
export declare const RemoteRunCompleteInput: Schema.Struct<{
|
|
257
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
258
|
+
readonly hostId: Schema.Trim;
|
|
259
|
+
readonly runId: Schema.Trim;
|
|
260
|
+
readonly leaseId: Schema.Trim;
|
|
261
|
+
}>;
|
|
262
|
+
export type RemoteRunCompleteInput = typeof RemoteRunCompleteInput.Type;
|
|
263
|
+
export declare const RemoteRunFailInput: Schema.Struct<{
|
|
264
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
265
|
+
readonly hostId: Schema.Trim;
|
|
266
|
+
readonly runId: Schema.Trim;
|
|
267
|
+
readonly leaseId: Schema.Trim;
|
|
268
|
+
readonly errorText: Schema.optional<Schema.String>;
|
|
269
|
+
}>;
|
|
270
|
+
export type RemoteRunFailInput = typeof RemoteRunFailInput.Type;
|
|
271
|
+
export declare const RemoteRunArtifactInput: Schema.Struct<{
|
|
272
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
273
|
+
readonly hostId: Schema.Trim;
|
|
274
|
+
readonly runId: Schema.Trim;
|
|
275
|
+
readonly leaseId: Schema.Trim;
|
|
276
|
+
readonly kind: Schema.Trim;
|
|
277
|
+
readonly label: Schema.Trim;
|
|
278
|
+
readonly filename: Schema.Trim;
|
|
279
|
+
readonly contentType: Schema.Trim;
|
|
280
|
+
readonly contentBase64: Schema.Trim;
|
|
281
|
+
}>;
|
|
282
|
+
export type RemoteRunArtifactInput = typeof RemoteRunArtifactInput.Type;
|
|
283
|
+
export declare const RemoteRunArtifactResult: Schema.Struct<{
|
|
284
|
+
readonly ok: Schema.Boolean;
|
|
285
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
286
|
+
readonly hostId: Schema.Trim;
|
|
287
|
+
readonly runId: Schema.Trim;
|
|
288
|
+
readonly leaseId: Schema.Trim;
|
|
289
|
+
readonly acceptedAt: Schema.String;
|
|
290
|
+
readonly artifactPath: Schema.Trim;
|
|
291
|
+
}>;
|
|
292
|
+
export type RemoteRunArtifactResult = typeof RemoteRunArtifactResult.Type;
|
|
293
|
+
export declare const RemoteRunArtifactSummary: Schema.Struct<{
|
|
294
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
295
|
+
readonly runId: Schema.Trim;
|
|
296
|
+
readonly hostId: Schema.Trim;
|
|
297
|
+
readonly leaseId: Schema.Trim;
|
|
298
|
+
readonly kind: Schema.Trim;
|
|
299
|
+
readonly label: Schema.Trim;
|
|
300
|
+
readonly filename: Schema.Trim;
|
|
301
|
+
readonly contentType: Schema.Trim;
|
|
302
|
+
readonly uploadedAt: Schema.String;
|
|
303
|
+
readonly byteSize: Schema.Number;
|
|
304
|
+
readonly artifactPath: Schema.Trim;
|
|
305
|
+
readonly downloadPath: Schema.Trim;
|
|
306
|
+
}>;
|
|
307
|
+
export type RemoteRunArtifactSummary = typeof RemoteRunArtifactSummary.Type;
|
|
308
|
+
export declare const RemoteRunArtifactsResult: Schema.Struct<{
|
|
309
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
310
|
+
readonly runId: Schema.Trim;
|
|
311
|
+
readonly artifacts: Schema.$Array<Schema.Struct<{
|
|
312
|
+
readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
313
|
+
readonly runId: Schema.Trim;
|
|
314
|
+
readonly hostId: Schema.Trim;
|
|
315
|
+
readonly leaseId: Schema.Trim;
|
|
316
|
+
readonly kind: Schema.Trim;
|
|
317
|
+
readonly label: Schema.Trim;
|
|
318
|
+
readonly filename: Schema.Trim;
|
|
319
|
+
readonly contentType: Schema.Trim;
|
|
320
|
+
readonly uploadedAt: Schema.String;
|
|
321
|
+
readonly byteSize: Schema.Number;
|
|
322
|
+
readonly artifactPath: Schema.Trim;
|
|
323
|
+
readonly downloadPath: Schema.Trim;
|
|
324
|
+
}>>;
|
|
325
|
+
}>;
|
|
326
|
+
export type RemoteRunArtifactsResult = typeof RemoteRunArtifactsResult.Type;
|
package/dist/src/remote.js
CHANGED
|
@@ -16,6 +16,9 @@ var WorkspaceId = makeEntityId("WorkspaceId");
|
|
|
16
16
|
var GraphId = makeEntityId("GraphId");
|
|
17
17
|
var TaskId = makeEntityId("TaskId");
|
|
18
18
|
var RunId = makeEntityId("RunId");
|
|
19
|
+
var SafePathSegment = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafePathSegment"));
|
|
20
|
+
var SafeRunId = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/)).pipe(Schema.brand("SafeRunId"));
|
|
21
|
+
var SafeGitRefComponent = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafeGitRefComponent"));
|
|
19
22
|
var EngineRuntimeId = makeEntityId("EngineRuntimeId");
|
|
20
23
|
var ConversationId = makeEntityId("ConversationId");
|
|
21
24
|
var ActionId = makeEntityId("ActionId");
|
|
@@ -972,12 +975,14 @@ var RunStatus = Schema5.Literals([
|
|
|
972
975
|
"running",
|
|
973
976
|
"waiting-approval",
|
|
974
977
|
"waiting-user-input",
|
|
978
|
+
"paused",
|
|
975
979
|
"validating",
|
|
976
980
|
"reviewing",
|
|
981
|
+
"closing-out",
|
|
982
|
+
"needs-attention",
|
|
977
983
|
"completed",
|
|
978
984
|
"failed",
|
|
979
|
-
"
|
|
980
|
-
"paused"
|
|
985
|
+
"stopped"
|
|
981
986
|
]);
|
|
982
987
|
var EngineSandboxMode = Schema5.Literals([
|
|
983
988
|
"read-only",
|
|
@@ -1005,7 +1010,7 @@ var RunSummary = Schema5.Struct({
|
|
|
1005
1010
|
runtimeMode: RuntimeMode,
|
|
1006
1011
|
interactionMode: ProviderInteractionMode,
|
|
1007
1012
|
status: RunStatus,
|
|
1008
|
-
runtimeAdapter:
|
|
1013
|
+
runtimeAdapter: Schema5.Literal("pi"),
|
|
1009
1014
|
model: Schema5.NullOr(TrimmedNonEmptyString),
|
|
1010
1015
|
initialPrompt: Schema5.NullOr(Schema5.String),
|
|
1011
1016
|
executionTarget: Schema5.optional(RunExecutionTarget),
|
|
@@ -1028,7 +1033,7 @@ var RuntimeSummary = Schema5.Struct({
|
|
|
1028
1033
|
id: EngineRuntimeId,
|
|
1029
1034
|
workspaceId: WorkspaceId,
|
|
1030
1035
|
runId: RunId,
|
|
1031
|
-
adapterKind:
|
|
1036
|
+
adapterKind: Schema5.Literal("pi"),
|
|
1032
1037
|
executionTarget: Schema5.optional(RunExecutionTarget),
|
|
1033
1038
|
remoteHostId: Schema5.optional(Schema5.NullOr(TrimmedNonEmptyString)),
|
|
1034
1039
|
status: RuntimeStatus,
|
|
@@ -1132,7 +1137,7 @@ var WorkspaceRemoteHostSummary = Schema6.Struct({
|
|
|
1132
1137
|
region: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1133
1138
|
labels: Schema6.Array(TrimmedNonEmptyString),
|
|
1134
1139
|
capabilities: Schema6.Array(TrimmedNonEmptyString),
|
|
1135
|
-
runtimeAdapters: Schema6.Array(
|
|
1140
|
+
runtimeAdapters: Schema6.Array(Schema6.Literal("pi")),
|
|
1136
1141
|
status: WorkspaceRemoteHostStatus,
|
|
1137
1142
|
currentLeaseCount: Schema6.Number,
|
|
1138
1143
|
lastHeartbeatAt: Schema6.NullOr(IsoDateTime),
|
|
@@ -1173,7 +1178,7 @@ var WorkspaceSummary = Schema6.Struct({
|
|
|
1173
1178
|
title: TrimmedNonEmptyString,
|
|
1174
1179
|
rootPath: TrimmedNonEmptyString,
|
|
1175
1180
|
sourceKind: WorkspaceSourceKind,
|
|
1176
|
-
defaultRuntimeAdapter: Schema6.optional(
|
|
1181
|
+
defaultRuntimeAdapter: Schema6.optional(Schema6.Literal("pi")),
|
|
1177
1182
|
defaultProvider: Schema6.optional(ProviderKind),
|
|
1178
1183
|
defaultModel: Schema6.NullOr(TrimmedNonEmptyString),
|
|
1179
1184
|
topology: Schema6.optional(WorkspaceTopologySummary),
|
|
@@ -1184,6 +1189,7 @@ var WorkspaceSummary = Schema6.Struct({
|
|
|
1184
1189
|
});
|
|
1185
1190
|
|
|
1186
1191
|
// packages/contracts/src/remote.ts
|
|
1192
|
+
var RemoteRuntimeAdapter = Schema7.Literal("pi");
|
|
1187
1193
|
var RemoteEndpoint = Schema7.Struct({
|
|
1188
1194
|
id: RemoteEndpointId,
|
|
1189
1195
|
alias: TrimmedNonEmptyString,
|
|
@@ -1268,7 +1274,7 @@ var RemoteRunnerRegisterInput = Schema7.Struct({
|
|
|
1268
1274
|
region: Schema7.optional(TrimmedNonEmptyString),
|
|
1269
1275
|
labels: Schema7.optional(Schema7.Array(TrimmedNonEmptyString)),
|
|
1270
1276
|
capabilities: Schema7.optional(Schema7.Array(TrimmedNonEmptyString)),
|
|
1271
|
-
runtimeAdapters: Schema7.optional(Schema7.Array(
|
|
1277
|
+
runtimeAdapters: Schema7.optional(Schema7.Array(RemoteRuntimeAdapter)),
|
|
1272
1278
|
status: Schema7.optional(WorkspaceRemoteHostStatus),
|
|
1273
1279
|
currentLeaseCount: Schema7.optional(Schema7.Number)
|
|
1274
1280
|
});
|
|
@@ -1289,14 +1295,14 @@ var RemoteRunnerLifecycleResult = Schema7.Struct({
|
|
|
1289
1295
|
var RemoteRunClaimInput = Schema7.Struct({
|
|
1290
1296
|
workspaceId: WorkspaceId,
|
|
1291
1297
|
hostId: TrimmedNonEmptyString,
|
|
1292
|
-
runtimeAdapters: Schema7.optional(Schema7.Array(
|
|
1298
|
+
runtimeAdapters: Schema7.optional(Schema7.Array(RemoteRuntimeAdapter))
|
|
1293
1299
|
});
|
|
1294
1300
|
var RemoteRunLeaseSummary = Schema7.Struct({
|
|
1295
1301
|
leaseId: TrimmedNonEmptyString,
|
|
1296
1302
|
runId: TrimmedNonEmptyString,
|
|
1297
1303
|
workspaceId: WorkspaceId,
|
|
1298
1304
|
title: TrimmedNonEmptyString,
|
|
1299
|
-
runtimeAdapter:
|
|
1305
|
+
runtimeAdapter: RemoteRuntimeAdapter,
|
|
1300
1306
|
model: Schema7.NullOr(TrimmedNonEmptyString),
|
|
1301
1307
|
runtimeMode: RuntimeMode,
|
|
1302
1308
|
interactionMode: ProviderInteractionMode,
|
|
@@ -1314,7 +1320,7 @@ var RemoteRunExecutionBundle = Schema7.Struct({
|
|
|
1314
1320
|
runId: TrimmedNonEmptyString,
|
|
1315
1321
|
leaseId: TrimmedNonEmptyString,
|
|
1316
1322
|
workspacePath: Schema7.NullOr(TrimmedNonEmptyString),
|
|
1317
|
-
runtimeAdapter:
|
|
1323
|
+
runtimeAdapter: RemoteRuntimeAdapter,
|
|
1318
1324
|
model: Schema7.NullOr(TrimmedNonEmptyString),
|
|
1319
1325
|
runtimeMode: RuntimeMode,
|
|
1320
1326
|
interactionMode: ProviderInteractionMode,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const ReviewMode: Schema.Literals<readonly ["off", "advisory", "required"]>;
|
|
3
|
+
export type ReviewMode = typeof ReviewMode.Type;
|
|
4
|
+
export declare const ReviewStatus: Schema.Literals<readonly ["pending", "running", "approved", "rejected", "error"]>;
|
|
5
|
+
export type ReviewStatus = typeof ReviewStatus.Type;
|
|
6
|
+
export declare const ReviewSummary: Schema.Struct<{
|
|
7
|
+
readonly id: Schema.brand<Schema.Trim, "ReviewResultId">;
|
|
8
|
+
readonly runId: Schema.brand<Schema.Trim, "RunId">;
|
|
9
|
+
readonly taskId: Schema.NullOr<Schema.brand<Schema.Trim, "TaskId">>;
|
|
10
|
+
readonly provider: Schema.Trim;
|
|
11
|
+
readonly mode: Schema.Literals<readonly ["off", "advisory", "required"]>;
|
|
12
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "approved", "rejected", "error"]>;
|
|
13
|
+
readonly summary: Schema.NullOr<Schema.String>;
|
|
14
|
+
readonly output: Schema.Unknown;
|
|
15
|
+
readonly createdAt: Schema.String;
|
|
16
|
+
readonly completedAt: Schema.NullOr<Schema.String>;
|
|
17
|
+
}>;
|
|
18
|
+
export type ReviewSummary = typeof ReviewSummary.Type;
|
package/dist/src/review.js
CHANGED
|
@@ -16,6 +16,9 @@ var WorkspaceId = makeEntityId("WorkspaceId");
|
|
|
16
16
|
var GraphId = makeEntityId("GraphId");
|
|
17
17
|
var TaskId = makeEntityId("TaskId");
|
|
18
18
|
var RunId = makeEntityId("RunId");
|
|
19
|
+
var SafePathSegment = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafePathSegment"));
|
|
20
|
+
var SafeRunId = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/)).pipe(Schema.brand("SafeRunId"));
|
|
21
|
+
var SafeGitRefComponent = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafeGitRefComponent"));
|
|
19
22
|
var EngineRuntimeId = makeEntityId("EngineRuntimeId");
|
|
20
23
|
var ConversationId = makeEntityId("ConversationId");
|
|
21
24
|
var ActionId = makeEntityId("ActionId");
|