@tangle-network/agent-interface 2.3.1 → 2.5.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 +7 -0
- package/dist/agent-candidate-lineage-schema.d.ts +4 -0
- package/dist/agent-candidate-lineage-schema.js +10 -1
- package/dist/agent-candidate-promotion-schema.d.ts +24 -0
- package/dist/agent-candidate-schema.d.ts +4 -0
- package/dist/agent-candidate.d.ts +7 -0
- package/dist/agent-execution-preparation-receipt.d.ts +6 -0
- package/dist/agent-profile-materialization.d.ts +2 -2
- package/dist/agent-profile-materialization.js +19 -26
- package/dist/environment-interactive-control.d.ts +30 -0
- package/dist/environment-runtime.d.ts +33 -3
- package/dist/environment-runtime.js +4 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/runtime-attachments.d.ts +7 -0
- package/dist/runtime-attachments.js +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -228,3 +228,10 @@ An exhaustiveness check that assigns the remaining case to `never` fails when a
|
|
|
228
228
|
## License
|
|
229
229
|
|
|
230
230
|
MIT
|
|
231
|
+
|
|
232
|
+
`AgentEnvironmentEvent.usageMode` describes token usage within one turn.
|
|
233
|
+
`delta` contributes new usage; `cumulative` includes earlier contributions and replaces the prior turn total.
|
|
234
|
+
Repeated cumulative totals do not add spend.
|
|
235
|
+
An absent mode means the aggregation semantics are unknown.
|
|
236
|
+
Materialization receipts cover all three model token ceilings at their exact requested paths.
|
|
237
|
+
A strict profile rejects unsupported ceilings instead of silently accepting them.
|
|
@@ -10,6 +10,10 @@ export declare const agentCandidateKnowledgeSchema: z.ZodObject<{
|
|
|
10
10
|
evidenceHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
11
11
|
promotionPlanHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
12
12
|
}, z.core.$strict>;
|
|
13
|
+
stateScope: z.ZodOptional<z.ZodObject<{
|
|
14
|
+
pagesDirectory: z.ZodString;
|
|
15
|
+
researchState: z.ZodBoolean;
|
|
16
|
+
}, z.core.$strict>>;
|
|
13
17
|
snapshot: z.ZodObject<{
|
|
14
18
|
kind: z.ZodLiteral<"agent-candidate-workspace-snapshot">;
|
|
15
19
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { agentCandidateArtifactRefSchema, agentCandidateCapturedArtifactSchema, agentCandidateWorkspaceSnapshotEvidenceSchema, } from "./agent-candidate-artifact-schema.js";
|
|
3
|
-
import { addDuplicateIssues, sha256DigestSchema, } from "./agent-candidate-schema-common.js";
|
|
3
|
+
import { addDuplicateIssues, isSafeRelativePath, sha256DigestSchema, } from "./agent-candidate-schema-common.js";
|
|
4
4
|
export const agentCandidateKnowledgeSchema = z
|
|
5
5
|
.object({
|
|
6
6
|
candidate: z
|
|
@@ -15,6 +15,15 @@ export const agentCandidateKnowledgeSchema = z
|
|
|
15
15
|
promotionPlanHash: sha256DigestSchema,
|
|
16
16
|
})
|
|
17
17
|
.strict(),
|
|
18
|
+
stateScope: z
|
|
19
|
+
.object({
|
|
20
|
+
pagesDirectory: z
|
|
21
|
+
.string()
|
|
22
|
+
.refine((value) => isSafeRelativePath(value, false), "pagesDirectory must be a canonical workspace-relative directory"),
|
|
23
|
+
researchState: z.boolean(),
|
|
24
|
+
})
|
|
25
|
+
.strict()
|
|
26
|
+
.optional(),
|
|
18
27
|
snapshot: agentCandidateWorkspaceSnapshotEvidenceSchema,
|
|
19
28
|
retrievalConfig: agentCandidateCapturedArtifactSchema.optional(),
|
|
20
29
|
evaluation: agentCandidateCapturedArtifactSchema,
|
|
@@ -724,6 +724,10 @@ export declare const agentCandidateExperimentSchema: z.ZodObject<{
|
|
|
724
724
|
evidenceHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
725
725
|
promotionPlanHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
726
726
|
}, z.core.$strict>;
|
|
727
|
+
stateScope: z.ZodOptional<z.ZodObject<{
|
|
728
|
+
pagesDirectory: z.ZodString;
|
|
729
|
+
researchState: z.ZodBoolean;
|
|
730
|
+
}, z.core.$strict>>;
|
|
727
731
|
snapshot: z.ZodObject<{
|
|
728
732
|
kind: z.ZodLiteral<"agent-candidate-workspace-snapshot">;
|
|
729
733
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -1557,6 +1561,10 @@ export declare const agentCandidateExperimentSchema: z.ZodObject<{
|
|
|
1557
1561
|
evidenceHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
1558
1562
|
promotionPlanHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
1559
1563
|
}, z.core.$strict>;
|
|
1564
|
+
stateScope: z.ZodOptional<z.ZodObject<{
|
|
1565
|
+
pagesDirectory: z.ZodString;
|
|
1566
|
+
researchState: z.ZodBoolean;
|
|
1567
|
+
}, z.core.$strict>>;
|
|
1560
1568
|
snapshot: z.ZodObject<{
|
|
1561
1569
|
kind: z.ZodLiteral<"agent-candidate-workspace-snapshot">;
|
|
1562
1570
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -4313,6 +4321,10 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
|
|
|
4313
4321
|
evidenceHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
4314
4322
|
promotionPlanHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
4315
4323
|
}, z.core.$strict>;
|
|
4324
|
+
stateScope: z.ZodOptional<z.ZodObject<{
|
|
4325
|
+
pagesDirectory: z.ZodString;
|
|
4326
|
+
researchState: z.ZodBoolean;
|
|
4327
|
+
}, z.core.$strict>>;
|
|
4316
4328
|
snapshot: z.ZodObject<{
|
|
4317
4329
|
kind: z.ZodLiteral<"agent-candidate-workspace-snapshot">;
|
|
4318
4330
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -5146,6 +5158,10 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
|
|
|
5146
5158
|
evidenceHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
5147
5159
|
promotionPlanHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
5148
5160
|
}, z.core.$strict>;
|
|
5161
|
+
stateScope: z.ZodOptional<z.ZodObject<{
|
|
5162
|
+
pagesDirectory: z.ZodString;
|
|
5163
|
+
researchState: z.ZodBoolean;
|
|
5164
|
+
}, z.core.$strict>>;
|
|
5149
5165
|
snapshot: z.ZodObject<{
|
|
5150
5166
|
kind: z.ZodLiteral<"agent-candidate-workspace-snapshot">;
|
|
5151
5167
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -9332,6 +9348,10 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
|
|
|
9332
9348
|
evidenceHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
9333
9349
|
promotionPlanHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
9334
9350
|
}, z.core.$strict>;
|
|
9351
|
+
stateScope: z.ZodOptional<z.ZodObject<{
|
|
9352
|
+
pagesDirectory: z.ZodString;
|
|
9353
|
+
researchState: z.ZodBoolean;
|
|
9354
|
+
}, z.core.$strict>>;
|
|
9335
9355
|
snapshot: z.ZodObject<{
|
|
9336
9356
|
kind: z.ZodLiteral<"agent-candidate-workspace-snapshot">;
|
|
9337
9357
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -10165,6 +10185,10 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
|
|
|
10165
10185
|
evidenceHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
10166
10186
|
promotionPlanHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
10167
10187
|
}, z.core.$strict>;
|
|
10188
|
+
stateScope: z.ZodOptional<z.ZodObject<{
|
|
10189
|
+
pagesDirectory: z.ZodString;
|
|
10190
|
+
researchState: z.ZodBoolean;
|
|
10191
|
+
}, z.core.$strict>>;
|
|
10168
10192
|
snapshot: z.ZodObject<{
|
|
10169
10193
|
kind: z.ZodLiteral<"agent-candidate-workspace-snapshot">;
|
|
10170
10194
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -728,6 +728,10 @@ export declare const agentCandidateBundleSchema: z.ZodObject<{
|
|
|
728
728
|
evidenceHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
729
729
|
promotionPlanHash: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
730
730
|
}, z.core.$strict>;
|
|
731
|
+
stateScope: z.ZodOptional<z.ZodObject<{
|
|
732
|
+
pagesDirectory: z.ZodString;
|
|
733
|
+
researchState: z.ZodBoolean;
|
|
734
|
+
}, z.core.$strict>>;
|
|
731
735
|
snapshot: z.ZodObject<{
|
|
732
736
|
kind: z.ZodLiteral<"agent-candidate-workspace-snapshot">;
|
|
733
737
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -227,8 +227,15 @@ export interface AgentCandidateKnowledgeRef {
|
|
|
227
227
|
evidenceHash: Sha256Digest;
|
|
228
228
|
promotionPlanHash: Sha256Digest;
|
|
229
229
|
}
|
|
230
|
+
/** Canonical selection of knowledge state included in the candidate hash. */
|
|
231
|
+
export interface AgentCandidateKnowledgeStateScope {
|
|
232
|
+
pagesDirectory: string;
|
|
233
|
+
researchState: boolean;
|
|
234
|
+
}
|
|
230
235
|
export interface AgentCandidateKnowledge {
|
|
231
236
|
candidate: AgentCandidateKnowledgeRef;
|
|
237
|
+
/** Absent scopes retain the knowledge provider's default selection. */
|
|
238
|
+
stateScope?: AgentCandidateKnowledgeStateScope;
|
|
232
239
|
snapshot: AgentCandidateWorkspaceSnapshotEvidence;
|
|
233
240
|
retrievalConfig?: AgentCandidateCapturedArtifact;
|
|
234
241
|
evaluation: AgentCandidateCapturedArtifact;
|
|
@@ -111,6 +111,9 @@ export declare const agentExecutionPreparationAxisResultSchema: z.ZodObject<{
|
|
|
111
111
|
mcp: "mcp";
|
|
112
112
|
metadata: "metadata";
|
|
113
113
|
modelDefault: "modelDefault";
|
|
114
|
+
modelMaxReasoningTokens: "modelMaxReasoningTokens";
|
|
115
|
+
modelMaxTotalOutputTokens: "modelMaxTotalOutputTokens";
|
|
116
|
+
modelMaxVisibleOutputTokens: "modelMaxVisibleOutputTokens";
|
|
114
117
|
modelMetadata: "modelMetadata";
|
|
115
118
|
modelProvider: "modelProvider";
|
|
116
119
|
modelReasoningEffort: "modelReasoningEffort";
|
|
@@ -259,6 +262,9 @@ export declare const agentExecutionPreparationReceiptSchema: z.ZodObject<{
|
|
|
259
262
|
mcp: "mcp";
|
|
260
263
|
metadata: "metadata";
|
|
261
264
|
modelDefault: "modelDefault";
|
|
265
|
+
modelMaxReasoningTokens: "modelMaxReasoningTokens";
|
|
266
|
+
modelMaxTotalOutputTokens: "modelMaxTotalOutputTokens";
|
|
267
|
+
modelMaxVisibleOutputTokens: "modelMaxVisibleOutputTokens";
|
|
262
268
|
modelMetadata: "modelMetadata";
|
|
263
269
|
modelProvider: "modelProvider";
|
|
264
270
|
modelReasoningEffort: "modelReasoningEffort";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AgentProfile } from "./agent-profile.js";
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
3
|
+
* The canonical AgentProfile leaves that can affect one execution.
|
|
4
4
|
*
|
|
5
5
|
* Compound parents such as `model`, `prompt`, and `resources` are deliberately
|
|
6
6
|
* absent. A producer must report the exact requested leaf instead of claiming
|
|
@@ -9,7 +9,7 @@ import type { AgentProfile } from "./agent-profile.js";
|
|
|
9
9
|
* can only add text must report the requested replacement as unsatisfied rather
|
|
10
10
|
* than acknowledge it.
|
|
11
11
|
*/
|
|
12
|
-
export declare const AGENT_PROFILE_MATERIALIZATION_AXES: readonly ["name", "description", "version", "tags", "systemPrompt", "appendSystemPrompt", "instructions", "modelDefault", "modelSmall", "modelProvider", "modelReasoningEffort", "modelMetadata", "harness", "permissions", "tools", "mcp", "connections", "subagents", "files", "resourceTools", "skills", "resourceAgents", "commands", "resourceInstructions", "resourceFailOnError", "hooks", "modes", "confidential", "metadata", "extensions"];
|
|
12
|
+
export declare const AGENT_PROFILE_MATERIALIZATION_AXES: readonly ["name", "description", "version", "tags", "systemPrompt", "appendSystemPrompt", "instructions", "modelDefault", "modelSmall", "modelProvider", "modelReasoningEffort", "modelMaxVisibleOutputTokens", "modelMaxReasoningTokens", "modelMaxTotalOutputTokens", "modelMetadata", "harness", "permissions", "tools", "mcp", "connections", "subagents", "files", "resourceTools", "skills", "resourceAgents", "commands", "resourceInstructions", "resourceFailOnError", "hooks", "modes", "confidential", "metadata", "extensions"];
|
|
13
13
|
/** One exact leaf of the public AgentProfile contract. */
|
|
14
14
|
export type AgentProfileMaterializationAxis = (typeof AGENT_PROFILE_MATERIALIZATION_AXES)[number];
|
|
15
15
|
/** Compatibility name used by runtimes that distinguish canonical axes. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
2
|
+
* The canonical AgentProfile leaves that can affect one execution.
|
|
3
3
|
*
|
|
4
4
|
* Compound parents such as `model`, `prompt`, and `resources` are deliberately
|
|
5
5
|
* absent. A producer must report the exact requested leaf instead of claiming
|
|
@@ -20,6 +20,9 @@ export const AGENT_PROFILE_MATERIALIZATION_AXES = [
|
|
|
20
20
|
"modelSmall",
|
|
21
21
|
"modelProvider",
|
|
22
22
|
"modelReasoningEffort",
|
|
23
|
+
"modelMaxVisibleOutputTokens",
|
|
24
|
+
"modelMaxReasoningTokens",
|
|
25
|
+
"modelMaxTotalOutputTokens",
|
|
23
26
|
"modelMetadata",
|
|
24
27
|
"harness",
|
|
25
28
|
"permissions",
|
|
@@ -58,6 +61,16 @@ const profileProperties = [
|
|
|
58
61
|
];
|
|
59
62
|
const profilePropertiesAreExhaustive = true;
|
|
60
63
|
void profilePropertiesAreExhaustive;
|
|
64
|
+
const MODEL_AXES = {
|
|
65
|
+
default: "modelDefault",
|
|
66
|
+
small: "modelSmall",
|
|
67
|
+
provider: "modelProvider",
|
|
68
|
+
reasoningEffort: "modelReasoningEffort",
|
|
69
|
+
maxVisibleOutputTokens: "modelMaxVisibleOutputTokens",
|
|
70
|
+
maxReasoningTokens: "modelMaxReasoningTokens",
|
|
71
|
+
maxTotalOutputTokens: "modelMaxTotalOutputTokens",
|
|
72
|
+
metadata: "modelMetadata",
|
|
73
|
+
};
|
|
61
74
|
const AXIS_DESCRIPTORS = [
|
|
62
75
|
{ axis: "name", rootPath: "/name", value: (profile) => profile.name },
|
|
63
76
|
{
|
|
@@ -82,31 +95,11 @@ const AXIS_DESCRIPTORS = [
|
|
|
82
95
|
rootPath: "/prompt/instructions",
|
|
83
96
|
value: (profile) => profile.prompt?.instructions,
|
|
84
97
|
},
|
|
85
|
-
{
|
|
86
|
-
axis
|
|
87
|
-
rootPath:
|
|
88
|
-
value: (profile) => profile.model?.
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
axis: "modelSmall",
|
|
92
|
-
rootPath: "/model/small",
|
|
93
|
-
value: (profile) => profile.model?.small,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
axis: "modelProvider",
|
|
97
|
-
rootPath: "/model/provider",
|
|
98
|
-
value: (profile) => profile.model?.provider,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
axis: "modelReasoningEffort",
|
|
102
|
-
rootPath: "/model/reasoningEffort",
|
|
103
|
-
value: (profile) => profile.model?.reasoningEffort,
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
axis: "modelMetadata",
|
|
107
|
-
rootPath: "/model/metadata",
|
|
108
|
-
value: (profile) => profile.model?.metadata,
|
|
109
|
-
},
|
|
98
|
+
...Object.entries(MODEL_AXES).map(([property, axis]) => ({
|
|
99
|
+
axis,
|
|
100
|
+
rootPath: `/model/${property}`,
|
|
101
|
+
value: (profile) => profile.model?.[property],
|
|
102
|
+
})),
|
|
110
103
|
{ axis: "harness", rootPath: "/harness", value: (profile) => profile.harness },
|
|
111
104
|
{
|
|
112
105
|
axis: "permissions",
|
|
@@ -105,6 +105,9 @@ export declare const AgentInteractiveSessionRefSchema: z.ZodObject<{
|
|
|
105
105
|
mcp: "mcp";
|
|
106
106
|
metadata: "metadata";
|
|
107
107
|
modelDefault: "modelDefault";
|
|
108
|
+
modelMaxReasoningTokens: "modelMaxReasoningTokens";
|
|
109
|
+
modelMaxTotalOutputTokens: "modelMaxTotalOutputTokens";
|
|
110
|
+
modelMaxVisibleOutputTokens: "modelMaxVisibleOutputTokens";
|
|
108
111
|
modelMetadata: "modelMetadata";
|
|
109
112
|
modelProvider: "modelProvider";
|
|
110
113
|
modelReasoningEffort: "modelReasoningEffort";
|
|
@@ -277,6 +280,9 @@ export declare const AgentInteractiveSessionControlClaimRequestSchema: z.ZodObje
|
|
|
277
280
|
mcp: "mcp";
|
|
278
281
|
metadata: "metadata";
|
|
279
282
|
modelDefault: "modelDefault";
|
|
283
|
+
modelMaxReasoningTokens: "modelMaxReasoningTokens";
|
|
284
|
+
modelMaxTotalOutputTokens: "modelMaxTotalOutputTokens";
|
|
285
|
+
modelMaxVisibleOutputTokens: "modelMaxVisibleOutputTokens";
|
|
280
286
|
modelMetadata: "modelMetadata";
|
|
281
287
|
modelProvider: "modelProvider";
|
|
282
288
|
modelReasoningEffort: "modelReasoningEffort";
|
|
@@ -442,6 +448,9 @@ export declare const AgentInteractiveSessionControlClaimAcknowledgementSchema: z
|
|
|
442
448
|
mcp: "mcp";
|
|
443
449
|
metadata: "metadata";
|
|
444
450
|
modelDefault: "modelDefault";
|
|
451
|
+
modelMaxReasoningTokens: "modelMaxReasoningTokens";
|
|
452
|
+
modelMaxTotalOutputTokens: "modelMaxTotalOutputTokens";
|
|
453
|
+
modelMaxVisibleOutputTokens: "modelMaxVisibleOutputTokens";
|
|
445
454
|
modelMetadata: "modelMetadata";
|
|
446
455
|
modelProvider: "modelProvider";
|
|
447
456
|
modelReasoningEffort: "modelReasoningEffort";
|
|
@@ -628,6 +637,9 @@ export declare const AgentInteractiveSessionStatusSchema: z.ZodDiscriminatedUnio
|
|
|
628
637
|
mcp: "mcp";
|
|
629
638
|
metadata: "metadata";
|
|
630
639
|
modelDefault: "modelDefault";
|
|
640
|
+
modelMaxReasoningTokens: "modelMaxReasoningTokens";
|
|
641
|
+
modelMaxTotalOutputTokens: "modelMaxTotalOutputTokens";
|
|
642
|
+
modelMaxVisibleOutputTokens: "modelMaxVisibleOutputTokens";
|
|
631
643
|
modelMetadata: "modelMetadata";
|
|
632
644
|
modelProvider: "modelProvider";
|
|
633
645
|
modelReasoningEffort: "modelReasoningEffort";
|
|
@@ -773,6 +785,9 @@ export declare const AgentInteractiveSessionStatusSchema: z.ZodDiscriminatedUnio
|
|
|
773
785
|
mcp: "mcp";
|
|
774
786
|
metadata: "metadata";
|
|
775
787
|
modelDefault: "modelDefault";
|
|
788
|
+
modelMaxReasoningTokens: "modelMaxReasoningTokens";
|
|
789
|
+
modelMaxTotalOutputTokens: "modelMaxTotalOutputTokens";
|
|
790
|
+
modelMaxVisibleOutputTokens: "modelMaxVisibleOutputTokens";
|
|
776
791
|
modelMetadata: "modelMetadata";
|
|
777
792
|
modelProvider: "modelProvider";
|
|
778
793
|
modelReasoningEffort: "modelReasoningEffort";
|
|
@@ -926,6 +941,9 @@ export declare const AgentInteractiveSessionStatusSchema: z.ZodDiscriminatedUnio
|
|
|
926
941
|
mcp: "mcp";
|
|
927
942
|
metadata: "metadata";
|
|
928
943
|
modelDefault: "modelDefault";
|
|
944
|
+
modelMaxReasoningTokens: "modelMaxReasoningTokens";
|
|
945
|
+
modelMaxTotalOutputTokens: "modelMaxTotalOutputTokens";
|
|
946
|
+
modelMaxVisibleOutputTokens: "modelMaxVisibleOutputTokens";
|
|
929
947
|
modelMetadata: "modelMetadata";
|
|
930
948
|
modelProvider: "modelProvider";
|
|
931
949
|
modelReasoningEffort: "modelReasoningEffort";
|
|
@@ -1084,6 +1102,9 @@ export declare const AgentInteractiveSessionStopCommandSchema: z.ZodObject<{
|
|
|
1084
1102
|
mcp: "mcp";
|
|
1085
1103
|
metadata: "metadata";
|
|
1086
1104
|
modelDefault: "modelDefault";
|
|
1105
|
+
modelMaxReasoningTokens: "modelMaxReasoningTokens";
|
|
1106
|
+
modelMaxTotalOutputTokens: "modelMaxTotalOutputTokens";
|
|
1107
|
+
modelMaxVisibleOutputTokens: "modelMaxVisibleOutputTokens";
|
|
1087
1108
|
modelMetadata: "modelMetadata";
|
|
1088
1109
|
modelProvider: "modelProvider";
|
|
1089
1110
|
modelReasoningEffort: "modelReasoningEffort";
|
|
@@ -1251,6 +1272,9 @@ export declare const AgentInteractiveSessionStopAcknowledgementSchema: z.ZodObje
|
|
|
1251
1272
|
mcp: "mcp";
|
|
1252
1273
|
metadata: "metadata";
|
|
1253
1274
|
modelDefault: "modelDefault";
|
|
1275
|
+
modelMaxReasoningTokens: "modelMaxReasoningTokens";
|
|
1276
|
+
modelMaxTotalOutputTokens: "modelMaxTotalOutputTokens";
|
|
1277
|
+
modelMaxVisibleOutputTokens: "modelMaxVisibleOutputTokens";
|
|
1254
1278
|
modelMetadata: "modelMetadata";
|
|
1255
1279
|
modelProvider: "modelProvider";
|
|
1256
1280
|
modelReasoningEffort: "modelReasoningEffort";
|
|
@@ -1434,6 +1458,9 @@ export declare const AgentInteractiveSessionPromptCommandSchema: z.ZodObject<{
|
|
|
1434
1458
|
mcp: "mcp";
|
|
1435
1459
|
metadata: "metadata";
|
|
1436
1460
|
modelDefault: "modelDefault";
|
|
1461
|
+
modelMaxReasoningTokens: "modelMaxReasoningTokens";
|
|
1462
|
+
modelMaxTotalOutputTokens: "modelMaxTotalOutputTokens";
|
|
1463
|
+
modelMaxVisibleOutputTokens: "modelMaxVisibleOutputTokens";
|
|
1437
1464
|
modelMetadata: "modelMetadata";
|
|
1438
1465
|
modelProvider: "modelProvider";
|
|
1439
1466
|
modelReasoningEffort: "modelReasoningEffort";
|
|
@@ -1600,6 +1627,9 @@ export declare const AgentInteractiveSessionPromptAcknowledgementSchema: z.ZodOb
|
|
|
1600
1627
|
mcp: "mcp";
|
|
1601
1628
|
metadata: "metadata";
|
|
1602
1629
|
modelDefault: "modelDefault";
|
|
1630
|
+
modelMaxReasoningTokens: "modelMaxReasoningTokens";
|
|
1631
|
+
modelMaxTotalOutputTokens: "modelMaxTotalOutputTokens";
|
|
1632
|
+
modelMaxVisibleOutputTokens: "modelMaxVisibleOutputTokens";
|
|
1603
1633
|
modelMetadata: "modelMetadata";
|
|
1604
1634
|
modelProvider: "modelProvider";
|
|
1605
1635
|
modelReasoningEffort: "modelReasoningEffort";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import type { AgentRuntimeAttachments } from "./runtime-attachments.js";
|
|
3
|
+
export { AgentRuntimeAttachmentsSchema, type AgentRuntimeAttachments } from "./runtime-attachments.js";
|
|
2
4
|
import type { Sha256Digest } from "./agent-candidate.js";
|
|
3
5
|
import type { AgentProfileCapabilities, AgentProfileValidationResult } from "./agent-profile.js";
|
|
4
6
|
import type { InputPart } from "./parts.js";
|
|
@@ -283,6 +285,10 @@ export declare const AgentTurnResultSchema: z.ZodObject<{
|
|
|
283
285
|
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
284
286
|
cost: z.ZodOptional<z.ZodNumber>;
|
|
285
287
|
}, z.core.$strict>>;
|
|
288
|
+
usageMode: z.ZodOptional<z.ZodEnum<{
|
|
289
|
+
cumulative: "cumulative";
|
|
290
|
+
delta: "delta";
|
|
291
|
+
}>>;
|
|
286
292
|
providerEvent: z.ZodOptional<z.ZodCustom<unknown, unknown>>;
|
|
287
293
|
}, z.core.$strict>>>;
|
|
288
294
|
contextTransferReceipt: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -435,6 +441,10 @@ export declare const AgentNativeContextContinuationResultSchema: z.ZodUnion<read
|
|
|
435
441
|
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
436
442
|
cost: z.ZodOptional<z.ZodNumber>;
|
|
437
443
|
}, z.core.$strict>>;
|
|
444
|
+
usageMode: z.ZodOptional<z.ZodEnum<{
|
|
445
|
+
cumulative: "cumulative";
|
|
446
|
+
delta: "delta";
|
|
447
|
+
}>>;
|
|
438
448
|
providerEvent: z.ZodOptional<z.ZodCustom<unknown, unknown>>;
|
|
439
449
|
}, z.core.$strict>>>;
|
|
440
450
|
contextTransferReceipt: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -640,6 +650,12 @@ export interface AgentEnvironmentEvent {
|
|
|
640
650
|
id?: string;
|
|
641
651
|
normalized?: StreamEvent;
|
|
642
652
|
usage?: TokenUsage;
|
|
653
|
+
/**
|
|
654
|
+
* Delta is one new contribution; cumulative is the total so far for this turn.
|
|
655
|
+
* Cumulative totals include earlier deltas and may repeat during replay.
|
|
656
|
+
* Omission means the provider has not established the aggregation semantics.
|
|
657
|
+
*/
|
|
658
|
+
usageMode?: "delta" | "cumulative";
|
|
643
659
|
providerEvent?: unknown;
|
|
644
660
|
}
|
|
645
661
|
export interface AgentSession {
|
|
@@ -844,9 +860,8 @@ export interface AgentEnvironmentCapabilities {
|
|
|
844
860
|
egress: readonly AgentExactProcessEgressMode[];
|
|
845
861
|
};
|
|
846
862
|
/**
|
|
847
|
-
* Present only when create honors
|
|
848
|
-
*
|
|
849
|
-
* caller that needs either must not send it and call the result a policy.
|
|
863
|
+
* Present only when create honors at least one optional field below.
|
|
864
|
+
* Callers must check each requested field; an absent capability cannot satisfy it.
|
|
850
865
|
*
|
|
851
866
|
* Each member is present only when that field is honored, and the block carries at least one of
|
|
852
867
|
* them. A provider that takes a billing owner but no caller-controlled egress therefore states
|
|
@@ -864,6 +879,10 @@ export interface AgentEnvironmentCapabilities {
|
|
|
864
879
|
* authorizes the caller for that account; this flag states only that the field is not dropped.
|
|
865
880
|
*/
|
|
866
881
|
billingOwner?: boolean;
|
|
882
|
+
/** Runtime-owned MCP bindings applied without changing the authored profile. */
|
|
883
|
+
runtimeAttachments?: {
|
|
884
|
+
mcp: true;
|
|
885
|
+
};
|
|
867
886
|
};
|
|
868
887
|
/** Per-surface flags for the normalized environment observation. */
|
|
869
888
|
observation?: {
|
|
@@ -1007,6 +1026,9 @@ export declare const AgentEnvironmentCapabilitiesSchema: z.ZodObject<{
|
|
|
1007
1026
|
strict: "strict";
|
|
1008
1027
|
}>>>;
|
|
1009
1028
|
billingOwner: z.ZodOptional<z.ZodBoolean>;
|
|
1029
|
+
runtimeAttachments: z.ZodOptional<z.ZodObject<{
|
|
1030
|
+
mcp: z.ZodLiteral<true>;
|
|
1031
|
+
}, z.core.$strict>>;
|
|
1010
1032
|
}, z.core.$strict>>;
|
|
1011
1033
|
observation: z.ZodOptional<z.ZodObject<{
|
|
1012
1034
|
identity: z.ZodBoolean;
|
|
@@ -1039,6 +1061,13 @@ export declare const AgentEnvironmentCapabilitiesSchema: z.ZodObject<{
|
|
|
1039
1061
|
}, z.core.$strict>;
|
|
1040
1062
|
export interface CreateAgentEnvironmentInput {
|
|
1041
1063
|
profile: AgentProfileRef;
|
|
1064
|
+
/**
|
|
1065
|
+
* Runtime-owned execution inputs, separate from authored profile identity.
|
|
1066
|
+
* Providers must refuse unsupported attachments and authored MCP alias collisions.
|
|
1067
|
+
* Credentials are sensitive transport input; never include them in receipts or logs.
|
|
1068
|
+
* Attachments participate in keyed create identity and cannot be refreshed by replay.
|
|
1069
|
+
*/
|
|
1070
|
+
runtimeAttachments?: AgentRuntimeAttachments;
|
|
1042
1071
|
/** Exact caller-owned id required by an accepted destination contract. */
|
|
1043
1072
|
requestedId?: string;
|
|
1044
1073
|
/** Agent backend inside the provider, for example "opencode" or "codex". */
|
|
@@ -1158,6 +1187,7 @@ export interface AgentEnvironmentProvider {
|
|
|
1158
1187
|
*
|
|
1159
1188
|
* With `input.idempotencyKey`, the provider must return the same environment
|
|
1160
1189
|
* for the same canonical input and reject any changed input before creating.
|
|
1190
|
+
* A provider without durable keyed admission must reject a keyed request before provisioning.
|
|
1161
1191
|
* Without a key, each call may create a fresh environment.
|
|
1162
1192
|
*/
|
|
1163
1193
|
create(input: CreateAgentEnvironmentInput): Promise<AgentEnvironment>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export { AgentRuntimeAttachmentsSchema } from "./runtime-attachments.js";
|
|
2
3
|
import { canonicalCandidateDigest, canonicalCandidateJson, } from "./agent-candidate-schema-common.js";
|
|
3
4
|
import { InteractionCapabilitiesSchema, RequestedInteractionsSchema } from "./interaction.js";
|
|
4
5
|
import { ContextTransferReceiptSchema, ContextTransferRequestSchema, NativeContextBoundaryProofSchema, NativeContextContinuationAcknowledgementSchema, NativeContextContinuationRequestSchema, nativeContextContinuationAcknowledgementMatches } from "./portable-context.js";
|
|
@@ -40,6 +41,7 @@ const AgentEnvironmentEventSchema = z.strictObject({
|
|
|
40
41
|
id: boundedIdentifierSchema.optional(),
|
|
41
42
|
normalized: CanonicalStreamEventSchema.optional(),
|
|
42
43
|
usage: TokenUsageSchema.optional(),
|
|
44
|
+
usageMode: z.enum(["delta", "cumulative"]).optional(),
|
|
43
45
|
providerEvent: boundedJsonSchema.optional(),
|
|
44
46
|
});
|
|
45
47
|
/** Runtime validator for a provider turn returned from durable continuation. */
|
|
@@ -240,6 +242,7 @@ export const AgentEnvironmentCapabilitiesSchema = z
|
|
|
240
242
|
.max(CONTRACT_MAX_ARRAY_LENGTH)
|
|
241
243
|
.optional(),
|
|
242
244
|
billingOwner: z.boolean().optional(),
|
|
245
|
+
runtimeAttachments: z.strictObject({ mcp: z.literal(true) }).optional(),
|
|
243
246
|
})
|
|
244
247
|
.optional(),
|
|
245
248
|
observation: z
|
|
@@ -346,7 +349,7 @@ export const AgentEnvironmentCapabilitiesSchema = z
|
|
|
346
349
|
}
|
|
347
350
|
const create = capabilities.create;
|
|
348
351
|
if (create !== undefined) {
|
|
349
|
-
if (create.egress === undefined && create.billingOwner === undefined) {
|
|
352
|
+
if (create.egress === undefined && create.billingOwner === undefined && create.runtimeAttachments === undefined) {
|
|
350
353
|
refinement.addIssue({
|
|
351
354
|
code: "custom",
|
|
352
355
|
path: ["create"],
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export * from "./host-services.js";
|
|
|
8
8
|
export * from "./mcp.js";
|
|
9
9
|
export * from "./provider-adapter.js";
|
|
10
10
|
export type * from "./environment-provider.js";
|
|
11
|
-
export { AgentEnvironmentCapabilitiesSchema, AgentNativeContextContinuationAdmissionSchema, AgentNativeContextContinuationResultSchema, AgentTurnInputSchema, AgentTurnResultSchema, agentEnvironmentCreateInputDigest, agentNativeContextContinuationAdmissionMatchesRequest, agentNativeContextContinuationResultMatchesRequest, AccountUsageSchema, AgentEnvironmentObservationSchema, AgentEnvironmentStatusSchema, ComputeBillingSchema, EnvironmentLifecycleSchema, ModelUsageSchema, ObservationProvenanceSchema, ObservationStateSchema, PlacementDescriptorSchema, ProviderIdentitySchema, ResourceProfileSchema, ResourceUseSampleSchema, SafeEndpointSchema, agentEnvironmentObservationIdentityMatches, assertObservationCredentialFree, observationContainsCredential, observationOf, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimRequestSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionPromptCommandSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentInteractiveSessionStopCommandSchema, AgentInteractiveSessionStatusSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimRequestDigest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionControlClaimIsNewer, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionPromptRequestDigest, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentInteractiveSessionStopRequestDigest, agentInteractiveSessionRequestDigest, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, exactAgentInteractiveSessionStart, AgentEnvironmentCreationSchema, createAgentEnvironmentWithIdempotency, replayedAgentEnvironmentView, canonicalWorkspaceCwd, MAX_WORKSPACE_CWD_LENGTH, workspaceCwdSchema, workspaceCwdPathForBase, WorkspaceRequestSchema, TerminalAttachRequestSchema, TerminalAttachResultSchema, TerminalDetachAckSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, terminalAttachResultMatchesRequest, terminalSessionUsable, } from "./environment-provider.js";
|
|
11
|
+
export { AgentEnvironmentCapabilitiesSchema, AgentRuntimeAttachmentsSchema, AgentNativeContextContinuationAdmissionSchema, AgentNativeContextContinuationResultSchema, AgentTurnInputSchema, AgentTurnResultSchema, agentEnvironmentCreateInputDigest, agentNativeContextContinuationAdmissionMatchesRequest, agentNativeContextContinuationResultMatchesRequest, AccountUsageSchema, AgentEnvironmentObservationSchema, AgentEnvironmentStatusSchema, ComputeBillingSchema, EnvironmentLifecycleSchema, ModelUsageSchema, ObservationProvenanceSchema, ObservationStateSchema, PlacementDescriptorSchema, ProviderIdentitySchema, ResourceProfileSchema, ResourceUseSampleSchema, SafeEndpointSchema, agentEnvironmentObservationIdentityMatches, assertObservationCredentialFree, observationContainsCredential, observationOf, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimRequestSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionPromptCommandSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentInteractiveSessionStopCommandSchema, AgentInteractiveSessionStatusSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimRequestDigest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionControlClaimIsNewer, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionPromptRequestDigest, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentInteractiveSessionStopRequestDigest, agentInteractiveSessionRequestDigest, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, exactAgentInteractiveSessionStart, AgentEnvironmentCreationSchema, createAgentEnvironmentWithIdempotency, replayedAgentEnvironmentView, canonicalWorkspaceCwd, MAX_WORKSPACE_CWD_LENGTH, workspaceCwdSchema, workspaceCwdPathForBase, WorkspaceRequestSchema, TerminalAttachRequestSchema, TerminalAttachResultSchema, TerminalDetachAckSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, terminalAttachResultMatchesRequest, terminalSessionUsable, } from "./environment-provider.js";
|
|
12
12
|
export * from "./plan.js";
|
|
13
13
|
export * from "./runtime-control.js";
|
|
14
14
|
export * from "./portable-context.js";
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ export * from "./provider-config.js";
|
|
|
7
7
|
export * from "./host-services.js";
|
|
8
8
|
export * from "./mcp.js";
|
|
9
9
|
export * from "./provider-adapter.js";
|
|
10
|
-
export { AgentEnvironmentCapabilitiesSchema, AgentNativeContextContinuationAdmissionSchema, AgentNativeContextContinuationResultSchema, AgentTurnInputSchema, AgentTurnResultSchema, agentEnvironmentCreateInputDigest, agentNativeContextContinuationAdmissionMatchesRequest, agentNativeContextContinuationResultMatchesRequest, AccountUsageSchema, AgentEnvironmentObservationSchema, AgentEnvironmentStatusSchema, ComputeBillingSchema, EnvironmentLifecycleSchema, ModelUsageSchema, ObservationProvenanceSchema, ObservationStateSchema, PlacementDescriptorSchema, ProviderIdentitySchema, ResourceProfileSchema, ResourceUseSampleSchema, SafeEndpointSchema, agentEnvironmentObservationIdentityMatches, assertObservationCredentialFree, observationContainsCredential, observationOf, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimRequestSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionPromptCommandSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentInteractiveSessionStopCommandSchema, AgentInteractiveSessionStatusSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimRequestDigest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionControlClaimIsNewer, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionPromptRequestDigest, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentInteractiveSessionStopRequestDigest, agentInteractiveSessionRequestDigest, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, exactAgentInteractiveSessionStart, AgentEnvironmentCreationSchema, createAgentEnvironmentWithIdempotency, replayedAgentEnvironmentView, canonicalWorkspaceCwd, MAX_WORKSPACE_CWD_LENGTH, workspaceCwdSchema, workspaceCwdPathForBase, WorkspaceRequestSchema, TerminalAttachRequestSchema, TerminalAttachResultSchema, TerminalDetachAckSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, terminalAttachResultMatchesRequest, terminalSessionUsable, } from "./environment-provider.js";
|
|
10
|
+
export { AgentEnvironmentCapabilitiesSchema, AgentRuntimeAttachmentsSchema, AgentNativeContextContinuationAdmissionSchema, AgentNativeContextContinuationResultSchema, AgentTurnInputSchema, AgentTurnResultSchema, agentEnvironmentCreateInputDigest, agentNativeContextContinuationAdmissionMatchesRequest, agentNativeContextContinuationResultMatchesRequest, AccountUsageSchema, AgentEnvironmentObservationSchema, AgentEnvironmentStatusSchema, ComputeBillingSchema, EnvironmentLifecycleSchema, ModelUsageSchema, ObservationProvenanceSchema, ObservationStateSchema, PlacementDescriptorSchema, ProviderIdentitySchema, ResourceProfileSchema, ResourceUseSampleSchema, SafeEndpointSchema, agentEnvironmentObservationIdentityMatches, assertObservationCredentialFree, observationContainsCredential, observationOf, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimRequestSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionPromptCommandSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentInteractiveSessionStopCommandSchema, AgentInteractiveSessionStatusSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimRequestDigest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionControlClaimIsNewer, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionPromptRequestDigest, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentInteractiveSessionStopRequestDigest, agentInteractiveSessionRequestDigest, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, exactAgentInteractiveSessionStart, AgentEnvironmentCreationSchema, createAgentEnvironmentWithIdempotency, replayedAgentEnvironmentView, canonicalWorkspaceCwd, MAX_WORKSPACE_CWD_LENGTH, workspaceCwdSchema, workspaceCwdPathForBase, WorkspaceRequestSchema, TerminalAttachRequestSchema, TerminalAttachResultSchema, TerminalDetachAckSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, terminalAttachResultMatchesRequest, terminalSessionUsable, } from "./environment-provider.js";
|
|
11
11
|
export * from "./plan.js";
|
|
12
12
|
export * from "./runtime-control.js";
|
|
13
13
|
export * from "./portable-context.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { AgentProfileMcpServer } from "./agent-profile.js";
|
|
3
|
+
/** Runtime-owned bindings do not alter the authored AgentProfile or candidate identity. */
|
|
4
|
+
export interface AgentRuntimeAttachments {
|
|
5
|
+
mcp: Record<string, AgentProfileMcpServer>;
|
|
6
|
+
}
|
|
7
|
+
export declare const AgentRuntimeAttachmentsSchema: z.ZodType<AgentRuntimeAttachments>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { agentProfileSchema } from "./profile-schema.js";
|
|
3
|
+
import { boundedIdentifierSchema, boundedJsonSchema } from "./contract-limits.js";
|
|
4
|
+
export const AgentRuntimeAttachmentsSchema = boundedJsonSchema.pipe(z.strictObject({
|
|
5
|
+
mcp: agentProfileSchema.shape.mcp.unwrap().superRefine((servers, context) => {
|
|
6
|
+
for (const alias of Object.keys(servers)) {
|
|
7
|
+
const result = boundedIdentifierSchema.safeParse(alias);
|
|
8
|
+
if (!result.success) {
|
|
9
|
+
for (const issue of result.error.issues) {
|
|
10
|
+
context.addIssue({ ...issue, path: [alias, ...issue.path] });
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}),
|
|
15
|
+
}));
|