@shepai/cli 1.6.2 → 1.7.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.
- package/README.md +2 -2
- package/dist/src/application/ports/output/index.d.ts +1 -0
- package/dist/src/application/ports/output/index.d.ts.map +1 -1
- package/dist/src/application/ports/output/version-service.interface.d.ts +27 -0
- package/dist/src/application/ports/output/version-service.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/version-service.interface.js +11 -0
- package/dist/src/domain/value-objects/index.d.ts +3 -0
- package/dist/src/domain/value-objects/index.d.ts.map +1 -0
- package/dist/src/domain/value-objects/index.js +1 -0
- package/dist/src/domain/value-objects/version-info.d.ts +17 -0
- package/dist/src/domain/value-objects/version-info.d.ts.map +1 -0
- package/dist/src/domain/value-objects/version-info.js +12 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/src/infrastructure/di/container.js +5 -0
- package/dist/src/infrastructure/services/version.service.d.ts +8 -8
- package/dist/src/infrastructure/services/version.service.d.ts.map +1 -1
- package/dist/src/infrastructure/services/version.service.js +11 -6
- package/dist/src/presentation/cli/commands/ui.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/ui.command.js +5 -0
- package/dist/src/presentation/cli/commands/version.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/version.command.js +2 -2
- package/dist/src/presentation/cli/index.js +1 -2
- package/dist/src/presentation/web/app/version/page.d.ts.map +1 -1
- package/dist/src/presentation/web/app/version/page.js +6 -14
- package/dist/src/presentation/web/app/version/version-page-client.d.ts +8 -0
- package/dist/src/presentation/web/app/version/version-page-client.d.ts.map +1 -0
- package/dist/src/presentation/web/app/version/version-page-client.js +13 -0
- package/dist/src/presentation/web/lib/version.d.ts +34 -0
- package/dist/src/presentation/web/lib/version.d.ts.map +1 -0
- package/dist/src/presentation/web/lib/version.js +33 -0
- package/dist/src/presentation/web/next.config.d.ts.map +1 -1
- package/dist/src/presentation/web/next.config.js +31 -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 +5 -1
- package/web/.next/required-server-files.json +5 -1
- package/web/.next/server/app/_global-error/page.js +1 -1
- package/web/.next/server/app/_global-error/page.js.nft.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.js +1 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found.html +2 -2
- package/web/.next/server/app/_not-found.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- 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 +1 -1
- package/web/.next/server/app/index.html +2 -2
- package/web/.next/server/app/index.rsc +1 -1
- package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/page.js +1 -1
- package/web/.next/server/app/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page.js +2 -2
- package/web/.next/server/app/version/page.js.nft.json +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 +10 -13
- package/web/.next/server/app/version.segments/_full.segment.rsc +10 -13
- package/web/.next/server/app/version.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/version/__PAGE__.segment.rsc +5 -8
- package/web/.next/server/app/version.segments/version.segment.rsc +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__5aff3b12._.js → [root-of-the-server]__2328b471._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__5aff3b12._.js.map → [root-of-the-server]__2328b471._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__d81095d0._.js → [root-of-the-server]__3acee9dd._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3acee9dd._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ccea5183._.js +3 -0
- package/web/.next/server/chunks/ssr/_ccea5183._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_version_version-page-client_tsx_bd5ab0cf._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_version_version-page-client_tsx_bd5ab0cf._.js.map +1 -0
- 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/{52a5aeb86329ee2e.js → c004e386ce1b8d26.js} +1 -1
- package/web/.next/trace +1 -1
- package/web/.next/trace-build +1 -1
- package/web/next.config.ts +33 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d81095d0._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e519e92f._.js +0 -3
- package/web/.next/server/chunks/ssr/_e519e92f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_version_page_tsx_1bab7370._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_app_version_page_tsx_1bab7370._.js.map +0 -1
- /package/web/.next/static/{BL8w8d3ompY4bQV3lXruZ → nTfsHq1Siya6NdOLzXUhF}/_buildManifest.js +0 -0
- /package/web/.next/static/{BL8w8d3ompY4bQV3lXruZ → nTfsHq1Siya6NdOLzXUhF}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{BL8w8d3ompY4bQV3lXruZ → nTfsHq1Siya6NdOLzXUhF}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ This launches a TUI wizard to:
|
|
|
57
57
|
|
|
58
58
|
1. Configure Claude Code authentication (setup token or use existing session)
|
|
59
59
|
2. Start repository analysis
|
|
60
|
-
3. Open the web UI at `http://localhost:
|
|
60
|
+
3. Open the web UI at `http://localhost:4050/`
|
|
61
61
|
|
|
62
62
|
## How It Works
|
|
63
63
|
|
|
@@ -150,7 +150,7 @@ Uses **Repository Pattern** with SQLite:
|
|
|
150
150
|
| TUI Framework | [@inquirer/prompts](https://github.com/SBoudrias/Inquirer.js) |
|
|
151
151
|
| Web UI | Next.js 16 + React 19 + shadcn/ui ([@shepai/web](./src/presentation/web/)) |
|
|
152
152
|
| Design System | Storybook |
|
|
153
|
-
| Build Tool | Vite
|
|
153
|
+
| Build Tool | tsc + tsc-alias (prod), Vite (dev) |
|
|
154
154
|
| Database | SQLite |
|
|
155
155
|
| Agent System | [LangGraph](https://www.langchain.com/langgraph) (`@langchain/langgraph`) |
|
|
156
156
|
| Vector DB | [LanceDB](https://lancedb.com/) (file-based) |
|
|
@@ -6,4 +6,5 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export type { ISettingsRepository } from './settings.repository.interface.js';
|
|
8
8
|
export type { IAgentValidator, AgentValidationResult } from './agent-validator.interface.js';
|
|
9
|
+
export type { IVersionService } from './version-service.interface.js';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/application/ports/output/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/application/ports/output/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC7F,YAAY,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Service Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for reading package version information.
|
|
5
|
+
* Infrastructure layer provides concrete implementation.
|
|
6
|
+
*
|
|
7
|
+
* Following Clean Architecture:
|
|
8
|
+
* - Domain and Application layers depend on this interface
|
|
9
|
+
* - Infrastructure layer provides concrete implementations
|
|
10
|
+
*/
|
|
11
|
+
import type { VersionInfo } from '../../../domain/value-objects/version-info.js';
|
|
12
|
+
/**
|
|
13
|
+
* Port interface for reading version information.
|
|
14
|
+
*
|
|
15
|
+
* Implementations must:
|
|
16
|
+
* - Read version info from the package manifest (package.json)
|
|
17
|
+
* - Return sensible defaults when the manifest cannot be read
|
|
18
|
+
*/
|
|
19
|
+
export interface IVersionService {
|
|
20
|
+
/**
|
|
21
|
+
* Get version information for the package.
|
|
22
|
+
*
|
|
23
|
+
* @returns Version info with name, version, and description
|
|
24
|
+
*/
|
|
25
|
+
getVersion(): VersionInfo;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=version-service.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-service.interface.d.ts","sourceRoot":"","sources":["../../../../../src/application/ports/output/version-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAEjF;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,UAAU,IAAI,WAAW,CAAC;CAC3B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Service Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for reading package version information.
|
|
5
|
+
* Infrastructure layer provides concrete implementation.
|
|
6
|
+
*
|
|
7
|
+
* Following Clean Architecture:
|
|
8
|
+
* - Domain and Application layers depend on this interface
|
|
9
|
+
* - Infrastructure layer provides concrete implementations
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/domain/value-objects/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DEFAULT_VERSION_INFO } from './version-info.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Information Value Object
|
|
3
|
+
*
|
|
4
|
+
* Represents package version metadata shared across presentation layers.
|
|
5
|
+
* Used by both CLI and Web UI to display consistent version information.
|
|
6
|
+
*/
|
|
7
|
+
export interface VersionInfo {
|
|
8
|
+
/** Package version (e.g., "1.6.1") */
|
|
9
|
+
version: string;
|
|
10
|
+
/** Package name (e.g., "@shepai/cli") */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Package description */
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
15
|
+
/** Default version info when package.json cannot be read */
|
|
16
|
+
export declare const DEFAULT_VERSION_INFO: VersionInfo;
|
|
17
|
+
//# sourceMappingURL=version-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-info.d.ts","sourceRoot":"","sources":["../../../../src/domain/value-objects/version-info.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,WAAW;IAC1B,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,EAAE,WAIlC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Information Value Object
|
|
3
|
+
*
|
|
4
|
+
* Represents package version metadata shared across presentation layers.
|
|
5
|
+
* Used by both CLI and Web UI to display consistent version information.
|
|
6
|
+
*/
|
|
7
|
+
/** Default version info when package.json cannot be read */
|
|
8
|
+
export const DEFAULT_VERSION_INFO = {
|
|
9
|
+
version: 'unknown',
|
|
10
|
+
name: '@shepai/cli',
|
|
11
|
+
description: 'Autonomous AI Native SDLC Platform',
|
|
12
|
+
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -3,5 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Automate the development cycle from idea to deploy.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type { VersionInfo } from './domain/value-objects/version-info.js';
|
|
7
|
+
export { DEFAULT_VERSION_INFO } from './domain/value-objects/version-info.js';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/di/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/di/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AA4BrC;;;;;GAKG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,SAAS,CAAC,CAqCrE;AAED;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -16,6 +16,7 @@ import { SQLiteSettingsRepository } from '../repositories/sqlite-settings.reposi
|
|
|
16
16
|
import { AgentValidatorService } from '../services/agents/agent-validator.service.js';
|
|
17
17
|
import { promisify } from 'node:util';
|
|
18
18
|
import { execFile } from 'node:child_process';
|
|
19
|
+
import { VersionService } from '../services/version.service.js';
|
|
19
20
|
// Use cases
|
|
20
21
|
import { InitializeSettingsUseCase } from '../../application/use-cases/settings/initialize-settings.use-case.js';
|
|
21
22
|
import { LoadSettingsUseCase } from '../../application/use-cases/settings/load-settings.use-case.js';
|
|
@@ -50,6 +51,10 @@ export async function initializeContainer() {
|
|
|
50
51
|
container.register('IAgentValidator', {
|
|
51
52
|
useFactory: () => new AgentValidatorService(execFileAsync),
|
|
52
53
|
});
|
|
54
|
+
// Register services
|
|
55
|
+
container.register('IVersionService', {
|
|
56
|
+
useFactory: () => new VersionService(),
|
|
57
|
+
});
|
|
53
58
|
// Register use cases (singletons for performance)
|
|
54
59
|
container.registerSingleton(InitializeSettingsUseCase);
|
|
55
60
|
container.registerSingleton(LoadSettingsUseCase);
|
|
@@ -4,14 +4,8 @@
|
|
|
4
4
|
* Infrastructure service that reads version information from package.json.
|
|
5
5
|
* Follows Clean Architecture: Infrastructure layer implements data access.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
version: string;
|
|
10
|
-
/** Package name (e.g., "@shepai/cli") */
|
|
11
|
-
name: string;
|
|
12
|
-
/** Package description */
|
|
13
|
-
description: string;
|
|
14
|
-
}
|
|
7
|
+
import type { VersionInfo } from '../../domain/value-objects/version-info.js';
|
|
8
|
+
export type { VersionInfo } from '../../domain/value-objects/version-info.js';
|
|
15
9
|
/**
|
|
16
10
|
* Service for reading version information from package.json
|
|
17
11
|
*/
|
|
@@ -24,4 +18,10 @@ export declare class VersionService {
|
|
|
24
18
|
*/
|
|
25
19
|
getVersion(): VersionInfo;
|
|
26
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Set version info as NEXT_PUBLIC environment variables.
|
|
23
|
+
* Must be called BEFORE starting the Next.js web server
|
|
24
|
+
* so the values are available to the web UI.
|
|
25
|
+
*/
|
|
26
|
+
export declare function setVersionEnvVars(info: VersionInfo): void;
|
|
27
27
|
//# sourceMappingURL=version.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.service.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/services/version.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"version.service.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/services/version.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAG9E,YAAY,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAuB9E;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;;IAM1C,OAAO,CAAC,eAAe;IAqCvB;;OAEG;IACH,UAAU,IAAI,WAAW;CAG1B;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAIzD"}
|
|
@@ -7,12 +7,7 @@
|
|
|
7
7
|
import { existsSync, readFileSync } from 'node:fs';
|
|
8
8
|
import { dirname, join } from 'node:path';
|
|
9
9
|
import { fileURLToPath } from 'node:url';
|
|
10
|
-
|
|
11
|
-
const DEFAULT_VERSION_INFO = {
|
|
12
|
-
version: 'unknown',
|
|
13
|
-
name: '@shepai/cli',
|
|
14
|
-
description: 'Autonomous AI Native SDLC Platform',
|
|
15
|
-
};
|
|
10
|
+
import { DEFAULT_VERSION_INFO } from '../../domain/value-objects/version-info.js';
|
|
16
11
|
/**
|
|
17
12
|
* Find package.json by traversing up from a starting directory.
|
|
18
13
|
* Works in both development (src/) and production (dist/) environments.
|
|
@@ -78,3 +73,13 @@ export class VersionService {
|
|
|
78
73
|
return this.versionInfo;
|
|
79
74
|
}
|
|
80
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Set version info as NEXT_PUBLIC environment variables.
|
|
78
|
+
* Must be called BEFORE starting the Next.js web server
|
|
79
|
+
* so the values are available to the web UI.
|
|
80
|
+
*/
|
|
81
|
+
export function setVersionEnvVars(info) {
|
|
82
|
+
process.env.NEXT_PUBLIC_SHEP_VERSION = info.version;
|
|
83
|
+
process.env.NEXT_PUBLIC_SHEP_PACKAGE_NAME = info.name;
|
|
84
|
+
process.env.NEXT_PUBLIC_SHEP_DESCRIPTION = info.description;
|
|
85
|
+
}
|
|
@@ -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;
|
|
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;AAmB1D;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAqDzC"}
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { Command, InvalidArgumentError } from 'commander';
|
|
18
18
|
import { findAvailablePort, DEFAULT_PORT } from '../../../infrastructure/services/port.service.js';
|
|
19
|
+
import { container } from '../../../infrastructure/di/container.js';
|
|
20
|
+
import { setVersionEnvVars } from '../../../infrastructure/services/version.service.js';
|
|
19
21
|
import { WebServerService, resolveWebDir, } from '../../../infrastructure/services/web-server.service.js';
|
|
20
22
|
import { colors, fmt, messages } from '../ui/index.js';
|
|
21
23
|
function parsePort(value) {
|
|
@@ -41,6 +43,9 @@ Examples:
|
|
|
41
43
|
const startPort = options.port ?? DEFAULT_PORT;
|
|
42
44
|
const port = await findAvailablePort(startPort);
|
|
43
45
|
const { dir, dev } = resolveWebDir();
|
|
46
|
+
// Set version env vars so Next.js web UI can read them
|
|
47
|
+
const versionService = container.resolve('IVersionService');
|
|
48
|
+
setVersionEnvVars(versionService.getVersion());
|
|
44
49
|
messages.newline();
|
|
45
50
|
console.log(fmt.heading('Shep Web UI'));
|
|
46
51
|
console.log(colors.muted(`Starting web server${dev ? ' (dev mode)' : ''}...`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.command.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/commands/version.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"version.command.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/commands/version.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAa9C"}
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
* Platform: linux x64
|
|
16
16
|
*/
|
|
17
17
|
import { Command } from 'commander';
|
|
18
|
-
import {
|
|
18
|
+
import { container } from '../../../infrastructure/di/container.js';
|
|
19
19
|
import { colors, fmt, messages } from '../ui/index.js';
|
|
20
20
|
/**
|
|
21
21
|
* Create the version command
|
|
22
22
|
*/
|
|
23
23
|
export function createVersionCommand() {
|
|
24
24
|
return new Command('version').description('Display version information').action(() => {
|
|
25
|
-
const versionService =
|
|
25
|
+
const versionService = container.resolve('IVersionService');
|
|
26
26
|
const info = versionService.getVersion();
|
|
27
27
|
messages.newline();
|
|
28
28
|
console.log(`${fmt.heading(info.name)} ${fmt.version(info.version)}`);
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
// IMPORTANT: reflect-metadata must be imported first for tsyringe DI
|
|
21
21
|
import 'reflect-metadata';
|
|
22
22
|
import { Command } from 'commander';
|
|
23
|
-
import { VersionService } from '../../infrastructure/services/version.service.js';
|
|
24
23
|
import { createVersionCommand } from './commands/version.command.js';
|
|
25
24
|
import { createSettingsCommand } from './commands/settings/index.js';
|
|
26
25
|
import { createUiCommand } from './commands/ui.command.js';
|
|
@@ -56,7 +55,7 @@ async function bootstrap() {
|
|
|
56
55
|
throw error;
|
|
57
56
|
}
|
|
58
57
|
// Step 3: Set up Commander CLI
|
|
59
|
-
const versionService =
|
|
58
|
+
const versionService = container.resolve('IVersionService');
|
|
60
59
|
const { version, description } = versionService.getVersion();
|
|
61
60
|
const program = new Command()
|
|
62
61
|
.name('shep')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/version/page.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/version/page.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,WAAW,4CAKlC"}
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../../components/ui/card';
|
|
5
|
-
import { Badge } from '../../components/ui/badge';
|
|
6
|
-
import { Button } from '../../components/ui/button';
|
|
7
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from '../../components/ui/tabs';
|
|
8
|
-
const VERSION = '1.2.0';
|
|
9
|
-
const PACKAGE_NAME = '@shepai/cli';
|
|
10
|
-
const DESCRIPTION = 'Autonomous AI Native SDLC Platform';
|
|
11
|
-
function InfoRow({ label, value, badge, badgeVariant = 'secondary' }) {
|
|
12
|
-
return (_jsxs("div", { className: "flex items-center justify-between py-2", children: [_jsx("span", { className: "text-muted-foreground text-sm", children: label }), badge ? (_jsx(Badge, { variant: badgeVariant, children: value })) : (_jsx("span", { className: "font-mono text-sm", children: value }))] }));
|
|
13
|
-
}
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getVersionInfo, getSystemInfo } from '../../lib/version';
|
|
3
|
+
import VersionPageClient from './version-page-client';
|
|
14
4
|
export default function VersionPage() {
|
|
15
|
-
|
|
5
|
+
const versionInfo = getVersionInfo();
|
|
6
|
+
const systemInfo = getSystemInfo();
|
|
7
|
+
return _jsx(VersionPageClient, { versionInfo: versionInfo, systemInfo: systemInfo });
|
|
16
8
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VersionInfo, SystemInfo } from '../../lib/version';
|
|
2
|
+
interface VersionPageClientProps {
|
|
3
|
+
versionInfo: VersionInfo;
|
|
4
|
+
systemInfo: SystemInfo;
|
|
5
|
+
}
|
|
6
|
+
export default function VersionPageClient({ versionInfo, systemInfo }: VersionPageClientProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=version-page-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-page-client.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/version/version-page-client.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAsB7D,UAAU,sBAAsB;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,sBAAsB,2CAsG5F"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../../components/ui/card';
|
|
5
|
+
import { Badge } from '../../components/ui/badge';
|
|
6
|
+
import { Button } from '../../components/ui/button';
|
|
7
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '../../components/ui/tabs';
|
|
8
|
+
function InfoRow({ label, value, badge, badgeVariant = 'secondary' }) {
|
|
9
|
+
return (_jsxs("div", { className: "flex items-center justify-between py-2", children: [_jsx("span", { className: "text-muted-foreground text-sm", children: label }), badge ? (_jsx(Badge, { variant: badgeVariant, children: value })) : (_jsx("span", { className: "font-mono text-sm", children: value }))] }));
|
|
10
|
+
}
|
|
11
|
+
export default function VersionPageClient({ versionInfo, systemInfo }) {
|
|
12
|
+
return (_jsx("main", { className: "flex min-h-screen flex-col items-center justify-center p-4", children: _jsxs("div", { className: "w-full max-w-2xl space-y-6", children: [_jsxs("div", { className: "text-center", children: [_jsx("h1", { className: "text-3xl font-bold tracking-tight", children: versionInfo.name }), _jsx("p", { className: "text-muted-foreground mt-2", children: versionInfo.description }), _jsx("div", { className: "mt-4", children: _jsxs(Badge, { variant: "default", "data-testid": "version-badge", children: ["v", versionInfo.version] }) })] }), _jsxs(Tabs, { defaultValue: "overview", className: "w-full", children: [_jsxs(TabsList, { className: "grid w-full grid-cols-3", children: [_jsx(TabsTrigger, { value: "overview", children: "Overview" }), _jsx(TabsTrigger, { value: "system", children: "System" }), _jsx(TabsTrigger, { value: "features", children: "Features" })] }), _jsx(TabsContent, { value: "overview", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Package Information" }), _jsx(CardDescription, { children: "Details about the Shep AI CLI package" })] }), _jsxs(CardContent, { className: "space-y-1", children: [_jsx(InfoRow, { label: "Package", value: versionInfo.name }), _jsx(InfoRow, { label: "Version", value: `v${versionInfo.version}`, badge: true, badgeVariant: "default" }), _jsx(InfoRow, { label: "License", value: "MIT", badge: true, badgeVariant: "outline" }), _jsx(InfoRow, { label: "Author", value: "Shep AI" })] })] }) }), _jsx(TabsContent, { value: "system", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "System Information" }), _jsx(CardDescription, { children: "Runtime environment details" })] }), _jsxs(CardContent, { className: "space-y-1", children: [_jsx(InfoRow, { label: "Node.js", value: systemInfo.nodeVersion, badge: true, badgeVariant: "secondary" }), _jsx(InfoRow, { label: "Platform", value: `${systemInfo.platform} ${systemInfo.arch}` })] })] }) }), _jsx(TabsContent, { value: "features", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Key Features" }), _jsx(CardDescription, { children: "What Shep AI can do for you" })] }), _jsx(CardContent, { children: _jsxs("ul", { className: "space-y-2 text-sm", children: [_jsxs("li", { className: "flex items-center gap-2", children: [_jsx(Badge, { variant: "outline", children: "AI" }), _jsx("span", { children: "Autonomous code generation" })] }), _jsxs("li", { className: "flex items-center gap-2", children: [_jsx(Badge, { variant: "outline", children: "SDLC" }), _jsx("span", { children: "Full development lifecycle automation" })] }), _jsxs("li", { className: "flex items-center gap-2", children: [_jsx(Badge, { variant: "outline", children: "CLI" }), _jsx("span", { children: "Powerful command-line interface" })] }), _jsxs("li", { className: "flex items-center gap-2", children: [_jsx(Badge, { variant: "outline", children: "Web" }), _jsx("span", { children: "Modern web UI dashboard" })] })] }) })] }) })] }), _jsxs("div", { className: "flex justify-center gap-4", children: [_jsx(Button, { asChild: true, variant: "outline", children: _jsx(Link, { href: "/", children: "Back to Home" }) }), _jsx(Button, { asChild: true, children: _jsx("a", { href: "https://github.com/shep-ai/cli", target: "_blank", rel: "noopener noreferrer", children: "View on GitHub" }) })] })] }) }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Information Helpers
|
|
3
|
+
*
|
|
4
|
+
* Provides version and system info for the Web UI.
|
|
5
|
+
* Reads from NEXT_PUBLIC_SHEP_* environment variables which are set by:
|
|
6
|
+
* 1. The CLI (`shep ui`) via setVersionEnvVars() before starting Next.js
|
|
7
|
+
* 2. next.config.ts dev fallback for standalone `pnpm dev:web` mode
|
|
8
|
+
*
|
|
9
|
+
* The VersionInfo shape mirrors src/domain/value-objects/version-info.ts
|
|
10
|
+
* from the CLI domain layer.
|
|
11
|
+
*/
|
|
12
|
+
/** Version information for the package (mirrors domain VersionInfo) */
|
|
13
|
+
export interface VersionInfo {
|
|
14
|
+
version: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
}
|
|
18
|
+
/** System runtime information */
|
|
19
|
+
export interface SystemInfo {
|
|
20
|
+
nodeVersion: string;
|
|
21
|
+
platform: string;
|
|
22
|
+
arch: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get version info from environment variables.
|
|
26
|
+
* Falls back to defaults if not set.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getVersionInfo(): VersionInfo;
|
|
29
|
+
/**
|
|
30
|
+
* Get system runtime information.
|
|
31
|
+
* Must be called from a server context (Server Component or API route).
|
|
32
|
+
*/
|
|
33
|
+
export declare function getSystemInfo(): SystemInfo;
|
|
34
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/lib/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,uEAAuE;AACvE,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,iCAAiC;AACjC,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAM5C;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAM1C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Information Helpers
|
|
3
|
+
*
|
|
4
|
+
* Provides version and system info for the Web UI.
|
|
5
|
+
* Reads from NEXT_PUBLIC_SHEP_* environment variables which are set by:
|
|
6
|
+
* 1. The CLI (`shep ui`) via setVersionEnvVars() before starting Next.js
|
|
7
|
+
* 2. next.config.ts dev fallback for standalone `pnpm dev:web` mode
|
|
8
|
+
*
|
|
9
|
+
* The VersionInfo shape mirrors src/domain/value-objects/version-info.ts
|
|
10
|
+
* from the CLI domain layer.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Get version info from environment variables.
|
|
14
|
+
* Falls back to defaults if not set.
|
|
15
|
+
*/
|
|
16
|
+
export function getVersionInfo() {
|
|
17
|
+
return {
|
|
18
|
+
version: process.env.NEXT_PUBLIC_SHEP_VERSION ?? 'unknown',
|
|
19
|
+
name: process.env.NEXT_PUBLIC_SHEP_PACKAGE_NAME ?? '@shepai/cli',
|
|
20
|
+
description: process.env.NEXT_PUBLIC_SHEP_DESCRIPTION ?? 'Autonomous AI Native SDLC Platform',
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get system runtime information.
|
|
25
|
+
* Must be called from a server context (Server Component or API route).
|
|
26
|
+
*/
|
|
27
|
+
export function getSystemInfo() {
|
|
28
|
+
return {
|
|
29
|
+
nodeVersion: process.version,
|
|
30
|
+
platform: process.platform,
|
|
31
|
+
arch: process.arch,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.config.d.ts","sourceRoot":"","sources":["../../../../src/presentation/web/next.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"next.config.d.ts","sourceRoot":"","sources":["../../../../src/presentation/web/next.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAgCvC,QAAA,MAAM,UAAU,EAAE,UAYjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* Provide fallback env vars for standalone dev mode (pnpm dev:web).
|
|
5
|
+
* When run via `shep ui`, these are already set by the CLI's setVersionEnvVars()
|
|
6
|
+
* before Next.js starts, so this returns an empty object.
|
|
7
|
+
*/
|
|
8
|
+
function loadDevFallbacks() {
|
|
9
|
+
if (process.env.NEXT_PUBLIC_SHEP_VERSION) {
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
try {
|
|
13
|
+
// Web package is at src/presentation/web/, root package.json is 3 levels up
|
|
14
|
+
const rootPkgPath = resolve(import.meta.dirname, '../../../package.json');
|
|
15
|
+
const pkg = JSON.parse(readFileSync(rootPkgPath, 'utf-8'));
|
|
16
|
+
return {
|
|
17
|
+
NEXT_PUBLIC_SHEP_VERSION: pkg.version ?? 'unknown',
|
|
18
|
+
NEXT_PUBLIC_SHEP_PACKAGE_NAME: pkg.name ?? '@shepai/cli',
|
|
19
|
+
NEXT_PUBLIC_SHEP_DESCRIPTION: pkg.description ?? 'Autonomous AI Native SDLC Platform',
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return {
|
|
24
|
+
NEXT_PUBLIC_SHEP_VERSION: 'unknown',
|
|
25
|
+
NEXT_PUBLIC_SHEP_PACKAGE_NAME: '@shepai/cli',
|
|
26
|
+
NEXT_PUBLIC_SHEP_DESCRIPTION: 'Autonomous AI Native SDLC Platform',
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
1
30
|
const nextConfig = {
|
|
2
31
|
// Enable Turbopack for faster development builds
|
|
3
32
|
turbopack: {},
|
|
@@ -5,5 +34,7 @@ const nextConfig = {
|
|
|
5
34
|
typedRoutes: true,
|
|
6
35
|
// Configure the output directory
|
|
7
36
|
distDir: '.next',
|
|
37
|
+
// Inject version info from package.json for the web UI
|
|
38
|
+
env: loadDevFallbacks(),
|
|
8
39
|
};
|
|
9
40
|
export default nextConfig;
|