@tianshu-ai/tianshu 0.3.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/LICENSE +200 -0
- package/README.md +284 -0
- package/README.zh-CN.md +136 -0
- package/bin/tianshu.mjs +32 -0
- package/package.json +60 -0
- package/packages/plugin-sdk/dist/agent-loop.d.ts +96 -0
- package/packages/plugin-sdk/dist/agent-loop.d.ts.map +1 -0
- package/packages/plugin-sdk/dist/agent-loop.js +11 -0
- package/packages/plugin-sdk/dist/agent-loop.js.map +1 -0
- package/packages/plugin-sdk/dist/capabilities.d.ts +48 -0
- package/packages/plugin-sdk/dist/capabilities.d.ts.map +1 -0
- package/packages/plugin-sdk/dist/capabilities.js +61 -0
- package/packages/plugin-sdk/dist/capabilities.js.map +1 -0
- package/packages/plugin-sdk/dist/catalog.d.ts +60 -0
- package/packages/plugin-sdk/dist/catalog.d.ts.map +1 -0
- package/packages/plugin-sdk/dist/catalog.js +11 -0
- package/packages/plugin-sdk/dist/catalog.js.map +1 -0
- package/packages/plugin-sdk/dist/client.d.ts +171 -0
- package/packages/plugin-sdk/dist/client.d.ts.map +1 -0
- package/packages/plugin-sdk/dist/client.js +96 -0
- package/packages/plugin-sdk/dist/client.js.map +1 -0
- package/packages/plugin-sdk/dist/index.d.ts +9 -0
- package/packages/plugin-sdk/dist/index.d.ts.map +1 -0
- package/packages/plugin-sdk/dist/index.js +19 -0
- package/packages/plugin-sdk/dist/index.js.map +1 -0
- package/packages/plugin-sdk/dist/lsp.d.ts +32 -0
- package/packages/plugin-sdk/dist/lsp.d.ts.map +1 -0
- package/packages/plugin-sdk/dist/lsp.js +19 -0
- package/packages/plugin-sdk/dist/lsp.js.map +1 -0
- package/packages/plugin-sdk/dist/manifest.d.ts +423 -0
- package/packages/plugin-sdk/dist/manifest.d.ts.map +1 -0
- package/packages/plugin-sdk/dist/manifest.js +7 -0
- package/packages/plugin-sdk/dist/manifest.js.map +1 -0
- package/packages/plugin-sdk/dist/mcp-client.d.ts +74 -0
- package/packages/plugin-sdk/dist/mcp-client.d.ts.map +1 -0
- package/packages/plugin-sdk/dist/mcp-client.js +226 -0
- package/packages/plugin-sdk/dist/mcp-client.js.map +1 -0
- package/packages/plugin-sdk/dist/mcp-fetch.d.ts +10 -0
- package/packages/plugin-sdk/dist/mcp-fetch.d.ts.map +1 -0
- package/packages/plugin-sdk/dist/mcp-fetch.js +130 -0
- package/packages/plugin-sdk/dist/mcp-fetch.js.map +1 -0
- package/packages/plugin-sdk/dist/mcp-toolset.d.ts +128 -0
- package/packages/plugin-sdk/dist/mcp-toolset.d.ts.map +1 -0
- package/packages/plugin-sdk/dist/mcp-toolset.js +246 -0
- package/packages/plugin-sdk/dist/mcp-toolset.js.map +1 -0
- package/packages/plugin-sdk/dist/server.d.ts +486 -0
- package/packages/plugin-sdk/dist/server.d.ts.map +1 -0
- package/packages/plugin-sdk/dist/server.js +10 -0
- package/packages/plugin-sdk/dist/server.js.map +1 -0
- package/packages/plugin-sdk/dist/session-inbox.d.ts +56 -0
- package/packages/plugin-sdk/dist/session-inbox.d.ts.map +1 -0
- package/packages/plugin-sdk/dist/session-inbox.js +12 -0
- package/packages/plugin-sdk/dist/session-inbox.js.map +1 -0
- package/packages/plugin-sdk/package.json +36 -0
- package/packages/server/builtinConfig/plugins/README.md +1 -0
- package/packages/server/builtinConfig/plugins/files/manifest.json +100 -0
- package/packages/server/builtinConfig/plugins/files/skills/files-workspace-layout.md +29 -0
- package/packages/server/builtinConfig/plugins/microsandbox/manifest.json +177 -0
- package/packages/server/builtinConfig/plugins/microsandbox/skills/microsandbox-browser-howto.md +155 -0
- package/packages/server/builtinConfig/plugins/microsandbox/skills/microsandbox-build-use.md +201 -0
- package/packages/server/builtinConfig/plugins/microsandbox/skills/microsandbox-config.md +38 -0
- package/packages/server/builtinConfig/plugins/microsandbox/skills/microsandbox-exec-howto.md +144 -0
- package/packages/server/builtinConfig/plugins/microsandbox/skills/microsandbox-libreoffice.md +159 -0
- package/packages/server/builtinConfig/plugins/microsandbox/skills/microsandbox-main-orchestration.md +75 -0
- package/packages/server/builtinConfig/plugins/microsandbox/templates/README.md +26 -0
- package/packages/server/builtinConfig/plugins/microsandbox/templates/browser.yaml +105 -0
- package/packages/server/builtinConfig/plugins/microsandbox/templates/task-runner-with-browser.yaml +80 -0
- package/packages/server/builtinConfig/plugins/microsandbox/templates/task-runner.yaml +80 -0
- package/packages/server/builtinConfig/plugins/web-search/manifest.json +65 -0
- package/packages/server/builtinConfig/plugins/web-search/skills/web-search-howto.md +69 -0
- package/packages/server/builtinConfig/plugins/workboard/agent-seeds/echo-demo/agent.json +7 -0
- package/packages/server/builtinConfig/plugins/workboard/agent-seeds/llm-default/SOUL.md +53 -0
- package/packages/server/builtinConfig/plugins/workboard/agent-seeds/llm-default/agent.json +7 -0
- package/packages/server/builtinConfig/plugins/workboard/manifest.json +180 -0
- package/packages/server/builtinConfig/plugins/workboard/skills/large-input-large-output.md +185 -0
- package/packages/server/builtinConfig/plugins/workboard/skills/workboard-howto.md +166 -0
- package/packages/server/builtinConfig/plugins/workboard/skills/worker-creator.md +267 -0
- package/packages/server/builtinConfig/plugins/workboard/skills/worker-fleet.md +431 -0
- package/packages/server/dist/catalog.d.ts +52 -0
- package/packages/server/dist/catalog.d.ts.map +1 -0
- package/packages/server/dist/catalog.js +189 -0
- package/packages/server/dist/catalog.js.map +1 -0
- package/packages/server/dist/chat/active-harnesses.d.ts +34 -0
- package/packages/server/dist/chat/active-harnesses.d.ts.map +1 -0
- package/packages/server/dist/chat/active-harnesses.js +118 -0
- package/packages/server/dist/chat/active-harnesses.js.map +1 -0
- package/packages/server/dist/chat/agent-loop.d.ts +64 -0
- package/packages/server/dist/chat/agent-loop.d.ts.map +1 -0
- package/packages/server/dist/chat/agent-loop.js +597 -0
- package/packages/server/dist/chat/agent-loop.js.map +1 -0
- package/packages/server/dist/chat/agent-tool-adapter.d.ts +33 -0
- package/packages/server/dist/chat/agent-tool-adapter.d.ts.map +1 -0
- package/packages/server/dist/chat/agent-tool-adapter.js +260 -0
- package/packages/server/dist/chat/agent-tool-adapter.js.map +1 -0
- package/packages/server/dist/chat/compact.d.ts +52 -0
- package/packages/server/dist/chat/compact.d.ts.map +1 -0
- package/packages/server/dist/chat/compact.js +248 -0
- package/packages/server/dist/chat/compact.js.map +1 -0
- package/packages/server/dist/chat/dump-system-prompt.d.ts +17 -0
- package/packages/server/dist/chat/dump-system-prompt.d.ts.map +1 -0
- package/packages/server/dist/chat/dump-system-prompt.js +58 -0
- package/packages/server/dist/chat/dump-system-prompt.js.map +1 -0
- package/packages/server/dist/chat/handler.d.ts +186 -0
- package/packages/server/dist/chat/handler.d.ts.map +1 -0
- package/packages/server/dist/chat/handler.js +1248 -0
- package/packages/server/dist/chat/handler.js.map +1 -0
- package/packages/server/dist/chat/image-fit.d.ts +34 -0
- package/packages/server/dist/chat/image-fit.d.ts.map +1 -0
- package/packages/server/dist/chat/image-fit.js +157 -0
- package/packages/server/dist/chat/image-fit.js.map +1 -0
- package/packages/server/dist/chat/messages.d.ts +118 -0
- package/packages/server/dist/chat/messages.d.ts.map +1 -0
- package/packages/server/dist/chat/messages.js +341 -0
- package/packages/server/dist/chat/messages.js.map +1 -0
- package/packages/server/dist/chat/session-inbox.d.ts +114 -0
- package/packages/server/dist/chat/session-inbox.d.ts.map +1 -0
- package/packages/server/dist/chat/session-inbox.js +418 -0
- package/packages/server/dist/chat/session-inbox.js.map +1 -0
- package/packages/server/dist/chat/sqlite-session-repo.d.ts +26 -0
- package/packages/server/dist/chat/sqlite-session-repo.d.ts.map +1 -0
- package/packages/server/dist/chat/sqlite-session-repo.js +132 -0
- package/packages/server/dist/chat/sqlite-session-repo.js.map +1 -0
- package/packages/server/dist/chat/sqlite-session-storage.d.ts +83 -0
- package/packages/server/dist/chat/sqlite-session-storage.d.ts.map +1 -0
- package/packages/server/dist/chat/sqlite-session-storage.js +418 -0
- package/packages/server/dist/chat/sqlite-session-storage.js.map +1 -0
- package/packages/server/dist/chat/stub-execution-env.d.ts +3 -0
- package/packages/server/dist/chat/stub-execution-env.d.ts.map +1 -0
- package/packages/server/dist/chat/stub-execution-env.js +87 -0
- package/packages/server/dist/chat/stub-execution-env.js.map +1 -0
- package/packages/server/dist/chat/token-estimate.d.ts +11 -0
- package/packages/server/dist/chat/token-estimate.d.ts.map +1 -0
- package/packages/server/dist/chat/token-estimate.js +67 -0
- package/packages/server/dist/chat/token-estimate.js.map +1 -0
- package/packages/server/dist/chat/ws-protocol.d.ts +244 -0
- package/packages/server/dist/chat/ws-protocol.d.ts.map +1 -0
- package/packages/server/dist/chat/ws-protocol.js +193 -0
- package/packages/server/dist/chat/ws-protocol.js.map +1 -0
- package/packages/server/dist/cli.d.ts +9 -0
- package/packages/server/dist/cli.d.ts.map +1 -0
- package/packages/server/dist/cli.js +329 -0
- package/packages/server/dist/cli.js.map +1 -0
- package/packages/server/dist/core/agent-seeds.d.ts +25 -0
- package/packages/server/dist/core/agent-seeds.d.ts.map +1 -0
- package/packages/server/dist/core/agent-seeds.js +69 -0
- package/packages/server/dist/core/agent-seeds.js.map +1 -0
- package/packages/server/dist/core/config.d.ts +172 -0
- package/packages/server/dist/core/config.d.ts.map +1 -0
- package/packages/server/dist/core/config.js +155 -0
- package/packages/server/dist/core/config.js.map +1 -0
- package/packages/server/dist/core/db-pool.d.ts +32 -0
- package/packages/server/dist/core/db-pool.d.ts.map +1 -0
- package/packages/server/dist/core/db-pool.js +108 -0
- package/packages/server/dist/core/db-pool.js.map +1 -0
- package/packages/server/dist/core/dev-mode.d.ts +13 -0
- package/packages/server/dist/core/dev-mode.d.ts.map +1 -0
- package/packages/server/dist/core/dev-mode.js +51 -0
- package/packages/server/dist/core/dev-mode.js.map +1 -0
- package/packages/server/dist/core/global-ops.d.ts +54 -0
- package/packages/server/dist/core/global-ops.d.ts.map +1 -0
- package/packages/server/dist/core/global-ops.js +143 -0
- package/packages/server/dist/core/global-ops.js.map +1 -0
- package/packages/server/dist/core/identity-resolvers.d.ts +102 -0
- package/packages/server/dist/core/identity-resolvers.d.ts.map +1 -0
- package/packages/server/dist/core/identity-resolvers.js +176 -0
- package/packages/server/dist/core/identity-resolvers.js.map +1 -0
- package/packages/server/dist/core/index.d.ts +13 -0
- package/packages/server/dist/core/index.d.ts.map +1 -0
- package/packages/server/dist/core/index.js +18 -0
- package/packages/server/dist/core/index.js.map +1 -0
- package/packages/server/dist/core/llm.d.ts +45 -0
- package/packages/server/dist/core/llm.d.ts.map +1 -0
- package/packages/server/dist/core/llm.js +140 -0
- package/packages/server/dist/core/llm.js.map +1 -0
- package/packages/server/dist/core/mcp-manager.d.ts +47 -0
- package/packages/server/dist/core/mcp-manager.d.ts.map +1 -0
- package/packages/server/dist/core/mcp-manager.js +129 -0
- package/packages/server/dist/core/mcp-manager.js.map +1 -0
- package/packages/server/dist/core/middleware.d.ts +31 -0
- package/packages/server/dist/core/middleware.d.ts.map +1 -0
- package/packages/server/dist/core/middleware.js +102 -0
- package/packages/server/dist/core/middleware.js.map +1 -0
- package/packages/server/dist/core/migrations/001-initial.d.ts +4 -0
- package/packages/server/dist/core/migrations/001-initial.d.ts.map +1 -0
- package/packages/server/dist/core/migrations/001-initial.js +66 -0
- package/packages/server/dist/core/migrations/001-initial.js.map +1 -0
- package/packages/server/dist/core/migrations/002-task-dependencies.d.ts +4 -0
- package/packages/server/dist/core/migrations/002-task-dependencies.d.ts.map +1 -0
- package/packages/server/dist/core/migrations/002-task-dependencies.js +20 -0
- package/packages/server/dist/core/migrations/002-task-dependencies.js.map +1 -0
- package/packages/server/dist/core/migrations/003-session-tree.d.ts +4 -0
- package/packages/server/dist/core/migrations/003-session-tree.d.ts.map +1 -0
- package/packages/server/dist/core/migrations/003-session-tree.js +96 -0
- package/packages/server/dist/core/migrations/003-session-tree.js.map +1 -0
- package/packages/server/dist/core/migrations/003-worker-agents.d.ts +4 -0
- package/packages/server/dist/core/migrations/003-worker-agents.d.ts.map +1 -0
- package/packages/server/dist/core/migrations/003-worker-agents.js +65 -0
- package/packages/server/dist/core/migrations/003-worker-agents.js.map +1 -0
- package/packages/server/dist/core/migrations/004-rebuild-message-chain.d.ts +4 -0
- package/packages/server/dist/core/migrations/004-rebuild-message-chain.d.ts.map +1 -0
- package/packages/server/dist/core/migrations/004-rebuild-message-chain.js +52 -0
- package/packages/server/dist/core/migrations/004-rebuild-message-chain.js.map +1 -0
- package/packages/server/dist/core/migrations/005-task-status-rename.d.ts +4 -0
- package/packages/server/dist/core/migrations/005-task-status-rename.d.ts.map +1 -0
- package/packages/server/dist/core/migrations/005-task-status-rename.js +64 -0
- package/packages/server/dist/core/migrations/005-task-status-rename.js.map +1 -0
- package/packages/server/dist/core/migrations/006-task-labels.d.ts +4 -0
- package/packages/server/dist/core/migrations/006-task-labels.d.ts.map +1 -0
- package/packages/server/dist/core/migrations/006-task-labels.js +43 -0
- package/packages/server/dist/core/migrations/006-task-labels.js.map +1 -0
- package/packages/server/dist/core/migrations/007-session-inbox.d.ts +4 -0
- package/packages/server/dist/core/migrations/007-session-inbox.d.ts.map +1 -0
- package/packages/server/dist/core/migrations/007-session-inbox.js +67 -0
- package/packages/server/dist/core/migrations/007-session-inbox.js.map +1 -0
- package/packages/server/dist/core/migrations/008-task-intervention.d.ts +4 -0
- package/packages/server/dist/core/migrations/008-task-intervention.d.ts.map +1 -0
- package/packages/server/dist/core/migrations/008-task-intervention.js +60 -0
- package/packages/server/dist/core/migrations/008-task-intervention.js.map +1 -0
- package/packages/server/dist/core/migrations/index.d.ts +12 -0
- package/packages/server/dist/core/migrations/index.d.ts.map +1 -0
- package/packages/server/dist/core/migrations/index.js +58 -0
- package/packages/server/dist/core/migrations/index.js.map +1 -0
- package/packages/server/dist/core/paths.d.ts +53 -0
- package/packages/server/dist/core/paths.d.ts.map +1 -0
- package/packages/server/dist/core/paths.js +125 -0
- package/packages/server/dist/core/paths.js.map +1 -0
- package/packages/server/dist/core/plugins/builtin-loader.d.ts +56 -0
- package/packages/server/dist/core/plugins/builtin-loader.d.ts.map +1 -0
- package/packages/server/dist/core/plugins/builtin-loader.js +153 -0
- package/packages/server/dist/core/plugins/builtin-loader.js.map +1 -0
- package/packages/server/dist/core/plugins/discovery.d.ts +28 -0
- package/packages/server/dist/core/plugins/discovery.d.ts.map +1 -0
- package/packages/server/dist/core/plugins/discovery.js +97 -0
- package/packages/server/dist/core/plugins/discovery.js.map +1 -0
- package/packages/server/dist/core/plugins/index.d.ts +6 -0
- package/packages/server/dist/core/plugins/index.d.ts.map +1 -0
- package/packages/server/dist/core/plugins/index.js +6 -0
- package/packages/server/dist/core/plugins/index.js.map +1 -0
- package/packages/server/dist/core/plugins/manifest.d.ts +9 -0
- package/packages/server/dist/core/plugins/manifest.d.ts.map +1 -0
- package/packages/server/dist/core/plugins/manifest.js +584 -0
- package/packages/server/dist/core/plugins/manifest.js.map +1 -0
- package/packages/server/dist/core/plugins/registry.d.ts +269 -0
- package/packages/server/dist/core/plugins/registry.d.ts.map +1 -0
- package/packages/server/dist/core/plugins/registry.js +1003 -0
- package/packages/server/dist/core/plugins/registry.js.map +1 -0
- package/packages/server/dist/core/plugins/secrets.d.ts +46 -0
- package/packages/server/dist/core/plugins/secrets.d.ts.map +1 -0
- package/packages/server/dist/core/plugins/secrets.js +174 -0
- package/packages/server/dist/core/plugins/secrets.js.map +1 -0
- package/packages/server/dist/core/plugins/skills.d.ts +131 -0
- package/packages/server/dist/core/plugins/skills.d.ts.map +1 -0
- package/packages/server/dist/core/plugins/skills.js +389 -0
- package/packages/server/dist/core/plugins/skills.js.map +1 -0
- package/packages/server/dist/core/templates.d.ts +28 -0
- package/packages/server/dist/core/templates.d.ts.map +1 -0
- package/packages/server/dist/core/templates.js +103 -0
- package/packages/server/dist/core/templates.js.map +1 -0
- package/packages/server/dist/core/tenant-context.d.ts +18 -0
- package/packages/server/dist/core/tenant-context.d.ts.map +1 -0
- package/packages/server/dist/core/tenant-context.js +42 -0
- package/packages/server/dist/core/tenant-context.js.map +1 -0
- package/packages/server/dist/core/tenant-id.d.ts +8 -0
- package/packages/server/dist/core/tenant-id.d.ts.map +1 -0
- package/packages/server/dist/core/tenant-id.js +53 -0
- package/packages/server/dist/core/tenant-id.js.map +1 -0
- package/packages/server/dist/core/tenant-skills.d.ts +29 -0
- package/packages/server/dist/core/tenant-skills.d.ts.map +1 -0
- package/packages/server/dist/core/tenant-skills.js +77 -0
- package/packages/server/dist/core/tenant-skills.js.map +1 -0
- package/packages/server/dist/core/worker-agents-fs.d.ts +44 -0
- package/packages/server/dist/core/worker-agents-fs.d.ts.map +1 -0
- package/packages/server/dist/core/worker-agents-fs.js +86 -0
- package/packages/server/dist/core/worker-agents-fs.js.map +1 -0
- package/packages/server/dist/core/worker-agents.d.ts +77 -0
- package/packages/server/dist/core/worker-agents.d.ts.map +1 -0
- package/packages/server/dist/core/worker-agents.js +191 -0
- package/packages/server/dist/core/worker-agents.js.map +1 -0
- package/packages/server/dist/index.d.ts +2 -0
- package/packages/server/dist/index.d.ts.map +1 -0
- package/packages/server/dist/index.js +623 -0
- package/packages/server/dist/index.js.map +1 -0
- package/packages/server/dist/lsp/client.d.ts +53 -0
- package/packages/server/dist/lsp/client.d.ts.map +1 -0
- package/packages/server/dist/lsp/client.js +258 -0
- package/packages/server/dist/lsp/client.js.map +1 -0
- package/packages/server/dist/lsp/format.d.ts +13 -0
- package/packages/server/dist/lsp/format.d.ts.map +1 -0
- package/packages/server/dist/lsp/format.js +55 -0
- package/packages/server/dist/lsp/format.js.map +1 -0
- package/packages/server/dist/lsp/index.d.ts +20 -0
- package/packages/server/dist/lsp/index.d.ts.map +1 -0
- package/packages/server/dist/lsp/index.js +32 -0
- package/packages/server/dist/lsp/index.js.map +1 -0
- package/packages/server/dist/lsp/language-registry.d.ts +29 -0
- package/packages/server/dist/lsp/language-registry.d.ts.map +1 -0
- package/packages/server/dist/lsp/language-registry.js +62 -0
- package/packages/server/dist/lsp/language-registry.js.map +1 -0
- package/packages/server/dist/lsp/manager.d.ts +77 -0
- package/packages/server/dist/lsp/manager.d.ts.map +1 -0
- package/packages/server/dist/lsp/manager.js +300 -0
- package/packages/server/dist/lsp/manager.js.map +1 -0
- package/packages/server/dist/plugins-routes.d.ts +96 -0
- package/packages/server/dist/plugins-routes.d.ts.map +1 -0
- package/packages/server/dist/plugins-routes.js +627 -0
- package/packages/server/dist/plugins-routes.js.map +1 -0
- package/packages/server/dist/setup/checks/config.d.ts +9 -0
- package/packages/server/dist/setup/checks/config.d.ts.map +1 -0
- package/packages/server/dist/setup/checks/config.js +66 -0
- package/packages/server/dist/setup/checks/config.js.map +1 -0
- package/packages/server/dist/setup/checks/db.d.ts +6 -0
- package/packages/server/dist/setup/checks/db.d.ts.map +1 -0
- package/packages/server/dist/setup/checks/db.js +79 -0
- package/packages/server/dist/setup/checks/db.js.map +1 -0
- package/packages/server/dist/setup/checks/known-models.d.ts +18 -0
- package/packages/server/dist/setup/checks/known-models.d.ts.map +1 -0
- package/packages/server/dist/setup/checks/known-models.js +119 -0
- package/packages/server/dist/setup/checks/known-models.js.map +1 -0
- package/packages/server/dist/setup/checks/network.d.ts +11 -0
- package/packages/server/dist/setup/checks/network.d.ts.map +1 -0
- package/packages/server/dist/setup/checks/network.js +176 -0
- package/packages/server/dist/setup/checks/network.js.map +1 -0
- package/packages/server/dist/setup/checks/plugins.d.ts +9 -0
- package/packages/server/dist/setup/checks/plugins.d.ts.map +1 -0
- package/packages/server/dist/setup/checks/plugins.js +194 -0
- package/packages/server/dist/setup/checks/plugins.js.map +1 -0
- package/packages/server/dist/setup/checks/providers.d.ts +12 -0
- package/packages/server/dist/setup/checks/providers.d.ts.map +1 -0
- package/packages/server/dist/setup/checks/providers.js +368 -0
- package/packages/server/dist/setup/checks/providers.js.map +1 -0
- package/packages/server/dist/setup/checks/runtime.d.ts +3 -0
- package/packages/server/dist/setup/checks/runtime.d.ts.map +1 -0
- package/packages/server/dist/setup/checks/runtime.js +44 -0
- package/packages/server/dist/setup/checks/runtime.js.map +1 -0
- package/packages/server/dist/setup/checks/sandbox.d.ts +9 -0
- package/packages/server/dist/setup/checks/sandbox.d.ts.map +1 -0
- package/packages/server/dist/setup/checks/sandbox.js +110 -0
- package/packages/server/dist/setup/checks/sandbox.js.map +1 -0
- package/packages/server/dist/setup/checks/tenants.d.ts +9 -0
- package/packages/server/dist/setup/checks/tenants.d.ts.map +1 -0
- package/packages/server/dist/setup/checks/tenants.js +509 -0
- package/packages/server/dist/setup/checks/tenants.js.map +1 -0
- package/packages/server/dist/setup/cli-agent.d.ts +39 -0
- package/packages/server/dist/setup/cli-agent.d.ts.map +1 -0
- package/packages/server/dist/setup/cli-agent.js +1353 -0
- package/packages/server/dist/setup/cli-agent.js.map +1 -0
- package/packages/server/dist/setup/doctor.d.ts +32 -0
- package/packages/server/dist/setup/doctor.d.ts.map +1 -0
- package/packages/server/dist/setup/doctor.js +80 -0
- package/packages/server/dist/setup/doctor.js.map +1 -0
- package/packages/server/dist/setup/launchd.d.ts +107 -0
- package/packages/server/dist/setup/launchd.d.ts.map +1 -0
- package/packages/server/dist/setup/launchd.js +309 -0
- package/packages/server/dist/setup/launchd.js.map +1 -0
- package/packages/server/dist/setup/load-env.d.ts +21 -0
- package/packages/server/dist/setup/load-env.d.ts.map +1 -0
- package/packages/server/dist/setup/load-env.js +88 -0
- package/packages/server/dist/setup/load-env.js.map +1 -0
- package/packages/server/dist/setup/probe-default-model.d.ts +28 -0
- package/packages/server/dist/setup/probe-default-model.d.ts.map +1 -0
- package/packages/server/dist/setup/probe-default-model.js +133 -0
- package/packages/server/dist/setup/probe-default-model.js.map +1 -0
- package/packages/server/dist/setup/render.d.ts +28 -0
- package/packages/server/dist/setup/render.d.ts.map +1 -0
- package/packages/server/dist/setup/render.js +60 -0
- package/packages/server/dist/setup/render.js.map +1 -0
- package/packages/server/dist/setup/repo-root.d.ts +3 -0
- package/packages/server/dist/setup/repo-root.d.ts.map +1 -0
- package/packages/server/dist/setup/repo-root.js +43 -0
- package/packages/server/dist/setup/repo-root.js.map +1 -0
- package/packages/server/dist/setup/service.d.ts +60 -0
- package/packages/server/dist/setup/service.d.ts.map +1 -0
- package/packages/server/dist/setup/service.js +345 -0
- package/packages/server/dist/setup/service.js.map +1 -0
- package/packages/server/dist/setup/start-server.d.ts +23 -0
- package/packages/server/dist/setup/start-server.d.ts.map +1 -0
- package/packages/server/dist/setup/start-server.js +465 -0
- package/packages/server/dist/setup/start-server.js.map +1 -0
- package/packages/server/dist/setup/wizard.d.ts +59 -0
- package/packages/server/dist/setup/wizard.d.ts.map +1 -0
- package/packages/server/dist/setup/wizard.js +556 -0
- package/packages/server/dist/setup/wizard.js.map +1 -0
- package/packages/server/dist/tools/edit-file.d.ts +13 -0
- package/packages/server/dist/tools/edit-file.d.ts.map +1 -0
- package/packages/server/dist/tools/edit-file.js +90 -0
- package/packages/server/dist/tools/edit-file.js.map +1 -0
- package/packages/server/dist/tools/glob.d.ts +12 -0
- package/packages/server/dist/tools/glob.d.ts.map +1 -0
- package/packages/server/dist/tools/glob.js +82 -0
- package/packages/server/dist/tools/glob.js.map +1 -0
- package/packages/server/dist/tools/index.d.ts +82 -0
- package/packages/server/dist/tools/index.d.ts.map +1 -0
- package/packages/server/dist/tools/index.js +72 -0
- package/packages/server/dist/tools/index.js.map +1 -0
- package/packages/server/dist/tools/list-dir.d.ts +24 -0
- package/packages/server/dist/tools/list-dir.d.ts.map +1 -0
- package/packages/server/dist/tools/list-dir.js +99 -0
- package/packages/server/dist/tools/list-dir.js.map +1 -0
- package/packages/server/dist/tools/path-helper.d.ts +15 -0
- package/packages/server/dist/tools/path-helper.d.ts.map +1 -0
- package/packages/server/dist/tools/path-helper.js +72 -0
- package/packages/server/dist/tools/path-helper.js.map +1 -0
- package/packages/server/dist/tools/read-file.d.ts +17 -0
- package/packages/server/dist/tools/read-file.d.ts.map +1 -0
- package/packages/server/dist/tools/read-file.js +94 -0
- package/packages/server/dist/tools/read-file.js.map +1 -0
- package/packages/server/dist/tools/sandbox.d.ts +57 -0
- package/packages/server/dist/tools/sandbox.d.ts.map +1 -0
- package/packages/server/dist/tools/sandbox.js +291 -0
- package/packages/server/dist/tools/sandbox.js.map +1 -0
- package/packages/server/dist/tools/write-file.d.ts +12 -0
- package/packages/server/dist/tools/write-file.d.ts.map +1 -0
- package/packages/server/dist/tools/write-file.js +67 -0
- package/packages/server/dist/tools/write-file.js.map +1 -0
- package/packages/server/dist/worker-agents-routes.d.ts +11 -0
- package/packages/server/dist/worker-agents-routes.d.ts.map +1 -0
- package/packages/server/dist/worker-agents-routes.js +253 -0
- package/packages/server/dist/worker-agents-routes.js.map +1 -0
- package/packages/server/package.json +41 -0
- package/packages/web/dist/assets/index-DH-gJ09_.js +60 -0
- package/packages/web/dist/assets/index-xU4lYYqY.css +2 -0
- package/packages/web/dist/index.html +14 -0
- package/packages/web/package.json +36 -0
- package/plugins/README.md +64 -0
- package/plugins/files/dist/client.d.ts +5 -0
- package/plugins/files/dist/client.d.ts.map +1 -0
- package/plugins/files/dist/client.js +354 -0
- package/plugins/files/dist/client.js.map +1 -0
- package/plugins/files/dist/server.d.ts +32 -0
- package/plugins/files/dist/server.d.ts.map +1 -0
- package/plugins/files/dist/server.js +514 -0
- package/plugins/files/dist/server.js.map +1 -0
- package/plugins/files/dist/tools/edit-file.d.ts +29 -0
- package/plugins/files/dist/tools/edit-file.d.ts.map +1 -0
- package/plugins/files/dist/tools/edit-file.js +230 -0
- package/plugins/files/dist/tools/edit-file.js.map +1 -0
- package/plugins/files/dist/tools/edit-file.prompt.md +36 -0
- package/plugins/files/dist/tools/glob.d.ts +12 -0
- package/plugins/files/dist/tools/glob.d.ts.map +1 -0
- package/plugins/files/dist/tools/glob.js +84 -0
- package/plugins/files/dist/tools/glob.js.map +1 -0
- package/plugins/files/dist/tools/index.d.ts +13 -0
- package/plugins/files/dist/tools/index.d.ts.map +1 -0
- package/plugins/files/dist/tools/index.js +158 -0
- package/plugins/files/dist/tools/index.js.map +1 -0
- package/plugins/files/dist/tools/list-dir.d.ts +24 -0
- package/plugins/files/dist/tools/list-dir.d.ts.map +1 -0
- package/plugins/files/dist/tools/list-dir.js +104 -0
- package/plugins/files/dist/tools/list-dir.js.map +1 -0
- package/plugins/files/dist/tools/load-prompt.d.ts +5 -0
- package/plugins/files/dist/tools/load-prompt.d.ts.map +1 -0
- package/plugins/files/dist/tools/load-prompt.js +39 -0
- package/plugins/files/dist/tools/load-prompt.js.map +1 -0
- package/plugins/files/dist/tools/path-helper.d.ts +32 -0
- package/plugins/files/dist/tools/path-helper.d.ts.map +1 -0
- package/plugins/files/dist/tools/path-helper.js +113 -0
- package/plugins/files/dist/tools/path-helper.js.map +1 -0
- package/plugins/files/dist/tools/read-file.d.ts +17 -0
- package/plugins/files/dist/tools/read-file.d.ts.map +1 -0
- package/plugins/files/dist/tools/read-file.js +109 -0
- package/plugins/files/dist/tools/read-file.js.map +1 -0
- package/plugins/files/dist/tools/read-tracker.d.ts +28 -0
- package/plugins/files/dist/tools/read-tracker.d.ts.map +1 -0
- package/plugins/files/dist/tools/read-tracker.js +135 -0
- package/plugins/files/dist/tools/read-tracker.js.map +1 -0
- package/plugins/files/dist/tools/replacers.d.ts +27 -0
- package/plugins/files/dist/tools/replacers.d.ts.map +1 -0
- package/plugins/files/dist/tools/replacers.js +221 -0
- package/plugins/files/dist/tools/replacers.js.map +1 -0
- package/plugins/files/dist/tools/tenant-config-delete.d.ts +12 -0
- package/plugins/files/dist/tools/tenant-config-delete.d.ts.map +1 -0
- package/plugins/files/dist/tools/tenant-config-delete.js +70 -0
- package/plugins/files/dist/tools/tenant-config-delete.js.map +1 -0
- package/plugins/files/dist/tools/tenant-config-edit.d.ts +25 -0
- package/plugins/files/dist/tools/tenant-config-edit.d.ts.map +1 -0
- package/plugins/files/dist/tools/tenant-config-edit.js +142 -0
- package/plugins/files/dist/tools/tenant-config-edit.js.map +1 -0
- package/plugins/files/dist/tools/tenant-config-glob.d.ts +12 -0
- package/plugins/files/dist/tools/tenant-config-glob.d.ts.map +1 -0
- package/plugins/files/dist/tools/tenant-config-glob.js +64 -0
- package/plugins/files/dist/tools/tenant-config-glob.js.map +1 -0
- package/plugins/files/dist/tools/tenant-config-helper.d.ts +64 -0
- package/plugins/files/dist/tools/tenant-config-helper.d.ts.map +1 -0
- package/plugins/files/dist/tools/tenant-config-helper.js +162 -0
- package/plugins/files/dist/tools/tenant-config-helper.js.map +1 -0
- package/plugins/files/dist/tools/tenant-config-list.d.ts +20 -0
- package/plugins/files/dist/tools/tenant-config-list.d.ts.map +1 -0
- package/plugins/files/dist/tools/tenant-config-list.js +95 -0
- package/plugins/files/dist/tools/tenant-config-list.js.map +1 -0
- package/plugins/files/dist/tools/tenant-config-read.d.ts +17 -0
- package/plugins/files/dist/tools/tenant-config-read.d.ts.map +1 -0
- package/plugins/files/dist/tools/tenant-config-read.js +87 -0
- package/plugins/files/dist/tools/tenant-config-read.js.map +1 -0
- package/plugins/files/dist/tools/tenant-config-write.d.ts +14 -0
- package/plugins/files/dist/tools/tenant-config-write.d.ts.map +1 -0
- package/plugins/files/dist/tools/tenant-config-write.js +78 -0
- package/plugins/files/dist/tools/tenant-config-write.js.map +1 -0
- package/plugins/files/dist/tools/text-shape.d.ts +20 -0
- package/plugins/files/dist/tools/text-shape.d.ts.map +1 -0
- package/plugins/files/dist/tools/text-shape.js +57 -0
- package/plugins/files/dist/tools/text-shape.js.map +1 -0
- package/plugins/files/dist/tools/write-file.d.ts +12 -0
- package/plugins/files/dist/tools/write-file.d.ts.map +1 -0
- package/plugins/files/dist/tools/write-file.js +89 -0
- package/plugins/files/dist/tools/write-file.js.map +1 -0
- package/plugins/files/dist/tools/write-file.prompt.md +14 -0
- package/plugins/files/manifest.json +100 -0
- package/plugins/files/package.json +39 -0
- package/plugins/files/skills/files-workspace-layout.md +29 -0
- package/plugins/microsandbox/dist/admin/browser-routes.d.ts +41 -0
- package/plugins/microsandbox/dist/admin/browser-routes.d.ts.map +1 -0
- package/plugins/microsandbox/dist/admin/browser-routes.js +208 -0
- package/plugins/microsandbox/dist/admin/browser-routes.js.map +1 -0
- package/plugins/microsandbox/dist/admin/preview-exec.d.ts +38 -0
- package/plugins/microsandbox/dist/admin/preview-exec.d.ts.map +1 -0
- package/plugins/microsandbox/dist/admin/preview-exec.js +185 -0
- package/plugins/microsandbox/dist/admin/preview-exec.js.map +1 -0
- package/plugins/microsandbox/dist/admin/routes.d.ts +35 -0
- package/plugins/microsandbox/dist/admin/routes.d.ts.map +1 -0
- package/plugins/microsandbox/dist/admin/routes.js +728 -0
- package/plugins/microsandbox/dist/admin/routes.js.map +1 -0
- package/plugins/microsandbox/dist/admin/sandboxfile-io.d.ts +11 -0
- package/plugins/microsandbox/dist/admin/sandboxfile-io.d.ts.map +1 -0
- package/plugins/microsandbox/dist/admin/sandboxfile-io.js +72 -0
- package/plugins/microsandbox/dist/admin/sandboxfile-io.js.map +1 -0
- package/plugins/microsandbox/dist/admin/templates.d.ts +16 -0
- package/plugins/microsandbox/dist/admin/templates.d.ts.map +1 -0
- package/plugins/microsandbox/dist/admin/templates.js +66 -0
- package/plugins/microsandbox/dist/admin/templates.js.map +1 -0
- package/plugins/microsandbox/dist/admin.d.ts +5 -0
- package/plugins/microsandbox/dist/admin.d.ts.map +1 -0
- package/plugins/microsandbox/dist/admin.js +256 -0
- package/plugins/microsandbox/dist/admin.js.map +1 -0
- package/plugins/microsandbox/dist/build/builder.d.ts +69 -0
- package/plugins/microsandbox/dist/build/builder.d.ts.map +1 -0
- package/plugins/microsandbox/dist/build/builder.js +257 -0
- package/plugins/microsandbox/dist/build/builder.js.map +1 -0
- package/plugins/microsandbox/dist/build/metadata.d.ts +27 -0
- package/plugins/microsandbox/dist/build/metadata.d.ts.map +1 -0
- package/plugins/microsandbox/dist/build/metadata.js +55 -0
- package/plugins/microsandbox/dist/build/metadata.js.map +1 -0
- package/plugins/microsandbox/dist/build/pointer.d.ts +51 -0
- package/plugins/microsandbox/dist/build/pointer.d.ts.map +1 -0
- package/plugins/microsandbox/dist/build/pointer.js +130 -0
- package/plugins/microsandbox/dist/build/pointer.js.map +1 -0
- package/plugins/microsandbox/dist/build/sandboxfile.d.ts +15 -0
- package/plugins/microsandbox/dist/build/sandboxfile.d.ts.map +1 -0
- package/plugins/microsandbox/dist/build/sandboxfile.js +176 -0
- package/plugins/microsandbox/dist/build/sandboxfile.js.map +1 -0
- package/plugins/microsandbox/dist/client.d.ts +5 -0
- package/plugins/microsandbox/dist/client.d.ts.map +1 -0
- package/plugins/microsandbox/dist/client.js +941 -0
- package/plugins/microsandbox/dist/client.js.map +1 -0
- package/plugins/microsandbox/dist/runner/browser.d.ts +50 -0
- package/plugins/microsandbox/dist/runner/browser.d.ts.map +1 -0
- package/plugins/microsandbox/dist/runner/browser.js +142 -0
- package/plugins/microsandbox/dist/runner/browser.js.map +1 -0
- package/plugins/microsandbox/dist/runner/free-port.d.ts +6 -0
- package/plugins/microsandbox/dist/runner/free-port.d.ts.map +1 -0
- package/plugins/microsandbox/dist/runner/free-port.js +53 -0
- package/plugins/microsandbox/dist/runner/free-port.js.map +1 -0
- package/plugins/microsandbox/dist/runner/index.d.ts +28 -0
- package/plugins/microsandbox/dist/runner/index.d.ts.map +1 -0
- package/plugins/microsandbox/dist/runner/index.js +72 -0
- package/plugins/microsandbox/dist/runner/index.js.map +1 -0
- package/plugins/microsandbox/dist/runner/microsandbox.d.ts +64 -0
- package/plugins/microsandbox/dist/runner/microsandbox.d.ts.map +1 -0
- package/plugins/microsandbox/dist/runner/microsandbox.js +668 -0
- package/plugins/microsandbox/dist/runner/microsandbox.js.map +1 -0
- package/plugins/microsandbox/dist/runner/nullable.d.ts +36 -0
- package/plugins/microsandbox/dist/runner/nullable.d.ts.map +1 -0
- package/plugins/microsandbox/dist/runner/nullable.js +82 -0
- package/plugins/microsandbox/dist/runner/nullable.js.map +1 -0
- package/plugins/microsandbox/dist/runner/pool.d.ts +97 -0
- package/plugins/microsandbox/dist/runner/pool.d.ts.map +1 -0
- package/plugins/microsandbox/dist/runner/pool.js +494 -0
- package/plugins/microsandbox/dist/runner/pool.js.map +1 -0
- package/plugins/microsandbox/dist/runner/types.d.ts +33 -0
- package/plugins/microsandbox/dist/runner/types.d.ts.map +1 -0
- package/plugins/microsandbox/dist/runner/types.js +79 -0
- package/plugins/microsandbox/dist/runner/types.js.map +1 -0
- package/plugins/microsandbox/dist/server.d.ts +7 -0
- package/plugins/microsandbox/dist/server.d.ts.map +1 -0
- package/plugins/microsandbox/dist/server.js +276 -0
- package/plugins/microsandbox/dist/server.js.map +1 -0
- package/plugins/microsandbox/dist/tools/browser.d.ts +25 -0
- package/plugins/microsandbox/dist/tools/browser.d.ts.map +1 -0
- package/plugins/microsandbox/dist/tools/browser.js +78 -0
- package/plugins/microsandbox/dist/tools/browser.js.map +1 -0
- package/plugins/microsandbox/dist/tools/build.d.ts +5 -0
- package/plugins/microsandbox/dist/tools/build.d.ts.map +1 -0
- package/plugins/microsandbox/dist/tools/build.js +243 -0
- package/plugins/microsandbox/dist/tools/build.js.map +1 -0
- package/plugins/microsandbox/dist/tools/index.d.ts +9 -0
- package/plugins/microsandbox/dist/tools/index.d.ts.map +1 -0
- package/plugins/microsandbox/dist/tools/index.js +430 -0
- package/plugins/microsandbox/dist/tools/index.js.map +1 -0
- package/plugins/microsandbox/dist/tools/mcp-client.d.ts +63 -0
- package/plugins/microsandbox/dist/tools/mcp-client.d.ts.map +1 -0
- package/plugins/microsandbox/dist/tools/mcp-client.js +226 -0
- package/plugins/microsandbox/dist/tools/mcp-client.js.map +1 -0
- package/plugins/microsandbox/manifest.json +177 -0
- package/plugins/microsandbox/package.json +38 -0
- package/plugins/microsandbox/skills/microsandbox-browser-howto.md +155 -0
- package/plugins/microsandbox/skills/microsandbox-build-use.md +201 -0
- package/plugins/microsandbox/skills/microsandbox-config.md +38 -0
- package/plugins/microsandbox/skills/microsandbox-exec-howto.md +144 -0
- package/plugins/microsandbox/skills/microsandbox-libreoffice.md +159 -0
- package/plugins/microsandbox/templates/README.md +26 -0
- package/plugins/web-search/dist/server.d.ts +4 -0
- package/plugins/web-search/dist/server.d.ts.map +1 -0
- package/plugins/web-search/dist/server.js +73 -0
- package/plugins/web-search/dist/server.js.map +1 -0
- package/plugins/web-search/dist/tools/health.d.ts +31 -0
- package/plugins/web-search/dist/tools/health.d.ts.map +1 -0
- package/plugins/web-search/dist/tools/health.js +59 -0
- package/plugins/web-search/dist/tools/health.js.map +1 -0
- package/plugins/web-search/dist/tools/index.d.ts +3 -0
- package/plugins/web-search/dist/tools/index.d.ts.map +1 -0
- package/plugins/web-search/dist/tools/index.js +2 -0
- package/plugins/web-search/dist/tools/index.js.map +1 -0
- package/plugins/web-search/dist/tools/providers.d.ts +43 -0
- package/plugins/web-search/dist/tools/providers.d.ts.map +1 -0
- package/plugins/web-search/dist/tools/providers.js +140 -0
- package/plugins/web-search/dist/tools/providers.js.map +1 -0
- package/plugins/web-search/dist/tools/web-search.d.ts +15 -0
- package/plugins/web-search/dist/tools/web-search.d.ts.map +1 -0
- package/plugins/web-search/dist/tools/web-search.js +244 -0
- package/plugins/web-search/dist/tools/web-search.js.map +1 -0
- package/plugins/web-search/manifest.json +65 -0
- package/plugins/web-search/node_modules/@esbuild/darwin-arm64/README.md +3 -0
- package/plugins/web-search/node_modules/@esbuild/darwin-arm64/package.json +20 -0
- package/plugins/web-search/node_modules/@vitest/expect/LICENSE +21 -0
- package/plugins/web-search/node_modules/@vitest/expect/README.md +21 -0
- package/plugins/web-search/node_modules/@vitest/expect/dist/index.d.ts +808 -0
- package/plugins/web-search/node_modules/@vitest/expect/dist/index.js +1799 -0
- package/plugins/web-search/node_modules/@vitest/expect/package.json +46 -0
- package/plugins/web-search/node_modules/@vitest/mocker/LICENSE +21 -0
- package/plugins/web-search/node_modules/@vitest/mocker/README.md +5 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/auto-register.d.ts +2 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/auto-register.js +9 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/browser.d.ts +53 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/browser.js +91 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/chunk-interceptor-native.js +15 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/chunk-mocker.js +1602 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/chunk-pathe.M-eThtNZ.js +174 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/chunk-registry.js +182 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/chunk-utils.js +16 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/index.d.ts +21 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/index.js +174 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/mocker.d-Ce9_ySj5.d.ts +83 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/node.d.ts +821 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/node.js +1306 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/redirect.d.ts +3 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/redirect.js +75 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/register.d.ts +9 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/register.js +41 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/registry.d-D765pazg.d.ts +87 -0
- package/plugins/web-search/node_modules/@vitest/mocker/dist/types.d-D_aRZRdy.d.ts +8 -0
- package/plugins/web-search/node_modules/@vitest/mocker/package.json +82 -0
- package/plugins/web-search/node_modules/@vitest/pretty-format/LICENSE +21 -0
- package/plugins/web-search/node_modules/@vitest/pretty-format/dist/index.d.ts +119 -0
- package/plugins/web-search/node_modules/@vitest/pretty-format/dist/index.js +1387 -0
- package/plugins/web-search/node_modules/@vitest/pretty-format/package.json +44 -0
- package/plugins/web-search/node_modules/@vitest/runner/LICENSE +21 -0
- package/plugins/web-search/node_modules/@vitest/runner/README.md +5 -0
- package/plugins/web-search/node_modules/@vitest/runner/dist/chunk-hooks.js +2254 -0
- package/plugins/web-search/node_modules/@vitest/runner/dist/index.d.ts +261 -0
- package/plugins/web-search/node_modules/@vitest/runner/dist/index.js +6 -0
- package/plugins/web-search/node_modules/@vitest/runner/dist/tasks.d-CkscK4of.d.ts +558 -0
- package/plugins/web-search/node_modules/@vitest/runner/dist/types.d.ts +163 -0
- package/plugins/web-search/node_modules/@vitest/runner/dist/types.js +1 -0
- package/plugins/web-search/node_modules/@vitest/runner/dist/utils.d.ts +47 -0
- package/plugins/web-search/node_modules/@vitest/runner/dist/utils.js +6 -0
- package/plugins/web-search/node_modules/@vitest/runner/package.json +49 -0
- package/plugins/web-search/node_modules/@vitest/snapshot/LICENSE +21 -0
- package/plugins/web-search/node_modules/@vitest/snapshot/README.md +84 -0
- package/plugins/web-search/node_modules/@vitest/snapshot/dist/environment.d-DHdQ1Csl.d.ts +22 -0
- package/plugins/web-search/node_modules/@vitest/snapshot/dist/environment.d.ts +16 -0
- package/plugins/web-search/node_modules/@vitest/snapshot/dist/environment.js +40 -0
- package/plugins/web-search/node_modules/@vitest/snapshot/dist/index.d.ts +137 -0
- package/plugins/web-search/node_modules/@vitest/snapshot/dist/index.js +2305 -0
- package/plugins/web-search/node_modules/@vitest/snapshot/dist/manager.d.ts +18 -0
- package/plugins/web-search/node_modules/@vitest/snapshot/dist/manager.js +73 -0
- package/plugins/web-search/node_modules/@vitest/snapshot/dist/rawSnapshot.d-lFsMJFUd.d.ts +61 -0
- package/plugins/web-search/node_modules/@vitest/snapshot/package.json +54 -0
- package/plugins/web-search/node_modules/@vitest/spy/LICENSE +21 -0
- package/plugins/web-search/node_modules/@vitest/spy/README.md +3 -0
- package/plugins/web-search/node_modules/@vitest/spy/dist/index.d.ts +356 -0
- package/plugins/web-search/node_modules/@vitest/spy/dist/index.js +191 -0
- package/plugins/web-search/node_modules/@vitest/spy/package.json +38 -0
- package/plugins/web-search/node_modules/@vitest/utils/LICENSE +21 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +158 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/diff.d.ts +104 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/diff.js +2185 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/error.d.ts +9 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/error.js +162 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/helpers.d.ts +56 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/helpers.js +251 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/index.d.ts +57 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/index.js +633 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/source-map.d.ts +139 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/source-map.js +996 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts +53 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/types.d.ts +53 -0
- package/plugins/web-search/node_modules/@vitest/utils/dist/types.js +1 -0
- package/plugins/web-search/node_modules/@vitest/utils/package.json +77 -0
- package/plugins/web-search/node_modules/chai/LICENSE +21 -0
- package/plugins/web-search/node_modules/chai/README.md +162 -0
- package/plugins/web-search/node_modules/chai/package.json +74 -0
- package/plugins/web-search/node_modules/esbuild/README.md +3 -0
- package/plugins/web-search/node_modules/esbuild/package.json +49 -0
- package/plugins/web-search/node_modules/std-env/README.md +118 -0
- package/plugins/web-search/node_modules/std-env/dist/index.cjs +1 -0
- package/plugins/web-search/node_modules/std-env/dist/index.d.cts +92 -0
- package/plugins/web-search/node_modules/std-env/dist/index.d.mts +92 -0
- package/plugins/web-search/node_modules/std-env/dist/index.d.ts +92 -0
- package/plugins/web-search/node_modules/std-env/dist/index.mjs +1 -0
- package/plugins/web-search/node_modules/std-env/package.json +46 -0
- package/plugins/web-search/node_modules/tinyexec/LICENSE +21 -0
- package/plugins/web-search/node_modules/tinyexec/README.md +256 -0
- package/plugins/web-search/node_modules/tinyexec/dist/main.cjs +575 -0
- package/plugins/web-search/node_modules/tinyexec/dist/main.d.cts +70 -0
- package/plugins/web-search/node_modules/tinyexec/dist/main.d.ts +70 -0
- package/plugins/web-search/node_modules/tinyexec/dist/main.js +578 -0
- package/plugins/web-search/node_modules/tinyexec/package.json +66 -0
- package/plugins/web-search/node_modules/tinyrainbow/README.md +28 -0
- package/plugins/web-search/node_modules/tinyrainbow/dist/browser.d.ts +8 -0
- package/plugins/web-search/node_modules/tinyrainbow/dist/browser.js +20 -0
- package/plugins/web-search/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +90 -0
- package/plugins/web-search/node_modules/tinyrainbow/dist/index-8b61d5bc.d.ts +59 -0
- package/plugins/web-search/node_modules/tinyrainbow/dist/node.d.ts +8 -0
- package/plugins/web-search/node_modules/tinyrainbow/dist/node.js +22 -0
- package/plugins/web-search/node_modules/tinyrainbow/package.json +37 -0
- package/plugins/web-search/node_modules/typescript/README.md +50 -0
- package/plugins/web-search/node_modules/typescript/package.json +120 -0
- package/plugins/web-search/node_modules/vite/README.md +20 -0
- package/plugins/web-search/node_modules/vite/dist/client/client.mjs +1106 -0
- package/plugins/web-search/node_modules/vite/dist/client/env.mjs +19 -0
- package/plugins/web-search/node_modules/vite/dist/node/chunks/build.js +4 -0
- package/plugins/web-search/node_modules/vite/dist/node/chunks/build2.js +5538 -0
- package/plugins/web-search/node_modules/vite/dist/node/chunks/chunk.js +48 -0
- package/plugins/web-search/node_modules/vite/dist/node/chunks/config.js +36065 -0
- package/plugins/web-search/node_modules/vite/dist/node/chunks/config2.js +4 -0
- package/plugins/web-search/node_modules/vite/dist/node/chunks/dist.js +6758 -0
- package/plugins/web-search/node_modules/vite/dist/node/chunks/lib.js +377 -0
- package/plugins/web-search/node_modules/vite/dist/node/chunks/logger.js +329 -0
- package/plugins/web-search/node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts +96 -0
- package/plugins/web-search/node_modules/vite/dist/node/chunks/optimizer.js +4 -0
- package/plugins/web-search/node_modules/vite/dist/node/chunks/postcss-import.js +479 -0
- package/plugins/web-search/node_modules/vite/dist/node/chunks/preview.js +4 -0
- package/plugins/web-search/node_modules/vite/dist/node/chunks/server.js +4 -0
- package/plugins/web-search/node_modules/vite/dist/node/cli.js +698 -0
- package/plugins/web-search/node_modules/vite/dist/node/index.d.ts +3717 -0
- package/plugins/web-search/node_modules/vite/dist/node/index.js +30 -0
- package/plugins/web-search/node_modules/vite/dist/node/module-runner.d.ts +311 -0
- package/plugins/web-search/node_modules/vite/dist/node/module-runner.js +1160 -0
- package/plugins/web-search/node_modules/vite/package.json +199 -0
- package/plugins/web-search/node_modules/vite/types/package.json +4 -0
- package/plugins/web-search/node_modules/vitest/README.md +7 -0
- package/plugins/web-search/node_modules/vitest/dist/browser.d.ts +34 -0
- package/plugins/web-search/node_modules/vitest/dist/browser.js +8 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +7 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/base.DfmxU-tU.js +38 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/benchmark.CYdenmiT.js +37 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/benchmark.d.BwvBVTda.d.ts +24 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/cac.0BJqEUeA.js +1469 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/cli-api.DWGBtMmz.js +10660 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/config.d.BKdhh7Zx.d.ts +224 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/console.CtFJOzRO.js +153 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/constants.DnKduX2e.js +44 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/coverage.DVF1vEu8.js +25 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/coverage.DfSpMS-b.js +4350 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/coverage.d.S9RMNXIe.d.ts +35 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/creator.GK6I-cL4.js +640 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +73 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/defaults.B7q_naMc.js +115 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/env.D4Lgay0q.js +8 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/environment.d.cL3nLXbE.d.ts +119 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/execute.B7h3T_Hc.js +708 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/git.BVQ8w_Sw.js +72 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/global.d.MAmajcmJ.d.ts +136 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/globals.DEHgCU4V.js +26 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/index.B521nVV-.js +157 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/index.BCWujgDG.js +231 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/index.CdQS2e2Q.js +37 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/index.CmSc2RE5.js +587 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/index.CwejwG0H.js +105 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/index.D3XRDfWc.js +213 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/index.VByaPkjc.js +2183 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/index.X0nbfr6-.js +6584 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/inspector.C914Efll.js +57 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/mocker.d.BE_2ls6u.d.ts +17 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/node.fjCdwEIl.js +15 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/reporters.d.BuRON0I0.d.ts +3168 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/rpc.-pEldfrD.js +83 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/runBaseTests.9Ij9_de-.js +129 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/setup-common.Dd054P77.js +60 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/suite.d.FvehnV49.d.ts +10 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/typechecker.DRKU1-1g.js +874 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/utils.CAioKnHs.js +61 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +65 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +4015 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/vite.d.BnOPPc46.d.ts +25 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/vm.BThCzidc.js +756 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/worker.d.CUgIPz9V.d.ts +176 -0
- package/plugins/web-search/node_modules/vitest/dist/chunks/worker.d.uzWsCv9X.d.ts +8 -0
- package/plugins/web-search/node_modules/vitest/dist/cli.js +27 -0
- package/plugins/web-search/node_modules/vitest/dist/config.cjs +148 -0
- package/plugins/web-search/node_modules/vitest/dist/config.d.ts +100 -0
- package/plugins/web-search/node_modules/vitest/dist/config.js +21 -0
- package/plugins/web-search/node_modules/vitest/dist/coverage.d.ts +108 -0
- package/plugins/web-search/node_modules/vitest/dist/coverage.js +34 -0
- package/plugins/web-search/node_modules/vitest/dist/environments.d.ts +26 -0
- package/plugins/web-search/node_modules/vitest/dist/environments.js +2 -0
- package/plugins/web-search/node_modules/vitest/dist/execute.d.ts +150 -0
- package/plugins/web-search/node_modules/vitest/dist/execute.js +13 -0
- package/plugins/web-search/node_modules/vitest/dist/index.d.ts +651 -0
- package/plugins/web-search/node_modules/vitest/dist/index.js +18 -0
- package/plugins/web-search/node_modules/vitest/dist/mocker.d.ts +1 -0
- package/plugins/web-search/node_modules/vitest/dist/mocker.js +1 -0
- package/plugins/web-search/node_modules/vitest/dist/node.d.ts +158 -0
- package/plugins/web-search/node_modules/vitest/dist/node.js +105 -0
- package/plugins/web-search/node_modules/vitest/dist/path.js +7 -0
- package/plugins/web-search/node_modules/vitest/dist/reporters.d.ts +25 -0
- package/plugins/web-search/node_modules/vitest/dist/reporters.js +23 -0
- package/plugins/web-search/node_modules/vitest/dist/runners.d.ts +46 -0
- package/plugins/web-search/node_modules/vitest/dist/runners.js +235 -0
- package/plugins/web-search/node_modules/vitest/dist/snapshot.d.ts +9 -0
- package/plugins/web-search/node_modules/vitest/dist/snapshot.js +4 -0
- package/plugins/web-search/node_modules/vitest/dist/spy.js +1 -0
- package/plugins/web-search/node_modules/vitest/dist/suite.d.ts +5 -0
- package/plugins/web-search/node_modules/vitest/dist/suite.js +5 -0
- package/plugins/web-search/node_modules/vitest/dist/worker.js +124 -0
- package/plugins/web-search/node_modules/vitest/dist/workers/forks.js +43 -0
- package/plugins/web-search/node_modules/vitest/dist/workers/runVmTests.js +90 -0
- package/plugins/web-search/node_modules/vitest/dist/workers/threads.js +31 -0
- package/plugins/web-search/node_modules/vitest/dist/workers/vmForks.js +47 -0
- package/plugins/web-search/node_modules/vitest/dist/workers/vmThreads.js +37 -0
- package/plugins/web-search/node_modules/vitest/dist/workers.d.ts +40 -0
- package/plugins/web-search/node_modules/vitest/dist/workers.js +30 -0
- package/plugins/web-search/node_modules/vitest/package.json +207 -0
- package/plugins/web-search/package.json +30 -0
- package/plugins/web-search/skills/web-search-howto.md +69 -0
- package/plugins/workboard/agent-seeds/echo-demo/agent.json +7 -0
- package/plugins/workboard/agent-seeds/llm-default/SOUL.md +53 -0
- package/plugins/workboard/agent-seeds/llm-default/agent.json +7 -0
- package/plugins/workboard/dist/client.d.ts +5 -0
- package/plugins/workboard/dist/client.d.ts.map +1 -0
- package/plugins/workboard/dist/client.js +895 -0
- package/plugins/workboard/dist/client.js.map +1 -0
- package/plugins/workboard/dist/db/agents.d.ts +100 -0
- package/plugins/workboard/dist/db/agents.d.ts.map +1 -0
- package/plugins/workboard/dist/db/agents.js +280 -0
- package/plugins/workboard/dist/db/agents.js.map +1 -0
- package/plugins/workboard/dist/db/schema.d.ts +3 -0
- package/plugins/workboard/dist/db/schema.d.ts.map +1 -0
- package/plugins/workboard/dist/db/schema.js +31 -0
- package/plugins/workboard/dist/db/schema.js.map +1 -0
- package/plugins/workboard/dist/db/session-history.d.ts +28 -0
- package/plugins/workboard/dist/db/session-history.d.ts.map +1 -0
- package/plugins/workboard/dist/db/session-history.js +224 -0
- package/plugins/workboard/dist/db/session-history.js.map +1 -0
- package/plugins/workboard/dist/db/tasks.d.ts +260 -0
- package/plugins/workboard/dist/db/tasks.d.ts.map +1 -0
- package/plugins/workboard/dist/db/tasks.js +451 -0
- package/plugins/workboard/dist/db/tasks.js.map +1 -0
- package/plugins/workboard/dist/db/worker-agents.d.ts +16 -0
- package/plugins/workboard/dist/db/worker-agents.d.ts.map +1 -0
- package/plugins/workboard/dist/db/worker-agents.js +62 -0
- package/plugins/workboard/dist/db/worker-agents.js.map +1 -0
- package/plugins/workboard/dist/effective-skills.d.ts +13 -0
- package/plugins/workboard/dist/effective-skills.d.ts.map +1 -0
- package/plugins/workboard/dist/effective-skills.js +126 -0
- package/plugins/workboard/dist/effective-skills.js.map +1 -0
- package/plugins/workboard/dist/fs-worker-agents.d.ts +35 -0
- package/plugins/workboard/dist/fs-worker-agents.d.ts.map +1 -0
- package/plugins/workboard/dist/fs-worker-agents.js +199 -0
- package/plugins/workboard/dist/fs-worker-agents.js.map +1 -0
- package/plugins/workboard/dist/migrate-worker-agents.d.ts +11 -0
- package/plugins/workboard/dist/migrate-worker-agents.d.ts.map +1 -0
- package/plugins/workboard/dist/migrate-worker-agents.js +89 -0
- package/plugins/workboard/dist/migrate-worker-agents.js.map +1 -0
- package/plugins/workboard/dist/routes/handlers.d.ts +106 -0
- package/plugins/workboard/dist/routes/handlers.d.ts.map +1 -0
- package/plugins/workboard/dist/routes/handlers.js +668 -0
- package/plugins/workboard/dist/routes/handlers.js.map +1 -0
- package/plugins/workboard/dist/server.d.ts +6 -0
- package/plugins/workboard/dist/server.d.ts.map +1 -0
- package/plugins/workboard/dist/server.js +368 -0
- package/plugins/workboard/dist/server.js.map +1 -0
- package/plugins/workboard/dist/tools/index.d.ts +70 -0
- package/plugins/workboard/dist/tools/index.d.ts.map +1 -0
- package/plugins/workboard/dist/tools/index.js +963 -0
- package/plugins/workboard/dist/tools/index.js.map +1 -0
- package/plugins/workboard/dist/types.d.ts +27 -0
- package/plugins/workboard/dist/types.d.ts.map +1 -0
- package/plugins/workboard/dist/types.js +16 -0
- package/plugins/workboard/dist/types.js.map +1 -0
- package/plugins/workboard/dist/worker/pool.d.ts +220 -0
- package/plugins/workboard/dist/worker/pool.d.ts.map +1 -0
- package/plugins/workboard/dist/worker/pool.js +866 -0
- package/plugins/workboard/dist/worker/pool.js.map +1 -0
- package/plugins/workboard/dist/worker/tool-policy.d.ts +27 -0
- package/plugins/workboard/dist/worker/tool-policy.d.ts.map +1 -0
- package/plugins/workboard/dist/worker/tool-policy.js +76 -0
- package/plugins/workboard/dist/worker/tool-policy.js.map +1 -0
- package/plugins/workboard/dist/worker-agents-page.d.ts +4 -0
- package/plugins/workboard/dist/worker-agents-page.d.ts.map +1 -0
- package/plugins/workboard/dist/worker-agents-page.js +193 -0
- package/plugins/workboard/dist/worker-agents-page.js.map +1 -0
- package/plugins/workboard/manifest.json +180 -0
- package/plugins/workboard/package.json +37 -0
- package/plugins/workboard/skills/large-input-large-output.md +185 -0
- package/plugins/workboard/skills/workboard-howto.md +166 -0
- package/plugins/workboard/skills/worker-creator.md +267 -0
- package/plugins/workboard/skills/worker-fleet.md +431 -0
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import type { Request, Response } from "express";
|
|
2
|
+
import type { WebSocket } from "ws";
|
|
3
|
+
import type { CapabilityName } from "./capabilities.js";
|
|
4
|
+
import type { SandboxKind } from "./manifest.js";
|
|
5
|
+
import type { ToolsetProvider } from "./mcp-toolset.js";
|
|
6
|
+
/** Tenant-scoped context handed to every plugin's `activate(ctx)`. */
|
|
7
|
+
export interface PluginContext {
|
|
8
|
+
pluginId: string;
|
|
9
|
+
tenantId: string;
|
|
10
|
+
/**
|
|
11
|
+
* The opened tenant SQLite handle. Same instance the core uses, so
|
|
12
|
+
* plugins must not call `close()` on it.
|
|
13
|
+
*/
|
|
14
|
+
db: TenantDbHandle;
|
|
15
|
+
/** Resolved + merged tenant config (subset). */
|
|
16
|
+
tenantConfig: ResolvedConfigShape;
|
|
17
|
+
/** @deprecated Use `tenantConfig`. Removed in a future SDK version. */
|
|
18
|
+
config: ResolvedConfigShape;
|
|
19
|
+
/** Bound logger: prefixes [plugin:<id>] [tenant:<id>]. */
|
|
20
|
+
log: PluginLogger;
|
|
21
|
+
/** Absolute path to `<tenant>/workspace`. */
|
|
22
|
+
workspaceDir: string;
|
|
23
|
+
/** Absolute path to a user's per-tenant home, i.e.
|
|
24
|
+
* `<tenant>/workspace/users/<userId>`. Plugins resolve this at
|
|
25
|
+
* request time using `req.ctx.userId` (set by host middleware). */
|
|
26
|
+
userHomeDir(userId: string): string;
|
|
27
|
+
/** Send a WS message to every socket currently connected for this tenant. */
|
|
28
|
+
broadcast(type: string, payload: unknown): void;
|
|
29
|
+
/**
|
|
30
|
+
* Capability registry handle (ADR-0004 §8). Lets a plugin look up
|
|
31
|
+
* other plugins' provided capabilities. By the time `activate()` is
|
|
32
|
+
* called, every capability listed in this plugin's `requires[]` is
|
|
33
|
+
* already registered. Capabilities this plugin itself provides are
|
|
34
|
+
* **not** yet registered — see ADR-0004 §8 (single-phase activation).
|
|
35
|
+
*/
|
|
36
|
+
capabilities: CapabilityHandle;
|
|
37
|
+
/**
|
|
38
|
+
* Per-plugin opaque config from `<tenant>/config.json` →
|
|
39
|
+
* `plugins[<id>].config`. Host does not interpret it; plugins
|
|
40
|
+
* cast/parse as needed. Empty object if not configured.
|
|
41
|
+
*/
|
|
42
|
+
pluginConfig: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Minimal shape we need from a `better-sqlite3` Database, declared
|
|
46
|
+
* structurally so the SDK doesn't have to depend on better-sqlite3.
|
|
47
|
+
*/
|
|
48
|
+
export interface TenantDbHandle {
|
|
49
|
+
prepare<P extends unknown[] = unknown[], R = unknown>(sql: string): {
|
|
50
|
+
run(...params: P): unknown;
|
|
51
|
+
get(...params: P): R | undefined;
|
|
52
|
+
all(...params: P): R[];
|
|
53
|
+
};
|
|
54
|
+
exec(sql: string): unknown;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Subset of ResolvedConfig that plugins are allowed to read. Kept
|
|
58
|
+
* minimal — plugins should not depend on the full `@tianshu/server`
|
|
59
|
+
* type. New surface gets exposed here on demand.
|
|
60
|
+
*/
|
|
61
|
+
export interface ResolvedConfigShape {
|
|
62
|
+
defaultModel?: string;
|
|
63
|
+
branding?: {
|
|
64
|
+
name?: string;
|
|
65
|
+
emoji?: string;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export interface PluginLogger {
|
|
69
|
+
info(msg: string, meta?: Record<string, unknown>): void;
|
|
70
|
+
warn(msg: string, meta?: Record<string, unknown>): void;
|
|
71
|
+
error(msg: string, meta?: Record<string, unknown>): void;
|
|
72
|
+
}
|
|
73
|
+
export type PluginRouteHandler = (req: Request, res: Response) => void | Promise<void>;
|
|
74
|
+
export type PluginWsHandler = (msg: {
|
|
75
|
+
type: string;
|
|
76
|
+
} & Record<string, unknown>, socket: WebSocket, ctx: PluginContext) => void | Promise<void>;
|
|
77
|
+
export interface PluginServerExports {
|
|
78
|
+
routes?: Record<string, PluginRouteHandler>;
|
|
79
|
+
wsHandlers?: Record<string, PluginWsHandler>;
|
|
80
|
+
/**
|
|
81
|
+
* Ready-to-use sandbox runners keyed by the `module` string used
|
|
82
|
+
* in `manifest.contributes.sandboxes[].module`. The plugin's
|
|
83
|
+
* `activate(ctx)` is responsible for constructing each runner
|
|
84
|
+
* (typically in a small "facade" that picks between a real
|
|
85
|
+
* runtime and a nullable fallback) and exposing it here. The host
|
|
86
|
+
* picks the runner up by key and registers it under the matching
|
|
87
|
+
* `sandbox.<kind>` capability.
|
|
88
|
+
*
|
|
89
|
+
* The `SandboxModule` type below is exported for plugins that
|
|
90
|
+
* want to factor their runner construction into a `start(ctx) =>
|
|
91
|
+
* SandboxRunner` shape, but the host never invokes `start()`
|
|
92
|
+
* itself — plugins do that inside `activate()`.
|
|
93
|
+
*/
|
|
94
|
+
sandboxes?: Record<string, SandboxRunner>;
|
|
95
|
+
/**
|
|
96
|
+
* Per-task sandbox lifecycle manager (`sandbox.taskPool`
|
|
97
|
+
* capability). The host registers it under that capability so
|
|
98
|
+
* other plugins (today: workboard) can drive task acquire/
|
|
99
|
+
* release/destroy.
|
|
100
|
+
*
|
|
101
|
+
* Distinct from `sandboxes[]` because a task pool is not a
|
|
102
|
+
* single SandboxRunner; it is a manager that creates per-task
|
|
103
|
+
* runners on demand. Plugins that don't manage per-task
|
|
104
|
+
* sandboxes (the common case) leave this undefined.
|
|
105
|
+
*/
|
|
106
|
+
taskSandboxPool?: TaskSandboxPool;
|
|
107
|
+
/**
|
|
108
|
+
* Agent tools the plugin contributes. Keys must match the
|
|
109
|
+
* `module` strings declared in `manifest.contributes.tools[]`.
|
|
110
|
+
* The host collects every active plugin's tools each agent turn
|
|
111
|
+
* and merges them with the core tool set (fs read/write/etc.).
|
|
112
|
+
*
|
|
113
|
+
* A tool's `available()` (if present) gates registration on a
|
|
114
|
+
* per-turn basis — use this for status-aware tools whose backing
|
|
115
|
+
* runner may not be ready yet.
|
|
116
|
+
*/
|
|
117
|
+
tools?: Record<string, AgentTool>;
|
|
118
|
+
/**
|
|
119
|
+
* Dynamic tool *providers* whose tool list can change at runtime.
|
|
120
|
+
* Today's only built-in implementation is `McpToolset`, which
|
|
121
|
+
* reflects an upstream MCP server's `tools/list` into AgentTools
|
|
122
|
+
* on each refresh — see `mcp-toolset.ts`. Keys must match the
|
|
123
|
+
* `module` strings declared in `manifest.contributes.toolsets[]`.
|
|
124
|
+
*
|
|
125
|
+
* The host calls `provider.listTools()` every time it builds the
|
|
126
|
+
* per-turn tool list, so the surface area can grow / shrink as
|
|
127
|
+
* MCP servers come and go without the plugin having to re-run
|
|
128
|
+
* `activate()`. Failures inside a provider are visible through
|
|
129
|
+
* the global MCP admin page (powered by `provider.snapshot?.()`).
|
|
130
|
+
*/
|
|
131
|
+
toolsetProviders?: Record<string, ToolsetProvider>;
|
|
132
|
+
}
|
|
133
|
+
export interface CapabilityHandle {
|
|
134
|
+
/** Get a registered capability's value, or undefined if no provider. */
|
|
135
|
+
get<T = unknown>(name: CapabilityName): T | undefined;
|
|
136
|
+
/** Cheaper than `get()` when the caller doesn't need the value. */
|
|
137
|
+
has(name: CapabilityName): boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Subscribe to lifecycle events for one capability. Useful when a
|
|
140
|
+
* plugin or the agent loop wants to react when a provider comes or
|
|
141
|
+
* goes mid-process (registry invalidation, plugin re-enabled, ...).
|
|
142
|
+
* Returns an unsubscribe function.
|
|
143
|
+
*/
|
|
144
|
+
on(name: CapabilityName, ev: "registered" | "unregistered", fn: () => void): () => void;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Per-call context handed to an agent tool's `execute()`. Lets the
|
|
148
|
+
* tool reach back into the tenant capability registry, the user's
|
|
149
|
+
* home dir, and a small log surface without re-deriving them. Host
|
|
150
|
+
* fills this in on every tool invocation.
|
|
151
|
+
*/
|
|
152
|
+
export interface AgentToolContext {
|
|
153
|
+
pluginId: string;
|
|
154
|
+
tenantId: string;
|
|
155
|
+
userId: string;
|
|
156
|
+
/** Read-only capability lookup. Subset of CapabilityHandle
|
|
157
|
+
* (no event subscription) because tool execution is
|
|
158
|
+
* request-scoped — if a capability flips during a turn, the
|
|
159
|
+
* agent loop will pick that up next turn via toolsForTenant. */
|
|
160
|
+
capabilities: ReadOnlyCapabilityHandle;
|
|
161
|
+
/** Per-user workspace dir on the host filesystem. */
|
|
162
|
+
userHomeDir: string;
|
|
163
|
+
/** Tenant root dir (host filesystem). Plugins that need to write
|
|
164
|
+
* to `<tenant>/_tenant/config/...` use this; most tools don't. */
|
|
165
|
+
tenantHomeDir: string;
|
|
166
|
+
/**
|
|
167
|
+
* Agent identity inside the tenant.
|
|
168
|
+
*
|
|
169
|
+
* - { kind: "main" }
|
|
170
|
+
* The chat-shell agent the user is talking to. Default if a
|
|
171
|
+
* plugin tool is invoked outside any agent loop (e.g. from a
|
|
172
|
+
* route handler).
|
|
173
|
+
* - { kind: "worker", workerKind: "<id>" }
|
|
174
|
+
* A worker pool run; `workerKind` is the worker_agent kind
|
|
175
|
+
* id (e.g. "llm", "echo").
|
|
176
|
+
*
|
|
177
|
+
* Tools that touch shared tenant config (skills, future SOUL/
|
|
178
|
+
* MEMORY surfaces) use this to enforce a write boundary: main
|
|
179
|
+
* may write to `_tenant/config/main/...` and `_tenant/config/`;
|
|
180
|
+
* workers may only write to `_tenant/config/workers/<kind>/...`.
|
|
181
|
+
* Reads are not gated by this field.
|
|
182
|
+
*
|
|
183
|
+
* Optional for backwards compatibility — missing means "main".
|
|
184
|
+
*/
|
|
185
|
+
agentScope?: {
|
|
186
|
+
kind: "main";
|
|
187
|
+
} | {
|
|
188
|
+
kind: "worker";
|
|
189
|
+
workerKind: string;
|
|
190
|
+
/** Worker's filesystem slug (matches the directory name
|
|
191
|
+
* under `_tenant/config/workers/<slug>/`). When unset the
|
|
192
|
+
* worker is running with no fs presence — falling back to
|
|
193
|
+
* the legacy DB-only path. Used by the tenant_config_*
|
|
194
|
+
* tools to scope writes to this worker's own bundle. */
|
|
195
|
+
slug?: string;
|
|
196
|
+
};
|
|
197
|
+
log: PluginLogger;
|
|
198
|
+
/**
|
|
199
|
+
* Id of the chat / worker session the LLM that called this tool
|
|
200
|
+
* is running in. Plugins use it to attribute side-effects back
|
|
201
|
+
* to the asking session (e.g. workboard's task_create stamps
|
|
202
|
+
* `tasks.parent_session_id` so the worker pool can later notify
|
|
203
|
+
* this session when the task finishes).
|
|
204
|
+
*
|
|
205
|
+
* Optional: tools invoked outside an LLM session (e.g. internal
|
|
206
|
+
* scheduled jobs) won't have one.
|
|
207
|
+
*/
|
|
208
|
+
sessionId?: string;
|
|
209
|
+
/**
|
|
210
|
+
* Workboard task id when this tool call is driven by a worker
|
|
211
|
+
* pool run. Lets per-task tools scope their resources to a
|
|
212
|
+
* single task lifecycle — e.g. microsandbox routes `exec` calls
|
|
213
|
+
* for a worker session into a dedicated per-task sandbox that
|
|
214
|
+
* gets stopped when the task terminates.
|
|
215
|
+
*
|
|
216
|
+
* Absent for chat sessions and ad-hoc tool invocations.
|
|
217
|
+
*/
|
|
218
|
+
taskId?: string;
|
|
219
|
+
/**
|
|
220
|
+
* Cancellation signal for the current run. The host wires this
|
|
221
|
+
* from the agent loop's inner abort controller, so a watchdog
|
|
222
|
+
* timeout, an external `task_abort`, or any other reason the
|
|
223
|
+
* loop unwinds will fire this signal. Tools that do long-running
|
|
224
|
+
* work (`exec`, MCP calls, network fetches) SHOULD listen and
|
|
225
|
+
* bail early; tools that are inherently quick can ignore it.
|
|
226
|
+
*
|
|
227
|
+
* Optional for backwards compatibility — plugins built against
|
|
228
|
+
* older SDK versions never see this field, and the host
|
|
229
|
+
* tolerates that.
|
|
230
|
+
*/
|
|
231
|
+
signal?: AbortSignal;
|
|
232
|
+
}
|
|
233
|
+
/** Lookup-only subset of CapabilityHandle (no `on()`). */
|
|
234
|
+
export interface ReadOnlyCapabilityHandle {
|
|
235
|
+
get<T = unknown>(name: CapabilityName): T | undefined;
|
|
236
|
+
has(name: CapabilityName): boolean;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Canonical result shape an agent tool should return. Two extra
|
|
240
|
+
* fields beyond `{ ok, text }` are recognised:
|
|
241
|
+
* - `data`: structured payload the host JSON-encodes into the chat
|
|
242
|
+
* log alongside `text`, so the agent sees both the human-readable
|
|
243
|
+
* summary and the structured details.
|
|
244
|
+
* - any other field: passed through verbatim for plugins that want
|
|
245
|
+
* to attach custom metadata (e.g. `exit_code`, `duration_ms`).
|
|
246
|
+
*
|
|
247
|
+
* Tools MAY return arbitrary JSON-serialisable values; the host
|
|
248
|
+
* normalises them to `{ ok, text }` before they reach the LLM.
|
|
249
|
+
* Returning this canonical shape directly is preferred because
|
|
250
|
+
* the agent sees a consistent surface across plugins.
|
|
251
|
+
*
|
|
252
|
+
* Use the {@link okResult} / {@link errorResult} helpers in
|
|
253
|
+
* `tools/result.js` (or hand-roll) to build these.
|
|
254
|
+
*/
|
|
255
|
+
export interface ToolResult {
|
|
256
|
+
/** True iff the tool semantically succeeded. The host renders the
|
|
257
|
+
* tool-call chip green when ok, red when not. */
|
|
258
|
+
ok: boolean;
|
|
259
|
+
/** Human-readable summary the agent sees. Keep it short — model
|
|
260
|
+
* context is precious. Long output should go to a file via
|
|
261
|
+
* another tool, not into `text`. */
|
|
262
|
+
text: string;
|
|
263
|
+
/** Optional structured payload preserved verbatim. */
|
|
264
|
+
data?: unknown;
|
|
265
|
+
/** Plugin-defined extras. Allowed but discouraged. */
|
|
266
|
+
[key: string]: unknown;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* A schema + executor pair that becomes an agent tool. The host
|
|
270
|
+
* collects these from every active plugin via
|
|
271
|
+
* `exports.tools[<module-key>]`, gates each one through
|
|
272
|
+
* `available()`, then registers the surviving schemas with the
|
|
273
|
+
* agent loop.
|
|
274
|
+
*
|
|
275
|
+
* Prefer returning a {@link ToolResult} from `execute()`. If you
|
|
276
|
+
* return any other JSON-serialisable value, the host JSON-encodes
|
|
277
|
+
* it into `text` and best-effort-derives `ok`.
|
|
278
|
+
*/
|
|
279
|
+
export interface AgentTool {
|
|
280
|
+
/** pi-ai Tool schema. Name is what the model sees. */
|
|
281
|
+
schema: import("@earendil-works/pi-ai").Tool;
|
|
282
|
+
/** Optional per-turn gate. Return false to hide the tool this
|
|
283
|
+
* turn (e.g. when the backing capability is in `state: error`).
|
|
284
|
+
* Default true. */
|
|
285
|
+
available?(ctx: AgentToolContext): boolean | Promise<boolean>;
|
|
286
|
+
/** Run the tool with the model-supplied args. */
|
|
287
|
+
execute(args: Record<string, unknown>, ctx: AgentToolContext): ToolResult | unknown | Promise<ToolResult | unknown>;
|
|
288
|
+
}
|
|
289
|
+
/** Build an `ok=true` ToolResult. Optional `data` payload preserved. */
|
|
290
|
+
export declare function okResult(text: string, data?: unknown): ToolResult;
|
|
291
|
+
/** Build an `ok=false` ToolResult. Optional `data` payload preserved. */
|
|
292
|
+
export declare function errorResult(text: string, data?: unknown): ToolResult;
|
|
293
|
+
/**
|
|
294
|
+
* Optional convenience interface for plugins that want to factor
|
|
295
|
+
* runner construction out of `activate()`. The host does not call
|
|
296
|
+
* `start()` itself — plugins call it from inside `activate()` and
|
|
297
|
+
* expose the returned runner via `exports.sandboxes[<key>]`.
|
|
298
|
+
*/
|
|
299
|
+
export interface SandboxModule {
|
|
300
|
+
start(ctx: PluginContext): Promise<SandboxRunner>;
|
|
301
|
+
}
|
|
302
|
+
export interface SandboxRunner {
|
|
303
|
+
/** Stable id; equals `<plugin-id>.<contribution-id>`. */
|
|
304
|
+
readonly id: string;
|
|
305
|
+
readonly kind: SandboxKind;
|
|
306
|
+
exec(req: ExecRequest): Promise<ExecResult>;
|
|
307
|
+
readFile(relPath: string): Promise<string>;
|
|
308
|
+
writeFile(relPath: string, content: string): Promise<void>;
|
|
309
|
+
/** Host-side absolute path to this tenant's workspace dir. */
|
|
310
|
+
workspacePath(): string;
|
|
311
|
+
/** Drop in-memory state and re-init. Triggered only by an admin
|
|
312
|
+
* Reset action or by the agent's `reset_sandbox` tool. The host
|
|
313
|
+
* never auto-resets. */
|
|
314
|
+
reset(): Promise<void>;
|
|
315
|
+
/** Tear down. Called on tenant DB pool eviction or plugin
|
|
316
|
+
* deactivation. Must be idempotent. */
|
|
317
|
+
shutdown(): Promise<void>;
|
|
318
|
+
/** Snapshot for the status panel + `GET /api/p/<id>/status`. */
|
|
319
|
+
status(): Promise<SandboxStatus>;
|
|
320
|
+
/** If this runner's plugin also provides `browser.cdp`, the
|
|
321
|
+
* sidecar is exposed here so the host can register it under the
|
|
322
|
+
* capability without a second module entry. Otherwise undefined. */
|
|
323
|
+
readonly browser?: BrowserSidecar;
|
|
324
|
+
}
|
|
325
|
+
export interface ExecRequest {
|
|
326
|
+
/** Shell command. Equivalent to `bash -c <command>` in the guest. */
|
|
327
|
+
command: string;
|
|
328
|
+
/** Working directory inside the guest. Default: `/workspace`. */
|
|
329
|
+
workdir?: string;
|
|
330
|
+
/** Override timeout in ms. Default plugin-defined; the host caps
|
|
331
|
+
* this at 30 min when wiring up the agent's `exec` tool. */
|
|
332
|
+
timeoutMs?: number;
|
|
333
|
+
/** Tenant-scoped user id whose context the command should run in.
|
|
334
|
+
* Runners use it to populate `$USER`, `$LOGNAME`, `$HOME` and an
|
|
335
|
+
* optional `$MSB_USER_ID` so shell scripts inside the guest see a
|
|
336
|
+
* proper user context even though the guest process itself runs
|
|
337
|
+
* as root (microsandbox has no user namespacing in v0). When
|
|
338
|
+
* omitted, the command runs with empty `$USER` and `$HOME=/root`,
|
|
339
|
+
* matching the SDK's default. */
|
|
340
|
+
userId?: string;
|
|
341
|
+
/** Workboard task id when this exec belongs to a per-task run.
|
|
342
|
+
* Routers (e.g. microsandbox) dispatch the call into the task's
|
|
343
|
+
* dedicated sandbox; absent calls go to the long-lived runner. */
|
|
344
|
+
taskId?: string;
|
|
345
|
+
/** Chat / worker session id. Routers fall back to this when
|
|
346
|
+
* `taskId` is absent so chat sessions linked to a task via
|
|
347
|
+
* `TaskSandboxPool.bindSession` still land in the right
|
|
348
|
+
* per-task sandbox. */
|
|
349
|
+
sessionId?: string;
|
|
350
|
+
/** Optional cancellation signal. Runners SHOULD watch this and
|
|
351
|
+
* abort the in-flight exec (best-effort SIGKILL of the guest
|
|
352
|
+
* process) so callers can interrupt a runaway command without
|
|
353
|
+
* waiting for the timeout. The host wires this from the agent
|
|
354
|
+
* loop's inner abort controller, so a `task_abort` (or any
|
|
355
|
+
* other source that aborts the run) propagates straight down
|
|
356
|
+
* to the guest. */
|
|
357
|
+
signal?: AbortSignal;
|
|
358
|
+
}
|
|
359
|
+
export interface ExecResult {
|
|
360
|
+
exitCode: number;
|
|
361
|
+
stdout: string;
|
|
362
|
+
stderr: string;
|
|
363
|
+
/** Wall time in ms. */
|
|
364
|
+
durationMs: number;
|
|
365
|
+
/** True iff the command was killed by timeout. */
|
|
366
|
+
timedOut: boolean;
|
|
367
|
+
/** True iff the command was killed by the caller's abort signal
|
|
368
|
+
* rather than running to completion or hitting the timeout.
|
|
369
|
+
* Optional for backwards compatibility. */
|
|
370
|
+
aborted?: boolean;
|
|
371
|
+
}
|
|
372
|
+
export type SandboxState = "starting" | "ready" | "running" | "error" | "stopped";
|
|
373
|
+
export interface SandboxStatus {
|
|
374
|
+
state: SandboxState;
|
|
375
|
+
/** Wall time the runner has been in its current incarnation. */
|
|
376
|
+
uptimeMs: number;
|
|
377
|
+
lastError?: string;
|
|
378
|
+
/** Plugin-specific extras (image, idle countdown, sidecar status, …). */
|
|
379
|
+
meta?: Record<string, unknown>;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Per-task sandbox lifecycle manager. Registered by the
|
|
383
|
+
* microsandbox plugin under the `sandbox.taskPool` capability;
|
|
384
|
+
* workboard's worker pool calls into it at task pickup / end /
|
|
385
|
+
* delete to drive the per-task microVM lifecycle.
|
|
386
|
+
*
|
|
387
|
+
* The actual `exec` routing happens transparently inside the
|
|
388
|
+
* SandboxRunner registered under `sandbox.shell`: when a tool
|
|
389
|
+
* call carries `ctx.taskId`, the runner forwards it to the pool
|
|
390
|
+
* which dispatches into the right per-task sandbox.
|
|
391
|
+
*/
|
|
392
|
+
export interface TaskSandboxPool {
|
|
393
|
+
/**
|
|
394
|
+
* Block until a sandbox exists for `taskId` and is ready to
|
|
395
|
+
* receive `exec` calls. Idempotent — a no-op when the sandbox
|
|
396
|
+
* is already running. When the sandbox was previously stopped
|
|
397
|
+
* (e.g. an earlier attempt terminated), this resumes it so the
|
|
398
|
+
* filesystem state from the prior run is preserved.
|
|
399
|
+
*/
|
|
400
|
+
acquireTask(taskId: string, sessionId?: string): Promise<void>;
|
|
401
|
+
/**
|
|
402
|
+
* Stop (but do not remove) the sandbox bound to `taskId`. The
|
|
403
|
+
* disk image is preserved so a follow-up `acquireTask` resumes
|
|
404
|
+
* the same environment. Safe to call when the sandbox is
|
|
405
|
+
* already stopped or doesn't exist.
|
|
406
|
+
*
|
|
407
|
+
* Implementations SHOULD return promptly; do the actual stop
|
|
408
|
+
* out-of-band so the worker pool isn't blocked on next pickup.
|
|
409
|
+
*/
|
|
410
|
+
releaseTask(taskId: string): Promise<void> | void;
|
|
411
|
+
/**
|
|
412
|
+
* Stop AND remove the sandbox bound to `taskId`. Called when a
|
|
413
|
+
* task is permanently deleted; reclaims disk. Safe to call when
|
|
414
|
+
* no such sandbox exists.
|
|
415
|
+
*/
|
|
416
|
+
destroyTask(taskId: string): Promise<void>;
|
|
417
|
+
/**
|
|
418
|
+
* Bind a chat / worker session id to a `taskId` so the runner
|
|
419
|
+
* can route `exec` calls keyed by `ctx.sessionId` back to the
|
|
420
|
+
* task sandbox. Called from the worker's `onSessionStart` hook.
|
|
421
|
+
*/
|
|
422
|
+
bindSession(sessionId: string, taskId: string): void;
|
|
423
|
+
}
|
|
424
|
+
export interface BrowserSidecar {
|
|
425
|
+
/** Host port forwarded to chromium CDP (9222 inside guest). */
|
|
426
|
+
cdpHostPort(): number | undefined;
|
|
427
|
+
/** Host port forwarded to Playwright MCP (3200 inside guest). */
|
|
428
|
+
mcpHostPort(): number | undefined;
|
|
429
|
+
/** Host port forwarded to noVNC (6080 inside guest). */
|
|
430
|
+
vncHostPort(): number | undefined;
|
|
431
|
+
/** Set by the BrowserPanel ResizeObserver; read by the agent's
|
|
432
|
+
* browser tool to re-apply page.setViewportSize() after navigation. */
|
|
433
|
+
setLastViewport(v: {
|
|
434
|
+
width: number;
|
|
435
|
+
height: number;
|
|
436
|
+
}): void;
|
|
437
|
+
getLastViewport(): {
|
|
438
|
+
width: number;
|
|
439
|
+
height: number;
|
|
440
|
+
} | undefined;
|
|
441
|
+
/** Restart chromium + playwright-mcp without rebuilding the whole
|
|
442
|
+
* sandbox. Returns true on success. */
|
|
443
|
+
restart(): Promise<boolean>;
|
|
444
|
+
/**
|
|
445
|
+
* Probe the browser stack and report whether it answers a CDP
|
|
446
|
+
* discovery request right now. The implementation does
|
|
447
|
+
* `GET http://127.0.0.1:<cdpHostPort>/json/version` with a
|
|
448
|
+
* short timeout and translates the outcome into a single
|
|
449
|
+
* status object the agent can act on:
|
|
450
|
+
*
|
|
451
|
+
* - ok=true: chromium answered, latencyMs is the round-trip,
|
|
452
|
+
* `browser`/`webSocketDebuggerUrl` echoed for diagnostics.
|
|
453
|
+
* - ok=false: cdpHostPort isn't set (sidecar has no chromium),
|
|
454
|
+
* or the probe timed out / 5xx'd / connection-reset. The
|
|
455
|
+
* `error` and `suggestion` strings are agent-readable so
|
|
456
|
+
* the tool result can pass them through verbatim.
|
|
457
|
+
*
|
|
458
|
+
* Cheap (~1-5ms when healthy). Safe to call from a tool result
|
|
459
|
+
* post-hook on every browser_* call without serious cost.
|
|
460
|
+
*/
|
|
461
|
+
health(): Promise<BrowserSidecarHealth>;
|
|
462
|
+
}
|
|
463
|
+
export interface BrowserSidecarHealth {
|
|
464
|
+
ok: boolean;
|
|
465
|
+
latencyMs: number;
|
|
466
|
+
/** Browser version string from /json/version when the probe
|
|
467
|
+
* succeeded; absent on failure. */
|
|
468
|
+
browser?: string;
|
|
469
|
+
/** Failure reason when ok=false; absent on success. */
|
|
470
|
+
error?: string;
|
|
471
|
+
/** Agent-actionable next step when ok=false. Examples:
|
|
472
|
+
* "call browser_restart to re-spawn chromium + Playwright MCP"
|
|
473
|
+
* "the sandbox itself is unhealthy; ask the orchestrator to reset_sandbox"
|
|
474
|
+
* Absent on success. */
|
|
475
|
+
suggestion?: string;
|
|
476
|
+
/** Host CDP port at probe time. Useful for diagnostics when
|
|
477
|
+
* the port forward itself moved (e.g. after reset_sandbox). */
|
|
478
|
+
cdpHostPort?: number;
|
|
479
|
+
}
|
|
480
|
+
/** A server-side plugin module exports `activate` (required) and
|
|
481
|
+
* optional `deactivate`. */
|
|
482
|
+
export interface PluginServerModule {
|
|
483
|
+
activate(ctx: PluginContext): Promise<PluginServerExports> | PluginServerExports;
|
|
484
|
+
deactivate?(): Promise<void> | void;
|
|
485
|
+
}
|
|
486
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,EAAE,EAAE,cAAc,CAAC;IACnB,gDAAgD;IAChD,YAAY,EAAE,mBAAmB,CAAC;IAClC,uEAAuE;IACvE,MAAM,EAAE,mBAAmB,CAAC;IAC5B,0DAA0D;IAC1D,GAAG,EAAE,YAAY,CAAC;IAClB,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB;;wEAEoE;IACpE,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,6EAA6E;IAC7E,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAA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0,0 +1,10 @@
|
|
|
1
|
+
// Server-side plugin runtime contract (ADR-0003 §6, ADR-0004 §2/§8).
|
|
2
|
+
/** Build an `ok=true` ToolResult. Optional `data` payload preserved. */
|
|
3
|
+
export function okResult(text, data) {
|
|
4
|
+
return data === undefined ? { ok: true, text } : { ok: true, text, data };
|
|
5
|
+
}
|
|
6
|
+
/** Build an `ok=false` ToolResult. Optional `data` payload preserved. */
|
|
7
|
+
export function errorResult(text, data) {
|
|
8
|
+
return data === undefined ? { ok: false, text } : { ok: false, text, data };
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,qEAAqE;AA2TrE,wEAAwE;AACxE,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,IAAc;IACnD,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC5E,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,IAAc;IACtD,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** Kinds of inbox messages the host knows how to render.
|
|
2
|
+
*
|
|
3
|
+
* - `task_done` — worker called task_complete cleanly.
|
|
4
|
+
* - `task_intervention_required` (008+) — worker run failed,
|
|
5
|
+
* timed out, or hit watchdog; main agent decides next step
|
|
6
|
+
* (continue / retry_fresh / extend_timeout / abort).
|
|
7
|
+
* - `task_stalled` — legacy alias kept for forward compat with
|
|
8
|
+
* pre-008 senders. Host renderer treats it identically to
|
|
9
|
+
* `task_intervention_required`.
|
|
10
|
+
* - `system_note` — generic kernel/admin note.
|
|
11
|
+
*/
|
|
12
|
+
export type InboxMessageKind = "task_done" | "task_intervention_required" | "task_stalled" | "system_note";
|
|
13
|
+
export interface InboxMessage {
|
|
14
|
+
/**
|
|
15
|
+
* Symbolic kind drives the rendered prefix the agent sees, e.g.
|
|
16
|
+
* "[Task done] T1 — summary…". Unknown kinds fall back to plain
|
|
17
|
+
* `system_note`.
|
|
18
|
+
*/
|
|
19
|
+
kind: InboxMessageKind;
|
|
20
|
+
/**
|
|
21
|
+
* Free-form text. Rendered verbatim under the kind-specific
|
|
22
|
+
* prefix. Plain UTF-8; markdown is fine, the agent's renderer
|
|
23
|
+
* will pick it up.
|
|
24
|
+
*/
|
|
25
|
+
text: string;
|
|
26
|
+
/**
|
|
27
|
+
* Optional structured metadata the host stores alongside the
|
|
28
|
+
* message. Not surfaced to the agent — debugging only.
|
|
29
|
+
*/
|
|
30
|
+
meta?: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
export interface SessionInboxCapability {
|
|
33
|
+
/**
|
|
34
|
+
* Enqueue a message for the given session.
|
|
35
|
+
*
|
|
36
|
+
* Behaviour:
|
|
37
|
+
* - If the target session has an active harness instance in
|
|
38
|
+
* this host process, the message is forwarded via
|
|
39
|
+
* `harness.followUp(...)` so the running agent picks it up
|
|
40
|
+
* mid-turn (or at the next turn if it's between provider
|
|
41
|
+
* calls). The DB row is marked delivered.
|
|
42
|
+
* - Otherwise the message persists with status='pending';
|
|
43
|
+
* the next user-driven prompt on that session flushes it
|
|
44
|
+
* as a system-note prefix before passing the user text
|
|
45
|
+
* to the LLM.
|
|
46
|
+
*
|
|
47
|
+
* Errors thrown from this method MUST NOT bubble into the
|
|
48
|
+
* caller's tool execution path — implementations log and
|
|
49
|
+
* swallow. A failing inbox is a degraded mode, not a fatal one.
|
|
50
|
+
*
|
|
51
|
+
* Returns the inbox row id so callers can correlate later
|
|
52
|
+
* delivery events to their origin tool call.
|
|
53
|
+
*/
|
|
54
|
+
enqueue(targetSessionId: string, message: InboxMessage): Promise<string>;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=session-inbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-inbox.d.ts","sourceRoot":"","sources":["../src/session-inbox.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GACxB,WAAW,GACX,4BAA4B,GAC5B,cAAc,GACd,aAAa,CAAC;AAElB,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1E"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Capability-side type for `host.sessionInbox`.
|
|
2
|
+
//
|
|
3
|
+
// The host registers an implementation; plugins fetch it through
|
|
4
|
+
// `ctx.capabilities.get<SessionInboxCapability>("host.sessionInbox")`.
|
|
5
|
+
//
|
|
6
|
+
// Why this lives in the SDK and not in @tianshu/server:
|
|
7
|
+
// plugins shouldn't take a server-package dep just to enqueue an
|
|
8
|
+
// inbox message. Mirror the shape here, document the contract,
|
|
9
|
+
// and let the host implementation match it structurally. Same
|
|
10
|
+
// pattern as `AgentLoopRunner`.
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=session-inbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-inbox.js","sourceRoot":"","sources":["../src/session-inbox.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,EAAE;AACF,iEAAiE;AACjE,uEAAuE;AACvE,EAAE;AACF,wDAAwD;AACxD,mEAAmE;AACnE,iEAAiE;AACjE,gEAAgE;AAChE,kCAAkC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tianshu/plugin-sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "Plugin authoring SDK for Tianshu (server + client types).",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./client": {
|
|
15
|
+
"types": "./dist/client.d.ts",
|
|
16
|
+
"default": "./dist/client.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"src"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"test": "vitest run --passWithNoTests"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/node": "^25.9.1",
|
|
29
|
+
"@types/react": "^19.2.17",
|
|
30
|
+
"typescript": "^6.0.3",
|
|
31
|
+
"vitest": "^4.1.6"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@modelcontextprotocol/sdk": "^1.29.0"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(empty in v0; PR #32 will populate this with files / browser / task-board / calendar stubs)
|