@deepraxis/sdk 0.1.0-dev.ce6682e → 0.1.0-dev.d0f5f8e

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.
@@ -0,0 +1,17 @@
1
+ import type { Transport } from '../core/transport.js';
2
+ export interface CountInput {
3
+ /** Database ID from database list/create; not its display name. */
4
+ database_id: string;
5
+ /** Existing table name or ID from the database table APIs. */
6
+ table: string;
7
+ /** PostgREST query filters, as in databaseSelect; omitted means all rows. */
8
+ filters?: Record<string, string>;
9
+ /** exact counts within budget (default); filtered planned returns null; estimated may return null over budget. Unfiltered counts are exact in every mode. */
10
+ count?: 'exact' | 'planned' | 'estimated';
11
+ }
12
+ export interface CountResult {
13
+ /** Matching total, or null when the server reports an unknown total. */
14
+ count: number | null;
15
+ }
16
+ /** Count matching rows without retrieving row data. */
17
+ export declare function count(transport: Pick<Transport, 'requestWithResponse'>, input: CountInput): Promise<CountResult>;
@@ -0,0 +1,11 @@
1
+ import { databaseHead } from "../generated/sdk.gen.js";
2
+ /** Count matching rows without retrieving row data. */
3
+ export async function count(transport, input) {
4
+ const { response } = await transport.requestWithResponse(databaseHead, {
5
+ path: { database_id: input.database_id, table: input.table },
6
+ query: input.filters,
7
+ headers: { Prefer: `count=${input.count ?? 'exact'}` },
8
+ });
9
+ const total = response.headers.get('Content-Range')?.split('/')[1];
10
+ return { count: total === undefined || total === '*' ? null : Number(total) };
11
+ }
@@ -0,0 +1,24 @@
1
+ import type { Praxis } from '../core/client.js';
2
+ import type { OwnFileOpenAiFile } from '../generated/types.gen.js';
3
+ export interface UploadFileOptions {
4
+ /** user_data for conversation attachments; assistants for assistant files; vision for PNG/JPEG/GIF/WebP. */
5
+ purpose: 'user_data' | 'assistants' | 'vision';
6
+ /** Defaults to File.name, or upload for a Blob. */
7
+ filename?: string;
8
+ /** Fixed part size in bytes, 5 MiB–64 MB; defaults to 50 MiB. */
9
+ partSize?: number;
10
+ /** Concurrent part requests, a positive integer; defaults to 3. */
11
+ concurrency?: number;
12
+ /** Aborts outstanding requests and cancels an unfinished Upload. */
13
+ signal?: AbortSignal;
14
+ /** Acknowledged byte fraction, 0–1. A value of 1 does not imply processing has finished. */
15
+ onProgress?: (fraction: number) => void;
16
+ }
17
+ export type UploadedFile = OwnFileOpenAiFile;
18
+ /** Upload a nonempty file up to 2 GiB, returning only after processing reaches active.
19
+ * Files up to 32 MiB use one request; larger files use fixed-size Uploads parts.
20
+ * Parts and complete each retry transient failures at most five times with exponential backoff.
21
+ * A terminal failure or abort cancels the Upload. Completed files cannot be cancelled;
22
+ * if abort occurs during processing, delete the resulting file explicitly if no longer needed.
23
+ */
24
+ export declare function uploadFile(client: Pick<Praxis, 'file'>, file: Blob | File, options: UploadFileOptions): Promise<UploadedFile>;
@@ -0,0 +1,113 @@
1
+ import { PraxisError, PraxisConnectionError, PraxisTimeoutError } from "../core/errors.js";
2
+ import { sleep } from "../core/retry.js";
3
+ const MAX_RETRIES = 5;
4
+ function retryable(error) {
5
+ return error instanceof PraxisConnectionError || error instanceof PraxisTimeoutError
6
+ || error instanceof SyntaxError
7
+ || (error instanceof PraxisError && (error.status === 408 || error.status === 429 || (error.status !== undefined && error.status >= 500 && error.status <= 599)));
8
+ }
9
+ async function retry(signal, operation) {
10
+ for (let used = 0;; used++) {
11
+ signal.throwIfAborted();
12
+ try {
13
+ return await operation();
14
+ }
15
+ catch (error) {
16
+ signal.throwIfAborted();
17
+ if (used >= MAX_RETRIES || !retryable(error))
18
+ throw error;
19
+ await sleep(500 * 2 ** used, signal);
20
+ }
21
+ }
22
+ }
23
+ /** Upload a nonempty file up to 2 GiB, returning only after processing reaches active.
24
+ * Files up to 32 MiB use one request; larger files use fixed-size Uploads parts.
25
+ * Parts and complete each retry transient failures at most five times with exponential backoff.
26
+ * A terminal failure or abort cancels the Upload. Completed files cannot be cancelled;
27
+ * if abort occurs during processing, delete the resulting file explicitly if no longer needed.
28
+ */
29
+ export async function uploadFile(client, file, options) {
30
+ options.signal?.throwIfAborted();
31
+ if (file.size < 1 || file.size > 2 * 1024 ** 3)
32
+ throw new RangeError('File size must be 1 byte through 2 GiB');
33
+ const partSize = options.partSize ?? 50 * 1024 ** 2;
34
+ const concurrency = options.concurrency ?? 3;
35
+ if (!Number.isSafeInteger(partSize) || partSize < 5 * 1024 ** 2 || partSize > 64_000_000)
36
+ throw new RangeError('partSize must be an integer from 5242880 through 64000000');
37
+ if (!Number.isSafeInteger(concurrency) || concurrency < 1)
38
+ throw new RangeError('concurrency must be a positive integer');
39
+ const filename = options.filename ?? (typeof File !== 'undefined' && file instanceof File ? file.name : 'upload');
40
+ const work = new AbortController();
41
+ const abort = () => work.abort(options.signal?.reason);
42
+ options.signal?.addEventListener('abort', abort, { once: true });
43
+ const signal = work.signal;
44
+ const request = { signal, maxRetries: 0, timeoutMs: 120_000 };
45
+ let uploadId;
46
+ const active = async (initial) => {
47
+ let result = initial;
48
+ for (let polls = 0;; polls++) {
49
+ signal.throwIfAborted();
50
+ if (result.state === 'active')
51
+ return result;
52
+ if (result.state !== 'processing')
53
+ throw new PraxisError({ code: 'FILE_PROCESSING_FAILED', message: `File ${result.id} is not active (${result.state})` });
54
+ await sleep(Math.min(5000, 1000 * 2 ** polls), signal);
55
+ result = await retry(signal, () => client.file.files.retrieve({ path: { file_id: result.id }, ...request }));
56
+ }
57
+ };
58
+ try {
59
+ signal.throwIfAborted();
60
+ options.onProgress?.(0);
61
+ if (file.size <= 32 * 1024 ** 2) {
62
+ const result = await client.file.files.create({ body: { file: new File([file], filename, { type: file.type }), purpose: options.purpose }, ...request });
63
+ options.onProgress?.(1);
64
+ return await active(result);
65
+ }
66
+ const upload = await client.file.uploads.create({ body: { bytes: file.size, filename, mime_type: file.type || 'application/octet-stream', purpose: options.purpose, part_size: partSize }, ...request });
67
+ uploadId = upload.id;
68
+ signal.throwIfAborted();
69
+ const path = { upload_id: uploadId };
70
+ const count = Math.ceil(file.size / partSize);
71
+ const ids = new Array(count);
72
+ let cursor = 0, confirmed = 0;
73
+ const worker = async () => {
74
+ while (cursor < count) {
75
+ signal.throwIfAborted();
76
+ const index = cursor++;
77
+ const chunk = file.slice(index * partSize, Math.min(file.size, (index + 1) * partSize));
78
+ const part = await retry(signal, () => client.file.uploads.parts.create({ path, query: { part_number: index + 1 }, body: { data: new File([chunk], filename) }, ...request }));
79
+ ids[index] = part.id;
80
+ confirmed += chunk.size;
81
+ options.onProgress?.(confirmed / file.size);
82
+ }
83
+ };
84
+ const workers = Array.from({ length: Math.min(concurrency, count) }, worker);
85
+ try {
86
+ await Promise.all(workers);
87
+ }
88
+ catch (error) {
89
+ work.abort();
90
+ await Promise.allSettled(workers);
91
+ throw error;
92
+ }
93
+ const result = await retry(signal, () => client.file.uploads.complete({ path, body: { part_ids: ids }, ...request }));
94
+ if (result.error)
95
+ throw new PraxisError({ code: result.error.code, message: result.error.message });
96
+ if (result.status !== 'completed' || !result.file)
97
+ throw new PraxisError({ code: 'INVALID_RESPONSE', message: 'Complete did not return a completed Upload with a file' });
98
+ return await active(result.file);
99
+ }
100
+ catch (error) {
101
+ work.abort();
102
+ if (uploadId) {
103
+ // Cleanup uses its own timeout and must not inherit the aborted work signal.
104
+ await client.file.uploads.cancel({ path: { upload_id: uploadId }, maxRetries: 0, timeoutMs: 10_000 }).catch(() => { });
105
+ }
106
+ if (options.signal?.aborted)
107
+ throw options.signal.reason;
108
+ throw error;
109
+ }
110
+ finally {
111
+ options.signal?.removeEventListener('abort', abort);
112
+ }
113
+ }
package/dist/index.d.ts CHANGED
@@ -7,3 +7,7 @@ export { parseSSE } from './core/sse.js';
7
7
  export type { SSEEvent, SSEOptions } from './core/sse.js';
8
8
  export { publish } from './helpers/application-publish.js';
9
9
  export type { PublishInput, PublishResult, AssetsConfig } from './helpers/application-publish.js';
10
+ export { count } from './helpers/database-count.js';
11
+ export type { CountInput, CountResult } from './helpers/database-count.js';
12
+ export { uploadFile } from './helpers/file-upload.js';
13
+ export type { UploadFileOptions, UploadedFile } from './helpers/file-upload.js';
package/dist/index.js CHANGED
@@ -3,3 +3,5 @@ export { PraxisError, PraxisConnectionError, PraxisTimeoutError } from "./core/e
3
3
  export { Page } from "./core/pagination.js";
4
4
  export { parseSSE } from "./core/sse.js";
5
5
  export { publish } from "./helpers/application-publish.js";
6
+ export { count } from "./helpers/database-count.js";
7
+ export { uploadFile } from "./helpers/file-upload.js";
@@ -102,6 +102,24 @@ export declare const operations: readonly [{
102
102
  readonly itemType: "object";
103
103
  readonly required: false;
104
104
  readonly description: "Tool configurations available to the agent. Maximum of 128 tools\nacross all toolsets allowed.";
105
+ }, {
106
+ readonly name: "databases";
107
+ readonly type: "array";
108
+ readonly itemType: "object";
109
+ readonly required: false;
110
+ readonly description: "Database allowlist for platform resources accessible through service-agent codemode. Only kind=service accepts nonempty bindings; personal agents return 400. At most 20 bindings per resource type, with no duplicate ids. Newly added bindings apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Unbound resources return 404; writes to read_only resources are refused. Other platform APIs return 403, except public API discovery. Invalid bindings and unknown item fields return 400. Omit on create for no bindings.";
111
+ }, {
112
+ readonly name: "vector_stores";
113
+ readonly type: "array";
114
+ readonly itemType: "object";
115
+ readonly required: false;
116
+ readonly description: "Knowledge vector store allowlist for platform resources accessible through service-agent codemode. Only kind=service accepts nonempty bindings; personal agents return 400. At most 20 bindings per resource type, with no duplicate ids. Newly added bindings apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Unbound resources return 404; writes to read_only resources are refused. Other platform APIs return 403, except public API discovery. Invalid bindings and unknown item fields return 400. Omit on create for no bindings.";
117
+ }, {
118
+ readonly name: "files";
119
+ readonly type: "array";
120
+ readonly itemType: "object";
121
+ readonly required: false;
122
+ readonly description: "File allowlist for platform resources accessible through service-agent codemode. Only kind=service accepts nonempty bindings; personal agents return 400. At most 20 bindings per resource type, with no duplicate ids. Newly added bindings apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Unbound resources return 404; writes to read_only resources are refused. Other platform APIs return 403, except public API discovery. Invalid bindings and unknown item fields return 400. Omit on create for no bindings.";
105
123
  }, {
106
124
  readonly name: "kind";
107
125
  readonly type: "string";
@@ -236,6 +254,24 @@ export declare const operations: readonly [{
236
254
  readonly type: "number";
237
255
  readonly required: false;
238
256
  readonly description: "The agent's current version, used to prevent concurrent overwrites.\nObtain this value from a create or retrieve response. Must be at least 1 if\nspecified. When supplied, the request fails if it does not match the server's\ncurrent version; omit to apply the update unconditionally.";
257
+ }, {
258
+ readonly name: "databases";
259
+ readonly type: "array";
260
+ readonly itemType: "object";
261
+ readonly required: false;
262
+ readonly description: "Replace this resource allowlist; omission preserves it, and null or [] clears it. Additions apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Only service agents accept nonempty bindings.";
263
+ }, {
264
+ readonly name: "vector_stores";
265
+ readonly type: "array";
266
+ readonly itemType: "object";
267
+ readonly required: false;
268
+ readonly description: "Replace this resource allowlist; omission preserves it, and null or [] clears it. Additions apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Only service agents accept nonempty bindings.";
269
+ }, {
270
+ readonly name: "files";
271
+ readonly type: "array";
272
+ readonly itemType: "object";
273
+ readonly required: false;
274
+ readonly description: "Replace this resource allowlist; omission preserves it, and null or [] clears it. Additions apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Only service agents accept nonempty bindings.";
239
275
  }, {
240
276
  readonly name: "kind";
241
277
  readonly type: "string";
@@ -608,7 +644,7 @@ export declare const operations: readonly [{
608
644
  readonly resource: "agent.computers";
609
645
  readonly method: "connect";
610
646
  readonly summary: "Connect computer";
611
- readonly description: "Resume the computer and issue a sandbox connection.\n\nOwn-face extension: Managed Agents has no persistent Computer connection. Returns the public SDK sandbox_id, envd_access_token and template_id, plus the machine tier the computer is on now (light or heavy) and the lease that keeps it there (lease_id, lease_expires_at; lease_id is null when no lease exists). Keep the lease while the connection stays open: renew it about every 20 seconds (POST .../leases/{lease_id}/renew) and release it on close (DELETE .../leases/{lease_id}). An unrenewed lease simply expires, and the full machine is reclaimed only after that. Archived computers remain accessible; foreign or absent computers return 404. Never cache credentials.\n\nConnect to a computer with a caller-held lease. Omit the body or send {} to request light: the lightweight shell, or the heavy instance while it is running. Send {\"need\":\"heavy\"} to request full Linux for interactive programs; files are synchronized before the heavy connection is returned with tier heavy. Heavy running time counts toward the daily budget in seconds. Renew the lease while using the connection and release it with DELETE when finished. If the daily budget is exhausted, 429 COMPUTER_BUDGET_EXHAUSTED allows you to continue with need light.";
647
+ readonly description: "Resume the computer and issue a sandbox connection.\n\nOwn-face extension: Managed Agents has no persistent Computer connection. Returns the public SDK sandbox_id, envd_access_token and template_id, plus the machine tier the computer is on now (light or heavy) and the lease that keeps it there (lease_id, lease_expires_at; lease_id is null when no lease exists). Keep the lease while the connection stays open: renew it about every 20 seconds (POST .../leases/{lease_id}/renew) and release it on close (DELETE .../leases/{lease_id}). An unrenewed lease simply expires, and the full machine is reclaimed only after that. Archived computers remain accessible; foreign or absent computers return 404. Never cache credentials.\n\nConnect to a computer with a caller-held lease. Omit the body or send {} to request light: the lightweight shell, or the heavy instance while it is running. Send {\"need\":\"heavy\"} to request full Linux for interactive programs; files are synchronized before the heavy connection is returned with tier heavy. Renew the lease while using the connection and release it with DELETE when finished.";
612
648
  readonly http: "POST";
613
649
  readonly path: "/agent/v1/computers/{computer_id}/connect";
614
650
  readonly streaming: "no";
@@ -1442,7 +1478,7 @@ export declare const operations: readonly [{
1442
1478
  readonly resource: "agent.sessions";
1443
1479
  readonly method: "create";
1444
1480
  readonly summary: "Create session";
1445
- readonly description: "Create a session: one conversation with an agent, running on a machine. Pass agent as an agent id (latest version) or {id, version, type:\"agent\"}. Unlike Anthropic Managed Agents, omit environment_id to get a light machine, unless computer_id (explicit, or the agent's default) selects a Computer; pass environment_id for a sandbox recipe. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Inline agent overrides are not supported. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Omitted budget defaults to USD 20; null removes the limit, and a limit object uses a positive integer string of USD cents. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion.";
1481
+ readonly description: "Create a session: one conversation with an agent. Pass agent as an agent id (latest version) or {id, version, type:\"agent\"}. Unlike Anthropic Managed Agents, omit environment_id to get a light machine, unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. For service agents, omission returns environment_id=light; explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Inline agent overrides are not supported. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Omitted budget defaults to USD 20; null removes the limit, and a limit object uses a positive integer string of USD cents. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion.";
1446
1482
  readonly http: "POST";
1447
1483
  readonly path: "/agent/v1/sessions";
1448
1484
  readonly streaming: "no";
@@ -1460,7 +1496,7 @@ export declare const operations: readonly [{
1460
1496
  readonly name: "environment_id";
1461
1497
  readonly type: "string";
1462
1498
  readonly required: false;
1463
- readonly description: "ID of the `environment` defining the container configuration for\nthis session.";
1499
+ readonly description: "Execution environment id from agent.environments.list or agent.environments.create. For a service agent, omission selects the built-in light environment and returns session.environment_id=light; explicit null allocates no machine and makes machine tools, including codemode and bash, unavailable. Personal agents use their selected Computer.";
1464
1500
  }, {
1465
1501
  readonly name: "budget";
1466
1502
  readonly type: "object";
@@ -5502,7 +5538,7 @@ export declare const operations: readonly [{
5502
5538
  readonly name: "{column}";
5503
5539
  readonly type: "string";
5504
5540
  readonly required: false;
5505
- readonly description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. See the filter operator matrix.";
5541
+ readonly description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported.";
5506
5542
  }, {
5507
5543
  readonly name: "and";
5508
5544
  readonly type: "string";
@@ -5542,7 +5578,7 @@ export declare const operations: readonly [{
5542
5578
  readonly name: "on_conflict";
5543
5579
  readonly type: "string";
5544
5580
  readonly required: false;
5545
- readonly description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id.";
5581
+ readonly description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id.";
5546
5582
  }, {
5547
5583
  readonly name: "columns";
5548
5584
  readonly type: "string";
@@ -5553,7 +5589,7 @@ export declare const operations: readonly [{
5553
5589
  readonly resource: "database.databases.rest";
5554
5590
  readonly method: "retrieve";
5555
5591
  readonly summary: "Select rows";
5556
- readonly description: "Read matching rows with filters, selected columns and ordering. Returns at most 1000 rows per request, including when limit is omitted. Content-Range reports the actual returned interval and the total when count is requested. PATCH and DELETE are not subject to this read cap. Unlike Supabase, casts, aggregates, spread and join modifiers are unsupported. Each table supports up to 1,000,000 rows. Query budget: 8,000 ms with a shared 3,000,000-row safety ceiling. Create indexes on filtered or sorted fields, or narrow the request when it exceeds its budget. Synchronous SQLite aggregates use candidate-row throughput estimates before execution; deployed Workers freeze clocks during synchronous CPU work, so the timer is not a guaranteed server-side interrupt. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24/*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Error table: QUERY_CANCELED / PostgREST 57014 is HTTP 500, retryable=false: Query timed out: index filtered or sorted fields, or narrow the range. DATABASE_INVALID_STATE is HTTP 409 for operations on a deleting database. Cleared or nonexistent databases return DATABASE_NOT_FOUND / HTTP 404. The count is an HTTP Content-Range response header, not a JSON property. Praxis SDK/codemode methods return the body only; a page length is not a total unless you know all matches fit in that page.";
5592
+ readonly description: "Read matching rows with filters, selected columns and ordering. Returns at most 1000 rows per request, including when limit is omitted. Content-Range reports the actual returned interval and the total when count is requested. PATCH and DELETE are not subject to this read cap. Unlike Supabase, casts, aggregates, spread and join modifiers are unsupported. Each table supports up to 1,000,000 rows. Query budget: 8,000 ms with a shared 3,000,000-row safety ceiling. Create indexes on filtered or sorted fields, or narrow the request when it exceeds its budget. Synchronous SQLite aggregates use candidate-row throughput estimates before execution; deployed Workers freeze clocks during synchronous CPU work, so the timer is not a guaranteed server-side interrupt. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24/*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Error table: QUERY_CANCELED / PostgREST 57014 is HTTP 500, retryable=false: Query timed out: index filtered or sorted fields, or narrow the range. DATABASE_INVALID_STATE is HTTP 409 for operations on a deleting database. Cleared or nonexistent databases return DATABASE_NOT_FOUND / HTTP 404. The count is an HTTP Content-Range response header, not a JSON property. Use praxis.database.count in the SDK or codemode to return { count: number | null }; a page length is not a total unless you know all matches fit in that page.";
5557
5593
  readonly http: "GET";
5558
5594
  readonly path: "/database/v1/databases/{database_id}/rest/{table}";
5559
5595
  readonly streaming: "no";
@@ -5574,7 +5610,7 @@ export declare const operations: readonly [{
5574
5610
  readonly name: "{column}";
5575
5611
  readonly type: "string";
5576
5612
  readonly required: false;
5577
- readonly description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. See the filter operator matrix.";
5613
+ readonly description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported.";
5578
5614
  }, {
5579
5615
  readonly name: "and";
5580
5616
  readonly type: "string";
@@ -5614,7 +5650,7 @@ export declare const operations: readonly [{
5614
5650
  readonly name: "on_conflict";
5615
5651
  readonly type: "string";
5616
5652
  readonly required: false;
5617
- readonly description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id.";
5653
+ readonly description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id.";
5618
5654
  }, {
5619
5655
  readonly name: "columns";
5620
5656
  readonly type: "string";
@@ -5625,7 +5661,7 @@ export declare const operations: readonly [{
5625
5661
  readonly resource: "database.databases.rest";
5626
5662
  readonly method: "head";
5627
5663
  readonly summary: "Count rows";
5628
- readonly description: "Inspect the HTTP row count and range without retrieving row data; send Prefer: count=exact for a filtered count. Returns no body and does not fetch or serialize row data. A known count determines the interval using limit/offset or Range with a default and maximum page size of 1000. Without a count preference, or when the selected count mode cannot supply a total, Content-Range is */*. Singular Accept still validates page cardinality. Unlike Supabase, planned and estimated counts do not use PostgreSQL planner estimates. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24/*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Praxis SDK/codemode methods return only the empty body, not the Content-Range response header; use an HTTP client when you need that header.";
5664
+ readonly description: "Inspect the HTTP row count and range without retrieving row data; send Prefer: count=exact for a filtered count. Returns no body and does not fetch or serialize row data. A known count determines the interval using limit/offset or Range with a default and maximum page size of 1000. Without a count preference, or when the selected count mode cannot supply a total, Content-Range is */*. Singular Accept still validates page cardinality. Unlike Supabase, planned and estimated counts do not use PostgreSQL planner estimates. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24/*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Use praxis.database.count in the SDK or codemode to return { count: number | null } from this header without retrieving rows.";
5629
5665
  readonly http: "HEAD";
5630
5666
  readonly path: "/database/v1/databases/{database_id}/rest/{table}";
5631
5667
  readonly streaming: "no";
@@ -5646,7 +5682,7 @@ export declare const operations: readonly [{
5646
5682
  readonly name: "{column}";
5647
5683
  readonly type: "string";
5648
5684
  readonly required: false;
5649
- readonly description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. See the filter operator matrix.";
5685
+ readonly description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported.";
5650
5686
  }, {
5651
5687
  readonly name: "and";
5652
5688
  readonly type: "string";
@@ -5686,7 +5722,7 @@ export declare const operations: readonly [{
5686
5722
  readonly name: "on_conflict";
5687
5723
  readonly type: "string";
5688
5724
  readonly required: false;
5689
- readonly description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id.";
5725
+ readonly description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id.";
5690
5726
  }, {
5691
5727
  readonly name: "columns";
5692
5728
  readonly type: "string";
@@ -5718,7 +5754,7 @@ export declare const operations: readonly [{
5718
5754
  readonly name: "{column}";
5719
5755
  readonly type: "string";
5720
5756
  readonly required: false;
5721
- readonly description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. See the filter operator matrix.";
5757
+ readonly description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported.";
5722
5758
  }, {
5723
5759
  readonly name: "and";
5724
5760
  readonly type: "string";
@@ -5758,7 +5794,7 @@ export declare const operations: readonly [{
5758
5794
  readonly name: "on_conflict";
5759
5795
  readonly type: "string";
5760
5796
  readonly required: false;
5761
- readonly description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id.";
5797
+ readonly description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id.";
5762
5798
  }, {
5763
5799
  readonly name: "columns";
5764
5800
  readonly type: "string";
@@ -5773,7 +5809,7 @@ export declare const operations: readonly [{
5773
5809
  readonly resource: "database.databases.rest";
5774
5810
  readonly method: "create";
5775
5811
  readonly summary: "Insert rows";
5776
- readonly description: "Insert rows into an existing table after defining its fields; at most 500 rows per request. Each request is atomic: any failure rolls back the entire batch. There are no transactions across requests.\nRows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.\nThe default is return=minimal: success returns HTTP 201 with an empty body. Send Prefer: return=representation to return the inserted rows. Unlike Supabase, upsert conflicts can target only id or one unique field, not a composite key. Each table supports up to 1,000,000 rows.";
5812
+ readonly description: "Insert rows into an existing table after defining its fields; at most 500 rows per request. Each request is atomic: any failure rolls back the entire batch. There are no transactions across requests.\nRows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.\nThe default is return=minimal: success returns HTTP 201 with an empty body. Send Prefer: return=representation to return the inserted rows. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. Unlike Supabase, upsert conflicts can target only id or one unique field, not a composite key. Each table supports up to 1,000,000 rows.";
5777
5813
  readonly http: "POST";
5778
5814
  readonly path: "/database/v1/databases/{database_id}/rest/{table}";
5779
5815
  readonly streaming: "no";
@@ -5794,7 +5830,7 @@ export declare const operations: readonly [{
5794
5830
  readonly name: "{column}";
5795
5831
  readonly type: "string";
5796
5832
  readonly required: false;
5797
- readonly description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. See the filter operator matrix.";
5833
+ readonly description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported.";
5798
5834
  }, {
5799
5835
  readonly name: "and";
5800
5836
  readonly type: "string";
@@ -5834,7 +5870,7 @@ export declare const operations: readonly [{
5834
5870
  readonly name: "on_conflict";
5835
5871
  readonly type: "string";
5836
5872
  readonly required: false;
5837
- readonly description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id.";
5873
+ readonly description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id.";
5838
5874
  }, {
5839
5875
  readonly name: "columns";
5840
5876
  readonly type: "string";
@@ -5877,7 +5913,7 @@ export declare const operations: readonly [{
5877
5913
  readonly resource: "database.databases.tables";
5878
5914
  readonly method: "create";
5879
5915
  readonly summary: "Create table";
5880
- readonly description: "Creates a table together with its initial fields in one call and returns it (HTTP 201) with generated tbl_ and fld_ ids. name must match ^[a-z_][a-z0-9_]{0,62}$ and be unused in this database (duplicate: 409 UNIQUE_VIOLATION). fields is required and may be an empty array; fields can also be added later with databaseAddField. Limits: 50 tables per database, 64 fields per table, and 16 indexed or unique fields per table; exceeding one returns 400 LIMIT_EXCEEDED. Every row also has a system id column, which is not declared as a field. Insert data afterwards with databaseInsert. Unlike Supabase, define schema with this table API and the field APIs; PostgreSQL DDL and SQL migration files cannot be submitted. Each table supports up to 1,000,000 rows.";
5916
+ readonly description: "Creates a table together with its initial fields in one call and returns it (HTTP 201) with generated tbl_ and fld_ ids. name must match ^[a-z_][a-z0-9_]{0,62}$ and be unused in this database (duplicate: 409 UNIQUE_VIOLATION). fields is required and may be an empty array; fields can also be added later with databaseAddField. Limits: 50 tables per database, 64 fields per table, and 16 indexed or unique fields per table; exceeding one returns 400 LIMIT_EXCEEDED. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {\"name\":\"notes\",\"type\":\"string\",\"indexed\":false}. Every row also has a system id column, which is not declared as a field. Insert data afterwards with databaseInsert. Unlike Supabase, define schema with this table API and the field APIs; PostgreSQL DDL and SQL migration files cannot be submitted. Each table supports up to 1,000,000 rows.";
5881
5917
  readonly http: "POST";
5882
5918
  readonly path: "/database/v1/databases/{database_id}/tables";
5883
5919
  readonly streaming: "no";
@@ -5976,7 +6012,7 @@ export declare const operations: readonly [{
5976
6012
  readonly resource: "database.databases.tables.fields";
5977
6013
  readonly method: "create";
5978
6014
  readonly summary: "Add field";
5979
- readonly description: "Adds one field to an existing table and returns the updated table (HTTP 201). Required inputs are name (lowercase letters, digits and underscores; id and names starting with _ are reserved) and type (string, integer, number, boolean, datetime, json or link); json needs options.schema and link needs options.linked_table_id and options.multiple. Adding a required field to a table that already has rows needs a default, otherwise the call fails with 400 VALIDATION_FAILED; a default is written into every existing row. Scalar fields are indexed by default, while json and link fields cannot be indexed. Limits: 64 fields and 16 indexed or unique fields per table (400 LIMIT_EXCEEDED). Unlike Supabase, schema evolution uses field definitions rather than ALTER TABLE statements or SQL migrations.";
6015
+ readonly description: "Adds one field to an existing table and returns the updated table (HTTP 201). Required inputs are name (lowercase letters, digits and underscores; id and names starting with _ are reserved) and type (string, integer, number, boolean, datetime, json or link); json needs options.schema and link needs options.linked_table_id and options.multiple. Adding a required field to a table that already has rows needs a default, otherwise the call fails with 400 VALIDATION_FAILED; a default is written into every existing row. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {\"name\":\"notes\",\"type\":\"string\",\"indexed\":false}. JSON and link fields cannot be indexed. Limits: 64 fields and 16 indexed or unique fields per table (400 LIMIT_EXCEEDED). Unlike Supabase, schema evolution uses field definitions rather than ALTER TABLE statements or SQL migrations.";
5980
6016
  readonly http: "POST";
5981
6017
  readonly path: "/database/v1/databases/{database_id}/tables/{table}/fields";
5982
6018
  readonly streaming: "no";
@@ -6113,7 +6149,7 @@ export declare const operations: readonly [{
6113
6149
  readonly resource: "file.files";
6114
6150
  readonly method: "create";
6115
6151
  readonly summary: "Upload file";
6116
- readonly description: "Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 104857600 bytes, and only user_data, assistants and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File([\"Return within 23 days.\"], \"policy.txt\", { type: \"text/plain\" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. OpenAI Uploads chunking is not supported. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–2592000), or praxis[expires_in_seconds] (3600–7776000), never both. Without expiry, the file persists until deleted.";
6152
+ readonly description: "Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data, assistants and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File([\"Return within 23 days.\"], \"policy.txt\", { type: \"text/plain\" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–2592000), or praxis[expires_in_seconds] (3600–7776000), never both. Without expiry, the file persists until deleted.";
6117
6153
  readonly http: "POST";
6118
6154
  readonly path: "/file/v1/files";
6119
6155
  readonly streaming: "no";
@@ -6127,7 +6163,7 @@ export declare const operations: readonly [{
6127
6163
  readonly name: "file";
6128
6164
  readonly type: "string";
6129
6165
  readonly required: true;
6130
- readonly description: "File bytes in one multipart file part, not a filename or file ID. The file must be nonempty and at most 104857600 bytes; its content determines the MIME type.";
6166
+ readonly description: "File bytes in one multipart file part, not a filename or file ID. The file must be nonempty and at most 100000000 bytes; its content determines the MIME type.";
6131
6167
  }, {
6132
6168
  readonly name: "purpose";
6133
6169
  readonly type: "string";
@@ -6164,7 +6200,7 @@ export declare const operations: readonly [{
6164
6200
  readonly resource: "file.files";
6165
6201
  readonly method: "retrieve";
6166
6202
  readonly summary: "Retrieve file";
6167
- readonly description: "Retrieve metadata for a live file owned by your tenant. Use its file_dp_ ID from upload or list. Missing, deleted, expired and other-tenant files return 404; use the content endpoint to download the bytes.";
6203
+ readonly description: "Retrieve metadata for a live file owned by your tenant. Use its file- ID from upload or list. Missing, deleted, expired and other-tenant files return 404; use the content endpoint to download the bytes.";
6168
6204
  readonly http: "GET";
6169
6205
  readonly path: "/file/v1/files/{file_id}";
6170
6206
  readonly streaming: "no";
@@ -6178,7 +6214,7 @@ export declare const operations: readonly [{
6178
6214
  readonly resource: "file.files";
6179
6215
  readonly method: "retrieveContent";
6180
6216
  readonly summary: "Retrieve file content";
6181
- readonly description: "Download the original bytes of a live file owned by your tenant. Supply its file_dp_ ID from upload or list. A single byte Range can return a partial response; a range outside the file returns 416. Missing, deleted, expired and other-tenant files return 404.";
6217
+ readonly description: "Download the original bytes of a live file owned by your tenant. Supply its file- ID from upload or list. A single byte Range can return a partial response; a range outside the file returns 416. Missing, deleted, expired and other-tenant files return 404.";
6182
6218
  readonly http: "GET";
6183
6219
  readonly path: "/file/v1/files/{file_id}/content";
6184
6220
  readonly streaming: "no";
@@ -6188,6 +6224,124 @@ export declare const operations: readonly [{
6188
6224
  readonly sdkName: "file_id";
6189
6225
  }];
6190
6226
  readonly query: readonly [];
6227
+ }, {
6228
+ readonly resource: "file.uploads";
6229
+ readonly method: "create";
6230
+ readonly summary: "Create an upload";
6231
+ readonly description: "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data, assistants and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.";
6232
+ readonly http: "POST";
6233
+ readonly path: "/file/v1/uploads";
6234
+ readonly streaming: "no";
6235
+ readonly pagination: false;
6236
+ readonly pathParams: readonly [];
6237
+ readonly query: readonly [];
6238
+ readonly body: {
6239
+ readonly required: true;
6240
+ readonly fields: readonly [{
6241
+ readonly name: "bytes";
6242
+ readonly type: "integer";
6243
+ readonly required: true;
6244
+ readonly description: "Exact complete file length in bytes, from 1 through 2147483648 (2 GiB); the sum of completed parts must match.";
6245
+ }, {
6246
+ readonly name: "filename";
6247
+ readonly type: "string";
6248
+ readonly required: true;
6249
+ readonly description: "Filename for the resulting file, at most 255 UTF-8 bytes.";
6250
+ }, {
6251
+ readonly name: "mime_type";
6252
+ readonly type: "string";
6253
+ readonly required: true;
6254
+ readonly description: "Declared MIME type; validated against the assembled content.";
6255
+ }, {
6256
+ readonly name: "purpose";
6257
+ readonly type: "string";
6258
+ readonly enum: readonly ["user_data", "assistants", "vision"];
6259
+ readonly required: true;
6260
+ readonly description: "Use user_data for conversation attachments, assistants for assistant files, or vision for PNG, JPEG, GIF and WebP images.";
6261
+ }, {
6262
+ readonly name: "expires_after";
6263
+ readonly type: "object";
6264
+ readonly required: false;
6265
+ readonly description: "Optional expiry policy for the resulting file; omission retains the file until deletion.";
6266
+ }, {
6267
+ readonly name: "part_size";
6268
+ readonly type: "integer";
6269
+ readonly required: false;
6270
+ readonly description: "Optional fixed part size in bytes, 5242880–64000000. Requires part_number on every part; retries of identical bytes at the same number return the same part. Omit to use arbitrary-sized parts.";
6271
+ }];
6272
+ };
6273
+ }, {
6274
+ readonly resource: "file.uploads";
6275
+ readonly method: "cancel";
6276
+ readonly summary: "Cancel an upload";
6277
+ readonly description: "Cancel an unfinished upload using upload_id from create and release its reserved storage. Further parts and completion are rejected. Cancelling an already cancelled upload returns the same terminal result; a completed upload cannot be cancelled. Delete its resulting file instead.";
6278
+ readonly http: "POST";
6279
+ readonly path: "/file/v1/uploads/{upload_id}/cancel";
6280
+ readonly streaming: "no";
6281
+ readonly pagination: false;
6282
+ readonly pathParams: readonly [{
6283
+ readonly name: "upload_id";
6284
+ readonly sdkName: "upload_id";
6285
+ }];
6286
+ readonly query: readonly [];
6287
+ }, {
6288
+ readonly resource: "file.uploads";
6289
+ readonly method: "complete";
6290
+ readonly summary: "Complete an upload";
6291
+ readonly description: "Assemble the uploaded parts into a file. Supply upload_id from create and part_ids from addPart in file byte order; their sizes must total the declared bytes. Optional md5 verifies the assembled content. Retrying identical part_ids and normalized md5 returns the same result; different inputs return 409. Unlike OpenAI, completed can contain a file still processing (status uploaded). Poll files.retrieve using file.id until status processed (own face state active); error, expiry or 404 means processing failed and the file cannot be used.";
6292
+ readonly http: "POST";
6293
+ readonly path: "/file/v1/uploads/{upload_id}/complete";
6294
+ readonly streaming: "no";
6295
+ readonly pagination: false;
6296
+ readonly pathParams: readonly [{
6297
+ readonly name: "upload_id";
6298
+ readonly sdkName: "upload_id";
6299
+ }];
6300
+ readonly query: readonly [];
6301
+ readonly body: {
6302
+ readonly required: true;
6303
+ readonly fields: readonly [{
6304
+ readonly name: "part_ids";
6305
+ readonly type: "array";
6306
+ readonly itemType: "string";
6307
+ readonly required: true;
6308
+ readonly description: "All part IDs in concatenation order, without duplicates. Fixed-size uploads require increasing part_number order.";
6309
+ }, {
6310
+ readonly name: "md5";
6311
+ readonly type: "string";
6312
+ readonly required: false;
6313
+ readonly description: "Optional whole-file MD5 as 32 hexadecimal characters; verified after assembly.";
6314
+ }];
6315
+ };
6316
+ }, {
6317
+ readonly resource: "file.uploads.parts";
6318
+ readonly method: "create";
6319
+ readonly summary: "Add an upload part";
6320
+ readonly description: "Send one nonempty part as the multipart data field, at most 64000000 bytes. Parts may arrive concurrently in any order. Use upload_id from create. For a fixed-size upload, supply part_number starting at 1 and exactly part_size bytes except for the final remainder; retry the same number with identical bytes to recover its part ID. Without part_size, each request creates a new part and part_number is ignored. Save the returned part IDs for complete.";
6321
+ readonly http: "POST";
6322
+ readonly path: "/file/v1/uploads/{upload_id}/parts";
6323
+ readonly streaming: "no";
6324
+ readonly pagination: false;
6325
+ readonly multipart: true;
6326
+ readonly pathParams: readonly [{
6327
+ readonly name: "upload_id";
6328
+ readonly sdkName: "upload_id";
6329
+ }];
6330
+ readonly query: readonly [{
6331
+ readonly name: "part_number";
6332
+ readonly type: "integer";
6333
+ readonly required: false;
6334
+ readonly description: "Required when create set part_size; 1 through ceil(bytes / part_size). Ignored for general uploads.";
6335
+ }];
6336
+ readonly body: {
6337
+ readonly required: true;
6338
+ readonly fields: readonly [{
6339
+ readonly name: "data";
6340
+ readonly type: "string";
6341
+ readonly required: true;
6342
+ readonly description: "Raw bytes of this part, nonempty and at most 64000000 bytes.";
6343
+ }];
6344
+ };
6191
6345
  }, {
6192
6346
  readonly resource: "knowledge.vectorStores";
6193
6347
  readonly method: "list";
@@ -9462,7 +9616,7 @@ export declare const operations: readonly [{
9462
9616
  readonly name: "message";
9463
9617
  readonly type: "string";
9464
9618
  readonly required: true;
9465
- readonly description: "Problem description and original error text; at most 4096 Unicode code points.";
9619
+ readonly description: "Problem description, at most 4096 Unicode code points; may be empty only when contexts.praxis.error.message is a non-empty string.";
9466
9620
  }, {
9467
9621
  readonly name: "contact_email";
9468
9622
  readonly type: "string";