@tangle-network/agent-interface 5.2.1 → 5.3.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.
Files changed (37) hide show
  1. package/dist/agent-candidate-code-schema.d.ts +63 -14
  2. package/dist/agent-candidate-code-schema.js +2 -1
  3. package/dist/agent-candidate-execution-plan-schema.d.ts +262 -20
  4. package/dist/agent-candidate-execution-plan-schema.js +30 -7
  5. package/dist/agent-candidate-profile-schema.d.ts +63 -8
  6. package/dist/agent-candidate-profile-schema.js +2 -0
  7. package/dist/agent-candidate-promotion-schema.d.ts +952 -100
  8. package/dist/agent-candidate-receipt-schema.d.ts +104 -8
  9. package/dist/agent-candidate-schema-common.d.ts +30 -3
  10. package/dist/agent-candidate-schema-common.js +14 -8
  11. package/dist/agent-candidate-schema.d.ts +72 -10
  12. package/dist/agent-candidate.d.ts +12 -4
  13. package/dist/agent-execution-preparation-receipt.d.ts +2 -0
  14. package/dist/agent-execution-preparation.js +4 -2
  15. package/dist/agent-profile-materialization.d.ts +1 -1
  16. package/dist/agent-profile-materialization.js +3 -0
  17. package/dist/agent-profile.d.ts +6 -0
  18. package/dist/environment-interactive-control.d.ts +10 -0
  19. package/dist/environment-interactive-start.d.ts +33 -6
  20. package/dist/environment-profile-capabilities.d.ts +18 -0
  21. package/dist/environment-profile-capabilities.js +2 -0
  22. package/dist/environment-provider.d.ts +1 -0
  23. package/dist/environment-provider.js +1 -0
  24. package/dist/environment-runtime.d.ts +176 -18
  25. package/dist/environment-runtime.js +14 -1
  26. package/dist/harness-capabilities.js +1 -1
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.js +1 -0
  29. package/dist/portable-context-transfer.d.ts +33 -6
  30. package/dist/profile-diff.d.ts +4 -3
  31. package/dist/profile-diff.js +3 -0
  32. package/dist/profile-schema.d.ts +50 -21
  33. package/dist/profile-schema.js +6 -13
  34. package/dist/proxy-secrets.d.ts +329 -0
  35. package/dist/proxy-secrets.js +183 -0
  36. package/fixtures/proxy-secret-wire-v1.json +1119 -0
  37. package/package.json +2 -1
@@ -239,34 +239,34 @@ export declare const agentProfileConfigValueSchema: z.ZodDiscriminatedUnion<[z.Z
239
239
  }>>;
240
240
  }, z.core.$strict>], "kind">;
241
241
  export declare const agentProfileEnvironmentSchema: z.ZodType<Record<string, {
242
- kind: "public";
243
- value: string;
244
- } | {
245
242
  kind: "secret-ref";
246
243
  key: string;
247
244
  format?: "bearer" | "raw" | undefined;
248
- }>, unknown, z.core.$ZodTypeInternals<Record<string, {
245
+ } | {
249
246
  kind: "public";
250
247
  value: string;
251
- } | {
248
+ }>, unknown, z.core.$ZodTypeInternals<Record<string, {
252
249
  kind: "secret-ref";
253
250
  key: string;
254
251
  format?: "bearer" | "raw" | undefined;
255
- }>, unknown>>;
256
- export declare const agentProfileHeaderSchema: z.ZodType<Record<string, {
252
+ } | {
257
253
  kind: "public";
258
254
  value: string;
259
- } | {
255
+ }>, unknown>>;
256
+ export declare const agentProfileHeaderSchema: z.ZodType<Record<string, {
260
257
  kind: "secret-ref";
261
258
  key: string;
262
259
  format?: "bearer" | "raw" | undefined;
263
- }>, unknown, z.core.$ZodTypeInternals<Record<string, {
260
+ } | {
264
261
  kind: "public";
265
262
  value: string;
266
- } | {
263
+ }>, unknown, z.core.$ZodTypeInternals<Record<string, {
267
264
  kind: "secret-ref";
268
265
  key: string;
269
266
  format?: "bearer" | "raw" | undefined;
267
+ } | {
268
+ kind: "public";
269
+ value: string;
270
270
  }>, unknown>>;
271
271
  export declare const agentSubagentProfileSchema: z.ZodObject<{
272
272
  description: z.ZodOptional<z.ZodString>;
@@ -283,19 +283,19 @@ export declare const agentProfileHookCommandSchema: z.ZodObject<{
283
283
  blocking: z.ZodOptional<z.ZodBoolean>;
284
284
  matcher: z.ZodOptional<z.ZodString>;
285
285
  env: z.ZodOptional<z.ZodType<Record<string, {
286
- kind: "public";
287
- value: string;
288
- } | {
289
286
  kind: "secret-ref";
290
287
  key: string;
291
288
  format?: "bearer" | "raw" | undefined;
292
- }>, unknown, z.core.$ZodTypeInternals<Record<string, {
289
+ } | {
293
290
  kind: "public";
294
291
  value: string;
295
- } | {
292
+ }>, unknown, z.core.$ZodTypeInternals<Record<string, {
296
293
  kind: "secret-ref";
297
294
  key: string;
298
295
  format?: "bearer" | "raw" | undefined;
296
+ } | {
297
+ kind: "public";
298
+ value: string;
299
299
  }>, unknown>>>;
300
300
  }, z.core.$strict>;
301
301
  export declare const agentProfileModeSchema: z.ZodObject<{
@@ -344,6 +344,7 @@ export declare const agentProfileDiffRemovalSchema: z.ZodObject<{
344
344
  model: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
345
345
  harness: z.ZodOptional<z.ZodLiteral<true>>;
346
346
  seats: z.ZodOptional<z.ZodLiteral<true>>;
347
+ proxySecrets: z.ZodOptional<z.ZodLiteral<true>>;
347
348
  permissions: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
348
349
  tools: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
349
350
  mcp: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodArray<z.ZodString>]>>;
@@ -556,6 +557,33 @@ export declare const agentProfileSchema: z.ZodObject<{
556
557
  tools: z.ZodOptional<z.ZodType<Record<string, boolean>, unknown, z.core.$ZodTypeInternals<Record<string, boolean>, unknown>>>;
557
558
  permissions: z.ZodOptional<z.ZodType<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown, z.core.$ZodTypeInternals<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown>>>;
558
559
  }, z.core.$strict>>>;
560
+ proxySecrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
561
+ hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
562
+ methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
563
+ paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
564
+ envName: z.ZodString;
565
+ secretRef: z.ZodObject<{
566
+ kind: z.ZodLiteral<"secret-ref">;
567
+ key: z.ZodString;
568
+ }, z.core.$strict>;
569
+ presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
570
+ type: z.ZodLiteral<"bearer">;
571
+ }, z.core.$strict>, z.ZodObject<{
572
+ type: z.ZodLiteral<"basic">;
573
+ username: z.ZodString;
574
+ }, z.core.$strict>, z.ZodObject<{
575
+ type: z.ZodLiteral<"header">;
576
+ name: z.ZodString;
577
+ }, z.core.$strict>, z.ZodObject<{
578
+ type: z.ZodLiteral<"query">;
579
+ name: z.ZodString;
580
+ }, z.core.$strict>], "type">;
581
+ placeholderFormat: z.ZodOptional<z.ZodEnum<{
582
+ jwt: "jwt";
583
+ opaque: "opaque";
584
+ }>>;
585
+ ttlSeconds: z.ZodOptional<z.ZodNumber>;
586
+ }, z.core.$strict>>>;
559
587
  permissions: z.ZodOptional<z.ZodType<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown, z.core.$ZodTypeInternals<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown>>>;
560
588
  tools: z.ZodOptional<z.ZodType<Record<string, boolean>, unknown, z.core.$ZodTypeInternals<Record<string, boolean>, unknown>>>;
561
589
  mcp: z.ZodOptional<z.ZodType<Record<string, AgentProfileMcpServer>, unknown, z.core.$ZodTypeInternals<Record<string, AgentProfileMcpServer>, unknown>>>;
@@ -664,12 +692,12 @@ export declare const agentProfileSchema: z.ZodObject<{
664
692
  blocking?: boolean | undefined;
665
693
  matcher?: string | undefined;
666
694
  env?: Record<string, {
667
- kind: "public";
668
- value: string;
669
- } | {
670
695
  kind: "secret-ref";
671
696
  key: string;
672
697
  format?: "bearer" | "raw" | undefined;
698
+ } | {
699
+ kind: "public";
700
+ value: string;
673
701
  }> | undefined;
674
702
  }[]>, unknown, z.core.$ZodTypeInternals<Record<string, {
675
703
  command: string;
@@ -677,12 +705,12 @@ export declare const agentProfileSchema: z.ZodObject<{
677
705
  blocking?: boolean | undefined;
678
706
  matcher?: string | undefined;
679
707
  env?: Record<string, {
680
- kind: "public";
681
- value: string;
682
- } | {
683
708
  kind: "secret-ref";
684
709
  key: string;
685
710
  format?: "bearer" | "raw" | undefined;
711
+ } | {
712
+ kind: "public";
713
+ value: string;
686
714
  }> | undefined;
687
715
  }[]>, unknown>>>;
688
716
  modes: z.ZodOptional<z.ZodType<Record<string, {
@@ -743,3 +771,4 @@ export interface Capability {
743
771
  recommendedSize?: SandboxSizePreset;
744
772
  }
745
773
  export declare const capabilitySchema: z.ZodType<Capability>;
774
+ export * from "./proxy-secrets.js";
@@ -1,4 +1,6 @@
1
+ import { agentCandidateSecretRefSchema } from "./agent-candidate-schema-common.js";
1
2
  import { z } from "zod";
3
+ import { ProxySecretsSchema } from "./proxy-secrets.js";
2
4
  import { agentProfileKnowledgeRefsSchema } from "./profile-knowledge.js";
3
5
  export { agentProfileKnowledgeRefSchema, agentProfileKnowledgeRefsSchema, } from "./profile-knowledge.js";
4
6
  import { REASONING_EFFORTS, TRAINED_MODEL_PREFIX, trainedModelIdForArtifact, } from "./agent-profile.js";
@@ -169,23 +171,11 @@ const publicProfileConfigStringSchema = z
169
171
  .refine((value) => isWellFormedUnicode(value) &&
170
172
  !controlCharacterPattern.test(value) &&
171
173
  !looksLikeCredential(value), "public profile config cannot carry credential-like material");
172
- const secretReferenceKeySchema = z
173
- .string()
174
- .min(1)
175
- .max(500)
176
- .refine((value) => value.trim().length > 0 &&
177
- isWellFormedUnicode(value) &&
178
- !controlCharacterPattern.test(value) &&
179
- !looksLikeCredential(value), "secret reference key must be a public non-credential identity");
180
174
  export const agentProfilePublicConfigValueSchema = z.strictObject({
181
175
  kind: z.literal("public"),
182
176
  value: publicProfileConfigStringSchema,
183
177
  });
184
- export const agentProfileSecretRefSchema = z.strictObject({
185
- kind: z.literal("secret-ref"),
186
- key: secretReferenceKeySchema,
187
- format: z.enum(["raw", "bearer"]).optional(),
188
- });
178
+ export const agentProfileSecretRefSchema = agentCandidateSecretRefSchema;
189
179
  export const agentProfileConfigValueSchema = z.discriminatedUnion("kind", [
190
180
  agentProfilePublicConfigValueSchema,
191
181
  agentProfileSecretRefSchema,
@@ -327,6 +317,7 @@ export const agentProfileDiffRemovalSchema = z.strictObject({
327
317
  model: removeListSchema.optional(),
328
318
  harness: z.literal(true).optional(),
329
319
  seats: z.literal(true).optional(),
320
+ proxySecrets: z.literal(true).optional(),
330
321
  permissions: removeListSchema.optional(),
331
322
  tools: removeListSchema.optional(),
332
323
  mcp: removeListSchema.optional(),
@@ -438,6 +429,7 @@ export const agentProfileSchema = z
438
429
  model: agentProfileModelHintsSchema.optional(),
439
430
  harness: harnessTypeSchema.optional(),
440
431
  seats: z.array(agentProfileSeatSchema).nonempty().optional(),
432
+ proxySecrets: ProxySecretsSchema.optional(),
441
433
  permissions: ownPropertyRecordSchema(agentProfilePermissionSchema).optional(),
442
434
  tools: ownPropertyRecordSchema(z.boolean()).optional(),
443
435
  mcp: ownPropertyRecordSchema(agentProfileMcpServerSchema).optional(),
@@ -609,3 +601,4 @@ export const capabilitySchema = z.strictObject({
609
601
  definition: agentProfileSchema,
610
602
  recommendedSize: z.enum(SANDBOX_SIZE_PRESET_NAMES).optional(),
611
603
  });
604
+ export * from "./proxy-secrets.js";
@@ -0,0 +1,329 @@
1
+ import { z } from "zod";
2
+ /** Match complete components only. Selected header names are case-insensitive; duplicate fields
3
+ * are refused before coalescing. Query names are case-sensitive after one strict UTF-8 percent
4
+ * decode (+ means space); malformed encoding and duplicate decoded selector names are refused.
5
+ * Never scan other query fields. Basic is one strict base64 value decoding to exactly public
6
+ * username:placeholder; the username is printable ASCII without colon. Bearer is exactly
7
+ * "Bearer SP placeholder". Embedded placeholders never match. Authority, TLS SNI and validated
8
+ * destination must agree on the declared FQDN over HTTPS/443; explicit :443 is equivalent.
9
+ */
10
+ export declare const ProxySecretPresentationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
11
+ type: z.ZodLiteral<"bearer">;
12
+ }, z.core.$strict>, z.ZodObject<{
13
+ type: z.ZodLiteral<"basic">;
14
+ username: z.ZodString;
15
+ }, z.core.$strict>, z.ZodObject<{
16
+ type: z.ZodLiteral<"header">;
17
+ name: z.ZodString;
18
+ }, z.core.$strict>, z.ZodObject<{
19
+ type: z.ZodLiteral<"query">;
20
+ name: z.ZodString;
21
+ }, z.core.$strict>], "type">;
22
+ export type ProxySecretPresentation = z.infer<typeof ProxySecretPresentationSchema>;
23
+ export declare const ProxySecretScopeSchema: z.ZodObject<{
24
+ hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
25
+ methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
26
+ paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
27
+ }, z.core.$strict>;
28
+ export type ProxySecretScope = z.infer<typeof ProxySecretScopeSchema>;
29
+ export declare const ProxySecretBindingSchema: z.ZodObject<{
30
+ hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
31
+ methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
32
+ paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
33
+ envName: z.ZodString;
34
+ secretRef: z.ZodObject<{
35
+ kind: z.ZodLiteral<"secret-ref">;
36
+ key: z.ZodString;
37
+ }, z.core.$strict>;
38
+ presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
39
+ type: z.ZodLiteral<"bearer">;
40
+ }, z.core.$strict>, z.ZodObject<{
41
+ type: z.ZodLiteral<"basic">;
42
+ username: z.ZodString;
43
+ }, z.core.$strict>, z.ZodObject<{
44
+ type: z.ZodLiteral<"header">;
45
+ name: z.ZodString;
46
+ }, z.core.$strict>, z.ZodObject<{
47
+ type: z.ZodLiteral<"query">;
48
+ name: z.ZodString;
49
+ }, z.core.$strict>], "type">;
50
+ placeholderFormat: z.ZodOptional<z.ZodEnum<{
51
+ jwt: "jwt";
52
+ opaque: "opaque";
53
+ }>>;
54
+ ttlSeconds: z.ZodOptional<z.ZodNumber>;
55
+ }, z.core.$strict>;
56
+ export type ProxySecretBinding = z.infer<typeof ProxySecretBindingSchema>;
57
+ export declare const ProxySecretsSchema: z.ZodArray<z.ZodObject<{
58
+ hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
59
+ methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
60
+ paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
61
+ envName: z.ZodString;
62
+ secretRef: z.ZodObject<{
63
+ kind: z.ZodLiteral<"secret-ref">;
64
+ key: z.ZodString;
65
+ }, z.core.$strict>;
66
+ presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
67
+ type: z.ZodLiteral<"bearer">;
68
+ }, z.core.$strict>, z.ZodObject<{
69
+ type: z.ZodLiteral<"basic">;
70
+ username: z.ZodString;
71
+ }, z.core.$strict>, z.ZodObject<{
72
+ type: z.ZodLiteral<"header">;
73
+ name: z.ZodString;
74
+ }, z.core.$strict>, z.ZodObject<{
75
+ type: z.ZodLiteral<"query">;
76
+ name: z.ZodString;
77
+ }, z.core.$strict>], "type">;
78
+ placeholderFormat: z.ZodOptional<z.ZodEnum<{
79
+ jwt: "jwt";
80
+ opaque: "opaque";
81
+ }>>;
82
+ ttlSeconds: z.ZodOptional<z.ZodNumber>;
83
+ }, z.core.$strict>>;
84
+ export declare const ProxySecretResolvedIdentitySchema: z.ZodObject<{
85
+ tenantId: z.ZodString;
86
+ issuerId: z.ZodString;
87
+ secretId: z.ZodString;
88
+ revision: z.ZodString;
89
+ }, z.core.$strict>;
90
+ export type ProxySecretResolvedIdentity = z.infer<typeof ProxySecretResolvedIdentitySchema>;
91
+ export declare const ProxySecretGrantSchema: z.ZodObject<{
92
+ protocolVersion: z.ZodLiteral<1>;
93
+ grantId: z.ZodString;
94
+ sandboxId: z.ZodString;
95
+ epoch: z.ZodString;
96
+ identity: z.ZodObject<{
97
+ tenantId: z.ZodString;
98
+ issuerId: z.ZodString;
99
+ secretId: z.ZodString;
100
+ revision: z.ZodString;
101
+ }, z.core.$strict>;
102
+ scope: z.ZodObject<{
103
+ hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
104
+ methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
105
+ paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
106
+ }, z.core.$strict>;
107
+ presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
108
+ type: z.ZodLiteral<"bearer">;
109
+ }, z.core.$strict>, z.ZodObject<{
110
+ type: z.ZodLiteral<"basic">;
111
+ username: z.ZodString;
112
+ }, z.core.$strict>, z.ZodObject<{
113
+ type: z.ZodLiteral<"header">;
114
+ name: z.ZodString;
115
+ }, z.core.$strict>, z.ZodObject<{
116
+ type: z.ZodLiteral<"query">;
117
+ name: z.ZodString;
118
+ }, z.core.$strict>], "type">;
119
+ placeholderFormat: z.ZodEnum<{
120
+ jwt: "jwt";
121
+ opaque: "opaque";
122
+ }>;
123
+ issuedAt: z.ZodISODateTime;
124
+ expiresAt: z.ZodISODateTime;
125
+ sourceExpiresAt: z.ZodOptional<z.ZodISODateTime>;
126
+ parentGrantId: z.ZodOptional<z.ZodString>;
127
+ }, z.core.$strict>;
128
+ export type ProxySecretGrant = z.infer<typeof ProxySecretGrantSchema>;
129
+ /** proxy-installed is a phase-two input, never dispatch authority. Only installed acknowledges
130
+ * proxy and placeholder-only materialization. Revoked confirms binding revocation, not upstream
131
+ * credential revocation. Receipts contain metadata only, never secret or placeholder bytes.
132
+ */
133
+ export declare const ProxySecretReceiptSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
134
+ protocolVersion: z.ZodLiteral<1>;
135
+ sandboxId: z.ZodString;
136
+ generation: z.ZodNumber;
137
+ bindings: z.ZodArray<z.ZodObject<{
138
+ envName: z.ZodString;
139
+ secretRef: z.ZodObject<{
140
+ kind: z.ZodLiteral<"secret-ref">;
141
+ key: z.ZodString;
142
+ }, z.core.$strict>;
143
+ grant: z.ZodObject<{
144
+ protocolVersion: z.ZodLiteral<1>;
145
+ grantId: z.ZodString;
146
+ sandboxId: z.ZodString;
147
+ epoch: z.ZodString;
148
+ identity: z.ZodObject<{
149
+ tenantId: z.ZodString;
150
+ issuerId: z.ZodString;
151
+ secretId: z.ZodString;
152
+ revision: z.ZodString;
153
+ }, z.core.$strict>;
154
+ scope: z.ZodObject<{
155
+ hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
156
+ methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
157
+ paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
158
+ }, z.core.$strict>;
159
+ presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
160
+ type: z.ZodLiteral<"bearer">;
161
+ }, z.core.$strict>, z.ZodObject<{
162
+ type: z.ZodLiteral<"basic">;
163
+ username: z.ZodString;
164
+ }, z.core.$strict>, z.ZodObject<{
165
+ type: z.ZodLiteral<"header">;
166
+ name: z.ZodString;
167
+ }, z.core.$strict>, z.ZodObject<{
168
+ type: z.ZodLiteral<"query">;
169
+ name: z.ZodString;
170
+ }, z.core.$strict>], "type">;
171
+ placeholderFormat: z.ZodEnum<{
172
+ jwt: "jwt";
173
+ opaque: "opaque";
174
+ }>;
175
+ issuedAt: z.ZodISODateTime;
176
+ expiresAt: z.ZodISODateTime;
177
+ sourceExpiresAt: z.ZodOptional<z.ZodISODateTime>;
178
+ parentGrantId: z.ZodOptional<z.ZodString>;
179
+ }, z.core.$strict>;
180
+ }, z.core.$strict>>;
181
+ proxyAcknowledged: z.ZodLiteral<true>;
182
+ status: z.ZodLiteral<"proxy-installed">;
183
+ materializationAcknowledged: z.ZodLiteral<false>;
184
+ }, z.core.$strict>, z.ZodObject<{
185
+ protocolVersion: z.ZodLiteral<1>;
186
+ sandboxId: z.ZodString;
187
+ generation: z.ZodNumber;
188
+ bindings: z.ZodArray<z.ZodObject<{
189
+ envName: z.ZodString;
190
+ secretRef: z.ZodObject<{
191
+ kind: z.ZodLiteral<"secret-ref">;
192
+ key: z.ZodString;
193
+ }, z.core.$strict>;
194
+ grant: z.ZodObject<{
195
+ protocolVersion: z.ZodLiteral<1>;
196
+ grantId: z.ZodString;
197
+ sandboxId: z.ZodString;
198
+ epoch: z.ZodString;
199
+ identity: z.ZodObject<{
200
+ tenantId: z.ZodString;
201
+ issuerId: z.ZodString;
202
+ secretId: z.ZodString;
203
+ revision: z.ZodString;
204
+ }, z.core.$strict>;
205
+ scope: z.ZodObject<{
206
+ hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
207
+ methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
208
+ paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
209
+ }, z.core.$strict>;
210
+ presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
211
+ type: z.ZodLiteral<"bearer">;
212
+ }, z.core.$strict>, z.ZodObject<{
213
+ type: z.ZodLiteral<"basic">;
214
+ username: z.ZodString;
215
+ }, z.core.$strict>, z.ZodObject<{
216
+ type: z.ZodLiteral<"header">;
217
+ name: z.ZodString;
218
+ }, z.core.$strict>, z.ZodObject<{
219
+ type: z.ZodLiteral<"query">;
220
+ name: z.ZodString;
221
+ }, z.core.$strict>], "type">;
222
+ placeholderFormat: z.ZodEnum<{
223
+ jwt: "jwt";
224
+ opaque: "opaque";
225
+ }>;
226
+ issuedAt: z.ZodISODateTime;
227
+ expiresAt: z.ZodISODateTime;
228
+ sourceExpiresAt: z.ZodOptional<z.ZodISODateTime>;
229
+ parentGrantId: z.ZodOptional<z.ZodString>;
230
+ }, z.core.$strict>;
231
+ }, z.core.$strict>>;
232
+ proxyAcknowledged: z.ZodLiteral<true>;
233
+ status: z.ZodLiteral<"installed">;
234
+ materializationAcknowledged: z.ZodLiteral<true>;
235
+ }, z.core.$strict>, z.ZodObject<{
236
+ protocolVersion: z.ZodLiteral<1>;
237
+ sandboxId: z.ZodString;
238
+ generation: z.ZodNumber;
239
+ bindings: z.ZodArray<z.ZodObject<{
240
+ envName: z.ZodString;
241
+ secretRef: z.ZodObject<{
242
+ kind: z.ZodLiteral<"secret-ref">;
243
+ key: z.ZodString;
244
+ }, z.core.$strict>;
245
+ grant: z.ZodObject<{
246
+ protocolVersion: z.ZodLiteral<1>;
247
+ grantId: z.ZodString;
248
+ sandboxId: z.ZodString;
249
+ epoch: z.ZodString;
250
+ identity: z.ZodObject<{
251
+ tenantId: z.ZodString;
252
+ issuerId: z.ZodString;
253
+ secretId: z.ZodString;
254
+ revision: z.ZodString;
255
+ }, z.core.$strict>;
256
+ scope: z.ZodObject<{
257
+ hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
258
+ methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
259
+ paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
260
+ }, z.core.$strict>;
261
+ presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
262
+ type: z.ZodLiteral<"bearer">;
263
+ }, z.core.$strict>, z.ZodObject<{
264
+ type: z.ZodLiteral<"basic">;
265
+ username: z.ZodString;
266
+ }, z.core.$strict>, z.ZodObject<{
267
+ type: z.ZodLiteral<"header">;
268
+ name: z.ZodString;
269
+ }, z.core.$strict>, z.ZodObject<{
270
+ type: z.ZodLiteral<"query">;
271
+ name: z.ZodString;
272
+ }, z.core.$strict>], "type">;
273
+ placeholderFormat: z.ZodEnum<{
274
+ jwt: "jwt";
275
+ opaque: "opaque";
276
+ }>;
277
+ issuedAt: z.ZodISODateTime;
278
+ expiresAt: z.ZodISODateTime;
279
+ sourceExpiresAt: z.ZodOptional<z.ZodISODateTime>;
280
+ parentGrantId: z.ZodOptional<z.ZodString>;
281
+ }, z.core.$strict>;
282
+ }, z.core.$strict>>;
283
+ proxyAcknowledged: z.ZodLiteral<true>;
284
+ status: z.ZodLiteral<"revoked">;
285
+ materializationAcknowledged: z.ZodLiteral<true>;
286
+ }, z.core.$strict>], "status">;
287
+ export type ProxySecretReceipt = z.infer<typeof ProxySecretReceiptSchema>;
288
+ /** Advertise only when served API, driver, host, proxy and materializer agree. Absence,
289
+ * protocol skew, or unsupported driver/presentation/format refuses before resolution or launch.
290
+ */
291
+ export declare const ProxySecretCapabilitiesSchema: z.ZodObject<{
292
+ protocolVersion: z.ZodLiteral<1>;
293
+ supportedDrivers: z.ZodArray<z.ZodString>;
294
+ presentations: z.ZodArray<z.ZodEnum<{
295
+ basic: "basic";
296
+ bearer: "bearer";
297
+ header: "header";
298
+ query: "query";
299
+ }>>;
300
+ placeholderFormats: z.ZodArray<z.ZodEnum<{
301
+ jwt: "jwt";
302
+ opaque: "opaque";
303
+ }>>;
304
+ enforcement: z.ZodLiteral<"exact">;
305
+ transports: z.ZodTuple<[z.ZodLiteral<"https:443">], null>;
306
+ lifecycle: z.ZodLiteral<true>;
307
+ placementReceiptRequired: z.ZodLiteral<true>;
308
+ }, z.core.$strict>;
309
+ export type ProxySecretCapabilities = z.infer<typeof ProxySecretCapabilitiesSchema>;
310
+ export declare const ProxySecretUpdateControlsSchema: z.ZodObject<{
311
+ expectedProxySecretGeneration: z.ZodOptional<z.ZodNumber>;
312
+ requireInPlace: z.ZodOptional<z.ZodBoolean>;
313
+ }, z.core.$strict>;
314
+ export type ProxySecretUpdateControls = z.infer<typeof ProxySecretUpdateControlsSchema>;
315
+ /** Bounded delegation comparison, not proof of issuer authorization, installation, freshness
316
+ * or authenticated lineage. The trusted lifecycle owner must cascade parent revocation.
317
+ */
318
+ export declare function isProxySecretGrantAttenuation(parent: ProxySecretGrant, child: ProxySecretGrant): boolean;
319
+ /** Early declaration guard only: matching public refs do not establish resolved authority. */
320
+ export declare function isProxySecretBindingAttenuation(parent: ProxySecretBinding, child: ProxySecretBinding): boolean;
321
+ /** Omitted methods/paths mean all; a bounded parent cannot be widened by omission. */
322
+ export declare function isProxySecretScopeAttenuation(parent: ProxySecretScope, child: ProxySecretScope): boolean;
323
+ /** Header selectors compare case-insensitively; query selectors and Basic usernames are exact. */
324
+ export declare function proxySecretPresentationsEqual(left: ProxySecretPresentation, right: ProxySecretPresentation): boolean;
325
+ /** Merge independent declaration sources. Identical names deduplicate only when the full
326
+ * schema-parsed declaration agrees; callers preserve omission versus explicit empty selection.
327
+ * The result is detached public metadata. Conflicts fail without exposing declaration contents.
328
+ */
329
+ export declare function mergeProxySecretBindings(...collections: readonly (readonly ProxySecretBinding[] | undefined)[]): ProxySecretBinding[];