kennel 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -5
- package/dist/cli/dispatch.js +9 -0
- package/dist/cli/src/automations/notifications.d.ts +40 -0
- package/dist/cli/src/automations/notifications.js +220 -0
- package/dist/cli/src/cli/dispatch.d.ts +1 -0
- package/dist/cli/src/cli/dispatch.js +125 -0
- package/dist/cli/src/cli/usage.d.ts +1 -0
- package/dist/cli/src/cli/usage.js +25 -0
- package/dist/cli/src/core/api-client.d.ts +13 -0
- package/dist/cli/src/core/api-client.js +1 -0
- package/dist/cli/src/core/command.d.ts +1 -0
- package/dist/cli/src/core/command.js +69 -0
- package/dist/cli/src/core/core-folders.d.ts +1 -0
- package/dist/cli/src/core/core-folders.js +42 -0
- package/dist/cli/src/core/init.d.ts +1 -0
- package/dist/cli/src/core/init.js +141 -0
- package/dist/cli/src/core/runtime.d.ts +14 -0
- package/dist/cli/src/core/runtime.js +1 -0
- package/dist/cli/src/deploy/cloudflare.d.ts +6 -0
- package/dist/cli/src/deploy/cloudflare.js +100 -0
- package/dist/cli/src/deploy/environment.d.ts +2 -0
- package/dist/cli/src/deploy/environment.js +47 -0
- package/dist/cli/src/deploy/smoke-tests.d.ts +4 -0
- package/dist/cli/src/deploy/smoke-tests.js +92 -0
- package/dist/cli/src/deploy/trigger-dev.d.ts +2 -0
- package/dist/cli/src/deploy/trigger-dev.js +255 -0
- package/dist/cli/src/deploy/vercel.d.ts +3 -0
- package/dist/cli/src/deploy/vercel.js +67 -0
- package/dist/cli/src/main.d.ts +1 -0
- package/dist/cli/src/main.js +9 -0
- package/dist/cli/src/mcp/agent-tools.d.ts +8 -0
- package/dist/cli/src/mcp/agent-tools.js +247 -0
- package/dist/cli/src/mcp/config.d.ts +25 -0
- package/dist/cli/src/mcp/config.js +185 -0
- package/dist/cli/src/mcp/function-source.d.ts +7 -0
- package/dist/cli/src/mcp/function-source.js +42 -0
- package/dist/cli/src/mcp/generate.d.ts +1 -0
- package/dist/cli/src/mcp/generate.js +47 -0
- package/dist/cli/src/mcp/install-page.d.ts +12 -0
- package/dist/cli/src/mcp/install-page.js +5 -0
- package/dist/cli/src/notifications/email-worker.d.ts +8 -0
- package/dist/cli/src/notifications/email-worker.js +137 -0
- package/dist/cli/src/package/mcp-data.d.ts +1 -0
- package/dist/cli/src/package/mcp-data.js +1 -0
- package/dist/cli/src/package/mcp-email-worker.d.ts +1 -0
- package/dist/cli/src/package/mcp-email-worker.js +1 -0
- package/dist/cli/src/package/mcp-http.d.ts +1 -0
- package/dist/cli/src/package/mcp-http.js +1 -0
- package/dist/cli/src/package/mcp-stdio.d.ts +1 -0
- package/dist/cli/src/package/mcp-stdio.js +1 -0
- package/dist/cli/src/package/mcp.d.ts +1 -0
- package/dist/cli/src/package/mcp.js +1 -0
- package/dist/cli/src/package/preview.d.ts +9 -0
- package/dist/cli/src/package/preview.js +1 -0
- package/dist/cli/src/plugins/external.d.ts +36 -0
- package/dist/cli/src/plugins/external.js +503 -0
- package/dist/cli/src/publish/cloudflare-init.d.ts +12 -0
- package/dist/cli/src/publish/cloudflare-init.js +101 -0
- package/dist/cli/src/publish/config.d.ts +28 -0
- package/dist/cli/src/publish/config.js +178 -0
- package/dist/cli/src/publish/options.d.ts +13 -0
- package/dist/cli/src/publish/options.js +78 -0
- package/dist/cli/src/publish/vercel-init.d.ts +9 -0
- package/dist/cli/src/publish/vercel-init.js +52 -0
- package/dist/cli/src/shared/json.d.ts +4 -0
- package/dist/cli/src/shared/json.js +56 -0
- package/dist/cli/src/shared/object.d.ts +2 -0
- package/dist/cli/src/shared/object.js +3 -0
- package/dist/cli/src/shared/package-manager.d.ts +11 -0
- package/dist/cli/src/shared/package-manager.js +39 -0
- package/dist/cli/src/shared/path.d.ts +4 -0
- package/dist/cli/src/shared/path.js +40 -0
- package/dist/cli/src/shared/process.d.ts +7 -0
- package/dist/cli/src/shared/process.js +12 -0
- package/dist/cli/src/shared/project-config.d.ts +2 -0
- package/dist/cli/src/shared/project-config.js +26 -0
- package/dist/cli/src/site/dev.d.ts +10 -0
- package/dist/cli/src/site/dev.js +126 -0
- package/dist/cli/src/site/extension.d.ts +8 -0
- package/dist/cli/src/site/extension.js +113 -0
- package/dist/cli/src/site/folder-icons.d.ts +46 -0
- package/dist/cli/src/site/folder-icons.js +86 -0
- package/dist/cli/src/site/hot-viewer.d.ts +2 -0
- package/dist/cli/src/site/hot-viewer.js +231 -0
- package/dist/cli/src/site/kinds.d.ts +1 -0
- package/dist/cli/src/site/kinds.js +1 -0
- package/dist/cli/src/site/mail.d.ts +1 -0
- package/dist/cli/src/site/mail.js +10 -0
- package/dist/cli/src/site/renderers.d.ts +61 -0
- package/dist/cli/src/site/renderers.js +219 -0
- package/dist/cli/src/site/server-plugins.d.ts +54 -0
- package/dist/cli/src/site/server-plugins.js +1 -0
- package/dist/cli/src/site/viewer.d.ts +36 -0
- package/dist/cli/src/site/viewer.js +352 -0
- package/dist/cli/src/site/vitepress.d.ts +1 -0
- package/dist/cli/src/site/vitepress.js +1 -0
- package/dist/cli/usage.js +1 -0
- package/dist/core/api-client.js +75 -44
- package/dist/core/command.js +6 -3
- package/dist/core/core-folders.js +38280 -33
- package/dist/core/init.js +59 -4
- package/dist/core/runtime.js +57163 -41853
- package/dist/package/preview.js +40589 -17894
- package/dist/plugins/external.d.ts +36 -0
- package/dist/plugins/external.js +503 -0
- package/dist/site/server-plugins.js +394 -59
- package/dist/site/viewer.js +18 -5
- package/kernel/apps/web/.env.example +11 -0
- package/kernel/apps/web/components.json +20 -0
- package/kernel/apps/web/eslint.config.mjs +60 -0
- package/kernel/apps/web/index.html +17 -0
- package/kernel/apps/web/package.json +79 -0
- package/kernel/apps/web/public/favicon.svg +6 -0
- package/kernel/apps/web/public/providers/claude.svg +1 -0
- package/kernel/apps/web/public/providers/codex.svg +1 -0
- package/kernel/apps/web/public/providers/cursor.svg +1 -0
- package/kernel/apps/web/public/providers/opencode.svg +1 -0
- package/kernel/apps/web/public/providers/pi.svg +1 -0
- package/kernel/apps/web/server/acp/index.ts +1 -0
- package/kernel/apps/web/server/acp/live-agent-connection.ts +1 -0
- package/kernel/apps/web/server/acp/process-manager.ts +1 -0
- package/kernel/apps/web/server/acp/registry.ts +1 -0
- package/kernel/apps/web/server/acp/sdk.ts +1 -0
- package/kernel/apps/web/server/acp/transport.ts +1 -0
- package/kernel/apps/web/server/acp/types.ts +1 -0
- package/kernel/apps/web/server/acp-live-plugin.ts +30 -0
- package/kernel/apps/web/server/api/document-edit.ts +1 -0
- package/kernel/apps/web/server/api/open-path.ts +1 -0
- package/kernel/apps/web/server/core-plugin.ts +49 -0
- package/kernel/apps/web/server/folder-favicon.ts +1 -0
- package/kernel/apps/web/server/folder-icons.ts +1 -0
- package/kernel/apps/web/server/folder-metadata-plugin.ts +31 -0
- package/kernel/apps/web/server/plugins.ts +1 -0
- package/kernel/apps/web/server/preview-kinds.ts +1 -0
- package/kernel/apps/web/src/ai-input.tsx +62 -0
- package/kernel/apps/web/src/annotations.tsx +430 -0
- package/kernel/apps/web/src/api/client.ts +3 -0
- package/kernel/apps/web/src/api/errors.ts +1 -0
- package/kernel/apps/web/src/api/events.ts +42 -0
- package/kernel/apps/web/src/app.css +332 -0
- package/kernel/apps/web/src/app.tsx +667 -0
- package/kernel/apps/web/src/ask-draft.ts +164 -0
- package/kernel/apps/web/src/ask-tray.tsx +256 -0
- package/kernel/apps/web/src/comment-editor.tsx +93 -0
- package/kernel/apps/web/src/comment-form.tsx +162 -0
- package/kernel/apps/web/src/copy-path.ts +18 -0
- package/kernel/apps/web/src/deferred-ask-tray.tsx +20 -0
- package/kernel/apps/web/src/document-url.ts +46 -0
- package/kernel/apps/web/src/documents-url.ts +23 -0
- package/kernel/apps/web/src/dropped-folder.ts +64 -0
- package/kernel/apps/web/src/external-plugins.ts +3 -0
- package/kernel/apps/web/src/file-viewer.tsx +171 -0
- package/kernel/apps/web/src/folder-filter-icons.tsx +39 -0
- package/kernel/apps/web/src/folder-metadata.ts +76 -0
- package/kernel/apps/web/src/folder-plugin-view.tsx +87 -0
- package/kernel/apps/web/src/folder-query-cache.ts +66 -0
- package/kernel/apps/web/src/host-adapters.ts +209 -0
- package/kernel/apps/web/src/host-bridge.ts +214 -0
- package/kernel/apps/web/src/lib/entity-folder.ts +2 -0
- package/kernel/apps/web/src/linked-session-header.tsx +43 -0
- package/kernel/apps/web/src/live-session-controls.tsx +326 -0
- package/kernel/apps/web/src/local-source.ts +32 -0
- package/kernel/apps/web/src/main.tsx +24 -0
- package/kernel/apps/web/src/markdown-page.tsx +444 -0
- package/kernel/apps/web/src/notes-page.tsx +103 -0
- package/kernel/apps/web/src/plugins.ts +53 -0
- package/kernel/apps/web/src/project-search-dialog.tsx +257 -0
- package/kernel/apps/web/src/project-search.ts +18 -0
- package/kernel/apps/web/src/query-client.ts +4 -0
- package/kernel/apps/web/src/rehype-source-lines.ts +22 -0
- package/kernel/apps/web/src/routes/document.tsx +1 -0
- package/kernel/apps/web/src/routes/entities.tsx +277 -0
- package/kernel/apps/web/src/routes/search.tsx +60 -0
- package/kernel/apps/web/src/selection-context.ts +68 -0
- package/kernel/apps/web/src/selection-input.tsx +58 -0
- package/kernel/apps/web/src/selection-popup.tsx +155 -0
- package/kernel/apps/web/src/session-transcript-page.tsx +152 -0
- package/kernel/apps/web/src/use-annotations.ts +162 -0
- package/kernel/apps/web/src/use-ask-ai.ts +26 -0
- package/kernel/apps/web/src/use-ask-draft.ts +27 -0
- package/kernel/apps/web/src/use-document.ts +37 -0
- package/kernel/apps/web/src/use-folder-notes.ts +49 -0
- package/kernel/apps/web/src/use-linked-session.ts +33 -0
- package/kernel/apps/web/src/view-context.tsx +69 -0
- package/kernel/apps/web/src/view-header.tsx +66 -0
- package/kernel/apps/web/src/viewer-capabilities.ts +33 -0
- package/kernel/apps/web/src/viewer-route.ts +1 -0
- package/kernel/apps/web/src/viewport-height.ts +33 -0
- package/kernel/apps/web/tsconfig.json +24 -0
- package/kernel/apps/web/vite.config.ts +252 -0
- package/kernel/packages/agents/eslint.config.js +10 -0
- package/kernel/packages/agents/package.json +75 -0
- package/kernel/packages/agents/src/agent-card.tsx +334 -0
- package/kernel/packages/agents/src/client.tsx +13 -0
- package/kernel/packages/agents/src/index.ts +18 -0
- package/kernel/packages/agents/src/manifest.ts +7 -0
- package/kernel/packages/agents/src/node.ts +447 -0
- package/kernel/packages/agents/src/profiles.ts +137 -0
- package/kernel/packages/agents/src/resolve.ts +69 -0
- package/kernel/packages/agents/src/server.ts +60 -0
- package/kernel/packages/agents/src/types.ts +82 -0
- package/kernel/packages/agents/src/viewer.tsx +370 -0
- package/kernel/packages/agents/test/profiles.test.mjs +88 -0
- package/kernel/packages/agents/test/resolve.test.mjs +729 -0
- package/kernel/packages/agents/tsconfig.json +17 -0
- package/kernel/packages/api/README.md +73 -0
- package/kernel/packages/api/openapi.json +3368 -0
- package/kernel/packages/api/package.json +41 -0
- package/kernel/packages/api/src/client/errors.ts +1 -0
- package/kernel/packages/api/src/client/index.ts +2 -0
- package/kernel/packages/api/src/contracts/schemas.ts +277 -0
- package/kernel/packages/api/src/contracts.ts +20 -0
- package/kernel/packages/api/src/index.ts +34 -0
- package/kernel/packages/api/src/server/acp/index.ts +35 -0
- package/kernel/packages/api/src/server/acp/live-agent-connection.ts +44 -0
- package/kernel/packages/api/src/server/acp/process-manager.ts +291 -0
- package/kernel/packages/api/src/server/acp/registry.ts +140 -0
- package/kernel/packages/api/src/server/acp/sdk.ts +15 -0
- package/kernel/packages/api/src/server/acp/transport.ts +115 -0
- package/kernel/packages/api/src/server/acp/types.ts +89 -0
- package/kernel/packages/api/src/server/acp-live-plugin.ts +423 -0
- package/kernel/packages/api/src/server/api/create-agent-file.ts +46 -0
- package/kernel/packages/api/src/server/api/document-edit.ts +125 -0
- package/kernel/packages/api/src/server/api/open-path.ts +40 -0
- package/kernel/packages/api/src/server/contracts.ts +85 -0
- package/kernel/packages/api/src/server/entity-folder.ts +353 -0
- package/kernel/packages/api/src/server/folder-favicon.ts +17 -0
- package/kernel/packages/api/src/server/folder-icons.ts +113 -0
- package/kernel/packages/api/src/server/folder-metadata-plugin.ts +1758 -0
- package/kernel/packages/api/src/server/host.ts +21 -0
- package/kernel/packages/api/src/server/index.ts +197 -0
- package/kernel/packages/api/src/server/linked-folder-discovery.ts +158 -0
- package/kernel/packages/api/src/server/plugins.ts +205 -0
- package/kernel/packages/api/src/server/project-discovery.ts +69 -0
- package/kernel/packages/api/src/server/watcher.ts +46 -0
- package/kernel/packages/api/src/shared/selection.ts +16 -0
- package/kernel/packages/api/src/shared/viewer-route.ts +200 -0
- package/kernel/packages/api/test/agents-loading.test.ts +94 -0
- package/kernel/packages/api/test/core.test.ts +364 -0
- package/kernel/packages/api/test/entity-folder.test.ts +131 -0
- package/kernel/packages/api/test/linked-folder-discovery.test.ts +78 -0
- package/kernel/packages/api/test/media-endpoint.test.ts +83 -0
- package/kernel/packages/api/test/partial-loading.test.ts +43 -0
- package/kernel/packages/api/test/project-discovery.test.ts +44 -0
- package/kernel/packages/api/tsconfig.json +11 -0
- package/kernel/packages/api-client/README.md +72 -0
- package/kernel/packages/api-client/package.json +26 -0
- package/kernel/packages/api-client/scripts/generate.ts +68 -0
- package/kernel/packages/api-client/src/errors.ts +59 -0
- package/kernel/packages/api-client/src/generated.d.ts +1248 -0
- package/kernel/packages/api-client/src/index.ts +206 -0
- package/kernel/packages/api-client/src/responses.ts +19 -0
- package/kernel/packages/api-client/test/client.test.ts +143 -0
- package/kernel/packages/api-client/tsconfig.json +12 -0
- package/kernel/packages/folder-plugin/eslint.config.js +10 -0
- package/kernel/packages/folder-plugin/package.json +50 -0
- package/kernel/packages/folder-plugin/src/client.ts +73 -0
- package/kernel/packages/folder-plugin/src/endpoint.ts +273 -0
- package/kernel/packages/folder-plugin/src/index.ts +15 -0
- package/kernel/packages/folder-plugin/src/server.ts +78 -0
- package/kernel/packages/folder-plugin/src/subpath.ts +34 -0
- package/kernel/packages/folder-plugin/src/types.ts +86 -0
- package/kernel/packages/folder-plugin/src/validation.ts +56 -0
- package/kernel/packages/folder-plugin/test/contract.test.mjs +133 -0
- package/kernel/packages/folder-plugin/tsconfig.json +17 -0
- package/kernel/packages/kinds/package.json +24 -0
- package/kernel/packages/kinds/src/kinds.ts +172 -0
- package/kernel/packages/markdown/README.md +40 -0
- package/kernel/packages/markdown/explorer.css +1 -0
- package/kernel/packages/markdown/package.json +30 -0
- package/kernel/packages/markdown/src/documents.ts +1 -0
- package/kernel/packages/markdown/src/explorer.ts +1 -0
- package/kernel/packages/markdown/src/index.ts +2 -0
- package/kernel/packages/markdown/src/metadata.ts +63 -0
- package/kernel/packages/markdown/src/node.ts +1 -0
- package/kernel/packages/markdown/styles.css +1 -0
- package/kernel/packages/notes/SKILL.md +19 -0
- package/kernel/packages/notes/eslint.config.js +10 -0
- package/kernel/packages/notes/package.json +72 -0
- package/kernel/packages/notes/src/client.tsx +12 -0
- package/kernel/packages/notes/src/data/ai-input.ts +58 -0
- package/kernel/packages/notes/src/data/api.ts +40 -0
- package/kernel/packages/notes/src/data/parse.ts +15 -0
- package/kernel/packages/notes/src/data/routing.ts +33 -0
- package/kernel/packages/notes/src/data/use-folder-notes.ts +49 -0
- package/kernel/packages/notes/src/index.ts +2 -0
- package/kernel/packages/notes/src/manifest.ts +6 -0
- package/kernel/packages/notes/src/pages/notes-page.tsx +79 -0
- package/kernel/packages/notes/src/pages/single-note-page.tsx +57 -0
- package/kernel/packages/notes/src/server.ts +88 -0
- package/kernel/packages/notes/src/ui/ai-composer-controls.tsx +70 -0
- package/kernel/packages/notes/src/ui/folder-notes-list.tsx +140 -0
- package/kernel/packages/notes/tsconfig.json +16 -0
- package/kernel/packages/schemas/ICON-POLICY.md +43 -0
- package/kernel/packages/schemas/SKILL.md +185 -0
- package/kernel/packages/schemas/eslint.config.js +10 -0
- package/kernel/packages/schemas/package.json +81 -0
- package/kernel/packages/schemas/src/client.tsx +137 -0
- package/kernel/packages/schemas/src/data/config-file.ts +37 -0
- package/kernel/packages/schemas/src/data/contract.ts +174 -0
- package/kernel/packages/schemas/src/data/favicon.ts +218 -0
- package/kernel/packages/schemas/src/data/fields.ts +96 -0
- package/kernel/packages/schemas/src/data/icon-image.ts +53 -0
- package/kernel/packages/schemas/src/data/icon.ts +97 -0
- package/kernel/packages/schemas/src/data/load.ts +161 -0
- package/kernel/packages/schemas/src/data/params.ts +103 -0
- package/kernel/packages/schemas/src/data/query.ts +33 -0
- package/kernel/packages/schemas/src/data/sort.ts +50 -0
- package/kernel/packages/schemas/src/data/workspace.ts +101 -0
- package/kernel/packages/schemas/src/index.ts +22 -0
- package/kernel/packages/schemas/src/manifest.ts +4 -0
- package/kernel/packages/schemas/src/node.ts +384 -0
- package/kernel/packages/schemas/src/pages/collection.tsx +252 -0
- package/kernel/packages/schemas/src/server.ts +208 -0
- package/kernel/packages/schemas/src/ui/schema-entity-list.tsx +124 -0
- package/kernel/packages/schemas/src/ui/schema-filters.tsx +186 -0
- package/kernel/packages/schemas/src/ui/schema-search.tsx +35 -0
- package/kernel/packages/schemas/src/ui/use-query-param-filter-setting.tsx +15 -0
- package/kernel/packages/schemas/test/contract.test.mjs +26 -0
- package/kernel/packages/schemas/test/fields.test.mjs +187 -0
- package/kernel/packages/schemas/test/load.test.mjs +12 -0
- package/kernel/packages/schemas/test/node.test.mjs +412 -0
- package/kernel/packages/schemas/test/query.test.mjs +134 -0
- package/kernel/packages/schemas/test/workspace.test.mjs +86 -0
- package/kernel/packages/schemas/tsconfig.json +17 -0
- package/kernel/packages/session-finding/package.json +33 -0
- package/kernel/packages/session-finding/src/index.ts +120 -0
- package/kernel/packages/session-finding/test/list-sessions.test.mjs +139 -0
- package/kernel/packages/session-finding/tsconfig.json +12 -0
- package/kernel/packages/ui/LICENSE +21 -0
- package/kernel/packages/ui/components.json +20 -0
- package/kernel/packages/ui/eslint.config.js +8 -0
- package/kernel/packages/ui/package.json +106 -0
- package/kernel/packages/ui/src/chat/file-link.ts +178 -0
- package/kernel/packages/ui/src/chat/index.ts +18 -0
- package/kernel/packages/ui/src/chat/transcript.tsx +348 -0
- package/kernel/packages/ui/src/chat/turns.ts +76 -0
- package/kernel/packages/ui/src/chat/types.ts +23 -0
- package/kernel/packages/ui/src/chat/use-overflowing.ts +56 -0
- package/kernel/packages/ui/src/components/accordion.tsx +74 -0
- package/kernel/packages/ui/src/components/alert-dialog.tsx +164 -0
- package/kernel/packages/ui/src/components/alert.tsx +68 -0
- package/kernel/packages/ui/src/components/app-breadcrumbs.tsx +170 -0
- package/kernel/packages/ui/src/components/app-header.tsx +125 -0
- package/kernel/packages/ui/src/components/app-options.tsx +87 -0
- package/kernel/packages/ui/src/components/app-view-header.tsx +34 -0
- package/kernel/packages/ui/src/components/aspect-ratio.tsx +11 -0
- package/kernel/packages/ui/src/components/avatar.tsx +53 -0
- package/kernel/packages/ui/src/components/badge.tsx +47 -0
- package/kernel/packages/ui/src/components/base-dialog.tsx +3 -0
- package/kernel/packages/ui/src/components/base-tabs.tsx +63 -0
- package/kernel/packages/ui/src/components/breadcrumb.tsx +110 -0
- package/kernel/packages/ui/src/components/button-group.tsx +86 -0
- package/kernel/packages/ui/src/components/button.tsx +65 -0
- package/kernel/packages/ui/src/components/calendar.tsx +240 -0
- package/kernel/packages/ui/src/components/card.tsx +95 -0
- package/kernel/packages/ui/src/components/carousel.tsx +240 -0
- package/kernel/packages/ui/src/components/chart.tsx +375 -0
- package/kernel/packages/ui/src/components/checkbox.tsx +39 -0
- package/kernel/packages/ui/src/components/collapsible.tsx +33 -0
- package/kernel/packages/ui/src/components/collection-icon.tsx +28 -0
- package/kernel/packages/ui/src/components/command.tsx +205 -0
- package/kernel/packages/ui/src/components/content-issues.tsx +63 -0
- package/kernel/packages/ui/src/components/context-menu.tsx +298 -0
- package/kernel/packages/ui/src/components/copy-context.tsx +134 -0
- package/kernel/packages/ui/src/components/dialog.tsx +157 -0
- package/kernel/packages/ui/src/components/drawer.tsx +162 -0
- package/kernel/packages/ui/src/components/dropdown-menu.tsx +303 -0
- package/kernel/packages/ui/src/components/empty.tsx +108 -0
- package/kernel/packages/ui/src/components/field.tsx +260 -0
- package/kernel/packages/ui/src/components/file-preview.tsx +152 -0
- package/kernel/packages/ui/src/components/file-renderer.tsx +466 -0
- package/kernel/packages/ui/src/components/filter-chip-panel.tsx +157 -0
- package/kernel/packages/ui/src/components/filter-select.tsx +127 -0
- package/kernel/packages/ui/src/components/folder-activity.tsx +646 -0
- package/kernel/packages/ui/src/components/folder-file-list.tsx +58 -0
- package/kernel/packages/ui/src/components/folder-filter-bar.tsx +191 -0
- package/kernel/packages/ui/src/components/folder-image.tsx +18 -0
- package/kernel/packages/ui/src/components/folder-landing.tsx +70 -0
- package/kernel/packages/ui/src/components/folder-list.tsx +140 -0
- package/kernel/packages/ui/src/components/folder-metadata.tsx +107 -0
- package/kernel/packages/ui/src/components/folder-mobile-bar.tsx +60 -0
- package/kernel/packages/ui/src/components/folder-project-list.tsx +133 -0
- package/kernel/packages/ui/src/components/folder-session-list.tsx +113 -0
- package/kernel/packages/ui/src/components/folder-session-page.tsx +126 -0
- package/kernel/packages/ui/src/components/folder-sidebar.tsx +52 -0
- package/kernel/packages/ui/src/components/folder-skill-list.tsx +62 -0
- package/kernel/packages/ui/src/components/folder-tabs.tsx +156 -0
- package/kernel/packages/ui/src/components/form.tsx +167 -0
- package/kernel/packages/ui/src/components/hover-card.tsx +52 -0
- package/kernel/packages/ui/src/components/icons.tsx +34 -0
- package/kernel/packages/ui/src/components/input-group.tsx +184 -0
- package/kernel/packages/ui/src/components/input-otp.tsx +90 -0
- package/kernel/packages/ui/src/components/input.tsx +29 -0
- package/kernel/packages/ui/src/components/item.tsx +195 -0
- package/kernel/packages/ui/src/components/kbd.tsx +32 -0
- package/kernel/packages/ui/src/components/label.tsx +27 -0
- package/kernel/packages/ui/src/components/link.tsx +45 -0
- package/kernel/packages/ui/src/components/live-tool-call.tsx +193 -0
- package/kernel/packages/ui/src/components/menubar.tsx +323 -0
- package/kernel/packages/ui/src/components/navigation-menu.tsx +210 -0
- package/kernel/packages/ui/src/components/note-card.tsx +149 -0
- package/kernel/packages/ui/src/components/pagination.tsx +128 -0
- package/kernel/packages/ui/src/components/popover.tsx +56 -0
- package/kernel/packages/ui/src/components/progress.tsx +31 -0
- package/kernel/packages/ui/src/components/radio-group.tsx +54 -0
- package/kernel/packages/ui/src/components/scroll-area.tsx +61 -0
- package/kernel/packages/ui/src/components/select.tsx +219 -0
- package/kernel/packages/ui/src/components/separator.tsx +30 -0
- package/kernel/packages/ui/src/components/session-icon.tsx +124 -0
- package/kernel/packages/ui/src/components/sheet.tsx +157 -0
- package/kernel/packages/ui/src/components/sidebar.tsx +789 -0
- package/kernel/packages/ui/src/components/skeleton.tsx +13 -0
- package/kernel/packages/ui/src/components/slider.tsx +73 -0
- package/kernel/packages/ui/src/components/sonner.tsx +41 -0
- package/kernel/packages/ui/src/components/spinner.tsx +16 -0
- package/kernel/packages/ui/src/components/switch.tsx +40 -0
- package/kernel/packages/ui/src/components/table.tsx +120 -0
- package/kernel/packages/ui/src/components/tabs.tsx +78 -0
- package/kernel/packages/ui/src/components/textarea.tsx +25 -0
- package/kernel/packages/ui/src/components/toggle-group.tsx +87 -0
- package/kernel/packages/ui/src/components/toggle.tsx +48 -0
- package/kernel/packages/ui/src/components/tooltip.tsx +71 -0
- package/kernel/packages/ui/src/components/viewer-options.tsx +166 -0
- package/kernel/packages/ui/src/hooks/use-folder-filter.ts +103 -0
- package/kernel/packages/ui/src/hooks/use-mobile.ts +19 -0
- package/kernel/packages/ui/src/index.ts +13 -0
- package/kernel/packages/ui/src/lib/document-extensions.ts +83 -0
- package/kernel/packages/ui/src/lib/folder-activity.ts +143 -0
- package/kernel/packages/ui/src/lib/folder-filter.ts +284 -0
- package/kernel/packages/ui/src/lib/live-tool-call.tsx +109 -0
- package/kernel/packages/ui/src/lib/media-urls.ts +176 -0
- package/kernel/packages/ui/src/lib/obsidian-links.ts +120 -0
- package/kernel/packages/ui/src/lib/source-components.tsx +65 -0
- package/kernel/packages/ui/src/lib/utils.tsx +7 -0
- package/kernel/packages/ui/src/pages/entity-detail-page.tsx +82 -0
- package/kernel/packages/ui/src/pages/entity-list-page.tsx +50 -0
- package/kernel/packages/ui/src/pages/entity-page.tsx +69 -0
- package/kernel/packages/ui/src/styles/folder-activity.css +2151 -0
- package/kernel/packages/ui/test/copy-context.test.mjs +48 -0
- package/kernel/packages/ui/test/folder-filter.test.mjs +484 -0
- package/kernel/packages/ui/tsconfig.json +15 -0
- package/kernel/plugins/calendar/SKILL.md +173 -0
- package/kernel/plugins/calendar/eslint.config.js +10 -0
- package/kernel/plugins/calendar/package.json +73 -0
- package/kernel/plugins/calendar/schema.json +137 -0
- package/kernel/plugins/calendar/src/calendar.tsx +328 -0
- package/kernel/plugins/calendar/src/client.tsx +139 -0
- package/kernel/plugins/calendar/src/context.ts +48 -0
- package/kernel/plugins/calendar/src/copy-button.tsx +66 -0
- package/kernel/plugins/calendar/src/event-dialog.tsx +270 -0
- package/kernel/plugins/calendar/src/index.ts +4 -0
- package/kernel/plugins/calendar/src/manifest.ts +7 -0
- package/kernel/plugins/calendar/src/parse.ts +610 -0
- package/kernel/plugins/calendar/src/server.ts +160 -0
- package/kernel/plugins/calendar/src/utils.ts +80 -0
- package/kernel/plugins/calendar/src/views.tsx +418 -0
- package/kernel/plugins/calendar/test/context.test.mjs +60 -0
- package/kernel/plugins/calendar/test/package.test.mjs +43 -0
- package/kernel/plugins/calendar/test/parse.test.mjs +392 -0
- package/kernel/plugins/calendar/test/server.test.mjs +126 -0
- package/kernel/plugins/calendar/tsconfig.json +17 -0
- package/kernel/plugins/mail/SKILL.md +97 -0
- package/kernel/plugins/mail/eslint.config.js +10 -0
- package/kernel/plugins/mail/package.json +79 -0
- package/kernel/plugins/mail/src/api.ts +359 -0
- package/kernel/plugins/mail/src/bun-ffi.d.ts +14 -0
- package/kernel/plugins/mail/src/client.tsx +14 -0
- package/kernel/plugins/mail/src/flock.ts +137 -0
- package/kernel/plugins/mail/src/folders.ts +37 -0
- package/kernel/plugins/mail/src/history.ts +485 -0
- package/kernel/plugins/mail/src/index.ts +3 -0
- package/kernel/plugins/mail/src/mail-card.tsx +123 -0
- package/kernel/plugins/mail/src/mail-conversation.tsx +153 -0
- package/kernel/plugins/mail/src/mail-detail-page.tsx +467 -0
- package/kernel/plugins/mail/src/mail-hooks.ts +252 -0
- package/kernel/plugins/mail/src/mail-page.tsx +109 -0
- package/kernel/plugins/mail/src/mail-request.ts +78 -0
- package/kernel/plugins/mail/src/mail-send-box.tsx +175 -0
- package/kernel/plugins/mail/src/mailos.ts +723 -0
- package/kernel/plugins/mail/src/manifest.ts +7 -0
- package/kernel/plugins/mail/src/node.ts +171 -0
- package/kernel/plugins/mail/src/parse.ts +139 -0
- package/kernel/plugins/mail/src/server.ts +125 -0
- package/kernel/plugins/mail/src/types.ts +10 -0
- package/kernel/plugins/mail/src/viewer.tsx +147 -0
- package/kernel/plugins/mail/test/flock.test.mjs +156 -0
- package/kernel/plugins/mail/test/folders.test.mjs +138 -0
- package/kernel/plugins/mail/test/history.test.mjs +460 -0
- package/kernel/plugins/mail/test/mailos.test.mjs +752 -0
- package/kernel/plugins/mail/test/node.test.mjs +207 -0
- package/kernel/plugins/mail/test/package.test.mjs +54 -0
- package/kernel/plugins/mail/test/parse.test.mjs +32 -0
- package/kernel/plugins/mail/test/server.test.mjs +116 -0
- package/kernel/plugins/mail/test/viewer.test.mjs +192 -0
- package/kernel/plugins/mail/tsconfig.json +17 -0
- package/kernel/plugins/projects/SKILL.md +73 -0
- package/kernel/plugins/projects/eslint.config.js +10 -0
- package/kernel/plugins/projects/package.json +70 -0
- package/kernel/plugins/projects/src/client.tsx +17 -0
- package/kernel/plugins/projects/src/data/model.ts +129 -0
- package/kernel/plugins/projects/src/index.ts +17 -0
- package/kernel/plugins/projects/src/manifest.ts +7 -0
- package/kernel/plugins/projects/src/project-context.ts +41 -0
- package/kernel/plugins/projects/src/server.ts +276 -0
- package/kernel/plugins/projects/src/ui/project-card.tsx +61 -0
- package/kernel/plugins/projects/src/ui/projects-page.tsx +102 -0
- package/kernel/plugins/projects/test/package.test.mjs +51 -0
- package/kernel/plugins/projects/tsconfig.json +17 -0
- package/kernel/plugins/tasks/SKILL.md +341 -0
- package/kernel/plugins/tasks/eslint.config.js +10 -0
- package/kernel/plugins/tasks/package.json +74 -0
- package/kernel/plugins/tasks/schema.json +939 -0
- package/kernel/plugins/tasks/src/api.ts +212 -0
- package/kernel/plugins/tasks/src/client.tsx +23 -0
- package/kernel/plugins/tasks/src/data/parse.ts +544 -0
- package/kernel/plugins/tasks/src/data/task-id.ts +56 -0
- package/kernel/plugins/tasks/src/data/todo-model.ts +795 -0
- package/kernel/plugins/tasks/src/index.ts +34 -0
- package/kernel/plugins/tasks/src/manifest.ts +7 -0
- package/kernel/plugins/tasks/src/pages/task-detail.tsx +48 -0
- package/kernel/plugins/tasks/src/pages/task-list.tsx +88 -0
- package/kernel/plugins/tasks/src/server.ts +447 -0
- package/kernel/plugins/tasks/src/styles.css +9 -0
- package/kernel/plugins/tasks/src/ui/compact-todo-list.tsx +372 -0
- package/kernel/plugins/tasks/src/ui/error-details.tsx +78 -0
- package/kernel/plugins/tasks/src/ui/task-page.tsx +392 -0
- package/kernel/plugins/tasks/src/ui/todo-agent-filter.tsx +36 -0
- package/kernel/plugins/tasks/src/ui/todo-filter-bar.tsx +66 -0
- package/kernel/plugins/tasks/src/ui/todo-item.tsx +494 -0
- package/kernel/plugins/tasks/src/ui/todo-status-filter.tsx +60 -0
- package/kernel/plugins/tasks/src/ui/todo-tag-filter.tsx +48 -0
- package/kernel/plugins/tasks/src/ui/todo-warnings.tsx +106 -0
- package/kernel/plugins/tasks/test/api.test.mjs +99 -0
- package/kernel/plugins/tasks/test/folder-sources.test.mjs +46 -0
- package/kernel/plugins/tasks/test/package.test.mjs +54 -0
- package/kernel/plugins/tasks/test/parse.test.mjs +225 -0
- package/kernel/plugins/tasks/test/server.test.mjs +386 -0
- package/kernel/plugins/tasks/tsconfig.json +17 -0
- package/node_modules/@agentclientprotocol/sdk/LICENSE +191 -0
- package/node_modules/@agentclientprotocol/sdk/README.md +70 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.d.ts +1835 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.js +1885 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js +5036 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.d.ts +82 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.js +428 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.test.js +470 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.d.ts +26 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.js +96 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.test.js +77 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/agent.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/agent.js +232 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/agent.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/client.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/client.js +132 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/client.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.d.ts +9 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js +221 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-client.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-client.js +86 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-client.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-server.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-server.js +112 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-server.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/ws-client.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/ws-client.js +88 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/ws-client.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.d.ts +33 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.js +435 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.test.js +1380 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.d.ts +603 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js +1064 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.test.js +851 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.d.ts +22 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.js +64 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.test.js +45 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.d.ts +17 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.js +426 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.test.js +499 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.d.ts +37 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.js +474 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.js +535 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.d.ts +11 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.js +57 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.js +73 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.d.ts +199 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js +211 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.d.ts +51 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js +52 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts +6118 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.js +3 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.d.ts +14160 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js +3066 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.d.ts +30 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.js +98 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.test.js +93 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-permission.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-permission.test.js +261 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-permission.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-session-sse.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-session-sse.test.js +490 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-session-sse.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.js +104 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.test.js +52 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-websocket-upgrade.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-websocket-upgrade.test.js +946 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-websocket-upgrade.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.d.ts +81 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.js +380 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.test.js +1082 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.d.ts +4 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.js +91 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.test.js +126 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.d.ts +35 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.js +106 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.test.js +206 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/streams.d.ts +8 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/streams.js +51 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/streams.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-agent.d.ts +24 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-agent.js +163 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-agent.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-http-server.d.ts +9 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-http-server.js +74 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-http-server.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.d.ts +806 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js +1183 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js +512 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.d.ts +954 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js +1035 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.d.ts +42 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js +43 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.d.ts +6146 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.js +3 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.d.ts +30552 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js +3204 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-server.d.ts +14 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-server.js +358 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-server.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.d.ts +54 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.js +246 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.test.js +833 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.d.ts +13 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.js +78 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.test.js +42 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/package.json +105 -0
- package/node_modules/@agentclientprotocol/sdk/schema/schema.json +8819 -0
- package/node_modules/@agentclientprotocol/sdk/schema/v2/schema.unstable.json +10098 -0
- package/package.json +52 -6
- package/web/assets/{abnfDiagram-VRR7QNED-Nfq-O04D.js → abnfDiagram-VRR7QNED-Bgfb1nEB.js} +1 -1
- package/web/assets/app-DoGr2Zi7.js +2 -0
- package/web/assets/app-options-D-RJiQ-X.js +25 -0
- package/web/assets/app-view-header-BLvLq02T.js +1 -0
- package/web/assets/arc-Dk_KI36B.js +1 -0
- package/web/assets/{architectureDiagram-ZJ3FMSHR-qhRwPNcQ.js → architectureDiagram-ZJ3FMSHR-NR_KhRCf.js} +1 -1
- package/web/assets/ask-tray-TzeTcO6-.js +14 -0
- package/web/assets/{blockDiagram-677ZJIJ3-C56P3bGu.js → blockDiagram-677ZJIJ3-CkLkwx9C.js} +1 -1
- package/web/assets/button-C6arH7zt.js +1 -0
- package/web/assets/{c4Diagram-LMCZKHZV-Ey1M72zD.js → c4Diagram-LMCZKHZV-CFCUH8e_.js} +1 -1
- package/web/assets/channel-uMEjV8qc.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-a6isk9VU.js → chunk-2Q5K7J3B-B_BPLWsW.js} +1 -1
- package/web/assets/{chunk-32BRIVSS-uy4kdSLL.js → chunk-32BRIVSS-B1VB1hOy.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-oj2sBFd7.js → chunk-5VM5RSS4-KFcYr8Co.js} +1 -1
- package/web/assets/{chunk-EX3LRPZG-Bzl1ukAi.js → chunk-EX3LRPZG-CpBX3kuK.js} +3 -3
- package/web/assets/{chunk-JWPE2WC7-sUph7I_t.js → chunk-JWPE2WC7-BPSl40wG.js} +1 -1
- package/web/assets/{chunk-MOJQB5TN-C0ERSuVK.js → chunk-MOJQB5TN-D2RcYmoU.js} +1 -1
- package/web/assets/{chunk-RYQCIY6F-Dyw1Hfwp.js → chunk-RYQCIY6F-m7Gyn-t3.js} +1 -1
- package/web/assets/{chunk-V7JOEXUC-DnSz22rb.js → chunk-V7JOEXUC-TDvdopxS.js} +1 -1
- package/web/assets/{chunk-VR4S4FIN-Bp2SNel7.js → chunk-VR4S4FIN-DZTsG51a.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-Dqtar746.js → chunk-XXDRQBXY-Dp0--RE2.js} +1 -1
- package/web/assets/classDiagram-OUVF2IWQ-fbZocVor.js +1 -0
- package/web/assets/classDiagram-v2-EOCWNBFH-fbZocVor.js +1 -0
- package/web/assets/client-C6Nxdfif.js +2 -0
- package/web/assets/client-CXYfBko5.js +17 -0
- package/web/assets/client-CoKtOq-X.js +7 -0
- package/web/assets/client-DyRQz5RU.js +53 -0
- package/web/assets/client-OY6HUzuD.js +98 -0
- package/web/assets/client-YOYWZIFi.js +34 -0
- package/web/assets/client-j2kQmxsO.js +22 -0
- package/web/assets/command-BugZBGXE.js +38 -0
- package/web/assets/copy-context-C0Uqsp-3.js +1 -0
- package/web/assets/{cose-bilkent-JH36ORCC-Dx1VqMjj.js → cose-bilkent-JH36ORCC-CPu3PI8h.js} +1 -1
- package/web/assets/{cynefin-VYW2F7L2-SjhCWmIV.js → cynefin-VYW2F7L2-DWxftYAm.js} +1 -1
- package/web/assets/{cynefinDiagram-TSTJHNR4-Dvqz2594.js → cynefinDiagram-TSTJHNR4-DsmN2V-p.js} +1 -1
- package/web/assets/{dagre-VKFMJZFB-Ju2m2qXt.js → dagre-VKFMJZFB-COEbApyY.js} +1 -1
- package/web/assets/{diagram-FQU43EPY-DsHKTt0k.js → diagram-FQU43EPY-0O9WGWKB.js} +1 -1
- package/web/assets/{diagram-G47NLZAW-DWHAcLkJ.js → diagram-G47NLZAW-CutEdMVh.js} +1 -1
- package/web/assets/{diagram-NH7WQ7WH-uUMz46ZD.js → diagram-NH7WQ7WH-C9KZc3B2.js} +1 -1
- package/web/assets/{diagram-OA4YK3LP-BRjVzjdp.js → diagram-OA4YK3LP-D8kkPXbY.js} +1 -1
- package/web/assets/{diagram-WEI45ONY-Cb-FhBpQ.js → diagram-WEI45ONY-_YqiTaGP.js} +1 -1
- package/web/assets/document-Dgt5eZFj.js +19 -0
- package/web/assets/{ebnfDiagram-CCIWWBDH-IhhxX3IB.js → ebnfDiagram-CCIWWBDH-JO-zQh6g.js} +1 -1
- package/web/assets/{entities-DUnx74kH.js → entities-C3wz7FCx.js} +12 -12
- package/web/assets/{erDiagram-Q63AITRT-D1frgeWf.js → erDiagram-Q63AITRT-9UjQwJ4P.js} +1 -1
- package/web/assets/file-viewer-DZJ8nYnl.js +1 -0
- package/web/assets/{flowDiagram-23GEKE2U-BiPPM-FY.js → flowDiagram-23GEKE2U-Ca08tnYM.js} +5 -5
- package/web/assets/folder-image-BfGgxo7i.js +1 -0
- package/web/assets/folder-landing-qUKBCnG-.js +54 -0
- package/web/assets/folder-list-BfFjv7rR.js +1 -0
- package/web/assets/folder-metadata-DCw8xzHk.js +2 -0
- package/web/assets/folder-mobile-bar-Ubz4babf.js +1 -0
- package/web/assets/folder-plugin-view-DsWR1zmQ.js +6 -0
- package/web/assets/{ganttDiagram-NO4QXBWP-CmEOlHD7.js → ganttDiagram-NO4QXBWP-KnHzX5W3.js} +1 -1
- package/web/assets/{gitGraphDiagram-IHSO6WYX-tTjcpZpU.js → gitGraphDiagram-IHSO6WYX-Cm8woNtK.js} +1 -1
- package/web/assets/index-BaRnbYRw.js +1 -0
- package/web/assets/index-BexmLxIP.css +1 -0
- package/web/assets/index-Bp9DidgD.js +1 -0
- package/web/assets/{index-eL1k96k8.js → index-CCXE8zc9.js} +1 -1
- package/web/assets/index-CNyy98F8.js +2 -0
- package/web/assets/{index-DmrKjrlM.js → index-CXhBn-ar.js} +1 -1
- package/web/assets/index-DDirZMgx.js +1 -0
- package/web/assets/{infoDiagram-FWYZ7A6U-Ok2sdbc1.js → infoDiagram-FWYZ7A6U-yyqmUtIb.js} +1 -1
- package/web/assets/{ishikawaDiagram-FXEZZL3T-kPnM5psX.js → ishikawaDiagram-FXEZZL3T-BfvR_Zy4.js} +4 -4
- package/web/assets/{journeyDiagram-5HDEW3XC-BkoT0-45.js → journeyDiagram-5HDEW3XC-BKuw06HM.js} +1 -1
- package/web/assets/{kanban-definition-HUTT4EX6-xnm_eFoU.js → kanban-definition-HUTT4EX6-n0010rmQ.js} +8 -8
- package/web/assets/{linear-CLZpgLH-.js → linear-C0d0lT8O.js} +1 -1
- package/web/assets/linked-session-header-BkEweU0Z.js +3 -0
- package/web/assets/{markdown-njUwQKsR.js → markdown-Bw9RgUGR.js} +9 -9
- package/web/assets/{mermaid.core-Bvxj3RoN.js → mermaid.core-BDVbShyO.js} +6 -6
- package/web/assets/metadata-KV0dpp4G.js +1 -0
- package/web/assets/{mindmap-definition-LN4V7U3C-42Uoox79.js → mindmap-definition-LN4V7U3C--_0ks3GF.js} +1 -1
- package/web/assets/note-card-DBfX6gW1.js +6 -0
- package/web/assets/{pegDiagram-2B236MQR-B-GZCw3w.js → pegDiagram-2B236MQR-CBoNIpKR.js} +1 -1
- package/web/assets/{pieDiagram-ENE6RG2P-DRmmssIB.js → pieDiagram-ENE6RG2P-MA5tkYh5.js} +3 -3
- package/web/assets/popover-DBD7FF-W.js +9 -0
- package/web/assets/{project-search-dialog-B730oZ1S.js → project-search-dialog-DM1IkSZu.js} +6 -6
- package/web/assets/{quadrantDiagram-ABIIQ3AL-BfhVQ7V9.js → quadrantDiagram-ABIIQ3AL-CWT1ryqF.js} +1 -1
- package/web/assets/{railroadDiagram-RFXS5EU6-DxKx7XRp.js → railroadDiagram-RFXS5EU6-ZiLB5FGi.js} +1 -1
- package/web/assets/{react-DZzLHL-l.js → react-B9jn2M18.js} +2 -2
- package/web/assets/{requirementDiagram-TGXJPOKE-NUzj9fw1.js → requirementDiagram-TGXJPOKE-CQq9uneq.js} +1 -1
- package/web/assets/{sankeyDiagram-HTMAVEWB-Cy9OMnl-.js → sankeyDiagram-HTMAVEWB-qDG-0JqI.js} +1 -1
- package/web/assets/search-DNrQA5fF.js +2 -0
- package/web/assets/select-D8cqNgcp.js +30 -0
- package/web/assets/selection-popup-DmtTeRs2.js +7 -0
- package/web/assets/{sequenceDiagram-DBY2YBRQ-CBNE9mzn.js → sequenceDiagram-DBY2YBRQ-CiApurLO.js} +1 -1
- package/web/assets/{sizeCapture-X5ZJPWSS-S4HhfX0n.js → sizeCapture-X5ZJPWSS-DZSR5QXm.js} +1 -1
- package/web/assets/stateDiagram-2N3HPSRC-CjJJR9_z.js +1 -0
- package/web/assets/stateDiagram-v2-6OUMAXLB-BpeGSCu9.js +1 -0
- package/web/assets/{swimlanes-5IMT3BWC-DJ2aLWal.js → swimlanes-5IMT3BWC-CKmo1sg6.js} +2 -2
- package/web/assets/swimlanesDiagram-G3AALYLV-D9RjLKb9.js +8 -0
- package/web/assets/tanstack-YzX_Mi37.js +3 -0
- package/web/assets/{timeline-definition-FHXFAJF6-vFDUVPCX.js → timeline-definition-FHXFAJF6-D-NMwS3y.js} +1 -1
- package/web/assets/{use-folder-filter-BbTUlXgG.js → use-folder-filter-LQyXns5Q.js} +1 -1
- package/web/assets/{utils-CwHGE3BB.js → utils-DCaHk0Gm.js} +1 -1
- package/web/assets/{vennDiagram-L72KCM5P-AsnhK2zW.js → vennDiagram-L72KCM5P-CfL6LBWw.js} +1 -1
- package/web/assets/view-context-gyDl_p2V.js +229 -0
- package/web/assets/viewer-capabilities-Bpp8Uvcg.js +1 -0
- package/web/assets/{wardleyDiagram-EHGQE667-Cj1wFbNV.js → wardleyDiagram-EHGQE667-DgldMxaj.js} +1 -1
- package/web/assets/{xychartDiagram-FW5EYKEG-Bbvnutsm.js → xychartDiagram-FW5EYKEG-CIoAIFX8.js} +1 -1
- package/web/favicon.svg +6 -0
- package/web/index.html +5 -4
- package/web/assets/app-CPSmsokP.js +0 -2
- package/web/assets/app-options-XEWvevsz.js +0 -25
- package/web/assets/app-view-header-BKZ90ToF.js +0 -1
- package/web/assets/arc-DbpbZvCt.js +0 -1
- package/web/assets/arrow-left-CFeHb-Z1.js +0 -1
- package/web/assets/ask-tray-D2YHtbPj.js +0 -14
- package/web/assets/button-BJ7z-ZA7.js +0 -1
- package/web/assets/calendar-days-DWh2XMO2.js +0 -1
- package/web/assets/channel-dSRp_qTo.js +0 -1
- package/web/assets/chevron-down-C5oRtqbX.js +0 -1
- package/web/assets/chevron-right-CsPtvh8C.js +0 -1
- package/web/assets/chevron-up-DjpU6Pyv.js +0 -1
- package/web/assets/classDiagram-OUVF2IWQ-B7B2zLzM.js +0 -1
- package/web/assets/classDiagram-v2-EOCWNBFH-B7B2zLzM.js +0 -1
- package/web/assets/client-CAudjYV9.js +0 -34
- package/web/assets/client-Dn9-_Gm_.js +0 -14
- package/web/assets/client-Dxrf2tyq.js +0 -102
- package/web/assets/client-aFI2M4pE.js +0 -53
- package/web/assets/collection-icon-TbOVyORG.js +0 -1
- package/web/assets/collection-page-Du6FKkuU.js +0 -10
- package/web/assets/command-C_g5E1Wx.js +0 -38
- package/web/assets/copy-Ikmr6Iq2.js +0 -1
- package/web/assets/copy-context-Cl1TE2PJ.js +0 -1
- package/web/assets/document-DcjNSJCk.js +0 -2
- package/web/assets/external-link-BXmSXqqF.js +0 -1
- package/web/assets/file-renderer-BRZTrYx8.js +0 -19
- package/web/assets/file-text-CiiSsCDq.js +0 -1
- package/web/assets/file-viewer-C1wAeVDK.js +0 -1
- package/web/assets/folder-image-AXBrHUcU.js +0 -1
- package/web/assets/folder-landing-BhRg7hwn.js +0 -54
- package/web/assets/folder-list-rIdszVde.js +0 -1
- package/web/assets/folder-metadata-puTC5QqJ.js +0 -2
- package/web/assets/folder-mobile-bar-DjjRQo3T.js +0 -1
- package/web/assets/folder-plugin-view-BU_kzR8j.js +0 -6
- package/web/assets/index-DS2Wmd9I.css +0 -1
- package/web/assets/index-DgqzSeIR.js +0 -1
- package/web/assets/index-DnlTDqaa.js +0 -1
- package/web/assets/index-DztTMDFz.js +0 -2
- package/web/assets/index-kY75qc96.js +0 -1
- package/web/assets/index-p38i_yyY.js +0 -1
- package/web/assets/link-2-BWKA6t--.js +0 -1
- package/web/assets/link-DC_1Z6Yy.js +0 -11
- package/web/assets/linked-session-header-DJYWZ_-q.js +0 -3
- package/web/assets/mail-2rCdIFul.js +0 -1
- package/web/assets/markdown-title-dncAYYiP.js +0 -131
- package/web/assets/notes-page-DIW6rgJp.js +0 -10
- package/web/assets/pencil-8cobiSSq.js +0 -1
- package/web/assets/plus-BHV2wJr7.js +0 -1
- package/web/assets/popover-Cmmgj-MJ.js +0 -9
- package/web/assets/search-CvlYUkN6.js +0 -2
- package/web/assets/select-1SvaKQsS.js +0 -30
- package/web/assets/selection-popup-ntjycEVh.js +0 -7
- package/web/assets/sparkles-CBhGREdc.js +0 -1
- package/web/assets/stateDiagram-2N3HPSRC-BEw1Mheu.js +0 -1
- package/web/assets/stateDiagram-v2-6OUMAXLB-BHtjl1iD.js +0 -1
- package/web/assets/swimlanesDiagram-G3AALYLV-Z362aroZ.js +0 -8
- package/web/assets/tanstack-CD46mJkU.js +0 -1
- package/web/assets/view-context-D-fh9AbH.js +0 -81
- package/web/assets/viewer-capabilities-CROIaoqh.js +0 -1
- package/web/assets/x-BUeE--I4.js +0 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { AGENT_METHODS } from "./schema/index.js";
|
|
3
|
+
import { methodRequiresSessionHeader, sessionIdFromParams, isInitializeRequest, messageIdKey, HEADER_CONNECTION_ID, HEADER_SESSION_ID, EVENT_STREAM_MIME_TYPE, JSON_MIME_TYPE, } from "./protocol.js";
|
|
4
|
+
describe("protocol transport helpers", () => {
|
|
5
|
+
it("exports HTTP transport constants", () => {
|
|
6
|
+
expect(HEADER_CONNECTION_ID).toBe("Acp-Connection-Id");
|
|
7
|
+
expect(HEADER_SESSION_ID).toBe("Acp-Session-Id");
|
|
8
|
+
expect(EVENT_STREAM_MIME_TYPE).toBe("text/event-stream");
|
|
9
|
+
expect(JSON_MIME_TYPE).toBe("application/json");
|
|
10
|
+
});
|
|
11
|
+
it("requires a session header for existing-session methods", () => {
|
|
12
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.session_cancel)).toBe(true);
|
|
13
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.session_close)).toBe(true);
|
|
14
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.session_load)).toBe(true);
|
|
15
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.session_prompt)).toBe(true);
|
|
16
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.session_resume)).toBe(true);
|
|
17
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.session_set_config_option)).toBe(true);
|
|
18
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.session_set_mode)).toBe(true);
|
|
19
|
+
});
|
|
20
|
+
it("does not require a session header for connection-level or unsupported methods", () => {
|
|
21
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.initialize)).toBe(false);
|
|
22
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.session_new)).toBe(false);
|
|
23
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.session_list)).toBe(false);
|
|
24
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.session_fork)).toBe(false);
|
|
25
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.nes_start)).toBe(false);
|
|
26
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.nes_suggest)).toBe(false);
|
|
27
|
+
expect(methodRequiresSessionHeader(AGENT_METHODS.nes_close)).toBe(false);
|
|
28
|
+
});
|
|
29
|
+
it("extracts a top-level string session ID from params", () => {
|
|
30
|
+
expect(sessionIdFromParams({ sessionId: "session-1" })).toBe("session-1");
|
|
31
|
+
});
|
|
32
|
+
it("returns undefined when params do not contain a top-level string session ID", () => {
|
|
33
|
+
expect(sessionIdFromParams(undefined)).toBeUndefined();
|
|
34
|
+
expect(sessionIdFromParams(null)).toBeUndefined();
|
|
35
|
+
expect(sessionIdFromParams("session-1")).toBeUndefined();
|
|
36
|
+
expect(sessionIdFromParams({})).toBeUndefined();
|
|
37
|
+
expect(sessionIdFromParams({ sessionId: 1 })).toBeUndefined();
|
|
38
|
+
expect(sessionIdFromParams({ nested: { sessionId: "session-1" } })).toBeUndefined();
|
|
39
|
+
});
|
|
40
|
+
it("detects initialize requests", () => {
|
|
41
|
+
const request = {
|
|
42
|
+
jsonrpc: "2.0",
|
|
43
|
+
id: 1,
|
|
44
|
+
method: AGENT_METHODS.initialize,
|
|
45
|
+
params: { protocolVersion: 1, clientCapabilities: {} },
|
|
46
|
+
};
|
|
47
|
+
expect(isInitializeRequest(request)).toBe(true);
|
|
48
|
+
});
|
|
49
|
+
it("rejects non-initialize messages", () => {
|
|
50
|
+
const notification = {
|
|
51
|
+
jsonrpc: "2.0",
|
|
52
|
+
method: AGENT_METHODS.initialize,
|
|
53
|
+
params: { protocolVersion: 1, clientCapabilities: {} },
|
|
54
|
+
};
|
|
55
|
+
const response = { jsonrpc: "2.0", id: 1, result: {} };
|
|
56
|
+
const otherRequest = {
|
|
57
|
+
jsonrpc: "2.0",
|
|
58
|
+
id: 1,
|
|
59
|
+
method: AGENT_METHODS.session_new,
|
|
60
|
+
params: { cwd: "/tmp", mcpServers: [] },
|
|
61
|
+
};
|
|
62
|
+
expect(isInitializeRequest(notification)).toBe(false);
|
|
63
|
+
expect(isInitializeRequest(response)).toBe(false);
|
|
64
|
+
expect(isInitializeRequest(otherRequest)).toBe(false);
|
|
65
|
+
});
|
|
66
|
+
it("normalizes JSON-RPC request IDs for map keys", () => {
|
|
67
|
+
expect(messageIdKey("foo")).toBe("string:foo");
|
|
68
|
+
expect(messageIdKey(1)).toBe("number:1");
|
|
69
|
+
expect(messageIdKey(null)).toBe("null");
|
|
70
|
+
expect(messageIdKey(undefined)).toBeUndefined();
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=protocol.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.test.js","sourceRoot":"","sources":["../src/protocol.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,GACf,MAAM,eAAe,CAAC;AAIvB,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAA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C,KAAK,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC/C,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACzC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxC,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import type * as types from "./types.gen.js";
|
|
2
|
+
/**
|
|
3
|
+
* **UNSTABLE**
|
|
4
|
+
*
|
|
5
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
6
|
+
*
|
|
7
|
+
* Request from the agent to elicit structured user input.
|
|
8
|
+
*
|
|
9
|
+
* The agent sends this to the client to request information from the user,
|
|
10
|
+
* either via a form or by directing them to a URL.
|
|
11
|
+
* Elicitations are tied to a session (optionally a tool call) or a request.
|
|
12
|
+
*
|
|
13
|
+
* @experimental
|
|
14
|
+
*/
|
|
15
|
+
export type CreateElicitationRequest = types.CreateElicitationRequest;
|
|
16
|
+
/**
|
|
17
|
+
* Validated type guards for `CreateElicitationRequest`'s known variants.
|
|
18
|
+
*
|
|
19
|
+
* Each guard validates the variant's payload, not just its discriminant
|
|
20
|
+
* tag: a malformed known variant (right tag, wrong payload) matches no
|
|
21
|
+
* guard — mirroring wire validation, which rejects such values instead
|
|
22
|
+
* of classifying them as custom.
|
|
23
|
+
*
|
|
24
|
+
* Guards check the value as given: fields that wire deserialization
|
|
25
|
+
* salvages to a default (e.g. a malformed `_meta`) are only normalized
|
|
26
|
+
* by parsing, and for ambiguous raw shapes (a known tag combined with
|
|
27
|
+
* another variant's payload) guards are conservative where wire parsing
|
|
28
|
+
* may still accept the value — narrow wire-parsed values when exact
|
|
29
|
+
* parity matters.
|
|
30
|
+
*
|
|
31
|
+
* @experimental
|
|
32
|
+
*/
|
|
33
|
+
export declare const CreateElicitationRequest: {
|
|
34
|
+
/** Narrow to the `form` variant, validating its payload. */
|
|
35
|
+
readonly isForm: (value: types.CreateElicitationRequest) => value is (types.ElicitationFormMode & {
|
|
36
|
+
mode: "form";
|
|
37
|
+
}) & Pick<types.CreateElicitationRequest, "message" | "_meta">;
|
|
38
|
+
/** Narrow to the `url` variant, validating its payload. */
|
|
39
|
+
readonly isUrl: (value: types.CreateElicitationRequest) => value is (types.ElicitationUrlMode & {
|
|
40
|
+
mode: "url";
|
|
41
|
+
}) & Pick<types.CreateElicitationRequest, "message" | "_meta">;
|
|
42
|
+
/**
|
|
43
|
+
* Narrow to a custom or future variant: the `mode` tag matches no known variant, with a valid payload.
|
|
44
|
+
*
|
|
45
|
+
* TypeScript keeps the known variants in the narrowed union (they are
|
|
46
|
+
* structural subtypes of the catch-all), so read vendor payload keys
|
|
47
|
+
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
48
|
+
*/
|
|
49
|
+
readonly isCustom: (value: types.CreateElicitationRequest) => value is ((types.ElicitationSessionScope | types.ElicitationRequestScope) & {
|
|
50
|
+
mode: string;
|
|
51
|
+
[key: string]: unknown;
|
|
52
|
+
}) & Pick<types.CreateElicitationRequest, "message" | "_meta">;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Property schema for elicitation form fields.
|
|
56
|
+
*
|
|
57
|
+
* Each variant corresponds to a JSON Schema `"type"` value.
|
|
58
|
+
* Single-select enums use the `String` variant with `enum` or `oneOf` set.
|
|
59
|
+
* Multi-select enums use the `Array` variant.
|
|
60
|
+
*/
|
|
61
|
+
export type ElicitationPropertySchema = types.ElicitationPropertySchema;
|
|
62
|
+
/**
|
|
63
|
+
* Validated type guards for `ElicitationPropertySchema`'s known variants.
|
|
64
|
+
*
|
|
65
|
+
* Each guard validates the variant's payload, not just its discriminant
|
|
66
|
+
* tag: a malformed known variant (right tag, wrong payload) matches no
|
|
67
|
+
* guard — mirroring wire validation, which rejects such values instead
|
|
68
|
+
* of classifying them as custom.
|
|
69
|
+
*
|
|
70
|
+
* Guards check the value as given: fields that wire deserialization
|
|
71
|
+
* salvages to a default (e.g. a malformed `_meta`) are only normalized
|
|
72
|
+
* by parsing, and for ambiguous raw shapes (a known tag combined with
|
|
73
|
+
* another variant's payload) guards are conservative where wire parsing
|
|
74
|
+
* may still accept the value — narrow wire-parsed values when exact
|
|
75
|
+
* parity matters.
|
|
76
|
+
*/
|
|
77
|
+
export declare const ElicitationPropertySchema: {
|
|
78
|
+
/** Narrow to the `string` variant, validating its payload. */
|
|
79
|
+
readonly isString: (value: types.ElicitationPropertySchema) => value is types.StringPropertySchema & {
|
|
80
|
+
type: "string";
|
|
81
|
+
};
|
|
82
|
+
/** Narrow to the `number` variant, validating its payload. */
|
|
83
|
+
readonly isNumber: (value: types.ElicitationPropertySchema) => value is types.NumberPropertySchema & {
|
|
84
|
+
type: "number";
|
|
85
|
+
};
|
|
86
|
+
/** Narrow to the `integer` variant, validating its payload. */
|
|
87
|
+
readonly isInteger: (value: types.ElicitationPropertySchema) => value is types.IntegerPropertySchema & {
|
|
88
|
+
type: "integer";
|
|
89
|
+
};
|
|
90
|
+
/** Narrow to the `boolean` variant, validating its payload. */
|
|
91
|
+
readonly isBoolean: (value: types.ElicitationPropertySchema) => value is types.BooleanPropertySchema & {
|
|
92
|
+
type: "boolean";
|
|
93
|
+
};
|
|
94
|
+
/** Narrow to the `array` variant, validating its payload. */
|
|
95
|
+
readonly isArray: (value: types.ElicitationPropertySchema) => value is types.MultiSelectPropertySchema & {
|
|
96
|
+
type: "array";
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Narrow to a custom or future variant: the `type` tag matches no known variant.
|
|
100
|
+
*
|
|
101
|
+
* TypeScript keeps the known variants in the narrowed union (they are
|
|
102
|
+
* structural subtypes of the catch-all), so read vendor payload keys
|
|
103
|
+
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
104
|
+
*/
|
|
105
|
+
readonly isCustom: (value: types.ElicitationPropertySchema) => value is {
|
|
106
|
+
type: string;
|
|
107
|
+
[key: string]: unknown;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Items for a multi-select (array) property schema.
|
|
112
|
+
*/
|
|
113
|
+
export type MultiSelectItems = types.MultiSelectItems;
|
|
114
|
+
/**
|
|
115
|
+
* Validated type guards for `MultiSelectItems`'s known variants.
|
|
116
|
+
*
|
|
117
|
+
* Each guard validates the variant's payload, not just its discriminant
|
|
118
|
+
* tag: a malformed known variant (right tag, wrong payload) matches no
|
|
119
|
+
* guard — mirroring wire validation, which rejects such values instead
|
|
120
|
+
* of classifying them as custom.
|
|
121
|
+
*
|
|
122
|
+
* Guards check the value as given: fields that wire deserialization
|
|
123
|
+
* salvages to a default (e.g. a malformed `_meta`) are only normalized
|
|
124
|
+
* by parsing, and for ambiguous raw shapes (a known tag combined with
|
|
125
|
+
* another variant's payload) guards are conservative where wire parsing
|
|
126
|
+
* may still accept the value — narrow wire-parsed values when exact
|
|
127
|
+
* parity matters.
|
|
128
|
+
*/
|
|
129
|
+
export declare const MultiSelectItems: {
|
|
130
|
+
/** Narrow to the `string` variant, validating its payload. */
|
|
131
|
+
readonly isString: (value: types.MultiSelectItems) => value is types.StringMultiSelectItems & {
|
|
132
|
+
type: "string";
|
|
133
|
+
};
|
|
134
|
+
/** Narrow to the `titled` variant, validating its payload. */
|
|
135
|
+
readonly isTitled: (value: types.MultiSelectItems) => value is types.TitledMultiSelectItems;
|
|
136
|
+
/**
|
|
137
|
+
* Narrow to a custom or future variant: the `type` tag matches no known variant.
|
|
138
|
+
*
|
|
139
|
+
* TypeScript keeps the known variants in the narrowed union (they are
|
|
140
|
+
* structural subtypes of the catch-all), so read vendor payload keys
|
|
141
|
+
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
142
|
+
*/
|
|
143
|
+
readonly isCustom: (value: types.MultiSelectItems) => value is {
|
|
144
|
+
type: string;
|
|
145
|
+
[key: string]: unknown;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* **UNSTABLE**
|
|
150
|
+
*
|
|
151
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
152
|
+
*
|
|
153
|
+
* Response from the client to an elicitation request.
|
|
154
|
+
*
|
|
155
|
+
* @experimental
|
|
156
|
+
*/
|
|
157
|
+
export type CreateElicitationResponse = types.CreateElicitationResponse;
|
|
158
|
+
/**
|
|
159
|
+
* Validated type guards for `CreateElicitationResponse`'s known variants.
|
|
160
|
+
*
|
|
161
|
+
* Each guard validates the variant's payload, not just its discriminant
|
|
162
|
+
* tag: a malformed known variant (right tag, wrong payload) matches no
|
|
163
|
+
* guard — mirroring wire validation, which rejects such values instead
|
|
164
|
+
* of classifying them as custom.
|
|
165
|
+
*
|
|
166
|
+
* Guards check the value as given: fields that wire deserialization
|
|
167
|
+
* salvages to a default (e.g. a malformed `_meta`) are only normalized
|
|
168
|
+
* by parsing, and for ambiguous raw shapes (a known tag combined with
|
|
169
|
+
* another variant's payload) guards are conservative where wire parsing
|
|
170
|
+
* may still accept the value — narrow wire-parsed values when exact
|
|
171
|
+
* parity matters.
|
|
172
|
+
*
|
|
173
|
+
* @experimental
|
|
174
|
+
*/
|
|
175
|
+
export declare const CreateElicitationResponse: {
|
|
176
|
+
/** Narrow to the `accept` variant, validating its payload. */
|
|
177
|
+
readonly isAccept: (value: types.CreateElicitationResponse) => value is (types.ElicitationAcceptAction & {
|
|
178
|
+
action: "accept";
|
|
179
|
+
}) & Pick<types.CreateElicitationResponse, "_meta">;
|
|
180
|
+
/** Narrow to the `decline` variant, validating its payload. */
|
|
181
|
+
readonly isDecline: (value: types.CreateElicitationResponse) => value is {
|
|
182
|
+
action: "decline";
|
|
183
|
+
} & Pick<types.CreateElicitationResponse, "_meta">;
|
|
184
|
+
/** Narrow to the `cancel` variant, validating its payload. */
|
|
185
|
+
readonly isCancel: (value: types.CreateElicitationResponse) => value is {
|
|
186
|
+
action: "cancel";
|
|
187
|
+
} & Pick<types.CreateElicitationResponse, "_meta">;
|
|
188
|
+
/**
|
|
189
|
+
* Narrow to a custom or future variant: the `action` tag matches no known variant.
|
|
190
|
+
*
|
|
191
|
+
* TypeScript keeps the known variants in the narrowed union (they are
|
|
192
|
+
* structural subtypes of the catch-all), so read vendor payload keys
|
|
193
|
+
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
194
|
+
*/
|
|
195
|
+
readonly isCustom: (value: types.CreateElicitationResponse) => value is {
|
|
196
|
+
action: string;
|
|
197
|
+
[key: string]: unknown;
|
|
198
|
+
} & Pick<types.CreateElicitationResponse, "_meta">;
|
|
199
|
+
};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
// This file is auto-generated by scripts/generate.js
|
|
2
|
+
import * as z from "zod/v4";
|
|
3
|
+
import * as validate from "./zod.gen.js";
|
|
4
|
+
function tagOf(value, key) {
|
|
5
|
+
return typeof value === "object" && value !== null
|
|
6
|
+
? value[key]
|
|
7
|
+
: undefined;
|
|
8
|
+
}
|
|
9
|
+
const zGuardCreateElicitationRequestForm = validate.zElicitationFormMode
|
|
10
|
+
.and(z.object({ mode: z.literal("form") }))
|
|
11
|
+
.and(z.object({ message: z.string() }));
|
|
12
|
+
const zGuardCreateElicitationRequestUrl = validate.zElicitationUrlMode
|
|
13
|
+
.and(z.object({ mode: z.literal("url") }))
|
|
14
|
+
.and(z.object({ message: z.string() }));
|
|
15
|
+
const zGuardCreateElicitationRequestCustom = z
|
|
16
|
+
.union([validate.zElicitationSessionScope, validate.zElicitationRequestScope])
|
|
17
|
+
.and(z.object({ message: z.string() }));
|
|
18
|
+
const zGuardElicitationPropertySchemaString = validate.zStringPropertySchema.and(z.object({ type: z.literal("string") }));
|
|
19
|
+
const zGuardElicitationPropertySchemaNumber = validate.zNumberPropertySchema.and(z.object({ type: z.literal("number") }));
|
|
20
|
+
const zGuardElicitationPropertySchemaInteger = validate.zIntegerPropertySchema.and(z.object({ type: z.literal("integer") }));
|
|
21
|
+
const zGuardElicitationPropertySchemaBoolean = validate.zBooleanPropertySchema.and(z.object({ type: z.literal("boolean") }));
|
|
22
|
+
const zGuardElicitationPropertySchemaArray = validate.zMultiSelectPropertySchema.and(z.object({ type: z.literal("array") }));
|
|
23
|
+
const zGuardMultiSelectItemsString = validate.zStringMultiSelectItems.and(z.object({ type: z.literal("string") }));
|
|
24
|
+
const zGuardMultiSelectItemsTitled = validate.zTitledMultiSelectItems;
|
|
25
|
+
const zGuardCreateElicitationResponseAccept = validate.zElicitationAcceptAction.and(z.object({ action: z.literal("accept") }));
|
|
26
|
+
const zGuardCreateElicitationResponseDecline = z.object({
|
|
27
|
+
action: z.literal("decline"),
|
|
28
|
+
});
|
|
29
|
+
const zGuardCreateElicitationResponseCancel = z.object({
|
|
30
|
+
action: z.literal("cancel"),
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* Validated type guards for `CreateElicitationRequest`'s known variants.
|
|
34
|
+
*
|
|
35
|
+
* Each guard validates the variant's payload, not just its discriminant
|
|
36
|
+
* tag: a malformed known variant (right tag, wrong payload) matches no
|
|
37
|
+
* guard — mirroring wire validation, which rejects such values instead
|
|
38
|
+
* of classifying them as custom.
|
|
39
|
+
*
|
|
40
|
+
* Guards check the value as given: fields that wire deserialization
|
|
41
|
+
* salvages to a default (e.g. a malformed `_meta`) are only normalized
|
|
42
|
+
* by parsing, and for ambiguous raw shapes (a known tag combined with
|
|
43
|
+
* another variant's payload) guards are conservative where wire parsing
|
|
44
|
+
* may still accept the value — narrow wire-parsed values when exact
|
|
45
|
+
* parity matters.
|
|
46
|
+
*
|
|
47
|
+
* @experimental
|
|
48
|
+
*/
|
|
49
|
+
export const CreateElicitationRequest = {
|
|
50
|
+
/** Narrow to the `form` variant, validating its payload. */
|
|
51
|
+
isForm(value) {
|
|
52
|
+
return (tagOf(value, "mode") === "form" &&
|
|
53
|
+
zGuardCreateElicitationRequestForm.safeParse(value).success);
|
|
54
|
+
},
|
|
55
|
+
/** Narrow to the `url` variant, validating its payload. */
|
|
56
|
+
isUrl(value) {
|
|
57
|
+
return (tagOf(value, "mode") === "url" &&
|
|
58
|
+
zGuardCreateElicitationRequestUrl.safeParse(value).success);
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* Narrow to a custom or future variant: the `mode` tag matches no known variant, with a valid payload.
|
|
62
|
+
*
|
|
63
|
+
* TypeScript keeps the known variants in the narrowed union (they are
|
|
64
|
+
* structural subtypes of the catch-all), so read vendor payload keys
|
|
65
|
+
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
66
|
+
*/
|
|
67
|
+
isCustom(value) {
|
|
68
|
+
const tag = tagOf(value, "mode");
|
|
69
|
+
return (typeof tag === "string" &&
|
|
70
|
+
!["form", "url"].includes(tag) &&
|
|
71
|
+
zGuardCreateElicitationRequestCustom.safeParse(value).success);
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Validated type guards for `ElicitationPropertySchema`'s known variants.
|
|
76
|
+
*
|
|
77
|
+
* Each guard validates the variant's payload, not just its discriminant
|
|
78
|
+
* tag: a malformed known variant (right tag, wrong payload) matches no
|
|
79
|
+
* guard — mirroring wire validation, which rejects such values instead
|
|
80
|
+
* of classifying them as custom.
|
|
81
|
+
*
|
|
82
|
+
* Guards check the value as given: fields that wire deserialization
|
|
83
|
+
* salvages to a default (e.g. a malformed `_meta`) are only normalized
|
|
84
|
+
* by parsing, and for ambiguous raw shapes (a known tag combined with
|
|
85
|
+
* another variant's payload) guards are conservative where wire parsing
|
|
86
|
+
* may still accept the value — narrow wire-parsed values when exact
|
|
87
|
+
* parity matters.
|
|
88
|
+
*/
|
|
89
|
+
export const ElicitationPropertySchema = {
|
|
90
|
+
/** Narrow to the `string` variant, validating its payload. */
|
|
91
|
+
isString(value) {
|
|
92
|
+
return (tagOf(value, "type") === "string" &&
|
|
93
|
+
zGuardElicitationPropertySchemaString.safeParse(value).success);
|
|
94
|
+
},
|
|
95
|
+
/** Narrow to the `number` variant, validating its payload. */
|
|
96
|
+
isNumber(value) {
|
|
97
|
+
return (tagOf(value, "type") === "number" &&
|
|
98
|
+
zGuardElicitationPropertySchemaNumber.safeParse(value).success);
|
|
99
|
+
},
|
|
100
|
+
/** Narrow to the `integer` variant, validating its payload. */
|
|
101
|
+
isInteger(value) {
|
|
102
|
+
return (tagOf(value, "type") === "integer" &&
|
|
103
|
+
zGuardElicitationPropertySchemaInteger.safeParse(value).success);
|
|
104
|
+
},
|
|
105
|
+
/** Narrow to the `boolean` variant, validating its payload. */
|
|
106
|
+
isBoolean(value) {
|
|
107
|
+
return (tagOf(value, "type") === "boolean" &&
|
|
108
|
+
zGuardElicitationPropertySchemaBoolean.safeParse(value).success);
|
|
109
|
+
},
|
|
110
|
+
/** Narrow to the `array` variant, validating its payload. */
|
|
111
|
+
isArray(value) {
|
|
112
|
+
return (tagOf(value, "type") === "array" &&
|
|
113
|
+
zGuardElicitationPropertySchemaArray.safeParse(value).success);
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* Narrow to a custom or future variant: the `type` tag matches no known variant.
|
|
117
|
+
*
|
|
118
|
+
* TypeScript keeps the known variants in the narrowed union (they are
|
|
119
|
+
* structural subtypes of the catch-all), so read vendor payload keys
|
|
120
|
+
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
121
|
+
*/
|
|
122
|
+
isCustom(value) {
|
|
123
|
+
const tag = tagOf(value, "type");
|
|
124
|
+
return (typeof tag === "string" &&
|
|
125
|
+
!["array", "boolean", "integer", "number", "string"].includes(tag));
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Validated type guards for `MultiSelectItems`'s known variants.
|
|
130
|
+
*
|
|
131
|
+
* Each guard validates the variant's payload, not just its discriminant
|
|
132
|
+
* tag: a malformed known variant (right tag, wrong payload) matches no
|
|
133
|
+
* guard — mirroring wire validation, which rejects such values instead
|
|
134
|
+
* of classifying them as custom.
|
|
135
|
+
*
|
|
136
|
+
* Guards check the value as given: fields that wire deserialization
|
|
137
|
+
* salvages to a default (e.g. a malformed `_meta`) are only normalized
|
|
138
|
+
* by parsing, and for ambiguous raw shapes (a known tag combined with
|
|
139
|
+
* another variant's payload) guards are conservative where wire parsing
|
|
140
|
+
* may still accept the value — narrow wire-parsed values when exact
|
|
141
|
+
* parity matters.
|
|
142
|
+
*/
|
|
143
|
+
export const MultiSelectItems = {
|
|
144
|
+
/** Narrow to the `string` variant, validating its payload. */
|
|
145
|
+
isString(value) {
|
|
146
|
+
return (tagOf(value, "type") === "string" &&
|
|
147
|
+
zGuardMultiSelectItemsString.safeParse(value).success);
|
|
148
|
+
},
|
|
149
|
+
/** Narrow to the `titled` variant, validating its payload. */
|
|
150
|
+
isTitled(value) {
|
|
151
|
+
return (tagOf(value, "type") === undefined &&
|
|
152
|
+
zGuardMultiSelectItemsTitled.safeParse(value).success);
|
|
153
|
+
},
|
|
154
|
+
/**
|
|
155
|
+
* Narrow to a custom or future variant: the `type` tag matches no known variant.
|
|
156
|
+
*
|
|
157
|
+
* TypeScript keeps the known variants in the narrowed union (they are
|
|
158
|
+
* structural subtypes of the catch-all), so read vendor payload keys
|
|
159
|
+
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
160
|
+
*/
|
|
161
|
+
isCustom(value) {
|
|
162
|
+
const tag = tagOf(value, "type");
|
|
163
|
+
return typeof tag === "string" && !["string"].includes(tag);
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Validated type guards for `CreateElicitationResponse`'s known variants.
|
|
168
|
+
*
|
|
169
|
+
* Each guard validates the variant's payload, not just its discriminant
|
|
170
|
+
* tag: a malformed known variant (right tag, wrong payload) matches no
|
|
171
|
+
* guard — mirroring wire validation, which rejects such values instead
|
|
172
|
+
* of classifying them as custom.
|
|
173
|
+
*
|
|
174
|
+
* Guards check the value as given: fields that wire deserialization
|
|
175
|
+
* salvages to a default (e.g. a malformed `_meta`) are only normalized
|
|
176
|
+
* by parsing, and for ambiguous raw shapes (a known tag combined with
|
|
177
|
+
* another variant's payload) guards are conservative where wire parsing
|
|
178
|
+
* may still accept the value — narrow wire-parsed values when exact
|
|
179
|
+
* parity matters.
|
|
180
|
+
*
|
|
181
|
+
* @experimental
|
|
182
|
+
*/
|
|
183
|
+
export const CreateElicitationResponse = {
|
|
184
|
+
/** Narrow to the `accept` variant, validating its payload. */
|
|
185
|
+
isAccept(value) {
|
|
186
|
+
return (tagOf(value, "action") === "accept" &&
|
|
187
|
+
zGuardCreateElicitationResponseAccept.safeParse(value).success);
|
|
188
|
+
},
|
|
189
|
+
/** Narrow to the `decline` variant, validating its payload. */
|
|
190
|
+
isDecline(value) {
|
|
191
|
+
return (tagOf(value, "action") === "decline" &&
|
|
192
|
+
zGuardCreateElicitationResponseDecline.safeParse(value).success);
|
|
193
|
+
},
|
|
194
|
+
/** Narrow to the `cancel` variant, validating its payload. */
|
|
195
|
+
isCancel(value) {
|
|
196
|
+
return (tagOf(value, "action") === "cancel" &&
|
|
197
|
+
zGuardCreateElicitationResponseCancel.safeParse(value).success);
|
|
198
|
+
},
|
|
199
|
+
/**
|
|
200
|
+
* Narrow to a custom or future variant: the `action` tag matches no known variant.
|
|
201
|
+
*
|
|
202
|
+
* TypeScript keeps the known variants in the narrowed union (they are
|
|
203
|
+
* structural subtypes of the catch-all), so read vendor payload keys
|
|
204
|
+
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
205
|
+
*/
|
|
206
|
+
isCustom(value) {
|
|
207
|
+
const tag = tagOf(value, "action");
|
|
208
|
+
return (typeof tag === "string" && !["accept", "cancel", "decline"].includes(tag));
|
|
209
|
+
},
|
|
210
|
+
};
|
|
211
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AE,QAAQ,CAAC,CAAC;QACnC,OAAO,CACL,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAC1E,CAAC;IACJ,CAAC;CACO,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export type { AcceptNesNotification, AgentAuthCapabilities, AgentCapabilities, AgentNotification, AgentRequest, AgentResponse, Annotations, AudioContent, AuthCapabilities, AuthenticateRequest, AuthenticateResponse, AuthEnvVar, AuthMethod, AuthMethodAgent, AuthMethodEnvVar, AuthMethodId, AuthMethodTerminal, AvailableCommand, AvailableCommandInput, AvailableCommandsUpdate, BlobResourceContents, BooleanConfigOptionCapabilities, BooleanPropertySchema, CancelNotification, CancelRequestNotification, ClientCapabilities, ClientNesCapabilities, ClientNotification, ClientRequest, ClientResponse, ClientSessionCapabilities, CloseNesRequest, CloseNesResponse, CloseSessionRequest, CloseSessionResponse, CompleteElicitationNotification, ConfigOptionUpdate, ConnectMcpRequest, ConnectMcpResponse, Content, ContentBlock, ContentChunk, Cost, CreateElicitationRequest, CreateElicitationResponse, CreateTerminalRequest, CreateTerminalResponse, CurrentModeUpdate, DeleteSessionRequest, DeleteSessionResponse, DidChangeDocumentNotification, DidCloseDocumentNotification, DidFocusDocumentNotification, DidOpenDocumentNotification, DidSaveDocumentNotification, Diff, DisableProviderRequest, DisableProviderResponse, DisconnectMcpRequest, DisconnectMcpResponse, ElicitationAcceptAction, ElicitationCapabilities, ElicitationContentValue, ElicitationFormCapabilities, ElicitationFormMode, ElicitationId, ElicitationPropertySchema, ElicitationRequestScope, ElicitationSchema, ElicitationSchemaType, ElicitationSessionScope, ElicitationUrlCapabilities, ElicitationUrlMode, EmbeddedResource, EmbeddedResourceResource, EnumOption, EnvVariable, Error, ErrorCode, ExtNotification, ExtRequest, ExtResponse, FileSystemCapabilities, ForkSessionRequest, ForkSessionResponse, HttpHeader, ImageContent, Implementation, InitializeRequest, InitializeResponse, IntegerPropertySchema, KillTerminalRequest, KillTerminalResponse, ListProvidersRequest, ListProvidersResponse, ListSessionsRequest, ListSessionsResponse, LlmProtocol, LoadSessionRequest, LoadSessionResponse, LogoutCapabilities, LogoutRequest, LogoutResponse, McpCapabilities, McpConnectionId, McpServer, McpServerAcp, McpServerAcpId, McpServerHttp, McpServerSse, McpServerStdio, MessageId, MessageMcpNotification, MessageMcpRequest, MessageMcpResponse, MultiSelectItems, MultiSelectPropertySchema, NesCapabilities, NesContextCapabilities, NesDiagnostic, NesDiagnosticsCapabilities, NesDiagnosticSeverity, NesDocumentDidChangeCapabilities, NesDocumentDidCloseCapabilities, NesDocumentDidFocusCapabilities, NesDocumentDidOpenCapabilities, NesDocumentDidSaveCapabilities, NesDocumentEventCapabilities, NesEditHistoryCapabilities, NesEditHistoryEntry, NesEditSuggestion, NesEventCapabilities, NesExcerpt, NesJumpCapabilities, NesJumpSuggestion, NesOpenFile, NesOpenFilesCapabilities, NesRecentFile, NesRecentFilesCapabilities, NesRejectReason, NesRelatedSnippet, NesRelatedSnippetsCapabilities, NesRenameCapabilities, NesRenameSuggestion, NesRepository, NesSearchAndReplaceCapabilities, NesSearchAndReplaceSuggestion, NesSuggestContext, NesSuggestion, NesSuggestionId, NesTextEdit, NesTriggerKind, NesUserAction, NesUserActionsCapabilities, NewSessionRequest, NewSessionResponse, NumberPropertySchema, PermissionOption, PermissionOptionId, PermissionOptionKind, Plan, PlanCapabilities, PlanEntry, PlanEntryPriority, PlanEntryStatus, PlanFile, PlanId, PlanItems, PlanMarkdown, PlanRemoved, PlanUpdate, PlanUpdateContent, Position, PositionEncodingKind, PromptCapabilities, PromptRequest, PromptResponse, ProtocolVersion, ProviderCurrentConfig, ProviderId, ProviderInfo, ProvidersCapabilities, Range, ReadTextFileRequest, ReadTextFileResponse, RejectNesNotification, ReleaseTerminalRequest, ReleaseTerminalResponse, RequestId, RequestPermissionOutcome, RequestPermissionRequest, RequestPermissionResponse, ResourceLink, ResumeSessionRequest, ResumeSessionResponse, Role, SelectedPermissionOutcome, SessionAdditionalDirectoriesCapabilities, SessionCapabilities, SessionCloseCapabilities, SessionConfigBoolean, SessionConfigGroupId, SessionConfigId, SessionConfigOption, SessionConfigOptionCategory, SessionConfigOptionsCapabilities, SessionConfigSelect, SessionConfigSelectGroup, SessionConfigSelectOption, SessionConfigSelectOptions, SessionConfigValueId, SessionDeleteCapabilities, SessionForkCapabilities, SessionId, SessionInfo, SessionInfoUpdate, SessionListCapabilities, SessionMode, SessionModeId, SessionModeState, SessionNotification, SessionResumeCapabilities, SessionUpdate, SetProviderRequest, SetProviderResponse, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, SetSessionModeRequest, SetSessionModeResponse, StartNesRequest, StartNesResponse, StopReason, StringFormat, StringMultiSelectItems, StringPropertySchema, SuggestNesRequest, SuggestNesResponse, Terminal, TerminalExitStatus, TerminalId, TerminalOutputRequest, TerminalOutputResponse, TextContent, TextDocumentContentChangeEvent, TextDocumentSyncKind, TextResourceContents, TitledMultiSelectItems, ToolCall, ToolCallContent, ToolCallId, ToolCallLocation, ToolCallStatus, ToolCallUpdate, ToolKind, UnstructuredCommandInput, Usage, UsageUpdate, WaitForTerminalExitRequest, WaitForTerminalExitResponse, WorkspaceFolder, WriteTextFileRequest, WriteTextFileResponse, } from "./types.gen.js";
|
|
2
|
+
export declare const AGENT_METHODS: {
|
|
3
|
+
readonly initialize: "initialize";
|
|
4
|
+
readonly authenticate: "authenticate";
|
|
5
|
+
readonly providers_list: "providers/list";
|
|
6
|
+
readonly providers_set: "providers/set";
|
|
7
|
+
readonly providers_disable: "providers/disable";
|
|
8
|
+
readonly session_new: "session/new";
|
|
9
|
+
readonly session_load: "session/load";
|
|
10
|
+
readonly session_set_mode: "session/set_mode";
|
|
11
|
+
readonly session_set_config_option: "session/set_config_option";
|
|
12
|
+
readonly session_prompt: "session/prompt";
|
|
13
|
+
readonly session_cancel: "session/cancel";
|
|
14
|
+
readonly mcp_message: "mcp/message";
|
|
15
|
+
readonly session_list: "session/list";
|
|
16
|
+
readonly session_delete: "session/delete";
|
|
17
|
+
readonly session_fork: "session/fork";
|
|
18
|
+
readonly session_resume: "session/resume";
|
|
19
|
+
readonly session_close: "session/close";
|
|
20
|
+
readonly logout: "logout";
|
|
21
|
+
readonly nes_start: "nes/start";
|
|
22
|
+
readonly nes_suggest: "nes/suggest";
|
|
23
|
+
readonly nes_accept: "nes/accept";
|
|
24
|
+
readonly nes_reject: "nes/reject";
|
|
25
|
+
readonly nes_close: "nes/close";
|
|
26
|
+
readonly document_did_open: "document/didOpen";
|
|
27
|
+
readonly document_did_change: "document/didChange";
|
|
28
|
+
readonly document_did_close: "document/didClose";
|
|
29
|
+
readonly document_did_save: "document/didSave";
|
|
30
|
+
readonly document_did_focus: "document/didFocus";
|
|
31
|
+
};
|
|
32
|
+
export declare const CLIENT_METHODS: {
|
|
33
|
+
readonly session_request_permission: "session/request_permission";
|
|
34
|
+
readonly session_update: "session/update";
|
|
35
|
+
readonly fs_write_text_file: "fs/write_text_file";
|
|
36
|
+
readonly fs_read_text_file: "fs/read_text_file";
|
|
37
|
+
readonly terminal_create: "terminal/create";
|
|
38
|
+
readonly terminal_output: "terminal/output";
|
|
39
|
+
readonly terminal_release: "terminal/release";
|
|
40
|
+
readonly terminal_wait_for_exit: "terminal/wait_for_exit";
|
|
41
|
+
readonly terminal_kill: "terminal/kill";
|
|
42
|
+
readonly mcp_connect: "mcp/connect";
|
|
43
|
+
readonly mcp_message: "mcp/message";
|
|
44
|
+
readonly mcp_disconnect: "mcp/disconnect";
|
|
45
|
+
readonly elicitation_create: "elicitation/create";
|
|
46
|
+
readonly elicitation_complete: "elicitation/complete";
|
|
47
|
+
};
|
|
48
|
+
export declare const PROTOCOL_METHODS: {
|
|
49
|
+
readonly cancel_request: "$/cancel_request";
|
|
50
|
+
};
|
|
51
|
+
export declare const PROTOCOL_VERSION = 1;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
export const AGENT_METHODS = {
|
|
3
|
+
initialize: "initialize",
|
|
4
|
+
authenticate: "authenticate",
|
|
5
|
+
providers_list: "providers/list",
|
|
6
|
+
providers_set: "providers/set",
|
|
7
|
+
providers_disable: "providers/disable",
|
|
8
|
+
session_new: "session/new",
|
|
9
|
+
session_load: "session/load",
|
|
10
|
+
session_set_mode: "session/set_mode",
|
|
11
|
+
session_set_config_option: "session/set_config_option",
|
|
12
|
+
session_prompt: "session/prompt",
|
|
13
|
+
session_cancel: "session/cancel",
|
|
14
|
+
mcp_message: "mcp/message",
|
|
15
|
+
session_list: "session/list",
|
|
16
|
+
session_delete: "session/delete",
|
|
17
|
+
session_fork: "session/fork",
|
|
18
|
+
session_resume: "session/resume",
|
|
19
|
+
session_close: "session/close",
|
|
20
|
+
logout: "logout",
|
|
21
|
+
nes_start: "nes/start",
|
|
22
|
+
nes_suggest: "nes/suggest",
|
|
23
|
+
nes_accept: "nes/accept",
|
|
24
|
+
nes_reject: "nes/reject",
|
|
25
|
+
nes_close: "nes/close",
|
|
26
|
+
document_did_open: "document/didOpen",
|
|
27
|
+
document_did_change: "document/didChange",
|
|
28
|
+
document_did_close: "document/didClose",
|
|
29
|
+
document_did_save: "document/didSave",
|
|
30
|
+
document_did_focus: "document/didFocus",
|
|
31
|
+
};
|
|
32
|
+
export const CLIENT_METHODS = {
|
|
33
|
+
session_request_permission: "session/request_permission",
|
|
34
|
+
session_update: "session/update",
|
|
35
|
+
fs_write_text_file: "fs/write_text_file",
|
|
36
|
+
fs_read_text_file: "fs/read_text_file",
|
|
37
|
+
terminal_create: "terminal/create",
|
|
38
|
+
terminal_output: "terminal/output",
|
|
39
|
+
terminal_release: "terminal/release",
|
|
40
|
+
terminal_wait_for_exit: "terminal/wait_for_exit",
|
|
41
|
+
terminal_kill: "terminal/kill",
|
|
42
|
+
mcp_connect: "mcp/connect",
|
|
43
|
+
mcp_message: "mcp/message",
|
|
44
|
+
mcp_disconnect: "mcp/disconnect",
|
|
45
|
+
elicitation_create: "elicitation/create",
|
|
46
|
+
elicitation_complete: "elicitation/complete",
|
|
47
|
+
};
|
|
48
|
+
export const PROTOCOL_METHODS = {
|
|
49
|
+
cancel_request: "$/cancel_request",
|
|
50
|
+
};
|
|
51
|
+
export const PROTOCOL_VERSION = 1;
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AA2QrD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,cAAc;IAC5B,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,iBAAiB,EAAE,mBAAmB;IACtC,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAC5B,gBAAgB,EAAE,kBAAkB;IACpC,yBAAyB,EAAE,2BAA2B;IACtD,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;IAChC,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAC5B,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,cAAc;IAC5B,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE,WAAW;IACtB,iBAAiB,EAAE,kBAAkB;IACrC,mBAAmB,EAAE,oBAAoB;IACzC,kBAAkB,EAAE,mBAAmB;IACvC,iBAAiB,EAAE,kBAAkB;IACrC,kBAAkB,EAAE,mBAAmB;CAC/B,CAAC;AAEX,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,0BAA0B,EAAE,4BAA4B;IACxD,c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