@tryvira/opencode 0.1.84 → 0.1.86
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 +12 -1
- package/dist/index.js +478 -74
- package/dist/server.js +478 -74
- package/dist/tui.js +2488 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# `@tryvira/opencode` 0.1.
|
|
1
|
+
# `@tryvira/opencode` 0.1.86
|
|
2
2
|
|
|
3
3
|
OpenCode V2 server plugin for Vira host lifecycle governance. The package default
|
|
4
4
|
exports the V2 setup surface plus a compatibility `server()` transport required
|
|
@@ -55,3 +55,14 @@ On current OpenCode V2, the plugin also subscribes to the server event stream wh
|
|
|
55
55
|
|
|
56
56
|
### OpenCode 2.3 native approval
|
|
57
57
|
Use the dedicated `@tryvira/opencode/server` entrypoint (object loader) for V2; the root callable entry stays compatible with legacy hosts. When Vira requires approval, the adapter invokes native `permission.assert` for `vira.confirm.<tool>` with the exact proposal, empty saved scope, and an ephemeral nonce. Only the matching once event plus the resolved native assertion admits one server-owned approval. Configure the native rule for that action as ask/allow, never override a native deny. The original native tool permission remains unchanged. Unattended resolution, timeout, rejection, missing stream, and always approval cannot create a grant.
|
|
58
|
+
|
|
59
|
+
### Managed multi-task result delivery
|
|
60
|
+
|
|
61
|
+
Server-owned COMPOUND/HYBRID execution remains fenced from native model and tool continuation. The authenticated run owner can read completed outputs with `getTaskRunEvidence(taskRunId, {includeResult:true})`; `readOpenCodeTaskRunResult` validates the result against terminal checkpoint identity and child evidence. The legacy callable V1 host polls for up to 120 attempts at 2.5-second intervals and, when the V1 session prompt client is available, delivers the verified output as an ignored `noReply` session notice (not an assistant-role message). A closed or replaced session suppresses pending delivery; an ambiguous display acknowledgement is not replayed. This is process-local deduplication, not durable exactly-once delivery. V2 has no equivalent model-exempt display-only message API: the plugin exposes the verified readback helper but does not send a synthetic prompt, start a new model, or claim native result display. See https://github.com/anomalyco/opencode/issues/48644.
|
|
62
|
+
|
|
63
|
+
### OpenCode V2: explicit read-only result viewer
|
|
64
|
+
|
|
65
|
+
The `./tui` export registers `/vira-result <host-task-run-host-turn:…>` and a Vira palette command. Run it in the original session using the reference in the server handoff error. The TUI process must have the configured Vira API URL, owner API key, organization/project/environment/department and AI System ID (same plugin options or environment variables as the server). It verifies the exact session, scope, persisted result, child evidence and current checkpoint before opening a local dialog. It never invokes the model, creates a synthetic message or approves an action. Long output is paged. This is an explicit TUI viewer, not automatic V2 transcript insertion. Build the package before using the new export.
|
|
66
|
+
### Server-resolved action evidence
|
|
67
|
+
|
|
68
|
+
For Pack-declared dynamic Signals, OpenCode forwards the connected AI System and connection identities when asking Control API to authorize a tool. The server resolves required Signals and may refresh them through an operator-configured read-only source. Do not configure static attestation IDs for these Signals or supply native approval facts. Missing or unverifiable evidence blocks execution. This path still requires an approved release, a server-recognized authenticated session and a configured authoritative source; the plugin does not create these authorities.
|