@tryvira/opencode 0.1.56 → 0.1.58
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 +1 -1
- package/dist/index.js +8 -7
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//
|
|
1
|
+
// src/index.ts
|
|
2
2
|
import { createHash as createHash2 } from "node:crypto";
|
|
3
3
|
|
|
4
|
-
// sdks/js-client.ts
|
|
4
|
+
// ../../sdks/js-client.ts
|
|
5
5
|
var ViraApiError = class extends Error {
|
|
6
6
|
status;
|
|
7
7
|
body;
|
|
@@ -1200,7 +1200,7 @@ function buildObservationRequest(event) {
|
|
|
1200
1200
|
});
|
|
1201
1201
|
}
|
|
1202
1202
|
|
|
1203
|
-
// sdks/host-lifecycle.ts
|
|
1203
|
+
// ../../sdks/host-lifecycle.ts
|
|
1204
1204
|
import { createHash } from "node:crypto";
|
|
1205
1205
|
var nonEmpty = (value, code) => {
|
|
1206
1206
|
if (typeof value !== "string" || !value.trim()) throw new Error(code);
|
|
@@ -1337,7 +1337,7 @@ function createViraHostRuntime(client, config) {
|
|
|
1337
1337
|
...capabilities.canPreventSideEffect ? ["external_action"] : [],
|
|
1338
1338
|
...capabilities.canInspectToolAfter ? ["tool_result"] : []
|
|
1339
1339
|
];
|
|
1340
|
-
const admitted = await withTimeout(client.startTaskRunFromPrompt({ input: request.input, taskRunId: `host-task-run-${request.requestId}`, requestId: request.requestId, conversationId: request.conversationId, traceRootRef: request.traceId, hostCapabilities }), timeoutMs, "SDK_HOST_TASKRUN_ADMISSION_TIMEOUT");
|
|
1340
|
+
const admitted = await withTimeout(client.startTaskRunFromPrompt({ input: request.input, taskRunId: `host-task-run-${request.requestId}`, requestId: request.requestId, conversationId: request.conversationId, traceRootRef: request.traceId, ...request.connectionId ? { connectionId: request.connectionId } : {}, hostCapabilities }), timeoutMs, "SDK_HOST_TASKRUN_ADMISSION_TIMEOUT");
|
|
1341
1341
|
const admittedBody = bodyOf(admitted);
|
|
1342
1342
|
const taskRun = admittedBody.taskRun && typeof admittedBody.taskRun === "object" ? admittedBody.taskRun : {};
|
|
1343
1343
|
const taskRunId = typeof taskRun.taskRunId === "string" ? taskRun.taskRunId : `host-task-run-${request.requestId}`;
|
|
@@ -1472,7 +1472,7 @@ function createViraHostRuntime(client, config) {
|
|
|
1472
1472
|
return Object.freeze({ mode, capabilities, connectOnce, reconnect, getConnectionIdentity: () => connectionIdentity, beforeModel, beforeTool, afterTool, executeTool, cancelTool, endSession, getProjection: (identity) => projections.get(sessionKey({ ...identity, requestId: "projection", input: "" })), supportsPostModelVerification: capabilities.canInterceptResponseBeforeDisplay });
|
|
1473
1473
|
}
|
|
1474
1474
|
|
|
1475
|
-
//
|
|
1475
|
+
// src/approval.ts
|
|
1476
1476
|
var text = (value) => typeof value === "string" ? value.trim() : "";
|
|
1477
1477
|
var record = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
1478
1478
|
var errorCode = (error) => {
|
|
@@ -1502,7 +1502,7 @@ async function authorizeWithOneShotCustomerConfirmation(input) {
|
|
|
1502
1502
|
}
|
|
1503
1503
|
}
|
|
1504
1504
|
|
|
1505
|
-
//
|
|
1505
|
+
// src/index.ts
|
|
1506
1506
|
var Plugin = { define: (plugin) => plugin };
|
|
1507
1507
|
var text2 = (value) => typeof value === "string" ? value : "";
|
|
1508
1508
|
var required2 = (value, code) => {
|
|
@@ -2083,7 +2083,7 @@ Object.assign(legacyDefault, v2Plugin, v1Fallback);
|
|
|
2083
2083
|
var server = v1Fallback.server;
|
|
2084
2084
|
var index_default = legacyDefault;
|
|
2085
2085
|
|
|
2086
|
-
//
|
|
2086
|
+
// src/runtime-entry.ts
|
|
2087
2087
|
var runtime = Object.assign(index_default, {
|
|
2088
2088
|
id: "vira",
|
|
2089
2089
|
setup: index_default.setup,
|
|
@@ -2096,5 +2096,6 @@ var runtime = Object.assign(index_default, {
|
|
|
2096
2096
|
});
|
|
2097
2097
|
var runtime_entry_default = runtime;
|
|
2098
2098
|
export {
|
|
2099
|
+
createV1PromptCache,
|
|
2099
2100
|
runtime_entry_default as default
|
|
2100
2101
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryvira/opencode",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.58",
|
|
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.
|
|
10
|
+
"dependencies": {"@tryvira/sdk": "0.1.65"},
|
|
11
11
|
"peerDependencies": {"effect": "^4.0.0"},
|
|
12
12
|
"engines": {"node": ">=20"},
|
|
13
13
|
"license": "MIT"
|