deepspace 0.19.5 → 0.21.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.
- package/CHANGELOG.md +24 -0
- package/dist/{chunk-A7UFIOWO.js → chunk-KDCDRHBA.js} +7 -2
- package/dist/chunk-KDCDRHBA.js.map +1 -0
- package/dist/cli.js +219 -94
- package/dist/cli.js.map +1 -1
- package/dist/documentation-client-core.d.ts +3 -2
- package/dist/documentation-client-core.js +1 -1
- package/dist/documentation-default-renderer.cjs +48 -48
- package/dist/documentation-react.d.ts +2 -1
- package/dist/documentation-react.js +1 -1
- package/dist/documentation-runtime.js +7 -7
- package/dist/documentation-server-core.d.ts +3 -2
- package/dist/documentation-server-core.js +1 -1
- package/dist/documentation.d.ts +40 -12
- package/dist/documentation.js +40 -7
- package/dist/documentation.js.map +1 -1
- package/dist/index.d.ts +225 -21
- package/dist/index.js +262 -112
- package/dist/index.js.map +1 -1
- package/dist/{public-CFAj1hL2.d.ts → public-DenQ1TsZ.d.ts} +36 -11
- package/dist/server.d.ts +46 -29
- package/dist/server.js +1041 -254
- package/dist/server.js.map +1 -1
- package/dist/testing-mcp.d.ts +69 -0
- package/dist/testing-mcp.js +99 -0
- package/dist/testing-mcp.js.map +1 -0
- package/dist/testing.d.ts +17 -20
- package/dist/testing.js +47 -25
- package/dist/testing.js.map +1 -1
- package/dist/worker.d.ts +73 -32
- package/dist/worker.js +1094 -244
- package/dist/worker.js.map +1 -1
- package/features/ai-chat/feature.json +2 -2
- package/features/ai-chat/src/AiChatPage.tsx +56 -21
- package/features/ai-chat/src/ChatPanel.tsx +33 -10
- package/features/ai-chat/src/__tests__/ChatPanel.lifecycle.test.tsx +156 -0
- package/features/cron/src/CronLogPage.tsx +107 -69
- package/features/file-attachments/feature.json +2 -1
- package/features/file-manager/feature.json +2 -1
- package/features/file-manager/src/FileManagerPage.tsx +227 -194
- package/features/integration-test/src/IntegrationTestPage.tsx +54 -34
- package/package.json +5 -1
- package/dist/chunk-A7UFIOWO.js.map +0 -1
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
import { ReactNode, ReactElement, ComponentType } from 'react';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
declare const themeObjectSchema: z.ZodObject<{
|
|
5
|
+
accent: z.ZodOptional<z.ZodString>;
|
|
6
|
+
accentDark: z.ZodOptional<z.ZodString>;
|
|
7
|
+
background: z.ZodOptional<z.ZodString>;
|
|
8
|
+
density: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
comfortable: "comfortable";
|
|
10
|
+
compact: "compact";
|
|
11
|
+
}>>;
|
|
12
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
13
|
+
logoDark: z.ZodOptional<z.ZodString>;
|
|
14
|
+
favicon: z.ZodOptional<z.ZodString>;
|
|
15
|
+
defaultMode: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
light: "light";
|
|
17
|
+
dark: "dark";
|
|
18
|
+
system: "system";
|
|
19
|
+
}>>;
|
|
20
|
+
strictMode: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
}, z.core.$strip>;
|
|
2
22
|
|
|
3
23
|
type DocumentationAssistantAccess = 'disabled' | 'public' | 'authenticated';
|
|
4
24
|
type DocumentationMcpAccess = 'disabled' | 'public';
|
|
@@ -10,11 +30,21 @@ interface DocumentationFontConfig {
|
|
|
10
30
|
source?: string;
|
|
11
31
|
format?: string;
|
|
12
32
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
33
|
+
/**
|
|
34
|
+
* The `theme` object as authored in documentation.json — exactly the keys
|
|
35
|
+
* the config schema accepts under `theme.*`, derived from that schema so
|
|
36
|
+
* the two can never drift. Everything else (fonts, background decoration,
|
|
37
|
+
* styling, logo href) is configured through the Mintlify-style top-level
|
|
38
|
+
* keys and only exists on the resolved theme.
|
|
39
|
+
*/
|
|
40
|
+
type DocumentationThemeConfig = z.infer<typeof themeObjectSchema>;
|
|
41
|
+
/**
|
|
42
|
+
* The fully resolved theme after config loading merges `theme.*` with the
|
|
43
|
+
* Mintlify top-level keys (`colors`, `logo`, `favicon`, `appearance`,
|
|
44
|
+
* `background`, `fonts`, `styling`). This is what the template and runtime
|
|
45
|
+
* consume; it is an output shape, never accepted as `theme.*` input.
|
|
46
|
+
*/
|
|
47
|
+
interface ResolvedDocumentationTheme extends DocumentationThemeConfig {
|
|
18
48
|
backgroundDark?: string;
|
|
19
49
|
backgroundDecoration?: 'none' | 'gradient' | 'grid';
|
|
20
50
|
bodyFont?: DocumentationFontConfig;
|
|
@@ -22,12 +52,7 @@ interface DocumentationThemeConfig {
|
|
|
22
52
|
monoFont?: DocumentationFontConfig;
|
|
23
53
|
codeBlockMode?: 'dark' | 'system';
|
|
24
54
|
eyebrowStyle?: 'section' | 'breadcrumbs' | 'none';
|
|
25
|
-
logo?: string;
|
|
26
|
-
logoDark?: string;
|
|
27
55
|
logoHref?: string;
|
|
28
|
-
favicon?: string;
|
|
29
|
-
defaultMode?: 'light' | 'dark' | 'system';
|
|
30
|
-
strictMode?: boolean;
|
|
31
56
|
}
|
|
32
57
|
interface DocumentationLinkConfig {
|
|
33
58
|
label: string;
|
|
@@ -79,7 +104,7 @@ interface DocumentationConfig {
|
|
|
79
104
|
url?: string;
|
|
80
105
|
/** Explicit custom hostnames that mount this documentation at `/`. */
|
|
81
106
|
domains: string[];
|
|
82
|
-
theme:
|
|
107
|
+
theme: ResolvedDocumentationTheme;
|
|
83
108
|
navigation?: DocumentationNavigationItem[];
|
|
84
109
|
links: DocumentationLinkConfig[];
|
|
85
110
|
footer: DocumentationLinkConfig[];
|
package/dist/server.d.ts
CHANGED
|
@@ -207,13 +207,9 @@ declare const UPLOAD_PART_BYTES: number;
|
|
|
207
207
|
/**
|
|
208
208
|
* The highest part number the server accepts.
|
|
209
209
|
*
|
|
210
|
-
* The
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
* than that even though a whole small file may be 25 MiB: admitting 25 MiB
|
|
214
|
-
* parts would make the real in-flight bound 52 × 25 MiB = 1300 MiB while the
|
|
215
|
-
* advertised ceiling stayed 1 GiB. With both numbers agreeing, a session's
|
|
216
|
-
* worst case is 52 × 20 MiB = 1040 MiB — the ceiling plus one part.
|
|
210
|
+
* The server derives the only valid part number and byte length from the
|
|
211
|
+
* declared total and {@link UPLOAD_PART_BYTES}. The maximum part count is
|
|
212
|
+
* therefore the exact number needed to reach the file ceiling.
|
|
217
213
|
*
|
|
218
214
|
* R2 allows 10,000 parts, so this is far inside what the API permits.
|
|
219
215
|
*/
|
|
@@ -253,6 +249,25 @@ declare function storageQuotaMessage(incomingBytes: number, usedBytes: number, l
|
|
|
253
249
|
declare const MAX_DEPLOY_ASSET_FILE_BYTES: number;
|
|
254
250
|
declare function formatBytes(bytes: number): string;
|
|
255
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Everything the files handler needs to enforce one account allocation.
|
|
254
|
+
*
|
|
255
|
+
* `quotaKey` is required because an exact scan followed by an uncoordinated
|
|
256
|
+
* write cannot enforce a limit under concurrency. Callers that do not want a
|
|
257
|
+
* quota omit `storage`; callers that do want one must name its serialized
|
|
258
|
+
* summary.
|
|
259
|
+
*/
|
|
260
|
+
interface StorageAdmission {
|
|
261
|
+
/** The app prefix receiving this request's write. */
|
|
262
|
+
prefix: string;
|
|
263
|
+
/** Internal R2 key for the account's ETag-serialized usage summary. */
|
|
264
|
+
quotaKey: string;
|
|
265
|
+
/** Resolve the account's limit. `null` fails writes closed. */
|
|
266
|
+
limitBytes: () => Promise<number | null>;
|
|
267
|
+
/** Resolve the other app prefixes in the account. `null` fails closed. */
|
|
268
|
+
siblingPrefixes?: () => Promise<string[] | null>;
|
|
269
|
+
}
|
|
270
|
+
|
|
256
271
|
/**
|
|
257
272
|
* Shared Scoped R2 Files Handler
|
|
258
273
|
*
|
|
@@ -296,6 +311,7 @@ interface ScopeContext {
|
|
|
296
311
|
}
|
|
297
312
|
type PrefixResult = {
|
|
298
313
|
prefix: string;
|
|
314
|
+
excludedPrefixes?: readonly string[];
|
|
299
315
|
error?: undefined;
|
|
300
316
|
} | {
|
|
301
317
|
prefix?: undefined;
|
|
@@ -318,32 +334,12 @@ interface ScopedR2Config {
|
|
|
318
334
|
* mount. The handler is the enforcer; the mount only knows whose limit
|
|
319
335
|
* applies.
|
|
320
336
|
*/
|
|
321
|
-
interface StorageAdmission {
|
|
322
|
-
/** This app's own prefix — the one the incoming write lands under. */
|
|
323
|
-
prefix: string;
|
|
324
|
-
/**
|
|
325
|
-
* Resolve the owner's limit in bytes. `null` means the lookup failed;
|
|
326
|
-
* writes then fail closed (503) rather than admitting unmetered storage.
|
|
327
|
-
*/
|
|
328
|
-
limitBytes: () => Promise<number | null>;
|
|
329
|
-
/**
|
|
330
|
-
* The OTHER app prefixes this owner's storage spans, if any.
|
|
331
|
-
*
|
|
332
|
-
* The limit is per ACCOUNT, not per app: an owner's allocation is the total
|
|
333
|
-
* across everything they own, so admission has to see the siblings too. `[]`
|
|
334
|
-
* for an owner with one app, which is the common case and costs exactly what
|
|
335
|
-
* it did when this was a per-app limit.
|
|
336
|
-
*
|
|
337
|
-
* Returning `null` means the owner's apps could not be enumerated. Like a
|
|
338
|
-
* failed limit lookup that fails the write closed rather than admitting a
|
|
339
|
-
* write against an allocation we cannot measure.
|
|
340
|
-
*/
|
|
341
|
-
siblingPrefixes?: () => Promise<string[] | null>;
|
|
342
|
-
}
|
|
343
337
|
interface ScopedR2Auth {
|
|
344
338
|
userId: string | null;
|
|
345
339
|
/** Absent = no quota on this mount (e.g. an app's own bucket). */
|
|
346
340
|
storage?: StorageAdmission;
|
|
341
|
+
/** Account-wide quota details are private to an authorized owner surface. */
|
|
342
|
+
includeStorageUsage?: boolean;
|
|
347
343
|
}
|
|
348
344
|
type ScopedR2Handler = (request: Request, url: URL, bucket: R2Bucket, auth: ScopedR2Auth) => Promise<Response>;
|
|
349
345
|
declare function isFilesVerbPath(method: string, subpath: string): boolean;
|
|
@@ -1536,6 +1532,7 @@ declare const MSG: {
|
|
|
1536
1532
|
readonly CRON_PAUSE: "cron.pause";
|
|
1537
1533
|
readonly CRON_RESUME: "cron.resume";
|
|
1538
1534
|
readonly CRON_STATUS: "cron.status";
|
|
1535
|
+
readonly CRON_ACK: "cron.ack";
|
|
1539
1536
|
readonly JOB_ENQUEUE: "job.enqueue";
|
|
1540
1537
|
readonly JOB_CANCEL: "job.cancel";
|
|
1541
1538
|
readonly JOB_RETRY: "job.retry";
|
|
@@ -1703,6 +1700,16 @@ type ServerMessage = BaseMessage<typeof MSG.QUERY_RESULT, {
|
|
|
1703
1700
|
}> | BaseMessage<typeof MSG.CRON_STATUS, {
|
|
1704
1701
|
tasks: unknown;
|
|
1705
1702
|
recentHistory: unknown;
|
|
1703
|
+
}> | BaseMessage<typeof MSG.CRON_ACK, {
|
|
1704
|
+
requestId: string;
|
|
1705
|
+
taskName: string;
|
|
1706
|
+
ok: true;
|
|
1707
|
+
} | {
|
|
1708
|
+
requestId: string;
|
|
1709
|
+
taskName?: string;
|
|
1710
|
+
ok: false;
|
|
1711
|
+
reason: 'read_only' | 'unknown_task' | 'failed';
|
|
1712
|
+
error?: string;
|
|
1706
1713
|
}> | BaseMessage<typeof MSG.JOB_UPDATE, {
|
|
1707
1714
|
kind: 'snapshot' | 'enqueued' | 'progress' | 'succeeded' | 'failed' | 'canceled' | 'retried';
|
|
1708
1715
|
job?: unknown;
|
|
@@ -2317,12 +2324,22 @@ declare abstract class CronRoom<E = Record<string, unknown>> extends BaseRoom<E>
|
|
|
2317
2324
|
type: string;
|
|
2318
2325
|
[key: string]: unknown;
|
|
2319
2326
|
}): Promise<void>;
|
|
2327
|
+
private dispatchMessage;
|
|
2320
2328
|
protected onAlarm(): Promise<void>;
|
|
2321
2329
|
private executeTask;
|
|
2322
2330
|
private scheduleNextAlarm;
|
|
2323
2331
|
private getTaskStates;
|
|
2324
2332
|
private getRecentHistory;
|
|
2325
2333
|
private broadcastStatus;
|
|
2334
|
+
/**
|
|
2335
|
+
* Receipt for a mutation frame, addressed only to its sender. Receipts
|
|
2336
|
+
* are opt-in by correlation id: frames without a `requestId` keep the
|
|
2337
|
+
* fire-and-forget contract, so the (untyped) `requestId` from the wire
|
|
2338
|
+
* is the single gate here rather than a check at every call site.
|
|
2339
|
+
* Frames go through the shared `serverBuild` constructors so the wire
|
|
2340
|
+
* shape is enforced by the protocol types, not re-spelled here.
|
|
2341
|
+
*/
|
|
2342
|
+
private ackMutation;
|
|
2326
2343
|
/**
|
|
2327
2344
|
* Execute a scheduled task by name.
|
|
2328
2345
|
* Called both by the alarm scheduler and manual trigger.
|