@aparte/core 0.13.1 → 0.14.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 +2 -2
- package/dist/client/aparte-client.d.ts +36 -35
- package/dist/client/aparte-client.d.ts.map +1 -1
- package/dist/client/stream-adapter.d.ts +37 -145
- package/dist/client/stream-adapter.d.ts.map +1 -1
- package/dist/components/bubble/aparte-chat-bubble.d.ts +10 -2
- package/dist/components/bubble/aparte-chat-bubble.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer-add-attachment.d.ts +6 -6
- package/dist/components/composer/aparte-composer-add-attachment.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer-input.d.ts +9 -1
- package/dist/components/composer/aparte-composer-input.d.ts.map +1 -1
- package/dist/components/composer/aparte-composer.d.ts +12 -3
- package/dist/components/composer/aparte-composer.d.ts.map +1 -1
- package/dist/components/context/aparte-context.d.ts +81 -0
- package/dist/components/context/aparte-context.d.ts.map +1 -0
- package/dist/components/context/index.d.ts +3 -0
- package/dist/components/context/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/suggestions/aparte-suggestions.d.ts +95 -0
- package/dist/components/suggestions/aparte-suggestions.d.ts.map +1 -0
- package/dist/components/suggestions/index.d.ts +3 -0
- package/dist/components/suggestions/index.d.ts.map +1 -0
- package/dist/components/viewport/aparte-chat-viewport.d.ts +35 -7
- package/dist/components/viewport/aparte-chat-viewport.d.ts.map +1 -1
- package/dist/config/aparte-config.d.ts +1 -21
- package/dist/config/aparte-config.d.ts.map +1 -1
- package/dist/config/index.d.ts +0 -2
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/locale.d.ts +30 -1
- package/dist/config/locale.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 +9 -57
- package/dist/conversations/types.d.ts.map +1 -1
- package/dist/custom-elements.json +7818 -7479
- package/dist/generated/element-attributes.d.ts +34 -6
- package/dist/generated/element-attributes.d.ts.map +1 -1
- package/dist/{glyphs-QXfbL3n_.js → glyphs-B3BZ2TIb.js} +21 -21
- package/dist/glyphs-B3BZ2TIb.js.map +1 -0
- package/dist/host/aparte-chat-host.d.ts +1 -1
- package/dist/host/aparte-chat-host.d.ts.map +1 -1
- package/dist/icons/extended.d.ts +87 -85
- package/dist/icons/extended.d.ts.map +1 -1
- package/dist/icons/glyphs.d.ts +53 -50
- package/dist/icons/glyphs.d.ts.map +1 -1
- package/dist/icons.js +41 -41
- package/dist/icons.js.map +1 -1
- package/dist/index.css +512 -170
- package/dist/index.d.ts +10 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +593 -183
- package/dist/index.js.map +1 -1
- package/dist/index.node.d.ts +6 -4
- package/dist/index.node.d.ts.map +1 -1
- package/dist/index.node.js +56 -56
- package/dist/index.node.js.map +1 -1
- package/dist/{is-awaiting-reply-CWp1ffHh.js → is-awaiting-reply-BZ_iJ3s3.js} +175 -994
- package/dist/is-awaiting-reply-BZ_iJ3s3.js.map +1 -0
- package/dist/parsers/aparte-stream-parser.d.ts +6 -17
- package/dist/parsers/aparte-stream-parser.d.ts.map +1 -1
- package/dist/primitives/select/aparte-select.d.ts +2 -2
- package/dist/primitives/select/aparte-select.d.ts.map +1 -1
- package/dist/renderers/segment-renderers.d.ts.map +1 -1
- package/dist/renderers/segments/tool-call.d.ts.map +1 -1
- package/dist/runtime/message-repository.d.ts +7 -0
- package/dist/runtime/message-repository.d.ts.map +1 -1
- package/dist/transport/types.d.ts +8 -0
- package/dist/transport/types.d.ts.map +1 -1
- package/dist/types/chat.d.ts +32 -38
- package/dist/types/chat.d.ts.map +1 -1
- package/dist/types/errors.d.ts +16 -1
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/event-map.d.ts +4 -0
- package/dist/types/event-map.d.ts.map +1 -1
- package/dist/types/events.d.ts +15 -0
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/models.d.ts +1 -8
- package/dist/types/models.d.ts.map +1 -1
- package/dist/types/segments.d.ts +1 -13
- package/dist/types/segments.d.ts.map +1 -1
- package/dist/types/tools.d.ts +1 -1
- package/dist/utils/chat-boundary.d.ts +8 -4
- package/dist/utils/chat-boundary.d.ts.map +1 -1
- package/package.json +5 -2
- package/dist/client/xml-artifact-feed.d.ts +0 -76
- package/dist/client/xml-artifact-feed.d.ts.map +0 -1
- package/dist/config/skeleton-provider.d.ts +0 -26
- package/dist/config/skeleton-provider.d.ts.map +0 -1
- package/dist/glyphs-QXfbL3n_.js.map +0 -1
- package/dist/is-awaiting-reply-CWp1ffHh.js.map +0 -1
- package/dist/renderers/segments/pipeline-waiting.d.ts +0 -3
- package/dist/renderers/segments/pipeline-waiting.d.ts.map +0 -1
|
@@ -7,9 +7,8 @@ import type { ExportedMessageRepository } from '../runtime/message-repository.js
|
|
|
7
7
|
* v1: monolithic — `messages[]` inline on the conversation row, attachment
|
|
8
8
|
* `url` was a session-scoped blob URL (lost on reload), artifacts inline
|
|
9
9
|
* in segments only.
|
|
10
|
-
* v2: split — meta-only conversation row; messages
|
|
11
|
-
* `Blob`s)
|
|
12
|
-
* get their own table. Sidebar can list without loading full payloads.
|
|
10
|
+
* v2: split — meta-only conversation row; messages and attachments (with real
|
|
11
|
+
* `Blob`s) get their own table. Sidebar can list without loading full payloads.
|
|
13
12
|
*/
|
|
14
13
|
export declare const APARTE_CONVERSATION_SCHEMA_VERSION: 2;
|
|
15
14
|
/**
|
|
@@ -65,45 +64,6 @@ export interface AparteConversationMeta {
|
|
|
65
64
|
/** Persisted schema version of the row. */
|
|
66
65
|
schemaVersion?: number;
|
|
67
66
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Memory fact — durable user facts stored across all conversations.
|
|
70
|
-
* Surfaces in the memory panel and is consulted by the orchestrator to
|
|
71
|
-
* personalise replies.
|
|
72
|
-
*/
|
|
73
|
-
export interface AparteMemoryFact {
|
|
74
|
-
id: string;
|
|
75
|
-
/** Coarse category — drives the icon/colour in the panel. */
|
|
76
|
-
type: 'identity' | 'fact' | 'preference' | 'tech' | 'project' | 'style';
|
|
77
|
-
content: string;
|
|
78
|
-
/** Where the fact came from. `auto` = regex-detected, `manual` = user input. */
|
|
79
|
-
source?: 'manual' | 'auto' | 'onboarding';
|
|
80
|
-
addedAt: number;
|
|
81
|
-
/** Last time the fact was selected as relevant for a reply. */
|
|
82
|
-
lastUsedAt?: number;
|
|
83
|
-
/** Conversation that produced an auto-detected fact (for traceability). */
|
|
84
|
-
sourceConvId?: string;
|
|
85
|
-
/** Message inside `sourceConvId` that triggered the auto-detection. */
|
|
86
|
-
sourceMsgId?: string;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Artifact gallery row — denormalised index of every artifact segment ever
|
|
90
|
-
* produced, so the gallery can list/filter without scanning every message.
|
|
91
|
-
* The source of truth remains the artifact segment inside its message; this
|
|
92
|
-
* row is rebuilt by the storage adapter on every save.
|
|
93
|
-
*/
|
|
94
|
-
export interface AparteArtifactRow {
|
|
95
|
-
id: string;
|
|
96
|
-
convId: string;
|
|
97
|
-
msgId: string;
|
|
98
|
-
name: string;
|
|
99
|
-
mimeType: string;
|
|
100
|
-
artifactType: string;
|
|
101
|
-
/** Full body — duplicated from the source segment for fast gallery preview. */
|
|
102
|
-
content: string;
|
|
103
|
-
title?: string;
|
|
104
|
-
/** Snapshot of the message timestamp; used for "newest first" gallery sort. */
|
|
105
|
-
updatedAt: number;
|
|
106
|
-
}
|
|
107
67
|
/**
|
|
108
68
|
* Persisted attachment with the actual Blob — survives page reloads, unlike
|
|
109
69
|
* the session-scoped `URL.createObjectURL()` stored on `AparteMessage`.
|
|
@@ -126,8 +86,13 @@ export interface AparteAttachmentRow {
|
|
|
126
86
|
*
|
|
127
87
|
* The first three methods (`loadAll`, `save`, `delete`) form the minimum
|
|
128
88
|
* viable adapter — everything else is optional and lets richer backends
|
|
129
|
-
* expose split-storage features (fast meta listing,
|
|
130
|
-
*
|
|
89
|
+
* expose split-storage features (fast meta listing, attachment blobs).
|
|
90
|
+
*
|
|
91
|
+
* What is NOT here, on purpose: memory facts, a settings key/value store, an
|
|
92
|
+
* artifact gallery index. Each is a product's own table — the shape of a "memory
|
|
93
|
+
* fact" or of a settings entry is the app's decision — and a public contract
|
|
94
|
+
* carrying one app's schema binds every other adapter to it. An app that needs
|
|
95
|
+
* them extends this interface in its own code.
|
|
131
96
|
*/
|
|
132
97
|
export interface AparteStorageAdapter {
|
|
133
98
|
/** Return all stored conversations (full payload), ordered by updatedAt desc. */
|
|
@@ -153,19 +118,6 @@ export interface AparteStorageAdapter {
|
|
|
153
118
|
unpin?(id: string): Promise<void>;
|
|
154
119
|
/** Update only the conversation title (avoids rewriting messages). */
|
|
155
120
|
rename?(id: string, title: string): Promise<void>;
|
|
156
|
-
getMemory?(): Promise<AparteMemoryFact[]>;
|
|
157
|
-
addMemoryFact?(fact: AparteMemoryFact): Promise<void>;
|
|
158
|
-
updateMemoryFact?(id: string, patch: Partial<AparteMemoryFact>): Promise<void>;
|
|
159
|
-
deleteMemoryFact?(id: string): Promise<void>;
|
|
160
|
-
clearMemory?(): Promise<void>;
|
|
161
|
-
getSetting?<T = unknown>(key: string): Promise<T | undefined>;
|
|
162
|
-
setSetting?<T = unknown>(key: string, value: T): Promise<void>;
|
|
163
|
-
deleteSetting?(key: string): Promise<void>;
|
|
164
|
-
getAllSettings?(): Promise<Record<string, unknown>>;
|
|
165
|
-
/** List artifacts; optionally scoped to a single conversation. */
|
|
166
|
-
loadArtifacts?(filter?: {
|
|
167
|
-
convId?: string;
|
|
168
|
-
}): Promise<AparteArtifactRow[]>;
|
|
169
121
|
/** Persisted attachment blobs for a single message. */
|
|
170
122
|
loadAttachments?(msgId: string): Promise<AparteAttachmentRow[]>;
|
|
171
123
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/conversations/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAElF
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/conversations/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAElF;;;;;;;;;GASG;AACH,eAAO,MAAM,kCAAkC,EAAG,CAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,yBAAyB,CAAC;IACjC,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,kBAAkB,CAAC,EAAE,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