@kubbisec/ai-linux-x64 0.1.20 → 0.1.22

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 (280) hide show
  1. package/bin/kubbisec +0 -0
  2. package/bundled/components/kubbisec-model-selector.js +1 -1
  3. package/bundled/components/kubbisec-model-selector.js.map +1 -1
  4. package/bundled/config/config.d.ts.map +1 -1
  5. package/bundled/config/config.js +2 -4
  6. package/bundled/config/config.js.map +1 -1
  7. package/bundled/config/ensure-kbs-project-settings.d.ts +20 -0
  8. package/bundled/config/ensure-kbs-project-settings.d.ts.map +1 -0
  9. package/bundled/config/ensure-kbs-project-settings.js +46 -0
  10. package/bundled/config/ensure-kbs-project-settings.js.map +1 -0
  11. package/bundled/config/ensure-kubbisec-project-settings.d.ts +2 -0
  12. package/bundled/config/ensure-kubbisec-project-settings.d.ts.map +1 -1
  13. package/bundled/config/ensure-kubbisec-project-settings.js +25 -1
  14. package/bundled/config/ensure-kubbisec-project-settings.js.map +1 -1
  15. package/bundled/config/kubbisec-extension-manifest.d.ts +1 -1
  16. package/bundled/config/kubbisec-extension-manifest.d.ts.map +1 -1
  17. package/bundled/config/kubbisec-extension-manifest.js +0 -1
  18. package/bundled/config/kubbisec-extension-manifest.js.map +1 -1
  19. package/bundled/config/materialize-kubbisec-pi-resources.d.ts.map +1 -1
  20. package/bundled/config/materialize-kubbisec-pi-resources.js +0 -1
  21. package/bundled/config/materialize-kubbisec-pi-resources.js.map +1 -1
  22. package/bundled/copy/cli-reference-index.d.ts +1 -5
  23. package/bundled/copy/cli-reference-index.d.ts.map +1 -1
  24. package/bundled/copy/cli-reference-index.js +1 -61
  25. package/bundled/copy/cli-reference-index.js.map +1 -1
  26. package/bundled/extensions/cli-local-shared.d.ts +10 -0
  27. package/bundled/extensions/cli-local-shared.d.ts.map +1 -1
  28. package/bundled/extensions/cli-local-shared.js +11 -0
  29. package/bundled/extensions/cli-local-shared.js.map +1 -1
  30. package/bundled/extensions/kubbisec-aspm-local.extension.d.ts.map +1 -1
  31. package/bundled/extensions/kubbisec-aspm-local.extension.js +14 -25
  32. package/bundled/extensions/kubbisec-aspm-local.extension.js.map +1 -1
  33. package/bundled/extensions/kubbisec-clarify.extension.d.ts +1 -1
  34. package/bundled/extensions/kubbisec-clarify.extension.d.ts.map +1 -1
  35. package/bundled/extensions/kubbisec-clarify.extension.js.map +1 -1
  36. package/bundled/extensions/kubbisec-footer.extension.d.ts.map +1 -1
  37. package/bundled/extensions/kubbisec-footer.extension.js.map +1 -1
  38. package/bundled/extensions/kubbisec-github-local.extension.d.ts +0 -3
  39. package/bundled/extensions/kubbisec-github-local.extension.d.ts.map +1 -1
  40. package/bundled/extensions/kubbisec-github-local.extension.js +403 -68
  41. package/bundled/extensions/kubbisec-github-local.extension.js.map +1 -1
  42. package/bundled/extensions/kubbisec-memory.extension.d.ts +1 -1
  43. package/bundled/extensions/kubbisec-memory.extension.d.ts.map +1 -1
  44. package/bundled/extensions/kubbisec-naus-local.extension.d.ts.map +1 -1
  45. package/bundled/extensions/kubbisec-naus-local.extension.js +15 -26
  46. package/bundled/extensions/kubbisec-naus-local.extension.js.map +1 -1
  47. package/bundled/extensions/kubbisec-platform-tools.extension.d.ts.map +1 -1
  48. package/bundled/extensions/kubbisec-platform-tools.extension.js.map +1 -1
  49. package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts +1 -1
  50. package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts.map +1 -1
  51. package/bundled/extensions/kubbisec-skill-mentions.extension.js +2 -1
  52. package/bundled/extensions/kubbisec-skill-mentions.extension.js.map +1 -1
  53. package/bundled/extensions/kubbisec-ui.extension.d.ts.map +1 -1
  54. package/bundled/extensions/kubbisec-ui.extension.js +30 -19
  55. package/bundled/extensions/kubbisec-ui.extension.js.map +1 -1
  56. package/bundled/extensions/kubbisec-workflow.extension.d.ts +1 -1
  57. package/bundled/extensions/kubbisec-workflow.extension.d.ts.map +1 -1
  58. package/bundled/node_modules/@aspm/shared/dist/ai/index.d.ts +1 -0
  59. package/bundled/node_modules/@aspm/shared/dist/ai/index.d.ts.map +1 -1
  60. package/bundled/node_modules/@aspm/shared/dist/ai/index.js +1 -0
  61. package/bundled/node_modules/@aspm/shared/dist/ai/index.js.map +1 -1
  62. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.d.ts +7 -0
  63. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.d.ts.map +1 -0
  64. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.js +30 -0
  65. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.js.map +1 -0
  66. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.d.ts +7 -0
  67. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.d.ts.map +1 -0
  68. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.js +14 -0
  69. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.js.map +1 -0
  70. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.d.ts +6 -0
  71. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.d.ts.map +1 -0
  72. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.js +65 -0
  73. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.js.map +1 -0
  74. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.d.ts +8 -0
  75. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.d.ts.map +1 -0
  76. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.js +29 -0
  77. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.js.map +1 -0
  78. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.d.ts +7 -0
  79. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.d.ts.map +1 -0
  80. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.js +16 -0
  81. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.js.map +1 -0
  82. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.d.ts +2 -0
  83. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.d.ts.map +1 -0
  84. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.js +36 -0
  85. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.js.map +1 -0
  86. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.d.ts +6 -0
  87. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.d.ts.map +1 -0
  88. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.js +32 -0
  89. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.js.map +1 -0
  90. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.d.ts +12 -0
  91. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.d.ts.map +1 -0
  92. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.js +93 -0
  93. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.js.map +1 -0
  94. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.d.ts +13 -0
  95. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.d.ts.map +1 -0
  96. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.js +79 -0
  97. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.js.map +1 -0
  98. package/bundled/node_modules/@aspm/shared/dist/api-key/index.d.ts +4 -0
  99. package/bundled/node_modules/@aspm/shared/dist/api-key/index.d.ts.map +1 -0
  100. package/bundled/node_modules/@aspm/shared/dist/api-key/index.js +20 -0
  101. package/bundled/node_modules/@aspm/shared/dist/api-key/index.js.map +1 -0
  102. package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.d.ts +20 -0
  103. package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.d.ts.map +1 -0
  104. package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.js +78 -0
  105. package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.js.map +1 -0
  106. package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.d.ts +19 -0
  107. package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.d.ts.map +1 -0
  108. package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.js +126 -0
  109. package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.js.map +1 -0
  110. package/bundled/node_modules/@aspm/shared/dist/assistant/index.d.ts +1 -0
  111. package/bundled/node_modules/@aspm/shared/dist/assistant/index.d.ts.map +1 -1
  112. package/bundled/node_modules/@aspm/shared/dist/assistant/index.js +1 -0
  113. package/bundled/node_modules/@aspm/shared/dist/assistant/index.js.map +1 -1
  114. package/bundled/node_modules/@aspm/shared/dist/billing/index.d.ts +2 -0
  115. package/bundled/node_modules/@aspm/shared/dist/billing/index.d.ts.map +1 -0
  116. package/bundled/node_modules/@aspm/shared/dist/billing/index.js +18 -0
  117. package/bundled/node_modules/@aspm/shared/dist/billing/index.js.map +1 -0
  118. package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.d.ts +17 -0
  119. package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.d.ts.map +1 -0
  120. package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.js +30 -0
  121. package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.js.map +1 -0
  122. package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.d.ts +42 -0
  123. package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.d.ts.map +1 -0
  124. package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.js +147 -0
  125. package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.js.map +1 -0
  126. package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.d.ts +12 -0
  127. package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.d.ts.map +1 -0
  128. package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.js +70 -0
  129. package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.js.map +1 -0
  130. package/bundled/node_modules/@aspm/shared/dist/ci/index.d.ts +4 -0
  131. package/bundled/node_modules/@aspm/shared/dist/ci/index.d.ts.map +1 -0
  132. package/bundled/node_modules/@aspm/shared/dist/ci/index.js +20 -0
  133. package/bundled/node_modules/@aspm/shared/dist/ci/index.js.map +1 -0
  134. package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.d.ts +16 -0
  135. package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.d.ts.map +1 -0
  136. package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.js +45 -0
  137. package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.js.map +1 -0
  138. package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.d.ts +1 -0
  139. package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.d.ts.map +1 -1
  140. package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.js +6 -0
  141. package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.js.map +1 -1
  142. package/bundled/node_modules/@aspm/shared/dist/dto/index.d.ts +5 -3
  143. package/bundled/node_modules/@aspm/shared/dist/dto/index.d.ts.map +1 -1
  144. package/bundled/node_modules/@aspm/shared/dist/dto/index.js +5 -3
  145. package/bundled/node_modules/@aspm/shared/dist/dto/index.js.map +1 -1
  146. package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.d.ts +9 -0
  147. package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.d.ts.map +1 -0
  148. package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.js +52 -0
  149. package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.js.map +1 -0
  150. package/bundled/node_modules/@aspm/shared/dist/enums.d.ts +3 -1
  151. package/bundled/node_modules/@aspm/shared/dist/enums.d.ts.map +1 -1
  152. package/bundled/node_modules/@aspm/shared/dist/enums.js +4 -0
  153. package/bundled/node_modules/@aspm/shared/dist/enums.js.map +1 -1
  154. package/bundled/node_modules/@aspm/shared/dist/index.d.ts +8 -2
  155. package/bundled/node_modules/@aspm/shared/dist/index.d.ts.map +1 -1
  156. package/bundled/node_modules/@aspm/shared/dist/index.js +8 -2
  157. package/bundled/node_modules/@aspm/shared/dist/index.js.map +1 -1
  158. package/bundled/node_modules/@aspm/shared/dist/mcp/constants.d.ts +22 -0
  159. package/bundled/node_modules/@aspm/shared/dist/mcp/constants.d.ts.map +1 -0
  160. package/bundled/node_modules/@aspm/shared/dist/mcp/constants.js +52 -0
  161. package/bundled/node_modules/@aspm/shared/dist/mcp/constants.js.map +1 -0
  162. package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.d.ts +37 -0
  163. package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.d.ts.map +1 -0
  164. package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.js +54 -0
  165. package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.js.map +1 -0
  166. package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.d.ts +7 -4
  167. package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.d.ts.map +1 -1
  168. package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.js +15 -7
  169. package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.js.map +1 -1
  170. package/bundled/node_modules/@aspm/shared/dist/rbac/index.d.ts +1 -0
  171. package/bundled/node_modules/@aspm/shared/dist/rbac/index.d.ts.map +1 -1
  172. package/bundled/node_modules/@aspm/shared/dist/rbac/index.js +1 -0
  173. package/bundled/node_modules/@aspm/shared/dist/rbac/index.js.map +1 -1
  174. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permission-descriptions.d.ts.map +1 -1
  175. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permission-descriptions.js +2 -0
  176. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permission-descriptions.js.map +1 -1
  177. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.d.ts +1 -1
  178. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.d.ts.map +1 -1
  179. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.js +2 -0
  180. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.js.map +1 -1
  181. package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.d.ts +8 -0
  182. package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.d.ts.map +1 -0
  183. package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.js +19 -0
  184. package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.js.map +1 -0
  185. package/bundled/node_modules/@aspm/shared/dist/rbac/resolve-org-permissions.d.ts.map +1 -1
  186. package/bundled/node_modules/@aspm/shared/dist/rbac/resolve-org-permissions.js +4 -0
  187. package/bundled/node_modules/@aspm/shared/dist/rbac/resolve-org-permissions.js.map +1 -1
  188. package/bundled/node_modules/@aspm/shared/dist/redaction.d.ts +1 -0
  189. package/bundled/node_modules/@aspm/shared/dist/redaction.d.ts.map +1 -1
  190. package/bundled/node_modules/@aspm/shared/dist/redaction.js +1 -0
  191. package/bundled/node_modules/@aspm/shared/dist/redaction.js.map +1 -1
  192. package/bundled/node_modules/@aspm/shared/dist/redaction.test.d.ts +2 -0
  193. package/bundled/node_modules/@aspm/shared/dist/redaction.test.d.ts.map +1 -0
  194. package/bundled/node_modules/@aspm/shared/dist/redaction.test.js +626 -0
  195. package/bundled/node_modules/@aspm/shared/dist/redaction.test.js.map +1 -0
  196. package/bundled/node_modules/@aspm/shared/dist/security/aspm-gate-rules.d.ts.map +1 -1
  197. package/bundled/node_modules/@aspm/shared/dist/security/aspm-gate-rules.js.map +1 -1
  198. package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.d.ts.map +1 -1
  199. package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.js.map +1 -1
  200. package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.d.ts.map +1 -1
  201. package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.js +2 -2
  202. package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.js.map +1 -1
  203. package/bundled/node_modules/@aspm/shared/dist/security/index.d.ts +2 -2
  204. package/bundled/node_modules/@aspm/shared/dist/security/index.d.ts.map +1 -1
  205. package/bundled/node_modules/@aspm/shared/dist/security/index.js +2 -2
  206. package/bundled/node_modules/@aspm/shared/dist/security/index.js.map +1 -1
  207. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.d.ts +4 -0
  208. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.d.ts.map +1 -0
  209. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.js +10 -0
  210. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.js.map +1 -0
  211. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.d.ts +4 -0
  212. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.d.ts.map +1 -0
  213. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.js +20 -0
  214. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.js.map +1 -0
  215. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.d.ts +2 -0
  216. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.d.ts.map +1 -0
  217. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.js +9 -0
  218. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.js.map +1 -0
  219. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.d.ts +3 -0
  220. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.d.ts.map +1 -0
  221. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.js +18 -0
  222. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.js.map +1 -0
  223. package/bundled/node_modules/@aspm/shared/package.json +27 -5
  224. package/bundled/node_modules/@kubbisec/chat-memory/dist/sanitizer.js +2 -2
  225. package/bundled/node_modules/@kubbisec/chat-memory/dist/sanitizer.js.map +1 -1
  226. package/bundled/node_modules/@kubbisec/chat-memory/package.json +4 -4
  227. package/bundled/node_modules/@kubbisec/home/dist/migrate.d.ts.map +1 -1
  228. package/bundled/node_modules/@kubbisec/home/dist/migrate.js +1 -1
  229. package/bundled/node_modules/@kubbisec/home/dist/migrate.js.map +1 -1
  230. package/bundled/node_modules/@kubbisec/home/package.json +3 -3
  231. package/bundled/resolve-bundled-dist-root.js +0 -1
  232. package/bundled/resolve-bundled-dist-root.js.map +1 -1
  233. package/bundled/skills/aspm-platform/SKILL.md +3 -1
  234. package/bundled/skills/github-local/SKILL.md +5 -5
  235. package/bundled/skills/kubbisec-resource-router/SKILL.md +3 -0
  236. package/bundled/skills/naus-pipelines/SKILL.md +11 -10
  237. package/bundled/skills/remediation/SKILL.md +1 -1
  238. package/bundled/theme/render-compact-header.js +1 -1
  239. package/bundled/theme/render-compact-header.js.map +1 -1
  240. package/package.json +1 -1
  241. package/bundled/clarify/clarify-gate-state.d.ts +0 -3
  242. package/bundled/clarify/clarify-gate-state.d.ts.map +0 -1
  243. package/bundled/clarify/clarify-gate-state.js +0 -9
  244. package/bundled/clarify/clarify-gate-state.js.map +0 -1
  245. package/bundled/clarify/clarify-gate.d.ts +0 -28
  246. package/bundled/clarify/clarify-gate.d.ts.map +0 -1
  247. package/bundled/clarify/clarify-gate.js +0 -152
  248. package/bundled/clarify/clarify-gate.js.map +0 -1
  249. package/bundled/clarify/clarify-select-panel.d.ts +0 -14
  250. package/bundled/clarify/clarify-select-panel.d.ts.map +0 -1
  251. package/bundled/clarify/clarify-select-panel.js +0 -82
  252. package/bundled/clarify/clarify-select-panel.js.map +0 -1
  253. package/bundled/clarify/clarify-ui-state.d.ts +0 -21
  254. package/bundled/clarify/clarify-ui-state.d.ts.map +0 -1
  255. package/bundled/clarify/clarify-ui-state.js +0 -48
  256. package/bundled/clarify/clarify-ui-state.js.map +0 -1
  257. package/bundled/clarify/parse-clarify-answer.d.ts +0 -21
  258. package/bundled/clarify/parse-clarify-answer.d.ts.map +0 -1
  259. package/bundled/clarify/parse-clarify-answer.js +0 -57
  260. package/bundled/clarify/parse-clarify-answer.js.map +0 -1
  261. package/bundled/clarify/question-format.d.ts +0 -39
  262. package/bundled/clarify/question-format.d.ts.map +0 -1
  263. package/bundled/clarify/question-format.js +0 -144
  264. package/bundled/clarify/question-format.js.map +0 -1
  265. package/bundled/clarify/questionnaire-tool.d.ts +0 -25
  266. package/bundled/clarify/questionnaire-tool.d.ts.map +0 -1
  267. package/bundled/clarify/questionnaire-tool.js +0 -161
  268. package/bundled/clarify/questionnaire-tool.js.map +0 -1
  269. package/bundled/clarify/scope-discovery.d.ts +0 -9
  270. package/bundled/clarify/scope-discovery.d.ts.map +0 -1
  271. package/bundled/clarify/scope-discovery.js +0 -130
  272. package/bundled/clarify/scope-discovery.js.map +0 -1
  273. package/bundled/clarify/session-questionnaire.d.ts +0 -26
  274. package/bundled/clarify/session-questionnaire.d.ts.map +0 -1
  275. package/bundled/clarify/session-questionnaire.js +0 -372
  276. package/bundled/clarify/session-questionnaire.js.map +0 -1
  277. package/bundled/clarify/session-questionnaire.types.d.ts +0 -47
  278. package/bundled/clarify/session-questionnaire.types.d.ts.map +0 -1
  279. package/bundled/clarify/session-questionnaire.types.js +0 -13
  280. package/bundled/clarify/session-questionnaire.types.js.map +0 -1
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KUBBISEC_PRODUCT_MENTAL_MAP_XML = exports.KUBBISEC_MCP_INSTRUCTIONS = exports.formatMcpKnowledgeForSystemPrompt = exports.KUBBISEC_CLI_REFERENCE_INDEX = exports.buildChatSystemPrompt = exports.buildAssistantSystemPrompt = void 0;
4
+ var build_assistant_system_prompt_1 = require("./build-assistant-system-prompt");
5
+ Object.defineProperty(exports, "buildAssistantSystemPrompt", { enumerable: true, get: function () { return build_assistant_system_prompt_1.buildAssistantSystemPrompt; } });
6
+ var build_chat_system_prompt_1 = require("./build-chat-system-prompt");
7
+ Object.defineProperty(exports, "buildChatSystemPrompt", { enumerable: true, get: function () { return build_chat_system_prompt_1.buildChatSystemPrompt; } });
8
+ var cli_reference_index_1 = require("./cli-reference-index");
9
+ Object.defineProperty(exports, "KUBBISEC_CLI_REFERENCE_INDEX", { enumerable: true, get: function () { return cli_reference_index_1.KUBBISEC_CLI_REFERENCE_INDEX; } });
10
+ var format_mcp_knowledge_1 = require("./format-mcp-knowledge");
11
+ Object.defineProperty(exports, "formatMcpKnowledgeForSystemPrompt", { enumerable: true, get: function () { return format_mcp_knowledge_1.formatMcpKnowledgeForSystemPrompt; } });
12
+ var mcp_instructions_1 = require("./mcp-instructions");
13
+ Object.defineProperty(exports, "KUBBISEC_MCP_INSTRUCTIONS", { enumerable: true, get: function () { return mcp_instructions_1.KUBBISEC_MCP_INSTRUCTIONS; } });
14
+ var mental_map_1 = require("./mental-map");
15
+ Object.defineProperty(exports, "KUBBISEC_PRODUCT_MENTAL_MAP_XML", { enumerable: true, get: function () { return mental_map_1.KUBBISEC_PRODUCT_MENTAL_MAP_XML; } });
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ai/product-knowledge/index.ts"],"names":[],"mappings":";;;AAAA,iFAGyC;AADvC,2IAAA,0BAA0B,OAAA;AAE5B,uEAGoC;AADlC,iIAAA,qBAAqB,OAAA;AAEvB,6DAAqE;AAA5D,mIAAA,4BAA4B,OAAA;AACrC,+DAGgC;AAF9B,yIAAA,iCAAiC,OAAA;AAGnC,uDAA+D;AAAtD,6HAAA,yBAAyB,OAAA;AAClC,2CAA+D;AAAtD,6HAAA,+BAA+B,OAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const KUBBISEC_MCP_INSTRUCTIONS = "<kubbisec-mcp-instructions>\n<kubbisec-product-knowledge>\n <products>\n <product id=\"naus\" npm=\"@kubbisec/naus\" bin=\"naus\">KubbiSec CI engine: .naus.yml pipelines, runners, validate/plan/run. Cloud CI uses Env Packs; local run uses --env-file / --secret-file.</product>\n <product id=\"aspm\" npm=\"@kubbisec/aspm\" bin=\"aspm\">Security CLI: parse/upload scanner reports (trivy, gitleaks, syft, osv, semgrep, sonar, nmap, skipfish), coverage, gate.</product>\n <product id=\"ai\" npm=\"@kubbisec/ai\" bin=\"kubbisec\">CLI hub: login, findings (ls/show), fix/watch/chat, optional naus/aspm forwarding when binaries are on PATH.</product>\n </products>\n <boundaries>\n <boundary>NAUS YAML is NOT GitHub Actions: top-level run: (never jobs:); script: + depends_on: (never commands:/needs:/steps:); ASPM jobs use kind: aspm|aspm_matrix|aspm_gate with tool: (never scanner:).</boundary>\n <boundary>aspm-cicd.md / aspm_docs section aspm-cicd describe GitHub Actions only. For KubbiSec native CI use naus_pipeline_docs (naus-aspm-integration, naus-aspm-preset, naus-aspm-matrix, naus-aspm-gate).</boundary>\n <boundary>Do not mix CLIs: naus for pipelines/runners; aspm for scan upload/parse; kubbisec for AI remediation/chat. Org flag -o uses organization slug.</boundary>\n </boundaries>\n <anti-hallucination>\n <rule>HARD-GATE: never invent CLI flags or full command lines \u2014 call naus_pipeline_docs (naus-commands), aspm_docs (aspm-commands), kubbisec://ai/ai-commands, or security_scanner_playbook first.</rule>\n <rule>HARD-GATE: never output fenced NAUS pipeline YAML unless naus_validate_yaml (or naus_local_validate) returned ok in this session.</rule>\n <rule>HARD-GATE: never claim a tool/action succeeded without a successful tool_result in this turn.</rule>\n </anti-hallucination>\n <tool-routing>\n <route intent=\"platform-knowledge\">kubbisec_mcp_knowledge (start of naus/aspm/ai product questions)</route>\n <route intent=\"naus-docs-yaml\">naus_pipeline_docs \u2192 naus_schema_overview \u2192 naus_validate_yaml</route>\n <route intent=\"aspm-docs\">aspm_docs; scanners: security_scanners_catalog \u2192 security_scanner_playbook</route>\n <route intent=\"ai-cli-docs\">kubbisec://ai/* (ai-commands, ai-watch, ai-login)</route>\n <route intent=\"local-clis\">naus_local_* / aspm_local_* / github_local_* always available in chat (no --extended-context); github uses host-first auth; missing naus/aspm auto-install @kubbisec/naus|aspm</route>\n </tool-routing>\n</kubbisec-product-knowledge>\n\n<flows>\n <flow id=\"findings\">Recommended flow: use resolve_project_by_repository with repository_url or repositoryUrl (Git URL or org/repo), then list_vulnerabilities with the same repository fields or project_id/projectId. Tools accept snake_case and camelCase interchangeably. To act on a finding, use get_vulnerability (MCP) or get_finding_summary / list_findings (assistant CLI), then generate_remediation_plan and, if you want automation, start_ai_remediation_run followed by get_ai_remediation_run_status/get_ai_remediation_run_logs (run_id or runId). Pass vulnerabilityId (or vulnerability_id) in tool arguments when using kbs chat \u2014 there is no separate set_active_finding tool. kubbisec:// resources expose the same project \u2194 repository mapping.</flow>\n <flow id=\"naus-cloud\">Naus CI YAML (cloud / kbs chat): (1) naus_pipeline_docs or kubbisec://naus/* (same web markdown), (2) naus_validate_yaml / validate_naus_pipeline_yaml before persisting, (3) set_editor_yaml \u2192 set_pipeline_yaml \u2192 trigger_run \u2192 get_run_logs_excerpt.</flow>\n <flow id=\"naus-aspm-local\">Naus / ASPM / git on the developer machine (kbs or kubbisec chat; no --extended-context required): naus_local_validate | naus_local_plan | naus_local_run; aspm_local_scan | aspm_local_upload | aspm_local_doctor; github_local_* uses host-first gh/git auth (platform token only as remediation fallback). Missing naus/aspm binaries auto-install @kubbisec/naus and @kubbisec/aspm globally via npm/pnpm (allowlist). Local naus run/plan: default .secrets and .env in cwd, or --env-file / --secret-file; naus_local_run and naus_local_plan accept envFiles/secretFiles arrays. Cloud runners use Env Packs instead. Runner enrollment (naus register / naus start) is documented in naus_pipeline_docs (runner-management) \u2014 do not spawn long-lived daemons from chat.</flow>\n <flow id=\"kubbisec-scan\">Hybrid local scan: MCP cannot run Pi/Superpowers on the host. (1) resolve_project_by_repository with repository_url or repositoryUrl (Git URL or org/repo), or project_id/projectId. (2) trigger_kubbisec_scan with profile quick|full|ci (default full), upload (default true), require_scanners/requireScanners optional. (3) get_kubbisec_scan_status with task_id/taskId until status is done, failed, or cancelled; list_kubbisec_scan_tasks or cancel_kubbisec_scan_task as needed. Requires kubbisec watch or kubbisec scan --watch on a developer machine with repo checkout \u2014 task stays pending until claimed. Findings upload with source=KUBBISEC_AI; filter via list_vulnerabilities source=KUBBISEC_AI. Docs: kubbisec://ai/scan, kubbisec://ai/scan-watch, kubbisec://ai/mcp-login. For immediate local scan without queue, user runs kubbisec scan in terminal (not an MCP tool).</flow>\n</flows>\n\n<intent-matrix>\n| Intent | Cloud (API/MCP) | Local (host CLI) |\n| Validate YAML | naus_validate_yaml | naus_local_validate |\n| Run pipeline | trigger_run | naus_local_run (prefer cloud for KubbiSec CI) |\n| Dependency graph | \u2014 | naus_local_plan |\n| Upload scan report | CI / findings API | aspm_local_upload |\n| ASPM CLI health | \u2014 | aspm_local_doctor |\n| Hybrid AI scan | trigger_kubbisec_scan | kubbisec scan |\n| Scan status | get_kubbisec_scan_status | stdout / .kubbisec/scan/&lt;runId&gt;/ |\n| Filter AI findings | list_vulnerabilities + source=KUBBISEC_AI | \u2014 |\n| MCP auth | hosted OAuth / device login | kubbisec mcp login |\n</intent-matrix>\n\n<rules>\n <rule id=\"superpowers-mcp\">MCP agents must NOT invoke Pi/Superpowers skills or spawn kubbisec chat for scan orchestration. Read kubbisec://ai/* and kubbisec://naus/* for documentation only. Scan = trigger_kubbisec_scan; remediation = start_ai_remediation_run.</rule>\n <rule id=\"hosted-mcp\">Hosted MCP endpoint: https://mcp.kubbisec.com/mcp (OAuth2 for cloud IDEs). Local stdio: set KUBBISEC_ORGANIZATION_SLUG (preferred, e.g. minha-empresa) and KUBBISEC_API_KEY, or run kubbisec mcp login for device flow. Legacy KUBBISEC_ORGANIZATION_ID remains supported.</rule>\n</rules>\n\n<aspm>ASPM CLI: aspm_docs includes web guides plus docs/aspm/docker-cli (init, login, doctor, scan, upload).</aspm>\n</kubbisec-mcp-instructions>";
2
+ //# sourceMappingURL=mcp-instructions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-instructions.d.ts","sourceRoot":"","sources":["../../../src/ai/product-knowledge/mcp-instructions.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB,goNA6BT,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KUBBISEC_MCP_INSTRUCTIONS = void 0;
4
+ const constants_1 = require("../../mcp/constants");
5
+ const mental_map_1 = require("./mental-map");
6
+ exports.KUBBISEC_MCP_INSTRUCTIONS = `<kubbisec-mcp-instructions>
7
+ ${mental_map_1.KUBBISEC_PRODUCT_MENTAL_MAP_XML}
8
+
9
+ <flows>
10
+ <flow id="findings">Recommended flow: use resolve_project_by_repository with repository_url or repositoryUrl (Git URL or org/repo), then list_vulnerabilities with the same repository fields or project_id/projectId. Tools accept snake_case and camelCase interchangeably. To act on a finding, use get_vulnerability (MCP) or get_finding_summary / list_findings (assistant CLI), then generate_remediation_plan and, if you want automation, start_ai_remediation_run followed by get_ai_remediation_run_status/get_ai_remediation_run_logs (run_id or runId). Pass vulnerabilityId (or vulnerability_id) in tool arguments when using kbs chat — there is no separate set_active_finding tool. kubbisec:// resources expose the same project ↔ repository mapping.</flow>
11
+ <flow id="naus-cloud">Naus CI YAML (cloud / kbs chat): (1) naus_pipeline_docs or kubbisec://naus/* (same web markdown), (2) naus_validate_yaml / validate_naus_pipeline_yaml before persisting, (3) set_editor_yaml → set_pipeline_yaml → trigger_run → get_run_logs_excerpt.</flow>
12
+ <flow id="naus-aspm-local">Naus / ASPM / git on the developer machine (kbs or kubbisec chat; no --extended-context required): naus_local_validate | naus_local_plan | naus_local_run; aspm_local_scan | aspm_local_upload | aspm_local_doctor; github_local_* uses host-first gh/git auth (platform token only as remediation fallback). Missing naus/aspm binaries auto-install @kubbisec/naus and @kubbisec/aspm globally via npm/pnpm (allowlist). Local naus run/plan: default .secrets and .env in cwd, or --env-file / --secret-file; naus_local_run and naus_local_plan accept envFiles/secretFiles arrays. Cloud runners use Env Packs instead. Runner enrollment (naus register / naus start) is documented in naus_pipeline_docs (runner-management) — do not spawn long-lived daemons from chat.</flow>
13
+ <flow id="kubbisec-scan">Hybrid local scan: MCP cannot run Pi/Superpowers on the host. (1) resolve_project_by_repository with repository_url or repositoryUrl (Git URL or org/repo), or project_id/projectId. (2) trigger_kubbisec_scan with profile quick|full|ci (default full), upload (default true), require_scanners/requireScanners optional. (3) get_kubbisec_scan_status with task_id/taskId until status is done, failed, or cancelled; list_kubbisec_scan_tasks or cancel_kubbisec_scan_task as needed. Requires kubbisec watch or kubbisec scan --watch on a developer machine with repo checkout — task stays pending until claimed. Findings upload with source=KUBBISEC_AI; filter via list_vulnerabilities source=KUBBISEC_AI. Docs: kubbisec://ai/scan, kubbisec://ai/scan-watch, kubbisec://ai/mcp-login. For immediate local scan without queue, user runs kubbisec scan in terminal (not an MCP tool).</flow>
14
+ </flows>
15
+
16
+ <intent-matrix>
17
+ | Intent | Cloud (API/MCP) | Local (host CLI) |
18
+ | Validate YAML | naus_validate_yaml | naus_local_validate |
19
+ | Run pipeline | trigger_run | naus_local_run (prefer cloud for KubbiSec CI) |
20
+ | Dependency graph | — | naus_local_plan |
21
+ | Upload scan report | CI / findings API | aspm_local_upload |
22
+ | ASPM CLI health | — | aspm_local_doctor |
23
+ | Hybrid AI scan | trigger_kubbisec_scan | kubbisec scan |
24
+ | Scan status | get_kubbisec_scan_status | stdout / .kubbisec/scan/&lt;runId&gt;/ |
25
+ | Filter AI findings | list_vulnerabilities + source=KUBBISEC_AI | — |
26
+ | MCP auth | hosted OAuth / device login | kubbisec mcp login |
27
+ </intent-matrix>
28
+
29
+ <rules>
30
+ <rule id="superpowers-mcp">MCP agents must NOT invoke Pi/Superpowers skills or spawn kubbisec chat for scan orchestration. Read kubbisec://ai/* and kubbisec://naus/* for documentation only. Scan = trigger_kubbisec_scan; remediation = start_ai_remediation_run.</rule>
31
+ <rule id="hosted-mcp">Hosted MCP endpoint: ${constants_1.KUBBISEC_HOSTED_MCP_URL} (OAuth2 for cloud IDEs). Local stdio: set KUBBISEC_ORGANIZATION_SLUG (preferred, e.g. minha-empresa) and KUBBISEC_API_KEY, or run kubbisec mcp login for device flow. Legacy KUBBISEC_ORGANIZATION_ID remains supported.</rule>
32
+ </rules>
33
+
34
+ <aspm>ASPM CLI: aspm_docs includes web guides plus docs/aspm/docker-cli (init, login, doctor, scan, upload).</aspm>
35
+ </kubbisec-mcp-instructions>`;
36
+ //# sourceMappingURL=mcp-instructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-instructions.js","sourceRoot":"","sources":["../../../src/ai/product-knowledge/mcp-instructions.ts"],"names":[],"mappings":";;;AAAA,mDAA8D;AAC9D,6CAA+D;AAElD,QAAA,yBAAyB,GAAG;EACvC,4CAA+B;;;;;;;;;;;;;;;;;;;;;;;;+CAwBc,mCAAuB;;;;6BAIzC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Always-on AI product knowledge map (pseudo-XML).
3
+ * Keep under ~8k chars. Detail lives in tools / kubbisec:// resources.
4
+ */
5
+ export declare const KUBBISEC_PRODUCT_MENTAL_MAP_XML = "<kubbisec-product-knowledge>\n <products>\n <product id=\"naus\" npm=\"@kubbisec/naus\" bin=\"naus\">KubbiSec CI engine: .naus.yml pipelines, runners, validate/plan/run. Cloud CI uses Env Packs; local run uses --env-file / --secret-file.</product>\n <product id=\"aspm\" npm=\"@kubbisec/aspm\" bin=\"aspm\">Security CLI: parse/upload scanner reports (trivy, gitleaks, syft, osv, semgrep, sonar, nmap, skipfish), coverage, gate.</product>\n <product id=\"ai\" npm=\"@kubbisec/ai\" bin=\"kubbisec\">CLI hub: login, findings (ls/show), fix/watch/chat, optional naus/aspm forwarding when binaries are on PATH.</product>\n </products>\n <boundaries>\n <boundary>NAUS YAML is NOT GitHub Actions: top-level run: (never jobs:); script: + depends_on: (never commands:/needs:/steps:); ASPM jobs use kind: aspm|aspm_matrix|aspm_gate with tool: (never scanner:).</boundary>\n <boundary>aspm-cicd.md / aspm_docs section aspm-cicd describe GitHub Actions only. For KubbiSec native CI use naus_pipeline_docs (naus-aspm-integration, naus-aspm-preset, naus-aspm-matrix, naus-aspm-gate).</boundary>\n <boundary>Do not mix CLIs: naus for pipelines/runners; aspm for scan upload/parse; kubbisec for AI remediation/chat. Org flag -o uses organization slug.</boundary>\n </boundaries>\n <anti-hallucination>\n <rule>HARD-GATE: never invent CLI flags or full command lines \u2014 call naus_pipeline_docs (naus-commands), aspm_docs (aspm-commands), kubbisec://ai/ai-commands, or security_scanner_playbook first.</rule>\n <rule>HARD-GATE: never output fenced NAUS pipeline YAML unless naus_validate_yaml (or naus_local_validate) returned ok in this session.</rule>\n <rule>HARD-GATE: never claim a tool/action succeeded without a successful tool_result in this turn.</rule>\n </anti-hallucination>\n <tool-routing>\n <route intent=\"platform-knowledge\">kubbisec_mcp_knowledge (start of naus/aspm/ai product questions)</route>\n <route intent=\"naus-docs-yaml\">naus_pipeline_docs \u2192 naus_schema_overview \u2192 naus_validate_yaml</route>\n <route intent=\"aspm-docs\">aspm_docs; scanners: security_scanners_catalog \u2192 security_scanner_playbook</route>\n <route intent=\"ai-cli-docs\">kubbisec://ai/* (ai-commands, ai-watch, ai-login)</route>\n <route intent=\"local-clis\">naus_local_* / aspm_local_* / github_local_* always available in chat (no --extended-context); github uses host-first auth; missing naus/aspm auto-install @kubbisec/naus|aspm</route>\n </tool-routing>\n</kubbisec-product-knowledge>";
6
+ //# sourceMappingURL=mental-map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mental-map.d.ts","sourceRoot":"","sources":["../../../src/ai/product-knowledge/mental-map.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,+BAA+B,++EAuBd,CAAC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KUBBISEC_PRODUCT_MENTAL_MAP_XML = void 0;
4
+ /**
5
+ * Always-on AI product knowledge map (pseudo-XML).
6
+ * Keep under ~8k chars. Detail lives in tools / kubbisec:// resources.
7
+ */
8
+ exports.KUBBISEC_PRODUCT_MENTAL_MAP_XML = `<kubbisec-product-knowledge>
9
+ <products>
10
+ <product id="naus" npm="@kubbisec/naus" bin="naus">KubbiSec CI engine: .naus.yml pipelines, runners, validate/plan/run. Cloud CI uses Env Packs; local run uses --env-file / --secret-file.</product>
11
+ <product id="aspm" npm="@kubbisec/aspm" bin="aspm">Security CLI: parse/upload scanner reports (trivy, gitleaks, syft, osv, semgrep, sonar, nmap, skipfish), coverage, gate.</product>
12
+ <product id="ai" npm="@kubbisec/ai" bin="kubbisec">CLI hub: login, findings (ls/show), fix/watch/chat, optional naus/aspm forwarding when binaries are on PATH.</product>
13
+ </products>
14
+ <boundaries>
15
+ <boundary>NAUS YAML is NOT GitHub Actions: top-level run: (never jobs:); script: + depends_on: (never commands:/needs:/steps:); ASPM jobs use kind: aspm|aspm_matrix|aspm_gate with tool: (never scanner:).</boundary>
16
+ <boundary>aspm-cicd.md / aspm_docs section aspm-cicd describe GitHub Actions only. For KubbiSec native CI use naus_pipeline_docs (naus-aspm-integration, naus-aspm-preset, naus-aspm-matrix, naus-aspm-gate).</boundary>
17
+ <boundary>Do not mix CLIs: naus for pipelines/runners; aspm for scan upload/parse; kubbisec for AI remediation/chat. Org flag -o uses organization slug.</boundary>
18
+ </boundaries>
19
+ <anti-hallucination>
20
+ <rule>HARD-GATE: never invent CLI flags or full command lines — call naus_pipeline_docs (naus-commands), aspm_docs (aspm-commands), kubbisec://ai/ai-commands, or security_scanner_playbook first.</rule>
21
+ <rule>HARD-GATE: never output fenced NAUS pipeline YAML unless naus_validate_yaml (or naus_local_validate) returned ok in this session.</rule>
22
+ <rule>HARD-GATE: never claim a tool/action succeeded without a successful tool_result in this turn.</rule>
23
+ </anti-hallucination>
24
+ <tool-routing>
25
+ <route intent="platform-knowledge">kubbisec_mcp_knowledge (start of naus/aspm/ai product questions)</route>
26
+ <route intent="naus-docs-yaml">naus_pipeline_docs → naus_schema_overview → naus_validate_yaml</route>
27
+ <route intent="aspm-docs">aspm_docs; scanners: security_scanners_catalog → security_scanner_playbook</route>
28
+ <route intent="ai-cli-docs">kubbisec://ai/* (ai-commands, ai-watch, ai-login)</route>
29
+ <route intent="local-clis">naus_local_* / aspm_local_* / github_local_* always available in chat (no --extended-context); github uses host-first auth; missing naus/aspm auto-install @kubbisec/naus|aspm</route>
30
+ </tool-routing>
31
+ </kubbisec-product-knowledge>`;
32
+ //# sourceMappingURL=mental-map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mental-map.js","sourceRoot":"","sources":["../../../src/ai/product-knowledge/mental-map.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,+BAA+B,GAAG;;;;;;;;;;;;;;;;;;;;;;;8BAuBjB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { KubbisecPermission } from "../rbac/kubbisec-permissions";
2
+ export type ApiKeyScopeGroup = {
3
+ id: string;
4
+ label: string;
5
+ description?: string;
6
+ permissions: KubbisecPermission[];
7
+ };
8
+ /** Org API key scopes — GitHub PAT-style groups (excludes platform.*). */
9
+ export declare const ORG_API_KEY_SCOPE_GROUPS: ApiKeyScopeGroup[];
10
+ export declare const ORG_API_KEY_SELECTABLE_PERMISSIONS: KubbisecPermission[];
11
+ export declare function apiKeyPermissionLabel(permission: KubbisecPermission): string;
12
+ //# sourceMappingURL=api-key-scope-groups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-key-scope-groups.d.ts","sourceRoot":"","sources":["../../src/api-key/api-key-scope-groups.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,kBAAkB,EAAE,CAAC;CACnC,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,EAiFtD,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,kBAAkB,EACH,CAAC;AAEjE,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,kBAAkB,GAAG,MAAM,CAE5E"}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ORG_API_KEY_SELECTABLE_PERMISSIONS = exports.ORG_API_KEY_SCOPE_GROUPS = void 0;
4
+ exports.apiKeyPermissionLabel = apiKeyPermissionLabel;
5
+ const kubbisec_permission_descriptions_1 = require("../rbac/kubbisec-permission-descriptions");
6
+ /** Org API key scopes — GitHub PAT-style groups (excludes platform.*). */
7
+ exports.ORG_API_KEY_SCOPE_GROUPS = [
8
+ {
9
+ id: "finding",
10
+ label: "Findings",
11
+ description: "Read and manage security findings",
12
+ permissions: [
13
+ "kbsc.finding.read",
14
+ "kbsc.finding.triage.update",
15
+ "kbsc.finding.remediation.manage",
16
+ "kbsc.finding.remediation.auto-apply",
17
+ "kbsc.finding.export",
18
+ ],
19
+ },
20
+ {
21
+ id: "ingest",
22
+ label: "Ingest & scan",
23
+ description: "Upload scanner reports and KubbiSec hybrid scan",
24
+ permissions: [
25
+ "kbsc.ingest.report.create",
26
+ "kbsc.ingest.coverage.create",
27
+ "kbsc.ingest.bundle.create",
28
+ "kbsc.scan.read",
29
+ "kbsc.scan.trigger",
30
+ ],
31
+ },
32
+ {
33
+ id: "ai",
34
+ label: "AI assistant",
35
+ description: "CLI proxy, autopilot and in-app assistant",
36
+ permissions: [
37
+ "kbsc.ai.assistant.use",
38
+ "kbsc.project.ai-autopilot.run",
39
+ "kbsc.project.ai-autopilot.manage",
40
+ "kbsc.ai.usage.read",
41
+ ],
42
+ },
43
+ {
44
+ id: "ci",
45
+ label: "CI / Naus",
46
+ description: "Pipelines, runners and env packs",
47
+ permissions: [
48
+ "kbsc.ci.read",
49
+ "kbsc.ci.pipeline.manage",
50
+ "kbsc.ci.pipeline.run",
51
+ "kbsc.ci.privileged.run",
52
+ "kbsc.ci.runner.manage",
53
+ "kbsc.ci.envpack.manage",
54
+ "kbsc.ci.bootstrap.manage",
55
+ ],
56
+ },
57
+ {
58
+ id: "integration",
59
+ label: "Integrations",
60
+ description: "GitHub, Jira, PR/issue automation",
61
+ permissions: [
62
+ "kbsc.integration.read",
63
+ "kbsc.integration.connect",
64
+ "kbsc.integration.issue.create",
65
+ "kbsc.integration.pr.create",
66
+ "kbsc.integration.pr.merge",
67
+ ],
68
+ },
69
+ {
70
+ id: "asset",
71
+ label: "Projects & assets",
72
+ permissions: [
73
+ "kbsc.asset.project.read",
74
+ "kbsc.asset.project.create",
75
+ "kbsc.asset.project.update",
76
+ ],
77
+ },
78
+ {
79
+ id: "supply",
80
+ label: "Supply chain",
81
+ permissions: ["kbsc.supply.read", "kbsc.supply.scan.trigger"],
82
+ },
83
+ {
84
+ id: "governance",
85
+ label: "Governance",
86
+ permissions: ["kbsc.governance.read", "kbsc.governance.coverage.manage"],
87
+ },
88
+ ];
89
+ exports.ORG_API_KEY_SELECTABLE_PERMISSIONS = exports.ORG_API_KEY_SCOPE_GROUPS.flatMap((group) => group.permissions);
90
+ function apiKeyPermissionLabel(permission) {
91
+ return kubbisec_permission_descriptions_1.KUBBISEC_PERMISSION_DESCRIPTIONS[permission] ?? permission;
92
+ }
93
+ //# sourceMappingURL=api-key-scope-groups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-key-scope-groups.js","sourceRoot":"","sources":["../../src/api-key/api-key-scope-groups.ts"],"names":[],"mappings":";;;AAiGA,sDAEC;AAnGD,+FAA4F;AAU5F,0EAA0E;AAC7D,QAAA,wBAAwB,GAAuB;IAC1D;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,mCAAmC;QAChD,WAAW,EAAE;YACX,mBAAmB;YACnB,4BAA4B;YAC5B,iCAAiC;YACjC,qCAAqC;YACrC,qBAAqB;SACtB;KACF;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,iDAAiD;QAC9D,WAAW,EAAE;YACX,2BAA2B;YAC3B,6BAA6B;YAC7B,2BAA2B;YAC3B,gBAAgB;YAChB,mBAAmB;SACpB;KACF;IACD;QACE,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,2CAA2C;QACxD,WAAW,EAAE;YACX,uBAAuB;YACvB,+BAA+B;YAC/B,kCAAkC;YAClC,oBAAoB;SACrB;KACF;IACD;QACE,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,kCAAkC;QAC/C,WAAW,EAAE;YACX,cAAc;YACd,yBAAyB;YACzB,sBAAsB;YACtB,wBAAwB;YACxB,uBAAuB;YACvB,wBAAwB;YACxB,0BAA0B;SAC3B;KACF;IACD;QACE,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,mCAAmC;QAChD,WAAW,EAAE;YACX,uBAAuB;YACvB,0BAA0B;YAC1B,+BAA+B;YAC/B,4BAA4B;YAC5B,2BAA2B;SAC5B;KACF;IACD;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE;YACX,yBAAyB;YACzB,2BAA2B;YAC3B,2BAA2B;SAC5B;KACF;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,CAAC,kBAAkB,EAAE,0BAA0B,CAAC;KAC9D;IACD;QACE,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,CAAC,sBAAsB,EAAE,iCAAiC,CAAC;KACzE;CACF,CAAC;AAEW,QAAA,kCAAkC,GAC7C,gCAAwB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AAEjE,SAAgB,qBAAqB,CAAC,UAA8B;IAClE,OAAO,mEAAgC,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC;AACpE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { KubbisecPermission } from "../rbac/kubbisec-permissions";
2
+ /** Current API key authorization model (GitHub PAT-style scopes). */
3
+ export declare const API_KEY_SCOPES_VERSION = 2;
4
+ export declare const KUBBISEC_API_KEY_DEFAULT_PREFIX = "kbsc_";
5
+ export declare const API_KEY_SCOPE_PRESET_IDS: readonly ["cli-dev", "ci-ingest", "naus-runner", "aspm-ingest", "assistant-chat"];
6
+ export type ApiKeyScopePresetId = (typeof API_KEY_SCOPE_PRESET_IDS)[number];
7
+ export declare const API_KEY_SCOPE_PRESET_LABELS: Record<ApiKeyScopePresetId, string>;
8
+ export declare const API_KEY_SCOPE_PRESETS: Record<ApiKeyScopePresetId, readonly KubbisecPermission[]>;
9
+ export declare function isApiKeyScopePresetId(value: string): value is ApiKeyScopePresetId;
10
+ export declare function resolveApiKeyScopePreset(id: ApiKeyScopePresetId): KubbisecPermission[];
11
+ export declare function permissionsToApiKeyStatements(permissions: KubbisecPermission[]): Record<string, KubbisecPermission[]>;
12
+ export declare function normalizeApiKeyScopeSelection(permissions: KubbisecPermission[]): KubbisecPermission[];
13
+ //# sourceMappingURL=api-key-scope-presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-key-scope-presets.d.ts","sourceRoot":"","sources":["../../src/api-key/api-key-scope-presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,qEAAqE;AACrE,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,eAAO,MAAM,+BAA+B,UAAU,CAAC;AAEvD,eAAO,MAAM,wBAAwB,mFAM3B,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAkC5E,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAM3E,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,mBAAmB,EAAE,SAAS,kBAAkB,EAAE,CAM5F,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,mBAAmB,CAEjF;AAED,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,mBAAmB,GAAG,kBAAkB,EAAE,CAEtF;AAED,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,kBAAkB,EAAE,GAChC,MAAM,CAAC,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAEtC;AAED,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,kBAAkB,EAAE,GAChC,kBAAkB,EAAE,CAStB"}
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.API_KEY_SCOPE_PRESETS = exports.API_KEY_SCOPE_PRESET_LABELS = exports.API_KEY_SCOPE_PRESET_IDS = exports.KUBBISEC_API_KEY_DEFAULT_PREFIX = exports.API_KEY_SCOPES_VERSION = void 0;
4
+ exports.isApiKeyScopePresetId = isApiKeyScopePresetId;
5
+ exports.resolveApiKeyScopePreset = resolveApiKeyScopePreset;
6
+ exports.permissionsToApiKeyStatements = permissionsToApiKeyStatements;
7
+ exports.normalizeApiKeyScopeSelection = normalizeApiKeyScopeSelection;
8
+ /** Current API key authorization model (GitHub PAT-style scopes). */
9
+ exports.API_KEY_SCOPES_VERSION = 2;
10
+ exports.KUBBISEC_API_KEY_DEFAULT_PREFIX = "kbsc_";
11
+ exports.API_KEY_SCOPE_PRESET_IDS = [
12
+ "cli-dev",
13
+ "ci-ingest",
14
+ "naus-runner",
15
+ "aspm-ingest",
16
+ "assistant-chat",
17
+ ];
18
+ const CLI_DEV_SCOPES = [
19
+ "kbsc.ai.assistant.use",
20
+ "kbsc.finding.read",
21
+ "kbsc.finding.remediation.manage",
22
+ "kbsc.project.ai-autopilot.run",
23
+ "kbsc.ingest.report.create",
24
+ "kbsc.scan.read",
25
+ "kbsc.scan.trigger",
26
+ ];
27
+ const CI_INGEST_SCOPES = [
28
+ "kbsc.ingest.report.create",
29
+ "kbsc.ingest.coverage.create",
30
+ ];
31
+ const NAUS_RUNNER_SCOPES = [
32
+ "kbsc.ci.read",
33
+ "kbsc.ci.pipeline.manage",
34
+ "kbsc.ci.privileged.run",
35
+ "kbsc.ci.runner.manage",
36
+ "kbsc.ci.envpack.manage",
37
+ "kbsc.ingest.report.create",
38
+ "kbsc.ingest.coverage.create",
39
+ ];
40
+ const ASPM_INGEST_SCOPES = [
41
+ "kbsc.ingest.report.create",
42
+ "kbsc.ingest.coverage.create",
43
+ ];
44
+ const ASSISTANT_CHAT_SCOPES = ["kbsc.ai.assistant.use"];
45
+ exports.API_KEY_SCOPE_PRESET_LABELS = {
46
+ "cli-dev": "KubbiSec CLI (scan, watch, remediation)",
47
+ "ci-ingest": "CI ingest (reports + coverage, project-scoped)",
48
+ "naus-runner": "Naus runner + CI + ingest",
49
+ "aspm-ingest": "ASPM ingest (reports + coverage)",
50
+ "assistant-chat": "Assistant chat only (in-app / proxy)",
51
+ };
52
+ exports.API_KEY_SCOPE_PRESETS = {
53
+ "cli-dev": CLI_DEV_SCOPES,
54
+ "ci-ingest": CI_INGEST_SCOPES,
55
+ "naus-runner": NAUS_RUNNER_SCOPES,
56
+ "aspm-ingest": ASPM_INGEST_SCOPES,
57
+ "assistant-chat": ASSISTANT_CHAT_SCOPES,
58
+ };
59
+ function isApiKeyScopePresetId(value) {
60
+ return exports.API_KEY_SCOPE_PRESET_IDS.includes(value);
61
+ }
62
+ function resolveApiKeyScopePreset(id) {
63
+ return [...exports.API_KEY_SCOPE_PRESETS[id]];
64
+ }
65
+ function permissionsToApiKeyStatements(permissions) {
66
+ return { kubbisec: [...permissions] };
67
+ }
68
+ function normalizeApiKeyScopeSelection(permissions) {
69
+ const seen = new Set();
70
+ const ordered = [];
71
+ for (const perm of permissions) {
72
+ if (!perm.startsWith("kbsc.") || seen.has(perm))
73
+ continue;
74
+ seen.add(perm);
75
+ ordered.push(perm);
76
+ }
77
+ return ordered;
78
+ }
79
+ //# sourceMappingURL=api-key-scope-presets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-key-scope-presets.js","sourceRoot":"","sources":["../../src/api-key/api-key-scope-presets.ts"],"names":[],"mappings":";;;AAiEA,sDAEC;AAED,4DAEC;AAED,sEAIC;AAED,sEAWC;AAxFD,qEAAqE;AACxD,QAAA,sBAAsB,GAAG,CAAC,CAAC;AAE3B,QAAA,+BAA+B,GAAG,OAAO,CAAC;AAE1C,QAAA,wBAAwB,GAAG;IACtC,SAAS;IACT,WAAW;IACX,aAAa;IACb,aAAa;IACb,gBAAgB;CACR,CAAC;AAIX,MAAM,cAAc,GAAG;IACrB,uBAAuB;IACvB,mBAAmB;IACnB,iCAAiC;IACjC,+BAA+B;IAC/B,2BAA2B;IAC3B,gBAAgB;IAChB,mBAAmB;CACW,CAAC;AAEjC,MAAM,gBAAgB,GAAG;IACvB,2BAA2B;IAC3B,6BAA6B;CACC,CAAC;AAEjC,MAAM,kBAAkB,GAAG;IACzB,cAAc;IACd,yBAAyB;IACzB,wBAAwB;IACxB,uBAAuB;IACvB,wBAAwB;IACxB,2BAA2B;IAC3B,6BAA6B;CACC,CAAC;AAEjC,MAAM,kBAAkB,GAAG;IACzB,2BAA2B;IAC3B,6BAA6B;CACC,CAAC;AAEjC,MAAM,qBAAqB,GAAG,CAAC,uBAAuB,CAAgC,CAAC;AAE1E,QAAA,2BAA2B,GAAwC;IAC9E,SAAS,EAAE,yCAAyC;IACpD,WAAW,EAAE,gDAAgD;IAC7D,aAAa,EAAE,2BAA2B;IAC1C,aAAa,EAAE,kCAAkC;IACjD,gBAAgB,EAAE,sCAAsC;CACzD,CAAC;AAEW,QAAA,qBAAqB,GAA+D;IAC/F,SAAS,EAAE,cAAc;IACzB,WAAW,EAAE,gBAAgB;IAC7B,aAAa,EAAE,kBAAkB;IACjC,aAAa,EAAE,kBAAkB;IACjC,gBAAgB,EAAE,qBAAqB;CACxC,CAAC;AAEF,SAAgB,qBAAqB,CAAC,KAAa;IACjD,OAAQ,gCAA8C,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzE,CAAC;AAED,SAAgB,wBAAwB,CAAC,EAAuB;IAC9D,OAAO,CAAC,GAAG,6BAAqB,CAAC,EAAE,CAAC,CAAC,CAAC;AACxC,CAAC;AAED,SAAgB,6BAA6B,CAC3C,WAAiC;IAEjC,OAAO,EAAE,QAAQ,EAAE,CAAC,GAAG,WAAW,CAAC,EAAE,CAAC;AACxC,CAAC;AAED,SAAgB,6BAA6B,CAC3C,WAAiC;IAEjC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAsB,CAAC;IAC3C,MAAM,OAAO,GAAyB,EAAE,CAAC;IACzC,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,SAAS;QAC1D,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./api-key-scope-groups";
2
+ export * from "./api-key-scope-presets";
3
+ export * from "./migrate-api-key-metadata";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api-key/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./api-key-scope-groups"), exports);
18
+ __exportStar(require("./api-key-scope-presets"), exports);
19
+ __exportStar(require("./migrate-api-key-metadata"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api-key/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,0DAAwC;AACxC,6DAA2C"}
@@ -0,0 +1,20 @@
1
+ import type { KubbisecPermission } from "../rbac/kubbisec-permissions";
2
+ import { type ApiKeyScopePresetId } from "./api-key-scope-presets";
3
+ export declare const PROJECT_CI_API_KEY_KIND: "project-ci-aspm-connection";
4
+ export declare const KBS_CLI_API_KEY_KIND: "kbs_cli";
5
+ export type ApiKeyMetadataRecord = Record<string, unknown>;
6
+ export type MigrateApiKeyRowInput = {
7
+ metadata: string | null;
8
+ permissions: string | null;
9
+ prefix: string | null;
10
+ };
11
+ export type MigrateApiKeyRowResult = {
12
+ metadata: ApiKeyMetadataRecord;
13
+ permissions: KubbisecPermission[];
14
+ scopePreset: ApiKeyScopePresetId | null;
15
+ };
16
+ /**
17
+ * Maps legacy product/kind keys to explicit scope lists (scopes v2).
18
+ */
19
+ export declare function migrateApiKeyRow(input: MigrateApiKeyRowInput): MigrateApiKeyRowResult;
20
+ //# sourceMappingURL=migrate-api-key-metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-api-key-metadata.d.ts","sourceRoot":"","sources":["../../src/api-key/migrate-api-key-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAGL,KAAK,mBAAmB,EAGzB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,uBAAuB,EAAG,4BAAqC,CAAC;AAC7E,eAAO,MAAM,oBAAoB,EAAG,SAAkB,CAAC;AAEvD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE3D,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAClC,WAAW,EAAE,mBAAmB,GAAG,IAAI,CAAC;CACzC,CAAC;AAmCF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,sBAAsB,CAgCrF"}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KBS_CLI_API_KEY_KIND = exports.PROJECT_CI_API_KEY_KIND = void 0;
4
+ exports.migrateApiKeyRow = migrateApiKeyRow;
5
+ const resolve_org_permissions_1 = require("../rbac/resolve-org-permissions");
6
+ const api_key_scope_presets_1 = require("./api-key-scope-presets");
7
+ exports.PROJECT_CI_API_KEY_KIND = "project-ci-aspm-connection";
8
+ exports.KBS_CLI_API_KEY_KIND = "kbs_cli";
9
+ function parseMetadata(raw) {
10
+ if (!raw)
11
+ return {};
12
+ try {
13
+ const parsed = JSON.parse(raw);
14
+ if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) {
15
+ return parsed;
16
+ }
17
+ }
18
+ catch {
19
+ // ignore
20
+ }
21
+ return {};
22
+ }
23
+ function readExistingPermissions(raw) {
24
+ if (!raw)
25
+ return [];
26
+ try {
27
+ const json = JSON.parse(raw);
28
+ return (0, resolve_org_permissions_1.parseApiKeyPermissionsJson)(json) ?? [];
29
+ }
30
+ catch {
31
+ return [];
32
+ }
33
+ }
34
+ function inferPreset(metadata, prefix) {
35
+ if (metadata.kind === exports.PROJECT_CI_API_KEY_KIND)
36
+ return "ci-ingest";
37
+ if (metadata.kind === exports.KBS_CLI_API_KEY_KIND)
38
+ return "cli-dev";
39
+ if (metadata.product === "naus")
40
+ return "naus-runner";
41
+ if (metadata.product === "assistant")
42
+ return "cli-dev";
43
+ if (metadata.product === "aspm" || prefix === "aspm")
44
+ return "aspm-ingest";
45
+ if (prefix === "kbs_" || prefix === "kbsc" || prefix === "kbsc_")
46
+ return "cli-dev";
47
+ return "aspm-ingest";
48
+ }
49
+ /**
50
+ * Maps legacy product/kind keys to explicit scope lists (scopes v2).
51
+ */
52
+ function migrateApiKeyRow(input) {
53
+ const metadata = parseMetadata(input.metadata);
54
+ const existing = readExistingPermissions(input.permissions);
55
+ const scopePresetFromMeta = typeof metadata.scopePreset === "string" && (0, api_key_scope_presets_1.isApiKeyScopePresetId)(metadata.scopePreset)
56
+ ? metadata.scopePreset
57
+ : null;
58
+ const scopePreset = scopePresetFromMeta ?? inferPreset(metadata, input.prefix);
59
+ const presetScopes = [...api_key_scope_presets_1.API_KEY_SCOPE_PRESETS[scopePreset]];
60
+ const permissions = existing.length > 0
61
+ ? (0, api_key_scope_presets_1.normalizeApiKeyScopeSelection)(existing)
62
+ : (0, api_key_scope_presets_1.normalizeApiKeyScopeSelection)(presetScopes);
63
+ const nextMetadata = {
64
+ ...metadata,
65
+ scopesVersion: api_key_scope_presets_1.API_KEY_SCOPES_VERSION,
66
+ scopePreset,
67
+ };
68
+ if (metadata.product != null) {
69
+ nextMetadata.legacyProduct = metadata.product;
70
+ delete nextMetadata.product;
71
+ }
72
+ return {
73
+ metadata: nextMetadata,
74
+ permissions,
75
+ scopePreset,
76
+ };
77
+ }
78
+ //# sourceMappingURL=migrate-api-key-metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-api-key-metadata.js","sourceRoot":"","sources":["../../src/api-key/migrate-api-key-metadata.ts"],"names":[],"mappings":";;;AA+DA,4CAgCC;AA9FD,6EAA6E;AAC7E,mEAMiC;AAEpB,QAAA,uBAAuB,GAAG,4BAAqC,CAAC;AAChE,QAAA,oBAAoB,GAAG,SAAkB,CAAC;AAgBvD,SAAS,aAAa,CAAC,GAAkB;IACvC,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAY,CAAC;QAC1C,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5E,OAAO,MAA8B,CAAC;QACxC,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,SAAS;IACX,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAS,uBAAuB,CAAC,GAAkB;IACjD,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAqD,CAAC;QACjF,OAAO,IAAA,oDAA0B,EAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,QAA8B,EAAE,MAAqB;IACxE,IAAI,QAAQ,CAAC,IAAI,KAAK,+BAAuB;QAAE,OAAO,WAAW,CAAC;IAClE,IAAI,QAAQ,CAAC,IAAI,KAAK,4BAAoB;QAAE,OAAO,SAAS,CAAC;IAC7D,IAAI,QAAQ,CAAC,OAAO,KAAK,MAAM;QAAE,OAAO,aAAa,CAAC;IACtD,IAAI,QAAQ,CAAC,OAAO,KAAK,WAAW;QAAE,OAAO,SAAS,CAAC;IACvD,IAAI,QAAQ,CAAC,OAAO,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO,aAAa,CAAC;IAC3E,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,OAAO;QAAE,OAAO,SAAS,CAAC;IACnF,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAAC,KAA4B;IAC3D,MAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC/C,MAAM,QAAQ,GAAG,uBAAuB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAE5D,MAAM,mBAAmB,GACvB,OAAO,QAAQ,CAAC,WAAW,KAAK,QAAQ,IAAI,IAAA,6CAAqB,EAAC,QAAQ,CAAC,WAAW,CAAC;QACrF,CAAC,CAAC,QAAQ,CAAC,WAAW;QACtB,CAAC,CAAC,IAAI,CAAC;IAEX,MAAM,WAAW,GAAG,mBAAmB,IAAI,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/E,MAAM,YAAY,GAAG,CAAC,GAAG,6CAAqB,CAAC,WAAW,CAAC,CAAC,CAAC;IAC7D,MAAM,WAAW,GACf,QAAQ,CAAC,MAAM,GAAG,CAAC;QACjB,CAAC,CAAC,IAAA,qDAA6B,EAAC,QAAQ,CAAC;QACzC,CAAC,CAAC,IAAA,qDAA6B,EAAC,YAAY,CAAC,CAAC;IAElD,MAAM,YAAY,GAAyB;QACzC,GAAG,QAAQ;QACX,aAAa,EAAE,8CAAsB;QACrC,WAAW;KACZ,CAAC;IAEF,IAAI,QAAQ,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC;QAC7B,YAAY,CAAC,aAAa,GAAG,QAAQ,CAAC,OAAO,CAAC;QAC9C,OAAO,YAAY,CAAC,OAAO,CAAC;IAC9B,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,YAAY;QACtB,WAAW;QACX,WAAW;KACZ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,19 @@
1
+ export declare const ASSISTANT_THREAD_STORAGE_VERSION: 2;
2
+ export declare const ASSISTANT_MAX_ACTIVE_THREADS = 50;
3
+ export declare const ASSISTANT_THREAD_TITLE_MAX = 80;
4
+ export declare function deriveAssistantThreadTitle(firstUserMessage: string): string;
5
+ /** Extrai texto legível de uma mensagem (content string ou blocks markdown). */
6
+ export declare function extractAssistantMessagePlainText(message: unknown): string;
7
+ export declare function extractFirstUserMessagePlainText(messages: unknown[]): string;
8
+ /** Título amigável para listagens (corrige títulos antigos serializados em JSON). */
9
+ export declare function formatAssistantThreadTitleDisplay(title: string): string;
10
+ /** Título curto da conversa ativa para o header; null se ainda não há mensagem do utilizador. */
11
+ export declare function deriveActiveThreadTitleFromText(text: string): string | null;
12
+ export declare function composeAssistantThreadIdbKey(threadId: string): string;
13
+ export declare function composeActiveThreadSessionKey(input: {
14
+ organizationId: string;
15
+ userId: string;
16
+ mode: string;
17
+ entityId: string;
18
+ }): string;
19
+ //# sourceMappingURL=assistant-thread.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistant-thread.d.ts","sourceRoot":"","sources":["../../src/assistant/assistant-thread.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,EAAG,CAAU,CAAC;AAC3D,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAC/C,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C,wBAAgB,0BAA0B,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAM3E;AAkBD,gFAAgF;AAChF,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAUzE;AAED,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,CAS5E;AAmDD,qFAAqF;AACrF,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMvE;AAED,iGAAiG;AACjG,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG3E;AAED,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE;IACnD,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,CAET"}