@karowanorg/orc-harness-codex 0.1.1 → 0.1.3
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/harness.js +9 -2
- package/package.json +2 -2
package/dist/harness.js
CHANGED
|
@@ -83,6 +83,7 @@ export function createCodexHarness(options = {}) {
|
|
|
83
83
|
const appServerCommand = options.appServerCommand ?? ["codex", "app-server"];
|
|
84
84
|
const interruptGraceMs = options.interruptGraceMs ?? 2000;
|
|
85
85
|
const clientInfo = options.clientInfo ?? { name: "orc", version: "0.1.0" };
|
|
86
|
+
const initializeCapabilities = { experimentalApi: true, requestAttestation: false };
|
|
86
87
|
const costRates = loadCostRates(options.costRates);
|
|
87
88
|
async function discover(ctx) {
|
|
88
89
|
const base = {
|
|
@@ -149,7 +150,7 @@ export function createCodexHarness(options = {}) {
|
|
|
149
150
|
clearTimeout(timer);
|
|
150
151
|
}
|
|
151
152
|
};
|
|
152
|
-
await withTimeout(rpc.request("initialize", { clientInfo }), 20_000);
|
|
153
|
+
await withTimeout(rpc.request("initialize", { clientInfo, capabilities: initializeCapabilities }), 20_000);
|
|
153
154
|
rpc.notify("initialized", {});
|
|
154
155
|
const res = await withTimeout(rpc.request("model/list", {}), 20_000);
|
|
155
156
|
const visible = (res.data ?? []).filter((m) => !m.hidden && typeof m.id === "string");
|
|
@@ -501,7 +502,7 @@ export function createCodexHarness(options = {}) {
|
|
|
501
502
|
else
|
|
502
503
|
ctx.signal.addEventListener("abort", onAbort, { once: true });
|
|
503
504
|
try {
|
|
504
|
-
await rpc.request("initialize", { clientInfo });
|
|
505
|
+
await rpc.request("initialize", { clientInfo, capabilities: initializeCapabilities });
|
|
505
506
|
rpc.notify("initialized", {});
|
|
506
507
|
const developerInstructions = req.system.trim() || undefined;
|
|
507
508
|
if (req.sessionId) {
|
|
@@ -511,6 +512,9 @@ export function createCodexHarness(options = {}) {
|
|
|
511
512
|
...(runtimeWorkspaceRoots ? { runtimeWorkspaceRoots } : {}),
|
|
512
513
|
approvalPolicy,
|
|
513
514
|
...(sandbox !== undefined ? { sandbox } : {}), // omit -> inherit user's config default
|
|
515
|
+
...(req.sandbox && req.networkAccess
|
|
516
|
+
? { config: { sandbox_workspace_write: { network_access: true } } }
|
|
517
|
+
: {}),
|
|
514
518
|
...(developerInstructions ? { developerInstructions } : {}),
|
|
515
519
|
});
|
|
516
520
|
threadId = resumed.thread?.id ?? req.sessionId;
|
|
@@ -521,6 +525,9 @@ export function createCodexHarness(options = {}) {
|
|
|
521
525
|
...(runtimeWorkspaceRoots ? { runtimeWorkspaceRoots } : {}),
|
|
522
526
|
approvalPolicy,
|
|
523
527
|
...(sandbox !== undefined ? { sandbox } : {}), // omit -> inherit user's config default
|
|
528
|
+
...(req.sandbox && req.networkAccess
|
|
529
|
+
? { config: { sandbox_workspace_write: { network_access: true } } }
|
|
530
|
+
: {}),
|
|
524
531
|
...(developerInstructions ? { developerInstructions } : {}),
|
|
525
532
|
});
|
|
526
533
|
threadId = started.thread?.id;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@karowanorg/orc-harness-codex",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"license": "0BSD",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@karowanorg/orc-core": "^0.1.
|
|
8
|
+
"@karowanorg/orc-core": "^0.1.2",
|
|
9
9
|
"@karowanorg/orc-executors": "^0.1.1"
|
|
10
10
|
},
|
|
11
11
|
"description": "Codex harness for orc: codex app-server JSON-RPC through the executor.",
|