@kubbisec/ai-linux-arm64 0.1.22 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/bin/kubbisec +0 -0
  2. package/bundled/components/kubbisec-model-selector.d.ts +34 -47
  3. package/bundled/components/kubbisec-model-selector.js +177 -187
  4. package/bundled/components/kubbisec-model-selector.js.map +1 -1
  5. package/bundled/config/config.d.ts +6 -6
  6. package/bundled/config/config.d.ts.map +1 -1
  7. package/bundled/config/config.js +52 -54
  8. package/bundled/config/config.js.map +1 -1
  9. package/bundled/config/detect-local-llm-providers.d.ts +16 -26
  10. package/bundled/config/detect-local-llm-providers.js +142 -130
  11. package/bundled/config/ensure-kbs-project-settings.d.ts +20 -0
  12. package/bundled/config/ensure-kbs-project-settings.d.ts.map +1 -0
  13. package/bundled/config/ensure-kbs-project-settings.js +46 -0
  14. package/bundled/config/ensure-kbs-project-settings.js.map +1 -0
  15. package/bundled/config/ensure-kubbisec-project-settings.d.ts +11 -9
  16. package/bundled/config/ensure-kubbisec-project-settings.d.ts.map +1 -1
  17. package/bundled/config/ensure-kubbisec-project-settings.js +72 -44
  18. package/bundled/config/ensure-kubbisec-project-settings.js.map +1 -1
  19. package/bundled/config/extended-context.d.ts +6 -5
  20. package/bundled/config/extended-context.js +22 -23
  21. package/bundled/config/feature-flags.d.ts +2 -10
  22. package/bundled/config/feature-flags.js +2 -8
  23. package/bundled/config/format-kubbisec-footer-status.d.ts +1 -1
  24. package/bundled/config/format-kubbisec-footer-status.js +31 -26
  25. package/bundled/config/kubbisec-extension-manifest.d.ts +2 -22
  26. package/bundled/config/kubbisec-extension-manifest.d.ts.map +1 -1
  27. package/bundled/config/kubbisec-extension-manifest.js +19 -20
  28. package/bundled/config/kubbisec-extension-manifest.js.map +1 -1
  29. package/bundled/config/llm-config-mutations.d.ts +25 -51
  30. package/bundled/config/llm-config-mutations.js +182 -173
  31. package/bundled/config/llm-config.d.ts +41 -54
  32. package/bundled/config/llm-config.js +199 -199
  33. package/bundled/config/llm-provider-catalog.d.ts +15 -18
  34. package/bundled/config/llm-provider-catalog.js +46 -45
  35. package/bundled/config/materialize-kubbisec-pi-resources.d.ts +1 -1
  36. package/bundled/config/materialize-kubbisec-pi-resources.d.ts.map +1 -1
  37. package/bundled/config/materialize-kubbisec-pi-resources.js +182 -174
  38. package/bundled/config/materialize-kubbisec-pi-resources.js.map +1 -1
  39. package/bundled/config/register-custom-llm-providers.d.ts +5 -11
  40. package/bundled/config/register-custom-llm-providers.js +15 -17
  41. package/bundled/config/register-kubbisec-llm-provider.d.ts +10 -14
  42. package/bundled/config/register-kubbisec-llm-provider.js +42 -50
  43. package/bundled/config/resolve-agents-context-file.d.ts +1 -1
  44. package/bundled/config/resolve-agents-context-file.js +34 -33
  45. package/bundled/config/resource-budget.d.ts +12 -12
  46. package/bundled/config/resource-budget.js +28 -28
  47. package/bundled/config/sync-kubbisec-pi-models.d.ts +3 -6
  48. package/bundled/config/sync-kubbisec-pi-models.js +58 -58
  49. package/bundled/copy/cli-reference-index.d.ts +2 -7
  50. package/bundled/copy/cli-reference-index.d.ts.map +1 -1
  51. package/bundled/copy/cli-reference-index.js +2 -62
  52. package/bundled/copy/cli-reference-index.js.map +1 -1
  53. package/bundled/copy/kubbisec-shell-copy.d.ts +6 -11
  54. package/bundled/copy/kubbisec-shell-copy.js +1 -1
  55. package/bundled/extensions/cli-local-shared.d.ts +36 -45
  56. package/bundled/extensions/cli-local-shared.d.ts.map +1 -1
  57. package/bundled/extensions/cli-local-shared.js +129 -128
  58. package/bundled/extensions/cli-local-shared.js.map +1 -1
  59. package/bundled/extensions/kubbisec-aspm-local.extension.d.ts +15 -18
  60. package/bundled/extensions/kubbisec-aspm-local.extension.d.ts.map +1 -1
  61. package/bundled/extensions/kubbisec-aspm-local.extension.js +106 -121
  62. package/bundled/extensions/kubbisec-aspm-local.extension.js.map +1 -1
  63. package/bundled/extensions/kubbisec-brand.extension.d.ts +1 -1
  64. package/bundled/extensions/kubbisec-brand.extension.js +25 -25
  65. package/bundled/extensions/kubbisec-byok-provider.extension.d.ts +1 -1
  66. package/bundled/extensions/kubbisec-byok-provider.extension.js +2 -2
  67. package/bundled/extensions/kubbisec-clarify.extension.d.ts +35 -64
  68. package/bundled/extensions/kubbisec-clarify.extension.d.ts.map +1 -1
  69. package/bundled/extensions/kubbisec-clarify.extension.js +305 -323
  70. package/bundled/extensions/kubbisec-clarify.extension.js.map +1 -1
  71. package/bundled/extensions/kubbisec-exit.extension.d.ts +1 -1
  72. package/bundled/extensions/kubbisec-exit.extension.js +32 -29
  73. package/bundled/extensions/kubbisec-extended-context.extension.d.ts +1 -1
  74. package/bundled/extensions/kubbisec-extended-context.extension.js +43 -56
  75. package/bundled/extensions/kubbisec-footer.extension.d.ts +14 -14
  76. package/bundled/extensions/kubbisec-footer.extension.d.ts.map +1 -1
  77. package/bundled/extensions/kubbisec-footer.extension.js +215 -205
  78. package/bundled/extensions/kubbisec-footer.extension.js.map +1 -1
  79. package/bundled/extensions/kubbisec-github-local.extension.d.ts +18 -29
  80. package/bundled/extensions/kubbisec-github-local.extension.d.ts.map +1 -1
  81. package/bundled/extensions/kubbisec-github-local.extension.js +457 -129
  82. package/bundled/extensions/kubbisec-github-local.extension.js.map +1 -1
  83. package/bundled/extensions/kubbisec-llm-config.extension.d.ts +1 -1
  84. package/bundled/extensions/kubbisec-llm-config.extension.js +181 -200
  85. package/bundled/extensions/kubbisec-memory.extension.d.ts +7 -9
  86. package/bundled/extensions/kubbisec-memory.extension.d.ts.map +1 -1
  87. package/bundled/extensions/kubbisec-memory.extension.js +95 -88
  88. package/bundled/extensions/kubbisec-naus-local.extension.d.ts +15 -18
  89. package/bundled/extensions/kubbisec-naus-local.extension.d.ts.map +1 -1
  90. package/bundled/extensions/kubbisec-naus-local.extension.js +103 -135
  91. package/bundled/extensions/kubbisec-naus-local.extension.js.map +1 -1
  92. package/bundled/extensions/kubbisec-platform-tools.extension.d.ts +21 -31
  93. package/bundled/extensions/kubbisec-platform-tools.extension.d.ts.map +1 -1
  94. package/bundled/extensions/kubbisec-platform-tools.extension.js +152 -152
  95. package/bundled/extensions/kubbisec-platform-tools.extension.js.map +1 -1
  96. package/bundled/extensions/kubbisec-runtime-status.extension.d.ts +8 -10
  97. package/bundled/extensions/kubbisec-runtime-status.extension.js +13 -15
  98. package/bundled/extensions/kubbisec-scope.extension.d.ts +7 -12
  99. package/bundled/extensions/kubbisec-scope.extension.js +13 -13
  100. package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts +16 -27
  101. package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts.map +1 -1
  102. package/bundled/extensions/kubbisec-skill-mentions.extension.js +64 -73
  103. package/bundled/extensions/kubbisec-skill-mentions.extension.js.map +1 -1
  104. package/bundled/extensions/kubbisec-skill-telemetry.extension.d.ts +3 -2
  105. package/bundled/extensions/kubbisec-skill-telemetry.extension.js +64 -59
  106. package/bundled/extensions/kubbisec-theme-lock.extension.d.ts +1 -1
  107. package/bundled/extensions/kubbisec-theme-lock.extension.js +34 -33
  108. package/bundled/extensions/kubbisec-ui.extension.d.ts +1 -1
  109. package/bundled/extensions/kubbisec-ui.extension.d.ts.map +1 -1
  110. package/bundled/extensions/kubbisec-ui.extension.js +122 -116
  111. package/bundled/extensions/kubbisec-ui.extension.js.map +1 -1
  112. package/bundled/extensions/kubbisec-workflow.extension.d.ts +18 -20
  113. package/bundled/extensions/kubbisec-workflow.extension.d.ts.map +1 -1
  114. package/bundled/extensions/kubbisec-workflow.extension.js +140 -138
  115. package/bundled/node_modules/@aspm/shared/dist/ai/index.d.ts +1 -0
  116. package/bundled/node_modules/@aspm/shared/dist/ai/index.d.ts.map +1 -1
  117. package/bundled/node_modules/@aspm/shared/dist/ai/index.js +1 -0
  118. package/bundled/node_modules/@aspm/shared/dist/ai/index.js.map +1 -1
  119. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.d.ts +7 -0
  120. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.d.ts.map +1 -0
  121. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.js +30 -0
  122. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-assistant-system-prompt.js.map +1 -0
  123. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.d.ts +7 -0
  124. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.d.ts.map +1 -0
  125. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.js +14 -0
  126. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/build-chat-system-prompt.js.map +1 -0
  127. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.d.ts +6 -0
  128. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.d.ts.map +1 -0
  129. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.js +65 -0
  130. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/cli-reference-index.js.map +1 -0
  131. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.d.ts +8 -0
  132. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.d.ts.map +1 -0
  133. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.js +29 -0
  134. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/format-mcp-knowledge.js.map +1 -0
  135. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.d.ts +7 -0
  136. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.d.ts.map +1 -0
  137. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.js +16 -0
  138. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/index.js.map +1 -0
  139. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.d.ts +2 -0
  140. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.d.ts.map +1 -0
  141. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.js +36 -0
  142. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mcp-instructions.js.map +1 -0
  143. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.d.ts +6 -0
  144. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.d.ts.map +1 -0
  145. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.js +32 -0
  146. package/bundled/node_modules/@aspm/shared/dist/ai/product-knowledge/mental-map.js.map +1 -0
  147. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.d.ts +12 -0
  148. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.d.ts.map +1 -0
  149. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.js +93 -0
  150. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-groups.js.map +1 -0
  151. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.d.ts +13 -0
  152. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.d.ts.map +1 -0
  153. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.js +79 -0
  154. package/bundled/node_modules/@aspm/shared/dist/api-key/api-key-scope-presets.js.map +1 -0
  155. package/bundled/node_modules/@aspm/shared/dist/api-key/index.d.ts +4 -0
  156. package/bundled/node_modules/@aspm/shared/dist/api-key/index.d.ts.map +1 -0
  157. package/bundled/node_modules/@aspm/shared/dist/api-key/index.js +20 -0
  158. package/bundled/node_modules/@aspm/shared/dist/api-key/index.js.map +1 -0
  159. package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.d.ts +20 -0
  160. package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.d.ts.map +1 -0
  161. package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.js +78 -0
  162. package/bundled/node_modules/@aspm/shared/dist/api-key/migrate-api-key-metadata.js.map +1 -0
  163. package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.d.ts +19 -0
  164. package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.d.ts.map +1 -0
  165. package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.js +126 -0
  166. package/bundled/node_modules/@aspm/shared/dist/assistant/assistant-thread.js.map +1 -0
  167. package/bundled/node_modules/@aspm/shared/dist/assistant/index.d.ts +1 -0
  168. package/bundled/node_modules/@aspm/shared/dist/assistant/index.d.ts.map +1 -1
  169. package/bundled/node_modules/@aspm/shared/dist/assistant/index.js +1 -0
  170. package/bundled/node_modules/@aspm/shared/dist/assistant/index.js.map +1 -1
  171. package/bundled/node_modules/@aspm/shared/dist/billing/index.d.ts +2 -0
  172. package/bundled/node_modules/@aspm/shared/dist/billing/index.d.ts.map +1 -0
  173. package/bundled/node_modules/@aspm/shared/dist/billing/index.js +18 -0
  174. package/bundled/node_modules/@aspm/shared/dist/billing/index.js.map +1 -0
  175. package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.d.ts +17 -0
  176. package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.d.ts.map +1 -0
  177. package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.js +30 -0
  178. package/bundled/node_modules/@aspm/shared/dist/billing/plan-limits.js.map +1 -0
  179. package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.d.ts +42 -0
  180. package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.d.ts.map +1 -0
  181. package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.js +147 -0
  182. package/bundled/node_modules/@aspm/shared/dist/ci/ci-job-dependencies.js.map +1 -0
  183. package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.d.ts +12 -0
  184. package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.d.ts.map +1 -0
  185. package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.js +70 -0
  186. package/bundled/node_modules/@aspm/shared/dist/ci/git-checkout-log-policy.js.map +1 -0
  187. package/bundled/node_modules/@aspm/shared/dist/ci/index.d.ts +4 -0
  188. package/bundled/node_modules/@aspm/shared/dist/ci/index.d.ts.map +1 -0
  189. package/bundled/node_modules/@aspm/shared/dist/ci/index.js +20 -0
  190. package/bundled/node_modules/@aspm/shared/dist/ci/index.js.map +1 -0
  191. package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.d.ts +16 -0
  192. package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.d.ts.map +1 -0
  193. package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.js +45 -0
  194. package/bundled/node_modules/@aspm/shared/dist/ci/kubbisec-ci-execution-env.js.map +1 -0
  195. package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.d.ts +1 -0
  196. package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.d.ts.map +1 -1
  197. package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.js +6 -0
  198. package/bundled/node_modules/@aspm/shared/dist/dto/create-report.dto.js.map +1 -1
  199. package/bundled/node_modules/@aspm/shared/dist/dto/index.d.ts +5 -3
  200. package/bundled/node_modules/@aspm/shared/dist/dto/index.d.ts.map +1 -1
  201. package/bundled/node_modules/@aspm/shared/dist/dto/index.js +5 -3
  202. package/bundled/node_modules/@aspm/shared/dist/dto/index.js.map +1 -1
  203. package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.d.ts +9 -0
  204. package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.d.ts.map +1 -0
  205. package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.js +52 -0
  206. package/bundled/node_modules/@aspm/shared/dist/dto/update-project.dto.js.map +1 -0
  207. package/bundled/node_modules/@aspm/shared/dist/enums.d.ts +3 -1
  208. package/bundled/node_modules/@aspm/shared/dist/enums.d.ts.map +1 -1
  209. package/bundled/node_modules/@aspm/shared/dist/enums.js +4 -0
  210. package/bundled/node_modules/@aspm/shared/dist/enums.js.map +1 -1
  211. package/bundled/node_modules/@aspm/shared/dist/index.d.ts +8 -2
  212. package/bundled/node_modules/@aspm/shared/dist/index.d.ts.map +1 -1
  213. package/bundled/node_modules/@aspm/shared/dist/index.js +8 -2
  214. package/bundled/node_modules/@aspm/shared/dist/index.js.map +1 -1
  215. package/bundled/node_modules/@aspm/shared/dist/mcp/constants.d.ts +22 -0
  216. package/bundled/node_modules/@aspm/shared/dist/mcp/constants.d.ts.map +1 -0
  217. package/bundled/node_modules/@aspm/shared/dist/mcp/constants.js +52 -0
  218. package/bundled/node_modules/@aspm/shared/dist/mcp/constants.js.map +1 -0
  219. package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.d.ts +37 -0
  220. package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.d.ts.map +1 -0
  221. package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.js +51 -0
  222. package/bundled/node_modules/@aspm/shared/dist/mcp/oauth-metadata.js.map +1 -0
  223. package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.d.ts +7 -4
  224. package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.d.ts.map +1 -1
  225. package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.js +15 -7
  226. package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.js.map +1 -1
  227. package/bundled/node_modules/@aspm/shared/dist/rbac/index.d.ts +1 -0
  228. package/bundled/node_modules/@aspm/shared/dist/rbac/index.d.ts.map +1 -1
  229. package/bundled/node_modules/@aspm/shared/dist/rbac/index.js +1 -0
  230. package/bundled/node_modules/@aspm/shared/dist/rbac/index.js.map +1 -1
  231. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permission-descriptions.d.ts.map +1 -1
  232. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permission-descriptions.js +2 -0
  233. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permission-descriptions.js.map +1 -1
  234. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.d.ts +1 -1
  235. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.d.ts.map +1 -1
  236. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.js +2 -0
  237. package/bundled/node_modules/@aspm/shared/dist/rbac/kubbisec-permissions.js.map +1 -1
  238. package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.d.ts +8 -0
  239. package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.d.ts.map +1 -0
  240. package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.js +19 -0
  241. package/bundled/node_modules/@aspm/shared/dist/rbac/member-quota.js.map +1 -0
  242. package/bundled/node_modules/@aspm/shared/dist/rbac/resolve-org-permissions.d.ts.map +1 -1
  243. package/bundled/node_modules/@aspm/shared/dist/rbac/resolve-org-permissions.js +4 -0
  244. package/bundled/node_modules/@aspm/shared/dist/rbac/resolve-org-permissions.js.map +1 -1
  245. package/bundled/node_modules/@aspm/shared/dist/redaction.d.ts +1 -0
  246. package/bundled/node_modules/@aspm/shared/dist/redaction.d.ts.map +1 -1
  247. package/bundled/node_modules/@aspm/shared/dist/redaction.js +1 -0
  248. package/bundled/node_modules/@aspm/shared/dist/redaction.js.map +1 -1
  249. package/bundled/node_modules/@aspm/shared/dist/security/aspm-gate-rules.d.ts.map +1 -1
  250. package/bundled/node_modules/@aspm/shared/dist/security/aspm-gate-rules.js.map +1 -1
  251. package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.d.ts.map +1 -1
  252. package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.js.map +1 -1
  253. package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.d.ts.map +1 -1
  254. package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.js +2 -2
  255. package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.js.map +1 -1
  256. package/bundled/node_modules/@aspm/shared/dist/security/index.d.ts +2 -2
  257. package/bundled/node_modules/@aspm/shared/dist/security/index.d.ts.map +1 -1
  258. package/bundled/node_modules/@aspm/shared/dist/security/index.js +2 -2
  259. package/bundled/node_modules/@aspm/shared/dist/security/index.js.map +1 -1
  260. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.d.ts +4 -0
  261. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.d.ts.map +1 -0
  262. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.js +10 -0
  263. package/bundled/node_modules/@aspm/shared/dist/shared-project/constants.js.map +1 -0
  264. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.d.ts +4 -0
  265. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.d.ts.map +1 -0
  266. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.js +20 -0
  267. package/bundled/node_modules/@aspm/shared/dist/shared-project/index.js.map +1 -0
  268. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.d.ts +2 -0
  269. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.d.ts.map +1 -0
  270. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.js +9 -0
  271. package/bundled/node_modules/@aspm/shared/dist/shared-project/redact-log-lines.js.map +1 -0
  272. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.d.ts +3 -0
  273. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.d.ts.map +1 -0
  274. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.js +18 -0
  275. package/bundled/node_modules/@aspm/shared/dist/shared-project/share-prefix.js.map +1 -0
  276. package/bundled/node_modules/@aspm/shared/package.json +27 -5
  277. package/bundled/node_modules/@kubbisec/chat-memory/dist/sanitizer.js +2 -2
  278. package/bundled/node_modules/@kubbisec/chat-memory/dist/sanitizer.js.map +1 -1
  279. package/bundled/node_modules/@kubbisec/chat-memory/package.json +4 -4
  280. package/bundled/node_modules/@kubbisec/home/dist/migrate.d.ts.map +1 -1
  281. package/bundled/node_modules/@kubbisec/home/dist/migrate.js +1 -1
  282. package/bundled/node_modules/@kubbisec/home/dist/migrate.js.map +1 -1
  283. package/bundled/node_modules/@kubbisec/home/package.json +3 -3
  284. package/bundled/resolve-bundled-dist-root.js +130 -122
  285. package/bundled/resolve-bundled-dist-root.js.map +1 -1
  286. package/bundled/skills/aspm-platform/SKILL.md +3 -1
  287. package/bundled/skills/at-path-mentions.d.ts +1 -1
  288. package/bundled/skills/at-path-mentions.js +153 -146
  289. package/bundled/skills/chat-mention-render.d.ts +2 -2
  290. package/bundled/skills/chat-mention-render.js +126 -121
  291. package/bundled/skills/chat-mentions.d.ts +8 -17
  292. package/bundled/skills/chat-mentions.js +76 -76
  293. package/bundled/skills/github-local/SKILL.md +5 -5
  294. package/bundled/skills/kubbisec-resource-router/SKILL.md +3 -0
  295. package/bundled/skills/list-bundled-skills.d.ts +3 -3
  296. package/bundled/skills/list-bundled-skills.js +35 -33
  297. package/bundled/skills/naus-pipelines/SKILL.md +11 -10
  298. package/bundled/skills/remediation/SKILL.md +1 -1
  299. package/bundled/skills/skill-mention.d.ts +2 -10
  300. package/bundled/skills/skill-mention.js +2 -10
  301. package/bundled/theme/clear-terminal.d.ts +1 -1
  302. package/bundled/theme/clear-terminal.js +4 -3
  303. package/bundled/theme/footer-render-hook.d.ts +1 -1
  304. package/bundled/theme/footer-render-hook.js +3 -3
  305. package/bundled/theme/kubbisec-brand-fg.d.ts +1 -1
  306. package/bundled/theme/kubbisec-brand-fg.js +2 -2
  307. package/bundled/theme/kubbisec-menu-themes.d.ts +7 -7
  308. package/bundled/theme/kubbisec-menu-themes.js +31 -30
  309. package/bundled/theme/kubbisec-theme-name.d.ts +1 -1
  310. package/bundled/theme/kubbisec-theme-name.js +1 -1
  311. package/bundled/theme/patch-pi-settings-theme.runtime.d.ts +1 -1
  312. package/bundled/theme/patch-pi-settings-theme.runtime.js +10 -11
  313. package/bundled/theme/render-compact-header.d.ts +5 -13
  314. package/bundled/theme/render-compact-header.js +128 -126
  315. package/bundled/theme/render-compact-header.js.map +1 -1
  316. package/bundled/workflow/session-workflow-mode.d.ts +1 -1
  317. package/bundled/workflow/session-workflow-mode.js +33 -33
  318. package/package.json +1 -1
  319. package/bundled/clarify/clarify-gate-state.d.ts +0 -3
  320. package/bundled/clarify/clarify-gate-state.d.ts.map +0 -1
  321. package/bundled/clarify/clarify-gate-state.js +0 -9
  322. package/bundled/clarify/clarify-gate-state.js.map +0 -1
  323. package/bundled/clarify/clarify-gate.d.ts +0 -35
  324. package/bundled/clarify/clarify-gate.d.ts.map +0 -1
  325. package/bundled/clarify/clarify-gate.js +0 -159
  326. package/bundled/clarify/clarify-gate.js.map +0 -1
  327. package/bundled/clarify/clarify-select-panel.d.ts +0 -21
  328. package/bundled/clarify/clarify-select-panel.d.ts.map +0 -1
  329. package/bundled/clarify/clarify-select-panel.js +0 -80
  330. package/bundled/clarify/clarify-select-panel.js.map +0 -1
  331. package/bundled/clarify/clarify-ui-state.d.ts +0 -23
  332. package/bundled/clarify/clarify-ui-state.d.ts.map +0 -1
  333. package/bundled/clarify/clarify-ui-state.js +0 -48
  334. package/bundled/clarify/clarify-ui-state.js.map +0 -1
  335. package/bundled/clarify/parse-clarify-answer.d.ts +0 -32
  336. package/bundled/clarify/parse-clarify-answer.d.ts.map +0 -1
  337. package/bundled/clarify/parse-clarify-answer.js +0 -51
  338. package/bundled/clarify/parse-clarify-answer.js.map +0 -1
  339. package/bundled/clarify/question-format.d.ts +0 -50
  340. package/bundled/clarify/question-format.d.ts.map +0 -1
  341. package/bundled/clarify/question-format.js +0 -137
  342. package/bundled/clarify/question-format.js.map +0 -1
  343. package/bundled/clarify/questionnaire-tool.d.ts +0 -36
  344. package/bundled/clarify/questionnaire-tool.d.ts.map +0 -1
  345. package/bundled/clarify/questionnaire-tool.js +0 -197
  346. package/bundled/clarify/questionnaire-tool.js.map +0 -1
  347. package/bundled/clarify/scope-discovery.d.ts +0 -12
  348. package/bundled/clarify/scope-discovery.d.ts.map +0 -1
  349. package/bundled/clarify/scope-discovery.js +0 -122
  350. package/bundled/clarify/scope-discovery.js.map +0 -1
  351. package/bundled/clarify/session-questionnaire.d.ts +0 -61
  352. package/bundled/clarify/session-questionnaire.d.ts.map +0 -1
  353. package/bundled/clarify/session-questionnaire.js +0 -364
  354. package/bundled/clarify/session-questionnaire.js.map +0 -1
  355. package/bundled/clarify/session-questionnaire.types.d.ts +0 -49
  356. package/bundled/clarify/session-questionnaire.types.d.ts.map +0 -1
  357. package/bundled/clarify/session-questionnaire.types.js +0 -13
  358. package/bundled/clarify/session-questionnaire.types.js.map +0 -1
@@ -1,177 +1,184 @@
1
1
  import { readdirSync, statSync } from "node:fs";
2
2
  import { basename, dirname, join, relative } from "node:path";
3
- import {
4
- extractAtPrefix,
5
- parsePlanMentionPrefix,
6
- parseSkillMentionPrefix,
7
- } from "./chat-mentions.js";
8
-
3
+ import { extractAtPrefix, parsePlanMentionPrefix, parseSkillMentionPrefix, } from "./chat-mentions.js";
9
4
  function toDisplayPath(value) {
10
- return value.replace(/\\/g, "/");
5
+ return value.replace(/\\/g, "/");
11
6
  }
12
7
  function parsePathPrefix(prefix) {
13
- if (prefix.startsWith('@"')) {
14
- return { rawPrefix: prefix.slice(2), isAtPrefix: true, isQuotedPrefix: true };
15
- }
16
- if (prefix.startsWith('"')) {
17
- return { rawPrefix: prefix.slice(1), isAtPrefix: false, isQuotedPrefix: true };
18
- }
19
- if (prefix.startsWith("@")) {
20
- return { rawPrefix: prefix.slice(1), isAtPrefix: true, isQuotedPrefix: false };
21
- }
22
- return { rawPrefix: prefix, isAtPrefix: false, isQuotedPrefix: false };
8
+ if (prefix.startsWith('@"')) {
9
+ return { rawPrefix: prefix.slice(2), isAtPrefix: true, isQuotedPrefix: true };
10
+ }
11
+ if (prefix.startsWith('"')) {
12
+ return { rawPrefix: prefix.slice(1), isAtPrefix: false, isQuotedPrefix: true };
13
+ }
14
+ if (prefix.startsWith("@")) {
15
+ return { rawPrefix: prefix.slice(1), isAtPrefix: true, isQuotedPrefix: false };
16
+ }
17
+ return { rawPrefix: prefix, isAtPrefix: false, isQuotedPrefix: false };
23
18
  }
24
19
  function buildCompletionValue(path, options) {
25
- const needsQuotes = options.isQuotedPrefix || path.includes(" ");
26
- const prefix = options.isAtPrefix ? "@" : "";
27
- if (!needsQuotes) {
28
- return `${prefix}${path}`;
29
- }
30
- const openQuote = `${prefix}"`;
31
- return `${openQuote}${path}"`;
20
+ const needsQuotes = options.isQuotedPrefix || path.includes(" ");
21
+ const prefix = options.isAtPrefix ? "@" : "";
22
+ if (!needsQuotes) {
23
+ return `${prefix}${path}`;
24
+ }
25
+ const openQuote = `${prefix}"`;
26
+ return `${openQuote}${path}"`;
32
27
  }
33
28
  const DEPRIORITIZED_AT_PATH_NAMES = new Set([
34
- "node_modules",
35
- "dist",
36
- "dist-bin",
37
- ".turbo",
38
- ".git",
39
- "coverage",
40
- "build",
41
- ".next",
42
- ".cache",
43
- "tmp",
44
- ".venv",
45
- "target",
29
+ "node_modules",
30
+ "dist",
31
+ "dist-bin",
32
+ ".turbo",
33
+ ".git",
34
+ "coverage",
35
+ "build",
36
+ ".next",
37
+ ".cache",
38
+ "tmp",
39
+ ".venv",
40
+ "target",
46
41
  ]);
47
42
  const PRIORITY_AT_PATH_DIRS = [
48
- "src",
49
- "lib",
50
- "apps",
51
- "packages",
52
- "scripts",
53
- "test",
54
- "tests",
55
- "docs",
56
- "spec",
43
+ "src",
44
+ "lib",
45
+ "apps",
46
+ "packages",
47
+ "scripts",
48
+ "test",
49
+ "tests",
50
+ "docs",
51
+ "spec",
57
52
  ];
58
53
  const PRIORITY_AT_PATH_FILES = [
59
- "package.json",
60
- "README.md",
61
- "readme.md",
62
- "tsconfig.json",
63
- "vitest.config.ts",
64
- "Cargo.toml",
65
- "go.mod",
66
- "pyproject.toml",
67
- "Makefile",
54
+ "package.json",
55
+ "README.md",
56
+ "readme.md",
57
+ "tsconfig.json",
58
+ "vitest.config.ts",
59
+ "Cargo.toml",
60
+ "go.mod",
61
+ "pyproject.toml",
62
+ "Makefile",
68
63
  ];
69
64
  function atPathSuggestionRank(label) {
70
- const name = label.replace(/\/$/, "");
71
- if (PRIORITY_AT_PATH_DIRS.includes(name) || PRIORITY_AT_PATH_FILES.includes(name)) {
72
- return 0;
73
- }
74
- if (DEPRIORITIZED_AT_PATH_NAMES.has(name)) {
75
- return 3;
76
- }
77
- if (label.endsWith("/")) {
78
- return 1;
79
- }
80
- return 2;
65
+ const name = label.replace(/\/$/, "");
66
+ if (PRIORITY_AT_PATH_DIRS.includes(name) ||
67
+ PRIORITY_AT_PATH_FILES.includes(name)) {
68
+ return 0;
69
+ }
70
+ if (DEPRIORITIZED_AT_PATH_NAMES.has(name)) {
71
+ return 3;
72
+ }
73
+ if (label.endsWith("/")) {
74
+ return 1;
75
+ }
76
+ return 2;
81
77
  }
82
78
  function sortAtPathSuggestions(items, rawPrefix) {
83
- if (rawPrefix !== "") {
79
+ if (rawPrefix !== "") {
80
+ return items.sort((a, b) => {
81
+ const aIsDir = a.label.endsWith("/");
82
+ const bIsDir = b.label.endsWith("/");
83
+ if (aIsDir && !bIsDir)
84
+ return -1;
85
+ if (!aIsDir && bIsDir)
86
+ return 1;
87
+ return a.label.localeCompare(b.label);
88
+ });
89
+ }
84
90
  return items.sort((a, b) => {
85
- const aIsDir = a.label.endsWith("/");
86
- const bIsDir = b.label.endsWith("/");
87
- if (aIsDir && !bIsDir) return -1;
88
- if (!aIsDir && bIsDir) return 1;
89
- return a.label.localeCompare(b.label);
91
+ const rankDiff = atPathSuggestionRank(a.label) - atPathSuggestionRank(b.label);
92
+ if (rankDiff !== 0)
93
+ return rankDiff;
94
+ return a.label.localeCompare(b.label);
90
95
  });
91
- }
92
- return items.sort((a, b) => {
93
- const rankDiff = atPathSuggestionRank(a.label) - atPathSuggestionRank(b.label);
94
- if (rankDiff !== 0) return rankDiff;
95
- return a.label.localeCompare(b.label);
96
- });
97
96
  }
98
97
  /** `@` file attachment (not `@skill` / `@plan`). */
99
98
  export function isAtFileAttachmentPrefix(atPrefix) {
100
- if (!atPrefix) return false;
101
- if (parseSkillMentionPrefix(atPrefix)) return false;
102
- if (parsePlanMentionPrefix(atPrefix)) return false;
103
- return atPrefix.startsWith("@");
99
+ if (!atPrefix)
100
+ return false;
101
+ if (parseSkillMentionPrefix(atPrefix))
102
+ return false;
103
+ if (parsePlanMentionPrefix(atPrefix))
104
+ return false;
105
+ return atPrefix.startsWith("@");
104
106
  }
105
107
  /** List cwd-scoped entries for `@` / `@path` (Pi getFileSuggestions semantics). */
106
108
  export function getAtPathFileSuggestions(cwd, atPrefix) {
107
- try {
108
- const { rawPrefix, isAtPrefix, isQuotedPrefix } = parsePathPrefix(atPrefix);
109
- if (!isAtPrefix) return [];
110
- let searchDir;
111
- let searchPrefix;
112
- const expandedPrefix = rawPrefix;
113
- const isRootPrefix =
114
- rawPrefix === "" ||
115
- rawPrefix === "./" ||
116
- rawPrefix === "../" ||
117
- rawPrefix === "/" ||
118
- (isAtPrefix && rawPrefix === "");
119
- if (isRootPrefix) {
120
- searchDir = join(cwd, expandedPrefix);
121
- searchPrefix = "";
122
- } else if (rawPrefix.endsWith("/")) {
123
- searchDir = join(cwd, expandedPrefix);
124
- searchPrefix = "";
125
- } else {
126
- searchDir = join(cwd, dirname(expandedPrefix));
127
- searchPrefix = basename(expandedPrefix);
128
- }
129
- const entries = readdirSync(searchDir, { withFileTypes: true });
130
- const suggestions = [];
131
- const cwdLabel = toDisplayPath(relative(cwd, searchDir) || ".");
132
- for (const entry of entries) {
133
- if (!entry.name.toLowerCase().startsWith(searchPrefix.toLowerCase())) {
134
- continue;
135
- }
136
- let isDirectory = entry.isDirectory();
137
- if (!isDirectory && entry.isSymbolicLink()) {
138
- try {
139
- isDirectory = statSync(join(searchDir, entry.name)).isDirectory();
140
- } catch {
141
- // broken symlink — treat as file
109
+ try {
110
+ const { rawPrefix, isAtPrefix, isQuotedPrefix } = parsePathPrefix(atPrefix);
111
+ if (!isAtPrefix)
112
+ return [];
113
+ let searchDir;
114
+ let searchPrefix;
115
+ const expandedPrefix = rawPrefix;
116
+ const isRootPrefix = rawPrefix === "" ||
117
+ rawPrefix === "./" ||
118
+ rawPrefix === "../" ||
119
+ rawPrefix === "/" ||
120
+ (isAtPrefix && rawPrefix === "");
121
+ if (isRootPrefix) {
122
+ searchDir = join(cwd, expandedPrefix);
123
+ searchPrefix = "";
142
124
  }
143
- }
144
- let relativePath;
145
- const displayPrefix = rawPrefix;
146
- const name = entry.name;
147
- if (displayPrefix.endsWith("/")) {
148
- relativePath = displayPrefix + name;
149
- } else if (displayPrefix.includes("/")) {
150
- relativePath = join(dirname(displayPrefix), name);
151
- if (displayPrefix.startsWith("./") && !relativePath.startsWith("./")) {
152
- relativePath = `./${relativePath}`;
125
+ else if (rawPrefix.endsWith("/")) {
126
+ searchDir = join(cwd, expandedPrefix);
127
+ searchPrefix = "";
153
128
  }
154
- } else {
155
- relativePath = name;
156
- }
157
- relativePath = toDisplayPath(relativePath);
158
- const pathValue = isDirectory ? `${relativePath}/` : relativePath;
159
- const value = buildCompletionValue(pathValue, { isAtPrefix, isQuotedPrefix });
160
- const entryRelative = toDisplayPath(relative(cwd, join(searchDir, entry.name)));
161
- suggestions.push({
162
- value,
163
- label: name + (isDirectory ? "/" : ""),
164
- description:
165
- searchDir === cwd && rawPrefix === "" ? entryRelative : `${cwdLabel}/${entryRelative}`,
166
- });
129
+ else {
130
+ searchDir = join(cwd, dirname(expandedPrefix));
131
+ searchPrefix = basename(expandedPrefix);
132
+ }
133
+ const entries = readdirSync(searchDir, { withFileTypes: true });
134
+ const suggestions = [];
135
+ const cwdLabel = toDisplayPath(relative(cwd, searchDir) || ".");
136
+ for (const entry of entries) {
137
+ if (!entry.name.toLowerCase().startsWith(searchPrefix.toLowerCase())) {
138
+ continue;
139
+ }
140
+ let isDirectory = entry.isDirectory();
141
+ if (!isDirectory && entry.isSymbolicLink()) {
142
+ try {
143
+ isDirectory = statSync(join(searchDir, entry.name)).isDirectory();
144
+ }
145
+ catch {
146
+ // broken symlink — treat as file
147
+ }
148
+ }
149
+ let relativePath;
150
+ const displayPrefix = rawPrefix;
151
+ const name = entry.name;
152
+ if (displayPrefix.endsWith("/")) {
153
+ relativePath = displayPrefix + name;
154
+ }
155
+ else if (displayPrefix.includes("/")) {
156
+ relativePath = join(dirname(displayPrefix), name);
157
+ if (displayPrefix.startsWith("./") && !relativePath.startsWith("./")) {
158
+ relativePath = `./${relativePath}`;
159
+ }
160
+ }
161
+ else {
162
+ relativePath = name;
163
+ }
164
+ relativePath = toDisplayPath(relativePath);
165
+ const pathValue = isDirectory ? `${relativePath}/` : relativePath;
166
+ const value = buildCompletionValue(pathValue, { isAtPrefix, isQuotedPrefix });
167
+ const entryRelative = toDisplayPath(relative(cwd, join(searchDir, entry.name)));
168
+ suggestions.push({
169
+ value,
170
+ label: name + (isDirectory ? "/" : ""),
171
+ description: searchDir === cwd && rawPrefix === "" ? entryRelative : `${cwdLabel}/${entryRelative}`,
172
+ });
173
+ }
174
+ return sortAtPathSuggestions(suggestions, rawPrefix);
175
+ }
176
+ catch {
177
+ return [];
167
178
  }
168
- return sortAtPathSuggestions(suggestions, rawPrefix);
169
- } catch {
170
- return [];
171
- }
172
179
  }
173
180
  export function extractAtFilePrefix(textBeforeCursor) {
174
- const atPrefix = extractAtPrefix(textBeforeCursor);
175
- return isAtFileAttachmentPrefix(atPrefix) ? atPrefix : null;
181
+ const atPrefix = extractAtPrefix(textBeforeCursor);
182
+ return isAtFileAttachmentPrefix(atPrefix) ? atPrefix : null;
176
183
  }
177
- //# sourceMappingURL=at-path-mentions.js.map
184
+ //# sourceMappingURL=at-path-mentions.js.map
@@ -1,7 +1,7 @@
1
1
  export type MentionChipTheme = {
2
- fg: (role: string, text: string) => string;
2
+ fg: (role: string, text: string) => string;
3
3
  };
4
4
  export declare function renderLineWithMentionChips(line: string, theme: MentionChipTheme): string;
5
5
  export declare function logicalToVisibleCol(line: string, logicalCol: number): number;
6
6
  export declare function visibleToLogicalCol(line: string, visibleCol: number): number;
7
- //# sourceMappingURL=chat-mention-render.d.ts.map
7
+ //# sourceMappingURL=chat-mention-render.d.ts.map
@@ -1,155 +1,160 @@
1
1
  import { visibleWidth } from "@earendil-works/pi-tui";
2
2
  import { PLAN_MENTION_ALIASES } from "./chat-mentions.js";
3
-
4
3
  const SKILL_SLASH_RE = /\/skill:([a-z0-9_-]+)/gi;
5
4
  const AT_SKILL_RE = /@skill\s+([^\s@/]+)/gi;
6
5
  const PLAN_TOKEN_RE = /\/mode:plan\b/gi;
7
6
  const AT_PLAN_PATTERN = PLAN_MENTION_ALIASES.map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))
8
- .sort((a, b) => b.length - a.length)
9
- .join("|");
7
+ .sort((a, b) => b.length - a.length)
8
+ .join("|");
10
9
  const AT_PLAN_RE = new RegExp(`(?:^|[\\s"'=])(${AT_PLAN_PATTERN})(?=\\s|$)`, "gi");
11
10
  const PLAN_VISIBLE_LABEL = "@plan";
12
11
  function findNextMentionMatch(line, cursor) {
13
- const candidates = [];
14
- SKILL_SLASH_RE.lastIndex = cursor;
15
- const slashMatch = SKILL_SLASH_RE.exec(line);
16
- if (slashMatch?.index !== undefined) {
17
- candidates.push({
18
- index: slashMatch.index,
19
- length: slashMatch[0].length,
20
- span: { kind: "skill", name: slashMatch[1] ?? "", source: "slash" },
21
- });
22
- }
23
- AT_SKILL_RE.lastIndex = cursor;
24
- const atMatch = AT_SKILL_RE.exec(line);
25
- if (atMatch?.index !== undefined) {
26
- candidates.push({
27
- index: atMatch.index,
28
- length: atMatch[0].length,
29
- span: { kind: "skill", name: atMatch[1] ?? "", source: "at" },
30
- });
31
- }
32
- PLAN_TOKEN_RE.lastIndex = cursor;
33
- const planMatch = PLAN_TOKEN_RE.exec(line);
34
- if (planMatch?.index !== undefined) {
35
- candidates.push({
36
- index: planMatch.index,
37
- length: planMatch[0].length,
38
- span: { kind: "plan", logicalToken: planMatch[0] },
39
- });
40
- }
41
- AT_PLAN_RE.lastIndex = cursor;
42
- const atPlanMatch = AT_PLAN_RE.exec(line);
43
- if (atPlanMatch?.index !== undefined) {
44
- const token = atPlanMatch[1] ?? "@plan";
45
- const leading = atPlanMatch[0].length - token.length;
46
- const index = atPlanMatch.index + leading;
47
- candidates.push({
48
- index,
49
- length: token.length,
50
- span: { kind: "plan", logicalToken: token },
51
- });
52
- }
53
- if (candidates.length === 0) return null;
54
- return candidates.reduce((earliest, candidate) =>
55
- candidate.index < earliest.index ? candidate : earliest,
56
- );
12
+ const candidates = [];
13
+ SKILL_SLASH_RE.lastIndex = cursor;
14
+ const slashMatch = SKILL_SLASH_RE.exec(line);
15
+ if (slashMatch?.index !== undefined) {
16
+ candidates.push({
17
+ index: slashMatch.index,
18
+ length: slashMatch[0].length,
19
+ span: { kind: "skill", name: slashMatch[1] ?? "", source: "slash" },
20
+ });
21
+ }
22
+ AT_SKILL_RE.lastIndex = cursor;
23
+ const atMatch = AT_SKILL_RE.exec(line);
24
+ if (atMatch?.index !== undefined) {
25
+ candidates.push({
26
+ index: atMatch.index,
27
+ length: atMatch[0].length,
28
+ span: { kind: "skill", name: atMatch[1] ?? "", source: "at" },
29
+ });
30
+ }
31
+ PLAN_TOKEN_RE.lastIndex = cursor;
32
+ const planMatch = PLAN_TOKEN_RE.exec(line);
33
+ if (planMatch?.index !== undefined) {
34
+ candidates.push({
35
+ index: planMatch.index,
36
+ length: planMatch[0].length,
37
+ span: { kind: "plan", logicalToken: planMatch[0] },
38
+ });
39
+ }
40
+ AT_PLAN_RE.lastIndex = cursor;
41
+ const atPlanMatch = AT_PLAN_RE.exec(line);
42
+ if (atPlanMatch?.index !== undefined) {
43
+ const token = atPlanMatch[1] ?? "@plan";
44
+ const leading = atPlanMatch[0].length - token.length;
45
+ const index = atPlanMatch.index + leading;
46
+ candidates.push({
47
+ index,
48
+ length: token.length,
49
+ span: { kind: "plan", logicalToken: token },
50
+ });
51
+ }
52
+ if (candidates.length === 0)
53
+ return null;
54
+ return candidates.reduce((earliest, candidate) => candidate.index < earliest.index ? candidate : earliest);
57
55
  }
58
56
  function parseMentionSpans(line) {
59
- const spans = [];
60
- let cursor = 0;
61
- while (cursor < line.length) {
62
- const nextMatch = findNextMentionMatch(line, cursor);
63
- if (!nextMatch) {
64
- spans.push({ kind: "text", value: line.slice(cursor) });
65
- break;
57
+ const spans = [];
58
+ let cursor = 0;
59
+ while (cursor < line.length) {
60
+ const nextMatch = findNextMentionMatch(line, cursor);
61
+ if (!nextMatch) {
62
+ spans.push({ kind: "text", value: line.slice(cursor) });
63
+ break;
64
+ }
65
+ if (nextMatch.index > cursor) {
66
+ spans.push({ kind: "text", value: line.slice(cursor, nextMatch.index) });
67
+ }
68
+ spans.push(nextMatch.span);
69
+ cursor = nextMatch.index + nextMatch.length;
66
70
  }
67
- if (nextMatch.index > cursor) {
68
- spans.push({ kind: "text", value: line.slice(cursor, nextMatch.index) });
71
+ if (spans.length === 0) {
72
+ spans.push({ kind: "text", value: line });
69
73
  }
70
- spans.push(nextMatch.span);
71
- cursor = nextMatch.index + nextMatch.length;
72
- }
73
- if (spans.length === 0) {
74
- spans.push({ kind: "text", value: line });
75
- }
76
- return spans;
74
+ return spans;
77
75
  }
78
76
  function skillVisibleText(span) {
79
- return span.source === "at" ? `@${span.name}` : span.name;
77
+ return span.source === "at" ? `@${span.name}` : span.name;
80
78
  }
81
79
  function skillLogicalText(span) {
82
- return span.source === "at" ? `@skill ${span.name}` : `/skill:${span.name}`;
80
+ return span.source === "at" ? `@skill ${span.name}` : `/skill:${span.name}`;
83
81
  }
84
82
  function renderSpan(span, theme) {
85
- if (span.kind === "text") return span.value;
86
- if (span.kind === "skill") {
87
- const text = skillVisibleText(span);
83
+ if (span.kind === "text")
84
+ return span.value;
85
+ if (span.kind === "skill") {
86
+ const text = skillVisibleText(span);
87
+ try {
88
+ return theme.fg("accent", text);
89
+ }
90
+ catch {
91
+ return theme.fg("text", text);
92
+ }
93
+ }
88
94
  try {
89
- return theme.fg("accent", text);
90
- } catch {
91
- return theme.fg("text", text);
95
+ return theme.fg("planAccent", PLAN_VISIBLE_LABEL);
96
+ }
97
+ catch {
98
+ return theme.fg("text", PLAN_VISIBLE_LABEL);
92
99
  }
93
- }
94
- try {
95
- return theme.fg("planAccent", PLAN_VISIBLE_LABEL);
96
- } catch {
97
- return theme.fg("text", PLAN_VISIBLE_LABEL);
98
- }
99
100
  }
100
101
  function spanLogicalWidth(span) {
101
- if (span.kind === "text") return span.value.length;
102
- if (span.kind === "skill") return skillLogicalText(span).length;
103
- return span.logicalToken.length;
102
+ if (span.kind === "text")
103
+ return span.value.length;
104
+ if (span.kind === "skill")
105
+ return skillLogicalText(span).length;
106
+ return span.logicalToken.length;
104
107
  }
105
108
  function spanVisibleText(span) {
106
- if (span.kind === "text") return span.value;
107
- if (span.kind === "skill") return skillVisibleText(span);
108
- return PLAN_VISIBLE_LABEL;
109
+ if (span.kind === "text")
110
+ return span.value;
111
+ if (span.kind === "skill")
112
+ return skillVisibleText(span);
113
+ return PLAN_VISIBLE_LABEL;
109
114
  }
110
115
  export function renderLineWithMentionChips(line, theme) {
111
- return parseMentionSpans(line)
112
- .map((span) => renderSpan(span, theme))
113
- .join("");
116
+ return parseMentionSpans(line)
117
+ .map((span) => renderSpan(span, theme))
118
+ .join("");
114
119
  }
115
120
  export function logicalToVisibleCol(line, logicalCol) {
116
- const clamped = Math.max(0, Math.min(logicalCol, line.length));
117
- let logical = 0;
118
- let visible = 0;
119
- for (const span of parseMentionSpans(line)) {
120
- const logicalLen = spanLogicalWidth(span);
121
- const visibleLen = visibleWidth(spanVisibleText(span));
122
- if (logical + logicalLen >= clamped) {
123
- const offset = clamped - logical;
124
- if (span.kind === "text") {
125
- return visible + offset;
126
- }
127
- const ratio = logicalLen > 0 ? offset / logicalLen : 0;
128
- return visible + Math.round(visibleLen * ratio);
121
+ const clamped = Math.max(0, Math.min(logicalCol, line.length));
122
+ let logical = 0;
123
+ let visible = 0;
124
+ for (const span of parseMentionSpans(line)) {
125
+ const logicalLen = spanLogicalWidth(span);
126
+ const visibleLen = visibleWidth(spanVisibleText(span));
127
+ if (logical + logicalLen >= clamped) {
128
+ const offset = clamped - logical;
129
+ if (span.kind === "text") {
130
+ return visible + offset;
131
+ }
132
+ const ratio = logicalLen > 0 ? offset / logicalLen : 0;
133
+ return visible + Math.round(visibleLen * ratio);
134
+ }
135
+ logical += logicalLen;
136
+ visible += visibleLen;
129
137
  }
130
- logical += logicalLen;
131
- visible += visibleLen;
132
- }
133
- return visible;
138
+ return visible;
134
139
  }
135
140
  export function visibleToLogicalCol(line, visibleCol) {
136
- const clamped = Math.max(0, visibleCol);
137
- let logical = 0;
138
- let visible = 0;
139
- for (const span of parseMentionSpans(line)) {
140
- const logicalLen = spanLogicalWidth(span);
141
- const visibleLen = visibleWidth(spanVisibleText(span));
142
- if (visible + visibleLen >= clamped) {
143
- const offset = clamped - visible;
144
- if (span.kind === "text") {
145
- return logical + offset;
146
- }
147
- const ratio = visibleLen > 0 ? offset / visibleLen : 0;
148
- return logical + Math.round(logicalLen * ratio);
141
+ const clamped = Math.max(0, visibleCol);
142
+ let logical = 0;
143
+ let visible = 0;
144
+ for (const span of parseMentionSpans(line)) {
145
+ const logicalLen = spanLogicalWidth(span);
146
+ const visibleLen = visibleWidth(spanVisibleText(span));
147
+ if (visible + visibleLen >= clamped) {
148
+ const offset = clamped - visible;
149
+ if (span.kind === "text") {
150
+ return logical + offset;
151
+ }
152
+ const ratio = visibleLen > 0 ? offset / visibleLen : 0;
153
+ return logical + Math.round(logicalLen * ratio);
154
+ }
155
+ logical += logicalLen;
156
+ visible += visibleLen;
149
157
  }
150
- logical += logicalLen;
151
- visible += visibleLen;
152
- }
153
- return line.length;
158
+ return line.length;
154
159
  }
155
- //# sourceMappingURL=chat-mention-render.js.map
160
+ //# sourceMappingURL=chat-mention-render.js.map
@@ -7,15 +7,12 @@ export declare function extractAtPrefix(textBeforeCursor: string): string | null
7
7
  /** KubbiSec: `@skill` may include a space and partial name (not only the last @ token). */
8
8
  export declare function extractSkillMentionPrefix(textBeforeCursor: string): string | null;
9
9
  export declare function parseSkillMentionPrefix(atPrefix: string | null): {
10
- query: string;
10
+ query: string;
11
11
  } | null;
12
12
  export declare function parsePlanMentionPrefix(atPrefix: string | null): {
13
- query: string;
13
+ query: string;
14
14
  } | null;
15
- export declare function filterSkillSuggestions(
16
- skills: KubbisecSkillEntry[],
17
- query: string,
18
- ): AutocompleteItem[];
15
+ export declare function filterSkillSuggestions(skills: KubbisecSkillEntry[], query: string): AutocompleteItem[];
19
16
  /** Pi expands `/skill:name` — map `@skill name` before submit. */
20
17
  export declare function transformAtSkillMentions(text: string): string;
21
18
  /** Legacy: map `@plan` / `@planejar` to `/mode:plan` (prefer session state + visible @plan). */
@@ -23,15 +20,9 @@ export declare function transformAtPlanMentions(text: string): string;
23
20
  /** Apply @skill → /skill:name only. @plan stays visible; plan mode is set via session state. */
24
21
  export declare function transformChatMentions(text: string): string;
25
22
  export declare function messageActivatesPlanMode(text: string): boolean;
26
- export declare function applySkillMentionCompletion(
27
- lines: string[],
28
- cursorLine: number,
29
- cursorCol: number,
30
- item: AutocompleteItem,
31
- prefix: string,
32
- ): {
33
- lines: string[];
34
- cursorLine: number;
35
- cursorCol: number;
23
+ export declare function applySkillMentionCompletion(lines: string[], cursorLine: number, cursorCol: number, item: AutocompleteItem, prefix: string): {
24
+ lines: string[];
25
+ cursorLine: number;
26
+ cursorCol: number;
36
27
  };
37
- //# sourceMappingURL=chat-mentions.d.ts.map
28
+ //# sourceMappingURL=chat-mentions.d.ts.map