allyhub 0.2.0-next.4 → 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.
- package/dist/commands/cloud-tools.js +9 -10
- package/dist/commands/mcp.js +1 -1
- package/dist/commands/orgs.js +2 -2
- package/dist/commands/voice.js +2 -2
- package/dist/main.js +4 -4
- package/editor-app/view.html +4 -4
- package/editor-web/assets/chevron-left-D1vfOP5S.js +1 -0
- package/editor-web/assets/{chevron-up-B2IfPYC4.js → chevron-up-BMNXDEBs.js} +1 -1
- package/editor-web/assets/{dist-VsUk3S-a.js → dist-B4VKfY-H.js} +1 -1
- package/editor-web/assets/{dist-CuyNR3bn.js → dist-BIEloJVS.js} +1 -1
- package/editor-web/assets/{dist-DCgVauDD.js → dist-BcInw4os.js} +1 -1
- package/editor-web/assets/{dist-ChU-0IAY.js → dist-Coblfc3T.js} +1 -1
- package/editor-web/assets/{floating-ui.react-dom-C6Aeuo3L.js → floating-ui.react-dom-DSyn5TRd.js} +1 -1
- package/editor-web/assets/index-BSFR4plz.css +2 -0
- package/editor-web/assets/{index-BoYpZLq7.js → index-Dc8FX_sp.js} +3 -3
- package/editor-web/assets/{react-CSPssXRH.js → react-Bo429Bov.js} +3 -3
- package/editor-web/assets/{undo-2-D6qCS-P0.js → undo-2-CWgOKQ3L.js} +1 -1
- package/editor-web/index.html +4 -4
- package/node_modules/@allyhub-next/audio/package.json +1 -1
- package/node_modules/@allyhub-next/browser/package.json +1 -1
- package/node_modules/@allyhub-next/build/package.json +1 -1
- package/node_modules/@allyhub-next/check/package.json +1 -1
- package/node_modules/@allyhub-next/cloud/dist/call.js +2 -2
- package/node_modules/@allyhub-next/cloud/dist/index.js +1 -1
- package/node_modules/@allyhub-next/cloud/dist/signin.js +2 -2
- package/node_modules/@allyhub-next/cloud/dist/voice.js +1 -1
- package/node_modules/@allyhub-next/cloud/package.json +1 -1
- package/node_modules/@allyhub-next/components/package.json +1 -1
- package/node_modules/@allyhub-next/components/r/callout.json +5 -1
- package/node_modules/@allyhub-next/components/r/caption-line.json +5 -1
- package/node_modules/@allyhub-next/components/r/caption-subtitle.json +5 -1
- package/node_modules/@allyhub-next/components/r/caption-word.json +5 -1
- package/node_modules/@allyhub-next/components/r/chart.json +5 -1
- package/node_modules/@allyhub-next/components/r/code-panel.json +5 -1
- package/node_modules/@allyhub-next/components/r/screen-demo.json +5 -1
- package/node_modules/@allyhub-next/dev-server/package.json +1 -1
- package/node_modules/@allyhub-next/doc/package.json +1 -1
- package/node_modules/@allyhub-next/export/package.json +1 -1
- package/node_modules/@allyhub-next/formats/package.json +1 -1
- package/node_modules/@allyhub-next/measure/package.json +1 -1
- package/node_modules/@allyhub-next/media/package.json +1 -1
- package/node_modules/@allyhub-next/model/package.json +1 -1
- package/node_modules/@allyhub-next/project/package.json +1 -1
- package/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +23 -168
- package/node_modules/@allyhub-next/protocol/dist/cloud.js +1 -1
- package/node_modules/@allyhub-next/protocol/dist/index.d.ts +1 -0
- package/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
- package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +2 -0
- package/node_modules/@allyhub-next/protocol/dist/routes.d.ts +14 -0
- package/node_modules/@allyhub-next/protocol/dist/routes.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/teams.d.ts +1 -7
- package/node_modules/@allyhub-next/protocol/dist/teams.js +1 -1
- package/node_modules/@allyhub-next/protocol/package.json +1 -1
- package/node_modules/@allyhub-next/registry/package.json +1 -1
- package/node_modules/@allyhub-next/render/package.json +1 -1
- package/node_modules/@allyhub-next/runtime/package.json +1 -1
- package/node_modules/@allyhub-next/runtimes/package.json +1 -1
- package/node_modules/@allyhub-next/scaffold/package.json +1 -1
- package/node_modules/@allyhub-next/scenery/package.json +1 -1
- package/node_modules/@allyhub-next/scenery-host/package.json +1 -1
- package/node_modules/@allyhub-next/sheet/package.json +1 -1
- package/node_modules/@allyhub-next/site/package.json +1 -1
- package/node_modules/@allyhub-next/stage/package.json +1 -1
- package/node_modules/@allyhub-next/video-core/package.json +1 -1
- package/package.json +28 -28
- package/dist/charge.js +0 -2
- package/editor-web/assets/chevron-left-B1KTa28S.js +0 -1
- package/editor-web/assets/index-DRbemuuR.css +0 -2
- package/node_modules/@allyhub-next/cloud/dist/price.js +0 -2
|
@@ -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
|
|
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
|
|
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
|
|
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})}}
|
|
@@ -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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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",
|
|
@@ -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.
|
|
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.
|
|
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}`;
|
|
@@ -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,
|
|
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(),
|
|
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()});
|