@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
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# ============================================================================
|
|
5
|
+
# Release Script - Orchestrator v1.5.x
|
|
6
|
+
# ============================================================================
|
|
7
|
+
# Automates version bump and tag creation. CI/CD handles npm/Docker publish.
|
|
8
|
+
#
|
|
9
|
+
# Usage:
|
|
10
|
+
# ./scripts/release.sh patch # 1.5.0 -> 1.5.1
|
|
11
|
+
# ./scripts/release.sh minor # 1.5.0 -> 1.6.0
|
|
12
|
+
# ./scripts/release.sh major # 1.5.0 -> 2.0.0
|
|
13
|
+
# ./scripts/release.sh 1.5.1 # Explicit version
|
|
14
|
+
#
|
|
15
|
+
# Files updated:
|
|
16
|
+
# - package.json (root)
|
|
17
|
+
# - packages/cli/package.json
|
|
18
|
+
# - packages/mcp-server/package.json
|
|
19
|
+
# - packages/cli/src/index.ts (CLI_VERSION constant)
|
|
20
|
+
# - src/infrastructure/templates/base/package.json.hbs (template versions)
|
|
21
|
+
#
|
|
22
|
+
# ============================================================================
|
|
23
|
+
|
|
24
|
+
# Colors for output
|
|
25
|
+
RED='\033[0;31m'
|
|
26
|
+
GREEN='\033[0;32m'
|
|
27
|
+
YELLOW='\033[1;33m'
|
|
28
|
+
BLUE='\033[0;34m'
|
|
29
|
+
NC='\033[0m' # No Color
|
|
30
|
+
|
|
31
|
+
# Global variables
|
|
32
|
+
FORCE=false
|
|
33
|
+
DRY_RUN=false
|
|
34
|
+
|
|
35
|
+
# Parse arguments
|
|
36
|
+
VERSION_ARG=""
|
|
37
|
+
while [[ $# -gt 0 ]]; do
|
|
38
|
+
case $1 in
|
|
39
|
+
-y|--yes|--force)
|
|
40
|
+
FORCE=true
|
|
41
|
+
shift
|
|
42
|
+
;;
|
|
43
|
+
--dry-run)
|
|
44
|
+
DRY_RUN=true
|
|
45
|
+
shift
|
|
46
|
+
;;
|
|
47
|
+
-h|--help)
|
|
48
|
+
echo "Usage: $0 [options] <version>"
|
|
49
|
+
echo ""
|
|
50
|
+
echo "Version can be:"
|
|
51
|
+
echo " patch Increment patch version (1.4.1 -> 1.4.2)"
|
|
52
|
+
echo " minor Increment minor version (1.4.1 -> 1.5.0)"
|
|
53
|
+
echo " major Increment major version (1.4.1 -> 2.0.0)"
|
|
54
|
+
echo " x.y.z Explicit version number"
|
|
55
|
+
echo ""
|
|
56
|
+
echo "Options:"
|
|
57
|
+
echo " -y, --yes, --force Skip confirmation prompts"
|
|
58
|
+
echo " --dry-run Show what would be done without making changes"
|
|
59
|
+
echo " -h, --help Show this help message"
|
|
60
|
+
echo ""
|
|
61
|
+
echo "Examples:"
|
|
62
|
+
echo " $0 patch # Bump patch version"
|
|
63
|
+
echo " $0 1.4.2 # Set explicit version"
|
|
64
|
+
echo " $0 --dry-run patch # Preview changes"
|
|
65
|
+
echo ""
|
|
66
|
+
echo "What this script does:"
|
|
67
|
+
echo " 1. Validates prerequisites and working tree"
|
|
68
|
+
echo " 2. Bumps version in all package files"
|
|
69
|
+
echo " 3. Updates CLI_VERSION constant"
|
|
70
|
+
echo " 4. Commits version bump"
|
|
71
|
+
echo " 5. Creates and pushes git tag"
|
|
72
|
+
echo " 6. Tag push triggers CI/CD pipeline (npm + Docker publish)"
|
|
73
|
+
exit 0
|
|
74
|
+
;;
|
|
75
|
+
*)
|
|
76
|
+
if [ -z "$VERSION_ARG" ]; then
|
|
77
|
+
VERSION_ARG="$1"
|
|
78
|
+
else
|
|
79
|
+
echo "Unknown option: $1"
|
|
80
|
+
exit 1
|
|
81
|
+
fi
|
|
82
|
+
shift
|
|
83
|
+
;;
|
|
84
|
+
esac
|
|
85
|
+
done
|
|
86
|
+
|
|
87
|
+
if [ -z "$VERSION_ARG" ]; then
|
|
88
|
+
echo -e "${RED}❌ Version argument required${NC}"
|
|
89
|
+
echo "Usage: $0 [patch|minor|major|x.y.z]"
|
|
90
|
+
echo "Run '$0 --help' for more information"
|
|
91
|
+
exit 1
|
|
92
|
+
fi
|
|
93
|
+
|
|
94
|
+
# ============================================================================
|
|
95
|
+
# Utility Functions
|
|
96
|
+
# ============================================================================
|
|
97
|
+
|
|
98
|
+
log_info() {
|
|
99
|
+
echo -e "${BLUE}ℹ${NC} $1"
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
log_success() {
|
|
103
|
+
echo -e "${GREEN}✅${NC} $1"
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
log_warning() {
|
|
107
|
+
echo -e "${YELLOW}⚠️${NC} $1"
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
log_error() {
|
|
111
|
+
echo -e "${RED}❌${NC} $1"
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
# ============================================================================
|
|
115
|
+
# Validation Functions
|
|
116
|
+
# ============================================================================
|
|
117
|
+
|
|
118
|
+
validate_prerequisites() {
|
|
119
|
+
echo "🔍 Validating prerequisites..."
|
|
120
|
+
local missing=()
|
|
121
|
+
|
|
122
|
+
# Check git
|
|
123
|
+
if ! command -v git &> /dev/null; then
|
|
124
|
+
missing+=("git")
|
|
125
|
+
fi
|
|
126
|
+
|
|
127
|
+
# Check node
|
|
128
|
+
if ! command -v node &> /dev/null; then
|
|
129
|
+
missing+=("node")
|
|
130
|
+
fi
|
|
131
|
+
|
|
132
|
+
# Check we're in the right directory
|
|
133
|
+
if [ ! -f "package.json" ] || [ ! -d "packages/cli" ]; then
|
|
134
|
+
log_error "Must be run from orchestrator root directory"
|
|
135
|
+
exit 1
|
|
136
|
+
fi
|
|
137
|
+
|
|
138
|
+
if [ ${#missing[@]} -ne 0 ]; then
|
|
139
|
+
log_error "Missing required tools: ${missing[*]}"
|
|
140
|
+
exit 1
|
|
141
|
+
fi
|
|
142
|
+
|
|
143
|
+
log_success "All prerequisites satisfied"
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
validate_working_tree() {
|
|
147
|
+
echo "🔍 Validating working tree..."
|
|
148
|
+
|
|
149
|
+
# Check if working tree is clean
|
|
150
|
+
if [ -n "$(git status --porcelain)" ]; then
|
|
151
|
+
log_error "Working tree is not clean"
|
|
152
|
+
echo "Please commit or stash your changes:"
|
|
153
|
+
git status --short
|
|
154
|
+
exit 1
|
|
155
|
+
fi
|
|
156
|
+
|
|
157
|
+
# Check if on main branch
|
|
158
|
+
local branch
|
|
159
|
+
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
160
|
+
|
|
161
|
+
if [[ "$branch" != "main" ]]; then
|
|
162
|
+
log_warning "You are on branch '$branch', not main"
|
|
163
|
+
if [ "$FORCE" = true ]; then
|
|
164
|
+
echo "Continuing with --force flag..."
|
|
165
|
+
else
|
|
166
|
+
read -p "Continue anyway? (y/N): " -n 1 -r
|
|
167
|
+
echo
|
|
168
|
+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
169
|
+
echo "Aborted by user"
|
|
170
|
+
exit 1
|
|
171
|
+
fi
|
|
172
|
+
fi
|
|
173
|
+
fi
|
|
174
|
+
|
|
175
|
+
log_success "Working tree is clean"
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
validate_tag_not_exists() {
|
|
179
|
+
local tag=$1
|
|
180
|
+
|
|
181
|
+
if git rev-parse "$tag" &> /dev/null; then
|
|
182
|
+
log_error "Tag '$tag' already exists"
|
|
183
|
+
echo "Choose a different version or delete the existing tag"
|
|
184
|
+
exit 1
|
|
185
|
+
fi
|
|
186
|
+
|
|
187
|
+
log_success "Tag '$tag' is available"
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
# ============================================================================
|
|
191
|
+
# Version Functions
|
|
192
|
+
# ============================================================================
|
|
193
|
+
|
|
194
|
+
get_current_version() {
|
|
195
|
+
node -p "require('./packages/cli/package.json').version"
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
calculate_new_version() {
|
|
199
|
+
local current=$1
|
|
200
|
+
local bump_type=$2
|
|
201
|
+
|
|
202
|
+
# Parse current version
|
|
203
|
+
local major minor patch
|
|
204
|
+
IFS='.' read -r major minor patch <<< "$current"
|
|
205
|
+
|
|
206
|
+
case $bump_type in
|
|
207
|
+
patch)
|
|
208
|
+
echo "${major}.${minor}.$((patch + 1))"
|
|
209
|
+
;;
|
|
210
|
+
minor)
|
|
211
|
+
echo "${major}.$((minor + 1)).0"
|
|
212
|
+
;;
|
|
213
|
+
major)
|
|
214
|
+
echo "$((major + 1)).0.0"
|
|
215
|
+
;;
|
|
216
|
+
*)
|
|
217
|
+
# Assume it's an explicit version
|
|
218
|
+
if [[ "$bump_type" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
219
|
+
echo "$bump_type"
|
|
220
|
+
else
|
|
221
|
+
log_error "Invalid version format: $bump_type"
|
|
222
|
+
echo "Use: patch, minor, major, or x.y.z format"
|
|
223
|
+
exit 1
|
|
224
|
+
fi
|
|
225
|
+
;;
|
|
226
|
+
esac
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
# ============================================================================
|
|
230
|
+
# Update Functions
|
|
231
|
+
# ============================================================================
|
|
232
|
+
|
|
233
|
+
update_package_version() {
|
|
234
|
+
local file=$1
|
|
235
|
+
local version=$2
|
|
236
|
+
|
|
237
|
+
if [ ! -f "$file" ]; then
|
|
238
|
+
log_warning "File not found: $file"
|
|
239
|
+
return
|
|
240
|
+
fi
|
|
241
|
+
|
|
242
|
+
if [ "$DRY_RUN" = true ]; then
|
|
243
|
+
echo " [dry-run] Would update: $file"
|
|
244
|
+
return
|
|
245
|
+
fi
|
|
246
|
+
|
|
247
|
+
# Use node to update version (handles JSON properly)
|
|
248
|
+
node -e "
|
|
249
|
+
const fs = require('fs');
|
|
250
|
+
const pkg = JSON.parse(fs.readFileSync('$file', 'utf8'));
|
|
251
|
+
pkg.version = '$version';
|
|
252
|
+
fs.writeFileSync('$file', JSON.stringify(pkg, null, 2) + '\n');
|
|
253
|
+
"
|
|
254
|
+
|
|
255
|
+
log_info "Updated: $file"
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
update_cli_version_constant() {
|
|
259
|
+
local version=$1
|
|
260
|
+
local file="packages/cli/src/index.ts"
|
|
261
|
+
|
|
262
|
+
if [ ! -f "$file" ]; then
|
|
263
|
+
log_warning "File not found: $file"
|
|
264
|
+
return
|
|
265
|
+
fi
|
|
266
|
+
|
|
267
|
+
if [ "$DRY_RUN" = true ]; then
|
|
268
|
+
echo " [dry-run] Would update CLI_VERSION in: $file"
|
|
269
|
+
return
|
|
270
|
+
fi
|
|
271
|
+
|
|
272
|
+
# Update CLI_VERSION constant
|
|
273
|
+
sed -i "s/export const CLI_VERSION = '[^']*'/export const CLI_VERSION = '${version}'/" "$file"
|
|
274
|
+
|
|
275
|
+
log_info "Updated CLI_VERSION in: $file"
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
update_template_version() {
|
|
279
|
+
local version=$1
|
|
280
|
+
local file="src/infrastructure/templates/base/package.json.hbs"
|
|
281
|
+
|
|
282
|
+
if [ ! -f "$file" ]; then
|
|
283
|
+
log_warning "Template file not found: $file"
|
|
284
|
+
return
|
|
285
|
+
fi
|
|
286
|
+
|
|
287
|
+
if [ "$DRY_RUN" = true ]; then
|
|
288
|
+
echo " [dry-run] Would update template: $file"
|
|
289
|
+
return
|
|
290
|
+
fi
|
|
291
|
+
|
|
292
|
+
# Update @orchestrator-claude/cli and @orchestrator-claude/mcp-server versions
|
|
293
|
+
sed -i "s|\"@orchestrator-claude/cli\": \"\\^[0-9]*\\.[0-9]*\\.[0-9]*\"|\"@orchestrator-claude/cli\": \"^${version}\"|g" "$file"
|
|
294
|
+
sed -i "s|\"@orchestrator-claude/mcp-server\": \"\\^[0-9]*\\.[0-9]*\\.[0-9]*\"|\"@orchestrator-claude/mcp-server\": \"^${version}\"|g" "$file"
|
|
295
|
+
|
|
296
|
+
log_info "Updated template: $file"
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
update_all_versions() {
|
|
300
|
+
local version=$1
|
|
301
|
+
|
|
302
|
+
echo "📝 Updating versions to $version..."
|
|
303
|
+
|
|
304
|
+
# Update root package.json
|
|
305
|
+
update_package_version "package.json" "$version"
|
|
306
|
+
|
|
307
|
+
# Update CLI package
|
|
308
|
+
update_package_version "packages/cli/package.json" "$version"
|
|
309
|
+
|
|
310
|
+
# Update MCP server package
|
|
311
|
+
update_package_version "packages/mcp-server/package.json" "$version"
|
|
312
|
+
|
|
313
|
+
# Update CLI_VERSION constant
|
|
314
|
+
update_cli_version_constant "$version"
|
|
315
|
+
|
|
316
|
+
# Update templates
|
|
317
|
+
update_template_version "$version"
|
|
318
|
+
|
|
319
|
+
log_success "All versions updated to $version"
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
# ============================================================================
|
|
323
|
+
# Git Functions
|
|
324
|
+
# ============================================================================
|
|
325
|
+
|
|
326
|
+
commit_version_bump() {
|
|
327
|
+
local version=$1
|
|
328
|
+
local tag="v${version}"
|
|
329
|
+
|
|
330
|
+
if [ "$DRY_RUN" = true ]; then
|
|
331
|
+
echo " [dry-run] Would commit: chore: bump version to ${tag}"
|
|
332
|
+
return
|
|
333
|
+
fi
|
|
334
|
+
|
|
335
|
+
git add package.json \
|
|
336
|
+
packages/cli/package.json \
|
|
337
|
+
packages/mcp-server/package.json \
|
|
338
|
+
packages/cli/src/index.ts \
|
|
339
|
+
src/infrastructure/templates/base/package.json.hbs
|
|
340
|
+
|
|
341
|
+
git commit -m "chore: bump version to ${tag}
|
|
342
|
+
|
|
343
|
+
Updates:
|
|
344
|
+
- package.json (root)
|
|
345
|
+
- packages/cli/package.json
|
|
346
|
+
- packages/mcp-server/package.json
|
|
347
|
+
- packages/cli/src/index.ts (CLI_VERSION)
|
|
348
|
+
- src/infrastructure/templates/base/package.json.hbs (templates)
|
|
349
|
+
|
|
350
|
+
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
|
|
351
|
+
|
|
352
|
+
log_success "Version bump committed"
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
create_and_push_tag() {
|
|
356
|
+
local version=$1
|
|
357
|
+
local tag="v${version}"
|
|
358
|
+
|
|
359
|
+
if [ "$DRY_RUN" = true ]; then
|
|
360
|
+
echo " [dry-run] Would create tag: $tag"
|
|
361
|
+
echo " [dry-run] Would push: main and $tag"
|
|
362
|
+
return
|
|
363
|
+
fi
|
|
364
|
+
|
|
365
|
+
# Create annotated tag
|
|
366
|
+
git tag -a "$tag" -m "Release $tag"
|
|
367
|
+
log_success "Tag created: $tag"
|
|
368
|
+
|
|
369
|
+
# Push commit and tag
|
|
370
|
+
echo "⬆️ Pushing to remote..."
|
|
371
|
+
git push origin main
|
|
372
|
+
git push origin "$tag"
|
|
373
|
+
|
|
374
|
+
log_success "Pushed main and tag $tag"
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
# ============================================================================
|
|
378
|
+
# Main Flow
|
|
379
|
+
# ============================================================================
|
|
380
|
+
|
|
381
|
+
main() {
|
|
382
|
+
echo ""
|
|
383
|
+
echo -e "${BLUE}════════════════════════════════════════${NC}"
|
|
384
|
+
echo -e "${BLUE} Orchestrator Release Script${NC}"
|
|
385
|
+
echo -e "${BLUE}════════════════════════════════════════${NC}"
|
|
386
|
+
echo ""
|
|
387
|
+
|
|
388
|
+
validate_prerequisites
|
|
389
|
+
validate_working_tree
|
|
390
|
+
|
|
391
|
+
# Get current and new versions
|
|
392
|
+
local current_version
|
|
393
|
+
current_version=$(get_current_version)
|
|
394
|
+
|
|
395
|
+
local new_version
|
|
396
|
+
new_version=$(calculate_new_version "$current_version" "$VERSION_ARG")
|
|
397
|
+
|
|
398
|
+
local tag="v${new_version}"
|
|
399
|
+
|
|
400
|
+
echo ""
|
|
401
|
+
echo -e "${BLUE}Release Plan:${NC}"
|
|
402
|
+
echo " Current version: $current_version"
|
|
403
|
+
echo " New version: $new_version"
|
|
404
|
+
echo " Git tag: $tag"
|
|
405
|
+
echo ""
|
|
406
|
+
|
|
407
|
+
if [ "$DRY_RUN" = true ]; then
|
|
408
|
+
echo -e "${YELLOW}[DRY RUN MODE - No changes will be made]${NC}"
|
|
409
|
+
echo ""
|
|
410
|
+
fi
|
|
411
|
+
|
|
412
|
+
validate_tag_not_exists "$tag"
|
|
413
|
+
|
|
414
|
+
# Show what will be updated
|
|
415
|
+
echo ""
|
|
416
|
+
echo "Files to update:"
|
|
417
|
+
echo " - package.json (root)"
|
|
418
|
+
echo " - packages/cli/package.json"
|
|
419
|
+
echo " - packages/mcp-server/package.json"
|
|
420
|
+
echo " - packages/cli/src/index.ts (CLI_VERSION)"
|
|
421
|
+
echo " - src/infrastructure/templates/base/package.json.hbs (templates)"
|
|
422
|
+
echo ""
|
|
423
|
+
echo "Actions:"
|
|
424
|
+
echo " 1. Update version in all files"
|
|
425
|
+
echo " 2. Commit version bump"
|
|
426
|
+
echo " 3. Create git tag $tag"
|
|
427
|
+
echo " 4. Push main + tag to origin"
|
|
428
|
+
echo " 5. CI/CD pipeline will publish npm + Docker"
|
|
429
|
+
echo ""
|
|
430
|
+
|
|
431
|
+
if [ "$FORCE" = false ] && [ "$DRY_RUN" = false ]; then
|
|
432
|
+
read -p "Continue with release? (y/N): " -n 1 -r
|
|
433
|
+
echo
|
|
434
|
+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
435
|
+
echo "Aborted by user"
|
|
436
|
+
exit 1
|
|
437
|
+
fi
|
|
438
|
+
fi
|
|
439
|
+
|
|
440
|
+
# Execute release steps
|
|
441
|
+
update_all_versions "$new_version"
|
|
442
|
+
commit_version_bump "$new_version"
|
|
443
|
+
create_and_push_tag "$new_version"
|
|
444
|
+
|
|
445
|
+
echo ""
|
|
446
|
+
echo -e "${GREEN}════════════════════════════════════════${NC}"
|
|
447
|
+
echo -e "${GREEN} Release $tag initiated!${NC}"
|
|
448
|
+
echo -e "${GREEN}════════════════════════════════════════${NC}"
|
|
449
|
+
echo ""
|
|
450
|
+
echo "🚀 CI/CD pipeline will now:"
|
|
451
|
+
echo " - Build and publish Docker image"
|
|
452
|
+
echo " - Publish npm packages"
|
|
453
|
+
echo ""
|
|
454
|
+
echo "📍 Monitor pipeline at:"
|
|
455
|
+
echo " https://github.com/orchestratorAII/orchestrator/actions"
|
|
456
|
+
echo ""
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
# Entry point
|
|
460
|
+
main
|
|
@@ -1,19 +1,200 @@
|
|
|
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
|
|
17
|
+
|
|
1
18
|
services:
|
|
19
|
+
postgres:
|
|
20
|
+
image: postgres:15-alpine
|
|
21
|
+
container_name: {{projectName}}-postgres
|
|
22
|
+
environment:
|
|
23
|
+
POSTGRES_DB: ${POSTGRES_DB:-orchestrator}
|
|
24
|
+
POSTGRES_USER: ${POSTGRES_USER:-orchestrator}
|
|
25
|
+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
26
|
+
volumes:
|
|
27
|
+
- {{projectName}}-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
|
+
- {{projectName}}-network
|
|
39
|
+
|
|
40
|
+
neo4j:
|
|
41
|
+
image: neo4j:5-community
|
|
42
|
+
container_name: {{projectName}}-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
|
+
- {{projectName}}-neo4j-data:/data
|
|
56
|
+
- {{projectName}}-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
|
+
- {{projectName}}-network
|
|
66
|
+
profiles:
|
|
67
|
+
- knowledge-graph
|
|
68
|
+
- full
|
|
69
|
+
|
|
70
|
+
minio:
|
|
71
|
+
image: minio/minio:latest
|
|
72
|
+
container_name: {{projectName}}-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}
|
|
77
|
+
ports:
|
|
78
|
+
- "${MINIO_S3_PORT:-9000}:9000" # MinIO S3 API
|
|
79
|
+
- "${MINIO_CONSOLE_PORT:-9001}:9001" # MinIO console
|
|
80
|
+
volumes:
|
|
81
|
+
- {{projectName}}-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
|
+
- {{projectName}}-network
|
|
91
|
+
profiles:
|
|
92
|
+
- object-storage
|
|
93
|
+
- full
|
|
94
|
+
|
|
95
|
+
minio-init:
|
|
96
|
+
image: minio/mc:latest
|
|
97
|
+
container_name: {{projectName}}-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
|
+
- {{projectName}}-network
|
|
112
|
+
profiles:
|
|
113
|
+
- object-storage
|
|
114
|
+
- full
|
|
115
|
+
restart: "no"
|
|
116
|
+
|
|
117
|
+
db-migrate:
|
|
118
|
+
image: cmac01/orchestrator-api:{{orchestratorVersion}}
|
|
119
|
+
container_name: {{projectName}}-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
|
+
- {{projectName}}-network
|
|
135
|
+
restart: "no"
|
|
136
|
+
|
|
2
137
|
orchestrator-api:
|
|
3
138
|
image: cmac01/orchestrator-api:{{orchestratorVersion}}
|
|
4
139
|
container_name: {{projectName}}-orchestrator-api
|
|
5
|
-
|
|
140
|
+
depends_on:
|
|
141
|
+
postgres:
|
|
142
|
+
condition: service_healthy
|
|
143
|
+
db-migrate:
|
|
144
|
+
condition: service_completed_successfully
|
|
145
|
+
env_file: .env
|
|
146
|
+
environment:
|
|
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}
|
|
6
172
|
ports:
|
|
7
|
-
- "3001:3001"
|
|
173
|
+
- "3001:3001" # Orchestrator REST API + MCP server
|
|
8
174
|
volumes:
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
- NODE_ENV=development
|
|
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
|
|
13
178
|
healthcheck:
|
|
14
179
|
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:3001/api/v1/health"]
|
|
15
180
|
interval: 30s
|
|
16
|
-
timeout:
|
|
17
|
-
start_period: 10s
|
|
181
|
+
timeout: 10s
|
|
18
182
|
retries: 3
|
|
183
|
+
start_period: 15s
|
|
19
184
|
restart: unless-stopped
|
|
185
|
+
networks:
|
|
186
|
+
- {{projectName}}-network
|
|
187
|
+
|
|
188
|
+
volumes:
|
|
189
|
+
{{projectName}}-postgres-data:
|
|
190
|
+
driver: local
|
|
191
|
+
{{projectName}}-neo4j-data:
|
|
192
|
+
driver: local
|
|
193
|
+
{{projectName}}-neo4j-logs:
|
|
194
|
+
driver: local
|
|
195
|
+
{{projectName}}-minio-data:
|
|
196
|
+
driver: local
|
|
197
|
+
|
|
198
|
+
networks:
|
|
199
|
+
{{projectName}}-network:
|
|
200
|
+
driver: bridge
|
|
@@ -3,22 +3,29 @@
|
|
|
3
3
|
"mcpServers": {
|
|
4
4
|
"orchestrator-tools": {
|
|
5
5
|
"command": "npx",
|
|
6
|
-
"args": [
|
|
7
|
-
"@orchestrator-claude/mcp-server"
|
|
8
|
-
],
|
|
6
|
+
"args": ["@orchestrator-claude/mcp-server"],
|
|
9
7
|
"env": {
|
|
10
8
|
"ORCHESTRATOR_API_URL": "http://localhost:3001",
|
|
11
|
-
"
|
|
9
|
+
"ORCHESTRATOR_PROJECT_ID": "{{projectId}}",
|
|
10
|
+
"ORCHESTRATOR_AUTH_EMAIL": "{{authEmail}}",
|
|
11
|
+
"ORCHESTRATOR_AUTH_PASSWORD": "{{authPassword}}",
|
|
12
|
+
"NODE_ENV": "production"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"orchestrator-extended": {
|
|
16
|
+
"command": "npx",
|
|
17
|
+
"args": ["@orchestrator-claude/mcp-server", "--server", "extended"],
|
|
18
|
+
"env": {
|
|
19
|
+
"ORCHESTRATOR_API_URL": "http://localhost:3001",
|
|
20
|
+
"ORCHESTRATOR_PROJECT_ID": "{{projectId}}",
|
|
21
|
+
"ORCHESTRATOR_AUTH_EMAIL": "{{authEmail}}",
|
|
22
|
+
"ORCHESTRATOR_AUTH_PASSWORD": "{{authPassword}}",
|
|
12
23
|
"NODE_ENV": "production"
|
|
13
24
|
}
|
|
14
25
|
},
|
|
15
26
|
"perplexity": {
|
|
16
27
|
"command": "npx",
|
|
17
|
-
"args": [
|
|
18
|
-
"@orchestrator-claude/mcp-server",
|
|
19
|
-
"--server",
|
|
20
|
-
"perplexity"
|
|
21
|
-
],
|
|
28
|
+
"args": ["@orchestrator-claude/mcp-server", "--server", "perplexity"],
|
|
22
29
|
"env": {
|
|
23
30
|
"ORCHESTRATOR_API_URL": "http://localhost:3001",
|
|
24
31
|
"PERPLEXITY_API_KEY": "{{perplexityApiKey}}"
|