@dxos/assistant 0.8.4-main.84f28bd → 0.8.4-main.a4bbb77
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-ILL2CN3G.mjs +374 -0
- package/dist/lib/browser/chunk-ILL2CN3G.mjs.map +7 -0
- package/dist/lib/browser/chunk-UB26N5UF.mjs +89 -0
- package/dist/lib/browser/chunk-UB26N5UF.mjs.map +7 -0
- package/dist/lib/browser/extraction/index.mjs +272 -0
- package/dist/lib/browser/extraction/index.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +712 -1870
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/named-entity-recognition-QPYHML66.mjs +13 -0
- package/dist/lib/browser/named-entity-recognition-QPYHML66.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-BCFXTNSK.mjs +91 -0
- package/dist/lib/node-esm/chunk-BCFXTNSK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-GVKA7VL3.mjs +376 -0
- package/dist/lib/node-esm/chunk-GVKA7VL3.mjs.map +7 -0
- package/dist/lib/node-esm/extraction/index.mjs +273 -0
- package/dist/lib/node-esm/extraction/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +712 -1871
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/named-entity-recognition-2HDF46YX.mjs +14 -0
- package/dist/lib/node-esm/named-entity-recognition-2HDF46YX.mjs.map +7 -0
- package/dist/types/src/conversation/context.d.ts +96 -0
- package/dist/types/src/conversation/context.d.ts.map +1 -0
- package/dist/types/src/conversation/conversation.d.ts +28 -31
- 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 +75 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/execution-graph.d.ts +82 -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 +198 -65
- 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 +254 -162
- package/dist/types/src/extraction/extraction.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 +18 -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/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 +184 -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 +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 +32 -268
- package/dist/types/src/session/session.d.ts.map +1 -1
- package/dist/types/src/session/toolkit.d.ts +14 -0
- package/dist/types/src/session/toolkit.d.ts.map +1 -0
- package/dist/types/src/session/version-pin.d.ts +4 -4
- 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.d.ts +13 -0
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +50 -24
- package/src/conversation/context.ts +154 -0
- package/src/conversation/conversation.ts +89 -73
- package/src/conversation/index.ts +1 -0
- package/src/diff.test.ts +43 -0
- package/src/diff.ts +79 -0
- package/src/errors.ts +15 -0
- package/src/execution-graph.test.ts +738 -0
- package/src/execution-graph.ts +500 -0
- package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +13 -24
- package/src/extraction/extraction-llm-function/extraction-llm-function.ts +27 -21
- package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +9 -9
- package/src/extraction/extraction-ner-function/extraction-ner-function.ts +17 -7
- package/src/extraction/extraction-ner-function/named-entity-recognition.test.ts +4 -3
- package/src/extraction/extraction-ner-function/named-entity-recognition.ts +3 -1
- package/src/extraction/quotes.test.ts +3 -3
- package/src/extraction/quotes.ts +2 -2
- package/src/functions/index.ts +5 -0
- package/src/functions/services.ts +153 -0
- package/src/index.ts +5 -5
- package/src/session/artifact-diff.ts +41 -0
- package/src/session/error-handling.ts +40 -0
- package/src/session/format.test.ts +60 -0
- package/src/session/format.ts +139 -0
- package/src/session/index.ts +3 -0
- package/src/session/observer.ts +58 -0
- package/src/session/session.conversations.json +1 -0
- package/src/session/session.test.ts +86 -215
- package/src/session/session.ts +163 -539
- package/src/session/toolkit.ts +46 -0
- package/src/session/version-pin.ts +9 -9
- package/src/summarization/summarization.test.ts +86 -106
- package/src/templates/format.tpl +60 -0
- package/src/templates/index.ts +5 -0
- package/src/templates/system.tpl +48 -0
- package/src/templates/system.ts +41 -0
- package/src/types.ts +45 -1
- 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/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/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/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
|
@@ -4,106 +4,152 @@ import { type FunctionDefinition, type FunctionExecutor } from '@dxos/functions'
|
|
|
4
4
|
export declare const ExtractionInput: Schema.Struct<{
|
|
5
5
|
message: import("@dxos/echo/Type").obj<Schema.Struct<{
|
|
6
6
|
id: import("@dxos/keys").ObjectIdClass;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
parentMessage: Schema.optional<import("@dxos/keys").ObjectIdClass>;
|
|
8
|
+
created: Schema.SchemaClass<string, string, never>;
|
|
9
|
+
sender: Schema.mutable<Schema.Struct<{
|
|
10
|
+
contact: Schema.optional<import("@dxos/echo/Type").ref<import("@dxos/echo/Type").obj<Schema.Struct<{
|
|
11
|
+
fullName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
12
|
+
preferredName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
13
|
+
nickname: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
14
|
+
image: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
15
|
+
organization: Schema.optional<Schema.Schema<import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
16
16
|
id: string;
|
|
17
|
+
description?: string | undefined;
|
|
17
18
|
name?: string | undefined;
|
|
18
19
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
19
20
|
image?: string | undefined;
|
|
20
21
|
website?: string | undefined;
|
|
21
22
|
}>, import("@dxos/echo-protocol").EncodedReference, never>>;
|
|
22
|
-
jobTitle:
|
|
23
|
-
department:
|
|
24
|
-
notes:
|
|
25
|
-
emails:
|
|
26
|
-
label:
|
|
27
|
-
value:
|
|
23
|
+
jobTitle: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
24
|
+
department: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
25
|
+
notes: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
26
|
+
emails: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
27
|
+
label: Schema.optional<typeof Schema.String>;
|
|
28
|
+
value: Schema.refine<string, typeof Schema.String>;
|
|
28
29
|
}>>>>;
|
|
29
|
-
identities:
|
|
30
|
-
label:
|
|
31
|
-
value: typeof
|
|
30
|
+
identities: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
31
|
+
label: Schema.optional<typeof Schema.String>;
|
|
32
|
+
value: typeof Schema.String;
|
|
32
33
|
}>>>>;
|
|
33
|
-
phoneNumbers:
|
|
34
|
-
label:
|
|
35
|
-
value: typeof
|
|
34
|
+
phoneNumbers: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
35
|
+
label: Schema.optional<typeof Schema.String>;
|
|
36
|
+
value: typeof Schema.String;
|
|
36
37
|
}>>>>;
|
|
37
|
-
addresses:
|
|
38
|
-
label:
|
|
39
|
-
value:
|
|
40
|
-
street:
|
|
41
|
-
extended:
|
|
42
|
-
locality:
|
|
43
|
-
region:
|
|
44
|
-
postalCode:
|
|
45
|
-
postOfficeBoxNumber:
|
|
46
|
-
country:
|
|
38
|
+
addresses: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
39
|
+
label: Schema.optional<typeof Schema.String>;
|
|
40
|
+
value: Schema.Struct<{
|
|
41
|
+
street: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
42
|
+
extended: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
43
|
+
locality: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
44
|
+
region: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
45
|
+
postalCode: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
46
|
+
postOfficeBoxNumber: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
47
|
+
country: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
47
48
|
}>;
|
|
48
49
|
}>>>>;
|
|
49
|
-
urls:
|
|
50
|
-
label:
|
|
51
|
-
value:
|
|
50
|
+
urls: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
51
|
+
label: Schema.optional<typeof Schema.String>;
|
|
52
|
+
value: Schema.refine<string, typeof Schema.String>;
|
|
52
53
|
}>>>>;
|
|
53
|
-
birthday:
|
|
54
|
-
fields:
|
|
55
|
-
category:
|
|
56
|
-
label: typeof
|
|
57
|
-
value: typeof
|
|
54
|
+
birthday: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
55
|
+
fields: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
56
|
+
category: Schema.optional<typeof Schema.String>;
|
|
57
|
+
label: typeof Schema.String;
|
|
58
|
+
value: typeof Schema.String;
|
|
58
59
|
}>>>>;
|
|
59
60
|
}>>>>;
|
|
60
|
-
identityDid:
|
|
61
|
-
identityKey:
|
|
62
|
-
email:
|
|
63
|
-
name:
|
|
64
|
-
role:
|
|
61
|
+
identityDid: Schema.optional<typeof Schema.String>;
|
|
62
|
+
identityKey: Schema.optional<typeof Schema.String>;
|
|
63
|
+
email: Schema.optional<typeof Schema.String>;
|
|
64
|
+
name: Schema.optional<typeof Schema.String>;
|
|
65
|
+
role: Schema.optional<Schema.Literal<["user", "assistant", "tool"]>>;
|
|
65
66
|
}>>;
|
|
66
|
-
blocks:
|
|
67
|
-
pending:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
mediaType: typeof import("effect/Schema").String;
|
|
86
|
-
data: typeof import("effect/Schema").String;
|
|
87
|
-
}>>, import("effect/Schema").mutable<import("effect/Schema").Struct<{
|
|
88
|
-
type: import("effect/Schema").Literal<["http"]>;
|
|
89
|
-
url: typeof import("effect/Schema").String;
|
|
67
|
+
blocks: Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.TaggedStruct<"anchor", {
|
|
68
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
69
|
+
objectId: import("@dxos/keys").ObjectIdClass;
|
|
70
|
+
version: typeof Schema.Unknown;
|
|
71
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"file", {
|
|
72
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
73
|
+
url: typeof Schema.String;
|
|
74
|
+
name: Schema.optional<typeof Schema.String>;
|
|
75
|
+
mediaType: Schema.optional<typeof Schema.String>;
|
|
76
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"image", {
|
|
77
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
78
|
+
id: Schema.optional<typeof Schema.String>;
|
|
79
|
+
source: Schema.optional<Schema.Union<[Schema.mutable<Schema.Struct<{
|
|
80
|
+
type: Schema.Literal<["base64"]>;
|
|
81
|
+
mediaType: typeof Schema.String;
|
|
82
|
+
data: typeof Schema.String;
|
|
83
|
+
}>>, Schema.mutable<Schema.Struct<{
|
|
84
|
+
type: Schema.Literal<["http"]>;
|
|
85
|
+
url: typeof Schema.String;
|
|
90
86
|
}>>]>>;
|
|
91
|
-
}
|
|
92
|
-
pending:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"json", {
|
|
88
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
89
|
+
disposition: Schema.optional<typeof Schema.String>;
|
|
90
|
+
data: typeof Schema.String;
|
|
91
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"proposal", {
|
|
92
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
93
|
+
text: typeof Schema.String;
|
|
94
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"reasoning", {
|
|
95
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
96
|
+
reasoningText: Schema.optional<typeof Schema.String>;
|
|
97
|
+
redactedText: Schema.optional<typeof Schema.String>;
|
|
98
|
+
signature: Schema.optional<typeof Schema.String>;
|
|
99
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"reference", {
|
|
100
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
101
|
+
reference: import("@dxos/echo/Type").ref<Schema.Schema<import("@dxos/echo/Type").Expando, {
|
|
96
102
|
[x: string]: any;
|
|
97
103
|
id: string;
|
|
98
104
|
}, never>>;
|
|
99
|
-
}
|
|
100
|
-
pending:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
105
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"select", {
|
|
106
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
107
|
+
options: Schema.Array$<typeof Schema.String>;
|
|
108
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"status", {
|
|
109
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
110
|
+
statusText: typeof Schema.String;
|
|
111
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"suggestion", {
|
|
112
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
113
|
+
text: typeof Schema.String;
|
|
114
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"summary", {
|
|
115
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
116
|
+
mimeType: Schema.optional<typeof Schema.String>;
|
|
117
|
+
message: Schema.optional<typeof Schema.String>;
|
|
118
|
+
model: Schema.optional<typeof Schema.String>;
|
|
119
|
+
usage: Schema.optional<Schema.Struct<{
|
|
120
|
+
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
121
|
+
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
122
|
+
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
123
|
+
}>>;
|
|
124
|
+
toolCalls: Schema.optional<typeof Schema.Number>;
|
|
125
|
+
errors: Schema.optional<typeof Schema.Number>;
|
|
126
|
+
duration: Schema.optional<typeof Schema.Number>;
|
|
127
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"text", {
|
|
128
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
129
|
+
mimeType: Schema.optional<typeof Schema.String>;
|
|
130
|
+
text: typeof Schema.String;
|
|
131
|
+
disposition: Schema.optional<typeof Schema.String>;
|
|
132
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"toolkit", {
|
|
133
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
134
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"toolCall", {
|
|
135
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
136
|
+
toolCallId: typeof Schema.String;
|
|
137
|
+
name: typeof Schema.String;
|
|
138
|
+
input: typeof Schema.String;
|
|
139
|
+
providerExecuted: typeof Schema.Boolean;
|
|
140
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"toolResult", {
|
|
141
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
142
|
+
toolCallId: typeof Schema.String;
|
|
143
|
+
name: typeof Schema.String;
|
|
144
|
+
result: Schema.optional<typeof Schema.String>;
|
|
145
|
+
error: Schema.optional<typeof Schema.String>;
|
|
146
|
+
providerExecuted: typeof Schema.Boolean;
|
|
147
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"transcript", {
|
|
148
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
149
|
+
started: typeof Schema.String;
|
|
150
|
+
text: typeof Schema.String;
|
|
151
|
+
}>>]>>>;
|
|
152
|
+
properties: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
107
153
|
}>>;
|
|
108
154
|
objects: Schema.optional<Schema.Array$<Schema.Schema<Expando, Expando, never>>>;
|
|
109
155
|
options: Schema.optional<Schema.Struct<{
|
|
@@ -116,106 +162,152 @@ export interface ExtractionInput extends Schema.Schema.Type<typeof ExtractionInp
|
|
|
116
162
|
export declare const ExtractionOutput: Schema.Struct<{
|
|
117
163
|
message: import("@dxos/echo/Type").obj<Schema.Struct<{
|
|
118
164
|
id: import("@dxos/keys").ObjectIdClass;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
165
|
+
parentMessage: Schema.optional<import("@dxos/keys").ObjectIdClass>;
|
|
166
|
+
created: Schema.SchemaClass<string, string, never>;
|
|
167
|
+
sender: Schema.mutable<Schema.Struct<{
|
|
168
|
+
contact: Schema.optional<import("@dxos/echo/Type").ref<import("@dxos/echo/Type").obj<Schema.Struct<{
|
|
169
|
+
fullName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
170
|
+
preferredName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
171
|
+
nickname: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
172
|
+
image: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
173
|
+
organization: Schema.optional<Schema.Schema<import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
128
174
|
id: string;
|
|
175
|
+
description?: string | undefined;
|
|
129
176
|
name?: string | undefined;
|
|
130
177
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
131
178
|
image?: string | undefined;
|
|
132
179
|
website?: string | undefined;
|
|
133
180
|
}>, import("@dxos/echo-protocol").EncodedReference, never>>;
|
|
134
|
-
jobTitle:
|
|
135
|
-
department:
|
|
136
|
-
notes:
|
|
137
|
-
emails:
|
|
138
|
-
label:
|
|
139
|
-
value:
|
|
181
|
+
jobTitle: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
182
|
+
department: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
183
|
+
notes: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
184
|
+
emails: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
185
|
+
label: Schema.optional<typeof Schema.String>;
|
|
186
|
+
value: Schema.refine<string, typeof Schema.String>;
|
|
140
187
|
}>>>>;
|
|
141
|
-
identities:
|
|
142
|
-
label:
|
|
143
|
-
value: typeof
|
|
188
|
+
identities: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
189
|
+
label: Schema.optional<typeof Schema.String>;
|
|
190
|
+
value: typeof Schema.String;
|
|
144
191
|
}>>>>;
|
|
145
|
-
phoneNumbers:
|
|
146
|
-
label:
|
|
147
|
-
value: typeof
|
|
192
|
+
phoneNumbers: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
193
|
+
label: Schema.optional<typeof Schema.String>;
|
|
194
|
+
value: typeof Schema.String;
|
|
148
195
|
}>>>>;
|
|
149
|
-
addresses:
|
|
150
|
-
label:
|
|
151
|
-
value:
|
|
152
|
-
street:
|
|
153
|
-
extended:
|
|
154
|
-
locality:
|
|
155
|
-
region:
|
|
156
|
-
postalCode:
|
|
157
|
-
postOfficeBoxNumber:
|
|
158
|
-
country:
|
|
196
|
+
addresses: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
197
|
+
label: Schema.optional<typeof Schema.String>;
|
|
198
|
+
value: Schema.Struct<{
|
|
199
|
+
street: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
200
|
+
extended: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
201
|
+
locality: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
202
|
+
region: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
203
|
+
postalCode: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
204
|
+
postOfficeBoxNumber: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
205
|
+
country: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
159
206
|
}>;
|
|
160
207
|
}>>>>;
|
|
161
|
-
urls:
|
|
162
|
-
label:
|
|
163
|
-
value:
|
|
208
|
+
urls: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
209
|
+
label: Schema.optional<typeof Schema.String>;
|
|
210
|
+
value: Schema.refine<string, typeof Schema.String>;
|
|
164
211
|
}>>>>;
|
|
165
|
-
birthday:
|
|
166
|
-
fields:
|
|
167
|
-
category:
|
|
168
|
-
label: typeof
|
|
169
|
-
value: typeof
|
|
212
|
+
birthday: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
213
|
+
fields: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
214
|
+
category: Schema.optional<typeof Schema.String>;
|
|
215
|
+
label: typeof Schema.String;
|
|
216
|
+
value: typeof Schema.String;
|
|
170
217
|
}>>>>;
|
|
171
218
|
}>>>>;
|
|
172
|
-
identityDid:
|
|
173
|
-
identityKey:
|
|
174
|
-
email:
|
|
175
|
-
name:
|
|
176
|
-
role:
|
|
219
|
+
identityDid: Schema.optional<typeof Schema.String>;
|
|
220
|
+
identityKey: Schema.optional<typeof Schema.String>;
|
|
221
|
+
email: Schema.optional<typeof Schema.String>;
|
|
222
|
+
name: Schema.optional<typeof Schema.String>;
|
|
223
|
+
role: Schema.optional<Schema.Literal<["user", "assistant", "tool"]>>;
|
|
177
224
|
}>>;
|
|
178
|
-
blocks:
|
|
179
|
-
pending:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
mediaType: typeof import("effect/Schema").String;
|
|
198
|
-
data: typeof import("effect/Schema").String;
|
|
199
|
-
}>>, import("effect/Schema").mutable<import("effect/Schema").Struct<{
|
|
200
|
-
type: import("effect/Schema").Literal<["http"]>;
|
|
201
|
-
url: typeof import("effect/Schema").String;
|
|
225
|
+
blocks: Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.TaggedStruct<"anchor", {
|
|
226
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
227
|
+
objectId: import("@dxos/keys").ObjectIdClass;
|
|
228
|
+
version: typeof Schema.Unknown;
|
|
229
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"file", {
|
|
230
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
231
|
+
url: typeof Schema.String;
|
|
232
|
+
name: Schema.optional<typeof Schema.String>;
|
|
233
|
+
mediaType: Schema.optional<typeof Schema.String>;
|
|
234
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"image", {
|
|
235
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
236
|
+
id: Schema.optional<typeof Schema.String>;
|
|
237
|
+
source: Schema.optional<Schema.Union<[Schema.mutable<Schema.Struct<{
|
|
238
|
+
type: Schema.Literal<["base64"]>;
|
|
239
|
+
mediaType: typeof Schema.String;
|
|
240
|
+
data: typeof Schema.String;
|
|
241
|
+
}>>, Schema.mutable<Schema.Struct<{
|
|
242
|
+
type: Schema.Literal<["http"]>;
|
|
243
|
+
url: typeof Schema.String;
|
|
202
244
|
}>>]>>;
|
|
203
|
-
}
|
|
204
|
-
pending:
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
245
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"json", {
|
|
246
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
247
|
+
disposition: Schema.optional<typeof Schema.String>;
|
|
248
|
+
data: typeof Schema.String;
|
|
249
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"proposal", {
|
|
250
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
251
|
+
text: typeof Schema.String;
|
|
252
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"reasoning", {
|
|
253
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
254
|
+
reasoningText: Schema.optional<typeof Schema.String>;
|
|
255
|
+
redactedText: Schema.optional<typeof Schema.String>;
|
|
256
|
+
signature: Schema.optional<typeof Schema.String>;
|
|
257
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"reference", {
|
|
258
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
259
|
+
reference: import("@dxos/echo/Type").ref<Schema.Schema<import("@dxos/echo/Type").Expando, {
|
|
208
260
|
[x: string]: any;
|
|
209
261
|
id: string;
|
|
210
262
|
}, never>>;
|
|
211
|
-
}
|
|
212
|
-
pending:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
263
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"select", {
|
|
264
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
265
|
+
options: Schema.Array$<typeof Schema.String>;
|
|
266
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"status", {
|
|
267
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
268
|
+
statusText: typeof Schema.String;
|
|
269
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"suggestion", {
|
|
270
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
271
|
+
text: typeof Schema.String;
|
|
272
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"summary", {
|
|
273
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
274
|
+
mimeType: Schema.optional<typeof Schema.String>;
|
|
275
|
+
message: Schema.optional<typeof Schema.String>;
|
|
276
|
+
model: Schema.optional<typeof Schema.String>;
|
|
277
|
+
usage: Schema.optional<Schema.Struct<{
|
|
278
|
+
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
279
|
+
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
280
|
+
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
281
|
+
}>>;
|
|
282
|
+
toolCalls: Schema.optional<typeof Schema.Number>;
|
|
283
|
+
errors: Schema.optional<typeof Schema.Number>;
|
|
284
|
+
duration: Schema.optional<typeof Schema.Number>;
|
|
285
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"text", {
|
|
286
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
287
|
+
mimeType: Schema.optional<typeof Schema.String>;
|
|
288
|
+
text: typeof Schema.String;
|
|
289
|
+
disposition: Schema.optional<typeof Schema.String>;
|
|
290
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"toolkit", {
|
|
291
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
292
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"toolCall", {
|
|
293
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
294
|
+
toolCallId: typeof Schema.String;
|
|
295
|
+
name: typeof Schema.String;
|
|
296
|
+
input: typeof Schema.String;
|
|
297
|
+
providerExecuted: typeof Schema.Boolean;
|
|
298
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"toolResult", {
|
|
299
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
300
|
+
toolCallId: typeof Schema.String;
|
|
301
|
+
name: typeof Schema.String;
|
|
302
|
+
result: Schema.optional<typeof Schema.String>;
|
|
303
|
+
error: Schema.optional<typeof Schema.String>;
|
|
304
|
+
providerExecuted: typeof Schema.Boolean;
|
|
305
|
+
}>>, Schema.mutable<Schema.TaggedStruct<"transcript", {
|
|
306
|
+
pending: Schema.optional<typeof Schema.Boolean>;
|
|
307
|
+
started: typeof Schema.String;
|
|
308
|
+
text: typeof Schema.String;
|
|
309
|
+
}>>]>>>;
|
|
310
|
+
properties: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
219
311
|
}>>;
|
|
220
312
|
timeElapsed: typeof Schema.Number;
|
|
221
313
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../../../../src/extraction/extraction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIjF,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../../../../src/extraction/extraction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIjF,eAAO,MAAM,eAAe;;;;;;;;;;;;;+BA+D8ic,CAAC;wBAA0C,CAAC;0BAA4C,CAAC;yBAA8F,CAAC;2BAA6C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAtD9yc,CAAC;AACH,MAAM,WAAW,eAAgB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC;CAAG;AAEtF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;+BAmD6ic,CAAC;wBAA0C,CAAC;0BAA4C,CAAC;yBAA8F,CAAC;2BAA6C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAhD9yc,CAAC;AACH,MAAM,WAAW,gBAAiB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC;CAAG;AAExF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;IAChE,QAAQ,EAAE,gBAAgB,CAAC;IAE3B,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB;;;;WAIG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;AAEvF;;GAEG;AAEH,eAAO,MAAM,wBAAwB,GAAU,QAAQ,8BAA8B,KAAG,OAAO,CAAC,gBAAgB,CAkB/G,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Tool, type Toolkit } from '@effect/ai';
|
|
2
|
+
import { Layer } from 'effect';
|
|
3
|
+
import { ToolExecutionService, ToolResolverService } from '@dxos/ai';
|
|
4
|
+
import { DatabaseService, FunctionDefinition, FunctionInvocationService } from '@dxos/functions';
|
|
5
|
+
/**
|
|
6
|
+
* Constructs a `ToolResolverService` whose `resolve(id)` looks up tools in the following order:
|
|
7
|
+
* 1. Toolkit: return an existing tool from the provided `toolkit` if one is present under `id`.
|
|
8
|
+
* 2. Functions in DB: query `FunctionType` by `key=id`; if found, deserialize and project to a tool
|
|
9
|
+
* (propagating any `deployedFunctionId` discovered in the object's metadata).
|
|
10
|
+
* 3. Functions passed in: fall back to a matching `FunctionDefinition` from the `functions` array.
|
|
11
|
+
*
|
|
12
|
+
* If none of the above yield a match, the effect fails with `AiToolNotFoundError`.
|
|
13
|
+
*
|
|
14
|
+
* Requires `DatabaseService` in the environment.
|
|
15
|
+
*/
|
|
16
|
+
export declare const makeToolResolverFromFunctions: (functions: FunctionDefinition<any, any>[], toolkit: Toolkit.Toolkit<any>) => Layer.Layer<ToolResolverService, never, DatabaseService>;
|
|
17
|
+
export declare const makeToolExecutionServiceFromFunctions: (toolkit: Toolkit.Toolkit<any>, handlersLayer: Layer.Layer<Tool.Handler<any>, never, never>) => Layer.Layer<ToolExecutionService, never, FunctionInvocationService>;
|
|
18
|
+
//# sourceMappingURL=services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../src/functions/services.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAmB,KAAK,EAAkB,MAAM,QAAQ,CAAC;AAEhE,OAAO,EAAuB,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG1F,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,yBAAyB,EAAgB,MAAM,iBAAiB,CAAC;AAG/G;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B,GACxC,WAAW,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EACzC,SAAS,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAC5B,KAAK,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,EAAE,eAAe,CA8BzD,CAAC;AAEF,eAAO,MAAM,qCAAqC,GAChD,SAAS,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAC7B,eAAe,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAC1D,KAAK,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,EAAE,yBAAyB,CAmCpE,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './blueprint';
|
|
2
|
-
export * from './context';
|
|
3
1
|
export * from './conversation';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
2
|
+
export * from './diff';
|
|
3
|
+
export * from './errors';
|
|
4
|
+
export * from './execution-graph';
|
|
5
|
+
export * from './functions';
|
|
6
6
|
export * from './session';
|
|
7
|
+
export * from './templates';
|
|
7
8
|
export * from './types';
|
|
8
|
-
export * from './conversation';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Context } from 'effect';
|
|
2
|
+
import { type ObjectVersion } from '@dxos/echo-db';
|
|
3
|
+
import { type ObjectId } from '@dxos/echo-schema';
|
|
4
|
+
declare const ArtifactDiffResolver_base: Context.TagClass<ArtifactDiffResolver, "@dxos/assistant/ArtifactDiffResolver", ArtifactDiffResolver.Service>;
|
|
5
|
+
/**
|
|
6
|
+
* Resolves artifact ids to their versions.
|
|
7
|
+
* Used to give the model a sense of the changes to the artifacts made by users during the conversation.
|
|
8
|
+
* The artifacts versions are pinned in the history, and whenever the artifact changes in-between assistant's steps,
|
|
9
|
+
* a diff is inserted into the conversation.
|
|
10
|
+
*
|
|
11
|
+
* Can be optionally provided to the session run call.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ArtifactDiffResolver extends ArtifactDiffResolver_base {
|
|
14
|
+
}
|
|
15
|
+
export declare namespace ArtifactDiffResolver {
|
|
16
|
+
type Service = {
|
|
17
|
+
resolve: (artifacts: {
|
|
18
|
+
id: ObjectId;
|
|
19
|
+
lastVersion: ObjectVersion;
|
|
20
|
+
}[]) => Promise<Map<ObjectId, {
|
|
21
|
+
version: ObjectVersion;
|
|
22
|
+
diff?: string;
|
|
23
|
+
}>>;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=artifact-diff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact-diff.d.ts","sourceRoot":"","sources":["../../../../src/session/artifact-diff.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;;AAElD;;;;;;;GAOG;AAEH,qBAAa,oBAAqB,SAAQ,yBAGvC;CAAG;AAEN,yBAAiB,oBAAoB,CAAC;IACpC,KAAY,OAAO,GAAG;QACpB,OAAO,EAAE,CACP,SAAS,EAAE;YACT,EAAE,EAAE,QAAQ,CAAC;YACb,WAAW,EAAE,aAAa,CAAC;SAC5B,EAAE,KACA,OAAO,CACV,GAAG,CACD,QAAQ,EACR;YACE,OAAO,EAAE,aAAa,CAAC;YACvB,IAAI,CAAC,EAAE,MAAM,CAAC;SACf,CACF,CACF,CAAC;KACH,CAAC;CACH"}
|