@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,57 @@
|
|
|
1
|
+
// Helpers for preserving the on-disk shape of a text file across
|
|
2
|
+
// `edit_file` round-trips: line ending (LF vs CRLF) and BOM
|
|
3
|
+
// (UTF-8 BOM only — UTF-16 BOMs imply a non-UTF-8 file we can't
|
|
4
|
+
// safely string-edit anyway, so we leave those alone and let the
|
|
5
|
+
// existing binary-detection path or the edit failure surface them).
|
|
6
|
+
//
|
|
7
|
+
// Why: the model can't see what line ending or BOM a file uses.
|
|
8
|
+
// It will send `old_text: "foo\nbar"` even on a CRLF file. Without
|
|
9
|
+
// normalisation:
|
|
10
|
+
// - the find fails (old_text is LF, file is CRLF)
|
|
11
|
+
// - or, if the find succeeds via some accident, new_text lands
|
|
12
|
+
// in the file with mismatched endings, leaving a mixed-ending
|
|
13
|
+
// mess that's annoying to clean up.
|
|
14
|
+
// And a UTF-8 BOM on the source silently disappears when we
|
|
15
|
+
// fs.writeFileSync the new contents back, because we read
|
|
16
|
+
// utf8-with-BOM into a string and write a string back without
|
|
17
|
+
// re-prepending it.
|
|
18
|
+
//
|
|
19
|
+
// Strategy (mirrors OpenCode's edit.ts):
|
|
20
|
+
// 1. On read, peel a leading UTF-8 BOM (\uFEFF) if present,
|
|
21
|
+
// remember that we did.
|
|
22
|
+
// 2. Detect line ending: if the original contains \r\n at all,
|
|
23
|
+
// treat it as a CRLF file; else LF.
|
|
24
|
+
// 3. Normalise each `old_text` / `new_text` to the file's line
|
|
25
|
+
// ending before string-replace.
|
|
26
|
+
// 4. On write, re-prepend the BOM if the source had one.
|
|
27
|
+
//
|
|
28
|
+
// Step 3 means: if the source is CRLF and the model sends LF,
|
|
29
|
+
// we convert; if the source is LF and the model sends CRLF, we
|
|
30
|
+
// also convert (collapse to LF). The file's existing convention
|
|
31
|
+
// always wins; the model's input is treated as conventionally
|
|
32
|
+
// LF and adapted on the way in.
|
|
33
|
+
const BOM = "\uFEFF";
|
|
34
|
+
/** Inspect a freshly-read file's contents and return the
|
|
35
|
+
* normalised text plus shape metadata for round-tripping. */
|
|
36
|
+
export function shapeOf(raw) {
|
|
37
|
+
const hadBom = raw.length > 0 && raw.charCodeAt(0) === 0xfeff;
|
|
38
|
+
const text = hadBom ? raw.slice(1) : raw;
|
|
39
|
+
const ending = text.includes("\r\n") ? "\r\n" : "\n";
|
|
40
|
+
return { text, hadBom, ending };
|
|
41
|
+
}
|
|
42
|
+
/** Normalise a model-supplied snippet to a target line ending.
|
|
43
|
+
* Collapses any \r\n in the input to \n first (so mixed input is
|
|
44
|
+
* cleaned), then expands to the target. Idempotent for already-
|
|
45
|
+
* normalised input. */
|
|
46
|
+
export function normaliseEnding(input, target) {
|
|
47
|
+
const lf = input.replace(/\r\n/g, "\n");
|
|
48
|
+
if (target === "\n")
|
|
49
|
+
return lf;
|
|
50
|
+
return lf.replace(/\n/g, "\r\n");
|
|
51
|
+
}
|
|
52
|
+
/** Re-prepend a BOM if the source had one. Always pass the
|
|
53
|
+
* already-edited text in. */
|
|
54
|
+
export function applyShape(text, source) {
|
|
55
|
+
return source.hadBom ? BOM + text : text;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=text-shape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-shape.js","sourceRoot":"","sources":["../../src/tools/text-shape.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,4DAA4D;AAC5D,gEAAgE;AAChE,iEAAiE;AACjE,oEAAoE;AACpE,EAAE;AACF,gEAAgE;AAChE,mEAAmE;AACnE,iBAAiB;AACjB,oDAAoD;AACpD,iEAAiE;AACjE,kEAAkE;AAClE,wCAAwC;AACxC,4DAA4D;AAC5D,0DAA0D;AAC1D,8DAA8D;AAC9D,oBAAoB;AACpB,EAAE;AACF,yCAAyC;AACzC,8DAA8D;AAC9D,6BAA6B;AAC7B,iEAAiE;AACjE,yCAAyC;AACzC,iEAAiE;AACjE,qCAAqC;AACrC,2DAA2D;AAC3D,EAAE;AACF,8DAA8D;AAC9D,+DAA+D;AAC/D,gEAAgE;AAChE,8DAA8D;AAC9D,gCAAgC;AAEhC,MAAM,GAAG,GAAG,QAAQ,CAAC;AAWrB;8DAC8D;AAC9D,MAAM,UAAU,OAAO,CAAC,GAAW;IACjC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;IAC9D,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAClC,CAAC;AAED;;;wBAGwB;AACxB,MAAM,UAAU,eAAe,CAC7B,KAAa,EACb,MAAqB;IAErB,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACxC,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IAC/B,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACnC,CAAC;AAED;8BAC8B;AAC9B,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,MAAoB;IAC3D,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Tool } from "@earendil-works/pi-ai";
|
|
2
|
+
export interface WriteFileToolResult {
|
|
3
|
+
ok: boolean;
|
|
4
|
+
text: string;
|
|
5
|
+
bytesWritten?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function writeFileSchema(): Tool;
|
|
8
|
+
export declare function executeWriteFile(userHome: string, args: {
|
|
9
|
+
path: string;
|
|
10
|
+
content: string;
|
|
11
|
+
}, sessionId?: string): WriteFileToolResult;
|
|
12
|
+
//# sourceMappingURL=write-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-file.d.ts","sourceRoot":"","sources":["../../src/tools/write-file.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAWlD,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,eAAe,IAAI,IAAI,CAgBtC;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EACvC,SAAS,CAAC,EAAE,MAAM,GACjB,mBAAmB,CA4DrB"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// write_file — agent tool that creates or overwrites a file.
|
|
2
|
+
//
|
|
3
|
+
// Atomic-ish: writes via a `<file>.tmp.<pid>` sibling and renames into
|
|
4
|
+
// place, so a partial write doesn't leave a half-baked target if the
|
|
5
|
+
// process crashes mid-write.
|
|
6
|
+
//
|
|
7
|
+
// Parent directories are created on demand.
|
|
8
|
+
//
|
|
9
|
+
// Refuses to write outside the user home (path-helper enforced).
|
|
10
|
+
import fs from "node:fs";
|
|
11
|
+
import path from "node:path";
|
|
12
|
+
import { Type } from "typebox";
|
|
13
|
+
import { loadPrompt } from "./load-prompt.js";
|
|
14
|
+
import { hasRead, markRead } from "./read-tracker.js";
|
|
15
|
+
import { resolveInUserHome, toWorkspaceUri, PathOutsideRootError, } from "./path-helper.js";
|
|
16
|
+
const MAX_WRITE_BYTES = 5_000_000; // 5 MB
|
|
17
|
+
export function writeFileSchema() {
|
|
18
|
+
return {
|
|
19
|
+
name: "write_file",
|
|
20
|
+
description: loadPrompt("write-file.prompt.md"),
|
|
21
|
+
parameters: Type.Object({
|
|
22
|
+
path: Type.String({
|
|
23
|
+
description: 'Path relative to the workspace root, e.g. "notes/today.md". ' +
|
|
24
|
+
'Prefer relative paths over a leading slash \u2014 a leading slash here ' +
|
|
25
|
+
'means workspace root, NOT the sandbox OS root that `exec` sees.',
|
|
26
|
+
}),
|
|
27
|
+
content: Type.String({
|
|
28
|
+
description: "Full file contents to write. UTF-8 encoded.",
|
|
29
|
+
}),
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function executeWriteFile(userHome, args, sessionId) {
|
|
34
|
+
let resolved;
|
|
35
|
+
try {
|
|
36
|
+
resolved = resolveInUserHome(userHome, args.path);
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
if (err instanceof PathOutsideRootError) {
|
|
40
|
+
return { ok: false, text: `path is outside the workspace: ${args.path}` };
|
|
41
|
+
}
|
|
42
|
+
throw err;
|
|
43
|
+
}
|
|
44
|
+
if (resolved === path.resolve(userHome)) {
|
|
45
|
+
return { ok: false, text: `cannot write to the workspace root` };
|
|
46
|
+
}
|
|
47
|
+
const exists = fs.existsSync(resolved);
|
|
48
|
+
if (exists && fs.statSync(resolved).isDirectory()) {
|
|
49
|
+
return { ok: false, text: `is a directory: ${args.path}` };
|
|
50
|
+
}
|
|
51
|
+
// Read-required for overwrites: blindly replacing a file the
|
|
52
|
+
// agent never read is how user work disappears. New files are
|
|
53
|
+
// exempt — there's nothing to read.
|
|
54
|
+
if (exists && !hasRead(sessionId, resolved)) {
|
|
55
|
+
return {
|
|
56
|
+
ok: false,
|
|
57
|
+
text: `write_file: ${args.path} already exists and you haven't read it in this session. ` +
|
|
58
|
+
`Call read_file once on this path (a single full read covers any number ` +
|
|
59
|
+
`of follow-up edits in the same session) so you can see what you're ` +
|
|
60
|
+
`about to overwrite, or use edit_file for a targeted change.`,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const buf = Buffer.from(args.content, "utf8");
|
|
64
|
+
if (buf.length > MAX_WRITE_BYTES) {
|
|
65
|
+
return {
|
|
66
|
+
ok: false,
|
|
67
|
+
text: `content too large: ${buf.length} bytes > ${MAX_WRITE_BYTES} cap`,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
fs.mkdirSync(path.dirname(resolved), { recursive: true });
|
|
71
|
+
// Write to a temp sibling and rename so partial writes don't trash
|
|
72
|
+
// the target on crash.
|
|
73
|
+
const tmp = `${resolved}.tmp.${process.pid}.${Date.now()}`;
|
|
74
|
+
fs.writeFileSync(tmp, buf);
|
|
75
|
+
fs.renameSync(tmp, resolved);
|
|
76
|
+
// The agent now "knows" the file's contents (it just wrote them),
|
|
77
|
+
// so a follow-up edit_file in the same session is fine.
|
|
78
|
+
markRead(sessionId, resolved);
|
|
79
|
+
return {
|
|
80
|
+
ok: true,
|
|
81
|
+
// Emit the canonical workspace:// URI so the LLM has one shape
|
|
82
|
+
// to reference produced files in its reply (the chat UI's
|
|
83
|
+
// urlTransform recognises it). Single source of truth: every
|
|
84
|
+
// fs tool round-trips paths through toWorkspaceUri.
|
|
85
|
+
text: `wrote ${buf.length} bytes to ${toWorkspaceUri(userHome, resolved)}`,
|
|
86
|
+
bytesWritten: buf.length,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=write-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-file.js","sourceRoot":"","sources":["../../src/tools/write-file.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,EAAE;AACF,uEAAuE;AACvE,qEAAqE;AACrE,6BAA6B;AAC7B,EAAE;AACF,4CAA4C;AAC5C,EAAE;AACF,iEAAiE;AAEjE,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAE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E,YAAY,EAAE,GAAG,CAAC,MAAM;KACzB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Create or overwrite a file in the workspace. Parent directories
|
|
2
|
+
are created if missing.
|
|
3
|
+
|
|
4
|
+
## Guidelines
|
|
5
|
+
|
|
6
|
+
- Use `write_file` for new files or complete rewrites. For
|
|
7
|
+
in-place changes to an existing file prefer `edit_file`.
|
|
8
|
+
- **If the target file already exists, you must call `read_file`
|
|
9
|
+
on it first.** `write_file` will refuse to overwrite an
|
|
10
|
+
unseen file with a specific error — overwriting blind is how
|
|
11
|
+
you destroy work the user will be sad about.
|
|
12
|
+
- Don't proactively create documentation files (`*.md`,
|
|
13
|
+
`README.*`) the user didn't ask for.
|
|
14
|
+
- Avoid writing emojis to files unless the user asked.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "files",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"displayName": "Workspace Files",
|
|
5
|
+
"description": "Browse, read, and upload files in the tenant workspace.",
|
|
6
|
+
"author": "tianshu-ai",
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"permissions": ["workspace.read", "workspace.write"],
|
|
9
|
+
"client": { "entry": "@tianshu-builtin/plugin-files/client" },
|
|
10
|
+
"server": { "entry": "@tianshu-builtin/plugin-files/server" },
|
|
11
|
+
"contributes": {
|
|
12
|
+
"topBarButtons": [
|
|
13
|
+
{
|
|
14
|
+
"id": "toggle",
|
|
15
|
+
"icon": "FolderOpen",
|
|
16
|
+
"tooltip": "Workspace files",
|
|
17
|
+
"opensPanel": "files.main",
|
|
18
|
+
"order": 100
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"rightPanels": [
|
|
22
|
+
{
|
|
23
|
+
"id": "main",
|
|
24
|
+
"displayName": "Files",
|
|
25
|
+
"component": "FilesPanel"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"composerActions": [
|
|
29
|
+
{
|
|
30
|
+
"id": "attach",
|
|
31
|
+
"icon": "Paperclip",
|
|
32
|
+
"tooltip": "Attach file",
|
|
33
|
+
"component": "UploadButton",
|
|
34
|
+
"order": 100
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"attachmentRenderers": [
|
|
38
|
+
{
|
|
39
|
+
"id": "image",
|
|
40
|
+
"mimePattern": "image/*",
|
|
41
|
+
"component": "ImageAttachment",
|
|
42
|
+
"order": 100
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "any",
|
|
46
|
+
"mimePattern": "*/*",
|
|
47
|
+
"component": "FileAttachment",
|
|
48
|
+
"order": 999
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"apiRoutes": [
|
|
52
|
+
{ "method": "GET", "path": "/list", "handler": "list" },
|
|
53
|
+
{ "method": "GET", "path": "/read", "handler": "read" },
|
|
54
|
+
{ "method": "GET", "path": "/raw", "handler": "raw" },
|
|
55
|
+
{ "method": "POST", "path": "/upload", "handler": "upload" }
|
|
56
|
+
],
|
|
57
|
+
"tools": [
|
|
58
|
+
{ "id": "list_dir", "module": "ListDirTool" },
|
|
59
|
+
{ "id": "read_file", "module": "ReadFileTool" },
|
|
60
|
+
{ "id": "write_file", "module": "WriteFileTool" },
|
|
61
|
+
{ "id": "edit_file", "module": "EditFileTool" },
|
|
62
|
+
{ "id": "glob", "module": "GlobTool" },
|
|
63
|
+
{ "id": "tenant_config_list", "module": "TenantConfigListTool" },
|
|
64
|
+
{ "id": "tenant_config_read", "module": "TenantConfigReadTool" },
|
|
65
|
+
{ "id": "tenant_config_write", "module": "TenantConfigWriteTool" },
|
|
66
|
+
{ "id": "tenant_config_edit", "module": "TenantConfigEditTool" },
|
|
67
|
+
{ "id": "tenant_config_delete", "module": "TenantConfigDeleteTool" },
|
|
68
|
+
{ "id": "tenant_config_glob", "module": "TenantConfigGlobTool" }
|
|
69
|
+
],
|
|
70
|
+
"skills": [
|
|
71
|
+
{ "id": "workspace-layout", "path": "skills/files-workspace-layout.md" }
|
|
72
|
+
],
|
|
73
|
+
"systemPromptFragments": [
|
|
74
|
+
{
|
|
75
|
+
"id": "workspace-layout",
|
|
76
|
+
"text": "WORKSPACE LAYOUT\nYour default working directory is the user's private home in this tenant.\n\nPersonal directories (use freely):\n ./projects/<slug>/ active work; reports, code, deliverables go here.\n ./uploads/ files the user uploaded for you to look at.\n ./tmp/ scratch space; clean up after yourself.\n ./trash/ soft-delete; move things here instead of removing them.\n ./USER.md personal preferences (read on demand)."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "workspace-conventions",
|
|
80
|
+
"text": "Conventions:\n - Deliverables go to ./projects/<slug>/, never the home root.\n - When the user uploads a file, expect it under ./uploads/.\n - Don't leave scratch artefacts in ./projects/ or the root \u2014 use ./tmp/.\n - Other users' homes in this tenant are off-limits; you cannot reach them."
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "workspace-references",
|
|
84
|
+
"text": "Referencing files in your reply:\n - When you point at a workspace file in your response (e.g. an image you just wrote, a generated report, an attachment), use the workspace:// URI you got back from the fs tool, e.g. ``.\n - The chat UI knows how to render those; absolute host paths or bare \"./foo\" links won't preview."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "edit-vs-write",
|
|
88
|
+
"text": "- `edit_file` is for changes to an existing file (in-place exact-text replace, atomic). `write_file` is for new files or full rewrites of the entire file. Prefer editing existing files; do not create new files unless asked."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "edit-old-text-uniqueness",
|
|
92
|
+
"text": "- Each `edit_file` `old_text` must appear exactly once in the file. Keep `old_text` as small as possible while still being unique \u2014 don't pad with large unchanged regions to \"connect\" two distant changes; emit two separate edits in the same `edits[]` batch instead."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "read-before-edit",
|
|
96
|
+
"text": "- Before `edit_file` (or `write_file` overwrite) on a file you haven't seen yet in this session, call `read_file` once. The host tracks reads per session, so a single full-file read covers any number of follow-up `edit_file` / `write_file` calls on that same path \u2014 don't re-read between edits. Files you just created with `write_file` count as already-read; you can `edit_file` them right away without reading first."
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tianshu-builtin/plugin-files",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "Workspace file browser for Tianshu (builtin plugin).",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/server.js",
|
|
8
|
+
"types": "./dist/server.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
"./server": {
|
|
11
|
+
"types": "./dist/server.d.ts",
|
|
12
|
+
"default": "./dist/server.js"
|
|
13
|
+
},
|
|
14
|
+
"./client": {
|
|
15
|
+
"types": "./dist/client.d.ts",
|
|
16
|
+
"default": "./dist/client.js"
|
|
17
|
+
},
|
|
18
|
+
"./manifest.json": "./manifest.json"
|
|
19
|
+
},
|
|
20
|
+
"files": ["dist", "src", "skills", "manifest.json"],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc && node scripts/copy-prompts.mjs",
|
|
23
|
+
"predev": "node scripts/copy-prompts.mjs",
|
|
24
|
+
"dev": "tsc --watch --preserveWatchOutput",
|
|
25
|
+
"copy-prompts": "node scripts/copy-prompts.mjs",
|
|
26
|
+
"test": "vitest run --passWithNoTests"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@tianshu/plugin-sdk": "*"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/node": "^25.9.1",
|
|
33
|
+
"@types/react": "^19.2.17",
|
|
34
|
+
"lucide-react": "^1.17.0",
|
|
35
|
+
"react": "^19.0.0",
|
|
36
|
+
"typescript": "^6.0.3",
|
|
37
|
+
"vitest": "^4.1.6"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: files-workspace-layout
|
|
3
|
+
description: Conventions for the per-user workspace this `files` plugin manages — directory roles (projects, uploads, tmp, trash), where deliverables go, what NOT to touch.
|
|
4
|
+
when:
|
|
5
|
+
toolPresent: read_file
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Your default working directory is the user's private home in this tenant.
|
|
9
|
+
Filesystem tools (`list_dir`, `read_file`, `write_file`, `edit_file`, `glob`)
|
|
10
|
+
operate relative to this home (`/` = home).
|
|
11
|
+
|
|
12
|
+
## Personal directories
|
|
13
|
+
|
|
14
|
+
| Path | Role |
|
|
15
|
+
|------|------|
|
|
16
|
+
| `./projects/<slug>/` | Active work. Reports, code, deliverables go here. |
|
|
17
|
+
| `./uploads/` | Files the user uploaded for you to look at. |
|
|
18
|
+
| `./tmp/` | Scratch space. Clean up after yourself. |
|
|
19
|
+
| `./trash/` | Soft-delete. Move things here instead of removing them. |
|
|
20
|
+
| `./USER.md` | Personal preferences (read on demand). |
|
|
21
|
+
|
|
22
|
+
## Conventions
|
|
23
|
+
|
|
24
|
+
- Deliverables go to `./projects/<slug>/`, never the home root.
|
|
25
|
+
- When the user uploads a file, expect it under `./uploads/`.
|
|
26
|
+
- Don't leave scratch artefacts in `./projects/` or the root — use `./tmp/`.
|
|
27
|
+
- Other users' homes in this tenant are off-limits; you cannot reach them via
|
|
28
|
+
these tools.
|
|
29
|
+
- When you make changes, briefly say what you changed in your reply.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Request, Response } from "express";
|
|
2
|
+
import type { SandboxRunner } from "@tianshu/plugin-sdk";
|
|
3
|
+
export interface BrowserRoutesDeps {
|
|
4
|
+
/** Same accessor pattern as the sandbox routes — lets the routes
|
|
5
|
+
* module stay decoupled from plugin activation timing. */
|
|
6
|
+
getRunner(): SandboxRunner | null;
|
|
7
|
+
}
|
|
8
|
+
/** Public payload returned by GET /browser/status. Stable shape so
|
|
9
|
+
* the admin page can render meaningfully through every state of
|
|
10
|
+
* the upcoming chromium rollout (no sidecar → sidecar but no
|
|
11
|
+
* chromium → chromium up). */
|
|
12
|
+
export interface BrowserStatusPayload {
|
|
13
|
+
/** True iff every required port forward is detected. v0.1 always
|
|
14
|
+
* reports false because the chromium stack ships in N+5.2. */
|
|
15
|
+
ready: boolean;
|
|
16
|
+
/** Whatever subset of port forwards the sidecar has seen. Port
|
|
17
|
+
* values are host ports; the agent's `browser.cdp` consumer
|
|
18
|
+
* builds `http://localhost:<port>` URLs from these. */
|
|
19
|
+
ports: {
|
|
20
|
+
cdp: number | null;
|
|
21
|
+
mcp: number | null;
|
|
22
|
+
vnc: number | null;
|
|
23
|
+
};
|
|
24
|
+
/** Per-tenant viewport last reported by the BrowserPanel
|
|
25
|
+
* ResizeObserver, when present. Used by the agent's browser
|
|
26
|
+
* tools to set Playwright's viewport before navigating. */
|
|
27
|
+
lastViewport: {
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
} | null;
|
|
31
|
+
/** Human-readable hint shown by the admin page when ready=false.
|
|
32
|
+
* Helps users tell "build the browser layer" from "browser is
|
|
33
|
+
* starting up" without grepping logs. */
|
|
34
|
+
hint?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function buildBrowserRoutes(deps: BrowserRoutesDeps): {
|
|
37
|
+
getBrowserStatus: (_req: Request, res: Response) => Promise<void>;
|
|
38
|
+
postBrowserRestart: (_req: Request, res: Response) => Promise<void>;
|
|
39
|
+
postBrowserResize: (req: Request, res: Response) => Promise<void>;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=browser-routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-routes.d.ts","sourceRoot":"","sources":["../../src/admin/browser-routes.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzE,MAAM,WAAW,iBAAiB;IAChC;+DAC2D;IAC3D,SAAS,IAAI,aAAa,GAAG,IAAI,CAAC;CACnC;AAYD;;;+BAG+B;AAC/B,MAAM,WAAW,oBAAoB;IACnC;mEAC+D;IAC/D,KAAK,EAAE,OAAO,CAAC;IACf;;4DAEwD;IACxD,KAAK,EAAE;QACL,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QACnB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QACnB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;KACpB,CAAC;IACF;;gEAE4D;IAC5D,YAAY,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACvD;;8CAE0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB;6BAMlB,OAAO,OAAO,QAAQ;+BA+BpB,OAAO,OAAO,QAAQ;6BAmDxB,OAAO,OAAO,QAAQ;EA4F7D"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
// HTTP route handlers for the Browser admin page (N+5.1 scaffold).
|
|
2
|
+
//
|
|
3
|
+
// Pure read-through over the runner's BrowserSidecar plus a
|
|
4
|
+
// best-effort restart endpoint. The chromium / Xvfb / noVNC stack
|
|
5
|
+
// itself isn't shipped yet — those routes report "not running"
|
|
6
|
+
// today, and become meaningful once the Sandboxfile that includes
|
|
7
|
+
// the browser layer lands in N+5.2.
|
|
8
|
+
//
|
|
9
|
+
// Why this is a separate file (not folded into routes.ts):
|
|
10
|
+
// - admin/routes.ts is already 600+ lines and four conceptual
|
|
11
|
+
// surfaces (sandboxfile / builds / shell / live). Sandwiching a
|
|
12
|
+
// fifth area in that file makes future readers thumb past 90%
|
|
13
|
+
// irrelevant code to find browser logic.
|
|
14
|
+
// - These routes also have a different liveness story: the sidecar
|
|
15
|
+
// may exist but report "no chromium running yet". The route
|
|
16
|
+
// shape reflects that explicitly via { ready, ports, lastError }
|
|
17
|
+
// instead of bolting onto the existing sandbox status response.
|
|
18
|
+
import { McpToolset } from "@tianshu/plugin-sdk";
|
|
19
|
+
/**
|
|
20
|
+
* Cap viewport sizes the runner is willing to set. Matches Xvfb's
|
|
21
|
+
* `-screen 0 2400x1800x24` framebuffer in browser.yaml; overshooting
|
|
22
|
+
* means xrandr silently truncates.
|
|
23
|
+
*/
|
|
24
|
+
const VIEWPORT_MIN_W = 640;
|
|
25
|
+
const VIEWPORT_MIN_H = 480;
|
|
26
|
+
const VIEWPORT_MAX_W = 2400;
|
|
27
|
+
const VIEWPORT_MAX_H = 1800;
|
|
28
|
+
export function buildBrowserRoutes(deps) {
|
|
29
|
+
const getSidecar = () => {
|
|
30
|
+
const runner = deps.getRunner();
|
|
31
|
+
return runner?.browser ?? null;
|
|
32
|
+
};
|
|
33
|
+
const getBrowserStatus = async (_req, res) => {
|
|
34
|
+
const sidecar = getSidecar();
|
|
35
|
+
if (!sidecar) {
|
|
36
|
+
const payload = {
|
|
37
|
+
ready: false,
|
|
38
|
+
ports: { cdp: null, mcp: null, vnc: null },
|
|
39
|
+
lastViewport: null,
|
|
40
|
+
hint: "Sandbox runner not active — start it via the Sandbox admin page.",
|
|
41
|
+
};
|
|
42
|
+
res.json(payload);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const cdp = sidecar.cdpHostPort();
|
|
46
|
+
const mcp = sidecar.mcpHostPort();
|
|
47
|
+
const vnc = sidecar.vncHostPort();
|
|
48
|
+
const ready = cdp !== undefined && mcp !== undefined && vnc !== undefined;
|
|
49
|
+
const payload = {
|
|
50
|
+
ready,
|
|
51
|
+
ports: {
|
|
52
|
+
cdp: cdp ?? null,
|
|
53
|
+
mcp: mcp ?? null,
|
|
54
|
+
vnc: vnc ?? null,
|
|
55
|
+
},
|
|
56
|
+
lastViewport: sidecar.getLastViewport() ?? null,
|
|
57
|
+
hint: ready
|
|
58
|
+
? undefined
|
|
59
|
+
: "Browser stack not running. Add chromium + Playwright MCP + noVNC to your Sandboxfile and rebuild (lands in a follow-up PR).",
|
|
60
|
+
};
|
|
61
|
+
res.json(payload);
|
|
62
|
+
};
|
|
63
|
+
const postBrowserRestart = async (_req, res) => {
|
|
64
|
+
const sidecar = getSidecar();
|
|
65
|
+
if (!sidecar) {
|
|
66
|
+
res.status(503).json({
|
|
67
|
+
ok: false,
|
|
68
|
+
error: "no_sidecar",
|
|
69
|
+
message: "Sandbox runner not active.",
|
|
70
|
+
});
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
try {
|
|
74
|
+
const ok = await sidecar.restart();
|
|
75
|
+
res.json({
|
|
76
|
+
ok,
|
|
77
|
+
// restart() returning false is a normal v0.1 outcome — chromium
|
|
78
|
+
// isn't running so there's nothing to restart. We surface that
|
|
79
|
+
// verbatim so the admin page can show a "no-op" badge.
|
|
80
|
+
message: ok
|
|
81
|
+
? "browser restarted"
|
|
82
|
+
: "no chromium stack running; ship the browser sandbox layer first",
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
res.status(500).json({
|
|
87
|
+
ok: false,
|
|
88
|
+
error: "restart_failed",
|
|
89
|
+
message: err instanceof Error ? err.message : String(err),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
// POST /api/p/microsandbox/browser/resize
|
|
94
|
+
//
|
|
95
|
+
// Three-layer dynamic resize, copy of the closed-source tianshu
|
|
96
|
+
// approach (see `/api/browser/resize` in the predecessor):
|
|
97
|
+
// (1) xrandr --fb resizes the Xvfb framebuffer so noVNC isn't
|
|
98
|
+
// letterboxed or cropped.
|
|
99
|
+
// (2) wmctrl re-fits the chromium X11 window to the new
|
|
100
|
+
// framebuffer.
|
|
101
|
+
// (3) Playwright MCP browser_resize (== page.setViewportSize)
|
|
102
|
+
// tells chromium to re-layout its inner viewport — without
|
|
103
|
+
// this the X11 window changes but the page content stays
|
|
104
|
+
// at its launch size and looks like "app only fills part of
|
|
105
|
+
// the panel".
|
|
106
|
+
// Layer (3) also wins if the sandbox image is missing xrandr/
|
|
107
|
+
// wmctrl, because Playwright manages the viewport at the chrome
|
|
108
|
+
// level on its own. Layers (1)+(2) are best-effort.
|
|
109
|
+
//
|
|
110
|
+
// The host BrowserViewportPanel POSTs here as the user finishes
|
|
111
|
+
// dragging the panel resize handle (debounced client-side). We
|
|
112
|
+
// also stash the latest viewport on the BrowserSidecar so the
|
|
113
|
+
// browser tool can re-apply it after navigation.
|
|
114
|
+
const postBrowserResize = async (req, res) => {
|
|
115
|
+
const sidecar = getSidecar();
|
|
116
|
+
if (!sidecar) {
|
|
117
|
+
res.status(503).json({ ok: false, error: "no_sidecar" });
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const runner = deps.getRunner();
|
|
121
|
+
const body = (req.body ?? {});
|
|
122
|
+
const w = clampInt(Number(body.width), VIEWPORT_MIN_W, VIEWPORT_MAX_W);
|
|
123
|
+
const h = clampInt(Number(body.height), VIEWPORT_MIN_H, VIEWPORT_MAX_H);
|
|
124
|
+
if (!w || !h) {
|
|
125
|
+
res.status(400).json({ ok: false, error: "viewport_required" });
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
// (1) + (2): X11 layer — best-effort, errors non-fatal.
|
|
129
|
+
let x11Note;
|
|
130
|
+
if (runner && typeof runner.exec === "function") {
|
|
131
|
+
const script = `DISPLAY=:99 xrandr --fb ${w}x${h} 2>/dev/null || true; ` +
|
|
132
|
+
`WID=$(DISPLAY=:99 wmctrl -l 2>/dev/null | grep -iE 'chromium|chrome|google' | awk '{print $1; exit}'); ` +
|
|
133
|
+
`if [ -n "$WID" ]; then DISPLAY=:99 wmctrl -i -r "$WID" -e "0,0,0,${w},${h}" 2>/dev/null || true; fi`;
|
|
134
|
+
try {
|
|
135
|
+
await runner.exec({ command: script, timeoutMs: 10_000 });
|
|
136
|
+
}
|
|
137
|
+
catch (err) {
|
|
138
|
+
x11Note =
|
|
139
|
+
err instanceof Error ? err.message : String(err);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// (3): chromium viewport via Playwright MCP. This is what
|
|
143
|
+
// actually re-layouts the page content. Done after the X11
|
|
144
|
+
// resize so chrome doesn't fight us by trying to re-fit to
|
|
145
|
+
// the smaller window first.
|
|
146
|
+
let mcpNote;
|
|
147
|
+
const mcpPort = sidecar.mcpHostPort();
|
|
148
|
+
if (mcpPort) {
|
|
149
|
+
try {
|
|
150
|
+
// Spin up a single-shot McpToolset bound to the tenant's
|
|
151
|
+
// Playwright MCP, call browser_resize, drop. The toolset
|
|
152
|
+
// handles the Host-header pinning + SDK transport setup.
|
|
153
|
+
const ts = new McpToolset({
|
|
154
|
+
name: "playwright-resize",
|
|
155
|
+
prefix: "",
|
|
156
|
+
resolve: () => `http://127.0.0.1:${mcpPort}/mcp`,
|
|
157
|
+
upstreamHost: "localhost:3200",
|
|
158
|
+
});
|
|
159
|
+
await ts.refresh();
|
|
160
|
+
const tool = ts.listTools().find((t) => t.schema.name === "browser_resize");
|
|
161
|
+
if (tool) {
|
|
162
|
+
await tool.execute({ width: w, height: h },
|
|
163
|
+
// Stub the per-call context the SDK expects — we don't
|
|
164
|
+
// care about logging beyond x11Note here.
|
|
165
|
+
{
|
|
166
|
+
pluginId: "microsandbox",
|
|
167
|
+
tenantId: "unknown",
|
|
168
|
+
userId: "unknown",
|
|
169
|
+
capabilities: { get: () => undefined, has: () => false },
|
|
170
|
+
userHomeDir: "",
|
|
171
|
+
tenantHomeDir: "",
|
|
172
|
+
log: { info: () => { }, warn: () => { }, error: () => { } },
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
mcpNote = "browser_resize not advertised by upstream MCP";
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
catch (err) {
|
|
180
|
+
mcpNote = err instanceof Error ? err.message : String(err);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
mcpNote = "MCP port not yet detected";
|
|
185
|
+
}
|
|
186
|
+
// Cache the latest viewport so the agent's browser tool can
|
|
187
|
+
// re-apply it automatically after each goto (chrome resets
|
|
188
|
+
// viewport on navigation).
|
|
189
|
+
sidecar.setLastViewport({ width: w, height: h });
|
|
190
|
+
res.json({
|
|
191
|
+
ok: true,
|
|
192
|
+
applied: { width: w, height: h },
|
|
193
|
+
...(x11Note ? { x11Note } : {}),
|
|
194
|
+
...(mcpNote ? { mcpNote } : {}),
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
return {
|
|
198
|
+
getBrowserStatus,
|
|
199
|
+
postBrowserRestart,
|
|
200
|
+
postBrowserResize,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
function clampInt(n, lo, hi) {
|
|
204
|
+
if (!Number.isFinite(n))
|
|
205
|
+
return 0;
|
|
206
|
+
return Math.max(lo, Math.min(hi, Math.round(n)));
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=browser-routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-routes.js","sourceRoot":"","sources":["../../src/admin/browser-routes.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,4DAA4D;AAC5D,kEAAkE;AAClE,+DAA+D;AAC/D,kEAAkE;AAClE,oCAAoC;AACpC,EAAE;AACF,2DAA2D;AAC3D,8DAA8D;AAC9D,kEAAkE;AAClE,gEAAgE;AAChE,2CAA2C;AAC3C,mEAAmE;AACnE,8DAA8D;AAC9D,mEAAmE;AACnE,kEAAkE;AAIlE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAQjD;;;;GAIG;AACH,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,cAAc,GAAG,IAAI,CAAC;AAC5B,MAAM,cAAc,GAAG,IAA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