@fevex/core 0.1.0-alpha.1 → 0.1.0-alpha.3

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.
Files changed (49) hide show
  1. package/README.md +424 -6
  2. package/dist/agents/index.d.mts +1 -1
  3. package/dist/agents/index.mjs +1 -1
  4. package/dist/channels/index.d.mts +2 -0
  5. package/dist/channels/index.mjs +150 -0
  6. package/dist/evals/index.d.mts +19 -11
  7. package/dist/evals/index.mjs +125 -122
  8. package/dist/fevex-Ddyi6z6L.d.mts +60 -0
  9. package/dist/http/index.d.mts +90 -0
  10. package/dist/http/index.mjs +470 -0
  11. package/dist/{index-ojCY3lwm.d.mts → index-B4PIkqOU.d.mts} +5 -4
  12. package/dist/index-Bg9rr8Qe.d.mts +50 -0
  13. package/dist/index-Bgcxgy66.d.mts +82 -0
  14. package/dist/index-CTIwrVf9.d.mts +51 -0
  15. package/dist/index-CqOjvtQ9.d.mts +132 -0
  16. package/dist/index-CrOId2px.d.mts +66 -0
  17. package/dist/index-DeXUtyd9.d.mts +70 -0
  18. package/dist/index-DviHtsLo.d.mts +58 -0
  19. package/dist/index-Dx_LotWZ.d.mts +425 -0
  20. package/dist/{index-QTkd6a7C.d.mts → index-dkFyTNh4.d.mts} +4 -3
  21. package/dist/index.d.mts +22 -10
  22. package/dist/index.mjs +2784 -720
  23. package/dist/knowledge/index.d.mts +2 -0
  24. package/dist/knowledge/index.mjs +89 -0
  25. package/dist/models/index.d.mts +2 -46
  26. package/dist/observability/index.d.mts +1 -1
  27. package/dist/policies/index.d.mts +1 -1
  28. package/dist/policies/index.mjs +1 -1
  29. package/dist/run-error-Cr17wPGH.mjs +23 -0
  30. package/dist/runtime/index.d.mts +2 -2
  31. package/dist/runtime/index.mjs +58 -9
  32. package/dist/sandbox/index.d.mts +2 -0
  33. package/dist/sandbox/index.mjs +122 -0
  34. package/dist/teams/index.d.mts +2 -0
  35. package/dist/teams/index.mjs +2 -0
  36. package/dist/teams-Ctz676G4.mjs +82 -0
  37. package/dist/testing/index.d.mts +33 -9
  38. package/dist/testing/index.mjs +415 -27
  39. package/dist/tools/index.d.mts +3 -3
  40. package/dist/tools/index.mjs +222 -2
  41. package/dist/types-CuoRx12Q.d.mts +333 -0
  42. package/dist/workflows/index.d.mts +2 -0
  43. package/dist/workflows/index.mjs +6 -0
  44. package/package.json +27 -3
  45. package/dist/fevex-Dz6GBz9o.d.mts +0 -32
  46. package/dist/index-BzxHfyYV.d.mts +0 -23
  47. package/dist/index-CZGyhNIQ.d.mts +0 -47
  48. package/dist/index-C_Zpr13f.d.mts +0 -124
  49. package/dist/index-DGWOGXzc.d.mts +0 -181
@@ -0,0 +1,425 @@
1
+ import { t as ExactDefinition } from "./exact-definition-NHBBFlFR.mjs";
2
+ import { f as RunId, i as AgentMessage, l as JsonValue, o as ExecutionContext, s as JsonObject, t as AgentEvent } from "./types-CuoRx12Q.mjs";
3
+ import { c as ReasoningEffort, i as ModelRef, l as ToolChoice, s as ModelUsage } from "./index-CTIwrVf9.mjs";
4
+ import { StandardSchemaV1 } from "@standard-schema/spec";
5
+ //#region src/runtime/run-store.d.ts
6
+ /** Stable identifier for conversation history shared across runs. */
7
+ type SessionId = string;
8
+ type RunStatus = 'running' | 'paused' | 'completed' | 'failed' | 'cancelled';
9
+ interface ApprovalRequest {
10
+ id: string;
11
+ toolCallId: string;
12
+ toolName: string;
13
+ toolLabel?: string;
14
+ input: JsonValue;
15
+ risk: 'read' | 'write' | 'sensitive' | 'destructive';
16
+ requestedAt: string;
17
+ }
18
+ type ElicitationMode = 'pause' | 'forbid';
19
+ type ApprovalMode = 'pause' | 'deny';
20
+ interface ElicitationRequest {
21
+ id: string;
22
+ toolCallId: string;
23
+ prompt: string;
24
+ responseSchema: JsonObject;
25
+ requestedAt: string;
26
+ expiresAt?: string;
27
+ }
28
+ type AgentRunPause = {
29
+ type: 'elicitation';
30
+ request: ElicitationRequest;
31
+ } | {
32
+ type: 'approval';
33
+ approval: ApprovalRequest;
34
+ } | {
35
+ type: 'tool_execution_unknown';
36
+ toolCallId: string;
37
+ toolName: string;
38
+ input: JsonValue;
39
+ };
40
+ type RunPause = AgentRunPause | {
41
+ type: 'workflow_child';
42
+ childRunId: RunId;
43
+ childPause: AgentRunPause;
44
+ } | {
45
+ type: 'workflow_children';
46
+ children: Array<{
47
+ stepId: string;
48
+ childRunId: RunId;
49
+ childPause: AgentRunPause;
50
+ }>;
51
+ } | {
52
+ type: 'workflow_timer';
53
+ stepId: string;
54
+ resumeAt: string;
55
+ } | {
56
+ type: 'workflow_event';
57
+ stepId: string;
58
+ eventName: string;
59
+ };
60
+ interface ApprovalResolution {
61
+ type: 'approval';
62
+ approvalId: string;
63
+ decision: 'approve' | 'reject';
64
+ actor: {
65
+ id: string;
66
+ type?: string;
67
+ };
68
+ }
69
+ interface ElicitationResolution {
70
+ type: 'elicitation';
71
+ requestId: string;
72
+ value: JsonValue;
73
+ actor: {
74
+ id: string;
75
+ type?: string;
76
+ };
77
+ }
78
+ type ToolExecutionResolution = {
79
+ type: 'tool_execution';
80
+ toolCallId: string;
81
+ decision: 'use_output';
82
+ output: JsonValue;
83
+ actor: {
84
+ id: string;
85
+ type?: string;
86
+ };
87
+ } | {
88
+ type: 'tool_execution';
89
+ toolCallId: string;
90
+ decision: 'retry';
91
+ actor: {
92
+ id: string;
93
+ type?: string;
94
+ };
95
+ };
96
+ type TimerResolution = {
97
+ type: 'timer';
98
+ actor?: {
99
+ id: string;
100
+ type?: string;
101
+ };
102
+ };
103
+ type EventResolution = {
104
+ type: 'event';
105
+ eventName: string;
106
+ payload?: JsonValue;
107
+ actor?: {
108
+ id: string;
109
+ type?: string;
110
+ };
111
+ };
112
+ type ResumeRunResolution = ElicitationResolution | ApprovalResolution | ToolExecutionResolution | TimerResolution | EventResolution;
113
+ interface AgentRun<TOutput = JsonValue> {
114
+ kind?: 'agent';
115
+ id: RunId;
116
+ sessionId: SessionId;
117
+ agentName: string;
118
+ status: RunStatus;
119
+ revision: number;
120
+ pause?: RunPause;
121
+ createdAt: string;
122
+ updatedAt: string;
123
+ output?: TOutput;
124
+ error?: string;
125
+ usage?: ModelUsage;
126
+ }
127
+ interface WorkflowRun<TOutput = JsonValue> {
128
+ kind: 'workflow';
129
+ id: RunId;
130
+ sessionId: SessionId;
131
+ workflowName: string;
132
+ status: RunStatus;
133
+ revision: number;
134
+ pause?: RunPause;
135
+ createdAt: string;
136
+ updatedAt: string;
137
+ output?: TOutput;
138
+ error?: string;
139
+ usage?: ModelUsage;
140
+ }
141
+ interface TeamRun<TOutput = JsonValue> {
142
+ kind: 'team';
143
+ id: RunId;
144
+ sessionId: SessionId;
145
+ teamName: string;
146
+ status: RunStatus;
147
+ revision: number;
148
+ pause?: RunPause;
149
+ createdAt: string;
150
+ updatedAt: string;
151
+ output?: TOutput;
152
+ error?: string;
153
+ usage?: ModelUsage;
154
+ }
155
+ type CoordinatorRun<TOutput = JsonValue> = WorkflowRun<TOutput> | TeamRun<TOutput>;
156
+ type RunRecord<TOutput = unknown> = AgentRun<TOutput> | WorkflowRun<TOutput> | TeamRun<TOutput>;
157
+ interface Session {
158
+ /** Optimistic history revision. Missing on legacy sessions means zero. Store-managed. */
159
+ revision?: number;
160
+ id: SessionId;
161
+ history: AgentMessage[];
162
+ createdAt: string;
163
+ updatedAt: string;
164
+ }
165
+ interface ListEventsOptions {
166
+ after?: AgentEvent['id'];
167
+ /** Maximum results; omitted preserves the complete result for existing consumers. */
168
+ limit?: number;
169
+ /** Sequence order. Use descending with limit: 1 for the latest event. */
170
+ order?: 'asc' | 'desc';
171
+ }
172
+ declare function validateListEventsOptions(options: ListEventsOptions): void;
173
+ interface RunStore {
174
+ getRun<TRun extends RunRecord<unknown> = AgentRun>(runId: RunId): Promise<TRun | undefined>;
175
+ saveRun(run: RunRecord): Promise<void>;
176
+ getSession(sessionId: SessionId): Promise<Session | undefined>;
177
+ /** Compare and advance revision; reject active/paused sessions and stale snapshots. */
178
+ saveSession(session: Session): Promise<void>;
179
+ appendEvent(event: AgentEvent): Promise<void>;
180
+ listEvents(runId: RunId, options?: ListEventsOptions): Promise<AgentEvent[]>;
181
+ }
182
+ interface CredentialStore {
183
+ resolve(input: {
184
+ name: string;
185
+ namespace?: string;
186
+ actor?: {
187
+ id: string;
188
+ type?: string;
189
+ };
190
+ }): Promise<string | undefined>;
191
+ }
192
+ interface PendingToolExecution {
193
+ call: {
194
+ id: string;
195
+ name: string;
196
+ input: JsonValue;
197
+ };
198
+ input: JsonValue;
199
+ idempotencyKey: string;
200
+ attempt: number;
201
+ }
202
+ interface RunCheckpoint {
203
+ version: 2;
204
+ kind?: 'agent';
205
+ runId: RunId;
206
+ modelName?: string;
207
+ reasoning?: ReasoningEffort;
208
+ definitionHash: string;
209
+ limits?: AgentLimits;
210
+ messages: AgentMessage[];
211
+ inputContent: string;
212
+ context?: ExecutionContext;
213
+ usage?: ModelUsage;
214
+ providerState?: JsonValue;
215
+ step: number;
216
+ toolCallCount: number;
217
+ seenToolCallIds: string[];
218
+ pendingTools: PendingToolExecution[];
219
+ pendingIndex: number;
220
+ effectiveElicitationMode?: ElicitationMode;
221
+ effectiveApprovalMode?: ApprovalMode;
222
+ effectiveToolChoice?: ToolChoice;
223
+ }
224
+ type WorkflowStepRecord = {
225
+ type: 'agent';
226
+ status: 'running';
227
+ agentName: string;
228
+ childRunId: RunId;
229
+ metadata?: JsonObject;
230
+ } | {
231
+ type: 'agent';
232
+ status: 'completed';
233
+ agentName: string;
234
+ childRunId: RunId;
235
+ result: RunResult<JsonValue>;
236
+ compensation?: WorkflowCompensationRecord;
237
+ metadata?: JsonObject;
238
+ } | {
239
+ type: 'parallel';
240
+ status: 'running';
241
+ metadata?: JsonObject;
242
+ } | {
243
+ type: 'parallel';
244
+ status: 'completed';
245
+ result: JsonObject;
246
+ compensation?: WorkflowCompensationRecord;
247
+ metadata?: JsonObject;
248
+ } | {
249
+ type: 'wait';
250
+ status: 'running';
251
+ wait: WorkflowWaitRecord;
252
+ } | {
253
+ type: 'wait';
254
+ status: 'completed';
255
+ wait: WorkflowWaitRecord;
256
+ payload?: JsonValue;
257
+ actor?: NonNullable<ExecutionContext['actor']>;
258
+ receivedAt?: string;
259
+ };
260
+ interface WorkflowCompensationRecord {
261
+ status: 'pending' | 'completed' | 'failed';
262
+ error?: string;
263
+ }
264
+ type WorkflowWaitRecord = {
265
+ type: 'timer';
266
+ resumeAt: string;
267
+ } | {
268
+ type: 'event';
269
+ eventName: string;
270
+ requireActor: boolean;
271
+ };
272
+ interface WorkflowBudgetUsage {
273
+ usage?: ModelUsage;
274
+ steps: number;
275
+ toolCalls: number;
276
+ }
277
+ interface WorkflowCheckpoint {
278
+ version: 2;
279
+ kind: 'workflow';
280
+ runId: RunId;
281
+ workflowName: string;
282
+ model?: string;
283
+ reasoning?: ReasoningEffort;
284
+ definitionHash: string;
285
+ input: JsonValue;
286
+ context?: ExecutionContext;
287
+ steps: Record<string, WorkflowStepRecord>;
288
+ limits?: AgentLimits;
289
+ budget?: WorkflowBudgetUsage;
290
+ }
291
+ interface TeamCheckpoint extends Omit<WorkflowCheckpoint, 'kind' | 'workflowName'> {
292
+ kind: 'team';
293
+ teamName: string;
294
+ }
295
+ type CoordinatorCheckpoint = WorkflowCheckpoint | TeamCheckpoint;
296
+ type StoredRunCheckpoint = RunCheckpoint | WorkflowCheckpoint | TeamCheckpoint;
297
+ type ToolExecutionStatus = 'started' | 'completed' | 'failed' | 'unknown';
298
+ interface ToolExecutionRecord {
299
+ runId: RunId;
300
+ toolCallId: string;
301
+ toolName: string;
302
+ input: JsonValue;
303
+ status: ToolExecutionStatus;
304
+ attempt: number;
305
+ idempotencyKey: string;
306
+ output?: JsonValue;
307
+ error?: string;
308
+ updatedAt: string;
309
+ }
310
+ /** Store assigns a new generation on creation/acquisition; callers must retain it. */
311
+ interface RunLease {
312
+ generation: number;
313
+ runId: RunId;
314
+ ownerId: string;
315
+ expiresAt: string;
316
+ }
317
+ interface ExecutionCommit {
318
+ /** Current lease identity; ownership, generation and expiry are checked atomically. */
319
+ lease: Pick<RunLease, 'ownerId' | 'generation'>;
320
+ expectedRevision: number;
321
+ run: RunRecord;
322
+ checkpoint?: StoredRunCheckpoint | null;
323
+ session?: Session;
324
+ toolExecution?: ToolExecutionRecord;
325
+ events?: AgentEvent[];
326
+ }
327
+ /** Atomically reserve the session until this run is terminal, including across pause/crash. */
328
+ interface ExecutionCreate {
329
+ run: RunRecord;
330
+ checkpoint: StoredRunCheckpoint;
331
+ /** Snapshot used to prepare the run; revision must match the stored history. */
332
+ session: Session;
333
+ lease: RunLease;
334
+ events: AgentEvent[];
335
+ }
336
+ interface DurableRunStore extends RunStore {
337
+ getCheckpoint<TCheckpoint extends StoredRunCheckpoint = RunCheckpoint>(runId: RunId): Promise<TCheckpoint | undefined>;
338
+ getToolExecution(runId: RunId, toolCallId: string): Promise<ToolExecutionRecord | undefined>;
339
+ /** On success, assigns run/session revisions and lease generation 1. */
340
+ createExecution(create: ExecutionCreate): Promise<boolean>;
341
+ commitExecution(commit: ExecutionCommit): Promise<boolean>;
342
+ /** Acquires only absent/expired leases and assigns a strictly newer generation. */
343
+ acquireLease(lease: RunLease): Promise<boolean>;
344
+ /** Requires matching owner/generation and an unexpired stored lease. */
345
+ renewLease(lease: RunLease): Promise<boolean>;
346
+ /** Expires a matching token while retaining its generation for future acquisitions. */
347
+ releaseLease(runId: RunId, ownerId: string, generation: number): Promise<void>;
348
+ }
349
+ declare function isDurableRunStore(store: RunStore): store is DurableRunStore;
350
+ interface RunRequest<TInput = unknown, TOutput = unknown> {
351
+ input: TInput;
352
+ model?: string;
353
+ reasoning?: ReasoningEffort;
354
+ context?: ExecutionContext;
355
+ limits?: AgentLimits;
356
+ elicitation?: ElicitationMode;
357
+ approvalMode?: ApprovalMode;
358
+ toolChoice?: ToolChoice;
359
+ sessionId?: SessionId;
360
+ signal?: AbortSignal;
361
+ }
362
+ interface RunResult<TOutput = unknown> {
363
+ runId: RunId;
364
+ sessionId: SessionId;
365
+ output: TOutput;
366
+ events?: AgentEvent[];
367
+ usage?: ModelUsage;
368
+ }
369
+ //#endregion
370
+ //#region src/runtime/in-memory-run-store.d.ts
371
+ /**
372
+ * In-process durable store intended for development and tests.
373
+ *
374
+ * Values are cloned at the boundary so callers cannot mutate persisted state.
375
+ * Data is lost when the process exits.
376
+ */
377
+ declare class InMemoryRunStore implements DurableRunStore {
378
+ #private;
379
+ getRun<TRun extends RunRecord<unknown> = AgentRun>(runId: RunId): Promise<TRun | undefined>;
380
+ saveRun(run: RunRecord): Promise<void>;
381
+ getSession(sessionId: SessionId): Promise<Session | undefined>;
382
+ saveSession(session: Session): Promise<void>;
383
+ appendEvent(event: AgentEvent): Promise<void>;
384
+ listEvents(runId: RunId, options?: ListEventsOptions): Promise<AgentEvent[]>;
385
+ getCheckpoint<TCheckpoint extends StoredRunCheckpoint = RunCheckpoint>(runId: RunId): Promise<TCheckpoint | undefined>;
386
+ getToolExecution(runId: RunId, toolCallId: string): Promise<ToolExecutionRecord | undefined>;
387
+ createExecution(create: ExecutionCreate): Promise<boolean>;
388
+ commitExecution(commit: ExecutionCommit): Promise<boolean>;
389
+ acquireLease(lease: RunLease): Promise<boolean>;
390
+ renewLease(lease: RunLease): Promise<boolean>;
391
+ releaseLease(runId: RunId, ownerId: string, generation: number): Promise<void>;
392
+ }
393
+ //#endregion
394
+ //#region src/agents/agent.d.ts
395
+ /** Resource limits enforced by the runtime for a single agent run. */
396
+ interface AgentLimits {
397
+ maxSteps?: number;
398
+ maxToolCalls?: number;
399
+ maxInputTokens?: number | false;
400
+ maxOutputTokens?: number | false;
401
+ }
402
+ interface AgentDefinition<TInput = unknown, TOutput = unknown> {
403
+ name: string;
404
+ instructions: string;
405
+ model?: ModelRef;
406
+ tools?: string[];
407
+ context?: string[];
408
+ memory?: {
409
+ read?: boolean;
410
+ write?: boolean;
411
+ limit?: number;
412
+ };
413
+ skills?: string[];
414
+ reasoning?: ReasoningEffort;
415
+ modelOptions?: Record<string, unknown>;
416
+ toolChoice?: ToolChoice;
417
+ elicitation?: ElicitationMode;
418
+ approvalMode?: ApprovalMode;
419
+ inputSchema?: StandardSchemaV1<unknown, TInput>;
420
+ outputSchema?: StandardSchemaV1<unknown, TOutput>;
421
+ limits?: AgentLimits;
422
+ }
423
+ declare function defineAgent<T extends AgentDefinition>(agent: ExactDefinition<T, AgentDefinition>): T;
424
+ //#endregion
425
+ export { RunStore as A, WorkflowBudgetUsage as B, RunCheckpoint as C, RunRequest as D, RunRecord as E, TeamRun as F, WorkflowWaitRecord as G, WorkflowCompensationRecord as H, TimerResolution as I, isDurableRunStore as K, ToolExecutionRecord as L, SessionId as M, StoredRunCheckpoint as N, RunResult as O, TeamCheckpoint as P, ToolExecutionResolution as R, ResumeRunResolution as S, RunPause as T, WorkflowRun as U, WorkflowCheckpoint as V, WorkflowStepRecord as W, EventResolution as _, AgentRun as a, ListEventsOptions as b, ApprovalRequest as c, CoordinatorRun as d, CredentialStore as f, ElicitationResolution as g, ElicitationRequest as h, InMemoryRunStore as i, Session as j, RunStatus as k, ApprovalResolution as l, ElicitationMode as m, AgentLimits as n, AgentRunPause as o, DurableRunStore as p, validateListEventsOptions as q, defineAgent as r, ApprovalMode as s, AgentDefinition as t, CoordinatorCheckpoint as u, ExecutionCommit as v, RunLease as w, PendingToolExecution as x, ExecutionCreate as y, ToolExecutionStatus as z };
@@ -1,6 +1,7 @@
1
- import { f as RunId, l as JsonValue, o as ExecutionContext } from "./index-C_Zpr13f.mjs";
2
- import { s as ToolRisk } from "./index-CZGyhNIQ.mjs";
3
- //#region src/policies/index.d.ts
1
+ import { f as RunId, l as JsonValue, o as ExecutionContext } from "./types-CuoRx12Q.mjs";
2
+ import { x as ToolRisk } from "./index-CqOjvtQ9.mjs";
3
+ //#region src/policies/policy.d.ts
4
+ /** Authorization outcome returned by a policy. */
4
5
  type PolicyDecision = 'allow' | 'deny' | 'require_approval';
5
6
  interface PolicyAuthorization {
6
7
  runId: RunId;
package/dist/index.d.mts CHANGED
@@ -1,19 +1,31 @@
1
- import { a as AgentMessageRole, c as JsonPrimitive, d as PROVIDER_SCHEMA_UNSUPPORTED, f as RunId, h as ToolSpec, i as AgentMessage, l as JsonValue, m as ToolCall, n as AgentEventPayloads, o as ExecutionContext, p as SCHEMA_NOT_TRANSPORTABLE, r as AgentEventType, s as JsonObject, t as AgentEvent, u as PROVIDER_REASONING_UNSUPPORTED } from "./index-C_Zpr13f.mjs";
2
- import { ModelGateway, ModelInput, ModelMetadata, ModelRef, ModelResult, ModelStreamEvent, ModelUsage, ReasoningEffort } from "./models/index.mjs";
3
- import { n as AgentLimits, r as defineAgent, t as AgentDefinition } from "./index-BzxHfyYV.mjs";
4
- import { C as isDurableRunStore, S as ToolExecutionStatus, _ as RunStore, a as DurableRunStore, b as ToolExecutionRecord, c as ListEventsOptions, d as RunCheckpoint, f as RunLease, g as RunStatus, h as RunResult, i as CredentialStore, l as PendingToolExecution, m as RunRequest, n as ApprovalRequest, o as ExecutionCommit, p as RunPause, r as ApprovalResolution, s as InMemoryRunStore, t as AgentRun, u as ResumeRunResolution, v as Session, x as ToolExecutionResolution, y as SessionId } from "./index-DGWOGXzc.mjs";
5
- import { a as ToolResult, c as defineTool, i as ToolIdempotency, l as toToolSpec, n as ToolDefinition, o as ToolRetryPolicy, r as ToolExecutionContext, s as ToolRisk, t as ToolApproval } from "./index-CZGyhNIQ.mjs";
6
- import { i as definePolicy, n as PolicyDecision, r as PolicyDefinition, t as PolicyAuthorization } from "./index-QTkd6a7C.mjs";
7
- import { n as FevexConfig, r as createFevex, t as Fevex } from "./fevex-Dz6GBz9o.mjs";
1
+ import { a as AgentMessageRole, c as JsonPrimitive, d as PROVIDER_SCHEMA_UNSUPPORTED, f as RunId, g as ToolSpec, h as ToolEventSource, i as AgentMessage, l as JsonValue, m as ToolCall, n as AgentEventPayloads, o as ExecutionContext, p as SCHEMA_NOT_TRANSPORTABLE, r as AgentEventType, s as JsonObject, t as AgentEvent, u as PROVIDER_REASONING_UNSUPPORTED } from "./types-CuoRx12Q.mjs";
2
+ import { a as ModelResult, c as ReasoningEffort, i as ModelRef, l as ToolChoice, n as ModelInput, o as ModelStreamEvent, r as ModelMetadata, s as ModelUsage, t as ModelGateway } from "./index-CTIwrVf9.mjs";
3
+ import { A as RunStore, B as WorkflowBudgetUsage, C as RunCheckpoint, D as RunRequest, E as RunRecord, F as TeamRun, G as WorkflowWaitRecord, H as WorkflowCompensationRecord, I as TimerResolution, K as isDurableRunStore, L as ToolExecutionRecord, M as SessionId, N as StoredRunCheckpoint, O as RunResult, P as TeamCheckpoint, R as ToolExecutionResolution, S as ResumeRunResolution, T as RunPause, U as WorkflowRun, V as WorkflowCheckpoint, W as WorkflowStepRecord, _ as EventResolution, a as AgentRun, b as ListEventsOptions, c as ApprovalRequest, d as CoordinatorRun, f as CredentialStore, g as ElicitationResolution, h as ElicitationRequest, i as InMemoryRunStore, j as Session, k as RunStatus, l as ApprovalResolution, m as ElicitationMode, n as AgentLimits, o as AgentRunPause, p as DurableRunStore, q as validateListEventsOptions, r as defineAgent, s as ApprovalMode, t as AgentDefinition, u as CoordinatorCheckpoint, v as ExecutionCommit, w as RunLease, x as PendingToolExecution, y as ExecutionCreate, z as ToolExecutionStatus } from "./index-Dx_LotWZ.mjs";
4
+ import { a as MemoryQuery, c as MemoryWrite, d as defineContextProvider, f as defineSkill, i as KnowledgeContext, l as SkillDefinition, n as ContextBlock, o as MemoryRecord, r as ContextProvider, s as MemoryStore, t as InMemoryMemoryStore, u as createMemoryContextProvider } from "./index-DeXUtyd9.mjs";
5
+ import { a as SandboxError, c as sandboxResultToJson, i as SandboxCapabilities, n as createLocalSandbox, o as SandboxRunRequest, r as Sandbox, s as SandboxRunResult, t as LocalSandboxOptions } from "./index-CrOId2px.mjs";
6
+ import { C as toToolSpec, S as defineTool, _ as ToolExecutionContext, a as compileFevexJsonSchema, b as ToolRetryPolicy, c as ConnectionToolPolicy, d as ToolProvider, f as ToolProviderContext, g as ToolDefinition, h as ToolApproval, i as FevexJsonSchemaValidator, l as IntegrationError, m as defineConnection, n as FevexJsonSchemaProfileLimits, o as validateFevexJsonSchemaProfile, p as ToolProviderTool, r as FevexJsonSchemaProfileOptions, s as ConnectionDefinition, t as FEVEX_JSON_SCHEMA_PROFILE_VERSION, u as IntegrationErrorCategory, v as ToolIdempotency, x as ToolRisk, y as ToolResult } from "./index-CqOjvtQ9.mjs";
7
+ import { i as definePolicy, n as PolicyDecision, r as PolicyDefinition, t as PolicyAuthorization } from "./index-dkFyTNh4.mjs";
8
+ import { a as WorkflowStep, c as defineWorkflow, i as WorkflowEventResult, n as WorkflowDefinition, o as WorkflowStepContext, r as WorkflowEventDefinition, s as WorkflowStepOptions, t as WorkflowAgentResult } from "./index-DviHtsLo.mjs";
9
+ import { a as TeamMember, c as defineTeam, i as TeamLimits, n as TeamDelegation, o as TeamStep, r as TeamHandoff, s as TeamTaskResult, t as TeamDefinition } from "./index-Bg9rr8Qe.mjs";
10
+ import { n as FevexConfig, r as createFevex, t as Fevex } from "./fevex-Ddyi6z6L.mjs";
11
+ import { a as ChannelEvent, c as ChannelMessage, d as ChannelRunOptions, f as ChannelRunResult, i as ChannelError, l as ChannelOutput, n as ChannelAdapter, o as ChannelEventType, r as ChannelContext, s as ChannelFailurePhase, t as handleChannelInput, u as ChannelRunEvent } from "./index-Bgcxgy66.mjs";
8
12
  //#region src/configuration-error.d.ts
9
- type FevexConfigurationErrorCode = 'INVALID_CONFIG' | 'INVALID_MODEL' | 'INVALID_AGENT' | 'INVALID_TOOL' | 'DUPLICATE_AGENT' | 'DUPLICATE_TOOL' | 'MISSING_MODEL' | 'MISSING_TOOL';
13
+ /**
14
+ * Composition error codes.
15
+ *
16
+ * `INVALID_CONFIG` is reserved for the shape of the root config object. Every
17
+ * registered entity has its own `INVALID_*` code, plus `DUPLICATE_*` when it is
18
+ * registered by name and `MISSING_*` when an agent references something that
19
+ * was never registered.
20
+ */
21
+ type FevexConfigurationErrorCode = 'INVALID_CONFIG' | 'INVALID_MODEL' | 'INVALID_AGENT' | 'INVALID_TOOL' | 'INVALID_WORKFLOW' | 'INVALID_TEAM' | 'INVALID_CONNECTION' | 'INVALID_CONTEXT_PROVIDER' | 'INVALID_POLICY' | 'DUPLICATE_AGENT' | 'DUPLICATE_TOOL' | 'DUPLICATE_WORKFLOW' | 'DUPLICATE_TEAM' | 'DUPLICATE_CONTEXT_PROVIDER' | 'MISSING_MODEL' | 'MISSING_TOOL';
10
22
  declare class FevexConfigurationError extends Error {
11
23
  readonly code: FevexConfigurationErrorCode;
12
24
  constructor(code: FevexConfigurationErrorCode, message: string);
13
25
  }
14
26
  //#endregion
15
27
  //#region src/run-error.d.ts
16
- type FevexRunErrorCode = 'DURABLE_STORE_REQUIRED' | 'RUN_CONFLICT' | 'RUN_NOT_RESUMABLE' | 'RUN_DEFINITION_CHANGED' | 'POLICY_DENIED' | 'CREDENTIAL_NOT_FOUND' | 'APPROVAL_INVALID' | 'RUN_PAUSED' | 'TOOL_EXECUTION_UNKNOWN';
28
+ type FevexRunErrorCode = 'INVALID_CURSOR' | 'AGENT_NOT_FOUND' | 'WORKFLOW_NOT_FOUND' | 'TEAM_NOT_FOUND' | 'MODEL_NOT_FOUND' | 'SESSION_NOT_FOUND' | 'DURABLE_STORE_REQUIRED' | 'RUN_CONFLICT' | 'RUN_NOT_RESUMABLE' | 'RUN_NOT_RECOVERABLE' | 'CHECKPOINT_UNSUPPORTED' | 'RUN_DEFINITION_CHANGED' | 'POLICY_DENIED' | 'CREDENTIAL_NOT_FOUND' | 'SANDBOX_REQUIRED' | 'ELICITATION_INVALID' | 'APPROVAL_INVALID' | 'RUN_PAUSED' | 'TOOL_EXECUTION_UNKNOWN';
17
29
  declare class FevexRunError extends Error {
18
30
  readonly code: FevexRunErrorCode;
19
31
  readonly runId?: RunId | undefined;
@@ -27,4 +39,4 @@ declare class RunPausedError extends FevexRunError {
27
39
  constructor(runId: RunId, pause: RunPause);
28
40
  }
29
41
  //#endregion
30
- export { AgentDefinition, AgentEvent, AgentEventPayloads, AgentEventType, AgentLimits, AgentMessage, AgentMessageRole, AgentRun, ApprovalRequest, ApprovalResolution, CredentialStore, DurableRunStore, ExecutionCommit, ExecutionContext, Fevex, FevexConfig, FevexConfigurationError, FevexConfigurationErrorCode, FevexRunError, FevexRunErrorCode, InMemoryRunStore, JsonObject, JsonPrimitive, JsonValue, ListEventsOptions, ModelGateway, ModelInput, ModelMetadata, ModelRef, ModelResult, ModelStreamEvent, ModelUsage, PROVIDER_REASONING_UNSUPPORTED, PROVIDER_SCHEMA_UNSUPPORTED, PendingToolExecution, PolicyAuthorization, PolicyDecision, PolicyDefinition, ReasoningEffort, ResumeRunResolution, RunCheckpoint, RunId, RunLease, RunPause, RunPausedError, RunRequest, RunResult, RunStatus, RunStore, SCHEMA_NOT_TRANSPORTABLE, Session, SessionId, ToolApproval, ToolCall, ToolDefinition, ToolExecutionContext, ToolExecutionRecord, ToolExecutionResolution, ToolExecutionStatus, ToolIdempotency, ToolResult, ToolRetryPolicy, ToolRisk, ToolSpec, createFevex, defineAgent, definePolicy, defineTool, isDurableRunStore, toToolSpec };
42
+ export { AgentDefinition, AgentEvent, AgentEventPayloads, AgentEventType, AgentLimits, AgentMessage, AgentMessageRole, AgentRun, AgentRunPause, ApprovalMode, ApprovalRequest, ApprovalResolution, ChannelAdapter, ChannelContext, ChannelError, ChannelEvent, ChannelEventType, ChannelFailurePhase, ChannelMessage, ChannelOutput, ChannelRunEvent, ChannelRunOptions, ChannelRunResult, ConnectionDefinition, ConnectionToolPolicy, ContextBlock, ContextProvider, CoordinatorCheckpoint, CoordinatorRun, CredentialStore, DurableRunStore, ElicitationMode, ElicitationRequest, ElicitationResolution, EventResolution, ExecutionCommit, ExecutionContext, ExecutionCreate, FEVEX_JSON_SCHEMA_PROFILE_VERSION, Fevex, FevexConfig, FevexConfigurationError, FevexConfigurationErrorCode, FevexJsonSchemaProfileLimits, FevexJsonSchemaProfileOptions, FevexJsonSchemaValidator, FevexRunError, FevexRunErrorCode, InMemoryMemoryStore, InMemoryRunStore, IntegrationError, IntegrationErrorCategory, JsonObject, JsonPrimitive, JsonValue, KnowledgeContext, ListEventsOptions, LocalSandboxOptions, MemoryQuery, MemoryRecord, MemoryStore, MemoryWrite, ModelGateway, ModelInput, ModelMetadata, ModelRef, ModelResult, ModelStreamEvent, ModelUsage, PROVIDER_REASONING_UNSUPPORTED, PROVIDER_SCHEMA_UNSUPPORTED, PendingToolExecution, PolicyAuthorization, PolicyDecision, PolicyDefinition, ReasoningEffort, ResumeRunResolution, RunCheckpoint, RunId, RunLease, RunPause, RunPausedError, RunRecord, RunRequest, RunResult, RunStatus, RunStore, SCHEMA_NOT_TRANSPORTABLE, Sandbox, SandboxCapabilities, SandboxError, SandboxRunRequest, SandboxRunResult, Session, SessionId, SkillDefinition, StoredRunCheckpoint, TeamCheckpoint, type TeamDefinition, type TeamDelegation, type TeamHandoff, type TeamLimits, type TeamMember, TeamRun, type TeamStep, type TeamTaskResult, TimerResolution, ToolApproval, ToolCall, ToolChoice, ToolDefinition, ToolEventSource, ToolExecutionContext, ToolExecutionRecord, ToolExecutionResolution, ToolExecutionStatus, ToolIdempotency, ToolProvider, ToolProviderContext, ToolProviderTool, ToolResult, ToolRetryPolicy, ToolRisk, ToolSpec, WorkflowAgentResult, WorkflowBudgetUsage, WorkflowCheckpoint, WorkflowCompensationRecord, WorkflowDefinition, WorkflowEventDefinition, WorkflowEventResult, WorkflowRun, WorkflowStep, WorkflowStepContext, WorkflowStepOptions, WorkflowStepRecord, WorkflowWaitRecord, compileFevexJsonSchema, createFevex, createLocalSandbox, createMemoryContextProvider, defineAgent, defineConnection, defineContextProvider, definePolicy, defineSkill, defineTeam, defineTool, defineWorkflow, handleChannelInput, isDurableRunStore, sandboxResultToJson, toToolSpec, validateFevexJsonSchemaProfile, validateListEventsOptions };