@fbincon/claude-code-statusline 0.0.0-stage → 3.0.0-beta.1

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 (645) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE-Unicode.txt +39 -0
  3. package/LICENSE-Wcwidth.txt +27 -0
  4. package/README.md +90 -2
  5. package/bin/claude-statusline.js +2 -0
  6. package/candidate.json +1238 -0
  7. package/node_modules/@fbincon/statusline-cli/dist/src/config/arguments.d.ts +35 -0
  8. package/node_modules/@fbincon/statusline-cli/dist/src/config/arguments.js +228 -0
  9. package/node_modules/@fbincon/statusline-cli/dist/src/config/arguments.js.map +1 -0
  10. package/node_modules/@fbincon/statusline-cli/dist/src/config/backend-preferences.d.ts +6 -0
  11. package/node_modules/@fbincon/statusline-cli/dist/src/config/backend-preferences.js +72 -0
  12. package/node_modules/@fbincon/statusline-cli/dist/src/config/backend-preferences.js.map +1 -0
  13. package/node_modules/@fbincon/statusline-cli/dist/src/config/commands.d.ts +10 -0
  14. package/node_modules/@fbincon/statusline-cli/dist/src/config/commands.js +140 -0
  15. package/node_modules/@fbincon/statusline-cli/dist/src/config/commands.js.map +1 -0
  16. package/node_modules/@fbincon/statusline-cli/dist/src/config/host.d.ts +10 -0
  17. package/node_modules/@fbincon/statusline-cli/dist/src/config/host.js +101 -0
  18. package/node_modules/@fbincon/statusline-cli/dist/src/config/host.js.map +1 -0
  19. package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.d.ts +10 -0
  20. package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.js +96 -0
  21. package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.js.map +1 -0
  22. package/node_modules/@fbincon/statusline-cli/dist/src/config/preferences.d.ts +11 -0
  23. package/node_modules/@fbincon/statusline-cli/dist/src/config/preferences.js +80 -0
  24. package/node_modules/@fbincon/statusline-cli/dist/src/config/preferences.js.map +1 -0
  25. package/node_modules/@fbincon/statusline-cli/dist/src/config/service.d.ts +45 -0
  26. package/node_modules/@fbincon/statusline-cli/dist/src/config/service.js +99 -0
  27. package/node_modules/@fbincon/statusline-cli/dist/src/config/service.js.map +1 -0
  28. package/node_modules/@fbincon/statusline-cli/dist/src/config/storage.d.ts +30 -0
  29. package/node_modules/@fbincon/statusline-cli/dist/src/config/storage.js +134 -0
  30. package/node_modules/@fbincon/statusline-cli/dist/src/config/storage.js.map +1 -0
  31. package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.d.ts +3 -0
  32. package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.js +89 -0
  33. package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.js.map +1 -0
  34. package/node_modules/@fbincon/statusline-cli/dist/src/context.d.ts +11 -0
  35. package/node_modules/@fbincon/statusline-cli/dist/src/context.js +2 -0
  36. package/node_modules/@fbincon/statusline-cli/dist/src/context.js.map +1 -0
  37. package/node_modules/@fbincon/statusline-cli/dist/src/entry.d.ts +1 -0
  38. package/node_modules/@fbincon/statusline-cli/dist/src/entry.js +3 -0
  39. package/node_modules/@fbincon/statusline-cli/dist/src/entry.js.map +1 -0
  40. package/node_modules/@fbincon/statusline-cli/dist/src/errors.d.ts +4 -0
  41. package/node_modules/@fbincon/statusline-cli/dist/src/errors.js +8 -0
  42. package/node_modules/@fbincon/statusline-cli/dist/src/errors.js.map +1 -0
  43. package/node_modules/@fbincon/statusline-cli/dist/src/help.d.ts +3 -0
  44. package/node_modules/@fbincon/statusline-cli/dist/src/help.js +67 -0
  45. package/node_modules/@fbincon/statusline-cli/dist/src/help.js.map +1 -0
  46. package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.d.ts +10 -0
  47. package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.js +40 -0
  48. package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.js.map +1 -0
  49. package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.d.ts +3 -0
  50. package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.js +63 -0
  51. package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.js.map +1 -0
  52. package/node_modules/@fbincon/statusline-cli/dist/src/integration/doctor.d.ts +4 -0
  53. package/node_modules/@fbincon/statusline-cli/dist/src/integration/doctor.js +153 -0
  54. package/node_modules/@fbincon/statusline-cli/dist/src/integration/doctor.js.map +1 -0
  55. package/node_modules/@fbincon/statusline-cli/dist/src/integration/editor.d.ts +14 -0
  56. package/node_modules/@fbincon/statusline-cli/dist/src/integration/editor.js +3 -0
  57. package/node_modules/@fbincon/statusline-cli/dist/src/integration/editor.js.map +1 -0
  58. package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.d.ts +6 -0
  59. package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.js +142 -0
  60. package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.js.map +1 -0
  61. package/node_modules/@fbincon/statusline-cli/dist/src/integration/launcher.d.ts +15 -0
  62. package/node_modules/@fbincon/statusline-cli/dist/src/integration/launcher.js +91 -0
  63. package/node_modules/@fbincon/statusline-cli/dist/src/integration/launcher.js.map +1 -0
  64. package/node_modules/@fbincon/statusline-cli/dist/src/integration/mod-ownership.d.ts +20 -0
  65. package/node_modules/@fbincon/statusline-cli/dist/src/integration/mod-ownership.js +109 -0
  66. package/node_modules/@fbincon/statusline-cli/dist/src/integration/mod-ownership.js.map +1 -0
  67. package/node_modules/@fbincon/statusline-cli/dist/src/integration/model.d.ts +60 -0
  68. package/node_modules/@fbincon/statusline-cli/dist/src/integration/model.js +12 -0
  69. package/node_modules/@fbincon/statusline-cli/dist/src/integration/model.js.map +1 -0
  70. package/node_modules/@fbincon/statusline-cli/dist/src/integration/mods.d.ts +10 -0
  71. package/node_modules/@fbincon/statusline-cli/dist/src/integration/mods.js +234 -0
  72. package/node_modules/@fbincon/statusline-cli/dist/src/integration/mods.js.map +1 -0
  73. package/node_modules/@fbincon/statusline-cli/dist/src/integration/ownership.d.ts +8 -0
  74. package/node_modules/@fbincon/statusline-cli/dist/src/integration/ownership.js +41 -0
  75. package/node_modules/@fbincon/statusline-cli/dist/src/integration/ownership.js.map +1 -0
  76. package/node_modules/@fbincon/statusline-cli/dist/src/integration/paths.d.ts +1 -0
  77. package/node_modules/@fbincon/statusline-cli/dist/src/integration/paths.js +14 -0
  78. package/node_modules/@fbincon/statusline-cli/dist/src/integration/paths.js.map +1 -0
  79. package/node_modules/@fbincon/statusline-cli/dist/src/integration/plan.d.ts +13 -0
  80. package/node_modules/@fbincon/statusline-cli/dist/src/integration/plan.js +92 -0
  81. package/node_modules/@fbincon/statusline-cli/dist/src/integration/plan.js.map +1 -0
  82. package/node_modules/@fbincon/statusline-cli/dist/src/integration/resources.d.ts +19 -0
  83. package/node_modules/@fbincon/statusline-cli/dist/src/integration/resources.js +91 -0
  84. package/node_modules/@fbincon/statusline-cli/dist/src/integration/resources.js.map +1 -0
  85. package/node_modules/@fbincon/statusline-cli/dist/src/integration/slash-hook.d.ts +6 -0
  86. package/node_modules/@fbincon/statusline-cli/dist/src/integration/slash-hook.js +94 -0
  87. package/node_modules/@fbincon/statusline-cli/dist/src/integration/slash-hook.js.map +1 -0
  88. package/node_modules/@fbincon/statusline-cli/dist/src/integration/transaction.d.ts +8 -0
  89. package/node_modules/@fbincon/statusline-cli/dist/src/integration/transaction.js +3 -0
  90. package/node_modules/@fbincon/statusline-cli/dist/src/integration/transaction.js.map +1 -0
  91. package/node_modules/@fbincon/statusline-cli/dist/src/main.d.ts +22 -0
  92. package/node_modules/@fbincon/statusline-cli/dist/src/main.js +197 -0
  93. package/node_modules/@fbincon/statusline-cli/dist/src/main.js.map +1 -0
  94. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/files.d.ts +7 -0
  95. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/files.js +134 -0
  96. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/files.js.map +1 -0
  97. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.d.ts +58 -0
  98. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.js +144 -0
  99. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.js.map +1 -0
  100. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/official.d.ts +5 -0
  101. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/official.js +125 -0
  102. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/official.js.map +1 -0
  103. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/service.d.ts +11 -0
  104. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/service.js +55 -0
  105. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/service.js.map +1 -0
  106. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/environment.d.ts +15 -0
  107. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/environment.js +95 -0
  108. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/environment.js.map +1 -0
  109. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.d.ts +6 -0
  110. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.js +48 -0
  111. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.js.map +1 -0
  112. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/preview.d.ts +2 -0
  113. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/preview.js +13 -0
  114. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/preview.js.map +1 -0
  115. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/context.d.ts +11 -0
  116. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/context.js +11 -0
  117. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/context.js.map +1 -0
  118. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/git.d.ts +19 -0
  119. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/git.js +162 -0
  120. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/git.js.map +1 -0
  121. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/hook.d.ts +3 -0
  122. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/hook.js +19 -0
  123. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/hook.js.map +1 -0
  124. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/io.d.ts +37 -0
  125. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/io.js +75 -0
  126. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/io.js.map +1 -0
  127. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/json-data.d.ts +9 -0
  128. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/json-data.js +241 -0
  129. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/json-data.js.map +1 -0
  130. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/collect.d.ts +2 -0
  131. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/collect.js +14 -0
  132. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/collect.js.map +1 -0
  133. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/durations.d.ts +15 -0
  134. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/durations.js +69 -0
  135. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/durations.js.map +1 -0
  136. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/protocol.d.ts +16 -0
  137. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/protocol.js +90 -0
  138. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/protocol.js.map +1 -0
  139. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/store.d.ts +25 -0
  140. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/store.js +80 -0
  141. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/store.js.map +1 -0
  142. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/registry.d.ts +4 -0
  143. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/registry.js +40 -0
  144. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/registry.js.map +1 -0
  145. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/collect.d.ts +5 -0
  146. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/collect.js +59 -0
  147. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/collect.js.map +1 -0
  148. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/service.d.ts +17 -0
  149. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/service.js +69 -0
  150. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/service.js.map +1 -0
  151. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/store.d.ts +17 -0
  152. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/store.js +70 -0
  153. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/store.js.map +1 -0
  154. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/submissions.d.ts +13 -0
  155. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/submissions.js +75 -0
  156. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/submissions.js.map +1 -0
  157. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/usage.d.ts +33 -0
  158. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/usage.js +227 -0
  159. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/usage.js.map +1 -0
  160. package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.d.ts +20 -0
  161. package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.js +144 -0
  162. package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.js.map +1 -0
  163. package/node_modules/@fbincon/statusline-cli/package.json +17 -0
  164. package/node_modules/@fbincon/statusline-cli/resources/statusline-config/SKILL.md +80 -0
  165. package/node_modules/@fbincon/statusline-cli/resources/statusline-configure/SKILL.md +19 -0
  166. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/.claude-plugin/plugin.json +37 -0
  167. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/hooks/hooks.json +6 -0
  168. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/hooks/register.ts +820 -0
  169. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/backend.ts +503 -0
  170. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/forms.ts +3 -0
  171. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/keys.ts +198 -0
  172. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/messages.ts +101 -0
  173. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/settings.ts +218 -0
  174. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/appearance.ts +29 -0
  175. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/draft.ts +254 -0
  176. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/forms.ts +167 -0
  177. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/guidance.ts +20 -0
  178. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/import-review.ts +55 -0
  179. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/instances.ts +30 -0
  180. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/navigation.ts +98 -0
  181. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/numeric.ts +42 -0
  182. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/search.ts +114 -0
  183. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/generated-contracts.ts +276 -0
  184. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/generated-unicode.ts +92 -0
  185. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/generated-locales.ts +6842 -0
  186. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/index.ts +40 -0
  187. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/messages.ts +33 -0
  188. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/presentation.ts +62 -0
  189. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/launch.ts +25 -0
  190. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/preferences.ts +61 -0
  191. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/preview-preferences.ts +8 -0
  192. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/session.ts +124 -0
  193. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/unicode.ts +121 -0
  194. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/resource-manifest.json +47 -0
  195. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/draw.ts +159 -0
  196. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/help.ts +84 -0
  197. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/surface.ts +89 -0
  198. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/catalog.ts +23 -0
  199. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/preview.ts +45 -0
  200. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/section.ts +49 -0
  201. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/shortcuts.ts +83 -0
  202. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/layout.ts +49 -0
  203. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/styled-text.ts +56 -0
  204. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/text.ts +23 -0
  205. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/theme.ts +27 -0
  206. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/.claude-plugin/plugin.json +49 -0
  207. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/hooks/hooks.json +1 -0
  208. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/hooks/observe.ts +279 -0
  209. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/checklists.ts +45 -0
  210. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/costs.ts +23 -0
  211. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/generated-contracts.ts +18 -0
  212. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/identity.ts +14 -0
  213. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/launch.ts +25 -0
  214. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/queue.ts +68 -0
  215. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/streams.ts +28 -0
  216. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/timing.ts +11 -0
  217. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/resource-manifest.json +19 -0
  218. package/node_modules/@fbincon/statusline-core/dist/src/config/backend-preferences.d.ts +14 -0
  219. package/node_modules/@fbincon/statusline-core/dist/src/config/backend-preferences.js +72 -0
  220. package/node_modules/@fbincon/statusline-core/dist/src/config/backend-preferences.js.map +1 -0
  221. package/node_modules/@fbincon/statusline-core/dist/src/config/catalog-data.d.ts +86 -0
  222. package/node_modules/@fbincon/statusline-core/dist/src/config/catalog-data.js +3462 -0
  223. package/node_modules/@fbincon/statusline-core/dist/src/config/catalog-data.js.map +1 -0
  224. package/node_modules/@fbincon/statusline-core/dist/src/config/catalog.d.ts +10 -0
  225. package/node_modules/@fbincon/statusline-core/dist/src/config/catalog.js +17 -0
  226. package/node_modules/@fbincon/statusline-core/dist/src/config/catalog.js.map +1 -0
  227. package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.d.ts +5 -0
  228. package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.js +19 -0
  229. package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.js.map +1 -0
  230. package/node_modules/@fbincon/statusline-core/dist/src/config/display.d.ts +13 -0
  231. package/node_modules/@fbincon/statusline-core/dist/src/config/display.js +232 -0
  232. package/node_modules/@fbincon/statusline-core/dist/src/config/display.js.map +1 -0
  233. package/node_modules/@fbincon/statusline-core/dist/src/config/draft.d.ts +4 -0
  234. package/node_modules/@fbincon/statusline-core/dist/src/config/draft.js +48 -0
  235. package/node_modules/@fbincon/statusline-core/dist/src/config/draft.js.map +1 -0
  236. package/node_modules/@fbincon/statusline-core/dist/src/config/editor-fields.d.ts +8 -0
  237. package/node_modules/@fbincon/statusline-core/dist/src/config/editor-fields.js +104 -0
  238. package/node_modules/@fbincon/statusline-core/dist/src/config/editor-fields.js.map +1 -0
  239. package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.d.ts +11 -0
  240. package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.js +99 -0
  241. package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.js.map +1 -0
  242. package/node_modules/@fbincon/statusline-core/dist/src/config/generated-constants.d.ts +36 -0
  243. package/node_modules/@fbincon/statusline-core/dist/src/config/generated-constants.js +5 -0
  244. package/node_modules/@fbincon/statusline-core/dist/src/config/generated-constants.js.map +1 -0
  245. package/node_modules/@fbincon/statusline-core/dist/src/config/import-review.d.ts +4 -0
  246. package/node_modules/@fbincon/statusline-core/dist/src/config/import-review.js +80 -0
  247. package/node_modules/@fbincon/statusline-core/dist/src/config/import-review.js.map +1 -0
  248. package/node_modules/@fbincon/statusline-core/dist/src/config/instances.d.ts +29 -0
  249. package/node_modules/@fbincon/statusline-core/dist/src/config/instances.js +159 -0
  250. package/node_modules/@fbincon/statusline-core/dist/src/config/instances.js.map +1 -0
  251. package/node_modules/@fbincon/statusline-core/dist/src/config/presets.d.ts +10 -0
  252. package/node_modules/@fbincon/statusline-core/dist/src/config/presets.js +34 -0
  253. package/node_modules/@fbincon/statusline-core/dist/src/config/presets.js.map +1 -0
  254. package/node_modules/@fbincon/statusline-core/dist/src/config/transfer.d.ts +6 -0
  255. package/node_modules/@fbincon/statusline-core/dist/src/config/transfer.js +23 -0
  256. package/node_modules/@fbincon/statusline-core/dist/src/config/transfer.js.map +1 -0
  257. package/node_modules/@fbincon/statusline-core/dist/src/config/validation.d.ts +15 -0
  258. package/node_modules/@fbincon/statusline-core/dist/src/config/validation.js +55 -0
  259. package/node_modules/@fbincon/statusline-core/dist/src/config/validation.js.map +1 -0
  260. package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.d.ts +33 -0
  261. package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.js +5 -0
  262. package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.js.map +1 -0
  263. package/node_modules/@fbincon/statusline-core/dist/src/contracts/runtime.d.ts +18 -0
  264. package/node_modules/@fbincon/statusline-core/dist/src/contracts/runtime.js +3 -0
  265. package/node_modules/@fbincon/statusline-core/dist/src/contracts/runtime.js.map +1 -0
  266. package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.d.ts +663 -0
  267. package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.js +23 -0
  268. package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.js.map +1 -0
  269. package/node_modules/@fbincon/statusline-core/dist/src/editor/appearance.d.ts +5 -0
  270. package/node_modules/@fbincon/statusline-core/dist/src/editor/appearance.js +27 -0
  271. package/node_modules/@fbincon/statusline-core/dist/src/editor/appearance.js.map +1 -0
  272. package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.d.ts +18 -0
  273. package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.js +401 -0
  274. package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.js.map +1 -0
  275. package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.d.ts +73 -0
  276. package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.js +251 -0
  277. package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.js.map +1 -0
  278. package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.d.ts +26 -0
  279. package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.js +146 -0
  280. package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.js.map +1 -0
  281. package/node_modules/@fbincon/statusline-core/dist/src/editor/guidance.d.ts +3 -0
  282. package/node_modules/@fbincon/statusline-core/dist/src/editor/guidance.js +17 -0
  283. package/node_modules/@fbincon/statusline-core/dist/src/editor/guidance.js.map +1 -0
  284. package/node_modules/@fbincon/statusline-core/dist/src/editor/import-review.d.ts +19 -0
  285. package/node_modules/@fbincon/statusline-core/dist/src/editor/import-review.js +53 -0
  286. package/node_modules/@fbincon/statusline-core/dist/src/editor/import-review.js.map +1 -0
  287. package/node_modules/@fbincon/statusline-core/dist/src/editor/instances.d.ts +4 -0
  288. package/node_modules/@fbincon/statusline-core/dist/src/editor/instances.js +36 -0
  289. package/node_modules/@fbincon/statusline-core/dist/src/editor/instances.js.map +1 -0
  290. package/node_modules/@fbincon/statusline-core/dist/src/editor/navigation.d.ts +37 -0
  291. package/node_modules/@fbincon/statusline-core/dist/src/editor/navigation.js +73 -0
  292. package/node_modules/@fbincon/statusline-core/dist/src/editor/navigation.js.map +1 -0
  293. package/node_modules/@fbincon/statusline-core/dist/src/editor/numeric.d.ts +11 -0
  294. package/node_modules/@fbincon/statusline-core/dist/src/editor/numeric.js +27 -0
  295. package/node_modules/@fbincon/statusline-core/dist/src/editor/numeric.js.map +1 -0
  296. package/node_modules/@fbincon/statusline-core/dist/src/editor/search.d.ts +22 -0
  297. package/node_modules/@fbincon/statusline-core/dist/src/editor/search.js +122 -0
  298. package/node_modules/@fbincon/statusline-core/dist/src/editor/search.js.map +1 -0
  299. package/node_modules/@fbincon/statusline-core/dist/src/editor/text.d.ts +2 -0
  300. package/node_modules/@fbincon/statusline-core/dist/src/editor/text.js +30 -0
  301. package/node_modules/@fbincon/statusline-core/dist/src/editor/text.js.map +1 -0
  302. package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.d.ts +6841 -0
  303. package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.js +6841 -0
  304. package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.js.map +1 -0
  305. package/node_modules/@fbincon/statusline-core/dist/src/i18n/messages.d.ts +16 -0
  306. package/node_modules/@fbincon/statusline-core/dist/src/i18n/messages.js +38 -0
  307. package/node_modules/@fbincon/statusline-core/dist/src/i18n/messages.js.map +1 -0
  308. package/node_modules/@fbincon/statusline-core/dist/src/i18n/registry.d.ts +3 -0
  309. package/node_modules/@fbincon/statusline-core/dist/src/i18n/registry.js +4 -0
  310. package/node_modules/@fbincon/statusline-core/dist/src/i18n/registry.js.map +1 -0
  311. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.d.ts +222 -0
  312. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.js +224 -0
  313. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.js.map +1 -0
  314. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.d.ts +222 -0
  315. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.js +224 -0
  316. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.js.map +1 -0
  317. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.d.ts +222 -0
  318. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.js +224 -0
  319. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.js.map +1 -0
  320. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.d.ts +222 -0
  321. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.js +224 -0
  322. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.js.map +1 -0
  323. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-Hant.d.ts +222 -0
  324. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-Hant.js +224 -0
  325. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-Hant.js.map +1 -0
  326. package/node_modules/@fbincon/statusline-core/dist/src/integration/binding.d.ts +9 -0
  327. package/node_modules/@fbincon/statusline-core/dist/src/integration/binding.js +27 -0
  328. package/node_modules/@fbincon/statusline-core/dist/src/integration/binding.js.map +1 -0
  329. package/node_modules/@fbincon/statusline-core/dist/src/json-equality.d.ts +2 -0
  330. package/node_modules/@fbincon/statusline-core/dist/src/json-equality.js +31 -0
  331. package/node_modules/@fbincon/statusline-core/dist/src/json-equality.js.map +1 -0
  332. package/node_modules/@fbincon/statusline-core/dist/src/json-read.d.ts +9 -0
  333. package/node_modules/@fbincon/statusline-core/dist/src/json-read.js +137 -0
  334. package/node_modules/@fbincon/statusline-core/dist/src/json-read.js.map +1 -0
  335. package/node_modules/@fbincon/statusline-core/dist/src/json-text.d.ts +9 -0
  336. package/node_modules/@fbincon/statusline-core/dist/src/json-text.js +56 -0
  337. package/node_modules/@fbincon/statusline-core/dist/src/json-text.js.map +1 -0
  338. package/node_modules/@fbincon/statusline-core/dist/src/json.d.ts +18 -0
  339. package/node_modules/@fbincon/statusline-core/dist/src/json.js +165 -0
  340. package/node_modules/@fbincon/statusline-core/dist/src/json.js.map +1 -0
  341. package/node_modules/@fbincon/statusline-core/dist/src/numbers.d.ts +4 -0
  342. package/node_modules/@fbincon/statusline-core/dist/src/numbers.js +47 -0
  343. package/node_modules/@fbincon/statusline-core/dist/src/numbers.js.map +1 -0
  344. package/node_modules/@fbincon/statusline-core/dist/src/ordered-record.d.ts +21 -0
  345. package/node_modules/@fbincon/statusline-core/dist/src/ordered-record.js +105 -0
  346. package/node_modules/@fbincon/statusline-core/dist/src/ordered-record.js.map +1 -0
  347. package/node_modules/@fbincon/statusline-core/dist/src/release.d.ts +7 -0
  348. package/node_modules/@fbincon/statusline-core/dist/src/release.js +14 -0
  349. package/node_modules/@fbincon/statusline-core/dist/src/release.js.map +1 -0
  350. package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.d.ts +10 -0
  351. package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.js +73 -0
  352. package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.js.map +1 -0
  353. package/node_modules/@fbincon/statusline-core/dist/src/rendering/coercion.d.ts +2 -0
  354. package/node_modules/@fbincon/statusline-core/dist/src/rendering/coercion.js +50 -0
  355. package/node_modules/@fbincon/statusline-core/dist/src/rendering/coercion.js.map +1 -0
  356. package/node_modules/@fbincon/statusline-core/dist/src/rendering/colors.d.ts +3 -0
  357. package/node_modules/@fbincon/statusline-core/dist/src/rendering/colors.js +36 -0
  358. package/node_modules/@fbincon/statusline-core/dist/src/rendering/colors.js.map +1 -0
  359. package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.d.ts +10 -0
  360. package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.js +49 -0
  361. package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.js.map +1 -0
  362. package/node_modules/@fbincon/statusline-core/dist/src/rendering/context.d.ts +36 -0
  363. package/node_modules/@fbincon/statusline-core/dist/src/rendering/context.js +2 -0
  364. package/node_modules/@fbincon/statusline-core/dist/src/rendering/context.js.map +1 -0
  365. package/node_modules/@fbincon/statusline-core/dist/src/rendering/formatters.d.ts +10 -0
  366. package/node_modules/@fbincon/statusline-core/dist/src/rendering/formatters.js +58 -0
  367. package/node_modules/@fbincon/statusline-core/dist/src/rendering/formatters.js.map +1 -0
  368. package/node_modules/@fbincon/statusline-core/dist/src/rendering/git.d.ts +7 -0
  369. package/node_modules/@fbincon/statusline-core/dist/src/rendering/git.js +34 -0
  370. package/node_modules/@fbincon/statusline-core/dist/src/rendering/git.js.map +1 -0
  371. package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.d.ts +49 -0
  372. package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.js +399 -0
  373. package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.js.map +1 -0
  374. package/node_modules/@fbincon/statusline-core/dist/src/rendering/language.d.ts +13 -0
  375. package/node_modules/@fbincon/statusline-core/dist/src/rendering/language.js +36 -0
  376. package/node_modules/@fbincon/statusline-core/dist/src/rendering/language.js.map +1 -0
  377. package/node_modules/@fbincon/statusline-core/dist/src/rendering/layout.d.ts +19 -0
  378. package/node_modules/@fbincon/statusline-core/dist/src/rendering/layout.js +176 -0
  379. package/node_modules/@fbincon/statusline-core/dist/src/rendering/layout.js.map +1 -0
  380. package/node_modules/@fbincon/statusline-core/dist/src/rendering/live.d.ts +4 -0
  381. package/node_modules/@fbincon/statusline-core/dist/src/rendering/live.js +29 -0
  382. package/node_modules/@fbincon/statusline-core/dist/src/rendering/live.js.map +1 -0
  383. package/node_modules/@fbincon/statusline-core/dist/src/rendering/metrics.d.ts +13 -0
  384. package/node_modules/@fbincon/statusline-core/dist/src/rendering/metrics.js +93 -0
  385. package/node_modules/@fbincon/statusline-core/dist/src/rendering/metrics.js.map +1 -0
  386. package/node_modules/@fbincon/statusline-core/dist/src/rendering/numeric-format.d.ts +3 -0
  387. package/node_modules/@fbincon/statusline-core/dist/src/rendering/numeric-format.js +46 -0
  388. package/node_modules/@fbincon/statusline-core/dist/src/rendering/numeric-format.js.map +1 -0
  389. package/node_modules/@fbincon/statusline-core/dist/src/rendering/palette.d.ts +23 -0
  390. package/node_modules/@fbincon/statusline-core/dist/src/rendering/palette.js +9 -0
  391. package/node_modules/@fbincon/statusline-core/dist/src/rendering/palette.js.map +1 -0
  392. package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.d.ts +10 -0
  393. package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.js +76 -0
  394. package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.js.map +1 -0
  395. package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.d.ts +14 -0
  396. package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.js +98 -0
  397. package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.js.map +1 -0
  398. package/node_modules/@fbincon/statusline-core/dist/src/rendering/preview.d.ts +67 -0
  399. package/node_modules/@fbincon/statusline-core/dist/src/rendering/preview.js +36 -0
  400. package/node_modules/@fbincon/statusline-core/dist/src/rendering/preview.js.map +1 -0
  401. package/node_modules/@fbincon/statusline-core/dist/src/rendering/spans.d.ts +8 -0
  402. package/node_modules/@fbincon/statusline-core/dist/src/rendering/spans.js +14 -0
  403. package/node_modules/@fbincon/statusline-core/dist/src/rendering/spans.js.map +1 -0
  404. package/node_modules/@fbincon/statusline-core/dist/src/rendering/styles.d.ts +24 -0
  405. package/node_modules/@fbincon/statusline-core/dist/src/rendering/styles.js +116 -0
  406. package/node_modules/@fbincon/statusline-core/dist/src/rendering/styles.js.map +1 -0
  407. package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.d.ts +13 -0
  408. package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.js +305 -0
  409. package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.js.map +1 -0
  410. package/node_modules/@fbincon/statusline-core/dist/src/rendering/timer.d.ts +8 -0
  411. package/node_modules/@fbincon/statusline-core/dist/src/rendering/timer.js +33 -0
  412. package/node_modules/@fbincon/statusline-core/dist/src/rendering/timer.js.map +1 -0
  413. package/node_modules/@fbincon/statusline-core/dist/src/rendering/visibility.d.ts +4 -0
  414. package/node_modules/@fbincon/statusline-core/dist/src/rendering/visibility.js +52 -0
  415. package/node_modules/@fbincon/statusline-core/dist/src/rendering/visibility.js.map +1 -0
  416. package/node_modules/@fbincon/statusline-core/dist/src/runtime/git.d.ts +9 -0
  417. package/node_modules/@fbincon/statusline-core/dist/src/runtime/git.js +115 -0
  418. package/node_modules/@fbincon/statusline-core/dist/src/runtime/git.js.map +1 -0
  419. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/bindings.d.ts +4 -0
  420. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/bindings.js +104 -0
  421. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/bindings.js.map +1 -0
  422. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/model.d.ts +27 -0
  423. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/model.js +196 -0
  424. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/model.js.map +1 -0
  425. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/ownership.d.ts +6 -0
  426. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/ownership.js +45 -0
  427. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/ownership.js.map +1 -0
  428. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/reducer.d.ts +5 -0
  429. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/reducer.js +228 -0
  430. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/reducer.js.map +1 -0
  431. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/requests.d.ts +24 -0
  432. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/requests.js +145 -0
  433. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/requests.js.map +1 -0
  434. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/snapshot.d.ts +6 -0
  435. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/snapshot.js +70 -0
  436. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/snapshot.js.map +1 -0
  437. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/state.d.ts +36 -0
  438. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/state.js +110 -0
  439. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/state.js.map +1 -0
  440. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/agents.d.ts +8 -0
  441. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/agents.js +75 -0
  442. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/agents.js.map +1 -0
  443. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/hooks.d.ts +10 -0
  444. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/hooks.js +121 -0
  445. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/hooks.js.map +1 -0
  446. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/model.d.ts +43 -0
  447. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/model.js +198 -0
  448. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/model.js.map +1 -0
  449. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/native.d.ts +6 -0
  450. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/native.js +192 -0
  451. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/native.js.map +1 -0
  452. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/transitions.d.ts +16 -0
  453. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/transitions.js +245 -0
  454. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/transitions.js.map +1 -0
  455. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/view.d.ts +4 -0
  456. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/view.js +28 -0
  457. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/view.js.map +1 -0
  458. package/node_modules/@fbincon/statusline-core/dist/src/runtime/transcript.d.ts +26 -0
  459. package/node_modules/@fbincon/statusline-core/dist/src/runtime/transcript.js +183 -0
  460. package/node_modules/@fbincon/statusline-core/dist/src/runtime/transcript.js.map +1 -0
  461. package/node_modules/@fbincon/statusline-core/dist/src/runtime/usage.d.ts +64 -0
  462. package/node_modules/@fbincon/statusline-core/dist/src/runtime/usage.js +263 -0
  463. package/node_modules/@fbincon/statusline-core/dist/src/runtime/usage.js.map +1 -0
  464. package/node_modules/@fbincon/statusline-core/dist/src/runtime/values.d.ts +18 -0
  465. package/node_modules/@fbincon/statusline-core/dist/src/runtime/values.js +103 -0
  466. package/node_modules/@fbincon/statusline-core/dist/src/runtime/values.js.map +1 -0
  467. package/node_modules/@fbincon/statusline-core/dist/src/terminal/key.d.ts +7 -0
  468. package/node_modules/@fbincon/statusline-core/dist/src/terminal/key.js +2 -0
  469. package/node_modules/@fbincon/statusline-core/dist/src/terminal/key.js.map +1 -0
  470. package/node_modules/@fbincon/statusline-core/dist/src/terminal/spans.d.ts +6 -0
  471. package/node_modules/@fbincon/statusline-core/dist/src/terminal/spans.js +50 -0
  472. package/node_modules/@fbincon/statusline-core/dist/src/terminal/spans.js.map +1 -0
  473. package/node_modules/@fbincon/statusline-core/dist/src/timing/sample.d.ts +8 -0
  474. package/node_modules/@fbincon/statusline-core/dist/src/timing/sample.js +13 -0
  475. package/node_modules/@fbincon/statusline-core/dist/src/timing/sample.js.map +1 -0
  476. package/node_modules/@fbincon/statusline-core/dist/src/timing/timer.d.ts +22 -0
  477. package/node_modules/@fbincon/statusline-core/dist/src/timing/timer.js +75 -0
  478. package/node_modules/@fbincon/statusline-core/dist/src/timing/timer.js.map +1 -0
  479. package/node_modules/@fbincon/statusline-core/dist/src/unicode/generated-unicode.d.ts +12 -0
  480. package/node_modules/@fbincon/statusline-core/dist/src/unicode/generated-unicode.js +93 -0
  481. package/node_modules/@fbincon/statusline-core/dist/src/unicode/generated-unicode.js.map +1 -0
  482. package/node_modules/@fbincon/statusline-core/dist/src/unicode/index.d.ts +5 -0
  483. package/node_modules/@fbincon/statusline-core/dist/src/unicode/index.js +178 -0
  484. package/node_modules/@fbincon/statusline-core/dist/src/unicode/index.js.map +1 -0
  485. package/node_modules/@fbincon/statusline-core/package.json +8 -0
  486. package/node_modules/@fbincon/statusline-core/resources/i18n/languages.json +7 -0
  487. package/node_modules/@fbincon/statusline-core/resources/i18n/locales/en.json +1367 -0
  488. package/node_modules/@fbincon/statusline-core/resources/i18n/locales/ja.json +1367 -0
  489. package/node_modules/@fbincon/statusline-core/resources/i18n/locales/ko.json +1367 -0
  490. package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-CN.json +1367 -0
  491. package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-Hant.json +1367 -0
  492. package/node_modules/@fbincon/statusline-platform/dist/src/architecture.d.ts +15 -0
  493. package/node_modules/@fbincon/statusline-platform/dist/src/architecture.js +22 -0
  494. package/node_modules/@fbincon/statusline-platform/dist/src/architecture.js.map +1 -0
  495. package/node_modules/@fbincon/statusline-platform/dist/src/clocks.d.ts +4 -0
  496. package/node_modules/@fbincon/statusline-platform/dist/src/clocks.js +102 -0
  497. package/node_modules/@fbincon/statusline-platform/dist/src/clocks.js.map +1 -0
  498. package/node_modules/@fbincon/statusline-platform/dist/src/command.d.ts +16 -0
  499. package/node_modules/@fbincon/statusline-platform/dist/src/command.js +18 -0
  500. package/node_modules/@fbincon/statusline-platform/dist/src/command.js.map +1 -0
  501. package/node_modules/@fbincon/statusline-platform/dist/src/commands.d.ts +12 -0
  502. package/node_modules/@fbincon/statusline-platform/dist/src/commands.js +160 -0
  503. package/node_modules/@fbincon/statusline-platform/dist/src/commands.js.map +1 -0
  504. package/node_modules/@fbincon/statusline-platform/dist/src/errors.d.ts +1 -0
  505. package/node_modules/@fbincon/statusline-platform/dist/src/errors.js +19 -0
  506. package/node_modules/@fbincon/statusline-platform/dist/src/errors.js.map +1 -0
  507. package/node_modules/@fbincon/statusline-platform/dist/src/files.d.ts +8 -0
  508. package/node_modules/@fbincon/statusline-platform/dist/src/files.js +164 -0
  509. package/node_modules/@fbincon/statusline-platform/dist/src/files.js.map +1 -0
  510. package/node_modules/@fbincon/statusline-platform/dist/src/hash.d.ts +2 -0
  511. package/node_modules/@fbincon/statusline-platform/dist/src/hash.js +5 -0
  512. package/node_modules/@fbincon/statusline-platform/dist/src/hash.js.map +1 -0
  513. package/node_modules/@fbincon/statusline-platform/dist/src/input.d.ts +2 -0
  514. package/node_modules/@fbincon/statusline-platform/dist/src/input.js +14 -0
  515. package/node_modules/@fbincon/statusline-platform/dist/src/input.js.map +1 -0
  516. package/node_modules/@fbincon/statusline-platform/dist/src/launch.d.ts +12 -0
  517. package/node_modules/@fbincon/statusline-platform/dist/src/launch.js +21 -0
  518. package/node_modules/@fbincon/statusline-platform/dist/src/launch.js.map +1 -0
  519. package/node_modules/@fbincon/statusline-platform/dist/src/line-cursor.d.ts +2 -0
  520. package/node_modules/@fbincon/statusline-platform/dist/src/line-cursor.js +31 -0
  521. package/node_modules/@fbincon/statusline-platform/dist/src/line-cursor.js.map +1 -0
  522. package/node_modules/@fbincon/statusline-platform/dist/src/native.d.ts +15 -0
  523. package/node_modules/@fbincon/statusline-platform/dist/src/native.js +36 -0
  524. package/node_modules/@fbincon/statusline-platform/dist/src/native.js.map +1 -0
  525. package/node_modules/@fbincon/statusline-platform/dist/src/plugin-host.d.ts +17 -0
  526. package/node_modules/@fbincon/statusline-platform/dist/src/plugin-host.js +44 -0
  527. package/node_modules/@fbincon/statusline-platform/dist/src/plugin-host.js.map +1 -0
  528. package/node_modules/@fbincon/statusline-platform/dist/src/presentation.d.ts +4 -0
  529. package/node_modules/@fbincon/statusline-platform/dist/src/presentation.js +48 -0
  530. package/node_modules/@fbincon/statusline-platform/dist/src/presentation.js.map +1 -0
  531. package/node_modules/@fbincon/statusline-platform/dist/src/processes.d.ts +2 -0
  532. package/node_modules/@fbincon/statusline-platform/dist/src/processes.js +67 -0
  533. package/node_modules/@fbincon/statusline-platform/dist/src/processes.js.map +1 -0
  534. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/bridge.d.ts +42 -0
  535. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/bridge.js +180 -0
  536. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/bridge.js.map +1 -0
  537. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/input.d.ts +11 -0
  538. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/input.js +81 -0
  539. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/input.js.map +1 -0
  540. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.d.ts +32 -0
  541. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.js +157 -0
  542. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.js.map +1 -0
  543. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/session.d.ts +18 -0
  544. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/session.js +150 -0
  545. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/session.js.map +1 -0
  546. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/windows-modes.d.ts +6 -0
  547. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/windows-modes.js +39 -0
  548. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/windows-modes.js.map +1 -0
  549. package/node_modules/@fbincon/statusline-platform/dist/src/utf8.d.ts +5 -0
  550. package/node_modules/@fbincon/statusline-platform/dist/src/utf8.js +82 -0
  551. package/node_modules/@fbincon/statusline-platform/dist/src/utf8.js.map +1 -0
  552. package/node_modules/@fbincon/statusline-platform/package.json +8 -0
  553. package/node_modules/@fbincon/statusline-tui/dist/src/drawing.d.ts +16 -0
  554. package/node_modules/@fbincon/statusline-tui/dist/src/drawing.js +213 -0
  555. package/node_modules/@fbincon/statusline-tui/dist/src/drawing.js.map +1 -0
  556. package/node_modules/@fbincon/statusline-tui/dist/src/layout.d.ts +30 -0
  557. package/node_modules/@fbincon/statusline-tui/dist/src/layout.js +34 -0
  558. package/node_modules/@fbincon/statusline-tui/dist/src/layout.js.map +1 -0
  559. package/node_modules/@fbincon/statusline-tui/dist/src/session.d.ts +28 -0
  560. package/node_modules/@fbincon/statusline-tui/dist/src/session.js +126 -0
  561. package/node_modules/@fbincon/statusline-tui/dist/src/session.js.map +1 -0
  562. package/node_modules/@fbincon/statusline-tui/dist/src/state.d.ts +52 -0
  563. package/node_modules/@fbincon/statusline-tui/dist/src/state.js +352 -0
  564. package/node_modules/@fbincon/statusline-tui/dist/src/state.js.map +1 -0
  565. package/node_modules/@fbincon/statusline-tui/package.json +16 -0
  566. package/node_modules/@koromix/koffi-darwin-arm64/README.md +6 -0
  567. package/node_modules/@koromix/koffi-darwin-arm64/darwin_arm64/koffi.node +0 -0
  568. package/node_modules/@koromix/koffi-darwin-arm64/index.js +1 -0
  569. package/node_modules/@koromix/koffi-darwin-arm64/package.json +24 -0
  570. package/node_modules/@koromix/koffi-darwin-x64/README.md +6 -0
  571. package/node_modules/@koromix/koffi-darwin-x64/darwin_x64/koffi.node +0 -0
  572. package/node_modules/@koromix/koffi-darwin-x64/index.js +1 -0
  573. package/node_modules/@koromix/koffi-darwin-x64/package.json +24 -0
  574. package/node_modules/@koromix/koffi-linux-x64/README.md +6 -0
  575. package/node_modules/@koromix/koffi-linux-x64/index.js +198 -0
  576. package/node_modules/@koromix/koffi-linux-x64/linux_x64/koffi.node +0 -0
  577. package/node_modules/@koromix/koffi-linux-x64/musl_x64/koffi.node +0 -0
  578. package/node_modules/@koromix/koffi-linux-x64/package.json +24 -0
  579. package/node_modules/@koromix/koffi-win32-x64/README.md +6 -0
  580. package/node_modules/@koromix/koffi-win32-x64/index.js +1 -0
  581. package/node_modules/@koromix/koffi-win32-x64/package.json +24 -0
  582. package/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.lib +0 -0
  583. package/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.node +0 -0
  584. package/node_modules/koffi/LICENSE.txt +22 -0
  585. package/node_modules/koffi/README.md +46 -0
  586. package/node_modules/koffi/index.cjs +1 -0
  587. package/node_modules/koffi/index.d.ts +390 -0
  588. package/node_modules/koffi/index.js +2 -0
  589. package/node_modules/koffi/indirect.cjs +1 -0
  590. package/node_modules/koffi/indirect.js +2 -0
  591. package/node_modules/koffi/package.json +73 -0
  592. package/node_modules/koffi/src/koffi/index.cjs +327 -0
  593. package/node_modules/koffi/src/koffi/index.js +312 -0
  594. package/node_modules/koffi/src/koffi/indirect.cjs +326 -0
  595. package/node_modules/koffi/src/koffi/indirect.js +311 -0
  596. package/node_modules/koffi/src/koffi/src/static.cjs +170 -0
  597. package/node_modules/koffi/src/koffi/src/static.js +173 -0
  598. package/node_modules/lossless-json/LICENSE.md +9 -0
  599. package/node_modules/lossless-json/README.md +549 -0
  600. package/node_modules/lossless-json/lib/esm/LosslessNumber.js +92 -0
  601. package/node_modules/lossless-json/lib/esm/LosslessNumber.js.map +1 -0
  602. package/node_modules/lossless-json/lib/esm/config.js +9 -0
  603. package/node_modules/lossless-json/lib/esm/config.js.map +1 -0
  604. package/node_modules/lossless-json/lib/esm/index.js +9 -0
  605. package/node_modules/lossless-json/lib/esm/index.js.map +1 -0
  606. package/node_modules/lossless-json/lib/esm/numberParsers.js +9 -0
  607. package/node_modules/lossless-json/lib/esm/numberParsers.js.map +1 -0
  608. package/node_modules/lossless-json/lib/esm/package.json +3 -0
  609. package/node_modules/lossless-json/lib/esm/parse.js +346 -0
  610. package/node_modules/lossless-json/lib/esm/parse.js.map +1 -0
  611. package/node_modules/lossless-json/lib/esm/revive.js +57 -0
  612. package/node_modules/lossless-json/lib/esm/revive.js.map +1 -0
  613. package/node_modules/lossless-json/lib/esm/reviveDate.js +10 -0
  614. package/node_modules/lossless-json/lib/esm/reviveDate.js.map +1 -0
  615. package/node_modules/lossless-json/lib/esm/stringify.js +166 -0
  616. package/node_modules/lossless-json/lib/esm/stringify.js.map +1 -0
  617. package/node_modules/lossless-json/lib/esm/types.js +2 -0
  618. package/node_modules/lossless-json/lib/esm/types.js.map +1 -0
  619. package/node_modules/lossless-json/lib/esm/utils.js +236 -0
  620. package/node_modules/lossless-json/lib/esm/utils.js.map +1 -0
  621. package/node_modules/lossless-json/lib/types/LosslessNumber.d.ts +40 -0
  622. package/node_modules/lossless-json/lib/types/LosslessNumber.d.ts.map +1 -0
  623. package/node_modules/lossless-json/lib/types/config.d.ts +13 -0
  624. package/node_modules/lossless-json/lib/types/config.d.ts.map +1 -0
  625. package/node_modules/lossless-json/lib/types/index.d.ts +9 -0
  626. package/node_modules/lossless-json/lib/types/index.d.ts.map +1 -0
  627. package/node_modules/lossless-json/lib/types/numberParsers.d.ts +4 -0
  628. package/node_modules/lossless-json/lib/types/numberParsers.d.ts.map +1 -0
  629. package/node_modules/lossless-json/lib/types/parse.d.ts +33 -0
  630. package/node_modules/lossless-json/lib/types/parse.d.ts.map +1 -0
  631. package/node_modules/lossless-json/lib/types/revive.d.ts +13 -0
  632. package/node_modules/lossless-json/lib/types/revive.d.ts.map +1 -0
  633. package/node_modules/lossless-json/lib/types/reviveDate.d.ts +5 -0
  634. package/node_modules/lossless-json/lib/types/reviveDate.d.ts.map +1 -0
  635. package/node_modules/lossless-json/lib/types/stringify.d.ts +37 -0
  636. package/node_modules/lossless-json/lib/types/stringify.d.ts.map +1 -0
  637. package/node_modules/lossless-json/lib/types/types.d.ts +61 -0
  638. package/node_modules/lossless-json/lib/types/types.d.ts.map +1 -0
  639. package/node_modules/lossless-json/lib/types/utils.d.ts +79 -0
  640. package/node_modules/lossless-json/lib/types/utils.d.ts.map +1 -0
  641. package/node_modules/lossless-json/lib/umd/lossless-json.js +1 -0
  642. package/node_modules/lossless-json/lib/umd/lossless-json.js.map +1 -0
  643. package/node_modules/lossless-json/lib/umd/package.json +3 -0
  644. package/node_modules/lossless-json/package.json +89 -0
  645. package/package.json +57 -4
@@ -0,0 +1,109 @@
1
+ import * as fs from 'node:fs';
2
+ import { join, relative, isAbsolute, dirname, resolve } from 'node:path';
3
+ import { isLinkOrReparse } from '@fbincon/statusline-platform/files';
4
+ import { resolvedPath } from '@fbincon/statusline-platform/commands';
5
+ import { decode } from '@fbincon/statusline-core/json';
6
+ import { object } from '@fbincon/statusline-core/config/validation';
7
+ import { isSchema } from '@fbincon/statusline-core/config/display';
8
+ import { decodeUtf8 } from '../config/storage.js';
9
+ import { OWNER, OWNER_FILE } from './model.js';
10
+ import { digest } from './resources.js';
11
+ import { safeTarget } from './transaction.js';
12
+ export function ownedPath(root, name) {
13
+ if (!name || name.includes('\\') || name.split('/').some(part => !part || part === '.' || part === '..') || isAbsolute(name))
14
+ throw new Error('Unsafe owned resource path');
15
+ const target = join(root, name);
16
+ safeTarget(root, target);
17
+ return target;
18
+ }
19
+ export function owner(directory, spec, io, allowMissing = false) {
20
+ const root = join(directory, spec.name), path = join(root, OWNER_FILE);
21
+ safeTarget(directory, path);
22
+ const raw = io.read(path);
23
+ if (raw === null) {
24
+ if (fs.existsSync(root))
25
+ throw new Error('Unowned Mod directory: ' + root);
26
+ return null;
27
+ }
28
+ const value = decode(decodeUtf8(raw));
29
+ if (!object(value) || Object.keys(value).sort().join(',') !== 'backend_version,cache_inventories,files,mod_version,owner,protocol_version,schema_version,suspended' || value.owner !== OWNER || !isSchema(value.schema_version, 1) || typeof value.suspended !== 'boolean' || typeof value.backend_version !== 'string' || typeof value.mod_version !== 'string' || !Array.from({ length: 11 }, (_, i) => i + 1).some(n => isSchema(value.protocol_version, n)) || !Array.isArray(value.cache_inventories) || value.cache_inventories.length > 3)
30
+ throw new Error('Untrusted Mod ownership marker: ' + path);
31
+ function hashes(files) {
32
+ if (!object(files) || !Object.keys(files).length)
33
+ throw new Error('Invalid resource inventory');
34
+ for (const [name, hash] of Object.entries(files)) {
35
+ if (!(name === '.claude-plugin/marketplace.json' || name.startsWith(`plugins/${spec.name}/`)) || typeof hash !== 'string' || !/^[a-f0-9]{64}$/u.test(hash))
36
+ throw new Error('Invalid owned resource digest');
37
+ ownedPath(root, name);
38
+ }
39
+ }
40
+ hashes(value.files);
41
+ for (const snapshot of value.cache_inventories) {
42
+ if (!object(snapshot) || Object.keys(snapshot).sort().join(',') !== 'files,mod_version' || typeof snapshot.mod_version !== 'string')
43
+ throw new Error('Invalid cache snapshot');
44
+ hashes(snapshot.files);
45
+ if (!Object.hasOwn(snapshot.files, `plugins/${spec.name}/.claude-plugin/plugin.json`))
46
+ throw new Error('Incomplete cache snapshot');
47
+ }
48
+ for (const [name, hash] of Object.entries(value.files)) {
49
+ const content = io.read(ownedPath(root, name));
50
+ if (content === null && allowMissing)
51
+ continue;
52
+ if (content === null || digest(content) !== hash)
53
+ throw new Error('Owned Mod resource changed or missing: ' + name);
54
+ }
55
+ return { ...value, schema_version: 1, protocol_version: Number(String(value.protocol_version)) };
56
+ }
57
+ export function registered(directory, spec, markets, plugins, marker) {
58
+ const matches = markets.filter(row => row.name === spec.marketplace), rows = plugins.filter(row => row.id === spec.plugin);
59
+ if (matches.length && (matches.length !== 1 || matches[0].source !== 'directory' || typeof matches[0].path !== 'string' || resolvedPath(matches[0].path) !== resolvedPath(join(directory, spec.name)) || !marker))
60
+ throw new Error('Foreign marketplace: ' + spec.marketplace);
61
+ if (rows.length && (rows.length !== 1 || rows[0].scope !== 'user' || !marker))
62
+ throw new Error('Foreign or ambiguous plugin: ' + spec.plugin);
63
+ return [!!matches.length, rows[0] ?? null];
64
+ }
65
+ export function cacheOwned(directory, spec, row, marker, io, current = false) {
66
+ if (typeof row.installPath !== 'string')
67
+ throw new Error('Missing plugin installPath');
68
+ // Canonicalize the explicitly selected configuration prefix only. Resolving
69
+ // the entire cache path first would conceal links inside owned artifacts.
70
+ const configRoot = resolvedPath(directory);
71
+ let prefix = resolve(row.installPath);
72
+ while (resolvedPath(prefix) !== configRoot && prefix !== dirname(prefix))
73
+ prefix = dirname(prefix);
74
+ if (resolvedPath(prefix) !== configRoot)
75
+ throw new Error('Foreign Mod cache location');
76
+ const path = join(configRoot, relative(prefix, resolve(row.installPath))), root = join(configRoot, 'plugins/cache', spec.marketplace, spec.name), rel = relative(root, path);
77
+ if (!rel || rel.startsWith('..') || isAbsolute(rel))
78
+ throw new Error('Foreign Mod cache location');
79
+ safeTarget(configRoot, path);
80
+ for (const snapshot of [{ mod_version: marker.mod_version, files: marker.files }, ...(current ? [] : marker.cache_inventories)]) {
81
+ if (row.version !== snapshot.mod_version)
82
+ continue;
83
+ if (Object.entries(snapshot.files).every(([name, hash]) => {
84
+ const prefix = `plugins/${spec.name}/`;
85
+ if (!name.startsWith(prefix))
86
+ return true;
87
+ const raw = io.read(ownedPath(path, name.slice(prefix.length)));
88
+ return raw !== null && digest(raw) === hash;
89
+ }))
90
+ return path;
91
+ }
92
+ throw new Error('Installed Mod cache changed; restore or inspect before changing it: ' + path);
93
+ }
94
+ export function prune(root, paths) {
95
+ const parents = new Set();
96
+ for (const path of paths)
97
+ for (let parent = dirname(path); parent.startsWith(root) && parent !== dirname(root); parent = dirname(parent))
98
+ parents.add(parent);
99
+ for (const parent of [...parents].sort((a, b) => b.length - a.length)) {
100
+ try {
101
+ if (!isLinkOrReparse(parent)) {
102
+ safeTarget(dirname(root), parent);
103
+ fs.rmdirSync(parent);
104
+ }
105
+ }
106
+ catch { /* Unknown files survive. */ }
107
+ }
108
+ }
109
+ //# sourceMappingURL=mod-ownership.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod-ownership.js","sourceRoot":"","sources":["../../../src/integration/mod-ownership.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAgB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAgB,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAkB,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAU9C,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,IAAY;IAChD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,IAAI,CAAC,IAAI,UAAU,CAAC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E,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAChE,OAAO,GAAG,KAAK,IAAI,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;QAChD,CAAC,CAAC;YACE,OAAO,IAAI,CAAC;IACpB,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,sEAAsE,GAAG,IAAI,CAAC,CAAC;AACnG,CAAC;AACD,MAAM,UAAU,KAAK,CAAC,IAAY,EAAE,KAAe;IAC/C,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,KAAK,MAAM,IAAI,IAAI,KAAK;QACpB,KAAK,IAAI,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;YAC1G,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,KAAK,MAAM,MAAM,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACpE,IAAI,CAAC;YACD,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC3B,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;gBAClC,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACzB,CAAC;QACL,CAAC;QACD,MAAM,CAAC,CAAC,4BAA4B,CAAC,CAAC;IAC1C,CAAC;AACL,CAAC"}
@@ -0,0 +1,60 @@
1
+ import type { LaunchSpec } from '@fbincon/statusline-platform/launch';
2
+ import type { Storage } from '../config/storage.js';
3
+ import type { LocalizedText } from '@fbincon/statusline-core/i18n/messages';
4
+ export declare const OWNER = "claude-code-statusline";
5
+ export declare const OWNER_FILE = ".claude-statusline-owner.json";
6
+ export declare const HOOKS: readonly ["SessionStart", "UserPromptSubmit", "Stop", "StopFailure", "SessionEnd"];
7
+ export declare const SUBAGENT_HOOKS: readonly ["SubagentStart", "SubagentStop"];
8
+ export declare const SKILL = "statusline-config", EXTERNAL = "statusline-configure";
9
+ export { VERSION } from '@fbincon/statusline-core/release';
10
+ export interface ModSpec {
11
+ name: string;
12
+ marketplace: string;
13
+ minimum: readonly number[];
14
+ protocol: number;
15
+ plugin: string;
16
+ }
17
+ export declare const NATIVE: ModSpec;
18
+ export declare const RUNTIME: ModSpec;
19
+ export interface Host {
20
+ run(args: readonly string[], values?: Record<string, string>, json?: boolean): unknown;
21
+ listing(): [
22
+ Record<string, unknown>[],
23
+ Record<string, unknown>[]
24
+ ];
25
+ }
26
+ export interface InstallContext {
27
+ configDir: string;
28
+ launch: LaunchSpec;
29
+ version: readonly number[] | null;
30
+ io: Storage;
31
+ host: (spec: ModSpec) => Host;
32
+ }
33
+ export interface InstallOptions {
34
+ dryRun?: boolean;
35
+ force?: boolean;
36
+ external?: boolean;
37
+ native?: boolean;
38
+ liveMetrics?: boolean;
39
+ nativeTiming?: boolean;
40
+ }
41
+ export interface ModResult {
42
+ state: 'installed' | 'disabled' | 'plugin-disabled' | 'suspended' | 'blocked';
43
+ changed: boolean;
44
+ active: boolean;
45
+ messages: (string | LocalizedText)[];
46
+ }
47
+ export interface ChangeResult {
48
+ action: string;
49
+ changed: boolean;
50
+ settingsPath: string;
51
+ backupDir: string | null;
52
+ changedPaths: string[];
53
+ nativeState?: string;
54
+ messages: (string | LocalizedText)[];
55
+ failed: boolean;
56
+ }
57
+ export interface Diagnostic {
58
+ level: 'OK' | 'WARN' | 'ERROR';
59
+ message: string | LocalizedText;
60
+ }
@@ -0,0 +1,12 @@
1
+ export const OWNER = 'claude-code-statusline';
2
+ export const OWNER_FILE = '.claude-statusline-owner.json';
3
+ export const HOOKS = ['SessionStart', 'UserPromptSubmit', 'Stop', 'StopFailure', 'SessionEnd'];
4
+ export const SUBAGENT_HOOKS = ['SubagentStart', 'SubagentStop'];
5
+ export const SKILL = 'statusline-config', EXTERNAL = 'statusline-configure';
6
+ export { VERSION } from '@fbincon/statusline-core/release';
7
+ function spec(name, marketplace, minimum, protocol) {
8
+ return { name, marketplace, minimum, protocol, plugin: name + '@' + marketplace };
9
+ }
10
+ export const NATIVE = spec('statusline-native', 'claude-statusline-local', [2, 1, 287], 11);
11
+ export const RUNTIME = spec('statusline-runtime', 'claude-statusline-runtime-local', [2, 1, 289], 2);
12
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/integration/model.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,KAAK,GAAG,wBAAwB,CAAC;AAC9C,MAAM,CAAC,MAAM,UAAU,GAAG,+BAA+B,CAAC;AAC1D,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,cAAc,EAAE,kBAAkB,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,CAAU,CAAC;AACxG,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,eAAe,EAAE,cAAc,CAAU,CAAC;AACzE,MAAM,CAAC,MAAM,KAAK,GAAG,mBAAmB,EAAE,QAAQ,GAAG,sBAAsB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAQ3D,SAAS,IAAI,CAAC,IAAY,EAAE,WAAmB,EAAE,OAA0B,EAAE,QAAgB;IACzF,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,GAAG,GAAG,GAAG,WAAW,EAAE,CAAC;AACtF,CAAC;AACD,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,mBAAmB,EAAE,yBAAyB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;AAC5F,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAC,oBAAoB,EAAE,iCAAiC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type InstallContext, type ModSpec, type ModResult } from './model.js';
2
+ import { type Marker } from './mod-ownership.js';
3
+ export declare function commandPreflight(directory: string, spec: ModSpec): void;
4
+ export declare function stage(context: InstallContext, spec: ModSpec, previous: Marker | null): [
5
+ Marker,
6
+ boolean
7
+ ];
8
+ export declare function bindingValues(context: InstallContext, spec: ModSpec): Record<string, string>;
9
+ export declare function bindingMatches(options: unknown, values: Record<string, string>): boolean;
10
+ export declare function integrate(context: InstallContext, spec: ModSpec, requested: boolean, uninstall?: boolean): ModResult;
@@ -0,0 +1,234 @@
1
+ import * as fs from 'node:fs';
2
+ import { join } from 'node:path';
3
+ import { text } from '@fbincon/statusline-core/i18n/messages';
4
+ import { equalSettings } from '@fbincon/statusline-core/json-equality';
5
+ import { object } from '@fbincon/statusline-core/config/validation';
6
+ import { atLeast } from '../config/service.js';
7
+ import { jsonBytes, readSettings } from '../config/storage.js';
8
+ import { loadRuntime } from '../config/backend-preferences.js';
9
+ import { OWNER, OWNER_FILE } from './model.js';
10
+ import { bundledFiles, digest } from './resources.js';
11
+ import { owner, ownedPath, registered, cacheOwned, prune } from './mod-ownership.js';
12
+ import { commit } from './transaction.js';
13
+ import { BINDING_FILE, bindingRecord } from './ownership.js';
14
+ import { refreshIntents } from '../recovery/journal.js';
15
+ function rememberDisabled(context, spec, enabled) {
16
+ context.io.lock(context.configDir, () => {
17
+ const current = bindingRecord(context.configDir, context.io);
18
+ if (!current)
19
+ throw new Error('Plugin refresh requires an owned installation binding');
20
+ const intents = new Set((current.refresh_disabled ?? []));
21
+ if (intents.has(spec.name) === enabled)
22
+ return;
23
+ if (enabled)
24
+ intents.add(spec.name);
25
+ else
26
+ intents.delete(spec.name);
27
+ if (intents.size)
28
+ current.refresh_disabled = [...intents].sort();
29
+ else
30
+ delete current.refresh_disabled;
31
+ const path = join(context.configDir, BINDING_FILE);
32
+ commit(context.configDir, 'plugin-refresh-intent', [{ name: BINDING_FILE, path, raw: context.io.read(path), desired: jsonBytes(current) }], context.io);
33
+ });
34
+ }
35
+ export function commandPreflight(directory, spec) {
36
+ if (spec.name !== 'statusline-native')
37
+ return;
38
+ for (const path of [join(directory, 'commands/statusline-configure-native.md'), join(directory, 'skills/statusline-configure-native')]) {
39
+ try {
40
+ fs.lstatSync(path);
41
+ }
42
+ catch (error) {
43
+ if (error.code === 'ENOENT')
44
+ continue;
45
+ throw error;
46
+ }
47
+ throw new Error('Foreign command or skill; rename it before native migration: ' + path);
48
+ }
49
+ }
50
+ function recheck(context, spec, previous, allowMissing = false) {
51
+ if (!equalSettings(owner(context.configDir, spec, context.io, allowMissing), previous))
52
+ throw new Error('Mod ownership changed; rerun install');
53
+ }
54
+ export function stage(context, spec, previous) {
55
+ const { configDir, io } = context, root = join(configDir, spec.name), bundle = bundledFiles(spec);
56
+ const artifacts = new Map([...bundle.files].map(([name, raw]) => [`plugins/${spec.name}/${name}`, raw]));
57
+ artifacts.set('.claude-plugin/marketplace.json', jsonBytes({ name: spec.marketplace, owner: { name: 'fbincon' }, metadata: { description: 'Matching Mod bundled with claude-code-statusline' }, plugins: [{ name: spec.name, source: `./plugins/${spec.name}`, version: bundle.inventory.mod_version }] }));
58
+ const marker = { ...bundle.inventory, owner: OWNER, suspended: previous?.suspended ?? false, files: Object.fromEntries([...artifacts].map(([name, raw]) => [name, digest(raw)])), cache_inventories: [] };
59
+ for (const snapshot of previous ? [{ mod_version: previous.mod_version, files: previous.files }, ...previous.cache_inventories] : []) {
60
+ if (equalSettings(snapshot, { mod_version: marker.mod_version, files: marker.files }) || marker.cache_inventories.some(value => equalSettings(value, snapshot)))
61
+ continue;
62
+ marker.cache_inventories.push(snapshot);
63
+ }
64
+ marker.cache_inventories = marker.cache_inventories.slice(0, 3);
65
+ const obsolete = Object.keys(previous?.files ?? {}).filter(name => !artifacts.has(name));
66
+ for (const name of obsolete)
67
+ artifacts.set(name, null);
68
+ artifacts.set(OWNER_FILE, jsonBytes(marker));
69
+ return io.lock(configDir, () => {
70
+ if (!equalSettings(owner(configDir, spec, io, true), previous))
71
+ throw new Error('Mod ownership changed while staging');
72
+ const changes = [...artifacts].flatMap(([name, desired]) => {
73
+ const path = ownedPath(root, name), raw = io.read(path);
74
+ return raw?.equals(desired ?? Buffer.alloc(0)) && desired !== null || raw === null && desired === null ? [] : [{ name: spec.name + '/' + name, path, raw, desired }];
75
+ });
76
+ commit(configDir, 'mod-stage', changes, io);
77
+ prune(root, obsolete.map(name => ownedPath(root, name)));
78
+ return [marker, !!changes.length];
79
+ });
80
+ }
81
+ function suspended(context, spec, marker, enabled, changeSettings = false) {
82
+ const { configDir, io } = context;
83
+ return io.lock(configDir, () => {
84
+ recheck(context, spec, marker);
85
+ const [settings, raw] = readSettings(configDir, io), plugins = settings.enabledPlugins;
86
+ if (changeSettings && (!object(plugins) || plugins[spec.plugin] !== true))
87
+ return false;
88
+ const path = join(configDir, spec.name, OWNER_FILE), changes = [];
89
+ if (changeSettings) {
90
+ plugins[spec.plugin] = false;
91
+ changes.push({ name: 'settings.json', path: join(configDir, 'settings.json'), raw, desired: jsonBytes(settings) });
92
+ }
93
+ if (marker.suspended !== enabled)
94
+ changes.push({ name: spec.name + '/' + OWNER_FILE, path, raw: io.read(path), desired: jsonBytes({ ...marker, suspended: enabled }) });
95
+ commit(configDir, 'mod-suspend', changes, io);
96
+ return !!changes.length;
97
+ });
98
+ }
99
+ function removeResources(context, spec, marker) {
100
+ const { configDir, io } = context, root = join(configDir, spec.name);
101
+ io.lock(configDir, () => {
102
+ recheck(context, spec, marker, true);
103
+ const paths = [...Object.keys(marker.files), OWNER_FILE].map(name => ownedPath(root, name));
104
+ commit(configDir, 'mod-remove', paths.map(path => ({ name: spec.name + '/' + path.slice(root.length + 1).replaceAll('\\', '/'), path, raw: io.read(path), desired: null })), io);
105
+ prune(root, [...paths, ...marker.cache_inventories.flatMap(snapshot => Object.keys(snapshot.files).map(name => ownedPath(root, name)))]);
106
+ });
107
+ }
108
+ export function bindingValues(context, spec) {
109
+ const modes = spec.name === 'statusline-runtime' ? loadRuntime(context.configDir, context.io) : null;
110
+ return { backendExecutable: context.launch.executable, backendArgs: JSON.stringify(context.launch.args), configDir: context.configDir, backendVersion: bundledFiles(spec).inventory.backend_version, ...(modes ? { nativeTiming: String(modes.native_timing), liveMetrics: String(modes.live_metrics) } : {}) };
111
+ }
112
+ export function bindingMatches(options, values) {
113
+ return object(options) && object(options.inputs) && Object.entries(values).every(([key, value]) => options.inputs && options.inputs[key] === value);
114
+ }
115
+ export function integrate(context, spec, requested, uninstall = false) {
116
+ const { configDir, version, io } = context;
117
+ let changed = false;
118
+ const result = (state, message) => {
119
+ const key = state === 'installed' ? 'native_plugin_installed_enabled_on_disk_restart' : state === 'plugin-disabled' ? 'is_explicitly_disabled_owned_resources_and_backend' : state === 'suspended' ? 'native_editor_suspended_preference_retained' : message === 'disabled by preference' ? 'native_editor_is_disabled_enable_with_install' : 'owned_native_plugin_and_marketplace_removed_preference';
120
+ return { state, active: state === 'installed', changed, messages: [text((spec.name === 'statusline-runtime' ? 'runtime.' : '') + 'native.notice.' + key, { value0: state === 'plugin-disabled' ? spec.plugin : message })] };
121
+ };
122
+ try {
123
+ const marker = owner(configDir, spec, io, true);
124
+ if (!requested && !marker) {
125
+ if (refreshIntents(configDir).includes(spec.name)) {
126
+ rememberDisabled(context, spec, false);
127
+ changed = true;
128
+ }
129
+ return result('disabled', 'disabled by preference');
130
+ }
131
+ const restricted = readSettings(configDir, io)[0].disableAllHooks === true, compatible = atLeast(version, spec.minimum);
132
+ if (requested && !marker && (!compatible || restricted))
133
+ return result('suspended', 'preference retained; host unavailable or restricted');
134
+ if (requested && !compatible) {
135
+ changed = suspended(context, spec, marker, true, true);
136
+ return result('suspended', 'preference retained; requires Claude Code ' + spec.minimum.join('.') + '+');
137
+ }
138
+ const host = context.host(spec);
139
+ const [markets, plugins] = host.listing();
140
+ let [registration, row] = registered(configDir, spec, markets, plugins, marker);
141
+ if (row)
142
+ cacheOwned(configDir, spec, row, marker, io);
143
+ if (!requested || uninstall) {
144
+ if (row) {
145
+ host.run(['uninstall', spec.plugin, '--scope', 'user']);
146
+ changed = true;
147
+ if (host.listing()[1].some(value => value.id === spec.plugin))
148
+ throw new Error('Plugin removal could not be confirmed');
149
+ }
150
+ if (registration) {
151
+ host.run(['marketplace', 'remove', spec.marketplace, '--scope', 'user']);
152
+ changed = true;
153
+ if (host.listing()[0].some(value => value.name === spec.marketplace))
154
+ throw new Error('Marketplace removal could not be confirmed');
155
+ }
156
+ if (marker) {
157
+ removeResources(context, spec, marker);
158
+ changed = true;
159
+ }
160
+ if (refreshIntents(configDir).includes(spec.name))
161
+ rememberDisabled(context, spec, false);
162
+ return result('disabled', 'owned plugin and marketplace removed; preferences retained');
163
+ }
164
+ if (restricted) {
165
+ if (row?.enabled === true) {
166
+ host.run(['disable', spec.plugin, '--scope', 'user', '--json']);
167
+ changed = true;
168
+ if (host.listing()[1].some(value => value.id === spec.plugin && value.enabled))
169
+ throw new Error('Plugin suspension could not be confirmed');
170
+ suspended(context, spec, marker, true);
171
+ }
172
+ return result('suspended', 'disableAllHooks is enabled; preference retained');
173
+ }
174
+ const userDisabled = !!row && row.enabled !== true && !marker.suspended || refreshIntents(configDir).includes(spec.name);
175
+ commandPreflight(configDir, spec);
176
+ const [current, staged] = stage(context, spec, marker);
177
+ changed ||= staged;
178
+ const root = join(configDir, spec.name);
179
+ host.run(['validate', '--strict', root]);
180
+ host.run(['validate', '--strict', join(root, 'plugins', spec.name)]);
181
+ if (!registration) {
182
+ host.run(['marketplace', 'add', root]);
183
+ changed = true;
184
+ }
185
+ else if (staged)
186
+ host.run(['marketplace', 'update', spec.marketplace]);
187
+ const values = bindingValues(context, spec);
188
+ if (row && staged && row.version === current.mod_version) {
189
+ if (userDisabled)
190
+ rememberDisabled(context, spec, true);
191
+ host.run(['uninstall', spec.plugin, '--scope', 'user']);
192
+ changed = true;
193
+ row = null;
194
+ }
195
+ if (row) {
196
+ if (staged)
197
+ host.run(['update', spec.plugin, '--scope', 'user', '--json']);
198
+ const before = host.run(['configure', spec.plugin, '--json'], undefined, true);
199
+ if (!bindingMatches(before, values)) {
200
+ host.run(['configure', spec.plugin, '--values-stdin'], values);
201
+ changed = true;
202
+ }
203
+ if (marker.suspended) {
204
+ host.run(['enable', spec.plugin, '--scope', 'user', '--json']);
205
+ changed = true;
206
+ }
207
+ }
208
+ else {
209
+ host.run(['install', spec.plugin, '--scope', 'user', '--json', ...Object.entries(values).flatMap(([key, value]) => ['--config', key + '=' + value])]);
210
+ changed = true;
211
+ }
212
+ let [currentMarkets, currentPlugins] = host.listing();
213
+ let [, saved] = registered(configDir, spec, currentMarkets, currentPlugins, current);
214
+ if (userDisabled && saved?.enabled === true) {
215
+ host.run(['disable', spec.plugin, '--scope', 'user', '--json']);
216
+ changed = true;
217
+ [currentMarkets, currentPlugins] = host.listing();
218
+ [, saved] = registered(configDir, spec, currentMarkets, currentPlugins, current);
219
+ }
220
+ if (!saved || saved.enabled !== !userDisabled)
221
+ throw new Error('Mod enablement preference could not be confirmed');
222
+ cacheOwned(configDir, spec, saved, current, io, true);
223
+ if (!bindingMatches(host.run(['configure', spec.plugin, '--json'], undefined, true), values))
224
+ throw new Error('Mod backend binding could not be confirmed');
225
+ suspended(context, spec, current, false);
226
+ if (refreshIntents(configDir).includes(spec.name))
227
+ rememberDisabled(context, spec, false);
228
+ return result(userDisabled ? 'plugin-disabled' : 'installed', userDisabled ? 'explicitly disabled; resources and binding refreshed' : 'installed and enabled on disk; session loading remains unverified');
229
+ }
230
+ catch (error) {
231
+ return { state: 'blocked', active: false, changed, messages: [text('native.notice.compatibility_configuration_is_retained_run_doctor_before', { value0: String(error) })] };
232
+ }
233
+ }
234
+ //# sourceMappingURL=m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CAAC,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YACxF,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAClE,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QACzC,IAAI,cAAc,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,gBAAgB,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAC1F,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC,sDAAsD,CAAC,CAAC,CAAC,mEAAmE,CAAC,CAAC;IAC/M,CAAC;IACD,OAAO,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,yEAAyE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;IAChL,CAAC;AACL,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { LaunchSpec } from '@fbincon/statusline-platform/launch';
2
+ import { type Storage } from '../config/storage.js';
3
+ export declare const BINDING_FILE = "statusline_runtime/installation.json";
4
+ export declare function skillOwned(raw: Buffer | null): boolean;
5
+ export declare function bindingRecord(directory: string, io: Storage): Record<string, unknown> | null;
6
+ export declare function previousBinding(directory: string, io: Storage): LaunchSpec | null;
7
+ export declare function owns(command: unknown, operation: string, launch: LaunchSpec, previous?: LaunchSpec | null): boolean;
8
+ export declare function legacy(command: unknown, script: string): boolean;
@@ -0,0 +1,41 @@
1
+ import { basename, join } from 'node:path';
2
+ import { ownedCommand, splitCommand, normalizedPath } from '@fbincon/statusline-platform/commands';
3
+ import { readJson } from '@fbincon/statusline-core/json-read';
4
+ import { isSchema } from '@fbincon/statusline-core/config/display';
5
+ import { object } from '@fbincon/statusline-core/config/validation';
6
+ import { decodeUtf8 } from '../config/storage.js';
7
+ import { safeTarget } from './transaction.js';
8
+ import { OWNER } from './model.js';
9
+ export const BINDING_FILE = 'statusline_runtime/installation.json';
10
+ export function skillOwned(raw) {
11
+ try {
12
+ const value = readJson(decodeUtf8(raw));
13
+ return object(value) && Object.keys(value).length === 2 && value.owner === OWNER && isSchema(value.schema_version, 1);
14
+ }
15
+ catch {
16
+ return false;
17
+ }
18
+ }
19
+ export function bindingRecord(directory, io) {
20
+ const path = join(directory, BINDING_FILE);
21
+ safeTarget(directory, path);
22
+ const raw = io.read(path);
23
+ if (raw === null)
24
+ return null;
25
+ const value = readJson(decodeUtf8(raw), { duplicate(key) { throw new Error('Duplicate binding field: ' + key); } });
26
+ if (!object(value) || Object.keys(value).filter(key => key !== 'refresh_disabled').sort().join(',') !== 'backend_version,launch,owner,schema_version' || value.owner !== OWNER || !isSchema(value.schema_version, 1) || typeof value.backend_version !== 'string' || !object(value.launch) || Object.keys(value.launch).sort().join(',') !== 'args,executable' || typeof value.launch.executable !== 'string' || !Array.isArray(value.launch.args) || !value.launch.args.every(x => typeof x === 'string' && !x.includes('\0')) || Object.hasOwn(value, 'refresh_disabled') && (!Array.isArray(value.refresh_disabled) || value.refresh_disabled.some(name => !['statusline-native', 'statusline-runtime'].includes(String(name)))))
27
+ throw new Error('Untrusted installation binding');
28
+ return value;
29
+ }
30
+ export function previousBinding(directory, io) { return bindingRecord(directory, io)?.launch ?? null; }
31
+ export function owns(command, operation, launch, previous) {
32
+ if (ownedCommand(command, operation, launch) || previous && ownedCommand(command, operation, previous))
33
+ return true;
34
+ const argv = splitCommand(command);
35
+ return !!argv && argv.length === 2 && argv[1] === operation && /^(?:claude-statusline|claude-statusline\.exe)$/iu.test(basename(argv[0].replaceAll('\\', '/')));
36
+ }
37
+ export function legacy(command, script) {
38
+ const argv = splitCommand(command);
39
+ return !!argv && argv.length === 2 && /^python(?:[0-9.]+)?(?:\.exe)?$/iu.test(basename(argv[0].replaceAll('\\', '/'))) && normalizedPath(argv[1]) === normalizedPath(script);
40
+ }
41
+ //# sourceMappingURL=ownership.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ownership.js","sourceRoot":"","sources":["../../../src/integration/ownership.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAEnG,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAC;AACpE,OAAO,EAAE,UAAU,EAAgB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,MAAM,CAAC,MAAM,YAAY,GAAG,sCAAsC,CAAC;AACnE,MAAM,UAAU,UAAU,CAAC,GAAkB;IACzC,IAAI,CAAC;QACD,MAAM,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAI,CAAC,CAAC,CAAC;QACzC,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;IAC1H,CAAC;IACD,MAAM,CAAC;QACH,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC;AACD,MAAM,UAAU,aAAa,CAAC,SAAiB,EAAE,EAAW;IACxD,MAAM,IAAI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AAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,KAAK,cAAc,CAAC,MAAM,CAAC,CAAC;AACnL,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function safeTarget(directory: string, path: string): void;
@@ -0,0 +1,14 @@
1
+ import { isLinkOrReparse } from '@fbincon/statusline-platform/files';
2
+ import { dirname, relative, isAbsolute, resolve } from 'node:path';
3
+ export function safeTarget(directory, path) {
4
+ const rel = relative(directory, path);
5
+ if (!rel || rel.startsWith('..') || isAbsolute(rel) || path !== resolve(path))
6
+ throw new Error('Unsafe installation artifact');
7
+ for (let item = path; item !== dirname(directory); item = dirname(item)) {
8
+ if (isLinkOrReparse(item))
9
+ throw new Error('Installation artifact contains a symbolic link or reparse point: ' + item);
10
+ if (item === directory)
11
+ break;
12
+ }
13
+ }
14
+ //# sourceMappingURL=paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../src/integration/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnE,MAAM,UAAU,UAAU,CAAC,SAAiB,EAAE,IAAY;IACtD,MAAM,GAAG,GAAG,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC;QACzE,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IACpD,KAAK,IAAI,IAAI,GAAG,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,SAAS,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACtE,IAAI,eAAe,CAAC,IAAI,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,mEAAmE,GAAG,IAAI,CAAC,CAAC;QAChG,IAAI,IAAI,KAAK,SAAS;YAClB,MAAM;IACd,CAAC;AACL,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { LaunchSpec } from '@fbincon/statusline-platform/launch';
2
+ export interface PlanContext {
3
+ directory: string;
4
+ launch: LaunchSpec;
5
+ previous: LaunchSpec | null;
6
+ force: boolean;
7
+ fast: boolean;
8
+ external: boolean;
9
+ subagents: boolean;
10
+ rows: boolean;
11
+ }
12
+ export declare function cleanHooks(groups: unknown, context: PlanContext, operations?: string[], removeLegacy?: boolean): unknown[];
13
+ export declare function settingsPlan(settings: Record<string, unknown>, context: PlanContext, uninstall?: boolean): Record<string, unknown>;