@h-rig/cli 0.0.6-alpha.89 → 0.0.6-alpha.90

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 (231) hide show
  1. package/dist/bin/build-rig-binaries.js +8 -40
  2. package/dist/bin/rig.js +12519 -26675
  3. package/dist/src/app/board.js +74 -693
  4. package/dist/src/app/drone-ui.js +1 -1
  5. package/dist/src/app/theme.js +0 -1
  6. package/dist/src/commands/_async-ui.js +1 -1
  7. package/dist/src/commands/_authority-runs.d.ts +1 -1
  8. package/dist/src/commands/_authority-runs.js +12 -2
  9. package/dist/src/commands/_cli-format.d.ts +1 -10
  10. package/dist/src/commands/_cli-format.js +2 -5
  11. package/dist/src/commands/_connection-state.d.ts +1 -11
  12. package/dist/src/commands/_connection-state.js +5 -50
  13. package/dist/src/commands/_doctor-checks.js +40 -501
  14. package/dist/src/commands/_help-catalog.js +17 -99
  15. package/dist/src/commands/_json-output.js +0 -4
  16. package/dist/src/commands/_operator-view.js +54 -575
  17. package/dist/src/commands/_pi-frontend.d.ts +0 -27
  18. package/dist/src/commands/_pi-frontend.js +52 -576
  19. package/dist/src/commands/_preflight.js +66 -553
  20. package/dist/src/commands/_server-client.d.ts +0 -33
  21. package/dist/src/commands/_server-client.js +46 -541
  22. package/dist/src/commands/_snapshot-upload.js +42 -503
  23. package/dist/src/commands/_spinner.js +1 -1
  24. package/dist/src/commands/agent.js +12 -2
  25. package/dist/src/commands/browser.js +1 -1
  26. package/dist/src/commands/connect.js +15 -626
  27. package/dist/src/commands/doctor.js +41 -502
  28. package/dist/src/commands/github.js +51 -584
  29. package/dist/src/commands/inbox.js +41 -502
  30. package/dist/src/commands/init.js +74 -561
  31. package/dist/src/commands/inspect.js +41 -502
  32. package/dist/src/commands/run.js +54 -578
  33. package/dist/src/commands/server.js +163 -692
  34. package/dist/src/commands/setup.js +46 -507
  35. package/dist/src/commands/stats.js +58 -601
  36. package/dist/src/commands/task-run-driver.js +58 -509
  37. package/dist/src/commands/task.js +110 -729
  38. package/dist/src/commands.js +237 -1112
  39. package/dist/src/index.js +244 -1123
  40. package/dist/src/launcher.js +0 -4
  41. package/package.json +9 -13
  42. package/dist/src/app-opentui/adapters/command.d.ts +0 -2
  43. package/dist/src/app-opentui/adapters/command.js +0 -329
  44. package/dist/src/app-opentui/adapters/common.d.ts +0 -56
  45. package/dist/src/app-opentui/adapters/common.js +0 -153
  46. package/dist/src/app-opentui/adapters/doctor.d.ts +0 -9
  47. package/dist/src/app-opentui/adapters/doctor.js +0 -1217
  48. package/dist/src/app-opentui/adapters/family.d.ts +0 -62
  49. package/dist/src/app-opentui/adapters/family.js +0 -14855
  50. package/dist/src/app-opentui/adapters/fleet.d.ts +0 -14
  51. package/dist/src/app-opentui/adapters/fleet.js +0 -1335
  52. package/dist/src/app-opentui/adapters/inbox.d.ts +0 -43
  53. package/dist/src/app-opentui/adapters/inbox.js +0 -1944
  54. package/dist/src/app-opentui/adapters/init.d.ts +0 -11
  55. package/dist/src/app-opentui/adapters/init.js +0 -2818
  56. package/dist/src/app-opentui/adapters/inspect.d.ts +0 -52
  57. package/dist/src/app-opentui/adapters/inspect.js +0 -1455
  58. package/dist/src/app-opentui/adapters/pi-attach.d.ts +0 -32
  59. package/dist/src/app-opentui/adapters/pi-attach.js +0 -2101
  60. package/dist/src/app-opentui/adapters/pi.d.ts +0 -23
  61. package/dist/src/app-opentui/adapters/pi.js +0 -363
  62. package/dist/src/app-opentui/adapters/plugin.d.ts +0 -84
  63. package/dist/src/app-opentui/adapters/plugin.js +0 -544
  64. package/dist/src/app-opentui/adapters/repo.d.ts +0 -37
  65. package/dist/src/app-opentui/adapters/repo.js +0 -186
  66. package/dist/src/app-opentui/adapters/run-detail.d.ts +0 -27
  67. package/dist/src/app-opentui/adapters/run-detail.js +0 -1441
  68. package/dist/src/app-opentui/adapters/server.d.ts +0 -48
  69. package/dist/src/app-opentui/adapters/server.js +0 -1561
  70. package/dist/src/app-opentui/adapters/tasks.d.ts +0 -64
  71. package/dist/src/app-opentui/adapters/tasks.js +0 -4524
  72. package/dist/src/app-opentui/adapters/workspace.d.ts +0 -49
  73. package/dist/src/app-opentui/adapters/workspace.js +0 -333
  74. package/dist/src/app-opentui/autocomplete.d.ts +0 -20
  75. package/dist/src/app-opentui/autocomplete.js +0 -578
  76. package/dist/src/app-opentui/bootstrap.d.ts +0 -11
  77. package/dist/src/app-opentui/bootstrap.js +0 -27833
  78. package/dist/src/app-opentui/command-palette.d.ts +0 -3
  79. package/dist/src/app-opentui/command-palette.js +0 -1038
  80. package/dist/src/app-opentui/command-pty-host.d.ts +0 -62
  81. package/dist/src/app-opentui/command-pty-host.js +0 -248
  82. package/dist/src/app-opentui/drone.d.ts +0 -12
  83. package/dist/src/app-opentui/drone.js +0 -230
  84. package/dist/src/app-opentui/events.d.ts +0 -7
  85. package/dist/src/app-opentui/events.js +0 -28
  86. package/dist/src/app-opentui/fleet-stats.d.ts +0 -32
  87. package/dist/src/app-opentui/fleet-stats.js +0 -114
  88. package/dist/src/app-opentui/focus-manager.d.ts +0 -14
  89. package/dist/src/app-opentui/focus-manager.js +0 -24
  90. package/dist/src/app-opentui/index.d.ts +0 -8
  91. package/dist/src/app-opentui/index.js +0 -5260
  92. package/dist/src/app-opentui/intent.d.ts +0 -3
  93. package/dist/src/app-opentui/intent.js +0 -365
  94. package/dist/src/app-opentui/keymap.d.ts +0 -21
  95. package/dist/src/app-opentui/keymap.js +0 -1377
  96. package/dist/src/app-opentui/launch-routing.d.ts +0 -16
  97. package/dist/src/app-opentui/launch-routing.js +0 -55
  98. package/dist/src/app-opentui/layout.d.ts +0 -22
  99. package/dist/src/app-opentui/layout.js +0 -51
  100. package/dist/src/app-opentui/list-search.d.ts +0 -36
  101. package/dist/src/app-opentui/list-search.js +0 -130
  102. package/dist/src/app-opentui/pi-host-child.d.ts +0 -2
  103. package/dist/src/app-opentui/pi-host-child.js +0 -1299
  104. package/dist/src/app-opentui/pi-pty-host.d.ts +0 -28
  105. package/dist/src/app-opentui/pi-pty-host.js +0 -10
  106. package/dist/src/app-opentui/react/App.d.ts +0 -9
  107. package/dist/src/app-opentui/react/App.js +0 -3866
  108. package/dist/src/app-opentui/react/Backdrop.d.ts +0 -5
  109. package/dist/src/app-opentui/react/Backdrop.js +0 -823
  110. package/dist/src/app-opentui/react/ChromeHost.d.ts +0 -5
  111. package/dist/src/app-opentui/react/ChromeHost.js +0 -1539
  112. package/dist/src/app-opentui/react/SceneFrameView.d.ts +0 -7
  113. package/dist/src/app-opentui/react/SceneFrameView.js +0 -579
  114. package/dist/src/app-opentui/react/context.d.ts +0 -17
  115. package/dist/src/app-opentui/react/context.js +0 -37
  116. package/dist/src/app-opentui/react/launch.d.ts +0 -2
  117. package/dist/src/app-opentui/react/launch.js +0 -4897
  118. package/dist/src/app-opentui/react/nav.d.ts +0 -18
  119. package/dist/src/app-opentui/react/nav.js +0 -54
  120. package/dist/src/app-opentui/react/scroll.d.ts +0 -12
  121. package/dist/src/app-opentui/react/scroll.js +0 -21
  122. package/dist/src/app-opentui/react/syntax.d.ts +0 -2
  123. package/dist/src/app-opentui/react/syntax.js +0 -65
  124. package/dist/src/app-opentui/registry.d.ts +0 -4
  125. package/dist/src/app-opentui/registry.js +0 -22876
  126. package/dist/src/app-opentui/remote-link.d.ts +0 -10
  127. package/dist/src/app-opentui/remote-link.js +0 -47
  128. package/dist/src/app-opentui/render/ascii-fleet.d.ts +0 -15
  129. package/dist/src/app-opentui/render/ascii-fleet.js +0 -82
  130. package/dist/src/app-opentui/render/constants.d.ts +0 -30
  131. package/dist/src/app-opentui/render/constants.js +0 -64
  132. package/dist/src/app-opentui/render/graphics.d.ts +0 -40
  133. package/dist/src/app-opentui/render/graphics.js +0 -713
  134. package/dist/src/app-opentui/render/hover.d.ts +0 -11
  135. package/dist/src/app-opentui/render/hover.js +0 -34
  136. package/dist/src/app-opentui/render/native-host.d.ts +0 -37
  137. package/dist/src/app-opentui/render/native-host.js +0 -180
  138. package/dist/src/app-opentui/render/panel-layout.d.ts +0 -38
  139. package/dist/src/app-opentui/render/panel-layout.js +0 -48
  140. package/dist/src/app-opentui/render/panels.d.ts +0 -12
  141. package/dist/src/app-opentui/render/panels.js +0 -288
  142. package/dist/src/app-opentui/render/preloader.d.ts +0 -10
  143. package/dist/src/app-opentui/render/preloader.js +0 -166
  144. package/dist/src/app-opentui/render/scene.d.ts +0 -68
  145. package/dist/src/app-opentui/render/scene.js +0 -300
  146. package/dist/src/app-opentui/render/terminal-handoff.d.ts +0 -16
  147. package/dist/src/app-opentui/render/terminal-handoff.js +0 -14
  148. package/dist/src/app-opentui/render/text.d.ts +0 -29
  149. package/dist/src/app-opentui/render/text.js +0 -177
  150. package/dist/src/app-opentui/render/type-bar.d.ts +0 -15
  151. package/dist/src/app-opentui/render/type-bar.js +0 -212
  152. package/dist/src/app-opentui/runtime-resources.d.ts +0 -16
  153. package/dist/src/app-opentui/runtime-resources.js +0 -62
  154. package/dist/src/app-opentui/runtime.d.ts +0 -45
  155. package/dist/src/app-opentui/runtime.js +0 -5232
  156. package/dist/src/app-opentui/scenes/command.d.ts +0 -3
  157. package/dist/src/app-opentui/scenes/command.js +0 -118
  158. package/dist/src/app-opentui/scenes/doctor.d.ts +0 -3
  159. package/dist/src/app-opentui/scenes/doctor.js +0 -296
  160. package/dist/src/app-opentui/scenes/error.d.ts +0 -2
  161. package/dist/src/app-opentui/scenes/error.js +0 -277
  162. package/dist/src/app-opentui/scenes/family-domains/agent.d.ts +0 -2
  163. package/dist/src/app-opentui/scenes/family-domains/agent.js +0 -349
  164. package/dist/src/app-opentui/scenes/family-domains/browser.d.ts +0 -2
  165. package/dist/src/app-opentui/scenes/family-domains/browser.js +0 -196
  166. package/dist/src/app-opentui/scenes/family-domains/dist.d.ts +0 -2
  167. package/dist/src/app-opentui/scenes/family-domains/dist.js +0 -244
  168. package/dist/src/app-opentui/scenes/family-domains/git.d.ts +0 -2
  169. package/dist/src/app-opentui/scenes/family-domains/git.js +0 -196
  170. package/dist/src/app-opentui/scenes/family-domains/github.d.ts +0 -2
  171. package/dist/src/app-opentui/scenes/family-domains/github.js +0 -275
  172. package/dist/src/app-opentui/scenes/family-domains/harness.d.ts +0 -2
  173. package/dist/src/app-opentui/scenes/family-domains/harness.js +0 -153
  174. package/dist/src/app-opentui/scenes/family-domains/index.d.ts +0 -4
  175. package/dist/src/app-opentui/scenes/family-domains/index.js +0 -1680
  176. package/dist/src/app-opentui/scenes/family-domains/kit.d.ts +0 -76
  177. package/dist/src/app-opentui/scenes/family-domains/kit.js +0 -306
  178. package/dist/src/app-opentui/scenes/family-domains/profile.d.ts +0 -2
  179. package/dist/src/app-opentui/scenes/family-domains/profile.js +0 -213
  180. package/dist/src/app-opentui/scenes/family-domains/queue.d.ts +0 -2
  181. package/dist/src/app-opentui/scenes/family-domains/queue.js +0 -147
  182. package/dist/src/app-opentui/scenes/family-domains/remote.d.ts +0 -2
  183. package/dist/src/app-opentui/scenes/family-domains/remote.js +0 -519
  184. package/dist/src/app-opentui/scenes/family-domains/review.d.ts +0 -2
  185. package/dist/src/app-opentui/scenes/family-domains/review.js +0 -281
  186. package/dist/src/app-opentui/scenes/family-domains/setup.d.ts +0 -2
  187. package/dist/src/app-opentui/scenes/family-domains/setup.js +0 -268
  188. package/dist/src/app-opentui/scenes/family-domains/stats.d.ts +0 -2
  189. package/dist/src/app-opentui/scenes/family-domains/stats.js +0 -371
  190. package/dist/src/app-opentui/scenes/family.d.ts +0 -3
  191. package/dist/src/app-opentui/scenes/family.js +0 -2199
  192. package/dist/src/app-opentui/scenes/fleet.d.ts +0 -3
  193. package/dist/src/app-opentui/scenes/fleet.js +0 -766
  194. package/dist/src/app-opentui/scenes/handoff.d.ts +0 -2
  195. package/dist/src/app-opentui/scenes/handoff.js +0 -455
  196. package/dist/src/app-opentui/scenes/help.d.ts +0 -3
  197. package/dist/src/app-opentui/scenes/help.js +0 -725
  198. package/dist/src/app-opentui/scenes/inbox.d.ts +0 -3
  199. package/dist/src/app-opentui/scenes/inbox.js +0 -427
  200. package/dist/src/app-opentui/scenes/init.d.ts +0 -3
  201. package/dist/src/app-opentui/scenes/init.js +0 -181
  202. package/dist/src/app-opentui/scenes/inspect.d.ts +0 -3
  203. package/dist/src/app-opentui/scenes/inspect.js +0 -794
  204. package/dist/src/app-opentui/scenes/main.d.ts +0 -3
  205. package/dist/src/app-opentui/scenes/main.js +0 -332
  206. package/dist/src/app-opentui/scenes/pi.d.ts +0 -3
  207. package/dist/src/app-opentui/scenes/pi.js +0 -509
  208. package/dist/src/app-opentui/scenes/plugin.d.ts +0 -3
  209. package/dist/src/app-opentui/scenes/plugin.js +0 -487
  210. package/dist/src/app-opentui/scenes/repo.d.ts +0 -3
  211. package/dist/src/app-opentui/scenes/repo.js +0 -425
  212. package/dist/src/app-opentui/scenes/run-detail.d.ts +0 -3
  213. package/dist/src/app-opentui/scenes/run-detail.js +0 -467
  214. package/dist/src/app-opentui/scenes/server.d.ts +0 -3
  215. package/dist/src/app-opentui/scenes/server.js +0 -378
  216. package/dist/src/app-opentui/scenes/tasks.d.ts +0 -3
  217. package/dist/src/app-opentui/scenes/tasks.js +0 -768
  218. package/dist/src/app-opentui/scenes/workspace.d.ts +0 -3
  219. package/dist/src/app-opentui/scenes/workspace.js +0 -427
  220. package/dist/src/app-opentui/selectable.d.ts +0 -19
  221. package/dist/src/app-opentui/selectable.js +0 -80
  222. package/dist/src/app-opentui/state.d.ts +0 -4
  223. package/dist/src/app-opentui/state.js +0 -399
  224. package/dist/src/app-opentui/surface-catalog.d.ts +0 -20
  225. package/dist/src/app-opentui/surface-catalog.js +0 -542
  226. package/dist/src/app-opentui/theme.d.ts +0 -59
  227. package/dist/src/app-opentui/theme.js +0 -142
  228. package/dist/src/app-opentui/types.d.ts +0 -313
  229. package/dist/src/app-opentui/types.js +0 -1
  230. package/dist/src/commands/_server-events.d.ts +0 -26
  231. package/dist/src/commands/_server-events.js +0 -715
@@ -1,10 +0,0 @@
1
- import type { AppState } from "./types";
2
- export type RemoteProjectLinkLike = {
3
- readonly ok?: boolean;
4
- readonly status?: string;
5
- readonly message?: string;
6
- readonly hint?: string;
7
- };
8
- export declare function remoteProjectLinkError(message: string | undefined): boolean;
9
- export declare function remoteProjectLinkState(state: AppState): RemoteProjectLinkLike | null;
10
- export declare function shouldOfferRemoteLinkRepair(state: AppState, message?: string): boolean;
@@ -1,47 +0,0 @@
1
- // @bun
2
- // packages/cli/src/app-opentui/remote-link.ts
3
- var REPAIRABLE_REMOTE_LINK_STATUSES = new Set([
4
- "auth_required",
5
- "project_not_registered",
6
- "no_server_checkout",
7
- "invalid_root",
8
- "needs_prepare",
9
- "error"
10
- ]);
11
- function remoteProjectLinkError(message) {
12
- return /no server-host project root link|remote project(?:-root)? link|x-rig-project-root|serverProjectRoot/i.test(message ?? "");
13
- }
14
- function serverRecordForRemoteLink(state) {
15
- const server = state.data.server;
16
- return server && typeof server === "object" && !Array.isArray(server) ? server : null;
17
- }
18
- function remoteProjectLinkState(state) {
19
- const serverRecord = serverRecordForRemoteLink(state);
20
- if (!serverRecord || serverRecord.kind !== "remote")
21
- return null;
22
- const link = serverRecord.remoteProjectLink;
23
- if (link && typeof link === "object" && !Array.isArray(link))
24
- return link;
25
- const direct = state.data.remoteProjectLink;
26
- if (direct && typeof direct === "object" && !Array.isArray(direct))
27
- return direct;
28
- return null;
29
- }
30
- function shouldOfferRemoteLinkRepair(state, message) {
31
- const link = remoteProjectLinkState(state);
32
- if (link) {
33
- if (link.ok === true)
34
- return false;
35
- const status = link.status ?? "";
36
- return REPAIRABLE_REMOTE_LINK_STATUSES.has(status);
37
- }
38
- const serverRecord = serverRecordForRemoteLink(state);
39
- if (serverRecord && serverRecord.kind !== "remote")
40
- return false;
41
- return remoteProjectLinkError(message ?? state.error?.message);
42
- }
43
- export {
44
- shouldOfferRemoteLinkRepair,
45
- remoteProjectLinkState,
46
- remoteProjectLinkError
47
- };
@@ -1,15 +0,0 @@
1
- export declare const FLEET_GRID_WIDTH = 52;
2
- export declare const FLEET_GRID_HEIGHT = 27;
3
- export type FleetSprite = {
4
- readonly art: readonly string[];
5
- readonly x: number;
6
- readonly y: number;
7
- readonly amp: number;
8
- readonly speed: number;
9
- readonly phase: number;
10
- readonly dx: number;
11
- readonly driftSpeed: number;
12
- };
13
- export declare function fleetRows(tick: number, options?: {
14
- readonly animate?: boolean;
15
- }): string[];
@@ -1,82 +0,0 @@
1
- // @bun
2
- // packages/cli/src/app-opentui/render/ascii-fleet.ts
3
- var LEAD_DRONE = [
4
- " .-=-. .-=-. ",
5
- " ( !!! ) ( !!! ) ",
6
- " '-=-'._ _.'-=-' ",
7
- " '._ _.' ",
8
- " '=$$$$$$$=.' ",
9
- " =$$$$$$$$$$$= ",
10
- " $$$@@@@@@@@@@$$$ ",
11
- " $$$@@ @@$$$ ",
12
- " $$@ ? @$$$ ",
13
- " $$$@ '-' @$$$ ",
14
- " $$$@@ @@$$$ ",
15
- " $$$@@@@@@@@@@$$$ ",
16
- " =$$$$$$$$$$$= ",
17
- " '=$$$$$$$=.' ",
18
- " _.' '._ ",
19
- " .-=-.' '.-=-. ",
20
- " ( !!! ) ( !!! ) ",
21
- " '-=-' '-=-' "
22
- ];
23
- var MINI_DRONE = [
24
- "(!!!) (!!!)",
25
- " \\%==%/ ",
26
- " %%?%% ",
27
- " /%==%\\ ",
28
- "(!!!) (!!!)"
29
- ];
30
- var ROTORS = ["---", "\\\\\\", "|||", "///"];
31
- var FLEET_GRID_WIDTH = 52;
32
- var FLEET_GRID_HEIGHT = 27;
33
- var FLEET = [
34
- { art: MINI_DRONE, x: 0, y: 2, amp: 1, speed: 0.05, phase: 0, dx: 1, driftSpeed: 0.02 },
35
- { art: MINI_DRONE, x: 39, y: 2, amp: 1, speed: 0.044, phase: 2.1, dx: 1, driftSpeed: 0.017 },
36
- { art: MINI_DRONE, x: 1, y: 20, amp: 1, speed: 0.048, phase: 4.2, dx: 1, driftSpeed: 0.023 },
37
- { art: MINI_DRONE, x: 38, y: 20, amp: 1, speed: 0.041, phase: 1.3, dx: 1, driftSpeed: 0.015 },
38
- { art: LEAD_DRONE, x: 10, y: 5, amp: 2, speed: 0.04, phase: 0, dx: 0, driftSpeed: 0.011 }
39
- ];
40
- function fleetRows(tick, options = {}) {
41
- const animate = options.animate ?? true;
42
- const t = animate ? tick : 0;
43
- const blade = ROTORS[Math.floor(t / 4) % ROTORS.length];
44
- const pulse = Math.sin(t * 0.07);
45
- const eye = pulse > 0.45 ? "@" : pulse > -0.1 ? "o" : ".";
46
- const grid = Array.from({ length: FLEET_GRID_HEIGHT }, () => Array.from({ length: FLEET_GRID_WIDTH }, () => " "));
47
- for (const drone of FLEET) {
48
- const yOffset = drone.y + Math.round(drone.amp * Math.sin(t * drone.speed + drone.phase));
49
- const xOffset = drone.x + Math.round(drone.dx * Math.sin(t * drone.driftSpeed + drone.phase));
50
- for (let row = 0;row < drone.art.length; row += 1) {
51
- const source = drone.art[row];
52
- const targetY = yOffset + row;
53
- if (targetY < 0 || targetY >= FLEET_GRID_HEIGHT)
54
- continue;
55
- for (let col = 0;col < source.length; col += 1) {
56
- let char = source[col];
57
- if (char === " ")
58
- continue;
59
- const targetX = xOffset + col;
60
- if (targetX < 0 || targetX >= FLEET_GRID_WIDTH)
61
- continue;
62
- if (source.slice(col, col + 3) === "!!!") {
63
- for (let rotorIndex = 0;rotorIndex < 3; rotorIndex += 1) {
64
- if (targetX + rotorIndex < FLEET_GRID_WIDTH)
65
- grid[targetY][targetX + rotorIndex] = blade[rotorIndex];
66
- }
67
- col += 2;
68
- continue;
69
- }
70
- if (char === "?")
71
- char = eye;
72
- grid[targetY][targetX] = char;
73
- }
74
- }
75
- }
76
- return grid.map((row) => row.join("").replace(/\s+$/, ""));
77
- }
78
- export {
79
- fleetRows,
80
- FLEET_GRID_WIDTH,
81
- FLEET_GRID_HEIGHT
82
- };
@@ -1,30 +0,0 @@
1
- export declare const LCG_MULTIPLIER = 1664525;
2
- export declare const LCG_INCREMENT = 1013904223;
3
- export declare const LCG_DIVISOR = 4294967295;
4
- export declare const PACKET_CYAN_PROBABILITY = 0.22;
5
- export declare const LANE_INTERP_STEPS = 32;
6
- export declare const LANE_LEN_BASE = 0.32;
7
- export declare const LANE_LEN_SPREAD = 0.42;
8
- export declare const LANE_CURVE_RANGE = 0.7;
9
- export declare const PACKET_SPEED_BASE = 0.003;
10
- export declare const PACKET_SPEED_SPREAD = 0.009;
11
- export declare const DISPATCH_LANES_COMPACT = 7;
12
- export declare const DISPATCH_LANES_WIDE = 12;
13
- export declare const DISPATCH_PACKETS_COMPACT = 70;
14
- export declare const DISPATCH_PACKETS_WIDE = 150;
15
- export declare const CARRIER_NODES_COMPACT = 5;
16
- export declare const CARRIER_NODES_WIDE = 7;
17
- export declare const LOOP_GATES_COMPACT = 4;
18
- export declare const LOOP_GATES_WIDE = 5;
19
- export declare const DISPATCH_DRONES_COMPACT = 4;
20
- export declare const DISPATCH_DRONES_WIDE = 8;
21
- export declare const CORE_DISPATCH_X = 0.3;
22
- export declare const CORE_DISPATCH_Y = 0.45;
23
- export declare const CORE_CARRIER_X = 0.5;
24
- export declare const CORE_CARRIER_Y = 0.54;
25
- export declare const CORE_LOOP_X = 0.09;
26
- export declare const CORE_LOOP_Y = 0.56;
27
- export declare const RAIL_YS_LOOP: readonly [0.18, 0.5, 0.82];
28
- export declare const RAIL_YS_CARRIER: readonly [0.24, 0.54, 0.82];
29
- export declare const RAIL_YS_DISPATCH: readonly [0.18, 0.58, 0.82];
30
- export declare const GLOW_FALLOFF_EXP_ASCII = 2.2;
@@ -1,64 +0,0 @@
1
- // @bun
2
- // packages/cli/src/app-opentui/render/constants.ts
3
- var LCG_MULTIPLIER = 1664525;
4
- var LCG_INCREMENT = 1013904223;
5
- var LCG_DIVISOR = 4294967295;
6
- var PACKET_CYAN_PROBABILITY = 0.22;
7
- var LANE_INTERP_STEPS = 32;
8
- var LANE_LEN_BASE = 0.32;
9
- var LANE_LEN_SPREAD = 0.42;
10
- var LANE_CURVE_RANGE = 0.7;
11
- var PACKET_SPEED_BASE = 0.003;
12
- var PACKET_SPEED_SPREAD = 0.009;
13
- var DISPATCH_LANES_COMPACT = 7;
14
- var DISPATCH_LANES_WIDE = 12;
15
- var DISPATCH_PACKETS_COMPACT = 70;
16
- var DISPATCH_PACKETS_WIDE = 150;
17
- var CARRIER_NODES_COMPACT = 5;
18
- var CARRIER_NODES_WIDE = 7;
19
- var LOOP_GATES_COMPACT = 4;
20
- var LOOP_GATES_WIDE = 5;
21
- var DISPATCH_DRONES_COMPACT = 4;
22
- var DISPATCH_DRONES_WIDE = 8;
23
- var CORE_DISPATCH_X = 0.3;
24
- var CORE_DISPATCH_Y = 0.45;
25
- var CORE_CARRIER_X = 0.5;
26
- var CORE_CARRIER_Y = 0.54;
27
- var CORE_LOOP_X = 0.09;
28
- var CORE_LOOP_Y = 0.56;
29
- var RAIL_YS_LOOP = [0.18, 0.5, 0.82];
30
- var RAIL_YS_CARRIER = [0.24, 0.54, 0.82];
31
- var RAIL_YS_DISPATCH = [0.18, 0.58, 0.82];
32
- var GLOW_FALLOFF_EXP_ASCII = 2.2;
33
- export {
34
- RAIL_YS_LOOP,
35
- RAIL_YS_DISPATCH,
36
- RAIL_YS_CARRIER,
37
- PACKET_SPEED_SPREAD,
38
- PACKET_SPEED_BASE,
39
- PACKET_CYAN_PROBABILITY,
40
- LOOP_GATES_WIDE,
41
- LOOP_GATES_COMPACT,
42
- LCG_MULTIPLIER,
43
- LCG_INCREMENT,
44
- LCG_DIVISOR,
45
- LANE_LEN_SPREAD,
46
- LANE_LEN_BASE,
47
- LANE_INTERP_STEPS,
48
- LANE_CURVE_RANGE,
49
- GLOW_FALLOFF_EXP_ASCII,
50
- DISPATCH_PACKETS_WIDE,
51
- DISPATCH_PACKETS_COMPACT,
52
- DISPATCH_LANES_WIDE,
53
- DISPATCH_LANES_COMPACT,
54
- DISPATCH_DRONES_WIDE,
55
- DISPATCH_DRONES_COMPACT,
56
- CORE_LOOP_Y,
57
- CORE_LOOP_X,
58
- CORE_DISPATCH_Y,
59
- CORE_DISPATCH_X,
60
- CORE_CARRIER_Y,
61
- CORE_CARRIER_X,
62
- CARRIER_NODES_WIDE,
63
- CARRIER_NODES_COMPACT
64
- };
@@ -1,40 +0,0 @@
1
- import { FrameBufferRenderable, RGBA, type CliRenderer } from "@opentui/core";
2
- import type { StageLayout } from "../layout";
3
- import type { AppSceneId, AppScenePanel } from "../types";
4
- export type RigGraphicsLayer = FrameBufferRenderable & {
5
- __rigMarketingCanvas?: MarketingGlyphCanvas;
6
- __rigAmbientKey?: string;
7
- };
8
- declare class MarketingGlyphCanvas {
9
- private rand;
10
- private canvas;
11
- private layout;
12
- private activeKind;
13
- private lanes;
14
- private motes;
15
- private packets;
16
- constructor(layout: StageLayout);
17
- resize(layout: StageLayout): void;
18
- render(layer: RigGraphicsLayer, scene: AppSceneId, tick: number): void;
19
- private reset;
20
- private setupDispatch;
21
- private setupLoop;
22
- private setupCarrier;
23
- private packet;
24
- private core;
25
- private lanePoint;
26
- private drawMotes;
27
- private drawMarketingRails;
28
- private drawDispatch;
29
- private drawLoop;
30
- private drawCarrier;
31
- private drawDrone;
32
- private blit;
33
- }
34
- export declare function createGraphicsLayer(renderer: CliRenderer, layout: StageLayout): RigGraphicsLayer;
35
- export declare function resizeGraphicsLayer(layer: RigGraphicsLayer, layout: StageLayout): void;
36
- export declare function clearGraphicsLayer(layer: RigGraphicsLayer): void;
37
- export declare function drawPanelChrome(layer: RigGraphicsLayer, layout: StageLayout, panels: readonly AppScenePanel[]): void;
38
- export declare function drawAmbientField(layer: RigGraphicsLayer, layout: StageLayout, _tick: number, scene?: AppSceneId, load?: number, activeRuns?: number): void;
39
- export declare function drawSparkline(layer: RigGraphicsLayer, x: number, y: number, values: readonly number[], color?: RGBA): void;
40
- export {};