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

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 (41) hide show
  1. package/README.md +183 -2
  2. package/dist/agents/index.d.mts +1 -1
  3. package/dist/artifacts/index.d.mts +2 -0
  4. package/dist/artifacts/index.mjs +2 -0
  5. package/dist/artifacts-gUzemET7.mjs +440 -0
  6. package/dist/channels/index.d.mts +2 -2
  7. package/dist/channels/index.mjs +70 -28
  8. package/dist/evals/index.d.mts +4 -4
  9. package/dist/{fevex-Ddyi6z6L.d.mts → fevex-B5NxFKcV.d.mts} +41 -11
  10. package/dist/http/index.d.mts +65 -5
  11. package/dist/http/index.mjs +236 -16
  12. package/dist/{index-Bgcxgy66.d.mts → index--_LdSEuF.d.mts} +31 -10
  13. package/dist/{index-CrOId2px.d.mts → index-BFnWUu7j.d.mts} +1 -1
  14. package/dist/{index-CTIwrVf9.d.mts → index-BPwkgdo3.d.mts} +1 -1
  15. package/dist/{index-DviHtsLo.d.mts → index-Br-zPxZH.d.mts} +2 -2
  16. package/dist/{index-Dx_LotWZ.d.mts → index-CGmHXV31.d.mts} +38 -3
  17. package/dist/{index-CqOjvtQ9.d.mts → index-CKQCNvJz.d.mts} +4 -2
  18. package/dist/{index-dkFyTNh4.d.mts → index-Cb3AB98n.d.mts} +2 -2
  19. package/dist/{index-B4PIkqOU.d.mts → index-D6lnI92z.d.mts} +3 -3
  20. package/dist/{index-Bg9rr8Qe.d.mts → index-Dsulk-n6.d.mts} +3 -3
  21. package/dist/{index-DeXUtyd9.d.mts → index-aayvtf0J.d.mts} +2 -2
  22. package/dist/index.d.mts +13 -13
  23. package/dist/index.mjs +464 -103
  24. package/dist/knowledge/index.d.mts +1 -1
  25. package/dist/model-stream-JQdHDDcj.mjs +131 -0
  26. package/dist/models/index.d.mts +1 -1
  27. package/dist/observability/index.d.mts +1 -1
  28. package/dist/policies/index.d.mts +1 -1
  29. package/dist/{model-stream-u2xMsEaf.mjs → run-support-CmZ6Xo6H.mjs} +41 -130
  30. package/dist/runtime/index.d.mts +2 -2
  31. package/dist/runtime/index.mjs +43 -1
  32. package/dist/sandbox/index.d.mts +1 -1
  33. package/dist/sandbox/index.mjs +42 -17
  34. package/dist/teams/index.d.mts +1 -1
  35. package/dist/testing/index.d.mts +13 -7
  36. package/dist/testing/index.mjs +98 -2
  37. package/dist/tools/index.d.mts +2 -2
  38. package/dist/types-BDVUoAU6.d.mts +559 -0
  39. package/dist/workflows/index.d.mts +1 -1
  40. package/package.json +6 -2
  41. package/dist/types-CuoRx12Q.d.mts +0 -333
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fevex/core",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.5",
4
4
  "description": "Agent Engineering Framework for code-first, provider-neutral AI agents.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -31,6 +31,10 @@
31
31
  "types": "./dist/agents/index.d.mts",
32
32
  "import": "./dist/agents/index.mjs"
33
33
  },
34
+ "./artifacts": {
35
+ "types": "./dist/artifacts/index.d.mts",
36
+ "import": "./dist/artifacts/index.mjs"
37
+ },
34
38
  "./channels": {
35
39
  "types": "./dist/channels/index.d.mts",
36
40
  "import": "./dist/channels/index.mjs"
@@ -85,7 +89,7 @@
85
89
  }
86
90
  },
87
91
  "scripts": {
88
- "build": "tsdown src/index.ts src/agents/index.ts src/channels/index.ts src/http/index.ts src/knowledge/index.ts src/models/index.ts src/tools/index.ts src/workflows/index.ts src/teams/index.ts src/runtime/index.ts src/sandbox/index.ts src/policies/index.ts src/observability/index.ts src/evals/index.ts src/testing/index.ts --format esm --dts --clean",
92
+ "build": "tsdown src/index.ts src/agents/index.ts src/artifacts/index.ts src/channels/index.ts src/http/index.ts src/knowledge/index.ts src/models/index.ts src/tools/index.ts src/workflows/index.ts src/teams/index.ts src/runtime/index.ts src/sandbox/index.ts src/policies/index.ts src/observability/index.ts src/evals/index.ts src/testing/index.ts --format esm --dts --clean",
89
93
  "prepack": "bun run build",
90
94
  "test": "bun test --cwd src",
91
95
  "typecheck": "tsc -p tsconfig.json --noEmit"
@@ -1,333 +0,0 @@
1
- //#region src/core/types.d.ts
2
- /** A value that can cross provider and persistence boundaries without conversion. */
3
- type JsonPrimitive = string | number | boolean | null;
4
- type JsonObject = {
5
- [key: string]: JsonValue;
6
- };
7
- type JsonValue = JsonPrimitive | JsonValue[] | JsonObject;
8
- type RunId = string;
9
- declare const SCHEMA_NOT_TRANSPORTABLE = "SCHEMA_NOT_TRANSPORTABLE";
10
- declare const PROVIDER_SCHEMA_UNSUPPORTED = "PROVIDER_SCHEMA_UNSUPPORTED";
11
- declare const PROVIDER_REASONING_UNSUPPORTED = "PROVIDER_REASONING_UNSUPPORTED";
12
- interface ExecutionContext {
13
- namespace?: string;
14
- actor?: {
15
- id: string;
16
- type?: string;
17
- };
18
- attributes?: JsonObject;
19
- prompt?: JsonObject;
20
- }
21
- type AgentMessageRole = 'system' | 'user' | 'assistant' | 'tool';
22
- interface AgentMessage {
23
- role: AgentMessageRole;
24
- content: string;
25
- name?: string;
26
- toolCallId?: string;
27
- toolCalls?: ToolCall[];
28
- }
29
- interface ToolSpec {
30
- name: string;
31
- description?: string;
32
- inputSchema?: JsonObject;
33
- }
34
- interface ToolCall {
35
- id: string;
36
- name: string;
37
- input: JsonValue;
38
- }
39
- interface ToolEventSource {
40
- kind: 'connection';
41
- provider: string;
42
- connectionName: string;
43
- remoteToolName: string;
44
- }
45
- type AgentEventType = 'run.started' | 'run.recovered' | 'run.paused' | 'run.resumed' | 'model.started' | 'model.output.delta' | 'model.completed' | 'tool.started' | 'tool.completed' | 'tool.failed' | 'tool.retrying' | 'tool.execution_unknown' | 'elicitation.requested' | 'elicitation.resolved' | 'approval.requested' | 'approval.resolved' | 'run.completed' | 'run.failed' | 'run.cancelled' | 'workflow.run.started' | 'workflow.run.recovered' | 'workflow.step.started' | 'workflow.step.completed' | 'workflow.step.failed' | 'workflow.compensation.started' | 'workflow.compensation.completed' | 'workflow.compensation.failed' | 'workflow.wait.started' | 'workflow.wait.completed' | 'workflow.run.paused' | 'workflow.run.resumed' | 'workflow.run.completed' | 'workflow.run.failed' | 'workflow.run.cancelled' | 'team.run.started' | 'team.run.recovered' | 'team.agent.assigned' | 'team.handoff.created' | 'team.task.completed' | 'team.task.failed' | 'team.merge.started' | 'team.merge.completed' | 'team.merge.failed' | 'team.run.paused' | 'team.run.resumed' | 'team.run.completed' | 'team.run.failed' | 'team.run.cancelled';
46
- interface AgentEventPayloads {
47
- 'run.started': undefined;
48
- 'run.recovered': {
49
- actorId: string;
50
- };
51
- 'run.paused': {
52
- reason: 'elicitation' | 'approval' | 'tool_execution_unknown';
53
- toolCallId: string;
54
- };
55
- 'run.resumed': undefined;
56
- 'model.started': {
57
- step: number;
58
- workflowStepId?: string;
59
- workflowAgentName?: string;
60
- teamDelegationId?: string;
61
- teamAgentName?: string;
62
- };
63
- 'model.output.delta': {
64
- step: number;
65
- delta: string;
66
- workflowStepId?: string;
67
- workflowAgentName?: string;
68
- teamDelegationId?: string;
69
- teamAgentName?: string;
70
- };
71
- 'model.completed': {
72
- step: number;
73
- usage?: JsonObject;
74
- workflowStepId?: string;
75
- workflowAgentName?: string;
76
- teamDelegationId?: string;
77
- teamAgentName?: string;
78
- };
79
- 'tool.started': {
80
- step: number;
81
- toolCallId: string;
82
- toolName: string;
83
- attempt?: number;
84
- source?: ToolEventSource;
85
- workflowStepId?: string;
86
- workflowAgentName?: string;
87
- teamDelegationId?: string;
88
- teamAgentName?: string;
89
- };
90
- 'tool.completed': {
91
- step: number;
92
- toolCallId: string;
93
- toolName: string;
94
- attempt?: number;
95
- source?: ToolEventSource;
96
- workflowStepId?: string;
97
- workflowAgentName?: string;
98
- teamDelegationId?: string;
99
- teamAgentName?: string;
100
- };
101
- 'tool.failed': {
102
- step: number;
103
- toolCallId: string;
104
- toolName: string;
105
- error: string;
106
- errorCode?: string;
107
- retryable?: boolean;
108
- source?: ToolEventSource;
109
- workflowStepId?: string;
110
- workflowAgentName?: string;
111
- teamDelegationId?: string;
112
- teamAgentName?: string;
113
- };
114
- 'tool.retrying': {
115
- step: number;
116
- toolCallId: string;
117
- toolName: string;
118
- attempt: number;
119
- delayMs: number;
120
- error: string;
121
- errorCode?: string;
122
- retryable?: boolean;
123
- source?: ToolEventSource;
124
- workflowStepId?: string;
125
- workflowAgentName?: string;
126
- teamDelegationId?: string;
127
- teamAgentName?: string;
128
- };
129
- 'tool.execution_unknown': {
130
- step: number;
131
- toolCallId: string;
132
- toolName: string;
133
- source?: ToolEventSource;
134
- workflowStepId?: string;
135
- workflowAgentName?: string;
136
- teamDelegationId?: string;
137
- teamAgentName?: string;
138
- };
139
- 'elicitation.requested': {
140
- request: {
141
- id: string;
142
- toolCallId: string;
143
- prompt: string;
144
- responseSchema: JsonObject;
145
- requestedAt: string;
146
- expiresAt?: string;
147
- };
148
- workflowStepId?: string;
149
- workflowAgentName?: string;
150
- teamDelegationId?: string;
151
- teamAgentName?: string;
152
- };
153
- 'elicitation.resolved': {
154
- requestId: string;
155
- toolCallId: string;
156
- actorId: string;
157
- workflowStepId?: string;
158
- workflowAgentName?: string;
159
- teamDelegationId?: string;
160
- teamAgentName?: string;
161
- };
162
- 'approval.requested': {
163
- approvalId: string;
164
- toolCallId: string;
165
- toolName: string;
166
- toolLabel?: string;
167
- source?: ToolEventSource;
168
- workflowStepId?: string;
169
- workflowAgentName?: string;
170
- teamDelegationId?: string;
171
- teamAgentName?: string;
172
- };
173
- 'approval.resolved': {
174
- approvalId: string;
175
- toolCallId: string;
176
- decision: 'approve' | 'reject';
177
- actorId: string;
178
- toolLabel?: string;
179
- source?: ToolEventSource;
180
- workflowStepId?: string;
181
- workflowAgentName?: string;
182
- teamDelegationId?: string;
183
- teamAgentName?: string;
184
- };
185
- 'run.completed': {
186
- output: JsonValue;
187
- usage?: JsonObject;
188
- };
189
- 'run.failed': {
190
- error: string;
191
- errorCode?: string;
192
- retryable?: boolean;
193
- source?: ToolEventSource;
194
- };
195
- 'run.cancelled': {
196
- reason: 'aborted' | 'timeout' | 'approval_rejected';
197
- };
198
- 'workflow.run.started': undefined;
199
- 'workflow.run.recovered': {
200
- actorId: string;
201
- };
202
- 'workflow.step.started': {
203
- stepId: string;
204
- kind: 'agent' | 'parallel';
205
- agentName?: string;
206
- };
207
- 'workflow.step.completed': {
208
- stepId: string;
209
- kind: 'agent' | 'parallel';
210
- };
211
- 'workflow.step.failed': {
212
- stepId: string;
213
- kind: 'agent' | 'parallel';
214
- error: string;
215
- };
216
- 'workflow.compensation.started': {
217
- stepId: string;
218
- kind: 'agent' | 'parallel';
219
- };
220
- 'workflow.compensation.completed': {
221
- stepId: string;
222
- kind: 'agent' | 'parallel';
223
- };
224
- 'workflow.compensation.failed': {
225
- stepId: string;
226
- kind: 'agent' | 'parallel';
227
- error: string;
228
- };
229
- 'workflow.wait.started': {
230
- stepId: string;
231
- kind: 'timer' | 'event';
232
- resumeAt?: string;
233
- eventName?: string;
234
- };
235
- 'workflow.wait.completed': {
236
- stepId: string;
237
- kind: 'timer' | 'event';
238
- payload?: JsonValue;
239
- actorId?: string;
240
- receivedAt?: string;
241
- };
242
- 'workflow.run.paused': {
243
- stepId: string;
244
- reason: 'child' | 'timer' | 'event';
245
- childRunId?: string;
246
- };
247
- 'workflow.run.resumed': undefined;
248
- 'workflow.run.completed': {
249
- output: JsonValue;
250
- usage?: JsonObject;
251
- };
252
- 'workflow.run.failed': {
253
- error: string;
254
- errorCode?: string;
255
- retryable?: boolean;
256
- source?: ToolEventSource;
257
- };
258
- 'workflow.run.cancelled': {
259
- reason: 'aborted' | 'timeout' | 'approval_rejected';
260
- };
261
- 'team.run.started': undefined;
262
- 'team.run.recovered': {
263
- actorId: string;
264
- };
265
- 'team.agent.assigned': {
266
- delegationId: string;
267
- agentName: string;
268
- action: 'delegate' | 'handoff';
269
- expectedOutput?: string;
270
- constraints?: string[];
271
- };
272
- 'team.handoff.created': {
273
- delegationId: string;
274
- from: string;
275
- to: string;
276
- reason: string;
277
- };
278
- 'team.task.completed': {
279
- delegationId: string;
280
- agentName: string;
281
- usage?: JsonObject;
282
- };
283
- 'team.task.failed': {
284
- delegationId: string;
285
- agentName?: string;
286
- error: string;
287
- };
288
- 'team.merge.started': {
289
- stepId: string;
290
- width: number;
291
- };
292
- 'team.merge.completed': {
293
- stepId: string;
294
- };
295
- 'team.merge.failed': {
296
- stepId: string;
297
- error: string;
298
- };
299
- 'team.run.paused': {
300
- delegationId: string;
301
- reason: 'child' | 'timer' | 'event';
302
- childRunId?: string;
303
- };
304
- 'team.run.resumed': undefined;
305
- 'team.run.completed': {
306
- output: JsonValue;
307
- usage?: JsonObject;
308
- };
309
- 'team.run.failed': {
310
- error: string;
311
- errorCode?: string;
312
- retryable?: boolean;
313
- source?: ToolEventSource;
314
- };
315
- 'team.run.cancelled': {
316
- reason: 'aborted' | 'timeout' | 'approval_rejected';
317
- };
318
- }
319
- interface AgentEventBase {
320
- id: string;
321
- sequence: number;
322
- runId: RunId;
323
- timestamp: string;
324
- }
325
- type AgentEvent<TType extends AgentEventType = AgentEventType> = { [TCurrent in TType]: AgentEventBase & {
326
- type: TCurrent;
327
- } & (AgentEventPayloads[TCurrent] extends undefined ? {
328
- payload?: never;
329
- } : {
330
- payload: AgentEventPayloads[TCurrent];
331
- }); }[TType];
332
- //#endregion
333
- export { AgentMessageRole as a, JsonPrimitive as c, PROVIDER_SCHEMA_UNSUPPORTED as d, RunId as f, ToolSpec as g, ToolEventSource as h, AgentMessage as i, JsonValue as l, ToolCall as m, AgentEventPayloads as n, ExecutionContext as o, SCHEMA_NOT_TRANSPORTABLE as p, AgentEventType as r, JsonObject as s, AgentEvent as t, PROVIDER_REASONING_UNSUPPORTED as u };