omp-fabric 1.26.14 → 1.27.0

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 (206) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +0 -27
  3. package/dist/agents/handoff.d.ts +2 -3
  4. package/dist/agents/handoff.d.ts.map +1 -1
  5. package/dist/agents/manager.d.ts.map +1 -1
  6. package/dist/agents/types.d.ts +0 -7
  7. package/dist/agents/types.d.ts.map +1 -1
  8. package/dist/chunks/{chunk-5EZWERJY.js → chunk-2BOZMRT5.js} +25 -8
  9. package/dist/chunks/{chunk-5EZWERJY.js.map → chunk-2BOZMRT5.js.map} +3 -3
  10. package/dist/chunks/{chunk-TF3MK3TH.js → chunk-4PQDZ3AY.js} +13 -13
  11. package/dist/chunks/{chunk-5U6HKMJV.js → chunk-4XLJPEI4.js} +3 -5
  12. package/dist/chunks/{chunk-5U6HKMJV.js.map → chunk-4XLJPEI4.js.map} +1 -1
  13. package/dist/chunks/{chunk-O5SZML2M.js → chunk-5MH37C4Y.js} +14 -7
  14. package/dist/chunks/chunk-5MH37C4Y.js.map +7 -0
  15. package/dist/chunks/{chunk-YWEXP724.js → chunk-7OZDA7YP.js} +5 -5
  16. package/dist/chunks/{chunk-673LUJCK.js → chunk-7QKSPNXQ.js} +7 -7
  17. package/dist/chunks/{chunk-PTYCFQEH.js → chunk-ABFK2RPI.js} +2 -2
  18. package/dist/chunks/{chunk-S3URDR4K.js → chunk-ANHZ3SWB.js} +8 -9
  19. package/dist/chunks/chunk-ANHZ3SWB.js.map +7 -0
  20. package/dist/chunks/{chunk-YLMDFMXM.js → chunk-BQ2U44IL.js} +2 -2
  21. package/dist/chunks/{chunk-RGE6MBYP.js → chunk-CNCRWY4Q.js} +27 -69
  22. package/dist/chunks/chunk-CNCRWY4Q.js.map +7 -0
  23. package/dist/chunks/{chunk-HWOL2YVU.js → chunk-CT23CX67.js} +48 -7
  24. package/dist/chunks/chunk-CT23CX67.js.map +7 -0
  25. package/dist/chunks/{chunk-3QPIB3H2.js → chunk-EV36BIIO.js} +8 -690
  26. package/dist/chunks/chunk-EV36BIIO.js.map +7 -0
  27. package/dist/chunks/{chunk-CA2P7NLW.js → chunk-FA7TNLOV.js} +2 -88
  28. package/dist/chunks/chunk-FA7TNLOV.js.map +7 -0
  29. package/dist/chunks/{chunk-BV3EDWSX.js → chunk-FVGI5PSL.js} +4 -1
  30. package/dist/chunks/chunk-FVGI5PSL.js.map +7 -0
  31. package/dist/chunks/{chunk-6IPXBDCA.js → chunk-FWFET65L.js} +211 -4
  32. package/dist/chunks/chunk-FWFET65L.js.map +7 -0
  33. package/dist/chunks/{chunk-ESPCTYVX.js → chunk-IPI4UOTC.js} +352 -1
  34. package/dist/chunks/chunk-IPI4UOTC.js.map +7 -0
  35. package/dist/chunks/{chunk-HCUDF34P.js → chunk-K7IN6FTM.js} +17 -17
  36. package/dist/chunks/chunk-K7IN6FTM.js.map +7 -0
  37. package/dist/commands/fabric.d.ts.map +1 -1
  38. package/dist/compaction/branch-details.d.ts +3 -9
  39. package/dist/compaction/branch-details.d.ts.map +1 -1
  40. package/dist/compaction/instructions.d.ts +4 -29
  41. package/dist/compaction/instructions.d.ts.map +1 -1
  42. package/dist/compaction/trace-events.d.ts +1 -1
  43. package/dist/compaction/trace-events.d.ts.map +1 -1
  44. package/dist/config-migrations.d.ts +1 -1
  45. package/dist/config-migrations.d.ts.map +1 -1
  46. package/dist/config.d.ts +0 -18
  47. package/dist/config.d.ts.map +1 -1
  48. package/dist/core/action-registry.d.ts.map +1 -1
  49. package/dist/core/action-registry.js +3 -3
  50. package/dist/core/action-repair.d.ts +1 -0
  51. package/dist/core/action-repair.d.ts.map +1 -1
  52. package/dist/core/compact-controller.d.ts +0 -7
  53. package/dist/core/compact-controller.d.ts.map +1 -1
  54. package/dist/entropy/index.js +6 -7
  55. package/dist/execution-service.d.ts.map +1 -1
  56. package/dist/fabric-runtime-state.d.ts +0 -64
  57. package/dist/fabric-runtime-state.d.ts.map +1 -1
  58. package/dist/fabric-runtime-state.js +260 -141
  59. package/dist/fabric-runtime-state.js.map +4 -4
  60. package/dist/fabric-state.d.ts +0 -3
  61. package/dist/fabric-state.d.ts.map +1 -1
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +131 -247
  64. package/dist/index.js.map +3 -3
  65. package/dist/memory/discovery.js +2 -3
  66. package/dist/memory/normalize.js +1 -2
  67. package/dist/memory/search.js +2 -3
  68. package/dist/providers/agents-actions.d.ts.map +1 -1
  69. package/dist/providers/agents-provider.d.ts.map +1 -1
  70. package/dist/providers/compact-provider.d.ts.map +1 -1
  71. package/dist/providers/image-provider.d.ts +1 -0
  72. package/dist/providers/image-provider.d.ts.map +1 -1
  73. package/dist/providers/memory-provider.d.ts +0 -11
  74. package/dist/providers/memory-provider.d.ts.map +1 -1
  75. package/dist/providers/memory-provider.js +4 -7
  76. package/dist/residency/host.js +6 -14
  77. package/dist/residency/omp-entry.js +6 -14
  78. package/dist/residency/omp-entry.js.map +1 -1
  79. package/dist/runtime/core-override-guest-types.js +1 -1
  80. package/dist/runtime/guest-types.d.ts +1 -1
  81. package/dist/runtime/guest-types.d.ts.map +1 -1
  82. package/dist/runtime/guest-types.js +1 -1
  83. package/dist/runtime/node-process-runtime.js +8 -8
  84. package/dist/runtime/quickjs-runtime.d.ts +1 -1
  85. package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
  86. package/dist/runtime/quickjs-runtime.js +2 -2
  87. package/dist/runtime/type-checker.js +1 -1
  88. package/dist/type-error-guidance.d.ts.map +1 -1
  89. package/dist/ui/controller.d.ts +0 -1
  90. package/dist/ui/controller.d.ts.map +1 -1
  91. package/dist/ui/conversation.js +5 -5
  92. package/dist/ui/dashboard.d.ts.map +1 -1
  93. package/dist/ui/dashboard.js +13 -18
  94. package/dist/ui/dashboard.js.map +2 -2
  95. package/dist/ui/settings.d.ts.map +1 -1
  96. package/dist/ui/settings.js +9 -203
  97. package/dist/ui/settings.js.map +2 -2
  98. package/docs/agents.md +1 -3
  99. package/docs/audit-trace.md +3 -3
  100. package/docs/configuration.md +14 -6
  101. package/docs/entropy.md +1 -2
  102. package/docs/image.md +24 -3
  103. package/docs/interface.md +0 -35
  104. package/docs/memory-recall.md +6 -11
  105. package/docs/programmatic-compaction.md +14 -32
  106. package/package.json +8 -11
  107. package/dist/chunks/chunk-3J7BKUNG.js +0 -354
  108. package/dist/chunks/chunk-3J7BKUNG.js.map +0 -7
  109. package/dist/chunks/chunk-3QPIB3H2.js.map +0 -7
  110. package/dist/chunks/chunk-6IPXBDCA.js.map +0 -7
  111. package/dist/chunks/chunk-BV3EDWSX.js.map +0 -7
  112. package/dist/chunks/chunk-CA2P7NLW.js.map +0 -7
  113. package/dist/chunks/chunk-ESPCTYVX.js.map +0 -7
  114. package/dist/chunks/chunk-G3VKU6GZ.js +0 -1681
  115. package/dist/chunks/chunk-G3VKU6GZ.js.map +0 -7
  116. package/dist/chunks/chunk-HCUDF34P.js.map +0 -7
  117. package/dist/chunks/chunk-HWOL2YVU.js.map +0 -7
  118. package/dist/chunks/chunk-JL3KVPFJ.js +0 -291
  119. package/dist/chunks/chunk-JL3KVPFJ.js.map +0 -7
  120. package/dist/chunks/chunk-O5SZML2M.js.map +0 -7
  121. package/dist/chunks/chunk-QD2B5FUE.js +0 -15
  122. package/dist/chunks/chunk-QD2B5FUE.js.map +0 -7
  123. package/dist/chunks/chunk-QSRTEINF.js +0 -469
  124. package/dist/chunks/chunk-QSRTEINF.js.map +0 -7
  125. package/dist/chunks/chunk-QZJB7QTM.js +0 -248
  126. package/dist/chunks/chunk-QZJB7QTM.js.map +0 -7
  127. package/dist/chunks/chunk-RGE6MBYP.js.map +0 -7
  128. package/dist/chunks/chunk-S3URDR4K.js.map +0 -7
  129. package/dist/chunks/chunk-SMNOQLKU.js +0 -53
  130. package/dist/chunks/chunk-SMNOQLKU.js.map +0 -7
  131. package/dist/chunks/chunk-TQQPXV3I.js +0 -58
  132. package/dist/chunks/chunk-TQQPXV3I.js.map +0 -7
  133. package/dist/chunks/chunk-UAP6IQIR.js +0 -76
  134. package/dist/chunks/chunk-UAP6IQIR.js.map +0 -7
  135. package/dist/chunks/chunk-VE3FWDRH.js +0 -221
  136. package/dist/chunks/chunk-VE3FWDRH.js.map +0 -7
  137. package/dist/chunks/chunk-ZHDN5ESL.js +0 -130
  138. package/dist/chunks/chunk-ZHDN5ESL.js.map +0 -7
  139. package/dist/compaction/bounds.d.ts +0 -25
  140. package/dist/compaction/bounds.d.ts.map +0 -1
  141. package/dist/compaction/branch-summary.d.ts +0 -9
  142. package/dist/compaction/branch-summary.d.ts.map +0 -1
  143. package/dist/compaction/enrichers.d.ts +0 -10
  144. package/dist/compaction/enrichers.d.ts.map +0 -1
  145. package/dist/compaction/hook.d.ts +0 -117
  146. package/dist/compaction/hook.d.ts.map +0 -1
  147. package/dist/compaction/hook.js +0 -21
  148. package/dist/compaction/hook.js.map +0 -7
  149. package/dist/compaction/lcm-addresses.d.ts +0 -10
  150. package/dist/compaction/lcm-addresses.d.ts.map +0 -1
  151. package/dist/compaction/lcm-doctor.d.ts +0 -60
  152. package/dist/compaction/lcm-doctor.d.ts.map +0 -1
  153. package/dist/compaction/lcm-loader.d.ts +0 -12
  154. package/dist/compaction/lcm-loader.d.ts.map +0 -1
  155. package/dist/compaction/lcm-maintenance.d.ts +0 -152
  156. package/dist/compaction/lcm-maintenance.d.ts.map +0 -1
  157. package/dist/compaction/lcm-model.d.ts +0 -44
  158. package/dist/compaction/lcm-model.d.ts.map +0 -1
  159. package/dist/compaction/lcm-recovery.d.ts +0 -7
  160. package/dist/compaction/lcm-recovery.d.ts.map +0 -1
  161. package/dist/compaction/lcm-runtime.d.ts +0 -233
  162. package/dist/compaction/lcm-runtime.d.ts.map +0 -1
  163. package/dist/compaction/lcm-runtime.js +0 -2863
  164. package/dist/compaction/lcm-runtime.js.map +0 -7
  165. package/dist/compaction/lcm-status.d.ts +0 -5
  166. package/dist/compaction/lcm-status.d.ts.map +0 -1
  167. package/dist/compaction/normalize.d.ts +0 -83
  168. package/dist/compaction/normalize.d.ts.map +0 -1
  169. package/dist/compaction/projections.d.ts +0 -26
  170. package/dist/compaction/projections.d.ts.map +0 -1
  171. package/dist/compaction/render.d.ts +0 -11
  172. package/dist/compaction/render.d.ts.map +0 -1
  173. package/dist/core/event-loop-slice.d.ts +0 -11
  174. package/dist/core/event-loop-slice.d.ts.map +0 -1
  175. package/dist/memory/lcm-adapter.d.ts +0 -111
  176. package/dist/memory/lcm-adapter.d.ts.map +0 -1
  177. package/dist/storage/lcm-directory.d.ts +0 -17
  178. package/dist/storage/lcm-directory.d.ts.map +0 -1
  179. package/dist/storage/lcm-identity.d.ts +0 -48
  180. package/dist/storage/lcm-identity.d.ts.map +0 -1
  181. package/dist/storage/lcm-ledger.d.ts +0 -159
  182. package/dist/storage/lcm-ledger.d.ts.map +0 -1
  183. package/dist/storage/lcm-migration.d.ts +0 -87
  184. package/dist/storage/lcm-migration.d.ts.map +0 -1
  185. package/dist/storage/lcm-offthread.d.ts +0 -9
  186. package/dist/storage/lcm-offthread.d.ts.map +0 -1
  187. package/dist/storage/sqlite.d.ts +0 -19
  188. package/dist/storage/sqlite.d.ts.map +0 -1
  189. package/dist/ui/frame.d.ts +0 -7
  190. package/dist/ui/frame.d.ts.map +0 -1
  191. package/dist/ui/lcm-dashboard.d.ts +0 -43
  192. package/dist/ui/lcm-dashboard.d.ts.map +0 -1
  193. package/dist/ui/lcm-dashboard.js +0 -395
  194. package/dist/ui/lcm-dashboard.js.map +0 -7
  195. package/dist/ui/lcm-panel.d.ts +0 -37
  196. package/dist/ui/lcm-panel.d.ts.map +0 -1
  197. package/dist/ui/lcm-panel.js +0 -23
  198. package/dist/ui/lcm-panel.js.map +0 -7
  199. package/docs/adr/0001-lcm-durable-context-ledger.md +0 -6
  200. package/docs/certification.md +0 -134
  201. package/docs/compaction.md +0 -188
  202. /package/dist/chunks/{chunk-TF3MK3TH.js.map → chunk-4PQDZ3AY.js.map} +0 -0
  203. /package/dist/chunks/{chunk-YWEXP724.js.map → chunk-7OZDA7YP.js.map} +0 -0
  204. /package/dist/chunks/{chunk-673LUJCK.js.map → chunk-7QKSPNXQ.js.map} +0 -0
  205. /package/dist/chunks/{chunk-PTYCFQEH.js.map → chunk-ABFK2RPI.js.map} +0 -0
  206. /package/dist/chunks/{chunk-YLMDFMXM.js.map → chunk-BQ2U44IL.js.map} +0 -0
@@ -1,19 +0,0 @@
1
- interface SqliteStatement {
2
- run(...params: unknown[]): unknown;
3
- get(...params: unknown[]): unknown;
4
- all(...params: unknown[]): unknown[];
5
- }
6
- export interface SqliteDatabase {
7
- exec(sql: string): void;
8
- prepare(sql: string): SqliteStatement;
9
- close(): void;
10
- }
11
- interface SqliteOpenOptions {
12
- readOnly?: boolean;
13
- }
14
- export type SqliteDriver = new (path: string, options?: SqliteOpenOptions) => SqliteDatabase;
15
- export declare const loadSqliteDriver: () => Promise<SqliteDriver>;
16
- export declare const sqliteDriver: () => SqliteDriver;
17
- export declare const setSqliteDriver: (next: SqliteDriver | undefined) => void;
18
- export {};
19
- //# sourceMappingURL=sqlite.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/storage/sqlite.ts"],"names":[],"mappings":"AAEA,UAAU,eAAe;IACvB,GAAG,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IACnC,GAAG,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IACnC,GAAG,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAC;IACtC,KAAK,IAAI,IAAI,CAAC;CACf;AAED,UAAU,iBAAiB;IAAG,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE;AAClD,MAAM,MAAM,YAAY,GAAG,KAAK,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,KAAK,cAAc,CAAC;AAkB7F,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAAC,YAAY,CAa7D,CAAC;AAeF,eAAO,MAAM,YAAY,QAAO,YAI/B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAM,YAAY,GAAG,SAAS,KAAG,IAA0B,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { Theme } from "@oh-my-pi/pi-coding-agent";
2
- export declare const topBorder: (theme: Theme, width: number, title: string) => string;
3
- export declare const middleBorder: (theme: Theme, width: number) => string;
4
- export declare const bottomBorder: (theme: Theme, width: number) => string;
5
- export declare const row: (theme: Theme, width: number, content: string) => string;
6
- export declare const narrowFallback: (width: number, label: string, hint: string) => string[];
7
- //# sourceMappingURL=frame.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../src/ui/frame.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIvD,eAAO,MAAM,SAAS,GAAI,OAAO,KAAK,EAAE,OAAO,MAAM,EAAE,OAAO,MAAM,KAAG,MAOtE,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,KAAK,EAAE,OAAO,MAAM,KAAG,MACS,CAAC;AAErE,eAAO,MAAM,YAAY,GAAI,OAAO,KAAK,EAAE,OAAO,MAAM,KAAG,MACS,CAAC;AAErE,eAAO,MAAM,GAAG,GAAI,OAAO,KAAK,EAAE,OAAO,MAAM,EAAE,SAAS,MAAM,KAAG,MAGlE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,MAAM,MAAM,KAAG,MAAM,EAGrC,CAAC"}
@@ -1,43 +0,0 @@
1
- import type { Theme } from "@oh-my-pi/pi-coding-agent";
2
- import type { Component, Focusable, TUI } from "@oh-my-pi/pi-tui";
3
- import type { LcmStatusSource } from "../fabric-runtime-state.js";
4
- export declare class FabricLcmDashboard implements Component, Focusable {
5
- private readonly tui;
6
- private readonly theme;
7
- private readonly source;
8
- private readonly done;
9
- focused: boolean;
10
- private tab;
11
- private snapshot;
12
- private diagnostics;
13
- private checks;
14
- private jobs;
15
- private checkIndex;
16
- private nodeIndex;
17
- private nodeOffset;
18
- private detail;
19
- private sourceIndex;
20
- private sourceEntry;
21
- private busy;
22
- private notice;
23
- private readonly timer;
24
- constructor(tui: TUI, theme: Theme, source: () => LcmStatusSource | undefined, done: () => void);
25
- private refresh;
26
- private runRepair;
27
- private openNode;
28
- private openSource;
29
- private pageNodes;
30
- handleInput(data: string): void;
31
- render(width: number): readonly string[];
32
- invalidate(): void;
33
- dispose(): void;
34
- private bodyRows;
35
- private headerLines;
36
- private tabStrip;
37
- private footer;
38
- private bodyLines;
39
- private healthLines;
40
- private coverageLines;
41
- private jobLines;
42
- }
43
- //# sourceMappingURL=lcm-dashboard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lcm-dashboard.d.ts","sourceRoot":"","sources":["../../src/ui/lcm-dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAc,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAYlE,OAAO,KAAK,EAAmB,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAmDnF,qBAAa,kBAAmB,YAAW,SAAS,EAAE,SAAS;IAkB3D,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,IAAI;IApBvB,OAAO,UAAS;IAChB,OAAO,CAAC,GAAG,CAAoB;IA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chunk-QZJB7QTM.js";
11
- import {
12
- REPAIR_LABELS,
13
- lcmChecks,
14
- worstSeverity
15
- } from "../chunks/chunk-SMNOQLKU.js";
16
- import {
17
- formatClock,
18
- formatCost,
19
- padToWidth,
20
- safeText,
21
- wrapPlainText
22
- } from "../chunks/chunk-KIH3KLZU.js";
23
- import "../chunks/chunk-QD2B5FUE.js";
24
-
25
- // src/ui/lcm-dashboard.ts
26
- import { Key, matchesKey, truncateToWidth as truncateToWidth2 } from "@oh-my-pi/pi-tui";
27
-
28
- // src/ui/frame.ts
29
- import { truncateToWidth, visibleWidth } from "@oh-my-pi/pi-tui";
30
- var topBorder = (theme, width, title) => {
31
- const border = (value) => theme.fg("borderMuted", value);
32
- const safeTitle = truncateToWidth(safeText(title), Math.max(0, width - 6));
33
- const styledTitle = ` ${theme.fg("accent", safeTitle)} `;
34
- const remaining = Math.max(0, width - 2 - visibleWidth(styledTitle));
35
- const left = Math.floor(remaining / 2);
36
- return `${border(`\u256D${"\u2500".repeat(left)}`)}${styledTitle}${border(`${"\u2500".repeat(remaining - left)}\u256E`)}`;
37
- };
38
- var middleBorder = (theme, width) => theme.fg("borderMuted", `\u251C${"\u2500".repeat(Math.max(0, width - 2))}\u2524`);
39
- var bottomBorder = (theme, width) => theme.fg("borderMuted", `\u2570${"\u2500".repeat(Math.max(0, width - 2))}\u256F`);
40
- var row = (theme, width, content) => {
41
- const edge = theme.fg("borderMuted", "\u2502");
42
- return `${edge}${padToWidth(content, Math.max(0, width - 2))}${edge}`;
43
- };
44
- var narrowFallback = (width, label, hint) => [safeText(label), hint].map((line) => truncateToWidth(line, width, "")).filter((line) => visibleWidth(line) > 0);
45
-
46
- // src/ui/lcm-dashboard.ts
47
- var REFRESH_MS = 1e3;
48
- var MIN_WIDTH = 32;
49
- var TABS = ["health", "graph", "coverage", "jobs"];
50
- var SEVERITY_GLYPH = { ok: "\u2713", info: "\xB7", warn: "!", fail: "\u2717" };
51
- var SEVERITY_COLOR = {
52
- ok: "success",
53
- info: "dim",
54
- warn: "warning",
55
- fail: "error"
56
- };
57
- var SEVERITY_WORD = {
58
- ok: "healthy",
59
- info: "priming",
60
- warn: "attention",
61
- fail: "degraded"
62
- };
63
- var AUTO_REPAIR_ATTEMPTS = 5;
64
- var formatBytes = (bytes) => {
65
- if (!Number.isFinite(bytes) || bytes <= 0) return "0 B";
66
- if (bytes < 1024) return Math.round(bytes) + " B";
67
- if (bytes < 1048576) return (bytes / 1024).toFixed(1) + " kB";
68
- return (bytes / 1048576).toFixed(1) + " MB";
69
- };
70
- var relative = (at, now) => {
71
- const delta = Math.round((at - now) / 1e3);
72
- if (delta <= 0) return "now";
73
- if (delta < 60) return delta + "s";
74
- return Math.round(delta / 60) + "m";
75
- };
76
- var FabricLcmDashboard = class {
77
- constructor(tui, theme, source, done) {
78
- this.tui = tui;
79
- this.theme = theme;
80
- this.source = source;
81
- this.done = done;
82
- this.refresh();
83
- this.timer = setInterval(() => {
84
- this.refresh();
85
- this.tui.requestRender();
86
- }, REFRESH_MS);
87
- this.timer.unref?.();
88
- }
89
- focused = false;
90
- tab = "health";
91
- snapshot;
92
- diagnostics;
93
- checks = [];
94
- jobs = [];
95
- checkIndex = 0;
96
- nodeIndex = 0;
97
- nodeOffset = 0;
98
- detail;
99
- sourceIndex = 0;
100
- sourceEntry;
101
- busy;
102
- notice;
103
- timer;
104
- refresh() {
105
- const source = this.source();
106
- if (!source) {
107
- this.snapshot = void 0;
108
- this.diagnostics = void 0;
109
- this.checks = [];
110
- this.jobs = [];
111
- return;
112
- }
113
- this.snapshot = readLcmSnapshot(source, this.nodeOffset);
114
- this.diagnostics = source.diagnostics(this.snapshot.report);
115
- this.checks = lcmChecks(this.diagnostics);
116
- this.jobs = source.jobs(LCM_NODE_PAGE);
117
- this.checkIndex = Math.max(0, Math.min(this.checkIndex, Math.max(0, this.checks.length - 1)));
118
- this.nodeIndex = Math.max(0, Math.min(this.nodeIndex, Math.max(0, this.snapshot.nodes.length - 1)));
119
- }
120
- runRepair(id) {
121
- const source = this.source();
122
- if (!source) return;
123
- if (this.busy) {
124
- this.notice = REPAIR_LABELS[this.busy] + " is still running";
125
- return;
126
- }
127
- this.busy = id;
128
- this.notice = REPAIR_LABELS[id] + "\u2026";
129
- this.tui.requestRender();
130
- void source.repair(id).then((outcome) => {
131
- this.notice = (outcome.changed ? "repaired" : "no change") + " \xB7 " + outcome.detail;
132
- }).catch((error) => {
133
- this.notice = "repair failed \xB7 " + (error instanceof Error ? error.message : String(error));
134
- }).finally(() => {
135
- this.busy = void 0;
136
- this.refresh();
137
- this.tui.requestRender();
138
- });
139
- }
140
- openNode() {
141
- const nodeId = this.snapshot?.nodes[this.nodeIndex]?.nodeId;
142
- const source = nodeId ? this.source() : void 0;
143
- this.detail = source && nodeId ? lcmNodeDetail(source, nodeId) : void 0;
144
- this.sourceIndex = 0;
145
- this.sourceEntry = void 0;
146
- }
147
- openSource() {
148
- const selected = this.detail?.node.sources[this.sourceIndex];
149
- if (!selected) return;
150
- if (this.sourceEntry) {
151
- this.sourceEntry = void 0;
152
- return;
153
- }
154
- this.sourceEntry = this.source()?.source(selected.sessionId, selected.entryId, selected.revision);
155
- }
156
- pageNodes(direction) {
157
- const snapshot = this.snapshot;
158
- if (!snapshot) return;
159
- if (direction === 1 && !snapshot.hasMore) return;
160
- const next = Math.max(0, snapshot.offset + direction * LCM_NODE_PAGE);
161
- if (next === snapshot.offset) return;
162
- this.nodeOffset = next;
163
- this.nodeIndex = 0;
164
- this.refresh();
165
- }
166
- handleInput(data) {
167
- const tabIndex = TABS.findIndex((_, index) => data === String(index + 1));
168
- if (tabIndex >= 0) {
169
- this.tab = TABS[tabIndex];
170
- this.detail = void 0;
171
- this.notice = void 0;
172
- this.tui.requestRender();
173
- return;
174
- }
175
- if (matchesKey(data, Key.escape) || matchesKey(data, Key.ctrl("c"))) {
176
- if (this.detail) {
177
- if (this.sourceEntry) this.sourceEntry = void 0;
178
- else this.detail = void 0;
179
- this.tui.requestRender();
180
- return;
181
- }
182
- this.done();
183
- return;
184
- }
185
- const up = matchesKey(data, Key.up) || data === "k";
186
- const down = matchesKey(data, Key.down) || data === "j";
187
- if (this.detail) {
188
- const sources = this.detail.node.sources.length;
189
- if (up) {
190
- this.sourceIndex = Math.max(0, this.sourceIndex - 1);
191
- this.sourceEntry = void 0;
192
- } else if (down) {
193
- this.sourceIndex = Math.min(Math.max(0, sources - 1), this.sourceIndex + 1);
194
- this.sourceEntry = void 0;
195
- } else if (matchesKey(data, Key.enter)) {
196
- this.openSource();
197
- } else if (matchesKey(data, Key.left) || data === "h") {
198
- this.detail = void 0;
199
- }
200
- this.tui.requestRender();
201
- return;
202
- }
203
- if (this.tab === "health") {
204
- if (up) this.checkIndex = Math.max(0, this.checkIndex - 1);
205
- else if (down) this.checkIndex = Math.min(Math.max(0, this.checks.length - 1), this.checkIndex + 1);
206
- else if (data === "r") {
207
- const repair = this.checks[this.checkIndex]?.repair;
208
- if (repair) this.runRepair(repair);
209
- else this.notice = "this check has no repair";
210
- } else if (data === "R") {
211
- const pending = this.checks.find((check) => check.repair !== void 0);
212
- if (pending?.repair) this.runRepair(pending.repair);
213
- else this.notice = "nothing to repair";
214
- }
215
- } else if (this.tab === "graph") {
216
- const total = this.snapshot?.nodes.length ?? 0;
217
- if (up) this.nodeIndex = Math.max(0, this.nodeIndex - 1);
218
- else if (down) this.nodeIndex = Math.min(Math.max(0, total - 1), this.nodeIndex + 1);
219
- else if (data === "g") this.nodeIndex = 0;
220
- else if (data === "G") this.nodeIndex = Math.max(0, total - 1);
221
- else if (data === "[") this.pageNodes(-1);
222
- else if (data === "]") this.pageNodes(1);
223
- else if (matchesKey(data, Key.enter)) this.openNode();
224
- } else if (this.tab === "jobs") {
225
- if (data === "r") this.runRepair("jobs");
226
- else if (data === "l") this.runRepair("leases");
227
- }
228
- this.tui.requestRender();
229
- }
230
- render(width) {
231
- if (width <= 0) return [];
232
- if (width < MIN_WIDTH) return narrowFallback(width, "Fabric \xB7 LCM", "esc close");
233
- const inner = width - 2;
234
- const lines = [topBorder(this.theme, width, "Fabric \xB7 LCM")];
235
- const snapshot = this.snapshot;
236
- const diagnostics = this.diagnostics;
237
- if (!snapshot || !diagnostics) {
238
- lines.push(row(this.theme, width, this.theme.fg("muted", lcmUnavailableLine())));
239
- lines.push(middleBorder(this.theme, width));
240
- lines.push(row(this.theme, width, this.theme.fg("dim", "esc close")));
241
- lines.push(bottomBorder(this.theme, width));
242
- return lines.map((line) => truncateToWidth2(line, width, ""));
243
- }
244
- for (const line of this.headerLines(diagnostics, inner)) lines.push(row(this.theme, width, line));
245
- lines.push(row(this.theme, width, renderLcmCoverageLine(this.theme, snapshot, inner)));
246
- lines.push(middleBorder(this.theme, width));
247
- lines.push(row(this.theme, width, this.tabStrip(inner)));
248
- lines.push(middleBorder(this.theme, width));
249
- for (const line of this.bodyLines(snapshot, diagnostics, inner, this.bodyRows(lines.length))) {
250
- lines.push(row(this.theme, width, line));
251
- }
252
- lines.push(middleBorder(this.theme, width));
253
- lines.push(row(this.theme, width, this.theme.fg("dim", truncateToWidth2(this.footer(), inner, ""))));
254
- lines.push(bottomBorder(this.theme, width));
255
- return lines.map((line) => truncateToWidth2(line, width, ""));
256
- }
257
- invalidate() {
258
- }
259
- dispose() {
260
- clearInterval(this.timer);
261
- this.detail = void 0;
262
- this.sourceEntry = void 0;
263
- }
264
- bodyRows(used) {
265
- const terminal = Math.max(12, this.tui.terminal?.rows ?? 28);
266
- return Math.max(6, Math.min(40, Math.floor(terminal * 90 / 100) - used - 4));
267
- }
268
- headerLines(diagnostics, width) {
269
- const severity = worstSeverity(this.checks);
270
- const facts = [
271
- "session " + (diagnostics.sessionId ? diagnostics.sessionId.slice(0, 8) : "none"),
272
- diagnostics.liveBranchEntries + " live",
273
- diagnostics.ledgerSessionEntries + " stored",
274
- "ledger " + diagnostics.ledgerEntries,
275
- ...diagnostics.summaryModel ? [diagnostics.summaryModel] : [],
276
- diagnostics.usedCalls + " calls",
277
- formatCost(this.snapshot?.report.usage.cost ?? 0)
278
- ].join(" \xB7 ");
279
- const headline = [
280
- this.theme.fg(SEVERITY_COLOR[severity], SEVERITY_GLYPH[severity] + " " + SEVERITY_WORD[severity]),
281
- this.theme.fg("muted", diagnostics.projectKey),
282
- this.theme.fg("dim", facts)
283
- ].join(this.theme.fg("dim", " \xB7 "));
284
- return wrapPlainText(headline, width, 2);
285
- }
286
- tabStrip(width) {
287
- const cells = TABS.map((tab, index) => {
288
- const label = " " + (index + 1) + " " + tab + " ";
289
- return tab === this.tab ? this.theme.bg("selectedBg", this.theme.fg("accent", label)) : this.theme.fg("dim", label);
290
- });
291
- return truncateToWidth2(cells.join(""), width, "");
292
- }
293
- footer() {
294
- if (this.notice) return (this.busy ? "\u2026 " : "") + this.notice + " \xB7 1-4 tab \xB7 esc close";
295
- if (this.detail) {
296
- return "\u2191\u2193/jk source \xB7 enter " + (this.sourceEntry ? "close" : "open") + " raw entry \xB7 esc back";
297
- }
298
- if (this.tab === "health") return "\u2191\u2193/jk check \xB7 r repair \xB7 R repair first \xB7 1-4 tab \xB7 esc close";
299
- if (this.tab === "graph") return "\u2191\u2193/jk node \xB7 g/G first/last \xB7 [ ] page \xB7 enter inspect \xB7 1-4 tab \xB7 esc close";
300
- if (this.tab === "jobs") return "r requeue failed \xB7 l release leases \xB7 1-4 tab \xB7 esc close";
301
- return "1-4 tab \xB7 esc close";
302
- }
303
- bodyLines(snapshot, diagnostics, width, rows) {
304
- if (this.detail) {
305
- return renderLcmDetailLines(this.theme, this.detail, this.sourceIndex, this.sourceEntry, width, rows);
306
- }
307
- if (this.tab === "health") return this.healthLines(diagnostics, width, rows);
308
- if (this.tab === "graph") return renderLcmNodeLines(this.theme, snapshot, width, rows, this.nodeIndex);
309
- if (this.tab === "coverage") return this.coverageLines(snapshot, diagnostics, width, rows);
310
- return this.jobLines(diagnostics, width, rows);
311
- }
312
- healthLines(diagnostics, width, rows) {
313
- const lines = [];
314
- const titleWidth = Math.max(8, ...this.checks.map((check) => check.title.length));
315
- for (const [index, check] of this.checks.entries()) {
316
- const glyph = this.theme.fg(SEVERITY_COLOR[check.severity], SEVERITY_GLYPH[check.severity]);
317
- const title = this.theme.fg(
318
- check.severity === "ok" ? "muted" : SEVERITY_COLOR[check.severity],
319
- padToWidth(check.title, titleWidth)
320
- );
321
- const hint = index === this.checkIndex && check.repair ? this.theme.fg("accent", " \xB7 r: " + REPAIR_LABELS[check.repair]) : "";
322
- const text = glyph + " " + title + " " + this.theme.fg("dim", safeText(check.detail)) + hint;
323
- lines.push(index === this.checkIndex ? this.theme.bg("selectedBg", padToWidth(text, width)) : text);
324
- }
325
- if (diagnostics.autoRepairs.length > 0 && lines.length + 2 < rows) {
326
- lines.push("");
327
- lines.push(this.theme.fg("accent", "auto-repair"));
328
- const now = Date.now();
329
- for (const auto of diagnostics.autoRepairs.slice(0, Math.max(1, rows - lines.length))) {
330
- const budget = auto.attempts >= AUTO_REPAIR_ATTEMPTS ? "parked after " + auto.attempts + " attempts" : "attempt " + auto.attempts + "/" + AUTO_REPAIR_ATTEMPTS + " \xB7 next in " + relative(auto.nextAt, now);
331
- lines.push(this.theme.fg("dim", safeText(" " + auto.fault + " \xB7 " + budget + " \xB7 " + auto.detail)));
332
- }
333
- }
334
- if (diagnostics.repairs.length > 0 && lines.length + 2 < rows) {
335
- lines.push("");
336
- lines.push(this.theme.fg("accent", "repairs"));
337
- for (const repair of diagnostics.repairs.slice(0, Math.max(1, rows - lines.length))) {
338
- const detail = " " + formatClock(repair.at) + " " + repair.id + " \xB7 " + (repair.changed ? "changed" : "no change") + " \xB7 " + repair.detail;
339
- lines.push(this.theme.fg("dim", safeText(detail)));
340
- }
341
- }
342
- while (lines.length < rows) lines.push("");
343
- return lines.slice(0, rows);
344
- }
345
- coverageLines(snapshot, diagnostics, width, rows) {
346
- const map = snapshot.coverageMap;
347
- const headline = map.length + " stored entries \xB7 " + diagnostics.coveredSources + " held by ready nodes \xB7 stored payload " + formatBytes(snapshot.preview.sourceBytes) + " \xB7 frontier text " + formatBytes(snapshot.preview.summaryBytes);
348
- const lines = [this.theme.fg("accent", truncateToWidth2(headline, width, ""))];
349
- if (map.length === 0) {
350
- lines.push(this.theme.fg("dim", "(no branch entries in the ledger yet)"));
351
- } else {
352
- const gridRows = Math.max(1, Math.min(6, Math.ceil(map.length / Math.max(1, width))));
353
- const cells = gridRows * width;
354
- for (let line = 0; line < gridRows; line++) {
355
- let text = "";
356
- for (let column = 0; column < width; column++) {
357
- const cell = line * width + column;
358
- const start = Math.min(map.length - 1, Math.floor(cell * map.length / cells));
359
- const end = Math.min(map.length, Math.max(start + 1, Math.floor((cell + 1) * map.length / cells)));
360
- let covered = 0;
361
- for (let index = start; index < end; index++) if (map[index].covered) covered += 1;
362
- text += covered === 0 ? "\u2591" : covered === end - start ? "\u2588" : "\u2593";
363
- }
364
- lines.push(this.theme.fg("dim", text));
365
- }
366
- }
367
- lines.push("");
368
- for (const line of renderLcmPreviewLines(this.theme, snapshot, width, Math.max(2, rows - lines.length))) {
369
- lines.push(line);
370
- }
371
- while (lines.length < rows) lines.push("");
372
- return lines.slice(0, rows);
373
- }
374
- jobLines(diagnostics, width, rows) {
375
- const now = Date.now();
376
- const budget = Number.isFinite(diagnostics.budgetCalls) ? String(diagnostics.budgetCalls) : "no limit";
377
- const headline = diagnostics.pendingJobs + " pending \xB7 " + diagnostics.runningJobs + " running \xB7 " + diagnostics.failedJobs + " failed today \xB7 " + diagnostics.expiredLeases + " expired lease(s) \xB7 " + diagnostics.usedCalls + "/" + budget + " calls";
378
- const lines = [this.theme.fg("accent", truncateToWidth2(headline, width, ""))];
379
- if (this.jobs.length === 0) lines.push(this.theme.fg("dim", "(no maintenance jobs recorded)"));
380
- for (const job of this.jobs.slice(0, Math.max(1, rows - lines.length))) {
381
- const color = job.state === "failed" ? "error" : job.state === "running" ? "accent" : job.state === "completed" ? "dim" : "warning";
382
- const tail = job.error ? "\xB7 " + job.error : job.state === "pending" && job.nextRetryAt > now ? "\xB7 retry in " + relative(job.nextRetryAt, now) : "";
383
- const body = padToWidth(job.attempts + " try", 7) + " " + formatClock(job.updatedAt) + " " + job.nodeId + " " + tail;
384
- lines.push(
385
- truncateToWidth2(this.theme.fg(color, padToWidth(job.state, 9)) + this.theme.fg("dim", safeText(body)), width, "")
386
- );
387
- }
388
- while (lines.length < rows) lines.push("");
389
- return lines.slice(0, rows);
390
- }
391
- };
392
- export {
393
- FabricLcmDashboard
394
- };
395
- //# sourceMappingURL=lcm-dashboard.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/ui/lcm-dashboard.ts", "../../src/ui/frame.ts"],
4
- "sourcesContent": ["import type { Theme, ThemeColor } from \"@oh-my-pi/pi-coding-agent\";\nimport type { Component, Focusable, TUI } from \"@oh-my-pi/pi-tui\";\nimport { Key, matchesKey, truncateToWidth } from \"@oh-my-pi/pi-tui\";\nimport {\n lcmChecks,\n REPAIR_LABELS,\n worstSeverity,\n type LcmCheck,\n type LcmCheckSeverity,\n type LcmDiagnostics,\n type LcmRepairId,\n type LcmRepairOutcome,\n} from \"../compaction/lcm-doctor.js\";\nimport type { LcmDashboardJob, LcmStatusSource } from \"../fabric-runtime-state.js\";\nimport { bottomBorder, middleBorder, narrowFallback, row, topBorder } from \"./frame.js\";\nimport { formatClock, formatCost, padToWidth, safeText, wrapPlainText } from \"./format.js\";\nimport {\n lcmNodeDetail,\n lcmUnavailableLine,\n LCM_NODE_PAGE,\n readLcmSnapshot,\n renderLcmCoverageLine,\n renderLcmDetailLines,\n renderLcmNodeLines,\n renderLcmPreviewLines,\n type LcmNodeDetail,\n type LcmSourceEntry,\n type LcmViewSnapshot,\n} from \"./lcm-panel.js\";\n\nconst REFRESH_MS = 1_000;\nconst MIN_WIDTH = 32;\nconst TABS = [\"health\", \"graph\", \"coverage\", \"jobs\"] as const;\ntype LcmTab = (typeof TABS)[number];\n\nconst SEVERITY_GLYPH: Record<LcmCheckSeverity, string> = { ok: \"\\u2713\", info: \"\\u00b7\", warn: \"!\", fail: \"\\u2717\" };\nconst SEVERITY_COLOR: Record<LcmCheckSeverity, ThemeColor> = {\n ok: \"success\",\n info: \"dim\",\n warn: \"warning\",\n fail: \"error\",\n};\nconst SEVERITY_WORD: Record<LcmCheckSeverity, string> = {\n ok: \"healthy\",\n info: \"priming\",\n warn: \"attention\",\n fail: \"degraded\",\n};\nconst AUTO_REPAIR_ATTEMPTS = 5;\n\nconst formatBytes = (bytes: number): string => {\n if (!Number.isFinite(bytes) || bytes <= 0) return \"0 B\";\n if (bytes < 1_024) return Math.round(bytes) + \" B\";\n if (bytes < 1_048_576) return (bytes / 1_024).toFixed(1) + \" kB\";\n return (bytes / 1_048_576).toFixed(1) + \" MB\";\n};\n\nconst relative = (at: number, now: number): string => {\n const delta = Math.round((at - now) / 1_000);\n if (delta <= 0) return \"now\";\n if (delta < 60) return delta + \"s\";\n return Math.round(delta / 60) + \"m\";\n};\n\nexport class FabricLcmDashboard implements Component, Focusable {\n focused = false;\n private tab: LcmTab = \"health\";\n private snapshot: LcmViewSnapshot | undefined;\n private diagnostics: LcmDiagnostics | undefined;\n private checks: LcmCheck[] = [];\n private jobs: LcmDashboardJob[] = [];\n private checkIndex = 0;\n private nodeIndex = 0;\n private nodeOffset = 0;\n private detail: LcmNodeDetail | undefined;\n private sourceIndex = 0;\n private sourceEntry: LcmSourceEntry | undefined;\n private busy: LcmRepairId | undefined;\n private notice: string | undefined;\n private readonly timer: ReturnType<typeof setInterval>;\n\n constructor(\n private readonly tui: TUI,\n private readonly theme: Theme,\n private readonly source: () => LcmStatusSource | undefined,\n private readonly done: () => void,\n ) {\n this.refresh();\n this.timer = setInterval(() => {\n this.refresh();\n this.tui.requestRender();\n }, REFRESH_MS);\n this.timer.unref?.();\n }\n\n private refresh(): void {\n const source = this.source();\n if (!source) {\n this.snapshot = undefined;\n this.diagnostics = undefined;\n this.checks = [];\n this.jobs = [];\n return;\n }\n this.snapshot = readLcmSnapshot(source, this.nodeOffset);\n this.diagnostics = source.diagnostics(this.snapshot.report);\n this.checks = lcmChecks(this.diagnostics);\n this.jobs = source.jobs(LCM_NODE_PAGE);\n this.checkIndex = Math.max(0, Math.min(this.checkIndex, Math.max(0, this.checks.length - 1)));\n this.nodeIndex = Math.max(0, Math.min(this.nodeIndex, Math.max(0, this.snapshot.nodes.length - 1)));\n }\n\n private runRepair(id: LcmRepairId): void {\n const source = this.source();\n if (!source) return;\n if (this.busy) {\n this.notice = REPAIR_LABELS[this.busy] + \" is still running\";\n return;\n }\n this.busy = id;\n this.notice = REPAIR_LABELS[id] + \"\\u2026\";\n this.tui.requestRender();\n void source\n .repair(id)\n .then((outcome: LcmRepairOutcome) => {\n this.notice = (outcome.changed ? \"repaired\" : \"no change\") + \" \\u00b7 \" + outcome.detail;\n })\n .catch((error: unknown) => {\n this.notice = \"repair failed \\u00b7 \" + (error instanceof Error ? error.message : String(error));\n })\n .finally(() => {\n this.busy = undefined;\n this.refresh();\n this.tui.requestRender();\n });\n }\n\n private openNode(): void {\n const nodeId = this.snapshot?.nodes[this.nodeIndex]?.nodeId;\n const source = nodeId ? this.source() : undefined;\n this.detail = source && nodeId ? lcmNodeDetail(source, nodeId) : undefined;\n this.sourceIndex = 0;\n this.sourceEntry = undefined;\n }\n\n private openSource(): void {\n const selected = this.detail?.node.sources[this.sourceIndex];\n if (!selected) return;\n if (this.sourceEntry) {\n this.sourceEntry = undefined;\n return;\n }\n this.sourceEntry = this.source()?.source(selected.sessionId, selected.entryId, selected.revision);\n }\n\n private pageNodes(direction: -1 | 1): void {\n const snapshot = this.snapshot;\n if (!snapshot) return;\n if (direction === 1 && !snapshot.hasMore) return;\n const next = Math.max(0, snapshot.offset + direction * LCM_NODE_PAGE);\n if (next === snapshot.offset) return;\n this.nodeOffset = next;\n this.nodeIndex = 0;\n this.refresh();\n }\n\n handleInput(data: string): void {\n const tabIndex = TABS.findIndex((_, index) => data === String(index + 1));\n if (tabIndex >= 0) {\n this.tab = TABS[tabIndex]!;\n this.detail = undefined;\n this.notice = undefined;\n this.tui.requestRender();\n return;\n }\n if (matchesKey(data, Key.escape) || matchesKey(data, Key.ctrl(\"c\"))) {\n if (this.detail) {\n if (this.sourceEntry) this.sourceEntry = undefined;\n else this.detail = undefined;\n this.tui.requestRender();\n return;\n }\n this.done();\n return;\n }\n const up = matchesKey(data, Key.up) || data === \"k\";\n const down = matchesKey(data, Key.down) || data === \"j\";\n if (this.detail) {\n const sources = this.detail.node.sources.length;\n if (up) {\n this.sourceIndex = Math.max(0, this.sourceIndex - 1);\n this.sourceEntry = undefined;\n } else if (down) {\n this.sourceIndex = Math.min(Math.max(0, sources - 1), this.sourceIndex + 1);\n this.sourceEntry = undefined;\n } else if (matchesKey(data, Key.enter)) {\n this.openSource();\n } else if (matchesKey(data, Key.left) || data === \"h\") {\n this.detail = undefined;\n }\n this.tui.requestRender();\n return;\n }\n if (this.tab === \"health\") {\n if (up) this.checkIndex = Math.max(0, this.checkIndex - 1);\n else if (down) this.checkIndex = Math.min(Math.max(0, this.checks.length - 1), this.checkIndex + 1);\n else if (data === \"r\") {\n const repair = this.checks[this.checkIndex]?.repair;\n if (repair) this.runRepair(repair);\n else this.notice = \"this check has no repair\";\n } else if (data === \"R\") {\n const pending = this.checks.find((check) => check.repair !== undefined);\n if (pending?.repair) this.runRepair(pending.repair);\n else this.notice = \"nothing to repair\";\n }\n } else if (this.tab === \"graph\") {\n const total = this.snapshot?.nodes.length ?? 0;\n if (up) this.nodeIndex = Math.max(0, this.nodeIndex - 1);\n else if (down) this.nodeIndex = Math.min(Math.max(0, total - 1), this.nodeIndex + 1);\n else if (data === \"g\") this.nodeIndex = 0;\n else if (data === \"G\") this.nodeIndex = Math.max(0, total - 1);\n else if (data === \"[\") this.pageNodes(-1);\n else if (data === \"]\") this.pageNodes(1);\n else if (matchesKey(data, Key.enter)) this.openNode();\n } else if (this.tab === \"jobs\") {\n if (data === \"r\") this.runRepair(\"jobs\");\n else if (data === \"l\") this.runRepair(\"leases\");\n }\n this.tui.requestRender();\n }\n\n render(width: number): readonly string[] {\n if (width <= 0) return [];\n if (width < MIN_WIDTH) return narrowFallback(width, \"Fabric \\u00b7 LCM\", \"esc close\");\n const inner = width - 2;\n const lines = [topBorder(this.theme, width, \"Fabric \\u00b7 LCM\")];\n const snapshot = this.snapshot;\n const diagnostics = this.diagnostics;\n if (!snapshot || !diagnostics) {\n lines.push(row(this.theme, width, this.theme.fg(\"muted\", lcmUnavailableLine())));\n lines.push(middleBorder(this.theme, width));\n lines.push(row(this.theme, width, this.theme.fg(\"dim\", \"esc close\")));\n lines.push(bottomBorder(this.theme, width));\n return lines.map((line) => truncateToWidth(line, width, \"\"));\n }\n for (const line of this.headerLines(diagnostics, inner)) lines.push(row(this.theme, width, line));\n lines.push(row(this.theme, width, renderLcmCoverageLine(this.theme, snapshot, inner)));\n lines.push(middleBorder(this.theme, width));\n lines.push(row(this.theme, width, this.tabStrip(inner)));\n lines.push(middleBorder(this.theme, width));\n for (const line of this.bodyLines(snapshot, diagnostics, inner, this.bodyRows(lines.length))) {\n lines.push(row(this.theme, width, line));\n }\n lines.push(middleBorder(this.theme, width));\n lines.push(row(this.theme, width, this.theme.fg(\"dim\", truncateToWidth(this.footer(), inner, \"\"))));\n lines.push(bottomBorder(this.theme, width));\n return lines.map((line) => truncateToWidth(line, width, \"\"));\n }\n\n invalidate(): void {}\n\n dispose(): void {\n clearInterval(this.timer);\n this.detail = undefined;\n this.sourceEntry = undefined;\n }\n\n private bodyRows(used: number): number {\n const terminal = Math.max(12, this.tui.terminal?.rows ?? 28);\n return Math.max(6, Math.min(40, Math.floor((terminal * 90) / 100) - used - 4));\n }\n\n private headerLines(diagnostics: LcmDiagnostics, width: number): string[] {\n const severity = worstSeverity(this.checks);\n const facts = [\n \"session \" + (diagnostics.sessionId ? diagnostics.sessionId.slice(0, 8) : \"none\"),\n diagnostics.liveBranchEntries + \" live\",\n diagnostics.ledgerSessionEntries + \" stored\",\n \"ledger \" + diagnostics.ledgerEntries,\n ...(diagnostics.summaryModel ? [diagnostics.summaryModel] : []),\n diagnostics.usedCalls + \" calls\",\n formatCost(this.snapshot?.report.usage.cost ?? 0),\n ].join(\" \\u00b7 \");\n const headline = [\n this.theme.fg(SEVERITY_COLOR[severity], SEVERITY_GLYPH[severity] + \" \" + SEVERITY_WORD[severity]),\n this.theme.fg(\"muted\", diagnostics.projectKey),\n this.theme.fg(\"dim\", facts),\n ].join(this.theme.fg(\"dim\", \" \\u00b7 \"));\n return wrapPlainText(headline, width, 2);\n }\n\n private tabStrip(width: number): string {\n const cells = TABS.map((tab, index) => {\n const label = \" \" + (index + 1) + \" \" + tab + \" \";\n return tab === this.tab\n ? this.theme.bg(\"selectedBg\", this.theme.fg(\"accent\", label))\n : this.theme.fg(\"dim\", label);\n });\n return truncateToWidth(cells.join(\"\"), width, \"\");\n }\n\n private footer(): string {\n if (this.notice) return (this.busy ? \"\\u2026 \" : \"\") + this.notice + \" \\u00b7 1-4 tab \\u00b7 esc close\";\n if (this.detail) {\n return \"\\u2191\\u2193/jk source \\u00b7 enter \" + (this.sourceEntry ? \"close\" : \"open\") + \" raw entry \\u00b7 esc back\";\n }\n if (this.tab === \"health\") return \"\\u2191\\u2193/jk check \\u00b7 r repair \\u00b7 R repair first \\u00b7 1-4 tab \\u00b7 esc close\";\n if (this.tab === \"graph\") return \"\\u2191\\u2193/jk node \\u00b7 g/G first/last \\u00b7 [ ] page \\u00b7 enter inspect \\u00b7 1-4 tab \\u00b7 esc close\";\n if (this.tab === \"jobs\") return \"r requeue failed \\u00b7 l release leases \\u00b7 1-4 tab \\u00b7 esc close\";\n return \"1-4 tab \\u00b7 esc close\";\n }\n\n private bodyLines(\n snapshot: LcmViewSnapshot,\n diagnostics: LcmDiagnostics,\n width: number,\n rows: number,\n ): string[] {\n if (this.detail) {\n return renderLcmDetailLines(this.theme, this.detail, this.sourceIndex, this.sourceEntry, width, rows);\n }\n if (this.tab === \"health\") return this.healthLines(diagnostics, width, rows);\n if (this.tab === \"graph\") return renderLcmNodeLines(this.theme, snapshot, width, rows, this.nodeIndex);\n if (this.tab === \"coverage\") return this.coverageLines(snapshot, diagnostics, width, rows);\n return this.jobLines(diagnostics, width, rows);\n }\n\n private healthLines(diagnostics: LcmDiagnostics, width: number, rows: number): string[] {\n const lines: string[] = [];\n const titleWidth = Math.max(8, ...this.checks.map((check) => check.title.length));\n for (const [index, check] of this.checks.entries()) {\n const glyph = this.theme.fg(SEVERITY_COLOR[check.severity], SEVERITY_GLYPH[check.severity]);\n const title = this.theme.fg(\n check.severity === \"ok\" ? \"muted\" : SEVERITY_COLOR[check.severity],\n padToWidth(check.title, titleWidth),\n );\n const hint =\n index === this.checkIndex && check.repair\n ? this.theme.fg(\"accent\", \" \\u00b7 r: \" + REPAIR_LABELS[check.repair])\n : \"\";\n const text = glyph + \" \" + title + \" \" + this.theme.fg(\"dim\", safeText(check.detail)) + hint;\n lines.push(index === this.checkIndex ? this.theme.bg(\"selectedBg\", padToWidth(text, width)) : text);\n }\n if (diagnostics.autoRepairs.length > 0 && lines.length + 2 < rows) {\n lines.push(\"\");\n lines.push(this.theme.fg(\"accent\", \"auto-repair\"));\n const now = Date.now();\n for (const auto of diagnostics.autoRepairs.slice(0, Math.max(1, rows - lines.length))) {\n const budget = auto.attempts >= AUTO_REPAIR_ATTEMPTS\n ? \"parked after \" + auto.attempts + \" attempts\"\n : \"attempt \" + auto.attempts + \"/\" + AUTO_REPAIR_ATTEMPTS + \" \\u00b7 next in \" + relative(auto.nextAt, now);\n lines.push(this.theme.fg(\"dim\", safeText(\" \" + auto.fault + \" \\u00b7 \" + budget + \" \\u00b7 \" + auto.detail)));\n }\n }\n if (diagnostics.repairs.length > 0 && lines.length + 2 < rows) {\n lines.push(\"\");\n lines.push(this.theme.fg(\"accent\", \"repairs\"));\n for (const repair of diagnostics.repairs.slice(0, Math.max(1, rows - lines.length))) {\n const detail =\n \" \" + formatClock(repair.at) + \" \" + repair.id + \" \\u00b7 \" + (repair.changed ? \"changed\" : \"no change\") + \" \\u00b7 \" + repair.detail;\n lines.push(this.theme.fg(\"dim\", safeText(detail)));\n }\n }\n while (lines.length < rows) lines.push(\"\");\n return lines.slice(0, rows);\n }\n\n private coverageLines(\n snapshot: LcmViewSnapshot,\n diagnostics: LcmDiagnostics,\n width: number,\n rows: number,\n ): string[] {\n const map = snapshot.coverageMap;\n const headline =\n map.length + \" stored entries \\u00b7 \" + diagnostics.coveredSources + \" held by ready nodes \\u00b7 stored payload \" +\n formatBytes(snapshot.preview.sourceBytes) + \" \\u00b7 frontier text \" + formatBytes(snapshot.preview.summaryBytes);\n const lines: string[] = [this.theme.fg(\"accent\", truncateToWidth(headline, width, \"\"))];\n if (map.length === 0) {\n lines.push(this.theme.fg(\"dim\", \"(no branch entries in the ledger yet)\"));\n } else {\n const gridRows = Math.max(1, Math.min(6, Math.ceil(map.length / Math.max(1, width))));\n const cells = gridRows * width;\n for (let line = 0; line < gridRows; line++) {\n let text = \"\";\n for (let column = 0; column < width; column++) {\n const cell = line * width + column;\n const start = Math.min(map.length - 1, Math.floor((cell * map.length) / cells));\n const end = Math.min(map.length, Math.max(start + 1, Math.floor(((cell + 1) * map.length) / cells)));\n let covered = 0;\n for (let index = start; index < end; index++) if (map[index]!.covered) covered += 1;\n text += covered === 0 ? \"\\u2591\" : covered === end - start ? \"\\u2588\" : \"\\u2593\";\n }\n lines.push(this.theme.fg(\"dim\", text));\n }\n }\n lines.push(\"\");\n for (const line of renderLcmPreviewLines(this.theme, snapshot, width, Math.max(2, rows - lines.length))) {\n lines.push(line);\n }\n while (lines.length < rows) lines.push(\"\");\n return lines.slice(0, rows);\n }\n\n private jobLines(diagnostics: LcmDiagnostics, width: number, rows: number): string[] {\n const now = Date.now();\n const budget = Number.isFinite(diagnostics.budgetCalls) ? String(diagnostics.budgetCalls) : \"no limit\";\n const headline =\n diagnostics.pendingJobs + \" pending \\u00b7 \" + diagnostics.runningJobs + \" running \\u00b7 \" + diagnostics.failedJobs +\n \" failed today \\u00b7 \" + diagnostics.expiredLeases + \" expired lease(s) \\u00b7 \" + diagnostics.usedCalls + \"/\" + budget + \" calls\";\n const lines: string[] = [this.theme.fg(\"accent\", truncateToWidth(headline, width, \"\"))];\n if (this.jobs.length === 0) lines.push(this.theme.fg(\"dim\", \"(no maintenance jobs recorded)\"));\n for (const job of this.jobs.slice(0, Math.max(1, rows - lines.length))) {\n const color: ThemeColor =\n job.state === \"failed\" ? \"error\" : job.state === \"running\" ? \"accent\" : job.state === \"completed\" ? \"dim\" : \"warning\";\n const tail = job.error\n ? \"\\u00b7 \" + job.error\n : job.state === \"pending\" && job.nextRetryAt > now\n ? \"\\u00b7 retry in \" + relative(job.nextRetryAt, now)\n : \"\";\n const body = padToWidth(job.attempts + \" try\", 7) + \" \" + formatClock(job.updatedAt) + \" \" + job.nodeId + \" \" + tail;\n lines.push(\n truncateToWidth(this.theme.fg(color, padToWidth(job.state, 9)) + this.theme.fg(\"dim\", safeText(body)), width, \"\"),\n );\n }\n while (lines.length < rows) lines.push(\"\");\n return lines.slice(0, rows);\n }\n}\n", "import type { Theme } from \"@oh-my-pi/pi-coding-agent\";\nimport { truncateToWidth, visibleWidth } from \"@oh-my-pi/pi-tui\";\nimport { padToWidth, safeText } from \"./format.js\";\n\nexport const topBorder = (theme: Theme, width: number, title: string): string => {\n const border = (value: string): string => theme.fg(\"borderMuted\", value);\n const safeTitle = truncateToWidth(safeText(title), Math.max(0, width - 6));\n const styledTitle = ` ${theme.fg(\"accent\", safeTitle)} `;\n const remaining = Math.max(0, width - 2 - visibleWidth(styledTitle));\n const left = Math.floor(remaining / 2);\n return `${border(`\u256D${\"\u2500\".repeat(left)}`)}${styledTitle}${border(`${\"\u2500\".repeat(remaining - left)}\u256E`)}`;\n};\n\nexport const middleBorder = (theme: Theme, width: number): string =>\n theme.fg(\"borderMuted\", `\u251C${\"\u2500\".repeat(Math.max(0, width - 2))}\u2524`);\n\nexport const bottomBorder = (theme: Theme, width: number): string =>\n theme.fg(\"borderMuted\", `\u2570${\"\u2500\".repeat(Math.max(0, width - 2))}\u256F`);\n\nexport const row = (theme: Theme, width: number, content: string): string => {\n const edge = theme.fg(\"borderMuted\", \"\u2502\");\n return `${edge}${padToWidth(content, Math.max(0, width - 2))}${edge}`;\n};\n\nexport const narrowFallback = (width: number, label: string, hint: string): string[] =>\n [safeText(label), hint]\n .map((line) => truncateToWidth(line, width, \"\"))\n .filter((line) => visibleWidth(line) > 0);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,KAAK,YAAY,mBAAAA,wBAAuB;;;ACDjD,SAAS,iBAAiB,oBAAoB;AAGvC,IAAM,YAAY,CAAC,OAAc,OAAe,UAA0B;AAC/E,QAAM,SAAS,CAAC,UAA0B,MAAM,GAAG,eAAe,KAAK;AACvE,QAAM,YAAY,gBAAgB,SAAS,KAAK,GAAG,KAAK,IAAI,GAAG,QAAQ,CAAC,CAAC;AACzE,QAAM,cAAc,IAAI,MAAM,GAAG,UAAU,SAAS,CAAC;AACrD,QAAM,YAAY,KAAK,IAAI,GAAG,QAAQ,IAAI,aAAa,WAAW,CAAC;AACnE,QAAM,OAAO,KAAK,MAAM,YAAY,CAAC;AACrC,SAAO,GAAG,OAAO,SAAI,SAAI,OAAO,IAAI,CAAC,EAAE,CAAC,GAAG,WAAW,GAAG,OAAO,GAAG,SAAI,OAAO,YAAY,IAAI,CAAC,QAAG,CAAC;AACrG;AAEO,IAAM,eAAe,CAAC,OAAc,UACzC,MAAM,GAAG,eAAe,SAAI,SAAI,OAAO,KAAK,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAG;AAE5D,IAAM,eAAe,CAAC,OAAc,UACzC,MAAM,GAAG,eAAe,SAAI,SAAI,OAAO,KAAK,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAG;AAE5D,IAAM,MAAM,CAAC,OAAc,OAAe,YAA4B;AAC3E,QAAM,OAAO,MAAM,GAAG,eAAe,QAAG;AACxC,SAAO,GAAG,IAAI,GAAG,WAAW,SAAS,KAAK,IAA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AA,IACF;AACA,WAAO,MAAM,SAAS,KAAM,OAAM,KAAK,EAAE;AACzC,WAAO,MAAM,MAAM,GAAG,IAAI;AAAA,EAC5B;AACF;",
6
- "names": ["truncateToWidth", "truncateToWidth"]
7
- }
@@ -1,37 +0,0 @@
1
- import type { Theme } from "@oh-my-pi/pi-coding-agent";
2
- import type { LcmDashboardNode, LcmStatusSource } from "../fabric-runtime-state.js";
3
- export declare const LCM_NODE_PAGE = 200;
4
- export interface LcmViewSnapshot {
5
- report: ReturnType<LcmStatusSource["report"]>;
6
- coverage: ReturnType<LcmStatusSource["coverage"]>;
7
- preview: ReturnType<LcmStatusSource["preview"]>;
8
- coverageMap: ReturnType<LcmStatusSource["coverageMap"]>;
9
- nodes: LcmDashboardNode[];
10
- offset: number;
11
- hasMore: boolean;
12
- }
13
- export interface LcmNodeDetail {
14
- node: LcmDashboardNode;
15
- revisions: Array<{
16
- revision: number;
17
- text: string;
18
- modelHash: string;
19
- createdAt: number;
20
- }>;
21
- ancestors: string[];
22
- }
23
- export interface LcmSourceEntry {
24
- payloadJson: string;
25
- content: string;
26
- role: string;
27
- createdAt: number;
28
- }
29
- /** Reads every ledger projection the LCM view needs in one pass so rendering never walks the ledger. */
30
- export declare const readLcmSnapshot: (source: LcmStatusSource, offset: number) => LcmViewSnapshot;
31
- export declare const lcmNodeDetail: (source: LcmStatusSource, nodeId: string) => LcmNodeDetail | undefined;
32
- export declare const lcmUnavailableLine: () => string;
33
- export declare const renderLcmCoverageLine: (theme: Theme, snapshot: LcmViewSnapshot, width: number) => string;
34
- export declare const renderLcmNodeLines: (theme: Theme, snapshot: LcmViewSnapshot, width: number, height: number, selectedIndex: number) => string[];
35
- export declare const renderLcmPreviewLines: (theme: Theme, snapshot: LcmViewSnapshot, width: number, height: number) => string[];
36
- export declare const renderLcmDetailLines: (theme: Theme, detail: LcmNodeDetail, sourceIndex: number, entry: LcmSourceEntry | undefined, width: number, height: number) => string[];
37
- //# sourceMappingURL=lcm-panel.d.ts.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Q,MAAM,KACb,aAAa,GAAG,SAQlB,CAAC;AAqBF,eAAO,MAAM,kBAAkB,QAAO,MACsD,CAAC;AAqC7F,eAAO,MAAM,qBAAqB,GAChC,OAAO,KAAK,EACZ,UAAU,eAAe,EACzB,OAAO,MAAM,KACZ,MAMF,CAAC;AAUF,eAAO,MAAM,kBAAkB,GAC7B,OAAO,KAAK,EACZ,UAAU,eAAe,EACzB,OAAO,MAAM,EACb,QAAQ,MAAM,EACd,eAAe,MAAM,KACpB,MAAM,EAwBR,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,OAAO,KAAK,EACZ,UAAU,eAAe,EACzB,OAAO,MAAM,EACb,QAAQ,MAAM,KACb,MAAM,EAiBR,CAAC;AAiDF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,EACZ,QAAQ,aAAa,EACrB,aAAa,MAAM,EACnB,OAAO,cAAc,GAAG,SAAS,EACjC,OAAO,MAAM,EACb,QAAQ,MAAM,KACb,MAAM,EAwER,CAAC"}
@@ -1,23 +0,0 @@
1
- import {
2
- LCM_NODE_PAGE,
3
- lcmNodeDetail,
4
- lcmUnavailableLine,
5
- readLcmSnapshot,
6
- renderLcmCoverageLine,
7
- renderLcmDetailLines,
8
- renderLcmNodeLines,
9
- renderLcmPreviewLines
10
- } from "../chunks/chunk-QZJB7QTM.js";
11
- import "../chunks/chunk-KIH3KLZU.js";
12
- import "../chunks/chunk-QD2B5FUE.js";
13
- export {
14
- LCM_NODE_PAGE,
15
- lcmNodeDetail,
16
- lcmUnavailableLine,
17
- readLcmSnapshot,
18
- renderLcmCoverageLine,
19
- renderLcmDetailLines,
20
- renderLcmNodeLines,
21
- renderLcmPreviewLines
22
- };
23
- //# sourceMappingURL=lcm-panel.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
@@ -1,6 +0,0 @@
1
- ---
2
- status: accepted
3
- ---
4
- # LCM owns the durable context ledger
5
-
6
- OMP Fabric's LCM engine owns a project-scoped SQLite context ledger containing every raw conversation entry indefinitely, plus immutable leaf and condensed summary nodes. The OMP session JSONL remains an integration source for on-demand selected-session reconciliation, while the LCM compaction hook reads ready frontier state and returns the standard OMP result without blocking on maintenance. This replaces the old Fabric projection directly because the required durability, hierarchy, and recovery semantics cannot be provided by the derived memory cache or by a compaction hook alone. The deterministic emergency reducer is retained inside LCM for provider outages, and the existing OMP-native engine remains an explicit delegation path.