@oxy.so/contracts 4.11.0-oxy-one.0 → 4.11.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 (98) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/accountGraph.js +5 -3
  3. package/dist/cjs/agency.js +178 -96
  4. package/dist/cjs/agentKeys.js +80 -26
  5. package/dist/cjs/capabilityBindings.js +2 -2
  6. package/dist/cjs/capabilityInvocation.js +3 -1
  7. package/dist/cjs/commonsSignIn.js +2 -2
  8. package/dist/cjs/deviceSession.js +5 -1
  9. package/dist/cjs/email/messages.js +70 -4
  10. package/dist/cjs/emailAgentContext.js +16 -8
  11. package/dist/cjs/externalIdentity.js +30 -12
  12. package/dist/cjs/identity.js +14 -6
  13. package/dist/cjs/identityLink.js +7 -2
  14. package/dist/cjs/identityProof.js +2 -1
  15. package/dist/cjs/index.js +5 -3
  16. package/dist/cjs/inference/catalogue.js +2 -12
  17. package/dist/cjs/inference/decisions.js +102 -83
  18. package/dist/cjs/inference/economics.js +15 -5
  19. package/dist/cjs/inference/embeddings.js +44 -6
  20. package/dist/cjs/inference/inbox.js +33 -2
  21. package/dist/cjs/inference/providerConnection.js +21 -6
  22. package/dist/cjs/inference/realtime.js +114 -107
  23. package/dist/cjs/inference/scopedExecution.js +12 -12
  24. package/dist/cjs/inference/usage.js +2 -9
  25. package/dist/cjs/notifications.js +25 -5
  26. package/dist/cjs/oauth.js +30 -14
  27. package/dist/cjs/oxyRecordTypes.js +2 -2
  28. package/dist/cjs/products/access.js +146 -57
  29. package/dist/cjs/products/billing.js +71 -17
  30. package/dist/cjs/products/checkout.js +24 -6
  31. package/dist/cjs/products/plans.js +22 -7
  32. package/dist/cjs/recommendations.js +4 -6
  33. package/dist/cjs/reputation.js +3 -6
  34. package/dist/cjs/sessionStatus.js +1 -6
  35. package/dist/cjs/signIn.js +17 -4
  36. package/dist/cjs/transparency.js +3 -1
  37. package/dist/cjs/updates.js +2 -4
  38. package/dist/cjs/userResponse.js +27 -7
  39. package/dist/cjs/username.js +3 -1
  40. package/dist/esm/.tsbuildinfo +1 -1
  41. package/dist/esm/accountGraph.js +5 -3
  42. package/dist/esm/agency.js +178 -96
  43. package/dist/esm/agentKeys.js +80 -26
  44. package/dist/esm/capabilityBindings.js +2 -2
  45. package/dist/esm/capabilityInvocation.js +3 -1
  46. package/dist/esm/commonsSignIn.js +2 -2
  47. package/dist/esm/deviceSession.js +5 -1
  48. package/dist/esm/email/messages.js +69 -3
  49. package/dist/esm/emailAgentContext.js +16 -8
  50. package/dist/esm/externalIdentity.js +30 -12
  51. package/dist/esm/identity.js +14 -6
  52. package/dist/esm/identityLink.js +7 -2
  53. package/dist/esm/identityProof.js +2 -1
  54. package/dist/esm/index.js +7 -7
  55. package/dist/esm/inference/aliaModelRelease.js +1 -1
  56. package/dist/esm/inference/catalogue.js +3 -13
  57. package/dist/esm/inference/decisions.js +108 -89
  58. package/dist/esm/inference/economics.js +16 -6
  59. package/dist/esm/inference/embeddings.js +44 -6
  60. package/dist/esm/inference/inbox.js +32 -1
  61. package/dist/esm/inference/providerConnection.js +21 -6
  62. package/dist/esm/inference/realtime.js +123 -116
  63. package/dist/esm/inference/scopedExecution.js +15 -15
  64. package/dist/esm/inference/usage.js +2 -9
  65. package/dist/esm/notifications.js +25 -5
  66. package/dist/esm/oauth.js +30 -14
  67. package/dist/esm/oxyRecordTypes.js +2 -2
  68. package/dist/esm/products/access.js +146 -57
  69. package/dist/esm/products/billing.js +71 -17
  70. package/dist/esm/products/checkout.js +24 -6
  71. package/dist/esm/products/plans.js +22 -7
  72. package/dist/esm/recommendations.js +4 -6
  73. package/dist/esm/reputation.js +3 -6
  74. package/dist/esm/sessionStatus.js +1 -6
  75. package/dist/esm/signIn.js +17 -4
  76. package/dist/esm/transparency.js +3 -1
  77. package/dist/esm/updates.js +2 -4
  78. package/dist/esm/userResponse.js +27 -7
  79. package/dist/esm/username.js +3 -1
  80. package/dist/types/.tsbuildinfo +1 -1
  81. package/dist/types/accountGraph.d.ts +1 -1
  82. package/dist/types/commonsSignIn.d.ts +2 -2
  83. package/dist/types/email/messages.d.ts +208 -2
  84. package/dist/types/identity.d.ts +1 -1
  85. package/dist/types/index.d.ts +8 -8
  86. package/dist/types/inference/decisions.d.ts +1 -1
  87. package/dist/types/inference/inbox.d.ts +129 -5
  88. package/dist/types/inference/realtime.d.ts +1 -1
  89. package/dist/types/inference/scopedExecution.d.ts +1 -1
  90. package/dist/types/moderationReputation.d.ts +1 -1
  91. package/dist/types/oxyRecordTypes.d.ts +2 -2
  92. package/dist/types/products/access.d.ts +102 -102
  93. package/dist/types/products/checkout.d.ts +3 -3
  94. package/dist/types/products/plans.d.ts +40 -40
  95. package/dist/types/reputation.d.ts +4 -4
  96. package/dist/types/updates.d.ts +1 -1
  97. package/dist/types/userResponse.d.ts +22 -23
  98. package/package.json +1 -2
@@ -31,7 +31,7 @@ function valuesAtPath(input, path) {
31
31
  return [];
32
32
  current = next;
33
33
  }
34
- return current.flatMap((value) => Array.isArray(value) ? value : [value]);
34
+ return current.flatMap((value) => (Array.isArray(value) ? value : [value]));
35
35
  }
36
36
  /** Enforces the signed per-action bounds before a domain handler runs. */
37
37
  export function inputSatisfiesCapabilityLimits(tool, input, limits) {
@@ -43,7 +43,7 @@ export function inputSatisfiesCapabilityLimits(tool, input, limits) {
43
43
  return false;
44
44
  if (typeof limit.value === 'number') {
45
45
  const maximum = limit.value;
46
- if (!actualValues.every((actual) => (typeof actual === 'number' && Number.isFinite(actual) && actual <= maximum)))
46
+ if (!actualValues.every((actual) => typeof actual === 'number' && Number.isFinite(actual) && actual <= maximum))
47
47
  return false;
48
48
  continue;
49
49
  }
@@ -138,7 +138,9 @@ export function matchCatalogInvocation(tools, method, path) {
138
138
  export function resolveCatalogInvocation(catalog, tool, args) {
139
139
  const remaining = { ...args };
140
140
  const path = tool.invocation.path.replace(/\{(\w+)\}/g, (_match, parameter) => {
141
- const value = Object.prototype.hasOwnProperty.call(remaining, parameter) ? remaining[parameter] : undefined;
141
+ const value = Object.prototype.hasOwnProperty.call(remaining, parameter)
142
+ ? remaining[parameter]
143
+ : undefined;
142
144
  delete remaining[parameter];
143
145
  if (value === undefined || value === null || value === '') {
144
146
  throw new Error(`Missing required path parameter: ${parameter}`);
@@ -30,8 +30,8 @@
30
30
  import { z } from 'zod';
31
31
  /**
32
32
  * The closed set, as a value — consumed directly where a runtime list is
33
- * required (e.g. the Mongoose `enum` of `AuthSession.deniedReason`, which is
34
- * the storage-level guarantee that an unauthenticated caller can never write
33
+ * required (e.g. the `enum` of the `auth_sessions.denied_reason` column, which
34
+ * is the storage-level guarantee that an unauthenticated caller can never write
35
35
  * free-form text into the field).
36
36
  */
37
37
  export const COMMONS_DENY_REASONS = ['declined', 'not_me'];
@@ -211,7 +211,11 @@ export const deviceJoinCodeResponseSchema = z.object({
211
211
  */
212
212
  export const deviceJoinRequestSchema = z.object({
213
213
  code: z.string().min(1).max(256),
214
- codeVerifier: z.string().min(43).max(128).regex(/^[A-Za-z0-9._~-]+$/),
214
+ codeVerifier: z
215
+ .string()
216
+ .min(43)
217
+ .max(128)
218
+ .regex(/^[A-Za-z0-9._~-]+$/),
215
219
  clientId: z.string().min(1).max(256),
216
220
  redirectUri: z.string().url().max(2048),
217
221
  });
@@ -26,7 +26,13 @@ const isoInstant = z.string().datetime();
26
26
  /** Structured data cards the AI extractor can emit. */
27
27
  export const MESSAGE_CARD_TYPES = ['trip', 'purchase', 'event', 'bill', 'package'];
28
28
  /** What a mail-rule condition looks at. */
29
- export const EMAIL_FILTER_CONDITION_FIELDS = ['from', 'to', 'subject', 'has-attachment', 'size'];
29
+ export const EMAIL_FILTER_CONDITION_FIELDS = [
30
+ 'from',
31
+ 'to',
32
+ 'subject',
33
+ 'has-attachment',
34
+ 'size',
35
+ ];
30
36
  /** How a mail-rule condition compares. */
31
37
  export const EMAIL_FILTER_CONDITION_OPERATORS = [
32
38
  'contains',
@@ -48,7 +54,42 @@ export const EMAIL_FILTER_ACTION_TYPES = [
48
54
  'forward',
49
55
  ];
50
56
  /** Lifecycle of a durable outbound delivery. */
51
- export const EMAIL_OUTBOX_STATUSES = ['pending', 'processing', 'sent', 'failed', 'cancelled'];
57
+ export const EMAIL_OUTBOX_STATUSES = [
58
+ 'pending',
59
+ 'processing',
60
+ 'sent',
61
+ 'failed',
62
+ 'cancelled',
63
+ ];
64
+ /**
65
+ * Where a message the user sent stands, as its Sent copy reports it.
66
+ *
67
+ * A send is filed in Sent the moment the API accepts it and handed to the relay
68
+ * afterwards, so being in Sent no longer means having left. `sent` means the
69
+ * relay took it; `retrying` means an attempt failed and another is scheduled;
70
+ * `failed` means nothing more will happen on its own.
71
+ */
72
+ export const EMAIL_DELIVERY_STATES = ['sending', 'retrying', 'sent', 'failed'];
73
+ /**
74
+ * Why a delivery is retrying or failed, in words a client can translate.
75
+ *
76
+ * - `relay_unavailable`: the relay did not answer or answered 4xx (transient).
77
+ * - `relay_unconfigured`: this server has no relay; an operator must fix it.
78
+ * - `relay_auth`: the relay rejected Oxy's credential; an operator must fix it.
79
+ * - `rejected`: the relay refused this message with a 5xx.
80
+ * - `retries_exhausted`: it stayed `relay_unavailable` for the whole budget.
81
+ * - `bounced`: the relay took it, then a recipient's server refused it.
82
+ * - `cancelled`: the sender stopped it.
83
+ */
84
+ export const EMAIL_DELIVERY_ERROR_CODES = [
85
+ 'relay_unavailable',
86
+ 'relay_unconfigured',
87
+ 'relay_auth',
88
+ 'rejected',
89
+ 'retries_exhausted',
90
+ 'bounced',
91
+ 'cancelled',
92
+ ];
52
93
  // ─── Messages ───────────────────────────────────────────────────────
53
94
  /** One addressee. A header without a display name carries `name: ''`. */
54
95
  export const emailMessageAddressSchema = z.object({
@@ -88,6 +129,22 @@ export const emailMessageHighlightSchema = z.object({
88
129
  value: z.string(),
89
130
  label: z.string(),
90
131
  });
132
+ /**
133
+ * The delivery of a message the user sent. `error` is the relay's own words;
134
+ * `errorCode` is the same failure in the vocabulary above, and is `null` when
135
+ * there is nothing to explain — or when a newer server names a reason this
136
+ * client does not know yet, which then still reads as a delivery.
137
+ * `nextAttemptAt` is set only while `retrying`.
138
+ */
139
+ export const emailMessageDeliverySchema = z.object({
140
+ state: z.enum(EMAIL_DELIVERY_STATES),
141
+ attempts: z.number().int(),
142
+ maxAttempts: z.number().int(),
143
+ nextAttemptAt: isoInstant.nullable(),
144
+ error: z.string().nullable(),
145
+ errorCode: z.enum(EMAIL_DELIVERY_ERROR_CODES).nullable().catch(null),
146
+ updatedAt: isoInstant,
147
+ });
91
148
  /**
92
149
  * A stored message as every `/email` read returns it.
93
150
  *
@@ -138,6 +195,12 @@ export const emailMessageSchema = z.object({
138
195
  /** Present only on list reads that walked the thread. */
139
196
  threadCount: z.number().int().optional(),
140
197
  threadParticipants: z.array(z.string()).optional(),
198
+ /**
199
+ * Present only on a message the user sent through Oxy since delivery was
200
+ * tracked; absent on received mail. A delivery this client cannot read is
201
+ * dropped rather than allowed to drop the message with it.
202
+ */
203
+ delivery: emailMessageDeliverySchema.optional().catch(undefined),
141
204
  });
142
205
  // ─── Mailboxes and labels ───────────────────────────────────────────
143
206
  export const emailMailboxSchema = z.object({
@@ -174,7 +237,10 @@ export const emailSystemLabelSchema = z.object({
174
237
  order: z.number().int(),
175
238
  system: z.literal(true),
176
239
  });
177
- export const emailLabelSchema = z.discriminatedUnion('system', [emailUserLabelSchema, emailSystemLabelSchema]);
240
+ export const emailLabelSchema = z.discriminatedUnion('system', [
241
+ emailUserLabelSchema,
242
+ emailSystemLabelSchema,
243
+ ]);
178
244
  // ─── Rules, bundles, contacts, outbox ───────────────────────────────
179
245
  export const emailFilterConditionSchema = z.object({
180
246
  field: z.enum(EMAIL_FILTER_CONDITION_FIELDS),
@@ -1,16 +1,21 @@
1
1
  import { z } from 'zod';
2
- export const emailContextAddressSchema = z.object({
2
+ export const emailContextAddressSchema = z
3
+ .object({
3
4
  name: z.string().optional(),
4
5
  address: z.string().email(),
5
- }).strict();
6
- export const emailContextMailboxSchema = z.object({
6
+ })
7
+ .strict();
8
+ export const emailContextMailboxSchema = z
9
+ .object({
7
10
  mailboxId: z.string().min(1),
8
11
  name: z.string(),
9
12
  path: z.string(),
10
13
  totalMessages: z.number().int().nonnegative(),
11
14
  unseenMessages: z.number().int().nonnegative(),
12
- }).strict();
13
- export const emailContextMessageSchema = z.object({
15
+ })
16
+ .strict();
17
+ export const emailContextMessageSchema = z
18
+ .object({
14
19
  messageId: z.string().min(1),
15
20
  mailboxId: z.string().min(1),
16
21
  from: emailContextAddressSchema,
@@ -18,12 +23,15 @@ export const emailContextMessageSchema = z.object({
18
23
  receivedAt: z.string().datetime(),
19
24
  seen: z.boolean(),
20
25
  answered: z.boolean(),
21
- }).strict();
22
- export const emailAgentContextSchema = z.object({
26
+ })
27
+ .strict();
28
+ export const emailAgentContextSchema = z
29
+ .object({
23
30
  accountId: z.string().min(1),
24
31
  resourceMailboxId: z.string().min(1).nullable(),
25
32
  generatedAt: z.string().datetime(),
26
33
  mailboxes: z.array(emailContextMailboxSchema),
27
34
  recentUnread: z.array(emailContextMessageSchema),
28
35
  needsResponse: z.array(emailContextMessageSchema),
29
- }).strict();
36
+ })
37
+ .strict();
@@ -14,13 +14,16 @@ export const externalIdentityReferenceSchema = z.object({
14
14
  transportAcct: z.string().min(1),
15
15
  sourceUserId: z.string().min(1),
16
16
  });
17
- export const resolveExternalIdentityRequestSchema = z.object({
17
+ export const resolveExternalIdentityRequestSchema = z
18
+ .object({
18
19
  actorUri: z.string().min(1).max(2048).optional(),
19
20
  handle: z.string().min(1).max(2048).optional(),
20
21
  transportAcct: z.string().max(320).optional(),
21
22
  protocol: externalIdentityProtocolSchema.optional(),
22
- }).refine(value => Boolean(value.actorUri) !== Boolean(value.handle), 'Exactly one actorUri or handle is required');
23
- export const resolveExternalIdentityResponseSchema = z.object({
23
+ })
24
+ .refine((value) => Boolean(value.actorUri) !== Boolean(value.handle), 'Exactly one actorUri or handle is required');
25
+ export const resolveExternalIdentityResponseSchema = z
26
+ .object({
24
27
  user: userResponseSchema.extend({
25
28
  id: z.string().min(1),
26
29
  username: z.string().min(1),
@@ -31,20 +34,35 @@ export const resolveExternalIdentityResponseSchema = z.object({
31
34
  externalIdentity: externalIdentityReferenceSchema.extend({ userId: z.string() }),
32
35
  externalIdentities: z.array(externalIdentityReferenceSchema),
33
36
  redirectedUserIds: z.array(z.string()),
34
- }).superRefine((value, context) => {
37
+ })
38
+ .superRefine((value, context) => {
35
39
  if (value.externalIdentity.userId !== value.user.id) {
36
- context.addIssue({ code: z.ZodIssueCode.custom, path: ['externalIdentity', 'userId'], message: 'Canonical user id does not match profile' });
40
+ context.addIssue({
41
+ code: z.ZodIssueCode.custom,
42
+ path: ['externalIdentity', 'userId'],
43
+ message: 'Canonical user id does not match profile',
44
+ });
37
45
  }
38
- if (!value.externalIdentities.some(identity => identity.actorUri === value.externalIdentity.actorUri
39
- && identity.canonicalAcct === value.externalIdentity.canonicalAcct
40
- && identity.sourceUserId === value.externalIdentity.sourceUserId)) {
41
- context.addIssue({ code: z.ZodIssueCode.custom, path: ['externalIdentity'], message: 'Resolved source is absent from authoritative identities' });
46
+ if (!value.externalIdentities.some((identity) => identity.actorUri === value.externalIdentity.actorUri &&
47
+ identity.canonicalAcct === value.externalIdentity.canonicalAcct &&
48
+ identity.sourceUserId === value.externalIdentity.sourceUserId)) {
49
+ context.addIssue({
50
+ code: z.ZodIssueCode.custom,
51
+ path: ['externalIdentity'],
52
+ message: 'Resolved source is absent from authoritative identities',
53
+ });
42
54
  }
43
- if (!value.externalIdentities.some(identity => identity.canonicalAcct === value.user.username)) {
44
- context.addIssue({ code: z.ZodIssueCode.custom, path: ['user', 'username'], message: 'Profile handle is not an authoritative identity' });
55
+ if (!value.externalIdentities.some((identity) => identity.canonicalAcct === value.user.username)) {
56
+ context.addIssue({
57
+ code: z.ZodIssueCode.custom,
58
+ path: ['user', 'username'],
59
+ message: 'Profile handle is not an authoritative identity',
60
+ });
45
61
  }
46
62
  });
47
- export const lookupExternalIdentitiesRequestSchema = z.object({ identifiers: z.array(z.string().min(1).max(2048)).min(1).max(100) });
63
+ export const lookupExternalIdentitiesRequestSchema = z.object({
64
+ identifiers: z.array(z.string().min(1).max(2048)).min(1).max(100),
65
+ });
48
66
  export const lookupExternalIdentitiesResponseSchema = z.object({
49
67
  identities: z.array(z.object({
50
68
  identifier: z.string(),
@@ -173,21 +173,29 @@ const resourceOriginHostSchema = z
173
173
  .string()
174
174
  .trim()
175
175
  .toLowerCase()
176
- .pipe(z.string().min(1).max(253).regex(/^(?!-)[a-z0-9-]{1,63}(?<!-)(?:\.(?!-)[a-z0-9-]{1,63}(?<!-))+$/, 'originHost must be a public DNS hostname without scheme, port or path'));
176
+ .pipe(z
177
+ .string()
178
+ .min(1)
179
+ .max(253)
180
+ .regex(/^(?!-)[a-z0-9-]{1,63}(?<!-)(?:\.(?!-)[a-z0-9-]{1,63}(?<!-))+$/, 'originHost must be a public DNS hostname without scheme, port or path'));
177
181
  /** Clarity resource-server request to bind a site to Oxy domain authority. */
178
- export const resourceDomainOwnershipRequestSchema = z.object({
182
+ export const resourceDomainOwnershipRequestSchema = z
183
+ .object({
179
184
  accountId: z.string().min(1).max(128),
180
185
  verifiedDomainId: z.string().min(1).max(128),
181
186
  originHost: resourceOriginHostSchema,
182
- }).strict();
183
- export const resourceDomainOwnershipResponseSchema = z.object({
187
+ })
188
+ .strict();
189
+ export const resourceDomainOwnershipResponseSchema = z
190
+ .object({
184
191
  verified: z.boolean(),
185
192
  accountId: z.string().min(1).max(128),
186
193
  verifiedDomainId: z.string().min(1).max(128),
187
194
  originHost: resourceOriginHostSchema,
188
195
  verifiedAt: z.string().datetime().optional(),
189
196
  method: z.enum(['dns-txt', 'well-known']).optional(),
190
- }).strict();
197
+ })
198
+ .strict();
191
199
  /**
192
200
  * The instructions the API returns when a domain verification is requested. The
193
201
  * caller may prove ownership EITHER by publishing the `dns` TXT record OR by
@@ -254,7 +262,7 @@ export const exportFinancialSectionSchema = z.object({
254
262
  reservations: z.array(exportUsageReservationSchema),
255
263
  });
256
264
  export const exportBundleSchema = z.object({
257
- '$schema': z.string(),
265
+ $schema: z.string(),
258
266
  exportedAt: z.string(),
259
267
  did: z.string(),
260
268
  didDocument: didDocumentSchema,
@@ -31,7 +31,10 @@ export const IDENTITY_LINK_STATUSES = ['pending', 'signed', 'completed', 'cancel
31
31
  export const IDENTITY_LINK_QR_PREFIX = 'oxycommons://link';
32
32
  const LINK_ID = /^[0-9a-f]{32}$/;
33
33
  const CHALLENGE = /^[0-9a-f]{64}$/;
34
- export const identityLinkIdSchema = z.string().trim().regex(LINK_ID, 'linkId must be 32 lowercase hex characters');
34
+ export const identityLinkIdSchema = z
35
+ .string()
36
+ .trim()
37
+ .regex(LINK_ID, 'linkId must be 32 lowercase hex characters');
35
38
  /** The QR auth.oxy.so shows: the request's id and the challenge Commons signs. */
36
39
  export function buildIdentityLinkQrPayload(linkId, challenge) {
37
40
  return `${IDENTITY_LINK_QR_PREFIX}?id=${linkId}&c=${challenge}`;
@@ -84,4 +87,6 @@ export const identityLinkProofRequestSchema = z
84
87
  * code just sent to its email for this link (`reauth`, plus its authenticator
85
88
  * code when it has one).
86
89
  */
87
- export const identityLinkCompleteRequestSchema = z.object({ reauth: emailReauthProofSchema }).strict();
90
+ export const identityLinkCompleteRequestSchema = z
91
+ .object({ reauth: emailReauthProofSchema })
92
+ .strict();
@@ -82,7 +82,8 @@ export function buildIdentityProofMessage(claims) {
82
82
  if (claims.payloadDigest !== null && !HEX_DIGEST.test(claims.payloadDigest)) {
83
83
  throw new Error('identity proof: payloadDigest must be a lowercase SHA-256 hex digest');
84
84
  }
85
- if (claims.expectedRevision !== null && (!Number.isSafeInteger(claims.expectedRevision) || claims.expectedRevision < 0)) {
85
+ if (claims.expectedRevision !== null &&
86
+ (!Number.isSafeInteger(claims.expectedRevision) || claims.expectedRevision < 0)) {
86
87
  throw new Error('identity proof: expectedRevision must be a non-negative integer');
87
88
  }
88
89
  if (!CHALLENGE.test(claims.challenge))
package/dist/esm/index.js CHANGED
@@ -45,7 +45,7 @@ publicCardSchema, signedPublicCardSchema, realLifeAttestationRecordSchema, realL
45
45
  // Verifiable Credentials (Fase 4 — NEW)
46
46
  credentialRecordSchema, verifiableCredentialResponseSchema, credentialIssueResultSchema, credentialListResultSchema, credentialVerifyResultSchema, } from './civic.js';
47
47
  export {
48
- // Closed value sets — shared by the API's mongoose enums, the API's request
48
+ // Closed value sets — shared by the API's column enums, the API's request
49
49
  // validation, and the SDK's unions, so a new category/tier/status cannot be
50
50
  // added on one side only.
51
51
  REPUTATION_CATEGORIES, REPUTATION_TRANSACTION_STATUSES, TRUST_TIERS, REPUTATION_TARGET_ENTITY_TYPES, REPUTATION_INFLUENCE_CONTEXTS,
@@ -180,7 +180,7 @@ INFERENCE_ECONOMIC_TREATMENTS, inferenceEconomicTreatmentSchema, PROVIDER_COST_S
180
180
  export { AUTONOMY_LEVELS, CAPABILITY_PACKAGES, autonomyLevelSchema, capabilityPackageSchema, actorRefSchema, executionActorRefSchema, foregroundExecutionAuthorizationInputSchema, resourceRefSchema, toolGrantOverrideSchema, grantLimitSchema, capabilityCatalogBindingSchema, executionAuthorizationRefSchema, capabilityCoordinatorSchema, capabilityTicketRequestSchema, delegationGrantSchema, automationTriggerSchema, automationActorSelectionSchema, automationDataFlowSchema, automationDefinitionSchema, capabilityTicketClaimsSchema, invocationPrincipalSchema, policyDecisionSchema, auditResultSchema, auditEventSchema, catalogToolSchema, catalogEventSchema, appCapabilityCatalogSchema, catalogRegistrationSchema, normalizedAppEventSchema, } from './agency.js';
181
181
  export { catalogInvocationPathParameters, catalogInvocationsOverlap, catalogInvocationTemplatesEquivalent, findOverlappingCatalogInvocations, matchCatalogInvocation, resolveCatalogInvocation, } from './capabilityInvocation.js';
182
182
  export { emailContextAddressSchema, emailContextMailboxSchema, emailContextMessageSchema, emailAgentContextSchema, } from './emailAgentContext.js';
183
- export { inboxComposeRequestSchema, inboxDailyBriefRequestSchema, inboxNaturalSearchRequestSchema, inboxMessageInferenceParamsSchema, inboxInferenceTextResponseSchema, inboxNaturalSearchResponseSchema, inboxSmartRepliesResponseSchema, inboxThreadSummaryResponseSchema, inboxInferenceStreamEventSchema, } from './inference/inbox.js';
183
+ export { inboxComposeRequestSchema, inboxDailyBriefRequestSchema, inboxDailyBriefResponseSchema, INBOX_DAILY_BRIEF_SECTIONS, inboxNaturalSearchRequestSchema, inboxMessageInferenceParamsSchema, inboxInferenceTextResponseSchema, inboxNaturalSearchResponseSchema, inboxSmartRepliesResponseSchema, inboxThreadSummaryResponseSchema, inboxInferenceStreamEventSchema, } from './inference/inbox.js';
184
184
  export * from './externalIdentity.js';
185
185
  export * from './linkedAccounts.js';
186
186
  export * from './federationInstanceFetch.js';
@@ -188,14 +188,14 @@ export * from './notifications.js';
188
188
  export * from './email/messages.js';
189
189
  export * from './stickers.js';
190
190
  export { decisionEffortSchema, decisionQuestionSchema, decisionInputSchema, decisionRequestSchema, decisionAnswerSchema, decisionResultSchema, decisionSuccessSchema, decisionFailureSchema, decisionInputBudget, decisionFitsGateway, decisionAnswersMatch, } from './inference/decisions.js';
191
- export { SCOPED_EXECUTION_CONTRACT_VERSION, SCOPED_REQUEST_ENVELOPE_VERSION, scopedExecutionAudienceSchema, scopedExecutionSchema, canonicalScopedExecutionJson } from './inference/scopedExecution.js';
191
+ export { SCOPED_EXECUTION_CONTRACT_VERSION, SCOPED_REQUEST_ENVELOPE_VERSION, scopedExecutionAudienceSchema, scopedExecutionSchema, canonicalScopedExecutionJson, } from './inference/scopedExecution.js';
192
192
  export { scopedInferenceRequestSchema } from './inference/request.js';
193
193
  export { PRIVATE_AUTO_EXECUTION_CONTRACT_VERSION, PRIVATE_AUTO_REQUEST_ENVELOPE_VERSION, PRIVATE_AUTO_LIMITS, PRIVATE_AUTO_INSTRUCTIONS, PRIVATE_AUTO_QUESTION, privateAutoPrincipalSchema, privateAutoSourceApprovalSchema, privateAutoExecutionSchema, privateAutoInputSchema, privateAutoOperationId, } from './inference/privateAutoExecution.js';
194
194
  export { privateAutoInferenceRequestSchema } from './inference/request.js';
195
195
  export { productDefinitionSchema, subjectProductAccessQuerySchema, productBenefitSchema, productOfferSchema, productSubscriptionSourceSchema, productAccessGrantSchema, subjectProductGrantSnapshotSchema, productOfferSegmentSchema, subjectProductAccessSchema, } from './products/access.js';
196
- export { meteredGenerationSchema } from "./inference/economics.js";
197
- export { canonicalCapabilityJson, inputSatisfiesCapabilityLimits, isLoopbackOrigin } from './capabilityBindings.js';
196
+ export { meteredGenerationSchema } from './inference/economics.js';
197
+ export { canonicalCapabilityJson, inputSatisfiesCapabilityLimits, isLoopbackOrigin, } from './capabilityBindings.js';
198
198
  export * from './agentKeys.js';
199
- export { productSubscriptionSummarySchema, productSubscriptionsResponseSchema, subscriptionCreditGrantSchema, subscriptionCreditGrantsResponseSchema, cancelProductSubscriptionSchema, productSubscriptionCancellationResultSchema } from './products/billing.js';
200
- export { personalPlanDisplayPriceSchema, personalPlanCatalogueSchema } from './products/plans.js';
199
+ export { productSubscriptionSummarySchema, productSubscriptionsResponseSchema, subscriptionCreditGrantSchema, subscriptionCreditGrantsResponseSchema, cancelProductSubscriptionSchema, productSubscriptionCancellationResultSchema, } from './products/billing.js';
200
+ export { personalPlanDisplayPriceSchema, personalPlanCatalogueSchema, } from './products/plans.js';
201
201
  export * from './products/checkout.js';
@@ -82,7 +82,7 @@
82
82
  * docs/adr/0017-authorized-routes-in-the-envelope.md, issue #972 §12.
83
83
  */
84
84
  import { z } from 'zod';
85
- import { modelLicenseSchema, modelProvenanceSchema, modelRevisionSchema, } from './catalogue.js';
85
+ import { modelLicenseSchema, modelProvenanceSchema, modelRevisionSchema } from './catalogue.js';
86
86
  import { inferenceTimestampSchema, RESERVED_ALIA_PUBLISHER, sha256DigestSchema, } from './identifiers.js';
87
87
  /**
88
88
  * One artifact of a release, by path and digest.
@@ -1,4 +1,4 @@
1
- import { scopedExecutionAudienceSchema } from "./scopedExecution.js";
1
+ import { scopedExecutionAudienceSchema } from './scopedExecution.js';
2
2
  /**
3
3
  * The canonical model catalogue.
4
4
  *
@@ -34,13 +34,7 @@ import { priceSnapshotSchema } from './priceVersion.js';
34
34
  /* Shared catalogue vocabulary */
35
35
  /* -------------------------------------------------------------------------- */
36
36
  /** Input/request modalities; structured decisions are an output, never an input. */
37
- export const inferenceModalitySchema = z.enum([
38
- 'text',
39
- 'image',
40
- 'audio',
41
- 'video',
42
- 'embedding',
43
- ]);
37
+ export const inferenceModalitySchema = z.enum(['text', 'image', 'audio', 'video', 'embedding']);
44
38
  /** Declared model outputs, separate from request/input modalities. */
45
39
  export const inferenceOutputModalitySchema = z.enum([
46
40
  ...inferenceModalitySchema.options,
@@ -117,11 +111,7 @@ export const inferenceApiFormatSchema = z.enum([
117
111
  * transcribes committed input audio.
118
112
  * - `translation` — live speech-to-speech translation into one target language.
119
113
  */
120
- export const realtimeSessionKindSchema = z.enum([
121
- 'conversation',
122
- 'transcription',
123
- 'translation',
124
- ]);
114
+ export const realtimeSessionKindSchema = z.enum(['conversation', 'transcription', 'translation']);
125
115
  /**
126
116
  * How a realtime session is carried. One member today: a WebSocket, whose every
127
117
  * frame is one JSON message (see `realtime.ts`). WebRTC and SIP are separate