allyhub 0.2.0-next.3 → 0.2.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 (78) hide show
  1. package/dist/commands/add.js +5 -5
  2. package/dist/commands/cloud-tools.js +9 -10
  3. package/dist/commands/index.js +1 -1
  4. package/dist/commands/mcp.js +1 -1
  5. package/dist/commands/orgs.js +2 -2
  6. package/dist/commands/skills.js +4 -0
  7. package/dist/commands/voice.js +2 -2
  8. package/dist/main.js +4 -4
  9. package/dist/resources.js +2 -0
  10. package/dist/works.js +1 -1
  11. package/editor-app/view.html +4 -4
  12. package/editor-web/assets/chevron-left-D1vfOP5S.js +1 -0
  13. package/editor-web/assets/{chevron-up-C-TmFeHp.js → chevron-up-BMNXDEBs.js} +1 -1
  14. package/editor-web/assets/{dist-Cdp4CLOB.js → dist-B4VKfY-H.js} +1 -1
  15. package/editor-web/assets/{dist-49NTUm82.js → dist-BIEloJVS.js} +1 -1
  16. package/editor-web/assets/{dist-DJIfS4Mh.js → dist-BcInw4os.js} +1 -1
  17. package/editor-web/assets/{dist-Cun2C_27.js → dist-Coblfc3T.js} +1 -1
  18. package/editor-web/assets/{floating-ui.react-dom-iFhm-7Xc.js → floating-ui.react-dom-DSyn5TRd.js} +1 -1
  19. package/editor-web/assets/index-BSFR4plz.css +2 -0
  20. package/editor-web/assets/{index-9-pcRXol.js → index-Dc8FX_sp.js} +3 -3
  21. package/editor-web/assets/{react-DAVp_9d7.js → react-Bo429Bov.js} +3 -3
  22. package/editor-web/assets/{undo-2-57uMP9M_.js → undo-2-CWgOKQ3L.js} +1 -1
  23. package/editor-web/index.html +4 -4
  24. package/node_modules/@allyhub-next/audio/package.json +1 -1
  25. package/node_modules/@allyhub-next/browser/package.json +1 -1
  26. package/node_modules/@allyhub-next/build/package.json +1 -1
  27. package/node_modules/@allyhub-next/check/package.json +1 -1
  28. package/node_modules/@allyhub-next/cloud/dist/call.js +2 -2
  29. package/node_modules/@allyhub-next/cloud/dist/client.js +1 -1
  30. package/node_modules/@allyhub-next/cloud/dist/errors.js +1 -1
  31. package/node_modules/@allyhub-next/cloud/dist/index.js +1 -1
  32. package/node_modules/@allyhub-next/cloud/dist/signin.js +2 -2
  33. package/node_modules/@allyhub-next/cloud/dist/voice.js +1 -1
  34. package/node_modules/@allyhub-next/cloud/package.json +1 -1
  35. package/node_modules/@allyhub-next/components/package.json +1 -1
  36. package/node_modules/@allyhub-next/components/r/callout.json +5 -1
  37. package/node_modules/@allyhub-next/components/r/caption-line.json +5 -1
  38. package/node_modules/@allyhub-next/components/r/caption-subtitle.json +5 -1
  39. package/node_modules/@allyhub-next/components/r/caption-word.json +5 -1
  40. package/node_modules/@allyhub-next/components/r/chart.json +5 -1
  41. package/node_modules/@allyhub-next/components/r/code-panel.json +5 -1
  42. package/node_modules/@allyhub-next/components/r/screen-demo.json +5 -1
  43. package/node_modules/@allyhub-next/dev-server/package.json +1 -1
  44. package/node_modules/@allyhub-next/doc/package.json +1 -1
  45. package/node_modules/@allyhub-next/export/package.json +1 -1
  46. package/node_modules/@allyhub-next/formats/package.json +1 -1
  47. package/node_modules/@allyhub-next/measure/package.json +1 -1
  48. package/node_modules/@allyhub-next/media/package.json +1 -1
  49. package/node_modules/@allyhub-next/model/package.json +1 -1
  50. package/node_modules/@allyhub-next/project/package.json +1 -1
  51. package/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +23 -84
  52. package/node_modules/@allyhub-next/protocol/dist/cloud.js +1 -1
  53. package/node_modules/@allyhub-next/protocol/dist/index.d.ts +1 -0
  54. package/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
  55. package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +2 -0
  56. package/node_modules/@allyhub-next/protocol/dist/routes.d.ts +14 -0
  57. package/node_modules/@allyhub-next/protocol/dist/routes.js +2 -0
  58. package/node_modules/@allyhub-next/protocol/dist/teams.d.ts +1 -7
  59. package/node_modules/@allyhub-next/protocol/dist/teams.js +1 -1
  60. package/node_modules/@allyhub-next/protocol/package.json +1 -1
  61. package/node_modules/@allyhub-next/registry/package.json +1 -1
  62. package/node_modules/@allyhub-next/render/package.json +1 -1
  63. package/node_modules/@allyhub-next/runtime/package.json +1 -1
  64. package/node_modules/@allyhub-next/runtimes/package.json +1 -1
  65. package/node_modules/@allyhub-next/scaffold/LICENSE +241 -0
  66. package/node_modules/@allyhub-next/scaffold/dist/index.js +16 -0
  67. package/node_modules/@allyhub-next/scaffold/package.json +13 -0
  68. package/node_modules/@allyhub-next/scenery/package.json +1 -1
  69. package/node_modules/@allyhub-next/scenery-host/package.json +1 -1
  70. package/node_modules/@allyhub-next/sheet/package.json +1 -1
  71. package/node_modules/@allyhub-next/site/package.json +1 -1
  72. package/node_modules/@allyhub-next/stage/package.json +1 -1
  73. package/node_modules/@allyhub-next/video-core/package.json +1 -1
  74. package/package.json +29 -27
  75. package/dist/charge.js +0 -2
  76. package/editor-web/assets/chevron-left-BzSzrFR5.js +0 -1
  77. package/editor-web/assets/index-DRbemuuR.css +0 -2
  78. package/node_modules/@allyhub-next/cloud/dist/price.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export{cloudConfig,hostsText}from"./config.js";export{CloudError,notSignedIn,SIGN_IN}from"./errors.js";export{Cloud,scrub}from"./client.js";export{SignedOut,accessOf,accountOf,authServer,chooseOrganization,forgetCredentials,readCredentials,signInWithCode,signInWithDevice,signOut,writeCredentials}from"./credentials.js";export{SIGN_IN_WAIT_MS,openBrowser,signIn,signInDevice,signInInBackground,signedInAs}from"./signin.js";export{LoopbackError,startLoopback}from"./loopback.js";export{pkcePair,randomState}from"./pkce.js";export{accessToken,billingSummary,organizations}from"./token.js";export{CATALOG_CACHE_SECONDS,findTool,loadCatalog}from"./catalog.js";export{estimatePrice,priceCalls,priceText,withDefaults}from"./price.js";export{POLL_SECONDS,WAIT_SECONDS,callTool,declined,resumeJob}from"./call.js";export{REUSE_LEFT_MS,UPLOAD_CONCURRENCY,UPLOAD_TYPES,uploadFiles,urlExpiry,withKnownUploads}from"./uploads.js";export{BASE64_FROM,LARGE_FROM,canonical,genRecord,inputHash,isSecretName,namedFile,readGen,recordInput,recordOutput,toolWords,withoutSignature,writeGen,writeWords}from"./records.js";export{makeSay,quoteSays,sayInput}from"./voice.js";
2
+ export{cloudConfig,hostsText}from"./config.js";export{CloudError,notSignedIn,SIGN_IN}from"./errors.js";export{Cloud,scrub}from"./client.js";export{SignedOut,accessOf,accountOf,authServer,chooseOrganization,forgetCredentials,readCredentials,signInWithCode,signInWithDevice,signOut,writeCredentials}from"./credentials.js";export{SIGN_IN_WAIT_MS,openBrowser,signIn,signInByEmail,signInDevice,signInInBackground,signedInAs}from"./signin.js";export{LoopbackError,startLoopback}from"./loopback.js";export{pkcePair,randomState}from"./pkce.js";export{accessToken,billingSummary,organizations}from"./token.js";export{CATALOG_CACHE_SECONDS,findTool,loadCatalog}from"./catalog.js";export{POLL_SECONDS,READ_SECONDS,RETRY_SECONDS,WAIT_SECONDS,callTool,resumeJob}from"./call.js";export{REUSE_LEFT_MS,UPLOAD_CONCURRENCY,UPLOAD_TYPES,uploadFiles,urlExpiry,withKnownUploads}from"./uploads.js";export{BASE64_FROM,LARGE_FROM,canonical,genRecord,inputHash,isSecretName,namedFile,readGen,recordInput,recordOutput,toolWords,withoutSignature,writeGen,writeWords}from"./records.js";export{makeSay,sayInput}from"./voice.js";
@@ -1,4 +1,4 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{spawn as g}from"node:child_process";import{mkdtemp as U,open as O,readFile as w,rename as k,rm as d,writeFile as p}from"node:fs/promises";import{tmpdir as v}from"node:os";import{join as a}from"node:path";import{fileURLToPath as N}from"node:url";import{CLIENT_ID as R,EXIT as h,SCOPES as L}from"@allyhub-next/protocol";import{accessOf as P,authServer as W,SignedOut as b,signInWithCode as D,signInWithDevice as C}from"./credentials.js";import{CloudError as y,unreachable as f}from"./errors.js";import{LoopbackError as J,startLoopback as S}from"./loopback.js";import{pkcePair as $,randomState as A}from"./pkce.js";export const SIGN_IN_WAIT_MS=5*6e4;const B=3e4;function I(){return{state:A(),...$()}}async function x(t,e,n){const i=await W(t),r=new URLSearchParams({response_type:"code",client_id:R,redirect_uri:n,scope:L,state:e.state,code_challenge:e.challenge,code_challenge_method:"S256",resource:t.url});return`${i.authorization_endpoint}?${r.toString()}`}export function openBrowser(t,e){if(e.BROWSER==="none")return;const[n,i]=process.platform==="darwin"?["open",[t]]:process.platform==="win32"?["cmd",["/c","start","",t]]:["xdg-open",[t]];try{const r=g(n,i,{stdio:"ignore",detached:!0});r.on("error",()=>{}),r.unref()}catch{}}export async function signedInAs(t){try{return(await P(t.config))?.credentials.account}catch(e){if(e instanceof b)return;throw f(t.url,e)}}const u=t=>new y(t instanceof J?t.code:"sign-in-failed",t instanceof Error?t.message:String(t),{exit:h.auth,hint:"Run allyhub auth login again."});async function _(t,e,n){let i;try{i=await n.result}catch(o){throw u(o)}let r;try{r=(await D(t,{code:i,codeVerifier:e.verifier,redirectUri:n.redirectUri})).account}catch(o){const c=u(o);throw await n.finish(c),c}return await n.finish(),r}const j=t=>`${t.url}/signed-in`;export async function signIn(t,e,n=SIGN_IN_WAIT_MS){const i=I(),r=await S({state:i.state,timeoutMs:n,landing:j(t.config)});try{e(await x(t.config,i,r.redirectUri))}catch(o){throw await r.close(),f(t.url,o)}return _(t.config,i,r)}export async function signInDevice(t,e,n){try{return(await C(t.config,e,n)).account}catch(i){throw u(i)}}const F=N(new URL("./signin-worker.js",import.meta.url));export async function signInInBackground(t,e,n=SIGN_IN_WAIT_MS){const i=I(),r=await U(a(v(),"allyhub-sign-in-"));await p(a(r,"flow.json"),JSON.stringify({flow:i,timeoutMs:n}),{mode:384});const o=await O(a(r,"worker.log"),"w"),c=g(process.execPath,[F,r],{detached:!0,stdio:["ignore","ignore",o.fd],env:{...e}});await o.close();const l={exited:!1};c.once("exit",()=>{l.exited=!0}),c.unref();const E=Date.now()+B;for(;Date.now()<E;)try{const s=JSON.parse(await w(a(r,"ready.json"),"utf8"));return await x(t.config,i,s.redirectUri)}catch(s){if(s instanceof Error&&!("code"in s))throw f(t.url,s);if(l.exited)break;await new Promise(T=>setTimeout(T,50))}const m=(await w(a(r,"worker.log"),"utf8").catch(()=>"")).trim().split(`
2
+ import{spawn as k}from"node:child_process";import{mkdtemp as j,open as E,readFile as u,rename as O,rm as g,writeFile as T}from"node:fs/promises";import{tmpdir as b}from"node:os";import{join as c}from"node:path";import{fileURLToPath as N}from"node:url";import{CLIENT_ID as P,EXIT as m,SCOPES as R}from"@allyhub-next/protocol";import{accessOf as v,authServer as L,SignedOut as $,signInWithCode as D,signInWithDevice as W}from"./credentials.js";import{CloudError as w,unreachable as f}from"./errors.js";import{LoopbackError as J,startLoopback as h}from"./loopback.js";import{pkcePair as A,randomState as B}from"./pkce.js";const C="idp_hint";export const SIGN_IN_WAIT_MS=5*6e4;const F=3e4;function p(){return{state:B(),...A()}}async function y(t,i,o,n={}){const e=await L(t),r=new URLSearchParams({response_type:"code",client_id:P,redirect_uri:o,scope:R,state:i.state,code_challenge:i.challenge,code_challenge_method:"S256",resource:t.url});return n.with!==void 0&&r.set(C,n.with),n.email!==void 0&&r.set("login_hint",n.email),`${e.authorization_endpoint}?${r.toString()}`}export function openBrowser(t,i){if(i.BROWSER==="none")return;const[o,n]=process.platform==="darwin"?["open",[t]]:process.platform==="win32"?["cmd",["/c","start","",t]]:["xdg-open",[t]];try{const e=k(o,n,{stdio:"ignore",detached:!0});e.on("error",()=>{}),e.unref()}catch{}}export async function signedInAs(t){try{return(await v(t.config))?.credentials.account}catch(i){if(i instanceof $)return;throw f(t.url,i)}}const S=t=>new w(t instanceof J?t.code:"sign-in-failed",t instanceof Error?t.message:String(t),{exit:m.auth,hint:"Run allyhub auth login again."});async function I(t,i,o){let n;try{n=await o.result}catch(r){throw S(r)}let e;try{e=(await D(t,{code:n,codeVerifier:i.verifier,redirectUri:o.redirectUri})).account}catch(r){const a=S(r);throw await o.finish(a),a}return await o.finish(),e}const x=t=>`${t.url}/signed-in`;export async function signIn(t,i,o=SIGN_IN_WAIT_MS,n={}){const e=p(),r=await h({state:e.state,timeoutMs:o,landing:x(t.config)});try{i(await y(t.config,e,r.redirectUri,n))}catch(a){throw await r.close(),f(t.url,a)}return I(t.config,e,r)}export async function signInByEmail(t,i,o,n=SIGN_IN_WAIT_MS){const e=t.config,r=p(),a=await h({state:r.state,timeoutMs:n,landing:x(e)});try{const s=await y(e,r,a.redirectUri),d=await e.fetch(`${e.url}/api/auth/sign-in/magic-link`,{method:"POST",headers:{"content-type":"application/json",origin:e.url},body:JSON.stringify({email:i,callbackURL:s})});if(!d.ok)throw new w("sign-in-failed",`AllyHub did not send the link (${String(d.status)}): ${(await d.text()).slice(0,300)}`,{exit:m.auth,status:d.status});await d.body?.cancel()}catch(s){throw await a.close(),s instanceof w?s:f(t.url,s)}return o(),I(e,r,a)}export async function signInDevice(t,i,o){try{return(await W(t.config,i,o)).account}catch(n){throw S(n)}}const M=N(new URL("./signin-worker.js",import.meta.url));export async function signInInBackground(t,i,o=SIGN_IN_WAIT_MS){const n=p(),e=await j(c(b(),"allyhub-sign-in-"));await T(c(e,"flow.json"),JSON.stringify({flow:n,timeoutMs:o}),{mode:384});const r=await E(c(e,"worker.log"),"w"),a=k(process.execPath,[M,e],{detached:!0,stdio:["ignore","ignore",r.fd],env:{...i}});await r.close();const s={exited:!1};a.once("exit",()=>{s.exited=!0}),a.unref();const d=Date.now()+F;for(;Date.now()<d;)try{const l=JSON.parse(await u(c(e,"ready.json"),"utf8"));return await y(t.config,n,l.redirectUri)}catch(l){if(l instanceof Error&&!("code"in l))throw f(t.url,l);if(s.exited)break;await new Promise(U=>setTimeout(U,50))}const _=(await u(c(e,"worker.log"),"utf8").catch(()=>"")).trim().split(`
3
3
  `).slice(-5).join(`
4
- `);throw await d(r,{recursive:!0,force:!0}),new y("sign-in-failed",m?`The sign-in listener did not start: ${m}`:"The sign-in listener did not start.",{exit:h.platform})}export async function serveSignIn(t,e){const{flow:n,timeoutMs:i}=JSON.parse(await w(a(e,"flow.json"),"utf8"));await d(a(e,"flow.json"),{force:!0});const r=await S({state:n.state,timeoutMs:i,landing:j(t)});await p(a(e,"ready.json.tmp"),JSON.stringify({redirectUri:r.redirectUri})),await k(a(e,"ready.json.tmp"),a(e,"ready.json"));try{await _(t,n,r)}finally{await new Promise(o=>setTimeout(o,200)),await d(e,{recursive:!0,force:!0})}}
4
+ `);throw await g(e,{recursive:!0,force:!0}),new w("sign-in-failed",_?`The sign-in listener did not start: ${_}`:"The sign-in listener did not start.",{exit:m.platform})}export async function serveSignIn(t,i){const{flow:o,timeoutMs:n}=JSON.parse(await u(c(i,"flow.json"),"utf8"));await g(c(i,"flow.json"),{force:!0});const e=await h({state:o.state,timeoutMs:n,landing:x(t)});await T(c(i,"ready.json.tmp"),JSON.stringify({redirectUri:e.redirectUri})),await O(c(i,"ready.json.tmp"),c(i,"ready.json"));try{await I(t,o,e)}finally{await new Promise(r=>setTimeout(r,200)),await g(i,{recursive:!0,force:!0})}}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{copyFile as c,mkdir as f,mkdtemp as p,rm as w}from"node:fs/promises";import{tmpdir as v}from"node:os";import{dirname as x,extname as h,join as u}from"node:path";import{genFileFor as k}from"@allyhub-next/formats";import{EXIT as y}from"@allyhub-next/protocol";import{callTool as g}from"./call.js";import{findTool as F}from"./catalog.js";import{CloudError as I}from"./errors.js";import{estimatePrice as b,withDefaults as S}from"./price.js";import{toolWords as T,writeWords as $}from"./records.js";export function sayInput(o){return{...o.params??{},text:o.text,...o.voice===void 0?{}:{voiceId:o.voice}}}const j=o=>Math.round(o*1e6)/1e6;export async function quoteSays(o,a){const i=new Map,m=[];let d=0,t=!1;for(const e of a){let r=i.get(e.tool);r||(r=await F(o,e.tool),i.set(e.tool,r));const n=b(r.price,S(r.input,sayInput(e)));d+=n.credits,t||=n.lines.some(s=>s.unknown&&s.rate>0),m.push({stem:e.stem,credits:n.credits,estimated:n.estimated})}return{says:m,credits:j(d),estimated:m.some(e=>e.estimated),unknown:t,titles:[...i.values()].map(e=>e.title)}}export async function makeSay(o,a,i,m){const d=await p(u(v(),"allyhub-voice-"));try{const t=await g(o,i.tool,sayInput(i),{...m,outDir:d,wait:!0});if("jobId"in t||t.file===void 0)throw new I("no-audio",`${i.tool} returned no audio file.`,{exit:y.platform});const e=T(t.output)??[],r=t.output.durationSeconds,n=typeof r=="number"?r:e.at(-1)?.end??0,s=`${i.stem}${h(t.file).toLowerCase()||".mp3"}`;await f(x(u(a,s)),{recursive:!0}),await c(t.file,u(a,s)),t.gen&&await c(t.gen,u(a,k(s)));const l=await $(u(a,s),e,n>=0?n:void 0);return{file:s,words:l.slice(a.length+1),seconds:n,credits:t.credits??0}}finally{await w(d,{recursive:!0,force:!0})}}
2
+ import{copyFile as c,mkdir as p,mkdtemp as s,rm as w}from"node:fs/promises";import{tmpdir as v}from"node:os";import{dirname as x,extname as g,join as i}from"node:path";import{genFileFor as k}from"@allyhub-next/formats";import{EXIT as F}from"@allyhub-next/protocol";import{callTool as I}from"./call.js";import{CloudError as b}from"./errors.js";import{toolWords as h,writeWords as $}from"./records.js";export function sayInput(t){return{...t.params??{},text:t.text,...t.voice===void 0?{}:{voiceId:t.voice}}}export async function makeSay(t,e,n,f){const d=await s(i(v(),"allyhub-voice-"));try{const o=await I(t,n.tool,sayInput(n),{...f,outDir:d,wait:!0});if("jobId"in o||o.file===void 0)throw new b("no-audio",`${n.tool} returned no audio file.`,{exit:F.platform});const a=h(o.output)??[],u=o.output.durationSeconds,m=typeof u=="number"?u:a.at(-1)?.end??0,r=`${n.stem}${g(o.file).toLowerCase()||".mp3"}`;await p(x(i(e,r)),{recursive:!0}),await c(o.file,i(e,r)),o.gen&&await c(o.gen,i(e,k(r)));const l=await $(i(e,r),a,m>=0?m:void 0);return{file:r,words:l.slice(e.length+1),seconds:m,credits:o.credits??0}}finally{await w(d,{recursive:!0,force:!0})}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/cloud",
3
- "version": "0.2.0-next.3",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/components",
3
- "version": "0.2.0-next.3",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.ts",
@@ -4,8 +4,12 @@
4
4
  "title": "callout",
5
5
  "description": "Marks places on screen, labels them and draws lines between them; a place may be another layer's element, which the mark follows.",
6
6
  "license": "MIT",
7
- "dependencies": ["@allyhub/sdk"],
7
+ "dependencies": [
8
+ "@allyhub/sdk"
9
+ ],
8
10
  "registryDependencies": [],
11
+ "assets": [],
12
+ "bakes": [],
9
13
  "files": [
10
14
  {
11
15
  "path": "src/callout.ts",
@@ -4,8 +4,12 @@
4
4
  "title": "captionLine",
5
5
  "description": "Two to four words a line; an accent box slides to the word being said; stressed words in the accent colour.",
6
6
  "license": "MIT",
7
- "dependencies": ["@allyhub/sdk"],
7
+ "dependencies": [
8
+ "@allyhub/sdk"
9
+ ],
8
10
  "registryDependencies": [],
11
+ "assets": [],
12
+ "bakes": [],
9
13
  "files": [
10
14
  {
11
15
  "path": "src/caption-line.ts",
@@ -4,8 +4,12 @@
4
4
  "title": "captionSubtitle",
5
5
  "description": "Small, quiet sentence-case subtitles with a soft shadow, one or two lines.",
6
6
  "license": "MIT",
7
- "dependencies": ["@allyhub/sdk"],
7
+ "dependencies": [
8
+ "@allyhub/sdk"
9
+ ],
8
10
  "registryDependencies": [],
11
+ "assets": [],
12
+ "bakes": [],
9
13
  "files": [
10
14
  {
11
15
  "path": "src/caption-subtitle.ts",
@@ -4,8 +4,12 @@
4
4
  "title": "captionWord",
5
5
  "description": "One big uppercase word at a time with a thick outline, popping in; stressed words bigger in the accent colour, an emoji above a word.",
6
6
  "license": "MIT",
7
- "dependencies": ["@allyhub/sdk"],
7
+ "dependencies": [
8
+ "@allyhub/sdk"
9
+ ],
8
10
  "registryDependencies": [],
11
+ "assets": [],
12
+ "bakes": [],
9
13
  "files": [
10
14
  {
11
15
  "path": "src/caption-word.ts",
@@ -4,8 +4,12 @@
4
4
  "title": "chart",
5
5
  "description": "Bars, horizontal bars, a line or a ring, with the scale, the label fitting and the draw-on worked out, and one thing made to stand out.",
6
6
  "license": "MIT",
7
- "dependencies": ["@allyhub/sdk"],
7
+ "dependencies": [
8
+ "@allyhub/sdk"
9
+ ],
8
10
  "registryDependencies": [],
11
+ "assets": [],
12
+ "bakes": [],
9
13
  "files": [
10
14
  {
11
15
  "path": "src/chart.ts",
@@ -4,8 +4,12 @@
4
4
  "title": "codePanel",
5
5
  "description": "Code, data or a terminal in a panel: coloured, typed or revealed, with lines and spans highlighted in time.",
6
6
  "license": "MIT",
7
- "dependencies": ["@allyhub/sdk"],
7
+ "dependencies": [
8
+ "@allyhub/sdk"
9
+ ],
8
10
  "registryDependencies": [],
11
+ "assets": [],
12
+ "bakes": [],
9
13
  "files": [
10
14
  {
11
15
  "path": "src/code-panel.ts",
@@ -4,8 +4,12 @@
4
4
  "title": "screenDemo",
5
5
  "description": "A demo played on a screenshot: the camera goes in on what is acted on; a cursor travels and clicks, text is typed into a field, a button is pressed. uiDemo, in the same file, plays it on an interface drawn in code.",
6
6
  "license": "MIT",
7
- "dependencies": ["@allyhub/sdk"],
7
+ "dependencies": [
8
+ "@allyhub/sdk"
9
+ ],
8
10
  "registryDependencies": [],
11
+ "assets": [],
12
+ "bakes": [],
9
13
  "files": [
10
14
  {
11
15
  "path": "src/screen-demo.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/dev-server",
3
- "version": "0.2.0-next.3",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/doc",
3
- "version": "0.2.0-next.3",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/export",
3
- "version": "0.2.0-next.3",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/formats",
3
- "version": "0.2.0-next.3",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/measure",
3
- "version": "0.2.0-next.3",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/media",
3
- "version": "0.2.0-next.3",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/model",
3
- "version": "0.2.0-next.3",
3
+ "version": "0.2.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.3",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -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,40 +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
- /** What a run is charged, in credits: the base plus each part. */
152
- export declare const ToolPriceSchema: z.ZodObject<{
153
- baseCredits: z.ZodNumber;
154
- parts: z.ZodArray<z.ZodObject<{
155
- meter: z.ZodString;
156
- credits: z.ZodNumber;
157
- field: z.ZodOptional<z.ZodString>;
158
- size: z.ZodOptional<z.ZodNumber>;
159
- free: z.ZodOptional<z.ZodNumber>;
160
- tierField: z.ZodOptional<z.ZodString>;
161
- tiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
162
- typical: z.ZodOptional<z.ZodNumber>;
163
- }, z.core.$strip>>;
164
- }, z.core.$strip>;
165
- export type ToolPrice = z.infer<typeof ToolPriceSchema>;
166
154
  export declare const CATALOG_PATH = "/api/catalog";
167
155
  export declare const CatalogWorkSchema: z.ZodObject<{
168
156
  id: z.ZodString;
@@ -177,19 +165,6 @@ export declare const CatalogToolSchema: z.ZodObject<{
177
165
  description: z.ZodString;
178
166
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
179
167
  output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
180
- price: z.ZodObject<{
181
- baseCredits: z.ZodNumber;
182
- parts: z.ZodArray<z.ZodObject<{
183
- meter: z.ZodString;
184
- credits: z.ZodNumber;
185
- field: z.ZodOptional<z.ZodString>;
186
- size: z.ZodOptional<z.ZodNumber>;
187
- free: z.ZodOptional<z.ZodNumber>;
188
- tierField: z.ZodOptional<z.ZodString>;
189
- tiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
190
- typical: z.ZodOptional<z.ZodNumber>;
191
- }, z.core.$strip>>;
192
- }, z.core.$strip>;
193
168
  long: z.ZodBoolean;
194
169
  }, z.core.$strip>;
195
170
  export type CatalogTool = z.infer<typeof CatalogToolSchema>;
@@ -207,46 +182,10 @@ export declare const CatalogSchema: z.ZodObject<{
207
182
  description: z.ZodString;
208
183
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
209
184
  output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
210
- price: z.ZodObject<{
211
- baseCredits: z.ZodNumber;
212
- parts: z.ZodArray<z.ZodObject<{
213
- meter: z.ZodString;
214
- credits: z.ZodNumber;
215
- field: z.ZodOptional<z.ZodString>;
216
- size: z.ZodOptional<z.ZodNumber>;
217
- free: z.ZodOptional<z.ZodNumber>;
218
- tierField: z.ZodOptional<z.ZodString>;
219
- tiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
220
- typical: z.ZodOptional<z.ZodNumber>;
221
- }, z.core.$strip>>;
222
- }, z.core.$strip>;
223
185
  long: z.ZodBoolean;
224
186
  }, z.core.$strip>>;
225
187
  }, z.core.$strip>;
226
188
  export type Catalog = z.infer<typeof CatalogSchema>;
227
- /**
228
- * A call that spends credits, as the person is asked to allow it before
229
- * it is made: in MCP's elicitation (`elicitation/create`, a form with no
230
- * fields), under this key of its `_meta`, so a client says the price in
231
- * its own words; the elicitation's message says the same in English.
232
- */
233
- export declare const CHARGE_META = "allyhub.com/charge";
234
- /**
235
- * Where AllyHub's command line asks the person when an agent runs it in
236
- * Studio's shell: Studio's Host names an address in each agent's
237
- * environment, and the CLI posts `{ cwd, params }` to it (`params` the
238
- * elicitation's, as an MCP server sends them) and is answered with MCP's
239
- * elicitation result, or an error saying why no one could be asked.
240
- */
241
- export declare const STUDIO_ASK_ENV = "ALLYHUB_STUDIO_ASK";
242
- export declare const ChargeSchema: z.ZodObject<{
243
- tool: z.ZodString;
244
- title: z.ZodString;
245
- credits: z.ZodNumber;
246
- estimated: z.ZodBoolean;
247
- unknown: z.ZodBoolean;
248
- }, z.core.$strip>;
249
- export type Charge = z.infer<typeof ChargeSchema>;
250
189
  /** Where a tool's calls are made (POST). */
251
190
  export declare const toolCallsPath: (tool: string) => string;
252
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()}),ToolPriceSchema=t.object({baseCredits:t.number().nonnegative(),parts:t.array(ToolPricePartSchema)}),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}`;
@@ -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";
@@ -124,6 +124,8 @@ export declare const RegistryItemSchema: z.ZodObject<{
124
124
  }, z.core.$strict>>;
125
125
  }, z.core.$strict>;
126
126
  export type RegistryItem = z.infer<typeof RegistryItemSchema>;
127
+ /** An item as its file is written: what the schema fills in (`assets`, `bakes`) may be left out. */
128
+ export type RegistryItemInput = z.input<typeof RegistryItemSchema>;
127
129
  export declare const RegistryIndexSchema: z.ZodObject<{
128
130
  $schema: z.ZodOptional<z.ZodString>;
129
131
  name: z.ZodString;
@@ -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_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)}.`}
@@ -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()});
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/protocol",
3
- "version": "0.2.0-next.3",
3
+ "version": "0.2.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.3",
3
+ "version": "0.2.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.3",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/runtime",
3
- "version": "0.2.0-next.3",
3
+ "version": "0.2.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-next.3",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {