@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,134 @@
1
+ import * as fs from 'node:fs';
2
+ import { basename, dirname, join } from 'node:path';
3
+ import { atomicWrite, durableUnlink, withLock, privateDirectory, syncDirectory } from '@fbincon/statusline-platform/files';
4
+ import { decodeUtf8 } from '@fbincon/statusline-platform/utf8';
5
+ import { errorDescription } from '@fbincon/statusline-platform/errors';
6
+ export { decodeUtf8 };
7
+ import { readJson } from '@fbincon/statusline-core/json-read';
8
+ import { pythonJson } from '@fbincon/statusline-core/json-text';
9
+ import { ConfigError, fail, object } from '@fbincon/statusline-core/config/validation';
10
+ import { CONFIG_FILENAME, defaultDisplay, validateDisplay } from '@fbincon/statusline-core/config/display';
11
+ export function jsonBytes(value) { return Buffer.from(pythonJson(value, { ensureAscii: false, indent: 2 }) + '\n'); }
12
+ export const errorDetail = errorDescription;
13
+ export { privateDirectory } from '@fbincon/statusline-platform/files';
14
+ export function timestamp(now) {
15
+ const pad = (n, size = 2) => String(n).padStart(size, '0');
16
+ const zone = -now.getTimezoneOffset();
17
+ return `${pad(now.getFullYear(), 4)}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}T${pad(now.getHours())}:${pad(now.getMinutes())}:${pad(now.getSeconds())}${now.getMilliseconds() ? '.' + pad(now.getMilliseconds(), 3) + '000' : ''}${zone < 0 ? '-' : '+'}${pad(Math.floor(Math.abs(zone) / 60))}:${pad(Math.abs(zone) % 60)}`;
18
+ }
19
+ export function createStorage(now = () => new Date()) {
20
+ return {
21
+ read(path) {
22
+ try {
23
+ return fs.readFileSync(path);
24
+ }
25
+ catch (e) {
26
+ if (e.code === 'ENOENT')
27
+ return null;
28
+ throw e;
29
+ }
30
+ },
31
+ write(path, raw) { atomicWrite(path, raw); },
32
+ remove: durableUnlink,
33
+ lock(directory, action) { const runtime = join(directory, 'statusline_runtime'); privateDirectory(runtime); return withLock(join(runtime, 'install.lock'), action); },
34
+ backup(directory, action, artifacts) {
35
+ try {
36
+ const root = join(directory, 'backups/statusline');
37
+ privateDirectory(root);
38
+ const stamp = timestamp(now()).slice(0, 19).replaceAll('-', '').replaceAll(':', '').replace('T', '-');
39
+ const base = join(root, `cli-${action}-${stamp}`);
40
+ let path = base, suffix = 1;
41
+ for (;;) {
42
+ try {
43
+ fs.mkdirSync(path, { mode: 0o700 });
44
+ break;
45
+ }
46
+ catch (e) {
47
+ if (e.code !== 'EEXIST')
48
+ throw e;
49
+ path = `${base}-${suffix++}`;
50
+ }
51
+ }
52
+ function snapshot(target, bytes) {
53
+ const fd = fs.openSync(target, 'wx', 0o600);
54
+ try {
55
+ fs.writeFileSync(fd, bytes);
56
+ fs.fsyncSync(fd);
57
+ }
58
+ finally {
59
+ fs.closeSync(fd);
60
+ }
61
+ for (let parent = dirname(target); parent.startsWith(directory) && parent !== dirname(directory); parent = dirname(parent))
62
+ syncDirectory(join(parent, 'snapshot'));
63
+ }
64
+ const recorded = artifacts.map(artifact => {
65
+ const state = artifact.raw === null ? 'absent' : 'before';
66
+ const target = join(path, `${artifact.name}.${state}`);
67
+ privateDirectory(dirname(target));
68
+ snapshot(target, artifact.raw ?? Buffer.alloc(0));
69
+ return { path: artifact.path, state };
70
+ });
71
+ const metadata = { action, created_at: timestamp(now()), artifacts: recorded };
72
+ const settings = artifacts.find(artifact => artifact.name === 'settings.json');
73
+ if (settings)
74
+ metadata.settings_path = settings.path;
75
+ snapshot(join(path, 'metadata.json'), jsonBytes(metadata));
76
+ return path;
77
+ }
78
+ catch (exc) {
79
+ return fail('errors.storage.cannot_back_up_statusline_configuration', { exc: errorDetail(exc) });
80
+ }
81
+ },
82
+ };
83
+ }
84
+ export function readDisplay(directory, io, tolerateInvalid = false) {
85
+ const path = join(directory, CONFIG_FILENAME);
86
+ let raw;
87
+ try {
88
+ raw = io.read(path);
89
+ }
90
+ catch (exc) {
91
+ return fail('errors.display.cannot_read', { path, exc: errorDetail(exc) });
92
+ }
93
+ if (raw === null)
94
+ return [defaultDisplay(), null];
95
+ try {
96
+ let data;
97
+ try {
98
+ data = readJson(decodeUtf8(raw), { duplicate(key) { throw new SyntaxError(`duplicate JSON field: ${key}`); } });
99
+ }
100
+ catch (exc) {
101
+ return fail('errors.display.invalid_json_in', { path, exc: errorDetail(exc) });
102
+ }
103
+ return [validateDisplay(data), raw];
104
+ }
105
+ catch (exc) {
106
+ if (tolerateInvalid && exc instanceof ConfigError)
107
+ return [defaultDisplay(), raw];
108
+ throw exc;
109
+ }
110
+ }
111
+ export function readSettings(directory, io) {
112
+ const settings_path = join(directory, 'settings.json');
113
+ let raw;
114
+ try {
115
+ raw = io.read(settings_path);
116
+ }
117
+ catch (exc) {
118
+ return fail('errors.storage.cannot_read', { settings_path, exc: errorDetail(exc) });
119
+ }
120
+ if (raw === null)
121
+ return [{}, null];
122
+ let data;
123
+ try {
124
+ data = readJson(decodeUtf8(raw));
125
+ }
126
+ catch (exc) {
127
+ return fail('errors.storage.invalid_json_in', { settings_path, exc: errorDetail(exc) });
128
+ }
129
+ if (!object(data))
130
+ fail('errors.storage.must_contain_a_json_object', { settings_path });
131
+ return [data, raw];
132
+ }
133
+ export function artifact(path, raw) { return { name: basename(path), path, raw }; }
134
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/config/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC3H,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAc3G,MAAM,UAAU,SAAS,CAAC,KAAc,IAAY,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AACtI,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,MAAM,UAAU,SAAS,CAAC,GAAS;IAC/B,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,IAAI,GAAG,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,C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,EAAE,aAAa,EAAE,CAAC,CAAC;IACzE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACvB,CAAC;AACD,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,GAAkB,IAAc,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Draft } from '@fbincon/statusline-core/contracts/ui';
2
+ export declare function importFile(path: string, current: Draft): Draft;
3
+ export declare function exportFile(path: string, draft: Draft, directory: string, overwrite?: boolean): string;
@@ -0,0 +1,89 @@
1
+ import * as fs from 'node:fs';
2
+ import { dirname, isAbsolute, join, relative, resolve } from 'node:path';
3
+ import { randomUUID } from 'node:crypto';
4
+ import { readJson } from '@fbincon/statusline-core/json-read';
5
+ import { validateDraft } from '@fbincon/statusline-core/config/draft';
6
+ import { isSchema } from '@fbincon/statusline-core/config/display';
7
+ import { FORMAT, VERSION, MAX_BYTES, exportText } from '@fbincon/statusline-core/config/transfer';
8
+ import { fail, object, ConfigError } from '@fbincon/statusline-core/config/validation';
9
+ import { expandUser, resolvedPath } from '@fbincon/statusline-platform/commands';
10
+ import { retryWindows, syncDirectory } from '@fbincon/statusline-platform/files';
11
+ import { decodeUtf8, errorDetail } from './storage.js';
12
+ export function importFile(path, current) {
13
+ const fd = fs.openSync(expandUser(path), 'r');
14
+ let raw;
15
+ try {
16
+ const buffer = Buffer.alloc(MAX_BYTES + 1);
17
+ let size = 0, count;
18
+ while (size < buffer.length && (count = fs.readSync(fd, buffer, size, buffer.length - size, null)) > 0)
19
+ size += count;
20
+ raw = buffer.subarray(0, size);
21
+ }
22
+ finally {
23
+ fs.closeSync(fd);
24
+ }
25
+ if (raw.length > MAX_BYTES)
26
+ fail('errors.transfer.import_is_larger_than_1_mib');
27
+ let data;
28
+ try {
29
+ data = readJson(decodeUtf8(raw), {
30
+ allowBom: true,
31
+ duplicate(value0) { return fail('errors.transfer.duplicate_transfer_field', { value0 }); },
32
+ constant(value0) { return fail('errors.transfer.non_finite_transfer_value', { value0 }); },
33
+ });
34
+ }
35
+ catch (exc) {
36
+ if (exc instanceof ConfigError)
37
+ throw exc;
38
+ return fail('errors.transfer.invalid_import_json', { exc: errorDetail(exc) });
39
+ }
40
+ if (object(data) && Object.hasOwn(data, 'schema_version'))
41
+ return validateDraft({ display: data, host: current.host });
42
+ if (!object(data) || Object.keys(data).length !== 3 || !['format', 'version', 'draft'].every(key => Object.hasOwn(data, key)))
43
+ fail('errors.transfer.import_requires_a_portable_envelope_or_a');
44
+ if (data.format !== FORMAT || !isSchema(data.version, VERSION))
45
+ fail('errors.transfer.unsupported_portable_configuration_format_version');
46
+ return validateDraft(data.draft);
47
+ }
48
+ export function exportFile(path, draft, directory, overwrite = false) {
49
+ const raw = Buffer.from(exportText(draft));
50
+ path = resolve(expandUser(path));
51
+ const target = resolvedPath(path), root = resolvedPath(directory);
52
+ const same = (left, right) => process.platform === 'win32' ? left.toLowerCase() === right.toLowerCase() : left === right;
53
+ const protectedFile = ['settings.json', 'claude-statusline.json', 'claude-statusline-features.json', 'claude-statusline-native.json', 'claude-statusline-runtime.json', 'statusline-ui.json'].some(name => same(target, join(root, name)));
54
+ const ownedDirectory = ['statusline-native', 'statusline-runtime', 'statusline_runtime'].some(name => {
55
+ const rel = relative(join(root, name), target);
56
+ return rel !== '' && rel !== '..' && !rel.startsWith('..' + (process.platform === 'win32' ? '\\' : '/')) && !isAbsolute(rel);
57
+ });
58
+ if (protectedFile || ownedDirectory)
59
+ fail('errors.transfer.export_cannot_replace_live_configuration_or_owned');
60
+ if (raw.length > MAX_BYTES)
61
+ fail('errors.transfer.export_is_larger_than_1_mib');
62
+ const temporary = join(dirname(path), `.statusline-export-${randomUUID()}`);
63
+ const fd = fs.openSync(temporary, 'wx', 0o600);
64
+ try {
65
+ try {
66
+ fs.writeFileSync(fd, raw);
67
+ fs.fsyncSync(fd);
68
+ }
69
+ finally {
70
+ fs.closeSync(fd);
71
+ }
72
+ if (overwrite)
73
+ retryWindows(() => fs.renameSync(temporary, path));
74
+ else
75
+ fs.linkSync(temporary, path);
76
+ syncDirectory(path);
77
+ }
78
+ finally {
79
+ try {
80
+ fs.unlinkSync(temporary);
81
+ }
82
+ catch (e) {
83
+ if (e.code !== 'ENOENT')
84
+ throw e;
85
+ }
86
+ }
87
+ return path;
88
+ }
89
+ //# sourceMappingURL=transfer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer.js","sourceRoot":"","sources":["../../../src/config/transfer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACvD,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,OAAc;IACnD,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;IAC9C,IAAI,GAAW,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,CAAC;QACD,IAAI,SAAS;YACT,YAAY,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;;YAEnD,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QACjC,aAAa,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;YACO,CAAC;QACL,IAAI,CAAC;YACD,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACP,IAAK,CAA2B,CAAC,IAAI,KAAK,QAAQ;gBAC9C,MAAM,CAAC,CAAC;QAChB,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { Sample } from '@fbincon/statusline-core/timing/sample';
2
+ import type { LaunchSpec } from '@fbincon/statusline-platform/launch';
3
+ /** All environment-sensitive application inputs are explicit at service boundaries. */
4
+ export interface Context {
5
+ configDir: string;
6
+ runtimeDir: string;
7
+ sessionsDir: string;
8
+ launch: LaunchSpec;
9
+ sample: () => Sample;
10
+ hostVersion: () => readonly number[] | null;
11
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { main } from './main.js';
2
+ process.exitCode = await main();
3
+ //# sourceMappingURL=entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry.js","sourceRoot":"","sources":["../../src/entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,CAAC,QAAQ,GAAG,MAAM,IAAI,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ConfigError } from '@fbincon/statusline-core/config/validation';
2
+ import { type LocalizedText } from '@fbincon/statusline-core/i18n/messages';
3
+ /** Localize nested domain errors only at an interface boundary. */
4
+ export declare function localizedError(error: ConfigError): LocalizedText;
@@ -0,0 +1,8 @@
1
+ import { ConfigError } from '@fbincon/statusline-core/config/validation';
2
+ import { text } from '@fbincon/statusline-core/i18n/messages';
3
+ /** Localize nested domain errors only at an interface boundary. */
4
+ export function localizedError(error) {
5
+ const params = Object.fromEntries(Object.entries(error.params).map(([key, value]) => [key, value instanceof ConfigError ? localizedError(value) : value]));
6
+ return text(error.key, params);
7
+ }
8
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,IAAI,EAAsB,MAAM,wCAAwC,CAAC;AAClF,mEAAmE;AACnE,MAAM,UAAU,cAAc,CAAC,KAAkB;IAC7C,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,YAAY,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3J,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AACnC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type Language } from '@fbincon/statusline-core/i18n/messages';
2
+ /** Human help is localized; command and option identifiers remain stable. */
3
+ export declare function helpText(command: string | undefined, language: Language): string;
@@ -0,0 +1,67 @@
1
+ import { t } from '@fbincon/statusline-core/i18n/messages';
2
+ const COMMANDS = {
3
+ recover: 'recover_installation',
4
+ install: 'configure_claude_code_to_use_this_status_line',
5
+ uninstall: 'remove_only_this_tool_s_claude_code_configuration',
6
+ doctor: 'diagnose_the_installation_without_changing_files',
7
+ configure: 'open_the_interactive_status_line_configuration_editor',
8
+ config: 'view_or_change_status_line_display_settings',
9
+ ui: 'serve_one_internal_json_configuration_request',
10
+ runtime: 'serve_one_independent_live_observation_json_request',
11
+ render: 'render_status_line_json_received_on_stdin',
12
+ 'render-subagents': 'render_subagent_status_line_tasks_as_ndjson',
13
+ hook: 'record_a_claude_lifecycle_hook_received_on_stdin',
14
+ 'slash-hook': 'handle_claude_statusline_slash_command_hooks',
15
+ };
16
+ const CONFIG = {
17
+ show: 'show_effective_configuration',
18
+ 'list-items': 'list_supported_display_items',
19
+ 'set-items': 'replace_enabled_items_and_their_order',
20
+ enable: 'append_display_items',
21
+ disable: 'remove_display_items',
22
+ order: 'reorder_all_enabled_items',
23
+ subagents: 'view_or_change_subagent_row_items',
24
+ set: 'set_one_display_or_host_option',
25
+ apply: 'atomically_apply_a_complete_guided_configuration',
26
+ preset: 'apply_an_editable_display_preset',
27
+ import: 'validate_and_import_portable_display_json',
28
+ export: 'export_portable_tool_configuration',
29
+ item: 'set_one_scoped_item_format_priority_width',
30
+ layout: 'select_auto_layout_or_explicit_comma_separated_rows',
31
+ instance: 'set_one_scoped_item_format_priority_width',
32
+ reset: 'restore_display_and_host_defaults',
33
+ language: 'language',
34
+ };
35
+ /** Human help is localized; command and option identifiers remain stable. */
36
+ export function helpText(command, language) {
37
+ const config = command === 'config';
38
+ const lines = [
39
+ t('cli.usage', language) + 'claude-statusline [--language LANGUAGE] ' + (config ? 'config [--config-dir PATH] COMMAND' : 'COMMAND'),
40
+ '', t('cli.description', language), '', t('cli.positionals', language) + ':',
41
+ ...Object.entries(config ? CONFIG : COMMANDS).map(([name, key]) => ' ' + name.padEnd(18) + t('cli.help.' + key, language)),
42
+ '', t('cli.options', language) + ':',
43
+ ' -h, --help ' + t('cli.help.help', language),
44
+ ' --language LANGUAGE ' + t('cli.help.language_override', language),
45
+ ];
46
+ if (config || ['ui', 'runtime', 'configure', 'install', 'uninstall', 'doctor', 'recover'].includes(command ?? ''))
47
+ lines.push(' --config-dir PATH ' + t('cli.help.claude_configuration_directory_default_claude_config_dir_or', language));
48
+ if (command === 'install' || command === 'uninstall' || command === 'recover')
49
+ lines.push(' --dry-run ' + t('cli.help.report_whether_settings_would_change', language));
50
+ if (command === 'install') {
51
+ const options = {
52
+ force: 'replace_conflicting_statusline_and_subagentstatusline_settings_or_unrelated',
53
+ 'experimental-slash-tui': 'enable_external_statusline_configure_stable_default_suspend_on',
54
+ 'no-experimental-slash-tui': 'persistently_disable_the_external_statusline_configure_entry',
55
+ 'native-editor': 'enable_the_in_session_client_tui_stable_default',
56
+ 'no-native-editor': 'persistently_disable_and_remove_owned_native_editor_integration',
57
+ 'live-metrics': 'enable_independent_runtime_collection_opt_in_claude_code',
58
+ 'no-live-metrics': 'persistently_disable_independent_runtime_collection',
59
+ 'native-timing': 'enable_native_task_timing_default_on_compatible_hosts',
60
+ 'no-native-timing': 'disable_native_timing_while_retaining_hook_transcript_timing',
61
+ };
62
+ for (const [flag, key] of Object.entries(options))
63
+ lines.push(' --' + flag.padEnd(25) + t('cli.help.' + key, language));
64
+ }
65
+ return lines.join('\n') + '\n';
66
+ }
67
+ //# sourceMappingURL=help.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAiB,MAAM,wCAAwC,CAAC;AAC1E,MAAM,QAAQ,GAAqC;IAC/C,OAAO,EAAE,sBAAsB;IAC/B,OAAO,EAAE,+CAA+C;IACxD,SAAS,EAAE,mDAAmD;IAC9D,MAAM,EAAE,kDAAkD;IAC1D,SAAS,EAAE,uDAAuD;IAClE,MAAM,EAAE,6CAA6C;IACrD,EAAE,EAAE,+CAA+C;IACnD,OAAO,EAAE,qDAAqD;IAC9D,MAAM,EAAE,2CAA2C;IACnD,kBAAkB,EAAE,6CAA6C;IACjE,I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C,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACnC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { InstallOptions } from './model.js';
2
+ export declare const FLAGS: {
3
+ readonly 'experimental-slash-tui': "external";
4
+ readonly 'native-editor': "native";
5
+ readonly 'live-metrics': "liveMetrics";
6
+ readonly 'native-timing': "nativeTiming";
7
+ };
8
+ export declare function parseAdministration(command: string, args: readonly string[]): InstallOptions & {
9
+ directory?: string;
10
+ };
@@ -0,0 +1,40 @@
1
+ import { ArgumentError, optionToken } from '../config/arguments.js';
2
+ export const FLAGS = {
3
+ 'experimental-slash-tui': 'external', 'native-editor': 'native', 'live-metrics': 'liveMetrics', 'native-timing': 'nativeTiming',
4
+ };
5
+ export function parseAdministration(command, args) {
6
+ const result = {}, seen = new Set();
7
+ for (let i = 0; i < args.length; i++) {
8
+ const arg = args[i];
9
+ if (arg === '--config-dir' || arg.startsWith('--config-dir=')) {
10
+ if (seen.has('directory'))
11
+ throw new ArgumentError('duplicate --config-dir');
12
+ seen.add('directory');
13
+ const value = arg.includes('=') ? arg.slice(13) : args[++i];
14
+ if (value === undefined || optionToken(value))
15
+ throw new ArgumentError('--config-dir requires a path');
16
+ result.directory = value;
17
+ continue;
18
+ }
19
+ if (arg === '--dry-run' && ['install', 'uninstall', 'recover'].includes(command)) {
20
+ result.dryRun = true;
21
+ continue;
22
+ }
23
+ if (arg === '--force' && command === 'install') {
24
+ result.force = true;
25
+ continue;
26
+ }
27
+ const disabled = arg.startsWith('--no-'), name = arg.slice(disabled ? 5 : 2);
28
+ if (command === 'install' && arg.startsWith('--') && Object.hasOwn(FLAGS, name)) {
29
+ const field = FLAGS[name];
30
+ if (seen.has(field))
31
+ throw new ArgumentError('not allowed with argument --' + name, 'cli.not_allowed', { argument: '--' + name });
32
+ seen.add(field);
33
+ result[field] = !disabled;
34
+ continue;
35
+ }
36
+ throw new ArgumentError('unrecognized arguments: ' + arg);
37
+ }
38
+ return result;
39
+ }
40
+ //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AAE,WAAW,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/E,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;YACrB,SAAS;QACb,CAAC;QACD,IAAI,GAAG,KAAK,SAAS,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC7C,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;YACpB,SAAS;QACb,CAAC;QACD,MAAM,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7E,IAAI,OAAO,KAAK,SAAS,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC;YAC9E,MAAM,KAAK,GAAG,KAAK,CAAC,IAA0B,CAAC,CAAC;YAChD,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;gBACf,MAAM,IAAI,aAAa,CAAC,8BAA8B,GAAG,IAAI,EAAE,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,GAAG,IAAI,EAAE,CAAC,CAAC;YACjH,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAChB,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC;YAC1B,SAAS;QACb,CAAC;QACD,MAAM,IAAI,aAAa,CAAC,0BAA0B,GAAG,GAAG,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Language } from '@fbincon/statusline-core/i18n/messages';
2
+ import { ConfigurationService } from '../config/service.js';
3
+ export declare function configure(service: ConfigurationService, language: Language, stdout: (value: string) => void, stderr: (value: string) => void, env?: NodeJS.ProcessEnv): Promise<number>;
@@ -0,0 +1,63 @@
1
+ import { Session, outcome } from '@fbincon/statusline-tui/session';
2
+ import { RESULT_ENV, REQUEST_ENV, NONCE_ENV, resultPath, requestGuard, deadline, writeResult, EditorRevoked } from '@fbincon/statusline-platform/terminal/bridge';
3
+ import { t } from '@fbincon/statusline-core/i18n/messages';
4
+ import { parseResponse, requestText } from '@fbincon/statusline-core/editor/backend';
5
+ import { pythonJson } from '@fbincon/statusline-core/json-text';
6
+ import { ConfigurationService } from '../config/service.js';
7
+ import { ConfigurationProtocol } from '../ui/protocol.js';
8
+ import { previewAdapter } from '../rendering/preview.js';
9
+ import { localizedError } from '../errors.js';
10
+ import { ConfigError } from '@fbincon/statusline-core/config/validation';
11
+ import { renderMessage } from '@fbincon/statusline-core/i18n/messages';
12
+ export async function configure(service, language, stdout, stderr, env = process.env) {
13
+ const configDir = service.context.configDir, rawResult = env[RESULT_ENV];
14
+ let path;
15
+ if (rawResult !== undefined) {
16
+ try {
17
+ path = resultPath(configDir, rawResult);
18
+ }
19
+ catch {
20
+ return 2;
21
+ }
22
+ }
23
+ let result = outcome('error', language, 2), guard = () => { };
24
+ try {
25
+ if (!process.stdin.isTTY || !process.stdout.isTTY)
26
+ throw new Error(t('cli.configure_requires_terminal', language));
27
+ if (env[REQUEST_ENV]) {
28
+ if (!path || env[REQUEST_ENV] !== path.replace(/result\.json$/u, 'request.json'))
29
+ throw new Error('Mismatched editor invocation');
30
+ guard = requestGuard(configDir, env[REQUEST_ENV], env[NONCE_ENV] ?? '', service.context.launch);
31
+ }
32
+ const stopAt = path ? deadline(env) : undefined;
33
+ // Check revocation after lock acquisition as well as between terminal events.
34
+ const io = service.io;
35
+ const guarded = new ConfigurationService(service.context, { ...io, lock(directory, action) { return io.lock(directory, () => { guard(); return action(); }); } });
36
+ const protocol = new ConfigurationProtocol(guarded, await previewAdapter());
37
+ const backend = { request(operation, payload = {}) {
38
+ const response = protocol.handle(requestText(operation, payload), error => { throw error; });
39
+ return parseResponse(operation, { exitCode: response.status, stdout: pythonJson(response.response), stderr: '' });
40
+ } };
41
+ const session = await Session.open(backend, language, guard);
42
+ result = await session.run({ deadline: stopAt });
43
+ }
44
+ catch (error) {
45
+ const message = error instanceof ConfigError ? renderMessage(localizedError(error), language) : error instanceof Error ? error.message : String(error);
46
+ result = error instanceof EditorRevoked ? outcome('interrupted', language, 130) : outcome('error', language, 2, message);
47
+ }
48
+ if (path) {
49
+ try {
50
+ guard();
51
+ writeResult(path, configDir, result);
52
+ }
53
+ catch (error) {
54
+ return error instanceof EditorRevoked ? result.exit_code : 2;
55
+ }
56
+ }
57
+ else if (result.outcome === 'error')
58
+ stderr(t('cli.error', language, { detail: result.message }) + '\n');
59
+ else if (['updated', 'already-current', 'cancelled'].includes(result.outcome))
60
+ stdout(result.message + '\n');
61
+ return result.exit_code;
62
+ }
63
+ //# sourceMappingURL=configure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configure.js","sourceRoot":"","sources":["../../../src/integration/configure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAgB,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAElK,OAAO,EAAE,CAAC,EAAE,MAAM,wCAAwC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4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Aa,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvJ,MAAM,GAAG,KAAK,YAAY,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;IAC7H,CAAC;IACD,IAAI,IAAI,EAAE,CAAC;QACP,IAAI,CAAC;YACD,KAAK,EAAE,CAAC;YACR,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,KAAK,EAAE,CAAC;YACX,OAAO,KAAK,YAAY,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QACjE,CAAC;IACL,CAAC;SACI,IAAI,MAAM,CAAC,OAAO,KAAK,OAAO;QAC/B,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;SACnE,IAAI,CAAC,SAAS,EAAE,iBAAiB,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;QACzE,MAAM,CAAC,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC,SAAS,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type InstallContext, type Diagnostic } from './model.js';
2
+ export declare function pathCollisions(context: InstallContext, environment?: NodeJS.ProcessEnv): Diagnostic[];
3
+ export declare function schemaDiagnostic(source: number, supported?: number): Diagnostic;
4
+ export declare function doctor(context: InstallContext): Diagnostic[];