@orchestrator-claude/cli 3.1.11 → 3.2.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/dist/api-client/OrchestratorAPIClient.d.ts +50 -1
- package/dist/api-client/OrchestratorAPIClient.d.ts.map +1 -1
- package/dist/api-client/OrchestratorAPIClient.js +73 -1
- package/dist/api-client/OrchestratorAPIClient.js.map +1 -1
- package/dist/api-client/types.d.ts +95 -2
- package/dist/api-client/types.d.ts.map +1 -1
- package/dist/commands/InitCommand.d.ts +22 -3
- package/dist/commands/InitCommand.d.ts.map +1 -1
- package/dist/commands/InitCommand.js +147 -13
- package/dist/commands/InitCommand.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/services/BootstrapService.d.ts +100 -0
- package/dist/services/BootstrapService.d.ts.map +1 -0
- package/dist/services/BootstrapService.js +231 -0
- package/dist/services/BootstrapService.js.map +1 -0
- package/dist/services/CleanupManager.d.ts +49 -0
- package/dist/services/CleanupManager.d.ts.map +1 -0
- package/dist/services/CleanupManager.js +87 -0
- package/dist/services/CleanupManager.js.map +1 -0
- package/dist/services/CredentialGenerator.d.ts +11 -0
- package/dist/services/CredentialGenerator.d.ts.map +1 -0
- package/dist/services/CredentialGenerator.js +25 -0
- package/dist/services/CredentialGenerator.js.map +1 -0
- package/dist/services/VerificationService.d.ts +103 -0
- package/dist/services/VerificationService.d.ts.map +1 -0
- package/dist/services/VerificationService.js +350 -0
- package/dist/services/VerificationService.js.map +1 -0
- package/dist/templates/base/claude/skills/release/SKILL.md +236 -0
- package/dist/templates/base/claude/skills/release/release.sh +460 -0
- package/dist/templates/base/docker-compose.yml.hbs +189 -8
- package/dist/templates/base/mcp.json.hbs +16 -9
- package/dist/templates/default/docker-compose.yml +190 -10
- package/package.json +1 -1
- package/templates/base/claude/skills/release/SKILL.md +236 -0
- package/templates/base/claude/skills/release/release.sh +460 -0
- package/templates/base/docker-compose.yml.hbs +189 -8
- package/templates/base/mcp.json.hbs +16 -9
- package/templates/default/docker-compose.yml +190 -10
- package/dist/templates/base/orchestrator-index.json.hbs +0 -37
- package/dist/templates/projects/api/files/index.ts.hbs +0 -30
- package/dist/templates/projects/api/files/server.ts.hbs +0 -63
- package/dist/templates/projects/api/files/tsconfig.json.hbs +0 -27
- package/dist/templates/projects/api/files/vitest.config.ts.hbs +0 -28
- package/dist/templates/projects/api/template.config.json +0 -238
- package/dist/templates/projects/api/template.config.ts +0 -149
- package/dist/templates/projects/cli/files/cli.ts.hbs +0 -50
- package/dist/templates/projects/cli/files/index.ts.hbs +0 -8
- package/dist/templates/projects/cli/files/tsconfig.json.hbs +0 -27
- package/dist/templates/projects/cli/files/vitest.config.ts.hbs +0 -28
- package/dist/templates/projects/cli/template.config.json +0 -213
- package/dist/templates/projects/cli/template.config.ts +0 -126
- package/dist/templates/projects/frontend/files/App.tsx.hbs +0 -31
- package/dist/templates/projects/frontend/files/index.html.hbs +0 -13
- package/dist/templates/projects/frontend/files/main.tsx.hbs +0 -22
- package/dist/templates/projects/frontend/files/tsconfig.json.hbs +0 -34
- package/dist/templates/projects/frontend/files/tsconfig.node.json.hbs +0 -10
- package/dist/templates/projects/frontend/files/vite.config.ts.hbs +0 -19
- package/dist/templates/projects/frontend/files/vitest.config.ts.hbs +0 -36
- package/dist/templates/projects/frontend/template.config.json +0 -241
- package/dist/templates/projects/frontend/template.config.ts +0 -153
- package/dist/templates/projects/minimal/files/claude-settings.json.hbs +0 -20
- package/dist/templates/projects/minimal/files/env.example.hbs +0 -17
- package/dist/templates/projects/minimal/files/gitignore.hbs +0 -41
- package/dist/templates/projects/minimal/files/index.ts.hbs +0 -13
- package/dist/templates/projects/minimal/files/tsconfig.json.hbs +0 -27
- package/dist/templates/projects/minimal/template.config.json +0 -185
- package/dist/templates/projects/minimal/template.config.ts +0 -88
- package/templates/base/orchestrator-index.json.hbs +0 -37
- package/templates/projects/api/files/index.ts.hbs +0 -30
- package/templates/projects/api/files/server.ts.hbs +0 -63
- package/templates/projects/api/files/tsconfig.json.hbs +0 -27
- package/templates/projects/api/files/vitest.config.ts.hbs +0 -28
- package/templates/projects/api/template.config.json +0 -238
- package/templates/projects/api/template.config.ts +0 -149
- package/templates/projects/cli/files/cli.ts.hbs +0 -50
- package/templates/projects/cli/files/index.ts.hbs +0 -8
- package/templates/projects/cli/files/tsconfig.json.hbs +0 -27
- package/templates/projects/cli/files/vitest.config.ts.hbs +0 -28
- package/templates/projects/cli/template.config.json +0 -213
- package/templates/projects/cli/template.config.ts +0 -126
- package/templates/projects/frontend/files/App.tsx.hbs +0 -31
- package/templates/projects/frontend/files/index.html.hbs +0 -13
- package/templates/projects/frontend/files/main.tsx.hbs +0 -22
- package/templates/projects/frontend/files/tsconfig.json.hbs +0 -34
- package/templates/projects/frontend/files/tsconfig.node.json.hbs +0 -10
- package/templates/projects/frontend/files/vite.config.ts.hbs +0 -19
- package/templates/projects/frontend/files/vitest.config.ts.hbs +0 -36
- package/templates/projects/frontend/template.config.json +0 -241
- package/templates/projects/frontend/template.config.ts +0 -153
- package/templates/projects/minimal/files/claude-settings.json.hbs +0 -20
- package/templates/projects/minimal/files/env.example.hbs +0 -17
- package/templates/projects/minimal/files/gitignore.hbs +0 -41
- package/templates/projects/minimal/files/index.ts.hbs +0 -13
- package/templates/projects/minimal/files/tsconfig.json.hbs +0 -27
- package/templates/projects/minimal/template.config.json +0 -185
- package/templates/projects/minimal/template.config.ts +0 -88
|
@@ -1,20 +1,200 @@
|
|
|
1
|
-
|
|
1
|
+
# docker-compose.yml — Generated by orchestrator init
|
|
2
|
+
# Stack: PostgreSQL (state) + MinIO (artifacts) + Neo4j (knowledge graph, optional) + API
|
|
3
|
+
#
|
|
4
|
+
# Ports:
|
|
5
|
+
# API: http://localhost:3001 (orchestrator REST API + MCP server)
|
|
6
|
+
# PostgreSQL: localhost:5432 (workflow state - direct access)
|
|
7
|
+
# MinIO S3: http://localhost:9000 (artifact storage - S3 API)
|
|
8
|
+
# MinIO UI: http://localhost:9001 (MinIO console)
|
|
9
|
+
# Neo4j HTTP: http://localhost:7474 (knowledge graph browser - requires --profile knowledge-graph)
|
|
10
|
+
# Neo4j Bolt: bolt://localhost:7687 (knowledge graph driver - requires --profile knowledge-graph)
|
|
11
|
+
#
|
|
12
|
+
# Usage:
|
|
13
|
+
# docker compose up -d # Start core services (API + PostgreSQL)
|
|
14
|
+
# docker compose --profile object-storage up -d # Add MinIO
|
|
15
|
+
# docker compose --profile knowledge-graph up -d # Add Neo4j
|
|
16
|
+
# docker compose --profile full up -d # Start everything
|
|
2
17
|
|
|
3
18
|
services:
|
|
4
|
-
|
|
5
|
-
image:
|
|
6
|
-
container_name:
|
|
19
|
+
postgres:
|
|
20
|
+
image: postgres:15-alpine
|
|
21
|
+
container_name: my-project-postgres
|
|
22
|
+
environment:
|
|
23
|
+
POSTGRES_DB: ${POSTGRES_DB:-orchestrator}
|
|
24
|
+
POSTGRES_USER: ${POSTGRES_USER:-orchestrator}
|
|
25
|
+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
26
|
+
volumes:
|
|
27
|
+
- my-project-postgres-data:/var/lib/postgresql/data
|
|
28
|
+
ports:
|
|
29
|
+
- "${POSTGRES_PORT:-5432}:5432" # PostgreSQL
|
|
30
|
+
healthcheck:
|
|
31
|
+
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-orchestrator} -d ${POSTGRES_DB:-orchestrator}"]
|
|
32
|
+
interval: 10s
|
|
33
|
+
timeout: 5s
|
|
34
|
+
retries: 5
|
|
35
|
+
start_period: 10s
|
|
36
|
+
restart: unless-stopped
|
|
37
|
+
networks:
|
|
38
|
+
- my-project-network
|
|
39
|
+
|
|
40
|
+
neo4j:
|
|
41
|
+
image: neo4j:5-community
|
|
42
|
+
container_name: my-project-neo4j
|
|
43
|
+
environment:
|
|
44
|
+
NEO4J_AUTH: neo4j/${NEO4J_PASSWORD:-orchestrator_neo4j}
|
|
45
|
+
NEO4J_PLUGINS: '["apoc"]'
|
|
46
|
+
NEO4J_dbms_memory_pagecache_size: 512M
|
|
47
|
+
NEO4J_dbms_memory_heap_initial__size: 512M
|
|
48
|
+
NEO4J_dbms_memory_heap_max__size: 1G
|
|
49
|
+
NEO4J_dbms_security_procedures_unrestricted: apoc.*
|
|
50
|
+
NEO4J_dbms_security_procedures_allowlist: apoc.*
|
|
51
|
+
ports:
|
|
52
|
+
- "${NEO4J_HTTP_PORT:-7474}:7474" # Neo4j browser
|
|
53
|
+
- "${NEO4J_BOLT_PORT:-7687}:7687" # Neo4j bolt
|
|
54
|
+
volumes:
|
|
55
|
+
- my-project-neo4j-data:/data
|
|
56
|
+
- my-project-neo4j-logs:/logs
|
|
57
|
+
healthcheck:
|
|
58
|
+
test: ["CMD", "wget", "-qO-", "http://localhost:7474"]
|
|
59
|
+
interval: 10s
|
|
60
|
+
timeout: 5s
|
|
61
|
+
retries: 5
|
|
62
|
+
start_period: 20s
|
|
63
|
+
restart: unless-stopped
|
|
64
|
+
networks:
|
|
65
|
+
- my-project-network
|
|
66
|
+
profiles:
|
|
67
|
+
- knowledge-graph
|
|
68
|
+
- full
|
|
69
|
+
|
|
70
|
+
minio:
|
|
71
|
+
image: minio/minio:latest
|
|
72
|
+
container_name: my-project-minio
|
|
73
|
+
command: server /data --console-address ":9001"
|
|
74
|
+
environment:
|
|
75
|
+
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
|
|
76
|
+
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
|
7
77
|
ports:
|
|
8
|
-
- "
|
|
78
|
+
- "${MINIO_S3_PORT:-9000}:9000" # MinIO S3 API
|
|
79
|
+
- "${MINIO_CONSOLE_PORT:-9001}:9001" # MinIO console
|
|
9
80
|
volumes:
|
|
10
|
-
-
|
|
81
|
+
- my-project-minio-data:/data
|
|
82
|
+
healthcheck:
|
|
83
|
+
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
84
|
+
interval: 10s
|
|
85
|
+
timeout: 5s
|
|
86
|
+
retries: 5
|
|
87
|
+
start_period: 10s
|
|
88
|
+
restart: unless-stopped
|
|
89
|
+
networks:
|
|
90
|
+
- my-project-network
|
|
91
|
+
profiles:
|
|
92
|
+
- object-storage
|
|
93
|
+
- full
|
|
94
|
+
|
|
95
|
+
minio-init:
|
|
96
|
+
image: minio/mc:latest
|
|
97
|
+
container_name: my-project-minio-init
|
|
98
|
+
depends_on:
|
|
99
|
+
minio:
|
|
100
|
+
condition: service_healthy
|
|
101
|
+
entrypoint: >
|
|
102
|
+
/bin/sh -c "
|
|
103
|
+
mc alias set myminio http://minio:9000 ${MINIO_ROOT_USER:-minioadmin} ${MINIO_ROOT_PASSWORD};
|
|
104
|
+
mc mb --ignore-existing myminio/orchestrator-static;
|
|
105
|
+
mc mb --ignore-existing myminio/orchestrator-artifacts;
|
|
106
|
+
mc anonymous set download myminio/orchestrator-static;
|
|
107
|
+
echo 'MinIO buckets initialized successfully';
|
|
108
|
+
exit 0;
|
|
109
|
+
"
|
|
110
|
+
networks:
|
|
111
|
+
- my-project-network
|
|
112
|
+
profiles:
|
|
113
|
+
- object-storage
|
|
114
|
+
- full
|
|
115
|
+
restart: "no"
|
|
116
|
+
|
|
117
|
+
db-migrate:
|
|
118
|
+
image: cmac01/orchestrator-api:latest
|
|
119
|
+
container_name: my-project-db-migrate
|
|
120
|
+
depends_on:
|
|
121
|
+
postgres:
|
|
122
|
+
condition: service_healthy
|
|
123
|
+
environment:
|
|
124
|
+
NODE_ENV: production
|
|
125
|
+
RUN_MIGRATIONS: "true"
|
|
126
|
+
PERSISTENCE_MODE: postgres
|
|
127
|
+
DATABASE_URL: postgresql://${POSTGRES_USER:-orchestrator}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-orchestrator}
|
|
128
|
+
POSTGRES_HOST: postgres
|
|
129
|
+
POSTGRES_PORT: "5432"
|
|
130
|
+
POSTGRES_DB: ${POSTGRES_DB:-orchestrator}
|
|
131
|
+
POSTGRES_USER: ${POSTGRES_USER:-orchestrator}
|
|
132
|
+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
133
|
+
networks:
|
|
134
|
+
- my-project-network
|
|
135
|
+
restart: "no"
|
|
136
|
+
|
|
137
|
+
orchestrator-api:
|
|
138
|
+
image: cmac01/orchestrator-api:latest
|
|
139
|
+
container_name: my-project-orchestrator-api
|
|
140
|
+
depends_on:
|
|
141
|
+
postgres:
|
|
142
|
+
condition: service_healthy
|
|
143
|
+
db-migrate:
|
|
144
|
+
condition: service_completed_successfully
|
|
145
|
+
env_file: .env
|
|
11
146
|
environment:
|
|
12
|
-
|
|
13
|
-
|
|
147
|
+
NODE_ENV: production
|
|
148
|
+
API_HOST: "0.0.0.0"
|
|
149
|
+
API_PORT: "3001"
|
|
150
|
+
PERSISTENCE_MODE: postgres
|
|
151
|
+
RUN_MIGRATIONS: "false"
|
|
152
|
+
# PostgreSQL connection (service name resolves within Docker network)
|
|
153
|
+
POSTGRES_HOST: postgres
|
|
154
|
+
POSTGRES_PORT: "5432"
|
|
155
|
+
DATABASE_URL: postgresql://${POSTGRES_USER:-orchestrator}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-orchestrator}
|
|
156
|
+
# MinIO object storage (requires --profile object-storage or --profile full)
|
|
157
|
+
ENABLE_OBJECT_STORAGE: "${ENABLE_OBJECT_STORAGE:-true}"
|
|
158
|
+
OBJECT_STORAGE_PROVIDER: minio
|
|
159
|
+
OBJECT_STORAGE_ENDPOINT: "http://minio:9000"
|
|
160
|
+
OBJECT_STORAGE_REGION: us-east-1
|
|
161
|
+
OBJECT_STORAGE_ACCESS_KEY: ${MINIO_ROOT_USER:-minioadmin}
|
|
162
|
+
OBJECT_STORAGE_SECRET_KEY: ${MINIO_ROOT_PASSWORD}
|
|
163
|
+
BUCKET_STATIC: orchestrator-static
|
|
164
|
+
BUCKET_ARTIFACTS: orchestrator-artifacts
|
|
165
|
+
# Neo4j knowledge graph (requires --profile knowledge-graph or --profile full)
|
|
166
|
+
NEO4J_URI: "${NEO4J_URI:-bolt://neo4j:7687}"
|
|
167
|
+
NEO4J_USER: "${NEO4J_USER:-neo4j}"
|
|
168
|
+
NEO4J_PASSWORD: "${NEO4J_PASSWORD:-orchestrator_neo4j}"
|
|
169
|
+
ENABLE_KNOWLEDGE_GRAPH: "${ENABLE_KNOWLEDGE_GRAPH:-false}"
|
|
170
|
+
# JWT Authentication
|
|
171
|
+
JWT_SECRET: ${JWT_SECRET}
|
|
172
|
+
ports:
|
|
173
|
+
- "3001:3001" # Orchestrator REST API + MCP server
|
|
174
|
+
volumes:
|
|
175
|
+
# Staging area for Artifact Relay Pattern (TD-039)
|
|
176
|
+
# Sub-agents write artifacts here; main agent relays to MinIO via MCP
|
|
177
|
+
- /tmp/orchestrator:/tmp/orchestrator
|
|
14
178
|
healthcheck:
|
|
15
179
|
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:3001/api/v1/health"]
|
|
16
180
|
interval: 30s
|
|
17
|
-
timeout:
|
|
18
|
-
start_period: 10s
|
|
181
|
+
timeout: 10s
|
|
19
182
|
retries: 3
|
|
183
|
+
start_period: 15s
|
|
20
184
|
restart: unless-stopped
|
|
185
|
+
networks:
|
|
186
|
+
- my-project-network
|
|
187
|
+
|
|
188
|
+
volumes:
|
|
189
|
+
my-project-postgres-data:
|
|
190
|
+
driver: local
|
|
191
|
+
my-project-neo4j-data:
|
|
192
|
+
driver: local
|
|
193
|
+
my-project-neo4j-logs:
|
|
194
|
+
driver: local
|
|
195
|
+
my-project-minio-data:
|
|
196
|
+
driver: local
|
|
197
|
+
|
|
198
|
+
networks:
|
|
199
|
+
my-project-network:
|
|
200
|
+
driver: bridge
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"project": {
|
|
3
|
-
"name": "{{projectName}}",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"created_at": "{{currentDate}}",
|
|
6
|
-
"orchestrator_version": "1.4.0"
|
|
7
|
-
},
|
|
8
|
-
"activeWorkflow": null,
|
|
9
|
-
"workflows": [],
|
|
10
|
-
"artifacts": [],
|
|
11
|
-
"checkpoints": [],
|
|
12
|
-
"taskToolInvocations": [],
|
|
13
|
-
"agentInvocations": [],
|
|
14
|
-
"gates": {},
|
|
15
|
-
"statistics": {
|
|
16
|
-
"totalWorkflows": 0,
|
|
17
|
-
"completedWorkflows": 0,
|
|
18
|
-
"failedWorkflows": 0,
|
|
19
|
-
"totalArtifacts": 0,
|
|
20
|
-
"totalCheckpoints": 0,
|
|
21
|
-
"totalInvocations": 0,
|
|
22
|
-
"lastActivity": "{{currentDate}}"
|
|
23
|
-
},
|
|
24
|
-
"metadata": {
|
|
25
|
-
"initialized_with": "orchestrator-cli",
|
|
26
|
-
"schema_version": "1.3"
|
|
27
|
-
},
|
|
28
|
-
"defaultHooks": {
|
|
29
|
-
"postImplement": {
|
|
30
|
-
"agent": "docs-guardian",
|
|
31
|
-
"mode": "auto",
|
|
32
|
-
"blocking": false,
|
|
33
|
-
"enabled": true,
|
|
34
|
-
"scope": "all"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Application Entry Point
|
|
3
|
-
*
|
|
4
|
-
* Bootstraps the Express server with Clean Architecture principles.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { config } from 'dotenv';
|
|
8
|
-
import { createServer } from './server.js';
|
|
9
|
-
|
|
10
|
-
// Load environment variables
|
|
11
|
-
config();
|
|
12
|
-
|
|
13
|
-
const PORT = process.env.PORT || 3000;
|
|
14
|
-
const HOST = process.env.HOST || '0.0.0.0';
|
|
15
|
-
|
|
16
|
-
async function main() {
|
|
17
|
-
try {
|
|
18
|
-
const app = createServer();
|
|
19
|
-
|
|
20
|
-
app.listen(PORT, () => {
|
|
21
|
-
console.log(`🚀 Server running at http://${HOST}:${PORT}`);
|
|
22
|
-
console.log(`📝 Environment: ${process.env.NODE_ENV || 'development'}`);
|
|
23
|
-
});
|
|
24
|
-
} catch (error) {
|
|
25
|
-
console.error('❌ Failed to start server:', error);
|
|
26
|
-
process.exit(1);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
main();
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Server Configuration
|
|
3
|
-
*
|
|
4
|
-
* Creates and configures the Express application.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import express, { type Express, type Request, type Response, type NextFunction } from 'express';
|
|
8
|
-
import cors from 'cors';
|
|
9
|
-
import helmet from 'helmet';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Creates the Express server with middleware and routes
|
|
13
|
-
*/
|
|
14
|
-
export function createServer(): Express {
|
|
15
|
-
const app = express();
|
|
16
|
-
|
|
17
|
-
// Security middleware
|
|
18
|
-
app.use(helmet());
|
|
19
|
-
app.use(cors());
|
|
20
|
-
|
|
21
|
-
// Body parsing middleware
|
|
22
|
-
app.use(express.json());
|
|
23
|
-
app.use(express.urlencoded({ extended: true }));
|
|
24
|
-
|
|
25
|
-
// Health check endpoint
|
|
26
|
-
app.get('/health', (req: Request, res: Response) => {
|
|
27
|
-
res.status(200).json({
|
|
28
|
-
status: 'ok',
|
|
29
|
-
timestamp: new Date().toISOString(),
|
|
30
|
-
service: '{{projectName}}',
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
// API routes
|
|
35
|
-
app.get('/api/v1', (req: Request, res: Response) => {
|
|
36
|
-
res.status(200).json({
|
|
37
|
-
message: 'Welcome to {{projectName}} API',
|
|
38
|
-
version: '1.0.0',
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
// 404 handler
|
|
43
|
-
app.use((req: Request, res: Response) => {
|
|
44
|
-
res.status(404).json({
|
|
45
|
-
error: 'Not Found',
|
|
46
|
-
message: `Route ${req.method} ${req.path} not found`,
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
// Error handler
|
|
51
|
-
app.use((err: Error, req: Request, res: Response, next: NextFunction) => {
|
|
52
|
-
console.error('Error:', err);
|
|
53
|
-
|
|
54
|
-
res.status(500).json({
|
|
55
|
-
error: 'Internal Server Error',
|
|
56
|
-
message: process.env.NODE_ENV === 'production'
|
|
57
|
-
? 'An unexpected error occurred'
|
|
58
|
-
: err.message,
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
return app;
|
|
63
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "ES2022",
|
|
5
|
-
"lib": ["ES2022"],
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"allowSyntheticDefaultImports": true,
|
|
9
|
-
"resolveJsonModule": true,
|
|
10
|
-
"isolatedModules": true,
|
|
11
|
-
"strict": true,
|
|
12
|
-
"noUnusedLocals": true,
|
|
13
|
-
"noUnusedParameters": true,
|
|
14
|
-
"noImplicitReturns": true,
|
|
15
|
-
"noFallthroughCasesInSwitch": true,
|
|
16
|
-
"skipLibCheck": true,
|
|
17
|
-
"forceConsistentCasingInFileNames": true,
|
|
18
|
-
"outDir": "./dist",
|
|
19
|
-
"rootDir": "./src",
|
|
20
|
-
"declaration": true,
|
|
21
|
-
"declarationMap": true,
|
|
22
|
-
"sourceMap": true,
|
|
23
|
-
"types": ["node", "vitest/globals"]
|
|
24
|
-
},
|
|
25
|
-
"include": ["src/**/*"],
|
|
26
|
-
"exclude": ["node_modules", "dist", "tests"]
|
|
27
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vitest/config';
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
test: {
|
|
5
|
-
globals: true,
|
|
6
|
-
environment: 'node',
|
|
7
|
-
coverage: {
|
|
8
|
-
provider: 'v8',
|
|
9
|
-
reporter: ['text', 'json', 'html', 'lcov'],
|
|
10
|
-
exclude: [
|
|
11
|
-
'node_modules/',
|
|
12
|
-
'dist/',
|
|
13
|
-
'tests/',
|
|
14
|
-
'**/*.d.ts',
|
|
15
|
-
'**/*.config.*',
|
|
16
|
-
'**/index.ts',
|
|
17
|
-
],
|
|
18
|
-
thresholds: {
|
|
19
|
-
lines: 80,
|
|
20
|
-
functions: 80,
|
|
21
|
-
branches: 80,
|
|
22
|
-
statements: 80,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
include: ['tests/**/*.test.ts'],
|
|
26
|
-
exclude: ['node_modules', 'dist'],
|
|
27
|
-
},
|
|
28
|
-
});
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "api",
|
|
3
|
-
"description": "REST API with Express and Clean Architecture",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"directories": [
|
|
6
|
-
".orchestrator",
|
|
7
|
-
".orchestrator/artifacts",
|
|
8
|
-
".orchestrator/artifacts/research",
|
|
9
|
-
".orchestrator/artifacts/specify",
|
|
10
|
-
".orchestrator/artifacts/plan",
|
|
11
|
-
".orchestrator/artifacts/tasks",
|
|
12
|
-
".orchestrator/artifacts/implement",
|
|
13
|
-
".orchestrator/workflows",
|
|
14
|
-
".orchestrator/memory",
|
|
15
|
-
".orchestrator/memory/knowledge-base",
|
|
16
|
-
".orchestrator/memory/knowledge-base/core",
|
|
17
|
-
".orchestrator/memory/knowledge-base/contextual",
|
|
18
|
-
".orchestrator/memory/knowledge-base/research",
|
|
19
|
-
".orchestrator/checkpoints",
|
|
20
|
-
".orchestrator/.state",
|
|
21
|
-
".claude",
|
|
22
|
-
".claude/agents",
|
|
23
|
-
".claude/skills",
|
|
24
|
-
".claude/skills/artifact-validator",
|
|
25
|
-
".claude/skills/kb-lookup",
|
|
26
|
-
".claude/skills/phase-gate-evaluator",
|
|
27
|
-
".claude/skills/workflow-status",
|
|
28
|
-
".claude/skills/docs-guardian",
|
|
29
|
-
".claude/hooks",
|
|
30
|
-
"src",
|
|
31
|
-
"src/domain",
|
|
32
|
-
"src/domain/entities",
|
|
33
|
-
"src/domain/value-objects",
|
|
34
|
-
"src/domain/repositories",
|
|
35
|
-
"src/application",
|
|
36
|
-
"src/application/use-cases",
|
|
37
|
-
"src/application/ports",
|
|
38
|
-
"src/infrastructure",
|
|
39
|
-
"src/infrastructure/persistence",
|
|
40
|
-
"src/infrastructure/adapters",
|
|
41
|
-
"src/presentation",
|
|
42
|
-
"src/presentation/routes",
|
|
43
|
-
"src/presentation/middleware",
|
|
44
|
-
"tests",
|
|
45
|
-
"tests/domain",
|
|
46
|
-
"tests/application",
|
|
47
|
-
"tests/infrastructure",
|
|
48
|
-
"tests/presentation"
|
|
49
|
-
],
|
|
50
|
-
"files": [
|
|
51
|
-
{
|
|
52
|
-
"source": "projects/api/files/index.ts.hbs",
|
|
53
|
-
"destination": "src/index.ts",
|
|
54
|
-
"template": true
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"source": "projects/api/files/tsconfig.json.hbs",
|
|
58
|
-
"destination": "tsconfig.json",
|
|
59
|
-
"template": true
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"source": "projects/api/files/vitest.config.ts.hbs",
|
|
63
|
-
"destination": "vitest.config.ts",
|
|
64
|
-
"template": true
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"source": "projects/api/files/server.ts.hbs",
|
|
68
|
-
"destination": "src/server.ts",
|
|
69
|
-
"template": true
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"source": "projects/minimal/files/gitignore.hbs",
|
|
73
|
-
"destination": ".gitignore",
|
|
74
|
-
"template": true
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"source": "projects/minimal/files/env.example.hbs",
|
|
78
|
-
"destination": ".env.example",
|
|
79
|
-
"template": true
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"source": "base/CLAUDE.md.hbs",
|
|
83
|
-
"destination": "CLAUDE.md",
|
|
84
|
-
"template": true
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"source": "base/mcp.json.hbs",
|
|
88
|
-
"destination": ".mcp.json",
|
|
89
|
-
"template": true
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"source": "base/package.json.hbs",
|
|
93
|
-
"destination": "package.json",
|
|
94
|
-
"template": true
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"source": "base/orchestrator-index.json.hbs",
|
|
98
|
-
"destination": ".orchestrator/orchestrator-index.json",
|
|
99
|
-
"template": true
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"source": "base/claude/settings.json",
|
|
103
|
-
"destination": ".claude/settings.json",
|
|
104
|
-
"template": false
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"source": "base/claude/orchestrator-config.json",
|
|
108
|
-
"destination": ".claude/orchestrator-config.json",
|
|
109
|
-
"template": false
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"source": "base/claude/agents/orchestrator.md",
|
|
113
|
-
"destination": ".claude/agents/orchestrator.md",
|
|
114
|
-
"template": false
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"source": "base/claude/agents/specifier.md",
|
|
118
|
-
"destination": ".claude/agents/specifier.md",
|
|
119
|
-
"template": false
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"source": "base/claude/agents/planner.md",
|
|
123
|
-
"destination": ".claude/agents/planner.md",
|
|
124
|
-
"template": false
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"source": "base/claude/agents/task-generator.md",
|
|
128
|
-
"destination": ".claude/agents/task-generator.md",
|
|
129
|
-
"template": false
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"source": "base/claude/agents/implementer.md",
|
|
133
|
-
"destination": ".claude/agents/implementer.md",
|
|
134
|
-
"template": false
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
"source": "base/claude/agents/reviewer.md",
|
|
138
|
-
"destination": ".claude/agents/reviewer.md",
|
|
139
|
-
"template": false
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"source": "base/claude/agents/researcher.md",
|
|
143
|
-
"destination": ".claude/agents/researcher.md",
|
|
144
|
-
"template": false
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"source": "base/claude/skills/artifact-validator/SKILL.md",
|
|
148
|
-
"destination": ".claude/skills/artifact-validator/SKILL.md",
|
|
149
|
-
"template": false
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"source": "base/claude/skills/kb-lookup/SKILL.md",
|
|
153
|
-
"destination": ".claude/skills/kb-lookup/SKILL.md",
|
|
154
|
-
"template": false
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"source": "base/claude/skills/phase-gate-evaluator/SKILL.md",
|
|
158
|
-
"destination": ".claude/skills/phase-gate-evaluator/SKILL.md",
|
|
159
|
-
"template": false
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"source": "base/claude/skills/workflow-status/SKILL.md",
|
|
163
|
-
"destination": ".claude/skills/workflow-status/SKILL.md",
|
|
164
|
-
"template": false
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"source": "base/claude/skills/docs-guardian/SKILL.md",
|
|
168
|
-
"destination": ".claude/skills/docs-guardian/SKILL.md",
|
|
169
|
-
"template": false
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
"source": "base/claude/hooks/pre-agent-invoke.sh",
|
|
173
|
-
"destination": ".claude/hooks/pre-agent-invoke.sh",
|
|
174
|
-
"template": false
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
"source": "base/claude/hooks/pre-phase-advance.sh",
|
|
178
|
-
"destination": ".claude/hooks/pre-phase-advance.sh",
|
|
179
|
-
"template": false
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
"source": "base/claude/hooks/post-artifact-generate.sh",
|
|
183
|
-
"destination": ".claude/hooks/post-artifact-generate.sh",
|
|
184
|
-
"template": false
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"source": "base/claude/hooks/post-implement-validate.sh",
|
|
188
|
-
"destination": ".claude/hooks/post-implement-validate.sh",
|
|
189
|
-
"template": false
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
"source": "base/claude/hooks/track-agent-invocation.sh",
|
|
193
|
-
"destination": ".claude/hooks/track-agent-invocation.sh",
|
|
194
|
-
"template": false
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"source": "base/claude/hooks/post-phase-checkpoint.sh",
|
|
198
|
-
"destination": ".claude/hooks/post-phase-checkpoint.sh",
|
|
199
|
-
"template": false
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
"source": "base/orchestrator/.state/.gitkeep",
|
|
203
|
-
"destination": ".orchestrator/.state/.gitkeep",
|
|
204
|
-
"template": false
|
|
205
|
-
}
|
|
206
|
-
],
|
|
207
|
-
"main": "./dist/index.js",
|
|
208
|
-
"dependencies": {
|
|
209
|
-
"express": "^4.18.0",
|
|
210
|
-
"zod": "^3.22.0",
|
|
211
|
-
"cors": "^2.8.5",
|
|
212
|
-
"helmet": "^7.1.0",
|
|
213
|
-
"dotenv": "^16.3.0"
|
|
214
|
-
},
|
|
215
|
-
"devDependencies": {
|
|
216
|
-
"@types/express": "^4.17.0",
|
|
217
|
-
"@types/cors": "^2.8.17",
|
|
218
|
-
"@types/supertest": "^6.0.0",
|
|
219
|
-
"supertest": "^6.3.0"
|
|
220
|
-
},
|
|
221
|
-
"scripts": {
|
|
222
|
-
"start": "node dist/index.js",
|
|
223
|
-
"dev": "tsx watch src/index.ts",
|
|
224
|
-
"build": "tsc",
|
|
225
|
-
"test": "vitest",
|
|
226
|
-
"test:coverage": "vitest --coverage",
|
|
227
|
-
"lint": "eslint src --ext .ts",
|
|
228
|
-
"lint:fix": "eslint src --ext .ts --fix"
|
|
229
|
-
},
|
|
230
|
-
"constitutionExtensions": ["rest-api-conventions"],
|
|
231
|
-
"knowledgeBaseSeeds": [
|
|
232
|
-
"docs-constitution",
|
|
233
|
-
"rest-conventions",
|
|
234
|
-
"error-handling",
|
|
235
|
-
"validation-patterns",
|
|
236
|
-
"auth-strategies"
|
|
237
|
-
]
|
|
238
|
-
}
|