opencode-plugin-flow 5.2.2 → 5.3.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
@@ -2,6 +2,56 @@
2
2
 
3
3
  One short entry per release, written for users deciding whether to upgrade.
4
4
 
5
+ ## [5.3.1] - 2026-07-20
6
+
7
+ Windows validation lore keeps the single-version harness release portable:
8
+
9
+ - Activation's symbolic-link safety test now unlinks the link itself with the
10
+ cross-platform filesystem primitive instead of asking Bun to recursively
11
+ remove a Windows directory link.
12
+ - The persistence integration test that exercises four pinned-helper closure
13
+ paths now has an explicit 30-second budget, matching the existing
14
+ process-spawning integration gates without weakening production timeouts.
15
+
16
+ ## [5.3.0] - 2026-07-20
17
+
18
+ Single-version harness lore makes the installed package, runtime authority,
19
+ validation evidence, correction review, and audit promotion path explicit:
20
+
21
+ - `activation-check` inventories Flow activation across OpenCode config,
22
+ plugin directories, and package cache. `activation-apply` plans by default,
23
+ then uses an exact canonical pin, backups, quarantine, and a recovery journal
24
+ with `--apply`; ambiguous or externally managed sources require manual
25
+ remediation. Post-mutation failure attempts exact safe rollback and records
26
+ whether recovery converged or needs journal-backed manual repair.
27
+ - Process-global runtime leadership permits one operational Flow instance.
28
+ Duplicate versions fail closed; a deterministic highest-version identity is
29
+ diagnostic only and cannot silently take control.
30
+ - Three bounded harness profiles (`control`, `standard`, and `assurance`) and
31
+ three rollout modes (`control`, `observe`, and `enforce`) now drive optional
32
+ worker admission through a trusted runtime-policy footer. Worker model and
33
+ current OpenCode `steps` routing are configurable by role.
34
+ - Validation is runtime-attested: `flow_validation_start` binds the current run
35
+ and source to the exact next Bash command, which emits an immutable receipt
36
+ reference consumed through `flow_review_start.request.validationRefs`.
37
+ Failed, incomplete, stale, altered, or duplicate receipts cannot become
38
+ review evidence.
39
+ - Correction review binds the latest recorded failure to authoritative source
40
+ manifests and a deterministic delta. Narrow correction context is used only
41
+ when complete and safe; broad, security-sensitive, persistence-sensitive,
42
+ missing, unavailable, or oversized context falls back to full review. A
43
+ bounded correction-only public-contract/cross-layer hint can elevate semantic
44
+ scope to full without overriding more specific runtime reasons. The existing
45
+ two-failure run-scoped cap remains authoritative.
46
+ - `AuditLedgerV1` now provides bounded typed findings, conservative severity
47
+ rules, explicit refutations and falsifiers, derived summaries, and
48
+ deterministic reconciled Markdown through `flow_audit_render`.
49
+ - Privacy-safe bounded host observation and the sanitized full-repository audit
50
+ oracle separate observed zero from unavailable data and require same-source,
51
+ same-model quality parity plus lower observed work before a candidate profile
52
+ can be promoted. The checked-in standard and assurance observations remain
53
+ unavailable, so enforcement is not yet a release claim.
54
+
5
55
  ## [5.2.2] - 2026-07-19
6
56
 
7
57
  Code-quality and persistence-hardening lore makes Flow safer at its input,
package/README.md CHANGED
@@ -8,8 +8,8 @@ model switches, and context loss.
8
8
 
9
9
  The design is guidance-first: package-owned Markdown carries planning,
10
10
  execution, validation, review, and orchestration judgment, while the plugin
11
- runtime stays deliberately small — it keeps the session ledger and enforces the
12
- hard gates prompts should not be trusted to remember.
11
+ runtime stays bounded and policy-focused — it keeps the session ledger and
12
+ enforces the hard gates prompts should not be trusted to remember.
13
13
 
14
14
  The maintained documentation starts at [docs/index.md](docs/index.md). The
15
15
  tracked `droid-wiki/` tree is an archived generated snapshot and is not a
@@ -18,9 +18,26 @@ current product or contributor contract.
18
18
  ## Quick start
19
19
 
20
20
  ```bash
21
- opencode plugin opencode-plugin-flow@5.2.2 --global --force
21
+ npx -y opencode-plugin-flow@5.3.1 activation-apply \
22
+ --project "$PWD" --scope global
23
+ npx -y opencode-plugin-flow@5.3.1 activation-apply \
24
+ --project "$PWD" --scope global --apply
25
+ npx -y opencode-plugin-flow@5.3.1 activation-check --project "$PWD"
22
26
  ```
23
27
 
28
+ The first command is a read-only plan. Review it before running the second;
29
+ the final check must report exactly one active `opencode-plugin-flow@5.3.1`
30
+ source and no proven inactive Flow cache artifacts. Use `--scope project` when
31
+ the one canonical pin should live with the project instead of in global config.
32
+ Flow refuses ambiguous local wrappers, cache entries, unsafe links, and config
33
+ it cannot change conservatively rather than guessing which copy is authoritative.
34
+
35
+ To select npm's current release instead of this release-pinned example, replace
36
+ `@5.3.1` with `@latest` on the `npx` invocations; do not pass
37
+ `--target latest`. The fetched CLI resolves its own embedded exact version and
38
+ converges every mutable Flow activation to that one pin, so latest replaces an
39
+ older active version rather than loading beside it.
40
+
24
41
  Start or restart OpenCode, then give Flow a goal:
25
42
 
26
43
  ```text
@@ -49,7 +66,12 @@ stops before `flow_run_start`.
49
66
  flow_run_start mutation acknowledged
50
67
  flow_status request.view: execution, feature: rate-limit-middleware
51
68
  ... implementation, tests ...
52
- flow_review_start request.validations: focused checks passed
69
+ flow_validation_start
70
+ command: exact next Bash command
71
+ coverageScope: focused
72
+ bash exact armed command
73
+ [flow-validation-receipt] immutable receipt reference
74
+ flow_review_start request.validationRefs: [receipt reference]
53
75
  request.reviewKind: feature
54
76
  request.validationScope: targeted
55
77
  assignmentId: review-assignment:runtime-id
@@ -111,8 +133,9 @@ loop.
111
133
 
112
134
  ## Tools
113
135
 
114
- The plugin exposes nine tools. `flow_guidance` is read-only and returns embedded
115
- Markdown; the other eight form the runtime surface:
136
+ The plugin exposes 12 tools. Nine own the durable lifecycle; three add bounded
137
+ harness admission, runtime-attested validation, and deterministic audit
138
+ rendering:
116
139
 
117
140
  | Tool | Purpose |
118
141
  | --- | --- |
@@ -125,6 +148,9 @@ Markdown; the other eight form the runtime surface:
125
148
  | `flow_feature_complete` | Atomically record a completed or blocked assignment result. |
126
149
  | `flow_feature_reset` | Reset one feature and its dependents. |
127
150
  | `flow_session_close` | Archive the active session as completed, deferred, or abandoned. |
151
+ | `flow_orchestration_admit` | Evaluate and arm one bounded optional-worker proposal for the active harness profile. |
152
+ | `flow_validation_start` | Arm capture for the exact next Bash command against current causal guards, feature run, and source. |
153
+ | `flow_audit_render` | Validate `AuditLedgerV1` and render its reconciled Markdown deterministically. |
128
154
 
129
155
  Only the root manager calls `flow_review_start`. Reviewers recover the exact
130
156
  assignment with
@@ -136,6 +162,15 @@ the exact passing feature-assignment result. The final feature outcome submits
136
162
  only the final-assignment result; Flow records both results atomically from the
137
163
  durable binding.
138
164
 
165
+ Validation input is no longer a caller-authored success claim. Immediately
166
+ before a check, call `flow_validation_start` with the exact command and current
167
+ guards, execute that exact command as the next Bash call, and copy the emitted
168
+ immutable receipt reference into `flow_review_start.request.validationRefs`.
169
+ Flow verifies receipt bytes, run, feature, current source, host-observed exit,
170
+ output completeness, and scope before materializing Session v4 evidence. A
171
+ failed, truncated, missing, stale, altered, or duplicate receipt is rejected
172
+ without consuming the review-start operation id.
173
+
139
174
  The first final assignment pins that binding for every same-source final-review
140
175
  retry. A manager recovering context loads detail status and copies
141
176
  `workflowData.projection.finalReviewRetry.prerequisite.result` unchanged into
@@ -158,6 +193,9 @@ The runtime owns only safety; judgment lives in package-owned guidance:
158
193
  - Reviewer assignment requires source-bound passing validation: `targeted` for
159
194
  feature review and `broad` for final review. A source edit invalidates stale
160
195
  pending review work when its replacement is created.
196
+ - Validation receipts are host-attested from the exact next Bash execution.
197
+ Callers cannot supply validation timestamps, exit status, command class, or
198
+ output digest to `flow_review_start`.
161
199
  - Feature outcome uses a nested `completed` or `blocked` result. Invalid or stale
162
200
  input records nothing and does not consume its operation id.
163
201
  - Each OpenCode handler validates the registered nested schema again at entry;
@@ -185,8 +223,8 @@ The runtime owns only safety; judgment lives in package-owned guidance:
185
223
  - Every closure is quiescent: no active execution or pending review assignment
186
224
  remains. A session can close as `completed` only after the final feature
187
225
  outcome has passed.
188
- - Actor-reported validation and review times must follow run, validation, and
189
- assignment order and cannot postdate the runtime acceptance time.
226
+ - Host-observed validation times and reviewer-reported result times must follow
227
+ run, validation, and assignment order and cannot postdate runtime acceptance.
190
228
  - Session locks fail closed: Flow never guesses that an old lock is abandoned,
191
229
  and only the unique owner may release it. Only a valid Session v4 document can
192
230
  become active state; canonical history additionally requires explicit
@@ -195,6 +233,9 @@ The runtime owns only safety; judgment lives in package-owned guidance:
195
233
  - `.flow/session.json` is the only active-state representation. Canonical Flow
196
234
  commands call `flow_status` before acting; plugin configuration does not read,
197
235
  refresh, or project workspace state.
236
+ - Exactly one Flow runtime instance may operate in an OpenCode process. If
237
+ duplicate copies load, every copy fails closed; the highest semantic version
238
+ is named only as a diagnostic leader and does not become operational.
198
239
 
199
240
  ## Hidden workers
200
241
 
@@ -217,6 +258,27 @@ that contract. Inspect rendered surfaces and static contracts with
217
258
  see
218
259
  [docs/prompt-quality.md](docs/prompt-quality.md).
219
260
 
261
+ The trusted command footer selects one harness profile with
262
+ `OPENCODE_FLOW_HARNESS_PROFILE=control|standard|assurance` (default
263
+ `standard`) and one admission rollout with
264
+ `OPENCODE_FLOW_ROLLOUT_MODE=control|observe|enforce` (default `observe`).
265
+ `control` preserves discretionary optional-worker behavior without admission
266
+ ceremony. `standard` admits a small bounded discovery/challenge path;
267
+ `assurance` permits broader bounded evidence and audit coverage when risk
268
+ justifies it. In `observe`, a policy violation is reported but does not block;
269
+ in `enforce`, the exact admitted optional worker class and count must be
270
+ dispatched. Lifecycle-required reviewer and validation workers are not optional
271
+ passes and do not use orchestration admission. Validation receipts remain
272
+ mandatory in every profile.
273
+
274
+ Hidden worker routing can be tuned without changing the domain contract. Set
275
+ `OPENCODE_FLOW_READONLY_WORKER_MODEL`,
276
+ `OPENCODE_FLOW_REVIEW_WORKER_MODEL`, or
277
+ `OPENCODE_FLOW_CANDIDATE_WORKER_MODEL`, with
278
+ `OPENCODE_FLOW_WORKER_MODEL` as the fallback. Matching `*_WORKER_STEPS`
279
+ variables set OpenCode's current `steps` limit; values must be integers from 1
280
+ through 1000.
281
+
220
282
  For broad implementation, the manager records whether work stayed serial,
221
283
  used exact-path candidate workers, used isolated worktrees, ran a tournament, or
222
284
  skipped eligible candidates. Feature completion can carry bounded
@@ -227,16 +289,29 @@ handoffs remain outside `.flow/**`.
227
289
  ## Install details and legacy cleanup
228
290
 
229
291
  See [docs/troubleshooting.md](docs/troubleshooting.md) for updates,
230
- older-OpenCode install fallback, stuck session recovery, and removal of global
231
- Flow skill folders left by v4.
232
-
233
- To update a pinned Flow version, rerun the install command with the new version.
234
- Flow starts with the new package-owned guidance immediately; no second restart
235
- or sync command is required. To preview recoverable migration of pristine v4
236
- global skill folders:
292
+ activation refusal and duplicate-runtime recovery, stuck session recovery, and
293
+ removal of global Flow skill folders left by v4.
294
+
295
+ To update, run the same `activation-apply` dry-run/apply/check sequence with the
296
+ new exact package version. The activator inventories OpenCode's global, project,
297
+ `.opencode`, custom, inline, and readable managed configuration; singular and
298
+ plural plugin directories; and the Flow package cache. It preserves unrelated
299
+ plugins, removes recognized Flow config entries outside the selected canonical
300
+ scope, and moves only marker-proven wrappers and proven inactive cache artifacts
301
+ to recovery locations. Applied changes receive backups and a recovery journal.
302
+ Sources that cannot be proved safe—including unknown wrappers, ambiguous cache
303
+ artifacts, JSONC that would require a lossy rewrite, inline config, and
304
+ administrator-managed config—produce manual remediation instead of mutation.
305
+ If an applied multi-source change fails, Flow attempts exact safe rollback and
306
+ records either `rolled-back` or `rollback-failed` in the recovery journal;
307
+ concurrent or unsafe state is preserved for manual recovery. Remote and
308
+ managed-preference sources that cannot be decoded offline remain covered by
309
+ fail-closed runtime leadership.
310
+
311
+ To preview recoverable migration of pristine v4 global skill folders:
237
312
 
238
313
  ```bash
239
- npx -y opencode-plugin-flow@5.2.2 legacy-cleanup --dry-run
314
+ npx -y opencode-plugin-flow@5.3.1 legacy-cleanup --dry-run
240
315
  ```
241
316
 
242
317
  ## Development
@@ -244,6 +319,7 @@ npx -y opencode-plugin-flow@5.2.2 legacy-cleanup --dry-run
244
319
  ```bash
245
320
  bun install
246
321
  bun run check # typecheck + lint + release metadata + prompt quality + build + tests
322
+ bun run harness:report # sanitized control/candidate resource and quality status
247
323
  bun run smoke:live # boots a real OpenCode server against the packed tarball
248
324
  ```
249
325