@parcha/agentrun-harness-claude 0.1.0-beta.35 → 0.1.0-beta.36

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## 0.1.0-beta.36 (2026-11-13)
6
+
7
+ - Model defaults move to the current models. The OpenAI default (and OpenRouter's, for pi, codex and opencode) is now gpt-6.1-sol, where OpenRouter's was gpt-6-sol. The Claude Agent adapter's default is now claude-sonnet-5-5 (was claude-sonnet-4-5) and the Codex adapter's is openai/gpt-6-luna (was openai/gpt-5.4-mini). A host that relied on a default names its model; the READMEs' examples name the current ones.
8
+ - The kernel and the Claude Agent test kit drop exports nothing in AgentRun used. From `@parcha/agentrun-kernel`: the `delegate` tool (`delegateTool`, `DELEGATE_TOOL`, `DELEGATE_RESULT_SCHEMA`, `delegateProblems` and the `DelegateAgent`, `DelegateEvent` and `DelegateOptions` types). From `./kernel`: the follow-up turn (`followUpOnce`, `followUpState`, `followUpKey`, `FOLLOW_UP_EFFECT`, `FOLLOW_UP_BUDGET_REACHED`, `FOLLOW_UP_CANCELLED` and their types) and `BASH_MAX_TIMEOUT_S`. From `./process`: `lastTurnEnd`, `summarizeBatch`, `batchTranscript` and `zodFromJsonSchema`. From `@parcha/agentrun-harness-claude/testing`: `lastUserText`. An embedder that imported one of them keeps its own copy: each was a small helper, or a feature the server never wired (a follow-up turn, a delegate tool). `zodShapeFromJsonSchema` stays.
9
+ - The two harness adapters list `@parcha/agentrun-dsl` as a dev dependency, since only their tests import it, and serve's package keywords drop the retired `pi-durable`.
10
+
5
11
  ## 0.1.0-beta.35 (2026-11-11)
6
12
 
7
13
  - A capped run straight to Anthropic is no longer paused by a cap it could work under. Before each answer request on a route to `https://api.anthropic.com` (pi and claude-agent), the model proxy asks Anthropic's free token count (`POST /v1/messages/count_tokens`). It sends only the credential and version headers, and never goes through a gateway or any other base. The request's input bound is then that count plus the tool-use prompt, where before it was the body's bytes (about two to three times the tokens billed). A count that fails, says nothing or takes over 3 seconds leaves the byte bound, and the request goes on. Through OpenRouter or any other gateway the bound stays the bytes, so the cap still never passes.
package/README.md CHANGED
@@ -13,7 +13,7 @@ import { claudeAgentAdapter } from "@parcha/agentrun-harness-claude";
13
13
 
14
14
  const runNode = createHarnessRunner(
15
15
  claudeAgentAdapter({
16
- model: "claude-sonnet-4-5",
16
+ model: "claude-sonnet-5-5",
17
17
  provider: { origin: "https://api.anthropic.com", credential: () => process.env.ANTHROPIC_API_KEY! },
18
18
  sessionsDir: "/var/lib/my-host/claude-agent-sessions",
19
19
  // Optional: the SDK module and its CLI from where the host installed them (checked against the pins).
package/dist/env.d.ts CHANGED
@@ -73,8 +73,8 @@ export interface DurableEnvOptions {
73
73
  export declare const MCP_DESCRIPTION_CUT = 2048;
74
74
  export declare function durableEnv(options: DurableEnvOptions): Record<string, string>;
75
75
  /**
76
- * A Gateway model id (`anthropic/claude-sonnet-4.5`) as the native id the
77
- * CLI knows (`claude-sonnet-4-5`). The Gateway accepts both; with a Gateway
76
+ * A Gateway model id (`anthropic/claude-sonnet-5.5`) as the native id the
77
+ * CLI knows (`claude-sonnet-5-5`). The Gateway accepts both; with a Gateway
78
78
  * id the CLI logs `unrecognized_model` and does not know the model's limits.
79
79
  * Ids that are not Anthropic Gateway ids come back unchanged.
80
80
  */
package/dist/env.js CHANGED
@@ -81,8 +81,8 @@ export function durableEnv(options) {
81
81
  return env;
82
82
  }
83
83
  /**
84
- * A Gateway model id (`anthropic/claude-sonnet-4.5`) as the native id the
85
- * CLI knows (`claude-sonnet-4-5`). The Gateway accepts both; with a Gateway
84
+ * A Gateway model id (`anthropic/claude-sonnet-5.5`) as the native id the
85
+ * CLI knows (`claude-sonnet-5-5`). The Gateway accepts both; with a Gateway
86
86
  * id the CLI logs `unrecognized_model` and does not know the model's limits.
87
87
  * Ids that are not Anthropic Gateway ids come back unchanged.
88
88
  */
package/dist/harness.d.ts CHANGED
@@ -191,9 +191,9 @@ export interface ClaudeCodeHarnessOptions {
191
191
  * not: each call recorded as a built-in's (the session's model proxy decides what the provider may run). */
192
192
  providerTools?: readonly ProviderTool[];
193
193
  /**
194
- * The model, a native Anthropic id (`claude-sonnet-4-5`) or a Gateway one
195
- * (`anthropic/claude-sonnet-4.5`, passed as its native id: `nativeModelId`).
196
- * Default `claude-sonnet-4-5`.
194
+ * The model, a native Anthropic id (`claude-sonnet-5-5`) or a Gateway one
195
+ * (`anthropic/claude-sonnet-5.5`, passed as its native id: `nativeModelId`).
196
+ * Default `claude-sonnet-5-5`.
197
197
  */
198
198
  model?: string;
199
199
  /** The model of the CLI's small background calls (`nativeModelId` too). Default `model`. */
@@ -252,7 +252,7 @@ export interface ClaudeCodeHarnessOptions {
252
252
  */
253
253
  export declare function dateLine(now: Date): string;
254
254
  /** The default model. */
255
- export declare const DEFAULT_MODEL = "claude-sonnet-4-5";
255
+ export declare const DEFAULT_MODEL = "claude-sonnet-5-5";
256
256
  /** What the harness appends to the system prompt about the tools, before `instructions`, with the built-ins off and the app's tools there. */
257
257
  export declare const TOOLS_NOTE = "Your only tools are this app's, the mcp__hands__ tools; you have no shell, file, search or web tools of your own.";
258
258
  /** `TOOLS_NOTE` with WebSearch on (`providerTools: ['web_search']`) and the other built-ins off. */
package/dist/harness.js CHANGED
@@ -34,7 +34,7 @@ const dayOf = (now) => now.toISOString().slice(0, 10);
34
34
  /** The effect a user message that told its model the day is recorded under (`date:<message uuid>`, input `{ day }`). */
35
35
  const DATE_EFFECT = 'date';
36
36
  /** The default model. */
37
- export const DEFAULT_MODEL = 'claude-sonnet-4-5';
37
+ export const DEFAULT_MODEL = 'claude-sonnet-5-5';
38
38
  /** What the harness appends to the system prompt about the tools, before `instructions`, with the built-ins off and the app's tools there. */
39
39
  export const TOOLS_NOTE = `Your only tools are this app's, the mcp__${MCP_SERVER}__ tools; you have no shell, file, search or web tools of your own.`;
40
40
  /** `TOOLS_NOTE` with WebSearch on (`providerTools: ['web_search']`) and the other built-ins off. */
@@ -88,8 +88,6 @@ export interface FakeAnthropic {
88
88
  messages(): LoggedRequest[];
89
89
  close(): Promise<void>;
90
90
  }
91
- /** The last user message's text (its string content, or its text blocks), without tool results. */
92
- export declare function lastUserText(r: Pick<FakeRequest, 'messages'>): string;
93
91
  /** Why `messages` breaks the Messages API's structure, or undefined when it doesn't. */
94
92
  export declare function structureProblem(all: unknown): string | undefined;
95
93
  /** Start the fake on a free loopback port. */
@@ -31,15 +31,6 @@
31
31
  */
32
32
  import { createServer } from 'node:http';
33
33
  let toolSeq = 0;
34
- /** The last user message's text (its string content, or its text blocks), without tool results. */
35
- export function lastUserText(r) {
36
- const m = [...r.messages].reverse().find((x) => x.role === 'user');
37
- if (!m)
38
- return '';
39
- if (typeof m.content === 'string')
40
- return m.content;
41
- return m.content.filter((b) => b.type === 'text').map((b) => String(b.text)).join('\n');
42
- }
43
34
  /** Why `messages` breaks the Messages API's structure, or undefined when it doesn't. */
44
35
  export function structureProblem(all) {
45
36
  if (!Array.isArray(all) || all.length === 0)
@@ -273,7 +273,7 @@ export function fakeSdk(fake = {}) {
273
273
  delta: (d) => (pieces.push(d), wake?.()),
274
274
  end: (error) => ((over = error === undefined ? {} : { error: new Error(error) }), said.delete(id), wake?.()),
275
275
  });
276
- const request = { url: `${options.env.ANTHROPIC_BASE_URL}/v1/messages?beta=true`, model: String(options.model ?? 'claude-sonnet-4-5'), text, authorization: `Bearer ${options.env.ANTHROPIC_AUTH_TOKEN}` };
276
+ const request = { url: `${options.env.ANTHROPIC_BASE_URL}/v1/messages?beta=true`, model: String(options.model ?? 'claude-sonnet-5-5'), text, authorization: `Bearer ${options.env.ANTHROPIC_AUTH_TOKEN}` };
277
277
  child.stdin.write(`${JSON.stringify({ id, say: request })}\n`);
278
278
  for (;;) {
279
279
  while (pieces.length)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcha/agentrun-harness-claude",
3
- "version": "0.1.0-beta.35",
3
+ "version": "0.1.0-beta.36",
4
4
  "description": "The Claude Agent SDK as an AgentRun harness: the host's tools as its only tools, its model behind a loopback proxy, durable in AgentRun's own store.",
5
5
  "keywords": [
6
6
  "agentrun",
@@ -48,8 +48,7 @@
48
48
  "test": "node --test --test-concurrency=8 'test/*.test.mjs'"
49
49
  },
50
50
  "dependencies": {
51
- "@parcha/agentrun-dsl": "0.1.0-beta.35",
52
- "@parcha/agentrun-kernel": "0.1.0-beta.35"
51
+ "@parcha/agentrun-kernel": "0.1.0-beta.36"
53
52
  },
54
53
  "peerDependencies": {
55
54
  "@anthropic-ai/claude-agent-sdk": "0.3.286",
@@ -77,6 +76,7 @@
77
76
  "tag": "beta"
78
77
  },
79
78
  "devDependencies": {
80
- "@anthropic-ai/claude-agent-sdk": "0.3.286"
79
+ "@anthropic-ai/claude-agent-sdk": "0.3.286",
80
+ "@parcha/agentrun-dsl": "0.1.0-beta.36"
81
81
  }
82
82
  }