@allyhub/sdk 0.15.3 → 0.17.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/CHANGELOG.md +17 -0
- package/dist/node_modules/@allyhub/audio/dist/index.d.ts +1 -0
- package/dist/node_modules/@allyhub/audio/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/audio/dist/place.d.ts +26 -0
- package/dist/node_modules/@allyhub/audio/dist/place.js +2 -0
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +15 -3
- package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/items.d.ts +70 -11
- package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +15 -4
- package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +4 -0
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/dist/stage.js +1 -1
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +15 -0
- package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +1 -0
- package/dist/node_modules/@allyhub/piece/dist/page/index.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/page/runtimes.d.ts +9 -0
- package/dist/node_modules/@allyhub/piece/dist/page/runtimes.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/source.d.ts +53 -10
- package/dist/node_modules/@allyhub/piece/dist/source.js +1 -1
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +10 -11
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +7 -0
- package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/blobs.d.ts +9 -0
- package/dist/node_modules/@allyhub/protocol/dist/blobs.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.d.ts +77 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +39 -9
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +15 -15
- package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +441 -5
- package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -2
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +4 -1
- package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +8 -0
- package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +5 -5
- package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +45 -0
- package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/paywall.d.ts +134 -0
- package/dist/node_modules/@allyhub/protocol/dist/paywall.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/place.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +3 -3
- package/dist/node_modules/@allyhub/protocol/dist/purposes.d.ts +47 -0
- package/dist/node_modules/@allyhub/protocol/dist/purposes.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +52 -5
- package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.d.ts +34 -0
- package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/sites.d.ts +1 -0
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +21 -52
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/studio-server.d.ts +264 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-server.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.d.ts +18 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.d.ts +97 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +3 -2
- package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +26 -20
- package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/turns.d.ts +71 -0
- package/dist/node_modules/@allyhub/protocol/dist/turns.js +2 -0
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/coerce.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/engine.d.ts +12 -0
- package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/dynamic.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/logical.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.d.ts +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +10 -0
- package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/api.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/components.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +3 -1
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +5 -0
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/dist/free.d.ts +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/docs/batches.md +4 -4
- package/docs/contract.md +5 -5
- package/docs/defaults.md +2 -2
- package/docs/docs.md +16 -5
- package/docs/footage.md +8 -8
- package/docs/image.md +5 -5
- package/docs/layers.md +12 -10
- package/docs/linkedin.md +1 -1
- package/docs/modeling.md +3 -3
- package/docs/pictures.md +4 -4
- package/docs/project.md +11 -7
- package/docs/scenery.md +3 -3
- package/docs/sheets.md +5 -5
- package/docs/slides.md +3 -3
- package/docs/sound.md +7 -7
- package/docs/speech.md +7 -7
- package/docs/video.md +3 -3
- package/docs/websites.md +3 -3
- package/docs/x.md +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import type { CheckoutWhat } from "./events.js";
|
|
2
3
|
/** The environment variable that signs in with an API key instead: automation (CI, servers). */
|
|
3
4
|
export declare const API_KEY_ENV = "ALLYHUB_API_KEY";
|
|
4
5
|
/** `GET`: the organization's credits, its plan and its auto top-up. */
|
|
@@ -76,6 +77,7 @@ export declare const BillingPlansSchema: z.ZodObject<{
|
|
|
76
77
|
family: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
77
78
|
recommended: z.ZodDefault<z.ZodBoolean>;
|
|
78
79
|
monthlyCredits: z.ZodNumber;
|
|
80
|
+
storageBytes: z.ZodOptional<z.ZodNumber>;
|
|
79
81
|
prices: z.ZodArray<z.ZodObject<{
|
|
80
82
|
interval: z.ZodUnion<readonly [z.ZodEnum<{
|
|
81
83
|
month: "month";
|
|
@@ -93,6 +95,7 @@ export declare const BillingPlansSchema: z.ZodObject<{
|
|
|
93
95
|
presetsCents: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
94
96
|
}, z.core.$strip>;
|
|
95
97
|
welcomeCredits: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
freeStorageBytes: z.ZodOptional<z.ZodNumber>;
|
|
96
99
|
}, z.core.$strip>;
|
|
97
100
|
export type BillingPlans = z.infer<typeof BillingPlansSchema>;
|
|
98
101
|
/** `GET ?days=30&timeZone=Asia/Shanghai`: credits spent each day, the days with none left out. */
|
|
@@ -118,10 +121,10 @@ export declare const BillingSpendsSchema: z.ZodObject<{
|
|
|
118
121
|
spends: z.ZodArray<z.ZodObject<{
|
|
119
122
|
at: z.ZodString;
|
|
120
123
|
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
124
|
+
other: "other";
|
|
121
125
|
models: "models";
|
|
122
126
|
tools: "tools";
|
|
123
127
|
studio: "studio";
|
|
124
|
-
other: "other";
|
|
125
128
|
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
126
129
|
what: z.ZodNullable<z.ZodString>;
|
|
127
130
|
seconds: z.ZodNullable<z.ZodNumber>;
|
|
@@ -150,8 +153,8 @@ export declare const CheckoutRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
150
153
|
export declare const BILLING_PORTAL_PATH = "/api/billing/portal";
|
|
151
154
|
export declare const PortalRequestSchema: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
152
155
|
flow: z.ZodEnum<{
|
|
153
|
-
home: "home";
|
|
154
156
|
payment_method: "payment_method";
|
|
157
|
+
home: "home";
|
|
155
158
|
cancel: "cancel";
|
|
156
159
|
}>;
|
|
157
160
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -185,8 +188,8 @@ export declare const BillingInvoicesSchema: z.ZodObject<{
|
|
|
185
188
|
number: z.ZodNullable<z.ZodString>;
|
|
186
189
|
createdAt: z.ZodString;
|
|
187
190
|
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
188
|
-
credits: "credits";
|
|
189
191
|
plan: "plan";
|
|
192
|
+
credits: "credits";
|
|
190
193
|
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
191
194
|
totalCents: z.ZodNumber;
|
|
192
195
|
currency: z.ZodString;
|
|
@@ -251,9 +254,19 @@ export declare const TEAM_PARAM = "team";
|
|
|
251
254
|
export declare const PLAN_VIEW_PARAM = "view";
|
|
252
255
|
/** Back from paying, in the plan page's address (`?paid=1`): the page follows the balance until what was paid for is there. */
|
|
253
256
|
export declare const PAID_PARAM = "paid";
|
|
257
|
+
/**
|
|
258
|
+
* Back from Stripe's Checkout without paying (its `cancel_url`), in the
|
|
259
|
+
* plan page's address (`?unpaid=plan`): what the person went to pay for
|
|
260
|
+
* (`CHECKOUT_WHATS`). The page asks them what stopped them.
|
|
261
|
+
*/
|
|
262
|
+
export declare const UNPAID_PARAM = "unpaid";
|
|
254
263
|
/** What the plan page opens at: its plans, credits to buy, or back from paying. */
|
|
255
264
|
export declare const PLAN_PAGE_OPENS: readonly ["plans", "credits", "paid"];
|
|
256
265
|
export type PlanPageOpen = (typeof PLAN_PAGE_OPENS)[number];
|
|
266
|
+
/** Where Stripe's Checkout sends a person back to: paid, or back without paying from Checkout for this. */
|
|
267
|
+
export type PlanPageReturn = "paid" | {
|
|
268
|
+
unpaid: CheckoutWhat;
|
|
269
|
+
};
|
|
257
270
|
/**
|
|
258
271
|
* The plan page's address on a site (its origin), in the team it acts in
|
|
259
272
|
* and at what it opens. Everything that sends a person to the plan page
|
|
@@ -263,7 +276,7 @@ export type PlanPageOpen = (typeof PLAN_PAGE_OPENS)[number];
|
|
|
263
276
|
export declare function planPageAddress(origin: string, o?: {
|
|
264
277
|
/** The team it acts in, by the organization's id. */
|
|
265
278
|
organization?: string | undefined;
|
|
266
|
-
open?: PlanPageOpen | undefined;
|
|
279
|
+
open?: PlanPageOpen | PlanPageReturn | undefined;
|
|
267
280
|
}): string;
|
|
268
281
|
/** The models the organization may use. */
|
|
269
282
|
export declare const LLM_MODELS_PATH = "/api/llm/models";
|
|
@@ -285,6 +298,21 @@ export declare const ReasoningOptionSchema: z.ZodObject<{
|
|
|
285
298
|
max: z.ZodOptional<z.ZodNumber>;
|
|
286
299
|
}, z.core.$strip>;
|
|
287
300
|
export type ReasoningOption = z.infer<typeof ReasoningOptionSchema>;
|
|
301
|
+
/**
|
|
302
|
+
* Auto's id in the catalog: the model a person is on until they choose one.
|
|
303
|
+
* It runs on a model the server picks (and may change), at that model's
|
|
304
|
+
* prices; the catalog lists it with that model's limits and no tier or maker,
|
|
305
|
+
* and a client names it in its own words.
|
|
306
|
+
*/
|
|
307
|
+
export declare const AUTO_MODEL = "auto";
|
|
308
|
+
/**
|
|
309
|
+
* A model's family: its id without its version, so "gpt-6.1-sol" and
|
|
310
|
+
* "gpt-6.2-sol" are both "gpt-sol" and "claude-opus-5-5" is "claude-opus"
|
|
311
|
+
* (a prefix stays: "allyhub/gpt-6.1-sol" is "allyhub/gpt-sol"). Studio
|
|
312
|
+
* moves a person on a model it no longer offers (one `retired`) to the one
|
|
313
|
+
* it offers in the same family; the server calls only the model asked for.
|
|
314
|
+
*/
|
|
315
|
+
export declare const familyOf: (id: string) => string;
|
|
288
316
|
export declare const ModelCatalogSchema: z.ZodObject<{
|
|
289
317
|
models: z.ZodArray<z.ZodObject<{
|
|
290
318
|
reasoning: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -303,6 +331,7 @@ export declare const ModelCatalogSchema: z.ZodObject<{
|
|
|
303
331
|
efficient: "efficient";
|
|
304
332
|
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>>;
|
|
305
333
|
maker: z.ZodOptional<z.ZodString>;
|
|
334
|
+
retired: z.ZodOptional<z.ZodBoolean>;
|
|
306
335
|
id: z.ZodString;
|
|
307
336
|
name: z.ZodString;
|
|
308
337
|
}, z.core.$loose>>;
|
|
@@ -314,6 +343,7 @@ export declare const ModelCatalogSchema: z.ZodObject<{
|
|
|
314
343
|
efficient: "efficient";
|
|
315
344
|
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>>;
|
|
316
345
|
maker: z.ZodOptional<z.ZodString>;
|
|
346
|
+
retired: z.ZodOptional<z.ZodBoolean>;
|
|
317
347
|
id: z.ZodString;
|
|
318
348
|
name: z.ZodString;
|
|
319
349
|
}, z.core.$loose>>>;
|
|
@@ -351,16 +381,16 @@ export declare const CatalogToolSchema: z.ZodObject<{
|
|
|
351
381
|
price: z.ZodOptional<z.ZodObject<{
|
|
352
382
|
credits: z.ZodNumber;
|
|
353
383
|
per: z.ZodUnion<readonly [z.ZodEnum<{
|
|
354
|
-
|
|
384
|
+
question: "question";
|
|
355
385
|
result: "result";
|
|
356
386
|
page: "page";
|
|
387
|
+
call: "call";
|
|
357
388
|
second: "second";
|
|
358
389
|
minute: "minute";
|
|
359
390
|
thousand_characters: "thousand_characters";
|
|
360
391
|
image: "image";
|
|
361
392
|
frame: "frame";
|
|
362
393
|
megapixel: "megapixel";
|
|
363
|
-
question: "question";
|
|
364
394
|
phrase: "phrase";
|
|
365
395
|
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
366
396
|
varies: z.ZodBoolean;
|
|
@@ -401,16 +431,16 @@ export declare const CatalogSchema: z.ZodObject<{
|
|
|
401
431
|
price: z.ZodOptional<z.ZodObject<{
|
|
402
432
|
credits: z.ZodNumber;
|
|
403
433
|
per: z.ZodUnion<readonly [z.ZodEnum<{
|
|
404
|
-
|
|
434
|
+
question: "question";
|
|
405
435
|
result: "result";
|
|
406
436
|
page: "page";
|
|
437
|
+
call: "call";
|
|
407
438
|
second: "second";
|
|
408
439
|
minute: "minute";
|
|
409
440
|
thousand_characters: "thousand_characters";
|
|
410
441
|
image: "image";
|
|
411
442
|
frame: "frame";
|
|
412
443
|
megapixel: "megapixel";
|
|
413
|
-
question: "question";
|
|
414
444
|
phrase: "phrase";
|
|
415
445
|
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
416
446
|
varies: z.ZodBoolean;
|
|
@@ -491,9 +521,9 @@ export declare const ToolCallSchema: z.ZodObject<{
|
|
|
491
521
|
id: z.ZodString;
|
|
492
522
|
tool: z.ZodString;
|
|
493
523
|
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
524
|
+
failed: "failed";
|
|
494
525
|
working: "working";
|
|
495
526
|
completed: "completed";
|
|
496
|
-
failed: "failed";
|
|
497
527
|
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
498
528
|
output: z.ZodOptional<z.ZodUnknown>;
|
|
499
529
|
error: z.ZodOptional<z.ZodObject<{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as t}from"zod";import{openEnum as o,readable as
|
|
2
|
+
import{z as t}from"zod";import{openEnum as o,readable as c}from"./open.js";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","monthly_limit"],BILLING_INTERVALS=["month","year"],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:o(BILLING_INTERVALS),status:t.string(),renewsAt:t.iso.datetime().nullable(),endsAt:t.iso.datetime().nullable(),monthlyCredits:t.number().default(0),price:t.object({amountCents:t.number(),currency:t.string()}).nullable().default(null)}).nullable(),allowance:t.object({total:t.number(),used:t.number(),renewsAt:t.iso.datetime()}).nullable().default(null),bought:t.number().default(0),expiring:t.array(t.object({credits:t.number(),expiresAt:t.iso.datetime()})).default([]),customer:t.boolean().default(!1),autoTopUp:t.object({below:t.number(),amountCents:t.number(),monthlyLimitCents:t.number().nullable().default(null),chargedThisMonthCents:t.number().default(0),stopped:o(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(),family:t.string().nullable().default(null),recommended:t.boolean().default(!1),monthlyCredits:t.number(),storageBytes:t.number().optional(),prices:t.array(t.object({interval:o(BILLING_INTERVALS),amountCents:t.number(),currency:t.string()}))})),topUp:t.object({currency:t.string(),creditsPerDollar:t.number(),minCents:t.number(),maxCents:t.number(),presetsCents:t.array(t.number()).default([])}),welcomeCredits:t.number().optional(),freeStorageBytes:t.number().optional()}),BILLING_USAGE_PATH="/api/billing/usage",SPEND_KINDS=["models","tools","studio","other"],BillingUsageSchema=t.object({days:t.array(t.object({day:t.iso.date(),credits:t.number(),byKind:t.record(t.string(),t.number()).default({})}))}),BILLING_SPENDS_PATH="/api/billing/spends",BillingSpendsSchema=t.object({spends:t.array(t.object({at:t.string(),kind:o(SPEND_KINDS),what:t.string().nullable(),seconds:t.number().nullable(),member:t.string().nullable(),credits:t.number()})),more:t.boolean()}),BILLING_CHECKOUT_PATH="/api/billing/checkout",CheckoutRequestSchema=t.union([t.strictObject({plan:t.string(),interval:t.enum(BILLING_INTERVALS)}),t.strictObject({topUpCents:t.number().int()})]),BILLING_PORTAL_PATH="/api/billing/portal",PortalRequestSchema=t.union([t.strictObject({flow:t.enum(["home","payment_method","cancel"])}),t.strictObject({flow:t.literal("change_plan"),plan:t.string(),interval:t.enum(BILLING_INTERVALS)})]).default({flow:"home"}),BILLING_RESUME_PATH="/api/billing/resume",BILLING_PAYMENT_PATH="/api/billing/payment",BillingPaymentSchema=t.object({card:t.object({brand:t.string(),last4:t.string(),expMonth:t.number(),expYear:t.number()}).nullable(),email:t.string().nullable()}),BILLING_INVOICES_PATH="/api/billing/invoices",BillingInvoicesSchema=t.object({invoices:t.array(t.object({id:t.string(),number:t.string().nullable(),createdAt:t.string(),kind:o(["plan","credits"]),totalCents:t.number(),currency:t.string(),status:t.string(),pdf:t.string().nullable(),url:t.string().nullable()}))}),BILLING_TOP_UP_PATH="/api/billing/top-up",TopUpRequestSchema=t.strictObject({topUpCents:t.number().int()}),IDEMPOTENCY_KEY_HEADER="idempotency-key",BILLING_REQUEST_PATH="/api/billing/request",AUTO_TOP_UP_PATH="/api/billing/auto-top-up",AutoTopUpRequestSchema=t.strictObject({below:t.number().nonnegative(),amountCents:t.number().int().positive(),monthlyLimitCents:t.number().int().positive().nullable().optional(),newCard:t.boolean().optional()}),BILLING_REFUSALS=["top_up_amount","monthly_limit","has_plan","no_plan","no_such_plan","not_customer","no_card","frozen","not_charged","asked_today","too_many_charges"],BILLING_PAGE_PATH="/settings/plan",TEAM_PARAM="team",PLAN_VIEW_PARAM="view",PAID_PARAM="paid",UNPAID_PARAM="unpaid",PLAN_PAGE_OPENS=["plans","credits","paid"];export function planPageAddress(e,n={}){const i=new URLSearchParams;typeof n.open=="object"?i.set(UNPAID_PARAM,n.open.unpaid):n.open==="paid"?i.set(PAID_PARAM,"1"):n.open!==void 0&&i.set(PLAN_VIEW_PARAM,n.open),n.organization!==void 0&&i.set(TEAM_PARAM,n.organization);const r=i.toString();return`${e}${BILLING_PAGE_PATH}${r===""?"":`?${r}`}`}export const LLM_MODELS_PATH="/api/llm/models",LLM_MESSAGES_PATH="/api/llm/v1/messages",MODEL_TIERS=["premium","standard","efficient"];const l={tier:o(MODEL_TIERS).optional(),maker:t.string().min(1).optional(),retired:t.boolean().optional()};export const REASONING_OPTION_TYPES=["toggle","effort","budget_tokens"],ReasoningOptionSchema=t.object({type:o(REASONING_OPTION_TYPES),values:t.array(t.string().min(1)).optional(),min:t.number().int().nonnegative().optional(),max:t.number().int().positive().optional()}),AUTO_MODEL="auto",familyOf=e=>e.split("-").filter(n=>!/^\d+(\.\d+)*$/u.test(n)).join("-"),ModelCatalogSchema=t.object({models:t.array(t.looseObject({id:t.string().min(1),name:t.string().min(1),...l,reasoning:t.boolean().optional(),reasoningOptions:c(ReasoningOptionSchema).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),...l})).default([])}),JsonSchemaSchema=t.record(t.string(),t.unknown()),CATALOG_PATH="/api/catalog",PRICE_UNITS=["call","result","page","second","minute","thousand_characters","image","frame","megapixel","question","phrase"],TOOL_SECTIONS=["video","image","voice","music"],WORK_KINDS=["data","ai"],CatalogWorkSchema=t.object({id:t.string().min(1),title:t.string().min(1),description:t.string().min(1),kind:o(WORK_KINDS).default("data"),line:t.string().optional()}),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(),example:t.record(t.string(),t.unknown()).optional(),price:t.object({credits:t.number().nonnegative(),per:o(PRICE_UNITS),varies:t.boolean()}).optional(),shown:t.object({name:t.string(),line:t.string(),section:o(TOOL_SECTIONS)}).optional()}),CatalogSchema=t.object({version:t.string().min(1),works:t.array(CatalogWorkSchema),tools:t.array(CatalogToolSchema)}),CAPABILITIES_PATH="/api/capabilities",CapabilitiesSchema=t.object({off:t.object({works:t.array(t.string()),tools:t.array(t.string())})}),CapabilityRequestSchema=t.union([t.strictObject({work:t.string().min(1),on:t.boolean()}),t.strictObject({tool:t.string().min(1),on:t.boolean()})]),EDITORS_PATH="/api/editors",EditorsSchema=t.object({editors:t.array(t.object({id:t.string().min(1),name:t.record(t.string(),t.string()),plural:t.record(t.string(),t.string()).optional(),line:t.record(t.string(),t.string()),icon:t.string().optional(),color:t.string().optional()}))}),toolCallsPath=e=>`/api/tools/${encodeURIComponent(e)}/calls`,IDEMPOTENCY_KEY_MAX=255,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:o(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 a="ally://data-tool-results/";export const allyFilePath=(e,n)=>`${a}${encodeURIComponent(e)}/${encodeURIComponent(n)}`;export function parseAllyFilePath(e){if(!e.startsWith(a))return;const[n,i,...r]=e.slice(a.length).split("/");if(!(!n||!i||r.length>0))try{return{id:decodeURIComponent(n),name:decodeURIComponent(i)}}catch(s){if(s instanceof URIError)return;throw s}}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}`;
|
|
@@ -79,10 +79,10 @@ export declare const EDITOR_STATES: readonly ["saved", "saving", "unsaved", "err
|
|
|
79
79
|
export declare const EXPORT_BUTTON_STATES: readonly ["idle", "queued", "running", "done", "failed"];
|
|
80
80
|
export declare const ExportStateSchema: z.ZodObject<{
|
|
81
81
|
at: z.ZodEnum<{
|
|
82
|
+
done: "done";
|
|
82
83
|
failed: "failed";
|
|
83
84
|
queued: "queued";
|
|
84
85
|
running: "running";
|
|
85
|
-
done: "done";
|
|
86
86
|
idle: "idle";
|
|
87
87
|
}>;
|
|
88
88
|
percent: z.ZodOptional<z.ZodNumber>;
|
|
@@ -168,10 +168,10 @@ export declare const HOST_METHODS: {
|
|
|
168
168
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
169
169
|
readonly "export/state": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
170
170
|
at: z.ZodEnum<{
|
|
171
|
+
done: "done";
|
|
171
172
|
failed: "failed";
|
|
172
173
|
queued: "queued";
|
|
173
174
|
running: "running";
|
|
174
|
-
done: "done";
|
|
175
175
|
idle: "idle";
|
|
176
176
|
}>;
|
|
177
177
|
percent: z.ZodOptional<z.ZodNumber>;
|
|
@@ -235,8 +235,8 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
235
235
|
}, z.core.$strict>>;
|
|
236
236
|
id: z.ZodString;
|
|
237
237
|
kind: z.ZodEnum<{
|
|
238
|
-
person: "person";
|
|
239
238
|
agent: "agent";
|
|
239
|
+
person: "person";
|
|
240
240
|
}>;
|
|
241
241
|
name: z.ZodString;
|
|
242
242
|
at: z.ZodNumber;
|
|
@@ -251,10 +251,10 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
251
251
|
}, z.core.$strict>>;
|
|
252
252
|
readonly "check/changed": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
253
253
|
status: z.ZodEnum<{
|
|
254
|
-
|
|
254
|
+
done: "done";
|
|
255
255
|
failed: "failed";
|
|
256
|
+
off: "off";
|
|
256
257
|
running: "running";
|
|
257
|
-
done: "done";
|
|
258
258
|
waiting: "waiting";
|
|
259
259
|
}>;
|
|
260
260
|
revision: z.ZodInt;
|
|
@@ -288,11 +288,11 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
288
288
|
types: z.ZodArray<z.ZodString>;
|
|
289
289
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
290
290
|
state: z.ZodEnum<{
|
|
291
|
+
done: "done";
|
|
291
292
|
failed: "failed";
|
|
293
|
+
cancelled: "cancelled";
|
|
292
294
|
queued: "queued";
|
|
293
295
|
running: "running";
|
|
294
|
-
done: "done";
|
|
295
|
-
cancelled: "cancelled";
|
|
296
296
|
}>;
|
|
297
297
|
progress: z.ZodNumber;
|
|
298
298
|
files: z.ZodArray<z.ZodString>;
|
|
@@ -303,9 +303,9 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
303
303
|
jobs: z.ZodArray<z.ZodObject<{
|
|
304
304
|
file: z.ZodString;
|
|
305
305
|
status: z.ZodEnum<{
|
|
306
|
+
done: "done";
|
|
306
307
|
failed: "failed";
|
|
307
308
|
running: "running";
|
|
308
|
-
done: "done";
|
|
309
309
|
}>;
|
|
310
310
|
message: z.ZodString;
|
|
311
311
|
share: z.ZodOptional<z.ZodNumber>;
|
|
@@ -316,8 +316,8 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
316
316
|
id: z.ZodString;
|
|
317
317
|
about: z.ZodObject<{
|
|
318
318
|
kind: z.ZodEnum<{
|
|
319
|
-
studio: "studio";
|
|
320
319
|
agent: "agent";
|
|
320
|
+
studio: "studio";
|
|
321
321
|
project: "project";
|
|
322
322
|
piece: "piece";
|
|
323
323
|
plugin: "plugin";
|
|
@@ -337,12 +337,12 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
337
337
|
}>;
|
|
338
338
|
name: z.ZodOptional<z.ZodString>;
|
|
339
339
|
state: z.ZodEnum<{
|
|
340
|
+
done: "done";
|
|
340
341
|
failed: "failed";
|
|
342
|
+
cancelled: "cancelled";
|
|
343
|
+
paused: "paused";
|
|
341
344
|
queued: "queued";
|
|
342
345
|
running: "running";
|
|
343
|
-
paused: "paused";
|
|
344
|
-
done: "done";
|
|
345
|
-
cancelled: "cancelled";
|
|
346
346
|
}>;
|
|
347
347
|
completed: z.ZodNumber;
|
|
348
348
|
total: z.ZodOptional<z.ZodNumber>;
|
|
@@ -383,9 +383,9 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
383
383
|
version: z.ZodNullable<z.ZodString>;
|
|
384
384
|
by: z.ZodOptional<z.ZodObject<{
|
|
385
385
|
kind: z.ZodEnum<{
|
|
386
|
+
agent: "agent";
|
|
386
387
|
tool: "tool";
|
|
387
388
|
person: "person";
|
|
388
|
-
agent: "agent";
|
|
389
389
|
}>;
|
|
390
390
|
name: z.ZodString;
|
|
391
391
|
}, z.core.$strict>>;
|
|
@@ -460,8 +460,8 @@ export declare const EDITOR_HOST_METHODS: {
|
|
|
460
460
|
}, z.core.$strict>>;
|
|
461
461
|
id: z.ZodString;
|
|
462
462
|
kind: z.ZodEnum<{
|
|
463
|
-
person: "person";
|
|
464
463
|
agent: "agent";
|
|
464
|
+
person: "person";
|
|
465
465
|
}>;
|
|
466
466
|
name: z.ZodString;
|
|
467
467
|
at: z.ZodNumber;
|
|
@@ -545,10 +545,10 @@ export declare const EDITOR_HOST_METHODS: {
|
|
|
545
545
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
546
546
|
readonly "export/state": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
547
547
|
at: z.ZodEnum<{
|
|
548
|
+
done: "done";
|
|
548
549
|
failed: "failed";
|
|
549
550
|
queued: "queued";
|
|
550
551
|
running: "running";
|
|
551
|
-
done: "done";
|
|
552
552
|
idle: "idle";
|
|
553
553
|
}>;
|
|
554
554
|
percent: z.ZodOptional<z.ZodNumber>;
|