@allyhub/sdk 0.15.2 → 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 +24 -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
package/docs/sound.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Sound
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A piece sounds with what it puts there: each part's speech ([speech.md](speech.md)), the music, footage with `audio: true` and the sound effects a part places. Each stem is shaped, levelled to a loudness, the music dips under speech, and the sum is mastered. The render's mix and the preview's are the same computation, sample by sample. This file covers music, sound effects, the mix, the master and how the voice was recorded.
|
|
4
4
|
|
|
5
5
|
```ts file=launch/film.ts
|
|
6
6
|
import { part, take, video } from "@allyhub/sdk";
|
|
@@ -77,13 +77,13 @@ A path written as a string (the music's file, a sound's) is relative to the modu
|
|
|
77
77
|
- `end`: where it stops, `"film"` (the video's end, the default), `"bar"` or `"beat"` (the last bar line or beat before it); its fade out ends there.
|
|
78
78
|
- `snap`: parts without speech end on the music's beats as the stretches lay them; default false.
|
|
79
79
|
- `gain`: its level over the film, `[{ at, db }]`, dB over its mix level, linear in dB between points and held outside them, added to its dip under speech.
|
|
80
|
-
- `filter`: an ffmpeg audio filter chain run on the file as it is decoded, on the file's clock. One chain
|
|
80
|
+
- `filter`: an ffmpeg audio filter chain run on the file as it is decoded, on the file's clock. One chain of filters that shape the file's own sound in place, keeping its timing.
|
|
81
81
|
- `eq`: bands, in order, `{ type, hz, db?, q?, keys? }`: `highpass`, `lowpass`, `bandpass` (`q` default 0.707), `peak` (`q` default 1), `lowshelf`, `highshelf` (`q` the slope, default 1). `keys: [{ at, hz?, db?, q? }]` move a band over the film.
|
|
82
82
|
- `compress`: a compressor after the bands, `{ threshold, ratio?, knee?, attack?, release?, window? }`, its threshold dB over the music's own loudness; the rest `COMPRESS_DEFAULTS` (ratio 2, knee 6 dB, attack 0.01 s, release 0.15 s, window 0.01 s).
|
|
83
83
|
|
|
84
84
|
- A moment of `gain` and `keys` (`at`) is film seconds, an anchor of any part (`"@drop"`, `"@drop-0.2"`, `"@/drop"`), a part's key (its start), or `{ part, at }`, a word reference or seconds in that part ([speech.md](speech.md#word-references)). One that is not there is AK-T004.
|
|
85
|
-
-
|
|
86
|
-
-
|
|
85
|
+
- Beats, bars, `snap` and `end` count on the tempo: `bpm`, or the one the build measured. Give `bpm` for a file with none measured (a fact says so); until then the file plays once and ends with the film.
|
|
86
|
+
- `loop` carries music shorter than the film to its end; the `music-length` fact gives both lengths.
|
|
87
87
|
- The music is levelled as shaped: `filter`, `eq` and `compress` change how it sounds, `mix` and `gain` how loud. The values are `MUSIC_DEFAULTS` ([defaults.md](defaults.md)).
|
|
88
88
|
|
|
89
89
|
## Sound effects
|
|
@@ -102,7 +102,7 @@ A file is levelled by its integrated loudness to `mix.sfx`; a sound too short or
|
|
|
102
102
|
|
|
103
103
|
## Footage sound
|
|
104
104
|
|
|
105
|
-
A footage layer's own sound is mixed
|
|
105
|
+
A footage layer's own sound is mixed in with `footage(file, { audio: true })`; `gainDb` (default 0) changes its level over the mix's footage level. A take's own footage (`footage()` without a file) sounds as the part's speech ([footage.md](footage.md)).
|
|
106
106
|
|
|
107
107
|
## The mix
|
|
108
108
|
|
|
@@ -125,7 +125,7 @@ The values are `MIX_DEFAULTS`. A part's own speech level is `speechGainDb` ([spe
|
|
|
125
125
|
|
|
126
126
|
`video({ master })`: a loudness in LUFS (−70 to 0), `{ lufs?, truePeak? }` (`truePeak` −9 to 0 dBTP), or `false`. The default is −14 LUFS, with a −3 dBTP true peak (`MASTER_DEFAULTS`).
|
|
127
127
|
|
|
128
|
-
The mix's integrated loudness is measured and one gain brings it to `lufs`; a limiter at 4 times the sample rate holds the true peak; what came out is measured again and the gain corrected by what the limiter took, at most 4 times, until within 0.1 LU (`MASTER_MECHANICS`).
|
|
128
|
+
The mix's integrated loudness is measured and one gain brings it to `lufs`; a limiter at 4 times the sample rate holds the true peak; what came out is measured again and the gain corrected by what the limiter took, at most 4 times, until within 0.1 LU (`MASTER_MECHANICS`). One gain serves the whole mix, so it keeps its loudness range. `false` (or `lufs: false`) keeps the mix's own level and only limits its peaks.
|
|
129
129
|
|
|
130
130
|
`allyhub audio` measures a video's mix as the render makes it: its loudness, range and true peak, what the master did, silences, onsets against cuts, each part's speech. `allyhub render --type wav` writes the mastered mix.
|
|
131
131
|
|
|
@@ -133,7 +133,7 @@ The mix's integrated loudness is measured and one gain brings it to `lufs`; a li
|
|
|
133
133
|
|
|
134
134
|
`video({ mic })` and `part({ mic })` say what heard the voice: a microphone of some pattern and distance, in a room, over the room's own sound, through what a device does by itself, then the finishing done to it after. The speech is played through it in the mix, the same every time. A part's `mic` replaces the video's for that part; parts with the same setting are one recording, with one room tone under them while they play.
|
|
135
135
|
|
|
136
|
-
-
|
|
136
|
+
- Without `mic`, it is `"studio"`: a cardioid 0.2 m away, no room, no room tone, finished (`"finish"`: a high-pass, a gentle de-esser and compressor). `mic: false` plays the files as they are.
|
|
137
137
|
- A setup by name: `"studio"`, `"phone"` (a phone held in front, a little below the face: two omni microphones, its band, its automatic gain, a small dead room and its room tone), `"lav"` (a clip-on on the chest, in a dead room, finished). Their values are `SETUP_PRESETS`, the rooms' `ROOM_PRESETS` and the finishing's `POST_PRESETS` ([defaults.md](defaults.md)).
|
|
138
138
|
- Any value of a setup changes:
|
|
139
139
|
|
package/docs/speech.md
CHANGED
|
@@ -48,7 +48,7 @@ Alone, a take is the whole recording, from its first word to its last. Each meth
|
|
|
48
48
|
- `.edits(path)`: a cut list, a `.json` file ([Edits files](#edits-files)). One that is not there, or does not match the format, is AK-T005: the take would play uncut.
|
|
49
49
|
- `.denoise(db?)`: reduces its noise by `db` (over 0, up to 97; default 12) with ffmpeg's FFT denoiser, in the render and the preview.
|
|
50
50
|
- `.roomTone(tone)`: how the part's lead and tail are filled where the take has no silence of its own round the part's words ([Room tone](#room-tone)).
|
|
51
|
-
- `.speed(times)`: plays it `times` as fast, its pitch kept (0.5 to 2); its words, the part's length and everything timed by them follow. The file
|
|
51
|
+
- `.speed(times)`: plays it `times` as fast, its pitch kept (0.5 to 2); its words, the part's length and everything timed by them follow. The file stays as it is. A part that shows the take's own picture plays it at speed 1 (`part()` throws for another speed).
|
|
52
52
|
|
|
53
53
|
With `.edits()`, `range` and `saying` look only at the words the edits keep: a phrase or line said only in removed words is AK-T006. A take a voice tool generated keeps the text it was made from in its `.provenance`: a part whose line is not in that text is AK-T007.
|
|
54
54
|
|
|
@@ -105,10 +105,10 @@ Text to speech. `allyhub voice` makes the missing files with the cloud voice too
|
|
|
105
105
|
|
|
106
106
|
- `voice`: the voice tool's voice id (`allyhub ai-media find-voices` finds them); default the tool's own.
|
|
107
107
|
- `tool`: the voice tool; default `"speak"` (`"clone-voice"` speaks in the voice of a recording you give in `params`; `allyhub help ai-media <tool>` lists its input).
|
|
108
|
-
- `params`: more input for the tool, plain JSON: fields its schema has besides the text and voice
|
|
109
|
-
- `speed`: 0.5 to 2, default 1: plays the file faster or slower, pitch kept, as `.speed()` does.
|
|
108
|
+
- `params`: more input for the tool, plain JSON: fields its schema has besides the text and voice, which `say` sends itself.
|
|
109
|
+
- `speed`: 0.5 to 2, default 1: plays the file faster or slower, pitch kept, as `.speed()` does. It is applied in playback, so one file serves every speed.
|
|
110
110
|
|
|
111
|
-
The file is named by a hash of the text read aloud, the voice, the tool and the params: a changed line
|
|
111
|
+
The file is named by a hash of the text read aloud, the voice, the tool and the params: a changed line gets a new file (`allyhub voice`). Text from `s(key)` is read aloud as its said side ([Shown and said](#shown-and-said)).
|
|
112
112
|
|
|
113
113
|
## Word references
|
|
114
114
|
|
|
@@ -163,7 +163,7 @@ export const how = (s: MessageReader) =>
|
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
- An anchor is looked up in the line the part says, so the speech comes from that script line: `say(s("<prefix>.<part>.say"))` or `take(…).saying(s(…))`. A name the line does not have is AK-T004.
|
|
166
|
-
- A name is letters, digits, `_` and `-`, once in a line; stretches may overlap. A name written twice, an end without a start, a stretch with no words and an anchor in a plural are AK-M007.
|
|
166
|
+
- A name is letters, digits, `_` and `-`, once in a line; stretches may overlap. A name written twice, an end without a start, a stretch with no words and an anchor in a plural are AK-M007. Put an anchor before a `<shown|said>` piece.
|
|
167
167
|
- An anchor lands by the line's letters matched to the words of its sound.
|
|
168
168
|
- `ctx.at("@name")` is seconds from the part's start; `ctx.film.at("@name")` is film seconds and takes an anchor of any part. `allyhub inspect timeline` prints where each landed.
|
|
169
169
|
|
|
@@ -195,11 +195,11 @@ type CaptionTrackCue = {
|
|
|
195
195
|
| --- | --- | --- |
|
|
196
196
|
| `maxChars` | 32 (16 for Chinese, Japanese and Korean) | Most characters in a cue |
|
|
197
197
|
| `maxWords` | none | Most words in a cue |
|
|
198
|
-
| `keep` | none | Phrases a cue
|
|
198
|
+
| `keep` | none | Phrases a cue keeps whole, matched as said; the cue round one may run over the limits |
|
|
199
199
|
| `close` | 0.4 | A gap between two cues shorter than this many seconds closes |
|
|
200
200
|
| `edges` | false | `true`: the first cue from the part's start, the last to its end |
|
|
201
201
|
|
|
202
|
-
Cues come from the part's speech (a cut take's kept words, spelled as the script when there is one), break at sentence and clause ends, then by length,
|
|
202
|
+
Cues come from the part's speech (a cut take's kept words, spelled as the script when there is one), break at sentence and clause ends, then by length, each within one part. In a J or L cut, the words heard under a neighbour's picture are there too. Where they go and which words they stress is the layer's code:
|
|
203
203
|
|
|
204
204
|
```ts file=launch/captions.ts
|
|
205
205
|
import { custom } from "@allyhub/sdk";
|
package/docs/video.md
CHANGED
|
@@ -97,7 +97,7 @@ format: { format: "9x16", safe: { bottom: 520 } }
|
|
|
97
97
|
|
|
98
98
|
`safe` is whole pixels per edge; edges not given keep the format's.
|
|
99
99
|
|
|
100
|
-
A layer reads `ctx.format` (the name) and `ctx.dims`: `{ width, height, orient, safe }`, `orient` `"landscape"`, `"portrait"` or `"square"`, `safe` the covered edges in pixels. Lay out by `ctx.dims` or `layout(ctx)` ([layers.md](layers.md#the-content-box)),
|
|
100
|
+
A layer reads `ctx.format` (the name) and `ctx.dims`: `{ width, height, orient, safe }`, `orient` `"landscape"`, `"portrait"` or `"square"`, `safe` the covered edges in pixels. Lay out by `ctx.dims` or `layout(ctx)` ([layers.md](layers.md#the-content-box)), which hold every format: a custom `WxH` and a changed `safe` too.
|
|
101
101
|
|
|
102
102
|
## Parts
|
|
103
103
|
|
|
@@ -241,7 +241,7 @@ Each frame's marks are a function of its frame number in the film: a still is th
|
|
|
241
241
|
|
|
242
242
|
- One chain: no `;`, no `[labels]`, no filter that reads or writes files.
|
|
243
243
|
- It gets the picture opaque as 8-bit planar RGB (`gbrp`), its `t` the film's time, and what it gives back is made opaque `gbrp` again.
|
|
244
|
-
-
|
|
244
|
+
- Time a chain by `t`, the film's time (`n` counts from each segment's first frame). A chain whose frames depend on where a segment starts (`n`, a seed drawn per frame, neighbouring frames) is AK-D002; one that does not run is AK-M001.
|
|
245
245
|
|
|
246
246
|
A part's `post: { filter }` is the same contract on that part's picture alone, before the camera's marks and the video's `post`: a clip's white balance or exposure.
|
|
247
247
|
|
|
@@ -265,4 +265,4 @@ export default video({
|
|
|
265
265
|
|
|
266
266
|
## Motion blur
|
|
267
267
|
|
|
268
|
-
`motionBlur: { samples, shutter? }`: each frame blends `samples` (2 to 16) moments of the graphic layers across `shutter` of the frame's time (over 0, up to 1; default 0.5, a 180° shutter). Footage
|
|
268
|
+
`motionBlur: { samples, shutter? }`: each frame blends `samples` (2 to 16) moments of the graphic layers across `shutter` of the frame's time (over 0, up to 1; default 0.5, a 180° shutter). Footage keeps the blur it was filmed with, and `z: "overlay"` layers stay sharp.
|
package/docs/websites.md
CHANGED
|
@@ -14,7 +14,7 @@ A website is any web project in a folder, made with the tools the agent chooses
|
|
|
14
14
|
| Field | Required | What |
|
|
15
15
|
| --- | --- | --- |
|
|
16
16
|
| `dev` | no | The command that serves the website while it is made, run by a shell in the website's folder. None: `output` is served as it is |
|
|
17
|
-
| `build` | no | The command that builds it into `output`. None:
|
|
17
|
+
| `build` | no | The command that builds it into `output`. None: `output` is used as it is |
|
|
18
18
|
| `output` | yes | The built website's folder, from the website's folder; `.` for a site of plain files |
|
|
19
19
|
|
|
20
20
|
## Previewing
|
|
@@ -23,7 +23,7 @@ Studio runs `dev` by a shell in the website's folder, with its `node_modules/.bi
|
|
|
23
23
|
|
|
24
24
|
| Variable | What |
|
|
25
25
|
| --- | --- |
|
|
26
|
-
| `PORT` | The port to listen on
|
|
26
|
+
| `PORT` | The port to listen on, where Studio reaches the dev server |
|
|
27
27
|
| `HOST` | `127.0.0.1`, the address to listen on (a server on `localhost` may listen on `::1` alone) |
|
|
28
28
|
| `ALLYHUB_PREVIEW_HOSTS` | The hosts a request may name, comma-separated: in a cloud Studio, the sandbox's and the gateway's for that port. A dev server that checks the `Host` header must allow them (Next.js: `allowedDevOrigins`) |
|
|
29
29
|
| `__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS` | The same hosts, as Vite reads them: Vite's and every framework on it (Astro, SvelteKit, Nuxt, VitePress) allow them with no configuration |
|
|
@@ -49,7 +49,7 @@ A hosted site is static files, `index.html` at the root of `output`:
|
|
|
49
49
|
|
|
50
50
|
- `/about` serves `about.html`, `/pricing/` serves `pricing/index.html`, and each page's other addresses redirect to that one. The nearest `404.html` answers a page not found, with status 404: nothing to configure.
|
|
51
51
|
- `_redirects` and `_headers` at the root of `output` work as on Netlify: a real file wins over a rule that does not end in `!`, the default status is 301, `/* /index.html 200` makes a single-page app, and a 200 rule stays inside the site. A site cannot set cookies, or the headers that are the platform's.
|
|
52
|
-
-
|
|
52
|
+
- Kept out of the site: dotfiles other than `.well-known/`, `node_modules`, the website's file, `package.json` and lockfiles. A link in `output` is refused.
|
|
53
53
|
- A file is at most 1 GiB, a version 20,000 files and 5 GiB. `Range` works, so video plays from a page, Safari's included.
|
|
54
54
|
- Every file is revalidated by its digest. Files a framework names by their bytes are kept by browsers only if `_headers` says so: `/_astro/*` then ` Cache-Control: public, max-age=31536000, immutable` (or `/assets/*` for Vite, `/_next/static/*` for Next.js).
|
|
55
55
|
- A site stays out of search engines until the person allows it.
|
package/docs/x.md
CHANGED
|
@@ -23,7 +23,7 @@ posts:
|
|
|
23
23
|
- **A long post** is a post over 280, which an X Premium account publishes up to 25,000. `allyhub.config.ts`'s `x: { premium: true }` says the account is Premium; it also takes videos up to 4 hours and 16 GB. X's timeline folds a long post at "Show more": at most 280 characters, back to a word's end (measured on x.com; `allyhub frames` draws the fold).
|
|
24
24
|
- **Plain text.** The API publishes no bold or italics. A link is its address.
|
|
25
25
|
- **A post's text as a block (`|`) or in quotes** when it holds ` #` (YAML reads the rest of the line as a comment), starts with `@`, `#` or a quote, or holds `: `. The line break a block ends in is not posted.
|
|
26
|
-
- **Media**: up to 4 pictures (JPEG, PNG or WebP, 5 MB each), or 1 GIF (15 MB), or 1 video (MP4 or MOV),
|
|
26
|
+
- **Media**: up to 4 pictures (JPEG, PNG or WebP, 5 MB each), or 1 GIF (15 MB), or 1 video (MP4 or MOV), one kind a post. Alt text up to 1,000 characters. X publishes no picture size, crop or safe area. A video is checked against the widest of what X publishes: 0.5 s to 20 minutes (4 hours with Premium), 8 GB (16 GB), sides 32 px to 1920 on the long side and 1200 on the short, 1:3 to 3:1. X's ways of posting take less: its web upload 1:2.39 to 2.39:1 at 40 frames a second and 25 Mbps, and without Premium 140 seconds and 512 MB; its API's media guide 1280×1024 and 60 frames a second. A 1280×720 or 720×1280 H.264 MP4 at 30 frames a second under 140 seconds suits every way.
|
|
27
27
|
- **Another item's made file**: `./shots.ts#hero` is the image `shots`'s board `hero`, made first when the post is rendered; a video item's file is its first version. Its bytes are checked when it is made.
|
|
28
28
|
|
|
29
29
|
## An X article
|
|
@@ -70,4 +70,4 @@ $$
|
|
|
70
70
|
|
|
71
71
|
`allyhub check` reports what X refuses under `allyhub.x/…`, at its line. `allyhub inspect <post>` gives each post's weighted length beside 280 and 25,000, its links, mentions, hashtags and cashtags, and its media's bytes; `allyhub inspect <article>` its words, its weighted length, its headings, its media, its embedded posts and links' cards, and its code's weight against 10,000. `allyhub frames` draws a post or an article as X shows it once published (a thread as the timeline does, an article in X's column), in Inter in place of X's own face; an embedded post and a link's card are drawn by their address, as their content is X's to fetch.
|
|
72
72
|
|
|
73
|
-
`allyhub render <post>` writes POST /2/tweets's request for each post (`posts.json`, the media beside it), or what a person posts by hand (`--type txt`: each post's text as written, `1.txt`, `2.txt`…, each medium beside it as `<post>-<place>` and its alt text in `<post>-<place>.alt.txt`). `allyhub render <article>` writes POST /2/articles/draft's request (`article.json`, its media beside it with `media.json`). The editor's
|
|
73
|
+
`allyhub render <post>` writes POST /2/tweets's request for each post (`posts.json`, the media beside it), or what a person posts by hand (`--type txt`: each post's text as written, `1.txt`, `2.txt`…, each medium beside it as `<post>-<place>` and its alt text in `<post>-<place>.alt.txt`). `allyhub render <article>` writes POST /2/articles/draft's request (`article.json`, its media beside it with `media.json`). The editor's Download offers `txt` and a picture (`png`) of a post, and a picture of an article; the requests wait for publishing. Publishing to X is not built.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allyhub/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "What an agent writes videos, decks and workbooks with: each built-in kind's authoring API, re-exported from its extension. The root, /dom, /media and /scenery are the video's: video(), parts with their speech, footage and sounds, defineComponent() and custom() layers, the layout, motion and input helpers, the scenery() layer's options; /slides is the deck's, python-pptx's API; /image is the image's, its boards each its own size; /sheets is the sheet's, openpyxl's API. Nothing a host needs.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://allyhub.com",
|