@codeworksh/schema 0.0.0 → 0.1.0-canary.165.2.g336229f9
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/LICENSE +21 -0
- package/README.md +48 -0
- package/common.d.mts +86 -0
- package/common.mjs +88 -0
- package/common.mjs.map +1 -0
- package/daemon.d.mts +12 -0
- package/daemon.mjs +22 -0
- package/daemon.mjs.map +1 -0
- package/door.d.mts +33 -0
- package/door.mjs +52 -0
- package/door.mjs.map +1 -0
- package/event.d.mts +79 -0
- package/event.mjs +35 -0
- package/event.mjs.map +1 -0
- package/forwarded.d.mts +13 -0
- package/forwarded.mjs +25 -0
- package/forwarded.mjs.map +1 -0
- package/host/envelope.d.mts +36 -0
- package/host/envelope.mjs +35 -0
- package/host/envelope.mjs.map +1 -0
- package/host/part.d.mts +2 -0
- package/host/part.mjs +60 -0
- package/host/part.mjs.map +1 -0
- package/host/principal.d.mts +36 -0
- package/host/principal.mjs +24 -0
- package/host/principal.mjs.map +1 -0
- package/host/records.d.mts +1051 -0
- package/host/records.mjs +494 -0
- package/host/records.mjs.map +1 -0
- package/host.d.mts +2224 -0
- package/host.mjs +812 -0
- package/host.mjs.map +1 -0
- package/ids.d.mts +53 -0
- package/ids.mjs +60 -0
- package/ids.mjs.map +1 -0
- package/jws.d.mts +84 -0
- package/jws.mjs +119 -0
- package/jws.mjs.map +1 -0
- package/location.d.mts +55 -0
- package/location.mjs +51 -0
- package/location.mjs.map +1 -0
- package/machine.d.mts +77 -0
- package/machine.mjs +48 -0
- package/machine.mjs.map +1 -0
- package/mcp.d.mts +24 -0
- package/mcp.mjs +36 -0
- package/mcp.mjs.map +1 -0
- package/model.d.mts +18 -0
- package/model.mjs +35 -0
- package/model.mjs.map +1 -0
- package/package.json +181 -4
- package/pairing.d.mts +67 -0
- package/pairing.mjs +67 -0
- package/pairing.mjs.map +1 -0
- package/part-Bzm-yNax.d.mts +69 -0
- package/project.d.mts +30 -0
- package/project.mjs +27 -0
- package/project.mjs.map +1 -0
- package/records-316ZUpKX.mjs +127 -0
- package/records-316ZUpKX.mjs.map +1 -0
- package/relay.d.mts +285 -0
- package/relay.mjs +115 -0
- package/relay.mjs.map +1 -0
- package/repo.d.mts +42 -0
- package/repo.mjs +46 -0
- package/repo.mjs.map +1 -0
- package/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/sandbox/driver.d.mts +10 -0
- package/sandbox/driver.mjs +13 -0
- package/sandbox/driver.mjs.map +1 -0
- package/sandbox/errors.d.mts +130 -0
- package/sandbox/errors.mjs +112 -0
- package/sandbox/errors.mjs.map +1 -0
- package/sandbox/instance.d.mts +152 -0
- package/sandbox/instance.mjs +150 -0
- package/sandbox/instance.mjs.map +1 -0
- package/session.d.mts +59 -0
- package/session.mjs +69 -0
- package/session.mjs.map +1 -0
- package/settings.d.mts +22 -0
- package/settings.mjs +32 -0
- package/settings.mjs.map +1 -0
- package/shell.d.mts +5 -0
- package/shell.mjs +7 -0
- package/shell.mjs.map +1 -0
- package/space-CR-9UxdT.d.mts +25 -0
- package/space.d.mts +2 -0
- package/space.mjs +33 -0
- package/space.mjs.map +1 -0
- package/thread.d.mts +50 -0
- package/thread.mjs +69 -0
- package/thread.mjs.map +1 -0
- package/usage-B_TDmpKC.d.mts +15 -0
- package/usage.d.mts +2 -0
- package/usage.mjs +43 -0
- package/usage.mjs.map +1 -0
|
@@ -0,0 +1,1051 @@
|
|
|
1
|
+
import { ThinkingLevel } from "../model.mjs";
|
|
2
|
+
import { Delivery } from "../session.mjs";
|
|
3
|
+
import { RunError, RunOutcome, RunState } from "../thread.mjs";
|
|
4
|
+
import { n as edges } from "../usage-B_TDmpKC.mjs";
|
|
5
|
+
import { n as ToolCall, t as Part } from "../part-Bzm-yNax.mjs";
|
|
6
|
+
import { Schema } from "effect";
|
|
7
|
+
declare namespace records_d_exports {
|
|
8
|
+
export { Clone, ClonePhase, CloneStage, Delivery, DeviceInfo, Folder, HistoryEntry, HostError, records_d_exports as HostRecords, IndexItem, LiveDelta, LogSynced, ModelList, ModelProvider, OAuthCredentials, OAuthError, OAuthInfo, OAuthProvider, Part, ProjectInfo, QueuedPrompt, Repository, RunError, RunOutcome, RunState, RuntimeConfig, SandboxInfo, SessionInfo, SpaceInfo, ThinkingLevel, ThreadInfo, ThreadItem, ThreadOrigin, ThreadRun, ThreadSummary, ThreadUsage, ToolCall, UsageItem, edges };
|
|
9
|
+
}
|
|
10
|
+
/** A computer paired with this machine. */
|
|
11
|
+
export declare const DeviceInfo: Schema.Struct<{
|
|
12
|
+
readonly id: Schema.String;
|
|
13
|
+
readonly label: Schema.String;
|
|
14
|
+
/** Its key's fingerprint, `SHA256:<thumbprint>`. */
|
|
15
|
+
readonly fingerprint: Schema.String;
|
|
16
|
+
/** Epoch milliseconds. */
|
|
17
|
+
readonly createdAt: Schema.Finite;
|
|
18
|
+
/** When it last took a ticket, epoch milliseconds; a device unseen for 30 days is refused. */
|
|
19
|
+
readonly seenAt: Schema.Finite;
|
|
20
|
+
/** Whether it last paired or took a ticket over TLS, which ends at a proxy in front of this server. */
|
|
21
|
+
readonly encrypted: Schema.optional<Schema.Boolean>;
|
|
22
|
+
}>;
|
|
23
|
+
export type DeviceInfo = typeof DeviceInfo.Type;
|
|
24
|
+
export declare const SandboxInfo: Schema.Struct<{
|
|
25
|
+
readonly id: Schema.brand<Schema.String, "SandboxInstance.ID"> & {
|
|
26
|
+
local: string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
27
|
+
create: () => string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
28
|
+
};
|
|
29
|
+
readonly driver: Schema.String;
|
|
30
|
+
readonly kind: Schema.Literals<readonly ["local", "virtual", "remote"]>;
|
|
31
|
+
readonly providerResourceId: Schema.OptionFromNullOr<Schema.String>;
|
|
32
|
+
readonly ownership: Schema.Literals<readonly ["managed", "external"]>;
|
|
33
|
+
readonly status: Schema.Literals<readonly ["provisioning", "online", "offline", "suspending", "removing", "removed", "unavail", "faulted"]>;
|
|
34
|
+
readonly usage: Schema.Literals<readonly ["idle", "busy", "pinned"]>;
|
|
35
|
+
readonly refCount: Schema.Int;
|
|
36
|
+
readonly createdAt: Schema.DateFromString;
|
|
37
|
+
readonly updatedAt: Schema.DateFromString;
|
|
38
|
+
}>;
|
|
39
|
+
export type SandboxInfo = typeof SandboxInfo.Type;
|
|
40
|
+
/** One logical codebase, whatever env it is checked out in. */
|
|
41
|
+
export declare const ProjectInfo: Schema.Struct<{
|
|
42
|
+
readonly id: Schema.String;
|
|
43
|
+
readonly name: Schema.String;
|
|
44
|
+
readonly status: Schema.Literals<readonly ["active", "archived"]>;
|
|
45
|
+
/** Epoch milliseconds. */
|
|
46
|
+
readonly createdAt: Schema.Finite;
|
|
47
|
+
readonly updatedAt: Schema.Finite;
|
|
48
|
+
}>;
|
|
49
|
+
export type ProjectInfo = typeof ProjectInfo.Type;
|
|
50
|
+
/** One directory of a project in one env; sessions attach to it. */
|
|
51
|
+
export declare const SpaceInfo: Schema.Struct<{
|
|
52
|
+
readonly id: Schema.String;
|
|
53
|
+
readonly projectId: Schema.String;
|
|
54
|
+
readonly location: Schema.brand<Schema.String, "AbsolutePath">;
|
|
55
|
+
readonly kind: Schema.Literals<readonly ["primary", "linked", "copy", "plain"]>;
|
|
56
|
+
/** The sandbox it is in; absent for the host. */
|
|
57
|
+
readonly env: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
58
|
+
readonly status: Schema.Literals<readonly ["active", "archived"]>;
|
|
59
|
+
/** Epoch milliseconds. */
|
|
60
|
+
readonly createdAt: Schema.Finite;
|
|
61
|
+
readonly updatedAt: Schema.Finite;
|
|
62
|
+
}>;
|
|
63
|
+
export type SpaceInfo = typeof SpaceInfo.Type;
|
|
64
|
+
/** The container: where its threads run by default, and which host project it reads. */
|
|
65
|
+
export declare const SessionInfo: Schema.Struct<{
|
|
66
|
+
readonly id: Schema.brand<Schema.String, "Session.ID"> & {
|
|
67
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
68
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
69
|
+
};
|
|
70
|
+
readonly spaceId: Schema.String;
|
|
71
|
+
readonly slug: Schema.String;
|
|
72
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
73
|
+
/** The host directory this session is anchored to. Absent when it has none. */
|
|
74
|
+
readonly hostDir: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "AbsolutePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "AbsolutePath">>, never, never>;
|
|
75
|
+
readonly sandbox: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
76
|
+
readonly id: Schema.brand<Schema.String, "SandboxInstance.ID"> & {
|
|
77
|
+
local: string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
78
|
+
create: () => string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
79
|
+
};
|
|
80
|
+
readonly driver: Schema.String;
|
|
81
|
+
readonly kind: Schema.Literals<readonly ["local", "virtual", "remote"]>;
|
|
82
|
+
readonly providerResourceId: Schema.OptionFromNullOr<Schema.String>;
|
|
83
|
+
readonly ownership: Schema.Literals<readonly ["managed", "external"]>;
|
|
84
|
+
readonly status: Schema.Literals<readonly ["provisioning", "online", "offline", "suspending", "removing", "removed", "unavail", "faulted"]>;
|
|
85
|
+
readonly usage: Schema.Literals<readonly ["idle", "busy", "pinned"]>;
|
|
86
|
+
readonly refCount: Schema.Int;
|
|
87
|
+
readonly createdAt: Schema.DateFromString;
|
|
88
|
+
readonly updatedAt: Schema.DateFromString;
|
|
89
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
90
|
+
readonly id: Schema.brand<Schema.String, "SandboxInstance.ID"> & {
|
|
91
|
+
local: string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
92
|
+
create: () => string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
93
|
+
};
|
|
94
|
+
readonly driver: Schema.String;
|
|
95
|
+
readonly kind: Schema.Literals<readonly ["local", "virtual", "remote"]>;
|
|
96
|
+
readonly providerResourceId: Schema.OptionFromNullOr<Schema.String>;
|
|
97
|
+
readonly ownership: Schema.Literals<readonly ["managed", "external"]>;
|
|
98
|
+
readonly status: Schema.Literals<readonly ["provisioning", "online", "offline", "suspending", "removing", "removed", "unavail", "faulted"]>;
|
|
99
|
+
readonly usage: Schema.Literals<readonly ["idle", "busy", "pinned"]>;
|
|
100
|
+
readonly refCount: Schema.Int;
|
|
101
|
+
readonly createdAt: Schema.DateFromString;
|
|
102
|
+
readonly updatedAt: Schema.DateFromString;
|
|
103
|
+
}>>, never, never>;
|
|
104
|
+
/** The project the session's space belongs to. */
|
|
105
|
+
readonly project: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
106
|
+
readonly id: Schema.String;
|
|
107
|
+
readonly name: Schema.String;
|
|
108
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
109
|
+
readonly id: Schema.String;
|
|
110
|
+
readonly name: Schema.String;
|
|
111
|
+
}>>, never, never>;
|
|
112
|
+
readonly tag: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
113
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
114
|
+
/** Epoch milliseconds. */
|
|
115
|
+
readonly createdAt: Schema.Finite;
|
|
116
|
+
/** Last activity in any of its threads, epoch milliseconds. */
|
|
117
|
+
readonly updatedAt: Schema.Finite;
|
|
118
|
+
/** Where unaddressed prompts go. */
|
|
119
|
+
readonly mainThreadId: Schema.brand<Schema.String, "Thread.ID"> & {
|
|
120
|
+
create: () => string & import("effect/Brand").Brand<"Thread.ID">;
|
|
121
|
+
};
|
|
122
|
+
}>;
|
|
123
|
+
export type SessionInfo = typeof SessionInfo.Type;
|
|
124
|
+
/** `cut` is the committed seq of `entryId`: the inherited line ends there. */
|
|
125
|
+
export declare const ThreadOrigin: Schema.Union<readonly [Schema.Struct<{
|
|
126
|
+
readonly kind: Schema.Literal<"main">;
|
|
127
|
+
}>, Schema.Struct<{
|
|
128
|
+
readonly kind: Schema.Literal<"fork">;
|
|
129
|
+
readonly threadId: Schema.String;
|
|
130
|
+
readonly entryId: Schema.String;
|
|
131
|
+
readonly cut: Schema.Int;
|
|
132
|
+
}>, Schema.Struct<{
|
|
133
|
+
readonly kind: Schema.Literal<"subagent">;
|
|
134
|
+
readonly threadId: Schema.String;
|
|
135
|
+
readonly callId: Schema.String;
|
|
136
|
+
readonly entryId: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
137
|
+
/** Present once `entryId` is committed. */
|
|
138
|
+
readonly cut: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
139
|
+
}>]>;
|
|
140
|
+
export type ThreadOrigin = typeof ThreadOrigin.Type;
|
|
141
|
+
/** Billed usage of a thread's own entries; what it inherits through a fork point counts for its source. */
|
|
142
|
+
export declare const ThreadUsage: Schema.Struct<{
|
|
143
|
+
/** Total cost in US dollars, from the catalog's prices. */
|
|
144
|
+
readonly cost: Schema.Finite;
|
|
145
|
+
readonly input: Schema.Int;
|
|
146
|
+
readonly output: Schema.Int;
|
|
147
|
+
readonly cacheRead: Schema.Int;
|
|
148
|
+
readonly cacheWrite: Schema.Int;
|
|
149
|
+
}>;
|
|
150
|
+
export type ThreadUsage = typeof ThreadUsage.Type;
|
|
151
|
+
/** The last run of a thread; `error` is set unless it succeeded or is still going. */
|
|
152
|
+
export declare const ThreadRun: Schema.Struct<{
|
|
153
|
+
/** Epoch milliseconds. */
|
|
154
|
+
readonly startedAt: Schema.Finite;
|
|
155
|
+
readonly endedAt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
156
|
+
readonly outcome: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>>, Schema.optionalKey<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>, never, never>;
|
|
157
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
158
|
+
readonly error: Schema.Struct<{
|
|
159
|
+
readonly type: Schema.String;
|
|
160
|
+
readonly message: Schema.String;
|
|
161
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
162
|
+
}>;
|
|
163
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
164
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
165
|
+
readonly message: Schema.String;
|
|
166
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
167
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
168
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
169
|
+
readonly error: Schema.Struct<{
|
|
170
|
+
readonly type: Schema.String;
|
|
171
|
+
readonly message: Schema.String;
|
|
172
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
173
|
+
}>;
|
|
174
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
175
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
176
|
+
readonly message: Schema.String;
|
|
177
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
178
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
179
|
+
}>]>>, never, never>;
|
|
180
|
+
}>;
|
|
181
|
+
export type ThreadRun = typeof ThreadRun.Type;
|
|
182
|
+
/** One linear transcript of a session, with the session embedded. */
|
|
183
|
+
export declare const ThreadInfo: Schema.Struct<{
|
|
184
|
+
readonly id: Schema.brand<Schema.String, "Thread.ID"> & {
|
|
185
|
+
create: () => string & import("effect/Brand").Brand<"Thread.ID">;
|
|
186
|
+
};
|
|
187
|
+
readonly origin: Schema.Union<readonly [Schema.Struct<{
|
|
188
|
+
readonly kind: Schema.Literal<"main">;
|
|
189
|
+
}>, Schema.Struct<{
|
|
190
|
+
readonly kind: Schema.Literal<"fork">;
|
|
191
|
+
readonly threadId: Schema.String;
|
|
192
|
+
readonly entryId: Schema.String;
|
|
193
|
+
readonly cut: Schema.Int;
|
|
194
|
+
}>, Schema.Struct<{
|
|
195
|
+
readonly kind: Schema.Literal<"subagent">;
|
|
196
|
+
readonly threadId: Schema.String;
|
|
197
|
+
readonly callId: Schema.String;
|
|
198
|
+
readonly entryId: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
199
|
+
/** Present once `entryId` is committed. */
|
|
200
|
+
readonly cut: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
201
|
+
}>]>;
|
|
202
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
203
|
+
readonly updatedAt: Schema.Finite;
|
|
204
|
+
readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
205
|
+
readonly provider: Schema.String;
|
|
206
|
+
readonly id: Schema.String;
|
|
207
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
208
|
+
readonly provider: Schema.String;
|
|
209
|
+
readonly id: Schema.String;
|
|
210
|
+
}>>, never, never>;
|
|
211
|
+
readonly thinkingLevel: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>>, Schema.optionalKey<Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>, never, never>;
|
|
212
|
+
readonly foundation: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
213
|
+
readonly placement: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
214
|
+
readonly spaceId: Schema.String;
|
|
215
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
216
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
217
|
+
readonly spaceId: Schema.String;
|
|
218
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
219
|
+
}>>, never, never>;
|
|
220
|
+
readonly usage: Schema.Struct<{
|
|
221
|
+
/** Total cost in US dollars, from the catalog's prices. */
|
|
222
|
+
readonly cost: Schema.Finite;
|
|
223
|
+
readonly input: Schema.Int;
|
|
224
|
+
readonly output: Schema.Int;
|
|
225
|
+
readonly cacheRead: Schema.Int;
|
|
226
|
+
readonly cacheWrite: Schema.Int;
|
|
227
|
+
}>;
|
|
228
|
+
readonly runState: Schema.Literals<readonly ["idle", "starting", "running"]>;
|
|
229
|
+
readonly runStateAt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
230
|
+
readonly lastRun: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
231
|
+
/** Epoch milliseconds. */
|
|
232
|
+
readonly startedAt: Schema.Finite;
|
|
233
|
+
readonly endedAt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
234
|
+
readonly outcome: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>>, Schema.optionalKey<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>, never, never>;
|
|
235
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
236
|
+
readonly error: Schema.Struct<{
|
|
237
|
+
readonly type: Schema.String;
|
|
238
|
+
readonly message: Schema.String;
|
|
239
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
240
|
+
}>;
|
|
241
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
242
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
243
|
+
readonly message: Schema.String;
|
|
244
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
245
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
246
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
247
|
+
readonly error: Schema.Struct<{
|
|
248
|
+
readonly type: Schema.String;
|
|
249
|
+
readonly message: Schema.String;
|
|
250
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
251
|
+
}>;
|
|
252
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
253
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
254
|
+
readonly message: Schema.String;
|
|
255
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
256
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
257
|
+
}>]>>, never, never>;
|
|
258
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
259
|
+
/** Epoch milliseconds. */
|
|
260
|
+
readonly startedAt: Schema.Finite;
|
|
261
|
+
readonly endedAt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
262
|
+
readonly outcome: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>>, Schema.optionalKey<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>, never, never>;
|
|
263
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
264
|
+
readonly error: Schema.Struct<{
|
|
265
|
+
readonly type: Schema.String;
|
|
266
|
+
readonly message: Schema.String;
|
|
267
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
268
|
+
}>;
|
|
269
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
270
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
271
|
+
readonly message: Schema.String;
|
|
272
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
273
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
274
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
275
|
+
readonly error: Schema.Struct<{
|
|
276
|
+
readonly type: Schema.String;
|
|
277
|
+
readonly message: Schema.String;
|
|
278
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
279
|
+
}>;
|
|
280
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
281
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
282
|
+
readonly message: Schema.String;
|
|
283
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
284
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
285
|
+
}>]>>, never, never>;
|
|
286
|
+
}>>, never, never>;
|
|
287
|
+
readonly parked: Schema.Boolean;
|
|
288
|
+
readonly restarts: Schema.Int;
|
|
289
|
+
readonly attempt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
290
|
+
readonly createdSeq: Schema.Int;
|
|
291
|
+
readonly createdAt: Schema.Finite;
|
|
292
|
+
readonly session: Schema.Struct<{
|
|
293
|
+
readonly id: Schema.brand<Schema.String, "Session.ID"> & {
|
|
294
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
295
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
296
|
+
};
|
|
297
|
+
readonly spaceId: Schema.String;
|
|
298
|
+
readonly slug: Schema.String;
|
|
299
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
300
|
+
/** The host directory this session is anchored to. Absent when it has none. */
|
|
301
|
+
readonly hostDir: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "AbsolutePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "AbsolutePath">>, never, never>;
|
|
302
|
+
readonly sandbox: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
303
|
+
readonly id: Schema.brand<Schema.String, "SandboxInstance.ID"> & {
|
|
304
|
+
local: string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
305
|
+
create: () => string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
306
|
+
};
|
|
307
|
+
readonly driver: Schema.String;
|
|
308
|
+
readonly kind: Schema.Literals<readonly ["local", "virtual", "remote"]>;
|
|
309
|
+
readonly providerResourceId: Schema.OptionFromNullOr<Schema.String>;
|
|
310
|
+
readonly ownership: Schema.Literals<readonly ["managed", "external"]>;
|
|
311
|
+
readonly status: Schema.Literals<readonly ["provisioning", "online", "offline", "suspending", "removing", "removed", "unavail", "faulted"]>;
|
|
312
|
+
readonly usage: Schema.Literals<readonly ["idle", "busy", "pinned"]>;
|
|
313
|
+
readonly refCount: Schema.Int;
|
|
314
|
+
readonly createdAt: Schema.DateFromString;
|
|
315
|
+
readonly updatedAt: Schema.DateFromString;
|
|
316
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
317
|
+
readonly id: Schema.brand<Schema.String, "SandboxInstance.ID"> & {
|
|
318
|
+
local: string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
319
|
+
create: () => string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
320
|
+
};
|
|
321
|
+
readonly driver: Schema.String;
|
|
322
|
+
readonly kind: Schema.Literals<readonly ["local", "virtual", "remote"]>;
|
|
323
|
+
readonly providerResourceId: Schema.OptionFromNullOr<Schema.String>;
|
|
324
|
+
readonly ownership: Schema.Literals<readonly ["managed", "external"]>;
|
|
325
|
+
readonly status: Schema.Literals<readonly ["provisioning", "online", "offline", "suspending", "removing", "removed", "unavail", "faulted"]>;
|
|
326
|
+
readonly usage: Schema.Literals<readonly ["idle", "busy", "pinned"]>;
|
|
327
|
+
readonly refCount: Schema.Int;
|
|
328
|
+
readonly createdAt: Schema.DateFromString;
|
|
329
|
+
readonly updatedAt: Schema.DateFromString;
|
|
330
|
+
}>>, never, never>;
|
|
331
|
+
/** The project the session's space belongs to. */
|
|
332
|
+
readonly project: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
333
|
+
readonly id: Schema.String;
|
|
334
|
+
readonly name: Schema.String;
|
|
335
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
336
|
+
readonly id: Schema.String;
|
|
337
|
+
readonly name: Schema.String;
|
|
338
|
+
}>>, never, never>;
|
|
339
|
+
readonly tag: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
340
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
341
|
+
/** Epoch milliseconds. */
|
|
342
|
+
readonly createdAt: Schema.Finite;
|
|
343
|
+
/** Last activity in any of its threads, epoch milliseconds. */
|
|
344
|
+
readonly updatedAt: Schema.Finite;
|
|
345
|
+
/** Where unaddressed prompts go. */
|
|
346
|
+
readonly mainThreadId: Schema.brand<Schema.String, "Thread.ID"> & {
|
|
347
|
+
create: () => string & import("effect/Brand").Brand<"Thread.ID">;
|
|
348
|
+
};
|
|
349
|
+
}>;
|
|
350
|
+
}>;
|
|
351
|
+
export type ThreadInfo = typeof ThreadInfo.Type;
|
|
352
|
+
/** A thread as `index.sync` sends it: its session is a row of its own. */
|
|
353
|
+
export declare const ThreadSummary: Schema.Struct<{
|
|
354
|
+
readonly id: Schema.brand<Schema.String, "Thread.ID"> & {
|
|
355
|
+
create: () => string & import("effect/Brand").Brand<"Thread.ID">;
|
|
356
|
+
};
|
|
357
|
+
readonly origin: Schema.Union<readonly [Schema.Struct<{
|
|
358
|
+
readonly kind: Schema.Literal<"main">;
|
|
359
|
+
}>, Schema.Struct<{
|
|
360
|
+
readonly kind: Schema.Literal<"fork">;
|
|
361
|
+
readonly threadId: Schema.String;
|
|
362
|
+
readonly entryId: Schema.String;
|
|
363
|
+
readonly cut: Schema.Int;
|
|
364
|
+
}>, Schema.Struct<{
|
|
365
|
+
readonly kind: Schema.Literal<"subagent">;
|
|
366
|
+
readonly threadId: Schema.String;
|
|
367
|
+
readonly callId: Schema.String;
|
|
368
|
+
readonly entryId: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
369
|
+
/** Present once `entryId` is committed. */
|
|
370
|
+
readonly cut: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
371
|
+
}>]>;
|
|
372
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
373
|
+
readonly updatedAt: Schema.Finite;
|
|
374
|
+
readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
375
|
+
readonly provider: Schema.String;
|
|
376
|
+
readonly id: Schema.String;
|
|
377
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
378
|
+
readonly provider: Schema.String;
|
|
379
|
+
readonly id: Schema.String;
|
|
380
|
+
}>>, never, never>;
|
|
381
|
+
readonly thinkingLevel: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>>, Schema.optionalKey<Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>, never, never>;
|
|
382
|
+
readonly foundation: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
383
|
+
readonly placement: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
384
|
+
readonly spaceId: Schema.String;
|
|
385
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
386
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
387
|
+
readonly spaceId: Schema.String;
|
|
388
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
389
|
+
}>>, never, never>;
|
|
390
|
+
readonly usage: Schema.Struct<{
|
|
391
|
+
/** Total cost in US dollars, from the catalog's prices. */
|
|
392
|
+
readonly cost: Schema.Finite;
|
|
393
|
+
readonly input: Schema.Int;
|
|
394
|
+
readonly output: Schema.Int;
|
|
395
|
+
readonly cacheRead: Schema.Int;
|
|
396
|
+
readonly cacheWrite: Schema.Int;
|
|
397
|
+
}>;
|
|
398
|
+
readonly runState: Schema.Literals<readonly ["idle", "starting", "running"]>;
|
|
399
|
+
readonly runStateAt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
400
|
+
readonly lastRun: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
401
|
+
/** Epoch milliseconds. */
|
|
402
|
+
readonly startedAt: Schema.Finite;
|
|
403
|
+
readonly endedAt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
404
|
+
readonly outcome: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>>, Schema.optionalKey<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>, never, never>;
|
|
405
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
406
|
+
readonly error: Schema.Struct<{
|
|
407
|
+
readonly type: Schema.String;
|
|
408
|
+
readonly message: Schema.String;
|
|
409
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
410
|
+
}>;
|
|
411
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
412
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
413
|
+
readonly message: Schema.String;
|
|
414
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
415
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
416
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
417
|
+
readonly error: Schema.Struct<{
|
|
418
|
+
readonly type: Schema.String;
|
|
419
|
+
readonly message: Schema.String;
|
|
420
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
421
|
+
}>;
|
|
422
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
423
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
424
|
+
readonly message: Schema.String;
|
|
425
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
426
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
427
|
+
}>]>>, never, never>;
|
|
428
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
429
|
+
/** Epoch milliseconds. */
|
|
430
|
+
readonly startedAt: Schema.Finite;
|
|
431
|
+
readonly endedAt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
432
|
+
readonly outcome: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>>, Schema.optionalKey<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>, never, never>;
|
|
433
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
434
|
+
readonly error: Schema.Struct<{
|
|
435
|
+
readonly type: Schema.String;
|
|
436
|
+
readonly message: Schema.String;
|
|
437
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
438
|
+
}>;
|
|
439
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
440
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
441
|
+
readonly message: Schema.String;
|
|
442
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
443
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
444
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
445
|
+
readonly error: Schema.Struct<{
|
|
446
|
+
readonly type: Schema.String;
|
|
447
|
+
readonly message: Schema.String;
|
|
448
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
449
|
+
}>;
|
|
450
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
451
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
452
|
+
readonly message: Schema.String;
|
|
453
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
454
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
455
|
+
}>]>>, never, never>;
|
|
456
|
+
}>>, never, never>;
|
|
457
|
+
readonly parked: Schema.Boolean;
|
|
458
|
+
readonly restarts: Schema.Int;
|
|
459
|
+
readonly attempt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
460
|
+
readonly createdSeq: Schema.Int;
|
|
461
|
+
readonly createdAt: Schema.Finite;
|
|
462
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
463
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
464
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
465
|
+
};
|
|
466
|
+
}>;
|
|
467
|
+
export type ThreadSummary = typeof ThreadSummary.Type;
|
|
468
|
+
/** An `index.sync` item: a row with the revision that last wrote it, a deletion, or progress. */
|
|
469
|
+
export declare const IndexItem: Schema.Union<readonly [Schema.TaggedStruct<"Project", {
|
|
470
|
+
readonly project: Schema.Struct<{
|
|
471
|
+
readonly id: Schema.String;
|
|
472
|
+
readonly name: Schema.String;
|
|
473
|
+
readonly status: Schema.Literals<readonly ["active", "archived"]>;
|
|
474
|
+
/** Epoch milliseconds. */
|
|
475
|
+
readonly createdAt: Schema.Finite;
|
|
476
|
+
readonly updatedAt: Schema.Finite;
|
|
477
|
+
}>;
|
|
478
|
+
readonly rev: Schema.Int;
|
|
479
|
+
}>, Schema.TaggedStruct<"Space", {
|
|
480
|
+
readonly space: Schema.Struct<{
|
|
481
|
+
readonly id: Schema.String;
|
|
482
|
+
readonly projectId: Schema.String;
|
|
483
|
+
readonly location: Schema.brand<Schema.String, "AbsolutePath">;
|
|
484
|
+
readonly kind: Schema.Literals<readonly ["primary", "linked", "copy", "plain"]>;
|
|
485
|
+
/** The sandbox it is in; absent for the host. */
|
|
486
|
+
readonly env: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
487
|
+
readonly status: Schema.Literals<readonly ["active", "archived"]>;
|
|
488
|
+
/** Epoch milliseconds. */
|
|
489
|
+
readonly createdAt: Schema.Finite;
|
|
490
|
+
readonly updatedAt: Schema.Finite;
|
|
491
|
+
}>;
|
|
492
|
+
readonly rev: Schema.Int;
|
|
493
|
+
}>, Schema.TaggedStruct<"Session", {
|
|
494
|
+
readonly session: Schema.Struct<{
|
|
495
|
+
readonly id: Schema.brand<Schema.String, "Session.ID"> & {
|
|
496
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
497
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
498
|
+
};
|
|
499
|
+
readonly spaceId: Schema.String;
|
|
500
|
+
readonly slug: Schema.String;
|
|
501
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
502
|
+
/** The host directory this session is anchored to. Absent when it has none. */
|
|
503
|
+
readonly hostDir: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "AbsolutePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "AbsolutePath">>, never, never>;
|
|
504
|
+
readonly sandbox: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
505
|
+
readonly id: Schema.brand<Schema.String, "SandboxInstance.ID"> & {
|
|
506
|
+
local: string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
507
|
+
create: () => string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
508
|
+
};
|
|
509
|
+
readonly driver: Schema.String;
|
|
510
|
+
readonly kind: Schema.Literals<readonly ["local", "virtual", "remote"]>;
|
|
511
|
+
readonly providerResourceId: Schema.OptionFromNullOr<Schema.String>;
|
|
512
|
+
readonly ownership: Schema.Literals<readonly ["managed", "external"]>;
|
|
513
|
+
readonly status: Schema.Literals<readonly ["provisioning", "online", "offline", "suspending", "removing", "removed", "unavail", "faulted"]>;
|
|
514
|
+
readonly usage: Schema.Literals<readonly ["idle", "busy", "pinned"]>;
|
|
515
|
+
readonly refCount: Schema.Int;
|
|
516
|
+
readonly createdAt: Schema.DateFromString;
|
|
517
|
+
readonly updatedAt: Schema.DateFromString;
|
|
518
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
519
|
+
readonly id: Schema.brand<Schema.String, "SandboxInstance.ID"> & {
|
|
520
|
+
local: string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
521
|
+
create: () => string & import("effect/Brand").Brand<"SandboxInstance.ID">;
|
|
522
|
+
};
|
|
523
|
+
readonly driver: Schema.String;
|
|
524
|
+
readonly kind: Schema.Literals<readonly ["local", "virtual", "remote"]>;
|
|
525
|
+
readonly providerResourceId: Schema.OptionFromNullOr<Schema.String>;
|
|
526
|
+
readonly ownership: Schema.Literals<readonly ["managed", "external"]>;
|
|
527
|
+
readonly status: Schema.Literals<readonly ["provisioning", "online", "offline", "suspending", "removing", "removed", "unavail", "faulted"]>;
|
|
528
|
+
readonly usage: Schema.Literals<readonly ["idle", "busy", "pinned"]>;
|
|
529
|
+
readonly refCount: Schema.Int;
|
|
530
|
+
readonly createdAt: Schema.DateFromString;
|
|
531
|
+
readonly updatedAt: Schema.DateFromString;
|
|
532
|
+
}>>, never, never>;
|
|
533
|
+
/** The project the session's space belongs to. */
|
|
534
|
+
readonly project: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
535
|
+
readonly id: Schema.String;
|
|
536
|
+
readonly name: Schema.String;
|
|
537
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
538
|
+
readonly id: Schema.String;
|
|
539
|
+
readonly name: Schema.String;
|
|
540
|
+
}>>, never, never>;
|
|
541
|
+
readonly tag: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
542
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
543
|
+
/** Epoch milliseconds. */
|
|
544
|
+
readonly createdAt: Schema.Finite;
|
|
545
|
+
/** Last activity in any of its threads, epoch milliseconds. */
|
|
546
|
+
readonly updatedAt: Schema.Finite;
|
|
547
|
+
/** Where unaddressed prompts go. */
|
|
548
|
+
readonly mainThreadId: Schema.brand<Schema.String, "Thread.ID"> & {
|
|
549
|
+
create: () => string & import("effect/Brand").Brand<"Thread.ID">;
|
|
550
|
+
};
|
|
551
|
+
}>;
|
|
552
|
+
readonly rev: Schema.Int;
|
|
553
|
+
}>, Schema.TaggedStruct<"Thread", {
|
|
554
|
+
readonly thread: Schema.Struct<{
|
|
555
|
+
readonly id: Schema.brand<Schema.String, "Thread.ID"> & {
|
|
556
|
+
create: () => string & import("effect/Brand").Brand<"Thread.ID">;
|
|
557
|
+
};
|
|
558
|
+
readonly origin: Schema.Union<readonly [Schema.Struct<{
|
|
559
|
+
readonly kind: Schema.Literal<"main">;
|
|
560
|
+
}>, Schema.Struct<{
|
|
561
|
+
readonly kind: Schema.Literal<"fork">;
|
|
562
|
+
readonly threadId: Schema.String;
|
|
563
|
+
readonly entryId: Schema.String;
|
|
564
|
+
readonly cut: Schema.Int;
|
|
565
|
+
}>, Schema.Struct<{
|
|
566
|
+
readonly kind: Schema.Literal<"subagent">;
|
|
567
|
+
readonly threadId: Schema.String;
|
|
568
|
+
readonly callId: Schema.String;
|
|
569
|
+
readonly entryId: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
570
|
+
/** Present once `entryId` is committed. */
|
|
571
|
+
readonly cut: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
572
|
+
}>]>;
|
|
573
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
574
|
+
readonly updatedAt: Schema.Finite;
|
|
575
|
+
readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
576
|
+
readonly provider: Schema.String;
|
|
577
|
+
readonly id: Schema.String;
|
|
578
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
579
|
+
readonly provider: Schema.String;
|
|
580
|
+
readonly id: Schema.String;
|
|
581
|
+
}>>, never, never>;
|
|
582
|
+
readonly thinkingLevel: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>>, Schema.optionalKey<Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>, never, never>;
|
|
583
|
+
readonly foundation: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
584
|
+
readonly placement: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
585
|
+
readonly spaceId: Schema.String;
|
|
586
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
587
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
588
|
+
readonly spaceId: Schema.String;
|
|
589
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
590
|
+
}>>, never, never>;
|
|
591
|
+
readonly usage: Schema.Struct<{
|
|
592
|
+
/** Total cost in US dollars, from the catalog's prices. */
|
|
593
|
+
readonly cost: Schema.Finite;
|
|
594
|
+
readonly input: Schema.Int;
|
|
595
|
+
readonly output: Schema.Int;
|
|
596
|
+
readonly cacheRead: Schema.Int;
|
|
597
|
+
readonly cacheWrite: Schema.Int;
|
|
598
|
+
}>;
|
|
599
|
+
readonly runState: Schema.Literals<readonly ["idle", "starting", "running"]>;
|
|
600
|
+
readonly runStateAt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
601
|
+
readonly lastRun: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
602
|
+
/** Epoch milliseconds. */
|
|
603
|
+
readonly startedAt: Schema.Finite;
|
|
604
|
+
readonly endedAt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
605
|
+
readonly outcome: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>>, Schema.optionalKey<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>, never, never>;
|
|
606
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
607
|
+
readonly error: Schema.Struct<{
|
|
608
|
+
readonly type: Schema.String;
|
|
609
|
+
readonly message: Schema.String;
|
|
610
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
611
|
+
}>;
|
|
612
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
613
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
614
|
+
readonly message: Schema.String;
|
|
615
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
616
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
617
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
618
|
+
readonly error: Schema.Struct<{
|
|
619
|
+
readonly type: Schema.String;
|
|
620
|
+
readonly message: Schema.String;
|
|
621
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
622
|
+
}>;
|
|
623
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
624
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
625
|
+
readonly message: Schema.String;
|
|
626
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
627
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
628
|
+
}>]>>, never, never>;
|
|
629
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
630
|
+
/** Epoch milliseconds. */
|
|
631
|
+
readonly startedAt: Schema.Finite;
|
|
632
|
+
readonly endedAt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
633
|
+
readonly outcome: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>>, Schema.optionalKey<Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>>, never, never>;
|
|
634
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
635
|
+
readonly error: Schema.Struct<{
|
|
636
|
+
readonly type: Schema.String;
|
|
637
|
+
readonly message: Schema.String;
|
|
638
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
639
|
+
}>;
|
|
640
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
641
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
642
|
+
readonly message: Schema.String;
|
|
643
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
644
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
645
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.TaggedStruct<"failed", {
|
|
646
|
+
readonly error: Schema.Struct<{
|
|
647
|
+
readonly type: Schema.String;
|
|
648
|
+
readonly message: Schema.String;
|
|
649
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
650
|
+
}>;
|
|
651
|
+
}>, Schema.TaggedStruct<"runFailed", {
|
|
652
|
+
readonly reason: Schema.Literals<readonly ["crashloop", "interrupted", "truncated"]>;
|
|
653
|
+
readonly message: Schema.String;
|
|
654
|
+
}>, Schema.TaggedStruct<"interrupted", {
|
|
655
|
+
readonly reason: Schema.Literals<readonly ["user", "shutdown", "crash"]>;
|
|
656
|
+
}>]>>, never, never>;
|
|
657
|
+
}>>, never, never>;
|
|
658
|
+
readonly parked: Schema.Boolean;
|
|
659
|
+
readonly restarts: Schema.Int;
|
|
660
|
+
readonly attempt: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
661
|
+
readonly createdSeq: Schema.Int;
|
|
662
|
+
readonly createdAt: Schema.Finite;
|
|
663
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
664
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
665
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
666
|
+
};
|
|
667
|
+
}>;
|
|
668
|
+
readonly rev: Schema.Int;
|
|
669
|
+
}>, Schema.TaggedStruct<"Removed", {
|
|
670
|
+
readonly kind: Schema.Literal<"session">;
|
|
671
|
+
readonly id: Schema.String;
|
|
672
|
+
readonly rev: Schema.Int;
|
|
673
|
+
}>, Schema.TaggedStruct<"Synced", {
|
|
674
|
+
readonly storeId: Schema.String;
|
|
675
|
+
readonly rev: Schema.Int;
|
|
676
|
+
readonly boot: Schema.String;
|
|
677
|
+
readonly reset: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
678
|
+
}>]>;
|
|
679
|
+
export type IndexItem = typeof IndexItem.Type;
|
|
680
|
+
/** A `usage.sync` item: a rollup row with the revision that last wrote it, or progress. */
|
|
681
|
+
export declare const UsageItem: Schema.Union<readonly [Schema.TaggedStruct<"Usage", {
|
|
682
|
+
readonly hour: Schema.Int;
|
|
683
|
+
readonly threadId: Schema.brand<Schema.String, "Thread.ID"> & {
|
|
684
|
+
create: () => string & import("effect/Brand").Brand<"Thread.ID">;
|
|
685
|
+
};
|
|
686
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
687
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
688
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
689
|
+
};
|
|
690
|
+
readonly projectId: Schema.String;
|
|
691
|
+
readonly provider: Schema.String;
|
|
692
|
+
readonly model: Schema.String;
|
|
693
|
+
readonly thinking: Schema.String;
|
|
694
|
+
readonly requests: Schema.Int;
|
|
695
|
+
/** `reasoning` is part of `output`. */
|
|
696
|
+
readonly tokens: Schema.Struct<{
|
|
697
|
+
readonly input: Schema.Int;
|
|
698
|
+
readonly output: Schema.Int;
|
|
699
|
+
readonly cacheRead: Schema.Int;
|
|
700
|
+
readonly cacheWrite: Schema.Int;
|
|
701
|
+
readonly reasoning: Schema.Int;
|
|
702
|
+
}>;
|
|
703
|
+
/** US dollars, from the catalog's prices. */
|
|
704
|
+
readonly cost: Schema.Struct<{
|
|
705
|
+
readonly total: Schema.Finite;
|
|
706
|
+
readonly input: Schema.Finite;
|
|
707
|
+
readonly output: Schema.Finite;
|
|
708
|
+
readonly cacheRead: Schema.Finite;
|
|
709
|
+
readonly cacheWrite: Schema.Finite;
|
|
710
|
+
}>;
|
|
711
|
+
/** Total ms of the `timed` requests: the committed ones; aborted requests are never timed. */
|
|
712
|
+
readonly duration: Schema.Finite;
|
|
713
|
+
readonly timed: Schema.Int;
|
|
714
|
+
/** The `timed` requests per bucket of `edges`, one more than there are edges. */
|
|
715
|
+
readonly durations: Schema.$Array<Schema.Int>;
|
|
716
|
+
readonly rev: Schema.Int;
|
|
717
|
+
}>, Schema.TaggedStruct<"Tally", {
|
|
718
|
+
readonly hour: Schema.Int;
|
|
719
|
+
readonly threadId: Schema.brand<Schema.String, "Thread.ID"> & {
|
|
720
|
+
create: () => string & import("effect/Brand").Brand<"Thread.ID">;
|
|
721
|
+
};
|
|
722
|
+
readonly sessionId: Schema.brand<Schema.String, "Session.ID"> & {
|
|
723
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Session.ID">;
|
|
724
|
+
create: () => string & import("effect/Brand").Brand<"Session.ID">;
|
|
725
|
+
};
|
|
726
|
+
readonly projectId: Schema.String;
|
|
727
|
+
readonly kind: Schema.Literals<readonly ["prompt", "tool"]>;
|
|
728
|
+
readonly name: Schema.String;
|
|
729
|
+
readonly count: Schema.Int;
|
|
730
|
+
readonly rev: Schema.Int;
|
|
731
|
+
}>, Schema.TaggedStruct<"Synced", {
|
|
732
|
+
readonly storeId: Schema.String;
|
|
733
|
+
readonly rev: Schema.Int;
|
|
734
|
+
readonly boot: Schema.String;
|
|
735
|
+
readonly reset: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
736
|
+
}>]>;
|
|
737
|
+
export type UsageItem = typeof UsageItem.Type;
|
|
738
|
+
/** One message in a thread's line (inherited ones first), oldest first. */
|
|
739
|
+
export declare const HistoryEntry: Schema.Struct<{
|
|
740
|
+
/** The entry id: what live events and `thread.message` refer to. */
|
|
741
|
+
readonly id: Schema.String;
|
|
742
|
+
/** The thread that wrote it: this one, or a source it was forked from. */
|
|
743
|
+
readonly threadId: Schema.String;
|
|
744
|
+
/** Its place in the session's durable log; live events continue from it. */
|
|
745
|
+
readonly seq: Schema.Int;
|
|
746
|
+
readonly role: Schema.Literals<readonly ["user", "assistant"]>;
|
|
747
|
+
/** `draft` is a reply still streaming; `aborted` one that was interrupted. */
|
|
748
|
+
readonly state: Schema.Literals<readonly ["committed", "draft", "aborted"]>;
|
|
749
|
+
/** Epoch milliseconds. */
|
|
750
|
+
readonly createdAt: Schema.Finite;
|
|
751
|
+
/** Epoch milliseconds of the last change; for a reply, when it ended once it is no longer a draft. */
|
|
752
|
+
readonly updatedAt: Schema.Finite;
|
|
753
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
754
|
+
readonly type: Schema.Literal<"text">;
|
|
755
|
+
readonly text: Schema.String;
|
|
756
|
+
}>, Schema.Struct<{
|
|
757
|
+
readonly type: Schema.Literal<"image">;
|
|
758
|
+
readonly data: Schema.String;
|
|
759
|
+
readonly mimeType: Schema.String;
|
|
760
|
+
}>, Schema.Struct<{
|
|
761
|
+
readonly type: Schema.Literal<"thinking">;
|
|
762
|
+
readonly thinking: Schema.String;
|
|
763
|
+
readonly redacted: Schema.optionalKey<Schema.Boolean>;
|
|
764
|
+
}>, Schema.Struct<{
|
|
765
|
+
readonly type: Schema.Literal<"toolCall">;
|
|
766
|
+
readonly callID: Schema.String;
|
|
767
|
+
readonly name: Schema.String;
|
|
768
|
+
readonly arguments: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
769
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "completed", "error", "skipped", "aborted"]>;
|
|
770
|
+
readonly result: Schema.optionalKey<Schema.Struct<{
|
|
771
|
+
readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
772
|
+
readonly type: Schema.Literal<"text">;
|
|
773
|
+
readonly text: Schema.String;
|
|
774
|
+
}>, Schema.Struct<{
|
|
775
|
+
readonly type: Schema.Literal<"image">;
|
|
776
|
+
readonly data: Schema.String;
|
|
777
|
+
readonly mimeType: Schema.String;
|
|
778
|
+
}>]>>;
|
|
779
|
+
readonly isError: Schema.Boolean;
|
|
780
|
+
}>>;
|
|
781
|
+
readonly time: Schema.optionalKey<Schema.Struct<{
|
|
782
|
+
readonly start: Schema.Finite;
|
|
783
|
+
readonly end: Schema.Finite;
|
|
784
|
+
}>>;
|
|
785
|
+
}>]>>;
|
|
786
|
+
/** Bytes of its parts as the harness stores them; `thread.sync`'s budget counts it. */
|
|
787
|
+
readonly size: Schema.Int;
|
|
788
|
+
/** Why a reply failed, as `provider/model: reason`; absent for one that ended normally or was stopped. */
|
|
789
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
790
|
+
}>;
|
|
791
|
+
export type HistoryEntry = typeof HistoryEntry.Type;
|
|
792
|
+
/** A prompt admitted but not yet in the conversation: a steer waiting for the next model request, or a follow-up for the next turn. */
|
|
793
|
+
export declare const QueuedPrompt: Schema.Struct<{
|
|
794
|
+
/** The id of the user message it becomes once promoted. */
|
|
795
|
+
readonly id: Schema.String;
|
|
796
|
+
readonly delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
797
|
+
readonly text: Schema.String;
|
|
798
|
+
/** The thread's sequence number at admission; orders the queue. */
|
|
799
|
+
readonly admittedSeq: Schema.Int;
|
|
800
|
+
/** Epoch milliseconds. */
|
|
801
|
+
readonly createdAt: Schema.Finite;
|
|
802
|
+
}>;
|
|
803
|
+
export type QueuedPrompt = typeof QueuedPrompt.Type;
|
|
804
|
+
/** Text streamed into a reply's part since its last checkpoint; never stored. */
|
|
805
|
+
export declare const LiveDelta: Schema.Struct<{
|
|
806
|
+
/** The reply's entry id. */
|
|
807
|
+
readonly entryId: Schema.String;
|
|
808
|
+
readonly partIndex: Schema.Int;
|
|
809
|
+
readonly kind: Schema.Literals<readonly ["text", "thinking"]>;
|
|
810
|
+
/** The part's text length before this delta: apply it only where the held text ends there. */
|
|
811
|
+
readonly offset: Schema.Int;
|
|
812
|
+
readonly delta: Schema.String;
|
|
813
|
+
}>;
|
|
814
|
+
export type LiveDelta = typeof LiveDelta.Type;
|
|
815
|
+
/** A `thread.sync` item: a row with the revision that last wrote it, progress, or a live delta. */
|
|
816
|
+
export declare const ThreadItem: Schema.Union<readonly [Schema.TaggedStruct<"Entry", {
|
|
817
|
+
readonly entry: Schema.Struct<{
|
|
818
|
+
/** The entry id: what live events and `thread.message` refer to. */
|
|
819
|
+
readonly id: Schema.String;
|
|
820
|
+
/** The thread that wrote it: this one, or a source it was forked from. */
|
|
821
|
+
readonly threadId: Schema.String;
|
|
822
|
+
/** Its place in the session's durable log; live events continue from it. */
|
|
823
|
+
readonly seq: Schema.Int;
|
|
824
|
+
readonly role: Schema.Literals<readonly ["user", "assistant"]>;
|
|
825
|
+
/** `draft` is a reply still streaming; `aborted` one that was interrupted. */
|
|
826
|
+
readonly state: Schema.Literals<readonly ["committed", "draft", "aborted"]>;
|
|
827
|
+
/** Epoch milliseconds. */
|
|
828
|
+
readonly createdAt: Schema.Finite;
|
|
829
|
+
/** Epoch milliseconds of the last change; for a reply, when it ended once it is no longer a draft. */
|
|
830
|
+
readonly updatedAt: Schema.Finite;
|
|
831
|
+
readonly parts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
832
|
+
readonly type: Schema.Literal<"text">;
|
|
833
|
+
readonly text: Schema.String;
|
|
834
|
+
}>, Schema.Struct<{
|
|
835
|
+
readonly type: Schema.Literal<"image">;
|
|
836
|
+
readonly data: Schema.String;
|
|
837
|
+
readonly mimeType: Schema.String;
|
|
838
|
+
}>, Schema.Struct<{
|
|
839
|
+
readonly type: Schema.Literal<"thinking">;
|
|
840
|
+
readonly thinking: Schema.String;
|
|
841
|
+
readonly redacted: Schema.optionalKey<Schema.Boolean>;
|
|
842
|
+
}>, Schema.Struct<{
|
|
843
|
+
readonly type: Schema.Literal<"toolCall">;
|
|
844
|
+
readonly callID: Schema.String;
|
|
845
|
+
readonly name: Schema.String;
|
|
846
|
+
readonly arguments: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
847
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "completed", "error", "skipped", "aborted"]>;
|
|
848
|
+
readonly result: Schema.optionalKey<Schema.Struct<{
|
|
849
|
+
readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
850
|
+
readonly type: Schema.Literal<"text">;
|
|
851
|
+
readonly text: Schema.String;
|
|
852
|
+
}>, Schema.Struct<{
|
|
853
|
+
readonly type: Schema.Literal<"image">;
|
|
854
|
+
readonly data: Schema.String;
|
|
855
|
+
readonly mimeType: Schema.String;
|
|
856
|
+
}>]>>;
|
|
857
|
+
readonly isError: Schema.Boolean;
|
|
858
|
+
}>>;
|
|
859
|
+
readonly time: Schema.optionalKey<Schema.Struct<{
|
|
860
|
+
readonly start: Schema.Finite;
|
|
861
|
+
readonly end: Schema.Finite;
|
|
862
|
+
}>>;
|
|
863
|
+
}>]>>;
|
|
864
|
+
/** Bytes of its parts as the harness stores them; `thread.sync`'s budget counts it. */
|
|
865
|
+
readonly size: Schema.Int;
|
|
866
|
+
/** Why a reply failed, as `provider/model: reason`; absent for one that ended normally or was stopped. */
|
|
867
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
868
|
+
}>;
|
|
869
|
+
readonly rev: Schema.Int;
|
|
870
|
+
}>, Schema.TaggedStruct<"Inbox", {
|
|
871
|
+
readonly prompt: Schema.Struct<{
|
|
872
|
+
/** The id of the user message it becomes once promoted. */
|
|
873
|
+
readonly id: Schema.String;
|
|
874
|
+
readonly delivery: Schema.Literals<readonly ["steer", "followUp"]>;
|
|
875
|
+
readonly text: Schema.String;
|
|
876
|
+
/** The thread's sequence number at admission; orders the queue. */
|
|
877
|
+
readonly admittedSeq: Schema.Int;
|
|
878
|
+
/** Epoch milliseconds. */
|
|
879
|
+
readonly createdAt: Schema.Finite;
|
|
880
|
+
}>;
|
|
881
|
+
readonly state: Schema.Literals<readonly ["pending", "promoted", "cancelled"]>;
|
|
882
|
+
readonly rev: Schema.Int;
|
|
883
|
+
}>, Schema.TaggedStruct<"Synced", {
|
|
884
|
+
readonly storeId: Schema.String;
|
|
885
|
+
readonly rev: Schema.Int;
|
|
886
|
+
readonly floor: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
887
|
+
}>, Schema.TaggedStruct<"Delta", {
|
|
888
|
+
readonly delta: Schema.Struct<{
|
|
889
|
+
/** The reply's entry id. */
|
|
890
|
+
readonly entryId: Schema.String;
|
|
891
|
+
readonly partIndex: Schema.Int;
|
|
892
|
+
readonly kind: Schema.Literals<readonly ["text", "thinking"]>;
|
|
893
|
+
/** The part's text length before this delta: apply it only where the held text ends there. */
|
|
894
|
+
readonly offset: Schema.Int;
|
|
895
|
+
readonly delta: Schema.String;
|
|
896
|
+
}>;
|
|
897
|
+
}>]>;
|
|
898
|
+
export type ThreadItem = typeof ThreadItem.Type;
|
|
899
|
+
/** Ends `session.log`'s replay; `seq` is absent when the session has no durable events yet. */
|
|
900
|
+
export declare const LogSynced: Schema.Struct<{
|
|
901
|
+
readonly type: Schema.Literal<"log.synced">;
|
|
902
|
+
/** The session the log was read for. */
|
|
903
|
+
readonly aggregateId: Schema.String;
|
|
904
|
+
readonly seq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
905
|
+
}>;
|
|
906
|
+
export type LogSynced = typeof LogSynced.Type;
|
|
907
|
+
/** A thread's model, thinking and foundation choices: a given field replaces the stored one, `null` clears it. */
|
|
908
|
+
export declare const RuntimeConfig: Schema.Struct<{
|
|
909
|
+
readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.NullOr<Schema.Struct<{
|
|
910
|
+
readonly provider: Schema.String;
|
|
911
|
+
readonly id: Schema.String;
|
|
912
|
+
}>>>>, Schema.optionalKey<Schema.NullOr<Schema.Struct<{
|
|
913
|
+
readonly provider: Schema.String;
|
|
914
|
+
readonly id: Schema.String;
|
|
915
|
+
}>>>, never, never>;
|
|
916
|
+
readonly thinkingLevel: Schema.decodeTo<Schema.optional<Schema.toType<Schema.NullOr<Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>>>, Schema.optionalKey<Schema.NullOr<Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>>, never, never>;
|
|
917
|
+
readonly foundation: Schema.decodeTo<Schema.optional<Schema.toType<Schema.NullOr<Schema.NonEmptyString>>>, Schema.optionalKey<Schema.NullOr<Schema.NonEmptyString>>, never, never>;
|
|
918
|
+
}>;
|
|
919
|
+
export type RuntimeConfig = typeof RuntimeConfig.Type;
|
|
920
|
+
/** A provider this server can call, with the models a session may use from it. */
|
|
921
|
+
export declare const ModelProvider: Schema.Struct<{
|
|
922
|
+
readonly id: Schema.String;
|
|
923
|
+
readonly name: Schema.String;
|
|
924
|
+
readonly models: Schema.$Array<Schema.Struct<{
|
|
925
|
+
readonly id: Schema.String;
|
|
926
|
+
readonly name: Schema.String;
|
|
927
|
+
/** In ascending order; `["off"]` for a model that does not reason. */
|
|
928
|
+
readonly thinkingLevels: Schema.$Array<Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>;
|
|
929
|
+
}>>;
|
|
930
|
+
}>;
|
|
931
|
+
export type ModelProvider = typeof ModelProvider.Type;
|
|
932
|
+
/** What `model.list` answers. */
|
|
933
|
+
export declare const ModelList: Schema.Struct<{
|
|
934
|
+
readonly providers: Schema.$Array<Schema.Struct<{
|
|
935
|
+
readonly id: Schema.String;
|
|
936
|
+
readonly name: Schema.String;
|
|
937
|
+
readonly models: Schema.$Array<Schema.Struct<{
|
|
938
|
+
readonly id: Schema.String;
|
|
939
|
+
readonly name: Schema.String;
|
|
940
|
+
/** In ascending order; `["off"]` for a model that does not reason. */
|
|
941
|
+
readonly thinkingLevels: Schema.$Array<Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>;
|
|
942
|
+
}>>;
|
|
943
|
+
}>>;
|
|
944
|
+
readonly default: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
945
|
+
readonly provider: Schema.String;
|
|
946
|
+
readonly id: Schema.String;
|
|
947
|
+
/** As settings name it; a run clamps it to what the model supports. */
|
|
948
|
+
readonly thinkingLevel: Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
949
|
+
/** Display names from the catalog, present even when its provider is not listed. */
|
|
950
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
951
|
+
readonly providerName: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
952
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
953
|
+
readonly provider: Schema.String;
|
|
954
|
+
readonly id: Schema.String;
|
|
955
|
+
/** As settings name it; a run clamps it to what the model supports. */
|
|
956
|
+
readonly thinkingLevel: Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
957
|
+
/** Display names from the catalog, present even when its provider is not listed. */
|
|
958
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
959
|
+
readonly providerName: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
960
|
+
}>>, never, never>;
|
|
961
|
+
}>;
|
|
962
|
+
export type ModelList = typeof ModelList.Type;
|
|
963
|
+
declare const OAuthError_base: Schema.Class<OAuthError, Schema.TaggedStruct<"Server.OAuthError", {
|
|
964
|
+
readonly message: Schema.String;
|
|
965
|
+
}>, import("effect/Cause").YieldableError>;
|
|
966
|
+
export declare class OAuthError extends OAuthError_base {}
|
|
967
|
+
/** OAuth providers whose credentials this server stores. */
|
|
968
|
+
export declare const OAuthProvider: Schema.Literals<readonly ["openai-codex", "github-copilot"]>;
|
|
969
|
+
export type OAuthProvider = typeof OAuthProvider.Type;
|
|
970
|
+
/**
|
|
971
|
+
* Credentials as the provider's aikit module persists them. The union is
|
|
972
|
+
* discriminated by `provider` so one set of RPCs serves every login.
|
|
973
|
+
*/
|
|
974
|
+
export declare const OAuthCredentials: Schema.Union<readonly [Schema.Struct<{
|
|
975
|
+
readonly provider: Schema.Literal<"openai-codex">;
|
|
976
|
+
readonly access: Schema.String;
|
|
977
|
+
readonly refresh: Schema.String;
|
|
978
|
+
readonly expires: Schema.Finite;
|
|
979
|
+
readonly accountId: Schema.String;
|
|
980
|
+
}>, Schema.Struct<{
|
|
981
|
+
readonly provider: Schema.Literal<"github-copilot">;
|
|
982
|
+
readonly access: Schema.String;
|
|
983
|
+
readonly refresh: Schema.String;
|
|
984
|
+
readonly expires: Schema.Finite;
|
|
985
|
+
readonly enterpriseUrl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
986
|
+
readonly apiEndpoint: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
987
|
+
readonly availableModelIds: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
988
|
+
}>]>;
|
|
989
|
+
export type OAuthCredentials = typeof OAuthCredentials.Type;
|
|
990
|
+
/** What a login looks like from the outside: never the tokens themselves. */
|
|
991
|
+
export declare const OAuthInfo: Schema.Struct<{
|
|
992
|
+
readonly provider: Schema.Literals<readonly ["openai-codex", "github-copilot"]>;
|
|
993
|
+
/** Epoch millis, or 0 for a credential that does not expire. */
|
|
994
|
+
readonly expires: Schema.Finite;
|
|
995
|
+
readonly accountId: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
996
|
+
readonly apiEndpoint: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
997
|
+
readonly enterpriseUrl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
998
|
+
readonly availableModels: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
999
|
+
}>;
|
|
1000
|
+
export type OAuthInfo = typeof OAuthInfo.Type;
|
|
1001
|
+
declare const HostError_base: Schema.Class<HostError, Schema.TaggedStruct<"Server.HostError", {
|
|
1002
|
+
readonly message: Schema.String;
|
|
1003
|
+
readonly reason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["missing", "file"]>>>, Schema.optionalKey<Schema.Literals<readonly ["missing", "file"]>>, never, never>;
|
|
1004
|
+
}>, import("effect/Cause").YieldableError>;
|
|
1005
|
+
/**
|
|
1006
|
+
* A host folder operation that failed: unreadable, not a directory, taken, or git/gh refused. `reason`
|
|
1007
|
+
* names a path that is not there, or is a file, so a client can offer to create it only when it is missing.
|
|
1008
|
+
*/
|
|
1009
|
+
export declare class HostError extends HostError_base {}
|
|
1010
|
+
/** A directory on the host, by its name and absolute path. */
|
|
1011
|
+
export declare const Folder: Schema.Struct<{
|
|
1012
|
+
readonly name: Schema.String;
|
|
1013
|
+
readonly path: Schema.String;
|
|
1014
|
+
}>;
|
|
1015
|
+
export type Folder = typeof Folder.Type;
|
|
1016
|
+
/** A GitHub repository as `gh` names it, with its web and SSH clone URLs. */
|
|
1017
|
+
export declare const Repository: Schema.Struct<{
|
|
1018
|
+
readonly nameWithOwner: Schema.String;
|
|
1019
|
+
readonly url: Schema.String;
|
|
1020
|
+
readonly sshUrl: Schema.String;
|
|
1021
|
+
}>;
|
|
1022
|
+
export type Repository = typeof Repository.Type;
|
|
1023
|
+
export declare const CloneStage: Schema.Literals<readonly ["connecting", "counting", "receiving", "resolving", "checkout"]>;
|
|
1024
|
+
export type CloneStage = typeof CloneStage.Type;
|
|
1025
|
+
export declare const ClonePhase: Schema.Literals<readonly ["running", "done", "failed", "cancelled"]>;
|
|
1026
|
+
export type ClonePhase = typeof ClonePhase.Type;
|
|
1027
|
+
/** A tracked clone; `path` (the absolute destination) is its id. */
|
|
1028
|
+
export declare const Clone: Schema.Struct<{
|
|
1029
|
+
readonly path: Schema.String;
|
|
1030
|
+
/** Credentials and query stripped. */
|
|
1031
|
+
readonly remote: Schema.String;
|
|
1032
|
+
readonly phase: Schema.Literals<readonly ["running", "done", "failed", "cancelled"]>;
|
|
1033
|
+
readonly stage: Schema.Literals<readonly ["connecting", "counting", "receiving", "resolving", "checkout"]>;
|
|
1034
|
+
/** 0 to 100 within `stage`, when git prints one. */
|
|
1035
|
+
readonly percent: Schema.NullOr<Schema.Int>;
|
|
1036
|
+
/** Git's transfer note, such as its speed; at most 200 characters. */
|
|
1037
|
+
readonly detail: Schema.NullOr<Schema.String>;
|
|
1038
|
+
/** Git has printed no progress for 20 seconds. */
|
|
1039
|
+
readonly stalled: Schema.Boolean;
|
|
1040
|
+
/** Why it failed; at most 1000 characters. */
|
|
1041
|
+
readonly error: Schema.NullOr<Schema.String>;
|
|
1042
|
+
/** Epoch milliseconds. */
|
|
1043
|
+
readonly startedAt: Schema.Finite;
|
|
1044
|
+
readonly endedAt: Schema.NullOr<Schema.Finite>;
|
|
1045
|
+
/** Bumped on every change across all clones; a higher one is newer. */
|
|
1046
|
+
readonly sequence: Schema.Int;
|
|
1047
|
+
}>;
|
|
1048
|
+
export type Clone = typeof Clone.Type;
|
|
1049
|
+
//#endregion
|
|
1050
|
+
export { Delivery, records_d_exports as HostRecords, Part, RunError, RunOutcome, RunState, ThinkingLevel, ToolCall, edges };
|
|
1051
|
+
//# sourceMappingURL=records.d.mts.map
|