@vpxa/aikit 0.1.59 → 0.1.60
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/README.md +38 -3
- package/package.json +2 -1
- package/packages/aikit-client/dist/index.d.ts +146 -4
- package/packages/aikit-client/dist/index.js +5 -1
- package/packages/analyzers/dist/index.d.ts +309 -11
- package/packages/analyzers/dist/index.js +54 -1
- package/packages/chunker/dist/index.d.ts +451 -18
- package/packages/chunker/dist/index.js +24 -1
- package/packages/cli/dist/{commands/init/constants.js → constants-D3v4VDf0.js} +1 -1
- package/packages/cli/dist/index.js +15 -2
- package/packages/cli/dist/init-D0CiV9PX.js +7 -0
- package/packages/cli/dist/scaffold-CJwkHf-q.js +2 -0
- package/packages/cli/dist/{commands/init/templates.js → templates-DJ7EC5vw.js} +1 -1
- package/packages/cli/dist/user-HmJYNt5b.js +5 -0
- package/packages/core/dist/index.d.ts +357 -6
- package/packages/core/dist/index.js +1 -1
- package/packages/dashboard/dist/assets/{index-Cdke3KDK.js → index-C6D-PCp0.js} +7 -7
- package/packages/dashboard/dist/assets/index-C6D-PCp0.js.map +1 -0
- package/packages/dashboard/dist/index.html +1 -1
- package/packages/elicitation/dist/index.d.ts +139 -4
- package/packages/elicitation/dist/index.js +1 -1
- package/packages/embeddings/dist/index.d.ts +45 -2
- package/packages/embeddings/dist/index.js +1 -1
- package/packages/enterprise-bridge/dist/index.d.ts +275 -7
- package/packages/enterprise-bridge/dist/index.js +1 -1
- package/packages/flows/dist/index.d.ts +345 -12
- package/packages/flows/dist/index.js +15 -1
- package/packages/indexer/dist/index.d.ts +196 -6
- package/packages/indexer/dist/index.js +1 -1
- package/packages/present/dist/index.html +314 -313
- package/packages/server/dist/curated-manager-DX-_oJg0.js +5 -0
- package/packages/server/dist/index.d.ts +139 -1
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/server-eMZ64H9b.js +1274 -0
- package/packages/store/dist/index.d.ts +316 -5
- package/packages/store/dist/index.js +90 -1
- package/packages/store/dist/lance-store-jdHZp-V4.js +1 -0
- package/packages/tools/dist/index.d.ts +2161 -61
- package/packages/tools/dist/index.js +117 -1
- package/packages/tui/dist/{App-CoMyn2kt.js → App-DobfqTPH.js} +1 -1
- package/packages/tui/dist/App.d.ts +1 -1
- package/packages/tui/dist/App.js +1 -1
- package/packages/tui/dist/{LogPanel-CDItCD0E.js → LogPanel-DGeptKim.js} +3 -3
- package/packages/tui/dist/hooks/useKBClient.d.ts +1 -1
- package/packages/tui/dist/{index-MXJeXmCf.d.ts → index-floZQwfo.d.ts} +2 -1
- package/packages/tui/dist/index.d.ts +1 -1
- package/packages/tui/dist/index.js +1 -1
- package/packages/tui/dist/panels/LogPanel.js +1 -1
- package/scaffold/definitions/bodies.mjs +47 -0
- package/scaffold/definitions/protocols.mjs +9 -0
- package/scaffold/definitions/tools.mjs +15 -0
- package/scaffold/general/agents/Debugger.agent.md +9 -0
- package/scaffold/general/agents/Documenter.agent.md +9 -0
- package/scaffold/general/agents/Frontend.agent.md +9 -0
- package/scaffold/general/agents/Implementer.agent.md +9 -0
- package/scaffold/general/agents/Orchestrator.agent.md +47 -0
- package/scaffold/general/agents/Planner.agent.md +9 -0
- package/scaffold/general/agents/Refactor.agent.md +9 -0
- package/scaffold/general/agents/Security.agent.md +9 -0
- package/scaffold/general/agents/_shared/code-agent-base.md +9 -0
- package/scaffold/general/skills/aikit/SKILL.md +71 -7
- package/packages/aikit-client/dist/direct-client.d.ts +0 -37
- package/packages/aikit-client/dist/direct-client.js +0 -1
- package/packages/aikit-client/dist/mcp-client.d.ts +0 -19
- package/packages/aikit-client/dist/mcp-client.js +0 -4
- package/packages/aikit-client/dist/parsers.d.ts +0 -35
- package/packages/aikit-client/dist/parsers.js +0 -2
- package/packages/aikit-client/dist/types.d.ts +0 -62
- package/packages/aikit-client/dist/types.js +0 -1
- package/packages/analyzers/dist/blast-radius-analyzer.d.ts +0 -19
- package/packages/analyzers/dist/blast-radius-analyzer.js +0 -6
- package/packages/analyzers/dist/dependency-analyzer.d.ts +0 -32
- package/packages/analyzers/dist/dependency-analyzer.js +0 -8
- package/packages/analyzers/dist/diagram-generator.d.ts +0 -16
- package/packages/analyzers/dist/diagram-generator.js +0 -2
- package/packages/analyzers/dist/entry-point-analyzer.d.ts +0 -40
- package/packages/analyzers/dist/entry-point-analyzer.js +0 -4
- package/packages/analyzers/dist/knowledge-producer.d.ts +0 -40
- package/packages/analyzers/dist/knowledge-producer.js +0 -26
- package/packages/analyzers/dist/pattern-analyzer.d.ts +0 -15
- package/packages/analyzers/dist/pattern-analyzer.js +0 -2
- package/packages/analyzers/dist/regex-call-graph.d.ts +0 -10
- package/packages/analyzers/dist/regex-call-graph.js +0 -1
- package/packages/analyzers/dist/structure-analyzer.d.ts +0 -19
- package/packages/analyzers/dist/structure-analyzer.js +0 -4
- package/packages/analyzers/dist/symbol-analyzer.d.ts +0 -14
- package/packages/analyzers/dist/symbol-analyzer.js +0 -9
- package/packages/analyzers/dist/ts-call-graph.d.ts +0 -29
- package/packages/analyzers/dist/ts-call-graph.js +0 -1
- package/packages/analyzers/dist/types.d.ts +0 -110
- package/packages/analyzers/dist/types.js +0 -1
- package/packages/chunker/dist/call-graph-extractor.d.ts +0 -25
- package/packages/chunker/dist/call-graph-extractor.js +0 -1
- package/packages/chunker/dist/chunker-factory.d.ts +0 -19
- package/packages/chunker/dist/chunker-factory.js +0 -1
- package/packages/chunker/dist/chunker.interface.d.ts +0 -13
- package/packages/chunker/dist/chunker.interface.js +0 -1
- package/packages/chunker/dist/code-chunker.d.ts +0 -17
- package/packages/chunker/dist/code-chunker.js +0 -11
- package/packages/chunker/dist/extractors/call-extractor.d.ts +0 -24
- package/packages/chunker/dist/extractors/call-extractor.js +0 -1
- package/packages/chunker/dist/extractors/entry-point-detector.d.ts +0 -14
- package/packages/chunker/dist/extractors/entry-point-detector.js +0 -1
- package/packages/chunker/dist/extractors/import-extractor.d.ts +0 -14
- package/packages/chunker/dist/extractors/import-extractor.js +0 -1
- package/packages/chunker/dist/extractors/pattern-detector.d.ts +0 -14
- package/packages/chunker/dist/extractors/pattern-detector.js +0 -1
- package/packages/chunker/dist/extractors/scope-resolver.d.ts +0 -26
- package/packages/chunker/dist/extractors/scope-resolver.js +0 -1
- package/packages/chunker/dist/extractors/symbol-extractor.d.ts +0 -14
- package/packages/chunker/dist/extractors/symbol-extractor.js +0 -3
- package/packages/chunker/dist/extractors/types.d.ts +0 -44
- package/packages/chunker/dist/extractors/types.js +0 -1
- package/packages/chunker/dist/generic-chunker.d.ts +0 -15
- package/packages/chunker/dist/generic-chunker.js +0 -5
- package/packages/chunker/dist/markdown-chunker.d.ts +0 -17
- package/packages/chunker/dist/markdown-chunker.js +0 -3
- package/packages/chunker/dist/wasm/languages.d.ts +0 -18
- package/packages/chunker/dist/wasm/languages.js +0 -1
- package/packages/chunker/dist/wasm/query-executor.d.ts +0 -70
- package/packages/chunker/dist/wasm/query-executor.js +0 -1
- package/packages/chunker/dist/wasm/runtime.d.ts +0 -44
- package/packages/chunker/dist/wasm/runtime.js +0 -1
- package/packages/chunker/dist/wasm/types.d.ts +0 -84
- package/packages/chunker/dist/wasm/types.js +0 -1
- package/packages/chunker/dist/wasm-chunker.d.ts +0 -23
- package/packages/chunker/dist/wasm-chunker.js +0 -6
- package/packages/cli/dist/aikit-init.d.ts +0 -59
- package/packages/cli/dist/aikit-init.js +0 -1
- package/packages/cli/dist/commands/analyze.d.ts +0 -6
- package/packages/cli/dist/commands/analyze.js +0 -2
- package/packages/cli/dist/commands/context-cmds.d.ts +0 -6
- package/packages/cli/dist/commands/context-cmds.js +0 -1
- package/packages/cli/dist/commands/environment.d.ts +0 -6
- package/packages/cli/dist/commands/environment.js +0 -1
- package/packages/cli/dist/commands/execution.d.ts +0 -6
- package/packages/cli/dist/commands/execution.js +0 -1
- package/packages/cli/dist/commands/flow.d.ts +0 -6
- package/packages/cli/dist/commands/flow.js +0 -1
- package/packages/cli/dist/commands/graph.d.ts +0 -6
- package/packages/cli/dist/commands/graph.js +0 -6
- package/packages/cli/dist/commands/init/adapters.d.ts +0 -28
- package/packages/cli/dist/commands/init/adapters.js +0 -1
- package/packages/cli/dist/commands/init/config.d.ts +0 -10
- package/packages/cli/dist/commands/init/config.js +0 -3
- package/packages/cli/dist/commands/init/constants.d.ts +0 -46
- package/packages/cli/dist/commands/init/curated.d.ts +0 -7
- package/packages/cli/dist/commands/init/curated.js +0 -1
- package/packages/cli/dist/commands/init/frontmatter.d.ts +0 -79
- package/packages/cli/dist/commands/init/frontmatter.js +0 -2
- package/packages/cli/dist/commands/init/index.d.ts +0 -36
- package/packages/cli/dist/commands/init/index.js +0 -5
- package/packages/cli/dist/commands/init/manifest.d.ts +0 -72
- package/packages/cli/dist/commands/init/manifest.js +0 -1
- package/packages/cli/dist/commands/init/scaffold.d.ts +0 -58
- package/packages/cli/dist/commands/init/scaffold.js +0 -1
- package/packages/cli/dist/commands/init/templates.d.ts +0 -9
- package/packages/cli/dist/commands/init/user.d.ts +0 -61
- package/packages/cli/dist/commands/init/user.js +0 -5
- package/packages/cli/dist/commands/knowledge.d.ts +0 -6
- package/packages/cli/dist/commands/knowledge.js +0 -1
- package/packages/cli/dist/commands/search.d.ts +0 -6
- package/packages/cli/dist/commands/search.js +0 -1
- package/packages/cli/dist/commands/system.d.ts +0 -6
- package/packages/cli/dist/commands/system.js +0 -4
- package/packages/cli/dist/commands/upgrade.d.ts +0 -6
- package/packages/cli/dist/commands/upgrade.js +0 -1
- package/packages/cli/dist/commands/workspace.d.ts +0 -6
- package/packages/cli/dist/commands/workspace.js +0 -1
- package/packages/cli/dist/context.d.ts +0 -7
- package/packages/cli/dist/context.js +0 -1
- package/packages/cli/dist/helpers.d.ts +0 -55
- package/packages/cli/dist/helpers.js +0 -5
- package/packages/cli/dist/types.d.ts +0 -9
- package/packages/cli/dist/types.js +0 -1
- package/packages/core/dist/constants.d.ts +0 -74
- package/packages/core/dist/constants.js +0 -1
- package/packages/core/dist/content-detector.d.ts +0 -13
- package/packages/core/dist/content-detector.js +0 -1
- package/packages/core/dist/errors.d.ts +0 -20
- package/packages/core/dist/errors.js +0 -1
- package/packages/core/dist/global-registry.d.ts +0 -69
- package/packages/core/dist/global-registry.js +0 -1
- package/packages/core/dist/logger.d.ts +0 -32
- package/packages/core/dist/logger.js +0 -1
- package/packages/core/dist/types.d.ts +0 -149
- package/packages/core/dist/types.js +0 -1
- package/packages/dashboard/dist/assets/index-Cdke3KDK.js.map +0 -1
- package/packages/elicitation/dist/build.d.ts +0 -14
- package/packages/elicitation/dist/build.js +0 -1
- package/packages/elicitation/dist/fields.d.ts +0 -32
- package/packages/elicitation/dist/fields.js +0 -1
- package/packages/elicitation/dist/normalize.d.ts +0 -15
- package/packages/elicitation/dist/normalize.js +0 -1
- package/packages/elicitation/dist/types.d.ts +0 -88
- package/packages/elicitation/dist/types.js +0 -1
- package/packages/embeddings/dist/embedder.interface.d.ts +0 -26
- package/packages/embeddings/dist/embedder.interface.js +0 -1
- package/packages/embeddings/dist/onnx-embedder.d.ts +0 -23
- package/packages/embeddings/dist/onnx-embedder.js +0 -1
- package/packages/enterprise-bridge/dist/cache.d.ts +0 -28
- package/packages/enterprise-bridge/dist/cache.js +0 -1
- package/packages/enterprise-bridge/dist/er-client.d.ts +0 -37
- package/packages/enterprise-bridge/dist/er-client.js +0 -1
- package/packages/enterprise-bridge/dist/evolution-collector.d.ts +0 -62
- package/packages/enterprise-bridge/dist/evolution-collector.js +0 -1
- package/packages/enterprise-bridge/dist/policy-store.d.ts +0 -45
- package/packages/enterprise-bridge/dist/policy-store.js +0 -1
- package/packages/enterprise-bridge/dist/push-adapter.d.ts +0 -23
- package/packages/enterprise-bridge/dist/push-adapter.js +0 -1
- package/packages/enterprise-bridge/dist/result-merger.d.ts +0 -14
- package/packages/enterprise-bridge/dist/result-merger.js +0 -1
- package/packages/enterprise-bridge/dist/types.d.ts +0 -81
- package/packages/enterprise-bridge/dist/types.js +0 -1
- package/packages/flows/dist/adapters/claude-plugin.d.ts +0 -25
- package/packages/flows/dist/adapters/claude-plugin.js +0 -3
- package/packages/flows/dist/adapters/copilot.d.ts +0 -12
- package/packages/flows/dist/adapters/copilot.js +0 -1
- package/packages/flows/dist/adapters/index.d.ts +0 -12
- package/packages/flows/dist/adapters/index.js +0 -1
- package/packages/flows/dist/adapters/native.d.ts +0 -10
- package/packages/flows/dist/adapters/native.js +0 -1
- package/packages/flows/dist/adapters/openspec.d.ts +0 -40
- package/packages/flows/dist/adapters/openspec.js +0 -1
- package/packages/flows/dist/builtins.d.ts +0 -16
- package/packages/flows/dist/builtins.js +0 -1
- package/packages/flows/dist/foundation.d.ts +0 -20
- package/packages/flows/dist/foundation.js +0 -11
- package/packages/flows/dist/git.d.ts +0 -53
- package/packages/flows/dist/git.js +0 -2
- package/packages/flows/dist/loader.d.ts +0 -13
- package/packages/flows/dist/loader.js +0 -2
- package/packages/flows/dist/registry.d.ts +0 -23
- package/packages/flows/dist/registry.js +0 -1
- package/packages/flows/dist/state-machine.d.ts +0 -23
- package/packages/flows/dist/state-machine.js +0 -1
- package/packages/flows/dist/symlinks.d.ts +0 -17
- package/packages/flows/dist/symlinks.js +0 -1
- package/packages/flows/dist/types.d.ts +0 -127
- package/packages/flows/dist/types.js +0 -1
- package/packages/indexer/dist/file-hasher.d.ts +0 -13
- package/packages/indexer/dist/file-hasher.js +0 -1
- package/packages/indexer/dist/filesystem-crawler.d.ts +0 -29
- package/packages/indexer/dist/filesystem-crawler.js +0 -1
- package/packages/indexer/dist/graph-extractor.d.ts +0 -22
- package/packages/indexer/dist/graph-extractor.js +0 -1
- package/packages/indexer/dist/hash-cache.d.ts +0 -24
- package/packages/indexer/dist/hash-cache.js +0 -1
- package/packages/indexer/dist/incremental-indexer.d.ts +0 -73
- package/packages/indexer/dist/incremental-indexer.js +0 -1
- package/packages/indexer/dist/smart-index-scheduler.d.ts +0 -47
- package/packages/indexer/dist/smart-index-scheduler.js +0 -1
- package/packages/server/dist/api.d.ts +0 -3
- package/packages/server/dist/api.js +0 -1
- package/packages/server/dist/auto-gc.d.ts +0 -30
- package/packages/server/dist/auto-gc.js +0 -1
- package/packages/server/dist/background-task.d.ts +0 -47
- package/packages/server/dist/background-task.js +0 -1
- package/packages/server/dist/completions.d.ts +0 -14
- package/packages/server/dist/completions.js +0 -1
- package/packages/server/dist/compression-interceptor.d.ts +0 -12
- package/packages/server/dist/compression-interceptor.js +0 -1
- package/packages/server/dist/config.d.ts +0 -16
- package/packages/server/dist/cross-workspace.d.ts +0 -43
- package/packages/server/dist/cross-workspace.js +0 -1
- package/packages/server/dist/curated-manager.d.ts +0 -92
- package/packages/server/dist/curated-manager.js +0 -5
- package/packages/server/dist/dashboard-static.d.ts +0 -27
- package/packages/server/dist/elicitor.d.ts +0 -18
- package/packages/server/dist/elicitor.js +0 -1
- package/packages/server/dist/idle-timer.d.ts +0 -33
- package/packages/server/dist/idle-timer.js +0 -1
- package/packages/server/dist/mcp-logging.d.ts +0 -11
- package/packages/server/dist/mcp-logging.js +0 -1
- package/packages/server/dist/memory-monitor.d.ts +0 -37
- package/packages/server/dist/memory-monitor.js +0 -1
- package/packages/server/dist/output-schemas.d.ts +0 -244
- package/packages/server/dist/output-schemas.js +0 -1
- package/packages/server/dist/prompts.d.ts +0 -13
- package/packages/server/dist/prompts.js +0 -13
- package/packages/server/dist/replay-interceptor.d.ts +0 -23
- package/packages/server/dist/replay-interceptor.js +0 -1
- package/packages/server/dist/resource-links.d.ts +0 -34
- package/packages/server/dist/resource-links.js +0 -1
- package/packages/server/dist/resources/curated-resources.d.ts +0 -13
- package/packages/server/dist/resources/curated-resources.js +0 -2
- package/packages/server/dist/resources/resource-notifier.d.ts +0 -45
- package/packages/server/dist/resources/resource-notifier.js +0 -1
- package/packages/server/dist/resources/resources.d.ts +0 -8
- package/packages/server/dist/resources/resources.js +0 -2
- package/packages/server/dist/sampling.d.ts +0 -41
- package/packages/server/dist/sampling.js +0 -2
- package/packages/server/dist/server.d.ts +0 -63
- package/packages/server/dist/server.js +0 -3
- package/packages/server/dist/structured-content-guard.d.ts +0 -28
- package/packages/server/dist/structured-content-guard.js +0 -1
- package/packages/server/dist/task-manager.d.ts +0 -40
- package/packages/server/dist/task-manager.js +0 -1
- package/packages/server/dist/tool-metadata.d.ts +0 -38
- package/packages/server/dist/tool-metadata.js +0 -1
- package/packages/server/dist/tool-prefix.d.ts +0 -12
- package/packages/server/dist/tool-prefix.js +0 -1
- package/packages/server/dist/tool-timeout.d.ts +0 -27
- package/packages/server/dist/tool-timeout.js +0 -1
- package/packages/server/dist/tools/analyze.tools.d.ts +0 -14
- package/packages/server/dist/tools/analyze.tools.js +0 -8
- package/packages/server/dist/tools/audit.tool.d.ts +0 -8
- package/packages/server/dist/tools/audit.tool.js +0 -1
- package/packages/server/dist/tools/brainstorm.tool.d.ts +0 -7
- package/packages/server/dist/tools/brainstorm.tool.js +0 -9
- package/packages/server/dist/tools/bridge.tools.d.ts +0 -34
- package/packages/server/dist/tools/bridge.tools.js +0 -15
- package/packages/server/dist/tools/config.tool.d.ts +0 -8
- package/packages/server/dist/tools/config.tool.js +0 -12
- package/packages/server/dist/tools/context.tools.d.ts +0 -15
- package/packages/server/dist/tools/context.tools.js +0 -10
- package/packages/server/dist/tools/evolution.tools.d.ts +0 -7
- package/packages/server/dist/tools/evolution.tools.js +0 -5
- package/packages/server/dist/tools/execution.tools.d.ts +0 -14
- package/packages/server/dist/tools/execution.tools.js +0 -4
- package/packages/server/dist/tools/flow.tools.d.ts +0 -7
- package/packages/server/dist/tools/flow.tools.js +0 -16
- package/packages/server/dist/tools/forge.tools.d.ts +0 -13
- package/packages/server/dist/tools/forge.tools.js +0 -10
- package/packages/server/dist/tools/forget.tool.d.ts +0 -8
- package/packages/server/dist/tools/forget.tool.js +0 -1
- package/packages/server/dist/tools/graph.tool.d.ts +0 -7
- package/packages/server/dist/tools/graph.tool.js +0 -29
- package/packages/server/dist/tools/infra.tools.d.ts +0 -10
- package/packages/server/dist/tools/infra.tools.js +0 -5
- package/packages/server/dist/tools/list.tool.d.ts +0 -7
- package/packages/server/dist/tools/list.tool.js +0 -2
- package/packages/server/dist/tools/lookup.tool.d.ts +0 -7
- package/packages/server/dist/tools/lookup.tool.js +0 -3
- package/packages/server/dist/tools/manipulation.tools.d.ts +0 -10
- package/packages/server/dist/tools/manipulation.tools.js +0 -4
- package/packages/server/dist/tools/onboard.tool.d.ts +0 -12
- package/packages/server/dist/tools/onboard.tool.js +0 -2
- package/packages/server/dist/tools/persistence.tools.d.ts +0 -10
- package/packages/server/dist/tools/persistence.tools.js +0 -5
- package/packages/server/dist/tools/policy.tools.d.ts +0 -7
- package/packages/server/dist/tools/policy.tools.js +0 -3
- package/packages/server/dist/tools/present/browser.d.ts +0 -4
- package/packages/server/dist/tools/present/browser.js +0 -93
- package/packages/server/dist/tools/present/helpers.d.ts +0 -19
- package/packages/server/dist/tools/present/helpers.js +0 -16
- package/packages/server/dist/tools/present/html.d.ts +0 -18
- package/packages/server/dist/tools/present/html.js +0 -5
- package/packages/server/dist/tools/present/index.d.ts +0 -2
- package/packages/server/dist/tools/present/index.js +0 -1
- package/packages/server/dist/tools/present/markdown.d.ts +0 -32
- package/packages/server/dist/tools/present/markdown.js +0 -11
- package/packages/server/dist/tools/present/templates.d.ts +0 -14
- package/packages/server/dist/tools/present/templates.js +0 -472
- package/packages/server/dist/tools/present/tool.d.ts +0 -27
- package/packages/server/dist/tools/present/tool.js +0 -39
- package/packages/server/dist/tools/present-blocks.d.ts +0 -46
- package/packages/server/dist/tools/present-blocks.js +0 -27
- package/packages/server/dist/tools/present-charts.d.ts +0 -31
- package/packages/server/dist/tools/present-charts.js +0 -34
- package/packages/server/dist/tools/present-theme.d.ts +0 -14
- package/packages/server/dist/tools/present-theme.js +0 -396
- package/packages/server/dist/tools/present-utils.d.ts +0 -11
- package/packages/server/dist/tools/present-utils.js +0 -1
- package/packages/server/dist/tools/present.tool.d.ts +0 -2
- package/packages/server/dist/tools/present.tool.js +0 -1
- package/packages/server/dist/tools/produce.tool.d.ts +0 -7
- package/packages/server/dist/tools/produce.tool.js +0 -4
- package/packages/server/dist/tools/read.tool.d.ts +0 -7
- package/packages/server/dist/tools/read.tool.js +0 -2
- package/packages/server/dist/tools/reindex.tool.d.ts +0 -11
- package/packages/server/dist/tools/reindex.tool.js +0 -9
- package/packages/server/dist/tools/remember.tool.d.ts +0 -9
- package/packages/server/dist/tools/remember.tool.js +0 -4
- package/packages/server/dist/tools/replay.tool.d.ts +0 -6
- package/packages/server/dist/tools/replay.tool.js +0 -3
- package/packages/server/dist/tools/restore.tool.d.ts +0 -6
- package/packages/server/dist/tools/restore.tool.js +0 -3
- package/packages/server/dist/tools/search.tool.d.ts +0 -11
- package/packages/server/dist/tools/search.tool.js +0 -10
- package/packages/server/dist/tools/status.tool.d.ts +0 -28
- package/packages/server/dist/tools/status.tool.js +0 -3
- package/packages/server/dist/tools/update.tool.d.ts +0 -8
- package/packages/server/dist/tools/update.tool.js +0 -1
- package/packages/server/dist/tools/utility.tools.d.ts +0 -15
- package/packages/server/dist/tools/utility.tools.js +0 -13
- package/packages/server/dist/version-check.d.ts +0 -32
- package/packages/store/dist/graph-store.interface.d.ts +0 -159
- package/packages/store/dist/graph-store.interface.js +0 -1
- package/packages/store/dist/lance-store.d.ts +0 -46
- package/packages/store/dist/lance-store.js +0 -1
- package/packages/store/dist/sqlite-graph-store.d.ts +0 -57
- package/packages/store/dist/sqlite-graph-store.js +0 -90
- package/packages/store/dist/store-factory.d.ts +0 -12
- package/packages/store/dist/store-factory.js +0 -1
- package/packages/store/dist/store.interface.d.ts +0 -54
- package/packages/store/dist/store.interface.js +0 -1
- package/packages/tools/dist/audit.d.ts +0 -65
- package/packages/tools/dist/audit.js +0 -6
- package/packages/tools/dist/batch.d.ts +0 -23
- package/packages/tools/dist/batch.js +0 -1
- package/packages/tools/dist/changelog.d.ts +0 -36
- package/packages/tools/dist/changelog.js +0 -2
- package/packages/tools/dist/check.d.ts +0 -48
- package/packages/tools/dist/check.js +0 -2
- package/packages/tools/dist/checkpoint.d.ts +0 -19
- package/packages/tools/dist/checkpoint.js +0 -1
- package/packages/tools/dist/codemod.d.ts +0 -39
- package/packages/tools/dist/codemod.js +0 -2
- package/packages/tools/dist/compact.d.ts +0 -47
- package/packages/tools/dist/compact.js +0 -3
- package/packages/tools/dist/compress-output.d.ts +0 -38
- package/packages/tools/dist/compress-output.js +0 -1
- package/packages/tools/dist/compression/delta-cache.d.ts +0 -29
- package/packages/tools/dist/compression/delta-cache.js +0 -1
- package/packages/tools/dist/compression/engine.d.ts +0 -34
- package/packages/tools/dist/compression/engine.js +0 -4
- package/packages/tools/dist/compression/litm.d.ts +0 -20
- package/packages/tools/dist/compression/litm.js +0 -1
- package/packages/tools/dist/compression/mmr.d.ts +0 -24
- package/packages/tools/dist/compression/mmr.js +0 -1
- package/packages/tools/dist/compression/rules/docker.d.ts +0 -11
- package/packages/tools/dist/compression/rules/docker.js +0 -3
- package/packages/tools/dist/compression/rules/generic.d.ts +0 -11
- package/packages/tools/dist/compression/rules/generic.js +0 -3
- package/packages/tools/dist/compression/rules/git.d.ts +0 -11
- package/packages/tools/dist/compression/rules/git.js +0 -3
- package/packages/tools/dist/compression/rules/index.d.ts +0 -14
- package/packages/tools/dist/compression/rules/index.js +0 -1
- package/packages/tools/dist/compression/rules/kubectl.d.ts +0 -11
- package/packages/tools/dist/compression/rules/kubectl.js +0 -3
- package/packages/tools/dist/compression/rules/lint.d.ts +0 -11
- package/packages/tools/dist/compression/rules/lint.js +0 -3
- package/packages/tools/dist/compression/rules/npm.d.ts +0 -11
- package/packages/tools/dist/compression/rules/npm.js +0 -3
- package/packages/tools/dist/compression/rules/test-runner.d.ts +0 -11
- package/packages/tools/dist/compression/rules/test-runner.js +0 -3
- package/packages/tools/dist/compression/scoring.d.ts +0 -26
- package/packages/tools/dist/compression/scoring.js +0 -1
- package/packages/tools/dist/compression/types.d.ts +0 -61
- package/packages/tools/dist/compression/types.js +0 -1
- package/packages/tools/dist/config-extractor.d.ts +0 -9
- package/packages/tools/dist/config-extractor.js +0 -7
- package/packages/tools/dist/data-transform.d.ts +0 -12
- package/packages/tools/dist/data-transform.js +0 -1
- package/packages/tools/dist/dead-symbols.d.ts +0 -28
- package/packages/tools/dist/dead-symbols.js +0 -2
- package/packages/tools/dist/delegate.d.ts +0 -36
- package/packages/tools/dist/delegate.js +0 -1
- package/packages/tools/dist/diagram-builder.d.ts +0 -9
- package/packages/tools/dist/diagram-builder.js +0 -9
- package/packages/tools/dist/diff-parse.d.ts +0 -28
- package/packages/tools/dist/diff-parse.js +0 -3
- package/packages/tools/dist/digest.d.ts +0 -55
- package/packages/tools/dist/digest.js +0 -6
- package/packages/tools/dist/dogfood-log.d.ts +0 -49
- package/packages/tools/dist/dogfood-log.js +0 -2
- package/packages/tools/dist/encode.d.ts +0 -16
- package/packages/tools/dist/encode.js +0 -1
- package/packages/tools/dist/env-info.d.ts +0 -30
- package/packages/tools/dist/env-info.js +0 -1
- package/packages/tools/dist/eval.d.ts +0 -15
- package/packages/tools/dist/eval.js +0 -2
- package/packages/tools/dist/evidence-map.d.ts +0 -92
- package/packages/tools/dist/evidence-map.js +0 -2
- package/packages/tools/dist/file-cache.d.ts +0 -41
- package/packages/tools/dist/file-cache.js +0 -3
- package/packages/tools/dist/file-summary.d.ts +0 -52
- package/packages/tools/dist/file-summary.js +0 -2
- package/packages/tools/dist/file-walk.d.ts +0 -6
- package/packages/tools/dist/file-walk.js +0 -1
- package/packages/tools/dist/find-examples.d.ts +0 -29
- package/packages/tools/dist/find-examples.js +0 -3
- package/packages/tools/dist/find.d.ts +0 -49
- package/packages/tools/dist/find.js +0 -1
- package/packages/tools/dist/forge-classify.d.ts +0 -44
- package/packages/tools/dist/forge-classify.js +0 -2
- package/packages/tools/dist/forge-ground.d.ts +0 -61
- package/packages/tools/dist/forge-ground.js +0 -1
- package/packages/tools/dist/git-context.d.ts +0 -25
- package/packages/tools/dist/git-context.js +0 -3
- package/packages/tools/dist/graph-query.d.ts +0 -98
- package/packages/tools/dist/graph-query.js +0 -1
- package/packages/tools/dist/guide.d.ts +0 -25
- package/packages/tools/dist/guide.js +0 -1
- package/packages/tools/dist/health.d.ts +0 -16
- package/packages/tools/dist/health.js +0 -2
- package/packages/tools/dist/http-request.d.ts +0 -25
- package/packages/tools/dist/http-request.js +0 -1
- package/packages/tools/dist/lane.d.ts +0 -41
- package/packages/tools/dist/lane.js +0 -6
- package/packages/tools/dist/measure.d.ts +0 -42
- package/packages/tools/dist/measure.js +0 -2
- package/packages/tools/dist/onboard-utils.d.ts +0 -12
- package/packages/tools/dist/onboard-utils.js +0 -1
- package/packages/tools/dist/onboard.d.ts +0 -50
- package/packages/tools/dist/onboard.js +0 -18
- package/packages/tools/dist/parse-output.d.ts +0 -84
- package/packages/tools/dist/parse-output.js +0 -2
- package/packages/tools/dist/path-resolver.d.ts +0 -14
- package/packages/tools/dist/path-resolver.js +0 -1
- package/packages/tools/dist/process-manager.d.ts +0 -20
- package/packages/tools/dist/process-manager.js +0 -1
- package/packages/tools/dist/queue.d.ts +0 -40
- package/packages/tools/dist/queue.js +0 -1
- package/packages/tools/dist/regex-test.d.ts +0 -33
- package/packages/tools/dist/regex-test.js +0 -1
- package/packages/tools/dist/regex-utils.d.ts +0 -8
- package/packages/tools/dist/regex-utils.js +0 -1
- package/packages/tools/dist/rename.d.ts +0 -31
- package/packages/tools/dist/rename.js +0 -2
- package/packages/tools/dist/replay.d.ts +0 -59
- package/packages/tools/dist/replay.js +0 -4
- package/packages/tools/dist/response-envelope.d.ts +0 -43
- package/packages/tools/dist/response-envelope.js +0 -1
- package/packages/tools/dist/restore-points.d.ts +0 -22
- package/packages/tools/dist/restore-points.js +0 -1
- package/packages/tools/dist/schema-validate.d.ts +0 -25
- package/packages/tools/dist/schema-validate.js +0 -1
- package/packages/tools/dist/scope-map.d.ts +0 -51
- package/packages/tools/dist/scope-map.js +0 -1
- package/packages/tools/dist/snippet.d.ts +0 -35
- package/packages/tools/dist/snippet.js +0 -1
- package/packages/tools/dist/stash.d.ts +0 -14
- package/packages/tools/dist/stash.js +0 -1
- package/packages/tools/dist/stratum-card.d.ts +0 -30
- package/packages/tools/dist/stratum-card.js +0 -4
- package/packages/tools/dist/symbol.d.ts +0 -45
- package/packages/tools/dist/symbol.js +0 -3
- package/packages/tools/dist/synthesis-engine.d.ts +0 -13
- package/packages/tools/dist/synthesis-engine.js +0 -6
- package/packages/tools/dist/test-run.d.ts +0 -28
- package/packages/tools/dist/test-run.js +0 -2
- package/packages/tools/dist/text-utils.d.ts +0 -24
- package/packages/tools/dist/text-utils.js +0 -2
- package/packages/tools/dist/time-utils.d.ts +0 -20
- package/packages/tools/dist/time-utils.js +0 -1
- package/packages/tools/dist/trace.d.ts +0 -43
- package/packages/tools/dist/trace.js +0 -2
- package/packages/tools/dist/truncation.d.ts +0 -66
- package/packages/tools/dist/truncation.js +0 -11
- package/packages/tools/dist/watch.d.ts +0 -32
- package/packages/tools/dist/watch.js +0 -1
- package/packages/tools/dist/web-fetch.d.ts +0 -47
- package/packages/tools/dist/web-fetch.js +0 -8
- package/packages/tools/dist/web-search.d.ts +0 -25
- package/packages/tools/dist/web-search.js +0 -1
- package/packages/tools/dist/workset.d.ts +0 -47
- package/packages/tools/dist/workset.js +0 -1
- package/scaffold/__tests__/copilot-inline-shared-protocols.test.mjs +0 -39
- /package/packages/server/dist/{config.js → config-C5IU9Lau.js} +0 -0
- /package/packages/server/dist/{dashboard-static.js → dashboard-static-BfIe0Si1.js} +0 -0
- /package/packages/server/dist/{version-check.js → version-check-D4j0Pykd.js} +0 -0
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
//#region packages/server/src/tools/present-charts.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Present Charts — Pure SVG chart rendering engine.
|
|
4
|
-
*
|
|
5
|
-
* Supports: line, area, bar, horizontal-bar, pie, donut, sparkline, heatmap.
|
|
6
|
-
* Uses CSS custom properties (--chart-1 … --chart-12) from present-theme.ts.
|
|
7
|
-
* Zero external dependencies.
|
|
8
|
-
*/
|
|
9
|
-
interface ChartBlock {
|
|
10
|
-
type: 'chart';
|
|
11
|
-
title?: string;
|
|
12
|
-
value: ChartValue;
|
|
13
|
-
}
|
|
14
|
-
interface ChartValue {
|
|
15
|
-
chartType: 'line' | 'area' | 'bar' | 'horizontal-bar' | 'pie' | 'donut' | 'sparkline' | 'heatmap';
|
|
16
|
-
data: Record<string, unknown>[];
|
|
17
|
-
xKey: string;
|
|
18
|
-
yKeys: string[];
|
|
19
|
-
title?: string;
|
|
20
|
-
height?: number;
|
|
21
|
-
showLegend?: boolean;
|
|
22
|
-
showGrid?: boolean;
|
|
23
|
-
config?: Record<string, unknown>;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Render a chart block as an HTML string containing an inline SVG.
|
|
27
|
-
* Returns a wrapping `<div class="chart-container">` with optional title and legend.
|
|
28
|
-
*/
|
|
29
|
-
declare function renderChartAsHtml(block: ChartBlock): string;
|
|
30
|
-
//#endregion
|
|
31
|
-
export { ChartBlock, ChartValue, renderChartAsHtml };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import{escHtml as e}from"./present-utils.js";const t=e;function n(e){return Math.abs(e)>=1e6?`${(e/1e6).toFixed(1).replace(/\.0$/,``)}M`:Math.abs(e)>=1e3?`${(e/1e3).toFixed(1).replace(/\.0$/,``)}k`:Number.isInteger(e)?String(e):e.toFixed(1)}function r(e){return`var(--chart-${e%12+1})`}let i=0;function a(e){let n=e.value;if(!n?.data?.length||!n.chartType)return`<pre>${t(JSON.stringify(e.value,null,2))}</pre>`;i++;let r=e.title||n.title?`<div class="chart-title">${t(String(e.title||n.title))}</div>`:``,a;switch(n.chartType){case`line`:a=m(n,!1);break;case`area`:a=m(n,!0);break;case`bar`:a=h(n,!1);break;case`horizontal-bar`:a=h(n,!0);break;case`pie`:a=g(n,!1);break;case`donut`:a=g(n,!0);break;case`sparkline`:a=_(n);break;case`heatmap`:a=v(n);break;default:a=`<pre>${t(JSON.stringify(n,null,2))}</pre>`}let s=n.showLegend!==!1&&n.yKeys.length>1&&n.chartType!==`sparkline`?o(n.yKeys):``;return`<div class="chart-container">${r}${a}${s}</div>`}function o(e){return`<div class="chart-legend">${e.map((e,n)=>`<span class="chart-legend-item"><span class="chart-legend-swatch" style="background:${r(n)}"></span>${t(e)}</span>`).join(``)}</div>`}const s={top:20,right:20,bottom:35,left:55};function c(e,t){return e.map(e=>Number(e[t])||0)}function l(e,t){return e.map(e=>String(e[t]??``))}function u(e){let t=1/0,n=-1/0;for(let r of e)r<t&&(t=r),r>n&&(n=r);return t===n&&(t=t===0?0:t*.9,n=n===0?1:n*1.1),[t,n]}function d(e){return e>=0?0:e}function f(e,t,r,i=5){let a=[];for(let o=0;o<=i;o++){let c=o/i,l=s.top+r-c*r,u=e+c*(t-e);a.push(`<line class="chart-grid-line" x1="${s.left}" x2="${600-s.right}" y1="${l}" y2="${l}"/>`),a.push(`<text class="chart-axis-label" x="${s.left-8}" y="${l+4}" text-anchor="end">${n(u)}</text>`)}return a.join(``)}function p(e,n,r,i){let a=Math.floor(n/50),o=Math.max(1,Math.ceil(e.length/a));return e.map((e,n)=>n%o===0?`<text class="chart-axis-label" x="${s.left+n*i+i/2}" y="${s.top+r+18}" text-anchor="middle">${t(e.length>10?`${e.slice(0,9)}…`:e)}</text>`:``).join(``)}function m(e,t){let n=(e.height??300)-s.top-s.bottom,a=600-s.left-s.right,o=l(e.data,e.xKey),m=e.data.length;if(m===0)return``;let h=a/Math.max(m-1,1),g=1/0,_=-1/0;for(let t of e.yKeys){let[n,r]=u(c(e.data,t));n<g&&(g=n),r>_&&(_=r)}g=d(g);let v=_-g||1,y=e=>s.top+n-(e-g)/v*n,b=e=>s.left+e*h,x=``,S=[];for(let a=0;a<e.yKeys.length;a++){let o=c(e.data,e.yKeys[a]),l=r(a),u=`M${o.map((e,t)=>`${b(t).toFixed(1)},${y(e).toFixed(1)}`).join(`L`)}`;if(t){let e=`ag${i}_${a}`;x+=`<linearGradient id="${e}" x1="0" y1="0" x2="0" y2="1">
|
|
2
|
-
<stop offset="0%" stop-color="${l}" stop-opacity="0.3"/>
|
|
3
|
-
<stop offset="100%" stop-color="${l}" stop-opacity="0"/>
|
|
4
|
-
</linearGradient>`;let t=`${u}L${b(m-1).toFixed(1)},${(s.top+n).toFixed(1)}L${b(0).toFixed(1)},${(s.top+n).toFixed(1)}Z`;S.push(`<path d="${t}" fill="url(#${e})" stroke="none"/>`)}S.push(`<path d="${u}" fill="none" stroke="${l}" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"/>`);for(let e=0;e<o.length;e++)S.push(`<circle cx="${b(e).toFixed(1)}" cy="${y(o[e]).toFixed(1)}" r="3" fill="${l}" stroke="var(--card)" stroke-width="1.5"/>`)}let C=e.height??300,w=e.showGrid===!1?``:f(g,_,n),T=p(o,a,n,m>1?h:a);return`<svg class="chart-svg" viewBox="0 0 600 ${C}" preserveAspectRatio="xMidYMid meet">
|
|
5
|
-
${x?`<defs>${x}</defs>`:``}
|
|
6
|
-
${w}${T}${S.join(``)}
|
|
7
|
-
</svg>`}function h(e,i){let a=(e.height??300)-s.top-s.bottom,o=600-s.left-s.right,u=l(e.data,e.xKey),d=e.data.length;if(d===0)return``;let m=e.yKeys.length,h=0;for(let t of e.yKeys)for(let n of c(e.data,t))n>h&&(h=n);h===0&&(h=1);let g=e.height??300,_=[];if(i){let i=Math.min(24,(a-(d-1)*4)/(d*m)),c=i*m+4,l=e.showGrid===!1?``:f(0,h,a),p=u.map((e,n)=>{let r=s.top+n*c+c/2,i=e.length>15?`${e.slice(0,14)}…`:e;return`<text class="chart-axis-label" x="${s.left-8}" y="${r+4}" text-anchor="end">${t(i)}</text>`}).join(``);for(let a=0;a<d;a++)for(let l=0;l<m;l++){let u=Number(e.data[a][e.yKeys[l]])||0,d=u/h*o,f=s.top+a*c+l*i;_.push(`<rect x="${s.left}" y="${f}" width="${d.toFixed(1)}" height="${i-2}" rx="3" fill="${r(l)}" opacity="0.85">
|
|
8
|
-
<title>${t(e.yKeys[l])}: ${n(u)}</title>
|
|
9
|
-
</rect>`)}return`<svg class="chart-svg" viewBox="0 0 600 ${Math.max(g,d*c+s.top+s.bottom)}" preserveAspectRatio="xMidYMid meet">
|
|
10
|
-
${l}${p}${_.join(``)}
|
|
11
|
-
</svg>`}else{let i=o/d,c=Math.min(40,(i-8)/m),l=e.showGrid===!1?``:f(0,h,a),v=p(u,o,a,i);for(let o=0;o<d;o++)for(let l=0;l<m;l++){let u=Number(e.data[o][e.yKeys[l]])||0,d=u/h*a,f=s.left+o*i+(i-c*m)/2+l*c,p=s.top+a-d;_.push(`<rect x="${f.toFixed(1)}" y="${p.toFixed(1)}" width="${(c-2).toFixed(1)}" height="${d.toFixed(1)}" rx="3" fill="${r(l)}" opacity="0.85">
|
|
12
|
-
<title>${t(e.yKeys[l])}: ${n(u)}</title>
|
|
13
|
-
</rect>`)}return`<svg class="chart-svg" viewBox="0 0 600 ${g}" preserveAspectRatio="xMidYMid meet">
|
|
14
|
-
${l}${v}${_.join(``)}
|
|
15
|
-
</svg>`}}function g(e,i){let a=e.height??300,s=a/2,c=a/2,u=a/2-10,d=i?u*.55:0,f=e.yKeys[0]||`value`,p=e.data.map(e=>Math.max(0,Number(e[f])||0)),m=l(e.data,e.xKey),h=p.reduce((e,t)=>e+t,0);if(h===0)return`<div style="color:var(--muted-foreground);text-align:center;padding:20px">No data</div>`;let g=[],_=-Math.PI/2;for(let e=0;e<p.length;e++){let i=p[e]/h;if(i===0)continue;let a=i*Math.PI*2,o=_,l=_+a,f=s+u*Math.cos(o),v=c+u*Math.sin(o),y=s+u*Math.cos(l),b=c+u*Math.sin(l),x=+(a>Math.PI),S;if(d>0){let e=s+d*Math.cos(o),t=c+d*Math.sin(o),n=s+d*Math.cos(l),r=c+d*Math.sin(l);S=`M${f.toFixed(2)},${v.toFixed(2)} A${u},${u} 0 ${x},1 ${y.toFixed(2)},${b.toFixed(2)} L${n.toFixed(2)},${r.toFixed(2)} A${d},${d} 0 ${x},0 ${e.toFixed(2)},${t.toFixed(2)}Z`}else S=`M${s},${c} L${f.toFixed(2)},${v.toFixed(2)} A${u},${u} 0 ${x},1 ${y.toFixed(2)},${b.toFixed(2)}Z`;g.push(`<path d="${S}" fill="${r(e)}" stroke="var(--background)" stroke-width="2" opacity="0.9">
|
|
16
|
-
<title>${t(m[e]||`Item ${e+1}`)}: ${n(p[e])} (${(i*100).toFixed(1)}%)</title>
|
|
17
|
-
</path>`),_=l}let v=i?`<text x="${s}" y="${c-6}" text-anchor="middle" fill="var(--foreground)" font-size="18" font-weight="700">${n(h)}</text>
|
|
18
|
-
<text x="${s}" y="${c+12}" text-anchor="middle" fill="var(--muted-foreground)" font-size="11">Total</text>`:``,y=o(m.filter((e,t)=>p[t]>0));return`<svg class="chart-svg" viewBox="0 0 ${a} ${a}" preserveAspectRatio="xMidYMid meet">
|
|
19
|
-
${g.join(``)}${v}
|
|
20
|
-
</svg>${y}`}function _(e){let t=e.height??40,n=e.yKeys[0]||`value`,a=c(e.data,n),o=a.length;if(o===0)return``;let[s,l]=u(a),d=l-s||1,f=200/Math.max(o-1,1),p=a.map((e,n)=>`${(n*f).toFixed(1)},${(t-4-(e-s)/d*(t-8)).toFixed(1)}`),m=`spk${i}`,h=r(0);return`<svg class="chart-svg" viewBox="0 0 200 ${t}" preserveAspectRatio="xMidYMid meet" style="max-width:200px;height:${t}px">
|
|
21
|
-
<defs>
|
|
22
|
-
<linearGradient id="${m}" x1="0" y1="0" x2="0" y2="1">
|
|
23
|
-
<stop offset="0%" stop-color="${h}" stop-opacity="0.2"/>
|
|
24
|
-
<stop offset="100%" stop-color="${h}" stop-opacity="0"/>
|
|
25
|
-
</linearGradient>
|
|
26
|
-
</defs>
|
|
27
|
-
<path d="M${p.join(`L`)}L${((o-1)*f).toFixed(1)},${t}L0,${t}Z" fill="url(#${m})" stroke="none"/>
|
|
28
|
-
<polyline points="${p.join(` `)}" fill="none" stroke="${h}" stroke-width="1.5" stroke-linejoin="round"/>
|
|
29
|
-
<circle cx="${((o-1)*f).toFixed(1)}" cy="${p[o-1].split(`,`)[1]}" r="2.5" fill="${h}"/>
|
|
30
|
-
</svg>`}function v(e){let r=l(e.data,e.xKey),i=e.data.length,a=e.yKeys.length;if(i===0||a===0)return``;let o=1/0,u=-1/0;for(let t of e.yKeys)for(let n of c(e.data,t))n<o&&(o=n),n>u&&(u=n);let d=u-o||1,f=Math.min(50,(600-s.left-s.right)/i),p=Math.min(30,200/a),m=s.left+i*f+s.right,h=s.top+a*p+s.bottom,g=[];for(let n=0;n<a;n++){let r=s.top+n*p+p/2+4,i=e.yKeys[n].length>8?`${e.yKeys[n].slice(0,7)}…`:e.yKeys[n];g.push(`<text class="chart-axis-label" x="${s.left-8}" y="${r}" text-anchor="end">${t(i)}</text>`)}let _=Math.floor((m-s.left)/40),v=Math.max(1,Math.ceil(i/_));for(let e=0;e<i;e++){if(e%v!==0)continue;let n=s.left+e*f+f/2,i=r[e].length>6?`${r[e].slice(0,5)}…`:r[e];g.push(`<text class="chart-axis-label" x="${n}" y="${h-8}" text-anchor="middle">${t(i)}</text>`)}for(let c=0;c<i;c++)for(let i=0;i<a;i++){let a=Number(e.data[c][e.yKeys[i]])||0,l=(a-o)/d,u=s.left+c*f,m=s.top+i*p;g.push(`<rect x="${u}" y="${m}" width="${f-1}" height="${p-1}" rx="2" fill="var(--primary)" opacity="${(.1+l*.8).toFixed(2)}">
|
|
31
|
-
<title>${t(r[c])} / ${t(e.yKeys[i])}: ${n(a)}</title>
|
|
32
|
-
</rect>`)}return`<svg class="chart-svg" viewBox="0 0 ${m} ${h}" preserveAspectRatio="xMidYMid meet">
|
|
33
|
-
${g.join(``)}
|
|
34
|
-
</svg>`}export{a as renderChartAsHtml};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region packages/server/src/tools/present-theme.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Present Design System — CSS tokens and component styles.
|
|
4
|
-
*
|
|
5
|
-
* Based on notification-dashboard design tokens.
|
|
6
|
-
* Dark mode by default, professional clean aesthetic.
|
|
7
|
-
* Font: Plus Jakarta Sans via Google Fonts CDN.
|
|
8
|
-
*/
|
|
9
|
-
/** Google Fonts <link> tag to inject into <head>. */
|
|
10
|
-
declare const FONT_LINK = "<link href=\"https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap\" rel=\"stylesheet\">";
|
|
11
|
-
/** Returns the full design system CSS string for browser-mode HTML pages. */
|
|
12
|
-
declare function getDesignSystemCSS(): string;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { FONT_LINK, getDesignSystemCSS };
|
|
@@ -1,396 +0,0 @@
|
|
|
1
|
-
const e=`<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">`;function t(){return`
|
|
2
|
-
/* ── Reset ────────────────────────────────────────────────────────── */
|
|
3
|
-
*{box-sizing:border-box;margin:0;padding:0}
|
|
4
|
-
|
|
5
|
-
/* ── Design Tokens ────────────────────────────────────────────────── */
|
|
6
|
-
:root{
|
|
7
|
-
/* Background hierarchy */
|
|
8
|
-
--background:#0f1419;
|
|
9
|
-
--background-subtle:#141b24;
|
|
10
|
-
--foreground:#e2e8f0;
|
|
11
|
-
--card:#1a2332;
|
|
12
|
-
--card-foreground:#e2e8f0;
|
|
13
|
-
|
|
14
|
-
/* Semantic colors */
|
|
15
|
-
--primary:#818cf8;
|
|
16
|
-
--primary-glow:rgba(129,140,248,.15);
|
|
17
|
-
--primary-foreground:#1e1b4b;
|
|
18
|
-
--secondary:#2a3549;
|
|
19
|
-
--secondary-foreground:#e2e8f0;
|
|
20
|
-
--muted:#2a3549;
|
|
21
|
-
--muted-foreground:#94a3b8;
|
|
22
|
-
--accent:#1e293b;
|
|
23
|
-
--accent-foreground:#a5b4fc;
|
|
24
|
-
--destructive:#f87171;
|
|
25
|
-
--border:rgba(148,163,184,.12);
|
|
26
|
-
--border-subtle:rgba(148,163,184,.06);
|
|
27
|
-
--input:#384766;
|
|
28
|
-
--ring:#6366f1;
|
|
29
|
-
|
|
30
|
-
/* Status colors */
|
|
31
|
-
--success:#10b981;
|
|
32
|
-
--success-light:#34d399;
|
|
33
|
-
--warning:#f59e0b;
|
|
34
|
-
--warning-light:#fbbf24;
|
|
35
|
-
--error:#ef4444;
|
|
36
|
-
--error-light:#f87171;
|
|
37
|
-
--info:#0ea5e9;
|
|
38
|
-
--info-light:#38bdf8;
|
|
39
|
-
|
|
40
|
-
/* Chart palette */
|
|
41
|
-
--chart-1:#818cf8;
|
|
42
|
-
--chart-2:#38bdf8;
|
|
43
|
-
--chart-3:#34d399;
|
|
44
|
-
--chart-4:#fbbf24;
|
|
45
|
-
--chart-5:#f87171;
|
|
46
|
-
--chart-6:#a78bfa;
|
|
47
|
-
--chart-7:#f472b6;
|
|
48
|
-
--chart-8:#2dd4bf;
|
|
49
|
-
--chart-9:#fb923c;
|
|
50
|
-
--chart-10:#22d3ee;
|
|
51
|
-
--chart-11:#c084fc;
|
|
52
|
-
--chart-12:#a3e635;
|
|
53
|
-
--chart-others:#a8a29e;
|
|
54
|
-
--chart-gradient-start:0.3;
|
|
55
|
-
--chart-gradient-end:0;
|
|
56
|
-
|
|
57
|
-
/* Layout */
|
|
58
|
-
--radius:0.625rem;
|
|
59
|
-
--shadow:0 4px 24px rgba(0,0,0,.25);
|
|
60
|
-
--shadow-sm:0 1px 3px rgba(0,0,0,.2);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* ── Base ─────────────────────────────────────────────────────────── */
|
|
64
|
-
body{
|
|
65
|
-
font-family:'Plus Jakarta Sans',ui-sans-serif,system-ui,-apple-system,sans-serif;
|
|
66
|
-
background:var(--background);color:var(--foreground);
|
|
67
|
-
min-height:100vh;padding:0;line-height:1.6;font-size:14px;
|
|
68
|
-
-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
|
|
69
|
-
background-image:radial-gradient(ellipse 80% 50% at 50% -20%,rgba(129,140,248,.08),transparent);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/* ── Animations ───────────────────────────────────────────────────── */
|
|
73
|
-
@keyframes fadeInUp{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
|
|
74
|
-
@keyframes shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}
|
|
75
|
-
|
|
76
|
-
/* ── Layout ───────────────────────────────────────────────────────── */
|
|
77
|
-
.dashboard{max-width:1200px;margin:0 auto;padding:40px 28px}
|
|
78
|
-
|
|
79
|
-
/* ── Header ───────────────────────────────────────────────────────── */
|
|
80
|
-
.header{
|
|
81
|
-
padding:28px 0;margin-bottom:32px;
|
|
82
|
-
border-bottom:1px solid var(--border);
|
|
83
|
-
position:relative;
|
|
84
|
-
}
|
|
85
|
-
.header::after{
|
|
86
|
-
content:'';position:absolute;bottom:-1px;left:0;width:120px;height:2px;
|
|
87
|
-
background:linear-gradient(90deg,var(--primary),transparent);
|
|
88
|
-
}
|
|
89
|
-
.header h1{
|
|
90
|
-
font-size:1.75em;font-weight:700;color:var(--foreground);
|
|
91
|
-
letter-spacing:-0.03em;line-height:1.2;
|
|
92
|
-
}
|
|
93
|
-
.header .subtitle{
|
|
94
|
-
color:var(--muted-foreground);font-size:.88em;margin-top:6px;font-weight:400;
|
|
95
|
-
letter-spacing:.01em;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/* ── Section headings ─────────────────────────────────────────────── */
|
|
99
|
-
h2{
|
|
100
|
-
font-size:1.1em;margin:32px 0 16px;color:var(--foreground);font-weight:600;
|
|
101
|
-
display:flex;align-items:center;gap:10px;letter-spacing:-0.01em;
|
|
102
|
-
animation:fadeInUp .4s ease both;
|
|
103
|
-
}
|
|
104
|
-
h2::before{
|
|
105
|
-
content:'';width:3px;height:16px;background:linear-gradient(180deg,var(--primary),rgba(129,140,248,.3));border-radius:2px;flex-shrink:0;
|
|
106
|
-
}
|
|
107
|
-
h3{font-size:1em;margin:16px 0 8px;color:var(--foreground);font-weight:600}
|
|
108
|
-
|
|
109
|
-
/* ── Rendered markdown content ────────────────────────────────────── */
|
|
110
|
-
.md-content{line-height:1.7;margin:12px 0}
|
|
111
|
-
.md-content h1{font-size:1.4em;font-weight:700;margin:24px 0 12px;color:var(--foreground);letter-spacing:-0.02em}
|
|
112
|
-
.md-content h2{font-size:1.2em;margin:20px 0 10px;color:var(--foreground);display:block}
|
|
113
|
-
.md-content h2::before{display:none}
|
|
114
|
-
.md-content h3{font-size:1.05em;margin:16px 0 8px;color:var(--foreground)}
|
|
115
|
-
.md-content h4{font-size:.95em;margin:12px 0 6px;color:var(--foreground);font-weight:600}
|
|
116
|
-
.md-content p{margin:8px 0;color:var(--foreground)}
|
|
117
|
-
.md-content strong{color:var(--foreground);font-weight:600}
|
|
118
|
-
.md-content em{color:var(--muted-foreground);font-style:italic}
|
|
119
|
-
.md-content a{color:var(--primary);text-decoration:underline;text-underline-offset:2px}
|
|
120
|
-
.md-content a:hover{color:var(--accent-foreground)}
|
|
121
|
-
.md-content ul,.md-content ol{padding-left:24px;margin:8px 0}
|
|
122
|
-
.md-content li{margin:4px 0;color:var(--foreground)}
|
|
123
|
-
.md-content li::marker{color:var(--muted-foreground)}
|
|
124
|
-
.md-content blockquote{
|
|
125
|
-
border-left:3px solid var(--primary);padding:10px 16px;margin:12px 0;
|
|
126
|
-
color:var(--muted-foreground);background:var(--card);border-radius:0 var(--radius) var(--radius) 0;
|
|
127
|
-
}
|
|
128
|
-
.md-content pre{
|
|
129
|
-
background:var(--card);border:1px solid var(--border);border-radius:var(--radius);
|
|
130
|
-
padding:16px;overflow-x:auto;margin:12px 0;
|
|
131
|
-
}
|
|
132
|
-
.md-content code{font-family:'JetBrains Mono','Cascadia Code','Fira Code',monospace;font-size:.88em}
|
|
133
|
-
.md-content :not(pre)>code{background:var(--accent);padding:2px 6px;border-radius:4px;font-size:.85em;color:var(--accent-foreground)}
|
|
134
|
-
.md-content table{width:100%;border-collapse:collapse;margin:12px 0;font-size:13px}
|
|
135
|
-
.md-content .table-wrap{margin:12px 0}.md-content .table-wrap table{margin:0}
|
|
136
|
-
.md-content th{
|
|
137
|
-
background:var(--accent);padding:10px 14px;text-align:left;font-weight:600;
|
|
138
|
-
color:var(--muted-foreground);border-bottom:2px solid var(--border);font-size:.8em;
|
|
139
|
-
text-transform:uppercase;letter-spacing:.5px;
|
|
140
|
-
}
|
|
141
|
-
.md-content td{padding:8px 14px;border-bottom:1px solid var(--border);color:var(--foreground)}
|
|
142
|
-
.md-content tr:hover td{background:rgba(129,140,248,.04)}
|
|
143
|
-
.md-content hr{border:none;border-top:1px solid var(--border);margin:24px 0}
|
|
144
|
-
.md-content img{max-width:100%;border-radius:var(--radius)}
|
|
145
|
-
|
|
146
|
-
/* ── Metrics grid ─────────────────────────────────────────────────── */
|
|
147
|
-
.metric-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;margin:14px 0 28px}
|
|
148
|
-
.metric{
|
|
149
|
-
background:linear-gradient(135deg,var(--card),var(--accent));
|
|
150
|
-
border:1px solid var(--border);border-radius:var(--radius);
|
|
151
|
-
padding:22px 18px;text-align:center;transition:all .2s ease;position:relative;overflow:hidden;
|
|
152
|
-
animation:fadeInUp .4s ease both;
|
|
153
|
-
}
|
|
154
|
-
.metric::before{
|
|
155
|
-
content:'';position:absolute;top:0;left:0;right:0;height:2px;
|
|
156
|
-
background:linear-gradient(90deg,transparent,var(--primary),transparent);opacity:0;
|
|
157
|
-
transition:opacity .2s ease;
|
|
158
|
-
}
|
|
159
|
-
.metric:hover{border-color:rgba(129,140,248,.3);transform:translateY(-2px);box-shadow:0 8px 32px rgba(0,0,0,.2)}
|
|
160
|
-
.metric:hover::before{opacity:1}
|
|
161
|
-
.metric-value{
|
|
162
|
-
font-size:1.8em;font-weight:700;color:var(--primary);
|
|
163
|
-
font-variant-numeric:tabular-nums;letter-spacing:-0.02em;
|
|
164
|
-
}
|
|
165
|
-
.metric-label{
|
|
166
|
-
font-size:.75em;color:var(--muted-foreground);margin-top:6px;
|
|
167
|
-
text-transform:uppercase;letter-spacing:.6px;font-weight:500;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/* ── Cards grid ───────────────────────────────────────────────────── */
|
|
171
|
-
.card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;margin:14px 0 28px}
|
|
172
|
-
.card{
|
|
173
|
-
background:var(--card);border:1px solid var(--border);border-radius:var(--radius);
|
|
174
|
-
padding:20px;transition:all .2s ease;position:relative;overflow:hidden;
|
|
175
|
-
animation:fadeInUp .4s ease both;
|
|
176
|
-
}
|
|
177
|
-
.card::after{
|
|
178
|
-
content:'';position:absolute;top:0;left:0;width:3px;height:0;
|
|
179
|
-
background:var(--primary);transition:height .2s ease;border-radius:0 0 2px 0;
|
|
180
|
-
}
|
|
181
|
-
.card:hover{border-color:rgba(129,140,248,.2);box-shadow:0 4px 20px rgba(0,0,0,.15);transform:translateY(-1px)}
|
|
182
|
-
.card:hover::after{height:100%}
|
|
183
|
-
.card-title{font-weight:600;font-size:.98em;margin-bottom:8px;color:var(--foreground)}
|
|
184
|
-
.card-body{color:var(--muted-foreground);font-size:.88em;line-height:1.55}
|
|
185
|
-
.badge{
|
|
186
|
-
display:inline-flex;align-items:center;padding:3px 10px;border-radius:20px;
|
|
187
|
-
font-size:.75em;font-weight:600;margin-top:10px;
|
|
188
|
-
background:rgba(129,140,248,.1);color:var(--primary);border:1px solid rgba(129,140,248,.15);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/* ── Table ─────────────────────────────────────────────────────────── */
|
|
192
|
-
.table-wrap{
|
|
193
|
-
overflow-x:auto;margin:14px 0 28px;border-radius:var(--radius);border:1px solid var(--border);
|
|
194
|
-
background:var(--card);animation:fadeInUp .4s ease both;
|
|
195
|
-
}
|
|
196
|
-
table{width:100%;border-collapse:collapse;font-size:13px}
|
|
197
|
-
thead{position:sticky;top:0;z-index:1}
|
|
198
|
-
th{
|
|
199
|
-
background:var(--accent);padding:12px 16px;text-align:left;font-weight:600;
|
|
200
|
-
color:var(--muted-foreground);text-transform:uppercase;letter-spacing:.5px;font-size:.72em;
|
|
201
|
-
border-bottom:1px solid var(--border);cursor:pointer;user-select:none;white-space:nowrap;
|
|
202
|
-
transition:color .15s;
|
|
203
|
-
}
|
|
204
|
-
th:hover{color:var(--primary)}
|
|
205
|
-
td{padding:10px 16px;border-bottom:1px solid var(--border-subtle);color:var(--foreground)}
|
|
206
|
-
tr:hover td{background:rgba(129,140,248,.04)}
|
|
207
|
-
.tool-name{font-family:'JetBrains Mono','Cascadia Code',monospace;font-size:.85em;color:var(--primary);font-weight:500}
|
|
208
|
-
.category-tag{
|
|
209
|
-
display:inline-flex;padding:2px 8px;border-radius:6px;font-size:.8em;font-weight:500;
|
|
210
|
-
background:var(--accent);color:var(--muted-foreground);border:1px solid var(--border);white-space:nowrap;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/* ── Code blocks ──────────────────────────────────────────────────── */
|
|
214
|
-
pre{
|
|
215
|
-
background:var(--card);border:1px solid var(--border);border-radius:var(--radius);
|
|
216
|
-
padding:16px;overflow-x:auto;font-size:13px;margin:12px 0;
|
|
217
|
-
}
|
|
218
|
-
code{font-family:'JetBrains Mono','Cascadia Code','Fira Code',monospace;font-size:.9em}
|
|
219
|
-
blockquote{
|
|
220
|
-
border-left:3px solid var(--primary);padding:10px 16px;color:var(--muted-foreground);
|
|
221
|
-
margin:12px 0;background:var(--card);border-radius:0 var(--radius) var(--radius) 0;
|
|
222
|
-
}
|
|
223
|
-
ul,ol{padding-left:24px;margin:8px 0}
|
|
224
|
-
li{margin:4px 0}
|
|
225
|
-
.tree-node{padding:3px 0}
|
|
226
|
-
.tree-key{font-weight:600;color:var(--primary)}
|
|
227
|
-
.tree-children{margin-left:20px;border-left:2px solid var(--border);padding-left:12px}
|
|
228
|
-
|
|
229
|
-
/* ── Mermaid ──────────────────────────────────────────────────────── */
|
|
230
|
-
.mermaid{background:transparent !important;border:none !important}
|
|
231
|
-
|
|
232
|
-
/* ── Charts ───────────────────────────────────────────────────────── */
|
|
233
|
-
.chart-container{
|
|
234
|
-
background:var(--card);border:1px solid var(--border);border-radius:var(--radius);
|
|
235
|
-
padding:24px;margin:14px 0 28px;overflow:hidden;animation:fadeInUp .4s ease both;
|
|
236
|
-
}
|
|
237
|
-
.chart-title{font-size:.95em;font-weight:600;color:var(--foreground);margin-bottom:14px}
|
|
238
|
-
.chart-svg{width:100%;display:block}
|
|
239
|
-
.chart-legend{
|
|
240
|
-
display:flex;flex-wrap:wrap;gap:14px;margin-top:14px;padding-top:12px;
|
|
241
|
-
border-top:1px solid var(--border);
|
|
242
|
-
}
|
|
243
|
-
.chart-legend-item{display:flex;align-items:center;gap:6px;font-size:.8em;color:var(--muted-foreground)}
|
|
244
|
-
.chart-legend-swatch{width:10px;height:10px;border-radius:2px;flex-shrink:0}
|
|
245
|
-
.chart-tooltip{
|
|
246
|
-
position:absolute;background:var(--card);border:1px solid var(--border);
|
|
247
|
-
border-radius:6px;padding:8px 12px;font-size:.8em;pointer-events:none;
|
|
248
|
-
box-shadow:var(--shadow);z-index:10;display:none;color:var(--foreground);
|
|
249
|
-
}
|
|
250
|
-
.chart-axis-label{font-size:.7em;fill:var(--muted-foreground);font-family:inherit}
|
|
251
|
-
.chart-grid-line{stroke:var(--border);stroke-dasharray:3,3;stroke-width:0.5}
|
|
252
|
-
|
|
253
|
-
/* ── Timeline ─────────────────────────────────────────────────────── */
|
|
254
|
-
.timeline{margin:14px 0 28px;padding-left:28px;border-left:2px solid var(--border);position:relative;animation:fadeInUp .4s ease both}
|
|
255
|
-
.timeline-item{position:relative;padding:0 0 28px 22px}
|
|
256
|
-
.timeline-item:last-child{padding-bottom:0}
|
|
257
|
-
.timeline-dot{
|
|
258
|
-
position:absolute;left:-33px;top:4px;width:12px;height:12px;
|
|
259
|
-
border-radius:50%;border:2px solid var(--border);background:var(--background);
|
|
260
|
-
transition:all .2s ease;
|
|
261
|
-
}
|
|
262
|
-
.timeline-dot.done{background:var(--success);border-color:var(--success);box-shadow:0 0 8px rgba(16,185,129,.3)}
|
|
263
|
-
.timeline-dot.active{background:var(--primary);border-color:var(--primary);box-shadow:0 0 0 4px rgba(129,140,248,.15)}
|
|
264
|
-
.timeline-dot.pending{background:var(--muted);border-color:var(--muted-foreground)}
|
|
265
|
-
.timeline-dot.error{background:var(--error);border-color:var(--error);box-shadow:0 0 8px rgba(239,68,68,.3)}
|
|
266
|
-
.timeline-phase{font-size:.7em;color:var(--muted-foreground);text-transform:uppercase;letter-spacing:.5px;font-weight:600;margin-bottom:2px}
|
|
267
|
-
.timeline-title{font-weight:600;color:var(--foreground);font-size:.95em}
|
|
268
|
-
.timeline-desc{color:var(--muted-foreground);font-size:.85em;margin-top:4px;line-height:1.5}
|
|
269
|
-
|
|
270
|
-
/* ── Checklist ────────────────────────────────────────────────────── */
|
|
271
|
-
.checklist{margin:14px 0 28px}
|
|
272
|
-
.checklist-item{
|
|
273
|
-
display:flex;align-items:flex-start;gap:10px;padding:10px 14px;
|
|
274
|
-
border-radius:var(--radius);transition:background .1s;
|
|
275
|
-
}
|
|
276
|
-
.checklist-item:hover{background:var(--accent)}
|
|
277
|
-
.checklist-check{
|
|
278
|
-
width:18px;height:18px;border-radius:4px;border:2px solid var(--border);
|
|
279
|
-
flex-shrink:0;margin-top:1px;display:flex;align-items:center;justify-content:center;
|
|
280
|
-
font-size:11px;color:transparent;
|
|
281
|
-
}
|
|
282
|
-
.checklist-check.checked{background:var(--success);border-color:var(--success);color:#fff}
|
|
283
|
-
.checklist-label{color:var(--foreground);font-size:.9em;font-weight:500}
|
|
284
|
-
.checklist-item.checked .checklist-label{color:var(--muted-foreground);text-decoration:line-through}
|
|
285
|
-
.checklist-note{font-size:.8em;color:var(--muted-foreground);margin-top:2px}
|
|
286
|
-
|
|
287
|
-
/* ── Comparison grid ──────────────────────────────────────────────── */
|
|
288
|
-
.comparison-grid{
|
|
289
|
-
display:grid;gap:0;margin:14px 0 28px;border:1px solid var(--border);
|
|
290
|
-
border-radius:var(--radius);overflow:hidden;
|
|
291
|
-
}
|
|
292
|
-
.comparison-col{min-width:0}
|
|
293
|
-
.comparison-col:not(:last-child){border-right:1px solid var(--border)}
|
|
294
|
-
.comparison-header{
|
|
295
|
-
padding:14px 16px;font-weight:600;font-size:.9em;color:var(--foreground);
|
|
296
|
-
background:var(--accent);border-bottom:2px solid var(--border);text-align:center;
|
|
297
|
-
}
|
|
298
|
-
.comparison-item{
|
|
299
|
-
padding:10px 16px;border-bottom:1px solid var(--border);font-size:.88em;
|
|
300
|
-
color:var(--foreground);min-height:40px;display:flex;align-items:center;
|
|
301
|
-
}
|
|
302
|
-
.comparison-item:last-child{border-bottom:none}
|
|
303
|
-
|
|
304
|
-
/* ── Status board ─────────────────────────────────────────────────── */
|
|
305
|
-
.status-board{display:flex;flex-direction:column;gap:8px;margin:14px 0 28px}
|
|
306
|
-
.status-row{
|
|
307
|
-
display:flex;align-items:center;gap:12px;padding:10px 14px;
|
|
308
|
-
background:var(--card);border:1px solid var(--border);border-radius:var(--radius);
|
|
309
|
-
}
|
|
310
|
-
.status-indicator{width:8px;height:8px;border-radius:50%;flex-shrink:0}
|
|
311
|
-
.status-indicator.success{background:var(--success)}
|
|
312
|
-
.status-indicator.warning{background:var(--warning)}
|
|
313
|
-
.status-indicator.error{background:var(--error)}
|
|
314
|
-
.status-indicator.info{background:var(--info)}
|
|
315
|
-
.status-indicator.pending{background:var(--muted-foreground)}
|
|
316
|
-
.status-label{font-weight:500;font-size:.9em;color:var(--foreground);flex:1}
|
|
317
|
-
.status-detail{font-size:.8em;color:var(--muted-foreground)}
|
|
318
|
-
|
|
319
|
-
/* ── Progress bars ────────────────────────────────────────────────── */
|
|
320
|
-
.progress-list{display:flex;flex-direction:column;gap:12px;margin:14px 0 28px}
|
|
321
|
-
.progress-item{display:flex;flex-direction:column;gap:4px}
|
|
322
|
-
.progress-header{display:flex;justify-content:space-between;align-items:baseline}
|
|
323
|
-
.progress-label{font-size:.88em;font-weight:500;color:var(--foreground)}
|
|
324
|
-
.progress-value{font-size:.8em;color:var(--muted-foreground);font-variant-numeric:tabular-nums}
|
|
325
|
-
.progress-track{
|
|
326
|
-
height:6px;background:var(--accent);border-radius:3px;overflow:hidden;
|
|
327
|
-
}
|
|
328
|
-
.progress-fill{
|
|
329
|
-
height:100%;border-radius:3px;transition:width .3s ease;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
/* ── Prompt / Question block ──────────────────────────────────────── */
|
|
333
|
-
.prompt-block{
|
|
334
|
-
background:var(--card);border:1px solid var(--primary);border-radius:var(--radius);
|
|
335
|
-
padding:20px;margin:14px 0 28px;
|
|
336
|
-
}
|
|
337
|
-
.prompt-question{font-size:1.05em;font-weight:600;color:var(--foreground);margin-bottom:8px}
|
|
338
|
-
.prompt-context{font-size:.88em;color:var(--muted-foreground);line-height:1.6;margin-bottom:12px}
|
|
339
|
-
.prompt-placeholder{
|
|
340
|
-
padding:10px 14px;background:var(--accent);border:1px dashed var(--border);
|
|
341
|
-
border-radius:var(--radius);color:var(--muted-foreground);font-size:.85em;font-style:italic;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
/* ── Actions ──────────────────────────────────────────────────────── */
|
|
345
|
-
.actions-bar{margin:32px 0}
|
|
346
|
-
.actions-grid{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
|
|
347
|
-
.action-group{display:flex;flex-direction:column;gap:6px}
|
|
348
|
-
.action-group label{font-size:.85em;color:var(--muted-foreground);font-weight:500}
|
|
349
|
-
.action-group select{
|
|
350
|
-
padding:9px 14px;background:var(--card);border:1px solid var(--border);
|
|
351
|
-
border-radius:var(--radius);color:var(--foreground);font-size:.9em;cursor:pointer;min-width:200px;
|
|
352
|
-
font-family:inherit;
|
|
353
|
-
}
|
|
354
|
-
.action-group select:hover{border-color:var(--primary)}
|
|
355
|
-
.action-btn{
|
|
356
|
-
padding:10px 22px;border:1px solid var(--border);border-radius:var(--radius);
|
|
357
|
-
font-size:.88em;font-weight:600;cursor:pointer;transition:all .2s ease;
|
|
358
|
-
background:var(--card);color:var(--foreground);font-family:inherit;
|
|
359
|
-
}
|
|
360
|
-
.action-btn:hover{transform:translateY(-1px);box-shadow:0 4px 16px rgba(0,0,0,.2)}
|
|
361
|
-
.action-primary{background:linear-gradient(135deg,var(--primary),#6366f1);color:var(--primary-foreground);border-color:transparent}
|
|
362
|
-
.action-primary:hover{opacity:.9;box-shadow:0 4px 20px rgba(129,140,248,.3)}
|
|
363
|
-
.action-danger{background:var(--error);color:#fff;border-color:var(--error)}
|
|
364
|
-
.action-danger:hover{opacity:.9}
|
|
365
|
-
.action-default:hover{border-color:var(--primary);color:var(--primary)}
|
|
366
|
-
.action-feedback{
|
|
367
|
-
margin-top:14px;padding:10px 16px;border-radius:var(--radius);
|
|
368
|
-
display:none;font-weight:500;font-size:.9em;
|
|
369
|
-
}
|
|
370
|
-
.action-feedback.sent{
|
|
371
|
-
display:block;background:rgba(16,185,129,.1);color:var(--success);
|
|
372
|
-
border:1px solid rgba(16,185,129,.2);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
/* ── Footer ───────────────────────────────────────────────────────── */
|
|
376
|
-
.footer{
|
|
377
|
-
text-align:center;padding:24px;color:var(--muted-foreground);font-size:.75em;
|
|
378
|
-
border-top:1px solid var(--border);margin-top:48px;letter-spacing:.02em;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
/* ── Search filter (injected for tables) ──────────────────────────── */
|
|
382
|
-
.search-bar{display:flex;gap:12px;margin-bottom:14px;align-items:center}
|
|
383
|
-
.search-bar input{
|
|
384
|
-
flex:1;padding:9px 14px;background:var(--card);border:1px solid var(--border);
|
|
385
|
-
border-radius:var(--radius);color:var(--foreground);font-size:.9em;outline:none;
|
|
386
|
-
transition:border-color .15s;font-family:inherit;
|
|
387
|
-
}
|
|
388
|
-
.search-bar input:focus{border-color:var(--primary)}
|
|
389
|
-
.search-bar .count{color:var(--muted-foreground);font-size:.85em;white-space:nowrap}
|
|
390
|
-
|
|
391
|
-
/* ── Scrollbar ────────────────────────────────────────────────────── */
|
|
392
|
-
::-webkit-scrollbar{width:6px;height:6px}
|
|
393
|
-
::-webkit-scrollbar-track{background:var(--card)}
|
|
394
|
-
::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
|
|
395
|
-
::-webkit-scrollbar-thumb:hover{background:var(--muted-foreground)}
|
|
396
|
-
`}export{e as FONT_LINK,t as getDesignSystemCSS};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region packages/server/src/tools/present-utils.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Shared HTML utility functions for the Present tool family.
|
|
4
|
-
*
|
|
5
|
-
* Used by present.tool.ts, present-charts.ts, and present-blocks.ts
|
|
6
|
-
* to avoid duplicating escape logic across modules.
|
|
7
|
-
*/
|
|
8
|
-
/** HTML-escape a string for safe insertion into HTML content and attributes. */
|
|
9
|
-
declare function escHtml(s: string): string;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { escHtml };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){return String(e??``).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}export{e as escHtml};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{registerPresentTool as e}from"./present/tool.js";import"./present/index.js";export{e as registerPresentTool};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
import { KBConfig } from "../../../core/dist/index.js";
|
|
3
|
-
|
|
4
|
-
//#region packages/server/src/tools/produce.tool.d.ts
|
|
5
|
-
declare function registerProduceKnowledgeTool(server: McpServer, config?: KBConfig): void;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { registerProduceKnowledgeTool };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{getToolMeta as e}from"../tool-metadata.js";import{mkdirSync as t,writeFileSync as n}from"node:fs";import{join as r}from"node:path";import{z as i}from"zod";import{createLogger as a,serializeError as o}from"../../../core/dist/index.js";import{DependencyAnalyzer as s,DiagramGenerator as c,EntryPointAnalyzer as l,KnowledgeProducer as u,PatternAnalyzer as d,StructureAnalyzer as f,SymbolAnalyzer as p}from"../../../analyzers/dist/index.js";const m=a(`tools`);function h(a,h){let g=new u({structure:new f,dependencies:new s,symbols:new p,patterns:new d,entryPoints:new l,diagrams:new c}),_=e(`produce_knowledge`);a.registerTool(`produce_knowledge`,{title:_.title,description:`Run automated codebase analysis and produce synthesis instructions. Executes Tier 1 deterministic analyzers, then returns structured baselines and instructions for you to synthesize knowledge using remember.`,inputSchema:{scope:i.string().optional().describe(`Root path to analyze (defaults to workspace root)`),aspects:i.array(i.enum([`all`,`structure`,`dependencies`,`symbols`,`patterns`,`entry-points`,`diagrams`])).default([`all`]).describe(`Which analysis aspects to run`)},annotations:_.annotations},async({scope:e,aspects:i})=>{try{let a=e??`.`;m.info(`Running knowledge production`,{rootPath:a,aspects:i});let s=await g.runExtraction(a,i);try{let e=h?.onboardDir??r(a,`.ai`,`context`);t(e,{recursive:!0});let i=`<!-- Generated by produce_knowledge at ${new Date().toISOString()} -->\n\n`;for(let[t,a]of Object.entries(s))a&&typeof a==`string`&&n(r(e,`${t}.md`),i+a,`utf-8`);m.info(`Knowledge persisted to .ai/context/`,{files:Object.keys(s).length})}catch(e){m.warn(`Failed to persist knowledge to .ai/context/`,{error:o(e)})}return{content:[{type:`text`,text:g.buildSynthesisInstructions(s,i)+`
|
|
2
|
-
|
|
3
|
-
---
|
|
4
|
-
_Next: Review the baselines above and use \`remember\` to store synthesized knowledge entries._`}]}}catch(e){return m.error(`Knowledge production failed`,o(e)),{content:[{type:`text`,text:`Knowledge production failed: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}})}export{h as registerProduceKnowledgeTool};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CuratedKnowledgeManager } from "../curated-manager.js";
|
|
2
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
-
|
|
4
|
-
//#region packages/server/src/tools/read.tool.d.ts
|
|
5
|
-
declare function registerReadTool(server: McpServer, curated: CuratedKnowledgeManager): void;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { registerReadTool };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{getToolMeta as e}from"../tool-metadata.js";import{curatedResourceLink as t}from"../resource-links.js";import{z as n}from"zod";import{createLogger as r,serializeError as i}from"../../../core/dist/index.js";const a=r(`tools`);function o(r,o){let s=e(`read`);r.registerTool(`read`,{title:s.title,description:`Read the full content of a specific curated knowledge entry by its path. Use list first to discover available entries.`,inputSchema:{path:n.string().describe(`Relative path within .ai/curated/ (e.g., "decisions/use-lancedb.md")`)},annotations:s.annotations},async({path:e})=>{try{let n=await o.read(e),r=[`## ${n.title}`,`- **Path**: .ai/curated/${e}`,`- **Category**: ${n.category}`,n.tags.length?`- **Tags**: ${n.tags.join(`, `)}`:null,`- **Version**: ${n.version}`,`- **Created**: ${n.created}`,n.updated===n.created?null:`- **Updated**: ${n.updated}`,``].filter(e=>e!==null).join(`
|
|
2
|
-
`),i=t(e,n.title,`[${n.category}]`);return{content:[{type:`text`,text:`${r}\n${n.content}\n\n---\n_Next: Use \`update\` to modify this entry, or \`search\` to find related entries._`},...i?[i]:[]]}}catch(e){return a.error(`Read failed`,i(e)),{content:[{type:`text`,text:`Read failed: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}})}export{o as registerReadTool};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CuratedKnowledgeManager } from "../curated-manager.js";
|
|
2
|
-
import { ResourceNotifier } from "../resources/resource-notifier.js";
|
|
3
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
|
-
import { KBConfig } from "../../../core/dist/index.js";
|
|
5
|
-
import { IKnowledgeStore } from "../../../store/dist/index.js";
|
|
6
|
-
import { IncrementalIndexer } from "../../../indexer/dist/index.js";
|
|
7
|
-
|
|
8
|
-
//#region packages/server/src/tools/reindex.tool.d.ts
|
|
9
|
-
declare function registerReindexTool(server: McpServer, indexer: IncrementalIndexer, config: KBConfig, curated: CuratedKnowledgeManager, store?: IKnowledgeStore, resourceNotifier?: ResourceNotifier, indexMode?: string): void;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { registerReindexTool };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{getToolMeta as e}from"../tool-metadata.js";import{createTaskRunner as t}from"../task-manager.js";import{z as n}from"zod";import{createLogger as r,serializeError as i}from"../../../core/dist/index.js";const a=r(`tools`);function o(r,o,s,c,l,u,d){let f=e(`reindex`);r.registerTool(`reindex`,{title:f.title,description:`Trigger re-indexing of the AI Kit index. Can do incremental (only changed files) or full re-index. When smart indexing is active, use force: true to override the automatic trickle indexer.`,inputSchema:{full:n.boolean().default(!1).describe(`If true, force full re-index ignoring file hashes`),force:n.boolean().default(!1).describe(`If true, override smart indexing guard and run reindex anyway`)},annotations:f.annotations},async({full:e,force:n},r)=>{try{if(o.isIndexing)return{content:[{type:`text`,text:`## Reindex Already in Progress
|
|
2
|
-
|
|
3
|
-
A reindex operation is currently running. Search and other tools continue to work with existing data. Use \`status({})\` to check when it completes.`}]};if(d===`smart`&&!n)return{content:[{type:`text`,text:`## Smart Indexing Active
|
|
4
|
-
|
|
5
|
-
Smart indexing (trickle mode) is enabled — files are automatically indexed as they are accessed by tools. Manual reindex is not needed.
|
|
6
|
-
|
|
7
|
-
**If the index is severely outdated**, use \`reindex({ force: true })\` to override.
|
|
8
|
-
|
|
9
|
-
Use \`status({})\` to check smart indexing queue status.`}]};let f=t(r).createTask(`Reindex`,1);f.progress(0,`Starting ${e?`full`:`incremental`} reindex`),a.info(`Starting background re-index`,{mode:e?`full`:`incremental`});let p=e=>t=>{t.phase===`chunking`&&t.currentFile&&a.debug(`Re-index progress`,{prefix:e,current:t.filesProcessed+1,total:t.filesTotal,file:t.currentFile})};return(e?o.reindexAll(s,p(`Reindex`)):o.index(s,p(`Index`))).then(async e=>{if(a.info(`Background re-index complete`,{filesProcessed:e.filesProcessed,chunksCreated:e.chunksCreated,durationMs:e.durationMs}),f.complete(`Reindex complete: ${e.filesProcessed} files, ${e.chunksCreated} chunks in ${e.durationMs}ms`),l)try{await l.createFtsIndex(),a.info(`FTS index rebuilt after reindex`)}catch(e){a.warn(`FTS index rebuild failed`,i(e))}try{let e=await c.reindexAll();a.info(`Curated re-index complete`,{indexed:e.indexed})}catch(e){a.warn(`Curated re-index failed`,i(e))}if(u)try{await u.notifyAfterReindex()}catch(e){a.warn(`Post-reindex resource notification failed`,i(e))}}).catch(e=>{f.fail(`Reindex failed: ${e instanceof Error?e.message:String(e)}`),a.error(`Background reindex failed`,i(e))}),{content:[{type:`text`,text:`## Reindex Started (Background)\n\n- **Mode**: ${e?`Full`:`Incremental`}\n- Search and other tools continue to work with existing data during reindex.\n- Completion will be logged. Use \`status({})\` to check index stats afterward.\n\n---\n_Next: Continue working — the reindex runs in the background._`}]}}catch(e){return a.error(`Reindex failed`,i(e)),{content:[{type:`text`,text:`Reindex failed: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}})}export{o as registerReindexTool};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CuratedKnowledgeManager } from "../curated-manager.js";
|
|
2
|
-
import { ResourceNotifier } from "../resources/resource-notifier.js";
|
|
3
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
|
-
import { EvolutionCollector, PolicyStore } from "../../../enterprise-bridge/dist/index.js";
|
|
5
|
-
|
|
6
|
-
//#region packages/server/src/tools/remember.tool.d.ts
|
|
7
|
-
declare function registerRememberTool(server: McpServer, curated: CuratedKnowledgeManager, policyStore?: PolicyStore, evolutionCollector?: EvolutionCollector, resourceNotifier?: ResourceNotifier): void;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { registerRememberTool };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{getToolMeta as e}from"../tool-metadata.js";import{curatedResourceLink as t}from"../resource-links.js";import{z as n}from"zod";import{createLogger as r,serializeError as i}from"../../../core/dist/index.js";const a=r(`tools`);function o(r,o,s,c,l){let u=e(`remember`);r.registerTool(`remember`,{title:u.title,description:`Store a new piece of curated knowledge. Use this to persist decisions, patterns, conventions, or any insight worth remembering across sessions.`,inputSchema:{title:n.string().min(3).max(120).describe(`Short descriptive title for the knowledge entry`),content:n.string().min(10).max(1e5).describe(`The markdown content to store`),category:n.string().regex(/^[a-z][a-z0-9-]*$/).describe(`Category slug (e.g., "decisions", "patterns", "conventions", "api-contracts")`),tags:n.array(n.string()).default([]).describe(`Optional tags for filtering`)},annotations:u.annotations},async({title:e,content:n,category:r,tags:u})=>{try{let i=await o.remember(e,n,r,u),a=``;if(s){let t=s.classify(e,n,u);c&&c.recordClassification(e,t.matchingRules.map(e=>e.ruleId),t.pushRecommended),t.matchingRules.length>0&&(a=`\n\n### Classification Signals\n${t.matchingRules.map(e=>` - **${e.ruleId}** (${e.category}, weight: ${e.pushWeight}) — matched: ${e.matchedPatterns.join(`, `)}`).join(`
|
|
2
|
-
`)}\n- **Push recommended**: ${t.pushRecommended?`yes`:`no`} (max weight: ${t.maxPushWeight})`,t.pushRecommended&&(a+=`
|
|
3
|
-
|
|
4
|
-
> 💡 This entry matches push rules. Consider \`er_push\` to share with Enterprise RAG.`))}l&&l.notifyAfterCuratedWrite(i.path).catch(()=>{});let d=t(i.path,e,`[${r}]`);return{content:[{type:`text`,text:`Remembered: **${e}**\n\nStored at \`.ai/curated/${i.path}\` and indexed for semantic search.${a}\n\n---\n_Next: Use \`search\` to verify the entry is findable, or \`list\` to see all curated entries._`},...d?[d]:[]]}}catch(e){return a.error(`Remember failed`,i(e)),{content:[{type:`text`,text:`Remember failed: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}})}export{o as registerRememberTool};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{getToolMeta as e}from"../tool-metadata.js";import{z as t}from"zod";import{createLogger as n,serializeError as r}from"../../../core/dist/index.js";import{replayClear as i,replayList as a,replayTrim as o}from"../../../tools/dist/index.js";const s=n(`tools`);function c(n){let c=e(`replay`);n.registerTool(`replay`,{title:c.title,description:`View or clear the audit trail of recent MCP tool and CLI invocations. Shows tool name, duration, status, and input/output summaries.`,inputSchema:{action:t.enum([`list`,`clear`]).default(`list`).describe(`Action: "list" (default) to view entries, "clear" to wipe the log`),last:t.number().optional().describe(`Number of entries to return (default: 20, list only)`),tool:t.string().optional().describe(`Filter by tool name (list only)`),source:t.enum([`mcp`,`cli`]).optional().describe(`Filter by source: "mcp" or "cli" (list only)`),since:t.string().optional().describe(`ISO timestamp — only show entries after this time (list only)`)},annotations:c.annotations},async({action:e,last:t,tool:n,source:c,since:l})=>{try{if(e===`clear`)return i(),{content:[{type:`text`,text:`Replay log cleared.`}]};let r=a({last:t,tool:n,source:c,since:l});if(r.length===0)return{content:[{type:`text`,text:`No replay entries found. Activity is logged when tools are invoked via MCP or CLI.`}]};let s=r.map(e=>`${e.ts.split(`T`)[1]?.split(`.`)[0]??e.ts} ${e.status===`ok`?`✓`:`✗`} ${e.tool} (${e.durationMs}ms) [${e.source}]\n in: ${e.input}\n out: ${e.output}`);return o().catch(()=>{}),{content:[{type:`text`,text:`**Replay Log** (${r.length} entries)\n\n${s.join(`
|
|
2
|
-
|
|
3
|
-
`)}`}]}}catch(e){return s.error(`Replay failed`,r(e)),{content:[{type:`text`,text:`Replay failed: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}})}export{c as registerReplayTool};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{getToolMeta as e}from"../tool-metadata.js";import{z as t}from"zod";import{createLogger as n,serializeError as r}from"../../../core/dist/index.js";import{listRestorePoints as i,restoreFromPoint as a}from"../../../tools/dist/index.js";const o=n(`tools`);function s(n){let s=e(`restore`);n.registerTool(`restore`,{title:s.title,description:`List and restore file snapshots taken before destructive operations (codemod, rename, forget). Use action=list to see available restore points, action=restore with an id to undo.`,inputSchema:{action:t.enum([`list`,`restore`]).describe(`list: show restore points, restore: apply a restore point`),id:t.string().optional().describe(`Restore point ID (required for action=restore)`),limit:t.number().min(1).max(50).default(10).describe(`Max restore points to list`)},annotations:s.annotations},async({action:e,id:t,limit:n})=>{try{if(e===`list`){let e=i().slice(0,n);return e.length===0?{content:[{type:`text`,text:`No restore points found.`}]}:{content:[{type:`text`,text:`## Restore Points\n\n${e.map(e=>`- **${e.id}** (${e.timestamp}) — ${e.operation}: ${e.description} (${e.files.length} files)`).join(`
|
|
2
|
-
`)}`}]}}if(!t)throw Error(`id is required for restore action`);let r=await a(t);return{content:[{type:`text`,text:`Restored ${r.length} files:\n${r.map(e=>`- \`${e}\``).join(`
|
|
3
|
-
`)}`}]}}catch(e){return o.error(`Restore failed`,r(e)),{content:[{type:`text`,text:`Restore failed: ${e instanceof Error?e.message:String(e)}`}],isError:!0}}})}export{s as registerRestoreTool};
|