@gh-symphony/cli 0.0.22 → 0.1.3
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 +72 -77
- package/dist/{chunk-HMLBBZNY.js → chunk-2YF7PQUC.js} +16 -71
- package/dist/{chunk-IWFX2FMA.js → chunk-6I753NYO.js} +4 -1
- package/dist/{chunk-2TSM3INR.js → chunk-HQ7A3C7K.js} +575 -12
- package/dist/{chunk-36KYEDEO.js → chunk-MVRF7BES.js} +1 -10
- package/dist/{workflow-L3KT6HB7.js → chunk-NESHTYXQ.js} +27 -19
- package/dist/{chunk-2UW7NQLX.js → chunk-PEZUBHWJ.js} +1 -1
- package/dist/chunk-PG332ZS4.js +238 -0
- package/dist/{chunk-EEQQWTXS.js → chunk-WCOIVNHH.js} +213 -82
- package/dist/{chunk-QIRE2VXS.js → chunk-WOVNN5NW.js} +16 -17
- package/dist/{chunk-C67H3OUL.js → chunk-Z3NZOPLZ.js} +0 -81
- package/dist/{config-cmd-Z3A7V6NC.js → config-cmd-2ADPUYWA.js} +1 -1
- package/dist/{doctor-EJUMPBMW.js → doctor-2AXHIEAP.js} +464 -40
- package/dist/index.js +340 -294
- package/dist/{chunk-PUDXVBSN.js → repo-SUXYT4OK.js} +6272 -2996
- package/dist/{setup-TZJSM3QV.js → setup-UBHOMXUG.js} +57 -92
- package/dist/{upgrade-O33S2SJK.js → upgrade-355SQJ5P.js} +2 -2
- package/dist/{version-CW54Q7BK.js → version-4ILSDZQH.js} +1 -1
- package/dist/worker-entry.js +10 -5
- package/dist/workflow-S6YSZPQT.js +22 -0
- package/package.json +4 -4
- package/dist/chunk-DDL4BWSL.js +0 -146
- package/dist/chunk-DFLXHNYQ.js +0 -482
- package/dist/chunk-E7HYEEZD.js +0 -1318
- package/dist/chunk-GDE6FYN4.js +0 -26
- package/dist/chunk-GSX2FV3M.js +0 -103
- package/dist/chunk-ZHOKYUO3.js +0 -1047
- package/dist/init-54HMKNYI.js +0 -38
- package/dist/logs-GTZ4U5JE.js +0 -188
- package/dist/project-RMYMZSFV.js +0 -25
- package/dist/recover-LTLKMTRX.js +0 -133
- package/dist/repo-WI7GF6XQ.js +0 -749
- package/dist/run-IHN3ZL35.js +0 -122
- package/dist/start-RTAHQMR2.js +0 -19
- package/dist/status-F4D52OVK.js +0 -12
- package/dist/stop-MDKMJPVR.js +0 -10
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@ Validate the machine and repo prerequisites before first use:
|
|
|
36
36
|
gh-symphony doctor
|
|
37
37
|
gh-symphony doctor --fix
|
|
38
38
|
gh-symphony doctor --json
|
|
39
|
+
gh-symphony doctor --smoke
|
|
39
40
|
GITHUB_GRAPHQL_TOKEN=ghp_your_classic_token gh-symphony doctor --json
|
|
40
41
|
```
|
|
41
42
|
|
|
@@ -62,6 +63,7 @@ gh-symphony workflow init
|
|
|
62
63
|
gh-symphony workflow init --dry-run
|
|
63
64
|
gh-symphony workflow validate
|
|
64
65
|
gh-symphony workflow preview --issue owner/repo#123
|
|
66
|
+
gh-symphony doctor --smoke --issue owner/repo#123
|
|
65
67
|
```
|
|
66
68
|
|
|
67
69
|
The interactive wizard will:
|
|
@@ -105,16 +107,16 @@ You can further customize the agent's behavior by editing `WORKFLOW.md` — this
|
|
|
105
107
|
|
|
106
108
|
> Currently supported runtimes: **Codex**, **Claude Code**
|
|
107
109
|
|
|
108
|
-
###
|
|
110
|
+
### Repository `.env` Mapping
|
|
109
111
|
|
|
110
|
-
If your hooks or worker runs need staging hosts, database URLs, Playwright base URLs, or other runtime-only values, store them in the
|
|
112
|
+
If your hooks or worker runs need staging hosts, database URLs, Playwright base URLs, or other runtime-only values, store them in the repository runtime directory instead of hardcoding them in `WORKFLOW.md`.
|
|
111
113
|
|
|
112
|
-
1.
|
|
114
|
+
1. Initialize the repository runtime with `gh-symphony repo init`.
|
|
113
115
|
2. Create the runtime env file:
|
|
114
116
|
|
|
115
117
|
```bash
|
|
116
|
-
mkdir -p
|
|
117
|
-
cat >
|
|
118
|
+
mkdir -p .runtime/orchestrator
|
|
119
|
+
cat > .runtime/orchestrator/.env <<'EOF'
|
|
118
120
|
STAGING_API_HOST=https://staging.example.com
|
|
119
121
|
DATABASE_URL=postgres://user:pass@staging-db:5432/app
|
|
120
122
|
PLAYWRIGHT_BASE_URL=http://localhost:3000
|
|
@@ -135,14 +137,14 @@ Env precedence during hook execution and worker spawn is:
|
|
|
135
137
|
- system env as the override layer
|
|
136
138
|
- Symphony context vars such as `SYMPHONY_*` as the highest-priority layer
|
|
137
139
|
|
|
138
|
-
|
|
140
|
+
The repository runtime always lives under `.runtime/orchestrator/`.
|
|
139
141
|
|
|
140
|
-
## 3. Set Orchestrator Runner (
|
|
142
|
+
## 3. Set Orchestrator Runner (Repository)
|
|
141
143
|
|
|
142
|
-
|
|
144
|
+
From inside the cloned repository that should run orchestration, initialize the workflow and repository runtime:
|
|
143
145
|
|
|
144
146
|
```bash
|
|
145
|
-
gh-symphony
|
|
147
|
+
gh-symphony setup
|
|
146
148
|
```
|
|
147
149
|
|
|
148
150
|
The interactive wizard will:
|
|
@@ -150,8 +152,7 @@ The interactive wizard will:
|
|
|
150
152
|
1. Authenticate via `GITHUB_GRAPHQL_TOKEN` or fall back to `gh` CLI
|
|
151
153
|
2. Let you select a **GitHub Project**
|
|
152
154
|
3. Optionally limit processing to issues assigned to the authenticated user
|
|
153
|
-
4.
|
|
154
|
-
5. Write project configuration to `~/.gh-symphony/`
|
|
155
|
+
4. Write `WORKFLOW.md`, support files, and `.runtime/orchestrator/` in the repository
|
|
155
156
|
|
|
156
157
|
This wizard uses the same pagination-aware discovery path as `workflow init`, so it can enumerate large personal and organization-backed GitHub accounts more reliably. If the CLI stops at a safety limit, it warns that the visible project list may be incomplete.
|
|
157
158
|
|
|
@@ -162,55 +163,40 @@ GITHUB_GRAPHQL_TOKEN=ghp_your_classic_token \
|
|
|
162
163
|
gh-symphony workflow init --non-interactive --project PVT_xxx --output WORKFLOW.md
|
|
163
164
|
|
|
164
165
|
GITHUB_GRAPHQL_TOKEN=ghp_your_classic_token \
|
|
165
|
-
gh-symphony
|
|
166
|
+
gh-symphony repo init
|
|
166
167
|
```
|
|
167
168
|
|
|
168
|
-
Token-only
|
|
169
|
+
Token-only setup is also supported when exactly one GitHub Project is visible to the token:
|
|
169
170
|
|
|
170
171
|
```bash
|
|
171
172
|
export GITHUB_GRAPHQL_TOKEN=ghp_your_classic_token
|
|
172
|
-
gh-symphony
|
|
173
|
+
gh-symphony setup
|
|
173
174
|
```
|
|
174
175
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
### Project Management
|
|
176
|
+
### Repository Management
|
|
178
177
|
|
|
179
178
|
```bash
|
|
180
179
|
gh-symphony doctor # Validate local prerequisites, auth, config, WORKFLOW.md, and runtime command
|
|
181
180
|
gh-symphony doctor --fix # Apply safe fixes and guide/launch follow-up recovery commands
|
|
182
|
-
gh-symphony
|
|
183
|
-
gh-symphony
|
|
184
|
-
gh-symphony
|
|
185
|
-
gh-symphony repo
|
|
186
|
-
gh-symphony repo
|
|
187
|
-
gh-symphony repo
|
|
188
|
-
gh-symphony repo sync --prune # Remove local repositories no longer linked
|
|
181
|
+
gh-symphony doctor --smoke # Final preflight: validate a live issue without dispatching work
|
|
182
|
+
gh-symphony repo init # Bind .runtime/orchestrator to the cwd repository
|
|
183
|
+
gh-symphony repo status # Show current repository orchestration status
|
|
184
|
+
gh-symphony repo explain owner/repo#123 # Explain why one issue is not dispatching
|
|
185
|
+
gh-symphony repo start # Start this repository
|
|
186
|
+
gh-symphony repo stop # Stop this repository
|
|
189
187
|
```
|
|
190
188
|
|
|
191
|
-
|
|
192
|
-
project starts empty or when you want to register a repository before it is
|
|
193
|
-
linked on the GitHub Project board. Successful validation stores the canonical
|
|
194
|
-
clone URL from the GitHub API. If auth is unavailable or the API is offline,
|
|
195
|
-
the CLI still saves the repo with the fallback HTTPS clone URL and prints a
|
|
196
|
-
warning that validation was skipped.
|
|
197
|
-
|
|
198
|
-
Use `gh-symphony repo sync` when the GitHub Project board has gained or lost
|
|
199
|
-
linked repositories since the project was first added locally. Default sync is
|
|
200
|
-
additive; `--prune` switches to strict alignment, and `--json` prints the added,
|
|
201
|
-
removed, unchanged, and final repository sets.
|
|
202
|
-
|
|
203
|
-
For empty projects, use `gh-symphony repo add owner/name` after setup to seed the local repository list without re-running the whole wizard.
|
|
189
|
+
`gh-symphony repo init` reads `WORKFLOW.md`, infers `owner/name` from the Git remote, and writes per-repo runtime state under `.runtime/orchestrator/`.
|
|
204
190
|
|
|
205
191
|
### Why Is My Issue Not Running?
|
|
206
192
|
|
|
207
|
-
Use `gh-symphony
|
|
193
|
+
Use `gh-symphony repo explain <owner/repo#number>` before digging through
|
|
208
194
|
logs manually:
|
|
209
195
|
|
|
210
196
|
```bash
|
|
211
|
-
gh-symphony
|
|
212
|
-
gh-symphony
|
|
213
|
-
gh-symphony
|
|
197
|
+
gh-symphony repo explain owner/repo#123
|
|
198
|
+
gh-symphony repo explain owner/repo#123 --json
|
|
199
|
+
gh-symphony repo explain owner/repo#123 --workflow ./WORKFLOW.md
|
|
214
200
|
```
|
|
215
201
|
|
|
216
202
|
The command checks project repository linkage, GitHub Project item presence,
|
|
@@ -235,57 +221,67 @@ Checks:
|
|
|
235
221
|
```
|
|
236
222
|
|
|
237
223
|
The remediation hints point to existing commands such as `workflow preview`,
|
|
238
|
-
`doctor`, `
|
|
224
|
+
`doctor`, `repo status`, and `repo logs --issue`.
|
|
239
225
|
|
|
240
226
|
## 4. Run the Orchestrator
|
|
241
227
|
|
|
242
228
|
### Foreground
|
|
243
229
|
|
|
244
230
|
```bash
|
|
245
|
-
gh-symphony start
|
|
246
|
-
gh-symphony start --once # Run startup cleanup + one orchestration tick, then exit
|
|
247
|
-
gh-symphony project start --once # Same one-shot flow for an explicit project
|
|
231
|
+
gh-symphony repo start
|
|
232
|
+
gh-symphony repo start --once # Run startup cleanup + one orchestration tick, then exit
|
|
248
233
|
```
|
|
249
234
|
|
|
250
235
|
### Background (daemon)
|
|
251
236
|
|
|
252
237
|
```bash
|
|
253
|
-
gh-symphony start --daemon # Start in background
|
|
254
|
-
gh-symphony stop # Stop the daemon
|
|
238
|
+
gh-symphony repo start --daemon # Start in background
|
|
239
|
+
gh-symphony repo stop # Stop the daemon
|
|
255
240
|
```
|
|
256
241
|
|
|
257
|
-
Use `start --once` for the first real managed-project run or a CI smoke check. It reuses the configured GitHub Project binding and `WORKFLOW.md` and performs exactly one poll/reconcile/dispatch cycle instead of entering the long-running orchestration loop. `--daemon --once` is rejected because the modes conflict. If you add `--http`, the dashboard/API remains available after that one-shot tick completes, and the process stays up until you interrupt it with `Ctrl+C`.
|
|
242
|
+
Run `doctor --smoke` before the first `start --once` when you want a safe pre-dispatch readiness check. Use `start --once` for the first real managed-project run or a CI smoke check. It reuses the configured GitHub Project binding and `WORKFLOW.md` and performs exactly one poll/reconcile/dispatch cycle instead of entering the long-running orchestration loop. `--daemon --once` is rejected because the modes conflict. If you add `--http`, the dashboard/API remains available after that one-shot tick completes, and the process stays up until you interrupt it with `Ctrl+C`.
|
|
258
243
|
|
|
259
244
|
### Monitor
|
|
260
245
|
|
|
261
246
|
```bash
|
|
262
|
-
gh-symphony status # Show current status
|
|
263
|
-
gh-symphony status --watch # Live dashboard
|
|
264
|
-
gh-symphony logs # View event logs
|
|
265
|
-
gh-symphony logs --follow # Stream logs in real-time
|
|
247
|
+
gh-symphony repo status # Show current status
|
|
248
|
+
gh-symphony repo status --watch # Live dashboard
|
|
249
|
+
gh-symphony repo logs # View event logs
|
|
250
|
+
gh-symphony repo logs --follow # Stream logs in real-time
|
|
266
251
|
```
|
|
267
252
|
|
|
268
253
|
### Dispatch a Single Issue
|
|
269
254
|
|
|
270
255
|
```bash
|
|
271
|
-
gh-symphony run org/repo#123
|
|
256
|
+
gh-symphony repo run org/repo#123
|
|
272
257
|
```
|
|
273
258
|
|
|
274
259
|
### Recover Stalled Runs
|
|
275
260
|
|
|
276
261
|
```bash
|
|
277
|
-
gh-symphony recover # Recover stalled runs
|
|
278
|
-
gh-symphony recover --dry-run # Preview what would be recovered
|
|
262
|
+
gh-symphony repo recover # Recover stalled runs
|
|
263
|
+
gh-symphony repo recover --dry-run # Preview what would be recovered
|
|
279
264
|
```
|
|
280
265
|
|
|
281
266
|
## Diagnostics
|
|
282
267
|
|
|
283
|
-
`gh-symphony doctor` validates the most common first-run prerequisites in one pass. `gh-symphony doctor --
|
|
268
|
+
`gh-symphony doctor` validates the most common first-run prerequisites in one pass. `gh-symphony doctor --smoke` is the recommended final preflight before `gh-symphony repo start --once`: it resolves the active managed project, checks the GitHub Project binding, confirms the repository and target issue are readable through the project, renders `WORKFLOW.md` for that issue, verifies the runtime command, workspace root, and configured hook paths, and exits without dispatching a worker.
|
|
269
|
+
|
|
270
|
+
Use an explicit issue when you want a deterministic check:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
gh-symphony doctor --smoke --issue owner/repo#123
|
|
274
|
+
gh-symphony doctor --smoke --issue owner/repo#123 --json
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
Without `--issue`, doctor auto-selects one active live issue from the managed project. If none is suitable, the report explains which active states it expected and suggests re-running with `--issue`.
|
|
278
|
+
|
|
279
|
+
`gh-symphony doctor --fix` extends the regular diagnostic flow with safe remediation and guided follow-up:
|
|
284
280
|
|
|
285
281
|
- creates missing config/runtime/workspace directories
|
|
286
282
|
- launches `gh auth login` or `gh auth refresh` when a TTY is available, otherwise prints the exact command to run
|
|
287
|
-
- launches `gh-symphony init` when `WORKFLOW.md` is missing or invalid
|
|
288
|
-
- launches `gh-symphony
|
|
283
|
+
- launches `gh-symphony workflow init` when `WORKFLOW.md` is missing or invalid
|
|
284
|
+
- launches `gh-symphony setup` when repository runtime setup or GitHub Project binding must be repaired
|
|
289
285
|
- prints concrete runtime install guidance when the configured command is missing on `PATH`
|
|
290
286
|
|
|
291
287
|
The diagnostic checks cover:
|
|
@@ -294,17 +290,19 @@ The diagnostic checks cover:
|
|
|
294
290
|
- Node.js runtime version against the documented minimum (`v24+`) and the current `process.version`
|
|
295
291
|
- Git installation availability on `PATH`, including `git --version` when available
|
|
296
292
|
- GitHub authentication via `GITHUB_GRAPHQL_TOKEN` or `gh`, including required scopes
|
|
297
|
-
-
|
|
298
|
-
-
|
|
293
|
+
- repository runtime selection plus GitHub Project binding resolution
|
|
294
|
+
- runtime/workspace path writability
|
|
299
295
|
- repository `WORKFLOW.md` presence and parse validity
|
|
300
296
|
- runtime command availability on `PATH`
|
|
297
|
+
- with `--smoke`: linked repository readiness, live issue readability, strict prompt rendering, and hook path resolution
|
|
301
298
|
|
|
302
299
|
Use JSON output for scripts and CI smoke checks. `--fix --json` includes a remediation section where each step is reported as `applied`, `skipped`, or `manual`.
|
|
303
300
|
|
|
304
301
|
```bash
|
|
305
302
|
gh-symphony doctor --json
|
|
306
303
|
gh-symphony doctor --fix --json
|
|
307
|
-
gh-symphony
|
|
304
|
+
gh-symphony doctor --smoke --json
|
|
305
|
+
gh-symphony repo start --once
|
|
308
306
|
```
|
|
309
307
|
|
|
310
308
|
JSON output includes the resolved auth source as `env` or `gh`.
|
|
@@ -313,33 +311,30 @@ JSON output includes the resolved auth source as `env` or `gh`.
|
|
|
313
311
|
|
|
314
312
|
```
|
|
315
313
|
Setup:
|
|
314
|
+
setup Generate WORKFLOW.md and initialize the cwd repository runtime
|
|
316
315
|
workflow init Interactive repository setup wizard
|
|
317
316
|
workflow validate Parse and strictly validate WORKFLOW.md
|
|
318
317
|
workflow preview Render the final worker prompt from a sample or live issue
|
|
319
|
-
doctor Run diagnostics and optional
|
|
318
|
+
doctor Run diagnostics, smoke checks, and optional remediation
|
|
320
319
|
config show Show current configuration
|
|
321
320
|
config set Set a configuration value
|
|
322
321
|
config edit Open config in $EDITOR
|
|
323
322
|
|
|
324
323
|
Orchestration:
|
|
325
|
-
|
|
326
|
-
start
|
|
327
|
-
start --
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
324
|
+
repo init Bind .runtime/orchestrator to the cwd repository
|
|
325
|
+
repo start Start the orchestrator (foreground)
|
|
326
|
+
repo start --once Run a single orchestration tick and exit
|
|
327
|
+
repo start --daemon Start the orchestrator (background)
|
|
328
|
+
repo stop Stop the background orchestrator
|
|
329
|
+
repo status Show orchestrator status
|
|
330
|
+
repo run <issue> Dispatch a single issue
|
|
331
|
+
repo recover Recover stalled runs
|
|
332
|
+
repo logs View orchestrator logs
|
|
333
|
+
repo explain Explain why an issue is not dispatching
|
|
333
334
|
completion <shell> Print shell completion for bash/zsh/fish
|
|
334
335
|
|
|
335
|
-
Project Management:
|
|
336
|
-
project add Add a new project (interactive wizard)
|
|
337
|
-
project list List all configured projects
|
|
338
|
-
project remove Remove a project
|
|
339
|
-
repo sync Refresh repositories from the linked GitHub Project
|
|
340
|
-
|
|
341
336
|
Global Options:
|
|
342
|
-
--config <dir> Config directory (default: ~/.gh-symphony)
|
|
337
|
+
--config <dir> Config directory (default: initialized cwd runtime, then ~/.gh-symphony)
|
|
343
338
|
--verbose Enable verbose output
|
|
344
339
|
--json Output in JSON format
|
|
345
340
|
--no-color Disable color output
|
|
@@ -10,24 +10,12 @@ import {
|
|
|
10
10
|
listUserProjects,
|
|
11
11
|
resolveGitHubAuth,
|
|
12
12
|
validateToken
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Z3NZOPLZ.js";
|
|
14
14
|
import {
|
|
15
15
|
formatClaudePreflightText,
|
|
16
16
|
resolveClaudeCommandBinary,
|
|
17
17
|
runClaudePreflight
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import {
|
|
20
|
-
loadGlobalConfig,
|
|
21
|
-
saveGlobalConfig,
|
|
22
|
-
saveProjectConfig
|
|
23
|
-
} from "./chunk-QIRE2VXS.js";
|
|
24
|
-
|
|
25
|
-
// src/commands/init.ts
|
|
26
|
-
import * as p from "@clack/prompts";
|
|
27
|
-
import { spawnSync } from "child_process";
|
|
28
|
-
import { createHash } from "crypto";
|
|
29
|
-
import { chmod, mkdir as mkdir3, readFile as readFile3, rename as rename2, writeFile as writeFile3 } from "fs/promises";
|
|
30
|
-
import { basename, dirname as dirname2, join as join3, relative, resolve } from "path";
|
|
18
|
+
} from "./chunk-WCOIVNHH.js";
|
|
31
19
|
|
|
32
20
|
// src/mapping/smart-defaults.ts
|
|
33
21
|
var ROLE_PATTERNS = [
|
|
@@ -106,6 +94,13 @@ function validateStateMapping(mappings) {
|
|
|
106
94
|
return { valid: errors.length === 0, errors, warnings };
|
|
107
95
|
}
|
|
108
96
|
|
|
97
|
+
// src/commands/workflow-init.ts
|
|
98
|
+
import * as p from "@clack/prompts";
|
|
99
|
+
import { spawnSync } from "child_process";
|
|
100
|
+
import { createHash } from "crypto";
|
|
101
|
+
import { chmod, mkdir as mkdir3, readFile as readFile3, rename as rename2, writeFile as writeFile3 } from "fs/promises";
|
|
102
|
+
import { basename, dirname as dirname2, join as join3, relative, resolve } from "path";
|
|
103
|
+
|
|
109
104
|
// src/prompts/runtime-claude-constraints.ts
|
|
110
105
|
var CLAUDE_RUNTIME_CONSTRAINTS_SECTION = `## Runtime Constraints
|
|
111
106
|
|
|
@@ -317,8 +312,6 @@ function buildRuntimeFrontMatter(runtime) {
|
|
|
317
312
|
" isolation:",
|
|
318
313
|
" bare: false",
|
|
319
314
|
" strict_mcp_config: false",
|
|
320
|
-
" auth:",
|
|
321
|
-
" env: ANTHROPIC_API_KEY",
|
|
322
315
|
" timeouts:",
|
|
323
316
|
" read_timeout_ms: 5000",
|
|
324
317
|
" turn_timeout_ms: 3600000",
|
|
@@ -1785,7 +1778,7 @@ var ALL_SKILL_TEMPLATES = [
|
|
|
1785
1778
|
{ name: "land", fileName: "SKILL.md", generate: generateLandSkill }
|
|
1786
1779
|
];
|
|
1787
1780
|
|
|
1788
|
-
// src/commands/init.ts
|
|
1781
|
+
// src/commands/workflow-init.ts
|
|
1789
1782
|
var KNOWN_REQUIRED_SCOPES = ["repo", "read:org", "project"];
|
|
1790
1783
|
function displayScopeError(error, retryCommand) {
|
|
1791
1784
|
const plural = error.requiredScopes.length === 1 ? "" : "s";
|
|
@@ -1868,6 +1861,7 @@ async function runInitRuntimePreflight(runtime) {
|
|
|
1868
1861
|
cwd: process.cwd(),
|
|
1869
1862
|
env: process.env,
|
|
1870
1863
|
command: resolveClaudeCommandBinary(resolveRuntimeCommand(runtime)) ?? resolveRuntimeCommand(runtime),
|
|
1864
|
+
authMode: "local-or-api-key",
|
|
1871
1865
|
includeGhAuth: !hasGitHubGraphqlToken
|
|
1872
1866
|
});
|
|
1873
1867
|
const message = formatClaudePreflightText(report);
|
|
@@ -1886,7 +1880,7 @@ var handler = async (args, options) => {
|
|
|
1886
1880
|
}
|
|
1887
1881
|
await runInteractive(flags, options);
|
|
1888
1882
|
};
|
|
1889
|
-
var
|
|
1883
|
+
var workflow_init_default = handler;
|
|
1890
1884
|
function resolveInitRuntime(runtime) {
|
|
1891
1885
|
return normalizeInitRuntime(runtime ?? "codex-app-server");
|
|
1892
1886
|
}
|
|
@@ -2521,7 +2515,7 @@ Run without --non-interactive for manual mapping.
|
|
|
2521
2515
|
} else {
|
|
2522
2516
|
printEcosystemSummary(ecosystemResult, outputPath, {
|
|
2523
2517
|
interactive: false,
|
|
2524
|
-
nextSteps: "Run 'gh-symphony
|
|
2518
|
+
nextSteps: "Run 'gh-symphony repo init' from the target repository."
|
|
2525
2519
|
});
|
|
2526
2520
|
}
|
|
2527
2521
|
}
|
|
@@ -2665,69 +2659,20 @@ async function runInteractiveStandalone(flags, _options) {
|
|
|
2665
2659
|
});
|
|
2666
2660
|
printEcosystemSummary(ecosystemResult, outputPath, {
|
|
2667
2661
|
interactive: true,
|
|
2668
|
-
nextSteps: "Run 'gh-symphony
|
|
2669
|
-
});
|
|
2670
|
-
}
|
|
2671
|
-
async function writeConfig(configDir, input) {
|
|
2672
|
-
const repository = input.repos[0];
|
|
2673
|
-
await saveProjectConfig(configDir, input.projectId, {
|
|
2674
|
-
projectId: input.projectId,
|
|
2675
|
-
slug: input.projectId,
|
|
2676
|
-
displayName: input.project.title,
|
|
2677
|
-
workspaceDir: input.workspaceDir,
|
|
2678
|
-
...repository ? {
|
|
2679
|
-
repository: {
|
|
2680
|
-
owner: repository.owner,
|
|
2681
|
-
name: repository.name,
|
|
2682
|
-
cloneUrl: repository.cloneUrl
|
|
2683
|
-
}
|
|
2684
|
-
} : {},
|
|
2685
|
-
repositories: input.repos.map((r) => ({
|
|
2686
|
-
owner: r.owner,
|
|
2687
|
-
name: r.name,
|
|
2688
|
-
cloneUrl: r.cloneUrl
|
|
2689
|
-
})),
|
|
2690
|
-
tracker: {
|
|
2691
|
-
adapter: "github-project",
|
|
2692
|
-
bindingId: input.project.id,
|
|
2693
|
-
settings: {
|
|
2694
|
-
projectId: input.project.id,
|
|
2695
|
-
...input.repos[0] ? { repository: `${repository.owner}/${repository.name}` } : {},
|
|
2696
|
-
...input.assignedOnly ? { assignedOnly: true } : {}
|
|
2697
|
-
}
|
|
2698
|
-
}
|
|
2662
|
+
nextSteps: "Run 'gh-symphony repo init' from the target repository."
|
|
2699
2663
|
});
|
|
2700
|
-
const existing = await loadGlobalConfig(configDir);
|
|
2701
|
-
const globalConfig = {
|
|
2702
|
-
activeProject: input.projectId,
|
|
2703
|
-
projects: [
|
|
2704
|
-
...(existing?.projects ?? []).filter((t) => t !== input.projectId),
|
|
2705
|
-
input.projectId
|
|
2706
|
-
]
|
|
2707
|
-
};
|
|
2708
|
-
await saveGlobalConfig(configDir, globalConfig);
|
|
2709
|
-
}
|
|
2710
|
-
function generateProjectId(githubProjectTitle, uniqueKey) {
|
|
2711
|
-
const slug = githubProjectTitle.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, 32);
|
|
2712
|
-
const suffix = createHash("sha1").update(uniqueKey).digest("hex").slice(0, 8);
|
|
2713
|
-
return [slug || "project", suffix].join("-");
|
|
2714
2664
|
}
|
|
2715
2665
|
|
|
2716
2666
|
export {
|
|
2717
2667
|
validateStateMapping,
|
|
2718
|
-
warnIfProjectDiscoveryPartial,
|
|
2719
2668
|
abortIfCancelled,
|
|
2720
|
-
|
|
2669
|
+
workflow_init_default,
|
|
2721
2670
|
resolveStatusField,
|
|
2722
2671
|
buildAutomaticStateMappings,
|
|
2723
2672
|
resolvePriorityField,
|
|
2724
2673
|
promptStateMappings,
|
|
2725
2674
|
planWorkflowArtifacts,
|
|
2726
2675
|
writeWorkflowPlan,
|
|
2727
|
-
planEcosystem,
|
|
2728
2676
|
writeEcosystem,
|
|
2729
|
-
renderDryRunPreview
|
|
2730
|
-
buildDryRunJsonResult,
|
|
2731
|
-
writeConfig,
|
|
2732
|
-
generateProjectId
|
|
2677
|
+
renderDryRunPreview
|
|
2733
2678
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
REPO_RUNTIME_DIR
|
|
4
|
+
} from "./chunk-WOVNN5NW.js";
|
|
2
5
|
|
|
3
6
|
// src/orchestrator-runtime.ts
|
|
4
7
|
import { resolve } from "path";
|
|
@@ -6,7 +9,7 @@ function resolveRuntimeRoot(configDir) {
|
|
|
6
9
|
return resolve(configDir);
|
|
7
10
|
}
|
|
8
11
|
function resolveRepoRuntimeRoot(repoDir = process.cwd()) {
|
|
9
|
-
return resolve(repoDir,
|
|
12
|
+
return resolve(repoDir, REPO_RUNTIME_DIR);
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
export {
|