@relay-harness/coding-agent 0.0.0-stage → 1.0.3
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/CHANGELOG.md +6122 -0
- package/LICENSE +22 -0
- package/README.md +79 -2
- package/dist/bun/cli.d.ts +5 -0
- package/dist/bun/cli.d.ts.map +1 -0
- package/dist/bun/cli.js +5 -0
- package/dist/bun/cli.js.map +1 -0
- package/dist/bun/restore-sandbox-env.d.ts +17 -0
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -0
- package/dist/bun/restore-sandbox-env.js +36 -0
- package/dist/bun/restore-sandbox-env.js.map +1 -0
- package/dist/bun/runtime-setup.d.ts +2 -0
- package/dist/bun/runtime-setup.d.ts.map +1 -0
- package/dist/bun/runtime-setup.js +12 -0
- package/dist/bun/runtime-setup.js.map +1 -0
- package/dist/bun/sandbox-env-setup.d.ts +2 -0
- package/dist/bun/sandbox-env-setup.d.ts.map +1 -0
- package/dist/bun/sandbox-env-setup.js +4 -0
- package/dist/bun/sandbox-env-setup.js.map +1 -0
- package/dist/bundle/chunks/anthropic-messages-TXWUAW5N.js +6 -0
- package/dist/bundle/chunks/anthropic.js +75 -0
- package/dist/bundle/chunks/azure-openai-responses-EJG46ESA.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +83 -0
- package/dist/bundle/chunks/chunk-3QND5D7W.js +82 -0
- package/dist/bundle/chunks/chunk-3XNI2SB6.js +15 -0
- package/dist/bundle/chunks/chunk-4L3WN2XY.js +2 -0
- package/dist/bundle/chunks/chunk-5H4IRYOE.js +1791 -0
- package/dist/bundle/chunks/chunk-6CYCI3EJ.js +12 -0
- package/dist/bundle/chunks/chunk-7ZC4UXSL.js +2 -0
- package/dist/bundle/chunks/chunk-A3JYRWB6.js +2 -0
- package/dist/bundle/chunks/chunk-C47CLQZK.js +2 -0
- package/dist/bundle/chunks/chunk-DRQDKNXA.js +2 -0
- package/dist/bundle/chunks/chunk-EQ2HXQGJ.js +2 -0
- package/dist/bundle/chunks/chunk-F5ZABL6Z.js +20 -0
- package/dist/bundle/chunks/chunk-H3QXYIF7.js +31 -0
- package/dist/bundle/chunks/chunk-ISNO4JTR.js +127 -0
- package/dist/bundle/chunks/chunk-KJUDFE6Y.js +11 -0
- package/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
- package/dist/bundle/chunks/chunk-LD2P6SFZ.js +2 -0
- package/dist/bundle/chunks/chunk-MP5FU7MG.js +20 -0
- package/dist/bundle/chunks/chunk-NS67SA75.js +2 -0
- package/dist/bundle/chunks/chunk-O7R77OAK.js +2 -0
- package/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
- package/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
- package/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
- package/dist/bundle/chunks/chunk-PTRF7IZB.js +2 -0
- package/dist/bundle/chunks/chunk-RZ4KG4BP.js +44 -0
- package/dist/bundle/chunks/chunk-S3GGRYIO.js +6 -0
- package/dist/bundle/chunks/chunk-TEPMHNKQ.js +2 -0
- package/dist/bundle/chunks/chunk-TRDNDS6A.js +4 -0
- package/dist/bundle/chunks/chunk-USJZMAIR.js +2 -0
- package/dist/bundle/chunks/chunk-UTB4DTYQ.js +2 -0
- package/dist/bundle/chunks/chunk-WMTXXI7H.js +4 -0
- package/dist/bundle/chunks/chunk-XDAWU2J5.js +132 -0
- package/dist/bundle/chunks/chunk-Z2G7KLPH.js +11 -0
- package/dist/bundle/chunks/cli-K4CNHWOI.js +51 -0
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-NM3JRRWQ.js +2 -0
- package/dist/bundle/chunks/codemode-worker.js +374 -0
- package/dist/bundle/chunks/easter-egg-3d-TGRCIHA4.js +2 -0
- package/dist/bundle/chunks/execute-6E5DA2QI.js +388 -0
- package/dist/bundle/chunks/github-copilot.js +2 -0
- package/dist/bundle/chunks/google-generative-ai-HYUNEOCJ.js +2 -0
- package/dist/bundle/chunks/google-vertex-J7MDGTNM.js +2 -0
- package/dist/bundle/chunks/https-proxy-agent-2VXB7436.js +13 -0
- package/dist/bundle/chunks/image-resize-worker.js +2 -0
- package/dist/bundle/chunks/jiti-loader-C3NU2SDH.js +21 -0
- package/dist/bundle/chunks/jiti-static-loader-E6ANQD5T.js +2 -0
- package/dist/bundle/chunks/kimi-coding.js +2 -0
- package/dist/bundle/chunks/lib-TEDK3E5I.js +9 -0
- package/dist/bundle/chunks/llama-cpp-classify-XT44PI3C.js +22 -0
- package/dist/bundle/chunks/meta.js +2 -0
- package/dist/bundle/chunks/mistral-conversations-UD2HHXKZ.js +5 -0
- package/dist/bundle/chunks/multipart-parser-SQ6GDJL7.js +3 -0
- package/dist/bundle/chunks/node-N5BSDOA5.js +16 -0
- package/dist/bundle/chunks/node-TWVVAGPO.js +2 -0
- package/dist/bundle/chunks/openai-chatgpt.js +75 -0
- package/dist/bundle/chunks/openai-codex-responses-EMHXEJR4.js +10 -0
- package/dist/bundle/chunks/openai-codex.js +75 -0
- package/dist/bundle/chunks/openai-completions-LPKRZYMC.js +7 -0
- package/dist/bundle/chunks/openai-responses-TOOBRHUV.js +3 -0
- package/dist/bundle/chunks/openrouter-images-ZVXWCSIM.js +2 -0
- package/dist/bundle/chunks/openrouter.js +75 -0
- package/dist/bundle/chunks/relay-messages-QRFJXG5X.js +8 -0
- package/dist/bundle/chunks/runtime-O5HLCH3V.js +2 -0
- package/dist/bundle/chunks/src-UK77SYZE.js +4 -0
- package/dist/bundle/chunks/typesafe-system-one-PRR5K6CI.js +2 -0
- package/dist/bundle/chunks/virtual-modules-ZGB2J7DY.js +2 -0
- package/dist/bundle/chunks/xai.js +2 -0
- package/dist/bundle/cli-runtime.js +3 -0
- package/dist/bundle/cli.js +5 -0
- package/dist/bundle/index.js +2 -0
- package/dist/bundle/rpc-entry.js +3 -0
- package/dist/cli/args.d.ts +61 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +454 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/auth-check.d.ts +19 -0
- package/dist/cli/auth-check.d.ts.map +1 -0
- package/dist/cli/auth-check.js +50 -0
- package/dist/cli/auth-check.js.map +1 -0
- package/dist/cli/auth-command.d.ts +24 -0
- package/dist/cli/auth-command.d.ts.map +1 -0
- package/dist/cli/auth-command.js +103 -0
- package/dist/cli/auth-command.js.map +1 -0
- package/dist/cli/config-selector.d.ts +16 -0
- package/dist/cli/config-selector.d.ts.map +1 -0
- package/dist/cli/config-selector.js +32 -0
- package/dist/cli/config-selector.js.map +1 -0
- package/dist/cli/credential-print.d.ts +13 -0
- package/dist/cli/credential-print.d.ts.map +1 -0
- package/dist/cli/credential-print.js +76 -0
- package/dist/cli/credential-print.js.map +1 -0
- package/dist/cli/file-processor.d.ts +15 -0
- package/dist/cli/file-processor.d.ts.map +1 -0
- package/dist/cli/file-processor.js +71 -0
- package/dist/cli/file-processor.js.map +1 -0
- package/dist/cli/initial-message.d.ts +18 -0
- package/dist/cli/initial-message.d.ts.map +1 -0
- package/dist/cli/initial-message.js +22 -0
- package/dist/cli/initial-message.js.map +1 -0
- package/dist/cli/list-models.d.ts +9 -0
- package/dist/cli/list-models.d.ts.map +1 -0
- package/dist/cli/list-models.js +98 -0
- package/dist/cli/list-models.js.map +1 -0
- package/dist/cli/project-trust.d.ts +10 -0
- package/dist/cli/project-trust.d.ts.map +1 -0
- package/dist/cli/project-trust.js +48 -0
- package/dist/cli/project-trust.js.map +1 -0
- package/dist/cli/session-picker.d.ts +10 -0
- package/dist/cli/session-picker.d.ts.map +1 -0
- package/dist/cli/session-picker.js +36 -0
- package/dist/cli/session-picker.js.map +1 -0
- package/dist/cli/setup.d.ts +2 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +12 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/startup-ui.d.ts +20 -0
- package/dist/cli/startup-ui.d.ts.map +1 -0
- package/dist/cli/startup-ui.js +193 -0
- package/dist/cli/startup-ui.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +6 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +108 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +264 -0
- package/dist/config.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts +119 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -0
- package/dist/core/agent-session-runtime.js +317 -0
- package/dist/core/agent-session-runtime.js.map +1 -0
- package/dist/core/agent-session-services.d.ts +86 -0
- package/dist/core/agent-session-services.d.ts.map +1 -0
- package/dist/core/agent-session-services.js +147 -0
- package/dist/core/agent-session-services.js.map +1 -0
- package/dist/core/agent-session.d.ts +891 -0
- package/dist/core/agent-session.d.ts.map +1 -0
- package/dist/core/agent-session.js +3553 -0
- package/dist/core/agent-session.js.map +1 -0
- package/dist/core/auth-guidance.d.ts +5 -0
- package/dist/core/auth-guidance.d.ts.map +1 -0
- package/dist/core/auth-guidance.js +21 -0
- package/dist/core/auth-guidance.js.map +1 -0
- package/dist/core/auth-storage.d.ts +72 -0
- package/dist/core/auth-storage.d.ts.map +1 -0
- package/dist/core/auth-storage.js +426 -0
- package/dist/core/auth-storage.js.map +1 -0
- package/dist/core/bash-executor.d.ts +32 -0
- package/dist/core/bash-executor.d.ts.map +1 -0
- package/dist/core/bash-executor.js +106 -0
- package/dist/core/bash-executor.js.map +1 -0
- package/dist/core/bug-report.d.ts +176 -0
- package/dist/core/bug-report.d.ts.map +1 -0
- package/dist/core/bug-report.js +292 -0
- package/dist/core/bug-report.js.map +1 -0
- package/dist/core/cache-stats.d.ts +49 -0
- package/dist/core/cache-stats.d.ts.map +1 -0
- package/dist/core/cache-stats.js +112 -0
- package/dist/core/cache-stats.js.map +1 -0
- package/dist/core/cache-warmer.d.ts +103 -0
- package/dist/core/cache-warmer.d.ts.map +1 -0
- package/dist/core/cache-warmer.js +356 -0
- package/dist/core/cache-warmer.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +98 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/dist/core/compaction/branch-summarization.js +251 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts +145 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -0
- package/dist/core/compaction/compaction.js +744 -0
- package/dist/core/compaction/compaction.js.map +1 -0
- package/dist/core/compaction/index.d.ts +7 -0
- package/dist/core/compaction/index.d.ts.map +1 -0
- package/dist/core/compaction/index.js +7 -0
- package/dist/core/compaction/index.js.map +1 -0
- package/dist/core/compaction/utils.d.ts +39 -0
- package/dist/core/compaction/utils.d.ts.map +1 -0
- package/dist/core/compaction/utils.js +149 -0
- package/dist/core/compaction/utils.js.map +1 -0
- package/dist/core/crash-log.d.ts +27 -0
- package/dist/core/crash-log.d.ts.map +1 -0
- package/dist/core/crash-log.js +140 -0
- package/dist/core/crash-log.js.map +1 -0
- package/dist/core/defaults.d.ts +4 -0
- package/dist/core/defaults.d.ts.map +1 -0
- package/dist/core/defaults.js +11 -0
- package/dist/core/defaults.js.map +1 -0
- package/dist/core/diagnostics.d.ts +15 -0
- package/dist/core/diagnostics.d.ts.map +1 -0
- package/dist/core/diagnostics.js +2 -0
- package/dist/core/diagnostics.js.map +1 -0
- package/dist/core/event-bus.d.ts +9 -0
- package/dist/core/event-bus.d.ts.map +1 -0
- package/dist/core/event-bus.js +25 -0
- package/dist/core/event-bus.js.map +1 -0
- package/dist/core/exec.d.ts +29 -0
- package/dist/core/exec.d.ts.map +1 -0
- package/dist/core/exec.js +75 -0
- package/dist/core/exec.js.map +1 -0
- package/dist/core/experimental.d.ts +2 -0
- package/dist/core/experimental.d.ts.map +1 -0
- package/dist/core/experimental.js +4 -0
- package/dist/core/experimental.js.map +1 -0
- package/dist/core/export-html/ansi-to-html.d.ts +22 -0
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/dist/core/export-html/ansi-to-html.js +249 -0
- package/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/dist/core/export-html/index.d.ts +37 -0
- package/dist/core/export-html/index.d.ts.map +1 -0
- package/dist/core/export-html/index.js +226 -0
- package/dist/core/export-html/index.js.map +1 -0
- package/dist/core/export-html/template.css +1076 -0
- package/dist/core/export-html/template.html +55 -0
- package/dist/core/export-html/template.js +1918 -0
- package/dist/core/export-html/tool-renderer.d.ts +34 -0
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/dist/core/export-html/tool-renderer.js +108 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -0
- package/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/dist/core/export-html/vendor/marked.min.js +78 -0
- package/dist/core/extensions/index.d.ts +12 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/index.js +9 -0
- package/dist/core/extensions/index.js.map +1 -0
- package/dist/core/extensions/jiti-loader.d.ts +2 -0
- package/dist/core/extensions/jiti-loader.d.ts.map +1 -0
- package/dist/core/extensions/jiti-loader.js +4 -0
- package/dist/core/extensions/jiti-loader.js.map +1 -0
- package/dist/core/extensions/jiti-static-loader.d.ts +2 -0
- package/dist/core/extensions/jiti-static-loader.d.ts.map +1 -0
- package/dist/core/extensions/jiti-static-loader.js +4 -0
- package/dist/core/extensions/jiti-static-loader.js.map +1 -0
- package/dist/core/extensions/loader.d.ts +23 -0
- package/dist/core/extensions/loader.d.ts.map +1 -0
- package/dist/core/extensions/loader.js +701 -0
- package/dist/core/extensions/loader.js.map +1 -0
- package/dist/core/extensions/runner.d.ts +213 -0
- package/dist/core/extensions/runner.d.ts.map +1 -0
- package/dist/core/extensions/runner.js +1239 -0
- package/dist/core/extensions/runner.js.map +1 -0
- package/dist/core/extensions/types.d.ts +1720 -0
- package/dist/core/extensions/types.d.ts.map +1 -0
- package/dist/core/extensions/types.js +48 -0
- package/dist/core/extensions/types.js.map +1 -0
- package/dist/core/extensions/virtual-modules.d.ts +3 -0
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -0
- package/dist/core/extensions/virtual-modules.js +38 -0
- package/dist/core/extensions/virtual-modules.js.map +1 -0
- package/dist/core/extensions/wrapper.d.ts +20 -0
- package/dist/core/extensions/wrapper.d.ts.map +1 -0
- package/dist/core/extensions/wrapper.js +22 -0
- package/dist/core/extensions/wrapper.js.map +1 -0
- package/dist/core/footer-data-provider.d.ts +64 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -0
- package/dist/core/footer-data-provider.js +338 -0
- package/dist/core/footer-data-provider.js.map +1 -0
- package/dist/core/harness-core.d.ts +50 -0
- package/dist/core/harness-core.d.ts.map +1 -0
- package/dist/core/harness-core.js +240 -0
- package/dist/core/harness-core.js.map +1 -0
- package/dist/core/http-dispatcher.d.ts +22 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -0
- package/dist/core/http-dispatcher.js +98 -0
- package/dist/core/http-dispatcher.js.map +1 -0
- package/dist/core/index.d.ts +14 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +13 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/keybindings.d.ts +428 -0
- package/dist/core/keybindings.d.ts.map +1 -0
- package/dist/core/keybindings.js +321 -0
- package/dist/core/keybindings.js.map +1 -0
- package/dist/core/mcp-servers.d.ts +125 -0
- package/dist/core/mcp-servers.d.ts.map +1 -0
- package/dist/core/mcp-servers.js +198 -0
- package/dist/core/mcp-servers.js.map +1 -0
- package/dist/core/messages.d.ts +77 -0
- package/dist/core/messages.d.ts.map +1 -0
- package/dist/core/messages.js +124 -0
- package/dist/core/messages.js.map +1 -0
- package/dist/core/model-config.d.ts +759 -0
- package/dist/core/model-config.d.ts.map +1 -0
- package/dist/core/model-config.js +293 -0
- package/dist/core/model-config.js.map +1 -0
- package/dist/core/model-registry.d.ts +63 -0
- package/dist/core/model-registry.d.ts.map +1 -0
- package/dist/core/model-registry.js +144 -0
- package/dist/core/model-registry.js.map +1 -0
- package/dist/core/model-resolver.d.ts +124 -0
- package/dist/core/model-resolver.d.ts.map +1 -0
- package/dist/core/model-resolver.js +589 -0
- package/dist/core/model-resolver.js.map +1 -0
- package/dist/core/model-runtime.d.ts +142 -0
- package/dist/core/model-runtime.d.ts.map +1 -0
- package/dist/core/model-runtime.js +732 -0
- package/dist/core/model-runtime.js.map +1 -0
- package/dist/core/models-store.d.ts +22 -0
- package/dist/core/models-store.d.ts.map +1 -0
- package/dist/core/models-store.js +115 -0
- package/dist/core/models-store.js.map +1 -0
- package/dist/core/nested-tool-calls.d.ts +102 -0
- package/dist/core/nested-tool-calls.d.ts.map +1 -0
- package/dist/core/nested-tool-calls.js +178 -0
- package/dist/core/nested-tool-calls.js.map +1 -0
- package/dist/core/output-guard.d.ts +7 -0
- package/dist/core/output-guard.d.ts.map +1 -0
- package/dist/core/output-guard.js +89 -0
- package/dist/core/output-guard.js.map +1 -0
- package/dist/core/package-manager.d.ts +217 -0
- package/dist/core/package-manager.d.ts.map +1 -0
- package/dist/core/package-manager.js +2224 -0
- package/dist/core/package-manager.js.map +1 -0
- package/dist/core/project-trust.d.ts +15 -0
- package/dist/core/project-trust.d.ts.map +1 -0
- package/dist/core/project-trust.js +59 -0
- package/dist/core/project-trust.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +59 -0
- package/dist/core/prompt-templates.d.ts.map +1 -0
- package/dist/core/prompt-templates.js +262 -0
- package/dist/core/prompt-templates.js.map +1 -0
- package/dist/core/provider-attribution.d.ts +4 -0
- package/dist/core/provider-attribution.d.ts.map +1 -0
- package/dist/core/provider-attribution.js +72 -0
- package/dist/core/provider-attribution.js.map +1 -0
- package/dist/core/provider-composer.d.ts +80 -0
- package/dist/core/provider-composer.d.ts.map +1 -0
- package/dist/core/provider-composer.js +484 -0
- package/dist/core/provider-composer.js.map +1 -0
- package/dist/core/relay-manifest.d.ts +8 -0
- package/dist/core/relay-manifest.d.ts.map +1 -0
- package/dist/core/relay-manifest.js +26 -0
- package/dist/core/relay-manifest.js.map +1 -0
- package/dist/core/resolve-config-value.d.ts +30 -0
- package/dist/core/resolve-config-value.d.ts.map +1 -0
- package/dist/core/resolve-config-value.js +247 -0
- package/dist/core/resolve-config-value.js.map +1 -0
- package/dist/core/resource-loader.d.ts +227 -0
- package/dist/core/resource-loader.d.ts.map +1 -0
- package/dist/core/resource-loader.js +1005 -0
- package/dist/core/resource-loader.js.map +1 -0
- package/dist/core/runtime-credentials.d.ts +15 -0
- package/dist/core/runtime-credentials.d.ts.map +1 -0
- package/dist/core/runtime-credentials.js +39 -0
- package/dist/core/runtime-credentials.js.map +1 -0
- package/dist/core/sdk.d.ts +108 -0
- package/dist/core/sdk.d.ts.map +1 -0
- package/dist/core/sdk.js +315 -0
- package/dist/core/sdk.js.map +1 -0
- package/dist/core/session-cwd.d.ts +19 -0
- package/dist/core/session-cwd.d.ts.map +1 -0
- package/dist/core/session-cwd.js +38 -0
- package/dist/core/session-cwd.js.map +1 -0
- package/dist/core/session-export.d.ts +8 -0
- package/dist/core/session-export.d.ts.map +1 -0
- package/dist/core/session-export.js +33 -0
- package/dist/core/session-export.js.map +1 -0
- package/dist/core/session-manager.d.ts +416 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/session-manager.js +1523 -0
- package/dist/core/session-manager.js.map +1 -0
- package/dist/core/settings-diagnostics.d.ts +9 -0
- package/dist/core/settings-diagnostics.d.ts.map +1 -0
- package/dist/core/settings-diagnostics.js +21 -0
- package/dist/core/settings-diagnostics.js.map +1 -0
- package/dist/core/settings-manager.d.ts +423 -0
- package/dist/core/settings-manager.d.ts.map +1 -0
- package/dist/core/settings-manager.js +1120 -0
- package/dist/core/settings-manager.js.map +1 -0
- package/dist/core/skills.d.ts +60 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +408 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/slash-commands.d.ts +15 -0
- package/dist/core/slash-commands.d.ts.map +1 -0
- package/dist/core/slash-commands.js +29 -0
- package/dist/core/slash-commands.js.map +1 -0
- package/dist/core/source-info.d.ts +26 -0
- package/dist/core/source-info.d.ts.map +1 -0
- package/dist/core/source-info.js +35 -0
- package/dist/core/source-info.js.map +1 -0
- package/dist/core/system-prompt.d.ts +71 -0
- package/dist/core/system-prompt.d.ts.map +1 -0
- package/dist/core/system-prompt.js +147 -0
- package/dist/core/system-prompt.js.map +1 -0
- package/dist/core/telemetry.d.ts +3 -0
- package/dist/core/telemetry.d.ts.map +1 -0
- package/dist/core/telemetry.js +9 -0
- package/dist/core/telemetry.js.map +1 -0
- package/dist/core/timings.d.ts +10 -0
- package/dist/core/timings.d.ts.map +1 -0
- package/dist/core/timings.js +41 -0
- package/dist/core/timings.js.map +1 -0
- package/dist/core/tools/bash.d.ts +100 -0
- package/dist/core/tools/bash.d.ts.map +1 -0
- package/dist/core/tools/bash.js +333 -0
- package/dist/core/tools/bash.js.map +1 -0
- package/dist/core/tools/edit-diff.d.ts +101 -0
- package/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/dist/core/tools/edit-diff.js +421 -0
- package/dist/core/tools/edit-diff.js.map +1 -0
- package/dist/core/tools/edit.d.ts +44 -0
- package/dist/core/tools/edit.d.ts.map +1 -0
- package/dist/core/tools/edit.js +147 -0
- package/dist/core/tools/edit.js.map +1 -0
- package/dist/core/tools/file-mutation-queue.d.ts +6 -0
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
- package/dist/core/tools/file-mutation-queue.js +52 -0
- package/dist/core/tools/file-mutation-queue.js.map +1 -0
- package/dist/core/tools/find.d.ts +42 -0
- package/dist/core/tools/find.d.ts.map +1 -0
- package/dist/core/tools/find.js +251 -0
- package/dist/core/tools/find.js.map +1 -0
- package/dist/core/tools/grep.d.ts +41 -0
- package/dist/core/tools/grep.d.ts.map +1 -0
- package/dist/core/tools/grep.js +252 -0
- package/dist/core/tools/grep.js.map +1 -0
- package/dist/core/tools/index.d.ts +43 -0
- package/dist/core/tools/index.d.ts.map +1 -0
- package/dist/core/tools/index.js +129 -0
- package/dist/core/tools/index.js.map +1 -0
- package/dist/core/tools/ls.d.ts +41 -0
- package/dist/core/tools/ls.d.ts.map +1 -0
- package/dist/core/tools/ls.js +126 -0
- package/dist/core/tools/ls.js.map +1 -0
- package/dist/core/tools/output-accumulator.d.ts +63 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -0
- package/dist/core/tools/output-accumulator.js +214 -0
- package/dist/core/tools/output-accumulator.js.map +1 -0
- package/dist/core/tools/path-utils.d.ts +10 -0
- package/dist/core/tools/path-utils.d.ts.map +1 -0
- package/dist/core/tools/path-utils.js +99 -0
- package/dist/core/tools/path-utils.js.map +1 -0
- package/dist/core/tools/powershell.d.ts +16 -0
- package/dist/core/tools/powershell.d.ts.map +1 -0
- package/dist/core/tools/powershell.js +39 -0
- package/dist/core/tools/powershell.js.map +1 -0
- package/dist/core/tools/read.d.ts +42 -0
- package/dist/core/tools/read.d.ts.map +1 -0
- package/dist/core/tools/read.js +169 -0
- package/dist/core/tools/read.js.map +1 -0
- package/dist/core/tools/render-utils.d.ts +30 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -0
- package/dist/core/tools/render-utils.js +91 -0
- package/dist/core/tools/render-utils.js.map +1 -0
- package/dist/core/tools/renderers/bash.d.ts +12 -0
- package/dist/core/tools/renderers/bash.d.ts.map +1 -0
- package/dist/core/tools/renderers/bash.js +117 -0
- package/dist/core/tools/renderers/bash.js.map +1 -0
- package/dist/core/tools/renderers/edit.d.ts +23 -0
- package/dist/core/tools/renderers/edit.d.ts.map +1 -0
- package/dist/core/tools/renderers/edit.js +167 -0
- package/dist/core/tools/renderers/edit.js.map +1 -0
- package/dist/core/tools/renderers/find.d.ts +10 -0
- package/dist/core/tools/renderers/find.d.ts.map +1 -0
- package/dist/core/tools/renderers/find.js +64 -0
- package/dist/core/tools/renderers/find.js.map +1 -0
- package/dist/core/tools/renderers/grep.d.ts +10 -0
- package/dist/core/tools/renderers/grep.d.ts.map +1 -0
- package/dist/core/tools/renderers/grep.js +69 -0
- package/dist/core/tools/renderers/grep.js.map +1 -0
- package/dist/core/tools/renderers/index.d.ts +28 -0
- package/dist/core/tools/renderers/index.d.ts.map +1 -0
- package/dist/core/tools/renderers/index.js +47 -0
- package/dist/core/tools/renderers/index.js.map +1 -0
- package/dist/core/tools/renderers/ls.d.ts +10 -0
- package/dist/core/tools/renderers/ls.d.ts.map +1 -0
- package/dist/core/tools/renderers/ls.js +58 -0
- package/dist/core/tools/renderers/ls.js.map +1 -0
- package/dist/core/tools/renderers/read.d.ts +11 -0
- package/dist/core/tools/renderers/read.d.ts.map +1 -0
- package/dist/core/tools/renderers/read.js +130 -0
- package/dist/core/tools/renderers/read.js.map +1 -0
- package/dist/core/tools/renderers/write.d.ts +10 -0
- package/dist/core/tools/renderers/write.d.ts.map +1 -0
- package/dist/core/tools/renderers/write.js +153 -0
- package/dist/core/tools/renderers/write.js.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts +16 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.js +38 -0
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -0
- package/dist/core/tools/truncate.d.ts +84 -0
- package/dist/core/tools/truncate.d.ts.map +1 -0
- package/dist/core/tools/truncate.js +244 -0
- package/dist/core/tools/truncate.js.map +1 -0
- package/dist/core/tools/write.d.ts +30 -0
- package/dist/core/tools/write.d.ts.map +1 -0
- package/dist/core/tools/write.js +61 -0
- package/dist/core/tools/write.js.map +1 -0
- package/dist/core/trust-manager.d.ts +36 -0
- package/dist/core/trust-manager.d.ts.map +1 -0
- package/dist/core/trust-manager.js +204 -0
- package/dist/core/trust-manager.js.map +1 -0
- package/dist/core/usage-totals.d.ts +21 -0
- package/dist/core/usage-totals.d.ts.map +1 -0
- package/dist/core/usage-totals.js +79 -0
- package/dist/core/usage-totals.js.map +1 -0
- package/dist/core/virtual-models.d.ts +117 -0
- package/dist/core/virtual-models.d.ts.map +1 -0
- package/dist/core/virtual-models.js +124 -0
- package/dist/core/virtual-models.js.map +1 -0
- package/dist/core/workspace-probe.d.ts +8 -0
- package/dist/core/workspace-probe.d.ts.map +1 -0
- package/dist/core/workspace-probe.js +65 -0
- package/dist/core/workspace-probe.js.map +1 -0
- package/dist/extensions/codemode/execute.d.ts +16 -0
- package/dist/extensions/codemode/execute.d.ts.map +1 -0
- package/dist/extensions/codemode/execute.js +577 -0
- package/dist/extensions/codemode/execute.js.map +1 -0
- package/dist/extensions/codemode/execute.lazy.d.ts +3 -0
- package/dist/extensions/codemode/execute.lazy.d.ts.map +1 -0
- package/dist/extensions/codemode/execute.lazy.js +3 -0
- package/dist/extensions/codemode/execute.lazy.js.map +1 -0
- package/dist/extensions/codemode/index.d.ts +21 -0
- package/dist/extensions/codemode/index.d.ts.map +1 -0
- package/dist/extensions/codemode/index.js +31 -0
- package/dist/extensions/codemode/index.js.map +1 -0
- package/dist/extensions/codemode/renderer.d.ts +12 -0
- package/dist/extensions/codemode/renderer.d.ts.map +1 -0
- package/dist/extensions/codemode/renderer.js +137 -0
- package/dist/extensions/codemode/renderer.js.map +1 -0
- package/dist/extensions/codemode/tool.d.ts +123 -0
- package/dist/extensions/codemode/tool.d.ts.map +1 -0
- package/dist/extensions/codemode/tool.js +268 -0
- package/dist/extensions/codemode/tool.js.map +1 -0
- package/dist/extensions/codemode/worker.d.ts +7 -0
- package/dist/extensions/codemode/worker.d.ts.map +1 -0
- package/dist/extensions/codemode/worker.js +7 -0
- package/dist/extensions/codemode/worker.js.map +1 -0
- package/dist/extensions/index.d.ts +3 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/index.js +19 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/intake/docx.d.ts +42 -0
- package/dist/extensions/intake/docx.d.ts.map +1 -0
- package/dist/extensions/intake/docx.js +148 -0
- package/dist/extensions/intake/docx.js.map +1 -0
- package/dist/extensions/intake/index.d.ts +17 -0
- package/dist/extensions/intake/index.d.ts.map +1 -0
- package/dist/extensions/intake/index.js +88 -0
- package/dist/extensions/intake/index.js.map +1 -0
- package/dist/extensions/intake/prompt.d.ts +6 -0
- package/dist/extensions/intake/prompt.d.ts.map +1 -0
- package/dist/extensions/intake/prompt.js +41 -0
- package/dist/extensions/intake/prompt.js.map +1 -0
- package/dist/extensions/intake/questionnaire.d.ts +84 -0
- package/dist/extensions/intake/questionnaire.d.ts.map +1 -0
- package/dist/extensions/intake/questionnaire.js +472 -0
- package/dist/extensions/intake/questionnaire.js.map +1 -0
- package/dist/extensions/laya/assessment.d.ts +40 -0
- package/dist/extensions/laya/assessment.d.ts.map +1 -0
- package/dist/extensions/laya/assessment.js +191 -0
- package/dist/extensions/laya/assessment.js.map +1 -0
- package/dist/extensions/laya/docker.d.ts +19 -0
- package/dist/extensions/laya/docker.d.ts.map +1 -0
- package/dist/extensions/laya/docker.js +44 -0
- package/dist/extensions/laya/docker.js.map +1 -0
- package/dist/extensions/laya/index.d.ts +43 -0
- package/dist/extensions/laya/index.d.ts.map +1 -0
- package/dist/extensions/laya/index.js +780 -0
- package/dist/extensions/laya/index.js.map +1 -0
- package/dist/extensions/laya/learn.d.ts +67 -0
- package/dist/extensions/laya/learn.d.ts.map +1 -0
- package/dist/extensions/laya/learn.js +263 -0
- package/dist/extensions/laya/learn.js.map +1 -0
- package/dist/extensions/laya/memory.d.ts +48 -0
- package/dist/extensions/laya/memory.d.ts.map +1 -0
- package/dist/extensions/laya/memory.js +107 -0
- package/dist/extensions/laya/memory.js.map +1 -0
- package/dist/extensions/laya/model-manifest.d.ts +7 -0
- package/dist/extensions/laya/model-manifest.d.ts.map +1 -0
- package/dist/extensions/laya/model-manifest.js +48 -0
- package/dist/extensions/laya/model-manifest.js.map +1 -0
- package/dist/extensions/laya/policy.d.ts +130 -0
- package/dist/extensions/laya/policy.d.ts.map +1 -0
- package/dist/extensions/laya/policy.js +222 -0
- package/dist/extensions/laya/policy.js.map +1 -0
- package/dist/extensions/laya/questions.d.ts +60 -0
- package/dist/extensions/laya/questions.d.ts.map +1 -0
- package/dist/extensions/laya/questions.js +189 -0
- package/dist/extensions/laya/questions.js.map +1 -0
- package/dist/extensions/laya/routers.d.ts +25 -0
- package/dist/extensions/laya/routers.d.ts.map +1 -0
- package/dist/extensions/laya/routers.js +121 -0
- package/dist/extensions/laya/routers.js.map +1 -0
- package/dist/extensions/laya/runtime.d.ts +58 -0
- package/dist/extensions/laya/runtime.d.ts.map +1 -0
- package/dist/extensions/laya/runtime.js +127 -0
- package/dist/extensions/laya/runtime.js.map +1 -0
- package/dist/extensions/laya/seed.d.ts +39 -0
- package/dist/extensions/laya/seed.d.ts.map +1 -0
- package/dist/extensions/laya/seed.js +358 -0
- package/dist/extensions/laya/seed.js.map +1 -0
- package/dist/extensions/laya/server.d.ts +50 -0
- package/dist/extensions/laya/server.d.ts.map +1 -0
- package/dist/extensions/laya/server.js +251 -0
- package/dist/extensions/laya/server.js.map +1 -0
- package/dist/extensions/laya/telemetry.d.ts +94 -0
- package/dist/extensions/laya/telemetry.d.ts.map +1 -0
- package/dist/extensions/laya/telemetry.js +107 -0
- package/dist/extensions/laya/telemetry.js.map +1 -0
- package/dist/extensions/laya/train-script.d.ts +8 -0
- package/dist/extensions/laya/train-script.d.ts.map +1 -0
- package/dist/extensions/laya/train-script.js +422 -0
- package/dist/extensions/laya/train-script.js.map +1 -0
- package/dist/extensions/laya/training.d.ts +176 -0
- package/dist/extensions/laya/training.d.ts.map +1 -0
- package/dist/extensions/laya/training.js +337 -0
- package/dist/extensions/laya/training.js.map +1 -0
- package/dist/extensions/llama/client.d.ts +69 -0
- package/dist/extensions/llama/client.d.ts.map +1 -0
- package/dist/extensions/llama/client.js +313 -0
- package/dist/extensions/llama/client.js.map +1 -0
- package/dist/extensions/llama/huggingface.d.ts +23 -0
- package/dist/extensions/llama/huggingface.d.ts.map +1 -0
- package/dist/extensions/llama/huggingface.js +141 -0
- package/dist/extensions/llama/huggingface.js.map +1 -0
- package/dist/extensions/llama/index.d.ts +3 -0
- package/dist/extensions/llama/index.d.ts.map +1 -0
- package/dist/extensions/llama/index.js +219 -0
- package/dist/extensions/llama/index.js.map +1 -0
- package/dist/extensions/llama/provider.d.ts +12 -0
- package/dist/extensions/llama/provider.d.ts.map +1 -0
- package/dist/extensions/llama/provider.js +213 -0
- package/dist/extensions/llama/provider.js.map +1 -0
- package/dist/extensions/llama/ui.d.ts +42 -0
- package/dist/extensions/llama/ui.d.ts.map +1 -0
- package/dist/extensions/llama/ui.js +416 -0
- package/dist/extensions/llama/ui.js.map +1 -0
- package/dist/extensions/mcp/cli.d.ts +21 -0
- package/dist/extensions/mcp/cli.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.js +503 -0
- package/dist/extensions/mcp/cli.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.d.ts +3 -0
- package/dist/extensions/mcp/cli.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.lazy.js +3 -0
- package/dist/extensions/mcp/cli.lazy.js.map +1 -0
- package/dist/extensions/mcp/config.d.ts +84 -0
- package/dist/extensions/mcp/config.d.ts.map +1 -0
- package/dist/extensions/mcp/config.js +194 -0
- package/dist/extensions/mcp/config.js.map +1 -0
- package/dist/extensions/mcp/index.d.ts +79 -0
- package/dist/extensions/mcp/index.d.ts.map +1 -0
- package/dist/extensions/mcp/index.js +1101 -0
- package/dist/extensions/mcp/index.js.map +1 -0
- package/dist/extensions/mcp/log.d.ts +16 -0
- package/dist/extensions/mcp/log.d.ts.map +1 -0
- package/dist/extensions/mcp/log.js +66 -0
- package/dist/extensions/mcp/log.js.map +1 -0
- package/dist/extensions/mcp/oauth.d.ts +98 -0
- package/dist/extensions/mcp/oauth.d.ts.map +1 -0
- package/dist/extensions/mcp/oauth.js +366 -0
- package/dist/extensions/mcp/oauth.js.map +1 -0
- package/dist/extensions/mcp/resources.d.ts +43 -0
- package/dist/extensions/mcp/resources.d.ts.map +1 -0
- package/dist/extensions/mcp/resources.js +262 -0
- package/dist/extensions/mcp/resources.js.map +1 -0
- package/dist/extensions/mcp/runtime.d.ts +98 -0
- package/dist/extensions/mcp/runtime.d.ts.map +1 -0
- package/dist/extensions/mcp/runtime.js +395 -0
- package/dist/extensions/mcp/runtime.js.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts +3 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.js +3 -0
- package/dist/extensions/mcp/runtime.lazy.js.map +1 -0
- package/dist/extensions/mcp/tools.d.ts +86 -0
- package/dist/extensions/mcp/tools.d.ts.map +1 -0
- package/dist/extensions/mcp/tools.js +252 -0
- package/dist/extensions/mcp/tools.js.map +1 -0
- package/dist/extensions/mcp/ui.d.ts +60 -0
- package/dist/extensions/mcp/ui.d.ts.map +1 -0
- package/dist/extensions/mcp/ui.js +178 -0
- package/dist/extensions/mcp/ui.js.map +1 -0
- package/dist/extensions/tool-search/index.d.ts +12 -0
- package/dist/extensions/tool-search/index.d.ts.map +1 -0
- package/dist/extensions/tool-search/index.js +15 -0
- package/dist/extensions/tool-search/index.js.map +1 -0
- package/dist/extensions/tool-search/tool.d.ts +73 -0
- package/dist/extensions/tool-search/tool.d.ts.map +1 -0
- package/dist/extensions/tool-search/tool.js +189 -0
- package/dist/extensions/tool-search/tool.js.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +16 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +820 -0
- package/dist/main.js.map +1 -0
- package/dist/migrations.d.ts +33 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +282 -0
- package/dist/migrations.js.map +1 -0
- package/dist/modes/index.d.ts +10 -0
- package/dist/modes/index.d.ts.map +1 -0
- package/dist/modes/index.js +8 -0
- package/dist/modes/index.js.map +1 -0
- package/dist/modes/interactive/assets/clankolas.png +0 -0
- package/dist/modes/interactive/bug-report.d.ts +16 -0
- package/dist/modes/interactive/bug-report.d.ts.map +1 -0
- package/dist/modes/interactive/bug-report.js +171 -0
- package/dist/modes/interactive/bug-report.js.map +1 -0
- package/dist/modes/interactive/chat-viewport.d.ts +20 -0
- package/dist/modes/interactive/chat-viewport.d.ts.map +1 -0
- package/dist/modes/interactive/chat-viewport.js +28 -0
- package/dist/modes/interactive/chat-viewport.js.map +1 -0
- package/dist/modes/interactive/components/armin.d.ts +37 -0
- package/dist/modes/interactive/components/armin.d.ts.map +1 -0
- package/dist/modes/interactive/components/armin.js +335 -0
- package/dist/modes/interactive/components/armin.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +26 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/assistant-message.js +158 -0
- package/dist/modes/interactive/components/assistant-message.js.map +1 -0
- package/dist/modes/interactive/components/auth-url.d.ts +14 -0
- package/dist/modes/interactive/components/auth-url.d.ts.map +1 -0
- package/dist/modes/interactive/components/auth-url.js +37 -0
- package/dist/modes/interactive/components/auth-url.js.map +1 -0
- package/dist/modes/interactive/components/bash-execution.d.ts +34 -0
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/bash-execution.js +175 -0
- package/dist/modes/interactive/components/bash-execution.js.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.js +54 -0
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.js +51 -0
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.js +52 -0
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/config-selector.d.ts +102 -0
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/config-selector.js +772 -0
- package/dist/modes/interactive/components/config-selector.js.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.js +33 -0
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -0
- package/dist/modes/interactive/components/custom-editor.d.ts +30 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-editor.js +115 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -0
- package/dist/modes/interactive/components/custom-entry.d.ts +19 -0
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-entry.js +52 -0
- package/dist/modes/interactive/components/custom-entry.js.map +1 -0
- package/dist/modes/interactive/components/custom-message.d.ts +22 -0
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-message.js +87 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -0
- package/dist/modes/interactive/components/diff.d.ts +12 -0
- package/dist/modes/interactive/components/diff.d.ts.map +1 -0
- package/dist/modes/interactive/components/diff.js +133 -0
- package/dist/modes/interactive/components/diff.js.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.js +21 -0
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -0
- package/dist/modes/interactive/components/earendil-announcement.d.ts +5 -0
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -0
- package/dist/modes/interactive/components/earendil-announcement.js +40 -0
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.d.ts +104 -0
- package/dist/modes/interactive/components/easter-egg-3d.d.ts.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.js +1141 -0
- package/dist/modes/interactive/components/easter-egg-3d.js.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.d.ts +6 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.d.ts.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.js +23 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.js.map +1 -0
- package/dist/modes/interactive/components/extension-editor.d.ts +24 -0
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-editor.js +103 -0
- package/dist/modes/interactive/components/extension-editor.js.map +1 -0
- package/dist/modes/interactive/components/extension-input.d.ts +25 -0
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-input.js +67 -0
- package/dist/modes/interactive/components/extension-input.js.map +1 -0
- package/dist/modes/interactive/components/extension-selector.d.ts +27 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-selector.js +87 -0
- package/dist/modes/interactive/components/extension-selector.js.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.js +109 -0
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts +39 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/dist/modes/interactive/components/footer.js +265 -0
- package/dist/modes/interactive/components/footer.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +33 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/dist/modes/interactive/components/index.js +34 -0
- package/dist/modes/interactive/components/index.js.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts +13 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.js +36 -0
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/dist/modes/interactive/components/login-dialog.d.ts +54 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/dist/modes/interactive/components/login-dialog.js +194 -0
- package/dist/modes/interactive/components/login-dialog.js.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.js +19 -0
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
- package/dist/modes/interactive/components/mermaid.d.ts +11 -0
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -0
- package/dist/modes/interactive/components/mermaid.js +75 -0
- package/dist/modes/interactive/components/mermaid.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +60 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/model-selector.js +361 -0
- package/dist/modes/interactive/components/model-selector.js.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts +39 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.js +166 -0
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -0
- package/dist/modes/interactive/components/relay-logo.d.ts +22 -0
- package/dist/modes/interactive/components/relay-logo.d.ts.map +1 -0
- package/dist/modes/interactive/components/relay-logo.js +63 -0
- package/dist/modes/interactive/components/relay-logo.js.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +46 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.js +326 -0
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.js +155 -0
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -0
- package/dist/modes/interactive/components/session-selector.d.ts +95 -0
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector.js +893 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +96 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-selector.js +742 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-submenu.js +165 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.js +39 -0
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.js +54 -0
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/dist/modes/interactive/components/status-indicator.d.ts +30 -0
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -0
- package/dist/modes/interactive/components/status-indicator.js +67 -0
- package/dist/modes/interactive/components/status-indicator.js.map +1 -0
- package/dist/modes/interactive/components/theme-selector.d.ts +11 -0
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/theme-selector.js +50 -0
- package/dist/modes/interactive/components/theme-selector.js.map +1 -0
- package/dist/modes/interactive/components/themed-text.d.ts +17 -0
- package/dist/modes/interactive/components/themed-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/themed-text.js +29 -0
- package/dist/modes/interactive/components/themed-text.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +23 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.js +109 -0
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +68 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution.js +314 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts +94 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/tree-selector.js +1254 -0
- package/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/trust-selector.js +91 -0
- package/dist/modes/interactive/components/trust-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.js +114 -0
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message.d.ts +16 -0
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message.js +50 -0
- package/dist/modes/interactive/components/user-message.js.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts +48 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.js +66 -0
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -0
- package/dist/modes/interactive/external-editor.d.ts +12 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -0
- package/dist/modes/interactive/external-editor.js +38 -0
- package/dist/modes/interactive/external-editor.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +482 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-mode.js +5861 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.js +34 -0
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
- package/dist/modes/interactive/model-search.d.ts +12 -0
- package/dist/modes/interactive/model-search.d.ts.map +1 -0
- package/dist/modes/interactive/model-search.js +15 -0
- package/dist/modes/interactive/model-search.js.map +1 -0
- package/dist/modes/interactive/session-share.d.ts +16 -0
- package/dist/modes/interactive/session-share.d.ts.map +1 -0
- package/dist/modes/interactive/session-share.js +119 -0
- package/dist/modes/interactive/session-share.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +78 -0
- package/dist/modes/interactive/theme/light.json +78 -0
- package/dist/modes/interactive/theme/system-theme.d.ts +55 -0
- package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/system-theme.js +546 -0
- package/dist/modes/interactive/theme/system-theme.js.map +1 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +81 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-controller.js +210 -0
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -0
- package/dist/modes/interactive/theme/theme-json.d.ts +85 -0
- package/dist/modes/interactive/theme/theme-json.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-json.js +132 -0
- package/dist/modes/interactive/theme/theme-json.js.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.json +361 -0
- package/dist/modes/interactive/theme/theme.d.ts +158 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme.js +912 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -0
- package/dist/modes/interactive/tui-renderer.d.ts +22 -0
- package/dist/modes/interactive/tui-renderer.d.ts.map +1 -0
- package/dist/modes/interactive/tui-renderer.js +67 -0
- package/dist/modes/interactive/tui-renderer.js.map +1 -0
- package/dist/modes/json-event.d.ts +34 -0
- package/dist/modes/json-event.d.ts.map +1 -0
- package/dist/modes/json-event.js +29 -0
- package/dist/modes/json-event.js.map +1 -0
- package/dist/modes/print-mode.d.ts +28 -0
- package/dist/modes/print-mode.d.ts.map +1 -0
- package/dist/modes/print-mode.js +142 -0
- package/dist/modes/print-mode.js.map +1 -0
- package/dist/modes/rpc/jsonl.d.ts +17 -0
- package/dist/modes/rpc/jsonl.d.ts.map +1 -0
- package/dist/modes/rpc/jsonl.js +49 -0
- package/dist/modes/rpc/jsonl.js.map +1 -0
- package/dist/modes/rpc/rpc-client.d.ts +254 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client.js +499 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -0
- package/dist/modes/rpc/rpc-mode.d.ts +20 -0
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-mode.js +655 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/dist/modes/rpc/rpc-types.d.ts +478 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-types.js +8 -0
- package/dist/modes/rpc/rpc-types.js.map +1 -0
- package/dist/package-manager-cli.d.ts +8 -0
- package/dist/package-manager-cli.d.ts.map +1 -0
- package/dist/package-manager-cli.js +524 -0
- package/dist/package-manager-cli.js.map +1 -0
- package/dist/rpc-entry.d.ts +3 -0
- package/dist/rpc-entry.d.ts.map +1 -0
- package/dist/rpc-entry.js +11 -0
- package/dist/rpc-entry.js.map +1 -0
- package/dist/utils/abort.d.ts +5 -0
- package/dist/utils/abort.d.ts.map +1 -0
- package/dist/utils/abort.js +48 -0
- package/dist/utils/abort.js.map +1 -0
- package/dist/utils/ansi.d.ts +2 -0
- package/dist/utils/ansi.d.ts.map +1 -0
- package/dist/utils/ansi.js +52 -0
- package/dist/utils/ansi.js.map +1 -0
- package/dist/utils/changelog.d.ts +22 -0
- package/dist/utils/changelog.d.ts.map +1 -0
- package/dist/utils/changelog.js +176 -0
- package/dist/utils/changelog.js.map +1 -0
- package/dist/utils/child-process.d.ts +18 -0
- package/dist/utils/child-process.d.ts.map +1 -0
- package/dist/utils/child-process.js +106 -0
- package/dist/utils/child-process.js.map +1 -0
- package/dist/utils/clipboard-command.d.ts +7 -0
- package/dist/utils/clipboard-command.d.ts.map +1 -0
- package/dist/utils/clipboard-command.js +45 -0
- package/dist/utils/clipboard-command.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts +11 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -0
- package/dist/utils/clipboard-image.js +214 -0
- package/dist/utils/clipboard-image.js.map +1 -0
- package/dist/utils/clipboard.d.ts +6 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/clipboard.js +156 -0
- package/dist/utils/clipboard.js.map +1 -0
- package/dist/utils/deprecation.d.ts +4 -0
- package/dist/utils/deprecation.d.ts.map +1 -0
- package/dist/utils/deprecation.js +13 -0
- package/dist/utils/deprecation.js.map +1 -0
- package/dist/utils/exif-orientation.d.ts +5 -0
- package/dist/utils/exif-orientation.d.ts.map +1 -0
- package/dist/utils/exif-orientation.js +157 -0
- package/dist/utils/exif-orientation.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +8 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +27 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/fs-watch.d.ts +5 -0
- package/dist/utils/fs-watch.d.ts.map +1 -0
- package/dist/utils/fs-watch.js +25 -0
- package/dist/utils/fs-watch.js.map +1 -0
- package/dist/utils/git.d.ts +26 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +195 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/html.d.ts +7 -0
- package/dist/utils/html.d.ts.map +1 -0
- package/dist/utils/html.js +40 -0
- package/dist/utils/html.js.map +1 -0
- package/dist/utils/image-convert.d.ts +22 -0
- package/dist/utils/image-convert.d.ts.map +1 -0
- package/dist/utils/image-convert.js +84 -0
- package/dist/utils/image-convert.js.map +1 -0
- package/dist/utils/image-process.d.ts +18 -0
- package/dist/utils/image-process.d.ts.map +1 -0
- package/dist/utils/image-process.js +83 -0
- package/dist/utils/image-process.js.map +1 -0
- package/dist/utils/image-resize-core.d.ts +30 -0
- package/dist/utils/image-resize-core.d.ts.map +1 -0
- package/dist/utils/image-resize-core.js +124 -0
- package/dist/utils/image-resize-core.js.map +1 -0
- package/dist/utils/image-resize-worker.d.ts +2 -0
- package/dist/utils/image-resize-worker.d.ts.map +1 -0
- package/dist/utils/image-resize-worker.js +31 -0
- package/dist/utils/image-resize-worker.js.map +1 -0
- package/dist/utils/image-resize.d.ts +16 -0
- package/dist/utils/image-resize.d.ts.map +1 -0
- package/dist/utils/image-resize.js +97 -0
- package/dist/utils/image-resize.js.map +1 -0
- package/dist/utils/json.d.ts +3 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +7 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/management-http.d.ts +25 -0
- package/dist/utils/management-http.d.ts.map +1 -0
- package/dist/utils/management-http.js +54 -0
- package/dist/utils/management-http.js.map +1 -0
- package/dist/utils/mime.d.ts +3 -0
- package/dist/utils/mime.d.ts.map +1 -0
- package/dist/utils/mime.js +110 -0
- package/dist/utils/mime.js.map +1 -0
- package/dist/utils/open-browser.d.ts +9 -0
- package/dist/utils/open-browser.d.ts.map +1 -0
- package/dist/utils/open-browser.js +22 -0
- package/dist/utils/open-browser.js.map +1 -0
- package/dist/utils/output-files.d.ts +15 -0
- package/dist/utils/output-files.d.ts.map +1 -0
- package/dist/utils/output-files.js +30 -0
- package/dist/utils/output-files.js.map +1 -0
- package/dist/utils/paths.d.ts +34 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +115 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/photon.d.ts +21 -0
- package/dist/utils/photon.d.ts.map +1 -0
- package/dist/utils/photon.js +121 -0
- package/dist/utils/photon.js.map +1 -0
- package/dist/utils/relay-user-agent.d.ts +2 -0
- package/dist/utils/relay-user-agent.d.ts.map +1 -0
- package/dist/utils/relay-user-agent.js +5 -0
- package/dist/utils/relay-user-agent.js.map +1 -0
- package/dist/utils/shell.d.ts +32 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +189 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +17 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/syntax-highlight.d.ts +13 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -0
- package/dist/utils/syntax-highlight.js +179 -0
- package/dist/utils/syntax-highlight.js.map +1 -0
- package/dist/utils/text.d.ts +8 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +9 -0
- package/dist/utils/text.js.map +1 -0
- package/dist/utils/tool-result-images.d.ts +21 -0
- package/dist/utils/tool-result-images.d.ts.map +1 -0
- package/dist/utils/tool-result-images.js +48 -0
- package/dist/utils/tool-result-images.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +13 -0
- package/dist/utils/tools-manager.d.ts.map +1 -0
- package/dist/utils/tools-manager.js +343 -0
- package/dist/utils/tools-manager.js.map +1 -0
- package/dist/utils/version-check.d.ts +17 -0
- package/dist/utils/version-check.d.ts.map +1 -0
- package/dist/utils/version-check.js +78 -0
- package/dist/utils/version-check.js.map +1 -0
- package/dist/utils/wsl.d.ts +3 -0
- package/dist/utils/wsl.d.ts.map +1 -0
- package/dist/utils/wsl.js +15 -0
- package/dist/utils/wsl.js.map +1 -0
- package/dist/utils/zip.d.ts +7 -0
- package/dist/utils/zip.d.ts.map +1 -0
- package/dist/utils/zip.js +60 -0
- package/dist/utils/zip.js.map +1 -0
- package/docs/cli-integration.md +106 -0
- package/docs/cli.md +316 -0
- package/docs/codemode.md +207 -0
- package/docs/compaction.md +463 -0
- package/docs/configuration.md +47 -0
- package/docs/containerization.md +154 -0
- package/docs/custom-provider.md +173 -0
- package/docs/docs.json +224 -0
- package/docs/environment-variables.md +97 -0
- package/docs/extensions.md +274 -0
- package/docs/harness-core.md +99 -0
- package/docs/how-relay-works.md +49 -0
- package/docs/images/doom-extension.png +0 -0
- package/docs/images/exy.png +0 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/images/tree-view.png +0 -0
- package/docs/index.md +39 -0
- package/docs/intake.md +40 -0
- package/docs/json.md +226 -0
- package/docs/keybindings.md +194 -0
- package/docs/laya.md +152 -0
- package/docs/llama-cpp.md +114 -0
- package/docs/mcp.md +258 -0
- package/docs/message-types.md +261 -0
- package/docs/models.md +205 -0
- package/docs/packages.md +129 -0
- package/docs/prompt-templates.md +59 -0
- package/docs/providers.md +187 -0
- package/docs/quickstart.md +139 -0
- package/docs/rpc-commands.md +860 -0
- package/docs/rpc-extension-ui.md +200 -0
- package/docs/rpc.md +193 -0
- package/docs/sdk.md +147 -0
- package/docs/security.md +99 -0
- package/docs/session-format.md +293 -0
- package/docs/sessions.md +66 -0
- package/docs/settings.md +206 -0
- package/docs/shell-aliases.md +93 -0
- package/docs/skills.md +93 -0
- package/docs/slash-commands.md +61 -0
- package/docs/terminal-setup.md +219 -0
- package/docs/termux.md +121 -0
- package/docs/themes.md +136 -0
- package/docs/tmux.md +55 -0
- package/docs/tui.md +125 -0
- package/docs/usage.md +94 -0
- package/docs/virtual-models.md +114 -0
- package/docs/windows.md +67 -0
- package/examples/README.md +39 -0
- package/examples/extensions/README.md +213 -0
- package/examples/extensions/auto-commit-on-exit.ts +49 -0
- package/examples/extensions/bash-spawn-hook.ts +30 -0
- package/examples/extensions/bookmark.ts +50 -0
- package/examples/extensions/border-status-editor.ts +150 -0
- package/examples/extensions/built-in-tool-renderer.ts +225 -0
- package/examples/extensions/claude-rules.ts +86 -0
- package/examples/extensions/commands.ts +72 -0
- package/examples/extensions/confirm-destructive.ts +59 -0
- package/examples/extensions/custom-compaction.ts +117 -0
- package/examples/extensions/custom-footer.ts +64 -0
- package/examples/extensions/custom-header.ts +73 -0
- package/examples/extensions/custom-provider-anthropic/index.ts +617 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
- package/examples/extensions/custom-provider-anthropic/package.json +19 -0
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +405 -0
- package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
- package/examples/extensions/debug-provider.ts +90 -0
- package/examples/extensions/dirty-repo-guard.ts +56 -0
- package/examples/extensions/doom-overlay/README.md +46 -0
- package/examples/extensions/doom-overlay/doom/build/doom.js +21 -0
- package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
- package/examples/extensions/doom-overlay/doom/build.sh +152 -0
- package/examples/extensions/doom-overlay/doom/doomgeneric_relay.c +72 -0
- package/examples/extensions/doom-overlay/doom-component.ts +132 -0
- package/examples/extensions/doom-overlay/doom-engine.ts +173 -0
- package/examples/extensions/doom-overlay/doom-keys.ts +104 -0
- package/examples/extensions/doom-overlay/index.ts +74 -0
- package/examples/extensions/doom-overlay/wad-finder.ts +55 -0
- package/examples/extensions/dynamic-resources/SKILL.md +8 -0
- package/examples/extensions/dynamic-resources/dynamic.json +81 -0
- package/examples/extensions/dynamic-resources/dynamic.md +5 -0
- package/examples/extensions/dynamic-resources/index.ts +15 -0
- package/examples/extensions/dynamic-tools.ts +74 -0
- package/examples/extensions/entry-renderer.ts +41 -0
- package/examples/extensions/event-bus.ts +43 -0
- package/examples/extensions/file-trigger.ts +41 -0
- package/examples/extensions/git-checkpoint.ts +53 -0
- package/examples/extensions/git-merge-and-resolve.ts +115 -0
- package/examples/extensions/github-issue-autocomplete.ts +185 -0
- package/examples/extensions/handoff.ts +190 -0
- package/examples/extensions/hello.ts +26 -0
- package/examples/extensions/hidden-thinking-label.ts +53 -0
- package/examples/extensions/inline-bash.ts +94 -0
- package/examples/extensions/input-transform-streaming.ts +39 -0
- package/examples/extensions/input-transform.ts +43 -0
- package/examples/extensions/interactive-shell.ts +196 -0
- package/examples/extensions/jev-router.ts +113 -0
- package/examples/extensions/mac-system-theme.ts +47 -0
- package/examples/extensions/message-renderer.ts +59 -0
- package/examples/extensions/minimal-mode.ts +354 -0
- package/examples/extensions/modal-editor.ts +85 -0
- package/examples/extensions/model-status.ts +31 -0
- package/examples/extensions/notify.ts +57 -0
- package/examples/extensions/overlay-qa-tests.ts +1450 -0
- package/examples/extensions/overlay-test.ts +153 -0
- package/examples/extensions/permission-gate.ts +34 -0
- package/examples/extensions/pirate.ts +47 -0
- package/examples/extensions/plan-mode/README.md +66 -0
- package/examples/extensions/plan-mode/index.ts +390 -0
- package/examples/extensions/plan-mode/utils.ts +168 -0
- package/examples/extensions/preset.ts +436 -0
- package/examples/extensions/project-trust.ts +64 -0
- package/examples/extensions/prompt-customizer.ts +49 -0
- package/examples/extensions/protected-paths.ts +30 -0
- package/examples/extensions/provider-payload.ts +18 -0
- package/examples/extensions/qna.ts +118 -0
- package/examples/extensions/question.ts +278 -0
- package/examples/extensions/questionnaire.ts +440 -0
- package/examples/extensions/rainbow-editor.ts +88 -0
- package/examples/extensions/reload-runtime.ts +37 -0
- package/examples/extensions/rpc-demo.ts +118 -0
- package/examples/extensions/sandbox/index.ts +321 -0
- package/examples/extensions/sandbox/package-lock.json +92 -0
- package/examples/extensions/sandbox/package.json +19 -0
- package/examples/extensions/send-user-message.ts +97 -0
- package/examples/extensions/session-name.ts +27 -0
- package/examples/extensions/shutdown-command.ts +63 -0
- package/examples/extensions/snake.ts +343 -0
- package/examples/extensions/space-invaders.ts +560 -0
- package/examples/extensions/ssh.ts +220 -0
- package/examples/extensions/status-line.ts +32 -0
- package/examples/extensions/structured-output.ts +65 -0
- package/examples/extensions/subagent/README.md +196 -0
- package/examples/extensions/subagent/agents/planner.md +37 -0
- package/examples/extensions/subagent/agents/reviewer.md +35 -0
- package/examples/extensions/subagent/agents/scout.md +50 -0
- package/examples/extensions/subagent/agents/security-auditor.md +20 -0
- package/examples/extensions/subagent/agents/verifier.md +31 -0
- package/examples/extensions/subagent/agents/worker.md +24 -0
- package/examples/extensions/subagent/agents.ts +157 -0
- package/examples/extensions/subagent/index.ts +1038 -0
- package/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
- package/examples/extensions/subagent/prompts/implement-and-verify.md +10 -0
- package/examples/extensions/subagent/prompts/implement.md +10 -0
- package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
- package/examples/extensions/subagent/skills/delegate/SKILL.md +48 -0
- package/examples/extensions/subagent/skills/security-audit/SKILL.md +108 -0
- package/examples/extensions/subagent/skills/security-audit/references/categories.md +130 -0
- package/examples/extensions/subagent/skills/security-audit/references/report.md +38 -0
- package/examples/extensions/summarize.ts +199 -0
- package/examples/extensions/system-prompt-header.ts +17 -0
- package/examples/extensions/tic-tac-toe.ts +1008 -0
- package/examples/extensions/timed-confirm.ts +70 -0
- package/examples/extensions/titlebar-spinner.ts +58 -0
- package/examples/extensions/todo.ts +297 -0
- package/examples/extensions/tool-override.ts +144 -0
- package/examples/extensions/tools.ts +146 -0
- package/examples/extensions/trigger-compact.ts +50 -0
- package/examples/extensions/truncated-tool.ts +195 -0
- package/examples/extensions/widget-placement.ts +9 -0
- package/examples/extensions/with-deps/index.ts +32 -0
- package/examples/extensions/with-deps/package-lock.json +31 -0
- package/examples/extensions/with-deps/package.json +22 -0
- package/examples/extensions/working-indicator.ts +123 -0
- package/examples/extensions/working-message-test.ts +25 -0
- package/examples/plugins/relay-example-plugin/README.md +38 -0
- package/examples/plugins/relay-example-plugin/package.json +10 -0
- package/examples/plugins/relay-example-plugin/src/contract.ts +13 -0
- package/examples/plugins/relay-example-plugin/src/session.ts +24 -0
- package/examples/plugins/relay-example-plugin/src/tui.ts +31 -0
- package/examples/rpc-client.ts +35 -0
- package/examples/rpc-extension-ui.ts +661 -0
- package/examples/sdk/01-minimal.ts +26 -0
- package/examples/sdk/02-custom-model.ts +49 -0
- package/examples/sdk/03-custom-prompt.ts +70 -0
- package/examples/sdk/04-skills.ts +55 -0
- package/examples/sdk/05-tools.ts +48 -0
- package/examples/sdk/06-extensions.ts +94 -0
- package/examples/sdk/07-context-files.ts +42 -0
- package/examples/sdk/08-prompt-templates.ts +51 -0
- package/examples/sdk/09-api-keys-and-oauth.ts +34 -0
- package/examples/sdk/10-settings.ts +53 -0
- package/examples/sdk/11-sessions.ts +52 -0
- package/examples/sdk/12-full-control.ts +74 -0
- package/examples/sdk/13-session-runtime.ts +67 -0
- package/examples/sdk/14-codemode-mcp.ts +61 -0
- package/examples/sdk/README.md +141 -0
- package/package.json +111 -5
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ClassifierQuestion } from "@relay-harness/ai";
|
|
2
|
+
/**
|
|
3
|
+
* Typed questions Laya answers about each request, in one classifier call.
|
|
4
|
+
*
|
|
5
|
+
* Stage A (task intelligence) describes the task. Stage B (execution intelligence) recommends how
|
|
6
|
+
* to run it. The questions use abstract tiers and efforts, never model names: the model registry
|
|
7
|
+
* maps tiers to concrete models, so models can change without retraining Laya. The provider is not
|
|
8
|
+
* a question: it depends on credentials and quota, which only the harness knows.
|
|
9
|
+
*
|
|
10
|
+
* These definitions are the contract with the trained checkpoint. `layaDecisionsFile()` exports
|
|
11
|
+
* them in the laya-trainer format; train and serve with the same wording.
|
|
12
|
+
*/
|
|
13
|
+
export declare const TASK_TYPES: readonly ["question", "code_edit", "bug_fix", "refactor", "feature", "test", "architecture", "debugging", "security", "research", "documentation"];
|
|
14
|
+
export type TaskType = (typeof TASK_TYPES)[number];
|
|
15
|
+
export declare const TASK_SCOPES: readonly ["single_line", "single_file", "module", "multi_module", "repository", "multi_repository"];
|
|
16
|
+
export type TaskScope = (typeof TASK_SCOPES)[number];
|
|
17
|
+
export declare const CAPABILITY_TIERS: readonly ["fast", "balanced", "strong", "frontier"];
|
|
18
|
+
export type CapabilityTier = (typeof CAPABILITY_TIERS)[number];
|
|
19
|
+
export declare const REASONING_EFFORTS: readonly ["minimal", "low", "medium", "high", "extra_high"];
|
|
20
|
+
export type ReasoningEffort = (typeof REASONING_EFFORTS)[number];
|
|
21
|
+
export declare const VALIDATION_LEVELS: readonly ["none", "syntax", "compile", "unit_test", "integration_test", "review"];
|
|
22
|
+
export type ValidationLevel = (typeof VALIDATION_LEVELS)[number];
|
|
23
|
+
export declare const AGENTS: {
|
|
24
|
+
readonly "software-engineer": "general implementation tasks that fit no specialist below";
|
|
25
|
+
readonly "backend-engineer": "APIs, services, business rules, queues, server-side code";
|
|
26
|
+
readonly "frontend-engineer": "web UI, components, styling, browser behavior, accessibility";
|
|
27
|
+
readonly "mobile-engineer": "iOS, Android, React Native or Flutter apps";
|
|
28
|
+
readonly "devops-engineer": "CI/CD, builds, containers, infrastructure, deployment, release scripts";
|
|
29
|
+
readonly "database-engineer": "schemas, migrations, queries, indexes, data modeling";
|
|
30
|
+
readonly "security-engineer": "vulnerabilities, authentication, authorization, secrets, hardening";
|
|
31
|
+
readonly "software-architect": "system design, module boundaries, cross-cutting architectural decisions";
|
|
32
|
+
readonly "qa-engineer": "writing or fixing tests, test strategy, flaky tests, coverage";
|
|
33
|
+
readonly researcher: "investigating, comparing options or explaining code without changing it";
|
|
34
|
+
};
|
|
35
|
+
export type AgentId = keyof typeof AGENTS;
|
|
36
|
+
export declare const AGENT_IDS: AgentId[];
|
|
37
|
+
/** Tool needs, asked as independent yes/no questions to avoid a combinatorial choice. */
|
|
38
|
+
export declare const TOOL_REQUIREMENTS: {
|
|
39
|
+
readonly requires_write: "Does the task require creating or editing files?";
|
|
40
|
+
readonly requires_shell: "Does the task require running shell commands other than tests?";
|
|
41
|
+
readonly requires_tests: "Does the task require running tests, type checks, or builds?";
|
|
42
|
+
readonly requires_web: "Does the task require searching or reading the web?";
|
|
43
|
+
readonly requires_browser: "Does the task require driving a browser or checking a running UI?";
|
|
44
|
+
readonly requires_database: "Does the task require querying or changing a database?";
|
|
45
|
+
readonly requires_git: "Does the task require git operations such as commits, branches, or history?";
|
|
46
|
+
};
|
|
47
|
+
export type ToolRequirement = keyof typeof TOOL_REQUIREMENTS;
|
|
48
|
+
export declare const TOOL_REQUIREMENT_IDS: ToolRequirement[];
|
|
49
|
+
export declare const COMPLEXITY_LEVELS: string[];
|
|
50
|
+
export declare const RISK_LEVELS: string[];
|
|
51
|
+
export declare const AMBIGUITY_LEVELS: string[];
|
|
52
|
+
export declare const REASONING_LEVELS: string[];
|
|
53
|
+
export declare const LAYA_QUESTIONS: Record<string, ClassifierQuestion>;
|
|
54
|
+
/** The questions in laya-trainer's `.laya/decisions.json` format (`bool` is `noul` there). */
|
|
55
|
+
export declare function layaDecisionsFile(): {
|
|
56
|
+
description: string;
|
|
57
|
+
language: string;
|
|
58
|
+
decisions: Record<string, unknown>;
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=questions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"questions.d.ts","sourceRoot":"","sources":["../../../src/extensions/laya/questions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,UAAU,YACtB,UAAU,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,SAAS,EACT,MAAM,EACN,cAAc,EACd,WAAW,EACX,UAAU,EACV,UAAU,EACV,eAAe,CACN,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,eAAO,MAAM,WAAW,YACvB,aAAa,EACb,aAAa,EACb,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,kBAAkB,CACT,CAAC;AACX,MAAM,MAAM,SAAS,GAA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EAAqC,eAAe,EAAE,CAAC;AAExF,eAAO,MAAM,iBAAiB,UAAyD,CAAC;AACxF,eAAO,MAAM,WAAW,UAKvB,CAAC;AACF,eAAO,MAAM,gBAAgB,UAI5B,CAAC;AACF,eAAO,MAAM,gBAAgB,UAM5B,CAAC;AAQF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAmG7D,CAAC;AAEF,8FAA8F;AAC9F,wBAAgB,iBAAiB,IAAI;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,CAYA"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed questions Laya answers about each request, in one classifier call.
|
|
3
|
+
*
|
|
4
|
+
* Stage A (task intelligence) describes the task. Stage B (execution intelligence) recommends how
|
|
5
|
+
* to run it. The questions use abstract tiers and efforts, never model names: the model registry
|
|
6
|
+
* maps tiers to concrete models, so models can change without retraining Laya. The provider is not
|
|
7
|
+
* a question: it depends on credentials and quota, which only the harness knows.
|
|
8
|
+
*
|
|
9
|
+
* These definitions are the contract with the trained checkpoint. `layaDecisionsFile()` exports
|
|
10
|
+
* them in the laya-trainer format; train and serve with the same wording.
|
|
11
|
+
*/
|
|
12
|
+
export const TASK_TYPES = [
|
|
13
|
+
"question",
|
|
14
|
+
"code_edit",
|
|
15
|
+
"bug_fix",
|
|
16
|
+
"refactor",
|
|
17
|
+
"feature",
|
|
18
|
+
"test",
|
|
19
|
+
"architecture",
|
|
20
|
+
"debugging",
|
|
21
|
+
"security",
|
|
22
|
+
"research",
|
|
23
|
+
"documentation",
|
|
24
|
+
];
|
|
25
|
+
export const TASK_SCOPES = [
|
|
26
|
+
"single_line",
|
|
27
|
+
"single_file",
|
|
28
|
+
"module",
|
|
29
|
+
"multi_module",
|
|
30
|
+
"repository",
|
|
31
|
+
"multi_repository",
|
|
32
|
+
];
|
|
33
|
+
export const CAPABILITY_TIERS = ["fast", "balanced", "strong", "frontier"];
|
|
34
|
+
export const REASONING_EFFORTS = ["minimal", "low", "medium", "high", "extra_high"];
|
|
35
|
+
export const VALIDATION_LEVELS = ["none", "syntax", "compile", "unit_test", "integration_test", "review"];
|
|
36
|
+
export const AGENTS = {
|
|
37
|
+
"software-engineer": "general implementation tasks that fit no specialist below",
|
|
38
|
+
"backend-engineer": "APIs, services, business rules, queues, server-side code",
|
|
39
|
+
"frontend-engineer": "web UI, components, styling, browser behavior, accessibility",
|
|
40
|
+
"mobile-engineer": "iOS, Android, React Native or Flutter apps",
|
|
41
|
+
"devops-engineer": "CI/CD, builds, containers, infrastructure, deployment, release scripts",
|
|
42
|
+
"database-engineer": "schemas, migrations, queries, indexes, data modeling",
|
|
43
|
+
"security-engineer": "vulnerabilities, authentication, authorization, secrets, hardening",
|
|
44
|
+
"software-architect": "system design, module boundaries, cross-cutting architectural decisions",
|
|
45
|
+
"qa-engineer": "writing or fixing tests, test strategy, flaky tests, coverage",
|
|
46
|
+
researcher: "investigating, comparing options or explaining code without changing it",
|
|
47
|
+
};
|
|
48
|
+
export const AGENT_IDS = Object.keys(AGENTS);
|
|
49
|
+
/** Tool needs, asked as independent yes/no questions to avoid a combinatorial choice. */
|
|
50
|
+
export const TOOL_REQUIREMENTS = {
|
|
51
|
+
requires_write: "Does the task require creating or editing files?",
|
|
52
|
+
requires_shell: "Does the task require running shell commands other than tests?",
|
|
53
|
+
requires_tests: "Does the task require running tests, type checks, or builds?",
|
|
54
|
+
requires_web: "Does the task require searching or reading the web?",
|
|
55
|
+
requires_browser: "Does the task require driving a browser or checking a running UI?",
|
|
56
|
+
requires_database: "Does the task require querying or changing a database?",
|
|
57
|
+
requires_git: "Does the task require git operations such as commits, branches, or history?",
|
|
58
|
+
};
|
|
59
|
+
export const TOOL_REQUIREMENT_IDS = Object.keys(TOOL_REQUIREMENTS);
|
|
60
|
+
export const COMPLEXITY_LEVELS = ["trivial", "simple", "moderate", "complex", "expert"];
|
|
61
|
+
export const RISK_LEVELS = [
|
|
62
|
+
"low: easy to undo, no user impact",
|
|
63
|
+
"moderate: visible behavior change",
|
|
64
|
+
"high: data, money, availability or many users affected",
|
|
65
|
+
"critical: production data, security or irreversible operations",
|
|
66
|
+
];
|
|
67
|
+
export const AMBIGUITY_LEVELS = [
|
|
68
|
+
"clear: the request states what to do",
|
|
69
|
+
"partial: some details must be inferred",
|
|
70
|
+
"open: the goal or approach must be clarified or explored first",
|
|
71
|
+
];
|
|
72
|
+
export const REASONING_LEVELS = [
|
|
73
|
+
"recall: answer is direct knowledge",
|
|
74
|
+
"routine: a known recipe",
|
|
75
|
+
"multi-step: several dependent steps",
|
|
76
|
+
"deep: careful analysis of interactions",
|
|
77
|
+
"novel: design or debugging without a known recipe",
|
|
78
|
+
];
|
|
79
|
+
const yesNo = (instructions, yes, no) => ({
|
|
80
|
+
type: "bool",
|
|
81
|
+
instructions,
|
|
82
|
+
criteria: { true: yes, false: no },
|
|
83
|
+
});
|
|
84
|
+
export const LAYA_QUESTIONS = {
|
|
85
|
+
task_type: {
|
|
86
|
+
type: "choice",
|
|
87
|
+
instructions: "What kind of software engineering task does the request ask for?",
|
|
88
|
+
criteria: {
|
|
89
|
+
question: "a question to answer, no change requested",
|
|
90
|
+
code_edit: "a small, explicit change: rename, text, config value, formatting",
|
|
91
|
+
bug_fix: "fix behavior that is wrong and reproducible",
|
|
92
|
+
refactor: "restructure code without changing behavior",
|
|
93
|
+
feature: "add new behavior or capability",
|
|
94
|
+
test: "write, fix or extend tests",
|
|
95
|
+
architecture: "design or evaluate structure across modules or systems",
|
|
96
|
+
debugging: "investigate a failure whose cause is unknown",
|
|
97
|
+
security: "find or fix a vulnerability, or change auth, secrets or permissions",
|
|
98
|
+
research: "explore, compare options or explain code without changing it",
|
|
99
|
+
documentation: "write or update docs, comments, READMEs or changelogs",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
complexity: {
|
|
103
|
+
type: "score",
|
|
104
|
+
instructions: "How complex is the task?",
|
|
105
|
+
criteria: COMPLEXITY_LEVELS,
|
|
106
|
+
},
|
|
107
|
+
scope: {
|
|
108
|
+
type: "choice",
|
|
109
|
+
instructions: "How much of the codebase does the task touch?",
|
|
110
|
+
criteria: {
|
|
111
|
+
single_line: "one line or one value",
|
|
112
|
+
single_file: "one file",
|
|
113
|
+
module: "several files of one module or package",
|
|
114
|
+
multi_module: "several modules or packages",
|
|
115
|
+
repository: "the whole repository",
|
|
116
|
+
multi_repository: "more than one repository or service",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
risk: {
|
|
120
|
+
type: "score",
|
|
121
|
+
instructions: "How risky is a wrong result?",
|
|
122
|
+
criteria: RISK_LEVELS,
|
|
123
|
+
},
|
|
124
|
+
ambiguity: {
|
|
125
|
+
type: "score",
|
|
126
|
+
instructions: "How ambiguous is the request?",
|
|
127
|
+
criteria: AMBIGUITY_LEVELS,
|
|
128
|
+
},
|
|
129
|
+
reasoning_requirement: {
|
|
130
|
+
type: "score",
|
|
131
|
+
instructions: "How much reasoning does the task need?",
|
|
132
|
+
criteria: REASONING_LEVELS,
|
|
133
|
+
},
|
|
134
|
+
capability_tier: {
|
|
135
|
+
type: "choice",
|
|
136
|
+
instructions: "What is the cheapest model capability tier likely to solve the task correctly?",
|
|
137
|
+
criteria: {
|
|
138
|
+
fast: "small, fast model: trivial edits, lookups, simple questions",
|
|
139
|
+
balanced: "mid-size model: ordinary features, fixes and refactors",
|
|
140
|
+
strong: "large model: subtle bugs, risky or cross-module changes",
|
|
141
|
+
frontier: "most capable model: novel design, hard debugging, critical systems",
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
reasoning_effort: {
|
|
145
|
+
type: "choice",
|
|
146
|
+
instructions: "How much reasoning effort should the model spend?",
|
|
147
|
+
criteria: {
|
|
148
|
+
minimal: "answer or edit directly",
|
|
149
|
+
low: "brief planning",
|
|
150
|
+
medium: "plan the steps before acting",
|
|
151
|
+
high: "analyze alternatives and edge cases",
|
|
152
|
+
extra_high: "exhaustive analysis of a hard problem",
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
agent: {
|
|
156
|
+
type: "choice",
|
|
157
|
+
instructions: "Which specialist should handle the task?",
|
|
158
|
+
criteria: AGENTS,
|
|
159
|
+
},
|
|
160
|
+
validation_level: {
|
|
161
|
+
type: "choice",
|
|
162
|
+
instructions: "What validation should confirm the result?",
|
|
163
|
+
criteria: {
|
|
164
|
+
none: "nothing to validate: answers, explanations, plans",
|
|
165
|
+
syntax: "check formatting or syntax only: docs, config, text",
|
|
166
|
+
compile: "type check or build",
|
|
167
|
+
unit_test: "run unit tests of the changed code",
|
|
168
|
+
integration_test: "run integration or end-to-end tests",
|
|
169
|
+
review: "careful review of the change: security, architecture, data",
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
...Object.fromEntries(Object.entries(TOOL_REQUIREMENTS).map(([id, instructions]) => [
|
|
173
|
+
id,
|
|
174
|
+
yesNo(instructions, "yes, the task needs it", "no, the task does not need it"),
|
|
175
|
+
])),
|
|
176
|
+
security_sensitive: yesNo("Does the task touch authentication, authorization, secrets, payments, security vulnerabilities, or production data migrations?", "yes, it touches one of these", "no"),
|
|
177
|
+
};
|
|
178
|
+
/** The questions in laya-trainer's `.laya/decisions.json` format (`bool` is `noul` there). */
|
|
179
|
+
export function layaDecisionsFile() {
|
|
180
|
+
return {
|
|
181
|
+
description: "Relay adaptive execution intelligence: task profile, capability tier, effort, agent, tools and validation for a coding request.",
|
|
182
|
+
language: "auto",
|
|
183
|
+
decisions: Object.fromEntries(Object.entries(LAYA_QUESTIONS).map(([id, question]) => [
|
|
184
|
+
id,
|
|
185
|
+
question.type === "bool" ? { ...question, type: "noul" } : question,
|
|
186
|
+
])),
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=questions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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;QACd,YAAY,EAAE,0CAA0C;QACxD,QAAQ,EAAE,MAAM;KAChB;IACD,gBAAgB,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,4CAA4C;QAC1D,QAAQ,EAAE;YACT,IAAI,EAAE,mDAAmD;YACzD,MAAM,EAAE,qDAAqD;YAC7D,OAAO,EAAE,qBAAqB;YAC9B,SAAS,EAAE,oCAAoC;YAC/C,gBAAgB,EAAE,qCAAqC;YACvD,MAAM,EAAE,4DAA4D;SACpE;KACD;IACD,GAAG,MAAM,CAAC,WAAW,CACpB,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,YAAY,CAAC,EAAE,EAAE,CAAC;QAC7D,EAAE;QACF,KAAK,CAAC,YAAY,EAAE,wBAAwB,EAAE,+BAA+B,CAAC;KAC9E,CAAC,CACF;IACD,kBAAkB,EAAE,KAAK,CACxB,gIAAgI,EAChI,8BAA8B,EAC9B,IAAI,CACJ;CACD,CAAC;AAEF,8FAA8F;AAC9F,MAAM,UAAU,iBAAiB;IAKhC,OAAO;QACN,WAAW,EACV,iIAAiI;QAClI,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,MAAM,CAAC,WAAW,CAC5B,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC;YACtD,EAAE;YACF,QAAQ,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ;SACnE,CAAC,CACF;KACD,CAAC;AACH,CAAC","sourcesContent":["import type { ClassifierQuestion } from \"@relay-harness/ai\";\n\n/**\n * Typed questions Laya answers about each request, in one classifier call.\n *\n * Stage A (task intelligence) describes the task. Stage B (execution intelligence) recommends how\n * to run it. The questions use abstract tiers and efforts, never model names: the model registry\n * maps tiers to concrete models, so models can change without retraining Laya. The provider is not\n * a question: it depends on credentials and quota, which only the harness knows.\n *\n * These definitions are the contract with the trained checkpoint. `layaDecisionsFile()` exports\n * them in the laya-trainer format; train and serve with the same wording.\n */\n\nexport const TASK_TYPES = [\n\t\"question\",\n\t\"code_edit\",\n\t\"bug_fix\",\n\t\"refactor\",\n\t\"feature\",\n\t\"test\",\n\t\"architecture\",\n\t\"debugging\",\n\t\"security\",\n\t\"research\",\n\t\"documentation\",\n] as const;\nexport type TaskType = (typeof TASK_TYPES)[number];\n\nexport const TASK_SCOPES = [\n\t\"single_line\",\n\t\"single_file\",\n\t\"module\",\n\t\"multi_module\",\n\t\"repository\",\n\t\"multi_repository\",\n] as const;\nexport type TaskScope = (typeof TASK_SCOPES)[number];\n\nexport const CAPABILITY_TIERS = [\"fast\", \"balanced\", \"strong\", \"frontier\"] as const;\nexport type CapabilityTier = (typeof CAPABILITY_TIERS)[number];\n\nexport const REASONING_EFFORTS = [\"minimal\", \"low\", \"medium\", \"high\", \"extra_high\"] as const;\nexport type ReasoningEffort = (typeof REASONING_EFFORTS)[number];\n\nexport const VALIDATION_LEVELS = [\"none\", \"syntax\", \"compile\", \"unit_test\", \"integration_test\", \"review\"] as const;\nexport type ValidationLevel = (typeof VALIDATION_LEVELS)[number];\n\nexport const AGENTS = {\n\t\"software-engineer\": \"general implementation tasks that fit no specialist below\",\n\t\"backend-engineer\": \"APIs, services, business rules, queues, server-side code\",\n\t\"frontend-engineer\": \"web UI, components, styling, browser behavior, accessibility\",\n\t\"mobile-engineer\": \"iOS, Android, React Native or Flutter apps\",\n\t\"devops-engineer\": \"CI/CD, builds, containers, infrastructure, deployment, release scripts\",\n\t\"database-engineer\": \"schemas, migrations, queries, indexes, data modeling\",\n\t\"security-engineer\": \"vulnerabilities, authentication, authorization, secrets, hardening\",\n\t\"software-architect\": \"system design, module boundaries, cross-cutting architectural decisions\",\n\t\"qa-engineer\": \"writing or fixing tests, test strategy, flaky tests, coverage\",\n\tresearcher: \"investigating, comparing options or explaining code without changing it\",\n} as const satisfies Record<string, string>;\nexport type AgentId = keyof typeof AGENTS;\nexport const AGENT_IDS = Object.keys(AGENTS) as AgentId[];\n\n/** Tool needs, asked as independent yes/no questions to avoid a combinatorial choice. */\nexport const TOOL_REQUIREMENTS = {\n\trequires_write: \"Does the task require creating or editing files?\",\n\trequires_shell: \"Does the task require running shell commands other than tests?\",\n\trequires_tests: \"Does the task require running tests, type checks, or builds?\",\n\trequires_web: \"Does the task require searching or reading the web?\",\n\trequires_browser: \"Does the task require driving a browser or checking a running UI?\",\n\trequires_database: \"Does the task require querying or changing a database?\",\n\trequires_git: \"Does the task require git operations such as commits, branches, or history?\",\n} as const;\nexport type ToolRequirement = keyof typeof TOOL_REQUIREMENTS;\nexport const TOOL_REQUIREMENT_IDS = Object.keys(TOOL_REQUIREMENTS) as ToolRequirement[];\n\nexport const COMPLEXITY_LEVELS = [\"trivial\", \"simple\", \"moderate\", \"complex\", \"expert\"];\nexport const RISK_LEVELS = [\n\t\"low: easy to undo, no user impact\",\n\t\"moderate: visible behavior change\",\n\t\"high: data, money, availability or many users affected\",\n\t\"critical: production data, security or irreversible operations\",\n];\nexport const AMBIGUITY_LEVELS = [\n\t\"clear: the request states what to do\",\n\t\"partial: some details must be inferred\",\n\t\"open: the goal or approach must be clarified or explored first\",\n];\nexport const REASONING_LEVELS = [\n\t\"recall: answer is direct knowledge\",\n\t\"routine: a known recipe\",\n\t\"multi-step: several dependent steps\",\n\t\"deep: careful analysis of interactions\",\n\t\"novel: design or debugging without a known recipe\",\n];\n\nconst yesNo = (instructions: string, yes: string, no: string): ClassifierQuestion => ({\n\ttype: \"bool\",\n\tinstructions,\n\tcriteria: { true: yes, false: no },\n});\n\nexport const LAYA_QUESTIONS: Record<string, ClassifierQuestion> = {\n\ttask_type: {\n\t\ttype: \"choice\",\n\t\tinstructions: \"What kind of software engineering task does the request ask for?\",\n\t\tcriteria: {\n\t\t\tquestion: \"a question to answer, no change requested\",\n\t\t\tcode_edit: \"a small, explicit change: rename, text, config value, formatting\",\n\t\t\tbug_fix: \"fix behavior that is wrong and reproducible\",\n\t\t\trefactor: \"restructure code without changing behavior\",\n\t\t\tfeature: \"add new behavior or capability\",\n\t\t\ttest: \"write, fix or extend tests\",\n\t\t\tarchitecture: \"design or evaluate structure across modules or systems\",\n\t\t\tdebugging: \"investigate a failure whose cause is unknown\",\n\t\t\tsecurity: \"find or fix a vulnerability, or change auth, secrets or permissions\",\n\t\t\tresearch: \"explore, compare options or explain code without changing it\",\n\t\t\tdocumentation: \"write or update docs, comments, READMEs or changelogs\",\n\t\t},\n\t},\n\tcomplexity: {\n\t\ttype: \"score\",\n\t\tinstructions: \"How complex is the task?\",\n\t\tcriteria: COMPLEXITY_LEVELS,\n\t},\n\tscope: {\n\t\ttype: \"choice\",\n\t\tinstructions: \"How much of the codebase does the task touch?\",\n\t\tcriteria: {\n\t\t\tsingle_line: \"one line or one value\",\n\t\t\tsingle_file: \"one file\",\n\t\t\tmodule: \"several files of one module or package\",\n\t\t\tmulti_module: \"several modules or packages\",\n\t\t\trepository: \"the whole repository\",\n\t\t\tmulti_repository: \"more than one repository or service\",\n\t\t},\n\t},\n\trisk: {\n\t\ttype: \"score\",\n\t\tinstructions: \"How risky is a wrong result?\",\n\t\tcriteria: RISK_LEVELS,\n\t},\n\tambiguity: {\n\t\ttype: \"score\",\n\t\tinstructions: \"How ambiguous is the request?\",\n\t\tcriteria: AMBIGUITY_LEVELS,\n\t},\n\treasoning_requirement: {\n\t\ttype: \"score\",\n\t\tinstructions: \"How much reasoning does the task need?\",\n\t\tcriteria: REASONING_LEVELS,\n\t},\n\tcapability_tier: {\n\t\ttype: \"choice\",\n\t\tinstructions: \"What is the cheapest model capability tier likely to solve the task correctly?\",\n\t\tcriteria: {\n\t\t\tfast: \"small, fast model: trivial edits, lookups, simple questions\",\n\t\t\tbalanced: \"mid-size model: ordinary features, fixes and refactors\",\n\t\t\tstrong: \"large model: subtle bugs, risky or cross-module changes\",\n\t\t\tfrontier: \"most capable model: novel design, hard debugging, critical systems\",\n\t\t},\n\t},\n\treasoning_effort: {\n\t\ttype: \"choice\",\n\t\tinstructions: \"How much reasoning effort should the model spend?\",\n\t\tcriteria: {\n\t\t\tminimal: \"answer or edit directly\",\n\t\t\tlow: \"brief planning\",\n\t\t\tmedium: \"plan the steps before acting\",\n\t\t\thigh: \"analyze alternatives and edge cases\",\n\t\t\textra_high: \"exhaustive analysis of a hard problem\",\n\t\t},\n\t},\n\tagent: {\n\t\ttype: \"choice\",\n\t\tinstructions: \"Which specialist should handle the task?\",\n\t\tcriteria: AGENTS,\n\t},\n\tvalidation_level: {\n\t\ttype: \"choice\",\n\t\tinstructions: \"What validation should confirm the result?\",\n\t\tcriteria: {\n\t\t\tnone: \"nothing to validate: answers, explanations, plans\",\n\t\t\tsyntax: \"check formatting or syntax only: docs, config, text\",\n\t\t\tcompile: \"type check or build\",\n\t\t\tunit_test: \"run unit tests of the changed code\",\n\t\t\tintegration_test: \"run integration or end-to-end tests\",\n\t\t\treview: \"careful review of the change: security, architecture, data\",\n\t\t},\n\t},\n\t...Object.fromEntries(\n\t\tObject.entries(TOOL_REQUIREMENTS).map(([id, instructions]) => [\n\t\t\tid,\n\t\t\tyesNo(instructions, \"yes, the task needs it\", \"no, the task does not need it\"),\n\t\t]),\n\t),\n\tsecurity_sensitive: yesNo(\n\t\t\"Does the task touch authentication, authorization, secrets, payments, security vulnerabilities, or production data migrations?\",\n\t\t\"yes, it touches one of these\",\n\t\t\"no\",\n\t),\n};\n\n/** The questions in laya-trainer's `.laya/decisions.json` format (`bool` is `noul` there). */\nexport function layaDecisionsFile(): {\n\tdescription: string;\n\tlanguage: string;\n\tdecisions: Record<string, unknown>;\n} {\n\treturn {\n\t\tdescription:\n\t\t\t\"Relay adaptive execution intelligence: task profile, capability tier, effort, agent, tools and validation for a coding request.\",\n\t\tlanguage: \"auto\",\n\t\tdecisions: Object.fromEntries(\n\t\t\tObject.entries(LAYA_QUESTIONS).map(([id, question]) => [\n\t\t\t\tid,\n\t\t\t\tquestion.type === \"bool\" ? { ...question, type: \"noul\" } : question,\n\t\t\t]),\n\t\t),\n\t};\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { TaskAssessment } from "./assessment.ts";
|
|
2
|
+
import type { PolicyDecision } from "./policy.ts";
|
|
3
|
+
import { type AgentId, type ToolRequirement } from "./questions.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Agent, skill and tool routing. Relay has no agent registry, so the agent is a role the plan
|
|
6
|
+
* message asks the model to take. Skills are reduced hierarchically: the agent picks a keyword
|
|
7
|
+
* family, and only skills matching it are named. Tools are advised by default; with
|
|
8
|
+
* `laya.toolRouting: "enforce"` the tools a task clearly does not need are deactivated.
|
|
9
|
+
*/
|
|
10
|
+
/** Custom message type of the plan sent with each routed request. */
|
|
11
|
+
export declare const LAYA_PLAN_MESSAGE = "laya.plan";
|
|
12
|
+
export interface SkillInfo {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
}
|
|
16
|
+
/** Up to `limit` skills whose name or description matches the agent's keyword family or the request. */
|
|
17
|
+
export declare function selectSkills(skills: readonly SkillInfo[], agent: AgentId, request: string, limit?: number): string[];
|
|
18
|
+
/**
|
|
19
|
+
* Tools to deactivate for this task: tools that match only requirements the task does not have.
|
|
20
|
+
* `bash` serves shell, tests and git, so it stays when any of them is needed.
|
|
21
|
+
*/
|
|
22
|
+
export declare function unneededTools(activeTools: readonly string[], tools: Record<ToolRequirement, boolean>): string[];
|
|
23
|
+
/** The advisory plan sent to the model next to the user's message. */
|
|
24
|
+
export declare function renderPlanMessage(assessment: TaskAssessment, policy: PolicyDecision, skills: readonly string[], enforcedTools: readonly string[]): string;
|
|
25
|
+
//# sourceMappingURL=routers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routers.d.ts","sourceRoot":"","sources":["../../../src/extensions/laya/routers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAU,KAAK,OAAO,EAAE,KAAK,eAAe,EAAwB,MAAM,gBAAgB,CAAC;AAElG;;;;;GAKG;AAEH,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAoC7C,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,wGAAwG;AACxG,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,MAAM,EAAE,CAe/G;AAaD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAK/G;AAqBD,sEAAsE;AACtE,wBAAgB,iBAAiB,CAChC,UAAU,EAAE,cAAc,EAC1B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,aAAa,EAAE,SAAS,MAAM,EAAE,GAC9B,MAAM,CA0BR"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { AGENTS } from "./questions.js";
|
|
2
|
+
/**
|
|
3
|
+
* Agent, skill and tool routing. Relay has no agent registry, so the agent is a role the plan
|
|
4
|
+
* message asks the model to take. Skills are reduced hierarchically: the agent picks a keyword
|
|
5
|
+
* family, and only skills matching it are named. Tools are advised by default; with
|
|
6
|
+
* `laya.toolRouting: "enforce"` the tools a task clearly does not need are deactivated.
|
|
7
|
+
*/
|
|
8
|
+
/** Custom message type of the plan sent with each routed request. */
|
|
9
|
+
export const LAYA_PLAN_MESSAGE = "laya.plan";
|
|
10
|
+
const AGENT_SKILL_KEYWORDS = {
|
|
11
|
+
"software-engineer": [
|
|
12
|
+
"code",
|
|
13
|
+
"implement",
|
|
14
|
+
"refactor",
|
|
15
|
+
"typescript",
|
|
16
|
+
"javascript",
|
|
17
|
+
"python",
|
|
18
|
+
"java",
|
|
19
|
+
"golang",
|
|
20
|
+
"rust",
|
|
21
|
+
],
|
|
22
|
+
"backend-engineer": ["api", "backend", "server", "service", "rest", "graphql", "queue", "spring", "node"],
|
|
23
|
+
"frontend-engineer": [
|
|
24
|
+
"frontend",
|
|
25
|
+
"ui",
|
|
26
|
+
"ux",
|
|
27
|
+
"css",
|
|
28
|
+
"react",
|
|
29
|
+
"vue",
|
|
30
|
+
"angular",
|
|
31
|
+
"component",
|
|
32
|
+
"accessibility",
|
|
33
|
+
"design",
|
|
34
|
+
],
|
|
35
|
+
"mobile-engineer": ["mobile", "android", "ios", "swift", "kotlin", "flutter", "react-native"],
|
|
36
|
+
"devops-engineer": ["devops", "ci", "deploy", "docker", "kubernetes", "infra", "terraform", "release"],
|
|
37
|
+
"database-engineer": ["database", "sql", "postgres", "mysql", "migration", "schema", "query", "cockroach"],
|
|
38
|
+
"security-engineer": ["security", "auth", "oauth", "vulnerab", "secret", "crypto", "audit", "compliance"],
|
|
39
|
+
"software-architect": ["architecture", "system-design", "design", "ddd", "distributed", "event", "adr"],
|
|
40
|
+
"qa-engineer": ["test", "qa", "testing", "coverage", "e2e", "playwright", "vitest", "jest"],
|
|
41
|
+
researcher: ["research", "explain", "analysis", "docs", "compare", "documentation"],
|
|
42
|
+
};
|
|
43
|
+
/** Up to `limit` skills whose name or description matches the agent's keyword family or the request. */
|
|
44
|
+
export function selectSkills(skills, agent, request, limit = 3) {
|
|
45
|
+
const keywords = AGENT_SKILL_KEYWORDS[agent];
|
|
46
|
+
const requestWords = new Set(request.toLowerCase().match(/[a-z0-9-]{4,}/g) ?? []);
|
|
47
|
+
return skills
|
|
48
|
+
.map((skill) => {
|
|
49
|
+
const name = skill.name.toLowerCase();
|
|
50
|
+
const text = `${name} ${skill.description.toLowerCase()}`;
|
|
51
|
+
const keywordHits = keywords.filter((keyword) => text.includes(keyword)).length;
|
|
52
|
+
const requestHits = name.split(/[^a-z0-9]+/).filter((part) => requestWords.has(part)).length;
|
|
53
|
+
return { name: skill.name, score: keywordHits + 2 * requestHits };
|
|
54
|
+
})
|
|
55
|
+
.filter((skill) => skill.score > 0)
|
|
56
|
+
.sort((a, b) => b.score - a.score || a.name.localeCompare(b.name))
|
|
57
|
+
.slice(0, limit)
|
|
58
|
+
.map((skill) => skill.name);
|
|
59
|
+
}
|
|
60
|
+
/** Tool name patterns per requirement. Tools matching none of them are never deactivated. */
|
|
61
|
+
const TOOL_PATTERNS = {
|
|
62
|
+
requires_write: /^(edit|write|multi_?edit|apply_patch)$/,
|
|
63
|
+
requires_shell: /^bash$/,
|
|
64
|
+
requires_tests: /^bash$/,
|
|
65
|
+
requires_git: /^bash$/,
|
|
66
|
+
requires_web: /web|fetch|search_web|http/,
|
|
67
|
+
requires_browser: /browser|playwright|puppeteer/,
|
|
68
|
+
requires_database: /sql|database|\bdb\b|postgres|mysql/,
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Tools to deactivate for this task: tools that match only requirements the task does not have.
|
|
72
|
+
* `bash` serves shell, tests and git, so it stays when any of them is needed.
|
|
73
|
+
*/
|
|
74
|
+
export function unneededTools(activeTools, tools) {
|
|
75
|
+
return activeTools.filter((name) => {
|
|
76
|
+
const matched = Object.keys(TOOL_PATTERNS).filter((id) => TOOL_PATTERNS[id].test(name));
|
|
77
|
+
return matched.length > 0 && matched.every((id) => !tools[id]);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const VALIDATION_HINTS = {
|
|
81
|
+
none: "no check needed",
|
|
82
|
+
syntax: "check formatting or syntax of what changed",
|
|
83
|
+
compile: "run the type check or build",
|
|
84
|
+
unit_test: "run the unit tests that cover the change",
|
|
85
|
+
integration_test: "run the integration or end-to-end tests of the affected flow",
|
|
86
|
+
review: "review the change for security, data and architectural impact, then run the relevant tests",
|
|
87
|
+
};
|
|
88
|
+
const TOOL_LABELS = {
|
|
89
|
+
requires_write: "file edits",
|
|
90
|
+
requires_shell: "shell",
|
|
91
|
+
requires_tests: "tests",
|
|
92
|
+
requires_web: "web",
|
|
93
|
+
requires_browser: "browser",
|
|
94
|
+
requires_database: "database",
|
|
95
|
+
requires_git: "git",
|
|
96
|
+
};
|
|
97
|
+
/** The advisory plan sent to the model next to the user's message. */
|
|
98
|
+
export function renderPlanMessage(assessment, policy, skills, enforcedTools) {
|
|
99
|
+
const percent = (value) => `${Math.round(value * 100)}%`;
|
|
100
|
+
const needed = Object.keys(TOOL_LABELS).filter((id) => assessment.tools[id]);
|
|
101
|
+
const notNeeded = Object.keys(TOOL_LABELS).filter((id) => !assessment.tools[id]);
|
|
102
|
+
const lines = [
|
|
103
|
+
"[laya:plan] Execution plan from the harness router for this request (guidance, not a constraint):",
|
|
104
|
+
`- Task: ${assessment.task.type.replaceAll("_", " ")}, scope ${assessment.task.scope.replaceAll("_", " ")}, complexity ${percent(assessment.task.complexity)}, risk ${percent(assessment.task.risk)}.`,
|
|
105
|
+
`- Role: act as ${assessment.agent} (${AGENTS[assessment.agent]}).`,
|
|
106
|
+
];
|
|
107
|
+
if (skills.length > 0)
|
|
108
|
+
lines.push(`- Skills likely relevant: ${skills.join(", ")}. Load one only when a step needs it.`);
|
|
109
|
+
lines.push(`- Tools: ${needed.length > 0 ? `needs ${needed.map((id) => TOOL_LABELS[id]).join(", ")}` : "read-only"}${notNeeded.length > 0 ? `; not expected: ${notNeeded.map((id) => TOOL_LABELS[id]).join(", ")}` : ""}.`);
|
|
110
|
+
if (enforcedTools.length > 0)
|
|
111
|
+
lines.push(`- Deactivated for this request: ${enforcedTools.join(", ")}.`);
|
|
112
|
+
if (policy.validation.level !== "none") {
|
|
113
|
+
lines.push(`- Validation${policy.validation.required ? " (required)" : ""}: ${VALIDATION_HINTS[policy.validation.level]} before reporting completion.`);
|
|
114
|
+
}
|
|
115
|
+
if (policy.rules.length > 0)
|
|
116
|
+
lines.push(`- Sensitive area: ${policy.rules.join(", ")}. Prefer the safest correct change.`);
|
|
117
|
+
if (assessment.task.ambiguity >= 0.75)
|
|
118
|
+
lines.push("- The request is open: confirm the goal before large changes.");
|
|
119
|
+
return lines.join("\n");
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=routers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routers.js","sourceRoot":"","sources":["../../../src/extensions/laya/routers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAA4D,MAAM,gBAAgB,CAAC;AAElG;;;;;GAKG;AAEH,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAE7C,MAAM,oBAAoB,GAA8B;IACvD,mBAAmB,EAAE;QACpB,MAAM;QACN,WAAW;QACX,UAAU;QACV,YAAY;QACZ,YAAY;QACZ,QAAQ;QACR,MAAM;QACN,QAAQ;QACR,MAAM;KACN;IACD,kBAAkB,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC;IACzG,mBAAmB,EAAE;QACpB,UAAU;QACV,IAAI;QACJ,IAAI;QACJ,KAAK;QACL,OAAO;QACP,KAAK;QACL,SAAS;QACT,WAAW;QACX,eAAe;QACf,QAAQ;KACR;IACD,iBAAiB,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,CAAC;IAC7F,iBAAiB,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,CAAC;IACtG,mBAAmB,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE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AAC;IACH,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;QAC1B,KAAK,CAAC,IAAI,CAAC,qBAAqB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IAC/F,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;IACnH,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC","sourcesContent":["import type { TaskAssessment } from \"./assessment.ts\";\nimport type { PolicyDecision } from \"./policy.ts\";\nimport { AGENTS, type AgentId, type ToolRequirement, type ValidationLevel } from \"./questions.ts\";\n\n/**\n * Agent, skill and tool routing. Relay has no agent registry, so the agent is a role the plan\n * message asks the model to take. Skills are reduced hierarchically: the agent picks a keyword\n * family, and only skills matching it are named. Tools are advised by default; with\n * `laya.toolRouting: \"enforce\"` the tools a task clearly does not need are deactivated.\n */\n\n/** Custom message type of the plan sent with each routed request. */\nexport const LAYA_PLAN_MESSAGE = \"laya.plan\";\n\nconst AGENT_SKILL_KEYWORDS: Record<AgentId, string[]> = {\n\t\"software-engineer\": [\n\t\t\"code\",\n\t\t\"implement\",\n\t\t\"refactor\",\n\t\t\"typescript\",\n\t\t\"javascript\",\n\t\t\"python\",\n\t\t\"java\",\n\t\t\"golang\",\n\t\t\"rust\",\n\t],\n\t\"backend-engineer\": [\"api\", \"backend\", \"server\", \"service\", \"rest\", \"graphql\", \"queue\", \"spring\", \"node\"],\n\t\"frontend-engineer\": [\n\t\t\"frontend\",\n\t\t\"ui\",\n\t\t\"ux\",\n\t\t\"css\",\n\t\t\"react\",\n\t\t\"vue\",\n\t\t\"angular\",\n\t\t\"component\",\n\t\t\"accessibility\",\n\t\t\"design\",\n\t],\n\t\"mobile-engineer\": [\"mobile\", \"android\", \"ios\", \"swift\", \"kotlin\", \"flutter\", \"react-native\"],\n\t\"devops-engineer\": [\"devops\", \"ci\", \"deploy\", \"docker\", \"kubernetes\", \"infra\", \"terraform\", \"release\"],\n\t\"database-engineer\": [\"database\", \"sql\", \"postgres\", \"mysql\", \"migration\", \"schema\", \"query\", \"cockroach\"],\n\t\"security-engineer\": [\"security\", \"auth\", \"oauth\", \"vulnerab\", \"secret\", \"crypto\", \"audit\", \"compliance\"],\n\t\"software-architect\": [\"architecture\", \"system-design\", \"design\", \"ddd\", \"distributed\", \"event\", \"adr\"],\n\t\"qa-engineer\": [\"test\", \"qa\", \"testing\", \"coverage\", \"e2e\", \"playwright\", \"vitest\", \"jest\"],\n\tresearcher: [\"research\", \"explain\", \"analysis\", \"docs\", \"compare\", \"documentation\"],\n};\n\nexport interface SkillInfo {\n\tname: string;\n\tdescription: string;\n}\n\n/** Up to `limit` skills whose name or description matches the agent's keyword family or the request. */\nexport function selectSkills(skills: readonly SkillInfo[], agent: AgentId, request: string, limit = 3): string[] {\n\tconst keywords = AGENT_SKILL_KEYWORDS[agent];\n\tconst requestWords = new Set(request.toLowerCase().match(/[a-z0-9-]{4,}/g) ?? []);\n\treturn skills\n\t\t.map((skill) => {\n\t\t\tconst name = skill.name.toLowerCase();\n\t\t\tconst text = `${name} ${skill.description.toLowerCase()}`;\n\t\t\tconst keywordHits = keywords.filter((keyword) => text.includes(keyword)).length;\n\t\t\tconst requestHits = name.split(/[^a-z0-9]+/).filter((part) => requestWords.has(part)).length;\n\t\t\treturn { name: skill.name, score: keywordHits + 2 * requestHits };\n\t\t})\n\t\t.filter((skill) => skill.score > 0)\n\t\t.sort((a, b) => b.score - a.score || a.name.localeCompare(b.name))\n\t\t.slice(0, limit)\n\t\t.map((skill) => skill.name);\n}\n\n/** Tool name patterns per requirement. Tools matching none of them are never deactivated. */\nconst TOOL_PATTERNS: Record<ToolRequirement, RegExp> = {\n\trequires_write: /^(edit|write|multi_?edit|apply_patch)$/,\n\trequires_shell: /^bash$/,\n\trequires_tests: /^bash$/,\n\trequires_git: /^bash$/,\n\trequires_web: /web|fetch|search_web|http/,\n\trequires_browser: /browser|playwright|puppeteer/,\n\trequires_database: /sql|database|\\bdb\\b|postgres|mysql/,\n};\n\n/**\n * Tools to deactivate for this task: tools that match only requirements the task does not have.\n * `bash` serves shell, tests and git, so it stays when any of them is needed.\n */\nexport function unneededTools(activeTools: readonly string[], tools: Record<ToolRequirement, boolean>): string[] {\n\treturn activeTools.filter((name) => {\n\t\tconst matched = (Object.keys(TOOL_PATTERNS) as ToolRequirement[]).filter((id) => TOOL_PATTERNS[id].test(name));\n\t\treturn matched.length > 0 && matched.every((id) => !tools[id]);\n\t});\n}\n\nconst VALIDATION_HINTS: Record<ValidationLevel, string> = {\n\tnone: \"no check needed\",\n\tsyntax: \"check formatting or syntax of what changed\",\n\tcompile: \"run the type check or build\",\n\tunit_test: \"run the unit tests that cover the change\",\n\tintegration_test: \"run the integration or end-to-end tests of the affected flow\",\n\treview: \"review the change for security, data and architectural impact, then run the relevant tests\",\n};\n\nconst TOOL_LABELS: Record<ToolRequirement, string> = {\n\trequires_write: \"file edits\",\n\trequires_shell: \"shell\",\n\trequires_tests: \"tests\",\n\trequires_web: \"web\",\n\trequires_browser: \"browser\",\n\trequires_database: \"database\",\n\trequires_git: \"git\",\n};\n\n/** The advisory plan sent to the model next to the user's message. */\nexport function renderPlanMessage(\n\tassessment: TaskAssessment,\n\tpolicy: PolicyDecision,\n\tskills: readonly string[],\n\tenforcedTools: readonly string[],\n): string {\n\tconst percent = (value: number) => `${Math.round(value * 100)}%`;\n\tconst needed = (Object.keys(TOOL_LABELS) as ToolRequirement[]).filter((id) => assessment.tools[id]);\n\tconst notNeeded = (Object.keys(TOOL_LABELS) as ToolRequirement[]).filter((id) => !assessment.tools[id]);\n\tconst lines = [\n\t\t\"[laya:plan] Execution plan from the harness router for this request (guidance, not a constraint):\",\n\t\t`- Task: ${assessment.task.type.replaceAll(\"_\", \" \")}, scope ${assessment.task.scope.replaceAll(\"_\", \" \")}, complexity ${percent(assessment.task.complexity)}, risk ${percent(assessment.task.risk)}.`,\n\t\t`- Role: act as ${assessment.agent} (${AGENTS[assessment.agent]}).`,\n\t];\n\tif (skills.length > 0)\n\t\tlines.push(`- Skills likely relevant: ${skills.join(\", \")}. Load one only when a step needs it.`);\n\tlines.push(\n\t\t`- Tools: ${needed.length > 0 ? `needs ${needed.map((id) => TOOL_LABELS[id]).join(\", \")}` : \"read-only\"}${\n\t\t\tnotNeeded.length > 0 ? `; not expected: ${notNeeded.map((id) => TOOL_LABELS[id]).join(\", \")}` : \"\"\n\t\t}.`,\n\t);\n\tif (enforcedTools.length > 0) lines.push(`- Deactivated for this request: ${enforcedTools.join(\", \")}.`);\n\tif (policy.validation.level !== \"none\") {\n\t\tlines.push(\n\t\t\t`- Validation${policy.validation.required ? \" (required)\" : \"\"}: ${VALIDATION_HINTS[policy.validation.level]} before reporting completion.`,\n\t\t);\n\t}\n\tif (policy.rules.length > 0)\n\t\tlines.push(`- Sensitive area: ${policy.rules.join(\", \")}. Prefer the safest correct change.`);\n\tif (assessment.task.ambiguity >= 0.75) lines.push(\"- The request is open: confirm the goal before large changes.\");\n\treturn lines.join(\"\\n\");\n}\n"]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Laya runs in Docker, never on the host: an image carries Python, torch, the `laya` package, the
|
|
3
|
+
* shipped model and the scripts that serve and train it. Relay pulls the image, keeps one server
|
|
4
|
+
* container running and starts a short-lived container for each training. The host only keeps
|
|
5
|
+
* Relay's own data (training exercises, the model registry, telemetry).
|
|
6
|
+
*/
|
|
7
|
+
export interface LayaModelFile {
|
|
8
|
+
/** Path inside the model directory, with forward slashes. */
|
|
9
|
+
path: string;
|
|
10
|
+
/** File name in the model repository. */
|
|
11
|
+
asset: string;
|
|
12
|
+
size: number;
|
|
13
|
+
sha256: string;
|
|
14
|
+
}
|
|
15
|
+
export interface LayaModelManifest {
|
|
16
|
+
version: string;
|
|
17
|
+
/** pip requirement for the Laya runtime. */
|
|
18
|
+
layaPackage: string;
|
|
19
|
+
/** Directory URL the model files are downloaded from when the image is built, ending in a slash. */
|
|
20
|
+
baseUrl: string;
|
|
21
|
+
files: LayaModelFile[];
|
|
22
|
+
}
|
|
23
|
+
/** Registry the images are published to. */
|
|
24
|
+
export declare const LAYA_IMAGE_REPOSITORY = "ghcr.io/eltonssouza/relay-laya";
|
|
25
|
+
/** The server container, kept running between Relay sessions. */
|
|
26
|
+
export declare const LAYA_CONTAINER = "relay-laya";
|
|
27
|
+
/** The container of a running training; removed when it ends. */
|
|
28
|
+
export declare const LAYA_TRAIN_CONTAINER = "relay-laya-train";
|
|
29
|
+
/** Volume with the models trained from sessions. */
|
|
30
|
+
export declare const LAYA_MODELS_VOLUME = "relay-laya-models";
|
|
31
|
+
/** Port the server listens on inside its container. */
|
|
32
|
+
export declare const LAYA_CONTAINER_PORT = 8000;
|
|
33
|
+
/** Paths inside the image and its containers. */
|
|
34
|
+
export declare const LAYA_IMAGE_PATHS: {
|
|
35
|
+
readonly shippedModel: "/opt/laya/model";
|
|
36
|
+
readonly trainedModels: "/data/models";
|
|
37
|
+
readonly serveScript: "/opt/laya/serve.py";
|
|
38
|
+
readonly trainScript: "/opt/laya/train.py";
|
|
39
|
+
readonly workspace: "/workspace";
|
|
40
|
+
};
|
|
41
|
+
/** `cpu` runs everywhere; `cuda` carries the CUDA build of torch for machines with an NVIDIA GPU. */
|
|
42
|
+
export type LayaImageVariant = "cpu" | "cuda";
|
|
43
|
+
/** Serves the model with the System One protocol Relay's `typesafe-system-one` classifier speaks. */
|
|
44
|
+
export declare const SERVE_SCRIPT = "import argparse\n\nimport laya\nimport torch\nimport uvicorn\nfrom fastapi import FastAPI, HTTPException\n\nparser = argparse.ArgumentParser()\nparser.add_argument(\"--model\", required=True)\nparser.add_argument(\"--host\", default=\"127.0.0.1\")\nparser.add_argument(\"--port\", type=int, default=8000)\nargs = parser.parse_args()\n\nagent = laya.load(args.model, device=\"cuda\" if torch.cuda.is_available() else \"cpu\")\napp = FastAPI(title=\"relay-laya\")\n\n\n@app.get(\"/health\")\ndef health():\n return {\"ok\": True, \"model\": args.model}\n\n\n@app.post(\"/v1/systemone\")\ndef system_one(body: dict):\n if \"state\" not in body or not body.get(\"questions\"):\n raise HTTPException(422, \"send 'state' and 'questions'\")\n return agent.predict(body[\"state\"], body[\"questions\"])\n\n\nuvicorn.run(app, host=args.host, port=args.port, log_level=\"warning\")\n";
|
|
45
|
+
/** Downloads the shipped model while the image is built, checking every file against the manifest. */
|
|
46
|
+
export declare const FETCH_MODEL_SCRIPT = "import hashlib\nimport json\nimport pathlib\nimport sys\nimport urllib.request\n\nmanifest = json.loads(pathlib.Path(sys.argv[1]).read_text(encoding=\"utf-8\"))\ntarget = pathlib.Path(sys.argv[2])\nfor file in manifest[\"files\"]:\n path = target / file[\"path\"]\n path.parent.mkdir(parents=True, exist_ok=True)\n digest = hashlib.sha256()\n size = 0\n with urllib.request.urlopen(manifest[\"baseUrl\"] + file[\"asset\"]) as response, open(path, \"wb\") as out:\n while chunk := response.read(1 << 20):\n digest.update(chunk)\n size += len(chunk)\n out.write(chunk)\n if size != file[\"size\"] or digest.hexdigest() != file[\"sha256\"]:\n sys.exit(f\"{file['asset']} does not match the manifest (size {size}, sha256 {digest.hexdigest()})\")\n print(f\"{file['path']} ok\", flush=True)\n";
|
|
47
|
+
/** Files of the image's build context, by name. */
|
|
48
|
+
export declare function layaImageContext(manifest: LayaModelManifest, variant: LayaImageVariant): Record<string, string>;
|
|
49
|
+
/**
|
|
50
|
+
* Image tag: the model version, the variant and a hash of the build context. Changing a script, a
|
|
51
|
+
* dependency or the model gives a new tag, so a Relay version always runs the image built from its
|
|
52
|
+
* own sources, and an unchanged context reuses the published image.
|
|
53
|
+
*/
|
|
54
|
+
export declare function layaImageTag(manifest: LayaModelManifest, variant: LayaImageVariant): string;
|
|
55
|
+
export declare function layaImage(manifest: LayaModelManifest, variant: LayaImageVariant): string;
|
|
56
|
+
/** Container path of a model trained from sessions. */
|
|
57
|
+
export declare function trainedModelPath(name: string): string;
|
|
58
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/extensions/laya/runtime.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,MAAM,WAAW,aAAa;IAC7B,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,oGAAoG;IACpG,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,aAAa,EAAE,CAAC;CACvB;AAED,4CAA4C;AAC5C,eAAO,MAAM,qBAAqB,mCAAmC,CAAC;AACtE,iEAAiE;AACjE,eAAO,MAAM,cAAc,eAAe,CAAC;AAC3C,iEAAiE;AACjE,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD,oDAAoD;AACpD,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AACtD,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC,iDAAiD;AACjD,eAAO,MAAM,gBAAgB;aAC5B,YAAY,EAAE,iBAAiB;aAC/B,aAAa,EAAE,cAAc;aAC7B,WAAW,EAAE,oBAAoB;aACjC,WAAW,EAAE,oBAAoB;aACjC,SAAS,EAAE,YAAY;CACd,CAAC;AAEX,qGAAqG;AACrG,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,CAAC;AAO9C,qGAAqG;AACrG,eAAO,MAAM,YAAY,83BA8BxB,CAAC;AAEF,sGAAsG;AACtG,eAAO,MAAM,kBAAkB,41BAqB9B,CAAC;AAqBF,mDAAmD;AACnD,wBAAgB,g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