@tangle-network/agent-interface 5.10.24 → 5.10.25

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.
@@ -234,7 +234,7 @@ export declare const agentCandidateMaterializationReceiptSchema: z.ZodObject<{
234
234
  ref: {
235
235
  kind: "secret-ref";
236
236
  key: string;
237
- format?: "raw" | "bearer" | undefined;
237
+ format?: "bearer" | "raw" | undefined;
238
238
  };
239
239
  }[] | undefined;
240
240
  root?: "agent" | undefined;
@@ -242,7 +242,7 @@ export declare const agentCandidateMaterializationReceiptSchema: z.ZodObject<{
242
242
  env: Record<string, {
243
243
  kind: "secret-ref";
244
244
  key: string;
245
- format?: "raw" | "bearer" | undefined;
245
+ format?: "bearer" | "raw" | undefined;
246
246
  } | {
247
247
  kind: "public";
248
248
  value: string;
@@ -250,7 +250,7 @@ export declare const agentCandidateMaterializationReceiptSchema: z.ZodObject<{
250
250
  flags: ({
251
251
  kind: "secret-ref";
252
252
  key: string;
253
- format?: "raw" | "bearer" | undefined;
253
+ format?: "bearer" | "raw" | undefined;
254
254
  } | {
255
255
  kind: "public";
256
256
  value: string;
@@ -330,7 +330,7 @@ export declare const agentCandidateMaterializationReceiptSchema: z.ZodObject<{
330
330
  ref: {
331
331
  kind: "secret-ref";
332
332
  key: string;
333
- format?: "raw" | "bearer" | undefined;
333
+ format?: "bearer" | "raw" | undefined;
334
334
  };
335
335
  }[] | undefined;
336
336
  root?: "agent" | undefined;
@@ -338,7 +338,7 @@ export declare const agentCandidateMaterializationReceiptSchema: z.ZodObject<{
338
338
  env: Record<string, {
339
339
  kind: "secret-ref";
340
340
  key: string;
341
- format?: "raw" | "bearer" | undefined;
341
+ format?: "bearer" | "raw" | undefined;
342
342
  } | {
343
343
  kind: "public";
344
344
  value: string;
@@ -346,7 +346,7 @@ export declare const agentCandidateMaterializationReceiptSchema: z.ZodObject<{
346
346
  flags: ({
347
347
  kind: "secret-ref";
348
348
  key: string;
349
- format?: "raw" | "bearer" | undefined;
349
+ format?: "bearer" | "raw" | undefined;
350
350
  } | {
351
351
  kind: "public";
352
352
  value: string;
@@ -520,7 +520,7 @@ export declare const agentCandidateMaterializationReceiptSchema: z.ZodObject<{
520
520
  args: ({
521
521
  kind: "secret-ref";
522
522
  key: string;
523
- format?: "raw" | "bearer" | undefined;
523
+ format?: "bearer" | "raw" | undefined;
524
524
  } | {
525
525
  kind: "public";
526
526
  value: string;
@@ -528,7 +528,7 @@ export declare const agentCandidateMaterializationReceiptSchema: z.ZodObject<{
528
528
  env: Record<string, {
529
529
  kind: "secret-ref";
530
530
  key: string;
531
- format?: "raw" | "bearer" | undefined;
531
+ format?: "bearer" | "raw" | undefined;
532
532
  } | {
533
533
  kind: "public";
534
534
  value: string;
@@ -792,7 +792,7 @@ export declare const agentCandidateMaterializationReceiptSchema: z.ZodObject<{
792
792
  args: ({
793
793
  kind: "secret-ref";
794
794
  key: string;
795
- format?: "raw" | "bearer" | undefined;
795
+ format?: "bearer" | "raw" | undefined;
796
796
  } | {
797
797
  kind: "public";
798
798
  value: string;
@@ -800,7 +800,7 @@ export declare const agentCandidateMaterializationReceiptSchema: z.ZodObject<{
800
800
  env: Record<string, {
801
801
  kind: "secret-ref";
802
802
  key: string;
803
- format?: "raw" | "bearer" | undefined;
803
+ format?: "bearer" | "raw" | undefined;
804
804
  } | {
805
805
  kind: "public";
806
806
  value: string;
@@ -37,8 +37,8 @@ export declare const agentCandidateSecretRefSchema: z.ZodObject<{
37
37
  kind: z.ZodLiteral<"secret-ref">;
38
38
  key: z.ZodString;
39
39
  format: z.ZodOptional<z.ZodEnum<{
40
- raw: "raw";
41
40
  bearer: "bearer";
41
+ raw: "raw";
42
42
  }>>;
43
43
  }, z.core.$strict>;
44
44
  export declare const agentCandidatePublicValueSchema: z.ZodObject<{
@@ -52,8 +52,8 @@ export declare const agentCandidateConfigValueSchema: z.ZodDiscriminatedUnion<[z
52
52
  kind: z.ZodLiteral<"secret-ref">;
53
53
  key: z.ZodString;
54
54
  format: z.ZodOptional<z.ZodEnum<{
55
- raw: "raw";
56
55
  bearer: "bearer";
56
+ raw: "raw";
57
57
  }>>;
58
58
  }, z.core.$strict>], "kind">;
59
59
  export declare const environmentConfigSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -63,8 +63,8 @@ export declare const environmentConfigSchema: z.ZodRecord<z.ZodString, z.ZodDisc
63
63
  kind: z.ZodLiteral<"secret-ref">;
64
64
  key: z.ZodString;
65
65
  format: z.ZodOptional<z.ZodEnum<{
66
- raw: "raw";
67
66
  bearer: "bearer";
67
+ raw: "raw";
68
68
  }>>;
69
69
  }, z.core.$strict>], "kind">>;
70
70
  export declare const agentCandidateGitHubRepositorySchema: z.ZodObject<{
@@ -570,8 +570,8 @@ export declare const agentCandidateBundleSchema: z.ZodObject<{
570
570
  kind: z.ZodLiteral<"secret-ref">;
571
571
  key: z.ZodString;
572
572
  format: z.ZodOptional<z.ZodEnum<{
573
- raw: "raw";
574
573
  bearer: "bearer";
574
+ raw: "raw";
575
575
  }>>;
576
576
  }, z.core.$strict>], "kind">>>;
577
577
  timeoutMs: z.ZodOptional<z.ZodNumber>;
@@ -584,8 +584,8 @@ export declare const agentCandidateBundleSchema: z.ZodObject<{
584
584
  kind: z.ZodLiteral<"secret-ref">;
585
585
  key: z.ZodString;
586
586
  format: z.ZodOptional<z.ZodEnum<{
587
- raw: "raw";
588
587
  bearer: "bearer";
588
+ raw: "raw";
589
589
  }>>;
590
590
  }, z.core.$strict>], "kind">>>;
591
591
  }, z.core.$strict>>>>;
@@ -668,8 +668,8 @@ export declare const agentCandidateBundleSchema: z.ZodObject<{
668
668
  kind: z.ZodLiteral<"secret-ref">;
669
669
  key: z.ZodString;
670
670
  format: z.ZodOptional<z.ZodEnum<{
671
- raw: "raw";
672
671
  bearer: "bearer";
672
+ raw: "raw";
673
673
  }>>;
674
674
  }, z.core.$strict>], "kind">>>;
675
675
  }, z.core.$strict>, z.ZodObject<{
@@ -691,8 +691,8 @@ export declare const agentCandidateBundleSchema: z.ZodObject<{
691
691
  kind: z.ZodLiteral<"secret-ref">;
692
692
  key: z.ZodString;
693
693
  format: z.ZodOptional<z.ZodEnum<{
694
- raw: "raw";
695
694
  bearer: "bearer";
695
+ raw: "raw";
696
696
  }>>;
697
697
  }, z.core.$strict>], "kind">>>;
698
698
  }, z.core.$strict>], "kind">;
@@ -719,8 +719,8 @@ export declare const agentCandidateBundleSchema: z.ZodObject<{
719
719
  kind: z.ZodLiteral<"secret-ref">;
720
720
  key: z.ZodString;
721
721
  format: z.ZodOptional<z.ZodEnum<{
722
- raw: "raw";
723
722
  bearer: "bearer";
723
+ raw: "raw";
724
724
  }>>;
725
725
  }, z.core.$strict>], "kind">>>;
726
726
  environment: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -100,10 +100,11 @@ export declare const agentExecutionPreparationAxisResultSchema: z.ZodObject<{
100
100
  axis: z.ZodEnum<{
101
101
  metadata: "metadata";
102
102
  description: "description";
103
- files: "files";
104
103
  name: "name";
104
+ files: "files";
105
105
  version: "version";
106
106
  tags: "tags";
107
+ outputFile: "outputFile";
107
108
  harness: "harness";
108
109
  seats: "seats";
109
110
  proxySecrets: "proxySecrets";
@@ -257,10 +258,11 @@ export declare const agentExecutionPreparationReceiptSchema: z.ZodObject<{
257
258
  axis: z.ZodEnum<{
258
259
  metadata: "metadata";
259
260
  description: "description";
260
- files: "files";
261
261
  name: "name";
262
+ files: "files";
262
263
  version: "version";
263
264
  tags: "tags";
265
+ outputFile: "outputFile";
264
266
  harness: "harness";
265
267
  seats: "seats";
266
268
  proxySecrets: "proxySecrets";
@@ -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", "modelMaxVisibleOutputTokens", "modelMaxReasoningTokens", "modelMaxTotalOutputTokens", "modelMetadata", "harness", "seats", "proxySecrets", "permissions", "tools", "mcp", "connections", "subagents", "files", "resourceTools", "skills", "resourceAgents", "commands", "knowledge", "resourceInstructions", "resourceFailOnError", "hooks", "modes", "confidential", "metadata", "extensions"];
12
+ export declare const AGENT_PROFILE_MATERIALIZATION_AXES: readonly ["outputFile", "name", "description", "version", "tags", "systemPrompt", "appendSystemPrompt", "instructions", "modelDefault", "modelSmall", "modelProvider", "modelReasoningEffort", "modelMaxVisibleOutputTokens", "modelMaxReasoningTokens", "modelMaxTotalOutputTokens", "modelMetadata", "harness", "seats", "proxySecrets", "permissions", "tools", "mcp", "connections", "subagents", "files", "resourceTools", "skills", "resourceAgents", "commands", "knowledge", "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. */
@@ -9,6 +9,7 @@
9
9
  * than acknowledge it.
10
10
  */
11
11
  export const AGENT_PROFILE_MATERIALIZATION_AXES = [
12
+ "outputFile",
12
13
  "name",
13
14
  "description",
14
15
  "version",
@@ -47,6 +48,7 @@ export const AGENT_PROFILE_MATERIALIZATION_AXES = [
47
48
  "extensions",
48
49
  ];
49
50
  const profileProperties = [
51
+ "outputFile",
50
52
  "prompt",
51
53
  "model",
52
54
  "harness",
@@ -77,6 +79,7 @@ const MODEL_AXES = {
77
79
  metadata: "modelMetadata",
78
80
  };
79
81
  const AXIS_DESCRIPTORS = [
82
+ { axis: "outputFile", rootPath: "/outputFile", value: (profile) => profile.outputFile },
80
83
  { axis: "name", rootPath: "/name", value: (profile) => profile.name },
81
84
  {
82
85
  axis: "description",
@@ -1,3 +1,4 @@
1
+ import type { AgentFileOutputPolicy } from "./profile-file-output.js";
1
2
  /**
2
3
  * Provider-neutral agent profile types for public SDK consumers.
3
4
  *
@@ -409,6 +410,8 @@ export interface AgentProfileMetadata extends Record<string, unknown> {
409
410
  * Public provider-neutral agent profile contract.
410
411
  */
411
412
  export interface AgentProfile {
413
+ /** Runtime-owned retained regular-file output for this profile only. */
414
+ outputFile?: AgentFileOutputPolicy;
412
415
  name?: string;
413
416
  description?: string;
414
417
  version?: string;
@@ -1,16 +1,3 @@
1
- /**
2
- * Provider-neutral agent profile types for public SDK consumers.
3
- *
4
- * These model portable agent intent at the application boundary. Individual
5
- * backends translate this shape into their own native profile/configuration
6
- * formats internally. Profile content participates in unsalted public identity.
7
- * Prompts, resources, metadata, commands, paths, and secret-reference keys are
8
- * caller-declared public data; recognizable credential patterns are refused as
9
- * defense in depth, not as proof that arbitrary text is non-secret. MCP and hook
10
- * secret-capable fields structurally require tagged public values or opaque
11
- * secret references, which a private executor resolves only after identity is
12
- * fixed. This package is the canonical public home for these symbols.
13
- */
14
1
  /**
15
2
  * Helper for creating typed inline resource refs.
16
3
  */
@@ -97,10 +97,11 @@ export declare const AgentInteractiveSessionRefSchema: z.ZodObject<{
97
97
  axis: z.ZodEnum<{
98
98
  metadata: "metadata";
99
99
  description: "description";
100
- files: "files";
101
100
  name: "name";
101
+ files: "files";
102
102
  version: "version";
103
103
  tags: "tags";
104
+ outputFile: "outputFile";
104
105
  harness: "harness";
105
106
  seats: "seats";
106
107
  proxySecrets: "proxySecrets";
@@ -279,10 +280,11 @@ export declare const AgentInteractiveSessionControlClaimRequestSchema: z.ZodObje
279
280
  axis: z.ZodEnum<{
280
281
  metadata: "metadata";
281
282
  description: "description";
282
- files: "files";
283
283
  name: "name";
284
+ files: "files";
284
285
  version: "version";
285
286
  tags: "tags";
287
+ outputFile: "outputFile";
286
288
  harness: "harness";
287
289
  seats: "seats";
288
290
  proxySecrets: "proxySecrets";
@@ -452,10 +454,11 @@ export declare const AgentInteractiveSessionControlClaimAcknowledgementSchema: z
452
454
  axis: z.ZodEnum<{
453
455
  metadata: "metadata";
454
456
  description: "description";
455
- files: "files";
456
457
  name: "name";
458
+ files: "files";
457
459
  version: "version";
458
460
  tags: "tags";
461
+ outputFile: "outputFile";
459
462
  harness: "harness";
460
463
  seats: "seats";
461
464
  proxySecrets: "proxySecrets";
@@ -647,10 +650,11 @@ export declare const AgentInteractiveSessionStatusSchema: z.ZodDiscriminatedUnio
647
650
  axis: z.ZodEnum<{
648
651
  metadata: "metadata";
649
652
  description: "description";
650
- files: "files";
651
653
  name: "name";
654
+ files: "files";
652
655
  version: "version";
653
656
  tags: "tags";
657
+ outputFile: "outputFile";
654
658
  harness: "harness";
655
659
  seats: "seats";
656
660
  proxySecrets: "proxySecrets";
@@ -801,10 +805,11 @@ export declare const AgentInteractiveSessionStatusSchema: z.ZodDiscriminatedUnio
801
805
  axis: z.ZodEnum<{
802
806
  metadata: "metadata";
803
807
  description: "description";
804
- files: "files";
805
808
  name: "name";
809
+ files: "files";
806
810
  version: "version";
807
811
  tags: "tags";
812
+ outputFile: "outputFile";
808
813
  harness: "harness";
809
814
  seats: "seats";
810
815
  proxySecrets: "proxySecrets";
@@ -963,10 +968,11 @@ export declare const AgentInteractiveSessionStatusSchema: z.ZodDiscriminatedUnio
963
968
  axis: z.ZodEnum<{
964
969
  metadata: "metadata";
965
970
  description: "description";
966
- files: "files";
967
971
  name: "name";
972
+ files: "files";
968
973
  version: "version";
969
974
  tags: "tags";
975
+ outputFile: "outputFile";
970
976
  harness: "harness";
971
977
  seats: "seats";
972
978
  proxySecrets: "proxySecrets";
@@ -1131,10 +1137,11 @@ export declare const AgentInteractiveSessionStopCommandSchema: z.ZodObject<{
1131
1137
  axis: z.ZodEnum<{
1132
1138
  metadata: "metadata";
1133
1139
  description: "description";
1134
- files: "files";
1135
1140
  name: "name";
1141
+ files: "files";
1136
1142
  version: "version";
1137
1143
  tags: "tags";
1144
+ outputFile: "outputFile";
1138
1145
  harness: "harness";
1139
1146
  seats: "seats";
1140
1147
  proxySecrets: "proxySecrets";
@@ -1306,10 +1313,11 @@ export declare const AgentInteractiveSessionStopAcknowledgementSchema: z.ZodObje
1306
1313
  axis: z.ZodEnum<{
1307
1314
  metadata: "metadata";
1308
1315
  description: "description";
1309
- files: "files";
1310
1316
  name: "name";
1317
+ files: "files";
1311
1318
  version: "version";
1312
1319
  tags: "tags";
1320
+ outputFile: "outputFile";
1313
1321
  harness: "harness";
1314
1322
  seats: "seats";
1315
1323
  proxySecrets: "proxySecrets";
@@ -1499,10 +1507,11 @@ export declare const AgentInteractiveSessionPromptCommandSchema: z.ZodObject<{
1499
1507
  axis: z.ZodEnum<{
1500
1508
  metadata: "metadata";
1501
1509
  description: "description";
1502
- files: "files";
1503
1510
  name: "name";
1511
+ files: "files";
1504
1512
  version: "version";
1505
1513
  tags: "tags";
1514
+ outputFile: "outputFile";
1506
1515
  harness: "harness";
1507
1516
  seats: "seats";
1508
1517
  proxySecrets: "proxySecrets";
@@ -1673,10 +1682,11 @@ export declare const AgentInteractiveSessionPromptAcknowledgementSchema: z.ZodOb
1673
1682
  axis: z.ZodEnum<{
1674
1683
  metadata: "metadata";
1675
1684
  description: "description";
1676
- files: "files";
1677
1685
  name: "name";
1686
+ files: "files";
1678
1687
  version: "version";
1679
1688
  tags: "tags";
1689
+ outputFile: "outputFile";
1680
1690
  harness: "harness";
1681
1691
  seats: "seats";
1682
1692
  proxySecrets: "proxySecrets";
@@ -25,6 +25,10 @@ export declare const AgentInteractiveSessionStartSchema: z.ZodObject<{
25
25
  requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
26
26
  }, z.core.$strict>;
27
27
  profile: z.ZodObject<{
28
+ outputFile: z.ZodOptional<z.ZodObject<{
29
+ name: z.ZodString;
30
+ path: z.ZodString;
31
+ }, z.core.$strict>>;
28
32
  name: z.ZodOptional<z.ZodString>;
29
33
  description: z.ZodOptional<z.ZodString>;
30
34
  version: z.ZodOptional<z.ZodString>;
@@ -258,7 +262,7 @@ export declare const AgentInteractiveSessionStartSchema: z.ZodObject<{
258
262
  env?: Record<string, {
259
263
  kind: "secret-ref";
260
264
  key: string;
261
- format?: "raw" | "bearer" | undefined;
265
+ format?: "bearer" | "raw" | undefined;
262
266
  } | {
263
267
  kind: "public";
264
268
  value: string;
@@ -271,7 +275,7 @@ export declare const AgentInteractiveSessionStartSchema: z.ZodObject<{
271
275
  env?: Record<string, {
272
276
  kind: "secret-ref";
273
277
  key: string;
274
- format?: "raw" | "bearer" | undefined;
278
+ format?: "bearer" | "raw" | undefined;
275
279
  } | {
276
280
  kind: "public";
277
281
  value: string;
@@ -121,8 +121,8 @@ export declare const EnvironmentLifecycleSchema: z.ZodObject<{
121
121
  resumable: z.ZodBoolean;
122
122
  mode: z.ZodOptional<z.ZodEnum<{
123
123
  none: "none";
124
- replayed: "replayed";
125
124
  native: "native";
125
+ replayed: "replayed";
126
126
  }>>;
127
127
  }, z.core.$strict>>;
128
128
  persistence: z.ZodOptional<z.ZodObject<{
@@ -445,8 +445,8 @@ export declare const AgentEnvironmentObservationSchema: z.ZodObject<{
445
445
  resumable: z.ZodBoolean;
446
446
  mode: z.ZodOptional<z.ZodEnum<{
447
447
  none: "none";
448
- replayed: "replayed";
449
448
  native: "native";
449
+ replayed: "replayed";
450
450
  }>>;
451
451
  }, z.core.$strict>>;
452
452
  persistence: z.ZodOptional<z.ZodObject<{
@@ -493,8 +493,8 @@ export declare const AgentEnvironmentObservationSchema: z.ZodObject<{
493
493
  resumable: z.ZodBoolean;
494
494
  mode: z.ZodOptional<z.ZodEnum<{
495
495
  none: "none";
496
- replayed: "replayed";
497
496
  native: "native";
497
+ replayed: "replayed";
498
498
  }>>;
499
499
  }, z.core.$strict>>;
500
500
  persistence: z.ZodOptional<z.ZodObject<{
@@ -10,5 +10,6 @@ export * from "./environment-command-turn.js";
10
10
  export * from "./environment-provider-error.js";
11
11
  export * from "./workspace-cwd.js";
12
12
  export * from "./workspace-snapshot.js";
13
+ export * from "./environment-retained-file.js";
13
14
  export * from "./proxy-secrets.js";
14
15
  export { AgentTurnFailureSchema, type AgentTurnFailure } from "./execution-failure.js";
@@ -10,5 +10,6 @@ export * from "./environment-command-turn.js";
10
10
  export * from "./environment-provider-error.js";
11
11
  export * from "./workspace-cwd.js";
12
12
  export * from "./workspace-snapshot.js";
13
+ export * from "./environment-retained-file.js";
13
14
  export * from "./proxy-secrets.js";
14
15
  export { AgentTurnFailureSchema } from "./execution-failure.js";
@@ -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
+ ]);