@tangle-network/agent-interface 0.19.0 → 0.20.0

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.
@@ -6,6 +6,7 @@
6
6
  * formats internally. This is the canonical home; `@tangle-network/sandbox`
7
7
  * re-exports these symbols for backward compatibility.
8
8
  */
9
+ import type { HarnessType } from "./harness.js";
9
10
  /**
10
11
  * Permission policy value for a capability.
11
12
  */
@@ -230,6 +231,19 @@ export interface AgentProfile {
230
231
  tags?: string[];
231
232
  prompt?: AgentProfilePrompt;
232
233
  model?: AgentProfileModelHints;
234
+ /**
235
+ * Preferred execution harness for this profile — the coding-CLI runtime that
236
+ * materializes and runs it (`claude-code`, `codex`, `opencode`, `pi`, …).
237
+ *
238
+ * This is an optional PREFERENCE, not part of profile IDENTITY: the same
239
+ * profile still runs on any harness, and an executor MAY override it (e.g. the
240
+ * leaderboard's `harness × model` axis sweeps a profile across every harness,
241
+ * and a supervisor spawning a worker may pick a harness per subtask). When
242
+ * unset, the caller/executor chooses. Formalizes what runtimes already read as
243
+ * `profile.harness`; making it typed also lets an improvement loop optimize
244
+ * harness routing as a first-class lever.
245
+ */
246
+ harness?: HarnessType;
233
247
  permissions?: Record<string, AgentProfilePermission>;
234
248
  tools?: Record<string, boolean>;
235
249
  mcp?: Record<string, AgentProfileMcpServer>;
package/dist/harness.d.ts CHANGED
@@ -2,10 +2,13 @@ import { z } from "zod";
2
2
  /**
3
3
  * The execution runner for an agent — WHICH runtime materializes and runs an `AgentProfile`.
4
4
  *
5
- * Harness is an EXECUTION concern chosen by the caller/executor per run, NOT part of the portable
6
- * profile identity: the same `AgentProfile` (prompt/model/skills/tools/mcp/subagents) runs on any
7
- * harness. This is the single shared enum every layer references instead of keeping its own copy
8
- * (session control, the profile materializer, the cli-bridge backends, VB profile specs).
5
+ * Harness is an EXECUTION concern, not part of profile IDENTITY: the same `AgentProfile`
6
+ * (prompt/model/skills/tools/mcp/subagents) runs on any harness. A profile MAY carry an optional
7
+ * `harness` PREFERENCE (`AgentProfile.harness`), but the caller/executor can always override it per
8
+ * run — the leaderboard's `harness × model` axis sweeps one profile across every harness, and a
9
+ * supervisor may pick a harness per spawned worker. This is the single shared enum every layer
10
+ * references instead of keeping its own copy (session control, the profile materializer, the
11
+ * cli-bridge backends, VB profile specs).
9
12
  *
10
13
  * `cli-base` is the router-backed mode — a plain multi-turn router call (a reviewer, a cheap judge,
11
14
  * a one-shot) with no full coding-agent harness. The rest are full agentic harnesses run in a
@@ -270,6 +270,24 @@ export declare const agentProfileSchema: z.ZodObject<{
270
270
  }>>;
271
271
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
272
272
  }, z.core.$strip>>;
273
+ harness: z.ZodOptional<z.ZodEnum<{
274
+ "claude-code": "claude-code";
275
+ claude: "claude";
276
+ claudish: "claudish";
277
+ nanoclaw: "nanoclaw";
278
+ codex: "codex";
279
+ opencode: "opencode";
280
+ "kimi-code": "kimi-code";
281
+ kimi: "kimi";
282
+ pi: "pi";
283
+ gemini: "gemini";
284
+ hermes: "hermes";
285
+ openclaw: "openclaw";
286
+ amp: "amp";
287
+ "factory-droids": "factory-droids";
288
+ acp: "acp";
289
+ "cli-base": "cli-base";
290
+ }>>;
273
291
  permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
274
292
  allow: "allow";
275
293
  ask: "ask";
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { harnessTypeSchema } from "./harness.js";
2
3
  import { SANDBOX_SIZE_PRESET_NAMES, } from "./sandbox-size.js";
3
4
  export const agentProfilePermissionValueSchema = z.enum([
4
5
  "allow",
@@ -140,6 +141,7 @@ export const agentProfileSchema = z.object({
140
141
  tags: z.array(z.string()).optional(),
141
142
  prompt: agentProfilePromptSchema.optional(),
142
143
  model: agentProfileModelHintsSchema.optional(),
144
+ harness: harnessTypeSchema.optional(),
143
145
  permissions: z.record(z.string(), agentProfilePermissionSchema).optional(),
144
146
  tools: z.record(z.string(), z.boolean()).optional(),
145
147
  mcp: z.record(z.string(), agentProfileMcpServerSchema).optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-interface",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",