@uru-intelligence/app 1.0.0 → 2.1.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.
@@ -0,0 +1,292 @@
1
+ /**
2
+ * Runtime Dataset boundary helpers.
3
+ *
4
+ * Dataset requests and responses cross an untyped HTTP boundary. This module
5
+ * validates the owned fields at that boundary and leaves provider payloads
6
+ * opaque unless the caller supplies a decoder.
7
+ */
8
+ import { UruAppRuntimeError } from "./errors.js";
9
+ import { isRuntimeJsonObject } from "./transport-json.js";
10
+ const hasOwn = (object, key) => Object.hasOwn(object, key);
11
+ const invalidResponse = (label, body, field) => {
12
+ const suffix = field === undefined ? "" : ` field: ${field}.`;
13
+ throw new UruAppRuntimeError(`Invalid ${label} response${suffix}`, {
14
+ body,
15
+ status: 0,
16
+ });
17
+ };
18
+ const responseObject = (value, label) => {
19
+ if (!isRuntimeJsonObject(value)) {
20
+ return invalidResponse(label, value);
21
+ }
22
+ return value;
23
+ };
24
+ const isUnknownArray = (value) => Array.isArray(value);
25
+ const requiredRows = (value, label) => {
26
+ if (!isUnknownArray(value)) {
27
+ return invalidResponse(label, value, "rows");
28
+ }
29
+ if (!isRuntimeJsonObject({ rows: value })) {
30
+ return invalidResponse(label, value, "rows");
31
+ }
32
+ const rows = [];
33
+ for (let index = 0; index < value.length; index += 1) {
34
+ const row = value[index];
35
+ if (!isRuntimeJsonObject(row)) {
36
+ return invalidResponse(label, value, `rows[${index}]`);
37
+ }
38
+ rows.push(row);
39
+ }
40
+ return rows;
41
+ };
42
+ const optionalNonNegativeInteger = (body, field, label) => {
43
+ if (!hasOwn(body, field)) {
44
+ return undefined;
45
+ }
46
+ const value = body[field];
47
+ if (typeof value !== "number" ||
48
+ !Number.isFinite(value) ||
49
+ !Number.isInteger(value) ||
50
+ value < 0) {
51
+ return invalidResponse(label, body, field);
52
+ }
53
+ return value;
54
+ };
55
+ const optionalTotal = (body, label) => {
56
+ if (!hasOwn(body, "total")) {
57
+ return undefined;
58
+ }
59
+ const value = body.total;
60
+ if (value === null) {
61
+ return null;
62
+ }
63
+ if (typeof value !== "number" ||
64
+ !Number.isFinite(value) ||
65
+ !Number.isInteger(value) ||
66
+ value < 0) {
67
+ return invalidResponse(label, body, "total");
68
+ }
69
+ return value;
70
+ };
71
+ const optionalNullableString = (body, field, label) => {
72
+ if (!hasOwn(body, field)) {
73
+ return undefined;
74
+ }
75
+ const value = body[field];
76
+ if (value === null || typeof value === "string") {
77
+ return value;
78
+ }
79
+ return invalidResponse(label, body, field);
80
+ };
81
+ const optionalNullableObject = (body, field, label) => {
82
+ if (!hasOwn(body, field)) {
83
+ return undefined;
84
+ }
85
+ const value = body[field];
86
+ if (value === null) {
87
+ return null;
88
+ }
89
+ if (isRuntimeJsonObject(value)) {
90
+ return value;
91
+ }
92
+ return invalidResponse(label, body, field);
93
+ };
94
+ const decodedRows = (value, decodeRow, label) => {
95
+ const rows = requiredRows(value, label);
96
+ const decoded = [];
97
+ for (const row of rows) {
98
+ decoded.push(decodeRow(row));
99
+ }
100
+ return decoded;
101
+ };
102
+ const rowsResultFields = (body, rows, label) => {
103
+ const output = { rows };
104
+ const total = optionalTotal(body, label);
105
+ if (total !== undefined) {
106
+ output.total = total;
107
+ }
108
+ const limit = optionalNonNegativeInteger(body, "limit", label);
109
+ if (limit !== undefined) {
110
+ output.limit = limit;
111
+ }
112
+ const offset = optionalNonNegativeInteger(body, "offset", label);
113
+ if (offset !== undefined) {
114
+ output.offset = offset;
115
+ }
116
+ const aggregates = optionalNullableObject(body, "aggregates", label);
117
+ if (aggregates !== undefined) {
118
+ output.aggregates = aggregates;
119
+ }
120
+ const nextCursor = optionalNullableString(body, "nextCursor", label);
121
+ if (nextCursor !== undefined) {
122
+ output.nextCursor = nextCursor;
123
+ }
124
+ const sourceMeta = optionalNullableObject(body, "sourceMeta", label);
125
+ if (sourceMeta !== undefined) {
126
+ output.sourceMeta = sourceMeta;
127
+ }
128
+ if (hasOwn(body, "source_meta")) {
129
+ return invalidResponse(label, body, "source_meta");
130
+ }
131
+ return output;
132
+ };
133
+ /** Decode a Dataset query page with a caller-owned row decoder. */
134
+ export const decodeDatasetRowsResult = (value, decodeRow) => {
135
+ const label = "Uru Dataset query";
136
+ const body = responseObject(value, label);
137
+ return rowsResultFields(body, decodedRows(body.rows, decodeRow, label), label);
138
+ };
139
+ /** Decode a Dataset query page while retaining validated JSON row objects. */
140
+ export const decodeDefaultDatasetRowsResult = (value) => {
141
+ const label = "Uru Dataset query";
142
+ const body = responseObject(value, label);
143
+ return rowsResultFields(body, [...requiredRows(body.rows, label)], label);
144
+ };
145
+ const requiredBoolean = (body, field, label) => {
146
+ const value = body[field];
147
+ if (typeof value !== "boolean") {
148
+ return invalidResponse(label, body, field);
149
+ }
150
+ return value;
151
+ };
152
+ const requiredString = (body, field, label) => {
153
+ const value = body[field];
154
+ if (typeof value !== "string") {
155
+ return invalidResponse(label, body, field);
156
+ }
157
+ return value;
158
+ };
159
+ /** Decode a Dataset mutation envelope with a caller-owned result decoder. */
160
+ export const decodeDatasetMutationResult = (value, decodeResult) => {
161
+ const label = "Uru Dataset mutation";
162
+ const body = responseObject(value, label);
163
+ const result = hasOwn(body, "result")
164
+ ? body.result
165
+ : invalidResponse(label, body, "result");
166
+ const output = {
167
+ ok: requiredBoolean(body, "ok", label),
168
+ operation: requiredString(body, "operation", label),
169
+ result: decodeResult(result),
170
+ };
171
+ const deploymentId = optionalNullableString(body, "deploymentId", label);
172
+ if (deploymentId !== undefined) {
173
+ if (deploymentId === null) {
174
+ return invalidResponse(label, body, "deploymentId");
175
+ }
176
+ output.deploymentId = deploymentId;
177
+ }
178
+ const datasetId = optionalNullableString(body, "datasetId", label);
179
+ if (datasetId !== undefined) {
180
+ output.datasetId = datasetId;
181
+ }
182
+ const diagnostics = optionalNullableObject(body, "diagnostics", label);
183
+ if (diagnostics !== undefined) {
184
+ if (diagnostics === null) {
185
+ return invalidResponse(label, body, "diagnostics");
186
+ }
187
+ output.diagnostics = diagnostics;
188
+ }
189
+ return output;
190
+ };
191
+ /** Decode a Dataset mutation envelope without narrowing its provider result. */
192
+ export const decodeDefaultDatasetMutationResult = (value) => decodeDatasetMutationResult(value, (result) => result);
193
+ /**
194
+ * Materialize a JSON request before any asynchronous header callback runs.
195
+ * This rejects cycles, accessors, non-JSON prototypes, sparse arrays, and
196
+ * non-finite numbers at the HTTP edge.
197
+ */
198
+ export const serializeDatasetRequest = (value, label) => {
199
+ if (!isRuntimeJsonObject(value)) {
200
+ throw new UruAppRuntimeError(`Invalid ${label}.`, {
201
+ body: value,
202
+ status: 0,
203
+ });
204
+ }
205
+ try {
206
+ const serialized = JSON.stringify(value);
207
+ if (typeof serialized !== "string") {
208
+ throw new TypeError("JSON.stringify returned no document");
209
+ }
210
+ return serialized;
211
+ }
212
+ catch {
213
+ throw new UruAppRuntimeError(`Invalid ${label}.`, {
214
+ body: value,
215
+ status: 0,
216
+ });
217
+ }
218
+ };
219
+ /** Validate a row command's JSON-object rows before request serialization. */
220
+ export const datasetRowsForRequest = (rows, label = "Uru Dataset rows") => {
221
+ if (!isUnknownArray(rows) || rows.length === 0) {
222
+ throw new UruAppRuntimeError(`${label} must be a non-empty array.`, {
223
+ body: rows,
224
+ status: 0,
225
+ });
226
+ }
227
+ if (!isRuntimeJsonObject({ rows })) {
228
+ throw new UruAppRuntimeError(`${label} must contain only JSON values.`, {
229
+ body: rows,
230
+ status: 0,
231
+ });
232
+ }
233
+ const output = [];
234
+ for (let index = 0; index < rows.length; index += 1) {
235
+ const row = rows[index];
236
+ if (!isRuntimeJsonObject(row)) {
237
+ throw new UruAppRuntimeError(`${label}[${index}] must be a JSON object.`, {
238
+ body: rows,
239
+ status: 0,
240
+ });
241
+ }
242
+ output.push(row);
243
+ }
244
+ return output;
245
+ };
246
+ const nonEmptyStringList = (value, label) => {
247
+ if (!isUnknownArray(value) || value.length === 0) {
248
+ throw new UruAppRuntimeError(`${label} must be a non-empty array.`, {
249
+ body: value,
250
+ status: 0,
251
+ });
252
+ }
253
+ if (!isRuntimeJsonObject({ value })) {
254
+ throw new UruAppRuntimeError(`${label} must contain only JSON values.`, {
255
+ body: value,
256
+ status: 0,
257
+ });
258
+ }
259
+ const output = [];
260
+ for (let index = 0; index < value.length; index += 1) {
261
+ const item = value[index];
262
+ if (typeof item !== "string" || item.trim() === "") {
263
+ throw new UruAppRuntimeError(`${label}[${index}] must be a non-empty string.`, {
264
+ body: value,
265
+ status: 0,
266
+ });
267
+ }
268
+ output.push(item);
269
+ }
270
+ return output;
271
+ };
272
+ /** Validate row IDs before request serialization. */
273
+ export const datasetRowIdsForRequest = (rowIds, label = "Uru Dataset row_ids") => nonEmptyStringList(rowIds, label);
274
+ /** Validate the target list used by a Dataset SQL write. */
275
+ export const datasetIdsForRequest = (datasetIds, label = "Uru Dataset dataset_ids") => nonEmptyStringList(datasetIds, label);
276
+ /** Extract a useful message from a non-successful Dataset response. */
277
+ export const datasetWriteErrorMessage = (value, status) => {
278
+ if (!isRuntimeJsonObject(value)) {
279
+ return `Uru Dataset write failed with HTTP ${status}`;
280
+ }
281
+ const { detail, error } = value;
282
+ if (typeof detail === "string" && detail.trim() !== "") {
283
+ return detail;
284
+ }
285
+ if (isRuntimeJsonObject(error)) {
286
+ const { message } = error;
287
+ if (typeof message === "string" && message.trim() !== "") {
288
+ return message;
289
+ }
290
+ }
291
+ return `Uru Dataset write failed with HTTP ${status}`;
292
+ };
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Reads go through the capability client (a declared `query`); writes are
5
5
  * direct provider-runtime calls, because a write is not a cached capability.
6
- * The shapes this file produces are declared in `./types.js` — see the note
7
- * there on why no module in this package imports the public barrel.
6
+ * The HTTP boundary lives in `dataset-boundary.ts` so this module only assembles
7
+ * the current Dataset request paths and overloads.
8
8
  */
9
- import type { CreateUruAppRuntimeClientOptions, UruAppRuntimeClient, UruDatasetsContext } from './types.js';
9
+ import type { CreateUruAppRuntimeClientOptions, UruAppRuntimeClient, UruDatasetsContext } from "./types.js";
10
10
  /** Build the Dataset surface hung off a server context. */
11
- export declare function createDatasetsContext(app: UruAppRuntimeClient, clientOptions: CreateUruAppRuntimeClientOptions): UruDatasetsContext;
11
+ export declare const createDatasetsContext: (app: UruAppRuntimeClient, clientOptions: CreateUruAppRuntimeClientOptions) => UruDatasetsContext;
package/dist/datasets.js CHANGED
@@ -3,117 +3,148 @@
3
3
  *
4
4
  * Reads go through the capability client (a declared `query`); writes are
5
5
  * direct provider-runtime calls, because a write is not a cached capability.
6
- * The shapes this file produces are declared in `./types.js` — see the note
7
- * there on why no module in this package imports the public barrel.
6
+ * The HTTP boundary lives in `dataset-boundary.ts` so this module only assembles
7
+ * the current Dataset request paths and overloads.
8
8
  */
9
- import { UruAppRuntimeError } from './errors.js';
10
- import { requireCompletedRuntimeResponse, resolveHeaders, runtimeBasePath, trimTrailingSlash, } from './runtime.js';
11
- async function postProviderDatasetWrite(options, subpath, body) {
9
+ import { datasetIdsForRequest, datasetRowIdsForRequest, datasetRowsForRequest, decodeDatasetMutationResult, decodeDatasetRowsResult, decodeDefaultDatasetMutationResult, decodeDefaultDatasetRowsResult, datasetWriteErrorMessage, serializeDatasetRequest, } from "./dataset-boundary.js";
10
+ import { UruAppRuntimeError } from "./errors.js";
11
+ import { requireCompletedRuntimeResponse, resolveHeaders, runtimeBasePath, trimTrailingSlash, } from "./runtime.js";
12
+ const fetchDatasetWrite = async (options, subpath, body) => {
12
13
  const runtimeFetch = options.fetch ?? globalThis.fetch;
13
- if (!runtimeFetch) {
14
- throw new UruAppRuntimeError('Uru app runtime fetch is not available.', {
15
- status: 0,
14
+ if (typeof runtimeFetch !== "function") {
15
+ throw new UruAppRuntimeError("Uru app runtime fetch is not available.", {
16
16
  body: null,
17
+ status: 0,
17
18
  });
18
19
  }
19
- const deploymentId = options.deploymentId.trim();
20
+ const deploymentId = typeof options.deploymentId === "string" ? options.deploymentId.trim() : "";
20
21
  if (!deploymentId) {
21
- throw new UruAppRuntimeError('Uru app runtime deployment id is required.', {
22
- status: 0,
22
+ throw new UruAppRuntimeError("Uru app runtime deployment id is required.", {
23
23
  body: null,
24
+ status: 0,
24
25
  });
25
26
  }
26
- const baseUrl = options.baseUrl ? trimTrailingSlash(options.baseUrl) : '';
27
+ // Materialize the body before awaiting a caller-owned header callback.
28
+ const serializedBody = serializeDatasetRequest(body, "Uru Dataset write request");
29
+ const baseUrl = trimTrailingSlash(options.baseUrl ?? "");
27
30
  const basePath = runtimeBasePath(options);
28
31
  const url = `${baseUrl}${basePath}/apps/${encodeURIComponent(deploymentId)}/${subpath}`;
29
32
  const headers = new Headers(await resolveHeaders(options.headers));
30
- headers.set('content-type', 'application/json');
33
+ headers.set("content-type", "application/json");
31
34
  const response = await runtimeFetch(url, {
32
- method: 'POST',
35
+ body: serializedBody,
33
36
  headers,
34
- body: JSON.stringify(body),
37
+ method: "POST",
38
+ signal: AbortSignal.timeout(30_000),
35
39
  });
36
- const parsed = (await response.json().catch(() => null));
40
+ const parsed = await response.json().catch(() => null);
37
41
  if (!response.ok) {
38
42
  const message = datasetWriteErrorMessage(parsed, response.status);
39
43
  throw new UruAppRuntimeError(message, {
40
- status: response.status,
41
44
  body: parsed,
45
+ status: response.status,
42
46
  });
43
47
  }
44
- return (parsed ?? {
45
- ok: false,
46
- operation: 'unknown',
47
- result: null,
48
- });
49
- }
50
- function datasetWriteErrorMessage(parsed, status) {
51
- if (typeof parsed !== 'object' || parsed === null) {
52
- return `Uru Dataset write failed with HTTP ${status}`;
53
- }
54
- const record = parsed;
55
- if (typeof record['detail'] === 'string')
56
- return record['detail'];
57
- const error = record['error'];
58
- if (typeof error === 'object' && error !== null) {
59
- const message = error['message'];
60
- if (typeof message === 'string' && message.trim() !== '')
61
- return message;
62
- }
63
- return `Uru Dataset write failed with HTTP ${status}`;
64
- }
65
- function invokeDatasetRowMutation(options, datasetRef, body) {
48
+ return parsed;
49
+ };
50
+ const postProviderDatasetWrite = async (options, subpath, body) => decodeDefaultDatasetMutationResult(await fetchDatasetWrite(options, subpath, body));
51
+ const postProviderDatasetWriteDecoded = async (options, subpath, body, decodeResult) => decodeDatasetMutationResult(await fetchDatasetWrite(options, subpath, body), decodeResult);
52
+ const datasetMutationPath = (datasetRef) => {
66
53
  const slug = datasetRef.trim();
67
54
  if (!slug) {
68
- throw new UruAppRuntimeError('Uru Dataset reference is required.', {
69
- status: 0,
55
+ throw new UruAppRuntimeError("Uru Dataset reference is required.", {
70
56
  body: null,
57
+ status: 0,
71
58
  });
72
59
  }
73
- return postProviderDatasetWrite(options, `mutate/${encodeURIComponent(slug)}`, body);
74
- }
75
- function invokeDatasetSqlWrite(options, sql, writeOptions) {
76
- const statement = sql.trim();
77
- if (!statement) {
78
- throw new UruAppRuntimeError('SQL statement is required.', {
60
+ return `mutate/${encodeURIComponent(slug)}`;
61
+ };
62
+ const upsertBody = (rows) => ({
63
+ operation: "upsert",
64
+ rows: datasetRowsForRequest(rows),
65
+ });
66
+ const idMutationBody = (operation, rowIds) => ({
67
+ operation,
68
+ row_ids: datasetRowIdsForRequest(rowIds),
69
+ });
70
+ const sqlBody = (sql, options) => {
71
+ if (typeof sql !== "string" || sql.trim() === "") {
72
+ throw new UruAppRuntimeError("SQL statement is required.", {
73
+ body: sql,
74
+ status: 0,
75
+ });
76
+ }
77
+ if (options === null ||
78
+ typeof options !== "object" ||
79
+ Array.isArray(options)) {
80
+ throw new UruAppRuntimeError("Uru Dataset SQL write options are required.", {
81
+ body: options,
79
82
  status: 0,
80
- body: null,
81
83
  });
82
84
  }
83
85
  const body = {
84
- sql: statement,
85
- dataset_ids: [...writeOptions.datasetIds],
86
+ dataset_ids: datasetIdsForRequest(options.datasetIds),
87
+ sql: sql.trim(),
86
88
  };
87
- if (writeOptions.maxRows !== undefined)
88
- body['max_rows'] = writeOptions.maxRows;
89
- if (writeOptions.maxAffected !== undefined) {
90
- body['max_affected'] = writeOptions.maxAffected;
89
+ if (options.maxRows !== undefined) {
90
+ body.max_rows = options.maxRows;
91
+ }
92
+ if (options.maxAffected !== undefined) {
93
+ body.max_affected = options.maxAffected;
91
94
  }
92
- if (writeOptions.timeoutMs !== undefined) {
93
- body['timeout_ms'] = writeOptions.timeoutMs;
95
+ if (options.timeoutMs !== undefined) {
96
+ body.timeout_ms = options.timeoutMs;
94
97
  }
95
- return postProviderDatasetWrite(options, 'dataset-sql', body);
96
- }
98
+ return body;
99
+ };
100
+ const createQueryRowsInvoker = (app) => {
101
+ async function queryRows(datasetRef, query, decodeRow) {
102
+ const response = await requireCompletedRuntimeResponse(app.query(datasetRef, { query: query ?? {} }));
103
+ if (decodeRow === undefined) {
104
+ return decodeDefaultDatasetRowsResult(response);
105
+ }
106
+ return decodeDatasetRowsResult(response, decodeRow);
107
+ }
108
+ return queryRows;
109
+ };
110
+ const createRowMutationInvoker = (options) => {
111
+ async function mutate(datasetRef, rows, decodeResult) {
112
+ const body = upsertBody(rows);
113
+ const path = datasetMutationPath(datasetRef);
114
+ if (decodeResult === undefined) {
115
+ return await postProviderDatasetWrite(options, path, body);
116
+ }
117
+ return await postProviderDatasetWriteDecoded(options, path, body, decodeResult);
118
+ }
119
+ return mutate;
120
+ };
121
+ const createIdMutationInvoker = (options, operation) => {
122
+ async function mutate(datasetRef, rowIds, decodeResult) {
123
+ const body = idMutationBody(operation, rowIds);
124
+ const path = datasetMutationPath(datasetRef);
125
+ if (decodeResult === undefined) {
126
+ return await postProviderDatasetWrite(options, path, body);
127
+ }
128
+ return await postProviderDatasetWriteDecoded(options, path, body, decodeResult);
129
+ }
130
+ return mutate;
131
+ };
132
+ const createSqlWriteInvoker = (options) => {
133
+ async function write(sql, writeOptions, decodeResult) {
134
+ const body = sqlBody(sql, writeOptions);
135
+ if (decodeResult === undefined) {
136
+ return await postProviderDatasetWrite(options, "dataset-sql", body);
137
+ }
138
+ return await postProviderDatasetWriteDecoded(options, "dataset-sql", body, decodeResult);
139
+ }
140
+ return write;
141
+ };
97
142
  /** Build the Dataset surface hung off a server context. */
98
- export function createDatasetsContext(app, clientOptions) {
99
- return {
100
- queryRows: (datasetRef, query = {}) => requireCompletedRuntimeResponse(app.query(datasetRef, { query })),
101
- insertRows: (datasetRef, rows) => invokeDatasetRowMutation(clientOptions, datasetRef, {
102
- operation: 'upsert',
103
- rows,
104
- }),
105
- upsertRows: (datasetRef, rows) => invokeDatasetRowMutation(clientOptions, datasetRef, {
106
- operation: 'upsert',
107
- rows,
108
- }),
109
- deleteRows: (datasetRef, rowIds) => invokeDatasetRowMutation(clientOptions, datasetRef, {
110
- operation: 'delete',
111
- row_ids: rowIds,
112
- }),
113
- restoreRows: (datasetRef, rowIds) => invokeDatasetRowMutation(clientOptions, datasetRef, {
114
- operation: 'restore',
115
- row_ids: rowIds,
116
- }),
117
- sqlWrite: (sql, options) => invokeDatasetSqlWrite(clientOptions, sql, options),
118
- };
119
- }
143
+ export const createDatasetsContext = (app, clientOptions) => ({
144
+ deleteRows: createIdMutationInvoker(clientOptions, "delete"),
145
+ insertRows: createRowMutationInvoker(clientOptions),
146
+ queryRows: createQueryRowsInvoker(app),
147
+ restoreRows: createIdMutationInvoker(clientOptions, "restore"),
148
+ sqlWrite: createSqlWriteInvoker(clientOptions),
149
+ upsertRows: createRowMutationInvoker(clientOptions),
150
+ });
@@ -1,2 +1,2 @@
1
1
  /** Read the canonical owned HTTP error envelope without accepting removed aliases. */
2
- export declare function runtimeErrorMessage(body: unknown, fallback: string): string;
2
+ export declare const runtimeErrorMessage: (body: unknown, fallback: string) => string;
@@ -0,0 +1,11 @@
1
+ const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
2
+ /** Read the canonical owned HTTP error envelope without accepting removed aliases. */
3
+ export const runtimeErrorMessage = (body, fallback) => {
4
+ if (!isRecord(body) || !isRecord(body.error)) {
5
+ return fallback;
6
+ }
7
+ const { message } = body.error;
8
+ return typeof message === "string" && message.trim() !== ""
9
+ ? message
10
+ : fallback;
11
+ };
package/dist/errors.js CHANGED
@@ -13,7 +13,7 @@ export class UruAppRuntimeError extends Error {
13
13
  body;
14
14
  constructor(message, details) {
15
15
  super(message);
16
- this.name = 'UruAppRuntimeError';
16
+ this.name = "UruAppRuntimeError";
17
17
  this.status = details.status;
18
18
  this.body = details.body;
19
19
  }
@@ -0,0 +1,2 @@
1
+ import type { CreateUruAppRuntimeClientOptions, UruFilesContext } from './types.js';
2
+ export declare function createFilesContext(options: CreateUruAppRuntimeClientOptions): UruFilesContext;