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,120 @@
|
|
|
1
|
+
import { randomUUID } from 'crypto';
|
|
2
|
+
import {
|
|
3
|
+
Content,
|
|
4
|
+
GenerateContentConfig,
|
|
5
|
+
GenerateContentResponse,
|
|
6
|
+
} from '@google/genai';
|
|
7
|
+
import { AuthType, Config, GeminiChat, StreamEventType } from '../src';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A helper function to extract the text content from a streaming response chunk.
|
|
11
|
+
* The Gemini API streams responses, and this function helps aggregate the text.
|
|
12
|
+
* @param response A GenerateContentResponse chunk from the stream.
|
|
13
|
+
* @returns The text content of the chunk, or null if there is none.
|
|
14
|
+
*/
|
|
15
|
+
function getResponseText(response: GenerateContentResponse): string | null {
|
|
16
|
+
if (response.candidates && response.candidates.length > 0) {
|
|
17
|
+
const candidate = response.candidates[0];
|
|
18
|
+
|
|
19
|
+
if (
|
|
20
|
+
candidate.content &&
|
|
21
|
+
candidate.content.parts &&
|
|
22
|
+
candidate.content.parts.length > 0
|
|
23
|
+
) {
|
|
24
|
+
return candidate.content.parts
|
|
25
|
+
.filter((part: any) => part.text)
|
|
26
|
+
.map((part: any) => part.text)
|
|
27
|
+
.join('');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async function main() {
|
|
34
|
+
console.log('--- Gemini Chat API Example (with Google Login) ---');
|
|
35
|
+
|
|
36
|
+
// 1. Set up for Google Login
|
|
37
|
+
// For this example, we'll authenticate using your Google account.
|
|
38
|
+
// The first time you run this, a browser window will open for you to log in.
|
|
39
|
+
// Your credentials will be cached for future runs in `~/.gemini/`.
|
|
40
|
+
console.log('✓ Using Google Login for authentication.');
|
|
41
|
+
|
|
42
|
+
// 2. Create a Configuration Object
|
|
43
|
+
// The Config object holds settings for the session. For this example,
|
|
44
|
+
// we provide a few essential parameters.
|
|
45
|
+
const config = new Config({
|
|
46
|
+
sessionId: `session-${randomUUID()}`,
|
|
47
|
+
model: 'gemini-2.5-pro', // A default model for the session
|
|
48
|
+
});
|
|
49
|
+
console.log('✓ Configuration created.');
|
|
50
|
+
|
|
51
|
+
// 3. Authenticate and Prepare the API Client (ContentGenerator)
|
|
52
|
+
// The GeminiChat class relies on a `ContentGenerator` instance being available
|
|
53
|
+
// on the Config object to make API calls. `refreshAuth` sets this up.
|
|
54
|
+
try {
|
|
55
|
+
// This will trigger the OAuth2 flow in the browser on the first run.
|
|
56
|
+
await config.refreshAuth(AuthType.LOGIN_WITH_GOOGLE);
|
|
57
|
+
} catch (e) {
|
|
58
|
+
console.error('Authentication failed:', e);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
console.log('✓ Authenticated with your Google account.');
|
|
62
|
+
|
|
63
|
+
// 4. Define System Instruction and Conversation History
|
|
64
|
+
const systemInstruction =
|
|
65
|
+
'You are a poetic assistant. All your responses must be in the form of a haiku.';
|
|
66
|
+
|
|
67
|
+
const initialHistory: Content[] = [
|
|
68
|
+
{ role: 'user', parts: [{ text: 'What is the largest mammal?' }] },
|
|
69
|
+
{
|
|
70
|
+
role: 'model',
|
|
71
|
+
parts: [
|
|
72
|
+
{
|
|
73
|
+
text: "Giant blue whale swims,\nOcean's gentle, massive king,\nLargest on the Earth.",
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
|
|
79
|
+
const generationConfig: GenerateContentConfig = {
|
|
80
|
+
systemInstruction,
|
|
81
|
+
temperature: 0.7,
|
|
82
|
+
};
|
|
83
|
+
console.log('✓ System instruction and history prepared.');
|
|
84
|
+
|
|
85
|
+
// 5. Instantiate GeminiChat
|
|
86
|
+
// We provide the config, generation settings (with system instruction), and initial history.
|
|
87
|
+
const chat = new GeminiChat(config, generationConfig, initialHistory);
|
|
88
|
+
console.log('✓ GeminiChat instance created.');
|
|
89
|
+
|
|
90
|
+
// 6. Send a New Message with History and System Instruction
|
|
91
|
+
console.log('\nUser: How much does it weigh?');
|
|
92
|
+
const responseStream = await chat.sendMessageStream(
|
|
93
|
+
'gemini-2.5-pro', // You can specify a model here to override the config default for this call
|
|
94
|
+
{ message: 'How much does it weigh?' },
|
|
95
|
+
`prompt-${randomUUID()}`,
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
// 7. Process and Display the Streaming Response
|
|
99
|
+
let fullResponse = '';
|
|
100
|
+
process.stdout.write('Gemini: ');
|
|
101
|
+
for await (const chunk of responseStream) {
|
|
102
|
+
// The stream yields events. We are interested in 'chunk' events which contain response data.
|
|
103
|
+
if (chunk.type === StreamEventType.CHUNK && chunk.value) {
|
|
104
|
+
const text = getResponseText(chunk.value);
|
|
105
|
+
if (text) {
|
|
106
|
+
process.stdout.write(text);
|
|
107
|
+
fullResponse += text;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
console.log(); // Newline after the stream ends
|
|
112
|
+
|
|
113
|
+
// 8. Verify the updated history
|
|
114
|
+
// The chat history now contains the full conversation, including the latest turn.
|
|
115
|
+
console.log('\n--- Full Conversation History ---');
|
|
116
|
+
console.log(JSON.stringify(chat.getHistory(), null, 2));
|
|
117
|
+
console.log('--- End of Example ---');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
main().catch(console.error);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export * from './src/index';
|
|
8
|
+
export { Storage } from './src/config/storage';
|
|
9
|
+
export {
|
|
10
|
+
DEFAULT_GEMINI_MODEL,
|
|
11
|
+
DEFAULT_GEMINI_MODEL_AUTO,
|
|
12
|
+
DEFAULT_GEMINI_FLASH_MODEL,
|
|
13
|
+
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
14
|
+
DEFAULT_GEMINI_EMBEDDING_MODEL,
|
|
15
|
+
} from './src/config/models';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { ContentGenerator } from '../core/contentGenerator';
|
|
8
|
+
import { AuthType } from '../core/contentGenerator';
|
|
9
|
+
import { getOauthClient } from './oauth2';
|
|
10
|
+
import { setupUser } from './setup';
|
|
11
|
+
import type { HttpOptions } from './server';
|
|
12
|
+
import { CodeAssistServer } from './server';
|
|
13
|
+
import type { Config } from '../config/config';
|
|
14
|
+
|
|
15
|
+
export async function createCodeAssistContentGenerator(
|
|
16
|
+
httpOptions: HttpOptions,
|
|
17
|
+
authType: AuthType,
|
|
18
|
+
config: Config,
|
|
19
|
+
sessionId?: string,
|
|
20
|
+
): Promise<ContentGenerator> {
|
|
21
|
+
if (
|
|
22
|
+
authType === AuthType.LOGIN_WITH_GOOGLE ||
|
|
23
|
+
authType === AuthType.CLOUD_SHELL
|
|
24
|
+
) {
|
|
25
|
+
const authClient = await getOauthClient(authType, config);
|
|
26
|
+
const userData = await setupUser(authClient);
|
|
27
|
+
return new CodeAssistServer(
|
|
28
|
+
authClient,
|
|
29
|
+
userData.projectId,
|
|
30
|
+
httpOptions,
|
|
31
|
+
sessionId,
|
|
32
|
+
userData.userTier,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
throw new Error(`Unsupported authType: ${authType}`);
|
|
37
|
+
}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type {
|
|
8
|
+
Content,
|
|
9
|
+
ContentListUnion,
|
|
10
|
+
ContentUnion,
|
|
11
|
+
GenerateContentConfig,
|
|
12
|
+
GenerateContentParameters,
|
|
13
|
+
CountTokensParameters,
|
|
14
|
+
CountTokensResponse,
|
|
15
|
+
GenerationConfigRoutingConfig,
|
|
16
|
+
MediaResolution,
|
|
17
|
+
Candidate,
|
|
18
|
+
ModelSelectionConfig,
|
|
19
|
+
GenerateContentResponsePromptFeedback,
|
|
20
|
+
GenerateContentResponseUsageMetadata,
|
|
21
|
+
Part,
|
|
22
|
+
SafetySetting,
|
|
23
|
+
PartUnion,
|
|
24
|
+
SpeechConfigUnion,
|
|
25
|
+
ThinkingConfig,
|
|
26
|
+
ToolListUnion,
|
|
27
|
+
ToolConfig,
|
|
28
|
+
} from '@google/genai';
|
|
29
|
+
import { GenerateContentResponse } from '@google/genai';
|
|
30
|
+
|
|
31
|
+
export interface CAGenerateContentRequest {
|
|
32
|
+
model: string;
|
|
33
|
+
project?: string;
|
|
34
|
+
user_prompt_id?: string;
|
|
35
|
+
request: VertexGenerateContentRequest;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface VertexGenerateContentRequest {
|
|
39
|
+
contents: Content[];
|
|
40
|
+
systemInstruction?: Content;
|
|
41
|
+
cachedContent?: string;
|
|
42
|
+
tools?: ToolListUnion;
|
|
43
|
+
toolConfig?: ToolConfig;
|
|
44
|
+
labels?: Record<string, string>;
|
|
45
|
+
safetySettings?: SafetySetting[];
|
|
46
|
+
generationConfig?: VertexGenerationConfig;
|
|
47
|
+
session_id?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface VertexGenerationConfig {
|
|
51
|
+
temperature?: number;
|
|
52
|
+
topP?: number;
|
|
53
|
+
topK?: number;
|
|
54
|
+
candidateCount?: number;
|
|
55
|
+
maxOutputTokens?: number;
|
|
56
|
+
stopSequences?: string[];
|
|
57
|
+
responseLogprobs?: boolean;
|
|
58
|
+
logprobs?: number;
|
|
59
|
+
presencePenalty?: number;
|
|
60
|
+
frequencyPenalty?: number;
|
|
61
|
+
seed?: number;
|
|
62
|
+
responseMimeType?: string;
|
|
63
|
+
responseJsonSchema?: unknown;
|
|
64
|
+
responseSchema?: unknown;
|
|
65
|
+
routingConfig?: GenerationConfigRoutingConfig;
|
|
66
|
+
modelSelectionConfig?: ModelSelectionConfig;
|
|
67
|
+
responseModalities?: string[];
|
|
68
|
+
mediaResolution?: MediaResolution;
|
|
69
|
+
speechConfig?: SpeechConfigUnion;
|
|
70
|
+
audioTimestamp?: boolean;
|
|
71
|
+
thinkingConfig?: ThinkingConfig;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface CaGenerateContentResponse {
|
|
75
|
+
response: VertexGenerateContentResponse;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
interface VertexGenerateContentResponse {
|
|
79
|
+
candidates: Candidate[];
|
|
80
|
+
automaticFunctionCallingHistory?: Content[];
|
|
81
|
+
promptFeedback?: GenerateContentResponsePromptFeedback;
|
|
82
|
+
usageMetadata?: GenerateContentResponseUsageMetadata;
|
|
83
|
+
modelVersion?: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface CaCountTokenRequest {
|
|
87
|
+
request: VertexCountTokenRequest;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
interface VertexCountTokenRequest {
|
|
91
|
+
model: string;
|
|
92
|
+
contents: Content[];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface CaCountTokenResponse {
|
|
96
|
+
totalTokens: number;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function toCountTokenRequest(
|
|
100
|
+
req: CountTokensParameters,
|
|
101
|
+
): CaCountTokenRequest {
|
|
102
|
+
return {
|
|
103
|
+
request: {
|
|
104
|
+
model: 'models/' + req.model,
|
|
105
|
+
contents: toContents(req.contents),
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function fromCountTokenResponse(
|
|
111
|
+
res: CaCountTokenResponse,
|
|
112
|
+
): CountTokensResponse {
|
|
113
|
+
return {
|
|
114
|
+
totalTokens: res.totalTokens,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function toGenerateContentRequest(
|
|
119
|
+
req: GenerateContentParameters,
|
|
120
|
+
userPromptId: string,
|
|
121
|
+
project?: string,
|
|
122
|
+
sessionId?: string,
|
|
123
|
+
): CAGenerateContentRequest {
|
|
124
|
+
return {
|
|
125
|
+
model: req.model,
|
|
126
|
+
project,
|
|
127
|
+
user_prompt_id: userPromptId,
|
|
128
|
+
request: toVertexGenerateContentRequest(req, sessionId),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function fromGenerateContentResponse(
|
|
133
|
+
res: CaGenerateContentResponse,
|
|
134
|
+
): GenerateContentResponse {
|
|
135
|
+
const inres = res.response;
|
|
136
|
+
const out = new GenerateContentResponse();
|
|
137
|
+
out.candidates = inres.candidates;
|
|
138
|
+
out.automaticFunctionCallingHistory = inres.automaticFunctionCallingHistory;
|
|
139
|
+
out.promptFeedback = inres.promptFeedback;
|
|
140
|
+
out.usageMetadata = inres.usageMetadata;
|
|
141
|
+
out.modelVersion = inres.modelVersion;
|
|
142
|
+
return out;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function toVertexGenerateContentRequest(
|
|
146
|
+
req: GenerateContentParameters,
|
|
147
|
+
sessionId?: string,
|
|
148
|
+
): VertexGenerateContentRequest {
|
|
149
|
+
return {
|
|
150
|
+
contents: toContents(req.contents),
|
|
151
|
+
systemInstruction: maybeToContent(req.config?.systemInstruction),
|
|
152
|
+
cachedContent: req.config?.cachedContent,
|
|
153
|
+
tools: req.config?.tools,
|
|
154
|
+
toolConfig: req.config?.toolConfig,
|
|
155
|
+
labels: req.config?.labels,
|
|
156
|
+
safetySettings: req.config?.safetySettings,
|
|
157
|
+
generationConfig: toVertexGenerationConfig(req.config),
|
|
158
|
+
session_id: sessionId,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function toContents(contents: ContentListUnion): Content[] {
|
|
163
|
+
if (Array.isArray(contents)) {
|
|
164
|
+
// it's a Content[] or a PartsUnion[]
|
|
165
|
+
return contents.map(toContent);
|
|
166
|
+
}
|
|
167
|
+
// it's a Content or a PartsUnion
|
|
168
|
+
return [toContent(contents)];
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function maybeToContent(content?: ContentUnion): Content | undefined {
|
|
172
|
+
if (!content) {
|
|
173
|
+
return undefined;
|
|
174
|
+
}
|
|
175
|
+
return toContent(content);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function toContent(content: ContentUnion): Content {
|
|
179
|
+
if (Array.isArray(content)) {
|
|
180
|
+
// it's a PartsUnion[]
|
|
181
|
+
return {
|
|
182
|
+
role: 'user',
|
|
183
|
+
parts: toParts(content),
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
if (typeof content === 'string') {
|
|
187
|
+
// it's a string
|
|
188
|
+
return {
|
|
189
|
+
role: 'user',
|
|
190
|
+
parts: [{ text: content }],
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
if ('parts' in content) {
|
|
194
|
+
// it's a Content - process parts to handle thought filtering
|
|
195
|
+
return {
|
|
196
|
+
...content,
|
|
197
|
+
parts: content.parts
|
|
198
|
+
? toParts(content.parts.filter((p) => p != null))
|
|
199
|
+
: [],
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
// it's a Part
|
|
203
|
+
return {
|
|
204
|
+
role: 'user',
|
|
205
|
+
parts: [toPart(content as Part)],
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function toParts(parts: PartUnion[]): Part[] {
|
|
210
|
+
return parts.map(toPart);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function toPart(part: PartUnion): Part {
|
|
214
|
+
if (typeof part === 'string') {
|
|
215
|
+
// it's a string
|
|
216
|
+
return { text: part };
|
|
217
|
+
}
|
|
218
|
+
return part;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function toVertexGenerationConfig(
|
|
222
|
+
config?: GenerateContentConfig,
|
|
223
|
+
): VertexGenerationConfig | undefined {
|
|
224
|
+
if (!config) {
|
|
225
|
+
return undefined;
|
|
226
|
+
}
|
|
227
|
+
return {
|
|
228
|
+
temperature: config.temperature,
|
|
229
|
+
topP: config.topP,
|
|
230
|
+
topK: config.topK,
|
|
231
|
+
candidateCount: config.candidateCount,
|
|
232
|
+
maxOutputTokens: config.maxOutputTokens,
|
|
233
|
+
stopSequences: config.stopSequences,
|
|
234
|
+
responseLogprobs: config.responseLogprobs,
|
|
235
|
+
logprobs: config.logprobs,
|
|
236
|
+
presencePenalty: config.presencePenalty,
|
|
237
|
+
frequencyPenalty: config.frequencyPenalty,
|
|
238
|
+
seed: config.seed,
|
|
239
|
+
responseMimeType: config.responseMimeType,
|
|
240
|
+
responseSchema: config.responseSchema,
|
|
241
|
+
responseJsonSchema: config.responseJsonSchema,
|
|
242
|
+
routingConfig: config.routingConfig,
|
|
243
|
+
modelSelectionConfig: config.modelSelectionConfig,
|
|
244
|
+
responseModalities: config.responseModalities,
|
|
245
|
+
mediaResolution: config.mediaResolution,
|
|
246
|
+
speechConfig: config.speechConfig,
|
|
247
|
+
audioTimestamp: config.audioTimestamp,
|
|
248
|
+
thinkingConfig: config.thinkingConfig,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { type Credentials } from 'google-auth-library';
|
|
8
|
+
import { HybridTokenStorage } from '../mcp/token-storage/hybrid-token-storage';
|
|
9
|
+
import { OAUTH_FILE, GEMINI_DIR, Storage } from '../config/storage';
|
|
10
|
+
import type { OAuthCredentials } from '../mcp/token-storage/types';
|
|
11
|
+
import * as path from 'node:path';
|
|
12
|
+
import * as os from 'node:os';
|
|
13
|
+
import { promises as fs } from 'node:fs';
|
|
14
|
+
|
|
15
|
+
const KEYCHAIN_SERVICE_NAME = 'gemini-cli-oauth';
|
|
16
|
+
const MAIN_ACCOUNT_KEY = 'main-account';
|
|
17
|
+
|
|
18
|
+
export class OAuthCredentialStorage {
|
|
19
|
+
private static storage: HybridTokenStorage = new HybridTokenStorage(
|
|
20
|
+
KEYCHAIN_SERVICE_NAME,
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Load cached OAuth credentials
|
|
25
|
+
*/
|
|
26
|
+
static async loadCredentials(): Promise<Credentials | null> {
|
|
27
|
+
try {
|
|
28
|
+
const credentials = await this.storage.getCredentials(MAIN_ACCOUNT_KEY);
|
|
29
|
+
|
|
30
|
+
if (credentials?.token) {
|
|
31
|
+
const { accessToken, refreshToken, expiresAt, tokenType, scope } =
|
|
32
|
+
credentials.token;
|
|
33
|
+
// Convert from OAuthCredentials format to Google Credentials format
|
|
34
|
+
const googleCreds: Credentials = {
|
|
35
|
+
access_token: accessToken,
|
|
36
|
+
refresh_token: refreshToken || undefined,
|
|
37
|
+
token_type: tokenType || undefined,
|
|
38
|
+
scope: scope || undefined,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
if (expiresAt) {
|
|
42
|
+
googleCreds.expiry_date = expiresAt;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return googleCreds;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Fallback: Try to migrate from old file-based storage
|
|
49
|
+
return await this.migrateFromFileStorage();
|
|
50
|
+
} catch (error: unknown) {
|
|
51
|
+
console.error(error);
|
|
52
|
+
throw new Error('Failed to load OAuth credentials');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Save OAuth credentials
|
|
58
|
+
*/
|
|
59
|
+
static async saveCredentials(credentials: Credentials): Promise<void> {
|
|
60
|
+
if (!credentials.access_token) {
|
|
61
|
+
throw new Error('Attempted to save credentials without an access token.');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Convert Google Credentials to OAuthCredentials format
|
|
65
|
+
const mcpCredentials: OAuthCredentials = {
|
|
66
|
+
serverName: MAIN_ACCOUNT_KEY,
|
|
67
|
+
token: {
|
|
68
|
+
accessToken: credentials.access_token,
|
|
69
|
+
refreshToken: credentials.refresh_token || undefined,
|
|
70
|
+
tokenType: credentials.token_type || 'Bearer',
|
|
71
|
+
scope: credentials.scope || undefined,
|
|
72
|
+
expiresAt: credentials.expiry_date || undefined,
|
|
73
|
+
},
|
|
74
|
+
updatedAt: Date.now(),
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
await this.storage.setCredentials(mcpCredentials);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Clear cached OAuth credentials
|
|
82
|
+
*/
|
|
83
|
+
static async clearCredentials(): Promise<void> {
|
|
84
|
+
try {
|
|
85
|
+
await this.storage.deleteCredentials(MAIN_ACCOUNT_KEY);
|
|
86
|
+
|
|
87
|
+
// Also try to remove the old file if it exists
|
|
88
|
+
const oldFilePath = Storage.getOAuthCredsPath();
|
|
89
|
+
await fs.rm(oldFilePath, { force: true }).catch(() => {});
|
|
90
|
+
} catch (error: unknown) {
|
|
91
|
+
console.error(error);
|
|
92
|
+
throw new Error('Failed to clear OAuth credentials');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Migrate credentials from old file-based storage to keychain
|
|
98
|
+
*/
|
|
99
|
+
private static async migrateFromFileStorage(): Promise<Credentials | null> {
|
|
100
|
+
const oldFilePath = Storage.getOAuthCredsPath();
|
|
101
|
+
|
|
102
|
+
let credsJson: string;
|
|
103
|
+
try {
|
|
104
|
+
credsJson = await fs.readFile(oldFilePath, 'utf-8');
|
|
105
|
+
} catch (error: unknown) {
|
|
106
|
+
if (
|
|
107
|
+
typeof error === 'object' &&
|
|
108
|
+
error !== null &&
|
|
109
|
+
'code' in error &&
|
|
110
|
+
error.code === 'ENOENT'
|
|
111
|
+
) {
|
|
112
|
+
// File doesn't exist, so no migration.
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
// Other read errors should propagate.
|
|
116
|
+
throw error;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const credentials = JSON.parse(credsJson) as Credentials;
|
|
120
|
+
|
|
121
|
+
// Save to new storage
|
|
122
|
+
await this.saveCredentials(credentials);
|
|
123
|
+
|
|
124
|
+
// Remove old file after successful migration
|
|
125
|
+
await fs.rm(oldFilePath, { force: true }).catch(() => {});
|
|
126
|
+
|
|
127
|
+
return credentials;
|
|
128
|
+
}
|
|
129
|
+
}
|