@oxyhq/contracts 0.29.0 → 0.31.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 (51) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/accountGraph.js +41 -0
  3. package/dist/cjs/identity.js +33 -1
  4. package/dist/cjs/index.js +35 -7
  5. package/dist/cjs/inference/aliaModelRelease.js +262 -0
  6. package/dist/cjs/inference/catalogue.js +1 -4
  7. package/dist/cjs/inference/identifiers.js +23 -3
  8. package/dist/cjs/inference/modelDocumentation.js +433 -0
  9. package/dist/cjs/inference/providerConnection.js +77 -7
  10. package/dist/cjs/inference/request.js +188 -5
  11. package/dist/cjs/inference/routingPolicy.js +81 -2
  12. package/dist/cjs/inference/streamEvents.js +27 -0
  13. package/dist/cjs/inference/usage.js +32 -1
  14. package/dist/cjs/inference/version.js +15 -2
  15. package/dist/cjs/updates.js +2 -0
  16. package/dist/esm/.tsbuildinfo +1 -1
  17. package/dist/esm/accountGraph.js +41 -0
  18. package/dist/esm/identity.js +32 -0
  19. package/dist/esm/index.js +14 -4
  20. package/dist/esm/inference/aliaModelRelease.js +259 -0
  21. package/dist/esm/inference/catalogue.js +2 -5
  22. package/dist/esm/inference/identifiers.js +22 -2
  23. package/dist/esm/inference/modelDocumentation.js +430 -0
  24. package/dist/esm/inference/providerConnection.js +76 -6
  25. package/dist/esm/inference/request.js +189 -6
  26. package/dist/esm/inference/routingPolicy.js +81 -2
  27. package/dist/esm/inference/streamEvents.js +27 -0
  28. package/dist/esm/inference/usage.js +32 -1
  29. package/dist/esm/inference/version.js +15 -2
  30. package/dist/esm/updates.js +2 -0
  31. package/dist/types/.tsbuildinfo +1 -1
  32. package/dist/types/accountGraph.d.ts +43 -0
  33. package/dist/types/identity.d.ts +59 -1
  34. package/dist/types/index.d.ts +10 -6
  35. package/dist/types/inference/accountBilling.d.ts +26 -26
  36. package/dist/types/inference/aliaModelRelease.d.ts +609 -0
  37. package/dist/types/inference/catalogue.d.ts +6 -6
  38. package/dist/types/inference/entitlement.d.ts +4 -4
  39. package/dist/types/inference/identifiers.d.ts +20 -2
  40. package/dist/types/inference/modelDocumentation.d.ts +1603 -0
  41. package/dist/types/inference/money.d.ts +4 -4
  42. package/dist/types/inference/priceVersion.d.ts +14 -14
  43. package/dist/types/inference/providerConnection.d.ts +37 -8
  44. package/dist/types/inference/request.d.ts +291 -5
  45. package/dist/types/inference/routingPolicy.d.ts +109 -13
  46. package/dist/types/inference/streamEvents.d.ts +53 -26
  47. package/dist/types/inference/usage.d.ts +103 -79
  48. package/dist/types/inference/version.d.ts +15 -2
  49. package/dist/types/keyRecovery.d.ts +4 -4
  50. package/dist/types/updates.d.ts +10 -0
  51. package/package.json +1 -1
@@ -56,8 +56,16 @@ export declare const oxyCredentialIdSchema: z.ZodString;
56
56
  * traceable as one that was served (ADR 0007, and step 1 of ADR 0010's edge
57
57
  * order). It is required on the inbound envelope, which is what makes the data
58
58
  * plane a consumer of this id rather than its source: the data plane echoes it
59
- * on every stream event, on the usage report and on anything it can be asked
60
- * about later.
59
+ * on every stream event, on the usage report, in its response header and on
60
+ * anything it can be asked about later. It never mints one for a request it
61
+ * received.
62
+ *
63
+ * The one case that is NOT an exception to that: an envelope the data plane
64
+ * cannot read or authenticate carries no id to echo, so its rejection is
65
+ * labelled with an id of the data plane's own — visibly local, and never
66
+ * correlated with an Oxy request, because there is no Oxy request it belongs to.
67
+ * Saying so is what stops "consumer, not source" from being read as forbidding
68
+ * the only id such a rejection could have.
61
69
  *
62
70
  * Correlates the Oxy edge, the data plane, the financial ledger and the
63
71
  * customer-visible receipt, so it appears on every stream event and every
@@ -95,6 +103,16 @@ export declare const inferenceTimestampSchema: z.ZodString;
95
103
  export declare const inferenceDateSchema: z.ZodString;
96
104
  /** An absolute https URL, for model cards, licenses and provider documentation. */
97
105
  export declare const inferenceHttpsUrlSchema: z.ZodString;
106
+ /**
107
+ * A content digest, `sha256:<64 lowercase hex>`.
108
+ *
109
+ * ONE spelling, because a digest is compared for equality and nothing else: an
110
+ * uppercase or unprefixed variant of the same hash is a different string, so two
111
+ * records describing the same bytes would not match. Lowercase hex with the
112
+ * algorithm prefix is what the `inference_model_revisions` CHECK stores and what
113
+ * every artifact registry emits.
114
+ */
115
+ export declare const sha256DigestSchema: z.ZodString;
98
116
  /** A publisher slug, e.g. `openai`, `anthropic`, `meta`, `alia`. */
99
117
  export declare const publisherSlugSchema: z.ZodString;
100
118
  /** A model slug within its publisher's namespace, e.g. `gpt-5`, `llama-3.1-70b`. */