@kubbisec/ai-linux-x64 0.1.21 → 0.1.23

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 (362) hide show
  1. package/bin/kubbisec +0 -0
  2. package/bundled/components/kubbisec-model-selector.d.ts +47 -34
  3. package/bundled/components/kubbisec-model-selector.js +187 -177
  4. package/bundled/components/kubbisec-model-selector.js.map +1 -1
  5. package/bundled/config/config.d.ts +6 -6
  6. package/bundled/config/config.d.ts.map +1 -1
  7. package/bundled/config/config.js +55 -55
  8. package/bundled/config/config.js.map +1 -1
  9. package/bundled/config/detect-local-llm-providers.d.ts +26 -16
  10. package/bundled/config/detect-local-llm-providers.js +130 -142
  11. package/bundled/config/ensure-kbs-project-settings.d.ts +20 -0
  12. package/bundled/config/ensure-kbs-project-settings.d.ts.map +1 -0
  13. package/bundled/config/ensure-kbs-project-settings.js +45 -0
  14. package/bundled/config/ensure-kbs-project-settings.js.map +1 -0
  15. package/bundled/config/ensure-kubbisec-project-settings.d.ts +11 -9
  16. package/bundled/config/ensure-kubbisec-project-settings.d.ts.map +1 -1
  17. package/bundled/config/ensure-kubbisec-project-settings.js +67 -48
  18. package/bundled/config/ensure-kubbisec-project-settings.js.map +1 -1
  19. package/bundled/config/extended-context.d.ts +5 -6
  20. package/bundled/config/extended-context.js +23 -22
  21. package/bundled/config/feature-flags.d.ts +10 -2
  22. package/bundled/config/feature-flags.js +8 -2
  23. package/bundled/config/format-kubbisec-footer-status.d.ts +1 -1
  24. package/bundled/config/format-kubbisec-footer-status.js +26 -31
  25. package/bundled/config/kubbisec-extension-manifest.d.ts +21 -2
  26. package/bundled/config/kubbisec-extension-manifest.d.ts.map +1 -1
  27. package/bundled/config/kubbisec-extension-manifest.js +19 -20
  28. package/bundled/config/kubbisec-extension-manifest.js.map +1 -1
  29. package/bundled/config/llm-config-mutations.d.ts +51 -25
  30. package/bundled/config/llm-config-mutations.js +173 -182
  31. package/bundled/config/llm-config.d.ts +54 -41
  32. package/bundled/config/llm-config.js +199 -199
  33. package/bundled/config/llm-provider-catalog.d.ts +18 -15
  34. package/bundled/config/llm-provider-catalog.js +45 -46
  35. package/bundled/config/materialize-kubbisec-pi-resources.d.ts +1 -1
  36. package/bundled/config/materialize-kubbisec-pi-resources.d.ts.map +1 -1
  37. package/bundled/config/materialize-kubbisec-pi-resources.js +173 -183
  38. package/bundled/config/materialize-kubbisec-pi-resources.js.map +1 -1
  39. package/bundled/config/register-custom-llm-providers.d.ts +11 -5
  40. package/bundled/config/register-custom-llm-providers.js +17 -15
  41. package/bundled/config/register-kubbisec-llm-provider.d.ts +14 -10
  42. package/bundled/config/register-kubbisec-llm-provider.js +50 -42
  43. package/bundled/config/resolve-agents-context-file.d.ts +1 -1
  44. package/bundled/config/resolve-agents-context-file.js +33 -34
  45. package/bundled/config/resource-budget.d.ts +12 -12
  46. package/bundled/config/resource-budget.js +28 -28
  47. package/bundled/config/sync-kubbisec-pi-models.d.ts +6 -3
  48. package/bundled/config/sync-kubbisec-pi-models.js +58 -58
  49. package/bundled/copy/cli-reference-index.d.ts +2 -6
  50. package/bundled/copy/cli-reference-index.d.ts.map +1 -1
  51. package/bundled/copy/cli-reference-index.js +2 -62
  52. package/bundled/copy/cli-reference-index.js.map +1 -1
  53. package/bundled/copy/kubbisec-shell-copy.d.ts +11 -6
  54. package/bundled/copy/kubbisec-shell-copy.js +1 -1
  55. package/bundled/extensions/cli-local-shared.d.ts +60 -26
  56. package/bundled/extensions/cli-local-shared.d.ts.map +1 -1
  57. package/bundled/extensions/cli-local-shared.js +139 -118
  58. package/bundled/extensions/cli-local-shared.js.map +1 -1
  59. package/bundled/extensions/kubbisec-aspm-local.extension.d.ts +18 -15
  60. package/bundled/extensions/kubbisec-aspm-local.extension.d.ts.map +1 -1
  61. package/bundled/extensions/kubbisec-aspm-local.extension.js +109 -117
  62. package/bundled/extensions/kubbisec-aspm-local.extension.js.map +1 -1
  63. package/bundled/extensions/kubbisec-brand.extension.d.ts +1 -1
  64. package/bundled/extensions/kubbisec-brand.extension.js +25 -25
  65. package/bundled/extensions/kubbisec-byok-provider.extension.d.ts +1 -1
  66. package/bundled/extensions/kubbisec-byok-provider.extension.js +2 -2
  67. package/bundled/extensions/kubbisec-clarify.extension.d.ts +64 -35
  68. package/bundled/extensions/kubbisec-clarify.extension.d.ts.map +1 -1
  69. package/bundled/extensions/kubbisec-clarify.extension.js +323 -305
  70. package/bundled/extensions/kubbisec-clarify.extension.js.map +1 -1
  71. package/bundled/extensions/kubbisec-exit.extension.d.ts +1 -1
  72. package/bundled/extensions/kubbisec-exit.extension.js +29 -32
  73. package/bundled/extensions/kubbisec-extended-context.extension.d.ts +1 -1
  74. package/bundled/extensions/kubbisec-extended-context.extension.js +56 -43
  75. package/bundled/extensions/kubbisec-footer.extension.d.ts +14 -14
  76. package/bundled/extensions/kubbisec-footer.extension.d.ts.map +1 -1
  77. package/bundled/extensions/kubbisec-footer.extension.js +205 -215
  78. package/bundled/extensions/kubbisec-footer.extension.js.map +1 -1
  79. package/bundled/extensions/kubbisec-github-local.extension.d.ts +26 -21
  80. package/bundled/extensions/kubbisec-github-local.extension.d.ts.map +1 -1
  81. package/bundled/extensions/kubbisec-github-local.extension.js +470 -122
  82. package/bundled/extensions/kubbisec-github-local.extension.js.map +1 -1
  83. package/bundled/extensions/kubbisec-llm-config.extension.d.ts +1 -1
  84. package/bundled/extensions/kubbisec-llm-config.extension.js +200 -181
  85. package/bundled/extensions/kubbisec-memory.extension.d.ts +9 -7
  86. package/bundled/extensions/kubbisec-memory.extension.d.ts.map +1 -1
  87. package/bundled/extensions/kubbisec-memory.extension.js +88 -95
  88. package/bundled/extensions/kubbisec-naus-local.extension.d.ts +18 -15
  89. package/bundled/extensions/kubbisec-naus-local.extension.d.ts.map +1 -1
  90. package/bundled/extensions/kubbisec-naus-local.extension.js +123 -114
  91. package/bundled/extensions/kubbisec-naus-local.extension.js.map +1 -1
  92. package/bundled/extensions/kubbisec-platform-tools.extension.d.ts +31 -21
  93. package/bundled/extensions/kubbisec-platform-tools.extension.d.ts.map +1 -1
  94. package/bundled/extensions/kubbisec-platform-tools.extension.js +152 -152
  95. package/bundled/extensions/kubbisec-platform-tools.extension.js.map +1 -1
  96. package/bundled/extensions/kubbisec-runtime-status.extension.d.ts +10 -8
  97. package/bundled/extensions/kubbisec-runtime-status.extension.js +15 -13
  98. package/bundled/extensions/kubbisec-scope.extension.d.ts +12 -7
  99. package/bundled/extensions/kubbisec-scope.extension.js +13 -13
  100. package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts +27 -16
  101. package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts.map +1 -1
  102. package/bundled/extensions/kubbisec-skill-mentions.extension.js +74 -63
  103. package/bundled/extensions/kubbisec-skill-mentions.extension.js.map +1 -1
  104. package/bundled/extensions/kubbisec-skill-telemetry.extension.d.ts +2 -3
  105. package/bundled/extensions/kubbisec-skill-telemetry.extension.js +59 -64
  106. package/bundled/extensions/kubbisec-theme-lock.extension.d.ts +1 -1
  107. package/bundled/extensions/kubbisec-theme-lock.extension.js +33 -34
  108. package/bundled/extensions/kubbisec-ui.extension.d.ts +1 -1
  109. package/bundled/extensions/kubbisec-ui.extension.d.ts.map +1 -1
  110. package/bundled/extensions/kubbisec-ui.extension.js +118 -109
  111. package/bundled/extensions/kubbisec-ui.extension.js.map +1 -1
  112. package/bundled/extensions/kubbisec-workflow.extension.d.ts +20 -18
  113. package/bundled/extensions/kubbisec-workflow.extension.d.ts.map +1 -1
  114. package/bundled/extensions/kubbisec-workflow.extension.js +138 -140
  115. package/bundled/node_modules/@aspm/shared/dist/ai/index.d.ts +1 -0
  116. package/bundled/node_modules/@aspm/shared/dist/ai/index.d.ts.map +1 -1
  117. package/bundled/node_modules/@aspm/shared/dist/ai/index.js +1 -0
  118. package/bundled/node_modules/@aspm/shared/dist/ai/index.js.map +1 -1
  119. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.d.ts +7 -0
  120. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.d.ts.map +1 -0
  121. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.js +30 -0
  122. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.js.map +1 -0
  123. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.d.ts +7 -0
  124. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.d.ts.map +1 -0
  125. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.js +14 -0
  126. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.js.map +1 -0
  127. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.d.ts +6 -0
  128. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.d.ts.map +1 -0
  129. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.js +65 -0
  130. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.js.map +1 -0
  131. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.d.ts +8 -0
  132. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.d.ts.map +1 -0
  133. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.js +29 -0
  134. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.js.map +1 -0
  135. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.d.ts +7 -0
  136. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.d.ts.map +1 -0
  137. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.js +16 -0
  138. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.js.map +1 -0
  139. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.d.ts +2 -0
  140. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.d.ts.map +1 -0
  141. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.js +36 -0
  142. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.js.map +1 -0
  143. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.d.ts +6 -0
  144. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.d.ts.map +1 -0
  145. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.js +32 -0
  146. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.js.map +1 -0
  147. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.d.ts +12 -0
  148. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.d.ts.map +1 -0
  149. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.js +93 -0
  150. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.js.map +1 -0
  151. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.d.ts +13 -0
  152. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.d.ts.map +1 -0
  153. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.js +79 -0
  154. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.js.map +1 -0
  155. package/bundled/node_modules/@aspm/shared/dist/api-key/index.d.ts +4 -0
  156. package/bundled/node_modules/@aspm/shared/dist/api-key/index.d.ts.map +1 -0
  157. package/bundled/node_modules/@aspm/shared/dist/api-key/index.js +20 -0
  158. package/bundled/node_modules/@aspm/shared/dist/api-key/index.js.map +1 -0
  159. package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.d.ts +20 -0
  160. package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.d.ts.map +1 -0
  161. package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.js +78 -0
  162. package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.js.map +1 -0
  163. package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.d.ts +19 -0
  164. package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.d.ts.map +1 -0
  165. package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.js +126 -0
  166. package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.js.map +1 -0
  167. package/bundled/node_modules/@aspm/shared/dist/assistant/index.d.ts +1 -0
  168. package/bundled/node_modules/@aspm/shared/dist/assistant/index.d.ts.map +1 -1
  169. package/bundled/node_modules/@aspm/shared/dist/assistant/index.js +1 -0
  170. package/bundled/node_modules/@aspm/shared/dist/assistant/index.js.map +1 -1
  171. package/bundled/node_modules/@aspm/shared/dist/billing/index.d.ts +2 -0
  172. package/bundled/node_modules/@aspm/shared/dist/billing/index.d.ts.map +1 -0
  173. package/bundled/node_modules/@aspm/shared/dist/billing/index.js +18 -0
  174. package/bundled/node_modules/@aspm/shared/dist/billing/index.js.map +1 -0
  175. package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.d.ts +17 -0
  176. package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.d.ts.map +1 -0
  177. package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.js +30 -0
  178. package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.js.map +1 -0
  179. package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.d.ts +42 -0
  180. package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.d.ts.map +1 -0
  181. package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.js +147 -0
  182. package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.js.map +1 -0
  183. package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.d.ts +12 -0
  184. package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.d.ts.map +1 -0
  185. package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.js +70 -0
  186. package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.js.map +1 -0
  187. package/bundled/node_modules/@aspm/shared/dist/ci/index.d.ts +4 -0
  188. package/bundled/node_modules/@aspm/shared/dist/ci/index.d.ts.map +1 -0
  189. package/bundled/node_modules/@aspm/shared/dist/ci/index.js +20 -0
  190. package/bundled/node_modules/@aspm/shared/dist/ci/index.js.map +1 -0
  191. package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.d.ts +16 -0
  192. package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.d.ts.map +1 -0
  193. package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.js +45 -0
  194. package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.js.map +1 -0
  195. package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.d.ts +1 -0
  196. package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.d.ts.map +1 -1
  197. package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.js +6 -0
  198. package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.js.map +1 -1
  199. package/bundled/node_modules/@aspm/shared/dist/dto/index.d.ts +5 -3
  200. package/bundled/node_modules/@aspm/shared/dist/dto/index.d.ts.map +1 -1
  201. package/bundled/node_modules/@aspm/shared/dist/dto/index.js +5 -3
  202. package/bundled/node_modules/@aspm/shared/dist/dto/index.js.map +1 -1
  203. package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.d.ts +9 -0
  204. package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.d.ts.map +1 -0
  205. package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.js +52 -0
  206. package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.js.map +1 -0
  207. package/bundled/node_modules/@aspm/shared/dist/enums.d.ts +3 -1
  208. package/bundled/node_modules/@aspm/shared/dist/enums.d.ts.map +1 -1
  209. package/bundled/node_modules/@aspm/shared/dist/enums.js +4 -0
  210. package/bundled/node_modules/@aspm/shared/dist/enums.js.map +1 -1
  211. package/bundled/node_modules/@aspm/shared/dist/index.d.ts +8 -2
  212. package/bundled/node_modules/@aspm/shared/dist/index.d.ts.map +1 -1
  213. package/bundled/node_modules/@aspm/shared/dist/index.js +8 -2
  214. package/bundled/node_modules/@aspm/shared/dist/index.js.map +1 -1
  215. package/bundled/node_modules/@aspm/shared/dist/mcp/constants.d.ts +22 -0
  216. package/bundled/node_modules/@aspm/shared/dist/mcp/constants.d.ts.map +1 -0
  217. package/bundled/node_modules/@aspm/shared/dist/mcp/constants.js +52 -0
  218. package/bundled/node_modules/@aspm/shared/dist/mcp/constants.js.map +1 -0
  219. package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.d.ts +37 -0
  220. package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.d.ts.map +1 -0
  221. package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.js +54 -0
  222. package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.js.map +1 -0
  223. package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.d.ts +7 -4
  224. package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.d.ts.map +1 -1
  225. package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.js +15 -7
  226. package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.js.map +1 -1
  227. package/bundled/node_modules/@aspm/shared/dist/rbac/index.d.ts +1 -0
  228. package/bundled/node_modules/@aspm/shared/dist/rbac/index.d.ts.map +1 -1
  229. package/bundled/node_modules/@aspm/shared/dist/rbac/index.js +1 -0
  230. package/bundled/node_modules/@aspm/shared/dist/rbac/index.js.map +1 -1
  231. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permission-descriptions.d.ts.map +1 -1
  232. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permission-descriptions.js +2 -0
  233. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permission-descriptions.js.map +1 -1
  234. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.d.ts +1 -1
  235. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.d.ts.map +1 -1
  236. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.js +2 -0
  237. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.js.map +1 -1
  238. package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.d.ts +8 -0
  239. package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.d.ts.map +1 -0
  240. package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.js +19 -0
  241. package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.js.map +1 -0
  242. package/bundled/node_modules/@aspm/shared/dist/rbac/resolve-org-permissions.d.ts.map +1 -1
  243. package/bundled/node_modules/@aspm/shared/dist/rbac/resolve-org-permissions.js +4 -0
  244. package/bundled/node_modules/@aspm/shared/dist/rbac/resolve-org-permissions.js.map +1 -1
  245. package/bundled/node_modules/@aspm/shared/dist/redaction.d.ts +1 -0
  246. package/bundled/node_modules/@aspm/shared/dist/redaction.d.ts.map +1 -1
  247. package/bundled/node_modules/@aspm/shared/dist/redaction.js +1 -0
  248. package/bundled/node_modules/@aspm/shared/dist/redaction.js.map +1 -1
  249. package/bundled/node_modules/@aspm/shared/dist/redaction.test.d.ts +2 -0
  250. package/bundled/node_modules/@aspm/shared/dist/redaction.test.d.ts.map +1 -0
  251. package/bundled/node_modules/@aspm/shared/dist/redaction.test.js +626 -0
  252. package/bundled/node_modules/@aspm/shared/dist/redaction.test.js.map +1 -0
  253. package/bundled/node_modules/@aspm/shared/dist/security/aspm-gate-rules.d.ts.map +1 -1
  254. package/bundled/node_modules/@aspm/shared/dist/security/aspm-gate-rules.js.map +1 -1
  255. package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.d.ts.map +1 -1
  256. package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.js.map +1 -1
  257. package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.d.ts.map +1 -1
  258. package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.js +2 -2
  259. package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.js.map +1 -1
  260. package/bundled/node_modules/@aspm/shared/dist/security/index.d.ts +2 -2
  261. package/bundled/node_modules/@aspm/shared/dist/security/index.d.ts.map +1 -1
  262. package/bundled/node_modules/@aspm/shared/dist/security/index.js +2 -2
  263. package/bundled/node_modules/@aspm/shared/dist/security/index.js.map +1 -1
  264. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.d.ts +4 -0
  265. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.d.ts.map +1 -0
  266. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.js +10 -0
  267. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.js.map +1 -0
  268. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.d.ts +4 -0
  269. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.d.ts.map +1 -0
  270. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.js +20 -0
  271. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.js.map +1 -0
  272. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.d.ts +2 -0
  273. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.d.ts.map +1 -0
  274. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.js +9 -0
  275. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.js.map +1 -0
  276. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.d.ts +3 -0
  277. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.d.ts.map +1 -0
  278. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.js +18 -0
  279. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.js.map +1 -0
  280. package/bundled/node_modules/@aspm/shared/package.json +27 -5
  281. package/bundled/node_modules/@kubbisec/chat-memory/dist/sanitizer.js +2 -2
  282. package/bundled/node_modules/@kubbisec/chat-memory/dist/sanitizer.js.map +1 -1
  283. package/bundled/node_modules/@kubbisec/chat-memory/package.json +4 -4
  284. package/bundled/node_modules/@kubbisec/home/dist/migrate.d.ts.map +1 -1
  285. package/bundled/node_modules/@kubbisec/home/dist/migrate.js +1 -1
  286. package/bundled/node_modules/@kubbisec/home/dist/migrate.js.map +1 -1
  287. package/bundled/node_modules/@kubbisec/home/package.json +3 -3
  288. package/bundled/resolve-bundled-dist-root.js +121 -131
  289. package/bundled/resolve-bundled-dist-root.js.map +1 -1
  290. package/bundled/skills/aspm-platform/SKILL.md +3 -1
  291. package/bundled/skills/at-path-mentions.d.ts +1 -1
  292. package/bundled/skills/at-path-mentions.js +146 -153
  293. package/bundled/skills/chat-mention-render.d.ts +2 -2
  294. package/bundled/skills/chat-mention-render.js +121 -126
  295. package/bundled/skills/chat-mentions.d.ts +17 -8
  296. package/bundled/skills/chat-mentions.js +76 -76
  297. package/bundled/skills/github-local/SKILL.md +5 -5
  298. package/bundled/skills/kubbisec-resource-router/SKILL.md +3 -0
  299. package/bundled/skills/list-bundled-skills.d.ts +3 -3
  300. package/bundled/skills/list-bundled-skills.js +33 -35
  301. package/bundled/skills/naus-pipelines/SKILL.md +11 -10
  302. package/bundled/skills/remediation/SKILL.md +1 -1
  303. package/bundled/skills/skill-mention.d.ts +10 -2
  304. package/bundled/skills/skill-mention.js +10 -2
  305. package/bundled/theme/clear-terminal.d.ts +1 -1
  306. package/bundled/theme/clear-terminal.js +3 -4
  307. package/bundled/theme/footer-render-hook.d.ts +1 -1
  308. package/bundled/theme/footer-render-hook.js +3 -3
  309. package/bundled/theme/kubbisec-brand-fg.d.ts +1 -1
  310. package/bundled/theme/kubbisec-brand-fg.js +2 -2
  311. package/bundled/theme/kubbisec-menu-themes.d.ts +7 -7
  312. package/bundled/theme/kubbisec-menu-themes.js +30 -31
  313. package/bundled/theme/kubbisec-theme-name.d.ts +1 -1
  314. package/bundled/theme/kubbisec-theme-name.js +1 -1
  315. package/bundled/theme/patch-pi-settings-theme.runtime.d.ts +1 -1
  316. package/bundled/theme/patch-pi-settings-theme.runtime.js +11 -10
  317. package/bundled/theme/render-compact-header.d.ts +13 -5
  318. package/bundled/theme/render-compact-header.js +127 -129
  319. package/bundled/theme/render-compact-header.js.map +1 -1
  320. package/bundled/workflow/session-workflow-mode.d.ts +1 -1
  321. package/bundled/workflow/session-workflow-mode.js +33 -33
  322. package/package.json +1 -1
  323. package/bundled/clarify/clarify-gate-state.d.ts +0 -3
  324. package/bundled/clarify/clarify-gate-state.d.ts.map +0 -1
  325. package/bundled/clarify/clarify-gate-state.js +0 -9
  326. package/bundled/clarify/clarify-gate-state.js.map +0 -1
  327. package/bundled/clarify/clarify-gate.d.ts +0 -28
  328. package/bundled/clarify/clarify-gate.d.ts.map +0 -1
  329. package/bundled/clarify/clarify-gate.js +0 -152
  330. package/bundled/clarify/clarify-gate.js.map +0 -1
  331. package/bundled/clarify/clarify-select-panel.d.ts +0 -14
  332. package/bundled/clarify/clarify-select-panel.d.ts.map +0 -1
  333. package/bundled/clarify/clarify-select-panel.js +0 -82
  334. package/bundled/clarify/clarify-select-panel.js.map +0 -1
  335. package/bundled/clarify/clarify-ui-state.d.ts +0 -21
  336. package/bundled/clarify/clarify-ui-state.d.ts.map +0 -1
  337. package/bundled/clarify/clarify-ui-state.js +0 -48
  338. package/bundled/clarify/clarify-ui-state.js.map +0 -1
  339. package/bundled/clarify/parse-clarify-answer.d.ts +0 -21
  340. package/bundled/clarify/parse-clarify-answer.d.ts.map +0 -1
  341. package/bundled/clarify/parse-clarify-answer.js +0 -57
  342. package/bundled/clarify/parse-clarify-answer.js.map +0 -1
  343. package/bundled/clarify/question-format.d.ts +0 -39
  344. package/bundled/clarify/question-format.d.ts.map +0 -1
  345. package/bundled/clarify/question-format.js +0 -144
  346. package/bundled/clarify/question-format.js.map +0 -1
  347. package/bundled/clarify/questionnaire-tool.d.ts +0 -25
  348. package/bundled/clarify/questionnaire-tool.d.ts.map +0 -1
  349. package/bundled/clarify/questionnaire-tool.js +0 -161
  350. package/bundled/clarify/questionnaire-tool.js.map +0 -1
  351. package/bundled/clarify/scope-discovery.d.ts +0 -9
  352. package/bundled/clarify/scope-discovery.d.ts.map +0 -1
  353. package/bundled/clarify/scope-discovery.js +0 -130
  354. package/bundled/clarify/scope-discovery.js.map +0 -1
  355. package/bundled/clarify/session-questionnaire.d.ts +0 -26
  356. package/bundled/clarify/session-questionnaire.d.ts.map +0 -1
  357. package/bundled/clarify/session-questionnaire.js +0 -372
  358. package/bundled/clarify/session-questionnaire.js.map +0 -1
  359. package/bundled/clarify/session-questionnaire.types.d.ts +0 -47
  360. package/bundled/clarify/session-questionnaire.types.d.ts.map +0 -1
  361. package/bundled/clarify/session-questionnaire.types.js +0 -13
  362. package/bundled/clarify/session-questionnaire.types.js.map +0 -1
@@ -1,211 +1,230 @@
1
- import { groupModelsForSelector, KubbisecModelSelectorComponent, } from "../components/kubbisec-model-selector.js";
1
+ import {
2
+ groupModelsForSelector,
3
+ KubbisecModelSelectorComponent,
4
+ } from "../components/kubbisec-model-selector.js";
2
5
  import { syncAutodetectedLocalProviders } from "../config/detect-local-llm-providers.js";
3
- import { applyLlmConfigToPiSettings, applyTemperatureToProviderPayload, getRuntimeTemperature, readLlmConfig, setRuntimeTemperature, writeLlmConfig, } from "../config/llm-config.js";
6
+ import {
7
+ applyLlmConfigToPiSettings,
8
+ applyTemperatureToProviderPayload,
9
+ getRuntimeTemperature,
10
+ readLlmConfig,
11
+ setRuntimeTemperature,
12
+ writeLlmConfig,
13
+ } from "../config/llm-config.js";
4
14
  import { KUBBISEC_LLM_PROVIDER_ID } from "../config/llm-provider-catalog.js";
5
15
  import { registerCustomLlmProviders } from "../config/register-custom-llm-providers.js";
6
16
  import { registerKubbisecLlmProvider } from "../config/register-kubbisec-llm-provider.js";
7
17
  import { requestKubbisecFooterRender } from "../theme/footer-render-hook.js";
8
- const THINKING_LEVELS = [
9
- "off",
10
- "minimal",
11
- "low",
12
- "medium",
13
- "high",
14
- "xhigh",
15
- ];
18
+
19
+ const THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh"];
16
20
  function isThinkingLevel(value) {
17
- return THINKING_LEVELS.includes(value);
21
+ return THINKING_LEVELS.includes(value);
18
22
  }
19
23
  async function refreshProviders(api, cwd) {
20
- await syncAutodetectedLocalProviders(cwd);
21
- registerKubbisecLlmProvider(api.registerProvider.bind(api), cwd);
22
- registerCustomLlmProviders(api.registerProvider.bind(api), readLlmConfig(cwd));
24
+ await syncAutodetectedLocalProviders(cwd);
25
+ registerKubbisecLlmProvider(api.registerProvider.bind(api), cwd);
26
+ registerCustomLlmProviders(api.registerProvider.bind(api), readLlmConfig(cwd));
23
27
  }
24
28
  async function applyDefaultModel(api, ctx) {
25
- const config = readLlmConfig(ctx.cwd);
26
- const provider = config.defaultProvider ?? KUBBISEC_LLM_PROVIDER_ID;
27
- const modelId = config.defaultModel?.trim();
28
- if (!modelId)
29
- return;
30
- const model = ctx.modelRegistry.find(provider, modelId);
31
- if (!model)
32
- return;
33
- const current = ctx.model;
34
- if (current?.provider === model.provider && current.id === model.id)
35
- return;
36
- await api.setModel(model);
29
+ const config = readLlmConfig(ctx.cwd);
30
+ const provider = config.defaultProvider ?? KUBBISEC_LLM_PROVIDER_ID;
31
+ const modelId = config.defaultModel?.trim();
32
+ if (!modelId) return;
33
+ const model = ctx.modelRegistry.find(provider, modelId);
34
+ if (!model) return;
35
+ const current = ctx.model;
36
+ if (current?.provider === model.provider && current.id === model.id) return;
37
+ await api.setModel(model);
37
38
  }
38
39
  function applyDefaultThinking(api, ctx) {
39
- const config = readLlmConfig(ctx.cwd);
40
- if (!config.defaultThinkingLevel)
41
- return;
42
- if (api.getThinkingLevel() === config.defaultThinkingLevel)
43
- return;
44
- api.setThinkingLevel(config.defaultThinkingLevel);
40
+ const config = readLlmConfig(ctx.cwd);
41
+ if (!config.defaultThinkingLevel) return;
42
+ if (api.getThinkingLevel() === config.defaultThinkingLevel) return;
43
+ api.setThinkingLevel(config.defaultThinkingLevel);
45
44
  }
46
45
  async function showGroupedModelSelector(api, ctx, initialSearch = "") {
47
- if (!ctx.hasUI)
48
- return;
49
- ctx.modelRegistry.refresh();
50
- const models = ctx.modelRegistry.getAvailable();
51
- const groups = groupModelsForSelector(models, (provider) => ctx.modelRegistry.getProviderDisplayName(provider));
52
- await ctx.ui.custom((tui, theme, _keybindings, done) => new KubbisecModelSelectorComponent(tui, ctx.model, groups, theme, async (model) => {
53
- const ok = await api.setModel(model);
54
- if (!ok) {
55
- ctx.ui.notify("Chave de API não configurada para este provedor. Edite .kubbisec/llm.json ou use /login.", "error");
46
+ if (!ctx.hasUI) return;
47
+ ctx.modelRegistry.refresh();
48
+ const models = ctx.modelRegistry.getAvailable();
49
+ const groups = groupModelsForSelector(models, (provider) =>
50
+ ctx.modelRegistry.getProviderDisplayName(provider),
51
+ );
52
+ await ctx.ui.custom(
53
+ (tui, theme, _keybindings, done) =>
54
+ new KubbisecModelSelectorComponent(
55
+ tui,
56
+ ctx.model,
57
+ groups,
58
+ theme,
59
+ async (model) => {
60
+ const ok = await api.setModel(model);
61
+ if (!ok) {
62
+ ctx.ui.notify(
63
+ "Chave de API não configurada para este provedor. Edite .kubbisec/llm.json ou use /login.",
64
+ "error",
65
+ );
56
66
  return;
57
- }
58
- const config = readLlmConfig(ctx.cwd);
59
- writeLlmConfig(ctx.cwd, {
67
+ }
68
+ const config = readLlmConfig(ctx.cwd);
69
+ writeLlmConfig(ctx.cwd, {
60
70
  ...config,
61
71
  defaultProvider: model.provider,
62
72
  defaultModel: model.id,
63
- });
64
- ctx.ui.notify(`Modelo: ${ctx.modelRegistry.getProviderDisplayName(model.provider)} · ${model.name}`, "info");
65
- done(undefined);
66
- }, () => done(undefined), initialSearch));
73
+ });
74
+ ctx.ui.notify(
75
+ `Modelo: ${ctx.modelRegistry.getProviderDisplayName(model.provider)} · ${model.name}`,
76
+ "info",
77
+ );
78
+ done(undefined);
79
+ },
80
+ () => done(undefined),
81
+ initialSearch,
82
+ ),
83
+ );
67
84
  }
68
85
  async function handleModelCommand(api, args, ctx) {
69
- const trimmed = args.trim();
70
- if (!trimmed || trimmed === "list" || trimmed === "select") {
71
- await showGroupedModelSelector(api, ctx, trimmed === "list" ? "" : "");
72
- return;
73
- }
74
- const slash = trimmed.indexOf("/");
75
- const provider = slash >= 0 ? trimmed.slice(0, slash).trim() : KUBBISEC_LLM_PROVIDER_ID;
76
- const modelId = slash >= 0 ? trimmed.slice(slash + 1).trim() : trimmed;
77
- if (!modelId) {
78
- ctx.ui?.notify("Uso: /model [provedor/]modelo-id ou /model para abrir o seletor.", "warning");
79
- return;
80
- }
81
- const model = ctx.modelRegistry.find(provider, modelId);
82
- if (!model) {
83
- ctx.ui?.notify(`Modelo não encontrado: ${provider}/${modelId}`, "error");
84
- return;
85
- }
86
- const ok = await api.setModel(model);
87
- if (!ok) {
88
- ctx.ui?.notify("Chave de API não configurada para este provedor.", "error");
89
- return;
90
- }
91
- const config = readLlmConfig(ctx.cwd);
92
- writeLlmConfig(ctx.cwd, {
93
- ...config,
94
- defaultProvider: model.provider,
95
- defaultModel: model.id,
96
- });
97
- ctx.ui?.notify(`Modelo: ${ctx.modelRegistry.getProviderDisplayName(model.provider)} · ${model.name}`, "info");
86
+ const trimmed = args.trim();
87
+ if (!trimmed || trimmed === "list" || trimmed === "select") {
88
+ await showGroupedModelSelector(api, ctx, trimmed === "list" ? "" : "");
89
+ return;
90
+ }
91
+ const slash = trimmed.indexOf("/");
92
+ const provider = slash >= 0 ? trimmed.slice(0, slash).trim() : KUBBISEC_LLM_PROVIDER_ID;
93
+ const modelId = slash >= 0 ? trimmed.slice(slash + 1).trim() : trimmed;
94
+ if (!modelId) {
95
+ ctx.ui?.notify("Uso: /model [provedor/]modelo-id ou /model para abrir o seletor.", "warning");
96
+ return;
97
+ }
98
+ const model = ctx.modelRegistry.find(provider, modelId);
99
+ if (!model) {
100
+ ctx.ui?.notify(`Modelo não encontrado: ${provider}/${modelId}`, "error");
101
+ return;
102
+ }
103
+ const ok = await api.setModel(model);
104
+ if (!ok) {
105
+ ctx.ui?.notify("Chave de API não configurada para este provedor.", "error");
106
+ return;
107
+ }
108
+ const config = readLlmConfig(ctx.cwd);
109
+ writeLlmConfig(ctx.cwd, {
110
+ ...config,
111
+ defaultProvider: model.provider,
112
+ defaultModel: model.id,
113
+ });
114
+ ctx.ui?.notify(
115
+ `Modelo: ${ctx.modelRegistry.getProviderDisplayName(model.provider)} · ${model.name}`,
116
+ "info",
117
+ );
98
118
  }
99
119
  async function handleTemperatureCommand(args, ctx) {
100
- const trimmed = args.trim().toLowerCase();
101
- const config = readLlmConfig(ctx.cwd);
102
- if (!trimmed || trimmed === "status") {
103
- const value = getRuntimeTemperature(config);
104
- ctx.ui?.notify(value == null
105
- ? "Temperatura: padrão do modelo (não definida em .kubbisec/llm.json)"
106
- : `Temperatura: ${value}`, "info");
107
- return;
108
- }
109
- if (trimmed === "reset" || trimmed === "default") {
110
- setRuntimeTemperature(undefined, ctx.cwd);
111
- const next = readLlmConfig(ctx.cwd);
112
- writeLlmConfig(ctx.cwd, { ...next, temperature: config.temperature ?? 0.2 });
113
- ctx.ui?.notify("Temperatura restaurada ao valor de .kubbisec/llm.json", "info");
114
- requestKubbisecFooterRender();
115
- return;
116
- }
117
- const parsed = Number.parseFloat(trimmed);
118
- if (!Number.isFinite(parsed)) {
119
- ctx.ui?.notify("Uso: /temperature 0.2 · /temperature status · /temperature reset", "warning");
120
- return;
121
- }
122
- setRuntimeTemperature(parsed, ctx.cwd);
123
- ctx.ui?.notify(`Temperatura: ${getRuntimeTemperature()}`, "info");
120
+ const trimmed = args.trim().toLowerCase();
121
+ const config = readLlmConfig(ctx.cwd);
122
+ if (!trimmed || trimmed === "status") {
123
+ const value = getRuntimeTemperature(config);
124
+ ctx.ui?.notify(
125
+ value == null
126
+ ? "Temperatura: padrão do modelo (não definida em .kubbisec/llm.json)"
127
+ : `Temperatura: ${value}`,
128
+ "info",
129
+ );
130
+ return;
131
+ }
132
+ if (trimmed === "reset" || trimmed === "default") {
133
+ setRuntimeTemperature(undefined, ctx.cwd);
134
+ const next = readLlmConfig(ctx.cwd);
135
+ writeLlmConfig(ctx.cwd, { ...next, temperature: config.temperature ?? 0.2 });
136
+ ctx.ui?.notify("Temperatura restaurada ao valor de .kubbisec/llm.json", "info");
124
137
  requestKubbisecFooterRender();
138
+ return;
139
+ }
140
+ const parsed = Number.parseFloat(trimmed);
141
+ if (!Number.isFinite(parsed)) {
142
+ ctx.ui?.notify("Uso: /temperature 0.2 · /temperature status · /temperature reset", "warning");
143
+ return;
144
+ }
145
+ setRuntimeTemperature(parsed, ctx.cwd);
146
+ ctx.ui?.notify(`Temperatura: ${getRuntimeTemperature()}`, "info");
147
+ requestKubbisecFooterRender();
125
148
  }
126
149
  async function handleThinkingCommand(api, args, ctx) {
127
- const trimmed = args.trim().toLowerCase();
128
- if (!trimmed || trimmed === "status") {
129
- ctx.ui?.notify(`Reasoning effort: ${api.getThinkingLevel()}`, "info");
130
- return;
131
- }
132
- if (!isThinkingLevel(trimmed)) {
133
- ctx.ui?.notify(`Uso: /thinking ${THINKING_LEVELS.join(" | ")}`, "warning");
134
- return;
135
- }
136
- api.setThinkingLevel(trimmed);
137
- const config = readLlmConfig(ctx.cwd);
138
- writeLlmConfig(ctx.cwd, { ...config, defaultThinkingLevel: trimmed });
139
- ctx.ui?.notify(`Reasoning effort: ${trimmed}`, "info");
140
- requestKubbisecFooterRender();
150
+ const trimmed = args.trim().toLowerCase();
151
+ if (!trimmed || trimmed === "status") {
152
+ ctx.ui?.notify(`Reasoning effort: ${api.getThinkingLevel()}`, "info");
153
+ return;
154
+ }
155
+ if (!isThinkingLevel(trimmed)) {
156
+ ctx.ui?.notify(`Uso: /thinking ${THINKING_LEVELS.join(" | ")}`, "warning");
157
+ return;
158
+ }
159
+ api.setThinkingLevel(trimmed);
160
+ const config = readLlmConfig(ctx.cwd);
161
+ writeLlmConfig(ctx.cwd, { ...config, defaultThinkingLevel: trimmed });
162
+ ctx.ui?.notify(`Reasoning effort: ${trimmed}`, "info");
163
+ requestKubbisecFooterRender();
141
164
  }
142
165
  export default function kubbisecLlmConfig(api) {
143
- registerKubbisecLlmProvider(api.registerProvider.bind(api));
144
- const modelsCommand = {
145
- description: "Selecionar modelo (agrupado por provedor)",
146
- handler: (args, ctx) => handleModelCommand(api, args, ctx),
147
- };
148
- api.registerCommand("models", modelsCommand);
149
- api.on("input", async (event, ctx) => {
150
- if (event.source !== "interactive" || !ctx.hasUI)
151
- return;
152
- const trimmed = event.text.trim();
153
- if (!trimmed.startsWith("/model"))
154
- return;
155
- if (trimmed.length > 6 && !trimmed.startsWith("/model "))
156
- return;
157
- const args = trimmed === "/model" ? "" : trimmed.slice("/model ".length);
158
- await handleModelCommand(api, args, ctx);
159
- return { action: "handled" };
160
- });
161
- api.registerCommand("temperature", {
162
- description: "Ver ou definir temperatura (0–2)",
163
- handler: handleTemperatureCommand,
164
- });
165
- api.registerCommand("thinking", {
166
- description: "Ver ou definir reasoning effort (off … xhigh)",
167
- handler: (args, ctx) => handleThinkingCommand(api, args, ctx),
168
- });
169
- api.registerCommand("detect-local", {
170
- description: "Detectar Ollama e LM Studio nesta máquina",
171
- handler: async (_args, ctx) => {
172
- const { result } = await syncAutodetectedLocalProviders(ctx.cwd);
173
- await refreshProviders(api, ctx.cwd);
174
- const names = result.detected.map((provider) => provider.name ?? provider.id);
175
- if (names.length === 0) {
176
- ctx.ui?.notify("Nenhum servidor local detectado (Ollama / LM Studio).", "info");
177
- return;
178
- }
179
- ctx.ui?.notify(`Detectados: ${names.join(", ")}`, "info");
180
- },
181
- });
182
- api.on("session_start", async (_event, ctx) => {
183
- await refreshProviders(api, ctx.cwd);
184
- applyLlmConfigToPiSettings(ctx.cwd);
185
- await applyDefaultModel(api, ctx);
186
- applyDefaultThinking(api, ctx);
187
- });
188
- api.on("before_provider_request", async (event, ctx) => {
189
- const temperature = getRuntimeTemperature(readLlmConfig(ctx.cwd));
190
- return applyTemperatureToProviderPayload(event.payload, temperature);
191
- });
192
- api.on("model_select", async (_event, ctx) => {
193
- const model = ctx.model;
194
- if (!model)
195
- return;
196
- const config = readLlmConfig(ctx.cwd);
197
- writeLlmConfig(ctx.cwd, {
198
- ...config,
199
- defaultProvider: model.provider,
200
- defaultModel: model.id,
201
- });
166
+ registerKubbisecLlmProvider(api.registerProvider.bind(api));
167
+ const modelsCommand = {
168
+ description: "Selecionar modelo (agrupado por provedor)",
169
+ handler: (args, ctx) => handleModelCommand(api, args, ctx),
170
+ };
171
+ api.registerCommand("models", modelsCommand);
172
+ api.on("input", async (event, ctx) => {
173
+ if (event.source !== "interactive" || !ctx.hasUI) return;
174
+ const trimmed = event.text.trim();
175
+ if (!trimmed.startsWith("/model")) return;
176
+ if (trimmed.length > 6 && !trimmed.startsWith("/model ")) return;
177
+ const args = trimmed === "/model" ? "" : trimmed.slice("/model ".length);
178
+ await handleModelCommand(api, args, ctx);
179
+ return { action: "handled" };
180
+ });
181
+ api.registerCommand("temperature", {
182
+ description: "Ver ou definir temperatura (0–2)",
183
+ handler: handleTemperatureCommand,
184
+ });
185
+ api.registerCommand("thinking", {
186
+ description: "Ver ou definir reasoning effort (off … xhigh)",
187
+ handler: (args, ctx) => handleThinkingCommand(api, args, ctx),
188
+ });
189
+ api.registerCommand("detect-local", {
190
+ description: "Detectar Ollama e LM Studio nesta máquina",
191
+ handler: async (_args, ctx) => {
192
+ const { result } = await syncAutodetectedLocalProviders(ctx.cwd);
193
+ await refreshProviders(api, ctx.cwd);
194
+ const names = result.detected.map((provider) => provider.name ?? provider.id);
195
+ if (names.length === 0) {
196
+ ctx.ui?.notify("Nenhum servidor local detectado (Ollama / LM Studio).", "info");
197
+ return;
198
+ }
199
+ ctx.ui?.notify(`Detectados: ${names.join(", ")}`, "info");
200
+ },
201
+ });
202
+ api.on("session_start", async (_event, ctx) => {
203
+ await refreshProviders(api, ctx.cwd);
204
+ applyLlmConfigToPiSettings(ctx.cwd);
205
+ await applyDefaultModel(api, ctx);
206
+ applyDefaultThinking(api, ctx);
207
+ });
208
+ api.on("before_provider_request", async (event, ctx) => {
209
+ const temperature = getRuntimeTemperature(readLlmConfig(ctx.cwd));
210
+ return applyTemperatureToProviderPayload(event.payload, temperature);
211
+ });
212
+ api.on("model_select", async (_event, ctx) => {
213
+ const model = ctx.model;
214
+ if (!model) return;
215
+ const config = readLlmConfig(ctx.cwd);
216
+ writeLlmConfig(ctx.cwd, {
217
+ ...config,
218
+ defaultProvider: model.provider,
219
+ defaultModel: model.id,
202
220
  });
203
- api.on("thinking_level_select", async (_event, ctx) => {
204
- const config = readLlmConfig(ctx.cwd);
205
- writeLlmConfig(ctx.cwd, {
206
- ...config,
207
- defaultThinkingLevel: api.getThinkingLevel(),
208
- });
221
+ });
222
+ api.on("thinking_level_select", async (_event, ctx) => {
223
+ const config = readLlmConfig(ctx.cwd);
224
+ writeLlmConfig(ctx.cwd, {
225
+ ...config,
226
+ defaultThinkingLevel: api.getThinkingLevel(),
209
227
  });
228
+ });
210
229
  }
211
- //# sourceMappingURL=kubbisec-llm-config.extension.js.map
230
+ //# sourceMappingURL=kubbisec-llm-config.extension.js.map
@@ -1,12 +1,14 @@
1
1
  type ExtensionApi = {
2
- on: (event: string, handler: (event: unknown, ctx: ExtensionContext) => void | Promise<unknown>) => void;
2
+ on: (
3
+ event: string,
4
+ handler: (event: unknown, ctx: ExtensionContext) => undefined | Promise<unknown>,
5
+ ) => void;
3
6
  };
4
7
  type ExtensionContext = {
5
- hasUI: boolean;
6
- ui: {
7
- setStatus: (key: string, text: string | undefined) => void;
8
- };
8
+ hasUI: boolean;
9
+ ui: {
10
+ setStatus: (key: string, text: string | undefined) => void;
11
+ };
9
12
  };
10
13
  export default function kubbisecMemory(api: ExtensionApi): void;
11
- export {};
12
- //# sourceMappingURL=kubbisec-memory.extension.d.ts.map
14
+ //# sourceMappingURL=kubbisec-memory.extension.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kubbisec-memory.extension.d.ts","sourceRoot":"","sources":["../../src/extensions/kubbisec-memory.extension.ts"],"names":[],"mappings":"AAYA,KAAK,YAAY,GAAG;IAClB,EAAE,EAAE,CACF,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,KACxE,IAAI,CAAC;CACX,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,EAAE,EAAE;QACF,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;KAC5D,CAAC;CACH,CAAC;AAqDF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI,CA2E9D"}
1
+ {"version":3,"file":"kubbisec-memory.extension.d.ts","sourceRoot":"","sources":["../../src/extensions/kubbisec-memory.extension.ts"],"names":[],"mappings":"AAYA,KAAK,YAAY,GAAG;IAClB,EAAE,EAAE,CACF,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,gBAAgB,KAAK,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,KAC7E,IAAI,CAAC;CACX,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,EAAE,EAAE;QACF,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;KAC5D,CAAC;CACH,CAAC;AAqDF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI,CA2E9D"}
@@ -1,107 +1,100 @@
1
1
  /**
2
2
  * KubbiSec memory extension — recall before turn, remember after turn.
3
3
  */
4
- import { addChatMemoryTurn, buildMemoryInjectBlock, extractRememberCandidates, isMemoryEnabled, searchChatMemory, } from "@kubbisec/chat-memory";
4
+ import {
5
+ addChatMemoryTurn,
6
+ buildMemoryInjectBlock,
7
+ extractRememberCandidates,
8
+ isMemoryEnabled,
9
+ searchChatMemory,
10
+ } from "@kubbisec/chat-memory";
11
+
5
12
  function resolveMemoryScope() {
6
- const organizationId = process.env.KUBBISEC_ORG_ID?.trim();
7
- const userId = process.env.KUBBISEC_USER_ID?.trim() ?? process.env.KUBBISEC_CLIENT_ID?.trim();
8
- if (!organizationId || !userId)
9
- return null;
10
- const projectId = process.env.KUBBISEC_PROJECT_ID?.trim();
11
- return {
12
- organizationId,
13
- userId,
14
- ...(projectId ? { projectId } : {}),
15
- };
13
+ const organizationId = process.env.KUBBISEC_ORG_ID?.trim();
14
+ const userId = process.env.KUBBISEC_USER_ID?.trim() ?? process.env.KUBBISEC_CLIENT_ID?.trim();
15
+ if (!organizationId || !userId) return null;
16
+ const projectId = process.env.KUBBISEC_PROJECT_ID?.trim();
17
+ return {
18
+ organizationId,
19
+ userId,
20
+ ...(projectId ? { projectId } : {}),
21
+ };
16
22
  }
17
23
  function extractTextContent(content) {
18
- if (typeof content === "string")
19
- return content;
20
- if (!Array.isArray(content))
21
- return "";
22
- return content
23
- .filter((block) => typeof block === "object" && block !== null)
24
- .filter((block) => block.type === "text" && typeof block.text === "string")
25
- .map((block) => block.text ?? "")
26
- .join("\n");
24
+ if (typeof content === "string") return content;
25
+ if (!Array.isArray(content)) return "";
26
+ return content
27
+ .filter((block) => typeof block === "object" && block !== null)
28
+ .filter((block) => block.type === "text" && typeof block.text === "string")
29
+ .map((block) => block.text ?? "")
30
+ .join("\n");
27
31
  }
28
32
  function lastUserMessage(messages) {
29
- for (let i = messages.length - 1; i >= 0; i -= 1) {
30
- const msg = messages[i];
31
- if (msg?.role === "user") {
32
- return extractTextContent(msg.content);
33
- }
33
+ for (let i = messages.length - 1; i >= 0; i -= 1) {
34
+ const msg = messages[i];
35
+ if (msg?.role === "user") {
36
+ return extractTextContent(msg.content);
34
37
  }
35
- return "";
38
+ }
39
+ return "";
36
40
  }
37
41
  export default function kubbisecMemory(api) {
38
- let lastUserPrompt = "";
39
- api.on("before_agent_start", async (event) => {
40
- if (!isMemoryEnabled())
41
- return undefined;
42
- const scope = resolveMemoryScope();
43
- if (!scope)
44
- return undefined;
45
- const { prompt } = event;
46
- lastUserPrompt = prompt;
47
- try {
48
- const memories = await Promise.race([
49
- searchChatMemory(scope, prompt, 5),
50
- new Promise((_, reject) => {
51
- setTimeout(() => reject(new Error("recall_timeout")), 3000);
52
- }),
53
- ]);
54
- const block = buildMemoryInjectBlock(memories);
55
- if (!block)
56
- return undefined;
57
- return {
58
- message: {
59
- customType: "kubbisec-memory-inject",
60
- content: block,
61
- display: false,
62
- },
63
- };
64
- }
65
- catch {
66
- return undefined;
67
- }
68
- });
69
- api.on("turn_end", async (event, ctx) => {
70
- if (!isMemoryEnabled())
71
- return;
72
- if (!lastUserPrompt || lastUserPrompt.length < 20)
73
- return;
74
- const scope = resolveMemoryScope();
75
- if (!scope)
76
- return;
77
- const turn = event;
78
- if (turn.message.role !== "assistant")
79
- return;
80
- const assistantText = extractTextContent(turn.message.content);
81
- const candidates = extractRememberCandidates(lastUserPrompt, assistantText);
82
- for (const candidate of candidates) {
83
- await addChatMemoryTurn(scope, candidate);
84
- }
85
- if (ctx.hasUI && candidates.length > 0) {
86
- ctx.ui.setStatus("kubbisec-memory", `memory · ${candidates.length}`);
87
- }
88
- });
89
- api.on("agent_end", async (event) => {
90
- if (!isMemoryEnabled())
91
- return;
92
- const scope = resolveMemoryScope();
93
- if (!scope)
94
- return;
95
- const agentEnd = event;
96
- const userText = lastUserMessage(agentEnd.messages);
97
- const assistantMsg = [...agentEnd.messages].reverse().find((m) => m.role === "assistant");
98
- const assistantText = assistantMsg ? extractTextContent(assistantMsg.content) : "";
99
- if (!userText || userText.length < 20)
100
- return;
101
- const candidates = extractRememberCandidates(userText, assistantText);
102
- for (const candidate of candidates) {
103
- await addChatMemoryTurn(scope, candidate);
104
- }
105
- });
42
+ let lastUserPrompt = "";
43
+ api.on("before_agent_start", async (event) => {
44
+ if (!isMemoryEnabled()) return undefined;
45
+ const scope = resolveMemoryScope();
46
+ if (!scope) return undefined;
47
+ const { prompt } = event;
48
+ lastUserPrompt = prompt;
49
+ try {
50
+ const memories = await Promise.race([
51
+ searchChatMemory(scope, prompt, 5),
52
+ new Promise((_, reject) => {
53
+ setTimeout(() => reject(new Error("recall_timeout")), 3000);
54
+ }),
55
+ ]);
56
+ const block = buildMemoryInjectBlock(memories);
57
+ if (!block) return undefined;
58
+ return {
59
+ message: {
60
+ customType: "kubbisec-memory-inject",
61
+ content: block,
62
+ display: false,
63
+ },
64
+ };
65
+ } catch {
66
+ return undefined;
67
+ }
68
+ });
69
+ api.on("turn_end", async (event, ctx) => {
70
+ if (!isMemoryEnabled()) return;
71
+ if (!lastUserPrompt || lastUserPrompt.length < 20) return;
72
+ const scope = resolveMemoryScope();
73
+ if (!scope) return;
74
+ const turn = event;
75
+ if (turn.message.role !== "assistant") return;
76
+ const assistantText = extractTextContent(turn.message.content);
77
+ const candidates = extractRememberCandidates(lastUserPrompt, assistantText);
78
+ for (const candidate of candidates) {
79
+ await addChatMemoryTurn(scope, candidate);
80
+ }
81
+ if (ctx.hasUI && candidates.length > 0) {
82
+ ctx.ui.setStatus("kubbisec-memory", `memory · ${candidates.length}`);
83
+ }
84
+ });
85
+ api.on("agent_end", async (event) => {
86
+ if (!isMemoryEnabled()) return;
87
+ const scope = resolveMemoryScope();
88
+ if (!scope) return;
89
+ const agentEnd = event;
90
+ const userText = lastUserMessage(agentEnd.messages);
91
+ const assistantMsg = [...agentEnd.messages].reverse().find((m) => m.role === "assistant");
92
+ const assistantText = assistantMsg ? extractTextContent(assistantMsg.content) : "";
93
+ if (!userText || userText.length < 20) return;
94
+ const candidates = extractRememberCandidates(userText, assistantText);
95
+ for (const candidate of candidates) {
96
+ await addChatMemoryTurn(scope, candidate);
97
+ }
98
+ });
106
99
  }
107
- //# sourceMappingURL=kubbisec-memory.extension.js.map
100
+ //# sourceMappingURL=kubbisec-memory.extension.js.map