@kubbisec/ai-linux-arm64 0.1.22 → 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 (358) hide show
  1. package/bin/kubbisec +0 -0
  2. package/bundled/components/kubbisec-model-selector.d.ts +34 -47
  3. package/bundled/components/kubbisec-model-selector.js +177 -187
  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 +52 -54
  8. package/bundled/config/config.js.map +1 -1
  9. package/bundled/config/detect-local-llm-providers.d.ts +16 -26
  10. package/bundled/config/detect-local-llm-providers.js +142 -130
  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 +46 -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 +72 -44
  18. package/bundled/config/ensure-kubbisec-project-settings.js.map +1 -1
  19. package/bundled/config/extended-context.d.ts +6 -5
  20. package/bundled/config/extended-context.js +22 -23
  21. package/bundled/config/feature-flags.d.ts +2 -10
  22. package/bundled/config/feature-flags.js +2 -8
  23. package/bundled/config/format-kubbisec-footer-status.d.ts +1 -1
  24. package/bundled/config/format-kubbisec-footer-status.js +31 -26
  25. package/bundled/config/kubbisec-extension-manifest.d.ts +2 -22
  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 +25 -51
  30. package/bundled/config/llm-config-mutations.js +182 -173
  31. package/bundled/config/llm-config.d.ts +41 -54
  32. package/bundled/config/llm-config.js +199 -199
  33. package/bundled/config/llm-provider-catalog.d.ts +15 -18
  34. package/bundled/config/llm-provider-catalog.js +46 -45
  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 +182 -174
  38. package/bundled/config/materialize-kubbisec-pi-resources.js.map +1 -1
  39. package/bundled/config/register-custom-llm-providers.d.ts +5 -11
  40. package/bundled/config/register-custom-llm-providers.js +15 -17
  41. package/bundled/config/register-kubbisec-llm-provider.d.ts +10 -14
  42. package/bundled/config/register-kubbisec-llm-provider.js +42 -50
  43. package/bundled/config/resolve-agents-context-file.d.ts +1 -1
  44. package/bundled/config/resolve-agents-context-file.js +34 -33
  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 +3 -6
  48. package/bundled/config/sync-kubbisec-pi-models.js +58 -58
  49. package/bundled/copy/cli-reference-index.d.ts +2 -7
  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 +6 -11
  54. package/bundled/copy/kubbisec-shell-copy.js +1 -1
  55. package/bundled/extensions/cli-local-shared.d.ts +36 -45
  56. package/bundled/extensions/cli-local-shared.d.ts.map +1 -1
  57. package/bundled/extensions/cli-local-shared.js +129 -128
  58. package/bundled/extensions/cli-local-shared.js.map +1 -1
  59. package/bundled/extensions/kubbisec-aspm-local.extension.d.ts +15 -18
  60. package/bundled/extensions/kubbisec-aspm-local.extension.d.ts.map +1 -1
  61. package/bundled/extensions/kubbisec-aspm-local.extension.js +106 -121
  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 +35 -64
  68. package/bundled/extensions/kubbisec-clarify.extension.d.ts.map +1 -1
  69. package/bundled/extensions/kubbisec-clarify.extension.js +305 -323
  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 +32 -29
  73. package/bundled/extensions/kubbisec-extended-context.extension.d.ts +1 -1
  74. package/bundled/extensions/kubbisec-extended-context.extension.js +43 -56
  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 +215 -205
  78. package/bundled/extensions/kubbisec-footer.extension.js.map +1 -1
  79. package/bundled/extensions/kubbisec-github-local.extension.d.ts +18 -29
  80. package/bundled/extensions/kubbisec-github-local.extension.d.ts.map +1 -1
  81. package/bundled/extensions/kubbisec-github-local.extension.js +457 -129
  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 +181 -200
  85. package/bundled/extensions/kubbisec-memory.extension.d.ts +7 -9
  86. package/bundled/extensions/kubbisec-memory.extension.d.ts.map +1 -1
  87. package/bundled/extensions/kubbisec-memory.extension.js +95 -88
  88. package/bundled/extensions/kubbisec-naus-local.extension.d.ts +15 -18
  89. package/bundled/extensions/kubbisec-naus-local.extension.d.ts.map +1 -1
  90. package/bundled/extensions/kubbisec-naus-local.extension.js +103 -135
  91. package/bundled/extensions/kubbisec-naus-local.extension.js.map +1 -1
  92. package/bundled/extensions/kubbisec-platform-tools.extension.d.ts +21 -31
  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 +8 -10
  97. package/bundled/extensions/kubbisec-runtime-status.extension.js +13 -15
  98. package/bundled/extensions/kubbisec-scope.extension.d.ts +7 -12
  99. package/bundled/extensions/kubbisec-scope.extension.js +13 -13
  100. package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts +16 -27
  101. package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts.map +1 -1
  102. package/bundled/extensions/kubbisec-skill-mentions.extension.js +64 -73
  103. package/bundled/extensions/kubbisec-skill-mentions.extension.js.map +1 -1
  104. package/bundled/extensions/kubbisec-skill-telemetry.extension.d.ts +3 -2
  105. package/bundled/extensions/kubbisec-skill-telemetry.extension.js +64 -59
  106. package/bundled/extensions/kubbisec-theme-lock.extension.d.ts +1 -1
  107. package/bundled/extensions/kubbisec-theme-lock.extension.js +34 -33
  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 +122 -116
  111. package/bundled/extensions/kubbisec-ui.extension.js.map +1 -1
  112. package/bundled/extensions/kubbisec-workflow.extension.d.ts +18 -20
  113. package/bundled/extensions/kubbisec-workflow.extension.d.ts.map +1 -1
  114. package/bundled/extensions/kubbisec-workflow.extension.js +140 -138
  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 +51 -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/security/aspm-gate-rules.d.ts.map +1 -1
  250. package/bundled/node_modules/@aspm/shared/dist/security/aspm-gate-rules.js.map +1 -1
  251. package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.d.ts.map +1 -1
  252. package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.js.map +1 -1
  253. package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.d.ts.map +1 -1
  254. package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.js +2 -2
  255. package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.js.map +1 -1
  256. package/bundled/node_modules/@aspm/shared/dist/security/index.d.ts +2 -2
  257. package/bundled/node_modules/@aspm/shared/dist/security/index.d.ts.map +1 -1
  258. package/bundled/node_modules/@aspm/shared/dist/security/index.js +2 -2
  259. package/bundled/node_modules/@aspm/shared/dist/security/index.js.map +1 -1
  260. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.d.ts +4 -0
  261. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.d.ts.map +1 -0
  262. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.js +10 -0
  263. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.js.map +1 -0
  264. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.d.ts +4 -0
  265. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.d.ts.map +1 -0
  266. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.js +20 -0
  267. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.js.map +1 -0
  268. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.d.ts +2 -0
  269. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.d.ts.map +1 -0
  270. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.js +9 -0
  271. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.js.map +1 -0
  272. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.d.ts +3 -0
  273. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.d.ts.map +1 -0
  274. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.js +18 -0
  275. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.js.map +1 -0
  276. package/bundled/node_modules/@aspm/shared/package.json +27 -5
  277. package/bundled/node_modules/@kubbisec/chat-memory/dist/sanitizer.js +2 -2
  278. package/bundled/node_modules/@kubbisec/chat-memory/dist/sanitizer.js.map +1 -1
  279. package/bundled/node_modules/@kubbisec/chat-memory/package.json +4 -4
  280. package/bundled/node_modules/@kubbisec/home/dist/migrate.d.ts.map +1 -1
  281. package/bundled/node_modules/@kubbisec/home/dist/migrate.js +1 -1
  282. package/bundled/node_modules/@kubbisec/home/dist/migrate.js.map +1 -1
  283. package/bundled/node_modules/@kubbisec/home/package.json +3 -3
  284. package/bundled/resolve-bundled-dist-root.js +130 -122
  285. package/bundled/resolve-bundled-dist-root.js.map +1 -1
  286. package/bundled/skills/aspm-platform/SKILL.md +3 -1
  287. package/bundled/skills/at-path-mentions.d.ts +1 -1
  288. package/bundled/skills/at-path-mentions.js +153 -146
  289. package/bundled/skills/chat-mention-render.d.ts +2 -2
  290. package/bundled/skills/chat-mention-render.js +126 -121
  291. package/bundled/skills/chat-mentions.d.ts +8 -17
  292. package/bundled/skills/chat-mentions.js +76 -76
  293. package/bundled/skills/github-local/SKILL.md +5 -5
  294. package/bundled/skills/kubbisec-resource-router/SKILL.md +3 -0
  295. package/bundled/skills/list-bundled-skills.d.ts +3 -3
  296. package/bundled/skills/list-bundled-skills.js +35 -33
  297. package/bundled/skills/naus-pipelines/SKILL.md +11 -10
  298. package/bundled/skills/remediation/SKILL.md +1 -1
  299. package/bundled/skills/skill-mention.d.ts +2 -10
  300. package/bundled/skills/skill-mention.js +2 -10
  301. package/bundled/theme/clear-terminal.d.ts +1 -1
  302. package/bundled/theme/clear-terminal.js +4 -3
  303. package/bundled/theme/footer-render-hook.d.ts +1 -1
  304. package/bundled/theme/footer-render-hook.js +3 -3
  305. package/bundled/theme/kubbisec-brand-fg.d.ts +1 -1
  306. package/bundled/theme/kubbisec-brand-fg.js +2 -2
  307. package/bundled/theme/kubbisec-menu-themes.d.ts +7 -7
  308. package/bundled/theme/kubbisec-menu-themes.js +31 -30
  309. package/bundled/theme/kubbisec-theme-name.d.ts +1 -1
  310. package/bundled/theme/kubbisec-theme-name.js +1 -1
  311. package/bundled/theme/patch-pi-settings-theme.runtime.d.ts +1 -1
  312. package/bundled/theme/patch-pi-settings-theme.runtime.js +10 -11
  313. package/bundled/theme/render-compact-header.d.ts +5 -13
  314. package/bundled/theme/render-compact-header.js +128 -126
  315. package/bundled/theme/render-compact-header.js.map +1 -1
  316. package/bundled/workflow/session-workflow-mode.d.ts +1 -1
  317. package/bundled/workflow/session-workflow-mode.js +33 -33
  318. package/package.json +1 -1
  319. package/bundled/clarify/clarify-gate-state.d.ts +0 -3
  320. package/bundled/clarify/clarify-gate-state.d.ts.map +0 -1
  321. package/bundled/clarify/clarify-gate-state.js +0 -9
  322. package/bundled/clarify/clarify-gate-state.js.map +0 -1
  323. package/bundled/clarify/clarify-gate.d.ts +0 -35
  324. package/bundled/clarify/clarify-gate.d.ts.map +0 -1
  325. package/bundled/clarify/clarify-gate.js +0 -159
  326. package/bundled/clarify/clarify-gate.js.map +0 -1
  327. package/bundled/clarify/clarify-select-panel.d.ts +0 -21
  328. package/bundled/clarify/clarify-select-panel.d.ts.map +0 -1
  329. package/bundled/clarify/clarify-select-panel.js +0 -80
  330. package/bundled/clarify/clarify-select-panel.js.map +0 -1
  331. package/bundled/clarify/clarify-ui-state.d.ts +0 -23
  332. package/bundled/clarify/clarify-ui-state.d.ts.map +0 -1
  333. package/bundled/clarify/clarify-ui-state.js +0 -48
  334. package/bundled/clarify/clarify-ui-state.js.map +0 -1
  335. package/bundled/clarify/parse-clarify-answer.d.ts +0 -32
  336. package/bundled/clarify/parse-clarify-answer.d.ts.map +0 -1
  337. package/bundled/clarify/parse-clarify-answer.js +0 -51
  338. package/bundled/clarify/parse-clarify-answer.js.map +0 -1
  339. package/bundled/clarify/question-format.d.ts +0 -50
  340. package/bundled/clarify/question-format.d.ts.map +0 -1
  341. package/bundled/clarify/question-format.js +0 -137
  342. package/bundled/clarify/question-format.js.map +0 -1
  343. package/bundled/clarify/questionnaire-tool.d.ts +0 -36
  344. package/bundled/clarify/questionnaire-tool.d.ts.map +0 -1
  345. package/bundled/clarify/questionnaire-tool.js +0 -197
  346. package/bundled/clarify/questionnaire-tool.js.map +0 -1
  347. package/bundled/clarify/scope-discovery.d.ts +0 -12
  348. package/bundled/clarify/scope-discovery.d.ts.map +0 -1
  349. package/bundled/clarify/scope-discovery.js +0 -122
  350. package/bundled/clarify/scope-discovery.js.map +0 -1
  351. package/bundled/clarify/session-questionnaire.d.ts +0 -61
  352. package/bundled/clarify/session-questionnaire.d.ts.map +0 -1
  353. package/bundled/clarify/session-questionnaire.js +0 -364
  354. package/bundled/clarify/session-questionnaire.js.map +0 -1
  355. package/bundled/clarify/session-questionnaire.types.d.ts +0 -49
  356. package/bundled/clarify/session-questionnaire.types.d.ts.map +0 -1
  357. package/bundled/clarify/session-questionnaire.types.js +0 -13
  358. package/bundled/clarify/session-questionnaire.types.js.map +0 -1
@@ -1,3 +1,3 @@
1
1
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
2
  export default function kubbisecLlmConfig(api: ExtensionAPI): void;
3
- //# sourceMappingURL=kubbisec-llm-config.extension.d.ts.map
3
+ //# sourceMappingURL=kubbisec-llm-config.extension.d.ts.map
@@ -1,230 +1,211 @@
1
- import {
2
- groupModelsForSelector,
3
- KubbisecModelSelectorComponent,
4
- } from "../components/kubbisec-model-selector.js";
1
+ import { groupModelsForSelector, KubbisecModelSelectorComponent, } from "../components/kubbisec-model-selector.js";
5
2
  import { syncAutodetectedLocalProviders } from "../config/detect-local-llm-providers.js";
6
- import {
7
- applyLlmConfigToPiSettings,
8
- applyTemperatureToProviderPayload,
9
- getRuntimeTemperature,
10
- readLlmConfig,
11
- setRuntimeTemperature,
12
- writeLlmConfig,
13
- } from "../config/llm-config.js";
3
+ import { applyLlmConfigToPiSettings, applyTemperatureToProviderPayload, getRuntimeTemperature, readLlmConfig, setRuntimeTemperature, writeLlmConfig, } from "../config/llm-config.js";
14
4
  import { KUBBISEC_LLM_PROVIDER_ID } from "../config/llm-provider-catalog.js";
15
5
  import { registerCustomLlmProviders } from "../config/register-custom-llm-providers.js";
16
6
  import { registerKubbisecLlmProvider } from "../config/register-kubbisec-llm-provider.js";
17
7
  import { requestKubbisecFooterRender } from "../theme/footer-render-hook.js";
18
-
19
- const THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh"];
8
+ const THINKING_LEVELS = [
9
+ "off",
10
+ "minimal",
11
+ "low",
12
+ "medium",
13
+ "high",
14
+ "xhigh",
15
+ ];
20
16
  function isThinkingLevel(value) {
21
- return THINKING_LEVELS.includes(value);
17
+ return THINKING_LEVELS.includes(value);
22
18
  }
23
19
  async function refreshProviders(api, cwd) {
24
- await syncAutodetectedLocalProviders(cwd);
25
- registerKubbisecLlmProvider(api.registerProvider.bind(api), cwd);
26
- registerCustomLlmProviders(api.registerProvider.bind(api), readLlmConfig(cwd));
20
+ await syncAutodetectedLocalProviders(cwd);
21
+ registerKubbisecLlmProvider(api.registerProvider.bind(api), cwd);
22
+ registerCustomLlmProviders(api.registerProvider.bind(api), readLlmConfig(cwd));
27
23
  }
28
24
  async function applyDefaultModel(api, ctx) {
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);
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);
38
37
  }
39
38
  function applyDefaultThinking(api, ctx) {
40
- const config = readLlmConfig(ctx.cwd);
41
- if (!config.defaultThinkingLevel) return;
42
- if (api.getThinkingLevel() === config.defaultThinkingLevel) return;
43
- api.setThinkingLevel(config.defaultThinkingLevel);
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);
44
45
  }
45
46
  async function showGroupedModelSelector(api, ctx, initialSearch = "") {
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
- );
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");
66
56
  return;
67
- }
68
- const config = readLlmConfig(ctx.cwd);
69
- writeLlmConfig(ctx.cwd, {
57
+ }
58
+ const config = readLlmConfig(ctx.cwd);
59
+ writeLlmConfig(ctx.cwd, {
70
60
  ...config,
71
61
  defaultProvider: model.provider,
72
62
  defaultModel: model.id,
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
- );
63
+ });
64
+ ctx.ui.notify(`Modelo: ${ctx.modelRegistry.getProviderDisplayName(model.provider)} · ${model.name}`, "info");
65
+ done(undefined);
66
+ }, () => done(undefined), initialSearch));
84
67
  }
85
68
  async function handleModelCommand(api, args, ctx) {
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
- );
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");
118
98
  }
119
99
  async function handleTemperatureCommand(args, ctx) {
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");
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");
137
124
  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();
148
125
  }
149
126
  async function handleThinkingCommand(api, args, ctx) {
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();
164
- }
165
- export default function kubbisecLlmConfig(api) {
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");
127
+ const trimmed = args.trim().toLowerCase();
128
+ if (!trimmed || trimmed === "status") {
129
+ ctx.ui?.notify(`Reasoning effort: ${api.getThinkingLevel()}`, "info");
197
130
  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;
131
+ }
132
+ if (!isThinkingLevel(trimmed)) {
133
+ ctx.ui?.notify(`Uso: /thinking ${THINKING_LEVELS.join(" | ")}`, "warning");
134
+ return;
135
+ }
136
+ api.setThinkingLevel(trimmed);
215
137
  const config = readLlmConfig(ctx.cwd);
216
- writeLlmConfig(ctx.cwd, {
217
- ...config,
218
- defaultProvider: model.provider,
219
- defaultModel: model.id,
138
+ writeLlmConfig(ctx.cwd, { ...config, defaultThinkingLevel: trimmed });
139
+ ctx.ui?.notify(`Reasoning effort: ${trimmed}`, "info");
140
+ requestKubbisecFooterRender();
141
+ }
142
+ 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" };
220
160
  });
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(),
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
+ });
202
+ });
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
+ });
227
209
  });
228
- });
229
210
  }
230
- //# sourceMappingURL=kubbisec-llm-config.extension.js.map
211
+ //# sourceMappingURL=kubbisec-llm-config.extension.js.map
@@ -1,14 +1,12 @@
1
1
  type ExtensionApi = {
2
- on: (
3
- event: string,
4
- handler: (event: unknown, ctx: ExtensionContext) => undefined | Promise<unknown>,
5
- ) => void;
2
+ on: (event: string, handler: (event: unknown, ctx: ExtensionContext) => undefined | Promise<unknown>) => void;
6
3
  };
7
4
  type ExtensionContext = {
8
- hasUI: boolean;
9
- ui: {
10
- setStatus: (key: string, text: string | undefined) => void;
11
- };
5
+ hasUI: boolean;
6
+ ui: {
7
+ setStatus: (key: string, text: string | undefined) => void;
8
+ };
12
9
  };
13
10
  export default function kubbisecMemory(api: ExtensionApi): void;
14
- //# sourceMappingURL=kubbisec-memory.extension.d.ts.map
11
+ export {};
12
+ //# 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,100 +1,107 @@
1
1
  /**
2
2
  * KubbiSec memory extension — recall before turn, remember after turn.
3
3
  */
4
- import {
5
- addChatMemoryTurn,
6
- buildMemoryInjectBlock,
7
- extractRememberCandidates,
8
- isMemoryEnabled,
9
- searchChatMemory,
10
- } from "@kubbisec/chat-memory";
11
-
4
+ import { addChatMemoryTurn, buildMemoryInjectBlock, extractRememberCandidates, isMemoryEnabled, searchChatMemory, } from "@kubbisec/chat-memory";
12
5
  function resolveMemoryScope() {
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
- };
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
+ };
22
16
  }
23
17
  function extractTextContent(content) {
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");
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");
31
27
  }
32
28
  function lastUserMessage(messages) {
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);
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
+ }
37
34
  }
38
- }
39
- return "";
35
+ return "";
40
36
  }
41
37
  export default function kubbisecMemory(api) {
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
- });
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
+ });
99
106
  }
100
- //# sourceMappingURL=kubbisec-memory.extension.js.map
107
+ //# sourceMappingURL=kubbisec-memory.extension.js.map