opencode-ship 1.1.2 → 1.1.4

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
@@ -2,6 +2,46 @@
2
2
 
3
3
  All notable changes to `opencode-ship` are recorded here.
4
4
 
5
+ ## 1.1.4 — `ship-plan` primary planning agent
6
+
7
+ > Branch: `feat/1.1.4-ship-plan`.
8
+
9
+ - **Write-capable `ship-plan` planning agent.** OpenCode's built-in lowercase `plan` Tab injects a read-only reminder (`packages/opencode/src/session/prompt/plan.txt`) that cannot be bypassed by `opencode.json` permissions. The native experimental Plan mode (`OPENCODE_EXPERIMENTAL_PLAN_MODE`) is environment-only, dotenv autoload is disabled in the production binary, and plugins initialise after `RuntimeFlags` is constructed — there is no supported repo-local path to turn on the native workflow. From 1.1.4 the installer installs a new primary agent `ship-plan` (under `.opencode/agents/ship-plan.md`) and sets `agent.plan.disable: true`. `ship-plan` is write-capable but only under `.opencode/plans/*.md` (`edit["*"]: "deny"` with `.opencode/plans/*.md: "allow"` ordered last). Tab cycles to Build / ship-plan; the old read-only Plan identity is disabled so the UX is no longer confusing.
10
+ - **`/agent/plan/disable` pointer.** New matrix leaf with `value: true`. Install / update set it; uninstall restores the previous value. The pointer is the single declaration that the installer owns; consumers who explicitly set `plan.disable: false` are surfaced as a conflict and refused.
11
+ - **No native `plan_exit` or `Session.plan()` filename.** The replacement is deliberately not the experimental Plan workflow. There is no `plan_exit` tool, no canonical plan filename supplied by OpenCode, and no synthetic build-handoff message. If OpenCode eventually ships the per-agent `plan: true` proposal (`anomalyco/opencode#31868`), this agent can migrate onto the native facility cleanly.
12
+
13
+ ## 1.1.3 — Tool permission regression + setup-ship-workflow loader
14
+
15
+ > Branch: `fix/1.1.3-tool-permissions`. Hotfix on top of `1.1.2`.
16
+
17
+ - **Drop the `*` wildcard from the Build / ship-controller tool
18
+ permission map.** `1.1.2` emitted a `permission: { "*": "deny" }`
19
+ leaf at the agent root, and OpenCode's last-match-wins semantics
20
+ masked the consumer-owned built-ins (`read`, `edit`, `bash`,
21
+ `glob`, `grep`, `list`, `skill`, `webfetch`, …). Symptom: the
22
+ Build agent kept only the ship/delivery tool subset, the
23
+ `setup-ship-workflow` skill was never auto-loaded because the
24
+ agent could not read its own `SKILL.md`, and the user was
25
+ prompted with `Skill install blocked: … untrusted-owner` because
26
+ the model tried to reinstall the locally-installed skill via
27
+ `ship_skill_install`. The fix is to deny only the explicit
28
+ `PUBLIC_TOOL_ID` set (plus `allow` / `ask`) and let consumer
29
+ built-ins stay consumer-owned.
30
+ - **Drop leftover matrix leaves on install / update.** The
31
+ reconciler now diffs `previousRecords` against the current
32
+ descriptor set and removes pointers that the matrix no longer
33
+ emits (for example the dropped `/agent/build/permission/*`),
34
+ restoring the preinstall `previous` value or the leaf when no
35
+ previous existed. The byte output is updated for both JSON and
36
+ JSONC paths so `opencode-ship update` from `1.1.2` to `1.1.3`
37
+ cleans the orphan pointer on the first run.
38
+ - **`/setup-ship-workflow` command is self-loading.** The command
39
+ wrapper now spells out the procedure: read the skill body from
40
+ `.opencode/skills/setup-ship-workflow/SKILL.md` and follow it.
41
+ Do not call `ship_skill_install` for this skill — it is
42
+ installed by `init` and the install path requires a trusted
43
+ npm-owner allowlist that `opencode-ship` does not satisfy.
44
+
5
45
  ## 1.1.2 — Stable: Plan Mode write access
6
46
 
7
47
  > Branch: `release/1.1.2`. Promoted from `1.1.2-rc.4` after dogfood.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > npm-distributed OpenCode installer and delivery plugin: a single command materialises the lifecycle plugin, reviewer/verifier agents, and skills into any consumer repository, with a recoverable lock and never silently overwrites managed files.
4
4
  >
5
- > **Status:** `1.1.2` is on `npm dist-tag latest` and is the first fully self-hosting release. It is the accepted successor of `1.1.1` (now deprecated). The `1.1.2 stabilization` line carried three rejected RCs (`1.1.2-rc.1`, `1.1.2-rc.2`, `1.1.2-rc.3`) before the stable candidate `1.1.2-rc.4` was promoted; see `docs/release/1.1.2-correction-plan.md` for the authoritative plan and issue #56 for the bounded evidence ledger. The `1.1.0` tag is immutable. Consumers of `opencode-delivery@0.1.x` should run `pnpm dlx opencode-ship@latest init` from the same checkout; migration recognises the legacy artifacts and adopts them when their bytes match.
5
+ > **Status:** `1.1.4` is on `npm dist-tag latest` and adds a write-capable `ship-plan` primary planning agent. OpenCode's built-in lowercase `plan` Tab is now disabled by the installer (the native experimental Plan mode is env-only and cannot be activated from a repo-local install); `ship-plan` writes Markdown only under `.opencode/plans/*.md` and never touches source files. `1.1.3` supersedes the `1.1.2 stabilization` line by dropping the broken `permission: { "*": "deny" }` wildcard and adding a stale-pointer removal path so `update` cleans the orphan key on the first run. The `1.1.0` tag is immutable. Consumers of `opencode-delivery@0.1.x` should run `pnpm dlx opencode-ship@latest init` from the same checkout; migration recognises the legacy artifacts and adopts them when their bytes match.
6
6
  >
7
7
  > Consumers should use `opencode-ship@1.1.0` (or `@latest`) until `1.1.1` ships. The previous `1.0.0` is on `next`; consumers who pinned to `1.0.x` will continue to receive updates on that channel.
8
8
 
@@ -1,6 +1,6 @@
1
1
  # Third-Party Notices
2
2
 
3
- `opencode-ship@1.1.2` ships the complete Matt Pocock and Superpowers
3
+ `opencode-ship@1.1.4` ships the complete Matt Pocock and Superpowers
4
4
  methodology under the MIT license, plus the Ship-owned installer,
5
5
  plugin, agents, and skills. The complete immutable pin list is in
6
6
  `vendor/sources.json`; the upstream snapshots are under
@@ -0,0 +1,66 @@
1
+ ---
2
+ description: Planning agent. Does not modify project source files. Writes Markdown only under .opencode/plans/*.md.
3
+ mode: primary
4
+ temperature: 0.3
5
+ steps: 50
6
+ permission:
7
+ edit:
8
+ "*": deny
9
+ ".opencode/plans/*.md": allow
10
+ bash:
11
+ "*": deny
12
+ "git status *": allow
13
+ "git diff *": allow
14
+ "git log *": allow
15
+ "git show *": allow
16
+ "git rev-parse *": allow
17
+ "git ls-files *": allow
18
+ "git ls-remote *": allow
19
+ "ls *": allow
20
+ "cat *": allow
21
+ "head *": allow
22
+ "tail *": allow
23
+ "stat *": allow
24
+ "gh issue list *": allow
25
+ "gh issue view *": allow
26
+ "gh pr list *": allow
27
+ "gh pr view *": allow
28
+ task:
29
+ "*": deny
30
+ explore: allow
31
+ general: allow
32
+ webfetch: allow
33
+ question: allow
34
+ ---
35
+
36
+ # Ship Plan
37
+
38
+ You are the primary planning agent for this repo. Use this Tab (Build is for implementation).
39
+
40
+ ## What you do
41
+
42
+ 1. Read the user's request and any context files they cite (`@file`).
43
+ 2. Explore the codebase with `bash` (read-only git / ls / cat / gh issue / gh pr) and `task explore` agents. Never `cat` secrets.
44
+ 3. Ask clarifying questions through `question` when tradeoffs need the user's call.
45
+ 4. Write your plan to a single Markdown file under `.opencode/plans/<filename>.md`. Filename: lowercase, dashes, no spaces, ends in `.md` (e.g. `2026-08-20-customer-final-ux.md`).
46
+ 5. Tell the user the file path and ask for confirmation before any edits after the first write.
47
+
48
+ ## What you never do
49
+
50
+ - Never edit source files, configs, tests, or anything outside `.opencode/plans/*.md`.
51
+ - Never run mutating bash (`git commit`, `git push`, `npm install`, `rm`, `pnpm add`, …).
52
+ - Never claim you have OpenCode's native `plan_exit` workflow. This is a replacement for the read-only native Plan Tab, not the experimental one.
53
+ - Never invoke `task plan` or `task build`. Build runs the plan, not you.
54
+
55
+ ## Style
56
+
57
+ - Write for the cheap builder model that will execute the plan. Be concrete: file paths, function names, the exact commit messages you'll commit to.
58
+ - Prefer small, vertical slices over big-bang rewrites.
59
+ - Quote the source lines you'll touch.
60
+ - When you must choose, recommend and justify in one sentence. Don't enumerate "alternatives" in the file.
61
+
62
+ ## Hard rules
63
+
64
+ - One question per turn via `question`. Don't batch.
65
+ - If a write fails, surface the error verbatim. Do not retry silently.
66
+ - Don't claim a file is written until `bash` confirms it.
@@ -5,11 +5,30 @@ description: Configure the opencode-ship workflow for this repo: GitHub tracker,
5
5
  # Setup Ship Workflow
6
6
 
7
7
  This command is a thin wrapper around the canonical
8
- `setup-ship-workflow` skill. OpenCode will load the skill
9
- and follow its procedure.
10
-
11
- To run the skill from this command, the user types
12
- `/setup-ship-workflow` in OpenCode. The CLI's
13
- `setup-complete` command is the transactional gate that
14
- commits the lock flip and clears the marker once the skill
15
- has produced every artifact.
8
+ `setup-ship-workflow` skill. The skill file is written to disk by
9
+ `opencode-ship init` at `.opencode/skills/setup-ship-workflow/SKILL.md`
10
+ in the consumer repo and in every issue worktree.
11
+
12
+ ## When the user types `/setup-ship-workflow`
13
+
14
+ 1. **Read** the skill body from
15
+ `.opencode/skills/setup-ship-workflow/SKILL.md` in the current
16
+ worktree (or the consumer repo root if no worktree is open).
17
+ Do NOT call `ship_skill_install` for this skill: it is already
18
+ on disk from `init` and the install path requires a trusted
19
+ npm-owner allowlist that the `opencode-ship` publisher does
20
+ not satisfy.
21
+ 2. **Follow** the procedure in the skill body. The skill writes
22
+ the four required artifacts (`docs/agents/issue-tracker.md`,
23
+ `docs/agents/triage-labels.md`, `docs/agents/domain.md`,
24
+ `AGENTS.md`), populates the `workflow.models` block in
25
+ `.opencode/ship.config.json`, and runs the
26
+ `opencode-ship setup-complete` CLI to flip
27
+ `lock.manager.setupComplete` to `true`.
28
+
29
+ If the skill file is missing (for example the consumer skipped
30
+ `init`), fall back to running `opencode-ship init --root "$PWD"`
31
+ from a `bash` block first, then read the freshly written skill and
32
+ continue. Do not silently invent the setup procedure; the CLI is
33
+ the single source of truth for the artifact list and the model
34
+ names that the controller will dispatch.
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // opencode-ship CLI v1.1.2
2
+ // opencode-ship CLI v1.1.4
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __esm = (fn, res) => function __init() {
@@ -110,7 +110,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
110
110
  var PACKAGE_VERSION, TEMPLATE_SET;
111
111
  var init_version = __esm({
112
112
  "src/version.js"() {
113
- PACKAGE_VERSION = "1.1.2";
113
+ PACKAGE_VERSION = "1.1.4";
114
114
  TEMPLATE_SET = `v${PACKAGE_VERSION}`;
115
115
  }
116
116
  });
@@ -242,6 +242,7 @@ var init_catalog = __esm({
242
242
  ];
243
243
  ENGINEERING_AGENTS = [
244
244
  "ship-controller",
245
+ "ship-plan",
245
246
  "ship-planner",
246
247
  "ship-task-builder",
247
248
  "ship-task-reviewer",
@@ -1052,7 +1053,7 @@ function setPath(doc, tokens, value) {
1052
1053
  cursor[tokens[tokens.length - 1]] = value;
1053
1054
  return root;
1054
1055
  }
1055
- var PLAN_PATH_PREFIX, SUPERPOWERS_PATH_PREFIX, DENY_DEFAULT, ALLOW_PLANS, PLANS_GLOB, SUPERPOWERS_GLOB, PLAN_EDIT_GLOB, PLAN_EDIT_PLANS_GLOB, PLAN_EDIT_GLOB_POINTER, PLAN_EDIT_PLANS_GLOB_POINTER, PLAN_EDIT_PARENT_POINTER;
1056
+ var PLAN_PATH_PREFIX, SUPERPOWERS_PATH_PREFIX, DENY_DEFAULT, ALLOW_PLANS, PLANS_GLOB, SUPERPOWERS_GLOB, PLAN_EDIT_GLOB, PLAN_EDIT_PLANS_GLOB, PLAN_EDIT_GLOB_POINTER, PLAN_EDIT_PLANS_GLOB_POINTER, PLAN_EDIT_PARENT_POINTER, PLAN_DISABLE_POINTER;
1056
1057
  var init_plan_mode_permissions = __esm({
1057
1058
  "src/installer/plan-mode-permissions.js"() {
1058
1059
  PLAN_PATH_PREFIX = ".git/opencode-ship/plans";
@@ -1066,6 +1067,7 @@ var init_plan_mode_permissions = __esm({
1066
1067
  PLAN_EDIT_GLOB_POINTER = "/agent/plan/permission/edit/docs~1superpowers~1**";
1067
1068
  PLAN_EDIT_PLANS_GLOB_POINTER = "/agent/plan/permission/edit/.git~1opencode-ship~1plans~1**";
1068
1069
  PLAN_EDIT_PARENT_POINTER = "/agent/plan/permission/edit";
1070
+ PLAN_DISABLE_POINTER = "/agent/plan/disable";
1069
1071
  }
1070
1072
  });
1071
1073
 
@@ -1871,7 +1873,7 @@ function denyMap(globs) {
1871
1873
  return out;
1872
1874
  }
1873
1875
  function toolPermissionMap(allow, ask) {
1874
- const out = { "*": DENY };
1876
+ const out = {};
1875
1877
  for (const id of PUBLIC_TOOL_IDS) out[id] = DENY;
1876
1878
  for (const id of allow) out[id] = ALLOW;
1877
1879
  for (const id of ask) out[id] = ASK;
@@ -1952,6 +1954,7 @@ function matrixLeafPointers() {
1952
1954
  }
1953
1955
  out.push({ pointer: PLAN_EDIT_GLOB_POINTER, strategy: "value", value: "allow", scope: "engineering" });
1954
1956
  out.push({ pointer: PLAN_EDIT_PLANS_GLOB_POINTER, strategy: "value", value: "allow", scope: "engineering" });
1957
+ out.push({ pointer: PLAN_DISABLE_POINTER, strategy: "value", value: true, scope: "engineering" });
1955
1958
  return out;
1956
1959
  }
1957
1960
 
@@ -3538,6 +3541,10 @@ function reconcileRecordsAfterTransition(descriptors, previousRecords) {
3538
3541
  }
3539
3542
  return out;
3540
3543
  }
3544
+ function staleRecordsToRemove(previousRecords, descriptors) {
3545
+ const desired = new Set(descriptors.map((d) => d.pointer));
3546
+ return previousRecords.filter((r) => r.scope === "engineering" && !desired.has(r.pointer));
3547
+ }
3541
3548
  function planInstallRoot({ doc, target, relPath, descriptors, previousRecords }) {
3542
3549
  const promotion = promotePlanEditIfString(doc.value);
3543
3550
  if (promotion.record && promotion.record.conflict) {
@@ -3553,12 +3560,24 @@ function planInstallRoot({ doc, target, relPath, descriptors, previousRecords })
3553
3560
  document: doc.value
3554
3561
  };
3555
3562
  }
3556
- const sourceDoc = promotion.doc;
3563
+ const stale = staleRecordsToRemove(previousRecords, descriptors);
3564
+ let sourceDoc = promotion.doc;
3565
+ const staleEdits = [];
3566
+ for (const r of stale) {
3567
+ if (r.previous && r.previous.existed) {
3568
+ sourceDoc = setPointer(sourceDoc, r.pointer, r.previous.value);
3569
+ staleEdits.push({ kind: "restore", pointer: r.pointer, value: r.previous.value });
3570
+ } else {
3571
+ sourceDoc = removePointer(sourceDoc, r.pointer);
3572
+ staleEdits.push({ kind: "remove", pointer: r.pointer });
3573
+ }
3574
+ }
3575
+ const livePreviousRecords = previousRecords.filter((r) => !stale.some((s) => s.pointer === r.pointer));
3557
3576
  const result = applyOwnedPointers(sourceDoc, {
3558
3577
  pointerEntries: descriptors.map((d) => ({ pointer: d.pointer, strategy: d.strategy, value: d.value })),
3559
3578
  allowEqualValues: true
3560
3579
  });
3561
- const edits = [];
3580
+ const edits = [...staleEdits];
3562
3581
  for (const a of result.applied) edits.push({ kind: "create", pointer: a.pointer, value: a.value });
3563
3582
  for (const s of result.skipped) {
3564
3583
  if (s.reason === "already equal") continue;
@@ -3592,11 +3611,31 @@ function planInstallRoot({ doc, target, relPath, descriptors, previousRecords })
3592
3611
  "set"
3593
3612
  ) });
3594
3613
  }
3614
+ for (const e of staleEdits) {
3615
+ if (e.kind === "restore") {
3616
+ pointerEdits.push({ pointer: e.pointer, op: (
3617
+ /** @type {"set"} */
3618
+ "set"
3619
+ ), value: e.value });
3620
+ } else {
3621
+ pointerEdits.push({ pointer: e.pointer, op: (
3622
+ /** @type {"delete"} */
3623
+ "delete"
3624
+ ) });
3625
+ }
3626
+ }
3595
3627
  bytes = applyJsoncEdits(doc.raw ?? "", pointerEdits);
3596
3628
  } else {
3597
3629
  const { value: sourceValue } = parseRootConfigPreservingOrder(doc.raw ?? "");
3598
3630
  if (sourceValue && typeof sourceValue === "object") {
3599
3631
  docForWrite = sourceValue;
3632
+ for (const e of staleEdits) {
3633
+ if (e.kind === "restore") {
3634
+ docForWrite = setPointer(docForWrite, e.pointer, e.value);
3635
+ } else {
3636
+ docForWrite = removePointer(docForWrite, e.pointer);
3637
+ }
3638
+ }
3600
3639
  if (promotion.record) {
3601
3640
  docForWrite = setPointer(docForWrite, promotion.record.pointer, { "*": promotion.record.previous.value });
3602
3641
  }
@@ -3612,7 +3651,7 @@ function planInstallRoot({ doc, target, relPath, descriptors, previousRecords })
3612
3651
  } catch {
3613
3652
  bytes = Buffer.from(formatRootConfig(result.doc), "utf8");
3614
3653
  }
3615
- const records = mergePointerRecords(descriptors, previousRecords, result, doc.before);
3654
+ const records = mergePointerRecords(descriptors, livePreviousRecords, result, doc.before);
3616
3655
  if (promotion.record) {
3617
3656
  records.push({
3618
3657
  pointer: promotion.record.pointer,
@@ -5210,7 +5249,7 @@ async function assembleLock({ repoRoot, plan, lock, configPlan, rootPlan, profil
5210
5249
  manager: {
5211
5250
  schemaVersion: CURRENT_LOCK_SCHEMA,
5212
5251
  name: "opencode-ship",
5213
- version: "1.1.2",
5252
+ version: "1.1.4",
5214
5253
  templateSet: TEMPLATE_SET_ID,
5215
5254
  profile: resolvedProfile,
5216
5255
  appliedAt: (/* @__PURE__ */ new Date()).toISOString(),
package/dist/core.js CHANGED
@@ -1,4 +1,4 @@
1
- // opencode-ship/core v1.1.2
1
+ // opencode-ship/core v1.1.4
2
2
 
3
3
  // src/adapter.js
4
4
  import { readFile, writeFile, mkdir, rename } from "node:fs/promises";
package/dist/plugin.js CHANGED
@@ -1,4 +1,4 @@
1
- // opencode-ship v1.1.2
1
+ // opencode-ship v1.1.4
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __esm = (fn, res) => function __init() {
@@ -19328,7 +19328,7 @@ function selectRuntimeAdapter({ config: config2, shipAdapter, legacyAdapter }) {
19328
19328
  import { readFileSync as readFileSync4, existsSync as existsSync27 } from "node:fs";
19329
19329
  import { dirname as dirname12, resolve as resolve21 } from "node:path";
19330
19330
  import { fileURLToPath } from "node:url";
19331
- var PACKAGE_VERSION = "1.1.2";
19331
+ var PACKAGE_VERSION = "1.1.4";
19332
19332
  var TEMPLATE_SET = `v${PACKAGE_VERSION}`;
19333
19333
 
19334
19334
  // src/plugin.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-ship",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "private": false,
5
5
  "description": "npm-distributed OpenCode installer that materializes the delivery plugin, reviewer/verifier agents, skills, ship config and lock into any consumer repository.",
6
6
  "license": "MIT",