@allyhub/sdk 0.10.0 → 0.12.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  3. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  4. package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +7 -0
  5. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  6. package/dist/node_modules/@allyhub/formats/dist/note-shape.d.ts +20 -0
  7. package/dist/node_modules/@allyhub/formats/dist/note-shape.js +1 -1
  8. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  9. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  10. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  11. package/dist/node_modules/@allyhub/image-sdk/dist/index.d.ts +1 -1
  12. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  13. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  14. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  15. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +2 -0
  16. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +1 -1
  17. package/dist/node_modules/@allyhub/piece/dist/page/index.js +1 -1
  18. package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +14 -1
  19. package/dist/node_modules/@allyhub/piece/dist/page/locate.js +1 -1
  20. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +12 -0
  21. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  22. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +22 -5
  23. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  24. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +56 -0
  25. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  26. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +57 -9
  27. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  28. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +6 -0
  29. package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
  30. package/dist/node_modules/@allyhub/protocol/dist/errors.d.ts +7 -0
  31. package/dist/node_modules/@allyhub/protocol/dist/errors.js +2 -0
  32. package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +328 -0
  33. package/dist/node_modules/@allyhub/protocol/dist/events.js +2 -0
  34. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +61 -1
  35. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  36. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +2 -1
  37. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  38. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +2 -2
  39. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +41 -3
  40. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  41. package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
  42. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +21 -4
  43. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  44. package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +7 -0
  45. package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
  46. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +12 -0
  47. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  48. package/dist/node_modules/@allyhub/protocol/package.json +1 -5
  49. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  50. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  51. package/dist/node_modules/@allyhub/sheet/dist/export.d.ts +0 -8
  52. package/dist/node_modules/@allyhub/sheet/dist/export.js +2 -4
  53. package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +1 -1
  54. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  55. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  56. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  57. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  58. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  59. package/docs/README.md +2 -0
  60. package/docs/defaults.md +10 -2
  61. package/docs/docs.md +4 -4
  62. package/docs/image.md +3 -3
  63. package/docs/linkedin.md +96 -0
  64. package/docs/reports.md +89 -0
  65. package/docs/sheets.md +1 -1
  66. package/docs/x.md +1 -1
  67. package/package.json +1 -1
  68. package/dist/node_modules/@allyhub/protocol/dist/browser-bridge.d.ts +0 -337
  69. package/dist/node_modules/@allyhub/protocol/dist/browser-bridge.js +0 -2
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { pointsOf, mapShape, touches, type NoteShape } from "@allyhub/formats";
2
+ import { insideOutline, mapOutline, mapShape, outlineBox, pointsOf, rectOutline, roundOutline, touches, turnedOutline, type NoteOutline, type NoteShape } from "@allyhub/formats";
3
3
  export declare const NoteRectSchema: z.ZodObject<{
4
4
  x: z.ZodNumber;
5
5
  y: z.ZodNumber;
@@ -46,8 +46,8 @@ export declare const NoteShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
46
46
  y: z.ZodNumber;
47
47
  }, z.core.$strict>>;
48
48
  }, z.core.$strict>], "kind">;
49
- export { mapShape, pointsOf, touches };
50
- export type { NoteShape };
49
+ export { insideOutline, mapOutline, mapShape, outlineBox, pointsOf, rectOutline, roundOutline, touches, turnedOutline, };
50
+ export type { NoteOutline, NoteShape };
51
51
  /** Where to change something: a project's file, and its line. */
52
52
  export declare const NoteSourceSchema: z.ZodObject<{
53
53
  path: z.ZodString;
@@ -135,6 +135,38 @@ export declare const NoteFoundSchema: z.ZodObject<{
135
135
  where: z.ZodOptional<z.ZodString>;
136
136
  }, z.core.$strict>;
137
137
  export type NoteFound = z.infer<typeof NoteFoundSchema>;
138
+ /**
139
+ * An element a person picked rather than drew round (docs/design/notes.md,
140
+ * "Select"): what it is, and its edge as it is drawn, closed rings of
141
+ * points in px of the surface. The host draws the edge as the mark and
142
+ * passes the element on unread.
143
+ */
144
+ export declare const NotePickSchema: z.ZodObject<{
145
+ element: z.ZodObject<{
146
+ name: z.ZodString;
147
+ source: z.ZodOptional<z.ZodObject<{
148
+ path: z.ZodString;
149
+ line: z.ZodOptional<z.ZodInt>;
150
+ endLine: z.ZodOptional<z.ZodInt>;
151
+ }, z.core.$strict>>;
152
+ text: z.ZodOptional<z.ZodString>;
153
+ regions: z.ZodOptional<z.ZodArray<z.ZodObject<{
154
+ in: z.ZodString;
155
+ file: z.ZodOptional<z.ZodString>;
156
+ width: z.ZodNumber;
157
+ height: z.ZodNumber;
158
+ path: z.ZodString;
159
+ area: z.ZodBoolean;
160
+ scale: z.ZodNumber;
161
+ }, z.core.$strict>>>;
162
+ }, z.core.$strict>;
163
+ outline: z.ZodArray<z.ZodArray<z.ZodObject<{
164
+ x: z.ZodNumber;
165
+ y: z.ZodNumber;
166
+ }, z.core.$strict>>>;
167
+ where: z.ZodOptional<z.ZodString>;
168
+ }, z.core.$strict>;
169
+ export type NotePick = z.infer<typeof NotePickSchema>;
138
170
  /**
139
171
  * What every editor gives its host for notes on it, for as long as it is on
140
172
  * show (docs/design/notes.md, "The contract"): Mark up takes a picture of
@@ -149,6 +181,10 @@ export interface NoteSurface {
149
181
  hold(): Promise<Held>;
150
182
  /** What a mark is on, among what the editor draws in the page itself; insets answer for theirs. Empty is an answer. */
151
183
  locate(mark: NoteShape): Promise<NoteFound>;
184
+ /** The one thing in front at a point, among what the editor draws in the page itself, with its edge; none where there is nothing to pick. */
185
+ pick?(at: NotePoint): Promise<NotePick | undefined>;
186
+ /** What the person has selected in the editor now, each as a pick: what Mark up asked from a selection marks. None where nothing is. */
187
+ selected?(): Promise<NotePick[]>;
152
188
  /** The person is done. Nothing starts by itself: a video that was paused stays paused. */
153
189
  release?(): void;
154
190
  }
@@ -166,6 +202,8 @@ export interface NoteInset {
166
202
  pictures?(): Promise<NotePicture[]>;
167
203
  /** What a mark (px of the page) is on inside it. */
168
204
  locate?(mark: NoteShape): Promise<NoteFound>;
205
+ /** The one thing in front at a point (px of the page) inside it, with its edge. */
206
+ pick?(at: NotePoint): Promise<NotePick | undefined>;
169
207
  /** Stops what moves by itself in it. */
170
208
  hold?(): Promise<void>;
171
209
  release?(): void;
@@ -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{pointsOf as i,mapShape as o,touches as n}from"@allyhub/formats";import{PathSchema as e}from"./files.js";export const NoteRectSchema=t.strictObject({x:t.number(),y:t.number(),width:t.number().nonnegative(),height:t.number().nonnegative()}),NotePointSchema=t.strictObject({x:t.number(),y:t.number()}),NoteShapeSchema=t.discriminatedUnion("kind",[t.strictObject({kind:t.literal("box"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("round"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("arrow"),from:NotePointSchema,to:NotePointSchema}),t.strictObject({kind:t.literal("line"),points:t.array(NotePointSchema).min(1)})]);export{o as mapShape,i as pointsOf,n as touches};export const NoteSourceSchema=t.strictObject({path:e,line:t.int().positive().optional(),endLine:t.int().positive().optional()}),HeldSchema=t.strictObject({key:t.string().min(1),what:t.string(),source:NoteSourceSchema.optional()}),NotePictureSchema=t.strictObject({rect:NoteRectSchema.optional(),mime:t.string().min(1),data:t.string().min(1)}),NoteRegionSchema=t.strictObject({in:t.string().min(1),file:e.optional(),width:t.number().positive(),height:t.number().positive(),path:t.string().min(1),area:t.boolean(),scale:t.number().positive()}),NoteElementSchema=t.strictObject({name:t.string().min(1),source:NoteSourceSchema.optional(),text:t.string().optional(),regions:t.array(NoteRegionSchema).optional()}),NoteFoundSchema=t.strictObject({elements:t.array(NoteElementSchema),where:t.string().optional()});
2
+ import{z as t}from"zod";import{insideOutline as i,mapOutline as n,mapShape as o,outlineBox as r,pointsOf as c,rectOutline as a,roundOutline as s,touches as m,turnedOutline as p}from"@allyhub/formats";import{PathSchema as e}from"./files.js";export const NoteRectSchema=t.strictObject({x:t.number(),y:t.number(),width:t.number().nonnegative(),height:t.number().nonnegative()}),NotePointSchema=t.strictObject({x:t.number(),y:t.number()}),NoteShapeSchema=t.discriminatedUnion("kind",[t.strictObject({kind:t.literal("box"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("round"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("arrow"),from:NotePointSchema,to:NotePointSchema}),t.strictObject({kind:t.literal("line"),points:t.array(NotePointSchema).min(1)})]);export{i as insideOutline,n as mapOutline,o as mapShape,r as outlineBox,c as pointsOf,a as rectOutline,s as roundOutline,m as touches,p as turnedOutline};export const NoteSourceSchema=t.strictObject({path:e,line:t.int().positive().optional(),endLine:t.int().positive().optional()}),HeldSchema=t.strictObject({key:t.string().min(1),what:t.string(),source:NoteSourceSchema.optional()}),NotePictureSchema=t.strictObject({rect:NoteRectSchema.optional(),mime:t.string().min(1),data:t.string().min(1)}),NoteRegionSchema=t.strictObject({in:t.string().min(1),file:e.optional(),width:t.number().positive(),height:t.number().positive(),path:t.string().min(1),area:t.boolean(),scale:t.number().positive()}),NoteElementSchema=t.strictObject({name:t.string().min(1),source:NoteSourceSchema.optional(),text:t.string().optional(),regions:t.array(NoteRegionSchema).optional()}),NoteFoundSchema=t.strictObject({elements:t.array(NoteElementSchema),where:t.string().optional()}),NotePickSchema=t.strictObject({element:NoteElementSchema,outline:t.array(t.array(NotePointSchema).min(3)).min(1),where:t.string().optional()});
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{ACCOUNT_CALLS as E}from"./account.js";import{ACCOUNT_PATH as O,BROWSER_LINK_PATH as _,METADATA_PATH as i}from"./auth.js";import{CATALOG_PATH as r,FILES_PATH as e,LLM_MESSAGES_PATH as H,LLM_MODELS_PATH as I}from"./cloud.js";import{SHARES_PATH as T}from"./shares.js";import{PROJECTS_PATH as p,SNAPSHOTS_PATH as a,SNAPSHOT_BLOBS_PATH as L}from"./snapshots.js";import{SITES_PATH as t}from"./sites.js";import{MAIL_ALIASES_PATH as G,MAIL_MESSAGES_PATH as o,MAIL_PATH as n,MAIL_SEND_PATH as s,MAIL_SETTINGS_PATH as U}from"./mail.js";import{ORGANIZATIONS_PATH as $,STUDIO_OPEN_PATH as D,STUDIO_PATH as d,STUDIO_TICKET_PATH as l,STUDIO_WAKE_PATH as f,STUDIO_WAKES_PATH as C,STUDIO_PAUSE_PATH as M,STUDIO_POLICY_PATH as P,STUDIO_RESTART_PATH as N,STUDIO_PREPARE_PATH as c}from"./teams.js";export const CLIENT_ROUTES=[{method:"GET",path:i},{method:"GET",path:O},{method:"POST",path:_},{method:"GET",path:I},{method:"POST",path:H},{method:"GET",path:r},{method:"POST",path:"/api/tools/:name/calls"},{method:"GET",path:"/api/calls/:id"},{method:"POST",path:e},{method:"POST",path:`${e}/:id/done`},{method:"GET",path:`${e}/:id/content`},{method:"GET",path:$},{method:"GET",path:d},{method:"DELETE",path:d},{method:"PATCH",path:d},{method:"POST",path:N},{method:"GET",path:P},{method:"PUT",path:P},{method:"POST",path:D},{method:"POST",path:l},{method:"PUT",path:f},{method:"POST",path:C},{method:"POST",path:M},{method:"POST",path:c},{method:"POST",path:L},{method:"POST",path:a},{method:"POST",path:`${a}/:id/view`},{method:"GET",path:p},{method:"DELETE",path:`${p}/:id`},{method:"PUT",path:`${p}/:id/executor`},{method:"POST",path:T},{method:"GET",path:T},{method:"PATCH",path:`${T}/:id`},{method:"DELETE",path:`${T}/:id`},{method:"GET",path:"/api/s/:token"},{method:"POST",path:"/api/s/:token/report"},...Object.values(E).map(h=>({method:h.http,path:h.route})),{method:"GET",path:t},{method:"POST",path:t},{method:"GET",path:`${t}/:id`},{method:"DELETE",path:`${t}/:id`},{method:"POST",path:`${t}/:id/deployments`},{method:"POST",path:`${t}/:id/blobs`},{method:"PUT",path:`${t}/:id/live`},{method:"DELETE",path:`${t}/:id/live`},{method:"PUT",path:`${t}/:id/settings`},{method:"GET",path:n},{method:"POST",path:G},{method:"GET",path:o},{method:"GET",path:`${o}/:id`},{method:"GET",path:`${o}/:id/raw`},{method:"POST",path:`${o}/:id/reply`},{method:"POST",path:s},{method:"PUT",path:U}],probePath=h=>h.path.replace(/:[A-Za-z]+/gu,"probe");export function routeMissing(h,S,A){if(S!==404)return!1;const m=A.error;return m?.code==="not_found"&&m.message===`There is no ${h.method} ${probePath(h)}.`}
2
+ import{ACCOUNT_CALLS as E}from"./account.js";import{ACCOUNT_PATH as _,BROWSER_LINK_PATH as O,METADATA_PATH as r,SIGN_IN_LINK_PATH as i}from"./auth.js";import{CATALOG_PATH as H,FILES_PATH as e,LLM_MESSAGES_PATH as I,LLM_MODELS_PATH as L}from"./cloud.js";import{ERRORS_PATH as G}from"./errors.js";import{EVENTS_PATH as n}from"./events.js";import{SHARES_PATH as T}from"./shares.js";import{PROJECTS_PATH as p,SNAPSHOTS_PATH as a,SNAPSHOT_BLOBS_PATH as s}from"./snapshots.js";import{SITES_PATH as t}from"./sites.js";import{MAIL_ALIASES_PATH as U,MAIL_MESSAGES_PATH as o,MAIL_PATH as $,MAIL_SEND_PATH as D,MAIL_SETTINGS_PATH as N}from"./mail.js";import{ORGANIZATIONS_PATH as f,STUDIO_OPEN_PATH as l,STUDIO_PATH as m,STUDIO_TICKET_PATH as R,STUDIO_WAKE_PATH as C,STUDIO_WAKES_PATH as M,STUDIO_PAUSE_PATH as c,STUDIO_POLICY_PATH as P,STUDIO_RESTART_PATH as u,STUDIO_PREPARE_PATH as b}from"./teams.js";export const CLIENT_ROUTES=[{method:"GET",path:r},{method:"GET",path:_},{method:"POST",path:O},{method:"POST",path:i},{method:"GET",path:L},{method:"POST",path:I},{method:"GET",path:H},{method:"POST",path:"/api/tools/:name/calls"},{method:"GET",path:"/api/calls/:id"},{method:"POST",path:n},{method:"POST",path:G},{method:"POST",path:e},{method:"POST",path:`${e}/:id/done`},{method:"GET",path:`${e}/:id/content`},{method:"GET",path:f},{method:"GET",path:m},{method:"DELETE",path:m},{method:"PATCH",path:m},{method:"POST",path:u},{method:"GET",path:P},{method:"PUT",path:P},{method:"POST",path:l},{method:"POST",path:R},{method:"PUT",path:C},{method:"POST",path:M},{method:"POST",path:c},{method:"POST",path:b},{method:"POST",path:s},{method:"POST",path:a},{method:"POST",path:`${a}/:id/view`},{method:"GET",path:p},{method:"DELETE",path:`${p}/:id`},{method:"PUT",path:`${p}/:id/executor`},{method:"POST",path:T},{method:"GET",path:T},{method:"PATCH",path:`${T}/:id`},{method:"DELETE",path:`${T}/:id`},{method:"GET",path:"/api/s/:token"},{method:"POST",path:"/api/s/:token/report"},...Object.values(E).map(h=>({method:h.http,path:h.route})),{method:"GET",path:t},{method:"POST",path:t},{method:"GET",path:`${t}/:id`},{method:"DELETE",path:`${t}/:id`},{method:"POST",path:`${t}/:id/deployments`},{method:"POST",path:`${t}/:id/blobs`},{method:"PUT",path:`${t}/:id/live`},{method:"DELETE",path:`${t}/:id/live`},{method:"PUT",path:`${t}/:id/settings`},{method:"GET",path:$},{method:"POST",path:U},{method:"GET",path:o},{method:"GET",path:`${o}/:id`},{method:"GET",path:`${o}/:id/raw`},{method:"POST",path:`${o}/:id/reply`},{method:"POST",path:D},{method:"PUT",path:N}],probePath=h=>h.path.replace(/:[A-Za-z]+/gu,"probe");export function routeMissing(h,S,A){if(S!==404)return!1;const d=A.error;return d?.code==="not_found"&&d.message===`There is no ${h.method} ${probePath(h)}.`}
@@ -229,6 +229,10 @@ export declare const KindSnapshotSchema: z.ZodObject<{
229
229
  data: z.ZodArray<z.ZodString>;
230
230
  }, z.core.$strip>>;
231
231
  routes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
232
+ page: z.ZodOptional<z.ZodObject<{
233
+ folder: z.ZodOptional<z.ZodString>;
234
+ file: z.ZodOptional<z.ZodString>;
235
+ }, z.core.$strip>>;
232
236
  }, z.core.$strip>;
233
237
  export type KindSnapshot = z.infer<typeof KindSnapshotSchema>;
234
238
  /** An item's gallery preview in the tree: its `Preview` (a picture, words or rows), as JSON. */
@@ -297,8 +301,8 @@ export declare const WORKED_ELSEWHERE = "worked_elsewhere";
297
301
  /** Which executor works on a project, and whether it is the one asking. */
298
302
  export declare const ExecutorSchema: z.ZodObject<{
299
303
  kind: z.ZodUnion<readonly [z.ZodEnum<{
300
- cloud: "cloud";
301
304
  computer: "computer";
305
+ cloud: "cloud";
302
306
  }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
303
307
  here: z.ZodBoolean;
304
308
  }, z.core.$strip>;
@@ -358,8 +362,8 @@ export declare const ProjectInfoSchema: z.ZodObject<{
358
362
  }, z.core.$strip>>;
359
363
  executor: z.ZodObject<{
360
364
  kind: z.ZodUnion<readonly [z.ZodEnum<{
361
- cloud: "cloud";
362
365
  computer: "computer";
366
+ cloud: "cloud";
363
367
  }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
364
368
  here: z.ZodBoolean;
365
369
  }, z.core.$strip>;
@@ -376,7 +380,7 @@ export declare const ProjectsResponseSchema: z.ZodObject<{
376
380
  hostVersion: string;
377
381
  } | null;
378
382
  executor: {
379
- kind: (string & z.core.$brand<"Unknown">) | "cloud" | "computer";
383
+ kind: (string & z.core.$brand<"Unknown">) | "computer" | "cloud";
380
384
  here: boolean;
381
385
  };
382
386
  }[], unknown[]>>;
@@ -393,8 +397,8 @@ export declare const projectPath: (id: string) => string;
393
397
  export declare const projectExecutorPath: (id: string) => string;
394
398
  export declare const ExecutorMoveSchema: z.ZodObject<{
395
399
  kind: z.ZodEnum<{
396
- cloud: "cloud";
397
400
  computer: "computer";
401
+ cloud: "cloud";
398
402
  }>;
399
403
  }, z.core.$strict>;
400
404
  export type ExecutorMove = z.infer<typeof ExecutorMoveSchema>;
@@ -414,9 +418,22 @@ export type SnapshotView = z.infer<typeof SnapshotViewSchema>;
414
418
  /** A read view's paths besides the tree's. */
415
419
  export declare const SNAPSHOT_VIEW: {
416
420
  readonly manifest: "manifest.json";
421
+ /** The project's files as text, sandboxed: they run nothing. */
417
422
  readonly files: "files/";
423
+ /**
424
+ * The project's files as an item's page loads them (`items/page`): each
425
+ * as its type, at an opaque origin, loading nothing but this view's own
426
+ * files (PAGE_CSP).
427
+ */
428
+ readonly pages: "pages/";
418
429
  readonly conversations: "conversations/";
419
430
  };
431
+ /**
432
+ * An item's page as a read view serves it (`pages/`): sandboxed to an
433
+ * opaque origin, so it reaches nothing of the page that frames it, its
434
+ * scripts running, and loading nothing but its own view's files.
435
+ */
436
+ export declare const PAGE_CSP: string;
420
437
  /**
421
438
  * The JSON-RPC error a read-only host answers for what needs the machine
422
439
  * (a change, an export, a check run, the agent): the window offers to wake
@@ -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 b}from"@allyhub/formats";import{z as e}from"zod";import{BlobSchema as g,Sha256Schema as u,TreeFileSchema as S,TreePathSchema as m}from"./blobs.js";import{placeParams as $}from"./editor.js";import{known as E,openEnum as x,readable as w}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:u}),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=x(b),StageRoutesSchema=e.record(e.string(),e.array(e.string()));const O=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,S)}),SnapshotReachSchema=e.object({shared:e.array(O),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,g),tree:e.record(m,S),conversations:e.array(ConversationEntrySchema),reach:SnapshotReachSchema.optional(),routes:StageRoutesSchema.optional()});export function scopedManifest(t,o){const r=t.reach,s=r!==void 0&&Object.hasOwn(r.items,o)?r.items[o]:void 0;if(r===void 0||s===void 0)return;const i={};for(const[n,a]of Object.entries(t.tree))r.shared.some(p=>n.startsWith(p))&&(i[n]=a);for(const n of s.tree){const a=Object.hasOwn(t.tree,n)?t.tree[n]:void 0;a!==void 0&&(i[n]=a)}Object.assign(i,s.own);const c={};for(const n of s.files){const a=Object.hasOwn(t.files,n)?t.files[n]:void 0;a!==void 0&&(c[n]=a)}return{format:t.format,kind:t.kind,project:t.project,host:t.host,madeAt:t.madeAt,files:c,tree:i,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(([r,s])=>r!=="folder"&&s!==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 P=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(P)})).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()}),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,r={}){const s=l=>`${t}${l}`,i=s(SNAPSHOT_TREE.runtime),c=s(SNAPSHOT_TREE.build),n=s(SNAPSHOT_TREE.media),a=s(SNAPSHOT_TREE.matte),p=l=>Object.entries(r).filter(([h,j])=>StageFolderSchema.safeParse(h).success&&j.some(f=>E(b,f)&&f===l)).map(([h])=>` ${s(h)}`).join("");return["default-src 'none'",`script-src 'unsafe-eval' 'wasm-unsafe-eval' ${i} ${c}${p("script")}`,"worker-src blob:",`style-src 'unsafe-inline' ${i} ${c}${p("style")}`,`font-src ${i} ${c} ${n}${p("font")} data:`,`img-src ${n} ${c}${p("img")} data: blob:`,`media-src ${n} ${a}${p("media")} blob:`,`connect-src ${n} ${a} ${c} ${i}${p("connect")} blob: data:`,`frame-ancestors ${o.length>0?o.join(" "):"'none'"}`].join("; ")}export function snapshotEditorUrl(t,o,r={}){const s=Object.entries({item:o,embed:"studio",snapshot:"1",...r.viewer===!0?{viewer:"1"}:{},...r.theme===void 0?{}:{theme:r.theme},...$(r.place)}).map(([i,c])=>`${i}=${encodeURIComponent(c)}`);return`${t.replace(/\/$/u,"")}/${SNAPSHOT_TREE.editor}?${s.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:x(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:u}),SnapshotCreatedSchema=e.object({id:e.string().min(1),projectId:e.string().min(1)}),SnapshotMissingSchema=e.object({missing:e.array(u)}),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:w(ProjectInfoSchema)}),projectPath=t=>`${PROJECTS_PATH}/${encodeURIComponent(t)}`,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/",conversations:"conversations/"},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())});
2
+ import{STAGE_LOADS as b}from"@allyhub/formats";import{z as e}from"zod";import{BlobSchema as g,Sha256Schema as h,TreeFileSchema as S,TreePathSchema as d}from"./blobs.js";import{placeParams as $}from"./editor.js";import{known as w,openEnum as x,readable as E}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=x(b),StageRoutesSchema=e.record(e.string(),e.array(e.string()));const O=e.string().refine(t=>t.endsWith("/")&&d.safeParse(t.slice(0,-1)).success,"a folder of the tree, ending in /");export const ItemReachSchema=e.object({tree:e.array(d),files:e.array(d),own:e.record(d,S)}),SnapshotReachSchema=e.object({shared:e.array(O),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(d,g),tree:e.record(d,S),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 l(t){return Array.isArray(t)?t.map(l):t!==null&&typeof t=="object"?Object.fromEntries(Object.keys(t).sort().map(o=>[o,l(t[o])])):t}export const snapshotAnswerPath=(t,o)=>`${SNAPSHOT_TREE.answers}${t}/${encodeURIComponent(JSON.stringify(l(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(l(t));const P=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(P)})).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=m=>`${t}${m}`,a=r(SNAPSHOT_TREE.runtime),i=r(SNAPSHOT_TREE.build),n=r(SNAPSHOT_TREE.media),c=r(SNAPSHOT_TREE.matte),p=m=>Object.entries(s).filter(([u,j])=>StageFolderSchema.safeParse(u).success&&j.some(f=>w(b,f)&&f===m)).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:"studio",snapshot:"1",...s.viewer===!0?{viewer:"1"}:{},...s.theme===void 0?{}:{theme:s.theme},...$(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:x(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:E(ProjectInfoSchema)}),projectPath=t=>`${PROJECTS_PATH}/${encodeURIComponent(t)}`,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())});
@@ -109,6 +109,13 @@ export declare const NDJSON = "application/x-ndjson";
109
109
  * or the first time), its Host started. A step not needed is not said.
110
110
  */
111
111
  export declare const STUDIO_OPEN_STEPS: readonly ["machine", "install", "start"];
112
+ /**
113
+ * The environment variable a cloud Studio's Host is started with: a value
114
+ * new to each start, which its `/health` says back as `start`, so its
115
+ * control plane knows the Host answering is the one it started (not one
116
+ * before it that did not stop). A Host older than it ignores it.
117
+ */
118
+ export declare const STUDIO_START_ENV = "ALLYHUB_STUDIO_START";
112
119
  export type StudioOpenStep = (typeof STUDIO_OPEN_STEPS)[number];
113
120
  export declare const StudioOpenLineSchema: z.ZodUnion<readonly [z.ZodObject<{
114
121
  step: z.ZodEnum<{
@@ -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{openEnum as e}from"./open.js";export const ORGANIZATIONS_PATH="/api/organizations",OrganizationsSchema=t.object({organizations:t.array(t.object({id:t.string(),name:t.string(),slug:t.string(),role:t.string(),dissolvedAt:t.iso.datetime().nullable()}))}),MEMBERS_PATH="/api/organization/members",MembersSchema=t.object({members:t.array(t.object({userId:t.string(),email:t.string(),name:t.string(),role:t.string(),limit:t.number().nullable(),used:t.number()}))}),MemberLimitSchema=t.strictObject({monthly:t.number().nonnegative().nullable()}),ORGANIZATION_PATH="/api/organization",STUDIO_PATH="/api/studio",STUDIO_STATES=["running","paused"],StudioSchema=t.object({studio:t.object({state:e(STUDIO_STATES),organizationId:t.string()}).nullable(),creditsPerHour:t.number(),idle:t.object({minutes:t.number(),chosen:t.number().nullable(),min:t.number(),max:t.number()}).optional(),update:t.object({since:t.string(),by:t.string()}).optional()}),STUDIO_RESTART_PATH="/api/studio/restart",StudioSettingsSchema=t.strictObject({idleMinutes:t.number().int().nullable()}),STUDIO_POLICY_PATH="/api/organization/studio",StudioPolicySchema=t.strictObject({idleMaxMinutes:t.number().int().nullable()}),STUDIO_OPEN_PATH="/api/studio/open",STUDIO_OPEN_STAGES=["balance","hold","create","resume","health","release","install","start","charge","ticket"],StudioOpenStagesSchema=t.record(t.string(),t.number()),StudioOpenedSchema=t.object({origin:t.url(),ticket:t.string().min(1),stages:StudioOpenStagesSchema.optional()}),NDJSON="application/x-ndjson",STUDIO_OPEN_STEPS=["machine","install","start"],StudioOpenLineSchema=t.union([t.object({step:t.enum(STUDIO_OPEN_STEPS),first:t.boolean().optional()}),t.object({status:t.number(),error:t.object({code:t.string(),message:t.string(),data:t.record(t.string(),t.unknown()).optional()})}),StudioOpenedSchema]),STUDIO_TICKET_PATH="/api/studio/ticket",StudioTicketSchema=t.object({ticket:t.string().min(1)}),STUDIO_PREPARE_PATH="/api/studio/prepare",StudioPreparedSchema=t.object({prepared:t.boolean()}),STUDIO_PAUSE_PATH="/api/studio/pause",StudioPausedSchema=t.object({paused:t.boolean()}),STUDIO_WAKES_PATH="/api/studio/wakes",STUDIO_WAKE_OUTCOMES=["live","failed"],StudioWakeReportSchema=t.strictObject({outcome:t.enum(STUDIO_WAKE_OUTCOMES),error:t.string().max(500).optional(),server:StudioOpenStagesSchema.optional(),window:t.strictObject({open:t.number().optional(),connect:t.number().optional(),enter:t.number().optional(),total:t.number()}),first:t.boolean().optional()}),STUDIO_WAKE_PATH="/api/studio/wake",StudioWakeSchema=t.strictObject({at:t.iso.datetime().nullable()});
2
+ import{z as t}from"zod";import{openEnum as e}from"./open.js";export const ORGANIZATIONS_PATH="/api/organizations",OrganizationsSchema=t.object({organizations:t.array(t.object({id:t.string(),name:t.string(),slug:t.string(),role:t.string(),dissolvedAt:t.iso.datetime().nullable()}))}),MEMBERS_PATH="/api/organization/members",MembersSchema=t.object({members:t.array(t.object({userId:t.string(),email:t.string(),name:t.string(),role:t.string(),limit:t.number().nullable(),used:t.number()}))}),MemberLimitSchema=t.strictObject({monthly:t.number().nonnegative().nullable()}),ORGANIZATION_PATH="/api/organization",STUDIO_PATH="/api/studio",STUDIO_STATES=["running","paused"],StudioSchema=t.object({studio:t.object({state:e(STUDIO_STATES),organizationId:t.string()}).nullable(),creditsPerHour:t.number(),idle:t.object({minutes:t.number(),chosen:t.number().nullable(),min:t.number(),max:t.number()}).optional(),update:t.object({since:t.string(),by:t.string()}).optional()}),STUDIO_RESTART_PATH="/api/studio/restart",StudioSettingsSchema=t.strictObject({idleMinutes:t.number().int().nullable()}),STUDIO_POLICY_PATH="/api/organization/studio",StudioPolicySchema=t.strictObject({idleMaxMinutes:t.number().int().nullable()}),STUDIO_OPEN_PATH="/api/studio/open",STUDIO_OPEN_STAGES=["balance","hold","create","resume","health","release","install","start","charge","ticket"],StudioOpenStagesSchema=t.record(t.string(),t.number()),StudioOpenedSchema=t.object({origin:t.url(),ticket:t.string().min(1),stages:StudioOpenStagesSchema.optional()}),NDJSON="application/x-ndjson",STUDIO_OPEN_STEPS=["machine","install","start"],STUDIO_START_ENV="ALLYHUB_STUDIO_START",StudioOpenLineSchema=t.union([t.object({step:t.enum(STUDIO_OPEN_STEPS),first:t.boolean().optional()}),t.object({status:t.number(),error:t.object({code:t.string(),message:t.string(),data:t.record(t.string(),t.unknown()).optional()})}),StudioOpenedSchema]),STUDIO_TICKET_PATH="/api/studio/ticket",StudioTicketSchema=t.object({ticket:t.string().min(1)}),STUDIO_PREPARE_PATH="/api/studio/prepare",StudioPreparedSchema=t.object({prepared:t.boolean()}),STUDIO_PAUSE_PATH="/api/studio/pause",StudioPausedSchema=t.object({paused:t.boolean()}),STUDIO_WAKES_PATH="/api/studio/wakes",STUDIO_WAKE_OUTCOMES=["live","failed"],StudioWakeReportSchema=t.strictObject({outcome:t.enum(STUDIO_WAKE_OUTCOMES),error:t.string().max(500).optional(),server:StudioOpenStagesSchema.optional(),window:t.strictObject({open:t.number().optional(),connect:t.number().optional(),enter:t.number().optional(),total:t.number()}),first:t.boolean().optional()}),STUDIO_WAKE_PATH="/api/studio/wake",StudioWakeSchema=t.strictObject({at:t.iso.datetime().nullable()});
@@ -193,6 +193,13 @@ export declare const PROJECT_TOOLS: {
193
193
  count: z.ZodInt;
194
194
  }, z.core.$strict>], "type">>;
195
195
  }, z.core.$strict>>;
196
+ readonly "items/page": MethodSpec<z.ZodObject<{
197
+ item: z.ZodString;
198
+ folder: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
199
+ file: z.ZodOptional<z.ZodString>;
200
+ }, z.core.$strict>, z.ZodObject<{
201
+ url: z.ZodString;
202
+ }, z.core.$strict>>;
196
203
  readonly "work/add": MethodSpec<z.ZodObject<{
197
204
  kind: z.ZodString;
198
205
  file: z.ZodString;
@@ -324,6 +331,7 @@ export type ProjectToolName = keyof typeof PROJECT_TOOLS;
324
331
  export declare const PROJECT_TOOL_SOURCES: {
325
332
  readonly "project/items": "project";
326
333
  readonly "items/preview": "asleep";
334
+ readonly "items/page": "asleep";
327
335
  readonly "work/add": "machine";
328
336
  readonly "components/list": "asleep";
329
337
  readonly "components/stage": "asleep";
@@ -368,6 +376,10 @@ export declare const TOOL_NOTIFICATIONS: {
368
376
  readonly "project/changed": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
369
377
  revision: z.ZodInt;
370
378
  }, z.core.$strict>>;
379
+ readonly "items/changed": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
380
+ item: z.ZodString;
381
+ paths: z.ZodArray<z.ZodString>;
382
+ }, z.core.$strict>>;
371
383
  readonly "check/changed": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
372
384
  status: z.ZodEnum<{
373
385
  off: "off";
@@ -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{FolderSchema as m,PathSchema as t}from"./files.js";import{JobSchema as d}from"./jobs.js";import{PreviewSchema as h}from"./app.js";import{ListedKindSchema as a}from"./kinds.js";import{RPC_ERROR as b,RpcError as g,method as r,notification as o}from"./jsonrpc.js";export const VersionRef={item:t,version:e.string().optional()};export{ImageSchema}from"./image.js";export const ProblemSchema=e.looseObject({code:e.string(),level:e.enum(["error","warn"]),message:e.string(),piece:e.string().optional(),part:e.string().optional(),t:e.number().optional()}),FactSchema=e.looseObject({kind:e.string(),data:e.unknown()}),CHECK_STATES=["off","waiting","running","done","failed"],CheckStateSchema=e.strictObject({status:e.enum(CHECK_STATES),revision:e.int().nonnegative(),problems:e.array(ProblemSchema),facts:e.array(FactSchema),versions:e.strictObject({total:e.int(),loaded:e.int(),reused:e.int()}).optional(),error:e.string().optional()}),EXPORT_STATES=["queued","running","done","failed","cancelled"],ExportOptionsSchema=e.record(e.string(),e.union([e.string(),e.boolean()])),ExportJobSchema=e.strictObject({id:e.string(),item:t,versions:e.array(e.string()),types:e.array(e.string()),options:ExportOptionsSchema.optional(),state:e.enum(EXPORT_STATES),progress:e.number().min(0).max(1),files:e.array(t),error:e.string().optional()}),IndexJobSchema=e.strictObject({file:t,status:e.enum(["running","done","failed"]),message:e.string(),share:e.number().min(0).max(1).optional()}),FramedPageSchema=e.strictObject({url:e.string(),probe:e.string()}),COMPONENT_STILLS_MAX=64,PROJECT_TOOLS={"project/items":r(e.strictObject({}),e.strictObject({items:e.array(e.strictObject({id:t,kind:e.string().min(1).optional(),dir:m,entry:t,title:e.string().optional(),groups:e.array(e.string()),files:e.array(e.object({path:e.string().min(1),role:e.string().min(1).optional()})).optional(),kindInfo:a.optional()})),kinds:e.array(a.extend({id:e.string().min(1)})).optional(),name:e.string(),scope:e.string(),revision:e.int().nonnegative()}),"The project's items, as its list (allyhub.yaml) names them, in its order: each a file of a kind, or a file an editor opens by its name."),"items/preview":r(e.strictObject({item:t}),e.strictObject({preview:h.optional()}),"What an item looks like (named by its id or its file), as its kind's provider makes it from its files now (a video's still, an image's boards, a deck's slide, a doc's first paragraphs, a sheet's first rows); none where its kind gives none."),"work/add":r(e.strictObject({kind:e.string().min(1),file:t,title:e.string().min(1).optional()}),e.strictObject({}),"Adds a piece to the end of the project's list (allyhub.yaml), the rest of it as it was; nothing when its file is listed already."),"components/list":r(e.strictObject({item:t}),e.strictObject({components:e.array(e.strictObject({of:e.string(),name:e.string(),label:e.union([e.string(),e.record(e.string(),e.string())]).optional()}))}),"The components an item may place: every one the project's files define, by the reference it would write."),"components/stage":r(e.strictObject(VersionRef),FramedPageSchema,"The address of a page that draws an item's components one at a time, for a sandboxed frame (docs/design/components-everywhere.md): a deck's by the name its module gives it, a doc's by the reference its block writes. Its parent posts `{ type: \"component\", name, props, width, height, t }` and hears `component-ready`, or `error` with what went wrong."),"components/stills":r(e.strictObject({...VersionRef,components:e.array(e.strictObject({name:e.string(),props:e.record(e.string(),e.unknown()),width:e.number().positive(),height:e.number().positive(),t:e.number().nonnegative()})).min(1).max(COMPONENT_STILLS_MAX)}),e.strictObject({stills:e.array(e.strictObject({key:e.string(),url:e.url()}).nullable())}),"An item's components (a deck's, a doc's) drawn alone, transparent, as the render draws them: pictures kept by what they show, given as addresses."),"check/results":r(e.strictObject({}),CheckStateSchema,"The check run after edits, as it stands."),"check/run":r(e.strictObject({}),e.strictObject({}),"Runs the check again now."),"export/start":r(e.strictObject({item:t,versions:e.array(e.string()).optional(),types:e.array(e.string().min(1)).max(10).optional(),options:ExportOptionsSchema.optional()}),e.strictObject({job:ExportJobSchema}),"Exports an item (its versions, as file types) into .allyhub/out/; `export/changed` says how it goes."),"export/cancel":r(e.strictObject({job:e.string()}),e.strictObject({}),"Stops an export."),"export/list":r(e.strictObject({}),e.strictObject({jobs:e.array(ExportJobSchema),reveal:e.boolean()}),"The exports asked for since the server started."),"export/reveal":r(e.strictObject({path:t}),e.strictObject({}),"Shows an exported file in the person's file manager, where the server runs on their computer (`export/list`'s `reveal`).")},PROJECT_TOOL_SOURCES={"project/items":"project","items/preview":"asleep","work/add":"machine","components/list":"asleep","components/stage":"asleep","components/stills":"project","check/results":"project","check/run":"machine","export/start":"machine","export/cancel":"machine","export/list":"asleep","export/reveal":"machine"},AGENT_DOES={"project/items":{files:"allyhub.yaml"},"items/preview":{command:"frames"},"work/add":{files:"allyhub.yaml"},"components/list":{files:"the project's components (defineComponent)"},"components/stage":{command:"frames"},"components/stills":{command:"frames"},"check/results":{command:"inspect"},"check/run":{command:"check"},"export/start":{command:"render"},"export/cancel":{command:"render"},"export/list":{files:".allyhub/out/"},"export/reveal":{files:".allyhub/out/"}};export function toolSpec(s){return Object.hasOwn(PROJECT_TOOLS,s)?PROJECT_TOOLS[s]:void 0}export function toolCaller(s){return async(c,n,p)=>{const{result:l}=await c["tools/call"]({name:n,arguments:p}),i=s[n]?.result.safeParse(l);if(!i?.success)throw new g(b.internal,`The answer to the tool ${n} is not what the protocol says.`);return i.data}}export const TOOL_NOTIFICATIONS={"project/changed":o(e.strictObject({revision:e.int().nonnegative()}),"The build saw a change: a stage or a timeline asked for now is the new one's."),"check/changed":o(CheckStateSchema,"The check started, ended or failed."),"export/changed":o(e.strictObject({job:ExportJobSchema}),"An export moved on."),"index/changed":o(e.strictObject({jobs:e.array(IndexJobSchema)}),"Making what the media index lacks moved on."),"jobs/changed":o(e.strictObject({job:d,item:t}),"A job of the process the server runs in (docs/design/jobs.md: a website starting, an export) moved on, about a thing in this project: what the window lists, for the editor of that thing to show where the person waits on it.")};
2
+ import{z as e}from"zod";import{FolderSchema as a,PathSchema as t}from"./files.js";import{JobSchema as d}from"./jobs.js";import{PreviewSchema as h}from"./app.js";import{ListedKindSchema as c}from"./kinds.js";import{RPC_ERROR as g,RpcError as b,method as s,notification as r}from"./jsonrpc.js";export const VersionRef={item:t,version:e.string().optional()};export{ImageSchema}from"./image.js";export const ProblemSchema=e.looseObject({code:e.string(),level:e.enum(["error","warn"]),message:e.string(),piece:e.string().optional(),part:e.string().optional(),t:e.number().optional()}),FactSchema=e.looseObject({kind:e.string(),data:e.unknown()}),CHECK_STATES=["off","waiting","running","done","failed"],CheckStateSchema=e.strictObject({status:e.enum(CHECK_STATES),revision:e.int().nonnegative(),problems:e.array(ProblemSchema),facts:e.array(FactSchema),versions:e.strictObject({total:e.int(),loaded:e.int(),reused:e.int()}).optional(),error:e.string().optional()}),EXPORT_STATES=["queued","running","done","failed","cancelled"],ExportOptionsSchema=e.record(e.string(),e.union([e.string(),e.boolean()])),ExportJobSchema=e.strictObject({id:e.string(),item:t,versions:e.array(e.string()),types:e.array(e.string()),options:ExportOptionsSchema.optional(),state:e.enum(EXPORT_STATES),progress:e.number().min(0).max(1),files:e.array(t),error:e.string().optional()}),IndexJobSchema=e.strictObject({file:t,status:e.enum(["running","done","failed"]),message:e.string(),share:e.number().min(0).max(1).optional()}),FramedPageSchema=e.strictObject({url:e.string(),probe:e.string()}),COMPONENT_STILLS_MAX=64,PROJECT_TOOLS={"project/items":s(e.strictObject({}),e.strictObject({items:e.array(e.strictObject({id:t,kind:e.string().min(1).optional(),dir:a,entry:t,title:e.string().optional(),groups:e.array(e.string()),files:e.array(e.object({path:e.string().min(1),role:e.string().min(1).optional()})).optional(),kindInfo:c.optional()})),kinds:e.array(c.extend({id:e.string().min(1)})).optional(),name:e.string(),scope:e.string(),revision:e.int().nonnegative()}),"The project's items, as its list (allyhub.yaml) names them, in its order: each a file of a kind, or a file an editor opens by its name."),"items/preview":s(e.strictObject({item:t}),e.strictObject({preview:h.optional()}),"What an item looks like (named by its id or its file), as its kind's provider makes it from its files now (a video's still, an image's boards, a deck's slide, a doc's first paragraphs, a sheet's first rows); none where its kind gives none."),"items/page":s(e.strictObject({item:t,folder:a.optional(),file:t.optional()}),e.strictObject({url:e.string()}),"The address of an item's page, for a frame (a report's page, a website built as files): `folder` served as the root of an origin of its own, the project's files alone (no other address loads), every file the page loads recorded as the item's input, so the item's editors hear `items/changed` when one changes."),"work/add":s(e.strictObject({kind:e.string().min(1),file:t,title:e.string().min(1).optional()}),e.strictObject({}),"Adds a piece to the end of the project's list (allyhub.yaml), the rest of it as it was; nothing when its file is listed already."),"components/list":s(e.strictObject({item:t}),e.strictObject({components:e.array(e.strictObject({of:e.string(),name:e.string(),label:e.union([e.string(),e.record(e.string(),e.string())]).optional()}))}),"The components an item may place: every one the project's files define, by the reference it would write."),"components/stage":s(e.strictObject(VersionRef),FramedPageSchema,"The address of a page that draws an item's components one at a time, for a sandboxed frame (docs/design/components-everywhere.md): a deck's by the name its module gives it, a doc's by the reference its block writes. Its parent posts `{ type: \"component\", name, props, width, height, t }` and hears `component-ready`, or `error` with what went wrong."),"components/stills":s(e.strictObject({...VersionRef,components:e.array(e.strictObject({name:e.string(),props:e.record(e.string(),e.unknown()),width:e.number().positive(),height:e.number().positive(),t:e.number().nonnegative()})).min(1).max(COMPONENT_STILLS_MAX)}),e.strictObject({stills:e.array(e.strictObject({key:e.string(),url:e.url()}).nullable())}),"An item's components (a deck's, a doc's) drawn alone, transparent, as the render draws them: pictures kept by what they show, given as addresses."),"check/results":s(e.strictObject({}),CheckStateSchema,"The check run after edits, as it stands."),"check/run":s(e.strictObject({}),e.strictObject({}),"Runs the check again now."),"export/start":s(e.strictObject({item:t,versions:e.array(e.string()).optional(),types:e.array(e.string().min(1)).max(10).optional(),options:ExportOptionsSchema.optional()}),e.strictObject({job:ExportJobSchema}),"Exports an item (its versions, as file types) into .allyhub/out/; `export/changed` says how it goes."),"export/cancel":s(e.strictObject({job:e.string()}),e.strictObject({}),"Stops an export."),"export/list":s(e.strictObject({}),e.strictObject({jobs:e.array(ExportJobSchema),reveal:e.boolean()}),"The exports asked for since the server started."),"export/reveal":s(e.strictObject({path:t}),e.strictObject({}),"Shows an exported file in the person's file manager, where the server runs on their computer (`export/list`'s `reveal`).")},PROJECT_TOOL_SOURCES={"project/items":"project","items/preview":"asleep","items/page":"asleep","work/add":"machine","components/list":"asleep","components/stage":"asleep","components/stills":"project","check/results":"project","check/run":"machine","export/start":"machine","export/cancel":"machine","export/list":"asleep","export/reveal":"machine"},AGENT_DOES={"project/items":{files:"allyhub.yaml"},"items/preview":{command:"frames"},"items/page":{command:"frames"},"work/add":{files:"allyhub.yaml"},"components/list":{files:"the project's components (defineComponent)"},"components/stage":{command:"frames"},"components/stills":{command:"frames"},"check/results":{command:"inspect"},"check/run":{command:"check"},"export/start":{command:"render"},"export/cancel":{command:"render"},"export/list":{files:".allyhub/out/"},"export/reveal":{files:".allyhub/out/"}};export function toolSpec(o){return Object.hasOwn(PROJECT_TOOLS,o)?PROJECT_TOOLS[o]:void 0}export function toolCaller(o){return async(p,n,l)=>{const{result:m}=await p["tools/call"]({name:n,arguments:l}),i=o[n]?.result.safeParse(m);if(!i?.success)throw new b(g.internal,`The answer to the tool ${n} is not what the protocol says.`);return i.data}}export const TOOL_NOTIFICATIONS={"project/changed":r(e.strictObject({revision:e.int().nonnegative()}),"The build saw a change: a stage or a timeline asked for now is the new one's."),"items/changed":r(e.strictObject({item:t,paths:e.array(e.string())}),`One of an item's inputs changed (docs/design/item-files.md, "An item's inputs"): a file its build lists, or one its pages loaded.`),"check/changed":r(CheckStateSchema,"The check started, ended or failed."),"export/changed":r(e.strictObject({job:ExportJobSchema}),"An export moved on."),"index/changed":r(e.strictObject({jobs:e.array(IndexJobSchema)}),"Making what the media index lacks moved on."),"jobs/changed":r(e.strictObject({job:d,item:t}),"A job of the process the server runs in (docs/design/jobs.md: a website starting, an export) moved on, about a thing in this project: what the window lists, for the editor of that thing to show where the person waits on it.")};
@@ -1,15 +1,11 @@
1
1
  {
2
2
  "name": "@allyhub/protocol",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
8
8
  "default": "./dist/index.js"
9
- },
10
- "./browser-bridge": {
11
- "types": "./dist/browser-bridge.d.ts",
12
- "default": "./dist/browser-bridge.js"
13
9
  }
14
10
  },
15
11
  "sideEffects": false,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/runtimes",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/scenery",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -19,14 +19,6 @@ export declare function csvText(value: Scalar, code: string | undefined, mode?:
19
19
  export declare function dataValue(value: Scalar, code: string | undefined, mode?: ValueMode): string | number | boolean | null;
20
20
  /** A sheet as CSV (RFC 4180: CRLF between records), from A1 to the last cell it uses. */
21
21
  export declare function csvOf(calc: Calc, sheet: Worksheet, o?: CsvOptions): string;
22
- /**
23
- * A sheet as a Markdown table, its first row the head: values as their
24
- * formats show them unless `values` is "data"; a column whose values are
25
- * all numbers is aligned right.
26
- */
27
- export declare function markdownOf(calc: Calc, sheet: Worksheet, o?: ValueOptions): string;
28
22
  /** A table's computed rows, by header. */
29
23
  export declare function tableRows(calc: Calc, table: Table, o?: ValueOptions): Record<string, string | number | boolean | null>[];
30
- /** The workbook as data: each sheet's rows, each table's rows by header. */
31
- export declare function jsonOf(calc: Calc, o?: ValueOptions): Record<string, unknown>;
32
24
  //# sourceMappingURL=export.d.ts.map
@@ -1,5 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{writeCsv as S}from"@allyhub/formats";import{isDateCode as k,shownValue as b}from"./format.js";import{CellError as w,dateOf as j}from"./values.js";const y=t=>(t.split(";")[0]??"").replace(/"[^"]*"|\\.|_.|\*./gu,"").replace(/\[(?![hms]+\])[^\]]*\]/giu,""),h=new Map;function _(t){if(t===void 0)return;if(h.has(t))return h.get(t);let n;if(k(t)){const r=y(t).toLowerCase(),o=/\[(h+|m+|s+)\]/u.test(r),e=[...r.matchAll(/\[?([ydhms])\1*\]?|am\/pm|a\/p/gu)].map(c=>c[0]);let s=!1,i=!1,u=!1;for(const[c,a]of e.entries()){const f=a.replace(/[[\]]/gu,"")[0];if(f==="y"||f==="d")s=!0;else if(f==="h"||a.includes("/"))i=!0;else if(f==="s")i=!0,u=!0;else if(f==="m"){const l=e[c-1]?.replace(/[[\]]/gu,"")[0],m=e[c+1]?.replace(/[[\]]/gu,"")[0];a.startsWith("[")||l==="h"||m==="s"?i=!0:s=!0}}o?n={kind:"duration",seconds:u}:s&&i?n={kind:"datetime",seconds:u}:i?n={kind:"time",seconds:u}:s&&(n={kind:"date",seconds:!1})}return h.set(t,n),n}const $=864e5,A=2958465,d=(t,n=2)=>String(t).padStart(n,"0");export const excelNumber=t=>t===0?0:Number(t.toPrecision(15));function x(t,n,r=2){const o=Math.floor(t/1e3),e=t%1e3;let s=`${d(Math.floor(o/3600),r)}:${d(Math.floor(o/60)%60)}`;return(n||o%60!==0||e!==0)&&(s+=`:${d(o%60)}`),e!==0&&(s+=`.${d(e,3).replace(/0+$/u,"")}`),s}function T(t){const n=t<0?"-":"";let r=Math.abs(t);const o=Math.floor(r/36e5);r-=o*36e5;const e=Math.floor(r/6e4);r-=e*6e4;const s=[o>0?`${String(o)}H`:"",e>0?`${String(e)}M`:"",r>0?`${String(r/1e3)}S`:""].join("");return`${n}PT${s||"0S"}`}function M(t,n,r){const o=Math.round(t*$);if(n.kind==="duration")return r==="json"?T(o):`${o<0?"-":""}${x(Math.abs(o),n.seconds,1)}`;if(t<0||t>=A+1)return;const e=Math.floor(o/$),s=x(o-e*$,n.seconds||r==="json");if(e===0||n.kind==="time")return s;if(e===60)return;const{year:i,month:u,day:c}=j(e),a=`${d(i,4)}-${d(u)}-${d(c)}`;return n.kind==="date"?a:`${a}${r==="json"?"T":" "}${s}`}export function csvText(t,n,r="data"){if(t===null)return"";if(r==="shown")return b(t,n);if(typeof t=="boolean")return t?"TRUE":"FALSE";if(t instanceof w)return t.code;if(typeof t=="string")return t;const o=_(n);return(o&&M(t,o,"csv"))??String(excelNumber(t))}export function dataValue(t,n,r="data"){if(t===null)return null;if(r==="shown")return b(t,n);if(t instanceof w)return t.code;if(typeof t!="number")return t;const o=_(n);return(o&&M(t,o,"json"))??excelNumber(t)}const p=(t,n,r)=>t.lookAt(n,r).format;function g(t,n){const r=t.used;if(!r)return[];const o=[];for(let e=0;e<=r.bottom;e++){const s=[];for(let i=0;i<=r.right;i++)s.push(n(e,i));o.push(s)}return o}export function csvOf(t,n,r={}){const o=g(n,(e,s)=>csvText(t.value(n,e,s),p(n,e,s),r.values));return S(o,{delimiter:",",newline:`\r
3
- `,bom:r.bom??!0,finalNewline:!0})}const E=t=>t.replaceAll("|","\\|").replace(/\r?\n/gu,"<br>");export function markdownOf(t,n,r={}){const o=r.values??"shown",e=[],s=g(n,(f,l)=>{const m=t.value(n,f,l);return f>0&&m!==null&&(e[l]=(e[l]??!0)&&typeof m=="number"),csvText(m,p(n,f,l),o)}),[i,...u]=s;if(!i)return"";const c=f=>`| ${f.map(E).join(" | ")} |`,a=i.map((f,l)=>e[l]===!0?"---:":"---");return`${[c(i),`| ${a.join(" | ")} |`,...u.map(c)].join(`
4
- `)}
5
- `}export function tableRows(t,n,r={}){const{sheet:o,at:e}=n,s=[];for(let i=0;i<n.rows;i++){const u={};for(const c of n.columns){const a=e.row+1+i,f=e.col+c.index;u[c.name]=dataValue(t.value(o,a,f),p(o,a,f),r.values)}s.push(u)}return s}export function jsonOf(t,n={}){const{wb:r}=t,o={};for(const e of r.sheets){const s={};for(const i of e.tables)s[i.name]=tableRows(t,i,n);o[e.name]={rows:g(e,(i,u)=>dataValue(t.value(e,i,u),p(e,i,u),n.values)),...e.tables.length>0?{tables:s}:{}}}return{...r.title===void 0?{}:{title:r.title},sheets:o}}
2
+ import{writeCsv as b}from"@allyhub/formats";import{isDateCode as x,shownValue as p}from"./format.js";import{CellError as h,dateOf as k}from"./values.js";const y=t=>(t.split(";")[0]??"").replace(/"[^"]*"|\\.|_.|\*./gu,"").replace(/\[(?![hms]+\])[^\]]*\]/giu,""),d=new Map;function $(t){if(t===void 0)return;if(d.has(t))return d.get(t);let n;if(x(t)){const r=y(t).toLowerCase(),e=/\[(h+|m+|s+)\]/u.test(r),o=[...r.matchAll(/\[?([ydhms])\1*\]?|am\/pm|a\/p/gu)].map(u=>u[0]);let s=!1,i=!1,f=!1;for(const[u,c]of o.entries()){const a=c.replace(/[[\]]/gu,"")[0];if(a==="y"||a==="d")s=!0;else if(a==="h"||c.includes("/"))i=!0;else if(a==="s")i=!0,f=!0;else if(a==="m"){const M=o[u-1]?.replace(/[[\]]/gu,"")[0],S=o[u+1]?.replace(/[[\]]/gu,"")[0];c.startsWith("[")||M==="h"||S==="s"?i=!0:s=!0}}e?n={kind:"duration",seconds:f}:s&&i?n={kind:"datetime",seconds:f}:i?n={kind:"time",seconds:f}:s&&(n={kind:"date",seconds:!1})}return d.set(t,n),n}const m=864e5,A=2958465,l=(t,n=2)=>String(t).padStart(n,"0");export const excelNumber=t=>t===0?0:Number(t.toPrecision(15));function g(t,n,r=2){const e=Math.floor(t/1e3),o=t%1e3;let s=`${l(Math.floor(e/3600),r)}:${l(Math.floor(e/60)%60)}`;return(n||e%60!==0||o!==0)&&(s+=`:${l(e%60)}`),o!==0&&(s+=`.${l(o,3).replace(/0+$/u,"")}`),s}function T(t){const n=t<0?"-":"";let r=Math.abs(t);const e=Math.floor(r/36e5);r-=e*36e5;const o=Math.floor(r/6e4);r-=o*6e4;const s=[e>0?`${String(e)}H`:"",o>0?`${String(o)}M`:"",r>0?`${String(r/1e3)}S`:""].join("");return`${n}PT${s||"0S"}`}function w(t,n,r){const e=Math.round(t*m);if(n.kind==="duration")return r==="json"?T(e):`${e<0?"-":""}${g(Math.abs(e),n.seconds,1)}`;if(t<0||t>=A+1)return;const o=Math.floor(e/m),s=g(e-o*m,n.seconds||r==="json");if(o===0||n.kind==="time")return s;if(o===60)return;const{year:i,month:f,day:u}=k(o),c=`${l(i,4)}-${l(f)}-${l(u)}`;return n.kind==="date"?c:`${c}${r==="json"?"T":" "}${s}`}export function csvText(t,n,r="data"){if(t===null)return"";if(r==="shown")return p(t,n);if(typeof t=="boolean")return t?"TRUE":"FALSE";if(t instanceof h)return t.code;if(typeof t=="string")return t;const e=$(n);return(e&&w(t,e,"csv"))??String(excelNumber(t))}export function dataValue(t,n,r="data"){if(t===null)return null;if(r==="shown")return p(t,n);if(t instanceof h)return t.code;if(typeof t!="number")return t;const e=$(n);return(e&&w(t,e,"json"))??excelNumber(t)}const _=(t,n,r)=>t.lookAt(n,r).format;function j(t,n){const r=t.used;if(!r)return[];const e=[];for(let o=0;o<=r.bottom;o++){const s=[];for(let i=0;i<=r.right;i++)s.push(n(o,i));e.push(s)}return e}export function csvOf(t,n,r={}){const e=j(n,(o,s)=>csvText(t.value(n,o,s),_(n,o,s),r.values));return b(e,{delimiter:",",newline:`\r
3
+ `,bom:r.bom??!0,finalNewline:!0})}export function tableRows(t,n,r={}){const{sheet:e,at:o}=n,s=[];for(let i=0;i<n.rows;i++){const f={};for(const u of n.columns){const c=o.row+1+i,a=o.col+u.index;f[u.name]=dataValue(t.value(e,c,a),_(e,c,a),r.values)}s.push(f)}return s}
@@ -19,7 +19,7 @@ export { analyse, type Analysis } from "./calc/analyse.js";
19
19
  export { FUNCTIONS } from "./calc/functions/index.js";
20
20
  export { Reference } from "./calc/types.js";
21
21
  export { checkWorkbook, placeName, type CheckedWorkbook } from "./check.js";
22
- export { csvOf, csvText, dataValue, excelNumber, jsonOf, markdownOf, tableRows, type CsvOptions, type ValueMode, type ValueOptions, } from "./export.js";
22
+ export { csvOf, csvText, dataValue, excelNumber, tableRows, type CsvOptions, type ValueMode, type ValueOptions, } from "./export.js";
23
23
  export { generalForms, generalText, isDateCode, shownColor, shownValue, } from "./format.js";
24
24
  export { DEFAULT_COLUMN_WIDTH, DEFAULT_ROW_HEIGHT, headerFooterHtml, sheetHtml, SheetPrint, type PageFields, type PrintHtmlOptions, type SheetHtml, type SheetHtmlOptions, } from "./html.js";
25
25
  export { PAPERS, PRINT_DEFAULTS, paginate, type PaginateOptions, type PrintJob, type PrintedPage, type SheetPages, } from "./paginate.js";
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export*from"./address.js";export{patchCsv}from"./patch.js";export{printedFacts,printedLines}from"./printed.js";export*from"./values.js";export*from"./workbook.js";export*from"./calc/remote.js";export*from"./calc/server.js";export{CODE as SHEET_CODE,ENTRY as SHEET_ENTRY,codeOf,dataFilesOf,readSheetFile}from"./file.js";export{GENERATED,ordinarySheet,typedNumbers,withGenerated}from"./generated.js";export{applyScenario,cellOfName,scenarioNames,scenariosByCell}from"./scenario.js";export{fileCells,hasFiles,isPicture,pictureHeight,pictureSize}from"./files.js";export*from"./formula/ast.js";export{parseFormula}from"./formula/parse.js";export{printFormula,sheetPrefix}from"./formula/print.js";export{moveFormula}from"./formula/move.js";export{rewriteFormula}from"./formula/rewrite.js";export{Calc,ITERATION_DEFAULTS,seededRandom}from"./calc/engine.js";export{analyse}from"./calc/analyse.js";export{FUNCTIONS}from"./calc/functions/index.js";export{Reference}from"./calc/types.js";export{checkWorkbook,placeName}from"./check.js";export{csvOf,csvText,dataValue,excelNumber,jsonOf,markdownOf,tableRows}from"./export.js";export{generalForms,generalText,isDateCode,shownColor,shownValue}from"./format.js";export{DEFAULT_COLUMN_WIDTH,DEFAULT_ROW_HEIGHT,headerFooterHtml,sheetHtml,SheetPrint}from"./html.js";export{PAPERS,PRINT_DEFAULTS,paginate}from"./paginate.js";export{DEFAULT_TABLE_STYLE,tableStyleLook,tableStyleOf}from"./table-style.js";export{PROFILE_TOP,profileTable}from"./profile.js";export{importRows}from"./import.js";export{patchYaml,writeYaml}from"./write.js";export*from"./edit.js";export*from"./arrange.js";export{NO_LOOK,autoFill,copyLooks,fillDownTo,moveCells,pasteLooks}from"./fill.js";export{seriesAfter}from"./series.js";export{compareForSort,hasHeader,sortCells,sortedOrder,sortedRows}from"./sort.js";export{filterChoices,filteredRows,regionAround}from"./filter.js";export{Rules,colorBetween,compareValues,holds,iconShape}from"./rules.js";export{choicesIn,invalidCells,joinChoices,listValues,separatorOf,valid}from"./validate.js";export{freeColumn,restructure,tableShape,uniqueColumn,withColumnsUpTo}from"./structure.js";export{SHEET_CHART_DEFAULTS,chartAfter,chartDataRange,chartDef,chartOfRange,chartPlace,chartSize,chartSvg,readDataRange}from"./chart.js";export{INSPECT_DEFAULTS,SHEET_FACT_KINDS,inspectWorkbook}from"./inspect.js";export{DIFF_DEFAULTS,diffWorkbooks}from"./diff.js";
2
+ export*from"./address.js";export{patchCsv}from"./patch.js";export{printedFacts,printedLines}from"./printed.js";export*from"./values.js";export*from"./workbook.js";export*from"./calc/remote.js";export*from"./calc/server.js";export{CODE as SHEET_CODE,ENTRY as SHEET_ENTRY,codeOf,dataFilesOf,readSheetFile}from"./file.js";export{GENERATED,ordinarySheet,typedNumbers,withGenerated}from"./generated.js";export{applyScenario,cellOfName,scenarioNames,scenariosByCell}from"./scenario.js";export{fileCells,hasFiles,isPicture,pictureHeight,pictureSize}from"./files.js";export*from"./formula/ast.js";export{parseFormula}from"./formula/parse.js";export{printFormula,sheetPrefix}from"./formula/print.js";export{moveFormula}from"./formula/move.js";export{rewriteFormula}from"./formula/rewrite.js";export{Calc,ITERATION_DEFAULTS,seededRandom}from"./calc/engine.js";export{analyse}from"./calc/analyse.js";export{FUNCTIONS}from"./calc/functions/index.js";export{Reference}from"./calc/types.js";export{checkWorkbook,placeName}from"./check.js";export{csvOf,csvText,dataValue,excelNumber,tableRows}from"./export.js";export{generalForms,generalText,isDateCode,shownColor,shownValue}from"./format.js";export{DEFAULT_COLUMN_WIDTH,DEFAULT_ROW_HEIGHT,headerFooterHtml,sheetHtml,SheetPrint}from"./html.js";export{PAPERS,PRINT_DEFAULTS,paginate}from"./paginate.js";export{DEFAULT_TABLE_STYLE,tableStyleLook,tableStyleOf}from"./table-style.js";export{PROFILE_TOP,profileTable}from"./profile.js";export{importRows}from"./import.js";export{patchYaml,writeYaml}from"./write.js";export*from"./edit.js";export*from"./arrange.js";export{NO_LOOK,autoFill,copyLooks,fillDownTo,moveCells,pasteLooks}from"./fill.js";export{seriesAfter}from"./series.js";export{compareForSort,hasHeader,sortCells,sortedOrder,sortedRows}from"./sort.js";export{filterChoices,filteredRows,regionAround}from"./filter.js";export{Rules,colorBetween,compareValues,holds,iconShape}from"./rules.js";export{choicesIn,invalidCells,joinChoices,listValues,separatorOf,valid}from"./validate.js";export{freeColumn,restructure,tableShape,uniqueColumn,withColumnsUpTo}from"./structure.js";export{SHEET_CHART_DEFAULTS,chartAfter,chartDataRange,chartDef,chartOfRange,chartPlace,chartSize,chartSvg,readDataRange}from"./chart.js";export{INSPECT_DEFAULTS,SHEET_FACT_KINDS,inspectWorkbook}from"./inspect.js";export{DIFF_DEFAULTS,diffWorkbooks}from"./diff.js";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/sheet",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/slides-core",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/video-core",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/video-sdk",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
package/docs/README.md CHANGED
@@ -16,8 +16,10 @@ What a piece is written with, for the version of the SDK installed beside them.
16
16
  - [scenery.md](scenery.md): 3D sceneries: `defineScenery()`, cameras and their moves, the hand that holds one, the `scenery()` layer and its screens.
17
17
  - [modeling.md](modeling.md): a prop modelled in code with `@allyhub/model` and put in a scenery.
18
18
  - [docs.md](docs.md): a doc, one MDX file: its title, the Markdown and tags it reads, pictures and links, check and render.
19
+ - [reports.md](reports.md): a report, one HTML file written freely: what it loads from the project, how it is drawn, its check, frames and render, report styles.
19
20
  - [sheets.md](sheets.md): a sheet, a workbook as YAML and CSV: tables, formulas, names, checks, the openpyxl API (`@allyhub/sdk/sheets`), calc, trace and render.
20
21
  - [canvas.md](canvas.md): a canvas, a JSON Canvas file laying a project's work out with notes, groups and edges.
21
22
  - [x.md](x.md): an X post, thread or long post in POST /2/tweets's fields, and an X article in X's blocks: what X counts and refuses, and what they render to.
23
+ - [linkedin.md](linkedin.md): a LinkedIn post in the Posts API's fields (words, pictures, a video, a document or carousel, a poll, a link) and a LinkedIn article in LinkedIn's blocks: what LinkedIn counts and refuses, and what they render to.
22
24
  - [websites.md](websites.md): a website, any web project with its JSON file: how Studio serves it while it is made (`PORT`, `HOST`, the preview hosts), a project's videos in its pages, its build.
23
25
  - [defaults.md](defaults.md): every default of the piece API, generated from the code's constants, with the option that changes it.
package/docs/defaults.md CHANGED
@@ -591,6 +591,15 @@ How `allyhub render` and an editor's Export encode an mp4 when nothing chooses o
591
591
  | `height` | `1080` |
592
592
  | `fps` | `30` |
593
593
 
594
+ ### `GIF_ENCODE`
595
+
596
+ How `allyhub render` and an editor's Export make a GIF when nothing chooses otherwise: its width in pixels (its height in proportion) and its frames a second, each never more than the video's own. `--param gif-width`, `--param gif-fps` (0 for the video's own).
597
+
598
+ | Key | Value |
599
+ | --- | --- |
600
+ | `width` | `640` |
601
+ | `fps` | `15` |
602
+
594
603
  ### `MATTE_FEATHER`
595
604
 
596
605
  The softness of the person's edge, px at 1080p. `footage({ background: { feather } })`.
@@ -793,12 +802,11 @@ Value: `16384`
793
802
 
794
803
  ### `IMAGE_EXPORT_DEFAULTS`
795
804
 
796
- An image's files: JPEG's quality, and AVIF's (as libaom's constant quality, 63 − 0.63 × it), 0–100; a WebP without one keeps every pixel. `allyhub render --param quality=…`. A board's picture's pixels per board pixel, from 0.25 to 4: `--param scale=…`, or `width=…` / `height=…` in pixels.
805
+ An image's files: JPEG's quality, 0–100; a WebP without one keeps every pixel. `allyhub render --param quality=…`. A board's picture's pixels per board pixel, from 0.25 to 4: `--param scale=…`, or `width=…` / `height=…` in pixels.
797
806
 
798
807
  | Key | Value |
799
808
  | --- | --- |
800
809
  | `jpegQuality` | `90` |
801
- | `avifQuality` | `60` |
802
810
  | `scale` | `1` |
803
811
 
804
812
  ### `PSD_DEFAULTS`
package/docs/docs.md CHANGED
@@ -205,7 +205,7 @@ As [](#sales) shows, revenue doubled; [](#costs) lists the costs.
205
205
 
206
206
  ### Citations
207
207
 
208
- A citation is Pandoc's: `[@key]`, `[@a; @b]`, `[@key, p. 12]` in a line. Its sources are a CSL-JSON file (what Zotero, Mendeley and Pandoc export) the front matter's `bibliography` names, from the doc's folder. `<Bibliography />` on a line of its own is where they are listed; without it they are listed at the doc's end. `citation-style` is `apa` (the default: APA 7's author and year, `(Smith, 2019, p. 12)`, the list by author), `mla` (MLA 9's author and page, `(Smith 12)`, its Works Cited by author) or `gbt7714` (GB/T 7714's sources numbered in the order first cited, `[1]`, `[2-4]`). The list's heading is the doc's own (`## References`, `## Works Cited`). Only sources the doc cites are listed. The PDF, Word and Markdown set them as text; the editor shows each as it prints. A key the file does not hold, a file that is not there or not CSL-JSON, and citations with no `bibliography` are AK-M008.
208
+ A citation is Pandoc's: `[@key]`, `[@a; @b]`, `[@key, p. 12]` in a line. Its sources are a CSL-JSON file (what Zotero, Mendeley and Pandoc export) the front matter's `bibliography` names, from the doc's folder. `<Bibliography />` on a line of its own is where they are listed; without it they are listed at the doc's end. `citation-style` is `apa` (the default: APA 7's author and year, `(Smith, 2019, p. 12)`, the list by author), `mla` (MLA 9's author and page, `(Smith 12)`, its Works Cited by author) or `gbt7714` (GB/T 7714's sources numbered in the order first cited, `[1]`, `[2-4]`). The list's heading is the doc's own (`## References`, `## Works Cited`). Only sources the doc cites are listed. The PDF and Word set them as text; the editor shows each as it prints. A key the file does not hold, a file that is not there or not CSL-JSON, and citations with no `bibliography` are AK-M008.
209
209
 
210
210
  ### Equations and diagrams
211
211
 
@@ -241,7 +241,7 @@ A figure drawn by code is a component (`defineComponent`, [layers.md](layers.md#
241
241
  | `align` | `center` or `right` |
242
242
  | any other | A prop, read by its type: a `number()` from its digits, a `boolean()` from `true` or `false`, a `list()` or `object()` from JSON, anything else as written |
243
243
 
244
- It is drawn as a slide's component is, with the project's look (`var(--ak-color-*)`, `var(--ak-font-*)`, and the look's theme as `var(--ak-theme-*)`), its fonts and files. The editor draws it live, its props a field each when it is clicked; the PDF, Word, Markdown (`<name>.assets/`) and a read view show a still of it, drawn once and kept by what it shows. A wrong module, export or prop is AK-M008 at its line; an exception in its code is AK-R001.
244
+ It is drawn as a slide's component is, with the project's look (`var(--ak-color-*)`, `var(--ak-font-*)`, and the look's theme as `var(--ak-theme-*)`), its fonts and files. The editor draws it live, its props a field each when it is clicked; the PDF, Word and a read view show a still of it, drawn once and kept by what it shows. A wrong module, export or prop is AK-M008 at its line; an exception in its code is AK-R001.
245
245
 
246
246
  ### Kept as written
247
247
 
@@ -273,7 +273,7 @@ captions: numbered
273
273
 
274
274
  | Key | Means |
275
275
  | --- | --- |
276
- | `preset` | A convention that sets the keys below as it does; any key the doc writes wins over it. `report`: a report read on screen and on paper (the text 10.5 pt at 1.2 lines, 0.7 em after each paragraph, the title 24 pt, levels 1 and 2 at 18 and 14 pt with a hairline under them, level 3 at 11.5 pt), for figures (`<Stats>`), cards and tags. `apa`: APA 7's student paper (Letter at 1 in, Times 12 double-spaced, paragraphs set in 0.5 in with no space between them, the page number at the top right, the title and headings the text's size and bold, level 1 centred, levels 3 and 5 italic, APA citations). `mla`: MLA 9's paper (the same page; write the surname before the number: `header: { right: "Smith {page}" }`; the title centred and plain, MLA citations and Works Cited). `memo`: Purdue OWL's memo (Letter at 1 in, Times 12 single-spaced, paragraphs flush left with a blank line between them, the title and headings the text's size and bold, the page number at the foot's centre; write the heading block, TO, FROM, DATE and SUBJECT, yourself). `business-letter`: Purdue OWL's block-format letter (the same page, no running head or foot and no page numbers; the date, inside address, salutation and closing are your paragraphs) |
276
+ | `preset` | A convention that sets the keys below as it does; any key the doc writes wins over it. `brief`: a brief read on screen and on paper (its earlier name `report` is read as it) (the text 10.5 pt at 1.2 lines, 0.7 em after each paragraph, the title 24 pt, levels 1 and 2 at 18 and 14 pt with a hairline under them, level 3 at 11.5 pt), for figures (`<Stats>`), cards and tags. `apa`: APA 7's student paper (Letter at 1 in, Times 12 double-spaced, paragraphs set in 0.5 in with no space between them, the page number at the top right, the title and headings the text's size and bold, level 1 centred, levels 3 and 5 italic, APA citations). `mla`: MLA 9's paper (the same page; write the surname before the number: `header: { right: "Smith {page}" }`; the title centred and plain, MLA citations and Works Cited). `memo`: Purdue OWL's memo (Letter at 1 in, Times 12 single-spaced, paragraphs flush left with a blank line between them, the title and headings the text's size and bold, the page number at the foot's centre; write the heading block, TO, FROM, DATE and SUBJECT, yourself). `business-letter`: Purdue OWL's block-format letter (the same page, no running head or foot and no page numbers; the date, inside address, salutation and closing are your paragraphs) |
277
277
  | `paper` | `Letter` (the default), `Legal`, `A4`, `A3`, `A5`, `B5`, or `[width, height]` in mm |
278
278
  | `orientation` | `portrait` (the default) or `landscape` |
279
279
  | `margins` | mm: one for all four, `[top and bottom, sides]`, or `[top, right, bottom, left]`; default 18 at the top and bottom, 20 at the sides |
@@ -306,4 +306,4 @@ Without front matter the page is Letter, sans, with the default accent and no co
306
306
  - `allyhub check` reports AK-M008 for a doc whose file is not MDX, that holds what a doc does not draw (`{…}`, a tag inside a line other than the marks above, a wrong attribute or value), that shows a picture which is not in the project, that names a component which is not one or a prop it does not have, whose chart cannot be drawn from its numbers or whose equation is not TeX KaTeX reads, that cites a source its bibliography does not hold (or names a bibliography that is not CSL-JSON in the project); each problem has its file and line.
307
307
  - `allyhub inspect pages <doc>` measures its pages as `allyhub render` prints them, from the PDF itself, and says the facts with their raw numbers (mm on the paper, each block by its line in the doc's file): the space left at each page's foot, each block broken over pages with its lines (a table's rows) on each and whether its head repeats, a heading near a page's foot with the lines after it on its page, a paragraph's short last line, content past the column and what is cut at the paper's edge, a line that starts or ends with a mark Chinese type keeps off it, each numbered figure's page and the pages that name it, the text as a grid, and whether the contents' page numbers held. It draws the pages too, each block outlined and labelled by its line, the space at each foot shaded (`.allyhub/work/inspect/<place>/pages.webp`). They are facts, never problems: where a page breaks well is yours to judge. `--heading-lines` and `--short-line` say what is listed, `--all` lists every heading and last line.
308
308
  - `allyhub frames <doc>` draws its pages as `allyhub render` prints them, its components drawn first (the PDF printed and thrown away, each page drawn), tiled on one picture under `.allyhub/work/frames/<place>/`, and says how many pages there are and on what paper; `--page 2-3` draws those pages large. It is how to look at a doc and fit it to a length, and nothing is written to `.allyhub/out/`.
309
- - `allyhub render` prints each doc under `.allyhub/out/`, by its id, as `plan.pdf`; `--type png` writes a picture of the whole page (`plan.png`), `--type docx` a Word document (`plan.docx`: its text and its charts editable, a picture Word cannot show as a JPEG, an equation and a diagram as pictures), `--type md` plain Markdown (`plan.md`: what the doc says without what only a doc can say, a chart as its table of numbers), and `--type pdf,docx,png,md` all of them. With a PDF or a Word document it says how the pages printed: how many, the share of each page's text area left empty at its foot, the blocks broken over pages (a Word document alone is printed once to measure it); `allyhub inspect pages` has every fact. A doc with a problem is not rendered: the command fails and says why. `allyhub help render` has every option.
309
+ - `allyhub render` prints each doc under `.allyhub/out/`, by its id, as `plan.pdf`; `--type png` writes a picture of the whole page (`plan.png`), `--type docx` a Word document (`plan.docx`: its text and its charts editable, a picture Word cannot show as a JPEG, an equation and a diagram as pictures), and `--type pdf,docx,png` all of them. There is no Markdown: the doc's MDX is its text. With a PDF or a Word document it says how the pages printed: how many, the share of each page's text area left empty at its foot, the blocks broken over pages (a Word document alone is printed once to measure it); `allyhub inspect pages` has every fact. A doc with a problem is not rendered: the command fails and says why. `allyhub help render` has every option.
package/docs/image.md CHANGED
@@ -59,7 +59,7 @@ A picture a board starts from is never changed: a pixel edit (a matte, a part re
59
59
  | `script` | a path with `{locale}` | none | Its script, from the module's folder, with `{locale}` once in its name for each language (`./friends.{locale}.yaml`) |
60
60
  | `matrix` | `Matrix` | the project's languages and its script's | Dimensions and slots, as a video's ([batches.md](batches.md)): each combo is a set of the boards |
61
61
  | `id`, `title`, `meta` | | its module's file without its extension; the script's `title` | As a video's |
62
- | `transparent` | `boolean` | `false` | No background: PNG, WebP and AVIF keep the alpha channel |
62
+ | `transparent` | `boolean` | `false` | No background: PNG and WebP keep the alpha channel |
63
63
 
64
64
  ## `board()`
65
65
 
@@ -141,9 +141,9 @@ An image's viewer shows every board of every version, each drawn live, to zoom,
141
141
  - `allyhub check` reports what cannot be drawn: a size that does not exist (AK-I001), a name used twice (AK-I002), a layer without a name (AK-I003), an image with no boards (AK-I005), what Chrome cannot draw exactly (AK-I007), and what any version reports: a picture that does not load (AK-A005), a fallback font (AK-L006), text the board's edge cuts (AK-L002), a board drawn differently in order and out of order (AK-D002).
142
142
  - `allyhub frames <image>` draws every board on one sheet, each named by its key and size; `--part <key>` one board at its own size.
143
143
  - `allyhub inspect <image>` gives `board` (each board's size and where it came from), `board-consistency` (a named layer's box, cap height and colour on every board that has it, and their spread, ΔE in OKLab), `picture-scale` (a picture's source pixels against the board pixels they fill), `overset` (a type layer's words its paragraph box does not hold: its lines and characters and those past the box's bottom, how far past; the box does not cut them, so this is a fact, not a rule), `generated`, `text-contrast` and the layout facts of one frame for each board.
144
- - `allyhub render <image>` makes a PNG a board (`<item>.<combo>/<key>.png`); `--type jpeg`, `webp` and `avif` the same in those; `pdf` one file, a page a board at its own size, its text as text; `zip` the set, each board a PNG. `--param quality=…` (0–100) sets JPEG, WebP and AVIF quality ([defaults.md](defaults.md)); `psd` a layered Photoshop file a board (below).
144
+ - `allyhub render <image>` makes a PNG a board (`<item>.<combo>/<key>.png`); `--type jpeg` and `webp` the same in those; `pdf` one file, a page a board at its own size, its text as text; `zip` the set, each board a PNG. `--param quality=…` (0–100) sets JPEG and WebP quality ([defaults.md](defaults.md)); `psd` a layered Photoshop file a board (below).
145
145
  - A board's picture larger or smaller than the board, its layout kept: `--param scale=2` (0.25 to 4), or `width=…` or `height=…` in pixels (the other side in proportion, a scale for each board). Chrome draws it at that scale, so type and shapes are sharp; a picture has only the pixels its file has (`picture-scale` in `allyhub inspect`). A picture is at most 16384 px a side. A board of another shape is another board, in the code.
146
- - `--param max-kb=…` keeps each board's JPEG, WebP or AVIF at most that many KB, at the best quality under it, which the render says (`chosen`); one that is over it at every quality, or a PNG over it (a PNG keeps every pixel), is not made, and the render says why.
146
+ - `--param max-kb=…` keeps each board's JPEG or WebP at most that many KB, at the best quality under it, which the render says (`chosen`); one that is over it at every quality, or a PNG over it (a PNG keeps every pixel), is not made, and the render says why.
147
147
 
148
148
  ## PSD: out and in
149
149