elanous 0.2.19 → 0.2.21

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 (509) hide show
  1. package/apps/pwa/out/404/index.html +1 -1
  2. package/apps/pwa/out/404.html +1 -1
  3. package/apps/pwa/out/_next/static/MObU8ujkMciAKr6ljAV05/_buildManifest.js +1 -0
  4. package/apps/pwa/out/_next/static/chunks/088d8e8a.8069543d082bec12.js +160 -0
  5. package/apps/pwa/out/_next/static/chunks/1109.78a7a3288c0259d9.js +148 -0
  6. package/apps/pwa/out/_next/static/chunks/115.1c6690b8604f81c4.js +32 -0
  7. package/apps/pwa/out/_next/static/chunks/119fc678.6f591cdb84ca5791.js +1 -0
  8. package/apps/pwa/out/_next/static/chunks/1262.76a3f08e67c5f816.js +309 -0
  9. package/apps/pwa/out/_next/static/chunks/{4323.c5dfb6f503304775.js → 1268.0840ff91e083fcbd.js} +1 -1
  10. package/apps/pwa/out/_next/static/chunks/1307-c97eba9fb72a9a5e.js +1 -0
  11. package/apps/pwa/out/_next/static/chunks/1358d292.5c87f12cad6eaa91.js +122 -0
  12. package/apps/pwa/out/_next/static/chunks/1438.27a1a7b8f2308004.js +149 -0
  13. package/apps/pwa/out/_next/static/chunks/1442.02d85cd88f4c1eac.js +79 -0
  14. package/apps/pwa/out/_next/static/chunks/1501-1aad662d82ba43f7.js +1 -0
  15. package/apps/pwa/out/_next/static/chunks/1584.9e2dd53da6e6d4b1.js +24 -0
  16. package/apps/pwa/out/_next/static/chunks/1586.b989b0614afb77e6.js +1 -0
  17. package/apps/pwa/out/_next/static/chunks/1609.2ad355062870151f.js +1 -0
  18. package/apps/pwa/out/_next/static/chunks/1612-f6df0fc0eed7157b.js +1 -0
  19. package/apps/pwa/out/_next/static/chunks/1826-5d279da64bbbc2de.js +1 -0
  20. package/apps/pwa/out/_next/static/chunks/1923.37f1d5fe7ebe3860.js +27 -0
  21. package/apps/pwa/out/_next/static/chunks/1948.5f35b39eef222a94.js +5 -0
  22. package/apps/pwa/out/_next/static/chunks/195-fb1d7690bf30bab4.js +1 -0
  23. package/apps/pwa/out/_next/static/chunks/1986-33e13d648a9df765.js +1 -0
  24. package/apps/pwa/out/_next/static/chunks/1993.3fd074a2a246234e.js +1 -0
  25. package/apps/pwa/out/_next/static/chunks/{2977-e38442e86289f1d3.js → 211-9c9090c59e2c5907.js} +1 -1
  26. package/apps/pwa/out/_next/static/chunks/2140.d2daf9ee96e295d1.js +1 -0
  27. package/apps/pwa/out/_next/static/chunks/2196-4700653d12a44b40.js +1 -0
  28. package/apps/pwa/out/_next/static/chunks/2212.0359851457473efc.js +1 -0
  29. package/apps/pwa/out/_next/static/chunks/224.583e562365a52f74.js +1 -0
  30. package/apps/pwa/out/_next/static/chunks/2328.0f37465646bafa7d.js +36 -0
  31. package/apps/pwa/out/_next/static/chunks/2372.bf71372184991937.js +286 -0
  32. package/apps/pwa/out/_next/static/chunks/2489-ff55a35b202c0f94.js +1 -0
  33. package/apps/pwa/out/_next/static/chunks/2537-6c289376caa88ca1.js +1 -0
  34. package/apps/pwa/out/_next/static/chunks/2549-a8515c86f9e8cb96.js +1 -0
  35. package/apps/pwa/out/_next/static/chunks/2655.72cc6a97276c5acc.js +1 -0
  36. package/apps/pwa/out/_next/static/chunks/2699-325cc923ba7b8631.js +1 -0
  37. package/apps/pwa/out/_next/static/chunks/2743-ef6e8c3ced74cce5.js +1 -0
  38. package/apps/pwa/out/_next/static/chunks/2840-5458ad50c49cac6a.js +1 -0
  39. package/apps/pwa/out/_next/static/chunks/2856.f75d5baef7f49b74.js +1 -0
  40. package/apps/pwa/out/_next/static/chunks/311.e685738f92e6e2ec.js +1 -0
  41. package/apps/pwa/out/_next/static/chunks/3194-807b212fb8eae065.js +1 -0
  42. package/apps/pwa/out/_next/static/chunks/3324-d1d2979821dfa845.js +1 -0
  43. package/apps/pwa/out/_next/static/chunks/3344.0de4b0ec5a454b7a.js +1 -0
  44. package/apps/pwa/out/_next/static/chunks/335.a13f339e97893437.js +94 -0
  45. package/apps/pwa/out/_next/static/chunks/3394.646348f34b2500be.js +1 -0
  46. package/apps/pwa/out/_next/static/chunks/3443.6276909b53d72d53.js +1 -0
  47. package/apps/pwa/out/_next/static/chunks/3495.abd4254d808bf2dc.js +1 -0
  48. package/apps/pwa/out/_next/static/chunks/3522-1de1319d028ac89c.js +25 -0
  49. package/apps/pwa/out/_next/static/chunks/3558-bbb5ab553a0471d3.js +1 -0
  50. package/apps/pwa/out/_next/static/chunks/3721.ba5b82db0d9a5572.js +1 -0
  51. package/apps/pwa/out/_next/static/chunks/3857-995ea9f5ef33d71e.js +1 -0
  52. package/apps/pwa/out/_next/static/chunks/3916-3d02dd1fc257dd3c.js +1 -0
  53. package/apps/pwa/out/_next/static/chunks/3919.9ff7dc25afefee33.js +74 -0
  54. package/apps/pwa/out/_next/static/chunks/3998.bd9a69d9b50e9bd2.js +1 -0
  55. package/apps/pwa/out/_next/static/chunks/4003.ab6db1dc266576c9.js +1 -0
  56. package/apps/pwa/out/_next/static/chunks/4144-fad095b48a1862ee.js +1 -0
  57. package/apps/pwa/out/_next/static/chunks/4216.e8ac94b9fe6b96ab.js +1 -0
  58. package/apps/pwa/out/_next/static/chunks/4327.c44dc2b55cb43ee5.js +34 -0
  59. package/apps/pwa/out/_next/static/chunks/4401.94257d497b6d26bc.js +1 -0
  60. package/apps/pwa/out/_next/static/chunks/4559.17ca2cdbaa8d414f.js +115 -0
  61. package/apps/pwa/out/_next/static/chunks/4565-3d7e3fdeb43686a8.js +1 -0
  62. package/apps/pwa/out/_next/static/chunks/4588.ad3364cb7fb97ada.js +86 -0
  63. package/apps/pwa/out/_next/static/chunks/4706.97e734bd4c9816ca.js +1 -0
  64. package/apps/pwa/out/_next/static/chunks/4795-f372490b178583fc.js +1 -0
  65. package/apps/pwa/out/_next/static/chunks/4982.6e44352f751b9a1b.js +77 -0
  66. package/apps/pwa/out/_next/static/chunks/5342.49c5c5a530e62b50.js +1 -0
  67. package/apps/pwa/out/_next/static/chunks/5360-08a80abdf3a4da99.js +1 -0
  68. package/apps/pwa/out/_next/static/chunks/5431.66c58ab1327ee0b7.js +1 -0
  69. package/apps/pwa/out/_next/static/chunks/5717.bcfcb96e701b82e0.js +90 -0
  70. package/apps/pwa/out/_next/static/chunks/5755-30d102586789bf7f.js +1 -0
  71. package/apps/pwa/out/_next/static/chunks/5957.3f1a4012388dd962.js +1 -0
  72. package/apps/pwa/out/_next/static/chunks/5977-59fedea50d13c762.js +1 -0
  73. package/apps/pwa/out/_next/static/chunks/602.9bf02ac8e9502598.js +1 -0
  74. package/apps/pwa/out/_next/static/chunks/6020.3a1b347e2d2dfacc.js +8 -0
  75. package/apps/pwa/out/_next/static/chunks/{4847.56f5bc454fbcc827.js → 6110.1297d4093fdfbb0d.js} +2 -2
  76. package/apps/pwa/out/_next/static/chunks/6158.566c890adc06a459.js +2 -0
  77. package/apps/pwa/out/_next/static/chunks/6375.fce1d174ba6d0324.js +64 -0
  78. package/apps/pwa/out/_next/static/chunks/6546.92a828aef441271f.js +1 -0
  79. package/apps/pwa/out/_next/static/chunks/658.957fdb0a8c6c6c8e.js +287 -0
  80. package/apps/pwa/out/_next/static/chunks/6706.323590aabb8b1293.js +226 -0
  81. package/apps/pwa/out/_next/static/chunks/6747.b67947f293a4c02d.js +1 -0
  82. package/apps/pwa/out/_next/static/chunks/6767.8e6c5f6e744fcd9f.js +38 -0
  83. package/apps/pwa/out/_next/static/chunks/6868.000b24a3045c5574.js +1 -0
  84. package/apps/pwa/out/_next/static/chunks/6877-74399f69c7da1433.js +1 -0
  85. package/apps/pwa/out/_next/static/chunks/6946.bba74e9c96050f30.js +1 -0
  86. package/apps/pwa/out/_next/static/chunks/7033.a558f1b2f6912a53.js +1 -0
  87. package/apps/pwa/out/_next/static/chunks/7065.46029c26c53eac50.js +1 -0
  88. package/apps/pwa/out/_next/static/chunks/7087.6fae577d09249bc1.js +1 -0
  89. package/apps/pwa/out/_next/static/chunks/7175-350f4ce2873bc038.js +1 -0
  90. package/apps/pwa/out/_next/static/chunks/722.de8d9801e0f6d414.js +41 -0
  91. package/apps/pwa/out/_next/static/chunks/{1470.98a6ab61ccb4131c.js → 726.83532d69452ee24b.js} +1 -1
  92. package/apps/pwa/out/_next/static/chunks/7290-f09c928a06c52e2d.js +1 -0
  93. package/apps/pwa/out/_next/static/chunks/{6062-73e68343a9814f6a.js → 7327-2d69fb321ba73389.js} +1 -1
  94. package/apps/pwa/out/_next/static/chunks/7497.57981e9d7a75a52a.js +24 -0
  95. package/apps/pwa/out/_next/static/chunks/7630.2b9a68659053ff4e.js +193 -0
  96. package/apps/pwa/out/_next/static/chunks/7672.4af122ad892117c7.js +1 -0
  97. package/apps/pwa/out/_next/static/chunks/771.6ab889a233e7dae7.js +1 -0
  98. package/apps/pwa/out/_next/static/chunks/7797-df5aa0381fdc078f.js +1 -0
  99. package/apps/pwa/out/_next/static/chunks/7899.597af4a9996c907f.js +1 -0
  100. package/apps/pwa/out/_next/static/chunks/79b78388.663188133449d707.js +1 -0
  101. package/apps/pwa/out/_next/static/chunks/8060-cc008cc6fedfa818.js +1 -0
  102. package/apps/pwa/out/_next/static/chunks/8085-d065d0393c1760f5.js +1 -0
  103. package/apps/pwa/out/_next/static/chunks/8096.f7da0776cfde6300.js +1 -0
  104. package/apps/pwa/out/_next/static/chunks/8194.484f51e273d9abd2.js +217 -0
  105. package/apps/pwa/out/_next/static/chunks/8401-35e94e9091f5eb8d.js +1 -0
  106. package/apps/pwa/out/_next/static/chunks/8682-7061dd4fa7bd62ed.js +1 -0
  107. package/apps/pwa/out/_next/static/chunks/8695-846034ce44852c70.js +1 -0
  108. package/apps/pwa/out/_next/static/chunks/8769.815ca69879f608b4.js +104 -0
  109. package/apps/pwa/out/_next/static/chunks/8857-f1762140ef9a96b1.js +1 -0
  110. package/apps/pwa/out/_next/static/chunks/88729267.9c6c000157c83f2f.js +62 -0
  111. package/apps/pwa/out/_next/static/chunks/8f835b4f.048eeb02299e3e12.js +1 -0
  112. package/apps/pwa/out/_next/static/chunks/9068.5f2764fccf86c1b2.js +93 -0
  113. package/apps/pwa/out/_next/static/chunks/9070.067c106528ec1ae6.js +1 -0
  114. package/apps/pwa/out/_next/static/chunks/9103-60fbef33e66f0a46.js +1 -0
  115. package/apps/pwa/out/_next/static/chunks/9247-7581825d511a64c0.js +1 -0
  116. package/apps/pwa/out/_next/static/chunks/{7647.2fcd30d894d5ee30.js → 935.4ddaa99fc1d1126c.js} +1 -1
  117. package/apps/pwa/out/_next/static/chunks/9451.ebfb0dcc9c02250f.js +23 -0
  118. package/apps/pwa/out/_next/static/chunks/9497-b0e758d1cd4ae8d7.js +1 -0
  119. package/apps/pwa/out/_next/static/chunks/9559.e648369b1d57cf9a.js +62 -0
  120. package/apps/pwa/out/_next/static/chunks/9832.2ab2e818013574c7.js +1 -0
  121. package/apps/pwa/out/_next/static/chunks/a9f2b54d-40c16bd0efdb04b8.js +1 -0
  122. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-c1a96669158471ec.js +1 -0
  123. package/apps/pwa/out/_next/static/chunks/app/approvals/page-937c92292a4ab4f0.js +1 -0
  124. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-d781be3e3a9cfd74.js +1 -0
  125. package/apps/pwa/out/_next/static/chunks/app/board/page-b0a80997903852d8.js +1 -0
  126. package/apps/pwa/out/_next/static/chunks/app/botlab/page-2b1263165630d9c8.js +1 -0
  127. package/apps/pwa/out/_next/static/chunks/app/bots/page-ea998f7f5d156bea.js +1 -0
  128. package/apps/pwa/out/_next/static/chunks/app/ceo/page-33c328b64ca508f8.js +1 -0
  129. package/apps/pwa/out/_next/static/chunks/app/chat/page-e2d6bed48ac20120.js +1 -0
  130. package/apps/pwa/out/_next/static/chunks/app/consult/page-111cabe4d1fd69ae.js +1 -0
  131. package/apps/pwa/out/_next/static/chunks/app/control/page-544dd4bd4847eeb7.js +1 -0
  132. package/apps/pwa/out/_next/static/chunks/app/decisions/page-3ee191319bf97d87.js +1 -0
  133. package/apps/pwa/out/_next/static/chunks/app/design-check/page-e4bcb2c503dab04b.js +1 -0
  134. package/apps/pwa/out/_next/static/chunks/app/editor/page-300897dcbbd5ed76.js +1 -0
  135. package/apps/pwa/out/_next/static/chunks/app/exec/page-a449f1ed472b81c2.js +1 -0
  136. package/apps/pwa/out/_next/static/chunks/app/field/page-9045094d6d3b5cd0.js +1 -0
  137. package/apps/pwa/out/_next/static/chunks/app/healthz/route-c1a96669158471ec.js +1 -0
  138. package/apps/pwa/out/_next/static/chunks/app/inside/page-c06673596849ef45.js +1 -0
  139. package/apps/pwa/out/_next/static/chunks/app/intake/page-103fa3191c1b2e08.js +1 -0
  140. package/apps/pwa/out/_next/static/chunks/app/layout-9f81233f29dcd409.js +1 -0
  141. package/apps/pwa/out/_next/static/chunks/app/live/{page-b70cd005d9169e25.js → page-be8b4615c919e36c.js} +1 -1
  142. package/apps/pwa/out/_next/static/chunks/app/live-run/page-c685b104e0dfa609.js +1 -0
  143. package/apps/pwa/out/_next/static/chunks/app/loops/page-8d693331cfbb6add.js +1 -0
  144. package/apps/pwa/out/_next/static/chunks/app/market/page-cef4f30a4c22fae1.js +1 -0
  145. package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-66ea1b54fc83fa15.js +1 -0
  146. package/apps/pwa/out/_next/static/chunks/app/morning/page-7a12f61be4a579d1.js +1 -0
  147. package/apps/pwa/out/_next/static/chunks/app/not-found-c85b0589591a99c9.js +1 -0
  148. package/apps/pwa/out/_next/static/chunks/app/observatory/page-725a4da02dd129eb.js +1 -0
  149. package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-8cc707bd09a497d9.js +1 -0
  150. package/apps/pwa/out/_next/static/chunks/app/ops/release/page-90b55be1f15ce0e8.js +1 -0
  151. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-cb16606e08be65db.js +1 -0
  152. package/apps/pwa/out/_next/static/chunks/app/outputs/page-16dc64b74ed6a40a.js +1 -0
  153. package/apps/pwa/out/_next/static/chunks/app/page-21bec4afeb2f0917.js +1 -0
  154. package/apps/pwa/out/_next/static/chunks/app/reflection/page-dc39ee7a36d26385.js +1 -0
  155. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-84ae759f76053672.js +1 -0
  156. package/apps/pwa/out/_next/static/chunks/app/sessions/page-3db58ddb61fe2be9.js +1 -0
  157. package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-c5315e30f3528dc4.js +1 -0
  158. package/apps/pwa/out/_next/static/chunks/app/settings/page-2fe368efb6de3b6a.js +1 -0
  159. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-8d04132dd0ac5e10.js +1 -0
  160. package/apps/pwa/out/_next/static/chunks/app/setup/layout-c1a96669158471ec.js +1 -0
  161. package/apps/pwa/out/_next/static/chunks/app/setup/page-f23484de467c9ea3.js +1 -0
  162. package/apps/pwa/out/_next/static/chunks/app/share/page-c69762987b751174.js +1 -0
  163. package/apps/pwa/out/_next/static/chunks/app/showroom/page-5456692bda39aafb.js +1 -0
  164. package/apps/pwa/out/_next/static/chunks/app/tasks/page-d75f7cd65845ce98.js +1 -0
  165. package/apps/pwa/out/_next/static/chunks/app/term/page-5603f5e568b25ce3.js +1 -0
  166. package/apps/pwa/out/_next/static/chunks/app/today/page-d2cc0f4e89f42028.js +1 -0
  167. package/apps/pwa/out/_next/static/chunks/app/trace/page-a6eb73b8a4840f1c.js +1 -0
  168. package/apps/pwa/out/_next/static/chunks/app/vault/page-c0a3f4d10edb83fa.js +1 -0
  169. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-6c0b88068c143f15.js +1 -0
  170. package/apps/pwa/out/_next/static/chunks/app/workflows/page-7f8d7fcdf058a845.js +1 -0
  171. package/apps/pwa/out/_next/static/chunks/app/workspace/page-22163556cd38bc88.js +1 -0
  172. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-141436fd26dd56fc.js +1 -0
  173. package/apps/pwa/out/_next/static/chunks/d70879db.c66c56a95a91efc6.js +66 -0
  174. package/apps/pwa/out/_next/static/chunks/{8046cadf-211ca3c0e00f2b72.js → f6231284-45726550aba08fca.js} +1 -1
  175. package/apps/pwa/out/_next/static/chunks/{2ea96958.e8c7e112de50b067.js → f6b7c9ba.64a895b8b2fedbdc.js} +1 -1
  176. package/apps/pwa/out/_next/static/chunks/f8626309.a4e5d362b1d55e59.js +1 -0
  177. package/apps/pwa/out/_next/static/chunks/framework-5c169757551134ed.js +1 -0
  178. package/apps/pwa/out/_next/static/chunks/main-59fe95fed40c7a01.js +1 -0
  179. package/apps/pwa/out/_next/static/chunks/main-app-4ca74dbbee7057c6.js +1 -0
  180. package/apps/pwa/out/_next/static/chunks/pages/_app-13a0a886df4d97a1.js +1 -0
  181. package/apps/pwa/out/_next/static/chunks/pages/_error-6af8591cd3a3f038.js +1 -0
  182. package/apps/pwa/out/_next/static/chunks/webpack-f2b4016b9b981bc8.js +1 -0
  183. package/apps/pwa/out/_next/static/css/{d3427996da11e480.css → b9d8151e48998417.css} +1 -1
  184. package/apps/pwa/out/_next/static/css/e81df11490b4413b.css +1 -0
  185. package/apps/pwa/out/approvals/index.html +1 -1
  186. package/apps/pwa/out/approvals/index.txt +23 -23
  187. package/apps/pwa/out/autopilot/index.html +1 -1
  188. package/apps/pwa/out/autopilot/index.txt +23 -23
  189. package/apps/pwa/out/board/index.html +1 -1
  190. package/apps/pwa/out/board/index.txt +23 -23
  191. package/apps/pwa/out/botlab/index.html +1 -1
  192. package/apps/pwa/out/botlab/index.txt +22 -22
  193. package/apps/pwa/out/bots/index.html +1 -1
  194. package/apps/pwa/out/bots/index.txt +22 -22
  195. package/apps/pwa/out/ceo/index.html +1 -1
  196. package/apps/pwa/out/ceo/index.txt +23 -23
  197. package/apps/pwa/out/chat/index.html +1 -1
  198. package/apps/pwa/out/chat/index.txt +22 -22
  199. package/apps/pwa/out/consult/index.html +1 -1
  200. package/apps/pwa/out/consult/index.txt +23 -23
  201. package/apps/pwa/out/control/index.html +1 -1
  202. package/apps/pwa/out/control/index.txt +23 -23
  203. package/apps/pwa/out/decisions/index.html +1 -1
  204. package/apps/pwa/out/decisions/index.txt +22 -22
  205. package/apps/pwa/out/design-check/index.html +1 -1
  206. package/apps/pwa/out/design-check/index.txt +23 -23
  207. package/apps/pwa/out/editor/index.html +1 -1
  208. package/apps/pwa/out/editor/index.txt +24 -24
  209. package/apps/pwa/out/exec/index.html +1 -1
  210. package/apps/pwa/out/exec/index.txt +23 -23
  211. package/apps/pwa/out/field/index.html +1 -1
  212. package/apps/pwa/out/field/index.txt +23 -23
  213. package/apps/pwa/out/healthz +1 -1
  214. package/apps/pwa/out/index.html +1 -1
  215. package/apps/pwa/out/index.txt +22 -22
  216. package/apps/pwa/out/inside/index.html +1 -1
  217. package/apps/pwa/out/inside/index.txt +23 -23
  218. package/apps/pwa/out/intake/index.html +1 -1
  219. package/apps/pwa/out/intake/index.txt +23 -23
  220. package/apps/pwa/out/live/index.html +1 -1
  221. package/apps/pwa/out/live/index.txt +23 -23
  222. package/apps/pwa/out/live-run/index.html +1 -0
  223. package/apps/pwa/out/live-run/index.txt +35 -0
  224. package/apps/pwa/out/loops/index.html +1 -1
  225. package/apps/pwa/out/loops/index.txt +22 -22
  226. package/apps/pwa/out/market/index.html +1 -1
  227. package/apps/pwa/out/market/index.txt +22 -22
  228. package/apps/pwa/out/missions/placeholder/index.html +1 -1
  229. package/apps/pwa/out/missions/placeholder/index.txt +22 -22
  230. package/apps/pwa/out/morning/index.html +1 -1
  231. package/apps/pwa/out/morning/index.txt +23 -23
  232. package/apps/pwa/out/observatory/index.html +1 -1
  233. package/apps/pwa/out/observatory/index.txt +23 -23
  234. package/apps/pwa/out/ops/checklist/index.html +1 -1
  235. package/apps/pwa/out/ops/checklist/index.txt +22 -22
  236. package/apps/pwa/out/ops/release/index.html +1 -1
  237. package/apps/pwa/out/ops/release/index.txt +22 -22
  238. package/apps/pwa/out/ops/seats/index.html +1 -1
  239. package/apps/pwa/out/ops/seats/index.txt +22 -22
  240. package/apps/pwa/out/outputs/index.html +1 -1
  241. package/apps/pwa/out/outputs/index.txt +22 -22
  242. package/apps/pwa/out/reflection/index.html +1 -1
  243. package/apps/pwa/out/reflection/index.txt +23 -23
  244. package/apps/pwa/out/scheduler/index.html +1 -1
  245. package/apps/pwa/out/scheduler/index.txt +23 -23
  246. package/apps/pwa/out/sessions/index.html +1 -1
  247. package/apps/pwa/out/sessions/index.txt +22 -22
  248. package/apps/pwa/out/settings/devices/index.html +1 -1
  249. package/apps/pwa/out/settings/devices/index.txt +23 -23
  250. package/apps/pwa/out/settings/index.html +1 -1
  251. package/apps/pwa/out/settings/index.txt +23 -23
  252. package/apps/pwa/out/setup/done/index.html +1 -1
  253. package/apps/pwa/out/setup/done/index.txt +23 -23
  254. package/apps/pwa/out/setup/index.html +1 -1
  255. package/apps/pwa/out/setup/index.txt +23 -23
  256. package/apps/pwa/out/share/index.html +1 -1
  257. package/apps/pwa/out/share/index.txt +23 -23
  258. package/apps/pwa/out/showroom/index.html +1 -1
  259. package/apps/pwa/out/showroom/index.txt +22 -22
  260. package/apps/pwa/out/tasks/index.html +1 -1
  261. package/apps/pwa/out/tasks/index.txt +23 -23
  262. package/apps/pwa/out/term/index.html +1 -1
  263. package/apps/pwa/out/term/index.txt +23 -23
  264. package/apps/pwa/out/today/index.html +1 -1
  265. package/apps/pwa/out/today/index.txt +23 -23
  266. package/apps/pwa/out/trace/index.html +1 -1
  267. package/apps/pwa/out/trace/index.txt +23 -23
  268. package/apps/pwa/out/vault/index.html +1 -1
  269. package/apps/pwa/out/vault/index.txt +23 -23
  270. package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
  271. package/apps/pwa/out/workflows/chat-ui/index.txt +23 -23
  272. package/apps/pwa/out/workflows/index.html +1 -1
  273. package/apps/pwa/out/workflows/index.txt +23 -23
  274. package/apps/pwa/out/workspace/index.html +1 -1
  275. package/apps/pwa/out/workspace/index.txt +23 -23
  276. package/apps/pwa/out/worktrees/index.html +1 -1
  277. package/apps/pwa/out/worktrees/index.txt +23 -23
  278. package/graphs/demo/editor-recipes.yaml +22 -0
  279. package/graphs/drafts/recipes.yaml +4 -4
  280. package/graphs/implement-loop.yaml +277 -5
  281. package/graphs/retro/daily.yaml +25 -0
  282. package/graphs/retro/recipes.yaml +24 -0
  283. package/package.json +1 -1
  284. package/scripts/ask-marker-check.ts +3 -1
  285. package/scripts/coord-channel-watch.sh +31 -4
  286. package/scripts/docs-lint.ts +4 -1
  287. package/scripts/land-global-checks.ts +89 -0
  288. package/scripts/lib/pch-regress-map.ts +2 -1
  289. package/scripts/marketing/generate-ax-brief.ts +18 -1
  290. package/scripts/measure-nl-routing-corpus.ts +11 -3
  291. package/scripts/release-loop/gate-node.ts +296 -25
  292. package/scripts/release-loop/gate-timing.ts +116 -7
  293. package/scripts/release-loop/preflight.ts +6 -4
  294. package/scripts/release-loop/publish-window.ts +141 -0
  295. package/scripts/release-loop/release-docs.ts +1 -4
  296. package/scripts/release-loop/release-universe.ts +38 -0
  297. package/scripts/release-loop/resume-release.ts +4 -1
  298. package/scripts/release-loop/shard-plan.ts +50 -5
  299. package/scripts/release-loop/unattended-release.ts +10 -2
  300. package/scripts/release-story/draft.ts +5 -1
  301. package/scripts/retro/shadow-compare.ts +71 -0
  302. package/scripts/rhythm/daily.ts +8 -2
  303. package/src/agent-mission/driver.ts +34 -6
  304. package/src/autopilot/build/llm-conflict-merge.ts +132 -7
  305. package/src/autopilot/build/merge-intent.ts +135 -7
  306. package/src/away/release-watch.ts +20 -3
  307. package/src/browser-cdp/client.ts +10 -5
  308. package/src/cli/config-drift.ts +513 -0
  309. package/src/cli/log-event-names.ts +4 -0
  310. package/src/cli/ops-cli.ts +11 -0
  311. package/src/cli/ops-overview-cli.ts +50 -0
  312. package/src/cli/pod-cli.ts +1 -0
  313. package/src/cli/pr-cli.ts +20 -0
  314. package/src/cli/release-cli.ts +20 -5
  315. package/src/cli/retro-cli.ts +78 -0
  316. package/src/cli/tasks-cli.ts +200 -8
  317. package/src/dashboard/index.ts +40 -4
  318. package/src/dashboard/slash-runtime/dashboard-handlers.ts +5 -4
  319. package/src/dashboard/slash-runtime/help-from-registry.ts +57 -31
  320. package/src/domains/outbound-log-probe.ts +6 -1
  321. package/src/esc-abort-gate.ts +3 -1
  322. package/src/graph-runner/graph-cli.ts +57 -0
  323. package/src/graph-runner/graph-run-api.ts +218 -0
  324. package/src/graph-runner/runner.ts +11 -1
  325. package/src/graph-wizard/archetypes.ts +88 -0
  326. package/src/graph-wizard/generate.ts +545 -0
  327. package/src/graph-wizard/saved-steps.ts +120 -0
  328. package/src/graph-wizard/steps.ts +193 -0
  329. package/src/harness/harness-cli-command.ts +482 -59
  330. package/src/harness/harness-queue.ts +315 -25
  331. package/src/harness/harness-salvage-cli.ts +62 -0
  332. package/src/hq/fence-outcomes.ts +63 -0
  333. package/src/hq/fence-wrapper.ts +33 -0
  334. package/src/hq/hq.ts +11 -1
  335. package/src/index.ts +76 -10
  336. package/src/intake-plane/digest.ts +18 -11
  337. package/src/maturity/feature-maturity.ts +4 -3
  338. package/src/nexus/api/draft-metrics.ts +114 -0
  339. package/src/nexus/api/graph-kinds.ts +10 -4
  340. package/src/nexus/api/graph-wizard-api.ts +53 -0
  341. package/src/nexus/api/graphs-api.ts +220 -10
  342. package/src/nexus/api/harness-traversal.ts +205 -0
  343. package/src/nexus/api/http-server.ts +69 -3
  344. package/src/nexus/api/loop-edges.ts +4 -2
  345. package/src/nexus/api/ops-api.ts +22 -7
  346. package/src/nexus/api/ops-board-route.ts +48 -0
  347. package/src/nexus/outbound/router.ts +28 -8
  348. package/src/onboarding/entry-hints.ts +5 -0
  349. package/src/onboarding/first-run.ts +3 -0
  350. package/src/onboarding.ts +24 -6
  351. package/src/ops/overview-collect.ts +345 -0
  352. package/src/ops/overview-seat-era.ts +90 -0
  353. package/src/ops/overview.ts +223 -0
  354. package/src/release-loop/feature-store.ts +14 -11
  355. package/src/release-loop/gate-shards.ts +163 -0
  356. package/src/release-loop/release-schedule.ts +6 -2
  357. package/src/retro/daily.ts +372 -0
  358. package/src/seat-loop/op-decide.ts +173 -0
  359. package/src/seat-loop/seat-loop.ts +60 -3
  360. package/src/seat-loop/seat-report.ts +58 -3
  361. package/src/self-dev/ask-launch-flow.ts +9 -6
  362. package/src/self-dev/ask-launch-io.ts +52 -2
  363. package/src/self-dev/ask-path-candidates.ts +40 -2
  364. package/src/self-dev/draft-sweep.ts +371 -16
  365. package/src/self-dev/draft-triage-rules.ts +19 -4
  366. package/src/self-dev/graph-journey-nodes.ts +157 -0
  367. package/src/self-dev/graph-journey-route.ts +105 -0
  368. package/src/self-dev/launch-preflight.ts +43 -3
  369. package/src/self-dev/pr-preview.ts +84 -16
  370. package/src/self-dev/release-path-guard.ts +7 -4
  371. package/src/self-implement/blocked-draft-policy.ts +101 -0
  372. package/src/self-implement/execution-clarification.ts +11 -0
  373. package/src/self-implement/frozen-merges.ts +23 -0
  374. package/src/self-implement/gate-env-retry.ts +83 -0
  375. package/src/self-implement/goal-author.ts +14 -0
  376. package/src/self-implement/heal-intake.ts +3 -0
  377. package/src/self-implement/orchestrator.ts +234 -6
  378. package/src/self-implement/run-stop.ts +123 -0
  379. package/src/self-implement/run-ttl.ts +258 -0
  380. package/src/self-implement/salvage-retention.ts +123 -0
  381. package/src/self-implement/seams.ts +7 -0
  382. package/src/self-implement/self-implement-cli.ts +2 -0
  383. package/src/self-implement/self-implement-runtime.ts +12 -0
  384. package/src/self-implement/sibling-resync.ts +223 -0
  385. package/src/self-implement/stop-autoheal.ts +204 -0
  386. package/src/session-runtime/index.ts +5 -3
  387. package/src/shell-env-bootstrap.ts +17 -3
  388. package/src/task-agent/board.ts +1 -1
  389. package/src/task-agent/card-evidence.ts +105 -10
  390. package/src/task-agent/judge.ts +7 -0
  391. package/src/task-agent/live-moves.ts +120 -20
  392. package/src/task-agent/mission.ts +1 -1
  393. package/src/task-agent/parent-host.ts +315 -0
  394. package/src/task-agent/shadow.ts +10 -1
  395. package/src/task-agent/task-hand.ts +16 -4
  396. package/src/task-orchestrator/surfaces/pod-command-job.ts +60 -11
  397. package/src/task-orchestrator/surfaces/pod-failure-reason.ts +4 -0
  398. package/src/task-orchestrator/surfaces/pod-gate-deps.ts +123 -0
  399. package/src/task-orchestrator/surfaces/pod-install-slots.ts +89 -0
  400. package/src/task-orchestrator/surfaces/pod-lease.ts +93 -10
  401. package/src/task-orchestrator/surfaces/pod-pool.ts +147 -34
  402. package/src/task-orchestrator/surfaces/self-implement-pod.ts +58 -9
  403. package/src/telegram-commands.ts +41 -0
  404. package/src/testing/real-cli-spawn.ts +106 -0
  405. package/src/tool-runtime/browser-runtime.ts +87 -3
  406. package/src/tool-runtime/index.ts +1 -0
  407. package/src/user-config.ts +76 -7
  408. package/src/version/packed-revision.json +1 -1
  409. package/apps/pwa/out/_next/static/J5H7BvqgSI8DUjtRRcA_S/_buildManifest.js +0 -1
  410. package/apps/pwa/out/_next/static/chunks/1105-c473ed46272fba79.js +0 -1
  411. package/apps/pwa/out/_next/static/chunks/1157-cba0e8553d35a980.js +0 -1
  412. package/apps/pwa/out/_next/static/chunks/171-23a877ed11720de9.js +0 -1
  413. package/apps/pwa/out/_next/static/chunks/216-5acd01cbde4acda7.js +0 -1
  414. package/apps/pwa/out/_next/static/chunks/2330-c2f07246c8788af1.js +0 -1
  415. package/apps/pwa/out/_next/static/chunks/2336-e830c777eb6bce04.js +0 -1
  416. package/apps/pwa/out/_next/static/chunks/2375-e061bb24cd2b5cde.js +0 -1
  417. package/apps/pwa/out/_next/static/chunks/2415.ed6428ff334c7ce2.js +0 -1
  418. package/apps/pwa/out/_next/static/chunks/3094.67339318c7f72a3a.js +0 -2
  419. package/apps/pwa/out/_next/static/chunks/338-ceb956612dcfaa86.js +0 -1
  420. package/apps/pwa/out/_next/static/chunks/3395-835e4ceaa6335ba4.js +0 -1
  421. package/apps/pwa/out/_next/static/chunks/3403.4bc97b4066945a94.js +0 -5
  422. package/apps/pwa/out/_next/static/chunks/3441-be82e3595aef3a20.js +0 -1
  423. package/apps/pwa/out/_next/static/chunks/3689-89905039bf3e7257.js +0 -1
  424. package/apps/pwa/out/_next/static/chunks/371-4ad6af55dad02ced.js +0 -1
  425. package/apps/pwa/out/_next/static/chunks/3822-6f268bc26c6a84ac.js +0 -1
  426. package/apps/pwa/out/_next/static/chunks/4114-3e63117452378807.js +0 -1
  427. package/apps/pwa/out/_next/static/chunks/4457-d7df81c90f9d0268.js +0 -1
  428. package/apps/pwa/out/_next/static/chunks/4551-77dadae76f6cbace.js +0 -1
  429. package/apps/pwa/out/_next/static/chunks/4978.6fd93b974441e87f.js +0 -1
  430. package/apps/pwa/out/_next/static/chunks/5012-f746f6549b869f91.js +0 -1
  431. package/apps/pwa/out/_next/static/chunks/5609-012bb3557211f07e.js +0 -1
  432. package/apps/pwa/out/_next/static/chunks/5791-bb82743fa6299562.js +0 -1
  433. package/apps/pwa/out/_next/static/chunks/62-5bfed1e23790b745.js +0 -1
  434. package/apps/pwa/out/_next/static/chunks/6320-9bc8561fde416e07.js +0 -1
  435. package/apps/pwa/out/_next/static/chunks/649-ca96d1c5d09e02b8.js +0 -1
  436. package/apps/pwa/out/_next/static/chunks/6725-68ab7cc0b1faf00d.js +0 -1
  437. package/apps/pwa/out/_next/static/chunks/6726-85a7db59b288c53f.js +0 -1
  438. package/apps/pwa/out/_next/static/chunks/6735-33267c4630d0d963.js +0 -1
  439. package/apps/pwa/out/_next/static/chunks/6998-a654fe5c58271600.js +0 -1
  440. package/apps/pwa/out/_next/static/chunks/7633-141682015873beb6.js +0 -1
  441. package/apps/pwa/out/_next/static/chunks/7673-2eda1507d38dadb8.js +0 -1
  442. package/apps/pwa/out/_next/static/chunks/7990-e12efba616f46e03.js +0 -1
  443. package/apps/pwa/out/_next/static/chunks/8067-143791231c99bd02.js +0 -1
  444. package/apps/pwa/out/_next/static/chunks/8142-744998d65d7bb17e.js +0 -1
  445. package/apps/pwa/out/_next/static/chunks/8430-a10cfba8ef282d4e.js +0 -1
  446. package/apps/pwa/out/_next/static/chunks/8870-9614a213b990b10b.js +0 -25
  447. package/apps/pwa/out/_next/static/chunks/920-f7dceb78f1c585ef.js +0 -1
  448. package/apps/pwa/out/_next/static/chunks/9454-12c2f30dea62291c.js +0 -1
  449. package/apps/pwa/out/_next/static/chunks/976-4a9b4ebdca7c739a.js +0 -1
  450. package/apps/pwa/out/_next/static/chunks/9989-15cdf568bafa9fc8.js +0 -1
  451. package/apps/pwa/out/_next/static/chunks/ae787e4c-e5b1ef00b2dbceca.js +0 -1
  452. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-859cea1570b6227a.js +0 -1
  453. package/apps/pwa/out/_next/static/chunks/app/approvals/page-deef5ee191830f14.js +0 -1
  454. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-b193da485f9a14b2.js +0 -1
  455. package/apps/pwa/out/_next/static/chunks/app/board/page-b6e1a79df0e214f4.js +0 -1
  456. package/apps/pwa/out/_next/static/chunks/app/botlab/page-e84df4d907f703c7.js +0 -1
  457. package/apps/pwa/out/_next/static/chunks/app/bots/page-a5fb9a5db89ae4ea.js +0 -1
  458. package/apps/pwa/out/_next/static/chunks/app/ceo/page-1499f481d7fc52d6.js +0 -1
  459. package/apps/pwa/out/_next/static/chunks/app/chat/page-c7cf753aeb648790.js +0 -1
  460. package/apps/pwa/out/_next/static/chunks/app/consult/page-4118469e514e10fd.js +0 -1
  461. package/apps/pwa/out/_next/static/chunks/app/control/page-e968f7630654332a.js +0 -1
  462. package/apps/pwa/out/_next/static/chunks/app/decisions/page-505915052f947022.js +0 -1
  463. package/apps/pwa/out/_next/static/chunks/app/design-check/page-c2f962fb4a3b06c6.js +0 -1
  464. package/apps/pwa/out/_next/static/chunks/app/editor/page-7b5ed0bd8a589ec4.js +0 -1
  465. package/apps/pwa/out/_next/static/chunks/app/exec/page-cf8193250dd42dd4.js +0 -1
  466. package/apps/pwa/out/_next/static/chunks/app/field/page-cf3f5dfa35dea8e9.js +0 -1
  467. package/apps/pwa/out/_next/static/chunks/app/healthz/route-859cea1570b6227a.js +0 -1
  468. package/apps/pwa/out/_next/static/chunks/app/inside/page-5b29d9b06ceadade.js +0 -1
  469. package/apps/pwa/out/_next/static/chunks/app/intake/page-a15e7fcc283e9ca7.js +0 -1
  470. package/apps/pwa/out/_next/static/chunks/app/layout-d2915e7b70ff3d0e.js +0 -1
  471. package/apps/pwa/out/_next/static/chunks/app/loops/page-2595f0eba29f57e1.js +0 -1
  472. package/apps/pwa/out/_next/static/chunks/app/market/page-c776322454156e36.js +0 -1
  473. package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-77bbd17f4435aa10.js +0 -1
  474. package/apps/pwa/out/_next/static/chunks/app/morning/page-049689e611ecc936.js +0 -1
  475. package/apps/pwa/out/_next/static/chunks/app/not-found-85954a4fb09c44eb.js +0 -1
  476. package/apps/pwa/out/_next/static/chunks/app/observatory/page-e773e552e1068ee6.js +0 -1
  477. package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-5633c4bfa7684b4a.js +0 -1
  478. package/apps/pwa/out/_next/static/chunks/app/ops/release/page-d829b92bd01b4994.js +0 -1
  479. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-061c317fc771becf.js +0 -1
  480. package/apps/pwa/out/_next/static/chunks/app/outputs/page-3a45ece8865ed4b6.js +0 -1
  481. package/apps/pwa/out/_next/static/chunks/app/page-0be990618c0d56bd.js +0 -1
  482. package/apps/pwa/out/_next/static/chunks/app/reflection/page-bfea4865dc244b73.js +0 -1
  483. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-0d6ba8e337741484.js +0 -1
  484. package/apps/pwa/out/_next/static/chunks/app/sessions/page-76a88b55d816482e.js +0 -1
  485. package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-bba1542df59f61ce.js +0 -1
  486. package/apps/pwa/out/_next/static/chunks/app/settings/page-4185c95689bb372e.js +0 -1
  487. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-b699e1a8d5d34b8b.js +0 -1
  488. package/apps/pwa/out/_next/static/chunks/app/setup/layout-859cea1570b6227a.js +0 -1
  489. package/apps/pwa/out/_next/static/chunks/app/setup/page-c225e338c31bf274.js +0 -1
  490. package/apps/pwa/out/_next/static/chunks/app/share/page-449353f70507ca1f.js +0 -1
  491. package/apps/pwa/out/_next/static/chunks/app/showroom/page-90b889714102476d.js +0 -1
  492. package/apps/pwa/out/_next/static/chunks/app/tasks/page-f1ee7fbeb7f96ddc.js +0 -1
  493. package/apps/pwa/out/_next/static/chunks/app/term/page-d59a95e1434dfaa0.js +0 -1
  494. package/apps/pwa/out/_next/static/chunks/app/today/page-71491a23414d1a47.js +0 -1
  495. package/apps/pwa/out/_next/static/chunks/app/trace/page-de7112bdb65fa4fe.js +0 -1
  496. package/apps/pwa/out/_next/static/chunks/app/vault/page-feb4d0d88079660d.js +0 -1
  497. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-f17d887b40dd6b1d.js +0 -1
  498. package/apps/pwa/out/_next/static/chunks/app/workflows/page-8da77be2192bcd5d.js +0 -1
  499. package/apps/pwa/out/_next/static/chunks/app/workspace/page-72c3b9a5e9582b29.js +0 -1
  500. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-c3afe4c8d0c48c39.js +0 -1
  501. package/apps/pwa/out/_next/static/chunks/framework-ea806bb57f2b8923.js +0 -1
  502. package/apps/pwa/out/_next/static/chunks/main-8d2302399c2c8f87.js +0 -1
  503. package/apps/pwa/out/_next/static/chunks/main-app-b9308f2d8a931531.js +0 -1
  504. package/apps/pwa/out/_next/static/chunks/pages/_app-b10928c60f0b8488.js +0 -1
  505. package/apps/pwa/out/_next/static/chunks/pages/_error-689039227d443fab.js +0 -1
  506. package/apps/pwa/out/_next/static/chunks/webpack-6f35f9d892fa630b.js +0 -1
  507. package/apps/pwa/out/_next/static/css/85f53c6f35d11382.css +0 -1
  508. /package/apps/pwa/out/_next/static/{J5H7BvqgSI8DUjtRRcA_S → MObU8ujkMciAKr6ljAV05}/_ssgManifest.js +0 -0
  509. /package/skills/project-onboarding/{skill.md → SKILL.md} +0 -0
@@ -0,0 +1,345 @@
1
+ /**
2
+ * OPS-OVERVIEW-CLI 첫 조각 — 수집기(한 시점에 모은다 · RFC §A1 «같은 스냅숏»).
3
+ * ⛔ ssh 0 · kubectl 0 · GitHub 호출 0(호출 경로). 칸마다 실패는 그 칸만 «못 잼».
4
+ */
5
+ import { execFileSync } from 'node:child_process';
6
+ import { readFileSync, readdirSync, statSync } from 'node:fs';
7
+ import { hostname } from 'node:os';
8
+ import { join } from 'node:path';
9
+ import { effectiveInstanceRoot } from '../instance/resolve.js';
10
+ import type { Checklist, ChecklistItem } from '../release-loop/checklist.js';
11
+ import type { ReleaseSchedule } from '../release-loop/release-schedule.js';
12
+ import type { ResourceView } from '../control-plane/ledger.js';
13
+ import type { TaskCard } from '../task-agent/task-hand.js';
14
+ import {
15
+ okCell, unmeasured, type Cell, type CapacityInfo, type ChecklistCounts, type LaunchableInfo, type LoopRow, type MachineRow,
16
+ type OverviewSnapshot, type OwnerTaskRow, type ParentsInfo, type PodMemberRow, type ReleaseRunInfo, type ScheduleInfo,
17
+ } from './overview.js';
18
+ import { SEAT_ERA_SOURCE, readDispatcherBeats, readDispatcherCapacity, readSeatEraHanded, seatEraFeederDir } from './overview-seat-era.js';
19
+
20
+ const GB = 1024 ** 3;
21
+ /** 하트비트 주기 30 s × 2 (RFC §A2 «낡음»). */
22
+ const HEARTBEAT_STALE_S = 60;
23
+ /** 디스패처 주기 ≈ 5.5 분 × 2. */
24
+ const DISPATCHER_STALE_S = 11 * 60;
25
+ const STALE_PARENT_S = 6 * 3600;
26
+ const TARGET_PATH = /대상 경로:/;
27
+
28
+ export interface CollectOptions {
29
+ version?: string;
30
+ sinceMs: number;
31
+ sinceLabel: string;
32
+ owner?: string;
33
+ now?: number;
34
+ root?: string;
35
+ seatEraDir?: string;
36
+ }
37
+
38
+ const iso = (ms: number): string => new Date(ms).toISOString();
39
+ const errText = (error: unknown): string => (error instanceof Error ? error.message : String(error)).split('\n')[0]!.slice(0, 160);
40
+
41
+ function pickVersion(explicit: string | undefined, schedules: ReleaseSchedule[], now: number): string | null {
42
+ if (explicit) return explicit;
43
+ const upcoming = schedules.filter((s) => Date.parse(s.cutAt) > now).sort((a, b) => a.cutAt.localeCompare(b.cutAt));
44
+ return upcoming[0]?.version ?? null;
45
+ }
46
+
47
+ export function countChecklist(items: readonly ChecklistItem[]): ChecklistCounts {
48
+ const c: ChecklistCounts = { green: 0, yellow: 0, red: 0, done: 0, p0Yellow: 0 };
49
+ for (const it of items) {
50
+ c[it.status]++;
51
+ if (it.status === 'yellow' && it.priority === 'P0') c.p0Yellow++;
52
+ }
53
+ return c;
54
+ }
55
+
56
+ /**
57
+ * ⚠️ 임시 «발사 가능» 술어 — 오케스트레이터가 아직 술어를 export 하지 않는다(OVW-DISPATCH-LEDGER).
58
+ * 노랑 ∧ 제목에 «대상 경로:» ∧ 아직 안 넘김(TASK-AGENT checklistId ⊕ 자리 시대 handed) ∧ 선행 모두 초록/끝.
59
+ */
60
+ export function launchableCells(checklists: readonly Checklist[], handed: ReadonlySet<string>): LaunchableInfo {
61
+ const status = new Map<string, ChecklistItem['status']>();
62
+ for (const cl of checklists) for (const it of cl.items) if (!status.has(it.id)) status.set(it.id, it.status);
63
+ const ids: string[] = [];
64
+ const skipped = { noTargetPath: 0, predecessorOpen: 0, alreadyHanded: 0 };
65
+ for (const cl of checklists) for (const it of cl.items) {
66
+ if (it.status !== 'yellow') continue;
67
+ if (handed.has(it.id)) { skipped.alreadyHanded++; continue; }
68
+ if (!TARGET_PATH.test(it.title)) { skipped.noTargetPath++; continue; }
69
+ const open = (it.predecessors ?? []).some((p) => { const st = status.get(p); return st !== undefined && st !== 'green' && st !== 'done'; });
70
+ if (open) { skipped.predecessorOpen++; continue; }
71
+ ids.push(it.id);
72
+ }
73
+ return { count: ids.length, ids: ids.slice(0, 20), skipped, interim: true };
74
+ }
75
+
76
+ export function ownerRows(cards: readonly TaskCard[], sinceIso: string, ownerFilter?: string): Record<string, OwnerTaskRow> {
77
+ const rows: Record<string, OwnerTaskRow> = {};
78
+ for (const card of cards) {
79
+ if (!card || typeof card.createdAt !== 'string' || card.createdAt < sinceIso) continue;
80
+ const owner = card.seat ? `seat:${card.seat}` : 'unassigned';
81
+ if (ownerFilter && ownerFilter !== 'all' && owner !== ownerFilter && owner !== `seat:${ownerFilter}`) continue;
82
+ const row = rows[owner] ??= { handed: 0, launched: 0, prBound: 0, failed: 0, launchFailed: 0 };
83
+ if (card.status === 'handed') row.handed++;
84
+ else if (card.status === 'launched') row.launched++;
85
+ else if (card.status === 'failed') row.failed++;
86
+ else if (card.status === 'launch-failed') row.launchFailed++;
87
+ if ((card.history ?? []).some((h) => h.event === 'pr-bound')) row.prBound++;
88
+ }
89
+ return rows;
90
+ }
91
+
92
+ /** `[[dd-]hh:]mm:ss` → 초. */
93
+ export function parseEtime(etime: string): number | null {
94
+ const m = /^(?:(\d+)-)?(?:(\d+):)?(\d+):(\d+)$/.exec(etime.trim());
95
+ if (!m) return null;
96
+ return Number(m[1] ?? 0) * 86400 + Number(m[2] ?? 0) * 3600 + Number(m[3]) * 60 + Number(m[4]);
97
+ }
98
+
99
+ const HARNESS_PARENT = /elanous\.mjs .*\bharness (?:say|ask)\b/;
100
+
101
+ /** `ps -axo etime=,command=` 출력 → 하니스 부모 요약(RFC §S «재는 명령»과 같은 술어). */
102
+ export function summarizeParents(psOut: string): ParentsInfo {
103
+ let count = 0; let stale = 0; let oldest = -1;
104
+ for (const line of psOut.split('\n')) {
105
+ const m = /^\s*(\S+)\s+(.*)$/.exec(line);
106
+ if (!m || !HARNESS_PARENT.test(m[2]!)) continue;
107
+ const s = parseEtime(m[1]!);
108
+ count++;
109
+ if (s !== null) { if (s > STALE_PARENT_S) stale++; if (s > oldest) oldest = s; }
110
+ }
111
+ return { count, staleOver6h: stale, oldestHours: oldest < 0 ? null : Math.round(oldest / 360) / 10 };
112
+ }
113
+
114
+ function collectRelease(root: string, version: string | null, schedules: ReleaseSchedule[] | Error, now: number,
115
+ readRuns: (dir: string) => Array<{ runId: string; status: string; startedAt: string; version: string | null; nodes: Array<{ nodeId: string; ok: boolean | null; startedAt?: string }> }> | 'unavailable',
116
+ readList: (v: string) => Checklist): OverviewSnapshot['release'] {
117
+ const versionCell: Cell<string> = version ? okCell(version, 'release schedule(다음 컷)', iso(now)) : unmeasured('release schedule', schedules instanceof Error ? `스케줄 못 읽음: ${errText(schedules)}` : '앞으로의 컷이 없음 — --version 으로 지정');
118
+ let schedule: Cell<ScheduleInfo | 'none'>;
119
+ if (schedules instanceof Error) schedule = unmeasured('release schedule', errText(schedules));
120
+ else if (!version) schedule = okCell('none', 'release schedule', iso(now));
121
+ else {
122
+ const row = schedules.find((s) => s.version === version);
123
+ schedule = okCell(row ? {
124
+ cutAt: row.cutAt, landBy: row.landBy, publishAt: row.publishAt ?? null,
125
+ freezeNow: !!(row.freezeFrom && row.freezeUntil && Date.parse(row.freezeFrom) <= now && now < Date.parse(row.freezeUntil)),
126
+ } : 'none', 'release schedule', iso(now));
127
+ }
128
+ let checklist: Cell<ChecklistCounts>;
129
+ if (!version) checklist = unmeasured('release checklist', '판 미정');
130
+ else {
131
+ try { checklist = okCell(countChecklist(readList(version).items), `release checklist(${version})`, iso(now)); }
132
+ catch (error) { checklist = unmeasured(`release checklist(${version})`, errText(error)); }
133
+ }
134
+ const dir = join(root, 'graph-runs', 'release-loop');
135
+ let run: Cell<ReleaseRunInfo | 'none'>;
136
+ try {
137
+ const runs = readRuns(dir);
138
+ if (runs === 'unavailable') run = unmeasured(dir, 'runs-unavailable');
139
+ else if (runs.length === 0) run = okCell('none', dir, iso(now));
140
+ else {
141
+ const r = runs[0]!;
142
+ const current = r.nodes.find((n) => n.ok === null) ?? null;
143
+ let pidAliveFlag: boolean | null = null;
144
+ try {
145
+ const raw = JSON.parse(readFileSync(join(dir, `${r.runId}.json`), 'utf8')) as { pid?: unknown };
146
+ if (typeof raw.pid === 'number') { try { process.kill(raw.pid, 0); pidAliveFlag = true; } catch (e) { pidAliveFlag = (e as NodeJS.ErrnoException).code === 'EPERM'; } }
147
+ } catch { /* pid 모름 */ }
148
+ const node = current?.nodeId ?? null;
149
+ const waitingOn: ReleaseRunInfo['waitingOn'] = r.status !== 'running' ? 'none'
150
+ : node && /approv/i.test(node) ? 'approval'
151
+ : pidAliveFlag === false ? 'process-gone'
152
+ : node && /gate/i.test(node) ? 'gate' : 'none';
153
+ const startedMs = Date.parse(current?.startedAt ?? r.startedAt);
154
+ run = okCell({ runId: r.runId, status: r.status, currentNode: node, startedAt: r.startedAt, waitingOn,
155
+ elapsedMinutes: Number.isNaN(startedMs) ? null : Math.round((now - startedMs) / 60000) }, `release run ledger(${r.version ?? '?'})`, iso(now));
156
+ }
157
+ } catch (error) { run = unmeasured(dir, errText(error)); }
158
+ return { version: versionCell, run, schedule, checklist };
159
+ }
160
+
161
+ function collectMachines(root: string, ledgerRows: ResourceView[] | Error, poolSpec: string | null, psOut: string | Error, now: number): OverviewSnapshot['machines'] {
162
+ const expected = new Set<string>();
163
+ const pods: PodMemberRow[] = [];
164
+ if (poolSpec) {
165
+ for (const part of poolSpec.split(',').map((p) => p.trim()).filter(Boolean)) {
166
+ const m = /^([^@:#]+)(?:@([^:#]+))?(?::(\d+))?/.exec(part);
167
+ if (!m) continue;
168
+ if (m[2]) expected.add(m[2]);
169
+ pods.push({ context: m[1]!, capacity: m[3] === undefined ? 2 : Number(m[3]),
170
+ occupied: unmeasured('pod pool', '호출 경로 kubectl 금지 — 멤버별 점유는 데몬 백그라운드 측정기(OVW-API) 대기') });
171
+ }
172
+ }
173
+ const hosts: MachineRow[] = [];
174
+ if (ledgerRows instanceof Error) {
175
+ for (const name of expected) hosts.push({ name, load: unmeasured('control ledger', errText(ledgerRows)) });
176
+ } else {
177
+ const machines = ledgerRows.filter((r) => r.kind === 'machine');
178
+ for (const r of machines) expected.add(r.machine);
179
+ for (const name of [...expected].sort()) {
180
+ const row = machines.find((r) => r.machine === name);
181
+ const load = (row?.attrs as { load?: { loadAvg?: number[]; cpuCount?: number; freeMem?: number; totalMem?: number; observedAt?: number } } | undefined)?.load;
182
+ if (!row || !load || !Array.isArray(load.loadAvg)) { hosts.push({ name, load: unmeasured('control ledger heartbeat', '하트비트 없음') }); continue; }
183
+ const observed = typeof load.observedAt === 'number' ? load.observedAt : row.observedAt;
184
+ const [l1, l5, l15] = load.loadAvg;
185
+ const num = (x: unknown): x is number => typeof x === 'number' && Number.isFinite(x);
186
+ if (!num(l1) || !num(l5) || !num(l15) || !num(load.cpuCount) || load.cpuCount <= 0 || !num(load.freeMem) || !num(load.totalMem)) {
187
+ hosts.push({ name, load: unmeasured('control ledger heartbeat', '하트비트 항목 빠짐(loadAvg·cpuCount·freeMem·totalMem)', iso(observed)) });
188
+ continue;
189
+ }
190
+ const age = Math.max(0, Math.round((now - observed) / 1000));
191
+ const value = { load1: l1, load5: l5, load15: l15, cpuCount: load.cpuCount,
192
+ freeGb: load.freeMem / GB, totalGb: load.totalMem / GB, ageSeconds: age };
193
+ hosts.push({ name, load: age > HEARTBEAT_STALE_S
194
+ ? unmeasured('control ledger heartbeat', `낡음(${age}초)`, iso(observed))
195
+ : okCell(value, 'control ledger heartbeat', iso(observed)) });
196
+ }
197
+ }
198
+ const parents: Cell<ParentsInfo> = psOut instanceof Error
199
+ ? unmeasured(`ps(${hostname()})`, `ps-exec 실패: ${errText(psOut)}`)
200
+ : okCell(summarizeParents(psOut), `ps(${hostname()} 로컬만 — 다른 기계는 OVW-MACHINE-HB)`, iso(now));
201
+ void root;
202
+ return { hosts, pods, parents };
203
+ }
204
+
205
+ export interface CollectDeps {
206
+ listSchedules?: () => ReleaseSchedule[];
207
+ listChecklist?: (v: string) => Checklist;
208
+ readRuns?: (dir: string) => ReturnType<Parameters<typeof collectRelease>[4]>;
209
+ readCards?: () => TaskCard[];
210
+ ledger?: () => ResourceView[];
211
+ poolSpec?: () => string | null;
212
+ ps?: () => string;
213
+ gitLog?: (sinceIso: string) => { lines: string[]; observedAt: string } ;
214
+ }
215
+
216
+ async function defaultDeps(root: string): Promise<Required<CollectDeps>> {
217
+ const [{ listSchedules }, { listChecklist }, { readReleaseRuns }, { readTaskAgentState, taskAgentStatePath }, { ResourceLedger }, { getUserConfig }] = await Promise.all([
218
+ import('../release-loop/release-schedule.js'), import('../release-loop/checklist.js'), import('../nexus/api/ops-api.js'),
219
+ import('../task-agent/task-hand.js'), import('../control-plane/ledger.js'), import('../user-config.js'),
220
+ ]);
221
+ return {
222
+ listSchedules: () => listSchedules(),
223
+ listChecklist: (v) => listChecklist(v),
224
+ readRuns: (dir) => readReleaseRuns(null, dir),
225
+ readCards: () => {
226
+ const state = readTaskAgentState<{ tasks?: Record<string, TaskCard> | TaskCard[] }>(taskAgentStatePath());
227
+ const t = state.tasks ?? {};
228
+ return Array.isArray(t) ? t : Object.values(t);
229
+ },
230
+ ledger: () => new ResourceLedger(root).list({ kind: 'machine' }),
231
+ poolSpec: () => {
232
+ const c = getUserConfig() as { harness?: { podPool?: string }; pod?: { pool?: string } };
233
+ return process.env.ELANOUS_POD_POOL?.trim() || c.harness?.podPool || c.pod?.pool || null;
234
+ },
235
+ ps: () => execFileSync('ps', ['-axo', 'etime=,command='], { encoding: 'utf8', timeout: 1_500, maxBuffer: 32 * 1024 * 1024, stdio: ['ignore', 'pipe', 'ignore'] }),
236
+ gitLog: (sinceIso) => {
237
+ const c = getUserConfig() as { harness?: { defaultRepo?: string } };
238
+ const repo = c.harness?.defaultRepo;
239
+ if (!repo) throw new Error('harness.defaultRepo 없음');
240
+ let fetched: number;
241
+ try { fetched = statSync(join(repo, '.git', 'FETCH_HEAD')).mtimeMs; } catch { throw new Error(`FETCH_HEAD 없음(${repo})`); }
242
+ const out = execFileSync('git', ['-C', repo, 'log', 'refs/remotes/origin/main', `--since=${sinceIso}`, '--first-parent', '--format=%cI%x09%s'],
243
+ { encoding: 'utf8', timeout: 1_000, stdio: ['ignore', 'pipe', 'ignore'] });
244
+ return { lines: out.split('\n').filter(Boolean), observedAt: iso(fetched) };
245
+ },
246
+ };
247
+ }
248
+
249
+ /** 착지 원천(git origin/main)의 fetch 가 이보다 낡으면 «못 잼»(낡음). */
250
+ const LANDINGS_STALE_S = 30 * 60;
251
+
252
+ export async function collectOverview(opts: CollectOptions, injected: CollectDeps = {}): Promise<OverviewSnapshot> {
253
+ const now = opts.now ?? Date.now();
254
+ const root = opts.root ?? effectiveInstanceRoot();
255
+ const deps = { ...(await defaultDeps(root)), ...injected };
256
+ const seatDir = opts.seatEraDir ?? seatEraFeederDir();
257
+ const sinceIso = iso(now - opts.sinceMs);
258
+
259
+ let schedules: ReleaseSchedule[] | Error;
260
+ try { schedules = deps.listSchedules(); } catch (error) { schedules = error instanceof Error ? error : new Error(String(error)); }
261
+ const version = pickVersion(opts.version, schedules instanceof Error ? [] : schedules, now);
262
+ const release = collectRelease(root, version, schedules, now, deps.readRuns, deps.listChecklist);
263
+
264
+ // 일꾼 — 오늘(KST 0시) 이후 카드.
265
+ const kstMidnight = iso(Math.floor((now + 9 * 3600_000) / 86400_000) * 86400_000 - 9 * 3600_000);
266
+ let cards: TaskCard[] | Error;
267
+ try { cards = deps.readCards(); } catch (error) { cards = error instanceof Error ? error : new Error(String(error)); }
268
+ const byOwner: Cell<Record<string, OwnerTaskRow>> = cards instanceof Error
269
+ ? unmeasured('task-agent ledger', errText(cards))
270
+ : okCell(ownerRows(cards, kstMidnight, opts.owner), `task-agent ledger(오늘 KST · owner=seat 키)`, iso(now));
271
+ const done = unmeasured<number>('task-agent ledger', '착지 판정은 PR 조회가 필요 — owner 모델(OVW-OWNER)·card-evidence 연결 전');
272
+
273
+ // 발사 가능 — 열린 판(앞으로의 컷) 전부.
274
+ let launchable: Cell<LaunchableInfo>;
275
+ if (schedules instanceof Error) launchable = unmeasured('release checklist', `스케줄 못 읽음: ${errText(schedules)}`);
276
+ else if (cards instanceof Error) launchable = unmeasured('task-agent ledger', `넘김 목록 못 읽음: ${errText(cards)}`);
277
+ else {
278
+ try {
279
+ const open = schedules.filter((s) => Date.parse(s.cutAt) > now).map((s) => s.version);
280
+ if (version && !open.includes(version)) open.push(version);
281
+ const lists = open.map((v) => deps.listChecklist(v));
282
+ const handed = new Set<string>([...cards.map((c) => c.checklistId).filter((x): x is string => typeof x === 'string'), ...readSeatEraHanded(seatDir)]);
283
+ launchable = okCell(launchableCells(lists, handed), `release checklist(${open.join(',')}) ⊕ task-agent ⊕ ${SEAT_ERA_SOURCE} handed · 임시 술어`, iso(now));
284
+ } catch (error) { launchable = unmeasured('release checklist', errText(error)); }
285
+ }
286
+
287
+ // 빈 자리 — 자리 시대 디스패처 로그(임시) · 호출 경로 kubectl 0.
288
+ const capLine = readDispatcherCapacity(seatDir, now);
289
+ let capacity: Cell<CapacityInfo>;
290
+ if ('error' in capLine) capacity = unmeasured(SEAT_ERA_SOURCE, capLine.error);
291
+ else if (capLine.ageSeconds > DISPATCHER_STALE_S) capacity = unmeasured(SEAT_ERA_SOURCE, `낡음(${Math.round(capLine.ageSeconds / 60)}분)`, capLine.at);
292
+ else {
293
+ const free = Math.max(0, capLine.podTarget - capLine.podUsed) + Math.max(0, capLine.localMax - capLine.localUsed);
294
+ capacity = okCell({ podUsed: capLine.podUsed, podTarget: capLine.podTarget, localUsed: capLine.localUsed, localMax: capLine.localMax, free }, `${SEAT_ERA_SOURCE} dispatcher-OP.out`, capLine.at);
295
+ }
296
+ const tasks = { byOwner, done, launchable, capacity };
297
+
298
+ let ledgerRows: ResourceView[] | Error;
299
+ try { ledgerRows = deps.ledger(); } catch (error) { ledgerRows = error instanceof Error ? error : new Error(String(error)); }
300
+ let poolSpec: string | null = null;
301
+ try { poolSpec = deps.poolSpec(); } catch { poolSpec = null; }
302
+ let psOut: string | Error;
303
+ try { psOut = deps.ps(); } catch (error) { psOut = error instanceof Error ? error : new Error(String(error)); }
304
+ const machines = collectMachines(root, ledgerRows, poolSpec, psOut, now);
305
+
306
+ let landings: Cell<{ count: number; recent: string[] }>;
307
+ try {
308
+ const { lines, observedAt } = deps.gitLog(sinceIso);
309
+ const age = Math.round((now - Date.parse(observedAt)) / 1000);
310
+ landings = age > LANDINGS_STALE_S
311
+ ? unmeasured('git origin/main(로컬 fetch)', `fetch 낡음(${Math.round(age / 60)}분)`, observedAt)
312
+ : okCell({ count: lines.length, recent: lines.slice(0, 5).map((l) => l.split('\t')[1] ?? l) }, `git origin/main(로컬 fetch ${Math.round(age / 60)}분 전)`, observedAt);
313
+ } catch (error) { landings = unmeasured('git origin/main(로컬 fetch)', errText(error)); }
314
+
315
+ const loops: LoopRow[] = [];
316
+ const productBeat = (name: string, paths: string[]): void => {
317
+ let newest = -1;
318
+ for (const p of paths) {
319
+ try {
320
+ const st = statSync(p);
321
+ if (st.isDirectory()) { for (const f of readdirSync(p)) { try { newest = Math.max(newest, statSync(join(p, f)).mtimeMs); } catch { /* skip */ } } }
322
+ else newest = Math.max(newest, st.mtimeMs);
323
+ } catch { /* 없음 */ }
324
+ }
325
+ loops.push({ name, era: 'product', staleAfterSeconds: null,
326
+ beat: newest < 0 ? unmeasured(paths.join(','), '원장 없음(계측 없음 — «죽었다» 아님)')
327
+ : okCell({ lastAt: iso(newest), ageSeconds: Math.max(0, Math.round((now - newest) / 1000)), alive: null }, `${paths.join(',')} mtime`, iso(newest)) });
328
+ };
329
+ productBeat('orchestrator', [join(root, 'orchestrator')]);
330
+ productBeat('steward', [join(root, 'steward', 'readiness.jsonl'), join(root, 'steward', 'streak.json')]);
331
+ for (const b of readDispatcherBeats(seatDir, now)) {
332
+ loops.push({ name: `dispatcher-${b.seat}`, era: 'seat-era', staleAfterSeconds: b.seat === 'OP' ? DISPATCHER_STALE_S : null,
333
+ beat: okCell({ lastAt: b.lastAt, ageSeconds: b.ageSeconds, alive: b.alive }, `${SEAT_ERA_SOURCE} dispatcher-${b.seat}.pid`, b.lastAt) });
334
+ }
335
+
336
+ return { generatedAt: iso(now), instanceRoot: root, since: opts.sinceLabel, release, tasks, machines, landings, loops };
337
+ }
338
+
339
+ export function parseSince(raw: string | undefined): { ms: number; label: string } {
340
+ const v = (raw ?? '1h').trim();
341
+ const m = /^(\d+)\s*(m|h|d)$/.exec(v);
342
+ if (!m) throw new Error(`--since 형식: <n>m|h|d (받음: ${v})`);
343
+ const n = Number(m[1]);
344
+ return { ms: n * (m[2] === 'm' ? 60_000 : m[2] === 'h' ? 3_600_000 : 86_400_000), label: `최근 ${v}` };
345
+ }
@@ -0,0 +1,90 @@
1
+ /**
2
+ * ⚠️ 자리 시대 원천(제품 «밖») — OPS-OVERVIEW-CLI 첫 조각의 «임시» 읽기 전용 리더.
3
+ *
4
+ * RFC §A3 는 overview 의 원천을 제품 원장·API 로만 둔다. 그런데 디스패처의 박동·Pod 사용 수·넘김 목록은
5
+ * 아직 `~/elanous-hq/seat-state/OP/feeder/` 의 PID 파일·stdout 로그에만 있다(OVW-DISPATCH-LEDGER 가 원장으로 옮긴다).
6
+ * 그때까지 이 파일 «하나»에 가둬 두고, 출력에는 항상 «자리 시대 원천» 표지를 붙인다. 옮겨지면 이 파일을 지운다.
7
+ * ⛔ 쓰지 않는다 · ⛔ ssh 하지 않는다 · 파일이 없으면 «못 잼»(0 아님).
8
+ */
9
+ import { readdirSync, readFileSync, statSync } from 'node:fs';
10
+ import { homedir } from 'node:os';
11
+ import { join } from 'node:path';
12
+
13
+ export const SEAT_ERA_SOURCE = '자리 시대 원천(feeder)';
14
+
15
+ export function seatEraFeederDir(home: string = homedir()): string {
16
+ return join(home, 'elanous-hq', 'seat-state', 'OP', 'feeder');
17
+ }
18
+
19
+ export interface DispatcherBeat { seat: string; pid: number | null; alive: boolean | null; lastAt: string; ageSeconds: number }
20
+
21
+ /** `dispatcher-<자리>.pid` 마다 하나 — 박동 시각은 `.out` 이 있으면 그 mtime, 없으면 PID 파일 mtime. */
22
+ export function readDispatcherBeats(dir: string, now: number, isAlive: (pid: number) => boolean = pidAlive): DispatcherBeat[] {
23
+ let names: string[];
24
+ try { names = readdirSync(dir); } catch { return []; }
25
+ const out: DispatcherBeat[] = [];
26
+ for (const name of names) {
27
+ const m = /^dispatcher-([A-Za-z]+)\.pid$/.exec(name);
28
+ if (!m) continue;
29
+ const seat = m[1]!;
30
+ let pid: number | null = null;
31
+ try { const n = Number(readFileSync(join(dir, name), 'utf8').trim()); pid = Number.isInteger(n) && n > 0 ? n : null; } catch { /* 못 읽음 */ }
32
+ let mtime: number;
33
+ try { mtime = statSync(join(dir, `dispatcher-${seat}.out`)).mtimeMs; } catch {
34
+ try { mtime = statSync(join(dir, name)).mtimeMs; } catch { continue; }
35
+ }
36
+ out.push({ seat, pid, alive: pid === null ? null : isAlive(pid), lastAt: new Date(mtime).toISOString(), ageSeconds: Math.max(0, Math.round((now - mtime) / 1000)) });
37
+ }
38
+ return out.sort((a, b) => a.seat.localeCompare(b.seat));
39
+ }
40
+
41
+ export function pidAlive(pid: number): boolean {
42
+ try { process.kill(pid, 0); return true; } catch (error) { return (error as NodeJS.ErrnoException).code === 'EPERM'; }
43
+ }
44
+
45
+ export interface DispatcherCapacityLine { at: string; podUsed: number; podTarget: number; localUsed: number; localMax: number }
46
+
47
+ /** 디스패처 로그의 마지막 «Pod a/b · 로컬 c/d» 줄. 줄 머리 `HH:MM:SS` 는 로그 파일 mtime 의 날짜(KST)로 읽는다. */
48
+ export function parseDispatcherCapacity(text: string): Omit<DispatcherCapacityLine, 'at'> & { hhmmss: string } | null {
49
+ const lines = text.split('\n');
50
+ for (let i = lines.length - 1; i >= 0; i--) {
51
+ const m = /^(\d{2}:\d{2}:\d{2}) .*Pod (\d+)(?:\/(\d+))? · 로컬 (\d+)(?:\/(\d+))?/.exec(lines[i]!);
52
+ if (!m || m[3] === undefined) continue;
53
+ return { hhmmss: m[1]!, podUsed: Number(m[2]), podTarget: Number(m[3]), localUsed: Number(m[4]), localMax: m[5] === undefined ? 0 : Number(m[5]) };
54
+ }
55
+ return null;
56
+ }
57
+
58
+ export function readDispatcherCapacity(dir: string, now: number = Date.now()): (DispatcherCapacityLine & { ageSeconds: number }) | { error: string } {
59
+ const path = join(dir, 'dispatcher-OP.out');
60
+ let text: string; let mtime: number;
61
+ try { text = readFileSync(path, 'utf8'); mtime = statSync(path).mtimeMs; } catch (error) { return { error: `디스패처 로그 없음(${(error as NodeJS.ErrnoException).code ?? 'read'})` }; }
62
+ const parsed = parseDispatcherCapacity(text);
63
+ if (!parsed) return { error: '디스패처 로그에 «Pod a/b» 줄 없음' };
64
+ const at = lineTime(parsed.hhmmss, mtime);
65
+ return { at: new Date(at).toISOString(), ageSeconds: Math.max(0, Math.round((now - at) / 1000)),
66
+ podUsed: parsed.podUsed, podTarget: parsed.podTarget, localUsed: parsed.localUsed, localMax: parsed.localMax };
67
+ }
68
+
69
+ /**
70
+ * 줄 머리 `HH:MM:SS`(KST)의 절대 시각 — 날짜는 로그 mtime 의 KST 날짜이고, 그 시각이 mtime 보다 뒤면 전날이다.
71
+ * ⛔ mtime 을 관측 시각으로 쓰지 않는다 — 용량 줄 뒤에 다른 줄이 붙으면 낡은 값이 새것처럼 보인다.
72
+ */
73
+ export function lineTime(hhmmss: string, mtimeMs: number): number {
74
+ const [h, m, s] = hhmmss.split(':').map(Number) as [number, number, number];
75
+ const KST = 9 * 3600_000;
76
+ const dayStartKst = Math.floor((mtimeMs + KST) / 86400_000) * 86400_000 - KST;
77
+ let t = dayStartKst + ((h * 60 + m) * 60 + s) * 1000;
78
+ if (t > mtimeMs + 1000) t -= 86400_000;
79
+ return t;
80
+ }
81
+
82
+ /** 디스패처가 손으로 쌓는 넘김 목록(`handed.txt`) — «없음»(ENOENT)만 빈 집합, 그 밖의 읽기 실패는 던진다(넘김 여부를 모르면 발사 가능을 셀 수 없다). */
83
+ export function readSeatEraHanded(dir: string): Set<string> {
84
+ let text: string;
85
+ try { text = readFileSync(join(dir, 'handed.txt'), 'utf8'); } catch (error) {
86
+ if ((error as NodeJS.ErrnoException).code === 'ENOENT') return new Set();
87
+ throw new Error(`handed.txt 못 읽음(${(error as NodeJS.ErrnoException).code ?? 'read'})`);
88
+ }
89
+ return new Set(text.split(/\s+/).filter(Boolean));
90
+ }
@@ -0,0 +1,223 @@
1
+ /**
2
+ * OPS-OVERVIEW-CLI 첫 조각 — 흐름 한 장의 «순수» 층(판정 · 이유 사슬 · 사람 표기).
3
+ * 설계 = 내부 문서 `RFC-ops-overview-flow-health-cli-2026-10-08` §A1·A2.
4
+ *
5
+ * ⛔ 이 파일은 I/O 를 하지 않는다 — 수집은 `overview-collect.ts`, 자리 시대 임시 원천은 `overview-seat-era.ts`.
6
+ * ⛔ «못 잼»은 `value:null` ⊕ `reason` 이다 — 절대 0 으로 읽지 않는다(판정도 그렇다).
7
+ */
8
+
9
+ export type CellStatus = 'ok' | 'unmeasured' | 'partial';
10
+ export interface Cell<T> {
11
+ value: T | null;
12
+ source: string;
13
+ observedAt: string | null;
14
+ status: CellStatus;
15
+ reason?: string;
16
+ }
17
+
18
+ export function okCell<T>(value: T, source: string, observedAt: string | null): Cell<T> {
19
+ return { value, source, observedAt, status: 'ok' };
20
+ }
21
+ export function unmeasured<T>(source: string, reason: string, observedAt: string | null = null): Cell<T> {
22
+ return { value: null, source, observedAt, status: 'unmeasured', reason };
23
+ }
24
+ export function measured(cell: Cell<unknown>): boolean {
25
+ return cell.status !== 'unmeasured' && cell.value !== null;
26
+ }
27
+
28
+ /** 닫힌 판정 어휘 — 배열 순서가 곧 우선순위(위가 이긴다 · RFC §A1). */
29
+ export const VERDICTS = ['unobservable', 'blocked', 'loop-down', 'saturated', 'supply-empty', 'degraded', 'flowing'] as const;
30
+ export type Verdict = typeof VERDICTS[number];
31
+ export const VERDICT_LABEL: Record<Verdict, string> = {
32
+ unobservable: '관측 불가', blocked: '막힘', 'loop-down': '루프 정지', saturated: '자원 포화',
33
+ 'supply-empty': '공급 부족', degraded: '흐름 저하', flowing: '흐름 정상',
34
+ };
35
+
36
+ export interface ReleaseRunInfo {
37
+ runId: string; status: string; currentNode: string | null; startedAt: string | null;
38
+ /** approval · freeze · gate · process-gone · none */
39
+ waitingOn: 'approval' | 'gate' | 'process-gone' | 'none';
40
+ elapsedMinutes: number | null;
41
+ }
42
+ export interface ScheduleInfo { cutAt: string; landBy: string | null; publishAt: string | null; freezeNow: boolean }
43
+ export interface ChecklistCounts { green: number; yellow: number; red: number; done: number; p0Yellow: number }
44
+ export interface OwnerTaskRow { handed: number; launched: number; prBound: number; failed: number; launchFailed: number }
45
+ export interface LaunchableInfo {
46
+ count: number; ids: string[];
47
+ skipped: { noTargetPath: number; predecessorOpen: number; alreadyHanded: number };
48
+ /** 오케스트레이터의 «발사 가능» 술어가 아직 export 되지 않아 overview 가 임시로 계산했다(OVW-DISPATCH-LEDGER 가 대체). */
49
+ interim: true;
50
+ }
51
+ export interface CapacityInfo { podUsed: number; podTarget: number; localUsed: number; localMax: number; free: number }
52
+ export interface MachineLoad { load1: number; load5: number; load15: number; cpuCount: number; freeGb: number; totalGb: number; ageSeconds: number }
53
+ export interface MachineRow { name: string; load: Cell<MachineLoad> }
54
+ export interface PodMemberRow { context: string; capacity: number; occupied: Cell<number> }
55
+ export interface ParentsInfo { count: number; staleOver6h: number; oldestHours: number | null }
56
+ export interface LoopRow {
57
+ name: string;
58
+ /** product = 제품 원장 · seat-era = 자리 시대 원천(제품 밖 · 임시) */
59
+ era: 'product' | 'seat-era';
60
+ beat: Cell<{ lastAt: string; ageSeconds: number; alive: boolean | null }>;
61
+ /** 이 주기 이상 박동이 없으면 정지로 본다. null = 주기를 모른다 → 판정에서 뺀다(«죽었다»로 읽지 않는다). */
62
+ staleAfterSeconds: number | null;
63
+ }
64
+
65
+ export interface OverviewSnapshot {
66
+ generatedAt: string;
67
+ instanceRoot: string;
68
+ since: string;
69
+ release: {
70
+ version: Cell<string>;
71
+ run: Cell<ReleaseRunInfo | 'none'>;
72
+ schedule: Cell<ScheduleInfo | 'none'>;
73
+ checklist: Cell<ChecklistCounts>;
74
+ };
75
+ tasks: {
76
+ byOwner: Cell<Record<string, OwnerTaskRow>>;
77
+ done: Cell<number>;
78
+ launchable: Cell<LaunchableInfo>;
79
+ capacity: Cell<CapacityInfo>;
80
+ };
81
+ machines: {
82
+ hosts: MachineRow[];
83
+ pods: PodMemberRow[];
84
+ parents: Cell<ParentsInfo>;
85
+ };
86
+ landings: Cell<{ count: number; recent: string[] }>;
87
+ loops: LoopRow[];
88
+ }
89
+
90
+ export interface VerdictResult { verdict: Verdict; reasons: string[]; nextActions: string[] }
91
+
92
+ /** 부하/코어가 이 값을 넘으면 «기계 압박»(흐름 저하의 사유). 디스크 I/O 신호는 OVW-MACHINE-HB 전까지 없다. */
93
+ export const LOAD_PER_CORE_PRESSURE = 3;
94
+
95
+ export function computeVerdict(s: OverviewSnapshot): VerdictResult {
96
+ const hits = new Map<Verdict, { reasons: string[]; actions: string[] }>();
97
+ const hit = (v: Verdict, reason: string, action?: string): void => {
98
+ const row = hits.get(v) ?? { reasons: [], actions: [] };
99
+ row.reasons.push(reason);
100
+ if (action) row.actions.push(action);
101
+ hits.set(v, row);
102
+ };
103
+
104
+ // 관측 불가 — 판·공급·용량 셋 중 하나라도 못 잼.
105
+ const core: Array<[string, Cell<unknown>]> = [
106
+ ['판(발행 런)', s.release.run], ['판(체크리스트)', s.release.checklist],
107
+ ['공급(발사 가능 칸)', s.tasks.launchable], ['용량(빈 자리)', s.tasks.capacity],
108
+ ];
109
+ for (const [name, cell] of core) {
110
+ if (!measured(cell)) hit('unobservable', `${name} 못 잼(${cell.reason ?? '사유 없음'}) · 원천 ${cell.source}`, `계측 누락 칸: ${name}`);
111
+ }
112
+
113
+ // 막힘 — 발행 런이 승인을 기다리거나 동결 창.
114
+ const run = s.release.run.value;
115
+ if (run && run !== 'none' && run.waitingOn === 'approval') {
116
+ hit('blocked', `발행 런 ${run.runId.slice(0, 8)} 노드 ${run.currentNode ?? '?'} 승인 대기${run.elapsedMinutes !== null ? ` ${run.elapsedMinutes}분` : ''}`, '결정 카드 확인 — `elanous decisions list`');
117
+ }
118
+ const sched = s.release.schedule.value;
119
+ if (sched && sched !== 'none' && sched.freezeNow) hit('blocked', `동결 창 안(${s.release.version.value ?? '?'})`, '동결 해제 시각까지 착지 보류');
120
+
121
+ // 루프 정지 — 주기를 아는 루프의 박동이 끊김 · 프로세스 부재.
122
+ for (const loop of s.loops) {
123
+ const beat = loop.beat.value;
124
+ if (!beat) continue; // 못 잼은 «죽었다»가 아니다
125
+ const tag = loop.era === 'seat-era' ? ' [자리 시대 원천]' : '';
126
+ if (beat.alive === false) hit('loop-down', `${loop.name} 프로세스 없음(마지막 ${beat.lastAt})${tag}`, `${loop.name} 재기동`);
127
+ else if (loop.staleAfterSeconds !== null && beat.ageSeconds > loop.staleAfterSeconds) {
128
+ hit('loop-down', `${loop.name} 박동 ${Math.round(beat.ageSeconds / 60)}분 없음(한계 ${Math.round(loop.staleAfterSeconds / 60)}분)${tag}`, `${loop.name} 재기동`);
129
+ }
130
+ }
131
+
132
+ // 자원 포화 / 공급 부족 — 같은 스냅숏의 두 칸으로만.
133
+ const launchable = s.tasks.launchable.value;
134
+ const capacity = s.tasks.capacity.value;
135
+ if (launchable && capacity) {
136
+ if (launchable.count > 0 && capacity.free <= 0) {
137
+ hit('saturated', `발사 가능 칸 ${launchable.count} · 빈 자리 0 (Pod ${capacity.podUsed}/${capacity.podTarget} · 로컬 ${capacity.localUsed}/${capacity.localMax})`, '발사 늦추기 · 저우선 칸 보류(오케스트레이터)');
138
+ } else if (launchable.count === 0 && capacity.free > 0) {
139
+ const k = launchable.skipped;
140
+ hit('supply-empty', `빈 자리 ${capacity.free} · 발사 가능 칸 0 — 대상 경로 없음 ${k.noTargetPath} · 선행 미완 ${k.predecessorOpen} · 이미 넘김 ${k.alreadyHanded}`, '노란 칸 접지(대상 경로 채우기) — 스튜어드');
141
+ }
142
+ }
143
+
144
+ // 흐름 저하 — 묵은 부모 · 기계 압박.
145
+ const parents = s.machines.parents.value;
146
+ if (parents && parents.staleOver6h > 0) hit('degraded', `6시간 넘은 하니스 부모 ${parents.staleOver6h}(최고 ${parents.oldestHours}h)`, '고아 정리 — reaper');
147
+ for (const host of s.machines.hosts) {
148
+ const l = host.load.value;
149
+ if (l && l.cpuCount > 0 && l.load5 / l.cpuCount > LOAD_PER_CORE_PRESSURE) {
150
+ hit('degraded', `${host.name} 부하 ${l.load5.toFixed(0)}/${l.cpuCount}코어(5분)`, `${host.name} 로컬 레인 닫기 검토`);
151
+ }
152
+ }
153
+
154
+ for (const v of VERDICTS) {
155
+ const row = hits.get(v);
156
+ if (!row) continue;
157
+ // 이유 사슬: 이긴 판정의 사유 먼저, 그 밑에 진 판정들의 사유도 «부가»로 남긴다(한 사슬에 두 원인이 보이게).
158
+ const rest = VERDICTS.filter((o) => o !== v && hits.has(o)).flatMap((o) => hits.get(o)!.reasons.map((r) => `(+${VERDICT_LABEL[o]}) ${r}`));
159
+ return { verdict: v, reasons: [...row.reasons, ...rest], nextActions: row.actions };
160
+ }
161
+ return { verdict: 'flowing', reasons: [], nextActions: [] };
162
+ }
163
+
164
+ /** exit code — flowing·degraded 0 · 그 밖의 판정 3(수집기 자체 실패 1 은 호출자 몫). */
165
+ export function verdictExitCode(v: Verdict): number {
166
+ return v === 'flowing' || v === 'degraded' ? 0 : 3;
167
+ }
168
+
169
+ export function unmeasuredCells(s: OverviewSnapshot): string[] {
170
+ const out: string[] = [];
171
+ const visit = (name: string, cell: Cell<unknown>): void => { if (cell.status === 'unmeasured') out.push(`${name}: ${cell.reason ?? ''}`); };
172
+ visit('release.version', s.release.version); visit('release.run', s.release.run);
173
+ visit('release.schedule', s.release.schedule); visit('release.checklist', s.release.checklist);
174
+ visit('tasks.byOwner', s.tasks.byOwner); visit('tasks.done', s.tasks.done);
175
+ visit('tasks.launchable', s.tasks.launchable); visit('tasks.capacity', s.tasks.capacity);
176
+ for (const h of s.machines.hosts) visit(`machines.${h.name}`, h.load);
177
+ for (const p of s.machines.pods) visit(`pods.${p.context}`, p.occupied);
178
+ visit('machines.parents', s.machines.parents); visit('landings', s.landings);
179
+ for (const l of s.loops) visit(`loops.${l.name}`, l.beat);
180
+ return out;
181
+ }
182
+
183
+ /** 사람 표기의 한 칸 — 못 잼은 `못 잼(<사유>)`. */
184
+ export function show<T>(cell: Cell<T>, fmt: (v: T) => string): string {
185
+ if (cell.status === 'unmeasured' || cell.value === null) return `못 잼(${cell.reason ?? '사유 없음'})`;
186
+ return fmt(cell.value) + (cell.status === 'partial' && cell.reason ? ` (${cell.reason})` : '');
187
+ }
188
+
189
+ function kst(iso: string | null | undefined): string {
190
+ if (!iso) return '?';
191
+ const t = Date.parse(iso);
192
+ if (Number.isNaN(t)) return iso;
193
+ const d = new Date(t + 9 * 3600_000);
194
+ return `${String(d.getUTCMonth() + 1).padStart(2, '0')}-${String(d.getUTCDate()).padStart(2, '0')} ${String(d.getUTCHours()).padStart(2, '0')}:${String(d.getUTCMinutes()).padStart(2, '0')}`;
195
+ }
196
+
197
+ export function renderOverview(s: OverviewSnapshot, v: VerdictResult, meta: { elapsedMs: number }): string {
198
+ const lines: string[] = [];
199
+ const mark = v.verdict === 'flowing' ? '✅' : v.verdict === 'degraded' ? '⚠️' : '⛔';
200
+ lines.push(`${mark} ${VERDICT_LABEL[v.verdict]} (${v.verdict})`);
201
+ for (const r of v.reasons) lines.push(` ↳ ${r}`);
202
+ for (const a of v.nextActions) lines.push(` → 다음 행동(제안): ${a}`);
203
+ const rel = s.release;
204
+ const runText = show(rel.run, (r) => r === 'none' ? '런 없음' : `런 ${r.runId.slice(0, 8)} ${r.status} · 노드 ${r.currentNode ?? '-'} · 대기 ${r.waitingOn}${r.elapsedMinutes !== null ? ` · ${r.elapsedMinutes}분` : ''}`);
205
+ const schedText = show(rel.schedule, (x) => x === 'none' ? '컷 미정' : `컷 ${kst(x.cutAt)} · 착지 마감 ${kst(x.landBy)}${x.publishAt ? ` · 발행 ${kst(x.publishAt)}` : ''}${x.freezeNow ? ' · 동결 중' : ''}`);
206
+ const clText = show(rel.checklist, (c) => `초록 ${c.green} 노랑 ${c.yellow} 빨강 ${c.red} · P0 노랑 ${c.p0Yellow}`);
207
+ lines.push(`판 ${show(rel.version, (x) => x)} · ${runText}`);
208
+ lines.push(` ${schedText} · ${clText}`);
209
+ const owners = show(s.tasks.byOwner, (rows) => Object.entries(rows).sort().map(([o, r]) => `${o} 넘김 ${r.handed} 발사 ${r.launched}(PR ${r.prBound}) 실패 ${r.failed + r.launchFailed}`).join(' · ') || '오늘 카드 0');
210
+ lines.push(`일꾼 ${owners} · 끝 ${show(s.tasks.done, String)}`);
211
+ lines.push(` 발사 가능 ${show(s.tasks.launchable, (l) => `${l.count}${l.interim ? '(임시 술어)' : ''} · 대상 경로 없음 ${l.skipped.noTargetPath} · 선행 미완 ${l.skipped.predecessorOpen} · 이미 넘김 ${l.skipped.alreadyHanded}`)}`);
212
+ lines.push(` 빈 자리 ${show(s.tasks.capacity, (c) => `${c.free} (Pod ${c.podUsed}/${c.podTarget} · 로컬 ${c.localUsed}/${c.localMax})`)} [${s.tasks.capacity.source}]`);
213
+ const hosts = s.machines.hosts.map((h) => `${h.name} ${show(h.load, (l) => `${l.load1.toFixed(0)}/${l.cpuCount}코어 여유 ${l.freeGb.toFixed(0)}/${l.totalGb.toFixed(0)}GB (${l.ageSeconds}s 전)`)}`);
214
+ lines.push(`기계 ${hosts.join(' · ') || '못 잼(하트비트 원장 비어 있음)'}`);
215
+ lines.push(` Pod ${s.machines.pods.map((p) => `${p.context} ${show(p.occupied, String)}/${p.capacity}`).join(' · ') || '못 잼(풀 설정 없음)'}`);
216
+ lines.push(` 하니스 부모(이 기계) ${show(s.machines.parents, (p) => `${p.count} · 6h 넘음 ${p.staleOver6h}${p.oldestHours !== null ? ` · 최고 ${p.oldestHours}h` : ''}`)}`);
217
+ lines.push(`착지 ${s.since} ${show(s.landings, (l) => `${l.count}`)} [${s.landings.source}]`);
218
+ for (const l of s.loops) {
219
+ lines.push(`루프 ${l.name}${l.era === 'seat-era' ? ' [자리 시대 원천]' : ''} ${show(l.beat, (b) => `${kst(b.lastAt)} (${Math.round(b.ageSeconds / 60)}분 전)${b.alive === null ? '' : b.alive ? ' 살아 있음' : ' 프로세스 없음'}${l.staleAfterSeconds === null ? ' · 주기 미상(판정 제외)' : ''}`)}`);
220
+ }
221
+ lines.push(`우주 ${s.instanceRoot} · ${kst(s.generatedAt)} KST · ${meta.elapsedMs}ms`);
222
+ return lines.join('\n');
223
+ }