symphony-orchestrator 0.2.5 → 0.2.7

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 CHANGED
@@ -56,6 +56,13 @@ Edit `.symphony/settings.json` to choose an Issue Tracker, set tracker-specific
56
56
  status states, and set runtime commands. Runtime Settings reference secrets by environment variable
57
57
  name; secret values belong only in the Local Environment.
58
58
 
59
+ When `.symphony/settings.json` is missing, Bootstrap seeds it with normal Runtime Settings from a
60
+ local, allowlisted Agent Harness detection pass. The output names a selected Agent Harness when one is
61
+ usable, reports when no supported usable Agent Harness was found, or says that
62
+ existing Runtime Settings are preserved on repeated Bootstrap. Existing settings are preserved without
63
+ regeneration. This adaptive missing-settings Bootstrap is onboarding guidance only: runtime readiness
64
+ remains the dispatch authority before any agent work starts.
65
+
59
66
  ### Default Terminal Console
60
67
 
61
68
  Run `symphony` from the Workspace Repository root to start the default read-first Terminal Console.
@@ -65,11 +72,14 @@ and Task Branch context.
65
72
  Compozy PRD Run progress appears when Compozy tracking is selected.
66
73
 
67
74
  The Terminal Console is safe to keep open while Symphony runs. Its MVP safe local aids are limited to
68
- refreshing the latest in-memory Runtime State snapshot, navigating and filtering tabs, showing the
69
- Web Dashboard handoff command, and inspecting validated local paths such as the Workspace Repository
70
- or Runtime Home. These aids do not retry tasks, pause or resume dispatch, update tracker status, merge
71
- or push Task Branches, open pull requests, change Runtime Contract files, or otherwise mutate task
72
- lifecycle state.
75
+ refreshing the latest in-memory Runtime State snapshot, navigating and filtering tabs, opening focused Terminal Console settings with `s`, starting or reusing the loopback Web Dashboard with `w`, and inspecting validated local paths such as the Workspace Repository or Runtime Home.
76
+
77
+ The `s` settings surface persists Terminal Console theme in ignored Runtime Home state and persists the
78
+ Web Dashboard port by updating only Runtime Settings `server.port`. It is not a general Runtime
79
+ Settings editor and does not edit `server.host`, tracker, Git, agent, Harness, Sandbox, queue, or
80
+ lifecycle settings. The `w` action starts or reuses a compatible loopback Web Dashboard for the current
81
+ Workspace Repository and Runtime Home, then shows the dashboard URL. If the configured port is occupied
82
+ by an incompatible listener, Symphony reports a conflict instead of attaching to it. Settings and `w` do not retry tasks, pause or resume dispatch, update tracker status, merge or push Task Branches, open pull requests, or otherwise mutate task lifecycle state.
73
83
 
74
84
  Use Web Dashboard mode when browser-level inspection is more useful:
75
85
 
@@ -78,7 +88,9 @@ symphony --web --port 8080
78
88
  ```
79
89
 
80
90
  The Web Dashboard keeps using the Live Dashboard Connection as a Runtime State stream. It is not a
81
- Terminal Console command channel.
91
+ Terminal Console command channel. Terminal Console V1 dashboard controls are loopback-only; non-loopback
92
+ Web Dashboard access remains an explicit Runtime Settings choice and continues to require the
93
+ server-generated local dashboard auth token for Runtime State HTTP and Live Dashboard Connection access.
82
94
 
83
95
  For a non-interactive check, use `symphony --once`; it prints terminal output and exits without
84
96
  starting the foreground Terminal Console loop.
@@ -261,6 +273,22 @@ reasoning, and timeout fields for planner, engineer, or reviewer work:
261
273
  "command": ""
262
274
  }
263
275
  },
276
+ "cursor": {
277
+ "kind": "cursor",
278
+ "command": "cursor-agent -p --model <model> --output-format stream-json",
279
+ "loop": {
280
+ "enabled": false,
281
+ "command": ""
282
+ }
283
+ },
284
+ "cursor-force": {
285
+ "kind": "cursor",
286
+ "command": "cursor-agent -p --force --model <model> --output-format stream-json",
287
+ "loop": {
288
+ "enabled": false,
289
+ "command": ""
290
+ }
291
+ },
264
292
  "pi": {
265
293
  "kind": "pi",
266
294
  "command": "pi --model <model> --thinking <reasoning> --print --no-session",
@@ -308,12 +336,26 @@ reasoning, and timeout fields for planner, engineer, or reviewer work:
308
336
  }
309
337
  ```
310
338
 
311
- PI and Claude are not prerequisites for Codex-only dispatch. Symphony validates install and
339
+ PI, Claude, and Cursor are not prerequisites for Codex-only dispatch. Symphony validates install and
312
340
  authentication readiness only for Harnesses selected by enabled Stage Agent routes. A selected PI
313
341
  Harness requires the `pi` executable on `PATH` and provider authentication for the configured model. A
314
342
  selected Claude Harness requires the `claude` executable and Claude Code authentication, such as
315
- `ANTHROPIC_API_KEY` or Claude's configured login state. Runtime Settings must reference only
316
- environment variable names, never secret values.
343
+ `ANTHROPIC_API_KEY` or Claude's configured login state. A selected Cursor Harness requires the
344
+ `cursor-agent` executable and a successful `cursor-agent status` check, using either browser login or
345
+ `CURSOR_API_KEY`. Use the non-`--force` Cursor Harness for review-first operation; select the
346
+ `cursor-force` Harness only when the `Workspace Repository` operator intentionally wants Cursor to
347
+ write directly during that role. Runtime Settings must reference only environment variable names,
348
+ never secret values.
349
+
350
+ To assign Cursor to any Logical Agent, set `agents.<name>.harness` to `cursor` or `cursor-force`.
351
+ Keep `stageAgents.stages[]` routing by Logical Agent name rather than placing provider fields on the
352
+ stage itself.
353
+
354
+ Generated first-run Runtime Settings keep all supported Harness definitions available for editing. When
355
+ Bootstrap detects a usable supported Harness, the default Logical Agents route to the selected Harness;
356
+ when no Harness is usable, the default Logical Agent routes remain `codex`, `claude`, and `pi` so the
357
+ next manual edit is explicit. Repeated Bootstrap preserves existing Runtime Contract files and does not
358
+ reinterpret, regenerate, or rewrite Harness settings.
317
359
 
318
360
  Legacy settings that place Harness definitions under `agents.*`, such as `agents.pi.kind`, are
319
361
  migration input. When the new Runtime Settings shape is in use, Symphony reports a blocking Readiness
@@ -324,6 +366,44 @@ definitions. Stage-level `stageAgents.stages[].harness` is also legacy input; mo
324
366
  If setup is incomplete, the Terminal Console still starts and prints Readiness Gaps with remediation
325
367
  steps. Dispatch remains disabled until those gaps are resolved.
326
368
 
369
+ ### Optional Docker Sandbox
370
+
371
+ Sandboxing is a repository-level Runtime Settings boundary for Workspace Repositories that should run
372
+ agent work through Docker instead of direct host Agent Harness execution. It is optional and disabled
373
+ by default. Docker is the only supported sandbox type in V1:
374
+
375
+ ```json
376
+ {
377
+ "sandbox": {
378
+ "enabled": false,
379
+ "type": "docker",
380
+ "image": "ghcr.io/your-org/symphony-agent:latest",
381
+ "bootstrapCommands": [],
382
+ "persistent": true,
383
+ "networkEnabled": false,
384
+ "cpuLimit": 2,
385
+ "memoryMb": 4096
386
+ }
387
+ }
388
+ ```
389
+
390
+ Set `sandbox.enabled` to `true` only after replacing `sandbox.image` with the Docker image for the
391
+ Workspace Repository. When sandboxing is enabled, Symphony treats the Sandbox as required for agent
392
+ execution in that repository. Missing required settings, unsupported `sandbox.type` values, Docker
393
+ availability problems, or unhealthy sandbox state are Readiness Gaps and block dispatch; Symphony does
394
+ not silently fall back to host execution.
395
+
396
+ `sandbox.bootstrapCommands` is a list of non-empty shell commands that run only when Symphony creates
397
+ or recreates the Agent Worktree-scoped Docker container. V1 requires `sandbox.persistent: true` so
398
+ restarts of the same work item can reuse the named container without sharing it with concurrent Agent
399
+ Worktrees. `sandbox.networkEnabled` makes network access explicit, and `sandbox.cpuLimit` /
400
+ `sandbox.memoryMb` must be positive integers.
401
+
402
+ Runtime State snapshots include the running-work fields `sandbox_enabled`, `sandbox_provider`, and
403
+ `sandbox_reuse_outcome`. The reuse outcome is one of `created`, `reused`, or `recreated`; these
404
+ fields are the V1 visibility surface for confirming whether a sandboxed run used a fresh, warm, or
405
+ refreshed container.
406
+
327
407
  For the GitHub Tracker, readiness includes the configured owner, Workspace Repository name, GitHub
328
408
  Project number, status field, and token environment variable. For Local Issue Tracker runs,
329
409
  GitHub owner, repo, Project, and token settings are not required. The local tracker readiness checks
@@ -473,8 +553,8 @@ from the same Compozy PRD Run when those files exist.
473
553
  Set `goal.enabled` to `true` on a specific stage to allow Stage Goal Handoff for that stage only.
474
554
  The selected Harness decides whether a loop command is actually sent. The Bootstrap default Codex
475
555
  Harness has `loop.enabled: true` and `loop.command: "/goal"`, so Codex receives `/goal` with
476
- deterministic Stage Goal Context before the normal Agent Prompt. The Bootstrap default Claude and PI
477
- Harnesses have loop disabled, so those Harnesses run the normal prompt even when a stage has
556
+ deterministic Stage Goal Context before the normal Agent Prompt. The Bootstrap default Claude, Cursor,
557
+ and PI Harnesses have loop disabled, so those Harnesses run the normal prompt even when a stage has
478
558
  `goal.enabled: true`. Stage Goal Context includes issue identifier, title, description, comments, URL,
479
559
  current tracker status, labels, priority when present, blocker references when present,
480
560
  attempt, and stage agent name. It omits issue creation and update timestamps.
@@ -490,6 +570,71 @@ goals = true
490
570
  If a selected loop-enabled Codex Harness cannot accept the configured loop command, Symphony reports a
491
571
  Readiness Gap. Goal Usage reported by Codex is stored in Runtime State for running, retrying, and
492
572
  attention-needed task details when available; missing or unparseable Goal Usage does not fail a task.
573
+ If a selected loop-enabled Cursor Harness cannot accept the configured loop command from standard
574
+ input, Symphony reports a Cursor loop Readiness Gap. Cursor `stream-json` activity updates the same
575
+ running-task Runtime State fields used by other Harnesses, while raw stdout and stderr logs remain
576
+ available as diagnostics.
577
+
578
+ Goal Loop is separate from Stage Goal Handoff. Stage Goal Handoff is launch-time prompt handoff;
579
+ Goal Loop is Runtime-owned Stage Agent behavior that can stop as Goal met, Needs attention, or
580
+ Budget exhausted. Goal met requires deterministic evidence, so Goal Usage, agent exit `0`, changed
581
+ files, or model confidence alone does not count as completion evidence.
582
+
583
+ Enable Goal Loop per stage with `goalLoop`. Bootstrap does not add Goal Loop defaults; omitting the
584
+ block keeps existing stage behavior unchanged. The `goalLoop.evidence` block configures the Goal
585
+ Loop Evidence Command. The evidence command is an argv array, runs from the configured working
586
+ directory, receives the same structured input on stdin and through the Context Command temp-file path
587
+ convention, and should print a concise, secret-free evidence summary:
588
+
589
+ ```json
590
+ {
591
+ "stageAgents": {
592
+ "enabled": true,
593
+ "root": ".symphony/agents",
594
+ "stages": [
595
+ {
596
+ "states": ["Todo", "To-Do", "In progress", "In Progress"],
597
+ "agent": "engineer",
598
+ "successStatus": "In review",
599
+ "retryStatus": "To-Do",
600
+ "goalLoop": {
601
+ "enabled": true,
602
+ "evidence": {
603
+ "command": ["pnpm", "test"],
604
+ "cwd": "agentWorktree",
605
+ "timeoutMs": 120000,
606
+ "maxOutputBytes": 8192
607
+ },
608
+ "budget": {
609
+ "maxTurns": 4,
610
+ "maxRuntimeMs": 3600000,
611
+ "maxTokens": 200000
612
+ }
613
+ }
614
+ }
615
+ ]
616
+ }
617
+ }
618
+ ```
619
+
620
+ The evidence command contract is intentionally narrow. A zero exit code with bounded stdout is
621
+ successful deterministic evidence. Missing commands, timeouts, non-zero exits, invalid output, or
622
+ missing deterministic evidence retry the same task with missing-evidence guidance while the
623
+ configured budget allows another attempt; once the loop cannot continue, the stop outcome is Needs
624
+ attention or Budget exhausted instead of Goal met.
625
+
626
+ Runtime State exposes Goal Loop State as top-level `goal_loops[]` entries with `issue_id`,
627
+ `issue_identifier`, `run_id`, `goal`, `state`, `stage_agent`, `harness_name`, `harness_kind`,
628
+ `attempt_count`, `budget`, `latest_evidence`, `stop_outcome`, `stop_reason`, `next_action`,
629
+ `diagnostics_path`, and `updated_at`. The Goal Loop Stop Outcome is `goal_met`, `needs_attention`, or
630
+ `budget_exhausted`. The Terminal Console and Web Dashboard read that same Runtime State projection
631
+ near Goal Usage and Context Status, including stopped Goal met, Needs attention, and Budget
632
+ exhausted outcomes.
633
+
634
+ Goal Loop does not own delivery authority. Stage Commit, Stage Push, Task Branch Integration, merge,
635
+ pull request creation, auto-merge, and tracker status transitions stay governed by the existing
636
+ Runtime Contract and run only through the existing completion and delivery lifecycle after Goal met
637
+ evidence succeeds.
493
638
 
494
639
  Stage commits run after an agent exits successfully and before Symphony moves the issue to the
495
640
  stage's `successStatus`. Set `commit.enabled` per stage to control which transitions create commits;