@oxy.so/contracts 4.8.0 → 4.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/accountGraph.js +13 -5
- package/dist/cjs/accountSubject.js +189 -0
- package/dist/cjs/agency.js +56 -4
- package/dist/cjs/agentKeys.js +67 -0
- package/dist/cjs/capabilityBindings.js +72 -0
- package/dist/cjs/index.js +60 -13
- package/dist/cjs/inference/decisions.js +41 -0
- package/dist/cjs/inference/economics.js +135 -0
- package/dist/cjs/products/access.js +60 -0
- package/dist/cjs/products/billing.js +32 -0
- package/dist/cjs/signIn.js +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/accountGraph.js +13 -5
- package/dist/esm/accountSubject.js +182 -0
- package/dist/esm/agency.js +55 -3
- package/dist/esm/agentKeys.js +63 -0
- package/dist/esm/capabilityBindings.js +67 -0
- package/dist/esm/index.js +10 -1
- package/dist/esm/inference/decisions.js +41 -0
- package/dist/esm/inference/economics.js +132 -0
- package/dist/esm/products/access.js +57 -0
- package/dist/esm/products/billing.js +29 -0
- package/dist/esm/signIn.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/accountGraph.d.ts +23 -8
- package/dist/types/accountSubject.d.ts +210 -0
- package/dist/types/agency.d.ts +956 -190
- package/dist/types/agentKeys.d.ts +525 -0
- package/dist/types/capabilityBindings.d.ts +6 -0
- package/dist/types/deviceDirectory.d.ts +50 -50
- package/dist/types/deviceSession.d.ts +14 -14
- package/dist/types/externalIdentity.d.ts +4 -4
- package/dist/types/identity.d.ts +2 -2
- package/dist/types/index.d.ts +12 -2
- package/dist/types/inference/accountBilling.d.ts +30 -30
- package/dist/types/inference/aliaModelRelease.d.ts +83 -83
- package/dist/types/inference/catalogue.d.ts +180 -180
- package/dist/types/inference/economics.d.ts +376 -0
- package/dist/types/inference/entitlement.d.ts +47 -47
- package/dist/types/inference/inbox.d.ts +12 -12
- package/dist/types/inference/modelDocumentation.d.ts +231 -231
- package/dist/types/inference/priceVersion.d.ts +4 -4
- package/dist/types/inference/providerConnection.d.ts +38 -38
- package/dist/types/inference/realtime.d.ts +802 -802
- package/dist/types/inference/request.d.ts +844 -844
- package/dist/types/inference/routingPolicy.d.ts +4 -4
- package/dist/types/inference/scopedExecution.d.ts +38 -38
- package/dist/types/inference/streamEvents.d.ts +4 -4
- package/dist/types/inference/usage.d.ts +12 -12
- package/dist/types/keyRotation.d.ts +2 -2
- package/dist/types/notifications.d.ts +4 -4
- package/dist/types/oauth.d.ts +30 -30
- package/dist/types/products/access.d.ts +487 -0
- package/dist/types/products/billing.d.ts +563 -0
- package/dist/types/recommendations.d.ts +2 -2
- package/dist/types/sessionStatus.d.ts +10 -10
- package/dist/types/signIn.d.ts +6 -6
- package/dist/types/transparency.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
/** Autonomous runtime proof. No private key crosses this contract. */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const AGENT_PROOF_AUDIENCE: "oxy-api/agent";
|
|
4
|
+
export declare const AGENT_PROOF_TTL_MS = 60000;
|
|
5
|
+
export declare const AGENT_PROOF_ACTIONS: readonly ["agent_signin", "agent_enroll", "agent_rotate", "agent_recover", "agent_governance"];
|
|
6
|
+
export type AgentProofAction = (typeof AGENT_PROOF_ACTIONS)[number];
|
|
7
|
+
export declare const agentProofClaimsSchema: z.ZodObject<{
|
|
8
|
+
version: z.ZodLiteral<1>;
|
|
9
|
+
audience: z.ZodLiteral<"oxy-api/agent">;
|
|
10
|
+
action: z.ZodEnum<["agent_signin", "agent_enroll", "agent_rotate", "agent_recover", "agent_governance"]>;
|
|
11
|
+
accountId: z.ZodString;
|
|
12
|
+
actorId: z.ZodString;
|
|
13
|
+
authMethodId: z.ZodNullable<z.ZodString>;
|
|
14
|
+
publicKey: z.ZodString;
|
|
15
|
+
payloadDigest: z.ZodString;
|
|
16
|
+
challenge: z.ZodString;
|
|
17
|
+
expiresAt: z.ZodNumber;
|
|
18
|
+
}, "strict", z.ZodTypeAny, {
|
|
19
|
+
expiresAt: number;
|
|
20
|
+
accountId: string;
|
|
21
|
+
version: 1;
|
|
22
|
+
audience: "oxy-api/agent";
|
|
23
|
+
action: "agent_signin" | "agent_enroll" | "agent_rotate" | "agent_recover" | "agent_governance";
|
|
24
|
+
challenge: string;
|
|
25
|
+
actorId: string;
|
|
26
|
+
authMethodId: string | null;
|
|
27
|
+
publicKey: string;
|
|
28
|
+
payloadDigest: string;
|
|
29
|
+
}, {
|
|
30
|
+
expiresAt: number;
|
|
31
|
+
accountId: string;
|
|
32
|
+
version: 1;
|
|
33
|
+
audience: "oxy-api/agent";
|
|
34
|
+
action: "agent_signin" | "agent_enroll" | "agent_rotate" | "agent_recover" | "agent_governance";
|
|
35
|
+
challenge: string;
|
|
36
|
+
actorId: string;
|
|
37
|
+
authMethodId: string | null;
|
|
38
|
+
publicKey: string;
|
|
39
|
+
payloadDigest: string;
|
|
40
|
+
}>;
|
|
41
|
+
export type AgentProofClaims = z.infer<typeof agentProofClaimsSchema>;
|
|
42
|
+
/** Different proof roles cannot substitute for one another on the same operation. */
|
|
43
|
+
export declare function buildAgentProofMessage(claims: AgentProofClaims, timestamp: number, role?: 'credential' | 'governor'): string;
|
|
44
|
+
export declare const agentSignatureSchema: z.ZodObject<{
|
|
45
|
+
challenge: z.ZodString;
|
|
46
|
+
signature: z.ZodString;
|
|
47
|
+
timestamp: z.ZodNumber;
|
|
48
|
+
}, "strict", z.ZodTypeAny, {
|
|
49
|
+
signature: string;
|
|
50
|
+
challenge: string;
|
|
51
|
+
timestamp: number;
|
|
52
|
+
}, {
|
|
53
|
+
signature: string;
|
|
54
|
+
challenge: string;
|
|
55
|
+
timestamp: number;
|
|
56
|
+
}>;
|
|
57
|
+
export type AgentSignature = z.infer<typeof agentSignatureSchema>;
|
|
58
|
+
export declare const agentChallengeRequestSchema: z.ZodObject<{
|
|
59
|
+
publicKey: z.ZodString;
|
|
60
|
+
}, "strict", z.ZodTypeAny, {
|
|
61
|
+
publicKey: string;
|
|
62
|
+
}, {
|
|
63
|
+
publicKey: string;
|
|
64
|
+
}>;
|
|
65
|
+
export declare const agentVerifyRequestSchema: z.ZodObject<{
|
|
66
|
+
challenge: z.ZodString;
|
|
67
|
+
signature: z.ZodString;
|
|
68
|
+
timestamp: z.ZodNumber;
|
|
69
|
+
} & {
|
|
70
|
+
publicKey: z.ZodString;
|
|
71
|
+
}, "strict", z.ZodTypeAny, {
|
|
72
|
+
signature: string;
|
|
73
|
+
challenge: string;
|
|
74
|
+
publicKey: string;
|
|
75
|
+
timestamp: number;
|
|
76
|
+
}, {
|
|
77
|
+
signature: string;
|
|
78
|
+
challenge: string;
|
|
79
|
+
publicKey: string;
|
|
80
|
+
timestamp: number;
|
|
81
|
+
}>;
|
|
82
|
+
export declare const agentKeyOperationSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
|
|
83
|
+
publicKey: z.ZodString;
|
|
84
|
+
label: z.ZodString;
|
|
85
|
+
operation: z.ZodLiteral<"enroll">;
|
|
86
|
+
}, "strict", z.ZodTypeAny, {
|
|
87
|
+
publicKey: string;
|
|
88
|
+
operation: "enroll";
|
|
89
|
+
label: string;
|
|
90
|
+
}, {
|
|
91
|
+
publicKey: string;
|
|
92
|
+
operation: "enroll";
|
|
93
|
+
label: string;
|
|
94
|
+
}>, z.ZodObject<{
|
|
95
|
+
publicKey: z.ZodString;
|
|
96
|
+
label: z.ZodString;
|
|
97
|
+
operation: z.ZodLiteral<"recover">;
|
|
98
|
+
}, "strict", z.ZodTypeAny, {
|
|
99
|
+
publicKey: string;
|
|
100
|
+
operation: "recover";
|
|
101
|
+
label: string;
|
|
102
|
+
}, {
|
|
103
|
+
publicKey: string;
|
|
104
|
+
operation: "recover";
|
|
105
|
+
label: string;
|
|
106
|
+
}>, z.ZodObject<{
|
|
107
|
+
retireCurrent: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
+
publicKey: z.ZodString;
|
|
109
|
+
label: z.ZodString;
|
|
110
|
+
operation: z.ZodLiteral<"rotate">;
|
|
111
|
+
}, "strict", z.ZodTypeAny, {
|
|
112
|
+
publicKey: string;
|
|
113
|
+
operation: "rotate";
|
|
114
|
+
label: string;
|
|
115
|
+
retireCurrent?: boolean | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
publicKey: string;
|
|
118
|
+
operation: "rotate";
|
|
119
|
+
label: string;
|
|
120
|
+
retireCurrent?: boolean | undefined;
|
|
121
|
+
}>, z.ZodObject<{
|
|
122
|
+
operation: z.ZodLiteral<"revoke">;
|
|
123
|
+
methodId: z.ZodString;
|
|
124
|
+
}, "strict", z.ZodTypeAny, {
|
|
125
|
+
operation: "revoke";
|
|
126
|
+
methodId: string;
|
|
127
|
+
}, {
|
|
128
|
+
operation: "revoke";
|
|
129
|
+
methodId: string;
|
|
130
|
+
}>]>;
|
|
131
|
+
export type AgentKeyOperation = z.infer<typeof agentKeyOperationSchema>;
|
|
132
|
+
export declare const agentKeyOperationProofSchema: z.ZodObject<{
|
|
133
|
+
challenge: z.ZodString;
|
|
134
|
+
timestamp: z.ZodNumber;
|
|
135
|
+
keySignature: z.ZodOptional<z.ZodString>;
|
|
136
|
+
governorSignature: z.ZodOptional<z.ZodString>;
|
|
137
|
+
reauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
138
|
+
password: z.ZodOptional<z.ZodString>;
|
|
139
|
+
emailCode: z.ZodOptional<z.ZodObject<{
|
|
140
|
+
verificationId: z.ZodString;
|
|
141
|
+
code: z.ZodString;
|
|
142
|
+
}, "strict", z.ZodTypeAny, {
|
|
143
|
+
code: string;
|
|
144
|
+
verificationId: string;
|
|
145
|
+
}, {
|
|
146
|
+
code: string;
|
|
147
|
+
verificationId: string;
|
|
148
|
+
}>>;
|
|
149
|
+
totpCode: z.ZodOptional<z.ZodString>;
|
|
150
|
+
}, "strict", z.ZodTypeAny, {
|
|
151
|
+
password?: string | undefined;
|
|
152
|
+
emailCode?: {
|
|
153
|
+
code: string;
|
|
154
|
+
verificationId: string;
|
|
155
|
+
} | undefined;
|
|
156
|
+
totpCode?: string | undefined;
|
|
157
|
+
}, {
|
|
158
|
+
password?: string | undefined;
|
|
159
|
+
emailCode?: {
|
|
160
|
+
code: string;
|
|
161
|
+
verificationId: string;
|
|
162
|
+
} | undefined;
|
|
163
|
+
totpCode?: string | undefined;
|
|
164
|
+
}>, {
|
|
165
|
+
password?: string | undefined;
|
|
166
|
+
emailCode?: {
|
|
167
|
+
code: string;
|
|
168
|
+
verificationId: string;
|
|
169
|
+
} | undefined;
|
|
170
|
+
totpCode?: string | undefined;
|
|
171
|
+
}, {
|
|
172
|
+
password?: string | undefined;
|
|
173
|
+
emailCode?: {
|
|
174
|
+
code: string;
|
|
175
|
+
verificationId: string;
|
|
176
|
+
} | undefined;
|
|
177
|
+
totpCode?: string | undefined;
|
|
178
|
+
}>>;
|
|
179
|
+
}, "strict", z.ZodTypeAny, {
|
|
180
|
+
challenge: string;
|
|
181
|
+
timestamp: number;
|
|
182
|
+
reauth?: {
|
|
183
|
+
password?: string | undefined;
|
|
184
|
+
emailCode?: {
|
|
185
|
+
code: string;
|
|
186
|
+
verificationId: string;
|
|
187
|
+
} | undefined;
|
|
188
|
+
totpCode?: string | undefined;
|
|
189
|
+
} | undefined;
|
|
190
|
+
keySignature?: string | undefined;
|
|
191
|
+
governorSignature?: string | undefined;
|
|
192
|
+
}, {
|
|
193
|
+
challenge: string;
|
|
194
|
+
timestamp: number;
|
|
195
|
+
reauth?: {
|
|
196
|
+
password?: string | undefined;
|
|
197
|
+
emailCode?: {
|
|
198
|
+
code: string;
|
|
199
|
+
verificationId: string;
|
|
200
|
+
} | undefined;
|
|
201
|
+
totpCode?: string | undefined;
|
|
202
|
+
} | undefined;
|
|
203
|
+
keySignature?: string | undefined;
|
|
204
|
+
governorSignature?: string | undefined;
|
|
205
|
+
}>;
|
|
206
|
+
export type AgentKeyOperationProof = z.infer<typeof agentKeyOperationProofSchema>;
|
|
207
|
+
export declare const executeAgentKeyOperationSchema: z.ZodObject<{
|
|
208
|
+
operation: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
|
|
209
|
+
publicKey: z.ZodString;
|
|
210
|
+
label: z.ZodString;
|
|
211
|
+
operation: z.ZodLiteral<"enroll">;
|
|
212
|
+
}, "strict", z.ZodTypeAny, {
|
|
213
|
+
publicKey: string;
|
|
214
|
+
operation: "enroll";
|
|
215
|
+
label: string;
|
|
216
|
+
}, {
|
|
217
|
+
publicKey: string;
|
|
218
|
+
operation: "enroll";
|
|
219
|
+
label: string;
|
|
220
|
+
}>, z.ZodObject<{
|
|
221
|
+
publicKey: z.ZodString;
|
|
222
|
+
label: z.ZodString;
|
|
223
|
+
operation: z.ZodLiteral<"recover">;
|
|
224
|
+
}, "strict", z.ZodTypeAny, {
|
|
225
|
+
publicKey: string;
|
|
226
|
+
operation: "recover";
|
|
227
|
+
label: string;
|
|
228
|
+
}, {
|
|
229
|
+
publicKey: string;
|
|
230
|
+
operation: "recover";
|
|
231
|
+
label: string;
|
|
232
|
+
}>, z.ZodObject<{
|
|
233
|
+
retireCurrent: z.ZodOptional<z.ZodBoolean>;
|
|
234
|
+
publicKey: z.ZodString;
|
|
235
|
+
label: z.ZodString;
|
|
236
|
+
operation: z.ZodLiteral<"rotate">;
|
|
237
|
+
}, "strict", z.ZodTypeAny, {
|
|
238
|
+
publicKey: string;
|
|
239
|
+
operation: "rotate";
|
|
240
|
+
label: string;
|
|
241
|
+
retireCurrent?: boolean | undefined;
|
|
242
|
+
}, {
|
|
243
|
+
publicKey: string;
|
|
244
|
+
operation: "rotate";
|
|
245
|
+
label: string;
|
|
246
|
+
retireCurrent?: boolean | undefined;
|
|
247
|
+
}>, z.ZodObject<{
|
|
248
|
+
operation: z.ZodLiteral<"revoke">;
|
|
249
|
+
methodId: z.ZodString;
|
|
250
|
+
}, "strict", z.ZodTypeAny, {
|
|
251
|
+
operation: "revoke";
|
|
252
|
+
methodId: string;
|
|
253
|
+
}, {
|
|
254
|
+
operation: "revoke";
|
|
255
|
+
methodId: string;
|
|
256
|
+
}>]>;
|
|
257
|
+
proof: z.ZodObject<{
|
|
258
|
+
challenge: z.ZodString;
|
|
259
|
+
timestamp: z.ZodNumber;
|
|
260
|
+
keySignature: z.ZodOptional<z.ZodString>;
|
|
261
|
+
governorSignature: z.ZodOptional<z.ZodString>;
|
|
262
|
+
reauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
263
|
+
password: z.ZodOptional<z.ZodString>;
|
|
264
|
+
emailCode: z.ZodOptional<z.ZodObject<{
|
|
265
|
+
verificationId: z.ZodString;
|
|
266
|
+
code: z.ZodString;
|
|
267
|
+
}, "strict", z.ZodTypeAny, {
|
|
268
|
+
code: string;
|
|
269
|
+
verificationId: string;
|
|
270
|
+
}, {
|
|
271
|
+
code: string;
|
|
272
|
+
verificationId: string;
|
|
273
|
+
}>>;
|
|
274
|
+
totpCode: z.ZodOptional<z.ZodString>;
|
|
275
|
+
}, "strict", z.ZodTypeAny, {
|
|
276
|
+
password?: string | undefined;
|
|
277
|
+
emailCode?: {
|
|
278
|
+
code: string;
|
|
279
|
+
verificationId: string;
|
|
280
|
+
} | undefined;
|
|
281
|
+
totpCode?: string | undefined;
|
|
282
|
+
}, {
|
|
283
|
+
password?: string | undefined;
|
|
284
|
+
emailCode?: {
|
|
285
|
+
code: string;
|
|
286
|
+
verificationId: string;
|
|
287
|
+
} | undefined;
|
|
288
|
+
totpCode?: string | undefined;
|
|
289
|
+
}>, {
|
|
290
|
+
password?: string | undefined;
|
|
291
|
+
emailCode?: {
|
|
292
|
+
code: string;
|
|
293
|
+
verificationId: string;
|
|
294
|
+
} | undefined;
|
|
295
|
+
totpCode?: string | undefined;
|
|
296
|
+
}, {
|
|
297
|
+
password?: string | undefined;
|
|
298
|
+
emailCode?: {
|
|
299
|
+
code: string;
|
|
300
|
+
verificationId: string;
|
|
301
|
+
} | undefined;
|
|
302
|
+
totpCode?: string | undefined;
|
|
303
|
+
}>>;
|
|
304
|
+
}, "strict", z.ZodTypeAny, {
|
|
305
|
+
challenge: string;
|
|
306
|
+
timestamp: number;
|
|
307
|
+
reauth?: {
|
|
308
|
+
password?: string | undefined;
|
|
309
|
+
emailCode?: {
|
|
310
|
+
code: string;
|
|
311
|
+
verificationId: string;
|
|
312
|
+
} | undefined;
|
|
313
|
+
totpCode?: string | undefined;
|
|
314
|
+
} | undefined;
|
|
315
|
+
keySignature?: string | undefined;
|
|
316
|
+
governorSignature?: string | undefined;
|
|
317
|
+
}, {
|
|
318
|
+
challenge: string;
|
|
319
|
+
timestamp: number;
|
|
320
|
+
reauth?: {
|
|
321
|
+
password?: string | undefined;
|
|
322
|
+
emailCode?: {
|
|
323
|
+
code: string;
|
|
324
|
+
verificationId: string;
|
|
325
|
+
} | undefined;
|
|
326
|
+
totpCode?: string | undefined;
|
|
327
|
+
} | undefined;
|
|
328
|
+
keySignature?: string | undefined;
|
|
329
|
+
governorSignature?: string | undefined;
|
|
330
|
+
}>;
|
|
331
|
+
}, "strict", z.ZodTypeAny, {
|
|
332
|
+
operation: {
|
|
333
|
+
publicKey: string;
|
|
334
|
+
operation: "enroll";
|
|
335
|
+
label: string;
|
|
336
|
+
} | {
|
|
337
|
+
publicKey: string;
|
|
338
|
+
operation: "recover";
|
|
339
|
+
label: string;
|
|
340
|
+
} | {
|
|
341
|
+
publicKey: string;
|
|
342
|
+
operation: "rotate";
|
|
343
|
+
label: string;
|
|
344
|
+
retireCurrent?: boolean | undefined;
|
|
345
|
+
} | {
|
|
346
|
+
operation: "revoke";
|
|
347
|
+
methodId: string;
|
|
348
|
+
};
|
|
349
|
+
proof: {
|
|
350
|
+
challenge: string;
|
|
351
|
+
timestamp: number;
|
|
352
|
+
reauth?: {
|
|
353
|
+
password?: string | undefined;
|
|
354
|
+
emailCode?: {
|
|
355
|
+
code: string;
|
|
356
|
+
verificationId: string;
|
|
357
|
+
} | undefined;
|
|
358
|
+
totpCode?: string | undefined;
|
|
359
|
+
} | undefined;
|
|
360
|
+
keySignature?: string | undefined;
|
|
361
|
+
governorSignature?: string | undefined;
|
|
362
|
+
};
|
|
363
|
+
}, {
|
|
364
|
+
operation: {
|
|
365
|
+
publicKey: string;
|
|
366
|
+
operation: "enroll";
|
|
367
|
+
label: string;
|
|
368
|
+
} | {
|
|
369
|
+
publicKey: string;
|
|
370
|
+
operation: "recover";
|
|
371
|
+
label: string;
|
|
372
|
+
} | {
|
|
373
|
+
publicKey: string;
|
|
374
|
+
operation: "rotate";
|
|
375
|
+
label: string;
|
|
376
|
+
retireCurrent?: boolean | undefined;
|
|
377
|
+
} | {
|
|
378
|
+
operation: "revoke";
|
|
379
|
+
methodId: string;
|
|
380
|
+
};
|
|
381
|
+
proof: {
|
|
382
|
+
challenge: string;
|
|
383
|
+
timestamp: number;
|
|
384
|
+
reauth?: {
|
|
385
|
+
password?: string | undefined;
|
|
386
|
+
emailCode?: {
|
|
387
|
+
code: string;
|
|
388
|
+
verificationId: string;
|
|
389
|
+
} | undefined;
|
|
390
|
+
totpCode?: string | undefined;
|
|
391
|
+
} | undefined;
|
|
392
|
+
keySignature?: string | undefined;
|
|
393
|
+
governorSignature?: string | undefined;
|
|
394
|
+
};
|
|
395
|
+
}>;
|
|
396
|
+
export declare const agentKeyOperationChallengeSchema: z.ZodObject<{
|
|
397
|
+
claims: z.ZodObject<{
|
|
398
|
+
version: z.ZodLiteral<1>;
|
|
399
|
+
audience: z.ZodLiteral<"oxy-api/agent">;
|
|
400
|
+
action: z.ZodEnum<["agent_signin", "agent_enroll", "agent_rotate", "agent_recover", "agent_governance"]>;
|
|
401
|
+
accountId: z.ZodString;
|
|
402
|
+
actorId: z.ZodString;
|
|
403
|
+
authMethodId: z.ZodNullable<z.ZodString>;
|
|
404
|
+
publicKey: z.ZodString;
|
|
405
|
+
payloadDigest: z.ZodString;
|
|
406
|
+
challenge: z.ZodString;
|
|
407
|
+
expiresAt: z.ZodNumber;
|
|
408
|
+
}, "strict", z.ZodTypeAny, {
|
|
409
|
+
expiresAt: number;
|
|
410
|
+
accountId: string;
|
|
411
|
+
version: 1;
|
|
412
|
+
audience: "oxy-api/agent";
|
|
413
|
+
action: "agent_signin" | "agent_enroll" | "agent_rotate" | "agent_recover" | "agent_governance";
|
|
414
|
+
challenge: string;
|
|
415
|
+
actorId: string;
|
|
416
|
+
authMethodId: string | null;
|
|
417
|
+
publicKey: string;
|
|
418
|
+
payloadDigest: string;
|
|
419
|
+
}, {
|
|
420
|
+
expiresAt: number;
|
|
421
|
+
accountId: string;
|
|
422
|
+
version: 1;
|
|
423
|
+
audience: "oxy-api/agent";
|
|
424
|
+
action: "agent_signin" | "agent_enroll" | "agent_rotate" | "agent_recover" | "agent_governance";
|
|
425
|
+
challenge: string;
|
|
426
|
+
actorId: string;
|
|
427
|
+
authMethodId: string | null;
|
|
428
|
+
publicKey: string;
|
|
429
|
+
payloadDigest: string;
|
|
430
|
+
}>;
|
|
431
|
+
governorPublicKey: z.ZodNullable<z.ZodString>;
|
|
432
|
+
}, "strict", z.ZodTypeAny, {
|
|
433
|
+
claims: {
|
|
434
|
+
expiresAt: number;
|
|
435
|
+
accountId: string;
|
|
436
|
+
version: 1;
|
|
437
|
+
audience: "oxy-api/agent";
|
|
438
|
+
action: "agent_signin" | "agent_enroll" | "agent_rotate" | "agent_recover" | "agent_governance";
|
|
439
|
+
challenge: string;
|
|
440
|
+
actorId: string;
|
|
441
|
+
authMethodId: string | null;
|
|
442
|
+
publicKey: string;
|
|
443
|
+
payloadDigest: string;
|
|
444
|
+
};
|
|
445
|
+
governorPublicKey: string | null;
|
|
446
|
+
}, {
|
|
447
|
+
claims: {
|
|
448
|
+
expiresAt: number;
|
|
449
|
+
accountId: string;
|
|
450
|
+
version: 1;
|
|
451
|
+
audience: "oxy-api/agent";
|
|
452
|
+
action: "agent_signin" | "agent_enroll" | "agent_rotate" | "agent_recover" | "agent_governance";
|
|
453
|
+
challenge: string;
|
|
454
|
+
actorId: string;
|
|
455
|
+
authMethodId: string | null;
|
|
456
|
+
publicKey: string;
|
|
457
|
+
payloadDigest: string;
|
|
458
|
+
};
|
|
459
|
+
governorPublicKey: string | null;
|
|
460
|
+
}>;
|
|
461
|
+
export declare const agentKeyOperationResultSchema: z.ZodObject<{
|
|
462
|
+
methodId: z.ZodNullable<z.ZodString>;
|
|
463
|
+
revokedMethodIds: z.ZodArray<z.ZodString, "many">;
|
|
464
|
+
}, "strict", z.ZodTypeAny, {
|
|
465
|
+
methodId: string | null;
|
|
466
|
+
revokedMethodIds: string[];
|
|
467
|
+
}, {
|
|
468
|
+
methodId: string | null;
|
|
469
|
+
revokedMethodIds: string[];
|
|
470
|
+
}>;
|
|
471
|
+
export declare const ACCOUNT_AUTH_METHODS: readonly ["identity", "agent_key"];
|
|
472
|
+
export type AccountAuthMethod = (typeof ACCOUNT_AUTH_METHODS)[number];
|
|
473
|
+
/** Public credential inventory. Never includes a proof, bearer or private key. */
|
|
474
|
+
export declare const agentKeyListResponseSchema: z.ZodObject<{
|
|
475
|
+
keys: z.ZodArray<z.ZodObject<{
|
|
476
|
+
id: z.ZodString;
|
|
477
|
+
publicKey: z.ZodString;
|
|
478
|
+
label: z.ZodString;
|
|
479
|
+
enrolledByUserId: z.ZodNullable<z.ZodString>;
|
|
480
|
+
enrollmentMethod: z.ZodEnum<["governor", "rotation", "recovery"]>;
|
|
481
|
+
linkedAt: z.ZodString;
|
|
482
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
483
|
+
revokedAt: z.ZodNullable<z.ZodString>;
|
|
484
|
+
}, "strict", z.ZodTypeAny, {
|
|
485
|
+
id: string;
|
|
486
|
+
revokedAt: string | null;
|
|
487
|
+
publicKey: string;
|
|
488
|
+
label: string;
|
|
489
|
+
enrolledByUserId: string | null;
|
|
490
|
+
enrollmentMethod: "governor" | "rotation" | "recovery";
|
|
491
|
+
linkedAt: string;
|
|
492
|
+
lastUsedAt: string | null;
|
|
493
|
+
}, {
|
|
494
|
+
id: string;
|
|
495
|
+
revokedAt: string | null;
|
|
496
|
+
publicKey: string;
|
|
497
|
+
label: string;
|
|
498
|
+
enrolledByUserId: string | null;
|
|
499
|
+
enrollmentMethod: "governor" | "rotation" | "recovery";
|
|
500
|
+
linkedAt: string;
|
|
501
|
+
lastUsedAt: string | null;
|
|
502
|
+
}>, "many">;
|
|
503
|
+
}, "strict", z.ZodTypeAny, {
|
|
504
|
+
keys: {
|
|
505
|
+
id: string;
|
|
506
|
+
revokedAt: string | null;
|
|
507
|
+
publicKey: string;
|
|
508
|
+
label: string;
|
|
509
|
+
enrolledByUserId: string | null;
|
|
510
|
+
enrollmentMethod: "governor" | "rotation" | "recovery";
|
|
511
|
+
linkedAt: string;
|
|
512
|
+
lastUsedAt: string | null;
|
|
513
|
+
}[];
|
|
514
|
+
}, {
|
|
515
|
+
keys: {
|
|
516
|
+
id: string;
|
|
517
|
+
revokedAt: string | null;
|
|
518
|
+
publicKey: string;
|
|
519
|
+
label: string;
|
|
520
|
+
enrolledByUserId: string | null;
|
|
521
|
+
enrollmentMethod: "governor" | "rotation" | "recovery";
|
|
522
|
+
linkedAt: string;
|
|
523
|
+
lastUsedAt: string | null;
|
|
524
|
+
}[];
|
|
525
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { GrantLimit } from './agency';
|
|
2
|
+
/** Registry-compatible JSON: sorted keys, omitted undefined object properties. */
|
|
3
|
+
export declare function canonicalCapabilityJson(value: unknown): string;
|
|
4
|
+
/** Enforces the signed per-action bounds before a domain handler runs. */
|
|
5
|
+
export declare function inputSatisfiesCapabilityLimits(tool: string, input: Record<string, unknown>, limits: readonly GrantLimit[]): boolean;
|
|
6
|
+
export declare function isLoopbackOrigin(origin: string): boolean;
|