@aibyzero/byz 0.0.0 → 0.1.1
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 +15 -0
- package/LICENSE +21 -0
- package/README.md +148 -5
- package/dist/cli.js +55 -0
- package/dist/runtime/bun/cli.d.ts +3 -0
- package/dist/runtime/bun/cli.d.ts.map +1 -0
- package/dist/runtime/bun/cli.js +11 -0
- package/dist/runtime/bun/cli.js.map +1 -0
- package/dist/runtime/bun/register-bedrock.d.ts +2 -0
- package/dist/runtime/bun/register-bedrock.d.ts.map +1 -0
- package/dist/runtime/bun/register-bedrock.js +4 -0
- package/dist/runtime/bun/register-bedrock.js.map +1 -0
- package/dist/runtime/bun/restore-sandbox-env.d.ts +17 -0
- package/dist/runtime/bun/restore-sandbox-env.d.ts.map +1 -0
- package/dist/runtime/bun/restore-sandbox-env.js +36 -0
- package/dist/runtime/bun/restore-sandbox-env.js.map +1 -0
- package/dist/runtime/bundle/chunks/anthropic-messages-JWX2WP65.js +45 -0
- package/dist/runtime/bundle/chunks/anthropic.js +75 -0
- package/dist/runtime/bundle/chunks/azure-openai-responses-5ENVCQ7U.js +2 -0
- package/dist/runtime/bundle/chunks/bedrock-converse-stream.js +74 -0
- package/dist/runtime/bundle/chunks/chunk-4L3WN2XY.js +2 -0
- package/dist/runtime/bundle/chunks/chunk-6CYCI3EJ.js +12 -0
- package/dist/runtime/bundle/chunks/chunk-6R7UI4IY.js +2 -0
- package/dist/runtime/bundle/chunks/chunk-AXIIZGTV.js +2 -0
- package/dist/runtime/bundle/chunks/chunk-CCRJHU72.js +1547 -0
- package/dist/runtime/bundle/chunks/chunk-DRQDKNXA.js +2 -0
- package/dist/runtime/bundle/chunks/chunk-GMWCTUPB.js +2 -0
- package/dist/runtime/bundle/chunks/chunk-GPPBJGBU.js +50 -0
- package/dist/runtime/bundle/chunks/chunk-JUUC5AZY.js +2 -0
- package/dist/runtime/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
- package/dist/runtime/bundle/chunks/chunk-MNAIPA3J.js +2 -0
- package/dist/runtime/bundle/chunks/chunk-NBBFIJUL.js +11 -0
- package/dist/runtime/bundle/chunks/chunk-NUHFSC37.js +25 -0
- package/dist/runtime/bundle/chunks/chunk-PGXDEOVV.js +2 -0
- package/dist/runtime/bundle/chunks/chunk-PJACZCIR.js +2 -0
- package/dist/runtime/bundle/chunks/chunk-PRRNXB7S.js +2 -0
- package/dist/runtime/bundle/chunks/chunk-TEPMHNKQ.js +2 -0
- package/dist/runtime/bundle/chunks/chunk-TRDNDS6A.js +4 -0
- package/dist/runtime/bundle/chunks/chunk-UAQELI3K.js +2 -0
- package/dist/runtime/bundle/chunks/chunk-XDUWOHPL.js +6 -0
- package/dist/runtime/bundle/chunks/chunk-XNGRGP62.js +2 -0
- package/dist/runtime/bundle/chunks/dist-RDWOYWHR.js +13 -0
- package/dist/runtime/bundle/chunks/github-copilot.js +2 -0
- package/dist/runtime/bundle/chunks/google-generative-ai-XDKMGBCJ.js +2 -0
- package/dist/runtime/bundle/chunks/google-vertex-D5FGEO3Y.js +2 -0
- package/dist/runtime/bundle/chunks/image-resize-worker.js +2 -0
- package/dist/runtime/bundle/chunks/kimi-coding.js +2 -0
- package/dist/runtime/bundle/chunks/lib-HGQMNYVT.js +9 -0
- package/dist/runtime/bundle/chunks/mistral-conversations-YK73UAOZ.js +5 -0
- package/dist/runtime/bundle/chunks/multipart-parser-SQ6GDJL7.js +3 -0
- package/dist/runtime/bundle/chunks/openai-codex-responses-GJVBJXLB.js +8 -0
- package/dist/runtime/bundle/chunks/openai-codex.js +75 -0
- package/dist/runtime/bundle/chunks/openai-completions-XGHMB3UO.js +7 -0
- package/dist/runtime/bundle/chunks/openai-responses-BSOJMSEV.js +2 -0
- package/dist/runtime/bundle/chunks/openrouter-images-N4XVVFSD.js +2 -0
- package/dist/runtime/bundle/chunks/openrouter.js +75 -0
- package/dist/runtime/bundle/chunks/pi-messages-TPFH44NP.js +8 -0
- package/dist/runtime/bundle/chunks/radius.js +75 -0
- package/dist/runtime/bundle/chunks/src-UK77SYZE.js +4 -0
- package/dist/runtime/bundle/chunks/xai.js +2 -0
- package/dist/runtime/bundle/cli.js +3 -0
- package/dist/runtime/bundle/client.js +2 -0
- package/dist/runtime/bundle/index.js +2 -0
- package/dist/runtime/bundle/rpc-entry.js +3 -0
- package/dist/runtime/cli/args.d.ts +61 -0
- package/dist/runtime/cli/args.d.ts.map +1 -0
- package/dist/runtime/cli/args.js +439 -0
- package/dist/runtime/cli/args.js.map +1 -0
- package/dist/runtime/cli/auth-check.d.ts +19 -0
- package/dist/runtime/cli/auth-check.d.ts.map +1 -0
- package/dist/runtime/cli/auth-check.js +50 -0
- package/dist/runtime/cli/auth-check.js.map +1 -0
- package/dist/runtime/cli/auth-command.d.ts +24 -0
- package/dist/runtime/cli/auth-command.d.ts.map +1 -0
- package/dist/runtime/cli/auth-command.js +103 -0
- package/dist/runtime/cli/auth-command.js.map +1 -0
- package/dist/runtime/cli/config-selector.d.ts +16 -0
- package/dist/runtime/cli/config-selector.d.ts.map +1 -0
- package/dist/runtime/cli/config-selector.js +31 -0
- package/dist/runtime/cli/config-selector.js.map +1 -0
- package/dist/runtime/cli/credential-print.d.ts +13 -0
- package/dist/runtime/cli/credential-print.d.ts.map +1 -0
- package/dist/runtime/cli/credential-print.js +76 -0
- package/dist/runtime/cli/credential-print.js.map +1 -0
- package/dist/runtime/cli/experimental/auth.d.ts +16 -0
- package/dist/runtime/cli/experimental/auth.d.ts.map +1 -0
- package/dist/runtime/cli/experimental/auth.js +13 -0
- package/dist/runtime/cli/experimental/auth.js.map +1 -0
- package/dist/runtime/cli/experimental/cli.d.ts +6 -0
- package/dist/runtime/cli/experimental/cli.d.ts.map +1 -0
- package/dist/runtime/cli/experimental/cli.js +5 -0
- package/dist/runtime/cli/experimental/cli.js.map +1 -0
- package/dist/runtime/cli/experimental/command-options.d.ts +17 -0
- package/dist/runtime/cli/experimental/command-options.d.ts.map +1 -0
- package/dist/runtime/cli/experimental/command-options.js +35 -0
- package/dist/runtime/cli/experimental/command-options.js.map +1 -0
- package/dist/runtime/cli/experimental/command.d.ts +63 -0
- package/dist/runtime/cli/experimental/command.d.ts.map +1 -0
- package/dist/runtime/cli/experimental/command.js +130 -0
- package/dist/runtime/cli/experimental/command.js.map +1 -0
- package/dist/runtime/cli/experimental/commands/client.d.ts +13 -0
- package/dist/runtime/cli/experimental/commands/client.d.ts.map +1 -0
- package/dist/runtime/cli/experimental/commands/client.js +25 -0
- package/dist/runtime/cli/experimental/commands/client.js.map +1 -0
- package/dist/runtime/cli/experimental/commands/pi.d.ts +15 -0
- package/dist/runtime/cli/experimental/commands/pi.d.ts.map +1 -0
- package/dist/runtime/cli/experimental/commands/pi.js +28 -0
- package/dist/runtime/cli/experimental/commands/pi.js.map +1 -0
- package/dist/runtime/cli/experimental/commands/server.d.ts +13 -0
- package/dist/runtime/cli/experimental/commands/server.d.ts.map +1 -0
- package/dist/runtime/cli/experimental/commands/server.js +25 -0
- package/dist/runtime/cli/experimental/commands/server.js.map +1 -0
- package/dist/runtime/cli/experimental/transport-address.d.ts +10 -0
- package/dist/runtime/cli/experimental/transport-address.d.ts.map +1 -0
- package/dist/runtime/cli/experimental/transport-address.js +38 -0
- package/dist/runtime/cli/experimental/transport-address.js.map +1 -0
- package/dist/runtime/cli/file-processor.d.ts +15 -0
- package/dist/runtime/cli/file-processor.d.ts.map +1 -0
- package/dist/runtime/cli/file-processor.js +71 -0
- package/dist/runtime/cli/file-processor.js.map +1 -0
- package/dist/runtime/cli/initial-message.d.ts +18 -0
- package/dist/runtime/cli/initial-message.d.ts.map +1 -0
- package/dist/runtime/cli/initial-message.js +22 -0
- package/dist/runtime/cli/initial-message.js.map +1 -0
- package/dist/runtime/cli/list-models.d.ts +9 -0
- package/dist/runtime/cli/list-models.d.ts.map +1 -0
- package/dist/runtime/cli/list-models.js +98 -0
- package/dist/runtime/cli/list-models.js.map +1 -0
- package/dist/runtime/cli/project-trust.d.ts +10 -0
- package/dist/runtime/cli/project-trust.d.ts.map +1 -0
- package/dist/runtime/cli/project-trust.js +48 -0
- package/dist/runtime/cli/project-trust.js.map +1 -0
- package/dist/runtime/cli/session-picker.d.ts +10 -0
- package/dist/runtime/cli/session-picker.d.ts.map +1 -0
- package/dist/runtime/cli/session-picker.js +36 -0
- package/dist/runtime/cli/session-picker.js.map +1 -0
- package/dist/runtime/cli/startup-ui.d.ts +20 -0
- package/dist/runtime/cli/startup-ui.d.ts.map +1 -0
- package/dist/runtime/cli/startup-ui.js +184 -0
- package/dist/runtime/cli/startup-ui.js.map +1 -0
- package/dist/runtime/cli.d.ts +3 -0
- package/dist/runtime/cli.d.ts.map +1 -0
- package/dist/runtime/cli.js +19 -0
- package/dist/runtime/cli.js.map +1 -0
- package/dist/runtime/client/index.d.ts +3 -0
- package/dist/runtime/client/index.d.ts.map +1 -0
- package/dist/runtime/client/index.js +3 -0
- package/dist/runtime/client/index.js.map +1 -0
- package/dist/runtime/client/remote-session.d.ts +53 -0
- package/dist/runtime/client/remote-session.d.ts.map +1 -0
- package/dist/runtime/client/remote-session.js +340 -0
- package/dist/runtime/client/remote-session.js.map +1 -0
- package/dist/runtime/client/transcript.d.ts +12 -0
- package/dist/runtime/client/transcript.d.ts.map +1 -0
- package/dist/runtime/client/transcript.js +98 -0
- package/dist/runtime/client/transcript.js.map +1 -0
- package/dist/runtime/config.d.ts +98 -0
- package/dist/runtime/config.d.ts.map +1 -0
- package/dist/runtime/config.js +469 -0
- package/dist/runtime/config.js.map +1 -0
- package/dist/runtime/core/agent-session-runtime.d.ts +119 -0
- package/dist/runtime/core/agent-session-runtime.d.ts.map +1 -0
- package/dist/runtime/core/agent-session-runtime.js +309 -0
- package/dist/runtime/core/agent-session-runtime.js.map +1 -0
- package/dist/runtime/core/agent-session-services.d.ts +86 -0
- package/dist/runtime/core/agent-session-services.d.ts.map +1 -0
- package/dist/runtime/core/agent-session-services.js +134 -0
- package/dist/runtime/core/agent-session-services.js.map +1 -0
- package/dist/runtime/core/agent-session.d.ts +678 -0
- package/dist/runtime/core/agent-session.d.ts.map +1 -0
- package/dist/runtime/core/agent-session.js +2808 -0
- package/dist/runtime/core/agent-session.js.map +1 -0
- package/dist/runtime/core/auth-guidance.d.ts +5 -0
- package/dist/runtime/core/auth-guidance.d.ts.map +1 -0
- package/dist/runtime/core/auth-guidance.js +21 -0
- package/dist/runtime/core/auth-guidance.js.map +1 -0
- package/dist/runtime/core/auth-storage.d.ts +72 -0
- package/dist/runtime/core/auth-storage.d.ts.map +1 -0
- package/dist/runtime/core/auth-storage.js +426 -0
- package/dist/runtime/core/auth-storage.js.map +1 -0
- package/dist/runtime/core/bash-executor.d.ts +32 -0
- package/dist/runtime/core/bash-executor.d.ts.map +1 -0
- package/dist/runtime/core/bash-executor.js +111 -0
- package/dist/runtime/core/bash-executor.js.map +1 -0
- package/dist/runtime/core/cache-stats.d.ts +49 -0
- package/dist/runtime/core/cache-stats.d.ts.map +1 -0
- package/dist/runtime/core/cache-stats.js +101 -0
- package/dist/runtime/core/cache-stats.js.map +1 -0
- package/dist/runtime/core/compaction/branch-summarization.d.ts +98 -0
- package/dist/runtime/core/compaction/branch-summarization.d.ts.map +1 -0
- package/dist/runtime/core/compaction/branch-summarization.js +250 -0
- package/dist/runtime/core/compaction/branch-summarization.js.map +1 -0
- package/dist/runtime/core/compaction/compaction.d.ts +143 -0
- package/dist/runtime/core/compaction/compaction.d.ts.map +1 -0
- package/dist/runtime/core/compaction/compaction.js +669 -0
- package/dist/runtime/core/compaction/compaction.js.map +1 -0
- package/dist/runtime/core/compaction/index.d.ts +7 -0
- package/dist/runtime/core/compaction/index.d.ts.map +1 -0
- package/dist/runtime/core/compaction/index.js +7 -0
- package/dist/runtime/core/compaction/index.js.map +1 -0
- package/dist/runtime/core/compaction/utils.d.ts +38 -0
- package/dist/runtime/core/compaction/utils.d.ts.map +1 -0
- package/dist/runtime/core/compaction/utils.js +142 -0
- package/dist/runtime/core/compaction/utils.js.map +1 -0
- package/dist/runtime/core/defaults.d.ts +4 -0
- package/dist/runtime/core/defaults.d.ts.map +1 -0
- package/dist/runtime/core/defaults.js +11 -0
- package/dist/runtime/core/defaults.js.map +1 -0
- package/dist/runtime/core/diagnostics.d.ts +15 -0
- package/dist/runtime/core/diagnostics.d.ts.map +1 -0
- package/dist/runtime/core/diagnostics.js +2 -0
- package/dist/runtime/core/diagnostics.js.map +1 -0
- package/dist/runtime/core/event-bus.d.ts +9 -0
- package/dist/runtime/core/event-bus.d.ts.map +1 -0
- package/dist/runtime/core/event-bus.js +25 -0
- package/dist/runtime/core/event-bus.js.map +1 -0
- package/dist/runtime/core/exec.d.ts +29 -0
- package/dist/runtime/core/exec.d.ts.map +1 -0
- package/dist/runtime/core/exec.js +75 -0
- package/dist/runtime/core/exec.js.map +1 -0
- package/dist/runtime/core/experimental.d.ts +6 -0
- package/dist/runtime/core/experimental.d.ts.map +1 -0
- package/dist/runtime/core/experimental.js +8 -0
- package/dist/runtime/core/experimental.js.map +1 -0
- package/dist/runtime/core/export-html/ansi-to-html.d.ts +22 -0
- package/dist/runtime/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/dist/runtime/core/export-html/ansi-to-html.js +249 -0
- package/dist/runtime/core/export-html/ansi-to-html.js.map +1 -0
- package/dist/runtime/core/export-html/index.d.ts +37 -0
- package/dist/runtime/core/export-html/index.d.ts.map +1 -0
- package/dist/runtime/core/export-html/index.js +226 -0
- package/dist/runtime/core/export-html/index.js.map +1 -0
- package/dist/runtime/core/export-html/template.css +1066 -0
- package/dist/runtime/core/export-html/template.html +55 -0
- package/dist/runtime/core/export-html/template.js +1864 -0
- package/dist/runtime/core/export-html/tool-renderer.d.ts +34 -0
- package/dist/runtime/core/export-html/tool-renderer.d.ts.map +1 -0
- package/dist/runtime/core/export-html/tool-renderer.js +108 -0
- package/dist/runtime/core/export-html/tool-renderer.js.map +1 -0
- package/dist/runtime/core/export-html/vendor/highlight.min.js +1213 -0
- package/dist/runtime/core/export-html/vendor/marked.min.js +78 -0
- package/dist/runtime/core/extensions/index.d.ts +12 -0
- package/dist/runtime/core/extensions/index.d.ts.map +1 -0
- package/dist/runtime/core/extensions/index.js +9 -0
- package/dist/runtime/core/extensions/index.js.map +1 -0
- package/dist/runtime/core/extensions/loader.d.ts +23 -0
- package/dist/runtime/core/extensions/loader.d.ts.map +1 -0
- package/dist/runtime/core/extensions/loader.js +648 -0
- package/dist/runtime/core/extensions/loader.js.map +1 -0
- package/dist/runtime/core/extensions/runner.d.ts +173 -0
- package/dist/runtime/core/extensions/runner.d.ts.map +1 -0
- package/dist/runtime/core/extensions/runner.js +967 -0
- package/dist/runtime/core/extensions/runner.js.map +1 -0
- package/dist/runtime/core/extensions/types.d.ts +1328 -0
- package/dist/runtime/core/extensions/types.d.ts.map +1 -0
- package/dist/runtime/core/extensions/types.js +48 -0
- package/dist/runtime/core/extensions/types.js.map +1 -0
- package/dist/runtime/core/extensions/wrapper.d.ts +20 -0
- package/dist/runtime/core/extensions/wrapper.d.ts.map +1 -0
- package/dist/runtime/core/extensions/wrapper.js +41 -0
- package/dist/runtime/core/extensions/wrapper.js.map +1 -0
- package/dist/runtime/core/footer-data-provider.d.ts +64 -0
- package/dist/runtime/core/footer-data-provider.d.ts.map +1 -0
- package/dist/runtime/core/footer-data-provider.js +338 -0
- package/dist/runtime/core/footer-data-provider.js.map +1 -0
- package/dist/runtime/core/http-dispatcher.d.ts +22 -0
- package/dist/runtime/core/http-dispatcher.d.ts.map +1 -0
- package/dist/runtime/core/http-dispatcher.js +96 -0
- package/dist/runtime/core/http-dispatcher.js.map +1 -0
- package/dist/runtime/core/index.d.ts +13 -0
- package/dist/runtime/core/index.d.ts.map +1 -0
- package/dist/runtime/core/index.js +13 -0
- package/dist/runtime/core/index.js.map +1 -0
- package/dist/runtime/core/keybindings.d.ts +423 -0
- package/dist/runtime/core/keybindings.d.ts.map +1 -0
- package/dist/runtime/core/keybindings.js +317 -0
- package/dist/runtime/core/keybindings.js.map +1 -0
- package/dist/runtime/core/messages.d.ts +77 -0
- package/dist/runtime/core/messages.d.ts.map +1 -0
- package/dist/runtime/core/messages.js +123 -0
- package/dist/runtime/core/messages.js.map +1 -0
- package/dist/runtime/core/model-config.d.ts +576 -0
- package/dist/runtime/core/model-config.d.ts.map +1 -0
- package/dist/runtime/core/model-config.js +256 -0
- package/dist/runtime/core/model-config.js.map +1 -0
- package/dist/runtime/core/model-registry.d.ts +45 -0
- package/dist/runtime/core/model-registry.d.ts.map +1 -0
- package/dist/runtime/core/model-registry.js +107 -0
- package/dist/runtime/core/model-registry.js.map +1 -0
- package/dist/runtime/core/model-resolver.d.ts +124 -0
- package/dist/runtime/core/model-resolver.d.ts.map +1 -0
- package/dist/runtime/core/model-resolver.js +589 -0
- package/dist/runtime/core/model-resolver.js.map +1 -0
- package/dist/runtime/core/model-runtime.d.ts +100 -0
- package/dist/runtime/core/model-runtime.d.ts.map +1 -0
- package/dist/runtime/core/model-runtime.js +599 -0
- package/dist/runtime/core/model-runtime.js.map +1 -0
- package/dist/runtime/core/models-store.d.ts +22 -0
- package/dist/runtime/core/models-store.d.ts.map +1 -0
- package/dist/runtime/core/models-store.js +115 -0
- package/dist/runtime/core/models-store.js.map +1 -0
- package/dist/runtime/core/output-guard.d.ts +7 -0
- package/dist/runtime/core/output-guard.d.ts.map +1 -0
- package/dist/runtime/core/output-guard.js +89 -0
- package/dist/runtime/core/output-guard.js.map +1 -0
- package/dist/runtime/core/package-manager.d.ts +213 -0
- package/dist/runtime/core/package-manager.d.ts.map +1 -0
- package/dist/runtime/core/package-manager.js +2177 -0
- package/dist/runtime/core/package-manager.js.map +1 -0
- package/dist/runtime/core/pi-manifest.d.ts +8 -0
- package/dist/runtime/core/pi-manifest.d.ts.map +1 -0
- package/dist/runtime/core/pi-manifest.js +26 -0
- package/dist/runtime/core/pi-manifest.js.map +1 -0
- package/dist/runtime/core/project-trust.d.ts +15 -0
- package/dist/runtime/core/project-trust.d.ts.map +1 -0
- package/dist/runtime/core/project-trust.js +59 -0
- package/dist/runtime/core/project-trust.js.map +1 -0
- package/dist/runtime/core/prompt-templates.d.ts +54 -0
- package/dist/runtime/core/prompt-templates.d.ts.map +1 -0
- package/dist/runtime/core/prompt-templates.js +236 -0
- package/dist/runtime/core/prompt-templates.js.map +1 -0
- package/dist/runtime/core/provider-attribution.d.ts +4 -0
- package/dist/runtime/core/provider-attribution.d.ts.map +1 -0
- package/dist/runtime/core/provider-attribution.js +72 -0
- package/dist/runtime/core/provider-attribution.js.map +1 -0
- package/dist/runtime/core/provider-composer.d.ts +58 -0
- package/dist/runtime/core/provider-composer.d.ts.map +1 -0
- package/dist/runtime/core/provider-composer.js +396 -0
- package/dist/runtime/core/provider-composer.js.map +1 -0
- package/dist/runtime/core/radius.d.ts +2 -0
- package/dist/runtime/core/radius.d.ts.map +1 -0
- package/dist/runtime/core/radius.js +2 -0
- package/dist/runtime/core/radius.js.map +1 -0
- package/dist/runtime/core/remote-catalog-provider.d.ts +5 -0
- package/dist/runtime/core/remote-catalog-provider.d.ts.map +1 -0
- package/dist/runtime/core/remote-catalog-provider.js +122 -0
- package/dist/runtime/core/remote-catalog-provider.js.map +1 -0
- package/dist/runtime/core/resolve-config-value.d.ts +30 -0
- package/dist/runtime/core/resolve-config-value.d.ts.map +1 -0
- package/dist/runtime/core/resolve-config-value.js +247 -0
- package/dist/runtime/core/resolve-config-value.js.map +1 -0
- package/dist/runtime/core/resource-loader.d.ts +221 -0
- package/dist/runtime/core/resource-loader.d.ts.map +1 -0
- package/dist/runtime/core/resource-loader.js +875 -0
- package/dist/runtime/core/resource-loader.js.map +1 -0
- package/dist/runtime/core/runtime-credentials.d.ts +15 -0
- package/dist/runtime/core/runtime-credentials.d.ts.map +1 -0
- package/dist/runtime/core/runtime-credentials.js +39 -0
- package/dist/runtime/core/runtime-credentials.js.map +1 -0
- package/dist/runtime/core/sdk.d.ts +108 -0
- package/dist/runtime/core/sdk.d.ts.map +1 -0
- package/dist/runtime/core/sdk.js +275 -0
- package/dist/runtime/core/sdk.js.map +1 -0
- package/dist/runtime/core/session-cwd.d.ts +19 -0
- package/dist/runtime/core/session-cwd.d.ts.map +1 -0
- package/dist/runtime/core/session-cwd.js +38 -0
- package/dist/runtime/core/session-cwd.js.map +1 -0
- package/dist/runtime/core/session-export.d.ts +4 -0
- package/dist/runtime/core/session-export.d.ts.map +1 -0
- package/dist/runtime/core/session-export.js +32 -0
- package/dist/runtime/core/session-export.js.map +1 -0
- package/dist/runtime/core/session-manager.d.ts +356 -0
- package/dist/runtime/core/session-manager.d.ts.map +1 -0
- package/dist/runtime/core/session-manager.js +1341 -0
- package/dist/runtime/core/session-manager.js.map +1 -0
- package/dist/runtime/core/settings-diagnostics.d.ts +9 -0
- package/dist/runtime/core/settings-diagnostics.d.ts.map +1 -0
- package/dist/runtime/core/settings-diagnostics.js +21 -0
- package/dist/runtime/core/settings-diagnostics.js.map +1 -0
- package/dist/runtime/core/settings-manager.d.ts +324 -0
- package/dist/runtime/core/settings-manager.d.ts.map +1 -0
- package/dist/runtime/core/settings-manager.js +980 -0
- package/dist/runtime/core/settings-manager.js.map +1 -0
- package/dist/runtime/core/skills.d.ts +60 -0
- package/dist/runtime/core/skills.d.ts.map +1 -0
- package/dist/runtime/core/skills.js +405 -0
- package/dist/runtime/core/skills.js.map +1 -0
- package/dist/runtime/core/slash-commands.d.ts +15 -0
- package/dist/runtime/core/slash-commands.d.ts.map +1 -0
- package/dist/runtime/core/slash-commands.js +27 -0
- package/dist/runtime/core/slash-commands.js.map +1 -0
- package/dist/runtime/core/source-info.d.ts +18 -0
- package/dist/runtime/core/source-info.d.ts.map +1 -0
- package/dist/runtime/core/source-info.js +19 -0
- package/dist/runtime/core/source-info.js.map +1 -0
- package/dist/runtime/core/system-prompt.d.ts +28 -0
- package/dist/runtime/core/system-prompt.d.ts.map +1 -0
- package/dist/runtime/core/system-prompt.js +119 -0
- package/dist/runtime/core/system-prompt.js.map +1 -0
- package/dist/runtime/core/telemetry.d.ts +3 -0
- package/dist/runtime/core/telemetry.d.ts.map +1 -0
- package/dist/runtime/core/telemetry.js +9 -0
- package/dist/runtime/core/telemetry.js.map +1 -0
- package/dist/runtime/core/timings.d.ts +10 -0
- package/dist/runtime/core/timings.d.ts.map +1 -0
- package/dist/runtime/core/timings.js +41 -0
- package/dist/runtime/core/timings.js.map +1 -0
- package/dist/runtime/core/tools/bash.d.ts +87 -0
- package/dist/runtime/core/tools/bash.d.ts.map +1 -0
- package/dist/runtime/core/tools/bash.js +410 -0
- package/dist/runtime/core/tools/bash.js.map +1 -0
- package/dist/runtime/core/tools/edit-diff.d.ts +101 -0
- package/dist/runtime/core/tools/edit-diff.d.ts.map +1 -0
- package/dist/runtime/core/tools/edit-diff.js +421 -0
- package/dist/runtime/core/tools/edit-diff.js.map +1 -0
- package/dist/runtime/core/tools/edit.d.ts +55 -0
- package/dist/runtime/core/tools/edit.d.ts.map +1 -0
- package/dist/runtime/core/tools/edit.js +306 -0
- package/dist/runtime/core/tools/edit.js.map +1 -0
- package/dist/runtime/core/tools/file-mutation-queue.d.ts +6 -0
- package/dist/runtime/core/tools/file-mutation-queue.d.ts.map +1 -0
- package/dist/runtime/core/tools/file-mutation-queue.js +52 -0
- package/dist/runtime/core/tools/file-mutation-queue.js.map +1 -0
- package/dist/runtime/core/tools/find.d.ts +42 -0
- package/dist/runtime/core/tools/find.d.ts.map +1 -0
- package/dist/runtime/core/tools/find.js +302 -0
- package/dist/runtime/core/tools/find.js.map +1 -0
- package/dist/runtime/core/tools/grep.d.ts +41 -0
- package/dist/runtime/core/tools/grep.d.ts.map +1 -0
- package/dist/runtime/core/tools/grep.js +308 -0
- package/dist/runtime/core/tools/grep.js.map +1 -0
- package/dist/runtime/core/tools/index.d.ts +43 -0
- package/dist/runtime/core/tools/index.d.ts.map +1 -0
- package/dist/runtime/core/tools/index.js +129 -0
- package/dist/runtime/core/tools/index.js.map +1 -0
- package/dist/runtime/core/tools/ls.d.ts +41 -0
- package/dist/runtime/core/tools/ls.d.ts.map +1 -0
- package/dist/runtime/core/tools/ls.js +171 -0
- package/dist/runtime/core/tools/ls.js.map +1 -0
- package/dist/runtime/core/tools/output-accumulator.d.ts +52 -0
- package/dist/runtime/core/tools/output-accumulator.d.ts.map +1 -0
- package/dist/runtime/core/tools/output-accumulator.js +184 -0
- package/dist/runtime/core/tools/output-accumulator.js.map +1 -0
- package/dist/runtime/core/tools/path-utils.d.ts +10 -0
- package/dist/runtime/core/tools/path-utils.d.ts.map +1 -0
- package/dist/runtime/core/tools/path-utils.js +99 -0
- package/dist/runtime/core/tools/path-utils.js.map +1 -0
- package/dist/runtime/core/tools/powershell.d.ts +16 -0
- package/dist/runtime/core/tools/powershell.d.ts.map +1 -0
- package/dist/runtime/core/tools/powershell.js +39 -0
- package/dist/runtime/core/tools/powershell.js.map +1 -0
- package/dist/runtime/core/tools/read.d.ts +39 -0
- package/dist/runtime/core/tools/read.d.ts.map +1 -0
- package/dist/runtime/core/tools/read.js +282 -0
- package/dist/runtime/core/tools/read.js.map +1 -0
- package/dist/runtime/core/tools/render-utils.d.ts +24 -0
- package/dist/runtime/core/tools/render-utils.d.ts.map +1 -0
- package/dist/runtime/core/tools/render-utils.js +65 -0
- package/dist/runtime/core/tools/render-utils.js.map +1 -0
- package/dist/runtime/core/tools/tool-definition-wrapper.d.ts +14 -0
- package/dist/runtime/core/tools/tool-definition-wrapper.d.ts.map +1 -0
- package/dist/runtime/core/tools/tool-definition-wrapper.js +36 -0
- package/dist/runtime/core/tools/tool-definition-wrapper.js.map +1 -0
- package/dist/runtime/core/tools/truncate.d.ts +70 -0
- package/dist/runtime/core/tools/truncate.d.ts.map +1 -0
- package/dist/runtime/core/tools/truncate.js +215 -0
- package/dist/runtime/core/tools/truncate.js.map +1 -0
- package/dist/runtime/core/tools/write.d.ts +30 -0
- package/dist/runtime/core/tools/write.d.ts.map +1 -0
- package/dist/runtime/core/tools/write.js +203 -0
- package/dist/runtime/core/tools/write.js.map +1 -0
- package/dist/runtime/core/trust-manager.d.ts +36 -0
- package/dist/runtime/core/trust-manager.d.ts.map +1 -0
- package/dist/runtime/core/trust-manager.js +203 -0
- package/dist/runtime/core/trust-manager.js.map +1 -0
- package/dist/runtime/core/usage-totals.d.ts +19 -0
- package/dist/runtime/core/usage-totals.d.ts.map +1 -0
- package/dist/runtime/core/usage-totals.js +52 -0
- package/dist/runtime/core/usage-totals.js.map +1 -0
- package/dist/runtime/extensions/index.d.ts +3 -0
- package/dist/runtime/extensions/index.d.ts.map +1 -0
- package/dist/runtime/extensions/index.js +3 -0
- package/dist/runtime/extensions/index.js.map +1 -0
- package/dist/runtime/extensions/llama/client.d.ts +67 -0
- package/dist/runtime/extensions/llama/client.d.ts.map +1 -0
- package/dist/runtime/extensions/llama/client.js +309 -0
- package/dist/runtime/extensions/llama/client.js.map +1 -0
- package/dist/runtime/extensions/llama/huggingface.d.ts +23 -0
- package/dist/runtime/extensions/llama/huggingface.d.ts.map +1 -0
- package/dist/runtime/extensions/llama/huggingface.js +141 -0
- package/dist/runtime/extensions/llama/huggingface.js.map +1 -0
- package/dist/runtime/extensions/llama/index.d.ts +3 -0
- package/dist/runtime/extensions/llama/index.d.ts.map +1 -0
- package/dist/runtime/extensions/llama/index.js +219 -0
- package/dist/runtime/extensions/llama/index.js.map +1 -0
- package/dist/runtime/extensions/llama/provider.d.ts +12 -0
- package/dist/runtime/extensions/llama/provider.d.ts.map +1 -0
- package/dist/runtime/extensions/llama/provider.js +146 -0
- package/dist/runtime/extensions/llama/provider.js.map +1 -0
- package/dist/runtime/extensions/llama/ui.d.ts +42 -0
- package/dist/runtime/extensions/llama/ui.d.ts.map +1 -0
- package/dist/runtime/extensions/llama/ui.js +416 -0
- package/dist/runtime/extensions/llama/ui.js.map +1 -0
- package/dist/runtime/index.d.ts +37 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +49 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/main.d.ts +16 -0
- package/dist/runtime/main.d.ts.map +1 -0
- package/dist/runtime/main.js +799 -0
- package/dist/runtime/main.js.map +1 -0
- package/dist/runtime/migrations.d.ts +33 -0
- package/dist/runtime/migrations.d.ts.map +1 -0
- package/dist/runtime/migrations.js +282 -0
- package/dist/runtime/migrations.js.map +1 -0
- package/dist/runtime/modes/index.d.ts +10 -0
- package/dist/runtime/modes/index.d.ts.map +1 -0
- package/dist/runtime/modes/index.js +8 -0
- package/dist/runtime/modes/index.js.map +1 -0
- package/dist/runtime/modes/interactive/assets/clankolas.png +0 -0
- package/dist/runtime/modes/interactive/components/armin.d.ts +34 -0
- package/dist/runtime/modes/interactive/components/armin.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/armin.js +333 -0
- package/dist/runtime/modes/interactive/components/armin.js.map +1 -0
- package/dist/runtime/modes/interactive/components/assistant-message.d.ts +25 -0
- package/dist/runtime/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/assistant-message.js +150 -0
- package/dist/runtime/modes/interactive/components/assistant-message.js.map +1 -0
- package/dist/runtime/modes/interactive/components/bash-execution.d.ts +34 -0
- package/dist/runtime/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/bash-execution.js +175 -0
- package/dist/runtime/modes/interactive/components/bash-execution.js.map +1 -0
- package/dist/runtime/modes/interactive/components/bordered-loader.d.ts +16 -0
- package/dist/runtime/modes/interactive/components/bordered-loader.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/bordered-loader.js +54 -0
- package/dist/runtime/modes/interactive/components/bordered-loader.js.map +1 -0
- package/dist/runtime/modes/interactive/components/branch-summary-message.d.ts +16 -0
- package/dist/runtime/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/branch-summary-message.js +44 -0
- package/dist/runtime/modes/interactive/components/branch-summary-message.js.map +1 -0
- package/dist/runtime/modes/interactive/components/compaction-summary-message.d.ts +16 -0
- package/dist/runtime/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/compaction-summary-message.js +45 -0
- package/dist/runtime/modes/interactive/components/compaction-summary-message.js.map +1 -0
- package/dist/runtime/modes/interactive/components/config-selector.d.ts +102 -0
- package/dist/runtime/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/config-selector.js +761 -0
- package/dist/runtime/modes/interactive/components/config-selector.js.map +1 -0
- package/dist/runtime/modes/interactive/components/countdown-timer.d.ts +14 -0
- package/dist/runtime/modes/interactive/components/countdown-timer.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/countdown-timer.js +33 -0
- package/dist/runtime/modes/interactive/components/countdown-timer.js.map +1 -0
- package/dist/runtime/modes/interactive/components/custom-editor.d.ts +21 -0
- package/dist/runtime/modes/interactive/components/custom-editor.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/custom-editor.js +77 -0
- package/dist/runtime/modes/interactive/components/custom-editor.js.map +1 -0
- package/dist/runtime/modes/interactive/components/custom-entry.d.ts +19 -0
- package/dist/runtime/modes/interactive/components/custom-entry.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/custom-entry.js +52 -0
- package/dist/runtime/modes/interactive/components/custom-entry.js.map +1 -0
- package/dist/runtime/modes/interactive/components/custom-message.d.ts +22 -0
- package/dist/runtime/modes/interactive/components/custom-message.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/custom-message.js +87 -0
- package/dist/runtime/modes/interactive/components/custom-message.js.map +1 -0
- package/dist/runtime/modes/interactive/components/daxnuts.d.ts +23 -0
- package/dist/runtime/modes/interactive/components/daxnuts.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/daxnuts.js +140 -0
- package/dist/runtime/modes/interactive/components/daxnuts.js.map +1 -0
- package/dist/runtime/modes/interactive/components/diff.d.ts +12 -0
- package/dist/runtime/modes/interactive/components/diff.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/diff.js +133 -0
- package/dist/runtime/modes/interactive/components/diff.js.map +1 -0
- package/dist/runtime/modes/interactive/components/dynamic-border.d.ts +15 -0
- package/dist/runtime/modes/interactive/components/dynamic-border.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/dynamic-border.js +21 -0
- package/dist/runtime/modes/interactive/components/dynamic-border.js.map +1 -0
- package/dist/runtime/modes/interactive/components/earendil-announcement.d.ts +5 -0
- package/dist/runtime/modes/interactive/components/earendil-announcement.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/earendil-announcement.js +40 -0
- package/dist/runtime/modes/interactive/components/earendil-announcement.js.map +1 -0
- package/dist/runtime/modes/interactive/components/extension-editor.d.ts +21 -0
- package/dist/runtime/modes/interactive/components/extension-editor.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/extension-editor.js +98 -0
- package/dist/runtime/modes/interactive/components/extension-editor.js.map +1 -0
- package/dist/runtime/modes/interactive/components/extension-input.d.ts +23 -0
- package/dist/runtime/modes/interactive/components/extension-input.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/extension-input.js +61 -0
- package/dist/runtime/modes/interactive/components/extension-input.js.map +1 -0
- package/dist/runtime/modes/interactive/components/extension-selector.d.ts +26 -0
- package/dist/runtime/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/extension-selector.js +83 -0
- package/dist/runtime/modes/interactive/components/extension-selector.js.map +1 -0
- package/dist/runtime/modes/interactive/components/first-time-setup.d.ts +25 -0
- package/dist/runtime/modes/interactive/components/first-time-setup.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/first-time-setup.js +103 -0
- package/dist/runtime/modes/interactive/components/first-time-setup.js.map +1 -0
- package/dist/runtime/modes/interactive/components/footer.d.ts +32 -0
- package/dist/runtime/modes/interactive/components/footer.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/footer.js +222 -0
- package/dist/runtime/modes/interactive/components/footer.js.map +1 -0
- package/dist/runtime/modes/interactive/components/index.d.ts +34 -0
- package/dist/runtime/modes/interactive/components/index.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/index.js +35 -0
- package/dist/runtime/modes/interactive/components/index.js.map +1 -0
- package/dist/runtime/modes/interactive/components/keybinding-hints.d.ts +13 -0
- package/dist/runtime/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/keybinding-hints.js +36 -0
- package/dist/runtime/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/dist/runtime/modes/interactive/components/login-dialog.d.ts +52 -0
- package/dist/runtime/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/login-dialog.js +188 -0
- package/dist/runtime/modes/interactive/components/login-dialog.js.map +1 -0
- package/dist/runtime/modes/interactive/components/markdown-transform.d.ts +3 -0
- package/dist/runtime/modes/interactive/components/markdown-transform.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/markdown-transform.js +19 -0
- package/dist/runtime/modes/interactive/components/markdown-transform.js.map +1 -0
- package/dist/runtime/modes/interactive/components/mermaid.d.ts +11 -0
- package/dist/runtime/modes/interactive/components/mermaid.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/mermaid.js +75 -0
- package/dist/runtime/modes/interactive/components/mermaid.js.map +1 -0
- package/dist/runtime/modes/interactive/components/model-selector.d.ts +60 -0
- package/dist/runtime/modes/interactive/components/model-selector.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/model-selector.js +370 -0
- package/dist/runtime/modes/interactive/components/model-selector.js.map +1 -0
- package/dist/runtime/modes/interactive/components/oauth-selector.d.ts +33 -0
- package/dist/runtime/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/oauth-selector.js +163 -0
- package/dist/runtime/modes/interactive/components/oauth-selector.js.map +1 -0
- package/dist/runtime/modes/interactive/components/scoped-models-selector.d.ts +46 -0
- package/dist/runtime/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/scoped-models-selector.js +328 -0
- package/dist/runtime/modes/interactive/components/scoped-models-selector.js.map +1 -0
- package/dist/runtime/modes/interactive/components/session-selector-search.d.ts +23 -0
- package/dist/runtime/modes/interactive/components/session-selector-search.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/session-selector-search.js +155 -0
- package/dist/runtime/modes/interactive/components/session-selector-search.js.map +1 -0
- package/dist/runtime/modes/interactive/components/session-selector.d.ts +95 -0
- package/dist/runtime/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/session-selector.js +867 -0
- package/dist/runtime/modes/interactive/components/session-selector.js.map +1 -0
- package/dist/runtime/modes/interactive/components/settings-selector.d.ts +90 -0
- package/dist/runtime/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/settings-selector.js +695 -0
- package/dist/runtime/modes/interactive/components/settings-selector.js.map +1 -0
- package/dist/runtime/modes/interactive/components/settings-submenu.d.ts +72 -0
- package/dist/runtime/modes/interactive/components/settings-submenu.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/settings-submenu.js +165 -0
- package/dist/runtime/modes/interactive/components/settings-submenu.js.map +1 -0
- package/dist/runtime/modes/interactive/components/show-images-selector.d.ts +10 -0
- package/dist/runtime/modes/interactive/components/show-images-selector.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/show-images-selector.js +39 -0
- package/dist/runtime/modes/interactive/components/show-images-selector.js.map +1 -0
- package/dist/runtime/modes/interactive/components/skill-invocation-message.d.ts +17 -0
- package/dist/runtime/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/skill-invocation-message.js +47 -0
- package/dist/runtime/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/dist/runtime/modes/interactive/components/status-indicator.d.ts +28 -0
- package/dist/runtime/modes/interactive/components/status-indicator.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/status-indicator.js +60 -0
- package/dist/runtime/modes/interactive/components/status-indicator.js.map +1 -0
- package/dist/runtime/modes/interactive/components/theme-selector.d.ts +11 -0
- package/dist/runtime/modes/interactive/components/theme-selector.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/theme-selector.js +50 -0
- package/dist/runtime/modes/interactive/components/theme-selector.js.map +1 -0
- package/dist/runtime/modes/interactive/components/thinking-selector.d.ts +23 -0
- package/dist/runtime/modes/interactive/components/thinking-selector.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/thinking-selector.js +109 -0
- package/dist/runtime/modes/interactive/components/thinking-selector.js.map +1 -0
- package/dist/runtime/modes/interactive/components/tool-execution.d.ts +63 -0
- package/dist/runtime/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/tool-execution.js +326 -0
- package/dist/runtime/modes/interactive/components/tool-execution.js.map +1 -0
- package/dist/runtime/modes/interactive/components/tree-selector.d.ts +94 -0
- package/dist/runtime/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/tree-selector.js +1245 -0
- package/dist/runtime/modes/interactive/components/tree-selector.js.map +1 -0
- package/dist/runtime/modes/interactive/components/trust-selector.d.ts +23 -0
- package/dist/runtime/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/trust-selector.js +91 -0
- package/dist/runtime/modes/interactive/components/trust-selector.js.map +1 -0
- package/dist/runtime/modes/interactive/components/user-message-selector.d.ts +30 -0
- package/dist/runtime/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/user-message-selector.js +114 -0
- package/dist/runtime/modes/interactive/components/user-message-selector.js.map +1 -0
- package/dist/runtime/modes/interactive/components/user-message.d.ts +16 -0
- package/dist/runtime/modes/interactive/components/user-message.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/user-message.js +49 -0
- package/dist/runtime/modes/interactive/components/user-message.js.map +1 -0
- package/dist/runtime/modes/interactive/components/visual-truncate.d.ts +24 -0
- package/dist/runtime/modes/interactive/components/visual-truncate.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/components/visual-truncate.js +33 -0
- package/dist/runtime/modes/interactive/components/visual-truncate.js.map +1 -0
- package/dist/runtime/modes/interactive/external-editor.d.ts +12 -0
- package/dist/runtime/modes/interactive/external-editor.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/external-editor.js +38 -0
- package/dist/runtime/modes/interactive/external-editor.js.map +1 -0
- package/dist/runtime/modes/interactive/interactive-mode.d.ts +446 -0
- package/dist/runtime/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/interactive-mode.js +5509 -0
- package/dist/runtime/modes/interactive/interactive-mode.js.map +1 -0
- package/dist/runtime/modes/interactive/model-catalog-refresh.d.ts +7 -0
- package/dist/runtime/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/model-catalog-refresh.js +34 -0
- package/dist/runtime/modes/interactive/model-catalog-refresh.js.map +1 -0
- package/dist/runtime/modes/interactive/model-search.d.ts +12 -0
- package/dist/runtime/modes/interactive/model-search.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/model-search.js +15 -0
- package/dist/runtime/modes/interactive/model-search.js.map +1 -0
- package/dist/runtime/modes/interactive/session-share.d.ts +16 -0
- package/dist/runtime/modes/interactive/session-share.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/session-share.js +188 -0
- package/dist/runtime/modes/interactive/session-share.js.map +1 -0
- package/dist/runtime/modes/interactive/theme/dark.json +90 -0
- package/dist/runtime/modes/interactive/theme/light.json +89 -0
- package/dist/runtime/modes/interactive/theme/theme-controller.d.ts +40 -0
- package/dist/runtime/modes/interactive/theme/theme-controller.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/theme/theme-controller.js +125 -0
- package/dist/runtime/modes/interactive/theme/theme-controller.js.map +1 -0
- package/dist/runtime/modes/interactive/theme/theme-schema.json +352 -0
- package/dist/runtime/modes/interactive/theme/theme.d.ts +122 -0
- package/dist/runtime/modes/interactive/theme/theme.d.ts.map +1 -0
- package/dist/runtime/modes/interactive/theme/theme.js +1092 -0
- package/dist/runtime/modes/interactive/theme/theme.js.map +1 -0
- package/dist/runtime/modes/json-event.d.ts +34 -0
- package/dist/runtime/modes/json-event.d.ts.map +1 -0
- package/dist/runtime/modes/json-event.js +29 -0
- package/dist/runtime/modes/json-event.js.map +1 -0
- package/dist/runtime/modes/print-mode.d.ts +28 -0
- package/dist/runtime/modes/print-mode.d.ts.map +1 -0
- package/dist/runtime/modes/print-mode.js +142 -0
- package/dist/runtime/modes/print-mode.js.map +1 -0
- package/dist/runtime/modes/rpc/jsonl.d.ts +17 -0
- package/dist/runtime/modes/rpc/jsonl.d.ts.map +1 -0
- package/dist/runtime/modes/rpc/jsonl.js +49 -0
- package/dist/runtime/modes/rpc/jsonl.js.map +1 -0
- package/dist/runtime/modes/rpc/rpc-client.d.ts +254 -0
- package/dist/runtime/modes/rpc/rpc-client.d.ts.map +1 -0
- package/dist/runtime/modes/rpc/rpc-client.js +495 -0
- package/dist/runtime/modes/rpc/rpc-client.js.map +1 -0
- package/dist/runtime/modes/rpc/rpc-mode.d.ts +20 -0
- package/dist/runtime/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/dist/runtime/modes/rpc/rpc-mode.js +657 -0
- package/dist/runtime/modes/rpc/rpc-mode.js.map +1 -0
- package/dist/runtime/modes/rpc/rpc-types.d.ts +469 -0
- package/dist/runtime/modes/rpc/rpc-types.d.ts.map +1 -0
- package/dist/runtime/modes/rpc/rpc-types.js +8 -0
- package/dist/runtime/modes/rpc/rpc-types.js.map +1 -0
- package/dist/runtime/package-manager-cli.d.ts +9 -0
- package/dist/runtime/package-manager-cli.d.ts.map +1 -0
- package/dist/runtime/package-manager-cli.js +961 -0
- package/dist/runtime/package-manager-cli.js.map +1 -0
- package/dist/runtime/rpc-entry.d.ts +3 -0
- package/dist/runtime/rpc-entry.d.ts.map +1 -0
- package/dist/runtime/rpc-entry.js +11 -0
- package/dist/runtime/rpc-entry.js.map +1 -0
- package/dist/runtime/server/create-harness.d.ts +26 -0
- package/dist/runtime/server/create-harness.d.ts.map +1 -0
- package/dist/runtime/server/create-harness.js +106 -0
- package/dist/runtime/server/create-harness.js.map +1 -0
- package/dist/runtime/utils/abort.d.ts +5 -0
- package/dist/runtime/utils/abort.d.ts.map +1 -0
- package/dist/runtime/utils/abort.js +48 -0
- package/dist/runtime/utils/abort.js.map +1 -0
- package/dist/runtime/utils/ansi.d.ts +2 -0
- package/dist/runtime/utils/ansi.d.ts.map +1 -0
- package/dist/runtime/utils/ansi.js +52 -0
- package/dist/runtime/utils/ansi.js.map +1 -0
- package/dist/runtime/utils/changelog.d.ts +22 -0
- package/dist/runtime/utils/changelog.d.ts.map +1 -0
- package/dist/runtime/utils/changelog.js +165 -0
- package/dist/runtime/utils/changelog.js.map +1 -0
- package/dist/runtime/utils/child-process.d.ts +18 -0
- package/dist/runtime/utils/child-process.d.ts.map +1 -0
- package/dist/runtime/utils/child-process.js +106 -0
- package/dist/runtime/utils/child-process.js.map +1 -0
- package/dist/runtime/utils/clipboard-image.d.ts +11 -0
- package/dist/runtime/utils/clipboard-image.d.ts.map +1 -0
- package/dist/runtime/utils/clipboard-image.js +245 -0
- package/dist/runtime/utils/clipboard-image.js.map +1 -0
- package/dist/runtime/utils/clipboard-native.d.ts +11 -0
- package/dist/runtime/utils/clipboard-native.d.ts.map +1 -0
- package/dist/runtime/utils/clipboard-native.js +20 -0
- package/dist/runtime/utils/clipboard-native.js.map +1 -0
- package/dist/runtime/utils/clipboard.d.ts +4 -0
- package/dist/runtime/utils/clipboard.d.ts.map +1 -0
- package/dist/runtime/utils/clipboard.js +161 -0
- package/dist/runtime/utils/clipboard.js.map +1 -0
- package/dist/runtime/utils/deprecation.d.ts +4 -0
- package/dist/runtime/utils/deprecation.d.ts.map +1 -0
- package/dist/runtime/utils/deprecation.js +13 -0
- package/dist/runtime/utils/deprecation.js.map +1 -0
- package/dist/runtime/utils/exif-orientation.d.ts +5 -0
- package/dist/runtime/utils/exif-orientation.d.ts.map +1 -0
- package/dist/runtime/utils/exif-orientation.js +158 -0
- package/dist/runtime/utils/exif-orientation.js.map +1 -0
- package/dist/runtime/utils/frontmatter.d.ts +8 -0
- package/dist/runtime/utils/frontmatter.d.ts.map +1 -0
- package/dist/runtime/utils/frontmatter.js +27 -0
- package/dist/runtime/utils/frontmatter.js.map +1 -0
- package/dist/runtime/utils/fs-watch.d.ts +5 -0
- package/dist/runtime/utils/fs-watch.d.ts.map +1 -0
- package/dist/runtime/utils/fs-watch.js +25 -0
- package/dist/runtime/utils/fs-watch.js.map +1 -0
- package/dist/runtime/utils/git.d.ts +26 -0
- package/dist/runtime/utils/git.d.ts.map +1 -0
- package/dist/runtime/utils/git.js +195 -0
- package/dist/runtime/utils/git.js.map +1 -0
- package/dist/runtime/utils/html.d.ts +7 -0
- package/dist/runtime/utils/html.d.ts.map +1 -0
- package/dist/runtime/utils/html.js +40 -0
- package/dist/runtime/utils/html.js.map +1 -0
- package/dist/runtime/utils/image-convert.d.ts +10 -0
- package/dist/runtime/utils/image-convert.d.ts.map +1 -0
- package/dist/runtime/utils/image-convert.js +45 -0
- package/dist/runtime/utils/image-convert.js.map +1 -0
- package/dist/runtime/utils/image-process.d.ts +18 -0
- package/dist/runtime/utils/image-process.d.ts.map +1 -0
- package/dist/runtime/utils/image-process.js +83 -0
- package/dist/runtime/utils/image-process.js.map +1 -0
- package/dist/runtime/utils/image-resize-core.d.ts +30 -0
- package/dist/runtime/utils/image-resize-core.d.ts.map +1 -0
- package/dist/runtime/utils/image-resize-core.js +124 -0
- package/dist/runtime/utils/image-resize-core.js.map +1 -0
- package/dist/runtime/utils/image-resize-worker.d.ts +2 -0
- package/dist/runtime/utils/image-resize-worker.d.ts.map +1 -0
- package/dist/runtime/utils/image-resize-worker.js +31 -0
- package/dist/runtime/utils/image-resize-worker.js.map +1 -0
- package/dist/runtime/utils/image-resize.d.ts +16 -0
- package/dist/runtime/utils/image-resize.d.ts.map +1 -0
- package/dist/runtime/utils/image-resize.js +97 -0
- package/dist/runtime/utils/image-resize.js.map +1 -0
- package/dist/runtime/utils/json.d.ts +3 -0
- package/dist/runtime/utils/json.d.ts.map +1 -0
- package/dist/runtime/utils/json.js +7 -0
- package/dist/runtime/utils/json.js.map +1 -0
- package/dist/runtime/utils/management-http.d.ts +25 -0
- package/dist/runtime/utils/management-http.d.ts.map +1 -0
- package/dist/runtime/utils/management-http.js +54 -0
- package/dist/runtime/utils/management-http.js.map +1 -0
- package/dist/runtime/utils/mime.d.ts +3 -0
- package/dist/runtime/utils/mime.d.ts.map +1 -0
- package/dist/runtime/utils/mime.js +110 -0
- package/dist/runtime/utils/mime.js.map +1 -0
- package/dist/runtime/utils/open-browser.d.ts +9 -0
- package/dist/runtime/utils/open-browser.d.ts.map +1 -0
- package/dist/runtime/utils/open-browser.js +22 -0
- package/dist/runtime/utils/open-browser.js.map +1 -0
- package/dist/runtime/utils/paths.d.ts +34 -0
- package/dist/runtime/utils/paths.d.ts.map +1 -0
- package/dist/runtime/utils/paths.js +114 -0
- package/dist/runtime/utils/paths.js.map +1 -0
- package/dist/runtime/utils/photon.d.ts +21 -0
- package/dist/runtime/utils/photon.d.ts.map +1 -0
- package/dist/runtime/utils/photon.js +121 -0
- package/dist/runtime/utils/photon.js.map +1 -0
- package/dist/runtime/utils/pi-user-agent.d.ts +2 -0
- package/dist/runtime/utils/pi-user-agent.d.ts.map +1 -0
- package/dist/runtime/utils/pi-user-agent.js +5 -0
- package/dist/runtime/utils/pi-user-agent.js.map +1 -0
- package/dist/runtime/utils/shell.d.ts +34 -0
- package/dist/runtime/utils/shell.d.ts.map +1 -0
- package/dist/runtime/utils/shell.js +214 -0
- package/dist/runtime/utils/shell.js.map +1 -0
- package/dist/runtime/utils/sleep.d.ts +5 -0
- package/dist/runtime/utils/sleep.d.ts.map +1 -0
- package/dist/runtime/utils/sleep.js +17 -0
- package/dist/runtime/utils/sleep.js.map +1 -0
- package/dist/runtime/utils/syntax-highlight.d.ts +13 -0
- package/dist/runtime/utils/syntax-highlight.d.ts.map +1 -0
- package/dist/runtime/utils/syntax-highlight.js +177 -0
- package/dist/runtime/utils/syntax-highlight.js.map +1 -0
- package/dist/runtime/utils/text.d.ts +8 -0
- package/dist/runtime/utils/text.d.ts.map +1 -0
- package/dist/runtime/utils/text.js +9 -0
- package/dist/runtime/utils/text.js.map +1 -0
- package/dist/runtime/utils/tool-result-images.d.ts +19 -0
- package/dist/runtime/utils/tool-result-images.d.ts.map +1 -0
- package/dist/runtime/utils/tool-result-images.js +45 -0
- package/dist/runtime/utils/tool-result-images.js.map +1 -0
- package/dist/runtime/utils/tools-manager.d.ts +12 -0
- package/dist/runtime/utils/tools-manager.d.ts.map +1 -0
- package/dist/runtime/utils/tools-manager.js +321 -0
- package/dist/runtime/utils/tools-manager.js.map +1 -0
- package/dist/runtime/utils/version-check.d.ts +19 -0
- package/dist/runtime/utils/version-check.d.ts.map +1 -0
- package/dist/runtime/utils/version-check.js +79 -0
- package/dist/runtime/utils/version-check.js.map +1 -0
- package/dist/runtime/utils/windows-self-update.d.ts +3 -0
- package/dist/runtime/utils/windows-self-update.d.ts.map +1 -0
- package/dist/runtime/utils/windows-self-update.js +77 -0
- package/dist/runtime/utils/windows-self-update.js.map +1 -0
- package/dist/update.js +134 -0
- package/dist/workflows.js +391 -0
- package/docs/compaction.md +416 -0
- package/docs/containerization.md +111 -0
- package/docs/custom-provider.md +777 -0
- package/docs/development.md +71 -0
- package/docs/docs.json +156 -0
- package/docs/environment-variables.md +94 -0
- package/docs/extensions.md +3002 -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 +84 -0
- package/docs/json.md +98 -0
- package/docs/keybindings.md +236 -0
- package/docs/llama-cpp.md +101 -0
- package/docs/models.md +571 -0
- package/docs/packages.md +228 -0
- package/docs/prompt-templates.md +96 -0
- package/docs/providers.md +317 -0
- package/docs/quickstart.md +167 -0
- package/docs/rpc.md +1618 -0
- package/docs/sdk.md +1219 -0
- package/docs/security.md +59 -0
- package/docs/session-format.md +438 -0
- package/docs/sessions.md +145 -0
- package/docs/settings.md +361 -0
- package/docs/shell-aliases.md +13 -0
- package/docs/skills.md +232 -0
- package/docs/terminal-setup.md +165 -0
- package/docs/termux.md +127 -0
- package/docs/themes.md +320 -0
- package/docs/tmux.md +63 -0
- package/docs/tui.md +942 -0
- package/docs/usage.md +310 -0
- package/docs/windows.md +39 -0
- package/examples/README.md +25 -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 +249 -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 +611 -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/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_pi.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 +79 -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/gondolin/index.ts +531 -0
- package/examples/extensions/gondolin/package-lock.json +185 -0
- package/examples/extensions/gondolin/package.json +19 -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/kimi-deferred-tools.ts +61 -0
- package/examples/extensions/mac-system-theme.ts +47 -0
- package/examples/extensions/message-renderer.ts +59 -0
- package/examples/extensions/minimal-mode.ts +426 -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 +97 -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 +286 -0
- package/examples/extensions/questionnaire.ts +448 -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 +177 -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/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.md +10 -0
- package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -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/rpc-extension-ui.ts +641 -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 +75 -0
- package/examples/sdk/04-skills.ts +55 -0
- package/examples/sdk/05-tools.ts +48 -0
- package/examples/sdk/06-extensions.ts +99 -0
- package/examples/sdk/07-context-files.ts +47 -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/README.md +140 -0
- package/package.json +65 -12
- package/upstream.json +6 -0
- package/workflows/cm/LICENSE +21 -0
- package/workflows/cm/README.md +333 -0
- package/workflows/cm/THIRD_PARTY_NOTICES.md +29 -0
- package/workflows/cm/VERSION +1 -0
- package/workflows/cm/agents/cm-backend-agent.md +34 -0
- package/workflows/cm/agents/cm-contract-agent.md +34 -0
- package/workflows/cm/agents/cm-database-agent.md +34 -0
- package/workflows/cm/agents/cm-frontend-agent.md +33 -0
- package/workflows/cm/agents/cm-miniprogram-agent.md +33 -0
- package/workflows/cm/agents/cm-ui-agent.md +34 -0
- package/workflows/cm/assets/docs/command-picker-mobile.svg +56 -0
- package/workflows/cm/assets/docs/command-picker.svg +56 -0
- package/workflows/cm/assets/docs/user-guide-hero-mobile.svg +35 -0
- package/workflows/cm/assets/docs/user-guide-hero.svg +36 -0
- package/workflows/cm/assets/readme/delivery-flow.svg +86 -0
- package/workflows/cm/assets/readme/hero.svg +77 -0
- package/workflows/cm/assets/readme/recovery-record.svg +73 -0
- package/workflows/cm/assets/readme/test-evidence.svg +64 -0
- package/workflows/cm/compat/claude-commands/cm-ai.md +3 -0
- package/workflows/cm/compat/claude-commands/cm-check.md +3 -0
- package/workflows/cm/compat/claude-commands/cm-fix.md +3 -0
- package/workflows/cm/compat/claude-commands/cm-idea.md +3 -0
- package/workflows/cm/compat/claude-commands/cm-init.md +3 -0
- package/workflows/cm/compat/claude-commands/cm-prd.md +3 -0
- package/workflows/cm/compat/claude-commands/cm-refactor.md +3 -0
- package/workflows/cm/compat/claude-commands/cm-test.md +3 -0
- package/workflows/cm/docs/architecture.md +130 -0
- package/workflows/cm/docs/fixes/.reviews/fix-manifest-runtime-checkbox-drift-r1.md +33 -0
- package/workflows/cm/docs/fixes/.reviews/fix-manifest-runtime-checkbox-drift-r2.md +31 -0
- package/workflows/cm/docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-a1-handoff.json +56 -0
- package/workflows/cm/docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-a2-handoff.json +85 -0
- package/workflows/cm/docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-r1.md +53 -0
- package/workflows/cm/docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-r2.md +80 -0
- package/workflows/cm/docs/fixes/.reviews/fix-review-evidence-scope-honesty-T-FIX-review-evidence-scope-honesty-a1-handoff.json +35 -0
- package/workflows/cm/docs/fixes/.reviews/fix-review-evidence-scope-honesty-T-FIX-review-evidence-scope-honesty-r1.md +33 -0
- package/workflows/cm/docs/fixes/.reviews/fix-windows-cp1252-log-output-r1.md +30 -0
- package/workflows/cm/docs/fixes/.reviews/fix-windows-cp1252-log-output-r2.md +16 -0
- package/workflows/cm/docs/fixes/.reviews/openai-compatible-depth-fixture-T-FIX-openai-compatible-depth-fixture-a1-handoff.json +40 -0
- package/workflows/cm/docs/fixes/.reviews/openai-compatible-depth-fixture-T-FIX-openai-compatible-depth-fixture-r1.md +30 -0
- package/workflows/cm/docs/fixes/20260729-windows-cp1252-log-output.md +65 -0
- package/workflows/cm/docs/fixes/20260804-manifest-runtime-checkbox-drift.md +67 -0
- package/workflows/cm/docs/fixes/20260806-model-call-boundary-identity.md +80 -0
- package/workflows/cm/docs/fixes/20260807-prelanding-integrity.md +58 -0
- package/workflows/cm/docs/fixes/20260826-openai-compatible-depth-fixture.md +39 -0
- package/workflows/cm/docs/installation.md +149 -0
- package/workflows/cm/docs/sample-prd/prd-funding-rate-alert.md +42 -0
- package/workflows/cm/docs/sample-specs/docs//351/234/200/346/261/202/347/244/272/344/276/213.md +24 -0
- package/workflows/cm/docs/user-guide.md +521 -0
- package/workflows/cm/docs//351/207/215/346/236/204/346/265/201/347/250/213/350/256/276/350/256/241/README.md +19 -0
- package/workflows/cm/docs//351/207/215/346/236/204/346/265/201/347/250/213/350/256/276/350/256/241/refactor-flow.excalidraw +3650 -0
- package/workflows/cm/docs//351/207/215/346/236/204/346/265/201/347/250/213/350/256/276/350/256/241/refactor-flow.mp4 +0 -0
- package/workflows/cm/docs//351/207/215/346/236/204/346/265/201/347/250/213/350/256/276/350/256/241/refactor-flow.png +0 -0
- package/workflows/cm/docs//351/207/215/346/236/204/346/265/201/347/250/213/350/256/276/350/256/241/refactor-flow.spec.json +223 -0
- package/workflows/cm/package.json +45 -0
- package/workflows/cm/runtime/external-expert.md +302 -0
- package/workflows/cm/runtime/logging.md +206 -0
- package/workflows/cm/runtime/model-efficiency.md +201 -0
- package/workflows/cm/runtime/orchestration.md +113 -0
- package/workflows/cm/runtime/project-context.md +37 -0
- package/workflows/cm/runtime/review.md +114 -0
- package/workflows/cm/runtime/task-gates.md +114 -0
- package/workflows/cm/runtime/task-handoff.schema.json +103 -0
- package/workflows/cm/runtime/test-contract.md +212 -0
- package/workflows/cm/runtime/workflow-config.md +115 -0
- package/workflows/cm/runtime/workflow-routing.md +82 -0
- package/workflows/cm/scripts/cm-check-runtime.ps1 +69 -0
- package/workflows/cm/scripts/cm-check-runtime.sh +866 -0
- package/workflows/cm/scripts/cm-log-event.py +1270 -0
- package/workflows/cm/scripts/cm-openai-compatible-call.py +661 -0
- package/workflows/cm/scripts/cm-prd-review-gate.py +319 -0
- package/workflows/cm/scripts/cm-prd-timing.py +272 -0
- package/workflows/cm/scripts/cm-spec-manifest.py +171 -0
- package/workflows/cm/scripts/cm-task-gate.py +760 -0
- package/workflows/cm/scripts/cm-usage-report.py +516 -0
- package/workflows/cm/scripts/cm_workflow_config.py +612 -0
- package/workflows/cm/scripts/scan-public-safety.py +89 -0
- package/workflows/cm/scripts/test-cm-log-event.py +1213 -0
- package/workflows/cm/scripts/test-cm-openai-compatible-call.py +1185 -0
- package/workflows/cm/scripts/test-cm-prd-review-gate.py +243 -0
- package/workflows/cm/scripts/test-cm-prd-timing.py +168 -0
- package/workflows/cm/scripts/test-cm-usage-report.py +584 -0
- package/workflows/cm/scripts/test-shell-compat.sh +338 -0
- package/workflows/cm/scripts/test-spec-manifest.py +220 -0
- package/workflows/cm/scripts/test-task-gate.py +540 -0
- package/workflows/cm/scripts/test-workflow-config.py +394 -0
- package/workflows/cm/scripts/validate-public-repo.py +200 -0
- package/workflows/cm/scripts/validate-test-cases.py +127 -0
- package/workflows/cm/skills/cm-ai/SKILL.md +120 -0
- package/workflows/cm/skills/cm-ai/references/N1-init.md +92 -0
- package/workflows/cm/skills/cm-ai/references/N2-enter-feature.md +38 -0
- package/workflows/cm/skills/cm-ai/references/N3-execute-task.md +99 -0
- package/workflows/cm/skills/cm-ai/references/N4-review.md +96 -0
- package/workflows/cm/skills/cm-ai/references/N5-mark-done.md +107 -0
- package/workflows/cm/skills/cm-ai/references/N6-qa-eval.md +102 -0
- package/workflows/cm/skills/cm-ai/references/N7-context.md +23 -0
- package/workflows/cm/skills/cm-ai/references/N8-finish.md +97 -0
- package/workflows/cm/skills/cm-backend-engineer/SKILL.md +100 -0
- package/workflows/cm/skills/cm-check/SKILL.md +60 -0
- package/workflows/cm/skills/cm-contract-engineer/SKILL.md +136 -0
- package/workflows/cm/skills/cm-database-engineer/SKILL.md +89 -0
- package/workflows/cm/skills/cm-devops-engineer/SKILL.md +137 -0
- package/workflows/cm/skills/cm-doc-syncer/SKILL.md +150 -0
- package/workflows/cm/skills/cm-finance-expert/SKILL.md +85 -0
- package/workflows/cm/skills/cm-fix/SKILL.md +159 -0
- package/workflows/cm/skills/cm-frontend-engineer/SKILL.md +127 -0
- package/workflows/cm/skills/cm-idea/SKILL.md +42 -0
- package/workflows/cm/skills/cm-idea/references/domains/trading.md +97 -0
- package/workflows/cm/skills/cm-idea/references/example-prd.md +92 -0
- package/workflows/cm/skills/cm-idea/references/idea-to-prd.md +282 -0
- package/workflows/cm/skills/cm-init/SKILL.md +158 -0
- package/workflows/cm/skills/cm-miniprogram-engineer/SKILL.md +141 -0
- package/workflows/cm/skills/cm-miniprogram-engineer/references/platform-readiness.md +58 -0
- package/workflows/cm/skills/cm-miniprogram-engineer/references/release-checklist.md +59 -0
- package/workflows/cm/skills/cm-prd/SKILL.md +521 -0
- package/workflows/cm/skills/cm-prd/references/brownfield.md +13 -0
- package/workflows/cm/skills/cm-prd/references/change-mode.md +145 -0
- package/workflows/cm/skills/cm-prd/references/context-scope.md +62 -0
- package/workflows/cm/skills/cm-prd/references/greenfield.md +80 -0
- package/workflows/cm/skills/cm-prd/references/phase-timing.md +60 -0
- package/workflows/cm/skills/cm-prd/references/spec-self-check.md +22 -0
- package/workflows/cm/skills/cm-product-manager/SKILL.md +83 -0
- package/workflows/cm/skills/cm-qa-engineer/SKILL.md +142 -0
- package/workflows/cm/skills/cm-refactor/SKILL.md +209 -0
- package/workflows/cm/skills/cm-test/SKILL.md +259 -0
- package/workflows/cm/skills/cm-ui-engineer/SKILL.md +105 -0
- package/workflows/cm/skills/codebase-context/SKILL.md +489 -0
- package/workflows/cm/skills/darwin-skill/NOTICE.md +26 -0
- package/workflows/cm/skills/darwin-skill/README.md +272 -0
- package/workflows/cm/skills/darwin-skill/SKILL.md +492 -0
- package/workflows/cm/skills/darwin-skill/references/runtime-neutrality.md +68 -0
- package/workflows/cm/skills/darwin-skill/references/skilllens-evidence.md +142 -0
- package/workflows/cm/skills/darwin-skill/scripts/screenshot.mjs +71 -0
- package/workflows/cm/skills/darwin-skill/templates/result-card-dark.html +698 -0
- package/workflows/cm/skills/darwin-skill/templates/result-card-white.html +444 -0
- package/workflows/cm/skills/darwin-skill/templates/result-card.html +616 -0
- package/workflows/cm/skills/external-expert/SKILL.md +250 -0
- package/workflows/cm/templates/arch-reference.md +68 -0
- package/workflows/cm/templates/auto-update/cm-announce.sh +19 -0
- package/workflows/cm/templates/auto-update/cm-update.sh +274 -0
- package/workflows/cm/templates/cm-workflow.yml +52 -0
- package/workflows/cm/templates/dashboard/dashboard.html +153 -0
- package/workflows/cm/templates/dashboard/serve.sh +10 -0
- package/workflows/cm/templates/hooks/pre-commit-cm-task-check +67 -0
- package/workflows/cm/templates/pixel/cm-pixel.html +388 -0
- package/workflows/cm/templates/pixel/cm-pixel.sh +212 -0
- package/workflows/cm/templates/pixel/dev/README.md +20 -0
- package/workflows/cm/templates/pixel/dev/atlas-preview.png +0 -0
- package/workflows/cm/templates/pixel/dev/build.py +55 -0
- package/workflows/cm/templates/pixel/dev/sheets/roguelikeChar_transparent.png +0 -0
- package/workflows/cm/templates/pixel/dev/sheets/roguelikeCity_tilemap.png +0 -0
- package/workflows/cm/templates/pixel/dev/sheets/roguelikeIndoor_transparent.png +0 -0
- package/workflows/cm/templates/pixel/dev/template.html +388 -0
- package/workflows/cm/templates/pixel/serve.sh +12 -0
- package/workflows/cm/templates/refactor/cm-refactor-denies.json +14 -0
- package/workflows/cm/templates/rules/backend-api.md +36 -0
- package/workflows/cm/templates/rules/coding-style.md +44 -0
- package/workflows/cm/templates/rules/database.md +27 -0
- package/workflows/cm/templates/rules/finance.md +32 -0
- package/workflows/cm/templates/rules/frontend.md +32 -0
- package/workflows/cm/templates/rules/git-workflow.md +25 -0
- package/workflows/cm/templates/rules/miniprogram.md +31 -0
- package/workflows/cm/templates/rules/security.md +31 -0
- package/workflows/cm/templates/rules/smart-contract.md +28 -0
- package/workflows/cm/templates/rules/testing.md +36 -0
- package/workflows/cm/templates/statusline/cm-statusline.sh +73 -0
- package/workflows/cm/templates/ui-lens/cm-ui-lens-extract.mjs +55 -0
- package/workflows.lock.json +39 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# N5: 标记完成
|
|
2
|
+
|
|
3
|
+
**强制,不可跳过。** 遗漏会导致断点恢复时重复执行任务。
|
|
4
|
+
|
|
5
|
+
## 步骤
|
|
6
|
+
|
|
7
|
+
0. **审查结论与标记原子卡点(必须真跑命令不许目测或手改)**:执行下列命令并保留 JSON 输出:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
python3 {CM_WORKFLOW_ROOT}/scripts/cm-task-gate.py mark-done \
|
|
11
|
+
--handoff {SPECS_DIR}/.reviews/{feature}-{任务号}-a{attempt}-handoff.json \
|
|
12
|
+
--reviews-dir {SPECS_DIR}/.reviews \
|
|
13
|
+
--feature {FEATURE_SLUG} \
|
|
14
|
+
--task {T-xxx} \
|
|
15
|
+
--tasks {SPECS_DIR}/{FEATURE_DIR}/tasks.md \
|
|
16
|
+
--project-root {CODE_PROJECT}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
非零退出或当前 Review 不是 `verdict: approved` = **不许标记**;成功 JSON 必须是
|
|
20
|
+
当前 attempt 且 `outcome` 为 `marked_done` 或幂等恢复时的 `already_done`,并且
|
|
21
|
+
`content_bound: true`。
|
|
22
|
+
`changes_requested` 回 N3;第 2 轮 `blocked` 停止等人工。门禁在同一进程重新校验
|
|
23
|
+
证据并原子替换当前 feature 自己的 `tasks.md`,只改精确匹配的任务 checkbox;
|
|
24
|
+
specs 根目录或其他 feature 的同名任务文件会被拒绝。不得先跑 `check-n5`
|
|
25
|
+
再手工勾选,也不得只执行 `ls`。
|
|
26
|
+
1. **立即验证**:命令成功后重新读取 tasks.md,确认该任务确实已标记为 `[x]`
|
|
27
|
+
|
|
28
|
+
```diff
|
|
29
|
+
- - [ ] T-007: 安装依赖 ~5min
|
|
30
|
+
+ - [x] T-007: 安装依赖 ~5min
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 关键约束
|
|
34
|
+
|
|
35
|
+
- 每完成一个 task **立即标记**,不批量、不延后
|
|
36
|
+
- 文件编辑失败则重试,不得在未落盘时继续
|
|
37
|
+
- 进入 N7 从磁盘重载上下文前,必须确认标记已写入
|
|
38
|
+
|
|
39
|
+
## Git 提交(每任务一次)
|
|
40
|
+
|
|
41
|
+
标记验证通过后按 N1 保存的 `DELIVERY_MODE` 分支:
|
|
42
|
+
|
|
43
|
+
- `branch` / `draft-mr`:提交本任务全部变更(代码 + tasks.md 标记)。
|
|
44
|
+
- `diff`:不 stage、不 commit,METRICS 备注 `delivery-diff`,回读行写
|
|
45
|
+
`commit 跳过(diff)`;所有任务保持串行,避免未提交 diff 相互覆盖。
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
git -C {CODE_PROJECT} add -- {该仓库内本任务新增/修改且开工前干净的相对路径}
|
|
49
|
+
git -C {CODE_PROJECT} diff --cached --check
|
|
50
|
+
git -C {CODE_PROJECT} commit -m "T-{编号} {feature名}: {任务标题}
|
|
51
|
+
|
|
52
|
+
审查: 自审通过 | 独立审查({channel}) {N}轮 采纳{N}条 忽略{N}条({一句话理由})"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- **禁止 `git add -A` / `git add .`**:必须使用 N3 开工前记录的 dirty 清单与本任务文件集显式 stage,并用 `git diff --cached --name-only` 回读。不得把用户的先存改动带入任务提交
|
|
56
|
+
- specs 与代码项目可以是不同目录/仓库:每个代码仓库只 stage 自己根目录下的任务文件;
|
|
57
|
+
feature `tasks.md`、`.reviews/`、METRICS 在代码仓库外时不得传给该仓库的 `git add`。
|
|
58
|
+
specs 自身另有 Git 仓库时可用单独审计提交,否则由 specs 落盘物保持审计,不能因
|
|
59
|
+
跨仓库路径导致代码提交失败(实跑结构:`$cm-ai {specs} {code}` 默认就是两条路径)。
|
|
60
|
+
- 本任务必须修改一个开工前已 dirty 的文件时,不得按整文件 stage。只有能构造并回读「本任务新增 hunks」时才提交;否则跳过自动提交,METRICS 备注 `dirty-overlap`,保留用户工作区
|
|
61
|
+
- **commit message 必须含任务编号**——"任何一行代码回溯到任务"靠这一步实现(`git log --grep "T-003"` 即可验证)
|
|
62
|
+
- **一次实现天然覆盖多个任务时**(拆分过细的兜底):message 必须列出全部编号(如 `T-005/T-006 ...`),各任务分别标记、METRICS 各记一行并备注"并入 T-xxx"——禁止只写其一导致审计链断点
|
|
63
|
+
- 审查摘要来自 N4 的度量记录
|
|
64
|
+
- **任务产物已在既有提交中**(典型:T-001 的产物就是脚手架自带的 initial commit)→ 用 `git commit --allow-empty` 打一条核验提交,message 照常规格式并指认产物所在的 commit sha——审计链"每任务一提交"不留空洞
|
|
65
|
+
- **项目上下文的版本控制字段 = `none`**(或 N1 兜底设定 NO_GIT)→ 仅 delivery=diff 可继续并跳过本步,METRICS 行备注 `no-git`,进度输出的 🔁 回读行中提交项写 `跳过(none)`
|
|
66
|
+
|
|
67
|
+
每个代码仓库提交成功并回读 SHA 后,按 `../../../runtime/logging.md` 分别写
|
|
68
|
+
`delivery/commit`,只记录 project、task、branch、commit SHA 和证据路径;提交失败或
|
|
69
|
+
跳过时不得伪造 delivery 事件。
|
|
70
|
+
|
|
71
|
+
## 度量落盘(METRICS.md)
|
|
72
|
+
|
|
73
|
+
标记完成后,向 `{SPECS_DIR}/METRICS.md` 追加本任务一行(文件不存在则先创建表头):
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
| 任务 | Feature | 开始 | 结束 | 审查轮次 | 独立审查拦截 | QA | 人工介入(次:原因) |
|
|
77
|
+
| T-003 | 1.user-auth | 10:02 | 10:41 | 2 | 1 | — | 1:业务歧义 |
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
- 审查轮次 / 独立审查拦截数来自 N4;QA 列先写 `—`,N6 触发时回填
|
|
81
|
+
- 人工介入:本任务执行期间每次暂停问人计 1 次并注明原因(技术选型自主决策不计)
|
|
82
|
+
- 这张表是试点/灰度门槛(人工介入 ≤2 次/任务、一次通过率等)的**唯一数据源,不可跳过**
|
|
83
|
+
|
|
84
|
+
## LESSONS.md
|
|
85
|
+
|
|
86
|
+
如有值得记录的内容追加到 `{SPECS_DIR}/LESSONS.md`:
|
|
87
|
+
|
|
88
|
+
- 架构决策及理由、踩坑记录、跨 feature 影响、环境/依赖特殊处理
|
|
89
|
+
|
|
90
|
+
不记录常规开发、显而易见的事情。格式:`## {日期} — {Feature名} / {Task标题}`
|
|
91
|
+
|
|
92
|
+
**条目分级(实跑教训:Infinity 防线进了 LESSONS 仍复发——纪律靠记忆不可靠)**:
|
|
93
|
+
|
|
94
|
+
- 每条教训标注 `[已结构化]`(已落为测试用例/校验代码/lint 规则,防线不靠记忆)或 `[仅记忆]`(只有文字)
|
|
95
|
+
- **`[仅记忆]` 是欠账**:写下时优先考虑能否顺手结构化(一条断言的成本远低于复发一次);确实无法结构化的才保留标注,供 N2 定向注入与 N4 对照
|
|
96
|
+
- **备忘/已知限制类**("V1.x 需要……""等真实反馈再定")不混入正文,写入文件顶部的 **`## 待触发备忘`** 段,格式:`- [挂起] {触发条件} → {事项}(来源 T-xxx)`——否则埋进只写不读的正文里,到期无人认领(实跑教训:warnings 无 UI 出口备忘无回流出口)
|
|
97
|
+
|
|
98
|
+
## 输出进度
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
✅ Feature {F}/{总F} | 任务 {N}/{总数} — {标题}
|
|
102
|
+
🔍 主执行者自审: {结果} | 🤖 独立审查({channel}): {结果}
|
|
103
|
+
🔁 回读: tasks.md T-{编号}[x]已确认 | commit {短sha}含T-{编号} | METRICS 行已写 | 门禁 {mark-done JSON 输出中的 review}
|
|
104
|
+
📊 Feature {done}/{total} | 总体 {done_f}/{total_f}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**🔁 回读行是强制字段**——四项分别重新读取文件/执行命令确认后才能输出;本行缺失即视为 N5 未完成,不得进入 N6。不可见的纪律等于没有纪律(实跑事故教训:静默失败只有回读能发现)。
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# N6: QA 评估
|
|
2
|
+
|
|
3
|
+
AI 动态决策是否触发 `cm-qa-engineer`,不按固定间隔。
|
|
4
|
+
|
|
5
|
+
QA 开始前解析 `tester` 角色并记录 `decision`/`phase: route`;浏览器走查另外解析
|
|
6
|
+
`browser_qa`。路由元数据只说明请求的工具/模型别名,正式命令、逻辑核验和浏览器
|
|
7
|
+
证据仍必须由本地 QA 合同实际产生。
|
|
8
|
+
|
|
9
|
+
同时读取有效配置的 workflow profile 与 `policies.tests`:`java-backend` 优先
|
|
10
|
+
commands/logic 及 API、数据库回归;`web-frontend` 优先 commands/browser;
|
|
11
|
+
`cm-default` 按 logic→commands→browser。`policies.tests` 只关闭未被规格要求的可选
|
|
12
|
+
类型;`test-cases.json` 中 blocking case 即使类型未列出也必须执行,环境不可用则
|
|
13
|
+
`BLOCKED`,不得把配置当作跳过已审批验收的许可。
|
|
14
|
+
|
|
15
|
+
## 评分(1-5 分,总分 ≥ 8 触发)
|
|
16
|
+
|
|
17
|
+
| 维度 | 1 分 | 5 分 |
|
|
18
|
+
| -------- | -------------------- | --------------------- |
|
|
19
|
+
| 变更范围 | 单文件小改动 | 跨多模块/多项目 |
|
|
20
|
+
| 风险等级 | 纯 UI 文案 | 数据库/支付/认证 |
|
|
21
|
+
| 累积变更 | 上次 QA 后 1 个 task | 上次 QA 后 5+ 个 task |
|
|
22
|
+
| 功能边界 | 模块内部实现 | 完整用户可感知功能 |
|
|
23
|
+
|
|
24
|
+
## 必须触发(无需打分)
|
|
25
|
+
|
|
26
|
+
- 当前 feature 所有 task 完成
|
|
27
|
+
- API 接口变更(**收尾合并豁免**:下一个任务就是本 feature 最后一个任务时,可合并至 feature 级 QA 一次执行——避免背靠背双跑全量;合并决策记运行日志 `decision` 事件。实跑教训:后端 feature 几乎每任务都改 API,逐任务触发 QA 成本失衡)
|
|
28
|
+
- 数据库 migration
|
|
29
|
+
- 认证/授权/支付逻辑
|
|
30
|
+
- 连续 5 个 task 未触发过 QA
|
|
31
|
+
|
|
32
|
+
## 跳过
|
|
33
|
+
|
|
34
|
+
- 纯文档/注释/配置格式
|
|
35
|
+
- 仅新增类型定义(未实现)
|
|
36
|
+
- 上一个 task 刚触发过 QA 且当前变更极小
|
|
37
|
+
|
|
38
|
+
**跳过也必须留痕**:无论触发还是跳过,每个任务的 N6 结论都写一条 `qa` 事件进运行日志(`触发:原因` / `跳过:评分{N}` / `合并至feature级`)——cm:ai 必记事件本就含 qa,此处重申是因为实跑失守:json-keeper 7 个任务 0 条 qa 事件,N6 被整场静默绕过,连"连续 5 个 task 未触发"的必触发条款命中了都无人知晓。**不可见的跳过等于没有 N6**
|
|
39
|
+
|
|
40
|
+
## 触发格式
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
🧪 触发 QA — 原因: {理由}
|
|
44
|
+
累积变更: {N} 个 task | 风险评估: {总分}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
QA 通过 → 继续。发现问题时,**不得在 N6 直接修改**已由 N4 绑定并在 N5 提交的
|
|
48
|
+
代码或测试;先保存失败报告,再按有效配置的 `policies.auto_fix` 走唯一分支:
|
|
49
|
+
|
|
50
|
+
- auto_fix: `never` → 写 `BLOCKED` 并报告,不修改。
|
|
51
|
+
- auto_fix: `explicit` → 展示缺陷摘要,取得本次修复授权后调用 `$cm-fix`。
|
|
52
|
+
- auto_fix: `auto` → 直接调用 `$cm-fix`,不额外停车。
|
|
53
|
+
|
|
54
|
+
`$cm-fix` 必须生成自己的结构化 handoff、通过独立审查门禁并按 delivery 策略落盘;
|
|
55
|
+
QA 新增或修正测试也属于该 fix diff,不能在旁路写入。修复闭环后重新 QA,总计最多
|
|
56
|
+
3 轮;仍失败则 `BLOCKED`。这样原 task 的审批 SHA 不被事后覆盖,QA 修复拥有独立
|
|
57
|
+
审查、提交与日志证据。
|
|
58
|
+
|
|
59
|
+
实际触发 QA 时按 `../../../runtime/logging.md` 写 `test_run/start` 与
|
|
60
|
+
`test_run/complete`,只记录模式、用例/通过/失败/阻塞数量、结论和报告路径;
|
|
61
|
+
测试输出、截图和浏览器日志仍留在 `.reviews/`。
|
|
62
|
+
|
|
63
|
+
feature 存在 `test-cases.json` 时按 `runtime/test-contract.md` 消费:正式项目命令
|
|
64
|
+
仍照常执行;browser cases 由 `cm-qa-engineer` 逐条模拟并保存截图/日志;
|
|
65
|
+
N4 中的 `INSUFFICIENT_EVIDENCE` 必须在本节点补运行时证据或保持 `BLOCKED`。
|
|
66
|
+
任一 blocking case 为 `FAIL`/`BLOCKED` 时不得宣称 QA 通过。
|
|
67
|
+
|
|
68
|
+
交付形态为微信小程序时读取
|
|
69
|
+
`../../cm-miniprogram-engineer/references/release-checklist.md`,按 feature 实际能力补
|
|
70
|
+
开发者工具模拟器与真机专项。Web/H5 截图不计小程序证据;授权、设备差异或平台 API
|
|
71
|
+
缺真机证据时保持 `BLOCKED`/待人工,不能用静态核验或模拟器推断通过。
|
|
72
|
+
|
|
73
|
+
**QA 新补的测试须变异自证**(机械,非审查轮):种 1-2 处行为变异必须变红,不红的测试修到红再入库——QA 测试是未来所有回归的安全网,安慰剂 QA 测试 = 永久性假安心(实跑先例:dogfood 中 QA agent 自发做过「5 个变异全被抓」,本条把自觉变成规则)。
|
|
74
|
+
|
|
75
|
+
触发 QA 后,回填 METRICS.md 中对应任务行的 QA 列:`通过(覆盖率{x}%)` / `{N}轮通过(覆盖率{x}%)` / `失败上报`——覆盖率随列落盘,不留在会话里。
|
|
76
|
+
|
|
77
|
+
## 形态确认卡点(仅 0.bootstrap 完成时,一次性)
|
|
78
|
+
|
|
79
|
+
`0.bootstrap` 完成触发的 QA 中,**必须**执行形态确认:启动 dev server / 模拟器 / 开发者工具,截取首屏发给用户——
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
📸 形态确认:这是项目当前的形态({Web 页面 / App 模拟器 / 小程序}),与你要的交付形态一致吗?
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**截图来源按 CLAUDE.md 交付形态写死**(防"替代形态截图糊弄卡点"):
|
|
86
|
+
|
|
87
|
+
- Web → 浏览器访问 dev server
|
|
88
|
+
- **App → iOS/Android 模拟器或 Expo Go 真机截图;react-native-web / `expo start --web` 的浏览器截图不作数**——浏览器里渲染出"长得像 App 的网页"恰恰是本卡点要拦的形态错配
|
|
89
|
+
- 小程序 → 微信开发者工具模拟器
|
|
90
|
+
|
|
91
|
+
模拟器环境不可用 → 如实上报,请用户在本机/真机启动确认;**不得用替代形态的截图过卡点**。
|
|
92
|
+
|
|
93
|
+
**用户确认后才进入业务 feature**。成本是一张截图 + 3 秒确认;收益是架构错配的发现时点从"任务过半"提前到"零行业务代码"(历史事故:要 App 画成了 HTML,跑到一半才发现)。
|
|
94
|
+
|
|
95
|
+
## 业务验收走查(feature 完成时)
|
|
96
|
+
|
|
97
|
+
触发原因为「当前 feature 所有 task 完成」且 QA 通过后,调用 `cm-product-manager` skill 做**业务验收走查**(用户视角流程闭环 + AC 逐条对照,非技术测试):
|
|
98
|
+
|
|
99
|
+
- 小偏差 → 记录进走查报告,继续
|
|
100
|
+
- 涉及需求本意的偏差 → 暂停问人,不自行认定"也可以"
|
|
101
|
+
|
|
102
|
+
金融/营销类 feature 的走查协同 `cm-finance-expert` 追加金融视角(数字口径抽查 + 营销红线扫描);**涉合规的偏差一律上报,不适用"小偏差放行"**。
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# N7: 上下文管理
|
|
2
|
+
|
|
3
|
+
## task 完成后
|
|
4
|
+
|
|
5
|
+
**重读落盘文件即是"重载",不需要清上下文,更不需要停车**:
|
|
6
|
+
|
|
7
|
+
- 当前 feature 的 specs(requirements.md、design.md、tasks.md)
|
|
8
|
+
- `{SPECS_DIR}/LESSONS.md`
|
|
9
|
+
- `runtime/project-context.md` 解析出的 `AGENTS.md` 指令链与 `.claude/` 兼容规则
|
|
10
|
+
|
|
11
|
+
重读完成后**直接继续下一个 task,不停车、不等用户、不以问句收尾**。
|
|
12
|
+
|
|
13
|
+
> 以磁盘为准重读 specs 才是防漂移的有效动作;不依赖 Claude 的 `/clear` 或 Codex 的会话压缩细节。压缩摘要可能丢数字,落盘文件不会。
|
|
14
|
+
|
|
15
|
+
## task 执行中
|
|
16
|
+
|
|
17
|
+
察觉上下文被自动压缩过(前文变成摘要)→ 继续当前 task 前,重读本 feature 的 specs 与当前任务相关的 design 章节,以落盘文件校准记忆,不信摘要里的细节数字。
|
|
18
|
+
|
|
19
|
+
## feature 完成后
|
|
20
|
+
|
|
21
|
+
同上重读,直接进入下一个 feature。
|
|
22
|
+
|
|
23
|
+
全程自动继续。**唯一合法停车点**:$cm-ai 全局规则的灾难级清单 + 各节点显式卡点(入口闸/高风险审查降级/形态确认/涉合规走查)。
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# N8: 完成
|
|
2
|
+
|
|
3
|
+
所有 feature 的所有任务完成后:
|
|
4
|
+
|
|
5
|
+
## 1. 调用 cm-doc-syncer
|
|
6
|
+
|
|
7
|
+
调用 `cm-doc-syncer` skill 完成文档同步:
|
|
8
|
+
|
|
9
|
+
- README 精炼更新(架构 + 业务 + 快速开始)
|
|
10
|
+
- `AGENTS.md` 与 `.claude/CLAUDE.md` / rules 兼容文档同步
|
|
11
|
+
- specs CHANGELOG 按日期生成
|
|
12
|
+
- 文档一致性验证
|
|
13
|
+
|
|
14
|
+
## 1.5 代码库参考文档回写(存在时强制)
|
|
15
|
+
|
|
16
|
+
`{项目根}/docs/codebase-context/` 存在时(skill 未安装但文档在 → 按 skill 文内的回写映射表手动执行,映射表就在文档同目录项目里;两者都无 → 跳过本步),按 `codebase-context` skill dev 模式步骤 3 的「变更类型 → 需更新文档」映射表,把本次全部 feature 的变更回写进参考文档(09-changelog 类型标 `dev回写`)——**地图必须跟着代码走,否则下次二开按过期地图改**。
|
|
17
|
+
|
|
18
|
+
## 1.7 最终工作树与交付策略
|
|
19
|
+
|
|
20
|
+
对每个代码项目分别回读有效 `DELIVERY_MODE`,执行 `git diff --check` 并核对 N8 新变更:doc-syncer 只能
|
|
21
|
+
产生文档/specs 元数据;若出现源码、配置或依赖变更,说明有修改绕过任务审查,立即
|
|
22
|
+
`BLOCKED`。然后按唯一分支收口:
|
|
23
|
+
|
|
24
|
+
- `diff`:不 commit、不 push、不创建 MR;输出基线 SHA、`git diff --stat` 和完整
|
|
25
|
+
diff 位置。工作树 dirty 是预期交付,但不得含开工前用户改动之外的范围外文件。
|
|
26
|
+
- `branch`:显式 stage N8 生成的文档/specs 文件,`git diff --cached --check` 后补一条
|
|
27
|
+
`docs: sync CM workflow artifacts` 提交;确认工作树只剩开工前用户改动。停在本地分支。
|
|
28
|
+
- `draft-mr`:先完成 branch 收口,再逐仓库展示 remote、branch、目标分支和将执行的 push/MR
|
|
29
|
+
命令,**取得本次明确授权**后才执行。GitHub 使用 `gh pr create --draft`,GitLab 使用
|
|
30
|
+
`glab mr create --draft`;CLI/remote/权限缺失则 `BLOCKED` 并保留本地分支。push 与
|
|
31
|
+
MR 各自成功后才写 `delivery/push`、`delivery/pull_request`,不得以配置代替授权或
|
|
32
|
+
伪造远端结果。
|
|
33
|
+
|
|
34
|
+
branch/draft-mr 在写 `run_done` 前必须确认每个代码仓库的 CM 变更已全部进入可回溯
|
|
35
|
+
commit;diff 模式则逐仓库确认没有新 commit。specs 位于代码仓库外时单独报告其落盘
|
|
36
|
+
路径,不尝试从代码仓库 stage 跨仓库文件。该门禁防止 doc-syncer 在“全部完成”之后
|
|
37
|
+
留下未交付变更。
|
|
38
|
+
|
|
39
|
+
## 2. 生产发布待决清单
|
|
40
|
+
|
|
41
|
+
**前置**:项目存在部署或平台发布形态才执行本步。信号包括 Dockerfile / CI 配置 /
|
|
42
|
+
部署脚本、`{SPECS_DIR}/RELEASES.md`,以及已确认的 App/微信小程序交付形态(小程序可
|
|
43
|
+
由 `project.config.json` + `app.json` 或跨端微信构建目标识别)。**纯本地工具、库等
|
|
44
|
+
无发布形态的项目 → 跳过**,总结中输出一行 `🚀 发布清单: 跳过(无发布形态)`。
|
|
45
|
+
|
|
46
|
+
调用 `cm-devops-engineer` skill **编制**(只编制,不执行生产发布)。**staging 验证状态的数据源是 `{SPECS_DIR}/RELEASES.md`**,不凭记忆:
|
|
47
|
+
|
|
48
|
+
- 已通过 staging 验证的 feature 清单及版本(读 RELEASES.md)
|
|
49
|
+
- 生产迁移清单与执行顺序(含备份点)
|
|
50
|
+
- 新增环境变量清单(值由人在生产环境配置)
|
|
51
|
+
- 回滚预案位置
|
|
52
|
+
|
|
53
|
+
微信小程序另外读取 `../../cm-miniprogram-engineer/references/release-checklist.md`:
|
|
54
|
+
即使尚未上传体验版,也要编制主体/类目、隐私权限、域名环境、L1–L3 证据和提审材料
|
|
55
|
+
待决项;`RELEASES.md` 不存在时明确写“体验版未上传”,不得把 N6 模拟器结果伪装成
|
|
56
|
+
staging/体验版验证。
|
|
57
|
+
|
|
58
|
+
**生产发布由人决策触发**,不属于本流程的自动动作。
|
|
59
|
+
|
|
60
|
+
## 3. 度量汇总
|
|
61
|
+
|
|
62
|
+
读取 `{SPECS_DIR}/METRICS.md`,**只统计本次执行涉及的 feature 的行**(按 Feature 列过滤——防止历史批次数据混入本次门槛对照),全量历史另起一行标注"累计"。输出:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
📊 度量汇总
|
|
66
|
+
任务: {N} 个 | 人工介入均值: {x} 次/任务 | 一次通过率(复审仅1轮): {x}%
|
|
67
|
+
独立审查拦截: 共 {N} 条 | QA: 触发 {N} 次/通过 {N} | 总耗时: {x}
|
|
68
|
+
💰 成本: 从当前运行时的 usage/成本面板取得;不可用则记「未采集」
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**审查凭证对账**:tasks.md 全部 `[x]` 任务 ↔ `{SPECS_DIR}/.reviews/` 凭证一一对账,缺失项列入度量汇总(`⚠ 审查凭证缺失: T-xxx,...`,全齐则 `审查凭证: {N}/{N} 齐`)——中途漏网的审查,收尾必须暴露,不许无声混过。
|
|
72
|
+
|
|
73
|
+
**临时资源对账**:读取当前 run 的项目权威日志,按 `resource_id` 对账
|
|
74
|
+
`resource/acquired`、`resource/released` 与 `resource/cleanup_failed`。只有同一
|
|
75
|
+
资源最后状态为 `released` 才算闭环;存在未释放或清理失败资源时输出清单、将状态
|
|
76
|
+
改为 BLOCKED,并且**不得写 `run_done`**。没有 resource 事件的历史运行保持兼容。
|
|
77
|
+
|
|
78
|
+
**运行日志收口**:按 `../../../runtime/logging.md` 写 `run_done` 终态事件,使项目日志与
|
|
79
|
+
全局索引同时收口;然后报告 `运行日志.jsonl`、全局 run 文件路径与项目日志行数。
|
|
80
|
+
提醒用户反馈问题时连同 METRICS.md 一起带回,只报告,不清理不截断。
|
|
81
|
+
|
|
82
|
+
**成本落盘(灰度门槛「单任务成本 < 人工工时」的数据源)**:如果当前 Codex/Claude 界面提供 usage 或会话费用,将总费用与总耗时写入 `{SPECS_DIR}/度量汇总.md`(`成本: ${x} / {N} 任务 ≈ ${x/N} 每任务`);无法获得就标注 `成本: 未采集`,不许编造。
|
|
83
|
+
|
|
84
|
+
## 4. 输出总结
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
🎉 全部完成
|
|
88
|
+
|
|
89
|
+
📂 Features: {完成数}/{总数}
|
|
90
|
+
📋 总任务: {完成数}/{总数}
|
|
91
|
+
📝 文档同步: 已完成
|
|
92
|
+
🚀 生产发布待决清单: 已编制,等待人工决策
|
|
93
|
+
|
|
94
|
+
各 Feature 摘要:
|
|
95
|
+
- 1.{name}: {N} 个任务 ✅ (发布验证: {staging/体验版已验证 | 未执行/待人工 | 不适用})
|
|
96
|
+
- 2.{name}: {N} 个任务 ✅ (发布验证: {staging/体验版已验证 | 未执行/待人工 | 不适用})
|
|
97
|
+
```
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cm-backend-engineer
|
|
3
|
+
description: 后端 API 工程师 Skill,执行服务端 API 层开发(路由、业务逻辑、鉴权中间件、缓存、队列),自动适配语言和框架
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# cm-backend-engineer — 后端 API 工程师
|
|
7
|
+
|
|
8
|
+
执行服务端 API 层开发任务。自动识别语言和框架。
|
|
9
|
+
|
|
10
|
+
## 职责边界
|
|
11
|
+
|
|
12
|
+
- **管**:路由/控制器、业务逻辑、鉴权与权限中间件、缓存策略、消息队列、对外接口说明
|
|
13
|
+
- **不管**:数据库 schema 与 migration(→ cm-database-engineer)、测试补全与 E2E(→ cm-qa-engineer)
|
|
14
|
+
|
|
15
|
+
## 触发条件
|
|
16
|
+
|
|
17
|
+
由 `/cm-ai` 自动调用,当 task 涉及后端 API 开发时触发。
|
|
18
|
+
|
|
19
|
+
## 工作流程
|
|
20
|
+
|
|
21
|
+
### 1. 识别技术栈
|
|
22
|
+
|
|
23
|
+
自动检测,不做硬编码假设:
|
|
24
|
+
|
|
25
|
+
- **语言/运行时**:Node.js / Python / Go / Java / Rust
|
|
26
|
+
- **框架**:Express / Fastify / Hono / NestJS / FastAPI / Django / Gin / Spring 等
|
|
27
|
+
- **鉴权方案**:JWT / Session / OAuth2 / BetterAuth 等(读现有中间件与依赖判断)
|
|
28
|
+
- **接口风格**:REST / GraphQL / tRPC / gRPC(读路由与已有接口定义判断)
|
|
29
|
+
|
|
30
|
+
### 2. 读取上下文
|
|
31
|
+
|
|
32
|
+
- `.claude/rules/backend-api.md`、`.claude/rules/security.md`(如存在)
|
|
33
|
+
- design.md 中的**接口契约**——本 skill 的最高约束
|
|
34
|
+
- 现有路由组织、错误处理约定、中间件链
|
|
35
|
+
|
|
36
|
+
### 3. 契约纪律(本 skill 核心)
|
|
37
|
+
|
|
38
|
+
design.md 的接口契约是前后端并行的生命线,执行**三级协议**:
|
|
39
|
+
|
|
40
|
+
1. **执行者只报不改**:实现中发现契约不合理或不完整 → **不得静默偏离、不得直接修改 design.md**,将偏差和理由写入完成汇报的「契约相关」栏
|
|
41
|
+
2. **主流程小改留痕**:字段增补等小偏差由主流程更新 design.md 并标注版本(对齐 `[CHANGED]` 惯例)
|
|
42
|
+
3. **大改必须问人**:偏差影响**已完成任务**所依赖的契约(会引发返工)→ 强制暂停人工确认
|
|
43
|
+
|
|
44
|
+
实现完成后逐条核对:路径、方法、请求/响应字段、错误码与契约一致。
|
|
45
|
+
|
|
46
|
+
### 4. 开发
|
|
47
|
+
|
|
48
|
+
**接口实现:**
|
|
49
|
+
|
|
50
|
+
- 遵循项目已有的路由组织和分层(controller/service/repository 等按项目实际)
|
|
51
|
+
- 错误处理统一:错误码、错误体结构跟随项目约定,无约定则建立一处并全局复用
|
|
52
|
+
- 输入验证在边界层完成,校验库跟随项目已有选择
|
|
53
|
+
- 幂等性:写操作考虑重复提交(幂等键/去重),支付类接口强制
|
|
54
|
+
|
|
55
|
+
**鉴权与权限:**
|
|
56
|
+
|
|
57
|
+
- 复用项目已有的鉴权中间件,不另起炉灶
|
|
58
|
+
- 权限检查靠近资源(handler 层),不散落各处
|
|
59
|
+
- 敏感操作留审计日志
|
|
60
|
+
|
|
61
|
+
**性能与可靠性**(以下为默认值,`.claude/rules/` 有规定时**以 rules 为准**):
|
|
62
|
+
|
|
63
|
+
- 外部调用必须有超时,默认 5s
|
|
64
|
+
- 列表接口必须分页,默认页大小 20
|
|
65
|
+
- 高频读考虑缓存、写路径考虑队列削峰——是否引入新基础设施以 design.md 为准,不擅自添加
|
|
66
|
+
|
|
67
|
+
### 5. 安全检查
|
|
68
|
+
|
|
69
|
+
- 密钥/连接串一律环境变量,绝不硬编码
|
|
70
|
+
- 注入防护:参数化查询、模板转义(与 database skill 双保险)
|
|
71
|
+
- 鉴权绕过自查:逐条核对本次新增路由是否漏挂鉴权中间件
|
|
72
|
+
- 日志不输出密码、token、证件号等敏感字段
|
|
73
|
+
|
|
74
|
+
### 6. 验证
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# 根据项目实际命令执行
|
|
78
|
+
npm run lint && npm run typecheck
|
|
79
|
+
npm run build
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
启动服务,对本 task 涉及的接口逐个实测(curl/httpie):正常流 + 至少一个异常流(4xx)。
|
|
83
|
+
|
|
84
|
+
## 常见坑
|
|
85
|
+
|
|
86
|
+
| 问题 | 处理 |
|
|
87
|
+
| ---- | ---- |
|
|
88
|
+
| 新路由漏挂鉴权中间件 | 按路由分组统一挂载,逐条核对本次新增路由 |
|
|
89
|
+
| 外部调用无超时导致雪崩 | 统一封装 HTTP client,强制超时与重试上限 |
|
|
90
|
+
| 错误体结构不一致,前端难处理 | 全局错误处理器统一出口,禁止 handler 内裸造错误体 |
|
|
91
|
+
| 时间/时区序列化不一致 | 统一 UTC + ISO 8601 出参,入参解析集中处理 |
|
|
92
|
+
| 阻塞事件循环(大 JSON / 同步加密) | 大计算移 worker 或队列,序列化分页 |
|
|
93
|
+
| 分页游标与排序不稳定 | 排序键唯一化(时间戳+id),游标编码含排序上下文 |
|
|
94
|
+
|
|
95
|
+
## 输出
|
|
96
|
+
|
|
97
|
+
- 创建/修改的文件列表
|
|
98
|
+
- 验证结果(lint / build / 接口实测)
|
|
99
|
+
- **契约实现情况**:逐条列出实现的接口,标注与 design.md 的偏差(无偏差则写"完全一致")
|
|
100
|
+
- 需要其他工种配合的事项(如前端可替换 mock 的接口清单、需要数据库配合的字段)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cm-check
|
|
3
|
+
description: 用户说“检查工作流是否安装正确”“为什么找不到 cm 命令”时使用。检查 CM 的 Codex 插件、核心 Skills、Claude 兼容包装、版本与模板引用;不测试业务功能、不自动修复。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# cm-check — 双运行时一致性自检
|
|
7
|
+
|
|
8
|
+
执行前读取 `../../runtime/project-context.md` 与 `../../runtime/logging.md`。Codex 入口为 `$cm-check`;Claude Code 跨平台入口为 `/cm-check`,macOS/Linux 另有历史别名 `/cm:check`。
|
|
9
|
+
|
|
10
|
+
从当前 Skill 路径解析 `{CM_WORKFLOW_ROOT}`。macOS、Linux、WSL 或 Git Bash
|
|
11
|
+
先运行:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
{CM_WORKFLOW_ROOT}/scripts/cm-check-runtime.sh --project "$PWD" --print-effective
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Windows PowerShell 先运行:
|
|
18
|
+
|
|
19
|
+
```powershell
|
|
20
|
+
& "{CM_WORKFLOW_ROOT}\scripts\cm-check-runtime.ps1" --project (Get-Location).Path --print-effective
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
如果配置文件不在项目根目录,可额外传 `--config {CONFIG_PATH}`;不传时会读取项目根
|
|
24
|
+
目录的 `.cm-workflow.yml` / `.yaml` / `.json`。
|
|
25
|
+
|
|
26
|
+
PowerShell 入口会优先使用 `CLAUDE_CODE_GIT_BASH_PATH` 或 Git for Windows 的
|
|
27
|
+
Bash 执行同一份检查;未找到时必须报告安装 Git for Windows 或改在 WSL
|
|
28
|
+
运行,不能跳过机械检查。
|
|
29
|
+
|
|
30
|
+
机械检查失败时,原样报告失败项并停止;通过后再做以下语义检查。
|
|
31
|
+
|
|
32
|
+
## 语义检查
|
|
33
|
+
|
|
34
|
+
1. **Codex 入口**:`.codex-plugin/plugin.json` 的 `skills` 指向 `./skills/`;`cm-idea/cm-init/cm-prd/cm-ai/cm-test/cm-fix/cm-refactor/cm-check` 八个核心 Skill 与独立 `external-expert` Skill 均有合法 frontmatter。
|
|
35
|
+
2. **共享真相**:八个核心 Skill 引用 `runtime/` 合同;`external-expert` 引用共享外部专家合同;`compat/claude-commands/cm-*.md` 只是 macOS/Linux 旧入口薄包装,不再复制业务规则。
|
|
36
|
+
3. **流程链路**:`cm-ai` 的 N1–N8 引用全部存在;`cm-prd` 的 greenfield/brownfield/change-mode 全部存在;`cm-idea` 引用 `idea-to-prd`;`cm-prd/cm-ai/cm-test/cm-qa-engineer` 共用 `runtime/test-contract.md`;`cm-prd/cm-ai/cm-test/cm-fix/cm-refactor/external-expert` 共用 `runtime/logging.md` 与统一 writer;`cm-test --generate-cases` 生成校验后的 inferred 草稿并硬停止。
|
|
37
|
+
4. **角色链路**:N3 引用的 `cm-*-engineer/manager/expert` Skill 存在;Claude `agents/` 中每个兼容角色能找到对应工种 Skill。Codex 不依赖这些 `.md` agent 文件。
|
|
38
|
+
5. **状态与审查**:`.cm-specs-status`、`.cm-status.json`、`.cm-run.json`、`tasks.md`、可选 `test-cases.json`、`METRICS.md`、`LESSONS.md`、`运行日志.jsonl` 及 `.reviews/` 的生成方与消费方配对;项目日志保持权威,全局日志只是私有可重建镜像;N4 凭证头包含 reviewer/independent/task/round/at/scope;`cm-fix` 收口前机械检查修后审查凭证;`.external/` 不得冒充 N4/N5 凭证。
|
|
39
|
+
6. **模板路径**:所有 `{CM_WORKFLOW_ROOT}/templates/...` 引用都对应真实文件,重点核对 `templates/rules/`、`templates/ui-lens/`、`templates/hooks/`、`templates/refactor/`。
|
|
40
|
+
7. **版本**:根 `VERSION` 与 plugin manifest 一致;README 不得宣称不存在的入口或安装路径。
|
|
41
|
+
8. **私有调用清零**:Codex 核心 Skill 不得残留 `TaskCreate`、`TodoWrite`、`codex:review`、`~/.claude/commands`;兼容包装中出现 `/cm:*` 是合法的 macOS/Linux 旧入口。
|
|
42
|
+
|
|
43
|
+
外部能力只做降级提示,不应导致插件自检失败:状态条、自动更新器、子代理、隔离 CLI
|
|
44
|
+
审查通道与 external-expert 浏览器 transport 都是可选增强。浏览器不可用时必须能输出
|
|
45
|
+
手工 handoff packet,不能把可选通道缺失报成核心运行时失败。
|
|
46
|
+
|
|
47
|
+
## 输出
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
🔍 cm-check (plugin v{X.Y.Z})
|
|
51
|
+
Codex 入口: {通过/失败}
|
|
52
|
+
Claude 兼容: {通过/失败}
|
|
53
|
+
流程与角色: {通过/断链清单}
|
|
54
|
+
状态与审查: {通过/断链清单}
|
|
55
|
+
模板与版本: {通过/不一致清单}
|
|
56
|
+
可选增强: {已配置/降级项}
|
|
57
|
+
结论: PASSED / FAILED ({N} 处)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
只报告可复现的断链,不自动改文件。
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cm-contract-engineer
|
|
3
|
+
description: 智能合约工程师 Skill,执行合约开发、测试、部署,自动适配 EVM/Solana/Move 等链和开发框架
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# cm-contract-engineer — 智能合约工程师
|
|
7
|
+
|
|
8
|
+
执行智能合约开发任务。自动识别链类型和开发框架。
|
|
9
|
+
|
|
10
|
+
## 触发条件
|
|
11
|
+
|
|
12
|
+
由 `/cm-ai` 自动调用,当 task 涉及智能合约开发时触发。
|
|
13
|
+
|
|
14
|
+
## 工作流程
|
|
15
|
+
|
|
16
|
+
### 1. 识别技术栈
|
|
17
|
+
|
|
18
|
+
自动检测,不做硬编码假设:
|
|
19
|
+
|
|
20
|
+
- **链/VM**:EVM(Ethereum/Base/Arbitrum/BSC...)/ Solana / Aptos / Sui / TON / Cosmos
|
|
21
|
+
- **语言**:Solidity / Rust / Move / Vyper / FunC / Cairo
|
|
22
|
+
- **框架**:Foundry / Hardhat / Anchor / Truffle / Brownie / Ape
|
|
23
|
+
- **检测方式**:`foundry.toml` / `hardhat.config.*` / `Anchor.toml` / `truffle-config.js` / `Move.toml` / `contracts/` 目录
|
|
24
|
+
|
|
25
|
+
### 2. 读取上下文
|
|
26
|
+
|
|
27
|
+
- `.claude/rules/smart-contract.md`、`.claude/rules/security.md`(如存在)
|
|
28
|
+
- design.md 中的合约接口设计
|
|
29
|
+
- 现有合约代码和部署配置
|
|
30
|
+
- 已有的测试文件和部署脚本
|
|
31
|
+
|
|
32
|
+
### 3. 开发
|
|
33
|
+
|
|
34
|
+
**合约编写:**
|
|
35
|
+
|
|
36
|
+
- 遵循项目已有的合约组织方式(单文件/模块化/Diamond 模式等)
|
|
37
|
+
- 接口(interface)先行,实现后补
|
|
38
|
+
- 使用成熟的库(OpenZeppelin / Solmate / SPL 等)而非手写基础功能
|
|
39
|
+
- NatSpec / Rust doc 注释覆盖所有 public 函数
|
|
40
|
+
|
|
41
|
+
**安全优先(EVM/Solidity 重点):**
|
|
42
|
+
|
|
43
|
+
- 重入防护:使用 ReentrancyGuard 或 checks-effects-interactions 模式
|
|
44
|
+
- 整数溢出:Solidity ≥0.8 内置检查,低版本用 SafeMath
|
|
45
|
+
- 权限控制:Ownable / AccessControl / 多签,避免单点控制
|
|
46
|
+
- 外部调用:不信任外部合约返回值,限制 gas 转发
|
|
47
|
+
- 闪电贷攻击:价格预言机用 TWAP 而非即时价格
|
|
48
|
+
- 前端运行(MEV):commit-reveal 或时间锁机制
|
|
49
|
+
|
|
50
|
+
**安全优先(Solana/Anchor 重点):**
|
|
51
|
+
|
|
52
|
+
- 账户验证:每个 instruction 都要验证 account owner 和 signer
|
|
53
|
+
- PDA 派生:种子要唯一,避免碰撞
|
|
54
|
+
- CPI 调用:验证目标 program_id
|
|
55
|
+
- 整数溢出:用 checked_add / checked_mul
|
|
56
|
+
|
|
57
|
+
**Gas/资源优化:**
|
|
58
|
+
|
|
59
|
+
- 存储变量打包(EVM slot packing)
|
|
60
|
+
- 减少 SSTORE/SLOAD 操作
|
|
61
|
+
- 批量操作代替循环中的单次调用
|
|
62
|
+
- Solana: 减少账户数量,合理使用 zero-copy
|
|
63
|
+
|
|
64
|
+
### 4. 测试
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Foundry
|
|
68
|
+
forge test -vvv
|
|
69
|
+
forge coverage
|
|
70
|
+
|
|
71
|
+
# Hardhat
|
|
72
|
+
npx hardhat test
|
|
73
|
+
npx hardhat coverage
|
|
74
|
+
|
|
75
|
+
# Anchor
|
|
76
|
+
anchor test
|
|
77
|
+
|
|
78
|
+
# Move
|
|
79
|
+
aptos move test
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**测试要求:**
|
|
83
|
+
|
|
84
|
+
- 正常流程覆盖所有 public 函数
|
|
85
|
+
- 边界值测试(零值、最大值、空地址)
|
|
86
|
+
- 权限测试(非授权调用应 revert)
|
|
87
|
+
- 攻击测试(重入、闪电贷等关键场景)
|
|
88
|
+
- Fuzz 测试(Foundry `forge test --fuzz-runs 1000`)
|
|
89
|
+
|
|
90
|
+
### 5. 部署准备
|
|
91
|
+
|
|
92
|
+
- 部署脚本使用项目约定的方式(Foundry script / Hardhat deploy / Anchor deploy)
|
|
93
|
+
- 环境变量管理私钥和 RPC URL,绝不硬编码
|
|
94
|
+
- 区分 testnet / mainnet 配置
|
|
95
|
+
- 合约验证脚本(Etherscan / Sourcify)
|
|
96
|
+
|
|
97
|
+
**部署前检查清单:**
|
|
98
|
+
|
|
99
|
+
- [ ] 所有测试通过
|
|
100
|
+
- [ ] 覆盖率 > 90%
|
|
101
|
+
- [ ] 权限模型正确(owner/admin/multisig)
|
|
102
|
+
- [ ] 升级机制明确(如使用代理模式)
|
|
103
|
+
- [ ] 紧急暂停功能(如需要)
|
|
104
|
+
- [ ] 事件覆盖所有状态变更
|
|
105
|
+
|
|
106
|
+
## 常见坑
|
|
107
|
+
|
|
108
|
+
| 问题 | 处理 |
|
|
109
|
+
| ---- | ---- |
|
|
110
|
+
| Solidity 版本不一致导致编译失败 | 检查 foundry.toml / hardhat.config 中的 solc 版本,与 pragma 一致 |
|
|
111
|
+
| OpenZeppelin 版本升级 API 变化 | 锁定依赖版本,升级前检查 changelog |
|
|
112
|
+
| Anchor IDL 生成失败 | 确保 `#[program]` 和 account struct 上的宏正确 |
|
|
113
|
+
| 合约大小超过 24KB(EVM) | 拆分合约、使用 library、Diamond 模式 |
|
|
114
|
+
| Gas estimation 失败 | 检查是否有 require 条件未满足,mock 依赖合约 |
|
|
115
|
+
| Solana 交易大小超限 | 拆分 instruction,使用 lookup table |
|
|
116
|
+
|
|
117
|
+
## 审计准备
|
|
118
|
+
|
|
119
|
+
合约开发完成后,生成审计辅助文档:
|
|
120
|
+
|
|
121
|
+
```markdown
|
|
122
|
+
## 合约审计信息
|
|
123
|
+
|
|
124
|
+
- 合约列表: {合约名及用途}
|
|
125
|
+
- 依赖: {使用的库及版本}
|
|
126
|
+
- 权限模型: {谁能做什么}
|
|
127
|
+
- 资金流向: {token/ETH 的流入流出路径}
|
|
128
|
+
- 已知风险: {设计上的取舍及原因}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## 输出
|
|
132
|
+
|
|
133
|
+
- 合约代码和接口
|
|
134
|
+
- 测试结果和覆盖率
|
|
135
|
+
- 部署脚本
|
|
136
|
+
- 需要其他工种配合的事项(如前端需要的 ABI 和合约地址)
|