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,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Export config
|
|
8
|
+
export * from './config/config';
|
|
9
|
+
|
|
10
|
+
// Export Core Logic
|
|
11
|
+
export * from './core/contentGenerator';
|
|
12
|
+
export * from './core/geminiChat';
|
|
13
|
+
export * from './core/prompts';
|
|
14
|
+
export * from './core/tokenLimits';
|
|
15
|
+
export * from './core/geminiRequest';
|
|
16
|
+
|
|
17
|
+
export * from './code_assist/codeAssist';
|
|
18
|
+
export * from './code_assist/oauth2';
|
|
19
|
+
export * from './code_assist/server';
|
|
20
|
+
export * from './code_assist/types';
|
|
21
|
+
|
|
22
|
+
// Export utilities
|
|
23
|
+
export * from './utils/errors';
|
|
24
|
+
export * from './utils/quotaErrorDetection';
|
|
25
|
+
export * from './utils/retry';
|
|
26
|
+
export * from './utils/partUtils';
|
|
27
|
+
export { sessionId } from './utils/session';
|
|
28
|
+
export { Storage } from './config/storage';
|
|
29
|
+
export * from './utils/userAccountManager';
|
|
30
|
+
|
|
31
|
+
// MCP token storage for auth
|
|
32
|
+
export type {
|
|
33
|
+
OAuthToken,
|
|
34
|
+
OAuthCredentials,
|
|
35
|
+
} from './mcp/token-storage/types';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { TokenStorage, OAuthCredentials } from './types';
|
|
8
|
+
|
|
9
|
+
export abstract class BaseTokenStorage implements TokenStorage {
|
|
10
|
+
protected readonly serviceName: string;
|
|
11
|
+
|
|
12
|
+
constructor(serviceName: string) {
|
|
13
|
+
this.serviceName = serviceName;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
abstract getCredentials(serverName: string): Promise<OAuthCredentials | null>;
|
|
17
|
+
abstract setCredentials(credentials: OAuthCredentials): Promise<void>;
|
|
18
|
+
abstract deleteCredentials(serverName: string): Promise<void>;
|
|
19
|
+
abstract listServers(): Promise<string[]>;
|
|
20
|
+
abstract getAllCredentials(): Promise<Map<string, OAuthCredentials>>;
|
|
21
|
+
abstract clearAll(): Promise<void>;
|
|
22
|
+
|
|
23
|
+
protected validateCredentials(credentials: OAuthCredentials): void {
|
|
24
|
+
if (!credentials.serverName) {
|
|
25
|
+
throw new Error('Server name is required');
|
|
26
|
+
}
|
|
27
|
+
if (!credentials.token) {
|
|
28
|
+
throw new Error('Token is required');
|
|
29
|
+
}
|
|
30
|
+
if (!credentials.token.accessToken) {
|
|
31
|
+
throw new Error('Access token is required');
|
|
32
|
+
}
|
|
33
|
+
if (!credentials.token.tokenType) {
|
|
34
|
+
throw new Error('Token type is required');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
protected isTokenExpired(credentials: OAuthCredentials): boolean {
|
|
39
|
+
if (!credentials.token.expiresAt) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
const bufferMs = 5 * 60 * 1000;
|
|
43
|
+
return Date.now() > credentials.token.expiresAt - bufferMs;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
protected sanitizeServerName(serverName: string): string {
|
|
47
|
+
return serverName.replace(/[^a-zA-Z0-9-_.]/g, '_');
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { promises as fs } from 'node:fs';
|
|
8
|
+
import * as path from 'node:path';
|
|
9
|
+
import * as os from 'node:os';
|
|
10
|
+
import * as crypto from 'node:crypto';
|
|
11
|
+
import { BaseTokenStorage } from './base-token-storage';
|
|
12
|
+
import type { OAuthCredentials } from './types';
|
|
13
|
+
|
|
14
|
+
export class FileTokenStorage extends BaseTokenStorage {
|
|
15
|
+
private readonly tokenFilePath: string;
|
|
16
|
+
private readonly encryptionKey: Buffer;
|
|
17
|
+
|
|
18
|
+
constructor(serviceName: string) {
|
|
19
|
+
super(serviceName);
|
|
20
|
+
const configDir = path.join(os.homedir(), '.gemini');
|
|
21
|
+
this.tokenFilePath = path.join(configDir, 'mcp-oauth-tokens-v2.json');
|
|
22
|
+
this.encryptionKey = this.deriveEncryptionKey();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
private deriveEncryptionKey(): Buffer {
|
|
26
|
+
const salt = `${os.hostname()}-${os.userInfo().username}-gemini-cli`;
|
|
27
|
+
return crypto.scryptSync('gemini-cli-oauth', salt, 32);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
private encrypt(text: string): string {
|
|
31
|
+
const iv = crypto.randomBytes(16);
|
|
32
|
+
const cipher = crypto.createCipheriv('aes-256-gcm', this.encryptionKey, iv);
|
|
33
|
+
|
|
34
|
+
let encrypted = cipher.update(text, 'utf8', 'hex');
|
|
35
|
+
encrypted += cipher.final('hex');
|
|
36
|
+
|
|
37
|
+
const authTag = cipher.getAuthTag();
|
|
38
|
+
|
|
39
|
+
return iv.toString('hex') + ':' + authTag.toString('hex') + ':' + encrypted;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
private decrypt(encryptedData: string): string {
|
|
43
|
+
const parts = encryptedData.split(':');
|
|
44
|
+
if (parts.length !== 3) {
|
|
45
|
+
throw new Error('Invalid encrypted data format');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const iv = Buffer.from(parts[0], 'hex');
|
|
49
|
+
const authTag = Buffer.from(parts[1], 'hex');
|
|
50
|
+
const encrypted = parts[2];
|
|
51
|
+
|
|
52
|
+
const decipher = crypto.createDecipheriv(
|
|
53
|
+
'aes-256-gcm',
|
|
54
|
+
this.encryptionKey,
|
|
55
|
+
iv,
|
|
56
|
+
);
|
|
57
|
+
decipher.setAuthTag(authTag);
|
|
58
|
+
|
|
59
|
+
let decrypted = decipher.update(encrypted, 'hex', 'utf8');
|
|
60
|
+
decrypted += decipher.final('utf8');
|
|
61
|
+
|
|
62
|
+
return decrypted;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
private async ensureDirectoryExists(): Promise<void> {
|
|
66
|
+
const dir = path.dirname(this.tokenFilePath);
|
|
67
|
+
await fs.mkdir(dir, { recursive: true, mode: 0o700 });
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private async loadTokens(): Promise<Map<string, OAuthCredentials>> {
|
|
71
|
+
try {
|
|
72
|
+
const data = await fs.readFile(this.tokenFilePath, 'utf-8');
|
|
73
|
+
const decrypted = this.decrypt(data);
|
|
74
|
+
const tokens = JSON.parse(decrypted) as Record<string, OAuthCredentials>;
|
|
75
|
+
return new Map(Object.entries(tokens));
|
|
76
|
+
} catch (error: unknown) {
|
|
77
|
+
const err = error as NodeJS.ErrnoException & { message?: string };
|
|
78
|
+
if (err.code === 'ENOENT') {
|
|
79
|
+
throw new Error('Token file does not exist');
|
|
80
|
+
}
|
|
81
|
+
if (
|
|
82
|
+
err.message?.includes('Invalid encrypted data format') ||
|
|
83
|
+
err.message?.includes(
|
|
84
|
+
'Unsupported state or unable to authenticate data',
|
|
85
|
+
)
|
|
86
|
+
) {
|
|
87
|
+
throw new Error('Token file corrupted');
|
|
88
|
+
}
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
private async saveTokens(
|
|
94
|
+
tokens: Map<string, OAuthCredentials>,
|
|
95
|
+
): Promise<void> {
|
|
96
|
+
await this.ensureDirectoryExists();
|
|
97
|
+
|
|
98
|
+
const data = Object.fromEntries(tokens);
|
|
99
|
+
const json = JSON.stringify(data, null, 2);
|
|
100
|
+
const encrypted = this.encrypt(json);
|
|
101
|
+
|
|
102
|
+
await fs.writeFile(this.tokenFilePath, encrypted, { mode: 0o600 });
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
async getCredentials(serverName: string): Promise<OAuthCredentials | null> {
|
|
106
|
+
const tokens = await this.loadTokens();
|
|
107
|
+
const credentials = tokens.get(serverName);
|
|
108
|
+
|
|
109
|
+
if (!credentials) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (this.isTokenExpired(credentials)) {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return credentials;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
async setCredentials(credentials: OAuthCredentials): Promise<void> {
|
|
121
|
+
this.validateCredentials(credentials);
|
|
122
|
+
|
|
123
|
+
const tokens = await this.loadTokens();
|
|
124
|
+
const updatedCredentials: OAuthCredentials = {
|
|
125
|
+
...credentials,
|
|
126
|
+
updatedAt: Date.now(),
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
tokens.set(credentials.serverName, updatedCredentials);
|
|
130
|
+
await this.saveTokens(tokens);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
async deleteCredentials(serverName: string): Promise<void> {
|
|
134
|
+
const tokens = await this.loadTokens();
|
|
135
|
+
|
|
136
|
+
if (!tokens.has(serverName)) {
|
|
137
|
+
throw new Error(`No credentials found for ${serverName}`);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
tokens.delete(serverName);
|
|
141
|
+
|
|
142
|
+
if (tokens.size === 0) {
|
|
143
|
+
try {
|
|
144
|
+
await fs.unlink(this.tokenFilePath);
|
|
145
|
+
} catch (error: unknown) {
|
|
146
|
+
const err = error as NodeJS.ErrnoException;
|
|
147
|
+
if (err.code !== 'ENOENT') {
|
|
148
|
+
throw error;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
} else {
|
|
152
|
+
await this.saveTokens(tokens);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
async listServers(): Promise<string[]> {
|
|
157
|
+
const tokens = await this.loadTokens();
|
|
158
|
+
return Array.from(tokens.keys());
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
async getAllCredentials(): Promise<Map<string, OAuthCredentials>> {
|
|
162
|
+
const tokens = await this.loadTokens();
|
|
163
|
+
const result = new Map<string, OAuthCredentials>();
|
|
164
|
+
|
|
165
|
+
for (const [serverName, credentials] of tokens) {
|
|
166
|
+
if (!this.isTokenExpired(credentials)) {
|
|
167
|
+
result.set(serverName, credentials);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return result;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
async clearAll(): Promise<void> {
|
|
175
|
+
try {
|
|
176
|
+
await fs.unlink(this.tokenFilePath);
|
|
177
|
+
} catch (error: unknown) {
|
|
178
|
+
const err = error as NodeJS.ErrnoException;
|
|
179
|
+
if (err.code !== 'ENOENT') {
|
|
180
|
+
throw error;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { BaseTokenStorage } from './base-token-storage';
|
|
8
|
+
import { FileTokenStorage } from './file-token-storage';
|
|
9
|
+
import type { TokenStorage, OAuthCredentials } from './types';
|
|
10
|
+
import { TokenStorageType } from './types';
|
|
11
|
+
|
|
12
|
+
const FORCE_FILE_STORAGE_ENV_VAR = 'GEMINI_FORCE_FILE_STORAGE';
|
|
13
|
+
|
|
14
|
+
export class HybridTokenStorage extends BaseTokenStorage {
|
|
15
|
+
private storage: TokenStorage | null = null;
|
|
16
|
+
private storageType: TokenStorageType | null = null;
|
|
17
|
+
private storageInitPromise: Promise<TokenStorage> | null = null;
|
|
18
|
+
|
|
19
|
+
constructor(serviceName: string) {
|
|
20
|
+
super(serviceName);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
private async initializeStorage(): Promise<TokenStorage> {
|
|
24
|
+
const forceFileStorage = process.env[FORCE_FILE_STORAGE_ENV_VAR] === 'true';
|
|
25
|
+
|
|
26
|
+
if (!forceFileStorage) {
|
|
27
|
+
try {
|
|
28
|
+
const { KeychainTokenStorage } = await import(
|
|
29
|
+
'./keychain-token-storage'
|
|
30
|
+
);
|
|
31
|
+
const keychainStorage = new KeychainTokenStorage(this.serviceName);
|
|
32
|
+
|
|
33
|
+
const isAvailable = await keychainStorage.isAvailable();
|
|
34
|
+
if (isAvailable) {
|
|
35
|
+
this.storage = keychainStorage;
|
|
36
|
+
this.storageType = TokenStorageType.KEYCHAIN;
|
|
37
|
+
return this.storage;
|
|
38
|
+
}
|
|
39
|
+
} catch (_e) {
|
|
40
|
+
// Fallback to file storage if keychain fails to initialize
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
this.storage = new FileTokenStorage(this.serviceName);
|
|
45
|
+
this.storageType = TokenStorageType.ENCRYPTED_FILE;
|
|
46
|
+
return this.storage;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
private async getStorage(): Promise<TokenStorage> {
|
|
50
|
+
if (this.storage !== null) {
|
|
51
|
+
return this.storage;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Use a single initialization promise to avoid race conditions
|
|
55
|
+
if (!this.storageInitPromise) {
|
|
56
|
+
this.storageInitPromise = this.initializeStorage();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Wait for initialization to complete
|
|
60
|
+
return await this.storageInitPromise;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async getCredentials(serverName: string): Promise<OAuthCredentials | null> {
|
|
64
|
+
const storage = await this.getStorage();
|
|
65
|
+
return storage.getCredentials(serverName);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async setCredentials(credentials: OAuthCredentials): Promise<void> {
|
|
69
|
+
const storage = await this.getStorage();
|
|
70
|
+
await storage.setCredentials(credentials);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async deleteCredentials(serverName: string): Promise<void> {
|
|
74
|
+
const storage = await this.getStorage();
|
|
75
|
+
await storage.deleteCredentials(serverName);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
async listServers(): Promise<string[]> {
|
|
79
|
+
const storage = await this.getStorage();
|
|
80
|
+
return storage.listServers();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
async getAllCredentials(): Promise<Map<string, OAuthCredentials>> {
|
|
84
|
+
const storage = await this.getStorage();
|
|
85
|
+
return storage.getAllCredentials();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
async clearAll(): Promise<void> {
|
|
89
|
+
const storage = await this.getStorage();
|
|
90
|
+
await storage.clearAll();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
async getStorageType(): Promise<TokenStorageType> {
|
|
94
|
+
await this.getStorage();
|
|
95
|
+
return this.storageType!;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export * from './types';
|
|
8
|
+
export * from './base-token-storage';
|
|
9
|
+
export * from './file-token-storage';
|
|
10
|
+
export * from './hybrid-token-storage';
|
|
11
|
+
|
|
12
|
+
export const DEFAULT_SERVICE_NAME = 'gemini-cli-oauth';
|
|
13
|
+
export const FORCE_ENCRYPTED_FILE_ENV_VAR =
|
|
14
|
+
'GEMINI_FORCE_ENCRYPTED_FILE_STORAGE';
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as crypto from 'node:crypto';
|
|
8
|
+
import { BaseTokenStorage } from './base-token-storage';
|
|
9
|
+
import type { OAuthCredentials } from './types';
|
|
10
|
+
|
|
11
|
+
interface Keytar {
|
|
12
|
+
getPassword(service: string, account: string): Promise<string | null>;
|
|
13
|
+
setPassword(
|
|
14
|
+
service: string,
|
|
15
|
+
account: string,
|
|
16
|
+
password: string,
|
|
17
|
+
): Promise<void>;
|
|
18
|
+
deletePassword(service: string, account: string): Promise<boolean>;
|
|
19
|
+
findCredentials(
|
|
20
|
+
service: string,
|
|
21
|
+
): Promise<Array<{ account: string; password: string }>>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const KEYCHAIN_TEST_PREFIX = '__keychain_test__';
|
|
25
|
+
|
|
26
|
+
export class KeychainTokenStorage extends BaseTokenStorage {
|
|
27
|
+
private keychainAvailable: boolean | null = null;
|
|
28
|
+
private keytarModule: Keytar | null = null;
|
|
29
|
+
private keytarLoadAttempted = false;
|
|
30
|
+
|
|
31
|
+
async getKeytar(): Promise<Keytar | null> {
|
|
32
|
+
// If we've already tried loading (successfully or not), return the result
|
|
33
|
+
if (this.keytarLoadAttempted) {
|
|
34
|
+
return this.keytarModule;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
this.keytarLoadAttempted = true;
|
|
38
|
+
|
|
39
|
+
try {
|
|
40
|
+
// Try to import keytar without any timeout - let the OS handle it
|
|
41
|
+
const moduleName = 'keytar';
|
|
42
|
+
const module = await import(moduleName);
|
|
43
|
+
this.keytarModule = module.default || module;
|
|
44
|
+
} catch (error) {
|
|
45
|
+
console.error(error);
|
|
46
|
+
}
|
|
47
|
+
return this.keytarModule;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async getCredentials(serverName: string): Promise<OAuthCredentials | null> {
|
|
51
|
+
if (!(await this.checkKeychainAvailability())) {
|
|
52
|
+
throw new Error('Keychain is not available');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const keytar = await this.getKeytar();
|
|
56
|
+
if (!keytar) {
|
|
57
|
+
throw new Error('Keytar module not available');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
try {
|
|
61
|
+
const sanitizedName = this.sanitizeServerName(serverName);
|
|
62
|
+
const data = await keytar.getPassword(this.serviceName, sanitizedName);
|
|
63
|
+
|
|
64
|
+
if (!data) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const credentials = JSON.parse(data) as OAuthCredentials;
|
|
69
|
+
|
|
70
|
+
if (this.isTokenExpired(credentials)) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return credentials;
|
|
75
|
+
} catch (error) {
|
|
76
|
+
if (error instanceof SyntaxError) {
|
|
77
|
+
throw new Error(`Failed to parse stored credentials for ${serverName}`);
|
|
78
|
+
}
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
async setCredentials(credentials: OAuthCredentials): Promise<void> {
|
|
84
|
+
if (!(await this.checkKeychainAvailability())) {
|
|
85
|
+
throw new Error('Keychain is not available');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const keytar = await this.getKeytar();
|
|
89
|
+
if (!keytar) {
|
|
90
|
+
throw new Error('Keytar module not available');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
this.validateCredentials(credentials);
|
|
94
|
+
|
|
95
|
+
const sanitizedName = this.sanitizeServerName(credentials.serverName);
|
|
96
|
+
const updatedCredentials: OAuthCredentials = {
|
|
97
|
+
...credentials,
|
|
98
|
+
updatedAt: Date.now(),
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const data = JSON.stringify(updatedCredentials);
|
|
102
|
+
await keytar.setPassword(this.serviceName, sanitizedName, data);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
async deleteCredentials(serverName: string): Promise<void> {
|
|
106
|
+
if (!(await this.checkKeychainAvailability())) {
|
|
107
|
+
throw new Error('Keychain is not available');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const keytar = await this.getKeytar();
|
|
111
|
+
if (!keytar) {
|
|
112
|
+
throw new Error('Keytar module not available');
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const sanitizedName = this.sanitizeServerName(serverName);
|
|
116
|
+
const deleted = await keytar.deletePassword(
|
|
117
|
+
this.serviceName,
|
|
118
|
+
sanitizedName,
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
if (!deleted) {
|
|
122
|
+
throw new Error(`No credentials found for ${serverName}`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
async listServers(): Promise<string[]> {
|
|
127
|
+
if (!(await this.checkKeychainAvailability())) {
|
|
128
|
+
throw new Error('Keychain is not available');
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const keytar = await this.getKeytar();
|
|
132
|
+
if (!keytar) {
|
|
133
|
+
throw new Error('Keytar module not available');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
try {
|
|
137
|
+
const credentials = await keytar.findCredentials(this.serviceName);
|
|
138
|
+
return credentials
|
|
139
|
+
.filter((cred) => !cred.account.startsWith(KEYCHAIN_TEST_PREFIX))
|
|
140
|
+
.map((cred: { account: string }) => cred.account);
|
|
141
|
+
} catch (error) {
|
|
142
|
+
console.error('Failed to list servers from keychain:', error);
|
|
143
|
+
return [];
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
async getAllCredentials(): Promise<Map<string, OAuthCredentials>> {
|
|
148
|
+
if (!(await this.checkKeychainAvailability())) {
|
|
149
|
+
throw new Error('Keychain is not available');
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const keytar = await this.getKeytar();
|
|
153
|
+
if (!keytar) {
|
|
154
|
+
throw new Error('Keytar module not available');
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const result = new Map<string, OAuthCredentials>();
|
|
158
|
+
try {
|
|
159
|
+
const credentials = (
|
|
160
|
+
await keytar.findCredentials(this.serviceName)
|
|
161
|
+
).filter((c) => !c.account.startsWith(KEYCHAIN_TEST_PREFIX));
|
|
162
|
+
|
|
163
|
+
for (const cred of credentials) {
|
|
164
|
+
try {
|
|
165
|
+
const data = JSON.parse(cred.password) as OAuthCredentials;
|
|
166
|
+
if (!this.isTokenExpired(data)) {
|
|
167
|
+
result.set(cred.account, data);
|
|
168
|
+
}
|
|
169
|
+
} catch (error) {
|
|
170
|
+
console.error(
|
|
171
|
+
`Failed to parse credentials for ${cred.account}:`,
|
|
172
|
+
error,
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
} catch (error) {
|
|
177
|
+
console.error('Failed to get all credentials from keychain:', error);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return result;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
async clearAll(): Promise<void> {
|
|
184
|
+
if (!(await this.checkKeychainAvailability())) {
|
|
185
|
+
throw new Error('Keychain is not available');
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const servers = this.keytarModule
|
|
189
|
+
? await this.keytarModule
|
|
190
|
+
.findCredentials(this.serviceName)
|
|
191
|
+
.then((creds) => creds.map((c) => c.account))
|
|
192
|
+
.catch((error: Error) => {
|
|
193
|
+
throw new Error(
|
|
194
|
+
`Failed to list servers for clearing: ${error.message}`,
|
|
195
|
+
);
|
|
196
|
+
})
|
|
197
|
+
: [];
|
|
198
|
+
const errors: Error[] = [];
|
|
199
|
+
|
|
200
|
+
for (const server of servers) {
|
|
201
|
+
try {
|
|
202
|
+
await this.deleteCredentials(server);
|
|
203
|
+
} catch (error) {
|
|
204
|
+
errors.push(error as Error);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
if (errors.length > 0) {
|
|
209
|
+
throw new Error(
|
|
210
|
+
`Failed to clear some credentials: ${errors.map((e) => e.message).join(', ')}`,
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Checks whether or not a set-get-delete cycle with the keychain works.
|
|
216
|
+
// Returns false if any operation fails.
|
|
217
|
+
async checkKeychainAvailability(): Promise<boolean> {
|
|
218
|
+
if (this.keychainAvailable !== null) {
|
|
219
|
+
return this.keychainAvailable;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
try {
|
|
223
|
+
const keytar = await this.getKeytar();
|
|
224
|
+
if (!keytar) {
|
|
225
|
+
this.keychainAvailable = false;
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const testAccount = `${KEYCHAIN_TEST_PREFIX}${crypto.randomBytes(8).toString('hex')}`;
|
|
230
|
+
const testPassword = 'test';
|
|
231
|
+
|
|
232
|
+
await keytar.setPassword(this.serviceName, testAccount, testPassword);
|
|
233
|
+
const retrieved = await keytar.getPassword(this.serviceName, testAccount);
|
|
234
|
+
const deleted = await keytar.deletePassword(
|
|
235
|
+
this.serviceName,
|
|
236
|
+
testAccount,
|
|
237
|
+
);
|
|
238
|
+
|
|
239
|
+
const success = deleted && retrieved === testPassword;
|
|
240
|
+
this.keychainAvailable = success;
|
|
241
|
+
return success;
|
|
242
|
+
} catch (_error) {
|
|
243
|
+
this.keychainAvailable = false;
|
|
244
|
+
return false;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
async isAvailable(): Promise<boolean> {
|
|
249
|
+
return this.checkKeychainAvailability();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Interface for OAuth tokens.
|
|
9
|
+
*/
|
|
10
|
+
export interface OAuthToken {
|
|
11
|
+
accessToken: string;
|
|
12
|
+
refreshToken?: string;
|
|
13
|
+
expiresAt?: number;
|
|
14
|
+
tokenType: string;
|
|
15
|
+
scope?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Interface for stored OAuth credentials.
|
|
20
|
+
*/
|
|
21
|
+
export interface OAuthCredentials {
|
|
22
|
+
serverName: string;
|
|
23
|
+
token: OAuthToken;
|
|
24
|
+
clientId?: string;
|
|
25
|
+
tokenUrl?: string;
|
|
26
|
+
mcpServerUrl?: string;
|
|
27
|
+
updatedAt: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface TokenStorage {
|
|
31
|
+
getCredentials(serverName: string): Promise<OAuthCredentials | null>;
|
|
32
|
+
setCredentials(credentials: OAuthCredentials): Promise<void>;
|
|
33
|
+
deleteCredentials(serverName: string): Promise<void>;
|
|
34
|
+
listServers(): Promise<string[]>;
|
|
35
|
+
getAllCredentials(): Promise<Map<string, OAuthCredentials>>;
|
|
36
|
+
clearAll(): Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export enum TokenStorageType {
|
|
40
|
+
KEYCHAIN = 'keychain',
|
|
41
|
+
ENCRYPTED_FILE = 'encrypted_file',
|
|
42
|
+
}
|