@tacuchi/agent-workflow-cli 8.0.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/cli/main.js +0 -0
  2. package/dist/cli/tui/app.d.ts.map +1 -1
  3. package/dist/cli/tui/app.js +119 -61
  4. package/dist/cli/tui/app.js.map +1 -1
  5. package/dist/cli/tui/components/activity-feed.d.ts +16 -0
  6. package/dist/cli/tui/components/activity-feed.d.ts.map +1 -0
  7. package/dist/cli/tui/components/activity-feed.js +35 -0
  8. package/dist/cli/tui/components/activity-feed.js.map +1 -0
  9. package/dist/cli/tui/components/command-palette.d.ts +0 -1
  10. package/dist/cli/tui/components/command-palette.d.ts.map +1 -1
  11. package/dist/cli/tui/components/command-palette.js +5 -5
  12. package/dist/cli/tui/components/command-palette.js.map +1 -1
  13. package/dist/cli/tui/components/confirm-banner.d.ts +10 -0
  14. package/dist/cli/tui/components/confirm-banner.d.ts.map +1 -0
  15. package/dist/cli/tui/components/confirm-banner.js +11 -0
  16. package/dist/cli/tui/components/confirm-banner.js.map +1 -0
  17. package/dist/cli/tui/components/detail-panel.d.ts +34 -0
  18. package/dist/cli/tui/components/detail-panel.d.ts.map +1 -0
  19. package/dist/cli/tui/components/detail-panel.js +83 -0
  20. package/dist/cli/tui/components/detail-panel.js.map +1 -0
  21. package/dist/cli/tui/components/family-card.d.ts +5 -1
  22. package/dist/cli/tui/components/family-card.d.ts.map +1 -1
  23. package/dist/cli/tui/components/family-card.js +34 -4
  24. package/dist/cli/tui/components/family-card.js.map +1 -1
  25. package/dist/cli/tui/components/inline-wizard.d.ts +19 -0
  26. package/dist/cli/tui/components/inline-wizard.d.ts.map +1 -0
  27. package/dist/cli/tui/components/inline-wizard.js +16 -0
  28. package/dist/cli/tui/components/inline-wizard.js.map +1 -0
  29. package/dist/cli/tui/components/list-row.d.ts +11 -3
  30. package/dist/cli/tui/components/list-row.d.ts.map +1 -1
  31. package/dist/cli/tui/components/list-row.js +71 -13
  32. package/dist/cli/tui/components/list-row.js.map +1 -1
  33. package/dist/cli/tui/components/page-head.d.ts +8 -16
  34. package/dist/cli/tui/components/page-head.d.ts.map +1 -1
  35. package/dist/cli/tui/components/page-head.js +21 -14
  36. package/dist/cli/tui/components/page-head.js.map +1 -1
  37. package/dist/cli/tui/components/phase-card.d.ts +2 -1
  38. package/dist/cli/tui/components/phase-card.d.ts.map +1 -1
  39. package/dist/cli/tui/components/phase-card.js +9 -4
  40. package/dist/cli/tui/components/phase-card.js.map +1 -1
  41. package/dist/cli/tui/components/quick-actions.d.ts +9 -0
  42. package/dist/cli/tui/components/quick-actions.d.ts.map +1 -0
  43. package/dist/cli/tui/components/quick-actions.js +9 -0
  44. package/dist/cli/tui/components/quick-actions.js.map +1 -0
  45. package/dist/cli/tui/components/section-head.d.ts +10 -0
  46. package/dist/cli/tui/components/section-head.d.ts.map +1 -0
  47. package/dist/cli/tui/components/section-head.js +8 -0
  48. package/dist/cli/tui/components/section-head.js.map +1 -0
  49. package/dist/cli/tui/components/sidebar.d.ts +27 -0
  50. package/dist/cli/tui/components/sidebar.d.ts.map +1 -0
  51. package/dist/cli/tui/components/sidebar.js +37 -0
  52. package/dist/cli/tui/components/sidebar.js.map +1 -0
  53. package/dist/cli/tui/components/stat-tile.d.ts +4 -2
  54. package/dist/cli/tui/components/stat-tile.d.ts.map +1 -1
  55. package/dist/cli/tui/components/stat-tile.js +9 -8
  56. package/dist/cli/tui/components/stat-tile.js.map +1 -1
  57. package/dist/cli/tui/components/toast-stack.d.ts +3 -3
  58. package/dist/cli/tui/components/toast-stack.js +3 -3
  59. package/dist/cli/tui/data/activity.d.ts +21 -0
  60. package/dist/cli/tui/data/activity.d.ts.map +1 -0
  61. package/dist/cli/tui/data/activity.js +83 -0
  62. package/dist/cli/tui/data/activity.js.map +1 -0
  63. package/dist/cli/tui/tabs/mcp-tab.d.ts +3 -11
  64. package/dist/cli/tui/tabs/mcp-tab.d.ts.map +1 -1
  65. package/dist/cli/tui/tabs/mcp-tab.js +113 -85
  66. package/dist/cli/tui/tabs/mcp-tab.js.map +1 -1
  67. package/dist/cli/tui/tabs/project-tab.d.ts +0 -11
  68. package/dist/cli/tui/tabs/project-tab.d.ts.map +1 -1
  69. package/dist/cli/tui/tabs/project-tab.js +38 -78
  70. package/dist/cli/tui/tabs/project-tab.js.map +1 -1
  71. package/dist/cli/tui/tabs/skills-tab.d.ts +1 -21
  72. package/dist/cli/tui/tabs/skills-tab.d.ts.map +1 -1
  73. package/dist/cli/tui/tabs/skills-tab.js +65 -85
  74. package/dist/cli/tui/tabs/skills-tab.js.map +1 -1
  75. package/dist/cli/tui/tabs/status-tab.d.ts +4 -1
  76. package/dist/cli/tui/tabs/status-tab.d.ts.map +1 -1
  77. package/dist/cli/tui/tabs/status-tab.js +50 -11
  78. package/dist/cli/tui/tabs/status-tab.js.map +1 -1
  79. package/dist/cli/tui/tabs/workflow-tab.d.ts +3 -1
  80. package/dist/cli/tui/tabs/workflow-tab.d.ts.map +1 -1
  81. package/dist/cli/tui/tabs/workflow-tab.js +31 -15
  82. package/dist/cli/tui/tabs/workflow-tab.js.map +1 -1
  83. package/dist/cli/tui/theme.d.ts +75 -55
  84. package/dist/cli/tui/theme.d.ts.map +1 -1
  85. package/dist/cli/tui/theme.js +75 -50
  86. package/dist/cli/tui/theme.js.map +1 -1
  87. package/package.json +1 -1
  88. package/dist/cli/commands/orchestration.d.ts +0 -5
  89. package/dist/cli/commands/orchestration.d.ts.map +0 -1
  90. package/dist/cli/commands/orchestration.js +0 -84
  91. package/dist/cli/commands/orchestration.js.map +0 -1
  92. package/dist/cli/commands/wave2-extras.d.ts +0 -7
  93. package/dist/cli/commands/wave2-extras.d.ts.map +0 -1
  94. package/dist/cli/commands/wave2-extras.js +0 -87
  95. package/dist/cli/commands/wave2-extras.js.map +0 -1
  96. package/dist/cli/commands/wave2-final.d.ts +0 -8
  97. package/dist/cli/commands/wave2-final.d.ts.map +0 -1
  98. package/dist/cli/commands/wave2-final.js +0 -134
  99. package/dist/cli/commands/wave2-final.js.map +0 -1
  100. package/dist/cli/commands/wave4d-simple.d.ts +0 -6
  101. package/dist/cli/commands/wave4d-simple.d.ts.map +0 -1
  102. package/dist/cli/commands/wave4d-simple.js +0 -138
  103. package/dist/cli/commands/wave4d-simple.js.map +0 -1
  104. package/dist/cli/tui/components/action-modal.d.ts +0 -33
  105. package/dist/cli/tui/components/action-modal.d.ts.map +0 -1
  106. package/dist/cli/tui/components/action-modal.js +0 -41
  107. package/dist/cli/tui/components/action-modal.js.map +0 -1
  108. package/dist/cli/tui/components/confirm-modal.d.ts +0 -12
  109. package/dist/cli/tui/components/confirm-modal.d.ts.map +0 -1
  110. package/dist/cli/tui/components/confirm-modal.js +0 -18
  111. package/dist/cli/tui/components/confirm-modal.js.map +0 -1
  112. package/dist/cli/tui/components/connections-grid.d.ts +0 -8
  113. package/dist/cli/tui/components/connections-grid.d.ts.map +0 -1
  114. package/dist/cli/tui/components/connections-grid.js +0 -55
  115. package/dist/cli/tui/components/connections-grid.js.map +0 -1
  116. package/dist/cli/tui/components/connections-table.d.ts +0 -5
  117. package/dist/cli/tui/components/connections-table.d.ts.map +0 -1
  118. package/dist/cli/tui/components/connections-table.js +0 -11
  119. package/dist/cli/tui/components/connections-table.js.map +0 -1
  120. package/dist/cli/tui/components/footer.d.ts +0 -4
  121. package/dist/cli/tui/components/footer.d.ts.map +0 -1
  122. package/dist/cli/tui/components/footer.js +0 -6
  123. package/dist/cli/tui/components/footer.js.map +0 -1
  124. package/dist/cli/tui/components/frame-box.d.ts +0 -10
  125. package/dist/cli/tui/components/frame-box.d.ts.map +0 -1
  126. package/dist/cli/tui/components/frame-box.js +0 -9
  127. package/dist/cli/tui/components/frame-box.js.map +0 -1
  128. package/dist/cli/tui/components/header.d.ts +0 -14
  129. package/dist/cli/tui/components/header.d.ts.map +0 -1
  130. package/dist/cli/tui/components/header.js +0 -21
  131. package/dist/cli/tui/components/header.js.map +0 -1
  132. package/dist/cli/tui/components/host-chip.d.ts +0 -28
  133. package/dist/cli/tui/components/host-chip.d.ts.map +0 -1
  134. package/dist/cli/tui/components/host-chip.js +0 -35
  135. package/dist/cli/tui/components/host-chip.js.map +0 -1
  136. package/dist/cli/tui/components/keymap-bar.d.ts +0 -17
  137. package/dist/cli/tui/components/keymap-bar.d.ts.map +0 -1
  138. package/dist/cli/tui/components/keymap-bar.js +0 -13
  139. package/dist/cli/tui/components/keymap-bar.js.map +0 -1
  140. package/dist/cli/tui/components/pill.d.ts +0 -16
  141. package/dist/cli/tui/components/pill.d.ts.map +0 -1
  142. package/dist/cli/tui/components/pill.js +0 -24
  143. package/dist/cli/tui/components/pill.js.map +0 -1
  144. package/dist/cli/tui/components/sectioned-menu.d.ts +0 -24
  145. package/dist/cli/tui/components/sectioned-menu.d.ts.map +0 -1
  146. package/dist/cli/tui/components/sectioned-menu.js +0 -72
  147. package/dist/cli/tui/components/sectioned-menu.js.map +0 -1
  148. package/dist/cli/tui/components/tab-bar.d.ts +0 -23
  149. package/dist/cli/tui/components/tab-bar.d.ts.map +0 -1
  150. package/dist/cli/tui/components/tab-bar.js +0 -17
  151. package/dist/cli/tui/components/tab-bar.js.map +0 -1
  152. package/dist/cli/tui/screens/main-menu.d.ts +0 -8
  153. package/dist/cli/tui/screens/main-menu.d.ts.map +0 -1
  154. package/dist/cli/tui/screens/main-menu.js +0 -24
  155. package/dist/cli/tui/screens/main-menu.js.map +0 -1
  156. package/dist/cli/tui/screens/mcp-done.d.ts +0 -10
  157. package/dist/cli/tui/screens/mcp-done.d.ts.map +0 -1
  158. package/dist/cli/tui/screens/mcp-done.js +0 -24
  159. package/dist/cli/tui/screens/mcp-done.js.map +0 -1
  160. package/dist/cli/tui/screens/mcp-wizard.d.ts +0 -10
  161. package/dist/cli/tui/screens/mcp-wizard.d.ts.map +0 -1
  162. package/dist/cli/tui/screens/mcp-wizard.js +0 -97
  163. package/dist/cli/tui/screens/mcp-wizard.js.map +0 -1
@@ -1,87 +0,0 @@
1
- import { runPhaseDetect } from "../../application/phase-detect-service.js";
2
- import { runSkillIndex } from "../../application/skill-index-service.js";
3
- import { runStack } from "../../application/stack-service.js";
4
- import { runWorkspaceMode } from "../../application/workspace-mode-service.js";
5
- export const stackCommand = {
6
- name: "stack",
7
- describe: "Detect stack of the project (language/framework/db/build).",
8
- async execute(args, ctx) {
9
- const projectDir = args.values.get("project-dir");
10
- const data = await runStack(ctx.fs, ctx.env, projectDir !== undefined ? { projectDir } : {});
11
- return { ok: true, data, exitCode: 0 };
12
- },
13
- };
14
- export const workspaceModeCommand = {
15
- name: "workspace-mode",
16
- describe: "Read workspace mode (project|hub) + sources + working branches.",
17
- async execute(args, ctx) {
18
- const verbose = args.flags.has("--verbose");
19
- const data = await runWorkspaceMode(ctx.fs, ctx.env, ctx.paths, { verbose });
20
- return { ok: true, data, exitCode: 0 };
21
- },
22
- };
23
- export const skillIndexCommand = {
24
- name: "skill-index",
25
- describe: "Lazy-load skill index (frontmatter only).",
26
- async execute(args, ctx) {
27
- const pluginRoot = args.plugin.pluginRoot ?? args.values.get("plugin-root");
28
- const flow = args.plugin.flow ?? args.values.get("flow");
29
- const exportedOnly = args.flags.has("--exported-only");
30
- const input = {};
31
- if (pluginRoot !== undefined)
32
- input.pluginRoot = pluginRoot;
33
- if (flow !== undefined)
34
- input.flow = flow;
35
- if (exportedOnly)
36
- input.exportedOnly = true;
37
- const data = await runSkillIndex(ctx.fs, ctx.env, input);
38
- return { ok: true, data, exitCode: 0 };
39
- },
40
- };
41
- export const phaseDetectCommand = {
42
- name: "phase-detect",
43
- describe: "Suggest current session phase from artifacts (no mutation).",
44
- async execute(args, ctx) {
45
- const code = args.values.get("code");
46
- const data = await runPhaseDetect(ctx.fs, ctx.env, ctx.paths, code);
47
- if ("error" in data) {
48
- return {
49
- ok: false,
50
- error: { code: "INVALID_INPUT", message: data.error },
51
- data,
52
- exitCode: 1,
53
- };
54
- }
55
- return { ok: true, data, exitCode: 0 };
56
- },
57
- };
58
- export const workflowsCommand = {
59
- name: "workflows",
60
- describe: "Dump registered specialty workflows (empty when no flow plugin loaded).",
61
- async execute(args) {
62
- const targetFlow = args.values.get("flow");
63
- if (targetFlow !== undefined) {
64
- return {
65
- ok: true,
66
- data: {
67
- error: `Workflow no registrado para flow=${pythonRepr(targetFlow)}`,
68
- registered_flows: [],
69
- },
70
- exitCode: 0,
71
- };
72
- }
73
- return {
74
- ok: true,
75
- data: {
76
- registered_flows: [],
77
- count: 0,
78
- workflows: [],
79
- },
80
- exitCode: 0,
81
- };
82
- },
83
- };
84
- function pythonRepr(s) {
85
- return `'${s}'`;
86
- }
87
- //# sourceMappingURL=wave2-extras.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wave2-extras.js","sourceRoot":"","sources":["../../../src/cli/commands/wave2-extras.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAM/E,MAAM,CAAC,MAAM,YAAY,GAAe;IACtC,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,4DAA4D;IACtE,KAAK,CAAC,OAAO,CAAC,IAAgB,EAAE,GAAe;QAC7C,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAClD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC7F,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACzC,CAA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E,gBAAgB,EAAE,EAAE;iBACrB;gBACD,QAAQ,EAAE,CAAC;aACZ,CAAC;QACJ,CAAC;QACD,OAAO;YACL,EAAE,EAAE,IAAI;YACR,IAAI,EAAE;gBACJ,gBAAgB,EAAE,EAAE;gBACpB,KAAK,EAAE,CAAC;gBACR,SAAS,EAAE,EAAE;aACd;YACD,QAAQ,EAAE,CAAC;SACZ,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,IAAI,CAAC,GAAG,CAAC;AAClB,CAAC"}
@@ -1,8 +0,0 @@
1
- import type { QtcCommand } from "../registry.js";
2
- export declare const sourcesCommand: QtcCommand;
3
- export declare const checkpointReadCommand: QtcCommand;
4
- export declare const resumeSummaryCommand: QtcCommand;
5
- export declare const compressCheckpointCommand: QtcCommand;
6
- export declare const phaseNextCommand: QtcCommand;
7
- export declare const checkBranchCommand: QtcCommand;
8
- //# sourceMappingURL=wave2-final.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wave2-final.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/wave2-final.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,eAAO,MAAM,cAAc,EAAE,UAuB5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,UAgBnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,UAOlC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,UAuBvC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UAqB9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,UAuBhC,CAAC"}
@@ -1,134 +0,0 @@
1
- import { runCheckBranch } from "../../application/check-branch-service.js";
2
- import { runCheckpointRead, runCompressCheckpoint, runResumeSummary, } from "../../application/checkpoint-service.js";
3
- import { runPhaseNext } from "../../application/phase-next-service.js";
4
- import { runSources } from "../../application/sources-service.js";
5
- export const sourcesCommand = {
6
- name: "sources",
7
- describe: "List sources from QTC-PROJECT block with git status enrichment.",
8
- async execute(args, ctx) {
9
- const session = args.values.get("session");
10
- const scopeRaw = args.values.get("scope");
11
- const skipGit = args.flags.has("--no-git");
12
- const flow = args.values.get("flow");
13
- const verbose = args.flags.has("--verbose");
14
- const input = {};
15
- if (session !== undefined)
16
- input.sessionCode = session;
17
- if (scopeRaw !== undefined) {
18
- input.scope = scopeRaw
19
- .split(",")
20
- .map((s) => s.trim())
21
- .filter((s) => s.length > 0);
22
- }
23
- if (skipGit)
24
- input.skipGit = true;
25
- if (flow !== undefined)
26
- input.flowOverride = flow;
27
- if (verbose)
28
- input.verbose = true;
29
- const data = await runSources(ctx.fs, ctx.env, ctx.git, ctx.paths, input);
30
- return { ok: true, data, exitCode: 0 };
31
- },
32
- };
33
- export const checkpointReadCommand = {
34
- name: "checkpoint-read",
35
- describe: "Read CHECKPOINT.md of the active (or --code) session.",
36
- async execute(args, ctx) {
37
- const code = args.values.get("code");
38
- const data = await runCheckpointRead(ctx.fs, ctx.env, ctx.paths, code);
39
- if ("error" in data) {
40
- return {
41
- ok: false,
42
- error: { code: "INVALID_INPUT", message: data.error },
43
- data,
44
- exitCode: 1,
45
- };
46
- }
47
- return { ok: true, data, exitCode: 0 };
48
- },
49
- };
50
- export const resumeSummaryCommand = {
51
- name: "resume-summary",
52
- describe: "Compact resume payload for PostCompact hook.",
53
- async execute(_args, ctx) {
54
- const data = await runResumeSummary(ctx.fs, ctx.env, ctx.paths);
55
- return { ok: true, data, exitCode: 0 };
56
- },
57
- };
58
- export const compressCheckpointCommand = {
59
- name: "compress-checkpoint",
60
- describe: "Identify long artifacts that should be compressed (HALLAZGOS/EVIDENCIA/...).",
61
- async execute(args, ctx) {
62
- const code = args.values.get("code");
63
- const thresholdRaw = args.values.get("threshold");
64
- const options = {};
65
- if (code !== undefined)
66
- options.code = code;
67
- if (thresholdRaw !== undefined) {
68
- const n = Number.parseInt(thresholdRaw, 10);
69
- if (Number.isFinite(n))
70
- options.threshold = n;
71
- }
72
- const data = await runCompressCheckpoint(ctx.fs, ctx.env, ctx.paths, options);
73
- if ("error" in data) {
74
- return {
75
- ok: false,
76
- error: { code: "INVALID_INPUT", message: data.error },
77
- data,
78
- exitCode: 1,
79
- };
80
- }
81
- return { ok: true, data, exitCode: 0 };
82
- },
83
- };
84
- export const phaseNextCommand = {
85
- name: "phase-next",
86
- describe: "Advance session phase to the next slot in the lifecycle.",
87
- async execute(args, ctx) {
88
- const code = args.values.get("code");
89
- const data = await runPhaseNext(ctx.fs, ctx.env, ctx.paths, code);
90
- if ("error" in data) {
91
- return {
92
- ok: false,
93
- error: { code: "INVALID_INPUT", message: data.error },
94
- data,
95
- exitCode: 1,
96
- };
97
- }
98
- // Python emits 2 JSON objects when phase actually advances (project-md-upsert + phase-next).
99
- if (data.projectMd) {
100
- const { writeStdout } = await import("../render.js");
101
- writeStdout(`${JSON.stringify(data.projectMd, null, 2)}\n`);
102
- }
103
- return { ok: true, data: data.phaseNext, exitCode: 0 };
104
- },
105
- };
106
- export const checkBranchCommand = {
107
- name: "check-branch",
108
- describe: "Verify a source branch vs expected work branch.",
109
- async execute(args, ctx) {
110
- const alias = args.values.get("source");
111
- const pathArg = args.values.get("path");
112
- const fileArg = args.values.get("file");
113
- const session = args.values.get("session");
114
- const flow = args.values.get("flow");
115
- const strict = args.flags.has("--strict");
116
- const input = {};
117
- if (alias !== undefined)
118
- input.alias = alias;
119
- if (pathArg !== undefined)
120
- input.pathArg = pathArg;
121
- if (fileArg !== undefined)
122
- input.fileArg = fileArg;
123
- if (session !== undefined)
124
- input.sessionCode = session;
125
- if (flow !== undefined)
126
- input.flowOverride = flow;
127
- if (strict)
128
- input.strict = true;
129
- const data = await runCheckBranch(ctx.fs, ctx.env, ctx.git, ctx.paths, input);
130
- const exit = strict && data.match === false ? 2 : 0;
131
- return { ok: true, data, exitCode: exit };
132
- },
133
- };
134
- //# sourceMappingURL=wave2-final.js.map
@@ -1 +0,0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C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/D,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5C,CAAC;CACF,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { QtcCommand } from "../registry.js";
2
- export declare const bootstrapDsnCommand: QtcCommand;
3
- export declare const graduateCommand: QtcCommand;
4
- export declare const upgradeHubModeCommand: QtcCommand;
5
- export declare const codeScanCommand: QtcCommand;
6
- //# sourceMappingURL=wave4d-simple.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wave4d-simple.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/wave4d-simple.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,eAAO,MAAM,mBAAmB,EAAE,UAiBjC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,UA6B7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,UAcnC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,UAqC7B,CAAC"}
@@ -1,138 +0,0 @@
1
- import { runCodeScan } from "../../application/code-scan-service.js";
2
- import { runBootstrapDsn } from "../../application/dev-bootstrap-dsn-service.js";
3
- import { runGraduate } from "../../application/dev-graduate-service.js";
4
- import { runUpgradeHubMode } from "../../application/upgrade-hub-mode-service.js";
5
- export const bootstrapDsnCommand = {
6
- name: "bootstrap-dsn",
7
- describe: "Persist DB_CERT_DSN/DB_PROD_DSN to the namespace's dsn.env file.",
8
- async execute(_args, ctx) {
9
- const certDsn = ctx.env.get("DB_CERT_DSN");
10
- const prodDsn = ctx.env.get("DB_PROD_DSN");
11
- const result = runBootstrapDsn(ctx.paths, { certDsn, prodDsn });
12
- if ("error" in result) {
13
- return {
14
- ok: false,
15
- error: { code: "MISSING_DSN", message: result.error },
16
- data: { error: result.error },
17
- exitCode: 2,
18
- };
19
- }
20
- return { ok: true, data: result, exitCode: 0 };
21
- },
22
- };
23
- export const graduateCommand = {
24
- name: "graduate",
25
- describe: "Graduate session artifacts (decision/manual/script/especificacion/conclusion) to docs/.",
26
- async execute(args, ctx) {
27
- const input = {};
28
- const kind = args.values.get("kind");
29
- if (kind !== undefined)
30
- input.kind = kind;
31
- const session = args.values.get("session");
32
- if (session !== undefined)
33
- input.session = session;
34
- const slug = args.values.get("slug");
35
- if (slug !== undefined)
36
- input.slug = slug;
37
- const source = args.values.get("source");
38
- if (source !== undefined)
39
- input.source = source;
40
- if (kind === "decision") {
41
- const id = args.values.get("id") ?? args.values.get("dec-id");
42
- if (id !== undefined)
43
- input.decId = id;
44
- }
45
- const data = await runGraduate(ctx.fs, ctx.env, ctx.paths, input);
46
- if ("error" in data) {
47
- return {
48
- ok: false,
49
- error: { code: "INVALID_INPUT", message: data.error },
50
- data,
51
- exitCode: 1,
52
- };
53
- }
54
- return { ok: true, data, exitCode: 0 };
55
- },
56
- };
57
- export const upgradeHubModeCommand = {
58
- name: "upgrade-hub-mode",
59
- describe: "Detect and apply Mode: hub upgrade when ≥2 sources declared.",
60
- async execute(args, ctx) {
61
- const dryRun = args.flags.has("--dry-run");
62
- const data = await runUpgradeHubMode(ctx.fs, ctx.env, ctx.paths, dryRun ? { dryRun: true } : {}, ctx.runtime);
63
- return { ok: true, data, exitCode: 0 };
64
- },
65
- };
66
- export const codeScanCommand = {
67
- name: "code-scan",
68
- describe: "Scan files for release patterns (localhost, secrets, TODOs, ...).",
69
- async execute(args, ctx) {
70
- const root = args.values.get("root");
71
- const patternsFile = args.values.get("patterns-file");
72
- const ext = args.values.get("ext");
73
- const exclude = args.values.get("exclude");
74
- const maxStr = args.values.get("max-per-pattern");
75
- const inlinePatterns = collectInlinePatterns(process.argv.slice(2));
76
- const input = {};
77
- if (root !== undefined)
78
- input.root = root;
79
- if (patternsFile !== undefined)
80
- input.patternsFile = patternsFile;
81
- if (inlinePatterns.length > 0)
82
- input.inlinePatterns = inlinePatterns;
83
- if (ext !== undefined) {
84
- input.extOverride = ext
85
- .split(",")
86
- .map((e) => e.trim())
87
- .filter((e) => e.length > 0)
88
- .map((e) => `.${e.replace(/^\.+/, "")}`);
89
- }
90
- if (exclude !== undefined) {
91
- input.excludeOverride = exclude
92
- .split(",")
93
- .map((d) => d.trim())
94
- .filter((d) => d.length > 0);
95
- }
96
- if (maxStr !== undefined) {
97
- const n = Number.parseInt(maxStr, 10);
98
- if (Number.isFinite(n))
99
- input.maxPerPattern = n;
100
- }
101
- const data = await runCodeScan(ctx.fs, ctx.env, ctx.paths, input);
102
- return { ok: true, data, exitCode: 0 };
103
- },
104
- };
105
- function collectInlinePatterns(argv) {
106
- const out = [];
107
- for (let i = 0; i < argv.length; i++) {
108
- if (argv[i] === "--pattern" && i + 1 < argv.length) {
109
- const parsed = parsePatternArg(argv[i + 1] ?? "");
110
- if (parsed)
111
- out.push(parsed);
112
- i += 1;
113
- }
114
- }
115
- return out;
116
- }
117
- function parsePatternArg(arg) {
118
- const first = arg.indexOf(":");
119
- if (first === -1)
120
- return null;
121
- const id = arg.slice(0, first);
122
- const rest = arg.slice(first + 1);
123
- const second = rest.indexOf(":");
124
- let regex;
125
- let severity;
126
- if (second === -1) {
127
- regex = rest;
128
- severity = "media";
129
- }
130
- else {
131
- regex = rest.slice(0, second);
132
- severity = rest.slice(second + 1);
133
- }
134
- if (!id || !regex)
135
- return null;
136
- return { id, regex, severity, recommendation: "" };
137
- }
138
- //# sourceMappingURL=wave4d-simple.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wave4d-simple.js","sourceRoot":"","sources":["../../../src/cli/commands/wave4d-simple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CA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AM,GAAG,CAAC,CAAC,CAAC;IACpC,CAAC;IACD,IAAI,CAAC,EAAE,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAC/B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC;AACrD,CAAC"}
@@ -1,33 +0,0 @@
1
- import type { MetaTone, StatePill } from "./list-row.js";
2
- export interface ActionModalAction {
3
- id: string;
4
- icon?: string;
5
- label: string;
6
- desc?: string;
7
- danger?: boolean;
8
- steps?: string[];
9
- hint?: {
10
- tone?: MetaTone;
11
- icon?: string;
12
- text: string;
13
- };
14
- }
15
- export interface ActionModalBusy {
16
- /** id of the action currently running */
17
- actionId: string;
18
- /** index of the running step (0-based). Steps before this are done. */
19
- stepIdx: number;
20
- }
21
- export interface ActionModalProps {
22
- glyph?: string;
23
- title: string;
24
- subtitle?: string;
25
- state?: StatePill;
26
- actions: ActionModalAction[];
27
- cursor: number;
28
- busy?: ActionModalBusy;
29
- /** Texto de contexto pegado a la derecha del footer (e.g. nombre conn, bundle version). */
30
- footerRight?: string;
31
- }
32
- export declare function ActionModal({ glyph, title, subtitle, state, actions, cursor, busy, footerRight, }: ActionModalProps): import("react/jsx-runtime").JSX.Element;
33
- //# sourceMappingURL=action-modal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"action-modal.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/action-modal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACzD;AAED,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAoCD,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,KAAK,EACL,OAAO,EACP,MAAM,EACN,IAAI,EACJ,WAAW,GACZ,EAAE,gBAAgB,2CAsHlB"}
@@ -1,41 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Box, Text } from "ink";
3
- import { colors, icons } from "../theme.js";
4
- function toneColor(tone) {
5
- switch (tone) {
6
- case "ok":
7
- return colors.success;
8
- case "warn":
9
- return colors.warning;
10
- case "accent":
11
- return colors.accent;
12
- case "err":
13
- return colors.error;
14
- default:
15
- return colors.fgSubtle;
16
- }
17
- }
18
- function StepChip({ label, state, }) {
19
- const color = state === "done" ? colors.success : state === "running" ? colors.accent : colors.fgSubtle;
20
- const glyph = state === "done" ? icons.check : state === "running" ? icons.spinner : "·";
21
- return (_jsx(Box, { marginRight: 1, children: _jsxs(Text, { color: color, children: ["[", glyph, " ", label, "]"] }) }));
22
- }
23
- export function ActionModal({ glyph, title, subtitle, state, actions, cursor, busy, footerRight, }) {
24
- return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: colors.accent, paddingX: 2, paddingY: 1, children: [_jsxs(Box, { flexDirection: "row", children: [glyph ? (_jsx(Box, { marginRight: 1, children: _jsx(Text, { color: colors.accent, bold: true, children: glyph }) })) : null, _jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [_jsx(Text, { color: colors.fgBright, bold: true, children: title }), subtitle ? _jsx(Text, { color: colors.fgSubtle, children: subtitle }) : null] }), state ? (_jsx(Text, { color: toneColor(state.tone), bold: true, children: state.label })) : null] }), _jsx(Box, { borderStyle: "single", borderColor: colors.borderFaint, borderTop: false, borderLeft: false, borderRight: false, marginY: 0 }), _jsx(Box, { flexDirection: "column", marginTop: 1, children: actions.map((a, i) => {
25
- const active = i === cursor;
26
- const isBusyThis = busy?.actionId === a.id;
27
- const accentColor = a.danger ? colors.error : colors.accent;
28
- const labelColor = a.danger ? colors.error : active ? accentColor : colors.fgBright;
29
- return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: 2, children: _jsx(Text, { color: active ? accentColor : "transparent", bold: true, children: active ? icons.play : " " }) }), _jsx(Box, { width: 2, children: _jsx(Text, { color: a.danger ? colors.error : colors.fgSubtle, children: a.icon ?? "·" }) }), _jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [_jsx(Text, { color: labelColor, bold: true, children: a.label }), a.desc ? _jsx(Text, { color: colors.fgSubtle, children: a.desc }) : null] })] }), active && a.steps && a.steps.length > 0 ? (_jsx(Box, { flexDirection: "row", marginLeft: 4, marginTop: 0, children: a.steps.map((s, idx) => {
30
- const stateName = isBusyThis
31
- ? idx < busy.stepIdx
32
- ? "done"
33
- : idx === busy.stepIdx
34
- ? "running"
35
- : "pending"
36
- : "pending";
37
- return _jsx(StepChip, { label: s, state: stateName }, s);
38
- }) })) : null, active && a.hint ? (_jsx(Box, { marginLeft: 4, children: _jsxs(Text, { color: toneColor(a.hint.tone), children: [a.hint.icon ?? icons.hook, " ", a.hint.text] }) })) : null] }, a.id));
39
- }) }), _jsxs(Box, { marginTop: 0, flexDirection: "row", children: [_jsx(Text, { color: colors.fgBright, bold: true, children: "\u2191\u2193" }), _jsx(Text, { color: colors.fgSubtle, children: " action " }), _jsx(Text, { color: colors.fgFaint, children: "\u00B7" }), _jsxs(Text, { color: colors.fgBright, bold: true, children: [" ", "\u23CE"] }), _jsx(Text, { color: colors.fgSubtle, children: " apply " }), _jsx(Text, { color: colors.fgFaint, children: "\u00B7" }), _jsxs(Text, { color: colors.fgBright, bold: true, children: [" ", "esc"] }), _jsx(Text, { color: colors.fgSubtle, children: " close" }), footerRight ? (_jsxs(_Fragment, { children: [_jsx(Box, { flexGrow: 1 }), _jsx(Text, { color: colors.fgMoreSubtle, children: footerRight })] })) : null] })] }));
40
- }
41
- //# sourceMappingURL=action-modal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"action-modal.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/action-modal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAgC5C,SAAS,SAAS,CAAC,IAAe;IAChC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,IAAI;YACP,OAAO,MAAM,CAAC,OAAO,CAAC;QACxB,KAAK,MAAM;YACT,OAAO,MAAM,CAAC,OAAO,CAAC;QACxB,KAAK,QAAQ;YACX,OAAO,MAAM,CAAC,MAAM,CAAC;QACvB,KAAK,KAAK;YACR,OAAO,MAAM,CAAC,KAAK,CAAC;QACtB;YACE,OAAO,MAAM,CAAC,QAAQ,CAAC;IAC3B,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,EAChB,KAAK,EACL,KAAK,GAIN;IACC,MAAM,KAAK,GACT,KAAK,KAAK,MAA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CAAC,CAAC,IAAI,IACJ,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -1,12 +0,0 @@
1
- export type ConfirmTone = "warning" | "danger" | "info";
2
- export interface ConfirmModalProps {
3
- tone: ConfirmTone;
4
- title: string;
5
- body: string | string[];
6
- confirmKey: string;
7
- cancelKey: string;
8
- confirmLabel: string;
9
- cancelLabel: string;
10
- }
11
- export declare function ConfirmModal({ tone, title, body, confirmKey, cancelKey, confirmLabel, cancelLabel, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
12
- //# sourceMappingURL=confirm-modal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"confirm-modal.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/confirm-modal.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAcxD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,YAAY,EACZ,WAAW,GACZ,EAAE,iBAAiB,2CAwCnB"}
@@ -1,18 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { Box, Text } from "ink";
3
- import { colors } from "../theme.js";
4
- const TONE_TO_BORDER = {
5
- warning: colors.warning,
6
- danger: colors.error,
7
- info: colors.info,
8
- };
9
- const TONE_TO_ICON = {
10
- warning: "⚠",
11
- danger: "⚠",
12
- info: "ⓘ",
13
- };
14
- export function ConfirmModal({ tone, title, body, confirmKey, cancelKey, confirmLabel, cancelLabel, }) {
15
- const lines = Array.isArray(body) ? body : [body];
16
- return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: TONE_TO_BORDER[tone], paddingX: 2, paddingY: 1, children: [_jsx(Box, { children: _jsxs(Text, { color: TONE_TO_BORDER[tone], bold: true, children: [TONE_TO_ICON[tone], " ", title] }) }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: lines.map((line) => (_jsx(Text, { color: colors.fg, children: line }, line))) }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: TONE_TO_BORDER[tone], bold: true, children: confirmKey }), _jsx(Text, { color: colors.fgMoreSubtle, children: " " }), _jsx(Text, { color: colors.fg, children: confirmLabel })] }), _jsxs(Box, { children: [_jsx(Text, { color: colors.fgSubtle, bold: true, children: cancelKey }), _jsx(Text, { color: colors.fgMoreSubtle, children: " " }), _jsx(Text, { color: colors.fgSubtle, children: cancelLabel })] })] })] }));
17
- }
18
- //# sourceMappingURL=confirm-modal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"confirm-modal.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/confirm-modal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC,MAAM,cAAc,GAAgC;IAClD,OAAO,EAAE,MAAM,CAAC,OAAO;IACvB,MAAM,EAAE,MAAM,CAAC,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC,IAAI;CAClB,CAAC;AAEF,MAAM,YAAY,GAAgC;IAChD,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,GAAG;IACX,IAAI,EAAE,GAAG;CACV,CAAC;AAYF,MAAM,UAAU,YAAY,CAAC,EAC3B,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,YAAY,EACZ,WAAW,GACO;IAClB,MAAM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AACJ,CAAC"}
@@ -1,8 +0,0 @@
1
- import type { SelfMcpConnectionView } from "../../../application/self/mcp-config.js";
2
- export interface ConnectionsGridProps {
3
- connections: SelfMcpConnectionView[];
4
- cursor: number;
5
- isActive: boolean;
6
- }
7
- export declare function ConnectionsGrid({ connections, cursor, isActive }: ConnectionsGridProps): import("react/jsx-runtime").JSX.Element;
8
- //# sourceMappingURL=connections-grid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"connections-grid.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/connections-grid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAerF,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,eAAe,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CA+DtF"}
@@ -1,55 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Text } from "ink";
3
- import { colors, icons } from "../theme.js";
4
- const STATUS_ICON = {
5
- si: icons.check,
6
- no: "–",
7
- drift: "!",
8
- };
9
- const STATUS_COLOR = {
10
- si: colors.success,
11
- no: colors.fgMoreSubtle,
12
- drift: colors.warning,
13
- };
14
- export function ConnectionsGrid({ connections, cursor, isActive }) {
15
- if (connections.length === 0) {
16
- return (_jsx(Box, { children: _jsxs(Text, { color: colors.fgMoreSubtle, italic: true, children: ["(no registered connections \u2014 press", " ", _jsx(Text, { color: colors.accent, bold: true, children: "n" }), " ", "to create one)"] }) }));
17
- }
18
- const widths = computeColumnWidths(connections);
19
- return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: colors.fgMoreSubtle, children: " " }), _jsx(ColumnHeader, { text: "name", width: widths.name }), _jsx(Spacer, {}), _jsx(ColumnHeader, { text: "DSN var", width: widths.dsn }), _jsx(Spacer, {}), _jsx(ColumnHeader, { text: "Claude", width: widths.claude }), _jsx(Spacer, {}), _jsx(ColumnHeader, { text: "Codex", width: widths.codex }), _jsx(Spacer, {}), _jsx(ColumnHeader, { text: "Warp", width: widths.warp })] }), _jsxs(Box, { children: [_jsx(Text, { color: colors.fgMoreSubtle, children: " " }), _jsx(Text, { color: colors.fgMoreSubtle, children: "─".repeat(widths.name + widths.dsn + widths.claude + widths.codex + widths.warp + 8) })] }), connections.map((c, i) => {
20
- const focused = isActive && i === cursor;
21
- const labelColor = focused ? colors.fg : colors.fgSubtle;
22
- return (_jsxs(Box, { children: [_jsx(Text, { color: focused ? colors.primary : colors.fgMoreSubtle, bold: focused, children: focused ? icons.focusBullet : " " }), _jsx(Text, { color: labelColor, ...(focused ? { bold: true } : {}), children: pad(c.nombre, widths.name) }), _jsx(Spacer, {}), _jsx(Text, { color: colors.fgSubtle, children: pad(c.dsn_var, widths.dsn) }), _jsx(Spacer, {}), _jsx(StatusCell, { status: c.instalado.claude_code, width: widths.claude }), _jsx(Spacer, {}), _jsx(StatusCell, { status: c.instalado.codex, width: widths.codex }), _jsx(Spacer, {}), _jsx(StatusCell, { status: c.instalado.warp, width: widths.warp })] }, c.nombre));
23
- })] }));
24
- }
25
- function ColumnHeader({ text, width }) {
26
- return (_jsx(Text, { color: colors.fgMoreSubtle, bold: true, children: pad(text, width) }));
27
- }
28
- function StatusCell({ status, width, }) {
29
- const icon = STATUS_ICON[status];
30
- const color = STATUS_COLOR[status];
31
- const padded = centerPad(icon, width);
32
- return (_jsx(Text, { color: color, bold: status === "si", children: padded }));
33
- }
34
- function Spacer() {
35
- return _jsx(Text, { children: " " });
36
- }
37
- function pad(text, width) {
38
- if (text.length >= width)
39
- return text;
40
- return text + " ".repeat(width - text.length);
41
- }
42
- function centerPad(text, width) {
43
- if (text.length >= width)
44
- return text;
45
- const total = width - text.length;
46
- const left = Math.floor(total / 2);
47
- const right = total - left;
48
- return " ".repeat(left) + text + " ".repeat(right);
49
- }
50
- function computeColumnWidths(connections) {
51
- const name = Math.max("name".length, ...connections.map((c) => c.nombre.length));
52
- const dsn = Math.max("DSN var".length, ...connections.map((c) => c.dsn_var.length));
53
- return { name, dsn, claude: "Claude".length, codex: "Codex".length, warp: "Warp".length };
54
- }
55
- //# sourceMappingURL=connections-grid.js.map