@tangle-network/agent-interface 0.37.0 → 0.39.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-candidate-execution-plan-schema.d.ts +50 -27
- package/dist/agent-candidate-execution-plan-schema.js +4 -16
- package/dist/agent-candidate-profile-schema.d.ts +5 -25
- package/dist/agent-candidate-promotion-schema.d.ts +280 -285
- package/dist/agent-candidate-receipt-schema.d.ts +50 -27
- package/dist/agent-candidate-schema.d.ts +5 -25
- package/dist/agent-candidate.d.ts +2 -8
- package/dist/agent-execution-preparation.d.ts +366 -0
- package/dist/agent-execution-preparation.js +736 -0
- package/dist/agent-profile-activation.d.ts +41 -0
- package/dist/agent-profile-activation.js +24 -0
- package/dist/agent-profile-canonical.d.ts +12 -0
- package/dist/agent-profile-canonical.js +79 -0
- package/dist/agent-profile-improvement-schema.d.ts +3 -6
- package/dist/agent-profile-improvement-schema.js +94 -56
- package/dist/agent-profile-improvement.d.ts +3 -3
- package/dist/agent-profile-materialization.d.ts +34 -0
- package/dist/agent-profile-materialization.js +243 -0
- package/dist/agent-profile.d.ts +44 -7
- package/dist/agent-profile.js +39 -2
- package/dist/agent-workspace-lease.d.ts +138 -0
- package/dist/agent-workspace-lease.js +203 -0
- package/dist/harness-capabilities.d.ts +1 -1
- package/dist/harness-capabilities.js +2 -9
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/profile-diff.d.ts +11 -0
- package/dist/profile-diff.js +123 -3
- package/dist/profile-schema.d.ts +142 -84
- package/dist/profile-schema.js +152 -41
- package/package.json +1 -1
|
@@ -191,11 +191,10 @@ export declare const agentCandidateMaterializationReceiptSchema: z.ZodObject<{
|
|
|
191
191
|
}, z.core.$strict>;
|
|
192
192
|
}, z.core.$strict>;
|
|
193
193
|
profileActivation: z.ZodObject<{
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
material: z.ZodType<{
|
|
194
|
+
profilePlan: z.ZodType<{
|
|
195
|
+
kind: "agent-profile-workspace-plan";
|
|
196
|
+
digest: `sha256:${string}`;
|
|
197
|
+
material: {
|
|
199
198
|
sourceProfileDigest: `sha256:${string}`;
|
|
200
199
|
harness: "claude-code" | "nanoclaw" | "codex" | "opencode" | "kimi-code" | "pi" | "gemini" | "hermes" | "openclaw" | "amp" | "factory-droids" | "acp" | "cli-base";
|
|
201
200
|
files: {
|
|
@@ -219,7 +218,30 @@ export declare const agentCandidateMaterializationReceiptSchema: z.ZodObject<{
|
|
|
219
218
|
kind: "public";
|
|
220
219
|
value: string;
|
|
221
220
|
} | undefined;
|
|
222
|
-
}
|
|
221
|
+
};
|
|
222
|
+
artifact: {
|
|
223
|
+
locator: {
|
|
224
|
+
kind: "s3";
|
|
225
|
+
bucket: string;
|
|
226
|
+
key: string;
|
|
227
|
+
region?: string | undefined;
|
|
228
|
+
} | {
|
|
229
|
+
kind: "ipfs";
|
|
230
|
+
cid: string;
|
|
231
|
+
path?: string | undefined;
|
|
232
|
+
};
|
|
233
|
+
sha256: `sha256:${string}`;
|
|
234
|
+
byteLength: number;
|
|
235
|
+
} | {
|
|
236
|
+
encoding: "base64";
|
|
237
|
+
content: string;
|
|
238
|
+
sha256: `sha256:${string}`;
|
|
239
|
+
byteLength: number;
|
|
240
|
+
};
|
|
241
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
242
|
+
kind: "agent-profile-workspace-plan";
|
|
243
|
+
digest: `sha256:${string}`;
|
|
244
|
+
material: {
|
|
223
245
|
sourceProfileDigest: `sha256:${string}`;
|
|
224
246
|
harness: "claude-code" | "nanoclaw" | "codex" | "opencode" | "kimi-code" | "pi" | "gemini" | "hermes" | "openclaw" | "amp" | "factory-droids" | "acp" | "cli-base";
|
|
225
247
|
files: {
|
|
@@ -243,33 +265,34 @@ export declare const agentCandidateMaterializationReceiptSchema: z.ZodObject<{
|
|
|
243
265
|
kind: "public";
|
|
244
266
|
value: string;
|
|
245
267
|
} | undefined;
|
|
246
|
-
}
|
|
247
|
-
artifact:
|
|
248
|
-
locator:
|
|
249
|
-
kind:
|
|
250
|
-
bucket:
|
|
251
|
-
key:
|
|
252
|
-
region
|
|
253
|
-
}
|
|
254
|
-
kind:
|
|
255
|
-
cid:
|
|
256
|
-
path
|
|
257
|
-
}
|
|
258
|
-
sha256:
|
|
259
|
-
byteLength:
|
|
260
|
-
}
|
|
261
|
-
encoding:
|
|
262
|
-
content:
|
|
263
|
-
sha256:
|
|
264
|
-
byteLength:
|
|
265
|
-
}
|
|
266
|
-
},
|
|
268
|
+
};
|
|
269
|
+
artifact: {
|
|
270
|
+
locator: {
|
|
271
|
+
kind: "s3";
|
|
272
|
+
bucket: string;
|
|
273
|
+
key: string;
|
|
274
|
+
region?: string | undefined;
|
|
275
|
+
} | {
|
|
276
|
+
kind: "ipfs";
|
|
277
|
+
cid: string;
|
|
278
|
+
path?: string | undefined;
|
|
279
|
+
};
|
|
280
|
+
sha256: `sha256:${string}`;
|
|
281
|
+
byteLength: number;
|
|
282
|
+
} | {
|
|
283
|
+
encoding: "base64";
|
|
284
|
+
content: string;
|
|
285
|
+
sha256: `sha256:${string}`;
|
|
286
|
+
byteLength: number;
|
|
287
|
+
};
|
|
288
|
+
}, unknown>>;
|
|
267
289
|
files: z.ZodArray<z.ZodObject<{
|
|
268
290
|
path: z.ZodString;
|
|
269
291
|
mode: z.ZodNumber;
|
|
270
292
|
content: z.ZodString;
|
|
271
293
|
}, z.core.$strict>>;
|
|
272
294
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
295
|
+
kind: z.ZodLiteral<"agent-candidate-profile-activation">;
|
|
273
296
|
}, z.core.$strict>;
|
|
274
297
|
executionPlan: z.ZodObject<{
|
|
275
298
|
kind: z.ZodLiteral<"agent-candidate-execution-plan">;
|
|
@@ -52,25 +52,13 @@ export declare const agentCandidateBundleSchema: z.ZodObject<{
|
|
|
52
52
|
allow: "allow";
|
|
53
53
|
ask: "ask";
|
|
54
54
|
deny: "deny";
|
|
55
|
-
}>, z.
|
|
56
|
-
allow: "allow";
|
|
57
|
-
ask: "ask";
|
|
58
|
-
deny: "deny";
|
|
59
|
-
}>>]>>>;
|
|
55
|
+
}>, z.ZodType<Record<string, "allow" | "ask" | "deny">, unknown, z.core.$ZodTypeInternals<Record<string, "allow" | "ask" | "deny">, unknown>>]>>>;
|
|
60
56
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
61
57
|
mcp: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./agent-candidate.js").AgentCandidateMcpServer, unknown, z.core.$ZodTypeInternals<import("./agent-candidate.js").AgentCandidateMcpServer, unknown>>>>;
|
|
62
58
|
subagents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
63
59
|
prompt: z.ZodOptional<z.ZodString>;
|
|
64
|
-
permissions: z.ZodOptional<z.
|
|
65
|
-
|
|
66
|
-
ask: "ask";
|
|
67
|
-
deny: "deny";
|
|
68
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
69
|
-
allow: "allow";
|
|
70
|
-
ask: "ask";
|
|
71
|
-
deny: "deny";
|
|
72
|
-
}>>]>>>;
|
|
73
|
-
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
60
|
+
permissions: z.ZodOptional<z.ZodType<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown, z.core.$ZodTypeInternals<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown>>>;
|
|
61
|
+
tools: z.ZodOptional<z.ZodType<Record<string, boolean>, unknown, z.core.$ZodTypeInternals<Record<string, boolean>, unknown>>>;
|
|
74
62
|
description: z.ZodOptional<z.ZodString>;
|
|
75
63
|
model: z.ZodOptional<z.ZodString>;
|
|
76
64
|
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
@@ -548,16 +536,8 @@ export declare const agentCandidateBundleSchema: z.ZodObject<{
|
|
|
548
536
|
}, z.core.$strict>>>>;
|
|
549
537
|
modes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
550
538
|
prompt: z.ZodOptional<z.ZodString>;
|
|
551
|
-
permissions: z.ZodOptional<z.
|
|
552
|
-
|
|
553
|
-
ask: "ask";
|
|
554
|
-
deny: "deny";
|
|
555
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
556
|
-
allow: "allow";
|
|
557
|
-
ask: "ask";
|
|
558
|
-
deny: "deny";
|
|
559
|
-
}>>]>>>;
|
|
560
|
-
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
539
|
+
permissions: z.ZodOptional<z.ZodType<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown, z.core.$ZodTypeInternals<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown>>>;
|
|
540
|
+
tools: z.ZodOptional<z.ZodType<Record<string, boolean>, unknown, z.core.$ZodTypeInternals<Record<string, boolean>, unknown>>>;
|
|
561
541
|
description: z.ZodOptional<z.ZodString>;
|
|
562
542
|
model: z.ZodOptional<z.ZodString>;
|
|
563
543
|
}, z.core.$strict>>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AgentProfile, AgentProfileFileMount, AgentProfileHookCommand, AgentProfileMode, AgentProfileModelHints, AgentProfileResources, AgentSubagentProfile, ReasoningEffort } from "./agent-profile.js";
|
|
2
|
+
import type { AgentProfileActivationEvidence } from "./agent-profile-activation.js";
|
|
2
3
|
import type { HarnessType } from "./harness.js";
|
|
3
4
|
import type { AgentProfileImprovementExecutionRef, AgentProfileImprovementMeasuredComparison } from "./agent-profile-improvement.js";
|
|
4
5
|
import type { AgentImprovementSource } from "./agent-improvement-source.js";
|
|
@@ -599,15 +600,8 @@ export interface AgentCandidateProfilePlanEvidence {
|
|
|
599
600
|
artifact: AgentCandidateCapturedArtifact;
|
|
600
601
|
}
|
|
601
602
|
/** Exact native profile files and the canonical plan that activated them. */
|
|
602
|
-
export interface AgentCandidateProfileActivation {
|
|
603
|
+
export interface AgentCandidateProfileActivation extends AgentProfileActivationEvidence<AgentCandidateProfilePlanEvidence> {
|
|
603
604
|
kind: "agent-candidate-profile-activation";
|
|
604
|
-
profilePlan: AgentCandidateProfilePlanEvidence;
|
|
605
|
-
files: Array<{
|
|
606
|
-
path: string;
|
|
607
|
-
mode: number;
|
|
608
|
-
content: string;
|
|
609
|
-
}>;
|
|
610
|
-
digest: Sha256Digest;
|
|
611
605
|
}
|
|
612
606
|
export interface AgentCandidateExecutionPlanEvidence {
|
|
613
607
|
kind: "agent-candidate-execution-plan";
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { Sha256Digest } from "./agent-candidate.js";
|
|
3
|
+
import { type AgentProfile, type ReasoningEffort } from "./agent-profile.js";
|
|
4
|
+
import type { AgentProfileActivationEvidence } from "./agent-profile-activation.js";
|
|
5
|
+
import { type AgentProfileMaterializationAxis } from "./agent-profile-materialization.js";
|
|
6
|
+
import { type HarnessType } from "./harness.js";
|
|
7
|
+
import { type AgentWorkspaceExecutionBoundLeaseRecord, type AgentWorkspaceSealedLeaseRecord, type AgentWorkspaceSourceSnapshotPolicy } from "./agent-workspace-lease.js";
|
|
8
|
+
export type AgentExecutionPreparationDisposition = "behavior" | "control" | "overridden" | "unsupported";
|
|
9
|
+
export type AgentExecutionPreparationOwner = "runtime" | "executor";
|
|
10
|
+
/** One exact profile path and how the prepared execution will handle it. */
|
|
11
|
+
export interface AgentExecutionPreparationAxisResult {
|
|
12
|
+
axis: AgentProfileMaterializationAxis;
|
|
13
|
+
disposition: AgentExecutionPreparationDisposition;
|
|
14
|
+
owner: AgentExecutionPreparationOwner;
|
|
15
|
+
/** Public mechanism identifier; launch arguments are structurally refused. */
|
|
16
|
+
mechanism: string;
|
|
17
|
+
evidenceDigest?: Sha256Digest;
|
|
18
|
+
/** RFC 6901 JSON Pointer. Required when one axis has multiple requested paths. */
|
|
19
|
+
path?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Sanitized public diagnostic prose for an override or unsupported path.
|
|
22
|
+
* The schema refuses recognized credential formats, but cannot identify
|
|
23
|
+
* arbitrary secret strings; producers remain responsible for redaction.
|
|
24
|
+
*/
|
|
25
|
+
reason?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface AgentExecutionPreparationReasoningEffort {
|
|
28
|
+
requested: ReasoningEffort;
|
|
29
|
+
resolved?: ReasoningEffort;
|
|
30
|
+
fidelity: "exact" | "clamped" | "unsupported";
|
|
31
|
+
}
|
|
32
|
+
export interface AgentExecutionPreparationResolvedModel {
|
|
33
|
+
/** Exact effective profile request; an explicit empty hint remains empty. */
|
|
34
|
+
requested: string;
|
|
35
|
+
/** Concrete non-empty model selected for execution. */
|
|
36
|
+
resolved: string;
|
|
37
|
+
/** Exact effective provider hint when present, including an explicit empty hint. */
|
|
38
|
+
provider?: string;
|
|
39
|
+
reasoningEffort?: AgentExecutionPreparationReasoningEffort;
|
|
40
|
+
}
|
|
41
|
+
export interface AgentExecutionPreparationWorkspace {
|
|
42
|
+
/** Public, non-secret lifecycle identity for the workspace lease. */
|
|
43
|
+
leaseId: string;
|
|
44
|
+
/** Provider that owns the private prepared workspace capability. */
|
|
45
|
+
provider: string;
|
|
46
|
+
/**
|
|
47
|
+
* Digest of the immutable allocation tuple (provider, lease/allocation id,
|
|
48
|
+
* and canonical root). This binds `leaseId` to its allocation; it is not a
|
|
49
|
+
* filesystem-content digest.
|
|
50
|
+
*/
|
|
51
|
+
identityDigest: Sha256Digest;
|
|
52
|
+
isolation: "per-run" | "shared";
|
|
53
|
+
/** Canonical source snapshot before the isolated copy is prepared. */
|
|
54
|
+
sourceSnapshotDigest: Sha256Digest;
|
|
55
|
+
/** Public identity of the provider's exact snapshot/canonicalization policy. */
|
|
56
|
+
sourceSnapshotPolicy: AgentWorkspaceSourceSnapshotPolicy;
|
|
57
|
+
/** Canonical actual workspace after profile activation and before compute. */
|
|
58
|
+
preparedWorkspaceDigest: Sha256Digest;
|
|
59
|
+
profileActivationDigest: Sha256Digest;
|
|
60
|
+
}
|
|
61
|
+
export interface AgentExecutionPreparationMaterializer {
|
|
62
|
+
name: string;
|
|
63
|
+
version: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Executor acknowledgement emitted after all launch decisions are fixed and
|
|
67
|
+
* before any agent compute begins.
|
|
68
|
+
*
|
|
69
|
+
* `executionPlanDigest` is required to hash only public launch decisions plus
|
|
70
|
+
* caller-declared public secret-slot/reference identities. Secret values belong
|
|
71
|
+
* solely in the private prepared-executor closure/capability; hashing them here
|
|
72
|
+
* would leak equality and permit guessing low-entropy credentials. This receipt
|
|
73
|
+
* proves public plan identity, not possession of that private capability.
|
|
74
|
+
* Secret-capable MCP/hook slots structurally accept only tagged public values or
|
|
75
|
+
* opaque references. Other authored profile text and reference keys remain
|
|
76
|
+
* caller-declared public data; recognizable-pattern refusal is defense in depth,
|
|
77
|
+
* not proof that arbitrary text is non-secret.
|
|
78
|
+
*/
|
|
79
|
+
export interface AgentExecutionPreparationReceipt {
|
|
80
|
+
kind: "agent-execution-preparation";
|
|
81
|
+
schemaVersion: 1;
|
|
82
|
+
preparationId: string;
|
|
83
|
+
requestDigest: Sha256Digest;
|
|
84
|
+
authoredProfileDigest: Sha256Digest;
|
|
85
|
+
effectiveProfileDigest: Sha256Digest;
|
|
86
|
+
backend: string;
|
|
87
|
+
harness: HarnessType;
|
|
88
|
+
harnessVersion: string;
|
|
89
|
+
resolvedModel: AgentExecutionPreparationResolvedModel;
|
|
90
|
+
workspace: AgentExecutionPreparationWorkspace;
|
|
91
|
+
axisResults: AgentExecutionPreparationAxisResult[];
|
|
92
|
+
/** Caller-supplied digest of public decisions and secret-reference identities. */
|
|
93
|
+
executionPlanDigest: Sha256Digest;
|
|
94
|
+
materializer: AgentExecutionPreparationMaterializer;
|
|
95
|
+
expiresAtMs: number;
|
|
96
|
+
digest: Sha256Digest;
|
|
97
|
+
}
|
|
98
|
+
export interface BuildAgentExecutionPreparationReceiptInput {
|
|
99
|
+
preparationId: string;
|
|
100
|
+
requestDigest: Sha256Digest;
|
|
101
|
+
authoredProfile: AgentProfile;
|
|
102
|
+
effectiveProfile: AgentProfile;
|
|
103
|
+
backend: string;
|
|
104
|
+
harness: HarnessType;
|
|
105
|
+
harnessVersion: string;
|
|
106
|
+
resolvedModel: AgentExecutionPreparationResolvedModel;
|
|
107
|
+
/** Exact sealed public lease projection; owner authorization remains private. */
|
|
108
|
+
workspaceLease: AgentWorkspaceSealedLeaseRecord;
|
|
109
|
+
profileActivation: Pick<AgentProfileActivationEvidence, "digest">;
|
|
110
|
+
axisResults: readonly AgentExecutionPreparationAxisResult[];
|
|
111
|
+
/** Must digest public decisions and reference identities, not resolved values. */
|
|
112
|
+
executionPlanDigest: Sha256Digest;
|
|
113
|
+
materializer: AgentExecutionPreparationMaterializer;
|
|
114
|
+
expiresAtMs: number;
|
|
115
|
+
/** Clock used only to refuse already-expired preparations. */
|
|
116
|
+
nowMs?: number;
|
|
117
|
+
}
|
|
118
|
+
export interface ValidateAgentExecutionPreparationReceiptOptions {
|
|
119
|
+
receipt: unknown;
|
|
120
|
+
requestDigest: Sha256Digest;
|
|
121
|
+
authoredProfile: AgentProfile;
|
|
122
|
+
effectiveProfile: AgentProfile;
|
|
123
|
+
/** Expected public-plan identity; callers must not derive it from secret values. */
|
|
124
|
+
executionPlanDigest: Sha256Digest;
|
|
125
|
+
profileActivation: Pick<AgentProfileActivationEvidence, "digest">;
|
|
126
|
+
/** Bound lease closes the receipt→workspace link before compute begins. */
|
|
127
|
+
workspaceLease: AgentWorkspaceExecutionBoundLeaseRecord;
|
|
128
|
+
nowMs?: number;
|
|
129
|
+
preparationId?: string;
|
|
130
|
+
backend?: string;
|
|
131
|
+
harness?: HarnessType;
|
|
132
|
+
harnessVersion?: string;
|
|
133
|
+
}
|
|
134
|
+
export type AgentExecutionPreparationValidationIssueCode = "invalid-receipt" | "invalid-profile" | "invalid-workspace-lease" | "workspace-not-execution-bound" | "execution-binding-mismatch" | "digest-mismatch" | "expectation-mismatch" | "expired" | "missing-coverage" | "ambiguous-coverage" | "duplicate-coverage" | "conflicting-coverage" | "unrequested-coverage" | "invalid-disposition" | "strict-unsupported" | "model-fidelity";
|
|
135
|
+
export interface AgentExecutionPreparationValidationIssue {
|
|
136
|
+
code: AgentExecutionPreparationValidationIssueCode;
|
|
137
|
+
message: string;
|
|
138
|
+
axis?: AgentProfileMaterializationAxis;
|
|
139
|
+
path?: string;
|
|
140
|
+
}
|
|
141
|
+
export type AgentExecutionPreparationValidationResult = {
|
|
142
|
+
ok: true;
|
|
143
|
+
receipt: AgentExecutionPreparationReceipt;
|
|
144
|
+
issues: [];
|
|
145
|
+
} | {
|
|
146
|
+
ok: false;
|
|
147
|
+
issues: AgentExecutionPreparationValidationIssue[];
|
|
148
|
+
};
|
|
149
|
+
export declare const agentExecutionPreparationAxisResultSchema: z.ZodObject<{
|
|
150
|
+
axis: z.ZodEnum<{
|
|
151
|
+
permissions: "permissions";
|
|
152
|
+
tools: "tools";
|
|
153
|
+
mcp: "mcp";
|
|
154
|
+
connections: "connections";
|
|
155
|
+
subagents: "subagents";
|
|
156
|
+
hooks: "hooks";
|
|
157
|
+
modes: "modes";
|
|
158
|
+
metadata: "metadata";
|
|
159
|
+
description: "description";
|
|
160
|
+
name: "name";
|
|
161
|
+
files: "files";
|
|
162
|
+
version: "version";
|
|
163
|
+
tags: "tags";
|
|
164
|
+
harness: "harness";
|
|
165
|
+
confidential: "confidential";
|
|
166
|
+
extensions: "extensions";
|
|
167
|
+
skills: "skills";
|
|
168
|
+
commands: "commands";
|
|
169
|
+
instructions: "instructions";
|
|
170
|
+
systemPrompt: "systemPrompt";
|
|
171
|
+
modelDefault: "modelDefault";
|
|
172
|
+
modelSmall: "modelSmall";
|
|
173
|
+
modelProvider: "modelProvider";
|
|
174
|
+
modelReasoningEffort: "modelReasoningEffort";
|
|
175
|
+
modelMetadata: "modelMetadata";
|
|
176
|
+
resourceTools: "resourceTools";
|
|
177
|
+
resourceAgents: "resourceAgents";
|
|
178
|
+
resourceInstructions: "resourceInstructions";
|
|
179
|
+
resourceFailOnError: "resourceFailOnError";
|
|
180
|
+
}>;
|
|
181
|
+
disposition: z.ZodEnum<{
|
|
182
|
+
unsupported: "unsupported";
|
|
183
|
+
behavior: "behavior";
|
|
184
|
+
control: "control";
|
|
185
|
+
overridden: "overridden";
|
|
186
|
+
}>;
|
|
187
|
+
owner: z.ZodEnum<{
|
|
188
|
+
runtime: "runtime";
|
|
189
|
+
executor: "executor";
|
|
190
|
+
}>;
|
|
191
|
+
mechanism: z.ZodString;
|
|
192
|
+
evidenceDigest: z.ZodOptional<z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>>;
|
|
193
|
+
path: z.ZodOptional<z.ZodString>;
|
|
194
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
195
|
+
}, z.core.$strict>;
|
|
196
|
+
export declare const agentExecutionPreparationReasoningEffortSchema: z.ZodObject<{
|
|
197
|
+
requested: z.ZodEnum<{
|
|
198
|
+
none: "none";
|
|
199
|
+
minimal: "minimal";
|
|
200
|
+
low: "low";
|
|
201
|
+
medium: "medium";
|
|
202
|
+
high: "high";
|
|
203
|
+
xhigh: "xhigh";
|
|
204
|
+
ultracode: "ultracode";
|
|
205
|
+
}>;
|
|
206
|
+
resolved: z.ZodOptional<z.ZodEnum<{
|
|
207
|
+
none: "none";
|
|
208
|
+
minimal: "minimal";
|
|
209
|
+
low: "low";
|
|
210
|
+
medium: "medium";
|
|
211
|
+
high: "high";
|
|
212
|
+
xhigh: "xhigh";
|
|
213
|
+
ultracode: "ultracode";
|
|
214
|
+
}>>;
|
|
215
|
+
fidelity: z.ZodEnum<{
|
|
216
|
+
exact: "exact";
|
|
217
|
+
unsupported: "unsupported";
|
|
218
|
+
clamped: "clamped";
|
|
219
|
+
}>;
|
|
220
|
+
}, z.core.$strict>;
|
|
221
|
+
export declare const agentExecutionPreparationReceiptSchema: z.ZodObject<{
|
|
222
|
+
kind: z.ZodLiteral<"agent-execution-preparation">;
|
|
223
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
224
|
+
preparationId: z.ZodString;
|
|
225
|
+
requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
226
|
+
authoredProfileDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
227
|
+
effectiveProfileDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
228
|
+
backend: z.ZodString;
|
|
229
|
+
harness: z.ZodEnum<{
|
|
230
|
+
"claude-code": "claude-code";
|
|
231
|
+
nanoclaw: "nanoclaw";
|
|
232
|
+
codex: "codex";
|
|
233
|
+
opencode: "opencode";
|
|
234
|
+
"kimi-code": "kimi-code";
|
|
235
|
+
pi: "pi";
|
|
236
|
+
gemini: "gemini";
|
|
237
|
+
hermes: "hermes";
|
|
238
|
+
openclaw: "openclaw";
|
|
239
|
+
amp: "amp";
|
|
240
|
+
"factory-droids": "factory-droids";
|
|
241
|
+
acp: "acp";
|
|
242
|
+
"cli-base": "cli-base";
|
|
243
|
+
}>;
|
|
244
|
+
harnessVersion: z.ZodString;
|
|
245
|
+
resolvedModel: z.ZodObject<{
|
|
246
|
+
requested: z.ZodString;
|
|
247
|
+
resolved: z.ZodString;
|
|
248
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
249
|
+
reasoningEffort: z.ZodOptional<z.ZodObject<{
|
|
250
|
+
requested: z.ZodEnum<{
|
|
251
|
+
none: "none";
|
|
252
|
+
minimal: "minimal";
|
|
253
|
+
low: "low";
|
|
254
|
+
medium: "medium";
|
|
255
|
+
high: "high";
|
|
256
|
+
xhigh: "xhigh";
|
|
257
|
+
ultracode: "ultracode";
|
|
258
|
+
}>;
|
|
259
|
+
resolved: z.ZodOptional<z.ZodEnum<{
|
|
260
|
+
none: "none";
|
|
261
|
+
minimal: "minimal";
|
|
262
|
+
low: "low";
|
|
263
|
+
medium: "medium";
|
|
264
|
+
high: "high";
|
|
265
|
+
xhigh: "xhigh";
|
|
266
|
+
ultracode: "ultracode";
|
|
267
|
+
}>>;
|
|
268
|
+
fidelity: z.ZodEnum<{
|
|
269
|
+
exact: "exact";
|
|
270
|
+
unsupported: "unsupported";
|
|
271
|
+
clamped: "clamped";
|
|
272
|
+
}>;
|
|
273
|
+
}, z.core.$strict>>;
|
|
274
|
+
}, z.core.$strict>;
|
|
275
|
+
workspace: z.ZodObject<{
|
|
276
|
+
leaseId: z.ZodString;
|
|
277
|
+
provider: z.ZodString;
|
|
278
|
+
identityDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
279
|
+
isolation: z.ZodEnum<{
|
|
280
|
+
"per-run": "per-run";
|
|
281
|
+
shared: "shared";
|
|
282
|
+
}>;
|
|
283
|
+
sourceSnapshotDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
284
|
+
sourceSnapshotPolicy: z.ZodObject<{
|
|
285
|
+
kind: z.ZodLiteral<"provider-declared">;
|
|
286
|
+
name: z.ZodString;
|
|
287
|
+
version: z.ZodNumber;
|
|
288
|
+
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
289
|
+
}, z.core.$strict>;
|
|
290
|
+
preparedWorkspaceDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
291
|
+
profileActivationDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
292
|
+
}, z.core.$strict>;
|
|
293
|
+
axisResults: z.ZodArray<z.ZodObject<{
|
|
294
|
+
axis: z.ZodEnum<{
|
|
295
|
+
permissions: "permissions";
|
|
296
|
+
tools: "tools";
|
|
297
|
+
mcp: "mcp";
|
|
298
|
+
connections: "connections";
|
|
299
|
+
subagents: "subagents";
|
|
300
|
+
hooks: "hooks";
|
|
301
|
+
modes: "modes";
|
|
302
|
+
metadata: "metadata";
|
|
303
|
+
description: "description";
|
|
304
|
+
name: "name";
|
|
305
|
+
files: "files";
|
|
306
|
+
version: "version";
|
|
307
|
+
tags: "tags";
|
|
308
|
+
harness: "harness";
|
|
309
|
+
confidential: "confidential";
|
|
310
|
+
extensions: "extensions";
|
|
311
|
+
skills: "skills";
|
|
312
|
+
commands: "commands";
|
|
313
|
+
instructions: "instructions";
|
|
314
|
+
systemPrompt: "systemPrompt";
|
|
315
|
+
modelDefault: "modelDefault";
|
|
316
|
+
modelSmall: "modelSmall";
|
|
317
|
+
modelProvider: "modelProvider";
|
|
318
|
+
modelReasoningEffort: "modelReasoningEffort";
|
|
319
|
+
modelMetadata: "modelMetadata";
|
|
320
|
+
resourceTools: "resourceTools";
|
|
321
|
+
resourceAgents: "resourceAgents";
|
|
322
|
+
resourceInstructions: "resourceInstructions";
|
|
323
|
+
resourceFailOnError: "resourceFailOnError";
|
|
324
|
+
}>;
|
|
325
|
+
disposition: z.ZodEnum<{
|
|
326
|
+
unsupported: "unsupported";
|
|
327
|
+
behavior: "behavior";
|
|
328
|
+
control: "control";
|
|
329
|
+
overridden: "overridden";
|
|
330
|
+
}>;
|
|
331
|
+
owner: z.ZodEnum<{
|
|
332
|
+
runtime: "runtime";
|
|
333
|
+
executor: "executor";
|
|
334
|
+
}>;
|
|
335
|
+
mechanism: z.ZodString;
|
|
336
|
+
evidenceDigest: z.ZodOptional<z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>>;
|
|
337
|
+
path: z.ZodOptional<z.ZodString>;
|
|
338
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
339
|
+
}, z.core.$strict>>;
|
|
340
|
+
executionPlanDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
341
|
+
materializer: z.ZodObject<{
|
|
342
|
+
name: z.ZodString;
|
|
343
|
+
version: z.ZodString;
|
|
344
|
+
}, z.core.$strict>;
|
|
345
|
+
expiresAtMs: z.ZodNumber;
|
|
346
|
+
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
347
|
+
}, z.core.$strict>;
|
|
348
|
+
/**
|
|
349
|
+
* Canonical RFC 8785/SHA-256 identity for one validated, public AgentProfile.
|
|
350
|
+
* Secret-capable MCP/hook fields are tagged. Other prompt, resource, metadata,
|
|
351
|
+
* and tool text is ordinary public profile data: it may legitimately discuss
|
|
352
|
+
* credentials, security incidents, or examples that resemble credentials, so
|
|
353
|
+
* pattern matching cannot decide whether it is secret. Resolve opaque secret
|
|
354
|
+
* references only after this public identity is fixed.
|
|
355
|
+
*/
|
|
356
|
+
export declare function canonicalAgentProfileDigest(profile: AgentProfile): Sha256Digest;
|
|
357
|
+
/** Build, self-hash, and cross-check one pre-compute executor acknowledgement. */
|
|
358
|
+
export declare function buildAgentExecutionPreparationReceipt(input: BuildAgentExecutionPreparationReceiptInput): AgentExecutionPreparationReceipt;
|
|
359
|
+
/** Validate structure, bindings, expiry, model fidelity, and exact path coverage. */
|
|
360
|
+
export declare function validateAgentExecutionPreparationReceipt(options: ValidateAgentExecutionPreparationReceiptOptions): AgentExecutionPreparationValidationResult;
|
|
361
|
+
/** Throw one structured error when a preparation acknowledgement is invalid. */
|
|
362
|
+
export declare function assertAgentExecutionPreparationReceipt(options: ValidateAgentExecutionPreparationReceiptOptions): AgentExecutionPreparationReceipt;
|
|
363
|
+
export declare class AgentExecutionPreparationValidationError extends Error {
|
|
364
|
+
readonly issues: readonly AgentExecutionPreparationValidationIssue[];
|
|
365
|
+
constructor(issues: readonly AgentExecutionPreparationValidationIssue[]);
|
|
366
|
+
}
|