@shepai/cli 1.35.2 → 1.36.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 (76) hide show
  1. package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts +7 -0
  2. package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts.map +1 -1
  3. package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.d.ts +3 -1
  4. package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map +1 -1
  5. package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.js +22 -2
  6. package/dist/packages/core/src/domain/generated/output.d.ts +8 -0
  7. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  8. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
  9. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +8 -0
  10. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts +1 -0
  11. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts.map +1 -1
  12. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.js +28 -0
  13. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +1 -1
  14. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  15. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +6 -1
  16. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/lifecycle-context.d.ts +26 -0
  17. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/lifecycle-context.d.ts.map +1 -0
  18. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/lifecycle-context.js +61 -0
  19. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/implement.node.d.ts.map +1 -1
  20. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/implement.node.js +4 -0
  21. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge.node.d.ts.map +1 -1
  22. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge.node.js +4 -0
  23. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  24. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +5 -1
  25. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.d.ts +9 -0
  26. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.d.ts.map +1 -1
  27. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.js +26 -0
  28. package/dist/src/presentation/cli/commands/feat/show.command.d.ts.map +1 -1
  29. package/dist/src/presentation/cli/commands/feat/show.command.js +46 -12
  30. package/dist/tsconfig.build.tsbuildinfo +1 -1
  31. package/package.json +1 -1
  32. package/web/.next/BUILD_ID +1 -1
  33. package/web/.next/build-manifest.json +2 -2
  34. package/web/.next/cache/.previewinfo +1 -1
  35. package/web/.next/cache/.rscinfo +1 -1
  36. package/web/.next/cache/.tsbuildinfo +1 -1
  37. package/web/.next/cache/config.json +3 -3
  38. package/web/.next/fallback-build-manifest.json +2 -2
  39. package/web/.next/prerender-manifest.json +3 -3
  40. package/web/.next/required-server-files.js +1 -1
  41. package/web/.next/required-server-files.json +1 -1
  42. package/web/.next/server/app/_global-error.html +2 -2
  43. package/web/.next/server/app/_global-error.rsc +1 -1
  44. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  45. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  46. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  47. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  48. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  49. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_12059e3e.js.map +1 -1
  50. package/web/.next/server/chunks/ssr/[root-of-the-server]__f12b60be._.js +1 -1
  51. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  52. package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js.map +1 -1
  53. package/web/.next/server/pages/500.html +2 -2
  54. package/web/.next/server/server-reference-manifest.js +1 -1
  55. package/web/.next/server/server-reference-manifest.json +1 -1
  56. package/web/.next/standalone/src/presentation/web/.next/BUILD_ID +1 -1
  57. package/web/.next/standalone/src/presentation/web/.next/build-manifest.json +2 -2
  58. package/web/.next/standalone/src/presentation/web/.next/prerender-manifest.json +3 -3
  59. package/web/.next/standalone/src/presentation/web/.next/required-server-files.json +1 -1
  60. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.html +2 -2
  61. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.rsc +1 -1
  62. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  63. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  64. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  65. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  66. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  67. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__f12b60be._.js +1 -1
  68. package/web/.next/standalone/src/presentation/web/.next/server/pages/500.html +2 -2
  69. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.js +1 -1
  70. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.json +1 -1
  71. package/web/.next/standalone/src/presentation/web/server.js +1 -1
  72. package/web/.next/trace +1 -1
  73. package/web/.next/trace-build +1 -1
  74. /package/web/.next/static/{w8bsNzpMxMlLoIYnVl65t → TkrzrZBiArd9QW2xebsyW}/_buildManifest.js +0 -0
  75. /package/web/.next/static/{w8bsNzpMxMlLoIYnVl65t → TkrzrZBiArd9QW2xebsyW}/_clientMiddlewareManifest.json +0 -0
  76. /package/web/.next/static/{w8bsNzpMxMlLoIYnVl65t → TkrzrZBiArd9QW2xebsyW}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"show.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/show.command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuEpC,wBAAgB,iBAAiB,IAAI,OAAO,CA4L3C"}
1
+ {"version":3,"file":"show.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/show.command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmFpC,wBAAgB,iBAAiB,IAAI,OAAO,CAiO3C"}
@@ -61,6 +61,17 @@ function formatLifecycle(lifecycle) {
61
61
  return colors.warning(lifecycle);
62
62
  return colors.info(lifecycle);
63
63
  }
64
+ function formatDuration(ms) {
65
+ const secs = ms / 1000;
66
+ const totalSecs = Math.round(secs);
67
+ const mins = Math.floor(totalSecs / 60);
68
+ const remSecs = totalSecs % 60;
69
+ const secsStr = secs.toFixed(1);
70
+ if (mins > 0) {
71
+ return `${secsStr}s (${mins}m ${remSecs}s)`;
72
+ }
73
+ return `${secsStr}s`;
74
+ }
64
75
  function isProcessAlive(pid) {
65
76
  try {
66
77
  process.kill(pid, 0);
@@ -109,7 +120,8 @@ export function createShowCommand() {
109
120
  const isWaiting = run?.status === 'waiting_approval';
110
121
  const maxDurationMs = Math.max(...timings.map((t) => (t.durationMs != null ? Number(t.durationMs) : 0)));
111
122
  const MAX_BAR = 20;
112
- const lines = timings.map((t, idx) => {
123
+ const lines = [];
124
+ for (const [idx, t] of timings.entries()) {
113
125
  const isLast = idx === timings.length - 1;
114
126
  const isSubPhase = t.phase.includes(':');
115
127
  const label = isSubPhase
@@ -121,21 +133,43 @@ export function createShowCommand() {
121
133
  const secs = (ms / 1000).toFixed(1);
122
134
  const barLen = maxDurationMs > 0 ? Math.max(1, Math.round((ms / maxDurationMs) * MAX_BAR)) : 1;
123
135
  const bar = `${colors.success('\u2588'.repeat(barLen))}${colors.muted('\u2591'.repeat(MAX_BAR - barLen))}`;
124
- return `${label} ${bar} ${secs}s`;
136
+ lines.push(`${label} ${bar} ${secs}s`);
125
137
  }
126
138
  // Waiting for approval - only the LAST timing
127
- if (isLast && isWaiting) {
128
- return `${label} ${colors.warning('awaiting review')}`;
139
+ else if (isLast && isWaiting) {
140
+ lines.push(`${label} ${colors.warning('awaiting review')}`);
129
141
  }
130
142
  // Running phase - blue bar with elapsed time
131
- const elapsedMs = Math.max(0, Date.now() - new Date(t.startedAt).getTime());
132
- const secs = (elapsedMs / 1000).toFixed(1);
133
- const barLen = maxDurationMs > 0
134
- ? Math.min(MAX_BAR, Math.max(1, Math.round((elapsedMs / maxDurationMs) * MAX_BAR)))
135
- : 1;
136
- const bar = `${colors.info('\u2588'.repeat(barLen))}${colors.muted('\u2591'.repeat(MAX_BAR - barLen))}`;
137
- return `${label} ${bar} ${secs}s (running)`;
138
- });
143
+ else {
144
+ const elapsedMs = Math.max(0, Date.now() - new Date(t.startedAt).getTime());
145
+ const secs = (elapsedMs / 1000).toFixed(1);
146
+ const barLen = maxDurationMs > 0
147
+ ? Math.min(MAX_BAR, Math.max(1, Math.round((elapsedMs / maxDurationMs) * MAX_BAR)))
148
+ : 1;
149
+ const bar = `${colors.info('\u2588'.repeat(barLen))}${colors.muted('\u2591'.repeat(MAX_BAR - barLen))}`;
150
+ lines.push(`${label} ${bar} ${secs}s (running)`);
151
+ }
152
+ // Show approval wait time under gated phases
153
+ if (t.approvalWaitMs != null && Number(t.approvalWaitMs) > 0) {
154
+ const waitMs = Number(t.approvalWaitMs);
155
+ const waitSecs = (waitMs / 1000).toFixed(1);
156
+ const waitLabel = ' \u21b3 approval'.padEnd(16);
157
+ const waitBarLen = maxDurationMs > 0 ? Math.max(1, Math.round((waitMs / maxDurationMs) * MAX_BAR)) : 1;
158
+ const waitBar = `${colors.warning('\u2588'.repeat(waitBarLen))}${colors.muted('\u2591'.repeat(MAX_BAR - waitBarLen))}`;
159
+ lines.push(`${waitLabel} ${waitBar} ${waitSecs}s`);
160
+ }
161
+ }
162
+ // Summary totals
163
+ const totalExecMs = timings.reduce((sum, t) => sum + (t.durationMs != null ? Number(t.durationMs) : 0), 0);
164
+ const totalWaitMs = timings.reduce((sum, t) => sum + (t.approvalWaitMs != null ? Number(t.approvalWaitMs) : 0), 0);
165
+ if (totalExecMs > 0) {
166
+ lines.push('');
167
+ lines.push(`${'Total execution'.padEnd(16)} ${formatDuration(totalExecMs)}`);
168
+ if (totalWaitMs > 0) {
169
+ lines.push(`${'Total wait'.padEnd(16)} ${formatDuration(totalWaitMs)}`);
170
+ lines.push(`${'Total wall-clock'.padEnd(16)} ${formatDuration(totalExecMs + totalWaitMs)}`);
171
+ }
172
+ }
139
173
  textBlocks.push({ title: 'Phase Timing', content: lines.join('\n') });
140
174
  }
141
175
  if (run?.status === 'waiting_approval') {