@alineo-labs/schema 0.0.0-stage → 0.2.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-BeNVCYXF.d.mts +518 -0
- package/dist/agent-spec-iZ9p1pjI.mjs +1057 -0
- package/dist/alineod.d.mts +625 -0
- package/dist/alineod.mjs +309 -0
- package/dist/index-DJ7T_9Z-.d.mts +480 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +179 -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,480 @@
|
|
|
1
|
+
import { f as LedgerEnvelope, t as AgentSpec } from "./agent-spec-BeNVCYXF.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
|
+
serverUrl: z.ZodDefault<z.ZodString>;
|
|
62
|
+
apiKey: z.ZodDefault<z.ZodString>;
|
|
63
|
+
useServerProxy: z.ZodDefault<z.ZodBoolean>;
|
|
64
|
+
adapterPath: z.ZodDefault<z.ZodString>;
|
|
65
|
+
agentsDir: z.ZodDefault<z.ZodString>;
|
|
66
|
+
defaults: z.ZodPrefault<z.ZodObject<{
|
|
67
|
+
resources: z.ZodPrefault<z.ZodObject<{
|
|
68
|
+
cpu: z.ZodDefault<z.ZodString>;
|
|
69
|
+
memory: z.ZodDefault<z.ZodString>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
/** The project config schema, with nulls treated as absent. */
|
|
74
|
+
declare const ProjectConfigSchema: z.ZodPreprocess<z.ZodObject<{
|
|
75
|
+
serverUrl: z.ZodDefault<z.ZodString>;
|
|
76
|
+
apiKey: z.ZodDefault<z.ZodString>;
|
|
77
|
+
useServerProxy: z.ZodDefault<z.ZodBoolean>;
|
|
78
|
+
adapterPath: z.ZodDefault<z.ZodString>;
|
|
79
|
+
agentsDir: z.ZodDefault<z.ZodString>;
|
|
80
|
+
defaults: z.ZodPrefault<z.ZodObject<{
|
|
81
|
+
resources: z.ZodPrefault<z.ZodObject<{
|
|
82
|
+
cpu: z.ZodDefault<z.ZodString>;
|
|
83
|
+
memory: z.ZodDefault<z.ZodString>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
}, z.core.$strip>>;
|
|
87
|
+
/** The underlying object schema, for JSON Schema emit (preprocess has no JSON Schema form). */
|
|
88
|
+
declare const ProjectConfigObjectSchema: z.ZodObject<{
|
|
89
|
+
serverUrl: z.ZodDefault<z.ZodString>;
|
|
90
|
+
apiKey: z.ZodDefault<z.ZodString>;
|
|
91
|
+
useServerProxy: z.ZodDefault<z.ZodBoolean>;
|
|
92
|
+
adapterPath: z.ZodDefault<z.ZodString>;
|
|
93
|
+
agentsDir: z.ZodDefault<z.ZodString>;
|
|
94
|
+
defaults: z.ZodPrefault<z.ZodObject<{
|
|
95
|
+
resources: z.ZodPrefault<z.ZodObject<{
|
|
96
|
+
cpu: z.ZodDefault<z.ZodString>;
|
|
97
|
+
memory: z.ZodDefault<z.ZodString>;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
type ProjectConfig = z.infer<typeof ProjectConfigObject>;
|
|
102
|
+
/** `$schema` URL written into a generated `alineo.config.json`. */
|
|
103
|
+
declare const PROJECT_CONFIG_SCHEMA_URL = "https://alineo.tech/schema/alineo.config.json";
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/renames.d.ts
|
|
106
|
+
/**
|
|
107
|
+
* The old flat event names, and what each became.
|
|
108
|
+
*
|
|
109
|
+
* This table is **dated and deletable**, not a standing feature. An earlier draft carried a
|
|
110
|
+
* `legacy` field on every definition so both names kept being written forever; that was
|
|
111
|
+
* dropped because a permanent two-names-per-event alias costs more than the break. The
|
|
112
|
+
* mapping survives here only because three stores hold old names in an `event` column and
|
|
113
|
+
* need a one-time migration — once no deployed database predates the rename, this file goes.
|
|
114
|
+
*
|
|
115
|
+
* Nothing reads it at runtime on the hot path. Its consumers are the store migrations and
|
|
116
|
+
* the test that proves every old name maps to a registered event.
|
|
117
|
+
*/
|
|
118
|
+
declare const RENAMED_EVENTS: Readonly<Record<string, string>>;
|
|
119
|
+
/**
|
|
120
|
+
* The new name for an old one, or `undefined` if the name was never renamed.
|
|
121
|
+
*
|
|
122
|
+
* `run_started` returns `undefined` on purpose — it is the one name that meant two different
|
|
123
|
+
* events, so the caller's own context decides.
|
|
124
|
+
*/
|
|
125
|
+
declare function renamedEventType(old: string): string | undefined;
|
|
126
|
+
declare namespace sandbox_d_exports {
|
|
127
|
+
export { CredentialBound, CredentialRevoked, EgressRuleAdded, EgressRuleRemoved, ExecCompleted, ExecOutput, ExecStarted, SandboxCheckpointCreated, SandboxClosed, SandboxCreated, SandboxPaused, SandboxResumed };
|
|
128
|
+
}
|
|
129
|
+
declare const SandboxCreated: EventDefinition<"sandbox.created", z.ZodObject<{
|
|
130
|
+
sandboxId: z.ZodString;
|
|
131
|
+
name: z.ZodString;
|
|
132
|
+
runId: z.ZodString;
|
|
133
|
+
resourceId: z.ZodOptional<z.ZodString>;
|
|
134
|
+
teamId: z.ZodOptional<z.ZodString>;
|
|
135
|
+
parentSandboxId: z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, z.core.$strip>>;
|
|
137
|
+
declare const SandboxClosed: EventDefinition<"sandbox.closed", z.ZodObject<{
|
|
138
|
+
sandboxId: z.ZodString;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
declare const SandboxPaused: EventDefinition<"sandbox.paused", z.ZodObject<{
|
|
141
|
+
sandboxId: z.ZodString;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
declare const SandboxResumed: EventDefinition<"sandbox.resumed", z.ZodObject<{
|
|
144
|
+
sandboxId: z.ZodString;
|
|
145
|
+
}, z.core.$strip>>;
|
|
146
|
+
declare const SandboxCheckpointCreated: EventDefinition<"sandbox.checkpoint_created", z.ZodObject<{
|
|
147
|
+
snapshotId: z.ZodString;
|
|
148
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
declare const ExecStarted: EventDefinition<"exec.started", z.ZodObject<{
|
|
151
|
+
command: z.ZodOptional<z.ZodString>;
|
|
152
|
+
code: z.ZodOptional<z.ZodString>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
declare const ExecOutput: EventDefinition<"exec.output", z.ZodObject<{
|
|
155
|
+
stream: z.ZodOptional<z.ZodEnum<{
|
|
156
|
+
stdout: "stdout";
|
|
157
|
+
stderr: "stderr";
|
|
158
|
+
}>>;
|
|
159
|
+
text: z.ZodString;
|
|
160
|
+
}, z.core.$strip>>;
|
|
161
|
+
declare const ExecCompleted: EventDefinition<"exec.completed", z.ZodObject<{
|
|
162
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
stdout: z.ZodOptional<z.ZodString>;
|
|
164
|
+
stderr: z.ZodOptional<z.ZodString>;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
declare const EgressRuleAdded: EventDefinition<"egress.rule_added", z.ZodObject<{
|
|
167
|
+
rules: z.ZodArray<z.ZodUnknown>;
|
|
168
|
+
}, z.core.$strip>>;
|
|
169
|
+
declare const EgressRuleRemoved: EventDefinition<"egress.rule_removed", z.ZodObject<{
|
|
170
|
+
targets: z.ZodArray<z.ZodString>;
|
|
171
|
+
}, z.core.$strip>>;
|
|
172
|
+
declare const CredentialBound: EventDefinition<"credential.bound", z.ZodObject<{
|
|
173
|
+
name: z.ZodString;
|
|
174
|
+
host: z.ZodOptional<z.ZodString>;
|
|
175
|
+
injection: z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, z.core.$strip>>;
|
|
177
|
+
declare const CredentialRevoked: EventDefinition<"credential.revoked", z.ZodObject<{
|
|
178
|
+
name: z.ZodString;
|
|
179
|
+
}, z.core.$strip>>;
|
|
180
|
+
declare namespace agent_d_exports {
|
|
181
|
+
export { AgentCheckpointed, PermissionRequested, PermissionResolved };
|
|
182
|
+
}
|
|
183
|
+
declare const PermissionRequested: EventDefinition<"permission.requested", z.ZodObject<{
|
|
184
|
+
requestId: z.ZodString;
|
|
185
|
+
tool: z.ZodString;
|
|
186
|
+
target: z.ZodString;
|
|
187
|
+
title: z.ZodOptional<z.ZodString>;
|
|
188
|
+
}, z.core.$strip>>;
|
|
189
|
+
declare const PermissionResolved: EventDefinition<"permission.resolved", z.ZodObject<{
|
|
190
|
+
requestId: z.ZodString;
|
|
191
|
+
decision: z.ZodString;
|
|
192
|
+
}, z.core.$strip>>;
|
|
193
|
+
declare const AgentCheckpointed: EventDefinition<"agent.checkpointed", z.ZodObject<{
|
|
194
|
+
turn: z.ZodNumber;
|
|
195
|
+
snapshotRef: z.ZodString;
|
|
196
|
+
}, z.core.$strip>>;
|
|
197
|
+
declare namespace harness_d_exports {
|
|
198
|
+
export { CompactionEnded, CompactionStarted, ExtensionError, ExtensionUi, MessageEnded, MessageStarted, MessageUpdated, QueueUpdated, RetryEnded, RetryStarted, SessionEnded, SessionStarted, ToolEnded, ToolStarted, ToolUpdated, TurnEnded, TurnStarted };
|
|
199
|
+
}
|
|
200
|
+
declare const SessionStarted: EventDefinition<"session.started", z.ZodObject<{}, z.core.$strip>>;
|
|
201
|
+
declare const SessionEnded: EventDefinition<"session.ended", z.ZodObject<{
|
|
202
|
+
messages: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
203
|
+
}, z.core.$strip>>;
|
|
204
|
+
declare const TurnStarted: EventDefinition<"turn.started", z.ZodObject<{
|
|
205
|
+
turnIndex: z.ZodNumber;
|
|
206
|
+
timestamp: z.ZodNumber;
|
|
207
|
+
}, z.core.$strip>>;
|
|
208
|
+
declare const TurnEnded: EventDefinition<"turn.ended", z.ZodObject<{
|
|
209
|
+
turnIndex: z.ZodNumber;
|
|
210
|
+
message: z.ZodOptional<z.ZodUnknown>;
|
|
211
|
+
toolResults: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
212
|
+
}, z.core.$strip>>;
|
|
213
|
+
declare const ToolStarted: EventDefinition<"tool.started", z.ZodObject<{
|
|
214
|
+
toolCallId: z.ZodString;
|
|
215
|
+
toolName: z.ZodString;
|
|
216
|
+
args: z.ZodUnknown;
|
|
217
|
+
}, z.core.$strip>>;
|
|
218
|
+
declare const ToolUpdated: EventDefinition<"tool.updated", z.ZodObject<{
|
|
219
|
+
toolCallId: z.ZodString;
|
|
220
|
+
toolName: z.ZodString;
|
|
221
|
+
partialResult: z.ZodUnknown;
|
|
222
|
+
}, z.core.$strip>>;
|
|
223
|
+
declare const ToolEnded: EventDefinition<"tool.ended", z.ZodObject<{
|
|
224
|
+
toolCallId: z.ZodString;
|
|
225
|
+
toolName: z.ZodString;
|
|
226
|
+
result: z.ZodUnknown;
|
|
227
|
+
isError: z.ZodBoolean;
|
|
228
|
+
}, z.core.$strip>>;
|
|
229
|
+
declare const MessageStarted: EventDefinition<"message.started", z.ZodObject<{
|
|
230
|
+
message: z.ZodUnknown;
|
|
231
|
+
}, z.core.$strip>>;
|
|
232
|
+
declare const MessageUpdated: EventDefinition<"message.updated", z.ZodObject<{
|
|
233
|
+
message: z.ZodOptional<z.ZodUnknown>;
|
|
234
|
+
delta: z.ZodOptional<z.ZodUnknown>;
|
|
235
|
+
text: z.ZodOptional<z.ZodString>;
|
|
236
|
+
}, z.core.$strip>>;
|
|
237
|
+
declare const MessageEnded: EventDefinition<"message.ended", z.ZodObject<{
|
|
238
|
+
message: z.ZodUnknown;
|
|
239
|
+
}, z.core.$strip>>;
|
|
240
|
+
declare const CompactionStarted: EventDefinition<"compaction.started", z.ZodObject<{
|
|
241
|
+
reason: z.ZodEnum<{
|
|
242
|
+
manual: "manual";
|
|
243
|
+
threshold: "threshold";
|
|
244
|
+
overflow: "overflow";
|
|
245
|
+
}>;
|
|
246
|
+
}, z.core.$strip>>;
|
|
247
|
+
declare const CompactionEnded: EventDefinition<"compaction.ended", z.ZodObject<{
|
|
248
|
+
reason: z.ZodEnum<{
|
|
249
|
+
manual: "manual";
|
|
250
|
+
threshold: "threshold";
|
|
251
|
+
overflow: "overflow";
|
|
252
|
+
}>;
|
|
253
|
+
result: z.ZodNullable<z.ZodObject<{
|
|
254
|
+
summary: z.ZodString;
|
|
255
|
+
firstKeptEntryId: z.ZodString;
|
|
256
|
+
tokensBefore: z.ZodNumber;
|
|
257
|
+
estimatedTokensAfter: z.ZodNumber;
|
|
258
|
+
details: z.ZodUnknown;
|
|
259
|
+
}, z.core.$strip>>;
|
|
260
|
+
aborted: z.ZodBoolean;
|
|
261
|
+
willRetry: z.ZodBoolean;
|
|
262
|
+
}, z.core.$strip>>;
|
|
263
|
+
declare const RetryStarted: EventDefinition<"retry.started", z.ZodObject<{
|
|
264
|
+
attempt: z.ZodNumber;
|
|
265
|
+
maxAttempts: z.ZodNumber;
|
|
266
|
+
delayMs: z.ZodNumber;
|
|
267
|
+
errorMessage: z.ZodString;
|
|
268
|
+
}, z.core.$strip>>;
|
|
269
|
+
declare const RetryEnded: EventDefinition<"retry.ended", z.ZodObject<{
|
|
270
|
+
success: z.ZodBoolean;
|
|
271
|
+
attempt: z.ZodNumber;
|
|
272
|
+
finalError: z.ZodOptional<z.ZodString>;
|
|
273
|
+
}, z.core.$strip>>;
|
|
274
|
+
declare const QueueUpdated: EventDefinition<"queue.updated", z.ZodObject<{
|
|
275
|
+
steering: z.ZodArray<z.ZodString>;
|
|
276
|
+
followUp: z.ZodArray<z.ZodString>;
|
|
277
|
+
}, z.core.$strip>>;
|
|
278
|
+
declare const ExtensionUi: EventDefinition<"extension.ui", z.ZodObject<{
|
|
279
|
+
method: z.ZodString;
|
|
280
|
+
params: z.ZodUnknown;
|
|
281
|
+
isDialog: z.ZodBoolean;
|
|
282
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
283
|
+
}, z.core.$strip>>;
|
|
284
|
+
declare const ExtensionError: EventDefinition<"extension.error", z.ZodObject<{
|
|
285
|
+
extensionPath: z.ZodString;
|
|
286
|
+
event: z.ZodString;
|
|
287
|
+
error: z.ZodString;
|
|
288
|
+
}, z.core.$strip>>;
|
|
289
|
+
declare namespace workflow_d_exports {
|
|
290
|
+
export { StepCompleted, StepFailed, StepRolledBack, StepStarted, WorkflowCompleted, WorkflowFailed, WorkflowStarted };
|
|
291
|
+
}
|
|
292
|
+
declare const WorkflowStarted: EventDefinition<"workflow.started", z.ZodObject<{
|
|
293
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
294
|
+
}, z.core.$strip>>;
|
|
295
|
+
declare const WorkflowCompleted: EventDefinition<"workflow.completed", z.ZodObject<{}, z.core.$strip>>;
|
|
296
|
+
declare const WorkflowFailed: EventDefinition<"workflow.failed", z.ZodObject<{
|
|
297
|
+
error: z.ZodOptional<z.ZodString>;
|
|
298
|
+
}, z.core.$strip>>;
|
|
299
|
+
declare const StepStarted: EventDefinition<"step.started", z.ZodObject<{
|
|
300
|
+
name: z.ZodOptional<z.ZodString>;
|
|
301
|
+
}, z.core.$strip>>;
|
|
302
|
+
declare const StepCompleted: EventDefinition<"step.completed", z.ZodObject<{
|
|
303
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
304
|
+
}, z.core.$strip>>;
|
|
305
|
+
declare const StepFailed: EventDefinition<"step.failed", z.ZodObject<{
|
|
306
|
+
error: z.ZodOptional<z.ZodString>;
|
|
307
|
+
}, z.core.$strip>>;
|
|
308
|
+
declare const StepRolledBack: EventDefinition<"step.rolled_back", z.ZodObject<{}, z.core.$strip>>;
|
|
309
|
+
declare namespace alineod_d_exports {
|
|
310
|
+
export { AgentAdmissionGranted, AgentAdmissionQueued, AgentAdmissionTimeout, AgentEnded, AgentProvisioned, AgentReleased, AgentSpawned, AgentStateChanged, AgentSteered, AgentSupervisionNeeded, AgentTurnFailed, AgentTurnInterrupted, BudgetDenied, HandleSettled, InboxDelivered, InboxDropped, InboxQueued, NotifyRegistered, RunClosed, RunQuiescent, RunStarted, WaitBlocked, WaitResolved };
|
|
311
|
+
}
|
|
312
|
+
declare const RunStarted: EventDefinition<"run.started", z.ZodObject<{
|
|
313
|
+
runId: z.ZodString;
|
|
314
|
+
closeWhen: z.ZodDefault<z.ZodEnum<{
|
|
315
|
+
explicit: "explicit";
|
|
316
|
+
quiescent: "quiescent";
|
|
317
|
+
}>>;
|
|
318
|
+
}, z.core.$strip>>;
|
|
319
|
+
declare const RunClosed: EventDefinition<"run.closed", z.ZodObject<{
|
|
320
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
321
|
+
reason: z.ZodEnum<{
|
|
322
|
+
explicit: "explicit";
|
|
323
|
+
quiescent: "quiescent";
|
|
324
|
+
}>;
|
|
325
|
+
}, z.core.$strip>>;
|
|
326
|
+
declare const RunQuiescent: EventDefinition<"run.quiescent", z.ZodObject<{
|
|
327
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
328
|
+
memberCount: z.ZodNumber;
|
|
329
|
+
asOf: z.ZodNumber;
|
|
330
|
+
}, z.core.$strip>>;
|
|
331
|
+
declare const AgentSpawned: EventDefinition<"agent.spawned", z.ZodObject<{
|
|
332
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
333
|
+
parentAgentId: z.ZodNullable<z.ZodString>;
|
|
334
|
+
runId: z.ZodString;
|
|
335
|
+
specName: z.ZodString;
|
|
336
|
+
depth: z.ZodNumber;
|
|
337
|
+
spawnIndex: z.ZodNumber;
|
|
338
|
+
sandboxId: z.ZodNullable<z.ZodString>;
|
|
339
|
+
waitFor: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
340
|
+
prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
341
|
+
}, z.core.$strip>>;
|
|
342
|
+
declare const AgentProvisioned: EventDefinition<"agent.provisioned", z.ZodObject<{
|
|
343
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
344
|
+
sandboxId: z.ZodString;
|
|
345
|
+
}, z.core.$strip>>;
|
|
346
|
+
declare const AgentStateChanged: EventDefinition<"agent.state_changed", z.ZodObject<{
|
|
347
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
348
|
+
from: z.ZodString;
|
|
349
|
+
to: z.ZodString;
|
|
350
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
351
|
+
pausedBy: z.ZodOptional<z.ZodEnum<{
|
|
352
|
+
operator: "operator";
|
|
353
|
+
cascade: "cascade";
|
|
354
|
+
}>>;
|
|
355
|
+
}, z.core.$strip>>;
|
|
356
|
+
declare const AgentSteered: EventDefinition<"agent.steered", z.ZodObject<{
|
|
357
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
358
|
+
message: z.ZodString;
|
|
359
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
360
|
+
subtree: "subtree";
|
|
361
|
+
agent: "agent";
|
|
362
|
+
}>>;
|
|
363
|
+
roster: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
364
|
+
deliveredAs: z.ZodOptional<z.ZodEnum<{
|
|
365
|
+
steer: "steer";
|
|
366
|
+
turn: "turn";
|
|
367
|
+
queued: "queued";
|
|
368
|
+
}>>;
|
|
369
|
+
}, z.core.$strip>>;
|
|
370
|
+
declare const AgentReleased: EventDefinition<"agent.released", z.ZodObject<{
|
|
371
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
372
|
+
reason: z.ZodString;
|
|
373
|
+
}, z.core.$strip>>;
|
|
374
|
+
declare const AgentEnded: EventDefinition<"agent.ended", z.ZodObject<{
|
|
375
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
376
|
+
outcome: z.ZodString;
|
|
377
|
+
endedAt: z.ZodNumber;
|
|
378
|
+
error: z.ZodOptional<z.ZodString>;
|
|
379
|
+
}, z.core.$strip>>;
|
|
380
|
+
declare const HandleSettled: EventDefinition<"handle.settled", z.ZodObject<{
|
|
381
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
382
|
+
outcome: z.ZodString;
|
|
383
|
+
resultRef: z.ZodNullable<z.ZodString>;
|
|
384
|
+
}, z.core.$strip>>;
|
|
385
|
+
declare const WaitResolved: EventDefinition<"wait.resolved", z.ZodObject<{
|
|
386
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
387
|
+
mode: z.ZodEnum<{
|
|
388
|
+
any: "any";
|
|
389
|
+
all: "all";
|
|
390
|
+
quorum: "quorum";
|
|
391
|
+
}>;
|
|
392
|
+
outcome: z.ZodEnum<{
|
|
393
|
+
satisfied: "satisfied";
|
|
394
|
+
partial: "partial";
|
|
395
|
+
depfail: "depfail";
|
|
396
|
+
deadline: "deadline";
|
|
397
|
+
}>;
|
|
398
|
+
selected: z.ZodArray<z.ZodString>;
|
|
399
|
+
settled: z.ZodArray<z.ZodObject<{
|
|
400
|
+
agentId: z.ZodString;
|
|
401
|
+
outcome: z.ZodNullable<z.ZodString>;
|
|
402
|
+
}, z.core.$strip>>;
|
|
403
|
+
pending: z.ZodArray<z.ZodString>;
|
|
404
|
+
}, z.core.$strip>>;
|
|
405
|
+
declare const WaitBlocked: EventDefinition<"wait.blocked", z.ZodObject<{
|
|
406
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
407
|
+
blockedOn: z.ZodString;
|
|
408
|
+
}, z.core.$strip>>;
|
|
409
|
+
declare const NotifyRegistered: EventDefinition<"notify.registered", z.ZodObject<{
|
|
410
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
411
|
+
on: z.ZodArray<z.ZodString>;
|
|
412
|
+
wake: z.ZodBoolean;
|
|
413
|
+
}, z.core.$strip>>;
|
|
414
|
+
declare const InboxQueued: EventDefinition<"inbox.queued", z.ZodObject<{
|
|
415
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
416
|
+
kind: z.ZodEnum<{
|
|
417
|
+
steer: "steer";
|
|
418
|
+
notification: "notification";
|
|
419
|
+
supervision: "supervision";
|
|
420
|
+
}>;
|
|
421
|
+
aboutAgentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
422
|
+
aboutSpec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
423
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
424
|
+
resultRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
425
|
+
excerpt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
426
|
+
again: z.ZodOptional<z.ZodBoolean>;
|
|
427
|
+
text: z.ZodOptional<z.ZodString>;
|
|
428
|
+
}, z.core.$strip>>;
|
|
429
|
+
declare const InboxDelivered: EventDefinition<"inbox.delivered", z.ZodObject<{
|
|
430
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
431
|
+
seqs: z.ZodArray<z.ZodNumber>;
|
|
432
|
+
as: z.ZodEnum<{
|
|
433
|
+
prompt: "prompt";
|
|
434
|
+
steer: "steer";
|
|
435
|
+
turn: "turn";
|
|
436
|
+
}>;
|
|
437
|
+
}, z.core.$strip>>;
|
|
438
|
+
declare const InboxDropped: EventDefinition<"inbox.dropped", z.ZodObject<{
|
|
439
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
440
|
+
seqs: z.ZodArray<z.ZodNumber>;
|
|
441
|
+
reason: z.ZodString;
|
|
442
|
+
}, z.core.$strip>>;
|
|
443
|
+
declare const BudgetDenied: EventDefinition<"budget.denied", z.ZodObject<{
|
|
444
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
445
|
+
dimension: z.ZodEnum<{
|
|
446
|
+
spawnDepth: "spawnDepth";
|
|
447
|
+
maxAgents: "maxAgents";
|
|
448
|
+
}>;
|
|
449
|
+
remaining: z.ZodNumber;
|
|
450
|
+
}, z.core.$strip>>;
|
|
451
|
+
declare const AgentAdmissionQueued: EventDefinition<"agent.admission_queued", z.ZodObject<{
|
|
452
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
453
|
+
capacity: z.ZodNumber;
|
|
454
|
+
}, z.core.$strip>>;
|
|
455
|
+
declare const AgentAdmissionGranted: EventDefinition<"agent.admission_granted", z.ZodObject<{
|
|
456
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
457
|
+
}, z.core.$strip>>;
|
|
458
|
+
declare const AgentAdmissionTimeout: EventDefinition<"agent.admission_timeout", z.ZodObject<{
|
|
459
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
460
|
+
waitedMs: z.ZodNumber;
|
|
461
|
+
}, z.core.$strip>>;
|
|
462
|
+
declare const AgentTurnFailed: EventDefinition<"agent.turn_failed", z.ZodObject<{
|
|
463
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
464
|
+
error: z.ZodString;
|
|
465
|
+
consecutiveFailures: z.ZodNumber;
|
|
466
|
+
}, z.core.$strip>>;
|
|
467
|
+
declare const AgentTurnInterrupted: EventDefinition<"agent.turn_interrupted", z.ZodObject<{
|
|
468
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
469
|
+
}, z.core.$strip>>;
|
|
470
|
+
declare const AgentSupervisionNeeded: EventDefinition<"agent.supervision_needed", z.ZodObject<{
|
|
471
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
472
|
+
reason: z.ZodEnum<{
|
|
473
|
+
ask: "ask";
|
|
474
|
+
"retries-exhausted": "retries-exhausted";
|
|
475
|
+
"circuit-tripped": "circuit-tripped";
|
|
476
|
+
}>;
|
|
477
|
+
error: z.ZodString;
|
|
478
|
+
}, z.core.$strip>>;
|
|
479
|
+
//#endregion
|
|
480
|
+
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 { _ as VERBS, a as NormalizedPermissionPolicy, b as isVerb, c as PermissionPolicy, d as EventRef, f as LedgerEnvelope, g as Subject, h as SUBJECTS, i as SetupStep, l as PermissionRule, m as isPersisted, n as AgentSpecSchema, o as PermissionAction, p as PersistedEnvelope, r as CredentialEnvBinding, s as PermissionMode, t as AgentSpec, u as DurableRef, v as Verb, x as parseName, y as isSubject } from "./agent-spec-BeNVCYXF.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-DJ7T_9Z-.mjs";
|
|
3
|
+
export { agent_d_exports as AgentEvents, type AgentSpec, AgentSpecSchema, alineod_d_exports as AlineodEvents, type CredentialEnvBinding, type DurableRef, type EnvelopeOf, type EventData, type EventDefinition, type EventRef, harness_d_exports as HarnessEvents, type LedgerEnvelope, 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, durableEvents, getEvent, isPersisted, isSubject, isVerb, parseName, renamedEventType, resourceRefOf };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { a as agent_exports, c as defineEvent, d as SUBJECTS, f as VERBS, h as parseName, i as harness_exports, l as durableEvents, m as isVerb, n as alineod_exports, o as sandbox_exports, p as isSubject, r as workflow_exports, s as allEvents, t as AgentSpecSchema, u as getEvent } from "./agent-spec-iZ9p1pjI.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/envelope.ts
|
|
4
|
+
function isPersisted(envelope) {
|
|
5
|
+
return envelope.durable !== void 0;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/resource-ref.ts
|
|
9
|
+
/**
|
|
10
|
+
* The durable identity an agent's memory is scoped by — `resourceId`, defaulting to `name`,
|
|
11
|
+
* plus the optional `teamId`.
|
|
12
|
+
*
|
|
13
|
+
* This is the one place the rule lives. The SDK (`Alineo.resourceId`, a spawned child's frozen
|
|
14
|
+
* `resourceId`, the ledger's `resourceId` threading) and alineod (which resolves an agent's
|
|
15
|
+
* memory scope from its persisted spec, with no live `Alineo` to ask) both call it, so a change
|
|
16
|
+
* to the rule cannot leave one of them scoping memory differently from the other.
|
|
17
|
+
*
|
|
18
|
+
* `resourceId` is `??`, not `||`: an explicitly set value wins even when it is falsy, exactly as
|
|
19
|
+
* it did when this was written inline.
|
|
20
|
+
*/
|
|
21
|
+
function resourceRefOf(spec) {
|
|
22
|
+
const resourceId = spec.resourceId ?? spec.name;
|
|
23
|
+
return spec.teamId === void 0 ? { resourceId } : {
|
|
24
|
+
resourceId,
|
|
25
|
+
teamId: spec.teamId
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/project.ts
|
|
30
|
+
/**
|
|
31
|
+
* The shape of `alineo.config.json`.
|
|
32
|
+
*
|
|
33
|
+
* Three consumers read the same file — `packages/agent`, `packages/cli-shared` and (through
|
|
34
|
+
* the Docker entrypoint) `apps/alineod` — so it cannot live in any one of them without forcing
|
|
35
|
+
* the other two to depend on a package for a file none of them owns. It lived in
|
|
36
|
+
* `config-shared` for that reason, which was the neutral home available at the time.
|
|
37
|
+
*
|
|
38
|
+
* Here now because this is the neutral home: shapes, no behaviour, and published, so a user
|
|
39
|
+
* writing an `alineo.config.json` by hand can get the type from the same place the tooling
|
|
40
|
+
* does. The mechanism — discovery, precedence, env overlay — stays in `config-shared`.
|
|
41
|
+
*
|
|
42
|
+
* Settings specific to a single consumer, such as alineod's timeouts, stay with that consumer
|
|
43
|
+
* and use `defineEnv`/`loadConfig` directly.
|
|
44
|
+
*/
|
|
45
|
+
const ProjectConfigObject = z.object({
|
|
46
|
+
/**
|
|
47
|
+
* 127.0.0.1, not "localhost" — some hosts resolve "localhost" to ::1 first, and OpenSandbox
|
|
48
|
+
* typically only listens on IPv4.
|
|
49
|
+
*/
|
|
50
|
+
serverUrl: z.string().min(1).default("http://127.0.0.1:8080"),
|
|
51
|
+
/** OpenSandbox API key. Empty string for local dev with no auth. */
|
|
52
|
+
apiKey: z.string().default(""),
|
|
53
|
+
/**
|
|
54
|
+
* Route execd and proxy traffic through the OpenSandbox server. Required when the server runs
|
|
55
|
+
* in Docker (e.g. started by `alineo init`).
|
|
56
|
+
*/
|
|
57
|
+
useServerProxy: z.boolean().default(true),
|
|
58
|
+
/**
|
|
59
|
+
* Anchor path used to derive the agent snapshot store location (`agent-snapshots.json` is
|
|
60
|
+
* written next to it). Does not select the ledger storage adapter.
|
|
61
|
+
*/
|
|
62
|
+
adapterPath: z.string().min(1).default("./.alineo/ledger.db"),
|
|
63
|
+
/** Directory holding agent spec files. */
|
|
64
|
+
agentsDir: z.string().min(1).default("./agents"),
|
|
65
|
+
/**
|
|
66
|
+
* Applied when an agent spec omits the field.
|
|
67
|
+
*
|
|
68
|
+
* `.prefault({})` rather than `.default({})`: Zod 4 uses a `default` value as-is, so
|
|
69
|
+
* `.default({})` on a nested object would yield a literal `{}` and leave `cpu`/`memory`
|
|
70
|
+
* undefined. `prefault` parses the value through the schema, which fills the inner defaults.
|
|
71
|
+
*/
|
|
72
|
+
defaults: z.object({ resources: z.object({
|
|
73
|
+
cpu: z.string().min(1).default("1000m"),
|
|
74
|
+
memory: z.string().min(1).default("1Gi")
|
|
75
|
+
}).prefault({}) }).prefault({})
|
|
76
|
+
});
|
|
77
|
+
/**
|
|
78
|
+
* In this file `null` means "not set", exactly as the hand-written reader's `??` chain used to
|
|
79
|
+
* treat it. The file is hand-editable, an interrupted write can leave `{"defaults": {"resources":
|
|
80
|
+
* null}}` behind, and no field here has a meaningful null value — so a stray null falls back to
|
|
81
|
+
* the built-in default instead of failing validation and taking the CLI or the daemon down.
|
|
82
|
+
*/
|
|
83
|
+
function dropNulls(value) {
|
|
84
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
|
|
85
|
+
const out = {};
|
|
86
|
+
for (const [key, inner] of Object.entries(value)) {
|
|
87
|
+
if (inner === null) continue;
|
|
88
|
+
out[key] = dropNulls(inner);
|
|
89
|
+
}
|
|
90
|
+
return out;
|
|
91
|
+
}
|
|
92
|
+
/** The project config schema, with nulls treated as absent. */
|
|
93
|
+
const ProjectConfigSchema = z.preprocess(dropNulls, ProjectConfigObject);
|
|
94
|
+
/** The underlying object schema, for JSON Schema emit (preprocess has no JSON Schema form). */
|
|
95
|
+
const ProjectConfigObjectSchema = ProjectConfigObject;
|
|
96
|
+
/** `$schema` URL written into a generated `alineo.config.json`. */
|
|
97
|
+
const PROJECT_CONFIG_SCHEMA_URL = "https://alineo.tech/schema/alineo.config.json";
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/renames.ts
|
|
100
|
+
/**
|
|
101
|
+
* The old flat event names, and what each became.
|
|
102
|
+
*
|
|
103
|
+
* This table is **dated and deletable**, not a standing feature. An earlier draft carried a
|
|
104
|
+
* `legacy` field on every definition so both names kept being written forever; that was
|
|
105
|
+
* dropped because a permanent two-names-per-event alias costs more than the break. The
|
|
106
|
+
* mapping survives here only because three stores hold old names in an `event` column and
|
|
107
|
+
* need a one-time migration — once no deployed database predates the rename, this file goes.
|
|
108
|
+
*
|
|
109
|
+
* Nothing reads it at runtime on the hot path. Its consumers are the store migrations and
|
|
110
|
+
* the test that proves every old name maps to a registered event.
|
|
111
|
+
*/
|
|
112
|
+
const RENAMED_EVENTS = Object.freeze({
|
|
113
|
+
sandbox_created: "sandbox.created",
|
|
114
|
+
sandbox_closed: "sandbox.closed",
|
|
115
|
+
sandbox_paused: "sandbox.paused",
|
|
116
|
+
sandbox_resumed: "sandbox.resumed",
|
|
117
|
+
checkpoint_created: "sandbox.checkpoint_created",
|
|
118
|
+
exec_start: "exec.started",
|
|
119
|
+
exec_event: "exec.output",
|
|
120
|
+
exec_complete: "exec.completed",
|
|
121
|
+
egress_rule_added: "egress.rule_added",
|
|
122
|
+
egress_rule_removed: "egress.rule_removed",
|
|
123
|
+
credential_bound: "credential.bound",
|
|
124
|
+
credential_revoked: "credential.revoked",
|
|
125
|
+
permission_requested: "permission.requested",
|
|
126
|
+
permission_resolved: "permission.resolved",
|
|
127
|
+
permission_request: "permission.requested",
|
|
128
|
+
workflow_complete: "workflow.completed",
|
|
129
|
+
workflow_failed: "workflow.failed",
|
|
130
|
+
step_start: "step.started",
|
|
131
|
+
step_complete: "step.completed",
|
|
132
|
+
step_failed: "step.failed",
|
|
133
|
+
step_rolled_back: "step.rolled_back",
|
|
134
|
+
snapshot: "sandbox.checkpoint_created",
|
|
135
|
+
agent_spawned: "agent.spawned",
|
|
136
|
+
agent_provisioned: "agent.provisioned",
|
|
137
|
+
agent_state_changed: "agent.state_changed",
|
|
138
|
+
agent_steered: "agent.steered",
|
|
139
|
+
agent_released: "agent.released",
|
|
140
|
+
agent_ended: "agent.ended",
|
|
141
|
+
handle_settled: "handle.settled",
|
|
142
|
+
wait_resolved: "wait.resolved",
|
|
143
|
+
wait_blocked_on_paused: "wait.blocked",
|
|
144
|
+
inbox_queued: "inbox.queued",
|
|
145
|
+
inbox_delivered: "inbox.delivered",
|
|
146
|
+
inbox_dropped: "inbox.dropped",
|
|
147
|
+
notify_registered: "notify.registered",
|
|
148
|
+
budget_denied: "budget.denied",
|
|
149
|
+
subtree_quiescent: "run.quiescent",
|
|
150
|
+
agent_start: "session.started",
|
|
151
|
+
agent_end: "session.ended",
|
|
152
|
+
turn_start: "turn.started",
|
|
153
|
+
turn_end: "turn.ended",
|
|
154
|
+
tool_start: "tool.started",
|
|
155
|
+
tool_update: "tool.updated",
|
|
156
|
+
tool_end: "tool.ended",
|
|
157
|
+
message_start: "message.started",
|
|
158
|
+
message_update: "message.updated",
|
|
159
|
+
message_end: "message.ended",
|
|
160
|
+
text: "message.updated",
|
|
161
|
+
compaction_start: "compaction.started",
|
|
162
|
+
compaction_end: "compaction.ended",
|
|
163
|
+
auto_retry_start: "retry.started",
|
|
164
|
+
auto_retry_end: "retry.ended",
|
|
165
|
+
queue_update: "queue.updated",
|
|
166
|
+
extension_ui: "extension.ui",
|
|
167
|
+
extension_error: "extension.error"
|
|
168
|
+
});
|
|
169
|
+
/**
|
|
170
|
+
* The new name for an old one, or `undefined` if the name was never renamed.
|
|
171
|
+
*
|
|
172
|
+
* `run_started` returns `undefined` on purpose — it is the one name that meant two different
|
|
173
|
+
* events, so the caller's own context decides.
|
|
174
|
+
*/
|
|
175
|
+
function renamedEventType(old) {
|
|
176
|
+
return RENAMED_EVENTS[old];
|
|
177
|
+
}
|
|
178
|
+
//#endregion
|
|
179
|
+
export { agent_exports as AgentEvents, AgentSpecSchema, alineod_exports as AlineodEvents, harness_exports as HarnessEvents, PROJECT_CONFIG_SCHEMA_URL, ProjectConfigObjectSchema, ProjectConfigSchema, RENAMED_EVENTS, SUBJECTS, sandbox_exports as SandboxEvents, VERBS, workflow_exports as WorkflowEvents, allEvents, defineEvent, durableEvents, getEvent, isPersisted, isSubject, isVerb, parseName, renamedEventType, resourceRefOf };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll as t };
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as NormalizedPermissionPolicy, c as PermissionPolicy, d as EventRef, f as LedgerEnvelope, g as Subject, i as SetupStep, l as PermissionRule, o as PermissionAction, p as PersistedEnvelope, r as CredentialEnvBinding, s as PermissionMode, t as AgentSpec, u as DurableRef, v as Verb } from "./agent-spec-BeNVCYXF.mjs";
|
|
2
|
+
export type { AgentSpec, CredentialEnvBinding, DurableRef, EventRef, LedgerEnvelope, NormalizedPermissionPolicy, PermissionAction, PermissionMode, PermissionPolicy, PermissionRule, PersistedEnvelope, SetupStep, Subject, Verb };
|