@adverant-nexus/cli 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +1366 -0
- package/LICENSE +21 -0
- package/README.md +593 -0
- package/completions/_nexus +452 -0
- package/completions/nexus.bash +329 -0
- package/completions/nexus.fish +187 -0
- package/dist/cli.d.ts +35 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +135 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/agent/index.d.ts +9 -0
- package/dist/commands/agent/index.d.ts.map +1 -0
- package/dist/commands/agent/index.js +20 -0
- package/dist/commands/agent/index.js.map +1 -0
- package/dist/commands/agent/list.d.ts +9 -0
- package/dist/commands/agent/list.d.ts.map +1 -0
- package/dist/commands/agent/list.js +122 -0
- package/dist/commands/agent/list.js.map +1 -0
- package/dist/commands/agent/run.d.ts +10 -0
- package/dist/commands/agent/run.d.ts.map +1 -0
- package/dist/commands/agent/run.js +167 -0
- package/dist/commands/agent/run.js.map +1 -0
- package/dist/commands/agent/status.d.ts +9 -0
- package/dist/commands/agent/status.d.ts.map +1 -0
- package/dist/commands/agent/status.js +157 -0
- package/dist/commands/agent/status.js.map +1 -0
- package/dist/commands/compute/agent.d.ts +21 -0
- package/dist/commands/compute/agent.d.ts.map +1 -0
- package/dist/commands/compute/agent.js +158 -0
- package/dist/commands/compute/agent.js.map +1 -0
- package/dist/commands/compute/index.d.ts +10 -0
- package/dist/commands/compute/index.d.ts.map +1 -0
- package/dist/commands/compute/index.js +27 -0
- package/dist/commands/compute/index.js.map +1 -0
- package/dist/commands/compute/lib/hardware-detection.d.ts +52 -0
- package/dist/commands/compute/lib/hardware-detection.d.ts.map +1 -0
- package/dist/commands/compute/lib/hardware-detection.js +432 -0
- package/dist/commands/compute/lib/hardware-detection.js.map +1 -0
- package/dist/commands/compute/lib/local-compute-agent.d.ts +143 -0
- package/dist/commands/compute/lib/local-compute-agent.d.ts.map +1 -0
- package/dist/commands/compute/lib/local-compute-agent.js +1162 -0
- package/dist/commands/compute/lib/local-compute-agent.js.map +1 -0
- package/dist/commands/compute/lib/local-compute-client.d.ts +89 -0
- package/dist/commands/compute/lib/local-compute-client.d.ts.map +1 -0
- package/dist/commands/compute/lib/local-compute-client.js +388 -0
- package/dist/commands/compute/lib/local-compute-client.js.map +1 -0
- package/dist/commands/compute/list.d.ts +14 -0
- package/dist/commands/compute/list.d.ts.map +1 -0
- package/dist/commands/compute/list.js +164 -0
- package/dist/commands/compute/list.js.map +1 -0
- package/dist/commands/compute/logs.d.ts +14 -0
- package/dist/commands/compute/logs.d.ts.map +1 -0
- package/dist/commands/compute/logs.js +105 -0
- package/dist/commands/compute/logs.js.map +1 -0
- package/dist/commands/compute/resources.d.ts +14 -0
- package/dist/commands/compute/resources.d.ts.map +1 -0
- package/dist/commands/compute/resources.js +163 -0
- package/dist/commands/compute/resources.js.map +1 -0
- package/dist/commands/compute/status.d.ts +13 -0
- package/dist/commands/compute/status.d.ts.map +1 -0
- package/dist/commands/compute/status.js +223 -0
- package/dist/commands/compute/status.js.map +1 -0
- package/dist/commands/compute/submit.d.ts +19 -0
- package/dist/commands/compute/submit.d.ts.map +1 -0
- package/dist/commands/compute/submit.js +99 -0
- package/dist/commands/compute/submit.js.map +1 -0
- package/dist/commands/deploy.d.ts +11 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +117 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/dynamic/graphrag-commands.d.ts +16 -0
- package/dist/commands/dynamic/graphrag-commands.d.ts.map +1 -0
- package/dist/commands/dynamic/graphrag-commands.js +562 -0
- package/dist/commands/dynamic/graphrag-commands.js.map +1 -0
- package/dist/commands/dynamic/index.d.ts +10 -0
- package/dist/commands/dynamic/index.d.ts.map +1 -0
- package/dist/commands/dynamic/index.js +17 -0
- package/dist/commands/dynamic/index.js.map +1 -0
- package/dist/commands/dynamic/mageagent-commands.d.ts +8 -0
- package/dist/commands/dynamic/mageagent-commands.d.ts.map +1 -0
- package/dist/commands/dynamic/mageagent-commands.js +86 -0
- package/dist/commands/dynamic/mageagent-commands.js.map +1 -0
- package/dist/commands/dynamic/mcp-tool-mapper.d.ts +97 -0
- package/dist/commands/dynamic/mcp-tool-mapper.d.ts.map +1 -0
- package/dist/commands/dynamic/mcp-tool-mapper.js +328 -0
- package/dist/commands/dynamic/mcp-tool-mapper.js.map +1 -0
- package/dist/commands/dynamic/nexus-commands.d.ts +78 -0
- package/dist/commands/dynamic/nexus-commands.d.ts.map +1 -0
- package/dist/commands/dynamic/nexus-commands.js +426 -0
- package/dist/commands/dynamic/nexus-commands.js.map +1 -0
- package/dist/commands/dynamic/sandbox-commands.d.ts +8 -0
- package/dist/commands/dynamic/sandbox-commands.d.ts.map +1 -0
- package/dist/commands/dynamic/sandbox-commands.js +80 -0
- package/dist/commands/dynamic/sandbox-commands.js.map +1 -0
- package/dist/commands/init.d.ts +11 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +128 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.d.ts +10 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +81 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/login.d.ts +10 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +83 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logs.d.ts +11 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +79 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/nexus/index.d.ts +69 -0
- package/dist/commands/nexus/index.d.ts.map +1 -0
- package/dist/commands/nexus/index.js +336 -0
- package/dist/commands/nexus/index.js.map +1 -0
- package/dist/commands/plugin/disable.d.ts +8 -0
- package/dist/commands/plugin/disable.d.ts.map +1 -0
- package/dist/commands/plugin/disable.js +31 -0
- package/dist/commands/plugin/disable.js.map +1 -0
- package/dist/commands/plugin/enable.d.ts +8 -0
- package/dist/commands/plugin/enable.d.ts.map +1 -0
- package/dist/commands/plugin/enable.js +37 -0
- package/dist/commands/plugin/enable.js.map +1 -0
- package/dist/commands/plugin/index.d.ts +8 -0
- package/dist/commands/plugin/index.d.ts.map +1 -0
- package/dist/commands/plugin/index.js +23 -0
- package/dist/commands/plugin/index.js.map +1 -0
- package/dist/commands/plugin/info.d.ts +8 -0
- package/dist/commands/plugin/info.d.ts.map +1 -0
- package/dist/commands/plugin/info.js +129 -0
- package/dist/commands/plugin/info.js.map +1 -0
- package/dist/commands/plugin/init.d.ts +8 -0
- package/dist/commands/plugin/init.d.ts.map +1 -0
- package/dist/commands/plugin/init.js +83 -0
- package/dist/commands/plugin/init.js.map +1 -0
- package/dist/commands/plugin/install.d.ts +8 -0
- package/dist/commands/plugin/install.d.ts.map +1 -0
- package/dist/commands/plugin/install.js +56 -0
- package/dist/commands/plugin/install.js.map +1 -0
- package/dist/commands/plugin/list.d.ts +8 -0
- package/dist/commands/plugin/list.d.ts.map +1 -0
- package/dist/commands/plugin/list.js +72 -0
- package/dist/commands/plugin/list.js.map +1 -0
- package/dist/commands/plugin/uninstall.d.ts +8 -0
- package/dist/commands/plugin/uninstall.d.ts.map +1 -0
- package/dist/commands/plugin/uninstall.js +49 -0
- package/dist/commands/plugin/uninstall.js.map +1 -0
- package/dist/commands/register.d.ts +10 -0
- package/dist/commands/register.d.ts.map +1 -0
- package/dist/commands/register.js +85 -0
- package/dist/commands/register.js.map +1 -0
- package/dist/commands/services/health.d.ts +7 -0
- package/dist/commands/services/health.d.ts.map +1 -0
- package/dist/commands/services/health.js +73 -0
- package/dist/commands/services/health.js.map +1 -0
- package/dist/commands/services/index.d.ts +16 -0
- package/dist/commands/services/index.d.ts.map +1 -0
- package/dist/commands/services/index.js +26 -0
- package/dist/commands/services/index.js.map +1 -0
- package/dist/commands/services/info.d.ts +7 -0
- package/dist/commands/services/info.d.ts.map +1 -0
- package/dist/commands/services/info.js +68 -0
- package/dist/commands/services/info.js.map +1 -0
- package/dist/commands/services/list.d.ts +9 -0
- package/dist/commands/services/list.d.ts.map +1 -0
- package/dist/commands/services/list.js +43 -0
- package/dist/commands/services/list.js.map +1 -0
- package/dist/commands/services/logs.d.ts +7 -0
- package/dist/commands/services/logs.d.ts.map +1 -0
- package/dist/commands/services/logs.js +107 -0
- package/dist/commands/services/logs.js.map +1 -0
- package/dist/commands/services/ports.d.ts +7 -0
- package/dist/commands/services/ports.d.ts.map +1 -0
- package/dist/commands/services/ports.js +65 -0
- package/dist/commands/services/ports.js.map +1 -0
- package/dist/commands/services/restart.d.ts +7 -0
- package/dist/commands/services/restart.d.ts.map +1 -0
- package/dist/commands/services/restart.js +67 -0
- package/dist/commands/services/restart.js.map +1 -0
- package/dist/commands/services/start.d.ts +7 -0
- package/dist/commands/services/start.d.ts.map +1 -0
- package/dist/commands/services/start.js +67 -0
- package/dist/commands/services/start.js.map +1 -0
- package/dist/commands/services/status.d.ts +9 -0
- package/dist/commands/services/status.d.ts.map +1 -0
- package/dist/commands/services/status.js +119 -0
- package/dist/commands/services/status.js.map +1 -0
- package/dist/commands/services/stop.d.ts +7 -0
- package/dist/commands/services/stop.d.ts.map +1 -0
- package/dist/commands/services/stop.js +67 -0
- package/dist/commands/services/stop.js.map +1 -0
- package/dist/commands/session/delete.d.ts +9 -0
- package/dist/commands/session/delete.d.ts.map +1 -0
- package/dist/commands/session/delete.js +51 -0
- package/dist/commands/session/delete.js.map +1 -0
- package/dist/commands/session/export.d.ts +9 -0
- package/dist/commands/session/export.d.ts.map +1 -0
- package/dist/commands/session/export.js +36 -0
- package/dist/commands/session/export.js.map +1 -0
- package/dist/commands/session/import.d.ts +9 -0
- package/dist/commands/session/import.d.ts.map +1 -0
- package/dist/commands/session/import.js +54 -0
- package/dist/commands/session/import.js.map +1 -0
- package/dist/commands/session/index.d.ts +9 -0
- package/dist/commands/session/index.d.ts.map +1 -0
- package/dist/commands/session/index.js +28 -0
- package/dist/commands/session/index.js.map +1 -0
- package/dist/commands/session/list.d.ts +9 -0
- package/dist/commands/session/list.d.ts.map +1 -0
- package/dist/commands/session/list.js +88 -0
- package/dist/commands/session/list.js.map +1 -0
- package/dist/commands/session/load.d.ts +9 -0
- package/dist/commands/session/load.d.ts.map +1 -0
- package/dist/commands/session/load.js +71 -0
- package/dist/commands/session/load.js.map +1 -0
- package/dist/commands/session/resume.d.ts +9 -0
- package/dist/commands/session/resume.d.ts.map +1 -0
- package/dist/commands/session/resume.js +49 -0
- package/dist/commands/session/resume.js.map +1 -0
- package/dist/commands/session/save.d.ts +9 -0
- package/dist/commands/session/save.d.ts.map +1 -0
- package/dist/commands/session/save.js +69 -0
- package/dist/commands/session/save.js.map +1 -0
- package/dist/commands/workspace/git-commit.d.ts +9 -0
- package/dist/commands/workspace/git-commit.d.ts.map +1 -0
- package/dist/commands/workspace/git-commit.js +156 -0
- package/dist/commands/workspace/git-commit.js.map +1 -0
- package/dist/commands/workspace/git-status.d.ts +9 -0
- package/dist/commands/workspace/git-status.d.ts.map +1 -0
- package/dist/commands/workspace/git-status.js +192 -0
- package/dist/commands/workspace/git-status.js.map +1 -0
- package/dist/commands/workspace/index.d.ts +9 -0
- package/dist/commands/workspace/index.d.ts.map +1 -0
- package/dist/commands/workspace/index.js +24 -0
- package/dist/commands/workspace/index.js.map +1 -0
- package/dist/commands/workspace/info.d.ts +10 -0
- package/dist/commands/workspace/info.d.ts.map +1 -0
- package/dist/commands/workspace/info.js +191 -0
- package/dist/commands/workspace/info.js.map +1 -0
- package/dist/commands/workspace/init.d.ts +9 -0
- package/dist/commands/workspace/init.d.ts.map +1 -0
- package/dist/commands/workspace/init.js +193 -0
- package/dist/commands/workspace/init.js.map +1 -0
- package/dist/commands/workspace/validate.d.ts +9 -0
- package/dist/commands/workspace/validate.d.ts.map +1 -0
- package/dist/commands/workspace/validate.js +140 -0
- package/dist/commands/workspace/validate.js.map +1 -0
- package/dist/core/agent-client.d.ts +49 -0
- package/dist/core/agent-client.d.ts.map +1 -0
- package/dist/core/agent-client.js +289 -0
- package/dist/core/agent-client.js.map +1 -0
- package/dist/core/config/config-manager.d.ts +75 -0
- package/dist/core/config/config-manager.d.ts.map +1 -0
- package/dist/core/config/config-manager.js +379 -0
- package/dist/core/config/config-manager.js.map +1 -0
- package/dist/core/config/profile-manager.d.ts +76 -0
- package/dist/core/config/profile-manager.d.ts.map +1 -0
- package/dist/core/config/profile-manager.js +250 -0
- package/dist/core/config/profile-manager.js.map +1 -0
- package/dist/core/config/workspace-detector.d.ts +66 -0
- package/dist/core/config/workspace-detector.d.ts.map +1 -0
- package/dist/core/config/workspace-detector.js +291 -0
- package/dist/core/config/workspace-detector.js.map +1 -0
- package/dist/core/discovery/docker-parser.d.ts +27 -0
- package/dist/core/discovery/docker-parser.d.ts.map +1 -0
- package/dist/core/discovery/docker-parser.js +361 -0
- package/dist/core/discovery/docker-parser.js.map +1 -0
- package/dist/core/discovery/index.d.ts +11 -0
- package/dist/core/discovery/index.d.ts.map +1 -0
- package/dist/core/discovery/index.js +16 -0
- package/dist/core/discovery/index.js.map +1 -0
- package/dist/core/discovery/mcp-discovery.d.ts +41 -0
- package/dist/core/discovery/mcp-discovery.d.ts.map +1 -0
- package/dist/core/discovery/mcp-discovery.js +439 -0
- package/dist/core/discovery/mcp-discovery.js.map +1 -0
- package/dist/core/discovery/openapi-parser.d.ts +95 -0
- package/dist/core/discovery/openapi-parser.d.ts.map +1 -0
- package/dist/core/discovery/openapi-parser.js +353 -0
- package/dist/core/discovery/openapi-parser.js.map +1 -0
- package/dist/core/discovery/plugin-discovery.d.ts +63 -0
- package/dist/core/discovery/plugin-discovery.d.ts.map +1 -0
- package/dist/core/discovery/plugin-discovery.js +333 -0
- package/dist/core/discovery/plugin-discovery.js.map +1 -0
- package/dist/core/discovery/service-discovery.d.ts +107 -0
- package/dist/core/discovery/service-discovery.d.ts.map +1 -0
- package/dist/core/discovery/service-discovery.js +349 -0
- package/dist/core/discovery/service-discovery.js.map +1 -0
- package/dist/core/nexus-client.d.ts +119 -0
- package/dist/core/nexus-client.d.ts.map +1 -0
- package/dist/core/nexus-client.js +292 -0
- package/dist/core/nexus-client.js.map +1 -0
- package/dist/core/nexus-tool-executor.d.ts +102 -0
- package/dist/core/nexus-tool-executor.d.ts.map +1 -0
- package/dist/core/nexus-tool-executor.js +386 -0
- package/dist/core/nexus-tool-executor.js.map +1 -0
- package/dist/core/react-handler.d.ts +17 -0
- package/dist/core/react-handler.d.ts.map +1 -0
- package/dist/core/react-handler.js +296 -0
- package/dist/core/react-handler.js.map +1 -0
- package/dist/core/router/command-registry.d.ts +61 -0
- package/dist/core/router/command-registry.d.ts.map +1 -0
- package/dist/core/router/command-registry.js +138 -0
- package/dist/core/router/command-registry.js.map +1 -0
- package/dist/core/router/command-router.d.ts +33 -0
- package/dist/core/router/command-router.d.ts.map +1 -0
- package/dist/core/router/command-router.js +111 -0
- package/dist/core/router/command-router.js.map +1 -0
- package/dist/core/router/index.d.ts +9 -0
- package/dist/core/router/index.d.ts.map +1 -0
- package/dist/core/router/index.js +8 -0
- package/dist/core/router/index.js.map +1 -0
- package/dist/core/session/context-manager.d.ts +69 -0
- package/dist/core/session/context-manager.d.ts.map +1 -0
- package/dist/core/session/context-manager.js +109 -0
- package/dist/core/session/context-manager.js.map +1 -0
- package/dist/core/session/history-manager.d.ts +72 -0
- package/dist/core/session/history-manager.d.ts.map +1 -0
- package/dist/core/session/history-manager.js +175 -0
- package/dist/core/session/history-manager.js.map +1 -0
- package/dist/core/session/index.d.ts +9 -0
- package/dist/core/session/index.d.ts.map +1 -0
- package/dist/core/session/index.js +9 -0
- package/dist/core/session/index.js.map +1 -0
- package/dist/core/session/session-manager.d.ts +50 -0
- package/dist/core/session/session-manager.d.ts.map +1 -0
- package/dist/core/session/session-manager.js +200 -0
- package/dist/core/session/session-manager.js.map +1 -0
- package/dist/core/session/session-storage.d.ts +59 -0
- package/dist/core/session/session-storage.d.ts.map +1 -0
- package/dist/core/session/session-storage.js +226 -0
- package/dist/core/session/session-storage.js.map +1 -0
- package/dist/core/transport/http-client.d.ts +27 -0
- package/dist/core/transport/http-client.d.ts.map +1 -0
- package/dist/core/transport/http-client.js +182 -0
- package/dist/core/transport/http-client.js.map +1 -0
- package/dist/core/transport/index.d.ts +11 -0
- package/dist/core/transport/index.d.ts.map +1 -0
- package/dist/core/transport/index.js +10 -0
- package/dist/core/transport/index.js.map +1 -0
- package/dist/core/transport/mcp-client.d.ts +69 -0
- package/dist/core/transport/mcp-client.d.ts.map +1 -0
- package/dist/core/transport/mcp-client.js +252 -0
- package/dist/core/transport/mcp-client.js.map +1 -0
- package/dist/core/transport/stream-handler.d.ts +51 -0
- package/dist/core/transport/stream-handler.d.ts.map +1 -0
- package/dist/core/transport/stream-handler.js +264 -0
- package/dist/core/transport/stream-handler.js.map +1 -0
- package/dist/core/transport/websocket-client.d.ts +66 -0
- package/dist/core/transport/websocket-client.d.ts.map +1 -0
- package/dist/core/transport/websocket-client.js +232 -0
- package/dist/core/transport/websocket-client.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/output/formatters/index.d.ts +9 -0
- package/dist/output/formatters/index.d.ts.map +1 -0
- package/dist/output/formatters/index.js +9 -0
- package/dist/output/formatters/index.js.map +1 -0
- package/dist/output/formatters/json-formatter.d.ts +71 -0
- package/dist/output/formatters/json-formatter.d.ts.map +1 -0
- package/dist/output/formatters/json-formatter.js +236 -0
- package/dist/output/formatters/json-formatter.js.map +1 -0
- package/dist/output/formatters/stream-formatter.d.ts +107 -0
- package/dist/output/formatters/stream-formatter.d.ts.map +1 -0
- package/dist/output/formatters/stream-formatter.js +247 -0
- package/dist/output/formatters/stream-formatter.js.map +1 -0
- package/dist/output/formatters/table-formatter.d.ts +63 -0
- package/dist/output/formatters/table-formatter.d.ts.map +1 -0
- package/dist/output/formatters/table-formatter.js +294 -0
- package/dist/output/formatters/table-formatter.js.map +1 -0
- package/dist/output/formatters/text-formatter.d.ts +63 -0
- package/dist/output/formatters/text-formatter.d.ts.map +1 -0
- package/dist/output/formatters/text-formatter.js +202 -0
- package/dist/output/formatters/text-formatter.js.map +1 -0
- package/dist/output/formatters/yaml-formatter.d.ts +71 -0
- package/dist/output/formatters/yaml-formatter.d.ts.map +1 -0
- package/dist/output/formatters/yaml-formatter.js +239 -0
- package/dist/output/formatters/yaml-formatter.js.map +1 -0
- package/dist/output/index.d.ts +7 -0
- package/dist/output/index.d.ts.map +1 -0
- package/dist/output/index.js +7 -0
- package/dist/output/index.js.map +1 -0
- package/dist/output/output-manager.d.ts +156 -0
- package/dist/output/output-manager.d.ts.map +1 -0
- package/dist/output/output-manager.js +339 -0
- package/dist/output/output-manager.js.map +1 -0
- package/dist/output/renderers/index.d.ts +6 -0
- package/dist/output/renderers/index.d.ts.map +1 -0
- package/dist/output/renderers/index.js +6 -0
- package/dist/output/renderers/index.js.map +1 -0
- package/dist/output/renderers/progress-renderer.d.ts +56 -0
- package/dist/output/renderers/progress-renderer.d.ts.map +1 -0
- package/dist/output/renderers/progress-renderer.js +306 -0
- package/dist/output/renderers/progress-renderer.js.map +1 -0
- package/dist/output/renderers/terminal-renderer.d.ts +117 -0
- package/dist/output/renderers/terminal-renderer.d.ts.map +1 -0
- package/dist/output/renderers/terminal-renderer.js +294 -0
- package/dist/output/renderers/terminal-renderer.js.map +1 -0
- package/dist/plugins/index.d.ts +12 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +18 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/plugin-loader.d.ts +37 -0
- package/dist/plugins/plugin-loader.d.ts.map +1 -0
- package/dist/plugins/plugin-loader.js +155 -0
- package/dist/plugins/plugin-loader.js.map +1 -0
- package/dist/plugins/plugin-manager.d.ts +78 -0
- package/dist/plugins/plugin-manager.d.ts.map +1 -0
- package/dist/plugins/plugin-manager.js +310 -0
- package/dist/plugins/plugin-manager.js.map +1 -0
- package/dist/plugins/plugin-sdk.d.ts +136 -0
- package/dist/plugins/plugin-sdk.d.ts.map +1 -0
- package/dist/plugins/plugin-sdk.js +260 -0
- package/dist/plugins/plugin-sdk.js.map +1 -0
- package/dist/plugins/plugin-storage.d.ts +109 -0
- package/dist/plugins/plugin-storage.d.ts.map +1 -0
- package/dist/plugins/plugin-storage.js +207 -0
- package/dist/plugins/plugin-storage.js.map +1 -0
- package/dist/plugins/plugin-validator.d.ts +44 -0
- package/dist/plugins/plugin-validator.d.ts.map +1 -0
- package/dist/plugins/plugin-validator.js +272 -0
- package/dist/plugins/plugin-validator.js.map +1 -0
- package/dist/plugins/template-generator.d.ts +35 -0
- package/dist/plugins/template-generator.d.ts.map +1 -0
- package/dist/plugins/template-generator.js +438 -0
- package/dist/plugins/template-generator.js.map +1 -0
- package/dist/repl/completer.d.ts +58 -0
- package/dist/repl/completer.d.ts.map +1 -0
- package/dist/repl/completer.js +198 -0
- package/dist/repl/completer.js.map +1 -0
- package/dist/repl/evaluator.d.ts +55 -0
- package/dist/repl/evaluator.d.ts.map +1 -0
- package/dist/repl/evaluator.js +299 -0
- package/dist/repl/evaluator.js.map +1 -0
- package/dist/repl/index.d.ts +10 -0
- package/dist/repl/index.d.ts.map +1 -0
- package/dist/repl/index.js +10 -0
- package/dist/repl/index.js.map +1 -0
- package/dist/repl/renderer.d.ts +77 -0
- package/dist/repl/renderer.d.ts.map +1 -0
- package/dist/repl/renderer.js +291 -0
- package/dist/repl/renderer.js.map +1 -0
- package/dist/repl/repl.d.ts +89 -0
- package/dist/repl/repl.d.ts.map +1 -0
- package/dist/repl/repl.js +339 -0
- package/dist/repl/repl.js.map +1 -0
- package/dist/templates/python.d.ts +15 -0
- package/dist/templates/python.d.ts.map +1 -0
- package/dist/templates/python.js +375 -0
- package/dist/templates/python.js.map +1 -0
- package/dist/templates/typescript.d.ts +15 -0
- package/dist/templates/typescript.d.ts.map +1 -0
- package/dist/templates/typescript.js +274 -0
- package/dist/templates/typescript.js.map +1 -0
- package/dist/types/agent.d.ts +109 -0
- package/dist/types/agent.d.ts.map +1 -0
- package/dist/types/agent.js +7 -0
- package/dist/types/agent.js.map +1 -0
- package/dist/types/api.d.ts +125 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/api.js +53 -0
- package/dist/types/api.js.map +1 -0
- package/dist/types/command.d.ts +101 -0
- package/dist/types/command.d.ts.map +1 -0
- package/dist/types/command.js +7 -0
- package/dist/types/command.js.map +1 -0
- package/dist/types/compute.d.ts +317 -0
- package/dist/types/compute.d.ts.map +1 -0
- package/dist/types/compute.js +19 -0
- package/dist/types/compute.js.map +1 -0
- package/dist/types/config.d.ts +71 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +7 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/errors.d.ts +56 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +64 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +16 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/nexus.d.ts +254 -0
- package/dist/types/nexus.d.ts.map +1 -0
- package/dist/types/nexus.js +7 -0
- package/dist/types/nexus.js.map +1 -0
- package/dist/types/output.d.ts +107 -0
- package/dist/types/output.d.ts.map +1 -0
- package/dist/types/output.js +7 -0
- package/dist/types/output.js.map +1 -0
- package/dist/types/plugin.d.ts +118 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/plugin.js +7 -0
- package/dist/types/plugin.js.map +1 -0
- package/dist/types/service.d.ts +94 -0
- package/dist/types/service.d.ts.map +1 -0
- package/dist/types/service.js +15 -0
- package/dist/types/service.js.map +1 -0
- package/dist/types/session.d.ts +80 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/session.js +7 -0
- package/dist/types/session.js.map +1 -0
- package/dist/types/transport.d.ts +96 -0
- package/dist/types/transport.d.ts.map +1 -0
- package/dist/types/transport.js +7 -0
- package/dist/types/transport.js.map +1 -0
- package/dist/utils/config.d.ts +47 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +166 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/error-handler.d.ts +82 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +238 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +61 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +200 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/prompt.d.ts +57 -0
- package/dist/utils/prompt.d.ts.map +1 -0
- package/dist/utils/prompt.js +141 -0
- package/dist/utils/prompt.js.map +1 -0
- package/dist/utils/spinner.d.ts +47 -0
- package/dist/utils/spinner.d.ts.map +1 -0
- package/dist/utils/spinner.js +123 -0
- package/dist/utils/spinner.js.map +1 -0
- package/dist/utils/validation.d.ts +97 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +289 -0
- package/dist/utils/validation.js.map +1 -0
- package/docs/COMPLETIONS.md +528 -0
- package/docs/REPL.md +466 -0
- package/docs/graphrag-commands.md +387 -0
- package/package.json +154 -0
- package/scripts/install-completions.sh +356 -0
- package/scripts/prepublish.js +522 -0
- package/scripts/verify-package.js +505 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-router.js","sourceRoot":"","sources":["../../../src/core/router/command-router.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,MAAM,OAAO,aAAa;IACJ;IAApB,YAAoB,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAEjD;;OAEG;IACH,KAAK,CAAC,KAAK,CACT,WAAmB,EACnB,IAAiB,EACjB,OAAuB;QAEvB,sBAAsB;QACtB,MAAM,OA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;;OAEG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,cAAc,CAAC,OAAe;QAC5B,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;CACF;AAED,MAAM,UAAU,mBAAmB,CAAC,QAAyB;IAC3D,OAAO,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Router Layer Index
|
|
3
|
+
*
|
|
4
|
+
* Export command router and registry
|
|
5
|
+
*/
|
|
6
|
+
export { CommandRegistry, createCommandRegistry } from './command-registry.js';
|
|
7
|
+
export { CommandRouter, createCommandRouter } from './command-router.js';
|
|
8
|
+
export type { Command, CommandHandler, CommandContext, CommandResult } from '../../types/command.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/router/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACzE,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Router Layer Index
|
|
3
|
+
*
|
|
4
|
+
* Export command router and registry
|
|
5
|
+
*/
|
|
6
|
+
export { CommandRegistry, createCommandRegistry } from './command-registry.js';
|
|
7
|
+
export { CommandRouter, createCommandRouter } from './command-router.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/router/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context Manager for Nexus CLI
|
|
3
|
+
*
|
|
4
|
+
* Manages REPL context including namespace, workspace, and session metadata
|
|
5
|
+
*/
|
|
6
|
+
import type { CommandContext, WorkspaceInfo } from '../../types/command.js';
|
|
7
|
+
import type { NexusConfig } from '../../types/config.js';
|
|
8
|
+
import type { SessionContext } from '../../types/session.js';
|
|
9
|
+
export interface REPLContext extends CommandContext {
|
|
10
|
+
namespace?: string;
|
|
11
|
+
lastResult?: any;
|
|
12
|
+
sessionStart: Date;
|
|
13
|
+
commandCount: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class ContextManager {
|
|
16
|
+
private context;
|
|
17
|
+
constructor(workspace: WorkspaceInfo | undefined, config: NexusConfig, services: Map<string, any>);
|
|
18
|
+
/**
|
|
19
|
+
* Get current context
|
|
20
|
+
*/
|
|
21
|
+
getContext(): REPLContext;
|
|
22
|
+
/**
|
|
23
|
+
* Update context with partial values
|
|
24
|
+
*/
|
|
25
|
+
updateContext(updates: Partial<REPLContext>): void;
|
|
26
|
+
/**
|
|
27
|
+
* Get current namespace
|
|
28
|
+
*/
|
|
29
|
+
getNamespace(): string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Set current namespace
|
|
32
|
+
*/
|
|
33
|
+
setNamespace(namespace: string | undefined): void;
|
|
34
|
+
/**
|
|
35
|
+
* Get last command result
|
|
36
|
+
*/
|
|
37
|
+
getLastResult(): any;
|
|
38
|
+
/**
|
|
39
|
+
* Set last command result
|
|
40
|
+
*/
|
|
41
|
+
setLastResult(result: any): void;
|
|
42
|
+
/**
|
|
43
|
+
* Increment command count
|
|
44
|
+
*/
|
|
45
|
+
incrementCommandCount(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Get session duration in milliseconds
|
|
48
|
+
*/
|
|
49
|
+
getSessionDuration(): number;
|
|
50
|
+
/**
|
|
51
|
+
* Export context to session context
|
|
52
|
+
*/
|
|
53
|
+
toSessionContext(): SessionContext;
|
|
54
|
+
/**
|
|
55
|
+
* Get context metadata
|
|
56
|
+
*/
|
|
57
|
+
getMetadata(): {
|
|
58
|
+
namespace: string | undefined;
|
|
59
|
+
commandCount: number;
|
|
60
|
+
sessionDuration: number;
|
|
61
|
+
workspace: "typescript" | "python" | "go" | "rust" | "java" | "unknown" | undefined;
|
|
62
|
+
outputFormat: import("../../types/output.js").OutputFormat;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Reset context to initial state
|
|
66
|
+
*/
|
|
67
|
+
reset(): void;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=context-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-manager.d.ts","sourceRoot":"","sources":["../../../src/core/session/context-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,YAAY,EAAE,IAAI,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,OAAO,CAAc;gBAG3B,SAAS,EAAE,aAAa,GAAG,SAAS,EACpC,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAkB5B;;OAEG;IACH,UAAU,IAAI,WAAW;IAIzB;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI;IAOlD;;OAEG;IACH,YAAY,IAAI,MAAM,GAAG,SAAS;IAIlC;;OAEG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAIjD;;OAEG;IACH,aAAa,IAAI,GAAG;IAIpB;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI;IAIhC;;OAEG;IACH,qBAAqB,IAAI,IAAI;IAI7B;;OAEG;IACH,kBAAkB,IAAI,MAAM;IAI5B;;OAEG;IACH,gBAAgB,IAAI,cAAc;IAUlC;;OAEG;IACH,WAAW;;;;;;;IAUX;;OAEG;IACH,KAAK,IAAI,IAAI;CAMd"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context Manager for Nexus CLI
|
|
3
|
+
*
|
|
4
|
+
* Manages REPL context including namespace, workspace, and session metadata
|
|
5
|
+
*/
|
|
6
|
+
export class ContextManager {
|
|
7
|
+
context;
|
|
8
|
+
constructor(workspace, config, services) {
|
|
9
|
+
this.context = {
|
|
10
|
+
cwd: process.cwd(),
|
|
11
|
+
config,
|
|
12
|
+
workspace,
|
|
13
|
+
services,
|
|
14
|
+
verbose: config.defaults?.verbose || false,
|
|
15
|
+
quiet: config.defaults?.quiet || false,
|
|
16
|
+
outputFormat: config.defaults?.outputFormat || 'text',
|
|
17
|
+
transport: null,
|
|
18
|
+
namespace: undefined,
|
|
19
|
+
lastResult: undefined,
|
|
20
|
+
sessionStart: new Date(),
|
|
21
|
+
commandCount: 0,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get current context
|
|
26
|
+
*/
|
|
27
|
+
getContext() {
|
|
28
|
+
return { ...this.context };
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Update context with partial values
|
|
32
|
+
*/
|
|
33
|
+
updateContext(updates) {
|
|
34
|
+
this.context = {
|
|
35
|
+
...this.context,
|
|
36
|
+
...updates,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Get current namespace
|
|
41
|
+
*/
|
|
42
|
+
getNamespace() {
|
|
43
|
+
return this.context.namespace;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Set current namespace
|
|
47
|
+
*/
|
|
48
|
+
setNamespace(namespace) {
|
|
49
|
+
this.context.namespace = namespace;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Get last command result
|
|
53
|
+
*/
|
|
54
|
+
getLastResult() {
|
|
55
|
+
return this.context.lastResult;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Set last command result
|
|
59
|
+
*/
|
|
60
|
+
setLastResult(result) {
|
|
61
|
+
this.context.lastResult = result;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Increment command count
|
|
65
|
+
*/
|
|
66
|
+
incrementCommandCount() {
|
|
67
|
+
this.context.commandCount++;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Get session duration in milliseconds
|
|
71
|
+
*/
|
|
72
|
+
getSessionDuration() {
|
|
73
|
+
return Date.now() - this.context.sessionStart.getTime();
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Export context to session context
|
|
77
|
+
*/
|
|
78
|
+
toSessionContext() {
|
|
79
|
+
return {
|
|
80
|
+
workspace: this.context.workspace,
|
|
81
|
+
cwd: this.context.cwd,
|
|
82
|
+
config: this.context.config,
|
|
83
|
+
environment: process.env,
|
|
84
|
+
services: Object.fromEntries(this.context.services.entries()),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get context metadata
|
|
89
|
+
*/
|
|
90
|
+
getMetadata() {
|
|
91
|
+
return {
|
|
92
|
+
namespace: this.context.namespace,
|
|
93
|
+
commandCount: this.context.commandCount,
|
|
94
|
+
sessionDuration: this.getSessionDuration(),
|
|
95
|
+
workspace: this.context.workspace?.type,
|
|
96
|
+
outputFormat: this.context.outputFormat,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Reset context to initial state
|
|
101
|
+
*/
|
|
102
|
+
reset() {
|
|
103
|
+
this.context.namespace = undefined;
|
|
104
|
+
this.context.lastResult = undefined;
|
|
105
|
+
this.context.commandCount = 0;
|
|
106
|
+
this.context.sessionStart = new Date();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=context-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-manager.js","sourceRoot":"","sources":["../../../src/core/session/context-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,MAAM,OAAO,cAAc;IACjB,OAAO,CAAc;IAE7B,YACE,SAAoC,EACpC,MAAmB,EACnB,QAA0B;QAE1B,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;YAClB,MAAM;YACN,SAAS;YACT,QAAQ;YACR,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,IAAI,KAAK;YAC1C,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,IAAI,KAAK;YACtC,YAAY,EAAE,MAAM,CAAC,QAAQ,EAAE,YAAY,IAAI,MAAM;YACrD,SAAS,EAAE,IAAI;YACf,SAAS,EAAE,SAAS;YACpB,UAAU,EAAE,SAAS;YACrB,YAAY,EAAE,IAAI,IAAI,EAAE;YACxB,YAAY,EAAE,CAAC;SAChB,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,aAAa,CAAC,OAA6B;QACzC,IAAI,CA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AAS,EAAE,IAAI;YACvC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY;SACxC,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;QACnC,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;QACpC,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,IAAI,IAAI,EAAE,CAAC;IACzC,CAAC;CACF"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* History Manager for Nexus CLI
|
|
3
|
+
*
|
|
4
|
+
* Manages command history with persistence to disk
|
|
5
|
+
*/
|
|
6
|
+
import type { HistoryEntry, HistoryManager as IHistoryManager } from '../../types/session.js';
|
|
7
|
+
export declare class HistoryManager implements IHistoryManager {
|
|
8
|
+
private history;
|
|
9
|
+
private currentIndex;
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* Add command to history
|
|
13
|
+
*/
|
|
14
|
+
add(entry: HistoryEntry): void;
|
|
15
|
+
/**
|
|
16
|
+
* Get entry by ID
|
|
17
|
+
*/
|
|
18
|
+
get(id: string): HistoryEntry | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* List recent entries
|
|
21
|
+
*/
|
|
22
|
+
list(limit?: number): HistoryEntry[];
|
|
23
|
+
/**
|
|
24
|
+
* Search history by query
|
|
25
|
+
*/
|
|
26
|
+
search(query: string): HistoryEntry[];
|
|
27
|
+
/**
|
|
28
|
+
* Clear all history
|
|
29
|
+
*/
|
|
30
|
+
clear(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Get previous command (for up arrow)
|
|
33
|
+
*/
|
|
34
|
+
getPrevious(): string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Get next command (for down arrow)
|
|
37
|
+
*/
|
|
38
|
+
getNext(): string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Reset navigation index
|
|
41
|
+
*/
|
|
42
|
+
resetIndex(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Get all commands as strings (for readline history)
|
|
45
|
+
*/
|
|
46
|
+
getCommands(): string[];
|
|
47
|
+
/**
|
|
48
|
+
* Load history from disk
|
|
49
|
+
*/
|
|
50
|
+
private loadHistory;
|
|
51
|
+
/**
|
|
52
|
+
* Save history to disk
|
|
53
|
+
*/
|
|
54
|
+
private saveHistory;
|
|
55
|
+
/**
|
|
56
|
+
* Create history entry from command
|
|
57
|
+
*/
|
|
58
|
+
createEntry(command: string, args: any, namespace?: string, success?: boolean, duration?: number): HistoryEntry;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Command history for simple string-based history (readline integration)
|
|
62
|
+
*/
|
|
63
|
+
export declare class CommandHistory {
|
|
64
|
+
commands: string[];
|
|
65
|
+
add(command: string): void;
|
|
66
|
+
get(index: number): string | undefined;
|
|
67
|
+
last(n?: number): string[];
|
|
68
|
+
search(query: string): string[];
|
|
69
|
+
clear(): void;
|
|
70
|
+
toArray(): string[];
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=history-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-manager.d.ts","sourceRoot":"","sources":["../../../src/core/session/history-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAM9F,qBAAa,cAAe,YAAW,eAAe;IACpD,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,YAAY,CAAM;;IAM1B;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAY9B;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIzC;;OAEG;IACH,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,EAAE;IAKpC;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE;IAOrC;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb;;OAEG;IACH,WAAW,IAAI,MAAM,GAAG,SAAS;IAQjC;;OAEG;IACH,OAAO,IAAI,MAAM,GAAG,SAAS;IAW7B;;OAEG;IACH,UAAU,IAAI,IAAI;IAIlB;;OAEG;IACH,WAAW,IAAI,MAAM,EAAE;IAIvB;;OAEG;YACW,WAAW;IAsBzB;;OAEG;YACW,WAAW;IAczB;;OAEG;IACH,WAAW,CACT,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,GAAG,EACT,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,UAAO,EACd,QAAQ,SAAI,GACX,YAAY;CAWhB;AAED;;GAEG;AACH,qBAAa,cAAc;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAM;IAExB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAU1B,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAItC,IAAI,CAAC,CAAC,SAAI,GAAG,MAAM,EAAE;IAIrB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;IAO/B,KAAK,IAAI,IAAI;IAIb,OAAO,IAAI,MAAM,EAAE;CAGpB"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* History Manager for Nexus CLI
|
|
3
|
+
*
|
|
4
|
+
* Manages command history with persistence to disk
|
|
5
|
+
*/
|
|
6
|
+
import fs from 'fs-extra';
|
|
7
|
+
import path from 'path';
|
|
8
|
+
import os from 'os';
|
|
9
|
+
import { randomUUID } from 'crypto';
|
|
10
|
+
const HISTORY_FILE = path.join(os.homedir(), '.nexus', 'history');
|
|
11
|
+
const MAX_HISTORY_SIZE = 1000;
|
|
12
|
+
export class HistoryManager {
|
|
13
|
+
history = [];
|
|
14
|
+
currentIndex = -1;
|
|
15
|
+
constructor() {
|
|
16
|
+
this.loadHistory();
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Add command to history
|
|
20
|
+
*/
|
|
21
|
+
add(entry) {
|
|
22
|
+
this.history.push(entry);
|
|
23
|
+
// Trim to max size
|
|
24
|
+
if (this.history.length > MAX_HISTORY_SIZE) {
|
|
25
|
+
this.history = this.history.slice(-MAX_HISTORY_SIZE);
|
|
26
|
+
}
|
|
27
|
+
this.currentIndex = this.history.length;
|
|
28
|
+
this.saveHistory();
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Get entry by ID
|
|
32
|
+
*/
|
|
33
|
+
get(id) {
|
|
34
|
+
return this.history.find(entry => entry.id === id);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* List recent entries
|
|
38
|
+
*/
|
|
39
|
+
list(limit) {
|
|
40
|
+
const entries = [...this.history].reverse();
|
|
41
|
+
return limit ? entries.slice(0, limit) : entries;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Search history by query
|
|
45
|
+
*/
|
|
46
|
+
search(query) {
|
|
47
|
+
const lowerQuery = query.toLowerCase();
|
|
48
|
+
return this.history.filter(entry => entry.command.toLowerCase().includes(lowerQuery));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Clear all history
|
|
52
|
+
*/
|
|
53
|
+
clear() {
|
|
54
|
+
this.history = [];
|
|
55
|
+
this.currentIndex = -1;
|
|
56
|
+
this.saveHistory();
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Get previous command (for up arrow)
|
|
60
|
+
*/
|
|
61
|
+
getPrevious() {
|
|
62
|
+
if (this.currentIndex > 0) {
|
|
63
|
+
this.currentIndex--;
|
|
64
|
+
return this.history[this.currentIndex]?.command;
|
|
65
|
+
}
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Get next command (for down arrow)
|
|
70
|
+
*/
|
|
71
|
+
getNext() {
|
|
72
|
+
if (this.currentIndex < this.history.length - 1) {
|
|
73
|
+
this.currentIndex++;
|
|
74
|
+
return this.history[this.currentIndex]?.command;
|
|
75
|
+
}
|
|
76
|
+
else if (this.currentIndex === this.history.length - 1) {
|
|
77
|
+
this.currentIndex = this.history.length;
|
|
78
|
+
return '';
|
|
79
|
+
}
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Reset navigation index
|
|
84
|
+
*/
|
|
85
|
+
resetIndex() {
|
|
86
|
+
this.currentIndex = this.history.length;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Get all commands as strings (for readline history)
|
|
90
|
+
*/
|
|
91
|
+
getCommands() {
|
|
92
|
+
return this.history.map(entry => entry.command);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Load history from disk
|
|
96
|
+
*/
|
|
97
|
+
async loadHistory() {
|
|
98
|
+
try {
|
|
99
|
+
await fs.ensureDir(path.dirname(HISTORY_FILE));
|
|
100
|
+
if (await fs.pathExists(HISTORY_FILE)) {
|
|
101
|
+
const content = await fs.readFile(HISTORY_FILE, 'utf-8');
|
|
102
|
+
const data = JSON.parse(content);
|
|
103
|
+
if (Array.isArray(data)) {
|
|
104
|
+
this.history = data.map(entry => ({
|
|
105
|
+
...entry,
|
|
106
|
+
timestamp: new Date(entry.timestamp),
|
|
107
|
+
}));
|
|
108
|
+
this.currentIndex = this.history.length;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
// Ignore errors, start with empty history
|
|
114
|
+
console.error('Failed to load history:', error);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Save history to disk
|
|
119
|
+
*/
|
|
120
|
+
async saveHistory() {
|
|
121
|
+
try {
|
|
122
|
+
await fs.ensureDir(path.dirname(HISTORY_FILE));
|
|
123
|
+
await fs.writeFile(HISTORY_FILE, JSON.stringify(this.history, null, 2), 'utf-8');
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
// Ignore errors
|
|
127
|
+
console.error('Failed to save history:', error);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Create history entry from command
|
|
132
|
+
*/
|
|
133
|
+
createEntry(command, args, namespace, success = true, duration = 0) {
|
|
134
|
+
return {
|
|
135
|
+
id: randomUUID(),
|
|
136
|
+
timestamp: new Date(),
|
|
137
|
+
command,
|
|
138
|
+
args,
|
|
139
|
+
namespace,
|
|
140
|
+
success,
|
|
141
|
+
duration,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Command history for simple string-based history (readline integration)
|
|
147
|
+
*/
|
|
148
|
+
export class CommandHistory {
|
|
149
|
+
commands = [];
|
|
150
|
+
add(command) {
|
|
151
|
+
if (command.trim()) {
|
|
152
|
+
this.commands.push(command);
|
|
153
|
+
if (this.commands.length > MAX_HISTORY_SIZE) {
|
|
154
|
+
this.commands = this.commands.slice(-MAX_HISTORY_SIZE);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
get(index) {
|
|
159
|
+
return this.commands[index];
|
|
160
|
+
}
|
|
161
|
+
last(n = 1) {
|
|
162
|
+
return this.commands.slice(-n);
|
|
163
|
+
}
|
|
164
|
+
search(query) {
|
|
165
|
+
const lowerQuery = query.toLowerCase();
|
|
166
|
+
return this.commands.filter(cmd => cmd.toLowerCase().includes(lowerQuery));
|
|
167
|
+
}
|
|
168
|
+
clear() {
|
|
169
|
+
this.commands = [];
|
|
170
|
+
}
|
|
171
|
+
toArray() {
|
|
172
|
+
return [...this.commands];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=history-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-manager.js","sourceRoot":"","sources":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MAAM,CAAC,GAAG,CAAC,EAAE,CAChC,GAAG,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CACvC,CAAC;IACJ,CAAC;IAED,KAAK;QACH,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACrB,CAAC;IAED,OAAO;QACL,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Management Module Exports
|
|
3
|
+
*
|
|
4
|
+
* Session, history, and context management for Nexus CLI
|
|
5
|
+
*/
|
|
6
|
+
export { ContextManager, type REPLContext } from './context-manager.js';
|
|
7
|
+
export { HistoryManager, CommandHistory } from './history-manager.js';
|
|
8
|
+
export { SessionManager } from './session-manager.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/session/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Management Module Exports
|
|
3
|
+
*
|
|
4
|
+
* Session, history, and context management for Nexus CLI
|
|
5
|
+
*/
|
|
6
|
+
export { ContextManager } from './context-manager.js';
|
|
7
|
+
export { HistoryManager, CommandHistory } from './history-manager.js';
|
|
8
|
+
export { SessionManager } from './session-manager.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/session/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAoB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Manager for Nexus CLI
|
|
3
|
+
*
|
|
4
|
+
* Manages session checkpointing with save/load/resume functionality
|
|
5
|
+
*/
|
|
6
|
+
import type { Session, SessionStorage, SessionSummary, SessionContext, HistoryEntry, SessionResult } from '../../types/session.js';
|
|
7
|
+
export declare class SessionManager implements SessionStorage {
|
|
8
|
+
constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Save session to disk
|
|
11
|
+
*/
|
|
12
|
+
save(session: Session): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Load session by name or ID
|
|
15
|
+
*/
|
|
16
|
+
load(nameOrId: string): Promise<Session | null>;
|
|
17
|
+
/**
|
|
18
|
+
* List all sessions
|
|
19
|
+
*/
|
|
20
|
+
list(): Promise<SessionSummary[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Delete session by name or ID
|
|
23
|
+
*/
|
|
24
|
+
delete(nameOrId: string): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Export session to JSON string
|
|
27
|
+
*/
|
|
28
|
+
export(nameOrId: string): Promise<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Import session from JSON string
|
|
31
|
+
*/
|
|
32
|
+
import(data: string): Promise<Session>;
|
|
33
|
+
/**
|
|
34
|
+
* Resume last session
|
|
35
|
+
*/
|
|
36
|
+
resumeLast(): Promise<Session | null>;
|
|
37
|
+
/**
|
|
38
|
+
* Create new session
|
|
39
|
+
*/
|
|
40
|
+
createSession(name: string, context: SessionContext, tags?: string[]): Session;
|
|
41
|
+
/**
|
|
42
|
+
* Update session with new history entry
|
|
43
|
+
*/
|
|
44
|
+
updateSession(session: Session, entry: HistoryEntry, result?: SessionResult): Session;
|
|
45
|
+
/**
|
|
46
|
+
* Ensure sessions directory exists
|
|
47
|
+
*/
|
|
48
|
+
private ensureSessionsDir;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=session-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-manager.d.ts","sourceRoot":"","sources":["../../../src/core/session/session-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,aAAa,EACd,MAAM,wBAAwB,CAAC;AAIhC,qBAAa,cAAe,YAAW,cAAc;;IAKnD;;OAEG;IACG,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAO3C;;OAEG;IACG,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IA0CrD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;IAuCvC;;OAEG;IACG,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAW7C;;OAEG;IACG,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAU/C;;OAEG;IACG,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAyB5C;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAW3C;;OAEG;IACH,aAAa,CACX,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,cAAc,EACvB,IAAI,GAAE,MAAM,EAAO,GAClB,OAAO;IAoBV;;OAEG;IACH,aAAa,CACX,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,YAAY,EACnB,MAAM,CAAC,EAAE,aAAa,GACrB,OAAO;IAqBV;;OAEG;YACW,iBAAiB;CAGhC"}
|