@tangle-network/agent-interface 5.10.24 → 5.10.26

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.
Files changed (33) hide show
  1. package/README.md +10 -0
  2. package/dist/agent-candidate-code-schema.d.ts +7 -7
  3. package/dist/agent-candidate-execution-plan-schema.d.ts +21 -21
  4. package/dist/agent-candidate-profile-schema.d.ts +4 -4
  5. package/dist/agent-candidate-promotion-schema.d.ts +80 -80
  6. package/dist/agent-candidate-receipt-schema.d.ts +10 -10
  7. package/dist/agent-candidate-schema-common.d.ts +4 -3
  8. package/dist/agent-candidate-schema-common.js +45 -20
  9. package/dist/agent-candidate-schema.d.ts +5 -5
  10. package/dist/agent-execution-preparation-receipt.d.ts +4 -2
  11. package/dist/agent-profile-materialization.d.ts +1 -1
  12. package/dist/agent-profile-materialization.js +3 -0
  13. package/dist/agent-profile.d.ts +3 -0
  14. package/dist/agent-profile.js +0 -13
  15. package/dist/environment-interactive-control.d.ts +20 -10
  16. package/dist/environment-interactive-start.d.ts +6 -2
  17. package/dist/environment-observation.d.ts +3 -3
  18. package/dist/environment-provider.d.ts +1 -0
  19. package/dist/environment-provider.js +1 -0
  20. package/dist/environment-retained-file.d.ts +124 -0
  21. package/dist/environment-retained-file.js +37 -0
  22. package/dist/environment-runtime.d.ts +23 -6
  23. package/dist/environment-runtime.js +1 -0
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.js +1 -0
  26. package/dist/portable-context-transfer.d.ts +6 -2
  27. package/dist/profile-diff.d.ts +2 -1
  28. package/dist/profile-diff.js +3 -0
  29. package/dist/profile-file-output.d.ts +10 -0
  30. package/dist/profile-file-output.js +8 -0
  31. package/dist/profile-schema.d.ts +15 -10
  32. package/dist/profile-schema.js +3 -0
  33. package/package.json +1 -1
@@ -0,0 +1,124 @@
1
+ import { type AgentFileOutputPolicy } from "./profile-file-output.js";
2
+ export { AgentFileOutputPolicySchema, type AgentFileOutputPolicy } from "./profile-file-output.js";
3
+ import { z } from "zod";
4
+ import type { Sha256Digest } from "./agent-candidate.js";
5
+ import { type AgentExactRunControlRef } from "./runtime-control.js";
6
+ /** Provider evidence for one stopped, immutable, preserved regular-file publication.
7
+ * The provider reference is an address, never authority; only that provider's authorized
8
+ * reader may interpret it, and must verify the selected revision and bytes to EOF.
9
+ */
10
+ export interface AgentRetainedFilePublication {
11
+ controlRef: AgentExactRunControlRef;
12
+ policy: AgentFileOutputPolicy;
13
+ source: {
14
+ environmentId: string;
15
+ createdAt: string;
16
+ filesystemIncarnationId: string;
17
+ workspaceSnapshot: string;
18
+ };
19
+ file: {
20
+ path: string;
21
+ kind: "regular";
22
+ sha256: Sha256Digest;
23
+ byteLength: number;
24
+ };
25
+ /** The actual provider-owned receipt, not a reconstructed latest-file descriptor. */
26
+ providerReference: Record<string, unknown>;
27
+ preserved: true;
28
+ }
29
+ export declare const AgentRetainedFilePublicationSchema: z.ZodObject<{
30
+ controlRef: z.ZodObject<{
31
+ runId: z.ZodString;
32
+ provider: z.ZodString;
33
+ environmentId: z.ZodString;
34
+ sessionId: z.ZodString;
35
+ executionId: z.ZodString;
36
+ requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
37
+ }, z.core.$strict>;
38
+ policy: z.ZodObject<{
39
+ name: z.ZodString;
40
+ path: z.ZodString;
41
+ }, z.core.$strict>;
42
+ source: z.ZodObject<{
43
+ environmentId: z.ZodString;
44
+ createdAt: z.ZodString;
45
+ filesystemIncarnationId: z.ZodString;
46
+ workspaceSnapshot: z.ZodString;
47
+ }, z.core.$strict>;
48
+ file: z.ZodObject<{
49
+ path: z.ZodString;
50
+ kind: z.ZodLiteral<"regular">;
51
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
52
+ byteLength: z.ZodNumber;
53
+ }, z.core.$strict>;
54
+ providerReference: z.ZodCustom<Record<string, unknown>, Record<string, unknown>>;
55
+ preserved: z.ZodLiteral<true>;
56
+ }, z.core.$strict>;
57
+ export interface AgentRetainedFileOutputRequest {
58
+ controlRef: AgentExactRunControlRef;
59
+ policy: AgentFileOutputPolicy;
60
+ }
61
+ export declare const AgentRetainedFileOutputRequestSchema: z.ZodObject<{
62
+ controlRef: z.ZodObject<{
63
+ runId: z.ZodString;
64
+ provider: z.ZodString;
65
+ environmentId: z.ZodString;
66
+ sessionId: z.ZodString;
67
+ executionId: z.ZodString;
68
+ requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
69
+ }, z.core.$strict>;
70
+ policy: z.ZodObject<{
71
+ name: z.ZodString;
72
+ path: z.ZodString;
73
+ }, z.core.$strict>;
74
+ }, z.core.$strict>;
75
+ /** Unavailable is an evidence gap, never a quality verdict or permission to substitute a later file. */
76
+ export type AgentRetainedFileOutputResult = {
77
+ status: "published";
78
+ publication: AgentRetainedFilePublication;
79
+ } | {
80
+ status: "unavailable";
81
+ reason: string;
82
+ };
83
+ export declare const AgentRetainedFileOutputResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
84
+ status: z.ZodLiteral<"published">;
85
+ publication: z.ZodObject<{
86
+ controlRef: z.ZodObject<{
87
+ runId: z.ZodString;
88
+ provider: z.ZodString;
89
+ environmentId: z.ZodString;
90
+ sessionId: z.ZodString;
91
+ executionId: z.ZodString;
92
+ requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
93
+ }, z.core.$strict>;
94
+ policy: z.ZodObject<{
95
+ name: z.ZodString;
96
+ path: z.ZodString;
97
+ }, z.core.$strict>;
98
+ source: z.ZodObject<{
99
+ environmentId: z.ZodString;
100
+ createdAt: z.ZodString;
101
+ filesystemIncarnationId: z.ZodString;
102
+ workspaceSnapshot: z.ZodString;
103
+ }, z.core.$strict>;
104
+ file: z.ZodObject<{
105
+ path: z.ZodString;
106
+ kind: z.ZodLiteral<"regular">;
107
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
108
+ byteLength: z.ZodNumber;
109
+ }, z.core.$strict>;
110
+ providerReference: z.ZodCustom<Record<string, unknown>, Record<string, unknown>>;
111
+ preserved: z.ZodLiteral<true>;
112
+ }, z.core.$strict>;
113
+ }, z.core.$strict>, z.ZodObject<{
114
+ status: z.ZodLiteral<"unavailable">;
115
+ reason: z.ZodString;
116
+ }, z.core.$strict>], "status">;
117
+ /** Stop and preserve the declared file through this exact execution's physical owner.
118
+ * A successful JSON submission is separate. Retain the original association before continuation
119
+ * or release; a lost receipt stays unknown.
120
+ */
121
+ export type AgentRetainedFileOutputOperation = (request: AgentRetainedFileOutputRequest, options?: {
122
+ signal?: AbortSignal;
123
+ idempotencyKey?: string;
124
+ }) => Promise<AgentRetainedFileOutputResult>;
@@ -0,0 +1,37 @@
1
+ import { AgentFileOutputPolicySchema } from "./profile-file-output.js";
2
+ export { AgentFileOutputPolicySchema } from "./profile-file-output.js";
3
+ import { z } from "zod";
4
+ import { sha256DigestSchema } from "./agent-candidate-schema-common.js";
5
+ import { boundedIdentifierSchema, boundedJsonRecordSchema, boundedStringSchema } from "./contract-limits.js";
6
+ import { AgentExactRunControlRefSchema } from "./runtime-control.js";
7
+ export const AgentRetainedFilePublicationSchema = z.strictObject({
8
+ controlRef: AgentExactRunControlRefSchema,
9
+ policy: AgentFileOutputPolicySchema,
10
+ source: z.strictObject({
11
+ environmentId: boundedIdentifierSchema,
12
+ createdAt: boundedStringSchema,
13
+ filesystemIncarnationId: boundedIdentifierSchema,
14
+ workspaceSnapshot: boundedIdentifierSchema,
15
+ }),
16
+ file: z.strictObject({
17
+ path: AgentFileOutputPolicySchema.shape.path,
18
+ kind: z.literal("regular"),
19
+ sha256: sha256DigestSchema,
20
+ byteLength: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
21
+ }),
22
+ providerReference: boundedJsonRecordSchema,
23
+ preserved: z.literal(true),
24
+ }).superRefine((publication, ctx) => {
25
+ if (publication.source.environmentId !== publication.controlRef.environmentId)
26
+ ctx.addIssue({ code: "custom", path: ["source", "environmentId"], message: "Publication belongs to another environment" });
27
+ if (publication.file.path !== publication.policy.path)
28
+ ctx.addIssue({ code: "custom", path: ["file", "path"], message: "Publication does not contain the declared output" });
29
+ });
30
+ export const AgentRetainedFileOutputRequestSchema = z.strictObject({
31
+ controlRef: AgentExactRunControlRefSchema,
32
+ policy: AgentFileOutputPolicySchema,
33
+ });
34
+ export const AgentRetainedFileOutputResultSchema = z.discriminatedUnion("status", [
35
+ z.strictObject({ status: z.literal("published"), publication: AgentRetainedFilePublicationSchema }),
36
+ z.strictObject({ status: z.literal("unavailable"), reason: boundedStringSchema }),
37
+ ]);
@@ -3,6 +3,7 @@ import { z } from "zod";
3
3
  import { type ProxySecretBinding, type ProxySecretCapabilities, type ProxySecretReceipt, type ProxySecretParents } from "./proxy-secrets.js";
4
4
  import type { AgentRuntimeAttachments } from "./runtime-attachments.js";
5
5
  import type { AgentEnvironmentLifetime } from "./environment-lifetime.js";
6
+ import type { AgentRetainedFileOutputOperation } from "./environment-retained-file.js";
6
7
  export { AgentRuntimeAttachmentsSchema, type AgentRuntimeAttachments } from "./runtime-attachments.js";
7
8
  import type { AgentCandidateArtifactPort } from "./agent-candidate.js";
8
9
  import type { AgentProfile, AgentProfileCapabilities, AgentProfileValidationResult } from "./agent-profile.js";
@@ -51,6 +52,10 @@ export interface AgentTurnInput {
51
52
  }
52
53
  export declare const AgentTurnInputSchema: z.ZodObject<{
53
54
  profile: z.ZodOptional<z.ZodObject<{
55
+ outputFile: z.ZodOptional<z.ZodObject<{
56
+ name: z.ZodString;
57
+ path: z.ZodString;
58
+ }, z.core.$strict>>;
54
59
  name: z.ZodOptional<z.ZodString>;
55
60
  description: z.ZodOptional<z.ZodString>;
56
61
  version: z.ZodOptional<z.ZodString>;
@@ -284,7 +289,7 @@ export declare const AgentTurnInputSchema: z.ZodObject<{
284
289
  env?: Record<string, {
285
290
  kind: "secret-ref";
286
291
  key: string;
287
- format?: "raw" | "bearer" | undefined;
292
+ format?: "bearer" | "raw" | undefined;
288
293
  } | {
289
294
  kind: "public";
290
295
  value: string;
@@ -297,7 +302,7 @@ export declare const AgentTurnInputSchema: z.ZodObject<{
297
302
  env?: Record<string, {
298
303
  kind: "secret-ref";
299
304
  key: string;
300
- format?: "raw" | "bearer" | undefined;
305
+ format?: "bearer" | "raw" | undefined;
301
306
  } | {
302
307
  kind: "public";
303
308
  value: string;
@@ -470,6 +475,10 @@ export declare const AgentTurnInputSchema: z.ZodObject<{
470
475
  }>;
471
476
  }, z.core.$strict>;
472
477
  profile: z.ZodOptional<z.ZodObject<{
478
+ outputFile: z.ZodOptional<z.ZodObject<{
479
+ name: z.ZodString;
480
+ path: z.ZodString;
481
+ }, z.core.$strict>>;
473
482
  name: z.ZodOptional<z.ZodString>;
474
483
  description: z.ZodOptional<z.ZodString>;
475
484
  version: z.ZodOptional<z.ZodString>;
@@ -703,7 +712,7 @@ export declare const AgentTurnInputSchema: z.ZodObject<{
703
712
  env?: Record<string, {
704
713
  kind: "secret-ref";
705
714
  key: string;
706
- format?: "raw" | "bearer" | undefined;
715
+ format?: "bearer" | "raw" | undefined;
707
716
  } | {
708
717
  kind: "public";
709
718
  value: string;
@@ -716,7 +725,7 @@ export declare const AgentTurnInputSchema: z.ZodObject<{
716
725
  env?: Record<string, {
717
726
  kind: "secret-ref";
718
727
  key: string;
719
- format?: "raw" | "bearer" | undefined;
728
+ format?: "bearer" | "raw" | undefined;
720
729
  } | {
721
730
  kind: "public";
722
731
  value: string;
@@ -1393,6 +1402,7 @@ export interface AgentEnvironment {
1393
1402
  * reached by one provider can differ in age. Absent when provider capabilities
1394
1403
  * already describe every environment it creates. */
1395
1404
  readonly capabilities?: AgentEnvironmentCapabilities;
1405
+ retainFileOutput?: AgentRetainedFileOutputOperation;
1396
1406
  status(options?: {
1397
1407
  signal?: AbortSignal;
1398
1408
  }): Promise<AgentEnvironmentStatus>;
@@ -1496,6 +1506,8 @@ export interface AgentEnvironmentCapabilities {
1496
1506
  git: boolean;
1497
1507
  upload: boolean;
1498
1508
  download: boolean;
1509
+ /** The adapter implements exact retained-file publication; absent means unsupported. */
1510
+ retainFileOutput?: boolean;
1499
1511
  /** Path bases accepted by the provider's workspace create contract. */
1500
1512
  cwdBases?: {
1501
1513
  repository: boolean;
@@ -1692,6 +1704,7 @@ export declare const AgentEnvironmentCapabilitiesSchema: z.ZodObject<{
1692
1704
  git: z.ZodBoolean;
1693
1705
  upload: z.ZodBoolean;
1694
1706
  download: z.ZodBoolean;
1707
+ retainFileOutput: z.ZodOptional<z.ZodBoolean>;
1695
1708
  cwdBases: z.ZodOptional<z.ZodObject<{
1696
1709
  repository: z.ZodBoolean;
1697
1710
  host: z.ZodBoolean;
@@ -1956,6 +1969,10 @@ export declare const AgentEnvironmentGetOptionsSchema: z.ZodObject<{
1956
1969
  }>;
1957
1970
  }, z.core.$strict>;
1958
1971
  profile: z.ZodOptional<z.ZodObject<{
1972
+ outputFile: z.ZodOptional<z.ZodObject<{
1973
+ name: z.ZodString;
1974
+ path: z.ZodString;
1975
+ }, z.core.$strict>>;
1959
1976
  name: z.ZodOptional<z.ZodString>;
1960
1977
  description: z.ZodOptional<z.ZodString>;
1961
1978
  version: z.ZodOptional<z.ZodString>;
@@ -2189,7 +2206,7 @@ export declare const AgentEnvironmentGetOptionsSchema: z.ZodObject<{
2189
2206
  env?: Record<string, {
2190
2207
  kind: "secret-ref";
2191
2208
  key: string;
2192
- format?: "raw" | "bearer" | undefined;
2209
+ format?: "bearer" | "raw" | undefined;
2193
2210
  } | {
2194
2211
  kind: "public";
2195
2212
  value: string;
@@ -2202,7 +2219,7 @@ export declare const AgentEnvironmentGetOptionsSchema: z.ZodObject<{
2202
2219
  env?: Record<string, {
2203
2220
  kind: "secret-ref";
2204
2221
  key: string;
2205
- format?: "raw" | "bearer" | undefined;
2222
+ format?: "bearer" | "raw" | undefined;
2206
2223
  } | {
2207
2224
  kind: "public";
2208
2225
  value: string;
@@ -211,6 +211,7 @@ export const AgentEnvironmentCapabilitiesSchema = z
211
211
  git: z.boolean(),
212
212
  upload: z.boolean(),
213
213
  download: z.boolean(),
214
+ retainFileOutput: z.boolean().optional(),
214
215
  cwdBases: z
215
216
  .strictObject({
216
217
  repository: z.boolean(),
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ export type * from "./environment-provider.js";
12
12
  export type { AgentEnvironmentLifetime } from "./environment-lifetime.js";
13
13
  export { AgentEnvironmentCapabilitiesSchema, AgentEnvironmentReadOnlyGetOptionsSchema, AgentRuntimeAttachmentsSchema, AgentNativeContextContinuationAdmissionSchema, AgentNativeContextContinuationResultSchema, AgentTurnInputSchema, AgentTurnResultSchema, agentEnvironmentCreateInputDigest, agentNativeContextContinuationAdmissionMatchesRequest, agentNativeContextContinuationResultMatchesRequest, AccountUsageSchema, AgentEnvironmentObservationSchema, AgentEnvironmentStatusSchema, ComputeBillingSchema, EnvironmentLifecycleSchema, ModelUsageSchema, ObservationProvenanceSchema, PlacementDescriptorSchema, ProviderIdentitySchema, ResourceProfileSchema, ResourceUseSampleSchema, SafeEndpointSchema, agentEnvironmentObservationIdentityMatches, observationContainsCredential, observationOf, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimRequestSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionPromptCommandSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentInteractiveSessionStopCommandSchema, AgentInteractiveSessionStatusSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimRequestDigest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionControlClaimIsNewer, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionPromptRequestDigest, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentInteractiveSessionStopRequestDigest, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, exactAgentInteractiveSessionStart, createAgentEnvironmentWithIdempotency, canonicalWorkspaceCwd, MAX_WORKSPACE_CWD_LENGTH, workspaceCwdSchema, workspaceCwdPathForBase, WorkspaceRequestSchema, ResourceRequestSchema, TerminalAttachRequestSchema, TerminalAttachResultSchema, TerminalDetachAckSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, terminalAttachResultMatchesRequest, terminalSessionUsable, } from "./environment-provider.js";
14
14
  export * from "./environment-provider-error.js";
15
+ export * from "./environment-retained-file.js";
15
16
  export * from "./plan.js";
16
17
  export * from "./runtime-control.js";
17
18
  export * from "./portable-context.js";
package/dist/index.js CHANGED
@@ -10,6 +10,7 @@ export * from "./mcp.js";
10
10
  export * from "./provider-adapter.js";
11
11
  export { AgentEnvironmentCapabilitiesSchema, AgentEnvironmentReadOnlyGetOptionsSchema, AgentRuntimeAttachmentsSchema, AgentNativeContextContinuationAdmissionSchema, AgentNativeContextContinuationResultSchema, AgentTurnInputSchema, AgentTurnResultSchema, agentEnvironmentCreateInputDigest, agentNativeContextContinuationAdmissionMatchesRequest, agentNativeContextContinuationResultMatchesRequest, AccountUsageSchema, AgentEnvironmentObservationSchema, AgentEnvironmentStatusSchema, ComputeBillingSchema, EnvironmentLifecycleSchema, ModelUsageSchema, ObservationProvenanceSchema, PlacementDescriptorSchema, ProviderIdentitySchema, ResourceProfileSchema, ResourceUseSampleSchema, SafeEndpointSchema, agentEnvironmentObservationIdentityMatches, observationContainsCredential, observationOf, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimRequestSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionPromptCommandSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentInteractiveSessionStopCommandSchema, AgentInteractiveSessionStatusSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimRequestDigest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionControlClaimIsNewer, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionPromptRequestDigest, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentInteractiveSessionStopRequestDigest, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, exactAgentInteractiveSessionStart, createAgentEnvironmentWithIdempotency, canonicalWorkspaceCwd, MAX_WORKSPACE_CWD_LENGTH, workspaceCwdSchema, workspaceCwdPathForBase, WorkspaceRequestSchema, ResourceRequestSchema, TerminalAttachRequestSchema, TerminalAttachResultSchema, TerminalDetachAckSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, terminalAttachResultMatchesRequest, terminalSessionUsable, } from "./environment-provider.js";
12
12
  export * from "./environment-provider-error.js";
13
+ export * from "./environment-retained-file.js";
13
14
  export * from "./plan.js";
14
15
  export * from "./runtime-control.js";
15
16
  export * from "./portable-context.js";
@@ -135,6 +135,10 @@ export declare const ContextTransferRequestSchema: z.ZodObject<{
135
135
  }>;
136
136
  }, z.core.$strict>;
137
137
  profile: z.ZodOptional<z.ZodObject<{
138
+ outputFile: z.ZodOptional<z.ZodObject<{
139
+ name: z.ZodString;
140
+ path: z.ZodString;
141
+ }, z.core.$strict>>;
138
142
  name: z.ZodOptional<z.ZodString>;
139
143
  description: z.ZodOptional<z.ZodString>;
140
144
  version: z.ZodOptional<z.ZodString>;
@@ -368,7 +372,7 @@ export declare const ContextTransferRequestSchema: z.ZodObject<{
368
372
  env?: Record<string, {
369
373
  kind: "secret-ref";
370
374
  key: string;
371
- format?: "raw" | "bearer" | undefined;
375
+ format?: "bearer" | "raw" | undefined;
372
376
  } | {
373
377
  kind: "public";
374
378
  value: string;
@@ -381,7 +385,7 @@ export declare const ContextTransferRequestSchema: z.ZodObject<{
381
385
  env?: Record<string, {
382
386
  kind: "secret-ref";
383
387
  key: string;
384
- format?: "raw" | "bearer" | undefined;
388
+ format?: "bearer" | "raw" | undefined;
385
389
  } | {
386
390
  kind: "public";
387
391
  value: string;
@@ -1,5 +1,5 @@
1
1
  import type { AgentProfile } from "./agent-profile.js";
2
- declare const agentProfileDiffPropertyAxes: readonly ["prompt", "model", "harness", "seats", "proxySecrets", "permissions", "tools", "mcp", "connections", "subagents", "resources", "hooks", "modes", "confidential", "metadata", "extensions"];
2
+ declare const agentProfileDiffPropertyAxes: readonly ["outputFile", "prompt", "model", "harness", "seats", "proxySecrets", "permissions", "tools", "mcp", "connections", "subagents", "resources", "hooks", "modes", "confidential", "metadata", "extensions"];
3
3
  export type AgentProfileDiffAxis = "identity" | (typeof agentProfileDiffPropertyAxes)[number];
4
4
  export type AgentProfileRemoveList = true | readonly string[];
5
5
  export interface AgentProfilePromptRemoval {
@@ -18,6 +18,7 @@ export interface AgentProfileResourceRemoval {
18
18
  failOnError?: true;
19
19
  }
20
20
  export interface AgentProfileDiffRemoval {
21
+ outputFile?: true;
21
22
  identity?: true;
22
23
  tags?: AgentProfileRemoveList;
23
24
  prompt?: true | AgentProfilePromptRemoval;
@@ -1,6 +1,7 @@
1
1
  import { mergeAgentProfiles } from "./agent-profile.js";
2
2
  import { canonicalAgentProfileJson } from "./agent-profile-canonical.js";
3
3
  const agentProfileDiffPropertyAxes = [
4
+ "outputFile",
4
5
  "prompt",
5
6
  "model",
6
7
  "harness",
@@ -268,6 +269,8 @@ function applyRemoval(profile, remove) {
268
269
  if (remove.model !== undefined) {
269
270
  setOrDelete(next, "model", removeKeys(next.model, remove.model));
270
271
  }
272
+ if (remove.outputFile !== undefined)
273
+ delete next.outputFile;
271
274
  if (remove.harness !== undefined)
272
275
  delete next.harness;
273
276
  if (remove.seats !== undefined)
@@ -0,0 +1,10 @@
1
+ import { z } from "zod";
2
+ /** One caller-declared output, relative to the managed workspace root, not a process cwd. */
3
+ export interface AgentFileOutputPolicy {
4
+ name: string;
5
+ path: string;
6
+ }
7
+ export declare const AgentFileOutputPolicySchema: z.ZodObject<{
8
+ name: z.ZodString;
9
+ path: z.ZodString;
10
+ }, z.core.$strict>;
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ import { relativePathSafetyIssues } from "./agent-candidate-schema-common.js";
3
+ import { boundedIdentifierSchema, boundedStringSchema } from "./contract-limits.js";
4
+ export const AgentFileOutputPolicySchema = z.strictObject({
5
+ name: boundedIdentifierSchema,
6
+ path: boundedStringSchema.refine((path) => path.length > 0 && relativePathSafetyIssues(path).length === 0 &&
7
+ path.split("/").every((part) => part.length > 0 && part !== "."), "File output must name one canonical relative managed-workspace path"),
8
+ });
@@ -241,8 +241,8 @@ export declare const agentProfileSecretRefSchema: z.ZodObject<{
241
241
  kind: z.ZodLiteral<"secret-ref">;
242
242
  key: z.ZodString;
243
243
  format: z.ZodOptional<z.ZodEnum<{
244
- raw: "raw";
245
244
  bearer: "bearer";
245
+ raw: "raw";
246
246
  }>>;
247
247
  }, z.core.$strict>;
248
248
  export declare const agentProfileConfigValueSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -252,21 +252,21 @@ export declare const agentProfileConfigValueSchema: z.ZodDiscriminatedUnion<[z.Z
252
252
  kind: z.ZodLiteral<"secret-ref">;
253
253
  key: z.ZodString;
254
254
  format: z.ZodOptional<z.ZodEnum<{
255
- raw: "raw";
256
255
  bearer: "bearer";
256
+ raw: "raw";
257
257
  }>>;
258
258
  }, z.core.$strict>], "kind">;
259
259
  export declare const agentProfileEnvironmentSchema: z.ZodType<Record<string, {
260
260
  kind: "secret-ref";
261
261
  key: string;
262
- format?: "raw" | "bearer" | undefined;
262
+ format?: "bearer" | "raw" | undefined;
263
263
  } | {
264
264
  kind: "public";
265
265
  value: string;
266
266
  }>, unknown, z.core.$ZodTypeInternals<Record<string, {
267
267
  kind: "secret-ref";
268
268
  key: string;
269
- format?: "raw" | "bearer" | undefined;
269
+ format?: "bearer" | "raw" | undefined;
270
270
  } | {
271
271
  kind: "public";
272
272
  value: string;
@@ -274,14 +274,14 @@ export declare const agentProfileEnvironmentSchema: z.ZodType<Record<string, {
274
274
  export declare const agentProfileHeaderSchema: z.ZodType<Record<string, {
275
275
  kind: "secret-ref";
276
276
  key: string;
277
- format?: "raw" | "bearer" | undefined;
277
+ format?: "bearer" | "raw" | undefined;
278
278
  } | {
279
279
  kind: "public";
280
280
  value: string;
281
281
  }>, unknown, z.core.$ZodTypeInternals<Record<string, {
282
282
  kind: "secret-ref";
283
283
  key: string;
284
- format?: "raw" | "bearer" | undefined;
284
+ format?: "bearer" | "raw" | undefined;
285
285
  } | {
286
286
  kind: "public";
287
287
  value: string;
@@ -303,14 +303,14 @@ export declare const agentProfileHookCommandSchema: z.ZodObject<{
303
303
  env: z.ZodOptional<z.ZodType<Record<string, {
304
304
  kind: "secret-ref";
305
305
  key: string;
306
- format?: "raw" | "bearer" | undefined;
306
+ format?: "bearer" | "raw" | undefined;
307
307
  } | {
308
308
  kind: "public";
309
309
  value: string;
310
310
  }>, unknown, z.core.$ZodTypeInternals<Record<string, {
311
311
  kind: "secret-ref";
312
312
  key: string;
313
- format?: "raw" | "bearer" | undefined;
313
+ format?: "bearer" | "raw" | undefined;
314
314
  } | {
315
315
  kind: "public";
316
316
  value: string;
@@ -352,6 +352,7 @@ export declare const agentProfileResourceRemovalSchema: z.ZodObject<{
352
352
  failOnError: z.ZodOptional<z.ZodLiteral<true>>;
353
353
  }, z.core.$strict>;
354
354
  export declare const agentProfileDiffRemovalSchema: z.ZodObject<{
355
+ outputFile: z.ZodOptional<z.ZodLiteral<true>>;
355
356
  identity: z.ZodOptional<z.ZodLiteral<true>>;
356
357
  tags: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
357
358
  prompt: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
@@ -500,6 +501,10 @@ export declare const agentProfileMetadataSchema: z.ZodType<AgentProfileMetadata>
500
501
  * with that interface by the compile-time guard at the bottom of this file.
501
502
  */
502
503
  export declare const agentProfileSchema: z.ZodObject<{
504
+ outputFile: z.ZodOptional<z.ZodObject<{
505
+ name: z.ZodString;
506
+ path: z.ZodString;
507
+ }, z.core.$strict>>;
503
508
  name: z.ZodOptional<z.ZodString>;
504
509
  description: z.ZodOptional<z.ZodString>;
505
510
  version: z.ZodOptional<z.ZodString>;
@@ -733,7 +738,7 @@ export declare const agentProfileSchema: z.ZodObject<{
733
738
  env?: Record<string, {
734
739
  kind: "secret-ref";
735
740
  key: string;
736
- format?: "raw" | "bearer" | undefined;
741
+ format?: "bearer" | "raw" | undefined;
737
742
  } | {
738
743
  kind: "public";
739
744
  value: string;
@@ -746,7 +751,7 @@ export declare const agentProfileSchema: z.ZodObject<{
746
751
  env?: Record<string, {
747
752
  kind: "secret-ref";
748
753
  key: string;
749
- format?: "raw" | "bearer" | undefined;
754
+ format?: "bearer" | "raw" | undefined;
750
755
  } | {
751
756
  kind: "public";
752
757
  value: string;
@@ -1,3 +1,4 @@
1
+ import { AgentFileOutputPolicySchema } from "./profile-file-output.js";
1
2
  import { agentCandidateSecretRefSchema } from "./agent-candidate-schema-common.js";
2
3
  import { z } from "zod";
3
4
  import { CONTRACT_MAX_ARRAY_LENGTH, isBoundedJsonMaterial } from "./contract-limits.js";
@@ -282,6 +283,7 @@ export const agentProfileResourceRemovalSchema = z.strictObject({
282
283
  failOnError: z.literal(true).optional(),
283
284
  });
284
285
  export const agentProfileDiffRemovalSchema = z.strictObject({
286
+ outputFile: z.literal(true).optional(),
285
287
  identity: z.literal(true).optional(),
286
288
  tags: removeListSchema.optional(),
287
289
  prompt: z
@@ -403,6 +405,7 @@ export const agentProfileMetadataSchema = ownPropertyRecordSchema(z.unknown(), {
403
405
  */
404
406
  export const agentProfileSchema = z
405
407
  .strictObject({
408
+ outputFile: AgentFileOutputPolicySchema.optional(),
406
409
  name: z.string().optional(),
407
410
  description: z.string().optional(),
408
411
  version: z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-interface",
3
- "version": "5.10.24",
3
+ "version": "5.10.26",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",