@allyhub/sdk 0.2.0 → 0.3.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 (27) hide show
  1. package/docs/layers.md +1 -1
  2. package/docs/modeling.md +6 -6
  3. package/docs/project.md +2 -1
  4. package/docs/scenery.md +1 -1
  5. package/node_modules/@allyhub-next/audio/package.json +1 -1
  6. package/node_modules/@allyhub-next/formats/dist/items.d.ts +5 -0
  7. package/node_modules/@allyhub-next/formats/dist/items.js +1 -1
  8. package/node_modules/@allyhub-next/formats/dist/layout.d.ts +2 -0
  9. package/node_modules/@allyhub-next/formats/dist/layout.js +1 -1
  10. package/node_modules/@allyhub-next/formats/package.json +1 -1
  11. package/node_modules/@allyhub-next/protocol/dist/app.d.ts +3 -0
  12. package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +17 -0
  13. package/node_modules/@allyhub-next/protocol/dist/auth.js +1 -1
  14. package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +1 -1
  15. package/node_modules/@allyhub-next/protocol/dist/cli.js +1 -1
  16. package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +4 -0
  17. package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +3 -1
  18. package/node_modules/@allyhub-next/protocol/dist/registry.js +1 -1
  19. package/node_modules/@allyhub-next/protocol/dist/routes.js +1 -1
  20. package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +1 -0
  21. package/node_modules/@allyhub-next/protocol/package.json +1 -1
  22. package/node_modules/@allyhub-next/runtimes/package.json +1 -1
  23. package/node_modules/@allyhub-next/scenery/package.json +1 -1
  24. package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +4 -0
  25. package/node_modules/@allyhub-next/video-core/dist/problem.js +1 -1
  26. package/node_modules/@allyhub-next/video-core/package.json +1 -1
  27. package/package.json +7 -7
package/docs/layers.md CHANGED
@@ -306,7 +306,7 @@ export const cursor = custom({
306
306
 
307
307
  ## Starter components
308
308
 
309
- The SDK has no components of its own. `allyhub add <name>` (`caption-line` or `captionLine`) copies a starter component's source into the project's `components/`, where it is the project's code; `allyhub add` alone lists them. Each documents its props in its source, every value a prop with a default (its `*_DEFAULTS` constant where it has one): read it after adding. Import it by a relative path. Only mechanisms are provided, never a layout: a title, a list or an end card is the piece's own `custom()` or component.
309
+ The SDK has no components of its own. `allyhub add component/<name>` (`component/caption-line`) copies a starter component's source into the project's `components/`, where it is the project's code; `allyhub add` alone lists them. Each documents its props in its source, every value a prop with a default (its `*_DEFAULTS` constant where it has one): read it after adding. Import it by a relative path. Only mechanisms are provided, never a layout: a title, a list or an end card is the piece's own `custom()` or component.
310
310
 
311
311
  | Component | What it does |
312
312
  | --- | --- |
package/docs/modeling.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Modeling props
2
2
 
3
- A prop no library has is modelled in code with `@allyhub-next/model`: a subset of Blender 4.5's data API (`bpy.data`, `bmesh`, modifiers, materials, curves, UVs) in TypeScript, evaluated without Blender, the same in `allyhub model` and in a scenery's page. This file covers a model module, how it is built and measured, and how a scenery shows it. What the subset holds, every option and each deliberate difference from Blender, is `allyhub model capabilities` (JSON; also `capabilities` from `@allyhub-next/model`): a call outside it fails and names what is missing.
3
+ A prop no library has is modelled in code with `@allyhub-next/model`: a subset of Blender 4.5's data API (`bpy.data`, `bmesh`, modifiers, materials, curves, UVs) in TypeScript, evaluated without Blender, the same in `allyhub 3d-model` and in a scenery's page. This file covers a model module, how it is built and measured, and how a scenery shows it. What the subset holds, every option and each deliberate difference from Blender, is `allyhub 3d-model capabilities` (JSON; also `capabilities` from `@allyhub-next/model`): a call outside it fails and names what is missing.
4
4
 
5
5
  ## A model module
6
6
 
7
- A model module's default export is `defineModel(build)`. It is code, not an item: keep it in the folder of the scenery that uses it, or in `components/` when several do. `@allyhub-next/model` is lent by the CLI, with no `package.json` entry.
7
+ A model module's default export is `defineModel(build)`. A model made to be used again is an item of its own: a folder with a `model.ts` (`models/desk/model.ts`), made once and put in any scenery that imports it, each with its own parameters (a size, a finish). It opens alone in the scenery's viewer (`allyhub dev`, Studio), `allyhub check` builds it (one that does not build is AK-B010), and `allyhub render` writes its GLB (`<out>/<folder>/<folder>.glb`). AllyHub's registry has products as model pieces to start from (`allyhub add 3d-model/monitor` adds `models/monitor/model.ts` and the kit it is built with; `allyhub add search --type 3d-model` lists them). A part only one scenery uses may stay a module beside it (`room/stick.ts`), named anything but `model.ts`: a folder holds one entry file. `@allyhub-next/model` is lent by the CLI, with no `package.json` entry.
8
8
 
9
9
  ```ts file=room/stick.ts
10
10
  import { defineModel } from "@allyhub-next/model";
@@ -99,15 +99,15 @@ The surface's detail is about one `cell`.
99
99
 
100
100
  ## Build and measure
101
101
 
102
- - `allyhub model <file> --inspect` evaluates it without writing anything: each object's parent, matrix, bounds after its modifiers (Blender's Z-up metres), triangles, materials as glTF reads them, UV layers, a curve's splines, and the objects left with no triangles.
103
- - `allyhub model <file>` writes a GLB (Y up), by default `.allyhub/out/<module>.glb` (the folder's name for a `model.ts`); `--out` names another (`assets/media/models/<name>.glb` to load it as media). A failed build leaves the last GLB in place.
102
+ - `allyhub 3d-model <file> --inspect` evaluates it without writing anything: each object's parent, matrix, bounds after its modifiers (Blender's Z-up metres), triangles, materials as glTF reads them, UV layers, a curve's splines, and the objects left with no triangles.
103
+ - `allyhub 3d-model <file>` writes a GLB (Y up), by default `.allyhub/out/<module>.glb` (the folder's name for a `model.ts`); `--out` names another (`assets/media/models/<name>.glb` to load it as media). A failed build leaves the last GLB in place.
104
104
  - A build is kept in `.allyhub/cache/model/` while the module, the files it read, its folder's files, its parameters and seed are unchanged; `--fresh` builds anew.
105
105
  - The program is trusted project code, run in a child process; its logs go to stderr. An error names the call and the place in the project's files it failed at.
106
106
  - A subdivision surface lies inside its cage: measure the surface (`--inspect`), not the cage.
107
107
 
108
108
  ## In a scenery
109
109
 
110
- `modelObject(w, model, parameters?, options?)` from `@allyhub-next/model/three` builds the model in the scenery's page, drawn as its GLB is, its images read through `w.texture`. It returns a `Group` not yet in the scene, whose own rotation turns Z up to Y up: place and turn it inside a group of the scenery's own. A model built once into a GLB loads as any model instead (`import`, `w.load`), and stays as built until built again.
110
+ `modelObject(w, model, parameters?, options?)` from `@allyhub-next/model/three` builds the model in the scenery's page (a model item is imported by its path, `import desk from "../../models/desk/model.ts"`, as any module), drawn as its GLB is, its images read through `w.texture`. It returns a `Group` not yet in the scene, whose own rotation turns Z up to Y up: place and turn it inside a group of the scenery's own. A model built once into a GLB loads as any model instead (`import`, `w.load`), and stays as built until built again.
111
111
 
112
112
  ```ts file=room/scenery.ts
113
113
  import { Group, Mesh, MeshPhysicalMaterial } from "three";
@@ -139,5 +139,5 @@ export default defineScenery({
139
139
  ```
140
140
 
141
141
  - **Materials** are glTF's metallic-roughness: the Principled BSDF's base colour, metallic, roughness, alpha, normal and emission, from values or images; anything else fails with `unsupported_material`, naming the node and socket. Each three.js material keeps its Blender material's name, so a scenery replaces one by name to draw what glTF cannot say (sheen, clearcoat, transmission).
142
- - **Images**: `bpy.data.images.load(path)` takes a PNG or JPEG. A path that starts with `./` or `../` is from the module that draws the model (the scenery's module in a scenery, the model's own for `allyhub model`); any other is from the project's root.
142
+ - **Images**: `bpy.data.images.load(path)` takes a PNG or JPEG. A path that starts with `./` or `../` is from the module that draws the model (the scenery's module in a scenery, the model's own for `allyhub 3d-model`); any other is from the project's root.
143
143
  - A model used as a scenery prop for one video only is a `SceneryProp` whose `build` calls `modelObject` ([scenery.md](scenery.md#the-scenery-layer)).
package/docs/project.md CHANGED
@@ -67,11 +67,12 @@ An item is a folder with its entry file. The entry file's name says what the ite
67
67
  | `video.ts` | A video | `export default video({ … })` ([video.md](video.md)) |
68
68
  | `slides.ts` | A deck | `export default slides({ … })` ([slides.md](slides.md)) |
69
69
  | `scenery.ts` | A 3D scenery | `export default defineScenery({ … })` ([scenery.md](scenery.md)) |
70
+ | `model.ts` | A 3D model | `export default defineModel(build)` ([modeling.md](modeling.md)) |
70
71
  | `doc.mdx` | A doc | The doc itself, MDX |
71
72
  | `sheet.csv` | A sheet | Its rows; `sheet.yaml` beside it says what its columns are |
72
73
  | `astro.config.*` | A website | An Astro project |
73
74
 
74
- `video`, `slides` and `scenery` may end in `.ts`, `.tsx`, `.mts`, `.js`, `.jsx` or `.mjs`.
75
+ `video`, `slides`, `scenery` and `model` may end in `.ts`, `.tsx`, `.mts`, `.js`, `.jsx` or `.mjs`.
75
76
 
76
77
  - Everything in an item's folder is the item's own: its script, its media, its edits files. Folders above it only group items.
77
78
  - An item may be anywhere but the project's root, a dot folder and `node_modules`. An item cannot hold another, and a folder cannot have two entry files (AK-M003). A `video(…)` exported from anything but an item's entry file is AK-M002.
package/docs/scenery.md CHANGED
@@ -9,7 +9,7 @@ An item is a folder with a `scenery.ts` (or tsx, mts, js, jsx, mjs). A person lo
9
9
  - A video imports a scenery item by its path, as any module: `import room from "../room/scenery.ts"`.
10
10
  - A path a scenery reads that starts with `./` or `../` (`w.texture("./wood.jpg")`, `w.load("./desk.glb")`, a model's image) is from the scenery's own module; any other is from the project's root. An import (`import desk from "./desk.glb"`) is the same. Kept in its folder and named from there, a scenery works wherever the folder goes.
11
11
  - `three` (r186, 0.186.1), `three/addons/…`, `three/webgpu` and `three/tsl` are imported by name with no `package.json`: the CLI lends them, unless the project declares its own `three`. So are `@allyhub-next/scenery-host/layer` (everything in this file) and `@allyhub-next/model` ([modeling.md](modeling.md)). Their types come with the project's `allyhub` once `allyhub/client` is in tsconfig.json's `types`, beside `@allyhub/sdk/client`; three.js's are `@types/three`, which the project installs at the version lent (`npm install -D @types/three@0.186.0`).
12
- - glTF and GLB load (`.glb`, `.gltf`, `.bin`, `.ktx2`), environments are `.hdr` or `.exr`; all are media imports. CC0 models, HDRIs and textures: `allyhub add search`, `allyhub add`.
12
+ - glTF and GLB load (`.glb`, `.gltf`, `.bin`, `.ktx2`), environments are `.hdr` or `.exr`; all are media imports. CC0 models, HDRIs and textures: `allyhub add search --type @polyhaven`, `allyhub add @polyhaven/<id>`. AllyHub's own 3D models and sceneries: `allyhub add search --type 3d-model` (or `scenery`), `allyhub add 3d-model/<name>`.
13
13
 
14
14
  **Units and axes.** Right-handed, **Y up**, **metres**, angles in **degrees** everywhere in AllyHub's API (three.js itself takes radians). A camera looks down its own −Z. A glTF model's front is its +Z. Positions and sizes AllyHub prints are world space. three.js's lights are physical: point and spot lights in candela, directional lights in lux, an emissive surface in nits.
15
15
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/audio",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -29,6 +29,11 @@ export declare const ITEM_KINDS: {
29
29
  readonly editor: "scenery";
30
30
  readonly name: "3D scenery";
31
31
  };
32
+ readonly model: {
33
+ readonly entries: readonly string[];
34
+ readonly editor: "scenery";
35
+ readonly name: "3D model";
36
+ };
32
37
  readonly website: {
33
38
  readonly entries: readonly ["astro.config.mjs", "astro.config.ts", "astro.config.mts", "astro.config.js"];
34
39
  readonly editor: "website";
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{baseOf as p,dirOf as u,unscanned as l,within as m}from"./layout.js";export const CODE_EXTENSIONS=["ts","tsx","mts","js","jsx","mjs"];const a=e=>CODE_EXTENSIONS.map(n=>`${e}.${n}`);export const EDITORS=["video","slides","doc","sheet","scenery","website"],ITEM_KINDS={video:{entries:a("video"),editor:"video",name:"video"},slides:{entries:a("slides"),editor:"slides",name:"slides"},doc:{entries:["doc.mdx"],editor:"doc",name:"doc"},sheet:{entries:["sheet.csv"],editor:"sheet",name:"sheet"},scenery:{entries:a("scenery"),editor:"scenery",name:"3D scenery"},website:{entries:["astro.config.mjs","astro.config.ts","astro.config.mts","astro.config.js"],editor:"website",name:"website"}},KINDS=Object.keys(ITEM_KINDS);const h=new Map(KINDS.flatMap(e=>ITEM_KINDS[e].entries.map(n=>[n,e])));export function entryKind(e){return h.get(p(e))}export function scanItems(e){const n=[...e].filter(t=>!l(t)).sort(),o=[],i=new Map;for(const t of n){if(entryKind(t)===void 0)continue;const s=u(t);if(s===""){o.push({code:"at-root",entry:t});continue}i.set(s,[...i.get(s)??[],t])}const d=[];for(const[t,s]of i){const[r]=s;if(s.length>1||r===void 0){o.push({code:"two-entries",dir:t,entries:s});continue}const f=entryKind(r);f&&d.push({kind:f,dir:t,entry:r})}d.sort((t,s)=>t.dir.localeCompare(s.dir));const c=[];for(const t of d){const s=c.find(r=>m(t.dir,r.dir));s?o.push({code:"nested",dir:t.dir,inside:s.dir}):c.push(t)}return{items:c,problems:o}}export function itemFor(e,n){let o;for(const i of n)m(e,i.dir)&&(!o||i.dir.length>o.dir.length)&&(o=i);return o}export function itemManifest(){return{version:1,kinds:KINDS.map(e=>({kind:e,name:ITEM_KINDS[e].name,editor:ITEM_KINDS[e].editor,patterns:ITEM_KINDS[e].entries.map(n=>`**/${n}`)})),ignore:["**/.*/**","**/node_modules/**"]}}
2
+ import{baseOf as p,dirOf as l,unscanned as u,within as f}from"./layout.js";export const CODE_EXTENSIONS=["ts","tsx","mts","js","jsx","mjs"];const d=e=>CODE_EXTENSIONS.map(n=>`${e}.${n}`);export const EDITORS=["video","slides","doc","sheet","scenery","website"],ITEM_KINDS={video:{entries:d("video"),editor:"video",name:"video"},slides:{entries:d("slides"),editor:"slides",name:"slides"},doc:{entries:["doc.mdx"],editor:"doc",name:"doc"},sheet:{entries:["sheet.csv"],editor:"sheet",name:"sheet"},scenery:{entries:d("scenery"),editor:"scenery",name:"3D scenery"},model:{entries:d("model"),editor:"scenery",name:"3D model"},website:{entries:["astro.config.mjs","astro.config.ts","astro.config.mts","astro.config.js"],editor:"website",name:"website"}},KINDS=Object.keys(ITEM_KINDS);const h=new Map(KINDS.flatMap(e=>ITEM_KINDS[e].entries.map(n=>[n,e])));export function entryKind(e){return h.get(p(e))}export function scanItems(e){const n=[...e].filter(t=>!u(t)).sort(),o=[],i=new Map;for(const t of n){if(entryKind(t)===void 0)continue;const s=l(t);if(s===""){o.push({code:"at-root",entry:t});continue}i.set(s,[...i.get(s)??[],t])}const c=[];for(const[t,s]of i){const[r]=s;if(s.length>1||r===void 0){o.push({code:"two-entries",dir:t,entries:s});continue}const m=entryKind(r);m&&c.push({kind:m,dir:t,entry:r})}c.sort((t,s)=>t.dir.localeCompare(s.dir));const a=[];for(const t of c){const s=a.find(r=>f(t.dir,r.dir));s?o.push({code:"nested",dir:t.dir,inside:s.dir}):a.push(t)}return{items:a,problems:o}}export function itemFor(e,n){let o;for(const i of n)f(e,i.dir)&&(!o||i.dir.length>o.dir.length)&&(o=i);return o}export function itemManifest(){return{version:1,kinds:KINDS.map(e=>({kind:e,name:ITEM_KINDS[e].name,editor:ITEM_KINDS[e].editor,patterns:ITEM_KINDS[e].entries.map(n=>`**/${n}`)})),ignore:["**/.*/**","**/node_modules/**"]}}
@@ -18,6 +18,8 @@ export declare const LOCAL_DIR = ".allyhub";
18
18
  export declare const WORK_DIR = ".allyhub/work";
19
19
  /** Reference videos measured (allyhub reference), a folder each. */
20
20
  export declare const REFERENCE_DIR = ".allyhub/work/reference";
21
+ /** A running `allyhub dev`'s note: its page's address and its process, so another run opens that page. */
22
+ export declare const DEV_FILE = ".allyhub/dev.json";
21
23
  /** Renders and exports. */
22
24
  export declare const OUT_DIR = ".allyhub/out";
23
25
  /** What the tools rebuild. */
@@ -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",OUT_DIR=".allyhub/out",CACHE_DIR=".allyhub/cache",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",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/
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-next/formats",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -36,6 +36,7 @@ export declare const CardItemSchema: z.ZodObject<{
36
36
  doc: "doc";
37
37
  sheet: "sheet";
38
38
  scenery: "scenery";
39
+ model: "model";
39
40
  website: "website";
40
41
  }>;
41
42
  dir: z.ZodString;
@@ -56,6 +57,7 @@ export declare const CardSchema: z.ZodObject<{
56
57
  doc: "doc";
57
58
  sheet: "sheet";
58
59
  scenery: "scenery";
60
+ model: "model";
59
61
  website: "website";
60
62
  }>;
61
63
  dir: z.ZodString;
@@ -87,6 +89,7 @@ export declare const CardSchema: z.ZodObject<{
87
89
  doc: "doc";
88
90
  sheet: "sheet";
89
91
  scenery: "scenery";
92
+ model: "model";
90
93
  website: "website";
91
94
  }>;
92
95
  dir: z.ZodString;
@@ -25,6 +25,10 @@ export declare const ORGANIZATION_HEADER = "x-allyhub-organization";
25
25
  export declare const DEVICES_PAGE_PATH = "/devices";
26
26
  /** `GET`: the computers signed in as the person (a session's alone); `DELETE <path>/<id>` signs one out. */
27
27
  export declare const DEVICES_PATH = "/api/account/devices";
28
+ /** `GET`, from the account site: everything kept about the person, as a file. */
29
+ export declare const ACCOUNT_EXPORT_PATH = "/api/account/export";
30
+ /** `POST`, from the account site: mails the link that deletes the account, unless something stands in the way. */
31
+ export declare const ACCOUNT_DELETE_PATH = "/api/account/delete";
28
32
  export declare const DevicesSchema: z.ZodObject<{
29
33
  devices: z.ZodArray<z.ZodObject<{
30
34
  id: z.ZodString;
@@ -34,6 +38,19 @@ export declare const DevicesSchema: z.ZodObject<{
34
38
  }, z.core.$strip>>;
35
39
  }, z.core.$strip>;
36
40
  export type Devices = z.infer<typeof DevicesSchema>;
41
+ /**
42
+ * `POST { to }` with a computer's sign-in (the CLI's client): a link,
43
+ * `{ url }`, that signs a browser in as the person once, within three
44
+ * minutes, then opens `to`, a page of the account site (`/plan?view=…`).
45
+ */
46
+ export declare const BROWSER_LINK_PATH = "/api/account/browser-link";
47
+ export declare const BrowserLinkRequestSchema: z.ZodObject<{
48
+ to: z.ZodString;
49
+ }, z.core.$strict>;
50
+ export declare const BrowserLinkSchema: z.ZodObject<{
51
+ url: z.ZodURL;
52
+ }, z.core.$strip>;
53
+ export type BrowserLink = z.infer<typeof BrowserLinkSchema>;
37
54
  /** The credentials file, relative to the home folder (ALLYHUB_HOME moves it). */
38
55
  export declare const CREDENTIALS_FILE = ".allyhub/credentials.json";
39
56
  /** A token endpoint's answer (RFC 6749 5.1). */
@@ -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_PAGE_PATH="/devices",DEVICES_PATH="/api/account/devices",DevicesSchema=e.object({devices:e.array(e.object({id:e.string(),client:e.string(),signedInAt:e.iso.datetime(),lastActiveAt:e.iso.datetime()}))}),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.strictObject({id:e.string().min(1),email:e.email(),name:e.string().optional(),organization:e.strictObject({id:e.string().min(1),name:e.string()}).optional()}),CredentialsFileSchema=e.strictObject({version:e.literal(1),url:e.url(),issuer:e.url(),account:AccountSchema,refreshToken:e.string().min(1),access:e.strictObject({token:e.string().min(1),expiresAt:e.iso.datetime({offset:!0})}).optional(),since:e.iso.datetime({offset:!0})}),TokenOutputSchema=e.strictObject({accessToken:e.string().min(1),expiresAt:e.iso.datetime({offset:!0}),account:AccountSchema}),bearer=t=>`Bearer ${t.accessToken}`;
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_PAGE_PATH="/devices",DEVICES_PATH="/api/account/devices",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()}))}),BROWSER_LINK_PATH="/api/account/browser-link",BrowserLinkRequestSchema=e.strictObject({to:e.string().startsWith("/")}),BrowserLinkSchema=e.object({url:e.url()}),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.strictObject({id:e.string().min(1),email:e.email(),name:e.string().optional(),organization:e.strictObject({id:e.string().min(1),name:e.string()}).optional()}),CredentialsFileSchema=e.strictObject({version:e.literal(1),url:e.url(),issuer:e.url(),account:AccountSchema,refreshToken:e.string().min(1),access:e.strictObject({token:e.string().min(1),expiresAt:e.iso.datetime({offset:!0})}).optional(),since:e.iso.datetime({offset:!0})}),TokenOutputSchema=e.strictObject({accessToken:e.string().min(1),expiresAt:e.iso.datetime({offset:!0}),account:AccountSchema}),bearer=t=>`Bearer ${t.accessToken}`;
@@ -26,7 +26,7 @@ export declare const CliErrorSchema: z.ZodObject<{
26
26
  }, z.core.$strict>;
27
27
  }, z.core.$strict>;
28
28
  export type CliError = z.infer<typeof CliErrorSchema>;
29
- /** A command's name: words in lowercase, `scenery view`. */
29
+ /** A command's name: words in lowercase, `scenery view`; a word may start with a digit, `3d-model`. */
30
30
  export declare const COMMAND_NAME: RegExp;
31
31
  export interface CommandSpec<I extends z.ZodObject = z.ZodObject, O extends z.ZodType = z.ZodType> {
32
32
  name: string;
@@ -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 o}from"zod";export const EXIT={ok:0,failed:1,usage:2,conflict:3,auth:4,platform:5,notFound:6,interrupted:130},CliErrorSchema=o.strictObject({error:o.strictObject({code:o.string().regex(/^[a-z][a-z0-9-]*$/u),message:o.string().min(1),hint:o.string().optional()})}),COMMAND_NAME=/^[a-z][a-z0-9-]*(?: [a-z][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 e=Object.keys(t.input.shape);for(const n of t.positional??[])if(!e.includes(n))throw new Error(`${t.name}: positional "${n}" is not a field of its input.`);for(const[n,r]of Object.entries(t.input.shape))if(!r.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:o.toJSONSchema(t.input,{io:"input",unrepresentable:"any"}),output:o.toJSONSchema(t.output,{io:"output",unrepresentable:"any"}),examples:[...t.examples??[]]}}export const toolName=t=>`allyhub_${t.replaceAll(/[ -]/gu,"_")}`;
2
+ import{z as o}from"zod";export const EXIT={ok:0,failed:1,usage:2,conflict:3,auth:4,platform:5,notFound:6,interrupted:130},CliErrorSchema=o.strictObject({error:o.strictObject({code:o.string().regex(/^[a-z][a-z0-9-]*$/u),message:o.string().min(1),hint:o.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 e=Object.keys(t.input.shape);for(const n of t.positional??[])if(!e.includes(n))throw new Error(`${t.name}: positional "${n}" is not a field of its input.`);for(const[n,r]of Object.entries(t.input.shape))if(!r.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:o.toJSONSchema(t.input,{io:"input",unrepresentable:"any"}),output:o.toJSONSchema(t.output,{io:"output",unrepresentable:"any"}),examples:[...t.examples??[]]}}export const toolName=t=>`allyhub_${t.replaceAll(/[ -]/gu,"_")}`;
@@ -23,6 +23,7 @@ export declare const HostContextSchema: z.ZodObject<{
23
23
  doc: "doc";
24
24
  sheet: "sheet";
25
25
  scenery: "scenery";
26
+ model: "model";
26
27
  website: "website";
27
28
  }>;
28
29
  dir: z.ZodString;
@@ -70,6 +71,7 @@ export declare const HOST_METHODS: {
70
71
  doc: "doc";
71
72
  sheet: "sheet";
72
73
  scenery: "scenery";
74
+ model: "model";
73
75
  website: "website";
74
76
  }>;
75
77
  dir: z.ZodString;
@@ -232,6 +234,7 @@ export declare const HOST_NOTIFICATIONS: {
232
234
  doc: "doc";
233
235
  sheet: "sheet";
234
236
  scenery: "scenery";
237
+ model: "model";
235
238
  website: "website";
236
239
  }>;
237
240
  dir: z.ZodString;
@@ -268,6 +271,7 @@ export declare const EDITOR_HOST_METHODS: {
268
271
  doc: "doc";
269
272
  sheet: "sheet";
270
273
  scenery: "scenery";
274
+ model: "model";
271
275
  website: "website";
272
276
  }>;
273
277
  dir: z.ZodString;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- export declare const REGISTRY_TYPES: readonly ["allyhub:component", "allyhub:template", "allyhub:scenery", "allyhub:model", "allyhub:skill"];
2
+ export declare const REGISTRY_TYPES: readonly ["allyhub:component", "allyhub:template", "allyhub:scenery", "allyhub:model", "allyhub:skill", "allyhub:lib"];
3
3
  export declare const RegistryFileSchema: z.ZodObject<{
4
4
  path: z.ZodString;
5
5
  target: z.ZodString;
@@ -73,6 +73,7 @@ export declare const RegistryItemSchema: z.ZodObject<{
73
73
  "allyhub:scenery": "allyhub:scenery";
74
74
  "allyhub:model": "allyhub:model";
75
75
  "allyhub:skill": "allyhub:skill";
76
+ "allyhub:lib": "allyhub:lib";
76
77
  }>;
77
78
  title: z.ZodString;
78
79
  description: z.ZodString;
@@ -137,6 +138,7 @@ export declare const RegistryIndexSchema: z.ZodObject<{
137
138
  "allyhub:scenery": "allyhub:scenery";
138
139
  "allyhub:model": "allyhub:model";
139
140
  "allyhub:skill": "allyhub:skill";
141
+ "allyhub:lib": "allyhub:lib";
140
142
  }>;
141
143
  name: z.ZodString;
142
144
  title: z.ZodString;
@@ -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 REGISTRY_TYPES=["allyhub:component","allyhub:template","allyhub:scenery","allyhub:model","allyhub:skill"];const e=t.string().regex(/^[a-z0-9][a-z0-9-]*$/u);export const RegistryFileSchema=t.strictObject({path:t.string().min(1),target:t.string().min(1),sha256:t.string().regex(/^[0-9a-f]{64}$/u),content:t.string().optional()}),RegistryAssetSchema=t.strictObject({source:t.literal("polyhaven"),id:t.string().min(1),resolution:t.string().min(1).optional(),maps:t.array(t.string().min(1)).optional()}),RegistryBakeSchema=t.strictObject({scenery:t.string().min(1),digest:t.string().regex(/^[0-9a-f]+$/u),renderer:t.string().min(1),sha256:t.string().regex(/^[0-9a-f]{64}$/u),size:t.number().int().positive(),url:t.url()}),SkillCardWordsSchema=t.strictObject({title:t.string().min(1),description:t.string().min(1),prompt:t.string().min(1).optional()}),SkillCardSchema=t.strictObject({category:t.enum(["video","writing","research"]),order:t.number().int().positive(),cover:t.string().optional(),words:SkillCardWordsSchema,languages:t.record(t.string(),SkillCardWordsSchema.partial()).default({})}),RegistryItemSchema=t.strictObject({$schema:t.string().optional(),name:e,type:t.enum(REGISTRY_TYPES),title:t.string().min(1),description:t.string().min(1),author:t.string().optional(),license:t.string().min(1),dependencies:t.array(t.string()).default([]),registryDependencies:t.array(e).default([]),files:t.array(RegistryFileSchema).min(1),assets:t.array(RegistryAssetSchema).default([]),bakes:t.array(RegistryBakeSchema).default([]),categories:t.array(t.string()).default([]),preview:t.string().optional(),version:t.string().optional(),card:SkillCardSchema.optional()}),RegistryIndexSchema=t.strictObject({$schema:t.string().optional(),name:t.string().min(1),homepage:t.url().optional(),items:t.array(RegistryItemSchema.pick({name:!0,type:!0,title:!0,description:!0,categories:!0,preview:!0,version:!0,card:!0}))});
2
+ import{z as t}from"zod";export const REGISTRY_TYPES=["allyhub:component","allyhub:template","allyhub:scenery","allyhub:model","allyhub:skill","allyhub:lib"];const e=t.string().regex(/^[a-z0-9][a-z0-9-]*$/u);export const RegistryFileSchema=t.strictObject({path:t.string().min(1),target:t.string().min(1),sha256:t.string().regex(/^[0-9a-f]{64}$/u),content:t.string().optional()}),RegistryAssetSchema=t.strictObject({source:t.literal("polyhaven"),id:t.string().min(1),resolution:t.string().min(1).optional(),maps:t.array(t.string().min(1)).optional()}),RegistryBakeSchema=t.strictObject({scenery:t.string().min(1),digest:t.string().regex(/^[0-9a-f]+$/u),renderer:t.string().min(1),sha256:t.string().regex(/^[0-9a-f]{64}$/u),size:t.number().int().positive(),url:t.url()}),SkillCardWordsSchema=t.strictObject({title:t.string().min(1),description:t.string().min(1),prompt:t.string().min(1).optional()}),SkillCardSchema=t.strictObject({category:t.enum(["video","writing","research"]),order:t.number().int().positive(),cover:t.string().optional(),words:SkillCardWordsSchema,languages:t.record(t.string(),SkillCardWordsSchema.partial()).default({})}),RegistryItemSchema=t.strictObject({$schema:t.string().optional(),name:e,type:t.enum(REGISTRY_TYPES),title:t.string().min(1),description:t.string().min(1),author:t.string().optional(),license:t.string().min(1),dependencies:t.array(t.string()).default([]),registryDependencies:t.array(e).default([]),files:t.array(RegistryFileSchema).min(1),assets:t.array(RegistryAssetSchema).default([]),bakes:t.array(RegistryBakeSchema).default([]),categories:t.array(t.string()).default([]),preview:t.string().optional(),version:t.string().optional(),card:SkillCardSchema.optional()}),RegistryIndexSchema=t.strictObject({$schema:t.string().optional(),name:t.string().min(1),homepage:t.url().optional(),items:t.array(RegistryItemSchema.pick({name:!0,type:!0,title:!0,description:!0,categories:!0,preview:!0,version:!0,card:!0}))});
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{ACCOUNT_PATH as A,DEVICES_PATH as o,METADATA_PATH as P}from"./auth.js";import{AUTO_TOP_UP_PATH as e,BILLING_CHECKOUT_PATH as _,BILLING_PLANS_PATH as r,BILLING_PORTAL_PATH as L,BILLING_SUMMARY_PATH as O,BILLING_USAGE_PATH as G,CATALOG_PATH as S,FILES_PATH as T,LLM_MESSAGES_PATH as I,LLM_MODELS_PATH as H}from"./cloud.js";import{MEMBERS_PATH as p,ORGANIZATIONS_PATH as E,ORGANIZATION_PATH as i,STUDIO_OPEN_PATH as n,STUDIO_PATH as a,STUDIO_WAKE_PATH as s}from"./teams.js";export const CLIENT_ROUTES=[{method:"GET",path:P},{method:"GET",path:A},{method:"GET",path:o},{method:"DELETE",path:`${o}/:id`},{method:"GET",path:r},{method:"GET",path:O},{method:"GET",path:G},{method:"POST",path:_},{method:"POST",path:L},{method:"PUT",path:e},{method:"DELETE",path:e},{method:"GET",path:H},{method:"POST",path:I},{method:"GET",path:S},{method:"POST",path:"/api/tools/:name/calls"},{method:"GET",path:"/api/calls/:id"},{method:"POST",path:T},{method:"POST",path:`${T}/:id/done`},{method:"GET",path:`${T}/:id/content`},{method:"GET",path:E},{method:"POST",path:`${E}/:id/restore`},{method:"DELETE",path:i},{method:"GET",path:p},{method:"PUT",path:`${p}/:userId/limit`},{method:"GET",path:a},{method:"DELETE",path:a},{method:"POST",path:n},{method:"PUT",path:s}],probePath=t=>t.path.replace(/:[A-Za-z]+/gu,"probe");export function routeMissing(t,d,m){if(d!==404)return!1;const h=m.error;return h?.code==="not_found"&&h.message===`There is no ${t.method} ${probePath(t)}.`}
2
+ import{ACCOUNT_DELETE_PATH as d,ACCOUNT_EXPORT_PATH as m,ACCOUNT_PATH as _,BROWSER_LINK_PATH as O,DEVICES_PATH as o,METADATA_PATH as r}from"./auth.js";import{AUTO_TOP_UP_PATH as e,BILLING_CHECKOUT_PATH as L,BILLING_PLANS_PATH as S,BILLING_PORTAL_PATH as G,BILLING_SUMMARY_PATH as H,BILLING_USAGE_PATH as I,CATALOG_PATH as i,FILES_PATH as T,LLM_MESSAGES_PATH as N,LLM_MODELS_PATH as n}from"./cloud.js";import{MEMBERS_PATH as E,ORGANIZATIONS_PATH as p,ORGANIZATION_PATH as U,STUDIO_OPEN_PATH as s,STUDIO_PATH as a,STUDIO_WAKE_PATH as C}from"./teams.js";export const CLIENT_ROUTES=[{method:"GET",path:r},{method:"GET",path:_},{method:"GET",path:m},{method:"POST",path:d},{method:"GET",path:o},{method:"DELETE",path:`${o}/:id`},{method:"POST",path:O},{method:"GET",path:S},{method:"GET",path:H},{method:"GET",path:I},{method:"POST",path:L},{method:"POST",path:G},{method:"PUT",path:e},{method:"DELETE",path:e},{method:"GET",path:n},{method:"POST",path:N},{method:"GET",path:i},{method:"POST",path:"/api/tools/:name/calls"},{method:"GET",path:"/api/calls/:id"},{method:"POST",path:T},{method:"POST",path:`${T}/:id/done`},{method:"GET",path:`${T}/:id/content`},{method:"GET",path:p},{method:"POST",path:`${p}/:id/restore`},{method:"DELETE",path:U},{method:"GET",path:E},{method:"PUT",path:`${E}/:userId/limit`},{method:"GET",path:a},{method:"DELETE",path:a},{method:"POST",path:s},{method:"PUT",path:C}],probePath=t=>t.path.replace(/:[A-Za-z]+/gu,"probe");export function routeMissing(t,A,P){if(A!==404)return!1;const h=P.error;return h?.code==="not_found"&&h.message===`There is no ${t.method} ${probePath(t)}.`}
@@ -105,6 +105,7 @@ export declare const PROJECT_TOOLS: {
105
105
  doc: "doc";
106
106
  sheet: "sheet";
107
107
  scenery: "scenery";
108
+ model: "model";
108
109
  website: "website";
109
110
  }>;
110
111
  dir: z.ZodString;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/protocol",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/runtimes",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/scenery",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -93,6 +93,10 @@ export declare const RULES: {
93
93
  readonly level: "error";
94
94
  readonly rule: "The project's package.json declares AllyHub, but its packages are not installed";
95
95
  };
96
+ readonly "AK-B010": {
97
+ readonly level: "error";
98
+ readonly rule: "A 3D model does not build";
99
+ };
96
100
  readonly "AK-K001": {
97
101
  readonly level: "error";
98
102
  readonly rule: "Two parts have the same key";
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export const RULES={"AK-M001":{level:"error",rule:"The fields of video(), slides() or defineComponent do not match the format"},"AK-M002":{level:"error",rule:"A piece is not the entry file of an item folder"},"AK-M003":{level:"error",rule:"An item's entry file does not match its folder or its kind"},"AK-M004":{level:"error",rule:"The project has no pieces"},"AK-M006":{level:"error",rule:"A messages file does not match the format"},"AK-M007":{level:"error",rule:"A script file does not match the format"},"AK-M008":{level:"error",rule:"A doc's file is not MDX, holds what a doc does not draw, or is not an item of its own"},"AK-M009":{level:"error",rule:"A sheet cannot be read as it says: its file is not CSV a sheet can read, a value is not its column's type, or its spec does not match the format"},"AK-M010":{level:"error",rule:"A video item reaches itself through the videos it shows (a screen, a video take, a footage of a video item)"},"AK-B001":{level:"error",rule:"Two pieces have the same id"},"AK-B003":{level:"error",rule:"The build made a network request"},"AK-B004":{level:"error",rule:"The build timed out, or its result is over the size limit"},"AK-B005":{level:"error",rule:"An import of a file outside the project, or of a package not declared in package.json"},"AK-B006":{level:"error",rule:"An import of an @allyhub/sdk entry point that does not exist"},"AK-B008":{level:"error",rule:"The project's @allyhub/sdk is another version than the allyhub that builds it"},"AK-B009":{level:"error",rule:"The project's package.json declares AllyHub, but its packages are not installed"},"AK-K001":{level:"error",rule:"Two parts have the same key"},"AK-K003":{level:"error",rule:"The output has no parts"},"AK-D002":{level:"error",rule:"The same frame has different pixels when drawn in order and out of order"},"AK-N003":{level:"error",rule:"The sandbox blocked a request at run time"},"AK-S001":{level:"error",rule:"The code reads a key that is missing in the default language too"},"AK-T001":{level:"error",rule:"A take has no word times beside it (<name>.words.json)"},"AK-T002":{level:"error",rule:"A say part has no generated file for its text, voice and tool"},"AK-T003":{level:"error",rule:"A take's range phrase, or the line a part is saying, is not found in the take"},"AK-T004":{level:"error",rule:"A word reference is not in its part's words, or an anchor is not in its line"},"AK-T005":{level:"error",rule:"A take's edits file is missing or does not match the format, or an edit's words are no longer in the take"},"AK-T006":{level:"error",rule:"A take's range phrase, or the line a part is saying, is said in words the take's edits remove"},"AK-T007":{level:"error",rule:"A part says a line its generated voice was not made from"},"AK-F001":{level:"error",rule:"The video is longer than its platform profile takes"},"AK-A001":{level:"error",rule:"A referenced media or data file does not exist"},"AK-A003":{level:"error",rule:"Wrong media type"},"AK-A005":{level:"error",rule:"A layer draws a picture that does not load: its source is not a file the stage serves, or not a picture"},"AK-P002":{level:"error",rule:"Loading took longer than the piece's loadLimit (default 10 seconds)"},"AK-P003":{level:"error",rule:"A moment did not finish drawing within the piece's seekLimit (default 30 seconds): work a layer waits for (ctx.wait) or a picture it shows never settled"},"AK-R001":{level:"error",rule:"An unhandled exception was thrown at run time"},"AK-R003":{level:"error",rule:"The page was changed outside the stage"},"AK-R004":{level:"error",rule:"The code sets a style value the browser does not accept, so the style does not apply"},"AK-G001":{level:"error",rule:"Unknown format: not one of the four presets or WIDTHxHEIGHT (a4 and letter for paged outputs only, and even sides for video)"},"AK-X001":{level:"error",rule:"The matrix's slots, structures, rules or combos name something that does not exist, or a combo lacks a slot of its structure"},"AK-X002":{level:"error",rule:"The matrix's rules leave no combination to make, or rule out a combo matrix.combos names"},"AK-X004":{level:"error",rule:"Two chosen combos are the same, or more alike than the matrix's differ allows"},"AK-X005":{level:"error",rule:"A part reads another slot's pick, so one render of it cannot serve every combo"},"AK-X006":{level:"error",rule:"A combo is longer than its output's maxDuration"},"AK-W001":{level:"error",rule:"A scenery does not build: its module's export is not a scenery, its build throws or does not finish, or its update throws"},"AK-W002":{level:"error",rule:"WebGL cannot be made or is lost, or draws on something other than SwiftShader where the CPU was asked for (--cpu, ALLYHUB_GPU=0, or the default off macOS)"},"AK-W003":{level:"error",rule:"A model, texture, environment or splat file does not load, names a file that is not there, or needs a decoder AllyHub does not lend"},"AK-W004":{level:"error",rule:"A camera cannot be drawn: a number that is not finite, a target at its position, a view along its up, a field of view outside (0°, 180°), or near and far planes out of order"},"AK-W005":{level:"error",rule:"A name a camera, a move or a measurement refers to names no object in the scenery, or names two"},"AK-W006":{level:"error",rule:"A material's shader does not compile or link on this renderer, or needs more texture units than the renderer has, so what uses it draws nothing (warn: more than the 16 a GPU may have)"},"AK-W008":{level:"error",rule:"A screen drawn in the scenery cannot show its element as it is: an element of it is in the browser's top layer (a modal dialog, a popover), planes of a preserve-3d context overlap, its element is larger than the largest texture, or its picture could not be copied"},"AK-S002":{level:"warn",rule:"Missing translation"},"AK-L002":{level:"warn",rule:"Text overflows the frame or is clipped"},"AK-L003":{level:"warn",rule:"Missing glyphs"},"AK-L006":{level:"warn",rule:"Text is drawn in a fallback font, or in a bold or italic the font does not have"},"AK-W007":{level:"warn",rule:"A screen asked to be drawn in the scenery is drawn over it, unlit and untoned: this browser cannot draw an element into a canvas (Chrome's HTML-in-Canvas), or ALLYHUB_HTML_IN_CANVAS=0"}};export function problem(e,r,o={}){const{level:t,...l}=o;return{code:e,level:t??RULES[e].level,message:r,...l}}export function countLevels(e){let r=0,o=0;for(const t of e)t.level==="error"?r++:o++;return{errors:r,warnings:o}}
2
+ export const RULES={"AK-M001":{level:"error",rule:"The fields of video(), slides() or defineComponent do not match the format"},"AK-M002":{level:"error",rule:"A piece is not the entry file of an item folder"},"AK-M003":{level:"error",rule:"An item's entry file does not match its folder or its kind"},"AK-M004":{level:"error",rule:"The project has no pieces"},"AK-M006":{level:"error",rule:"A messages file does not match the format"},"AK-M007":{level:"error",rule:"A script file does not match the format"},"AK-M008":{level:"error",rule:"A doc's file is not MDX, holds what a doc does not draw, or is not an item of its own"},"AK-M009":{level:"error",rule:"A sheet cannot be read as it says: its file is not CSV a sheet can read, a value is not its column's type, or its spec does not match the format"},"AK-M010":{level:"error",rule:"A video item reaches itself through the videos it shows (a screen, a video take, a footage of a video item)"},"AK-B001":{level:"error",rule:"Two pieces have the same id"},"AK-B003":{level:"error",rule:"The build made a network request"},"AK-B004":{level:"error",rule:"The build timed out, or its result is over the size limit"},"AK-B005":{level:"error",rule:"An import of a file outside the project, or of a package not declared in package.json"},"AK-B006":{level:"error",rule:"An import of an @allyhub/sdk entry point that does not exist"},"AK-B008":{level:"error",rule:"The project's @allyhub/sdk is another version than the allyhub that builds it"},"AK-B009":{level:"error",rule:"The project's package.json declares AllyHub, but its packages are not installed"},"AK-B010":{level:"error",rule:"A 3D model does not build"},"AK-K001":{level:"error",rule:"Two parts have the same key"},"AK-K003":{level:"error",rule:"The output has no parts"},"AK-D002":{level:"error",rule:"The same frame has different pixels when drawn in order and out of order"},"AK-N003":{level:"error",rule:"The sandbox blocked a request at run time"},"AK-S001":{level:"error",rule:"The code reads a key that is missing in the default language too"},"AK-T001":{level:"error",rule:"A take has no word times beside it (<name>.words.json)"},"AK-T002":{level:"error",rule:"A say part has no generated file for its text, voice and tool"},"AK-T003":{level:"error",rule:"A take's range phrase, or the line a part is saying, is not found in the take"},"AK-T004":{level:"error",rule:"A word reference is not in its part's words, or an anchor is not in its line"},"AK-T005":{level:"error",rule:"A take's edits file is missing or does not match the format, or an edit's words are no longer in the take"},"AK-T006":{level:"error",rule:"A take's range phrase, or the line a part is saying, is said in words the take's edits remove"},"AK-T007":{level:"error",rule:"A part says a line its generated voice was not made from"},"AK-F001":{level:"error",rule:"The video is longer than its platform profile takes"},"AK-A001":{level:"error",rule:"A referenced media or data file does not exist"},"AK-A003":{level:"error",rule:"Wrong media type"},"AK-A005":{level:"error",rule:"A layer draws a picture that does not load: its source is not a file the stage serves, or not a picture"},"AK-P002":{level:"error",rule:"Loading took longer than the piece's loadLimit (default 10 seconds)"},"AK-P003":{level:"error",rule:"A moment did not finish drawing within the piece's seekLimit (default 30 seconds): work a layer waits for (ctx.wait) or a picture it shows never settled"},"AK-R001":{level:"error",rule:"An unhandled exception was thrown at run time"},"AK-R003":{level:"error",rule:"The page was changed outside the stage"},"AK-R004":{level:"error",rule:"The code sets a style value the browser does not accept, so the style does not apply"},"AK-G001":{level:"error",rule:"Unknown format: not one of the four presets or WIDTHxHEIGHT (a4 and letter for paged outputs only, and even sides for video)"},"AK-X001":{level:"error",rule:"The matrix's slots, structures, rules or combos name something that does not exist, or a combo lacks a slot of its structure"},"AK-X002":{level:"error",rule:"The matrix's rules leave no combination to make, or rule out a combo matrix.combos names"},"AK-X004":{level:"error",rule:"Two chosen combos are the same, or more alike than the matrix's differ allows"},"AK-X005":{level:"error",rule:"A part reads another slot's pick, so one render of it cannot serve every combo"},"AK-X006":{level:"error",rule:"A combo is longer than its output's maxDuration"},"AK-W001":{level:"error",rule:"A scenery does not build: its module's export is not a scenery, its build throws or does not finish, or its update throws"},"AK-W002":{level:"error",rule:"WebGL cannot be made or is lost, or draws on something other than SwiftShader where the CPU was asked for (--cpu, ALLYHUB_GPU=0, or the default off macOS)"},"AK-W003":{level:"error",rule:"A model, texture, environment or splat file does not load, names a file that is not there, or needs a decoder AllyHub does not lend"},"AK-W004":{level:"error",rule:"A camera cannot be drawn: a number that is not finite, a target at its position, a view along its up, a field of view outside (0°, 180°), or near and far planes out of order"},"AK-W005":{level:"error",rule:"A name a camera, a move or a measurement refers to names no object in the scenery, or names two"},"AK-W006":{level:"error",rule:"A material's shader does not compile or link on this renderer, or needs more texture units than the renderer has, so what uses it draws nothing (warn: more than the 16 a GPU may have)"},"AK-W008":{level:"error",rule:"A screen drawn in the scenery cannot show its element as it is: an element of it is in the browser's top layer (a modal dialog, a popover), planes of a preserve-3d context overlap, its element is larger than the largest texture, or its picture could not be copied"},"AK-S002":{level:"warn",rule:"Missing translation"},"AK-L002":{level:"warn",rule:"Text overflows the frame or is clipped"},"AK-L003":{level:"warn",rule:"Missing glyphs"},"AK-L006":{level:"warn",rule:"Text is drawn in a fallback font, or in a bold or italic the font does not have"},"AK-W007":{level:"warn",rule:"A screen asked to be drawn in the scenery is drawn over it, unlit and untoned: this browser cannot draw an element into a canvas (Chrome's HTML-in-Canvas), or ALLYHUB_HTML_IN_CANVAS=0"}};export function problem(e,r,o={}){const{level:t,...l}=o;return{code:e,level:t??RULES[e].level,message:r,...l}}export function countLevels(e){let r=0,o=0;for(const t of e)t.level==="error"?r++:o++;return{errors:r,warnings:o}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/video-core",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "What an agent writes videos and decks with: video() and slides(), parts with their speech, footage and sounds, defineComponent() and custom() layers, the layout, motion and input helpers, and the scenery() layer's options. Nothing a host needs.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "homepage": "https://allyhub.com",
@@ -42,12 +42,12 @@
42
42
  "node": ">=22.19"
43
43
  },
44
44
  "dependencies": {
45
- "@allyhub-next/audio": "0.2.0",
46
- "@allyhub-next/formats": "0.2.0",
47
- "@allyhub-next/protocol": "0.2.0",
48
- "@allyhub-next/runtimes": "0.2.0",
49
- "@allyhub-next/scenery": "0.2.0",
50
- "@allyhub-next/video-core": "0.2.0",
45
+ "@allyhub-next/audio": "0.3.0",
46
+ "@allyhub-next/formats": "0.3.0",
47
+ "@allyhub-next/protocol": "0.3.0",
48
+ "@allyhub-next/runtimes": "0.3.0",
49
+ "@allyhub-next/scenery": "0.3.0",
50
+ "@allyhub-next/video-core": "0.3.0",
51
51
  "dequal": "2.0.3",
52
52
  "env-paths": "4.0.0",
53
53
  "jsonc-parser": "^3.3.1",