@bendyline/docblocks 2.7.3 → 2.7.5

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.
Files changed (52) hide show
  1. package/THIRD_PARTY_NOTICES.txt +37 -6
  2. package/dist/{capabilities-r03EXSAi.d.ts → capabilities-DHwh4P4D.d.ts} +29 -3
  3. package/dist/{chunk-KQ6756AJ.js → chunk-3GSMJ4MQ.js} +1 -1
  4. package/dist/{chunk-YWYT6K6J.js → chunk-3LXXRIO2.js} +1 -1
  5. package/dist/{chunk-ZTSG7AC3.js → chunk-64733GFL.js} +35 -2
  6. package/dist/{chunk-UK7R3RC7.js → chunk-BC42VRYW.js} +1 -1
  7. package/dist/{chunk-DFMRE22M.js → chunk-EFGQUOTL.js} +17 -3
  8. package/dist/{chunk-IGB2VSRE.js → chunk-FIEMYP2N.js} +2 -2
  9. package/dist/{chunk-M5ZNQGR5.js → chunk-IYKGM3PV.js} +1 -1
  10. package/dist/{chunk-6UPO2GE6.js → chunk-K5HRMSXD.js} +3 -3
  11. package/dist/{chunk-UDEWLHQI.js → chunk-LDAG5NTQ.js} +3 -3
  12. package/dist/{chunk-7SN7YQL4.js → chunk-LJLQYXVL.js} +99 -3
  13. package/dist/{chunk-4I4AG2BH.js → chunk-P32NVUQL.js} +2 -2
  14. package/dist/{chunk-HKOOHM67.js → chunk-Q3OFZWJS.js} +3 -3
  15. package/dist/{chunk-AYWKIZLD.js → chunk-UTH3HYCZ.js} +5 -1
  16. package/dist/{chunk-QS5WTLUZ.js → chunk-XI2LYBRR.js} +167 -0
  17. package/dist/document/index.d.ts +2 -2
  18. package/dist/document/index.js +3 -3
  19. package/dist/filesystem/electron.d.ts +5 -5
  20. package/dist/filesystem/electron.js +4 -4
  21. package/dist/filesystem/host.d.ts +4 -4
  22. package/dist/filesystem/host.js +4 -4
  23. package/dist/filesystem/index.d.ts +27 -8
  24. package/dist/filesystem/index.js +22 -12
  25. package/dist/filesystem/indexeddb.d.ts +2 -2
  26. package/dist/filesystem/indexeddb.js +4 -4
  27. package/dist/filesystem/memory.d.ts +2 -2
  28. package/dist/filesystem/memory.js +4 -4
  29. package/dist/filesystem/native.d.ts +2 -2
  30. package/dist/filesystem/native.js +4 -4
  31. package/dist/{filesystem-v2-C8AdSXUN.d.ts → filesystem-v2-CXdAPR27.d.ts} +1 -1
  32. package/dist/host/index.d.ts +7 -5
  33. package/dist/host/index.js +1 -1
  34. package/dist/host/mobile.d.ts +2 -2
  35. package/dist/host/mobile.js +1 -1
  36. package/dist/{host-provider-v2-CV0joXaL.d.ts → host-provider-v2-DEWMPiRD.d.ts} +2 -2
  37. package/dist/index.d.ts +8 -7
  38. package/dist/index.js +23 -13
  39. package/dist/mcp/index.js +2 -2
  40. package/dist/mcp/zod.js +2 -2
  41. package/dist/reconcile-electron-Ci2lhAdW.d.ts +142 -0
  42. package/dist/{types-BvDnr3YU.d.ts → types-DLteNrK0.d.ts} +3 -1
  43. package/dist/{v2-BVnZZyd4.d.ts → v2-DwxWjFC0.d.ts} +12 -1
  44. package/dist/vscode/index.d.ts +28 -2
  45. package/dist/vscode/index.js +21 -3
  46. package/dist/workspace/index.d.ts +41 -141
  47. package/dist/workspace/index.js +16 -1
  48. package/dist/workspace-index/index.d.ts +3 -1
  49. package/dist/workspace-index/index.js +18 -2
  50. package/dist/workspace-settings/index.d.ts +1 -1
  51. package/dist/workspace-settings/index.js +3 -3
  52. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -1,17 +1,18 @@
1
- export { F as FileCommitResult, a as FileEntry, b as FileMeta, c as FileSystemEntry, d as FileSystemProvider, e as FileSystemProviderWithV2, f as FolderEntry, g as getFileSystemProviderV2, h as hasFileSystemProviderV2 } from './types-BvDnr3YU.js';
1
+ export { F as FileCommitResult, a as FileEntry, b as FileMeta, c as FileSystemEntry, d as FileSystemProvider, e as FileSystemProviderWithV2, f as FolderEntry, g as getFileSystemProviderV2, h as hasFileSystemProviderV2 } from './types-DLteNrK0.js';
2
+ export { DbkWorkspaceAssetLayout, DbkWorkspaceSnapshot, DbkWorkspaceSnapshotOptions, DecodeUtf8TextOptions, FileSystemContentContainer, FileSystemEntryMoveOptions, FileSystemEntryMoveState, FileSystemMoveLocation, FileSystemMoveRecoveryError, FileSystemPartialMoveError, FileSystemPartialMoveState, FileSystemPathPresence, LegacyFilePayloadModel, LegacyFileSystemProviderV2Adapter, LegacyFileSystemProviderV2AdapterOptions, MARKDOWN_FILE_EXTENSIONS, SQUISQ_RUNTIME_DIRECTORY_NAME, createDbkWorkspaceSnapshot, createFileMediaProvider, decodeUtf8Text, describeEntryMove, describePartialMove, documentCompanionPath, ensureWikiArticle, findWikiArticle, isBrowsableWorkspaceEntry, isCompanionDirectoryName, isDiscoverableWorkspaceEntry, isFileSystemMoveRecoveryError, isFileSystemMoveStateError, isFileSystemPartialMoveError, isIgnoredWorkspaceEntryName, isMarkdownFileName, moveFileSystemEntry, replaceMemoryWorkspaceFromDbk, resolveWikiArticlePath, rewriteCompanionReferences, suggestWikiArticles, wikiArticleExists } from './filesystem/index.js';
2
3
  export { W as WORKSPACE_ROOT, a as WorkspacePath, p as parseWorkspacePath, t as tryParseWorkspacePath, w as workspacePathBasename, b as workspacePathContains, c as workspacePathDirname, d as workspacePathJoin, e as workspacePathToLegacy } from './workspace-path-CWVrcuPL.js';
3
- export { F as FileSystemAtomicity, a as FileSystemCaseSensitivity, b as FileSystemConditionalWriteStrength, c as FileSystemCreateDirectoryMode, d as FileSystemCreateDirectoryOptions, e as FileSystemDirectorySnapshot, f as FileSystemDurability, g as FileSystemEntrySnapshot, h as FileSystemEntryWatchEvent, i as FileSystemFileRead, j as FileSystemFileSnapshot, k as FileSystemMoveOptions, l as FileSystemOverflowWatchEvent, m as FileSystemProviderCapabilities, n as FileSystemProviderV2, o as FileSystemRemoveOptions, p as FileSystemRemoveResult, q as FileSystemSnapshot, r as FileSystemSnapshotEntry, s as FileSystemSnapshotFile, t as FileSystemSymlinkPolicy, u as FileSystemVersion, v as FileSystemWatchErrorListener, w as FileSystemWatchEvent, x as FileSystemWatchEventOrigin, y as FileSystemWatchEventType, z as FileSystemWatchListener, A as FileSystemWatchOptions, B as FileSystemWatchSubscription, C as FileSystemWriteMode, D as FileSystemWriteOptions, E as FsError, G as FsErrorCode, H as FsErrorContext, I as FsOperation, S as SerializedFsError, J as deserializeFsError, K as fsErrorFromUnknown, L as isQuotaExceededError, M as isSerializedFsError, N as mapDomExceptionToFsErrorCode, O as mapNodeErrorCodeToFsErrorCode, P as parseFileSystemVersion, Q as serializeFsError, R as tryParseFileSystemVersion } from './v2-BVnZZyd4.js';
4
- export { DbkWorkspaceAssetLayout, DbkWorkspaceSnapshot, DbkWorkspaceSnapshotOptions, DecodeUtf8TextOptions, FileSystemContentContainer, FileSystemEntryMoveOptions, FileSystemEntryMoveState, FileSystemMoveLocation, FileSystemMoveRecoveryError, FileSystemPartialMoveError, FileSystemPartialMoveState, FileSystemPathPresence, LegacyFilePayloadModel, LegacyFileSystemProviderV2Adapter, LegacyFileSystemProviderV2AdapterOptions, MARKDOWN_FILE_EXTENSIONS, SQUISQ_RUNTIME_DIRECTORY_NAME, createDbkWorkspaceSnapshot, createFileMediaProvider, decodeUtf8Text, describeEntryMove, describePartialMove, documentCompanionPath, isBrowsableWorkspaceEntry, isCompanionDirectoryName, isDiscoverableWorkspaceEntry, isFileSystemMoveRecoveryError, isFileSystemMoveStateError, isFileSystemPartialMoveError, isIgnoredWorkspaceEntryName, isMarkdownFileName, moveFileSystemEntry, replaceMemoryWorkspaceFromDbk, rewriteCompanionReferences } from './filesystem/index.js';
4
+ export { F as FileSystemAtomicity, a as FileSystemCaseSensitivity, b as FileSystemConditionalWriteStrength, c as FileSystemCreateDirectoryMode, d as FileSystemCreateDirectoryOptions, e as FileSystemDirectorySnapshot, f as FileSystemDurability, g as FileSystemEntryReadIssue, h as FileSystemEntrySnapshot, i as FileSystemEntryWatchEvent, j as FileSystemFileRead, k as FileSystemFileSnapshot, l as FileSystemMoveOptions, m as FileSystemOverflowWatchEvent, n as FileSystemProviderCapabilities, o as FileSystemProviderV2, p as FileSystemRemoveOptions, q as FileSystemRemoveResult, r as FileSystemSnapshot, s as FileSystemSnapshotEntry, t as FileSystemSnapshotFile, u as FileSystemSymlinkPolicy, v as FileSystemVersion, w as FileSystemWatchErrorListener, x as FileSystemWatchEvent, y as FileSystemWatchEventOrigin, z as FileSystemWatchEventType, A as FileSystemWatchListener, B as FileSystemWatchOptions, C as FileSystemWatchSubscription, D as FileSystemWriteMode, E as FileSystemWriteOptions, G as FsError, H as FsErrorCode, I as FsErrorContext, J as FsOperation, S as SerializedFsError, K as deserializeFsError, L as fsErrorFromUnknown, M as isQuotaExceededError, N as isSerializedFsError, O as mapDomExceptionToFsErrorCode, P as mapNodeErrorCodeToFsErrorCode, Q as parseFileSystemVersion, R as serializeFsError, T as tryParseFileSystemVersion } from './v2-DwxWjFC0.js';
5
5
  export { MemoryFilePayloadKind, MemoryFileSystemProvider, MemoryFileSystemProviderV2, MemoryFileSystemSnapshot, MemoryFileSystemSnapshotFile, MemoryFileSystemV2CompatibilityFile, MemoryFileSystemV2Replacement, MemoryFileSystemV2ReplacementFile, MemoryFileSystemV2State, MemoryFileSystemV2StateFile } from './filesystem/memory.js';
6
6
  export { IndexedDBContentContainer, IndexedDBFileSystemProvider, IndexedDBFileSystemProviderV2, IndexedDBFileSystemProviderV2Options, IndexedDBLegacyConflictReason, IndexedDBLegacyConflictResolution, IndexedDBLegacyMigrationConflict, IndexedDBLegacyOpaqueDiscardTarget, IndexedDBLegacyOpaqueRecord, IndexedDBLegacyOpaqueRecordSummary, IndexedDBLegacyOpaqueValue, IndexedDBLegacyRecoveryCandidate, IndexedDBLegacyRecoveryKind } from './filesystem/indexeddb.js';
7
7
  export { NativeFileSystemMovePathState, NativeFileSystemMoveRecoveryError, NativeFileSystemMoveRecoveryState, NativeFileSystemProvider, NativeFileSystemProviderV2, isNativeFileSystemSupported, loadDirectoryHandle, openNativeFolder, removeDirectoryHandle, restoreNativeFolder, storeDirectoryHandle } from './filesystem/native.js';
8
8
  export { ElectronFileSystemProvider, ElectronFileSystemProviderV2 } from './filesystem/electron.js';
9
9
  export { DOCUMENT_RECOVERY_JOURNAL_SCHEMA_VERSION, DOCUMENT_RECOVERY_JOURNAL_STORAGE_KEY, DocumentCommitConflictError, DocumentCommitRequest, DocumentCommitResult, DocumentCommitTarget, DocumentConflictStrategy, DocumentExternalChangeResult, DocumentExternalSnapshot, DocumentExternalVersion, DocumentRecoveryAcknowledgement, DocumentRecoveryJournal, DocumentRecoveryJournalOptions, DocumentRecoveryRecord, DocumentRecoveryStorage, DocumentRecoveryWrite, DocumentRecoveryWriteFailure, DocumentRecoveryWriteResult, DocumentSaveReason, DocumentSession, DocumentSessionConflict, DocumentSessionConflictError, DocumentSessionEditScope, DocumentSessionLifecycle, DocumentSessionOptions, DocumentSessionSnapshot, DocumentSessionStatus, DocumentSessionTransition, FileSystemDocumentTargetOptions, createFileSystemDocumentTarget, getDefaultDocumentRecoveryStorage } from './document/index.js';
10
- export { DEFAULT_WORKSPACE_ID, ElectronWorkspaceReconciliation, TransientOrigin, WorkspaceDescriptor, ensureDefaultWorkspace, getTransientWorkspace, getWorkspace, listWorkspaces, parsePersistedWorkspaceList, reconcileElectronWorkspaceDescriptors, registerTransientWorkspace, removeWorkspace, saveWorkspace, touchWorkspace, unregisterTransientWorkspace } from './workspace/index.js';
10
+ export { D as DEFAULT_WORKSPACE_ID, E as ElectronWorkspaceReconciliation, T as TransientOrigin, W as WorkspaceDescriptor, e as ensureDefaultWorkspace, g as getTransientWorkspace, a as getWorkspace, l as listWorkspaces, p as parsePersistedWorkspaceList, r as reconcileElectronWorkspaceDescriptors, b as registerTransientWorkspace, c as removeWorkspace, s as saveWorkspace, t as touchWorkspace, u as unregisterTransientWorkspace } from './reconcile-electron-Ci2lhAdW.js';
11
11
  export { AI_WIRE_LIMITS, EXPORT_TRANSFER_LIMITS, HOST_WIRE_LIMITS, MAX_HOST_PINNED_DOCUMENTS, SPEECH_WIRE_LIMITS, getDocBlocksHost, getHostCapabilities, getHostEnvironment, hasDocBlocksHost, hostSupports, isBoundedBytePayload, isBoundedString, isElectronHost, isSpeechModelId, isTrustedRendererUrl, maybeGetDocBlocksHost, parseAiChatEvent, parseAiChatProgress, parseAiChatRequest, parseAiError, parseAiModelDownloadInfo, parseAiModelDownloadInfoList, parseAiModelInfo, parseAiModelInfoList, parseAiModelInstallEvent, parseAiPreferences, parseAiPreferencesPatch, parseAiProgress, parseAiStatus, parseExternalHttpUrl, parseOpenRequest, parsePinnedMenuDocuments, parseSpeechAudioChunk, parseSpeechCatalog, parseSpeechError, parseSpeechInstallEvent, parseSpeechModelInfo, parseSpeechModelKind, parseSpeechNullResult, parseSpeechPreferences, parseSpeechPreferencesPatch, parseSpeechProgress, parseSpeechReadiness, parseSpeechResult, parseSpeechStatus, parseSpeechSynthesisSummary, parseSpeechSynthesizeEvent, parseSpeechSynthesizeRequest, parseSpeechTranscribeRequest, parseSpeechTranscript, parseSpeechVoiceInfo } from './host/index.js';
12
12
  export { SHARED_DOCUMENT_LIMITS, SharedDocumentHashParseResult, SharedDocumentMode, SharedDocumentPayload, createSharedDocumentHash, createSharedDocumentUrl, parseSharedDocumentHash } from './share/index.js';
13
- export { A as AiChatCompletion, a as AiChatEvent, b as AiChatHandle, c as AiChatMessage, d as AiChatProgress, e as AiChatPurpose, f as AiChatRequest, g as AiConnectionStep, h as AiEnsureWorkspaceHandle, i as AiError, j as AiErrorCode, k as AiImageRequest, l as AiImageResult, m as AiKnowledgeAPI, n as AiKnowledgeAction, o as AiKnowledgeCatalog, p as AiKnowledgeState, q as AiModelDownloadInfo, r as AiModelFit, s as AiModelInfo, t as AiModelInstallEvent, u as AiModelInstallHandle, v as AiPreferences, w as AiPreferencesPatch, x as AiProgress, y as AiProviderInfo, z as AiResult, B as AiReviewMode, C as AiSearchHit, D as AiSearchQuery, E as AiSearchResult, F as AiSpeechAudio, G as AiStatus, H as AiSynthesizeRequest, I as AiTranscribeRequest, J as AiTranscript, K as AiUnavailableReason, L as DocBlocksHostAPI, M as DocBlocksHostAiAPI, N as DocBlocksHostClipboardAPI, O as DocBlocksHostExportAPI, P as DocBlocksHostExternalAPI, Q as DocBlocksHostFfmpegAPI, R as DocBlocksHostFsAPI, S as DocBlocksHostGitAPI, T as DocBlocksHostLifecycleAPI, U as DocBlocksHostMenuAPI, V as DocBlocksHostShellAPI, W as DocBlocksHostSpeechAPI, X as DocBlocksHostUpdaterAPI, Y as DocBlocksHostWorkspacesAPI, Z as ElectronWorkspaceInfo, _ as ExternalBinaryCommitResult, $ as GitBranchInfo, a0 as GitCapabilities, a1 as GitCloneHandle, a2 as GitCloneProgress, a3 as GitError, a4 as GitErrorCode, a5 as GitFileAtRevision, a6 as GitFileChange, a7 as GitFileStatusCode, a8 as GitLogEntry, a9 as GitLogOptions, aa as GitRemoteInfo, ab as GitRepoDetection, ac as GitResult, ad as GitRevision, ae as GitStatus, af as HOST_PLATFORMS, ag as HOST_SURFACE_KINDS, ah as HostCapabilities, ai as HostCloseReason, aj as HostEnvironment, ak as HostExportTargetGrant, al as HostPinnedDocument, am as HostPlatform, an as HostPrepareCloseRequest, ao as HostPrepareCloseResult, ap as HostSurfaceKind, aq as MenuCommand, ar as NO_HOST_CAPABILITIES, as as OpenRequest, at as SpeechAudioChunk, au as SpeechCatalog, av as SpeechError, aw as SpeechErrorCode, ax as SpeechInstallEvent, ay as SpeechInstallHandle, az as SpeechModelInfo, aA as SpeechModelKind, aB as SpeechPreferences, aC as SpeechPreferencesPatch, aD as SpeechProgress, aE as SpeechReadiness, aF as SpeechReadinessState, aG as SpeechResult, aH as SpeechSegment, aI as SpeechStatus, aJ as SpeechSynthesisHandle, aK as SpeechSynthesisSummary, aL as SpeechSynthesizeEvent, aM as SpeechSynthesizeRequest, aN as SpeechTranscribeRequest, aO as SpeechTranscript, aP as SpeechVoiceInfo, aQ as SpeechWordTiming, aR as UpdateCheckResult, aS as UpdateInstallResult, aT as UpdaterStatus, aU as deriveHostCapabilities, aV as parseAiKnowledgeAction, aW as parseAiKnowledgeState, aX as parseHostEnvironment } from './capabilities-r03EXSAi.js';
14
- export { D as DocBlocksHostFsV2API, E as ELECTRON_FILE_SYSTEM_V2_CAPABILITIES, F as FILE_SYSTEM_TRANSFER_LIMITS, H as HostFileSystemReadTransfer, a as HostFileSystemV2OpenRequest, b as HostFileSystemV2Result, c as HostFileSystemV2WatchMessage } from './filesystem-v2-C8AdSXUN.js';
13
+ export { A as AiChatCompletion, a as AiChatEvent, b as AiChatHandle, c as AiChatMessage, d as AiChatProgress, e as AiChatPurpose, f as AiChatRequest, g as AiConnectionStep, h as AiEnsureWorkspaceHandle, i as AiError, j as AiErrorCode, k as AiImageRequest, l as AiImageResult, m as AiKnowledgeAPI, n as AiKnowledgeAction, o as AiKnowledgeCatalog, p as AiKnowledgeState, q as AiModelDownloadInfo, r as AiModelFit, s as AiModelInfo, t as AiModelInstallEvent, u as AiModelInstallHandle, v as AiPreferences, w as AiPreferencesPatch, x as AiProgress, y as AiProviderInfo, z as AiResponseFormat, B as AiResult, C as AiReviewMode, D as AiSearchHit, E as AiSearchQuery, F as AiSearchResult, G as AiSpeechAudio, H as AiStatus, I as AiSynthesizeRequest, J as AiTranscribeRequest, K as AiTranscript, L as AiUnavailableReason, M as DocBlocksHostAPI, N as DocBlocksHostAiAPI, O as DocBlocksHostClipboardAPI, P as DocBlocksHostExportAPI, Q as DocBlocksHostExternalAPI, R as DocBlocksHostFfmpegAPI, S as DocBlocksHostFsAPI, T as DocBlocksHostGitAPI, U as DocBlocksHostLifecycleAPI, V as DocBlocksHostMenuAPI, W as DocBlocksHostShellAPI, X as DocBlocksHostSpeechAPI, Y as DocBlocksHostUpdaterAPI, Z as DocBlocksHostWorkspacesAPI, _ as ElectronWorkspaceInfo, $ as ExternalBinaryCommitResult, a0 as GitBranchInfo, a1 as GitCapabilities, a2 as GitCloneHandle, a3 as GitCloneProgress, a4 as GitError, a5 as GitErrorCode, a6 as GitFileAtRevision, a7 as GitFileChange, a8 as GitFileStatusCode, a9 as GitLogEntry, aa as GitLogOptions, ab as GitRemoteInfo, ac as GitRepoDetection, ad as GitResult, ae as GitRevision, af as GitStatus, ag as HOST_PLATFORMS, ah as HOST_SURFACE_KINDS, ai as HostCapabilities, aj as HostCloseReason, ak as HostEnvironment, al as HostExportTargetGrant, am as HostPinnedDocument, an as HostPlatform, ao as HostPrepareCloseRequest, ap as HostPrepareCloseResult, aq as HostSurfaceKind, ar as MenuCommand, as as NO_HOST_CAPABILITIES, at as OpenRequest, au as SpeechAudioChunk, av as SpeechCatalog, aw as SpeechError, ax as SpeechErrorCode, ay as SpeechInstallEvent, az as SpeechInstallHandle, aA as SpeechModelInfo, aB as SpeechModelKind, aC as SpeechPreferences, aD as SpeechPreferencesPatch, aE as SpeechProgress, aF as SpeechReadiness, aG as SpeechReadinessState, aH as SpeechResult, aI as SpeechSegment, aJ as SpeechStatus, aK as SpeechSynthesisHandle, aL as SpeechSynthesisSummary, aM as SpeechSynthesizeEvent, aN as SpeechSynthesizeRequest, aO as SpeechTranscribeRequest, aP as SpeechTranscript, aQ as SpeechVoiceInfo, aR as SpeechWordTiming, aS as UpdateCheckResult, aT as UpdateInstallResult, aU as UpdaterStatus, aV as deriveHostCapabilities, aW as parseAiKnowledgeAction, aX as parseAiKnowledgeState, aY as parseHostEnvironment } from './capabilities-DHwh4P4D.js';
14
+ export { D as DocBlocksHostFsV2API, E as ELECTRON_FILE_SYSTEM_V2_CAPABILITIES, F as FILE_SYSTEM_TRANSFER_LIMITS, H as HostFileSystemReadTransfer, a as HostFileSystemV2OpenRequest, b as HostFileSystemV2Result, c as HostFileSystemV2WatchMessage } from './filesystem-v2-CXdAPR27.js';
15
+ import '@bendyline/squisq/markdown';
15
16
  import '@bendyline/squisq/storage';
16
17
  import '@bendyline/squisq/schemas';
17
- import './host-provider-v2-CV0joXaL.js';
18
+ import './host-provider-v2-DEWMPiRD.js';
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  saveWorkspace,
12
12
  touchWorkspace,
13
13
  unregisterTransientWorkspace
14
- } from "./chunk-QS5WTLUZ.js";
14
+ } from "./chunk-XI2LYBRR.js";
15
15
  import {
16
16
  SHARED_DOCUMENT_LIMITS,
17
17
  createSharedDocumentHash,
@@ -24,10 +24,15 @@ import {
24
24
  createDbkWorkspaceSnapshot,
25
25
  createFileMediaProvider,
26
26
  documentCompanionPath,
27
+ ensureWikiArticle,
28
+ findWikiArticle,
27
29
  moveFileSystemEntry,
28
30
  replaceMemoryWorkspaceFromDbk,
29
- rewriteCompanionReferences
30
- } from "./chunk-7SN7YQL4.js";
31
+ resolveWikiArticlePath,
32
+ rewriteCompanionReferences,
33
+ suggestWikiArticles,
34
+ wikiArticleExists
35
+ } from "./chunk-LJLQYXVL.js";
31
36
  import {
32
37
  MARKDOWN_FILE_EXTENSIONS,
33
38
  SQUISQ_RUNTIME_DIRECTORY_NAME,
@@ -41,12 +46,12 @@ import {
41
46
  IndexedDBContentContainer,
42
47
  IndexedDBFileSystemProvider,
43
48
  IndexedDBFileSystemProviderV2
44
- } from "./chunk-HKOOHM67.js";
49
+ } from "./chunk-Q3OFZWJS.js";
45
50
  import "./chunk-DAPFSEKY.js";
46
51
  import {
47
52
  MemoryFileSystemProvider,
48
53
  MemoryFileSystemProviderV2
49
- } from "./chunk-UDEWLHQI.js";
54
+ } from "./chunk-LDAG5NTQ.js";
50
55
  import {
51
56
  NativeFileSystemMoveRecoveryError,
52
57
  NativeFileSystemProvider,
@@ -57,14 +62,14 @@ import {
57
62
  removeDirectoryHandle,
58
63
  restoreNativeFolder,
59
64
  storeDirectoryHandle
60
- } from "./chunk-6UPO2GE6.js";
65
+ } from "./chunk-K5HRMSXD.js";
61
66
  import "./chunk-DZB666V7.js";
62
- import "./chunk-KQ6756AJ.js";
67
+ import "./chunk-3GSMJ4MQ.js";
63
68
  import {
64
69
  ElectronFileSystemProvider,
65
70
  ElectronFileSystemProviderV2
66
- } from "./chunk-4I4AG2BH.js";
67
- import "./chunk-DFMRE22M.js";
71
+ } from "./chunk-P32NVUQL.js";
72
+ import "./chunk-EFGQUOTL.js";
68
73
  import {
69
74
  AI_WIRE_LIMITS,
70
75
  ELECTRON_FILE_SYSTEM_V2_CAPABILITIES,
@@ -117,7 +122,7 @@ import {
117
122
  parseSpeechTranscribeRequest,
118
123
  parseSpeechTranscript,
119
124
  parseSpeechVoiceInfo
120
- } from "./chunk-ZTSG7AC3.js";
125
+ } from "./chunk-64733GFL.js";
121
126
  import "./chunk-245W57QP.js";
122
127
  import {
123
128
  EXPORT_TRANSFER_LIMITS,
@@ -154,14 +159,14 @@ import {
154
159
  isFileSystemMoveRecoveryError,
155
160
  isFileSystemMoveStateError,
156
161
  isFileSystemPartialMoveError
157
- } from "./chunk-IGB2VSRE.js";
162
+ } from "./chunk-FIEMYP2N.js";
158
163
  import {
159
164
  getFileSystemProviderV2,
160
165
  hasFileSystemProviderV2
161
166
  } from "./chunk-XAMILHQP.js";
162
167
  import {
163
168
  decodeUtf8Text
164
- } from "./chunk-M5ZNQGR5.js";
169
+ } from "./chunk-IYKGM3PV.js";
165
170
  import {
166
171
  FsError,
167
172
  WORKSPACE_ROOT,
@@ -179,7 +184,7 @@ import {
179
184
  workspacePathDirname,
180
185
  workspacePathJoin,
181
186
  workspacePathToLegacy
182
- } from "./chunk-AYWKIZLD.js";
187
+ } from "./chunk-UTH3HYCZ.js";
183
188
  export {
184
189
  AI_WIRE_LIMITS,
185
190
  DEFAULT_WORKSPACE_ID,
@@ -229,6 +234,8 @@ export {
229
234
  deserializeFsError,
230
235
  documentCompanionPath,
231
236
  ensureDefaultWorkspace,
237
+ ensureWikiArticle,
238
+ findWikiArticle,
232
239
  fsErrorFromUnknown,
233
240
  getDefaultDocumentRecoveryStorage,
234
241
  getDocBlocksHost,
@@ -310,15 +317,18 @@ export {
310
317
  removeDirectoryHandle,
311
318
  removeWorkspace,
312
319
  replaceMemoryWorkspaceFromDbk,
320
+ resolveWikiArticlePath,
313
321
  restoreNativeFolder,
314
322
  rewriteCompanionReferences,
315
323
  saveWorkspace,
316
324
  serializeFsError,
317
325
  storeDirectoryHandle,
326
+ suggestWikiArticles,
318
327
  touchWorkspace,
319
328
  tryParseFileSystemVersion,
320
329
  tryParseWorkspacePath,
321
330
  unregisterTransientWorkspace,
331
+ wikiArticleExists,
322
332
  workspacePathBasename,
323
333
  workspacePathContains,
324
334
  workspacePathDirname,
package/dist/mcp/index.js CHANGED
@@ -11,8 +11,8 @@ import {
11
11
  parseMcpDiagnostic,
12
12
  parseMcpErrorResult,
13
13
  parsePreviewResult
14
- } from "../chunk-YWYT6K6J.js";
15
- import "../chunk-AYWKIZLD.js";
14
+ } from "../chunk-3LXXRIO2.js";
15
+ import "../chunk-UTH3HYCZ.js";
16
16
  export {
17
17
  DOCBLOCKS_MCP_TOOL_NAMES,
18
18
  DOCBLOCKS_MCP_WIRE_VERSION,
package/dist/mcp/zod.js CHANGED
@@ -5,8 +5,8 @@ import {
5
5
  parseConversionResult,
6
6
  parseInspectionResult,
7
7
  parsePreviewResult
8
- } from "../chunk-YWYT6K6J.js";
9
- import "../chunk-AYWKIZLD.js";
8
+ } from "../chunk-3LXXRIO2.js";
9
+ import "../chunk-UTH3HYCZ.js";
10
10
 
11
11
  // src/mcp/zod.ts
12
12
  import { z } from "zod";
@@ -0,0 +1,142 @@
1
+ import { d as FileSystemProvider } from './types-DLteNrK0.js';
2
+ import { _ as ElectronWorkspaceInfo, ak as HostEnvironment } from './capabilities-DHwh4P4D.js';
3
+
4
+ /**
5
+ * Origin of a transient workspace — records where its contents came from and
6
+ * how to save them back. Set only on `type: 'transient'` workspaces.
7
+ * - 'loose-file' — a single markdown file opened from the OS (Electron);
8
+ * edits write back through an owner-scoped `resourceId` grant.
9
+ * - 'dbk' — a `.dbk`/zip bundle unpacked into memory (Electron); edits are
10
+ * re-zipped and written back through an owner-scoped resource grant.
11
+ * - 'web-file' — a single markdown file launched into the installed web app
12
+ * (File Handling API); edits write back through `handle`.
13
+ * - 'web-dbk' — a `.dbk`/zip bundle launched into the installed web app;
14
+ * edits are re-zipped and written back through `handle`.
15
+ *
16
+ * The web variants hold a live `FileSystemFileHandle`. That is safe because
17
+ * transient descriptors are never persisted — they live only in the
18
+ * in-memory registry (see workspace-manager) for the current page session.
19
+ */
20
+ type TransientOrigin = {
21
+ kind: 'loose-file';
22
+ resourceId: string;
23
+ } | {
24
+ kind: 'dbk';
25
+ resourceId: string;
26
+ /** SHA-256 of the last bundle version acknowledged by the host. */
27
+ version: string | null;
28
+ } | {
29
+ kind: 'web-file';
30
+ handle: FileSystemFileHandle;
31
+ name: string;
32
+ } | {
33
+ kind: 'web-dbk';
34
+ handle: FileSystemFileHandle;
35
+ name: string;
36
+ /** SHA-256 of the last bundle version observed on disk. */
37
+ version: string | null;
38
+ };
39
+ /**
40
+ * Workspace — a named binding to a FileSystemProvider, representing
41
+ * the user's current working context (a folder of markdown files).
42
+ */
43
+ interface WorkspaceDescriptor {
44
+ /** Unique stable identifier (persisted in IndexedDB). */
45
+ id: string;
46
+ /** User-visible label. */
47
+ name: string;
48
+ /**
49
+ * Provider kind:
50
+ * - 'indexeddb' — browser-local storage (web only)
51
+ * - 'native' — File System Access API (web Chrome/Edge only)
52
+ * - 'host-native' — Electron main-process native filesystem
53
+ * - 'transient' — session-only, in-memory (a loose file/`.dbk` opened from
54
+ * the OS, or a document copied from a shared URL). Never persisted; its
55
+ * provider lives in an in-memory registry (see workspace-manager). An
56
+ * `origin` is present only when changes can be saved back externally.
57
+ */
58
+ type: 'indexeddb' | 'native' | 'host-native' | 'transient';
59
+ /** ISO timestamp of last access. */
60
+ lastOpened: string;
61
+ /** Absolute filesystem path for 'host-native' workspaces. */
62
+ rootPath?: string;
63
+ /** For 'transient' workspaces: where the contents came from / save back to. */
64
+ origin?: TransientOrigin;
65
+ /**
66
+ * Per-workspace override for the global versioning preference. When
67
+ * `'inherit'` (or absent), the global preference applies. `'on'` /
68
+ * `'off'` force the corresponding behavior regardless of the global
69
+ * setting. See `resolveVersioningEnabled` in the preferences module.
70
+ */
71
+ versioningOverride?: 'inherit' | 'on' | 'off';
72
+ }
73
+
74
+ /** Parse the complete persisted workspace list before it reaches startup code. */
75
+ declare function parsePersistedWorkspaceList(value: unknown): WorkspaceDescriptor[];
76
+
77
+ /**
78
+ * WorkspaceManager — manages the list of known workspaces in IndexedDB
79
+ * and provides helpers for creating / switching / removing them.
80
+ *
81
+ * The actual FileSystemProvider instances are created by the caller
82
+ * (since native providers need a DirectoryHandle from user interaction).
83
+ */
84
+
85
+ /** Id of the browser-local workspace `ensureDefaultWorkspace` creates. */
86
+ declare const DEFAULT_WORKSPACE_ID = "default";
87
+ /** Register a transient workspace and its (already-built) provider. */
88
+ declare function registerTransientWorkspace(descriptor: WorkspaceDescriptor, provider: FileSystemProvider): void;
89
+ /** Look up a transient workspace (descriptor + provider) by id, if any. */
90
+ declare function getTransientWorkspace(id: string): {
91
+ descriptor: WorkspaceDescriptor;
92
+ provider: FileSystemProvider;
93
+ } | null;
94
+ /** Forget a transient workspace (e.g. when it is closed). */
95
+ declare function unregisterTransientWorkspace(id: string): Promise<void>;
96
+ /**
97
+ * Get all known workspace descriptors — persisted plus any session-only
98
+ * transient ones (so they show in the picker and resolve for the session).
99
+ */
100
+ declare function listWorkspaces(): Promise<WorkspaceDescriptor[]>;
101
+ /**
102
+ * Get a specific workspace descriptor by id (transient or persisted).
103
+ */
104
+ declare function getWorkspace(id: string): Promise<WorkspaceDescriptor | null>;
105
+ /**
106
+ * Add or update a workspace descriptor. If a workspace with the same id
107
+ * already exists, it is replaced. Transient workspaces are never persisted.
108
+ */
109
+ declare function saveWorkspace(workspace: WorkspaceDescriptor): Promise<void>;
110
+ /**
111
+ * Remove a workspace descriptor by id (transient or persisted).
112
+ */
113
+ declare function removeWorkspace(id: string): Promise<void>;
114
+ /**
115
+ * Touch the lastOpened timestamp on a workspace. For transient workspaces this
116
+ * updates the in-memory descriptor only (nothing is persisted).
117
+ */
118
+ declare function touchWorkspace(id: string): Promise<void>;
119
+ /**
120
+ * Ensure a default IndexedDB workspace exists. Called on app startup.
121
+ * Returns the descriptor.
122
+ */
123
+ declare function ensureDefaultWorkspace(): Promise<WorkspaceDescriptor>;
124
+
125
+ interface ElectronWorkspaceReconciliation {
126
+ /** Obsolete renderer descriptors to remove before attempting restoration. */
127
+ readonly removeIds: readonly string[];
128
+ /** Canonical main-authorized descriptors to insert or replace. */
129
+ readonly upsert: readonly WorkspaceDescriptor[];
130
+ /** Safe navigation migration for a local descriptor matched by root. */
131
+ readonly idRemap: Readonly<Record<string, string>>;
132
+ }
133
+ /**
134
+ * Reconcile renderer IndexedDB metadata with the main process authority list.
135
+ * `hostWorkspaces` is authoritative: local Electron descriptors absent from
136
+ * it cannot be opened safely and are removed. Root-path matching carries user
137
+ * metadata across an id migration without treating that display path as
138
+ * authority.
139
+ */
140
+ declare function reconcileElectronWorkspaceDescriptors(local: readonly WorkspaceDescriptor[], hostWorkspaces: readonly ElectronWorkspaceInfo[], platform: HostEnvironment['platform'], now: string): ElectronWorkspaceReconciliation;
141
+
142
+ export { DEFAULT_WORKSPACE_ID as D, type ElectronWorkspaceReconciliation as E, type TransientOrigin as T, type WorkspaceDescriptor as W, getWorkspace as a, registerTransientWorkspace as b, removeWorkspace as c, ensureDefaultWorkspace as e, getTransientWorkspace as g, listWorkspaces as l, parsePersistedWorkspaceList as p, reconcileElectronWorkspaceDescriptors as r, saveWorkspace as s, touchWorkspace as t, unregisterTransientWorkspace as u };
@@ -1,4 +1,4 @@
1
- import { n as FileSystemProviderV2 } from './v2-BVnZZyd4.js';
1
+ import { g as FileSystemEntryReadIssue, o as FileSystemProviderV2 } from './v2-DwxWjFC0.js';
2
2
 
3
3
  /**
4
4
  * FileSystemProvider — abstract interface for a virtual filesystem.
@@ -14,6 +14,8 @@ interface FileEntry {
14
14
  path: string;
15
15
  /** ISO-8601 timestamp when the provider can supply file metadata while listing. */
16
16
  lastModified?: string;
17
+ /** Set when the provider listed the file but could not read it at the time. */
18
+ readIssue?: FileSystemEntryReadIssue;
17
19
  }
18
20
  interface FolderEntry {
19
21
  kind: 'directory';
@@ -92,9 +92,20 @@ interface FileSystemEntrySnapshotBase {
92
92
  /** ISO-8601 timestamp supplied by the backend; versions remain authoritative. */
93
93
  readonly lastModified: string;
94
94
  }
95
+ /** Why a listed file's bytes could not be read when it was observed. */
96
+ interface FileSystemEntryReadIssue {
97
+ readonly code: FsErrorCode;
98
+ readonly message: string;
99
+ }
95
100
  interface FileSystemFileSnapshot extends FileSystemEntrySnapshotBase {
96
101
  readonly kind: 'file';
97
102
  readonly size: number;
103
+ /**
104
+ * Present when a listing or watch observation could not read the file (a
105
+ * sync client holding it, an ACL). The entry stays listed, but its version
106
+ * then reflects metadata only; callers needing content must read the file.
107
+ */
108
+ readonly readIssue?: FileSystemEntryReadIssue;
98
109
  }
99
110
  interface FileSystemDirectorySnapshot extends FileSystemEntrySnapshotBase {
100
111
  readonly kind: 'directory';
@@ -215,4 +226,4 @@ interface FileSystemProviderV2 {
215
226
  dispose(): Promise<void>;
216
227
  }
217
228
 
218
- export { type FileSystemWatchOptions as A, type FileSystemWatchSubscription as B, type FileSystemWriteMode as C, type FileSystemWriteOptions as D, FsError as E, type FileSystemAtomicity as F, type FsErrorCode as G, type FsErrorContext as H, type FsOperation as I, deserializeFsError as J, fsErrorFromUnknown as K, isQuotaExceededError as L, isSerializedFsError as M, mapDomExceptionToFsErrorCode as N, mapNodeErrorCodeToFsErrorCode as O, parseFileSystemVersion as P, serializeFsError as Q, tryParseFileSystemVersion as R, type SerializedFsError as S, type FileSystemCaseSensitivity as a, type FileSystemConditionalWriteStrength as b, type FileSystemCreateDirectoryMode as c, type FileSystemCreateDirectoryOptions as d, type FileSystemDirectorySnapshot as e, type FileSystemDurability as f, type FileSystemEntrySnapshot as g, type FileSystemEntryWatchEvent as h, type FileSystemFileRead as i, type FileSystemFileSnapshot as j, type FileSystemMoveOptions as k, type FileSystemOverflowWatchEvent as l, type FileSystemProviderCapabilities as m, type FileSystemProviderV2 as n, type FileSystemRemoveOptions as o, type FileSystemRemoveResult as p, type FileSystemSnapshot as q, type FileSystemSnapshotEntry as r, type FileSystemSnapshotFile as s, type FileSystemSymlinkPolicy as t, type FileSystemVersion as u, type FileSystemWatchErrorListener as v, type FileSystemWatchEvent as w, type FileSystemWatchEventOrigin as x, type FileSystemWatchEventType as y, type FileSystemWatchListener as z };
229
+ export { type FileSystemWatchListener as A, type FileSystemWatchOptions as B, type FileSystemWatchSubscription as C, type FileSystemWriteMode as D, type FileSystemWriteOptions as E, type FileSystemAtomicity as F, FsError as G, type FsErrorCode as H, type FsErrorContext as I, type FsOperation as J, deserializeFsError as K, fsErrorFromUnknown as L, isQuotaExceededError as M, isSerializedFsError as N, mapDomExceptionToFsErrorCode as O, mapNodeErrorCodeToFsErrorCode as P, parseFileSystemVersion as Q, serializeFsError as R, type SerializedFsError as S, tryParseFileSystemVersion as T, type FileSystemCaseSensitivity as a, type FileSystemConditionalWriteStrength as b, type FileSystemCreateDirectoryMode as c, type FileSystemCreateDirectoryOptions as d, type FileSystemDirectorySnapshot as e, type FileSystemDurability as f, type FileSystemEntryReadIssue as g, type FileSystemEntrySnapshot as h, type FileSystemEntryWatchEvent as i, type FileSystemFileRead as j, type FileSystemFileSnapshot as k, type FileSystemMoveOptions as l, type FileSystemOverflowWatchEvent as m, type FileSystemProviderCapabilities as n, type FileSystemProviderV2 as o, type FileSystemRemoveOptions as p, type FileSystemRemoveResult as q, type FileSystemSnapshot as r, type FileSystemSnapshotEntry as s, type FileSystemSnapshotFile as t, type FileSystemSymlinkPolicy as u, type FileSystemVersion as v, type FileSystemWatchErrorListener as w, type FileSystemWatchEvent as x, type FileSystemWatchEventOrigin as y, type FileSystemWatchEventType as z };
@@ -5,6 +5,11 @@ import '../workspace-path-CWVrcuPL.js';
5
5
  * Typed message protocol between the extension host and webview.
6
6
  */
7
7
 
8
+ interface WikiSuggestionMessage {
9
+ target: string;
10
+ label: string;
11
+ kind: 'article' | 'folder';
12
+ }
8
13
  /**
9
14
  * Bounds for host-persisted proofing state.
10
15
  *
@@ -49,7 +54,7 @@ declare const DOCBLOCKS_WRITE_CANVAS_LINE_SPACING_MAX = 2.4;
49
54
  * registry, and the VS Code `package.json` enum in sync. `'theme'` is the
50
55
  * default and means "inherit from the active theme override".
51
56
  */
52
- declare const DOCBLOCKS_WRITE_CANVAS_FONT_SCHEMES: readonly ["theme", "serif-sans", "sans-sans", "serif-serif", "pt-serif", "hanken", "playfair-pt-serif", "hanken-lora", "dm-serif-dm-sans", "inter"];
57
+ declare const DOCBLOCKS_WRITE_CANVAS_FONT_SCHEMES: readonly ["theme", "serif-sans", "sans-sans", "serif-serif", "pt-serif", "hanken", "playfair-pt-serif", "hanken-lora", "dm-serif-dm-sans", "inter", "inconsolata"];
53
58
  type DocBlocksWriteCanvasFontScheme = (typeof DOCBLOCKS_WRITE_CANVAS_FONT_SCHEMES)[number];
54
59
  interface VscodeWriteCanvasSettings {
55
60
  textSize: number;
@@ -198,6 +203,18 @@ type ExtensionToWebviewMessage = {
198
203
  type: 'workspaceFileRead';
199
204
  requestId: number;
200
205
  dataBase64: string | null;
206
+ } | {
207
+ type: 'wikiLinkResult';
208
+ requestId: number;
209
+ exists: boolean;
210
+ } | {
211
+ type: 'wikiSuggestions';
212
+ requestId: number;
213
+ items: WikiSuggestionMessage[];
214
+ } | {
215
+ type: 'wikiLinkError';
216
+ requestId: number;
217
+ message: string;
201
218
  } | {
202
219
  type: 'workspaceFileError';
203
220
  requestId: number;
@@ -233,6 +250,15 @@ type WebviewToExtensionMessage = {
233
250
  } | {
234
251
  type: 'openLink';
235
252
  href: string;
253
+ } | {
254
+ type: 'wikiSuggestRequest';
255
+ requestId: number;
256
+ query: string;
257
+ } | {
258
+ type: 'wikiLinkRequest';
259
+ requestId: number;
260
+ target: string;
261
+ action: 'exists' | 'open' | 'create';
236
262
  } | {
237
263
  type: 'copyCode';
238
264
  requestId: number;
@@ -354,4 +380,4 @@ declare function isSafeMimeType(value: unknown): value is string;
354
380
  */
355
381
  declare function hasSubstantiveTextChange(baseline: string, candidate: string): boolean;
356
382
 
357
- export { DEFAULT_VSCODE_PROOFING_SETTINGS, DEFAULT_VSCODE_WRITE_CANVAS_SETTINGS, DOCBLOCKS_ACCENT_COLORS, DOCBLOCKS_WRITE_CANVAS_FONT_SCHEMES, DOCBLOCKS_WRITE_CANVAS_LINE_SPACING_MAX, DOCBLOCKS_WRITE_CANVAS_LINE_SPACING_MIN, DOCBLOCKS_WRITE_CANVAS_TEXT_SIZE_MAX, DOCBLOCKS_WRITE_CANVAS_TEXT_SIZE_MIN, type DocBlocksAccentColor, type DocBlocksWriteCanvasFontScheme, type DocumentConflictChoice, type DocumentConflictDetailsMessage, type DocumentSessionMessageStatus, type ExportTargetGrantMessage, type ExtensionToWebviewMessage, type MediaEntryMessage, PROOF_STATE_LIMITS, VSCODE_CATALOG_STATES, VSCODE_WORKSPACE_SETTINGS_STATUSES, type VscodeCatalogState, type VscodeEditorSettings, type VscodeProofingSettings, type VscodeWorkspaceSettingsState, type VscodeWorkspaceSettingsStatus, type VscodeWriteCanvasSettings, type WebviewToExtensionMessage, hasSubstantiveTextChange, isDocBlocksAccentColor, isDocBlocksWriteCanvasFontScheme, isDocBlocksWriteCanvasLineSpacing, isDocBlocksWriteCanvasTextSize, isSafeExportFilename, isSafeMimeType, normalizeDocBlocksAccentColor, parseExtensionToWebviewMessage, parseVscodeWorkspaceSettingsState, parseWebviewToExtensionMessage };
383
+ export { DEFAULT_VSCODE_PROOFING_SETTINGS, DEFAULT_VSCODE_WRITE_CANVAS_SETTINGS, DOCBLOCKS_ACCENT_COLORS, DOCBLOCKS_WRITE_CANVAS_FONT_SCHEMES, DOCBLOCKS_WRITE_CANVAS_LINE_SPACING_MAX, DOCBLOCKS_WRITE_CANVAS_LINE_SPACING_MIN, DOCBLOCKS_WRITE_CANVAS_TEXT_SIZE_MAX, DOCBLOCKS_WRITE_CANVAS_TEXT_SIZE_MIN, type DocBlocksAccentColor, type DocBlocksWriteCanvasFontScheme, type DocumentConflictChoice, type DocumentConflictDetailsMessage, type DocumentSessionMessageStatus, type ExportTargetGrantMessage, type ExtensionToWebviewMessage, type MediaEntryMessage, PROOF_STATE_LIMITS, VSCODE_CATALOG_STATES, VSCODE_WORKSPACE_SETTINGS_STATUSES, type VscodeCatalogState, type VscodeEditorSettings, type VscodeProofingSettings, type VscodeWorkspaceSettingsState, type VscodeWorkspaceSettingsStatus, type VscodeWriteCanvasSettings, type WebviewToExtensionMessage, type WikiSuggestionMessage, hasSubstantiveTextChange, isDocBlocksAccentColor, isDocBlocksWriteCanvasFontScheme, isDocBlocksWriteCanvasLineSpacing, isDocBlocksWriteCanvasTextSize, isSafeExportFilename, isSafeMimeType, normalizeDocBlocksAccentColor, parseExtensionToWebviewMessage, parseVscodeWorkspaceSettingsState, parseWebviewToExtensionMessage };
@@ -1,15 +1,18 @@
1
1
  import {
2
2
  parseWorkspaceSettings,
3
3
  parseWorkspaceSettingsPatch
4
- } from "../chunk-UK7R3RC7.js";
4
+ } from "../chunk-BC42VRYW.js";
5
5
  import {
6
6
  HOST_WIRE_LIMITS,
7
7
  isBoundedString
8
8
  } from "../chunk-46AGYHDY.js";
9
- import "../chunk-AYWKIZLD.js";
9
+ import "../chunk-UTH3HYCZ.js";
10
10
 
11
11
  // src/vscode/messages.ts
12
12
  var MAX_REQUEST_ID = 2147483647;
13
+ function isWikiSuggestion(value) {
14
+ return isRecord(value) && hasOnlyKeys(value, ["target", "label", "kind"]) && hasBoundedString(value, "target", 2048, 1) && hasBoundedString(value, "label", 2048, 1) && (value.kind === "article" || value.kind === "folder");
15
+ }
13
16
  var PROOF_STATE_LIMITS = Object.freeze({
14
17
  dictionaryWords: 5e3,
15
18
  wordCharacters: 128,
@@ -38,7 +41,8 @@ var DOCBLOCKS_WRITE_CANVAS_FONT_SCHEMES = [
38
41
  "playfair-pt-serif",
39
42
  "hanken-lora",
40
43
  "dm-serif-dm-sans",
41
- "inter"
44
+ "inter",
45
+ "inconsolata"
42
46
  ];
43
47
  var DEFAULT_VSCODE_WRITE_CANVAS_SETTINGS = {
44
48
  textSize: 16,
@@ -80,6 +84,15 @@ function parseWebviewToExtensionMessage(value) {
80
84
  }
81
85
  case "openLink":
82
86
  return hasOnlyKeys(value, ["type", "href"]) && hasBoundedString(value, "href", HOST_WIRE_LIMITS.urlCharacters, 1) ? { type: "openLink", href: value.href } : null;
87
+ case "wikiSuggestRequest":
88
+ return hasOnlyKeys(value, ["type", "requestId", "query"]) && hasRequestId(value) && hasBoundedString(value, "query", 2048, 0) ? { type: "wikiSuggestRequest", requestId: value.requestId, query: value.query } : null;
89
+ case "wikiLinkRequest":
90
+ return hasOnlyKeys(value, ["type", "requestId", "target", "action"]) && hasRequestId(value) && hasBoundedString(value, "target", 2048, 1) && (value.action === "exists" || value.action === "open" || value.action === "create") ? {
91
+ type: "wikiLinkRequest",
92
+ requestId: value.requestId,
93
+ target: value.target,
94
+ action: value.action
95
+ } : null;
83
96
  case "copyCode":
84
97
  return hasOnlyKeys(value, ["type", "requestId", "code"]) && hasRequestId(value) && hasBoundedString(value, "code", HOST_WIRE_LIMITS.documentCharacters) ? { type: "copyCode", requestId: value.requestId, code: value.code } : null;
85
98
  case "edit":
@@ -299,6 +312,7 @@ function parseExtensionToWebviewMessage(value) {
299
312
  case "exportError":
300
313
  case "proofStateError":
301
314
  case "workspaceFileError":
315
+ case "wikiLinkError":
302
316
  return hasOnlyKeys(value, ["type", "requestId", "message"]) && hasRequestId(value) && hasBoundedString(value, "message", HOST_WIRE_LIMITS.messageCharacters, 1) ? { type: value.type, requestId: value.requestId, message: value.message } : null;
303
317
  case "exportSaved":
304
318
  case "exportTargetResolved":
@@ -309,6 +323,10 @@ function parseExtensionToWebviewMessage(value) {
309
323
  const target = parseExportTargetGrant(value.target);
310
324
  return target !== void 0 ? { type: value.type, requestId: value.requestId, target } : null;
311
325
  }
326
+ case "wikiSuggestions":
327
+ return hasOnlyKeys(value, ["type", "requestId", "items"]) && hasRequestId(value) && Array.isArray(value.items) && value.items.length <= 20 && value.items.every(isWikiSuggestion) ? { type: "wikiSuggestions", requestId: value.requestId, items: value.items } : null;
328
+ case "wikiLinkResult":
329
+ return hasOnlyKeys(value, ["type", "requestId", "exists"]) && hasRequestId(value) && typeof value.exists === "boolean" ? { type: "wikiLinkResult", requestId: value.requestId, exists: value.exists } : null;
312
330
  case "workspaceFileRead":
313
331
  return hasOnlyKeys(value, ["type", "requestId", "dataBase64"]) && hasRequestId(value) && hasNullableBoundedString(value, "dataBase64", HOST_WIRE_LIMITS.base64Characters) ? { type: "workspaceFileRead", requestId: value.requestId, dataBase64: value.dataBase64 } : null;
314
332
  case "workspaceSettings": {