@tangle-network/agent-interface 0.19.0 → 0.21.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/README.md +24 -0
- package/dist/agent-candidate-artifact-schema.d.ts +311 -0
- package/dist/agent-candidate-artifact-schema.js +192 -0
- package/dist/agent-candidate-code-schema.d.ts +295 -0
- package/dist/agent-candidate-code-schema.js +185 -0
- package/dist/agent-candidate-execution-plan-schema.d.ts +1193 -0
- package/dist/agent-candidate-execution-plan-schema.js +418 -0
- package/dist/agent-candidate-lineage-schema.d.ts +78 -0
- package/dist/agent-candidate-lineage-schema.js +96 -0
- package/dist/agent-candidate-profile-schema.d.ts +267 -0
- package/dist/agent-candidate-profile-schema.js +125 -0
- package/dist/agent-candidate-receipt-schema.d.ts +1081 -0
- package/dist/agent-candidate-receipt-schema.js +263 -0
- package/dist/agent-candidate-schema-common.d.ts +32 -0
- package/dist/agent-candidate-schema-common.js +251 -0
- package/dist/agent-candidate-schema.d.ts +498 -0
- package/dist/agent-candidate-schema.js +144 -0
- package/dist/agent-candidate.d.ts +518 -0
- package/dist/agent-candidate.js +6 -0
- package/dist/agent-candidate.test-fixture.d.ts +160 -0
- package/dist/agent-candidate.test-fixture.js +151 -0
- package/dist/agent-profile.d.ts +14 -0
- package/dist/harness.d.ts +7 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/interaction.d.ts +4 -4
- package/dist/profile-diff.d.ts +4 -1
- package/dist/profile-diff.js +64 -64
- package/dist/profile-schema.d.ts +19 -0
- package/dist/profile-schema.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { defineAgentCandidateBundle } from "./agent-candidate.js";
|
|
2
|
+
export const candidateSha = (digit) => `sha256:${digit.repeat(64)}`;
|
|
3
|
+
export const candidateGit = (digit) => digit.repeat(40);
|
|
4
|
+
export function candidateFixture() {
|
|
5
|
+
return defineAgentCandidateBundle({
|
|
6
|
+
schemaVersion: 1,
|
|
7
|
+
kind: "agent-candidate-bundle",
|
|
8
|
+
digestAlgorithm: "rfc8785-sha256",
|
|
9
|
+
profile: {
|
|
10
|
+
name: "repository-agent",
|
|
11
|
+
harness: "codex",
|
|
12
|
+
model: {
|
|
13
|
+
default: "openai/gpt-5.4",
|
|
14
|
+
reasoningEffort: "high",
|
|
15
|
+
},
|
|
16
|
+
prompt: { systemPrompt: "Solve the repository task." },
|
|
17
|
+
resources: {
|
|
18
|
+
files: [
|
|
19
|
+
{
|
|
20
|
+
path: ".agent/policy.json",
|
|
21
|
+
resource: {
|
|
22
|
+
kind: "inline",
|
|
23
|
+
name: "policy",
|
|
24
|
+
content: "{}",
|
|
25
|
+
sha256: candidateSha("b"),
|
|
26
|
+
byteLength: 2,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
failOnError: true,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
code: {
|
|
34
|
+
kind: "git-patch",
|
|
35
|
+
repository: {
|
|
36
|
+
kind: "github",
|
|
37
|
+
owner: "tangle-network",
|
|
38
|
+
repo: "agent-runtime",
|
|
39
|
+
},
|
|
40
|
+
baseCommit: candidateGit("1"),
|
|
41
|
+
baseTree: candidateGit("2"),
|
|
42
|
+
candidateTree: candidateGit("4"),
|
|
43
|
+
patch: {
|
|
44
|
+
format: "git-diff-binary",
|
|
45
|
+
artifact: {
|
|
46
|
+
encoding: "base64",
|
|
47
|
+
content: "ZGlmZiAtLWdpdA==",
|
|
48
|
+
sha256: candidateSha("5"),
|
|
49
|
+
byteLength: 10,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
execution: {
|
|
54
|
+
harness: "codex",
|
|
55
|
+
harnessVersion: "0.1.0",
|
|
56
|
+
launch: {
|
|
57
|
+
kind: "candidate-entrypoint",
|
|
58
|
+
interpreter: "node",
|
|
59
|
+
entrypoint: "dist/agent.js",
|
|
60
|
+
args: [{ kind: "public", value: "--mode=benchmark" }],
|
|
61
|
+
},
|
|
62
|
+
instructionDelivery: { kind: "argv-append" },
|
|
63
|
+
cwd: { workspace: "candidate", path: "." },
|
|
64
|
+
env: {
|
|
65
|
+
NODE_ENV: { kind: "public", value: "production" },
|
|
66
|
+
},
|
|
67
|
+
environment: {
|
|
68
|
+
kind: "pinned-container",
|
|
69
|
+
container: { image: "node:22", indexDigest: candidateSha("6") },
|
|
70
|
+
},
|
|
71
|
+
workspace: {
|
|
72
|
+
schemaVersion: 1,
|
|
73
|
+
kind: "agent-candidate-workspace-snapshot",
|
|
74
|
+
digest: candidateSha("c"),
|
|
75
|
+
material: {
|
|
76
|
+
schemaVersion: 1,
|
|
77
|
+
kind: "agent-candidate-workspace-manifest",
|
|
78
|
+
files: [
|
|
79
|
+
{
|
|
80
|
+
path: "dist/agent.js",
|
|
81
|
+
mode: 0o755,
|
|
82
|
+
sha256: candidateSha("d"),
|
|
83
|
+
byteLength: 42,
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
manifest: {
|
|
88
|
+
encoding: "base64",
|
|
89
|
+
content: "e30=",
|
|
90
|
+
sha256: candidateSha("c"),
|
|
91
|
+
byteLength: 2,
|
|
92
|
+
},
|
|
93
|
+
archive: {
|
|
94
|
+
encoding: "base64",
|
|
95
|
+
content: "e30=",
|
|
96
|
+
sha256: candidateSha("e"),
|
|
97
|
+
byteLength: 2,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
isolation: {
|
|
101
|
+
network: "disabled",
|
|
102
|
+
remoteIntegrations: "disabled",
|
|
103
|
+
candidateSecrets: "disabled",
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
knowledge: {
|
|
107
|
+
snapshotId: "knowledge-17",
|
|
108
|
+
manifest: {
|
|
109
|
+
locator: {
|
|
110
|
+
kind: "s3",
|
|
111
|
+
bucket: "agent-candidate-artifacts",
|
|
112
|
+
key: "knowledge/knowledge-17.json",
|
|
113
|
+
region: "us-east-1",
|
|
114
|
+
},
|
|
115
|
+
sha256: candidateSha("7"),
|
|
116
|
+
byteLength: 42,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
memory: {
|
|
120
|
+
mode: "isolated",
|
|
121
|
+
scope: "task",
|
|
122
|
+
},
|
|
123
|
+
lineage: {
|
|
124
|
+
source: "optimizer",
|
|
125
|
+
parentDigests: [candidateSha("8")],
|
|
126
|
+
runIds: ["r360-search"],
|
|
127
|
+
profileDiffIds: ["profile-diff-3"],
|
|
128
|
+
modelSnapshots: ["openai/gpt-5.4-2026-06-15"],
|
|
129
|
+
benchmark: {
|
|
130
|
+
name: "pier",
|
|
131
|
+
version: "0.3",
|
|
132
|
+
splitDigest: candidateSha("9"),
|
|
133
|
+
},
|
|
134
|
+
spend: {
|
|
135
|
+
proposal: {
|
|
136
|
+
costUsd: 3.5,
|
|
137
|
+
inputTokens: 100,
|
|
138
|
+
outputTokens: 20,
|
|
139
|
+
modelCalls: 2,
|
|
140
|
+
},
|
|
141
|
+
evaluation: {
|
|
142
|
+
costUsd: 9,
|
|
143
|
+
inputTokens: 900,
|
|
144
|
+
outputTokens: 200,
|
|
145
|
+
modelCalls: 8,
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
digest: candidateSha("a"),
|
|
150
|
+
});
|
|
151
|
+
}
|
package/dist/agent-profile.d.ts
CHANGED
|
@@ -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
|
|
6
|
-
*
|
|
7
|
-
* harness.
|
|
8
|
-
*
|
|
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
|
package/dist/index.d.ts
CHANGED
|
@@ -600,6 +600,8 @@ export interface SdkProviderAdapter {
|
|
|
600
600
|
respondToInteraction?(response: InteractionResponse): Promise<void>;
|
|
601
601
|
}
|
|
602
602
|
export * from "./interaction.js";
|
|
603
|
+
export * from "./agent-candidate.js";
|
|
604
|
+
export * from "./agent-candidate-schema.js";
|
|
603
605
|
export * from "./agent-profile.js";
|
|
604
606
|
export * from "./profile-diff.js";
|
|
605
607
|
export * from "./harness.js";
|
package/dist/index.js
CHANGED
|
@@ -123,6 +123,8 @@ export function resolveNativeWebTools(tools) {
|
|
|
123
123
|
return posture;
|
|
124
124
|
}
|
|
125
125
|
export * from "./interaction.js";
|
|
126
|
+
export * from "./agent-candidate.js";
|
|
127
|
+
export * from "./agent-candidate-schema.js";
|
|
126
128
|
export * from "./agent-profile.js";
|
|
127
129
|
export * from "./profile-diff.js";
|
|
128
130
|
export * from "./harness.js";
|
package/dist/interaction.d.ts
CHANGED
|
@@ -124,9 +124,9 @@ export declare const InteractionSubjectSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
124
124
|
}, z.core.$strip>], "type">;
|
|
125
125
|
export type InteractionSubject = z.infer<typeof InteractionSubjectSchema>;
|
|
126
126
|
export declare const InteractionOutcomeSchema: z.ZodEnum<{
|
|
127
|
+
cancelled: "cancelled";
|
|
127
128
|
accepted: "accepted";
|
|
128
129
|
declined: "declined";
|
|
129
|
-
cancelled: "cancelled";
|
|
130
130
|
}>;
|
|
131
131
|
export type InteractionOutcome = z.infer<typeof InteractionOutcomeSchema>;
|
|
132
132
|
/** Field values keyed by `InteractionField.name`. Validated against `answerSpec`. */
|
|
@@ -134,9 +134,9 @@ export declare const InteractionDataSchema: z.ZodRecord<z.ZodString, z.ZodUnion<
|
|
|
134
134
|
export type InteractionData = z.infer<typeof InteractionDataSchema>;
|
|
135
135
|
export declare const InteractionResolutionSchema: z.ZodObject<{
|
|
136
136
|
outcome: z.ZodEnum<{
|
|
137
|
+
cancelled: "cancelled";
|
|
137
138
|
accepted: "accepted";
|
|
138
139
|
declined: "declined";
|
|
139
|
-
cancelled: "cancelled";
|
|
140
140
|
}>;
|
|
141
141
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>>;
|
|
142
142
|
}, z.core.$strip>;
|
|
@@ -207,9 +207,9 @@ export declare const InteractionRequestSchema: z.ZodObject<{
|
|
|
207
207
|
}, z.core.$strip>;
|
|
208
208
|
default: z.ZodOptional<z.ZodObject<{
|
|
209
209
|
outcome: z.ZodEnum<{
|
|
210
|
+
cancelled: "cancelled";
|
|
210
211
|
accepted: "accepted";
|
|
211
212
|
declined: "declined";
|
|
212
|
-
cancelled: "cancelled";
|
|
213
213
|
}>;
|
|
214
214
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>>;
|
|
215
215
|
}, z.core.$strip>>;
|
|
@@ -223,9 +223,9 @@ export declare const InteractionRequestSchema: z.ZodObject<{
|
|
|
223
223
|
export type InteractionRequest = z.infer<typeof InteractionRequestSchema>;
|
|
224
224
|
export declare const InteractionResponseSchema: z.ZodObject<{
|
|
225
225
|
outcome: z.ZodEnum<{
|
|
226
|
+
cancelled: "cancelled";
|
|
226
227
|
accepted: "accepted";
|
|
227
228
|
declined: "declined";
|
|
228
|
-
cancelled: "cancelled";
|
|
229
229
|
}>;
|
|
230
230
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>>;
|
|
231
231
|
id: z.ZodString;
|
package/dist/profile-diff.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentProfile } from "./agent-profile.js";
|
|
2
|
-
|
|
2
|
+
declare const agentProfileDiffPropertyAxes: readonly ["prompt", "model", "harness", "permissions", "tools", "mcp", "connections", "subagents", "resources", "hooks", "modes", "confidential", "metadata", "extensions"];
|
|
3
|
+
export type AgentProfileDiffAxis = "identity" | (typeof agentProfileDiffPropertyAxes)[number];
|
|
3
4
|
export type AgentProfileRemoveList = true | readonly string[];
|
|
4
5
|
export interface AgentProfilePromptRemoval {
|
|
5
6
|
systemPrompt?: true;
|
|
@@ -19,6 +20,7 @@ export interface AgentProfileDiffRemoval {
|
|
|
19
20
|
tags?: AgentProfileRemoveList;
|
|
20
21
|
prompt?: true | AgentProfilePromptRemoval;
|
|
21
22
|
model?: AgentProfileRemoveList;
|
|
23
|
+
harness?: true;
|
|
22
24
|
permissions?: AgentProfileRemoveList;
|
|
23
25
|
tools?: AgentProfileRemoveList;
|
|
24
26
|
mcp?: AgentProfileRemoveList;
|
|
@@ -59,3 +61,4 @@ export declare function defineAgentProfileDiff<T extends AgentProfileDiff>(diff:
|
|
|
59
61
|
export declare function applyAgentProfileDiff(base: AgentProfile, diff: AgentProfileDiff): AgentProfile;
|
|
60
62
|
export declare function changedAgentProfileAxes(diff: AgentProfileDiff): AgentProfileDiffAxis[];
|
|
61
63
|
export declare function pruneAgentProfileDiff(diff: AgentProfileDiff, axesToRemove: readonly AgentProfileDiffAxis[]): AgentProfileDiff;
|
|
64
|
+
export {};
|
package/dist/profile-diff.js
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import { mergeAgentProfiles } from "./agent-profile.js";
|
|
2
|
+
const agentProfileDiffPropertyAxes = [
|
|
3
|
+
"prompt",
|
|
4
|
+
"model",
|
|
5
|
+
"harness",
|
|
6
|
+
"permissions",
|
|
7
|
+
"tools",
|
|
8
|
+
"mcp",
|
|
9
|
+
"connections",
|
|
10
|
+
"subagents",
|
|
11
|
+
"resources",
|
|
12
|
+
"hooks",
|
|
13
|
+
"modes",
|
|
14
|
+
"confidential",
|
|
15
|
+
"metadata",
|
|
16
|
+
"extensions",
|
|
17
|
+
];
|
|
18
|
+
const _agentProfileDiffPropertyAxesAreExhaustive = true;
|
|
19
|
+
void _agentProfileDiffPropertyAxesAreExhaustive;
|
|
2
20
|
export function defineAgentProfileDiff(diff) {
|
|
3
21
|
return diff;
|
|
4
22
|
}
|
|
@@ -90,7 +108,9 @@ function applyRemoval(profile, remove) {
|
|
|
90
108
|
next.description = undefined;
|
|
91
109
|
next.version = undefined;
|
|
92
110
|
}
|
|
93
|
-
|
|
111
|
+
if (remove.tags !== undefined) {
|
|
112
|
+
next.tags = removeValues(asMutable(next.tags), remove.tags);
|
|
113
|
+
}
|
|
94
114
|
if (remove.prompt === true) {
|
|
95
115
|
next.prompt = undefined;
|
|
96
116
|
}
|
|
@@ -103,18 +123,40 @@ function applyRemoval(profile, remove) {
|
|
|
103
123
|
? prompt
|
|
104
124
|
: undefined;
|
|
105
125
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
126
|
+
if (remove.model !== undefined) {
|
|
127
|
+
next.model = removeKeys(next.model, remove.model);
|
|
128
|
+
}
|
|
129
|
+
if (remove.harness !== undefined)
|
|
130
|
+
next.harness = undefined;
|
|
131
|
+
if (remove.permissions !== undefined) {
|
|
132
|
+
next.permissions = removeKeys(next.permissions, remove.permissions);
|
|
133
|
+
}
|
|
134
|
+
if (remove.tools !== undefined) {
|
|
135
|
+
next.tools = removeKeys(next.tools, remove.tools);
|
|
136
|
+
}
|
|
137
|
+
if (remove.mcp !== undefined) {
|
|
138
|
+
next.mcp = removeKeys(next.mcp, remove.mcp);
|
|
139
|
+
}
|
|
140
|
+
if (remove.subagents !== undefined) {
|
|
141
|
+
next.subagents = removeKeys(next.subagents, remove.subagents);
|
|
142
|
+
}
|
|
143
|
+
if (remove.resources !== undefined) {
|
|
144
|
+
next.resources = removeResources(next.resources, remove.resources);
|
|
145
|
+
}
|
|
146
|
+
if (remove.hooks !== undefined) {
|
|
147
|
+
next.hooks = removeKeys(next.hooks, remove.hooks);
|
|
148
|
+
}
|
|
149
|
+
if (remove.modes !== undefined) {
|
|
150
|
+
next.modes = removeKeys(next.modes, remove.modes);
|
|
151
|
+
}
|
|
114
152
|
if (remove.confidential)
|
|
115
153
|
next.confidential = undefined;
|
|
116
|
-
|
|
117
|
-
|
|
154
|
+
if (remove.metadata !== undefined) {
|
|
155
|
+
next.metadata = removeKeys(next.metadata, remove.metadata);
|
|
156
|
+
}
|
|
157
|
+
if (remove.extensions !== undefined) {
|
|
158
|
+
next.extensions = removeKeys(next.extensions, remove.extensions);
|
|
159
|
+
}
|
|
118
160
|
if (next.connections && remove.connections !== undefined) {
|
|
119
161
|
if (remove.connections === true) {
|
|
120
162
|
next.connections = undefined;
|
|
@@ -138,21 +180,7 @@ export function changedAgentProfileAxes(diff) {
|
|
|
138
180
|
if (set) {
|
|
139
181
|
if (set.name || set.description || set.version || set.tags)
|
|
140
182
|
axes.add("identity");
|
|
141
|
-
for (const axis of
|
|
142
|
-
"prompt",
|
|
143
|
-
"model",
|
|
144
|
-
"permissions",
|
|
145
|
-
"tools",
|
|
146
|
-
"mcp",
|
|
147
|
-
"connections",
|
|
148
|
-
"subagents",
|
|
149
|
-
"resources",
|
|
150
|
-
"hooks",
|
|
151
|
-
"modes",
|
|
152
|
-
"confidential",
|
|
153
|
-
"metadata",
|
|
154
|
-
"extensions",
|
|
155
|
-
]) {
|
|
183
|
+
for (const axis of agentProfileDiffPropertyAxes) {
|
|
156
184
|
if (set[axis] !== undefined)
|
|
157
185
|
axes.add(axis);
|
|
158
186
|
}
|
|
@@ -161,21 +189,7 @@ export function changedAgentProfileAxes(diff) {
|
|
|
161
189
|
if (remove) {
|
|
162
190
|
if (remove.identity || remove.tags)
|
|
163
191
|
axes.add("identity");
|
|
164
|
-
for (const axis of
|
|
165
|
-
"prompt",
|
|
166
|
-
"model",
|
|
167
|
-
"permissions",
|
|
168
|
-
"tools",
|
|
169
|
-
"mcp",
|
|
170
|
-
"connections",
|
|
171
|
-
"subagents",
|
|
172
|
-
"resources",
|
|
173
|
-
"hooks",
|
|
174
|
-
"modes",
|
|
175
|
-
"confidential",
|
|
176
|
-
"metadata",
|
|
177
|
-
"extensions",
|
|
178
|
-
]) {
|
|
192
|
+
for (const axis of agentProfileDiffPropertyAxes) {
|
|
179
193
|
if (remove[axis] !== undefined)
|
|
180
194
|
axes.add(axis);
|
|
181
195
|
}
|
|
@@ -187,36 +201,22 @@ export function pruneAgentProfileDiff(diff, axesToRemove) {
|
|
|
187
201
|
const set = diff.set ? { ...diff.set } : undefined;
|
|
188
202
|
const remove = diff.remove ? { ...diff.remove } : undefined;
|
|
189
203
|
if (removeSet.has("identity") && set) {
|
|
190
|
-
set.name
|
|
191
|
-
set.description
|
|
192
|
-
set.version
|
|
193
|
-
set.tags
|
|
204
|
+
delete set.name;
|
|
205
|
+
delete set.description;
|
|
206
|
+
delete set.version;
|
|
207
|
+
delete set.tags;
|
|
194
208
|
}
|
|
195
209
|
if (removeSet.has("identity") && remove) {
|
|
196
|
-
remove.identity
|
|
197
|
-
remove.tags
|
|
210
|
+
delete remove.identity;
|
|
211
|
+
delete remove.tags;
|
|
198
212
|
}
|
|
199
|
-
for (const axis of
|
|
200
|
-
"prompt",
|
|
201
|
-
"model",
|
|
202
|
-
"permissions",
|
|
203
|
-
"tools",
|
|
204
|
-
"mcp",
|
|
205
|
-
"connections",
|
|
206
|
-
"subagents",
|
|
207
|
-
"resources",
|
|
208
|
-
"hooks",
|
|
209
|
-
"modes",
|
|
210
|
-
"confidential",
|
|
211
|
-
"metadata",
|
|
212
|
-
"extensions",
|
|
213
|
-
]) {
|
|
213
|
+
for (const axis of agentProfileDiffPropertyAxes) {
|
|
214
214
|
if (!removeSet.has(axis))
|
|
215
215
|
continue;
|
|
216
216
|
if (set)
|
|
217
|
-
set[axis]
|
|
217
|
+
delete set[axis];
|
|
218
218
|
if (remove)
|
|
219
|
-
remove[axis]
|
|
219
|
+
delete remove[axis];
|
|
220
220
|
}
|
|
221
221
|
return {
|
|
222
222
|
...diff,
|
package/dist/profile-schema.d.ts
CHANGED
|
@@ -221,6 +221,7 @@ export declare const agentProfileDiffRemovalSchema: z.ZodObject<{
|
|
|
221
221
|
instructions: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
222
222
|
}, z.core.$strip>]>>;
|
|
223
223
|
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
224
|
+
harness: z.ZodOptional<z.ZodLiteral<true>>;
|
|
224
225
|
permissions: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
225
226
|
tools: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
226
227
|
mcp: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
|
|
@@ -270,6 +271,24 @@ export declare const agentProfileSchema: z.ZodObject<{
|
|
|
270
271
|
}>>;
|
|
271
272
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
272
273
|
}, z.core.$strip>>;
|
|
274
|
+
harness: z.ZodOptional<z.ZodEnum<{
|
|
275
|
+
"claude-code": "claude-code";
|
|
276
|
+
claude: "claude";
|
|
277
|
+
claudish: "claudish";
|
|
278
|
+
nanoclaw: "nanoclaw";
|
|
279
|
+
codex: "codex";
|
|
280
|
+
opencode: "opencode";
|
|
281
|
+
"kimi-code": "kimi-code";
|
|
282
|
+
kimi: "kimi";
|
|
283
|
+
pi: "pi";
|
|
284
|
+
gemini: "gemini";
|
|
285
|
+
hermes: "hermes";
|
|
286
|
+
openclaw: "openclaw";
|
|
287
|
+
amp: "amp";
|
|
288
|
+
"factory-droids": "factory-droids";
|
|
289
|
+
acp: "acp";
|
|
290
|
+
"cli-base": "cli-base";
|
|
291
|
+
}>>;
|
|
273
292
|
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
|
|
274
293
|
allow: "allow";
|
|
275
294
|
ask: "ask";
|
package/dist/profile-schema.js
CHANGED
|
@@ -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",
|
|
@@ -116,6 +117,7 @@ export const agentProfileDiffRemovalSchema = z.object({
|
|
|
116
117
|
tags: removeListSchema.optional(),
|
|
117
118
|
prompt: z.union([z.literal(true), agentProfilePromptRemovalSchema]).optional(),
|
|
118
119
|
model: removeListSchema.optional(),
|
|
120
|
+
harness: z.literal(true).optional(),
|
|
119
121
|
permissions: removeListSchema.optional(),
|
|
120
122
|
tools: removeListSchema.optional(),
|
|
121
123
|
mcp: removeListSchema.optional(),
|
|
@@ -140,6 +142,7 @@ export const agentProfileSchema = z.object({
|
|
|
140
142
|
tags: z.array(z.string()).optional(),
|
|
141
143
|
prompt: agentProfilePromptSchema.optional(),
|
|
142
144
|
model: agentProfileModelHintsSchema.optional(),
|
|
145
|
+
harness: harnessTypeSchema.optional(),
|
|
143
146
|
permissions: z.record(z.string(), agentProfilePermissionSchema).optional(),
|
|
144
147
|
tools: z.record(z.string(), z.boolean()).optional(),
|
|
145
148
|
mcp: z.record(z.string(), agentProfileMcpServerSchema).optional(),
|