mindweave 0.0.1 → 2.1.2
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 +190 -0
- package/README.md +171 -14
- package/dist/alternator/chassis/cache.js +47 -0
- package/dist/alternator/chassis/cache.js.map +1 -0
- package/dist/alternator/chassis/domRefs.js +53 -0
- package/dist/alternator/chassis/domRefs.js.map +1 -0
- package/dist/alternator/chassis/extractWorker.js +65 -0
- package/dist/alternator/chassis/extractWorker.js.map +1 -0
- package/dist/alternator/chassis/graph.js +221 -0
- package/dist/alternator/chassis/graph.js.map +1 -0
- package/dist/alternator/chassis/index.js +463 -0
- package/dist/alternator/chassis/index.js.map +1 -0
- package/dist/alternator/chassis/isolation.js +336 -0
- package/dist/alternator/chassis/isolation.js.map +1 -0
- package/dist/alternator/chassis/langCases.js +69 -0
- package/dist/alternator/chassis/langCases.js.map +1 -0
- package/dist/alternator/chassis/lsp.js +469 -0
- package/dist/alternator/chassis/lsp.js.map +1 -0
- package/dist/alternator/chassis/markup.js +262 -0
- package/dist/alternator/chassis/markup.js.map +1 -0
- package/dist/alternator/chassis/provision.js +198 -0
- package/dist/alternator/chassis/provision.js.map +1 -0
- package/dist/alternator/chassis/rank.js +72 -0
- package/dist/alternator/chassis/rank.js.map +1 -0
- package/dist/alternator/chassis/servers.js +215 -0
- package/dist/alternator/chassis/servers.js.map +1 -0
- package/dist/alternator/chassis/treesitter.js +608 -0
- package/dist/alternator/chassis/treesitter.js.map +1 -0
- package/dist/alternator/chassis/types.js +24 -0
- package/dist/alternator/chassis/types.js.map +1 -0
- package/dist/alternator/lane.js +67 -0
- package/dist/alternator/lane.js.map +1 -0
- package/dist/cli/App.js +2586 -0
- package/dist/cli/App.js.map +1 -0
- package/dist/cli/altScreen.js +67 -0
- package/dist/cli/altScreen.js.map +1 -0
- package/dist/cli/approvalChannel.js +72 -0
- package/dist/cli/approvalChannel.js.map +1 -0
- package/dist/cli/attachments.js +188 -0
- package/dist/cli/attachments.js.map +1 -0
- package/dist/cli/bootstrap.js +279 -0
- package/dist/cli/bootstrap.js.map +1 -0
- package/dist/cli/chatAnchor.js +94 -0
- package/dist/cli/chatAnchor.js.map +1 -0
- package/dist/cli/commandArgs.js +79 -0
- package/dist/cli/commandArgs.js.map +1 -0
- package/dist/cli/commandRoute.js +78 -0
- package/dist/cli/commandRoute.js.map +1 -0
- package/dist/cli/compaction.js +69 -0
- package/dist/cli/compaction.js.map +1 -0
- package/dist/cli/components/ApprovalBox.js +100 -0
- package/dist/cli/components/ApprovalBox.js.map +1 -0
- package/dist/cli/components/BlockView.js +128 -0
- package/dist/cli/components/BlockView.js.map +1 -0
- package/dist/cli/components/FirstRunFrame.js +41 -0
- package/dist/cli/components/FirstRunFrame.js.map +1 -0
- package/dist/cli/components/KeyManager.js +197 -0
- package/dist/cli/components/KeyManager.js.map +1 -0
- package/dist/cli/components/KeySetup.js +125 -0
- package/dist/cli/components/KeySetup.js.map +1 -0
- package/dist/cli/components/MenuFrame.js +24 -0
- package/dist/cli/components/MenuFrame.js.map +1 -0
- package/dist/cli/components/Picker.js +82 -0
- package/dist/cli/components/Picker.js.map +1 -0
- package/dist/cli/components/PromptInput.js +509 -0
- package/dist/cli/components/PromptInput.js.map +1 -0
- package/dist/cli/components/SubagentView.js +86 -0
- package/dist/cli/components/SubagentView.js.map +1 -0
- package/dist/cli/components/ToolGroup.js +60 -0
- package/dist/cli/components/ToolGroup.js.map +1 -0
- package/dist/cli/components/ToolLine.js +123 -0
- package/dist/cli/components/ToolLine.js.map +1 -0
- package/dist/cli/components/TrustGate.js +37 -0
- package/dist/cli/components/TrustGate.js.map +1 -0
- package/dist/cli/costView.js +40 -0
- package/dist/cli/costView.js.map +1 -0
- package/dist/cli/frameRate.js +30 -0
- package/dist/cli/frameRate.js.map +1 -0
- package/dist/cli/framebuffer/paint.js +165 -0
- package/dist/cli/framebuffer/paint.js.map +1 -0
- package/dist/cli/framebuffer/parse.js +266 -0
- package/dist/cli/framebuffer/parse.js.map +1 -0
- package/dist/cli/framebuffer/screen.js +196 -0
- package/dist/cli/framebuffer/screen.js.map +1 -0
- package/dist/cli/framebuffer/writer.js +139 -0
- package/dist/cli/framebuffer/writer.js.map +1 -0
- package/dist/cli/groupReveal.js +51 -0
- package/dist/cli/groupReveal.js.map +1 -0
- package/dist/cli/help.js +55 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/inputView.js +105 -0
- package/dist/cli/inputView.js.map +1 -0
- package/dist/cli/keyManager.js +65 -0
- package/dist/cli/keyManager.js.map +1 -0
- package/dist/cli/keySetup.js +35 -0
- package/dist/cli/keySetup.js.map +1 -0
- package/dist/cli/keyStore.js +73 -0
- package/dist/cli/keyStore.js.map +1 -0
- package/dist/cli/markdown.js +460 -0
- package/dist/cli/markdown.js.map +1 -0
- package/dist/cli/messageQueue.js +96 -0
- package/dist/cli/messageQueue.js.map +1 -0
- package/dist/cli/modes.js +90 -0
- package/dist/cli/modes.js.map +1 -0
- package/dist/cli/mouse.js +78 -0
- package/dist/cli/mouse.js.map +1 -0
- package/dist/cli/pasteAssembler.js +44 -0
- package/dist/cli/pasteAssembler.js.map +1 -0
- package/dist/cli/pathComplete.js +39 -0
- package/dist/cli/pathComplete.js.map +1 -0
- package/dist/cli/perfLog.js +90 -0
- package/dist/cli/perfLog.js.map +1 -0
- package/dist/cli/reveal.js +32 -0
- package/dist/cli/reveal.js.map +1 -0
- package/dist/cli/revealPace.js +59 -0
- package/dist/cli/revealPace.js.map +1 -0
- package/dist/cli/sessionCarry.js +19 -0
- package/dist/cli/sessionCarry.js.map +1 -0
- package/dist/cli/smoothScroll.js +74 -0
- package/dist/cli/smoothScroll.js.map +1 -0
- package/dist/cli/startupArgs.js +96 -0
- package/dist/cli/startupArgs.js.map +1 -0
- package/dist/cli/terminalRestore.js +34 -0
- package/dist/cli/terminalRestore.js.map +1 -0
- package/dist/cli/toolDisplay.js +219 -0
- package/dist/cli/toolDisplay.js.map +1 -0
- package/dist/cli/toolItems.js +65 -0
- package/dist/cli/toolItems.js.map +1 -0
- package/dist/cli/transcript.js +351 -0
- package/dist/cli/transcript.js.map +1 -0
- package/dist/cli/trust.js +79 -0
- package/dist/cli/trust.js.map +1 -0
- package/dist/cli/updateCheck.js +107 -0
- package/dist/cli/updateCheck.js.map +1 -0
- package/dist/cli/version.js +39 -0
- package/dist/cli/version.js.map +1 -0
- package/dist/cli/viewport.js +179 -0
- package/dist/cli/viewport.js.map +1 -0
- package/dist/cli/virtualWindow.js +103 -0
- package/dist/cli/virtualWindow.js.map +1 -0
- package/dist/cli/workingVerb.js +37 -0
- package/dist/cli/workingVerb.js.map +1 -0
- package/dist/cli/wrap.js +145 -0
- package/dist/cli/wrap.js.map +1 -0
- package/dist/drivers/anthropic/cachePoints.js +77 -0
- package/dist/drivers/anthropic/cachePoints.js.map +1 -0
- package/dist/drivers/anthropic/client.js +432 -0
- package/dist/drivers/anthropic/client.js.map +1 -0
- package/dist/drivers/anthropic/index.js +10 -0
- package/dist/drivers/anthropic/index.js.map +1 -0
- package/dist/drivers/anthropic/manifest.js +221 -0
- package/dist/drivers/anthropic/manifest.js.map +1 -0
- package/dist/drivers/cerebras/client.js +69 -0
- package/dist/drivers/cerebras/client.js.map +1 -0
- package/dist/drivers/cerebras/index.js +5 -0
- package/dist/drivers/cerebras/index.js.map +1 -0
- package/dist/drivers/cerebras/manifest.js +140 -0
- package/dist/drivers/cerebras/manifest.js.map +1 -0
- package/dist/drivers/clientId.js +41 -0
- package/dist/drivers/clientId.js.map +1 -0
- package/dist/drivers/contextOverflow.js +77 -0
- package/dist/drivers/contextOverflow.js.map +1 -0
- package/dist/drivers/deepseek/client.js +168 -0
- package/dist/drivers/deepseek/client.js.map +1 -0
- package/dist/drivers/deepseek/index.js +16 -0
- package/dist/drivers/deepseek/index.js.map +1 -0
- package/dist/drivers/deepseek/inlineTools.js +46 -0
- package/dist/drivers/deepseek/inlineTools.js.map +1 -0
- package/dist/drivers/deepseek/manifest.js +166 -0
- package/dist/drivers/deepseek/manifest.js.map +1 -0
- package/dist/drivers/gemini/client.js +38 -0
- package/dist/drivers/gemini/client.js.map +1 -0
- package/dist/drivers/gemini/index.js +5 -0
- package/dist/drivers/gemini/index.js.map +1 -0
- package/dist/drivers/gemini/manifest.js +150 -0
- package/dist/drivers/gemini/manifest.js.map +1 -0
- package/dist/drivers/glm/client.js +90 -0
- package/dist/drivers/glm/client.js.map +1 -0
- package/dist/drivers/glm/index.js +9 -0
- package/dist/drivers/glm/index.js.map +1 -0
- package/dist/drivers/glm/manifest.js +183 -0
- package/dist/drivers/glm/manifest.js.map +1 -0
- package/dist/drivers/groq/client.js +80 -0
- package/dist/drivers/groq/client.js.map +1 -0
- package/dist/drivers/groq/index.js +5 -0
- package/dist/drivers/groq/index.js.map +1 -0
- package/dist/drivers/groq/manifest.js +160 -0
- package/dist/drivers/groq/manifest.js.map +1 -0
- package/dist/drivers/kimi/client.js +82 -0
- package/dist/drivers/kimi/client.js.map +1 -0
- package/dist/drivers/kimi/index.js +9 -0
- package/dist/drivers/kimi/index.js.map +1 -0
- package/dist/drivers/kimi/manifest.js +168 -0
- package/dist/drivers/kimi/manifest.js.map +1 -0
- package/dist/drivers/meta/client.js +30 -0
- package/dist/drivers/meta/client.js.map +1 -0
- package/dist/drivers/meta/index.js +5 -0
- package/dist/drivers/meta/index.js.map +1 -0
- package/dist/drivers/meta/manifest.js +101 -0
- package/dist/drivers/meta/manifest.js.map +1 -0
- package/dist/drivers/minimax/client.js +36 -0
- package/dist/drivers/minimax/client.js.map +1 -0
- package/dist/drivers/minimax/index.js +5 -0
- package/dist/drivers/minimax/index.js.map +1 -0
- package/dist/drivers/minimax/manifest.js +120 -0
- package/dist/drivers/minimax/manifest.js.map +1 -0
- package/dist/drivers/mistral/client.js +54 -0
- package/dist/drivers/mistral/client.js.map +1 -0
- package/dist/drivers/mistral/index.js +5 -0
- package/dist/drivers/mistral/index.js.map +1 -0
- package/dist/drivers/mistral/manifest.js +118 -0
- package/dist/drivers/mistral/manifest.js.map +1 -0
- package/dist/drivers/openai/client.js +290 -0
- package/dist/drivers/openai/client.js.map +1 -0
- package/dist/drivers/openai/index.js +9 -0
- package/dist/drivers/openai/index.js.map +1 -0
- package/dist/drivers/openai/manifest.js +133 -0
- package/dist/drivers/openai/manifest.js.map +1 -0
- package/dist/drivers/openaiCompat/wire.js +493 -0
- package/dist/drivers/openaiCompat/wire.js.map +1 -0
- package/dist/drivers/partialTurn.js +23 -0
- package/dist/drivers/partialTurn.js.map +1 -0
- package/dist/drivers/providerError.js +181 -0
- package/dist/drivers/providerError.js.map +1 -0
- package/dist/drivers/qwen/client.js +93 -0
- package/dist/drivers/qwen/client.js.map +1 -0
- package/dist/drivers/qwen/index.js +9 -0
- package/dist/drivers/qwen/index.js.map +1 -0
- package/dist/drivers/qwen/manifest.js +146 -0
- package/dist/drivers/qwen/manifest.js.map +1 -0
- package/dist/drivers/registry.js +177 -0
- package/dist/drivers/registry.js.map +1 -0
- package/dist/drivers/retryPolicy.js +129 -0
- package/dist/drivers/retryPolicy.js.map +1 -0
- package/dist/drivers/searchBlocks.js +61 -0
- package/dist/drivers/searchBlocks.js.map +1 -0
- package/dist/drivers/types.js +2 -0
- package/dist/drivers/types.js.map +1 -0
- package/dist/drivers/xai/client.js +63 -0
- package/dist/drivers/xai/client.js.map +1 -0
- package/dist/drivers/xai/index.js +5 -0
- package/dist/drivers/xai/index.js.map +1 -0
- package/dist/drivers/xai/manifest.js +137 -0
- package/dist/drivers/xai/manifest.js.map +1 -0
- package/dist/dynamo/_probe.tmp.js +20 -0
- package/dist/dynamo/_probe.tmp.js.map +1 -0
- package/dist/dynamo/cacheBreak.js +88 -0
- package/dist/dynamo/cacheBreak.js.map +1 -0
- package/dist/dynamo/contextWindow.js +243 -0
- package/dist/dynamo/contextWindow.js.map +1 -0
- package/dist/dynamo/engine.js +2011 -0
- package/dist/dynamo/engine.js.map +1 -0
- package/dist/dynamo/guard.js +132 -0
- package/dist/dynamo/guard.js.map +1 -0
- package/dist/dynamo/liveMeter.js +58 -0
- package/dist/dynamo/liveMeter.js.map +1 -0
- package/dist/dynamo/model.js +172 -0
- package/dist/dynamo/model.js.map +1 -0
- package/dist/dynamo/planArtifact.js +125 -0
- package/dist/dynamo/planArtifact.js.map +1 -0
- package/dist/dynamo/pricing.js +140 -0
- package/dist/dynamo/pricing.js.map +1 -0
- package/dist/dynamo/prompt.js +264 -0
- package/dist/dynamo/prompt.js.map +1 -0
- package/dist/dynamo/spend.js +45 -0
- package/dist/dynamo/spend.js.map +1 -0
- package/dist/dynamo/verify.js +483 -0
- package/dist/dynamo/verify.js.map +1 -0
- package/dist/governor/forbidden.js +181 -0
- package/dist/governor/forbidden.js.map +1 -0
- package/dist/governor/freshness.js +83 -0
- package/dist/governor/freshness.js.map +1 -0
- package/dist/governor/frontmatter.js +38 -0
- package/dist/governor/frontmatter.js.map +1 -0
- package/dist/governor/glob.js +75 -0
- package/dist/governor/glob.js.map +1 -0
- package/dist/governor/index.js +87 -0
- package/dist/governor/index.js.map +1 -0
- package/dist/governor/rules.js +80 -0
- package/dist/governor/rules.js.map +1 -0
- package/dist/governor/scope.js +91 -0
- package/dist/governor/scope.js.map +1 -0
- package/dist/governor/skills.js +176 -0
- package/dist/governor/skills.js.map +1 -0
- package/dist/governor/types.js +16 -0
- package/dist/governor/types.js.map +1 -0
- package/dist/governor/write.js +182 -0
- package/dist/governor/write.js.map +1 -0
- package/dist/index.js +89 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/catalog.js +232 -0
- package/dist/mcp/catalog.js.map +1 -0
- package/dist/mcp/config.js +116 -0
- package/dist/mcp/config.js.map +1 -0
- package/dist/mcp/configWrite.js +254 -0
- package/dist/mcp/configWrite.js.map +1 -0
- package/dist/mcp/connection.js +504 -0
- package/dist/mcp/connection.js.map +1 -0
- package/dist/mcp/deferred.js +104 -0
- package/dist/mcp/deferred.js.map +1 -0
- package/dist/mcp/discover.js +128 -0
- package/dist/mcp/discover.js.map +1 -0
- package/dist/mcp/manager.js +679 -0
- package/dist/mcp/manager.js.map +1 -0
- package/dist/mcp/paramHeaders.js +163 -0
- package/dist/mcp/paramHeaders.js.map +1 -0
- package/dist/mcp/prompts.js +136 -0
- package/dist/mcp/prompts.js.map +1 -0
- package/dist/mcp/protocol.js +171 -0
- package/dist/mcp/protocol.js.map +1 -0
- package/dist/mcp/resources.js +119 -0
- package/dist/mcp/resources.js.map +1 -0
- package/dist/mcp/resultStore.js +180 -0
- package/dist/mcp/resultStore.js.map +1 -0
- package/dist/mcp/subscriptions.js +74 -0
- package/dist/mcp/subscriptions.js.map +1 -0
- package/dist/mcp/transport/headerValue.js +40 -0
- package/dist/mcp/transport/headerValue.js.map +1 -0
- package/dist/mcp/transport/http.js +321 -0
- package/dist/mcp/transport/http.js.map +1 -0
- package/dist/mcp/transport/stdio.js +234 -0
- package/dist/mcp/transport/stdio.js.map +1 -0
- package/dist/mcp/transport/types.js +27 -0
- package/dist/mcp/transport/types.js.map +1 -0
- package/dist/mcp/trust.js +98 -0
- package/dist/mcp/trust.js.map +1 -0
- package/dist/mcp/trustStore.js +55 -0
- package/dist/mcp/trustStore.js.map +1 -0
- package/dist/memory/autoMemory.js +340 -0
- package/dist/memory/autoMemory.js.map +1 -0
- package/dist/memory/compaction.js +513 -0
- package/dist/memory/compaction.js.map +1 -0
- package/dist/memory/images.js +173 -0
- package/dist/memory/images.js.map +1 -0
- package/dist/memory/presence.js +59 -0
- package/dist/memory/presence.js.map +1 -0
- package/dist/memory/projectNotes.js +247 -0
- package/dist/memory/projectNotes.js.map +1 -0
- package/dist/memory/restore.js +72 -0
- package/dist/memory/restore.js.map +1 -0
- package/dist/memory/session.js +472 -0
- package/dist/memory/session.js.map +1 -0
- package/dist/memory/sessionMemory.js +142 -0
- package/dist/memory/sessionMemory.js.map +1 -0
- package/dist/memory/sessionMemoryCompact.js +136 -0
- package/dist/memory/sessionMemoryCompact.js.map +1 -0
- package/dist/memory/store.js +217 -0
- package/dist/memory/store.js.map +1 -0
- package/dist/memory/types.js +14 -0
- package/dist/memory/types.js.map +1 -0
- package/dist/memory/workingSet.js +383 -0
- package/dist/memory/workingSet.js.map +1 -0
- package/dist/project/context.js +425 -0
- package/dist/project/context.js.map +1 -0
- package/dist/tools/approval.js +189 -0
- package/dist/tools/approval.js.map +1 -0
- package/dist/tools/askUser.js +103 -0
- package/dist/tools/askUser.js.map +1 -0
- package/dist/tools/atomicWrite.js +151 -0
- package/dist/tools/atomicWrite.js.map +1 -0
- package/dist/tools/backgroundShells.js +468 -0
- package/dist/tools/backgroundShells.js.map +1 -0
- package/dist/tools/captureSweep.js +77 -0
- package/dist/tools/captureSweep.js.map +1 -0
- package/dist/tools/chassisMux.js +92 -0
- package/dist/tools/chassisMux.js.map +1 -0
- package/dist/tools/checkpoints.js +328 -0
- package/dist/tools/checkpoints.js.map +1 -0
- package/dist/tools/codeIntel.js +267 -0
- package/dist/tools/codeIntel.js.map +1 -0
- package/dist/tools/deferredNative.js +121 -0
- package/dist/tools/deferredNative.js.map +1 -0
- package/dist/tools/detail.js +135 -0
- package/dist/tools/detail.js.map +1 -0
- package/dist/tools/diagnostics.js +174 -0
- package/dist/tools/diagnostics.js.map +1 -0
- package/dist/tools/edit.js +167 -0
- package/dist/tools/edit.js.map +1 -0
- package/dist/tools/editCore.js +283 -0
- package/dist/tools/editCore.js.map +1 -0
- package/dist/tools/editFile.js +183 -0
- package/dist/tools/editFile.js.map +1 -0
- package/dist/tools/editRipple.js +126 -0
- package/dist/tools/editRipple.js.map +1 -0
- package/dist/tools/editTarget.js +131 -0
- package/dist/tools/editTarget.js.map +1 -0
- package/dist/tools/editWindow.js +49 -0
- package/dist/tools/editWindow.js.map +1 -0
- package/dist/tools/eol.js +56 -0
- package/dist/tools/eol.js.map +1 -0
- package/dist/tools/exitPlan.js +175 -0
- package/dist/tools/exitPlan.js.map +1 -0
- package/dist/tools/focus.js +42 -0
- package/dist/tools/focus.js.map +1 -0
- package/dist/tools/gitignore.js +148 -0
- package/dist/tools/gitignore.js.map +1 -0
- package/dist/tools/glob.js +134 -0
- package/dist/tools/glob.js.map +1 -0
- package/dist/tools/governorTools.js +258 -0
- package/dist/tools/governorTools.js.map +1 -0
- package/dist/tools/grep.js +450 -0
- package/dist/tools/grep.js.map +1 -0
- package/dist/tools/guard.js +220 -0
- package/dist/tools/guard.js.map +1 -0
- package/dist/tools/killTree.js +215 -0
- package/dist/tools/killTree.js.map +1 -0
- package/dist/tools/listDir.js +143 -0
- package/dist/tools/listDir.js.map +1 -0
- package/dist/tools/mcpAdd.js +176 -0
- package/dist/tools/mcpAdd.js.map +1 -0
- package/dist/tools/mcpResources.js +116 -0
- package/dist/tools/mcpResources.js.map +1 -0
- package/dist/tools/mcpSearch.js +123 -0
- package/dist/tools/mcpSearch.js.map +1 -0
- package/dist/tools/multiEdit.js +168 -0
- package/dist/tools/multiEdit.js.map +1 -0
- package/dist/tools/paths.js +225 -0
- package/dist/tools/paths.js.map +1 -0
- package/dist/tools/posixShell.js +123 -0
- package/dist/tools/posixShell.js.map +1 -0
- package/dist/tools/readFile.js +371 -0
- package/dist/tools/readFile.js.map +1 -0
- package/dist/tools/readSymbol.js +145 -0
- package/dist/tools/readSymbol.js.map +1 -0
- package/dist/tools/registry.js +120 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/replaceSymbol.js +141 -0
- package/dist/tools/replaceSymbol.js.map +1 -0
- package/dist/tools/results.js +15 -0
- package/dist/tools/results.js.map +1 -0
- package/dist/tools/ripgrep.js +145 -0
- package/dist/tools/ripgrep.js.map +1 -0
- package/dist/tools/runCommand.js +633 -0
- package/dist/tools/runCommand.js.map +1 -0
- package/dist/tools/saveMemory.js +102 -0
- package/dist/tools/saveMemory.js.map +1 -0
- package/dist/tools/screenshot.js +200 -0
- package/dist/tools/screenshot.js.map +1 -0
- package/dist/tools/screenshotWin.js +227 -0
- package/dist/tools/screenshotWin.js.map +1 -0
- package/dist/tools/search.js +121 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/sessionTools.js +187 -0
- package/dist/tools/sessionTools.js.map +1 -0
- package/dist/tools/shellCheckpoint.js +123 -0
- package/dist/tools/shellCheckpoint.js.map +1 -0
- package/dist/tools/shellLint.js +102 -0
- package/dist/tools/shellLint.js.map +1 -0
- package/dist/tools/shellTools.js +203 -0
- package/dist/tools/shellTools.js.map +1 -0
- package/dist/tools/spanCore.js +78 -0
- package/dist/tools/spanCore.js.map +1 -0
- package/dist/tools/subagent.js +224 -0
- package/dist/tools/subagent.js.map +1 -0
- package/dist/tools/subagentReport.js +114 -0
- package/dist/tools/subagentReport.js.map +1 -0
- package/dist/tools/tempSweep.js +118 -0
- package/dist/tools/tempSweep.js.map +1 -0
- package/dist/tools/todo.js +117 -0
- package/dist/tools/todo.js.map +1 -0
- package/dist/tools/types.js +2 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/tools/untrusted.js +46 -0
- package/dist/tools/untrusted.js.map +1 -0
- package/dist/tools/useSkill.js +62 -0
- package/dist/tools/useSkill.js.map +1 -0
- package/dist/tools/walk.js +152 -0
- package/dist/tools/walk.js.map +1 -0
- package/dist/tools/web.js +61 -0
- package/dist/tools/web.js.map +1 -0
- package/dist/tools/webFetch.js +444 -0
- package/dist/tools/webFetch.js.map +1 -0
- package/dist/tools/webSearch.js +130 -0
- package/dist/tools/webSearch.js.map +1 -0
- package/dist/tools/workspace.js +212 -0
- package/dist/tools/workspace.js.map +1 -0
- package/dist/tools/workspaceDiscover.js +216 -0
- package/dist/tools/workspaceDiscover.js.map +1 -0
- package/dist/tools/writeFile.js +162 -0
- package/dist/tools/writeFile.js.map +1 -0
- package/package.json +74 -28
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the acting entity and all other entities
|
|
16
|
+
that control, are controlled by, or are under common control with
|
|
17
|
+
that entity. For the purposes of this definition, "control" means
|
|
18
|
+
(i) the power, direct or indirect, to cause the direction or
|
|
19
|
+
management of such entity, whether by contract or otherwise, or
|
|
20
|
+
(ii) ownership of fifty percent (50%) or more of the outstanding
|
|
21
|
+
shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, trademark, patent, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 Nimannns
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,14 +1,171 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
<h1 align="center">Mindweave (mwcode)</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
A fast, model-adaptive, terminal-native AI coding agent.<br>
|
|
5
|
+
You bring your own key. It runs on your machine. Nothing goes anywhere else.
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="LICENSE">Apache 2.0</a> •
|
|
10
|
+
<a href="CHANGELOG.md">Changelog</a> •
|
|
11
|
+
<a href="KNOWN-ISSUES.md">Known issues</a> •
|
|
12
|
+
<a href="CONTRIBUTING.md">Contributing</a> •
|
|
13
|
+
<a href="https://x.com/mindweavecli">X</a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## What it is
|
|
19
|
+
|
|
20
|
+
Mindweave is a coding agent that lives in your terminal and works inside your repository:
|
|
21
|
+
reading, searching, editing, running commands, and checking its own work.
|
|
22
|
+
|
|
23
|
+
It runs entirely on your machine. There is no backend, no telemetry and no account. Your
|
|
24
|
+
code and your API key never reach a Mindweave server, because there isn't one.
|
|
25
|
+
|
|
26
|
+
It is built lean on purpose. Most of a coding agent's context budget goes on scaffolding
|
|
27
|
+
the model never needed. Mindweave keeps prompts thin and leaves the room for the model to
|
|
28
|
+
reason about your code.
|
|
29
|
+
|
|
30
|
+
## Mindweave 1
|
|
31
|
+
|
|
32
|
+
This is Mindweave 1 which is finally out, tagged `mindweave-1`. It is on npm, and the
|
|
33
|
+
website is up. Install with the steps below.
|
|
34
|
+
|
|
35
|
+
What landed in it is in the [changelog](CHANGELOG.md): thirteen model providers, a
|
|
36
|
+
rebuilt terminal interface, reworked prompt caching and token accounting, project notes
|
|
37
|
+
the agent maintains across sessions, and a long list of things that were quietly wrong.
|
|
38
|
+
|
|
39
|
+
## Deferred tools, fixed in v2.1.0
|
|
40
|
+
|
|
41
|
+
Tools that are not advertised up front are found with `find_tools`. Finding one returned
|
|
42
|
+
its schema without adding the tool to the list sent with the next request, and a model
|
|
43
|
+
that will only call a function present in that list could not call what it had just been
|
|
44
|
+
shown. Every deferred tool was unreachable on those models, and a session resumed with
|
|
45
|
+
`/continue` had the same shape, because nothing recorded which tools had been activated.
|
|
46
|
+
The screenshot tool was where it was most visible: it could be found, described, and never
|
|
47
|
+
run, which read as the model looping over a tool it could not reach.
|
|
48
|
+
|
|
49
|
+
`find_tools` now activates what it finds. The tool joins the advertised set for the rest
|
|
50
|
+
of the session, is written to the session file and restored on resume, and a forked
|
|
51
|
+
session receives its own copy. The rest of v2.1.0 is in the [changelog](CHANGELOG.md).
|
|
52
|
+
|
|
53
|
+
## Install
|
|
54
|
+
|
|
55
|
+
Requires **Windows** and **Node.js 20+**. macOS and Linux are not supported yet, and the
|
|
56
|
+
reason is written down in [KNOWN-ISSUES.md](KNOWN-ISSUES.md) rather than glossed over.
|
|
57
|
+
|
|
58
|
+
macOS and Linux support is coming soon.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm install -g mindweave
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Then, in any project:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
cd your-project
|
|
68
|
+
mindweave # or mw, for short
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
To build from source instead — for development, or to run an unreleased change:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
git clone https://github.com/mindweave-cli/Mindweave
|
|
75
|
+
cd Mindweave
|
|
76
|
+
npm install
|
|
77
|
+
npm run build
|
|
78
|
+
npm link # makes the `mindweave` command available globally
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
It asks for an API key on first launch and saves it to `~/.mindweave/.env`, so every
|
|
82
|
+
project afterwards just works. `mindweave --help` covers the launch flags; everything
|
|
83
|
+
else is configured inside a session.
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## What it can do
|
|
87
|
+
|
|
88
|
+
**13 providers, 47 models, one key.** DeepSeek, Anthropic, OpenAI, Gemini, xAI, Mistral,
|
|
89
|
+
Groq, Cerebras, Qwen, Kimi, GLM, Meta and MiniMax. Each family gets its own driver so it
|
|
90
|
+
runs at its best without bloating the shared core, and only the driver you are using is
|
|
91
|
+
ever loaded. Switch with `/provider` and `/model`; the choice is remembered per project.
|
|
92
|
+
Full list: [PROVIDERS.md](src/drivers/PROVIDERS.md).
|
|
93
|
+
|
|
94
|
+
**Deterministic code intelligence.** A background lane indexes your repo with tree-sitter
|
|
95
|
+
and language servers, costing no tokens, so the agent understands your codebase rather
|
|
96
|
+
than just the file you opened.
|
|
97
|
+
|
|
98
|
+
**Real tools.** File read and edit, multi-file edits, ripgrep search, a shell with
|
|
99
|
+
background jobs, sub-agents, and compiler diagnostics. Read-before-edit is enforced, and
|
|
100
|
+
`/undo` is a real net rather than a hope.
|
|
101
|
+
|
|
102
|
+
**Session memory.** Long sessions stay sharp through automatic compaction plus a running
|
|
103
|
+
state summary that survives it. The agent can read its own earlier sessions in a project,
|
|
104
|
+
so "what did we do last time" gets a real answer instead of a guess.
|
|
105
|
+
|
|
106
|
+
**MCP servers.** Connect external tool servers (GitHub, Postgres, your own) with
|
|
107
|
+
`/mcp add` or by asking in plain words. They start with your session, and their output is
|
|
108
|
+
treated as untrusted by default. Full guide: [docs/MCP.md](docs/MCP.md).
|
|
109
|
+
|
|
110
|
+
**Images and web search.** Drag a screenshot into the prompt or write `@shot.png`; a model
|
|
111
|
+
that can see gets the image, and one that cannot says so plainly. Ask about a recent
|
|
112
|
+
release and the agent looks it up instead of guessing, through your own provider, with no
|
|
113
|
+
second account to manage.
|
|
114
|
+
|
|
115
|
+
**Seeing your app.** It can capture one window and look at it, which is how you tell an
|
|
116
|
+
app that started from an app that works. One window, never the whole screen, and it asks
|
|
117
|
+
first, naming the window it is about to capture.
|
|
118
|
+
|
|
119
|
+
**Project notes that carry across sessions.** MINDWEAVE.md is loaded every session and
|
|
120
|
+
maintained by the agent, so a new conversation continues rather than starts over. Split
|
|
121
|
+
it with `@./path` imports, keep machine-wide notes in `~/.mindweave/MINDWEAVE.md`, and
|
|
122
|
+
put a MINDWEAVE.md inside a folder for conventions that are true only there — that one
|
|
123
|
+
is loaded only while the agent works in it. `/init` writes the first one.
|
|
124
|
+
|
|
125
|
+
**Per-project governor.** Give a project standing rules, reusable skills, and forbidden
|
|
126
|
+
paths or commands the agent has to respect.
|
|
127
|
+
|
|
128
|
+
## Using it
|
|
129
|
+
|
|
130
|
+
| Command | What it does |
|
|
131
|
+
| --- | --- |
|
|
132
|
+
| `/help` | Lists every command |
|
|
133
|
+
| `/init` | Writes MINDWEAVE.md, the project notes loaded every session |
|
|
134
|
+
| `/provider` · `/model` · `/think` | Who answers, which model, how hard it reasons |
|
|
135
|
+
| `/clear` · `/continue` | Start fresh, or resume an earlier session |
|
|
136
|
+
| `/undo` | Reverts what the last turn changed |
|
|
137
|
+
| `/mcp` | Manages connected MCP servers |
|
|
138
|
+
| `shift-tab` | Cycles interaction modes |
|
|
139
|
+
|
|
140
|
+
Type while it works and your message queues; press up to take it back and edit it.
|
|
141
|
+
|
|
142
|
+
## Read more
|
|
143
|
+
|
|
144
|
+
| | |
|
|
145
|
+
| --- | --- |
|
|
146
|
+
| [CHANGELOG.md](CHANGELOG.md) | What changed, and what each fix actually was |
|
|
147
|
+
| [KNOWN-ISSUES.md](KNOWN-ISSUES.md) | What is broken or unfinished, written down rather than carried quietly |
|
|
148
|
+
| [PHILOSOPHY.md](PHILOSOPHY.md) | How the project is run and what gets into the core. Short, and the honest version |
|
|
149
|
+
| [BOUNDARY.md](BOUNDARY.md) | What belongs in the core versus a driver |
|
|
150
|
+
| [CONTRIBUTING.md](CONTRIBUTING.md) | Mechanics, and what is most useful to report |
|
|
151
|
+
| [SECURITY.md](SECURITY.md) | Reporting a vulnerability |
|
|
152
|
+
| [docs/MCP.md](docs/MCP.md) | Connecting and trusting MCP servers |
|
|
153
|
+
|
|
154
|
+
## Contributing
|
|
155
|
+
|
|
156
|
+
Contributions are welcome, especially **model drivers**: Ollama is a stub waiting for
|
|
157
|
+
someone, and a driver is a smaller job than people expect, owning one provider's wire
|
|
158
|
+
format and nothing about how the agent behaves.
|
|
159
|
+
|
|
160
|
+
Small fixes and reproduced bugs with a failing test can go straight to a pull request.
|
|
161
|
+
For anything larger, start a Discussion first. AI-assisted contributions are fine; the
|
|
162
|
+
one rule is that you understand and have tested what you are submitting.
|
|
163
|
+
|
|
164
|
+
Bug reports are genuinely the most useful thing you can send. Mindweave is developed by
|
|
165
|
+
running it on real projects and fixing what breaks, and nearly everything in the
|
|
166
|
+
changelog started as a failure someone watched happen. [What to include, and what is
|
|
167
|
+
especially worth reporting.](CONTRIBUTING.md#reporting-a-bug)
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
[Apache License 2.0](LICENSE).
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cache.ts — persist the built graph so a large repo doesn't re-parse every
|
|
3
|
+
* session.
|
|
4
|
+
*
|
|
5
|
+
* Stored under `~/.mindweave/chassis/<sanitized-project>/graph.json` (next to where
|
|
6
|
+
* sessions live). On startup the lane loads this, then reconciles only the files
|
|
7
|
+
* whose size/mtime changed — so a warm start is near-instant. Best-effort: a
|
|
8
|
+
* missing/corrupt cache just means a full rebuild, never an error.
|
|
9
|
+
*/
|
|
10
|
+
import { promises as fs } from "node:fs";
|
|
11
|
+
import { homedir } from "node:os";
|
|
12
|
+
import { join } from "node:path";
|
|
13
|
+
// v2: symbols carry endLine + doc (nested outlines, doc-comments). An older cache
|
|
14
|
+
// is simply ignored and rebuilt, so the new fields are always present.
|
|
15
|
+
// v3: the graph now includes HTML/CSS markup symbols + DOM string-link refs, so an
|
|
16
|
+
// older cache must rebuild to pick up a project's stylesheets and pages.
|
|
17
|
+
const VERSION = 3;
|
|
18
|
+
function sanitizeProjectPath(root) {
|
|
19
|
+
return root.replace(/[/\\:]+/g, "-").replace(/^-+|-+$/g, "") || "root";
|
|
20
|
+
}
|
|
21
|
+
function cachePath(root) {
|
|
22
|
+
return join(homedir(), ".mindweave", "chassis", sanitizeProjectPath(root), "graph.json");
|
|
23
|
+
}
|
|
24
|
+
/** Load a saved snapshot for `root`, or null if absent/unreadable/stale-version. */
|
|
25
|
+
export async function loadCache(root) {
|
|
26
|
+
try {
|
|
27
|
+
const raw = await fs.readFile(cachePath(root), "utf8");
|
|
28
|
+
const snap = JSON.parse(raw);
|
|
29
|
+
return snap.version === VERSION ? snap : null;
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Write a snapshot for `root`. Best-effort: returns false on any failure. */
|
|
36
|
+
export async function saveCache(root, snapshot) {
|
|
37
|
+
try {
|
|
38
|
+
const path = cachePath(root);
|
|
39
|
+
await fs.mkdir(join(path, ".."), { recursive: true });
|
|
40
|
+
await fs.writeFile(path, JSON.stringify({ version: VERSION, ...snapshot }), "utf8");
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../src/alternator/chassis/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,kFAAkF;AAClF,uEAAuE;AACvE,mFAAmF;AACnF,yEAAyE;AACzE,MAAM,OAAO,GAAG,CAAC,CAAC;AAelB,SAAS,mBAAmB,CAAC,IAAY;IACvC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC;AACzE,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,mBAAmB,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,CAAC;AAC3F,CAAC;AAED,oFAAoF;AACpF,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAY;IAC1C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;QACvD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAoB,CAAC;QAChD,OAAO,IAAI,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAY,EAAE,QAA0C;IACtF,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;QAC7B,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACtD,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;QACpF,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* domRefs.ts — pull DOM class/id references out of JavaScript (pure, regex).
|
|
3
|
+
*
|
|
4
|
+
* A page wires HTML/CSS/JS by literal name: `document.getElementById("hero")`,
|
|
5
|
+
* `querySelector(".hero-stats")`, `classList.add("active")`. These are the JS half
|
|
6
|
+
* of a cross-language string wire — extracting them as name-level references lets
|
|
7
|
+
* the graph connect a CSS rule / HTML element to the script that manipulates it.
|
|
8
|
+
* These names feed Mindweave's name-keyed def/ref graph, so `references(".hero")`
|
|
9
|
+
* includes the script that touches it.
|
|
10
|
+
*
|
|
11
|
+
* Deliberately conservative: ONLY well-known DOM selector APIs, so an arbitrary
|
|
12
|
+
* string literal never becomes graph noise. Pure + line-based (unit-tested).
|
|
13
|
+
*/
|
|
14
|
+
// Capture group 1 is the class/id name (a leading `.`/`#` is stripped). querySelector
|
|
15
|
+
// takes a full selector, so we grab just its first simple token — enough to wire it.
|
|
16
|
+
const PATTERNS = [
|
|
17
|
+
/\bgetElementById\(\s*['"`]([#.]?[A-Za-z_][\w-]*)['"`]/g,
|
|
18
|
+
/\bgetElementsByClassName\(\s*['"`]([#.]?[A-Za-z_][\w-]*)['"`]/g,
|
|
19
|
+
/\bquerySelector(?:All)?\(\s*['"`]([#.]?[A-Za-z_][\w-]*)/g,
|
|
20
|
+
/\bclassList\.(?:add|remove|toggle|contains|replace)\(\s*['"`]([A-Za-z_][\w-]*)['"`]/g,
|
|
21
|
+
];
|
|
22
|
+
/** DOM class/id names referenced in `code`. `lineOffset` shifts the reported line
|
|
23
|
+
* (used when the code is an embedded `<script>` block inside an HTML file). */
|
|
24
|
+
export function extractDomRefs(code, lineOffset = 0) {
|
|
25
|
+
const out = [];
|
|
26
|
+
const seen = new Set();
|
|
27
|
+
for (const re of PATTERNS) {
|
|
28
|
+
re.lastIndex = 0;
|
|
29
|
+
let m;
|
|
30
|
+
while ((m = re.exec(code)) !== null) {
|
|
31
|
+
const name = m[1].replace(/^[#.]/, "").trim();
|
|
32
|
+
if (!name)
|
|
33
|
+
continue;
|
|
34
|
+
const line = lineAt(code, m.index) + lineOffset;
|
|
35
|
+
const key = `${name}@${line}`;
|
|
36
|
+
if (seen.has(key))
|
|
37
|
+
continue;
|
|
38
|
+
seen.add(key);
|
|
39
|
+
out.push({ name, line });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return out;
|
|
43
|
+
}
|
|
44
|
+
/** The 1-based line a character offset falls on. */
|
|
45
|
+
function lineAt(code, index) {
|
|
46
|
+
let line = 1;
|
|
47
|
+
const limit = Math.min(index, code.length);
|
|
48
|
+
for (let i = 0; i < limit; i++)
|
|
49
|
+
if (code[i] === "\n")
|
|
50
|
+
line++;
|
|
51
|
+
return line;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=domRefs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domRefs.js","sourceRoot":"","sources":["../../../src/alternator/chassis/domRefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,sFAAsF;AACtF,qFAAqF;AACrF,MAAM,QAAQ,GAAsB;IAClC,wDAAwD;IACxD,gEAAgE;IAChE,0DAA0D;IAC1D,sFAAsF;CACvF,CAAC;AAEF;gFACgF;AAChF,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,UAAU,GAAG,CAAC;IACzD,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,EAAE,IAAI,QAAQ,EAAE,CAAC;QAC1B,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC;QACjB,IAAI,CAAyB,CAAC;QAC9B,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YAC/C,IAAI,CAAC,IAAI;gBAAE,SAAS;YACpB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC;YAChD,MAAM,GAAG,GAAG,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;YAC9B,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,SAAS;YAC5B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,oDAAoD;AACpD,SAAS,MAAM,CAAC,IAAY,EAAE,KAAa;IACzC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE;QAAE,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI;YAAE,IAAI,EAAE,CAAC;IAC7D,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* extractWorker.ts — the other side of isolation.ts.
|
|
3
|
+
*
|
|
4
|
+
* Runs as a forked CHILD PROCESS and calls the same treesitter entry points the host
|
|
5
|
+
* does; the MINDWEAVE_TS_IN_WORKER env flag (set by the host at spawn) is what stops
|
|
6
|
+
* those entry points from routing back into isolation — in here, "heavy" grammars run
|
|
7
|
+
* in-process, which is the entire point: when one of them dies, it dies over here.
|
|
8
|
+
*
|
|
9
|
+
* ── WHY A PROCESS AND NOT A WORKER THREAD ───────────────────────────────────────
|
|
10
|
+
*
|
|
11
|
+
* This was a worker_thread first, and that could not work. The failure being contained
|
|
12
|
+
* is a V8 **Zone** allocation failure, and V8 handles that by calling
|
|
13
|
+
* `FatalProcessOutOfMemory`, which aborts the PROCESS. A worker thread shares the
|
|
14
|
+
* process, so the abort took the host down anyway — measured: parsing two lines of
|
|
15
|
+
* OCaml through the worker returned a correct result and then killed the host with
|
|
16
|
+
* exit code 3, in the compiled build, with no teardown requested.
|
|
17
|
+
*
|
|
18
|
+
* `resourceLimits` do not help, because they bound the JS heap and the code range, and
|
|
19
|
+
* a Zone is neither. That is also why the old "reproduction" case looked contained: an
|
|
20
|
+
* 8 MB heap limit produces a *heap* OOM, which really is thread-local and really does
|
|
21
|
+
* terminate just the worker. The two failures look alike in a stack trace and behave
|
|
22
|
+
* completely differently.
|
|
23
|
+
*
|
|
24
|
+
* A separate process is the only boundary V8's fatal handler cannot cross.
|
|
25
|
+
*
|
|
26
|
+
* Protocol: { id, op: "extract" | "span", ...args } in, { id, result } out, over the
|
|
27
|
+
* fork IPC channel. Any error is a null result — the caller's contract for the
|
|
28
|
+
* fallback tier.
|
|
29
|
+
*/
|
|
30
|
+
import { treeSitterExtract, treeSitterSpan } from "./treesitter.js";
|
|
31
|
+
import { extractMarkup } from "./markup.js";
|
|
32
|
+
if (!process.send)
|
|
33
|
+
throw new Error("extractWorker must run as a forked child process");
|
|
34
|
+
process.on("message", async (msg) => {
|
|
35
|
+
let result = null;
|
|
36
|
+
try {
|
|
37
|
+
if (msg.op === "extract") {
|
|
38
|
+
result = await treeSitterExtract(msg.absPath, msg.code);
|
|
39
|
+
}
|
|
40
|
+
else if (msg.op === "markup") {
|
|
41
|
+
// The markup tier walks the tree itself, so it runs whole over here — only its
|
|
42
|
+
// finished defs/refs travel back. A live tree cannot cross the channel.
|
|
43
|
+
result = await extractMarkup(msg.absPath, msg.code);
|
|
44
|
+
}
|
|
45
|
+
else if (msg.op === "span") {
|
|
46
|
+
result = await treeSitterSpan(msg.absPath, msg.code, msg.name, msg.nearLine);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
result = null;
|
|
51
|
+
}
|
|
52
|
+
// The channel can be gone if the host gave up on us mid-parse; that is its right,
|
|
53
|
+
// and there is nobody left to tell.
|
|
54
|
+
try {
|
|
55
|
+
// RSS rides along with every reply. The host bounds this process's memory but
|
|
56
|
+
// cannot observe it from outside, and the thing being bounded is WASM memory that
|
|
57
|
+
// no host-side proxy tracks — so the measurement has to be taken here, after the
|
|
58
|
+
// work, and reported. See workerRssMb in isolation.ts.
|
|
59
|
+
process.send({ id: msg.id, result, rss: process.memoryUsage().rss });
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
// Nothing to do — the host has already moved on.
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=extractWorker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractWorker.js","sourceRoot":"","sources":["../../../src/alternator/chassis/extractWorker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO5C,IAAI,CAAC,OAAO,CAAC,IAAI;IAAE,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AAEvF,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,GAAQ,EAAE,EAAE;IACvC,IAAI,MAAM,GAAY,IAAI,CAAC;IAC3B,IAAI,CAAC;QACH,IAAI,GAAG,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,GAAG,MAAM,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1D,CAAC;aAAM,IAAI,GAAG,CAAC,EAAE,KAAK,QAAQ,EAAE,CAAC;YAC/B,+EAA+E;YAC/E,wEAAwE;YACxE,MAAM,GAAG,MAAM,aAAa,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QACtD,CAAC;aAAM,IAAI,GAAG,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;YAC7B,MAAM,GAAG,MAAM,cAAc,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC/E,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,GAAG,IAAI,CAAC;IAChB,CAAC;IACD,kFAAkF;IAClF,oCAAoC;IACpC,IAAI,CAAC;QACH,8EAA8E;QAC9E,kFAAkF;QAClF,iFAAiF;QACjF,uDAAuD;QACvD,OAAO,CAAC,IAAK,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;IACxE,CAAC;IAAC,MAAM,CAAC;QACP,iDAAiD;IACnD,CAAC;AACH,CAAC,CAAC,CAAC"}
|