@gh-symphony/cli 0.1.4 → 0.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/README.md CHANGED
@@ -107,6 +107,25 @@ You can further customize the agent's behavior by editing `WORKFLOW.md` — this
107
107
 
108
108
  > Currently supported runtimes: **Codex**, **Claude Code**
109
109
 
110
+ ### Linear Tracker Repositories
111
+
112
+ For Linear, configure the tracker in `WORKFLOW.md` and initialize the repository runtime from the target GitHub repository:
113
+
114
+ ```yaml
115
+ tracker:
116
+ kind: linear
117
+ api_key: $LINEAR_API_KEY
118
+ project_slug: symphony-0c79b11b75ea
119
+ ```
120
+
121
+ `gh-symphony repo init` validates `tracker.project_slug` and resolves `tracker.api_key`, so `LINEAR_API_KEY` must be set before initialization. Linear aliases such as `tracker.project_id`, `projectId`, `project_id`, and `teamId` are rejected, and `.gh-symphony/config.json` is not a Linear source of truth.
122
+
123
+ Linear runs are polling-only. There is no webhook setup command. Put state transition, workpad comment, and PR handoff policy in `WORKFLOW.md`; see `docs/examples/linear-WORKFLOW.md` in the repository for a complete example. Preview a Linear issue prompt with:
124
+
125
+ ```bash
126
+ gh-symphony workflow preview ENG-123
127
+ ```
128
+
110
129
  ### Repository `.env` Mapping
111
130
 
112
131
  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`.
@@ -10,7 +10,7 @@ import {
10
10
  resolveGitHubGraphQLToken,
11
11
  shouldReuseAgentCredentialCache,
12
12
  writeAgentCredentialCache
13
- } from "./chunk-EWTMSDCE.js";
13
+ } from "./chunk-Q3UEPUE3.js";
14
14
 
15
15
  // ../runtime-codex/src/runtime.ts
16
16
  import { spawn } from "child_process";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-6I753NYO.js";
5
5
  import {
6
6
  parseWorkflowMarkdown
7
- } from "./chunk-EWTMSDCE.js";
7
+ } from "./chunk-Q3UEPUE3.js";
8
8
  import {
9
9
  saveGlobalConfig,
10
10
  saveProjectConfig
@@ -58,6 +58,7 @@ async function initRepoRuntime(flags) {
58
58
  await migrateLegacyRuntime(runtimeRoot);
59
59
  const workflowPath = resolve(repoDir, flags.workflowFile ?? "WORKFLOW.md");
60
60
  const workflow = parseWorkflowMarkdown(await readFile(workflowPath, "utf8"));
61
+ validateRepoInitWorkflow(workflow);
61
62
  const repository = resolveRepository(repoDir);
62
63
  const trackerAdapter = workflow.tracker.kind ?? "github-project";
63
64
  const trackerBindingId = workflow.tracker.projectId ?? workflow.tracker.projectSlug ?? "";
@@ -112,6 +113,16 @@ async function initRepoRuntime(flags) {
112
113
  repository
113
114
  };
114
115
  }
116
+ function validateRepoInitWorkflow(workflow) {
117
+ if (workflow.tracker.kind !== "linear") {
118
+ return;
119
+ }
120
+ if (!workflow.tracker.apiKey?.trim()) {
121
+ throw new Error(
122
+ 'Linear tracker repo init requires WORKFLOW.md field "tracker.api_key" to reference a resolvable environment variable such as "$LINEAR_API_KEY".'
123
+ );
124
+ }
125
+ }
115
126
  async function migrateLegacyRuntime(runtimeRoot) {
116
127
  const projectsDir = join(runtimeRoot, "projects");
117
128
  const projectIds = await readDirectoryNames(projectsDir);