@fevex/core 0.1.0-alpha.1 → 0.1.0-alpha.10
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 +771 -13
- package/dist/agents/index.d.mts +2 -2
- package/dist/agents/index.mjs +1 -1
- package/dist/artifacts/index.d.mts +2 -0
- package/dist/artifacts/index.mjs +2 -0
- package/dist/artifacts-gUzemET7.mjs +440 -0
- package/dist/channels/index.d.mts +2 -0
- package/dist/channels/index.mjs +192 -0
- package/dist/evals/index.d.mts +19 -11
- package/dist/evals/index.mjs +125 -122
- package/dist/fevex-_KOsOsB8.d.mts +129 -0
- package/dist/http/index.d.mts +150 -0
- package/dist/http/index.mjs +692 -0
- package/dist/index-26ilbzAs.d.mts +50 -0
- package/dist/index-B8EcvWeN.d.mts +103 -0
- package/dist/index-BEqYWean.d.mts +118 -0
- package/dist/index-Btth7rdL.d.mts +58 -0
- package/dist/{index-QTkd6a7C.d.mts → index-CFzrvDQ0.d.mts} +4 -3
- package/dist/index-CIHWc5V1.d.mts +116 -0
- package/dist/index-D7r0puBi.d.mts +64 -0
- package/dist/index-DHcfIfh-.d.mts +224 -0
- package/dist/index-DUhNa7IR.d.mts +73 -0
- package/dist/index-lCCFokc6.d.mts +617 -0
- package/dist/index.d.mts +22 -10
- package/dist/index.mjs +4178 -671
- package/dist/knowledge/index.d.mts +2 -0
- package/dist/knowledge/index.mjs +289 -0
- package/dist/model-stream-JQdHDDcj.mjs +131 -0
- package/dist/models/index.d.mts +2 -46
- package/dist/observability/index.d.mts +2 -2
- package/dist/policies/index.d.mts +1 -1
- package/dist/policies/index.mjs +1 -1
- package/dist/run-error-Cr17wPGH.mjs +23 -0
- package/dist/{model-stream-u2xMsEaf.mjs → run-support-CmZ6Xo6H.mjs} +41 -130
- package/dist/runtime/index.d.mts +2 -2
- package/dist/runtime/index.mjs +271 -9
- package/dist/sandbox/index.d.mts +2 -0
- package/dist/sandbox/index.mjs +147 -0
- package/dist/teams/index.d.mts +2 -0
- package/dist/teams/index.mjs +2 -0
- package/dist/teams-Ctz676G4.mjs +82 -0
- package/dist/testing/index.d.mts +39 -9
- package/dist/testing/index.mjs +512 -28
- package/dist/tools/index.d.mts +3 -3
- package/dist/tools/index.mjs +442 -2
- package/dist/types-CckDlhYo.d.mts +575 -0
- package/dist/workflows/index.d.mts +2 -0
- package/dist/workflows/index.mjs +6 -0
- package/package.json +31 -3
- package/dist/exact-definition-NHBBFlFR.d.mts +0 -4
- package/dist/fevex-Dz6GBz9o.d.mts +0 -32
- package/dist/index-BzxHfyYV.d.mts +0 -23
- package/dist/index-CZGyhNIQ.d.mts +0 -47
- package/dist/index-C_Zpr13f.d.mts +0 -124
- package/dist/index-DGWOGXzc.d.mts +0 -181
- package/dist/index-ojCY3lwm.d.mts +0 -79
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
import { o as ToolEmbeddingCache, t as ToolReranker, z as ExactDefinition } from "./index-DHcfIfh-.mjs";
|
|
2
|
+
import { c as ReasoningEffort, i as ModelRef, l as ToolChoice, r as ModelMetadata, s as ModelUsage, t as ModelGateway, u as EmbeddingModel } from "./index-D7r0puBi.mjs";
|
|
3
|
+
import { f as RunId, g as ToolSpec, i as AgentMessage, l as JsonValue, o as ExecutionContext, s as JsonObject, t as AgentEvent } from "./types-CckDlhYo.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
|
+
/** Correlation fields for runs created by a workflow or team coordinator. */
|
|
114
|
+
interface RunCorrelation {
|
|
115
|
+
/** Run that created this one. */
|
|
116
|
+
parentRunId?: RunId;
|
|
117
|
+
/** Top-level run in the correlation tree. */
|
|
118
|
+
rootRunId?: RunId;
|
|
119
|
+
}
|
|
120
|
+
interface AgentRun<TOutput = JsonValue> extends RunCorrelation {
|
|
121
|
+
kind?: 'agent';
|
|
122
|
+
id: RunId;
|
|
123
|
+
sessionId: SessionId;
|
|
124
|
+
agentName: string;
|
|
125
|
+
/** Effective model identity retained after checkpoint cleanup. Absent on older runs. */
|
|
126
|
+
modelName?: string;
|
|
127
|
+
modelMetadata?: ModelMetadata;
|
|
128
|
+
status: RunStatus;
|
|
129
|
+
revision: number;
|
|
130
|
+
pause?: RunPause;
|
|
131
|
+
createdAt: string;
|
|
132
|
+
updatedAt: string;
|
|
133
|
+
/** Absolute deadline for the run, derived from `RunRequest.deadlineMs`. */
|
|
134
|
+
deadlineAt?: string;
|
|
135
|
+
output?: TOutput;
|
|
136
|
+
error?: string;
|
|
137
|
+
usage?: ModelUsage;
|
|
138
|
+
}
|
|
139
|
+
interface WorkflowRun<TOutput = JsonValue> extends RunCorrelation {
|
|
140
|
+
kind: 'workflow';
|
|
141
|
+
id: RunId;
|
|
142
|
+
sessionId: SessionId;
|
|
143
|
+
workflowName: string;
|
|
144
|
+
status: RunStatus;
|
|
145
|
+
revision: number;
|
|
146
|
+
pause?: RunPause;
|
|
147
|
+
createdAt: string;
|
|
148
|
+
updatedAt: string;
|
|
149
|
+
/** Absolute deadline for the run, derived from `RunRequest.deadlineMs`. */
|
|
150
|
+
deadlineAt?: string;
|
|
151
|
+
output?: TOutput;
|
|
152
|
+
error?: string;
|
|
153
|
+
usage?: ModelUsage;
|
|
154
|
+
}
|
|
155
|
+
interface TeamRun<TOutput = JsonValue> extends RunCorrelation {
|
|
156
|
+
kind: 'team';
|
|
157
|
+
id: RunId;
|
|
158
|
+
sessionId: SessionId;
|
|
159
|
+
teamName: string;
|
|
160
|
+
status: RunStatus;
|
|
161
|
+
revision: number;
|
|
162
|
+
pause?: RunPause;
|
|
163
|
+
createdAt: string;
|
|
164
|
+
updatedAt: string;
|
|
165
|
+
/** Absolute deadline for the run, derived from `RunRequest.deadlineMs`. */
|
|
166
|
+
deadlineAt?: string;
|
|
167
|
+
output?: TOutput;
|
|
168
|
+
error?: string;
|
|
169
|
+
usage?: ModelUsage;
|
|
170
|
+
}
|
|
171
|
+
type CoordinatorRun<TOutput = JsonValue> = WorkflowRun<TOutput> | TeamRun<TOutput>;
|
|
172
|
+
type RunRecord<TOutput = unknown> = AgentRun<TOutput> | WorkflowRun<TOutput> | TeamRun<TOutput>;
|
|
173
|
+
interface SessionCompaction {
|
|
174
|
+
/** Derived summary for the first `coveredMessages` history entries. */
|
|
175
|
+
summary: string;
|
|
176
|
+
coveredMessages: number;
|
|
177
|
+
updatedAt: string;
|
|
178
|
+
}
|
|
179
|
+
interface Session {
|
|
180
|
+
/** Optimistic history revision. Missing on legacy sessions means zero. Store-managed. */
|
|
181
|
+
revision?: number;
|
|
182
|
+
id: SessionId;
|
|
183
|
+
history: AgentMessage[];
|
|
184
|
+
/** Reusable summary; the original history remains the source of truth. */
|
|
185
|
+
compaction?: SessionCompaction;
|
|
186
|
+
createdAt: string;
|
|
187
|
+
updatedAt: string;
|
|
188
|
+
}
|
|
189
|
+
interface ListEventsOptions {
|
|
190
|
+
after?: AgentEvent['id'];
|
|
191
|
+
/** Maximum results; omitted preserves the complete result for existing consumers. */
|
|
192
|
+
limit?: number;
|
|
193
|
+
/** Sequence order. Use descending with limit: 1 for the latest event. */
|
|
194
|
+
order?: 'asc' | 'desc';
|
|
195
|
+
}
|
|
196
|
+
declare function validateListEventsOptions(options: ListEventsOptions): void;
|
|
197
|
+
type RetainableRunStatus = 'completed' | 'failed' | 'cancelled';
|
|
198
|
+
interface PurgeRunsOptions {
|
|
199
|
+
/** Delete runs created strictly before this ISO timestamp. */
|
|
200
|
+
before?: string;
|
|
201
|
+
/** Terminal statuses to delete. Defaults to completed, failed and cancelled. */
|
|
202
|
+
statuses?: RetainableRunStatus[];
|
|
203
|
+
/** Maximum runs to delete in one call. */
|
|
204
|
+
limit?: number;
|
|
205
|
+
}
|
|
206
|
+
interface PurgeRunsResult {
|
|
207
|
+
runs: number;
|
|
208
|
+
sessions: number;
|
|
209
|
+
}
|
|
210
|
+
/** Optional capability for stores that can delete terminal runs and empty sessions. */
|
|
211
|
+
interface RetainableRunStore extends RunStore {
|
|
212
|
+
purgeRuns(options?: PurgeRunsOptions): Promise<PurgeRunsResult>;
|
|
213
|
+
}
|
|
214
|
+
declare function isRetainableRunStore(store: RunStore): store is RetainableRunStore;
|
|
215
|
+
declare function validatePurgeRunsOptions(options?: PurgeRunsOptions): {
|
|
216
|
+
statuses: RetainableRunStatus[];
|
|
217
|
+
before?: string;
|
|
218
|
+
limit?: number;
|
|
219
|
+
};
|
|
220
|
+
interface RunStore {
|
|
221
|
+
getRun<TRun extends RunRecord<unknown> = AgentRun>(runId: RunId): Promise<TRun | undefined>;
|
|
222
|
+
saveRun(run: RunRecord): Promise<void>;
|
|
223
|
+
getSession(sessionId: SessionId): Promise<Session | undefined>;
|
|
224
|
+
/** Compare and advance revision; reject active/paused sessions and stale snapshots. */
|
|
225
|
+
saveSession(session: Session): Promise<void>;
|
|
226
|
+
appendEvent(event: AgentEvent): Promise<void>;
|
|
227
|
+
listEvents(runId: RunId, options?: ListEventsOptions): Promise<AgentEvent[]>;
|
|
228
|
+
}
|
|
229
|
+
interface CredentialStore {
|
|
230
|
+
resolve(input: {
|
|
231
|
+
name: string;
|
|
232
|
+
namespace?: string;
|
|
233
|
+
actor?: {
|
|
234
|
+
id: string;
|
|
235
|
+
type?: string;
|
|
236
|
+
};
|
|
237
|
+
}): Promise<string | undefined>;
|
|
238
|
+
}
|
|
239
|
+
interface PendingToolExecution {
|
|
240
|
+
call: {
|
|
241
|
+
id: string;
|
|
242
|
+
name: string;
|
|
243
|
+
input: JsonValue;
|
|
244
|
+
};
|
|
245
|
+
input: JsonValue;
|
|
246
|
+
idempotencyKey: string;
|
|
247
|
+
attempt: number;
|
|
248
|
+
}
|
|
249
|
+
interface RunCheckpoint {
|
|
250
|
+
version: 2;
|
|
251
|
+
kind?: 'agent';
|
|
252
|
+
runId: RunId;
|
|
253
|
+
modelName?: string;
|
|
254
|
+
reasoning?: ReasoningEffort;
|
|
255
|
+
definitionHash: string;
|
|
256
|
+
limits?: AgentLimits;
|
|
257
|
+
contextBudget?: ContextBudget;
|
|
258
|
+
toolSearch?: ToolSearchCheckpointOptions;
|
|
259
|
+
loadedTools?: string[];
|
|
260
|
+
messages: AgentMessage[];
|
|
261
|
+
inputContent: string;
|
|
262
|
+
context?: ExecutionContext;
|
|
263
|
+
usage?: ModelUsage;
|
|
264
|
+
providerState?: JsonValue;
|
|
265
|
+
step: number;
|
|
266
|
+
toolCallCount: number;
|
|
267
|
+
seenToolCallIds: string[];
|
|
268
|
+
pendingTools: PendingToolExecution[];
|
|
269
|
+
pendingIndex: number;
|
|
270
|
+
effectiveElicitationMode?: ElicitationMode;
|
|
271
|
+
effectiveApprovalMode?: ApprovalMode;
|
|
272
|
+
effectiveToolChoice?: ToolChoice;
|
|
273
|
+
}
|
|
274
|
+
type WorkflowStepRecord = {
|
|
275
|
+
type: 'agent';
|
|
276
|
+
status: 'running';
|
|
277
|
+
agentName: string;
|
|
278
|
+
childRunId: RunId;
|
|
279
|
+
metadata?: JsonObject;
|
|
280
|
+
} | {
|
|
281
|
+
type: 'agent';
|
|
282
|
+
status: 'completed';
|
|
283
|
+
agentName: string;
|
|
284
|
+
childRunId: RunId;
|
|
285
|
+
result: RunResult<JsonValue>;
|
|
286
|
+
compensation?: WorkflowCompensationRecord;
|
|
287
|
+
metadata?: JsonObject;
|
|
288
|
+
} | {
|
|
289
|
+
type: 'parallel';
|
|
290
|
+
status: 'running';
|
|
291
|
+
metadata?: JsonObject;
|
|
292
|
+
} | {
|
|
293
|
+
type: 'parallel';
|
|
294
|
+
status: 'completed';
|
|
295
|
+
result: JsonObject;
|
|
296
|
+
compensation?: WorkflowCompensationRecord;
|
|
297
|
+
metadata?: JsonObject;
|
|
298
|
+
} | {
|
|
299
|
+
type: 'wait';
|
|
300
|
+
status: 'running';
|
|
301
|
+
wait: WorkflowWaitRecord;
|
|
302
|
+
} | {
|
|
303
|
+
type: 'wait';
|
|
304
|
+
status: 'completed';
|
|
305
|
+
wait: WorkflowWaitRecord;
|
|
306
|
+
payload?: JsonValue;
|
|
307
|
+
actor?: NonNullable<ExecutionContext['actor']>;
|
|
308
|
+
receivedAt?: string;
|
|
309
|
+
};
|
|
310
|
+
interface WorkflowCompensationRecord {
|
|
311
|
+
status: 'pending' | 'completed' | 'failed';
|
|
312
|
+
error?: string;
|
|
313
|
+
}
|
|
314
|
+
type WorkflowWaitRecord = {
|
|
315
|
+
type: 'timer';
|
|
316
|
+
resumeAt: string;
|
|
317
|
+
} | {
|
|
318
|
+
type: 'event';
|
|
319
|
+
eventName: string;
|
|
320
|
+
requireActor: boolean;
|
|
321
|
+
};
|
|
322
|
+
interface WorkflowBudgetUsage {
|
|
323
|
+
usage?: ModelUsage;
|
|
324
|
+
steps: number;
|
|
325
|
+
toolCalls: number;
|
|
326
|
+
}
|
|
327
|
+
interface WorkflowCheckpoint {
|
|
328
|
+
version: 2;
|
|
329
|
+
kind: 'workflow';
|
|
330
|
+
runId: RunId;
|
|
331
|
+
workflowName: string;
|
|
332
|
+
model?: string;
|
|
333
|
+
reasoning?: ReasoningEffort;
|
|
334
|
+
definitionHash: string;
|
|
335
|
+
input: JsonValue;
|
|
336
|
+
context?: ExecutionContext;
|
|
337
|
+
steps: Record<string, WorkflowStepRecord>;
|
|
338
|
+
limits?: AgentLimits;
|
|
339
|
+
budget?: WorkflowBudgetUsage;
|
|
340
|
+
}
|
|
341
|
+
interface TeamCheckpoint extends Omit<WorkflowCheckpoint, 'kind' | 'workflowName'> {
|
|
342
|
+
kind: 'team';
|
|
343
|
+
teamName: string;
|
|
344
|
+
}
|
|
345
|
+
type CoordinatorCheckpoint = WorkflowCheckpoint | TeamCheckpoint;
|
|
346
|
+
type StoredRunCheckpoint = RunCheckpoint | WorkflowCheckpoint | TeamCheckpoint;
|
|
347
|
+
type ToolExecutionStatus = 'started' | 'completed' | 'failed' | 'unknown';
|
|
348
|
+
interface ToolExecutionRecord {
|
|
349
|
+
runId: RunId;
|
|
350
|
+
toolCallId: string;
|
|
351
|
+
toolName: string;
|
|
352
|
+
input: JsonValue;
|
|
353
|
+
status: ToolExecutionStatus;
|
|
354
|
+
attempt: number;
|
|
355
|
+
idempotencyKey: string;
|
|
356
|
+
output?: JsonValue;
|
|
357
|
+
error?: string;
|
|
358
|
+
updatedAt: string;
|
|
359
|
+
}
|
|
360
|
+
/** Store assigns a new generation on creation/acquisition; callers must retain it. */
|
|
361
|
+
interface RunLease {
|
|
362
|
+
generation: number;
|
|
363
|
+
runId: RunId;
|
|
364
|
+
ownerId: string;
|
|
365
|
+
expiresAt: string;
|
|
366
|
+
}
|
|
367
|
+
interface ExecutionCommit {
|
|
368
|
+
/** Current lease identity; ownership, generation and expiry are checked atomically. */
|
|
369
|
+
lease: Pick<RunLease, 'ownerId' | 'generation'>;
|
|
370
|
+
expectedRevision: number;
|
|
371
|
+
run: RunRecord;
|
|
372
|
+
checkpoint?: StoredRunCheckpoint | null;
|
|
373
|
+
session?: Session;
|
|
374
|
+
toolExecution?: ToolExecutionRecord;
|
|
375
|
+
events?: AgentEvent[];
|
|
376
|
+
}
|
|
377
|
+
/** Atomically reserve the session until this run is terminal, including across pause/crash. */
|
|
378
|
+
interface ExecutionCreate {
|
|
379
|
+
run: RunRecord;
|
|
380
|
+
checkpoint: StoredRunCheckpoint;
|
|
381
|
+
/** Snapshot used to prepare the run; revision must match the stored history. */
|
|
382
|
+
session: Session;
|
|
383
|
+
lease: RunLease;
|
|
384
|
+
events: AgentEvent[];
|
|
385
|
+
}
|
|
386
|
+
interface DurableRunStore extends RunStore {
|
|
387
|
+
getCheckpoint<TCheckpoint extends StoredRunCheckpoint = RunCheckpoint>(runId: RunId): Promise<TCheckpoint | undefined>;
|
|
388
|
+
getToolExecution(runId: RunId, toolCallId: string): Promise<ToolExecutionRecord | undefined>;
|
|
389
|
+
/** On success, assigns run/session revisions and lease generation 1. */
|
|
390
|
+
createExecution(create: ExecutionCreate): Promise<boolean>;
|
|
391
|
+
commitExecution(commit: ExecutionCommit): Promise<boolean>;
|
|
392
|
+
/** Acquires only absent/expired leases and assigns a strictly newer generation. */
|
|
393
|
+
acquireLease(lease: RunLease): Promise<boolean>;
|
|
394
|
+
/** Requires matching owner/generation and an unexpired stored lease. */
|
|
395
|
+
renewLease(lease: RunLease): Promise<boolean>;
|
|
396
|
+
/** Expires a matching token while retaining its generation for future acquisitions. */
|
|
397
|
+
releaseLease(runId: RunId, ownerId: string, generation: number): Promise<void>;
|
|
398
|
+
}
|
|
399
|
+
declare function isDurableRunStore(store: RunStore): store is DurableRunStore;
|
|
400
|
+
interface RunRequest<TInput = unknown, TOutput = unknown> {
|
|
401
|
+
input: TInput;
|
|
402
|
+
model?: string;
|
|
403
|
+
reasoning?: ReasoningEffort;
|
|
404
|
+
context?: ExecutionContext;
|
|
405
|
+
limits?: AgentLimits;
|
|
406
|
+
contextBudget?: ContextBudget;
|
|
407
|
+
toolSearch?: ToolSearchOptions;
|
|
408
|
+
elicitation?: ElicitationMode;
|
|
409
|
+
approvalMode?: ApprovalMode;
|
|
410
|
+
toolChoice?: ToolChoice;
|
|
411
|
+
sessionId?: SessionId;
|
|
412
|
+
signal?: AbortSignal;
|
|
413
|
+
/** Maximum wall-clock time for this run, including time spent paused. */
|
|
414
|
+
deadlineMs?: number;
|
|
415
|
+
}
|
|
416
|
+
interface RunResult<TOutput = unknown> {
|
|
417
|
+
runId: RunId;
|
|
418
|
+
sessionId: SessionId;
|
|
419
|
+
output: TOutput;
|
|
420
|
+
events?: AgentEvent[];
|
|
421
|
+
usage?: ModelUsage;
|
|
422
|
+
}
|
|
423
|
+
//#endregion
|
|
424
|
+
//#region src/runtime/compaction.d.ts
|
|
425
|
+
/** Estimates the input tokens of messages and tool definitions. */
|
|
426
|
+
type ContextTokenEstimator = (input: {
|
|
427
|
+
messages: AgentMessage[];
|
|
428
|
+
tools?: ToolSpec[];
|
|
429
|
+
}) => number;
|
|
430
|
+
interface ContextCompactionInput {
|
|
431
|
+
agentName: string;
|
|
432
|
+
sessionId: SessionId;
|
|
433
|
+
/** Older turns and earlier tool batches; system prefix, current request and latest batch are preserved. */
|
|
434
|
+
messages: AgentMessage[];
|
|
435
|
+
tools?: ToolSpec[];
|
|
436
|
+
/** Estimated tokens of the whole prompt before compaction. */
|
|
437
|
+
estimatedTokens: number;
|
|
438
|
+
/** Soft budget for the messages returned by the compactor. */
|
|
439
|
+
targetTokens: number;
|
|
440
|
+
/** Hard model context window. */
|
|
441
|
+
contextWindow: number;
|
|
442
|
+
step: number;
|
|
443
|
+
context?: ExecutionContext;
|
|
444
|
+
signal?: AbortSignal;
|
|
445
|
+
/** Estimates messages with the runtime's configured estimator. */
|
|
446
|
+
estimateTokens(messages: AgentMessage[]): number;
|
|
447
|
+
}
|
|
448
|
+
/** Returns the replacement for the older conversation messages. */
|
|
449
|
+
interface ContextCompactor {
|
|
450
|
+
compact(input: ContextCompactionInput): AgentMessage[] | Promise<AgentMessage[]>;
|
|
451
|
+
}
|
|
452
|
+
interface ContextCompactionOptions {
|
|
453
|
+
/** Defaults to a deterministic digest compactor. */
|
|
454
|
+
compactor?: ContextCompactor;
|
|
455
|
+
/** Defaults to a character-based estimate. */
|
|
456
|
+
estimateTokens?: ContextTokenEstimator;
|
|
457
|
+
/** Redacts the summary before it enters the context.compacted event. */
|
|
458
|
+
redactSummary?: (summary: string) => string;
|
|
459
|
+
}
|
|
460
|
+
/** Cumulative runtime counters for automatic context compaction. */
|
|
461
|
+
interface ContextCompactionStats {
|
|
462
|
+
compactions: number;
|
|
463
|
+
removedMessages: number;
|
|
464
|
+
estimatedTokens: number;
|
|
465
|
+
compactedTokens: number;
|
|
466
|
+
savedTokens: number;
|
|
467
|
+
}
|
|
468
|
+
interface ResolvedContextBudget {
|
|
469
|
+
contextWindow: number;
|
|
470
|
+
reserveOutputTokens: number;
|
|
471
|
+
compactAt: number;
|
|
472
|
+
targetTokens: number;
|
|
473
|
+
safetyFactor: number;
|
|
474
|
+
}
|
|
475
|
+
/** Validates a context budget and fills in defaults. */
|
|
476
|
+
declare function resolveContextBudget(budget: ContextBudget | undefined, label: string): ResolvedContextBudget | undefined;
|
|
477
|
+
/**
|
|
478
|
+
* Rough provider-neutral estimate: about four characters per token plus
|
|
479
|
+
* message and tool framing. Hosts can inject a real tokenizer instead.
|
|
480
|
+
*/
|
|
481
|
+
declare function estimateContextTokens(input: {
|
|
482
|
+
messages: AgentMessage[];
|
|
483
|
+
tools?: ToolSpec[];
|
|
484
|
+
}): number;
|
|
485
|
+
interface ModelContextCompactorOptions {
|
|
486
|
+
/** Model used only to summarize older context. */
|
|
487
|
+
model: ModelGateway;
|
|
488
|
+
/** Overrides the built-in summarization instructions. */
|
|
489
|
+
systemPrompt?: string;
|
|
490
|
+
/** Maximum output tokens for the summary. Defaults to 1,024. */
|
|
491
|
+
maxOutputTokens?: number;
|
|
492
|
+
/** Maximum characters sent to one summarization call. Defaults to 120,000. */
|
|
493
|
+
maxInputChars?: number;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Creates a semantic compactor backed by a model. Use a cheap, fast model and
|
|
497
|
+
* keep it separate from the agent model when possible. Large transcripts are
|
|
498
|
+
* summarized in chunks and then merged.
|
|
499
|
+
*/
|
|
500
|
+
declare function createModelContextCompactor(options: ModelContextCompactorOptions): ContextCompactor;
|
|
501
|
+
interface DigestContextCompactorOptions {
|
|
502
|
+
/** Maximum characters kept from one message. Defaults to 400. */
|
|
503
|
+
maxCharsPerMessage?: number;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Deterministic compactor used when the host does not inject one. It keeps
|
|
507
|
+
* role-aware excerpts of older messages and drops the oldest excerpts first.
|
|
508
|
+
* It never calls a model.
|
|
509
|
+
*/
|
|
510
|
+
declare function createDigestContextCompactor(options?: DigestContextCompactorOptions): ContextCompactor;
|
|
511
|
+
//#endregion
|
|
512
|
+
//#region src/runtime/in-memory-run-store.d.ts
|
|
513
|
+
/**
|
|
514
|
+
* In-process durable store intended for development and tests.
|
|
515
|
+
*
|
|
516
|
+
* Values are cloned at the boundary so callers cannot mutate persisted state.
|
|
517
|
+
* Data is lost when the process exits.
|
|
518
|
+
*/
|
|
519
|
+
declare class InMemoryRunStore implements DurableRunStore {
|
|
520
|
+
#private;
|
|
521
|
+
getRun<TRun extends RunRecord<unknown> = AgentRun>(runId: RunId): Promise<TRun | undefined>;
|
|
522
|
+
saveRun(run: RunRecord): Promise<void>;
|
|
523
|
+
getSession(sessionId: SessionId): Promise<Session | undefined>;
|
|
524
|
+
saveSession(session: Session): Promise<void>;
|
|
525
|
+
appendEvent(event: AgentEvent): Promise<void>;
|
|
526
|
+
listEvents(runId: RunId, options?: ListEventsOptions): Promise<AgentEvent[]>;
|
|
527
|
+
getCheckpoint<TCheckpoint extends StoredRunCheckpoint = RunCheckpoint>(runId: RunId): Promise<TCheckpoint | undefined>;
|
|
528
|
+
getToolExecution(runId: RunId, toolCallId: string): Promise<ToolExecutionRecord | undefined>;
|
|
529
|
+
createExecution(create: ExecutionCreate): Promise<boolean>;
|
|
530
|
+
commitExecution(commit: ExecutionCommit): Promise<boolean>;
|
|
531
|
+
purgeRuns(options?: PurgeRunsOptions): Promise<PurgeRunsResult>;
|
|
532
|
+
acquireLease(lease: RunLease): Promise<boolean>;
|
|
533
|
+
renewLease(lease: RunLease): Promise<boolean>;
|
|
534
|
+
releaseLease(runId: RunId, ownerId: string, generation: number): Promise<void>;
|
|
535
|
+
}
|
|
536
|
+
//#endregion
|
|
537
|
+
//#region src/agents/agent.d.ts
|
|
538
|
+
/** Resource limits enforced by the runtime for a single agent run. */
|
|
539
|
+
interface AgentLimits {
|
|
540
|
+
maxSteps?: number;
|
|
541
|
+
maxToolCalls?: number;
|
|
542
|
+
maxInputTokens?: number | false;
|
|
543
|
+
maxOutputTokens?: number | false;
|
|
544
|
+
/** Maximum serialized bytes for one tool result. Use `false` to disable the default cap. */
|
|
545
|
+
maxToolResultBytes?: number | false;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Per-request model context budget. It is separate from
|
|
549
|
+
* {@link AgentLimits.maxInputTokens}, which caps cumulative spend for a run.
|
|
550
|
+
*/
|
|
551
|
+
interface ContextBudget {
|
|
552
|
+
/** Model context window in tokens. */
|
|
553
|
+
contextWindow: number;
|
|
554
|
+
/** Tokens reserved for the next model output. Defaults to 0. */
|
|
555
|
+
reserveOutputTokens?: number;
|
|
556
|
+
/** Fraction of the usable window that triggers compaction. Defaults to 0.8. */
|
|
557
|
+
compactAt?: number;
|
|
558
|
+
/** Target tokens after compaction. Defaults below the compaction threshold. */
|
|
559
|
+
targetTokens?: number;
|
|
560
|
+
/** Multiplier applied to estimates to leave headroom. Defaults to 1.1. */
|
|
561
|
+
safetyFactor?: number;
|
|
562
|
+
}
|
|
563
|
+
interface ToolSearchSemanticOptions {
|
|
564
|
+
/** Embedding model used to index tools and queries. */
|
|
565
|
+
embeddings: EmbeddingModel;
|
|
566
|
+
/** Cache for tool vectors. Defaults to the runtime cache. */
|
|
567
|
+
cache?: ToolEmbeddingCache;
|
|
568
|
+
/** Vector candidates considered before fusion. Defaults to 20. */
|
|
569
|
+
topK?: number;
|
|
570
|
+
/** Minimum cosine score for vector candidates. Defaults to 0. */
|
|
571
|
+
minScore?: number;
|
|
572
|
+
/** Optional second-stage reranker over the fused candidates. */
|
|
573
|
+
reranker?: ToolReranker;
|
|
574
|
+
}
|
|
575
|
+
/** On-demand tool discovery for agents with large tool catalogs. */
|
|
576
|
+
interface ToolSearchOptions {
|
|
577
|
+
/** `auto` enables search above the configured thresholds. Defaults to `auto`. */
|
|
578
|
+
mode?: 'auto' | 'on' | 'off';
|
|
579
|
+
/** Tool-count threshold for `auto`. Defaults to 30. */
|
|
580
|
+
threshold?: number;
|
|
581
|
+
/** Estimated tool-token threshold for `auto`. */
|
|
582
|
+
tokenThreshold?: number;
|
|
583
|
+
/** Maximum tools returned by one search. Defaults to 5. */
|
|
584
|
+
limit?: number;
|
|
585
|
+
/** Tool names exposed without a search. */
|
|
586
|
+
pinned?: string[];
|
|
587
|
+
/** Optional hybrid lexical + vector retrieval. */
|
|
588
|
+
semantic?: ToolSearchSemanticOptions;
|
|
589
|
+
}
|
|
590
|
+
/** Serializable tool-search options stored in a run checkpoint. */
|
|
591
|
+
type ToolSearchCheckpointOptions = Omit<ToolSearchOptions, 'semantic'>;
|
|
592
|
+
interface AgentDefinition<TInput = unknown, TOutput = unknown> {
|
|
593
|
+
name: string;
|
|
594
|
+
instructions: string;
|
|
595
|
+
model?: ModelRef;
|
|
596
|
+
tools?: string[];
|
|
597
|
+
context?: string[];
|
|
598
|
+
memory?: {
|
|
599
|
+
read?: boolean;
|
|
600
|
+
write?: boolean;
|
|
601
|
+
limit?: number;
|
|
602
|
+
};
|
|
603
|
+
skills?: string[];
|
|
604
|
+
reasoning?: ReasoningEffort;
|
|
605
|
+
modelOptions?: Record<string, unknown>;
|
|
606
|
+
toolChoice?: ToolChoice;
|
|
607
|
+
elicitation?: ElicitationMode;
|
|
608
|
+
approvalMode?: ApprovalMode;
|
|
609
|
+
inputSchema?: StandardSchemaV1<unknown, TInput>;
|
|
610
|
+
outputSchema?: StandardSchemaV1<unknown, TOutput>;
|
|
611
|
+
limits?: AgentLimits;
|
|
612
|
+
contextBudget?: ContextBudget;
|
|
613
|
+
toolSearch?: ToolSearchOptions;
|
|
614
|
+
}
|
|
615
|
+
declare function defineAgent<T extends AgentDefinition>(agent: ExactDefinition<T, AgentDefinition>): T;
|
|
616
|
+
//#endregion
|
|
617
|
+
export { SessionCompaction as $, ElicitationMode as A, ResumeRunResolution as B, ApprovalMode as C, CoordinatorRun as D, CoordinatorCheckpoint as E, ExecutionCreate as F, RunLease as G, RetainableRunStore as H, ListEventsOptions as I, RunRequest as J, RunPause as K, PendingToolExecution as L, ElicitationResolution as M, EventResolution as N, CredentialStore as O, ExecutionCommit as P, Session as Q, PurgeRunsOptions as R, AgentRunPause as S, ApprovalResolution as T, RunCheckpoint as U, RetainableRunStatus as V, RunCorrelation as W, RunStatus as X, RunResult as Y, RunStore as Z, createDigestContextCompactor as _, validatePurgeRunsOptions as _t, ToolSearchOptions as a, ToolExecutionRecord as at, resolveContextBudget as b, InMemoryRunStore as c, WorkflowBudgetUsage as ct, ContextCompactionStats as d, WorkflowRun as dt, SessionId as et, ContextCompactor as f, WorkflowStepRecord as ft, ResolvedContextBudget as g, validateListEventsOptions as gt, ModelContextCompactorOptions as h, isRetainableRunStore as ht, ToolSearchCheckpointOptions as i, TimerResolution as it, ElicitationRequest as j, DurableRunStore as k, ContextCompactionInput as l, WorkflowCheckpoint as lt, DigestContextCompactorOptions as m, isDurableRunStore as mt, AgentLimits as n, TeamCheckpoint as nt, ToolSearchSemanticOptions as o, ToolExecutionResolution as ot, ContextTokenEstimator as p, WorkflowWaitRecord as pt, RunRecord as q, ContextBudget as r, TeamRun as rt, defineAgent as s, ToolExecutionStatus as st, AgentDefinition as t, StoredRunCheckpoint as tt, ContextCompactionOptions as u, WorkflowCompensationRecord as ut, createModelContextCompactor as v, ApprovalRequest as w, AgentRun as x, estimateContextTokens as y, PurgeRunsResult as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,19 +1,31 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
6
|
-
import { i as
|
|
7
|
-
import { n as
|
|
1
|
+
import { A as ToolApproval, C as ConnectionToolPolicy, D as ToolProviderContext, E as ToolProvider, F as ToolRetryPolicy, I as ToolRisk, L as defineTool, M as ToolExecutionContext, N as ToolIdempotency, O as ToolProviderTool, P as ToolResult, R as toToolSpec, S as ConnectionDefinition, T as IntegrationErrorCategory, _ as FevexJsonSchemaProfileLimits, a as InMemoryToolEmbeddingCacheOptions, b as compileFevexJsonSchema, c as ToolEmbeddingIndexEntry, d as cosineSimilarity, f as schemaKeywords, g as FEVEX_JSON_SCHEMA_PROFILE_VERSION, h as toolEmbeddingText, i as InMemoryToolEmbeddingCache, j as ToolDefinition, k as defineConnection, l as ToolEmbeddingMatch, m as toolEmbeddingKey, n as ToolSearchCandidate, o as ToolEmbeddingCache, p as searchToolEmbeddingIndex, r as BuildToolEmbeddingIndexOptions, s as ToolEmbeddingIndex, t as ToolReranker, u as buildToolEmbeddingIndex, v as FevexJsonSchemaProfileOptions, w as IntegrationError, x as validateFevexJsonSchemaProfile, y as FevexJsonSchemaValidator } from "./index-DHcfIfh-.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, u as EmbeddingModel } from "./index-D7r0puBi.mjs";
|
|
3
|
+
import { A as ArtifactError, C as FileSystemArtifactStore, D as ArtifactCatalog, E as CatalogedArtifactStoreOptions, F as ArtifactStore, I as ArtifactStoreContext, L as ArtifactWrite, M as ArtifactId, N as ArtifactQuery, O as ArtifactContent, P as ArtifactRecord, R as artifactTenantId, S as InMemoryArtifactCatalog, T as CatalogedArtifactStore, _ as S3ArtifactStore, a as AgentMessageRole, b as InMemoryArtifactStore, c as JsonPrimitive, d as PROVIDER_SCHEMA_UNSUPPORTED, f as RunId, g as ToolSpec, h as ToolEventSource, i as AgentMessage, j as ArtifactErrorCode, k as ArtifactDescriptor, 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, v as S3ArtifactStoreOptions, w as FileSystemArtifactStoreOptions, x as InMemoryArtifactStoreOptions, y as S3ObjectClient, z as assertArtifactId } from "./types-CckDlhYo.mjs";
|
|
4
|
+
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-DUhNa7IR.mjs";
|
|
5
|
+
import { $ as SessionCompaction, A as ElicitationMode, B as ResumeRunResolution, C as ApprovalMode, D as CoordinatorRun, E as CoordinatorCheckpoint, F as ExecutionCreate, G as RunLease, H as RetainableRunStore, I as ListEventsOptions, J as RunRequest, K as RunPause, L as PendingToolExecution, M as ElicitationResolution, N as EventResolution, O as CredentialStore, P as ExecutionCommit, Q as Session, R as PurgeRunsOptions, S as AgentRunPause, T as ApprovalResolution, U as RunCheckpoint, V as RetainableRunStatus, W as RunCorrelation, X as RunStatus, Y as RunResult, Z as RunStore, _ as createDigestContextCompactor, _t as validatePurgeRunsOptions, a as ToolSearchOptions, at as ToolExecutionRecord, b as resolveContextBudget, c as InMemoryRunStore, ct as WorkflowBudgetUsage, d as ContextCompactionStats, dt as WorkflowRun, et as SessionId, f as ContextCompactor, ft as WorkflowStepRecord, g as ResolvedContextBudget, gt as validateListEventsOptions, h as ModelContextCompactorOptions, ht as isRetainableRunStore, i as ToolSearchCheckpointOptions, it as TimerResolution, j as ElicitationRequest, k as DurableRunStore, l as ContextCompactionInput, lt as WorkflowCheckpoint, m as DigestContextCompactorOptions, mt as isDurableRunStore, n as AgentLimits, nt as TeamCheckpoint, o as ToolSearchSemanticOptions, ot as ToolExecutionResolution, p as ContextTokenEstimator, pt as WorkflowWaitRecord, q as RunRecord, r as ContextBudget, rt as TeamRun, s as defineAgent, st as ToolExecutionStatus, t as AgentDefinition, tt as StoredRunCheckpoint, u as ContextCompactionOptions, ut as WorkflowCompensationRecord, v as createModelContextCompactor, w as ApprovalRequest, x as AgentRun, y as estimateContextTokens, z as PurgeRunsResult } from "./index-lCCFokc6.mjs";
|
|
6
|
+
import { _ as defineContextProvider, a as AgentsMdOptions, c as ContextProvider, d as MemoryRecord, f as MemoryStore, g as createMemoryContextProvider, h as SkillDefinition, i as InMemoryMemoryStore, l as KnowledgeContext, m as ProgressiveSkillProvider, n as loadSkillFile, o as createAgentsMdContextProvider, p as MemoryWrite, r as loadSkillFiles, s as ContextBlock, t as LoadSkillFileOptions, u as MemoryQuery, v as defineSkill, y as isProgressiveSkillProvider } from "./index-CIHWc5V1.mjs";
|
|
7
|
+
import { i as definePolicy, n as PolicyDecision, r as PolicyDefinition, t as PolicyAuthorization } from "./index-CFzrvDQ0.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-Btth7rdL.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-26ilbzAs.mjs";
|
|
10
|
+
import { a as FevexLimits, c as createFevex, i as FevexConfig, n as FevexAdmission, o as FevexShutdownOptions, r as FevexAdmissionRequest, s as FevexShutdownResult, t as Fevex } from "./fevex-_KOsOsB8.mjs";
|
|
11
|
+
import { a as ChannelDeliveryOptions, c as ChannelEvent, d as ChannelMessage, f as ChannelOutput, h as ChannelRunResult, i as ChannelContext, l as ChannelEventType, m as ChannelRunOptions, n as handleChannelInput, o as ChannelElicitationContext, p as ChannelRunEvent, r as ChannelAdapter, s as ChannelError, t as deliverChannelRun, u as ChannelFailurePhase } from "./index-B8EcvWeN.mjs";
|
|
8
12
|
//#region src/configuration-error.d.ts
|
|
9
|
-
|
|
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' | 'ADMISSION_DENIED' | 'RUNTIME_CLOSED' | 'RETENTION_UNSUPPORTED' | 'EVENT_LIMIT_EXCEEDED' | 'CONTEXT_BUDGET_EXCEEDED' | 'TOOL_RESULT_TOO_LARGE' | '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, AgentsMdOptions, ApprovalMode, ApprovalRequest, ApprovalResolution, ArtifactCatalog, ArtifactContent, ArtifactDescriptor, ArtifactError, ArtifactErrorCode, ArtifactId, ArtifactQuery, ArtifactRecord, ArtifactStore, ArtifactStoreContext, ArtifactWrite, BuildToolEmbeddingIndexOptions, CatalogedArtifactStore, CatalogedArtifactStoreOptions, ChannelAdapter, ChannelContext, ChannelDeliveryOptions, ChannelElicitationContext, ChannelError, ChannelEvent, ChannelEventType, ChannelFailurePhase, ChannelMessage, ChannelOutput, ChannelRunEvent, ChannelRunOptions, ChannelRunResult, ConnectionDefinition, ConnectionToolPolicy, ContextBlock, ContextBudget, ContextCompactionInput, ContextCompactionOptions, ContextCompactionStats, ContextCompactor, ContextProvider, ContextTokenEstimator, CoordinatorCheckpoint, CoordinatorRun, CredentialStore, DigestContextCompactorOptions, DurableRunStore, ElicitationMode, ElicitationRequest, ElicitationResolution, EmbeddingModel, EventResolution, ExecutionCommit, ExecutionContext, ExecutionCreate, FEVEX_JSON_SCHEMA_PROFILE_VERSION, Fevex, FevexAdmission, FevexAdmissionRequest, FevexConfig, FevexConfigurationError, FevexConfigurationErrorCode, FevexJsonSchemaProfileLimits, FevexJsonSchemaProfileOptions, FevexJsonSchemaValidator, FevexLimits, FevexRunError, FevexRunErrorCode, FevexShutdownOptions, FevexShutdownResult, FileSystemArtifactStore, FileSystemArtifactStoreOptions, InMemoryArtifactCatalog, InMemoryArtifactStore, InMemoryArtifactStoreOptions, InMemoryMemoryStore, InMemoryRunStore, InMemoryToolEmbeddingCache, InMemoryToolEmbeddingCacheOptions, IntegrationError, IntegrationErrorCategory, JsonObject, JsonPrimitive, JsonValue, KnowledgeContext, ListEventsOptions, LoadSkillFileOptions, LocalSandboxOptions, MemoryQuery, MemoryRecord, MemoryStore, MemoryWrite, ModelContextCompactorOptions, ModelGateway, ModelInput, ModelMetadata, ModelRef, ModelResult, ModelStreamEvent, ModelUsage, PROVIDER_REASONING_UNSUPPORTED, PROVIDER_SCHEMA_UNSUPPORTED, PendingToolExecution, PolicyAuthorization, PolicyDecision, PolicyDefinition, ProgressiveSkillProvider, PurgeRunsOptions, PurgeRunsResult, ReasoningEffort, ResolvedContextBudget, ResumeRunResolution, RetainableRunStatus, RetainableRunStore, RunCheckpoint, RunCorrelation, RunId, RunLease, RunPause, RunPausedError, RunRecord, RunRequest, RunResult, RunStatus, RunStore, S3ArtifactStore, S3ArtifactStoreOptions, S3ObjectClient, SCHEMA_NOT_TRANSPORTABLE, Sandbox, SandboxCapabilities, SandboxError, SandboxRunRequest, SandboxRunResult, Session, SessionCompaction, SessionId, SkillDefinition, StoredRunCheckpoint, TeamCheckpoint, type TeamDefinition, type TeamDelegation, type TeamHandoff, type TeamLimits, type TeamMember, TeamRun, type TeamStep, type TeamTaskResult, TimerResolution, ToolApproval, ToolCall, ToolChoice, ToolDefinition, ToolEmbeddingCache, ToolEmbeddingIndex, ToolEmbeddingIndexEntry, ToolEmbeddingMatch, ToolEventSource, ToolExecutionContext, ToolExecutionRecord, ToolExecutionResolution, ToolExecutionStatus, ToolIdempotency, ToolProvider, ToolProviderContext, ToolProviderTool, ToolReranker, ToolResult, ToolRetryPolicy, ToolRisk, ToolSearchCandidate, ToolSearchCheckpointOptions, ToolSearchOptions, ToolSearchSemanticOptions, ToolSpec, WorkflowAgentResult, WorkflowBudgetUsage, WorkflowCheckpoint, WorkflowCompensationRecord, WorkflowDefinition, WorkflowEventDefinition, WorkflowEventResult, WorkflowRun, WorkflowStep, WorkflowStepContext, WorkflowStepOptions, WorkflowStepRecord, WorkflowWaitRecord, artifactTenantId, assertArtifactId, buildToolEmbeddingIndex, compileFevexJsonSchema, cosineSimilarity, createAgentsMdContextProvider, createDigestContextCompactor, createFevex, createLocalSandbox, createMemoryContextProvider, createModelContextCompactor, defineAgent, defineConnection, defineContextProvider, definePolicy, defineSkill, defineTeam, defineTool, defineWorkflow, deliverChannelRun, estimateContextTokens, handleChannelInput, isDurableRunStore, isProgressiveSkillProvider, isRetainableRunStore, loadSkillFile, loadSkillFiles, resolveContextBudget, sandboxResultToJson, schemaKeywords, searchToolEmbeddingIndex, toToolSpec, toolEmbeddingKey, toolEmbeddingText, validateFevexJsonSchemaProfile, validateListEventsOptions, validatePurgeRunsOptions };
|