opencode-completion-gate 1.3.1 → 2.0.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 +18 -0
- package/README.md +6 -2
- package/dist/gate.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +549 -34
- package/dist/plugin.js +306 -224
- package/dist/types.d.ts +22 -3
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.1](https://github.com/PauloDevelo/opencode-completion-gate/compare/v2.0.0...v2.0.1) (2026-11-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* keep polling PR policies while CI is still running ([#14](https://github.com/PauloDevelo/opencode-completion-gate/issues/14)) ([40713c4](https://github.com/PauloDevelo/opencode-completion-gate/commit/40713c4be72744ce71df1b3094f68bbb532c4fbe))
|
|
9
|
+
|
|
10
|
+
## [2.0.0](https://github.com/PauloDevelo/opencode-completion-gate/compare/v1.3.1...v2.0.0) (2026-10-15)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ⚠ BREAKING CHANGES
|
|
14
|
+
|
|
15
|
+
* 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.
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* 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))
|
|
20
|
+
|
|
3
21
|
## [1.3.1](https://github.com/PauloDevelo/opencode-completion-gate/compare/v1.3.0...v1.3.1) (2026-09-09)
|
|
4
22
|
|
|
5
23
|
|
package/README.md
CHANGED
|
@@ -12,17 +12,21 @@ 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
|
-
"
|
|
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
|
+
>
|
|
28
|
+
> Restart OpenCode after changing the `plugins` array: plugins are loaded at startup, so a running session keeps the previous plugin set. The addition only takes effect after the restart.
|
|
29
|
+
|
|
26
30
|
## Quick start
|
|
27
31
|
|
|
28
32
|
1. Instruct the agent: *"Fix X until completion."*
|
package/dist/gate.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
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 = "
|
|
6
|
+
export declare const VERSION = "2.0.0";
|
|
7
7
|
export declare const pluginMeta: {
|
|
8
8
|
readonly name: "opencode-completion-gate";
|
|
9
|
-
readonly version: "
|
|
9
|
+
readonly version: "2.0.0";
|
|
10
10
|
readonly description: "Per-session quality gate that blocks declaring done until configured assertions pass";
|
|
11
11
|
};
|