@tryvira/opencode 0.1.40 → 0.1.42
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 +9 -2
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -744,7 +744,7 @@ var ViraClient = class {
|
|
|
744
744
|
if (input.input === void 0 || input.input === null) throw new Error("SDK_TASKRUN_INPUT_REQUIRED");
|
|
745
745
|
const id = () => globalThis.crypto?.randomUUID?.() ?? `${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
746
746
|
const requestId = input.requestId ?? `sdk-task-run-${id()}`;
|
|
747
|
-
return this.startTaskRun({ taskRunId: input.taskRunId ?? `task-run-${id()}`, requestId, input: input.input, ...input.conversationId ? { conversationId: input.conversationId } : {}, ...input.episodeId ? { episodeId: input.episodeId } : {}, ...input.traceRootRef ? { traceRootRef: input.traceRootRef } : {}, ...input.budget ? { budget: input.budget } : {}, ...input.connectionId ? { connectionId: input.connectionId } : {} }, options);
|
|
747
|
+
return this.startTaskRun({ taskRunId: input.taskRunId ?? `task-run-${id()}`, requestId, input: input.input, ...input.conversationId ? { conversationId: input.conversationId } : {}, ...input.episodeId ? { episodeId: input.episodeId } : {}, ...input.traceRootRef ? { traceRootRef: input.traceRootRef } : {}, ...input.budget ? { budget: input.budget } : {}, ...input.connectionId ? { connectionId: input.connectionId } : {}, ...input.hostCapabilities ? { hostCapabilities: [...input.hostCapabilities] } : {} }, options);
|
|
748
748
|
}
|
|
749
749
|
getTaskRun(taskRunId) {
|
|
750
750
|
required(taskRunId, "SDK_TASKRUN_ID_REQUIRED");
|
|
@@ -1330,7 +1330,14 @@ function createViraHostRuntime(client, config) {
|
|
|
1330
1330
|
if (!semantic) return { status: "unavailable", reasonCode: "VIRA_SEMANTIC_UNAVAILABLE" };
|
|
1331
1331
|
if (semantic.multiTask === true && semantic.taskKeys?.length > 1 && typeof client.startTaskRunFromPrompt === "function") {
|
|
1332
1332
|
try {
|
|
1333
|
-
const
|
|
1333
|
+
const hostCapabilities = [
|
|
1334
|
+
...capabilities.canObserveModel ? ["conversation_input", "conversation_output", "model_call"] : [],
|
|
1335
|
+
...capabilities.canInjectContext ? ["behavior_projection"] : [],
|
|
1336
|
+
...capabilities.canInterceptToolBefore ? ["tool_selection", "tool_execution"] : [],
|
|
1337
|
+
...capabilities.canPreventSideEffect ? ["external_action"] : [],
|
|
1338
|
+
...capabilities.canInspectToolAfter ? ["tool_result"] : []
|
|
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");
|
|
1334
1341
|
const admittedBody = bodyOf(admitted);
|
|
1335
1342
|
const taskRun = admittedBody.taskRun && typeof admittedBody.taskRun === "object" ? admittedBody.taskRun : {};
|
|
1336
1343
|
const taskRunId = typeof taskRun.taskRunId === "string" ? taskRun.taskRunId : `host-task-run-${request.requestId}`;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryvira/opencode",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.42",
|
|
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.64"},
|
|
11
11
|
"peerDependencies": {"effect": "^4.0.0"},
|
|
12
12
|
"engines": {"node": ">=20"},
|
|
13
13
|
"license": "MIT"
|