@bendyline/gezel-service 1.0.7 → 1.1.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/dist/bin/gezeld.js +6253 -3616
- package/dist/handboek-content/whats-new/1.26224.md +1 -0
- package/dist/handboek-content/whats-new/1.26226.md +1 -0
- package/dist/handboek-content/whats-new/1.26231.md +1 -0
- package/dist/handboek-content/whats-new/1.26234.md +1 -0
- package/dist/handboek-content/whats-new/1.26237.md +1 -0
- package/dist/handboek-content/whats-new/1.26244.md +2 -1
- package/dist/handboek-content/whats-new/1.26247.md +88 -0
- package/dist/handboek-content/whats-new/whats-new-index.md +1 -0
- package/dist/index-store/static-index-worker.js +17 -1
- package/dist/index.d.ts +473 -209
- package/dist/index.js +6251 -3614
- package/dist/memory/embed-worker.js +58 -2
- package/dist/memory/image-embed-worker.js +8 -0
- package/dist/providers/llama-cpp/gguf-metadata-worker.js +2 -0
- package/dist/providers/mlx/python/gezel_mlx_server.py +18 -18
- package/dist/ui/assets/AmbientDashboardCard-Cf5fi_fY.js +1 -0
- package/dist/ui/assets/{AudioEngineSettings-BDrNIGGm.js → AudioEngineSettings-D3L7HOHe.js} +1 -1
- package/dist/ui/assets/{BenchmarksView-CHyujjs8.js → BenchmarksView-B68hrLCl.js} +1 -1
- package/dist/ui/assets/CatalogBrowser-DEM9t7Es.js +1 -0
- package/dist/ui/assets/{ChannelsSettings-Be_W1mr8.js → ChannelsSettings-DtK_k0Ul.js} +1 -1
- package/dist/ui/assets/ChatTimelineView-CQ4Sf4Ip.js +7 -0
- package/dist/ui/assets/ConfirmDialog-Dt1ed4Fh.js +1 -0
- package/dist/ui/assets/ConnectedAppsPanel-Cl8LEkrt.js +1 -0
- package/dist/ui/assets/CraftbookEditor-DEQRlQ2p.js +1 -0
- package/dist/ui/assets/{CraftbookScriptEditorView-DXIZYZT3.js → CraftbookScriptEditorView-DhXkkIdK.js} +1 -1
- package/dist/ui/assets/{CraftbookTabContent-Bm7t_b37.js → CraftbookTabContent-_oIdpQTG.js} +1 -1
- package/dist/ui/assets/{CraftbookToolsetSetup-DTEA-3K3.js → CraftbookToolsetSetup-BKg136L1.js} +1 -1
- package/dist/ui/assets/{CraftbooksView-C4X99TTe.js → CraftbooksView-Dm2zH-nW.js} +2 -2
- package/dist/ui/assets/{DiffpackReviewView-ClcNxtmF.js → DiffpackReviewView-EFLGJnwr.js} +1 -1
- package/dist/ui/assets/DocumentDetail-ClDRj2N-.js +1 -0
- package/dist/ui/assets/DocumentsView-ny9oieg2.js +1 -0
- package/dist/ui/assets/DropdownMenu-S4d9-3j3.js +1 -0
- package/dist/ui/assets/Ds4Settings-CeWlm5Vf.js +1 -0
- package/dist/ui/assets/EmbeddedChat-Hjrrgpao.js +1 -0
- package/dist/ui/assets/{FaceRecognitionCard-D3hdc7uU.js → FaceRecognitionCard-D7ufKqjI.js} +1 -1
- package/dist/ui/assets/FileMapView-DRjf59RH.js +1 -0
- package/dist/ui/assets/{FoldersSettings-BcNzl4vT.js → FoldersSettings-DDUhaFio.js} +1 -1
- package/dist/ui/assets/GezelDetail-Cph6pVGb.js +1 -0
- package/dist/ui/assets/{GezelJsonEditor-fOvYclu9.js → GezelJsonEditor-7vDGyBib.js} +1 -1
- package/dist/ui/assets/{GezellenView-BTzhHrxi.js → GezellenView-DQhcO1CP.js} +1 -1
- package/dist/ui/assets/{GildeUpdatesCard-Bq6XEpLP.js → GildeUpdatesCard-UKKNm_U8.js} +1 -1
- package/dist/ui/assets/{GithubSignInChip-CnlTCG8G.js → GithubSignInChip-DjM3qZsL.js} +1 -1
- package/dist/ui/assets/{HandboekMediaProvider-BfQW8_Nr.js → HandboekMediaProvider-DixaXTAH.js} +1 -1
- package/dist/ui/assets/HandboekView-BeNQqho9.js +1 -0
- package/dist/ui/assets/HistoryView-E2szGNGS.js +1 -0
- package/dist/ui/assets/{HomeView-CB_5TJIp.css → HomeView-CNeqCFPc.css} +1 -1
- package/dist/ui/assets/HomeView-CkiS3DXy.js +1 -0
- package/dist/ui/assets/{ImageEngineSettings-BpMfQy4f.js → ImageEngineSettings-BCKT7Gvi.js} +1 -1
- package/dist/ui/assets/{ImageRecognitionSettings-Ct-7-Oas.js → ImageRecognitionSettings-DD6syFez.js} +1 -1
- package/dist/ui/assets/IncompleteDownloads-BiPaaahS.js +1 -0
- package/dist/ui/assets/InstallProgressRow-DyKOI4MU.js +1 -0
- package/dist/ui/assets/KnowledgeCatalogsCard-B132vzRa.js +1 -0
- package/dist/ui/assets/KnowledgeView-CtPuIlN4.js +1 -0
- package/dist/ui/assets/LlamaCppSettings-D6zHcu4W.js +1 -0
- package/dist/ui/assets/{MarkdownField-D-0Zw7gM.js → MarkdownField-CK8K3fzj.js} +1 -1
- package/dist/ui/assets/MemoriesTree-DzjXzIrM.js +1 -0
- package/dist/ui/assets/{MicrophoneSettings-BIaFxyY_.js → MicrophoneSettings-1FH83SCq.js} +1 -1
- package/dist/ui/assets/MlxSettings-BYxUqFnJ.js +1 -0
- package/dist/ui/assets/ModelPicker-DoXPfQkQ.js +1 -0
- package/dist/ui/assets/{NewScriptDialog-D-gkY8TS.js → NewScriptDialog-C5X-7PMt.js} +1 -1
- package/dist/ui/assets/NewTaskDialog-Cyqtmigv.js +2 -0
- package/dist/ui/assets/{OllamaSettings-oIE2Mech.js → OllamaSettings-DkjmA-sB.js} +1 -1
- package/dist/ui/assets/ProjectChat-YEqUME6k.js +5 -0
- package/dist/ui/assets/{ProjectConnectionsTab-BZqp-oKI.js → ProjectConnectionsTab-dFCJpW93.js} +1 -1
- package/dist/ui/assets/ProjectGitStatusBar-CjZxG54t.js +1 -0
- package/dist/ui/assets/{ProjectGithubView-w8suLCsA.js → ProjectGithubView-CQ4-tmPx.js} +1 -1
- package/dist/ui/assets/{ProjectMailTab-DGo7eyB8.js → ProjectMailTab-NaScsZJf.js} +1 -1
- package/dist/ui/assets/ProjectOverviewView-ChjxbQas.js +1 -0
- package/dist/ui/assets/{ProjectTimeline-DRe3D9qY.js → ProjectTimeline-BZpdCisR.js} +1 -1
- package/dist/ui/assets/ProjectsView-J77ECk6V.js +7 -0
- package/dist/ui/assets/{RecommendedBadge-BKiDixnB.js → RecommendedBadge-D0m68PAu.js} +1 -1
- package/dist/ui/assets/{RemoteServersPanel-DGyl6-Rg.js → RemoteServersPanel-BdLOoORu.js} +1 -1
- package/dist/ui/assets/ScriptEditorTabs-BFvIiDFZ.js +2 -0
- package/dist/ui/assets/ScriptEditorView-B09rm1vz.js +5 -0
- package/dist/ui/assets/{ScriptsView-WQc28TmQ.js → ScriptsView-BvNAJXpo.js} +1 -1
- package/dist/ui/assets/{SecurityComplianceSettings-DsMEA4J3.js → SecurityComplianceSettings-DzGOnptO.js} +1 -1
- package/dist/ui/assets/SessionSwitcher-6okzcxT7.js +1 -0
- package/dist/ui/assets/SettingsView-Dur4dLhW.js +3 -0
- package/dist/ui/assets/SquisqIntegration-6v3yNOIP.js +2 -0
- package/dist/ui/assets/{StorageCleanupDialog-DHqwyMZZ.js → StorageCleanupDialog-OQlomMJD.js} +1 -1
- package/dist/ui/assets/{StorageUsageCard-CdT6SU51.js → StorageUsageCard-f6c6qTbM.js} +1 -1
- package/dist/ui/assets/Tabs-jE0Z5Tzd.js +1 -0
- package/dist/ui/assets/TaskTabContent-0w3kAUWR.js +1 -0
- package/dist/ui/assets/TasksView-BVMT4BAY.js +1 -0
- package/dist/ui/assets/{TerminalCodeEditor-77pBm6f3.js → TerminalCodeEditor-DO7zLKy-.js} +2 -2
- package/dist/ui/assets/ToolsetsEditor-Bb1wD5mV.js +8 -0
- package/dist/ui/assets/TransformToolbarButton-BWYkEB0d.js +5 -0
- package/dist/ui/assets/UnrecognizedModels-HtdMZUqK.js +1 -0
- package/dist/ui/assets/{VideoEngineSettings-DzMeINuv.js → VideoEngineSettings-Dq8Nw_tK.js} +1 -1
- package/dist/ui/assets/{WorkspaceIndexPane-DU4yd4Ai.js → WorkspaceIndexPane-fpDz4MwZ.js} +1 -1
- package/dist/ui/assets/{api-BX5xXiFs.js → api-BPraLwsh.js} +1 -1
- package/dist/ui/assets/chat-thread-memory-Be48zsyG.js +1 -0
- package/dist/ui/assets/chunk-6ECMNUIP-DDVjPyfK.js +15 -0
- package/dist/ui/assets/{chunk-6N2J7C2B-B5QIrD9m.js → chunk-6N2J7C2B-CsppiLVr.js} +1 -1
- package/dist/ui/assets/{chunk-A6N6IN3I-DXok09eC.js → chunk-A6N6IN3I-ofeM4l8g.js} +1 -1
- package/dist/ui/assets/chunk-B7GEAZBI-Divd2h1k.js +1 -0
- package/dist/ui/assets/chunk-DXYWKZ52-BXcAlClu.js +1 -0
- package/dist/ui/assets/chunk-FLR2ARKC-D7wrvQgT.js +2 -0
- package/dist/ui/assets/chunk-IIQYS2YH-DKZhWMpn.js +1 -0
- package/dist/ui/assets/{chunk-ILCJ3WFD-WRukZ7R1.js → chunk-ILCJ3WFD-CLZxw4Ge.js} +3 -3
- package/dist/ui/assets/chunk-OBADJV7C-CDVOcmYt.js +1 -0
- package/dist/ui/assets/chunk-Q77KNJIN-BIDRf0aP.js +6 -0
- package/dist/ui/assets/chunk-S5PCVMKU-Df5XzhSE.js +6 -0
- package/dist/ui/assets/chunk-UBFT2CDQ-FexGDigd.js +31 -0
- package/dist/ui/assets/{chunk-USU6HTKB-D5FmDzJU.js → chunk-USU6HTKB-B_p-YcDp.js} +1 -1
- package/dist/ui/assets/chunk-VKXOZTYP-BoVvWSBR.js +5 -0
- package/dist/ui/assets/{chunk-6RQOV3B3-CwvKotJw.js → chunk-VPWPEMZJ-DRKoa_j0.js} +1 -1
- package/dist/ui/assets/{chunk-WATAOG4Y-DXg2lov5.js → chunk-WATAOG4Y-C1EXVPmG.js} +1 -1
- package/dist/ui/assets/{container-B7jJtK5V.js → container-Ce94efbg.js} +1 -1
- package/dist/ui/assets/csv-62UGQMzZ.js +1 -0
- package/dist/ui/assets/data-B2kHjlc5.js +1 -0
- package/dist/ui/assets/dist-B9-VrAP8.js +2 -0
- package/dist/ui/assets/dist-BaHut5iX.js +2 -0
- package/dist/ui/assets/dist-BqGwkOe5.js +225 -0
- package/dist/ui/assets/dist-ZnIgkoEi.js +4 -0
- package/dist/ui/assets/{dist-BHl1ZAVG.js → dist-l6uUFZMV.js} +2 -2
- package/dist/ui/assets/dist-pLLFUPO-.js +1 -0
- package/dist/ui/assets/{doc-s6H7T0IO.js → doc-Dr5K49bx.js} +28 -28
- package/dist/ui/assets/document-companion-BQk2kS0F.js +1 -0
- package/dist/ui/assets/document-import-QoM9UxJr.js +1 -0
- package/dist/ui/assets/docx-sXa1Rf41.js +2 -0
- package/dist/ui/assets/{epub-B98SgHBz.js → epub-RopMP0ec.js} +4 -4
- package/dist/ui/assets/{export-options-Bu-tI6og.js → export-options-f7PKjEBb.js} +1 -1
- package/dist/ui/assets/extract-UTAOG7LV-4WDRw1o4.js +1 -0
- package/dist/ui/assets/file-browser-c2tf4MIb.js +5 -0
- package/dist/ui/assets/html-BGVOMhkv.js +253 -0
- package/dist/ui/assets/icons-DWaUNQbT.js +1 -0
- package/dist/ui/assets/images-JLBFCDD4-6JitW0hD.js +1 -0
- package/dist/ui/assets/index-B8NcxqcR.css +1 -0
- package/dist/ui/assets/index-C0DYtvfg.js +34 -0
- package/dist/ui/assets/index-J8TOMdvV.js +2 -0
- package/dist/ui/assets/{infer-kCLH1C8z.js → infer-LEGOsu64.js} +2 -2
- package/dist/ui/assets/ironcalc-BAi5gOlE.js +3 -0
- package/dist/ui/assets/layouts-2A7QNF6Y-CVwP7noP.js +1 -0
- package/dist/ui/assets/{mail-link-CI6YD6k2.js → mail-link-DXkmCd5b.js} +1 -1
- package/dist/ui/assets/markdown-baseline-9B52XlX2.js +1 -0
- package/dist/ui/assets/{markdown-Bi9b5f5Y.js → markdown-ryKA_OmY.js} +1 -1
- package/dist/ui/assets/materialize-A34OZGEU-xNNKzytx.js +1 -0
- package/dist/ui/assets/model-inventory-ykSm_IT5.js +1 -0
- package/dist/ui/assets/{model-quantization-BDzrELN_.js → model-quantization-CLO7XLoF.js} +1 -1
- package/dist/ui/assets/{monaco-base-BiVSa1J-.js → monaco-base-B1H1U1Sw.js} +1 -1
- package/dist/ui/assets/{monaco-setup-UeltVkg_.js → monaco-setup-DjhrGQui.js} +1 -1
- package/dist/ui/assets/{new-project-meta-0xhggGA_.js → new-project-meta-_f9sfcRX.js} +1 -1
- package/dist/ui/assets/outside-in-D73N1g_b.js +3 -0
- package/dist/ui/assets/{pdf-DgTjy3rN.js → pdf-BOjVDlCK.js} +3 -3
- package/dist/ui/assets/{pending-drafts-YVW6X55O.js → pending-drafts-B11MKQ9R.js} +1 -1
- package/dist/ui/assets/{poppetje-Ce-02Aqi.js → poppetje-DLB8uevw.js} +2 -2
- package/dist/ui/assets/pptx-BuxyNxQh.js +6 -0
- package/dist/ui/assets/primitives-CWrGZpPI.js +41 -0
- package/dist/ui/assets/run-export-ChaMXrKS.js +23 -0
- package/dist/ui/assets/squisq-formats-aAdypXoy.js +1 -0
- package/dist/ui/assets/standalone-source-q_Zzd1bd.js +11 -0
- package/dist/ui/assets/storage-D8pE2zg0.js +1 -0
- package/dist/ui/assets/styles-BhnF3s2q.css +1 -0
- package/dist/ui/assets/styles-CKVKwqoQ.js +550 -0
- package/dist/ui/assets/table-fcouR4db.js +1 -0
- package/dist/ui/assets/{terminal-monaco-setup-DNoK2tN4.js → terminal-monaco-setup-BAzrVzeR.js} +1 -1
- package/dist/ui/assets/{useCompactLayout-BarJPYcv.js → useCompactLayout-Dtolvzye.js} +0 -0
- package/dist/ui/assets/{useCopilotAvailability-BH1nLXQI.js → useCopilotAvailability-3xZvKgTF.js} +1 -1
- package/dist/ui/assets/{useDiffpacks-CK8W_OD_.js → useDiffpacks-Dsnr0wtX.js} +1 -1
- package/dist/ui/assets/{useGitSync-DWxX5-7K.js → useGitSync-BCTptQsp.js} +1 -1
- package/dist/ui/assets/{useShowWorkInProgressFeatures-DwwviLRO.js → useShowWorkInProgressFeatures-BhDNuQiU.js} +1 -1
- package/dist/ui/assets/{useTotalRamBytes-WoN_mi-V.js → useTotalRamBytes-DIx-_pf8.js} +1 -1
- package/dist/ui/assets/wasm-DdxEDD2H.js +1 -0
- package/dist/ui/assets/wasm_bg-DW9Xt_vt.wasm +0 -0
- package/dist/ui/assets/xlsx-DyBGuAO1.js +4 -0
- package/dist/ui/index.html +19 -18
- package/package.json +11 -11
- package/dist/ui/assets/AmbientDashboardCard-C1Ee-FKZ.js +0 -1
- package/dist/ui/assets/CatalogBrowser-Bz8ZtxPn.js +0 -1
- package/dist/ui/assets/ChatTimelineView-Do9EryEH.js +0 -7
- package/dist/ui/assets/ConfirmDialog-BHFs6vmJ.js +0 -1
- package/dist/ui/assets/ConnectedAppsPanel-BtMayq0R.js +0 -1
- package/dist/ui/assets/CraftbookEditor-D5jTzWwF.js +0 -1
- package/dist/ui/assets/DocumentDetail-CPU51d04.js +0 -1
- package/dist/ui/assets/DocumentsView-B6OyjvJ0.js +0 -1
- package/dist/ui/assets/DropdownMenu-D5fCzIrh.js +0 -1
- package/dist/ui/assets/Ds4Settings-CrUM_KGP.js +0 -1
- package/dist/ui/assets/EmbeddedChat-ue9ia-WY.js +0 -1
- package/dist/ui/assets/FileMapView-CxvfDLGA.js +0 -1
- package/dist/ui/assets/GezelDetail-DHuqBK55.js +0 -1
- package/dist/ui/assets/HandboekView-CPnnyj29.js +0 -1
- package/dist/ui/assets/HistoryView-B4VAfEMe.js +0 -1
- package/dist/ui/assets/HomeView-ccH60J6f.js +0 -1
- package/dist/ui/assets/KnowledgeCatalogsCard-Bi5Rx9Iz.js +0 -1
- package/dist/ui/assets/KnowledgeView-DAwjwLZo.js +0 -1
- package/dist/ui/assets/LlamaCppSettings-Ceyk9pDP.js +0 -1
- package/dist/ui/assets/MemoriesTree-BKZEPJpm.js +0 -1
- package/dist/ui/assets/MlxSettings-CG3wfuc3.js +0 -1
- package/dist/ui/assets/ModelPicker-CCBVjLMS.js +0 -1
- package/dist/ui/assets/NewPathDialog-D4jnNBfP.js +0 -1
- package/dist/ui/assets/NewTaskDialog-Ox9D612Z.js +0 -2
- package/dist/ui/assets/ProjectChat-DMwKnkW-.js +0 -5
- package/dist/ui/assets/ProjectGitStatusBar-C6bkCSby.js +0 -1
- package/dist/ui/assets/ProjectOverviewView-NNwXd_QQ.js +0 -1
- package/dist/ui/assets/ProjectsView-SBPgYOq8.js +0 -7
- package/dist/ui/assets/ScriptEditorTabs-paocQ6dj.js +0 -2
- package/dist/ui/assets/ScriptEditorView-N9zSLqqi.js +0 -5
- package/dist/ui/assets/SessionSwitcher-C8te7YSe.js +0 -1
- package/dist/ui/assets/SettingsView-Brl4JQkW.js +0 -3
- package/dist/ui/assets/Tabs-BAY1Q79B.js +0 -1
- package/dist/ui/assets/TaskTabContent-CNPJ4DQj.js +0 -1
- package/dist/ui/assets/TasksView-DuMjFS8S.js +0 -1
- package/dist/ui/assets/ToolsetsEditor-BdxHnIBj.js +0 -8
- package/dist/ui/assets/TransformToolbarButton-CVg5nz36.js +0 -5
- package/dist/ui/assets/UnrecognizedModels-Cw9Ku_bW.js +0 -1
- package/dist/ui/assets/chat-thread-memory-CZGcwgGo.js +0 -1
- package/dist/ui/assets/chunk-6ECMNUIP-C1kohb1U.js +0 -15
- package/dist/ui/assets/chunk-AONELFLA-Cv2nS9ga.js +0 -1
- package/dist/ui/assets/chunk-IIQYS2YH-Dxg6MAfT.js +0 -1
- package/dist/ui/assets/chunk-MIKKUKOD-XIkmalSN.js +0 -31
- package/dist/ui/assets/chunk-NNJLSQPW-DJA6camf.js +0 -5
- package/dist/ui/assets/chunk-S5PCVMKU-DbCZ5AUH.js +0 -6
- package/dist/ui/assets/csv-xmd1_Aqd.js +0 -4
- package/dist/ui/assets/dist-BPx-FyRH.js +0 -222
- package/dist/ui/assets/dist-Bvo52IGx.js +0 -1
- package/dist/ui/assets/dist-D5aoNQwk.js +0 -2
- package/dist/ui/assets/docx-Cj4A9MhC.js +0 -2
- package/dist/ui/assets/extract-UTAOG7LV-C4b7ycaL.js +0 -1
- package/dist/ui/assets/file-browser-80qWoVju.js +0 -5
- package/dist/ui/assets/html-C9TlzI57.js +0 -253
- package/dist/ui/assets/icons-C9dD-bDi.js +0 -1
- package/dist/ui/assets/images-ESPQKVTW-D7SgdVJ_.js +0 -1
- package/dist/ui/assets/index-D1m4Wx8V.css +0 -1
- package/dist/ui/assets/index-DXWR4qW1.js +0 -34
- package/dist/ui/assets/layouts-2A7QNF6Y-De2t-YXl.js +0 -1
- package/dist/ui/assets/markdown-baseline-HMqF2ChK.js +0 -1
- package/dist/ui/assets/outside-in-BFVUUcLa.js +0 -3
- package/dist/ui/assets/pptx-6ChgUEf4.js +0 -6
- package/dist/ui/assets/primitives-DEsn1shf.js +0 -41
- package/dist/ui/assets/run-export-BrYhHj1O.js +0 -23
- package/dist/ui/assets/standalone-source-D6mbpa3h.js +0 -11
- package/dist/ui/assets/storage-fn4FCEVK.js +0 -1
- package/dist/ui/assets/styles-C0EoNJbk.css +0 -1
- package/dist/ui/assets/styles-CKr_yrbn.js +0 -541
- package/dist/ui/assets/xlsx-DH7sTb3W.js +0 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _bendyline_gezel from '@bendyline/gezel';
|
|
2
|
-
import { SessionParent, SessionLink, ChatSessionSource, ChatEvent, ChatEventEnvelope, HistoryEvent, HistoryFilter, HistoryEntry, ProjectFileEntry, GezelGender, Poppetje, GezelDetail, PendingGezelMessage, GezelConfig, GezelSummary, ProviderName, RetrievalPolicy, ChatModelTuning, GezelTrait, ProjectLocalConfig, ImportProvenance, PendingImports, ProjectTypeOverlay, GezelFrontmatter, Project, ProjectIconId, ProjectDetail, FileReviewIssue, BoekwachterIssueStatus, BoekwachterIssueDismissalReason, ProjectManagedWorkspaceWritePolicy, ProjectNudgeConfig, ProjectTabVisibility, ProjectActivity, MeesterStatusReport, MeesterStatusState, ProjectGitHub, ChatSession, ChatSessionSummary, TimelineMessage, TerminalTimelineEntry, TerminalThread, TerminalThreadSummary, TerminalMessage, GezelGrowthState, Task, Question, TaskNote, ToolsetsScope, InstalledToolset, ToolsetConfig, CraftbookSummary, Craftbook, ProjectCraftbookProvenance, AmbientDashboardResolution, AmbientDashboardTheme, AmbientDashboardDisplayTarget, AmbientDashboardStyle, AmbientDashboardState, HookSpec, HookPhase, HookResult, ModelTier, ModelStyle, BehaviorId, ModelFamily, ChatMessageToolCall, SamplingBlock, CodexPermissionModeCompat, ModelFitnessTrigger, ModelFitnessRecord, OutlineFileResponse, FileContextResponse, FindSymbolResponse, ReadSymbolResponse, MapRepoResponse, SecurityScanResponse, ScanFindingsRequest, ScanFindingsResponse, SecurityFindingWire, MapAttackSurfaceResponse, ListDependenciesResponse, SecurityOverviewResponse, TraceTaintResponse, FileMapRequest, FileMapResponse, SearchCodeResponse, FileReviewResponse, ListFileIssuesRequest, ListFileIssuesResponse, BoekwachterIssue, SearchDocsResponse, SearchDocumentsResponse, ReadDocAsMarkdownResponse, SearchImagesResponse, FindSimilarImagesResponse, DescribeFolderResponse, FindEntityResponse, ListPeopleResponse, ListEntityMentionsResponse, KeurmeesterCaseRecord, TaskStatus, KeurmeesterTriggerKind, KeurmeesterAction, KeurmeesterCaseOutcome, GateCheck, TaskCraftbookStep, TaskCraftbookSource, CraftbookConnectorNeed, CreateTaskRequest, UpdateTaskRequest, TaskAssignee, NewCraftbookStep, StepPosition, UpdateTaskStepRequest, TaskNoteAuthor, TaskVariation, ScriptCapability, WorkspaceIndexStatus, IndexReadinessReport, ScriptScope, ScriptRunTrigger, ScriptRun, NativeEngineResolveEvent, NativeEngineName, ImageRecognition, RecognitionMode, RecognitionHealth, PreviewLogEntry, WorkspaceCommandIndex, WorkspaceSkillIndex, WorkspaceInstructionIndex, UnifiedSearchResult, RetrievalSource, SessionTurnPhase, SessionGpuTask, SessionTelemetry, AIEngagementMode, TurnCancelReason, ChatMessage, SessionDebugSnapshot, ExpectedDeliverable, AppServeSiteStatus, AppServeStartRequest, AppServeStartResponse, ChannelStatus, ChannelName, CodexSetupStatusResponse, ConfigureCodexRequest, KeyedLock, ProjectConnectorBinding, DiffpackOrigin, DiffpackRecord, Diffpack, GildeUpdateStatusResponse, GitWorkingChange, GitFileDiffResponse, CodeReviewKind, GitLogEntry, GitCommitDetailResponse, GitSyncResponse, GitConflictFile, GitConflictVersionsResponse, TaskWaitState, CodeReviewRecord, CodeReview, GitHubPullSummary, GitHubPullDetail, GitHubPullFile, GitHubPullComment, KnowledgeUserRegistry, KnowledgeCatalogRef, ProjectKnowledgeCatalogs, OpenCodeSetupStatusResponse, ConfigureOpenCodeRequest, InstallOpenCodePluginRequest, PiSetupStatusResponse, ConfigurePiRequest, InstallPiExtensionRequest, ImageModelPullEvent as ImageModelPullEvent$1, VideoAccelerator, RenderImageRequest, ReportActionsResponse, FireReportActionResponse, ReportActionRecord, StorageJobKind, StorageJob, StorageJobPhase, SystemToolsetInstallEvent, SystemToolsetInstallSnapshot, NightShiftWindow, TerminalEventEnvelope, DiscoveredCommand, VSCodeSetupStatusResponse, ConfigureVSCodeRequest, ServiceRole, ScriptMeta } from '@bendyline/gezel';
|
|
2
|
+
import { SessionParent, SessionLink, ChatSessionSource, ChatEvent, ChatEventEnvelope, HistoryEvent, HistoryFilter, HistoryEntry, ProjectFileEntry, GezelGender, Poppetje, GezelDetail, PendingGezelMessage, GezelConfig, GezelSummary, ProviderName, RetrievalPolicy, ChatModelTuning, GezelTrait, ProjectLocalConfig, ImportProvenance, PendingImports, ProjectTypeOverlay, GezelFrontmatter, Project, ProjectIconId, ProjectDetail, FileReviewIssue, BoekwachterIssueStatus, BoekwachterIssueDismissalReason, ProjectManagedWorkspaceWritePolicy, ProjectNudgeConfig, ProjectTabVisibility, ProjectActivity, MeesterStatusReport, MeesterStatusState, ProjectGitHub, ChatSession, ChatSessionSummary, TimelineMessage, TerminalTimelineEntry, TerminalThread, TerminalThreadSummary, TerminalMessage, GezelGrowthState, Task, Question, TaskNote, ToolsetsScope, InstalledToolset, ToolsetConfig, CraftbookSummary, Craftbook, ProjectCraftbookProvenance, AmbientDashboardResolution, AmbientDashboardTheme, AmbientDashboardDisplayTarget, AmbientDashboardStyle, AmbientDashboardState, HookSpec, HookPhase, HookResult, ModelTier, ModelStyle, BehaviorId, ModelFamily, ChatMessageToolCall, SamplingBlock, CodexPermissionModeCompat, ModelFitnessTrigger, ModelFitnessRecord, PromptDraftStatus, PromptDraftSummary, PromptDraft, CreatePromptDraftRequest, PatchPromptDraftRequest, DuplicatePromptDraftRequest, OutlineFileResponse, FileContextResponse, FindSymbolResponse, ReadSymbolResponse, MapRepoResponse, SecurityScanResponse, ScanFindingsRequest, ScanFindingsResponse, SecurityFindingWire, MapAttackSurfaceResponse, ListDependenciesResponse, SecurityOverviewResponse, TraceTaintResponse, FileMapRequest, FileMapResponse, SearchCodeResponse, FileReviewResponse, ListFileIssuesRequest, ListFileIssuesResponse, BoekwachterIssue, SearchDocsResponse, SearchDocumentsResponse, ReadDocAsMarkdownResponse, SearchImagesResponse, FindSimilarImagesResponse, DescribeFolderResponse, FindEntityResponse, ListPeopleResponse, ListEntityMentionsResponse, KeurmeesterCaseRecord, TaskStatus, KeurmeesterTriggerKind, KeurmeesterAction, KeurmeesterCaseOutcome, GateCheck, TaskCraftbookStep, TaskCraftbookSource, CraftbookConnectorNeed, CreateTaskRequest, UpdateTaskRequest, TaskAssignee, NewCraftbookStep, StepPosition, UpdateTaskStepRequest, TaskNoteAuthor, TaskVariation, ScriptCapability, WorkspaceIndexStatus, IndexReadinessReport, ScriptScope, ScriptRunTrigger, ScriptRun, NativeEngineResolveEvent, NativeEngineName, ImageRecognition, RecognitionMode, RecognitionHealth, PreviewLogEntry, WorkspaceCommandIndex, WorkspaceSkillIndex, WorkspaceInstructionIndex, UnifiedSearchResult, RetrievalSource, SessionTurnPhase, SessionGpuTask, SessionTelemetry, AIEngagementMode, TurnCancelReason, ChatMessage, SessionDebugSnapshot, ExpectedDeliverable, AppServeSiteStatus, AppServeStartRequest, AppServeStartResponse, ChannelStatus, ChannelName, CodexSetupStatusResponse, ConfigureCodexRequest, KeyedLock, ProjectConnectorBinding, DiffpackOrigin, DiffpackRecord, Diffpack, GildeUpdateStatusResponse, GitWorkingChange, GitFileDiffResponse, CodeReviewKind, GitLogEntry, GitCommitDetailResponse, GitSyncResponse, GitConflictFile, GitConflictVersionsResponse, TaskWaitState, CodeReviewRecord, CodeReview, GitHubPullSummary, GitHubPullDetail, GitHubPullFile, GitHubPullComment, KnowledgeUserRegistry, KnowledgeCatalogRef, KnowledgeInstallSourceKind, TrustedKnowledgeCoordinate, KnowledgeInstallEvent, ProjectKnowledgeCatalogs, KnowledgeEmbeddingProfile, KnowledgeInstallRequest, KnowledgeCatalogStatus, KnowledgeUpdateCandidate, KnowledgeAvailableCatalog, KnowledgeSemanticSearchMode, KnowledgeInstallJob, KnowledgeActiveInstall, IncompleteKnowledgeDownload, OpenCodeSetupStatusResponse, ConfigureOpenCodeRequest, InstallOpenCodePluginRequest, PiSetupStatusResponse, ConfigurePiRequest, InstallPiExtensionRequest, ImageModelPullEvent as ImageModelPullEvent$1, VideoAccelerator, RenderImageRequest, ReportActionsResponse, FireReportActionResponse, ReportActionRecord, StorageJobKind, StorageJob, StorageJobPhase, SystemToolsetInstallEvent, SystemToolsetInstallSnapshot, NightShiftWindow, TerminalEventEnvelope, DiscoveredCommand, VSCodeSetupStatusResponse, ConfigureVSCodeRequest, ServiceRole, ResolvedDistributionPolicy, ScriptMeta } from '@bendyline/gezel';
|
|
3
3
|
import { ServerType } from '@hono/node-server';
|
|
4
4
|
import { CatalogService } from '@bendyline/gezel-catalog';
|
|
5
5
|
import { ExternalFolders } from '@bendyline/gezel/paths';
|
|
@@ -1355,10 +1355,17 @@ declare class Store {
|
|
|
1355
1355
|
*/
|
|
1356
1356
|
writeProjectArtifactBinary(id: string, filePath: string, data: Buffer, options?: {
|
|
1357
1357
|
createOnly?: boolean;
|
|
1358
|
+
initiatedByGezel?: boolean;
|
|
1359
|
+
}): Promise<string>;
|
|
1360
|
+
deleteProjectArtifact(id: string, filePath: string, opts?: {
|
|
1361
|
+
initiatedByGezel?: boolean;
|
|
1362
|
+
}): Promise<void>;
|
|
1363
|
+
createProjectArtifactFolder(id: string, folderPath: string, opts?: {
|
|
1364
|
+
initiatedByGezel?: boolean;
|
|
1358
1365
|
}): Promise<string>;
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1366
|
+
renameProjectArtifactPath(id: string, fromPath: string, toPath: string, opts?: {
|
|
1367
|
+
initiatedByGezel?: boolean;
|
|
1368
|
+
}): Promise<{
|
|
1362
1369
|
fromPath: string;
|
|
1363
1370
|
toPath: string;
|
|
1364
1371
|
}>;
|
|
@@ -1625,6 +1632,7 @@ declare class Store {
|
|
|
1625
1632
|
listDocumentsRecursiveDetailed(opts?: {
|
|
1626
1633
|
withStats?: boolean;
|
|
1627
1634
|
includeHidden?: boolean;
|
|
1635
|
+
subpath?: string;
|
|
1628
1636
|
}): Promise<WalkDirResult>;
|
|
1629
1637
|
readDocument(filePath: string): Promise<string | null>;
|
|
1630
1638
|
documentSize(filePath: string): Promise<number | null>;
|
|
@@ -3871,6 +3879,13 @@ interface ToolCallEvent {
|
|
|
3871
3879
|
* paths for the References panel.
|
|
3872
3880
|
*/
|
|
3873
3881
|
args?: Record<string, unknown>;
|
|
3882
|
+
/**
|
|
3883
|
+
* Wall-clock start of the tool invocation (epoch ms). Optional so
|
|
3884
|
+
* third-party producers keep working; ChatManager falls back to
|
|
3885
|
+
* `now - durationMs`, which is exact for any producer that computes
|
|
3886
|
+
* durationMs at fire time.
|
|
3887
|
+
*/
|
|
3888
|
+
startedAtMs?: number;
|
|
3874
3889
|
durationMs: number;
|
|
3875
3890
|
success: boolean;
|
|
3876
3891
|
errorMessage?: string;
|
|
@@ -4672,7 +4687,34 @@ declare class CapacityBroker {
|
|
|
4672
4687
|
private explicitAllowRamSpillover;
|
|
4673
4688
|
private readonly reservations;
|
|
4674
4689
|
constructor(opts?: CapacityBrokerOptions);
|
|
4690
|
+
/**
|
|
4691
|
+
* The broker is built once and lives for the whole process, so the host
|
|
4692
|
+
* shape it was handed at construction is the one every later admission is
|
|
4693
|
+
* priced against. `gpuVramBytes: null` there means "the boot probe reported
|
|
4694
|
+
* no accelerator" — which is also exactly what a probe that TIMED OUT
|
|
4695
|
+
* reports, and `nvidia-smi` on a laptop dGPU parked in a low-power state
|
|
4696
|
+
* routinely loses its 2s race. Pinning that answer turns one slow probe
|
|
4697
|
+
* into a RAM-only budget for the life of the daemon.
|
|
4698
|
+
*
|
|
4699
|
+
* So a card measured SINCE construction wins, by deferring the whole host
|
|
4700
|
+
* shape — VRAM and the unified flag together — to the published probe. A
|
|
4701
|
+
* host that genuinely has no accelerator publishes `null` too, and nothing
|
|
4702
|
+
* changes for it.
|
|
4703
|
+
*/
|
|
4675
4704
|
private autoBudget;
|
|
4705
|
+
/**
|
|
4706
|
+
* Re-derive the auto budget when the host measurement moved under it.
|
|
4707
|
+
*
|
|
4708
|
+
* {@link autoBudget} recomputes per call, but `budgetBytes` — the number
|
|
4709
|
+
* admission actually gates on — is assigned once by {@link applyBudget}.
|
|
4710
|
+
* Without this, a card measured after construction would show up in
|
|
4711
|
+
* `pools` and in `fastBudgetBytes()` while the enforced ceiling stayed on
|
|
4712
|
+
* the RAM-only curve, which is the half of the figure that denies models.
|
|
4713
|
+
*
|
|
4714
|
+
* Called from every public read; an explicit budget is the operator's
|
|
4715
|
+
* number and is never re-derived.
|
|
4716
|
+
*/
|
|
4717
|
+
private refreshAutoBudget;
|
|
4676
4718
|
private applyBudget;
|
|
4677
4719
|
/**
|
|
4678
4720
|
* Re-point the budget without rebuilding the broker. `null` reverts to
|
|
@@ -5340,6 +5382,84 @@ declare class ModelFitnessManager {
|
|
|
5340
5382
|
private hardwareChanged;
|
|
5341
5383
|
}
|
|
5342
5384
|
|
|
5385
|
+
interface PromptDraftManagerOptions {
|
|
5386
|
+
store: Store;
|
|
5387
|
+
events?: Pick<ChatEventBus, 'publishProjectEvent'>;
|
|
5388
|
+
now?: () => Date;
|
|
5389
|
+
}
|
|
5390
|
+
interface PromptDraftListFilter {
|
|
5391
|
+
gezelId?: string;
|
|
5392
|
+
/** `undefined` matches any thread; `null` matches only new-thread drafts. */
|
|
5393
|
+
sessionId?: string | null;
|
|
5394
|
+
status?: PromptDraftStatus;
|
|
5395
|
+
}
|
|
5396
|
+
declare class PromptDraftManager {
|
|
5397
|
+
private readonly store;
|
|
5398
|
+
private readonly events;
|
|
5399
|
+
private readonly now;
|
|
5400
|
+
private readonly locks;
|
|
5401
|
+
constructor(opts: PromptDraftManagerOptions);
|
|
5402
|
+
rootDir(projectId: string): string;
|
|
5403
|
+
draftDir(projectId: string, draftId: string): string;
|
|
5404
|
+
list(projectId: string, filter?: PromptDraftListFilter): Promise<PromptDraftSummary[]>;
|
|
5405
|
+
get(projectId: string, draftId: string): Promise<PromptDraft | null>;
|
|
5406
|
+
create(projectId: string, input: CreatePromptDraftRequest): Promise<PromptDraft>;
|
|
5407
|
+
/**
|
|
5408
|
+
* Save the draft's text. A draft with nothing in it and nothing attached is
|
|
5409
|
+
* deleted rather than kept: the composer clears itself on send and on
|
|
5410
|
+
* discard, and a husk left behind would show up as a blank row in the
|
|
5411
|
+
* picker forever.
|
|
5412
|
+
*/
|
|
5413
|
+
writeContent(projectId: string, draftId: string, content: string): Promise<{
|
|
5414
|
+
draft: PromptDraftSummary | null;
|
|
5415
|
+
deleted: boolean;
|
|
5416
|
+
}>;
|
|
5417
|
+
/** Re-file a draft. An explicit `null` clears an optional ref. */
|
|
5418
|
+
patchMeta(projectId: string, draftId: string, patch: PatchPromptDraftRequest): Promise<PromptDraftSummary>;
|
|
5419
|
+
/**
|
|
5420
|
+
* Record that this draft was sent. `content` is the ORIGINAL
|
|
5421
|
+
* document-relative markdown, not the rewritten form the transcript
|
|
5422
|
+
* carries: the draft stays an editable document, and rewriting its own
|
|
5423
|
+
* refs would break the editor's Files panel and any later reuse.
|
|
5424
|
+
*/
|
|
5425
|
+
markSent(projectId: string, draftId: string, info: {
|
|
5426
|
+
sessionId: string;
|
|
5427
|
+
content?: string;
|
|
5428
|
+
}): Promise<PromptDraftSummary>;
|
|
5429
|
+
/**
|
|
5430
|
+
* Stamp the `at` of the persisted user message. Best-effort and quiet: the
|
|
5431
|
+
* send route accepts before the turn writes its message, so this lands a
|
|
5432
|
+
* beat later and nothing gates on it.
|
|
5433
|
+
*/
|
|
5434
|
+
noteSentMessageAt(projectId: string, draftId: string, at: string): Promise<void>;
|
|
5435
|
+
/** "Use again" — copy a draft's text and files into a fresh open draft. */
|
|
5436
|
+
duplicate(projectId: string, draftId: string, input?: DuplicatePromptDraftRequest): Promise<PromptDraft>;
|
|
5437
|
+
delete(projectId: string, draftId: string): Promise<boolean>;
|
|
5438
|
+
/**
|
|
5439
|
+
* A thread was deleted. Its sent drafts go with it — they record a
|
|
5440
|
+
* conversation that no longer exists — while unsent ones are detached
|
|
5441
|
+
* rather than destroyed: those words are still the user's, they just have
|
|
5442
|
+
* nowhere to go yet.
|
|
5443
|
+
*/
|
|
5444
|
+
onSessionDeleted(projectId: string, sessionId: string): Promise<{
|
|
5445
|
+
deleted: number;
|
|
5446
|
+
detached: number;
|
|
5447
|
+
}>;
|
|
5448
|
+
/** Remove sent drafts last sent before `cutoffIso`. Unsent are never swept. */
|
|
5449
|
+
sweepSent(projectId: string, cutoffIso: string): Promise<number>;
|
|
5450
|
+
private allocateId;
|
|
5451
|
+
private listDraftIds;
|
|
5452
|
+
private readMeta;
|
|
5453
|
+
private writeMeta;
|
|
5454
|
+
private readContent;
|
|
5455
|
+
private countFiles;
|
|
5456
|
+
private removeDir;
|
|
5457
|
+
private derived;
|
|
5458
|
+
private readSummary;
|
|
5459
|
+
private summarize;
|
|
5460
|
+
private publish;
|
|
5461
|
+
}
|
|
5462
|
+
|
|
5343
5463
|
/**
|
|
5344
5464
|
* The read side of a draft overlay, as consumed by gate evaluation and the
|
|
5345
5465
|
* advanceWhen deliverable watcher. A drafting task's workspace-path checks
|
|
@@ -6162,6 +6282,26 @@ declare class ContentIndex {
|
|
|
6162
6282
|
private syncFindingLifecycle;
|
|
6163
6283
|
}
|
|
6164
6284
|
|
|
6285
|
+
/**
|
|
6286
|
+
* Public embedding API. Generates 384-dimensional vectors from text using a
|
|
6287
|
+
* local transformers.js model (all-MiniLM-L6-v2) — runs entirely on-device, no
|
|
6288
|
+
* API keys. The model downloads on first use (~23 MB) and is cached in the OS
|
|
6289
|
+
* cache directory.
|
|
6290
|
+
*
|
|
6291
|
+
* Two robustness properties live here, both added after an out-of-memory in the
|
|
6292
|
+
* model crashed the whole Electron app (a many-chunk file made ONNX attempt a
|
|
6293
|
+
* multi-gigabyte allocation in `BFCArena::Extend`, which trapped — SIGTRAP — on
|
|
6294
|
+
* the main thread):
|
|
6295
|
+
*
|
|
6296
|
+
* 1. Inference runs in BOUNDED sub-batches (see `embed-core`) so no single
|
|
6297
|
+
* ONNX `Run` can balloon, regardless of how many texts a caller passes.
|
|
6298
|
+
* 2. Inference runs in a WORKER THREAD (`embed-worker`), keeping the heavy
|
|
6299
|
+
* synchronous native call off the Electron main/UI thread. When the worker
|
|
6300
|
+
* can't be created — under vitest there's no built worker file, and a raw
|
|
6301
|
+
* `new Worker('*.ts')` wouldn't load through vitest's transform — we
|
|
6302
|
+
* degrade to in-process inference, which is still bounded by (1).
|
|
6303
|
+
*/
|
|
6304
|
+
|
|
6165
6305
|
type EmbeddingPipelineStatus = 'cold' | 'warming' | 'ready' | 'disabled' | 'unavailable';
|
|
6166
6306
|
declare function embed(text: string): Promise<number[]>;
|
|
6167
6307
|
/**
|
|
@@ -7083,13 +7223,14 @@ type TaskSettledHook = (ctx: {
|
|
|
7083
7223
|
task: Task;
|
|
7084
7224
|
outcome: 'complete' | 'canceled';
|
|
7085
7225
|
}) => Promise<void> | void;
|
|
7086
|
-
type TaskNeedsHelpReason = 'gate_exhausted' | 'gate_plateau' | 'gate_unsatisfiable' | 'gate_infrastructure' | 'step_stalled' | 'budget_exhausted';
|
|
7226
|
+
type TaskNeedsHelpReason = 'gate_exhausted' | 'gate_plateau' | 'gate_unsatisfiable' | 'gate_infrastructure' | 'step_exit_infrastructure' | 'step_stalled' | 'budget_exhausted';
|
|
7087
7227
|
/**
|
|
7088
7228
|
* Fired when a task PAUSES FOR HELP — a gate budget spent, a plateau, an
|
|
7089
|
-
* unsatisfiable-by-policy gate, a
|
|
7090
|
-
* cover complete/canceled, so without this a
|
|
7091
|
-
* wall paused silently: a note on the task and
|
|
7092
|
-
* pushed to the user. `detail` is a one-line human
|
|
7229
|
+
* unsatisfiable-by-policy gate, a lifecycle-script failure, or a stalled
|
|
7230
|
+
* assignee. Settle hooks only cover complete/canceled, so without this a
|
|
7231
|
+
* background task that hit a wall paused silently: a note on the task and
|
|
7232
|
+
* a history row, nothing pushed to the user. `detail` is a one-line human
|
|
7233
|
+
* summary of why.
|
|
7093
7234
|
*/
|
|
7094
7235
|
type TaskNeedsHelpHook = (ctx: {
|
|
7095
7236
|
projectId: string;
|
|
@@ -7144,6 +7285,11 @@ interface GateHoldInfo {
|
|
|
7144
7285
|
unsatisfiable?: true;
|
|
7145
7286
|
/** Script-run identifiers and redacted log tails for gate infrastructure failures. */
|
|
7146
7287
|
scriptRuns?: StepGateOutcome['runs'];
|
|
7288
|
+
/**
|
|
7289
|
+
* Present when completion was held by a lifecycle hook rather than the
|
|
7290
|
+
* step's declarative completion gate. Omission means the gate.
|
|
7291
|
+
*/
|
|
7292
|
+
hook?: 'onExit';
|
|
7147
7293
|
/** Per-check structured outcomes from the gate's declarative floor. */
|
|
7148
7294
|
checkResults?: GateCheckOutcome[];
|
|
7149
7295
|
/**
|
|
@@ -7494,7 +7640,8 @@ declare class TaskManager {
|
|
|
7494
7640
|
recordStepRedrive(projectId: string, num: number, stepId: string): Promise<number>;
|
|
7495
7641
|
/**
|
|
7496
7642
|
* Edge resolution order, in priority:
|
|
7497
|
-
* 1. explicit `next` arg ("jump" — user/model agency wins
|
|
7643
|
+
* 1. explicit `next` arg ("jump" — user/model agency wins after all
|
|
7644
|
+
* onExit scripts succeed)
|
|
7498
7645
|
* 2. an approving completion-gate script's `goto`
|
|
7499
7646
|
* 3. the completion gate's `onApprove`
|
|
7500
7647
|
* 4. `step.terminal === true` → no further activation; mark complete
|
|
@@ -7507,7 +7654,9 @@ declare class TaskManager {
|
|
|
7507
7654
|
* this: a reject returns `held` without stamping `completedAt` — the
|
|
7508
7655
|
* step stays active and the prescriptive message flows back to the
|
|
7509
7656
|
* caller. `onExit` is the step's `finally`: it runs on every approved
|
|
7510
|
-
* completion (including jumps and terminal), never on a reject.
|
|
7657
|
+
* completion (including jumps and terminal), never on a reject. A missing,
|
|
7658
|
+
* thrown, or non-OK exit script holds the step incomplete and pauses the
|
|
7659
|
+
* task before any edge is resolved.
|
|
7511
7660
|
*/
|
|
7512
7661
|
private completeStepInternal;
|
|
7513
7662
|
/**
|
|
@@ -7607,10 +7756,18 @@ declare class TaskManager {
|
|
|
7607
7756
|
private embeddedScriptSource;
|
|
7608
7757
|
/**
|
|
7609
7758
|
* Execute a step-attached script with the right trigger metadata.
|
|
7610
|
-
* Returns `null` when the runner isn't wired or engagement mode is
|
|
7611
|
-
*
|
|
7759
|
+
* Returns `null` when the runner isn't wired or engagement mode is off.
|
|
7760
|
+
* Lifecycle callers treat that as an infrastructure failure and pause the
|
|
7761
|
+
* task; a declared hook is never silently skipped.
|
|
7612
7762
|
*/
|
|
7613
7763
|
private runStepScript;
|
|
7764
|
+
/**
|
|
7765
|
+
* Hold a completion whose `onExit` lifecycle script could not finish.
|
|
7766
|
+
* This deliberately uses the existing structured completion-hold envelope
|
|
7767
|
+
* so older clients also fail closed; `hook: 'onExit'` lets current callers
|
|
7768
|
+
* report the lifecycle failure instead of mislabelling it as a bad gate.
|
|
7769
|
+
*/
|
|
7770
|
+
private holdForStepExitFailure;
|
|
7614
7771
|
/**
|
|
7615
7772
|
* Run one freshly-activated step's deterministic setup before its handoff.
|
|
7616
7773
|
* A successful marker is persisted before dispatch, so overlapping kickoff
|
|
@@ -10086,6 +10243,14 @@ interface ExternalConversationTurn {
|
|
|
10086
10243
|
fail(error: unknown): Promise<void>;
|
|
10087
10244
|
}
|
|
10088
10245
|
|
|
10246
|
+
interface CompactSessionNowResult {
|
|
10247
|
+
compacted: boolean;
|
|
10248
|
+
reason?: 'not-found' | 'busy' | 'too-short' | 'failed';
|
|
10249
|
+
removedCount?: number;
|
|
10250
|
+
compactionCount?: number;
|
|
10251
|
+
transcriptTokens?: number;
|
|
10252
|
+
}
|
|
10253
|
+
|
|
10089
10254
|
/**
|
|
10090
10255
|
* In-memory per-session progress telemetry. Counts the live signals the
|
|
10091
10256
|
* chat layer already observes — streamed deltas, wire pulses, heartbeats,
|
|
@@ -10205,6 +10370,8 @@ type TaskAdvancerOutcome = {
|
|
|
10205
10370
|
paused?: boolean;
|
|
10206
10371
|
/** The gate runtime/configuration failed before judging the deliverable. */
|
|
10207
10372
|
infrastructureError?: boolean;
|
|
10373
|
+
/** Present when an onExit hook, rather than the declarative gate, held completion. */
|
|
10374
|
+
hook?: 'onExit';
|
|
10208
10375
|
/** The gate cannot be met under current policy (workspace writes off); paused for a human. */
|
|
10209
10376
|
unsatisfiable?: boolean;
|
|
10210
10377
|
/** Gate script diagnostics for durable/user-visible failure reporting. */
|
|
@@ -10568,6 +10735,14 @@ declare class ChatManager {
|
|
|
10568
10735
|
* closes. Cleared at the start of every turn.
|
|
10569
10736
|
*/
|
|
10570
10737
|
private readonly currentTurnTools;
|
|
10738
|
+
/**
|
|
10739
|
+
* Question raised by `ask_user_question` during the current in-flight
|
|
10740
|
+
* turn, keyed by session id. The assistant message for that turn does not
|
|
10741
|
+
* exist until `sendAndWait` returns, so stamping "the last assistant" at
|
|
10742
|
+
* tool-call time either hits the previous turn or (on a first turn) hits
|
|
10743
|
+
* nothing. Hold the id here and attach it to the message at commit time.
|
|
10744
|
+
*/
|
|
10745
|
+
private readonly currentTurnPendingQuestionIds;
|
|
10571
10746
|
/**
|
|
10572
10747
|
* Keurmeester supervision engine, setter-injected from service.ts
|
|
10573
10748
|
* after construction (the manager needs `oneShotCompletion`, so the
|
|
@@ -10724,6 +10899,7 @@ declare class ChatManager {
|
|
|
10724
10899
|
private readonly activeMemoryExtractions;
|
|
10725
10900
|
private readonly store;
|
|
10726
10901
|
private readonly events;
|
|
10902
|
+
private readonly contextCompactor;
|
|
10727
10903
|
private readonly externalConversations;
|
|
10728
10904
|
private readonly memory;
|
|
10729
10905
|
private readonly historyManager?;
|
|
@@ -10921,6 +11097,14 @@ declare class ChatManager {
|
|
|
10921
11097
|
*/
|
|
10922
11098
|
setDraftReader(reader: DraftOverlayReader): void;
|
|
10923
11099
|
private draftReader?;
|
|
11100
|
+
/**
|
|
11101
|
+
* Prompt drafts. Optional so every test that builds a bare ChatManager
|
|
11102
|
+
* keeps working; the two things it drives — stamping a sent draft with its
|
|
11103
|
+
* message time, and cleaning up after a deleted thread — are both
|
|
11104
|
+
* best-effort bookkeeping, never part of a turn's success.
|
|
11105
|
+
*/
|
|
11106
|
+
setPromptDrafts(manager: PromptDraftManager): void;
|
|
11107
|
+
private promptDrafts?;
|
|
10924
11108
|
/**
|
|
10925
11109
|
* Fail-fast per-task budget (Theme F, F3.1). Accumulates each task's
|
|
10926
11110
|
* UNATTENDED token/turn spend across the sessions that serve it; a soft
|
|
@@ -11022,6 +11206,8 @@ declare class ChatManager {
|
|
|
11022
11206
|
projectHint?: string | undefined;
|
|
11023
11207
|
} | undefined;
|
|
11024
11208
|
model?: string | undefined;
|
|
11209
|
+
contextWindow?: number | undefined;
|
|
11210
|
+
compactionCount?: number | undefined;
|
|
11025
11211
|
parentSession?: {
|
|
11026
11212
|
sessionId: string;
|
|
11027
11213
|
gezelId: string;
|
|
@@ -11034,9 +11220,12 @@ declare class ChatManager {
|
|
|
11034
11220
|
archived?: boolean | undefined;
|
|
11035
11221
|
lastTurnError?: string | undefined;
|
|
11036
11222
|
turnStartedAt?: string | undefined;
|
|
11223
|
+
contextAutoCompactRatio?: number | undefined;
|
|
11224
|
+
contextEstimatedTokens?: number | undefined;
|
|
11037
11225
|
lastHumanActivityAt?: string | undefined;
|
|
11038
11226
|
lastMessagePreview?: string | undefined;
|
|
11039
11227
|
involvedGezelIds?: string[] | undefined;
|
|
11228
|
+
transcriptTokens?: number | undefined;
|
|
11040
11229
|
}[]>;
|
|
11041
11230
|
/**
|
|
11042
11231
|
* Returns true when at least one session scoped to `projectId` has a
|
|
@@ -11284,7 +11473,9 @@ declare class ChatManager {
|
|
|
11284
11473
|
* merged turn after it. On an idle session with an empty queue this
|
|
11285
11474
|
* degrades to a plain `send()`.
|
|
11286
11475
|
*/
|
|
11287
|
-
interruptWithMessage(sessionId: string, userText: string
|
|
11476
|
+
interruptWithMessage(sessionId: string, userText: string, opts?: {
|
|
11477
|
+
draftId?: string;
|
|
11478
|
+
}): Promise<ChatMessage>;
|
|
11288
11479
|
getSessionRecord(sessionId: string): Promise<ChatSession | null>;
|
|
11289
11480
|
/**
|
|
11290
11481
|
* Begin one request in a caller-owned conversation loop (Pi, OpenCode, or VS Code).
|
|
@@ -11556,6 +11747,7 @@ declare class ChatManager {
|
|
|
11556
11747
|
sessionId: string;
|
|
11557
11748
|
toGezelName: string;
|
|
11558
11749
|
toGezelId: string;
|
|
11750
|
+
deliveryState: 'parked' | 'dispatched';
|
|
11559
11751
|
deduplicated?: boolean;
|
|
11560
11752
|
}>;
|
|
11561
11753
|
/**
|
|
@@ -11692,17 +11884,13 @@ declare class ChatManager {
|
|
|
11692
11884
|
*/
|
|
11693
11885
|
private deliverHandoffFailureNotice;
|
|
11694
11886
|
/**
|
|
11695
|
-
* Attach a freshly-created question to the assistant bubble that asked
|
|
11696
|
-
* it, on disk AND on the live turn record.
|
|
11887
|
+
* Attach a freshly-created question to the assistant bubble that asked it.
|
|
11697
11888
|
*
|
|
11698
|
-
*
|
|
11699
|
-
*
|
|
11700
|
-
*
|
|
11701
|
-
*
|
|
11702
|
-
*
|
|
11703
|
-
* the same bubble in the live record keeps the stamp through that
|
|
11704
|
-
* write. Both halves target the last assistant message, which mid-turn
|
|
11705
|
-
* is the same bubble: the in-flight one has not been pushed yet.
|
|
11889
|
+
* During a model turn, that bubble does not exist yet: the durable "last
|
|
11890
|
+
* assistant" belongs to the previous turn (and there is no such message on
|
|
11891
|
+
* turn one). Hold the id in the per-turn buffer for the commit path. The
|
|
11892
|
+
* idle fallback supports direct API/debug calls by stamping the existing
|
|
11893
|
+
* last assistant on both the warm record and disk.
|
|
11706
11894
|
*/
|
|
11707
11895
|
stampPendingQuestion(gezelId: string, sessionId: string, questionId: string): Promise<void>;
|
|
11708
11896
|
/**
|
|
@@ -11791,6 +11979,13 @@ declare class ChatManager {
|
|
|
11791
11979
|
primarySessionId: string;
|
|
11792
11980
|
text: string;
|
|
11793
11981
|
mentionGezelIds: string[];
|
|
11982
|
+
/**
|
|
11983
|
+
* The prompt draft the user wrote this in. Stamped on the PRIMARY
|
|
11984
|
+
* message only: the fan-out copies are deliveries of that one draft, not
|
|
11985
|
+
* drafts of their own, and pointing several messages at one draft would
|
|
11986
|
+
* make "open the prompt this came from" ambiguous.
|
|
11987
|
+
*/
|
|
11988
|
+
draftId?: string;
|
|
11794
11989
|
}): Promise<{
|
|
11795
11990
|
mentionSessionIds: string[];
|
|
11796
11991
|
}>;
|
|
@@ -11806,7 +12001,9 @@ declare class ChatManager {
|
|
|
11806
12001
|
* session bus so any composer streaming indicator clears. On error,
|
|
11807
12002
|
* the session bus gets `error` + `done` so the composer doesn't hang.
|
|
11808
12003
|
*/
|
|
11809
|
-
notifyUserMessage(sessionId: string, userText: string
|
|
12004
|
+
notifyUserMessage(sessionId: string, userText: string, opts?: {
|
|
12005
|
+
draftId?: string;
|
|
12006
|
+
}): Promise<ChatMessage>;
|
|
11810
12007
|
/**
|
|
11811
12008
|
* Pick the project a `@mention` from Meester chat should land in for the
|
|
11812
12009
|
* given gezel. Delegates to {@link rankProjectsForGezel} and takes the
|
|
@@ -11985,10 +12182,7 @@ declare class ChatManager {
|
|
|
11985
12182
|
* the same error `runSend` would have thrown.
|
|
11986
12183
|
*/
|
|
11987
12184
|
send(sessionId: string, userText: string, opts?: {
|
|
11988
|
-
from?:
|
|
11989
|
-
gezelId: string;
|
|
11990
|
-
gezelName: string;
|
|
11991
|
-
};
|
|
12185
|
+
from?: NonNullable<ChatMessage['from']>;
|
|
11992
12186
|
/**
|
|
11993
12187
|
* When true, merge this send into the tail of the session's
|
|
11994
12188
|
* pending queue IF the tail is also coalescable and shares
|
|
@@ -12036,6 +12230,12 @@ declare class ChatManager {
|
|
|
12036
12230
|
* the message never queued, so it renders as a normal send.
|
|
12037
12231
|
*/
|
|
12038
12232
|
nudge?: boolean;
|
|
12233
|
+
/**
|
|
12234
|
+
* The prompt draft this user turn was written in. Display-only, and
|
|
12235
|
+
* carried through the queue so a message typed mid-turn still points at
|
|
12236
|
+
* its draft when it finally runs.
|
|
12237
|
+
*/
|
|
12238
|
+
draftId?: string;
|
|
12039
12239
|
/** Strong provenance used by per-turn behavior hooks. */
|
|
12040
12240
|
messageOrigin?: TurnMessageOrigin;
|
|
12041
12241
|
}): Promise<ChatMessage>;
|
|
@@ -12165,23 +12365,13 @@ declare class ChatManager {
|
|
|
12165
12365
|
private tryAutoRecall;
|
|
12166
12366
|
/**
|
|
12167
12367
|
* Local-provider context-window pressure check. Runs before each turn
|
|
12168
|
-
* (including continuation nudges).
|
|
12169
|
-
*
|
|
12170
|
-
*
|
|
12171
|
-
*
|
|
12172
|
-
*
|
|
12173
|
-
*
|
|
12174
|
-
*
|
|
12175
|
-
* tool prefix cannot be reduced by starting a new session.
|
|
12176
|
-
* - `≥ 90%` → run {@link compactInFlight} to collapse the older
|
|
12177
|
-
* messages into a synthetic compaction-summary bubble, tear
|
|
12178
|
-
* down the live session so the next acquire rebuilds with the
|
|
12179
|
-
* compacted history, and publish `context_compacted`. If the
|
|
12180
|
-
* compaction itself fails, fall back to the warning so the
|
|
12181
|
-
* user at least sees something — Ollama would silently
|
|
12182
|
-
* truncate from the front otherwise, which is what the model
|
|
12183
|
-
* "forgot the user's question" symptom traces back to (see
|
|
12184
|
-
* ollama.ts header).
|
|
12368
|
+
* (including continuation nudges). It publishes the effective window and
|
|
12369
|
+
* automatic-compaction threshold for user-facing UI, then compacts once the
|
|
12370
|
+
* estimated outgoing prompt crosses that threshold. There is no ordinary
|
|
12371
|
+
* "window nearly full" warning band: the runtime owns this maintenance and
|
|
12372
|
+
* should not ask either the user or model to second-guess it. A warning is
|
|
12373
|
+
* emitted only when compaction was actually needed but could not reduce an
|
|
12374
|
+
* accumulated conversation.
|
|
12185
12375
|
*
|
|
12186
12376
|
* Copilot/OpenAI/CLI providers remain no-ops because they manage history
|
|
12187
12377
|
* outside this process. RemoteGezelProvider is included: its transport is
|
|
@@ -12195,20 +12385,16 @@ declare class ChatManager {
|
|
|
12195
12385
|
*/
|
|
12196
12386
|
private checkContextPressure;
|
|
12197
12387
|
/**
|
|
12198
|
-
*
|
|
12199
|
-
*
|
|
12200
|
-
*
|
|
12201
|
-
*
|
|
12202
|
-
* before that is fed to a one-shot summarization on the same
|
|
12203
|
-
* provider; the resulting synthesis replaces those messages
|
|
12204
|
-
* in-place. Persisted via `writeSession`. Fully audit-trailed via
|
|
12205
|
-
* a `chat.compacted` history event.
|
|
12388
|
+
* Compact a session on demand, outside any turn. Same collapse the
|
|
12389
|
+
* automatic pressure path runs, reached from the context meter's
|
|
12390
|
+
* "Compact now" so a user who can see the thread filling up doesn't have
|
|
12391
|
+
* to wait for the threshold — or send a throwaway message to trigger it.
|
|
12206
12392
|
*
|
|
12207
|
-
*
|
|
12208
|
-
*
|
|
12209
|
-
*
|
|
12393
|
+
* Refuses while a turn is pending: compaction rewrites `record.messages`
|
|
12394
|
+
* out from under a live session, which is safe only because the caller
|
|
12395
|
+
* then tears that session down.
|
|
12210
12396
|
*/
|
|
12211
|
-
|
|
12397
|
+
compactSessionNow(sessionId: string): Promise<CompactSessionNowResult>;
|
|
12212
12398
|
history(sessionId: string): Promise<ChatMessage[]>;
|
|
12213
12399
|
reset(sessionId: string): Promise<void>;
|
|
12214
12400
|
/**
|
|
@@ -15450,13 +15636,114 @@ declare class IndexingJobControl {
|
|
|
15450
15636
|
private noteAuthor;
|
|
15451
15637
|
}
|
|
15452
15638
|
|
|
15639
|
+
/**
|
|
15640
|
+
* Minimal event contract shared by every chat-model installer
|
|
15641
|
+
* (`LlamaCppModelManager.install`, `MlxModelManager.install`): a stream of
|
|
15642
|
+
* typed events where `done` / `error` are terminal. The registry treats
|
|
15643
|
+
* everything else as opaque progress it can replay to late subscribers.
|
|
15644
|
+
*/
|
|
15645
|
+
interface ChatInstallEventBase {
|
|
15646
|
+
type: string;
|
|
15647
|
+
error?: string;
|
|
15648
|
+
}
|
|
15649
|
+
interface ChatInstallSnapshot {
|
|
15650
|
+
id: string;
|
|
15651
|
+
startedAt: string;
|
|
15652
|
+
/** Set once a terminal event has been observed (done, error, or cancel). */
|
|
15653
|
+
finished: boolean;
|
|
15654
|
+
/** Set when the install errored or was cancelled. */
|
|
15655
|
+
error?: string;
|
|
15656
|
+
}
|
|
15657
|
+
type Listener$4<E> = (event: E) => void;
|
|
15658
|
+
/**
|
|
15659
|
+
* Owns the lifecycle of in-flight chat-model installs for one engine.
|
|
15660
|
+
*
|
|
15661
|
+
* Installs used to be tied 1:1 to the HTTP request that started them — when
|
|
15662
|
+
* the client disconnected (closed the window, navigated away mid-download),
|
|
15663
|
+
* the SSE loop exited, the async install generator closed, and the download
|
|
15664
|
+
* was abandoned with `.partial` files on disk and no record it ever ran.
|
|
15665
|
+
* This is the chat-model twin of the image path's `ImageModelPullRegistry`,
|
|
15666
|
+
* which fixed the identical failure mode for image pulls.
|
|
15667
|
+
*
|
|
15668
|
+
* The registry decouples the two: the install runs in a detached background
|
|
15669
|
+
* task owned by this object, and HTTP requests are just consumers that
|
|
15670
|
+
* subscribe to the live event fan-out. Disconnect detaches the consumer; the
|
|
15671
|
+
* install keeps going. Cancel is an explicit `DELETE /models/:id/install`.
|
|
15672
|
+
*
|
|
15673
|
+
* Cancellation unwinds the install generator via `iterator.return()` rather
|
|
15674
|
+
* than an AbortSignal — the generator only runs between yields, and the
|
|
15675
|
+
* downloaders yield progress a few times a second, so the unwind lands
|
|
15676
|
+
* within one progress interval and the `.partial` files stay resumable.
|
|
15677
|
+
*/
|
|
15678
|
+
declare class ChatModelInstallRegistry<E extends ChatInstallEventBase, O> {
|
|
15679
|
+
private readonly entries;
|
|
15680
|
+
private readonly engine;
|
|
15681
|
+
private readonly run;
|
|
15682
|
+
private readonly onDone;
|
|
15683
|
+
private readonly finishedTtlMs;
|
|
15684
|
+
constructor(opts: {
|
|
15685
|
+
/** Label used in log lines only. */
|
|
15686
|
+
engine: string;
|
|
15687
|
+
/** Start the actual install — typically `(id, o) => manager.install(id, o)`. */
|
|
15688
|
+
run: (id: string, opts: O) => AsyncIterable<E>;
|
|
15689
|
+
/** Fired when an install reaches `done`, before the event is broadcast —
|
|
15690
|
+
* the place to bust caches so subscribers observing `done` re-fetch
|
|
15691
|
+
* fresh state. */
|
|
15692
|
+
onDone?: (id: string) => void;
|
|
15693
|
+
/** How long a finished entry stays observable (default {@link FINISHED_TTL_MS}). */
|
|
15694
|
+
finishedTtlMs?: number;
|
|
15695
|
+
});
|
|
15696
|
+
/**
|
|
15697
|
+
* Start an install for `id`, or attach to the one already in flight.
|
|
15698
|
+
* Idempotent — a second `start` for a running id does not launch a second
|
|
15699
|
+
* download and does not change the original's options. The install runs in
|
|
15700
|
+
* a detached `void` task; the entry is claimed synchronously so callers
|
|
15701
|
+
* can subscribe without racing the first event.
|
|
15702
|
+
*/
|
|
15703
|
+
start(id: string, opts: O): {
|
|
15704
|
+
alreadyRunning: boolean;
|
|
15705
|
+
};
|
|
15706
|
+
get(id: string): ChatInstallSnapshot | null;
|
|
15707
|
+
/** The snapshot plus the events a late subscriber would be replayed. */
|
|
15708
|
+
describe(id: string): (ChatInstallSnapshot & {
|
|
15709
|
+
lastEvent: E | null;
|
|
15710
|
+
terminalEvent: E | null;
|
|
15711
|
+
}) | null;
|
|
15712
|
+
/** Every install still running, with its latest progress — the polled twin of subscribe(). */
|
|
15713
|
+
active(): Array<{
|
|
15714
|
+
id: string;
|
|
15715
|
+
startedAt: string;
|
|
15716
|
+
lastEvent: E | null;
|
|
15717
|
+
}>;
|
|
15718
|
+
/**
|
|
15719
|
+
* Subscribe to live events for an in-flight install. On subscribe, the
|
|
15720
|
+
* registry replays the last known progress event (and the terminal event,
|
|
15721
|
+
* when one has landed) so a late subscriber renders immediately. Returns
|
|
15722
|
+
* `null` when no entry exists for `id`; otherwise an unsubscribe function.
|
|
15723
|
+
* Unsubscribing does NOT cancel the install — disconnect ≠ cancel.
|
|
15724
|
+
*/
|
|
15725
|
+
subscribe(id: string, listener: Listener$4<E>): (() => void) | null;
|
|
15726
|
+
/**
|
|
15727
|
+
* Cancel an in-flight install. The generator unwinds at its next yield,
|
|
15728
|
+
* running the manager's cleanup (active-install deregistration) and
|
|
15729
|
+
* leaving `.partial` files in place for resume. Subscribers receive a
|
|
15730
|
+
* terminal `error` event stating the install was cancelled. Returns true
|
|
15731
|
+
* when a live entry was cancelled.
|
|
15732
|
+
*/
|
|
15733
|
+
cancel(id: string): boolean;
|
|
15734
|
+
/** Shutdown/test hook: unwind every live install and drop all state. */
|
|
15735
|
+
clear(): void;
|
|
15736
|
+
private consume;
|
|
15737
|
+
private broadcast;
|
|
15738
|
+
}
|
|
15739
|
+
|
|
15453
15740
|
/**
|
|
15454
15741
|
* The catalog host boundary: everything that touches catalog SQLite goes
|
|
15455
15742
|
* through this interface. Two implementations — the in-process host below
|
|
15456
15743
|
* (tests, and the fallback when the worker cannot boot) and the worker
|
|
15457
15744
|
* host (worker-host.ts), which confines node:sqlite's synchronous scans to
|
|
15458
15745
|
* a dedicated thread so a 100 ms shard scan never stalls the daemon loop
|
|
15459
|
-
* (gezk-format
|
|
15746
|
+
* (docs/gezk-format.md). The in-process implementation is test/CLI-only;
|
|
15460
15747
|
* production fails closed if its worker becomes unavailable.
|
|
15461
15748
|
*/
|
|
15462
15749
|
|
|
@@ -15536,12 +15823,14 @@ declare class KnowledgeRegistry {
|
|
|
15536
15823
|
find(publisherId: string, catalogId: string): KnowledgeRegistryEntry | null;
|
|
15537
15824
|
/**
|
|
15538
15825
|
* Add or replace the entry for this catalog identity. The same-catalogId/
|
|
15539
|
-
* different-publisher conflict is rejected here
|
|
15540
|
-
*
|
|
15826
|
+
* different-publisher conflict is rejected here: the catalog id is the
|
|
15827
|
+
* browse and route handle (`/api/knowledge/catalogs/:id`), so one id maps
|
|
15828
|
+
* to one publisher per user even though `knowledge://` references carry both.
|
|
15541
15829
|
*/
|
|
15542
15830
|
upsert(ref: KnowledgeCatalogRef, opts?: {
|
|
15543
15831
|
enabled?: boolean;
|
|
15544
15832
|
autoUpdate?: boolean;
|
|
15833
|
+
source?: KnowledgeInstallSourceKind;
|
|
15545
15834
|
}): void;
|
|
15546
15835
|
setEnabled(publisherId: string, catalogId: string, enabled: boolean): boolean;
|
|
15547
15836
|
/** Quarantine: disable with a reason the UI/CLI can show verbatim. */
|
|
@@ -15550,75 +15839,44 @@ declare class KnowledgeRegistry {
|
|
|
15550
15839
|
}
|
|
15551
15840
|
|
|
15552
15841
|
/**
|
|
15553
|
-
*
|
|
15554
|
-
*
|
|
15555
|
-
*
|
|
15556
|
-
*
|
|
15557
|
-
*
|
|
15558
|
-
*
|
|
15559
|
-
* in manager.ts consumes them.
|
|
15842
|
+
* The user daemon's side of shared knowledge placement: ask the machine
|
|
15843
|
+
* broker to ensure a trusted coordinate in the machine-shared asset store,
|
|
15844
|
+
* streaming its progress back through the bridge. The request is the bare
|
|
15845
|
+
* coordinate — never a URL, path, or anything about this user — exactly as
|
|
15846
|
+
* docs/service-boundaries.md requires. Any outcome other than success or a
|
|
15847
|
+
* digest mismatch is "unavailable": the caller installs privately instead.
|
|
15560
15848
|
*/
|
|
15561
15849
|
|
|
15562
|
-
type
|
|
15563
|
-
|
|
15564
|
-
phase: 'download' | 'extract';
|
|
15565
|
-
bytesDone: number;
|
|
15566
|
-
bytesTotal: number;
|
|
15850
|
+
type SharedEnsureResult = {
|
|
15851
|
+
status: 'ready';
|
|
15567
15852
|
} | {
|
|
15568
|
-
|
|
15569
|
-
} | {
|
|
15570
|
-
type: 'retrying';
|
|
15571
|
-
attempt: number;
|
|
15853
|
+
status: 'unavailable';
|
|
15572
15854
|
reason: string;
|
|
15573
15855
|
} | {
|
|
15574
|
-
|
|
15575
|
-
ref: KnowledgeCatalogRef;
|
|
15576
|
-
rootDir: string;
|
|
15577
|
-
} | {
|
|
15578
|
-
type: 'error';
|
|
15856
|
+
status: 'failed';
|
|
15579
15857
|
error: string;
|
|
15858
|
+
mismatch: {
|
|
15859
|
+
expected: string;
|
|
15860
|
+
actual: string;
|
|
15861
|
+
};
|
|
15580
15862
|
};
|
|
15581
|
-
|
|
15582
|
-
|
|
15583
|
-
|
|
15584
|
-
|
|
15585
|
-
|
|
15586
|
-
url: string;
|
|
15587
|
-
expectedSha256?: string;
|
|
15588
|
-
};
|
|
15863
|
+
interface SharedKnowledgeInstaller {
|
|
15864
|
+
available(): boolean;
|
|
15865
|
+
ensure(coordinate: TrustedKnowledgeCoordinate, onEvent: (event: KnowledgeInstallEvent) => void, signal?: AbortSignal): Promise<SharedEnsureResult>;
|
|
15866
|
+
cancel(coordinate: TrustedKnowledgeCoordinate): Promise<boolean>;
|
|
15867
|
+
}
|
|
15589
15868
|
|
|
15590
15869
|
/**
|
|
15591
15870
|
* KnowledgeManager — the daemon-side owner of installed `.gezk` catalogs:
|
|
15592
15871
|
* registry + mount lifecycle (verify-before-mount → quarantine-with-reason),
|
|
15593
|
-
* install jobs
|
|
15594
|
-
*
|
|
15595
|
-
*
|
|
15872
|
+
* background install jobs (a client disconnect never abandons a download),
|
|
15873
|
+
* the gilde join (what is available, what has a newer version), browse APIs
|
|
15874
|
+
* for the routes, and the SearchService knowledge arm. Every SQLite touch
|
|
15875
|
+
* goes through the KnowledgeCatalogHost (worker thread in production); this
|
|
15876
|
+
* class never opens a catalog database itself.
|
|
15596
15877
|
*/
|
|
15597
15878
|
|
|
15598
|
-
|
|
15599
|
-
ref: KnowledgeCatalogRef;
|
|
15600
|
-
enabled: boolean;
|
|
15601
|
-
addedAt: string;
|
|
15602
|
-
disabledReason?: string;
|
|
15603
|
-
mounted: boolean;
|
|
15604
|
-
name?: string;
|
|
15605
|
-
description?: string;
|
|
15606
|
-
language?: string;
|
|
15607
|
-
license?: string;
|
|
15608
|
-
documents?: number;
|
|
15609
|
-
chunks?: number;
|
|
15610
|
-
sizeBytes?: number;
|
|
15611
|
-
/** False when the catalog's embedding profile differs from the daemon's
|
|
15612
|
-
* embedder — semantic search degrades to FTS for this catalog. */
|
|
15613
|
-
vectorCompatible?: boolean;
|
|
15614
|
-
}
|
|
15615
|
-
interface KnowledgeInstallJob {
|
|
15616
|
-
id: string;
|
|
15617
|
-
startedAt: string;
|
|
15618
|
-
finished: boolean;
|
|
15619
|
-
error?: string;
|
|
15620
|
-
events: KnowledgeInstallEvent[];
|
|
15621
|
-
}
|
|
15879
|
+
type KnowledgeInstallRequestSource = KnowledgeInstallRequest['source'];
|
|
15622
15880
|
interface MountedInfo {
|
|
15623
15881
|
ref: KnowledgeCatalogRef;
|
|
15624
15882
|
key: string;
|
|
@@ -15631,42 +15889,122 @@ interface MountedInfo {
|
|
|
15631
15889
|
chunks: number;
|
|
15632
15890
|
sizeBytes: number;
|
|
15633
15891
|
vectorCompatible: boolean;
|
|
15892
|
+
semanticSearch: KnowledgeSemanticSearchMode;
|
|
15893
|
+
embedding: KnowledgeEmbeddingProfile;
|
|
15634
15894
|
/** topic id → display name, from the shipped TOC. */
|
|
15635
15895
|
topicNames: Map<string, string>;
|
|
15636
15896
|
sourceUrlByDoc: Map<string, string>;
|
|
15637
15897
|
}
|
|
15898
|
+
interface InstallStart {
|
|
15899
|
+
request: KnowledgeInstallRequestSource;
|
|
15900
|
+
}
|
|
15638
15901
|
interface KnowledgeManagerOptions {
|
|
15639
15902
|
home: string;
|
|
15640
15903
|
host: KnowledgeCatalogHost;
|
|
15641
15904
|
env?: NodeJS.ProcessEnv;
|
|
15642
15905
|
fetchImpl?: typeof fetch;
|
|
15906
|
+
/** The gilde loader: `knowledge-catalog` entries are the download source and the update oracle. */
|
|
15907
|
+
catalog?: CatalogService;
|
|
15908
|
+
history?: HistoryManager;
|
|
15909
|
+
/** The security policy (app network) and the auto-update default. */
|
|
15910
|
+
readConfig?: () => Promise<GezelConfig | null>;
|
|
15911
|
+
/** The machine broker's shared store, when a machine engine is adopted. */
|
|
15912
|
+
sharedInstaller?: SharedKnowledgeInstaller;
|
|
15643
15913
|
/** Project policy lookup (Store.getProject wrapper); null = no policy. */
|
|
15644
15914
|
projectPolicy?: (projectId: string) => Promise<ProjectKnowledgeCatalogs | null>;
|
|
15915
|
+
/** Test seam: embed a query in a catalog profile's space (default: the embed worker). */
|
|
15916
|
+
embedQueryForProfile?: (text: string, profile: KnowledgeEmbeddingProfile) => Promise<number[]>;
|
|
15645
15917
|
}
|
|
15646
15918
|
declare class KnowledgeManager {
|
|
15647
15919
|
private readonly opts;
|
|
15648
15920
|
readonly registry: KnowledgeRegistry;
|
|
15649
15921
|
private readonly mountedByKey;
|
|
15650
|
-
private readonly
|
|
15922
|
+
private readonly installs;
|
|
15923
|
+
/** What each running job was asked to install, for the active-install listing. */
|
|
15924
|
+
private readonly jobRequests;
|
|
15925
|
+
/** Download temp keys of running jobs, so the incomplete listing skips live transfers. */
|
|
15926
|
+
private readonly jobDownloadKeys;
|
|
15927
|
+
private readonly autoUpdateTimers;
|
|
15651
15928
|
private jobCounter;
|
|
15652
15929
|
constructor(opts: KnowledgeManagerOptions);
|
|
15653
15930
|
get host(): KnowledgeCatalogHost;
|
|
15931
|
+
/** The job registry, for the SSE subscriber shared with the model install routes. */
|
|
15932
|
+
get installRegistry(): ChatModelInstallRegistry<KnowledgeInstallEvent, InstallStart>;
|
|
15654
15933
|
private keyFor;
|
|
15655
15934
|
private dirFor;
|
|
15656
15935
|
/** Mount every enabled registry entry. Failures quarantine, never throw. */
|
|
15657
15936
|
start(): Promise<void>;
|
|
15658
15937
|
private mountEntry;
|
|
15659
15938
|
stop(): Promise<void>;
|
|
15939
|
+
/** Every gilde `knowledge-catalog` entry (newest version), keyed by publisher/id. */
|
|
15940
|
+
private gildeItems;
|
|
15941
|
+
/** Coordinates present in the machine-shared asset store (public inventory, read-only). */
|
|
15942
|
+
private sharedInventoryKeys;
|
|
15660
15943
|
list(): Promise<KnowledgeCatalogStatus[]>;
|
|
15944
|
+
/** Installed catalogs for which the shipped gilde content carries a strictly newer version. */
|
|
15945
|
+
updates(): Promise<KnowledgeUpdateCandidate[]>;
|
|
15946
|
+
/**
|
|
15947
|
+
* Every gilde `knowledge-catalog` entry joined with this user's registry,
|
|
15948
|
+
* the machine-shared inventory, running installs and partial downloads —
|
|
15949
|
+
* what the Knowledge screen's browser renders. Offline-safe: gilde is local.
|
|
15950
|
+
*/
|
|
15951
|
+
available(): Promise<KnowledgeAvailableCatalog[]>;
|
|
15661
15952
|
/** Resolve a catalogId (URI authority) to its mounted info, or null. */
|
|
15662
15953
|
mountedCatalog(catalogId: string): MountedInfo | null;
|
|
15663
|
-
|
|
15954
|
+
/**
|
|
15955
|
+
* Start an install, or attach to the one already running. A catalog
|
|
15956
|
+
* install's job id is the catalog id, so a second click, the auto-updater
|
|
15957
|
+
* and a reconnecting client all land on the same job.
|
|
15958
|
+
*/
|
|
15959
|
+
startInstall(request: KnowledgeInstallRequestSource): {
|
|
15664
15960
|
jobId: string;
|
|
15961
|
+
alreadyRunning: boolean;
|
|
15665
15962
|
};
|
|
15963
|
+
private planInstall;
|
|
15964
|
+
/**
|
|
15965
|
+
* Ask the machine broker to ensure the coordinate in the shared store,
|
|
15966
|
+
* relaying its progress. Cancelling this job cancels the broker's too:
|
|
15967
|
+
* this daemon asked for the download, so its cancel is the honest signal.
|
|
15968
|
+
*/
|
|
15969
|
+
private installShared;
|
|
15970
|
+
/** Bytes a private install of this catalog left behind, once a shared copy replaces it. */
|
|
15971
|
+
private deletePrivateBytes;
|
|
15666
15972
|
private runInstall;
|
|
15973
|
+
/** Mount the fresh version, record it, and warm the query embedder before `done`. */
|
|
15974
|
+
private finishInstall;
|
|
15975
|
+
/**
|
|
15976
|
+
* Pull the catalog's query model now, while the user is watching the
|
|
15977
|
+
* install, instead of on the first search. Never an install failure: the
|
|
15978
|
+
* catalog is on disk and keyword search works without the model.
|
|
15979
|
+
*/
|
|
15980
|
+
private prewarmProfile;
|
|
15981
|
+
private recordInstallFailure;
|
|
15667
15982
|
getJob(jobId: string): KnowledgeInstallJob | null;
|
|
15983
|
+
/** Live events for a job; replays the latest progress (and the terminal event) first. */
|
|
15668
15984
|
subscribeJob(jobId: string, listener: (event: KnowledgeInstallEvent) => void): (() => void) | null;
|
|
15669
15985
|
cancelJob(jobId: string): boolean;
|
|
15986
|
+
/** Every running install with its latest progress (the polled twin of the SSE). */
|
|
15987
|
+
activeInstalls(): KnowledgeActiveInstall[];
|
|
15988
|
+
private partialDownloadKeys;
|
|
15989
|
+
/**
|
|
15990
|
+
* Partial archives no job is writing. A key that still matches a gilde
|
|
15991
|
+
* pin resumes on the next install of that catalog; anything else can only
|
|
15992
|
+
* be deleted. Largest first: the most disk to reclaim.
|
|
15993
|
+
*/
|
|
15994
|
+
listIncompleteDownloads(): Promise<IncompleteKnowledgeDownload[]>;
|
|
15995
|
+
/** Delete a partial download by key. Refuses a key a running job is writing. */
|
|
15996
|
+
deleteIncompleteDownload(key: string): Promise<boolean>;
|
|
15997
|
+
/**
|
|
15998
|
+
* Start installs for catalogs whose registry entry (or the install-wide
|
|
15999
|
+
* `config.knowledge.autoUpdate` default) opted into automatic updates.
|
|
16000
|
+
* Returns the `catalog@version` pairs it started.
|
|
16001
|
+
*/
|
|
16002
|
+
checkAutoUpdates(): Promise<string[]>;
|
|
16003
|
+
/** Arm the daily auto-update check (a quiet start, then every 24 h); `stop()` disarms. */
|
|
16004
|
+
startAutoUpdateTimer(): void;
|
|
16005
|
+
private readConfig;
|
|
16006
|
+
private networkAllowed;
|
|
16007
|
+
private logHistory;
|
|
15670
16008
|
setEnabled(catalogId: string, enabled: boolean): Promise<boolean>;
|
|
15671
16009
|
/**
|
|
15672
16010
|
* Adopt a catalog that already exists in the machine-shared asset store:
|
|
@@ -15690,15 +16028,20 @@ declare class KnowledgeManager {
|
|
|
15690
16028
|
}): ReturnType<KnowledgeCatalogHost['documentsPage']>;
|
|
15691
16029
|
getDocument(catalogId: string, documentId: string): ReturnType<KnowledgeCatalogHost['getDocument']>;
|
|
15692
16030
|
/**
|
|
15693
|
-
* Explicit search across active catalogs.
|
|
15694
|
-
*
|
|
15695
|
-
*
|
|
16031
|
+
* Explicit search across active catalogs. Catalogs are grouped by how their
|
|
16032
|
+
* queries are embedded — the daemon's own vector for profiles it shares,
|
|
16033
|
+
* one profile-embedded vector per foreign profile, none for keyword-only —
|
|
16034
|
+
* and each group searches with its own vector, so every catalog is
|
|
16035
|
+
* searched in the space it was built in. Results come back FINISHED —
|
|
16036
|
+
* provenance, topic names, scoring.
|
|
15696
16037
|
*/
|
|
15697
16038
|
searchUnified(query: string, opts: {
|
|
15698
16039
|
vector: number[] | null;
|
|
15699
16040
|
maxResults: number;
|
|
15700
16041
|
projectId?: string;
|
|
15701
16042
|
}): Promise<UnifiedSearchResult[]>;
|
|
16043
|
+
/** A profile's query vector, or undefined when its model is unavailable (that group searches FTS). */
|
|
16044
|
+
private embedForProfile;
|
|
15702
16045
|
private toResult;
|
|
15703
16046
|
/** Enabled+mounted catalogs, intersected with the project policy. */
|
|
15704
16047
|
private activeCatalogKeys;
|
|
@@ -15850,93 +16193,6 @@ interface EnsureModelOrchestrator {
|
|
|
15850
16193
|
subscribeJob(jobId: string, listener: (event: EnsureEvent) => void): () => void;
|
|
15851
16194
|
}
|
|
15852
16195
|
|
|
15853
|
-
/**
|
|
15854
|
-
* Minimal event contract shared by every chat-model installer
|
|
15855
|
-
* (`LlamaCppModelManager.install`, `MlxModelManager.install`): a stream of
|
|
15856
|
-
* typed events where `done` / `error` are terminal. The registry treats
|
|
15857
|
-
* everything else as opaque progress it can replay to late subscribers.
|
|
15858
|
-
*/
|
|
15859
|
-
interface ChatInstallEventBase {
|
|
15860
|
-
type: string;
|
|
15861
|
-
error?: string;
|
|
15862
|
-
}
|
|
15863
|
-
interface ChatInstallSnapshot {
|
|
15864
|
-
id: string;
|
|
15865
|
-
startedAt: string;
|
|
15866
|
-
/** Set once a terminal event has been observed (done, error, or cancel). */
|
|
15867
|
-
finished: boolean;
|
|
15868
|
-
/** Set when the install errored or was cancelled. */
|
|
15869
|
-
error?: string;
|
|
15870
|
-
}
|
|
15871
|
-
type Listener$4<E> = (event: E) => void;
|
|
15872
|
-
/**
|
|
15873
|
-
* Owns the lifecycle of in-flight chat-model installs for one engine.
|
|
15874
|
-
*
|
|
15875
|
-
* Installs used to be tied 1:1 to the HTTP request that started them — when
|
|
15876
|
-
* the client disconnected (closed the window, navigated away mid-download),
|
|
15877
|
-
* the SSE loop exited, the async install generator closed, and the download
|
|
15878
|
-
* was abandoned with `.partial` files on disk and no record it ever ran.
|
|
15879
|
-
* This is the chat-model twin of the image path's `ImageModelPullRegistry`,
|
|
15880
|
-
* which fixed the identical failure mode for image pulls.
|
|
15881
|
-
*
|
|
15882
|
-
* The registry decouples the two: the install runs in a detached background
|
|
15883
|
-
* task owned by this object, and HTTP requests are just consumers that
|
|
15884
|
-
* subscribe to the live event fan-out. Disconnect detaches the consumer; the
|
|
15885
|
-
* install keeps going. Cancel is an explicit `DELETE /models/:id/install`.
|
|
15886
|
-
*
|
|
15887
|
-
* Cancellation unwinds the install generator via `iterator.return()` rather
|
|
15888
|
-
* than an AbortSignal — the generator only runs between yields, and the
|
|
15889
|
-
* downloaders yield progress a few times a second, so the unwind lands
|
|
15890
|
-
* within one progress interval and the `.partial` files stay resumable.
|
|
15891
|
-
*/
|
|
15892
|
-
declare class ChatModelInstallRegistry<E extends ChatInstallEventBase, O> {
|
|
15893
|
-
private readonly entries;
|
|
15894
|
-
private readonly engine;
|
|
15895
|
-
private readonly run;
|
|
15896
|
-
private readonly onDone;
|
|
15897
|
-
constructor(opts: {
|
|
15898
|
-
/** Label used in log lines only. */
|
|
15899
|
-
engine: string;
|
|
15900
|
-
/** Start the actual install — typically `(id, o) => manager.install(id, o)`. */
|
|
15901
|
-
run: (id: string, opts: O) => AsyncIterable<E>;
|
|
15902
|
-
/** Fired when an install reaches `done`, before the event is broadcast —
|
|
15903
|
-
* the place to bust caches so subscribers observing `done` re-fetch
|
|
15904
|
-
* fresh state. */
|
|
15905
|
-
onDone?: (id: string) => void;
|
|
15906
|
-
});
|
|
15907
|
-
/**
|
|
15908
|
-
* Start an install for `id`, or attach to the one already in flight.
|
|
15909
|
-
* Idempotent — a second `start` for a running id does not launch a second
|
|
15910
|
-
* download and does not change the original's options. The install runs in
|
|
15911
|
-
* a detached `void` task; the entry is claimed synchronously so callers
|
|
15912
|
-
* can subscribe without racing the first event.
|
|
15913
|
-
*/
|
|
15914
|
-
start(id: string, opts: O): {
|
|
15915
|
-
alreadyRunning: boolean;
|
|
15916
|
-
};
|
|
15917
|
-
get(id: string): ChatInstallSnapshot | null;
|
|
15918
|
-
/**
|
|
15919
|
-
* Subscribe to live events for an in-flight install. On subscribe, the
|
|
15920
|
-
* registry replays the last known progress event (and the terminal event,
|
|
15921
|
-
* when one has landed) so a late subscriber renders immediately. Returns
|
|
15922
|
-
* `null` when no entry exists for `id`; otherwise an unsubscribe function.
|
|
15923
|
-
* Unsubscribing does NOT cancel the install — disconnect ≠ cancel.
|
|
15924
|
-
*/
|
|
15925
|
-
subscribe(id: string, listener: Listener$4<E>): (() => void) | null;
|
|
15926
|
-
/**
|
|
15927
|
-
* Cancel an in-flight install. The generator unwinds at its next yield,
|
|
15928
|
-
* running the manager's cleanup (active-install deregistration) and
|
|
15929
|
-
* leaving `.partial` files in place for resume. Subscribers receive a
|
|
15930
|
-
* terminal `error` event stating the install was cancelled. Returns true
|
|
15931
|
-
* when a live entry was cancelled.
|
|
15932
|
-
*/
|
|
15933
|
-
cancel(id: string): boolean;
|
|
15934
|
-
/** Shutdown/test hook: unwind every live install and drop all state. */
|
|
15935
|
-
clear(): void;
|
|
15936
|
-
private consume;
|
|
15937
|
-
private broadcast;
|
|
15938
|
-
}
|
|
15939
|
-
|
|
15940
16196
|
interface GgufInstallOpts {
|
|
15941
16197
|
skipSha: boolean;
|
|
15942
16198
|
/**
|
|
@@ -18209,6 +18465,12 @@ interface OllamaEmulationController {
|
|
|
18209
18465
|
interface ServiceContext {
|
|
18210
18466
|
/** Process responsibility; used to keep the machine route table deny-by-default. */
|
|
18211
18467
|
serviceRole: ServiceRole;
|
|
18468
|
+
/**
|
|
18469
|
+
* What this build's distribution channel permits. Resolved once at boot and
|
|
18470
|
+
* passed here so routes take it as a dependency instead of each re-reading
|
|
18471
|
+
* the environment and risking a different answer.
|
|
18472
|
+
*/
|
|
18473
|
+
distribution: ResolvedDistributionPolicy;
|
|
18212
18474
|
home: string;
|
|
18213
18475
|
store: Store;
|
|
18214
18476
|
chatEvents: ChatEventBus;
|
|
@@ -18268,6 +18530,8 @@ interface ServiceContext {
|
|
|
18268
18530
|
reportActions: ReportActionManager;
|
|
18269
18531
|
/** Proposed change sets a gezel drafted for the user to review and apply. */
|
|
18270
18532
|
diffpacks: DiffpackManager;
|
|
18533
|
+
/** Chat prompt drafts the user is writing (artifacts/prompts/). */
|
|
18534
|
+
promptDrafts: PromptDraftManager;
|
|
18271
18535
|
connectors: ConnectorManager;
|
|
18272
18536
|
connectorActions: ConnectorActionManager;
|
|
18273
18537
|
/**
|