repoburg 1.0.68 → 1.1.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/README.md +8 -1
- package/backend/.env +2 -2
- package/backend/dist/packages/gemini-core/examples/simple.d.ts +1 -0
- package/backend/dist/packages/gemini-core/examples/simple.js +73 -0
- package/backend/dist/packages/gemini-core/examples/simple.js.map +1 -0
- package/backend/dist/packages/gemini-core/index.d.ts +3 -0
- package/backend/dist/packages/gemini-core/index.js +27 -0
- package/backend/dist/packages/gemini-core/index.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/code_assist/codeAssist.d.ts +5 -0
- package/backend/dist/packages/gemini-core/src/code_assist/codeAssist.js +17 -0
- package/backend/dist/packages/gemini-core/src/code_assist/codeAssist.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/code_assist/converter.d.ts +69 -0
- package/backend/dist/packages/gemini-core/src/code_assist/converter.js +129 -0
- package/backend/dist/packages/gemini-core/src/code_assist/converter.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/code_assist/oauth-credential-storage.d.ts +8 -0
- package/backend/dist/packages/gemini-core/src/code_assist/oauth-credential-storage.js +84 -0
- package/backend/dist/packages/gemini-core/src/code_assist/oauth-credential-storage.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/code_assist/oauth2.d.ts +12 -0
- package/backend/dist/packages/gemini-core/src/code_assist/oauth2.js +371 -0
- package/backend/dist/packages/gemini-core/src/code_assist/oauth2.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/code_assist/server.d.ts +28 -0
- package/backend/dist/packages/gemini-core/src/code_assist/server.js +135 -0
- package/backend/dist/packages/gemini-core/src/code_assist/server.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/code_assist/setup.d.ts +10 -0
- package/backend/dist/packages/gemini-core/src/code_assist/setup.js +94 -0
- package/backend/dist/packages/gemini-core/src/code_assist/setup.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/code_assist/types.d.ts +106 -0
- package/backend/dist/packages/gemini-core/src/code_assist/types.js +28 -0
- package/backend/dist/packages/gemini-core/src/code_assist/types.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/config/config.d.ts +22 -0
- package/backend/dist/packages/gemini-core/src/config/config.js +38 -0
- package/backend/dist/packages/gemini-core/src/config/config.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/config/models.d.ts +6 -0
- package/backend/dist/packages/gemini-core/src/config/models.js +13 -0
- package/backend/dist/packages/gemini-core/src/config/models.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/config/storage.d.ts +8 -0
- package/backend/dist/packages/gemini-core/src/config/storage.js +25 -0
- package/backend/dist/packages/gemini-core/src/config/storage.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/core/contentGenerator.d.ts +23 -0
- package/backend/dist/packages/gemini-core/src/core/contentGenerator.js +63 -0
- package/backend/dist/packages/gemini-core/src/core/contentGenerator.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/core/geminiChat.d.ts +34 -0
- package/backend/dist/packages/gemini-core/src/core/geminiChat.js +247 -0
- package/backend/dist/packages/gemini-core/src/core/geminiChat.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/core/geminiRequest.d.ts +3 -0
- package/backend/dist/packages/gemini-core/src/core/geminiRequest.js +8 -0
- package/backend/dist/packages/gemini-core/src/core/geminiRequest.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/core/prompts.d.ts +7 -0
- package/backend/dist/packages/gemini-core/src/core/prompts.js +69 -0
- package/backend/dist/packages/gemini-core/src/core/prompts.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/core/tokenLimits.d.ts +5 -0
- package/backend/dist/packages/gemini-core/src/core/tokenLimits.js +25 -0
- package/backend/dist/packages/gemini-core/src/core/tokenLimits.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/index.d.ts +18 -0
- package/backend/dist/packages/gemini-core/src/index.js +37 -0
- package/backend/dist/packages/gemini-core/src/index.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/base-token-storage.d.ts +14 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/base-token-storage.js +34 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/base-token-storage.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/file-token-storage.d.ts +19 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/file-token-storage.js +141 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/file-token-storage.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/hybrid-token-storage.d.ts +18 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/hybrid-token-storage.js +74 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/hybrid-token-storage.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/index.d.ts +6 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/index.js +24 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/index.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/keychain-token-storage.d.ts +26 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/keychain-token-storage.js +188 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/keychain-token-storage.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/types.d.ts +27 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/types.js +9 -0
- package/backend/dist/packages/gemini-core/src/mcp/token-storage/types.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/utils/errors.d.ts +34 -0
- package/backend/dist/packages/gemini-core/src/utils/errors.js +103 -0
- package/backend/dist/packages/gemini-core/src/utils/errors.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/utils/partUtils.d.ts +7 -0
- package/backend/dist/packages/gemini-core/src/utils/partUtils.js +108 -0
- package/backend/dist/packages/gemini-core/src/utils/partUtils.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/utils/quotaErrorDetection.d.ts +16 -0
- package/backend/dist/packages/gemini-core/src/utils/quotaErrorDetection.js +60 -0
- package/backend/dist/packages/gemini-core/src/utils/quotaErrorDetection.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/utils/retry.d.ts +14 -0
- package/backend/dist/packages/gemini-core/src/utils/retry.js +154 -0
- package/backend/dist/packages/gemini-core/src/utils/retry.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/utils/session.d.ts +1 -0
- package/backend/dist/packages/gemini-core/src/utils/session.js +6 -0
- package/backend/dist/packages/gemini-core/src/utils/session.js.map +1 -0
- package/backend/dist/packages/gemini-core/src/utils/userAccountManager.d.ts +10 -0
- package/backend/dist/packages/gemini-core/src/utils/userAccountManager.js +106 -0
- package/backend/dist/packages/gemini-core/src/utils/userAccountManager.js.map +1 -0
- package/backend/dist/src/action-execution/action-execution.module.js.map +1 -0
- package/backend/dist/src/action-execution/action-execution.service.js.map +1 -0
- package/backend/dist/src/ai-actions/ai-action-batch.service.js.map +1 -0
- package/backend/dist/src/ai-actions/ai-action-creation.service.js.map +1 -0
- package/backend/dist/src/ai-actions/ai-actions.controller.js.map +1 -0
- package/backend/dist/src/ai-actions/ai-actions.module.js.map +1 -0
- package/backend/dist/src/ai-actions/ai-actions.service.js.map +1 -0
- package/backend/dist/src/app.controller.js.map +1 -0
- package/backend/dist/src/app.module.js.map +1 -0
- package/backend/dist/src/app.service.js.map +1 -0
- package/backend/dist/src/application-state/application-state.controller.js.map +1 -0
- package/backend/dist/src/application-state/application-state.module.js.map +1 -0
- package/backend/dist/src/application-state/application-state.service.js.map +1 -0
- package/backend/dist/src/application-state/dto/set-auto-context-fetch-enabled.dto.js.map +1 -0
- package/backend/dist/src/application-state/dto/set-auto-send-to-ai-studio-enabled.dto.js.map +1 -0
- package/backend/dist/src/application-state/dto/set-context-token-limit.dto.js.map +1 -0
- package/backend/dist/src/application-state/dto/set-orchestration-timeout.dto.js.map +1 -0
- package/backend/dist/src/application-state/dto/set-theme.dto.js.map +1 -0
- package/backend/dist/src/application-state/dto/set-websocket-enabled.dto.js.map +1 -0
- package/backend/dist/src/context-generation/context-generation.module.js.map +1 -0
- package/backend/dist/src/context-generation/context-generation.service.js.map +1 -0
- package/backend/dist/src/context-snippets/context-snippets.controller.js.map +1 -0
- package/backend/dist/src/context-snippets/context-snippets.module.js.map +1 -0
- package/backend/dist/src/context-snippets/context-snippets.service.js.map +1 -0
- package/backend/dist/src/context-snippets/dto/context-snippet.dto.js.map +1 -0
- package/backend/dist/src/context-templates/context-templates.controller.js.map +1 -0
- package/backend/dist/src/context-templates/context-templates.module.js.map +1 -0
- package/backend/dist/src/context-templates/context-templates.service.js.map +1 -0
- package/backend/dist/src/context-templates/dto/context-template.dto.js.map +1 -0
- package/backend/dist/src/core-entities/ai-action.entity.js.map +1 -0
- package/backend/dist/src/core-entities/application-state.entity.js.map +1 -0
- package/backend/dist/src/core-entities/base.entity.js.map +1 -0
- package/backend/dist/src/core-entities/context-snippet.entity.js.map +1 -0
- package/backend/dist/src/core-entities/context-template.entity.js.map +1 -0
- package/backend/dist/src/core-entities/custom-snippet.entity.js.map +1 -0
- package/backend/dist/src/core-entities/execution-log.entity.js.map +1 -0
- package/backend/dist/src/core-entities/index.js.map +1 -0
- package/backend/dist/src/core-entities/project.entity.js.map +1 -0
- package/backend/dist/src/core-entities/session-input.entity.js.map +1 -0
- package/backend/dist/src/core-entities/session.entity.js.map +1 -0
- package/backend/dist/src/core-entities/system-prompt.entity.js.map +1 -0
- package/backend/dist/src/custom-snippets/custom-snippets.controller.js.map +1 -0
- package/backend/dist/src/custom-snippets/custom-snippets.module.js.map +1 -0
- package/backend/dist/src/custom-snippets/custom-snippets.service.js.map +1 -0
- package/backend/dist/src/custom-snippets/dto/custom-snippet.dto.js.map +1 -0
- package/backend/dist/src/events/events.gateway.js.map +1 -0
- package/backend/dist/src/events/events.module.js.map +1 -0
- package/backend/dist/src/execution-logs/dto/execution-log.dto.js.map +1 -0
- package/backend/dist/src/execution-logs/execution-logs.controller.js.map +1 -0
- package/backend/dist/src/execution-logs/execution-logs.module.js.map +1 -0
- package/backend/dist/src/execution-logs/execution-logs.service.js.map +1 -0
- package/backend/dist/src/gemini/gemini-llm.provider.d.ts +10 -0
- package/backend/dist/src/gemini/gemini-llm.provider.js +103 -0
- package/backend/dist/src/gemini/gemini-llm.provider.js.map +1 -0
- package/backend/dist/src/gemini/gemini.module.d.ts +2 -0
- package/backend/dist/src/gemini/gemini.module.js +21 -0
- package/backend/dist/src/gemini/gemini.module.js.map +1 -0
- package/backend/dist/src/http-exception.filter.js.map +1 -0
- package/backend/dist/src/llm-provider/llm-provider.interface.d.ts +16 -0
- package/backend/dist/src/llm-provider/llm-provider.interface.js +5 -0
- package/backend/dist/src/llm-provider/llm-provider.interface.js.map +1 -0
- package/backend/dist/src/llm-provider/llm-provider.module.d.ts +2 -0
- package/backend/dist/src/llm-provider/llm-provider.module.js +29 -0
- package/backend/dist/src/llm-provider/llm-provider.module.js.map +1 -0
- package/backend/dist/src/llm-response-parser/dto/ai-action.dto.js.map +1 -0
- package/backend/dist/src/llm-response-parser/errors/parsing.error.js.map +1 -0
- package/backend/dist/src/llm-response-parser/llm-response-parser.module.js.map +1 -0
- package/backend/dist/src/llm-response-parser/llm-response-parser.service.js.map +1 -0
- package/backend/dist/src/llm-response-parser/parsing.constants.js.map +1 -0
- package/backend/dist/src/llm-responses/dto/submit-llm-response.dto.js.map +1 -0
- package/backend/dist/src/llm-responses/llm-responses.controller.js.map +1 -0
- package/backend/dist/src/llm-responses/llm-responses.module.js.map +1 -0
- package/backend/dist/src/llm-responses/llm-responses.service.js.map +1 -0
- package/backend/dist/src/main.js.map +1 -0
- package/backend/dist/src/orchestration/dto/orchestration.dto.js.map +1 -0
- package/backend/dist/src/orchestration/orchestration-fs.service.js.map +1 -0
- package/backend/dist/src/orchestration/orchestration-parser.service.js.map +1 -0
- package/backend/dist/src/orchestration/orchestration.controller.js.map +1 -0
- package/backend/dist/src/orchestration/orchestration.module.js.map +1 -0
- package/backend/dist/src/orchestration/orchestration.service.js.map +1 -0
- package/backend/dist/src/orchestration/orchestration.types.js.map +1 -0
- package/backend/dist/src/projects/dto/project.dto.js.map +1 -0
- package/backend/dist/src/projects/projects.controller.js.map +1 -0
- package/backend/dist/src/projects/projects.module.js.map +1 -0
- package/backend/dist/src/projects/projects.service.js.map +1 -0
- package/backend/dist/src/seeding/context-template-seeding.service.js.map +1 -0
- package/backend/dist/src/seeding/custom-snippet-seeding.service.js.map +1 -0
- package/backend/dist/src/seeding/data/context-templates/default-followup_ad-hoc-focused-context.js.map +1 -0
- package/backend/dist/src/seeding/data/context-templates/default-initial_condensed-project-context.js.map +1 -0
- package/backend/dist/src/seeding/data/context-templates/default-initial_full-project-context.js.map +1 -0
- package/backend/dist/src/seeding/data/context-templates/pm-context.js.map +1 -0
- package/backend/dist/src/seeding/data/context-templates/pr-description.js.map +1 -0
- package/backend/dist/src/seeding/data/context-templates/sample_focused-tree.d.ts +2 -0
- package/backend/dist/{seeding → src/seeding}/data/context-templates/sample_focused-tree.js +1 -3
- package/backend/dist/src/seeding/data/context-templates/sample_focused-tree.js.map +1 -0
- package/backend/dist/src/seeding/data/custom-snippets/default_rglob.js.map +1 -0
- package/backend/dist/src/seeding/data/custom-snippets/git-diff.js.map +1 -0
- package/backend/dist/src/seeding/data/custom-snippets/rg-exclude.js.map +1 -0
- package/backend/dist/src/seeding/data/custom-snippets/rg-search-glob.js.map +1 -0
- package/backend/dist/src/seeding/data/custom-snippets/rg-search.js.map +1 -0
- package/backend/dist/src/seeding/data/custom-snippets/run-command.js.map +1 -0
- package/backend/dist/src/seeding/data/custom-snippets/tree.js.map +1 -0
- package/backend/dist/src/seeding/data/custom-snippets/usr-adhoc-incl.js.map +1 -0
- package/backend/dist/src/seeding/data/custom-snippets/usr-cmd-output-incl.js.map +1 -0
- package/backend/dist/src/seeding/data/custom-snippets/usr-input-incl.js.map +1 -0
- package/backend/dist/src/seeding/data/system-prompts/codebase-explorer.js.map +1 -0
- package/backend/dist/src/seeding/data/system-prompts/default_multi-file-action-generator-with-requester.js.map +1 -0
- package/backend/dist/src/seeding/data/system-prompts/packup.js.map +1 -0
- package/backend/dist/src/seeding/data/system-prompts/refactor-split.js.map +1 -0
- package/backend/dist/src/seeding/seeding.module.js.map +1 -0
- package/backend/dist/src/seeding/seeding.service.js.map +1 -0
- package/backend/dist/src/seeding/system-prompt-seeding.service.js.map +1 -0
- package/backend/dist/src/session-followup/session-followup.module.js.map +1 -0
- package/backend/dist/src/session-followup/session-followup.service.js.map +1 -0
- package/backend/dist/src/session-inputs/dto/session-input.dto.js.map +1 -0
- package/backend/dist/{session-inputs → src/session-inputs}/session-input-context.service.d.ts +1 -1
- package/backend/dist/{session-inputs → src/session-inputs}/session-input-context.service.js +10 -11
- package/backend/dist/src/session-inputs/session-input-context.service.js.map +1 -0
- package/backend/dist/src/session-inputs/session-inputs.controller.js.map +1 -0
- package/backend/dist/{session-inputs → src/session-inputs}/session-inputs.module.js +2 -0
- package/backend/dist/src/session-inputs/session-inputs.module.js.map +1 -0
- package/backend/dist/{session-inputs → src/session-inputs}/session-inputs.service.d.ts +3 -1
- package/backend/dist/{session-inputs → src/session-inputs}/session-inputs.service.js +46 -15
- package/backend/dist/src/session-inputs/session-inputs.service.js.map +1 -0
- package/backend/dist/src/session-transfer/session-transfer.module.js.map +1 -0
- package/backend/dist/src/session-transfer/session-transfer.service.js.map +1 -0
- package/backend/dist/src/sessions/dto/session.dto.js.map +1 -0
- package/backend/dist/src/sessions/sessions.controller.js.map +1 -0
- package/backend/dist/src/sessions/sessions.module.js.map +1 -0
- package/backend/dist/src/sessions/sessions.service.js.map +1 -0
- package/backend/dist/src/system-prompts/dto/system-prompt.dto.js.map +1 -0
- package/backend/dist/src/system-prompts/system-prompts.controller.js.map +1 -0
- package/backend/dist/src/system-prompts/system-prompts.module.js.map +1 -0
- package/backend/dist/src/system-prompts/system-prompts.service.js.map +1 -0
- package/backend/dist/{timeout.interceptor.js → src/timeout.interceptor.js} +1 -1
- package/backend/dist/src/timeout.interceptor.js.map +1 -0
- package/backend/dist/src/tracing.js.map +1 -0
- package/backend/dist/src/utils/fuzzy-search.js.map +1 -0
- package/backend/dist/src/utils/index.js.map +1 -0
- package/backend/dist/src/utils/trace.decorator.js.map +1 -0
- package/backend/dist/src/workspace/dto/file-tree.dto.d.ts +8 -0
- package/backend/dist/src/workspace/dto/file-tree.dto.js +10 -0
- package/backend/dist/src/workspace/dto/file-tree.dto.js.map +1 -0
- package/backend/dist/src/workspace/dto/search-workspace.dto.js.map +1 -0
- package/backend/dist/{workspace → src/workspace}/workspace.controller.d.ts +2 -5
- package/backend/dist/src/workspace/workspace.controller.js.map +1 -0
- package/backend/dist/src/workspace/workspace.module.js.map +1 -0
- package/backend/dist/{workspace → src/workspace}/workspace.service.d.ts +2 -6
- package/backend/dist/{workspace → src/workspace}/workspace.service.js +61 -12
- package/backend/dist/src/workspace/workspace.service.js.map +1 -0
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/backend/packages/gemini-core/examples/simple.ts +120 -0
- package/backend/packages/gemini-core/index.ts +15 -0
- package/backend/packages/gemini-core/src/code_assist/codeAssist.ts +37 -0
- package/backend/packages/gemini-core/src/code_assist/converter.ts +250 -0
- package/backend/packages/gemini-core/src/code_assist/oauth-credential-storage.ts +129 -0
- package/backend/packages/gemini-core/src/code_assist/oauth2.ts +541 -0
- package/backend/packages/gemini-core/src/code_assist/server.ts +236 -0
- package/backend/packages/gemini-core/src/code_assist/setup.ts +124 -0
- package/backend/packages/gemini-core/src/code_assist/types.ts +201 -0
- package/backend/packages/gemini-core/src/config/config.ts +75 -0
- package/backend/packages/gemini-core/src/config/models.ts +23 -0
- package/backend/packages/gemini-core/src/config/storage.ts +30 -0
- package/backend/packages/gemini-core/src/core/contentGenerator.ts +136 -0
- package/backend/packages/gemini-core/src/core/geminiChat.ts +385 -0
- package/backend/packages/gemini-core/src/core/geminiRequest.ts +19 -0
- package/backend/packages/gemini-core/src/core/prompts.ts +109 -0
- package/backend/packages/gemini-core/src/core/tokenLimits.ts +32 -0
- package/backend/packages/gemini-core/src/index.ts +35 -0
- package/backend/packages/gemini-core/src/mcp/token-storage/base-token-storage.ts +49 -0
- package/backend/packages/gemini-core/src/mcp/token-storage/file-token-storage.ts +184 -0
- package/backend/packages/gemini-core/src/mcp/token-storage/hybrid-token-storage.ts +97 -0
- package/backend/packages/gemini-core/src/mcp/token-storage/index.ts +14 -0
- package/backend/packages/gemini-core/src/mcp/token-storage/keychain-token-storage.ts +251 -0
- package/backend/packages/gemini-core/src/mcp/token-storage/types.ts +42 -0
- package/backend/packages/gemini-core/src/utils/errors.ts +112 -0
- package/backend/packages/gemini-core/src/utils/partUtils.ts +169 -0
- package/backend/packages/gemini-core/src/utils/quotaErrorDetection.ts +102 -0
- package/backend/packages/gemini-core/src/utils/retry.ts +265 -0
- package/backend/packages/gemini-core/src/utils/session.ts +9 -0
- package/backend/packages/gemini-core/src/utils/userAccountManager.ts +140 -0
- package/package.json +5 -3
- package/backend/.repoburg/orchestrations/README.md +0 -41
- package/backend/dist/action-execution/action-execution.module.js.map +0 -1
- package/backend/dist/action-execution/action-execution.service.js.map +0 -1
- package/backend/dist/ai-actions/ai-action-batch.service.js.map +0 -1
- package/backend/dist/ai-actions/ai-action-creation.service.js.map +0 -1
- package/backend/dist/ai-actions/ai-actions.controller.js.map +0 -1
- package/backend/dist/ai-actions/ai-actions.module.js.map +0 -1
- package/backend/dist/ai-actions/ai-actions.service.js.map +0 -1
- package/backend/dist/app.controller.js.map +0 -1
- package/backend/dist/app.module.js.map +0 -1
- package/backend/dist/app.service.js.map +0 -1
- package/backend/dist/application-state/application-state.controller.js.map +0 -1
- package/backend/dist/application-state/application-state.module.js.map +0 -1
- package/backend/dist/application-state/application-state.service.js.map +0 -1
- package/backend/dist/application-state/dto/set-auto-context-fetch-enabled.dto.js.map +0 -1
- package/backend/dist/application-state/dto/set-auto-send-to-ai-studio-enabled.dto.js.map +0 -1
- package/backend/dist/application-state/dto/set-context-token-limit.dto.js.map +0 -1
- package/backend/dist/application-state/dto/set-orchestration-timeout.dto.js.map +0 -1
- package/backend/dist/application-state/dto/set-theme.dto.js.map +0 -1
- package/backend/dist/application-state/dto/set-websocket-enabled.dto.js.map +0 -1
- package/backend/dist/context-generation/context-generation.module.js.map +0 -1
- package/backend/dist/context-generation/context-generation.service.js.map +0 -1
- package/backend/dist/context-snippets/context-snippets.controller.js.map +0 -1
- package/backend/dist/context-snippets/context-snippets.module.js.map +0 -1
- package/backend/dist/context-snippets/context-snippets.service.js.map +0 -1
- package/backend/dist/context-snippets/dto/context-snippet.dto.js.map +0 -1
- package/backend/dist/context-templates/context-templates.controller.js.map +0 -1
- package/backend/dist/context-templates/context-templates.module.js.map +0 -1
- package/backend/dist/context-templates/context-templates.service.js.map +0 -1
- package/backend/dist/context-templates/dto/context-template.dto.js.map +0 -1
- package/backend/dist/core-entities/ai-action.entity.js.map +0 -1
- package/backend/dist/core-entities/application-state.entity.js.map +0 -1
- package/backend/dist/core-entities/base.entity.js.map +0 -1
- package/backend/dist/core-entities/context-snippet.entity.js.map +0 -1
- package/backend/dist/core-entities/context-template.entity.js.map +0 -1
- package/backend/dist/core-entities/custom-snippet.entity.js.map +0 -1
- package/backend/dist/core-entities/execution-log.entity.js.map +0 -1
- package/backend/dist/core-entities/index.js.map +0 -1
- package/backend/dist/core-entities/project.entity.js.map +0 -1
- package/backend/dist/core-entities/session-input.entity.js.map +0 -1
- package/backend/dist/core-entities/session.entity.js.map +0 -1
- package/backend/dist/core-entities/system-prompt.entity.js.map +0 -1
- package/backend/dist/custom-snippets/custom-snippets.controller.js.map +0 -1
- package/backend/dist/custom-snippets/custom-snippets.module.js.map +0 -1
- package/backend/dist/custom-snippets/custom-snippets.service.js.map +0 -1
- package/backend/dist/custom-snippets/dto/custom-snippet.dto.js.map +0 -1
- package/backend/dist/events/events.gateway.js.map +0 -1
- package/backend/dist/events/events.module.js.map +0 -1
- package/backend/dist/execution-logs/dto/execution-log.dto.js.map +0 -1
- package/backend/dist/execution-logs/execution-logs.controller.js.map +0 -1
- package/backend/dist/execution-logs/execution-logs.module.js.map +0 -1
- package/backend/dist/execution-logs/execution-logs.service.js.map +0 -1
- package/backend/dist/http-exception.filter.js.map +0 -1
- package/backend/dist/llm-response-parser/dto/ai-action.dto.js.map +0 -1
- package/backend/dist/llm-response-parser/errors/parsing.error.js.map +0 -1
- package/backend/dist/llm-response-parser/llm-response-parser.module.js.map +0 -1
- package/backend/dist/llm-response-parser/llm-response-parser.service.js.map +0 -1
- package/backend/dist/llm-response-parser/parsing.constants.js.map +0 -1
- package/backend/dist/llm-responses/dto/submit-llm-response.dto.js.map +0 -1
- package/backend/dist/llm-responses/llm-responses.controller.js.map +0 -1
- package/backend/dist/llm-responses/llm-responses.module.js.map +0 -1
- package/backend/dist/llm-responses/llm-responses.service.js.map +0 -1
- package/backend/dist/main.js.map +0 -1
- package/backend/dist/orchestration/dto/orchestration.dto.js.map +0 -1
- package/backend/dist/orchestration/orchestration-fs.service.js.map +0 -1
- package/backend/dist/orchestration/orchestration-parser.service.js.map +0 -1
- package/backend/dist/orchestration/orchestration.controller.js.map +0 -1
- package/backend/dist/orchestration/orchestration.module.js.map +0 -1
- package/backend/dist/orchestration/orchestration.service.js.map +0 -1
- package/backend/dist/orchestration/orchestration.types.js.map +0 -1
- package/backend/dist/projects/dto/project.dto.js.map +0 -1
- package/backend/dist/projects/projects.controller.js.map +0 -1
- package/backend/dist/projects/projects.module.js.map +0 -1
- package/backend/dist/projects/projects.service.js.map +0 -1
- package/backend/dist/seeding/context-template-seeding.service.js.map +0 -1
- package/backend/dist/seeding/custom-snippet-seeding.service.js.map +0 -1
- package/backend/dist/seeding/data/context-templates/default-followup_ad-hoc-focused-context.js.map +0 -1
- package/backend/dist/seeding/data/context-templates/default-initial_condensed-project-context.js.map +0 -1
- package/backend/dist/seeding/data/context-templates/default-initial_full-project-context.js.map +0 -1
- package/backend/dist/seeding/data/context-templates/pm-context.js.map +0 -1
- package/backend/dist/seeding/data/context-templates/pr-description.js.map +0 -1
- package/backend/dist/seeding/data/context-templates/sample_focused-tree.d.ts +0 -2
- package/backend/dist/seeding/data/context-templates/sample_focused-tree.js.map +0 -1
- package/backend/dist/seeding/data/custom-snippets/default_rglob.js.map +0 -1
- package/backend/dist/seeding/data/custom-snippets/git-diff.js.map +0 -1
- package/backend/dist/seeding/data/custom-snippets/rg-exclude.js.map +0 -1
- package/backend/dist/seeding/data/custom-snippets/rg-search-glob.js.map +0 -1
- package/backend/dist/seeding/data/custom-snippets/rg-search.js.map +0 -1
- package/backend/dist/seeding/data/custom-snippets/run-command.js.map +0 -1
- package/backend/dist/seeding/data/custom-snippets/tree.js.map +0 -1
- package/backend/dist/seeding/data/custom-snippets/usr-adhoc-incl.js.map +0 -1
- package/backend/dist/seeding/data/custom-snippets/usr-cmd-output-incl.js.map +0 -1
- package/backend/dist/seeding/data/custom-snippets/usr-input-incl.js.map +0 -1
- package/backend/dist/seeding/data/system-prompts/codebase-explorer.js.map +0 -1
- package/backend/dist/seeding/data/system-prompts/default_multi-file-action-generator-with-requester.js.map +0 -1
- package/backend/dist/seeding/data/system-prompts/packup.js.map +0 -1
- package/backend/dist/seeding/data/system-prompts/refactor-split.js.map +0 -1
- package/backend/dist/seeding/seeding.module.js.map +0 -1
- package/backend/dist/seeding/seeding.service.js.map +0 -1
- package/backend/dist/seeding/system-prompt-seeding.service.js.map +0 -1
- package/backend/dist/session-followup/session-followup.module.js.map +0 -1
- package/backend/dist/session-followup/session-followup.service.js.map +0 -1
- package/backend/dist/session-inputs/dto/session-input.dto.js.map +0 -1
- package/backend/dist/session-inputs/session-input-context.service.js.map +0 -1
- package/backend/dist/session-inputs/session-inputs.controller.js.map +0 -1
- package/backend/dist/session-inputs/session-inputs.module.js.map +0 -1
- package/backend/dist/session-inputs/session-inputs.service.js.map +0 -1
- package/backend/dist/session-transfer/session-transfer.module.js.map +0 -1
- package/backend/dist/session-transfer/session-transfer.service.js.map +0 -1
- package/backend/dist/sessions/dto/session.dto.js.map +0 -1
- package/backend/dist/sessions/sessions.controller.js.map +0 -1
- package/backend/dist/sessions/sessions.module.js.map +0 -1
- package/backend/dist/sessions/sessions.service.js.map +0 -1
- package/backend/dist/system-prompts/dto/system-prompt.dto.js.map +0 -1
- package/backend/dist/system-prompts/system-prompts.controller.js.map +0 -1
- package/backend/dist/system-prompts/system-prompts.module.js.map +0 -1
- package/backend/dist/system-prompts/system-prompts.service.js.map +0 -1
- package/backend/dist/timeout.interceptor.js.map +0 -1
- package/backend/dist/tracing.js.map +0 -1
- package/backend/dist/utils/fuzzy-search.js.map +0 -1
- package/backend/dist/utils/index.js.map +0 -1
- package/backend/dist/utils/trace.decorator.js.map +0 -1
- package/backend/dist/workspace/dto/search-workspace.dto.js.map +0 -1
- package/backend/dist/workspace/workspace.controller.js.map +0 -1
- package/backend/dist/workspace/workspace.module.js.map +0 -1
- package/backend/dist/workspace/workspace.service.js.map +0 -1
- /package/backend/dist/{action-execution → src/action-execution}/action-execution.module.d.ts +0 -0
- /package/backend/dist/{action-execution → src/action-execution}/action-execution.module.js +0 -0
- /package/backend/dist/{action-execution → src/action-execution}/action-execution.service.d.ts +0 -0
- /package/backend/dist/{action-execution → src/action-execution}/action-execution.service.js +0 -0
- /package/backend/dist/{ai-actions → src/ai-actions}/ai-action-batch.service.d.ts +0 -0
- /package/backend/dist/{ai-actions → src/ai-actions}/ai-action-batch.service.js +0 -0
- /package/backend/dist/{ai-actions → src/ai-actions}/ai-action-creation.service.d.ts +0 -0
- /package/backend/dist/{ai-actions → src/ai-actions}/ai-action-creation.service.js +0 -0
- /package/backend/dist/{ai-actions → src/ai-actions}/ai-actions.controller.d.ts +0 -0
- /package/backend/dist/{ai-actions → src/ai-actions}/ai-actions.controller.js +0 -0
- /package/backend/dist/{ai-actions → src/ai-actions}/ai-actions.module.d.ts +0 -0
- /package/backend/dist/{ai-actions → src/ai-actions}/ai-actions.module.js +0 -0
- /package/backend/dist/{ai-actions → src/ai-actions}/ai-actions.service.d.ts +0 -0
- /package/backend/dist/{ai-actions → src/ai-actions}/ai-actions.service.js +0 -0
- /package/backend/dist/{app.controller.d.ts → src/app.controller.d.ts} +0 -0
- /package/backend/dist/{app.controller.js → src/app.controller.js} +0 -0
- /package/backend/dist/{app.module.d.ts → src/app.module.d.ts} +0 -0
- /package/backend/dist/{app.module.js → src/app.module.js} +0 -0
- /package/backend/dist/{app.service.d.ts → src/app.service.d.ts} +0 -0
- /package/backend/dist/{app.service.js → src/app.service.js} +0 -0
- /package/backend/dist/{application-state → src/application-state}/application-state.controller.d.ts +0 -0
- /package/backend/dist/{application-state → src/application-state}/application-state.controller.js +0 -0
- /package/backend/dist/{application-state → src/application-state}/application-state.module.d.ts +0 -0
- /package/backend/dist/{application-state → src/application-state}/application-state.module.js +0 -0
- /package/backend/dist/{application-state → src/application-state}/application-state.service.d.ts +0 -0
- /package/backend/dist/{application-state → src/application-state}/application-state.service.js +0 -0
- /package/backend/dist/{application-state → src/application-state}/dto/set-auto-context-fetch-enabled.dto.d.ts +0 -0
- /package/backend/dist/{application-state → src/application-state}/dto/set-auto-context-fetch-enabled.dto.js +0 -0
- /package/backend/dist/{application-state → src/application-state}/dto/set-auto-send-to-ai-studio-enabled.dto.d.ts +0 -0
- /package/backend/dist/{application-state → src/application-state}/dto/set-auto-send-to-ai-studio-enabled.dto.js +0 -0
- /package/backend/dist/{application-state → src/application-state}/dto/set-context-token-limit.dto.d.ts +0 -0
- /package/backend/dist/{application-state → src/application-state}/dto/set-context-token-limit.dto.js +0 -0
- /package/backend/dist/{application-state → src/application-state}/dto/set-orchestration-timeout.dto.d.ts +0 -0
- /package/backend/dist/{application-state → src/application-state}/dto/set-orchestration-timeout.dto.js +0 -0
- /package/backend/dist/{application-state → src/application-state}/dto/set-theme.dto.d.ts +0 -0
- /package/backend/dist/{application-state → src/application-state}/dto/set-theme.dto.js +0 -0
- /package/backend/dist/{application-state → src/application-state}/dto/set-websocket-enabled.dto.d.ts +0 -0
- /package/backend/dist/{application-state → src/application-state}/dto/set-websocket-enabled.dto.js +0 -0
- /package/backend/dist/{context-generation → src/context-generation}/context-generation.module.d.ts +0 -0
- /package/backend/dist/{context-generation → src/context-generation}/context-generation.module.js +0 -0
- /package/backend/dist/{context-generation → src/context-generation}/context-generation.service.d.ts +0 -0
- /package/backend/dist/{context-generation → src/context-generation}/context-generation.service.js +0 -0
- /package/backend/dist/{context-snippets → src/context-snippets}/context-snippets.controller.d.ts +0 -0
- /package/backend/dist/{context-snippets → src/context-snippets}/context-snippets.controller.js +0 -0
- /package/backend/dist/{context-snippets → src/context-snippets}/context-snippets.module.d.ts +0 -0
- /package/backend/dist/{context-snippets → src/context-snippets}/context-snippets.module.js +0 -0
- /package/backend/dist/{context-snippets → src/context-snippets}/context-snippets.service.d.ts +0 -0
- /package/backend/dist/{context-snippets → src/context-snippets}/context-snippets.service.js +0 -0
- /package/backend/dist/{context-snippets → src/context-snippets}/dto/context-snippet.dto.d.ts +0 -0
- /package/backend/dist/{context-snippets → src/context-snippets}/dto/context-snippet.dto.js +0 -0
- /package/backend/dist/{context-templates → src/context-templates}/context-templates.controller.d.ts +0 -0
- /package/backend/dist/{context-templates → src/context-templates}/context-templates.controller.js +0 -0
- /package/backend/dist/{context-templates → src/context-templates}/context-templates.module.d.ts +0 -0
- /package/backend/dist/{context-templates → src/context-templates}/context-templates.module.js +0 -0
- /package/backend/dist/{context-templates → src/context-templates}/context-templates.service.d.ts +0 -0
- /package/backend/dist/{context-templates → src/context-templates}/context-templates.service.js +0 -0
- /package/backend/dist/{context-templates → src/context-templates}/dto/context-template.dto.d.ts +0 -0
- /package/backend/dist/{context-templates → src/context-templates}/dto/context-template.dto.js +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/ai-action.entity.d.ts +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/ai-action.entity.js +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/application-state.entity.d.ts +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/application-state.entity.js +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/base.entity.d.ts +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/base.entity.js +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/context-snippet.entity.d.ts +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/context-snippet.entity.js +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/context-template.entity.d.ts +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/context-template.entity.js +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/custom-snippet.entity.d.ts +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/custom-snippet.entity.js +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/execution-log.entity.d.ts +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/execution-log.entity.js +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/index.d.ts +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/index.js +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/project.entity.d.ts +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/project.entity.js +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/session-input.entity.d.ts +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/session-input.entity.js +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/session.entity.d.ts +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/session.entity.js +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/system-prompt.entity.d.ts +0 -0
- /package/backend/dist/{core-entities → src/core-entities}/system-prompt.entity.js +0 -0
- /package/backend/dist/{custom-snippets → src/custom-snippets}/custom-snippets.controller.d.ts +0 -0
- /package/backend/dist/{custom-snippets → src/custom-snippets}/custom-snippets.controller.js +0 -0
- /package/backend/dist/{custom-snippets → src/custom-snippets}/custom-snippets.module.d.ts +0 -0
- /package/backend/dist/{custom-snippets → src/custom-snippets}/custom-snippets.module.js +0 -0
- /package/backend/dist/{custom-snippets → src/custom-snippets}/custom-snippets.service.d.ts +0 -0
- /package/backend/dist/{custom-snippets → src/custom-snippets}/custom-snippets.service.js +0 -0
- /package/backend/dist/{custom-snippets → src/custom-snippets}/dto/custom-snippet.dto.d.ts +0 -0
- /package/backend/dist/{custom-snippets → src/custom-snippets}/dto/custom-snippet.dto.js +0 -0
- /package/backend/dist/{events → src/events}/events.gateway.d.ts +0 -0
- /package/backend/dist/{events → src/events}/events.gateway.js +0 -0
- /package/backend/dist/{events → src/events}/events.module.d.ts +0 -0
- /package/backend/dist/{events → src/events}/events.module.js +0 -0
- /package/backend/dist/{execution-logs → src/execution-logs}/dto/execution-log.dto.d.ts +0 -0
- /package/backend/dist/{execution-logs → src/execution-logs}/dto/execution-log.dto.js +0 -0
- /package/backend/dist/{execution-logs → src/execution-logs}/execution-logs.controller.d.ts +0 -0
- /package/backend/dist/{execution-logs → src/execution-logs}/execution-logs.controller.js +0 -0
- /package/backend/dist/{execution-logs → src/execution-logs}/execution-logs.module.d.ts +0 -0
- /package/backend/dist/{execution-logs → src/execution-logs}/execution-logs.module.js +0 -0
- /package/backend/dist/{execution-logs → src/execution-logs}/execution-logs.service.d.ts +0 -0
- /package/backend/dist/{execution-logs → src/execution-logs}/execution-logs.service.js +0 -0
- /package/backend/dist/{http-exception.filter.d.ts → src/http-exception.filter.d.ts} +0 -0
- /package/backend/dist/{http-exception.filter.js → src/http-exception.filter.js} +0 -0
- /package/backend/dist/{llm-response-parser → src/llm-response-parser}/dto/ai-action.dto.d.ts +0 -0
- /package/backend/dist/{llm-response-parser → src/llm-response-parser}/dto/ai-action.dto.js +0 -0
- /package/backend/dist/{llm-response-parser → src/llm-response-parser}/errors/parsing.error.d.ts +0 -0
- /package/backend/dist/{llm-response-parser → src/llm-response-parser}/errors/parsing.error.js +0 -0
- /package/backend/dist/{llm-response-parser → src/llm-response-parser}/llm-response-parser.module.d.ts +0 -0
- /package/backend/dist/{llm-response-parser → src/llm-response-parser}/llm-response-parser.module.js +0 -0
- /package/backend/dist/{llm-response-parser → src/llm-response-parser}/llm-response-parser.service.d.ts +0 -0
- /package/backend/dist/{llm-response-parser → src/llm-response-parser}/llm-response-parser.service.js +0 -0
- /package/backend/dist/{llm-response-parser → src/llm-response-parser}/parsing.constants.d.ts +0 -0
- /package/backend/dist/{llm-response-parser → src/llm-response-parser}/parsing.constants.js +0 -0
- /package/backend/dist/{llm-responses → src/llm-responses}/dto/submit-llm-response.dto.d.ts +0 -0
- /package/backend/dist/{llm-responses → src/llm-responses}/dto/submit-llm-response.dto.js +0 -0
- /package/backend/dist/{llm-responses → src/llm-responses}/llm-responses.controller.d.ts +0 -0
- /package/backend/dist/{llm-responses → src/llm-responses}/llm-responses.controller.js +0 -0
- /package/backend/dist/{llm-responses → src/llm-responses}/llm-responses.module.d.ts +0 -0
- /package/backend/dist/{llm-responses → src/llm-responses}/llm-responses.module.js +0 -0
- /package/backend/dist/{llm-responses → src/llm-responses}/llm-responses.service.d.ts +0 -0
- /package/backend/dist/{llm-responses → src/llm-responses}/llm-responses.service.js +0 -0
- /package/backend/dist/{main.d.ts → src/main.d.ts} +0 -0
- /package/backend/dist/{main.js → src/main.js} +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/dto/orchestration.dto.d.ts +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/dto/orchestration.dto.js +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/orchestration-fs.service.d.ts +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/orchestration-fs.service.js +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/orchestration-parser.service.d.ts +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/orchestration-parser.service.js +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/orchestration.controller.d.ts +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/orchestration.controller.js +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/orchestration.module.d.ts +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/orchestration.module.js +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/orchestration.service.d.ts +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/orchestration.service.js +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/orchestration.types.d.ts +0 -0
- /package/backend/dist/{orchestration → src/orchestration}/orchestration.types.js +0 -0
- /package/backend/dist/{projects → src/projects}/dto/project.dto.d.ts +0 -0
- /package/backend/dist/{projects → src/projects}/dto/project.dto.js +0 -0
- /package/backend/dist/{projects → src/projects}/projects.controller.d.ts +0 -0
- /package/backend/dist/{projects → src/projects}/projects.controller.js +0 -0
- /package/backend/dist/{projects → src/projects}/projects.module.d.ts +0 -0
- /package/backend/dist/{projects → src/projects}/projects.module.js +0 -0
- /package/backend/dist/{projects → src/projects}/projects.service.d.ts +0 -0
- /package/backend/dist/{projects → src/projects}/projects.service.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/context-template-seeding.service.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/context-template-seeding.service.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/custom-snippet-seeding.service.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/custom-snippet-seeding.service.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/context-templates/default-followup_ad-hoc-focused-context.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/context-templates/default-followup_ad-hoc-focused-context.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/context-templates/default-initial_condensed-project-context.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/context-templates/default-initial_condensed-project-context.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/context-templates/default-initial_full-project-context.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/context-templates/default-initial_full-project-context.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/context-templates/pm-context.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/context-templates/pm-context.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/context-templates/pr-description.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/context-templates/pr-description.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/default_rglob.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/default_rglob.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/git-diff.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/git-diff.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/rg-exclude.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/rg-exclude.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/rg-search-glob.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/rg-search-glob.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/rg-search.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/rg-search.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/run-command.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/run-command.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/tree.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/tree.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/usr-adhoc-incl.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/usr-adhoc-incl.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/usr-cmd-output-incl.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/usr-cmd-output-incl.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/usr-input-incl.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/custom-snippets/usr-input-incl.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/system-prompts/codebase-explorer.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/system-prompts/codebase-explorer.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/system-prompts/default_multi-file-action-generator-with-requester.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/system-prompts/default_multi-file-action-generator-with-requester.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/system-prompts/packup.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/system-prompts/packup.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/system-prompts/refactor-split.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/data/system-prompts/refactor-split.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/seeding.module.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/seeding.module.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/seeding.service.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/seeding.service.js +0 -0
- /package/backend/dist/{seeding → src/seeding}/system-prompt-seeding.service.d.ts +0 -0
- /package/backend/dist/{seeding → src/seeding}/system-prompt-seeding.service.js +0 -0
- /package/backend/dist/{session-followup → src/session-followup}/session-followup.module.d.ts +0 -0
- /package/backend/dist/{session-followup → src/session-followup}/session-followup.module.js +0 -0
- /package/backend/dist/{session-followup → src/session-followup}/session-followup.service.d.ts +0 -0
- /package/backend/dist/{session-followup → src/session-followup}/session-followup.service.js +0 -0
- /package/backend/dist/{session-inputs → src/session-inputs}/dto/session-input.dto.d.ts +0 -0
- /package/backend/dist/{session-inputs → src/session-inputs}/dto/session-input.dto.js +0 -0
- /package/backend/dist/{session-inputs → src/session-inputs}/session-inputs.controller.d.ts +0 -0
- /package/backend/dist/{session-inputs → src/session-inputs}/session-inputs.controller.js +0 -0
- /package/backend/dist/{session-inputs → src/session-inputs}/session-inputs.module.d.ts +0 -0
- /package/backend/dist/{session-transfer → src/session-transfer}/session-transfer.module.d.ts +0 -0
- /package/backend/dist/{session-transfer → src/session-transfer}/session-transfer.module.js +0 -0
- /package/backend/dist/{session-transfer → src/session-transfer}/session-transfer.service.d.ts +0 -0
- /package/backend/dist/{session-transfer → src/session-transfer}/session-transfer.service.js +0 -0
- /package/backend/dist/{sessions → src/sessions}/dto/session.dto.d.ts +0 -0
- /package/backend/dist/{sessions → src/sessions}/dto/session.dto.js +0 -0
- /package/backend/dist/{sessions → src/sessions}/sessions.controller.d.ts +0 -0
- /package/backend/dist/{sessions → src/sessions}/sessions.controller.js +0 -0
- /package/backend/dist/{sessions → src/sessions}/sessions.module.d.ts +0 -0
- /package/backend/dist/{sessions → src/sessions}/sessions.module.js +0 -0
- /package/backend/dist/{sessions → src/sessions}/sessions.service.d.ts +0 -0
- /package/backend/dist/{sessions → src/sessions}/sessions.service.js +0 -0
- /package/backend/dist/{system-prompts → src/system-prompts}/dto/system-prompt.dto.d.ts +0 -0
- /package/backend/dist/{system-prompts → src/system-prompts}/dto/system-prompt.dto.js +0 -0
- /package/backend/dist/{system-prompts → src/system-prompts}/system-prompts.controller.d.ts +0 -0
- /package/backend/dist/{system-prompts → src/system-prompts}/system-prompts.controller.js +0 -0
- /package/backend/dist/{system-prompts → src/system-prompts}/system-prompts.module.d.ts +0 -0
- /package/backend/dist/{system-prompts → src/system-prompts}/system-prompts.module.js +0 -0
- /package/backend/dist/{system-prompts → src/system-prompts}/system-prompts.service.d.ts +0 -0
- /package/backend/dist/{system-prompts → src/system-prompts}/system-prompts.service.js +0 -0
- /package/backend/dist/{timeout.interceptor.d.ts → src/timeout.interceptor.d.ts} +0 -0
- /package/backend/dist/{tracing.d.ts → src/tracing.d.ts} +0 -0
- /package/backend/dist/{tracing.js → src/tracing.js} +0 -0
- /package/backend/dist/{utils → src/utils}/fuzzy-search.d.ts +0 -0
- /package/backend/dist/{utils → src/utils}/fuzzy-search.js +0 -0
- /package/backend/dist/{utils → src/utils}/index.d.ts +0 -0
- /package/backend/dist/{utils → src/utils}/index.js +0 -0
- /package/backend/dist/{utils → src/utils}/trace.decorator.d.ts +0 -0
- /package/backend/dist/{utils → src/utils}/trace.decorator.js +0 -0
- /package/backend/dist/{workspace → src/workspace}/dto/search-workspace.dto.d.ts +0 -0
- /package/backend/dist/{workspace → src/workspace}/dto/search-workspace.dto.js +0 -0
- /package/backend/dist/{workspace → src/workspace}/workspace.controller.js +0 -0
- /package/backend/dist/{workspace → src/workspace}/workspace.module.d.ts +0 -0
- /package/backend/dist/{workspace → src/workspace}/workspace.module.js +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
interface GaxiosError {
|
|
8
|
+
response?: {
|
|
9
|
+
data?: unknown;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function isNodeError(error: unknown): error is NodeJS.ErrnoException {
|
|
14
|
+
return error instanceof Error && 'code' in error;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function getErrorMessage(error: unknown): string {
|
|
18
|
+
if (error instanceof Error) {
|
|
19
|
+
return error.message;
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
return String(error);
|
|
23
|
+
} catch {
|
|
24
|
+
return 'Failed to get error details';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export class FatalError extends Error {
|
|
29
|
+
constructor(
|
|
30
|
+
message: string,
|
|
31
|
+
readonly exitCode: number,
|
|
32
|
+
) {
|
|
33
|
+
super(message);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class FatalAuthenticationError extends FatalError {
|
|
38
|
+
constructor(message: string) {
|
|
39
|
+
super(message, 41);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export class FatalInputError extends FatalError {
|
|
43
|
+
constructor(message: string) {
|
|
44
|
+
super(message, 42);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export class FatalSandboxError extends FatalError {
|
|
48
|
+
constructor(message: string) {
|
|
49
|
+
super(message, 44);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export class FatalConfigError extends FatalError {
|
|
53
|
+
constructor(message: string) {
|
|
54
|
+
super(message, 52);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export class FatalTurnLimitedError extends FatalError {
|
|
58
|
+
constructor(message: string) {
|
|
59
|
+
super(message, 53);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export class FatalToolExecutionError extends FatalError {
|
|
63
|
+
constructor(message: string) {
|
|
64
|
+
super(message, 54);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export class FatalCancellationError extends FatalError {
|
|
68
|
+
constructor(message: string) {
|
|
69
|
+
super(message, 130); // Standard exit code for SIGINT
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export class ForbiddenError extends Error {}
|
|
74
|
+
export class UnauthorizedError extends Error {}
|
|
75
|
+
export class BadRequestError extends Error {}
|
|
76
|
+
|
|
77
|
+
interface ResponseData {
|
|
78
|
+
error?: {
|
|
79
|
+
code?: number;
|
|
80
|
+
message?: string;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function toFriendlyError(error: unknown): unknown {
|
|
85
|
+
if (error && typeof error === 'object' && 'response' in error) {
|
|
86
|
+
const gaxiosError = error as GaxiosError;
|
|
87
|
+
const data = parseResponseData(gaxiosError);
|
|
88
|
+
if (data.error && data.error.message && data.error.code) {
|
|
89
|
+
switch (data.error.code) {
|
|
90
|
+
case 400:
|
|
91
|
+
return new BadRequestError(data.error.message);
|
|
92
|
+
case 401:
|
|
93
|
+
return new UnauthorizedError(data.error.message);
|
|
94
|
+
case 403:
|
|
95
|
+
// It's import to pass the message here since it might
|
|
96
|
+
// explain the cause like "the cloud project you're
|
|
97
|
+
// using doesn't have code assist enabled".
|
|
98
|
+
return new ForbiddenError(data.error.message);
|
|
99
|
+
default:
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return error;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function parseResponseData(error: GaxiosError): ResponseData {
|
|
107
|
+
// Inexplicably, Gaxios sometimes doesn't JSONify the response data.
|
|
108
|
+
if (typeof error.response?.data === 'string') {
|
|
109
|
+
return JSON.parse(error.response?.data) as ResponseData;
|
|
110
|
+
}
|
|
111
|
+
return error.response?.data as ResponseData;
|
|
112
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type {
|
|
8
|
+
GenerateContentResponse,
|
|
9
|
+
PartListUnion,
|
|
10
|
+
Part,
|
|
11
|
+
PartUnion,
|
|
12
|
+
} from '@google/genai';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Converts a PartListUnion into a string.
|
|
16
|
+
* If verbose is true, includes summary representations of non-text parts.
|
|
17
|
+
*/
|
|
18
|
+
export function partToString(
|
|
19
|
+
value: PartListUnion,
|
|
20
|
+
options?: { verbose?: boolean },
|
|
21
|
+
): string {
|
|
22
|
+
if (!value) {
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
if (typeof value === 'string') {
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
if (Array.isArray(value)) {
|
|
29
|
+
return value.map((part) => partToString(part, options)).join('');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Cast to Part, assuming it might contain project-specific fields
|
|
33
|
+
const part = value as Part & {
|
|
34
|
+
videoMetadata?: unknown;
|
|
35
|
+
thought?: string;
|
|
36
|
+
codeExecutionResult?: unknown;
|
|
37
|
+
executableCode?: unknown;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
if (options?.verbose) {
|
|
41
|
+
if (part.videoMetadata !== undefined) {
|
|
42
|
+
return `[Video Metadata]`;
|
|
43
|
+
}
|
|
44
|
+
if (part.thought !== undefined) {
|
|
45
|
+
return `[Thought: ${part.thought}]`;
|
|
46
|
+
}
|
|
47
|
+
if (part.codeExecutionResult !== undefined) {
|
|
48
|
+
return `[Code Execution Result]`;
|
|
49
|
+
}
|
|
50
|
+
if (part.executableCode !== undefined) {
|
|
51
|
+
return `[Executable Code]`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Standard Part fields
|
|
55
|
+
if (part.fileData !== undefined) {
|
|
56
|
+
return `[File Data]`;
|
|
57
|
+
}
|
|
58
|
+
if (part.functionCall !== undefined) {
|
|
59
|
+
return `[Function Call: ${part.functionCall.name}]`;
|
|
60
|
+
}
|
|
61
|
+
if (part.functionResponse !== undefined) {
|
|
62
|
+
return `[Function Response: ${part.functionResponse.name}]`;
|
|
63
|
+
}
|
|
64
|
+
if (part.inlineData !== undefined) {
|
|
65
|
+
return `<${part.inlineData.mimeType}>`;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return part.text ?? '';
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function getResponseText(
|
|
73
|
+
response: GenerateContentResponse,
|
|
74
|
+
): string | null {
|
|
75
|
+
if (response.candidates && response.candidates.length > 0) {
|
|
76
|
+
const candidate = response.candidates[0];
|
|
77
|
+
|
|
78
|
+
if (
|
|
79
|
+
candidate.content &&
|
|
80
|
+
candidate.content.parts &&
|
|
81
|
+
candidate.content.parts.length > 0
|
|
82
|
+
) {
|
|
83
|
+
return candidate.content.parts
|
|
84
|
+
.filter((part) => part.text)
|
|
85
|
+
.map((part) => part.text)
|
|
86
|
+
.join('');
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Asynchronously maps over a PartListUnion, applying a transformation function
|
|
94
|
+
* to the text content of each text-based part.
|
|
95
|
+
*
|
|
96
|
+
* @param parts The PartListUnion to process.
|
|
97
|
+
* @param transform A function that takes a string of text and returns a Promise
|
|
98
|
+
* resolving to an array of new PartUnions.
|
|
99
|
+
* @returns A Promise that resolves to a new array of PartUnions with the
|
|
100
|
+
* transformations applied.
|
|
101
|
+
*/
|
|
102
|
+
export async function flatMapTextParts(
|
|
103
|
+
parts: PartListUnion,
|
|
104
|
+
transform: (text: string) => Promise<PartUnion[]>,
|
|
105
|
+
): Promise<PartUnion[]> {
|
|
106
|
+
const result: PartUnion[] = [];
|
|
107
|
+
const partArray = Array.isArray(parts)
|
|
108
|
+
? parts
|
|
109
|
+
: typeof parts === 'string'
|
|
110
|
+
? [{ text: parts }]
|
|
111
|
+
: [parts];
|
|
112
|
+
|
|
113
|
+
for (const part of partArray) {
|
|
114
|
+
let textToProcess: string | undefined;
|
|
115
|
+
if (typeof part === 'string') {
|
|
116
|
+
textToProcess = part;
|
|
117
|
+
} else if ('text' in part) {
|
|
118
|
+
textToProcess = part.text;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (textToProcess !== undefined) {
|
|
122
|
+
const transformedParts = await transform(textToProcess);
|
|
123
|
+
result.push(...transformedParts);
|
|
124
|
+
} else {
|
|
125
|
+
// Pass through non-text parts unmodified.
|
|
126
|
+
result.push(part);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return result;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Appends a string of text to the last text part of a prompt, or adds a new
|
|
134
|
+
* text part if the last part is not a text part.
|
|
135
|
+
*
|
|
136
|
+
* @param prompt The prompt to modify.
|
|
137
|
+
* @param textToAppend The text to append to the prompt.
|
|
138
|
+
* @param separator The separator to add between existing text and the new text.
|
|
139
|
+
* @returns The modified prompt.
|
|
140
|
+
*/
|
|
141
|
+
export function appendToLastTextPart(
|
|
142
|
+
prompt: PartUnion[],
|
|
143
|
+
textToAppend: string,
|
|
144
|
+
separator = '\n\n',
|
|
145
|
+
): PartUnion[] {
|
|
146
|
+
if (!textToAppend) {
|
|
147
|
+
return prompt;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (prompt.length === 0) {
|
|
151
|
+
return [{ text: textToAppend }];
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const newPrompt = [...prompt];
|
|
155
|
+
const lastPart = newPrompt.at(-1);
|
|
156
|
+
|
|
157
|
+
if (typeof lastPart === 'string') {
|
|
158
|
+
newPrompt[newPrompt.length - 1] = `${lastPart}${separator}${textToAppend}`;
|
|
159
|
+
} else if (lastPart && 'text' in lastPart) {
|
|
160
|
+
newPrompt[newPrompt.length - 1] = {
|
|
161
|
+
...lastPart,
|
|
162
|
+
text: `${lastPart.text}${separator}${textToAppend}`,
|
|
163
|
+
};
|
|
164
|
+
} else {
|
|
165
|
+
newPrompt.push({ text: `${separator}${textToAppend}` });
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return newPrompt;
|
|
169
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export interface StructuredError {
|
|
8
|
+
message: string;
|
|
9
|
+
status?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ApiError {
|
|
12
|
+
error: {
|
|
13
|
+
code: number;
|
|
14
|
+
message: string;
|
|
15
|
+
status: string;
|
|
16
|
+
details: unknown[];
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function isApiError(error: unknown): error is ApiError {
|
|
21
|
+
return (
|
|
22
|
+
typeof error === 'object' &&
|
|
23
|
+
error !== null &&
|
|
24
|
+
'error' in error &&
|
|
25
|
+
typeof (error as ApiError).error === 'object' &&
|
|
26
|
+
'message' in (error as ApiError).error
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function isStructuredError(error: unknown): error is StructuredError {
|
|
31
|
+
return (
|
|
32
|
+
typeof error === 'object' &&
|
|
33
|
+
error !== null &&
|
|
34
|
+
'message' in error &&
|
|
35
|
+
typeof (error as StructuredError).message === 'string'
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function isProQuotaExceededError(error: unknown): boolean {
|
|
40
|
+
// Check for Pro quota exceeded errors by looking for the specific pattern
|
|
41
|
+
// This will match patterns like:
|
|
42
|
+
// - "Quota exceeded for quota metric 'Gemini 2.5 Pro Requests'"
|
|
43
|
+
// - "Quota exceeded for quota metric 'Gemini 2.5-preview Pro Requests'"
|
|
44
|
+
// We use string methods instead of regex to avoid ReDoS vulnerabilities
|
|
45
|
+
|
|
46
|
+
const checkMessage = (message: string): boolean =>
|
|
47
|
+
message.includes("Quota exceeded for quota metric 'Gemini") &&
|
|
48
|
+
message.includes("Pro Requests'");
|
|
49
|
+
|
|
50
|
+
if (typeof error === 'string') {
|
|
51
|
+
return checkMessage(error);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (isStructuredError(error)) {
|
|
55
|
+
return checkMessage(error.message);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (isApiError(error)) {
|
|
59
|
+
return checkMessage(error.error.message);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Check if it's a Gaxios error with response data
|
|
63
|
+
if (error && typeof error === 'object' && 'response' in error) {
|
|
64
|
+
const gaxiosError = error as {
|
|
65
|
+
response?: {
|
|
66
|
+
data?: unknown;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
if (gaxiosError.response && gaxiosError.response.data) {
|
|
70
|
+
if (typeof gaxiosError.response.data === 'string') {
|
|
71
|
+
return checkMessage(gaxiosError.response.data);
|
|
72
|
+
}
|
|
73
|
+
if (
|
|
74
|
+
typeof gaxiosError.response.data === 'object' &&
|
|
75
|
+
gaxiosError.response.data !== null &&
|
|
76
|
+
'error' in gaxiosError.response.data
|
|
77
|
+
) {
|
|
78
|
+
const errorData = gaxiosError.response.data as {
|
|
79
|
+
error?: { message?: string };
|
|
80
|
+
};
|
|
81
|
+
return checkMessage(errorData.error?.message || '');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function isGenericQuotaExceededError(error: unknown): boolean {
|
|
89
|
+
if (typeof error === 'string') {
|
|
90
|
+
return error.includes('Quota exceeded for quota metric');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (isStructuredError(error)) {
|
|
94
|
+
return error.message.includes('Quota exceeded for quota metric');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (isApiError(error)) {
|
|
98
|
+
return error.error.message.includes('Quota exceeded for quota metric');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { GenerateContentResponse } from '@google/genai';
|
|
8
|
+
|
|
9
|
+
export interface HttpError extends Error {
|
|
10
|
+
status?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface RetryOptions {
|
|
14
|
+
maxAttempts: number;
|
|
15
|
+
initialDelayMs: number;
|
|
16
|
+
maxDelayMs: number;
|
|
17
|
+
shouldRetryOnError: (error: Error) => boolean;
|
|
18
|
+
shouldRetryOnContent?: (content: GenerateContentResponse) => boolean;
|
|
19
|
+
authType?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const DEFAULT_RETRY_OPTIONS: RetryOptions = {
|
|
23
|
+
maxAttempts: 5,
|
|
24
|
+
initialDelayMs: 5000,
|
|
25
|
+
maxDelayMs: 30000, // 30 seconds
|
|
26
|
+
shouldRetryOnError: defaultShouldRetry,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Default predicate function to determine if a retry should be attempted.
|
|
31
|
+
* Retries on 429 (Too Many Requests) and 5xx server errors.
|
|
32
|
+
* @param error The error object.
|
|
33
|
+
* @returns True if the error is a transient error, false otherwise.
|
|
34
|
+
*/
|
|
35
|
+
function defaultShouldRetry(error: Error | unknown): boolean {
|
|
36
|
+
// Check for common transient error status codes either in message or a status property
|
|
37
|
+
if (error && typeof (error as { status?: number }).status === 'number') {
|
|
38
|
+
const status = (error as { status: number }).status;
|
|
39
|
+
if (status === 429 || (status >= 500 && status < 600)) {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (error instanceof Error && error.message) {
|
|
44
|
+
if (error.message.includes('429')) return true;
|
|
45
|
+
if (error.message.match(/5\d{2}/)) return true;
|
|
46
|
+
}
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Delays execution for a specified number of milliseconds.
|
|
52
|
+
* @param ms The number of milliseconds to delay.
|
|
53
|
+
* @returns A promise that resolves after the delay.
|
|
54
|
+
*/
|
|
55
|
+
function delay(ms: number): Promise<void> {
|
|
56
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Retries a function with exponential backoff and jitter.
|
|
61
|
+
* @param fn The asynchronous function to retry.
|
|
62
|
+
* @param options Optional retry configuration.
|
|
63
|
+
* @returns A promise that resolves with the result of the function if successful.
|
|
64
|
+
* @throws The last error encountered if all attempts fail.
|
|
65
|
+
*/
|
|
66
|
+
export async function retryWithBackoff<T>(
|
|
67
|
+
fn: () => Promise<T>,
|
|
68
|
+
options?: Partial<RetryOptions>,
|
|
69
|
+
): Promise<T> {
|
|
70
|
+
if (options?.maxAttempts !== undefined && options.maxAttempts <= 0) {
|
|
71
|
+
throw new Error('maxAttempts must be a positive number.');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const cleanOptions = options
|
|
75
|
+
? Object.fromEntries(Object.entries(options).filter(([_, v]) => v != null))
|
|
76
|
+
: {};
|
|
77
|
+
|
|
78
|
+
const {
|
|
79
|
+
maxAttempts,
|
|
80
|
+
initialDelayMs,
|
|
81
|
+
maxDelayMs,
|
|
82
|
+
shouldRetryOnError,
|
|
83
|
+
shouldRetryOnContent,
|
|
84
|
+
} = {
|
|
85
|
+
...DEFAULT_RETRY_OPTIONS,
|
|
86
|
+
...cleanOptions,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
let attempt = 0;
|
|
90
|
+
let currentDelay = initialDelayMs;
|
|
91
|
+
|
|
92
|
+
while (attempt < maxAttempts) {
|
|
93
|
+
attempt++;
|
|
94
|
+
try {
|
|
95
|
+
const result = await fn();
|
|
96
|
+
|
|
97
|
+
if (
|
|
98
|
+
shouldRetryOnContent &&
|
|
99
|
+
shouldRetryOnContent(result as GenerateContentResponse)
|
|
100
|
+
) {
|
|
101
|
+
const jitter = currentDelay * 0.3 * (Math.random() * 2 - 1);
|
|
102
|
+
const delayWithJitter = Math.max(0, currentDelay + jitter);
|
|
103
|
+
await delay(delayWithJitter);
|
|
104
|
+
currentDelay = Math.min(maxDelayMs, currentDelay * 2);
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return result;
|
|
109
|
+
} catch (error) {
|
|
110
|
+
// Check if we've exhausted retries or shouldn't retry
|
|
111
|
+
if (attempt >= maxAttempts || !shouldRetryOnError(error as Error)) {
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const { delayDurationMs, errorStatus: delayErrorStatus } =
|
|
116
|
+
getDelayDurationAndStatus(error);
|
|
117
|
+
|
|
118
|
+
if (delayDurationMs > 0) {
|
|
119
|
+
// Respect Retry-After header if present and parsed
|
|
120
|
+
console.warn(
|
|
121
|
+
`Attempt ${attempt} failed with status ${delayErrorStatus ?? 'unknown'}. Retrying after explicit delay of ${delayDurationMs}ms...`,
|
|
122
|
+
error,
|
|
123
|
+
);
|
|
124
|
+
await delay(delayDurationMs);
|
|
125
|
+
// Reset currentDelay for next potential non-429 error, or if Retry-After is not present next time
|
|
126
|
+
currentDelay = initialDelayMs;
|
|
127
|
+
} else {
|
|
128
|
+
// Fall back to exponential backoff with jitter
|
|
129
|
+
const errorStatus = getErrorStatus(error);
|
|
130
|
+
logRetryAttempt(attempt, error, errorStatus);
|
|
131
|
+
// Add jitter: +/- 30% of currentDelay
|
|
132
|
+
const jitter = currentDelay * 0.3 * (Math.random() * 2 - 1);
|
|
133
|
+
const delayWithJitter = Math.max(0, currentDelay + jitter);
|
|
134
|
+
await delay(delayWithJitter);
|
|
135
|
+
currentDelay = Math.min(maxDelayMs, currentDelay * 2);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// This line should theoretically be unreachable due to the throw in the catch block.
|
|
140
|
+
// Added for type safety and to satisfy the compiler that a promise is always returned.
|
|
141
|
+
throw new Error('Retry attempts exhausted');
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Extracts the HTTP status code from an error object.
|
|
146
|
+
* @param error The error object.
|
|
147
|
+
* @returns The HTTP status code, or undefined if not found.
|
|
148
|
+
*/
|
|
149
|
+
export function getErrorStatus(error: unknown): number | undefined {
|
|
150
|
+
if (typeof error === 'object' && error !== null) {
|
|
151
|
+
if ('status' in error && typeof error.status === 'number') {
|
|
152
|
+
return error.status;
|
|
153
|
+
}
|
|
154
|
+
// Check for error.response.status (common in axios errors)
|
|
155
|
+
if (
|
|
156
|
+
'response' in error &&
|
|
157
|
+
typeof (error as { response?: unknown }).response === 'object' &&
|
|
158
|
+
(error as { response?: unknown }).response !== null
|
|
159
|
+
) {
|
|
160
|
+
const response = (
|
|
161
|
+
error as { response: { status?: unknown; headers?: unknown } }
|
|
162
|
+
).response;
|
|
163
|
+
if ('status' in response && typeof response.status === 'number') {
|
|
164
|
+
return response.status;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return undefined;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Extracts the Retry-After delay from an error object's headers.
|
|
173
|
+
* @param error The error object.
|
|
174
|
+
* @returns The delay in milliseconds, or 0 if not found or invalid.
|
|
175
|
+
*/
|
|
176
|
+
function getRetryAfterDelayMs(error: unknown): number {
|
|
177
|
+
if (typeof error === 'object' && error !== null) {
|
|
178
|
+
// Check for error.response.headers (common in axios errors)
|
|
179
|
+
if (
|
|
180
|
+
'response' in error &&
|
|
181
|
+
typeof (error as { response?: unknown }).response === 'object' &&
|
|
182
|
+
(error as { response?: unknown }).response !== null
|
|
183
|
+
) {
|
|
184
|
+
const response = (error as { response: { headers?: unknown } }).response;
|
|
185
|
+
if (
|
|
186
|
+
'headers' in response &&
|
|
187
|
+
typeof response.headers === 'object' &&
|
|
188
|
+
response.headers !== null
|
|
189
|
+
) {
|
|
190
|
+
const headers = response.headers as { 'retry-after'?: unknown };
|
|
191
|
+
const retryAfterHeader = headers['retry-after'];
|
|
192
|
+
if (typeof retryAfterHeader === 'string') {
|
|
193
|
+
const retryAfterSeconds = parseInt(retryAfterHeader, 10);
|
|
194
|
+
if (!isNaN(retryAfterSeconds)) {
|
|
195
|
+
return retryAfterSeconds * 1000;
|
|
196
|
+
}
|
|
197
|
+
// It might be an HTTP date
|
|
198
|
+
const retryAfterDate = new Date(retryAfterHeader);
|
|
199
|
+
if (!isNaN(retryAfterDate.getTime())) {
|
|
200
|
+
return Math.max(0, retryAfterDate.getTime() - Date.now());
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return 0;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Determines the delay duration based on the error, prioritizing Retry-After header.
|
|
211
|
+
* @param error The error object.
|
|
212
|
+
* @returns An object containing the delay duration in milliseconds and the error status.
|
|
213
|
+
*/
|
|
214
|
+
function getDelayDurationAndStatus(error: unknown): {
|
|
215
|
+
delayDurationMs: number;
|
|
216
|
+
errorStatus: number | undefined;
|
|
217
|
+
} {
|
|
218
|
+
const errorStatus = getErrorStatus(error);
|
|
219
|
+
let delayDurationMs = 0;
|
|
220
|
+
|
|
221
|
+
if (errorStatus === 429) {
|
|
222
|
+
delayDurationMs = getRetryAfterDelayMs(error);
|
|
223
|
+
}
|
|
224
|
+
return { delayDurationMs, errorStatus };
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Logs a message for a retry attempt when using exponential backoff.
|
|
229
|
+
* @param attempt The current attempt number.
|
|
230
|
+
* @param error The error that caused the retry.
|
|
231
|
+
* @param errorStatus The HTTP status code of the error, if available.
|
|
232
|
+
*/
|
|
233
|
+
function logRetryAttempt(
|
|
234
|
+
attempt: number,
|
|
235
|
+
error: unknown,
|
|
236
|
+
errorStatus?: number,
|
|
237
|
+
): void {
|
|
238
|
+
let message = `Attempt ${attempt} failed. Retrying with backoff...`;
|
|
239
|
+
if (errorStatus) {
|
|
240
|
+
message = `Attempt ${attempt} failed with status ${errorStatus}. Retrying with backoff...`;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (errorStatus === 429) {
|
|
244
|
+
console.warn(message, error);
|
|
245
|
+
} else if (errorStatus && errorStatus >= 500 && errorStatus < 600) {
|
|
246
|
+
console.error(message, error);
|
|
247
|
+
} else if (error instanceof Error) {
|
|
248
|
+
// Fallback for errors that might not have a status but have a message
|
|
249
|
+
if (error.message.includes('429')) {
|
|
250
|
+
console.warn(
|
|
251
|
+
`Attempt ${attempt} failed with 429 error (no Retry-After header). Retrying with backoff...`,
|
|
252
|
+
error,
|
|
253
|
+
);
|
|
254
|
+
} else if (error.message.match(/5\d{2}/)) {
|
|
255
|
+
console.error(
|
|
256
|
+
`Attempt ${attempt} failed with 5xx error. Retrying with backoff...`,
|
|
257
|
+
error,
|
|
258
|
+
);
|
|
259
|
+
} else {
|
|
260
|
+
console.warn(message, error); // Default to warn for other errors
|
|
261
|
+
}
|
|
262
|
+
} else {
|
|
263
|
+
console.warn(message, error); // Default to warn if error type is unknown
|
|
264
|
+
}
|
|
265
|
+
}
|