sudocode 1.1.17 → 1.1.18-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@sudocode-ai/cli/README.md +330 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/feedback-commands.d.ts +53 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/feedback-commands.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/feedback-commands.js +339 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/feedback-commands.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/init-commands.d.ts +20 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/init-commands.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/init-commands.js +145 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/init-commands.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/issue-commands.d.ts +46 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/issue-commands.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/issue-commands.js +353 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/issue-commands.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/merge-commands.d.ts +42 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/merge-commands.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/merge-commands.js +405 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/merge-commands.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/plugin-commands.d.ts +62 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/plugin-commands.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/plugin-commands.js +595 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/plugin-commands.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/query-commands.d.ts +18 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/query-commands.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/query-commands.js +61 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/query-commands.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/reference-commands.d.ts +22 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/reference-commands.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/reference-commands.js +136 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/reference-commands.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/relationship-commands.d.ts +14 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/relationship-commands.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/relationship-commands.js +83 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/relationship-commands.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/server-commands.d.ts +17 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/server-commands.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/server-commands.js +123 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/server-commands.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/spec-commands.d.ts +38 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/spec-commands.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/spec-commands.js +326 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/spec-commands.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/status-commands.d.ts +17 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/status-commands.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/status-commands.js +131 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/status-commands.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/sync-commands.d.ts +24 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/sync-commands.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/sync-commands.js +429 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/sync-commands.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/update-commands.d.ts +16 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/update-commands.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/update-commands.js +160 -0
- package/node_modules/@sudocode-ai/cli/dist/cli/update-commands.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli.d.ts +6 -0
- package/node_modules/@sudocode-ai/cli/dist/cli.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/cli.js +543 -0
- package/node_modules/@sudocode-ai/cli/dist/cli.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/config.d.ts +50 -0
- package/node_modules/@sudocode-ai/cli/dist/config.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/config.js +76 -0
- package/node_modules/@sudocode-ai/cli/dist/config.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/db.d.ts +21 -0
- package/node_modules/@sudocode-ai/cli/dist/db.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/db.js +55 -0
- package/node_modules/@sudocode-ai/cli/dist/db.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/export.d.ts +84 -0
- package/node_modules/@sudocode-ai/cli/dist/export.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/export.js +265 -0
- package/node_modules/@sudocode-ai/cli/dist/export.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/filename-generator.d.ts +31 -0
- package/node_modules/@sudocode-ai/cli/dist/filename-generator.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/filename-generator.js +103 -0
- package/node_modules/@sudocode-ai/cli/dist/filename-generator.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/id-generator.d.ts +63 -0
- package/node_modules/@sudocode-ai/cli/dist/id-generator.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/id-generator.js +196 -0
- package/node_modules/@sudocode-ai/cli/dist/id-generator.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/import.d.ts +134 -0
- package/node_modules/@sudocode-ai/cli/dist/import.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/import.js +751 -0
- package/node_modules/@sudocode-ai/cli/dist/import.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/index.d.ts +15 -0
- package/node_modules/@sudocode-ai/cli/dist/index.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/index.js +15 -0
- package/node_modules/@sudocode-ai/cli/dist/index.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/base-provider.d.ts +108 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/base-provider.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/base-provider.js +80 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/base-provider.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/config-resolver.d.ts +62 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/config-resolver.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/config-resolver.js +69 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/config-resolver.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/config-validator.d.ts +75 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/config-validator.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/config-validator.js +129 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/config-validator.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/index.d.ts +14 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/index.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/index.js +20 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/index.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/plugin-loader.d.ts +77 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/plugin-loader.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/plugin-loader.js +265 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/plugin-loader.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/registry.d.ts +67 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/registry.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/registry.js +77 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/registry.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/sync-coordinator.d.ts +191 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/sync-coordinator.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/sync-coordinator.js +798 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/sync-coordinator.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/types.d.ts +142 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/types.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/types.js +6 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/types.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/utils/conflict-resolver.d.ts +79 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/utils/conflict-resolver.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/utils/conflict-resolver.js +106 -0
- package/node_modules/@sudocode-ai/cli/dist/integrations/utils/conflict-resolver.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/jsonl.d.ts +69 -0
- package/node_modules/@sudocode-ai/cli/dist/jsonl.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/jsonl.js +333 -0
- package/node_modules/@sudocode-ai/cli/dist/jsonl.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/markdown.d.ts +146 -0
- package/node_modules/@sudocode-ai/cli/dist/markdown.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/markdown.js +329 -0
- package/node_modules/@sudocode-ai/cli/dist/markdown.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/merge-resolver.d.ts +85 -0
- package/node_modules/@sudocode-ai/cli/dist/merge-resolver.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/merge-resolver.js +301 -0
- package/node_modules/@sudocode-ai/cli/dist/merge-resolver.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/events.d.ts +53 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/events.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/events.js +108 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/events.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/external-links.d.ts +147 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/external-links.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/external-links.js +411 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/external-links.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback-anchors.d.ts +92 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback-anchors.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback-anchors.js +444 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback-anchors.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback.d.ts +94 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback.js +278 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/index.d.ts +11 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/index.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/index.js +11 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/index.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/issues.d.ts +88 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/issues.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/issues.js +474 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/issues.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/references.d.ts +34 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/references.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/references.js +117 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/references.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/relationships.d.ts +64 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/relationships.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/relationships.js +281 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/relationships.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/specs.d.ts +69 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/specs.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/specs.js +330 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/specs.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/tags.d.ts +42 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/tags.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/tags.js +127 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/tags.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/transactions.d.ts +41 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/transactions.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/transactions.js +111 -0
- package/node_modules/@sudocode-ai/cli/dist/operations/transactions.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/sync.d.ts +47 -0
- package/node_modules/@sudocode-ai/cli/dist/sync.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/sync.js +464 -0
- package/node_modules/@sudocode-ai/cli/dist/sync.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/test-schema.d.ts +5 -0
- package/node_modules/@sudocode-ai/cli/dist/test-schema.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/test-schema.js +46 -0
- package/node_modules/@sudocode-ai/cli/dist/test-schema.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/types.d.ts +7 -0
- package/node_modules/@sudocode-ai/cli/dist/types.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/types.js +7 -0
- package/node_modules/@sudocode-ai/cli/dist/types.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/update-checker.d.ts +33 -0
- package/node_modules/@sudocode-ai/cli/dist/update-checker.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/update-checker.js +193 -0
- package/node_modules/@sudocode-ai/cli/dist/update-checker.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/validation.d.ts +11 -0
- package/node_modules/@sudocode-ai/cli/dist/validation.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/validation.js +58 -0
- package/node_modules/@sudocode-ai/cli/dist/validation.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/version.d.ts +12 -0
- package/node_modules/@sudocode-ai/cli/dist/version.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/version.js +23 -0
- package/node_modules/@sudocode-ai/cli/dist/version.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/watcher.d.ts +69 -0
- package/node_modules/@sudocode-ai/cli/dist/watcher.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/cli/dist/watcher.js +783 -0
- package/node_modules/@sudocode-ai/cli/dist/watcher.js.map +1 -0
- package/node_modules/@sudocode-ai/cli/package.json +73 -0
- package/node_modules/@sudocode-ai/integration-beads/package.json +44 -0
- package/node_modules/@sudocode-ai/integration-github/package.json +41 -0
- package/node_modules/@sudocode-ai/integration-openspec/package.json +43 -0
- package/node_modules/@sudocode-ai/integration-speckit/package.json +42 -0
- package/node_modules/@sudocode-ai/local-server/README.md +25 -0
- package/node_modules/@sudocode-ai/local-server/dist/cli.d.ts +7 -0
- package/node_modules/@sudocode-ai/local-server/dist/cli.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/cli.js +7 -0
- package/node_modules/@sudocode-ai/local-server/dist/cli.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/errors/agent-errors.d.ts +43 -0
- package/node_modules/@sudocode-ai/local-server/dist/errors/agent-errors.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/errors/agent-errors.js +69 -0
- package/node_modules/@sudocode-ai/local-server/dist/errors/agent-errors.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/claude-adapter.d.ts +63 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/claude-adapter.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/claude-adapter.js +83 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/claude-adapter.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-adapter.d.ts +67 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-adapter.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-adapter.js +183 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-adapter.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-config-builder.d.ts +30 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-config-builder.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-config-builder.js +110 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-config-builder.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-adapter.d.ts +94 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-adapter.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-adapter.js +163 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-adapter.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-config-builder.d.ts +48 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-config-builder.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-config-builder.js +125 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-config-builder.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-adapter.d.ts +66 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-adapter.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-adapter.js +121 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-adapter.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-config-builder.d.ts +29 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-config-builder.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-config-builder.js +49 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-config-builder.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-presets.d.ts +102 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-presets.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-presets.js +205 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-presets.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-utils.d.ts +95 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-utils.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-utils.js +163 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-utils.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/index.d.ts +8 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/index.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/index.js +8 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/index.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/executors/agent-executor-wrapper.d.ts +154 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/executors/agent-executor-wrapper.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/executors/agent-executor-wrapper.js +725 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/executors/agent-executor-wrapper.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/executors/executor-factory.d.ts +95 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/executors/executor-factory.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/executors/executor-factory.js +128 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/executors/executor-factory.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/ag-ui-adapter.d.ts +174 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/ag-ui-adapter.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/ag-ui-adapter.js +436 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/ag-ui-adapter.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/claude-to-ag-ui.d.ts +90 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/claude-to-ag-ui.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/claude-to-ag-ui.js +153 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/claude-to-ag-ui.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/index.d.ts +15 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/index.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/index.js +13 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/index.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/normalized-to-ag-ui-adapter.d.ts +108 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/normalized-to-ag-ui-adapter.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/normalized-to-ag-ui-adapter.js +321 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/normalized-to-ag-ui-adapter.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/types.d.ts +421 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/types.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/types.js +22 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/types.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/builders/claude.d.ts +53 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/builders/claude.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/builders/claude.js +225 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/builders/claude.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/event-buffer.d.ts +119 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/event-buffer.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/event-buffer.js +208 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/event-buffer.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/index.d.ts +10 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/index.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/index.js +10 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/index.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/ipc-transport-manager.d.ts +74 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/ipc-transport-manager.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/ipc-transport-manager.js +104 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/ipc-transport-manager.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/sse-transport.d.ts +146 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/sse-transport.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/sse-transport.js +282 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/sse-transport.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/transport-manager.d.ts +176 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/transport-manager.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/transport-manager.js +234 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/transport-manager.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/config.d.ts +74 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/config.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/config.js +280 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/config.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/conflict-detector.d.ts +85 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/conflict-detector.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/conflict-detector.js +129 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/conflict-detector.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-cli.d.ts +208 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-cli.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-cli.js +280 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-cli.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-sync-cli.d.ts +225 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-sync-cli.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-sync-cli.js +464 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-sync-cli.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/index.d.ts +16 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/index.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/index.js +15 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/index.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/manager.d.ts +221 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/manager.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/manager.js +508 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/manager.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/types.d.ts +90 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/types.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/types.js +42 -0
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/types.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/index.d.ts +6 -0
- package/node_modules/@sudocode-ai/local-server/dist/index.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/index.js +371 -0
- package/node_modules/@sudocode-ai/local-server/dist/index.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/middleware/project-context.d.ts +37 -0
- package/node_modules/@sudocode-ai/local-server/dist/middleware/project-context.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/middleware/project-context.js +91 -0
- package/node_modules/@sudocode-ai/local-server/dist/middleware/project-context.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/index-D4AKx6EO.css +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/index-DorQqwGV.js +927 -0
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/index-DorQqwGV.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/react-vendor-DoNwlLhy.js +60 -0
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/react-vendor-DoNwlLhy.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/ui-vendor-DlxvBun1.js +54 -0
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/ui-vendor-DlxvBun1.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/public/favicon.ico +0 -0
- package/node_modules/@sudocode-ai/local-server/dist/public/index.html +16 -0
- package/node_modules/@sudocode-ai/local-server/dist/public/logo.png +0 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/agents.d.ts +3 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/agents.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/agents.js +62 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/agents.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/config.d.ts +3 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/config.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/config.js +116 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/config.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/editors.d.ts +15 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/editors.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/editors.js +98 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/editors.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions-stream.d.ts +27 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions-stream.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions-stream.js +59 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions-stream.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions.d.ts +18 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions.js +1169 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/feedback.d.ts +8 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/feedback.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/feedback.js +340 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/feedback.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/files.d.ts +18 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/files.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/files.js +89 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/files.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/import.d.ts +142 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/import.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/import.js +896 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/import.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/issues.d.ts +8 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/issues.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/issues.js +419 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/issues.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/plugins.d.ts +34 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/plugins.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/plugins.js +602 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/plugins.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/projects.d.ts +11 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/projects.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/projects.js +536 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/projects.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/relationships.d.ts +8 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/relationships.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/relationships.js +310 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/relationships.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/repo-info.d.ts +3 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/repo-info.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/repo-info.js +203 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/repo-info.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/specs.d.ts +8 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/specs.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/specs.js +414 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/specs.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/update.d.ts +7 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/update.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/update.js +194 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/update.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/version.d.ts +3 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/version.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/version.js +25 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/version.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/workflows.d.ts +8 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/workflows.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/workflows.js +1729 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/workflows.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/agent-registry.d.ts +140 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/agent-registry.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/agent-registry.js +272 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/agent-registry.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/db.d.ts +33 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/db.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/db.js +90 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/db.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/editor-service.d.ts +57 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/editor-service.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/editor-service.js +204 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/editor-service.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-changes-service.d.ts +110 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-changes-service.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-changes-service.js +710 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-changes-service.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-event-callbacks.d.ts +73 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-event-callbacks.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-event-callbacks.js +82 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-event-callbacks.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-lifecycle.d.ts +145 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-lifecycle.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-lifecycle.js +392 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-lifecycle.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-cleanup.d.ts +88 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-cleanup.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-cleanup.js +137 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-cleanup.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-store.d.ts +252 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-store.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-store.js +379 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-store.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-service.d.ts +280 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-service.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-service.js +1240 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-service.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-worker-pool.d.ts +116 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-worker-pool.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-worker-pool.js +326 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-worker-pool.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/executions.d.ts +63 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/executions.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/executions.js +177 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/executions.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/export.d.ts +32 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/export.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/export.js +114 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/export.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/external-refresh-service.d.ts +104 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/external-refresh-service.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/external-refresh-service.js +520 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/external-refresh-service.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/feedback.d.ts +56 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/feedback.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/feedback.js +78 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/feedback.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/git-ls-files-strategy.d.ts +72 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/git-ls-files-strategy.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/git-ls-files-strategy.js +176 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/git-ls-files-strategy.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/index.d.ts +9 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/index.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/index.js +10 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/index.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/registry.d.ts +97 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/registry.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/registry.js +140 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/registry.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/strategy.d.ts +58 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/strategy.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/strategy.js +8 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/file-search/strategy.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/integration-sync-service.d.ts +185 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/integration-sync-service.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/integration-sync-service.js +428 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/integration-sync-service.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/issues.d.ts +27 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/issues.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/issues.js +35 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/issues.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/project-context.d.ts +97 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/project-context.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/project-context.js +170 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/project-context.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/project-manager.d.ts +102 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/project-manager.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/project-manager.js +502 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/project-manager.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/project-registry.d.ts +98 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/project-registry.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/project-registry.js +289 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/project-registry.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-resolver.d.ts +97 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-resolver.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-resolver.js +377 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-resolver.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-template-engine.d.ts +108 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-template-engine.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-template-engine.js +212 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-template-engine.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-templates.d.ts +97 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-templates.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-templates.js +236 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-templates.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/relationships.d.ts +35 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/relationships.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/relationships.js +42 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/relationships.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/repo-info.d.ts +33 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/repo-info.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/repo-info.js +136 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/repo-info.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/specs.d.ts +27 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/specs.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/specs.js +35 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/specs.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/version-service.d.ts +14 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/version-service.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/version-service.js +57 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/version-service.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/watcher.d.ts +49 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/watcher.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/watcher.js +52 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/watcher.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/websocket.d.ts +179 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/websocket.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/websocket.js +543 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/websocket.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/workflow-broadcast-service.d.ts +43 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/workflow-broadcast-service.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/workflow-broadcast-service.js +155 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/workflow-broadcast-service.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/worktree-sync-service.d.ts +437 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/worktree-sync-service.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/worktree-sync-service.js +1505 -0
- package/node_modules/@sudocode-ai/local-server/dist/services/worktree-sync-service.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/types/editor.d.ts +49 -0
- package/node_modules/@sudocode-ai/local-server/dist/types/editor.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/types/editor.js +50 -0
- package/node_modules/@sudocode-ai/local-server/dist/types/editor.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/types/project.d.ts +58 -0
- package/node_modules/@sudocode-ai/local-server/dist/types/project.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/types/project.js +10 -0
- package/node_modules/@sudocode-ai/local-server/dist/types/project.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/utils/execFileNoThrow.d.ts +43 -0
- package/node_modules/@sudocode-ai/local-server/dist/utils/execFileNoThrow.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/utils/execFileNoThrow.js +53 -0
- package/node_modules/@sudocode-ai/local-server/dist/utils/execFileNoThrow.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/utils/executable-check.d.ts +36 -0
- package/node_modules/@sudocode-ai/local-server/dist/utils/executable-check.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/utils/executable-check.js +79 -0
- package/node_modules/@sudocode-ai/local-server/dist/utils/executable-check.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/utils/sudocode-dir.d.ts +6 -0
- package/node_modules/@sudocode-ai/local-server/dist/utils/sudocode-dir.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/utils/sudocode-dir.js +9 -0
- package/node_modules/@sudocode-ai/local-server/dist/utils/sudocode-dir.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workers/execution-worker.d.ts +18 -0
- package/node_modules/@sudocode-ai/local-server/dist/workers/execution-worker.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workers/execution-worker.js +340 -0
- package/node_modules/@sudocode-ai/local-server/dist/workers/execution-worker.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workers/worker-ipc.d.ts +84 -0
- package/node_modules/@sudocode-ai/local-server/dist/workers/worker-ipc.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workers/worker-ipc.js +29 -0
- package/node_modules/@sudocode-ai/local-server/dist/workers/worker-ipc.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/base-workflow-engine.d.ts +186 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/base-workflow-engine.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/base-workflow-engine.js +557 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/base-workflow-engine.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/dependency-analyzer.d.ts +78 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/dependency-analyzer.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/dependency-analyzer.js +264 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/dependency-analyzer.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/orchestrator-engine.d.ts +237 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/orchestrator-engine.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/orchestrator-engine.js +749 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/orchestrator-engine.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/sequential-engine.d.ts +276 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/sequential-engine.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/sequential-engine.js +1110 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/sequential-engine.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/index.d.ts +15 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/index.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/index.js +22 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/index.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/api-client.d.ts +103 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/api-client.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/api-client.js +193 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/api-client.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/index.d.ts +16 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/index.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/index.js +114 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/index.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/server.d.ts +85 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/server.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/server.js +520 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/server.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/escalation.d.ts +36 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/escalation.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/escalation.js +47 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/escalation.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/execution.d.ts +59 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/execution.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/execution.js +67 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/execution.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/inspection.d.ts +82 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/inspection.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/inspection.js +57 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/inspection.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/workflow.d.ts +59 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/workflow.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/workflow.js +40 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/workflow.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/types.d.ts +345 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/types.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/types.js +7 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/types.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/services/prompt-builder.d.ts +36 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/services/prompt-builder.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/services/prompt-builder.js +329 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/services/prompt-builder.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/services/wakeup-service.d.ts +262 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/services/wakeup-service.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/services/wakeup-service.js +809 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/services/wakeup-service.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-engine.d.ts +221 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-engine.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-engine.js +94 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-engine.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-event-emitter.d.ts +278 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-event-emitter.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-event-emitter.js +259 -0
- package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-event-emitter.js.map +1 -0
- package/node_modules/@sudocode-ai/local-server/package.json +78 -0
- package/node_modules/@sudocode-ai/mcp/README.md +226 -0
- package/node_modules/@sudocode-ai/mcp/dist/client.d.ts +33 -0
- package/node_modules/@sudocode-ai/mcp/dist/client.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/client.js +166 -0
- package/node_modules/@sudocode-ai/mcp/dist/client.js.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/index.d.ts +6 -0
- package/node_modules/@sudocode-ai/mcp/dist/index.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/index.js +64 -0
- package/node_modules/@sudocode-ai/mcp/dist/index.js.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/server.d.ts +26 -0
- package/node_modules/@sudocode-ai/mcp/dist/server.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/server.js +577 -0
- package/node_modules/@sudocode-ai/mcp/dist/server.js.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/analytics.d.ts +41 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/analytics.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/analytics.js +21 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/analytics.js.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/feedback.d.ts +21 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/feedback.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/feedback.js +30 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/feedback.js.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/init.d.ts +17 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/init.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/init.js +15 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/init.js.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/issues.d.ts +44 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/issues.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/issues.js +109 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/issues.js.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/references.d.ts +21 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/references.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/references.js +49 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/references.js.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/relationships.d.ts +15 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/relationships.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/relationships.js +18 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/relationships.js.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/specs.d.ts +35 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/specs.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/specs.js +85 -0
- package/node_modules/@sudocode-ai/mcp/dist/tools/specs.js.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/types.d.ts +35 -0
- package/node_modules/@sudocode-ai/mcp/dist/types.d.ts.map +1 -0
- package/node_modules/@sudocode-ai/mcp/dist/types.js +21 -0
- package/node_modules/@sudocode-ai/mcp/dist/types.js.map +1 -0
- package/node_modules/@sudocode-ai/mcp/package.json +67 -0
- package/node_modules/@sudocode-ai/types/README.md +7 -0
- package/node_modules/@sudocode-ai/types/package.json +76 -0
- package/node_modules/@sudocode-ai/types/src/agents.d.ts +278 -0
- package/node_modules/@sudocode-ai/types/src/artifacts.d.ts +66 -0
- package/node_modules/@sudocode-ai/types/src/events.d.ts +70 -0
- package/node_modules/@sudocode-ai/types/src/index.d.ts +452 -0
- package/node_modules/@sudocode-ai/types/src/integrations.d.ts +454 -0
- package/node_modules/@sudocode-ai/types/src/workflows.d.ts +501 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +1149 -0
- package/node_modules/commander/esm.mjs +16 -0
- package/node_modules/commander/index.js +24 -0
- package/node_modules/commander/lib/argument.js +149 -0
- package/node_modules/commander/lib/command.js +2662 -0
- package/node_modules/commander/lib/error.js +39 -0
- package/node_modules/commander/lib/help.js +709 -0
- package/node_modules/commander/lib/option.js +367 -0
- package/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/node_modules/commander/package-support.json +16 -0
- package/node_modules/commander/package.json +82 -0
- package/node_modules/commander/typings/esm.d.mts +3 -0
- package/node_modules/commander/typings/index.d.ts +1045 -0
- package/node_modules/glob/LICENSE +15 -0
- package/node_modules/glob/README.md +1265 -0
- package/node_modules/glob/package.json +99 -0
- package/node_modules/isexe/LICENSE +15 -0
- package/node_modules/isexe/README.md +74 -0
- package/node_modules/isexe/package.json +96 -0
- package/node_modules/which/LICENSE +15 -0
- package/node_modules/which/README.md +51 -0
- package/node_modules/which/bin/which.js +52 -0
- package/node_modules/which/lib/index.js +111 -0
- package/node_modules/which/package.json +52 -0
- package/package.json +9 -9
|
@@ -0,0 +1,1240 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Execution Service
|
|
3
|
+
*
|
|
4
|
+
* High-level service for managing issue-to-execution transformations.
|
|
5
|
+
* Coordinates between template rendering, worktree management, and workflow execution.
|
|
6
|
+
*
|
|
7
|
+
* @module services/execution-service
|
|
8
|
+
*/
|
|
9
|
+
import fs from "fs";
|
|
10
|
+
import fsPromises from "fs/promises";
|
|
11
|
+
import path from "path";
|
|
12
|
+
import os from "os";
|
|
13
|
+
import * as TOML from "@iarna/toml";
|
|
14
|
+
import { ExecutionLifecycleService } from "./execution-lifecycle.js";
|
|
15
|
+
import { createExecution, getExecution, updateExecution, } from "./executions.js";
|
|
16
|
+
import { randomUUID } from "crypto";
|
|
17
|
+
import { execSync } from "child_process";
|
|
18
|
+
import { ExecutionLogsStore } from "./execution-logs-store.js";
|
|
19
|
+
import { broadcastExecutionUpdate } from "./websocket.js";
|
|
20
|
+
import { createExecutorForAgent } from "../execution/executors/executor-factory.js";
|
|
21
|
+
import { PromptResolver } from "./prompt-resolver.js";
|
|
22
|
+
import { execFileNoThrow } from "../utils/execFileNoThrow.js";
|
|
23
|
+
/**
|
|
24
|
+
* Build worktree context string to append to system prompt.
|
|
25
|
+
*
|
|
26
|
+
* This helps agents understand they're working in an isolated worktree
|
|
27
|
+
* and should only edit files within that worktree.
|
|
28
|
+
*
|
|
29
|
+
* @param worktreePath - Path to the worktree directory
|
|
30
|
+
* @param branchName - Name of the branch in the worktree
|
|
31
|
+
* @param repoPath - Path to the main repository
|
|
32
|
+
* @returns System prompt context string, or empty string if not in worktree mode
|
|
33
|
+
*/
|
|
34
|
+
function buildWorktreeSystemPromptContext(worktreePath, branchName, repoPath) {
|
|
35
|
+
if (!worktreePath) {
|
|
36
|
+
return "";
|
|
37
|
+
}
|
|
38
|
+
return `
|
|
39
|
+
## Worktree Context
|
|
40
|
+
|
|
41
|
+
You are working in an **isolated git worktree**, not the main repository.
|
|
42
|
+
|
|
43
|
+
- **Worktree path**: ${worktreePath}
|
|
44
|
+
- **Branch**: ${branchName || "unknown"}
|
|
45
|
+
- **Main repository**: ${repoPath}
|
|
46
|
+
|
|
47
|
+
**IMPORTANT**: You MUST only read and edit files within the worktree directory (${worktreePath}).
|
|
48
|
+
Do NOT attempt to read or edit files in the main repository (${repoPath}) or any other directory outside the worktree.
|
|
49
|
+
All file paths you use should be relative to or within: ${worktreePath}
|
|
50
|
+
|
|
51
|
+
This isolation ensures your changes don't affect other work in progress.
|
|
52
|
+
`;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* ExecutionService
|
|
56
|
+
*
|
|
57
|
+
* Manages the full lifecycle of issue-based executions:
|
|
58
|
+
* - Creating and starting executions with worktree isolation
|
|
59
|
+
* - Creating follow-up executions that reuse worktrees
|
|
60
|
+
* - Canceling and cleaning up executions
|
|
61
|
+
*/
|
|
62
|
+
export class ExecutionService {
|
|
63
|
+
db;
|
|
64
|
+
projectId;
|
|
65
|
+
lifecycleService;
|
|
66
|
+
repoPath;
|
|
67
|
+
transportManager;
|
|
68
|
+
logsStore;
|
|
69
|
+
workerPool;
|
|
70
|
+
/**
|
|
71
|
+
* Create a new ExecutionService
|
|
72
|
+
*
|
|
73
|
+
* @param db - Database instance
|
|
74
|
+
* @param projectId - Project ID for WebSocket broadcasts
|
|
75
|
+
* @param repoPath - Path to the git repository
|
|
76
|
+
* @param lifecycleService - Optional execution lifecycle service (creates one if not provided)
|
|
77
|
+
* @param transportManager - Optional transport manager for SSE streaming
|
|
78
|
+
* @param logsStore - Optional execution logs store (creates one if not provided)
|
|
79
|
+
* @param workerPool - Optional worker pool for isolated execution processes
|
|
80
|
+
*/
|
|
81
|
+
constructor(db, projectId, repoPath, lifecycleService, transportManager, logsStore, workerPool) {
|
|
82
|
+
this.db = db;
|
|
83
|
+
this.projectId = projectId;
|
|
84
|
+
this.repoPath = repoPath;
|
|
85
|
+
this.lifecycleService =
|
|
86
|
+
lifecycleService || new ExecutionLifecycleService(db, repoPath);
|
|
87
|
+
this.transportManager = transportManager;
|
|
88
|
+
this.logsStore = logsStore || new ExecutionLogsStore(db);
|
|
89
|
+
this.workerPool = workerPool;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Create and start execution
|
|
93
|
+
*
|
|
94
|
+
* Creates an execution record, sets up worktree (if needed), and starts
|
|
95
|
+
* workflow execution. Returns the execution record immediately while
|
|
96
|
+
* workflow runs in the background.
|
|
97
|
+
*
|
|
98
|
+
* @param issueId - ID of issue to execute, or null for orchestrator executions
|
|
99
|
+
* @param config - Execution configuration
|
|
100
|
+
* @param prompt - Rendered prompt to execute
|
|
101
|
+
* @param agentType - Type of agent to use (defaults to 'claude-code')
|
|
102
|
+
* @param workflowContext - Optional workflow context for workflow-spawned executions
|
|
103
|
+
* @returns Created execution record
|
|
104
|
+
*/
|
|
105
|
+
async createExecution(issueId, config, prompt, agentType = "claude-code", workflowContext) {
|
|
106
|
+
// 1. Validate
|
|
107
|
+
if (!prompt.trim()) {
|
|
108
|
+
throw new Error("Prompt cannot be empty");
|
|
109
|
+
}
|
|
110
|
+
// 2. Build execution config with auto-injected MCP servers
|
|
111
|
+
const mergedConfig = await this.buildExecutionConfig(agentType, config);
|
|
112
|
+
// Get issue if issueId is provided (orchestrator executions don't have an issue)
|
|
113
|
+
let issue;
|
|
114
|
+
if (issueId) {
|
|
115
|
+
issue = this.db
|
|
116
|
+
.prepare("SELECT * FROM issues WHERE id = ?")
|
|
117
|
+
.get(issueId);
|
|
118
|
+
if (!issue) {
|
|
119
|
+
throw new Error(`Issue ${issueId} not found`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// Get the current branch as default (instead of hardcoding "main")
|
|
123
|
+
let defaultBranch = "main";
|
|
124
|
+
try {
|
|
125
|
+
defaultBranch = execSync("git rev-parse --abbrev-ref HEAD", {
|
|
126
|
+
cwd: this.repoPath,
|
|
127
|
+
encoding: "utf-8",
|
|
128
|
+
}).trim();
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
// Fall back to "main" if we can't determine current branch
|
|
132
|
+
}
|
|
133
|
+
// 3. Determine execution mode and create execution with worktree
|
|
134
|
+
// Store the original (unexpanded) prompt in the database
|
|
135
|
+
const mode = mergedConfig.mode || "worktree";
|
|
136
|
+
let execution;
|
|
137
|
+
let workDir;
|
|
138
|
+
// Worktree mode requires either an issue or a reuseWorktreePath
|
|
139
|
+
if (mode === "worktree" && !issueId && !mergedConfig.reuseWorktreePath) {
|
|
140
|
+
throw new Error("Worktree mode requires either an issueId or reuseWorktreePath");
|
|
141
|
+
}
|
|
142
|
+
if (mode === "worktree" && (issueId || mergedConfig.reuseWorktreePath)) {
|
|
143
|
+
// Check if we're reusing an existing worktree
|
|
144
|
+
if (mergedConfig.reuseWorktreePath) {
|
|
145
|
+
// Validate worktree exists
|
|
146
|
+
if (!fs.existsSync(mergedConfig.reuseWorktreePath)) {
|
|
147
|
+
throw new Error(`Cannot reuse worktree: path does not exist: ${mergedConfig.reuseWorktreePath}`);
|
|
148
|
+
}
|
|
149
|
+
// Validate it's a git worktree by checking for .git
|
|
150
|
+
const gitPath = path.join(mergedConfig.reuseWorktreePath, ".git");
|
|
151
|
+
if (!fs.existsSync(gitPath)) {
|
|
152
|
+
throw new Error(`Cannot reuse worktree: not a valid git worktree: ${mergedConfig.reuseWorktreePath}`);
|
|
153
|
+
}
|
|
154
|
+
// Get branch name from the worktree
|
|
155
|
+
let branchName;
|
|
156
|
+
try {
|
|
157
|
+
branchName = execSync("git rev-parse --abbrev-ref HEAD", {
|
|
158
|
+
cwd: mergedConfig.reuseWorktreePath,
|
|
159
|
+
encoding: "utf-8",
|
|
160
|
+
}).trim();
|
|
161
|
+
}
|
|
162
|
+
catch {
|
|
163
|
+
throw new Error(`Cannot reuse worktree: failed to get branch name from: ${mergedConfig.reuseWorktreePath}`);
|
|
164
|
+
}
|
|
165
|
+
// Capture before_commit from the reused worktree
|
|
166
|
+
let beforeCommit;
|
|
167
|
+
try {
|
|
168
|
+
beforeCommit = execSync("git rev-parse HEAD", {
|
|
169
|
+
cwd: mergedConfig.reuseWorktreePath,
|
|
170
|
+
encoding: "utf-8",
|
|
171
|
+
}).trim();
|
|
172
|
+
console.log(`[ExecutionService] Captured before_commit for reused worktree: ${beforeCommit}`);
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
console.warn("[ExecutionService] Failed to capture before_commit for reused worktree:", error instanceof Error ? error.message : String(error));
|
|
176
|
+
// Continue - this is supplementary data
|
|
177
|
+
}
|
|
178
|
+
// Create execution record with the reused worktree path
|
|
179
|
+
const executionId = randomUUID();
|
|
180
|
+
execution = createExecution(this.db, {
|
|
181
|
+
id: executionId,
|
|
182
|
+
issue_id: issueId,
|
|
183
|
+
agent_type: agentType,
|
|
184
|
+
mode: mode,
|
|
185
|
+
prompt: prompt,
|
|
186
|
+
config: JSON.stringify(mergedConfig),
|
|
187
|
+
target_branch: mergedConfig.baseBranch || branchName,
|
|
188
|
+
branch_name: branchName,
|
|
189
|
+
worktree_path: mergedConfig.reuseWorktreePath,
|
|
190
|
+
parent_execution_id: mergedConfig.parentExecutionId,
|
|
191
|
+
before_commit: beforeCommit,
|
|
192
|
+
});
|
|
193
|
+
workDir = mergedConfig.reuseWorktreePath;
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
// Create execution with isolated worktree
|
|
197
|
+
// This path requires issueId and issue (reuseWorktreePath not provided)
|
|
198
|
+
if (!issueId || !issue) {
|
|
199
|
+
throw new Error("Creating new worktree requires an issueId (use reuseWorktreePath for issue-less executions)");
|
|
200
|
+
}
|
|
201
|
+
const result = await this.lifecycleService.createExecutionWithWorktree({
|
|
202
|
+
issueId,
|
|
203
|
+
issueTitle: issue.title,
|
|
204
|
+
agentType: agentType,
|
|
205
|
+
targetBranch: mergedConfig.baseBranch || defaultBranch,
|
|
206
|
+
repoPath: this.repoPath,
|
|
207
|
+
mode: mode,
|
|
208
|
+
prompt: prompt, // Store original (unexpanded) prompt
|
|
209
|
+
config: JSON.stringify(mergedConfig),
|
|
210
|
+
createTargetBranch: mergedConfig.createBaseBranch || false,
|
|
211
|
+
parentExecutionId: mergedConfig.parentExecutionId,
|
|
212
|
+
});
|
|
213
|
+
execution = result.execution;
|
|
214
|
+
workDir = result.worktreePath;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
// Local mode - create execution without worktree
|
|
219
|
+
const executionId = randomUUID();
|
|
220
|
+
execution = createExecution(this.db, {
|
|
221
|
+
id: executionId,
|
|
222
|
+
issue_id: issueId,
|
|
223
|
+
agent_type: agentType,
|
|
224
|
+
mode: mode,
|
|
225
|
+
prompt: prompt, // Store original (unexpanded) prompt
|
|
226
|
+
config: JSON.stringify(mergedConfig),
|
|
227
|
+
target_branch: mergedConfig.baseBranch || defaultBranch,
|
|
228
|
+
branch_name: mergedConfig.baseBranch || defaultBranch,
|
|
229
|
+
parent_execution_id: mergedConfig.parentExecutionId,
|
|
230
|
+
});
|
|
231
|
+
workDir = this.repoPath;
|
|
232
|
+
// Capture current commit as before_commit for local mode
|
|
233
|
+
try {
|
|
234
|
+
const beforeCommit = execSync("git rev-parse HEAD", {
|
|
235
|
+
cwd: this.repoPath,
|
|
236
|
+
encoding: "utf-8",
|
|
237
|
+
}).trim();
|
|
238
|
+
updateExecution(this.db, executionId, {
|
|
239
|
+
before_commit: beforeCommit,
|
|
240
|
+
});
|
|
241
|
+
// Reload execution to get updated before_commit
|
|
242
|
+
const updatedExecution = getExecution(this.db, executionId);
|
|
243
|
+
if (updatedExecution) {
|
|
244
|
+
execution = updatedExecution;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
catch (error) {
|
|
248
|
+
console.warn("[ExecutionService] Failed to capture before_commit for local mode:", error instanceof Error ? error.message : String(error));
|
|
249
|
+
// Continue - this is supplementary data
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
// 3. Update workflow context if provided
|
|
253
|
+
if (workflowContext) {
|
|
254
|
+
updateExecution(this.db, execution.id, {
|
|
255
|
+
workflow_execution_id: workflowContext.workflowId,
|
|
256
|
+
});
|
|
257
|
+
// Reload execution to get updated workflow_execution_id
|
|
258
|
+
const updatedExecution = getExecution(this.db, execution.id);
|
|
259
|
+
if (updatedExecution) {
|
|
260
|
+
execution = updatedExecution;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
// 4. Resolve prompt references for execution (done after storing original)
|
|
264
|
+
// Pass the issue ID so the issue content is automatically included even if not explicitly mentioned
|
|
265
|
+
const resolver = new PromptResolver(this.db);
|
|
266
|
+
const { resolvedPrompt, errors } = await resolver.resolve(prompt, new Set(), issueId ?? undefined);
|
|
267
|
+
if (errors.length > 0) {
|
|
268
|
+
console.warn(`[ExecutionService] Prompt resolution warnings:`, errors);
|
|
269
|
+
}
|
|
270
|
+
// Initialize empty logs for this execution
|
|
271
|
+
try {
|
|
272
|
+
this.logsStore.initializeLogs(execution.id);
|
|
273
|
+
}
|
|
274
|
+
catch (error) {
|
|
275
|
+
console.error("[ExecutionService] Failed to initialize logs (non-critical):", {
|
|
276
|
+
executionId: execution.id,
|
|
277
|
+
error: error instanceof Error ? error.message : String(error),
|
|
278
|
+
});
|
|
279
|
+
// Don't fail execution creation - logs are nice-to-have
|
|
280
|
+
}
|
|
281
|
+
// 3. Start execution (use worker pool if available, otherwise fall back to in-process)
|
|
282
|
+
if (this.workerPool) {
|
|
283
|
+
// Worker pool handles all execution logic in isolated process
|
|
284
|
+
const dbPath = this.db.name;
|
|
285
|
+
await this.workerPool.startExecution(execution, this.repoPath, dbPath);
|
|
286
|
+
// Broadcast execution creation
|
|
287
|
+
broadcastExecutionUpdate(this.projectId, execution.id, "created", execution, execution.issue_id || undefined);
|
|
288
|
+
return execution;
|
|
289
|
+
}
|
|
290
|
+
// 4. In-process execution with executor wrapper (fallback when no worker pool)
|
|
291
|
+
// Extract agent-relevant config fields (exclude sudocode-specific fields like mode,
|
|
292
|
+
// baseBranch, createBaseBranch, branchName, reuseWorktreePath, etc.)
|
|
293
|
+
const { mode: _mode, baseBranch: _baseBranch, createBaseBranch: _createBaseBranch, branchName: _branchName, reuseWorktreePath: _reuseWorktreePath, checkpointInterval: _checkpointInterval, continueOnStepFailure: _continueOnStepFailure, captureFileChanges: _captureFileChanges, captureToolCalls: _captureToolCalls, ...agentConfig } = mergedConfig;
|
|
294
|
+
const wrapper = createExecutorForAgent(agentType, {
|
|
295
|
+
workDir: this.repoPath,
|
|
296
|
+
...agentConfig,
|
|
297
|
+
}, {
|
|
298
|
+
workDir: this.repoPath,
|
|
299
|
+
lifecycleService: this.lifecycleService,
|
|
300
|
+
logsStore: this.logsStore,
|
|
301
|
+
projectId: this.projectId,
|
|
302
|
+
db: this.db,
|
|
303
|
+
transportManager: this.transportManager,
|
|
304
|
+
});
|
|
305
|
+
// Log incoming config for debugging
|
|
306
|
+
console.log("[ExecutionService] createExecution mergedConfig:", {
|
|
307
|
+
hasMcpServers: !!mergedConfig.mcpServers,
|
|
308
|
+
mcpServerNames: mergedConfig.mcpServers
|
|
309
|
+
? Object.keys(mergedConfig.mcpServers)
|
|
310
|
+
: "none",
|
|
311
|
+
hasAppendSystemPrompt: !!mergedConfig.appendSystemPrompt,
|
|
312
|
+
dangerouslySkipPermissions: mergedConfig.dangerouslySkipPermissions,
|
|
313
|
+
});
|
|
314
|
+
// Log agentConfig being passed to executor
|
|
315
|
+
console.log("[ExecutionService] agentConfig passed to executor:", {
|
|
316
|
+
hasMcpServers: !!agentConfig.mcpServers,
|
|
317
|
+
mcpServerNames: agentConfig.mcpServers
|
|
318
|
+
? Object.keys(agentConfig.mcpServers)
|
|
319
|
+
: "none",
|
|
320
|
+
hasAppendSystemPrompt: !!agentConfig.appendSystemPrompt,
|
|
321
|
+
dangerouslySkipPermissions: agentConfig
|
|
322
|
+
.dangerouslySkipPermissions,
|
|
323
|
+
allKeys: Object.keys(agentConfig),
|
|
324
|
+
});
|
|
325
|
+
// Build worktree context for system prompt (if in worktree mode)
|
|
326
|
+
const worktreeContext = buildWorktreeSystemPromptContext(execution.worktree_path ?? undefined, execution.branch_name ?? undefined, this.repoPath);
|
|
327
|
+
// Merge worktree context with any existing appendSystemPrompt
|
|
328
|
+
const combinedAppendSystemPrompt = [
|
|
329
|
+
worktreeContext,
|
|
330
|
+
mergedConfig.appendSystemPrompt || "",
|
|
331
|
+
]
|
|
332
|
+
.filter(Boolean)
|
|
333
|
+
.join("\n");
|
|
334
|
+
// Build execution task (prompt already resolved above)
|
|
335
|
+
const task = {
|
|
336
|
+
id: execution.id,
|
|
337
|
+
type: "issue",
|
|
338
|
+
entityId: issueId ?? undefined,
|
|
339
|
+
prompt: resolvedPrompt,
|
|
340
|
+
workDir: workDir,
|
|
341
|
+
config: {
|
|
342
|
+
timeout: mergedConfig.timeout,
|
|
343
|
+
},
|
|
344
|
+
metadata: {
|
|
345
|
+
model: mergedConfig.model || "claude-sonnet-4",
|
|
346
|
+
captureFileChanges: mergedConfig.captureFileChanges ?? true,
|
|
347
|
+
captureToolCalls: mergedConfig.captureToolCalls ?? true,
|
|
348
|
+
issueId: issueId ?? undefined,
|
|
349
|
+
executionId: execution.id,
|
|
350
|
+
mcpServers: mergedConfig.mcpServers,
|
|
351
|
+
appendSystemPrompt: combinedAppendSystemPrompt || undefined,
|
|
352
|
+
dangerouslySkipPermissions: mergedConfig.dangerouslySkipPermissions,
|
|
353
|
+
resume: mergedConfig.resume,
|
|
354
|
+
},
|
|
355
|
+
priority: 0,
|
|
356
|
+
dependencies: [],
|
|
357
|
+
createdAt: new Date(),
|
|
358
|
+
};
|
|
359
|
+
console.log("[ExecutionService] Task metadata mcpServers:", {
|
|
360
|
+
hasMcpServers: !!task.metadata?.mcpServers,
|
|
361
|
+
mcpServerNames: task.metadata?.mcpServers
|
|
362
|
+
? Object.keys(task.metadata.mcpServers)
|
|
363
|
+
: "none",
|
|
364
|
+
});
|
|
365
|
+
// Execute with full lifecycle management (non-blocking)
|
|
366
|
+
wrapper.executeWithLifecycle(execution.id, task, workDir).catch((error) => {
|
|
367
|
+
console.error(`[ExecutionService] Execution ${execution.id} failed:`, error);
|
|
368
|
+
// Error is already handled by wrapper (status updated, broadcasts sent)
|
|
369
|
+
});
|
|
370
|
+
// Broadcast execution creation
|
|
371
|
+
broadcastExecutionUpdate(this.projectId, execution.id, "created", execution, execution.issue_id || undefined);
|
|
372
|
+
return execution;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Create follow-up execution
|
|
376
|
+
*
|
|
377
|
+
* For worktree-based executions: reuses the worktree and resumes the session.
|
|
378
|
+
* For local/non-worktree executions: creates a new execution with feedback context.
|
|
379
|
+
*
|
|
380
|
+
* @param executionId - ID of previous execution to follow up on
|
|
381
|
+
* @param feedback - Additional feedback/context to append to prompt
|
|
382
|
+
* @param options - Optional configuration
|
|
383
|
+
* @param options.includeOriginalPrompt - Whether to prepend the original issue content (default: false, assumes session resumption with full history)
|
|
384
|
+
* @returns Created follow-up execution record
|
|
385
|
+
*/
|
|
386
|
+
async createFollowUp(executionId, feedback, options) {
|
|
387
|
+
// 1. Get previous execution
|
|
388
|
+
const prevExecution = getExecution(this.db, executionId);
|
|
389
|
+
if (!prevExecution) {
|
|
390
|
+
throw new Error(`Execution ${executionId} not found`);
|
|
391
|
+
}
|
|
392
|
+
const hasWorktree = !!prevExecution.worktree_path;
|
|
393
|
+
// For worktree executions, check if worktree still exists on filesystem, recreate if needed
|
|
394
|
+
if (hasWorktree && this.lifecycleService) {
|
|
395
|
+
const fs = await import("fs");
|
|
396
|
+
const worktreeExists = fs.existsSync(prevExecution.worktree_path);
|
|
397
|
+
if (!worktreeExists) {
|
|
398
|
+
console.log(`Recreating worktree for follow-up execution: ${prevExecution.worktree_path}`);
|
|
399
|
+
// Recreate the worktree using the same path and branch
|
|
400
|
+
const worktreeManager = this.lifecycleService.worktreeManager;
|
|
401
|
+
await worktreeManager.createWorktree({
|
|
402
|
+
repoPath: this.repoPath,
|
|
403
|
+
branchName: prevExecution.branch_name,
|
|
404
|
+
worktreePath: prevExecution.worktree_path,
|
|
405
|
+
baseBranch: prevExecution.target_branch,
|
|
406
|
+
createBranch: false, // Branch already exists, just recreate worktree
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
// TODO: Make it so follow-ups don't require an issue id.
|
|
411
|
+
// 2. Build follow-up prompt (default: just feedback, assumes session resumption)
|
|
412
|
+
let followUpPrompt = feedback;
|
|
413
|
+
if (options?.includeOriginalPrompt) {
|
|
414
|
+
// Optional: include original issue content if explicitly requested
|
|
415
|
+
if (!prevExecution.issue_id) {
|
|
416
|
+
throw new Error("Previous execution must have an issue_id to include original prompt");
|
|
417
|
+
}
|
|
418
|
+
// Get issue content directly from database
|
|
419
|
+
const issue = this.db
|
|
420
|
+
.prepare("SELECT content FROM issues WHERE id = ?")
|
|
421
|
+
.get(prevExecution.issue_id);
|
|
422
|
+
if (!issue) {
|
|
423
|
+
throw new Error(`Issue ${prevExecution.issue_id} not found`);
|
|
424
|
+
}
|
|
425
|
+
followUpPrompt = `${issue.content}
|
|
426
|
+
|
|
427
|
+
${feedback}`;
|
|
428
|
+
}
|
|
429
|
+
// 3. Create new execution record that references previous execution
|
|
430
|
+
// Default to 'claude-code' if agent_type is null (for backwards compatibility)
|
|
431
|
+
const agentType = (prevExecution.agent_type || "claude-code");
|
|
432
|
+
// Determine working directory: worktree path if available, otherwise repo path (local mode)
|
|
433
|
+
const workDir = hasWorktree ? prevExecution.worktree_path : this.repoPath;
|
|
434
|
+
const newExecutionId = randomUUID();
|
|
435
|
+
const newExecution = createExecution(this.db, {
|
|
436
|
+
id: newExecutionId,
|
|
437
|
+
issue_id: prevExecution.issue_id,
|
|
438
|
+
agent_type: agentType, // Use same agent as previous execution
|
|
439
|
+
mode: prevExecution.mode || (hasWorktree ? "worktree" : "local"), // Inherit mode from parent
|
|
440
|
+
target_branch: prevExecution.target_branch,
|
|
441
|
+
branch_name: prevExecution.branch_name,
|
|
442
|
+
worktree_path: prevExecution.worktree_path || undefined, // Reuse same worktree (undefined for local)
|
|
443
|
+
config: prevExecution.config || undefined, // Preserve config (including cleanupMode) from previous execution
|
|
444
|
+
parent_execution_id: executionId, // Link to parent execution for follow-up chain
|
|
445
|
+
prompt: followUpPrompt, // Store original (unexpanded) follow-up prompt
|
|
446
|
+
});
|
|
447
|
+
// Initialize empty logs for this execution
|
|
448
|
+
try {
|
|
449
|
+
this.logsStore.initializeLogs(newExecution.id);
|
|
450
|
+
}
|
|
451
|
+
catch (error) {
|
|
452
|
+
console.error("[ExecutionService] Failed to initialize logs (non-critical):", {
|
|
453
|
+
executionId: newExecution.id,
|
|
454
|
+
error: error instanceof Error ? error.message : String(error),
|
|
455
|
+
});
|
|
456
|
+
// Don't fail execution creation - logs are nice-to-have
|
|
457
|
+
}
|
|
458
|
+
// Collect already-expanded entities from parent execution chain
|
|
459
|
+
const alreadyExpandedIds = await this.collectExpandedEntitiesFromChain(executionId);
|
|
460
|
+
// Resolve prompt references for execution (done after storing original)
|
|
461
|
+
// Skip entities that were already expanded in parent executions
|
|
462
|
+
const resolver = new PromptResolver(this.db);
|
|
463
|
+
const { resolvedPrompt, errors } = await resolver.resolve(followUpPrompt, alreadyExpandedIds);
|
|
464
|
+
if (errors.length > 0) {
|
|
465
|
+
console.warn(`[ExecutionService] Follow-up prompt resolution warnings:`, errors);
|
|
466
|
+
}
|
|
467
|
+
// Parse config to get model and other settings
|
|
468
|
+
// This is done early so we can pass it to the executor
|
|
469
|
+
const parsedConfig = prevExecution.config
|
|
470
|
+
? JSON.parse(prevExecution.config)
|
|
471
|
+
: {};
|
|
472
|
+
// 4. Use executor wrapper with session resumption
|
|
473
|
+
// IMPORTANT: Pass the full config from parent execution to preserve mcpServers,
|
|
474
|
+
// dangerouslySkipPermissions, appendSystemPrompt, and other settings
|
|
475
|
+
// Extract agent-relevant config fields (exclude sudocode-specific fields)
|
|
476
|
+
const { mode: _mode, baseBranch: _baseBranch, createBaseBranch: _createBaseBranch, branchName: _branchName, reuseWorktreePath: _reuseWorktreePath, checkpointInterval: _checkpointInterval, continueOnStepFailure: _continueOnStepFailure, captureFileChanges: _captureFileChanges, captureToolCalls: _captureToolCalls, ...parentAgentConfig } = parsedConfig;
|
|
477
|
+
const wrapper = createExecutorForAgent(agentType, {
|
|
478
|
+
workDir: this.repoPath,
|
|
479
|
+
...parentAgentConfig,
|
|
480
|
+
}, {
|
|
481
|
+
workDir: this.repoPath,
|
|
482
|
+
lifecycleService: this.lifecycleService,
|
|
483
|
+
logsStore: this.logsStore,
|
|
484
|
+
projectId: this.projectId,
|
|
485
|
+
db: this.db,
|
|
486
|
+
transportManager: this.transportManager,
|
|
487
|
+
});
|
|
488
|
+
// Use previous execution's session_id (the actual Claude UUID) if available
|
|
489
|
+
// This enables proper session resumption with Claude Code's --resume-session flag
|
|
490
|
+
// If no session_id was captured, we can't resume - this would start a new session
|
|
491
|
+
const sessionId = prevExecution.session_id;
|
|
492
|
+
if (!sessionId) {
|
|
493
|
+
console.warn(`[ExecutionService] No session_id found for execution ${executionId}, follow-up will start a new session`);
|
|
494
|
+
}
|
|
495
|
+
// Build worktree context for system prompt (if in worktree mode)
|
|
496
|
+
const followUpWorktreeContext = buildWorktreeSystemPromptContext(newExecution.worktree_path ?? undefined, newExecution.branch_name ?? undefined, this.repoPath);
|
|
497
|
+
// Merge worktree context with any existing appendSystemPrompt from parent config
|
|
498
|
+
const followUpCombinedAppendSystemPrompt = [
|
|
499
|
+
followUpWorktreeContext,
|
|
500
|
+
parsedConfig.appendSystemPrompt || "",
|
|
501
|
+
]
|
|
502
|
+
.filter(Boolean)
|
|
503
|
+
.join("\n");
|
|
504
|
+
// Build execution task for follow-up (use resolved prompt for agent)
|
|
505
|
+
// IMPORTANT: Inherit ALL config from parent execution
|
|
506
|
+
// This ensures orchestrator follow-ups retain dangerouslySkipPermissions, mcpServers,
|
|
507
|
+
// appendSystemPrompt, and any other config fields
|
|
508
|
+
const task = {
|
|
509
|
+
id: newExecution.id,
|
|
510
|
+
type: "issue",
|
|
511
|
+
entityId: prevExecution.issue_id ?? undefined,
|
|
512
|
+
prompt: resolvedPrompt,
|
|
513
|
+
workDir: workDir,
|
|
514
|
+
config: {
|
|
515
|
+
timeout: parsedConfig.timeout,
|
|
516
|
+
},
|
|
517
|
+
metadata: {
|
|
518
|
+
// Spread all config fields from parent execution first
|
|
519
|
+
...parsedConfig,
|
|
520
|
+
// Then override specific fields for this follow-up
|
|
521
|
+
model: parsedConfig.model || "claude-sonnet-4",
|
|
522
|
+
captureFileChanges: parsedConfig.captureFileChanges ?? true,
|
|
523
|
+
captureToolCalls: parsedConfig.captureToolCalls ?? true,
|
|
524
|
+
issueId: prevExecution.issue_id ?? undefined,
|
|
525
|
+
executionId: newExecution.id,
|
|
526
|
+
followUpOf: executionId,
|
|
527
|
+
// Override appendSystemPrompt with combined worktree context
|
|
528
|
+
appendSystemPrompt: followUpCombinedAppendSystemPrompt || undefined,
|
|
529
|
+
},
|
|
530
|
+
priority: 0,
|
|
531
|
+
dependencies: [],
|
|
532
|
+
createdAt: new Date(),
|
|
533
|
+
};
|
|
534
|
+
console.log("[ExecutionService] Follow-up task metadata:", {
|
|
535
|
+
executionId: newExecution.id,
|
|
536
|
+
parentExecutionId: executionId,
|
|
537
|
+
inheritedConfigKeys: Object.keys(parsedConfig),
|
|
538
|
+
hasMcpServers: !!parsedConfig.mcpServers,
|
|
539
|
+
mcpServerNames: parsedConfig.mcpServers
|
|
540
|
+
? Object.keys(parsedConfig.mcpServers)
|
|
541
|
+
: "none",
|
|
542
|
+
dangerouslySkipPermissions: parsedConfig.dangerouslySkipPermissions,
|
|
543
|
+
hasAppendSystemPrompt: !!parsedConfig.appendSystemPrompt,
|
|
544
|
+
model: parsedConfig.model,
|
|
545
|
+
});
|
|
546
|
+
// Execute follow-up (non-blocking)
|
|
547
|
+
// If we have a session ID, resume the session; otherwise start a new one
|
|
548
|
+
if (sessionId) {
|
|
549
|
+
wrapper
|
|
550
|
+
.resumeWithLifecycle(newExecution.id, sessionId, task, workDir)
|
|
551
|
+
.catch((error) => {
|
|
552
|
+
console.error(`[ExecutionService] Follow-up execution ${newExecution.id} failed:`, error);
|
|
553
|
+
// Error is already handled by wrapper (status updated, broadcasts sent)
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
else {
|
|
557
|
+
// No session to resume, start a new execution with the follow-up prompt
|
|
558
|
+
wrapper
|
|
559
|
+
.executeWithLifecycle(newExecution.id, task, workDir)
|
|
560
|
+
.catch((error) => {
|
|
561
|
+
console.error(`[ExecutionService] Follow-up execution ${newExecution.id} failed:`, error);
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
// Broadcast execution creation
|
|
565
|
+
broadcastExecutionUpdate(this.projectId, newExecution.id, "created", newExecution, newExecution.issue_id || undefined);
|
|
566
|
+
// Also broadcast to parent execution channel
|
|
567
|
+
if (newExecution.parent_execution_id) {
|
|
568
|
+
broadcastExecutionUpdate(this.projectId, newExecution.parent_execution_id, "updated", newExecution, newExecution.issue_id || undefined);
|
|
569
|
+
}
|
|
570
|
+
return newExecution;
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Cancel a running execution
|
|
574
|
+
*
|
|
575
|
+
* Stops the workflow execution and marks the execution as cancelled.
|
|
576
|
+
* Optionally cleans up the worktree based on config.
|
|
577
|
+
*
|
|
578
|
+
* @param executionId - ID of execution to cancel
|
|
579
|
+
*/
|
|
580
|
+
async cancelExecution(executionId) {
|
|
581
|
+
const execution = getExecution(this.db, executionId);
|
|
582
|
+
if (!execution) {
|
|
583
|
+
throw new Error(`Execution ${executionId} not found`);
|
|
584
|
+
}
|
|
585
|
+
if (execution.status !== "running") {
|
|
586
|
+
throw new Error(`Cannot cancel execution in ${execution.status} state`);
|
|
587
|
+
}
|
|
588
|
+
// Use worker pool cancellation if available
|
|
589
|
+
if (this.workerPool && this.workerPool.hasWorker(executionId)) {
|
|
590
|
+
await this.workerPool.cancelExecution(executionId);
|
|
591
|
+
return; // Worker pool handles DB updates and broadcasts
|
|
592
|
+
}
|
|
593
|
+
// For in-process executions using AgentExecutorWrapper:
|
|
594
|
+
// The wrapper manages its own lifecycle and cancellation.
|
|
595
|
+
// We update the database status, which the wrapper may check,
|
|
596
|
+
// or we rely on process termination to stop execution.
|
|
597
|
+
// TODO: Add cancellation registry in AgentExecutorWrapper for direct process control
|
|
598
|
+
// Update status in database
|
|
599
|
+
updateExecution(this.db, executionId, {
|
|
600
|
+
status: "stopped",
|
|
601
|
+
completed_at: new Date().toISOString(),
|
|
602
|
+
});
|
|
603
|
+
// Broadcast status change
|
|
604
|
+
const updated = getExecution(this.db, executionId);
|
|
605
|
+
if (updated) {
|
|
606
|
+
broadcastExecutionUpdate(this.projectId, executionId, "status_changed", updated, updated.issue_id || undefined);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Clean up execution resources
|
|
611
|
+
*
|
|
612
|
+
* Removes the worktree and associated files. This is called automatically
|
|
613
|
+
* on workflow completion, or can be called manually.
|
|
614
|
+
*
|
|
615
|
+
* @param executionId - ID of execution to clean up
|
|
616
|
+
*/
|
|
617
|
+
async cleanupExecution(executionId) {
|
|
618
|
+
await this.lifecycleService.cleanupExecution(executionId);
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* Check if worktree exists in filesystem for an execution
|
|
622
|
+
*
|
|
623
|
+
* @param executionId - ID of execution to check
|
|
624
|
+
* @returns true if worktree exists, false otherwise
|
|
625
|
+
*/
|
|
626
|
+
async worktreeExists(executionId) {
|
|
627
|
+
const execution = getExecution(this.db, executionId);
|
|
628
|
+
if (!execution || !execution.worktree_path) {
|
|
629
|
+
return false;
|
|
630
|
+
}
|
|
631
|
+
const fs = await import("fs");
|
|
632
|
+
return fs.existsSync(execution.worktree_path);
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* Delete worktree for an execution
|
|
636
|
+
*
|
|
637
|
+
* Manually deletes the worktree for a specific execution, regardless of
|
|
638
|
+
* cleanupMode configuration. This allows users to manually cleanup worktrees
|
|
639
|
+
* when they're configured for manual cleanup.
|
|
640
|
+
*
|
|
641
|
+
* @param executionId - ID of execution whose worktree to delete
|
|
642
|
+
* @param deleteBranch - Whether to also delete the execution's branch (default: false)
|
|
643
|
+
* @throws Error if execution not found, has no worktree, or worktree doesn't exist
|
|
644
|
+
*/
|
|
645
|
+
async deleteWorktree(executionId, deleteBranch = false) {
|
|
646
|
+
const execution = getExecution(this.db, executionId);
|
|
647
|
+
if (!execution) {
|
|
648
|
+
throw new Error(`Execution ${executionId} not found`);
|
|
649
|
+
}
|
|
650
|
+
if (!execution.worktree_path) {
|
|
651
|
+
throw new Error(`Execution ${executionId} has no worktree to delete`);
|
|
652
|
+
}
|
|
653
|
+
// Check if worktree exists in the filesystem
|
|
654
|
+
const fs = await import("fs");
|
|
655
|
+
const worktreeExists = fs.existsSync(execution.worktree_path);
|
|
656
|
+
if (!worktreeExists) {
|
|
657
|
+
throw new Error(`Worktree does not exist in filesystem: ${execution.worktree_path}`);
|
|
658
|
+
}
|
|
659
|
+
// TODO: Cancel any running execution.
|
|
660
|
+
// Get worktree manager from lifecycle service
|
|
661
|
+
const worktreeManager = this.lifecycleService.worktreeManager;
|
|
662
|
+
// Clean up the worktree
|
|
663
|
+
await worktreeManager.cleanupWorktree(execution.worktree_path, this.repoPath);
|
|
664
|
+
// Delete branch if requested and it was created by this execution
|
|
665
|
+
if (deleteBranch && execution.branch_name) {
|
|
666
|
+
try {
|
|
667
|
+
// A branch was created for this execution if:
|
|
668
|
+
// - branch_name is DIFFERENT from target_branch (autoCreateBranches was true)
|
|
669
|
+
// - This means a new worktree-specific branch was created
|
|
670
|
+
const wasCreatedByExecution = execution.branch_name !== execution.target_branch &&
|
|
671
|
+
execution.branch_name !== "(detached)";
|
|
672
|
+
if (wasCreatedByExecution) {
|
|
673
|
+
await worktreeManager.git.deleteBranch(this.repoPath, execution.branch_name, true // Force deletion
|
|
674
|
+
);
|
|
675
|
+
console.log(`[ExecutionService] Deleted execution-created branch: ${execution.branch_name}`);
|
|
676
|
+
}
|
|
677
|
+
else {
|
|
678
|
+
console.log(`[ExecutionService] Skipping branch deletion - branch ${execution.branch_name} is the target branch (not created by execution)`);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
catch (err) {
|
|
682
|
+
console.warn(`Failed to delete branch ${execution.branch_name} during worktree deletion:`, err);
|
|
683
|
+
// Continue even if branch deletion fails
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Delete an execution and its entire chain
|
|
689
|
+
*
|
|
690
|
+
* Deletes the execution and all its follow-ups (descendants).
|
|
691
|
+
* Optionally deletes the worktree and/or branch.
|
|
692
|
+
*
|
|
693
|
+
* @param executionId - ID of execution to delete (can be root or any execution in chain)
|
|
694
|
+
* @param deleteBranch - Whether to also delete the execution's branch (default: false)
|
|
695
|
+
* @param deleteWorktree - Whether to also delete the execution's worktree (default: false)
|
|
696
|
+
* @throws Error if execution not found
|
|
697
|
+
*/
|
|
698
|
+
async deleteExecution(executionId, deleteBranch = false, deleteWorktree = false) {
|
|
699
|
+
const execution = getExecution(this.db, executionId);
|
|
700
|
+
if (!execution) {
|
|
701
|
+
throw new Error(`Execution ${executionId} not found`);
|
|
702
|
+
}
|
|
703
|
+
// Find the root execution by traversing up parent_execution_id
|
|
704
|
+
let rootId = executionId;
|
|
705
|
+
let current = execution;
|
|
706
|
+
while (current.parent_execution_id) {
|
|
707
|
+
rootId = current.parent_execution_id;
|
|
708
|
+
const parent = getExecution(this.db, rootId);
|
|
709
|
+
if (!parent)
|
|
710
|
+
break;
|
|
711
|
+
current = parent;
|
|
712
|
+
}
|
|
713
|
+
// Get all executions in the chain (root + all descendants)
|
|
714
|
+
const chain = this.db
|
|
715
|
+
.prepare(`
|
|
716
|
+
WITH RECURSIVE execution_chain AS (
|
|
717
|
+
-- Base case: the root execution
|
|
718
|
+
SELECT * FROM executions WHERE id = ?
|
|
719
|
+
UNION ALL
|
|
720
|
+
-- Recursive case: children of executions in the chain
|
|
721
|
+
SELECT e.* FROM executions e
|
|
722
|
+
INNER JOIN execution_chain ec ON e.parent_execution_id = ec.id
|
|
723
|
+
)
|
|
724
|
+
SELECT * FROM execution_chain
|
|
725
|
+
`)
|
|
726
|
+
.all(rootId);
|
|
727
|
+
// Cancel any running executions in the chain
|
|
728
|
+
for (const exec of chain) {
|
|
729
|
+
if (exec.status === "running" || exec.status === "pending") {
|
|
730
|
+
try {
|
|
731
|
+
await this.cancelExecution(exec.id);
|
|
732
|
+
}
|
|
733
|
+
catch (err) {
|
|
734
|
+
console.warn(`Failed to cancel execution ${exec.id} during deletion:`, err);
|
|
735
|
+
// Continue with deletion even if cancel fails
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
// Delete worktree if requested and it exists (only for root execution)
|
|
740
|
+
const rootExecution = chain.find((e) => e.id === rootId);
|
|
741
|
+
if (deleteWorktree && rootExecution?.worktree_path) {
|
|
742
|
+
try {
|
|
743
|
+
const fs = await import("fs");
|
|
744
|
+
if (fs.existsSync(rootExecution.worktree_path)) {
|
|
745
|
+
await this.deleteWorktree(rootId);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
catch (err) {
|
|
749
|
+
console.warn(`Failed to delete worktree during execution deletion:`, err);
|
|
750
|
+
// Continue with deletion even if worktree cleanup fails
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
// Delete branch if requested and it exists
|
|
754
|
+
// IMPORTANT: Only delete branches that were created specifically for this execution
|
|
755
|
+
if (deleteBranch && rootExecution?.branch_name) {
|
|
756
|
+
try {
|
|
757
|
+
// A branch was created for this execution if:
|
|
758
|
+
// - branch_name is DIFFERENT from target_branch (autoCreateBranches was true)
|
|
759
|
+
// - This means a new worktree-specific branch was created
|
|
760
|
+
//
|
|
761
|
+
// A branch was NOT created (reusing existing) if:
|
|
762
|
+
// - branch_name === target_branch (autoCreateBranches was false)
|
|
763
|
+
// - This means the worktree reused the target branch directly
|
|
764
|
+
const wasCreatedByExecution = rootExecution.branch_name !== rootExecution.target_branch &&
|
|
765
|
+
rootExecution.branch_name !== "(detached)";
|
|
766
|
+
if (wasCreatedByExecution) {
|
|
767
|
+
// Get worktree manager from lifecycle service to access git operations
|
|
768
|
+
const worktreeManager = this.lifecycleService
|
|
769
|
+
.worktreeManager;
|
|
770
|
+
await worktreeManager.git.deleteBranch(this.repoPath, rootExecution.branch_name, true // Force deletion
|
|
771
|
+
);
|
|
772
|
+
console.log(`[ExecutionService] Deleted execution-created branch: ${rootExecution.branch_name}`);
|
|
773
|
+
}
|
|
774
|
+
else {
|
|
775
|
+
console.log(`[ExecutionService] Skipping branch deletion - branch ${rootExecution.branch_name} is the target branch (not created by execution)`);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
catch (err) {
|
|
779
|
+
console.warn(`Failed to delete branch ${rootExecution.branch_name} during execution deletion:`, err);
|
|
780
|
+
// Continue with deletion even if branch deletion fails
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
// Delete execution logs for all executions in the chain
|
|
784
|
+
for (const exec of chain) {
|
|
785
|
+
try {
|
|
786
|
+
this.logsStore.deleteLogs(exec.id);
|
|
787
|
+
}
|
|
788
|
+
catch (err) {
|
|
789
|
+
console.warn(`Failed to delete logs for execution ${exec.id}:`, err);
|
|
790
|
+
// Continue with deletion even if log cleanup fails
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
// Delete all executions in the chain from database
|
|
794
|
+
// Delete in reverse order (children first) to avoid foreign key issues
|
|
795
|
+
const chainIds = chain.map((e) => e.id);
|
|
796
|
+
const placeholders = chainIds.map(() => "?").join(",");
|
|
797
|
+
this.db
|
|
798
|
+
.prepare(`DELETE FROM executions WHERE id IN (${placeholders})`)
|
|
799
|
+
.run(...chainIds);
|
|
800
|
+
// Broadcast deletion event for each execution
|
|
801
|
+
for (const exec of chain) {
|
|
802
|
+
broadcastExecutionUpdate(this.projectId, exec.id, "deleted", { executionId: exec.id }, exec.issue_id || undefined);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* Shutdown execution service - cancel all active executions
|
|
807
|
+
*
|
|
808
|
+
* This is called during server shutdown to gracefully terminate
|
|
809
|
+
* all running executions before the server exits.
|
|
810
|
+
*/
|
|
811
|
+
async shutdown() {
|
|
812
|
+
// Shutdown worker pool if available
|
|
813
|
+
if (this.workerPool) {
|
|
814
|
+
await this.workerPool.shutdown();
|
|
815
|
+
}
|
|
816
|
+
// For in-process executions using AgentExecutorWrapper:
|
|
817
|
+
// The wrapper manages its own lifecycle. Processes will be terminated
|
|
818
|
+
// when the Node.js process exits.
|
|
819
|
+
// TODO: Add active execution tracking to AgentExecutorWrapper for graceful shutdown
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* List all executions for an issue
|
|
823
|
+
*
|
|
824
|
+
* Returns all executions associated with a specific issue,
|
|
825
|
+
* ordered by creation time (most recent first).
|
|
826
|
+
*
|
|
827
|
+
* @param issueId - ID of issue to list executions for
|
|
828
|
+
* @returns Array of executions for the issue
|
|
829
|
+
*/
|
|
830
|
+
listExecutions(issueId) {
|
|
831
|
+
const executions = this.db
|
|
832
|
+
.prepare(`
|
|
833
|
+
SELECT * FROM executions
|
|
834
|
+
WHERE issue_id = ?
|
|
835
|
+
ORDER BY created_at DESC
|
|
836
|
+
`)
|
|
837
|
+
.all(issueId);
|
|
838
|
+
return executions;
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* Get a single execution by ID
|
|
842
|
+
*
|
|
843
|
+
* @param executionId - ID of execution to retrieve
|
|
844
|
+
* @returns Execution or null if not found
|
|
845
|
+
*/
|
|
846
|
+
getExecution(executionId) {
|
|
847
|
+
return getExecution(this.db, executionId);
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* List all executions with filtering and pagination
|
|
851
|
+
*
|
|
852
|
+
* Returns executions across all issues with support for filtering
|
|
853
|
+
* by status, issueId, and pagination.
|
|
854
|
+
*
|
|
855
|
+
* @param options - Filtering and pagination options
|
|
856
|
+
* @param options.limit - Maximum number of executions to return (default: 50)
|
|
857
|
+
* @param options.offset - Number of executions to skip (default: 0)
|
|
858
|
+
* @param options.status - Filter by execution status (single or array)
|
|
859
|
+
* @param options.issueId - Filter by issue ID
|
|
860
|
+
* @param options.sortBy - Field to sort by (default: 'created_at')
|
|
861
|
+
* @param options.order - Sort order (default: 'desc')
|
|
862
|
+
* @param options.since - Only return executions created after this ISO date
|
|
863
|
+
* @param options.includeRunning - When used with 'since', also include running executions regardless of age
|
|
864
|
+
* @returns Object containing executions array, total count, and hasMore flag
|
|
865
|
+
*/
|
|
866
|
+
listAll(options = {}) {
|
|
867
|
+
const limit = options.limit ?? 50;
|
|
868
|
+
const offset = options.offset ?? 0;
|
|
869
|
+
const sortBy = options.sortBy ?? "created_at";
|
|
870
|
+
const order = options.order ?? "desc";
|
|
871
|
+
// Validate inputs
|
|
872
|
+
if (limit < 0 || offset < 0) {
|
|
873
|
+
throw new Error("Limit and offset must be non-negative");
|
|
874
|
+
}
|
|
875
|
+
// Build WHERE clause dynamically
|
|
876
|
+
const whereClauses = [];
|
|
877
|
+
const params = [];
|
|
878
|
+
// Filter by status (single or array)
|
|
879
|
+
if (options.status) {
|
|
880
|
+
const statuses = Array.isArray(options.status)
|
|
881
|
+
? options.status
|
|
882
|
+
: [options.status];
|
|
883
|
+
const placeholders = statuses.map(() => "?").join(",");
|
|
884
|
+
whereClauses.push(`status IN (${placeholders})`);
|
|
885
|
+
params.push(...statuses);
|
|
886
|
+
}
|
|
887
|
+
// Filter by issueId
|
|
888
|
+
if (options.issueId) {
|
|
889
|
+
whereClauses.push("issue_id = ?");
|
|
890
|
+
params.push(options.issueId);
|
|
891
|
+
}
|
|
892
|
+
// Filter by since date (with optional includeRunning)
|
|
893
|
+
if (options.since) {
|
|
894
|
+
if (options.includeRunning) {
|
|
895
|
+
// Include executions created after 'since' OR that are currently running
|
|
896
|
+
whereClauses.push("(created_at >= ? OR status = 'running')");
|
|
897
|
+
params.push(options.since);
|
|
898
|
+
}
|
|
899
|
+
else {
|
|
900
|
+
// Only include executions created after 'since'
|
|
901
|
+
whereClauses.push("created_at >= ?");
|
|
902
|
+
params.push(options.since);
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
// Build WHERE clause
|
|
906
|
+
const whereClause = whereClauses.length > 0 ? `WHERE ${whereClauses.join(" AND ")}` : "";
|
|
907
|
+
// Get total count
|
|
908
|
+
const countQuery = `SELECT COUNT(*) as count FROM executions ${whereClause}`;
|
|
909
|
+
const countResult = this.db.prepare(countQuery).get(...params);
|
|
910
|
+
const total = countResult.count;
|
|
911
|
+
// Get executions with pagination
|
|
912
|
+
const query = `
|
|
913
|
+
SELECT * FROM executions
|
|
914
|
+
${whereClause}
|
|
915
|
+
ORDER BY ${sortBy} ${order.toUpperCase()}
|
|
916
|
+
LIMIT ? OFFSET ?
|
|
917
|
+
`;
|
|
918
|
+
const executions = this.db
|
|
919
|
+
.prepare(query)
|
|
920
|
+
.all(...params, limit, offset);
|
|
921
|
+
// Calculate hasMore
|
|
922
|
+
const hasMore = offset + executions.length < total;
|
|
923
|
+
return {
|
|
924
|
+
executions,
|
|
925
|
+
total,
|
|
926
|
+
hasMore,
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* Check if there are any active executions
|
|
931
|
+
*
|
|
932
|
+
* @returns true if there are active worker pool executions
|
|
933
|
+
*/
|
|
934
|
+
hasActiveExecutions() {
|
|
935
|
+
// Check worker pool for active executions
|
|
936
|
+
if (this.workerPool) {
|
|
937
|
+
return this.workerPool.getActiveWorkerCount() > 0;
|
|
938
|
+
}
|
|
939
|
+
// For in-process executions, we don't track them anymore
|
|
940
|
+
// Query the database for running executions as a fallback
|
|
941
|
+
const runningExecutions = this.db
|
|
942
|
+
.prepare("SELECT COUNT(*) as count FROM executions WHERE status = 'running'")
|
|
943
|
+
.get();
|
|
944
|
+
return runningExecutions.count > 0;
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* Collect entity IDs that were already expanded in parent executions
|
|
948
|
+
*
|
|
949
|
+
* Walks the execution chain backwards and resolves each prompt to extract
|
|
950
|
+
* which entities were referenced (and thus expanded) in previous executions.
|
|
951
|
+
* This prevents redundant expansion of the same entities in follow-ups.
|
|
952
|
+
*
|
|
953
|
+
* @param executionId - ID of the current execution
|
|
954
|
+
* @returns Set of entity IDs that were already expanded
|
|
955
|
+
*/
|
|
956
|
+
async collectExpandedEntitiesFromChain(executionId) {
|
|
957
|
+
const expandedIds = new Set();
|
|
958
|
+
const resolver = new PromptResolver(this.db);
|
|
959
|
+
// Walk backwards through the execution chain
|
|
960
|
+
let currentExecId = executionId;
|
|
961
|
+
while (currentExecId) {
|
|
962
|
+
const execution = getExecution(this.db, currentExecId);
|
|
963
|
+
if (!execution || !execution.prompt)
|
|
964
|
+
break;
|
|
965
|
+
// Resolve the prompt to extract what entities were referenced
|
|
966
|
+
// Pass empty set so we expand everything in this pass (just to collect IDs)
|
|
967
|
+
// Pass the execution's issue_id as implicit to track if it was auto-included
|
|
968
|
+
const { expandedEntityIds } = await resolver.resolve(execution.prompt, new Set(), execution.issue_id || undefined);
|
|
969
|
+
// Add all expanded entity IDs from this execution
|
|
970
|
+
expandedEntityIds.forEach((id) => expandedIds.add(id));
|
|
971
|
+
// Move to parent execution
|
|
972
|
+
currentExecId = execution.parent_execution_id || null;
|
|
973
|
+
}
|
|
974
|
+
return expandedIds;
|
|
975
|
+
}
|
|
976
|
+
/**
|
|
977
|
+
* Build execution config with auto-injected MCP servers
|
|
978
|
+
*
|
|
979
|
+
* This method handles the auto-injection of sudocode-mcp into the execution config
|
|
980
|
+
* when it's not already configured. It:
|
|
981
|
+
* 1. Checks if sudocode-mcp package is installed (throws error if not)
|
|
982
|
+
* 2. Checks if the agent already has sudocode-mcp configured
|
|
983
|
+
* 3. Auto-injects sudocode-mcp to mcpServers if needed
|
|
984
|
+
* 4. Preserves all user-provided MCP servers
|
|
985
|
+
*
|
|
986
|
+
* @param agentType - The type of agent to execute
|
|
987
|
+
* @param userConfig - User-provided execution configuration
|
|
988
|
+
* @returns Merged execution configuration with auto-injected MCP servers
|
|
989
|
+
* @throws Error if sudocode-mcp package is not installed
|
|
990
|
+
*/
|
|
991
|
+
async buildExecutionConfig(agentType, userConfig) {
|
|
992
|
+
// Start with user config
|
|
993
|
+
const mergedConfig = { ...userConfig };
|
|
994
|
+
// 1. Detect if sudocode-mcp package is installed
|
|
995
|
+
const isInstalled = await this.detectSudocodeMcp();
|
|
996
|
+
if (!isInstalled) {
|
|
997
|
+
throw new Error("sudocode-mcp package not found. Please install sudocode to enable MCP tools.\nVisit: https://github.com/sudocode-ai/sudocode");
|
|
998
|
+
}
|
|
999
|
+
// 2. Check if agent already has sudocode-mcp configured
|
|
1000
|
+
const mcpPresent = await this.detectAgentMcp(agentType);
|
|
1001
|
+
// 3. For Cursor, MCP MUST be configured (no CLI injection available)
|
|
1002
|
+
if (agentType === "cursor" && !mcpPresent) {
|
|
1003
|
+
throw new Error("Cursor agent requires sudocode-mcp to be configured in .cursor/mcp.json.\n" +
|
|
1004
|
+
"Please create .cursor/mcp.json in your project root with:\n\n" +
|
|
1005
|
+
JSON.stringify({
|
|
1006
|
+
mcpServers: {
|
|
1007
|
+
"sudocode-mcp": {
|
|
1008
|
+
command: "sudocode-mcp",
|
|
1009
|
+
},
|
|
1010
|
+
},
|
|
1011
|
+
}, null, 2) +
|
|
1012
|
+
"\n\nVisit: https://github.com/sudocode-ai/sudocode");
|
|
1013
|
+
}
|
|
1014
|
+
// For Cursor with sudocode-mcp, auto-approve MCP servers in headless mode
|
|
1015
|
+
if (agentType === "cursor" && mcpPresent) {
|
|
1016
|
+
console.info("[ExecutionService] Enabling approveMcps for Cursor (sudocode-mcp detected)");
|
|
1017
|
+
mergedConfig.approveMcps = true;
|
|
1018
|
+
}
|
|
1019
|
+
// 4. Auto-inject sudocode-mcp if not configured and not already in userConfig
|
|
1020
|
+
if (!mcpPresent && !userConfig.mcpServers?.["sudocode-mcp"]) {
|
|
1021
|
+
console.info("[ExecutionService] Adding sudocode-mcp to mcpServers (auto-injection)");
|
|
1022
|
+
mergedConfig.mcpServers = {
|
|
1023
|
+
...(userConfig.mcpServers || {}),
|
|
1024
|
+
"sudocode-mcp": {
|
|
1025
|
+
command: "sudocode-mcp",
|
|
1026
|
+
},
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
else if (mcpPresent) {
|
|
1030
|
+
console.info("[ExecutionService] Removing sudocode-mcp from CLI config (using plugin instead)");
|
|
1031
|
+
// Remove sudocode-mcp from mcpServers to avoid duplication with plugin
|
|
1032
|
+
if (userConfig.mcpServers) {
|
|
1033
|
+
const { "sudocode-mcp": _removed, ...rest } = userConfig.mcpServers;
|
|
1034
|
+
mergedConfig.mcpServers = Object.keys(rest).length > 0 ? rest : undefined;
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
else if (userConfig.mcpServers?.["sudocode-mcp"]) {
|
|
1038
|
+
console.info("[ExecutionService] Skipping sudocode-mcp injection (user provided in config)");
|
|
1039
|
+
}
|
|
1040
|
+
return mergedConfig;
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* Detect if sudocode-mcp command is available in PATH
|
|
1044
|
+
*
|
|
1045
|
+
* This checks if the sudocode-mcp package is installed on the system by
|
|
1046
|
+
* attempting to locate the command using `which` (Unix) or `where` (Windows).
|
|
1047
|
+
*
|
|
1048
|
+
* @returns true if sudocode-mcp is available, false otherwise
|
|
1049
|
+
* @internal Used by buildExecutionConfig
|
|
1050
|
+
*/
|
|
1051
|
+
async detectSudocodeMcp() {
|
|
1052
|
+
try {
|
|
1053
|
+
// Use 'which' on Unix systems, 'where' on Windows
|
|
1054
|
+
const command = process.platform === "win32" ? "where" : "which";
|
|
1055
|
+
const result = await execFileNoThrow(command, ["sudocode-mcp"]);
|
|
1056
|
+
if (result.status === 0) {
|
|
1057
|
+
return true;
|
|
1058
|
+
}
|
|
1059
|
+
else {
|
|
1060
|
+
// Command failed - sudocode-mcp not found in PATH
|
|
1061
|
+
console.warn("[ExecutionService] sudocode-mcp command not found in PATH");
|
|
1062
|
+
return false;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
catch (error) {
|
|
1066
|
+
// Unexpected error during detection
|
|
1067
|
+
console.warn("[ExecutionService] Failed to detect sudocode-mcp:", error instanceof Error ? error.message : String(error));
|
|
1068
|
+
return false;
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* Detect if sudocode-mcp is configured for the given agent
|
|
1073
|
+
*
|
|
1074
|
+
* For claude-code: Checks if the sudocode plugin is enabled in ~/.claude/settings.json
|
|
1075
|
+
* For cursor: Checks .cursor/mcp.json in project root for sudocode-mcp command
|
|
1076
|
+
* For codex: Checks ~/.codex/config.toml for sudocode-mcp in mcp_servers
|
|
1077
|
+
* For copilot: Checks ~/.copilot/mcp-config.json for sudocode-mcp command
|
|
1078
|
+
*
|
|
1079
|
+
* @param agentType - The type of agent to check
|
|
1080
|
+
* @returns true if configured, false otherwise
|
|
1081
|
+
* @internal Used by buildExecutionConfig
|
|
1082
|
+
*/
|
|
1083
|
+
async detectAgentMcp(agentType) {
|
|
1084
|
+
// For claude-code, check ~/.claude/settings.json
|
|
1085
|
+
// This is not foolproof, but covers the default case
|
|
1086
|
+
if (agentType === "claude-code") {
|
|
1087
|
+
try {
|
|
1088
|
+
const claudeSettingsPath = path.join(os.homedir(), ".claude", "settings.json");
|
|
1089
|
+
const settingsContent = await fsPromises.readFile(claudeSettingsPath, "utf-8");
|
|
1090
|
+
const settings = JSON.parse(settingsContent);
|
|
1091
|
+
// Check if sudocode@sudocode-marketplace is enabled
|
|
1092
|
+
const isEnabled = settings.enabledPlugins?.["sudocode@sudocode-marketplace"] === true;
|
|
1093
|
+
if (isEnabled) {
|
|
1094
|
+
console.info("[ExecutionService] sudocode-mcp detected for claude-code (plugin enabled)");
|
|
1095
|
+
}
|
|
1096
|
+
else {
|
|
1097
|
+
console.info("[ExecutionService] sudocode-mcp not detected for claude-code (plugin not enabled)");
|
|
1098
|
+
}
|
|
1099
|
+
return isEnabled;
|
|
1100
|
+
}
|
|
1101
|
+
catch (error) {
|
|
1102
|
+
// Handle file read errors gracefully
|
|
1103
|
+
if (error instanceof Error &&
|
|
1104
|
+
"code" in error &&
|
|
1105
|
+
error.code === "ENOENT") {
|
|
1106
|
+
// File not found - plugin definitely not configured
|
|
1107
|
+
console.warn("[ExecutionService] ~/.claude/settings.json not found - plugin not configured");
|
|
1108
|
+
return false;
|
|
1109
|
+
}
|
|
1110
|
+
else if (error instanceof SyntaxError) {
|
|
1111
|
+
// Malformed JSON - can't determine, assume configured (conservative)
|
|
1112
|
+
console.error("[ExecutionService] Failed to parse ~/.claude/settings.json - malformed JSON:", error.message);
|
|
1113
|
+
return true;
|
|
1114
|
+
}
|
|
1115
|
+
else {
|
|
1116
|
+
// Other errors (permission denied, etc.) - can't determine, assume configured (conservative)
|
|
1117
|
+
console.warn("[ExecutionService] Failed to read ~/.claude/settings.json:", error instanceof Error ? error.message : String(error));
|
|
1118
|
+
return true;
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
// For cursor, check .cursor/mcp.json in project root
|
|
1123
|
+
if (agentType === "cursor") {
|
|
1124
|
+
try {
|
|
1125
|
+
// NOTE: .cursor/mcp.json is in project root, not home directory
|
|
1126
|
+
const cursorConfigPath = path.join(this.repoPath, ".cursor", "mcp.json");
|
|
1127
|
+
const configContent = await fsPromises.readFile(cursorConfigPath, "utf-8");
|
|
1128
|
+
const config = JSON.parse(configContent);
|
|
1129
|
+
// Check if any mcpServer has command "sudocode-mcp"
|
|
1130
|
+
const hasSudocodeMcp = Object.values(config.mcpServers || {}).some((server) => server.command === "sudocode-mcp");
|
|
1131
|
+
if (hasSudocodeMcp) {
|
|
1132
|
+
console.info("[ExecutionService] sudocode-mcp detected for cursor");
|
|
1133
|
+
}
|
|
1134
|
+
else {
|
|
1135
|
+
console.info("[ExecutionService] sudocode-mcp not detected for cursor");
|
|
1136
|
+
}
|
|
1137
|
+
return hasSudocodeMcp;
|
|
1138
|
+
}
|
|
1139
|
+
catch (error) {
|
|
1140
|
+
// Handle ENOENT, JSON parse errors, etc.
|
|
1141
|
+
if (error instanceof Error &&
|
|
1142
|
+
"code" in error &&
|
|
1143
|
+
error.code === "ENOENT") {
|
|
1144
|
+
// File not found - MCP definitely not configured
|
|
1145
|
+
console.warn("[ExecutionService] .cursor/mcp.json not found in project root - MCP not configured");
|
|
1146
|
+
return false;
|
|
1147
|
+
}
|
|
1148
|
+
else if (error instanceof SyntaxError) {
|
|
1149
|
+
// Malformed JSON - can't determine configuration
|
|
1150
|
+
console.error("[ExecutionService] Failed to parse .cursor/mcp.json - malformed JSON:", error.message);
|
|
1151
|
+
return false;
|
|
1152
|
+
}
|
|
1153
|
+
else {
|
|
1154
|
+
// Other errors (permission denied, etc.)
|
|
1155
|
+
console.warn("[ExecutionService] Failed to read .cursor/mcp.json:", error instanceof Error ? error.message : String(error));
|
|
1156
|
+
return false;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
// For codex, check ~/.codex/config.toml
|
|
1161
|
+
if (agentType === "codex") {
|
|
1162
|
+
try {
|
|
1163
|
+
const codexConfigPath = path.join(os.homedir(), ".codex", "config.toml");
|
|
1164
|
+
const configContent = await fsPromises.readFile(codexConfigPath, "utf-8");
|
|
1165
|
+
const config = TOML.parse(configContent);
|
|
1166
|
+
// Check if any mcp_servers section has command "sudocode-mcp"
|
|
1167
|
+
const mcpServers = config.mcp_servers;
|
|
1168
|
+
const hasSudocodeMcp = mcpServers &&
|
|
1169
|
+
Object.values(mcpServers).some((server) => server.command === "sudocode-mcp");
|
|
1170
|
+
if (hasSudocodeMcp) {
|
|
1171
|
+
console.info("[ExecutionService] sudocode-mcp detected for codex");
|
|
1172
|
+
}
|
|
1173
|
+
else {
|
|
1174
|
+
console.info("[ExecutionService] sudocode-mcp not detected for codex");
|
|
1175
|
+
}
|
|
1176
|
+
return !!hasSudocodeMcp;
|
|
1177
|
+
}
|
|
1178
|
+
catch (error) {
|
|
1179
|
+
// Handle ENOENT, TOML parse errors, etc.
|
|
1180
|
+
if (error instanceof Error &&
|
|
1181
|
+
"code" in error &&
|
|
1182
|
+
error.code === "ENOENT") {
|
|
1183
|
+
// File not found - MCP definitely not configured
|
|
1184
|
+
console.warn("[ExecutionService] ~/.codex/config.toml not found - MCP not configured");
|
|
1185
|
+
return false;
|
|
1186
|
+
}
|
|
1187
|
+
else if (error instanceof Error && error.message.includes("parse")) {
|
|
1188
|
+
// Malformed TOML - can't determine configuration
|
|
1189
|
+
console.error("[ExecutionService] Failed to parse ~/.codex/config.toml - malformed TOML:", error.message);
|
|
1190
|
+
return false;
|
|
1191
|
+
}
|
|
1192
|
+
else {
|
|
1193
|
+
// Other errors (permission denied, etc.)
|
|
1194
|
+
console.warn("[ExecutionService] Failed to detect codex MCP config:", error instanceof Error ? error.message : String(error));
|
|
1195
|
+
return false;
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
// For copilot, check ~/.copilot/mcp-config.json
|
|
1200
|
+
if (agentType === "copilot") {
|
|
1201
|
+
try {
|
|
1202
|
+
const copilotConfigPath = path.join(os.homedir(), ".copilot", "mcp-config.json");
|
|
1203
|
+
const configContent = await fsPromises.readFile(copilotConfigPath, "utf-8");
|
|
1204
|
+
const config = JSON.parse(configContent);
|
|
1205
|
+
// Check if any mcpServer has command "sudocode-mcp"
|
|
1206
|
+
const hasSudocodeMcp = Object.values(config.mcpServers || {}).some((server) => server.command === "sudocode-mcp");
|
|
1207
|
+
if (hasSudocodeMcp) {
|
|
1208
|
+
console.info("[ExecutionService] sudocode-mcp detected for copilot");
|
|
1209
|
+
}
|
|
1210
|
+
else {
|
|
1211
|
+
console.info("[ExecutionService] sudocode-mcp not detected for copilot");
|
|
1212
|
+
}
|
|
1213
|
+
return hasSudocodeMcp;
|
|
1214
|
+
}
|
|
1215
|
+
catch (error) {
|
|
1216
|
+
// Handle ENOENT, JSON parse errors, etc.
|
|
1217
|
+
if (error instanceof Error &&
|
|
1218
|
+
"code" in error &&
|
|
1219
|
+
error.code === "ENOENT") {
|
|
1220
|
+
// File not found - MCP definitely not configured
|
|
1221
|
+
console.warn("[ExecutionService] ~/.copilot/mcp-config.json not found - MCP not configured");
|
|
1222
|
+
return false;
|
|
1223
|
+
}
|
|
1224
|
+
else if (error instanceof SyntaxError) {
|
|
1225
|
+
// Malformed JSON - can't determine configuration
|
|
1226
|
+
console.error("[ExecutionService] Failed to parse ~/.copilot/mcp-config.json - malformed JSON:", error.message);
|
|
1227
|
+
return false;
|
|
1228
|
+
}
|
|
1229
|
+
else {
|
|
1230
|
+
// Other errors (permission denied, etc.)
|
|
1231
|
+
console.warn("[ExecutionService] Failed to detect copilot MCP config:", error instanceof Error ? error.message : String(error));
|
|
1232
|
+
return false;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
// For other agents, return true (safe default)
|
|
1237
|
+
return true;
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
//# sourceMappingURL=execution-service.js.map
|