@didim365/agent-cli-core 0.1.0 → 0.1.2
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/package.json +6 -2
- package/dist/docs/00_project/ai_adapter/01-overview.md +0 -172
- package/dist/docs/00_project/ai_adapter/02-architecture.md +0 -448
- package/dist/docs/00_project/ai_adapter/03-technical-design.md +0 -1470
- package/dist/docs/00_project/ai_adapter/04-integration-design.md +0 -1934
- package/dist/docs/00_project/ai_adapter/05-implementation-plan.md +0 -336
- package/dist/docs/00_project/ai_adapter/06-didiaistudio-plan.md +0 -559
- package/dist/docs/00_project/ai_adapter/README.md +0 -145
- package/dist/docs/00_project/ai_adapter/agent_service_openapi.json +0 -1
- package/dist/docs/00_project/ai_adapter/didimStudi-AISTUDIO /341/204/213/341/205/254/341/204/207/341/205/256 /341/204/211/341/205/245/341/204/207/341/205/265/341/204/211/341/205/263 /341/204/221/341/205/263/341/206/257/341/204/205/341/205/251/341/204/213/341/205/256 /341/204/213/341/205/247/341/206/253/341/204/200/341/205/247/341/206/257 /341/204/207/341/205/241/341/206/274/341/204/211/341/205/265/341/206/250-100226-093925.pdf +0 -0
- package/dist/docs/00_project/ai_adapter/event-mapping-matrix.md +0 -148
- package/dist/docs/00_project/ai_adapter/migration-plan.md +0 -205
- package/dist/docs/00_project/ai_adapter/template/00_vibecoding_workflow.md +0 -627
- package/dist/docs/00_project/ai_adapter/template/01_todolist_performance_template.md +0 -436
- package/dist/docs/00_project/ai_adapter/template/02_code_review_template.md +0 -248
- package/dist/docs/00_project/ai_adapter/template/03_work_result_report_template.md +0 -133
- package/dist/docs/00_project/ai_adapter/template/100_Python_Performance_Guide.md +0 -472
- package/dist/docs/00_project/ai_adapter/template/99_TDD_plan.md +0 -123
- package/dist/docs/00_project/ai_adapter/todolist/00_master_implementation_plan.md +0 -433
- package/dist/docs/00_project/ai_adapter/todolist/phase1_foundation_todolist.md +0 -726
- package/dist/docs/00_project/ai_adapter/todolist/phase2_core_refactoring_todolist.md +0 -974
- package/dist/docs/00_project/ai_adapter/todolist/phase3_handoff.md +0 -203
- package/dist/docs/00_project/ai_adapter/todolist/phase3_provider_extension_todolist.md +0 -1382
- package/dist/docs/00_project/ai_adapter/utility-migration.md +0 -237
- package/dist/docs/00_project/ai_adapter/working_history/.gitkeep +0 -0
- package/dist/docs/00_project/ai_adapter/working_history/Phase1_M1.0_/354/275/224/353/223/234/354/235/270/353/262/244/355/206/240/353/246/254_20260201.md +0 -197
- package/dist/docs/00_project/ai_adapter/working_history/Phase1_M1.1_/355/203/200/354/236/205/354/204/244/352/263/204_20260201.md +0 -185
- package/dist/docs/00_project/ai_adapter/working_history/Phase1_M1.2_Adapter/354/235/270/355/224/204/353/235/274_20260203.md +0 -378
- package/dist/docs/00_project/ai_adapter/working_history/Phase1_M1.3_Provider/354/204/240/355/203/235_20260206.md +0 -269
- package/dist/docs/00_project/ai_adapter/working_history/Phase1_M1.4_/354/234/240/355/213/270/353/246/254/355/213/260/353/247/210/354/235/264/352/267/270/353/240/210/354/235/264/354/205/230_20260206.md +0 -86
- package/dist/docs/00_project/ai_adapter/working_history/Phase2_ETC_/354/227/260/352/270/260/354/236/221/354/227/205/354/240/225/353/246/254_20260208.md +0 -157
- package/dist/docs/00_project/ai_adapter/working_history/Phase2_M2.0_/353/224/224/353/240/211/355/206/240/353/246/254/354/236/254/352/265/254/354/204/261_20260207.md +0 -107
- package/dist/docs/00_project/ai_adapter/working_history/Phase2_M2.1_ContentGenerator/354/235/270/355/204/260/355/216/230/354/235/264/354/212/244/354/236/254/354/240/225/354/235/230_20260207.md +0 -630
- package/dist/docs/00_project/ai_adapter/working_history/Phase2_M2.2_EventMapper/352/265/254/355/230/204_20260207.md +0 -372
- package/dist/docs/00_project/ai_adapter/working_history/Phase2_M2.3_GeminiAdapter/352/265/254/355/230/204_20260208.md +0 -205
- package/dist/docs/00_project/ai_adapter/working_history/Phase2_M2.4_ModelConfigService/355/230/270/355/231/230/353/240/210/354/235/264/354/226/264_20260208.md +0 -275
- package/dist/docs/00_project/ai_adapter/working_history/Phase2_M2.5_/354/234/240/355/213/270/353/246/254/355/213/260/353/240/210/354/235/264/354/226/264/353/246/254/355/214/251/355/206/240/353/247/201_20260208.md +0 -239
- package/dist/docs/00_project/ai_adapter/working_history/Phase2_M2.6_/353/235/274/354/232/260/355/214/205/353/240/210/354/235/264/354/226/264/355/203/200/354/236/205/353/217/205/353/246/275/355/231/224_20260208.md +0 -228
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_ETC_/352/270/260/353/263/270/354/273/250/355/205/215/354/212/244/355/212/270/355/214/214/354/235/274/353/252/205AGENTS/354/240/204/355/231/230_20260211.md +0 -470
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.0.1_Gemini/354/240/204/354/232/251/355/214/214/354/235/274/353/254/274/353/246/254/354/240/201/354/235/264/353/217/231_20260209.md +0 -271
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.0.2_messageInspectors/353/247/210/354/235/264/352/267/270/353/240/210/354/235/264/354/205/230_20260209.md +0 -330
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.0.3_/355/205/224/353/240/210/353/251/224/355/212/270/353/246/254Agent/353/217/205/353/246/275/355/231/224_20260209.md +0 -251
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.0.4_/353/263/200/355/231/230/353/270/214/353/246/277/354/247/200/354/240/225/353/246/254_20260209.md +0 -136
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.0.5_/353/237/260/355/203/200/354/236/204/354/213/244/355/226/211/352/262/275/353/241/234/354/227/260/352/262/260_20260209.md +0 -232
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.1.0_Claude/354/202/254/354/240/204/354/244/200/353/271/204_20260209.md +0 -191
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.1.1_ClaudeAdapter/352/265/254/355/230/204_20260209.md +0 -225
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.1.2_ClaudeConverter/352/263/240/353/217/204/355/231/224_20260209.md +0 -171
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.1.3_ClaudeStreamError/352/263/240/353/217/204/355/231/224_20260209.md +0 -198
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.1.4_ClaudeErrorMapping_20260209.md +0 -98
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.2.A_OpenAIAdapterCore_20260210.md +0 -264
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.2.B_OpenAIStreamConverter_20260210.md +0 -204
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.3.2_/353/252/250/353/215/270/355/205/234/355/224/214/353/246/277/355/233/205/353/263/264/354/231/204_20260211.md +0 -106
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.3_OpenAICompatibleAdapter_20260211.md +0 -251
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.4.2_E2E/355/205/214/354/212/244/355/212/270/354/213/234/353/202/230/353/246/254/354/230/244_20260210.md +0 -264
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.4.3_/354/204/261/353/212/245/355/232/214/352/267/200/355/205/214/354/212/244/355/212/270_20260211.md +0 -176
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.4.5_/354/225/210/354/240/225/355/231/224/354/236/221/354/227/205_20260211.md +0 -204
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.4.A_CLI/355/206/265/355/225/251_3Provider/355/206/265/355/225/251/355/205/214/354/212/244/355/212/270_20260210.md +0 -316
- package/dist/docs/00_project/ai_adapter/working_history/Phase3_M3.4.A_UI/354/203/201/355/203/234/353/260/224/354/210/230/354/240/225_20260210.md +0 -262
- package/dist/docs/00_project/ai_adapter/working_history/phase2_tradeoff_EventType/354/240/204/355/231/230_20260208.md +0 -286
- package/dist/docs/00_project/white_labeling/template/00_vibecoding_workflow.md +0 -627
- package/dist/docs/00_project/white_labeling/template/01_todolist_performance_template.md +0 -400
- package/dist/docs/00_project/white_labeling/template/02_code_review_template.md +0 -248
- package/dist/docs/00_project/white_labeling/template/03_work_result_report_template.md +0 -133
- package/dist/docs/00_project/white_labeling/template/100_Python_Performance_Guide.md +0 -472
- package/dist/docs/00_project/white_labeling/template/99_TDD_plan.md +0 -123
- package/dist/docs/00_project/white_labeling/todolist/Phase_CLI/355/214/250/355/202/244/354/247/200/353/252/205/353/263/200/352/262/275_todolist.md +0 -431
- package/dist/docs/00_project/white_labeling/working_history/Phase_CLI/355/214/250/355/202/244/354/247/200/353/252/205/353/263/200/352/262/275_20260214.md +0 -238
- package/dist/docs/00_project/white_labeling//354/225/261/352/265/254/354/241/260.md +0 -310
- package/dist/docs/CONTRIBUTING.md +0 -554
- package/dist/docs/ai_adapter/01-overview.md +0 -155
- package/dist/docs/ai_adapter/02-architecture.md +0 -452
- package/dist/docs/ai_adapter/03-technical-design.md +0 -1470
- package/dist/docs/ai_adapter/04-integration-design.md +0 -1904
- package/dist/docs/ai_adapter/05-implementation-plan.md +0 -312
- package/dist/docs/ai_adapter/06-didiaistudio-plan.md +0 -559
- package/dist/docs/ai_adapter/README.md +0 -118
- package/dist/docs/ai_adapter/agent_service_openapi.json +0 -1
- package/dist/docs/ai_adapter/didimStudi-AISTUDIO /341/204/213/341/205/254/341/204/207/341/205/256 /341/204/211/341/205/245/341/204/207/341/205/265/341/204/211/341/205/263 /341/204/221/341/205/263/341/206/257/341/204/205/341/205/251/341/204/213/341/205/256 /341/204/213/341/205/247/341/206/253/341/204/200/341/205/247/341/206/257 /341/204/207/341/205/241/341/206/274/341/204/211/341/205/265/341/206/250-100226-093925.pdf +0 -0
- package/dist/docs/ai_adapter/event-mapping-matrix.md +0 -140
- package/dist/docs/ai_adapter/migration-plan.md +0 -205
- package/dist/docs/ai_adapter/template/00_vibecoding_workflow.md +0 -636
- package/dist/docs/ai_adapter/template/01_todolist_performance_template.md +0 -372
- package/dist/docs/ai_adapter/template/02_code_review_template.md +0 -220
- package/dist/docs/ai_adapter/template/03_work_result_report_template.md +0 -120
- package/dist/docs/ai_adapter/template/100_Python_Performance_Guide.md +0 -453
- package/dist/docs/ai_adapter/template/99_TDD_plan.md +0 -111
- package/dist/docs/ai_adapter/todolist/00_master_implementation_plan.md +0 -433
- package/dist/docs/ai_adapter/todolist/phase1_foundation_todolist.md +0 -726
- package/dist/docs/ai_adapter/todolist/phase2_core_refactoring_todolist.md +0 -974
- package/dist/docs/ai_adapter/todolist/phase3_handoff.md +0 -203
- package/dist/docs/ai_adapter/todolist/phase3_provider_extension_todolist.md +0 -1382
- package/dist/docs/ai_adapter/utility-migration.md +0 -237
- package/dist/docs/ai_adapter/working_history/.gitkeep +0 -0
- package/dist/docs/ai_adapter/working_history/Phase1_M1.0_/354/275/224/353/223/234/354/235/270/353/262/244/355/206/240/353/246/254_20260201.md +0 -185
- package/dist/docs/ai_adapter/working_history/Phase1_M1.1_/355/203/200/354/236/205/354/204/244/352/263/204_20260201.md +0 -185
- package/dist/docs/ai_adapter/working_history/Phase1_M1.2_Adapter/354/235/270/355/224/204/353/235/274_20260203.md +0 -378
- package/dist/docs/ai_adapter/working_history/Phase1_M1.3_Provider/354/204/240/355/203/235_20260206.md +0 -269
- package/dist/docs/ai_adapter/working_history/Phase1_M1.4_/354/234/240/355/213/270/353/246/254/355/213/260/353/247/210/354/235/264/352/267/270/353/240/210/354/235/264/354/205/230_20260206.md +0 -86
- package/dist/docs/ai_adapter/working_history/Phase2_ETC_/354/227/260/352/270/260/354/236/221/354/227/205/354/240/225/353/246/254_20260208.md +0 -157
- package/dist/docs/ai_adapter/working_history/Phase2_M2.0_/353/224/224/353/240/211/355/206/240/353/246/254/354/236/254/352/265/254/354/204/261_20260207.md +0 -107
- package/dist/docs/ai_adapter/working_history/Phase2_M2.1_ContentGenerator/354/235/270/355/204/260/355/216/230/354/235/264/354/212/244/354/236/254/354/240/225/354/235/230_20260207.md +0 -630
- package/dist/docs/ai_adapter/working_history/Phase2_M2.2_EventMapper/352/265/254/355/230/204_20260207.md +0 -372
- package/dist/docs/ai_adapter/working_history/Phase2_M2.3_GeminiAdapter/352/265/254/355/230/204_20260208.md +0 -205
- package/dist/docs/ai_adapter/working_history/Phase2_M2.4_ModelConfigService/355/230/270/355/231/230/353/240/210/354/235/264/354/226/264_20260208.md +0 -275
- package/dist/docs/ai_adapter/working_history/Phase2_M2.5_/354/234/240/355/213/270/353/246/254/355/213/260/353/240/210/354/235/264/354/226/264/353/246/254/355/214/251/355/206/240/353/247/201_20260208.md +0 -239
- package/dist/docs/ai_adapter/working_history/Phase2_M2.6_/353/235/274/354/232/260/355/214/205/353/240/210/354/235/264/354/226/264/355/203/200/354/236/205/353/217/205/353/246/275/355/231/224_20260208.md +0 -228
- package/dist/docs/ai_adapter/working_history/Phase3_ETC_/352/270/260/353/263/270/354/273/250/355/205/215/354/212/244/355/212/270/355/214/214/354/235/274/353/252/205AGENTS/354/240/204/355/231/230_20260211.md +0 -367
- package/dist/docs/ai_adapter/working_history/Phase3_M3.0.1_Gemini/354/240/204/354/232/251/355/214/214/354/235/274/353/254/274/353/246/254/354/240/201/354/235/264/353/217/231_20260209.md +0 -271
- package/dist/docs/ai_adapter/working_history/Phase3_M3.0.2_messageInspectors/353/247/210/354/235/264/352/267/270/353/240/210/354/235/264/354/205/230_20260209.md +0 -330
- package/dist/docs/ai_adapter/working_history/Phase3_M3.0.3_/355/205/224/353/240/210/353/251/224/355/212/270/353/246/254Agent/353/217/205/353/246/275/355/231/224_20260209.md +0 -251
- package/dist/docs/ai_adapter/working_history/Phase3_M3.0.4_/353/263/200/355/231/230/353/270/214/353/246/277/354/247/200/354/240/225/353/246/254_20260209.md +0 -136
- package/dist/docs/ai_adapter/working_history/Phase3_M3.0.5_/353/237/260/355/203/200/354/236/204/354/213/244/355/226/211/352/262/275/353/241/234/354/227/260/352/262/260_20260209.md +0 -232
- package/dist/docs/ai_adapter/working_history/Phase3_M3.1.0_Claude/354/202/254/354/240/204/354/244/200/353/271/204_20260209.md +0 -191
- package/dist/docs/ai_adapter/working_history/Phase3_M3.1.1_ClaudeAdapter/352/265/254/355/230/204_20260209.md +0 -225
- package/dist/docs/ai_adapter/working_history/Phase3_M3.1.2_ClaudeConverter/352/263/240/353/217/204/355/231/224_20260209.md +0 -171
- package/dist/docs/ai_adapter/working_history/Phase3_M3.1.3_ClaudeStreamError/352/263/240/353/217/204/355/231/224_20260209.md +0 -198
- package/dist/docs/ai_adapter/working_history/Phase3_M3.1.4_ClaudeErrorMapping_20260209.md +0 -98
- package/dist/docs/ai_adapter/working_history/Phase3_M3.2.A_OpenAIAdapterCore_20260210.md +0 -264
- package/dist/docs/ai_adapter/working_history/Phase3_M3.2.B_OpenAIStreamConverter_20260210.md +0 -204
- package/dist/docs/ai_adapter/working_history/Phase3_M3.3.2_/353/252/250/353/215/270/355/205/234/355/224/214/353/246/277/355/233/205/353/263/264/354/231/204_20260211.md +0 -106
- package/dist/docs/ai_adapter/working_history/Phase3_M3.3_OpenAICompatibleAdapter_20260211.md +0 -251
- package/dist/docs/ai_adapter/working_history/Phase3_M3.4.2_E2E/355/205/214/354/212/244/355/212/270/354/213/234/353/202/230/353/246/254/354/230/244_20260210.md +0 -264
- package/dist/docs/ai_adapter/working_history/Phase3_M3.4.3_/354/204/261/353/212/245/355/232/214/352/267/200/355/205/214/354/212/244/355/212/270_20260211.md +0 -176
- package/dist/docs/ai_adapter/working_history/Phase3_M3.4.5_/354/225/210/354/240/225/355/231/224/354/236/221/354/227/205_20260211.md +0 -204
- package/dist/docs/ai_adapter/working_history/Phase3_M3.4.A_CLI/355/206/265/355/225/251_3Provider/355/206/265/355/225/251/355/205/214/354/212/244/355/212/270_20260210.md +0 -316
- package/dist/docs/ai_adapter/working_history/Phase3_M3.4.A_UI/354/203/201/355/203/234/353/260/224/354/210/230/354/240/225_20260210.md +0 -262
- package/dist/docs/ai_adapter/working_history/phase2_tradeoff_EventType/354/240/204/355/231/230_20260208.md +0 -286
- package/dist/docs/api/index.md +0 -5
- package/dist/docs/api/providers.md +0 -56
- package/dist/docs/architecture.md +0 -80
- package/dist/docs/assets/connected_devtools.png +0 -0
- package/dist/docs/assets/gemini-screenshot.png +0 -0
- package/dist/docs/assets/monitoring-dashboard-logs.png +0 -0
- package/dist/docs/assets/monitoring-dashboard-metrics.png +0 -0
- package/dist/docs/assets/monitoring-dashboard-overview.png +0 -0
- package/dist/docs/assets/release_patch.png +0 -0
- package/dist/docs/assets/theme-ansi-light.png +0 -0
- package/dist/docs/assets/theme-ansi.png +0 -0
- package/dist/docs/assets/theme-atom-one.png +0 -0
- package/dist/docs/assets/theme-ayu-light.png +0 -0
- package/dist/docs/assets/theme-ayu.png +0 -0
- package/dist/docs/assets/theme-custom.png +0 -0
- package/dist/docs/assets/theme-default-light.png +0 -0
- package/dist/docs/assets/theme-default.png +0 -0
- package/dist/docs/assets/theme-dracula.png +0 -0
- package/dist/docs/assets/theme-github-light.png +0 -0
- package/dist/docs/assets/theme-github.png +0 -0
- package/dist/docs/assets/theme-google-light.png +0 -0
- package/dist/docs/assets/theme-xcode-light.png +0 -0
- package/dist/docs/change_model/model_command_multi_provider_plan.md +0 -221
- package/dist/docs/change_model/model_command_multi_provider_todolist.md +0 -206
- package/dist/docs/changelogs/index.md +0 -726
- package/dist/docs/changelogs/latest.md +0 -370
- package/dist/docs/changelogs/preview.md +0 -332
- package/dist/docs/cli/authentication.md +0 -3
- package/dist/docs/cli/checkpointing.md +0 -94
- package/dist/docs/cli/commands.md +0 -375
- package/dist/docs/cli/custom-commands.md +0 -315
- package/dist/docs/cli/enterprise.md +0 -565
- package/dist/docs/cli/gemini-ignore.md +0 -71
- package/dist/docs/cli/gemini-md.md +0 -108
- package/dist/docs/cli/generation-settings.md +0 -210
- package/dist/docs/cli/headless.md +0 -388
- package/dist/docs/cli/index.md +0 -65
- package/dist/docs/cli/keyboard-shortcuts.md +0 -129
- package/dist/docs/cli/model-routing.md +0 -42
- package/dist/docs/cli/model.md +0 -62
- package/dist/docs/cli/sandbox.md +0 -171
- package/dist/docs/cli/session-management.md +0 -158
- package/dist/docs/cli/settings.md +0 -130
- package/dist/docs/cli/skills.md +0 -188
- package/dist/docs/cli/system-prompt.md +0 -125
- package/dist/docs/cli/telemetry.md +0 -826
- package/dist/docs/cli/themes.md +0 -235
- package/dist/docs/cli/token-caching.md +0 -20
- package/dist/docs/cli/trusted-folders.md +0 -95
- package/dist/docs/cli/tutorials/skills-getting-started.md +0 -124
- package/dist/docs/cli/tutorials.md +0 -87
- package/dist/docs/cli/uninstall.md +0 -65
- package/dist/docs/configuration.md +0 -108
- package/dist/docs/core/index.md +0 -105
- package/dist/docs/core/long-term-memory-design.md +0 -254
- package/dist/docs/core/long-term-memory-proposal.md +0 -112
- package/dist/docs/core/memport.md +0 -246
- package/dist/docs/core/policy-engine.md +0 -300
- package/dist/docs/core/tools-api.md +0 -131
- package/dist/docs/examples/proxy-script.md +0 -83
- package/dist/docs/extensions/best-practices.md +0 -139
- package/dist/docs/extensions/index.md +0 -44
- package/dist/docs/extensions/reference.md +0 -312
- package/dist/docs/extensions/releasing.md +0 -183
- package/dist/docs/extensions/writing-extensions.md +0 -283
- package/dist/docs/faq.md +0 -154
- package/dist/docs/get-started/authentication.md +0 -321
- package/dist/docs/get-started/configuration-v1.md +0 -888
- package/dist/docs/get-started/configuration.md +0 -1567
- package/dist/docs/get-started/examples.md +0 -219
- package/dist/docs/get-started/gemini-3.md +0 -101
- package/dist/docs/get-started/index.md +0 -71
- package/dist/docs/get-started/installation.md +0 -141
- package/dist/docs/hooks/best-practices.md +0 -677
- package/dist/docs/hooks/index.md +0 -178
- package/dist/docs/hooks/reference.md +0 -322
- package/dist/docs/hooks/writing-hooks.md +0 -450
- package/dist/docs/ide-integration/ide-companion-spec.md +0 -267
- package/dist/docs/ide-integration/index.md +0 -202
- package/dist/docs/index.md +0 -153
- package/dist/docs/integration-tests.md +0 -211
- package/dist/docs/issue-and-pr-automation.md +0 -134
- package/dist/docs/local-development.md +0 -128
- package/dist/docs/mermaid/context.mmd +0 -103
- package/dist/docs/mermaid/render-path.mmd +0 -64
- package/dist/docs/migration.md +0 -78
- package/dist/docs/npm.md +0 -62
- package/dist/docs/providers.md +0 -136
- package/dist/docs/quota-and-pricing.md +0 -158
- package/dist/docs/release-confidence.md +0 -164
- package/dist/docs/releases.md +0 -539
- package/dist/docs/sidebar.json +0 -140
- package/dist/docs/tools/file-system.md +0 -217
- package/dist/docs/tools/index.md +0 -98
- package/dist/docs/tools/mcp-server.md +0 -1068
- package/dist/docs/tools/memory.md +0 -54
- package/dist/docs/tools/shell.md +0 -260
- package/dist/docs/tools/todos.md +0 -57
- package/dist/docs/tools/web-fetch.md +0 -59
- package/dist/docs/tools/web-search.md +0 -42
- package/dist/docs/tos-privacy.md +0 -96
- package/dist/docs/troubleshooting.md +0 -173
- package/dist/src/agents/a2a-client-manager.test.d.ts +0 -6
- package/dist/src/agents/a2a-client-manager.test.js +0 -220
- package/dist/src/agents/a2a-client-manager.test.js.map +0 -1
- package/dist/src/agents/a2aUtils.test.d.ts +0 -6
- package/dist/src/agents/a2aUtils.test.js +0 -147
- package/dist/src/agents/a2aUtils.test.js.map +0 -1
- package/dist/src/agents/acknowledgedAgents.test.d.ts +0 -6
- package/dist/src/agents/acknowledgedAgents.test.js +0 -70
- package/dist/src/agents/acknowledgedAgents.test.js.map +0 -1
- package/dist/src/agents/agent-scheduler.test.d.ts +0 -6
- package/dist/src/agents/agent-scheduler.test.js +0 -56
- package/dist/src/agents/agent-scheduler.test.js.map +0 -1
- package/dist/src/agents/agentLoader.test.d.ts +0 -6
- package/dist/src/agents/agentLoader.test.js +0 -304
- package/dist/src/agents/agentLoader.test.js.map +0 -1
- package/dist/src/agents/cli-help-agent.test.d.ts +0 -6
- package/dist/src/agents/cli-help-agent.test.js +0 -67
- package/dist/src/agents/cli-help-agent.test.js.map +0 -1
- package/dist/src/agents/codebase-investigator.test.d.ts +0 -6
- package/dist/src/agents/codebase-investigator.test.js +0 -42
- package/dist/src/agents/codebase-investigator.test.js.map +0 -1
- package/dist/src/agents/generalist-agent.test.d.ts +0 -6
- package/dist/src/agents/generalist-agent.test.js +0 -31
- package/dist/src/agents/generalist-agent.test.js.map +0 -1
- package/dist/src/agents/local-executor.test.d.ts +0 -6
- package/dist/src/agents/local-executor.test.js +0 -1577
- package/dist/src/agents/local-executor.test.js.map +0 -1
- package/dist/src/agents/local-invocation.test.d.ts +0 -6
- package/dist/src/agents/local-invocation.test.js +0 -228
- package/dist/src/agents/local-invocation.test.js.map +0 -1
- package/dist/src/agents/registry.test.d.ts +0 -6
- package/dist/src/agents/registry.test.js +0 -773
- package/dist/src/agents/registry.test.js.map +0 -1
- package/dist/src/agents/registry_acknowledgement.test.d.ts +0 -6
- package/dist/src/agents/registry_acknowledgement.test.js +0 -130
- package/dist/src/agents/registry_acknowledgement.test.js.map +0 -1
- package/dist/src/agents/remote-invocation.test.d.ts +0 -6
- package/dist/src/agents/remote-invocation.test.js +0 -213
- package/dist/src/agents/remote-invocation.test.js.map +0 -1
- package/dist/src/agents/subagent-tool-wrapper.test.d.ts +0 -6
- package/dist/src/agents/subagent-tool-wrapper.test.js +0 -109
- package/dist/src/agents/subagent-tool-wrapper.test.js.map +0 -1
- package/dist/src/agents/utils.test.d.ts +0 -6
- package/dist/src/agents/utils.test.js +0 -87
- package/dist/src/agents/utils.test.js.map +0 -1
- package/dist/src/availability/fallbackIntegration.test.d.ts +0 -6
- package/dist/src/availability/fallbackIntegration.test.js +0 -58
- package/dist/src/availability/fallbackIntegration.test.js.map +0 -1
- package/dist/src/availability/modelAvailabilityService.test.d.ts +0 -6
- package/dist/src/availability/modelAvailabilityService.test.js +0 -140
- package/dist/src/availability/modelAvailabilityService.test.js.map +0 -1
- package/dist/src/availability/policyCatalog.test.d.ts +0 -6
- package/dist/src/availability/policyCatalog.test.js +0 -70
- package/dist/src/availability/policyCatalog.test.js.map +0 -1
- package/dist/src/availability/policyHelpers.test.d.ts +0 -6
- package/dist/src/availability/policyHelpers.test.js +0 -220
- package/dist/src/availability/policyHelpers.test.js.map +0 -1
- package/dist/src/code_assist/admin/admin_controls.test.d.ts +0 -6
- package/dist/src/code_assist/admin/admin_controls.test.js +0 -200
- package/dist/src/code_assist/admin/admin_controls.test.js.map +0 -1
- package/dist/src/code_assist/codeAssist.test.d.ts +0 -6
- package/dist/src/code_assist/codeAssist.test.js +0 -102
- package/dist/src/code_assist/codeAssist.test.js.map +0 -1
- package/dist/src/code_assist/converter.test.d.ts +0 -6
- package/dist/src/code_assist/converter.test.js +0 -391
- package/dist/src/code_assist/converter.test.js.map +0 -1
- package/dist/src/code_assist/experiments/client_metadata.test.d.ts +0 -6
- package/dist/src/code_assist/experiments/client_metadata.test.js +0 -96
- package/dist/src/code_assist/experiments/client_metadata.test.js.map +0 -1
- package/dist/src/code_assist/experiments/experiments.test.d.ts +0 -6
- package/dist/src/code_assist/experiments/experiments.test.js +0 -93
- package/dist/src/code_assist/experiments/experiments.test.js.map +0 -1
- package/dist/src/code_assist/experiments/experiments_local.test.d.ts +0 -6
- package/dist/src/code_assist/experiments/experiments_local.test.js +0 -115
- package/dist/src/code_assist/experiments/experiments_local.test.js.map +0 -1
- package/dist/src/code_assist/oauth-credential-storage.test.d.ts +0 -6
- package/dist/src/code_assist/oauth-credential-storage.test.js +0 -198
- package/dist/src/code_assist/oauth-credential-storage.test.js.map +0 -1
- package/dist/src/code_assist/oauth2.test.d.ts +0 -6
- package/dist/src/code_assist/oauth2.test.js +0 -1065
- package/dist/src/code_assist/oauth2.test.js.map +0 -1
- package/dist/src/code_assist/server.test.d.ts +0 -6
- package/dist/src/code_assist/server.test.js +0 -453
- package/dist/src/code_assist/server.test.js.map +0 -1
- package/dist/src/code_assist/setup.test.d.ts +0 -6
- package/dist/src/code_assist/setup.test.js +0 -517
- package/dist/src/code_assist/setup.test.js.map +0 -1
- package/dist/src/code_assist/telemetry.test.d.ts +0 -6
- package/dist/src/code_assist/telemetry.test.js +0 -301
- package/dist/src/code_assist/telemetry.test.js.map +0 -1
- package/dist/src/commands/extensions.test.d.ts +0 -6
- package/dist/src/commands/extensions.test.js +0 -19
- package/dist/src/commands/extensions.test.js.map +0 -1
- package/dist/src/commands/init.test.d.ts +0 -6
- package/dist/src/commands/init.test.js +0 -25
- package/dist/src/commands/init.test.js.map +0 -1
- package/dist/src/commands/memory.test.d.ts +0 -6
- package/dist/src/commands/memory.test.js +0 -182
- package/dist/src/commands/memory.test.js.map +0 -1
- package/dist/src/commands/restore.test.d.ts +0 -6
- package/dist/src/commands/restore.test.js +0 -137
- package/dist/src/commands/restore.test.js.map +0 -1
- package/dist/src/config/config.test.d.ts +0 -6
- package/dist/src/config/config.test.js +0 -1811
- package/dist/src/config/config.test.js.map +0 -1
- package/dist/src/config/flashFallback.test.d.ts +0 -6
- package/dist/src/config/flashFallback.test.js +0 -63
- package/dist/src/config/flashFallback.test.js.map +0 -1
- package/dist/src/config/models.test.d.ts +0 -6
- package/dist/src/config/models.test.js +0 -146
- package/dist/src/config/models.test.js.map +0 -1
- package/dist/src/config/storage.test.d.ts +0 -6
- package/dist/src/config/storage.test.js +0 -115
- package/dist/src/config/storage.test.js.map +0 -1
- package/dist/src/confirmation-bus/message-bus.test.d.ts +0 -6
- package/dist/src/confirmation-bus/message-bus.test.js +0 -170
- package/dist/src/confirmation-bus/message-bus.test.js.map +0 -1
- package/dist/src/core/apiKeyCredentialStorage.test.d.ts +0 -6
- package/dist/src/core/apiKeyCredentialStorage.test.js +0 -71
- package/dist/src/core/apiKeyCredentialStorage.test.js.map +0 -1
- package/dist/src/core/baseLlmClient.test.d.ts +0 -6
- package/dist/src/core/baseLlmClient.test.js +0 -569
- package/dist/src/core/baseLlmClient.test.js.map +0 -1
- package/dist/src/core/baseLlmClient_new_types.test.d.ts +0 -1
- package/dist/src/core/baseLlmClient_new_types.test.js +0 -387
- package/dist/src/core/baseLlmClient_new_types.test.js.map +0 -1
- package/dist/src/core/client.test.d.ts +0 -6
- package/dist/src/core/client.test.js +0 -2654
- package/dist/src/core/client.test.js.map +0 -1
- package/dist/src/core/contentGenerator.multiProvider.test.d.ts +0 -6
- package/dist/src/core/contentGenerator.multiProvider.test.js +0 -314
- package/dist/src/core/contentGenerator.multiProvider.test.js.map +0 -1
- package/dist/src/core/contentGenerator.test.d.ts +0 -6
- package/dist/src/core/contentGenerator.test.js +0 -299
- package/dist/src/core/contentGenerator.test.js.map +0 -1
- package/dist/src/core/contentGenerator_new_types.test.d.ts +0 -6
- package/dist/src/core/contentGenerator_new_types.test.js +0 -292
- package/dist/src/core/contentGenerator_new_types.test.js.map +0 -1
- package/dist/src/core/coreToolHookTriggers.test.d.ts +0 -6
- package/dist/src/core/coreToolHookTriggers.test.js +0 -159
- package/dist/src/core/coreToolHookTriggers.test.js.map +0 -1
- package/dist/src/core/coreToolScheduler.test.d.ts +0 -6
- package/dist/src/core/coreToolScheduler.test.js +0 -1684
- package/dist/src/core/coreToolScheduler.test.js.map +0 -1
- package/dist/src/core/fakeContentGenerator.test.d.ts +0 -6
- package/dist/src/core/fakeContentGenerator.test.js +0 -127
- package/dist/src/core/fakeContentGenerator.test.js.map +0 -1
- package/dist/src/core/geminiChat.test.d.ts +0 -6
- package/dist/src/core/geminiChat.test.js +0 -1773
- package/dist/src/core/geminiChat.test.js.map +0 -1
- package/dist/src/core/geminiChat_network_retry.test.d.ts +0 -6
- package/dist/src/core/geminiChat_network_retry.test.js +0 -201
- package/dist/src/core/geminiChat_network_retry.test.js.map +0 -1
- package/dist/src/core/logger.test.d.ts +0 -6
- package/dist/src/core/logger.test.js +0 -550
- package/dist/src/core/logger.test.js.map +0 -1
- package/dist/src/core/loggingContentGenerator.test.d.ts +0 -6
- package/dist/src/core/loggingContentGenerator.test.js +0 -221
- package/dist/src/core/loggingContentGenerator.test.js.map +0 -1
- package/dist/src/core/prompts-substitution.test.d.ts +0 -6
- package/dist/src/core/prompts-substitution.test.js +0 -101
- package/dist/src/core/prompts-substitution.test.js.map +0 -1
- package/dist/src/core/prompts.test.d.ts +0 -6
- package/dist/src/core/prompts.test.js +0 -391
- package/dist/src/core/prompts.test.js.map +0 -1
- package/dist/src/core/recordingContentGenerator.test.d.ts +0 -6
- package/dist/src/core/recordingContentGenerator.test.js +0 -101
- package/dist/src/core/recordingContentGenerator.test.js.map +0 -1
- package/dist/src/core/tokenLimits.test.d.ts +0 -6
- package/dist/src/core/tokenLimits.test.js +0 -30
- package/dist/src/core/tokenLimits.test.js.map +0 -1
- package/dist/src/core/turn.test.d.ts +0 -6
- package/dist/src/core/turn.test.js +0 -739
- package/dist/src/core/turn.test.js.map +0 -1
- package/dist/src/fallback/handler.test.d.ts +0 -6
- package/dist/src/fallback/handler.test.js +0 -242
- package/dist/src/fallback/handler.test.js.map +0 -1
- package/dist/src/hooks/hookAggregator.test.d.ts +0 -6
- package/dist/src/hooks/hookAggregator.test.js +0 -387
- package/dist/src/hooks/hookAggregator.test.js.map +0 -1
- package/dist/src/hooks/hookEventHandler.test.d.ts +0 -6
- package/dist/src/hooks/hookEventHandler.test.js +0 -603
- package/dist/src/hooks/hookEventHandler.test.js.map +0 -1
- package/dist/src/hooks/hookPlanner.test.d.ts +0 -6
- package/dist/src/hooks/hookPlanner.test.js +0 -315
- package/dist/src/hooks/hookPlanner.test.js.map +0 -1
- package/dist/src/hooks/hookRegistry.test.d.ts +0 -6
- package/dist/src/hooks/hookRegistry.test.js +0 -529
- package/dist/src/hooks/hookRegistry.test.js.map +0 -1
- package/dist/src/hooks/hookRunner.test.d.ts +0 -6
- package/dist/src/hooks/hookRunner.test.js +0 -606
- package/dist/src/hooks/hookRunner.test.js.map +0 -1
- package/dist/src/hooks/hookSystem.test.d.ts +0 -6
- package/dist/src/hooks/hookSystem.test.js +0 -330
- package/dist/src/hooks/hookSystem.test.js.map +0 -1
- package/dist/src/hooks/hookSystem_new_types.test.d.ts +0 -6
- package/dist/src/hooks/hookSystem_new_types.test.js +0 -243
- package/dist/src/hooks/hookSystem_new_types.test.js.map +0 -1
- package/dist/src/hooks/hookTranslator.test.d.ts +0 -6
- package/dist/src/hooks/hookTranslator.test.js +0 -192
- package/dist/src/hooks/hookTranslator.test.js.map +0 -1
- package/dist/src/hooks/trustedHooks.test.d.ts +0 -6
- package/dist/src/hooks/trustedHooks.test.js +0 -154
- package/dist/src/hooks/trustedHooks.test.js.map +0 -1
- package/dist/src/hooks/types.test.d.ts +0 -6
- package/dist/src/hooks/types.test.js +0 -278
- package/dist/src/hooks/types.test.js.map +0 -1
- package/dist/src/ide/detect-ide.test.d.ts +0 -6
- package/dist/src/ide/detect-ide.test.js +0 -195
- package/dist/src/ide/detect-ide.test.js.map +0 -1
- package/dist/src/ide/ide-client.test.d.ts +0 -6
- package/dist/src/ide/ide-client.test.js +0 -753
- package/dist/src/ide/ide-client.test.js.map +0 -1
- package/dist/src/ide/ide-installer.test.d.ts +0 -6
- package/dist/src/ide/ide-installer.test.js +0 -193
- package/dist/src/ide/ide-installer.test.js.map +0 -1
- package/dist/src/ide/ideContext.test.d.ts +0 -6
- package/dist/src/ide/ideContext.test.js +0 -393
- package/dist/src/ide/ideContext.test.js.map +0 -1
- package/dist/src/ide/process-utils.test.d.ts +0 -6
- package/dist/src/ide/process-utils.test.js +0 -151
- package/dist/src/ide/process-utils.test.js.map +0 -1
- package/dist/src/index.test.d.ts +0 -6
- package/dist/src/index.test.js +0 -53
- package/dist/src/index.test.js.map +0 -1
- package/dist/src/mcp/google-auth-provider.test.d.ts +0 -6
- package/dist/src/mcp/google-auth-provider.test.js +0 -167
- package/dist/src/mcp/google-auth-provider.test.js.map +0 -1
- package/dist/src/mcp/oauth-provider.test.d.ts +0 -6
- package/dist/src/mcp/oauth-provider.test.js +0 -1355
- package/dist/src/mcp/oauth-provider.test.js.map +0 -1
- package/dist/src/mcp/oauth-token-storage.test.d.ts +0 -6
- package/dist/src/mcp/oauth-token-storage.test.js +0 -305
- package/dist/src/mcp/oauth-token-storage.test.js.map +0 -1
- package/dist/src/mcp/oauth-utils.test.d.ts +0 -6
- package/dist/src/mcp/oauth-utils.test.js +0 -289
- package/dist/src/mcp/oauth-utils.test.js.map +0 -1
- package/dist/src/mcp/sa-impersonation-provider.test.d.ts +0 -6
- package/dist/src/mcp/sa-impersonation-provider.test.js +0 -117
- package/dist/src/mcp/sa-impersonation-provider.test.js.map +0 -1
- package/dist/src/mcp/token-storage/base-token-storage.test.d.ts +0 -6
- package/dist/src/mcp/token-storage/base-token-storage.test.js +0 -151
- package/dist/src/mcp/token-storage/base-token-storage.test.js.map +0 -1
- package/dist/src/mcp/token-storage/file-token-storage.test.d.ts +0 -6
- package/dist/src/mcp/token-storage/file-token-storage.test.js +0 -238
- package/dist/src/mcp/token-storage/file-token-storage.test.js.map +0 -1
- package/dist/src/mcp/token-storage/hybrid-token-storage.test.d.ts +0 -6
- package/dist/src/mcp/token-storage/hybrid-token-storage.test.js +0 -193
- package/dist/src/mcp/token-storage/hybrid-token-storage.test.js.map +0 -1
- package/dist/src/mcp/token-storage/keychain-token-storage.test.d.ts +0 -6
- package/dist/src/mcp/token-storage/keychain-token-storage.test.js +0 -305
- package/dist/src/mcp/token-storage/keychain-token-storage.test.js.map +0 -1
- package/dist/src/output/json-formatter.test.d.ts +0 -6
- package/dist/src/output/json-formatter.test.js +0 -294
- package/dist/src/output/json-formatter.test.js.map +0 -1
- package/dist/src/output/stream-json-formatter.test.d.ts +0 -6
- package/dist/src/output/stream-json-formatter.test.js +0 -477
- package/dist/src/output/stream-json-formatter.test.js.map +0 -1
- package/dist/src/policy/config.test.d.ts +0 -6
- package/dist/src/policy/config.test.js +0 -598
- package/dist/src/policy/config.test.js.map +0 -1
- package/dist/src/policy/persistence.test.d.ts +0 -6
- package/dist/src/policy/persistence.test.js +0 -154
- package/dist/src/policy/persistence.test.js.map +0 -1
- package/dist/src/policy/policy-engine.test.d.ts +0 -6
- package/dist/src/policy/policy-engine.test.js +0 -1299
- package/dist/src/policy/policy-engine.test.js.map +0 -1
- package/dist/src/policy/policy-updater.test.d.ts +0 -6
- package/dist/src/policy/policy-updater.test.js +0 -116
- package/dist/src/policy/policy-updater.test.js.map +0 -1
- package/dist/src/policy/shell-safety.test.d.ts +0 -6
- package/dist/src/policy/shell-safety.test.js +0 -438
- package/dist/src/policy/shell-safety.test.js.map +0 -1
- package/dist/src/policy/toml-loader.test.d.ts +0 -6
- package/dist/src/policy/toml-loader.test.js +0 -409
- package/dist/src/policy/toml-loader.test.js.map +0 -1
- package/dist/src/policy/utils.test.d.ts +0 -6
- package/dist/src/policy/utils.test.js +0 -92
- package/dist/src/policy/utils.test.js.map +0 -1
- package/dist/src/prompts/mcp-prompts.test.d.ts +0 -6
- package/dist/src/prompts/mcp-prompts.test.js +0 -39
- package/dist/src/prompts/mcp-prompts.test.js.map +0 -1
- package/dist/src/prompts/prompt-registry.test.d.ts +0 -6
- package/dist/src/prompts/prompt-registry.test.js +0 -96
- package/dist/src/prompts/prompt-registry.test.js.map +0 -1
- package/dist/src/providers/__tests__/bundleSize.test.d.ts +0 -6
- package/dist/src/providers/__tests__/bundleSize.test.js +0 -75
- package/dist/src/providers/__tests__/bundleSize.test.js.map +0 -1
- package/dist/src/providers/__tests__/errorHandling.integration.test.d.ts +0 -6
- package/dist/src/providers/__tests__/errorHandling.integration.test.js +0 -339
- package/dist/src/providers/__tests__/errorHandling.integration.test.js.map +0 -1
- package/dist/src/providers/__tests__/multiProvider.integration.test.d.ts +0 -6
- package/dist/src/providers/__tests__/multiProvider.integration.test.js +0 -419
- package/dist/src/providers/__tests__/multiProvider.integration.test.js.map +0 -1
- package/dist/src/providers/__tests__/performance.test.d.ts +0 -6
- package/dist/src/providers/__tests__/performance.test.js +0 -270
- package/dist/src/providers/__tests__/performance.test.js.map +0 -1
- package/dist/src/providers/__tests__/providerConfigIntegration.test.d.ts +0 -6
- package/dist/src/providers/__tests__/providerConfigIntegration.test.js +0 -245
- package/dist/src/providers/__tests__/providerConfigIntegration.test.js.map +0 -1
- package/dist/src/providers/baseAdapter.test.d.ts +0 -1
- package/dist/src/providers/baseAdapter.test.js +0 -142
- package/dist/src/providers/baseAdapter.test.js.map +0 -1
- package/dist/src/providers/claude/adapter.test.d.ts +0 -6
- package/dist/src/providers/claude/adapter.test.js +0 -628
- package/dist/src/providers/claude/adapter.test.js.map +0 -1
- package/dist/src/providers/claude/bootstrap.test.d.ts +0 -6
- package/dist/src/providers/claude/bootstrap.test.js +0 -74
- package/dist/src/providers/claude/bootstrap.test.js.map +0 -1
- package/dist/src/providers/claude/converter.test.d.ts +0 -6
- package/dist/src/providers/claude/converter.test.js +0 -1002
- package/dist/src/providers/claude/converter.test.js.map +0 -1
- package/dist/src/providers/claude/exports.test.d.ts +0 -6
- package/dist/src/providers/claude/exports.test.js +0 -40
- package/dist/src/providers/claude/exports.test.js.map +0 -1
- package/dist/src/providers/configAdapter.test.d.ts +0 -1
- package/dist/src/providers/configAdapter.test.js +0 -150
- package/dist/src/providers/configAdapter.test.js.map +0 -1
- package/dist/src/providers/contentResolver.test.d.ts +0 -1
- package/dist/src/providers/contentResolver.test.js +0 -89
- package/dist/src/providers/contentResolver.test.js.map +0 -1
- package/dist/src/providers/factory.test.d.ts +0 -1
- package/dist/src/providers/factory.test.js +0 -151
- package/dist/src/providers/factory.test.js.map +0 -1
- package/dist/src/providers/gemini/adapterBridge.test.d.ts +0 -6
- package/dist/src/providers/gemini/adapterBridge.test.js +0 -164
- package/dist/src/providers/gemini/adapterBridge.test.js.map +0 -1
- package/dist/src/providers/gemini/bootstrap.test.d.ts +0 -6
- package/dist/src/providers/gemini/bootstrap.test.js +0 -72
- package/dist/src/providers/gemini/bootstrap.test.js.map +0 -1
- package/dist/src/providers/gemini/configConverter.test.d.ts +0 -6
- package/dist/src/providers/gemini/configConverter.test.js +0 -218
- package/dist/src/providers/gemini/configConverter.test.js.map +0 -1
- package/dist/src/providers/gemini/errorClassifier.test.d.ts +0 -6
- package/dist/src/providers/gemini/errorClassifier.test.js +0 -83
- package/dist/src/providers/gemini/errorClassifier.test.js.map +0 -1
- package/dist/src/providers/gemini/eventMapper.test.d.ts +0 -6
- package/dist/src/providers/gemini/eventMapper.test.js +0 -502
- package/dist/src/providers/gemini/eventMapper.test.js.map +0 -1
- package/dist/src/providers/gemini/exports.test.d.ts +0 -6
- package/dist/src/providers/gemini/exports.test.js +0 -90
- package/dist/src/providers/gemini/exports.test.js.map +0 -1
- package/dist/src/providers/gemini/featureFlag.test.d.ts +0 -6
- package/dist/src/providers/gemini/featureFlag.test.js +0 -139
- package/dist/src/providers/gemini/featureFlag.test.js.map +0 -1
- package/dist/src/providers/gemini/geminiAdapter.test.d.ts +0 -6
- package/dist/src/providers/gemini/geminiAdapter.test.js +0 -279
- package/dist/src/providers/gemini/geminiAdapter.test.js.map +0 -1
- package/dist/src/providers/gemini/geminiConverter.test.d.ts +0 -6
- package/dist/src/providers/gemini/geminiConverter.test.js +0 -474
- package/dist/src/providers/gemini/geminiConverter.test.js.map +0 -1
- package/dist/src/providers/gemini/geminiParity.test.d.ts +0 -6
- package/dist/src/providers/gemini/geminiParity.test.js +0 -754
- package/dist/src/providers/gemini/geminiParity.test.js.map +0 -1
- package/dist/src/providers/gemini/geminiStream.test.d.ts +0 -6
- package/dist/src/providers/gemini/geminiStream.test.js +0 -391
- package/dist/src/providers/gemini/geminiStream.test.js.map +0 -1
- package/dist/src/providers/gemini/historyBuilder.test.d.ts +0 -6
- package/dist/src/providers/gemini/historyBuilder.test.js +0 -207
- package/dist/src/providers/gemini/historyBuilder.test.js.map +0 -1
- package/dist/src/providers/gemini/requestBuilder.test.d.ts +0 -6
- package/dist/src/providers/gemini/requestBuilder.test.js +0 -358
- package/dist/src/providers/gemini/requestBuilder.test.js.map +0 -1
- package/dist/src/providers/gemini/streamConverter.test.d.ts +0 -6
- package/dist/src/providers/gemini/streamConverter.test.js +0 -131
- package/dist/src/providers/gemini/streamConverter.test.js.map +0 -1
- package/dist/src/providers/modelSpec.test.d.ts +0 -1
- package/dist/src/providers/modelSpec.test.js +0 -119
- package/dist/src/providers/modelSpec.test.js.map +0 -1
- package/dist/src/providers/openai/adapter.test.d.ts +0 -6
- package/dist/src/providers/openai/adapter.test.js +0 -274
- package/dist/src/providers/openai/adapter.test.js.map +0 -1
- package/dist/src/providers/openai/bootstrap.test.d.ts +0 -6
- package/dist/src/providers/openai/bootstrap.test.js +0 -76
- package/dist/src/providers/openai/bootstrap.test.js.map +0 -1
- package/dist/src/providers/openai/converter.test.d.ts +0 -6
- package/dist/src/providers/openai/converter.test.js +0 -1133
- package/dist/src/providers/openai/converter.test.js.map +0 -1
- package/dist/src/providers/openai-compatible/__tests__/compatibility.test.d.ts +0 -6
- package/dist/src/providers/openai-compatible/__tests__/compatibility.test.js +0 -356
- package/dist/src/providers/openai-compatible/__tests__/compatibility.test.js.map +0 -1
- package/dist/src/providers/openai-compatible/adapter.test.d.ts +0 -6
- package/dist/src/providers/openai-compatible/adapter.test.js +0 -240
- package/dist/src/providers/openai-compatible/adapter.test.js.map +0 -1
- package/dist/src/providers/openai-compatible/bootstrap.test.d.ts +0 -6
- package/dist/src/providers/openai-compatible/bootstrap.test.js +0 -145
- package/dist/src/providers/openai-compatible/bootstrap.test.js.map +0 -1
- package/dist/src/providers/openai-compatible/promptBuilder.test.d.ts +0 -6
- package/dist/src/providers/openai-compatible/promptBuilder.test.js +0 -154
- package/dist/src/providers/openai-compatible/promptBuilder.test.js.map +0 -1
- package/dist/src/providers/providerConfig.test.d.ts +0 -1
- package/dist/src/providers/providerConfig.test.js +0 -145
- package/dist/src/providers/providerConfig.test.js.map +0 -1
- package/dist/src/providers/providerConfigIntegration.test.d.ts +0 -6
- package/dist/src/providers/providerConfigIntegration.test.js +0 -187
- package/dist/src/providers/providerConfigIntegration.test.js.map +0 -1
- package/dist/src/providers/providerSelector.test.d.ts +0 -1
- package/dist/src/providers/providerSelector.test.js +0 -199
- package/dist/src/providers/providerSelector.test.js.map +0 -1
- package/dist/src/providers/providerTypes.test.d.ts +0 -1
- package/dist/src/providers/providerTypes.test.js +0 -95
- package/dist/src/providers/providerTypes.test.js.map +0 -1
- package/dist/src/providers/registry.test.d.ts +0 -1
- package/dist/src/providers/registry.test.js +0 -207
- package/dist/src/providers/registry.test.js.map +0 -1
- package/dist/src/providers/streamAssembler.test.d.ts +0 -1
- package/dist/src/providers/streamAssembler.test.js +0 -247
- package/dist/src/providers/streamAssembler.test.js.map +0 -1
- package/dist/src/providers/telemetryBridge.test.d.ts +0 -6
- package/dist/src/providers/telemetryBridge.test.js +0 -235
- package/dist/src/providers/telemetryBridge.test.js.map +0 -1
- package/dist/src/providers/types.test.d.ts +0 -6
- package/dist/src/providers/types.test.js +0 -253
- package/dist/src/providers/types.test.js.map +0 -1
- package/dist/src/resources/resource-registry.test.d.ts +0 -6
- package/dist/src/resources/resource-registry.test.js +0 -54
- package/dist/src/resources/resource-registry.test.js.map +0 -1
- package/dist/src/routing/modelRouterService.test.d.ts +0 -6
- package/dist/src/routing/modelRouterService.test.js +0 -106
- package/dist/src/routing/modelRouterService.test.js.map +0 -1
- package/dist/src/routing/strategies/classifierStrategy.test.d.ts +0 -6
- package/dist/src/routing/strategies/classifierStrategy.test.js +0 -249
- package/dist/src/routing/strategies/classifierStrategy.test.js.map +0 -1
- package/dist/src/routing/strategies/compositeStrategy.test.d.ts +0 -6
- package/dist/src/routing/strategies/compositeStrategy.test.js +0 -124
- package/dist/src/routing/strategies/compositeStrategy.test.js.map +0 -1
- package/dist/src/routing/strategies/defaultStrategy.test.d.ts +0 -6
- package/dist/src/routing/strategies/defaultStrategy.test.js +0 -102
- package/dist/src/routing/strategies/defaultStrategy.test.js.map +0 -1
- package/dist/src/routing/strategies/fallbackStrategy.test.d.ts +0 -6
- package/dist/src/routing/strategies/fallbackStrategy.test.js +0 -96
- package/dist/src/routing/strategies/fallbackStrategy.test.js.map +0 -1
- package/dist/src/routing/strategies/numericalClassifierStrategy.test.d.ts +0 -6
- package/dist/src/routing/strategies/numericalClassifierStrategy.test.js +0 -367
- package/dist/src/routing/strategies/numericalClassifierStrategy.test.js.map +0 -1
- package/dist/src/routing/strategies/overrideStrategy.test.d.ts +0 -6
- package/dist/src/routing/strategies/overrideStrategy.test.js +0 -59
- package/dist/src/routing/strategies/overrideStrategy.test.js.map +0 -1
- package/dist/src/safety/built-in.test.d.ts +0 -6
- package/dist/src/safety/built-in.test.js +0 -199
- package/dist/src/safety/built-in.test.js.map +0 -1
- package/dist/src/safety/checker-runner.test.d.ts +0 -6
- package/dist/src/safety/checker-runner.test.js +0 -238
- package/dist/src/safety/checker-runner.test.js.map +0 -1
- package/dist/src/safety/context-builder.test.d.ts +0 -6
- package/dist/src/safety/context-builder.test.js +0 -49
- package/dist/src/safety/context-builder.test.js.map +0 -1
- package/dist/src/safety/registry.test.d.ts +0 -6
- package/dist/src/safety/registry.test.js +0 -31
- package/dist/src/safety/registry.test.js.map +0 -1
- package/dist/src/scheduler/confirmation.test.d.ts +0 -6
- package/dist/src/scheduler/confirmation.test.js +0 -325
- package/dist/src/scheduler/confirmation.test.js.map +0 -1
- package/dist/src/scheduler/policy.test.d.ts +0 -6
- package/dist/src/scheduler/policy.test.js +0 -299
- package/dist/src/scheduler/policy.test.js.map +0 -1
- package/dist/src/scheduler/scheduler.test.d.ts +0 -6
- package/dist/src/scheduler/scheduler.test.js +0 -822
- package/dist/src/scheduler/scheduler.test.js.map +0 -1
- package/dist/src/scheduler/state-manager.test.d.ts +0 -6
- package/dist/src/scheduler/state-manager.test.js +0 -429
- package/dist/src/scheduler/state-manager.test.js.map +0 -1
- package/dist/src/scheduler/tool-executor.test.d.ts +0 -6
- package/dist/src/scheduler/tool-executor.test.js +0 -232
- package/dist/src/scheduler/tool-executor.test.js.map +0 -1
- package/dist/src/scheduler/tool-modifier.test.d.ts +0 -6
- package/dist/src/scheduler/tool-modifier.test.js +0 -159
- package/dist/src/scheduler/tool-modifier.test.js.map +0 -1
- package/dist/src/services/chatCompressionService.test.d.ts +0 -6
- package/dist/src/services/chatCompressionService.test.js +0 -573
- package/dist/src/services/chatCompressionService.test.js.map +0 -1
- package/dist/src/services/chatRecordingService.test.d.ts +0 -6
- package/dist/src/services/chatRecordingService.test.js +0 -486
- package/dist/src/services/chatRecordingService.test.js.map +0 -1
- package/dist/src/services/contextManager.test.d.ts +0 -6
- package/dist/src/services/contextManager.test.js +0 -104
- package/dist/src/services/contextManager.test.js.map +0 -1
- package/dist/src/services/environmentSanitization.test.d.ts +0 -6
- package/dist/src/services/environmentSanitization.test.js +0 -284
- package/dist/src/services/environmentSanitization.test.js.map +0 -1
- package/dist/src/services/fileDiscoveryService.test.d.ts +0 -6
- package/dist/src/services/fileDiscoveryService.test.js +0 -223
- package/dist/src/services/fileDiscoveryService.test.js.map +0 -1
- package/dist/src/services/fileSystemService.test.d.ts +0 -6
- package/dist/src/services/fileSystemService.test.js +0 -41
- package/dist/src/services/fileSystemService.test.js.map +0 -1
- package/dist/src/services/gitService.test.d.ts +0 -6
- package/dist/src/services/gitService.test.js +0 -264
- package/dist/src/services/gitService.test.js.map +0 -1
- package/dist/src/services/loopDetectionService.test.d.ts +0 -6
- package/dist/src/services/loopDetectionService.test.js +0 -881
- package/dist/src/services/loopDetectionService.test.js.map +0 -1
- package/dist/src/services/modelConfig.golden.test.d.ts +0 -6
- package/dist/src/services/modelConfig.golden.test.js +0 -74
- package/dist/src/services/modelConfig.golden.test.js.map +0 -1
- package/dist/src/services/modelConfig.integration.test.d.ts +0 -6
- package/dist/src/services/modelConfig.integration.test.js +0 -247
- package/dist/src/services/modelConfig.integration.test.js.map +0 -1
- package/dist/src/services/modelConfigBridge.test.d.ts +0 -6
- package/dist/src/services/modelConfigBridge.test.js +0 -410
- package/dist/src/services/modelConfigBridge.test.js.map +0 -1
- package/dist/src/services/modelConfigService.test.d.ts +0 -6
- package/dist/src/services/modelConfigService.test.js +0 -868
- package/dist/src/services/modelConfigService.test.js.map +0 -1
- package/dist/src/services/sessionSummaryService.test.d.ts +0 -6
- package/dist/src/services/sessionSummaryService.test.js +0 -785
- package/dist/src/services/sessionSummaryService.test.js.map +0 -1
- package/dist/src/services/sessionSummaryUtils.test.d.ts +0 -6
- package/dist/src/services/sessionSummaryUtils.test.js +0 -160
- package/dist/src/services/sessionSummaryUtils.test.js.map +0 -1
- package/dist/src/services/shellExecutionService.test.d.ts +0 -6
- package/dist/src/services/shellExecutionService.test.js +0 -1080
- package/dist/src/services/shellExecutionService.test.js.map +0 -1
- package/dist/src/skills/skillLoader.test.d.ts +0 -6
- package/dist/src/skills/skillLoader.test.js +0 -185
- package/dist/src/skills/skillLoader.test.js.map +0 -1
- package/dist/src/skills/skillManager.test.d.ts +0 -6
- package/dist/src/skills/skillManager.test.js +0 -297
- package/dist/src/skills/skillManager.test.js.map +0 -1
- package/dist/src/telemetry/activity-detector.test.d.ts +0 -6
- package/dist/src/telemetry/activity-detector.test.js +0 -136
- package/dist/src/telemetry/activity-detector.test.js.map +0 -1
- package/dist/src/telemetry/activity-monitor.test.d.ts +0 -6
- package/dist/src/telemetry/activity-monitor.test.js +0 -251
- package/dist/src/telemetry/activity-monitor.test.js.map +0 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.d.ts +0 -19
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +0 -964
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +0 -1
- package/dist/src/telemetry/config.test.d.ts +0 -6
- package/dist/src/telemetry/config.test.js +0 -149
- package/dist/src/telemetry/config.test.js.map +0 -1
- package/dist/src/telemetry/gcp-exporters.test.d.ts +0 -6
- package/dist/src/telemetry/gcp-exporters.test.js +0 -318
- package/dist/src/telemetry/gcp-exporters.test.js.map +0 -1
- package/dist/src/telemetry/high-water-mark-tracker.test.d.ts +0 -6
- package/dist/src/telemetry/high-water-mark-tracker.test.js +0 -152
- package/dist/src/telemetry/high-water-mark-tracker.test.js.map +0 -1
- package/dist/src/telemetry/integration.test.circular.d.ts +0 -6
- package/dist/src/telemetry/integration.test.circular.js +0 -54
- package/dist/src/telemetry/integration.test.circular.js.map +0 -1
- package/dist/src/telemetry/loggers.test.circular.d.ts +0 -6
- package/dist/src/telemetry/loggers.test.circular.js +0 -107
- package/dist/src/telemetry/loggers.test.circular.js.map +0 -1
- package/dist/src/telemetry/loggers.test.d.ts +0 -6
- package/dist/src/telemetry/loggers.test.js +0 -1618
- package/dist/src/telemetry/loggers.test.js.map +0 -1
- package/dist/src/telemetry/memory-monitor.test.d.ts +0 -6
- package/dist/src/telemetry/memory-monitor.test.js +0 -472
- package/dist/src/telemetry/memory-monitor.test.js.map +0 -1
- package/dist/src/telemetry/metrics.test.d.ts +0 -6
- package/dist/src/telemetry/metrics.test.js +0 -1176
- package/dist/src/telemetry/metrics.test.js.map +0 -1
- package/dist/src/telemetry/rate-limiter.test.d.ts +0 -6
- package/dist/src/telemetry/rate-limiter.test.js +0 -207
- package/dist/src/telemetry/rate-limiter.test.js.map +0 -1
- package/dist/src/telemetry/sanitize.test.d.ts +0 -6
- package/dist/src/telemetry/sanitize.test.js +0 -279
- package/dist/src/telemetry/sanitize.test.js.map +0 -1
- package/dist/src/telemetry/sdk.test.d.ts +0 -6
- package/dist/src/telemetry/sdk.test.js +0 -360
- package/dist/src/telemetry/sdk.test.js.map +0 -1
- package/dist/src/telemetry/semantic.test.d.ts +0 -6
- package/dist/src/telemetry/semantic.test.js +0 -387
- package/dist/src/telemetry/semantic.test.js.map +0 -1
- package/dist/src/telemetry/semantic.truncation.test.d.ts +0 -1
- package/dist/src/telemetry/semantic.truncation.test.js +0 -92
- package/dist/src/telemetry/semantic.truncation.test.js.map +0 -1
- package/dist/src/telemetry/startupProfiler.test.d.ts +0 -6
- package/dist/src/telemetry/startupProfiler.test.js +0 -285
- package/dist/src/telemetry/startupProfiler.test.js.map +0 -1
- package/dist/src/telemetry/telemetry-utils.test.d.ts +0 -6
- package/dist/src/telemetry/telemetry-utils.test.js +0 -41
- package/dist/src/telemetry/telemetry-utils.test.js.map +0 -1
- package/dist/src/telemetry/telemetry.test.d.ts +0 -6
- package/dist/src/telemetry/telemetry.test.js +0 -57
- package/dist/src/telemetry/telemetry.test.js.map +0 -1
- package/dist/src/telemetry/uiTelemetry.test.d.ts +0 -6
- package/dist/src/telemetry/uiTelemetry.test.js +0 -584
- package/dist/src/telemetry/uiTelemetry.test.js.map +0 -1
- package/dist/src/tools/activate-skill.test.d.ts +0 -6
- package/dist/src/tools/activate-skill.test.js +0 -113
- package/dist/src/tools/activate-skill.test.js.map +0 -1
- package/dist/src/tools/ask-user.test.d.ts +0 -6
- package/dist/src/tools/ask-user.test.js +0 -187
- package/dist/src/tools/ask-user.test.js.map +0 -1
- package/dist/src/tools/base-tool-invocation.test.d.ts +0 -6
- package/dist/src/tools/base-tool-invocation.test.js +0 -85
- package/dist/src/tools/base-tool-invocation.test.js.map +0 -1
- package/dist/src/tools/confirmation-policy.test.d.ts +0 -6
- package/dist/src/tools/confirmation-policy.test.js +0 -143
- package/dist/src/tools/confirmation-policy.test.js.map +0 -1
- package/dist/src/tools/diffOptions.test.d.ts +0 -6
- package/dist/src/tools/diffOptions.test.js +0 -172
- package/dist/src/tools/diffOptions.test.js.map +0 -1
- package/dist/src/tools/edit.test.d.ts +0 -6
- package/dist/src/tools/edit.test.js +0 -729
- package/dist/src/tools/edit.test.js.map +0 -1
- package/dist/src/tools/get-internal-docs.test.d.ts +0 -6
- package/dist/src/tools/get-internal-docs.test.js +0 -57
- package/dist/src/tools/get-internal-docs.test.js.map +0 -1
- package/dist/src/tools/glob.test.d.ts +0 -6
- package/dist/src/tools/glob.test.js +0 -433
- package/dist/src/tools/glob.test.js.map +0 -1
- package/dist/src/tools/grep.test.d.ts +0 -6
- package/dist/src/tools/grep.test.js +0 -328
- package/dist/src/tools/grep.test.js.map +0 -1
- package/dist/src/tools/ls.test.d.ts +0 -6
- package/dist/src/tools/ls.test.js +0 -242
- package/dist/src/tools/ls.test.js.map +0 -1
- package/dist/src/tools/mcp-client-manager.test.d.ts +0 -6
- package/dist/src/tools/mcp-client-manager.test.js +0 -251
- package/dist/src/tools/mcp-client-manager.test.js.map +0 -1
- package/dist/src/tools/mcp-client.test.d.ts +0 -6
- package/dist/src/tools/mcp-client.test.js +0 -1346
- package/dist/src/tools/mcp-client.test.js.map +0 -1
- package/dist/src/tools/mcp-tool.test.d.ts +0 -6
- package/dist/src/tools/mcp-tool.test.js +0 -657
- package/dist/src/tools/mcp-tool.test.js.map +0 -1
- package/dist/src/tools/memoryTool.test.d.ts +0 -6
- package/dist/src/tools/memoryTool.test.js +0 -302
- package/dist/src/tools/memoryTool.test.js.map +0 -1
- package/dist/src/tools/message-bus-integration.test.d.ts +0 -6
- package/dist/src/tools/message-bus-integration.test.js +0 -169
- package/dist/src/tools/message-bus-integration.test.js.map +0 -1
- package/dist/src/tools/modifiable-tool.test.d.ts +0 -6
- package/dist/src/tools/modifiable-tool.test.js +0 -237
- package/dist/src/tools/modifiable-tool.test.js.map +0 -1
- package/dist/src/tools/read-file.test.d.ts +0 -6
- package/dist/src/tools/read-file.test.js +0 -376
- package/dist/src/tools/read-file.test.js.map +0 -1
- package/dist/src/tools/read-many-files.test.d.ts +0 -6
- package/dist/src/tools/read-many-files.test.js +0 -567
- package/dist/src/tools/read-many-files.test.js.map +0 -1
- package/dist/src/tools/ripGrep.test.d.ts +0 -6
- package/dist/src/tools/ripGrep.test.js +0 -1139
- package/dist/src/tools/ripGrep.test.js.map +0 -1
- package/dist/src/tools/shell.test.d.ts +0 -6
- package/dist/src/tools/shell.test.js +0 -526
- package/dist/src/tools/shell.test.js.map +0 -1
- package/dist/src/tools/tool-names.test.d.ts +0 -6
- package/dist/src/tools/tool-names.test.js +0 -43
- package/dist/src/tools/tool-names.test.js.map +0 -1
- package/dist/src/tools/tool-registry.test.d.ts +0 -6
- package/dist/src/tools/tool-registry.test.js +0 -461
- package/dist/src/tools/tool-registry.test.js.map +0 -1
- package/dist/src/tools/tools.test.d.ts +0 -6
- package/dist/src/tools/tools.test.js +0 -207
- package/dist/src/tools/tools.test.js.map +0 -1
- package/dist/src/tools/web-fetch.test.d.ts +0 -6
- package/dist/src/tools/web-fetch.test.js +0 -442
- package/dist/src/tools/web-fetch.test.js.map +0 -1
- package/dist/src/tools/web-search.test.d.ts +0 -6
- package/dist/src/tools/web-search.test.js +0 -214
- package/dist/src/tools/web-search.test.js.map +0 -1
- package/dist/src/tools/write-file.test.d.ts +0 -6
- package/dist/src/tools/write-file.test.js +0 -681
- package/dist/src/tools/write-file.test.js.map +0 -1
- package/dist/src/tools/write-todos.test.d.ts +0 -6
- package/dist/src/tools/write-todos.test.js +0 -90
- package/dist/src/tools/write-todos.test.js.map +0 -1
- package/dist/src/utils/apiConversionUtils.test.d.ts +0 -6
- package/dist/src/utils/apiConversionUtils.test.js +0 -150
- package/dist/src/utils/apiConversionUtils.test.js.map +0 -1
- package/dist/src/utils/bfsFileSearch.test.d.ts +0 -6
- package/dist/src/utils/bfsFileSearch.test.js +0 -227
- package/dist/src/utils/bfsFileSearch.test.js.map +0 -1
- package/dist/src/utils/channel.test.d.ts +0 -6
- package/dist/src/utils/channel.test.js +0 -170
- package/dist/src/utils/channel.test.js.map +0 -1
- package/dist/src/utils/checkpointUtils.test.d.ts +0 -6
- package/dist/src/utils/checkpointUtils.test.js +0 -229
- package/dist/src/utils/checkpointUtils.test.js.map +0 -1
- package/dist/src/utils/customHeaderUtils.test.d.ts +0 -6
- package/dist/src/utils/customHeaderUtils.test.js +0 -77
- package/dist/src/utils/customHeaderUtils.test.js.map +0 -1
- package/dist/src/utils/debugLogger.test.d.ts +0 -6
- package/dist/src/utils/debugLogger.test.js +0 -69
- package/dist/src/utils/debugLogger.test.js.map +0 -1
- package/dist/src/utils/delay.test.d.ts +0 -6
- package/dist/src/utils/delay.test.js +0 -88
- package/dist/src/utils/delay.test.js.map +0 -1
- package/dist/src/utils/editCorrector.test.d.ts +0 -6
- package/dist/src/utils/editCorrector.test.js +0 -533
- package/dist/src/utils/editCorrector.test.js.map +0 -1
- package/dist/src/utils/editor.test.d.ts +0 -6
- package/dist/src/utils/editor.test.js +0 -429
- package/dist/src/utils/editor.test.js.map +0 -1
- package/dist/src/utils/environmentContext.test.d.ts +0 -6
- package/dist/src/utils/environmentContext.test.js +0 -114
- package/dist/src/utils/environmentContext.test.js.map +0 -1
- package/dist/src/utils/errorParsing.test.d.ts +0 -6
- package/dist/src/utils/errorParsing.test.js +0 -84
- package/dist/src/utils/errorParsing.test.js.map +0 -1
- package/dist/src/utils/errorReporting.test.d.ts +0 -6
- package/dist/src/utils/errorReporting.test.js +0 -133
- package/dist/src/utils/errorReporting.test.js.map +0 -1
- package/dist/src/utils/errors.test.d.ts +0 -6
- package/dist/src/utils/errors.test.js +0 -155
- package/dist/src/utils/errors.test.js.map +0 -1
- package/dist/src/utils/events.test.d.ts +0 -6
- package/dist/src/utils/events.test.js +0 -237
- package/dist/src/utils/events.test.js.map +0 -1
- package/dist/src/utils/extensionLoader.test.d.ts +0 -6
- package/dist/src/utils/extensionLoader.test.js +0 -176
- package/dist/src/utils/extensionLoader.test.js.map +0 -1
- package/dist/src/utils/fileDiffUtils.test.d.ts +0 -6
- package/dist/src/utils/fileDiffUtils.test.js +0 -84
- package/dist/src/utils/fileDiffUtils.test.js.map +0 -1
- package/dist/src/utils/fileUtils.test.d.ts +0 -6
- package/dist/src/utils/fileUtils.test.js +0 -780
- package/dist/src/utils/fileUtils.test.js.map +0 -1
- package/dist/src/utils/filesearch/crawlCache.test.d.ts +0 -6
- package/dist/src/utils/filesearch/crawlCache.test.js +0 -103
- package/dist/src/utils/filesearch/crawlCache.test.js.map +0 -1
- package/dist/src/utils/filesearch/crawler.test.d.ts +0 -6
- package/dist/src/utils/filesearch/crawler.test.js +0 -495
- package/dist/src/utils/filesearch/crawler.test.js.map +0 -1
- package/dist/src/utils/filesearch/fileSearch.test.d.ts +0 -6
- package/dist/src/utils/filesearch/fileSearch.test.js +0 -663
- package/dist/src/utils/filesearch/fileSearch.test.js.map +0 -1
- package/dist/src/utils/filesearch/ignore.test.d.ts +0 -6
- package/dist/src/utils/filesearch/ignore.test.js +0 -144
- package/dist/src/utils/filesearch/ignore.test.js.map +0 -1
- package/dist/src/utils/filesearch/result-cache.test.d.ts +0 -6
- package/dist/src/utils/filesearch/result-cache.test.js +0 -46
- package/dist/src/utils/filesearch/result-cache.test.js.map +0 -1
- package/dist/src/utils/flashFallback.test.d.ts +0 -6
- package/dist/src/utils/flashFallback.test.js +0 -103
- package/dist/src/utils/flashFallback.test.js.map +0 -1
- package/dist/src/utils/formatters.test.d.ts +0 -6
- package/dist/src/utils/formatters.test.js +0 -26
- package/dist/src/utils/formatters.test.js.map +0 -1
- package/dist/src/utils/geminiIgnoreParser.test.d.ts +0 -6
- package/dist/src/utils/geminiIgnoreParser.test.js +0 -98
- package/dist/src/utils/geminiIgnoreParser.test.js.map +0 -1
- package/dist/src/utils/geminiTypeConversion.test.d.ts +0 -6
- package/dist/src/utils/geminiTypeConversion.test.js +0 -310
- package/dist/src/utils/geminiTypeConversion.test.js.map +0 -1
- package/dist/src/utils/generateContentResponseUtilities.test.d.ts +0 -6
- package/dist/src/utils/generateContentResponseUtilities.test.js +0 -512
- package/dist/src/utils/generateContentResponseUtilities.test.js.map +0 -1
- package/dist/src/utils/getFolderStructure.test.d.ts +0 -6
- package/dist/src/utils/getFolderStructure.test.js +0 -283
- package/dist/src/utils/getFolderStructure.test.js.map +0 -1
- package/dist/src/utils/gitIgnoreParser.test.d.ts +0 -6
- package/dist/src/utils/gitIgnoreParser.test.js +0 -243
- package/dist/src/utils/gitIgnoreParser.test.js.map +0 -1
- package/dist/src/utils/googleErrors.test.d.ts +0 -6
- package/dist/src/utils/googleErrors.test.js +0 -309
- package/dist/src/utils/googleErrors.test.js.map +0 -1
- package/dist/src/utils/googleQuotaErrors.test.d.ts +0 -6
- package/dist/src/utils/googleQuotaErrors.test.js +0 -548
- package/dist/src/utils/googleQuotaErrors.test.js.map +0 -1
- package/dist/src/utils/ignorePatterns.test.d.ts +0 -6
- package/dist/src/utils/ignorePatterns.test.js +0 -246
- package/dist/src/utils/ignorePatterns.test.js.map +0 -1
- package/dist/src/utils/installationManager.test.d.ts +0 -6
- package/dist/src/utils/installationManager.test.js +0 -93
- package/dist/src/utils/installationManager.test.js.map +0 -1
- package/dist/src/utils/llm-edit-fixer.test.d.ts +0 -6
- package/dist/src/utils/llm-edit-fixer.test.js +0 -223
- package/dist/src/utils/llm-edit-fixer.test.js.map +0 -1
- package/dist/src/utils/llmUtils.test.d.ts +0 -6
- package/dist/src/utils/llmUtils.test.js +0 -196
- package/dist/src/utils/llmUtils.test.js.map +0 -1
- package/dist/src/utils/memoryDiscovery.test.d.ts +0 -6
- package/dist/src/utils/memoryDiscovery.test.js +0 -542
- package/dist/src/utils/memoryDiscovery.test.js.map +0 -1
- package/dist/src/utils/memoryImportProcessor.test.d.ts +0 -6
- package/dist/src/utils/memoryImportProcessor.test.js +0 -581
- package/dist/src/utils/memoryImportProcessor.test.js.map +0 -1
- package/dist/src/utils/nextSpeakerChecker.test.d.ts +0 -6
- package/dist/src/utils/nextSpeakerChecker.test.js +0 -191
- package/dist/src/utils/nextSpeakerChecker.test.js.map +0 -1
- package/dist/src/utils/partUtils.test.d.ts +0 -6
- package/dist/src/utils/partUtils.test.js +0 -397
- package/dist/src/utils/partUtils.test.js.map +0 -1
- package/dist/src/utils/pathCorrector.test.d.ts +0 -6
- package/dist/src/utils/pathCorrector.test.js +0 -87
- package/dist/src/utils/pathCorrector.test.js.map +0 -1
- package/dist/src/utils/pathReader.test.d.ts +0 -6
- package/dist/src/utils/pathReader.test.js +0 -406
- package/dist/src/utils/pathReader.test.js.map +0 -1
- package/dist/src/utils/paths.test.d.ts +0 -6
- package/dist/src/utils/paths.test.js +0 -402
- package/dist/src/utils/paths.test.js.map +0 -1
- package/dist/src/utils/retry.test.d.ts +0 -6
- package/dist/src/utils/retry.test.js +0 -548
- package/dist/src/utils/retry.test.js.map +0 -1
- package/dist/src/utils/retry_llm_error.test.d.ts +0 -6
- package/dist/src/utils/retry_llm_error.test.js +0 -280
- package/dist/src/utils/retry_llm_error.test.js.map +0 -1
- package/dist/src/utils/safeJsonStringify.test.d.ts +0 -6
- package/dist/src/utils/safeJsonStringify.test.js +0 -61
- package/dist/src/utils/safeJsonStringify.test.js.map +0 -1
- package/dist/src/utils/schemaValidator.test.d.ts +0 -6
- package/dist/src/utils/schemaValidator.test.js +0 -113
- package/dist/src/utils/schemaValidator.test.js.map +0 -1
- package/dist/src/utils/secure-browser-launcher.test.d.ts +0 -6
- package/dist/src/utils/secure-browser-launcher.test.js +0 -149
- package/dist/src/utils/secure-browser-launcher.test.js.map +0 -1
- package/dist/src/utils/security.test.d.ts +0 -1
- package/dist/src/utils/security.test.js +0 -121
- package/dist/src/utils/security.test.js.map +0 -1
- package/dist/src/utils/shell-utils.integration.test.d.ts +0 -1
- package/dist/src/utils/shell-utils.integration.test.js +0 -58
- package/dist/src/utils/shell-utils.integration.test.js.map +0 -1
- package/dist/src/utils/shell-utils.test.d.ts +0 -6
- package/dist/src/utils/shell-utils.test.js +0 -437
- package/dist/src/utils/shell-utils.test.js.map +0 -1
- package/dist/src/utils/stdio.test.d.ts +0 -6
- package/dist/src/utils/stdio.test.js +0 -47
- package/dist/src/utils/stdio.test.js.map +0 -1
- package/dist/src/utils/summarizer.test.d.ts +0 -6
- package/dist/src/utils/summarizer.test.js +0 -152
- package/dist/src/utils/summarizer.test.js.map +0 -1
- package/dist/src/utils/systemEncoding.test.d.ts +0 -6
- package/dist/src/utils/systemEncoding.test.js +0 -369
- package/dist/src/utils/systemEncoding.test.js.map +0 -1
- package/dist/src/utils/terminalSerializer.test.d.ts +0 -6
- package/dist/src/utils/terminalSerializer.test.js +0 -193
- package/dist/src/utils/terminalSerializer.test.js.map +0 -1
- package/dist/src/utils/textUtils.test.d.ts +0 -6
- package/dist/src/utils/textUtils.test.js +0 -76
- package/dist/src/utils/textUtils.test.js.map +0 -1
- package/dist/src/utils/thoughtUtils.test.d.ts +0 -6
- package/dist/src/utils/thoughtUtils.test.js +0 -78
- package/dist/src/utils/thoughtUtils.test.js.map +0 -1
- package/dist/src/utils/tokenCalculation.test.d.ts +0 -6
- package/dist/src/utils/tokenCalculation.test.js +0 -184
- package/dist/src/utils/tokenCalculation.test.js.map +0 -1
- package/dist/src/utils/tool-utils.test.d.ts +0 -6
- package/dist/src/utils/tool-utils.test.js +0 -84
- package/dist/src/utils/tool-utils.test.js.map +0 -1
- package/dist/src/utils/toolCallContext.test.d.ts +0 -6
- package/dist/src/utils/toolCallContext.test.js +0 -68
- package/dist/src/utils/toolCallContext.test.js.map +0 -1
- package/dist/src/utils/userAccountManager.test.d.ts +0 -6
- package/dist/src/utils/userAccountManager.test.js +0 -225
- package/dist/src/utils/userAccountManager.test.js.map +0 -1
- package/dist/src/utils/version.test.d.ts +0 -6
- package/dist/src/utils/version.test.js +0 -39
- package/dist/src/utils/version.test.js.map +0 -1
- package/dist/src/utils/workspaceContext.test.d.ts +0 -6
- package/dist/src/utils/workspaceContext.test.js +0 -374
- package/dist/src/utils/workspaceContext.test.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,1002 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2026 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* TDD tests for ClaudeConverter — converts between
|
|
8
|
-
* provider-independent types (Llm*) and Anthropic SDK types.
|
|
9
|
-
*
|
|
10
|
-
* @see docs/ai_adapter/03-technical-design.md §3.3.4
|
|
11
|
-
* @see packages/core/src/providers/gemini/geminiConverter.test.ts (Gemini counterpart)
|
|
12
|
-
*/
|
|
13
|
-
import { describe, it, expect, beforeEach } from 'vitest';
|
|
14
|
-
import { ClaudeConverter } from './converter.js';
|
|
15
|
-
import { LlmEventType } from '../events.js';
|
|
16
|
-
describe('ClaudeConverter', () => {
|
|
17
|
-
const converter = new ClaudeConverter();
|
|
18
|
-
// ==============================================================
|
|
19
|
-
// toClaudeRequest — LlmGenerateRequest → Anthropic MessageCreateParams
|
|
20
|
-
// ==============================================================
|
|
21
|
-
describe('toClaudeRequest', () => {
|
|
22
|
-
it('should convert basic request with model and messages', () => {
|
|
23
|
-
const request = {
|
|
24
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
25
|
-
messages: [
|
|
26
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
27
|
-
],
|
|
28
|
-
};
|
|
29
|
-
const result = converter.toClaudeRequest(request);
|
|
30
|
-
expect(result['model']).toBe('claude-3-5-sonnet-20241022');
|
|
31
|
-
expect(result['messages']).toBeDefined();
|
|
32
|
-
expect(result['max_tokens']).toBeDefined();
|
|
33
|
-
});
|
|
34
|
-
it('should extract system message to system parameter', () => {
|
|
35
|
-
const request = {
|
|
36
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
37
|
-
messages: [
|
|
38
|
-
{
|
|
39
|
-
role: 'system',
|
|
40
|
-
content: [{ type: 'text', text: 'You are a helpful assistant.' }],
|
|
41
|
-
},
|
|
42
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
43
|
-
],
|
|
44
|
-
systemInstruction: 'Be concise.',
|
|
45
|
-
};
|
|
46
|
-
const result = converter.toClaudeRequest(request);
|
|
47
|
-
expect(result['system']).toBeDefined();
|
|
48
|
-
const system = result['system'];
|
|
49
|
-
expect(system).toContain('Be concise.');
|
|
50
|
-
expect(system).toContain('You are a helpful assistant.');
|
|
51
|
-
});
|
|
52
|
-
it('should convert generation parameters', () => {
|
|
53
|
-
const request = {
|
|
54
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
55
|
-
messages: [
|
|
56
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
57
|
-
],
|
|
58
|
-
temperature: 0.7,
|
|
59
|
-
maxTokens: 2048,
|
|
60
|
-
topP: 0.9,
|
|
61
|
-
topK: 40,
|
|
62
|
-
stopSequences: ['END'],
|
|
63
|
-
};
|
|
64
|
-
const result = converter.toClaudeRequest(request);
|
|
65
|
-
expect(result['temperature']).toBe(0.7);
|
|
66
|
-
expect(result['max_tokens']).toBe(2048);
|
|
67
|
-
expect(result['top_p']).toBe(0.9);
|
|
68
|
-
expect(result['top_k']).toBe(40);
|
|
69
|
-
expect(result['stop_sequences']).toEqual(['END']);
|
|
70
|
-
});
|
|
71
|
-
it('should include tools when present', () => {
|
|
72
|
-
const request = {
|
|
73
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
74
|
-
messages: [
|
|
75
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
76
|
-
],
|
|
77
|
-
tools: [
|
|
78
|
-
{
|
|
79
|
-
name: 'read_file',
|
|
80
|
-
description: 'Read a file',
|
|
81
|
-
parameters: {
|
|
82
|
-
type: 'object',
|
|
83
|
-
properties: { path: { type: 'string' } },
|
|
84
|
-
required: ['path'],
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
};
|
|
89
|
-
const result = converter.toClaudeRequest(request);
|
|
90
|
-
expect(result['tools']).toBeDefined();
|
|
91
|
-
const tools = result['tools'];
|
|
92
|
-
expect(tools).toHaveLength(1);
|
|
93
|
-
});
|
|
94
|
-
it('should include tool_choice when present', () => {
|
|
95
|
-
const request = {
|
|
96
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
97
|
-
messages: [
|
|
98
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
99
|
-
],
|
|
100
|
-
toolChoice: 'auto',
|
|
101
|
-
};
|
|
102
|
-
const result = converter.toClaudeRequest(request);
|
|
103
|
-
expect(result['tool_choice']).toBeDefined();
|
|
104
|
-
});
|
|
105
|
-
it('should use default max_tokens when not specified', () => {
|
|
106
|
-
const request = {
|
|
107
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
108
|
-
messages: [
|
|
109
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
110
|
-
],
|
|
111
|
-
};
|
|
112
|
-
const result = converter.toClaudeRequest(request);
|
|
113
|
-
expect(result['max_tokens']).toBe(8192);
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
// ==============================================================
|
|
117
|
-
// toClaudeMessages — LlmMessage[] → { messages, system }
|
|
118
|
-
// ==============================================================
|
|
119
|
-
describe('toClaudeMessages', () => {
|
|
120
|
-
it('should convert user text message', () => {
|
|
121
|
-
const messages = [
|
|
122
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
123
|
-
];
|
|
124
|
-
const result = converter.toClaudeMessages(messages);
|
|
125
|
-
expect(result.messages).toHaveLength(1);
|
|
126
|
-
expect(result.messages[0]['role']).toBe('user');
|
|
127
|
-
});
|
|
128
|
-
it('should convert assistant message', () => {
|
|
129
|
-
const messages = [
|
|
130
|
-
{ role: 'assistant', content: [{ type: 'text', text: 'Hi there' }] },
|
|
131
|
-
];
|
|
132
|
-
const result = converter.toClaudeMessages(messages);
|
|
133
|
-
expect(result.messages[0]['role']).toBe('assistant');
|
|
134
|
-
});
|
|
135
|
-
it('should extract system messages', () => {
|
|
136
|
-
const messages = [
|
|
137
|
-
{
|
|
138
|
-
role: 'system',
|
|
139
|
-
content: [{ type: 'text', text: 'You are helpful.' }],
|
|
140
|
-
},
|
|
141
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
142
|
-
];
|
|
143
|
-
const result = converter.toClaudeMessages(messages);
|
|
144
|
-
expect(result.messages).toHaveLength(1); // system excluded
|
|
145
|
-
expect(result.system).toContain('You are helpful.');
|
|
146
|
-
});
|
|
147
|
-
it('should join multiple system messages with newline separator', () => {
|
|
148
|
-
const messages = [
|
|
149
|
-
{
|
|
150
|
-
role: 'system',
|
|
151
|
-
content: [{ type: 'text', text: 'You are helpful.' }],
|
|
152
|
-
},
|
|
153
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
154
|
-
{
|
|
155
|
-
role: 'system',
|
|
156
|
-
content: [{ type: 'text', text: 'Be concise.' }],
|
|
157
|
-
},
|
|
158
|
-
];
|
|
159
|
-
const result = converter.toClaudeMessages(messages);
|
|
160
|
-
expect(result.system).toBe('You are helpful.\nBe concise.');
|
|
161
|
-
});
|
|
162
|
-
it('should handle tool role as user role', () => {
|
|
163
|
-
const messages = [
|
|
164
|
-
{
|
|
165
|
-
role: 'tool',
|
|
166
|
-
content: [
|
|
167
|
-
{
|
|
168
|
-
type: 'tool_result',
|
|
169
|
-
toolCallId: 'call-1',
|
|
170
|
-
content: 'result data',
|
|
171
|
-
},
|
|
172
|
-
],
|
|
173
|
-
},
|
|
174
|
-
];
|
|
175
|
-
const result = converter.toClaudeMessages(messages);
|
|
176
|
-
expect(result.messages[0]['role']).toBe('user');
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
// ==============================================================
|
|
180
|
-
// toClaudeContent — LlmContent[] → Anthropic ContentBlockParam[]
|
|
181
|
-
// ==============================================================
|
|
182
|
-
describe('toClaudeContent', () => {
|
|
183
|
-
it('should convert text content', () => {
|
|
184
|
-
const result = converter.toClaudeContent([
|
|
185
|
-
{ type: 'text', text: 'Hello' },
|
|
186
|
-
]);
|
|
187
|
-
expect(result).toHaveLength(1);
|
|
188
|
-
expect(result[0]).toEqual({ type: 'text', text: 'Hello' });
|
|
189
|
-
});
|
|
190
|
-
it('should convert tool_call content to tool_use block', () => {
|
|
191
|
-
const result = converter.toClaudeContent([
|
|
192
|
-
{
|
|
193
|
-
type: 'tool_call',
|
|
194
|
-
id: 'call-1',
|
|
195
|
-
name: 'read_file',
|
|
196
|
-
arguments: { path: '/tmp/test.txt' },
|
|
197
|
-
},
|
|
198
|
-
]);
|
|
199
|
-
expect(result).toHaveLength(1);
|
|
200
|
-
expect(result[0]['type']).toBe('tool_use');
|
|
201
|
-
expect(result[0]['id']).toBe('call-1');
|
|
202
|
-
expect(result[0]['name']).toBe('read_file');
|
|
203
|
-
expect(result[0]['input']).toEqual({ path: '/tmp/test.txt' });
|
|
204
|
-
});
|
|
205
|
-
it('should convert tool_result content to tool_result block', () => {
|
|
206
|
-
const result = converter.toClaudeContent([
|
|
207
|
-
{
|
|
208
|
-
type: 'tool_result',
|
|
209
|
-
toolCallId: 'call-1',
|
|
210
|
-
content: 'file content here',
|
|
211
|
-
},
|
|
212
|
-
]);
|
|
213
|
-
expect(result).toHaveLength(1);
|
|
214
|
-
expect(result[0]['type']).toBe('tool_result');
|
|
215
|
-
expect(result[0]['tool_use_id']).toBe('call-1');
|
|
216
|
-
expect(result[0]['content']).toBe('file content here');
|
|
217
|
-
});
|
|
218
|
-
it('should convert image content (base64)', () => {
|
|
219
|
-
const result = converter.toClaudeContent([
|
|
220
|
-
{
|
|
221
|
-
type: 'image',
|
|
222
|
-
source: {
|
|
223
|
-
type: 'base64',
|
|
224
|
-
mediaType: 'image/png',
|
|
225
|
-
data: 'base64data',
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
-
]);
|
|
229
|
-
expect(result).toHaveLength(1);
|
|
230
|
-
expect(result[0]['type']).toBe('image');
|
|
231
|
-
const source = result[0]['source'];
|
|
232
|
-
expect(source['type']).toBe('base64');
|
|
233
|
-
expect(source['media_type']).toBe('image/png');
|
|
234
|
-
expect(source['data']).toBe('base64data');
|
|
235
|
-
});
|
|
236
|
-
it('should skip thought content', () => {
|
|
237
|
-
const result = converter.toClaudeContent([
|
|
238
|
-
{ type: 'thought', thought: 'thinking...' },
|
|
239
|
-
]);
|
|
240
|
-
expect(result).toHaveLength(0);
|
|
241
|
-
});
|
|
242
|
-
});
|
|
243
|
-
// ==============================================================
|
|
244
|
-
// toClaudeTools — LlmToolDefinition[] → Anthropic Tool[]
|
|
245
|
-
// ==============================================================
|
|
246
|
-
describe('toClaudeTools', () => {
|
|
247
|
-
it('should convert tool definitions', () => {
|
|
248
|
-
const tools = [
|
|
249
|
-
{
|
|
250
|
-
name: 'read_file',
|
|
251
|
-
description: 'Read a file',
|
|
252
|
-
parameters: {
|
|
253
|
-
type: 'object',
|
|
254
|
-
properties: {
|
|
255
|
-
path: { type: 'string', description: 'File path' },
|
|
256
|
-
},
|
|
257
|
-
required: ['path'],
|
|
258
|
-
},
|
|
259
|
-
},
|
|
260
|
-
];
|
|
261
|
-
const result = converter.toClaudeTools(tools);
|
|
262
|
-
expect(result).toHaveLength(1);
|
|
263
|
-
expect(result[0]['name']).toBe('read_file');
|
|
264
|
-
expect(result[0]['description']).toBe('Read a file');
|
|
265
|
-
expect(result[0]['input_schema']).toEqual({
|
|
266
|
-
type: 'object',
|
|
267
|
-
properties: {
|
|
268
|
-
path: { type: 'string', description: 'File path' },
|
|
269
|
-
},
|
|
270
|
-
required: ['path'],
|
|
271
|
-
});
|
|
272
|
-
});
|
|
273
|
-
it('should return empty array for no tools', () => {
|
|
274
|
-
const result = converter.toClaudeTools([]);
|
|
275
|
-
expect(result).toHaveLength(0);
|
|
276
|
-
});
|
|
277
|
-
});
|
|
278
|
-
// ==============================================================
|
|
279
|
-
// toClaudeToolChoice — LlmToolChoice → Anthropic ToolChoice
|
|
280
|
-
// ==============================================================
|
|
281
|
-
describe('toClaudeToolChoice', () => {
|
|
282
|
-
it('should convert auto choice', () => {
|
|
283
|
-
const result = converter.toClaudeToolChoice('auto');
|
|
284
|
-
expect(result).toEqual({ type: 'auto' });
|
|
285
|
-
});
|
|
286
|
-
it('should convert none choice', () => {
|
|
287
|
-
const result = converter.toClaudeToolChoice('none');
|
|
288
|
-
expect(result).toEqual({ type: 'none' });
|
|
289
|
-
});
|
|
290
|
-
it('should convert required choice to any', () => {
|
|
291
|
-
const result = converter.toClaudeToolChoice('required');
|
|
292
|
-
expect(result).toEqual({ type: 'any' });
|
|
293
|
-
});
|
|
294
|
-
it('should convert specific tool choice', () => {
|
|
295
|
-
const result = converter.toClaudeToolChoice({ name: 'read_file' });
|
|
296
|
-
expect(result).toEqual({ type: 'tool', name: 'read_file' });
|
|
297
|
-
});
|
|
298
|
-
});
|
|
299
|
-
// ==============================================================
|
|
300
|
-
// fromClaudeResponse — Anthropic Message → LlmGenerateResponse
|
|
301
|
-
// ==============================================================
|
|
302
|
-
describe('fromClaudeResponse', () => {
|
|
303
|
-
it('should convert text response', () => {
|
|
304
|
-
const response = {
|
|
305
|
-
id: 'msg_123',
|
|
306
|
-
type: 'message',
|
|
307
|
-
role: 'assistant',
|
|
308
|
-
content: [{ type: 'text', text: 'Hello!' }],
|
|
309
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
310
|
-
stop_reason: 'end_turn',
|
|
311
|
-
usage: { input_tokens: 10, output_tokens: 5 },
|
|
312
|
-
};
|
|
313
|
-
const result = converter.fromClaudeResponse(response, 'claude-3-5-sonnet-20241022');
|
|
314
|
-
expect(result.id).toBe('msg_123');
|
|
315
|
-
expect(result.content).toHaveLength(1);
|
|
316
|
-
expect(result.content[0]).toEqual({ type: 'text', text: 'Hello!' });
|
|
317
|
-
expect(result.stopReason).toBe('end_turn');
|
|
318
|
-
expect(result.model).toBe('claude-3-5-sonnet-20241022');
|
|
319
|
-
expect(result.usage).toBeDefined();
|
|
320
|
-
expect(result.usage.promptTokens).toBe(10);
|
|
321
|
-
expect(result.usage.completionTokens).toBe(5);
|
|
322
|
-
expect(result.usage.totalTokens).toBe(15);
|
|
323
|
-
});
|
|
324
|
-
it('should convert tool_use response', () => {
|
|
325
|
-
const response = {
|
|
326
|
-
id: 'msg_456',
|
|
327
|
-
type: 'message',
|
|
328
|
-
role: 'assistant',
|
|
329
|
-
content: [
|
|
330
|
-
{
|
|
331
|
-
type: 'tool_use',
|
|
332
|
-
id: 'toolu_1',
|
|
333
|
-
name: 'read_file',
|
|
334
|
-
input: { path: '/tmp/test.txt' },
|
|
335
|
-
},
|
|
336
|
-
],
|
|
337
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
338
|
-
stop_reason: 'tool_use',
|
|
339
|
-
usage: { input_tokens: 10, output_tokens: 15 },
|
|
340
|
-
};
|
|
341
|
-
const result = converter.fromClaudeResponse(response, 'claude-3-5-sonnet-20241022');
|
|
342
|
-
expect(result.content).toHaveLength(1);
|
|
343
|
-
expect(result.content[0].type).toBe('tool_call');
|
|
344
|
-
const toolCall = result.content[0];
|
|
345
|
-
expect(toolCall.id).toBe('toolu_1');
|
|
346
|
-
expect(toolCall.name).toBe('read_file');
|
|
347
|
-
expect(toolCall.arguments).toEqual({ path: '/tmp/test.txt' });
|
|
348
|
-
expect(result.stopReason).toBe('tool_use');
|
|
349
|
-
});
|
|
350
|
-
it('should convert thinking block', () => {
|
|
351
|
-
const response = {
|
|
352
|
-
id: 'msg_789',
|
|
353
|
-
type: 'message',
|
|
354
|
-
role: 'assistant',
|
|
355
|
-
content: [
|
|
356
|
-
{ type: 'thinking', thinking: 'Let me think about this...' },
|
|
357
|
-
{ type: 'text', text: 'The answer is 42.' },
|
|
358
|
-
],
|
|
359
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
360
|
-
stop_reason: 'end_turn',
|
|
361
|
-
usage: { input_tokens: 10, output_tokens: 20 },
|
|
362
|
-
};
|
|
363
|
-
const result = converter.fromClaudeResponse(response, 'claude-3-5-sonnet-20241022');
|
|
364
|
-
expect(result.content).toHaveLength(2);
|
|
365
|
-
expect(result.content[0].type).toBe('thought');
|
|
366
|
-
expect(result.content[0].thought).toBe('Let me think about this...');
|
|
367
|
-
expect(result.content[1].type).toBe('text');
|
|
368
|
-
});
|
|
369
|
-
it('should preserve rawResponse', () => {
|
|
370
|
-
const response = {
|
|
371
|
-
id: 'msg_abc',
|
|
372
|
-
type: 'message',
|
|
373
|
-
role: 'assistant',
|
|
374
|
-
content: [{ type: 'text', text: 'ok' }],
|
|
375
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
376
|
-
stop_reason: 'end_turn',
|
|
377
|
-
usage: { input_tokens: 5, output_tokens: 2 },
|
|
378
|
-
};
|
|
379
|
-
const result = converter.fromClaudeResponse(response, 'claude-3-5-sonnet-20241022');
|
|
380
|
-
expect(result.rawResponse).toBe(response);
|
|
381
|
-
});
|
|
382
|
-
it('should handle empty content array', () => {
|
|
383
|
-
const response = {
|
|
384
|
-
id: 'msg_empty',
|
|
385
|
-
type: 'message',
|
|
386
|
-
role: 'assistant',
|
|
387
|
-
content: [],
|
|
388
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
389
|
-
stop_reason: 'end_turn',
|
|
390
|
-
usage: { input_tokens: 5, output_tokens: 0 },
|
|
391
|
-
};
|
|
392
|
-
const result = converter.fromClaudeResponse(response, 'claude-3-5-sonnet-20241022');
|
|
393
|
-
expect(result.content).toEqual([]);
|
|
394
|
-
});
|
|
395
|
-
});
|
|
396
|
-
// ==============================================================
|
|
397
|
-
// mapStopReason — Anthropic stop_reason → LlmStopReason
|
|
398
|
-
// ==============================================================
|
|
399
|
-
describe('mapStopReason', () => {
|
|
400
|
-
const cases = [
|
|
401
|
-
['end_turn', 'end_turn'],
|
|
402
|
-
['max_tokens', 'max_tokens'],
|
|
403
|
-
['stop_sequence', 'stop_sequence'],
|
|
404
|
-
['tool_use', 'tool_use'],
|
|
405
|
-
['pause_turn', 'end_turn'],
|
|
406
|
-
['refusal', 'content_filter'],
|
|
407
|
-
[null, 'end_turn'],
|
|
408
|
-
[undefined, 'end_turn'],
|
|
409
|
-
];
|
|
410
|
-
it.each(cases)('should map %s to %s', (claudeReason, expectedReason) => {
|
|
411
|
-
const result = converter.mapStopReason(claudeReason);
|
|
412
|
-
expect(result).toBe(expectedReason);
|
|
413
|
-
});
|
|
414
|
-
});
|
|
415
|
-
// ==============================================================
|
|
416
|
-
// Stream event conversion
|
|
417
|
-
// ==============================================================
|
|
418
|
-
describe('convertStreamEvent', () => {
|
|
419
|
-
let state;
|
|
420
|
-
beforeEach(() => {
|
|
421
|
-
state = converter.createStreamState();
|
|
422
|
-
});
|
|
423
|
-
it('should convert text_delta to TextDelta event', () => {
|
|
424
|
-
const event = {
|
|
425
|
-
type: 'content_block_delta',
|
|
426
|
-
index: 0,
|
|
427
|
-
delta: { type: 'text_delta', text: 'Hello' },
|
|
428
|
-
};
|
|
429
|
-
const events = converter.convertStreamEvent(event, state);
|
|
430
|
-
expect(events).toHaveLength(1);
|
|
431
|
-
expect(events[0].type).toBe(LlmEventType.TextDelta);
|
|
432
|
-
expect(events[0].text).toBe('Hello');
|
|
433
|
-
});
|
|
434
|
-
it('should convert thinking_delta to ThoughtDelta event', () => {
|
|
435
|
-
const event = {
|
|
436
|
-
type: 'content_block_delta',
|
|
437
|
-
index: 0,
|
|
438
|
-
delta: { type: 'thinking_delta', thinking: 'Thinking...' },
|
|
439
|
-
};
|
|
440
|
-
const events = converter.convertStreamEvent(event, state);
|
|
441
|
-
expect(events).toHaveLength(1);
|
|
442
|
-
expect(events[0].type).toBe(LlmEventType.ThoughtDelta);
|
|
443
|
-
expect(events[0].thought).toBe('Thinking...');
|
|
444
|
-
});
|
|
445
|
-
it('should accumulate tool_use and emit ToolCallRequest on stop', () => {
|
|
446
|
-
// Start tool call
|
|
447
|
-
const startEvent = {
|
|
448
|
-
type: 'content_block_start',
|
|
449
|
-
index: 0,
|
|
450
|
-
content_block: {
|
|
451
|
-
type: 'tool_use',
|
|
452
|
-
id: 'toolu_1',
|
|
453
|
-
name: 'read_file',
|
|
454
|
-
input: {},
|
|
455
|
-
},
|
|
456
|
-
};
|
|
457
|
-
// Delta with partial JSON
|
|
458
|
-
const deltaEvent = {
|
|
459
|
-
type: 'content_block_delta',
|
|
460
|
-
index: 0,
|
|
461
|
-
delta: {
|
|
462
|
-
type: 'input_json_delta',
|
|
463
|
-
partial_json: '{"path": "/tmp/test.txt"}',
|
|
464
|
-
},
|
|
465
|
-
};
|
|
466
|
-
// Stop event
|
|
467
|
-
const stopEvent = {
|
|
468
|
-
type: 'content_block_stop',
|
|
469
|
-
index: 0,
|
|
470
|
-
};
|
|
471
|
-
// Process events sequentially
|
|
472
|
-
const events1 = converter.convertStreamEvent(startEvent, state);
|
|
473
|
-
expect(events1).toHaveLength(0);
|
|
474
|
-
const events2 = converter.convertStreamEvent(deltaEvent, state);
|
|
475
|
-
expect(events2).toHaveLength(0);
|
|
476
|
-
const events3 = converter.convertStreamEvent(stopEvent, state);
|
|
477
|
-
expect(events3).toHaveLength(1);
|
|
478
|
-
expect(events3[0].type).toBe(LlmEventType.ToolCallRequest);
|
|
479
|
-
const toolEvent = events3[0];
|
|
480
|
-
expect(toolEvent.callId).toBe('toolu_1');
|
|
481
|
-
expect(toolEvent.name).toBe('read_file');
|
|
482
|
-
expect(toolEvent.args).toEqual({ path: '/tmp/test.txt' });
|
|
483
|
-
});
|
|
484
|
-
it('should emit Finished on message_delta with stop_reason', () => {
|
|
485
|
-
const event = {
|
|
486
|
-
type: 'message_delta',
|
|
487
|
-
delta: { stop_reason: 'end_turn', stop_sequence: null },
|
|
488
|
-
usage: { output_tokens: 42 },
|
|
489
|
-
};
|
|
490
|
-
const events = converter.convertStreamEvent(event, state);
|
|
491
|
-
expect(events).toHaveLength(1);
|
|
492
|
-
expect(events[0].type).toBe(LlmEventType.Finished);
|
|
493
|
-
const finished = events[0];
|
|
494
|
-
expect(finished.finishReason).toBe('end_turn');
|
|
495
|
-
});
|
|
496
|
-
it('should emit MessageEnd on message_stop', () => {
|
|
497
|
-
const event = { type: 'message_stop' };
|
|
498
|
-
const events = converter.convertStreamEvent(event, state);
|
|
499
|
-
expect(events).toHaveLength(1);
|
|
500
|
-
expect(events[0].type).toBe(LlmEventType.MessageEnd);
|
|
501
|
-
});
|
|
502
|
-
it('should not emit events for message_start', () => {
|
|
503
|
-
const event = {
|
|
504
|
-
type: 'message_start',
|
|
505
|
-
message: {
|
|
506
|
-
id: 'msg_123',
|
|
507
|
-
type: 'message',
|
|
508
|
-
role: 'assistant',
|
|
509
|
-
content: [],
|
|
510
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
511
|
-
usage: { input_tokens: 100, output_tokens: 0 },
|
|
512
|
-
},
|
|
513
|
-
};
|
|
514
|
-
const events = converter.convertStreamEvent(event, state);
|
|
515
|
-
expect(events).toHaveLength(0);
|
|
516
|
-
});
|
|
517
|
-
it('should include usage in Finished event using captured input_tokens', () => {
|
|
518
|
-
// Capture input_tokens from message_start
|
|
519
|
-
converter.convertStreamEvent({
|
|
520
|
-
type: 'message_start',
|
|
521
|
-
message: {
|
|
522
|
-
id: 'msg_123',
|
|
523
|
-
type: 'message',
|
|
524
|
-
role: 'assistant',
|
|
525
|
-
content: [],
|
|
526
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
527
|
-
usage: { input_tokens: 100, output_tokens: 0 },
|
|
528
|
-
},
|
|
529
|
-
}, state);
|
|
530
|
-
const event = {
|
|
531
|
-
type: 'message_delta',
|
|
532
|
-
delta: { stop_reason: 'end_turn', stop_sequence: null },
|
|
533
|
-
usage: { output_tokens: 50 },
|
|
534
|
-
};
|
|
535
|
-
const events = converter.convertStreamEvent(event, state);
|
|
536
|
-
expect(events).toHaveLength(1);
|
|
537
|
-
const finished = events[0];
|
|
538
|
-
expect(finished.usage).toBeDefined();
|
|
539
|
-
expect(finished.usage.promptTokens).toBe(100);
|
|
540
|
-
expect(finished.usage.completionTokens).toBe(50);
|
|
541
|
-
expect(finished.usage.totalTokens).toBe(150);
|
|
542
|
-
});
|
|
543
|
-
it('should not emit events for content_block_start with text type', () => {
|
|
544
|
-
const event = {
|
|
545
|
-
type: 'content_block_start',
|
|
546
|
-
index: 0,
|
|
547
|
-
content_block: { type: 'text', text: '' },
|
|
548
|
-
};
|
|
549
|
-
const events = converter.convertStreamEvent(event, state);
|
|
550
|
-
expect(events).toHaveLength(0);
|
|
551
|
-
});
|
|
552
|
-
// ---- Review Issue #2: parallel tool calls ----
|
|
553
|
-
it('should handle parallel tool calls using index-based tracking', () => {
|
|
554
|
-
// Start two tool calls at different indices
|
|
555
|
-
converter.convertStreamEvent({
|
|
556
|
-
type: 'content_block_start',
|
|
557
|
-
index: 0,
|
|
558
|
-
content_block: {
|
|
559
|
-
type: 'tool_use',
|
|
560
|
-
id: 'toolu_A',
|
|
561
|
-
name: 'read_file',
|
|
562
|
-
input: {},
|
|
563
|
-
},
|
|
564
|
-
}, state);
|
|
565
|
-
converter.convertStreamEvent({
|
|
566
|
-
type: 'content_block_start',
|
|
567
|
-
index: 1,
|
|
568
|
-
content_block: {
|
|
569
|
-
type: 'tool_use',
|
|
570
|
-
id: 'toolu_B',
|
|
571
|
-
name: 'write_file',
|
|
572
|
-
input: {},
|
|
573
|
-
},
|
|
574
|
-
}, state);
|
|
575
|
-
// Send deltas to both indices
|
|
576
|
-
converter.convertStreamEvent({
|
|
577
|
-
type: 'content_block_delta',
|
|
578
|
-
index: 0,
|
|
579
|
-
delta: {
|
|
580
|
-
type: 'input_json_delta',
|
|
581
|
-
partial_json: '{"path": "/tmp/a.txt"}',
|
|
582
|
-
},
|
|
583
|
-
}, state);
|
|
584
|
-
converter.convertStreamEvent({
|
|
585
|
-
type: 'content_block_delta',
|
|
586
|
-
index: 1,
|
|
587
|
-
delta: {
|
|
588
|
-
type: 'input_json_delta',
|
|
589
|
-
partial_json: '{"path": "/tmp/b.txt",',
|
|
590
|
-
},
|
|
591
|
-
}, state);
|
|
592
|
-
converter.convertStreamEvent({
|
|
593
|
-
type: 'content_block_delta',
|
|
594
|
-
index: 1,
|
|
595
|
-
delta: {
|
|
596
|
-
type: 'input_json_delta',
|
|
597
|
-
partial_json: ' "content": "hello"}',
|
|
598
|
-
},
|
|
599
|
-
}, state);
|
|
600
|
-
// Stop index 0 first
|
|
601
|
-
const eventsA = converter.convertStreamEvent({ type: 'content_block_stop', index: 0 }, state);
|
|
602
|
-
expect(eventsA).toHaveLength(1);
|
|
603
|
-
expect(eventsA[0].type).toBe(LlmEventType.ToolCallRequest);
|
|
604
|
-
const toolA = eventsA[0];
|
|
605
|
-
expect(toolA.callId).toBe('toolu_A');
|
|
606
|
-
expect(toolA.name).toBe('read_file');
|
|
607
|
-
expect(toolA.args).toEqual({ path: '/tmp/a.txt' });
|
|
608
|
-
// Stop index 1
|
|
609
|
-
const eventsB = converter.convertStreamEvent({ type: 'content_block_stop', index: 1 }, state);
|
|
610
|
-
expect(eventsB).toHaveLength(1);
|
|
611
|
-
expect(eventsB[0].type).toBe(LlmEventType.ToolCallRequest);
|
|
612
|
-
const toolB = eventsB[0];
|
|
613
|
-
expect(toolB.callId).toBe('toolu_B');
|
|
614
|
-
expect(toolB.name).toBe('write_file');
|
|
615
|
-
expect(toolB.args).toEqual({ path: '/tmp/b.txt', content: 'hello' });
|
|
616
|
-
});
|
|
617
|
-
});
|
|
618
|
-
// ==============================================================
|
|
619
|
-
// Review Issue #1: toCountTokensRequest
|
|
620
|
-
// ==============================================================
|
|
621
|
-
describe('toCountTokensRequest', () => {
|
|
622
|
-
it('should only include MessageCountTokensParams fields', () => {
|
|
623
|
-
const request = {
|
|
624
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
625
|
-
messages: [
|
|
626
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
627
|
-
],
|
|
628
|
-
temperature: 0.7,
|
|
629
|
-
maxTokens: 4096,
|
|
630
|
-
topP: 0.9,
|
|
631
|
-
topK: 40,
|
|
632
|
-
stopSequences: ['END'],
|
|
633
|
-
};
|
|
634
|
-
const result = converter.toCountTokensRequest(request);
|
|
635
|
-
// Should include these fields
|
|
636
|
-
expect(result['model']).toBe('claude-3-5-sonnet-20241022');
|
|
637
|
-
expect(result['messages']).toBeDefined();
|
|
638
|
-
// Should NOT include generation parameters
|
|
639
|
-
expect(result['max_tokens']).toBeUndefined();
|
|
640
|
-
expect(result['temperature']).toBeUndefined();
|
|
641
|
-
expect(result['top_p']).toBeUndefined();
|
|
642
|
-
expect(result['top_k']).toBeUndefined();
|
|
643
|
-
expect(result['stop_sequences']).toBeUndefined();
|
|
644
|
-
});
|
|
645
|
-
it('should include system when present', () => {
|
|
646
|
-
const request = {
|
|
647
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
648
|
-
messages: [
|
|
649
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
650
|
-
],
|
|
651
|
-
systemInstruction: 'Be helpful.',
|
|
652
|
-
};
|
|
653
|
-
const result = converter.toCountTokensRequest(request);
|
|
654
|
-
expect(result['system']).toBe('Be helpful.');
|
|
655
|
-
});
|
|
656
|
-
it('should include tools when present', () => {
|
|
657
|
-
const request = {
|
|
658
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
659
|
-
messages: [
|
|
660
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
661
|
-
],
|
|
662
|
-
tools: [
|
|
663
|
-
{
|
|
664
|
-
name: 'test_tool',
|
|
665
|
-
description: 'Test',
|
|
666
|
-
parameters: { type: 'object', properties: {} },
|
|
667
|
-
},
|
|
668
|
-
],
|
|
669
|
-
toolChoice: 'auto',
|
|
670
|
-
};
|
|
671
|
-
const result = converter.toCountTokensRequest(request);
|
|
672
|
-
expect(result['tools']).toBeDefined();
|
|
673
|
-
expect(result['tool_choice']).toBeDefined();
|
|
674
|
-
});
|
|
675
|
-
});
|
|
676
|
-
// ==============================================================
|
|
677
|
-
// Review Issue #3: tool_result isError + object content
|
|
678
|
-
// ==============================================================
|
|
679
|
-
describe('toClaudeContent — tool_result edge cases', () => {
|
|
680
|
-
it('should include is_error when isError is true', () => {
|
|
681
|
-
const result = converter.toClaudeContent([
|
|
682
|
-
{
|
|
683
|
-
type: 'tool_result',
|
|
684
|
-
toolCallId: 'call-1',
|
|
685
|
-
content: 'Error: file not found',
|
|
686
|
-
isError: true,
|
|
687
|
-
},
|
|
688
|
-
]);
|
|
689
|
-
expect(result).toHaveLength(1);
|
|
690
|
-
expect(result[0]['is_error']).toBe(true);
|
|
691
|
-
});
|
|
692
|
-
it('should not include is_error when isError is false or undefined', () => {
|
|
693
|
-
const result = converter.toClaudeContent([
|
|
694
|
-
{
|
|
695
|
-
type: 'tool_result',
|
|
696
|
-
toolCallId: 'call-1',
|
|
697
|
-
content: 'success',
|
|
698
|
-
},
|
|
699
|
-
]);
|
|
700
|
-
expect(result).toHaveLength(1);
|
|
701
|
-
expect(result[0]['is_error']).toBeUndefined();
|
|
702
|
-
});
|
|
703
|
-
it('should safely handle non-serializable object content for tool_result', () => {
|
|
704
|
-
// Circular reference — JSON.stringify would throw without try/catch
|
|
705
|
-
const circular = { key: 'value' };
|
|
706
|
-
circular['self'] = circular;
|
|
707
|
-
const result = converter.toClaudeContent([
|
|
708
|
-
{
|
|
709
|
-
type: 'tool_result',
|
|
710
|
-
toolCallId: 'call-1',
|
|
711
|
-
content: circular,
|
|
712
|
-
},
|
|
713
|
-
]);
|
|
714
|
-
expect(result).toHaveLength(1);
|
|
715
|
-
expect(typeof result[0]['content']).toBe('string');
|
|
716
|
-
// Should produce a fallback string, not throw
|
|
717
|
-
expect(result[0]['content']).toBeTruthy();
|
|
718
|
-
});
|
|
719
|
-
it('should stringify object content for tool_result', () => {
|
|
720
|
-
const result = converter.toClaudeContent([
|
|
721
|
-
{
|
|
722
|
-
type: 'tool_result',
|
|
723
|
-
toolCallId: 'call-1',
|
|
724
|
-
content: { key: 'value', nested: { a: 1 } },
|
|
725
|
-
},
|
|
726
|
-
]);
|
|
727
|
-
expect(result).toHaveLength(1);
|
|
728
|
-
// Object content should be stringified for Anthropic API
|
|
729
|
-
expect(typeof result[0]['content']).toBe('string');
|
|
730
|
-
const parsed = JSON.parse(result[0]['content']);
|
|
731
|
-
expect(parsed).toEqual({ key: 'value', nested: { a: 1 } });
|
|
732
|
-
});
|
|
733
|
-
});
|
|
734
|
-
// ==============================================================
|
|
735
|
-
// Review Issue #4: URL image handling
|
|
736
|
-
// ==============================================================
|
|
737
|
-
describe('toClaudeContent — URL image handling', () => {
|
|
738
|
-
it('should emit warning text block for URL images', () => {
|
|
739
|
-
const result = converter.toClaudeContent([
|
|
740
|
-
{
|
|
741
|
-
type: 'image',
|
|
742
|
-
source: {
|
|
743
|
-
type: 'url',
|
|
744
|
-
mediaType: 'image/png',
|
|
745
|
-
url: 'https://example.com/image.png',
|
|
746
|
-
},
|
|
747
|
-
},
|
|
748
|
-
]);
|
|
749
|
-
// URL images should produce a text block with warning rather than being silently dropped
|
|
750
|
-
expect(result).toHaveLength(1);
|
|
751
|
-
expect(result[0]['type']).toBe('text');
|
|
752
|
-
expect(result[0]['text'].toLowerCase()).toContain('url');
|
|
753
|
-
});
|
|
754
|
-
it('should strip query parameters from URL in warning text', () => {
|
|
755
|
-
const result = converter.toClaudeContent([
|
|
756
|
-
{
|
|
757
|
-
type: 'image',
|
|
758
|
-
source: {
|
|
759
|
-
type: 'url',
|
|
760
|
-
mediaType: 'image/jpeg',
|
|
761
|
-
url: 'https://storage.example.com/img.jpg?token=secret123&expires=9999',
|
|
762
|
-
},
|
|
763
|
-
},
|
|
764
|
-
]);
|
|
765
|
-
expect(result).toHaveLength(1);
|
|
766
|
-
const text = result[0]['text'];
|
|
767
|
-
// Should NOT contain query parameters (potential signed tokens)
|
|
768
|
-
expect(text).not.toContain('token=secret123');
|
|
769
|
-
expect(text).not.toContain('expires=9999');
|
|
770
|
-
// Should still contain the origin+path for debugging
|
|
771
|
-
expect(text).toContain('storage.example.com');
|
|
772
|
-
});
|
|
773
|
-
});
|
|
774
|
-
// ==============================================================
|
|
775
|
-
// M3.1.2 — 메시지 변환 고도화
|
|
776
|
-
// ==============================================================
|
|
777
|
-
describe('M3.1.2: consecutive same-role message merging', () => {
|
|
778
|
-
it('should merge consecutive user messages into one', () => {
|
|
779
|
-
const messages = [
|
|
780
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
781
|
-
{ role: 'user', content: [{ type: 'text', text: 'How are you?' }] },
|
|
782
|
-
];
|
|
783
|
-
const result = converter.toClaudeMessages(messages);
|
|
784
|
-
expect(result.messages).toHaveLength(1);
|
|
785
|
-
expect(result.messages[0]['role']).toBe('user');
|
|
786
|
-
const content = result.messages[0]['content'];
|
|
787
|
-
expect(content).toHaveLength(2);
|
|
788
|
-
expect(content[0]['text']).toBe('Hello');
|
|
789
|
-
expect(content[1]['text']).toBe('How are you?');
|
|
790
|
-
});
|
|
791
|
-
it('should merge consecutive tool messages (mapped to user) into one', () => {
|
|
792
|
-
const messages = [
|
|
793
|
-
{
|
|
794
|
-
role: 'tool',
|
|
795
|
-
content: [
|
|
796
|
-
{
|
|
797
|
-
type: 'tool_result',
|
|
798
|
-
toolCallId: 'call-1',
|
|
799
|
-
content: 'result-1',
|
|
800
|
-
},
|
|
801
|
-
],
|
|
802
|
-
},
|
|
803
|
-
{
|
|
804
|
-
role: 'tool',
|
|
805
|
-
content: [
|
|
806
|
-
{
|
|
807
|
-
type: 'tool_result',
|
|
808
|
-
toolCallId: 'call-2',
|
|
809
|
-
content: 'result-2',
|
|
810
|
-
},
|
|
811
|
-
],
|
|
812
|
-
},
|
|
813
|
-
];
|
|
814
|
-
const result = converter.toClaudeMessages(messages);
|
|
815
|
-
// Both tool messages map to 'user' — should be merged
|
|
816
|
-
expect(result.messages).toHaveLength(1);
|
|
817
|
-
expect(result.messages[0]['role']).toBe('user');
|
|
818
|
-
const content = result.messages[0]['content'];
|
|
819
|
-
expect(content).toHaveLength(2);
|
|
820
|
-
});
|
|
821
|
-
it('should merge user followed by tool (both user role) into one', () => {
|
|
822
|
-
const messages = [
|
|
823
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
824
|
-
{
|
|
825
|
-
role: 'tool',
|
|
826
|
-
content: [
|
|
827
|
-
{
|
|
828
|
-
type: 'tool_result',
|
|
829
|
-
toolCallId: 'call-1',
|
|
830
|
-
content: 'result',
|
|
831
|
-
},
|
|
832
|
-
],
|
|
833
|
-
},
|
|
834
|
-
];
|
|
835
|
-
const result = converter.toClaudeMessages(messages);
|
|
836
|
-
expect(result.messages).toHaveLength(1);
|
|
837
|
-
expect(result.messages[0]['role']).toBe('user');
|
|
838
|
-
});
|
|
839
|
-
it('should not merge messages with different roles', () => {
|
|
840
|
-
const messages = [
|
|
841
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
842
|
-
{
|
|
843
|
-
role: 'assistant',
|
|
844
|
-
content: [{ type: 'text', text: 'Hi there' }],
|
|
845
|
-
},
|
|
846
|
-
{ role: 'user', content: [{ type: 'text', text: 'Thanks' }] },
|
|
847
|
-
];
|
|
848
|
-
const result = converter.toClaudeMessages(messages);
|
|
849
|
-
expect(result.messages).toHaveLength(3);
|
|
850
|
-
});
|
|
851
|
-
it('should merge consecutive assistant messages into one', () => {
|
|
852
|
-
const messages = [
|
|
853
|
-
{
|
|
854
|
-
role: 'assistant',
|
|
855
|
-
content: [{ type: 'text', text: 'Let me think.' }],
|
|
856
|
-
},
|
|
857
|
-
{
|
|
858
|
-
role: 'assistant',
|
|
859
|
-
content: [
|
|
860
|
-
{
|
|
861
|
-
type: 'tool_call',
|
|
862
|
-
id: 'call-1',
|
|
863
|
-
name: 'read_file',
|
|
864
|
-
arguments: { path: '/tmp/a.txt' },
|
|
865
|
-
},
|
|
866
|
-
],
|
|
867
|
-
},
|
|
868
|
-
];
|
|
869
|
-
const result = converter.toClaudeMessages(messages);
|
|
870
|
-
expect(result.messages).toHaveLength(1);
|
|
871
|
-
expect(result.messages[0]['role']).toBe('assistant');
|
|
872
|
-
const content = result.messages[0]['content'];
|
|
873
|
-
expect(content).toHaveLength(2);
|
|
874
|
-
});
|
|
875
|
-
});
|
|
876
|
-
describe('M3.1.2: empty text content filtering', () => {
|
|
877
|
-
it('should filter out empty text content blocks', () => {
|
|
878
|
-
const result = converter.toClaudeContent([
|
|
879
|
-
{ type: 'text', text: '' },
|
|
880
|
-
{ type: 'text', text: 'Hello' },
|
|
881
|
-
]);
|
|
882
|
-
expect(result).toHaveLength(1);
|
|
883
|
-
expect(result[0]['text']).toBe('Hello');
|
|
884
|
-
});
|
|
885
|
-
it('should return empty array when all text blocks are empty', () => {
|
|
886
|
-
const result = converter.toClaudeContent([{ type: 'text', text: '' }]);
|
|
887
|
-
expect(result).toHaveLength(0);
|
|
888
|
-
});
|
|
889
|
-
});
|
|
890
|
-
describe('M3.1.2: RedactedThinkingBlock handling', () => {
|
|
891
|
-
it('should convert redacted_thinking block to thought with redacted marker', () => {
|
|
892
|
-
const response = {
|
|
893
|
-
id: 'msg_123',
|
|
894
|
-
type: 'message',
|
|
895
|
-
role: 'assistant',
|
|
896
|
-
content: [
|
|
897
|
-
{ type: 'redacted_thinking', data: 'abc123encoded' },
|
|
898
|
-
{ type: 'text', text: 'The answer is 42.' },
|
|
899
|
-
],
|
|
900
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
901
|
-
stop_reason: 'end_turn',
|
|
902
|
-
usage: { input_tokens: 10, output_tokens: 20 },
|
|
903
|
-
};
|
|
904
|
-
const result = converter.fromClaudeResponse(response, 'claude-3-5-sonnet-20241022');
|
|
905
|
-
expect(result.content).toHaveLength(2);
|
|
906
|
-
expect(result.content[0].type).toBe('thought');
|
|
907
|
-
const thought = result.content[0];
|
|
908
|
-
expect(thought.metadata?.['redacted']).toBe(true);
|
|
909
|
-
expect(result.content[1].type).toBe('text');
|
|
910
|
-
});
|
|
911
|
-
});
|
|
912
|
-
describe('M3.1.2: extractUsage cache_creation_input_tokens', () => {
|
|
913
|
-
it('should include cache_creation_input_tokens in usage', () => {
|
|
914
|
-
const response = {
|
|
915
|
-
id: 'msg_cache',
|
|
916
|
-
type: 'message',
|
|
917
|
-
role: 'assistant',
|
|
918
|
-
content: [{ type: 'text', text: 'ok' }],
|
|
919
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
920
|
-
stop_reason: 'end_turn',
|
|
921
|
-
usage: {
|
|
922
|
-
input_tokens: 100,
|
|
923
|
-
output_tokens: 10,
|
|
924
|
-
cache_read_input_tokens: 50,
|
|
925
|
-
cache_creation_input_tokens: 80,
|
|
926
|
-
},
|
|
927
|
-
};
|
|
928
|
-
const result = converter.fromClaudeResponse(response, 'claude-3-5-sonnet-20241022');
|
|
929
|
-
expect(result.usage.cachedTokens).toBe(50);
|
|
930
|
-
// Review #1: cacheCreationTokens should be a typed field on LlmTokenUsage
|
|
931
|
-
expect(result.usage.cacheCreationTokens).toBe(80);
|
|
932
|
-
});
|
|
933
|
-
});
|
|
934
|
-
describe('M3.1.3: stream Finished event cache tokens', () => {
|
|
935
|
-
it('should include cache tokens in Finished event usage', () => {
|
|
936
|
-
const state = converter.createStreamState();
|
|
937
|
-
// Capture input_tokens from message_start
|
|
938
|
-
converter.convertStreamEvent({
|
|
939
|
-
type: 'message_start',
|
|
940
|
-
message: {
|
|
941
|
-
id: 'msg_1',
|
|
942
|
-
type: 'message',
|
|
943
|
-
role: 'assistant',
|
|
944
|
-
content: [],
|
|
945
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
946
|
-
usage: { input_tokens: 100, output_tokens: 0 },
|
|
947
|
-
},
|
|
948
|
-
}, state);
|
|
949
|
-
// message_delta with cache usage
|
|
950
|
-
const events = converter.convertStreamEvent({
|
|
951
|
-
type: 'message_delta',
|
|
952
|
-
delta: { stop_reason: 'end_turn', stop_sequence: null },
|
|
953
|
-
usage: {
|
|
954
|
-
output_tokens: 50,
|
|
955
|
-
cache_read_input_tokens: 30,
|
|
956
|
-
cache_creation_input_tokens: 20,
|
|
957
|
-
},
|
|
958
|
-
}, state);
|
|
959
|
-
expect(events).toHaveLength(1);
|
|
960
|
-
const finished = events[0];
|
|
961
|
-
expect(finished.usage.cachedTokens).toBe(30);
|
|
962
|
-
expect(finished.usage.cacheCreationTokens).toBe(20);
|
|
963
|
-
});
|
|
964
|
-
});
|
|
965
|
-
describe('M3.1.2 review: empty text + consecutive role merge interaction', () => {
|
|
966
|
-
it('should merge around skipped empty-text messages', () => {
|
|
967
|
-
const messages = [
|
|
968
|
-
{ role: 'user', content: [{ type: 'text', text: 'A' }] },
|
|
969
|
-
{ role: 'user', content: [{ type: 'text', text: '' }] },
|
|
970
|
-
{ role: 'user', content: [{ type: 'text', text: 'B' }] },
|
|
971
|
-
];
|
|
972
|
-
const result = converter.toClaudeMessages(messages);
|
|
973
|
-
// Empty-text user message is skipped, A and B should merge into one user message
|
|
974
|
-
expect(result.messages).toHaveLength(1);
|
|
975
|
-
expect(result.messages[0]['role']).toBe('user');
|
|
976
|
-
const content = result.messages[0]['content'];
|
|
977
|
-
expect(content).toHaveLength(2);
|
|
978
|
-
expect(content[0]['text']).toBe('A');
|
|
979
|
-
expect(content[1]['text']).toBe('B');
|
|
980
|
-
});
|
|
981
|
-
});
|
|
982
|
-
describe('M3.1.2: toClaudeRequest/toCountTokensRequest DRY', () => {
|
|
983
|
-
it('should produce consistent system handling between both methods', () => {
|
|
984
|
-
const request = {
|
|
985
|
-
model: 'claude-3-5-sonnet-20241022',
|
|
986
|
-
messages: [
|
|
987
|
-
{
|
|
988
|
-
role: 'system',
|
|
989
|
-
content: [{ type: 'text', text: 'System from messages' }],
|
|
990
|
-
},
|
|
991
|
-
{ role: 'user', content: [{ type: 'text', text: 'Hello' }] },
|
|
992
|
-
],
|
|
993
|
-
systemInstruction: 'Top-level instruction',
|
|
994
|
-
};
|
|
995
|
-
const createParams = converter.toClaudeRequest(request);
|
|
996
|
-
const countParams = converter.toCountTokensRequest(request);
|
|
997
|
-
// Both should produce the same system value
|
|
998
|
-
expect(createParams['system']).toBe(countParams['system']);
|
|
999
|
-
});
|
|
1000
|
-
});
|
|
1001
|
-
});
|
|
1002
|
-
//# sourceMappingURL=converter.test.js.map
|