@tryvira/opencode 0.1.8 → 0.1.9
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 -2
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
# `@tryvira/opencode` 0.1.
|
|
1
|
+
# `@tryvira/opencode` 0.1.9
|
|
2
2
|
|
|
3
|
-
OpenCode V2 server plugin for Vira host lifecycle governance.
|
|
3
|
+
OpenCode V2 server plugin for Vira host lifecycle governance. The package default
|
|
4
|
+
export is the V2 lifecycle plugin; the legacy V1 surface is exported separately
|
|
5
|
+
as `v1Fallback` and is never merged into the V2 export.
|
|
4
6
|
|
|
5
7
|
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.
|
|
6
8
|
|
package/dist/index.js
CHANGED
|
@@ -1391,7 +1391,7 @@ var v1Runtime = () => {
|
|
|
1391
1391
|
const client = new ViraClient({ baseUrl: required2(env("VIRA_CONTROL_URL") ?? env("VIRA_API_URL"), "VIRA_HOST_API_URL_REQUIRED"), apiKey: env("VIRA_API_KEY"), allowInsecureLocalhost: env("VIRA_ALLOW_INSECURE_LOCALHOST") === "true" });
|
|
1392
1392
|
return { mode, scope, client, runtime: createViraHostRuntime(client, { mode, connect: { ...scope, name: "OpenCode", systemType: "agent", adapterType: "custom-node", adapterVersion: "1.19.5", idempotencyKey: "opencode:vira:connect" }, capabilities: { canObserveModel: true, canInjectContext: true, canInterceptToolBefore: true, canInspectToolAfter: true, canPreventSideEffect: mode === "enforce", canInterceptResponseBeforeDisplay: false }, authorizeAction: async () => ({ decision: "BLOCK", reasonCode: "VIRA_V1_ACTION_AUTHORIZER_UNAVAILABLE" }) }) };
|
|
1393
1393
|
};
|
|
1394
|
-
var
|
|
1394
|
+
var v1Fallback = { async server() {
|
|
1395
1395
|
const configured = v1Runtime();
|
|
1396
1396
|
if (!configured) return {};
|
|
1397
1397
|
const { mode, scope, runtime } = configured;
|
|
@@ -1428,7 +1428,9 @@ var index_default = { ...v2Plugin, async server() {
|
|
|
1428
1428
|
}
|
|
1429
1429
|
};
|
|
1430
1430
|
} };
|
|
1431
|
+
var index_default = v2Plugin;
|
|
1431
1432
|
export {
|
|
1432
1433
|
ViraOpenCodeActionError,
|
|
1433
|
-
index_default as default
|
|
1434
|
+
index_default as default,
|
|
1435
|
+
v1Fallback
|
|
1434
1436
|
};
|