@allyhub/sdk 0.12.0 → 0.13.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 +8 -0
- package/dist/node_modules/@allyhub/audio/dist/plan.d.ts +3 -0
- package/dist/node_modules/@allyhub/audio/dist/render.js +1 -1
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-file.d.ts +2 -0
- package/dist/node_modules/@allyhub/chart/dist/chart-file.js +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +3 -2
- package/dist/node_modules/@allyhub/chart/dist/chart.d.ts +5 -12
- package/dist/node_modules/@allyhub/chart/dist/chart.js +2 -1
- package/dist/node_modules/@allyhub/chart/dist/color.d.ts +37 -0
- package/dist/node_modules/@allyhub/chart/dist/color.js +2 -0
- package/dist/node_modules/@allyhub/chart/dist/index.d.ts +1 -0
- package/dist/node_modules/@allyhub/chart/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/chart/dist/svg.js +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/deck-code.d.ts +130 -0
- package/dist/node_modules/@allyhub/formats/dist/data/deck-code.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/gen.d.ts +3 -1
- package/dist/node_modules/@allyhub/formats/dist/data/gen.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +512 -166
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +2523 -136
- package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +931 -87
- package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/color.d.ts +11 -0
- package/dist/node_modules/@allyhub/ooxml/dist/color.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/ext.d.ts +43 -0
- package/dist/node_modules/@allyhub/ooxml/dist/ext.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/index.d.ts +2 -1
- package/dist/node_modules/@allyhub/ooxml/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/transform.d.ts +13 -0
- package/dist/node_modules/@allyhub/ooxml/dist/transform.js +2 -0
- package/dist/node_modules/@allyhub/ooxml/package.json +5 -1
- package/dist/node_modules/@allyhub/piece/dist/gen.d.ts +4 -4
- package/dist/node_modules/@allyhub/piece/dist/media.d.ts +2 -2
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +35 -0
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +19 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +35 -20
- package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +3 -3
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +28 -2
- package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +6 -6
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +73 -10
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +9 -9
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/annotations.d.ts +14 -0
- package/dist/node_modules/@allyhub/sheet/dist/annotations.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/index.d.ts +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/rules.d.ts +24 -0
- package/dist/node_modules/@allyhub/sheet/dist/api/rules.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/styles.d.ts +12 -0
- package/dist/node_modules/@allyhub/sheet/dist/api/styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/workbook.d.ts +3 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/arrange.d.ts +28 -1
- package/dist/node_modules/@allyhub/sheet/dist/arrange.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/data-tools.d.ts +42 -0
- package/dist/node_modules/@allyhub/sheet/dist/data-tools.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/edit.d.ts +43 -2
- package/dist/node_modules/@allyhub/sheet/dist/edit.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/fill.d.ts +10 -0
- package/dist/node_modules/@allyhub/sheet/dist/fill.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/filter.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/rewrite.d.ts +14 -0
- package/dist/node_modules/@allyhub/sheet/dist/formula/rewrite.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/html.js +10 -10
- package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +6 -1
- package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/outline.d.ts +30 -0
- package/dist/node_modules/@allyhub/sheet/dist/outline.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/rich.d.ts +29 -0
- package/dist/node_modules/@allyhub/sheet/dist/rich.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/rules.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/table-style.d.ts +6 -0
- package/dist/node_modules/@allyhub/sheet/dist/table-style.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/table-styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +5 -1
- package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.d.ts +17 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/runs.d.ts +56 -0
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/runs.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.d.ts +6 -0
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +117 -21
- package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +181 -30
- package/dist/node_modules/@allyhub/slides-core/dist/api.js +3 -3
- package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/chart-api.d.ts +28 -2
- package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/check.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/enums.d.ts +222 -4
- package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/file.d.ts +6 -0
- package/dist/node_modules/@allyhub/slides-core/dist/file.js +3 -3
- package/dist/node_modules/@allyhub/slides-core/dist/generated/table-styles.d.ts +3 -0
- package/dist/node_modules/@allyhub/slides-core/dist/generated/table-styles.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/index.d.ts +3 -0
- package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/merge.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +98 -10
- package/dist/node_modules/@allyhub/slides-core/dist/numbering.d.ts +6 -0
- package/dist/node_modules/@allyhub/slides-core/dist/numbering.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/office.d.ts +53 -0
- package/dist/node_modules/@allyhub/slides-core/dist/office.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/patterns.d.ts +8 -0
- package/dist/node_modules/@allyhub/slides-core/dist/patterns.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +36 -6
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/script.d.ts +11 -0
- package/dist/node_modules/@allyhub/slides-core/dist/script.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.d.ts +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/table-style.d.ts +48 -0
- package/dist/node_modules/@allyhub/slides-core/dist/table-style.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/mix-plan.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/timeline.d.ts +4 -0
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/docs/defaults.md +78 -4
- package/docs/image.md +1 -1
- package/docs/pictures.md +1 -1
- package/docs/project.md +1 -1
- package/docs/sheets.md +19 -9
- package/docs/slides.md +30 -16
- package/docs/speech.md +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,13 @@ export declare const ThemeSchema: z.ZodEnum<{
|
|
|
6
6
|
light: "light";
|
|
7
7
|
dark: "dark";
|
|
8
8
|
}>;
|
|
9
|
+
/** An editor's two modes (HostContext's `mode`). */
|
|
10
|
+
export declare const EDITOR_MODES: readonly ["read", "edit"];
|
|
11
|
+
export declare const EditorModeSchema: z.ZodEnum<{
|
|
12
|
+
read: "read";
|
|
13
|
+
edit: "edit";
|
|
14
|
+
}>;
|
|
15
|
+
export type EditorMode = z.infer<typeof EditorModeSchema>;
|
|
9
16
|
export declare const HostContextSchema: z.ZodObject<{
|
|
10
17
|
locale: z.ZodString;
|
|
11
18
|
theme: z.ZodEnum<{
|
|
@@ -22,8 +29,10 @@ export declare const HostContextSchema: z.ZodObject<{
|
|
|
22
29
|
share: z.ZodOptional<z.ZodBoolean>;
|
|
23
30
|
commands: z.ZodOptional<z.ZodBoolean>;
|
|
24
31
|
audienceWindow: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
mode: z.ZodEnum<{
|
|
33
|
+
read: "read";
|
|
34
|
+
edit: "edit";
|
|
35
|
+
}>;
|
|
27
36
|
place: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
28
37
|
item: z.ZodObject<{
|
|
29
38
|
id: z.ZodString;
|
|
@@ -71,10 +80,10 @@ export declare const EXPORT_BUTTON_STATES: readonly ["idle", "queued", "running"
|
|
|
71
80
|
export declare const ExportStateSchema: z.ZodObject<{
|
|
72
81
|
at: z.ZodEnum<{
|
|
73
82
|
failed: "failed";
|
|
74
|
-
running: "running";
|
|
75
|
-
idle: "idle";
|
|
76
83
|
queued: "queued";
|
|
84
|
+
running: "running";
|
|
77
85
|
done: "done";
|
|
86
|
+
idle: "idle";
|
|
78
87
|
}>;
|
|
79
88
|
percent: z.ZodOptional<z.ZodNumber>;
|
|
80
89
|
open: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -97,8 +106,10 @@ export declare const HOST_METHODS: {
|
|
|
97
106
|
share: z.ZodOptional<z.ZodBoolean>;
|
|
98
107
|
commands: z.ZodOptional<z.ZodBoolean>;
|
|
99
108
|
audienceWindow: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
mode: z.ZodEnum<{
|
|
110
|
+
read: "read";
|
|
111
|
+
edit: "edit";
|
|
112
|
+
}>;
|
|
102
113
|
place: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
103
114
|
item: z.ZodObject<{
|
|
104
115
|
id: z.ZodString;
|
|
@@ -158,10 +169,10 @@ export declare const HOST_METHODS: {
|
|
|
158
169
|
readonly "export/state": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
159
170
|
at: z.ZodEnum<{
|
|
160
171
|
failed: "failed";
|
|
161
|
-
running: "running";
|
|
162
|
-
idle: "idle";
|
|
163
172
|
queued: "queued";
|
|
173
|
+
running: "running";
|
|
164
174
|
done: "done";
|
|
175
|
+
idle: "idle";
|
|
165
176
|
}>;
|
|
166
177
|
percent: z.ZodOptional<z.ZodNumber>;
|
|
167
178
|
open: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -278,8 +289,8 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
278
289
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
279
290
|
state: z.ZodEnum<{
|
|
280
291
|
failed: "failed";
|
|
281
|
-
running: "running";
|
|
282
292
|
queued: "queued";
|
|
293
|
+
running: "running";
|
|
283
294
|
done: "done";
|
|
284
295
|
cancelled: "cancelled";
|
|
285
296
|
}>;
|
|
@@ -306,8 +317,8 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
306
317
|
about: z.ZodObject<{
|
|
307
318
|
kind: z.ZodEnum<{
|
|
308
319
|
studio: "studio";
|
|
309
|
-
project: "project";
|
|
310
320
|
agent: "agent";
|
|
321
|
+
project: "project";
|
|
311
322
|
piece: "piece";
|
|
312
323
|
plugin: "plugin";
|
|
313
324
|
skill: "skill";
|
|
@@ -316,20 +327,20 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
316
327
|
id: z.ZodString;
|
|
317
328
|
}, z.core.$strict>;
|
|
318
329
|
what: z.ZodEnum<{
|
|
319
|
-
update: "update";
|
|
320
|
-
install: "install";
|
|
321
|
-
start: "start";
|
|
322
330
|
download: "download";
|
|
323
331
|
wake: "wake";
|
|
324
332
|
export: "export";
|
|
333
|
+
update: "update";
|
|
334
|
+
install: "install";
|
|
335
|
+
start: "start";
|
|
325
336
|
publish: "publish";
|
|
326
337
|
}>;
|
|
327
338
|
name: z.ZodOptional<z.ZodString>;
|
|
328
339
|
state: z.ZodEnum<{
|
|
329
340
|
failed: "failed";
|
|
341
|
+
queued: "queued";
|
|
330
342
|
running: "running";
|
|
331
343
|
paused: "paused";
|
|
332
|
-
queued: "queued";
|
|
333
344
|
done: "done";
|
|
334
345
|
cancelled: "cancelled";
|
|
335
346
|
}>;
|
|
@@ -396,8 +407,10 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
396
407
|
share: z.ZodOptional<z.ZodBoolean>;
|
|
397
408
|
commands: z.ZodOptional<z.ZodBoolean>;
|
|
398
409
|
audienceWindow: z.ZodOptional<z.ZodBoolean>;
|
|
399
|
-
|
|
400
|
-
|
|
410
|
+
mode: z.ZodEnum<{
|
|
411
|
+
read: "read";
|
|
412
|
+
edit: "edit";
|
|
413
|
+
}>;
|
|
401
414
|
place: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
402
415
|
item: z.ZodObject<{
|
|
403
416
|
id: z.ZodString;
|
|
@@ -470,8 +483,10 @@ export declare const EDITOR_HOST_METHODS: {
|
|
|
470
483
|
share: z.ZodOptional<z.ZodBoolean>;
|
|
471
484
|
commands: z.ZodOptional<z.ZodBoolean>;
|
|
472
485
|
audienceWindow: z.ZodOptional<z.ZodBoolean>;
|
|
473
|
-
|
|
474
|
-
|
|
486
|
+
mode: z.ZodEnum<{
|
|
487
|
+
read: "read";
|
|
488
|
+
edit: "edit";
|
|
489
|
+
}>;
|
|
475
490
|
place: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
476
491
|
item: z.ZodObject<{
|
|
477
492
|
id: z.ZodString;
|
|
@@ -531,10 +546,10 @@ export declare const EDITOR_HOST_METHODS: {
|
|
|
531
546
|
readonly "export/state": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
532
547
|
at: z.ZodEnum<{
|
|
533
548
|
failed: "failed";
|
|
534
|
-
running: "running";
|
|
535
|
-
idle: "idle";
|
|
536
549
|
queued: "queued";
|
|
550
|
+
running: "running";
|
|
537
551
|
done: "done";
|
|
552
|
+
idle: "idle";
|
|
538
553
|
}>;
|
|
539
554
|
percent: z.ZodOptional<z.ZodNumber>;
|
|
540
555
|
open: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as t}from"zod";import{FILE_METHODS as r,FILE_NOTIFICATIONS as a,FolderSchema as i,PathSchema as o}from"./files.js";import{method as e,notification as
|
|
2
|
+
import{z as t}from"zod";import{FILE_METHODS as r,FILE_NOTIFICATIONS as a,FolderSchema as i,PathSchema as o}from"./files.js";import{method as e,notification as s}from"./jsonrpc.js";import{KindInfoSchema as h}from"./kinds.js";import{NoteRectSchema as c}from"./notes.js";import{PlaceSchema as n}from"./place.js";import{AgentHereSchema as m,PRESENCE_METHODS as l,PRESENCE_NOTIFICATIONS as p}from"./presence.js";import{TOOL_NOTIFICATIONS as d}from"./tools.js";export{PLACE_PARAM,PlaceSchema,placeIn,placeParams}from"./place.js";export const ThemeSchema=t.enum(["light","dark"]),EDITOR_MODES=["read","edit"],EditorModeSchema=t.enum(EDITOR_MODES),HostContextSchema=t.strictObject({locale:t.string().min(2),theme:ThemeSchema,agent:t.strictObject({name:t.string().min(1)}).optional(),project:t.strictObject({name:t.string().min(1)}),notes:t.boolean().optional(),share:t.boolean().optional(),commands:t.boolean().optional(),audienceWindow:t.boolean().optional(),mode:EditorModeSchema,place:n.optional(),item:t.strictObject({id:o,kind:t.string().min(1).optional(),dir:i,entry:o,kindInfo:h}),editor:t.string().min(1)}),OpenTargetSchema=t.discriminatedUnion("type",[t.strictObject({type:t.literal("file"),path:o,line:t.int().positive().optional()}),t.strictObject({type:t.literal("browser"),url:t.url({protocol:/^https?$/u}).optional(),tabId:t.string().min(1).optional()})]),AUDIENCE_WINDOW="allyhub-audience",EDITOR_STATES=["saved","saving","unsaved","error"],EXPORT_BUTTON_STATES=["idle","queued","running","done","failed"],ExportStateSchema=t.strictObject({at:t.enum(EXPORT_BUTTON_STATES),percent:t.number().min(0).max(100).optional(),open:t.boolean().optional()}),HOST_METHODS={"host/context":e(t.strictObject({}),HostContextSchema,"Where the editor runs."),"items/open":e(t.strictObject({target:OpenTargetSchema}),t.strictObject({}),"Shows another item, a file or a page, where the host shows things."),"storage/get":e(t.strictObject({key:t.string().min(1)}),t.strictObject({value:t.unknown()}),"What the editor kept for this person on this computer (a hand sort, what was last seen), or null."),"storage/set":e(t.strictObject({key:t.string().min(1),value:t.unknown()}),t.strictObject({}),"Keeps a value for this person on this computer; null removes it."),"editor/state":e(t.strictObject({state:t.enum(EDITOR_STATES),message:t.string().optional()}),t.strictObject({}),"Says whether what the person typed is saved."),"export/state":e(ExportStateSchema,t.strictObject({}),"Says how the item's exports go, for a host that draws Export itself (HostContext's `commands`)."),"agent/here":e(m,t.strictObject({}),"Says whether the project's agent is in the item and what it does there, and whether the editor follows it, for a host that draws the agent's name itself (HostContext's `commands`); the host's button asks back with `editor/command`'s `follow` or `unfollow`."),"editor/place":e(t.strictObject({place:n}),t.strictObject({}),"Says where the person is in the item (a video's moment, a deck's slide), on a pause, a seek or another slide, never each frame, so the host opens it there again (HostContext's `place`). The place is the editor's, in the shape its `editors` contribution's schema says; the host keeps it unread."),"agent/ask":e(t.strictObject({text:t.string().min(1)}),t.strictObject({delivered:t.boolean()}),"Puts words before the person's agent, for them to go on and send; false where no agent takes them. Never sent by itself."),"note/begin":e(t.strictObject({from:c.optional(),selection:t.boolean().optional()}),t.strictObject({begun:t.boolean()}),"Starts the host's Mark up on what is on show, as its own Note button does, so a person can mark anything up for their agent from wherever they are; false where the host has none. Sends nothing."),"share/begin":e(t.strictObject({}),t.strictObject({begun:t.boolean()}),"Opens the host's Share panel for the item on show, as the editor's own Share button does (HostContext's `share`); false where the host shares nothing. Shares nothing by itself."),"edit/request":e(t.strictObject({}),t.strictObject({asked:t.boolean()}),"The person pressed an Edit of the editor's own (a website's view, with no machine to run its server) in read mode (`mode`): the host wakes the machine that changes it; false where nothing does. Never sent for a key pressed in the item."),"tools/call":e(t.strictObject({name:t.string().min(1),arguments:t.record(t.string(),t.unknown()).default({})}),t.strictObject({result:t.unknown()}),"Runs one of the project server's tools (tools.ts's PROJECT_TOOLS), for an editor that needs more than files (a video's preview, a still).")},HOST_NOTIFICATIONS={"host/context-changed":s(HostContextSchema,"The language, theme or agent changed."),"editor/command":s(t.strictObject({command:t.string().min(1),open:t.boolean().optional()}),"The host around the editor asked it to run a command: what its own shortcut does (Export, ⌘E), or a command its extension contributes."),...a,...d,...p},EDITOR_HOST_METHODS={...r,...HOST_METHODS,...l};
|
|
@@ -22,8 +22,8 @@ export declare const EVENT_PROPS: {
|
|
|
22
22
|
os: z.ZodString;
|
|
23
23
|
arch: z.ZodString;
|
|
24
24
|
where: z.ZodEnum<{
|
|
25
|
-
computer: "computer";
|
|
26
25
|
cloud: "cloud";
|
|
26
|
+
computer: "computer";
|
|
27
27
|
}>;
|
|
28
28
|
}, z.core.$strict>;
|
|
29
29
|
/** A project opened in Studio. */
|
|
@@ -119,8 +119,8 @@ export declare const ClientEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
119
119
|
os: z.ZodString;
|
|
120
120
|
arch: z.ZodString;
|
|
121
121
|
where: z.ZodEnum<{
|
|
122
|
-
computer: "computer";
|
|
123
122
|
cloud: "cloud";
|
|
123
|
+
computer: "computer";
|
|
124
124
|
}>;
|
|
125
125
|
}, z.core.$strict>;
|
|
126
126
|
id: z.ZodUUID;
|
|
@@ -223,8 +223,8 @@ export declare const EventsRequestSchema: z.ZodObject<{
|
|
|
223
223
|
os: z.ZodString;
|
|
224
224
|
arch: z.ZodString;
|
|
225
225
|
where: z.ZodEnum<{
|
|
226
|
-
computer: "computer";
|
|
227
226
|
cloud: "cloud";
|
|
227
|
+
computer: "computer";
|
|
228
228
|
}>;
|
|
229
229
|
}, z.core.$strict>;
|
|
230
230
|
id: z.ZodUUID;
|
|
@@ -153,9 +153,35 @@ export declare const WINDOW_NOTIFICATIONS: {
|
|
|
153
153
|
command: z.ZodString;
|
|
154
154
|
open: z.ZodOptional<z.ZodBoolean>;
|
|
155
155
|
}, z.core.$strict>>;
|
|
156
|
+
readonly "editor/upstream": import("./jsonrpc.js").NotificationSpec<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
157
|
+
from: z.ZodLiteral<"snapshot">;
|
|
158
|
+
root: z.ZodURL;
|
|
159
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
160
|
+
from: z.ZodLiteral<"window">;
|
|
161
|
+
connection: z.ZodString;
|
|
162
|
+
}, z.core.$strict>], "from">>;
|
|
163
|
+
readonly "editor/context": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
164
|
+
mode: z.ZodEnum<{
|
|
165
|
+
read: "read";
|
|
166
|
+
edit: "edit";
|
|
167
|
+
}>;
|
|
168
|
+
theme: z.ZodEnum<{
|
|
169
|
+
light: "light";
|
|
170
|
+
dark: "dark";
|
|
171
|
+
}>;
|
|
172
|
+
}, z.core.$strict>>;
|
|
173
|
+
readonly "editor/message": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
174
|
+
connection: z.ZodString;
|
|
175
|
+
message: z.ZodUnknown;
|
|
176
|
+
}, z.core.$strict>>;
|
|
156
177
|
};
|
|
157
178
|
/** What the page tells the window. */
|
|
158
179
|
export declare const FRAME_NOTIFICATIONS: {
|
|
180
|
+
readonly "editor/ready": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{}, z.core.$strict>>;
|
|
181
|
+
readonly "editor/send": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
182
|
+
connection: z.ZodString;
|
|
183
|
+
message: z.ZodUnknown;
|
|
184
|
+
}, z.core.$strict>>;
|
|
159
185
|
readonly "note/ready": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{}, z.core.$strict>>;
|
|
160
186
|
readonly "note/gone": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{}, z.core.$strict>>;
|
|
161
187
|
readonly "window/key": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
@@ -187,10 +213,10 @@ export declare const FRAME_NOTIFICATIONS: {
|
|
|
187
213
|
readonly "export/state": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
188
214
|
at: z.ZodEnum<{
|
|
189
215
|
failed: "failed";
|
|
190
|
-
running: "running";
|
|
191
|
-
idle: "idle";
|
|
192
216
|
queued: "queued";
|
|
217
|
+
running: "running";
|
|
193
218
|
done: "done";
|
|
219
|
+
idle: "idle";
|
|
194
220
|
}>;
|
|
195
221
|
percent: z.ZodOptional<z.ZodNumber>;
|
|
196
222
|
open: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as e}from"zod";import{EDITOR_STATES as
|
|
2
|
+
import{z as e}from"zod";import{EDITOR_STATES as a,EditorModeSchema as n,ExportStateSchema as h,PlaceSchema as c,ThemeSchema as d}from"./editor.js";import{AgentHereSchema as m}from"./presence.js";import{PathSchema as p}from"./files.js";import{method as o,notification as t}from"./jsonrpc.js";import{HeldSchema as w,NoteFoundSchema as l,NotePickSchema as s,NotePictureSchema as g,NotePointSchema as f,NoteRectSchema as r,NoteShapeSchema as b}from"./notes.js";const i=e.strictObject({connection:e.string().min(1),message:e.unknown()});export const FRAME_METHODS={"note/hold":o(e.strictObject({selection:e.boolean().optional()}),w.extend({selected:e.array(s).optional()}),"Holds what moves by itself while the person marks a picture of it; says what is on show, and with `selection` what is selected in it."),"note/locate":o(e.strictObject({shape:b}),l,"What a mark is on: the editor's answer and every inset's under it, innermost first. Empty is an answer: the mark's place still goes."),"note/pick":o(e.strictObject({at:f}),e.strictObject({pick:s.optional()}),"The one thing in front at a point, with its edge: the innermost inset's under it that answers, else the editor's. None is an answer."),"note/pictures":o(e.strictObject({}),e.strictObject({pictures:e.array(g),uncovered:e.array(e.strictObject({name:e.string(),rect:r}))}),"The page as it shows now, drawn without the window's marks, then its insets' pictures, each at its rect, outermost first."),"note/release":o(e.strictObject({}),e.strictObject({}),"The person is done marking. Nothing starts by itself.")},WINDOW_NOTIFICATIONS={"editor/command":t(e.strictObject({command:e.string().min(1),open:e.boolean().optional()}),"A shortcut the window took, its header's Export or its agent's name, or a command of the editor's extension, for the editor to do as its own."),"editor/upstream":t(e.discriminatedUnion("from",[e.strictObject({from:e.literal("snapshot"),root:e.url()}),e.strictObject({from:e.literal("window"),connection:e.string().min(1)})]),"Where the page reads and writes from now: a read view, or the project's server through the window. Each is a new upstream: the page makes its watches again there and its editor takes what differs as a change on disk."),"editor/context":t(e.strictObject({mode:n,theme:d}),"The editor's mode and the theme the window draws in, as they are now: the page's editor hears them as its host's context and changes where it stands."),"editor/message":t(i,"A message of the project's server for the page.")},FRAME_NOTIFICATIONS={"editor/ready":t(e.strictObject({}),"The page is loaded: the window tells it its upstream and its context."),"editor/send":t(i,"A message of the page for the project's server."),"note/ready":t(e.strictObject({}),"The page's editor has given its surface: the page answers notes."),"note/gone":t(e.strictObject({}),"The page no longer answers notes: its editor went, or the page goes."),"window/key":t(e.strictObject({key:e.string(),code:e.string(),meta:e.boolean(),ctrl:e.boolean(),shift:e.boolean(),alt:e.boolean()}),"A key with ⌘ or Ctrl pressed in the page that its editor did not take: the window's shortcut (⌘⇧M, ⌘K), heard where the keys are in the page. A desktop shell's menu hears them itself, so a page framed there tells none."),"agent/ask":t(e.strictObject({text:e.string().min(1)}),"Words the editor puts before the person's agent, for them to go on and send."),"note/begin":t(e.strictObject({from:r.optional(),selection:e.boolean().optional()}),"The person asked for Mark up from the editor: the window shows its tools, or with `selection` begins with what is selected marked; `from` is what they pressed, in the page's viewport."),"share/begin":t(e.strictObject({}),"The person asked to share the item on show."),"edit/request":t(e.strictObject({}),"The person pressed an Edit of the page's own on a read-only page, or the page needs the machine for what they asked: the window wakes it. Never for a key pressed in the item."),"editor/place":t(e.strictObject({item:p,place:c}),"Where the person is in an item, as its editor says it, so the window opens it there again; the window keeps it unread."),"export/state":t(h,"How the item's exports go, for its Export button in the window's header."),"editor/state":t(e.strictObject({state:e.enum(a),message:e.string().optional()}),"Whether what the person typed is saved, for the window's header."),"agent/here":t(m,"The project's agent in the item on show and whether its editor follows it, for the window's header; its button asks back with `editor/command`'s `follow` or `unfollow`.")};
|
|
@@ -15,8 +15,8 @@ export type JobFailureReason = (typeof JOB_FAILURES)[number];
|
|
|
15
15
|
export declare const JobAboutSchema: z.ZodObject<{
|
|
16
16
|
kind: z.ZodEnum<{
|
|
17
17
|
studio: "studio";
|
|
18
|
-
project: "project";
|
|
19
18
|
agent: "agent";
|
|
19
|
+
project: "project";
|
|
20
20
|
piece: "piece";
|
|
21
21
|
plugin: "plugin";
|
|
22
22
|
skill: "skill";
|
|
@@ -30,8 +30,8 @@ export declare const JobSchema: z.ZodObject<{
|
|
|
30
30
|
about: z.ZodObject<{
|
|
31
31
|
kind: z.ZodEnum<{
|
|
32
32
|
studio: "studio";
|
|
33
|
-
project: "project";
|
|
34
33
|
agent: "agent";
|
|
34
|
+
project: "project";
|
|
35
35
|
piece: "piece";
|
|
36
36
|
plugin: "plugin";
|
|
37
37
|
skill: "skill";
|
|
@@ -40,20 +40,20 @@ export declare const JobSchema: z.ZodObject<{
|
|
|
40
40
|
id: z.ZodString;
|
|
41
41
|
}, z.core.$strict>;
|
|
42
42
|
what: z.ZodEnum<{
|
|
43
|
-
update: "update";
|
|
44
|
-
install: "install";
|
|
45
|
-
start: "start";
|
|
46
43
|
download: "download";
|
|
47
44
|
wake: "wake";
|
|
48
45
|
export: "export";
|
|
46
|
+
update: "update";
|
|
47
|
+
install: "install";
|
|
48
|
+
start: "start";
|
|
49
49
|
publish: "publish";
|
|
50
50
|
}>;
|
|
51
51
|
name: z.ZodOptional<z.ZodString>;
|
|
52
52
|
state: z.ZodEnum<{
|
|
53
53
|
failed: "failed";
|
|
54
|
+
queued: "queued";
|
|
54
55
|
running: "running";
|
|
55
56
|
paused: "paused";
|
|
56
|
-
queued: "queued";
|
|
57
57
|
done: "done";
|
|
58
58
|
cancelled: "cancelled";
|
|
59
59
|
}>;
|
|
@@ -40,12 +40,12 @@ export type SnapshotKind = (typeof SNAPSHOT_KINDS)[number];
|
|
|
40
40
|
export declare const StageFolderSchema: z.ZodString;
|
|
41
41
|
/** What a stage page loads from a folder of the tree (a CSP fetch directive's word): a list that grows. */
|
|
42
42
|
export declare const StageLoadSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
43
|
-
connect: "connect";
|
|
44
43
|
media: "media";
|
|
45
44
|
script: "script";
|
|
46
45
|
style: "style";
|
|
47
46
|
font: "font";
|
|
48
47
|
img: "img";
|
|
48
|
+
connect: "connect";
|
|
49
49
|
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
50
50
|
/**
|
|
51
51
|
* The folders of the tree the extensions serve, each with what the stage's
|
|
@@ -278,16 +278,16 @@ export declare const treeHref: (path: string) => string;
|
|
|
278
278
|
*/
|
|
279
279
|
export declare function stageCsp(tree: string, ancestors: readonly string[], routes?: Readonly<Record<string, readonly string[]>>): string;
|
|
280
280
|
/**
|
|
281
|
-
* The editors' page of a read view showing one item
|
|
281
|
+
* The editors' page of a read view showing one item in read mode, as the
|
|
282
282
|
* window frames it: `<origin>/editor/?item=<id>&embed=studio&snapshot=1`
|
|
283
|
-
* and the window's theme.
|
|
284
|
-
* the
|
|
285
|
-
*
|
|
283
|
+
* and the window's theme. Framed by a share's page (`share`,
|
|
284
|
+
* `embed=share`): the same read mode, with no window to tell it more or
|
|
285
|
+
* to go to another item. Opened at a place (`place`): where the person
|
|
286
286
|
* was in the item, as its editor said it (`place=`, its JSON).
|
|
287
287
|
*/
|
|
288
288
|
export declare function snapshotEditorUrl(origin: string, item: string, o?: {
|
|
289
289
|
theme?: "light" | "dark";
|
|
290
|
-
|
|
290
|
+
share?: boolean;
|
|
291
291
|
place?: Place | undefined;
|
|
292
292
|
}): string;
|
|
293
293
|
export declare const EXECUTOR_KINDS: readonly ["cloud", "computer"];
|
|
@@ -301,8 +301,8 @@ export declare const WORKED_ELSEWHERE = "worked_elsewhere";
|
|
|
301
301
|
/** Which executor works on a project, and whether it is the one asking. */
|
|
302
302
|
export declare const ExecutorSchema: z.ZodObject<{
|
|
303
303
|
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
304
|
-
computer: "computer";
|
|
305
304
|
cloud: "cloud";
|
|
305
|
+
computer: "computer";
|
|
306
306
|
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
307
307
|
here: z.ZodBoolean;
|
|
308
308
|
}, z.core.$strip>;
|
|
@@ -362,8 +362,8 @@ export declare const ProjectInfoSchema: z.ZodObject<{
|
|
|
362
362
|
}, z.core.$strip>>;
|
|
363
363
|
executor: z.ZodObject<{
|
|
364
364
|
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
365
|
-
computer: "computer";
|
|
366
365
|
cloud: "cloud";
|
|
366
|
+
computer: "computer";
|
|
367
367
|
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
368
368
|
here: z.ZodBoolean;
|
|
369
369
|
}, z.core.$strip>;
|
|
@@ -380,13 +380,76 @@ export declare const ProjectsResponseSchema: z.ZodObject<{
|
|
|
380
380
|
hostVersion: string;
|
|
381
381
|
} | null;
|
|
382
382
|
executor: {
|
|
383
|
-
kind: (string & z.core.$brand<"Unknown">) | "
|
|
383
|
+
kind: (string & z.core.$brand<"Unknown">) | "cloud" | "computer";
|
|
384
384
|
here: boolean;
|
|
385
385
|
};
|
|
386
386
|
}[], unknown[]>>;
|
|
387
387
|
}, z.core.$strip>;
|
|
388
388
|
/** `DELETE`: a project forgotten with its snapshots. */
|
|
389
389
|
export declare const projectPath: (id: string) => string;
|
|
390
|
+
/**
|
|
391
|
+
* `GET` (a person signed in): what the organization keeps in the cloud of
|
|
392
|
+
* what it may.
|
|
393
|
+
*/
|
|
394
|
+
export declare const STORAGE_PATH = "/api/storage";
|
|
395
|
+
export declare const StorageSchema: z.ZodObject<{
|
|
396
|
+
keptBytes: z.ZodNumber;
|
|
397
|
+
capBytes: z.ZodNullable<z.ZodNumber>;
|
|
398
|
+
}, z.core.$strip>;
|
|
399
|
+
export type Storage = z.infer<typeof StorageSchema>;
|
|
400
|
+
/** How many entries a page of the person's storage holds. */
|
|
401
|
+
export declare const STORAGE_PAGE_SIZE = 10;
|
|
402
|
+
/** A page (`?page=`, from 1) of the person's storage: its entries and how many there are in all. */
|
|
403
|
+
export declare const StoragePageSchema: z.ZodObject<{
|
|
404
|
+
page: z.ZodInt;
|
|
405
|
+
}, z.core.$strict>;
|
|
406
|
+
/** `GET ?page=`: the person's projects and their cloud Studio's home, the largest first. */
|
|
407
|
+
export declare const STORAGE_PROJECTS_PATH = "/api/storage/projects";
|
|
408
|
+
export declare const StoredProjectSchema: z.ZodObject<{
|
|
409
|
+
id: z.ZodString;
|
|
410
|
+
kind: z.ZodEnum<{
|
|
411
|
+
home: "home";
|
|
412
|
+
project: "project";
|
|
413
|
+
}>;
|
|
414
|
+
name: z.ZodString;
|
|
415
|
+
bytes: z.ZodNumber;
|
|
416
|
+
versions: z.ZodNumber;
|
|
417
|
+
madeAt: z.ZodNullable<z.ZodISODateTime>;
|
|
418
|
+
}, z.core.$strip>;
|
|
419
|
+
export type StoredProject = z.infer<typeof StoredProjectSchema>;
|
|
420
|
+
export declare const StoredProjectsSchema: z.ZodObject<{
|
|
421
|
+
items: z.ZodPipe<z.ZodArray<z.ZodUnknown>, z.ZodTransform<{
|
|
422
|
+
id: string;
|
|
423
|
+
kind: "home" | "project";
|
|
424
|
+
name: string;
|
|
425
|
+
bytes: number;
|
|
426
|
+
versions: number;
|
|
427
|
+
madeAt: string | null;
|
|
428
|
+
}[], unknown[]>>;
|
|
429
|
+
total: z.ZodNumber;
|
|
430
|
+
}, z.core.$strip>;
|
|
431
|
+
export type StoredProjects = z.infer<typeof StoredProjectsSchema>;
|
|
432
|
+
/** `GET ?page=`: the person's tools' inputs and outputs kept in the cloud, the largest first. */
|
|
433
|
+
export declare const STORAGE_FILES_PATH = "/api/storage/files";
|
|
434
|
+
export declare const StoredFileSchema: z.ZodObject<{
|
|
435
|
+
id: z.ZodString;
|
|
436
|
+
name: z.ZodString;
|
|
437
|
+
contentType: z.ZodString;
|
|
438
|
+
size: z.ZodNumber;
|
|
439
|
+
keptUntil: z.ZodISODateTime;
|
|
440
|
+
}, z.core.$strip>;
|
|
441
|
+
export type StoredFile = z.infer<typeof StoredFileSchema>;
|
|
442
|
+
export declare const StoredFilesSchema: z.ZodObject<{
|
|
443
|
+
items: z.ZodPipe<z.ZodArray<z.ZodUnknown>, z.ZodTransform<{
|
|
444
|
+
id: string;
|
|
445
|
+
name: string;
|
|
446
|
+
contentType: string;
|
|
447
|
+
size: number;
|
|
448
|
+
keptUntil: string;
|
|
449
|
+
}[], unknown[]>>;
|
|
450
|
+
total: z.ZodNumber;
|
|
451
|
+
}, z.core.$strip>;
|
|
452
|
+
export type StoredFiles = z.infer<typeof StoredFilesSchema>;
|
|
390
453
|
/**
|
|
391
454
|
* `PUT { kind }`: the project moved to another executor, answered as its
|
|
392
455
|
* `ProjectInfo`: to the person's cloud Studio from anywhere they are
|
|
@@ -397,8 +460,8 @@ export declare const projectPath: (id: string) => string;
|
|
|
397
460
|
export declare const projectExecutorPath: (id: string) => string;
|
|
398
461
|
export declare const ExecutorMoveSchema: z.ZodObject<{
|
|
399
462
|
kind: z.ZodEnum<{
|
|
400
|
-
computer: "computer";
|
|
401
463
|
cloud: "cloud";
|
|
464
|
+
computer: "computer";
|
|
402
465
|
}>;
|
|
403
466
|
}, z.core.$strict>;
|
|
404
467
|
export type ExecutorMove = z.infer<typeof ExecutorMoveSchema>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{STAGE_LOADS as
|
|
2
|
+
import{STAGE_LOADS as S}from"@allyhub/formats";import{z as e}from"zod";import{BlobSchema as $,Sha256Schema as h,TreeFileSchema as x,TreePathSchema as m}from"./blobs.js";import{placeParams as E}from"./editor.js";import{known as O,openEnum as g,readable as b}from"./open.js";export const SNAPSHOT_FORMAT=1,ConversationEntrySchema=e.object({sessionId:e.string().min(1),agent:e.string().min(1),title:e.string().optional(),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime(),transcript:h}),TranscriptSchema=e.object({sessionId:e.string().min(1),messages:e.array(e.object({method:e.string().min(1),params:e.unknown()}))}),SNAPSHOT_KINDS=["project","home"],StageFolderSchema=e.string().regex(/^[a-z][a-z0-9-]*\/$/u,"one lower-case word and /").refine(t=>!Object.values(SNAPSHOT_TREE).includes(t)&&!Object.values(SNAPSHOT_VIEW).includes(t),"a folder of the core's"),StageLoadSchema=g(S),StageRoutesSchema=e.record(e.string(),e.array(e.string()));const P=e.string().refine(t=>t.endsWith("/")&&m.safeParse(t.slice(0,-1)).success,"a folder of the tree, ending in /");export const ItemReachSchema=e.object({tree:e.array(m),files:e.array(m),own:e.record(m,x)}),SnapshotReachSchema=e.object({shared:e.array(P),items:e.record(e.string(),ItemReachSchema)}),SnapshotManifestSchema=e.object({format:e.literal(SNAPSHOT_FORMAT),kind:e.enum(SNAPSHOT_KINDS),project:e.object({name:e.string().min(1).max(255)}),host:e.object({version:e.string().min(1)}),madeAt:e.iso.datetime(),files:e.record(m,$),tree:e.record(m,x),conversations:e.array(ConversationEntrySchema),reach:SnapshotReachSchema.optional(),routes:StageRoutesSchema.optional()});export function scopedManifest(t,o){const s=t.reach,r=s!==void 0&&Object.hasOwn(s.items,o)?s.items[o]:void 0;if(s===void 0||r===void 0)return;const a={};for(const[n,c]of Object.entries(t.tree))s.shared.some(p=>n.startsWith(p))&&(a[n]=c);for(const n of r.tree){const c=Object.hasOwn(t.tree,n)?t.tree[n]:void 0;c!==void 0&&(a[n]=c)}Object.assign(a,r.own);const i={};for(const n of r.files){const c=Object.hasOwn(t.files,n)?t.files[n]:void 0;c!==void 0&&(i[n]=c)}return{format:t.format,kind:t.kind,project:t.project,host:t.host,madeAt:t.madeAt,files:i,tree:a,conversations:[],...t.routes===void 0?{}:{routes:t.routes}}}export const SNAPSHOT_SKIPPED=["node_modules",".allyhub/cache",".allyhub/out"],SNAPSHOT_TREE={editor:"editor/",runtime:"runtime/",build:"build/",media:"media/",matte:"matte/",stills:"stills/",answers:"answers/",previews:"previews/"};function d(t){return Array.isArray(t)?t.map(d):t!==null&&typeof t=="object"?Object.fromEntries(Object.keys(t).sort().map(o=>[o,d(t[o])])):t}export const snapshotAnswerPath=(t,o)=>`${SNAPSHOT_TREE.answers}${t}/${encodeURIComponent(JSON.stringify(d(o??{})))}.json`,RecordedAnswerSchema=e.object({result:e.unknown().optional(),error:e.object({code:e.number(),message:e.string(),data:e.unknown().optional()}).optional()}),recordedReadPath=(t,o)=>snapshotAnswerPath(t,Object.fromEntries(Object.entries(o??{}).filter(([s,r])=>s!=="folder"&&r!==void 0))),stillPath=t=>`${SNAPSHOT_TREE.stills}${t}.webp`,stillsIndexPath=(t,o)=>`${SNAPSHOT_TREE.stills}index/${encodeURIComponent(t)}/${encodeURIComponent(o)}.json`,StillsIndexSchema=e.object({stills:e.record(e.string(),e.string().regex(/^[0-9a-f]{64}$/u))}),stillsIndexKey=t=>JSON.stringify(d(t));const A=e.object({name:e.string(),props:e.record(e.string(),e.unknown()),width:e.number().positive(),height:e.number().positive(),t:e.number().nonnegative()});export const KindSnapshotSchema=e.object({stills:e.array(e.object({version:e.string(),components:e.array(A)})).optional(),shows:e.object({media:e.array(e.string()),data:e.array(e.string())}).optional(),routes:e.record(e.string(),e.array(e.string().min(1))).optional(),page:e.object({folder:e.string().optional(),file:e.string().optional()}).optional()}),snapshotPreviewPath=t=>`${SNAPSHOT_TREE.previews}${encodeURIComponent(t)}.json`,TREE_PAGES={stage:`${SNAPSHOT_TREE.runtime}stage.html`,viewer:`${SNAPSHOT_TREE.runtime}viewer.html`,probe:`${SNAPSHOT_TREE.runtime}probe.html`},pieceSourcePath=t=>`${SNAPSHOT_TREE.build}sources/${encodeURIComponent(t)}.json`,treeHref=t=>t.split("/").map(encodeURIComponent).join("/");export function stageCsp(t,o,s={}){const r=l=>`${t}${l}`,a=r(SNAPSHOT_TREE.runtime),i=r(SNAPSHOT_TREE.build),n=r(SNAPSHOT_TREE.media),c=r(SNAPSHOT_TREE.matte),p=l=>Object.entries(s).filter(([u,j])=>StageFolderSchema.safeParse(u).success&&j.some(f=>O(S,f)&&f===l)).map(([u])=>` ${r(u)}`).join("");return["default-src 'none'",`script-src 'unsafe-eval' 'wasm-unsafe-eval' ${a} ${i}${p("script")}`,"worker-src blob:",`style-src 'unsafe-inline' ${a} ${i}${p("style")}`,`font-src ${a} ${i} ${n}${p("font")} data:`,`img-src ${n} ${i}${p("img")} data: blob:`,`media-src ${n} ${c}${p("media")} blob:`,`connect-src ${n} ${c} ${i} ${a}${p("connect")} blob: data:`,`frame-ancestors ${o.length>0?o.join(" "):"'none'"}`].join("; ")}export function snapshotEditorUrl(t,o,s={}){const r=Object.entries({item:o,embed:s.share===!0?"share":"studio",snapshot:"1",...s.theme===void 0?{}:{theme:s.theme},...E(s.place)}).map(([a,i])=>`${a}=${encodeURIComponent(i)}`);return`${t.replace(/\/$/u,"")}/${SNAPSHOT_TREE.editor}?${r.join("&")}`}export const EXECUTOR_KINDS=["cloud","computer"],COMPUTER_HEADER="x-allyhub-computer",ComputerIdSchema=e.string().regex(/^[A-Za-z0-9_-]{16,64}$/u),WORKED_ELSEWHERE="worked_elsewhere",ExecutorSchema=e.object({kind:g(EXECUTOR_KINDS),here:e.boolean()}),SNAPSHOT_BLOBS_PATH="/api/snapshots/blobs",SNAPSHOTS_PATH="/api/snapshots",SnapshotCreateSchema=e.strictObject({project:e.strictObject({id:e.string().min(1).optional(),kind:e.enum(SNAPSHOT_KINDS),name:e.string().min(1).max(255)}),manifest:h}),SnapshotCreatedSchema=e.object({id:e.string().min(1),projectId:e.string().min(1)}),SnapshotMissingSchema=e.object({missing:e.array(h)}),PROJECTS_PATH="/api/projects",SnapshotInfoSchema=e.object({id:e.string().min(1),madeAt:e.iso.datetime(),hostVersion:e.string()}),ProjectInfoSchema=e.object({id:e.string().min(1),kind:e.enum(SNAPSHOT_KINDS),name:e.string(),latest:SnapshotInfoSchema.nullable(),executor:ExecutorSchema}),ProjectsResponseSchema=e.object({projects:b(ProjectInfoSchema)}),projectPath=t=>`${PROJECTS_PATH}/${encodeURIComponent(t)}`,STORAGE_PATH="/api/storage",StorageSchema=e.object({keptBytes:e.number(),capBytes:e.number().nullable()}),STORAGE_PAGE_SIZE=10,StoragePageSchema=e.strictObject({page:e.int().min(1)}),STORAGE_PROJECTS_PATH=`${STORAGE_PATH}/projects`,StoredProjectSchema=e.object({id:e.string().min(1),kind:e.enum(SNAPSHOT_KINDS),name:e.string(),bytes:e.number(),versions:e.number(),madeAt:e.iso.datetime().nullable()}),StoredProjectsSchema=e.object({items:b(StoredProjectSchema),total:e.number()}),STORAGE_FILES_PATH=`${STORAGE_PATH}/files`,StoredFileSchema=e.object({id:e.string().min(1),name:e.string(),contentType:e.string(),size:e.number(),keptUntil:e.iso.datetime()}),StoredFilesSchema=e.object({items:b(StoredFileSchema),total:e.number()}),projectExecutorPath=t=>`${projectPath(t)}/executor`,ExecutorMoveSchema=e.strictObject({kind:e.enum(EXECUTOR_KINDS)}),snapshotViewPath=t=>`${SNAPSHOTS_PATH}/${encodeURIComponent(t)}/view`,SnapshotViewSchema=e.object({origin:e.url(),expiresAt:e.iso.datetime()}),SNAPSHOT_VIEW={manifest:"manifest.json",files:"files/",pages:"pages/",conversations:"conversations/"},PAGE_CSP=["sandbox allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox","default-src 'self' data: blob:","script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:","style-src 'self' 'unsafe-inline'","img-src 'self' data: blob:","font-src 'self' data:","connect-src 'self' data: blob:","media-src 'self' data: blob:"].join("; "),NEEDS_MACHINE=-32010,isNeedsMachine=t=>typeof t=="object"&&t!==null&&t.code===NEEDS_MACHINE,ELSEWHERE=-32011,CHANGED_HERE=-32012,MoveChangesSchema=e.object({changed:e.array(e.string())});
|
|
@@ -72,8 +72,8 @@ export declare const ExportJobSchema: z.ZodObject<{
|
|
|
72
72
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
73
73
|
state: z.ZodEnum<{
|
|
74
74
|
failed: "failed";
|
|
75
|
-
running: "running";
|
|
76
75
|
queued: "queued";
|
|
76
|
+
running: "running";
|
|
77
77
|
done: "done";
|
|
78
78
|
cancelled: "cancelled";
|
|
79
79
|
}>;
|
|
@@ -283,8 +283,8 @@ export declare const PROJECT_TOOLS: {
|
|
|
283
283
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
284
284
|
state: z.ZodEnum<{
|
|
285
285
|
failed: "failed";
|
|
286
|
-
running: "running";
|
|
287
286
|
queued: "queued";
|
|
287
|
+
running: "running";
|
|
288
288
|
done: "done";
|
|
289
289
|
cancelled: "cancelled";
|
|
290
290
|
}>;
|
|
@@ -305,8 +305,8 @@ export declare const PROJECT_TOOLS: {
|
|
|
305
305
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
306
306
|
state: z.ZodEnum<{
|
|
307
307
|
failed: "failed";
|
|
308
|
-
running: "running";
|
|
309
308
|
queued: "queued";
|
|
309
|
+
running: "running";
|
|
310
310
|
done: "done";
|
|
311
311
|
cancelled: "cancelled";
|
|
312
312
|
}>;
|
|
@@ -420,8 +420,8 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
420
420
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
421
421
|
state: z.ZodEnum<{
|
|
422
422
|
failed: "failed";
|
|
423
|
-
running: "running";
|
|
424
423
|
queued: "queued";
|
|
424
|
+
running: "running";
|
|
425
425
|
done: "done";
|
|
426
426
|
cancelled: "cancelled";
|
|
427
427
|
}>;
|
|
@@ -448,8 +448,8 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
448
448
|
about: z.ZodObject<{
|
|
449
449
|
kind: z.ZodEnum<{
|
|
450
450
|
studio: "studio";
|
|
451
|
-
project: "project";
|
|
452
451
|
agent: "agent";
|
|
452
|
+
project: "project";
|
|
453
453
|
piece: "piece";
|
|
454
454
|
plugin: "plugin";
|
|
455
455
|
skill: "skill";
|
|
@@ -458,20 +458,20 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
458
458
|
id: z.ZodString;
|
|
459
459
|
}, z.core.$strict>;
|
|
460
460
|
what: z.ZodEnum<{
|
|
461
|
-
update: "update";
|
|
462
|
-
install: "install";
|
|
463
|
-
start: "start";
|
|
464
461
|
download: "download";
|
|
465
462
|
wake: "wake";
|
|
466
463
|
export: "export";
|
|
464
|
+
update: "update";
|
|
465
|
+
install: "install";
|
|
466
|
+
start: "start";
|
|
467
467
|
publish: "publish";
|
|
468
468
|
}>;
|
|
469
469
|
name: z.ZodOptional<z.ZodString>;
|
|
470
470
|
state: z.ZodEnum<{
|
|
471
471
|
failed: "failed";
|
|
472
|
+
queued: "queued";
|
|
472
473
|
running: "running";
|
|
473
474
|
paused: "paused";
|
|
474
|
-
queued: "queued";
|
|
475
475
|
done: "done";
|
|
476
476
|
cancelled: "cancelled";
|
|
477
477
|
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SheetWorksheet } from "@allyhub/formats";
|
|
2
|
+
/** A cell's Note as sheet.yaml holds it: its text and, when it is a person's, its author. */
|
|
3
|
+
export interface CellNote {
|
|
4
|
+
text: string;
|
|
5
|
+
author?: string;
|
|
6
|
+
}
|
|
7
|
+
/** The Note on a cell, if it has one. */
|
|
8
|
+
export declare function noteAt(spec: SheetWorksheet, row: number, col: number): CellNote | undefined;
|
|
9
|
+
/** The link over a cell, if one is: an address on the web, or `#Sheet!A1`. */
|
|
10
|
+
export declare function linkAt(spec: SheetWorksheet, row: number, col: number): {
|
|
11
|
+
range: string;
|
|
12
|
+
to: string;
|
|
13
|
+
} | undefined;
|
|
14
|
+
//# sourceMappingURL=annotations.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{cellName as f,readArea as u}from"./address.js";export function noteAt(o,n,r){const t=o.notes?.[f({row:n,col:r})];if(t!==void 0)return typeof t=="string"?{text:t}:{text:t.text,...t.author?{author:t.author}:{}}}export function linkAt(o,n,r){for(const[t,i]of Object.entries(o.links??{})){const e=u(t);if(e&&n>=e.top&&n<=e.bottom&&r>=e.left&&r<=e.right)return{range:t,to:i}}}
|