allyhub 0.2.0-next.4 → 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 (106) hide show
  1. package/dist/cli-version.js +2 -0
  2. package/dist/commands/add.js +5 -5
  3. package/dist/commands/cloud-tools.js +9 -10
  4. package/dist/commands/dev.js +2 -2
  5. package/dist/commands/mcp.js +1 -1
  6. package/dist/commands/model.js +1 -1
  7. package/dist/commands/orgs.js +2 -2
  8. package/dist/commands/render.js +1 -1
  9. package/dist/commands/skills.js +3 -3
  10. package/dist/commands/voice.js +2 -2
  11. package/dist/main.js +7 -7
  12. package/dist/works.js +1 -1
  13. package/editor-app/view.html +4 -4
  14. package/editor-web/assets/chevron-left-W6sP7nB1.js +1 -0
  15. package/editor-web/assets/{chevron-up-B2IfPYC4.js → chevron-up-566GQpAm.js} +1 -1
  16. package/editor-web/assets/{dist-VsUk3S-a.js → dist-BKDr73BR.js} +4 -4
  17. package/editor-web/assets/dist-CPCNTYVu.js +8 -0
  18. package/editor-web/assets/{dist-ChU-0IAY.js → dist-C_NajYp0.js} +1 -1
  19. package/editor-web/assets/{dist-DCgVauDD.js → dist-mA6NrAKh.js} +34 -34
  20. package/editor-web/assets/{floating-ui.react-dom-C6Aeuo3L.js → floating-ui.react-dom-BUxFRF6t.js} +1 -1
  21. package/editor-web/assets/index-CFZhjTQW.js +56 -0
  22. package/editor-web/assets/index-DgU-lyX6.css +2 -0
  23. package/editor-web/assets/{react-CSPssXRH.js → react-Ff_buMj8.js} +3 -3
  24. package/editor-web/assets/{undo-2-D6qCS-P0.js → undo-2-BKFItM3X.js} +1 -1
  25. package/editor-web/index.html +4 -4
  26. package/node_modules/@allyhub-next/audio/package.json +1 -1
  27. package/node_modules/@allyhub-next/browser/package.json +1 -1
  28. package/node_modules/@allyhub-next/build/dist/scan.js +1 -1
  29. package/node_modules/@allyhub-next/build/package.json +1 -1
  30. package/node_modules/@allyhub-next/check/dist/check.js +3 -3
  31. package/node_modules/@allyhub-next/check/package.json +1 -1
  32. package/node_modules/@allyhub-next/cloud/dist/call.js +2 -2
  33. package/node_modules/@allyhub-next/cloud/dist/index.js +1 -1
  34. package/node_modules/@allyhub-next/cloud/dist/signin.js +2 -2
  35. package/node_modules/@allyhub-next/cloud/dist/token.js +1 -1
  36. package/node_modules/@allyhub-next/cloud/dist/voice.js +1 -1
  37. package/node_modules/@allyhub-next/cloud/package.json +1 -1
  38. package/node_modules/@allyhub-next/components/package.json +1 -1
  39. package/node_modules/@allyhub-next/components/r/callout.json +5 -1
  40. package/node_modules/@allyhub-next/components/r/caption-line.json +5 -1
  41. package/node_modules/@allyhub-next/components/r/caption-subtitle.json +5 -1
  42. package/node_modules/@allyhub-next/components/r/caption-word.json +5 -1
  43. package/node_modules/@allyhub-next/components/r/chart.json +5 -1
  44. package/node_modules/@allyhub-next/components/r/code-panel.json +5 -1
  45. package/node_modules/@allyhub-next/components/r/screen-demo.json +5 -1
  46. package/node_modules/@allyhub-next/dev-server/dist/live.js +1 -1
  47. package/node_modules/@allyhub-next/dev-server/dist/tools.js +1 -1
  48. package/node_modules/@allyhub-next/dev-server/package.json +1 -1
  49. package/node_modules/@allyhub-next/doc/package.json +1 -1
  50. package/node_modules/@allyhub-next/export/dist/export.d.ts +5 -2
  51. package/node_modules/@allyhub-next/export/dist/export.js +2 -2
  52. package/node_modules/@allyhub-next/export/package.json +1 -1
  53. package/node_modules/@allyhub-next/formats/dist/items.d.ts +5 -0
  54. package/node_modules/@allyhub-next/formats/dist/items.js +1 -1
  55. package/node_modules/@allyhub-next/formats/dist/layout.d.ts +2 -0
  56. package/node_modules/@allyhub-next/formats/dist/layout.js +1 -1
  57. package/node_modules/@allyhub-next/formats/package.json +1 -1
  58. package/node_modules/@allyhub-next/measure/package.json +1 -1
  59. package/node_modules/@allyhub-next/media/package.json +1 -1
  60. package/node_modules/@allyhub-next/model/dist/report.d.ts +1 -1
  61. package/node_modules/@allyhub-next/model/package.json +1 -1
  62. package/node_modules/@allyhub-next/project/package.json +1 -1
  63. package/node_modules/@allyhub-next/protocol/dist/app.d.ts +3 -0
  64. package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +17 -0
  65. package/node_modules/@allyhub-next/protocol/dist/auth.js +1 -1
  66. package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +1 -1
  67. package/node_modules/@allyhub-next/protocol/dist/cli.js +1 -1
  68. package/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +23 -168
  69. package/node_modules/@allyhub-next/protocol/dist/cloud.js +1 -1
  70. package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +4 -0
  71. package/node_modules/@allyhub-next/protocol/dist/index.d.ts +1 -0
  72. package/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
  73. package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +5 -1
  74. package/node_modules/@allyhub-next/protocol/dist/registry.js +1 -1
  75. package/node_modules/@allyhub-next/protocol/dist/routes.d.ts +14 -0
  76. package/node_modules/@allyhub-next/protocol/dist/routes.js +2 -0
  77. package/node_modules/@allyhub-next/protocol/dist/teams.d.ts +1 -7
  78. package/node_modules/@allyhub-next/protocol/dist/teams.js +1 -1
  79. package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +1 -0
  80. package/node_modules/@allyhub-next/protocol/package.json +1 -1
  81. package/node_modules/@allyhub-next/registry/package.json +1 -1
  82. package/node_modules/@allyhub-next/render/package.json +1 -1
  83. package/node_modules/@allyhub-next/runtime/dist/page.js +1 -1
  84. package/node_modules/@allyhub-next/runtime/package.json +1 -1
  85. package/node_modules/@allyhub-next/runtimes/package.json +1 -1
  86. package/node_modules/@allyhub-next/scaffold/dist/index.js +5 -5
  87. package/node_modules/@allyhub-next/scaffold/package.json +1 -1
  88. package/node_modules/@allyhub-next/scenery/package.json +1 -1
  89. package/node_modules/@allyhub-next/scenery-host/dist/bundle.d.ts +1 -0
  90. package/node_modules/@allyhub-next/scenery-host/dist/bundle.js +3 -3
  91. package/node_modules/@allyhub-next/scenery-host/dist/model-stage.d.ts +32 -0
  92. package/node_modules/@allyhub-next/scenery-host/dist/model-stage.js +3 -0
  93. package/node_modules/@allyhub-next/scenery-host/package.json +1 -1
  94. package/node_modules/@allyhub-next/sheet/package.json +1 -1
  95. package/node_modules/@allyhub-next/site/package.json +1 -1
  96. package/node_modules/@allyhub-next/stage/package.json +1 -1
  97. package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +4 -0
  98. package/node_modules/@allyhub-next/video-core/dist/problem.js +1 -1
  99. package/node_modules/@allyhub-next/video-core/package.json +1 -1
  100. package/package.json +28 -28
  101. package/dist/charge.js +0 -2
  102. package/editor-web/assets/chevron-left-B1KTa28S.js +0 -1
  103. package/editor-web/assets/dist-CuyNR3bn.js +0 -8
  104. package/editor-web/assets/index-BoYpZLq7.js +0 -56
  105. package/editor-web/assets/index-DRbemuuR.css +0 -2
  106. package/node_modules/@allyhub-next/cloud/dist/price.js +0 -2
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/model",
3
- "version": "0.2.0-next.4",
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/project",
3
- "version": "0.2.0-next.4",
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,"_")}`;
@@ -3,10 +3,20 @@ import { z } from "zod";
3
3
  export declare const API_KEY_ENV = "ALLYHUB_API_KEY";
4
4
  /** `GET`: the organization's credits, its plan and its auto top-up. */
5
5
  export declare const BILLING_SUMMARY_PATH = "/api/billing/summary";
6
+ /**
7
+ * Why an auto top-up stopped by itself, for a page to say in its words:
8
+ * no card saved, a Checkout still saving one, a saved method that is not a
9
+ * card, the card declined, the bank asking the person to confirm (3D
10
+ * Secure), Stripe not charging it for another reason, a top-up too small to
11
+ * clear its line, a top-up refunded, a payment disputed.
12
+ */
13
+ export declare const AUTO_TOP_UP_STOPS: readonly ["no_card", "saving_card", "not_a_card", "declined", "needs_authentication", "not_charged", "under_line", "refunded", "disputed"];
14
+ export type AutoTopUpStop = (typeof AUTO_TOP_UP_STOPS)[number];
6
15
  export declare const BillingSummarySchema: z.ZodObject<{
7
16
  credits: z.ZodNumber;
8
17
  held: z.ZodNumber;
9
18
  owed: z.ZodNumber;
19
+ frozen: z.ZodDefault<z.ZodNullable<z.ZodString>>;
10
20
  plan: z.ZodNullable<z.ZodObject<{
11
21
  id: z.ZodString;
12
22
  name: z.ZodString;
@@ -21,7 +31,17 @@ export declare const BillingSummarySchema: z.ZodObject<{
21
31
  autoTopUp: z.ZodNullable<z.ZodObject<{
22
32
  below: z.ZodNumber;
23
33
  amountCents: z.ZodNumber;
24
- stopped: z.ZodNullable<z.ZodString>;
34
+ stopped: z.ZodNullable<z.ZodEnum<{
35
+ no_card: "no_card";
36
+ saving_card: "saving_card";
37
+ not_a_card: "not_a_card";
38
+ declined: "declined";
39
+ needs_authentication: "needs_authentication";
40
+ not_charged: "not_charged";
41
+ under_line: "under_line";
42
+ refunded: "refunded";
43
+ disputed: "disputed";
44
+ }>>;
25
45
  }, z.core.$strip>>;
26
46
  }, z.core.$strip>;
27
47
  export type BillingSummary = z.infer<typeof BillingSummarySchema>;
@@ -90,6 +110,8 @@ export declare const BILLING_VIEWS: {
90
110
  readonly plans: "plans";
91
111
  readonly credits: "add-credits";
92
112
  };
113
+ /** The organization the page acts in and pays from (its id), which becomes the session's. */
114
+ export declare const BILLING_ORG_PARAM = "org";
93
115
  /** The language the app shows, which the page shows too (a locale code, `zh-cn`). */
94
116
  export declare const BILLING_LANG_PARAM = "lang";
95
117
  /** The models the organization may use. */
@@ -129,94 +151,6 @@ export declare const ModelCatalogSchema: z.ZodObject<{
129
151
  export type ModelCatalog = z.infer<typeof ModelCatalogSchema>;
130
152
  /** A JSON Schema document of a tool's input or output. */
131
153
  export declare const JsonSchemaSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
132
- /**
133
- * One part of a tool's price rule: `credits` per unit of `meter` (per
134
- * `tiers[input[tierField]]` when the input picks a tier), beyond `free`
135
- * units. Meters that read the input (`input_count`, `input_block`,
136
- * `input_value`) count `field`; the others count what the run returned
137
- * (results, seconds, images…), estimated from `field` or `typical`.
138
- * Meters are plain strings: the server may add new ones.
139
- */
140
- export declare const ToolPricePartSchema: z.ZodObject<{
141
- meter: z.ZodString;
142
- credits: z.ZodNumber;
143
- field: z.ZodOptional<z.ZodString>;
144
- size: z.ZodOptional<z.ZodNumber>;
145
- free: z.ZodOptional<z.ZodNumber>;
146
- tierField: z.ZodOptional<z.ZodString>;
147
- tiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
148
- typical: z.ZodOptional<z.ZodNumber>;
149
- }, z.core.$strip>;
150
- export type ToolPricePart = z.infer<typeof ToolPricePartSchema>;
151
- /**
152
- * A rate a unit costs when the input's settings pick it: each `when` path
153
- * (dotted, into the input: `providerOptions.klingai.mode`) holds one of
154
- * its values, `null` for a setting not given (the provider's default).
155
- * `label` says it after the rate: "at 720p", "in pro mode with sound".
156
- */
157
- export declare const ToolPriceRateSchema: z.ZodObject<{
158
- label: z.ZodString;
159
- credits: z.ZodNumber;
160
- when: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
161
- }, z.core.$strip>;
162
- export type ToolPriceRate = z.infer<typeof ToolPriceRateSchema>;
163
- /**
164
- * A part of a quote: a part whose rate may be the first of `rates` the
165
- * input matches (`credits` is then the lowest of them); none matching, the
166
- * rate is not known before the call.
167
- */
168
- export declare const ToolQuotePartSchema: z.ZodObject<{
169
- meter: z.ZodString;
170
- credits: z.ZodNumber;
171
- field: z.ZodOptional<z.ZodString>;
172
- size: z.ZodOptional<z.ZodNumber>;
173
- free: z.ZodOptional<z.ZodNumber>;
174
- tierField: z.ZodOptional<z.ZodString>;
175
- tiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
176
- typical: z.ZodOptional<z.ZodNumber>;
177
- rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
178
- label: z.ZodString;
179
- credits: z.ZodNumber;
180
- when: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
181
- }, z.core.$strip>>>;
182
- }, z.core.$strip>;
183
- export type ToolQuotePart = z.infer<typeof ToolQuotePartSchema>;
184
- /**
185
- * What a run is charged, in credits: the base plus each part. A tool
186
- * charged what its AI model's provider reports (a `usd` part) has a
187
- * `quote`: the provider's published rates (by the second of video, the
188
- * token, the image…), converted to credits as the charge is, which a quote
189
- * counts by before the call; the call is still charged by `parts`.
190
- */
191
- export declare const ToolPriceSchema: z.ZodObject<{
192
- baseCredits: z.ZodNumber;
193
- parts: z.ZodArray<z.ZodObject<{
194
- meter: z.ZodString;
195
- credits: z.ZodNumber;
196
- field: z.ZodOptional<z.ZodString>;
197
- size: z.ZodOptional<z.ZodNumber>;
198
- free: z.ZodOptional<z.ZodNumber>;
199
- tierField: z.ZodOptional<z.ZodString>;
200
- tiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
201
- typical: z.ZodOptional<z.ZodNumber>;
202
- }, z.core.$strip>>;
203
- quote: z.ZodOptional<z.ZodArray<z.ZodObject<{
204
- meter: z.ZodString;
205
- credits: z.ZodNumber;
206
- field: z.ZodOptional<z.ZodString>;
207
- size: z.ZodOptional<z.ZodNumber>;
208
- free: z.ZodOptional<z.ZodNumber>;
209
- tierField: z.ZodOptional<z.ZodString>;
210
- tiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
211
- typical: z.ZodOptional<z.ZodNumber>;
212
- rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
213
- label: z.ZodString;
214
- credits: z.ZodNumber;
215
- when: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
216
- }, z.core.$strip>>>;
217
- }, z.core.$strip>>>;
218
- }, z.core.$strip>;
219
- export type ToolPrice = z.infer<typeof ToolPriceSchema>;
220
154
  export declare const CATALOG_PATH = "/api/catalog";
221
155
  export declare const CatalogWorkSchema: z.ZodObject<{
222
156
  id: z.ZodString;
@@ -231,34 +165,6 @@ export declare const CatalogToolSchema: z.ZodObject<{
231
165
  description: z.ZodString;
232
166
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
233
167
  output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
234
- price: z.ZodObject<{
235
- baseCredits: z.ZodNumber;
236
- parts: z.ZodArray<z.ZodObject<{
237
- meter: z.ZodString;
238
- credits: z.ZodNumber;
239
- field: z.ZodOptional<z.ZodString>;
240
- size: z.ZodOptional<z.ZodNumber>;
241
- free: z.ZodOptional<z.ZodNumber>;
242
- tierField: z.ZodOptional<z.ZodString>;
243
- tiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
244
- typical: z.ZodOptional<z.ZodNumber>;
245
- }, z.core.$strip>>;
246
- quote: z.ZodOptional<z.ZodArray<z.ZodObject<{
247
- meter: z.ZodString;
248
- credits: z.ZodNumber;
249
- field: z.ZodOptional<z.ZodString>;
250
- size: z.ZodOptional<z.ZodNumber>;
251
- free: z.ZodOptional<z.ZodNumber>;
252
- tierField: z.ZodOptional<z.ZodString>;
253
- tiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
254
- typical: z.ZodOptional<z.ZodNumber>;
255
- rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
256
- label: z.ZodString;
257
- credits: z.ZodNumber;
258
- when: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
259
- }, z.core.$strip>>>;
260
- }, z.core.$strip>>>;
261
- }, z.core.$strip>;
262
168
  long: z.ZodBoolean;
263
169
  }, z.core.$strip>;
264
170
  export type CatalogTool = z.infer<typeof CatalogToolSchema>;
@@ -276,61 +182,10 @@ export declare const CatalogSchema: z.ZodObject<{
276
182
  description: z.ZodString;
277
183
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
278
184
  output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
279
- price: z.ZodObject<{
280
- baseCredits: z.ZodNumber;
281
- parts: z.ZodArray<z.ZodObject<{
282
- meter: z.ZodString;
283
- credits: z.ZodNumber;
284
- field: z.ZodOptional<z.ZodString>;
285
- size: z.ZodOptional<z.ZodNumber>;
286
- free: z.ZodOptional<z.ZodNumber>;
287
- tierField: z.ZodOptional<z.ZodString>;
288
- tiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
289
- typical: z.ZodOptional<z.ZodNumber>;
290
- }, z.core.$strip>>;
291
- quote: z.ZodOptional<z.ZodArray<z.ZodObject<{
292
- meter: z.ZodString;
293
- credits: z.ZodNumber;
294
- field: z.ZodOptional<z.ZodString>;
295
- size: z.ZodOptional<z.ZodNumber>;
296
- free: z.ZodOptional<z.ZodNumber>;
297
- tierField: z.ZodOptional<z.ZodString>;
298
- tiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
299
- typical: z.ZodOptional<z.ZodNumber>;
300
- rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
301
- label: z.ZodString;
302
- credits: z.ZodNumber;
303
- when: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
304
- }, z.core.$strip>>>;
305
- }, z.core.$strip>>>;
306
- }, z.core.$strip>;
307
185
  long: z.ZodBoolean;
308
186
  }, z.core.$strip>>;
309
187
  }, z.core.$strip>;
310
188
  export type Catalog = z.infer<typeof CatalogSchema>;
311
- /**
312
- * A call that spends credits, as the person is asked to allow it before
313
- * it is made: in MCP's elicitation (`elicitation/create`, a form with no
314
- * fields), under this key of its `_meta`, so a client says the price in
315
- * its own words; the elicitation's message says the same in English.
316
- */
317
- export declare const CHARGE_META = "allyhub.com/charge";
318
- /**
319
- * Where AllyHub's command line asks the person when an agent runs it in
320
- * Studio's shell: Studio's Host names an address in each agent's
321
- * environment, and the CLI posts `{ cwd, params }` to it (`params` the
322
- * elicitation's, as an MCP server sends them) and is answered with MCP's
323
- * elicitation result, or an error saying why no one could be asked.
324
- */
325
- export declare const STUDIO_ASK_ENV = "ALLYHUB_STUDIO_ASK";
326
- export declare const ChargeSchema: z.ZodObject<{
327
- tool: z.ZodString;
328
- title: z.ZodString;
329
- credits: z.ZodNumber;
330
- estimated: z.ZodBoolean;
331
- unknown: z.ZodBoolean;
332
- }, z.core.$strip>;
333
- export type Charge = z.infer<typeof ChargeSchema>;
334
189
  /** Where a tool's calls are made (POST). */
335
190
  export declare const toolCallsPath: (tool: string) => string;
336
191
  /** Where a call is read again (GET). */
@@ -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 API_KEY_ENV="ALLYHUB_API_KEY",BILLING_SUMMARY_PATH="/api/billing/summary",BillingSummarySchema=t.object({credits:t.number(),held:t.number(),owed:t.number(),plan:t.object({id:t.string(),name:t.string(),interval:t.enum(["month","year"]),status:t.string(),renewsAt:t.iso.datetime().nullable(),endsAt:t.iso.datetime().nullable()}).nullable(),autoTopUp:t.object({below:t.number(),amountCents:t.number(),stopped:t.string().nullable()}).nullable()}),BILLING_PLANS_PATH="/api/billing/plans",BillingPlansSchema=t.object({plans:t.array(t.object({id:t.string(),name:t.string(),monthlyCredits:t.number(),prices:t.array(t.object({interval:t.enum(["month","year"]),amountCents:t.number(),currency:t.string()}))})),topUp:t.object({currency:t.string(),creditsPerDollar:t.number(),minCents:t.number(),maxCents:t.number()})}),BILLING_USAGE_PATH="/api/billing/usage",BillingUsageSchema=t.object({days:t.array(t.object({day:t.iso.date(),credits:t.number()}))}),BILLING_CHECKOUT_PATH="/api/billing/checkout",CheckoutRequestSchema=t.union([t.strictObject({plan:t.string(),interval:t.enum(["month","year"])}),t.strictObject({topUpCents:t.number().int()})]),BILLING_PORTAL_PATH="/api/billing/portal",AUTO_TOP_UP_PATH="/api/billing/auto-top-up",AutoTopUpRequestSchema=t.strictObject({below:t.number().nonnegative(),amountCents:t.number().int().positive()}),BILLING_PAGE_PATH="/plan",BILLING_PAID_PATH="/plan/paid",BILLING_VIEWS={plans:"plans",credits:"add-credits"},BILLING_LANG_PARAM="lang",LLM_MODELS_PATH="/api/llm/models",LLM_MESSAGES_PATH="/api/llm/v1/messages",MODEL_TIERS=["premium","standard","efficient"];const r={tier:t.enum(MODEL_TIERS).optional(),maker:t.string().min(1).optional()};export const ModelCatalogSchema=t.object({models:t.array(t.looseObject({id:t.string().min(1),name:t.string().min(1),...r,reasoning:t.boolean().optional(),input:t.array(t.string()).optional(),contextWindow:t.number().int().positive().optional(),maxOutput:t.number().int().positive().optional()})).min(1),defaultModel:t.string().min(1),needPlan:t.array(t.looseObject({id:t.string().min(1),name:t.string().min(1),...r})).default([])}),JsonSchemaSchema=t.record(t.string(),t.unknown()),ToolPricePartSchema=t.object({meter:t.string().min(1),credits:t.number().nonnegative(),field:t.string().optional(),size:t.number().int().positive().optional(),free:t.number().int().nonnegative().optional(),tierField:t.string().optional(),tiers:t.record(t.string(),t.number().nonnegative()).optional(),typical:t.number().nonnegative().optional()}),ToolPriceRateSchema=t.object({label:t.string().min(1),credits:t.number().nonnegative(),when:t.record(t.string().min(1),t.array(t.union([t.string(),t.number(),t.boolean(),t.null()])).min(1))}),ToolQuotePartSchema=ToolPricePartSchema.extend({rates:t.array(ToolPriceRateSchema).min(1).optional()}),ToolPriceSchema=t.object({baseCredits:t.number().nonnegative(),parts:t.array(ToolPricePartSchema),quote:t.array(ToolQuotePartSchema).min(1).optional()}),CATALOG_PATH="/api/catalog",CatalogWorkSchema=t.object({id:t.string().min(1),title:t.string().min(1),description:t.string().min(1)}),CatalogToolSchema=t.object({name:t.string().min(1),work:t.string().min(1),title:t.string().min(1),description:t.string().min(1),input:JsonSchemaSchema,output:JsonSchemaSchema,price:ToolPriceSchema,long:t.boolean()}),CatalogSchema=t.object({version:t.string().min(1),works:t.array(CatalogWorkSchema),tools:t.array(CatalogToolSchema)}),CHARGE_META="allyhub.com/charge",STUDIO_ASK_ENV="ALLYHUB_STUDIO_ASK",ChargeSchema=t.object({tool:t.string().min(1),title:t.string().min(1),credits:t.number().nonnegative(),estimated:t.boolean(),unknown:t.boolean()}),toolCallsPath=e=>`/api/tools/${encodeURIComponent(e)}/calls`,callPath=e=>`/api/calls/${encodeURIComponent(e)}`,ToolCallRequestSchema=t.strictObject({input:t.record(t.string(),t.unknown())}),CALL_STATUS=["working","completed","failed"],ToolCallSchema=t.object({id:t.string().min(1),tool:t.string().min(1),status:t.enum(CALL_STATUS),output:t.unknown().optional(),error:t.object({kind:t.string().min(1),message:t.string().min(1)}).optional(),credits:t.number().nonnegative().optional(),pollAfterMs:t.number().int().nonnegative().optional(),createdAt:t.string(),endedAt:t.string().optional()});const o="ally://data-tool-results/";export const allyFilePath=(e,n)=>`${o}${encodeURIComponent(e)}/${encodeURIComponent(n)}`;export function parseAllyFilePath(e){if(!e.startsWith(o))return;const[n,i,...a]=e.slice(o.length).split("/");if(!(!n||!i||a.length>0))try{return{id:decodeURIComponent(n),name:decodeURIComponent(i)}}catch{return}}export const FILE_MAX_BYTES=1024*1024*1024,FILES_PATH="/api/files",FileCreateRequestSchema=t.strictObject({name:t.string().min(1).max(255),size:t.int().positive().max(FILE_MAX_BYTES),sha256:t.string().regex(/^[0-9a-f]{64}$/u),contentType:t.string().min(1).max(255)}),FileCreatedSchema=t.object({id:t.string().min(1),upload:t.object({url:t.url(),headers:t.record(t.string(),t.string())}).nullable()}),fileDonePath=e=>`${FILES_PATH}/${encodeURIComponent(e)}/done`,UploadedFileSchema=t.object({id:t.string().min(1),name:t.string()}),FileContentResponseSchema=t.object({url:t.url()}),fileContentPath=(e,n)=>`${FILES_PATH}/${encodeURIComponent(e)}/content?disposition=${n}`;
2
+ import{z as t}from"zod";export const API_KEY_ENV="ALLYHUB_API_KEY",BILLING_SUMMARY_PATH="/api/billing/summary",AUTO_TOP_UP_STOPS=["no_card","saving_card","not_a_card","declined","needs_authentication","not_charged","under_line","refunded","disputed"],BillingSummarySchema=t.object({credits:t.number(),held:t.number(),owed:t.number(),frozen:t.string().nullable().default(null),plan:t.object({id:t.string(),name:t.string(),interval:t.enum(["month","year"]),status:t.string(),renewsAt:t.iso.datetime().nullable(),endsAt:t.iso.datetime().nullable()}).nullable(),autoTopUp:t.object({below:t.number(),amountCents:t.number(),stopped:t.enum(AUTO_TOP_UP_STOPS).nullable()}).nullable()}),BILLING_PLANS_PATH="/api/billing/plans",BillingPlansSchema=t.object({plans:t.array(t.object({id:t.string(),name:t.string(),monthlyCredits:t.number(),prices:t.array(t.object({interval:t.enum(["month","year"]),amountCents:t.number(),currency:t.string()}))})),topUp:t.object({currency:t.string(),creditsPerDollar:t.number(),minCents:t.number(),maxCents:t.number()})}),BILLING_USAGE_PATH="/api/billing/usage",BillingUsageSchema=t.object({days:t.array(t.object({day:t.iso.date(),credits:t.number()}))}),BILLING_CHECKOUT_PATH="/api/billing/checkout",CheckoutRequestSchema=t.union([t.strictObject({plan:t.string(),interval:t.enum(["month","year"])}),t.strictObject({topUpCents:t.number().int()})]),BILLING_PORTAL_PATH="/api/billing/portal",AUTO_TOP_UP_PATH="/api/billing/auto-top-up",AutoTopUpRequestSchema=t.strictObject({below:t.number().nonnegative(),amountCents:t.number().int().positive()}),BILLING_PAGE_PATH="/plan",BILLING_PAID_PATH="/plan/paid",BILLING_VIEWS={plans:"plans",credits:"add-credits"},BILLING_ORG_PARAM="org",BILLING_LANG_PARAM="lang",LLM_MODELS_PATH="/api/llm/models",LLM_MESSAGES_PATH="/api/llm/v1/messages",MODEL_TIERS=["premium","standard","efficient"];const r={tier:t.enum(MODEL_TIERS).optional(),maker:t.string().min(1).optional()};export const ModelCatalogSchema=t.object({models:t.array(t.looseObject({id:t.string().min(1),name:t.string().min(1),...r,reasoning:t.boolean().optional(),input:t.array(t.string()).optional(),contextWindow:t.number().int().positive().optional(),maxOutput:t.number().int().positive().optional()})).min(1),defaultModel:t.string().min(1),needPlan:t.array(t.looseObject({id:t.string().min(1),name:t.string().min(1),...r})).default([])}),JsonSchemaSchema=t.record(t.string(),t.unknown()),CATALOG_PATH="/api/catalog",CatalogWorkSchema=t.object({id:t.string().min(1),title:t.string().min(1),description:t.string().min(1)}),CatalogToolSchema=t.object({name:t.string().min(1),work:t.string().min(1),title:t.string().min(1),description:t.string().min(1),input:JsonSchemaSchema,output:JsonSchemaSchema,long:t.boolean()}),CatalogSchema=t.object({version:t.string().min(1),works:t.array(CatalogWorkSchema),tools:t.array(CatalogToolSchema)}),toolCallsPath=n=>`/api/tools/${encodeURIComponent(n)}/calls`,callPath=n=>`/api/calls/${encodeURIComponent(n)}`,ToolCallRequestSchema=t.strictObject({input:t.record(t.string(),t.unknown())}),CALL_STATUS=["working","completed","failed"],ToolCallSchema=t.object({id:t.string().min(1),tool:t.string().min(1),status:t.enum(CALL_STATUS),output:t.unknown().optional(),error:t.object({kind:t.string().min(1),message:t.string().min(1)}).optional(),credits:t.number().nonnegative().optional(),pollAfterMs:t.number().int().nonnegative().optional(),createdAt:t.string(),endedAt:t.string().optional()});const o="ally://data-tool-results/";export const allyFilePath=(n,e)=>`${o}${encodeURIComponent(n)}/${encodeURIComponent(e)}`;export function parseAllyFilePath(n){if(!n.startsWith(o))return;const[e,i,...a]=n.slice(o.length).split("/");if(!(!e||!i||a.length>0))try{return{id:decodeURIComponent(e),name:decodeURIComponent(i)}}catch{return}}export const FILE_MAX_BYTES=1024*1024*1024,FILES_PATH="/api/files",FileCreateRequestSchema=t.strictObject({name:t.string().min(1).max(255),size:t.int().positive().max(FILE_MAX_BYTES),sha256:t.string().regex(/^[0-9a-f]{64}$/u),contentType:t.string().min(1).max(255)}),FileCreatedSchema=t.object({id:t.string().min(1),upload:t.object({url:t.url(),headers:t.record(t.string(),t.string())}).nullable()}),fileDonePath=n=>`${FILES_PATH}/${encodeURIComponent(n)}/done`,UploadedFileSchema=t.object({id:t.string().min(1),name:t.string()}),FileContentResponseSchema=t.object({url:t.url()}),fileContentPath=(n,e)=>`${FILES_PATH}/${encodeURIComponent(n)}/content?disposition=${e}`;
@@ -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;
@@ -9,4 +9,5 @@ export * from "./runtimes.js";
9
9
  export * from "./cloud.js";
10
10
  export * from "./teams.js";
11
11
  export * from "./app.js";
12
+ export * from "./routes.js";
12
13
  //# sourceMappingURL=index.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
- export*from"./jsonrpc.js";export*from"./files.js";export*from"./editor.js";export*from"./tools.js";export*from"./cli.js";export*from"./auth.js";export*from"./registry.js";export*from"./runtimes.js";export*from"./cloud.js";export*from"./teams.js";export*from"./app.js";
2
+ export*from"./jsonrpc.js";export*from"./files.js";export*from"./editor.js";export*from"./tools.js";export*from"./cli.js";export*from"./auth.js";export*from"./registry.js";export*from"./runtimes.js";export*from"./cloud.js";export*from"./teams.js";export*from"./app.js";export*from"./routes.js";
@@ -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;
@@ -124,6 +125,8 @@ export declare const RegistryItemSchema: z.ZodObject<{
124
125
  }, z.core.$strict>>;
125
126
  }, z.core.$strict>;
126
127
  export type RegistryItem = z.infer<typeof RegistryItemSchema>;
128
+ /** An item as its file is written: what the schema fills in (`assets`, `bakes`) may be left out. */
129
+ export type RegistryItemInput = z.input<typeof RegistryItemSchema>;
127
130
  export declare const RegistryIndexSchema: z.ZodObject<{
128
131
  $schema: z.ZodOptional<z.ZodString>;
129
132
  name: z.ZodString;
@@ -135,6 +138,7 @@ export declare const RegistryIndexSchema: z.ZodObject<{
135
138
  "allyhub:scenery": "allyhub:scenery";
136
139
  "allyhub:model": "allyhub:model";
137
140
  "allyhub:skill": "allyhub:skill";
141
+ "allyhub:lib": "allyhub:lib";
138
142
  }>;
139
143
  name: z.ZodString;
140
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}))});
@@ -0,0 +1,14 @@
1
+ export interface ClientRoute {
2
+ method: "GET" | "POST" | "PUT" | "DELETE";
3
+ path: string;
4
+ }
5
+ export declare const CLIENT_ROUTES: readonly ClientRoute[];
6
+ /** A path to ask for a route by: each parameter given a value no record has. */
7
+ export declare const probePath: (route: ClientRoute) => string;
8
+ /**
9
+ * Whether an answer says the API has no such route: its 404 for a path no
10
+ * route matches ("There is no GET /api/…"), not a route's own 404 for a
11
+ * record that is not there.
12
+ */
13
+ export declare function routeMissing(route: ClientRoute, status: number, body: unknown): boolean;
14
+ //# sourceMappingURL=routes.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{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)}.`}
@@ -1,15 +1,11 @@
1
1
  import { z } from "zod";
2
- /** `GET`: the organizations the person is in, their own first. */
2
+ /** `GET`: the organizations the person is in, the one a request acts in unless it names another first. */
3
3
  export declare const ORGANIZATIONS_PATH = "/api/organizations";
4
4
  export declare const OrganizationsSchema: z.ZodObject<{
5
5
  organizations: z.ZodArray<z.ZodObject<{
6
6
  id: z.ZodString;
7
7
  name: z.ZodString;
8
8
  slug: z.ZodString;
9
- kind: z.ZodEnum<{
10
- personal: "personal";
11
- team: "team";
12
- }>;
13
9
  role: z.ZodString;
14
10
  dissolvedAt: z.ZodNullable<z.ZodISODateTime>;
15
11
  }, z.core.$strip>>;
@@ -33,8 +29,6 @@ export declare const memberLimitPath: (userId: string) => string;
33
29
  export declare const MemberLimitSchema: z.ZodObject<{
34
30
  monthly: z.ZodNullable<z.ZodNumber>;
35
31
  }, z.core.$strict>;
36
- /** `POST`: the person's own credits moved into the team the request acts in; answers `{ moved }`. */
37
- export declare const MOVE_CREDITS_PATH = "/api/organization/credits/move";
38
32
  /** `DELETE`, its owner's: the team the request acts in dissolved. */
39
33
  export declare const ORGANIZATION_PATH = "/api/organization";
40
34
  /** `POST`, its owner's: a dissolved team restored, within 30 days. */
@@ -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 ORGANIZATIONS_PATH="/api/organizations",OrganizationsSchema=t.object({organizations:t.array(t.object({id:t.string(),name:t.string(),slug:t.string(),kind:t.enum(["personal","team"]),role:t.string(),dissolvedAt:t.iso.datetime().nullable()}))}),MEMBERS_PATH="/api/organization/members",MembersSchema=t.object({members:t.array(t.object({userId:t.string(),email:t.string(),name:t.string(),role:t.string(),limit:t.number().nullable(),used:t.number()}))}),memberLimitPath=e=>`${MEMBERS_PATH}/${encodeURIComponent(e)}/limit`,MemberLimitSchema=t.strictObject({monthly:t.number().nonnegative().nullable()}),MOVE_CREDITS_PATH="/api/organization/credits/move",ORGANIZATION_PATH="/api/organization",restorePath=e=>`${ORGANIZATIONS_PATH}/${encodeURIComponent(e)}/restore`,STUDIO_PATH="/api/studio",StudioSchema=t.object({studio:t.object({state:t.enum(["running","paused"]),organizationId:t.string()}).nullable(),creditsPerHour:t.number()}),STUDIO_OPEN_PATH="/api/studio/open",STUDIO_WAKE_PATH="/api/studio/wake",StudioWakeSchema=t.strictObject({at:t.iso.datetime().nullable()});
2
+ import{z as t}from"zod";export const ORGANIZATIONS_PATH="/api/organizations",OrganizationsSchema=t.object({organizations:t.array(t.object({id:t.string(),name:t.string(),slug:t.string(),role:t.string(),dissolvedAt:t.iso.datetime().nullable()}))}),MEMBERS_PATH="/api/organization/members",MembersSchema=t.object({members:t.array(t.object({userId:t.string(),email:t.string(),name:t.string(),role:t.string(),limit:t.number().nullable(),used:t.number()}))}),memberLimitPath=e=>`${MEMBERS_PATH}/${encodeURIComponent(e)}/limit`,MemberLimitSchema=t.strictObject({monthly:t.number().nonnegative().nullable()}),ORGANIZATION_PATH="/api/organization",restorePath=e=>`${ORGANIZATIONS_PATH}/${encodeURIComponent(e)}/restore`,STUDIO_PATH="/api/studio",StudioSchema=t.object({studio:t.object({state:t.enum(["running","paused"]),organizationId:t.string()}).nullable(),creditsPerHour:t.number()}),STUDIO_OPEN_PATH="/api/studio/open",STUDIO_WAKE_PATH="/api/studio/wake",StudioWakeSchema=t.strictObject({at:t.iso.datetime().nullable()});
@@ -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-next.4",
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/registry",
3
- "version": "0.2.0-next.4",
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/render",
3
- "version": "0.2.0-next.4",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {