@dxos/assistant 0.8.4-main.fd6878d → 0.8.4-main.fffef41
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/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/extraction/index.mjs +121 -165
- package/dist/lib/browser/extraction/index.mjs.map +4 -4
- package/dist/lib/browser/index.mjs +1097 -161
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/extraction/index.mjs +121 -165
- package/dist/lib/node-esm/extraction/index.mjs.map +4 -4
- package/dist/lib/node-esm/index.mjs +1097 -161
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/conversation/context.d.ts +23 -10
- package/dist/types/src/conversation/context.d.ts.map +1 -1
- package/dist/types/src/conversation/conversation.d.ts +22 -31
- package/dist/types/src/conversation/conversation.d.ts.map +1 -1
- package/dist/types/src/diff.d.ts +15 -0
- package/dist/types/src/diff.d.ts.map +1 -0
- package/dist/types/src/diff.test.d.ts +2 -0
- package/dist/types/src/diff.test.d.ts.map +1 -0
- package/dist/types/src/errors.d.ts +45 -13
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/execution-graph.d.ts +85 -0
- package/dist/types/src/execution-graph.d.ts.map +1 -0
- package/dist/types/src/execution-graph.test.d.ts +2 -0
- package/dist/types/src/execution-graph.test.d.ts.map +1 -0
- package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts +1 -1
- package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts +82 -43
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction.d.ts +262 -225
- package/dist/types/src/extraction/extraction.d.ts.map +1 -1
- package/dist/types/src/extraction/quotes.d.ts +1 -1
- package/dist/types/src/extraction/quotes.d.ts.map +1 -1
- package/dist/types/src/functions/services.d.ts +18 -5
- package/dist/types/src/functions/services.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/session/GenericToolkit.d.ts +84 -0
- package/dist/types/src/session/GenericToolkit.d.ts.map +1 -0
- package/dist/types/src/session/artifact-diff.d.ts +2 -2
- package/dist/types/src/session/artifact-diff.d.ts.map +1 -1
- package/dist/types/src/session/error-handling.d.ts +4 -0
- package/dist/types/src/session/error-handling.d.ts.map +1 -0
- package/dist/types/src/session/format.d.ts +5 -161
- package/dist/types/src/session/format.d.ts.map +1 -1
- package/dist/types/src/session/index.d.ts +3 -0
- package/dist/types/src/session/index.d.ts.map +1 -1
- package/dist/types/src/session/observer.d.ts +22 -0
- package/dist/types/src/session/observer.d.ts.map +1 -0
- package/dist/types/src/session/session.d.ts +22 -138
- package/dist/types/src/session/session.d.ts.map +1 -1
- package/dist/types/src/session/toolkit.d.ts +15 -0
- package/dist/types/src/session/toolkit.d.ts.map +1 -0
- package/dist/types/src/session/version-pin.d.ts +3 -3
- package/dist/types/src/session/version-pin.d.ts.map +1 -1
- package/dist/types/src/templates/system.d.ts +8 -12
- package/dist/types/src/templates/system.d.ts.map +1 -1
- package/dist/types/src/types/artifact.d.ts +20 -0
- package/dist/types/src/types/artifact.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +29 -31
- package/src/conversation/context.ts +75 -22
- package/src/conversation/conversation.ts +80 -77
- package/src/diff.test.ts +43 -0
- package/src/diff.ts +84 -0
- package/src/errors.ts +6 -1
- package/src/execution-graph.test.ts +740 -0
- package/src/execution-graph.ts +509 -0
- package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +9 -9
- package/src/extraction/extraction-llm-function/extraction-llm-function.ts +47 -56
- package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +16 -16
- package/src/extraction/extraction-ner-function/extraction-ner-function.ts +42 -43
- package/src/extraction/extraction-ner-function/named-entity-recognition.test.ts +12 -6
- package/src/extraction/extraction-ner-function/named-entity-recognition.ts +2 -0
- package/src/extraction/extraction.ts +7 -6
- package/src/extraction/quotes.test.ts +2 -2
- package/src/extraction/quotes.ts +3 -3
- package/src/functions/services.ts +104 -56
- package/src/index.ts +3 -1
- package/src/session/GenericToolkit.ts +130 -0
- package/src/session/artifact-diff.ts +8 -4
- package/src/session/error-handling.ts +41 -0
- package/src/session/format.test.ts +5 -4
- package/src/session/format.ts +27 -22
- package/src/session/index.ts +4 -0
- package/src/session/observer.ts +59 -0
- package/src/session/session.conversations.json +1 -0
- package/src/session/session.test.ts +35 -191
- package/src/session/session.ts +119 -185
- package/src/session/toolkit.ts +48 -0
- package/src/session/version-pin.ts +4 -5
- package/src/templates/{format.tpl → instructions/format.tpl} +8 -2
- package/src/templates/{system.tpl → instructions/system.tpl} +15 -14
- package/src/templates/system.ts +25 -16
- package/src/{types.ts → types/artifact.ts} +22 -3
- package/src/types/index.ts +5 -0
- package/dist/lib/browser/chunk-6WRGDEMH.mjs +0 -89
- package/dist/lib/browser/chunk-6WRGDEMH.mjs.map +0 -7
- package/dist/lib/browser/chunk-NZGGCEF3.mjs +0 -341
- package/dist/lib/browser/chunk-NZGGCEF3.mjs.map +0 -7
- package/dist/lib/browser/named-entity-recognition-O46UTCLR.mjs +0 -13
- package/dist/lib/node-esm/chunk-3UU5V4FS.mjs +0 -91
- package/dist/lib/node-esm/chunk-3UU5V4FS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XOOPGSGW.mjs +0 -343
- package/dist/lib/node-esm/chunk-XOOPGSGW.mjs.map +0 -7
- package/dist/lib/node-esm/named-entity-recognition-W4VMRCH6.mjs +0 -14
- package/dist/types/src/session/version-pin.test.d.ts +0 -2
- package/dist/types/src/session/version-pin.test.d.ts.map +0 -1
- package/dist/types/src/summarization/summarization.test.d.ts +0 -2
- package/dist/types/src/summarization/summarization.test.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -16
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/session/__snapshots__/session.test.ts.snap +0 -32
- package/src/session/version-pin.test.ts +0 -7
- package/src/summarization/summarization.test.ts +0 -197
- /package/dist/lib/browser/{named-entity-recognition-O46UTCLR.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/node-esm/{named-entity-recognition-W4VMRCH6.mjs.map → chunk-HSLMI22Q.mjs.map} +0 -0
- /package/src/extraction/extraction-llm-function/{instructions.tpl → transcription-instructions.tpl} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/conversation/context.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/conversation/context.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,sBAAsB,CAAC;AAErE,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,GAAG,EAAsB,KAAK,GAAG,EAAiB,IAAI,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC;;GAEG;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgB1B,CAAC;AAEF,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,cAAc,CAAC;CAAG;AAEpF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;IACjC,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;CAClC,CAAC,CAAC;AAEH,qBAAa,QAAQ;IACnB,QAAQ,CAAC,UAAU,2CAA6E;IAEhG,QAAQ,CAAC,OAAO,oCAA+E;IAE/F,MAAM;;;;CAMP;AAED;;GAEG;AAEH,qBAAa,eAAgB,SAAQ,QAAQ;IAS/B,OAAO,CAAC,QAAQ,CAAC,MAAM;IARnC;;OAEG;IAEH,OAAO,CAAC,SAAS,CAAC,CAA2B;IAC7C,OAAO,CAAC,WAAW,CAAC,CAAiD;IACrE,OAAO,CAAC,QAAQ,CAAC,CAA0C;gBAE9B,MAAM,EAAE,KAAK;IAI1C,IAAI,QAAQ,6BAGX;IAED,IAAI,UAAU,mDAGb;IAED,IAAI,OAAO,4CAGV;cAGwB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;cAQtB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAMhD;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC;IAM1B,IAAI,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBxC,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBhD,OAAO,CAAC,OAAO;CAmBhB;;YAKW,eAAe;;AAH3B,qBAAa,gBAAiB,SAAQ,qBAKnC;CAAG"}
|
|
@@ -1,50 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { Event } from '@dxos/async';
|
|
1
|
+
import type * as Toolkit from '@effect/ai/Toolkit';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import { Resource } from '@dxos/context';
|
|
5
4
|
import { type Queue } from '@dxos/echo-db';
|
|
6
|
-
import {
|
|
7
|
-
import { type
|
|
8
|
-
import { AiSession, type GenerationObserver } from '../session';
|
|
5
|
+
import { Message } from '@dxos/types';
|
|
6
|
+
import { type AiSessionRunError, type AiSessionRunRequirements, type GenerationObserver } from '../session';
|
|
9
7
|
import { AiContextBinder, type ContextBinding } from './context';
|
|
10
|
-
export interface AiConversationRunParams
|
|
8
|
+
export interface AiConversationRunParams {
|
|
11
9
|
prompt: string;
|
|
12
10
|
system?: string;
|
|
13
|
-
toolkit?: AiToolkit.AiToolkit<Tools>;
|
|
14
11
|
observer?: GenerationObserver;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Remove
|
|
17
|
-
*/
|
|
18
|
-
session?: AiSession;
|
|
19
12
|
}
|
|
20
|
-
export type AiConversationOptions = {
|
|
21
|
-
queue: Queue<DataType.Message | ContextBinding>;
|
|
22
|
-
};
|
|
23
13
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* Backed by a Queue.
|
|
14
|
+
* Durable conversation state (initiated by users and agents) backed by a Queue.
|
|
15
|
+
* Executes tools based on AI responses and supports cancellation of in-progress requests.
|
|
27
16
|
*/
|
|
28
|
-
export declare class AiConversation {
|
|
17
|
+
export declare class AiConversation extends Resource {
|
|
18
|
+
/**
|
|
19
|
+
* Message and binding queue.
|
|
20
|
+
*/
|
|
29
21
|
private readonly _queue;
|
|
30
22
|
/**
|
|
31
23
|
* Blueprints bound to the conversation.
|
|
32
24
|
*/
|
|
33
|
-
readonly _context
|
|
25
|
+
private readonly _context;
|
|
34
26
|
/**
|
|
35
|
-
*
|
|
36
|
-
* This is called before the first message is sent.
|
|
37
|
-
*
|
|
38
|
-
* @deprecated Pass in a session instead.
|
|
27
|
+
* Toolkit from the current session request.
|
|
39
28
|
*/
|
|
40
|
-
|
|
41
|
-
constructor(
|
|
29
|
+
private _toolkit;
|
|
30
|
+
constructor(queue: Queue<Message.Message | ContextBinding>);
|
|
31
|
+
protected _open(): Promise<void>;
|
|
32
|
+
protected _close(): Promise<void>;
|
|
42
33
|
get context(): AiContextBinder;
|
|
43
|
-
|
|
34
|
+
get toolkit(): Toolkit.WithHandler<any> | undefined;
|
|
35
|
+
getHistory(): Promise<Message.Message[]>;
|
|
44
36
|
/**
|
|
45
|
-
*
|
|
46
|
-
* Each invocation creates a new `AiSession`, which handles potential tool calls.
|
|
37
|
+
* Creates a new cancelable request effect.
|
|
47
38
|
*/
|
|
48
|
-
|
|
39
|
+
createRequest(params: AiConversationRunParams): Effect.Effect<Message.Message[], AiSessionRunError, AiSessionRunRequirements>;
|
|
49
40
|
}
|
|
50
41
|
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../src/conversation/conversation.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../src/conversation/conversation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EAExB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,eAAe,EAAoB,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEnF,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAED;;;GAGG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IAC1C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0C;IAEjE;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;IAE3C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAuC;gBAEpC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC;cAMxC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;cAKtB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIhD,IAAW,OAAO,oBAEjB;IAED,IAAW,OAAO,yCAEjB;IAEY,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAKrD;;OAEG;IACH,aAAa,CACX,MAAM,EAAE,uBAAuB,GAC9B,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,iBAAiB,EAAE,wBAAwB,CAAC;CA0CjF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DocAccessor } from '@dxos/echo-db';
|
|
2
|
+
export type Diff = {
|
|
3
|
+
match: string;
|
|
4
|
+
replace: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Convert a list of diffs into a list of operations.
|
|
8
|
+
*/
|
|
9
|
+
export declare const reduceDiffs: (diffs: readonly string[]) => Diff[];
|
|
10
|
+
export declare const computeDiffsWithCursors: <T>(accessor: DocAccessor<T>, diffs: readonly string[]) => {
|
|
11
|
+
cursor: string;
|
|
12
|
+
text: string;
|
|
13
|
+
}[];
|
|
14
|
+
export declare const applyDiffs: <T>(accessor: DocAccessor<T>, diffs: readonly string[]) => string;
|
|
15
|
+
//# sourceMappingURL=diff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../src/diff.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAiB,MAAM,eAAe,CAAC;AAc3D,MAAM,MAAM,IAAI,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,IAAI,EAyB1D,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,CAAC,EAAE,UAAU,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,SAAS,MAAM,EAAE;;;GAU5F,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,UAAU,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,SAAS,MAAM,EAAE,KAAG,MAgBlF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff.test.d.ts","sourceRoot":"","sources":["../../../src/diff.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,30 +1,62 @@
|
|
|
1
1
|
import { BaseError } from '@dxos/errors';
|
|
2
|
+
declare const AiModelError_base: {
|
|
3
|
+
new (options?: import("@dxos/errors").BaseErrorOptions): {
|
|
4
|
+
code: "AI_MODEL_ERROR";
|
|
5
|
+
context: Record<string, unknown>;
|
|
6
|
+
readonly name: "AI_MODEL_ERROR";
|
|
7
|
+
readonly message: string;
|
|
8
|
+
readonly _tag: "AI_MODEL_ERROR";
|
|
9
|
+
stack?: string;
|
|
10
|
+
cause?: unknown;
|
|
11
|
+
};
|
|
12
|
+
code: "AI_MODEL_ERROR";
|
|
13
|
+
is(error: unknown): error is BaseError;
|
|
14
|
+
wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause"> & {
|
|
15
|
+
ifTypeDiffers?: boolean;
|
|
16
|
+
}): (error: unknown) => {
|
|
17
|
+
code: "AI_MODEL_ERROR";
|
|
18
|
+
context: Record<string, unknown>;
|
|
19
|
+
readonly name: "AI_MODEL_ERROR";
|
|
20
|
+
readonly message: string;
|
|
21
|
+
readonly _tag: "AI_MODEL_ERROR";
|
|
22
|
+
stack?: string;
|
|
23
|
+
cause?: unknown;
|
|
24
|
+
};
|
|
25
|
+
extend<Code extends string = string>(code: Code, message?: string): any;
|
|
26
|
+
isError(error: unknown): error is Error;
|
|
27
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
28
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
29
|
+
stackTraceLimit: number;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Generic error from AI model.
|
|
33
|
+
*/
|
|
34
|
+
export declare class AiModelError extends AiModelError_base {
|
|
35
|
+
}
|
|
2
36
|
declare const AiAssistantError_base: {
|
|
3
|
-
new (
|
|
4
|
-
|
|
5
|
-
|
|
37
|
+
new (options?: import("@dxos/errors").BaseErrorOptions): {
|
|
38
|
+
code: "AI_ASSISTANT_ERROR";
|
|
39
|
+
context: Record<string, unknown>;
|
|
6
40
|
readonly name: "AI_ASSISTANT_ERROR";
|
|
7
|
-
readonly
|
|
41
|
+
readonly message: string;
|
|
8
42
|
readonly _tag: "AI_ASSISTANT_ERROR";
|
|
9
|
-
readonly context: Record<string, unknown>;
|
|
10
|
-
message: string;
|
|
11
43
|
stack?: string;
|
|
12
44
|
cause?: unknown;
|
|
13
45
|
};
|
|
14
46
|
code: "AI_ASSISTANT_ERROR";
|
|
15
47
|
is(error: unknown): error is BaseError;
|
|
16
|
-
wrap(
|
|
17
|
-
|
|
18
|
-
|
|
48
|
+
wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause"> & {
|
|
49
|
+
ifTypeDiffers?: boolean;
|
|
50
|
+
}): (error: unknown) => {
|
|
51
|
+
code: "AI_ASSISTANT_ERROR";
|
|
52
|
+
context: Record<string, unknown>;
|
|
19
53
|
readonly name: "AI_ASSISTANT_ERROR";
|
|
20
|
-
readonly
|
|
54
|
+
readonly message: string;
|
|
21
55
|
readonly _tag: "AI_ASSISTANT_ERROR";
|
|
22
|
-
readonly context: Record<string, unknown>;
|
|
23
|
-
message: string;
|
|
24
56
|
stack?: string;
|
|
25
57
|
cause?: unknown;
|
|
26
58
|
};
|
|
27
|
-
extend<Code extends string>(code: Code): any;
|
|
59
|
+
extend<Code extends string = string>(code: Code, message?: string): any;
|
|
28
60
|
isError(error: unknown): error is Error;
|
|
29
61
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
30
62
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;qBAWivB,CAAC;;;;;;;;;;;;;;;;AAT3xB;;GAEG;AACH,qBAAa,YAAa,SAAQ,iBAAoD;CAAG;;;;;;;;;;;;;;qBAMisB,CAAC;;;;;;;;;;;;;;;;AAJ3xB;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,qBAA4D;CAAG"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Obj } from '@dxos/echo';
|
|
2
|
+
import { LogLevel } from '@dxos/log';
|
|
3
|
+
import { ContentBlock } from '@dxos/types';
|
|
4
|
+
/**
|
|
5
|
+
* Mercurial-style Commit.
|
|
6
|
+
*/
|
|
7
|
+
export type Commit = {
|
|
8
|
+
id: string;
|
|
9
|
+
parents: string[];
|
|
10
|
+
branch: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
level?: LogLevel;
|
|
13
|
+
message: string;
|
|
14
|
+
timestamp?: Date;
|
|
15
|
+
tags?: string[];
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Models the execution graph based on a stream of events.
|
|
19
|
+
*/
|
|
20
|
+
export declare class ExecutionGraph {
|
|
21
|
+
private readonly _skipBlocks;
|
|
22
|
+
private _commits;
|
|
23
|
+
private _branchNames;
|
|
24
|
+
private _lastBlockId;
|
|
25
|
+
private _toolCallCommitIds;
|
|
26
|
+
private _lastCommitByBranch;
|
|
27
|
+
private _pendingToolResults;
|
|
28
|
+
constructor(_skipBlocks?: ContentBlock.Any['_tag'][]);
|
|
29
|
+
/**
|
|
30
|
+
* Adds events to the graph.
|
|
31
|
+
*/
|
|
32
|
+
addEvents(events: Obj.Any[]): void;
|
|
33
|
+
/**
|
|
34
|
+
* Processes a message event and creates commits for its blocks.
|
|
35
|
+
*/
|
|
36
|
+
private _processMessage;
|
|
37
|
+
/**
|
|
38
|
+
* Processes an AgentStatus event.
|
|
39
|
+
*/
|
|
40
|
+
private _processAgentStatus;
|
|
41
|
+
/**
|
|
42
|
+
* Stable sort: objects with 'created' field are sorted by it, others remain in place.
|
|
43
|
+
*/
|
|
44
|
+
private sortObjectsByCreated;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the current state of the graph.
|
|
47
|
+
*/
|
|
48
|
+
getGraph(lastRequest?: boolean): {
|
|
49
|
+
branches: string[];
|
|
50
|
+
commits: Commit[];
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Tracks tool calls and handles pending tool result updates.
|
|
54
|
+
*/
|
|
55
|
+
private _trackToolCalls;
|
|
56
|
+
/**
|
|
57
|
+
* Updates pending tool results to point to an AgentStatus event.
|
|
58
|
+
*/
|
|
59
|
+
private _updatePendingToolResults;
|
|
60
|
+
/**
|
|
61
|
+
* Handles late updates when AgentStatus is processed before tool result.
|
|
62
|
+
*/
|
|
63
|
+
private _handleLateToolResultUpdate;
|
|
64
|
+
/**
|
|
65
|
+
* Gets the branch name for a tool call.
|
|
66
|
+
*/
|
|
67
|
+
private _getToolCallBranch;
|
|
68
|
+
/**
|
|
69
|
+
* Gets the parents for an AgentStatus commit.
|
|
70
|
+
*/
|
|
71
|
+
private _getAgentStatusParents;
|
|
72
|
+
/**
|
|
73
|
+
* Checks if a commit is a tool call commit.
|
|
74
|
+
*/
|
|
75
|
+
private _isToolCallCommit;
|
|
76
|
+
/**
|
|
77
|
+
* Checks if a commit is a tool result commit.
|
|
78
|
+
*/
|
|
79
|
+
private _isToolResultCommit;
|
|
80
|
+
/**
|
|
81
|
+
* Extracts tool call ID from a commit ID.
|
|
82
|
+
*/
|
|
83
|
+
private _extractToolCallId;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=execution-graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-graph.d.ts","sourceRoot":"","sources":["../../../src/execution-graph.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,GAAG,EAAY,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,YAAY,EAAW,MAAM,aAAa,CAAC;AAKpD;;GAEG;AAEH,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAqBF;;GAEG;AACH,qBAAa,cAAc;IAWb,OAAO,CAAC,QAAQ,CAAC,WAAW;IATxC,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,YAAY,CAAqB;IAGzC,OAAO,CAAC,kBAAkB,CAA6B;IACvD,OAAO,CAAC,mBAAmB,CAA6B;IACxD,OAAO,CAAC,mBAAmB,CAA6B;gBAE3B,WAAW,GAAE,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAgB;IAElF;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE;IAW3B;;OAEG;IACH,OAAO,CAAC,eAAe;IAsBvB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAyB3B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAyB5B;;OAEG;IACH,QAAQ,CAAC,WAAW,UAAQ,GAAG;QAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE;IAUxE;;OAEG;IACH,OAAO,CAAC,eAAe;IAqBvB;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAmBjC;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAoBnC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAO1B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAO9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAIzB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAI3B;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAK3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-graph.test.d.ts","sourceRoot":"","sources":["../../../src/execution-graph.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FunctionDefinition } from '@dxos/functions';
|
|
2
2
|
import { ExtractionInput, ExtractionOutput } from '../extraction';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const extractionAnthropicFunction: FunctionDefinition<ExtractionInput, ExtractionOutput>;
|
|
4
4
|
//# sourceMappingURL=extraction-llm-function.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction-llm-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-llm-function/extraction-llm-function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extraction-llm-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-llm-function/extraction-llm-function.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAAkB,MAAM,iBAAiB,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAElE,eAAO,MAAM,2BAA2B,EAAE,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAqD5F,CAAC"}
|
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Named Entity Recognition model
|
|
3
|
+
*/
|
|
4
|
+
export declare const extractionNerFunction: import("@dxos/functions").FunctionDefinition<{
|
|
3
5
|
readonly options?: {
|
|
4
6
|
readonly timeout?: number | undefined;
|
|
5
7
|
readonly fallbackToRaw?: boolean | undefined;
|
|
6
8
|
} | undefined;
|
|
7
|
-
readonly message: import("@dxos/echo/Type").OfKind<import("@dxos/echo
|
|
9
|
+
readonly message: import("@dxos/echo/Type").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
8
10
|
id: string;
|
|
9
11
|
parentMessage?: string | undefined;
|
|
10
12
|
created: string;
|
|
11
13
|
sender: {
|
|
12
14
|
name?: string | undefined;
|
|
13
|
-
contact?: import("@dxos/echo
|
|
14
|
-
fields?: {
|
|
15
|
-
readonly value: string;
|
|
16
|
-
readonly category?: string | undefined;
|
|
17
|
-
readonly label: string;
|
|
18
|
-
}[] | undefined;
|
|
15
|
+
contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
19
16
|
image?: string | undefined;
|
|
20
17
|
fullName?: string | undefined;
|
|
21
18
|
preferredName?: string | undefined;
|
|
22
19
|
nickname?: string | undefined;
|
|
23
|
-
organization?: import("@dxos/echo
|
|
20
|
+
organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
21
|
+
description?: string | undefined;
|
|
24
22
|
id: string;
|
|
25
23
|
name?: string | undefined;
|
|
26
|
-
description?: string | undefined;
|
|
27
24
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
28
25
|
image?: string | undefined;
|
|
29
26
|
website?: string | undefined;
|
|
27
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
30
28
|
}> | undefined;
|
|
31
29
|
jobTitle?: string | undefined;
|
|
32
30
|
department?: string | undefined;
|
|
@@ -60,11 +58,17 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
60
58
|
readonly label?: string | undefined;
|
|
61
59
|
}[] | undefined;
|
|
62
60
|
birthday?: string | undefined;
|
|
61
|
+
fields?: {
|
|
62
|
+
readonly value: string;
|
|
63
|
+
readonly label: string;
|
|
64
|
+
readonly category?: string | undefined;
|
|
65
|
+
}[] | undefined;
|
|
66
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
63
67
|
}> | undefined;
|
|
64
68
|
identityDid?: string | undefined;
|
|
65
69
|
identityKey?: string | undefined;
|
|
66
70
|
email?: string | undefined;
|
|
67
|
-
role?: "user" | "assistant" | undefined;
|
|
71
|
+
role?: "user" | "assistant" | "tool" | undefined;
|
|
68
72
|
};
|
|
69
73
|
blocks: ({
|
|
70
74
|
version: unknown;
|
|
@@ -72,12 +76,15 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
72
76
|
pending?: boolean | undefined;
|
|
73
77
|
objectId: string;
|
|
74
78
|
} | {
|
|
75
|
-
name?: string | undefined;
|
|
76
79
|
_tag: "file";
|
|
77
80
|
pending?: boolean | undefined;
|
|
78
81
|
url: string;
|
|
82
|
+
name?: string | undefined;
|
|
79
83
|
mediaType?: string | undefined;
|
|
80
84
|
} | {
|
|
85
|
+
id?: string | undefined;
|
|
86
|
+
_tag: "image";
|
|
87
|
+
pending?: boolean | undefined;
|
|
81
88
|
source?: {
|
|
82
89
|
mediaType: string;
|
|
83
90
|
type: "base64";
|
|
@@ -86,9 +93,6 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
86
93
|
url: string;
|
|
87
94
|
type: "http";
|
|
88
95
|
} | undefined;
|
|
89
|
-
id?: string | undefined;
|
|
90
|
-
_tag: "image";
|
|
91
|
-
pending?: boolean | undefined;
|
|
92
96
|
} | {
|
|
93
97
|
_tag: "json";
|
|
94
98
|
pending?: boolean | undefined;
|
|
@@ -105,7 +109,7 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
105
109
|
redactedText?: string | undefined;
|
|
106
110
|
signature?: string | undefined;
|
|
107
111
|
} | {
|
|
108
|
-
reference: import("@dxos/echo
|
|
112
|
+
reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Type").Expando>;
|
|
109
113
|
_tag: "reference";
|
|
110
114
|
pending?: boolean | undefined;
|
|
111
115
|
} | {
|
|
@@ -118,8 +122,22 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
118
122
|
statusText: string;
|
|
119
123
|
} | {
|
|
120
124
|
text: string;
|
|
121
|
-
_tag: "
|
|
125
|
+
_tag: "suggestion";
|
|
126
|
+
pending?: boolean | undefined;
|
|
127
|
+
} | {
|
|
128
|
+
_tag: "summary";
|
|
122
129
|
pending?: boolean | undefined;
|
|
130
|
+
mimeType?: string | undefined;
|
|
131
|
+
message?: string | undefined;
|
|
132
|
+
model?: string | undefined;
|
|
133
|
+
usage?: {
|
|
134
|
+
readonly inputTokens?: number | undefined;
|
|
135
|
+
readonly outputTokens?: number | undefined;
|
|
136
|
+
readonly totalTokens?: number | undefined;
|
|
137
|
+
} | undefined;
|
|
138
|
+
toolCalls?: number | undefined;
|
|
139
|
+
errors?: number | undefined;
|
|
140
|
+
duration?: number | undefined;
|
|
123
141
|
} | {
|
|
124
142
|
text: string;
|
|
125
143
|
_tag: "text";
|
|
@@ -130,17 +148,19 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
130
148
|
_tag: "toolkit";
|
|
131
149
|
pending?: boolean | undefined;
|
|
132
150
|
} | {
|
|
133
|
-
name: string;
|
|
134
151
|
_tag: "toolCall";
|
|
135
152
|
pending?: boolean | undefined;
|
|
153
|
+
name: string;
|
|
136
154
|
toolCallId: string;
|
|
137
|
-
input:
|
|
155
|
+
input: string;
|
|
156
|
+
providerExecuted: boolean;
|
|
138
157
|
} | {
|
|
139
|
-
name: string;
|
|
140
158
|
_tag: "toolResult";
|
|
141
159
|
pending?: boolean | undefined;
|
|
160
|
+
name: string;
|
|
142
161
|
toolCallId: string;
|
|
143
|
-
|
|
162
|
+
providerExecuted: boolean;
|
|
163
|
+
result?: string | undefined;
|
|
144
164
|
error?: string | undefined;
|
|
145
165
|
} | {
|
|
146
166
|
text: string;
|
|
@@ -152,30 +172,27 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
152
172
|
[x: string]: any;
|
|
153
173
|
} | undefined;
|
|
154
174
|
};
|
|
175
|
+
readonly objects?: readonly import("@dxos/echo/internal").Expando[] | undefined;
|
|
155
176
|
}, {
|
|
156
|
-
readonly message: import("@dxos/echo/Type").OfKind<import("@dxos/echo
|
|
177
|
+
readonly message: import("@dxos/echo/Type").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
157
178
|
id: string;
|
|
158
179
|
parentMessage?: string | undefined;
|
|
159
180
|
created: string;
|
|
160
181
|
sender: {
|
|
161
182
|
name?: string | undefined;
|
|
162
|
-
contact?: import("@dxos/echo
|
|
163
|
-
fields?: {
|
|
164
|
-
readonly value: string;
|
|
165
|
-
readonly category?: string | undefined;
|
|
166
|
-
readonly label: string;
|
|
167
|
-
}[] | undefined;
|
|
183
|
+
contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
168
184
|
image?: string | undefined;
|
|
169
185
|
fullName?: string | undefined;
|
|
170
186
|
preferredName?: string | undefined;
|
|
171
187
|
nickname?: string | undefined;
|
|
172
|
-
organization?: import("@dxos/echo
|
|
188
|
+
organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
189
|
+
description?: string | undefined;
|
|
173
190
|
id: string;
|
|
174
191
|
name?: string | undefined;
|
|
175
|
-
description?: string | undefined;
|
|
176
192
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
177
193
|
image?: string | undefined;
|
|
178
194
|
website?: string | undefined;
|
|
195
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
179
196
|
}> | undefined;
|
|
180
197
|
jobTitle?: string | undefined;
|
|
181
198
|
department?: string | undefined;
|
|
@@ -209,11 +226,17 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
209
226
|
readonly label?: string | undefined;
|
|
210
227
|
}[] | undefined;
|
|
211
228
|
birthday?: string | undefined;
|
|
229
|
+
fields?: {
|
|
230
|
+
readonly value: string;
|
|
231
|
+
readonly label: string;
|
|
232
|
+
readonly category?: string | undefined;
|
|
233
|
+
}[] | undefined;
|
|
234
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
212
235
|
}> | undefined;
|
|
213
236
|
identityDid?: string | undefined;
|
|
214
237
|
identityKey?: string | undefined;
|
|
215
238
|
email?: string | undefined;
|
|
216
|
-
role?: "user" | "assistant" | undefined;
|
|
239
|
+
role?: "user" | "assistant" | "tool" | undefined;
|
|
217
240
|
};
|
|
218
241
|
blocks: ({
|
|
219
242
|
version: unknown;
|
|
@@ -221,12 +244,15 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
221
244
|
pending?: boolean | undefined;
|
|
222
245
|
objectId: string;
|
|
223
246
|
} | {
|
|
224
|
-
name?: string | undefined;
|
|
225
247
|
_tag: "file";
|
|
226
248
|
pending?: boolean | undefined;
|
|
227
249
|
url: string;
|
|
250
|
+
name?: string | undefined;
|
|
228
251
|
mediaType?: string | undefined;
|
|
229
252
|
} | {
|
|
253
|
+
id?: string | undefined;
|
|
254
|
+
_tag: "image";
|
|
255
|
+
pending?: boolean | undefined;
|
|
230
256
|
source?: {
|
|
231
257
|
mediaType: string;
|
|
232
258
|
type: "base64";
|
|
@@ -235,9 +261,6 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
235
261
|
url: string;
|
|
236
262
|
type: "http";
|
|
237
263
|
} | undefined;
|
|
238
|
-
id?: string | undefined;
|
|
239
|
-
_tag: "image";
|
|
240
|
-
pending?: boolean | undefined;
|
|
241
264
|
} | {
|
|
242
265
|
_tag: "json";
|
|
243
266
|
pending?: boolean | undefined;
|
|
@@ -254,7 +277,7 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
254
277
|
redactedText?: string | undefined;
|
|
255
278
|
signature?: string | undefined;
|
|
256
279
|
} | {
|
|
257
|
-
reference: import("@dxos/echo
|
|
280
|
+
reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Type").Expando>;
|
|
258
281
|
_tag: "reference";
|
|
259
282
|
pending?: boolean | undefined;
|
|
260
283
|
} | {
|
|
@@ -267,8 +290,22 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
267
290
|
statusText: string;
|
|
268
291
|
} | {
|
|
269
292
|
text: string;
|
|
270
|
-
_tag: "
|
|
293
|
+
_tag: "suggestion";
|
|
294
|
+
pending?: boolean | undefined;
|
|
295
|
+
} | {
|
|
296
|
+
_tag: "summary";
|
|
271
297
|
pending?: boolean | undefined;
|
|
298
|
+
mimeType?: string | undefined;
|
|
299
|
+
message?: string | undefined;
|
|
300
|
+
model?: string | undefined;
|
|
301
|
+
usage?: {
|
|
302
|
+
readonly inputTokens?: number | undefined;
|
|
303
|
+
readonly outputTokens?: number | undefined;
|
|
304
|
+
readonly totalTokens?: number | undefined;
|
|
305
|
+
} | undefined;
|
|
306
|
+
toolCalls?: number | undefined;
|
|
307
|
+
errors?: number | undefined;
|
|
308
|
+
duration?: number | undefined;
|
|
272
309
|
} | {
|
|
273
310
|
text: string;
|
|
274
311
|
_tag: "text";
|
|
@@ -279,17 +316,19 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
279
316
|
_tag: "toolkit";
|
|
280
317
|
pending?: boolean | undefined;
|
|
281
318
|
} | {
|
|
282
|
-
name: string;
|
|
283
319
|
_tag: "toolCall";
|
|
284
320
|
pending?: boolean | undefined;
|
|
321
|
+
name: string;
|
|
285
322
|
toolCallId: string;
|
|
286
|
-
input:
|
|
323
|
+
input: string;
|
|
324
|
+
providerExecuted: boolean;
|
|
287
325
|
} | {
|
|
288
|
-
name: string;
|
|
289
326
|
_tag: "toolResult";
|
|
290
327
|
pending?: boolean | undefined;
|
|
328
|
+
name: string;
|
|
291
329
|
toolCallId: string;
|
|
292
|
-
|
|
330
|
+
providerExecuted: boolean;
|
|
331
|
+
result?: string | undefined;
|
|
293
332
|
error?: string | undefined;
|
|
294
333
|
} | {
|
|
295
334
|
text: string;
|
|
@@ -302,5 +341,5 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
302
341
|
} | undefined;
|
|
303
342
|
};
|
|
304
343
|
readonly timeElapsed: number;
|
|
305
|
-
}>;
|
|
344
|
+
}, import("@dxos/functions").FunctionServices>;
|
|
306
345
|
//# sourceMappingURL=extraction-ner-function.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction-ner-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/extraction-ner-function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extraction-ner-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/extraction-ner-function.ts"],"names":[],"mappings":"AAQA;;GAEG;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CA2ChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"named-entity-recognition.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/named-entity-recognition.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,+BAA+B,EACpC,KAAK,yBAAyB,EAE/B,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"named-entity-recognition.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/named-entity-recognition.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,+BAA+B,EACpC,KAAK,yBAAyB,EAE/B,MAAM,sBAAsB,CAAC;AAM9B;;;;GAIG;AACH,eAAO,MAAM,MAAM,gDASlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAU,MAAM,MAAM,KAAG,OAAO,CAAC,yBAAyB,EAAE,CAM3F,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,yBAAyB,EAAE,KAAG,yBAAyB,EAAE,EAmClG,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,OAAO,yBAAyB,EAAE,KAAG,yBAmBrE,CAAC"}
|