@tangle-network/agent-interface 0.5.0 → 0.7.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.
- package/dist/agent-profile.d.ts +13 -0
- package/dist/harness.d.ts +40 -0
- package/dist/harness.js +32 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/profile-schema.d.ts +16 -0
- package/dist/profile-schema.js +1 -0
- package/package.json +1 -1
package/dist/agent-profile.d.ts
CHANGED
|
@@ -84,6 +84,14 @@ export interface AgentProfileResources {
|
|
|
84
84
|
*/
|
|
85
85
|
failOnError?: boolean;
|
|
86
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Portable reasoning/thinking effort. Backends map it to their native control at materialization:
|
|
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`).
|
|
93
|
+
*/
|
|
94
|
+
export type ReasoningEffort = 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'ultracode';
|
|
87
95
|
/**
|
|
88
96
|
* Model selection hints for backends.
|
|
89
97
|
*/
|
|
@@ -100,6 +108,11 @@ export interface AgentProfileModelHints {
|
|
|
100
108
|
* Optional provider preference hint.
|
|
101
109
|
*/
|
|
102
110
|
provider?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Reasoning/thinking effort hint — a first-class, portable model dimension (not buried in
|
|
113
|
+
* `extensions`). Backends map it to their native control at materialization.
|
|
114
|
+
*/
|
|
115
|
+
reasoningEffort?: ReasoningEffort;
|
|
103
116
|
/**
|
|
104
117
|
* Backend-agnostic model metadata/hints.
|
|
105
118
|
*/
|
|
@@ -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;
|
package/dist/harness.js
ADDED
|
@@ -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
package/dist/index.js
CHANGED
package/dist/profile-schema.d.ts
CHANGED
|
@@ -116,6 +116,14 @@ export declare const agentProfileModelHintsSchema: z.ZodObject<{
|
|
|
116
116
|
default: z.ZodOptional<z.ZodString>;
|
|
117
117
|
small: z.ZodOptional<z.ZodString>;
|
|
118
118
|
provider: z.ZodOptional<z.ZodString>;
|
|
119
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
120
|
+
none: "none";
|
|
121
|
+
low: "low";
|
|
122
|
+
medium: "medium";
|
|
123
|
+
high: "high";
|
|
124
|
+
xhigh: "xhigh";
|
|
125
|
+
ultracode: "ultracode";
|
|
126
|
+
}>>;
|
|
119
127
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
120
128
|
}, z.core.$strip>;
|
|
121
129
|
export declare const agentProfilePromptSchema: z.ZodObject<{
|
|
@@ -201,6 +209,14 @@ export declare const agentProfileSchema: z.ZodObject<{
|
|
|
201
209
|
default: z.ZodOptional<z.ZodString>;
|
|
202
210
|
small: z.ZodOptional<z.ZodString>;
|
|
203
211
|
provider: z.ZodOptional<z.ZodString>;
|
|
212
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
213
|
+
none: "none";
|
|
214
|
+
low: "low";
|
|
215
|
+
medium: "medium";
|
|
216
|
+
high: "high";
|
|
217
|
+
xhigh: "xhigh";
|
|
218
|
+
ultracode: "ultracode";
|
|
219
|
+
}>>;
|
|
204
220
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
205
221
|
}, z.core.$strip>>;
|
|
206
222
|
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
|
package/dist/profile-schema.js
CHANGED
|
@@ -37,6 +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
41
|
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
41
42
|
});
|
|
42
43
|
export const agentProfilePromptSchema = z.object({
|