@tryvira/opencode 0.1.94 → 0.1.95

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 CHANGED
@@ -1,4 +1,4 @@
1
- # `@tryvira/opencode` 0.1.94
1
+ # `@tryvira/opencode` 0.1.95
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
@@ -7,10 +7,10 @@ exported separately as `v1Fallback` and is not the old unconditional-deny path.
7
7
 
8
8
  ### OpenCode 2.4.x plugin inventory
9
9
 
10
- Install with `opencode plugin add @tryvira/opencode@0.1.94`. The
10
+ Install with `opencode plugin add @tryvira/opencode@0.1.95`. The
11
11
  authoritative fresh-install check is `opencode plugin check` plus
12
12
  `opencode debug config` (the latter must contain
13
- `@tryvira/opencode@0.1.94`). OpenCode 2.4.x can still report `No plugins found`
13
+ `@tryvira/opencode@0.1.95`). OpenCode 2.4.x can still report `No plugins found`
14
14
  from `plugin list` immediately after an install because its background plugin
15
15
  inventory is populated asynchronously; this is a host inventory race, not
16
16
  missing Vira metadata. Do not remove and reinstall the package. Re-run
@@ -76,3 +76,7 @@ Server-owned COMPOUND/HYBRID execution remains fenced from native model and tool
76
76
  ### OpenCode V2: explicit read-only result viewer
77
77
 
78
78
  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.
79
+
80
+ ### Commercial wallet readback
81
+
82
+ With an authorized organization-scope owner or Billing Admin identity, the MCP tool `get_ai_credit_wallet` accepts `includeCommercial: true` to request approved agreement summaries. The plugin also exports `readOpenCodeCommercialWallet(client, true)` for explicit host-side reads. Neither runs automatically in model hooks. Department machine keys are not granted organization-wide finance authority. This does not add a native OpenCode financial panel or enable payment collection.
package/dist/index.js CHANGED
@@ -154,8 +154,8 @@ var ViraClient = class {
154
154
  if (!actorId.trim()) throw new Error("SDK_ACTOR_ID_REQUIRED");
155
155
  return this.request({ method: "POST", path: `/v1/organization/billing-admins/${encodeURIComponent(actorId)}`, body: { status } }, { idempotencyKey: options.idempotencyKey ?? `sdk:billing-admin:${globalThis.crypto.randomUUID()}`, enforcing: true });
156
156
  }
157
- getAICreditWallet() {
158
- return this.request({ method: "GET", path: "/v1/billing/credits" });
157
+ getAICreditWallet(input2 = {}) {
158
+ return this.request({ method: "GET", path: "/v1/billing/credits", ...input2.includeCommercial === true ? { query: { includeCommercial: "true" } } : {} });
159
159
  }
160
160
  listAICreditBudgets() {
161
161
  return this.request({ method: "GET", path: "/v1/billing/credits/budgets" });
package/dist/server.js CHANGED
@@ -154,8 +154,8 @@ var ViraClient = class {
154
154
  if (!actorId.trim()) throw new Error("SDK_ACTOR_ID_REQUIRED");
155
155
  return this.request({ method: "POST", path: `/v1/organization/billing-admins/${encodeURIComponent(actorId)}`, body: { status } }, { idempotencyKey: options.idempotencyKey ?? `sdk:billing-admin:${globalThis.crypto.randomUUID()}`, enforcing: true });
156
156
  }
157
- getAICreditWallet() {
158
- return this.request({ method: "GET", path: "/v1/billing/credits" });
157
+ getAICreditWallet(input2 = {}) {
158
+ return this.request({ method: "GET", path: "/v1/billing/credits", ...input2.includeCommercial === true ? { query: { includeCommercial: "true" } } : {} });
159
159
  }
160
160
  listAICreditBudgets() {
161
161
  return this.request({ method: "GET", path: "/v1/billing/credits/budgets" });
package/dist/tui.js CHANGED
@@ -124,8 +124,8 @@ var ViraClient = class {
124
124
  if (!actorId.trim()) throw new Error("SDK_ACTOR_ID_REQUIRED");
125
125
  return this.request({ method: "POST", path: `/v1/organization/billing-admins/${encodeURIComponent(actorId)}`, body: { status } }, { idempotencyKey: options.idempotencyKey ?? `sdk:billing-admin:${globalThis.crypto.randomUUID()}`, enforcing: true });
126
126
  }
127
- getAICreditWallet() {
128
- return this.request({ method: "GET", path: "/v1/billing/credits" });
127
+ getAICreditWallet(input = {}) {
128
+ return this.request({ method: "GET", path: "/v1/billing/credits", ...input.includeCommercial === true ? { query: { includeCommercial: "true" } } : {} });
129
129
  }
130
130
  listAICreditBudgets() {
131
131
  return this.request({ method: "GET", path: "/v1/billing/credits/budgets" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvira/opencode",
3
- "version": "0.1.94",
3
+ "version": "0.1.95",
4
4
  "description": "OpenCode host lifecycle integration for Vira",
5
5
  "keywords": [
6
6
  "opencode",