@dxos/assistant 0.8.4-main.f9ba587 → 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/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/extraction/index.mjs +225 -0
- package/dist/lib/browser/extraction/index.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1114 -1843
- 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/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/extraction/index.mjs +226 -0
- package/dist/lib/node-esm/extraction/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1114 -1844
- 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 +103 -0
- package/dist/types/src/conversation/context.d.ts.map +1 -0
- package/dist/types/src/conversation/conversation.d.ts +29 -32
- package/dist/types/src/conversation/conversation.d.ts.map +1 -1
- package/dist/types/src/conversation/index.d.ts +1 -0
- package/dist/types/src/conversation/index.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 +71 -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-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 +195 -58
- 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 +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 +264 -165
- 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/index.d.ts +2 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/services.d.ts +20 -0
- package/dist/types/src/functions/services.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +5 -5
- 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 +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 +12 -0
- package/dist/types/src/session/format.d.ts.map +1 -0
- package/dist/types/src/session/format.test.d.ts +2 -0
- package/dist/types/src/session/format.test.d.ts.map +1 -0
- package/dist/types/src/session/index.d.ts +4 -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 +36 -268
- 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 +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 +18 -0
- package/dist/types/src/templates/system.d.ts.map +1 -0
- 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 +48 -26
- package/src/conversation/context.ts +186 -0
- package/src/conversation/conversation.ts +101 -76
- package/src/conversation/index.ts +1 -0
- package/src/diff.test.ts +43 -0
- package/src/diff.ts +84 -0
- package/src/errors.ts +15 -0
- 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 +14 -25
- package/src/extraction/extraction-llm-function/extraction-llm-function.ts +48 -52
- package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +18 -17
- package/src/extraction/extraction-ner-function/extraction-ner-function.ts +43 -41
- 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 +7 -6
- package/src/extraction/quotes.test.ts +3 -3
- package/src/extraction/quotes.ts +4 -4
- package/src/functions/index.ts +5 -0
- package/src/functions/services.ts +162 -0
- package/src/index.ts +5 -5
- package/src/session/GenericToolkit.ts +130 -0
- package/src/session/artifact-diff.ts +41 -0
- package/src/session/error-handling.ts +41 -0
- package/src/session/format.test.ts +61 -0
- package/src/session/format.ts +144 -0
- package/src/session/index.ts +5 -0
- package/src/session/observer.ts +59 -0
- package/src/session/session.conversations.json +1 -0
- package/src/session/session.test.ts +88 -214
- package/src/session/session.ts +170 -539
- package/src/session/toolkit.ts +48 -0
- package/src/session/version-pin.ts +11 -12
- package/src/templates/index.ts +5 -0
- package/src/templates/instructions/format.tpl +61 -0
- package/src/templates/instructions/system.tpl +48 -0
- package/src/templates/system.ts +41 -0
- package/src/types/artifact.ts +71 -0
- package/src/types/index.ts +5 -0
- package/src/typings.d.ts +5 -0
- package/dist/types/bin/chat.d.ts +0 -2
- package/dist/types/bin/chat.d.ts.map +0 -1
- package/dist/types/src/blueprint/blueprint.d.ts +0 -41
- package/dist/types/src/blueprint/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprint/index.d.ts +0 -3
- package/dist/types/src/blueprint/index.d.ts.map +0 -1
- package/dist/types/src/blueprint/registry.d.ts +0 -7
- package/dist/types/src/blueprint/registry.d.ts.map +0 -1
- package/dist/types/src/context/binder.d.ts +0 -34
- package/dist/types/src/context/binder.d.ts.map +0 -1
- package/dist/types/src/context/binding.d.ts +0 -38
- package/dist/types/src/context/binding.d.ts.map +0 -1
- package/dist/types/src/context/index.d.ts +0 -3
- package/dist/types/src/context/index.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/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/blueprint.ts +0 -75
- package/src/blueprint/index.ts +0 -6
- package/src/blueprint/registry.ts +0 -15
- package/src/context/binder.ts +0 -101
- package/src/context/binding.ts +0 -31
- package/src/context/index.ts +0 -6
- 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 -90
- 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
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import type * as Tool from '@effect/ai/Tool';
|
|
6
|
+
import * as Toolkit from '@effect/ai/Toolkit';
|
|
7
|
+
import type * as Context from 'effect/Context';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
|
|
10
|
+
import { type AiToolNotFoundError, ToolExecutionService, type ToolId, ToolResolverService } from '@dxos/ai';
|
|
11
|
+
import { type Blueprint } from '@dxos/blueprints';
|
|
12
|
+
import { isTruthy } from '@dxos/util';
|
|
13
|
+
|
|
14
|
+
export type ToolkitParams<Tools extends Record<string, Tool.Any>> = {
|
|
15
|
+
toolkit?: Toolkit.Toolkit<Tools>;
|
|
16
|
+
toolIds?: ToolId[];
|
|
17
|
+
blueprints?: Blueprint.Blueprint[];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Build a combined toolkit from the blueprint tools and the provided toolkit.
|
|
22
|
+
*/
|
|
23
|
+
export const createToolkit = <Tools extends Record<string, Tool.Any> = {}>({
|
|
24
|
+
toolkit: toolkitParam,
|
|
25
|
+
toolIds = [],
|
|
26
|
+
blueprints = [],
|
|
27
|
+
}: ToolkitParams<Tools>): Effect.Effect<
|
|
28
|
+
Toolkit.WithHandler<any>,
|
|
29
|
+
AiToolNotFoundError,
|
|
30
|
+
ToolResolverService | ToolExecutionService | Tool.HandlersFor<Tools>
|
|
31
|
+
> =>
|
|
32
|
+
Effect.gen(function* () {
|
|
33
|
+
const blueprintToolkit = yield* ToolResolverService.resolveToolkit([
|
|
34
|
+
...blueprints.flatMap(({ tools }) => tools),
|
|
35
|
+
...toolIds,
|
|
36
|
+
]);
|
|
37
|
+
|
|
38
|
+
const blueprintToolkitHandler: Context.Context<Tool.HandlersFor<any>> = yield* blueprintToolkit.toContext(
|
|
39
|
+
ToolExecutionService.handlersFor(blueprintToolkit),
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const toolkit = Toolkit.merge(...[toolkitParam, blueprintToolkit].filter(isTruthy));
|
|
43
|
+
return yield* toolkit.pipe(Effect.provide(blueprintToolkitHandler)) as any as Effect.Effect<
|
|
44
|
+
Toolkit.WithHandler<any>,
|
|
45
|
+
never,
|
|
46
|
+
Tool.HandlersFor<Tools>
|
|
47
|
+
>;
|
|
48
|
+
});
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
8
|
-
import { type ObjectVersion } from '@dxos/echo-db';
|
|
9
|
-
import {
|
|
10
|
-
import { ObjectId, type BaseEchoObject } from '@dxos/echo-schema';
|
|
7
|
+
import { type AnyEchoObject, ObjectId } from '@dxos/echo/internal';
|
|
8
|
+
import { type ObjectVersion, getVersion } from '@dxos/echo-db';
|
|
9
|
+
import { type ContentBlock } from '@dxos/types';
|
|
11
10
|
|
|
12
11
|
// TODO(dmaretskyi): Extract.
|
|
13
12
|
const ObjectVersionSchema = Schema.Unknown as Schema.Schema<ObjectVersion>;
|
|
@@ -15,7 +14,7 @@ const ObjectVersionSchema = Schema.Unknown as Schema.Schema<ObjectVersion>;
|
|
|
15
14
|
const VersionPinSchema = Schema.Struct({
|
|
16
15
|
// TODO(dmaretskyi): Use Ref when those support encoding.
|
|
17
16
|
objectId: ObjectId,
|
|
18
|
-
// TODO(dmaretskyi): Could be opaque
|
|
17
|
+
// TODO(dmaretskyi): Could be opaque.
|
|
19
18
|
version: ObjectVersionSchema,
|
|
20
19
|
});
|
|
21
20
|
|
|
@@ -27,22 +26,22 @@ export interface VersionPin extends Schema.Schema.Type<typeof VersionPinSchema>
|
|
|
27
26
|
|
|
28
27
|
export const VersionPin: typeof VersionPinSchema & {
|
|
29
28
|
DISPOSITION: 'version-pin';
|
|
30
|
-
fromObject: (object:
|
|
31
|
-
createBlock: (pin: VersionPin) =>
|
|
29
|
+
fromObject: (object: AnyEchoObject) => VersionPin;
|
|
30
|
+
createBlock: (pin: VersionPin) => ContentBlock.Any;
|
|
32
31
|
} = class extends VersionPinSchema {
|
|
33
32
|
static readonly DISPOSITION = 'version-pin';
|
|
34
|
-
static fromObject(object:
|
|
33
|
+
static fromObject(object: AnyEchoObject): VersionPin {
|
|
35
34
|
return VersionPin.make({
|
|
36
35
|
objectId: object.id,
|
|
37
36
|
version: getVersion(object),
|
|
38
37
|
});
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
static createBlock(pin: VersionPin):
|
|
40
|
+
static createBlock(pin: VersionPin): ContentBlock.Any {
|
|
42
41
|
return {
|
|
43
|
-
|
|
42
|
+
_tag: 'json',
|
|
44
43
|
disposition: VersionPin.DISPOSITION,
|
|
45
|
-
|
|
44
|
+
data: JSON.stringify(pin),
|
|
46
45
|
};
|
|
47
46
|
}
|
|
48
47
|
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{{! System Core }}
|
|
2
|
+
|
|
3
|
+
## Input Formats
|
|
4
|
+
|
|
5
|
+
### Blueprints
|
|
6
|
+
|
|
7
|
+
You may be provided with Blueprint definitions that include specific instructions and tools for a given set of tasks.
|
|
8
|
+
Blue print instructions will be enclosed in a <blueprint> tag.
|
|
9
|
+
|
|
10
|
+
### Context objects
|
|
11
|
+
|
|
12
|
+
You may be provided with references to objects that are relevant to the current prompt.
|
|
13
|
+
Objects will be in the form of a <object> tag with a <dxn> element that is the unique key of the object required by many tools.
|
|
14
|
+
The <typename> element is the type of the object.
|
|
15
|
+
|
|
16
|
+
<object>
|
|
17
|
+
<dxn>object-id</dxn>
|
|
18
|
+
<typename>example.com/type/TypeName</typename>
|
|
19
|
+
</object>
|
|
20
|
+
|
|
21
|
+
## Response Formats
|
|
22
|
+
|
|
23
|
+
It is very important to respond in the correct format.
|
|
24
|
+
You response must be valid Markdown.
|
|
25
|
+
In some cases you should respond with well-formed XML tags along with the content.
|
|
26
|
+
Code snippets should use 2-space indents.
|
|
27
|
+
|
|
28
|
+
{{#if cot}}
|
|
29
|
+
Before responding, explain your reasoning and include your detailed chain-of-thought enclosed in a <cot> tag.
|
|
30
|
+
The <cot> tag should be the first thing in your response.
|
|
31
|
+
{{/if}}
|
|
32
|
+
|
|
33
|
+
## Block references
|
|
34
|
+
|
|
35
|
+
You can reply with a block reference for objects if you have the DXN. For example:
|
|
36
|
+
|
|
37
|
+
<object>
|
|
38
|
+
<dxn>dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK464FSCKVQJAB2H662M</dxn>
|
|
39
|
+
</object>
|
|
40
|
+
<object>
|
|
41
|
+
<dxn>dxn:echo:@:01K24XPK464FSCKVQJAB2H662M</dxn>
|
|
42
|
+
</object>
|
|
43
|
+
|
|
44
|
+
### Suggestions
|
|
45
|
+
|
|
46
|
+
Each suggestion must in the form of a proposed action enclosed in a <suggestion> tag.
|
|
47
|
+
Example: <suggestion>Show on a map</suggestion>
|
|
48
|
+
Do not use bullets when listing suggestions.
|
|
49
|
+
|
|
50
|
+
### Multiple choice questions
|
|
51
|
+
|
|
52
|
+
You may ask multiple choice questions by wrapping consise options inside <option> tags inside a well formed <select> tag.
|
|
53
|
+
Example: <select><option>Yes</option><option>No</option></select>
|
|
54
|
+
|
|
55
|
+
## Toolkit
|
|
56
|
+
|
|
57
|
+
If the user asks for a list of tools, then just emit a single self-closing <toolkit/> tag instead of listing the tools.
|
|
58
|
+
|
|
59
|
+
## Context
|
|
60
|
+
|
|
61
|
+
The current date and time is {{DATETIME}}.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{{! System Prompt }}
|
|
2
|
+
|
|
3
|
+
- You are a helpful assistant called Kai.
|
|
4
|
+
- Your name is Kai and you are powered by different language models.
|
|
5
|
+
- You were created by DXOS and operate inside of Composer and on the DXOS EDGE network.
|
|
6
|
+
- In your initial greeting state your name and make some suggestions based on the current context objects.
|
|
7
|
+
- You are an advanced AI assistant capable of creating and managing artifacts from provided data and tools.
|
|
8
|
+
- Your task is to process user commands and questions and decide how best to respond.
|
|
9
|
+
- In general be concise and direct.
|
|
10
|
+
- Follow all instructions carefully.
|
|
11
|
+
|
|
12
|
+
## Planning
|
|
13
|
+
|
|
14
|
+
- Analyze the structure and type of the content in the user's message.
|
|
15
|
+
- Determine if you complete the task using the available blueprint definitions?
|
|
16
|
+
- If you can't complete the task using the available blueprint definitions, query the list of available blueprint definitions using the appropriate tool.
|
|
17
|
+
- Identify which blueprint definitions are relevant to the user's request.
|
|
18
|
+
- Evaluate the potential benefits of creating an artifact vs. normal processing for each identified element.
|
|
19
|
+
- Make a final decision on whether to create an artifact and explain your reasoning.
|
|
20
|
+
- Are the required blueprint definitions already available?
|
|
21
|
+
- If not, select which blueprint definition(s) will be the most relevant and require them using the require_artifact_definitions tool.
|
|
22
|
+
- The require'd artifact tools will be available for use after require.
|
|
23
|
+
- If creating an artifact, outline how you will structure it within the response.
|
|
24
|
+
- Decide if the artifact needs to be shown to the user.
|
|
25
|
+
- Call the show tool to show the artifact to the user.
|
|
26
|
+
- Your reasoning must include: whether to use artifacts or not, to create one or query, whether to show the artifact to the user, and how to structure the response.
|
|
27
|
+
|
|
28
|
+
## Blueprints and Artifacts
|
|
29
|
+
|
|
30
|
+
- Determine if the interaction involves an artifact. Prefer artifacts for tables, lists, spreadsheets, kanbans, games, images, and other structured data.
|
|
31
|
+
- Determine if the user is explicitly talking about creating a new artifact, or wants to use an existing artifact.
|
|
32
|
+
- If it is ambiguous, query for existing artifacts first and then decide.
|
|
33
|
+
- If you decide to create an artifact, call the associated tool to create the artifact.
|
|
34
|
+
- Artifacts are stored in the database. Tools are used to create and query artifacts.
|
|
35
|
+
- If you are unsure about creating an artifact ask the user for clarification.
|
|
36
|
+
- Artifacts are mutable objects that can change over the course of the conversation.
|
|
37
|
+
- Always re-query the artifact using the tool (like query or inspect) to get the latest state of the artifact before answering the user.
|
|
38
|
+
- You must never generate the id of the artifact; only recall the ids that are already in the history.
|
|
39
|
+
- Artifacts are created by requiring the specific artifact using the require_artifact tool and creating it by calling the associated tool.
|
|
40
|
+
- You can add suggested actions at the end of your response.
|
|
41
|
+
- Suggested actions should be very concise and start with a verb and be phrased as a command to an agent -- not a question to the user.
|
|
42
|
+
- Suggested actions must be in the form of a user instruction that you can follow.
|
|
43
|
+
- Suggested actions could include actions that create artifacts.
|
|
44
|
+
- After creating an artifact use a tool to add it to the chat context.
|
|
45
|
+
|
|
46
|
+
## Context
|
|
47
|
+
|
|
48
|
+
Today is {{DATETIME}}.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import defaultsDeep from 'lodash.defaultsdeep';
|
|
6
|
+
|
|
7
|
+
import { type ModelCapabilities } from '@dxos/ai';
|
|
8
|
+
import { Template } from '@dxos/blueprints';
|
|
9
|
+
|
|
10
|
+
import FORMAT from './instructions/format.tpl?raw';
|
|
11
|
+
import SYSTEM from './instructions/system.tpl?raw';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* System template variables.
|
|
15
|
+
*/
|
|
16
|
+
export type SystemPromptOptions = ModelCapabilities & {
|
|
17
|
+
DATETIME: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Base system prompt.
|
|
22
|
+
* NOTE: This contains protocol instructions that can not be dynamically edited.
|
|
23
|
+
*/
|
|
24
|
+
export const createSystemPrompt = (options: Partial<SystemPromptOptions> = {}) =>
|
|
25
|
+
Template.process<SystemPromptOptions>(
|
|
26
|
+
FORMAT,
|
|
27
|
+
defaultsDeep(options, {
|
|
28
|
+
DATETIME: new Date().toISOString(),
|
|
29
|
+
}),
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export const templates = {
|
|
33
|
+
/** Editable system prompt.*/
|
|
34
|
+
system: Template.make({
|
|
35
|
+
/**
|
|
36
|
+
* NOTE: We are forbidden from accessing randomness at model level in cloudflare, so we have to have pre-generated ids.
|
|
37
|
+
*/
|
|
38
|
+
id: '01K2J2FZWH39F55CS7B26GP1Q3',
|
|
39
|
+
source: SYSTEM,
|
|
40
|
+
}),
|
|
41
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import type * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Schema from 'effect/Schema';
|
|
7
|
+
|
|
8
|
+
import { type ObjectNotFoundError, type Type } from '@dxos/echo';
|
|
9
|
+
import { type ObjectId } from '@dxos/echo/internal';
|
|
10
|
+
import { DatabaseService } from '@dxos/echo-db';
|
|
11
|
+
import { DXN, LOCAL_SPACE_TAG, type SpaceId } from '@dxos/keys';
|
|
12
|
+
import { trim } from '@dxos/util';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated
|
|
16
|
+
*/
|
|
17
|
+
export const createArtifactElement = (id: ObjectId) => `<artifact id=${id} />`;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A model-friendly way to reference an object.
|
|
21
|
+
* Supports vairous formats that will be normalized to a DXN.
|
|
22
|
+
*/
|
|
23
|
+
// TODO(burdon): Rename RefFromLLM?
|
|
24
|
+
export const ArtifactId: Schema.Schema<string> & {
|
|
25
|
+
toDXN: (reference: ArtifactId, owningSpaceId?: SpaceId) => DXN;
|
|
26
|
+
resolve: <S extends Type.Obj.Any | Type.Relation.Any>(
|
|
27
|
+
schema: S,
|
|
28
|
+
ref: ArtifactId,
|
|
29
|
+
) => Effect.Effect<Schema.Schema.Type<S>, ObjectNotFoundError, DatabaseService>;
|
|
30
|
+
} = class extends Schema.String.annotations({
|
|
31
|
+
// TODO(dmaretskyi): This section gets overriden.
|
|
32
|
+
description: trim`
|
|
33
|
+
The ID of the referenced object. Formats accepted:
|
|
34
|
+
- DXN (dxn:echo:@:XXXXX). DXNs can be prepended with an @ symbol for compatibility with in-text references.
|
|
35
|
+
- space ID, object ID tuple (spaceID:objectID)
|
|
36
|
+
- Only object ID that is assumed to be in the current space (XXXXX)
|
|
37
|
+
`,
|
|
38
|
+
examples: ['dxn:echo:@:XXXXX', '@dxn:echo:@:XXXXX', 'spaceID:objectID', 'XXXXX'],
|
|
39
|
+
}) {
|
|
40
|
+
static toDXN(reference: ArtifactId, owningSpaceId?: SpaceId): DXN {
|
|
41
|
+
// Allow @dxn: prefix for compatibility with in-text references.
|
|
42
|
+
if (reference.startsWith('@dxn:')) {
|
|
43
|
+
return DXN.parse(reference.slice(1));
|
|
44
|
+
} else if (reference.startsWith('dxn:')) {
|
|
45
|
+
return DXN.parse(reference);
|
|
46
|
+
} else if (/^[A-Z0-9]+:[A-Z0-9]+$/.test(reference)) {
|
|
47
|
+
const [spaceId, objectId] = reference.split(':');
|
|
48
|
+
// This is a workaround because the current Filter API doesn't work with fully qualified Echo DXNs.
|
|
49
|
+
// We check if the space ID is the same as the owning space and then use LOCAL_SPACE_TAG for local references.
|
|
50
|
+
// TODO(dmaretskyi): Fix this in the Echo and Filter API to properly handle fully qualified DXNs.
|
|
51
|
+
return new DXN(DXN.kind.ECHO, [spaceId === owningSpaceId ? LOCAL_SPACE_TAG : spaceId, objectId]);
|
|
52
|
+
} else if (/^[A-Z0-9]+$/.test(reference)) {
|
|
53
|
+
return DXN.fromLocalObjectId(reference);
|
|
54
|
+
} else {
|
|
55
|
+
throw new Error(`Unable to parse object reference: ${reference}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Resolves an artifact ID to an object.
|
|
61
|
+
*/
|
|
62
|
+
static resolve<S extends Type.Obj.Any | Type.Relation.Any>(
|
|
63
|
+
schema: S,
|
|
64
|
+
ref: ArtifactId,
|
|
65
|
+
): Effect.Effect<Schema.Schema.Type<S>, ObjectNotFoundError, DatabaseService> {
|
|
66
|
+
const dxn = ArtifactId.toDXN(ref);
|
|
67
|
+
return DatabaseService.resolve(dxn, schema);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export type ArtifactId = Schema.Schema.Type<typeof ArtifactId>;
|
package/src/typings.d.ts
CHANGED
package/dist/types/bin/chat.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../bin/chat.ts"],"names":[],"mappings":""}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
import { Type } from '@dxos/echo';
|
|
3
|
-
/**
|
|
4
|
-
* Blueprint schema defines the structure for AI assistant blueprints.
|
|
5
|
-
* Blueprints contain instructions, tools, and artifacts that guide the AI's behavior.
|
|
6
|
-
*/
|
|
7
|
-
export declare const Blueprint: Type.obj<Schema.Struct<{
|
|
8
|
-
/**
|
|
9
|
-
* Global registry ID.
|
|
10
|
-
* NOTE: Once a blueprint has been cloned from the registry, its stored definition may converge,
|
|
11
|
-
* but the `key` property refers to the original registry entry.
|
|
12
|
-
*/
|
|
13
|
-
key: Schema.SchemaClass<string, string, never>;
|
|
14
|
-
/**
|
|
15
|
-
* Human-readable name of the blueprint.
|
|
16
|
-
*/
|
|
17
|
-
name: Schema.SchemaClass<string, string, never>;
|
|
18
|
-
/**
|
|
19
|
-
* Description of the blueprint's purpose and functionality.
|
|
20
|
-
*/
|
|
21
|
-
description: Schema.optional<typeof Schema.String>;
|
|
22
|
-
/**
|
|
23
|
-
* Instructions that guide the AI assistant's behavior and responses.
|
|
24
|
-
* These are system prompts or guidelines that the AI should follow.
|
|
25
|
-
*/
|
|
26
|
-
instructions: Schema.SchemaClass<string, string, never>;
|
|
27
|
-
/**
|
|
28
|
-
* Array of tools that the AI assistant can use when this blueprint is active.
|
|
29
|
-
*/
|
|
30
|
-
tools: Schema.Array$<Schema.SchemaClass<string, string, never>>;
|
|
31
|
-
/**
|
|
32
|
-
* Array of artifacts that the AI assistant can create or modify.
|
|
33
|
-
*/
|
|
34
|
-
artifacts: Schema.Array$<typeof Schema.String>;
|
|
35
|
-
}>>;
|
|
36
|
-
/**
|
|
37
|
-
* TypeScript type for Blueprint.
|
|
38
|
-
*/
|
|
39
|
-
export interface Blueprint extends Schema.Schema.Type<typeof Blueprint> {
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=blueprint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../../../src/blueprint/blueprint.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGlC;;;GAGG;AACH,eAAO,MAAM,SAAS;IACpB;;;;OAIG;;IAMH;;OAEG;;IAKH;;OAEG;;IAKH;;;OAGG;;IAKH;;OAEG;;IAKH;;OAEG;;GAaJ,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC;CAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/blueprint/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/blueprint/registry.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,SAAS,EAAE;IAIrD,KAAK,IAAI,SAAS,EAAE;CAGrB"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type ReadonlySignal } from '@preact/signals-core';
|
|
2
|
-
import { type Type, type Ref } from '@dxos/echo';
|
|
3
|
-
import { type Queue } from '@dxos/echo-db';
|
|
4
|
-
import { ComplexSet } from '@dxos/util';
|
|
5
|
-
import { type Blueprint } from '../blueprint';
|
|
6
|
-
/**
|
|
7
|
-
* Manages bindings of blueprints and objects to a conversation.
|
|
8
|
-
*/
|
|
9
|
-
export declare class ContextBinder {
|
|
10
|
-
private readonly _queue;
|
|
11
|
-
constructor(_queue: Queue);
|
|
12
|
-
/**
|
|
13
|
-
* Reactive query of all bindings.
|
|
14
|
-
*/
|
|
15
|
-
readonly bindings: ReadonlySignal<Bindings>;
|
|
16
|
-
readonly blueprints: ReadonlySignal<Ref.Ref<Blueprint>[]>;
|
|
17
|
-
readonly objects: ReadonlySignal<Ref.Ref<Type.Expando>[]>;
|
|
18
|
-
/**
|
|
19
|
-
* Asynchronous query of all bindings.
|
|
20
|
-
*/
|
|
21
|
-
query(): Promise<Bindings>;
|
|
22
|
-
bind(props: BindingProps): Promise<void>;
|
|
23
|
-
unbind(props: BindingProps): Promise<void>;
|
|
24
|
-
private _reduce;
|
|
25
|
-
}
|
|
26
|
-
export type BindingProps = Partial<{
|
|
27
|
-
blueprints: Ref.Ref<Blueprint>[];
|
|
28
|
-
objects: Ref.Ref<Type.Expando>[];
|
|
29
|
-
}>;
|
|
30
|
-
export declare class Bindings {
|
|
31
|
-
blueprints: ComplexSet<Ref.Ref<Blueprint>>;
|
|
32
|
-
objects: ComplexSet<Ref.Ref<Type.Expando>>;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=binder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binder.d.ts","sourceRoot":"","sources":["../../../../src/context/binder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGrE,OAAO,EAAO,KAAK,IAAI,EAAE,KAAK,GAAG,EAAiB,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGxC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;GAEG;AACH,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,KAAK;IAE1C;;OAEG;IAEH,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAqD;IAGhG,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,CAAuD;IAChH,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAoD;IAE7G;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC;IAM1B,IAAI,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBxC,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBhD,OAAO,CAAC,OAAO;CAahB;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;IACjC,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;IACjC,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;CAClC,CAAC,CAAC;AAEH,qBAAa,QAAQ;IACnB,UAAU,iCAAmE;IAC7E,OAAO,oCAAsE;CAC9E"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
import { Type } from '@dxos/echo';
|
|
3
|
-
/**
|
|
4
|
-
* Thread message that binds or unbinds contextual objects to a conversation.
|
|
5
|
-
*/
|
|
6
|
-
export declare const ContextBinding: Type.obj<Schema.Struct<{
|
|
7
|
-
blueprints: Schema.Struct<{
|
|
8
|
-
added: Schema.Array$<Type.ref<Type.obj<Schema.Struct<{
|
|
9
|
-
key: Schema.SchemaClass<string, string, never>;
|
|
10
|
-
name: Schema.SchemaClass<string, string, never>;
|
|
11
|
-
description: Schema.optional<typeof Schema.String>;
|
|
12
|
-
instructions: Schema.SchemaClass<string, string, never>;
|
|
13
|
-
tools: Schema.Array$<Schema.SchemaClass<string, string, never>>;
|
|
14
|
-
artifacts: Schema.Array$<typeof Schema.String>;
|
|
15
|
-
}>>>>;
|
|
16
|
-
removed: Schema.Array$<Type.ref<Type.obj<Schema.Struct<{
|
|
17
|
-
key: Schema.SchemaClass<string, string, never>;
|
|
18
|
-
name: Schema.SchemaClass<string, string, never>;
|
|
19
|
-
description: Schema.optional<typeof Schema.String>;
|
|
20
|
-
instructions: Schema.SchemaClass<string, string, never>;
|
|
21
|
-
tools: Schema.Array$<Schema.SchemaClass<string, string, never>>;
|
|
22
|
-
artifacts: Schema.Array$<typeof Schema.String>;
|
|
23
|
-
}>>>>;
|
|
24
|
-
}>;
|
|
25
|
-
objects: Schema.Struct<{
|
|
26
|
-
added: Schema.Array$<Type.ref<Schema.Schema<Type.Expando, {
|
|
27
|
-
[x: string]: any;
|
|
28
|
-
id: string;
|
|
29
|
-
}, never>>>;
|
|
30
|
-
removed: Schema.Array$<Type.ref<Schema.Schema<Type.Expando, {
|
|
31
|
-
[x: string]: any;
|
|
32
|
-
id: string;
|
|
33
|
-
}, never>>>;
|
|
34
|
-
}>;
|
|
35
|
-
}>>;
|
|
36
|
-
export interface ContextBinding extends Schema.Schema.Type<typeof ContextBinding> {
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=binding.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../../../../src/context/binding.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGlC;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgB1B,CAAC;AAEF,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,cAAc,CAAC;CAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/context/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
type CreateExaToolOptions = {
|
|
2
|
-
apiKey: string;
|
|
3
|
-
};
|
|
4
|
-
export declare const createExaTool: ({ apiKey }: CreateExaToolOptions) => import("@dxos/ai").ExecutableTool;
|
|
5
|
-
export declare const createMockExaTool: () => import("@dxos/ai").ExecutableTool;
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=exa.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exa.d.ts","sourceRoot":"","sources":["../../../../src/research/exa.ts"],"names":[],"mappings":"AAYA,KAAK,oBAAoB,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,YAAY,oBAAoB,sCAuB7D,CAAC;AAEF,eAAO,MAAM,iBAAiB,yCAkC7B,CAAC"}
|
|
@@ -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;;;;YAuDC,GAAG;EAYzB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"research.test.d.ts","sourceRoot":"","sources":["../../../../src/research/research.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":""}
|