@allyhub/sdk 0.15.3 → 0.16.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 (92) hide show
  1. package/CHANGELOG.md +9 -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/package.json +1 -1
  5. package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
  6. package/dist/node_modules/@allyhub/formats/dist/items.d.ts +30 -4
  7. package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
  8. package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +15 -4
  9. package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
  10. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  11. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  12. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  13. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  14. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  15. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  16. package/dist/node_modules/@allyhub/piece/dist/source.d.ts +2 -0
  17. package/dist/node_modules/@allyhub/piece/dist/source.js +1 -1
  18. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  19. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +10 -5
  20. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  21. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +7 -0
  22. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  23. package/dist/node_modules/@allyhub/protocol/dist/blobs.d.ts +9 -0
  24. package/dist/node_modules/@allyhub/protocol/dist/blobs.js +1 -1
  25. package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +2 -0
  26. package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
  27. package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.d.ts +77 -0
  28. package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.js +2 -0
  29. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +39 -9
  30. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  31. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +15 -15
  32. package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +441 -5
  33. package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
  34. package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -2
  35. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +1 -1
  36. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +8 -0
  37. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  38. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +5 -5
  39. package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +15 -0
  40. package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
  41. package/dist/node_modules/@allyhub/protocol/dist/paywall.d.ts +134 -0
  42. package/dist/node_modules/@allyhub/protocol/dist/paywall.js +2 -0
  43. package/dist/node_modules/@allyhub/protocol/dist/place.js +1 -1
  44. package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +3 -3
  45. package/dist/node_modules/@allyhub/protocol/dist/purposes.d.ts +47 -0
  46. package/dist/node_modules/@allyhub/protocol/dist/purposes.js +2 -0
  47. package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
  48. package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +52 -5
  49. package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
  50. package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.d.ts +34 -0
  51. package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.js +2 -0
  52. package/dist/node_modules/@allyhub/protocol/dist/sites.d.ts +1 -0
  53. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +21 -52
  54. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  55. package/dist/node_modules/@allyhub/protocol/dist/studio-server.d.ts +264 -0
  56. package/dist/node_modules/@allyhub/protocol/dist/studio-server.js +2 -0
  57. package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.d.ts +18 -0
  58. package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.js +2 -0
  59. package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.d.ts +97 -0
  60. package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.js +2 -0
  61. package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +3 -2
  62. package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
  63. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +20 -20
  64. package/dist/node_modules/@allyhub/protocol/dist/turns.d.ts +71 -0
  65. package/dist/node_modules/@allyhub/protocol/dist/turns.js +2 -0
  66. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  67. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  68. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  69. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  70. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  71. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  72. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  73. package/docs/batches.md +4 -4
  74. package/docs/contract.md +5 -5
  75. package/docs/defaults.md +2 -2
  76. package/docs/docs.md +5 -5
  77. package/docs/footage.md +8 -8
  78. package/docs/image.md +5 -5
  79. package/docs/layers.md +10 -10
  80. package/docs/linkedin.md +1 -1
  81. package/docs/modeling.md +3 -3
  82. package/docs/pictures.md +4 -4
  83. package/docs/project.md +11 -7
  84. package/docs/scenery.md +3 -3
  85. package/docs/sheets.md +5 -5
  86. package/docs/slides.md +2 -2
  87. package/docs/sound.md +7 -7
  88. package/docs/speech.md +7 -7
  89. package/docs/video.md +3 -3
  90. package/docs/websites.md +3 -3
  91. package/docs/x.md +2 -2
  92. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  Feature highlights from each AllyHub release.
4
4
 
5
+ ## 0.16.0
6
+
7
+ - **One Studio on your Mac and in the cloud.** The app opens the same Studio as AllyHub in the cloud, with your projects and conversations as they were.
8
+ - **Your files open in Studio.** CSV, Excel, PowerPoint and Word files open to read, and everything has Download.
9
+ - **Delete from the sidebar.** What you delete goes to the project's trash, where your agent can bring it back.
10
+ - **Pictures you add stay in the project.** Your agent can use a photo you paste in what it makes, not only look at it, and it answers in the language you write in.
11
+ - **Your PowerPoint and Excel files stay editable.** One you give your agent becomes a deck or a sheet you can edit, downloaded as the file again.
12
+ - **An example project to start from**, with a doc, a sheet, a deck, images and a video.
13
+
5
14
  ## 0.15.3
6
15
 
7
16
  - **The editor keeps running after the agent's turn ends.** `allyhub dev` now returns once the page is up and serves in the background; `allyhub dev --stop` stops it, and `--foreground` serves until Ctrl+C as before.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/audio",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/chart",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/diagnostics",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -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";export const WEBSITE_FILE="website.json",WebsiteFileSchema=t.strictObject({$schema:t.string().optional(),title:t.string().min(1).optional().describe("The website's name where people see it (Studio's list of a project's work); none: its entry file's name."),dev:t.string().min(1).optional().describe("The command that serves the website while it is made, run in its folder by a shell. It listens on $PORT at $HOST, which the host sets (`astro dev --port $PORT --host $HOST --ignore-lock`), and allows the hosts in $ALLYHUB_PREVIEW_HOSTS when its server checks the Host header. None: the output folder is served as it is."),build:t.string().min(1).optional().describe("The command that builds the website into its output folder (`astro build`). None: it is not built."),output:t.string().min(1).describe("The folder that is the built website, from the website's folder (`dist`); `.` for a website of plain files."),site:t.string().min(1).optional().describe("The hosted site this website publishes to, written by `allyhub site deploy` the first time, so the folder publishes to the same site from any computer.")});export function parseWebsite(o){let i;try{i=JSON.parse(o)}catch(e){return{ok:!1,problems:[`is not JSON: ${e instanceof Error?e.message:String(e)}`]}}const s=WebsiteFileSchema.safeParse(i);return s.success?{ok:!0,value:s.data}:{ok:!1,problems:s.error.issues.map(e=>e.path.length===0?e.message:`${e.path.join(".")}: ${e.message}`)}}
2
+ import{z as t}from"zod";export const WEBSITE_FILE="website.json",WebsiteFileSchema=t.strictObject({$schema:t.string().optional(),title:t.string().min(1).optional().describe("The website's name where people see it (Studio's list of a project's work); none: its entry file's name."),dev:t.string().min(1).optional().describe("The command that serves the website while it is made, run in its folder by a shell. It listens on $PORT at $HOST, which the host sets (`astro dev --port $PORT --host $HOST --ignore-lock`), and allows the hosts in $ALLYHUB_PREVIEW_HOSTS when its server checks the Host header. None: the output folder is served as it is."),build:t.string().min(1).optional().describe("The command that builds the website into its output folder (`astro build`). None: the output folder is used as it is."),output:t.string().min(1).describe("The folder that is the built website, from the website's folder (`dist`); `.` for a website of plain files."),site:t.string().min(1).optional().describe("The hosted site this website publishes to, written by `allyhub site deploy` the first time, so the folder publishes to the same site from any computer.")});export function parseWebsite(o){let i;try{i=JSON.parse(o)}catch(e){return{ok:!1,problems:[`is not JSON: ${e instanceof Error?e.message:String(e)}`]}}const s=WebsiteFileSchema.safeParse(i);return s.success?{ok:!0,value:s.data}:{ok:!1,problems:s.error.issues.map(e=>e.path.length===0?e.message:`${e.path.join(".")}: ${e.message}`)}}
@@ -185,18 +185,42 @@ export declare function listsFile(files: readonly ItemFile[], path: string): boo
185
185
  export declare const itemFiles: (item: Pick<Item, "entry" | "files">) => ItemFile[];
186
186
  /** An item's id: its file without its extension. */
187
187
  export declare const itemIdOf: (file: string) => string;
188
- /** An item's name for people: its title as listed, else the one its file says, else its file's name. */
188
+ /**
189
+ * A file's id where the list names it with no kind: its path, extension
190
+ * and all (`research/insights.csv`), as a file the list does not name is
191
+ * opened by. It never takes an item's id (`research/insights`, of
192
+ * `research/insights.mdx`), nor that of another file of its name
193
+ * (`research/insights.xlsx`). Versions before gave it its path without
194
+ * its extension, as an item's; `listedPieceByIdOrFormerId` still finds it
195
+ * by that.
196
+ */
197
+ export declare const listedFileIdOf: (file: string) => string;
198
+ /** A piece's name for people: its title as listed, else the one its file says, else its id's last part (a file listed with no kind: its file's name, extension and all). */
189
199
  export declare const itemNameOf: (item: {
190
200
  id: string;
191
201
  title?: string | undefined;
192
202
  }, own?: string) => string;
203
+ /**
204
+ * The piece of a list an id names, whichever version of AllyHub gave the
205
+ * id: by its id; else a file listed with no kind (no `kind`) by the id the
206
+ * other version gives it: its path, where the list was made by a version
207
+ * before a file's id kept its extension; its path without its extension
208
+ * (`itemIdOf`), where the id was kept from then (an address, what a window
209
+ * or a machine remembers), the first such file in the list's order. None
210
+ * where nothing has it.
211
+ */
212
+ export declare function listedPieceByIdOrFormerId<P extends {
213
+ id: string;
214
+ entry: string;
215
+ kind?: string | undefined;
216
+ }>(pieces: readonly P[], id: string): P | undefined;
193
217
  /**
194
218
  * A piece the list names with no kind: a file an editor opens by its name
195
219
  * (a canvas), with the editor whose pattern matches it. It has the names an
196
220
  * item has and nothing of a kind (no versions, no Export, no Share).
197
221
  */
198
222
  export interface ListedFile {
199
- /** What names it: its file without its extension, unique among the items and files of the list. */
223
+ /** What names it: its file, extension and all (`listedFileIdOf`), unique among the items and files of the list. */
200
224
  id: string;
201
225
  /** The folder its file is in, a project path ("" at the root). */
202
226
  dir: string;
@@ -226,7 +250,7 @@ export type ItemProblem =
226
250
  code: "missing";
227
251
  file: string;
228
252
  }
229
- /** Two listed files of one id (`a.ts`, `a.mdx`), or one file listed twice. */
253
+ /** Two listed files of one id (`a.ts` and `a.mdx`, both of a kind), or one file listed twice: the first of them is kept. */
230
254
  | {
231
255
  code: "same-id";
232
256
  id: string;
@@ -250,7 +274,9 @@ export declare const isListedFile: (piece: Item | ListedFile) => piece is Listed
250
274
  * file not there, an id twice). A piece listed with no kind is a file an
251
275
  * editor opens by its name: with `editors` (the file editors loaded), each
252
276
  * is found its editor or is a problem; without them (the build, which
253
- * reads kinds only), it is left out, unchecked.
277
+ * reads kinds only), it is left out, unchecked. Of the pieces of one id
278
+ * the first is kept, as a tolerant reader keeps what it can read, and the
279
+ * id is the problem.
254
280
  */
255
281
  export declare function itemsOf(work: WorkFile, kinds: KindTable, files?: ReadonlySet<string>, editors?: FileEditorTable): ItemScan;
256
282
  //# sourceMappingURL=items.d.ts.map
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{listedWork as x}from"./data/work.js";import{fileEditorIn as O}from"./files.js";import{baseOf as m,dirOf as k}from"./layout.js";export function pointEntriesIn(t,e,n){return t.find(s=>s.id===e)?.points?.[n]??[]}export const LOCALE_MARK="{locale}";export function listsFile(t,e){return t.some(n=>{const s=n.path.indexOf(LOCALE_MARK);if(s<0)return n.path===e;const r=n.path.slice(0,s),d=n.path.slice(s+LOCALE_MARK.length);return e.length>r.length+d.length&&e.startsWith(r)&&e.endsWith(d)})}export const itemFiles=t=>t.files??[{path:t.entry,role:"entry"}],itemIdOf=t=>{const e=m(t),n=e.lastIndexOf(".");return n<=0?t:t.slice(0,t.length-(e.length-n))},itemNameOf=(t,e)=>t.title??e??m(t.id),isListedFile=t=>"editor"in t;export function itemsOf(t,e,n,s){const r=[],d=[],f=new Map;for(const i of x(t)){const o=i.file.replace(/^\.\//u,""),c=i.kind;let p;if(c===void 0){if(s===void 0)continue;const l=O(s,o)?.id;if(l===void 0){r.push({code:"no-editor",file:o});continue}p={editor:l}}else if(e.some(l=>l.id===c))p={kind:c};else{r.push({code:"unknown-kind",kind:c,file:o});continue}if(n!==void 0&&!n.has(o)){r.push({code:"missing",file:o});continue}const h=itemIdOf(o);f.set(h,[...f.get(h)??[],o]);const g={id:h,dir:k(o),entry:o,...i.title===void 0?{}:{title:i.title},groups:i.groups};d.push({...g,...p})}const a=new Set;for(const[i,o]of f)o.length>1&&(a.add(i),r.push({code:"same-id",id:i,files:o}));const u=d.filter(i=>!a.has(i.id));return{items:u.filter(i=>!isListedFile(i)),files:u.filter(isListedFile),listed:u,problems:r}}
2
+ import{listedWork as g}from"./data/work.js";import{fileEditorIn as O}from"./files.js";import{baseOf as m,dirOf as k}from"./layout.js";export function pointEntriesIn(e,t,i){return e.find(n=>n.id===t)?.points?.[i]??[]}export const LOCALE_MARK="{locale}";export function listsFile(e,t){return e.some(i=>{const n=i.path.indexOf(LOCALE_MARK);if(n<0)return i.path===t;const r=i.path.slice(0,n),d=i.path.slice(n+LOCALE_MARK.length);return t.length>r.length+d.length&&t.startsWith(r)&&t.endsWith(d)})}export const itemFiles=e=>e.files??[{path:e.entry,role:"entry"}],itemIdOf=e=>{const t=m(e),i=t.lastIndexOf(".");return i<=0?e:e.slice(0,e.length-(t.length-i))},listedFileIdOf=e=>e,itemNameOf=(e,t)=>e.title??t??m(e.id);export function listedPieceByIdOrFormerId(e,t){const i=e.filter(n=>n.kind===void 0);return e.find(n=>n.id===t)??i.find(n=>n.entry===t)??i.find(n=>itemIdOf(n.entry)===t)}export const isListedFile=e=>"editor"in e;export function itemsOf(e,t,i,n){const r=[],d=[],u=new Map;for(const s of g(e)){const o=s.file.replace(/^\.\//u,""),f=s.kind;let l;if(f===void 0){if(n===void 0)continue;const c=O(n,o)?.id;if(c===void 0){r.push({code:"no-editor",file:o});continue}l={editor:c}}else if(t.some(c=>c.id===f))l={kind:f};else{r.push({code:"unknown-kind",kind:f,file:o});continue}if(i!==void 0&&!i.has(o)){r.push({code:"missing",file:o});continue}const h="kind"in l?itemIdOf(o):listedFileIdOf(o);u.set(h,[...u.get(h)??[],o]);const x={id:h,dir:k(o),entry:o,...s.title===void 0?{}:{title:s.title},groups:s.groups};d.push({...x,...l})}for(const[s,o]of u)o.length>1&&r.push({code:"same-id",id:s,files:o});const a=new Set,p=d.filter(s=>a.has(s.id)?!1:(a.add(s.id),!0));return{items:p.filter(s=>!isListedFile(s)),files:p.filter(isListedFile),listed:p,problems:r}}
@@ -12,7 +12,12 @@ export declare const TEXTURES_DIR = "assets/media/textures";
12
12
  export declare const COMPONENTS_DIR = "components";
13
13
  /** 3D sceneries a registry adds, a folder each (`sceneries/<name>/`), as shadcn puts a type of item in its own folder. */
14
14
  export declare const SCENERIES_DIR = "sceneries";
15
- /** This computer's only, never shared: a framework's build folder. */
15
+ /**
16
+ * AllyHub's own folder in a project, as `.next/` and `.astro/` are: made
17
+ * again, never saved and never in Git (`GITIGNORE`, core/protocol's
18
+ * `SNAPSHOT_SKIPPED`). What each place in a project is: docs/architecture.md,
19
+ * 4.1, "A project's folders".
20
+ */
16
21
  export declare const LOCAL_DIR = ".allyhub";
17
22
  /** The agent's working files, free to throw away. */
18
23
  export declare const WORK_DIR = ".allyhub/work";
@@ -32,10 +37,16 @@ export declare const CACHE_DIR = ".allyhub/cache";
32
37
  export declare function partCacheLimit(): number;
33
38
  /** Scenery bakes: a file each, named by its scene's digest and the renderer it was made on. */
34
39
  export declare const BAKE_DIR = ".allyhub/cache/bake";
40
+ /**
41
+ * The agents' folder in a project (the Agent Skills standard's: skills in
42
+ * `.agents/skills/`), saved with it. What the agents keep of the project
43
+ * beside its work goes here, never in `.allyhub/`, which is made again.
44
+ */
45
+ export declare const AGENTS_DIR = ".agents";
35
46
  /** What a person deleted, kept until they empty it. */
36
- export declare const TRASH_DIR = ".allyhub/trash";
37
- /** An agent's notes on the project, kept on this computer (AllyHub's own agent: docs/skills-schedules-memory.md). */
38
- export declare const MEMORY_DIR = ".allyhub/memory";
47
+ export declare const TRASH_DIR = ".agents/trash";
48
+ /** An agent's notes on the project (AllyHub's own agent: docs/skills-schedules-memory.md). */
49
+ export declare const MEMORY_DIR = ".agents/memory";
39
50
  export declare const PACKAGE_FILE = "package.json";
40
51
  export declare const TSCONFIG_FILE = "tsconfig.json";
41
52
  export declare const AGENTS_FILE = "AGENTS.md";
@@ -1,5 +1,5 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export const ASSETS_DIR="assets",MEDIA_DIR="assets/media",DATA_DIR="assets/data",TEXT_DIR="assets/text",FONTS_DIR="assets/fonts",MODELS_DIR="assets/media/models",ENVIRONMENTS_DIR="assets/media/environments",TEXTURES_DIR="assets/media/textures",COMPONENTS_DIR="components",SCENERIES_DIR="sceneries",LOCAL_DIR=".allyhub",WORK_DIR=".allyhub/work",REFERENCE_DIR=".allyhub/work/reference",DEV_FILE=".allyhub/dev.json",OUT_DIR=".allyhub/out",CACHE_DIR=".allyhub/cache";export function partCacheLimit(){const t=globalThis.process?.env,e=Number(t?.ALLYHUB_PART_CACHE_MB);return(Number.isFinite(e)&&e>=0?e:4096)*1024*1024}export const BAKE_DIR=".allyhub/cache/bake",TRASH_DIR=".allyhub/trash",MEMORY_DIR=".allyhub/memory",PACKAGE_FILE="package.json",TSCONFIG_FILE="tsconfig.json",AGENTS_FILE="AGENTS.md",CLAUDE_FILE="CLAUDE.md",CONFIG_FILES=["allyhub.config.ts","allyhub.config.mts","allyhub.config.js","allyhub.config.mjs"],GITIGNORE=`node_modules/
2
+ export const ASSETS_DIR="assets",MEDIA_DIR="assets/media",DATA_DIR="assets/data",TEXT_DIR="assets/text",FONTS_DIR="assets/fonts",MODELS_DIR="assets/media/models",ENVIRONMENTS_DIR="assets/media/environments",TEXTURES_DIR="assets/media/textures",COMPONENTS_DIR="components",SCENERIES_DIR="sceneries",LOCAL_DIR=".allyhub",WORK_DIR=".allyhub/work",REFERENCE_DIR=".allyhub/work/reference",DEV_FILE=".allyhub/dev.json",OUT_DIR=".allyhub/out",CACHE_DIR=".allyhub/cache";export function partCacheLimit(){const t=globalThis.process?.env,e=Number(t?.ALLYHUB_PART_CACHE_MB);return(Number.isFinite(e)&&e>=0?e:4096)*1024*1024}export const BAKE_DIR=".allyhub/cache/bake",AGENTS_DIR=".agents",TRASH_DIR=".agents/trash",MEMORY_DIR=".agents/memory",PACKAGE_FILE="package.json",TSCONFIG_FILE="tsconfig.json",AGENTS_FILE="AGENTS.md",CLAUDE_FILE="CLAUDE.md",CONFIG_FILES=["allyhub.config.ts","allyhub.config.mts","allyhub.config.js","allyhub.config.mjs"],GITIGNORE=`node_modules/
3
3
  ${LOCAL_DIR}/
4
4
  .playwright-cli/
5
5
  `;export function unscanned(t){return t.split("/").some(e=>e.startsWith(".")||e==="node_modules")}export function projectPath(t){return t.replaceAll("\\","/").replace(/^(?:\.\/)+/u,"").replace(/\/+$/u,"").replace(/\/{2,}/gu,"/")}export function dirOf(t){const e=t.lastIndexOf("/");return e<0?"":t.slice(0,e)}export function baseOf(t){return t.slice(t.lastIndexOf("/")+1)}export function within(t,e){return e===""||t===e||t.startsWith(`${e}/`)}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/formats",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/image-draw",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./*": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/image-measure",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./*": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/image-sdk",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/measure",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/ooxml",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -46,6 +46,8 @@ export interface BuildSource {
46
46
  * (resolveSource), so one build is served anywhere.
47
47
  */
48
48
  module: string;
49
+ /** The chunks the bundle imports, and theirs: asked for beside it rather than one import after another. Absent from a build before it. */
50
+ imports?: string[];
49
51
  /** The stylesheets the bundle imports. */
50
52
  styles?: string[];
51
53
  /** The piece's dimensions, as the build resolved them (lang filled in). */
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- const t=(e,n)=>e===""?e:new URL(e,n).href;export function resolveMedia(e,n){return Object.fromEntries(Object.entries(e).map(([i,d])=>[i,{...d,url:t(d.url,n),...d.matteUrl===void 0?{}:{matteUrl:t(d.matteUrl,n)},...d.denoisedUrl===void 0?{}:{denoisedUrl:t(d.denoisedUrl,n)}}]))}export function resolveSource(e,n){return{...e,module:t(e.module,n),...e.styles===void 0?{}:{styles:e.styles.map(i=>t(i,n))},media:resolveMedia(e.media,n)}}
2
+ const t=(e,n)=>e===""?e:new URL(e,n).href;export function resolveMedia(e,n){return Object.fromEntries(Object.entries(e).map(([i,d])=>[i,{...d,url:t(d.url,n),...d.matteUrl===void 0?{}:{matteUrl:t(d.matteUrl,n)},...d.denoisedUrl===void 0?{}:{denoisedUrl:t(d.denoisedUrl,n)}}]))}export function resolveSource(e,n){return{...e,module:t(e.module,n),...e.imports===void 0?{}:{imports:e.imports.map(i=>t(i,n))},...e.styles===void 0?{}:{styles:e.styles.map(i=>t(i,n))},media:resolveMedia(e.media,n)}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/piece",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -113,6 +113,7 @@ export declare const ACCOUNT_CALLS: {
113
113
  family: z.ZodDefault<z.ZodNullable<z.ZodString>>;
114
114
  recommended: z.ZodDefault<z.ZodBoolean>;
115
115
  monthlyCredits: z.ZodNumber;
116
+ storageBytes: z.ZodOptional<z.ZodNumber>;
116
117
  prices: z.ZodArray<z.ZodObject<{
117
118
  interval: z.ZodUnion<readonly [z.ZodEnum<{
118
119
  month: "month";
@@ -130,6 +131,7 @@ export declare const ACCOUNT_CALLS: {
130
131
  presetsCents: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
131
132
  }, z.core.$strip>;
132
133
  welcomeCredits: z.ZodOptional<z.ZodNumber>;
134
+ freeStorageBytes: z.ZodOptional<z.ZodNumber>;
133
135
  }, z.core.$strip>>;
134
136
  readonly usage: AccountCall<z.ZodObject<{
135
137
  days: z.ZodInt;
@@ -165,16 +167,16 @@ export declare const ACCOUNT_CALLS: {
165
167
  price: z.ZodOptional<z.ZodObject<{
166
168
  credits: z.ZodNumber;
167
169
  per: z.ZodUnion<readonly [z.ZodEnum<{
168
- call: "call";
170
+ question: "question";
169
171
  result: "result";
170
172
  page: "page";
173
+ call: "call";
171
174
  second: "second";
172
175
  minute: "minute";
173
176
  thousand_characters: "thousand_characters";
174
177
  image: "image";
175
178
  frame: "frame";
176
179
  megapixel: "megapixel";
177
- question: "question";
178
180
  phrase: "phrase";
179
181
  }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
180
182
  varies: z.ZodBoolean;
@@ -226,10 +228,10 @@ export declare const ACCOUNT_CALLS: {
226
228
  spends: z.ZodArray<z.ZodObject<{
227
229
  at: z.ZodString;
228
230
  kind: z.ZodUnion<readonly [z.ZodEnum<{
231
+ other: "other";
229
232
  models: "models";
230
233
  tools: "tools";
231
234
  studio: "studio";
232
- other: "other";
233
235
  }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
234
236
  what: z.ZodNullable<z.ZodString>;
235
237
  seconds: z.ZodNullable<z.ZodNumber>;
@@ -251,8 +253,8 @@ export declare const ACCOUNT_CALLS: {
251
253
  }, z.core.$strip>>;
252
254
  readonly portal: AccountCall<z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
253
255
  flow: z.ZodEnum<{
254
- home: "home";
255
256
  payment_method: "payment_method";
257
+ home: "home";
256
258
  cancel: "cancel";
257
259
  }>;
258
260
  }, z.core.$strict>, z.ZodObject<{
@@ -331,8 +333,8 @@ export declare const ACCOUNT_CALLS: {
331
333
  number: z.ZodNullable<z.ZodString>;
332
334
  createdAt: z.ZodString;
333
335
  kind: z.ZodUnion<readonly [z.ZodEnum<{
334
- credits: "credits";
335
336
  plan: "plan";
337
+ credits: "credits";
336
338
  }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
337
339
  totalCents: z.ZodNumber;
338
340
  currency: z.ZodString;
@@ -369,6 +371,7 @@ export declare const ACCOUNT_CALLS: {
369
371
  role: z.ZodString;
370
372
  limit: z.ZodNullable<z.ZodNumber>;
371
373
  used: z.ZodNumber;
374
+ spent: z.ZodOptional<z.ZodNumber>;
372
375
  }, z.core.$strip>>;
373
376
  }, z.core.$strip>>;
374
377
  readonly "members/limit": AccountCall<z.ZodObject<{
@@ -597,6 +600,7 @@ export declare const ACCOUNT_CALLS: {
597
600
  readonly storage: AccountCall<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
598
601
  keptBytes: z.ZodNumber;
599
602
  capBytes: z.ZodNullable<z.ZodNumber>;
603
+ clearingBytes: z.ZodOptional<z.ZodNumber>;
600
604
  }, z.core.$strip>>;
601
605
  readonly "storage/projects": AccountCall<z.ZodObject<{
602
606
  page: z.ZodInt;
@@ -623,6 +627,7 @@ export declare const ACCOUNT_CALLS: {
623
627
  }[], unknown[]>>;
624
628
  total: z.ZodNumber;
625
629
  }, z.core.$strip>>;
630
+ readonly "storage/clear": AccountCall<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{}, z.core.$strip>>;
626
631
  readonly "files/delete": AccountCall<z.ZodObject<{
627
632
  id: z.ZodString;
628
633
  }, z.core.$strict>, z.ZodObject<{}, z.core.$strip>>;
@@ -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{ACCOUNT_DELETE_PATH as j,ACCOUNT_EXPORT_PATH as G,DEVICES_PATH as b,DevicesSchema as v}from"./auth.js";import{FILES_PATH as H,AUTO_TOP_UP_PATH as A,AutoTopUpRequestSchema as k,BILLING_CHECKOUT_PATH as U,BILLING_PAYMENT_PATH as C,BILLING_PLANS_PATH as R,BILLING_PORTAL_PATH as N,BILLING_REQUEST_PATH as x,BILLING_RESUME_PATH as M,BILLING_SUMMARY_PATH as B,BILLING_TOP_UP_PATH as D,BILLING_USAGE_PATH as $,BillingPaymentSchema as z,BillingPlansSchema as q,BillingSummarySchema as S,BillingUsageSchema as Y,CheckoutRequestSchema as F,PortalRequestSchema as K,TopUpRequestSchema as V,BILLING_INVOICES_PATH as Z,BILLING_SPENDS_PATH as J,BillingInvoicesSchema as Q,IDEMPOTENCY_KEY_HEADER as W,CAPABILITIES_PATH as P,CATALOG_PATH as X,EDITORS_PATH as ee,EditorsSchema as te,CapabilitiesSchema as O,CapabilityRequestSchema as se,CatalogSchema as oe,BillingSpendsSchema as ie}from"./cloud.js";import{PROJECTS_PATH as ne,STORAGE_FILES_PATH as ae,STORAGE_PATH as re,STORAGE_PROJECTS_PATH as ce,StoragePageSchema as w,StorageSchema as me,StoredFilesSchema as le,StoredProjectsSchema as he}from"./snapshots.js";import{MAIL_MESSAGES_PATH as f,MAIL_PATH as de,MAIL_PERSON_QUERY as pe,MAIL_SETTINGS_PATH as Te,MailMessageSchema as ue,MailSearchResponseSchema as Ee,MailSearchSchema as be,MailSettingsSchema as ge,MailboxSchema as I}from"./mail.js";import{MEMBERS_PATH as d,MemberLimitSchema as Ae,MembersSchema as Se,ORGANIZATIONS_PATH as _,ORGANIZATION_PATH as y}from"./teams.js";export const INVITATIONS_PATH="/api/organization/invitations",InvitationsSchema=e.object({invitations:e.array(e.object({id:e.string(),email:e.string(),role:e.string(),expiresAt:e.iso.datetime()}))}),LEAVE_PATH="/api/organization/leave",KEYS_PATH="/api/keys",KeysSchema=e.object({keys:e.array(e.object({id:e.string(),name:e.string().nullable(),start:e.string().nullable(),enabled:e.boolean(),createdAt:e.iso.datetime(),lastUsedAt:e.iso.datetime().nullable()}))}),PROFILE_PATH="/api/account/profile",ProfileSchema=e.object({name:e.string(),email:e.string(),google:e.boolean(),v1:e.object({url:e.url(),closesAt:e.iso.datetime({offset:!0}),bonusCredits:e.number().int().nonnegative().default(0)}).optional()}),ROLES=["member","admin","owner"];const s=e.strictObject({}),o=e.object({}),L=e.object({url:e.url()}),p=e.string().trim().min(1).max(100),t=(i,T,c,l,r,m)=>({http:i,route:T,params:c,result:l,about:r,...m===void 0?{}:{headers:m}});export const ACCOUNT_CALLS={balance:t("GET",B,s,S,"The organization's credits, this month's plan credits, its plan and its auto top-up."),plans:t("GET",R,s,q,"The plans, their prices, and what a top-up buys."),usage:t("GET",$,e.strictObject({days:e.int().min(1).max(400),timeZone:e.string().min(1)}),Y,"Credits spent each day by what they were spent on, the days with none left out."),catalog:t("GET",X,s,oe,"The cloud tools' catalog: its works and every tool, with what it costs."),editors:t("GET",ee,s,te,"The editors the console lists, free in every product, in their order."),capabilities:t("GET",P,s,O,"The cloud tools the team turned off: works and tools."),"capabilities/set":t("PUT",P,se,O,"A work or a tool switched on or off for the team, an owner's or an admin's; what is off now."),spends:t("GET",J,e.strictObject({days:e.int().min(1).max(400),limit:e.int().min(1).max(5e3).optional()}),ie,"Each spend of the last days, the latest first: when, by whom, on what and how many credits; a member reads their own."),checkout:t("POST",U,F,L,"Stripe Checkout for a plan or a top-up, to open in a browser."),portal:t("POST",N,K,L,"Stripe's Customer Portal at its home (the card, billing details, invoices) or at a flow (a new card, a change of plan, the plan's cancellation), to open in a browser."),resume:t("POST",M,s,S,"A plan cancelled at its period's end taken up again."),payment:t("GET",C,s,z,"The card charged without the person there, and where Stripe's emails go."),invoices:t("GET",Z,s,Q,"The organization's invoices, the latest first, each with its PDF."),topUp:t("POST",D,V.extend({key:e.uuid()}),e.object({credits:e.number()}),"Credits bought with the saved card at once, once by the purchase's key; answers what was added. A browser's session alone.",{key:W}),"autoTopUp/set":t("PUT",A,k,e.union([e.object({on:e.literal(!0)}),e.object({saveCard:e.url()})]),"Auto top-up on, or Stripe Checkout that saves a card first (or another), to open in a browser. A browser's session alone."),"autoTopUp/off":t("DELETE",A,s,o,"Auto top-up off."),"credits/request":t("POST",x,s,e.object({asked:e.literal(!0)}),"The organization's owners and admins asked by email to add credits, at most once a day for each member."),members:t("GET",d,s,Se,"The members with their limits and spend; a member sees their own row."),"members/limit":t("PUT",`${d}/:userId/limit`,e.strictObject({userId:e.string().min(1)}).extend(Ae.shape),o,"A member's limit in credits a month, null for none."),"members/role":t("PUT",`${d}/:userId/role`,e.strictObject({userId:e.string().min(1),role:e.enum(ROLES)}),o,"A member's role; only an owner makes or unmakes an owner."),"members/remove":t("DELETE",`${d}/:userId`,e.strictObject({userId:e.string().min(1)}),o,"A member removed from the team."),invitations:t("GET",INVITATIONS_PATH,s,InvitationsSchema,"The invitations waiting to be accepted."),"invitations/send":t("POST",INVITATIONS_PATH,e.strictObject({email:e.email(),role:e.enum(["member","admin"])}),o,"Invites a person by email; one invited already is sent a new invitation."),"invitations/cancel":t("DELETE",`${INVITATIONS_PATH}/:id`,e.strictObject({id:e.string().min(1)}),o,"An invitation cancelled."),"team/create":t("POST",_,e.strictObject({name:p}),e.object({id:e.string()}),"A new team, the person its owner."),"team/rename":t("PUT",y,e.strictObject({name:p}),o,"The team renamed."),"team/leave":t("POST",LEAVE_PATH,s,o,"The person leaves the team; its last owner cannot."),"team/dissolve":t("DELETE",y,s,o,"The team dissolved by its owner; it can be restored for 30 days."),"team/restore":t("POST",`${_}/:id/restore`,e.strictObject({id:e.string().min(1)}),o,"A dissolved team restored by its owner."),keys:t("GET",KEYS_PATH,s,KeysSchema,"The person's API keys for the organization."),"keys/create":t("POST",KEYS_PATH,e.strictObject({name:p}),e.object({id:e.string(),key:e.string()}),"A new API key; its secret is in this answer alone."),"keys/enable":t("PUT",`${KEYS_PATH}/:id`,e.strictObject({id:e.string().min(1),enabled:e.boolean()}),o,"An API key turned off or on again."),"keys/remove":t("DELETE",`${KEYS_PATH}/:id`,e.strictObject({id:e.string().min(1)}),o,"An API key deleted."),mail:t("GET",de,s,I,"The person's mailbox in the organization: its addresses and settings."),"mail/settings":t("PUT",`${Te}?${pe}`,ge,I,"The mailbox's display name, whom its agents may write to, and how long it keeps mail."),"mail/messages":t("GET",f,be,Ee,"The mailbox's messages, newest first."),"mail/message":t("GET",`${f}/:id`,e.strictObject({id:e.string().min(1)}),ue,"One message, read whole."),profile:t("GET",PROFILE_PATH,s,ProfileSchema,"The person's name and email, whether Google signs them in, and AllyHub's previous version while it is open to them."),"profile/set":t("PUT",PROFILE_PATH,e.strictObject({name:p}),o,"The person's name."),storage:t("GET",re,s,me,"What the organization keeps in the cloud of what it may."),"storage/projects":t("GET",ce,w,he,"A page of the person's projects in the cloud and their cloud Studio's home, the largest first, each with what it alone holds."),"storage/files":t("GET",ae,w,le,"A page of the person's tools' inputs and outputs kept in the cloud, the largest first."),"files/delete":t("DELETE",`${H}/:id`,e.strictObject({id:e.string().min(1)}),o,"One of the person's tools' inputs or outputs deleted from the cloud; its bytes stay while a project names them."),"projects/delete":t("DELETE",`${ne}/:id`,e.strictObject({id:e.string().min(1)}),o,"One of the person's projects deleted from the cloud, with its snapshots; a copy on a computer stays."),devices:t("GET",b,s,v,"The computers signed in as the person."),"devices/signOut":t("DELETE",`${b}/:id`,e.strictObject({id:e.string().min(1)}),o,"A computer signed out."),"devices/signOutOthers":t("DELETE",b,s,o,"Every computer signed out but the one that asks."),export:t("GET",G,s,e.record(e.string(),e.unknown()),"Everything kept about the person."),close:t("POST",j,s,o,"Mails the link that deletes the person's account: a browser's session alone, so a computer opens the page in the browser.")};export function accountRequest(i,T){const c=T,l=new Set,r=i.route.replace(/:([A-Za-z]+)/gu,(n,a)=>(l.add(a),encodeURIComponent(String(c[a])))),m=i.headers??{},g=Object.entries(m).flatMap(([n,a])=>{const h=c[n];return typeof h=="string"?[[a,h]]:[]}),u=g.length===0?{}:{headers:Object.fromEntries(g)},E=Object.entries(c).filter(([n,a])=>!l.has(n)&&!(n in m)&&a!==void 0);if(i.http==="GET"||i.http==="DELETE"){const n=E.map(([a,h])=>`${encodeURIComponent(a)}=${encodeURIComponent(String(h))}`).join("&");return{method:i.http,path:n===""?r:`${r}?${n}`,...u}}return E.length===0?{method:i.http,path:r,...u}:{method:i.http,path:r,body:Object.fromEntries(E),...u}}
2
+ import{z as e}from"zod";import{ACCOUNT_DELETE_PATH as G,ACCOUNT_EXPORT_PATH as j,DEVICES_PATH as b,DevicesSchema as v}from"./auth.js";import{FILES_PATH as H,AUTO_TOP_UP_PATH as A,AutoTopUpRequestSchema as k,BILLING_CHECKOUT_PATH as R,BILLING_PAYMENT_PATH as C,BILLING_PLANS_PATH as U,BILLING_PORTAL_PATH as N,BILLING_REQUEST_PATH as x,BILLING_RESUME_PATH as M,BILLING_SUMMARY_PATH as D,BILLING_TOP_UP_PATH as B,BILLING_USAGE_PATH as $,BillingPaymentSchema as z,BillingPlansSchema as q,BillingSummarySchema as S,BillingUsageSchema as Y,CheckoutRequestSchema as F,PortalRequestSchema as K,TopUpRequestSchema as V,BILLING_INVOICES_PATH as Z,BILLING_SPENDS_PATH as J,BillingInvoicesSchema as Q,IDEMPOTENCY_KEY_HEADER as W,CAPABILITIES_PATH as P,CATALOG_PATH as X,EDITORS_PATH as ee,EditorsSchema as te,CapabilitiesSchema as O,CapabilityRequestSchema as se,CatalogSchema as oe,BillingSpendsSchema as ie}from"./cloud.js";import{PROJECTS_PATH as ne,STORAGE_CLEARING_PATH as ae,STORAGE_FILES_PATH as re,STORAGE_PATH as ce,STORAGE_PROJECTS_PATH as me,StoragePageSchema as w,StorageSchema as le,StoredFilesSchema as he,StoredProjectsSchema as de}from"./snapshots.js";import{MAIL_MESSAGES_PATH as f,MAIL_PATH as pe,MAIL_PERSON_QUERY as Te,MAIL_SETTINGS_PATH as ue,MailMessageSchema as Ee,MailSearchResponseSchema as be,MailSearchSchema as ge,MailSettingsSchema as Ae,MailboxSchema as I}from"./mail.js";import{MEMBERS_PATH as d,MemberLimitSchema as Se,MembersSchema as Pe,ORGANIZATIONS_PATH as _,ORGANIZATION_PATH as y}from"./teams.js";export const INVITATIONS_PATH="/api/organization/invitations",InvitationsSchema=e.object({invitations:e.array(e.object({id:e.string(),email:e.string(),role:e.string(),expiresAt:e.iso.datetime()}))}),LEAVE_PATH="/api/organization/leave",KEYS_PATH="/api/keys",KeysSchema=e.object({keys:e.array(e.object({id:e.string(),name:e.string().nullable(),start:e.string().nullable(),enabled:e.boolean(),createdAt:e.iso.datetime(),lastUsedAt:e.iso.datetime().nullable()}))}),PROFILE_PATH="/api/account/profile",ProfileSchema=e.object({name:e.string(),email:e.string(),google:e.boolean(),v1:e.object({url:e.url(),closesAt:e.iso.datetime({offset:!0}),bonusCredits:e.number().int().nonnegative().default(0)}).optional()}),ROLES=["member","admin","owner"];const s=e.strictObject({}),o=e.object({}),L=e.object({url:e.url()}),p=e.string().trim().min(1).max(100),t=(i,T,c,l,r,m)=>({http:i,route:T,params:c,result:l,about:r,...m===void 0?{}:{headers:m}});export const ACCOUNT_CALLS={balance:t("GET",D,s,S,"The organization's credits, this month's plan credits, its plan and its auto top-up."),plans:t("GET",U,s,q,"The plans, their prices, and what a top-up buys."),usage:t("GET",$,e.strictObject({days:e.int().min(1).max(400),timeZone:e.string().min(1)}),Y,"Credits spent each day by what they were spent on, the days with none left out."),catalog:t("GET",X,s,oe,"The cloud tools' catalog: its works and every tool, with what it costs."),editors:t("GET",ee,s,te,"The editors the console lists, free in every product, in their order."),capabilities:t("GET",P,s,O,"The cloud tools the team turned off: works and tools."),"capabilities/set":t("PUT",P,se,O,"A work or a tool switched on or off for the team, an owner's or an admin's; what is off now."),spends:t("GET",J,e.strictObject({days:e.int().min(1).max(400),limit:e.int().min(1).max(5e3).optional()}),ie,"Each spend of the last days, the latest first: when, by whom, on what and how many credits; a member reads their own."),checkout:t("POST",R,F,L,"Stripe Checkout for a plan or a top-up, to open in a browser."),portal:t("POST",N,K,L,"Stripe's Customer Portal at its home (the card, billing details, invoices) or at a flow (a new card, a change of plan, the plan's cancellation), to open in a browser."),resume:t("POST",M,s,S,"A plan cancelled at its period's end taken up again."),payment:t("GET",C,s,z,"The card charged without the person there, and where Stripe's emails go."),invoices:t("GET",Z,s,Q,"The organization's invoices, the latest first, each with its PDF."),topUp:t("POST",B,V.extend({key:e.uuid()}),e.object({credits:e.number()}),"Credits bought with the saved card at once, once by the purchase's key; answers what was added. A browser's session alone.",{key:W}),"autoTopUp/set":t("PUT",A,k,e.union([e.object({on:e.literal(!0)}),e.object({saveCard:e.url()})]),"Auto top-up on, or Stripe Checkout that saves a card first (or another), to open in a browser. A browser's session alone."),"autoTopUp/off":t("DELETE",A,s,o,"Auto top-up off."),"credits/request":t("POST",x,s,e.object({asked:e.literal(!0)}),"The organization's owners and admins asked by email to add credits, at most once a day for each member."),members:t("GET",d,s,Pe,"The members with their limits and spend; a member sees their own row."),"members/limit":t("PUT",`${d}/:userId/limit`,e.strictObject({userId:e.string().min(1)}).extend(Se.shape),o,"A member's limit in credits a month, null for none."),"members/role":t("PUT",`${d}/:userId/role`,e.strictObject({userId:e.string().min(1),role:e.enum(ROLES)}),o,"A member's role; only an owner makes or unmakes an owner."),"members/remove":t("DELETE",`${d}/:userId`,e.strictObject({userId:e.string().min(1)}),o,"A member removed from the team."),invitations:t("GET",INVITATIONS_PATH,s,InvitationsSchema,"The invitations waiting to be accepted."),"invitations/send":t("POST",INVITATIONS_PATH,e.strictObject({email:e.email(),role:e.enum(["member","admin"])}),o,"Invites a person by email; one invited already is sent a new invitation."),"invitations/cancel":t("DELETE",`${INVITATIONS_PATH}/:id`,e.strictObject({id:e.string().min(1)}),o,"An invitation cancelled."),"team/create":t("POST",_,e.strictObject({name:p}),e.object({id:e.string()}),"A new team, the person its owner."),"team/rename":t("PUT",y,e.strictObject({name:p}),o,"The team renamed."),"team/leave":t("POST",LEAVE_PATH,s,o,"The person leaves the team; its last owner cannot."),"team/dissolve":t("DELETE",y,s,o,"The team dissolved by its owner; it can be restored for 30 days."),"team/restore":t("POST",`${_}/:id/restore`,e.strictObject({id:e.string().min(1)}),o,"A dissolved team restored by its owner."),keys:t("GET",KEYS_PATH,s,KeysSchema,"The person's API keys for the organization."),"keys/create":t("POST",KEYS_PATH,e.strictObject({name:p}),e.object({id:e.string(),key:e.string()}),"A new API key; its secret is in this answer alone."),"keys/enable":t("PUT",`${KEYS_PATH}/:id`,e.strictObject({id:e.string().min(1),enabled:e.boolean()}),o,"An API key turned off or on again."),"keys/remove":t("DELETE",`${KEYS_PATH}/:id`,e.strictObject({id:e.string().min(1)}),o,"An API key deleted."),mail:t("GET",pe,s,I,"The person's mailbox in the organization: its addresses and settings."),"mail/settings":t("PUT",`${ue}?${Te}`,Ae,I,"The mailbox's display name, whom its agents may write to, and how long it keeps mail."),"mail/messages":t("GET",f,ge,be,"The mailbox's messages, newest first."),"mail/message":t("GET",`${f}/:id`,e.strictObject({id:e.string().min(1)}),Ee,"One message, read whole."),profile:t("GET",PROFILE_PATH,s,ProfileSchema,"The person's name and email, whether Google signs them in, and AllyHub's previous version while it is open to them."),"profile/set":t("PUT",PROFILE_PATH,e.strictObject({name:p}),o,"The person's name."),storage:t("GET",ce,s,le,"What the organization keeps in the cloud of what it may."),"storage/projects":t("GET",me,w,de,"A page of the person's projects in the cloud and their cloud Studio's home, the largest first, each with what it alone holds."),"storage/files":t("GET",re,w,he,"A page of the person's tools' inputs and outputs kept in the cloud, the largest first."),"storage/clear":t("DELETE",ae,s,o,"What the organization keeps that no longer is in use, deleted from the cloud now rather than at the daily sweep."),"files/delete":t("DELETE",`${H}/:id`,e.strictObject({id:e.string().min(1)}),o,"One of the person's tools' inputs or outputs deleted from the cloud; its bytes stay while a project names them."),"projects/delete":t("DELETE",`${ne}/:id`,e.strictObject({id:e.string().min(1)}),o,"One of the person's projects deleted from the cloud, with its snapshots; a copy on a computer stays."),devices:t("GET",b,s,v,"The computers signed in as the person."),"devices/signOut":t("DELETE",`${b}/:id`,e.strictObject({id:e.string().min(1)}),o,"A computer signed out."),"devices/signOutOthers":t("DELETE",b,s,o,"Every computer signed out but the one that asks."),export:t("GET",j,s,e.record(e.string(),e.unknown()),"Everything kept about the person."),close:t("POST",G,s,o,"Mails the link that deletes the person's account: a browser's session alone, so a computer opens the page in the browser.")};export function accountRequest(i,T){const c=T,l=new Set,r=i.route.replace(/:([A-Za-z]+)/gu,(n,a)=>(l.add(a),encodeURIComponent(String(c[a])))),m=i.headers??{},g=Object.entries(m).flatMap(([n,a])=>{const h=c[n];return typeof h=="string"?[[a,h]]:[]}),u=g.length===0?{}:{headers:Object.fromEntries(g)},E=Object.entries(c).filter(([n,a])=>!l.has(n)&&!(n in m)&&a!==void 0);if(i.http==="GET"||i.http==="DELETE"){const n=E.map(([a,h])=>`${encodeURIComponent(a)}=${encodeURIComponent(String(h))}`).join("&");return{method:i.http,path:n===""?r:`${r}?${n}`,...u}}return E.length===0?{method:i.http,path:r,...u}:{method:i.http,path:r,body:Object.fromEntries(E),...u}}
@@ -30,6 +30,13 @@ export declare const DEVICES_PATH = "/api/account/devices";
30
30
  * It only tells them apart; the sign-in itself authorizes.
31
31
  */
32
32
  export declare const DEVICE_HEADER = "x-allyhub-device";
33
+ /**
34
+ * The header a program's call carries when no person asked for it, such
35
+ * as a Studio server's save on its clock: AllyHub marks a refusal of it as
36
+ * background (`refusal_met`'s `background`), so the paywall's funnel can
37
+ * leave it out. Its value is `1`; any other, or none, is a person's call.
38
+ */
39
+ export declare const BACKGROUND_HEADER = "x-allyhub-background";
33
40
  /** With a token request: the computer's name as its owner set it, percent-encoded (RFC 3986). */
34
41
  export declare const DEVICE_NAME_HEADER = "x-allyhub-device-name";
35
42
  /** A sign-in's id, as a computer makes it. */
@@ -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";export const AuthServerSchema=e.object({issuer:e.url(),authorization_endpoint:e.url(),token_endpoint:e.url(),device_authorization_endpoint:e.url(),revocation_endpoint:e.url(),code_challenge_methods_supported:e.array(e.string()).refine(t=>t.includes("S256"),{message:"The server must take S256 PKCE challenges."})}),CLIENT_ID="allyhub-cli",ISSUER_PATH="/api/auth",METADATA_PATH=`/.well-known/oauth-authorization-server${ISSUER_PATH}`,SCOPES="openid profile email offline_access",ACCOUNT_PATH="/api/account",ORGANIZATION_HEADER="x-allyhub-organization",DEVICES_PATH="/api/account/devices",DEVICE_HEADER="x-allyhub-device",DEVICE_NAME_HEADER="x-allyhub-device-name",DeviceIdSchema=e.string().regex(/^[\w-]{16,64}$/u),ACCOUNT_EXPORT_PATH="/api/account/export",ACCOUNT_DELETE_PATH="/api/account/delete",DevicesSchema=e.object({devices:e.array(e.object({id:e.string(),client:e.string(),signedInAt:e.iso.datetime(),lastActiveAt:e.iso.datetime(),name:e.string().nullable().optional(),app:e.string().nullable().optional(),os:e.string().nullable().optional(),city:e.string().nullable().optional(),country:e.string().nullable().optional(),current:e.boolean().optional()}))}),BROWSER_LINK_PATH="/api/account/browser-link",BrowserLinkRequestSchema=e.strictObject({to:e.string().startsWith("/")}),BrowserLinkSchema=e.object({url:e.url()}),SIGN_IN_PATH="/api/sign-in",SignInSchema=e.object({turnstile:e.object({siteKey:e.string().min(1)}).optional()}),CAPTCHA_HEADER="x-captcha-response",SIGN_IN_LINK_PATH=`${ISSUER_PATH}/sign-in/link`,SignInLinkRequestSchema=e.strictObject({email:e.email(),authorization:e.url()}),DESKTOP_SCHEME="allyhub",DESKTOP_OPEN=`${DESKTOP_SCHEME}://open`;export function signedInAddress(t,o={}){return`${t}/signed-in${o.desktop===!0?"?from=desktop":""}`}export function signedInFromDesktop(t){return new URLSearchParams(t).get("from")==="desktop"}export const CREDENTIALS_FILE=".allyhub/credentials.json",TokenResponseSchema=e.object({access_token:e.string().min(1),token_type:e.string(),expires_in:e.number().positive(),refresh_token:e.string().min(1).optional(),scope:e.string().optional()}),OAuthErrorSchema=e.object({error:e.string(),error_description:e.string().optional()}),DeviceAuthorizationSchema=e.object({device_code:e.string().min(1),user_code:e.string().min(1),verification_uri:e.url(),verification_uri_complete:e.url().optional(),expires_in:e.number().positive(),interval:e.number().positive().optional()}),AccountSchema=e.object({id:e.string().min(1),email:e.email(),name:e.string().optional(),organization:e.object({id:e.string().min(1),name:e.string()}).optional()}),CredentialsFileSchema=e.object({version:e.literal(1),url:e.url(),issuer:e.url(),account:AccountSchema,refreshToken:e.string().min(1).optional(),access:e.object({token:e.string().min(1),expiresAt:e.iso.datetime({offset:!0})}).optional(),keychain:e.string().min(1).optional(),since:e.iso.datetime({offset:!0}),device:e.string().min(1).optional()});
2
+ import{z as e}from"zod";export const AuthServerSchema=e.object({issuer:e.url(),authorization_endpoint:e.url(),token_endpoint:e.url(),device_authorization_endpoint:e.url(),revocation_endpoint:e.url(),code_challenge_methods_supported:e.array(e.string()).refine(t=>t.includes("S256"),{message:"The server must take S256 PKCE challenges."})}),CLIENT_ID="allyhub-cli",ISSUER_PATH="/api/auth",METADATA_PATH=`/.well-known/oauth-authorization-server${ISSUER_PATH}`,SCOPES="openid profile email offline_access",ACCOUNT_PATH="/api/account",ORGANIZATION_HEADER="x-allyhub-organization",DEVICES_PATH="/api/account/devices",DEVICE_HEADER="x-allyhub-device",BACKGROUND_HEADER="x-allyhub-background",DEVICE_NAME_HEADER="x-allyhub-device-name",DeviceIdSchema=e.string().regex(/^[\w-]{16,64}$/u),ACCOUNT_EXPORT_PATH="/api/account/export",ACCOUNT_DELETE_PATH="/api/account/delete",DevicesSchema=e.object({devices:e.array(e.object({id:e.string(),client:e.string(),signedInAt:e.iso.datetime(),lastActiveAt:e.iso.datetime(),name:e.string().nullable().optional(),app:e.string().nullable().optional(),os:e.string().nullable().optional(),city:e.string().nullable().optional(),country:e.string().nullable().optional(),current:e.boolean().optional()}))}),BROWSER_LINK_PATH="/api/account/browser-link",BrowserLinkRequestSchema=e.strictObject({to:e.string().startsWith("/")}),BrowserLinkSchema=e.object({url:e.url()}),SIGN_IN_PATH="/api/sign-in",SignInSchema=e.object({turnstile:e.object({siteKey:e.string().min(1)}).optional()}),CAPTCHA_HEADER="x-captcha-response",SIGN_IN_LINK_PATH=`${ISSUER_PATH}/sign-in/link`,SignInLinkRequestSchema=e.strictObject({email:e.email(),authorization:e.url()}),DESKTOP_SCHEME="allyhub",DESKTOP_OPEN=`${DESKTOP_SCHEME}://open`;export function signedInAddress(t,o={}){return`${t}/signed-in${o.desktop===!0?"?from=desktop":""}`}export function signedInFromDesktop(t){return new URLSearchParams(t).get("from")==="desktop"}export const CREDENTIALS_FILE=".allyhub/credentials.json",TokenResponseSchema=e.object({access_token:e.string().min(1),token_type:e.string(),expires_in:e.number().positive(),refresh_token:e.string().min(1).optional(),scope:e.string().optional()}),OAuthErrorSchema=e.object({error:e.string(),error_description:e.string().optional()}),DeviceAuthorizationSchema=e.object({device_code:e.string().min(1),user_code:e.string().min(1),verification_uri:e.url(),verification_uri_complete:e.url().optional(),expires_in:e.number().positive(),interval:e.number().positive().optional()}),AccountSchema=e.object({id:e.string().min(1),email:e.email(),name:e.string().optional(),organization:e.object({id:e.string().min(1),name:e.string()}).optional()}),CredentialsFileSchema=e.object({version:e.literal(1),url:e.url(),issuer:e.url(),account:AccountSchema,refreshToken:e.string().min(1).optional(),access:e.object({token:e.string().min(1),expiresAt:e.iso.datetime({offset:!0})}).optional(),keychain:e.string().min(1).optional(),since:e.iso.datetime({offset:!0}),device:e.string().min(1).optional()});
@@ -12,6 +12,7 @@ export declare const TreeFileSchema: z.ZodObject<{
12
12
  sha256: z.ZodString;
13
13
  size: z.ZodInt;
14
14
  type: z.ZodString;
15
+ immutable: z.ZodOptional<z.ZodLiteral<true>>;
15
16
  }, z.core.$strip>;
16
17
  export type TreeFile = z.infer<typeof TreeFileSchema>;
17
18
  /** How many blobs are asked about at once. */
@@ -32,4 +33,12 @@ export declare const BlobsResponseSchema: z.ZodObject<{
32
33
  }, z.core.$strip>>;
33
34
  }, z.core.$strip>;
34
35
  export type BlobsResponse = z.infer<typeof BlobsResponseSchema>;
36
+ /** A tree's file: its blob, the type it is served as, and whether its name changes with its bytes. */
37
+ export declare const treeFileOf: (blob: {
38
+ sha256: string;
39
+ size: number;
40
+ }, recorded: {
41
+ type: string;
42
+ immutable?: true | undefined;
43
+ }) => TreeFile;
35
44
  //# sourceMappingURL=blobs.d.ts.map
@@ -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{FILE_MAX_BYTES as o}from"./cloud.js";export const Sha256Schema=e.string().regex(/^[0-9a-f]{64}$/u),TreePathSchema=e.string().min(1).max(1024).refine(t=>!t.startsWith("/")&&!t.includes("\\")&&t.split("/").every(r=>r!==""&&r!=="."&&r!==".."),"a relative path of forward slashes, without . or .."),BlobSchema=e.object({sha256:Sha256Schema,size:e.int().nonnegative().max(o)}),TreeFileSchema=BlobSchema.extend({type:e.string().min(1).max(255)}),BLOBS_MAX=1e3,BlobsRequestSchema=e.strictObject({blobs:e.array(BlobSchema.extend({contentType:e.string().min(1).max(255)})).min(1).max(BLOBS_MAX)}),BlobsResponseSchema=e.object({uploads:e.array(e.object({sha256:Sha256Schema,url:e.url(),headers:e.record(e.string(),e.string())}))});
2
+ import{z as e}from"zod";import{FILE_MAX_BYTES as a}from"./cloud.js";export const Sha256Schema=e.string().regex(/^[0-9a-f]{64}$/u),TreePathSchema=e.string().min(1).max(1024).refine(t=>!t.startsWith("/")&&!t.includes("\\")&&t.split("/").every(r=>r!==""&&r!=="."&&r!==".."),"a relative path of forward slashes, without . or .."),BlobSchema=e.object({sha256:Sha256Schema,size:e.int().nonnegative().max(a)}),TreeFileSchema=BlobSchema.extend({type:e.string().min(1).max(255),immutable:e.literal(!0).optional()}),BLOBS_MAX=1e3,BlobsRequestSchema=e.strictObject({blobs:e.array(BlobSchema.extend({contentType:e.string().min(1).max(255)})).min(1).max(BLOBS_MAX)}),BlobsResponseSchema=e.object({uploads:e.array(e.object({sha256:Sha256Schema,url:e.url(),headers:e.record(e.string(),e.string())}))}),treeFileOf=(t,r)=>({sha256:t.sha256,size:t.size,type:r.type,...r.immutable===!0?{immutable:!0}:{}});
@@ -17,6 +17,8 @@ export declare const EXIT: {
17
17
  readonly interrupted: 130;
18
18
  };
19
19
  export type ExitCode = (typeof EXIT)[keyof typeof EXIT];
20
+ /** The code a command that ran and found problems (a check, an item that failed with no code of its own) is told with: apart from one that failed. */
21
+ export declare const PROBLEMS_FOUND = "problems-found";
20
22
  /** A failure as --json prints it, on stdout, with the exit code. */
21
23
  export declare const CliErrorSchema: z.ZodObject<{
22
24
  error: z.ZodObject<{
@@ -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";export const EXIT={ok:0,failed:1,usage:2,conflict:3,auth:4,platform:5,notFound:6,interrupted:130},CliErrorSchema=e.strictObject({error:e.strictObject({code:e.string().regex(/^[a-z][a-z0-9-]*$/u),message:e.string().min(1),hint:e.string().optional()})}),COMMAND_NAME=/^[a-z0-9][a-z0-9-]*(?: [a-z0-9][a-z0-9-]*)*$/u;export function command(t){if(!COMMAND_NAME.test(t.name))throw new Error(`"${t.name}" is not a command name.`);const r=Object.keys(t.input.shape);for(const n of t.positional??[])if(!r.includes(n))throw new Error(`${t.name}: positional "${n}" is not a field of its input.`);for(const[n,o]of Object.entries(t.input.shape))if(!o.description)throw new Error(`${t.name}: "${n}" has no description.`);return t}export function describeCommand(t){return{name:t.name,summary:t.summary,positional:[...t.positional??[]],input:e.toJSONSchema(t.input,{io:"input",unrepresentable:"any"}),output:e.toJSONSchema(t.output,{io:"output",unrepresentable:"any"}),examples:[...t.examples??[]]}}export class CommandError extends Error{code;hint;exit;constructor(r,n,o={}){super(n,o.cause===void 0?void 0:{cause:o.cause}),this.name="CommandError",this.code=r,this.hint=o.hint,this.exit=o.exit??EXIT.failed}}
2
+ import{z as e}from"zod";export const EXIT={ok:0,failed:1,usage:2,conflict:3,auth:4,platform:5,notFound:6,interrupted:130},PROBLEMS_FOUND="problems-found",CliErrorSchema=e.strictObject({error:e.strictObject({code:e.string().regex(/^[a-z][a-z0-9-]*$/u),message:e.string().min(1),hint:e.string().optional()})}),COMMAND_NAME=/^[a-z0-9][a-z0-9-]*(?: [a-z0-9][a-z0-9-]*)*$/u;export function command(t){if(!COMMAND_NAME.test(t.name))throw new Error(`"${t.name}" is not a command name.`);const r=Object.keys(t.input.shape);for(const n of t.positional??[])if(!r.includes(n))throw new Error(`${t.name}: positional "${n}" is not a field of its input.`);for(const[n,o]of Object.entries(t.input.shape))if(!o.description)throw new Error(`${t.name}: "${n}" has no description.`);return t}export function describeCommand(t){return{name:t.name,summary:t.summary,positional:[...t.positional??[]],input:e.toJSONSchema(t.input,{io:"input",unrepresentable:"any"}),output:e.toJSONSchema(t.output,{io:"output",unrepresentable:"any"}),examples:[...t.examples??[]]}}export class CommandError extends Error{code;hint;exit;constructor(r,n,o={}){super(n,o.cause===void 0?void 0:{cause:o.cause}),this.name="CommandError",this.code=r,this.hint=o.hint,this.exit=o.exit??EXIT.failed}}
@@ -0,0 +1,77 @@
1
+ import { z } from "zod";
2
+ export declare const CLOUD_COMPUTER_PATH = "/api/cloud-computer";
3
+ /** Made or resumed, at the cost of the person's organization. */
4
+ export declare const CLOUD_COMPUTER_RESUME_PATH = "/api/cloud-computer/resume";
5
+ /** Paused, if no work runs on it. */
6
+ export declare const CLOUD_COMPUTER_PAUSE_PATH = "/api/cloud-computer/pause";
7
+ /** Where it is reached, and a pass. */
8
+ export declare const CLOUD_COMPUTER_PASS_PATH = "/api/cloud-computer/pass";
9
+ /** How long it may stand idle. */
10
+ export declare const CLOUD_COMPUTER_IDLE_PATH = "/api/cloud-computer/idle";
11
+ /**
12
+ * What a released window asks when its person presses Restart to update,
13
+ * which a window of now never shows: answered, and nothing is done (the
14
+ * services only add, so the route stays for such a window).
15
+ */
16
+ export declare const CLOUD_COMPUTER_UPDATE_PATH = "/api/cloud-computer/update";
17
+ /** What a cloud computer is. `none`: there is none. The three others are a change of it under way. */
18
+ export declare const CLOUD_COMPUTER_STATES: readonly ["none", "running", "paused", "resuming", "pausing", "upgrading"];
19
+ /** A person's cloud computer, as last written down, what an hour of it costs in credits, and how long it may stand idle. */
20
+ export declare const CloudComputerInfoSchema: z.ZodObject<{
21
+ computer: z.ZodObject<{
22
+ state: z.ZodUnion<readonly [z.ZodEnum<{
23
+ paused: "paused";
24
+ running: "running";
25
+ none: "none";
26
+ resuming: "resuming";
27
+ pausing: "pausing";
28
+ upgrading: "upgrading";
29
+ }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
30
+ confirmedAtMs: z.ZodOptional<z.ZodNumber>;
31
+ studioServerVersion: z.ZodOptional<z.ZodString>;
32
+ ranSinceMs: z.ZodOptional<z.ZodNumber>;
33
+ }, z.core.$strip>;
34
+ creditsPerHour: z.ZodNumber;
35
+ idle: z.ZodObject<{
36
+ minutes: z.ZodNumber;
37
+ chosen: z.ZodNullable<z.ZodNumber>;
38
+ min: z.ZodNumber;
39
+ max: z.ZodNumber;
40
+ }, z.core.$strip>;
41
+ update: z.ZodOptional<z.ZodObject<{
42
+ version: z.ZodString;
43
+ required: z.ZodOptional<z.ZodBoolean>;
44
+ }, z.core.$strip>>;
45
+ }, z.core.$strip>;
46
+ export type CloudComputerInfo = z.infer<typeof CloudComputerInfoSchema>;
47
+ /** What a window says as it asks for the computer to be made or resumed. What the services receive is strict. */
48
+ export declare const CloudComputerResumeSchema: z.ZodObject<{
49
+ timeZone: z.ZodOptional<z.ZodString>;
50
+ }, z.core.$strict>;
51
+ export type CloudComputerResume = z.infer<typeof CloudComputerResumeSchema>;
52
+ /** How a released window's asking to update it now is answered: never updated now, with why. */
53
+ export declare const CloudComputerUpdatedSchema: z.ZodObject<{
54
+ updated: z.ZodBoolean;
55
+ version: z.ZodOptional<z.ZodString>;
56
+ because: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strip>;
58
+ export type CloudComputerUpdated = z.infer<typeof CloudComputerUpdatedSchema>;
59
+ /** Where a window reaches its person's cloud computer, and what lets it in: a Studio client's address. */
60
+ export declare const CloudComputerPassSchema: z.ZodObject<{
61
+ url: z.ZodString;
62
+ token: z.ZodString;
63
+ expiresAtMs: z.ZodNumber;
64
+ }, z.core.$strip>;
65
+ export type CloudComputerPass = z.infer<typeof CloudComputerPassSchema>;
66
+ /** How an asking to pause was answered: it is paused, or it is not, since work runs on it or its Studio server did not say. */
67
+ export declare const CloudComputerPausedSchema: z.ZodObject<{
68
+ paused: z.ZodBoolean;
69
+ because: z.ZodOptional<z.ZodString>;
70
+ }, z.core.$strip>;
71
+ export type CloudComputerPaused = z.infer<typeof CloudComputerPausedSchema>;
72
+ /** A person's own idle time, minutes; null: the default again. What the services receive is strict. */
73
+ export declare const CloudComputerIdleSchema: z.ZodObject<{
74
+ minutes: z.ZodNullable<z.ZodNumber>;
75
+ }, z.core.$strict>;
76
+ export type CloudComputerIdle = z.infer<typeof CloudComputerIdleSchema>;
77
+ //# sourceMappingURL=cloud-computer.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{z as o}from"zod";import{openEnum as e}from"./open.js";export const CLOUD_COMPUTER_PATH="/api/cloud-computer",CLOUD_COMPUTER_RESUME_PATH="/api/cloud-computer/resume",CLOUD_COMPUTER_PAUSE_PATH="/api/cloud-computer/pause",CLOUD_COMPUTER_PASS_PATH="/api/cloud-computer/pass",CLOUD_COMPUTER_IDLE_PATH="/api/cloud-computer/idle",CLOUD_COMPUTER_UPDATE_PATH="/api/cloud-computer/update",CLOUD_COMPUTER_STATES=["none","running","paused","resuming","pausing","upgrading"],CloudComputerInfoSchema=o.object({computer:o.object({state:e(CLOUD_COMPUTER_STATES),confirmedAtMs:o.number().optional(),studioServerVersion:o.string().optional(),ranSinceMs:o.number().optional()}),creditsPerHour:o.number(),idle:o.object({minutes:o.number(),chosen:o.number().nullable(),min:o.number(),max:o.number()}),update:o.object({version:o.string(),required:o.boolean().optional()}).optional()}),CloudComputerResumeSchema=o.strictObject({timeZone:o.string().min(1).max(64).optional()}),CloudComputerUpdatedSchema=o.object({updated:o.boolean(),version:o.string().optional(),because:o.string().optional()}),CloudComputerPassSchema=o.object({url:o.string(),token:o.string(),expiresAtMs:o.number()}),CloudComputerPausedSchema=o.object({paused:o.boolean(),because:o.string().optional()}),CloudComputerIdleSchema=o.strictObject({minutes:o.number().int().nullable()});