@alineo-labs/schema 0.0.0-stage → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +126 -3
- package/dist/agent-spec-BiNRKcYr.mjs +1190 -0
- package/dist/agent-spec-C7UBd_R2.d.mts +576 -0
- package/dist/alineod.d.mts +670 -0
- package/dist/alineod.mjs +310 -0
- package/dist/index-BnrIUYdM.d.mts +507 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +185 -0
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +1 -0
- package/package.json +47 -4
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import { t as AgentSpec, v as LedgerEnvelope } from "./agent-spec-C7UBd_R2.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/define.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* One definition per event, consumed three ways: the writer reads `durable` to decide whether
|
|
6
|
+
* to persist, the reader reads `schema` to validate, and the vocabulary check reads `type`.
|
|
7
|
+
*
|
|
8
|
+
* Replaces the hardcoded `PERSISTED_HARNESS_EVENTS` Set in alineod's `emit.ts` — the
|
|
9
|
+
* durable/stream-only split becomes a property of the event instead of a list kept in step by
|
|
10
|
+
* hand somewhere else.
|
|
11
|
+
*/
|
|
12
|
+
interface EventDefinition<T extends string = string, S extends z.ZodType = z.ZodType> {
|
|
13
|
+
/** `<subject>.<past-tense verb>`. */
|
|
14
|
+
type: T;
|
|
15
|
+
/**
|
|
16
|
+
* Whether this event earns a row.
|
|
17
|
+
*
|
|
18
|
+
* Durable: decisions, lifecycle, turn boundaries, tool calls, and permission/egress/
|
|
19
|
+
* credential facts — anything a projection folds or an audit needs.
|
|
20
|
+
* Stream-only: text and message deltas, exec output chunks — high-volume, replaceable by
|
|
21
|
+
* the durable event that follows, and not worth the write.
|
|
22
|
+
*/
|
|
23
|
+
durable: boolean;
|
|
24
|
+
/** Version of `data`'s shape. Stamped onto `durable.version` when persisted. */
|
|
25
|
+
version: number;
|
|
26
|
+
schema: S;
|
|
27
|
+
/** One line, for generated docs and for a reader meeting the name cold. */
|
|
28
|
+
description?: string;
|
|
29
|
+
}
|
|
30
|
+
/** The `data` a definition carries. */
|
|
31
|
+
type EventData<D> = D extends EventDefinition<string, infer S> ? z.infer<S> : never;
|
|
32
|
+
/** The envelope a definition produces. */
|
|
33
|
+
type EnvelopeOf<D> = D extends EventDefinition<infer T, infer S> ? LedgerEnvelope<T, z.infer<S>> : never;
|
|
34
|
+
declare function defineEvent<const T extends string, S extends z.ZodType>(definition: EventDefinition<T, S>): EventDefinition<T, S>;
|
|
35
|
+
/** Every registered definition. Order is definition order, which is file order. */
|
|
36
|
+
declare function allEvents(): EventDefinition[];
|
|
37
|
+
declare function getEvent(type: string): EventDefinition | undefined;
|
|
38
|
+
/** The subset that earns a ledger row. */
|
|
39
|
+
declare function durableEvents(): EventDefinition[];
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/resource-ref.d.ts
|
|
42
|
+
/**
|
|
43
|
+
* The durable identity an agent's memory is scoped by — `resourceId`, defaulting to `name`,
|
|
44
|
+
* plus the optional `teamId`.
|
|
45
|
+
*
|
|
46
|
+
* This is the one place the rule lives. The SDK (`Alineo.resourceId`, a spawned child's frozen
|
|
47
|
+
* `resourceId`, the ledger's `resourceId` threading) and alineod (which resolves an agent's
|
|
48
|
+
* memory scope from its persisted spec, with no live `Alineo` to ask) both call it, so a change
|
|
49
|
+
* to the rule cannot leave one of them scoping memory differently from the other.
|
|
50
|
+
*
|
|
51
|
+
* `resourceId` is `??`, not `||`: an explicitly set value wins even when it is falsy, exactly as
|
|
52
|
+
* it did when this was written inline.
|
|
53
|
+
*/
|
|
54
|
+
declare function resourceRefOf(spec: Pick<AgentSpec, "name" | "resourceId" | "teamId">): {
|
|
55
|
+
resourceId: string;
|
|
56
|
+
teamId?: string;
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/project.d.ts
|
|
60
|
+
declare const ProjectConfigObject: z.ZodObject<{
|
|
61
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
62
|
+
serverUrl: z.ZodDefault<z.ZodString>;
|
|
63
|
+
apiKey: z.ZodDefault<z.ZodString>;
|
|
64
|
+
useServerProxy: z.ZodDefault<z.ZodBoolean>;
|
|
65
|
+
adapterPath: z.ZodDefault<z.ZodString>;
|
|
66
|
+
agentsDir: z.ZodDefault<z.ZodString>;
|
|
67
|
+
defaults: z.ZodPrefault<z.ZodObject<{
|
|
68
|
+
resources: z.ZodPrefault<z.ZodObject<{
|
|
69
|
+
cpu: z.ZodDefault<z.ZodString>;
|
|
70
|
+
memory: z.ZodDefault<z.ZodString>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
/** The project config schema, with nulls treated as absent. */
|
|
75
|
+
declare const ProjectConfigSchema: z.ZodPreprocess<z.ZodObject<{
|
|
76
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
77
|
+
serverUrl: z.ZodDefault<z.ZodString>;
|
|
78
|
+
apiKey: z.ZodDefault<z.ZodString>;
|
|
79
|
+
useServerProxy: z.ZodDefault<z.ZodBoolean>;
|
|
80
|
+
adapterPath: z.ZodDefault<z.ZodString>;
|
|
81
|
+
agentsDir: z.ZodDefault<z.ZodString>;
|
|
82
|
+
defaults: z.ZodPrefault<z.ZodObject<{
|
|
83
|
+
resources: z.ZodPrefault<z.ZodObject<{
|
|
84
|
+
cpu: z.ZodDefault<z.ZodString>;
|
|
85
|
+
memory: z.ZodDefault<z.ZodString>;
|
|
86
|
+
}, z.core.$strip>>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
88
|
+
}, z.core.$strip>>;
|
|
89
|
+
/** The underlying object schema, for JSON Schema emit (preprocess has no JSON Schema form). */
|
|
90
|
+
declare const ProjectConfigObjectSchema: z.ZodObject<{
|
|
91
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
92
|
+
serverUrl: z.ZodDefault<z.ZodString>;
|
|
93
|
+
apiKey: z.ZodDefault<z.ZodString>;
|
|
94
|
+
useServerProxy: z.ZodDefault<z.ZodBoolean>;
|
|
95
|
+
adapterPath: z.ZodDefault<z.ZodString>;
|
|
96
|
+
agentsDir: z.ZodDefault<z.ZodString>;
|
|
97
|
+
defaults: z.ZodPrefault<z.ZodObject<{
|
|
98
|
+
resources: z.ZodPrefault<z.ZodObject<{
|
|
99
|
+
cpu: z.ZodDefault<z.ZodString>;
|
|
100
|
+
memory: z.ZodDefault<z.ZodString>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
}, z.core.$strip>>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
type ProjectConfig = z.infer<typeof ProjectConfigObject>;
|
|
105
|
+
/** `$schema` URL written into a generated `alineo.config.json`. */
|
|
106
|
+
declare const PROJECT_CONFIG_SCHEMA_URL = "https://alineo.tech/schema/alineo.config.json";
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/renames.d.ts
|
|
109
|
+
/**
|
|
110
|
+
* The old flat event names, and what each became.
|
|
111
|
+
*
|
|
112
|
+
* This table is **dated and deletable**, not a standing feature. An earlier draft carried a
|
|
113
|
+
* `legacy` field on every definition so both names kept being written forever; that was
|
|
114
|
+
* dropped because a permanent two-names-per-event alias costs more than the break. The
|
|
115
|
+
* mapping survives here only because three stores hold old names in an `event` column and
|
|
116
|
+
* need a one-time migration — once no deployed database predates the rename, this file goes.
|
|
117
|
+
*
|
|
118
|
+
* Nothing reads it at runtime on the hot path. Its consumers are the store migrations and
|
|
119
|
+
* the test that proves every old name maps to a registered event.
|
|
120
|
+
*/
|
|
121
|
+
declare const RENAMED_EVENTS: Readonly<Record<string, string>>;
|
|
122
|
+
/**
|
|
123
|
+
* The new name for an old one, or `undefined` if the name was never renamed.
|
|
124
|
+
*
|
|
125
|
+
* `run_started` returns `undefined` on purpose — it is the one name that meant two different
|
|
126
|
+
* events, so the caller's own context decides.
|
|
127
|
+
*/
|
|
128
|
+
declare function renamedEventType(old: string): string | undefined;
|
|
129
|
+
declare namespace sandbox_d_exports {
|
|
130
|
+
export { CredentialBound, CredentialRevoked, EgressRuleAdded, EgressRuleRemoved, ExecCompleted, ExecOutput, ExecStarted, SandboxCheckpointCreated, SandboxClosed, SandboxCreated, SandboxPaused, SandboxResumed };
|
|
131
|
+
}
|
|
132
|
+
declare const SandboxCreated: EventDefinition<"sandbox.created", z.ZodObject<{
|
|
133
|
+
sandboxId: z.ZodString;
|
|
134
|
+
name: z.ZodString;
|
|
135
|
+
runId: z.ZodString;
|
|
136
|
+
resourceId: z.ZodOptional<z.ZodString>;
|
|
137
|
+
teamId: z.ZodOptional<z.ZodString>;
|
|
138
|
+
parentSandboxId: z.ZodOptional<z.ZodString>;
|
|
139
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
140
|
+
}, z.core.$strip>>;
|
|
141
|
+
declare const SandboxClosed: EventDefinition<"sandbox.closed", z.ZodObject<{
|
|
142
|
+
sandboxId: z.ZodString;
|
|
143
|
+
}, z.core.$strip>>;
|
|
144
|
+
declare const SandboxPaused: EventDefinition<"sandbox.paused", z.ZodObject<{
|
|
145
|
+
sandboxId: z.ZodString;
|
|
146
|
+
}, z.core.$strip>>;
|
|
147
|
+
declare const SandboxResumed: EventDefinition<"sandbox.resumed", z.ZodObject<{
|
|
148
|
+
sandboxId: z.ZodString;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
declare const SandboxCheckpointCreated: EventDefinition<"sandbox.checkpoint_created", z.ZodObject<{
|
|
151
|
+
snapshotId: z.ZodString;
|
|
152
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
declare const ExecStarted: EventDefinition<"exec.started", z.ZodObject<{
|
|
155
|
+
command: z.ZodOptional<z.ZodString>;
|
|
156
|
+
code: z.ZodOptional<z.ZodString>;
|
|
157
|
+
}, z.core.$strip>>;
|
|
158
|
+
declare const ExecOutput: EventDefinition<"exec.output", z.ZodObject<{
|
|
159
|
+
stream: z.ZodOptional<z.ZodEnum<{
|
|
160
|
+
stdout: "stdout";
|
|
161
|
+
stderr: "stderr";
|
|
162
|
+
}>>;
|
|
163
|
+
text: z.ZodString;
|
|
164
|
+
}, z.core.$strip>>;
|
|
165
|
+
declare const ExecCompleted: EventDefinition<"exec.completed", z.ZodObject<{
|
|
166
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
stdout: z.ZodOptional<z.ZodString>;
|
|
168
|
+
stderr: z.ZodOptional<z.ZodString>;
|
|
169
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
killed: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
signal: z.ZodOptional<z.ZodString>;
|
|
172
|
+
timedOut: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
declare const EgressRuleAdded: EventDefinition<"egress.rule_added", z.ZodObject<{
|
|
175
|
+
rules: z.ZodArray<z.ZodUnknown>;
|
|
176
|
+
}, z.core.$strip>>;
|
|
177
|
+
declare const EgressRuleRemoved: EventDefinition<"egress.rule_removed", z.ZodObject<{
|
|
178
|
+
targets: z.ZodArray<z.ZodString>;
|
|
179
|
+
}, z.core.$strip>>;
|
|
180
|
+
declare const CredentialBound: EventDefinition<"credential.bound", z.ZodObject<{
|
|
181
|
+
name: z.ZodString;
|
|
182
|
+
host: z.ZodOptional<z.ZodString>;
|
|
183
|
+
injection: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, z.core.$strip>>;
|
|
185
|
+
declare const CredentialRevoked: EventDefinition<"credential.revoked", z.ZodObject<{
|
|
186
|
+
name: z.ZodString;
|
|
187
|
+
}, z.core.$strip>>;
|
|
188
|
+
declare namespace agent_d_exports {
|
|
189
|
+
export { AgentCheckpointed, PermissionRequested, PermissionResolved };
|
|
190
|
+
}
|
|
191
|
+
declare const PermissionRequested: EventDefinition<"permission.requested", z.ZodObject<{
|
|
192
|
+
requestId: z.ZodString;
|
|
193
|
+
tool: z.ZodString;
|
|
194
|
+
target: z.ZodString;
|
|
195
|
+
title: z.ZodOptional<z.ZodString>;
|
|
196
|
+
}, z.core.$strip>>;
|
|
197
|
+
declare const PermissionResolved: EventDefinition<"permission.resolved", z.ZodObject<{
|
|
198
|
+
requestId: z.ZodString;
|
|
199
|
+
decision: z.ZodString;
|
|
200
|
+
}, z.core.$strip>>;
|
|
201
|
+
declare const AgentCheckpointed: EventDefinition<"agent.checkpointed", z.ZodObject<{
|
|
202
|
+
turn: z.ZodNumber;
|
|
203
|
+
snapshotRef: z.ZodString;
|
|
204
|
+
remoteRef: z.ZodOptional<z.ZodString>;
|
|
205
|
+
uploadError: z.ZodOptional<z.ZodString>;
|
|
206
|
+
}, z.core.$strip>>;
|
|
207
|
+
declare namespace harness_d_exports {
|
|
208
|
+
export { CompactionEnded, CompactionStarted, ExtensionError, ExtensionUi, MessageEnded, MessageStarted, MessageUpdated, QueueUpdated, RetryEnded, RetryStarted, SessionEnded, SessionStarted, ToolEnded, ToolStarted, ToolUpdated, TurnEnded, TurnStarted };
|
|
209
|
+
}
|
|
210
|
+
declare const SessionStarted: EventDefinition<"session.started", z.ZodObject<{}, z.core.$strip>>;
|
|
211
|
+
declare const SessionEnded: EventDefinition<"session.ended", z.ZodObject<{
|
|
212
|
+
messages: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
213
|
+
}, z.core.$strip>>;
|
|
214
|
+
declare const TurnStarted: EventDefinition<"turn.started", z.ZodObject<{
|
|
215
|
+
turnIndex: z.ZodNumber;
|
|
216
|
+
timestamp: z.ZodNumber;
|
|
217
|
+
}, z.core.$strip>>;
|
|
218
|
+
declare const TurnEnded: EventDefinition<"turn.ended", z.ZodObject<{
|
|
219
|
+
turnIndex: z.ZodNumber;
|
|
220
|
+
message: z.ZodOptional<z.ZodUnknown>;
|
|
221
|
+
toolResults: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
222
|
+
}, z.core.$strip>>;
|
|
223
|
+
declare const ToolStarted: EventDefinition<"tool.started", z.ZodObject<{
|
|
224
|
+
toolCallId: z.ZodString;
|
|
225
|
+
toolName: z.ZodString;
|
|
226
|
+
args: z.ZodUnknown;
|
|
227
|
+
}, z.core.$strip>>;
|
|
228
|
+
declare const ToolUpdated: EventDefinition<"tool.updated", z.ZodObject<{
|
|
229
|
+
toolCallId: z.ZodString;
|
|
230
|
+
toolName: z.ZodString;
|
|
231
|
+
partialResult: z.ZodUnknown;
|
|
232
|
+
}, z.core.$strip>>;
|
|
233
|
+
declare const ToolEnded: EventDefinition<"tool.ended", z.ZodObject<{
|
|
234
|
+
toolCallId: z.ZodString;
|
|
235
|
+
toolName: z.ZodString;
|
|
236
|
+
result: z.ZodUnknown;
|
|
237
|
+
isError: z.ZodBoolean;
|
|
238
|
+
}, z.core.$strip>>;
|
|
239
|
+
declare const MessageStarted: EventDefinition<"message.started", z.ZodObject<{
|
|
240
|
+
message: z.ZodUnknown;
|
|
241
|
+
}, z.core.$strip>>;
|
|
242
|
+
declare const MessageUpdated: EventDefinition<"message.updated", z.ZodObject<{
|
|
243
|
+
message: z.ZodOptional<z.ZodUnknown>;
|
|
244
|
+
delta: z.ZodOptional<z.ZodUnknown>;
|
|
245
|
+
text: z.ZodOptional<z.ZodString>;
|
|
246
|
+
}, z.core.$strip>>;
|
|
247
|
+
declare const MessageEnded: EventDefinition<"message.ended", z.ZodObject<{
|
|
248
|
+
message: z.ZodUnknown;
|
|
249
|
+
}, z.core.$strip>>;
|
|
250
|
+
declare const CompactionStarted: EventDefinition<"compaction.started", z.ZodObject<{
|
|
251
|
+
reason: z.ZodEnum<{
|
|
252
|
+
manual: "manual";
|
|
253
|
+
threshold: "threshold";
|
|
254
|
+
overflow: "overflow";
|
|
255
|
+
}>;
|
|
256
|
+
}, z.core.$strip>>;
|
|
257
|
+
declare const CompactionEnded: EventDefinition<"compaction.ended", z.ZodObject<{
|
|
258
|
+
reason: z.ZodEnum<{
|
|
259
|
+
manual: "manual";
|
|
260
|
+
threshold: "threshold";
|
|
261
|
+
overflow: "overflow";
|
|
262
|
+
}>;
|
|
263
|
+
result: z.ZodNullable<z.ZodObject<{
|
|
264
|
+
summary: z.ZodString;
|
|
265
|
+
firstKeptEntryId: z.ZodString;
|
|
266
|
+
tokensBefore: z.ZodNumber;
|
|
267
|
+
estimatedTokensAfter: z.ZodNumber;
|
|
268
|
+
details: z.ZodUnknown;
|
|
269
|
+
}, z.core.$strip>>;
|
|
270
|
+
aborted: z.ZodBoolean;
|
|
271
|
+
willRetry: z.ZodBoolean;
|
|
272
|
+
}, z.core.$strip>>;
|
|
273
|
+
declare const RetryStarted: EventDefinition<"retry.started", z.ZodObject<{
|
|
274
|
+
attempt: z.ZodNumber;
|
|
275
|
+
maxAttempts: z.ZodNumber;
|
|
276
|
+
delayMs: z.ZodNumber;
|
|
277
|
+
errorMessage: z.ZodString;
|
|
278
|
+
}, z.core.$strip>>;
|
|
279
|
+
declare const RetryEnded: EventDefinition<"retry.ended", z.ZodObject<{
|
|
280
|
+
success: z.ZodBoolean;
|
|
281
|
+
attempt: z.ZodNumber;
|
|
282
|
+
finalError: z.ZodOptional<z.ZodString>;
|
|
283
|
+
}, z.core.$strip>>;
|
|
284
|
+
declare const QueueUpdated: EventDefinition<"queue.updated", z.ZodObject<{
|
|
285
|
+
steering: z.ZodArray<z.ZodString>;
|
|
286
|
+
followUp: z.ZodArray<z.ZodString>;
|
|
287
|
+
}, z.core.$strip>>;
|
|
288
|
+
declare const ExtensionUi: EventDefinition<"extension.ui", z.ZodObject<{
|
|
289
|
+
method: z.ZodString;
|
|
290
|
+
params: z.ZodUnknown;
|
|
291
|
+
isDialog: z.ZodBoolean;
|
|
292
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
293
|
+
}, z.core.$strip>>;
|
|
294
|
+
declare const ExtensionError: EventDefinition<"extension.error", z.ZodObject<{
|
|
295
|
+
extensionPath: z.ZodString;
|
|
296
|
+
event: z.ZodString;
|
|
297
|
+
error: z.ZodString;
|
|
298
|
+
}, z.core.$strip>>;
|
|
299
|
+
declare namespace workflow_d_exports {
|
|
300
|
+
export { StepCompleted, StepFailed, StepRolledBack, StepStarted, WorkflowCompleted, WorkflowFailed, WorkflowStarted };
|
|
301
|
+
}
|
|
302
|
+
declare const WorkflowStarted: EventDefinition<"workflow.started", z.ZodObject<{
|
|
303
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
304
|
+
}, z.core.$strip>>;
|
|
305
|
+
declare const WorkflowCompleted: EventDefinition<"workflow.completed", z.ZodObject<{}, z.core.$strip>>;
|
|
306
|
+
declare const WorkflowFailed: EventDefinition<"workflow.failed", z.ZodObject<{
|
|
307
|
+
error: z.ZodOptional<z.ZodString>;
|
|
308
|
+
}, z.core.$strip>>;
|
|
309
|
+
declare const StepStarted: EventDefinition<"step.started", z.ZodObject<{
|
|
310
|
+
name: z.ZodOptional<z.ZodString>;
|
|
311
|
+
}, z.core.$strip>>;
|
|
312
|
+
declare const StepCompleted: EventDefinition<"step.completed", z.ZodObject<{
|
|
313
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
314
|
+
}, z.core.$strip>>;
|
|
315
|
+
declare const StepFailed: EventDefinition<"step.failed", z.ZodObject<{
|
|
316
|
+
error: z.ZodOptional<z.ZodString>;
|
|
317
|
+
}, z.core.$strip>>;
|
|
318
|
+
declare const StepRolledBack: EventDefinition<"step.rolled_back", z.ZodObject<{}, z.core.$strip>>;
|
|
319
|
+
declare namespace alineod_d_exports {
|
|
320
|
+
export { AgentAdmissionGranted, AgentAdmissionQueued, AgentAdmissionTimeout, AgentEnded, AgentProvisioned, AgentReleased, AgentRestored, AgentSpawned, AgentStateChanged, AgentSteered, AgentSupervisionNeeded, AgentTurnFailed, AgentTurnInterrupted, AgentTurnRetried, BudgetDenied, HandleSettled, InboxDelivered, InboxDropped, InboxQueued, NotifyRegistered, RunClosed, RunQuiescent, RunStarted, WaitBlocked, WaitResolved };
|
|
321
|
+
}
|
|
322
|
+
declare const RunStarted: EventDefinition<"run.started", z.ZodObject<{
|
|
323
|
+
runId: z.ZodString;
|
|
324
|
+
closeWhen: z.ZodDefault<z.ZodEnum<{
|
|
325
|
+
explicit: "explicit";
|
|
326
|
+
quiescent: "quiescent";
|
|
327
|
+
}>>;
|
|
328
|
+
}, z.core.$strip>>;
|
|
329
|
+
declare const RunClosed: EventDefinition<"run.closed", z.ZodObject<{
|
|
330
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
331
|
+
reason: z.ZodEnum<{
|
|
332
|
+
explicit: "explicit";
|
|
333
|
+
quiescent: "quiescent";
|
|
334
|
+
}>;
|
|
335
|
+
}, z.core.$strip>>;
|
|
336
|
+
declare const RunQuiescent: EventDefinition<"run.quiescent", z.ZodObject<{
|
|
337
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
338
|
+
memberCount: z.ZodNumber;
|
|
339
|
+
asOf: z.ZodNumber;
|
|
340
|
+
}, z.core.$strip>>;
|
|
341
|
+
declare const AgentSpawned: EventDefinition<"agent.spawned", z.ZodObject<{
|
|
342
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
343
|
+
parentAgentId: z.ZodNullable<z.ZodString>;
|
|
344
|
+
runId: z.ZodString;
|
|
345
|
+
specName: z.ZodString;
|
|
346
|
+
depth: z.ZodNumber;
|
|
347
|
+
spawnIndex: z.ZodNumber;
|
|
348
|
+
sandboxId: z.ZodNullable<z.ZodString>;
|
|
349
|
+
waitFor: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
350
|
+
prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
351
|
+
}, z.core.$strip>>;
|
|
352
|
+
declare const AgentProvisioned: EventDefinition<"agent.provisioned", z.ZodObject<{
|
|
353
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
354
|
+
sandboxId: z.ZodString;
|
|
355
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
356
|
+
}, z.core.$strip>>;
|
|
357
|
+
declare const AgentRestored: EventDefinition<"agent.restored", z.ZodObject<{
|
|
358
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
359
|
+
oldSandboxId: z.ZodString;
|
|
360
|
+
checkpointTurn: z.ZodNullable<z.ZodNumber>;
|
|
361
|
+
}, z.core.$strip>>;
|
|
362
|
+
declare const AgentStateChanged: EventDefinition<"agent.state_changed", z.ZodObject<{
|
|
363
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
364
|
+
from: z.ZodString;
|
|
365
|
+
to: z.ZodString;
|
|
366
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
367
|
+
pausedBy: z.ZodOptional<z.ZodEnum<{
|
|
368
|
+
operator: "operator";
|
|
369
|
+
cascade: "cascade";
|
|
370
|
+
}>>;
|
|
371
|
+
}, z.core.$strip>>;
|
|
372
|
+
declare const AgentSteered: EventDefinition<"agent.steered", z.ZodObject<{
|
|
373
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
374
|
+
message: z.ZodString;
|
|
375
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
376
|
+
subtree: "subtree";
|
|
377
|
+
agent: "agent";
|
|
378
|
+
}>>;
|
|
379
|
+
roster: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
380
|
+
deliveredAs: z.ZodOptional<z.ZodEnum<{
|
|
381
|
+
steer: "steer";
|
|
382
|
+
turn: "turn";
|
|
383
|
+
queued: "queued";
|
|
384
|
+
}>>;
|
|
385
|
+
}, z.core.$strip>>;
|
|
386
|
+
declare const AgentReleased: EventDefinition<"agent.released", z.ZodObject<{
|
|
387
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
388
|
+
reason: z.ZodString;
|
|
389
|
+
}, z.core.$strip>>;
|
|
390
|
+
declare const AgentEnded: EventDefinition<"agent.ended", z.ZodObject<{
|
|
391
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
392
|
+
outcome: z.ZodString;
|
|
393
|
+
endedAt: z.ZodNumber;
|
|
394
|
+
error: z.ZodOptional<z.ZodString>;
|
|
395
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
396
|
+
}, z.core.$strip>>;
|
|
397
|
+
declare const HandleSettled: EventDefinition<"handle.settled", z.ZodObject<{
|
|
398
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
399
|
+
outcome: z.ZodString;
|
|
400
|
+
resultRef: z.ZodNullable<z.ZodString>;
|
|
401
|
+
}, z.core.$strip>>;
|
|
402
|
+
declare const WaitResolved: EventDefinition<"wait.resolved", z.ZodObject<{
|
|
403
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
404
|
+
mode: z.ZodEnum<{
|
|
405
|
+
any: "any";
|
|
406
|
+
all: "all";
|
|
407
|
+
quorum: "quorum";
|
|
408
|
+
}>;
|
|
409
|
+
outcome: z.ZodEnum<{
|
|
410
|
+
satisfied: "satisfied";
|
|
411
|
+
partial: "partial";
|
|
412
|
+
depfail: "depfail";
|
|
413
|
+
deadline: "deadline";
|
|
414
|
+
}>;
|
|
415
|
+
selected: z.ZodArray<z.ZodString>;
|
|
416
|
+
settled: z.ZodArray<z.ZodObject<{
|
|
417
|
+
agentId: z.ZodString;
|
|
418
|
+
outcome: z.ZodNullable<z.ZodString>;
|
|
419
|
+
}, z.core.$strip>>;
|
|
420
|
+
pending: z.ZodArray<z.ZodString>;
|
|
421
|
+
}, z.core.$strip>>;
|
|
422
|
+
declare const WaitBlocked: EventDefinition<"wait.blocked", z.ZodObject<{
|
|
423
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
424
|
+
blockedOn: z.ZodString;
|
|
425
|
+
}, z.core.$strip>>;
|
|
426
|
+
declare const NotifyRegistered: EventDefinition<"notify.registered", z.ZodObject<{
|
|
427
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
428
|
+
on: z.ZodArray<z.ZodString>;
|
|
429
|
+
wake: z.ZodBoolean;
|
|
430
|
+
}, z.core.$strip>>;
|
|
431
|
+
declare const InboxQueued: EventDefinition<"inbox.queued", z.ZodObject<{
|
|
432
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
433
|
+
kind: z.ZodEnum<{
|
|
434
|
+
steer: "steer";
|
|
435
|
+
notification: "notification";
|
|
436
|
+
supervision: "supervision";
|
|
437
|
+
}>;
|
|
438
|
+
aboutAgentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
439
|
+
aboutSpec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
440
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
441
|
+
resultRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
442
|
+
excerpt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
443
|
+
again: z.ZodOptional<z.ZodBoolean>;
|
|
444
|
+
text: z.ZodOptional<z.ZodString>;
|
|
445
|
+
}, z.core.$strip>>;
|
|
446
|
+
declare const InboxDelivered: EventDefinition<"inbox.delivered", z.ZodObject<{
|
|
447
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
448
|
+
seqs: z.ZodArray<z.ZodNumber>;
|
|
449
|
+
as: z.ZodEnum<{
|
|
450
|
+
prompt: "prompt";
|
|
451
|
+
steer: "steer";
|
|
452
|
+
turn: "turn";
|
|
453
|
+
}>;
|
|
454
|
+
}, z.core.$strip>>;
|
|
455
|
+
declare const InboxDropped: EventDefinition<"inbox.dropped", z.ZodObject<{
|
|
456
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
457
|
+
seqs: z.ZodArray<z.ZodNumber>;
|
|
458
|
+
reason: z.ZodString;
|
|
459
|
+
}, z.core.$strip>>;
|
|
460
|
+
declare const BudgetDenied: EventDefinition<"budget.denied", z.ZodObject<{
|
|
461
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
462
|
+
dimension: z.ZodEnum<{
|
|
463
|
+
spawnDepth: "spawnDepth";
|
|
464
|
+
maxAgents: "maxAgents";
|
|
465
|
+
}>;
|
|
466
|
+
remaining: z.ZodNumber;
|
|
467
|
+
}, z.core.$strip>>;
|
|
468
|
+
declare const AgentAdmissionQueued: EventDefinition<"agent.admission_queued", z.ZodObject<{
|
|
469
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
470
|
+
capacity: z.ZodNumber;
|
|
471
|
+
}, z.core.$strip>>;
|
|
472
|
+
declare const AgentAdmissionGranted: EventDefinition<"agent.admission_granted", z.ZodObject<{
|
|
473
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
474
|
+
}, z.core.$strip>>;
|
|
475
|
+
declare const AgentAdmissionTimeout: EventDefinition<"agent.admission_timeout", z.ZodObject<{
|
|
476
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
477
|
+
waitedMs: z.ZodNumber;
|
|
478
|
+
}, z.core.$strip>>;
|
|
479
|
+
declare const AgentTurnFailed: EventDefinition<"agent.turn_failed", z.ZodObject<{
|
|
480
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
481
|
+
error: z.ZodString;
|
|
482
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
483
|
+
consecutiveFailures: z.ZodNumber;
|
|
484
|
+
}, z.core.$strip>>;
|
|
485
|
+
declare const AgentTurnRetried: EventDefinition<"agent.turn_retried", z.ZodObject<{
|
|
486
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
487
|
+
error: z.ZodString;
|
|
488
|
+
errorCode: z.ZodString;
|
|
489
|
+
attempt: z.ZodNumber;
|
|
490
|
+
maxAttempts: z.ZodNumber;
|
|
491
|
+
delayMs: z.ZodNumber;
|
|
492
|
+
}, z.core.$strip>>;
|
|
493
|
+
declare const AgentTurnInterrupted: EventDefinition<"agent.turn_interrupted", z.ZodObject<{
|
|
494
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
495
|
+
}, z.core.$strip>>;
|
|
496
|
+
declare const AgentSupervisionNeeded: EventDefinition<"agent.supervision_needed", z.ZodObject<{
|
|
497
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
498
|
+
reason: z.ZodEnum<{
|
|
499
|
+
ask: "ask";
|
|
500
|
+
"retries-exhausted": "retries-exhausted";
|
|
501
|
+
"circuit-tripped": "circuit-tripped";
|
|
502
|
+
}>;
|
|
503
|
+
error: z.ZodString;
|
|
504
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
505
|
+
}, z.core.$strip>>;
|
|
506
|
+
//#endregion
|
|
507
|
+
export { defineEvent as _, sandbox_d_exports as a, PROJECT_CONFIG_SCHEMA_URL as c, ProjectConfigSchema as d, resourceRefOf as f, allEvents as g, EventDefinition as h, agent_d_exports as i, ProjectConfig as l, EventData as m, workflow_d_exports as n, RENAMED_EVENTS as o, EnvelopeOf as p, harness_d_exports as r, renamedEventType as s, alineod_d_exports as t, ProjectConfigObjectSchema as u, durableEvents as v, getEvent as y };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { C as VERBS, D as parseName, E as isVerb, S as Subject, T as isSubject, _ as EventRef, a as HarnessId, b as isPersisted, c as SetupStep, d as NormalizedPermissionPolicy, f as PermissionAction, g as DurableRef, h as PermissionRule, i as CredentialEnvBinding, l as deprecatedSpecFields, m as PermissionPolicy, n as AgentSpecInput, o as HarnessRef, p as PermissionMode, r as AgentSpecSchema, s as ModelRef, t as AgentSpec, u as normalizeAgentSpec, v as LedgerEnvelope, w as Verb, x as SUBJECTS, y as PersistedEnvelope } from "./agent-spec-C7UBd_R2.mjs";
|
|
2
|
+
import { _ as defineEvent, a as sandbox_d_exports, c as PROJECT_CONFIG_SCHEMA_URL, d as ProjectConfigSchema, f as resourceRefOf, g as allEvents, h as EventDefinition, i as agent_d_exports, l as ProjectConfig, m as EventData, n as workflow_d_exports, o as RENAMED_EVENTS, p as EnvelopeOf, r as harness_d_exports, s as renamedEventType, t as alineod_d_exports, u as ProjectConfigObjectSchema, v as durableEvents, y as getEvent } from "./index-BnrIUYdM.mjs";
|
|
3
|
+
export { agent_d_exports as AgentEvents, type AgentSpec, type AgentSpecInput, AgentSpecSchema, alineod_d_exports as AlineodEvents, type CredentialEnvBinding, type DurableRef, type EnvelopeOf, type EventData, type EventDefinition, type EventRef, harness_d_exports as HarnessEvents, type HarnessId, type HarnessRef, type LedgerEnvelope, type ModelRef, type NormalizedPermissionPolicy, PROJECT_CONFIG_SCHEMA_URL, type PermissionAction, type PermissionMode, type PermissionPolicy, type PermissionRule, type PersistedEnvelope, type ProjectConfig, ProjectConfigObjectSchema, ProjectConfigSchema, RENAMED_EVENTS, SUBJECTS, sandbox_d_exports as SandboxEvents, type SetupStep, type Subject, VERBS, type Verb, workflow_d_exports as WorkflowEvents, allEvents, defineEvent, deprecatedSpecFields, durableEvents, getEvent, isPersisted, isSubject, isVerb, normalizeAgentSpec, parseName, renamedEventType, resourceRefOf };
|