@allyhub/sdk 0.15.2 → 0.16.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 +16 -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/website.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/items.d.ts +30 -4
- 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/package.json +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/source.d.ts +2 -0
- 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 -5
- 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 +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 +15 -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 +20 -20
- 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/package.json +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/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 +5 -5
- package/docs/footage.md +8 -8
- package/docs/image.md +5 -5
- package/docs/layers.md +10 -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 +2 -2
- 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,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 e}from"./open.js";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()}))}),MemberLimitSchema=t.strictObject({monthly:t.number().nonnegative().nullable()}),ORGANIZATION_PATH="/api/organization",STUDIO_PATH="/api/studio",STUDIO_STATES=["running","paused"],StudioSchema=t.object({studio:t.object({state:e(STUDIO_STATES),organizationId:t.string()}).nullable(),creditsPerHour:t.number(),idle:t.object({minutes:t.number(),chosen:t.number().nullable(),min:t.number(),max:t.number()}).optional(),update:t.object({since:t.string(),by:t.string()}).optional()}),STUDIO_RESTART_PATH="/api/studio/restart",StudioSettingsSchema=t.strictObject({idleMinutes:t.number().int().nullable()}),STUDIO_POLICY_PATH="/api/organization/studio",StudioPolicySchema=t.strictObject({idleMaxMinutes:t.number().int().nullable()}),STUDIO_OPEN_PATH="/api/studio/open",STUDIO_OPEN_STAGES=["balance","hold","create","resume","health","release","install","start","charge","ticket"],StudioOpenStagesSchema=t.record(t.string(),t.number()),StudioOpenedSchema=t.object({origin:t.url(),ticket:t.string().min(1),stages:StudioOpenStagesSchema.optional()}),NDJSON="application/x-ndjson",STUDIO_OPEN_STEPS=["machine","install","start"],STUDIO_START_ENV="ALLYHUB_STUDIO_START",StudioOpenLineSchema=t.union([t.object({step:t.enum(STUDIO_OPEN_STEPS),first:t.boolean().optional()}),t.object({status:t.number(),error:t.object({code:t.string(),message:t.string(),data:t.record(t.string(),t.unknown()).optional()})}),StudioOpenedSchema]),STUDIO_TICKET_PATH="/api/studio/ticket",StudioTicketSchema=t.object({ticket:t.string().min(1)}),STUDIO_PREPARE_PATH="/api/studio/prepare",StudioPreparedSchema=t.object({prepared:t.boolean()}),STUDIO_PAUSE_PATH="/api/studio/pause",StudioPausedSchema=t.object({paused:t.boolean()}),STUDIO_WAKES_PATH="/api/studio/wakes",STUDIO_WAKE_OUTCOMES=["live","failed"],StudioWakeReportSchema=t.strictObject({outcome:t.enum(STUDIO_WAKE_OUTCOMES),error:t.string().max(500).optional(),server:StudioOpenStagesSchema.optional(),window:t.strictObject({open:t.number().optional(),connect:t.number().optional(),enter:t.number().optional(),total:t.number()}),first:t.boolean().optional()}),STUDIO_WAKE_PATH="/api/studio/wake",StudioWakeSchema=t.strictObject({at:t.iso.datetime().nullable()});
|
|
2
|
+
import{z as t}from"zod";import{openEnum as e}from"./open.js";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(),spent:t.number().optional()}))}),MemberLimitSchema=t.strictObject({monthly:t.number().nonnegative().nullable()}),ORGANIZATION_PATH="/api/organization",STUDIO_PATH="/api/studio",STUDIO_STATES=["running","paused"],StudioSchema=t.object({studio:t.object({state:e(STUDIO_STATES),organizationId:t.string()}).nullable(),creditsPerHour:t.number(),idle:t.object({minutes:t.number(),chosen:t.number().nullable(),min:t.number(),max:t.number()}).optional(),update:t.object({since:t.string(),by:t.string().optional()}).optional()}),STUDIO_RESTART_PATH="/api/studio/restart",StudioSettingsSchema=t.strictObject({idleMinutes:t.number().int().nullable()}),STUDIO_POLICY_PATH="/api/organization/studio",StudioPolicySchema=t.strictObject({idleMaxMinutes:t.number().int().nullable()}),STUDIO_OPEN_PATH="/api/studio/open",STUDIO_OPEN_STAGES=["balance","hold","create","resume","health","release","install","start","charge","ticket"],StudioOpenStagesSchema=t.record(t.string(),t.number()),StudioOpenedSchema=t.object({origin:t.url(),ticket:t.string().min(1),stages:StudioOpenStagesSchema.optional()}),NDJSON="application/x-ndjson",STUDIO_OPEN_STEPS=["machine","install","start"],STUDIO_START_ENV="ALLYHUB_STUDIO_START",StudioOpenLineSchema=t.union([t.object({step:t.enum(STUDIO_OPEN_STEPS),first:t.boolean().optional()}),t.object({status:t.number(),error:t.object({code:t.string(),message:t.string(),data:t.record(t.string(),t.unknown()).optional()})}),StudioOpenedSchema]),STUDIO_TICKET_PATH="/api/studio/ticket",StudioTicketSchema=t.object({ticket:t.string().min(1)}),STUDIO_PREPARE_PATH="/api/studio/prepare",StudioPreparedSchema=t.object({prepared:t.boolean()}),STUDIO_PAUSE_PATH="/api/studio/pause",StudioPausedSchema=t.object({paused:t.boolean()}),STUDIO_WAKES_PATH="/api/studio/wakes",STUDIO_WAKE_OUTCOMES=["live","failed"],StudioWakeReportSchema=t.strictObject({outcome:t.enum(STUDIO_WAKE_OUTCOMES),error:t.string().max(500).optional(),server:StudioOpenStagesSchema.optional(),window:t.strictObject({open:t.number().optional(),connect:t.number().optional(),enter:t.number().optional(),total:t.number()}),first:t.boolean().optional()}),STUDIO_WAKE_PATH="/api/studio/wake",StudioWakeSchema=t.strictObject({at:t.iso.datetime().nullable()});
|
|
@@ -29,10 +29,10 @@ export declare const CHECK_STATES: readonly ["off", "waiting", "running", "done"
|
|
|
29
29
|
/** The check the server runs after edits, as it stands. */
|
|
30
30
|
export declare const CheckStateSchema: z.ZodObject<{
|
|
31
31
|
status: z.ZodEnum<{
|
|
32
|
-
|
|
32
|
+
done: "done";
|
|
33
33
|
failed: "failed";
|
|
34
|
+
off: "off";
|
|
34
35
|
running: "running";
|
|
35
|
-
done: "done";
|
|
36
36
|
waiting: "waiting";
|
|
37
37
|
}>;
|
|
38
38
|
revision: z.ZodInt;
|
|
@@ -71,11 +71,11 @@ export declare const ExportJobSchema: z.ZodObject<{
|
|
|
71
71
|
types: z.ZodArray<z.ZodString>;
|
|
72
72
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
73
73
|
state: z.ZodEnum<{
|
|
74
|
+
done: "done";
|
|
74
75
|
failed: "failed";
|
|
76
|
+
cancelled: "cancelled";
|
|
75
77
|
queued: "queued";
|
|
76
78
|
running: "running";
|
|
77
|
-
done: "done";
|
|
78
|
-
cancelled: "cancelled";
|
|
79
79
|
}>;
|
|
80
80
|
progress: z.ZodNumber;
|
|
81
81
|
files: z.ZodArray<z.ZodString>;
|
|
@@ -86,9 +86,9 @@ export type ExportJob = z.infer<typeof ExportJobSchema>;
|
|
|
86
86
|
export declare const IndexJobSchema: z.ZodObject<{
|
|
87
87
|
file: z.ZodString;
|
|
88
88
|
status: z.ZodEnum<{
|
|
89
|
+
done: "done";
|
|
89
90
|
failed: "failed";
|
|
90
91
|
running: "running";
|
|
91
|
-
done: "done";
|
|
92
92
|
}>;
|
|
93
93
|
message: z.ZodString;
|
|
94
94
|
share: z.ZodOptional<z.ZodNumber>;
|
|
@@ -274,10 +274,10 @@ export declare const PROJECT_TOOLS: {
|
|
|
274
274
|
}, z.core.$strict>>;
|
|
275
275
|
readonly "check/results": MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
276
276
|
status: z.ZodEnum<{
|
|
277
|
-
|
|
277
|
+
done: "done";
|
|
278
278
|
failed: "failed";
|
|
279
|
+
off: "off";
|
|
279
280
|
running: "running";
|
|
280
|
-
done: "done";
|
|
281
281
|
waiting: "waiting";
|
|
282
282
|
}>;
|
|
283
283
|
revision: z.ZodInt;
|
|
@@ -317,11 +317,11 @@ export declare const PROJECT_TOOLS: {
|
|
|
317
317
|
types: z.ZodArray<z.ZodString>;
|
|
318
318
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
319
319
|
state: z.ZodEnum<{
|
|
320
|
+
done: "done";
|
|
320
321
|
failed: "failed";
|
|
322
|
+
cancelled: "cancelled";
|
|
321
323
|
queued: "queued";
|
|
322
324
|
running: "running";
|
|
323
|
-
done: "done";
|
|
324
|
-
cancelled: "cancelled";
|
|
325
325
|
}>;
|
|
326
326
|
progress: z.ZodNumber;
|
|
327
327
|
files: z.ZodArray<z.ZodString>;
|
|
@@ -339,11 +339,11 @@ export declare const PROJECT_TOOLS: {
|
|
|
339
339
|
types: z.ZodArray<z.ZodString>;
|
|
340
340
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
341
341
|
state: z.ZodEnum<{
|
|
342
|
+
done: "done";
|
|
342
343
|
failed: "failed";
|
|
344
|
+
cancelled: "cancelled";
|
|
343
345
|
queued: "queued";
|
|
344
346
|
running: "running";
|
|
345
|
-
done: "done";
|
|
346
|
-
cancelled: "cancelled";
|
|
347
347
|
}>;
|
|
348
348
|
progress: z.ZodNumber;
|
|
349
349
|
files: z.ZodArray<z.ZodString>;
|
|
@@ -418,10 +418,10 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
418
418
|
}, z.core.$strict>>;
|
|
419
419
|
readonly "check/changed": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
420
420
|
status: z.ZodEnum<{
|
|
421
|
-
|
|
421
|
+
done: "done";
|
|
422
422
|
failed: "failed";
|
|
423
|
+
off: "off";
|
|
423
424
|
running: "running";
|
|
424
|
-
done: "done";
|
|
425
425
|
waiting: "waiting";
|
|
426
426
|
}>;
|
|
427
427
|
revision: z.ZodInt;
|
|
@@ -455,11 +455,11 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
455
455
|
types: z.ZodArray<z.ZodString>;
|
|
456
456
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
457
457
|
state: z.ZodEnum<{
|
|
458
|
+
done: "done";
|
|
458
459
|
failed: "failed";
|
|
460
|
+
cancelled: "cancelled";
|
|
459
461
|
queued: "queued";
|
|
460
462
|
running: "running";
|
|
461
|
-
done: "done";
|
|
462
|
-
cancelled: "cancelled";
|
|
463
463
|
}>;
|
|
464
464
|
progress: z.ZodNumber;
|
|
465
465
|
files: z.ZodArray<z.ZodString>;
|
|
@@ -470,9 +470,9 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
470
470
|
jobs: z.ZodArray<z.ZodObject<{
|
|
471
471
|
file: z.ZodString;
|
|
472
472
|
status: z.ZodEnum<{
|
|
473
|
+
done: "done";
|
|
473
474
|
failed: "failed";
|
|
474
475
|
running: "running";
|
|
475
|
-
done: "done";
|
|
476
476
|
}>;
|
|
477
477
|
message: z.ZodString;
|
|
478
478
|
share: z.ZodOptional<z.ZodNumber>;
|
|
@@ -483,8 +483,8 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
483
483
|
id: z.ZodString;
|
|
484
484
|
about: z.ZodObject<{
|
|
485
485
|
kind: z.ZodEnum<{
|
|
486
|
-
studio: "studio";
|
|
487
486
|
agent: "agent";
|
|
487
|
+
studio: "studio";
|
|
488
488
|
project: "project";
|
|
489
489
|
piece: "piece";
|
|
490
490
|
plugin: "plugin";
|
|
@@ -504,12 +504,12 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
504
504
|
}>;
|
|
505
505
|
name: z.ZodOptional<z.ZodString>;
|
|
506
506
|
state: z.ZodEnum<{
|
|
507
|
+
done: "done";
|
|
507
508
|
failed: "failed";
|
|
509
|
+
cancelled: "cancelled";
|
|
510
|
+
paused: "paused";
|
|
508
511
|
queued: "queued";
|
|
509
512
|
running: "running";
|
|
510
|
-
paused: "paused";
|
|
511
|
-
done: "done";
|
|
512
|
-
cancelled: "cancelled";
|
|
513
513
|
}>;
|
|
514
514
|
completed: z.ZodNumber;
|
|
515
515
|
total: z.ZodOptional<z.ZodNumber>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Where a turn is recorded, by its trace id: `PUT` as it begins, `PATCH` as it ends. */
|
|
3
|
+
export declare const TURN_PATH = "/api/turns/:traceId";
|
|
4
|
+
export declare const turnPath: (traceId: string) => string;
|
|
5
|
+
/** The most characters of a prompt kept; a longer one is cut there. */
|
|
6
|
+
export declare const TURN_QUERY_AT_MOST = 32000;
|
|
7
|
+
/** The most characters of an error kept. */
|
|
8
|
+
export declare const TURN_ERROR_AT_MOST = 2000;
|
|
9
|
+
/** A turn began: the Host's `PUT turnPath(traceId)`. Strict, as everything the services receive. */
|
|
10
|
+
export declare const TurnStartedSchema: z.ZodObject<{
|
|
11
|
+
at: z.ZodISODateTime;
|
|
12
|
+
agent: z.ZodString;
|
|
13
|
+
sessionId: z.ZodString;
|
|
14
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
query: z.ZodString;
|
|
16
|
+
from: z.ZodEnum<{
|
|
17
|
+
person: "person";
|
|
18
|
+
schedule: "schedule";
|
|
19
|
+
hook: "hook";
|
|
20
|
+
}>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
export type TurnStarted = z.infer<typeof TurnStartedSchema>;
|
|
23
|
+
/** The most characters of the agent's answer kept; a longer one is cut there. */
|
|
24
|
+
export declare const TURN_ANSWER_AT_MOST = 64000;
|
|
25
|
+
/** The most steps a turn's record keeps; past them, only how many more there were. */
|
|
26
|
+
export declare const TURN_STEPS_AT_MOST = 1000;
|
|
27
|
+
/** The most characters of a step's title kept. */
|
|
28
|
+
export declare const TURN_STEP_TITLE_AT_MOST = 200;
|
|
29
|
+
/**
|
|
30
|
+
* A step the agent took in a turn, as ACP told it (`tool_call`, then its
|
|
31
|
+
* `tool_call_update`s): its kind (`read`, `edit`, `execute`, … or `other`),
|
|
32
|
+
* its title as the agent wrote it, how it ended, when it began and how long
|
|
33
|
+
* it took. Never its input, its output or a file's content.
|
|
34
|
+
*/
|
|
35
|
+
export declare const TurnStepSchema: z.ZodObject<{
|
|
36
|
+
at: z.ZodISODateTime;
|
|
37
|
+
kind: z.ZodString;
|
|
38
|
+
title: z.ZodString;
|
|
39
|
+
status: z.ZodString;
|
|
40
|
+
ms: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
export type TurnStep = z.infer<typeof TurnStepSchema>;
|
|
43
|
+
/** A turn ended: the Host's `PATCH turnPath(traceId)`. */
|
|
44
|
+
export declare const TurnEndedSchema: z.ZodObject<{
|
|
45
|
+
at: z.ZodISODateTime;
|
|
46
|
+
durationMs: z.ZodNumber;
|
|
47
|
+
ended: z.ZodString;
|
|
48
|
+
error: z.ZodOptional<z.ZodString>;
|
|
49
|
+
changed: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
50
|
+
pieces: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
51
|
+
answer: z.ZodOptional<z.ZodString>;
|
|
52
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
53
|
+
at: z.ZodISODateTime;
|
|
54
|
+
kind: z.ZodString;
|
|
55
|
+
title: z.ZodString;
|
|
56
|
+
status: z.ZodString;
|
|
57
|
+
ms: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
}, z.core.$strict>>>;
|
|
59
|
+
moreSteps: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
}, z.core.$strict>;
|
|
61
|
+
export type TurnEnded = z.infer<typeof TurnEndedSchema>;
|
|
62
|
+
/** What the server answers either: that it kept it. */
|
|
63
|
+
export declare const TurnAnswerSchema: z.ZodObject<{
|
|
64
|
+
ok: z.ZodBoolean;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export type TurnAnswer = z.infer<typeof TurnAnswerSchema>;
|
|
67
|
+
/** Cuts a prompt to what is kept. */
|
|
68
|
+
export declare const keptQuery: (text: string) => string;
|
|
69
|
+
/** The trace id a turn's route names. */
|
|
70
|
+
export declare const TurnTraceIdSchema: z.ZodString;
|
|
71
|
+
//# sourceMappingURL=turns.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{z as t}from"zod";import{EventIdSchema as n,EventTraceIdSchema as s,EventWordSchema as o}from"./events.js";export const TURN_PATH="/api/turns/:traceId",turnPath=e=>TURN_PATH.replace(":traceId",e),TURN_QUERY_AT_MOST=32e3,TURN_ERROR_AT_MOST=2e3;const r=t.record(o,t.number().int().min(0).max(1e6)).refine(e=>Object.keys(e).length<=32,"At most 32 words.");export const TurnStartedSchema=t.strictObject({at:t.iso.datetime(),agent:o,sessionId:n,projectId:n.optional(),query:t.string().max(TURN_QUERY_AT_MOST),from:t.enum(["person","schedule","hook"])}),TURN_ANSWER_AT_MOST=64e3,TURN_STEPS_AT_MOST=1e3,TURN_STEP_TITLE_AT_MOST=200,TurnStepSchema=t.strictObject({at:t.iso.datetime(),kind:o,title:t.string().max(TURN_STEP_TITLE_AT_MOST),status:o,ms:t.number().int().min(0).optional()}),TurnEndedSchema=t.strictObject({at:t.iso.datetime(),durationMs:t.number().int().min(0).max(10080*60*1e3),ended:o,error:t.string().max(TURN_ERROR_AT_MOST).optional(),changed:r,pieces:r,answer:t.string().max(TURN_ANSWER_AT_MOST).optional(),steps:t.array(TurnStepSchema).max(TURN_STEPS_AT_MOST).optional(),moreSteps:t.number().int().min(0).optional()}),TurnAnswerSchema=t.object({ok:t.boolean()}),keptQuery=e=>e.length<=TURN_QUERY_AT_MOST?e:e.slice(0,TURN_QUERY_AT_MOST),TurnTraceIdSchema=s;
|
package/docs/batches.md
CHANGED
|
@@ -8,7 +8,7 @@ A piece's `matrix` says which versions of it are made. Each version is a **combo
|
|
|
8
8
|
|
|
9
9
|
- `lang` is the one dimension AllyHub reads: it picks the file of each item's script in that language and `assets/text/<lang>.json`, the first value being the default language. Its values are lowercase language tags (`en`, `zh-cn`). Without `lang`, a piece's languages are its script's and the shared text's, `allyhub.config.ts`'s `locales` first.
|
|
10
10
|
- Other dimensions are the piece's: its parts function reads them from `ctx.combo`.
|
|
11
|
-
- A name starts with a lowercase letter (then letters, digits, `_`, `-`); a value is letters, digits, `.`, `_`, `-`, each listed once. `size`, `format`, `piece`, `output`, `token`, `structure` and `id`
|
|
11
|
+
- A name starts with a lowercase letter (then letters, digits, `_`, `-`); a value is letters, digits, `.`, `_`, `-`, each listed once. `size`, `format`, `piece`, `output`, `token`, `structure` and `id` are reserved: give dimensions and slots other names. A wrong name or value is AK-M001.
|
|
12
12
|
- A combo's **key** is its names sorted, each `name=value`, joined with commas: `audience=dev,lang=en` (`default` when there are none). It filters commands' `--combo` (`--combo lang=zh-cn`); the rendered files carry its values, after the name of the piece's folder (`.allyhub/out/launch/launch.dev.en.mp4`).
|
|
13
13
|
|
|
14
14
|
## Slots
|
|
@@ -61,7 +61,7 @@ export default video({
|
|
|
61
61
|
| `seed` | number or string | 1 | Decides between equally good choices |
|
|
62
62
|
| `differ` | `{ slots?, first? }` | none | Any two chosen combos differ in at least `slots` slots (another structure counts as one); `first`: their openings differ, the first n slots of each structure, or these slots |
|
|
63
63
|
| `rules` | `[{ if?, require?, exclude? }]` | none | Over slots, dimensions and `structure`; a value is a name, `#tag` or a list of either. When every `if` holds, every `require` must hold and no `exclude` may. Each has a `require` or an `exclude` |
|
|
64
|
-
| `combos` | `Combo[]` | none: sampled | The slot combinations to make, chosen by the agent ([below](#the-agents-own-combos))
|
|
64
|
+
| `combos` | `Combo[]` | none: sampled | The slot combinations to make, chosen by the agent ([below](#the-agents-own-combos)), in place of `pick` and `seed` |
|
|
65
65
|
|
|
66
66
|
- A rule's condition on a slot a combo's structure lacks never holds. A condition on a dimension is kept when the slot combinations are crossed with the dimensions: a crossing it rules out is not made.
|
|
67
67
|
- A candidate's tags are what `#tag` matches. A part's own `tags` are labels for people and tools; rules do not read them.
|
|
@@ -87,11 +87,11 @@ Without `combos`, sampling chooses `pick` slot combinations, the same for the sa
|
|
|
87
87
|
5. differ most from the nearest earlier pick;
|
|
88
88
|
6. then the seed decides.
|
|
89
89
|
|
|
90
|
-
Each pick keeps a reason in a few words. Sampling looks at
|
|
90
|
+
Each pick keeps a reason in a few words. Sampling looks at up to 100,000 slot combinations before the rules (more is AK-X002).
|
|
91
91
|
|
|
92
92
|
## The agent's own combos
|
|
93
93
|
|
|
94
|
-
`combos` names the slot combinations to make, in order: each names `structure` when the piece declares structures, and one candidate per slot of it
|
|
94
|
+
`combos` names the slot combinations to make, in order: each names `structure` when the piece declares structures, and one candidate per slot of it; the dimensions are crossed with them. Nothing is sampled.
|
|
95
95
|
|
|
96
96
|
```ts file=ads/chosen/chosen.ts
|
|
97
97
|
import { part, video } from "@allyhub/sdk";
|
package/docs/contract.md
CHANGED
|
@@ -5,11 +5,11 @@ What the build, the check and the render rely on. Everything else is the piece's
|
|
|
5
5
|
## A frame depends only on its time
|
|
6
6
|
|
|
7
7
|
- A piece is drawn in a page, a moment at a time, in any order: the check draws moments out of order and compares them with the same moments drawn in order (AK-D002), and the render draws parts on several pages at once and keeps what it drew in the part cache.
|
|
8
|
-
- A layer's `mount` lays it out once; its `render(el, t, …)` sets every property that moves from `t` alone ([layers.md](layers.md)).
|
|
8
|
+
- A layer's `mount` lays it out once; its `render(el, t, …)` sets every property that moves from `t` alone ([layers.md](layers.md)). Each `render` call works from `t` and what `mount` made. A deck mounts a slide's components when the slide is shown and may let the slide go and mount them again later, on a new element: what `mount` made that the page does not free with the element (a WebGL context, a worker, a timer) is let go in `unmount(el, …)`, and each mount starts afresh.
|
|
9
9
|
- Piece code sees the moment's clock, not the wall's: `Date`, `Date.now()` and `performance.now()` read the moment being drawn (time 0 is 2026-01-01T00:00:00Z); `Math.random()` and `crypto.getRandomValues()` are seeded by the piece's id, the combo, the part and the frame; `requestAnimationFrame` callbacks run at the moment; `setTimeout` and `setInterval` never fire. Use `rand(seed)` and the noise functions for randomness of your own.
|
|
10
|
-
- CSS animations and transitions run on the browser's clock:
|
|
10
|
+
- CSS animations and transitions run on the browser's clock: drive the picture from `t` in `render`.
|
|
11
11
|
- Work a layer must finish before anything is drawn (a 3D scenery's build, a picture decoding) goes through `ctx.wait(promise)`. Loading may take `loadLimit` seconds (AK-P002), one moment `seekLimit` seconds (AK-P003) ([defaults.md](defaults.md)).
|
|
12
|
-
- A part is rendered once and reused in every combo that has it: a layer reads the combo's dimensions and its own part's slot
|
|
12
|
+
- A part is rendered once and reused in every combo that has it: a layer reads the combo's dimensions and its own part's slot (another slot's pick is AK-X005, [batches.md](batches.md)).
|
|
13
13
|
|
|
14
14
|
## It is drawn offline
|
|
15
15
|
|
|
@@ -21,7 +21,7 @@ What the build, the check and the render rely on. Everything else is the piece's
|
|
|
21
21
|
## What goes wrong is a problem, not a wrong picture
|
|
22
22
|
|
|
23
23
|
- Every command reads the problems of each page it drew with and prints them, each under its rule: a layer that throws at 0.8 s (AK-R001), work it waits for that fails or does not settle, a picture that does not load (AK-A005), a 3D scenery that does not build (AK-W001). `ctx.report({ code, message })` reports one of a layer's own.
|
|
24
|
-
- A render
|
|
24
|
+
- A render makes a file from a drawing that raised no problem; it lists any other with why, and keeps it out of the part cache.
|
|
25
25
|
- What piece code prints with `console.log`, `info`, `warn`, `error` and `debug` is collected with where it ran (the module, a part, a layer, its moment) and printed by the commands after their own output. It changes no frame.
|
|
26
26
|
|
|
27
27
|
## Checks are for objective errors
|
|
@@ -44,7 +44,7 @@ What the build, the check and the render rely on. Everything else is the piece's
|
|
|
44
44
|
| `AK-X…` | The matrix and its combos |
|
|
45
45
|
| `AK-W…` | 3D sceneries |
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
A render makes its file once its errors are fixed. A warning is reported and the render goes on. What is a matter of judgment (text near a face, a loudness step between parts, a still stretch, a cut seam) is never a problem: it is a fact, with its numbers, which `allyhub inspect` prints for the agent to weigh.
|
|
48
48
|
|
|
49
49
|
## Defaults can be changed
|
|
50
50
|
|
package/docs/defaults.md
CHANGED
|
@@ -655,7 +655,7 @@ A camera filming the picture: a mark's values when it is asked for without them.
|
|
|
655
655
|
|
|
656
656
|
### `SHARE_ENCODE`
|
|
657
657
|
|
|
658
|
-
How `allyhub render` and an editor's
|
|
658
|
+
How `allyhub render` and an editor's Download encode an mp4 when nothing chooses otherwise, ready to share on social media: H.264's crf, and the most video bitrate in kbit/s for a frame of `width` × `height` at `fps`, scaled by the pixels a second of the video's own (16000 at 1080p 60, 32000 at 4K 30). `--param crf`, `--param max-bitrate` (0 for none).
|
|
659
659
|
|
|
660
660
|
| Key | Value |
|
|
661
661
|
| --- | --- |
|
|
@@ -667,7 +667,7 @@ How `allyhub render` and an editor's Export encode an mp4 when nothing chooses o
|
|
|
667
667
|
|
|
668
668
|
### `GIF_ENCODE`
|
|
669
669
|
|
|
670
|
-
How `allyhub render` and an editor's
|
|
670
|
+
How `allyhub render` and an editor's Download make a GIF when nothing chooses otherwise: its width in pixels (its height in proportion) and its frames a second, each never more than the video's own. `--param gif-width`, `--param gif-fps` (0 for the video's own).
|
|
671
671
|
|
|
672
672
|
| Key | Value |
|
|
673
673
|
| --- | --- |
|
package/docs/docs.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Docs
|
|
2
2
|
|
|
3
|
-
A doc is prose a person reads and edits as a page and an agent writes as text: one MDX file, listed in `allyhub.yaml` as `kind: doc` ([project.md](project.md#items)). It is not a piece: it has no format, languages or combos. `allyhub check` checks it, `allyhub frames` draws its pages as they print, `allyhub dev` shows it in its editor (its Pages beside the text, as they print), `allyhub inspect pages` measures its pages, `allyhub render` prints it. Beside prose it holds charts drawn from numbers (`<Chart>`), equations and diagrams (```` ```math ````, ```` ```mermaid ````), and a picture made by code is a component placed in it (`<Component>`)
|
|
3
|
+
A doc is prose a person reads and edits as a page and an agent writes as text: one MDX file, listed in `allyhub.yaml` as `kind: doc` ([project.md](project.md#items)). It is not a piece: it has no format, languages or combos. `allyhub check` checks it, `allyhub frames` draws its pages as they print, `allyhub dev` shows it in its editor (its Pages beside the text, as they print), `allyhub inspect pages` measures its pages, `allyhub render` prints it. Beside prose it holds charts drawn from numbers (`<Chart>`), equations and diagrams (```` ```math ````, ```` ```mermaid ````), and a picture made by code is a component placed in it (`<Component>`). Its front matter sets how the whole page looks.
|
|
4
4
|
|
|
5
5
|
## A doc item
|
|
6
6
|
|
|
@@ -28,7 +28,7 @@ It is the PDF's title, and the doc's name where people see it unless `allyhub.ya
|
|
|
28
28
|
|
|
29
29
|
## What a doc reads
|
|
30
30
|
|
|
31
|
-
The file is MDX: Markdown with GFM tables, strike-through and task lists, plus tags and `import` lines.
|
|
31
|
+
The file is MDX: Markdown with GFM tables, strike-through and task lists, plus tags and `import` lines. Write a link as `[text](https://…)`; a bare address stays text. `*`, `_`, `[` and `<` are Markdown's marks as CommonMark reads them: a blank to fill in written `[__]` twice in a paragraph makes the words between the two bold; write `\_\_` (or `[ ]`) for one.
|
|
32
32
|
|
|
33
33
|
| Written | Block |
|
|
34
34
|
| --- | --- |
|
|
@@ -222,7 +222,7 @@ flowchart LR
|
|
|
222
222
|
```
|
|
223
223
|
````
|
|
224
224
|
|
|
225
|
-
The editor, the PDF and a picture draw them; Word holds each as a picture; Markdown keeps the code block, which GitHub draws too. A diagram is laid out by dagre,
|
|
225
|
+
The editor, the PDF and a picture draw them; Word holds each as a picture; Markdown keeps the code block, which GitHub draws too. A diagram is laid out by dagre, which keeps a diagram of groups narrow enough for its words to read on the page; a diagram whose config asks for ELK (`---` `config: { layout: elk }` `---` over it) gets it, its boxes in the order they are written. A diagram is drawn at its own size and made smaller to fit the column: `allyhub inspect pages` says, for each diagram and component, how much of its own size the page shows, a diagram's words in pt, and how many times a component's lines cross where it draws them with `connector` (`page-picture`). TeX that KaTeX cannot read is AK-M008 at its line. Write an equation as a `math` block.
|
|
226
226
|
|
|
227
227
|
### Components
|
|
228
228
|
|
|
@@ -304,6 +304,6 @@ Without front matter the page is Letter, sans, with the default accent and no co
|
|
|
304
304
|
## Check and render
|
|
305
305
|
|
|
306
306
|
- `allyhub check` reports AK-M008 for a doc whose file is not MDX, that holds what a doc does not draw (`{…}`, a tag inside a line other than the marks above, a wrong attribute or value), that shows a picture which is not in the project, that names a component which is not one or a prop it does not have, whose chart cannot be drawn from its numbers or whose equation is not TeX KaTeX reads, that cites a source its bibliography does not hold (or names a bibliography that is not CSL-JSON in the project); each problem has its file and line.
|
|
307
|
-
- `allyhub inspect pages <doc>` measures its pages as `allyhub render` prints them, from the PDF itself, and says the facts with their raw numbers (mm on the paper, each block by its line in the doc's file): the space left at each page's foot, each block broken over pages with its lines (a table's rows) on each and whether its head repeats, a heading near a page's foot with the lines after it on its page, a paragraph's short last line, content past the column and what is cut at the paper's edge, a line that starts or ends with a mark Chinese type keeps off it, each numbered figure's page and the pages that name it, the text as a grid, and whether the contents' page numbers held. It draws the pages too, each block outlined and labelled by its line, the space at each foot shaded (`.allyhub/work/inspect/<place>/pages.webp`). They are facts
|
|
307
|
+
- `allyhub inspect pages <doc>` measures its pages as `allyhub render` prints them, from the PDF itself, and says the facts with their raw numbers (mm on the paper, each block by its line in the doc's file): the space left at each page's foot, each block broken over pages with its lines (a table's rows) on each and whether its head repeats, a heading near a page's foot with the lines after it on its page, a paragraph's short last line, content past the column and what is cut at the paper's edge, a line that starts or ends with a mark Chinese type keeps off it, each numbered figure's page and the pages that name it, the text as a grid, and whether the contents' page numbers held. It draws the pages too, each block outlined and labelled by its line, the space at each foot shaded (`.allyhub/work/inspect/<place>/pages.webp`). They are facts: where a page breaks well is yours to judge. `--heading-lines` and `--short-line` say what is listed, `--all` lists every heading and last line.
|
|
308
308
|
- `allyhub frames <doc>` draws its pages as `allyhub render` prints them, its components drawn first (the PDF printed and thrown away, each page drawn), tiled on one picture under `.allyhub/work/frames/<place>/`, and says how many pages there are and on what paper; `--page 2-3` draws those pages large. It is how to look at a doc and fit it to a length, and nothing is written to `.allyhub/out/`.
|
|
309
|
-
- `allyhub render` prints each doc under `.allyhub/out/`, by its id, as `plan.pdf`; `--type png` writes a picture of the whole page (`plan.png`), `--type docx` a Word document (`plan.docx`: its text and its charts editable, a picture Word cannot show as a JPEG, an equation and a diagram as pictures), and `--type pdf,docx,png` all of them.
|
|
309
|
+
- `allyhub render` prints each doc under `.allyhub/out/`, by its id, as `plan.pdf`; `--type png` writes a picture of the whole page (`plan.png`), `--type docx` a Word document (`plan.docx`: its text and its charts editable, a picture Word cannot show as a JPEG, an equation and a diagram as pictures), and `--type pdf,docx,png` all of them. Its Markdown is the doc's MDX itself. With a PDF or a Word document it says how the pages printed: how many, the share of each page's text area left empty at its foot, the blocks broken over pages (a Word document alone is printed once to measure it); `allyhub inspect pages` has every fact. A doc with a problem is not rendered: the command fails and says why. `allyhub help render` has every option.
|
package/docs/footage.md
CHANGED
|
@@ -57,7 +57,7 @@ export default video({
|
|
|
57
57
|
## The file
|
|
58
58
|
|
|
59
59
|
- **A file**: an import (`import clip from "./clip.mp4"`) or a path. A path is relative to the folder of the module that wrote the `footage()` call, also once its part is spread into another piece ([project.md](project.md)).
|
|
60
|
-
- **No file**: the part's take, in sync with its speech, following its cut list. A part with no take is AK-A001; a take that is not a video is AK-A003. A take
|
|
60
|
+
- **No file**: the part's take, in sync with its speech, following its cut list. A part with no take is AK-A001; a take that is not a video is AK-A003. A take shows its own picture at its own speed (`part()` throws for one played at another, `take(…).speed(1.2)`).
|
|
61
61
|
- **A video item**: an imported `video()` of the project ([below](#a-video-item-as-footage)).
|
|
62
62
|
- A still (PNG, JPEG, WebP, AVIF, GIF or SVG) is drawn as `picture()` draws it ([pictures.md](pictures.md#footage-of-a-still)). Any other file that is not a video (mp4, webm or mov) is AK-A003; a file that is not there AK-A001.
|
|
63
63
|
- When the layer lasts longer than the file, its last frame holds; before a take's file starts (speech in the lead), its first frame holds. A video with alpha (ProRes 4444, VP9 with alpha) shows what is under its transparent pixels.
|
|
@@ -93,8 +93,8 @@ Besides `at`, `until` and `dur` (word references or seconds; default the whole p
|
|
|
93
93
|
`box` as `BoxKey[]`: `[{ t, box, ease? }]`, `t` a word reference or seconds, `box` a rectangle or `"full"`, `ease` the move into that key (`"linear"`, `"in"`, `"out"`, `"in-out"`; default `"linear"`).
|
|
94
94
|
|
|
95
95
|
- The picture keeps its shape in every box, fitted as `fit` says: a box that changes shape shows more or less of it, never a stretched one.
|
|
96
|
-
- Every key lies inside the frame
|
|
97
|
-
- A keyframed box
|
|
96
|
+
- Every key lies inside the frame (`footage()` throws for one past it); a push-in larger than the frame is a punch-in.
|
|
97
|
+
- A keyframed box moves the picture by its keys; `reframe`, `punchIn` and `pullback` go on a fixed box (`footage()` throws otherwise).
|
|
98
98
|
|
|
99
99
|
### Punch-ins and the pullback
|
|
100
100
|
|
|
@@ -149,7 +149,7 @@ export const backgrounds = [
|
|
|
149
149
|
|
|
150
150
|
## The preview and the render
|
|
151
151
|
|
|
152
|
-
The render and stills draw footage with ffmpeg, the exact frame of the file for every frame. The live preview plays each footage layer as a muted `<video>` kept to the clock, placed by the same plan
|
|
152
|
+
The render and stills draw footage with ffmpeg, the exact frame of the file for every frame. The live preview plays each footage layer as a muted `<video>` kept to the clock, placed by the same plan, with `sharpen` off and a quicker `background` (its blur over the whole picture, a coarser matte edge). `allyhub frames` draws as the render does, `sharpen` and `background` included.
|
|
153
153
|
|
|
154
154
|
## A video item as footage
|
|
155
155
|
|
|
@@ -189,10 +189,10 @@ export default video({
|
|
|
189
189
|
});
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
- `footage(videoItem, opts)` takes `at`, `until`, `dur`, `from` (its own moment at the layer's start: seconds, an anchor of one of its parts such as `"@turn"`, or a part's key), `speed` (over 0, up to 16), `box` and `fit`, `audio` and `gainDb` (its speech, room and sound effects; at speed 1 only), `camera` and `cameras` (the camera its scenery layers are drawn from, on its clock: one for all, or by layer name), and `quality: { scale }` (how finely its scenery layers are drawn here, over 0 up to 4, as `scenery()`'s; [scenery.md](scenery.md)). `crop`, `reframe`, `speaker`, `punchIn`, `pullback`, `sharpen`, `background`, `shape` and `radius` throw.
|
|
193
|
-
- It draws
|
|
192
|
+
- `footage(videoItem, opts)` takes `at`, `until`, `dur`, `from` (its own moment at the layer's start: seconds, an anchor of one of its parts such as `"@turn"`, or a part's key), `speed` (over 0, up to 16), `box` and `fit`, `audio` and `gainDb` (its speech, room and sound effects; at speed 1 only), `camera` and `cameras` (the camera its scenery layers are drawn from, on its clock: one for all, or by layer name), and `quality: { scale }` (how finely its scenery layers are drawn here, over 0 up to 4, as `scenery()`'s; [scenery.md](scenery.md)). `crop`, `reframe`, `speaker`, `punchIn`, `pullback`, `sharpen`, `background`, `shape` and `radius` are a file's options (here they throw).
|
|
193
|
+
- It draws the item's graphic layers, so the item shown is one made of graphic layers (one with footage of its own stops the load, saying so).
|
|
194
194
|
- What it reads counts as the outer video's, so the part cache and the check follow it. A video that reaches itself through the videos it shows is AK-M010.
|
|
195
|
-
- `deliverable: false` marks a video
|
|
195
|
+
- `deliverable: false` marks a video shown inside others: it is rendered as a film of its own when named.
|
|
196
196
|
- `take(videoItem).range(from, to)` makes a part that plays a stretch of it, hearing its sound and saying its words; `footage()` without a file in that part draws its picture in sync ([speech.md](speech.md)).
|
|
197
197
|
- `ctx.video(videoItem, el)` draws it in an element of a layer and resolves to an `EmbeddedVideo` (`{ id, duration, width, height, seek(t, layout?), at(ref) }`); seek it from `render` through `ctx.wait`:
|
|
198
198
|
|
|
@@ -245,5 +245,5 @@ export default video({
|
|
|
245
245
|
```
|
|
246
246
|
|
|
247
247
|
- `align` also prints the drift as a line, offset(t) = at0 + slope × t, and the speed (1 + slope) that keeps the camera in step; and, in its JSON, `pictureOffset`: the offset for the camera's picture when its file's sound starts later on its own clock.
|
|
248
|
-
-
|
|
248
|
+
- A take's own footage follows its cut list: to cut a separate camera with it, make the two one file first.
|
|
249
249
|
- `allyhub frames cuts` draws a review sheet per cut (a cut take's jumps, part joins) to look at the result.
|
package/docs/image.md
CHANGED
|
@@ -77,7 +77,7 @@ A picture a board starts from is never changed: a pixel edit (a matte, a part re
|
|
|
77
77
|
|
|
78
78
|
- **Every layer has a `key`**, unique on its board (AK-I003 without one, AK-I002 twice). The stage marks its element with it (`data-ak-layer`), and the facts name it: a layer of one key on several boards is compared across them.
|
|
79
79
|
- **`fromPicture(src)`** is a still picture's size as `size` takes it (`"4032x3024"`): a board that starts from a photo, the photo its bottom layer. A picture whose size is not known, or a video, is AK-I001.
|
|
80
|
-
- **An image
|
|
80
|
+
- **An image's stage has the neutral look**: its variables (`--ak-font-display`, `--ak-color-bg`…) are the defaults; bring a brand's colours and fonts into its components.
|
|
81
81
|
- **`ctx.dims` is the board's own** in a layer: its width and height (its safe zone covers no edge).
|
|
82
82
|
- **`height: "auto"`**: the layers are laid out at the board's width and `minHeight`, the furthest their content reaches down is measured (each layer element's scroll height), and the board is laid out again that tall, at most `maxHeight`. Lay such a board out in flow; a `picture()` box is a share of the final height.
|
|
83
83
|
|
|
@@ -110,11 +110,11 @@ A board's layers follow Photoshop's model: the names of its scripting model (UXP
|
|
|
110
110
|
| `transform` | `{ rotation, flipH, flipV }` | none | Turned (degrees, clockwise) and flipped about its box's centre |
|
|
111
111
|
| `visible` | `boolean` | `true` | `false`: not drawn, nor measured |
|
|
112
112
|
|
|
113
|
-
These are layer options
|
|
113
|
+
These are layer options, so a component's props take other names. Every default is in [defaults.md](defaults.md).
|
|
114
114
|
|
|
115
115
|
### Drawn by Chrome, or refused
|
|
116
116
|
|
|
117
|
-
Each field is drawn by CSS and SVG filters in the pinned Chrome, the same every time (AK-D002 checks it).
|
|
117
|
+
Each field is drawn by CSS and SVG filters in the pinned Chrome, the same every time (AK-D002 checks it). Each field is drawn exactly, or reported as AK-I007 with why.
|
|
118
118
|
|
|
119
119
|
- **Blend modes** are `mix-blend-mode`, whose formulas are the W3C Compositing spec's, taken from Adobe's PDF Reference: `normal`, `darken`, `multiply`, `colorBurn`, `lighten`, `screen`, `colorDodge`, `overlay`, `softLight`, `hardLight`, `difference`, `exclusion`, `hue`, `saturation`, `color`, `luminosity`; a group's `passThrough` makes no group of its own. Refused: `dissolve` (random), `darkerColor` and `lighterColor` (a whole pixel chosen by luminance), `linearDodge` (CSS's `plus-lighter` differs wherever the layer is not opaque), `linearBurn`, `vividLight`, `linearLight`, `pinLight`, `hardMix`, `subtract` and `divide` (no CSS mode, and a layer's filter cannot read what is under it). A `fillOpacity` under 100 with `colorBurn`, `colorDodge` or `difference` (Photoshop applies it inside the blend), an adjustment's blend other than `normal`, and a `passThrough` group that fades, is masked or has effects while one of its layers is an adjustment or blends otherwise are refused too.
|
|
120
120
|
- **Effects and fill opacity** are one SVG filter on the layer, bottom to top: the drop shadow and the outer glow under what it shows (knocked out under it), then the pattern, gradient and colour overlays, the satin, the inner glow, the inner shadow and the bevel over it, each cut to its pixels. `size` is a blur's radius (twice the Gaussian's standard deviation), `spread` and `choke` divide its alpha by 1 − them, the light's `angle` is Photoshop's (counter-clockwise from the right). An effect under the layer blends as `normal` (or as `multiply` or `darken` in black, `screen` or `lighten` in white, which are the same); the bevel is the smooth inner bevel (feDiffuseLighting); the stroke is a type layer's glyphs' (outside or about them) or a shape's path's (inside, about or outside it), with neither an inner effect nor a `fillOpacity` under 100 beside it. A gradient's `angle` and `diamond` styles are refused on an overlay and on a shape (SVG has no such gradient); a fill layer draws `angle` as CSS's conic gradient.
|
|
@@ -134,7 +134,7 @@ boards:
|
|
|
134
134
|
|
|
135
135
|
## What a person asks for
|
|
136
136
|
|
|
137
|
-
An image's viewer shows every board of every version, each drawn live, to zoom, pan, mark up and
|
|
137
|
+
An image's viewer shows every board of every version, each drawn live, to zoom, pan, mark up and download; it changes nothing. A person who wants something changed marks it up: the mark reaches you with each layer under it (its key, the line of the module that names it, its words, its picture) and the mark as a region of the layer's pixels, the board's and a picture's own file's (which `allyhub ai-media edit-image` takes as its mask). You make the change in the module, or its script for words, and the viewer draws it.
|
|
138
138
|
|
|
139
139
|
## Check, frames, inspect and render
|
|
140
140
|
|
|
@@ -159,7 +159,7 @@ An image's viewer shows every board of every version, each drawn live, to zoom,
|
|
|
159
159
|
| a component | a smart object holding its pixels as drawn; its code and props are not in the file |
|
|
160
160
|
| `group()` | a group, `passThrough` unless it says otherwise |
|
|
161
161
|
|
|
162
|
-
The pixels of a layer are drawn by Chrome alone, without what Photoshop applies itself (blend, opacity, mask, effects, clipping), so Photoshop draws effects, blends and adjustments by its own formulas: where it publishes none (Hue/Saturation, Vibrance, Color Balance, Black & White, Photo Filter, Brightness/Contrast) or draws its own way (layer styles, a mask's feather, text), the
|
|
162
|
+
The pixels of a layer are drawn by Chrome alone, without what Photoshop applies itself (blend, opacity, mask, effects, clipping), so Photoshop draws effects, blends and adjustments by its own formulas: where it publishes none (Hue/Saturation, Vibrance, Color Balance, Black & White, Photo Filter, Brightness/Contrast) or draws its own way (layer styles, a mask's feather, text), Photoshop shows the layer by its own formulas. `render` names each such layer (`fidelity` in `--json`: `approximate`, `pixels` or `omitted`). The same board writes the same bytes.
|
|
163
163
|
|
|
164
164
|
`allyhub image import <file.psd> --to <module>.ts` makes an image of a Photoshop file, named after its module: `<name>.ts`, which names `<name>.{locale}.yaml` for its script; a board an artboard (else its canvas), each layer of its kind with its fields, a pixel layer's pixels beside the module (`<board>-<layer>.png`), a type layer's words in the script (`<name>.<lang>.yaml`), each layer's key its PSD name in lower case with hyphens, the name itself a comment beside it where it is not the key (a PSD exported names its layers by their keys); the file as it was beside them. A picture or the file as it was takes a name no file there has; the import never writes over a file that is there. What AllyHub does not hold or refuses (AK-I007) is kept as pixels where the layer has them, drawn near (a blend mode as normal, a type layer by CSS), or left out, and the command lists every one. A smart object comes in as its pixels.
|
|
165
165
|
|