opencode-completion-gate 1.3.0 → 2.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.0](https://github.com/PauloDevelo/opencode-completion-gate/compare/v1.3.1...v2.0.0) (2026-10-15)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * requires OpenCode V2 (@opencode/plugin >= 2.0); the V1 plugin API is no longer supported. The commands/gate.md markdown command is removed because the plugin registers /gate itself.
9
+
10
+ ### Features
11
+
12
+ * port to the OpenCode V2 plugin API ([#12](https://github.com/PauloDevelo/opencode-completion-gate/issues/12)) ([385a93c](https://github.com/PauloDevelo/opencode-completion-gate/commit/385a93cab5f74e2e75677401e9c5a57fa47c785c))
13
+
14
+ ## [1.3.1](https://github.com/PauloDevelo/opencode-completion-gate/compare/v1.3.0...v1.3.1) (2026-09-09)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * honor bootstrap retry override before session creation ([#10](https://github.com/PauloDevelo/opencode-completion-gate/issues/10)) ([8cccd1e](https://github.com/PauloDevelo/opencode-completion-gate/commit/8cccd1ede29ead0325c18f6923e22d920353615d))
20
+
3
21
  ## [1.3.0](https://github.com/PauloDevelo/opencode-completion-gate/compare/v1.2.0...v1.3.0) (2026-09-09)
4
22
 
5
23
 
package/README.md CHANGED
@@ -12,17 +12,19 @@ Per-session quality gate that blocks an agent from declaring a task "done" until
12
12
  npm install opencode-completion-gate
13
13
  ```
14
14
 
15
- Add the plugin to your OpenCode configuration:
15
+ Add the plugin to your OpenCode configuration (V2):
16
16
 
17
17
  **opencode.json:**
18
18
 
19
19
  ```json
20
20
  {
21
21
  "$schema": "https://opencode.ai/config.json",
22
- "plugin": ["opencode-completion-gate"]
22
+ "plugins": ["opencode-completion-gate"]
23
23
  }
24
24
  ```
25
25
 
26
+ > Requires OpenCode V2 (`@opencode/plugin` ≥ 2.0). For OpenCode V1, use `opencode-completion-gate@1.x` and the `plugin` field.
27
+
26
28
  ## Quick start
27
29
 
28
30
  1. Instruct the agent: *"Fix X until completion."*
@@ -55,3 +57,12 @@ Config lives per project at `<project-root>/.opencode/completion-gate.json` (re-
55
57
  ```
56
58
 
57
59
  Assertion types: `command`, `ado-pr`, `opencode-review`. See [completion-gate-plugin.md](completion-gate-plugin.md) for the full schema, ADO PR polling, review sessions, diagnostics (`gate-diag.log`), and troubleshooting.
60
+
61
+ Orchestration launchers can arm the first session without a chat message by
62
+ setting `OPENCODE_GATE_BOOTSTRAP_COMMAND_B64` (or
63
+ `OPENCODE_GATE_BOOTSTRAP_COMMAND`) and optionally
64
+ `OPENCODE_GATE_BOOTSTRAP_MAX_RETRIES`. The retry override is honored for
65
+ command-only bootstrap sessions and takes precedence over the project's
66
+ `maxRetries`; combined mode uses the project value. Bootstrap settings are
67
+ captured during plugin initialization, with a fallback read when the first
68
+ session is created, and are consumed once.
package/dist/gate.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import type { Plugin } from '@opencode-ai/plugin';
1
+ import { Plugin } from '@opencode/plugin';
2
2
  import type { AdoPrPollOptions, AssertionOutcome, CommandAssertion, GateAssertion, ReviewSessionClient } from './types.js';
3
3
  export declare function runCommandAssertion(a: CommandAssertion, cwd: string, isAborted?: () => boolean): Promise<AssertionOutcome>;
4
4
  export declare function evaluateAssertions(assertions: GateAssertion[], projectRoot: string, client?: ReviewSessionClient, isAborted?: () => boolean, adoOpts?: AdoPrPollOptions): Promise<AssertionOutcome[] | null>;
5
- declare const plugin: Plugin;
5
+ declare const plugin: Plugin.Plugin;
6
6
  export default plugin;
package/dist/index.d.ts CHANGED
@@ -3,9 +3,9 @@
3
3
  * The plugin entry (`src/plugin.ts`) stays default-export-only for OpenCode.
4
4
  */
5
5
  export * from './core.js';
6
- export declare const VERSION = "1.0.0";
6
+ export declare const VERSION = "2.0.0";
7
7
  export declare const pluginMeta: {
8
8
  readonly name: "opencode-completion-gate";
9
- readonly version: "1.0.0";
9
+ readonly version: "2.0.0";
10
10
  readonly description: "Per-session quality gate that blocks declaring done until configured assertions pass";
11
11
  };