@superblocksteam/vite-plugin-file-sync 2.0.141-next.2 → 2.0.142-next.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/dist/ai-service/agent/middleware.d.ts +2 -1
- package/dist/ai-service/agent/middleware.d.ts.map +1 -1
- package/dist/ai-service/agent/prompts/api-prompts.d.ts +7 -1
- package/dist/ai-service/agent/prompts/api-prompts.d.ts.map +1 -1
- package/dist/ai-service/agent/prompts/api-prompts.js +24 -13
- package/dist/ai-service/agent/prompts/api-prompts.js.map +1 -1
- package/dist/ai-service/agent/prompts/build-base-system-prompt.js +1 -1
- package/dist/ai-service/agent/prompts/build-base-system-prompt.js.map +1 -1
- package/dist/ai-service/agent/prompts/build-security-scan-prompt.d.ts +0 -1
- package/dist/ai-service/agent/prompts/build-security-scan-prompt.d.ts.map +1 -1
- package/dist/ai-service/agent/prompts/build-security-scan-prompt.js +1 -1
- package/dist/ai-service/agent/prompts/build-security-scan-prompt.js.map +1 -1
- package/dist/ai-service/agent/subagents/apis/example-selector.d.ts +1 -1
- package/dist/ai-service/agent/subagents/apis/example-selector.d.ts.map +1 -1
- package/dist/ai-service/agent/subagents/apis/examples.d.ts +1 -18
- package/dist/ai-service/agent/subagents/apis/examples.d.ts.map +1 -1
- package/dist/ai-service/agent/subagents/apis/examples.js +3 -3
- package/dist/ai-service/agent/subagents/apis/examples.js.map +1 -1
- package/dist/ai-service/agent/subagents/apis/prompt-builder.d.ts +2 -1
- package/dist/ai-service/agent/subagents/apis/prompt-builder.d.ts.map +1 -1
- package/dist/ai-service/agent/tool-permission-delivery.d.ts +41 -0
- package/dist/ai-service/agent/tool-permission-delivery.d.ts.map +1 -0
- package/dist/ai-service/agent/tool-permission-delivery.js +84 -0
- package/dist/ai-service/agent/tool-permission-delivery.js.map +1 -0
- package/dist/ai-service/agent/tools/apis/api-executor.d.ts +2 -1
- package/dist/ai-service/agent/tools/apis/api-executor.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/apis/api-testing-state.d.ts +2 -1
- package/dist/ai-service/agent/tools/apis/api-testing-state.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.d.ts +5 -10
- package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.js +2 -2
- package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.js.map +1 -1
- package/dist/ai-service/agent/tools/apis/build-api-artifact.d.ts +3 -2
- package/dist/ai-service/agent/tools/apis/build-api-artifact.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/apis/get-api-docs.d.ts +0 -4
- package/dist/ai-service/agent/tools/apis/get-api-docs.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/apis/get-api-docs.js +1 -1
- package/dist/ai-service/agent/tools/apis/get-api-docs.js.map +1 -1
- package/dist/ai-service/agent/tools/apis/integration-types.d.ts +2 -10
- package/dist/ai-service/agent/tools/apis/integration-types.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/apis/integration-types.js +1 -14
- package/dist/ai-service/agent/tools/apis/integration-types.js.map +1 -1
- package/dist/ai-service/agent/tools/apis/sdk-registry.d.ts +2 -3
- package/dist/ai-service/agent/tools/apis/sdk-registry.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/apis/sdk-registry.js +1 -1
- package/dist/ai-service/agent/tools/apis/sdk-registry.js.map +1 -1
- package/dist/ai-service/agent/tools/apis/test-api.d.ts +0 -9
- package/dist/ai-service/agent/tools/apis/test-api.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/apis/test-api.js +3 -7
- package/dist/ai-service/agent/tools/apis/test-api.js.map +1 -1
- package/dist/ai-service/agent/tools/build-capture-screenshot.d.ts +1 -21
- package/dist/ai-service/agent/tools/build-capture-screenshot.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/build-capture-screenshot.js +1 -1
- package/dist/ai-service/agent/tools/build-capture-screenshot.js.map +1 -1
- package/dist/ai-service/agent/tools/build-edit-file.d.ts +0 -7
- package/dist/ai-service/agent/tools/build-edit-file.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/build-edit-file.js +6 -6
- package/dist/ai-service/agent/tools/build-edit-file.js.map +1 -1
- package/dist/ai-service/agent/tools/build-finalize.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/build-finalize.js +5 -4
- package/dist/ai-service/agent/tools/build-finalize.js.map +1 -1
- package/dist/ai-service/agent/tools/build-lookup-npm-package.d.ts +2 -1
- package/dist/ai-service/agent/tools/build-lookup-npm-package.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/build-manage-checklist.d.ts +32 -5
- package/dist/ai-service/agent/tools/build-manage-checklist.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/build-manage-checklist.js +67 -7
- package/dist/ai-service/agent/tools/build-manage-checklist.js.map +1 -1
- package/dist/ai-service/agent/tools/build-navigate-preview.d.ts +2 -1
- package/dist/ai-service/agent/tools/build-navigate-preview.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/build-read-file.d.ts +0 -12
- package/dist/ai-service/agent/tools/build-read-file.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/build-read-file.js +0 -30
- package/dist/ai-service/agent/tools/build-read-file.js.map +1 -1
- package/dist/ai-service/agent/tools/databases/dev-database-tasks.d.ts +3 -4
- package/dist/ai-service/agent/tools/databases/dev-database-tasks.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/databases/dev-database-tasks.js +32 -10
- package/dist/ai-service/agent/tools/databases/dev-database-tasks.js.map +1 -1
- package/dist/ai-service/agent/tools/debug-cache.d.ts +4 -3
- package/dist/ai-service/agent/tools/debug-cache.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/index.d.ts +4 -2
- package/dist/ai-service/agent/tools/index.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/index.js +4 -2
- package/dist/ai-service/agent/tools/index.js.map +1 -1
- package/dist/ai-service/agent/tools/mark-api-manually-verified.d.ts +31 -0
- package/dist/ai-service/agent/tools/mark-api-manually-verified.d.ts.map +1 -0
- package/dist/ai-service/agent/tools/mark-api-manually-verified.js +94 -0
- package/dist/ai-service/agent/tools/mark-api-manually-verified.js.map +1 -0
- package/dist/ai-service/agent/tools/migration/update-migration-write-policy.d.ts +23 -0
- package/dist/ai-service/agent/tools/migration/update-migration-write-policy.d.ts.map +1 -0
- package/dist/ai-service/agent/tools/migration/update-migration-write-policy.js +94 -0
- package/dist/ai-service/agent/tools/migration/update-migration-write-policy.js.map +1 -0
- package/dist/ai-service/agent/tools/screenshot-selector.d.ts +2 -1
- package/dist/ai-service/agent/tools/screenshot-selector.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/shared-helpers.d.ts +0 -1
- package/dist/ai-service/agent/tools/shared-helpers.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/shared-helpers.js +0 -6
- package/dist/ai-service/agent/tools/shared-helpers.js.map +1 -1
- package/dist/ai-service/agent/tools.d.ts.map +1 -1
- package/dist/ai-service/agent/tools.js +25 -40
- package/dist/ai-service/agent/tools.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/git.d.ts +1 -1
- package/dist/ai-service/agent/tools2/tools/grep-metadata-ripgrep.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/grep-metadata-ripgrep.js +44 -38
- package/dist/ai-service/agent/tools2/tools/grep-metadata-ripgrep.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/grep.d.ts +1 -1
- package/dist/ai-service/agent/tools2/tools/grep.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/grep.js +36 -28
- package/dist/ai-service/agent/tools2/tools/grep.js.map +1 -1
- package/dist/ai-service/agent/utils.d.ts +0 -1
- package/dist/ai-service/agent/utils.d.ts.map +1 -1
- package/dist/ai-service/agent/utils.js +0 -4
- package/dist/ai-service/agent/utils.js.map +1 -1
- package/dist/ai-service/app-interface/constants.d.ts +0 -24
- package/dist/ai-service/app-interface/constants.d.ts.map +1 -1
- package/dist/ai-service/app-interface/constants.js +4 -16
- package/dist/ai-service/app-interface/constants.js.map +1 -1
- package/dist/ai-service/app-interface/filesystem/index.d.ts +1 -4
- package/dist/ai-service/app-interface/filesystem/index.d.ts.map +1 -1
- package/dist/ai-service/app-interface/filesystem/index.js +0 -3
- package/dist/ai-service/app-interface/filesystem/index.js.map +1 -1
- package/dist/ai-service/app-interface/npm-error-parser.d.ts +0 -77
- package/dist/ai-service/app-interface/npm-error-parser.d.ts.map +1 -1
- package/dist/ai-service/app-interface/npm-error-parser.js.map +1 -1
- package/dist/ai-service/app-interface/npm-package-lookup.d.ts +2 -1
- package/dist/ai-service/app-interface/npm-package-lookup.d.ts.map +1 -1
- package/dist/ai-service/app-interface/npm-registry.d.ts +5 -5
- package/dist/ai-service/app-interface/npm-registry.d.ts.map +1 -1
- package/dist/ai-service/app-interface/shell.d.ts +5 -4
- package/dist/ai-service/app-interface/shell.d.ts.map +1 -1
- package/dist/ai-service/app-skills/helpers.d.ts +0 -9
- package/dist/ai-service/app-skills/helpers.d.ts.map +1 -1
- package/dist/ai-service/app-skills/helpers.js +2 -75
- package/dist/ai-service/app-skills/helpers.js.map +1 -1
- package/dist/ai-service/attachment-upload.d.ts +2 -1
- package/dist/ai-service/attachment-upload.d.ts.map +1 -1
- package/dist/ai-service/attachments/index.d.ts +1 -1
- package/dist/ai-service/attachments/index.d.ts.map +1 -1
- package/dist/ai-service/attachments/index.js +1 -1
- package/dist/ai-service/attachments/index.js.map +1 -1
- package/dist/ai-service/attachments/store.d.ts +5 -2
- package/dist/ai-service/attachments/store.d.ts.map +1 -1
- package/dist/ai-service/attachments/store.js.map +1 -1
- package/dist/ai-service/attachments/text-upload-artifacts.d.ts +0 -1
- package/dist/ai-service/attachments/text-upload-artifacts.d.ts.map +1 -1
- package/dist/ai-service/attachments/text-upload-artifacts.js +1 -1
- package/dist/ai-service/attachments/text-upload-artifacts.js.map +1 -1
- package/dist/ai-service/attachments/uploaded-content-part.d.ts +2 -15
- package/dist/ai-service/attachments/uploaded-content-part.d.ts.map +1 -1
- package/dist/ai-service/attachments/uploaded-content-part.js +1 -1
- package/dist/ai-service/attachments/uploaded-content-part.js.map +1 -1
- package/dist/ai-service/chat/chat-push-metrics.d.ts +2 -1
- package/dist/ai-service/chat/chat-push-metrics.d.ts.map +1 -1
- package/dist/ai-service/chat/chat-session-store-metrics.d.ts +3 -2
- package/dist/ai-service/chat/chat-session-store-metrics.d.ts.map +1 -1
- package/dist/ai-service/chat/chat-session-store-metrics.js.map +1 -1
- package/dist/ai-service/chat/chat-session-store.d.ts +3 -8
- package/dist/ai-service/chat/chat-session-store.d.ts.map +1 -1
- package/dist/ai-service/chat/chat-session-store.js +8 -2
- package/dist/ai-service/chat/chat-session-store.js.map +1 -1
- package/dist/ai-service/chat/transcript-budget.d.ts +3 -5
- package/dist/ai-service/chat/transcript-budget.d.ts.map +1 -1
- package/dist/ai-service/chat/transcript-budget.js +2 -2
- package/dist/ai-service/chat/transcript-budget.js.map +1 -1
- package/dist/ai-service/chat/transcript-metrics.d.ts +12 -0
- package/dist/ai-service/chat/transcript-metrics.d.ts.map +1 -1
- package/dist/ai-service/chat/transcript-metrics.js +14 -0
- package/dist/ai-service/chat/transcript-metrics.js.map +1 -1
- package/dist/ai-service/checklist/api-migration-checklist-gate.d.ts +2 -0
- package/dist/ai-service/checklist/api-migration-checklist-gate.d.ts.map +1 -1
- package/dist/ai-service/checklist/api-migration-checklist-gate.js +16 -1
- package/dist/ai-service/checklist/api-migration-checklist-gate.js.map +1 -1
- package/dist/ai-service/checklist/persisted-checklist-store.d.ts +2 -4
- package/dist/ai-service/checklist/persisted-checklist-store.d.ts.map +1 -1
- package/dist/ai-service/checklist/persisted-checklist-store.js +5 -5
- package/dist/ai-service/checklist/persisted-checklist-store.js.map +1 -1
- package/dist/ai-service/const.d.ts +0 -5
- package/dist/ai-service/const.d.ts.map +1 -1
- package/dist/ai-service/const.js +0 -5
- package/dist/ai-service/const.js.map +1 -1
- package/dist/ai-service/context/app-context.d.ts +2 -2
- package/dist/ai-service/context/app-context.d.ts.map +1 -1
- package/dist/ai-service/context-flush-scheduler.d.ts +2 -1
- package/dist/ai-service/context-flush-scheduler.d.ts.map +1 -1
- package/dist/ai-service/dev-database-client.d.ts +6 -5
- package/dist/ai-service/dev-database-client.d.ts.map +1 -1
- package/dist/ai-service/dev-database-client.js +2 -2
- package/dist/ai-service/dev-database-client.js.map +1 -1
- package/dist/ai-service/features.d.ts +1 -1
- package/dist/ai-service/features.d.ts.map +1 -1
- package/dist/ai-service/filter-disabled-tools-for-migration.d.ts.map +1 -1
- package/dist/ai-service/filter-disabled-tools-for-migration.js +3 -0
- package/dist/ai-service/filter-disabled-tools-for-migration.js.map +1 -1
- package/dist/ai-service/index.d.ts +2 -0
- package/dist/ai-service/index.d.ts.map +1 -1
- package/dist/ai-service/index.js +33 -14
- package/dist/ai-service/index.js.map +1 -1
- package/dist/ai-service/integrations/gron.d.ts +18 -0
- package/dist/ai-service/integrations/gron.d.ts.map +1 -0
- package/dist/ai-service/integrations/gron.js +321 -0
- package/dist/ai-service/integrations/gron.js.map +1 -0
- package/dist/ai-service/integrations/metadata-binaries.d.ts +28 -0
- package/dist/ai-service/integrations/metadata-binaries.d.ts.map +1 -0
- package/dist/ai-service/integrations/metadata-binaries.js +48 -0
- package/dist/ai-service/integrations/metadata-binaries.js.map +1 -0
- package/dist/ai-service/integrations/metadata-storage/local.d.ts +2 -1
- package/dist/ai-service/integrations/metadata-storage/local.d.ts.map +1 -1
- package/dist/ai-service/integrations/metadata-storage/local.js +61 -58
- package/dist/ai-service/integrations/metadata-storage/local.js.map +1 -1
- package/dist/ai-service/integrations/ripgrep-path.d.ts +6 -0
- package/dist/ai-service/integrations/ripgrep-path.d.ts.map +1 -0
- package/dist/ai-service/integrations/ripgrep-path.js +56 -0
- package/dist/ai-service/integrations/ripgrep-path.js.map +1 -0
- package/dist/ai-service/integrations/store.d.ts +3 -8
- package/dist/ai-service/integrations/store.d.ts.map +1 -1
- package/dist/ai-service/integrations/store.js +2 -8
- package/dist/ai-service/integrations/store.js.map +1 -1
- package/dist/ai-service/judge/integration/playwright-bridge.d.ts +2 -1
- package/dist/ai-service/judge/integration/playwright-bridge.d.ts.map +1 -1
- package/dist/ai-service/judge/tools/index.d.ts +0 -2
- package/dist/ai-service/judge/tools/index.d.ts.map +1 -1
- package/dist/ai-service/judge/tools/index.js +0 -2
- package/dist/ai-service/judge/tools/index.js.map +1 -1
- package/dist/ai-service/judge/tools/submit-feedback.d.ts +0 -7
- package/dist/ai-service/judge/tools/submit-feedback.d.ts.map +1 -1
- package/dist/ai-service/judge/tools/submit-feedback.js +0 -13
- package/dist/ai-service/judge/tools/submit-feedback.js.map +1 -1
- package/dist/ai-service/knowledge/helpers.d.ts +2 -1
- package/dist/ai-service/knowledge/helpers.d.ts.map +1 -1
- package/dist/ai-service/knowledge/knowledge-metrics.d.ts +5 -4
- package/dist/ai-service/knowledge/knowledge-metrics.d.ts.map +1 -1
- package/dist/ai-service/knowledge/knowledge-metrics.js.map +1 -1
- package/dist/ai-service/llm/chaos-fetch.d.ts +0 -12
- package/dist/ai-service/llm/chaos-fetch.d.ts.map +1 -1
- package/dist/ai-service/llm/client.d.ts +3 -3
- package/dist/ai-service/llm/client.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/caching.d.ts +2 -1
- package/dist/ai-service/llm/context-v2/caching.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/compaction/client-side.d.ts +2 -1
- package/dist/ai-service/llm/context-v2/compaction/client-side.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/compactor.d.ts +2 -1
- package/dist/ai-service/llm/context-v2/compactor.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/context-management.d.ts +1 -1
- package/dist/ai-service/llm/context-v2/context-management.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/context-metrics.d.ts +5 -4
- package/dist/ai-service/llm/context-v2/context-metrics.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/context-metrics.js.map +1 -1
- package/dist/ai-service/llm/context-v2/context.d.ts +12 -5
- package/dist/ai-service/llm/context-v2/context.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/context.js +29 -2
- package/dist/ai-service/llm/context-v2/context.js.map +1 -1
- package/dist/ai-service/llm/context-v2/manager.d.ts +2 -1
- package/dist/ai-service/llm/context-v2/manager.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/migrations/index.d.ts +0 -1
- package/dist/ai-service/llm/context-v2/migrations/index.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/migrations/index.js +0 -1
- package/dist/ai-service/llm/context-v2/migrations/index.js.map +1 -1
- package/dist/ai-service/llm/context-v2/migrations/types.d.ts +0 -5
- package/dist/ai-service/llm/context-v2/migrations/types.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/migrations/types.js +1 -8
- package/dist/ai-service/llm/context-v2/migrations/types.js.map +1 -1
- package/dist/ai-service/llm/context-v2/phase1-tool-summarizer.d.ts +3 -2
- package/dist/ai-service/llm/context-v2/phase1-tool-summarizer.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/token-tracker.d.ts +0 -1
- package/dist/ai-service/llm/context-v2/token-tracker.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/token-tracker.js +1 -1
- package/dist/ai-service/llm/context-v2/token-tracker.js.map +1 -1
- package/dist/ai-service/llm/context-v2/turns.d.ts +2 -1
- package/dist/ai-service/llm/context-v2/turns.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/types.d.ts +1 -1
- package/dist/ai-service/llm/context-v2/types.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/utils/get-loaded-context.d.ts +2 -1
- package/dist/ai-service/llm/context-v2/utils/get-loaded-context.d.ts.map +1 -1
- package/dist/ai-service/llm/error.d.ts +0 -14
- package/dist/ai-service/llm/error.d.ts.map +1 -1
- package/dist/ai-service/llm/error.js +0 -8
- package/dist/ai-service/llm/error.js.map +1 -1
- package/dist/ai-service/llm/stream/compaction-text-block.d.ts +2 -1
- package/dist/ai-service/llm/stream/compaction-text-block.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/config.d.ts +4 -5
- package/dist/ai-service/llm/stream/config.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/config.js +1 -1
- package/dist/ai-service/llm/stream/config.js.map +1 -1
- package/dist/ai-service/llm/stream/errors.d.ts +1 -2
- package/dist/ai-service/llm/stream/errors.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/errors.js +1 -2
- package/dist/ai-service/llm/stream/errors.js.map +1 -1
- package/dist/ai-service/llm/stream/event-bus.d.ts +4 -3
- package/dist/ai-service/llm/stream/event-bus.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/idle-monitor.d.ts +3 -2
- package/dist/ai-service/llm/stream/idle-monitor.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/index.d.ts +1 -1
- package/dist/ai-service/llm/stream/index.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/index.js.map +1 -1
- package/dist/ai-service/llm/stream/observers/context.d.ts +3 -3
- package/dist/ai-service/llm/stream/observers/context.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/observers/context.js.map +1 -1
- package/dist/ai-service/llm/stream/observers/index.d.ts +4 -4
- package/dist/ai-service/llm/stream/observers/index.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/observers/index.js +4 -4
- package/dist/ai-service/llm/stream/observers/index.js.map +1 -1
- package/dist/ai-service/llm/stream/observers/llmobs.d.ts +3 -2
- package/dist/ai-service/llm/stream/observers/llmobs.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/observers/logging.d.ts +3 -2
- package/dist/ai-service/llm/stream/observers/logging.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/observers/retry-notification.d.ts +2 -1
- package/dist/ai-service/llm/stream/observers/retry-notification.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/orchestrator.d.ts +3 -2
- package/dist/ai-service/llm/stream/orchestrator.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/retry-engine.d.ts +3 -6
- package/dist/ai-service/llm/stream/retry-engine.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/session.d.ts +1 -1
- package/dist/ai-service/llm/stream/session.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/tests/helpers/mock-provider.d.ts +1 -20
- package/dist/ai-service/llm/stream/tests/helpers/mock-provider.d.ts.map +1 -1
- package/dist/ai-service/llm/stream/tests/helpers/mock-provider.js +5 -5
- package/dist/ai-service/llm/stream/tests/helpers/mock-provider.js.map +1 -1
- package/dist/ai-service/llm/tool-context-integrity.d.ts +1 -1
- package/dist/ai-service/llm/tool-context-integrity.d.ts.map +1 -1
- package/dist/ai-service/llmobs/helpers.d.ts +0 -3
- package/dist/ai-service/llmobs/helpers.d.ts.map +1 -1
- package/dist/ai-service/llmobs/helpers.js +0 -36
- package/dist/ai-service/llmobs/helpers.js.map +1 -1
- package/dist/ai-service/llmobs/index.d.ts +1 -1
- package/dist/ai-service/llmobs/index.d.ts.map +1 -1
- package/dist/ai-service/llmobs/index.js +1 -1
- package/dist/ai-service/llmobs/index.js.map +1 -1
- package/dist/ai-service/llmobs/tracer.d.ts +1 -1
- package/dist/ai-service/llmobs/tracer.d.ts.map +1 -1
- package/dist/ai-service/llmobs/tracer.js +1 -1
- package/dist/ai-service/llmobs/tracer.js.map +1 -1
- package/dist/ai-service/llmobs/types.d.ts +0 -2
- package/dist/ai-service/llmobs/types.d.ts.map +1 -1
- package/dist/ai-service/mcp/embedded-playwright-mcp-server.d.ts +3 -3
- package/dist/ai-service/mcp/embedded-playwright-mcp-server.d.ts.map +1 -1
- package/dist/ai-service/mcp/embedded-playwright-mcp-server.js.map +1 -1
- package/dist/ai-service/migration-auto-dispatch-readiness.d.ts +4 -3
- package/dist/ai-service/migration-auto-dispatch-readiness.d.ts.map +1 -1
- package/dist/ai-service/migration-prompt-gating.d.ts +3 -2
- package/dist/ai-service/migration-prompt-gating.d.ts.map +1 -1
- package/dist/ai-service/migration-prompt-gating.js +1 -0
- package/dist/ai-service/migration-prompt-gating.js.map +1 -1
- package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.d.ts +2 -1
- package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.d.ts.map +1 -1
- package/dist/ai-service/prompt-builder-service/types.d.ts +0 -10
- package/dist/ai-service/prompt-builder-service/types.d.ts.map +1 -1
- package/dist/ai-service/prompt-builder-service/types.js +1 -1
- package/dist/ai-service/prompt-builder-service/types.js.map +1 -1
- package/dist/ai-service/quota-client.d.ts +2 -1
- package/dist/ai-service/quota-client.d.ts.map +1 -1
- package/dist/ai-service/recording/block-traversal.d.ts +0 -15
- package/dist/ai-service/recording/block-traversal.d.ts.map +1 -1
- package/dist/ai-service/recording/block-traversal.js +1 -15
- package/dist/ai-service/recording/block-traversal.js.map +1 -1
- package/dist/ai-service/recording/index.d.ts +1 -1
- package/dist/ai-service/recording/index.d.ts.map +1 -1
- package/dist/ai-service/recording/index.js +1 -1
- package/dist/ai-service/recording/index.js.map +1 -1
- package/dist/ai-service/recording/recording-manager.d.ts +2 -1
- package/dist/ai-service/recording/recording-manager.d.ts.map +1 -1
- package/dist/ai-service/recording/snapshot-manager.d.ts +2 -7
- package/dist/ai-service/recording/snapshot-manager.d.ts.map +1 -1
- package/dist/ai-service/recording/storage/session-recording-storage.d.ts +2 -1
- package/dist/ai-service/recording/storage/session-recording-storage.d.ts.map +1 -1
- package/dist/ai-service/recording/types.d.ts +0 -8
- package/dist/ai-service/recording/types.d.ts.map +1 -1
- package/dist/ai-service/resolve-generation-state-for-ui.d.ts +2 -1
- package/dist/ai-service/resolve-generation-state-for-ui.d.ts.map +1 -1
- package/dist/ai-service/security/index.d.ts +3 -3
- package/dist/ai-service/security/index.d.ts.map +1 -1
- package/dist/ai-service/security/index.js +3 -3
- package/dist/ai-service/security/index.js.map +1 -1
- package/dist/ai-service/security/safety-classifier.d.ts +3 -21
- package/dist/ai-service/security/safety-classifier.d.ts.map +1 -1
- package/dist/ai-service/security/safety-classifier.js +3 -4
- package/dist/ai-service/security/safety-classifier.js.map +1 -1
- package/dist/ai-service/security/secret-scanner-service.d.ts +0 -6
- package/dist/ai-service/security/secret-scanner-service.d.ts.map +1 -1
- package/dist/ai-service/security/secret-scanner-service.js +3 -3
- package/dist/ai-service/security/secret-scanner-service.js.map +1 -1
- package/dist/ai-service/skills/index.d.ts +1 -1
- package/dist/ai-service/skills/index.d.ts.map +1 -1
- package/dist/ai-service/skills/system/_registry.generated.d.ts.map +1 -1
- package/dist/ai-service/skills/system/_registry.generated.js +2 -0
- package/dist/ai-service/skills/system/_registry.generated.js.map +1 -1
- package/dist/ai-service/skills/system/materialized.d.ts +2 -1
- package/dist/ai-service/skills/system/materialized.d.ts.map +1 -1
- package/dist/ai-service/skills/system/migration-api-verification/skill.generated.d.ts +2 -0
- package/dist/ai-service/skills/system/migration-api-verification/skill.generated.d.ts.map +1 -0
- package/dist/ai-service/skills/system/migration-api-verification/skill.generated.js +119 -0
- package/dist/ai-service/skills/system/migration-api-verification/skill.generated.js.map +1 -0
- package/dist/ai-service/skills/system/superblocks-migration/skill.generated.d.ts +1 -1
- package/dist/ai-service/skills/system/superblocks-migration/skill.generated.d.ts.map +1 -1
- package/dist/ai-service/skills/system/superblocks-migration/skill.generated.js +47 -19
- package/dist/ai-service/skills/system/superblocks-migration/skill.generated.js.map +1 -1
- package/dist/ai-service/skills/types.d.ts +2 -5
- package/dist/ai-service/skills/types.d.ts.map +1 -1
- package/dist/ai-service/skills/types.js +0 -7
- package/dist/ai-service/skills/types.js.map +1 -1
- package/dist/ai-service/state-machine/clark-fsm.d.ts +1 -2
- package/dist/ai-service/state-machine/clark-fsm.d.ts.map +1 -1
- package/dist/ai-service/state-machine/clark-fsm.js.map +1 -1
- package/dist/ai-service/state-machine/handlers/llm-generating.d.ts.map +1 -1
- package/dist/ai-service/state-machine/handlers/llm-generating.js +24 -5
- package/dist/ai-service/state-machine/handlers/llm-generating.js.map +1 -1
- package/dist/ai-service/state-machine/helpers/background-chat-record-metrics.d.ts +3 -4
- package/dist/ai-service/state-machine/helpers/background-chat-record-metrics.d.ts.map +1 -1
- package/dist/ai-service/state-machine/helpers/background-chat-record-metrics.js +0 -5
- package/dist/ai-service/state-machine/helpers/background-chat-record-metrics.js.map +1 -1
- package/dist/ai-service/state-machine/helpers/change-info.d.ts +0 -1
- package/dist/ai-service/state-machine/helpers/change-info.d.ts.map +1 -1
- package/dist/ai-service/state-machine/helpers/change-info.js +1 -1
- package/dist/ai-service/state-machine/helpers/change-info.js.map +1 -1
- package/dist/ai-service/state-machine/helpers/classification.d.ts +1 -1
- package/dist/ai-service/state-machine/helpers/classification.d.ts.map +1 -1
- package/dist/ai-service/state-machine/helpers/classification.js +1 -2
- package/dist/ai-service/state-machine/helpers/classification.js.map +1 -1
- package/dist/ai-service/state-machine/helpers/fetch-with-reconnect-retry.d.ts +2 -1
- package/dist/ai-service/state-machine/helpers/fetch-with-reconnect-retry.d.ts.map +1 -1
- package/dist/ai-service/state-machine/helpers/peer.d.ts +4 -3
- package/dist/ai-service/state-machine/helpers/peer.d.ts.map +1 -1
- package/dist/ai-service/state-machine/helpers/pre-session-metrics.d.ts +36 -0
- package/dist/ai-service/state-machine/helpers/pre-session-metrics.d.ts.map +1 -0
- package/dist/ai-service/state-machine/helpers/pre-session-metrics.js +128 -0
- package/dist/ai-service/state-machine/helpers/pre-session-metrics.js.map +1 -0
- package/dist/ai-service/state-machine/helpers/prompt-failure.d.ts +2 -1
- package/dist/ai-service/state-machine/helpers/prompt-failure.d.ts.map +1 -1
- package/dist/ai-service/state-machine/helpers/stable-peer.d.ts +14 -3
- package/dist/ai-service/state-machine/helpers/stable-peer.d.ts.map +1 -1
- package/dist/ai-service/state-machine/helpers/stable-peer.js +32 -13
- package/dist/ai-service/state-machine/helpers/stable-peer.js.map +1 -1
- package/dist/ai-service/tasks/factory.d.ts +4 -1
- package/dist/ai-service/tasks/factory.d.ts.map +1 -1
- package/dist/ai-service/tasks/factory.js.map +1 -1
- package/dist/ai-service/tasks/index.d.ts +4 -6
- package/dist/ai-service/tasks/index.d.ts.map +1 -1
- package/dist/ai-service/tasks/index.js +3 -5
- package/dist/ai-service/tasks/index.js.map +1 -1
- package/dist/ai-service/tasks/poll-loop.d.ts +2 -1
- package/dist/ai-service/tasks/poll-loop.d.ts.map +1 -1
- package/dist/ai-service/tasks/task-store.d.ts +3 -3
- package/dist/ai-service/tasks/task-store.d.ts.map +1 -1
- package/dist/ai-service/tasks/task-store.js +1 -1
- package/dist/ai-service/tasks/task-store.js.map +1 -1
- package/dist/ai-service/tasks/test-utils.d.ts +2 -1
- package/dist/ai-service/tasks/test-utils.d.ts.map +1 -1
- package/dist/ai-service/tasks/types.d.ts +1 -82
- package/dist/ai-service/tasks/types.d.ts.map +1 -1
- package/dist/ai-service/tasks/types.js +0 -18
- package/dist/ai-service/tasks/types.js.map +1 -1
- package/dist/ai-service/test-utils/dd-trace-helpers.d.ts +0 -3
- package/dist/ai-service/test-utils/dd-trace-helpers.d.ts.map +1 -1
- package/dist/ai-service/test-utils/dd-trace-helpers.js +3 -3
- package/dist/ai-service/test-utils/dd-trace-helpers.js.map +1 -1
- package/dist/ai-service/test-utils/span-interceptor.d.ts +2 -2
- package/dist/ai-service/test-utils/span-interceptor.d.ts.map +1 -1
- package/dist/ai-service/transform/api-builder/shared.d.ts +0 -3
- package/dist/ai-service/transform/api-builder/shared.d.ts.map +1 -1
- package/dist/ai-service/transform/api-builder/shared.js +1 -1
- package/dist/ai-service/transform/api-builder/shared.js.map +1 -1
- package/dist/ai-service/types.d.ts +6 -101
- package/dist/ai-service/types.d.ts.map +1 -1
- package/dist/ai-service/types.js +0 -84
- package/dist/ai-service/types.js.map +1 -1
- package/dist/ai-service/util/archive-extractors.d.ts +0 -13
- package/dist/ai-service/util/archive-extractors.d.ts.map +1 -1
- package/dist/ai-service/util/archive-extractors.js +3 -3
- package/dist/ai-service/util/archive-extractors.js.map +1 -1
- package/dist/ai-service/util/llm-config-utils.d.ts +3 -3
- package/dist/ai-service/util/llm-config-utils.d.ts.map +1 -1
- package/dist/ai-service/util/llm-config-utils.js +1 -1
- package/dist/ai-service/util/llm-config-utils.js.map +1 -1
- package/dist/ai-service/util/rpc-timeout.d.ts +12 -0
- package/dist/ai-service/util/rpc-timeout.d.ts.map +1 -1
- package/dist/ai-service/util/rpc-timeout.js +12 -0
- package/dist/ai-service/util/rpc-timeout.js.map +1 -1
- package/dist/binding-extraction/extract-control-block-identifiers.d.ts +0 -1
- package/dist/binding-extraction/extract-control-block-identifiers.d.ts.map +1 -1
- package/dist/binding-extraction/extract-control-block-identifiers.js +1 -1
- package/dist/binding-extraction/extract-control-block-identifiers.js.map +1 -1
- package/dist/binding-extraction/shared.d.ts +0 -4
- package/dist/binding-extraction/shared.d.ts.map +1 -1
- package/dist/client-error-overlay.d.ts +7 -3
- package/dist/client-error-overlay.d.ts.map +1 -1
- package/dist/client-error-overlay.js +67 -101
- package/dist/client-error-overlay.js.map +1 -1
- package/dist/codegen.d.ts +0 -1
- package/dist/codegen.d.ts.map +1 -1
- package/dist/codegen.js +1 -1
- package/dist/codegen.js.map +1 -1
- package/dist/dev-server-ws-smoke-client.d.ts +4 -5
- package/dist/dev-server-ws-smoke-client.d.ts.map +1 -1
- package/dist/dev-server-ws-smoke-client.js +1 -1
- package/dist/dev-server-ws-smoke-client.js.map +1 -1
- package/dist/errors/error-handler.d.ts +2 -12
- package/dist/errors/error-handler.d.ts.map +1 -1
- package/dist/errors/error-handler.js +1 -1
- package/dist/errors/error-handler.js.map +1 -1
- package/dist/file-sync-vite-plugin.d.ts +0 -1
- package/dist/file-sync-vite-plugin.d.ts.map +1 -1
- package/dist/file-sync-vite-plugin.js +1 -1
- package/dist/file-sync-vite-plugin.js.map +1 -1
- package/dist/file-system-helpers.d.ts +0 -13
- package/dist/file-system-helpers.d.ts.map +1 -1
- package/dist/file-system-helpers.js +4 -13
- package/dist/file-system-helpers.js.map +1 -1
- package/dist/file-system-manager.d.ts +1 -1
- package/dist/file-system-manager.d.ts.map +1 -1
- package/dist/git-log.d.ts +2 -1
- package/dist/git-log.d.ts.map +1 -1
- package/dist/git-service/app-layout-guard.d.ts +2 -13
- package/dist/git-service/app-layout-guard.d.ts.map +1 -1
- package/dist/git-service/app-layout-guard.js +1 -1
- package/dist/git-service/app-layout-guard.js.map +1 -1
- package/dist/git-service/bitbucket-workflow.d.ts +0 -1
- package/dist/git-service/bitbucket-workflow.d.ts.map +1 -1
- package/dist/git-service/bitbucket-workflow.js +1 -1
- package/dist/git-service/bitbucket-workflow.js.map +1 -1
- package/dist/git-service/ensure-workflow-file.d.ts +2 -1
- package/dist/git-service/ensure-workflow-file.d.ts.map +1 -1
- package/dist/git-service/index.d.ts +2 -2
- package/dist/git-service/index.d.ts.map +1 -1
- package/dist/git-service/index.js +1 -1
- package/dist/git-service/index.js.map +1 -1
- package/dist/git-service/live-branch.d.ts.map +1 -1
- package/dist/git-service/live-branch.js +5 -0
- package/dist/git-service/live-branch.js.map +1 -1
- package/dist/git-service/managed-excludes.d.ts +36 -0
- package/dist/git-service/managed-excludes.d.ts.map +1 -0
- package/dist/git-service/managed-excludes.js +124 -0
- package/dist/git-service/managed-excludes.js.map +1 -0
- package/dist/lock-service/activity-tracker.d.ts +2 -7
- package/dist/lock-service/activity-tracker.d.ts.map +1 -1
- package/dist/lock-service/activity-tracker.js +1 -1
- package/dist/lock-service/activity-tracker.js.map +1 -1
- package/dist/migration/inline-v2-backup-source-files.d.ts +7 -0
- package/dist/migration/inline-v2-backup-source-files.d.ts.map +1 -0
- package/dist/migration/inline-v2-backup-source-files.js +110 -0
- package/dist/migration/inline-v2-backup-source-files.js.map +1 -0
- package/dist/migration/integration-write-policy.d.ts +13 -1
- package/dist/migration/integration-write-policy.d.ts.map +1 -1
- package/dist/migration/integration-write-policy.js +96 -2
- package/dist/migration/integration-write-policy.js.map +1 -1
- package/dist/migration/mark-api-testing-denied.d.ts +27 -0
- package/dist/migration/mark-api-testing-denied.d.ts.map +1 -0
- package/dist/migration/mark-api-testing-denied.js +80 -0
- package/dist/migration/mark-api-testing-denied.js.map +1 -0
- package/dist/migration/migration-checklist.d.ts +4 -33
- package/dist/migration/migration-checklist.d.ts.map +1 -1
- package/dist/migration/migration-checklist.js +3 -11
- package/dist/migration/migration-checklist.js.map +1 -1
- package/dist/migration/migration-classifier.d.ts.map +1 -1
- package/dist/migration/migration-classifier.js +10 -0
- package/dist/migration/migration-classifier.js.map +1 -1
- package/dist/migration/migration-metrics.d.ts +8 -3
- package/dist/migration/migration-metrics.d.ts.map +1 -1
- package/dist/migration/migration-metrics.js +26 -0
- package/dist/migration/migration-metrics.js.map +1 -1
- package/dist/migration/migration-routes.d.ts.map +1 -1
- package/dist/migration/migration-routes.js +32 -10
- package/dist/migration/migration-routes.js.map +1 -1
- package/dist/migration/migration-verification.d.ts +62 -22
- package/dist/migration/migration-verification.d.ts.map +1 -1
- package/dist/migration/migration-verification.js +326 -151
- package/dist/migration/migration-verification.js.map +1 -1
- package/dist/migration/recommended-user-deps.d.ts +2 -1
- package/dist/migration/recommended-user-deps.d.ts.map +1 -1
- package/dist/migration/resolve-v2-backup-path.d.ts +7 -0
- package/dist/migration/resolve-v2-backup-path.d.ts.map +1 -0
- package/dist/migration/resolve-v2-backup-path.js +35 -0
- package/dist/migration/resolve-v2-backup-path.js.map +1 -0
- package/dist/migration/restructure.d.ts +4 -4
- package/dist/migration/restructure.d.ts.map +1 -1
- package/dist/migration/restructure.js +4 -12
- package/dist/migration/restructure.js.map +1 -1
- package/dist/migration/translation-prompt.d.ts +2 -1
- package/dist/migration/translation-prompt.d.ts.map +1 -1
- package/dist/migration/translation-prompt.js +2 -0
- package/dist/migration/translation-prompt.js.map +1 -1
- package/dist/migration/unsupported-integrations.d.ts +3 -2
- package/dist/migration/unsupported-integrations.d.ts.map +1 -1
- package/dist/npm/normalize-workspace-protocol-for-npm.d.ts +1 -1
- package/dist/npm/normalize-workspace-protocol-for-npm.d.ts.map +1 -1
- package/dist/npm/prepare-package-json-for-cloud-npm.d.ts +0 -13
- package/dist/npm/prepare-package-json-for-cloud-npm.d.ts.map +1 -1
- package/dist/npm/prepare-package-json-for-cloud-npm.js +1 -1
- package/dist/npm/prepare-package-json-for-cloud-npm.js.map +1 -1
- package/dist/npm/rewrite-platform-workspace-deps.d.ts +1 -1
- package/dist/npm/rewrite-platform-workspace-deps.d.ts.map +1 -1
- package/dist/parsing/ids.d.ts +0 -1
- package/dist/parsing/ids.d.ts.map +1 -1
- package/dist/parsing/ids.js +1 -1
- package/dist/parsing/ids.js.map +1 -1
- package/dist/parsing/imports.d.ts +0 -4
- package/dist/parsing/imports.d.ts.map +1 -1
- package/dist/parsing/imports.js.map +1 -1
- package/dist/parsing/jsx-utils.d.ts +0 -2
- package/dist/parsing/jsx-utils.d.ts.map +1 -1
- package/dist/parsing/jsx-utils.js +0 -15
- package/dist/parsing/jsx-utils.js.map +1 -1
- package/dist/parsing/jsx.d.ts +0 -2
- package/dist/parsing/jsx.d.ts.map +1 -1
- package/dist/parsing/jsx.js +0 -32
- package/dist/parsing/jsx.js.map +1 -1
- package/dist/parsing/sdk-registry.d.ts +1 -1
- package/dist/parsing/sdk-registry.d.ts.map +1 -1
- package/dist/parsing/util.d.ts +0 -6
- package/dist/parsing/util.d.ts.map +1 -1
- package/dist/parsing/util.js +3 -32
- package/dist/parsing/util.js.map +1 -1
- package/dist/plugin-options.d.ts +0 -1
- package/dist/plugin-options.d.ts.map +1 -1
- package/dist/plugin-options.js +0 -3
- package/dist/plugin-options.js.map +1 -1
- package/dist/policy-gate-callback-mapper.d.ts +2 -2
- package/dist/policy-gate-callback-mapper.d.ts.map +1 -1
- package/dist/policy-gate-runner.d.ts +2 -2
- package/dist/policy-gate-runner.d.ts.map +1 -1
- package/dist/policy-gate-runner.js +0 -1
- package/dist/policy-gate-runner.js.map +1 -1
- package/dist/refactor/blocks.d.ts +1 -2
- package/dist/refactor/blocks.d.ts.map +1 -1
- package/dist/refactor/blocks.js +1 -1
- package/dist/refactor/blocks.js.map +1 -1
- package/dist/router-parser.d.ts +2 -1
- package/dist/router-parser.d.ts.map +1 -1
- package/dist/router-parser.js +154 -20
- package/dist/router-parser.js.map +1 -1
- package/dist/snapshot-routes.d.ts +2 -1
- package/dist/snapshot-routes.d.ts.map +1 -1
- package/dist/socket-manager.d.ts +0 -1
- package/dist/socket-manager.d.ts.map +1 -1
- package/dist/socket-manager.js +1 -1
- package/dist/socket-manager.js.map +1 -1
- package/dist/sync-service/download.d.ts +2 -6
- package/dist/sync-service/download.d.ts.map +1 -1
- package/dist/sync-service/download.js +1 -1
- package/dist/sync-service/download.js.map +1 -1
- package/dist/util.d.ts +1 -23
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +1 -109
- package/dist/util.js.map +1 -1
- package/dist/vite-plugin-yaml-types.d.ts +2 -1
- package/dist/vite-plugin-yaml-types.d.ts.map +1 -1
- package/package.json +9 -18
- package/dist/ai-service/app-interface/filesystem/handlers/index.d.ts +0 -6
- package/dist/ai-service/app-interface/filesystem/handlers/index.d.ts.map +0 -1
- package/dist/ai-service/app-interface/filesystem/handlers/index.js +0 -6
- package/dist/ai-service/app-interface/filesystem/handlers/index.js.map +0 -1
- package/dist/ai-service/knowledge/index.d.ts +0 -4
- package/dist/ai-service/knowledge/index.d.ts.map +0 -1
- package/dist/ai-service/knowledge/index.js +0 -3
- package/dist/ai-service/knowledge/index.js.map +0 -1
- package/dist/ai-service/llm/context-v2/compaction/index.d.ts +0 -5
- package/dist/ai-service/llm/context-v2/compaction/index.d.ts.map +0 -1
- package/dist/ai-service/llm/context-v2/compaction/index.js +0 -3
- package/dist/ai-service/llm/context-v2/compaction/index.js.map +0 -1
- package/dist/ai-service/llm/utils.d.ts +0 -7
- package/dist/ai-service/llm/utils.d.ts.map +0 -1
- package/dist/ai-service/llm/utils.js +0 -52
- package/dist/ai-service/llm/utils.js.map +0 -1
|
@@ -11,15 +11,18 @@ import { ApiExecutor, } from "../ai-service/agent/tools/apis/api-executor.js";
|
|
|
11
11
|
import { markSdkApiAsVerified } from "../ai-service/agent/tools/apis/api-testing-state.js";
|
|
12
12
|
import { createToolFactory, PermissionLevel, ToolCategory, } from "../ai-service/agent/tools2/types.js";
|
|
13
13
|
import { updateChecklistItem } from "../ai-service/checklist/persisted-checklist-store.js";
|
|
14
|
+
import { isPeerUnavailableError, } from "../ai-service/state-machine/helpers/stable-peer.js";
|
|
14
15
|
import { sanitizeLogMessage } from "../util/log-sanitizer.js";
|
|
15
16
|
import { getLogger } from "../util/logger.js";
|
|
16
17
|
import { OperationQueue } from "../util/operation-queue.js";
|
|
18
|
+
import { inlineV2BackupSourceFiles } from "./inline-v2-backup-source-files.js";
|
|
19
|
+
import { readIntegrationWritePolicyForEnforcement } from "./integration-write-policy.js";
|
|
17
20
|
import { classifyYamlStepMutation } from "./migration-classifier.js";
|
|
18
21
|
import { recordMigrationVerification } from "./migration-metrics.js";
|
|
22
|
+
import { resolveV2BackupYamlPath } from "./resolve-v2-backup-path.js";
|
|
19
23
|
import { forEachYamlStep } from "./yaml-walk.js";
|
|
20
24
|
const SCRATCH_DIR = "scratch";
|
|
21
25
|
const VERIFICATION_DIR = "migration-verification";
|
|
22
|
-
const V2_BACKUP_DIR = "v2-backup";
|
|
23
26
|
const DIFF_SIZE_CAP = 1024 * 1024; // 1 MB
|
|
24
27
|
const PIPELINE_TIMEOUT_MS = 30_000;
|
|
25
28
|
/**
|
|
@@ -30,6 +33,35 @@ const PIPELINE_TIMEOUT_MS = 30_000;
|
|
|
30
33
|
* answer ("yes"); the cap removes that judgment from the loop.
|
|
31
34
|
*/
|
|
32
35
|
export const MAX_VERIFICATION_ATTEMPTS = 10;
|
|
36
|
+
/**
|
|
37
|
+
* Verification outcomes caused by editor-peer / environment state rather
|
|
38
|
+
* than by the API under test. These do NOT consume `MAX_VERIFICATION_ATTEMPTS`
|
|
39
|
+
* — burning real attempts on a backgrounded tab or dropped socket pushed APIs
|
|
40
|
+
* toward `exhausted` -> `failed`. They are still recorded in history for
|
|
41
|
+
* diagnostics and for the consecutive-transient backstop below.
|
|
42
|
+
*
|
|
43
|
+
* `transient_exhausted` is itself included: it IS a transient outcome (the
|
|
44
|
+
* backstop tripping), so it keeps the consecutive streak alive while the peer
|
|
45
|
+
* stays down (each subsequent transient re-trips the backstop) and never
|
|
46
|
+
* counts as a real attempt.
|
|
47
|
+
*/
|
|
48
|
+
const TRANSIENT_OUTCOME_KINDS = new Set(["timeout", "disconnected", "transient_exhausted"]);
|
|
49
|
+
/**
|
|
50
|
+
* Runaway backstop: cap on *consecutive* transient (timeout/disconnected)
|
|
51
|
+
* outcomes for an API. Deliberately generous — transient outcomes don't
|
|
52
|
+
* consume real attempts, so this exists only to stop an unattended retry loop
|
|
53
|
+
* from spinning forever against a dead editor peer.
|
|
54
|
+
*
|
|
55
|
+
* Counted as a trailing streak that resets on any real (non-transient)
|
|
56
|
+
* outcome, and checked AFTER the pipeline runs — so a peer that recovers
|
|
57
|
+
* always gets a fresh real attempt and the API self-heals. Crucially, tripping
|
|
58
|
+
* it yields `transient_exhausted`, NOT `exhausted`: the environment failing is
|
|
59
|
+
* never the API's fault, so it must never mark the checklist item `failed`
|
|
60
|
+
* (that was the Foundever failure mode). Sustained disconnects will get a
|
|
61
|
+
* durable pause/resume as a follow-up; here the backstop just tells the agent
|
|
62
|
+
* to stop auto-retrying and escalate to the user.
|
|
63
|
+
*/
|
|
64
|
+
export const MAX_TRANSIENT_VERIFICATION_ATTEMPTS = 30;
|
|
33
65
|
const LANGUAGE_PLUGIN_IDS = new Set(Object.values(LanguagePluginID));
|
|
34
66
|
/**
|
|
35
67
|
* Verify a single API by running both the v2 YAML and v3 TS versions with the
|
|
@@ -58,11 +90,24 @@ export async function runMigrationVerification(params) {
|
|
|
58
90
|
// APIs use different queues and remain fully parallel.
|
|
59
91
|
return getVerificationHistoryQueue(params.appRootDir, params.apiName).enqueue(async () => {
|
|
60
92
|
const history = await readHistory(params.appRootDir, params.apiName);
|
|
61
|
-
|
|
93
|
+
// Real (non-transient) attempts count over the whole migration: a
|
|
94
|
+
// genuinely non-converging API must still hit MAX_VERIFICATION_ATTEMPTS
|
|
95
|
+
// and fail, regardless of transients sprinkled in between.
|
|
96
|
+
const effectiveAttempts = history.attempts.filter((a) => !TRANSIENT_OUTCOME_KINDS.has(a.kind)).length;
|
|
97
|
+
// Transient backstop counts only the CONSECUTIVE trailing transients —
|
|
98
|
+
// it resets on any real outcome. A lifetime total would let unrelated
|
|
99
|
+
// disconnect episodes across a long migration accumulate and, worse,
|
|
100
|
+
// brick an API that is verifying fine between episodes.
|
|
101
|
+
const trailingTransientAttempts = countTrailingTransientAttempts(history);
|
|
102
|
+
// Only the real-attempt cap short-circuits before running: that API
|
|
103
|
+
// genuinely isn't converging. The transient backstop deliberately does
|
|
104
|
+
// NOT short-circuit here — we run the pipeline so a peer that has
|
|
105
|
+
// recovered gets a fresh real attempt and the API self-heals.
|
|
106
|
+
if (effectiveAttempts >= MAX_VERIFICATION_ATTEMPTS) {
|
|
62
107
|
recordMigrationVerification({ kind: "exhausted" });
|
|
63
108
|
return {
|
|
64
109
|
kind: "exhausted",
|
|
65
|
-
attempts:
|
|
110
|
+
attempts: effectiveAttempts,
|
|
66
111
|
lastDivergence: await readLastDivergedDiff(params.appRootDir, params.apiName),
|
|
67
112
|
};
|
|
68
113
|
}
|
|
@@ -81,10 +126,23 @@ export async function runMigrationVerification(params) {
|
|
|
81
126
|
outcome = {
|
|
82
127
|
kind: "diverged",
|
|
83
128
|
diff: raw.diff,
|
|
84
|
-
attempt:
|
|
129
|
+
attempt: effectiveAttempts + 1,
|
|
85
130
|
progress,
|
|
86
131
|
};
|
|
87
132
|
}
|
|
133
|
+
else if ((raw.kind === "timeout" || raw.kind === "disconnected") &&
|
|
134
|
+
trailingTransientAttempts + 1 >= MAX_TRANSIENT_VERIFICATION_ATTEMPTS) {
|
|
135
|
+
// This transient outcome pushes the consecutive streak to the backstop.
|
|
136
|
+
// Escalate to `transient_exhausted` (retryable, never marks failed)
|
|
137
|
+
// instead of returning yet another plain transient the agent would
|
|
138
|
+
// keep retrying forever.
|
|
139
|
+
outcome = {
|
|
140
|
+
kind: "transient_exhausted",
|
|
141
|
+
side: raw.side,
|
|
142
|
+
reason: raw.reason,
|
|
143
|
+
transientAttempts: trailingTransientAttempts + 1,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
88
146
|
else {
|
|
89
147
|
outcome = raw;
|
|
90
148
|
}
|
|
@@ -96,8 +154,25 @@ export async function runMigrationVerification(params) {
|
|
|
96
154
|
// consistent shape. Apply name only; raw failure strings stay scrubbed.
|
|
97
155
|
getLogger().info(`[migration-verify] outcome`, {
|
|
98
156
|
apiName: params.apiName,
|
|
99
|
-
attempt:
|
|
157
|
+
attempt: effectiveAttempts + 1,
|
|
100
158
|
maxAttempts: MAX_VERIFICATION_ATTEMPTS,
|
|
159
|
+
// `attempt` counts only real (non-transient) attempts — it is the value
|
|
160
|
+
// the `maxAttempts` cap is enforced against. `totalCalls` is the raw
|
|
161
|
+
// ordinal across every call including transients
|
|
162
|
+
// (timeout/disconnected/transient_exhausted), preserving the pre-ENG-4674
|
|
163
|
+
// total-call semantics of `attempt` as an explicit field rather than a
|
|
164
|
+
// silently-changed one.
|
|
165
|
+
totalCalls: history.attempts.length + 1,
|
|
166
|
+
// Consecutive transient streak *including* this outcome when it is
|
|
167
|
+
// itself transient (timeout/disconnected/transient_exhausted); the
|
|
168
|
+
// just-broken prior streak length when a real outcome ends the run.
|
|
169
|
+
// `countTrailingTransientAttempts` reads history only, so it excludes
|
|
170
|
+
// the current outcome — add it back here so a plain transient reports
|
|
171
|
+
// the same streak length that `transient_exhausted` does
|
|
172
|
+
// (`outcome.transientAttempts` === trailingTransientAttempts + 1).
|
|
173
|
+
trailingTransientAttempts: TRANSIENT_OUTCOME_KINDS.has(outcome.kind)
|
|
174
|
+
? trailingTransientAttempts + 1
|
|
175
|
+
: trailingTransientAttempts,
|
|
101
176
|
kind: outcome.kind,
|
|
102
177
|
progress: outcome.kind === "diverged" ? outcome.progress : undefined,
|
|
103
178
|
divergenceCount: outcome.kind === "diverged"
|
|
@@ -118,6 +193,26 @@ export async function runMigrationVerification(params) {
|
|
|
118
193
|
return outcome;
|
|
119
194
|
});
|
|
120
195
|
}
|
|
196
|
+
/**
|
|
197
|
+
* Extract a human-readable message from a thrown value. Transport-close
|
|
198
|
+
* rejections from `ISocket` (the plain-object `{code: 8}` path — see
|
|
199
|
+
* `isTransportCloseError`) are NOT `Error` instances, so a bare `instanceof
|
|
200
|
+
* Error` check falls through to `String(error)` = "[object Object]", discarding
|
|
201
|
+
* the "[internal] Connection closed" message on exactly the disconnect path we
|
|
202
|
+
* surface for on-call diagnosis. Read `.message` off any object that carries a
|
|
203
|
+
* string one before giving up on `String()`.
|
|
204
|
+
*/
|
|
205
|
+
function errorReason(error) {
|
|
206
|
+
if (error instanceof Error)
|
|
207
|
+
return error.message;
|
|
208
|
+
if (typeof error === "object" &&
|
|
209
|
+
error !== null &&
|
|
210
|
+
"message" in error &&
|
|
211
|
+
typeof error.message === "string") {
|
|
212
|
+
return error.message;
|
|
213
|
+
}
|
|
214
|
+
return String(error);
|
|
215
|
+
}
|
|
121
216
|
async function computeVerificationOutcome({ apiName, appRootDir, inputs, runV2Pipeline, runV3Sdk, }) {
|
|
122
217
|
const verificationInputs = inputs ?? {};
|
|
123
218
|
// 1. Detect mutations in the v3 TS source before running anything.
|
|
@@ -159,7 +254,7 @@ async function computeVerificationOutcome({ apiName, appRootDir, inputs, runV2Pi
|
|
|
159
254
|
],
|
|
160
255
|
};
|
|
161
256
|
}
|
|
162
|
-
const v2BackupPath =
|
|
257
|
+
const v2BackupPath = await resolveV2BackupYamlPath(appRootDir, apiName);
|
|
163
258
|
// Also check the v2 backup for writes — a half-migrated API where v3 looks
|
|
164
259
|
// read-only but the original v2 still mutates would otherwise bypass the
|
|
165
260
|
// policy gate and run the v2 pipeline against real integrations.
|
|
@@ -198,12 +293,22 @@ async function computeVerificationOutcome({ apiName, appRootDir, inputs, runV2Pi
|
|
|
198
293
|
if (error instanceof PipelineTimeoutError) {
|
|
199
294
|
return { kind: "timeout", side: "v2", reason: error.message };
|
|
200
295
|
}
|
|
201
|
-
|
|
202
|
-
|
|
296
|
+
// The editor peer dying while the RPC was in flight (transport close) OR
|
|
297
|
+
// while it sat queued waiting to reconnect (StablePeer's `peer_closed:` /
|
|
298
|
+
// `peer_queue_overflow`) is the same diagnosis as the pre-flight gate, so
|
|
299
|
+
// the same outcome. It must never fall through to `v2_unrunnable`, which
|
|
300
|
+
// auto-completes the checklist item on a dead editor tab.
|
|
301
|
+
if (error instanceof EditorClientUnavailableError ||
|
|
302
|
+
isPeerUnavailableError(error)) {
|
|
303
|
+
return {
|
|
304
|
+
kind: "disconnected",
|
|
305
|
+
side: "v2",
|
|
306
|
+
reason: errorReason(error),
|
|
307
|
+
};
|
|
203
308
|
}
|
|
204
309
|
return {
|
|
205
310
|
kind: "v2_unrunnable",
|
|
206
|
-
reason:
|
|
311
|
+
reason: formatV2UnrunnableReason(error),
|
|
207
312
|
};
|
|
208
313
|
}
|
|
209
314
|
// 3. Run v3 SDK.
|
|
@@ -215,12 +320,17 @@ async function computeVerificationOutcome({ apiName, appRootDir, inputs, runV2Pi
|
|
|
215
320
|
if (error instanceof PipelineTimeoutError) {
|
|
216
321
|
return { kind: "timeout", side: "v3", reason: error.message };
|
|
217
322
|
}
|
|
218
|
-
if (error instanceof EditorClientUnavailableError
|
|
219
|
-
|
|
323
|
+
if (error instanceof EditorClientUnavailableError ||
|
|
324
|
+
isPeerUnavailableError(error)) {
|
|
325
|
+
return {
|
|
326
|
+
kind: "disconnected",
|
|
327
|
+
side: "v3",
|
|
328
|
+
reason: errorReason(error),
|
|
329
|
+
};
|
|
220
330
|
}
|
|
221
331
|
return {
|
|
222
332
|
kind: "error",
|
|
223
|
-
reason:
|
|
333
|
+
reason: errorReason(error),
|
|
224
334
|
};
|
|
225
335
|
}
|
|
226
336
|
// 3.5. If both executions returned failure, surface that explicitly rather
|
|
@@ -305,9 +415,122 @@ async function computeVerificationOutcome({ apiName, appRootDir, inputs, runV2Pi
|
|
|
305
415
|
return { kind: "diverged", diff };
|
|
306
416
|
}
|
|
307
417
|
/** Relative path (from appRootDir) for a diff JSON file. */
|
|
308
|
-
|
|
418
|
+
function diffRelativePath(apiName) {
|
|
309
419
|
return `${SCRATCH_DIR}/${VERIFICATION_DIR}/${apiName}.diff.json`;
|
|
310
420
|
}
|
|
421
|
+
function assertNever(value) {
|
|
422
|
+
throw new Error(`Unexpected verification outcome: ${JSON.stringify(value)}`);
|
|
423
|
+
}
|
|
424
|
+
async function clearTransientVerificationFields(params) {
|
|
425
|
+
const { apiName, appRootDirPath } = params;
|
|
426
|
+
// Transient outcomes (`error`, `timeout`, `disconnected`,
|
|
427
|
+
// `transient_exhausted`) must never mark the checklist item complete or stamp
|
|
428
|
+
// a skip reason — the agent should retry once the environment recovers. Clear
|
|
429
|
+
// stale fields from a prior run so the UI does not show outdated pass/skip
|
|
430
|
+
// metadata.
|
|
431
|
+
await updateChecklistItem({
|
|
432
|
+
appRootDirPath,
|
|
433
|
+
itemId: `api_${apiName}`,
|
|
434
|
+
verificationOutcome: null,
|
|
435
|
+
verificationSkippedReason: null,
|
|
436
|
+
lastVerificationAt: new Date().toISOString(),
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
export async function syncVerificationOutcomeToChecklist(params) {
|
|
440
|
+
const { apiName, appRootDirPath, clark, outcome } = params;
|
|
441
|
+
if (outcome.kind === "passed") {
|
|
442
|
+
markSdkApiAsVerified(clark, apiName);
|
|
443
|
+
await updateChecklistItem({
|
|
444
|
+
appRootDirPath,
|
|
445
|
+
itemId: `api_${apiName}`,
|
|
446
|
+
verificationOutcome: "auto_passed",
|
|
447
|
+
verificationSkippedReason: null,
|
|
448
|
+
lastVerificationAt: new Date().toISOString(),
|
|
449
|
+
});
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
if (outcome.kind === "skipped_mutation") {
|
|
453
|
+
// Deliberate behavior change (ENG-4484): mutation-skipped APIs are marked
|
|
454
|
+
// `completed` immediately so the user can verify them manually at finalize
|
|
455
|
+
// time instead of leaving rows stuck `in_progress`.
|
|
456
|
+
await updateChecklistItem({
|
|
457
|
+
appRootDirPath,
|
|
458
|
+
itemId: `api_${apiName}`,
|
|
459
|
+
status: "completed",
|
|
460
|
+
verificationSkippedReason: "mutation",
|
|
461
|
+
verificationOutcome: null,
|
|
462
|
+
lastVerificationAt: new Date().toISOString(),
|
|
463
|
+
});
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
if (outcome.kind === "v2_unrunnable") {
|
|
467
|
+
await updateChecklistItem({
|
|
468
|
+
appRootDirPath,
|
|
469
|
+
itemId: `api_${apiName}`,
|
|
470
|
+
verificationSkippedReason: "v2_unrunnable",
|
|
471
|
+
verificationOutcome: null,
|
|
472
|
+
lastVerificationAt: new Date().toISOString(),
|
|
473
|
+
});
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
if (outcome.kind === "both_failed") {
|
|
477
|
+
// Deliberately do NOT mark `status: completed` — the agent should retry
|
|
478
|
+
// with synthesized inputs rather than treat this as terminal.
|
|
479
|
+
await updateChecklistItem({
|
|
480
|
+
appRootDirPath,
|
|
481
|
+
itemId: `api_${apiName}`,
|
|
482
|
+
verificationSkippedReason: "both_failed",
|
|
483
|
+
verificationOutcome: null,
|
|
484
|
+
lastVerificationAt: new Date().toISOString(),
|
|
485
|
+
});
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
if (outcome.kind === "diverged") {
|
|
489
|
+
await updateChecklistItem({
|
|
490
|
+
appRootDirPath,
|
|
491
|
+
itemId: `api_${apiName}`,
|
|
492
|
+
verificationOutcome: null,
|
|
493
|
+
verificationSkippedReason: null,
|
|
494
|
+
lastVerificationAt: new Date().toISOString(),
|
|
495
|
+
lastVerificationDiffPath: diffRelativePath(apiName),
|
|
496
|
+
});
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
if (outcome.kind === "exhausted") {
|
|
500
|
+
// Terminal failure: the hard attempt cap was reached without convergence.
|
|
501
|
+
await updateChecklistItem({
|
|
502
|
+
appRootDirPath,
|
|
503
|
+
itemId: `api_${apiName}`,
|
|
504
|
+
status: "failed",
|
|
505
|
+
failureReason: `verification_exhausted: hit MAX_VERIFICATION_ATTEMPTS (${MAX_VERIFICATION_ATTEMPTS}) without converging. See scratch/migration-verification/${apiName}.history.json for the per-attempt log.`,
|
|
506
|
+
verificationOutcome: null,
|
|
507
|
+
verificationSkippedReason: null,
|
|
508
|
+
lastVerificationAt: new Date().toISOString(),
|
|
509
|
+
...(outcome.lastDivergence
|
|
510
|
+
? { lastVerificationDiffPath: diffRelativePath(apiName) }
|
|
511
|
+
: {}),
|
|
512
|
+
});
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
if (outcome.kind === "error" ||
|
|
516
|
+
outcome.kind === "timeout" ||
|
|
517
|
+
outcome.kind === "disconnected" ||
|
|
518
|
+
outcome.kind === "transient_exhausted") {
|
|
519
|
+
// `transient_exhausted` (the consecutive-transient backstop) belongs here,
|
|
520
|
+
// NOT with `exhausted`: the environment being unreachable is never the
|
|
521
|
+
// API's fault, so the item must stay retryable and must never be marked
|
|
522
|
+
// failed. It self-heals once the editor peer reconnects.
|
|
523
|
+
await clearTransientVerificationFields({
|
|
524
|
+
apiName,
|
|
525
|
+
appRootDirPath,
|
|
526
|
+
});
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
return assertNever(outcome);
|
|
530
|
+
}
|
|
531
|
+
export function verificationCountsAsApiTest(kind) {
|
|
532
|
+
return kind === "passed" || kind === "diverged" || kind === "both_failed";
|
|
533
|
+
}
|
|
311
534
|
export const migrationVerificationToolFactory = createToolFactory("runMigrationVerification", ({ clark, services, }) => ({
|
|
312
535
|
category: ToolCategory.DEBUG,
|
|
313
536
|
timeoutMs: 300_000, // 5 minutes — verification runs both v2+v3 pipelines which regularly exceed 60s
|
|
@@ -345,7 +568,11 @@ export const migrationVerificationToolFactory = createToolFactory("runMigrationV
|
|
|
345
568
|
apiName,
|
|
346
569
|
integrationIds,
|
|
347
570
|
});
|
|
348
|
-
|
|
571
|
+
// Deny short-circuits to skipped_mutation without writes; allow runs
|
|
572
|
+
// pipelines under the migration-wide policy — neither needs per-entity WRITE.
|
|
573
|
+
if (effective === "deny" ||
|
|
574
|
+
effective === "allow" ||
|
|
575
|
+
sourceIds.length === 0) {
|
|
349
576
|
return [];
|
|
350
577
|
}
|
|
351
578
|
return sourceIds.map((entityId) => ({
|
|
@@ -428,19 +655,20 @@ export const migrationVerificationToolFactory = createToolFactory("runMigrationV
|
|
|
428
655
|
// Load the backup YAML directly and execute inline instead.
|
|
429
656
|
const yamlContent = await readFile(sourcePath, "utf-8");
|
|
430
657
|
const apiDefinition = yaml.parse(yamlContent);
|
|
658
|
+
await inlineV2BackupSourceFiles(apiDefinition, sourcePath);
|
|
431
659
|
const editorClient = clark.context.peer;
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
660
|
+
// `peer` is a StablePeer proxy: always truthy, queues calls while
|
|
661
|
+
// disconnected. Gate on real connection state so a dead tab yields
|
|
662
|
+
// `disconnected` immediately instead of a 30s `timeout`, and so no
|
|
663
|
+
// stale execution enters the reconnect replay queue.
|
|
664
|
+
await assertEditorClientConnected(editorClient, "v2 pipeline");
|
|
435
665
|
const executor = new ApiExecutor(editorClient, services.integrationStore);
|
|
436
666
|
const executionResult = await executor.execute({ type: "inline", definition: apiDefinition }, pipelineInputs, { includeStepOutputs: false });
|
|
437
667
|
return { success: executionResult.success, executionResult };
|
|
438
668
|
},
|
|
439
669
|
runV3Sdk: async (integrationIds, sdkInputs) => {
|
|
440
670
|
const editorClient = clark.context.peer;
|
|
441
|
-
|
|
442
|
-
throw new EditorClientUnavailableError("No editor client available");
|
|
443
|
-
}
|
|
671
|
+
await assertEditorClientConnected(editorClient, "v3 SDK");
|
|
444
672
|
const sdkResult = await editorClient.call.aiExecuteSdkApi({
|
|
445
673
|
apiName,
|
|
446
674
|
input: sdkInputs,
|
|
@@ -466,97 +694,17 @@ export const migrationVerificationToolFactory = createToolFactory("runMigrationV
|
|
|
466
694
|
};
|
|
467
695
|
},
|
|
468
696
|
});
|
|
469
|
-
|
|
470
|
-
// clears fields from the previous run that no longer apply (null = clear).
|
|
471
|
-
if (outcome.kind === "passed") {
|
|
697
|
+
if (verificationCountsAsApiTest(outcome.kind)) {
|
|
472
698
|
markSdkApiAsVerified(clark, apiName);
|
|
473
|
-
await updateChecklistItem({
|
|
474
|
-
appRootDirPath: appRootDir,
|
|
475
|
-
itemId: `api_${apiName}`,
|
|
476
|
-
verificationOutcome: "auto_passed",
|
|
477
|
-
verificationSkippedReason: null,
|
|
478
|
-
lastVerificationAt: new Date().toISOString(),
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
else if (outcome.kind === "skipped_mutation") {
|
|
482
|
-
await updateChecklistItem({
|
|
483
|
-
appRootDirPath: appRootDir,
|
|
484
|
-
itemId: `api_${apiName}`,
|
|
485
|
-
verificationSkippedReason: "mutation",
|
|
486
|
-
verificationOutcome: null,
|
|
487
|
-
lastVerificationAt: new Date().toISOString(),
|
|
488
|
-
});
|
|
489
|
-
}
|
|
490
|
-
else if (outcome.kind === "v2_unrunnable") {
|
|
491
|
-
await updateChecklistItem({
|
|
492
|
-
appRootDirPath: appRootDir,
|
|
493
|
-
itemId: `api_${apiName}`,
|
|
494
|
-
verificationSkippedReason: "v2_unrunnable",
|
|
495
|
-
verificationOutcome: null,
|
|
496
|
-
lastVerificationAt: new Date().toISOString(),
|
|
497
|
-
});
|
|
498
|
-
}
|
|
499
|
-
else if (outcome.kind === "both_failed") {
|
|
500
|
-
// Both v2 and v3 errored — most often because the API reads bindings
|
|
501
|
-
// we didn't supply. Per the migration skill, the agent should
|
|
502
|
-
// synthesize realistic inputs and retry rather than treat this as a
|
|
503
|
-
// terminal outcome, so we deliberately do NOT mark `status: completed`
|
|
504
|
-
// here (a previous version did, which contradicted the skill and left
|
|
505
|
-
// the item stuck `completed` even after the agent kept iterating).
|
|
506
|
-
// We still record `verificationSkippedReason: "both_failed"` so the
|
|
507
|
-
// UI can surface the transient state; subsequent diverged/passed
|
|
508
|
-
// attempts clear it via `verificationSkippedReason: null`.
|
|
509
|
-
await updateChecklistItem({
|
|
510
|
-
appRootDirPath: appRootDir,
|
|
511
|
-
itemId: `api_${apiName}`,
|
|
512
|
-
verificationSkippedReason: "both_failed",
|
|
513
|
-
verificationOutcome: null,
|
|
514
|
-
lastVerificationAt: new Date().toISOString(),
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
else if (outcome.kind === "diverged") {
|
|
518
|
-
await updateChecklistItem({
|
|
519
|
-
appRootDirPath: appRootDir,
|
|
520
|
-
itemId: `api_${apiName}`,
|
|
521
|
-
verificationOutcome: null,
|
|
522
|
-
verificationSkippedReason: null,
|
|
523
|
-
lastVerificationAt: new Date().toISOString(),
|
|
524
|
-
lastVerificationDiffPath: diffRelativePath(apiName),
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
else if (outcome.kind === "exhausted") {
|
|
528
|
-
// Hard cap reached. Mark the item failed so classifyItem routes it to
|
|
529
|
-
// the manual-verification lane and the user knows automatic
|
|
530
|
-
// reconciliation gave up. The agent must NOT keep calling
|
|
531
|
-
// runMigrationVerification for this API in this migration run; the
|
|
532
|
-
// tool will return `exhausted` again until the migration is reset.
|
|
533
|
-
await updateChecklistItem({
|
|
534
|
-
appRootDirPath: appRootDir,
|
|
535
|
-
itemId: `api_${apiName}`,
|
|
536
|
-
status: "failed",
|
|
537
|
-
failureReason: `verification_exhausted: hit MAX_VERIFICATION_ATTEMPTS (${MAX_VERIFICATION_ATTEMPTS}) without converging. See scratch/migration-verification/${apiName}.history.json for the per-attempt log.`,
|
|
538
|
-
verificationOutcome: null,
|
|
539
|
-
verificationSkippedReason: null,
|
|
540
|
-
lastVerificationAt: new Date().toISOString(),
|
|
541
|
-
...(outcome.lastDivergence
|
|
542
|
-
? { lastVerificationDiffPath: diffRelativePath(apiName) }
|
|
543
|
-
: {}),
|
|
544
|
-
});
|
|
545
|
-
}
|
|
546
|
-
else {
|
|
547
|
-
// outcome.kind === "error" | "timeout" | "disconnected": clear stale
|
|
548
|
-
// fields so classifyItem doesn't misclassify this item as verified or
|
|
549
|
-
// skipped. Timeout and disconnected deliberately share this branch —
|
|
550
|
-
// they must NOT set a verificationSkippedReason or mark the item
|
|
551
|
-
// complete; the agent is told to retry via the tool result below.
|
|
552
|
-
await updateChecklistItem({
|
|
553
|
-
appRootDirPath: appRootDir,
|
|
554
|
-
itemId: `api_${apiName}`,
|
|
555
|
-
verificationOutcome: null,
|
|
556
|
-
verificationSkippedReason: null,
|
|
557
|
-
lastVerificationAt: new Date().toISOString(),
|
|
558
|
-
});
|
|
559
699
|
}
|
|
700
|
+
// Update checklist with verification metadata. Each branch explicitly
|
|
701
|
+
// clears fields from the previous run that no longer apply (null = clear).
|
|
702
|
+
await syncVerificationOutcomeToChecklist({
|
|
703
|
+
apiName,
|
|
704
|
+
appRootDirPath: appRootDir,
|
|
705
|
+
clark,
|
|
706
|
+
outcome,
|
|
707
|
+
});
|
|
560
708
|
if (outcome.kind === "diverged") {
|
|
561
709
|
return {
|
|
562
710
|
kind: "diverged",
|
|
@@ -644,6 +792,19 @@ export const migrationVerificationToolFactory = createToolFactory("runMigrationV
|
|
|
644
792
|
`needs to stay open and focused for verification, then call runMigrationVerification again.`,
|
|
645
793
|
};
|
|
646
794
|
}
|
|
795
|
+
if (outcome.kind === "transient_exhausted") {
|
|
796
|
+
return {
|
|
797
|
+
kind: "transient_exhausted",
|
|
798
|
+
side: outcome.side,
|
|
799
|
+
summary: `Verification of \`${apiName}\` has failed to reach the editor ${outcome.transientAttempts} times in a row ` +
|
|
800
|
+
`without it becoming runnable (most recent: ${outcome.side === "v2" ? "original (v2)" : "migrated (v3)"} — ${outcome.reason}). ` +
|
|
801
|
+
`This is a persistent environment problem — the app tab is closed/backgrounded or the connection keeps dropping — ` +
|
|
802
|
+
`NOT a problem with the API, and the item has NOT been marked complete or failed. STOP calling ` +
|
|
803
|
+
`runMigrationVerification for this API now: tell the user verification is blocked because the editor/app tab ` +
|
|
804
|
+
`is disconnected, ask them to reopen it and keep it focused, and only retry once they confirm. Verification ` +
|
|
805
|
+
`resumes automatically for this API the moment the connection is restored.`,
|
|
806
|
+
};
|
|
807
|
+
}
|
|
647
808
|
// outcome.kind === "error" — the only remaining case
|
|
648
809
|
return {
|
|
649
810
|
kind: "error",
|
|
@@ -707,6 +868,38 @@ class PipelineTimeoutError extends Error {
|
|
|
707
868
|
*/
|
|
708
869
|
export class EditorClientUnavailableError extends Error {
|
|
709
870
|
}
|
|
871
|
+
const FILE_REFERENCE_PROTO_DECODE_PATTERN = /plugins\.javascript\.v1\.Plugin\.body from JSON: object|plugins\.python\.v1\.Plugin\.body from JSON: object/;
|
|
872
|
+
function formatV2UnrunnableReason(error) {
|
|
873
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
874
|
+
if (FILE_REFERENCE_PROTO_DECODE_PATTERN.test(message)) {
|
|
875
|
+
return ("v2 backup uses file-referenced JS/Python blocks but migration verification " +
|
|
876
|
+
"failed to inline their source files before proto validation. " +
|
|
877
|
+
`Original error: ${message}`);
|
|
878
|
+
}
|
|
879
|
+
return message;
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* How long a pipeline runner waits for the editor peer to (re)connect before
|
|
883
|
+
* failing with `disconnected`. This is a pre-flight gate, not a retry budget:
|
|
884
|
+
* long enough to ride out a heartbeat flap mid-reconnect, short enough that a
|
|
885
|
+
* genuinely-gone tab fails fast instead of burning the full 30s reporting
|
|
886
|
+
* timeout.
|
|
887
|
+
*/
|
|
888
|
+
export const EDITOR_CONNECT_GRACE_MS = 5_000;
|
|
889
|
+
/**
|
|
890
|
+
* Pre-flight connectivity gate for the pipeline runners. The editor peer
|
|
891
|
+
* (`clark.context.peer`) is a StablePeer proxy — always truthy even when the
|
|
892
|
+
* underlying socket is gone, and it silently queues calls while disconnected
|
|
893
|
+
* (replayed on reconnect). A bare truthiness check therefore never fires and
|
|
894
|
+
* a dead tab surfaces as a 30s `timeout` instead of `disconnected`. Gate on
|
|
895
|
+
* real connection state instead, tolerating a brief reconnect window.
|
|
896
|
+
* Exported for direct unit testing.
|
|
897
|
+
*/
|
|
898
|
+
export async function assertEditorClientConnected(peer, label) {
|
|
899
|
+
if (await peer.whenConnected(EDITOR_CONNECT_GRACE_MS))
|
|
900
|
+
return;
|
|
901
|
+
throw new EditorClientUnavailableError(`editor peer disconnected (${label}): no reconnect within ${EDITOR_CONNECT_GRACE_MS / 1000}s`);
|
|
902
|
+
}
|
|
710
903
|
/**
|
|
711
904
|
* Inspect a v2 backup YAML for mutating steps and the integrations they touch.
|
|
712
905
|
*
|
|
@@ -724,7 +917,7 @@ export class EditorClientUnavailableError extends Error {
|
|
|
724
917
|
* Treats `unknown` step classifications (dynamic SQL bodies, plugins we don't
|
|
725
918
|
* recognize) as mutations: better to ask the user than silently run a write.
|
|
726
919
|
*/
|
|
727
|
-
|
|
920
|
+
async function analyzeV2BackupMutations(v2BackupPath) {
|
|
728
921
|
let raw;
|
|
729
922
|
try {
|
|
730
923
|
raw = await readFile(v2BackupPath, "utf-8");
|
|
@@ -757,34 +950,14 @@ export async function analyzeV2BackupMutations(v2BackupPath) {
|
|
|
757
950
|
integrationIds: Array.from(integrationIds),
|
|
758
951
|
};
|
|
759
952
|
}
|
|
760
|
-
async function readIntegrationWritePolicy(appRootDir) {
|
|
761
|
-
try {
|
|
762
|
-
const raw = await readFile(join(appRootDir, SCRATCH_DIR, "migration-state.json"), "utf-8");
|
|
763
|
-
const parsed = JSON.parse(raw);
|
|
764
|
-
const pol = parsed.integrationWritePolicy;
|
|
765
|
-
if (pol !== null && typeof pol === "object" && !Array.isArray(pol)) {
|
|
766
|
-
// Coerce any legacy persisted "ask" values to "deny" — the modal no
|
|
767
|
-
// longer offers "ask", and "deny" preserves the "don't auto-run writes"
|
|
768
|
-
// behavior it used to imply during verification.
|
|
769
|
-
return Object.fromEntries(Object.entries(pol).map(([id, value]) => [
|
|
770
|
-
id,
|
|
771
|
-
value === "allow" ? "allow" : "deny",
|
|
772
|
-
]));
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
catch {
|
|
776
|
-
// missing or unreadable — default to deny
|
|
777
|
-
}
|
|
778
|
-
return {};
|
|
779
|
-
}
|
|
780
953
|
function mostRestrictivePolicy(policies) {
|
|
781
954
|
if (policies.includes("deny"))
|
|
782
955
|
return "deny";
|
|
783
956
|
return "allow";
|
|
784
957
|
}
|
|
785
958
|
async function getEffectiveMigrationWritePolicy({ appRootDir, apiName, integrationIds, }) {
|
|
786
|
-
const policy = await
|
|
787
|
-
const v2BackupPath =
|
|
959
|
+
const policy = await readIntegrationWritePolicyForEnforcement(appRootDir);
|
|
960
|
+
const v2BackupPath = await resolveV2BackupYamlPath(appRootDir, apiName);
|
|
788
961
|
// Use IDs from source — not Object.keys(policy) — so a UUID present in
|
|
789
962
|
// source but absent from the policy map gets a real "deny" vote rather
|
|
790
963
|
// than being ignored. Otherwise an "allow" on one integration would be
|
|
@@ -815,30 +988,15 @@ export const checkRunMigrationVerificationPermissions = async (services, input)
|
|
|
815
988
|
catch {
|
|
816
989
|
return PermissionLevel.PROMPT;
|
|
817
990
|
}
|
|
818
|
-
let mutations;
|
|
819
991
|
try {
|
|
820
|
-
|
|
992
|
+
extractMutations(source);
|
|
821
993
|
}
|
|
822
994
|
catch {
|
|
823
995
|
return PermissionLevel.PROMPT;
|
|
824
996
|
}
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
try {
|
|
829
|
-
const ids = extractIntegrationIdsFromSource(source);
|
|
830
|
-
if (ids.length > 0)
|
|
831
|
-
integrationIds = ids;
|
|
832
|
-
}
|
|
833
|
-
catch {
|
|
834
|
-
integrationIds = undefined;
|
|
835
|
-
}
|
|
836
|
-
const { effective } = await getEffectiveMigrationWritePolicy({
|
|
837
|
-
appRootDir: services.appRootDirPath,
|
|
838
|
-
apiName,
|
|
839
|
-
integrationIds,
|
|
840
|
-
});
|
|
841
|
-
return effective === "allow" ? PermissionLevel.ALLOW : PermissionLevel.BLOCK;
|
|
997
|
+
// Non-mutating APIs are safe to verify; mutating APIs short-circuit to
|
|
998
|
+
// skipped_mutation when write policy is deny, so the tool must be callable.
|
|
999
|
+
return PermissionLevel.ALLOW;
|
|
842
1000
|
};
|
|
843
1001
|
/**
|
|
844
1002
|
* Extract the most specific failure message from a Pick<ApiExecutionResult>.
|
|
@@ -873,6 +1031,23 @@ function redactForAgent(msg, maxLen = REDACTED_AGENT_FAILURE_MAX_LEN) {
|
|
|
873
1031
|
return sanitized;
|
|
874
1032
|
return sanitized.slice(0, maxLen) + "… [truncated]";
|
|
875
1033
|
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Count the consecutive transient outcomes at the tail of the history (the
|
|
1036
|
+
* current run's streak), stopping at the first real outcome. This resets the
|
|
1037
|
+
* transient backstop on any real progress, so separate disconnect episodes
|
|
1038
|
+
* across a long migration never accumulate — only an unbroken run of
|
|
1039
|
+
* transient failures trips it.
|
|
1040
|
+
*/
|
|
1041
|
+
function countTrailingTransientAttempts(history) {
|
|
1042
|
+
let count = 0;
|
|
1043
|
+
for (let i = history.attempts.length - 1; i >= 0; i--) {
|
|
1044
|
+
const entry = history.attempts[i];
|
|
1045
|
+
if (!entry || !TRANSIENT_OUTCOME_KINDS.has(entry.kind))
|
|
1046
|
+
break;
|
|
1047
|
+
count++;
|
|
1048
|
+
}
|
|
1049
|
+
return count;
|
|
1050
|
+
}
|
|
876
1051
|
/**
|
|
877
1052
|
* Reject any `apiName` that could escape `scratch/migration-verification/`.
|
|
878
1053
|
* Checklist items are persisted to disk and parsed back in without a strict
|