@tangle-network/agent-interface 0.6.0 → 0.8.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.
@@ -87,11 +87,14 @@ export interface AgentProfileResources {
87
87
  /**
88
88
  * Portable reasoning/thinking effort. Backends map it to their native control at materialization:
89
89
  * codex `model_reasoning_effort`, kimi `--thinking`/`--no-thinking`, claude thinking budget.
90
- * Ordered low→high: `none` = no extended thinking; `ultracode` = maximum (claude-code's
91
- * "ultracode" run mode). A backend without a matching native tier clamps to its nearest
92
- * (e.g. codex maps `xhigh`/`ultracode` `high`).
90
+ * Ordered low→high:
91
+ * - `none` — extended thinking OFF (no reasoning budget at all)
92
+ * - `minimal` — thinking ON, the lowest budget (distinct from `none`)
93
+ * - `low` / `medium` / `high` / `xhigh`
94
+ * - `ultracode` — maximum (claude-code's "ultracode" run mode; codex's `max` reconciles here).
95
+ * A backend without a matching native tier clamps to its nearest (e.g. codex maps `xhigh`/`ultracode` → `high`).
93
96
  */
94
- export type ReasoningEffort = 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'ultracode';
97
+ export type ReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'ultracode';
95
98
  /**
96
99
  * Model selection hints for backends.
97
100
  */
@@ -0,0 +1,40 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * The execution runner for an agent — WHICH runtime materializes and runs an `AgentProfile`.
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).
9
+ *
10
+ * `cli-base` is the router-backed mode — a plain multi-turn router call (a reviewer, a cheap judge,
11
+ * a one-shot) with no full coding-agent harness. The rest are full agentic harnesses run in a
12
+ * sandbox or locally via the CLI bridge.
13
+ *
14
+ * Some values are input aliases that collapse to a base runner (`claude`/`claudish` → `claude-code`,
15
+ * `kimi` → `kimi-code`); normalize with {@link canonicalizeHarness} before keying per-runner config.
16
+ */
17
+ export type HarnessType = "claude-code" | "claude" | "claudish" | "nanoclaw" | "codex" | "opencode" | "kimi-code" | "kimi" | "pi" | "gemini" | "hermes" | "openclaw" | "amp" | "factory-droids" | "acp" | "cli-base";
18
+ /** Runtime validator for {@link HarnessType}. Kept in lockstep with the type by the drift guard below. */
19
+ export declare const harnessTypeSchema: z.ZodEnum<{
20
+ "claude-code": "claude-code";
21
+ claude: "claude";
22
+ claudish: "claudish";
23
+ nanoclaw: "nanoclaw";
24
+ codex: "codex";
25
+ opencode: "opencode";
26
+ "kimi-code": "kimi-code";
27
+ kimi: "kimi";
28
+ pi: "pi";
29
+ gemini: "gemini";
30
+ hermes: "hermes";
31
+ openclaw: "openclaw";
32
+ amp: "amp";
33
+ "factory-droids": "factory-droids";
34
+ acp: "acp";
35
+ "cli-base": "cli-base";
36
+ }>;
37
+ /** Input alias → canonical base runner. Aliases accept legacy/shorthand harness names. */
38
+ export declare const harnessAliases: Partial<Record<HarnessType, HarnessType>>;
39
+ /** Collapse an alias to its base runner (idempotent on canonical values). */
40
+ export declare function canonicalizeHarness(harness: HarnessType): HarnessType;
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ /** Runtime validator for {@link HarnessType}. Kept in lockstep with the type by the drift guard below. */
3
+ export const harnessTypeSchema = z.enum([
4
+ "claude-code",
5
+ "claude",
6
+ "claudish",
7
+ "nanoclaw",
8
+ "codex",
9
+ "opencode",
10
+ "kimi-code",
11
+ "kimi",
12
+ "pi",
13
+ "gemini",
14
+ "hermes",
15
+ "openclaw",
16
+ "amp",
17
+ "factory-droids",
18
+ "acp",
19
+ "cli-base",
20
+ ]);
21
+ /** Input alias → canonical base runner. Aliases accept legacy/shorthand harness names. */
22
+ export const harnessAliases = {
23
+ claude: "claude-code",
24
+ claudish: "claude-code",
25
+ kimi: "kimi-code",
26
+ };
27
+ /** Collapse an alias to its base runner (idempotent on canonical values). */
28
+ export function canonicalizeHarness(harness) {
29
+ return harnessAliases[harness] ?? harness;
30
+ }
31
+ const _harnessSchemaMatchesType = true;
32
+ void _harnessSchemaMatchesType;
package/dist/index.d.ts CHANGED
@@ -579,4 +579,5 @@ export interface SdkProviderAdapter {
579
579
  submitQuestionAnswer?(answers: Record<string, string[]>): Promise<void>;
580
580
  }
581
581
  export * from "./agent-profile.js";
582
+ export * from "./harness.js";
582
583
  export * from "./profile-schema.js";
package/dist/index.js CHANGED
@@ -123,4 +123,5 @@ export function resolveNativeWebTools(tools) {
123
123
  return posture;
124
124
  }
125
125
  export * from "./agent-profile.js";
126
+ export * from "./harness.js";
126
127
  export * from "./profile-schema.js";
@@ -118,6 +118,7 @@ export declare const agentProfileModelHintsSchema: z.ZodObject<{
118
118
  provider: z.ZodOptional<z.ZodString>;
119
119
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
120
120
  none: "none";
121
+ minimal: "minimal";
121
122
  low: "low";
122
123
  medium: "medium";
123
124
  high: "high";
@@ -211,6 +212,7 @@ export declare const agentProfileSchema: z.ZodObject<{
211
212
  provider: z.ZodOptional<z.ZodString>;
212
213
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
213
214
  none: "none";
215
+ minimal: "minimal";
214
216
  low: "low";
215
217
  medium: "medium";
216
218
  high: "high";
@@ -37,7 +37,7 @@ export const agentProfileModelHintsSchema = z.object({
37
37
  default: z.string().optional(),
38
38
  small: z.string().optional(),
39
39
  provider: z.string().optional(),
40
- reasoningEffort: z.enum(['none', 'low', 'medium', 'high', 'xhigh', 'ultracode']).optional(),
40
+ reasoningEffort: z.enum(['none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'ultracode']).optional(),
41
41
  metadata: z.record(z.string(), z.unknown()).optional(),
42
42
  });
43
43
  export const agentProfilePromptSchema = z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-interface",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",