@nocturnium/svelte-ide 1.0.0-rc.1
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/LICENSE +21 -0
- package/README.md +251 -0
- package/dist/components/agents/AgentActivityPanel.svelte +565 -0
- package/dist/components/agents/AgentActivityPanel.svelte.d.ts +24 -0
- package/dist/components/agents/AgentAvatar.svelte +417 -0
- package/dist/components/agents/AgentAvatar.svelte.d.ts +23 -0
- package/dist/components/agents/AgentCursor.svelte +224 -0
- package/dist/components/agents/AgentCursor.svelte.d.ts +35 -0
- package/dist/components/agents/AgentPresenceBar.svelte +261 -0
- package/dist/components/agents/AgentPresenceBar.svelte.d.ts +20 -0
- package/dist/components/agents/index.d.ts +4 -0
- package/dist/components/agents/index.js +5 -0
- package/dist/components/ai/AIConversationList.svelte +524 -0
- package/dist/components/ai/AIConversationList.svelte.d.ts +17 -0
- package/dist/components/ai/AIEditPreview.svelte +132 -0
- package/dist/components/ai/AIEditPreview.svelte.d.ts +8 -0
- package/dist/components/ai/AIInlineEdit.svelte +155 -0
- package/dist/components/ai/AIInlineEdit.svelte.d.ts +10 -0
- package/dist/components/ai/AIMessage.svelte +239 -0
- package/dist/components/ai/AIMessage.svelte.d.ts +13 -0
- package/dist/components/ai/AIMessageActions.svelte +176 -0
- package/dist/components/ai/AIMessageActions.svelte.d.ts +12 -0
- package/dist/components/ai/AIMessageContent.svelte +355 -0
- package/dist/components/ai/AIMessageContent.svelte.d.ts +7 -0
- package/dist/components/ai/AIPanel.svelte +561 -0
- package/dist/components/ai/AIPanel.svelte.d.ts +7 -0
- package/dist/components/ai/AISuggestionWidget.svelte +132 -0
- package/dist/components/ai/AISuggestionWidget.svelte.d.ts +10 -0
- package/dist/components/ai/AIToolCallDisplay.svelte +317 -0
- package/dist/components/ai/AIToolCallDisplay.svelte.d.ts +12 -0
- package/dist/components/ai/index.d.ts +9 -0
- package/dist/components/ai/index.js +10 -0
- package/dist/components/core/Avatar.svelte +110 -0
- package/dist/components/core/Avatar.svelte.d.ts +12 -0
- package/dist/components/core/Badge.svelte +98 -0
- package/dist/components/core/Badge.svelte.d.ts +11 -0
- package/dist/components/core/Button.svelte +175 -0
- package/dist/components/core/Button.svelte.d.ts +18 -0
- package/dist/components/core/ConnectionStatus.svelte +294 -0
- package/dist/components/core/ConnectionStatus.svelte.d.ts +20 -0
- package/dist/components/core/ContextMenu.svelte +176 -0
- package/dist/components/core/ContextMenu.svelte.d.ts +19 -0
- package/dist/components/core/ErrorBoundary.svelte +277 -0
- package/dist/components/core/ErrorBoundary.svelte.d.ts +23 -0
- package/dist/components/core/Icon.svelte +107 -0
- package/dist/components/core/Icon.svelte.d.ts +8 -0
- package/dist/components/core/Input.svelte +138 -0
- package/dist/components/core/Input.svelte.d.ts +20 -0
- package/dist/components/core/Kbd.svelte +34 -0
- package/dist/components/core/Kbd.svelte.d.ts +7 -0
- package/dist/components/core/ResizeHandle.svelte +200 -0
- package/dist/components/core/ResizeHandle.svelte.d.ts +23 -0
- package/dist/components/core/Spinner.svelte +35 -0
- package/dist/components/core/Spinner.svelte.d.ts +7 -0
- package/dist/components/core/Textarea.svelte +112 -0
- package/dist/components/core/Textarea.svelte.d.ts +18 -0
- package/dist/components/core/Tooltip.svelte +103 -0
- package/dist/components/core/Tooltip.svelte.d.ts +11 -0
- package/dist/components/core/index.d.ts +13 -0
- package/dist/components/core/index.js +14 -0
- package/dist/components/editor/AIFocusLayer.svelte +430 -0
- package/dist/components/editor/AIFocusLayer.svelte.d.ts +32 -0
- package/dist/components/editor/Breadcrumbs.svelte +435 -0
- package/dist/components/editor/Breadcrumbs.svelte.d.ts +33 -0
- package/dist/components/editor/BreakpointLayer.svelte +642 -0
- package/dist/components/editor/BreakpointLayer.svelte.d.ts +20 -0
- package/dist/components/editor/CognitiveLoadMeter.svelte +324 -0
- package/dist/components/editor/CognitiveLoadMeter.svelte.d.ts +18 -0
- package/dist/components/editor/CollaborativeEditor.svelte +218 -0
- package/dist/components/editor/CollaborativeEditor.svelte.d.ts +32 -0
- package/dist/components/editor/CommandPalette.svelte +434 -0
- package/dist/components/editor/CommandPalette.svelte.d.ts +11 -0
- package/dist/components/editor/ComplexityLayer.svelte +293 -0
- package/dist/components/editor/ComplexityLayer.svelte.d.ts +23 -0
- package/dist/components/editor/ConflictZoneLayer.svelte +441 -0
- package/dist/components/editor/ConflictZoneLayer.svelte.d.ts +25 -0
- package/dist/components/editor/ContextLens.svelte +262 -0
- package/dist/components/editor/ContextLens.svelte.d.ts +27 -0
- package/dist/components/editor/CustomEditor.svelte +1242 -0
- package/dist/components/editor/CustomEditor.svelte.d.ts +37 -0
- package/dist/components/editor/DebugConsole.svelte +646 -0
- package/dist/components/editor/DebugConsole.svelte.d.ts +41 -0
- package/dist/components/editor/EchoCursorLayer.svelte +363 -0
- package/dist/components/editor/EchoCursorLayer.svelte.d.ts +24 -0
- package/dist/components/editor/Editor.svelte +61 -0
- package/dist/components/editor/Editor.svelte.d.ts +22 -0
- package/dist/components/editor/EditorGutter.svelte +119 -0
- package/dist/components/editor/EditorGutter.svelte.d.ts +19 -0
- package/dist/components/editor/EditorLines.svelte +182 -0
- package/dist/components/editor/EditorLines.svelte.d.ts +43 -0
- package/dist/components/editor/EditorPane.svelte +134 -0
- package/dist/components/editor/EditorPane.svelte.d.ts +9 -0
- package/dist/components/editor/EditorSelections.svelte +186 -0
- package/dist/components/editor/EditorSelections.svelte.d.ts +25 -0
- package/dist/components/editor/EditorTabs.svelte +170 -0
- package/dist/components/editor/EditorTabs.svelte.d.ts +12 -0
- package/dist/components/editor/FileExplorer.svelte +811 -0
- package/dist/components/editor/FileExplorer.svelte.d.ts +67 -0
- package/dist/components/editor/FileIcon.svelte +110 -0
- package/dist/components/editor/FileIcon.svelte.d.ts +10 -0
- package/dist/components/editor/FindReplace.svelte +448 -0
- package/dist/components/editor/FindReplace.svelte.d.ts +40 -0
- package/dist/components/editor/GhostBracketLayer.svelte +391 -0
- package/dist/components/editor/GhostBracketLayer.svelte.d.ts +24 -0
- package/dist/components/editor/GitBlameLayer.svelte +436 -0
- package/dist/components/editor/GitBlameLayer.svelte.d.ts +18 -0
- package/dist/components/editor/InlineDiagnosticsLayer.svelte +540 -0
- package/dist/components/editor/InlineDiagnosticsLayer.svelte.d.ts +35 -0
- package/dist/components/editor/InlineDiffLayer.svelte +337 -0
- package/dist/components/editor/InlineDiffLayer.svelte.d.ts +31 -0
- package/dist/components/editor/MinimalEditor.svelte +75 -0
- package/dist/components/editor/MinimalEditor.svelte.d.ts +6 -0
- package/dist/components/editor/MinimalEditor2.svelte +84 -0
- package/dist/components/editor/MinimalEditor2.svelte.d.ts +6 -0
- package/dist/components/editor/Minimap.svelte +327 -0
- package/dist/components/editor/Minimap.svelte.d.ts +34 -0
- package/dist/components/editor/PluginPreviewSandbox.svelte +793 -0
- package/dist/components/editor/PluginPreviewSandbox.svelte.d.ts +49 -0
- package/dist/components/editor/ProblemsPanel.svelte +628 -0
- package/dist/components/editor/ProblemsPanel.svelte.d.ts +25 -0
- package/dist/components/editor/QuickActionsMenu.svelte +403 -0
- package/dist/components/editor/QuickActionsMenu.svelte.d.ts +18 -0
- package/dist/components/editor/SnippetPalette.svelte +530 -0
- package/dist/components/editor/SnippetPalette.svelte.d.ts +16 -0
- package/dist/components/editor/StructureMap.svelte +431 -0
- package/dist/components/editor/StructureMap.svelte.d.ts +37 -0
- package/dist/components/editor/SymbolOutline.svelte +722 -0
- package/dist/components/editor/SymbolOutline.svelte.d.ts +44 -0
- package/dist/components/editor/TimelineScrubber.svelte +470 -0
- package/dist/components/editor/TimelineScrubber.svelte.d.ts +40 -0
- package/dist/components/editor/TokenRenderer.svelte +69 -0
- package/dist/components/editor/TokenRenderer.svelte.d.ts +15 -0
- package/dist/components/editor/constants.d.ts +32 -0
- package/dist/components/editor/constants.js +36 -0
- package/dist/components/editor/core/ai-awareness.d.ts +176 -0
- package/dist/components/editor/core/ai-awareness.js +210 -0
- package/dist/components/editor/core/bracket-healer.d.ts +189 -0
- package/dist/components/editor/core/bracket-healer.js +406 -0
- package/dist/components/editor/core/breakpoints.d.ts +203 -0
- package/dist/components/editor/core/breakpoints.js +414 -0
- package/dist/components/editor/core/commands.d.ts +108 -0
- package/dist/components/editor/core/commands.js +246 -0
- package/dist/components/editor/core/complexity-analyzer.d.ts +123 -0
- package/dist/components/editor/core/complexity-analyzer.js +376 -0
- package/dist/components/editor/core/conflict-predictor.d.ts +135 -0
- package/dist/components/editor/core/conflict-predictor.js +316 -0
- package/dist/components/editor/core/crdt-binding.d.ts +118 -0
- package/dist/components/editor/core/crdt-binding.js +286 -0
- package/dist/components/editor/core/diagnostics.d.ts +210 -0
- package/dist/components/editor/core/diagnostics.js +335 -0
- package/dist/components/editor/core/echo-cursor.d.ts +201 -0
- package/dist/components/editor/core/echo-cursor.js +267 -0
- package/dist/components/editor/core/folding.d.ts +124 -0
- package/dist/components/editor/core/folding.js +672 -0
- package/dist/components/editor/core/ghost-pair.d.ts +122 -0
- package/dist/components/editor/core/ghost-pair.js +221 -0
- package/dist/components/editor/core/git-blame.d.ts +170 -0
- package/dist/components/editor/core/git-blame.js +324 -0
- package/dist/components/editor/core/index.d.ts +26 -0
- package/dist/components/editor/core/index.js +24 -0
- package/dist/components/editor/core/keybindings.d.ts +79 -0
- package/dist/components/editor/core/keybindings.js +357 -0
- package/dist/components/editor/core/multi-cursor.d.ts +196 -0
- package/dist/components/editor/core/multi-cursor.js +521 -0
- package/dist/components/editor/core/navigation.d.ts +107 -0
- package/dist/components/editor/core/navigation.js +408 -0
- package/dist/components/editor/core/quick-actions.d.ts +189 -0
- package/dist/components/editor/core/quick-actions.js +427 -0
- package/dist/components/editor/core/search.d.ts +88 -0
- package/dist/components/editor/core/search.js +192 -0
- package/dist/components/editor/core/semantic-analyzer.d.ts +77 -0
- package/dist/components/editor/core/semantic-analyzer.js +424 -0
- package/dist/components/editor/core/snippet-manager.d.ts +202 -0
- package/dist/components/editor/core/snippet-manager.js +565 -0
- package/dist/components/editor/core/state.d.ts +367 -0
- package/dist/components/editor/core/state.js +900 -0
- package/dist/components/editor/core/timeline.d.ts +204 -0
- package/dist/components/editor/core/timeline.js +349 -0
- package/dist/components/editor/editor-find.d.ts +56 -0
- package/dist/components/editor/editor-find.js +148 -0
- package/dist/components/editor/editor-input.d.ts +77 -0
- package/dist/components/editor/editor-input.js +445 -0
- package/dist/components/editor/editor-multicursor.d.ts +21 -0
- package/dist/components/editor/editor-multicursor.js +196 -0
- package/dist/components/editor/editor-scroll.d.ts +14 -0
- package/dist/components/editor/editor-scroll.js +34 -0
- package/dist/components/editor/index.d.ts +15 -0
- package/dist/components/editor/index.js +21 -0
- package/dist/components/editor/languages.d.ts +62 -0
- package/dist/components/editor/languages.js +285 -0
- package/dist/components/editor/theme.d.ts +88 -0
- package/dist/components/editor/theme.js +139 -0
- package/dist/components/editor/tokenizer/base.d.ts +40 -0
- package/dist/components/editor/tokenizer/base.js +203 -0
- package/dist/components/editor/tokenizer/index.d.ts +56 -0
- package/dist/components/editor/tokenizer/index.js +215 -0
- package/dist/components/editor/tokenizer/languages/css.d.ts +17 -0
- package/dist/components/editor/tokenizer/languages/css.js +194 -0
- package/dist/components/editor/tokenizer/languages/go.d.ts +17 -0
- package/dist/components/editor/tokenizer/languages/go.js +220 -0
- package/dist/components/editor/tokenizer/languages/html.d.ts +24 -0
- package/dist/components/editor/tokenizer/languages/html.js +145 -0
- package/dist/components/editor/tokenizer/languages/javascript.d.ts +56 -0
- package/dist/components/editor/tokenizer/languages/javascript.js +452 -0
- package/dist/components/editor/tokenizer/languages/json.d.ts +12 -0
- package/dist/components/editor/tokenizer/languages/json.js +91 -0
- package/dist/components/editor/tokenizer/languages/markdown.d.ts +16 -0
- package/dist/components/editor/tokenizer/languages/markdown.js +156 -0
- package/dist/components/editor/tokenizer/languages/python.d.ts +20 -0
- package/dist/components/editor/tokenizer/languages/python.js +227 -0
- package/dist/components/editor/tokenizer/languages/svelte.d.ts +40 -0
- package/dist/components/editor/tokenizer/languages/svelte.js +326 -0
- package/dist/components/editor/tokenizer/types.d.ts +86 -0
- package/dist/components/editor/tokenizer/types.js +4 -0
- package/dist/components/layout/IDELayout.svelte +274 -0
- package/dist/components/layout/IDELayout.svelte.d.ts +29 -0
- package/dist/components/layout/StatusBar.svelte +511 -0
- package/dist/components/layout/StatusBar.svelte.d.ts +47 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.js +3 -0
- package/dist/components/lsp/AutocompleteWidget.svelte +364 -0
- package/dist/components/lsp/AutocompleteWidget.svelte.d.ts +33 -0
- package/dist/components/lsp/DiagnosticMarker.svelte +166 -0
- package/dist/components/lsp/DiagnosticMarker.svelte.d.ts +19 -0
- package/dist/components/lsp/DiagnosticsPanel.svelte +388 -0
- package/dist/components/lsp/DiagnosticsPanel.svelte.d.ts +21 -0
- package/dist/components/lsp/HoverTooltip.svelte +274 -0
- package/dist/components/lsp/HoverTooltip.svelte.d.ts +24 -0
- package/dist/components/lsp/LSPEditor.svelte +486 -0
- package/dist/components/lsp/LSPEditor.svelte.d.ts +39 -0
- package/dist/components/lsp/SignatureHelpWidget.svelte +216 -0
- package/dist/components/lsp/SignatureHelpWidget.svelte.d.ts +22 -0
- package/dist/components/lsp/index.d.ts +6 -0
- package/dist/components/lsp/index.js +7 -0
- package/dist/components/plugins/PluginCard.svelte +153 -0
- package/dist/components/plugins/PluginCard.svelte.d.ts +19 -0
- package/dist/components/plugins/PluginPanel.svelte +280 -0
- package/dist/components/plugins/PluginPanel.svelte.d.ts +8 -0
- package/dist/components/plugins/PluginProposalForm.svelte +250 -0
- package/dist/components/plugins/PluginProposalForm.svelte.d.ts +6 -0
- package/dist/components/plugins/PluginStatusBadge.svelte +14 -0
- package/dist/components/plugins/PluginStatusBadge.svelte.d.ts +8 -0
- package/dist/components/plugins/index.d.ts +4 -0
- package/dist/components/plugins/index.js +5 -0
- package/dist/components/vfs/LockConflictDialog.svelte +705 -0
- package/dist/components/vfs/LockConflictDialog.svelte.d.ts +21 -0
- package/dist/components/vfs/LockIndicator.svelte +194 -0
- package/dist/components/vfs/LockIndicator.svelte.d.ts +29 -0
- package/dist/components/vfs/LockOverlay.svelte +344 -0
- package/dist/components/vfs/LockOverlay.svelte.d.ts +17 -0
- package/dist/components/vfs/VersionConflictDialog.svelte +549 -0
- package/dist/components/vfs/VersionConflictDialog.svelte.d.ts +24 -0
- package/dist/components/vfs/index.d.ts +4 -0
- package/dist/components/vfs/index.js +5 -0
- package/dist/crdt/awareness.d.ts +42 -0
- package/dist/crdt/awareness.js +109 -0
- package/dist/crdt/document.d.ts +101 -0
- package/dist/crdt/document.js +187 -0
- package/dist/crdt/index.d.ts +9 -0
- package/dist/crdt/index.js +8 -0
- package/dist/crdt/provider.d.ts +85 -0
- package/dist/crdt/provider.js +150 -0
- package/dist/crdt/types.d.ts +61 -0
- package/dist/crdt/types.js +4 -0
- package/dist/crdt/undo.d.ts +34 -0
- package/dist/crdt/undo.js +70 -0
- package/dist/index.d.ts +277 -0
- package/dist/index.js +280 -0
- package/dist/plugins/index.d.ts +103 -0
- package/dist/plugins/index.js +153 -0
- package/dist/services/error-handling.d.ts +95 -0
- package/dist/services/error-handling.js +413 -0
- package/dist/services/ide-integration.d.ts +83 -0
- package/dist/services/ide-integration.js +367 -0
- package/dist/services/lsp-client.d.ts +69 -0
- package/dist/services/lsp-client.js +667 -0
- package/dist/services/mock-ai.d.ts +37 -0
- package/dist/services/mock-ai.js +318 -0
- package/dist/services/optimistic.d.ts +141 -0
- package/dist/services/optimistic.js +367 -0
- package/dist/services/vfs-client.d.ts +81 -0
- package/dist/services/vfs-client.js +348 -0
- package/dist/stores/agents.svelte.d.ts +85 -0
- package/dist/stores/agents.svelte.js +459 -0
- package/dist/stores/ai-persistence.svelte.d.ts +76 -0
- package/dist/stores/ai-persistence.svelte.js +334 -0
- package/dist/stores/ai.svelte.d.ts +140 -0
- package/dist/stores/ai.svelte.js +383 -0
- package/dist/stores/collaboration.svelte.d.ts +164 -0
- package/dist/stores/collaboration.svelte.js +334 -0
- package/dist/stores/editor.svelte.d.ts +131 -0
- package/dist/stores/editor.svelte.js +250 -0
- package/dist/stores/index.d.ts +10 -0
- package/dist/stores/index.js +29 -0
- package/dist/stores/layout.svelte.d.ts +171 -0
- package/dist/stores/layout.svelte.js +351 -0
- package/dist/stores/plugin.svelte.d.ts +121 -0
- package/dist/stores/plugin.svelte.js +410 -0
- package/dist/stores/vfs.svelte.d.ts +123 -0
- package/dist/stores/vfs.svelte.js +680 -0
- package/dist/styles/theme.css +623 -0
- package/dist/types/agents.d.ts +127 -0
- package/dist/types/agents.js +5 -0
- package/dist/types/ai.d.ts +137 -0
- package/dist/types/ai.js +4 -0
- package/dist/types/crdt.d.ts +222 -0
- package/dist/types/crdt.js +5 -0
- package/dist/types/editor.d.ts +52 -0
- package/dist/types/editor.js +18 -0
- package/dist/types/events.d.ts +133 -0
- package/dist/types/events.js +4 -0
- package/dist/types/filesystem.d.ts +77 -0
- package/dist/types/filesystem.js +4 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.js +12 -0
- package/dist/types/lsp.d.ts +691 -0
- package/dist/types/lsp.js +108 -0
- package/dist/types/plugin.d.ts +239 -0
- package/dist/types/plugin.js +5 -0
- package/dist/types/vfs.d.ts +191 -0
- package/dist/types/vfs.js +18 -0
- package/dist/utils/format.d.ts +55 -0
- package/dist/utils/format.js +152 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/keybindings.d.ts +33 -0
- package/dist/utils/keybindings.js +171 -0
- package/dist/utils/language.d.ts +27 -0
- package/dist/utils/language.js +222 -0
- package/package.json +178 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Server Protocol (LSP) Type Definitions
|
|
3
|
+
* Based on LSP 3.17 specification
|
|
4
|
+
*/
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// Document Sync
|
|
7
|
+
// ============================================================================
|
|
8
|
+
/** How documents are synced to the server */
|
|
9
|
+
export var TextDocumentSyncKind;
|
|
10
|
+
(function (TextDocumentSyncKind) {
|
|
11
|
+
TextDocumentSyncKind[TextDocumentSyncKind["None"] = 0] = "None";
|
|
12
|
+
TextDocumentSyncKind[TextDocumentSyncKind["Full"] = 1] = "Full";
|
|
13
|
+
TextDocumentSyncKind[TextDocumentSyncKind["Incremental"] = 2] = "Incremental";
|
|
14
|
+
})(TextDocumentSyncKind || (TextDocumentSyncKind = {}));
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// Diagnostics
|
|
17
|
+
// ============================================================================
|
|
18
|
+
/** Diagnostic severity levels */
|
|
19
|
+
export var DiagnosticSeverity;
|
|
20
|
+
(function (DiagnosticSeverity) {
|
|
21
|
+
DiagnosticSeverity[DiagnosticSeverity["Error"] = 1] = "Error";
|
|
22
|
+
DiagnosticSeverity[DiagnosticSeverity["Warning"] = 2] = "Warning";
|
|
23
|
+
DiagnosticSeverity[DiagnosticSeverity["Information"] = 3] = "Information";
|
|
24
|
+
DiagnosticSeverity[DiagnosticSeverity["Hint"] = 4] = "Hint";
|
|
25
|
+
})(DiagnosticSeverity || (DiagnosticSeverity = {}));
|
|
26
|
+
/** Diagnostic tags */
|
|
27
|
+
export var DiagnosticTag;
|
|
28
|
+
(function (DiagnosticTag) {
|
|
29
|
+
DiagnosticTag[DiagnosticTag["Unnecessary"] = 1] = "Unnecessary";
|
|
30
|
+
DiagnosticTag[DiagnosticTag["Deprecated"] = 2] = "Deprecated";
|
|
31
|
+
})(DiagnosticTag || (DiagnosticTag = {}));
|
|
32
|
+
// ============================================================================
|
|
33
|
+
// Completion
|
|
34
|
+
// ============================================================================
|
|
35
|
+
/** Completion item kinds */
|
|
36
|
+
export var CompletionItemKind;
|
|
37
|
+
(function (CompletionItemKind) {
|
|
38
|
+
CompletionItemKind[CompletionItemKind["Text"] = 1] = "Text";
|
|
39
|
+
CompletionItemKind[CompletionItemKind["Method"] = 2] = "Method";
|
|
40
|
+
CompletionItemKind[CompletionItemKind["Function"] = 3] = "Function";
|
|
41
|
+
CompletionItemKind[CompletionItemKind["Constructor"] = 4] = "Constructor";
|
|
42
|
+
CompletionItemKind[CompletionItemKind["Field"] = 5] = "Field";
|
|
43
|
+
CompletionItemKind[CompletionItemKind["Variable"] = 6] = "Variable";
|
|
44
|
+
CompletionItemKind[CompletionItemKind["Class"] = 7] = "Class";
|
|
45
|
+
CompletionItemKind[CompletionItemKind["Interface"] = 8] = "Interface";
|
|
46
|
+
CompletionItemKind[CompletionItemKind["Module"] = 9] = "Module";
|
|
47
|
+
CompletionItemKind[CompletionItemKind["Property"] = 10] = "Property";
|
|
48
|
+
CompletionItemKind[CompletionItemKind["Unit"] = 11] = "Unit";
|
|
49
|
+
CompletionItemKind[CompletionItemKind["Value"] = 12] = "Value";
|
|
50
|
+
CompletionItemKind[CompletionItemKind["Enum"] = 13] = "Enum";
|
|
51
|
+
CompletionItemKind[CompletionItemKind["Keyword"] = 14] = "Keyword";
|
|
52
|
+
CompletionItemKind[CompletionItemKind["Snippet"] = 15] = "Snippet";
|
|
53
|
+
CompletionItemKind[CompletionItemKind["Color"] = 16] = "Color";
|
|
54
|
+
CompletionItemKind[CompletionItemKind["File"] = 17] = "File";
|
|
55
|
+
CompletionItemKind[CompletionItemKind["Reference"] = 18] = "Reference";
|
|
56
|
+
CompletionItemKind[CompletionItemKind["Folder"] = 19] = "Folder";
|
|
57
|
+
CompletionItemKind[CompletionItemKind["EnumMember"] = 20] = "EnumMember";
|
|
58
|
+
CompletionItemKind[CompletionItemKind["Constant"] = 21] = "Constant";
|
|
59
|
+
CompletionItemKind[CompletionItemKind["Struct"] = 22] = "Struct";
|
|
60
|
+
CompletionItemKind[CompletionItemKind["Event"] = 23] = "Event";
|
|
61
|
+
CompletionItemKind[CompletionItemKind["Operator"] = 24] = "Operator";
|
|
62
|
+
CompletionItemKind[CompletionItemKind["TypeParameter"] = 25] = "TypeParameter";
|
|
63
|
+
})(CompletionItemKind || (CompletionItemKind = {}));
|
|
64
|
+
/** Insert text format */
|
|
65
|
+
export var InsertTextFormat;
|
|
66
|
+
(function (InsertTextFormat) {
|
|
67
|
+
InsertTextFormat[InsertTextFormat["PlainText"] = 1] = "PlainText";
|
|
68
|
+
InsertTextFormat[InsertTextFormat["Snippet"] = 2] = "Snippet";
|
|
69
|
+
})(InsertTextFormat || (InsertTextFormat = {}));
|
|
70
|
+
/** Completion item insert text mode */
|
|
71
|
+
export var InsertTextMode;
|
|
72
|
+
(function (InsertTextMode) {
|
|
73
|
+
InsertTextMode[InsertTextMode["AsIs"] = 1] = "AsIs";
|
|
74
|
+
InsertTextMode[InsertTextMode["AdjustIndentation"] = 2] = "AdjustIndentation";
|
|
75
|
+
})(InsertTextMode || (InsertTextMode = {}));
|
|
76
|
+
/** How a completion was triggered */
|
|
77
|
+
export var CompletionTriggerKind;
|
|
78
|
+
(function (CompletionTriggerKind) {
|
|
79
|
+
CompletionTriggerKind[CompletionTriggerKind["Invoked"] = 1] = "Invoked";
|
|
80
|
+
CompletionTriggerKind[CompletionTriggerKind["TriggerCharacter"] = 2] = "TriggerCharacter";
|
|
81
|
+
CompletionTriggerKind[CompletionTriggerKind["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions";
|
|
82
|
+
})(CompletionTriggerKind || (CompletionTriggerKind = {}));
|
|
83
|
+
/** How a signature help was triggered */
|
|
84
|
+
export var SignatureHelpTriggerKind;
|
|
85
|
+
(function (SignatureHelpTriggerKind) {
|
|
86
|
+
SignatureHelpTriggerKind[SignatureHelpTriggerKind["Invoked"] = 1] = "Invoked";
|
|
87
|
+
SignatureHelpTriggerKind[SignatureHelpTriggerKind["TriggerCharacter"] = 2] = "TriggerCharacter";
|
|
88
|
+
SignatureHelpTriggerKind[SignatureHelpTriggerKind["ContentChange"] = 3] = "ContentChange";
|
|
89
|
+
})(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {}));
|
|
90
|
+
/** How a code action was triggered */
|
|
91
|
+
export var CodeActionTriggerKind;
|
|
92
|
+
(function (CodeActionTriggerKind) {
|
|
93
|
+
CodeActionTriggerKind[CodeActionTriggerKind["Invoked"] = 1] = "Invoked";
|
|
94
|
+
CodeActionTriggerKind[CodeActionTriggerKind["Automatic"] = 2] = "Automatic";
|
|
95
|
+
})(CodeActionTriggerKind || (CodeActionTriggerKind = {}));
|
|
96
|
+
/** Standard JSON-RPC error codes */
|
|
97
|
+
export var JSONRPCErrorCode;
|
|
98
|
+
(function (JSONRPCErrorCode) {
|
|
99
|
+
JSONRPCErrorCode[JSONRPCErrorCode["ParseError"] = -32700] = "ParseError";
|
|
100
|
+
JSONRPCErrorCode[JSONRPCErrorCode["InvalidRequest"] = -32600] = "InvalidRequest";
|
|
101
|
+
JSONRPCErrorCode[JSONRPCErrorCode["MethodNotFound"] = -32601] = "MethodNotFound";
|
|
102
|
+
JSONRPCErrorCode[JSONRPCErrorCode["InvalidParams"] = -32602] = "InvalidParams";
|
|
103
|
+
JSONRPCErrorCode[JSONRPCErrorCode["InternalError"] = -32603] = "InternalError";
|
|
104
|
+
JSONRPCErrorCode[JSONRPCErrorCode["ServerNotInitialized"] = -32002] = "ServerNotInitialized";
|
|
105
|
+
JSONRPCErrorCode[JSONRPCErrorCode["UnknownErrorCode"] = -32001] = "UnknownErrorCode";
|
|
106
|
+
JSONRPCErrorCode[JSONRPCErrorCode["RequestCancelled"] = -32800] = "RequestCancelled";
|
|
107
|
+
JSONRPCErrorCode[JSONRPCErrorCode["ContentModified"] = -32801] = "ContentModified";
|
|
108
|
+
})(JSONRPCErrorCode || (JSONRPCErrorCode = {}));
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin/Extension system type definitions
|
|
3
|
+
* Models a proposal-based plugin lifecycle (draft → review → testing → deployed)
|
|
4
|
+
*/
|
|
5
|
+
export type PluginStatus = 'draft' | 'submitted' | 'reviewing' | 'approved' | 'testing' | 'deploying' | 'deployed' | 'rejected' | 'rolled_back';
|
|
6
|
+
export type PluginCategory = 'file_ops' | 'http' | 'analysis' | 'transform' | 'validation' | 'utility' | 'integration' | 'ui' | 'editor' | 'ai';
|
|
7
|
+
export interface PluginProposal {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
category: PluginCategory;
|
|
12
|
+
tags: string[];
|
|
13
|
+
version: number;
|
|
14
|
+
status: PluginStatus;
|
|
15
|
+
author: string;
|
|
16
|
+
/** JSON Schema for plugin parameters */
|
|
17
|
+
parameters: PluginParameters;
|
|
18
|
+
/** Plugin implementation - can be Svelte component or JS module */
|
|
19
|
+
implementation: PluginImplementation;
|
|
20
|
+
/** Test cases for validation */
|
|
21
|
+
testCases: PluginTestCase[];
|
|
22
|
+
/** Review votes collected during the approval step */
|
|
23
|
+
votes: PluginVote[];
|
|
24
|
+
/** Issues found during review */
|
|
25
|
+
issues: PluginIssue[];
|
|
26
|
+
/** Deployment metrics */
|
|
27
|
+
metrics?: PluginMetrics;
|
|
28
|
+
/** Rollout state for gradual deployment */
|
|
29
|
+
rolloutState?: PluginRolloutState;
|
|
30
|
+
createdAt: Date;
|
|
31
|
+
updatedAt: Date;
|
|
32
|
+
deployedAt?: Date;
|
|
33
|
+
}
|
|
34
|
+
export interface PluginParameters {
|
|
35
|
+
type: 'object';
|
|
36
|
+
properties: Record<string, PluginParameterProperty>;
|
|
37
|
+
required?: string[];
|
|
38
|
+
}
|
|
39
|
+
export interface PluginParameterProperty {
|
|
40
|
+
type: 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
41
|
+
description?: string;
|
|
42
|
+
default?: unknown;
|
|
43
|
+
enum?: unknown[];
|
|
44
|
+
minimum?: number;
|
|
45
|
+
maximum?: number;
|
|
46
|
+
minLength?: number;
|
|
47
|
+
maxLength?: number;
|
|
48
|
+
pattern?: string;
|
|
49
|
+
items?: PluginParameterProperty;
|
|
50
|
+
properties?: Record<string, PluginParameterProperty>;
|
|
51
|
+
}
|
|
52
|
+
export interface PluginImplementation {
|
|
53
|
+
/** Type of implementation */
|
|
54
|
+
type: 'component' | 'module' | 'action' | 'provider';
|
|
55
|
+
/** For SSR-rendered components */
|
|
56
|
+
componentPath?: string;
|
|
57
|
+
/** For JS modules */
|
|
58
|
+
moduleCode?: string;
|
|
59
|
+
/** Entry point function name */
|
|
60
|
+
entryPoint?: string;
|
|
61
|
+
/** Dependencies required */
|
|
62
|
+
dependencies?: string[];
|
|
63
|
+
/** Permissions required */
|
|
64
|
+
permissions?: PluginPermission[];
|
|
65
|
+
}
|
|
66
|
+
export type PluginPermission = 'filesystem:read' | 'filesystem:write' | 'network:fetch' | 'editor:read' | 'editor:write' | 'ai:invoke' | 'ui:render' | 'storage:local' | 'storage:sync';
|
|
67
|
+
export interface PluginTestCase {
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
input: Record<string, unknown>;
|
|
72
|
+
expectedOutput?: Record<string, unknown>;
|
|
73
|
+
expectError?: boolean;
|
|
74
|
+
timeout?: number;
|
|
75
|
+
}
|
|
76
|
+
export interface PluginTestResult {
|
|
77
|
+
testCaseId: string;
|
|
78
|
+
passed: boolean;
|
|
79
|
+
output?: unknown;
|
|
80
|
+
error?: string;
|
|
81
|
+
duration: number;
|
|
82
|
+
executedAt: Date;
|
|
83
|
+
}
|
|
84
|
+
export interface PluginVote {
|
|
85
|
+
agentId: string;
|
|
86
|
+
agentType: 'security' | 'quality' | 'usability' | 'performance';
|
|
87
|
+
approved: boolean;
|
|
88
|
+
confidence: number;
|
|
89
|
+
weight: number;
|
|
90
|
+
reasoning: string;
|
|
91
|
+
votedAt: Date;
|
|
92
|
+
}
|
|
93
|
+
export interface PluginIssue {
|
|
94
|
+
id: string;
|
|
95
|
+
severity: 'critical' | 'high' | 'medium' | 'low' | 'info';
|
|
96
|
+
category: string;
|
|
97
|
+
message: string;
|
|
98
|
+
location?: string;
|
|
99
|
+
suggestion?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface PluginMetrics {
|
|
102
|
+
successRate: number;
|
|
103
|
+
avgDuration: number;
|
|
104
|
+
p50Latency: number;
|
|
105
|
+
p95Latency: number;
|
|
106
|
+
p99Latency: number;
|
|
107
|
+
invocationCount: number;
|
|
108
|
+
errorCount: number;
|
|
109
|
+
lastInvokedAt?: Date;
|
|
110
|
+
}
|
|
111
|
+
export interface PluginRolloutState {
|
|
112
|
+
currentPercentage: number;
|
|
113
|
+
targetPercentage: number;
|
|
114
|
+
stepStartedAt: Date;
|
|
115
|
+
baselineMetrics?: PluginMetrics;
|
|
116
|
+
currentMetrics?: PluginMetrics;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Plugin event for SSE streaming
|
|
120
|
+
*/
|
|
121
|
+
export interface PluginEvent {
|
|
122
|
+
id: string;
|
|
123
|
+
proposalId: string;
|
|
124
|
+
type: PluginEventType;
|
|
125
|
+
actor: string;
|
|
126
|
+
details: Record<string, unknown>;
|
|
127
|
+
occurredAt: Date;
|
|
128
|
+
}
|
|
129
|
+
export type PluginEventType = 'created' | 'submitted' | 'review_started' | 'vote_cast' | 'consensus' | 'testing_started' | 'test_completed' | 'approved' | 'rejected' | 'deploying' | 'rollout_step' | 'deployed' | 'rolled_back' | 'feedback';
|
|
130
|
+
/**
|
|
131
|
+
* Plugin manifest for registration
|
|
132
|
+
*/
|
|
133
|
+
export interface PluginManifest {
|
|
134
|
+
name: string;
|
|
135
|
+
version: string;
|
|
136
|
+
description: string;
|
|
137
|
+
author: string;
|
|
138
|
+
category: PluginCategory;
|
|
139
|
+
tags: string[];
|
|
140
|
+
/** Plugin entry points */
|
|
141
|
+
main?: string;
|
|
142
|
+
components?: Record<string, string>;
|
|
143
|
+
actions?: Record<string, string>;
|
|
144
|
+
providers?: Record<string, string>;
|
|
145
|
+
/** Plugin configuration */
|
|
146
|
+
config?: PluginParameters;
|
|
147
|
+
/** Required permissions */
|
|
148
|
+
permissions?: PluginPermission[];
|
|
149
|
+
/** Dependencies on other plugins */
|
|
150
|
+
dependencies?: Record<string, string>;
|
|
151
|
+
/** Activation events */
|
|
152
|
+
activationEvents?: string[];
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Plugin runtime instance
|
|
156
|
+
*/
|
|
157
|
+
export interface PluginInstance {
|
|
158
|
+
id: string;
|
|
159
|
+
manifest: PluginManifest;
|
|
160
|
+
status: 'inactive' | 'activating' | 'active' | 'error';
|
|
161
|
+
error?: string;
|
|
162
|
+
/** Exported API from the plugin */
|
|
163
|
+
exports?: Record<string, unknown>;
|
|
164
|
+
/** Cleanup function */
|
|
165
|
+
dispose?: () => void;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Plugin contribution points
|
|
169
|
+
*/
|
|
170
|
+
export interface PluginContributions {
|
|
171
|
+
/** Commands that can be executed */
|
|
172
|
+
commands?: PluginCommand[];
|
|
173
|
+
/** Menu items */
|
|
174
|
+
menus?: PluginMenuItem[];
|
|
175
|
+
/** Keybindings */
|
|
176
|
+
keybindings?: PluginKeybinding[];
|
|
177
|
+
/** Panel contributions */
|
|
178
|
+
panels?: PluginPanel[];
|
|
179
|
+
/** Status bar items */
|
|
180
|
+
statusBarItems?: PluginStatusBarItem[];
|
|
181
|
+
/** Editor decorations */
|
|
182
|
+
decorations?: PluginDecoration[];
|
|
183
|
+
/** File icon themes */
|
|
184
|
+
iconThemes?: PluginIconTheme[];
|
|
185
|
+
}
|
|
186
|
+
export interface PluginCommand {
|
|
187
|
+
id: string;
|
|
188
|
+
title: string;
|
|
189
|
+
category?: string;
|
|
190
|
+
icon?: string;
|
|
191
|
+
handler: () => void | Promise<void>;
|
|
192
|
+
}
|
|
193
|
+
export interface PluginMenuItem {
|
|
194
|
+
command: string;
|
|
195
|
+
group?: string;
|
|
196
|
+
when?: string;
|
|
197
|
+
}
|
|
198
|
+
export interface PluginKeybinding {
|
|
199
|
+
command: string;
|
|
200
|
+
keys: string[];
|
|
201
|
+
when?: string;
|
|
202
|
+
}
|
|
203
|
+
export interface PluginPanel {
|
|
204
|
+
id: string;
|
|
205
|
+
title: string;
|
|
206
|
+
icon?: string;
|
|
207
|
+
position: 'left' | 'right' | 'bottom';
|
|
208
|
+
component: string;
|
|
209
|
+
}
|
|
210
|
+
export interface PluginStatusBarItem {
|
|
211
|
+
id: string;
|
|
212
|
+
text: string;
|
|
213
|
+
tooltip?: string;
|
|
214
|
+
command?: string;
|
|
215
|
+
alignment: 'left' | 'right';
|
|
216
|
+
priority?: number;
|
|
217
|
+
}
|
|
218
|
+
export interface PluginDecoration {
|
|
219
|
+
id: string;
|
|
220
|
+
type: 'line' | 'range' | 'gutter';
|
|
221
|
+
style: Record<string, string>;
|
|
222
|
+
}
|
|
223
|
+
export interface PluginIconTheme {
|
|
224
|
+
id: string;
|
|
225
|
+
label: string;
|
|
226
|
+
path: string;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Plugin sandbox configuration
|
|
230
|
+
*/
|
|
231
|
+
export interface PluginSandboxConfig {
|
|
232
|
+
enabled: boolean;
|
|
233
|
+
maxExecutionTime: number;
|
|
234
|
+
maxMemory: number;
|
|
235
|
+
networkAccess: boolean;
|
|
236
|
+
filesystemAccess: boolean;
|
|
237
|
+
allowedImports: string[];
|
|
238
|
+
blockedImports: string[];
|
|
239
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VFS-related type definitions
|
|
3
|
+
* For integrating with a virtual filesystem backend that supports file locking,
|
|
4
|
+
* transactions, and Server-Sent-Events
|
|
5
|
+
*/
|
|
6
|
+
export interface VFSFileInfo {
|
|
7
|
+
path: string;
|
|
8
|
+
name: string;
|
|
9
|
+
size: number;
|
|
10
|
+
modTime: string;
|
|
11
|
+
isDir: boolean;
|
|
12
|
+
mode: number;
|
|
13
|
+
version: number;
|
|
14
|
+
checksum?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface VFSFile {
|
|
17
|
+
info: VFSFileInfo;
|
|
18
|
+
content: string | ArrayBuffer;
|
|
19
|
+
}
|
|
20
|
+
export interface VFSDirectory {
|
|
21
|
+
path: string;
|
|
22
|
+
entries: VFSFileInfo[];
|
|
23
|
+
totalSize: number;
|
|
24
|
+
fileCount: number;
|
|
25
|
+
dirCount: number;
|
|
26
|
+
}
|
|
27
|
+
export interface VFSWorkspace {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
rootPath: string;
|
|
31
|
+
createdAt: string;
|
|
32
|
+
updatedAt: string;
|
|
33
|
+
owner: string;
|
|
34
|
+
settings?: VFSWorkspaceSettings;
|
|
35
|
+
}
|
|
36
|
+
export interface VFSWorkspaceSettings {
|
|
37
|
+
theme?: string;
|
|
38
|
+
autoSave?: boolean;
|
|
39
|
+
autoSaveDelay?: number;
|
|
40
|
+
fileExclusions?: string[];
|
|
41
|
+
searchExclusions?: string[];
|
|
42
|
+
}
|
|
43
|
+
export interface VFSTransaction {
|
|
44
|
+
id: string;
|
|
45
|
+
workspaceId: string;
|
|
46
|
+
operations: VFSOperation[];
|
|
47
|
+
status: 'pending' | 'committed' | 'rolledback';
|
|
48
|
+
createdAt: string;
|
|
49
|
+
committedAt?: string;
|
|
50
|
+
}
|
|
51
|
+
export type VFSOperation = {
|
|
52
|
+
type: 'create';
|
|
53
|
+
path: string;
|
|
54
|
+
content: string;
|
|
55
|
+
} | {
|
|
56
|
+
type: 'update';
|
|
57
|
+
path: string;
|
|
58
|
+
content: string;
|
|
59
|
+
version: number;
|
|
60
|
+
} | {
|
|
61
|
+
type: 'delete';
|
|
62
|
+
path: string;
|
|
63
|
+
version: number;
|
|
64
|
+
} | {
|
|
65
|
+
type: 'rename';
|
|
66
|
+
oldPath: string;
|
|
67
|
+
newPath: string;
|
|
68
|
+
version: number;
|
|
69
|
+
} | {
|
|
70
|
+
type: 'mkdir';
|
|
71
|
+
path: string;
|
|
72
|
+
};
|
|
73
|
+
export interface VFSTransactionResult {
|
|
74
|
+
transactionId: string;
|
|
75
|
+
success: boolean;
|
|
76
|
+
operations: {
|
|
77
|
+
operation: VFSOperation;
|
|
78
|
+
success: boolean;
|
|
79
|
+
error?: string;
|
|
80
|
+
newVersion?: number;
|
|
81
|
+
}[];
|
|
82
|
+
}
|
|
83
|
+
export interface VFSFileLock {
|
|
84
|
+
path: string;
|
|
85
|
+
workspaceId: string;
|
|
86
|
+
holder: string;
|
|
87
|
+
holderType: 'user' | 'agent';
|
|
88
|
+
holderName?: string;
|
|
89
|
+
acquiredAt: string;
|
|
90
|
+
expiresAt: string;
|
|
91
|
+
ttl: number;
|
|
92
|
+
refreshCount: number;
|
|
93
|
+
purpose?: 'edit' | 'refactor' | 'delete' | 'rename';
|
|
94
|
+
}
|
|
95
|
+
export type VFSLockStatus = {
|
|
96
|
+
status: 'unlocked';
|
|
97
|
+
} | {
|
|
98
|
+
status: 'locked';
|
|
99
|
+
lock: VFSFileLock;
|
|
100
|
+
} | {
|
|
101
|
+
status: 'acquiring';
|
|
102
|
+
} | {
|
|
103
|
+
status: 'failed';
|
|
104
|
+
error: string;
|
|
105
|
+
};
|
|
106
|
+
export interface VFSLockAcquisitionOptions {
|
|
107
|
+
ttl?: number;
|
|
108
|
+
maxRetries?: number;
|
|
109
|
+
retryDelay?: number;
|
|
110
|
+
purpose?: VFSFileLock['purpose'];
|
|
111
|
+
}
|
|
112
|
+
export declare class VFSError extends Error {
|
|
113
|
+
code: VFSErrorCode;
|
|
114
|
+
details?: unknown | undefined;
|
|
115
|
+
constructor(message: string, code: VFSErrorCode, details?: unknown | undefined);
|
|
116
|
+
}
|
|
117
|
+
export type VFSErrorCode = 'FILE_LOCKED' | 'VERSION_CONFLICT' | 'FILE_NOT_FOUND' | 'PERMISSION_DENIED' | 'TRANSACTION_FAILED' | 'WORKSPACE_NOT_FOUND' | 'INVALID_PATH' | 'NETWORK_ERROR';
|
|
118
|
+
export type VFSEvent = VFSSnapshotEvent | VFSUpdateEvent | VFSPingEvent | VFSCompleteEvent | VFSErrorEvent | VFSIterationCompletedEvent | VFSChangeClassifiedEvent | VFSGateProgressEvent | VFSLockAcquiredEvent | VFSLockReleasedEvent;
|
|
119
|
+
export interface VFSBaseEvent {
|
|
120
|
+
timestamp: string;
|
|
121
|
+
workspaceId: string;
|
|
122
|
+
}
|
|
123
|
+
export interface VFSSnapshotEvent extends VFSBaseEvent {
|
|
124
|
+
type: 'snapshot';
|
|
125
|
+
files: VFSFileInfo[];
|
|
126
|
+
locks: VFSFileLock[];
|
|
127
|
+
version: number;
|
|
128
|
+
}
|
|
129
|
+
export interface VFSUpdateEvent extends VFSBaseEvent {
|
|
130
|
+
type: 'update';
|
|
131
|
+
operation: VFSOperation;
|
|
132
|
+
actor: string;
|
|
133
|
+
actorType: 'user' | 'agent';
|
|
134
|
+
actorName?: string;
|
|
135
|
+
version: number;
|
|
136
|
+
files?: VFSFileInfo[];
|
|
137
|
+
}
|
|
138
|
+
export interface VFSPingEvent extends VFSBaseEvent {
|
|
139
|
+
type: 'ping';
|
|
140
|
+
serverTime: string;
|
|
141
|
+
}
|
|
142
|
+
export interface VFSCompleteEvent extends VFSBaseEvent {
|
|
143
|
+
type: 'complete';
|
|
144
|
+
reason: string;
|
|
145
|
+
}
|
|
146
|
+
export interface VFSErrorEvent extends VFSBaseEvent {
|
|
147
|
+
type: 'error';
|
|
148
|
+
error: string;
|
|
149
|
+
code: VFSErrorCode;
|
|
150
|
+
}
|
|
151
|
+
export interface VFSIterationCompletedEvent extends VFSBaseEvent {
|
|
152
|
+
type: 'iteration_completed';
|
|
153
|
+
iterationId: string;
|
|
154
|
+
agentId: string;
|
|
155
|
+
filesModified: string[];
|
|
156
|
+
summary: string;
|
|
157
|
+
}
|
|
158
|
+
export interface VFSChangeClassifiedEvent extends VFSBaseEvent {
|
|
159
|
+
type: 'change_classified';
|
|
160
|
+
path: string;
|
|
161
|
+
classification: 'feature' | 'bugfix' | 'refactor' | 'docs' | 'test';
|
|
162
|
+
confidence: number;
|
|
163
|
+
}
|
|
164
|
+
export interface VFSGateProgressEvent extends VFSBaseEvent {
|
|
165
|
+
type: 'gate_progress';
|
|
166
|
+
gate: 'planning' | 'implementation' | 'testing' | 'review';
|
|
167
|
+
progress: number;
|
|
168
|
+
agentId: string;
|
|
169
|
+
}
|
|
170
|
+
export interface VFSLockAcquiredEvent extends VFSBaseEvent {
|
|
171
|
+
type: 'lock_acquired';
|
|
172
|
+
lock: VFSFileLock;
|
|
173
|
+
}
|
|
174
|
+
export interface VFSLockReleasedEvent extends VFSBaseEvent {
|
|
175
|
+
type: 'lock_released';
|
|
176
|
+
path: string;
|
|
177
|
+
holder: string;
|
|
178
|
+
}
|
|
179
|
+
export interface VFSConnectionState {
|
|
180
|
+
status: 'disconnected' | 'connecting' | 'connected' | 'reconnecting' | 'error';
|
|
181
|
+
lastEventTime: string | null;
|
|
182
|
+
reconnectAttempts: number;
|
|
183
|
+
error: string | null;
|
|
184
|
+
}
|
|
185
|
+
export interface VFSClientConfig {
|
|
186
|
+
baseUrl?: string;
|
|
187
|
+
defaultWorkspaceId?: string;
|
|
188
|
+
timeout?: number;
|
|
189
|
+
lockTTL?: number;
|
|
190
|
+
maxReconnectAttempts?: number;
|
|
191
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VFS-related type definitions
|
|
3
|
+
* For integrating with a virtual filesystem backend that supports file locking,
|
|
4
|
+
* transactions, and Server-Sent-Events
|
|
5
|
+
*/
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// Error Types
|
|
8
|
+
// ============================================================================
|
|
9
|
+
export class VFSError extends Error {
|
|
10
|
+
code;
|
|
11
|
+
details;
|
|
12
|
+
constructor(message, code, details) {
|
|
13
|
+
super(message);
|
|
14
|
+
this.code = code;
|
|
15
|
+
this.details = details;
|
|
16
|
+
this.name = 'VFSError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formatting utilities
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Format file size in human-readable form
|
|
6
|
+
*/
|
|
7
|
+
export declare function formatFileSize(bytes: number): string;
|
|
8
|
+
/**
|
|
9
|
+
* Format a date relative to now
|
|
10
|
+
*/
|
|
11
|
+
export declare function formatRelativeTime(date: Date): string;
|
|
12
|
+
/**
|
|
13
|
+
* Format a date for display
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatDate(date: Date): string;
|
|
16
|
+
/**
|
|
17
|
+
* Format a date and time for display
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatDateTime(date: Date): string;
|
|
20
|
+
/**
|
|
21
|
+
* Format duration in milliseconds to human readable
|
|
22
|
+
*/
|
|
23
|
+
export declare function formatDuration(ms: number): string;
|
|
24
|
+
/**
|
|
25
|
+
* Format line and column position
|
|
26
|
+
*/
|
|
27
|
+
export declare function formatPosition(line: number, column: number): string;
|
|
28
|
+
/**
|
|
29
|
+
* Format a path for display (truncate middle if too long)
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatPath(path: string, maxLength?: number): string;
|
|
32
|
+
/**
|
|
33
|
+
* Format number with thousands separators
|
|
34
|
+
*/
|
|
35
|
+
export declare function formatNumber(num: number): string;
|
|
36
|
+
/**
|
|
37
|
+
* Format percentage
|
|
38
|
+
*/
|
|
39
|
+
export declare function formatPercent(value: number, decimals?: number): string;
|
|
40
|
+
/**
|
|
41
|
+
* Pluralize a word based on count
|
|
42
|
+
*/
|
|
43
|
+
export declare function pluralize(count: number, singular: string, plural?: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Truncate text with ellipsis
|
|
46
|
+
*/
|
|
47
|
+
export declare function truncate(text: string, maxLength: number): string;
|
|
48
|
+
/**
|
|
49
|
+
* Convert camelCase to Title Case
|
|
50
|
+
*/
|
|
51
|
+
export declare function camelToTitle(text: string): string;
|
|
52
|
+
/**
|
|
53
|
+
* Convert snake_case to Title Case
|
|
54
|
+
*/
|
|
55
|
+
export declare function snakeToTitle(text: string): string;
|