@karowanorg/orc-harness-codex 0.1.0 → 0.1.2

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 CHANGED
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * codex harness: drives `codex app-server` (codex-cli 0.144.x) over
3
- * newline-delimited JSON-RPC on stdio. The server process is spawned THROUGH
4
- * the provided executor, so the same harness works locally and over ssh —
5
- * JSON-RPC simply flows through the ssh pipes.
3
+ * newline-delimited JSON-RPC on stdio. The server process is spawned through
4
+ * the provided executor.
6
5
  *
7
6
  * Wire protocol notes (verified empirically against codex-cli 0.144.5 and its
8
7
  * `codex app-server generate-json-schema` output):
@@ -84,6 +83,7 @@ export function createCodexHarness(options = {}) {
84
83
  const appServerCommand = options.appServerCommand ?? ["codex", "app-server"];
85
84
  const interruptGraceMs = options.interruptGraceMs ?? 2000;
86
85
  const clientInfo = options.clientInfo ?? { name: "orc", version: "0.1.0" };
86
+ const initializeCapabilities = { experimentalApi: true, requestAttestation: false };
87
87
  const costRates = loadCostRates(options.costRates);
88
88
  async function discover(ctx) {
89
89
  const base = {
@@ -150,7 +150,7 @@ export function createCodexHarness(options = {}) {
150
150
  clearTimeout(timer);
151
151
  }
152
152
  };
153
- await withTimeout(rpc.request("initialize", { clientInfo }), 20_000);
153
+ await withTimeout(rpc.request("initialize", { clientInfo, capabilities: initializeCapabilities }), 20_000);
154
154
  rpc.notify("initialized", {});
155
155
  const res = await withTimeout(rpc.request("model/list", {}), 20_000);
156
156
  const visible = (res.data ?? []).filter((m) => !m.hidden && typeof m.id === "string");
@@ -502,7 +502,7 @@ export function createCodexHarness(options = {}) {
502
502
  else
503
503
  ctx.signal.addEventListener("abort", onAbort, { once: true });
504
504
  try {
505
- await rpc.request("initialize", { clientInfo });
505
+ await rpc.request("initialize", { clientInfo, capabilities: initializeCapabilities });
506
506
  rpc.notify("initialized", {});
507
507
  const developerInstructions = req.system.trim() || undefined;
508
508
  if (req.sessionId) {
package/dist/rpc.d.ts CHANGED
@@ -12,8 +12,7 @@ export interface JsonRpcClientOptions {
12
12
  }
13
13
  /**
14
14
  * Minimal newline-delimited JSON-RPC 2.0 client over a Proc's stdio.
15
- * Hand-rolled on purpose: the same client works locally and across ssh,
16
- * because the executor provides the pipes.
15
+ * Hand-rolled on purpose: the executor provides the pipes.
17
16
  */
18
17
  export declare class JsonRpcClient {
19
18
  private readonly proc;
package/dist/rpc.js CHANGED
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * Minimal newline-delimited JSON-RPC 2.0 client over a Proc's stdio.
3
- * Hand-rolled on purpose: the same client works locally and across ssh,
4
- * because the executor provides the pipes.
3
+ * Hand-rolled on purpose: the executor provides the pipes.
5
4
  */
6
5
  export class JsonRpcClient {
7
6
  proc;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@karowanorg/orc-harness-codex",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "license": "0BSD",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "dependencies": {
8
- "@karowanorg/orc-core": "^0.1.0",
9
- "@karowanorg/orc-executors": "^0.1.0"
8
+ "@karowanorg/orc-core": "^0.1.1",
9
+ "@karowanorg/orc-executors": "^0.1.1"
10
10
  },
11
11
  "description": "Codex harness for orc: codex app-server JSON-RPC through the executor.",
12
12
  "types": "dist/index.d.ts",