@aeye/core 0.1.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 +568 -0
- package/dist/agent.d.ts +85 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +81 -0
- package/dist/agent.js.map +1 -0
- package/dist/common.d.ts +161 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +456 -0
- package/dist/common.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/prompt.d.ts +327 -0
- package/dist/prompt.d.ts.map +1 -0
- package/dist/prompt.js +947 -0
- package/dist/prompt.js.map +1 -0
- package/dist/tool.d.ts +139 -0
- package/dist/tool.d.ts.map +1 -0
- package/dist/tool.js +162 -0
- package/dist/tool.js.map +1 -0
- package/dist/types.d.ts +545 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +54 -0
package/dist/common.js
ADDED
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
export function resolveFn(fn, reprocess) {
|
|
2
|
+
if (!fn) {
|
|
3
|
+
return async () => undefined;
|
|
4
|
+
}
|
|
5
|
+
const isFunc = (x) => typeof x === 'function';
|
|
6
|
+
if (reprocess) {
|
|
7
|
+
return fn instanceof Promise
|
|
8
|
+
? async () => reprocess(await fn)
|
|
9
|
+
: isFunc(fn)
|
|
10
|
+
? async (...args) => reprocess(await fn(...args))
|
|
11
|
+
: (() => {
|
|
12
|
+
const cached = reprocess(fn);
|
|
13
|
+
return async () => cached;
|
|
14
|
+
})();
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return fn instanceof Promise
|
|
18
|
+
? () => fn
|
|
19
|
+
: isFunc(fn)
|
|
20
|
+
? async (...args) => await fn(...args)
|
|
21
|
+
: async () => fn;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Checks if a promise has settled (either fulfilled or rejected).
|
|
26
|
+
*
|
|
27
|
+
* @param p - The promise to check.
|
|
28
|
+
* @returns A promise that resolves to true if settled, false otherwise.
|
|
29
|
+
*/
|
|
30
|
+
export async function isSettled(p) {
|
|
31
|
+
return Promise.race([p.then(() => true), Promise.resolve(false)]);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Type guard to check if a value is a Promise.
|
|
35
|
+
*
|
|
36
|
+
* @param value - The value to check.
|
|
37
|
+
* @returns True if the value is a Promise, false otherwise.
|
|
38
|
+
*/
|
|
39
|
+
export function isPromise(value) {
|
|
40
|
+
return value !== null && typeof value === 'object' && typeof value.then === 'function';
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Type guard to check if a value is an AsyncGenerator.
|
|
44
|
+
*
|
|
45
|
+
* @param value - The value to check.
|
|
46
|
+
* @returns True if the value is an AsyncGenerator, false otherwise.
|
|
47
|
+
*/
|
|
48
|
+
export function isAsyncGenerator(value) {
|
|
49
|
+
return (value != null &&
|
|
50
|
+
typeof value === "object" &&
|
|
51
|
+
typeof value[Symbol.asyncIterator] === "function" &&
|
|
52
|
+
typeof value.next === "function" &&
|
|
53
|
+
typeof value.throw === "function" &&
|
|
54
|
+
typeof value.return === "function");
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Yields promises as they settle (either fulfill or reject), maintaining their original indices.
|
|
58
|
+
* Useful for processing multiple async operations as soon as each one completes.
|
|
59
|
+
*
|
|
60
|
+
* @param promises - Array of promises to yield as they settle.
|
|
61
|
+
* @returns An async generator yielding objects with the settled promise and its index.
|
|
62
|
+
* @example
|
|
63
|
+
* const promises = [delay(100), delay(50), delay(200)];
|
|
64
|
+
* for await (const { result, index } of yieldAll(promises)) {
|
|
65
|
+
* console.log(`Promise ${index} settled`);
|
|
66
|
+
* const value = await result;
|
|
67
|
+
* }
|
|
68
|
+
*/
|
|
69
|
+
export async function* yieldAll(promises) {
|
|
70
|
+
// Create index-tracking promises that resolve with their index
|
|
71
|
+
const indexPromises = promises.map((p, i) =>
|
|
72
|
+
// both fulfillment and rejection resolve to the index so the race
|
|
73
|
+
// tells us when a promise *settles* (either way)
|
|
74
|
+
p.then(() => i, () => i));
|
|
75
|
+
// Keep a Set of pending indices (stable ids that never shift)
|
|
76
|
+
const pending = new Set(promises.map((_, i) => i));
|
|
77
|
+
while (pending.size > 0) {
|
|
78
|
+
// Race only the still-pending index-promises
|
|
79
|
+
const racers = Array.from(pending).map(i => indexPromises[i]);
|
|
80
|
+
const idx = await Promise.race(racers);
|
|
81
|
+
// Yield the original Promise<T> so the caller decides how to await/handle it
|
|
82
|
+
yield { result: promises[idx], index: idx };
|
|
83
|
+
// Remove by stable index (no shifting problems)
|
|
84
|
+
pending.delete(idx);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Resolves an output value from various input types.
|
|
89
|
+
* Handles promises, raw values, and AsyncGenerators uniformly.
|
|
90
|
+
* These are all common return types of AI components.
|
|
91
|
+
*
|
|
92
|
+
* @param input - The value to resolve (can be a value, Promise, or AsyncGenerator).
|
|
93
|
+
* @returns A promise that resolves to the final value.
|
|
94
|
+
* @example
|
|
95
|
+
* await resolve(42); // 42
|
|
96
|
+
* await resolve(Promise.resolve('hello')); // 'hello'
|
|
97
|
+
* await resolve(asyncGenerator()); // final return value
|
|
98
|
+
*/
|
|
99
|
+
export async function resolve(input) {
|
|
100
|
+
if (isPromise(input)) {
|
|
101
|
+
return resolve(await input);
|
|
102
|
+
}
|
|
103
|
+
else if (isAsyncGenerator(input)) {
|
|
104
|
+
let result = await input.next();
|
|
105
|
+
while (!result.done) {
|
|
106
|
+
result = await input.next();
|
|
107
|
+
}
|
|
108
|
+
return resolve(result.value);
|
|
109
|
+
}
|
|
110
|
+
else if (typeof input === 'function') {
|
|
111
|
+
return resolve(input());
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
return input;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Consumes all values from an AsyncGenerator and returns them as an array.
|
|
119
|
+
*
|
|
120
|
+
* @param gen - The AsyncGenerator to consume.
|
|
121
|
+
* @returns An array of all values yielded by the generator.
|
|
122
|
+
*/
|
|
123
|
+
export async function consumeAll(gen) {
|
|
124
|
+
const results = [];
|
|
125
|
+
for await (const item of gen) {
|
|
126
|
+
results.push(item);
|
|
127
|
+
}
|
|
128
|
+
return results;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Accumulates usage statistics by adding values from one Usage object to another.
|
|
132
|
+
* Handles the nested structure matching ModelPricing.
|
|
133
|
+
*
|
|
134
|
+
* @param target - The target Usage object to accumulate into.
|
|
135
|
+
* @param add - The Usage object to add from.
|
|
136
|
+
* @returns
|
|
137
|
+
*/
|
|
138
|
+
export function accumulateUsage(target, add) {
|
|
139
|
+
if (!add) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
// Accumulate text usage
|
|
143
|
+
if (add.text) {
|
|
144
|
+
if (!target.text) {
|
|
145
|
+
target.text = {};
|
|
146
|
+
}
|
|
147
|
+
if (add.text.input !== undefined) {
|
|
148
|
+
target.text.input = (target.text.input || 0) + add.text.input;
|
|
149
|
+
}
|
|
150
|
+
if (add.text.output !== undefined) {
|
|
151
|
+
target.text.output = (target.text.output || 0) + add.text.output;
|
|
152
|
+
}
|
|
153
|
+
if (add.text.cached !== undefined) {
|
|
154
|
+
target.text.cached = (target.text.cached || 0) + add.text.cached;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
// Accumulate audio usage
|
|
158
|
+
if (add.audio) {
|
|
159
|
+
if (!target.audio) {
|
|
160
|
+
target.audio = {};
|
|
161
|
+
}
|
|
162
|
+
if (add.audio.input !== undefined) {
|
|
163
|
+
target.audio.input = (target.audio.input || 0) + add.audio.input;
|
|
164
|
+
}
|
|
165
|
+
if (add.audio.output !== undefined) {
|
|
166
|
+
target.audio.output = (target.audio.output || 0) + add.audio.output;
|
|
167
|
+
}
|
|
168
|
+
if (add.audio.seconds !== undefined) {
|
|
169
|
+
target.audio.seconds = (target.audio.seconds || 0) + add.audio.seconds;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
// Accumulate image usage
|
|
173
|
+
if (add.image) {
|
|
174
|
+
if (!target.image) {
|
|
175
|
+
target.image = { output: [] };
|
|
176
|
+
}
|
|
177
|
+
if (add.image.input !== undefined) {
|
|
178
|
+
target.image.input = (target.image.input || 0) + add.image.input;
|
|
179
|
+
}
|
|
180
|
+
if (add.image.output) {
|
|
181
|
+
if (!target.image.output) {
|
|
182
|
+
target.image.output = [];
|
|
183
|
+
}
|
|
184
|
+
// Merge image outputs by quality and size
|
|
185
|
+
for (const addOutput of add.image.output) {
|
|
186
|
+
const existing = target.image.output.find(o => o.quality === addOutput.quality &&
|
|
187
|
+
o.size.width === addOutput.size.width &&
|
|
188
|
+
o.size.height === addOutput.size.height);
|
|
189
|
+
if (existing) {
|
|
190
|
+
existing.count += addOutput.count;
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
target.image.output.push({ ...addOutput });
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
// Accumulate reasoning usage
|
|
199
|
+
if (add.reasoning) {
|
|
200
|
+
if (!target.reasoning) {
|
|
201
|
+
target.reasoning = {};
|
|
202
|
+
}
|
|
203
|
+
if (add.reasoning.input !== undefined) {
|
|
204
|
+
target.reasoning.input = (target.reasoning.input || 0) + add.reasoning.input;
|
|
205
|
+
}
|
|
206
|
+
if (add.reasoning.output !== undefined) {
|
|
207
|
+
target.reasoning.output = (target.reasoning.output || 0) + add.reasoning.output;
|
|
208
|
+
}
|
|
209
|
+
if (add.reasoning.cached !== undefined) {
|
|
210
|
+
target.reasoning.cached = (target.reasoning.cached || 0) + add.reasoning.cached;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
// Accumulate embeddings usage
|
|
214
|
+
if (add.embeddings) {
|
|
215
|
+
if (!target.embeddings) {
|
|
216
|
+
target.embeddings = {};
|
|
217
|
+
}
|
|
218
|
+
if (add.embeddings.count !== undefined) {
|
|
219
|
+
target.embeddings.count = (target.embeddings.count || 0) + add.embeddings.count;
|
|
220
|
+
}
|
|
221
|
+
if (add.embeddings.tokens !== undefined) {
|
|
222
|
+
target.embeddings.tokens = (target.embeddings.tokens || 0) + add.embeddings.tokens;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
// Accumulate cost
|
|
226
|
+
if (add.cost !== undefined) {
|
|
227
|
+
target.cost = (target.cost || 0) + add.cost;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Calculate total input tokens from a Usage object.
|
|
232
|
+
* Includes tokens from text, audio, image, reasoning input, and embeddings.
|
|
233
|
+
*
|
|
234
|
+
* @param usage - The Usage object to calculate input tokens from
|
|
235
|
+
* @returns Total input tokens
|
|
236
|
+
*/
|
|
237
|
+
export function getInputTokens(usage) {
|
|
238
|
+
if (!usage)
|
|
239
|
+
return 0;
|
|
240
|
+
return (usage.text?.input || 0) +
|
|
241
|
+
(usage.audio?.input || 0) +
|
|
242
|
+
(usage.image?.input || 0) +
|
|
243
|
+
(usage.reasoning?.input || 0) +
|
|
244
|
+
(usage.embeddings?.tokens || 0);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Calculate total output tokens from a Usage object.
|
|
248
|
+
* Includes tokens from text, audio, and reasoning output.
|
|
249
|
+
* Note: image.output represents generated images (not tokens), so it's excluded.
|
|
250
|
+
*
|
|
251
|
+
* @param usage - The Usage object to calculate output tokens from
|
|
252
|
+
* @returns Total output tokens
|
|
253
|
+
*/
|
|
254
|
+
export function getOutputTokens(usage) {
|
|
255
|
+
if (!usage)
|
|
256
|
+
return 0;
|
|
257
|
+
return (usage.text?.output || 0) +
|
|
258
|
+
(usage.audio?.output || 0) +
|
|
259
|
+
(usage.reasoning?.output || 0);
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Calculate total tokens from a Usage object.
|
|
263
|
+
* Includes all tokens: input, output, cached from all modalities.
|
|
264
|
+
* Note: image.output represents generated images (not tokens), so it's excluded.
|
|
265
|
+
*
|
|
266
|
+
* @param usage - The Usage object to calculate total tokens from
|
|
267
|
+
* @returns Total tokens
|
|
268
|
+
*/
|
|
269
|
+
export function getTotalTokens(usage) {
|
|
270
|
+
if (!usage)
|
|
271
|
+
return 0;
|
|
272
|
+
return (usage.text?.input || 0) +
|
|
273
|
+
(usage.text?.output || 0) +
|
|
274
|
+
(usage.text?.cached || 0) +
|
|
275
|
+
(usage.audio?.input || 0) +
|
|
276
|
+
(usage.audio?.output || 0) +
|
|
277
|
+
(usage.image?.input || 0) +
|
|
278
|
+
(usage.reasoning?.input || 0) +
|
|
279
|
+
(usage.reasoning?.output || 0) +
|
|
280
|
+
(usage.reasoning?.cached || 0) +
|
|
281
|
+
(usage.embeddings?.tokens || 0);
|
|
282
|
+
}
|
|
283
|
+
export function getModel(input) {
|
|
284
|
+
return typeof input === 'string' ? { id: input } : input;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Converts a series of chunks into a Response object.
|
|
288
|
+
*
|
|
289
|
+
* @param chunks - The array of Chunk objects to convert.
|
|
290
|
+
* @returns The aggregated Response object.
|
|
291
|
+
*/
|
|
292
|
+
export function getResponseFromChunks(chunks) {
|
|
293
|
+
const resp = {
|
|
294
|
+
content: '',
|
|
295
|
+
finishReason: 'stop',
|
|
296
|
+
model: 'unknown',
|
|
297
|
+
};
|
|
298
|
+
for (const chunk of chunks) {
|
|
299
|
+
if (chunk.content) {
|
|
300
|
+
resp.content += chunk.content;
|
|
301
|
+
}
|
|
302
|
+
if (chunk.finishReason) {
|
|
303
|
+
resp.finishReason = chunk.finishReason;
|
|
304
|
+
}
|
|
305
|
+
if (chunk.reasoning) {
|
|
306
|
+
resp.reasoning = (resp.reasoning || '') + chunk.reasoning;
|
|
307
|
+
}
|
|
308
|
+
if (chunk.model) {
|
|
309
|
+
resp.model = chunk.model;
|
|
310
|
+
}
|
|
311
|
+
if (chunk.refusal) {
|
|
312
|
+
resp.refusal = chunk.refusal;
|
|
313
|
+
}
|
|
314
|
+
if (chunk.toolCall) {
|
|
315
|
+
resp.toolCalls = resp.toolCalls || [];
|
|
316
|
+
resp.toolCalls.push(chunk.toolCall);
|
|
317
|
+
}
|
|
318
|
+
if (chunk.usage) {
|
|
319
|
+
resp.usage = resp.usage || {};
|
|
320
|
+
accumulateUsage(resp.usage, chunk.usage);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return resp;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Converts a Response object into an array of Chunk objects.
|
|
327
|
+
*
|
|
328
|
+
* @param response - The response to convert.
|
|
329
|
+
* @returns The built chunks from the response.
|
|
330
|
+
*/
|
|
331
|
+
export function getChunksFromResponse(response) {
|
|
332
|
+
const chunks = [];
|
|
333
|
+
if (response.reasoning || response.refusal) {
|
|
334
|
+
chunks.push({
|
|
335
|
+
refusal: response.refusal,
|
|
336
|
+
reasoning: response.reasoning,
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
for (const toolCall of response.toolCalls || []) {
|
|
340
|
+
chunks.push({ toolCall, toolCallNamed: toolCall, toolCallArguments: toolCall });
|
|
341
|
+
}
|
|
342
|
+
chunks.push({
|
|
343
|
+
content: response.content,
|
|
344
|
+
finishReason: response.finishReason,
|
|
345
|
+
usage: response.usage,
|
|
346
|
+
model: response.model,
|
|
347
|
+
});
|
|
348
|
+
return chunks;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Creates a runner that emits events during component execution.
|
|
352
|
+
*
|
|
353
|
+
* @param events
|
|
354
|
+
* @returns
|
|
355
|
+
*/ // @ts-ignore
|
|
356
|
+
export function withEvents(events) {
|
|
357
|
+
let instanceIndex = 0;
|
|
358
|
+
const runner = (component, input, context, getOutput) => {
|
|
359
|
+
const instanceContext = { ...context };
|
|
360
|
+
const instance = {
|
|
361
|
+
id: `${component.kind}:${component.name}:${instanceIndex++}`,
|
|
362
|
+
parent: context.instance,
|
|
363
|
+
component,
|
|
364
|
+
context: instanceContext,
|
|
365
|
+
input,
|
|
366
|
+
status: 'pending',
|
|
367
|
+
};
|
|
368
|
+
if (instanceContext.instance) {
|
|
369
|
+
instanceContext.instance.children = instanceContext.instance.children || [];
|
|
370
|
+
instanceContext.instance.children.push(instance);
|
|
371
|
+
}
|
|
372
|
+
instanceContext.instance = instance;
|
|
373
|
+
if (instance.parent) {
|
|
374
|
+
// @ts-ignore
|
|
375
|
+
events.onChild?.(instance.parent, instance);
|
|
376
|
+
}
|
|
377
|
+
// @ts-ignore
|
|
378
|
+
events.onStatus?.(instance);
|
|
379
|
+
instance.status = 'running';
|
|
380
|
+
instance.started = Date.now();
|
|
381
|
+
const output = getOutput(instanceContext, events);
|
|
382
|
+
// Helper to update instance status on completion
|
|
383
|
+
const markCompleted = (result) => {
|
|
384
|
+
instance.status = 'completed';
|
|
385
|
+
instance.completed = Date.now();
|
|
386
|
+
instance.output = result;
|
|
387
|
+
// @ts-ignore
|
|
388
|
+
events.onStatus?.(instance);
|
|
389
|
+
};
|
|
390
|
+
// Helper to update instance status on error
|
|
391
|
+
const markFailed = (error) => {
|
|
392
|
+
if (instanceContext.signal?.aborted) {
|
|
393
|
+
instance.status = 'interrupted';
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
instance.status = 'failed';
|
|
397
|
+
}
|
|
398
|
+
instance.completed = Date.now();
|
|
399
|
+
instance.error = error;
|
|
400
|
+
// @ts-ignore
|
|
401
|
+
events.onStatus?.(instance);
|
|
402
|
+
};
|
|
403
|
+
// Helper to wrap an async generator with status tracking
|
|
404
|
+
const wrapGenerator = async function* (generator) {
|
|
405
|
+
try {
|
|
406
|
+
// Yield all events from the original generator
|
|
407
|
+
for await (const event of generator) {
|
|
408
|
+
yield event;
|
|
409
|
+
}
|
|
410
|
+
// Capture the return value (generator is now exhausted)
|
|
411
|
+
const lastResult = await generator.next();
|
|
412
|
+
const finalResult = lastResult.value;
|
|
413
|
+
markCompleted(finalResult);
|
|
414
|
+
return finalResult;
|
|
415
|
+
}
|
|
416
|
+
catch (error) {
|
|
417
|
+
markFailed(error);
|
|
418
|
+
throw error;
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
// Handle async generators differently - wrap them instead of consuming
|
|
422
|
+
if (isAsyncGenerator(output)) {
|
|
423
|
+
return wrapGenerator(output);
|
|
424
|
+
}
|
|
425
|
+
else if (isPromise(output)) {
|
|
426
|
+
// Check if the promise resolves to an async generator
|
|
427
|
+
const wrappedGenerator = async function* () {
|
|
428
|
+
try {
|
|
429
|
+
const resolved = await output;
|
|
430
|
+
if (isAsyncGenerator(resolved)) {
|
|
431
|
+
// It's a Promise<AsyncGenerator>, wrap and forward
|
|
432
|
+
return yield* wrapGenerator(resolved);
|
|
433
|
+
}
|
|
434
|
+
else {
|
|
435
|
+
// It's a Promise<value>, just complete
|
|
436
|
+
markCompleted(resolved);
|
|
437
|
+
return resolved;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
catch (error) {
|
|
441
|
+
markFailed(error);
|
|
442
|
+
throw error;
|
|
443
|
+
}
|
|
444
|
+
}();
|
|
445
|
+
return wrappedGenerator;
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
// Original logic for non-generators, non-promises (raw values)
|
|
449
|
+
const resolved = resolve(output);
|
|
450
|
+
resolved.then(markCompleted, markFailed);
|
|
451
|
+
return output;
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
return runner;
|
|
455
|
+
}
|
|
456
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAoDA,MAAM,UAAU,SAAS,CAAqC,EAAa,EAAE,SAAu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CAAC,EAAE,CAAC;YAEJ,OAAO,gBAAsC,CAAC;QAChD,CAAC;aAAM,CAAC;YACN,+DAA+D;YAC/D,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;YAEjC,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;YAEzC,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The core module contains types and interfaces related to AI components such as agents, tools, and chat interactions.
|
|
3
|
+
*
|
|
4
|
+
* - `TContext` is a type that you decide is needed for your AI components to operate within a specific context.
|
|
5
|
+
* - `TMetadata` is a type that you decide that is needed during execution/streaming to run that component with the right settings.
|
|
6
|
+
*/
|
|
7
|
+
export * from './types';
|
|
8
|
+
export * from './common';
|
|
9
|
+
export * from './tool';
|
|
10
|
+
export * from './prompt';
|
|
11
|
+
export * from './agent';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The core module contains types and interfaces related to AI components such as agents, tools, and chat interactions.
|
|
3
|
+
*
|
|
4
|
+
* - `TContext` is a type that you decide is needed for your AI components to operate within a specific context.
|
|
5
|
+
* - `TMetadata` is a type that you decide that is needed during execution/streaming to run that component with the right settings.
|
|
6
|
+
*/
|
|
7
|
+
export * from './types';
|
|
8
|
+
export * from './common';
|
|
9
|
+
export * from './tool';
|
|
10
|
+
export * from './prompt';
|
|
11
|
+
export * from './agent';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|