@shepai/cli 1.23.0 → 1.23.2

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 (67) hide show
  1. package/dist/packages/core/src/infrastructure/services/web-server.service.d.ts +1 -0
  2. package/dist/packages/core/src/infrastructure/services/web-server.service.d.ts.map +1 -1
  3. package/dist/packages/core/src/infrastructure/services/web-server.service.js +4 -0
  4. package/dist/src/presentation/cli/commands/feat/show.command.d.ts.map +1 -1
  5. package/dist/src/presentation/cli/commands/feat/show.command.js +28 -14
  6. package/dist/src/presentation/cli/commands/ui.command.d.ts.map +1 -1
  7. package/dist/src/presentation/cli/commands/ui.command.js +3 -0
  8. package/dist/src/presentation/web/app/layout.d.ts +1 -0
  9. package/dist/src/presentation/web/app/layout.d.ts.map +1 -1
  10. package/dist/src/presentation/web/app/layout.js +1 -0
  11. package/dist/tsconfig.build.tsbuildinfo +1 -1
  12. package/package.json +1 -1
  13. package/web/.next/BUILD_ID +1 -1
  14. package/web/.next/build-manifest.json +2 -2
  15. package/web/.next/cache/.previewinfo +1 -1
  16. package/web/.next/cache/.rscinfo +1 -1
  17. package/web/.next/cache/.tsbuildinfo +1 -1
  18. package/web/.next/cache/config.json +3 -3
  19. package/web/.next/fallback-build-manifest.json +2 -2
  20. package/web/.next/prerender-manifest.json +3 -3
  21. package/web/.next/required-server-files.js +1 -1
  22. package/web/.next/required-server-files.json +1 -1
  23. package/web/.next/server/app/_global-error.html +2 -2
  24. package/web/.next/server/app/_global-error.rsc +1 -1
  25. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  26. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  27. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  28. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  29. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  30. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  31. package/web/.next/server/app/_not-found.html +2 -2
  32. package/web/.next/server/app/_not-found.rsc +2 -2
  33. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  34. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  35. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  36. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  37. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  38. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  39. package/web/.next/server/app/index.html +2 -2
  40. package/web/.next/server/app/index.rsc +2 -2
  41. package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  42. package/web/.next/server/app/index.segments/_full.segment.rsc +2 -2
  43. package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  44. package/web/.next/server/app/index.segments/_index.segment.rsc +2 -2
  45. package/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  46. package/web/.next/server/app/page_client-reference-manifest.js +1 -1
  47. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  48. package/web/.next/server/app/version.html +2 -2
  49. package/web/.next/server/app/version.rsc +2 -2
  50. package/web/.next/server/app/version.segments/_full.segment.rsc +2 -2
  51. package/web/.next/server/app/version.segments/_head.segment.rsc +1 -1
  52. package/web/.next/server/app/version.segments/_index.segment.rsc +2 -2
  53. package/web/.next/server/app/version.segments/_tree.segment.rsc +2 -2
  54. package/web/.next/server/app/version.segments/version/__PAGE__.segment.rsc +1 -1
  55. package/web/.next/server/app/version.segments/version.segment.rsc +1 -1
  56. package/web/.next/server/chunks/ssr/[root-of-the-server]__f12b60be._.js +1 -1
  57. package/web/.next/server/chunks/ssr/src_presentation_web_372075f9._.js.map +1 -1
  58. package/web/.next/server/pages/404.html +2 -2
  59. package/web/.next/server/pages/500.html +2 -2
  60. package/web/.next/server/server-reference-manifest.js +1 -1
  61. package/web/.next/server/server-reference-manifest.json +1 -1
  62. package/web/.next/static/chunks/{49488cbe99543598.css → 66a2ada783ebc0d4.css} +2 -1
  63. package/web/.next/trace +1 -1
  64. package/web/.next/trace-build +1 -1
  65. /package/web/.next/static/{WqMlhB4Xv4T13f0oXQ5uG → 3Y7OJekbogJm47SonWxv7}/_buildManifest.js +0 -0
  66. /package/web/.next/static/{WqMlhB4Xv4T13f0oXQ5uG → 3Y7OJekbogJm47SonWxv7}/_clientMiddlewareManifest.json +0 -0
  67. /package/web/.next/static/{WqMlhB4Xv4T13f0oXQ5uG → 3Y7OJekbogJm47SonWxv7}/_ssgManifest.js +0 -0
@@ -44,6 +44,7 @@ export declare class WebServerService implements IWebServerService {
44
44
  start(port: number, dir: string, dev?: boolean): Promise<void>;
45
45
  /**
46
46
  * Gracefully stop the server.
47
+ * Destroys active connections to avoid hanging on keep-alive sockets.
47
48
  */
48
49
  stop(): Promise<void>;
49
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"web-server.service.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/services/web-server.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yEAAyE,CAAC;AAIjH,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,OAAO,IAAI,CAAC;IAC3B,gBAAgB,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC;CAC5C;AAOD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,IAAI;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,CAsB7D;AAED,qBACa,gBAAiB,YAAW,iBAAiB;IACxD,OAAO,CAAC,GAAG,CAAwB;IACnC,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgB;gBAEzB,IAAI,GAAE,OAAO,CAAC,aAAa,CAAM;IAI7C;;;;;OAKG;IACG,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,UAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BjE;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAoB5B"}
1
+ {"version":3,"file":"web-server.service.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/services/web-server.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yEAAyE,CAAC;AAIjH,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,OAAO,IAAI,CAAC;IAC3B,gBAAgB,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC;CAC5C;AAOD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,IAAI;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,CAsB7D;AAED,qBACa,gBAAiB,YAAW,iBAAiB;IACxD,OAAO,CAAC,GAAG,CAAwB;IACnC,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgB;gBAEzB,IAAI,GAAE,OAAO,CAAC,aAAa,CAAM;IAI7C;;;;;OAKG;IACG,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,UAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BjE;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAuB5B"}
@@ -92,6 +92,7 @@ let WebServerService = class WebServerService {
92
92
  }
93
93
  /**
94
94
  * Gracefully stop the server.
95
+ * Destroys active connections to avoid hanging on keep-alive sockets.
95
96
  */
96
97
  async stop() {
97
98
  if (this.isShuttingDown)
@@ -99,6 +100,9 @@ let WebServerService = class WebServerService {
99
100
  this.isShuttingDown = true;
100
101
  try {
101
102
  if (this.server) {
103
+ // Destroy all active connections so server.close() resolves immediately
104
+ // Without this, HTTP keep-alive connections keep the server hanging
105
+ this.server.closeAllConnections();
102
106
  await new Promise((resolve) => {
103
107
  this.server.close(() => resolve());
104
108
  });
@@ -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,CAkH3C"}
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,CA4I3C"}
@@ -103,24 +103,38 @@ export function createShowCommand() {
103
103
  content: last5,
104
104
  });
105
105
  }
106
+ /**
107
+ * Helper function to render a single phase timing bar.
108
+ * Handles three states: completed (green bar), waiting (yellow text), running (blue bar).
109
+ */
110
+ const renderPhaseTimingBar = (timing, maxDurationMs, isWaiting, MAX_BAR) => {
111
+ const label = (NODE_TO_PHASE[timing.phase] ?? timing.phase).padEnd(16);
112
+ // Completed phase - green bar with duration
113
+ if (timing.completedAt && timing.durationMs != null) {
114
+ const ms = Number(timing.durationMs);
115
+ const secs = (ms / 1000).toFixed(1);
116
+ const barLen = maxDurationMs > 0 ? Math.max(1, Math.round((ms / maxDurationMs) * MAX_BAR)) : 1;
117
+ const bar = `${colors.success('█'.repeat(barLen))}${colors.muted('░'.repeat(MAX_BAR - barLen))}`;
118
+ return `${label} ${bar} ${secs}s`;
119
+ }
120
+ // Waiting for approval - yellow warning text
121
+ if (isWaiting) {
122
+ return `${label} ${colors.warning('awaiting review')}`;
123
+ }
124
+ // Running phase - blue bar with elapsed time
125
+ const elapsedMs = Math.max(0, Date.now() - timing.startedAt.getTime());
126
+ const secs = (elapsedMs / 1000).toFixed(1);
127
+ const barLen = maxDurationMs > 0
128
+ ? Math.min(MAX_BAR, Math.max(1, Math.round((elapsedMs / maxDurationMs) * MAX_BAR)))
129
+ : 1;
130
+ const bar = `${colors.info('█'.repeat(barLen))}${colors.muted('░'.repeat(MAX_BAR - barLen))}`;
131
+ return `${label} ${bar} ${secs}s (running)`;
132
+ };
106
133
  if (timings.length > 0) {
107
134
  const isWaiting = run?.status === 'waiting_approval';
108
135
  const maxDurationMs = Math.max(...timings.map((t) => (t.durationMs != null ? Number(t.durationMs) : 0)));
109
136
  const MAX_BAR = 20;
110
- const lines = timings.map((t) => {
111
- const label = (NODE_TO_PHASE[t.phase] ?? t.phase).padEnd(16);
112
- if (t.completedAt && t.durationMs != null) {
113
- const ms = Number(t.durationMs);
114
- const secs = (ms / 1000).toFixed(1);
115
- const barLen = maxDurationMs > 0 ? Math.max(1, Math.round((ms / maxDurationMs) * MAX_BAR)) : 1;
116
- const bar = `${colors.success('█'.repeat(barLen))}${colors.muted('░'.repeat(MAX_BAR - barLen))}`;
117
- return `${label} ${bar} ${secs}s`;
118
- }
119
- if (isWaiting) {
120
- return `${label} ${colors.warning('awaiting review')}`;
121
- }
122
- return `${label} ${colors.info('running...')}`;
123
- });
137
+ const lines = timings.map((t) => renderPhaseTimingBar(t, maxDurationMs, isWaiting, MAX_BAR));
124
138
  textBlocks.push({ title: 'Phase Timing', content: lines.join('\n') });
125
139
  }
126
140
  if (run?.status === 'waiting_approval') {
@@ -1 +1 @@
1
- {"version":3,"file":"ui.command.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/commands/ui.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;AAiB1D;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAqDzC"}
1
+ {"version":3,"file":"ui.command.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/commands/ui.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;AAiB1D;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CA0DzC"}
@@ -64,6 +64,9 @@ Examples:
64
64
  isShuttingDown = true;
65
65
  messages.newline();
66
66
  messages.info('Shutting down...');
67
+ // Force exit after 5s if graceful shutdown stalls
68
+ const forceExit = setTimeout(() => process.exit(0), 5000);
69
+ forceExit.unref();
67
70
  await service.stop();
68
71
  process.exit(0);
69
72
  };
@@ -1,4 +1,5 @@
1
1
  import type { Metadata } from 'next';
2
+ import '@xyflow/react/dist/base.css';
2
3
  import './globals.css';
3
4
  export declare const metadata: Metadata;
4
5
  export default function RootLayout({ children, }: Readonly<{
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/app/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,eAAe,CAAC;AAGvB,eAAO,MAAM,QAAQ,EAAE,QAItB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,GACT,EAAE,QAAQ,CAAC;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC,2CAyBD"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/app/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,eAAe,CAAC;AAGvB,eAAO,MAAM,QAAQ,EAAE,QAItB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,GACT,EAAE,QAAQ,CAAC;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC,2CAyBD"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import '@xyflow/react/dist/base.css';
2
3
  import './globals.css';
3
4
  import { AppShell } from '../components/layouts/app-shell/index.js';
4
5
  export const metadata = {