@aparte/core 0.7.1 → 0.9.0
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 +20 -6
- package/dist/client/aparte-client.d.ts +113 -47
- package/dist/client/aparte-client.d.ts.map +1 -1
- package/dist/client/lifecycle-events.d.ts +55 -0
- package/dist/client/lifecycle-events.d.ts.map +1 -0
- package/dist/client/stream-adapter.d.ts +11 -5
- package/dist/client/stream-adapter.d.ts.map +1 -1
- package/dist/client/xml-artifact-feed.d.ts +76 -0
- package/dist/client/xml-artifact-feed.d.ts.map +1 -0
- package/dist/components/bubble/aparte-chat-bubble.d.ts +35 -8
- package/dist/components/bubble/aparte-chat-bubble.d.ts.map +1 -1
- package/dist/components/bubble/bubble-sync.d.ts.map +1 -1
- package/dist/components/chat/aparte-chat.d.ts +0 -6
- package/dist/components/chat/aparte-chat.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer-action.d.ts +18 -3
- package/dist/components/composer/aparte-composer-action.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer-add-attachment.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer-attachments.d.ts +1 -1
- package/dist/components/composer/aparte-composer-attachments.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer-cancel.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer-input.d.ts +0 -2
- package/dist/components/composer/aparte-composer-input.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer-send.d.ts +5 -0
- package/dist/components/composer/aparte-composer-send.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer-toolbar.d.ts +4 -0
- package/dist/components/composer/aparte-composer-toolbar.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer.d.ts +64 -6
- package/dist/components/composer/aparte-composer.d.ts.map +1 -1
- package/dist/components/composer/index.d.ts +1 -1
- package/dist/components/composer/index.d.ts.map +1 -1
- package/dist/components/conversation-list/aparte-conversation-list.d.ts +2 -5
- package/dist/components/conversation-list/aparte-conversation-list.d.ts.map +1 -1
- package/dist/components/conversation-list/index.d.ts +1 -1
- package/dist/components/conversation-list/index.d.ts.map +1 -1
- package/dist/components/elicitation/aparte-elicitation.d.ts +63 -3
- package/dist/components/elicitation/aparte-elicitation.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/status/aparte-chat-status.d.ts +8 -6
- package/dist/components/status/aparte-chat-status.d.ts.map +1 -1
- package/dist/components/viewport/aparte-chat-viewport.d.ts +45 -9
- package/dist/components/viewport/aparte-chat-viewport.d.ts.map +1 -1
- package/dist/config/action-provider.d.ts +4 -4
- package/dist/config/aparte-config.d.ts +124 -41
- package/dist/config/aparte-config.d.ts.map +1 -1
- package/dist/config/attachment-renderer.d.ts +1 -1
- package/dist/config/avatar-provider.d.ts +1 -1
- package/dist/config/config-context.d.ts +66 -11
- package/dist/config/config-context.d.ts.map +1 -1
- package/dist/config/elicitation-field-renderer.d.ts +73 -0
- package/dist/config/elicitation-field-renderer.d.ts.map +1 -0
- package/dist/config/error-renderer.d.ts +1 -1
- package/dist/config/icon-provider.d.ts +2 -2
- package/dist/config/icon-provider.d.ts.map +1 -1
- package/dist/config/index.d.ts +7 -5
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/locale.d.ts +43 -2
- package/dist/config/locale.d.ts.map +1 -1
- package/dist/config/sanitize.d.ts +1 -7
- package/dist/config/sanitize.d.ts.map +1 -1
- package/dist/config/sibling-nav-renderer.d.ts +1 -1
- package/dist/config/skeleton-provider.d.ts +2 -2
- package/dist/config/skeleton-provider.d.ts.map +1 -1
- package/dist/config/status-renderer.d.ts +1 -1
- package/dist/conversations/conversation-controller.d.ts +19 -5
- package/dist/conversations/conversation-controller.d.ts.map +1 -1
- package/dist/conversations/conversation-manager.d.ts +2 -2
- package/dist/conversations/conversation-manager.d.ts.map +1 -1
- package/dist/conversations/index.d.ts +1 -1
- package/dist/conversations/index.d.ts.map +1 -1
- package/dist/conversations/types.d.ts +1 -1
- package/dist/custom-elements.json +8418 -6295
- package/dist/elicitation/index.d.ts +1 -1
- package/dist/elicitation/panel.d.ts +32 -0
- package/dist/elicitation/panel.d.ts.map +1 -1
- package/dist/elicitation/types.d.ts +29 -2
- package/dist/elicitation/types.d.ts.map +1 -1
- package/dist/host/aparte-chat-host.d.ts +3 -3
- package/dist/host/aparte-chat-host.d.ts.map +1 -1
- package/dist/{index-Dn7TH14G.js → index-hQQljwfX.js} +1890 -1222
- package/dist/index-hQQljwfX.js.map +1 -0
- package/dist/index.css +299 -21
- package/dist/index.d.ts +22 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +485 -210
- package/dist/index.js.map +1 -1
- package/dist/index.node.d.ts +23 -13
- package/dist/index.node.d.ts.map +1 -1
- package/dist/index.node.js +56 -46
- package/dist/index.node.js.map +1 -1
- package/dist/interop/element-props.d.ts +1 -1
- package/dist/interop/element-props.d.ts.map +1 -1
- package/dist/parsers/aparte-stream-parser.d.ts +25 -0
- package/dist/parsers/aparte-stream-parser.d.ts.map +1 -1
- package/dist/primitives/index.d.ts +1 -1
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/select/aparte-optgroup.d.ts +15 -4
- package/dist/primitives/select/aparte-optgroup.d.ts.map +1 -1
- package/dist/primitives/select/aparte-option.d.ts +0 -5
- package/dist/primitives/select/aparte-option.d.ts.map +1 -1
- package/dist/primitives/select/aparte-select.d.ts +17 -5
- package/dist/primitives/select/aparte-select.d.ts.map +1 -1
- package/dist/primitives/select/index.d.ts +1 -1
- package/dist/primitives/select/index.d.ts.map +1 -1
- package/dist/renderers/markdown-stream.d.ts +42 -0
- package/dist/renderers/markdown-stream.d.ts.map +1 -0
- package/dist/renderers/segment-renderers.d.ts +20 -14
- package/dist/renderers/segment-renderers.d.ts.map +1 -1
- package/dist/renderers/segments/artifact/binary-file.d.ts +45 -0
- package/dist/renderers/segments/artifact/binary-file.d.ts.map +1 -0
- package/dist/renderers/segments/artifact/card.d.ts +3 -0
- package/dist/renderers/segments/artifact/card.d.ts.map +1 -0
- package/dist/renderers/segments/artifact/preview-document.d.ts +27 -0
- package/dist/renderers/segments/artifact/preview-document.d.ts.map +1 -0
- package/dist/renderers/segments/artifact/shared.d.ts +12 -0
- package/dist/renderers/segments/artifact/shared.d.ts.map +1 -0
- package/dist/renderers/segments/code.d.ts +3 -0
- package/dist/renderers/segments/code.d.ts.map +1 -0
- package/dist/renderers/segments/error.d.ts +3 -0
- package/dist/renderers/segments/error.d.ts.map +1 -0
- package/dist/renderers/segments/file-tree.d.ts +3 -0
- package/dist/renderers/segments/file-tree.d.ts.map +1 -0
- package/dist/renderers/segments/pipeline-waiting.d.ts +3 -0
- package/dist/renderers/segments/pipeline-waiting.d.ts.map +1 -0
- package/dist/renderers/segments/progress.d.ts +3 -0
- package/dist/renderers/segments/progress.d.ts.map +1 -0
- package/dist/renderers/segments/terminal.d.ts +3 -0
- package/dist/renderers/segments/terminal.d.ts.map +1 -0
- package/dist/renderers/segments/text.d.ts +10 -0
- package/dist/renderers/segments/text.d.ts.map +1 -0
- package/dist/renderers/segments/thinking.d.ts +3 -0
- package/dist/renderers/segments/thinking.d.ts.map +1 -0
- package/dist/renderers/segments/tool-call.d.ts +3 -0
- package/dist/renderers/segments/tool-call.d.ts.map +1 -0
- package/dist/runtime/message-repository.d.ts +3 -3
- package/dist/runtime/message-repository.d.ts.map +1 -1
- package/dist/transport/backend-handler.d.ts +19 -7
- package/dist/transport/backend-handler.d.ts.map +1 -1
- package/dist/transport/backend-transport.d.ts +1 -1
- package/dist/transport/backend-transport.d.ts.map +1 -1
- package/dist/transport/direct-transport.d.ts +4 -4
- package/dist/transport/direct-transport.d.ts.map +1 -1
- package/dist/transport/index.d.ts +2 -2
- package/dist/transport/index.d.ts.map +1 -1
- package/dist/transport/types.d.ts +3 -3
- package/dist/types/element-map.d.ts +69 -0
- package/dist/types/element-map.d.ts.map +1 -0
- package/dist/types/event-map.d.ts +84 -23
- package/dist/types/event-map.d.ts.map +1 -1
- package/dist/types/events.d.ts +212 -64
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/model-provider.d.ts +100 -54
- package/dist/types/model-provider.d.ts.map +1 -1
- package/dist/types/models.d.ts +29 -7
- package/dist/types/models.d.ts.map +1 -1
- package/dist/types/segments.d.ts +33 -8
- package/dist/types/segments.d.ts.map +1 -1
- package/dist/types/theming.d.ts +25 -37
- package/dist/types/theming.d.ts.map +1 -1
- package/dist/types/tools.d.ts +60 -15
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/utils/escape.d.ts +46 -0
- package/dist/utils/escape.d.ts.map +1 -0
- package/dist/utils/files-to-attachments.d.ts +18 -1
- package/dist/utils/files-to-attachments.d.ts.map +1 -1
- package/dist/utils/segments.d.ts +174 -0
- package/dist/utils/segments.d.ts.map +1 -0
- package/dist/utils/uuid.d.ts +26 -0
- package/dist/utils/uuid.d.ts.map +1 -0
- package/package.json +3 -5
- package/dist/index-Dn7TH14G.js.map +0 -1
- package/dist/types/providers.d.ts +0 -93
- package/dist/types/providers.d.ts.map +0 -1
package/dist/types/events.d.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* Aparte Events
|
|
3
3
|
* Event interfaces for component communication and control
|
|
4
4
|
*/
|
|
5
|
-
import type {
|
|
5
|
+
import type { AparteMessage } from './models.js';
|
|
6
6
|
import type { AparteUsage } from './chat.js';
|
|
7
|
+
import type { AparteError } from './errors.js';
|
|
7
8
|
/**
|
|
8
9
|
* Detail payload for aparte-send custom event
|
|
9
10
|
* Emitted when user sends a message via the input component
|
|
@@ -23,71 +24,38 @@ export interface AparteSendEventDetail {
|
|
|
23
24
|
files?: File[];
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
26
|
-
* Detail payload for aparte-
|
|
27
|
-
*
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
messageId: string;
|
|
32
|
-
/** Token chunk content */
|
|
33
|
-
chunk: string;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Control event for external packages to pilot the Core
|
|
37
|
-
* Allows packages like API adapters or plugins to update message states
|
|
38
|
-
* without direct coupling to the core implementation
|
|
27
|
+
* Detail payload for `aparte-message-done`.
|
|
28
|
+
* Dispatched when a turn finishes normally. Carries token usage when the provider
|
|
29
|
+
* reports it.
|
|
30
|
+
*
|
|
31
|
+
* @event aparte-message-done
|
|
39
32
|
*/
|
|
40
|
-
export interface
|
|
41
|
-
/** Target message ID for the control action */
|
|
42
|
-
messageId: string;
|
|
43
|
-
/** New status to apply to the message */
|
|
44
|
-
status: AparteStatus;
|
|
33
|
+
export interface AparteMessageDoneEventDetail {
|
|
45
34
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
35
|
+
* Id of the `<aparte-chat>` host that produced this turn, when it has one.
|
|
36
|
+
*
|
|
37
|
+
* Stamped by the client's lifecycle dispatcher on EVERY lifecycle event so
|
|
38
|
+
* several chats on one page stay isolated — a composer reacts only to its own
|
|
39
|
+
* host's turn. It was undeclared here while being sent at runtime, and the
|
|
40
|
+
* dispatcher takes `Record<string, unknown>`, so the compiler could not notice.
|
|
48
41
|
*/
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Event detail for message lifecycle changes
|
|
53
|
-
* Emitted when a message is added, updated, or removed
|
|
54
|
-
*/
|
|
55
|
-
export interface AparteMessageEventDetail {
|
|
56
|
-
/** The message that changed */
|
|
42
|
+
targetId?: string;
|
|
57
43
|
messageId: string;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
metadata?: Record<string, unknown>;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Event detail for status changes
|
|
65
|
-
* Emitted when the global or message status changes
|
|
66
|
-
*/
|
|
67
|
-
export interface AparteStatusEventDetail {
|
|
68
|
-
/** Previous status */
|
|
69
|
-
previousStatus: AparteStatus;
|
|
70
|
-
/** New status */
|
|
71
|
-
currentStatus: AparteStatus;
|
|
72
|
-
/** Optional message ID if status is message-specific */
|
|
73
|
-
messageId?: string;
|
|
44
|
+
role: string;
|
|
45
|
+
/** Token usage for the completed response, if reported by the provider. */
|
|
46
|
+
usage?: AparteUsage;
|
|
74
47
|
}
|
|
75
48
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
49
|
+
* Detail payload for `aparte-model-change`.
|
|
50
|
+
* Dispatched by `@aparte/plugin-model-selector` when the user picks a different
|
|
51
|
+
* provider or model — the clearest cross-package contract in the set.
|
|
52
|
+
*
|
|
53
|
+
* Its `@event` tag used to sit above `AparteMessageDoneEventDetail`'s doc block
|
|
54
|
+
* instead, so this interface had no documentation of its own and the other one
|
|
55
|
+
* claimed to describe a different event.
|
|
78
56
|
*
|
|
79
57
|
* @event aparte-model-change
|
|
80
58
|
*/
|
|
81
|
-
/**
|
|
82
|
-
* Emitted when a message response completes (aparte-message-done).
|
|
83
|
-
* Carries token usage when the provider reports it.
|
|
84
|
-
*/
|
|
85
|
-
export interface AparteMessageDoneEventDetail {
|
|
86
|
-
messageId: string;
|
|
87
|
-
role: string;
|
|
88
|
-
/** Token usage for the completed response, if reported by the provider. */
|
|
89
|
-
usage?: AparteUsage;
|
|
90
|
-
}
|
|
91
59
|
export interface AparteModelChangeEventDetail {
|
|
92
60
|
/** Selected provider ID (e.g., 'openrouter', 'gemini') */
|
|
93
61
|
providerId?: string;
|
|
@@ -206,14 +174,19 @@ export interface AparteArtifactReadyEventDetail {
|
|
|
206
174
|
content: string;
|
|
207
175
|
}
|
|
208
176
|
/**
|
|
209
|
-
* Detail payload for `aparte-artifact-
|
|
210
|
-
* Dispatched by
|
|
211
|
-
*
|
|
212
|
-
*
|
|
177
|
+
* Detail payload for `aparte-artifact-redownload`.
|
|
178
|
+
* Dispatched by an artifact card's Download button when the artifact is a BINARY
|
|
179
|
+
* kind: core cannot produce the bytes itself, so it asks the host to re-run the
|
|
180
|
+
* generation and save the file. Enable it with
|
|
181
|
+
* `setHostHandlers({ artifactRedownload: true })` — ratified decision #8, tier (b).
|
|
182
|
+
*
|
|
183
|
+
* It was declared for `aparte-artifact-open` and said so, an event that exists
|
|
184
|
+
* nowhere in the repo. The shape is field-for-field what the Download button really
|
|
185
|
+
* dispatches, so the type moved rather than being deleted.
|
|
213
186
|
*
|
|
214
|
-
* @event aparte-artifact-
|
|
187
|
+
* @event aparte-artifact-redownload
|
|
215
188
|
*/
|
|
216
|
-
export interface
|
|
189
|
+
export interface AparteArtifactRedownloadEventDetail {
|
|
217
190
|
/** Owning segment id */
|
|
218
191
|
segmentId: string;
|
|
219
192
|
/** MIME type */
|
|
@@ -255,7 +228,7 @@ export interface AparteFeedbackEventDetail {
|
|
|
255
228
|
}
|
|
256
229
|
/**
|
|
257
230
|
* Detail payload for `aparte-action`.
|
|
258
|
-
* Dispatched by a custom action button (registered via `
|
|
231
|
+
* Dispatched by a custom action button (registered via `aparteGlobalConfig.registerAction`)
|
|
259
232
|
* in either the composer or a message-bubble toolbar. Apps listen (bubbling) and
|
|
260
233
|
* dispatch on `actionId`. Mirrors the built-in bubble events (retry/feedback) so
|
|
261
234
|
* custom actions are wired the same way in every framework and in vanilla.
|
|
@@ -287,4 +260,179 @@ export interface AparteMessageInfoEventDetail {
|
|
|
287
260
|
/** Token usage + timing for the message, when available. */
|
|
288
261
|
usage?: AparteUsage;
|
|
289
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* Detail payload for `aparte-message-start`.
|
|
265
|
+
* Dispatched when a turn begins, before the first token. The composer and the
|
|
266
|
+
* conversation controller both use it to enter their streaming state.
|
|
267
|
+
*
|
|
268
|
+
* @event aparte-message-start
|
|
269
|
+
*/
|
|
270
|
+
export interface AparteMessageStartEventDetail {
|
|
271
|
+
/** Host element id, when the `<aparte-chat>` has one. */
|
|
272
|
+
targetId?: string;
|
|
273
|
+
/** Id of the assistant message about to stream. */
|
|
274
|
+
messageId: string;
|
|
275
|
+
/** Role of the message being created — `'assistant'` in every current path. */
|
|
276
|
+
role: string;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Detail payload for `aparte-message-error`.
|
|
280
|
+
* Dispatched when a turn fails. Four core components listen for it, and it is the
|
|
281
|
+
* event `guides/troubleshooting.md` tells you to bind to surface a failure.
|
|
282
|
+
*
|
|
283
|
+
* @event aparte-message-error
|
|
284
|
+
*/
|
|
285
|
+
export interface AparteMessageErrorEventDetail {
|
|
286
|
+
/** Host element id, when the `<aparte-chat>` has one. */
|
|
287
|
+
targetId?: string;
|
|
288
|
+
/** Id of the message that failed. */
|
|
289
|
+
messageId: string;
|
|
290
|
+
/** The failure, with its `code` — not a string, unlike `aparte-compact-error`. */
|
|
291
|
+
error: AparteError;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Detail payload for `aparte-message-aborted`.
|
|
295
|
+
* Dispatched when the user stops a turn.
|
|
296
|
+
*
|
|
297
|
+
* @event aparte-message-aborted
|
|
298
|
+
*/
|
|
299
|
+
export interface AparteMessageAbortedEventDetail {
|
|
300
|
+
/** Host element id, when the `<aparte-chat>` has one. */
|
|
301
|
+
targetId?: string;
|
|
302
|
+
/**
|
|
303
|
+
* Id of the aborted message — OPTIONAL, and that is not laziness: the composer
|
|
304
|
+
* dispatches this event on its own with only a `targetId`, because a user can
|
|
305
|
+
* press Stop during the pre-flight window before any message id exists.
|
|
306
|
+
*/
|
|
307
|
+
messageId?: string;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Detail payload for `aparte-abort` — a COMMAND, not a notification.
|
|
311
|
+
*
|
|
312
|
+
* `AparteClient` listens for it on `window`; a bring-your-own-composer consumer
|
|
313
|
+
* dispatches it to stop a stream. Nothing in core dispatches it on the consumer's
|
|
314
|
+
* behalf, which is exactly why its shape had to be documented somewhere.
|
|
315
|
+
*
|
|
316
|
+
* @event aparte-abort
|
|
317
|
+
*/
|
|
318
|
+
export interface AparteAbortEventDetail {
|
|
319
|
+
/** Which chat to stop. Omit on a single-chat page. */
|
|
320
|
+
targetId?: string;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Detail payload for `aparte-compact` — a COMMAND the consumer dispatches on
|
|
324
|
+
* `window` to ask the client to summarise the conversation so far.
|
|
325
|
+
*
|
|
326
|
+
* Core listens and never dispatches it, so this type describes what YOU produce.
|
|
327
|
+
*
|
|
328
|
+
* @event aparte-compact
|
|
329
|
+
*/
|
|
330
|
+
export interface AparteCompactEventDetail {
|
|
331
|
+
/** Which chat to compact. Omit on a single-chat page. */
|
|
332
|
+
targetId?: string;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Detail payload for `aparte-compact-done`.
|
|
336
|
+
*
|
|
337
|
+
* A union flattened to optional fields, because the two outcomes carry different
|
|
338
|
+
* payloads and a consumer cannot guess which: nothing to compact sends
|
|
339
|
+
* `{ skipped: true }`, a real compaction sends `{ summary, kept }`.
|
|
340
|
+
*
|
|
341
|
+
* @event aparte-compact-done
|
|
342
|
+
*/
|
|
343
|
+
export interface AparteCompactDoneEventDetail {
|
|
344
|
+
/** `true` when there was nothing worth summarising; the other two are absent. */
|
|
345
|
+
skipped?: boolean;
|
|
346
|
+
/** The summary that replaced the compacted turns. */
|
|
347
|
+
summary?: string;
|
|
348
|
+
/** How many messages were kept verbatim after the summary. */
|
|
349
|
+
kept?: number;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Detail payload for `aparte-compact-error`.
|
|
353
|
+
*
|
|
354
|
+
* Note the asymmetry with `aparte-message-error`, which is deliberate rather than
|
|
355
|
+
* hidden: `error` here is a plain string, not an `AparteError`.
|
|
356
|
+
*
|
|
357
|
+
* @event aparte-compact-error
|
|
358
|
+
*/
|
|
359
|
+
export interface AparteCompactErrorEventDetail {
|
|
360
|
+
/** Human-readable failure reason. */
|
|
361
|
+
error: string;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Detail payload for `aparte-attachment-preview`.
|
|
365
|
+
* Dispatched when a user clicks an image tile, once
|
|
366
|
+
* `setHostHandlers({ attachmentPreview: true })` has declared that you will open
|
|
367
|
+
* a lightbox. Without the handler the tile is not interactive at all.
|
|
368
|
+
*
|
|
369
|
+
* @event aparte-attachment-preview
|
|
370
|
+
*/
|
|
371
|
+
export interface AparteAttachmentPreviewEventDetail {
|
|
372
|
+
/** Object URL or remote URL of the image. */
|
|
373
|
+
url: string;
|
|
374
|
+
/** File name, or `''` when the attachment carries none. */
|
|
375
|
+
name: string;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Detail payload for `aparte-terminal-run`.
|
|
379
|
+
* Dispatched by a terminal segment's Run button, once
|
|
380
|
+
* `setHostHandlers({ terminalRun: true })` has declared that you will execute it.
|
|
381
|
+
*
|
|
382
|
+
* @event aparte-terminal-run
|
|
383
|
+
*/
|
|
384
|
+
export interface AparteTerminalRunEventDetail {
|
|
385
|
+
/** Owning segment id. */
|
|
386
|
+
segmentId: string;
|
|
387
|
+
/**
|
|
388
|
+
* Id of the message the terminal belongs to.
|
|
389
|
+
*
|
|
390
|
+
* Without it this event was not resolvable: a consumer knew a command was
|
|
391
|
+
* asked for and could not say which turn asked. Absent only when the segment
|
|
392
|
+
* reached the renderer without passing through `addSegment` (an app rendering
|
|
393
|
+
* a segment it built by hand), because core stamps identity exactly there.
|
|
394
|
+
*/
|
|
395
|
+
messageId?: string;
|
|
396
|
+
/** The command text the user asked to run. */
|
|
397
|
+
command: string;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Detail payload for `aparte-file-gen-ready` — dispatched by YOU, not by core.
|
|
401
|
+
*
|
|
402
|
+
* A binary artifact (pdf, xlsx, docx…) is generated by running the model's code in
|
|
403
|
+
* a sandbox, which core deliberately does not do. Core renders a "Running sandbox…"
|
|
404
|
+
* card, listens on `window`, and swaps in the preview when this arrives. Nothing in
|
|
405
|
+
* the repo dispatches it: the contract is entirely yours to fulfil, which is why
|
|
406
|
+
* this type is the one most worth having.
|
|
407
|
+
*
|
|
408
|
+
* @event aparte-file-gen-ready
|
|
409
|
+
*/
|
|
410
|
+
export interface AparteFileGenReadyEventDetail {
|
|
411
|
+
/** Must match the artifact segment's id, or the event is ignored. */
|
|
412
|
+
segmentId: string;
|
|
413
|
+
/** File name to show and to download as. */
|
|
414
|
+
filename: string;
|
|
415
|
+
/** Size in bytes, for the card's label. */
|
|
416
|
+
bytes: number;
|
|
417
|
+
/** MIME type of the produced file. */
|
|
418
|
+
mime: string;
|
|
419
|
+
/** The file itself. */
|
|
420
|
+
buffer: Uint8Array | ArrayBuffer;
|
|
421
|
+
/** Optional HTML preview to show inside the card; `null` for none. */
|
|
422
|
+
previewHtml: string | null;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Detail payload for `aparte-file-gen-error` — dispatched by YOU.
|
|
426
|
+
* Its twin: without it a failed sandbox run leaves the card spinning forever.
|
|
427
|
+
*
|
|
428
|
+
* @event aparte-file-gen-error
|
|
429
|
+
*/
|
|
430
|
+
export interface AparteFileGenErrorEventDetail {
|
|
431
|
+
/** Must match the artifact segment's id. */
|
|
432
|
+
segmentId: string;
|
|
433
|
+
/** Which stage failed, shown in the inline error. Defaults to `'exec'`. */
|
|
434
|
+
phase?: string;
|
|
435
|
+
/** The message shown to the user. Defaults to `'Unknown error'`. */
|
|
436
|
+
error?: string;
|
|
437
|
+
}
|
|
290
438
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/types/events.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/types/events.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OA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AAM,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC1C,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,16 +7,15 @@
|
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
9
|
export type { AparteStatus, AparteBubbleRole, AparteAttachment, AparteMessage, AparteMessageBranch, AparteBubbleActionsConfig, AparteBubbleActionName, AparteViewportConfig, AparteInputConfig } from './models.js';
|
|
10
|
-
export type { AparteSendEventDetail,
|
|
10
|
+
export type { AparteSendEventDetail, AparteSiblingInfo, AparteBranchNavigateEventDetail, ApartePathChangedEventDetail, AparteRetryEventDetail, AparteEditEventDetail, AparteFeedbackEventDetail, AparteActionEventDetail } from './events.js';
|
|
11
11
|
export type { AparteContentParser, AparteParserRegistry } from './parsers.js';
|
|
12
|
-
export type { AparteSegmentBase, AparteTextSegment, AparteThinkingSegment, AparteCodeSegment, AparteDiffSegment, AparteDiffHunk, AparteDiffLine, AparteTerminalSegment, AparteFileTreeSegment, AparteFileNode, AparteImageSegment, ApartePreviewSegment, AparteErrorSegment, AparteProgressSegment, AparteSegment, AparteCustomSegment, AparteToolCallSegment, AparteArtifactSegment, AparteSegmentType, AparteSegmentRenderer,
|
|
13
|
-
export type { AparteDataProvider, AparteStreamProvider, AparteMessageStore, AparteControlHandler } from './providers.js';
|
|
12
|
+
export type { AparteSegmentBase, AparteTextSegment, AparteThinkingSegment, AparteCodeSegment, AparteDiffSegment, AparteDiffHunk, AparteDiffLine, AparteTerminalSegment, AparteFileTreeSegment, AparteFileNode, AparteImageSegment, ApartePreviewSegment, AparteErrorSegment, AparteProgressSegment, AparteSegment, AparteCustomSegment, AparteToolCallSegment, AparteArtifactSegment, AparteSegmentType, AparteSegmentRenderer, AparteSegmentUpdateEventDetail } from './segments.js';
|
|
14
13
|
export type { AparteThemeVariables } from './theming.js';
|
|
15
14
|
export type { AparteAIModel, AparteAIProvider, AparteAIProviderConfigField, AparteAIProviderConfigSchema, AparteModelConfig, ModelStatus, ModelLoadProgress } from './model-provider.js';
|
|
16
15
|
export type { AparteChatRequest, AparteChatResponse, AparteChatMessage, AparteContentPart, AparteTextPart, AparteImagePart, AparteFilePart, AparteStreamEvent, AparteStreamEventMap, AparteUsage } from './chat.js';
|
|
17
16
|
export { contentToText } from './chat.js';
|
|
18
|
-
export type { AparteTool, AparteToolCall, AparteToolResult, AparteToolHandler, AparteToolRenderer, AparteToolDecisionDetail, AparteToolApprovalRequestDetail,
|
|
17
|
+
export type { AparteTool, AparteToolCall, AparteToolResult, AparteToolHandler, AparteToolContext, AparteToolRenderer, AparteToolDecisionDetail, AparteToolApprovalRequestDetail, } from './tools.js';
|
|
19
18
|
export { AparteErrorCode, AparteError } from './errors.js';
|
|
20
|
-
export type { AparteModelChangeEventDetail, AparteMessageDoneEventDetail, AparteMessageInfoEventDetail, AparteArtifactStartEventDetail, AparteArtifactDeltaEventDetail, AparteArtifactReadyEventDetail,
|
|
19
|
+
export type { AparteModelChangeEventDetail, AparteMessageDoneEventDetail, AparteMessageStartEventDetail, AparteMessageErrorEventDetail, AparteMessageAbortedEventDetail, AparteAbortEventDetail, AparteCompactEventDetail, AparteCompactDoneEventDetail, AparteCompactErrorEventDetail, AparteAttachmentPreviewEventDetail, AparteTerminalRunEventDetail, AparteFileGenReadyEventDetail, AparteFileGenErrorEventDetail, AparteMessageInfoEventDetail, AparteArtifactStartEventDetail, AparteArtifactDeltaEventDetail, AparteArtifactReadyEventDetail, AparteArtifactRedownloadEventDetail } from './events.js';
|
|
21
20
|
export type { AparteChatImperativeApi } from './imperative-api.js';
|
|
22
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,YAAY,EACR,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACpB,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,qBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,YAAY,EACR,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACpB,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,qBAAqB,EACrB,iBAAiB,EACjB,+BAA+B,EAC/B,4BAA4B,EAC5B,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EAC1B,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,mBAAmB,EACnB,oBAAoB,EACvB,MAAM,cAAc,CAAC;AAMtB,YAAY,EACR,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,8BAA8B,EACjC,MAAM,eAAe,CAAC;AAgBvB,YAAY,EACR,oBAAoB,EACvB,MAAM,cAAc,CAAC;AAMtB,YAAY,EACR,aAAa,EACb,gBAAgB,EAChB,2BAA2B,EAC3B,4BAA4B,EAC5B,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACpB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EACR,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,YAAY,EACR,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,+BAA+B,GAClC,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE3D,YAAY,EACR,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B,EAC/B,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,kCAAkC,EAClC,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,EAC7B,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,mCAAmC,EACtC,MAAM,aAAa,CAAC;AAGrB,YAAY,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -113,26 +113,13 @@ export interface AparteAIProviderConfigSchema {
|
|
|
113
113
|
fields: AparteAIProviderConfigField[];
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
|
-
*
|
|
116
|
+
* What every provider carries, whichever half of the contract it implements:
|
|
117
|
+
* an identity, brand metadata, and a synchronous model list.
|
|
117
118
|
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* ```typescript
|
|
122
|
-
* const provider: AparteAIProvider = {
|
|
123
|
-
* id: 'openrouter',
|
|
124
|
-
* getMetadata: () => ({
|
|
125
|
-
* name: 'OpenRouter',
|
|
126
|
-
* id: 'openrouter',
|
|
127
|
-
* icon: '<svg>...</svg>',
|
|
128
|
-
* color: '#000000',
|
|
129
|
-
* helpUrl: 'https://openrouter.ai/keys'
|
|
130
|
-
* }),
|
|
131
|
-
* getModels: () => [...]
|
|
132
|
-
* };
|
|
133
|
-
* ```
|
|
119
|
+
* On its own this is **not** a usable provider — see {@link AparteAIProvider},
|
|
120
|
+
* which requires one of the two execution surfaces as well.
|
|
134
121
|
*/
|
|
135
|
-
export interface
|
|
122
|
+
export interface AparteAIProviderCore {
|
|
136
123
|
/** Unique identifier for the provider */
|
|
137
124
|
id: string;
|
|
138
125
|
/**
|
|
@@ -144,7 +131,7 @@ export interface AparteAIProvider {
|
|
|
144
131
|
* list). Never return a Promise here — it would be ignored by
|
|
145
132
|
* `getCurrentModel()`, silently disabling capability gates such as
|
|
146
133
|
* `function_calling` (tools). For async fetching implement
|
|
147
|
-
* {@link fetchModels} instead, which `
|
|
134
|
+
* {@link fetchModels} instead, which `aparteGlobalConfig.refreshProviderModels()`
|
|
148
135
|
* and the model-selector consume. Note: a provider without `fetchModels`
|
|
149
136
|
* shows no models in the model-selector — `getModels()` is only read for
|
|
150
137
|
* the current-model lookup.
|
|
@@ -157,41 +144,6 @@ export interface AparteAIProvider {
|
|
|
157
144
|
* @param config - Optional API key or full configuration object for authenticated requests
|
|
158
145
|
*/
|
|
159
146
|
fetchModels?(config?: string | Record<string, string>): Promise<AparteAIModel[]>;
|
|
160
|
-
/**
|
|
161
|
-
* Execute a chat request directly. **Optional** — HTTP providers expose the
|
|
162
|
-
* format-adapter surface below and are driven by an `AparteTransport` instead;
|
|
163
|
-
* providers that own their own I/O (Transformers.js locally, or a bridge
|
|
164
|
-
* wrapping an external SDK) implement `chat`, to which `DirectTransport`
|
|
165
|
-
* delegates.
|
|
166
|
-
*
|
|
167
|
-
* @param request - The chat request options (messages, model, etc.)
|
|
168
|
-
* @param config - Optional API key or full configuration object
|
|
169
|
-
* @param ctx - Transport context (structurally mirrors `AparteTransportContext`;
|
|
170
|
-
* inline to avoid a type cycle with `transport/types`). `signal` aborts the
|
|
171
|
-
* in-flight call — bridges MUST honor it so a user "stop" cancels the
|
|
172
|
-
* underlying request, not just the local read.
|
|
173
|
-
* @returns ReadableStream for streaming or string for full response
|
|
174
|
-
*/
|
|
175
|
-
chat?(request: AparteChatRequest, config?: string | Record<string, string>, ctx?: {
|
|
176
|
-
providerId: string;
|
|
177
|
-
signal?: AbortSignal;
|
|
178
|
-
}): Promise<AparteChatResponse>;
|
|
179
|
-
/** Build the vendor HTTP request from an Aparte request (auth injected by the transport). */
|
|
180
|
-
buildRequest?(request: AparteChatRequest): {
|
|
181
|
-
path: string;
|
|
182
|
-
body: unknown;
|
|
183
|
-
headers?: Record<string, string>;
|
|
184
|
-
};
|
|
185
|
-
/** Vendor auth headers for a resolved key (browser-direct only). */
|
|
186
|
-
authHeaders?(key: string): Record<string, string>;
|
|
187
|
-
/** Vendor auth as URL query params for a resolved key (e.g. Gemini `?key=`). */
|
|
188
|
-
authQuery?(key: string): Record<string, string>;
|
|
189
|
-
/** Base URL for browser-direct calls (overridable per request via config). */
|
|
190
|
-
defaultEndpoint?: string;
|
|
191
|
-
/** Parse a streaming vendor response body into unified events. */
|
|
192
|
-
parseStream?(body: ReadableStream<Uint8Array>): ReadableStream<AparteStreamEvent>;
|
|
193
|
-
/** Extract text from a non-streaming vendor JSON response. */
|
|
194
|
-
parseText?(json: unknown): string;
|
|
195
147
|
/**
|
|
196
148
|
* Optional. Returns the availability status of a model.
|
|
197
149
|
*
|
|
@@ -219,6 +171,100 @@ export interface AparteAIProvider {
|
|
|
219
171
|
*/
|
|
220
172
|
deleteModel?(modelId: string): Promise<void>;
|
|
221
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Execution surface for a provider that **owns its own I/O** — Transformers.js
|
|
176
|
+
* running locally, or a bridge wrapping an external SDK. `AparteDirectTransport`
|
|
177
|
+
* delegates to `chat()` and stays out of the way.
|
|
178
|
+
*/
|
|
179
|
+
export interface AparteAIProviderChat {
|
|
180
|
+
/**
|
|
181
|
+
* @param request - The chat request options (messages, model, etc.)
|
|
182
|
+
* @param config - Optional API key or full configuration object
|
|
183
|
+
* @param ctx - Transport context (structurally mirrors `AparteTransportContext`;
|
|
184
|
+
* inline to avoid a type cycle with `transport/types`). `signal` aborts the
|
|
185
|
+
* in-flight call — bridges MUST honor it so a user "stop" cancels the
|
|
186
|
+
* underlying request, not just the local read.
|
|
187
|
+
* @returns ReadableStream for streaming or string for full response
|
|
188
|
+
*/
|
|
189
|
+
chat(request: AparteChatRequest, config?: string | Record<string, string>, ctx?: {
|
|
190
|
+
providerId: string;
|
|
191
|
+
signal?: AbortSignal;
|
|
192
|
+
}): Promise<AparteChatResponse>;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Execution surface for a provider that only **shapes payloads** (transport ⊥
|
|
196
|
+
* format): an `AparteTransport` performs the call and handles auth, and the
|
|
197
|
+
* provider builds the request and parses the stream. See `src/transport/`.
|
|
198
|
+
*/
|
|
199
|
+
export interface AparteAIProviderFormat {
|
|
200
|
+
/** Base URL for browser-direct calls (overridable per request via config). */
|
|
201
|
+
defaultEndpoint: string;
|
|
202
|
+
/** Build the vendor HTTP request from an Aparte request (auth injected by the transport). */
|
|
203
|
+
buildRequest(request: AparteChatRequest): {
|
|
204
|
+
path: string;
|
|
205
|
+
body: unknown;
|
|
206
|
+
headers?: Record<string, string>;
|
|
207
|
+
};
|
|
208
|
+
/** Parse a streaming vendor response body into unified events. */
|
|
209
|
+
parseStream(body: ReadableStream<Uint8Array>): ReadableStream<AparteStreamEvent>;
|
|
210
|
+
/** Extract text from a non-streaming vendor JSON response. */
|
|
211
|
+
parseText?(json: unknown): string;
|
|
212
|
+
}
|
|
213
|
+
/** Both ways a format adapter can present a resolved key. At least one is required. */
|
|
214
|
+
export interface AparteAIProviderAuthMembers {
|
|
215
|
+
/** Vendor auth headers for a resolved key (browser-direct only). */
|
|
216
|
+
authHeaders?(key: string): Record<string, string>;
|
|
217
|
+
/** Vendor auth as URL query params for a resolved key (e.g. Gemini `?key=`). */
|
|
218
|
+
authQuery?(key: string): Record<string, string>;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* A format adapter with no way to present a key cannot be called, so the union
|
|
222
|
+
* demands one of the two — mirroring `isFormatAdapter`, which accepts either.
|
|
223
|
+
*/
|
|
224
|
+
export type AparteAIProviderAuth = (AparteAIProviderAuthMembers & {
|
|
225
|
+
authHeaders(key: string): Record<string, string>;
|
|
226
|
+
}) | (AparteAIProviderAuthMembers & {
|
|
227
|
+
authQuery(key: string): Record<string, string>;
|
|
228
|
+
});
|
|
229
|
+
/**
|
|
230
|
+
* An AI provider (e.g. OpenRouter, OpenAI, Transformers.js).
|
|
231
|
+
*
|
|
232
|
+
* A **union, not one interface**, because there are two mutually sufficient ways
|
|
233
|
+
* to be a provider and the compiler should say which one you implemented. It used
|
|
234
|
+
* to be a single interface with three required members and fifteen optional ones,
|
|
235
|
+
* discriminated at RUNTIME by `isFormatAdapter()` — so `{ id, getMetadata,
|
|
236
|
+
* getModels }` typechecked, registered, and then failed on the first message with
|
|
237
|
+
* nothing at build time to warn you.
|
|
238
|
+
*
|
|
239
|
+
* Every member of both surfaces stays reachable on the union (optional on the arm
|
|
240
|
+
* that does not require it), so runtime probes like `typeof p.buildRequest ===
|
|
241
|
+
* 'function'` and `isFormatAdapter()` narrowing keep working unchanged. A provider
|
|
242
|
+
* implementing both surfaces is valid and satisfies the format arm.
|
|
243
|
+
*
|
|
244
|
+
* @example A format adapter — a transport does the call
|
|
245
|
+
* ```typescript
|
|
246
|
+
* const provider: AparteAIProvider = {
|
|
247
|
+
* id: 'openrouter',
|
|
248
|
+
* getMetadata: () => ({ name: 'OpenRouter', id: 'openrouter', icon: '<svg/>', color: '#000' }),
|
|
249
|
+
* getModels: () => [],
|
|
250
|
+
* defaultEndpoint: 'https://openrouter.ai/api/v1',
|
|
251
|
+
* buildRequest: (req) => ({ path: '/chat/completions', body: req }),
|
|
252
|
+
* authHeaders: (key) => ({ Authorization: `Bearer ${key}` }),
|
|
253
|
+
* parseStream: (body) => body as unknown as ReadableStream<AparteStreamEvent>,
|
|
254
|
+
* };
|
|
255
|
+
* ```
|
|
256
|
+
*
|
|
257
|
+
* @example A provider owning its own I/O
|
|
258
|
+
* ```typescript
|
|
259
|
+
* const local: AparteAIProvider = {
|
|
260
|
+
* id: 'transformers',
|
|
261
|
+
* getMetadata: () => ({ name: 'Transformers.js', id: 'transformers', icon: '<svg/>', color: '#000' }),
|
|
262
|
+
* getModels: () => [],
|
|
263
|
+
* chat: async (request) => runLocally(request),
|
|
264
|
+
* };
|
|
265
|
+
* ```
|
|
266
|
+
*/
|
|
267
|
+
export type AparteAIProvider = (AparteAIProviderCore & AparteAIProviderFormat & AparteAIProviderAuth & Partial<AparteAIProviderChat>) | (AparteAIProviderCore & AparteAIProviderChat & Partial<AparteAIProviderFormat> & AparteAIProviderAuthMembers);
|
|
222
268
|
/**
|
|
223
269
|
* Configuration options for model selection behavior.
|
|
224
270
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-provider.d.ts","sourceRoot":"","sources":["../../src/types/model-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAMrF;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,aAAa;IAC1B,6EAA6E;IAC7E,EAAE,EAAE,MAAM,CAAC;IAEX,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IAEb,6CAA6C;IAC7C,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,mDAAmD;IACnD,OAAO,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAClB,CAAC;IAEF,gCAAgC;IAChC,YAAY,CAAC,EAAE,CAAC,QAAQ,GAAG,kBAAkB,GAAG,WAAW,GAAG,MAAM,GAA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