@bendyline/docblocks 2.7.7 → 2.7.9
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/THIRD_PARTY_NOTICES.txt +7 -7
- package/dist/{capabilities-D4Z1xYZV.d.ts → capabilities-CH66e2pR.d.ts} +187 -13
- package/dist/{catalog-BQK05tne.d.ts → catalog-BmEXHaZf.d.ts} +30 -4
- package/dist/{chunk-5VEIEFFC.js → chunk-CI3DHDPG.js} +1 -1
- package/dist/{chunk-FIEMYP2N.js → chunk-D7VUEVAX.js} +10 -1
- package/dist/{chunk-R2JX5N3F.js → chunk-L7HADBCQ.js} +49 -0
- package/dist/{chunk-66WTIYYG.js → chunk-LP6JHGBP.js} +2 -2
- package/dist/{chunk-BC42VRYW.js → chunk-PQBUG5DY.js} +49 -7
- package/dist/{chunk-RFEB4N5Q.js → chunk-WE5W7BRL.js} +299 -8
- package/dist/{chunk-NECMAJHS.js → chunk-ZBRXXOW5.js} +1 -1
- package/dist/document/index.d.ts +3 -0
- package/dist/document/index.js +1 -1
- package/dist/filesystem/electron.d.ts +1 -1
- package/dist/filesystem/electron.js +3 -3
- package/dist/filesystem/host.js +2 -2
- package/dist/filesystem/index.d.ts +1 -1
- package/dist/filesystem/index.js +5 -5
- package/dist/host/index.d.ts +3 -2
- package/dist/host/index.js +29 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +33 -5
- package/dist/mcp/zod.d.ts +542 -542
- package/dist/{reconcile-electron-DuwLsuic.d.ts → reconcile-electron-BcwJ7z5Z.d.ts} +1 -1
- package/dist/{settings-HrrCikVX.d.ts → settings-C-TS15JZ.d.ts} +28 -2
- package/dist/vscode/index.d.ts +1 -1
- package/dist/vscode/index.js +1 -1
- package/dist/workspace/index.d.ts +2 -2
- package/dist/workspace-index/index.d.ts +2 -2
- package/dist/workspace-index/index.js +1 -1
- package/dist/workspace-settings/index.d.ts +26 -5
- package/dist/workspace-settings/index.js +42 -7
- package/package.json +2 -2
package/THIRD_PARTY_NOTICES.txt
CHANGED
|
@@ -14,8 +14,8 @@ This notice is included in the published npm tarball. Transitive packages instal
|
|
|
14
14
|
|
|
15
15
|
| Package | Version | License | Source |
|
|
16
16
|
| --- | --- | --- | --- |
|
|
17
|
-
| @bendyline/squisq | 2.13.
|
|
18
|
-
| @bendyline/squisq-graph | 2.13.
|
|
17
|
+
| @bendyline/squisq | 2.13.8 | MIT | https://github.com/bendyline/squisq |
|
|
18
|
+
| @bendyline/squisq-graph | 2.13.1 | MIT | https://github.com/bendyline/squisq |
|
|
19
19
|
| @types/debug | 4.1.12 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped |
|
|
20
20
|
| @types/hast | 3.0.4 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped |
|
|
21
21
|
| @types/katex | 0.16.8 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped |
|
|
@@ -133,7 +133,7 @@ This notice is included in the published npm tarball. Transitive packages instal
|
|
|
133
133
|
Package-local license, copying, and notice files are reproduced below. Where a published package omits its repository license, the reviewed aggregate or README identified in `Source files` supplies the retained material.
|
|
134
134
|
|
|
135
135
|
==============================================================================
|
|
136
|
-
Components: @bendyline/squisq-graph@2.13.
|
|
136
|
+
Components: @bendyline/squisq-graph@2.13.1, @bendyline/squisq@2.13.8
|
|
137
137
|
Source files: node_modules/@bendyline/squisq-graph/LICENSE, node_modules/@bendyline/squisq/LICENSE
|
|
138
138
|
==============================================================================
|
|
139
139
|
MIT License
|
|
@@ -159,7 +159,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
159
159
|
SOFTWARE.
|
|
160
160
|
|
|
161
161
|
==============================================================================
|
|
162
|
-
Components: @bendyline/squisq-graph@2.13.
|
|
162
|
+
Components: @bendyline/squisq-graph@2.13.1
|
|
163
163
|
Source files: node_modules/@bendyline/squisq-graph/NOTICE.md
|
|
164
164
|
==============================================================================
|
|
165
165
|
# Third-Party Notices for @bendyline/squisq-graph
|
|
@@ -177,7 +177,7 @@ This package has no third-party runtime dependencies. The layout engine and its
|
|
|
177
177
|
worker entry are Squisq-authored (MIT).
|
|
178
178
|
|
|
179
179
|
==============================================================================
|
|
180
|
-
Components: @bendyline/squisq-graph@2.13.
|
|
180
|
+
Components: @bendyline/squisq-graph@2.13.1
|
|
181
181
|
Source files: node_modules/@bendyline/squisq-graph/THIRD_PARTY_LICENSES.txt
|
|
182
182
|
==============================================================================
|
|
183
183
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-graph
|
|
@@ -189,7 +189,7 @@ repository license, the pinned upstream copy is vendored and identified below.
|
|
|
189
189
|
COMPONENTS
|
|
190
190
|
|
|
191
191
|
==============================================================================
|
|
192
|
-
Components: @bendyline/squisq@2.13.
|
|
192
|
+
Components: @bendyline/squisq@2.13.8
|
|
193
193
|
Source files: node_modules/@bendyline/squisq/NOTICE.md
|
|
194
194
|
==============================================================================
|
|
195
195
|
# Third-Party Notices for @bendyline/squisq
|
|
@@ -220,7 +220,7 @@ third-party license texts for bundled code and data are shipped in
|
|
|
220
220
|
THIRD_PARTY_LICENSES.txt.
|
|
221
221
|
|
|
222
222
|
==============================================================================
|
|
223
|
-
Components: @bendyline/squisq@2.13.
|
|
223
|
+
Components: @bendyline/squisq@2.13.8
|
|
224
224
|
Source files: node_modules/@bendyline/squisq/THIRD_PARTY_LICENSES.txt
|
|
225
225
|
==============================================================================
|
|
226
226
|
THIRD-PARTY LICENSES FOR @bendyline/squisq
|
|
@@ -1,6 +1,177 @@
|
|
|
1
1
|
import { F as FileCommitResult, c as FileSystemEntry, b as FileMeta } from './types-DLteNrK0.js';
|
|
2
2
|
import { D as DocBlocksHostFsV2API } from './filesystem-v2-CXdAPR27.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* On-device image generation.
|
|
6
|
+
*
|
|
7
|
+
* Renders run on the provider's local image engine. They take seconds on a
|
|
8
|
+
* fast graphics card and minutes for the largest models, so a request streams
|
|
9
|
+
* phased progress and can be cancelled; cancelling stops the engine, and the
|
|
10
|
+
* next render reloads its weights. Image models are listed apart from chat
|
|
11
|
+
* models and never appear in a chat model picker.
|
|
12
|
+
*/
|
|
13
|
+
/** Shapes a person can ask for. The provider picks pixels inside the model's range. */
|
|
14
|
+
declare const AI_IMAGE_ASPECTS: readonly ["1:1", "4:3", "3:4", "16:9", "9:16"];
|
|
15
|
+
type AiImageAspect = (typeof AI_IMAGE_ASPECTS)[number];
|
|
16
|
+
type AiImageUnavailableReason =
|
|
17
|
+
/** AI is off, or the provider is not connected. */
|
|
18
|
+
'not-connected'
|
|
19
|
+
/** The provider has no image engine that can run on this computer. */
|
|
20
|
+
| 'no-engine'
|
|
21
|
+
/** The graphics driver lacks what the engine needs (Vulkan on Windows). */
|
|
22
|
+
| 'graphics-driver'
|
|
23
|
+
/** This build of the app cannot run image generation. */
|
|
24
|
+
| 'platform';
|
|
25
|
+
/**
|
|
26
|
+
* Whether image generation can be offered now.
|
|
27
|
+
*
|
|
28
|
+
* `needs-approval` means the provider serves images but this app has not been
|
|
29
|
+
* allowed to use them; ask with `requestAccess()` from an explicit gesture.
|
|
30
|
+
* While that request waits, the state is `awaiting-approval` with the code the
|
|
31
|
+
* person types into the provider. Chat keeps working throughout.
|
|
32
|
+
*/
|
|
33
|
+
type AiImageAccess = {
|
|
34
|
+
readonly kind: 'ready';
|
|
35
|
+
} | {
|
|
36
|
+
readonly kind: 'needs-approval';
|
|
37
|
+
} | {
|
|
38
|
+
readonly kind: 'awaiting-approval';
|
|
39
|
+
readonly verificationCode: string | null;
|
|
40
|
+
} | {
|
|
41
|
+
readonly kind: 'provider-outdated';
|
|
42
|
+
} | {
|
|
43
|
+
readonly kind: 'unavailable';
|
|
44
|
+
readonly reason: AiImageUnavailableReason;
|
|
45
|
+
readonly message: string;
|
|
46
|
+
};
|
|
47
|
+
declare const AI_IMAGE_FIT_VERDICTS: readonly ["fits", "tight", "over-limit", "may-not-run", "wont-run"];
|
|
48
|
+
interface AiImageModelFit {
|
|
49
|
+
/** `wont-run` models refuse to install on this computer. */
|
|
50
|
+
readonly verdict: (typeof AI_IMAGE_FIT_VERDICTS)[number];
|
|
51
|
+
/** One sentence a person can act on; empty for a plain fit. */
|
|
52
|
+
readonly reason: string;
|
|
53
|
+
}
|
|
54
|
+
interface AiImageModel {
|
|
55
|
+
/** Opaque to the renderer. */
|
|
56
|
+
readonly id: string;
|
|
57
|
+
readonly label: string;
|
|
58
|
+
readonly description: string | null;
|
|
59
|
+
readonly state: 'installed' | 'download-required' | 'downloading';
|
|
60
|
+
readonly downloadBytes: number | null;
|
|
61
|
+
/** Installed in a store the provider reads but this app does not own; not removable here. */
|
|
62
|
+
readonly shared: boolean;
|
|
63
|
+
readonly license: string | null;
|
|
64
|
+
/** False when the license forbids commercial use; null when the provider does not say. */
|
|
65
|
+
readonly commercialUse: boolean | null;
|
|
66
|
+
/** Draws legible text, which design graphics depend on. */
|
|
67
|
+
readonly rendersText: boolean;
|
|
68
|
+
/** How the model reads prompts. */
|
|
69
|
+
readonly promptStyle: 'sentences' | 'tags' | null;
|
|
70
|
+
/** `workstation` marks a model for a machine with a great deal of memory. */
|
|
71
|
+
readonly hardwareTier: 'low' | 'mid' | 'high' | 'workstation' | null;
|
|
72
|
+
readonly minRamGb: number | null;
|
|
73
|
+
readonly fit: AiImageModelFit | null;
|
|
74
|
+
}
|
|
75
|
+
interface AiImagePreferences {
|
|
76
|
+
/** The model "Generate image" uses; null lets the provider choose an installed one. */
|
|
77
|
+
readonly model: string | null;
|
|
78
|
+
/** The model Illustrate's design graphics use; null offers none. */
|
|
79
|
+
readonly designModel: string | null;
|
|
80
|
+
readonly aspect: AiImageAspect;
|
|
81
|
+
}
|
|
82
|
+
type AiImagePreferencesPatch = Partial<AiImagePreferences>;
|
|
83
|
+
interface AiImageRequest {
|
|
84
|
+
readonly prompt: string;
|
|
85
|
+
readonly negativePrompt?: string;
|
|
86
|
+
/** An id from `models()`; the preferred model when absent. */
|
|
87
|
+
readonly model?: string;
|
|
88
|
+
readonly aspect?: AiImageAspect;
|
|
89
|
+
readonly seed?: number;
|
|
90
|
+
}
|
|
91
|
+
interface AiImageResult {
|
|
92
|
+
readonly mimeType: 'image/png';
|
|
93
|
+
readonly data: ArrayBuffer;
|
|
94
|
+
readonly width: number;
|
|
95
|
+
readonly height: number;
|
|
96
|
+
readonly seed: number;
|
|
97
|
+
readonly model: string;
|
|
98
|
+
readonly durationMs: number;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* `loading-model` covers the first render after the engine starts, which
|
|
102
|
+
* loads the weights; `decoding` turns the result into pixels in tiles.
|
|
103
|
+
*/
|
|
104
|
+
type AiImagePhase = 'queued' | 'loading-model' | 'sampling' | 'decoding';
|
|
105
|
+
interface AiImageProgress {
|
|
106
|
+
readonly phase: AiImagePhase;
|
|
107
|
+
/** Units done in this phase; 0 while queued or when the engine reports none. */
|
|
108
|
+
readonly step: number;
|
|
109
|
+
readonly totalSteps: number;
|
|
110
|
+
readonly secondsPerStep: number | null;
|
|
111
|
+
}
|
|
112
|
+
type AiImageEvent = {
|
|
113
|
+
readonly kind: 'progress';
|
|
114
|
+
readonly progress: AiImageProgress;
|
|
115
|
+
} | {
|
|
116
|
+
readonly kind: 'done';
|
|
117
|
+
readonly image: AiImageResult;
|
|
118
|
+
} | {
|
|
119
|
+
readonly kind: 'error';
|
|
120
|
+
readonly error: AiError;
|
|
121
|
+
};
|
|
122
|
+
interface AiImageHandle {
|
|
123
|
+
readonly done: Promise<AiResult<AiImageResult>>;
|
|
124
|
+
/** Stop the render. The engine stops, so the next render reloads its weights. */
|
|
125
|
+
cancel(): void;
|
|
126
|
+
}
|
|
127
|
+
type AiImageInstallEvent = {
|
|
128
|
+
readonly kind: 'progress';
|
|
129
|
+
readonly progress: AiProgress;
|
|
130
|
+
} | {
|
|
131
|
+
readonly kind: 'done';
|
|
132
|
+
readonly model: AiImageModel;
|
|
133
|
+
} | {
|
|
134
|
+
readonly kind: 'error';
|
|
135
|
+
readonly error: AiError;
|
|
136
|
+
};
|
|
137
|
+
interface AiImageInstallHandle {
|
|
138
|
+
readonly done: Promise<AiResult<AiImageModel>>;
|
|
139
|
+
/** Stop the download. Starting it again resumes. */
|
|
140
|
+
cancel(): void;
|
|
141
|
+
}
|
|
142
|
+
interface AiImagesAPI {
|
|
143
|
+
access(): Promise<AiImageAccess>;
|
|
144
|
+
onAccess(listener: (access: AiImageAccess) => void): () => void;
|
|
145
|
+
/** Ask the provider to allow image generation. Only from an explicit gesture. */
|
|
146
|
+
requestAccess(): Promise<AiResult<AiImageAccess>>;
|
|
147
|
+
models(): Promise<AiResult<readonly AiImageModel[]>>;
|
|
148
|
+
/** Start a model download from an explicit gesture. */
|
|
149
|
+
installModel(id: string, onProgress?: (progress: AiProgress) => void): AiImageInstallHandle;
|
|
150
|
+
removeModel(id: string): Promise<AiResult<null>>;
|
|
151
|
+
getPreferences(): Promise<AiImagePreferences>;
|
|
152
|
+
setPreferences(patch: AiImagePreferencesPatch): Promise<AiImagePreferences>;
|
|
153
|
+
generate(request: AiImageRequest, onEvent: (event: AiImageEvent) => void): AiImageHandle;
|
|
154
|
+
}
|
|
155
|
+
declare const AI_IMAGE_WIRE_LIMITS: Readonly<{
|
|
156
|
+
promptCharacters: 4000;
|
|
157
|
+
/** A PNG at the largest size a model renders. */
|
|
158
|
+
imageBytes: number;
|
|
159
|
+
models: 256;
|
|
160
|
+
pixels: 16384;
|
|
161
|
+
verificationCodeCharacters: 16;
|
|
162
|
+
}>;
|
|
163
|
+
declare function isAiImageModelId(value: unknown): value is string;
|
|
164
|
+
declare function isAiImageAspect(value: unknown): value is AiImageAspect;
|
|
165
|
+
declare function parseAiImageAccess(value: unknown): AiImageAccess | null;
|
|
166
|
+
declare function parseAiImageModel(value: unknown): AiImageModel | null;
|
|
167
|
+
declare function parseAiImageModelList(value: unknown): AiImageModel[] | null;
|
|
168
|
+
declare function parseAiImagePreferences(value: unknown): AiImagePreferences | null;
|
|
169
|
+
declare function parseAiImagePreferencesPatch(value: unknown): AiImagePreferencesPatch | null;
|
|
170
|
+
declare function parseAiImageRequest(value: unknown): AiImageRequest | null;
|
|
171
|
+
declare function parseAiImageResult(value: unknown): AiImageResult | null;
|
|
172
|
+
declare function parseAiImageEvent(value: unknown): AiImageEvent | null;
|
|
173
|
+
declare function parseAiImageInstallEvent(value: unknown): AiImageInstallEvent | null;
|
|
174
|
+
|
|
4
175
|
/** Provider-neutral catalog management. IDs never authorize filesystem access. */
|
|
5
176
|
interface AiKnowledgeCatalog {
|
|
6
177
|
readonly id: string;
|
|
@@ -378,17 +549,6 @@ interface AiSearchResult {
|
|
|
378
549
|
readonly hits: readonly AiSearchHit[];
|
|
379
550
|
readonly truncated: boolean;
|
|
380
551
|
}
|
|
381
|
-
interface AiImageRequest {
|
|
382
|
-
readonly prompt: string;
|
|
383
|
-
readonly width?: number;
|
|
384
|
-
readonly height?: number;
|
|
385
|
-
}
|
|
386
|
-
interface AiImageResult {
|
|
387
|
-
readonly mimeType: 'image/png';
|
|
388
|
-
readonly data: ArrayBuffer;
|
|
389
|
-
readonly width: number;
|
|
390
|
-
readonly height: number;
|
|
391
|
-
}
|
|
392
552
|
interface AiTranscribeRequest {
|
|
393
553
|
readonly audio: ArrayBuffer;
|
|
394
554
|
readonly mimeType: string;
|
|
@@ -421,6 +581,8 @@ interface AiSpeechAudio {
|
|
|
421
581
|
interface DocBlocksHostAiAPI {
|
|
422
582
|
/** Optional catalog browsing, downloads, and retrieval model setup. */
|
|
423
583
|
readonly knowledge?: AiKnowledgeAPI;
|
|
584
|
+
/** Optional on-device image generation and its models. */
|
|
585
|
+
readonly images?: AiImagesAPI;
|
|
424
586
|
/** Whether the host's user-installed companion provider is present. */
|
|
425
587
|
providerInstalled(): Promise<boolean>;
|
|
426
588
|
status(): Promise<AiStatus>;
|
|
@@ -452,7 +614,6 @@ interface DocBlocksHostAiAPI {
|
|
|
452
614
|
chat(request: AiChatRequest, onEvent: (event: AiChatEvent) => void): AiChatHandle;
|
|
453
615
|
ensureWorkspace?(workspaceId: string, onProgress?: (progress: AiProgress) => void): AiEnsureWorkspaceHandle;
|
|
454
616
|
search?(workspaceId: string, query: AiSearchQuery): Promise<AiResult<AiSearchResult>>;
|
|
455
|
-
generateImage?(request: AiImageRequest): Promise<AiResult<AiImageResult>>;
|
|
456
617
|
/** @deprecated Speech lives on `DocBlocksHostAPI.speech`; no host implements this. */
|
|
457
618
|
transcribe?(request: AiTranscribeRequest): Promise<AiResult<AiTranscript>>;
|
|
458
619
|
/** @deprecated Speech lives on `DocBlocksHostAPI.speech`; no host implements this. */
|
|
@@ -813,12 +974,25 @@ interface SpeechTranscribeRequest {
|
|
|
813
974
|
*/
|
|
814
975
|
readonly prompt?: string;
|
|
815
976
|
readonly language?: string;
|
|
977
|
+
/**
|
|
978
|
+
* Return timed `segments` with word times (Whisper's verbose output), for
|
|
979
|
+
* timing a narration from its audio. Dictation leaves it off.
|
|
980
|
+
*/
|
|
981
|
+
readonly timestamps?: boolean;
|
|
982
|
+
}
|
|
983
|
+
/** A recognized word. Seconds from the start of the take. */
|
|
984
|
+
interface SpeechWord {
|
|
985
|
+
readonly start: number;
|
|
986
|
+
readonly end: number;
|
|
987
|
+
readonly text: string;
|
|
816
988
|
}
|
|
817
989
|
interface SpeechSegment {
|
|
818
990
|
/** Seconds from the start of the take. */
|
|
819
991
|
readonly start: number;
|
|
820
992
|
readonly end: number;
|
|
821
993
|
readonly text: string;
|
|
994
|
+
/** Present when the request asked for `timestamps`. */
|
|
995
|
+
readonly words?: readonly SpeechWord[];
|
|
822
996
|
}
|
|
823
997
|
interface SpeechTranscript {
|
|
824
998
|
/** Trimmed; empty when the take held no speech. */
|
|
@@ -1378,4 +1552,4 @@ declare function parseHostEnvironment(value: unknown): HostEnvironment | null;
|
|
|
1378
1552
|
*/
|
|
1379
1553
|
declare function deriveHostCapabilities(host: unknown): HostCapabilities;
|
|
1380
1554
|
|
|
1381
|
-
export { type
|
|
1555
|
+
export { type AiSearchQuery as $, AI_IMAGE_ASPECTS as A, type AiImageModelFit as B, type AiImagePhase as C, type AiImagePreferences as D, type AiImagePreferencesPatch as E, type AiImageProgress as F, type AiImageRequest as G, type AiImageResult as H, type AiImageUnavailableReason as I, type AiImagesAPI as J, type AiKnowledgeAPI as K, type AiKnowledgeAction as L, type AiKnowledgeCatalog as M, type AiKnowledgeState as N, type AiModelDownloadInfo as O, type AiModelFit as P, type AiModelInfo as Q, type AiModelInstallEvent as R, type AiModelInstallHandle as S, type AiPreferences as T, type AiPreferencesPatch as U, type AiProgress as V, type AiProviderInfo as W, type AiResponseFormat as X, type AiResult as Y, type AiReviewMode as Z, type AiSearchHit as _, AI_IMAGE_FIT_VERDICTS as a, type SpeechProgress as a$, type AiSearchResult as a0, type AiSpeechAudio as a1, type AiStatus as a2, type AiSynthesizeRequest as a3, type AiTranscribeRequest as a4, type AiTranscript as a5, type AiUnavailableReason as a6, type DocBlocksHostAPI as a7, type DocBlocksHostAiAPI as a8, type DocBlocksHostClipboardAPI as a9, type GitResult as aA, type GitRevision as aB, type GitStatus as aC, HOST_PLATFORMS as aD, HOST_SURFACE_KINDS as aE, type HostCapabilities as aF, type HostCloseReason as aG, type HostEnvironment as aH, type HostExportTargetGrant as aI, type HostPinnedDocument as aJ, type HostPlatform as aK, type HostPrepareCloseRequest as aL, type HostPrepareCloseResult as aM, type HostSurfaceKind as aN, type MenuCommand as aO, NO_HOST_CAPABILITIES as aP, type OpenRequest as aQ, type SpeechAudioChunk as aR, type SpeechCatalog as aS, type SpeechError as aT, type SpeechErrorCode as aU, type SpeechInstallEvent as aV, type SpeechInstallHandle as aW, type SpeechModelInfo as aX, type SpeechModelKind as aY, type SpeechPreferences as aZ, type SpeechPreferencesPatch as a_, type DocBlocksHostExportAPI as aa, type DocBlocksHostExternalAPI as ab, type DocBlocksHostFfmpegAPI as ac, type DocBlocksHostFsAPI as ad, type DocBlocksHostGitAPI as ae, type DocBlocksHostLifecycleAPI as af, type DocBlocksHostMenuAPI as ag, type DocBlocksHostShellAPI as ah, type DocBlocksHostSpeechAPI as ai, type DocBlocksHostUpdaterAPI as aj, type DocBlocksHostWorkspacesAPI as ak, type ElectronWorkspaceInfo as al, type ExternalBinaryCommitResult as am, type GitBranchInfo as an, type GitCapabilities as ao, type GitCloneHandle as ap, type GitCloneProgress as aq, type GitError as ar, type GitErrorCode as as, type GitFileAtRevision as at, type GitFileChange as au, type GitFileStatusCode as av, type GitLogEntry as aw, type GitLogOptions as ax, type GitRemoteInfo as ay, type GitRepoDetection as az, AI_IMAGE_WIRE_LIMITS as b, type SpeechReadiness as b0, type SpeechReadinessState as b1, type SpeechResult as b2, type SpeechSegment as b3, type SpeechStatus as b4, type SpeechSynthesisHandle as b5, type SpeechSynthesisSummary as b6, type SpeechSynthesizeEvent as b7, type SpeechSynthesizeRequest as b8, type SpeechTranscribeRequest as b9, type SpeechTranscript as ba, type SpeechVoiceInfo as bb, type SpeechWord as bc, type SpeechWordTiming as bd, type UpdateCheckResult as be, type UpdateInstallResult as bf, type UpdaterStatus as bg, deriveHostCapabilities as bh, isAiImageAspect as bi, isAiImageModelId as bj, parseAiImageAccess as bk, parseAiImageEvent as bl, parseAiImageInstallEvent as bm, parseAiImageModel as bn, parseAiImageModelList as bo, parseAiImagePreferences as bp, parseAiImagePreferencesPatch as bq, parseAiImageRequest as br, parseAiImageResult as bs, parseAiKnowledgeAction as bt, parseAiKnowledgeState as bu, parseHostEnvironment as bv, type AiChatCompletion as c, type AiChatEvent as d, type AiChatEvidence as e, type AiChatHandle as f, type AiChatKnowledge as g, type AiChatKnowledgeSource as h, type AiChatMessage as i, type AiChatProgress as j, type AiChatPurpose as k, type AiChatRequest as l, type AiConnectionStep as m, type AiEnsureWorkspaceHandle as n, type AiError as o, type AiErrorCode as p, type AiFactCheck as q, type AiFactCheckRequest as r, type AiFactCheckSentence as s, type AiImageAccess as t, type AiImageAspect as u, type AiImageEvent as v, type AiImageHandle as w, type AiImageInstallEvent as x, type AiImageInstallHandle as y, type AiImageModel as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarkdownDocument } from '@bendyline/squisq/markdown';
|
|
2
|
-
import { C as CatalogSortOrder } from './settings-
|
|
2
|
+
import { C as CatalogSortOrder } from './settings-C-TS15JZ.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Synchronous outside-in path layout.
|
|
@@ -36,8 +36,11 @@ declare function chooseOutsideInMarkdownPath(layout: OutsideInLayout, paths: rea
|
|
|
36
36
|
*
|
|
37
37
|
* Everything here is deterministic: identical inputs produce identical bytes
|
|
38
38
|
* on every surface (shell, VS Code extension host, CLI). There are no
|
|
39
|
-
*
|
|
40
|
-
*
|
|
39
|
+
* filesystem mtimes and no locale-sensitive ordering. The only clock reading
|
|
40
|
+
* is a document's first-published and last-modified dates, carried forward from
|
|
41
|
+
* the previous catalog JSON and stamped only when a document first appears or
|
|
42
|
+
* its content changes — so a catalog committed to git still only changes when
|
|
43
|
+
* the documents do.
|
|
41
44
|
*/
|
|
42
45
|
|
|
43
46
|
declare const CATALOG_GENERATOR = "docblocks-workspace-catalog";
|
|
@@ -65,11 +68,17 @@ interface CatalogEntry {
|
|
|
65
68
|
readonly description?: string;
|
|
66
69
|
readonly author?: string;
|
|
67
70
|
readonly date?: string;
|
|
71
|
+
/** When the document first appeared in the catalog JSON (ISO 8601, UTC). */
|
|
72
|
+
readonly firstPublishedDate?: string;
|
|
73
|
+
/** When the catalog JSON last picked up a change to the document's content. */
|
|
74
|
+
readonly lastModifiedDate?: string;
|
|
68
75
|
readonly tags?: readonly string[];
|
|
69
76
|
readonly theme?: string;
|
|
70
77
|
readonly outline: readonly CatalogOutlineEntry[];
|
|
71
78
|
readonly wordCount: number;
|
|
72
79
|
readonly excerpt?: string;
|
|
80
|
+
/** SHA-256 hex of the source text with normalized line endings; absent when unread. */
|
|
81
|
+
readonly contentHash?: string;
|
|
73
82
|
/** Present only when the catalog is configured with `content: "markdown"`. */
|
|
74
83
|
readonly markdown?: string;
|
|
75
84
|
}
|
|
@@ -106,6 +115,23 @@ declare function createWorkspaceCatalog(title: string, entries: readonly Catalog
|
|
|
106
115
|
*/
|
|
107
116
|
declare function serializeCatalogJson(catalog: WorkspaceCatalog): string;
|
|
108
117
|
declare function isGeneratedCatalogJson(text: string): boolean;
|
|
118
|
+
/** The dates a previously generated catalog recorded for one document. */
|
|
119
|
+
interface CatalogDateRecord {
|
|
120
|
+
readonly firstPublishedDate: string;
|
|
121
|
+
readonly lastModifiedDate: string;
|
|
122
|
+
readonly contentHash?: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Per-path date history from a previously generated catalog JSON. Anything
|
|
126
|
+
* malformed is skipped, so the worst case is a document dated as new.
|
|
127
|
+
*/
|
|
128
|
+
declare function readCatalogDateHistory(text: string): Map<string, CatalogDateRecord>;
|
|
129
|
+
/**
|
|
130
|
+
* Date each entry. A document keeps the dates `history` holds for its path;
|
|
131
|
+
* it is stamped `now` when it first appears, and its `lastModifiedDate`
|
|
132
|
+
* moves to `now` when its content hash changes.
|
|
133
|
+
*/
|
|
134
|
+
declare function stampCatalogDates(catalog: WorkspaceCatalog, history: ReadonlyMap<string, CatalogDateRecord>, now: Date): WorkspaceCatalog;
|
|
109
135
|
/** Insert the generator marker directly after the doctype so it cannot affect quirks mode. */
|
|
110
136
|
declare function stampCatalogHtml(html: string, inputsDigest: string): string;
|
|
111
137
|
declare function readCatalogHtmlDigest(text: string): string | null;
|
|
@@ -119,4 +145,4 @@ declare function relativeCatalogLink(fromDirectory: string, toPath: string): str
|
|
|
119
145
|
*/
|
|
120
146
|
declare function buildCatalogMarkdownDocument(catalog: WorkspaceCatalog, outputPath: string): MarkdownDocument;
|
|
121
147
|
|
|
122
|
-
export { type CatalogEntry as C, OUTSIDE_IN_FORMAT_IDS as O, type WorkspaceCatalog as W, CATALOG_FORMAT_VERSION as a, CATALOG_GENERATOR as b, CATALOG_LIMITS as c, type
|
|
148
|
+
export { stampCatalogHtml as A, type CatalogEntry as C, OUTSIDE_IN_FORMAT_IDS as O, type WorkspaceCatalog as W, CATALOG_FORMAT_VERSION as a, CATALOG_GENERATOR as b, CATALOG_LIMITS as c, type CatalogDateRecord as d, type CatalogDocumentFormat as e, type CatalogEntryHints as f, type CatalogOutlineEntry as g, type CatalogSource as h, type OutsideInFormatId as i, type OutsideInLayout as j, buildCatalogMarkdownDocument as k, catalogEntryForUnreadable as l, catalogEntryFromDocument as m, catalogEntryFromMarkdown as n, chooseOutsideInMarkdownPath as o, createWorkspaceCatalog as p, isGeneratedCatalogHtml as q, isGeneratedCatalogJson as r, readCatalogDateHistory as s, readCatalogHtmlDigest as t, relativeCatalogLink as u, relocateOutsideInLayout as v, resolveOutsideInLayout as w, serializeCatalogJson as x, sortCatalogEntries as y, stampCatalogDates as z };
|
|
@@ -181,13 +181,15 @@ var DocumentSession = class {
|
|
|
181
181
|
if (content === this.content) return this.revision;
|
|
182
182
|
this.content = content;
|
|
183
183
|
this.revision += 1;
|
|
184
|
+
this.localEditedAt = Date.now();
|
|
184
185
|
this.error = null;
|
|
185
186
|
this.autoSaveRetryAttempt = 0;
|
|
186
187
|
if (this.conflict) {
|
|
187
188
|
this.conflict = {
|
|
188
189
|
...this.conflict,
|
|
189
190
|
localContent: content,
|
|
190
|
-
localRevision: this.revision
|
|
191
|
+
localRevision: this.revision,
|
|
192
|
+
localEditedAt: this.localEditedAt
|
|
191
193
|
};
|
|
192
194
|
}
|
|
193
195
|
this.writeRecoverySnapshot();
|
|
@@ -377,6 +379,7 @@ var DocumentSession = class {
|
|
|
377
379
|
targetKey: change.targetKey,
|
|
378
380
|
localContent: this.content,
|
|
379
381
|
localRevision: this.revision,
|
|
382
|
+
localEditedAt: this.localEditedAt,
|
|
380
383
|
externalContent: change.content,
|
|
381
384
|
externalVersion
|
|
382
385
|
};
|
|
@@ -399,6 +402,7 @@ var DocumentSession = class {
|
|
|
399
402
|
targetKey: change.targetKey,
|
|
400
403
|
localContent: this.content,
|
|
401
404
|
localRevision: this.revision,
|
|
405
|
+
localEditedAt: this.localEditedAt,
|
|
402
406
|
externalContent: change.content,
|
|
403
407
|
externalVersion: change.version ?? null
|
|
404
408
|
};
|
|
@@ -411,6 +415,7 @@ var DocumentSession = class {
|
|
|
411
415
|
this.clearAutoSaveTimer();
|
|
412
416
|
this.autoSaveRetryAttempt = 0;
|
|
413
417
|
this.content = content;
|
|
418
|
+
this.localEditedAt = void 0;
|
|
414
419
|
this.revision += 1;
|
|
415
420
|
this.persistedRevision = this.revision;
|
|
416
421
|
this.persistedContent = content;
|
|
@@ -433,6 +438,7 @@ var DocumentSession = class {
|
|
|
433
438
|
this.discardRecoverySnapshot();
|
|
434
439
|
this.generation += 1;
|
|
435
440
|
this.revision += 1;
|
|
441
|
+
this.localEditedAt = void 0;
|
|
436
442
|
this.conflict = null;
|
|
437
443
|
this.error = null;
|
|
438
444
|
this.haltDrain = false;
|
|
@@ -518,6 +524,7 @@ var DocumentSession = class {
|
|
|
518
524
|
this.externalSequence = -1;
|
|
519
525
|
this.target = next.target;
|
|
520
526
|
this.content = next.content;
|
|
527
|
+
this.localEditedAt = void 0;
|
|
521
528
|
this.revision += 1;
|
|
522
529
|
this.persistedRevision = this.revision;
|
|
523
530
|
this.persistedContent = next.target ? next.content : null;
|
|
@@ -607,6 +614,7 @@ var DocumentSession = class {
|
|
|
607
614
|
targetKey: target.key,
|
|
608
615
|
localContent: this.content,
|
|
609
616
|
localRevision: this.revision,
|
|
617
|
+
localEditedAt: this.localEditedAt,
|
|
610
618
|
externalContent: error.externalContent,
|
|
611
619
|
externalVersion: error.externalVersion
|
|
612
620
|
};
|
|
@@ -715,6 +723,7 @@ var DocumentSession = class {
|
|
|
715
723
|
this.externalSequence = -1;
|
|
716
724
|
this.target = null;
|
|
717
725
|
this.persistedContent = null;
|
|
726
|
+
this.localEditedAt = void 0;
|
|
718
727
|
this.savingRevision = null;
|
|
719
728
|
this.savingContent = null;
|
|
720
729
|
this.error = null;
|
|
@@ -168,11 +168,14 @@ function orderedEntry(entry) {
|
|
|
168
168
|
"description",
|
|
169
169
|
"author",
|
|
170
170
|
"date",
|
|
171
|
+
"firstPublishedDate",
|
|
172
|
+
"lastModifiedDate",
|
|
171
173
|
"tags",
|
|
172
174
|
"theme",
|
|
173
175
|
"outline",
|
|
174
176
|
"wordCount",
|
|
175
177
|
"excerpt",
|
|
178
|
+
"contentHash",
|
|
176
179
|
"markdown"
|
|
177
180
|
];
|
|
178
181
|
for (const key of keys) {
|
|
@@ -202,6 +205,50 @@ var CATALOG_JSON_MARKER = /^\uFEFF?\{\s*"generator"\s*:\s*"docblocks-workspace-c
|
|
|
202
205
|
function isGeneratedCatalogJson(text) {
|
|
203
206
|
return CATALOG_JSON_MARKER.test(text.slice(0, 256));
|
|
204
207
|
}
|
|
208
|
+
var CATALOG_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:\d{2}))?$/;
|
|
209
|
+
var CONTENT_HASH_PATTERN = /^[0-9a-f]{64}$/;
|
|
210
|
+
function catalogDate(value) {
|
|
211
|
+
return typeof value === "string" && CATALOG_DATE_PATTERN.test(value) && Number.isFinite(Date.parse(value)) ? value : void 0;
|
|
212
|
+
}
|
|
213
|
+
function readCatalogDateHistory(text) {
|
|
214
|
+
const history = /* @__PURE__ */ new Map();
|
|
215
|
+
if (!isGeneratedCatalogJson(text)) return history;
|
|
216
|
+
let parsed;
|
|
217
|
+
try {
|
|
218
|
+
parsed = JSON.parse(text.replace(/^\uFEFF/, ""));
|
|
219
|
+
} catch {
|
|
220
|
+
return history;
|
|
221
|
+
}
|
|
222
|
+
const documents = parsed?.documents;
|
|
223
|
+
if (!Array.isArray(documents)) return history;
|
|
224
|
+
for (const document of documents) {
|
|
225
|
+
if (!document || typeof document !== "object") continue;
|
|
226
|
+
const record = document;
|
|
227
|
+
const first = catalogDate(record.firstPublishedDate);
|
|
228
|
+
if (typeof record.path !== "string" || !first) continue;
|
|
229
|
+
const hash = record.contentHash;
|
|
230
|
+
history.set(record.path, {
|
|
231
|
+
firstPublishedDate: first,
|
|
232
|
+
lastModifiedDate: catalogDate(record.lastModifiedDate) ?? first,
|
|
233
|
+
...typeof hash === "string" && CONTENT_HASH_PATTERN.test(hash) ? { contentHash: hash } : {}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
return history;
|
|
237
|
+
}
|
|
238
|
+
function stampCatalogDates(catalog, history, now) {
|
|
239
|
+
const timestamp = now.toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
240
|
+
return {
|
|
241
|
+
...catalog,
|
|
242
|
+
documents: catalog.documents.map((entry) => {
|
|
243
|
+
const previous = history.get(entry.path);
|
|
244
|
+
return {
|
|
245
|
+
...entry,
|
|
246
|
+
firstPublishedDate: previous?.firstPublishedDate ?? timestamp,
|
|
247
|
+
lastModifiedDate: previous && previous.contentHash === entry.contentHash ? previous.lastModifiedDate : timestamp
|
|
248
|
+
};
|
|
249
|
+
})
|
|
250
|
+
};
|
|
251
|
+
}
|
|
205
252
|
var CATALOG_HTML_MARKER = /<!-- docblocks-workspace-catalog v1 inputs=sha256:([0-9a-f]{64}) -->/;
|
|
206
253
|
var CATALOG_HTML_MARKER_SCAN_CHARACTERS = 2048;
|
|
207
254
|
function stampCatalogHtml(html, inputsDigest) {
|
|
@@ -369,6 +416,8 @@ export {
|
|
|
369
416
|
createWorkspaceCatalog,
|
|
370
417
|
serializeCatalogJson,
|
|
371
418
|
isGeneratedCatalogJson,
|
|
419
|
+
readCatalogDateHistory,
|
|
420
|
+
stampCatalogDates,
|
|
372
421
|
stampCatalogHtml,
|
|
373
422
|
readCatalogHtmlDigest,
|
|
374
423
|
isGeneratedCatalogHtml,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HostFileSystemProviderV2
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZBRXXOW5.js";
|
|
4
4
|
import {
|
|
5
5
|
ELECTRON_FILE_SYSTEM_V2_CAPABILITIES,
|
|
6
6
|
maybeGetDocBlocksHost
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WE5W7BRL.js";
|
|
8
8
|
|
|
9
9
|
// src/filesystem/electron-provider-v2.ts
|
|
10
10
|
var ElectronFileSystemProviderV2 = class extends HostFileSystemProviderV2 {
|