@aws/lsp-codewhisperer 0.0.86 → 0.0.89

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.
Files changed (267) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/node_modules/@amzn/codewhisperer-runtime/README.md +78 -15
  3. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/CodeWhispererRuntimeClient.js +13 -10
  4. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/CreateArtifactUploadUrlCommand.js +4 -0
  5. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/CreateSubscriptionTokenCommand.js +4 -0
  6. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/CreateTaskAssistConversationCommand.js +4 -0
  7. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/CreateUploadUrlCommand.js +4 -0
  8. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/CreateUserMemoryEntryCommand.js +4 -0
  9. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/CreateWorkspaceCommand.js +4 -0
  10. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/DeleteTaskAssistConversationCommand.js +4 -0
  11. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/DeleteUserMemoryEntryCommand.js +4 -0
  12. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/DeleteWorkspaceCommand.js +4 -0
  13. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/GenerateCompletionsCommand.js +4 -0
  14. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/GetCodeAnalysisCommand.js +4 -0
  15. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/GetCodeFixJobCommand.js +4 -0
  16. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/GetProfileCommand.js +4 -0
  17. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/GetRetrievalsCommand.js +4 -0
  18. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/GetTaskAssistCodeGenerationCommand.js +6 -2
  19. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/GetTestGenerationCommand.js +4 -0
  20. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/GetTransformationCommand.js +4 -0
  21. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/GetTransformationPlanCommand.js +4 -0
  22. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/GetUsageLimitsCommand.js +4 -0
  23. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/ListAvailableCustomizationsCommand.js +4 -0
  24. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/ListAvailableModelsCommand.js +4 -0
  25. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/ListAvailableProfilesCommand.js +4 -0
  26. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/ListAvailableSubscriptionsCommand.js +4 -0
  27. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/ListCodeAnalysisFindingsCommand.js +4 -0
  28. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/ListEventsCommand.js +4 -0
  29. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/ListFeatureEvaluationsCommand.js +4 -0
  30. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/ListUserMemoryEntriesCommand.js +4 -0
  31. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/ListWorkspaceMetadataCommand.js +4 -0
  32. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/PushTelemetryEventCommand.js +4 -0
  33. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/ResumeTransformationCommand.js +4 -0
  34. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/SendTelemetryEventCommand.js +4 -0
  35. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/SetUserPreferenceCommand.js +4 -0
  36. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/StartCodeAnalysisCommand.js +4 -0
  37. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/StartCodeFixJobCommand.js +4 -0
  38. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/StartTaskAssistCodeGenerationCommand.js +4 -0
  39. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/StartTestGenerationCommand.js +4 -0
  40. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/StartTransformationCommand.js +4 -0
  41. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/StopTransformationCommand.js +4 -0
  42. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/commands/UpdateUsageLimitsCommand.js +4 -0
  43. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/endpoint/EndpointParameters.js +15 -0
  44. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/endpoint/endpointResolver.js +19 -0
  45. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/endpoint/ruleset.js +61 -0
  46. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/models/models_0.js +52 -43
  47. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/models/models_1.js +7 -1
  48. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/protocols/Aws_restJson1.js +23 -2
  49. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/runtimeConfig.shared.js +2 -2
  50. package/node_modules/@amzn/codewhisperer-runtime/dist-es/CodeWhispererRuntimeClient.js +15 -12
  51. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/CreateArtifactUploadUrlCommand.js +4 -0
  52. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/CreateSubscriptionTokenCommand.js +4 -0
  53. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/CreateTaskAssistConversationCommand.js +4 -0
  54. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/CreateUploadUrlCommand.js +4 -0
  55. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/CreateUserMemoryEntryCommand.js +4 -0
  56. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/CreateWorkspaceCommand.js +4 -0
  57. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/DeleteTaskAssistConversationCommand.js +4 -0
  58. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/DeleteUserMemoryEntryCommand.js +4 -0
  59. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/DeleteWorkspaceCommand.js +4 -0
  60. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/GenerateCompletionsCommand.js +4 -0
  61. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/GetCodeAnalysisCommand.js +4 -0
  62. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/GetCodeFixJobCommand.js +4 -0
  63. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/GetProfileCommand.js +4 -0
  64. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/GetRetrievalsCommand.js +4 -0
  65. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/GetTaskAssistCodeGenerationCommand.js +5 -1
  66. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/GetTestGenerationCommand.js +4 -0
  67. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/GetTransformationCommand.js +4 -0
  68. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/GetTransformationPlanCommand.js +4 -0
  69. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/GetUsageLimitsCommand.js +4 -0
  70. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/ListAvailableCustomizationsCommand.js +4 -0
  71. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/ListAvailableModelsCommand.js +4 -0
  72. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/ListAvailableProfilesCommand.js +4 -0
  73. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/ListAvailableSubscriptionsCommand.js +4 -0
  74. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/ListCodeAnalysisFindingsCommand.js +4 -0
  75. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/ListEventsCommand.js +4 -0
  76. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/ListFeatureEvaluationsCommand.js +4 -0
  77. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/ListUserMemoryEntriesCommand.js +4 -0
  78. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/ListWorkspaceMetadataCommand.js +4 -0
  79. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/PushTelemetryEventCommand.js +4 -0
  80. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/ResumeTransformationCommand.js +4 -0
  81. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/SendTelemetryEventCommand.js +4 -0
  82. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/SetUserPreferenceCommand.js +4 -0
  83. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/StartCodeAnalysisCommand.js +4 -0
  84. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/StartCodeFixJobCommand.js +4 -0
  85. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/StartTaskAssistCodeGenerationCommand.js +4 -0
  86. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/StartTestGenerationCommand.js +4 -0
  87. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/StartTransformationCommand.js +4 -0
  88. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/StopTransformationCommand.js +4 -0
  89. package/node_modules/@amzn/codewhisperer-runtime/dist-es/commands/UpdateUsageLimitsCommand.js +4 -0
  90. package/node_modules/@amzn/codewhisperer-runtime/dist-es/endpoint/EndpointParameters.js +11 -0
  91. package/node_modules/@amzn/codewhisperer-runtime/dist-es/endpoint/endpointResolver.js +15 -0
  92. package/node_modules/@amzn/codewhisperer-runtime/dist-es/endpoint/ruleset.js +58 -0
  93. package/node_modules/@amzn/codewhisperer-runtime/dist-es/models/models_0.js +47 -37
  94. package/node_modules/@amzn/codewhisperer-runtime/dist-es/models/models_1.js +5 -0
  95. package/node_modules/@amzn/codewhisperer-runtime/dist-es/protocols/Aws_restJson1.js +23 -2
  96. package/node_modules/@amzn/codewhisperer-runtime/dist-es/runtimeConfig.shared.js +2 -2
  97. package/node_modules/@amzn/codewhisperer-runtime/dist-types/CodeWhispererRuntimeClient.d.ts +6 -9
  98. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/CreateArtifactUploadUrlCommand.d.ts +7 -7
  99. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/CreateSubscriptionTokenCommand.d.ts +8 -6
  100. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/CreateTaskAssistConversationCommand.d.ts +4 -4
  101. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/CreateUploadUrlCommand.d.ts +11 -11
  102. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/CreateUserMemoryEntryCommand.d.ts +10 -10
  103. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/CreateWorkspaceCommand.d.ts +8 -8
  104. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/DeleteTaskAssistConversationCommand.d.ts +5 -4
  105. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/DeleteUserMemoryEntryCommand.d.ts +4 -4
  106. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/DeleteWorkspaceCommand.d.ts +6 -6
  107. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/GenerateCompletionsCommand.d.ts +6 -6
  108. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/GetCodeAnalysisCommand.d.ts +8 -8
  109. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/GetCodeFixJobCommand.d.ts +7 -7
  110. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/GetProfileCommand.d.ts +10 -6
  111. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/GetRetrievalsCommand.d.ts +6 -6
  112. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/GetTaskAssistCodeGenerationCommand.d.ts +6 -6
  113. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/GetTestGenerationCommand.d.ts +4 -4
  114. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/GetTransformationCommand.d.ts +5 -5
  115. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/GetTransformationPlanCommand.d.ts +5 -5
  116. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/GetUsageLimitsCommand.d.ts +6 -6
  117. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/ListAvailableCustomizationsCommand.d.ts +6 -6
  118. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/ListAvailableModelsCommand.d.ts +10 -6
  119. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/ListAvailableProfilesCommand.d.ts +9 -6
  120. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/ListAvailableSubscriptionsCommand.d.ts +3 -3
  121. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/ListCodeAnalysisFindingsCommand.d.ts +6 -6
  122. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/ListEventsCommand.d.ts +6 -6
  123. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/ListFeatureEvaluationsCommand.d.ts +6 -6
  124. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/ListUserMemoryEntriesCommand.d.ts +4 -4
  125. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/ListWorkspaceMetadataCommand.d.ts +6 -6
  126. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/PushTelemetryEventCommand.d.ts +6 -6
  127. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/ResumeTransformationCommand.d.ts +5 -5
  128. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/SendTelemetryEventCommand.d.ts +7 -6
  129. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/SetUserPreferenceCommand.d.ts +6 -6
  130. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/StartCodeAnalysisCommand.d.ts +8 -8
  131. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/StartCodeFixJobCommand.d.ts +7 -7
  132. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/StartTaskAssistCodeGenerationCommand.d.ts +8 -8
  133. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/StartTestGenerationCommand.d.ts +7 -7
  134. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/StartTransformationCommand.d.ts +5 -5
  135. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/StopTransformationCommand.d.ts +5 -5
  136. package/node_modules/@amzn/codewhisperer-runtime/dist-types/commands/UpdateUsageLimitsCommand.d.ts +8 -8
  137. package/node_modules/@amzn/codewhisperer-runtime/dist-types/endpoint/EndpointParameters.d.ts +28 -0
  138. package/node_modules/@amzn/codewhisperer-runtime/dist-types/endpoint/endpointResolver.d.ts +5 -0
  139. package/node_modules/@amzn/codewhisperer-runtime/dist-types/endpoint/ruleset.d.ts +2 -0
  140. package/node_modules/@amzn/codewhisperer-runtime/dist-types/index.d.ts +1 -0
  141. package/node_modules/@amzn/codewhisperer-runtime/dist-types/models/models_0.d.ts +151 -131
  142. package/node_modules/@amzn/codewhisperer-runtime/dist-types/models/models_1.d.ts +52 -1
  143. package/node_modules/@amzn/codewhisperer-runtime/dist-types/runtimeConfig.browser.d.ts +5 -2
  144. package/node_modules/@amzn/codewhisperer-runtime/dist-types/runtimeConfig.d.ts +5 -2
  145. package/node_modules/@amzn/codewhisperer-runtime/dist-types/runtimeConfig.native.d.ts +5 -2
  146. package/node_modules/@amzn/codewhisperer-runtime/dist-types/runtimeConfig.shared.d.ts +3 -1
  147. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/LICENSE +201 -0
  148. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/README.md +6 -0
  149. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +423 -0
  150. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partitions.json +229 -0
  151. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/aws.js +10 -0
  152. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/index.js +5 -0
  153. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/index.js +3 -0
  154. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js +25 -0
  155. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js +18 -0
  156. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js +41 -0
  157. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json +229 -0
  158. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js +1 -0
  159. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js +1 -0
  160. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js +1 -0
  161. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js +1 -0
  162. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js +1 -0
  163. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js +1 -0
  164. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js +1 -0
  165. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js +6 -0
  166. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js +1 -0
  167. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/aws.d.ts +2 -0
  168. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/index.d.ts +5 -0
  169. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/index.d.ts +3 -0
  170. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/isVirtualHostableS3Bucket.d.ts +5 -0
  171. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/parseArn.d.ts +7 -0
  172. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/partition.d.ts +38 -0
  173. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/lib/isIpAddress.d.ts +1 -0
  174. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/resolveEndpoint.d.ts +1 -0
  175. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/aws.d.ts +2 -0
  176. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/index.d.ts +5 -0
  177. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/index.d.ts +3 -0
  178. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/isVirtualHostableS3Bucket.d.ts +4 -0
  179. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/parseArn.d.ts +2 -0
  180. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/partition.d.ts +28 -0
  181. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/isIpAddress.d.ts +1 -0
  182. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/resolveEndpoint.d.ts +1 -0
  183. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/EndpointError.d.ts +1 -0
  184. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/EndpointRuleObject.d.ts +6 -0
  185. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/ErrorRuleObject.d.ts +1 -0
  186. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/RuleSetObject.d.ts +5 -0
  187. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/TreeRuleObject.d.ts +1 -0
  188. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/index.d.ts +6 -0
  189. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/shared.d.ts +12 -0
  190. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/types/EndpointError.d.ts +1 -0
  191. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/types/EndpointRuleObject.d.ts +1 -0
  192. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/types/ErrorRuleObject.d.ts +1 -0
  193. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/types/RuleSetObject.d.ts +1 -0
  194. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/types/TreeRuleObject.d.ts +1 -0
  195. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/types/index.d.ts +6 -0
  196. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/dist-types/types/shared.d.ts +1 -0
  197. package/node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/util-endpoints/package.json +58 -0
  198. package/node_modules/@amzn/codewhisperer-runtime/package.json +3 -0
  199. package/out/language-server/agenticChat/agenticChatController.d.ts +7 -0
  200. package/out/language-server/agenticChat/agenticChatController.js +77 -14
  201. package/out/language-server/agenticChat/agenticChatController.js.map +1 -1
  202. package/out/language-server/agenticChat/context/contextCommandsProvider.d.ts +6 -0
  203. package/out/language-server/agenticChat/context/contextCommandsProvider.js +24 -0
  204. package/out/language-server/agenticChat/context/contextCommandsProvider.js.map +1 -1
  205. package/out/language-server/agenticChat/tools/mcp/mcpEventHandler.d.ts +7 -0
  206. package/out/language-server/agenticChat/tools/mcp/mcpEventHandler.js +202 -34
  207. package/out/language-server/agenticChat/tools/mcp/mcpEventHandler.js.map +1 -1
  208. package/out/language-server/agenticChat/tools/mcp/mcpManager.d.ts +4 -0
  209. package/out/language-server/agenticChat/tools/mcp/mcpManager.js +19 -6
  210. package/out/language-server/agenticChat/tools/mcp/mcpManager.js.map +1 -1
  211. package/out/language-server/agenticChat/tools/mcp/mcpUtils.js +2 -2
  212. package/out/language-server/agenticChat/tools/mcp/mcpUtils.js.map +1 -1
  213. package/out/language-server/agenticChat/tools/mcp/profileStatusMonitor.d.ts +6 -0
  214. package/out/language-server/agenticChat/tools/mcp/profileStatusMonitor.js +6 -0
  215. package/out/language-server/agenticChat/tools/mcp/profileStatusMonitor.js.map +1 -1
  216. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReview.d.ts +2 -1
  217. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReview.js +8 -3
  218. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReview.js.map +1 -1
  219. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReviewSchemas.d.ts +4 -1
  220. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReviewSchemas.js +4 -2
  221. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReviewSchemas.js.map +1 -1
  222. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReviewTypes.d.ts +1 -0
  223. package/out/language-server/agenticChat/tools/toolServer.js +1 -1
  224. package/out/language-server/agenticChat/tools/toolServer.js.map +1 -1
  225. package/out/language-server/inline-completion/auto-trigger/autoTrigger.js +2 -2
  226. package/out/language-server/inline-completion/auto-trigger/autoTrigger.js.map +1 -1
  227. package/out/language-server/inline-completion/auto-trigger/editPredictionAutoTrigger.d.ts +44 -1
  228. package/out/language-server/inline-completion/auto-trigger/editPredictionAutoTrigger.js +335 -1
  229. package/out/language-server/inline-completion/auto-trigger/editPredictionAutoTrigger.js.map +1 -1
  230. package/out/language-server/inline-completion/handler/editCompletionHandler.js +54 -58
  231. package/out/language-server/inline-completion/handler/editCompletionHandler.js.map +1 -1
  232. package/out/language-server/inline-completion/handler/inlineCompletionHandler.js +8 -3
  233. package/out/language-server/inline-completion/handler/inlineCompletionHandler.js.map +1 -1
  234. package/out/language-server/inline-completion/handler/sessionResultsHandler.js +15 -2
  235. package/out/language-server/inline-completion/handler/sessionResultsHandler.js.map +1 -1
  236. package/out/language-server/inline-completion/session/sessionManager.d.ts +5 -0
  237. package/out/language-server/inline-completion/session/sessionManager.js +16 -0
  238. package/out/language-server/inline-completion/session/sessionManager.js.map +1 -1
  239. package/out/language-server/inline-completion/telemetry/telemetry.d.ts +4 -4
  240. package/out/language-server/inline-completion/telemetry/telemetry.js +6 -6
  241. package/out/language-server/inline-completion/telemetry/telemetry.js.map +1 -1
  242. package/out/language-server/inline-completion/utils/triggerUtils.d.ts +11 -3
  243. package/out/language-server/inline-completion/utils/triggerUtils.js +58 -0
  244. package/out/language-server/inline-completion/utils/triggerUtils.js.map +1 -1
  245. package/out/shared/amazonQServiceManager/AmazonQTokenServiceManager.js +5 -1
  246. package/out/shared/amazonQServiceManager/AmazonQTokenServiceManager.js.map +1 -1
  247. package/out/shared/codeWhispererService.d.ts +26 -10
  248. package/out/shared/codeWhispererService.js +114 -25
  249. package/out/shared/codeWhispererService.js.map +1 -1
  250. package/out/shared/constants.js +3 -0
  251. package/out/shared/constants.js.map +1 -1
  252. package/out/shared/localProjectContextController.d.ts +1 -0
  253. package/out/shared/localProjectContextController.js +4 -0
  254. package/out/shared/localProjectContextController.js.map +1 -1
  255. package/out/shared/supplementalContextUtil/crossFileContextUtil.d.ts +3 -3
  256. package/out/shared/supplementalContextUtil/crossFileContextUtil.js +9 -9
  257. package/out/shared/supplementalContextUtil/crossFileContextUtil.js.map +1 -1
  258. package/out/shared/supplementalContextUtil/supplementalContextUtil.d.ts +1 -1
  259. package/out/shared/supplementalContextUtil/supplementalContextUtil.js +2 -2
  260. package/out/shared/supplementalContextUtil/supplementalContextUtil.js.map +1 -1
  261. package/out/shared/telemetry/telemetryService.d.ts +2 -2
  262. package/out/shared/telemetry/telemetryService.js +4 -2
  263. package/out/shared/telemetry/telemetryService.js.map +1 -1
  264. package/package.json +4 -4
  265. package/node_modules/@amzn/codewhisperer-runtime/dist-cjs/endpoints.js +0 -211
  266. package/node_modules/@amzn/codewhisperer-runtime/dist-es/endpoints.js +0 -207
  267. package/node_modules/@amzn/codewhisperer-runtime/dist-types/endpoints.d.ts +0 -2
@@ -9,12 +9,18 @@ export declare class ContextCommandsProvider implements Disposable {
9
9
  private readonly lsp;
10
10
  private promptFileWatcher?;
11
11
  private cachedContextCommands?;
12
+ private codeSymbolsPending;
13
+ private filesAndFoldersPending;
14
+ private workspacePending;
15
+ private initialStateSent;
12
16
  constructor(logging: Logging, chat: Chat, workspace: Workspace, lsp: Lsp);
17
+ onReady(): void;
13
18
  private registerContextCommandHandler;
14
19
  registerPromptFileWatcher(): void;
15
20
  getUserPromptsCommand(): Promise<ContextCommand[]>;
16
21
  processContextCommandUpdate(items: ContextCommandItem[]): Promise<void>;
17
22
  mapContextCommandItems(items: ContextCommandItem[]): Promise<ContextCommandGroup[]>;
18
23
  maybeUpdateCodeSymbols(): Promise<void>;
24
+ setFilesAndFoldersPending(value: boolean): void;
19
25
  dispose(): void;
20
26
  }
@@ -13,6 +13,10 @@ class ContextCommandsProvider {
13
13
  lsp;
14
14
  promptFileWatcher;
15
15
  cachedContextCommands;
16
+ codeSymbolsPending = true;
17
+ filesAndFoldersPending = true;
18
+ workspacePending = true;
19
+ initialStateSent = false;
16
20
  constructor(logging, chat, workspace, lsp) {
17
21
  this.logging = logging;
18
22
  this.chat = chat;
@@ -21,12 +25,24 @@ class ContextCommandsProvider {
21
25
  this.registerPromptFileWatcher();
22
26
  this.registerContextCommandHandler().catch(e => this.logging.error(`Error registering context command handler: ${e}`));
23
27
  }
28
+ onReady() {
29
+ if (!this.initialStateSent) {
30
+ this.initialStateSent = true;
31
+ void this.processContextCommandUpdate([]).catch(e => this.logging.error(`Failed to send initial context commands: ${e}`));
32
+ }
33
+ }
24
34
  async registerContextCommandHandler() {
25
35
  try {
26
36
  const controller = await localProjectContextController_1.LocalProjectContextController.getInstance();
27
37
  controller.onContextItemsUpdated = async (contextItems) => {
28
38
  await this.processContextCommandUpdate(contextItems);
29
39
  };
40
+ controller.onIndexingInProgressChanged = (indexingInProgress) => {
41
+ if (this.workspacePending !== indexingInProgress) {
42
+ this.workspacePending = indexingInProgress;
43
+ void this.processContextCommandUpdate(this.cachedContextCommands ?? []);
44
+ }
45
+ };
30
46
  }
31
47
  catch (e) {
32
48
  this.logging.warn(`Error processing context command update: ${e}`);
@@ -95,6 +111,7 @@ class ContextCommandsProvider {
95
111
  ],
96
112
  description: 'Add all files in a folder to context',
97
113
  icon: 'folder',
114
+ disabledText: this.filesAndFoldersPending ? 'pending' : undefined,
98
115
  };
99
116
  const fileCmds = [additionalContextProvider_1.activeFileCmd];
100
117
  const fileCmdGroup = {
@@ -107,6 +124,7 @@ class ContextCommandsProvider {
107
124
  ],
108
125
  description: 'Add a file to context',
109
126
  icon: 'file',
127
+ disabledText: this.filesAndFoldersPending ? 'pending' : undefined,
110
128
  };
111
129
  const codeCmds = [];
112
130
  const codeCmdGroup = {
@@ -119,6 +137,7 @@ class ContextCommandsProvider {
119
137
  ],
120
138
  description: 'Add code to context',
121
139
  icon: 'code-block',
140
+ disabledText: this.codeSymbolsPending ? 'pending' : undefined,
122
141
  };
123
142
  const promptCmds = [];
124
143
  const promptCmdGroup = {
@@ -142,6 +161,7 @@ class ContextCommandsProvider {
142
161
  command: '@workspace',
143
162
  id: '@workspace',
144
163
  description: 'Reference all code in workspace',
164
+ disabledText: this.workspacePending ? 'pending' : undefined,
145
165
  };
146
166
  const commands = [workspaceCmd, folderCmdGroup, fileCmdGroup, codeCmdGroup, promptCmdGroup];
147
167
  if (imageContextEnabled) {
@@ -191,10 +211,14 @@ class ContextCommandsProvider {
191
211
  async maybeUpdateCodeSymbols() {
192
212
  const needUpdate = await (await localProjectContextController_1.LocalProjectContextController.getInstance()).shouldUpdateContextCommandSymbolsOnce();
193
213
  if (needUpdate) {
214
+ this.codeSymbolsPending = false;
194
215
  const items = await (await localProjectContextController_1.LocalProjectContextController.getInstance()).getContextCommandItems();
195
216
  await this.processContextCommandUpdate(items);
196
217
  }
197
218
  }
219
+ setFilesAndFoldersPending(value) {
220
+ this.filesAndFoldersPending = value;
221
+ }
198
222
  dispose() {
199
223
  void this.promptFileWatcher?.close();
200
224
  }
@@ -1 +1 @@
1
- {"version":3,"file":"contextCommandsProvider.js","sourceRoot":"","sources":["../../../../src/language-server/agenticChat/context/contextCommandsProvider.ts"],"names":[],"mappings":";;;AAAA,6BAA4B;AAC5B,uCAA2C;AAI3C,iDAAuG;AAEvG,iGAA6F;AAE7F,2EAA2D;AAE3D,MAAa,uBAAuB;IAIX;IACA;IACA;IACA;IANb,iBAAiB,CAAY;IAC7B,qBAAqB,CAAuB;IACpD,YACqB,OAAgB,EAChB,IAAU,EACV,SAAoB,EACpB,GAAQ;QAHR,YAAO,GAAP,OAAO,CAAS;QAChB,SAAI,GAAJ,IAAI,CAAM;QACV,cAAS,GAAT,SAAS,CAAW;QACpB,QAAG,GAAH,GAAG,CAAK;QAEzB,IAAI,CAAC,yBAAyB,EAAE,CAAA;QAChC,IAAI,CAAC,6BAA6B,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,EAAE,CAAC,CACxE,CAAA;IACL,CAAC;IAEO,KAAK,CAAC,6BAA6B;QACvC,IAAI,CAAC;YACD,MAAM,UAAU,GAAG,MAAM,6DAA6B,CAAC,WAAW,EAAE,CAAA;YACpE,UAAU,CAAC,qBAAqB,GAAG,KAAK,EAAC,YAAY,EAAC,EAAE;gBACpD,MAAM,IAAI,CAAC,2BAA2B,CAAC,YAAY,CAAC,CAAA;YACxD,CAAC,CAAA;QACL,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4CAA4C,CAAC,EAAE,CAAC,CAAA;QACtE,CAAC;IACL,CAAC;IAED,yBAAyB;QACrB,IAAI,CAAC,iBAAiB,GAAG,IAAA,gBAAK,EAAC,IAAA,sCAAuB,GAAE,EAAE;YACtD,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,IAAI;YACd,aAAa,EAAE,IAAI;SACtB,CAAC,CAAA;QAEF,IAAI,CAAC,iBAAiB,CAAC,E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GAAG,MAAM,CAAC,MAAM,6DAA6B,CAAC,WAAW,EAAE,CAAC,CAAC,sBAAsB,EAAE,CAAA;YAChG,MAAM,IAAI,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAA;QACjD,CAAC;IACL,CAAC;IAED,OAAO;QACH,KAAK,IAAI,CAAC,iBAAiB,EAAE,KAAK,EAAE,CAAA;IACxC,CAAC;CACJ;AAhND,0DAgNC"}
1
+ {"version":3,"file":"contextCommandsProvider.js","sourceRoot":"","sources":["../../../../src/language-server/agenticChat/context/contextCommandsProvider.ts"],"names":[],"mappings":";;;AAAA,6BAA4B;AAC5B,uCAA2C;AAI3C,iDAAuG;AAEvG,iGAA6F;AAE7F,2EAA2D;AAE3D,MAAa,uBAAuB;IAQX;IACA;IACA;IACA;IAVb,iBAAiB,CAAY;IAC7B,qBAAqB,CAAuB;IAC5C,kBAAkB,GAAG,IAAI,CAAA;IACzB,sBAAsB,GAAG,IAAI,CAAA;IAC7B,gBAAgB,GAAG,IAAI,CAAA;IACvB,gBAAgB,GAAG,KAAK,CAAA;IAChC,YACqB,OAAgB,EAChB,IAAU,EACV,SAAoB,EACpB,GAAQ;QAHR,YAAO,GAAP,OAAO,CAAS;QAChB,SAAI,GAAJ,IAAI,CAAM;QACV,cAAS,GAAT,SAAS,CAAW;QACpB,QAAG,GAAH,GAAG,CAAK;QAEzB,IAAI,CAAC,yBAAyB,EAAE,CAAA;QAChC,IAAI,CAAC,6BAA6B,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,EAAE,CAAC,CACxE,CAAA;IACL,CAAC;IAED,OAAO;QACH,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACzB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAA;YAC5B,KAAK,IAAI,CAAC,2BAA2B,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CA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,CAAC,WAAW,EAAE,CACpD,CAAC,qCAAqC,EAAE,CAAA;QACzC,IAAI,UAAU,EAAE,CAAC;YACb,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAA;YAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,6DAA6B,CAAC,WAAW,EAAE,CAAC,CAAC,sBAAsB,EAAE,CAAA;YAChG,MAAM,IAAI,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAA;QACjD,CAAC;IACL,CAAC;IAED,yBAAyB,CAAC,KAAc;QACpC,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAA;IACvC,CAAC;IAED,OAAO;QACH,KAAK,IAAI,CAAC,iBAAiB,EAAE,KAAK,EAAE,CAAA;IACxC,CAAC;CACJ;AA7OD,0DA6OC"}
@@ -14,6 +14,13 @@ export declare class McpEventHandler {
14
14
  * Handles the list MCP servers event
15
15
  */
16
16
  onListMcpServers(params: ListMcpServersParams): Promise<{
17
+ header: {
18
+ title: string;
19
+ description: string;
20
+ actions: never[];
21
+ };
22
+ list: never[];
23
+ } | {
17
24
  header: {
18
25
  title: string;
19
26
  description: string;
@@ -70,7 +70,14 @@ class McpEventHandler {
70
70
  */
71
71
  async onListMcpServers(params) {
72
72
  this.#currentEditingServerName = undefined;
73
- const mcpManager = mcpManager_1.McpManager.instance;
73
+ let mcpManager;
74
+ try {
75
+ mcpManager = mcpManager_1.McpManager.instance;
76
+ }
77
+ catch (error) {
78
+ this.#features.logging.debug(`McpManager not initialized, returning empty list: ${error}`);
79
+ return { header: { title: 'MCP Servers', description: '', actions: [] }, list: [] };
80
+ }
74
81
  // Check for errors in loading MCP config files
75
82
  const configLoadErrors = mcpManager.getConfigLoadErrors();
76
83
  // Only register the event listener once
@@ -135,7 +142,14 @@ class McpEventHandler {
135
142
  Array.from(mcpManagerServerConfigs.entries()).forEach(([serverName, config]) => {
136
143
  const toolsWithPermissions = mcpManager.getAllToolsWithPermissions(serverName);
137
144
  const toolsCount = toolsWithPermissions.length;
138
- const serverState = mcpManager_1.McpManager.instance.getServerState(serverName);
145
+ let serverState;
146
+ try {
147
+ serverState = mcpManager_1.McpManager.instance.getServerState(serverName);
148
+ }
149
+ catch (error) {
150
+ this.#features.logging.debug(`McpManager not initialized for getServerState: ${error}`);
151
+ serverState = undefined;
152
+ }
139
153
  // Check if this server has validation errors
140
154
  const hasValidationErrors = serversWithErrors.has(serverName);
141
155
  const item = {
@@ -321,13 +335,25 @@ class McpEventHandler {
321
335
  if (existingValues.name) {
322
336
  const serverName = existingValues.name;
323
337
  const sanitizedServerName = (0, mcpUtils_1.sanitizeName)(serverName);
324
- const serverState = mcpManager_1.McpManager.instance.getAllServerConfigs().get(sanitizedServerName);
325
- // Check if the server exists in McpManager
326
- const mcpManager = mcpManager_1.McpManager.instance;
327
- const serverConfig = mcpManager.getAllServerConfigs().get(sanitizedServerName);
338
+ let serverConfig;
339
+ try {
340
+ serverConfig = mcpManager_1.McpManager.instance.getAllServerConfigs().get(sanitizedServerName);
341
+ }
342
+ catch (error) {
343
+ this.#features.logging.debug(`McpManager not initialized for getAllServerConfigs: ${error}`);
344
+ serverConfig = undefined;
345
+ }
328
346
  if (serverConfig) {
329
347
  // Use the helper method to determine if the server is global
330
- existingValues.scope = mcpManager.isServerGlobal(sanitizedServerName) ? 'global' : 'workspace';
348
+ try {
349
+ existingValues.scope = mcpManager_1.McpManager.instance.isServerGlobal(sanitizedServerName)
350
+ ? 'global'
351
+ : 'workspace';
352
+ }
353
+ catch (error) {
354
+ this.#features.logging.debug(`McpManager not initialized for isServerGlobal: ${error}`);
355
+ existingValues.scope = 'global';
356
+ }
331
357
  }
332
358
  else {
333
359
  // Default to global scope for new servers
@@ -509,8 +535,16 @@ class McpEventHandler {
509
535
  }
510
536
  else {
511
537
  if (checkExistingServerName) {
512
- const existingServers = mcpManager_1.McpManager.instance.getAllServerConfigs();
513
- const serverState = mcpManager_1.McpManager.instance.getServerState(values.name);
538
+ let existingServers, serverState;
539
+ try {
540
+ existingServers = mcpManager_1.McpManager.instance.getAllServerConfigs();
541
+ serverState = mcpManager_1.McpManager.instance.getServerState(values.name);
542
+ }
543
+ catch (error) {
544
+ this.#features.logging.debug(`McpManager not initialized for validation: ${error}`);
545
+ existingServers = new Map();
546
+ serverState = undefined;
547
+ }
514
548
  if (existingServers.has(values.name) &&
515
549
  values.name !== originalServerName &&
516
550
  serverState?.status === mcpTypes_1.McpServerStatus.ENABLED) {
@@ -584,7 +618,13 @@ class McpEventHandler {
584
618
  const serverName = params.optionsValues.name;
585
619
  const sanitizedServerName = (0, mcpUtils_1.sanitizeName)(serverName);
586
620
  const originalServerName = this.#currentEditingServerName;
587
- const isEditMode = !!(originalServerName && mcpManager_1.McpManager.instance.getAllServerConfigs().has(originalServerName));
621
+ let isEditMode = false;
622
+ try {
623
+ isEditMode = !!(originalServerName && mcpManager_1.McpManager.instance.getAllServerConfigs().has(originalServerName));
624
+ }
625
+ catch (error) {
626
+ this.#features.logging.debug(`McpManager not initialized for isEditMode check: ${error}`);
627
+ }
588
628
  // Validate form values
589
629
  const validation = this.#validateMcpServerForm(params.optionsValues, true, isEditMode ? originalServerName : undefined);
590
630
  if (!validation.isValid) {
@@ -670,15 +710,34 @@ class McpEventHandler {
670
710
  try {
671
711
  if (isEditMode && originalServerName) {
672
712
  const serverToRemove = this.#serverNameBeforeUpdate || originalServerName;
673
- const serverConfig = mcpManager_1.McpManager.instance.getAllServerConfigs().get(serverToRemove);
713
+ let serverConfig;
714
+ try {
715
+ serverConfig = mcpManager_1.McpManager.instance.getAllServerConfigs().get(serverToRemove);
716
+ }
717
+ catch (error) {
718
+ this.#features.logging.error(`McpManager not initialized for server removal: ${error}`);
719
+ throw error;
720
+ }
674
721
  const isLegacyMcpServer = serverConfig?.__configPath__?.endsWith('mcp.json') ?? false;
675
722
  const configPath = isLegacyMcpServer ? await this.#getMcpConfigPath(isGlobal) : agentPath;
676
- await mcpManager_1.McpManager.instance.removeServer(serverToRemove);
677
- await mcpManager_1.McpManager.instance.addServer(serverName, config, configPath, isLegacyMcpServer);
723
+ try {
724
+ await mcpManager_1.McpManager.instance.removeServer(serverToRemove);
725
+ await mcpManager_1.McpManager.instance.addServer(serverName, config, configPath, isLegacyMcpServer);
726
+ }
727
+ catch (error) {
728
+ this.#features.logging.error(`McpManager operation failed: ${error}`);
729
+ throw error;
730
+ }
678
731
  }
679
732
  else {
680
733
  // Create new server
681
- await mcpManager_1.McpManager.instance.addServer(serverName, config, agentPath);
734
+ try {
735
+ await mcpManager_1.McpManager.instance.addServer(serverName, config, agentPath);
736
+ }
737
+ catch (error) {
738
+ this.#features.logging.error(`McpManager not initialized for addServer: ${error}`);
739
+ throw error;
740
+ }
682
741
  this.#newlyAddedServers.add(serverName);
683
742
  }
684
743
  }
@@ -689,18 +748,30 @@ class McpEventHandler {
689
748
  this.#serverNameBeforeUpdate = undefined;
690
749
  // need to check server state now, as there is possibility of error during server initialization
691
750
  const serverStatusError = this.#getServerStatusError(serverName);
751
+ let numTools = 0;
752
+ try {
753
+ numTools = mcpManager_1.McpManager.instance.getAllToolsWithPermissions(sanitizedServerName).length;
754
+ }
755
+ catch (error) {
756
+ this.#features.logging.debug(`McpManager not initialized for getAllToolsWithPermissions: ${error}`);
757
+ }
692
758
  this.#telemetryController?.emitMCPServerInitializeEvent({
693
759
  source: isEditMode ? 'updateServer' : 'addServer',
694
760
  command: selectedTransport === TransportType.STDIO ? params.optionsValues.command : undefined,
695
761
  url: selectedTransport === TransportType.HTTP ? params.optionsValues.url : undefined,
696
762
  enabled: true,
697
- numTools: mcpManager_1.McpManager.instance.getAllToolsWithPermissions(sanitizedServerName).length,
763
+ numTools,
698
764
  scope: params.optionsValues['scope'] === 'global' ? 'global' : 'workspace',
699
765
  transportType: selectedTransport,
700
766
  languageServerVersion: this.#features.runtime.serverInfo.version,
701
767
  });
702
768
  if (serverStatusError) {
703
- await mcpManager_1.McpManager.instance.removeServerFromConfigFile(serverName);
769
+ try {
770
+ await mcpManager_1.McpManager.instance.removeServerFromConfigFile(serverName);
771
+ }
772
+ catch (error) {
773
+ this.#features.logging.error(`McpManager not initialized for removeServerFromConfigFile: ${error}`);
774
+ }
704
775
  if (this.#newlyAddedServers.has(serverName)) {
705
776
  this.#newlyAddedServers.delete(serverName);
706
777
  }
@@ -740,7 +811,13 @@ class McpEventHandler {
740
811
  if (serverName === 'Built-in') {
741
812
  // Handle Built-in server specially
742
813
  const allTools = this.#features.agent.getTools({ format: 'bedrock' });
743
- const mcpToolNames = new Set(mcpManager_1.McpManager.instance.getAllTools().map(tool => tool.toolName));
814
+ let mcpToolNames = new Set();
815
+ try {
816
+ mcpToolNames = new Set(mcpManager_1.McpManager.instance.getAllTools().map(tool => tool.toolName));
817
+ }
818
+ catch (error) {
819
+ this.#features.logging.debug(`McpManager not initialized for getAllTools: ${error}`);
820
+ }
744
821
  const builtInTools = allTools
745
822
  .filter(tool => !mcpToolNames.has(tool.toolSpecification.name))
746
823
  .map(tool => {
@@ -769,7 +846,13 @@ class McpEventHandler {
769
846
  }
770
847
  else {
771
848
  // Handle regular MCP servers
772
- const toolsWithPermissions = mcpManager_1.McpManager.instance.getAllToolsWithPermissions(serverName);
849
+ let toolsWithPermissions = [];
850
+ try {
851
+ toolsWithPermissions = mcpManager_1.McpManager.instance.getAllToolsWithPermissions(serverName);
852
+ }
853
+ catch (error) {
854
+ this.#features.logging.debug(`McpManager not initialized for getAllToolsWithPermissions: ${error}`);
855
+ }
773
856
  filterOptions = this.#buildServerFilterOptions(serverName, toolsWithPermissions);
774
857
  return {
775
858
  id: params.id,
@@ -803,9 +886,16 @@ class McpEventHandler {
803
886
  if (!serverName) {
804
887
  return { id: params.id };
805
888
  }
806
- const mcpManager = mcpManager_1.McpManager.instance;
807
- // Get the appropriate agent path
808
- const agentPath = mcpManager.getAllServerConfigs().get(serverName)?.__configPath__;
889
+ let mcpManager, agentPath;
890
+ try {
891
+ mcpManager = mcpManager_1.McpManager.instance;
892
+ // Get the appropriate agent path
893
+ agentPath = mcpManager.getAllServerConfigs().get(serverName)?.__configPath__;
894
+ }
895
+ catch (error) {
896
+ this.#features.logging.error(`McpManager not initialized for enable server: ${error}`);
897
+ return { id: params.id };
898
+ }
809
899
  // Set flag to ignore file changes during permission update
810
900
  this.#isProgrammaticChange = true;
811
901
  try {
@@ -830,9 +920,16 @@ class McpEventHandler {
830
920
  if (!serverName) {
831
921
  return { id: params.id };
832
922
  }
833
- const mcpManager = mcpManager_1.McpManager.instance;
834
- // Set flag to ignore file changes during permission update
835
- const agentPath = mcpManager.getAllServerConfigs().get(serverName)?.__configPath__;
923
+ let mcpManager, agentPath;
924
+ try {
925
+ mcpManager = mcpManager_1.McpManager.instance;
926
+ // Set flag to ignore file changes during permission update
927
+ agentPath = mcpManager.getAllServerConfigs().get(serverName)?.__configPath__;
928
+ }
929
+ catch (error) {
930
+ this.#features.logging.error(`McpManager not initialized for disable server:${error}`);
931
+ return { id: params.id };
932
+ }
836
933
  // Set flag to ignore file changes during permission update
837
934
  this.#isProgrammaticChange = true;
838
935
  try {
@@ -860,7 +957,13 @@ class McpEventHandler {
860
957
  // Set flag to ignore file changes during server deletion
861
958
  this.#isProgrammaticChange = true;
862
959
  try {
863
- await mcpManager_1.McpManager.instance.removeServer(serverName);
960
+ try {
961
+ await mcpManager_1.McpManager.instance.removeServer(serverName);
962
+ }
963
+ catch (error) {
964
+ this.#features.logging.error(`McpManager not initialized for removeServer: ${error}`);
965
+ throw error;
966
+ }
864
967
  this.#releaseProgrammaticAfterDebounce();
865
968
  return { id: params.id };
866
969
  }
@@ -883,7 +986,25 @@ class McpEventHandler {
883
986
  return { id: params.id };
884
987
  }
885
988
  this.#currentEditingServerName = serverName;
886
- const config = mcpManager_1.McpManager.instance.getAllServerConfigs().get(serverName);
989
+ let config;
990
+ try {
991
+ config = mcpManager_1.McpManager.instance.getAllServerConfigs().get(serverName);
992
+ }
993
+ catch (error) {
994
+ this.#features.logging.error(`McpManager not initialized for getAllServerConfigs: ${error}`);
995
+ return {
996
+ id: params.id,
997
+ header: {
998
+ title: 'Edit MCP Server',
999
+ status: {
1000
+ title: 'MCP Manager not initialized',
1001
+ icon: 'cancel-circle',
1002
+ status: 'error',
1003
+ },
1004
+ },
1005
+ list: [],
1006
+ };
1007
+ }
887
1008
  if (!config) {
888
1009
  return {
889
1010
  id: params.id,
@@ -1041,7 +1162,14 @@ class McpEventHandler {
1041
1162
  }
1042
1163
  try {
1043
1164
  // Skip server config check for Built-in server
1044
- const serverConfig = mcpManager_1.McpManager.instance.getAllServerConfigs().get(serverName);
1165
+ let serverConfig;
1166
+ try {
1167
+ serverConfig = mcpManager_1.McpManager.instance.getAllServerConfigs().get(serverName);
1168
+ }
1169
+ catch (error) {
1170
+ this.#features.logging.error(`McpManager not initialized for getAllServerConfigs: ${error}`);
1171
+ return { id: params.id };
1172
+ }
1045
1173
  if (serverName !== 'Built-in') {
1046
1174
  if (!serverConfig) {
1047
1175
  throw new Error(`Server '${serverName}' not found`);
@@ -1075,10 +1203,22 @@ class McpEventHandler {
1075
1203
  try {
1076
1204
  const { serverName, permission } = this.#pendingPermissionConfig;
1077
1205
  // Apply the stored permission changes
1078
- await mcpManager_1.McpManager.instance.updateServerPermission(serverName, permission);
1206
+ try {
1207
+ await mcpManager_1.McpManager.instance.updateServerPermission(serverName, permission);
1208
+ }
1209
+ catch (error) {
1210
+ this.#features.logging.error(`McpManager not initialized for updateServerPermission: ${error}`);
1211
+ throw error;
1212
+ }
1079
1213
  this.#emitMCPConfigEvent();
1080
1214
  // Get server config to emit telemetry
1081
- const serverConfig = mcpManager_1.McpManager.instance.getAllServerConfigs().get(serverName);
1215
+ let serverConfig;
1216
+ try {
1217
+ serverConfig = mcpManager_1.McpManager.instance.getAllServerConfigs().get(serverName);
1218
+ }
1219
+ catch (error) {
1220
+ this.#features.logging.debug(`McpManager not initialized for getAllServerConfigs: ${error}`);
1221
+ }
1082
1222
  if (serverConfig) {
1083
1223
  // Emit server initialize event after permission change
1084
1224
  const transportType = serverConfig.command?.trim() ? TransportType.STDIO : TransportType.HTTP;
@@ -1087,7 +1227,15 @@ class McpEventHandler {
1087
1227
  command: transportType === TransportType.STDIO ? serverConfig.command : undefined,
1088
1228
  url: transportType === TransportType.HTTP ? serverConfig.url : undefined,
1089
1229
  enabled: true,
1090
- numTools: mcpManager_1.McpManager.instance.getAllToolsWithPermissions(serverName).length,
1230
+ numTools: (() => {
1231
+ try {
1232
+ return mcpManager_1.McpManager.instance.getAllToolsWithPermissions(serverName).length;
1233
+ }
1234
+ catch (error) {
1235
+ this.#features.logging.debug(`McpManager not initialized for getAllToolsWithPermissions: ${error}`);
1236
+ return 0;
1237
+ }
1238
+ })(),
1091
1239
  scope: serverConfig.__configPath__ ===
1092
1240
  (0, mcpUtils_1.getGlobalAgentConfigPath)(this.#features.workspace.fs.getUserHomeDir()) ||
1093
1241
  serverConfig.__configPath__ ===
@@ -1112,8 +1260,15 @@ class McpEventHandler {
1112
1260
  }
1113
1261
  #emitMCPConfigEvent() {
1114
1262
  // Emit MCP config event after reinitialization
1115
- const mcpManager = mcpManager_1.McpManager.instance;
1116
- const serverConfigs = mcpManager.getAllServerConfigs();
1263
+ let mcpManager, serverConfigs;
1264
+ try {
1265
+ mcpManager = mcpManager_1.McpManager.instance;
1266
+ serverConfigs = mcpManager.getAllServerConfigs();
1267
+ }
1268
+ catch (error) {
1269
+ this.#features.logging.debug(`McpManager not initialized for emitMCPConfigEvent with error: ${error}`);
1270
+ return;
1271
+ }
1117
1272
  const activeServers = Array.from(serverConfigs.entries()).filter(([name, _]) => !mcpManager.isServerDisabled(name));
1118
1273
  // Get the global paths
1119
1274
  const globalAgentPath = (0, mcpUtils_1.getGlobalAgentConfigPath)(this.#features.workspace.fs.getUserHomeDir());
@@ -1171,7 +1326,13 @@ class McpEventHandler {
1171
1326
  // Set flag to ignore file changes during reinitialization if this is a programmatic change
1172
1327
  this.#isProgrammaticChange = isProgrammatic;
1173
1328
  try {
1174
- await mcpManager_1.McpManager.instance.reinitializeMcpServers();
1329
+ try {
1330
+ await mcpManager_1.McpManager.instance.reinitializeMcpServers();
1331
+ }
1332
+ catch (error) {
1333
+ this.#features.logging.error(`McpManager not initialized for reinitializeMcpServers: ${error}`);
1334
+ throw error;
1335
+ }
1175
1336
  this.#emitMCPConfigEvent();
1176
1337
  // Reset flag after reinitialization
1177
1338
  this.#isProgrammaticChange = false;
@@ -1279,7 +1440,14 @@ class McpEventHandler {
1279
1440
  * Gets the UI status object for a specific MCP server
1280
1441
  */
1281
1442
  #getServerStatusError(serverName) {
1282
- const serverStates = mcpManager_1.McpManager.instance.getAllServerStates();
1443
+ let serverStates;
1444
+ try {
1445
+ serverStates = mcpManager_1.McpManager.instance.getAllServerStates();
1446
+ }
1447
+ catch (error) {
1448
+ this.#features.logging.debug(`McpManager not initialized for getAllServerStates: ${error}`);
1449
+ return undefined;
1450
+ }
1283
1451
  const key = serverName ? (0, mcpUtils_1.sanitizeName)(serverName) : serverName;
1284
1452
  const serverState = key ? serverStates.get(key) : undefined;
1285
1453
  if (!serverState) {