@tangle-network/agent-interface 0.6.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/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/package.json +1 -1
|
@@ -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