@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,310 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Manager
|
|
3
|
+
*
|
|
4
|
+
* Manages plugin lifecycle: discovery, registration, enable/disable
|
|
5
|
+
*/
|
|
6
|
+
import fs from 'fs-extra';
|
|
7
|
+
import path from 'path';
|
|
8
|
+
import { pluginLoader } from './plugin-loader.js';
|
|
9
|
+
import { pluginValidator } from './plugin-validator.js';
|
|
10
|
+
import { getPluginsDirectory, ensureNexusDirectories } from './plugin-storage.js';
|
|
11
|
+
import { logger } from '../utils/logger.js';
|
|
12
|
+
/**
|
|
13
|
+
* Plugin Manager Class
|
|
14
|
+
*/
|
|
15
|
+
export class PluginManager {
|
|
16
|
+
plugins = new Map();
|
|
17
|
+
initialized = false;
|
|
18
|
+
/**
|
|
19
|
+
* Initialize plugin manager
|
|
20
|
+
*/
|
|
21
|
+
async initialize() {
|
|
22
|
+
if (this.initialized) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
// Ensure Nexus directories exist
|
|
27
|
+
await ensureNexusDirectories();
|
|
28
|
+
// Discover and load plugins
|
|
29
|
+
await this.discover();
|
|
30
|
+
this.initialized = true;
|
|
31
|
+
logger.info(`Plugin manager initialized with ${this.plugins.size} plugin(s)`);
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
logger.error('Failed to initialize plugin manager:', error);
|
|
35
|
+
throw error;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Discover plugins from ~/.nexus/plugins/
|
|
40
|
+
*/
|
|
41
|
+
async discover() {
|
|
42
|
+
const pluginsDir = getPluginsDirectory();
|
|
43
|
+
const discoveredPlugins = [];
|
|
44
|
+
try {
|
|
45
|
+
// Ensure plugins directory exists
|
|
46
|
+
await fs.ensureDir(pluginsDir);
|
|
47
|
+
// Read plugin directories
|
|
48
|
+
const entries = await fs.readdir(pluginsDir, { withFileTypes: true });
|
|
49
|
+
for (const entry of entries) {
|
|
50
|
+
if (!entry.isDirectory()) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
const pluginPath = path.join(pluginsDir, entry.name);
|
|
54
|
+
try {
|
|
55
|
+
// Check if plugin.json exists
|
|
56
|
+
const manifestPath = path.join(pluginPath, 'plugin.json');
|
|
57
|
+
if (!(await fs.pathExists(manifestPath))) {
|
|
58
|
+
logger.warn(`Skipping ${entry.name}: No plugin.json found`);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
// Load plugin
|
|
62
|
+
const plugin = await pluginLoader.load(pluginPath);
|
|
63
|
+
// Validate plugin
|
|
64
|
+
const validationResult = pluginValidator.validatePlugin(plugin);
|
|
65
|
+
if (!validationResult.valid) {
|
|
66
|
+
logger.error(`Plugin ${plugin.name} validation failed:`, validationResult.errors.join(', '));
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
// Show warnings
|
|
70
|
+
if (validationResult.warnings.length > 0) {
|
|
71
|
+
logger.warn(`Plugin ${plugin.name} warnings:`, validationResult.warnings.join(', '));
|
|
72
|
+
}
|
|
73
|
+
discoveredPlugins.push(plugin);
|
|
74
|
+
logger.info(`Discovered plugin: ${plugin.name} v${plugin.version}`);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
logger.error(`Failed to load plugin from ${entry.name}:`, error);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return discoveredPlugins;
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
logger.error('Failed to discover plugins:', error);
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Register plugin
|
|
89
|
+
*/
|
|
90
|
+
async register(plugin) {
|
|
91
|
+
try {
|
|
92
|
+
// Validate plugin
|
|
93
|
+
const validationResult = pluginValidator.validatePlugin(plugin);
|
|
94
|
+
if (!validationResult.valid) {
|
|
95
|
+
throw new Error(`Plugin validation failed: ${validationResult.errors.join(', ')}`);
|
|
96
|
+
}
|
|
97
|
+
// Check if already registered
|
|
98
|
+
if (this.plugins.has(plugin.name)) {
|
|
99
|
+
throw new Error(`Plugin ${plugin.name} is already registered`);
|
|
100
|
+
}
|
|
101
|
+
// Call onLoad hook
|
|
102
|
+
await pluginLoader.executePluginHook(plugin, 'onLoad');
|
|
103
|
+
// Register plugin
|
|
104
|
+
this.plugins.set(plugin.name, plugin);
|
|
105
|
+
logger.info(`Plugin registered: ${plugin.name} v${plugin.version}`);
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
logger.error(`Failed to register plugin ${plugin.name}:`, error);
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Unregister plugin
|
|
114
|
+
*/
|
|
115
|
+
async unregister(name) {
|
|
116
|
+
const plugin = this.plugins.get(name);
|
|
117
|
+
if (!plugin) {
|
|
118
|
+
throw new Error(`Plugin ${name} not found`);
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
// Call onUnload hook
|
|
122
|
+
await pluginLoader.executePluginHook(plugin, 'onUnload');
|
|
123
|
+
// Unregister
|
|
124
|
+
this.plugins.delete(name);
|
|
125
|
+
logger.info(`Plugin unregistered: ${name}`);
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
logger.error(`Failed to unregister plugin ${name}:`, error);
|
|
129
|
+
throw error;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Get plugin by name
|
|
134
|
+
*/
|
|
135
|
+
get(name) {
|
|
136
|
+
return this.plugins.get(name);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* List all plugins
|
|
140
|
+
*/
|
|
141
|
+
list() {
|
|
142
|
+
return Array.from(this.plugins.values());
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Enable plugin
|
|
146
|
+
*/
|
|
147
|
+
async enable(name) {
|
|
148
|
+
const plugin = this.plugins.get(name);
|
|
149
|
+
if (!plugin) {
|
|
150
|
+
throw new Error(`Plugin ${name} not found`);
|
|
151
|
+
}
|
|
152
|
+
if (plugin.enabled) {
|
|
153
|
+
logger.info(`Plugin ${name} is already enabled`);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
try {
|
|
157
|
+
// Call onEnable hook
|
|
158
|
+
await pluginLoader.executePluginHook(plugin, 'onEnable');
|
|
159
|
+
// Mark as enabled
|
|
160
|
+
plugin.enabled = true;
|
|
161
|
+
// Persist state
|
|
162
|
+
await this.persistPluginState(plugin);
|
|
163
|
+
logger.info(`Plugin enabled: ${name}`);
|
|
164
|
+
}
|
|
165
|
+
catch (error) {
|
|
166
|
+
logger.error(`Failed to enable plugin ${name}:`, error);
|
|
167
|
+
throw error;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Disable plugin
|
|
172
|
+
*/
|
|
173
|
+
async disable(name) {
|
|
174
|
+
const plugin = this.plugins.get(name);
|
|
175
|
+
if (!plugin) {
|
|
176
|
+
throw new Error(`Plugin ${name} not found`);
|
|
177
|
+
}
|
|
178
|
+
if (!plugin.enabled) {
|
|
179
|
+
logger.info(`Plugin ${name} is already disabled`);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
try {
|
|
183
|
+
// Call onDisable hook
|
|
184
|
+
await pluginLoader.executePluginHook(plugin, 'onDisable');
|
|
185
|
+
// Mark as disabled
|
|
186
|
+
plugin.enabled = false;
|
|
187
|
+
// Persist state
|
|
188
|
+
await this.persistPluginState(plugin);
|
|
189
|
+
logger.info(`Plugin disabled: ${name}`);
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
logger.error(`Failed to disable plugin ${name}:`, error);
|
|
193
|
+
throw error;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Update plugin
|
|
198
|
+
*/
|
|
199
|
+
async update(name) {
|
|
200
|
+
const plugin = this.plugins.get(name);
|
|
201
|
+
if (!plugin) {
|
|
202
|
+
throw new Error(`Plugin ${name} not found`);
|
|
203
|
+
}
|
|
204
|
+
try {
|
|
205
|
+
// Unregister current version
|
|
206
|
+
await this.unregister(name);
|
|
207
|
+
// Reload plugin
|
|
208
|
+
const pluginPath = path.join(getPluginsDirectory(), name);
|
|
209
|
+
const updatedPlugin = await pluginLoader.load(pluginPath);
|
|
210
|
+
// Register updated version
|
|
211
|
+
await this.register(updatedPlugin);
|
|
212
|
+
logger.info(`Plugin updated: ${name} to v${updatedPlugin.version}`);
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
logger.error(`Failed to update plugin ${name}:`, error);
|
|
216
|
+
throw error;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Install plugin from path
|
|
221
|
+
*/
|
|
222
|
+
async install(sourcePath) {
|
|
223
|
+
try {
|
|
224
|
+
// Load plugin from source
|
|
225
|
+
const plugin = await pluginLoader.load(sourcePath);
|
|
226
|
+
// Validate plugin
|
|
227
|
+
const validationResult = pluginValidator.validatePlugin(plugin);
|
|
228
|
+
if (!validationResult.valid) {
|
|
229
|
+
throw new Error(`Plugin validation failed: ${validationResult.errors.join(', ')}`);
|
|
230
|
+
}
|
|
231
|
+
// Copy plugin to plugins directory
|
|
232
|
+
const destPath = path.join(getPluginsDirectory(), plugin.name);
|
|
233
|
+
if (await fs.pathExists(destPath)) {
|
|
234
|
+
throw new Error(`Plugin ${plugin.name} already exists. Use update to upgrade.`);
|
|
235
|
+
}
|
|
236
|
+
await fs.copy(sourcePath, destPath);
|
|
237
|
+
// Register plugin
|
|
238
|
+
await this.register(plugin);
|
|
239
|
+
logger.info(`Plugin installed: ${plugin.name} v${plugin.version}`);
|
|
240
|
+
return plugin;
|
|
241
|
+
}
|
|
242
|
+
catch (error) {
|
|
243
|
+
logger.error(`Failed to install plugin from ${sourcePath}:`, error);
|
|
244
|
+
throw error;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Uninstall plugin
|
|
249
|
+
*/
|
|
250
|
+
async uninstall(name) {
|
|
251
|
+
const plugin = this.plugins.get(name);
|
|
252
|
+
if (!plugin) {
|
|
253
|
+
throw new Error(`Plugin ${name} not found`);
|
|
254
|
+
}
|
|
255
|
+
try {
|
|
256
|
+
// Unregister plugin
|
|
257
|
+
await this.unregister(name);
|
|
258
|
+
// Remove plugin directory
|
|
259
|
+
const pluginPath = path.join(getPluginsDirectory(), name);
|
|
260
|
+
await fs.remove(pluginPath);
|
|
261
|
+
logger.info(`Plugin uninstalled: ${name}`);
|
|
262
|
+
}
|
|
263
|
+
catch (error) {
|
|
264
|
+
logger.error(`Failed to uninstall plugin ${name}:`, error);
|
|
265
|
+
throw error;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Get enabled plugins
|
|
270
|
+
*/
|
|
271
|
+
getEnabledPlugins() {
|
|
272
|
+
return this.list().filter((plugin) => plugin.enabled);
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Get disabled plugins
|
|
276
|
+
*/
|
|
277
|
+
getDisabledPlugins() {
|
|
278
|
+
return this.list().filter((plugin) => !plugin.enabled);
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Persist plugin state to disk
|
|
282
|
+
*/
|
|
283
|
+
async persistPluginState(plugin) {
|
|
284
|
+
const pluginPath = path.join(getPluginsDirectory(), plugin.name);
|
|
285
|
+
const statePath = path.join(pluginPath, '.plugin-state.json');
|
|
286
|
+
const state = {
|
|
287
|
+
enabled: plugin.enabled,
|
|
288
|
+
installed: plugin.installed,
|
|
289
|
+
lastUpdated: new Date().toISOString(),
|
|
290
|
+
};
|
|
291
|
+
await fs.writeFile(statePath, JSON.stringify(state, null, 2));
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Load plugin state from disk
|
|
295
|
+
*/
|
|
296
|
+
async loadPluginState(plugin) {
|
|
297
|
+
const pluginPath = path.join(getPluginsDirectory(), plugin.name);
|
|
298
|
+
const statePath = path.join(pluginPath, '.plugin-state.json');
|
|
299
|
+
if (await fs.pathExists(statePath)) {
|
|
300
|
+
const state = await fs.readJson(statePath);
|
|
301
|
+
plugin.enabled = state.enabled ?? false;
|
|
302
|
+
plugin.installed = state.installed ?? true;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Singleton instance
|
|
308
|
+
*/
|
|
309
|
+
export const pluginManager = new PluginManager();
|
|
310
|
+
//# sourceMappingURL=plugin-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-manager.js","sourceRoot":"","sources":["../../src/plugins/plugin-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;GAEG;AACH,MAAM,OAAO,aAAa;IAChB,OAAO,GAAwB,IAAI,GAAG,EAAE,CAAC;IACzC,WAAW,GAAG,KAAK,CAAC;IAE5B;;OAEG;IACH,KAAK,CAAC,UAAU;QACd,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO;QACT,CAAC;QAED,IAAI,CAAC;YACH,iCAAiC;YACjC,MAAM,sBAAsB,EAAE,CAAC;YAE/B,4BAA4B;YAC5B,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;YAEtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,MAAM,CAAC,IAAI,CAAC,mCAAmC,IAAI,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,CAAC;QAChF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAK,CAAC,CAAC;YAC5D,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ;QACZ,MAAM,UAAU,GAAG,mBAAmB,EAAE,CAAC;QACzC,MAAM,iBAAiB,GAAa,EAAE,C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SACtC,CAAC;QAEF,MAAM,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,eAAe,CAAC,MAAc;QAC1C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QACjE,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC;QAE9D,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YACnC,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YAC3C,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC;YACxC,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC;QAC7C,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin SDK
|
|
3
|
+
*
|
|
4
|
+
* API for plugin developers to create Nexus plugins
|
|
5
|
+
*/
|
|
6
|
+
import type { Plugin, PluginCommand, PluginCommandHandler, PluginPermission, MCPServerConfig, PluginContext, PluginLogger, PluginArgument, PluginOption } from '../types/plugin.js';
|
|
7
|
+
import { createPluginStorage, type PluginStorage } from './plugin-storage.js';
|
|
8
|
+
/**
|
|
9
|
+
* Plugin Builder - Fluent API for creating plugins
|
|
10
|
+
*/
|
|
11
|
+
export declare class PluginBuilder {
|
|
12
|
+
private plugin;
|
|
13
|
+
private commands;
|
|
14
|
+
private permissions;
|
|
15
|
+
private dependencies;
|
|
16
|
+
private hooks;
|
|
17
|
+
private mcpConfig?;
|
|
18
|
+
private constructor();
|
|
19
|
+
/**
|
|
20
|
+
* Create new plugin builder
|
|
21
|
+
*/
|
|
22
|
+
static create(name: string): PluginBuilder;
|
|
23
|
+
/**
|
|
24
|
+
* Set plugin version
|
|
25
|
+
*/
|
|
26
|
+
version(version: string): this;
|
|
27
|
+
/**
|
|
28
|
+
* Set plugin description
|
|
29
|
+
*/
|
|
30
|
+
description(description: string): this;
|
|
31
|
+
/**
|
|
32
|
+
* Set plugin author
|
|
33
|
+
*/
|
|
34
|
+
author(author: string): this;
|
|
35
|
+
/**
|
|
36
|
+
* Set plugin homepage
|
|
37
|
+
*/
|
|
38
|
+
homepage(homepage: string): this;
|
|
39
|
+
/**
|
|
40
|
+
* Set plugin repository
|
|
41
|
+
*/
|
|
42
|
+
repository(repository: string): this;
|
|
43
|
+
/**
|
|
44
|
+
* Set main entry file
|
|
45
|
+
*/
|
|
46
|
+
main(main: string): this;
|
|
47
|
+
/**
|
|
48
|
+
* Add command to plugin
|
|
49
|
+
*/
|
|
50
|
+
command(name: string, config: {
|
|
51
|
+
description: string;
|
|
52
|
+
args?: PluginArgument[];
|
|
53
|
+
options?: PluginOption[];
|
|
54
|
+
handler: PluginCommandHandler;
|
|
55
|
+
examples?: string[];
|
|
56
|
+
}): this;
|
|
57
|
+
/**
|
|
58
|
+
* Add onLoad lifecycle hook
|
|
59
|
+
*/
|
|
60
|
+
onLoad(handler: () => Promise<void>): this;
|
|
61
|
+
/**
|
|
62
|
+
* Add onUnload lifecycle hook
|
|
63
|
+
*/
|
|
64
|
+
onUnload(handler: () => Promise<void>): this;
|
|
65
|
+
/**
|
|
66
|
+
* Add onEnable lifecycle hook
|
|
67
|
+
*/
|
|
68
|
+
onEnable(handler: () => Promise<void>): this;
|
|
69
|
+
/**
|
|
70
|
+
* Add onDisable lifecycle hook
|
|
71
|
+
*/
|
|
72
|
+
onDisable(handler: () => Promise<void>): this;
|
|
73
|
+
/**
|
|
74
|
+
* Add permission to plugin
|
|
75
|
+
*/
|
|
76
|
+
permission(permission: PluginPermission | string): this;
|
|
77
|
+
/**
|
|
78
|
+
* Add service dependency
|
|
79
|
+
*/
|
|
80
|
+
dependency(service: string): this;
|
|
81
|
+
/**
|
|
82
|
+
* Configure MCP server
|
|
83
|
+
*/
|
|
84
|
+
mcp(config: MCPServerConfig): this;
|
|
85
|
+
/**
|
|
86
|
+
* Build plugin
|
|
87
|
+
*/
|
|
88
|
+
build(): Plugin;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Create plugin logger
|
|
92
|
+
*/
|
|
93
|
+
export declare function createPluginLogger(pluginName: string): PluginLogger;
|
|
94
|
+
/**
|
|
95
|
+
* Create plugin context
|
|
96
|
+
*/
|
|
97
|
+
export declare function createPluginContext(pluginName: string, services?: any, transport?: any): PluginContext;
|
|
98
|
+
/**
|
|
99
|
+
* Helper to create file permission
|
|
100
|
+
*/
|
|
101
|
+
export declare function filePermission(scope: string, level?: 'read' | 'write' | 'execute'): PluginPermission;
|
|
102
|
+
/**
|
|
103
|
+
* Helper to create network permission
|
|
104
|
+
*/
|
|
105
|
+
export declare function networkPermission(scope: string, level?: 'read' | 'write' | 'execute'): PluginPermission;
|
|
106
|
+
/**
|
|
107
|
+
* Helper to create service permission
|
|
108
|
+
*/
|
|
109
|
+
export declare function servicePermission(scope: string, level?: 'read' | 'write' | 'execute'): PluginPermission;
|
|
110
|
+
/**
|
|
111
|
+
* Helper to create system permission
|
|
112
|
+
*/
|
|
113
|
+
export declare function systemPermission(scope: string, level?: 'read' | 'write' | 'execute'): PluginPermission;
|
|
114
|
+
/**
|
|
115
|
+
* Helper to create plugin argument
|
|
116
|
+
*/
|
|
117
|
+
export declare function arg(name: string, config: {
|
|
118
|
+
description: string;
|
|
119
|
+
required?: boolean;
|
|
120
|
+
type?: string;
|
|
121
|
+
default?: any;
|
|
122
|
+
}): PluginArgument;
|
|
123
|
+
/**
|
|
124
|
+
* Helper to create plugin option
|
|
125
|
+
*/
|
|
126
|
+
export declare function option(long: string, config: {
|
|
127
|
+
short?: string;
|
|
128
|
+
description: string;
|
|
129
|
+
type?: string;
|
|
130
|
+
default?: any;
|
|
131
|
+
}): PluginOption;
|
|
132
|
+
/**
|
|
133
|
+
* Export all SDK components
|
|
134
|
+
*/
|
|
135
|
+
export { type Plugin, type PluginCommand, type PluginCommandHandler, type PluginPermission, type PluginContext, type PluginLogger, type PluginStorage, type MCPServerConfig, type PluginArgument, type PluginOption, createPluginStorage, };
|
|
136
|
+
//# sourceMappingURL=plugin-sdk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-sdk.d.ts","sourceRoot":"","sources":["../../src/plugins/plugin-sdk.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,cAAc,EACd,YAAY,EACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE9E;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,KAAK,CAKN;IACP,OAAO,CAAC,SAAS,CAAC,CAAkB;IAEpC,OAAO;IAaP;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa;IAI1C;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAK9B;;OAEG;IACH,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAKtC;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK5B;;OAEG;IACH,QAAQ,CAAC,QAA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