@tangle-network/agent-interface 0.16.0 → 0.17.1
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/agent-profile.d.ts
CHANGED
|
@@ -92,7 +92,8 @@ export interface AgentProfileResources {
|
|
|
92
92
|
* - `minimal` — thinking ON, the lowest budget (distinct from `none`)
|
|
93
93
|
* - `low` / `medium` / `high` / `xhigh`
|
|
94
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 `
|
|
95
|
+
* A backend without a matching native tier clamps to its nearest (e.g. codex maps `ultracode` → `xhigh`
|
|
96
|
+
* on models that support it).
|
|
96
97
|
*/
|
|
97
98
|
export type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "ultracode";
|
|
98
99
|
/**
|
|
@@ -11,9 +11,10 @@ import { type HarnessType } from "./harness.js";
|
|
|
11
11
|
* cli-bridge backends, the sandbox UI pickers, and the router all read one truth instead of each
|
|
12
12
|
* hand-rolling a divergent copy.
|
|
13
13
|
*
|
|
14
|
-
* Grounded in cli-bridge's real backend clamps (codex
|
|
15
|
-
* carries the full range, cli-base has no agent) — NOT a guessed matrix. The
|
|
16
|
-
* capability (does this specific model reason at all) is dynamic catalog data the
|
|
14
|
+
* Grounded in cli-bridge's real backend clamps (codex is `low..xhigh` for current models, kimi is
|
|
15
|
+
* binary on/off, claude carries the full range, cli-base has no agent) — NOT a guessed matrix. The
|
|
16
|
+
* per-MODEL reasoning capability (does this specific model reason at all) is dynamic catalog data the
|
|
17
|
+
* caller supplies.
|
|
17
18
|
*/
|
|
18
19
|
/** low → high. `none` = thinking off; `ultracode` = max (claude-code mode). */
|
|
19
20
|
export declare const reasoningLadder: readonly ReasoningEffort[];
|
|
@@ -43,7 +44,8 @@ export declare function snapModelToHarness(harness: HarnessType, modelId: string
|
|
|
43
44
|
* `opencode` for everything else.
|
|
44
45
|
*/
|
|
45
46
|
export declare function snapHarnessToModel(harness: HarnessType, modelId: string): HarnessType;
|
|
46
|
-
/** The reasoning efforts a harness can express, independent of model —
|
|
47
|
+
/** The reasoning efforts a harness can express, independent of model — its explicit override set, or
|
|
48
|
+
* `none` up to its ceiling (default `ultracode` for router/model-driven harnesses). */
|
|
47
49
|
export declare function harnessReasoningEfforts(harness: HarnessType): readonly ReasoningEffort[];
|
|
48
50
|
/** What the caller knows about a model's own reasoning capability (from a model catalog). */
|
|
49
51
|
export interface ModelReasoningCapability {
|
|
@@ -10,9 +10,10 @@ import { canonicalizeHarness } from "./harness.js";
|
|
|
10
10
|
* cli-bridge backends, the sandbox UI pickers, and the router all read one truth instead of each
|
|
11
11
|
* hand-rolling a divergent copy.
|
|
12
12
|
*
|
|
13
|
-
* Grounded in cli-bridge's real backend clamps (codex
|
|
14
|
-
* carries the full range, cli-base has no agent) — NOT a guessed matrix. The
|
|
15
|
-
* capability (does this specific model reason at all) is dynamic catalog data the
|
|
13
|
+
* Grounded in cli-bridge's real backend clamps (codex is `low..xhigh` for current models, kimi is
|
|
14
|
+
* binary on/off, claude carries the full range, cli-base has no agent) — NOT a guessed matrix. The
|
|
15
|
+
* per-MODEL reasoning capability (does this specific model reason at all) is dynamic catalog data the
|
|
16
|
+
* caller supplies.
|
|
16
17
|
*/
|
|
17
18
|
/** low → high. `none` = thinking off; `ultracode` = max (claude-code mode). */
|
|
18
19
|
export const reasoningLadder = [
|
|
@@ -122,22 +123,43 @@ export function snapHarnessToModel(harness, modelId) {
|
|
|
122
123
|
}
|
|
123
124
|
// ── Reasoning-effort support ──────────────────────────────────────────────────
|
|
124
125
|
/**
|
|
125
|
-
* The
|
|
126
|
-
* in cli-bridge
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* `
|
|
126
|
+
* The explicit reasoning-effort set a harness's runtime accepts when it ISN'T a plain `none…ceiling`
|
|
127
|
+
* slice — grounded in the cli-bridge adapters (NOT the canonical ladder):
|
|
128
|
+
* - codex: current models advertise `low|medium|high|xhigh`; `none` is omitted (use `auto`) and
|
|
129
|
+
* legacy `minimal` requests clamp up to `low`.
|
|
130
|
+
* - claude-code: `--effort` accepts `low|medium|high|xhigh|max`. `ultracode` is the ladder's stand-in
|
|
131
|
+
* for claude's `max` (clamped at runtime); `minimal`→`low` and `none`/`auto`→no flag, so both are
|
|
132
|
+
* dropped as redundant.
|
|
133
|
+
* - pi / openclaw: `--thinking` accepts `minimal…xhigh` (max/ultracode clamp to `xhigh`; no `none`).
|
|
134
|
+
* - kimi-code: `--thinking` is BINARY (off/on) — `minimal` is the only value that emits
|
|
135
|
+
* `--no-thinking`, `high` is "thinking on". So two levels, not five.
|
|
136
|
+
*/
|
|
137
|
+
const harnessReasoningEffortsOverride = {
|
|
138
|
+
codex: ["low", "medium", "high", "xhigh"],
|
|
139
|
+
"claude-code": ["low", "medium", "high", "xhigh", "ultracode"],
|
|
140
|
+
pi: ["minimal", "low", "medium", "high", "xhigh"],
|
|
141
|
+
openclaw: ["minimal", "low", "medium", "high", "xhigh"],
|
|
142
|
+
"kimi-code": ["minimal", "high"],
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* The ceiling for harnesses whose set IS a plain `none…ceiling` slice. Only the no-thinking runners
|
|
146
|
+
* need an entry (`cli-base` has no agent; `nanoclaw` sends no thinking flag). Harnesses with a
|
|
147
|
+
* provider-clamped or non-contiguous set live in {@link harnessReasoningEffortsOverride}; router /
|
|
148
|
+
* model-driven harnesses (opencode, gemini, …) have no entry → default to the full ladder, narrowed
|
|
149
|
+
* by the model's own capability.
|
|
130
150
|
*/
|
|
131
151
|
const harnessReasoningCeiling = {
|
|
132
152
|
"cli-base": "none",
|
|
133
|
-
codex: "high",
|
|
134
|
-
"kimi-code": "high",
|
|
135
|
-
"claude-code": "ultracode",
|
|
136
153
|
nanoclaw: "none",
|
|
137
154
|
};
|
|
138
|
-
/** The reasoning efforts a harness can express, independent of model —
|
|
155
|
+
/** The reasoning efforts a harness can express, independent of model — its explicit override set, or
|
|
156
|
+
* `none` up to its ceiling (default `ultracode` for router/model-driven harnesses). */
|
|
139
157
|
export function harnessReasoningEfforts(harness) {
|
|
140
|
-
const
|
|
158
|
+
const canonical = canonicalizeHarness(harness);
|
|
159
|
+
const override = harnessReasoningEffortsOverride[canonical];
|
|
160
|
+
if (override)
|
|
161
|
+
return override;
|
|
162
|
+
const ceiling = harnessReasoningCeiling[canonical] ?? "ultracode";
|
|
141
163
|
return reasoningLadder.slice(0, reasoningLadder.indexOf(ceiling) + 1);
|
|
142
164
|
}
|
|
143
165
|
/**
|
|
@@ -164,8 +186,8 @@ export function reasoningEffortsFor(harness, model) {
|
|
|
164
186
|
*
|
|
165
187
|
* - model dropped: `amp` (own agent picks the model), `openclaw` (dispatcher routes by its own
|
|
166
188
|
* config), `nanoclaw` (socket-bridge runner is config/env-driven).
|
|
167
|
-
* - effort dropped: `amp
|
|
168
|
-
* the underlying CLI).
|
|
189
|
+
* - effort dropped: `amp`, `factory-droids`, `hermes`, `nanoclaw`, and `acp` (no thinking flag is
|
|
190
|
+
* plumbed to the underlying CLI — the runner reads no `reasoningEffort`).
|
|
169
191
|
*
|
|
170
192
|
* This is distinct from {@link reasoningEffortsFor} (which levels a harness can EXPRESS): a picker uses
|
|
171
193
|
* these to trim or mark harnesses up front, so a user's model/effort choice is never silently ignored.
|
|
@@ -180,6 +202,7 @@ const harnessIgnoresEffort = new Set([
|
|
|
180
202
|
"factory-droids",
|
|
181
203
|
"hermes",
|
|
182
204
|
"nanoclaw",
|
|
205
|
+
"acp",
|
|
183
206
|
]);
|
|
184
207
|
/** Whether the harness's runner honors a per-turn MODEL override (vs. picking the model itself). */
|
|
185
208
|
export function harnessHonorsModel(harness) {
|