@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
@@ -2,245 +2,245 @@ import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
3
  import { KUBBISEC_PROJECT_CONFIG_DIR } from "./ensure-kubbisec-project-settings.js";
4
4
  import { KUBBISEC_LLM_PROVIDER_ID, mergeKubbisecModelCatalog } from "./llm-provider-catalog.js";
5
+
5
6
  const LLM_CONFIG_FILE = "llm.json";
6
7
  const DEFAULT_LLM_CONFIG = {
7
- defaultProvider: KUBBISEC_LLM_PROVIDER_ID,
8
- defaultThinkingLevel: "medium",
9
- temperature: 0.2,
8
+ defaultProvider: KUBBISEC_LLM_PROVIDER_ID,
9
+ defaultThinkingLevel: "medium",
10
+ temperature: 0.2,
10
11
  };
11
12
  export function resolveLlmConfigPath(cwd = process.cwd()) {
12
- return path.join(cwd, KUBBISEC_PROJECT_CONFIG_DIR, LLM_CONFIG_FILE);
13
+ return path.join(cwd, KUBBISEC_PROJECT_CONFIG_DIR, LLM_CONFIG_FILE);
13
14
  }
14
15
  function readJsonFile(filePath) {
15
- try {
16
- return JSON.parse(fs.readFileSync(filePath, "utf8"));
17
- }
18
- catch {
19
- return undefined;
20
- }
16
+ try {
17
+ return JSON.parse(fs.readFileSync(filePath, "utf8"));
18
+ } catch {
19
+ return undefined;
20
+ }
21
21
  }
22
22
  export function parseLlmConfig(raw) {
23
- if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
24
- return { ...DEFAULT_LLM_CONFIG };
25
- }
26
- const input = raw;
27
- const next = { ...DEFAULT_LLM_CONFIG };
28
- if (typeof input.defaultProvider === "string" && input.defaultProvider.trim()) {
29
- next.defaultProvider = input.defaultProvider.trim();
30
- }
31
- if (typeof input.defaultModel === "string" && input.defaultModel.trim()) {
32
- next.defaultModel = input.defaultModel.trim();
33
- }
34
- if (input.defaultThinkingLevel === "off" ||
35
- input.defaultThinkingLevel === "minimal" ||
36
- input.defaultThinkingLevel === "low" ||
37
- input.defaultThinkingLevel === "medium" ||
38
- input.defaultThinkingLevel === "high" ||
39
- input.defaultThinkingLevel === "xhigh") {
40
- next.defaultThinkingLevel = input.defaultThinkingLevel;
41
- }
42
- if (typeof input.temperature === "number" && Number.isFinite(input.temperature)) {
43
- next.temperature = Math.min(2, Math.max(0, input.temperature));
44
- }
45
- if (input.localLlm && typeof input.localLlm === "object" && !Array.isArray(input.localLlm)) {
46
- const local = input.localLlm;
47
- next.localLlm = {
48
- ...(typeof local?.autoDetect === "boolean" ? { autoDetect: local.autoDetect } : {}),
49
- ...(local?.ollama && typeof local.ollama === "object"
50
- ? {
51
- ollama: {
52
- ...(local.ollama.enabled !== undefined
53
- ? { enabled: local.ollama.enabled === true }
54
- : {}),
55
- ...(typeof local.ollama.baseUrl === "string" && local.ollama.baseUrl.trim()
56
- ? { baseUrl: local.ollama.baseUrl.trim() }
57
- : {}),
58
- },
59
- }
23
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
24
+ return { ...DEFAULT_LLM_CONFIG };
25
+ }
26
+ const input = raw;
27
+ const next = { ...DEFAULT_LLM_CONFIG };
28
+ if (typeof input.defaultProvider === "string" && input.defaultProvider.trim()) {
29
+ next.defaultProvider = input.defaultProvider.trim();
30
+ }
31
+ if (typeof input.defaultModel === "string" && input.defaultModel.trim()) {
32
+ next.defaultModel = input.defaultModel.trim();
33
+ }
34
+ if (
35
+ input.defaultThinkingLevel === "off" ||
36
+ input.defaultThinkingLevel === "minimal" ||
37
+ input.defaultThinkingLevel === "low" ||
38
+ input.defaultThinkingLevel === "medium" ||
39
+ input.defaultThinkingLevel === "high" ||
40
+ input.defaultThinkingLevel === "xhigh"
41
+ ) {
42
+ next.defaultThinkingLevel = input.defaultThinkingLevel;
43
+ }
44
+ if (typeof input.temperature === "number" && Number.isFinite(input.temperature)) {
45
+ next.temperature = Math.min(2, Math.max(0, input.temperature));
46
+ }
47
+ if (input.localLlm && typeof input.localLlm === "object" && !Array.isArray(input.localLlm)) {
48
+ const local = input.localLlm;
49
+ next.localLlm = {
50
+ ...(typeof local?.autoDetect === "boolean" ? { autoDetect: local.autoDetect } : {}),
51
+ ...(local?.ollama && typeof local.ollama === "object"
52
+ ? {
53
+ ollama: {
54
+ ...(local.ollama.enabled !== undefined
55
+ ? { enabled: local.ollama.enabled === true }
60
56
  : {}),
61
- ...(local?.lmstudio && typeof local.lmstudio === "object"
62
- ? {
63
- lmstudio: {
64
- ...(local.lmstudio.enabled !== undefined
65
- ? { enabled: local.lmstudio.enabled === true }
66
- : {}),
67
- ...(typeof local.lmstudio.baseUrl === "string" && local.lmstudio.baseUrl.trim()
68
- ? { baseUrl: local.lmstudio.baseUrl.trim() }
69
- : {}),
70
- },
71
- }
57
+ ...(typeof local.ollama.baseUrl === "string" && local.ollama.baseUrl.trim()
58
+ ? { baseUrl: local.ollama.baseUrl.trim() }
72
59
  : {}),
73
- };
74
- }
75
- if (input.kubbisec && typeof input.kubbisec === "object" && !Array.isArray(input.kubbisec)) {
76
- const kub = input.kubbisec;
77
- if (Array.isArray(kub.models)) {
78
- next.kubbisec = {
79
- models: kub.models
80
- .filter((m) => Boolean(m && typeof m === "object" && typeof m.id === "string"))
81
- .map((m) => ({ ...m, id: m.id.trim() }))
82
- .filter((m) => m.id.length > 0),
83
- };
84
- }
85
- }
86
- if (Array.isArray(input.providers)) {
87
- next.providers = input.providers
88
- .filter((p) => {
89
- return Boolean(p &&
90
- typeof p === "object" &&
91
- typeof p.id === "string" &&
92
- typeof p.baseUrl === "string" &&
93
- Array.isArray(p.models));
94
- })
95
- .map((p) => ({
96
- ...p,
97
- id: p.id.trim(),
98
- baseUrl: p.baseUrl.trim(),
99
- ...(p.autodetected === true ? { autodetected: true } : {}),
100
- ...(p.detectSource === "ollama" || p.detectSource === "lmstudio"
101
- ? { detectSource: p.detectSource }
60
+ },
61
+ }
62
+ : {}),
63
+ ...(local?.lmstudio && typeof local.lmstudio === "object"
64
+ ? {
65
+ lmstudio: {
66
+ ...(local.lmstudio.enabled !== undefined
67
+ ? { enabled: local.lmstudio.enabled === true }
102
68
  : {}),
103
- models: p.models.filter((m) => m.id?.trim()).map((m) => ({ ...m, id: m.id.trim() })),
104
- }))
105
- .filter((p) => p.id.length > 0 && p.baseUrl.length > 0 && p.models.length > 0);
106
- }
107
- return next;
69
+ ...(typeof local.lmstudio.baseUrl === "string" && local.lmstudio.baseUrl.trim()
70
+ ? { baseUrl: local.lmstudio.baseUrl.trim() }
71
+ : {}),
72
+ },
73
+ }
74
+ : {}),
75
+ };
76
+ }
77
+ if (input.kubbisec && typeof input.kubbisec === "object" && !Array.isArray(input.kubbisec)) {
78
+ const kub = input.kubbisec;
79
+ if (Array.isArray(kub.models)) {
80
+ next.kubbisec = {
81
+ models: kub.models
82
+ .filter((m) => Boolean(m && typeof m === "object" && typeof m.id === "string"))
83
+ .map((m) => ({ ...m, id: m.id.trim() }))
84
+ .filter((m) => m.id.length > 0),
85
+ };
86
+ }
87
+ }
88
+ if (Array.isArray(input.providers)) {
89
+ next.providers = input.providers
90
+ .filter((p) => {
91
+ return Boolean(
92
+ p &&
93
+ typeof p === "object" &&
94
+ typeof p.id === "string" &&
95
+ typeof p.baseUrl === "string" &&
96
+ Array.isArray(p.models),
97
+ );
98
+ })
99
+ .map((p) => ({
100
+ ...p,
101
+ id: p.id.trim(),
102
+ baseUrl: p.baseUrl.trim(),
103
+ ...(p.autodetected === true ? { autodetected: true } : {}),
104
+ ...(p.detectSource === "ollama" || p.detectSource === "lmstudio"
105
+ ? { detectSource: p.detectSource }
106
+ : {}),
107
+ models: p.models.filter((m) => m.id?.trim()).map((m) => ({ ...m, id: m.id.trim() })),
108
+ }))
109
+ .filter((p) => p.id.length > 0 && p.baseUrl.length > 0 && p.models.length > 0);
110
+ }
111
+ return next;
108
112
  }
109
113
  export function readLlmConfig(cwd = process.cwd()) {
110
- const filePath = resolveLlmConfigPath(cwd);
111
- const parsed = parseLlmConfig(readJsonFile(filePath));
112
- return parsed;
114
+ const filePath = resolveLlmConfigPath(cwd);
115
+ const parsed = parseLlmConfig(readJsonFile(filePath));
116
+ return parsed;
113
117
  }
114
118
  export function writeLlmConfig(cwd, config) {
115
- const filePath = resolveLlmConfigPath(cwd);
116
- fs.mkdirSync(path.dirname(filePath), { recursive: true, mode: 0o755 });
117
- fs.writeFileSync(filePath, `${JSON.stringify(config, null, 2)}\n`, {
118
- encoding: "utf8",
119
- mode: 0o600,
120
- });
119
+ const filePath = resolveLlmConfigPath(cwd);
120
+ fs.mkdirSync(path.dirname(filePath), { recursive: true, mode: 0o755 });
121
+ fs.writeFileSync(filePath, `${JSON.stringify(config, null, 2)}\n`, {
122
+ encoding: "utf8",
123
+ mode: 0o600,
124
+ });
121
125
  }
122
126
  export function ensureLlmConfigFromOrg(cwd, options) {
123
- const current = readLlmConfig(cwd);
124
- const orgModel = options.model?.trim();
125
- const merged = {
126
- ...current,
127
- defaultProvider: KUBBISEC_LLM_PROVIDER_ID,
128
- ...(orgModel ? { defaultModel: orgModel } : {}),
129
- kubbisec: {
130
- models: mergeKubbisecModelCatalog(orgModel, current.kubbisec?.models),
131
- },
132
- };
133
- writeLlmConfig(cwd, merged);
134
- return merged;
127
+ const current = readLlmConfig(cwd);
128
+ const orgModel = options.model?.trim();
129
+ const merged = {
130
+ ...current,
131
+ defaultProvider: KUBBISEC_LLM_PROVIDER_ID,
132
+ ...(orgModel ? { defaultModel: orgModel } : {}),
133
+ kubbisec: {
134
+ models: mergeKubbisecModelCatalog(orgModel, current.kubbisec?.models),
135
+ },
136
+ };
137
+ writeLlmConfig(cwd, merged);
138
+ return merged;
135
139
  }
136
140
  function resolveAgentProjectSettingsPath(cwd) {
137
- return path.join(cwd, KUBBISEC_PROJECT_CONFIG_DIR, "settings.json");
141
+ return path.join(cwd, KUBBISEC_PROJECT_CONFIG_DIR, "settings.json");
138
142
  }
139
143
  export function applyLlmConfigToAgentSettings(cwd = process.cwd(), config = readLlmConfig(cwd)) {
140
- const settingsPath = resolveAgentProjectSettingsPath(cwd);
141
- fs.mkdirSync(path.dirname(settingsPath), { recursive: true, mode: 0o755 });
142
- let existing = {};
143
- try {
144
- const raw = readJsonFile(settingsPath);
145
- if (raw && typeof raw === "object" && !Array.isArray(raw)) {
146
- existing = raw;
147
- }
148
- }
149
- catch {
150
- /* fresh */
151
- }
152
- const merged = {
153
- ...existing,
154
- defaultProvider: config.defaultProvider ?? KUBBISEC_LLM_PROVIDER_ID,
155
- ...(config.defaultModel ? { defaultModel: config.defaultModel } : {}),
156
- ...(config.defaultThinkingLevel ? { defaultThinkingLevel: config.defaultThinkingLevel } : {}),
157
- };
158
- fs.writeFileSync(settingsPath, `${JSON.stringify(merged, null, 2)}\n`, {
159
- encoding: "utf8",
160
- mode: 0o600,
161
- });
144
+ const settingsPath = resolveAgentProjectSettingsPath(cwd);
145
+ fs.mkdirSync(path.dirname(settingsPath), { recursive: true, mode: 0o755 });
146
+ let existing = {};
147
+ try {
148
+ const raw = readJsonFile(settingsPath);
149
+ if (raw && typeof raw === "object" && !Array.isArray(raw)) {
150
+ existing = raw;
151
+ }
152
+ } catch {
153
+ /* fresh */
154
+ }
155
+ const merged = {
156
+ ...existing,
157
+ defaultProvider: config.defaultProvider ?? KUBBISEC_LLM_PROVIDER_ID,
158
+ ...(config.defaultModel ? { defaultModel: config.defaultModel } : {}),
159
+ ...(config.defaultThinkingLevel ? { defaultThinkingLevel: config.defaultThinkingLevel } : {}),
160
+ };
161
+ fs.writeFileSync(settingsPath, `${JSON.stringify(merged, null, 2)}\n`, {
162
+ encoding: "utf8",
163
+ mode: 0o600,
164
+ });
162
165
  }
163
166
  /** @deprecated Use applyLlmConfigToAgentSettings */
164
167
  export const applyLlmConfigToPiSettings = applyLlmConfigToAgentSettings;
165
168
  export function resolveApiKeyValue(apiKey) {
166
- const raw = apiKey?.trim();
167
- if (!raw)
168
- return undefined;
169
- if (/^[A-Z][A-Z0-9_]*$/.test(raw)) {
170
- const fromEnv = process.env[raw]?.trim();
171
- return fromEnv || undefined;
172
- }
173
- return raw;
169
+ const raw = apiKey?.trim();
170
+ if (!raw) return undefined;
171
+ if (/^[A-Z][A-Z0-9_]*$/.test(raw)) {
172
+ const fromEnv = process.env[raw]?.trim();
173
+ return fromEnv || undefined;
174
+ }
175
+ return raw;
174
176
  }
175
177
  let runtimeTemperature;
176
178
  export function getRuntimeTemperature(config = readLlmConfig()) {
177
- return runtimeTemperature ?? config.temperature;
179
+ return runtimeTemperature ?? config.temperature;
178
180
  }
179
181
  export function setRuntimeTemperature(value, cwd = process.cwd()) {
180
- if (value == null || !Number.isFinite(value)) {
181
- runtimeTemperature = undefined;
182
- return;
183
- }
184
- runtimeTemperature = Math.min(2, Math.max(0, value));
185
- const config = readLlmConfig(cwd);
186
- writeLlmConfig(cwd, { ...config, temperature: runtimeTemperature });
182
+ if (value == null || !Number.isFinite(value)) {
183
+ runtimeTemperature = undefined;
184
+ return;
185
+ }
186
+ runtimeTemperature = Math.min(2, Math.max(0, value));
187
+ const config = readLlmConfig(cwd);
188
+ writeLlmConfig(cwd, { ...config, temperature: runtimeTemperature });
187
189
  }
188
190
  export function applyTemperatureToProviderPayload(payload, temperature) {
189
- if (temperature == null || !Number.isFinite(temperature))
190
- return payload;
191
- if (!payload || typeof payload !== "object")
192
- return payload;
193
- const body = payload;
194
- if ("temperature" in body) {
195
- return { ...body, temperature };
196
- }
197
- if (typeof body.body === "string") {
198
- try {
199
- const parsed = JSON.parse(body.body);
200
- return { ...body, body: JSON.stringify({ ...parsed, temperature }) };
201
- }
202
- catch {
203
- return payload;
204
- }
205
- }
206
- if (body.body && typeof body.body === "object" && !Array.isArray(body.body)) {
207
- return {
208
- ...body,
209
- body: { ...body.body, temperature },
210
- };
211
- }
191
+ if (temperature == null || !Number.isFinite(temperature)) return payload;
192
+ if (!payload || typeof payload !== "object") return payload;
193
+ const body = payload;
194
+ if ("temperature" in body) {
212
195
  return { ...body, temperature };
196
+ }
197
+ if (typeof body.body === "string") {
198
+ try {
199
+ const parsed = JSON.parse(body.body);
200
+ return { ...body, body: JSON.stringify({ ...parsed, temperature }) };
201
+ } catch {
202
+ return payload;
203
+ }
204
+ }
205
+ if (body.body && typeof body.body === "object" && !Array.isArray(body.body)) {
206
+ return {
207
+ ...body,
208
+ body: { ...body.body, temperature },
209
+ };
210
+ }
211
+ return { ...body, temperature };
213
212
  }
214
213
  export function resolveChatModelId(cwd = process.cwd(), orgModel) {
215
- const config = readLlmConfig(cwd);
216
- return (config.defaultModel?.trim() ||
217
- process.env.KUBBISEC_AI_MODEL_ID?.trim() ||
218
- process.env.KUBBISEC_AI_MODEL?.trim() ||
219
- process.env.KUBBISEC_PI_MODEL?.trim() ||
220
- process.env.NAUS_PI_MODEL?.trim() ||
221
- orgModel?.trim() ||
222
- "gpt-4o");
214
+ const config = readLlmConfig(cwd);
215
+ return (
216
+ config.defaultModel?.trim() ||
217
+ process.env.KUBBISEC_AI_MODEL_ID?.trim() ||
218
+ process.env.KUBBISEC_AI_MODEL?.trim() ||
219
+ process.env.KUBBISEC_PI_MODEL?.trim() ||
220
+ process.env.NAUS_PI_MODEL?.trim() ||
221
+ orgModel?.trim() ||
222
+ "gpt-4o"
223
+ );
223
224
  }
224
225
  export function resolveChatProviderId(cwd = process.cwd()) {
225
- const config = readLlmConfig(cwd);
226
- return config.defaultProvider?.trim() || KUBBISEC_LLM_PROVIDER_ID;
226
+ const config = readLlmConfig(cwd);
227
+ return config.defaultProvider?.trim() || KUBBISEC_LLM_PROVIDER_ID;
227
228
  }
228
229
  export const FOOTER_INFERENCE_UNSET = "—";
229
230
  /** Footer model ref: `provider/id` (no provider display name or KubbiSec branding). */
230
231
  export function formatModelFooterLabel(provider, modelId) {
231
- const id = modelId.trim();
232
- if (!id)
233
- return "no-model";
234
- if (id.includes("/"))
235
- return id;
236
- const providerId = provider.trim() || KUBBISEC_LLM_PROVIDER_ID;
237
- return `${providerId}/${id}`;
232
+ const id = modelId.trim();
233
+ if (!id) return "no-model";
234
+ if (id.includes("/")) return id;
235
+ const providerId = provider.trim() || KUBBISEC_LLM_PROVIDER_ID;
236
+ return `${providerId}/${id}`;
238
237
  }
239
238
  export function formatModelFooterWithInferenceSettings(modelRef, thinkingLevel, temperature) {
240
- const thinking = thinkingLevel?.trim() || FOOTER_INFERENCE_UNSET;
241
- const temp = temperature != null && Number.isFinite(temperature)
242
- ? String(temperature)
243
- : FOOTER_INFERENCE_UNSET;
244
- return `${modelRef} · ${thinking} · ${temp}`;
245
- }
246
- //# sourceMappingURL=llm-config.js.map
239
+ const thinking = thinkingLevel?.trim() || FOOTER_INFERENCE_UNSET;
240
+ const temp =
241
+ temperature != null && Number.isFinite(temperature)
242
+ ? String(temperature)
243
+ : FOOTER_INFERENCE_UNSET;
244
+ return `${modelRef} · ${thinking} · ${temp}`;
245
+ }
246
+ //# sourceMappingURL=llm-config.js.map
@@ -3,20 +3,23 @@ export declare const KUBBISEC_LLM_PROVIDER_ID = "kubbisec";
3
3
  export declare const KUBBISEC_LLM_PROVIDER_NAME = "KubbiSec";
4
4
  export declare const KUBBISEC_BUILTIN_MODELS: KubbisecLlmModelDef[];
5
5
  export type ProviderModelConfigShape = {
6
- id: string;
7
- name: string;
8
- api: "openai-completions";
9
- reasoning: boolean;
10
- input: ("text" | "image")[];
11
- cost: {
12
- input: number;
13
- output: number;
14
- cacheRead: number;
15
- cacheWrite: number;
16
- };
17
- contextWindow: number;
18
- maxTokens: number;
6
+ id: string;
7
+ name: string;
8
+ api: "openai-completions";
9
+ reasoning: boolean;
10
+ input: ("text" | "image")[];
11
+ cost: {
12
+ input: number;
13
+ output: number;
14
+ cacheRead: number;
15
+ cacheWrite: number;
16
+ };
17
+ contextWindow: number;
18
+ maxTokens: number;
19
19
  };
20
20
  export declare function toProviderModelConfig(def: KubbisecLlmModelDef): ProviderModelConfigShape;
21
- export declare function mergeKubbisecModelCatalog(orgModel?: string | null, extra?: KubbisecLlmModelDef[]): KubbisecLlmModelDef[];
22
- //# sourceMappingURL=llm-provider-catalog.d.ts.map
21
+ export declare function mergeKubbisecModelCatalog(
22
+ orgModel?: string | null,
23
+ extra?: KubbisecLlmModelDef[],
24
+ ): KubbisecLlmModelDef[];
25
+ //# sourceMappingURL=llm-provider-catalog.d.ts.map
@@ -1,54 +1,53 @@
1
1
  export const KUBBISEC_LLM_PROVIDER_ID = "kubbisec";
2
2
  export const KUBBISEC_LLM_PROVIDER_NAME = "KubbiSec";
3
3
  export const KUBBISEC_BUILTIN_MODELS = [
4
- { id: "gpt-4o", name: "GPT-4o", reasoning: false, contextWindow: 128_000, maxTokens: 16_384 },
5
- {
6
- id: "gpt-4o-mini",
7
- name: "GPT-4o Mini",
8
- reasoning: false,
9
- contextWindow: 128_000,
10
- maxTokens: 16_384,
11
- },
12
- { id: "o3-mini", name: "O3 Mini", reasoning: true, contextWindow: 200_000, maxTokens: 100_000 },
13
- {
14
- id: "claude-sonnet-4-20250514",
15
- name: "Claude Sonnet 4",
16
- reasoning: true,
17
- contextWindow: 200_000,
18
- maxTokens: 16_384,
19
- },
4
+ { id: "gpt-4o", name: "GPT-4o", reasoning: false, contextWindow: 128_000, maxTokens: 16_384 },
5
+ {
6
+ id: "gpt-4o-mini",
7
+ name: "GPT-4o Mini",
8
+ reasoning: false,
9
+ contextWindow: 128_000,
10
+ maxTokens: 16_384,
11
+ },
12
+ { id: "o3-mini", name: "O3 Mini", reasoning: true, contextWindow: 200_000, maxTokens: 100_000 },
13
+ {
14
+ id: "claude-sonnet-4-20250514",
15
+ name: "Claude Sonnet 4",
16
+ reasoning: true,
17
+ contextWindow: 200_000,
18
+ maxTokens: 16_384,
19
+ },
20
20
  ];
21
21
  export function toProviderModelConfig(def) {
22
- return {
23
- id: def.id,
24
- name: def.name?.trim() || def.id,
25
- api: "openai-completions",
26
- reasoning: def.reasoning === true,
27
- input: ["text"],
28
- cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
29
- contextWindow: def.contextWindow ?? 128_000,
30
- maxTokens: def.maxTokens ?? 8_192,
31
- };
22
+ return {
23
+ id: def.id,
24
+ name: def.name?.trim() || def.id,
25
+ api: "openai-completions",
26
+ reasoning: def.reasoning === true,
27
+ input: ["text"],
28
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
29
+ contextWindow: def.contextWindow ?? 128_000,
30
+ maxTokens: def.maxTokens ?? 8_192,
31
+ };
32
32
  }
33
33
  export function mergeKubbisecModelCatalog(orgModel, extra) {
34
- const byId = new Map();
35
- for (const model of KUBBISEC_BUILTIN_MODELS) {
36
- byId.set(model.id, model);
37
- }
38
- for (const model of extra ?? []) {
39
- if (model.id?.trim())
40
- byId.set(model.id.trim(), { ...model, id: model.id.trim() });
41
- }
42
- const org = orgModel?.trim();
43
- if (org && !byId.has(org)) {
44
- byId.set(org, { id: org, name: org, reasoning: org.startsWith("o") });
45
- }
46
- const ordered = [];
47
- if (org && byId.has(org)) {
48
- ordered.push(byId.get(org));
49
- byId.delete(org);
50
- }
51
- ordered.push(...byId.values());
52
- return ordered;
34
+ const byId = new Map();
35
+ for (const model of KUBBISEC_BUILTIN_MODELS) {
36
+ byId.set(model.id, model);
37
+ }
38
+ for (const model of extra ?? []) {
39
+ if (model.id?.trim()) byId.set(model.id.trim(), { ...model, id: model.id.trim() });
40
+ }
41
+ const org = orgModel?.trim();
42
+ if (org && !byId.has(org)) {
43
+ byId.set(org, { id: org, name: org, reasoning: org.startsWith("o") });
44
+ }
45
+ const ordered = [];
46
+ if (org && byId.has(org)) {
47
+ ordered.push(byId.get(org));
48
+ byId.delete(org);
49
+ }
50
+ ordered.push(...byId.values());
51
+ return ordered;
53
52
  }
54
- //# sourceMappingURL=llm-provider-catalog.js.map
53
+ //# sourceMappingURL=llm-provider-catalog.js.map
@@ -16,4 +16,4 @@ export declare const materializeKubbisecPiExtensions: typeof materializeKubbisec
16
16
  export declare const materializeKubbisecPiTheme: typeof materializeKubbisecAgentTheme;
17
17
  /** @deprecated Use resolveKubbisecAgentExtensionPaths */
18
18
  export declare const resolveKubbisecPiExtensionPaths: typeof resolveKubbisecAgentExtensionPaths;
19
- //# sourceMappingURL=materialize-kubbisec-pi-resources.d.ts.map
19
+ //# sourceMappingURL=materialize-kubbisec-pi-resources.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"materialize-kubbisec-pi-resources.d.ts","sourceRoot":"","sources":["../../src/config/materialize-kubbisec-pi-resources.ts"],"names":[],"mappings":"AAqMA;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CAAC,GAAG,SAAgB,GAAG,MAAM,EAAE,CAiChF;AAED,wFAAwF;AACxF,wBAAgB,6BAA6B,CAAC,GAAG,SAAgB,GAAG,IAAI,CAOvE;AAED,wEAAwE;AACxE,wBAAgB,kCAAkC,CAAC,GAAG,SAAgB,GAAG,MAAM,EAAE,CAOhF;AAED,yDAAyD;AACzD,eAAO,MAAM,+BAA+B,2CAAqC,CAAC;AAElF,oDAAoD;AACpD,eAAO,MAAM,0BAA0B,sCAAgC,CAAC;AAExE,yDAAyD;AACzD,eAAO,MAAM,+BAA+B,2CAAqC,CAAC"}
1
+ {"version":3,"file":"materialize-kubbisec-pi-resources.d.ts","sourceRoot":"","sources":["../../src/config/materialize-kubbisec-pi-resources.ts"],"names":[],"mappings":"AAoMA;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CAAC,GAAG,SAAgB,GAAG,MAAM,EAAE,CAiChF;AAED,wFAAwF;AACxF,wBAAgB,6BAA6B,CAAC,GAAG,SAAgB,GAAG,IAAI,CAOvE;AAED,wEAAwE;AACxE,wBAAgB,kCAAkC,CAAC,GAAG,SAAgB,GAAG,MAAM,EAAE,CAOhF;AAED,yDAAyD;AACzD,eAAO,MAAM,+BAA+B,2CAAqC,CAAC;AAElF,oDAAoD;AACpD,eAAO,MAAM,0BAA0B,sCAAgC,CAAC;AAExE,yDAAyD;AACzD,eAAO,MAAM,+BAA+B,2CAAqC,CAAC"}