@tryvira/opencode 0.1.62 → 0.1.63
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/dist/index.js +21 -12
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
import { createHash as createHash2 } from "node:crypto";
|
|
3
3
|
|
|
4
4
|
// ../../sdks/js-client.ts
|
|
5
|
+
var listQuery = (options) => ({
|
|
6
|
+
...options.limit === void 0 ? {} : { limit: String(options.limit) },
|
|
7
|
+
...options.cursor ? { cursor: options.cursor } : {},
|
|
8
|
+
...options.status ? { status: options.status } : {},
|
|
9
|
+
...options.search ? { search: options.search } : {}
|
|
10
|
+
});
|
|
5
11
|
var ViraApiError = class extends Error {
|
|
6
12
|
status;
|
|
7
13
|
body;
|
|
@@ -172,8 +178,8 @@ var ViraClient = class {
|
|
|
172
178
|
idempotencyKey: input.idempotencyKey
|
|
173
179
|
});
|
|
174
180
|
}
|
|
175
|
-
listAISystems() {
|
|
176
|
-
return this.request({ method: "GET", path: "/v1/ai-systems" });
|
|
181
|
+
listAISystems(options = {}) {
|
|
182
|
+
return this.request({ method: "GET", path: "/v1/ai-systems", query: listQuery(options) });
|
|
177
183
|
}
|
|
178
184
|
async deleteAISystem(systemId, options = {}) {
|
|
179
185
|
required(systemId, "SDK_SYSTEM_ID_REQUIRED");
|
|
@@ -381,10 +387,11 @@ var ViraClient = class {
|
|
|
381
387
|
path: `/v1/ai-systems/${encodeURIComponent(systemId)}/inventory`
|
|
382
388
|
});
|
|
383
389
|
}
|
|
384
|
-
listPacks() {
|
|
390
|
+
listPacks(options = {}) {
|
|
385
391
|
return this.request({
|
|
386
392
|
method: "GET",
|
|
387
|
-
path: "/v1/packs"
|
|
393
|
+
path: "/v1/packs",
|
|
394
|
+
query: listQuery(options)
|
|
388
395
|
});
|
|
389
396
|
}
|
|
390
397
|
async deletePack(packId, options = {}) {
|
|
@@ -590,10 +597,11 @@ var ViraClient = class {
|
|
|
590
597
|
required(input.confirmation.acknowledgedAt, "SDK_ACTION_CONFIRMATION_TIME_REQUIRED");
|
|
591
598
|
return this.request({ method: "POST", path: "/v1/runtime/actions/approvals", body: { sessionId: input.sessionId, dataVersion: input.dataVersion, proposal: input.proposal, confirmation: input.confirmation, ...input.ttlSeconds !== void 0 ? { ttlSeconds: input.ttlSeconds } : {} } });
|
|
592
599
|
}
|
|
593
|
-
listBehaviorStrategies() {
|
|
600
|
+
listBehaviorStrategies(options = {}) {
|
|
594
601
|
return this.request({
|
|
595
602
|
method: "GET",
|
|
596
|
-
path: "/v1/behavior-strategies"
|
|
603
|
+
path: "/v1/behavior-strategies",
|
|
604
|
+
query: listQuery(options)
|
|
597
605
|
});
|
|
598
606
|
}
|
|
599
607
|
async deleteBehaviorStrategy(strategyId, options = {}) {
|
|
@@ -616,8 +624,8 @@ var ViraClient = class {
|
|
|
616
624
|
body: { definition, ...id ? { id } : {} }
|
|
617
625
|
});
|
|
618
626
|
}
|
|
619
|
-
listSemanticTasks() {
|
|
620
|
-
return this.request({ method: "GET", path: "/v1/semantic-tasks" });
|
|
627
|
+
listSemanticTasks(options = {}) {
|
|
628
|
+
return this.request({ method: "GET", path: "/v1/semantic-tasks", query: listQuery(options) });
|
|
621
629
|
}
|
|
622
630
|
async deleteSemanticTask(taskId, options = {}) {
|
|
623
631
|
required(taskId, "SDK_SEMANTIC_TASK_ID_REQUIRED");
|
|
@@ -629,8 +637,8 @@ var ViraClient = class {
|
|
|
629
637
|
const body = { ...task, ...options.id ? { id: options.id } : {} };
|
|
630
638
|
return this.request({ method: "POST", path: "/v1/semantic-tasks", body }, { idempotencyKey: options.idempotencyKey ?? await contentIdempotencyKey(`sdk:semantic-task:${task.taskKey}`, body) });
|
|
631
639
|
}
|
|
632
|
-
listBehaviorPoints() {
|
|
633
|
-
return this.request({ method: "GET", path: "/v1/behavior-points" });
|
|
640
|
+
listBehaviorPoints(options = {}) {
|
|
641
|
+
return this.request({ method: "GET", path: "/v1/behavior-points", query: listQuery(options) });
|
|
634
642
|
}
|
|
635
643
|
async deleteBehaviorPoint(pointId, options = {}) {
|
|
636
644
|
required(pointId, "SDK_BEHAVIOR_POINT_ID_REQUIRED");
|
|
@@ -785,10 +793,11 @@ var ViraClient = class {
|
|
|
785
793
|
if (!Number.isInteger(expectedVersion) || expectedVersion < 0) throw new Error("SDK_TASKRUN_STATE_VERSION_REQUIRED");
|
|
786
794
|
return this.request({ method: "POST", path: `/v1/task-runs/${encodeURIComponent(taskRunId)}/retry`, body: { expectedVersion } }, { idempotencyKey: options.idempotencyKey ?? `sdk:task-run:retry:${taskRunId}:${expectedVersion}` });
|
|
787
795
|
}
|
|
788
|
-
listBehaviorPrograms() {
|
|
796
|
+
listBehaviorPrograms(options = {}) {
|
|
789
797
|
return this.request({
|
|
790
798
|
method: "GET",
|
|
791
|
-
path: "/v1/behavior-programs"
|
|
799
|
+
path: "/v1/behavior-programs",
|
|
800
|
+
query: listQuery(options)
|
|
792
801
|
});
|
|
793
802
|
}
|
|
794
803
|
listCapabilities(options = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryvira/opencode",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.63",
|
|
4
4
|
"description": "OpenCode host lifecycle integration for Vira",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"pack:check": "npm run build && node ../../scripts/opencode-plugin-smoke.mjs && node ../../scripts/opencode-plugin-host-acceptance.mjs"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@tryvira/sdk": "0.1.
|
|
19
|
+
"@tryvira/sdk": "0.1.69"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"effect": "^4.0.0"
|