@tryvira/opencode 0.0.0-stage → 0.1.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.
Files changed (3) hide show
  1. package/README.md +16 -2
  2. package/dist/index.js +1354 -0
  3. package/package.json +12 -4
package/README.md CHANGED
@@ -1,3 +1,17 @@
1
- # Temporary Holding Version
1
+ # `@tryvira/opencode`
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ OpenCode V2 server plugin for Vira host lifecycle governance.
4
+
5
+ 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
+
7
+ Configuration is supplied through OpenCode plugin options or environment variables: `VIRA_CONTROL_URL`, `VIRA_API_KEY`, `VIRA_ORGANIZATION_ID`, `VIRA_PROJECT_ID`, `VIRA_ENVIRONMENT_ID`, `VIRA_AI_SYSTEM_ID`, `VIRA_CONNECTION_ID`, and `VIRA_HOST_MODE` (`off`, `observe`, `enforce`).
8
+
9
+ `enforce` requires a host-provided `authorizeAction` callback that calls the
10
+ server-owned action authorization boundary and returns the exact Vira
11
+ `ALLOW`/`BLOCK`/`ESCALATE` decision with receipt digests. The plugin never
12
+ turns `observe` into enforcement and never grants an action from model text.
13
+
14
+ When the runtime context hook exposes a server-issued `executionId` and a
15
+ `vira.request-behavior-context.v2`, the plugin can call
16
+ `/v1/runtime/actions/authorize` automatically. If that binding is absent,
17
+ enforce mode blocks the tool instead of guessing an execution or release.