@tryvira/opencode 0.1.39 → 0.1.41

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.39
1
+ # `@tryvira/opencode` 0.1.41
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
package/dist/index.js CHANGED
@@ -509,9 +509,21 @@ var ViraClient = class {
509
509
  );
510
510
  }
511
511
  async resolveSemanticRuntime(input) {
512
- const semantic = await this.resolveSemantic(input);
512
+ let semantic = await this.resolveSemantic(input);
513
513
  if (!semantic) return null;
514
- const body = semantic.body;
514
+ let body = semantic.body;
515
+ if (body.replayed === true && !Array.isArray(body.capsules)) {
516
+ const replayRequestId = `${input.requestId ?? "sdk-semantic"}:rehydrate:${Date.now()}`;
517
+ const refreshed = await this.resolveSemantic({
518
+ ...input,
519
+ requestId: replayRequestId,
520
+ idempotencyKey: `sdk:semantic:rehydrate:${replayRequestId}`
521
+ });
522
+ if (refreshed) {
523
+ semantic = refreshed;
524
+ body = refreshed.body;
525
+ }
526
+ }
515
527
  const receipt = body.receipt && typeof body.receipt === "object" ? body.receipt : {};
516
528
  if (receipt.outcome !== "select" || typeof receipt.taskKey !== "string")
517
529
  return { semantic, runtime: null, taskKeys: [], capsules: [], multiTask: false };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@tryvira/opencode",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "description": "OpenCode host lifecycle integration for Vira",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "exports": {".": "./dist/index.js"},
8
8
  "files": ["dist/index.js", "README.md"],
9
9
  "scripts": {"build": "node ../../scripts/build-opencode-plugin.mjs", "pack:check": "npm run build && node ../../scripts/opencode-plugin-smoke.mjs && node ../../scripts/opencode-plugin-host-acceptance.mjs"},
10
- "dependencies": {"@tryvira/sdk": "0.1.62"},
10
+ "dependencies": {"@tryvira/sdk": "0.1.63"},
11
11
  "peerDependencies": {"effect": "^4.0.0"},
12
12
  "engines": {"node": ">=20"},
13
13
  "license": "MIT"