@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 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../src/runtime/tasks/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAa,MAAM,cAAc,CAAC;AAClG,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,gBAAgB,GAAG,CAAC,EAAE,qBAAqB,GAAG,EAAE,EAAE,iBAAiB,GAAG,GAAG,CAAC;AACnG,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,wBAAwB,EAAE,iBAAi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AG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;IAC3D,MAAM,KAAK,GAAS,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IACrK,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC/G,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,MAAM;QACpE,KAAK,CAAC,gBAAgB,GAAG,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;IACpH,OAAO,KAAK,CAAC;AACjB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { Sample } from '../../timing/sample.js';
2
+ import type { LiveState } from '../live/state.js';
3
+ import { type TaskStore, type Turn } from './model.js';
4
+ export declare function nativeSample(wall: bigint, capture: () => Sample, record?: Turn | null, starting?: boolean): Sample;
5
+ export declare function linkTask(history: TaskStore, alias: string, target: string): void;
6
+ export declare function observeNative(history: TaskStore, state: LiveState, capture: () => Sample, completeTiming?: boolean): string | null;
@@ -0,0 +1,192 @@
1
+ import { StatusTimer } from '../../timing/timer.js';
2
+ import { int, numeric, own, object, truth, string, compareNumbers } from '../values.js';
3
+ import { roundedInteger } from '../transcript.js';
4
+ import { findTurn, rememberId } from './model.js';
5
+ import { applyPrompt, finishRecord } from './transitions.js';
6
+ import { startSubagent, stopSubagent } from './agents.js';
7
+ export function nativeSample(wall, capture, record = null, starting = false) {
8
+ const boot = record ? int(record.started_boot_ns) : null, started = record ? int(record.started_wall_ns) : null;
9
+ if (starting && record && boot !== null && started !== null) {
10
+ const offset = wall - started;
11
+ if (offset >= 0n && truth(record.boot_id))
12
+ return { wall_ns: wall, boot_ns: boot + offset, boot_id: record.boot_id };
13
+ }
14
+ const captured = capture(), delay = captured.wall_ns - wall;
15
+ return captured.boot_id && captured.boot_ns !== null && delay >= 0n && delay <= 2000000000n ? { wall_ns: wall, boot_ns: captured.boot_ns - delay, boot_id: captured.boot_id } : { wall_ns: wall, boot_ns: null, boot_id: null };
16
+ }
17
+ export function linkTask(history, alias, target) {
18
+ const original = findTurn(history, alias), message = findTurn(history, target);
19
+ if (original && message && original !== message) {
20
+ const earlier = int(message.started_wall_ns), previous = int(original.started_wall_ns);
21
+ if (original.status === 'running' && !original.historical_frozen && earlier !== null && previous !== null && earlier < previous) {
22
+ let boot = int(original.started_boot_ns), domain;
23
+ const offset = previous - earlier, messageBoot = int(message.started_boot_ns);
24
+ if (messageBoot !== null && truth(message.boot_id)) {
25
+ boot = messageBoot;
26
+ domain = message.boot_id;
27
+ }
28
+ else {
29
+ boot = boot !== null && offset >= 0n && offset <= boot ? boot - offset : null;
30
+ domain = boot !== null ? original.boot_id : null;
31
+ }
32
+ Object.assign(original, { started_wall_ns: earlier, started_boot_ns: boot, boot_id: domain, start_source: message.start_source, submission_verified: message.submission_verified });
33
+ }
34
+ for (const item of message.prompt_aliases)
35
+ rememberId(original, 'prompt_aliases', item);
36
+ history.turns.splice(history.turns.indexOf(message), 1);
37
+ }
38
+ const record = original ?? message;
39
+ if (record) {
40
+ for (const key of [alias, target])
41
+ if (key !== record.prompt_id)
42
+ rememberId(record, 'prompt_aliases', key);
43
+ if (history.current_prompt_id === alias || history.current_prompt_id === target)
44
+ history.current_prompt_id = record.prompt_id;
45
+ }
46
+ }
47
+ export function observeNative(history, state, capture, completeTiming = true) {
48
+ const epoch = state.epoch, ledger = own(state.epochs, epoch);
49
+ const contiguous = ledger !== undefined && numeric(ledger.floor) === -1 && ledger.seen.length === (numeric(ledger.high) ?? -2) + 1;
50
+ const pending = [];
51
+ const links = () => {
52
+ for (const [alias, target] of Object.entries(state.prompt_aliases))
53
+ if (typeof target === 'string')
54
+ linkTask(history, alias, target);
55
+ };
56
+ links();
57
+ for (const [prompt, info] of Object.entries(state.prompts)) {
58
+ if (info.epoch !== epoch || info.source === 'lifecycle_window')
59
+ continue;
60
+ const linked = Object.hasOwn(state.prompt_aliases, prompt) || Object.values(state.prompt_aliases).includes(prompt);
61
+ if (info.source === 'native' && history.turns.length && !linked)
62
+ continue;
63
+ if (!findTurn(history, prompt))
64
+ applyPrompt(history, prompt, roundedInteger(numeric(info.started_at_ms) * 1e6));
65
+ }
66
+ links();
67
+ const turns = Object.entries(state.turns).sort((a, b) => numeric(a[1].started_at_ms) - numeric(b[1].started_at_ms));
68
+ for (const [key, turn] of turns) {
69
+ if (turn.epoch !== epoch || turn.prompt_id === null)
70
+ continue;
71
+ const record = findTurn(history, turn.prompt_id);
72
+ if (!record || record.historical_frozen)
73
+ continue;
74
+ if (Object.values(record.native_turns).some(loop => loop.epoch !== epoch))
75
+ record.active_coverage = 'incomplete';
76
+ const previous = own(record.native_turns, key), started = roundedInteger(numeric(turn.started_at_ms) * 1e6), agent = turn.agent_id;
77
+ if (!previous && agent === null && record.status === 'completed' && record.end_source === 'native_turn_end' && started > (int(record.ended_wall_ns) || started) && record.report_aliases.length && history.current_prompt_id === record.prompt_id) {
78
+ Object.assign(record, { status: 'running', ended_wall_ns: null, ended_boot_ns: null, duration_ns: null, end_source: null, end_reason: null, phase: 'main' });
79
+ }
80
+ if (!previous || record.active_clock == null) {
81
+ const candidate = record.stop_candidate;
82
+ if (object(candidate) && started > int(candidate.wall_ns)) {
83
+ record.stop_candidate = null;
84
+ record.phase = 'main';
85
+ }
86
+ if (record.active_clock == null)
87
+ record.active_clock = StatusTimer.start(nativeSample(started, capture, record, true)).toDict();
88
+ else {
89
+ const timer = StatusTimer.load(record.active_clock);
90
+ if (timer)
91
+ record.active_clock = timer.reopen().toDict();
92
+ }
93
+ if (completeTiming && contiguous && record.active_coverage === 'not_observed')
94
+ record.active_coverage = 'complete';
95
+ if (truth(agent))
96
+ startSubagent(history, record.prompt_id, { agent_id: agent }, started);
97
+ }
98
+ Object.defineProperty(record.native_turns, key, { value: { ...turn, confirmed_end: previous !== undefined && truth(previous.confirmed_end) }, enumerable: true, configurable: true, writable: true });
99
+ if (!contiguous || truth(state.invalidated) && turn.ended_at_ms === null)
100
+ record.active_coverage = 'incomplete';
101
+ pending.push({ key, record, turn, previous, agent });
102
+ }
103
+ const starts = new Map();
104
+ const identity = (event) => JSON.stringify([event.epoch, event.agent_id, event.turn_id, event.request_id]);
105
+ for (const event of Object.values(state.wait_events))
106
+ if (event.kind === 'wait_start') {
107
+ const id = identity(event), sequence = numeric(event.seq);
108
+ starts.set(id, Math.min(starts.get(id) ?? sequence, sequence));
109
+ }
110
+ for (const observation of Object.values(state.wait_events).sort((a, b) => numeric(a.seq) - numeric(b.seq))) {
111
+ if (observation.epoch !== epoch || !observation.kind.startsWith('wait_'))
112
+ continue;
113
+ const key = epoch + ':' + (observation.agent_id || 'main') + ':' + string(observation.turn_id), turn = own(state.turns, key);
114
+ const record = turn && turn.prompt_id !== null ? findTurn(history, turn.prompt_id) : null;
115
+ if (!record)
116
+ continue;
117
+ const sequence = numeric(observation.seq);
118
+ if (observation.kind === 'wait_end' && (starts.get(identity(observation)) ?? sequence + 1) >= sequence)
119
+ record.active_coverage = 'incomplete';
120
+ if (!rememberId(record, 'native_wait_seen', epoch + ':' + sequence))
121
+ continue;
122
+ if (observation.kind === 'wait_unknown') {
123
+ record.active_coverage = 'wait_coverage_missing';
124
+ continue;
125
+ }
126
+ let timer = StatusTimer.load(record.active_clock);
127
+ if (!timer)
128
+ continue;
129
+ const token = key + ':' + observation.request_id, now = nativeSample(roundedInteger(numeric(observation.observed_at_ms) * 1e6), capture, record, true);
130
+ if (observation.kind === 'wait_start') {
131
+ if (truth(record.active_agents))
132
+ record.active_coverage = 'incomplete';
133
+ else
134
+ timer = timer.pause(token, now);
135
+ }
136
+ else
137
+ timer = timer.resume(token, now);
138
+ record.active_clock = timer.toDict();
139
+ }
140
+ for (const { key, record, turn, previous, agent } of pending) {
141
+ const pendingExit = record.end_source === 'hook_session_end';
142
+ const laterEnding = agent === null && record.end_source === 'native_turn_end' && turn.ended_at_ms !== null && truth(record.ended_wall_ns) && compareNumbers(numeric(turn.ended_at_ms) * 1e6, record.ended_wall_ns) > 0;
143
+ if (turn.ended_at_ms === null || previous?.confirmed_end === true && !pendingExit && !laterEnding)
144
+ continue;
145
+ record.native_turns[key].confirmed_end = true;
146
+ const ended = roundedInteger(numeric(turn.ended_at_ms) * 1e6);
147
+ if (truth(agent)) {
148
+ if (!completeTiming || !truth(turn.wait_coverage))
149
+ record.active_coverage = 'wait_coverage_missing';
150
+ stopSubagent(history, record.prompt_id, { agent_id: agent }, ended);
151
+ }
152
+ else {
153
+ if (Object.values(record.native_turns).some(loop => loop.agent_id === null && numeric(loop.started_at_ms) > numeric(turn.started_at_ms)))
154
+ continue;
155
+ if (laterEnding) {
156
+ Object.assign(record, { status: 'running', ended_wall_ns: null, ended_boot_ns: null, duration_ns: null, end_source: null, end_reason: null });
157
+ const timer = StatusTimer.load(record.active_clock);
158
+ if (timer)
159
+ record.active_clock = timer.reopen().toDict();
160
+ }
161
+ if (Object.hasOwn(turn, 'duration_ms'))
162
+ record.native_duration_ms = turn.duration_ms;
163
+ if (!completeTiming || !truth(turn.wait_coverage))
164
+ record.active_coverage = 'wait_coverage_missing';
165
+ else if (['not_observed', 'complete'].includes(String(record.active_coverage)))
166
+ record.active_coverage = contiguous ? 'complete' : 'incomplete';
167
+ const reports = record.report_aliases.length && record.pending_agent_reports.length;
168
+ const activeNative = Object.values(record.native_turns).some(loop => loop.agent_id !== null && numeric(loop.started_at_ms) <= numeric(turn.ended_at_ms) && (loop.ended_at_ms === null || numeric(loop.ended_at_ms) > numeric(turn.ended_at_ms)));
169
+ if (turn.status === 'completed' && (truth(record.active_agents) || reports || activeNative))
170
+ continue;
171
+ const candidate = record.stop_candidate;
172
+ let sample = nativeSample(ended, capture);
173
+ if (object(candidate)) {
174
+ const wall = int(candidate.wall_ns);
175
+ if (ended - wall >= 0n && ended - wall <= 2000000000n) {
176
+ const boot = int(candidate.boot_ns);
177
+ sample = { wall_ns: ended, boot_ns: boot === null ? null : boot + ended - wall, boot_id: typeof candidate.boot_id === 'string' ? candidate.boot_id : null };
178
+ }
179
+ }
180
+ const confirmed = finishRecord(record, turn.status, sample.wall_ns, sample.boot_ns, sample.boot_id, 'native_turn_end', 'native_main_end', null, ended);
181
+ if (confirmed || record.status === turn.status && record.status !== 'running') {
182
+ const timer = StatusTimer.load(record.active_clock);
183
+ if (timer)
184
+ record.active_clock = timer.finish(confirmed ? sample : { wall_ns: int(record.ended_wall_ns), boot_ns: int(record.ended_boot_ns), boot_id: typeof record.boot_id === 'string' ? record.boot_id : null }).toDict();
185
+ }
186
+ }
187
+ while (Object.keys(record.native_turns).length > 256)
188
+ delete record.native_turns[Object.keys(record.native_turns)[0]];
189
+ }
190
+ return history.current_prompt_id;
191
+ }
192
+ //# sourceMappingURL=native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.js","sourceRoot":"","sources":["../../../../src/runtime/tasks/native.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAa,MAAM,cAAc,CA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AAC,MAAM,GAAG,GAAG;YAChD,OAAO,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,OAAO,CAAC,iBAAiB,CAAC;AACrC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type Turn, type TaskStore } from './model.js';
2
+ export declare function priority(source: unknown): number;
3
+ export declare function finishRecord(record: Turn, status: string, wall: bigint, boot: bigint | null, domain: string | null, source: string, reason: string, error?: unknown, updated?: bigint): boolean;
4
+ export declare function agentWorkPending(record: Turn | null): boolean;
5
+ export declare function reopenLowPriority(record: Turn, wall: bigint): boolean;
6
+ export declare function applyPrompt(store: TaskStore, promptId: unknown, wallValue: unknown): Turn | null;
7
+ export declare function applyInterrupt(store: TaskStore, wallValue: unknown): Turn | null;
8
+ export declare function applyLocalCommand(store: TaskStore, promptId: unknown, wallValue: unknown): Turn | null;
9
+ export declare function applyAssistant(store: TaskStore, promptId: unknown, wallValue: unknown): Turn | null;
10
+ export declare function applyAgentNotification(store: TaskStore, promptValue: unknown, agentValue: unknown, wallValue: unknown): Turn | null;
11
+ export declare function applyDuration(store: TaskStore, promptId: unknown, wallValue: unknown, duration: unknown): Turn | null;
12
+ export declare function confirmCompletion(store: TaskStore, promptId: unknown, wall: bigint, source?: string, duration?: unknown, status?: string): string | null;
13
+ export declare function applyConfirmedStop(store: TaskStore, promptId: unknown, wallValue: unknown): Turn | null;
14
+ export declare function reconcileTranscript(store: TaskStore, observations: readonly unknown[]): string | null;
15
+ export declare function reconcileIdle(store: TaskStore, promptId: string, wall: bigint): string;
16
+ export declare function withdrawPrompt(store: TaskStore, promptId: string, wall: bigint): string;
@@ -0,0 +1,245 @@
1
+ import { int, truth, string, numeric, object, maxInt, compareInt } from '../values.js';
2
+ import { END_PRIORITY, TERMINAL_STATUSES, recordKey, elapsedNs, findTurn, newRecord, rememberId, pruneTurns } from './model.js';
3
+ export function priority(source) { return typeof source === 'string' && Object.hasOwn(END_PRIORITY, source) ? END_PRIORITY[source] : 0; }
4
+ export function finishRecord(record, status, wall, boot, domain, source, reason, error = null, updated = wall) {
5
+ if (record.historical_frozen)
6
+ return false;
7
+ if (TERMINAL_STATUSES.has(record.status)) {
8
+ const end = int(record.ended_wall_ns, false);
9
+ const reportedBeforeExit = source === 'native_turn_end' && record.end_source === 'hook_session_end' && end !== null && wall <= end;
10
+ if (priority(source) <= priority(record.end_source) && !reportedBeforeExit)
11
+ return false;
12
+ }
13
+ Object.assign(record, { status, ended_wall_ns: wall, ended_boot_ns: record.boot_id === domain ? boot : null, end_source: source, end_reason: reason, error,
14
+ duration_ns: elapsedNs(record, wall, boot, domain), duration_source: 'task', stop_candidate: null, updated_wall_ns: updated, phase: 'main', active_agents: {} });
15
+ return true;
16
+ }
17
+ export function agentWorkPending(record) {
18
+ return record?.status === 'running' && (record.had_subagents || truth(record.active_agents) || ['waiting_subagents', 'resuming_main'].includes(record.phase));
19
+ }
20
+ export function reopenLowPriority(record, wall) {
21
+ if (record.historical_frozen)
22
+ return false;
23
+ if (record.status === 'running')
24
+ return true;
25
+ if (!['transcript_duration', 'registry_idle', 'hook_stop'].includes(String(record.end_source)))
26
+ return false;
27
+ Object.assign(record, { status: 'running', ended_wall_ns: null, ended_boot_ns: null, duration_ns: null, duration_source: null, end_source: null, end_reason: null, error: null, updated_wall_ns: wall });
28
+ return true;
29
+ }
30
+ export function applyPrompt(store, promptId, wallValue) {
31
+ const wall = int(wallValue, false);
32
+ if (!truth(promptId) || wall === null)
33
+ return null;
34
+ const prompt = string(promptId), previous = findTurn(store, store.current_prompt_id);
35
+ let record = findTurn(store, prompt);
36
+ if (!record) {
37
+ record = newRecord(prompt, { wall_ns: wall, boot_ns: null, boot_id: null }, 'transcript');
38
+ store.turns.push(record);
39
+ }
40
+ else {
41
+ const start = int(record.started_wall_ns, false);
42
+ if (record.status === 'running' && (start === null || wall < start))
43
+ Object.assign(record, { started_wall_ns: wall, started_boot_ns: null, boot_id: null, start_source: 'transcript' });
44
+ if (record.status === 'running')
45
+ record.submission_verified = true;
46
+ if (!TERMINAL_STATUSES.has(record.status))
47
+ record.status = 'running';
48
+ if (record.status === 'running')
49
+ record.updated_wall_ns = maxInt([recordKey(record), wall]);
50
+ }
51
+ const previousStart = previous ? int(previous.started_wall_ns, false) : null;
52
+ if (previous && previous !== record && previous.status === 'running' && previousStart !== null && previousStart <= wall)
53
+ finishRecord(previous, 'unknown', wall, null, null, 'next_prompt', 'superseded_without_terminal_event');
54
+ const start = int(record.started_wall_ns, false);
55
+ if (!previous || previous === record || previousStart === null || start !== null && start >= previousStart)
56
+ store.current_prompt_id = record.prompt_id;
57
+ return record;
58
+ }
59
+ export function applyInterrupt(store, wallValue) {
60
+ const wall = int(wallValue, false);
61
+ if (wall === null)
62
+ return null;
63
+ const candidates = store.turns.filter(record => {
64
+ const start = int(record.started_wall_ns, false), end = int(record.ended_wall_ns, false);
65
+ return (record.status === 'running' || ['next_prompt', 'registry_idle', 'transcript_duration'].includes(String(record.end_source)) && end !== null && wall <= end) && start !== null && start <= wall;
66
+ });
67
+ if (!candidates.length)
68
+ return null;
69
+ const record = candidates.reduce((best, item) => (int(item.started_wall_ns, false) ?? 0n) > (int(best.started_wall_ns, false) ?? 0n) ? item : best);
70
+ finishRecord(record, 'interrupted', wall, null, null, 'transcript_interrupt', 'user_interrupt');
71
+ return record;
72
+ }
73
+ export function applyLocalCommand(store, promptId, wallValue) {
74
+ const wall = int(wallValue, false);
75
+ if (!truth(promptId) || wall === null)
76
+ return null;
77
+ let record = findTurn(store, promptId);
78
+ if (!record) {
79
+ record = newRecord(promptId, { wall_ns: wall, boot_ns: null, boot_id: null }, 'local_command');
80
+ store.turns.push(record);
81
+ }
82
+ finishRecord(record, 'ignored', wall, null, null, 'local_command', 'local_command');
83
+ if (store.current_prompt_id === string(promptId)) {
84
+ const running = store.turns.filter(item => item.status === 'running' && item.prompt_id !== string(promptId));
85
+ store.current_prompt_id = running.length ? running.reduce((best, item) => recordKey(item) > recordKey(best) ? item : best).prompt_id : null;
86
+ }
87
+ return record;
88
+ }
89
+ export function applyAssistant(store, promptId, wallValue) {
90
+ const record = findTurn(store, promptId), wall = int(wallValue, false);
91
+ if (!truth(promptId) || !record || wall === null || record.status !== 'running' || wall < (int(record.started_wall_ns, false) ?? 0n))
92
+ return null;
93
+ const candidate = record.stop_candidate;
94
+ if (object(candidate) && wall > (int(candidate.wall_ns) ?? wall)) {
95
+ record.stop_candidate = null;
96
+ record.phase = 'main';
97
+ }
98
+ const old = int(record.last_assistant_wall_ns, false);
99
+ if (old === null || wall > old) {
100
+ record.last_assistant_wall_ns = wall;
101
+ record.updated_wall_ns = maxInt([recordKey(record), wall]);
102
+ }
103
+ if (record.phase === 'resuming_main' && !truth(record.active_agents))
104
+ record.phase = 'main';
105
+ return record;
106
+ }
107
+ export function applyAgentNotification(store, promptValue, agentValue, wallValue) {
108
+ const wall = int(wallValue, false);
109
+ if (!truth(agentValue) || wall === null)
110
+ return null;
111
+ const owners = store.turns.filter(item => item.agent_ids.includes(agentValue));
112
+ if (owners.length !== 1)
113
+ return null;
114
+ const record = owners[0], prompt = truth(promptValue) ? string(promptValue) : null, agent = string(agentValue);
115
+ if (prompt && record.report_aliases.includes(prompt))
116
+ return record;
117
+ const pending = record.pending_agent_reports.includes(agent);
118
+ if (prompt) {
119
+ rememberId(record, 'prompt_aliases', prompt);
120
+ rememberId(record, 'report_aliases', prompt);
121
+ }
122
+ if (pending)
123
+ record.pending_agent_reports.splice(record.pending_agent_reports.indexOf(agent), 1);
124
+ if (pending && !record.historical_frozen && record.status === 'completed' && ['hook_stop', 'native_turn_end'].includes(String(record.end_source)) && store.current_prompt_id === record.prompt_id) {
125
+ Object.assign(record, { status: 'running', ended_wall_ns: null, ended_boot_ns: null, duration_ns: null, duration_source: null, end_source: null, end_reason: null, error: null, phase: 'resuming_main' });
126
+ }
127
+ if (pending && record.status === 'running') {
128
+ record.stop_candidate = null;
129
+ record.phase = 'resuming_main';
130
+ }
131
+ if (record.status === 'running')
132
+ record.updated_wall_ns = maxInt([recordKey(record), wall]);
133
+ return record;
134
+ }
135
+ export function applyDuration(store, promptId, wallValue, duration) {
136
+ const wall = int(wallValue), ms = numeric(duration);
137
+ if (!truth(promptId) || wall === null || ms === null || !Number.isFinite(ms) || ms < 0 || ms > 1e15)
138
+ return null;
139
+ const record = findTurn(store, promptId);
140
+ if (!record || wall < (int(record.started_wall_ns, false) ?? 0n))
141
+ return null;
142
+ if (['failed', 'interrupted', 'ignored', 'withdrawn'].includes(record.status))
143
+ return record;
144
+ if (record.native_duration_ms == null)
145
+ record.native_duration_ms = duration;
146
+ const assistant = int(record.last_assistant_wall_ns, false), ready = object(record.stop_candidate) || !record.had_subagents && assistant !== null && assistant >= (int(record.started_wall_ns, false) ?? 0n);
147
+ if (ready && !truth(record.active_agents) && !(record.report_aliases.length && record.pending_agent_reports.length))
148
+ finishRecord(record, 'completed', wall, null, null, 'transcript_duration', 'turn_duration');
149
+ return record;
150
+ }
151
+ export function confirmCompletion(store, promptId, wall, source = 'native_turn_end', duration = null, status = 'completed') {
152
+ const record = findTurn(store, promptId);
153
+ if (!record)
154
+ return store.current_prompt_id;
155
+ if (status === 'completed' && (truth(record.active_agents) || record.report_aliases.length && record.pending_agent_reports.length))
156
+ return store.current_prompt_id;
157
+ const candidate = record.stop_candidate;
158
+ let end = wall, boot = null, domain = null;
159
+ if (object(candidate)) {
160
+ const stamp = int(candidate.wall_ns);
161
+ if (stamp !== null && wall - stamp >= 0n && wall - stamp <= 2000000000n) {
162
+ end = stamp;
163
+ boot = int(candidate.boot_ns);
164
+ domain = typeof candidate.boot_id === 'string' ? candidate.boot_id : null;
165
+ }
166
+ }
167
+ if (duration !== null)
168
+ record.native_duration_ms = duration;
169
+ finishRecord(record, status, end, boot, domain, source, 'confirmed_main_end', null, wall);
170
+ return store.current_prompt_id;
171
+ }
172
+ export function applyConfirmedStop(store, promptId, wallValue) {
173
+ const record = truth(promptId) ? findTurn(store, promptId) : null, wall = int(wallValue);
174
+ if (!record || wall === null)
175
+ return null;
176
+ if (truth(record.active_agents) || record.report_aliases.length && record.pending_agent_reports.length)
177
+ return record;
178
+ const candidate = record.stop_candidate, proof = truth(candidate) || record.end_source === 'session_exit_pending' || truth(record.last_assistant_wall_ns);
179
+ if (!proof || wall < (int(record.started_wall_ns, false) ?? 0n))
180
+ return record;
181
+ let boot = null, domain = null;
182
+ if (object(candidate)) {
183
+ const started = int(candidate.boot_ns), at = int(candidate.wall_ns);
184
+ if (started !== null && at !== null) {
185
+ boot = started + wall - at;
186
+ domain = typeof candidate.boot_id === 'string' ? candidate.boot_id : null;
187
+ }
188
+ }
189
+ finishRecord(record, 'completed', wall, boot, domain, 'transcript_stop', 'successful_stop_hooks');
190
+ return record;
191
+ }
192
+ export function reconcileTranscript(store, observations) {
193
+ const indexed = observations.map((event, index) => ({ event, index })).sort((a, b) => compareInt(object(a.event) ? int(a.event.wall_ns, false) ?? 0n : 0n, object(b.event) ? int(b.event.wall_ns, false) ?? 0n : 0n) || a.index - b.index);
194
+ let observed = null;
195
+ for (const { event } of indexed) {
196
+ if (!object(event))
197
+ continue;
198
+ let target = truth(event.prompt_id) ? event.prompt_id : observed;
199
+ if (target === null && !Object.hasOwn(event, 'prompt_id') && store.turns.length === 1)
200
+ target = store.turns[0].prompt_id;
201
+ if (event.kind === 'prompt') {
202
+ const record = applyPrompt(store, event.prompt_id, event.wall_ns);
203
+ if (record)
204
+ observed = record.prompt_id;
205
+ }
206
+ else if (event.kind === 'interrupt')
207
+ applyInterrupt(store, event.wall_ns);
208
+ else if (event.kind === 'local_command')
209
+ applyLocalCommand(store, event.prompt_id, event.wall_ns);
210
+ else if (event.kind === 'agent_notification') {
211
+ const record = applyAgentNotification(store, event.prompt_id, event.agent_id, event.wall_ns);
212
+ if (record)
213
+ observed = record.prompt_id;
214
+ }
215
+ else if (event.kind === 'assistant')
216
+ applyAssistant(store, target, event.wall_ns);
217
+ else if (event.kind === 'confirmed_stop')
218
+ applyConfirmedStop(store, target, event.wall_ns);
219
+ else if (event.kind === 'turn_duration')
220
+ applyDuration(store, target, event.wall_ns, event.duration_ms);
221
+ }
222
+ pruneTurns(store);
223
+ return store.current_prompt_id ?? observed;
224
+ }
225
+ export function reconcileIdle(store, promptId, wall) {
226
+ const record = findTurn(store, promptId);
227
+ if (!record || record.status !== 'running')
228
+ return promptId;
229
+ const confirmed = object(record.stop_candidate) && !truth(record.active_agents) && !(record.report_aliases.length && record.pending_agent_reports.length);
230
+ if (agentWorkPending(record) && !confirmed)
231
+ return promptId;
232
+ const start = int(record.started_wall_ns, false);
233
+ if (start !== null && wall < start)
234
+ return promptId;
235
+ const assistant = int(record.last_assistant_wall_ns, false), completed = assistant !== null && (start === null || assistant >= start);
236
+ finishRecord(record, completed ? 'completed' : 'withdrawn', wall, null, null, completed ? 'registry_idle' : 'registry_withdrawn', completed ? 'idle_after_assistant' : 'pre_response_cancel');
237
+ return promptId;
238
+ }
239
+ export function withdrawPrompt(store, promptId, wall) {
240
+ const record = findTurn(store, promptId);
241
+ if (record?.status === 'running' && !agentWorkPending(record))
242
+ finishRecord(record, 'withdrawn', wall, null, null, 'registry_withdrawn', 'pre_response_cancel');
243
+ return promptId;
244
+ }
245
+ //# sourceMappingURL=transitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transitions.js","sourceRoot":"","sources":["../../../../src/runtime/tasks/transitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAa,MAAM,cAAc,CAAC;AAClG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAA6B,MAAM,YAAY,CAAC;AAC3J,MAAM,UAAU,QAAQ,CAAC,MAAe,IAAY,OAAO,OAAO,MAA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AAC,CAAC,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC;IAC9L,OAAO,QAAQ,CAAC;AACpB,CAAC;AACD,MAAM,UAAU,cAAc,CAAC,KAAgB,EAAE,QAAgB,EAAE,IAAY;IAC3E,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACzC,IAAI,MAAM,EAAE,MAAM,KAAK,SAAS,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;QACzD,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,oBAAoB,EAAE,qBAAqB,CAAC,CAAC;IACrG,OAAO,QAAQ,CAAC;AACpB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Sample } from '../../timing/sample.js';
2
+ import { type Data } from '../values.js';
3
+ import type { Turn } from './model.js';
4
+ export declare function activePoint(record: Turn | null, enabled: boolean, fresh: boolean, capture: () => Sample): Data;
@@ -0,0 +1,28 @@
1
+ import { StatusTimer } from '../../timing/timer.js';
2
+ import { float } from '../transcript.js';
3
+ import { int, truth } from '../values.js';
4
+ export function activePoint(record, enabled, fresh, capture) {
5
+ const result = { value: null, reason: 'not_observed', source: 'native_task_timing', partial: false, observed_at_ms: null };
6
+ if (!enabled)
7
+ return { ...result, reason: 'native_timing_disabled' };
8
+ if (!record)
9
+ return result;
10
+ if (record.historical_frozen)
11
+ return { ...result, reason: 'incomplete' };
12
+ const reason = truth(record.active_coverage) ? record.active_coverage : 'not_observed';
13
+ if (reason !== 'complete')
14
+ return { ...result, reason };
15
+ if (record.status === 'running' && !fresh)
16
+ return { ...result, reason: 'stale' };
17
+ const timer = StatusTimer.load(record.active_clock);
18
+ if (!timer || record.status !== 'running' && (timer.frozen_ns === null || timer.waits.length))
19
+ return { ...result, reason: 'incomplete' };
20
+ if (timer.degraded || timer.last_resume.boot_id === null || timer.last_resume.boot_ns === null)
21
+ return { ...result, reason: 'abnormal_clock' };
22
+ const now = capture();
23
+ if (timer.frozen_ns === null && !timer.trustedSample(now))
24
+ return { ...result, reason: 'abnormal_clock' };
25
+ const value = timer.elapsed(now);
26
+ return { ...result, value: value === null ? null : float(Number(value) / 1e9), reason: value === null ? 'abnormal_clock' : null, observed_at_ms: float(Number(int(record.updated_wall_ns) ?? 0n) / 1e6) };
27
+ }
28
+ //# sourceMappingURL=view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../src/runtime/tasks/view.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,KAAK,EAAa,MAAM,cAAc,CAAC;AAErD,MAAM,UAAU,WAAW,CAAC,MAAmB,EAAE,OAAgB,EAAE,KAAc,EAAE,OAAqB;IACpG,MAAM,MAAM,GAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;IACjI,IAAI,CAAC,OAAO;QACR,OAAO,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,wBAAwB,EAAE,CAAC;IAC3D,IAAI,CAAC,MAAM;QACP,OAAO,MAAM,CAAC;IAClB,IAAI,MAAM,CAAC,iBAAiB;QACxB,OAAO,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;IAC/C,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,cAA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Ac,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC;AAC9M,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { LosslessNumber } from '../json.js';
2
+ import { type Data } from './values.js';
3
+ export declare function trim(value: string): string;
4
+ export declare function float(value: number): LosslessNumber;
5
+ export declare function roundedInteger(value: number): bigint;
6
+ /** ISO transcript seconds use the same binary64 precision as datetime.timestamp. */
7
+ export declare function timestamp(value: unknown): number | null;
8
+ export declare function localCommand(content: unknown): boolean;
9
+ export declare function realPrompt(record: Data, content: unknown): boolean;
10
+ export interface TurnEvents {
11
+ prompt: Data | null;
12
+ interrupt: Data | null;
13
+ local_command: Data | null;
14
+ assistant_activity: number | null;
15
+ observations: Data[];
16
+ }
17
+ /** Retains compact lifecycle observations, never the parsed transcript rows. */
18
+ export declare class TurnAccumulator {
19
+ private promptContext;
20
+ readonly result: TurnEvents;
21
+ constructor(promptContext?: unknown);
22
+ push(row: unknown): void;
23
+ }
24
+ export declare function turnEvents(lines: readonly unknown[], promptContext?: unknown): TurnEvents;
25
+ export declare function updateTurnMetadata(entry: Data, lines: readonly unknown[], resetContext?: boolean): Data[];
26
+ export declare function applyTurnMetadata(entry: Data, result: TurnEvents): Data[];