@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.
- package/dist/packages/core/src/infrastructure/services/web-server.service.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/services/web-server.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/web-server.service.js +4 -0
- package/dist/src/presentation/cli/commands/feat/show.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/show.command.js +28 -14
- package/dist/src/presentation/cli/commands/ui.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/ui.command.js +3 -0
- package/dist/src/presentation/web/app/layout.d.ts +1 -0
- package/dist/src/presentation/web/app/layout.d.ts.map +1 -1
- package/dist/src/presentation/web/app/layout.js +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/cache/.previewinfo +1 -1
- package/web/.next/cache/.rscinfo +1 -1
- package/web/.next/cache/.tsbuildinfo +1 -1
- package/web/.next/cache/config.json +3 -3
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_not-found.html +2 -2
- package/web/.next/server/app/_not-found.rsc +2 -2
- package/web/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/web/.next/server/app/index.html +2 -2
- package/web/.next/server/app/index.rsc +2 -2
- package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version.html +2 -2
- package/web/.next/server/app/version.rsc +2 -2
- package/web/.next/server/app/version.segments/_full.segment.rsc +2 -2
- package/web/.next/server/app/version.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_index.segment.rsc +2 -2
- package/web/.next/server/app/version.segments/_tree.segment.rsc +2 -2
- package/web/.next/server/app/version.segments/version/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/version.segment.rsc +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f12b60be._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_372075f9._.js.map +1 -1
- package/web/.next/server/pages/404.html +2 -2
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/static/chunks/{49488cbe99543598.css → 66a2ada783ebc0d4.css} +2 -1
- package/web/.next/trace +1 -1
- package/web/.next/trace-build +1 -1
- /package/web/.next/static/{WqMlhB4Xv4T13f0oXQ5uG → 3Y7OJekbogJm47SonWxv7}/_buildManifest.js +0 -0
- /package/web/.next/static/{WqMlhB4Xv4T13f0oXQ5uG → 3Y7OJekbogJm47SonWxv7}/_clientMiddlewareManifest.json +0 -0
- /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
|
|
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,
|
|
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,
|
|
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 +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"}
|