@dxos/assistant 0.8.3 → 0.8.4-main.1c7ec43d41
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 +1 -0
- package/dist/lib/neutral/extraction/index.mjs +202 -0
- package/dist/lib/neutral/extraction/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +1736 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/types/src/conversation/context.d.ts +156 -0
- package/dist/types/src/conversation/context.d.ts.map +1 -0
- package/dist/types/src/conversation/context.test.d.ts +2 -0
- package/dist/types/src/conversation/context.test.d.ts.map +1 -0
- package/dist/types/src/conversation/index.d.ts +3 -0
- package/dist/types/src/conversation/index.d.ts.map +1 -0
- package/dist/types/src/conversation/session.d.ts +73 -0
- package/dist/types/src/conversation/session.d.ts.map +1 -0
- package/dist/types/src/diff.d.ts +17 -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 +67 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- 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-ner-function/index.d.ts +0 -1
- package/dist/types/src/extraction/extraction-ner-function/index.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts +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 +1066 -215
- package/dist/types/src/extraction/extraction.d.ts.map +1 -1
- package/dist/types/src/extraction/index.d.ts +0 -1
- package/dist/types/src/extraction/index.d.ts.map +1 -1
- package/dist/types/src/extraction/quotes.d.ts +3 -3
- package/dist/types/src/extraction/quotes.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +2 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/services.d.ts +17 -0
- package/dist/types/src/functions/services.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +7 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/session/artifact-diff.d.ts +27 -0
- package/dist/types/src/session/artifact-diff.d.ts.map +1 -0
- 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 +15 -0
- package/dist/types/src/session/format.d.ts.map +1 -0
- package/dist/types/src/session/index.d.ts +5 -1
- package/dist/types/src/session/index.d.ts.map +1 -1
- package/dist/types/src/session/observer.d.ts +23 -0
- package/dist/types/src/session/observer.d.ts.map +1 -0
- package/dist/types/src/session/request.d.ts +104 -0
- package/dist/types/src/session/request.d.ts.map +1 -0
- package/dist/types/src/session/toolkit.d.ts +16 -0
- package/dist/types/src/session/toolkit.d.ts.map +1 -0
- package/dist/types/src/session/version-pin.d.ts +5 -5
- package/dist/types/src/session/version-pin.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +2 -0
- package/dist/types/src/templates/index.d.ts.map +1 -0
- package/dist/types/src/templates/system.d.ts +17 -0
- package/dist/types/src/templates/system.d.ts.map +1 -0
- package/dist/types/src/tracing.d.ts +233 -0
- package/dist/types/src/tracing.d.ts.map +1 -0
- package/dist/types/src/types/artifact.d.ts +28 -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 +43 -38
- package/src/conversation/context.test.ts +52 -0
- package/src/conversation/context.ts +403 -0
- package/src/conversation/index.ts +6 -0
- package/src/conversation/session.ts +323 -0
- package/src/diff.test.ts +74 -0
- package/src/diff.ts +93 -0
- package/src/errors.ts +15 -0
- package/src/execution-graph.test.ts +740 -0
- package/src/execution-graph.ts +519 -0
- package/src/extraction/extraction-ner-function/index.ts +0 -1
- package/src/extraction/extraction-ner-function/named-entity-recognition.test.ts +12 -6
- package/src/extraction/extraction-ner-function/named-entity-recognition.ts +3 -1
- package/src/extraction/extraction.ts +44 -15
- package/src/extraction/index.ts +0 -1
- package/src/extraction/quotes.test.ts +3 -3
- package/src/extraction/quotes.ts +6 -7
- package/src/functions/index.ts +5 -0
- package/src/functions/services.ts +214 -0
- package/src/index.ts +7 -3
- package/src/session/artifact-diff.ts +41 -0
- package/src/session/error-handling.ts +41 -0
- package/src/session/format.ts +147 -0
- package/src/session/index.ts +5 -1
- package/src/session/observer.ts +62 -0
- package/src/session/request.ts +347 -0
- package/src/session/toolkit.ts +47 -0
- package/src/session/version-pin.ts +12 -12
- package/src/templates/index.ts +5 -0
- package/src/templates/instructions/format.tpl +57 -0
- package/src/templates/instructions/system.tpl +96 -0
- package/src/templates/system.ts +42 -0
- package/src/tracing.ts +57 -0
- package/src/types/artifact.ts +89 -0
- package/src/types/index.ts +5 -0
- package/src/typings.d.ts +5 -0
- package/dist/lib/browser/index.mjs +0 -2158
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/node/index.cjs +0 -2178
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node-esm/index.mjs +0 -2160
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/types/bin/chat.d.ts +0 -2
- package/dist/types/bin/chat.d.ts.map +0 -1
- package/dist/types/src/blueprint/ai.test.d.ts +0 -2
- package/dist/types/src/blueprint/ai.test.d.ts.map +0 -1
- package/dist/types/src/blueprint/blueprint.d.ts +0 -55
- package/dist/types/src/blueprint/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprint/blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprint/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprint/index.d.ts +0 -4
- package/dist/types/src/blueprint/index.d.ts.map +0 -1
- package/dist/types/src/blueprint/logger.d.ts +0 -25
- package/dist/types/src/blueprint/logger.d.ts.map +0 -1
- package/dist/types/src/blueprint/machine.d.ts +0 -143
- package/dist/types/src/blueprint/machine.d.ts.map +0 -1
- package/dist/types/src/blueprint/test-data.d.ts +0 -3
- package/dist/types/src/blueprint/test-data.d.ts.map +0 -1
- package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts +0 -4
- package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts.map +0 -1
- package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.test.d.ts +0 -2
- package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.test.d.ts.map +0 -1
- package/dist/types/src/extraction/extraction-llm-function/index.d.ts +0 -2
- package/dist/types/src/extraction/extraction-llm-function/index.d.ts.map +0 -1
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts +0 -208
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +0 -1
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.test.d.ts +0 -2
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.test.d.ts.map +0 -1
- package/dist/types/src/research/exa.d.ts +0 -7
- package/dist/types/src/research/exa.d.ts.map +0 -1
- package/dist/types/src/research/graph.d.ts +0 -41
- package/dist/types/src/research/graph.d.ts.map +0 -1
- package/dist/types/src/research/graph.test.d.ts +0 -2
- package/dist/types/src/research/graph.test.d.ts.map +0 -1
- package/dist/types/src/research/index.d.ts +0 -4
- package/dist/types/src/research/index.d.ts.map +0 -1
- package/dist/types/src/research/research.d.ts +0 -10
- package/dist/types/src/research/research.d.ts.map +0 -1
- package/dist/types/src/research/research.test.d.ts +0 -2
- package/dist/types/src/research/research.test.d.ts.map +0 -1
- package/dist/types/src/session/session.d.ts +0 -261
- package/dist/types/src/session/session.d.ts.map +0 -1
- package/dist/types/src/session/session.test.d.ts +0 -2
- package/dist/types/src/session/session.test.d.ts.map +0 -1
- 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/testing/exa-search-1748337321991.d.ts +0 -38
- package/dist/types/src/testing/exa-search-1748337321991.d.ts.map +0 -1
- package/dist/types/src/testing/exa-search-1748337331526.d.ts +0 -37
- package/dist/types/src/testing/exa-search-1748337331526.d.ts.map +0 -1
- package/dist/types/src/testing/exa-search-1748337344119.d.ts +0 -58
- package/dist/types/src/testing/exa-search-1748337344119.d.ts.map +0 -1
- package/dist/types/src/testing/index.d.ts +0 -3
- package/dist/types/src/testing/index.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -3
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/blueprint/ai.test.ts +0 -156
- package/src/blueprint/blueprint.test.ts +0 -151
- package/src/blueprint/blueprint.ts +0 -75
- package/src/blueprint/index.ts +0 -7
- package/src/blueprint/logger.ts +0 -155
- package/src/blueprint/machine.ts +0 -251
- package/src/blueprint/test-data.ts +0 -55
- package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +0 -95
- package/src/extraction/extraction-llm-function/extraction-llm-function.ts +0 -65
- package/src/extraction/extraction-llm-function/index.ts +0 -5
- package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +0 -115
- package/src/extraction/extraction-ner-function/extraction-ner-function.ts +0 -54
- package/src/research/exa.ts +0 -100
- package/src/research/graph.test.ts +0 -15
- package/src/research/graph.ts +0 -337
- package/src/research/index.ts +0 -7
- package/src/research/instructions-research.tpl +0 -97
- package/src/research/research.test.ts +0 -190
- package/src/research/research.ts +0 -89
- package/src/session/session.test.ts +0 -229
- package/src/session/session.ts +0 -549
- package/src/session/version-pin.test.ts +0 -26
- package/src/summarization/summarization.test.ts +0 -221
- package/src/testing/exa-search-1748337321991.ts +0 -131
- package/src/testing/exa-search-1748337331526.ts +0 -144
- package/src/testing/exa-search-1748337344119.ts +0 -133
- package/src/testing/index.ts +0 -11
- package/src/typedefs.d.ts +0 -8
- package/src/types.ts +0 -8
- /package/src/extraction/extraction-llm-function/{instructions.tpl → transcription-instructions.tpl} +0 -0
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
import type { Obj } from '@dxos/echo';
|
|
3
|
-
import { type EchoDatabase, type Queue } from '@dxos/echo-db';
|
|
4
|
-
import { type BaseObject } from '@dxos/echo-schema';
|
|
5
|
-
export declare const Subgraph: Schema.Struct<{
|
|
6
|
-
/** Objects and relations. */
|
|
7
|
-
objects: Schema.Array$<typeof Schema.Any>;
|
|
8
|
-
}>;
|
|
9
|
-
export interface Subgraph extends Schema.Schema.Type<typeof Subgraph> {
|
|
10
|
-
}
|
|
11
|
-
export type RelatedSchema = {
|
|
12
|
-
schema: Schema.Schema.AnyNoContext;
|
|
13
|
-
kind: 'reference' | 'relation';
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Find all schemas that are related to the given schema.
|
|
17
|
-
*
|
|
18
|
-
* @param db
|
|
19
|
-
* @param schema
|
|
20
|
-
* @returns
|
|
21
|
-
*/
|
|
22
|
-
export declare const findRelatedSchema: (db: EchoDatabase, anchor: Schema.Schema.AnyNoContext) => Promise<RelatedSchema[]>;
|
|
23
|
-
/**
|
|
24
|
-
* Perform vector search in the local database.
|
|
25
|
-
*/
|
|
26
|
-
export declare const createLocalSearchTool: (db: EchoDatabase, queue?: Queue) => import("@dxos/ai").ExecutableTool;
|
|
27
|
-
/**
|
|
28
|
-
* Create a schema for structured data extraction.
|
|
29
|
-
*/
|
|
30
|
-
export declare const createExtractionSchema: (types: Schema.Schema.AnyNoContext[]) => Schema.Struct<{
|
|
31
|
-
[k: string]: Schema.optional<Schema.Array$<Schema.Schema.AnyNoContext>>;
|
|
32
|
-
}>;
|
|
33
|
-
export declare const getSanitizedSchemaName: (schema: Schema.Schema.AnyNoContext) => string;
|
|
34
|
-
export declare const sanitizeObjects: (types: Schema.Schema.AnyNoContext[], data: Record<string, readonly unknown[]>, db: EchoDatabase, queue?: Queue) => Promise<BaseObject[]>;
|
|
35
|
-
export declare const createGraphWriterTool: ({ db, queue, schema, onDone, }: {
|
|
36
|
-
db: EchoDatabase;
|
|
37
|
-
queue?: Queue;
|
|
38
|
-
schema: Schema.Schema.AnyNoContext[];
|
|
39
|
-
onDone?: (data: Obj.Any[]) => Promise<any>;
|
|
40
|
-
}) => import("@dxos/ai").ExecutableTool;
|
|
41
|
-
//# sourceMappingURL=graph.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../../src/research/graph.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAA+B,MAAM,QAAQ,CAAC;AAG7D,OAAO,KAAK,EAAE,GAAG,EAAY,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,EAUL,KAAK,UAAU,EAKhB,MAAM,mBAAmB,CAAC;AAO3B,eAAO,MAAM,QAAQ;IACnB,6BAA6B;;EAE7B,CAAC;AACH,MAAM,WAAW,QAAS,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC;CAAG;AAExE,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,IAAI,EAAE,WAAW,GAAG,UAAU,CAAC;CAChC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,IAAI,YAAY,EAChB,QAAQ,MAAM,CAAC,MAAM,CAAC,YAAY,KACjC,OAAO,CAAC,aAAa,EAAE,CAsBzB,CAAC;AAmBF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,IAAI,YAAY,EAAE,QAAQ,KAAK,sCAyBpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE;;EAWzE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,QAAQ,MAAM,CAAC,MAAM,CAAC,YAAY,WAIxE,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,EACnC,MAAM,MAAM,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC,EACxC,IAAI,YAAY,EAChB,QAAQ,KAAK,KACZ,OAAO,CAAC,UAAU,EAAE,CAyHtB,CAAC;AA2CF,eAAO,MAAM,qBAAqB,GAAI,gCAKnC;IACD,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;IACrC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CAC5C,sCAUA,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graph.test.d.ts","sourceRoot":"","sources":["../../../../src/research/graph.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/research/index.ts"],"names":[],"mappings":"AAIA,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Exec external service and return the results as a Subgraph.
|
|
3
|
-
*/
|
|
4
|
-
export declare const researchFn: import("@dxos/functions").FunctionDefinition<{
|
|
5
|
-
readonly query: string;
|
|
6
|
-
readonly mockSearch?: boolean | undefined;
|
|
7
|
-
}, {
|
|
8
|
-
result: any;
|
|
9
|
-
}>;
|
|
10
|
-
//# sourceMappingURL=research.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"research.d.ts","sourceRoot":"","sources":["../../../../src/research/research.ts"],"names":[],"mappings":"AAkBA;;GAEG;AAEH,eAAO,MAAM,UAAU;;;;YAsDC,GAAG;EAYzB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"research.test.d.ts","sourceRoot":"","sources":["../../../../src/research/research.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
import { type AgentStatus, type AiServiceClient, type GenerateRequest, Message, type ExecutableTool } from '@dxos/ai';
|
|
3
|
-
import { type ArtifactDefinition } from '@dxos/artifact';
|
|
4
|
-
import { Event } from '@dxos/async';
|
|
5
|
-
import { ObjectVersion } from '@dxos/echo-db';
|
|
6
|
-
import { type ObjectId } from '@dxos/echo-schema';
|
|
7
|
-
/**
|
|
8
|
-
* Contains message history, tools, current context.
|
|
9
|
-
* Current context means the state of the app, time of day, and other contextual information.
|
|
10
|
-
* It makes requests to the model, its a state machine.
|
|
11
|
-
* It keeps track of the current goal.
|
|
12
|
-
* It manages the context window.
|
|
13
|
-
* Tracks the success criteria of reaching the goal, exposing metrics (stretch)
|
|
14
|
-
* Could be run locally in the app or remotely.
|
|
15
|
-
* Could be personal or shared.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Resolves artifact ids to their versions.
|
|
19
|
-
* Used to give the model a sense of the changes to the artifacts made by users during the conversation.
|
|
20
|
-
* The artifacts versions are pinned in the history, and whenever the artifact changes in-between assistant's steps,
|
|
21
|
-
* a diff is inserted into the conversation.
|
|
22
|
-
*/
|
|
23
|
-
export type ArtifactDiffResolver = (artifacts: {
|
|
24
|
-
id: ObjectId;
|
|
25
|
-
lastVersion: ObjectVersion;
|
|
26
|
-
}[]) => Promise<Map<ObjectId, {
|
|
27
|
-
version: ObjectVersion;
|
|
28
|
-
diff?: string;
|
|
29
|
-
}>>;
|
|
30
|
-
export type SessionRunOptions = {
|
|
31
|
-
client: AiServiceClient;
|
|
32
|
-
artifacts: ArtifactDefinition[];
|
|
33
|
-
/**
|
|
34
|
-
* Non-artifact specific tools.
|
|
35
|
-
*/
|
|
36
|
-
tools: ExecutableTool[];
|
|
37
|
-
history: Message[];
|
|
38
|
-
prompt: string;
|
|
39
|
-
generationOptions?: Pick<GenerateRequest, 'model'>;
|
|
40
|
-
extensions?: ToolContextExtensions;
|
|
41
|
-
systemPrompt?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Pre-require artifacts.
|
|
44
|
-
*/
|
|
45
|
-
requiredArtifactIds?: string[];
|
|
46
|
-
/**
|
|
47
|
-
* @see ArtifactDiffResolver
|
|
48
|
-
*/
|
|
49
|
-
artifactDiffResolver?: ArtifactDiffResolver;
|
|
50
|
-
};
|
|
51
|
-
type OperationModel = 'planning' | 'importing' | 'configured';
|
|
52
|
-
export type AiSessionOptions = {
|
|
53
|
-
/**
|
|
54
|
-
* Determines the agent's handling of the artifacts definitions:
|
|
55
|
-
*
|
|
56
|
-
* - `planning`: The model will create a plan with required artifacts for each step.
|
|
57
|
-
* - `importing`: The model can query registry and only pull in the artifacts that are required to complete the task.
|
|
58
|
-
* - `configured`: The available artifacts are pre-selected and the model cannot select additional artifacts.
|
|
59
|
-
*/
|
|
60
|
-
operationModel: OperationModel;
|
|
61
|
-
};
|
|
62
|
-
export declare class AISession {
|
|
63
|
-
private readonly _options;
|
|
64
|
-
/** SSE stream parser. */
|
|
65
|
-
private readonly _parser;
|
|
66
|
-
/** Pending messages (incl. the current user request). */
|
|
67
|
-
private _pending;
|
|
68
|
-
/** Current streaming response. */
|
|
69
|
-
private _stream;
|
|
70
|
-
/** Prior history from queue. */
|
|
71
|
-
private _history;
|
|
72
|
-
/**
|
|
73
|
-
* New message.
|
|
74
|
-
*/
|
|
75
|
-
readonly message: Event<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
76
|
-
id: string;
|
|
77
|
-
content: ({
|
|
78
|
-
pending?: boolean | undefined;
|
|
79
|
-
type: "text";
|
|
80
|
-
text: string;
|
|
81
|
-
disposition?: string | undefined;
|
|
82
|
-
} | {
|
|
83
|
-
pending?: boolean | undefined;
|
|
84
|
-
type: "json";
|
|
85
|
-
disposition?: string | undefined;
|
|
86
|
-
json: string;
|
|
87
|
-
} | {
|
|
88
|
-
pending?: boolean | undefined;
|
|
89
|
-
id?: string | undefined;
|
|
90
|
-
type: "image";
|
|
91
|
-
source?: {
|
|
92
|
-
type: "base64";
|
|
93
|
-
mediaType: string;
|
|
94
|
-
data: string;
|
|
95
|
-
} | undefined;
|
|
96
|
-
} | {
|
|
97
|
-
pending?: boolean | undefined;
|
|
98
|
-
id: string;
|
|
99
|
-
type: "tool_use";
|
|
100
|
-
name: string;
|
|
101
|
-
input: unknown;
|
|
102
|
-
currentStatus?: {
|
|
103
|
-
readonly id: string;
|
|
104
|
-
message: string;
|
|
105
|
-
} | undefined;
|
|
106
|
-
} | {
|
|
107
|
-
pending?: boolean | undefined;
|
|
108
|
-
type: "tool_result";
|
|
109
|
-
toolUseId: string;
|
|
110
|
-
content: string;
|
|
111
|
-
isError?: boolean | undefined;
|
|
112
|
-
})[];
|
|
113
|
-
role: "user" | "assistant";
|
|
114
|
-
}>;
|
|
115
|
-
/**
|
|
116
|
-
* Complete block added to Message.
|
|
117
|
-
*/
|
|
118
|
-
readonly block: Event<{
|
|
119
|
-
pending?: boolean | undefined;
|
|
120
|
-
type: "text";
|
|
121
|
-
text: string;
|
|
122
|
-
disposition?: string | undefined;
|
|
123
|
-
} | {
|
|
124
|
-
pending?: boolean | undefined;
|
|
125
|
-
type: "json";
|
|
126
|
-
disposition?: string | undefined;
|
|
127
|
-
json: string;
|
|
128
|
-
} | {
|
|
129
|
-
pending?: boolean | undefined;
|
|
130
|
-
id?: string | undefined;
|
|
131
|
-
type: "image";
|
|
132
|
-
source?: {
|
|
133
|
-
type: "base64";
|
|
134
|
-
mediaType: string;
|
|
135
|
-
data: string;
|
|
136
|
-
} | undefined;
|
|
137
|
-
} | {
|
|
138
|
-
pending?: boolean | undefined;
|
|
139
|
-
id: string;
|
|
140
|
-
type: "tool_use";
|
|
141
|
-
name: string;
|
|
142
|
-
input: unknown;
|
|
143
|
-
currentStatus?: {
|
|
144
|
-
readonly id: string;
|
|
145
|
-
message: string;
|
|
146
|
-
} | undefined;
|
|
147
|
-
} | {
|
|
148
|
-
pending?: boolean | undefined;
|
|
149
|
-
type: "tool_result";
|
|
150
|
-
toolUseId: string;
|
|
151
|
-
content: string;
|
|
152
|
-
isError?: boolean | undefined;
|
|
153
|
-
}>;
|
|
154
|
-
/**
|
|
155
|
-
* Update partial block (while streaming).
|
|
156
|
-
*/
|
|
157
|
-
readonly update: Event<{
|
|
158
|
-
pending?: boolean | undefined;
|
|
159
|
-
type: "text";
|
|
160
|
-
text: string;
|
|
161
|
-
disposition?: string | undefined;
|
|
162
|
-
} | {
|
|
163
|
-
pending?: boolean | undefined;
|
|
164
|
-
type: "json";
|
|
165
|
-
disposition?: string | undefined;
|
|
166
|
-
json: string;
|
|
167
|
-
} | {
|
|
168
|
-
pending?: boolean | undefined;
|
|
169
|
-
id?: string | undefined;
|
|
170
|
-
type: "image";
|
|
171
|
-
source?: {
|
|
172
|
-
type: "base64";
|
|
173
|
-
mediaType: string;
|
|
174
|
-
data: string;
|
|
175
|
-
} | undefined;
|
|
176
|
-
} | {
|
|
177
|
-
pending?: boolean | undefined;
|
|
178
|
-
id: string;
|
|
179
|
-
type: "tool_use";
|
|
180
|
-
name: string;
|
|
181
|
-
input: unknown;
|
|
182
|
-
currentStatus?: {
|
|
183
|
-
readonly id: string;
|
|
184
|
-
message: string;
|
|
185
|
-
} | undefined;
|
|
186
|
-
} | {
|
|
187
|
-
pending?: boolean | undefined;
|
|
188
|
-
type: "tool_result";
|
|
189
|
-
toolUseId: string;
|
|
190
|
-
content: string;
|
|
191
|
-
isError?: boolean | undefined;
|
|
192
|
-
}>;
|
|
193
|
-
readonly streamEvent: Event<import("@dxos/ai").GenerationStreamEvent>;
|
|
194
|
-
/**
|
|
195
|
-
* User prompt or tool result.
|
|
196
|
-
*/
|
|
197
|
-
readonly userMessage: Event<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
198
|
-
id: string;
|
|
199
|
-
role: "user" | "assistant";
|
|
200
|
-
content: ({
|
|
201
|
-
pending?: boolean | undefined;
|
|
202
|
-
type: "text";
|
|
203
|
-
disposition?: string | undefined;
|
|
204
|
-
text: string;
|
|
205
|
-
} | {
|
|
206
|
-
pending?: boolean | undefined;
|
|
207
|
-
type: "json";
|
|
208
|
-
disposition?: string | undefined;
|
|
209
|
-
json: string;
|
|
210
|
-
} | {
|
|
211
|
-
pending?: boolean | undefined;
|
|
212
|
-
id?: string | undefined;
|
|
213
|
-
type: "image";
|
|
214
|
-
source?: {
|
|
215
|
-
type: "base64";
|
|
216
|
-
mediaType: string;
|
|
217
|
-
data: string;
|
|
218
|
-
} | undefined;
|
|
219
|
-
} | {
|
|
220
|
-
pending?: boolean | undefined;
|
|
221
|
-
id: string;
|
|
222
|
-
name: string;
|
|
223
|
-
type: "tool_use";
|
|
224
|
-
input: unknown;
|
|
225
|
-
currentStatus?: {
|
|
226
|
-
readonly id: string;
|
|
227
|
-
message: string;
|
|
228
|
-
} | undefined;
|
|
229
|
-
} | {
|
|
230
|
-
pending?: boolean | undefined;
|
|
231
|
-
type: "tool_result";
|
|
232
|
-
content: string;
|
|
233
|
-
toolUseId: string;
|
|
234
|
-
isError?: boolean | undefined;
|
|
235
|
-
})[];
|
|
236
|
-
}>;
|
|
237
|
-
/**
|
|
238
|
-
* Agent self-reporting its status.
|
|
239
|
-
*/
|
|
240
|
-
readonly statusReport: Event<AgentStatus>;
|
|
241
|
-
readonly toolStatusReport: Event<{
|
|
242
|
-
message: Message;
|
|
243
|
-
status: AgentStatus;
|
|
244
|
-
}>;
|
|
245
|
-
constructor(_options: AiSessionOptions);
|
|
246
|
-
run(options: SessionRunOptions): Promise<Message[]>;
|
|
247
|
-
runStructured<S extends Schema.Schema.AnyNoContext>(schema: S, options: SessionRunOptions): Promise<Schema.Schema.Type<S>>;
|
|
248
|
-
private _formatUserPrompt;
|
|
249
|
-
private _createQueryArtifactsTool;
|
|
250
|
-
private _createRequireTool;
|
|
251
|
-
private _createPlanningTool;
|
|
252
|
-
private _onToolStatusReport;
|
|
253
|
-
abort(): void;
|
|
254
|
-
}
|
|
255
|
-
declare const AIServiecOverloadedError_base: Schema.TaggedErrorClass<AIServiecOverloadedError, "AIServiecOverloadedError", {
|
|
256
|
-
readonly _tag: Schema.tag<"AIServiecOverloadedError">;
|
|
257
|
-
}>;
|
|
258
|
-
export declare class AIServiecOverloadedError extends AIServiecOverloadedError_base {
|
|
259
|
-
}
|
|
260
|
-
export {};
|
|
261
|
-
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/session/session.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.test.d.ts","sourceRoot":"","sources":["../../../../src/session/session.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version-pin.test.d.ts","sourceRoot":"","sources":["../../../../src/session/version-pin.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"summarization.test.d.ts","sourceRoot":"","sources":["../../../../src/summarization/summarization.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
requestId: string;
|
|
3
|
-
autopromptString: string;
|
|
4
|
-
autoDate: string;
|
|
5
|
-
resolvedSearchType: string;
|
|
6
|
-
results: ({
|
|
7
|
-
id: string;
|
|
8
|
-
title: string;
|
|
9
|
-
url: string;
|
|
10
|
-
publishedDate: string;
|
|
11
|
-
author: string;
|
|
12
|
-
score: number;
|
|
13
|
-
text: string;
|
|
14
|
-
image?: undefined;
|
|
15
|
-
favicon?: undefined;
|
|
16
|
-
} | {
|
|
17
|
-
id: string;
|
|
18
|
-
title: string;
|
|
19
|
-
url: string;
|
|
20
|
-
publishedDate: string;
|
|
21
|
-
author: string;
|
|
22
|
-
score: number;
|
|
23
|
-
text: string;
|
|
24
|
-
image: string;
|
|
25
|
-
favicon: string;
|
|
26
|
-
})[];
|
|
27
|
-
costDollars: {
|
|
28
|
-
total: number;
|
|
29
|
-
search: {
|
|
30
|
-
neural: number;
|
|
31
|
-
};
|
|
32
|
-
contents: {
|
|
33
|
-
text: number;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
export default _default;
|
|
38
|
-
//# sourceMappingURL=exa-search-1748337321991.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exa-search-1748337321991.d.ts","sourceRoot":"","sources":["../../../../src/testing/exa-search-1748337321991.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBA8HE"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
requestId: string;
|
|
3
|
-
autopromptString: string;
|
|
4
|
-
resolvedSearchType: string;
|
|
5
|
-
results: ({
|
|
6
|
-
id: string;
|
|
7
|
-
title: string;
|
|
8
|
-
url: string;
|
|
9
|
-
publishedDate: string;
|
|
10
|
-
author: string;
|
|
11
|
-
score: number;
|
|
12
|
-
text: string;
|
|
13
|
-
image: string;
|
|
14
|
-
favicon: string;
|
|
15
|
-
} | {
|
|
16
|
-
id: string;
|
|
17
|
-
title: string;
|
|
18
|
-
url: string;
|
|
19
|
-
publishedDate: string;
|
|
20
|
-
author: string;
|
|
21
|
-
text: string;
|
|
22
|
-
image: string;
|
|
23
|
-
favicon: string;
|
|
24
|
-
score?: undefined;
|
|
25
|
-
})[];
|
|
26
|
-
costDollars: {
|
|
27
|
-
total: number;
|
|
28
|
-
search: {
|
|
29
|
-
neural: number;
|
|
30
|
-
};
|
|
31
|
-
contents: {
|
|
32
|
-
text: number;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export default _default;
|
|
37
|
-
//# sourceMappingURL=exa-search-1748337331526.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exa-search-1748337331526.d.ts","sourceRoot":"","sources":["../../../../src/testing/exa-search-1748337331526.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBA2IE"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
requestId: string;
|
|
3
|
-
autopromptString: string;
|
|
4
|
-
autoDate: string;
|
|
5
|
-
resolvedSearchType: string;
|
|
6
|
-
results: ({
|
|
7
|
-
id: string;
|
|
8
|
-
title: string;
|
|
9
|
-
url: string;
|
|
10
|
-
publishedDate: string;
|
|
11
|
-
author: string;
|
|
12
|
-
score: number;
|
|
13
|
-
text: string;
|
|
14
|
-
favicon: string;
|
|
15
|
-
image?: undefined;
|
|
16
|
-
} | {
|
|
17
|
-
id: string;
|
|
18
|
-
title: string;
|
|
19
|
-
url: string;
|
|
20
|
-
publishedDate: string;
|
|
21
|
-
author: string;
|
|
22
|
-
score: number;
|
|
23
|
-
text: string;
|
|
24
|
-
favicon?: undefined;
|
|
25
|
-
image?: undefined;
|
|
26
|
-
} | {
|
|
27
|
-
id: string;
|
|
28
|
-
title: string;
|
|
29
|
-
url: string;
|
|
30
|
-
publishedDate: string;
|
|
31
|
-
author: string;
|
|
32
|
-
score: number;
|
|
33
|
-
text: string;
|
|
34
|
-
image: string;
|
|
35
|
-
favicon: string;
|
|
36
|
-
} | {
|
|
37
|
-
id: string;
|
|
38
|
-
title: string;
|
|
39
|
-
url: string;
|
|
40
|
-
author: string;
|
|
41
|
-
text: string;
|
|
42
|
-
image: string;
|
|
43
|
-
favicon: string;
|
|
44
|
-
publishedDate?: undefined;
|
|
45
|
-
score?: undefined;
|
|
46
|
-
})[];
|
|
47
|
-
costDollars: {
|
|
48
|
-
total: number;
|
|
49
|
-
search: {
|
|
50
|
-
neural: number;
|
|
51
|
-
};
|
|
52
|
-
contents: {
|
|
53
|
-
text: number;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
export default _default;
|
|
58
|
-
//# sourceMappingURL=exa-search-1748337344119.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exa-search-1748337344119.d.ts","sourceRoot":"","sources":["../../../../src/testing/exa-search-1748337344119.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBAgIE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAM7C,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,GAAG,CAAC,EAAgC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD,eAAO,MAAM,qBAAqB,GAAI,IAAI,QAAQ,WAA4B,CAAC"}
|