@tryvira/opencode 0.1.10 → 0.1.12
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/README.md +4 -3
- package/dist/index.js +6 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
# `@tryvira/opencode` 0.1.
|
|
1
|
+
# `@tryvira/opencode` 0.1.11
|
|
2
2
|
|
|
3
3
|
OpenCode V2 server plugin for Vira host lifecycle governance. The package default
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
exports the V2 setup surface plus a compatibility `server()` transport required
|
|
5
|
+
by OpenCode 1.19.x; both use the same V2 lifecycle rules. The transport is also
|
|
6
|
+
exported separately as `v1Fallback` and is not the old unconditional-deny path.
|
|
6
7
|
|
|
7
8
|
It resolves Vira behavior on every `context` hook, observes tool results, and in `enforce` mode blocks tool execution unless a host action authorizer returns an exact Vira `ALLOW` receipt. OpenCode V2 does not expose a supported response-before-display hook, so post-model verification is reported as unsupported rather than claimed as enforced.
|
|
8
9
|
|
package/dist/index.js
CHANGED
|
@@ -363,6 +363,11 @@ var ViraClient = class {
|
|
|
363
363
|
{ idempotencyKey: await contentIdempotencyKey(`sdk:pack:install:${packId}`, body) }
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
|
+
async diagnosePack(packId, input = {}) {
|
|
367
|
+
required(packId, "SDK_PACK_ID_REQUIRED");
|
|
368
|
+
const body = { runtimeBindings: [...input.runtimeBindings ?? []], knownVerifiers: [...input.knownVerifiers ?? []] };
|
|
369
|
+
return this.request({ method: "POST", path: `/v1/packs/${encodeURIComponent(packId)}/doctor`, body }, { idempotencyKey: await contentIdempotencyKey(`sdk:pack:doctor:${packId}`, body) });
|
|
370
|
+
}
|
|
366
371
|
async evaluatePack(packId, input) {
|
|
367
372
|
required(packId, "SDK_PACK_ID_REQUIRED");
|
|
368
373
|
required(input?.evaluationId, "SDK_EVALUATION_ID_REQUIRED");
|
|
@@ -1463,7 +1468,7 @@ var v1Fallback = { async server() {
|
|
|
1463
1468
|
}
|
|
1464
1469
|
};
|
|
1465
1470
|
} };
|
|
1466
|
-
var index_default = v2Plugin;
|
|
1471
|
+
var index_default = { ...v2Plugin, ...v1Fallback };
|
|
1467
1472
|
export {
|
|
1468
1473
|
ViraOpenCodeActionError,
|
|
1469
1474
|
index_default as default,
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryvira/opencode",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "OpenCode V2 host lifecycle integration for Vira",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"exports": {".": "./dist/index.js"},
|
|
8
|
-
"files": ["dist", "README.md"],
|
|
9
|
-
"scripts": {"build": "node ../../scripts/build-opencode-plugin.mjs", "pack:check": "npm run build && npm pack --dry-run"},
|
|
10
|
-
"dependencies": {"@tryvira/sdk": "0.1.
|
|
8
|
+
"files": ["dist/index.js", "README.md"],
|
|
9
|
+
"scripts": {"build": "node ../../scripts/build-opencode-plugin.mjs", "pack:check": "npm run build && npm pack --dry-run && node ../../scripts/opencode-plugin-smoke.mjs"},
|
|
10
|
+
"dependencies": {"@tryvira/sdk": "0.1.53"},
|
|
11
11
|
"peerDependencies": {"effect": "^4.0.0"},
|
|
12
12
|
"engines": {"node": ">=20"},
|
|
13
13
|
"license": "MIT"
|