@glrs-dev/cli 0.1.0 → 0.1.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @glrs-dev/cli
2
2
 
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`050f4b9`](https://github.com/iceglober/glrs/commit/050f4b9bf2304dd5fb5031c38e7fe247b68ead07) Thanks [@iceglober](https://github.com/iceglober)! - **Rename `@glrs-dev/harness-opencode` → `@glrs-dev/harness-plugin-opencode` and republish.**
8
+
9
+ ## Why
10
+
11
+ OpenCode resolves plugins by npm-installing them into `~/.cache/opencode/packages/<plugin>@<version>/` at plugin-load time. The previous plan — marking `@glrs-dev/harness-opencode` as `private: true` and vendoring it only into `@glrs-dev/cli` — broke OpenCode's plugin loader because the package wasn't published on npm, causing `ETARGET: No matching version found for @glrs-dev/harness-opencode@1.0.0`.
12
+
13
+ The fix: publish the plugin under a new name (`@glrs-dev/harness-plugin-opencode`) so OpenCode can resolve it normally. The old name stays deprecated at its last published version (`0.16.2`).
14
+
15
+ ## What changed
16
+
17
+ - `packages/harness-opencode/package.json`: renamed from `@glrs-dev/harness-opencode` to `@glrs-dev/harness-plugin-opencode`, `private: true` removed, `publishConfig.access: public` + `provenance: true` added, version reset to `0.1.0` (fresh name on npm).
18
+ - The `install` / `uninstall` / `doctor` flows now write the new name to `opencode.json`'s plugin array.
19
+ - `@glrs-dev/cli` still bundles a vendored copy of the plugin for standalone subprocess dispatch (`glrs oc`), but the npm-resolved copy is what OpenCode's plugin runtime loads.
20
+ - Bin names unchanged — `harness-opencode` and `glrs-oc` still work.
21
+
22
+ ## Migration for existing users
23
+
24
+ Re-run `glrs oc install` to update your `opencode.json` plugin array from `@glrs-dev/harness-opencode` to `@glrs-dev/harness-plugin-opencode`. The old entry will be replaced; no data loss.
25
+
3
26
  ## 0.1.0
4
27
 
5
28
  ### Minor Changes
package/README.md CHANGED
@@ -21,7 +21,7 @@ The `harness-opencode` bin remains available directly for power users who prefer
21
21
 
22
22
  The `glrs` binary has two subcommands:
23
23
 
24
- - **`glrs oc <args>`** — dispatches to [`@glrs-dev/harness-opencode`](../harness-opencode/) (bundled as a dependency). Resolves the bin via `require.resolve(<package>/package.json)` → reads the `bin` field → spawns with argv forwarded.
24
+ - **`glrs oc <args>`** — dispatches to [`@glrs-dev/harness-plugin-opencode`](../harness-opencode/) (bundled as a dependency). Resolves the bin via `require.resolve(<package>/package.json)` → reads the `bin` field → spawns with argv forwarded.
25
25
  - **`glrs wt <args>`** — worktree management, handled natively. Commands: `new`, `list`, `switch`, `delete`, `cleanup`. Worktrees are stored in `~/.glorious/worktrees/<repo>/<name>/`.
26
26
 
27
27
  ## Philosophy
@@ -23,7 +23,7 @@ A good pilot plan has these properties:
23
23
 
24
24
  - The **`pilot-planning` skill** (auto-invoked) carries the full methodology: first-principles questions to ask, decomposition rules, verify-design heuristics, scope-tightness checks, DAG-shape patterns, milestone/self-review checklists. **Read the skill** before you start asking the user questions.
25
25
  - The harness's existing read-only tools (Serena, ast_grep, todo_scan, comment_check, git read commands, linear, webfetch) are available for codebase research.
26
- - The **`bunx @glrs-dev/harness-opencode pilot validate <plan>`** subcommand validates a draft plan: schema, DAG, glob conflicts. Run it before declaring "done" — fix every error it reports.
26
+ - The **`bunx @glrs-dev/harness-plugin-opencode pilot validate <plan>`** subcommand validates a draft plan: schema, DAG, glob conflicts. Run it before declaring "done" — fix every error it reports.
27
27
 
28
28
  # What you cannot do
29
29
 
@@ -63,7 +63,7 @@ The `pilot-planning` skill carries the eight rules. Apply them:
63
63
 
64
64
  ## 4. Write the YAML
65
65
 
66
- Save the plan to the path returned by `bunx @glrs-dev/harness-opencode pilot plan-dir` (yes, this is a different subcommand than the markdown-plan dir). The slug is derived deterministically from the user's input (Linear ID → lowercased, free-form → kebab-case).
66
+ Save the plan to the path returned by `bunx @glrs-dev/harness-plugin-opencode pilot plan-dir` (yes, this is a different subcommand than the markdown-plan dir). The slug is derived deterministically from the user's input (Linear ID → lowercased, free-form → kebab-case).
67
67
 
68
68
  Required schema (see `src/pilot/plan/schema.ts` for the canonical Zod definition):
69
69
 
@@ -109,7 +109,7 @@ tasks:
109
109
  Run:
110
110
 
111
111
  ```
112
- bunx @glrs-dev/harness-opencode pilot validate <plan-path>
112
+ bunx @glrs-dev/harness-plugin-opencode pilot validate <plan-path>
113
113
  ```
114
114
 
115
115
  Fix every error it reports. If it reports glob-conflict warnings, decide: should those tasks be merged, sequenced (add `depends_on`), or accepted as-is (touch sets that overlap but that the user is OK with running serially)?
@@ -120,7 +120,7 @@ Print to the user:
120
120
 
121
121
  ```
122
122
  Plan saved to <path>. Next:
123
- bunx @glrs-dev/harness-opencode pilot build
123
+ bunx @glrs-dev/harness-plugin-opencode pilot build
124
124
  ```
125
125
 
126
126
  Don't elaborate. Don't summarize the plan in chat. The user can read it.
@@ -17,7 +17,7 @@ Read the plan at the path provided. Validate against six criteria:
17
17
  3. **Context** — Is there enough information for an executor to proceed without more than ~10% guesswork? Are file paths real (use `read`/`grep` to spot-check)?
18
18
  4. **Big picture** — Is the `## Goal` clear? Is `## Out of scope` explicit?
19
19
  5. **Scope compliance** — If `## Goal` cites a ticket ID, the plan's `## File-level changes` must not introduce files or subsystems outside the ticket's Changes / Definition of Done section, unless `## Out of scope` (or an explicit sentence in `## Goal`) justifies each expansion. Invented scope is a REJECT.
20
- 6. **Plan-state fence integrity** — For any NEW plan (authored after the fence was introduced), `## Acceptance criteria` MUST contain a ```plan-state fenced block. Every item in the block must have all three of `intent:`, `tests:`, `verify:` populated. For each `tests:` entry, the referenced test file must either (a) exist in the repo (spot-check via `read` or `ls`), or (b) have its path listed in `## File-level changes`. Validate structural correctness by running `bunx @glrs-dev/harness-opencode plan-check --check <plan-path>` — non-zero exit → REJECT. Legacy plans (no fence) pass criterion 6 automatically.
20
+ 6. **Plan-state fence integrity** — For any NEW plan (authored after the fence was introduced), `## Acceptance criteria` MUST contain a ```plan-state fenced block. Every item in the block must have all three of `intent:`, `tests:`, `verify:` populated. For each `tests:` entry, the referenced test file must either (a) exist in the repo (spot-check via `read` or `ls`), or (b) have its path listed in `## File-level changes`. Validate structural correctness by running `bunx @glrs-dev/harness-plugin-opencode plan-check --check <plan-path>` — non-zero exit → REJECT. Legacy plans (no fence) pass criterion 6 automatically.
21
21
 
22
22
  Output exactly one of these two formats. Nothing else.
23
23
 
@@ -1,4 +1,4 @@
1
- You are the Plan agent. Your only output is a written, reviewable plan inside the repo-shared plan directory. Resolve that directory at write-time by running `bunx @glrs-dev/harness-opencode plan-dir` (one bash call; the CLI prints the absolute plan directory to stdout and handles creation + one-time migration of any legacy per-worktree plan files). Write your plan as `<plan-dir>/<slug>.md`. You do not write code. You do not modify any file outside that plan directory.
1
+ You are the Plan agent. Your only output is a written, reviewable plan inside the repo-shared plan directory. Resolve that directory at write-time by running `bunx @glrs-dev/harness-plugin-opencode plan-dir` (one bash call; the CLI prints the absolute plan directory to stdout and handles creation + one-time migration of any legacy per-worktree plan files). Write your plan as `<plan-dir>/<slug>.md`. You do not write code. You do not modify any file outside that plan directory.
2
2
 
3
3
  You can be invoked directly by the user (Tab / `@plan`) or delegated to by PRIME via the `task` tool. Either way, your output contract is identical: a written plan in the repo-shared plan directory. When PRIME delegates, the prompt will already include interview answers, a grounding summary, and often a list of real files/symbols to touch. Trust that brief — do not re-interview the user on points already answered, and do not re-ground from scratch on files the PRIME has already mapped. You're still responsible for gap analysis, the plan draft, and the `@plan-reviewer` loop; you just skip redundant work the PRIME has already done.
4
4
 
@@ -45,7 +45,7 @@ Also run `comment_check` on the directories the plan will touch. Any `@TODO`/`@F
45
45
  Determine a slug from the task (kebab-case, ≤ 5 words). Resolve the plan directory with `bash` by running:
46
46
 
47
47
  ```bash
48
- PLAN_DIR="$(bunx @glrs-dev/harness-opencode plan-dir)"
48
+ PLAN_DIR="$(bunx @glrs-dev/harness-plugin-opencode plan-dir)"
49
49
  ```
50
50
 
51
51
  Then write `$PLAN_DIR/<slug>.md` with this exact structure:
@@ -115,7 +115,7 @@ For each file:
115
115
  - Legacy plans without a fence (old `- [ ]` checkboxes directly under
116
116
  `## Acceptance criteria`) still execute and pass review — the fence
117
117
  is required only for NEW plans.
118
- - The plan-check tool (`bunx @glrs-dev/harness-opencode plan-check`) parses the fence
118
+ - The plan-check tool (`bunx @glrs-dev/harness-plugin-opencode plan-check`) parses the fence
119
119
  and can emit verify commands for execution (`--run`) or validate
120
120
  structure (`--check`).
121
121
 
@@ -138,7 +138,7 @@ Stop. Do not begin implementation.
138
138
 
139
139
  # Hard rules
140
140
 
141
- - You write only to the plan directory resolved via `bunx @glrs-dev/harness-opencode plan-dir`. Do not edit or create any other file under any circumstance.
142
- - The ONLY bash command you may run is `bunx @glrs-dev/harness-opencode plan-dir` (no other flags needed; `plan-check` is invoked by `qa-reviewer`, not by you). Your permission block denies everything else.
141
+ - You write only to the plan directory resolved via `bunx @glrs-dev/harness-plugin-opencode plan-dir`. Do not edit or create any other file under any circumstance.
142
+ - The ONLY bash command you may run is `bunx @glrs-dev/harness-plugin-opencode plan-dir` (no other flags needed; `plan-check` is invoked by `qa-reviewer`, not by you). Your permission block denies everything else.
143
143
  - You never invent file paths or symbol names. If you can't find something, say so in `## Open questions`.
144
144
  - A plan that hasn't passed `@plan-reviewer` is not finished.
@@ -86,7 +86,7 @@ If the TUI fails to dispatch a plugin-registered slash command, the raw text flo
86
86
  **Action.** When a fallback fires:
87
87
 
88
88
  1. Announce in plain chat (one line, no `question` tool): `→ Slash command /<cmd> fallback (TUI dispatch missed — executing inline)`.
89
- 2. Read the template file from the bundled plugin cache path: `~/.cache/opencode/packages/@glrs-dev/harness-opencode@latest/node_modules/@glrs-dev/harness-opencode/dist/commands/prompts/<cmd>.md`.
89
+ 2. Read the template file from the bundled plugin cache path: `~/.cache/opencode/packages/@glrs-dev/harness-plugin-opencode@latest/node_modules/@glrs-dev/harness-plugin-opencode/dist/commands/prompts/<cmd>.md`.
90
90
  3. Strip YAML frontmatter if present (delimited by an opening `---` line through the next `---` line). Execute the body only.
91
91
  4. Substitute `$ARGUMENTS` with everything after `/<cmd> ` on the first line — whitespace-trimmed, empty string if no args.
92
92
  5. Execute the resulting instructions verbatim as this turn's directive.
@@ -110,7 +110,7 @@ Before Phase 1, run this probe inline (no subagent) — sessions typically start
110
110
  1. `pwd` — confirm working directory.
111
111
  2. `git status --short` — see uncommitted work.
112
112
  3. `git log --oneline -5` — recent history.
113
- 4. `PLAN_DIR="$(bunx @glrs-dev/harness-opencode plan-dir 2>/dev/null)" && ls "$PLAN_DIR" 2>/dev/null | tail -5` — plans for this repo (resolved from `~/.glorious/opencode/<repo>/plans/`; falls back silently if the CLI or repo isn't available).
113
+ 4. `PLAN_DIR="$(bunx @glrs-dev/harness-plugin-opencode plan-dir 2>/dev/null)" && ls "$PLAN_DIR" 2>/dev/null | tail -5` — plans for this repo (resolved from `~/.glorious/opencode/<repo>/plans/`; falls back silently if the CLI or repo isn't available).
114
114
 
115
115
  For each plan found, read it and count unchecked acceptance items. Classify as **stale** (ignore) only if `git merge-base --is-ancestor HEAD origin/main` (fallback `origin/master`) exits 0 — meaning this worktree's work is already landed. If classification fails (no origin fetched, detached HEAD, etc.), treat as active — over-surface is safer than silently dropping.
116
116
 
@@ -363,7 +363,7 @@ The PRIME's context window is expensive (Opus). Protect it by delegating anythin
363
363
 
364
364
  # Subagent reference (recap)
365
365
 
366
- - `@plan` — writes the plan under the repo-shared plan directory (resolves via `bunx @glrs-dev/harness-opencode plan-dir`; absolute path returned) and runs its own gap-analysis + adversarial-review loop. PRIME delegates Phase 2 plan authoring here.
366
+ - `@plan` — writes the plan under the repo-shared plan directory (resolves via `bunx @glrs-dev/harness-plugin-opencode plan-dir`; absolute path returned) and runs its own gap-analysis + adversarial-review loop. PRIME delegates Phase 2 plan authoring here.
367
367
  - `@build` — executes a written plan file-by-file. Runs per-file lint/tests inline, checks acceptance boxes, commits locally. Returns a structured payload with commit SHAs, plan mutations, and any STOP conditions. PRIME delegates Phase 3 execution here.
368
368
  - `@research` — multi-round research orchestrator for complex investigations that would otherwise pollute your context with 4-6 parallel explorations. Delegate when the user asks to investigate / deep-dive / understand a topic that needs codebase + external-web context, or multi-workstream planning. Returns a synthesized report; pass it to the user (or feed into `@plan` as grounding if it precedes a plan authoring step).
369
369
  - `@code-searcher` — fast codebase grep + structural search, returns paths and short snippets
@@ -31,7 +31,7 @@ If any of those phrases is missing from the delegation prompt, OR if the diff ha
31
31
  3. **Plan-drift check (AUTO-FAIL).** For each modified file in the diff, verify it appears in the plan's `## File-level changes`. A modified file NOT listed in `## File-level changes` is AUTO-FAIL regardless of how "implicit" the coverage seems — the plan should have listed it. Report as `Plan drift: <path> modified but not in ## File-level changes`.
32
32
  4. **Scope-creep check.** For each UNTRACKED file (from `git status`) that is NOT in `## File-level changes`, run `git log --oneline -- <file>` to determine whether the file is pre-existing work or scope creep. Do NOT accept the PRIME's verbal "pre-existing" claim without this check. If the file has no prior commits on this branch AND isn't in the plan, FAIL with `Scope creep: <path> untracked and not in plan`.
33
33
  5. **Semantic verification.** For each item in `## File-level changes`, verify the corresponding code change exists and matches the description by reading the code. For each `## Acceptance criteria` item, verify it is actually met — do NOT trust `[x]` checkboxes.
34
- 6. **Plan-state verify commands (fenced plans only).** Run `bunx @glrs-dev/harness-opencode plan-check --run <plan-path>` to get the list of verify commands for pending items. Execute each one via `bash`. Any non-zero exit → FAIL with `Verify failed: <command> (exit N)`. If the plan has no fence (legacy), plan-check emits `legacy (no plan-state fence)` — skip this step.
34
+ 6. **Plan-state verify commands (fenced plans only).** Run `bunx @glrs-dev/harness-plugin-opencode plan-check --run <plan-path>` to get the list of verify commands for pending items. Execute each one via `bash`. Any non-zero exit → FAIL with `Verify failed: <command> (exit N)`. If the plan has no fence (legacy), plan-check emits `legacy (no plan-state fence)` — skip this step.
35
35
  7. **Conditional full-suite re-run (gated by trust-recent-green).** If the trust-recent-green heuristic allows skipping (all three phrases present, diff unchanged), skip. Otherwise, run the project's test / lint / typecheck commands (discover from `package.json` scripts / `Makefile` / `AGENTS.md`). Any failure → FAIL.
36
36
  8. **Scan for new tech debt.** Run `todo_scan` with `onlyChanged: true`. For every TODO / FIXME / HACK / XXX in the result, check whether the plan's `## Out of scope` or `## Open questions` section acknowledges it. Unacknowledged new debt → FAIL with the specific `file:line`.
37
37
  9. **AGENTS.md freshness (light check).** If the change shifts a convention documented in a local `AGENTS.md` in a touched directory, FAIL with `Update <path>/AGENTS.md to reflect <specific change>`. Do not fail on unrelated staleness.
@@ -19,7 +19,7 @@ You are distinct from `@qa-reviewer`. That variant trusts the PRIME's recent gre
19
19
  3. **Plan-drift check (AUTO-FAIL).** For each modified file in the diff, verify it appears in the plan's `## File-level changes`. A modified file NOT listed in `## File-level changes` is AUTO-FAIL regardless of how "implicit" the coverage seems — the plan should have listed it. Report as `Plan drift: <path> modified but not in ## File-level changes`.
20
20
  4. **Scope-creep check.** For each UNTRACKED file (from `git status`) that is NOT in `## File-level changes`, run `git log --oneline -- <file>` to determine whether the file is pre-existing work or scope creep. Do NOT accept the PRIME's verbal "pre-existing" claim without this check. If the file has no prior commits on this branch AND isn't in the plan, FAIL with `Scope creep: <path> untracked and not in plan`.
21
21
  5. **Semantic verification.** For each item in `## File-level changes`, verify the corresponding code change exists and matches the description. For each `## Acceptance criteria` item, verify it is actually met by reading the code — do NOT trust `[x]` checkboxes.
22
- 6. **Plan-state verify commands (fenced plans only).** Run `bunx @glrs-dev/harness-opencode plan-check --run <plan-path>` and execute each returned verify command via `bash`. Any non-zero exit → FAIL with `Verify failed: <command> (exit N)`. If the plan has no fence (legacy), skip.
22
+ 6. **Plan-state verify commands (fenced plans only).** Run `bunx @glrs-dev/harness-plugin-opencode plan-check --run <plan-path>` and execute each returned verify command via `bash`. Any non-zero exit → FAIL with `Verify failed: <command> (exit N)`. If the plan has no fence (legacy), skip.
23
23
  7. **Re-run the project's test command.** Unconditionally. Discover the invocation from `package.json` scripts / `Makefile` / `CONTRIBUTING.md` / `AGENTS.md` — typical forms: `pnpm test`, `npm test`, `bun test`, `cargo test`, `pytest`, `go test ./...`. Any failure → FAIL.
24
24
  8. **Re-run the project's lint command.** Unconditionally. E.g., `pnpm lint`, `npm run lint`, `ruff check`, `golangci-lint run`. Any failure → FAIL.
25
25
  9. **Re-run the project's typecheck / build command.** Unconditionally. E.g., `pnpm typecheck`, `tsc --noEmit`, `mypy`, `cargo check`. Any failure → FAIL.
@@ -5,7 +5,7 @@ import * as path from "path";
5
5
  import * as os from "os";
6
6
  import { fileURLToPath } from "url";
7
7
  import { execFile } from "child_process";
8
- var PACKAGE_NAME = "@glrs-dev/harness-opencode";
8
+ var PACKAGE_NAME = "@glrs-dev/harness-plugin-opencode";
9
9
  function getOpenCodeCachePackageDir() {
10
10
  const cacheHome = process.env["XDG_CACHE_HOME"] ?? path.join(os.homedir(), ".cache");
11
11
  return path.join(
@@ -3,7 +3,7 @@ import {
3
3
  inspectCachePin,
4
4
  readOurPackageVersion,
5
5
  refreshPluginCache
6
- } from "./chunk-UDB4NQ2R.js";
6
+ } from "./chunk-VJUETC6A.js";
7
7
 
8
8
  // src/cli/install.ts
9
9
  import * as fs3 from "fs";
@@ -181,7 +181,7 @@ import * as fs2 from "fs";
181
181
  import * as path2 from "path";
182
182
  import * as os from "os";
183
183
  import { select, checkbox, confirm } from "@inquirer/prompts";
184
- var PLUGIN_NAME = "@glrs-dev/harness-opencode";
184
+ var PLUGIN_NAME = "@glrs-dev/harness-plugin-opencode";
185
185
  function getOpencodeConfigPath() {
186
186
  const configHome = process.env["XDG_CONFIG_HOME"] ?? path2.join(os.homedir(), ".config");
187
187
  return path2.join(configHome, "opencode", "opencode.json");
@@ -257,7 +257,7 @@ async function requirePlugin() {
257
257
  );
258
258
  process.exit(1);
259
259
  }
260
- const { install: install2 } = await import("./install-GDCZ7VFK.js");
260
+ const { install: install2 } = await import("./install-4EYR56OR.js");
261
261
  await install2({ nonInteractive: true });
262
262
  }
263
263
 
@@ -361,7 +361,7 @@ async function fetchModelsDevProviders() {
361
361
  }
362
362
 
363
363
  // src/cli/install.ts
364
- var PLUGIN_NAME2 = "@glrs-dev/harness-opencode";
364
+ var PLUGIN_NAME2 = "@glrs-dev/harness-plugin-opencode";
365
365
  var c = {
366
366
  reset: "\x1B[0m",
367
367
  green: "\x1B[32m",
@@ -522,7 +522,7 @@ async function install(opts = {}) {
522
522
  const existingOpts = extractPluginOptions(existing);
523
523
  let hasModels = !!(existingOpts?.models ?? existing?.harness?.models);
524
524
  console.log(`
525
- ${c.bold}${c.blue}@glrs-dev/harness-opencode${c.reset} setup
525
+ ${c.bold}${c.blue}@glrs-dev/harness-plugin-opencode${c.reset} setup
526
526
  `);
527
527
  if (hasPlugin) {
528
528
  ok("Plugin already registered");
@@ -181,7 +181,7 @@ var CORE_BASH_ALLOW_LIST = {
181
181
  "prettier *": "allow",
182
182
  "biome *": "allow",
183
183
  // Our own CLI — the plan agent and qa-reviewer both call plan-check/plan-dir.
184
- "bunx @glrs-dev/harness-opencode *": "allow",
184
+ "bunx @glrs-dev/harness-plugin-opencode *": "allow",
185
185
  "glrs-oc *": "allow",
186
186
  // GitHub CLI — read-only gh calls are fine; destructive `gh pr merge`
187
187
  // is gated at the PRIME level by human intent (user runs /ship).
@@ -242,12 +242,12 @@ var PLAN_PERMISSIONS = {
242
242
  // subcommand (returns an absolute path derived from the worktree's
243
243
  // repo-folder key; see src/plan-paths.ts and src/cli.ts). The object-
244
244
  // form denies bash broadly and re-allows only `bunx
245
- // @glrs-dev/harness-opencode plan-dir[...]`. No other bash invocation
245
+ // @glrs-dev/harness-plugin-opencode plan-dir[...]`. No other bash invocation
246
246
  // is permitted, so the read-only-aside-from-plans invariant holds.
247
247
  bash: {
248
248
  "*": "deny",
249
- "bunx @glrs-dev/harness-opencode plan-dir": "allow",
250
- "bunx @glrs-dev/harness-opencode plan-dir *": "allow",
249
+ "bunx @glrs-dev/harness-plugin-opencode plan-dir": "allow",
250
+ "bunx @glrs-dev/harness-plugin-opencode plan-dir *": "allow",
251
251
  "glrs-oc plan-dir": "allow",
252
252
  "glrs-oc plan-dir *": "allow"
253
253
  },
@@ -495,12 +495,12 @@ var PILOT_PLANNER_PERMISSIONS = {
495
495
  "git branch *": "allow",
496
496
  "git rev-parse *": "allow",
497
497
  // Pilot CLI: validate, plan-dir for self-check + path resolution.
498
- "bunx @glrs-dev/harness-opencode pilot validate *": "allow",
499
- "bunx @glrs-dev/harness-opencode pilot validate": "allow",
500
- "bunx @glrs-dev/harness-opencode pilot plan-dir": "allow",
501
- "bunx @glrs-dev/harness-opencode pilot plan-dir *": "allow",
502
- "bunx @glrs-dev/harness-opencode plan-dir": "allow",
503
- "bunx @glrs-dev/harness-opencode plan-dir *": "allow",
498
+ "bunx @glrs-dev/harness-plugin-opencode pilot validate *": "allow",
499
+ "bunx @glrs-dev/harness-plugin-opencode pilot validate": "allow",
500
+ "bunx @glrs-dev/harness-plugin-opencode pilot plan-dir": "allow",
501
+ "bunx @glrs-dev/harness-plugin-opencode pilot plan-dir *": "allow",
502
+ "bunx @glrs-dev/harness-plugin-opencode plan-dir": "allow",
503
+ "bunx @glrs-dev/harness-plugin-opencode plan-dir *": "allow",
504
504
  "glrs-oc pilot validate *": "allow",
505
505
  "glrs-oc pilot validate": "allow",
506
506
  "glrs-oc pilot plan-dir": "allow",
@@ -576,7 +576,7 @@ function createAgents() {
576
576
  permission: PRIME_PERMISSIONS
577
577
  }),
578
578
  plan: agentFromPrompt(planPrompt, {
579
- description: "Interactive planner. Orchestrates gap analysis and adversarial review. Produces a written plan in the repo-shared plan directory (resolve via `bunx @glrs-dev/harness-opencode plan-dir`).",
579
+ description: "Interactive planner. Orchestrates gap analysis and adversarial review. Produces a written plan in the repo-shared plan directory (resolve via `bunx @glrs-dev/harness-plugin-opencode plan-dir`).",
580
580
  mode: "all",
581
581
  model: "anthropic/claude-opus-4-7",
582
582
  temperature: 0.3,
@@ -684,7 +684,7 @@ function validateModelOverride(id) {
684
684
  if (typeof id !== "string") return { valid: true };
685
685
  if (id.length === 0) return { valid: true };
686
686
  if (CATWALK_PROVIDER_PATTERN.test(id)) {
687
- const suggestion = LEGACY_TO_MODELS_DEV[id] ?? "run `bunx @glrs-dev/harness-opencode install` to pick a current preset";
687
+ const suggestion = LEGACY_TO_MODELS_DEV[id] ?? "run `bunx @glrs-dev/harness-plugin-opencode install` to pick a current preset";
688
688
  const reason = LEGACY_PRE_100_PATTERN.test(id) ? `"${id}" is a pre-PR-#100 model ID format that does not resolve in OpenCode. Bedrock IDs need the \`amazon-bedrock\` provider prefix (not \`bedrock\`); Vertex Claude IDs need the \`google-vertex-anthropic\` provider prefix (not \`vertex\` / \`vertexai\`).` : `"${id}" uses a provider prefix (\`${id.split("/")[0]}\`) that does not exist in OpenCode's runtime. AWS Bedrock's provider ID is \`amazon-bedrock\`; Vertex Claude's is \`google-vertex-anthropic\`.`;
689
689
  return { valid: false, reason, suggestion };
690
690
  }
@@ -692,7 +692,7 @@ function validateModelOverride(id) {
692
692
  }
693
693
  function formatModelOverrideWarning(id, source, suggestion) {
694
694
  const suggestionText = suggestion ? ` Suggested replacement: \`${suggestion}\`.` : "";
695
- return `[@glrs-dev/harness-opencode] Warning: invalid model override "${id}" (from ${source}).${suggestionText} Run \`bunx @glrs-dev/harness-opencode doctor\` for details.`;
695
+ return `[@glrs-dev/harness-plugin-opencode] Warning: invalid model override "${id}" (from ${source}).${suggestionText} Run \`bunx @glrs-dev/harness-plugin-opencode doctor\` for details.`;
696
696
  }
697
697
 
698
698
  export {
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  createAgents,
4
4
  validateModelOverride
5
- } from "./chunk-BDFZGIY7.js";
5
+ } from "./chunk-XCZ3NOXR.js";
6
6
  import {
7
7
  install,
8
8
  requirePlugin
9
- } from "./chunk-V3KJY6CN.js";
10
- import "./chunk-UDB4NQ2R.js";
9
+ } from "./chunk-VVMP6QWS.js";
10
+ import "./chunk-VJUETC6A.js";
11
11
 
12
12
  // src/cli.ts
13
13
  import {
@@ -27,7 +27,7 @@ import {
27
27
  import * as fs from "fs";
28
28
  import * as path from "path";
29
29
  import * as os from "os";
30
- var PLUGIN_NAME = "@glrs-dev/harness-opencode";
30
+ var PLUGIN_NAME = "@glrs-dev/harness-plugin-opencode";
31
31
  function getOpencodeConfigPath() {
32
32
  const configHome = process.env["XDG_CONFIG_HOME"] ?? path.join(os.homedir(), ".config");
33
33
  return path.join(configHome, "opencode", "opencode.json");
@@ -101,7 +101,7 @@ ${c2.blue}Uninstalling ${PLUGIN_NAME}${c2.reset}
101
101
  ok(`Removed "${PLUGIN_NAME}" from ${configPath}`);
102
102
  info(`Backup: ${bakPath}`);
103
103
  console.log(`
104
- To fully remove the package: bun remove @glrs-dev/harness-opencode
104
+ To fully remove the package: bun remove @glrs-dev/harness-plugin-opencode
105
105
  `);
106
106
  }
107
107
 
@@ -110,7 +110,7 @@ import * as fs2 from "fs";
110
110
  import * as path2 from "path";
111
111
  import * as os2 from "os";
112
112
  import { execSync } from "child_process";
113
- var PLUGIN_NAME2 = "@glrs-dev/harness-opencode";
113
+ var PLUGIN_NAME2 = "@glrs-dev/harness-plugin-opencode";
114
114
  function getOpencodeConfigPath2() {
115
115
  const configHome = process.env["XDG_CONFIG_HOME"] ?? path2.join(os2.homedir(), ".config");
116
116
  return path2.join(configHome, "opencode", "opencode.json");
@@ -1111,7 +1111,7 @@ async function runPlan(opts) {
1111
1111
  }
1112
1112
  process.stdout.write(
1113
1113
  `Plan ready at ${newest.path}
1114
- Build with: bunx @glrs-dev/harness-opencode pilot build
1114
+ Build with: bunx @glrs-dev/harness-plugin-opencode pilot build
1115
1115
  `
1116
1116
  );
1117
1117
  return 0;
@@ -2442,7 +2442,7 @@ function kickoffPrompt(task, ctx) {
2442
2442
  sections.push(
2443
2443
  `# Pilot task: ${task.id} \u2014 ${task.title}`,
2444
2444
  ``,
2445
- `You are running unattended as the **pilot-builder** agent under the pilot subsystem of \`@glrs-dev/harness-opencode\`. This is task **${task.id}** of the plan **"${ctx.planName}"**` + (ctx.milestone ? ` (milestone: **${ctx.milestone}**)` : "") + `.`,
2445
+ `You are running unattended as the **pilot-builder** agent under the pilot subsystem of \`@glrs-dev/harness-plugin-opencode\`. This is task **${task.id}** of the plan **"${ctx.planName}"**` + (ctx.milestone ? ` (milestone: **${ctx.milestone}**)` : "") + `.`,
2446
2446
  ``,
2447
2447
  `## Workspace`,
2448
2448
  ``,
@@ -3831,7 +3831,7 @@ function startStreamingLogger(args) {
3831
3831
  );
3832
3832
  if (id !== null) {
3833
3833
  writeRaw(
3834
- ` run \`bunx @glrs-dev/harness-opencode pilot logs ${id} --run ${runId}\` for full logs`
3834
+ ` run \`bunx @glrs-dev/harness-plugin-opencode pilot logs ${id} --run ${runId}\` for full logs`
3835
3835
  );
3836
3836
  }
3837
3837
  break;
@@ -3846,7 +3846,7 @@ function startStreamingLogger(args) {
3846
3846
  write(`task.stopped ${id ?? "?"} ${suffix}`);
3847
3847
  if (id !== null) {
3848
3848
  writeRaw(
3849
- ` run \`bunx @glrs-dev/harness-opencode pilot logs ${id} --run ${runId}\` for full logs`
3849
+ ` run \`bunx @glrs-dev/harness-plugin-opencode pilot logs ${id} --run ${runId}\` for full logs`
3850
3850
  );
3851
3851
  }
3852
3852
  break;
@@ -3974,8 +3974,8 @@ Failed tasks (${failed.length}):
3974
3974
  process.stdout.write(
3975
3975
  ` plan: ${planPath}
3976
3976
  run dir: ${runDir}
3977
- status: bunx @glrs-dev/harness-opencode pilot status --run ${runId}
3978
- logs: bunx @glrs-dev/harness-opencode pilot logs --run ${runId} <task-id>
3977
+ status: bunx @glrs-dev/harness-plugin-opencode pilot status --run ${runId}
3978
+ logs: bunx @glrs-dev/harness-plugin-opencode pilot logs --run ${runId} <task-id>
3979
3979
  `
3980
3980
  );
3981
3981
  }
@@ -4793,7 +4793,7 @@ import * as path12 from "path";
4793
4793
  import * as os5 from "os";
4794
4794
  import { spawn as spawn3 } from "child_process";
4795
4795
  import { fileURLToPath as fileURLToPath2 } from "url";
4796
- var PACKAGE_NAME = "@glrs-dev/harness-opencode";
4796
+ var PACKAGE_NAME = "@glrs-dev/harness-plugin-opencode";
4797
4797
  var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
4798
4798
  var c = {
4799
4799
  reset: "\x1B[0m",
@@ -4973,7 +4973,7 @@ Upgrade Node or run via a compatible Bun runtime. See the "engines" field in pac
4973
4973
  var VERSION = "0.1.0";
4974
4974
  var installCmd = command11({
4975
4975
  name: "install",
4976
- description: 'Add "@glrs-dev/harness-opencode" to your opencode.json plugin array.',
4976
+ description: 'Add "@glrs-dev/harness-plugin-opencode" to your opencode.json plugin array.',
4977
4977
  args: {
4978
4978
  dryRun: flag8({
4979
4979
  long: "dry-run",
@@ -4990,7 +4990,7 @@ var installCmd = command11({
4990
4990
  });
4991
4991
  var uninstallCmd = command11({
4992
4992
  name: "uninstall",
4993
- description: 'Remove "@glrs-dev/harness-opencode" from your opencode.json plugin array.',
4993
+ description: 'Remove "@glrs-dev/harness-plugin-opencode" from your opencode.json plugin array.',
4994
4994
  args: {
4995
4995
  dryRun: flag8({
4996
4996
  long: "dry-run",
@@ -5062,7 +5062,7 @@ var planDirCmd2 = command11({
5062
5062
  });
5063
5063
  var installPluginCmd = command11({
5064
5064
  name: "install-plugin",
5065
- description: 'Add "@glrs-dev/harness-opencode" to your opencode.json plugin array.',
5065
+ description: 'Add "@glrs-dev/harness-plugin-opencode" to your opencode.json plugin array.',
5066
5066
  args: {
5067
5067
  dryRun: flag8({
5068
5068
  long: "dry-run",
@@ -1,7 +1,7 @@
1
1
  import { Plugin } from '@opencode-ai/plugin';
2
2
 
3
3
  /**
4
- * @glrs-dev/harness-opencode — OpenCode plugin entry point.
4
+ * @glrs-dev/harness-plugin-opencode — OpenCode plugin entry point.
5
5
  *
6
6
  * Registers agents, commands, MCPs, tools, and skills at runtime via the
7
7
  * OpenCode plugin `config` hook. Zero filesystem writes to user space.
@@ -3,12 +3,12 @@ import {
3
3
  createAgents,
4
4
  formatModelOverrideWarning,
5
5
  validateModelOverride
6
- } from "./chunk-BDFZGIY7.js";
6
+ } from "./chunk-XCZ3NOXR.js";
7
7
  import {
8
8
  PACKAGE_NAME,
9
9
  readOurPackageVersion,
10
10
  refreshPluginCache
11
- } from "./chunk-UDB4NQ2R.js";
11
+ } from "./chunk-VJUETC6A.js";
12
12
 
13
13
  // src/config-hook.ts
14
14
  import * as fs from "fs";
@@ -85,7 +85,7 @@ function createMcpConfig() {
85
85
  // Use node's require.resolve to find the bundled launcher inside the
86
86
  // installed package, then exec it. Works because the MCP command runs
87
87
  // in a CJS-compatible shell context.
88
- `exec bash "$(node -e 'process.stdout.write(require.resolve("@glrs-dev/harness-opencode/dist/bin/memory-mcp-launcher.sh"))')"`
88
+ `exec bash "$(node -e 'process.stdout.write(require.resolve("@glrs-dev/harness-plugin-opencode/dist/bin/memory-mcp-launcher.sh"))')"`
89
89
  ];
90
90
  return {
91
91
  serena: {
@@ -1849,8 +1849,8 @@ import { mkdirSync as mkdirSync3, readFileSync as readFileSync3, writeFileSync a
1849
1849
  import { join as join8 } from "path";
1850
1850
  var APP_KEY = "A-US-3617699429";
1851
1851
  var ENDPOINT = "https://us.aptabase.com/api/v0/event";
1852
- var PKG_NAME = "@glrs-dev/harness-opencode";
1853
- var PKG_VERSION = true ? "1.0.0" : "dev";
1852
+ var PKG_NAME = "@glrs-dev/harness-plugin-opencode";
1853
+ var PKG_VERSION = true ? "0.2.0" : "dev";
1854
1854
  var DISABLED = process.env.HARNESS_OPENCODE_TELEMETRY === "0" || process.env.HARNESS_OPENCODE_TELEMETRY === "false" || process.env.DO_NOT_TRACK === "1" || process.env.CI === "true";
1855
1855
  var SESSION_ID = randomUUID();
1856
1856
  function getInstallId() {
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  MODEL_PRESETS,
3
3
  install
4
- } from "./chunk-V3KJY6CN.js";
5
- import "./chunk-UDB4NQ2R.js";
4
+ } from "./chunk-VVMP6QWS.js";
5
+ import "./chunk-VJUETC6A.js";
6
6
  export {
7
7
  MODEL_PRESETS,
8
8
  install
@@ -31,9 +31,9 @@ Apply these eight rules in order. Each rule has its own file in `rules/` for the
31
31
 
32
32
  ## After applying the rules
33
33
 
34
- 1. Save the YAML to the path returned by `bunx @glrs-dev/harness-opencode pilot plan-dir`.
35
- 2. Run `bunx @glrs-dev/harness-opencode pilot validate <path>` and fix every error / warning.
36
- 3. Hand off to the user with: `Plan saved to <path>. Next: bunx @glrs-dev/harness-opencode pilot build`.
34
+ 1. Save the YAML to the path returned by `bunx @glrs-dev/harness-plugin-opencode pilot plan-dir`.
35
+ 2. Run `bunx @glrs-dev/harness-plugin-opencode pilot validate <path>` and fix every error / warning.
36
+ 3. Hand off to the user with: `Plan saved to <path>. Next: bunx @glrs-dev/harness-plugin-opencode pilot build`.
37
37
 
38
38
  Do NOT summarize the plan in chat. The user can read the YAML.
39
39
 
@@ -23,7 +23,7 @@ The validator catches schema, DAG, and glob errors. It cannot catch "this verify
23
23
  ## Run validate
24
24
 
25
25
  ```
26
- bunx @glrs-dev/harness-opencode pilot validate <plan-path>
26
+ bunx @glrs-dev/harness-plugin-opencode pilot validate <plan-path>
27
27
  ```
28
28
 
29
29
  Fix every error AND warning. The "warnings" tier (e.g., glob conflicts between tasks) is also yours to action — either decide they're OK and document it, or restructure.
@@ -33,7 +33,7 @@ Fix every error AND warning. The "warnings" tier (e.g., glob conflicts between t
33
33
  When all seven questions are answered "yes" and `pilot validate` exits 0:
34
34
 
35
35
  - Save the plan.
36
- - Tell the user: `Plan saved to <path>. Next: bunx @glrs-dev/harness-opencode pilot build`.
36
+ - Tell the user: `Plan saved to <path>. Next: bunx @glrs-dev/harness-plugin-opencode pilot build`.
37
37
  - Stop. Don't summarize. Don't editorialize. The user can read the YAML.
38
38
 
39
39
  ## When the plan is NOT ready
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "@glrs-dev/harness-opencode",
3
- "version": "1.0.0",
2
+ "name": "@glrs-dev/harness-plugin-opencode",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glrs-dev/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Unified CLI for the @glrs-dev ecosystem — OpenCode agent harness dispatch + worktree management.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -52,7 +52,7 @@
52
52
  "zod": "4.1.8"
53
53
  },
54
54
  "devDependencies": {
55
- "@glrs-dev/harness-opencode": "workspace:*",
55
+ "@glrs-dev/harness-plugin-opencode": "workspace:*",
56
56
  "@types/bun": "latest",
57
57
  "@types/node": "^22",
58
58
  "tsup": "^8",