@dxos/assistant 0.8.4-main.72ec0f3 → 0.8.4-main.74a063c4e0
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/chunk-UAWIXKF6.mjs +1875 -0
- package/dist/lib/neutral/chunk-UAWIXKF6.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/extraction/index.mjs +29 -35
- package/dist/lib/neutral/extraction/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +551 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/testing/index.mjs +114 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/types/src/conversation/context.d.ts +116 -64
- package/dist/types/src/conversation/context.d.ts.map +1 -1
- 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/conversation.d.ts +45 -18
- package/dist/types/src/conversation/conversation.d.ts.map +1 -1
- package/dist/types/src/conversation/conversation.test.d.ts +2 -0
- package/dist/types/src/conversation/conversation.test.d.ts.map +1 -0
- package/dist/types/src/diff.d.ts +3 -1
- package/dist/types/src/diff.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +12 -16
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/execution-graph.d.ts +2 -2
- package/dist/types/src/execution-graph.d.ts.map +1 -1
- 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.d.ts +1059 -313
- 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 +2 -2
- package/dist/types/src/extraction/quotes.d.ts.map +1 -1
- package/dist/types/src/functions/services.d.ts +28 -9
- package/dist/types/src/functions/services.d.ts.map +1 -1
- package/dist/types/src/functions.test.d.ts +2 -0
- package/dist/types/src/functions.test.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/service/AgentService.d.ts +61 -0
- package/dist/types/src/service/AgentService.d.ts.map +1 -0
- package/dist/types/src/service/AgentService.test.d.ts +2 -0
- package/dist/types/src/service/AgentService.test.d.ts.map +1 -0
- package/dist/types/src/service/agent-process.d.ts +17 -0
- package/dist/types/src/service/agent-process.d.ts.map +1 -0
- package/dist/types/src/service/index.d.ts +3 -0
- package/dist/types/src/service/index.d.ts.map +1 -0
- package/dist/types/src/session/artifact-diff.d.ts +1 -1
- package/dist/types/src/session/artifact-diff.d.ts.map +1 -1
- package/dist/types/src/session/format.d.ts +3 -3
- package/dist/types/src/session/format.d.ts.map +1 -1
- package/dist/types/src/session/index.d.ts +1 -1
- package/dist/types/src/session/index.d.ts.map +1 -1
- package/dist/types/src/session/observer.d.ts +4 -3
- package/dist/types/src/session/observer.d.ts.map +1 -1
- package/dist/types/src/session/session.d.ts +72 -11
- package/dist/types/src/session/session.d.ts.map +1 -1
- package/dist/types/src/session/toolkit.d.ts +9 -6
- package/dist/types/src/session/toolkit.d.ts.map +1 -1
- package/dist/types/src/session/version-pin.d.ts +2 -2
- package/dist/types/src/session/version-pin.d.ts.map +1 -1
- package/dist/types/src/templates/system.d.ts +0 -1
- package/dist/types/src/templates/system.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/layer.d.ts +35 -0
- package/dist/types/src/testing/layer.d.ts.map +1 -0
- package/dist/types/src/tracing.d.ts +264 -0
- package/dist/types/src/tracing.d.ts.map +1 -0
- package/dist/types/src/types/artifact.d.ts +13 -5
- package/dist/types/src/types/artifact.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +42 -33
- package/src/conversation/context.test.ts +52 -0
- package/src/conversation/context.ts +307 -90
- package/src/conversation/conversation.test.ts +58 -0
- package/src/conversation/conversation.ts +209 -62
- package/src/diff.test.ts +36 -5
- package/src/diff.ts +13 -4
- package/src/errors.ts +2 -2
- package/src/execution-graph.test.ts +3 -3
- package/src/execution-graph.ts +6 -6
- package/src/extraction/extraction-ner-function/index.ts +0 -1
- package/src/extraction/extraction.ts +40 -12
- package/src/extraction/index.ts +0 -1
- package/src/extraction/quotes.ts +4 -5
- package/src/functions/services.ts +217 -50
- package/src/functions.conversations.json +1 -0
- package/src/functions.test.ts +82 -0
- package/src/index.ts +2 -0
- package/src/service/AgentService.conversations.json +1 -0
- package/src/service/AgentService.test.ts +169 -0
- package/src/service/AgentService.ts +165 -0
- package/src/service/agent-process.ts +359 -0
- package/src/service/index.ts +6 -0
- package/src/session/artifact-diff.ts +1 -1
- package/src/session/format.test.ts +110 -39
- package/src/session/format.ts +12 -14
- package/src/session/index.ts +1 -2
- package/src/session/observer.ts +4 -1
- package/src/session/session.conversations.json +1 -1
- package/src/session/session.test.ts +58 -17
- package/src/session/session.ts +249 -113
- package/src/session/toolkit.ts +21 -25
- package/src/session/version-pin.ts +4 -3
- package/src/templates/instructions/format.tpl +0 -4
- package/src/templates/instructions/system.tpl +11 -2
- package/src/templates/system.ts +6 -5
- package/src/testing/index.ts +5 -0
- package/src/testing/layer.ts +258 -0
- package/src/tracing.ts +113 -0
- package/src/types/artifact.ts +31 -13
- package/dist/lib/browser/extraction/index.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -1290
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
- package/dist/lib/node-esm/extraction/index.mjs +0 -226
- package/dist/lib/node-esm/extraction/index.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -1291
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +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 -345
- 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/session/GenericToolkit.d.ts +0 -84
- package/dist/types/src/session/GenericToolkit.d.ts.map +0 -1
- package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +0 -84
- package/src/extraction/extraction-llm-function/extraction-llm-function.ts +0 -62
- package/src/extraction/extraction-llm-function/index.ts +0 -5
- package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +0 -116
- package/src/extraction/extraction-ner-function/extraction-ner-function.ts +0 -56
- package/src/session/GenericToolkit.ts +0 -130
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { Obj } from '@dxos/echo';
|
|
2
|
+
import { Trace } from '@dxos/functions';
|
|
3
|
+
/**
|
|
4
|
+
* Partial content block emitted.
|
|
5
|
+
*/
|
|
6
|
+
export declare const PartialBlock: Trace.EventType<{
|
|
7
|
+
readonly messageId: string;
|
|
8
|
+
readonly role: "user" | "assistant" | "tool";
|
|
9
|
+
readonly block: {
|
|
10
|
+
readonly version: unknown;
|
|
11
|
+
readonly _tag: "anchor";
|
|
12
|
+
readonly pending?: boolean | undefined;
|
|
13
|
+
readonly objectId: string;
|
|
14
|
+
} | {
|
|
15
|
+
readonly name?: string | undefined;
|
|
16
|
+
readonly _tag: "file";
|
|
17
|
+
readonly pending?: boolean | undefined;
|
|
18
|
+
readonly url: string;
|
|
19
|
+
readonly mediaType?: string | undefined;
|
|
20
|
+
} | {
|
|
21
|
+
readonly id?: string | undefined;
|
|
22
|
+
readonly _tag: "image";
|
|
23
|
+
readonly pending?: boolean | undefined;
|
|
24
|
+
readonly source?: {
|
|
25
|
+
readonly mediaType: string;
|
|
26
|
+
readonly type: "base64";
|
|
27
|
+
readonly data: string;
|
|
28
|
+
} | {
|
|
29
|
+
readonly url: string;
|
|
30
|
+
readonly type: "http";
|
|
31
|
+
} | undefined;
|
|
32
|
+
} | {
|
|
33
|
+
readonly _tag: "json";
|
|
34
|
+
readonly pending?: boolean | undefined;
|
|
35
|
+
readonly data: string;
|
|
36
|
+
readonly disposition?: string | undefined;
|
|
37
|
+
} | {
|
|
38
|
+
readonly text: string;
|
|
39
|
+
readonly _tag: "proposal";
|
|
40
|
+
readonly pending?: boolean | undefined;
|
|
41
|
+
} | {
|
|
42
|
+
readonly _tag: "reasoning";
|
|
43
|
+
readonly pending?: boolean | undefined;
|
|
44
|
+
readonly reasoningText?: string | undefined;
|
|
45
|
+
readonly redactedText?: string | undefined;
|
|
46
|
+
readonly signature?: string | undefined;
|
|
47
|
+
} | {
|
|
48
|
+
readonly reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
|
|
49
|
+
readonly _tag: "reference";
|
|
50
|
+
readonly pending?: boolean | undefined;
|
|
51
|
+
} | {
|
|
52
|
+
readonly _tag: "select";
|
|
53
|
+
readonly pending?: boolean | undefined;
|
|
54
|
+
readonly options: string[];
|
|
55
|
+
} | {
|
|
56
|
+
readonly _tag: "status";
|
|
57
|
+
readonly pending?: boolean | undefined;
|
|
58
|
+
readonly statusText: string;
|
|
59
|
+
} | {
|
|
60
|
+
readonly text: string;
|
|
61
|
+
readonly _tag: "suggestion";
|
|
62
|
+
readonly pending?: boolean | undefined;
|
|
63
|
+
} | {
|
|
64
|
+
readonly _tag: "stats";
|
|
65
|
+
readonly pending?: boolean | undefined;
|
|
66
|
+
readonly mimeType?: string | undefined;
|
|
67
|
+
readonly message?: string | undefined;
|
|
68
|
+
readonly model?: string | undefined;
|
|
69
|
+
readonly usage?: {
|
|
70
|
+
readonly inputTokens?: number | undefined;
|
|
71
|
+
readonly outputTokens?: number | undefined;
|
|
72
|
+
readonly totalTokens?: number | undefined;
|
|
73
|
+
} | undefined;
|
|
74
|
+
readonly toolCalls?: number | undefined;
|
|
75
|
+
readonly errors?: number | undefined;
|
|
76
|
+
readonly duration?: number | undefined;
|
|
77
|
+
} | {
|
|
78
|
+
readonly text: string;
|
|
79
|
+
readonly _tag: "text";
|
|
80
|
+
readonly pending?: boolean | undefined;
|
|
81
|
+
readonly disposition?: string | undefined;
|
|
82
|
+
readonly mimeType?: string | undefined;
|
|
83
|
+
} | {
|
|
84
|
+
readonly content: string;
|
|
85
|
+
readonly _tag: "summary";
|
|
86
|
+
readonly pending?: boolean | undefined;
|
|
87
|
+
} | {
|
|
88
|
+
readonly _tag: "toolkit";
|
|
89
|
+
readonly pending?: boolean | undefined;
|
|
90
|
+
} | {
|
|
91
|
+
readonly name: string;
|
|
92
|
+
readonly _tag: "toolCall";
|
|
93
|
+
readonly pending?: boolean | undefined;
|
|
94
|
+
readonly toolCallId: string;
|
|
95
|
+
readonly input: string;
|
|
96
|
+
readonly providerExecuted: boolean;
|
|
97
|
+
} | {
|
|
98
|
+
readonly name: string;
|
|
99
|
+
readonly _tag: "toolResult";
|
|
100
|
+
readonly pending?: boolean | undefined;
|
|
101
|
+
readonly toolCallId: string;
|
|
102
|
+
readonly providerExecuted: boolean;
|
|
103
|
+
readonly result?: string | undefined;
|
|
104
|
+
readonly error?: string | undefined;
|
|
105
|
+
} | {
|
|
106
|
+
readonly text: string;
|
|
107
|
+
readonly _tag: "transcript";
|
|
108
|
+
readonly pending?: boolean | undefined;
|
|
109
|
+
readonly started: string;
|
|
110
|
+
};
|
|
111
|
+
}>;
|
|
112
|
+
/**
|
|
113
|
+
* Complete content block emitted.
|
|
114
|
+
*/
|
|
115
|
+
export declare const CompleteBlock: Trace.EventType<{
|
|
116
|
+
readonly messageId: string;
|
|
117
|
+
readonly role: "user" | "assistant" | "tool";
|
|
118
|
+
readonly block: {
|
|
119
|
+
readonly version: unknown;
|
|
120
|
+
readonly _tag: "anchor";
|
|
121
|
+
readonly pending?: boolean | undefined;
|
|
122
|
+
readonly objectId: string;
|
|
123
|
+
} | {
|
|
124
|
+
readonly name?: string | undefined;
|
|
125
|
+
readonly _tag: "file";
|
|
126
|
+
readonly pending?: boolean | undefined;
|
|
127
|
+
readonly url: string;
|
|
128
|
+
readonly mediaType?: string | undefined;
|
|
129
|
+
} | {
|
|
130
|
+
readonly id?: string | undefined;
|
|
131
|
+
readonly _tag: "image";
|
|
132
|
+
readonly pending?: boolean | undefined;
|
|
133
|
+
readonly source?: {
|
|
134
|
+
readonly mediaType: string;
|
|
135
|
+
readonly type: "base64";
|
|
136
|
+
readonly data: string;
|
|
137
|
+
} | {
|
|
138
|
+
readonly url: string;
|
|
139
|
+
readonly type: "http";
|
|
140
|
+
} | undefined;
|
|
141
|
+
} | {
|
|
142
|
+
readonly _tag: "json";
|
|
143
|
+
readonly pending?: boolean | undefined;
|
|
144
|
+
readonly data: string;
|
|
145
|
+
readonly disposition?: string | undefined;
|
|
146
|
+
} | {
|
|
147
|
+
readonly text: string;
|
|
148
|
+
readonly _tag: "proposal";
|
|
149
|
+
readonly pending?: boolean | undefined;
|
|
150
|
+
} | {
|
|
151
|
+
readonly _tag: "reasoning";
|
|
152
|
+
readonly pending?: boolean | undefined;
|
|
153
|
+
readonly reasoningText?: string | undefined;
|
|
154
|
+
readonly redactedText?: string | undefined;
|
|
155
|
+
readonly signature?: string | undefined;
|
|
156
|
+
} | {
|
|
157
|
+
readonly reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
|
|
158
|
+
readonly _tag: "reference";
|
|
159
|
+
readonly pending?: boolean | undefined;
|
|
160
|
+
} | {
|
|
161
|
+
readonly _tag: "select";
|
|
162
|
+
readonly pending?: boolean | undefined;
|
|
163
|
+
readonly options: string[];
|
|
164
|
+
} | {
|
|
165
|
+
readonly _tag: "status";
|
|
166
|
+
readonly pending?: boolean | undefined;
|
|
167
|
+
readonly statusText: string;
|
|
168
|
+
} | {
|
|
169
|
+
readonly text: string;
|
|
170
|
+
readonly _tag: "suggestion";
|
|
171
|
+
readonly pending?: boolean | undefined;
|
|
172
|
+
} | {
|
|
173
|
+
readonly _tag: "stats";
|
|
174
|
+
readonly pending?: boolean | undefined;
|
|
175
|
+
readonly mimeType?: string | undefined;
|
|
176
|
+
readonly message?: string | undefined;
|
|
177
|
+
readonly model?: string | undefined;
|
|
178
|
+
readonly usage?: {
|
|
179
|
+
readonly inputTokens?: number | undefined;
|
|
180
|
+
readonly outputTokens?: number | undefined;
|
|
181
|
+
readonly totalTokens?: number | undefined;
|
|
182
|
+
} | undefined;
|
|
183
|
+
readonly toolCalls?: number | undefined;
|
|
184
|
+
readonly errors?: number | undefined;
|
|
185
|
+
readonly duration?: number | undefined;
|
|
186
|
+
} | {
|
|
187
|
+
readonly text: string;
|
|
188
|
+
readonly _tag: "text";
|
|
189
|
+
readonly pending?: boolean | undefined;
|
|
190
|
+
readonly disposition?: string | undefined;
|
|
191
|
+
readonly mimeType?: string | undefined;
|
|
192
|
+
} | {
|
|
193
|
+
readonly content: string;
|
|
194
|
+
readonly _tag: "summary";
|
|
195
|
+
readonly pending?: boolean | undefined;
|
|
196
|
+
} | {
|
|
197
|
+
readonly _tag: "toolkit";
|
|
198
|
+
readonly pending?: boolean | undefined;
|
|
199
|
+
} | {
|
|
200
|
+
readonly name: string;
|
|
201
|
+
readonly _tag: "toolCall";
|
|
202
|
+
readonly pending?: boolean | undefined;
|
|
203
|
+
readonly toolCallId: string;
|
|
204
|
+
readonly input: string;
|
|
205
|
+
readonly providerExecuted: boolean;
|
|
206
|
+
} | {
|
|
207
|
+
readonly name: string;
|
|
208
|
+
readonly _tag: "toolResult";
|
|
209
|
+
readonly pending?: boolean | undefined;
|
|
210
|
+
readonly toolCallId: string;
|
|
211
|
+
readonly providerExecuted: boolean;
|
|
212
|
+
readonly result?: string | undefined;
|
|
213
|
+
readonly error?: string | undefined;
|
|
214
|
+
} | {
|
|
215
|
+
readonly text: string;
|
|
216
|
+
readonly _tag: "transcript";
|
|
217
|
+
readonly pending?: boolean | undefined;
|
|
218
|
+
readonly started: string;
|
|
219
|
+
};
|
|
220
|
+
}>;
|
|
221
|
+
/**
|
|
222
|
+
* Agent turn started (one LLM generation cycle).
|
|
223
|
+
*/
|
|
224
|
+
export declare const AgentTurnStarted: Trace.EventType<{
|
|
225
|
+
readonly historyLength: number;
|
|
226
|
+
readonly pendingLength: number;
|
|
227
|
+
readonly systemPromptLength: number;
|
|
228
|
+
}>;
|
|
229
|
+
/**
|
|
230
|
+
* Agent turn completed (LLM response received).
|
|
231
|
+
*/
|
|
232
|
+
export declare const AgentTurnCompleted: Trace.EventType<{
|
|
233
|
+
readonly messageCount: number;
|
|
234
|
+
readonly done: boolean;
|
|
235
|
+
}>;
|
|
236
|
+
/**
|
|
237
|
+
* Tool execution started.
|
|
238
|
+
*/
|
|
239
|
+
export declare const ToolCallStarted: Trace.EventType<{
|
|
240
|
+
readonly name: string;
|
|
241
|
+
readonly toolCallId: string;
|
|
242
|
+
}>;
|
|
243
|
+
/**
|
|
244
|
+
* Tool execution completed.
|
|
245
|
+
*/
|
|
246
|
+
export declare const ToolCallCompleted: Trace.EventType<{
|
|
247
|
+
readonly name: string;
|
|
248
|
+
readonly toolCallId: string;
|
|
249
|
+
readonly isError: boolean;
|
|
250
|
+
}>;
|
|
251
|
+
/**
|
|
252
|
+
* Agent process received input (prompt or tool result).
|
|
253
|
+
*/
|
|
254
|
+
export declare const AgentInputReceived: Trace.EventType<{
|
|
255
|
+
readonly inputType: string;
|
|
256
|
+
readonly contentLength: number;
|
|
257
|
+
}>;
|
|
258
|
+
/**
|
|
259
|
+
* Agent process request completed.
|
|
260
|
+
*/
|
|
261
|
+
export declare const AgentRequestCompleted: Trace.EventType<{
|
|
262
|
+
readonly pendingItems: number;
|
|
263
|
+
}>;
|
|
264
|
+
//# sourceMappingURL=tracing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../src/tracing.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAGxC;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;EAU3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;EAQ7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe;;;EAQ1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;EAU5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;EAQ7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB;;EAMhC,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type * as Effect from 'effect/Effect';
|
|
2
2
|
import * as Schema from 'effect/Schema';
|
|
3
|
-
import { type
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { DXN, type SpaceId } from '@dxos/keys';
|
|
3
|
+
import { type Err, Obj, Ref, type Type } from '@dxos/echo';
|
|
4
|
+
import { Database } from '@dxos/echo';
|
|
5
|
+
import { DXN, type ObjectId, type SpaceId } from '@dxos/keys';
|
|
7
6
|
/**
|
|
8
7
|
* @deprecated
|
|
9
8
|
*/
|
|
@@ -11,10 +10,19 @@ export declare const createArtifactElement: (id: ObjectId) => string;
|
|
|
11
10
|
/**
|
|
12
11
|
* A model-friendly way to reference an object.
|
|
13
12
|
* Supports vairous formats that will be normalized to a DXN.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated Use `Ref.Ref(XXX)` instead.
|
|
14
15
|
*/
|
|
15
16
|
export declare const ArtifactId: Schema.Schema<string> & {
|
|
16
17
|
toDXN: (reference: ArtifactId, owningSpaceId?: SpaceId) => DXN;
|
|
17
|
-
resolve: <S extends Type.
|
|
18
|
+
resolve: <S extends Type.AnyEntity>(schema: S, ref: ArtifactId) => Effect.Effect<Schema.Schema.Type<S>, Err.ObjectNotFoundError, Database.Service>;
|
|
18
19
|
};
|
|
19
20
|
export type ArtifactId = Schema.Schema.Type<typeof ArtifactId>;
|
|
21
|
+
/**
|
|
22
|
+
* Schema that decodes ECHO reference object from an LLM-friendly input.
|
|
23
|
+
*/
|
|
24
|
+
export declare const RefFromLLM: Schema.transform<Schema.Schema<string, string, never> & {
|
|
25
|
+
toDXN: (reference: ArtifactId, owningSpaceId?: SpaceId) => DXN;
|
|
26
|
+
resolve: <S extends Type.AnyEntity>(schema: S, ref: ArtifactId) => Effect.Effect<Schema.Schema.Type<S>, Err.ObjectNotFoundError, Database.Service>;
|
|
27
|
+
}, Ref.RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>>;
|
|
20
28
|
//# sourceMappingURL=artifact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../../../src/types/artifact.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../../../src/types/artifact.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,GAAG,EAAmB,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAG/E;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,IAAI,QAAQ,WAA4B,CAAC;AAG/E;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG;IAC/C,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,aAAa,CAAC,EAAE,OAAO,KAAK,GAAG,CAAC;IAC/D,OAAO,EAAE,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,EAChC,MAAM,EAAE,CAAC,EACT,GAAG,EAAE,UAAU,KACZ,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,mBAAmB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CA6CtF,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,UAAU;WAxDd,CAAC,SAAS,EAAE,UAAU,EAAE,aAAa,CAAC,EAAE,OAAO,KAAK,GAAG;aACrD,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,EAChC,MAAM,EAAE,CAAC,EACT,GAAG,EAAE,UAAU,KACZ,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,mBAAmB,EAAE,QAAQ,CAAC,OAAO,CAAC;oHA0DpF,CAAC"}
|