@oxyhq/contracts 0.30.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.
@@ -209,6 +209,47 @@ export declare const createAccountRequestSchema: z.ZodObject<{
209
209
  description: z.ZodOptional<z.ZodString>;
210
210
  /** Ordered, PRIMARY FIRST — see rule 2 above {@link ACCOUNT_CATEGORY_IDS}. */
211
211
  accountCategories: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["news", "politics", "business", "startup", "finance", "crypto", "marketplace", "retail", "real_estate", "agency", "landlord", "cooperative", "architecture", "technology", "software", "ai", "security", "automation", "science", "education", "books", "health", "fitness", "sports", "gaming", "music", "film", "podcast", "art", "photography", "comedy", "food", "travel", "fashion", "home_garden", "diy", "automotive", "animals", "family", "nonprofit", "government", "community", "activism", "environment", "religion", "other"]>, "many">, ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[], ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[]>>;
212
+ /**
213
+ * Create the account already opted OUT of discovery.
214
+ *
215
+ * ## Why this belongs at CREATION and not only on the privacy route
216
+ *
217
+ * Every account is born discoverable: the column defaults to `false` and
218
+ * nothing on the create path wrote it, so a new account appears in people
219
+ * search the instant it exists. For a human signing themselves up that is the
220
+ * right default and it is NOT changed here. For an account a program creates
221
+ * on someone's behalf — an agent, an unlaunched project, an organization for
222
+ * something not yet announced — it publishes the thing before its owner ever
223
+ * decided to.
224
+ *
225
+ * The alternative is a second call right after create, which is a window in
226
+ * which the account IS public, and a window whose closing depends on a second
227
+ * request succeeding. A field here has neither: one statement, one row, born
228
+ * in the state the caller asked for.
229
+ *
230
+ * ## It reuses the existing flag deliberately
231
+ *
232
+ * This is `privacy_is_private_account`, the same one `PUT /users/:id/privacy`
233
+ * toggles — not a new "published" column. A second visibility flag would be a
234
+ * second source of truth for one question, and the two would disagree.
235
+ *
236
+ * Inherited semantics, stated because reusing a flag means inheriting ALL of
237
+ * it: the account is kept out of people search, out of the follow-graph lists
238
+ * (`followers` / `following` / `mutuals`), out of `/similar` and out of the
239
+ * recommendation candidate pools, and its non-public, non-unlisted media
240
+ * becomes follower-gated. It does NOT hide the profile from someone who knows
241
+ * the handle, and it carries NO follow-approval flow — following is immediate
242
+ * and unilateral whatever this says, so nothing here creates a request queue
243
+ * nobody attends.
244
+ *
245
+ * ## Not conditioned on `kind`, on purpose
246
+ *
247
+ * The same reasoning as `accountCategories` above: this object does not
248
+ * refine on kind, and an unlaunched organization has exactly the problem an
249
+ * unpublished agent does. The discovery predicate never reads `kind`, so the
250
+ * remedy must not either.
251
+ */
252
+ isPrivateAccount: z.ZodOptional<z.ZodBoolean>;
212
253
  }, "strip", z.ZodTypeAny, {
213
254
  kind: "organization" | "project" | "bot" | "channel";
214
255
  username: string;
@@ -222,6 +263,7 @@ export declare const createAccountRequestSchema: z.ZodObject<{
222
263
  avatar?: string | undefined;
223
264
  description?: string | undefined;
224
265
  accountCategories?: ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[] | undefined;
266
+ isPrivateAccount?: boolean | undefined;
225
267
  }, {
226
268
  kind: "organization" | "project" | "bot" | "channel";
227
269
  username: string;
@@ -235,5 +277,6 @@ export declare const createAccountRequestSchema: z.ZodObject<{
235
277
  avatar?: string | undefined;
236
278
  description?: string | undefined;
237
279
  accountCategories?: ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[] | undefined;
280
+ isPrivateAccount?: boolean | undefined;
238
281
  }>;
239
282
  export type CreateAccountRequest = z.infer<typeof createAccountRequestSchema>;
@@ -77,13 +77,15 @@ export { routingTargetSchema, routingPolicyScopeSchema, routingFallbackPolicySch
77
77
  export type { RoutingTarget, RoutingPolicyScope, RoutingFallbackPolicy, RoutingPolicy, RoutingPolicyReference, AuthorizedRoute, } from './inference/routingPolicy';
78
78
  export { aliaReleaseArtifactSchema, aliaReleaseSignatureSchema, aliaModelReleaseManifestSchema, } from './inference/aliaModelRelease';
79
79
  export type { AliaReleaseArtifact, AliaReleaseSignature, AliaModelReleaseManifest, } from './inference/aliaModelRelease';
80
+ export { modelDistributionMethodSchema, modelSystemicRiskTierSchema, trainingComputeFlopsSchema, SYSTEMIC_RISK_COMPUTE_THRESHOLD_FLOPS, modelDownstreamDocumentationSchema, modelGpaiDocumentationSchema, modelLineDeclarationSchema, modelReleaseIngestionRequestSchema, modelReleaseIngestionResultSchema, modelDocumentationSchema, } from './inference/modelDocumentation';
81
+ export type { ModelDistributionMethod, ModelSystemicRiskTier, ModelDownstreamDocumentation, ModelGpaiDocumentation, ModelLineDeclaration, ModelReleaseIngestionRequest, ModelReleaseIngestionResult, ModelDocumentation, } from './inference/modelDocumentation';
80
82
  export { inferenceContentSourceSchema, inferenceContentPartSchema, inferenceToolCallSchema, inferenceMessageRoleSchema, inferenceMessageSchema, inferenceInputSchema, samplingParametersSchema, toolDefinitionSchema, toolChoiceSchema, responseFormatSchema, clientRequestMetadataSchema, inferenceRequestSchema, } from './inference/request';
81
83
  export type { InferenceContentSource, InferenceContentPart, InferenceToolCall, InferenceMessageRole, InferenceMessage, InferenceInput, SamplingParameters, ToolDefinition, ToolChoice, ResponseFormat, ClientRequestMetadata, InferenceRequest, } from './inference/request';
82
84
  export { inferenceStreamStartEventSchema, inferenceStreamDeltaEventSchema, inferenceStreamToolCallEventSchema, inferenceStreamUsageEventSchema, inferenceRouteSwitchDetailSchema, inferenceRouteSwitchReasonSchema, inferenceStreamRouteSwitchEventSchema, inferenceStreamErrorEventSchema, inferenceFinishReasonSchema, inferenceStreamDoneEventSchema, inferenceStreamEventSchema, } from './inference/streamEvents';
83
85
  export type { InferenceStreamStartEvent, InferenceStreamDeltaEvent, InferenceStreamToolCallEvent, InferenceStreamUsageEvent, InferenceRouteSwitchDetail, InferenceRouteSwitchReason, InferenceStreamRouteSwitchEvent, InferenceStreamErrorEvent, InferenceFinishReason, InferenceStreamDoneEvent, InferenceStreamEvent, } from './inference/streamEvents';
84
86
  export { usageReservationRequestSchema, usageReservationStatusSchema, usageReservationSchema, inferenceRequestOutcomeSchema, normalizedUsageReportSchema, usageReceiptSchema, usageRefundSubjectSchema, usageRefundReasonSchema, usageRefundSchema, } from './inference/usage';
85
87
  export type { UsageReservationRequest, UsageReservationStatus, UsageReservation, InferenceRequestOutcome, NormalizedUsageReport, UsageReceipt, UsageRefundSubject, UsageRefundReason, UsageRefund, } from './inference/usage';
86
- export { providerConnectionScopeSchema, providerSecretReferenceSchema, providerConnectionValidationSchema, providerConnectionStatusSchema, providerConnectionSchema, } from './inference/providerConnection';
88
+ export { PROVIDER_SECRET_REFERENCE_NAMESPACE, providerConnectionScopeSchema, providerSecretReferenceSchema, providerConnectionValidationSchema, providerConnectionStatusSchema, providerConnectionSchema, } from './inference/providerConnection';
87
89
  export type { ProviderConnectionScope, ProviderConnectionValidation, ProviderConnectionStatus, ProviderConnection, } from './inference/providerConnection';
88
90
  export { BILLING_MODES, billingModeSchema, BILLING_PROFILE_STATUSES, billingProfileStatusSchema, autoRechargeSchema, billingProfileSchema, accountBillingStateSchema, BILLING_INVOICE_STATUSES, billingInvoiceStatusSchema, billingInvoiceSchema, EXTERNAL_PAYMENT_PROVIDERS, externalPaymentProviderSchema, EXTERNAL_PAYMENT_KINDS, externalPaymentKindSchema, externalPaymentSchema, AUTO_RECHARGE_STATUSES, autoRechargeStatusSchema, autoRechargeAttemptSchema, RECONCILIATION_DISCREPANCY_KINDS, reconciliationDiscrepancyKindSchema, RECONCILIATION_RUN_STATUSES, reconciliationRunStatusSchema, reconciliationDiscrepancySchema, reconciliationRunSchema, reconciliationReportSchema, } from './inference/accountBilling';
89
91
  export type { BillingMode, BillingProfileStatus, AutoRecharge, BillingProfile, AccountBillingState, BillingInvoiceStatus, BillingInvoice, ExternalPaymentProvider, ExternalPaymentKind, ExternalPayment, AutoRechargeStatus, AutoRechargeAttempt, ReconciliationDiscrepancyKind, ReconciliationRunStatus, ReconciliationDiscrepancy, ReconciliationRun, ReconciliationReport, } from './inference/accountBilling';
@@ -35,14 +35,22 @@
35
35
  * bounded: ingestion is a release-time operation an operator retries once Oxy
36
36
  * takes the newer contract, not a served request that becomes unsettleable.
37
37
  *
38
- * ## What is deliberately NOT here
38
+ * ## The ingestion path, which this file used to say did not exist
39
+ *
40
+ * It does now: `POST /inference/admin/model-releases`, defined by
41
+ * `modelReleaseIngestionRequestSchema` in `modelDocumentation.ts`. This shape is
42
+ * unchanged — the request COMPOSES it, alongside two records that are Oxy's own
43
+ * rather than the signer's (the GPAI documentation and the capability sheet a
44
+ * manifest does not carry), precisely so the bytes a signature covers stay
45
+ * exactly the bytes described here.
39
46
  *
40
- * **No HTTP write path.** The catalogue's emptiness is currently a safety
41
- * property `scripts/seed-inference-catalogue.ts` refuses to invent a licence
42
- * or a retention flag because "a plausible invented value in a catalogue is
43
- * worse than an absent one" and a staff write path into it with nothing to
44
- * ingest is an unexercised hazard. The schema lands; the endpoint waits for a
45
- * real manifest to ingest.
47
+ * The earlier objection was that a staff write path into an empty catalogue is
48
+ * an unexercised hazard. What answers it is containment rather than emptiness: an
49
+ * ingested revision lands with `is_current = false` and no deployment, so nothing
50
+ * it creates is servable or listed, and a route still needs an approved
51
+ * contract/legal review before any customer can select it.
52
+ *
53
+ * ## What is deliberately NOT here
46
54
  *
47
55
  * **No `payloadDigest` field.** The signature is over the canonical
48
56
  * serialization of this manifest with `signatures` removed, and a verifier
@@ -64,7 +72,11 @@
64
72
  * custody, rotation and revocation consequences. So `keyId` is an OPAQUE
65
73
  * identifier and this file names no registry that resolves it: either answer
66
74
  * fits, and neither is presupposed. Until it is answered a manifest can be
67
- * parsed and cannot be verified, which is the second reason no endpoint ships.
75
+ * parsed and cannot be VERIFIED, so the ingestion path records no verification
76
+ * finding at all: it stores the signatures and the manifest as received, and the
77
+ * authority for the ingest is the staff member who performed it. A nullable
78
+ * `verified` column nothing ever writes would read, to whoever scanned the table
79
+ * later, as a check that ran.
68
80
  *
69
81
  * Decided in: docs/adr/0008-catalogue-concept-separation.md,
70
82
  * docs/adr/0017-authorized-routes-in-the-envelope.md, issue #972 §12.