animader-cli 0.1.1 → 0.2.1

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.
@@ -0,0 +1,279 @@
1
+ ; animader world schema - the record of what one execution supplies
2
+ ; (old/plans/animader/06-world.md, road step 5's world record).
3
+ ;
4
+ ; Seven capabilities, one provider each, written as one `(world ...)`
5
+ ; root. A world document is whole: there is no inheritance between
6
+ ; worlds, and derivation is the editor's Snapshot gesture, never a
7
+ ; resolution rule in the record. In the aggregate a world is a root
8
+ ; beside the piece's and the manifest names it by its `:name`; in the
9
+ ; split spelling it is its own file, `<name>.world`, and the manifest
10
+ ; names the file. A world root the manifest does not list is the
11
+ ; workspace's own: shown dimmed, dropped at export, never split.
12
+ ;
13
+ ; The provider set is the v1 set the plan writes. Step 5 renders the
14
+ ; road's named half of it (`live`, `frozen`, `values`, a viewport and
15
+ ; `from-zero`, with `none` input so a sessionless piece is a function
16
+ ; of the clock alone); the rest (replay, frame-clock, scaled, loop,
17
+ ; checkpoints, audio, recorded params) parses here and renders with
18
+ ; step 10's half, beside the interaction tier, so a world document
19
+ ; written against the full set loads today and no diagnostic pretends a
20
+ ; provider exists before it does.
21
+ ;
22
+ ; The numbers are authored, never host-written: a world a host writes
23
+ ; (a snapshot) renders its values in goldens as f32 bit patterns, the
24
+ ; pacer float-in-golden discipline, and the tick is always an integer
25
+ ; division of the world's integer clock, so no float touches it.
26
+ ;
27
+ ; The provider forms sit at plugin scope beside the kinds that name
28
+ ; them, the pacer precedent (`seq`/`chain`/`spring` beside
29
+ ; `ease-form`'s head set), so a head-set kind resolves them without a
30
+ ; positional carrier.
31
+ (plugin :name animader
32
+
33
+ ; ---- value kinds ----
34
+
35
+ ; `world-id`, not `world-name`: the two animader manifests are
36
+ ; preloaded as separate plugins, and a kind name two of them declare
37
+ ; is ambiguous at every referencing site (the eighth ruling's class,
38
+ ; SJON's sixth aggregate walk), so each manifest names its own kinds.
39
+ (value-kind :name world-id
40
+ :description "A world's own :name; the manifest's :default-world and :worlds name it in the aggregate spelling."
41
+ :underlying symbol)
42
+
43
+ (value-kind :name clock-seconds
44
+ :description "Seconds from zero on a world document; authored. The corpus renders it in goldens as an f32 bit pattern, never as a decimal."
45
+ :underlying number
46
+ :numeric (numeric-bounds :min 0)
47
+ :unit (unit-shape :reject true))
48
+
49
+ (value-kind :name frame-rate
50
+ :description "Frames per second, 1..1000; paint n at t = n / F, one IEEE division, the same bits everywhere."
51
+ :underlying number
52
+ :numeric (numeric-bounds :min 1 :max 1000)
53
+ :unit (unit-shape :reject true))
54
+
55
+ (value-kind :name clock-scale
56
+ :description "The clock multiplier K."
57
+ :underlying number
58
+ :numeric (numeric-bounds :min 0.25 :max 4)
59
+ :unit (unit-shape :reject true))
60
+
61
+ (value-kind :name tick-count
62
+ :description "A tick count: pre-roll, a checkpoint position or a warm count; a second is 100 ticks and the rate lives in no document."
63
+ :underlying number
64
+ :numeric (numeric-bounds :min 0 :max 4294967295 :integer true)
65
+ :unit (unit-shape :reject true))
66
+
67
+ (value-kind :name viewport-dim
68
+ :description "One viewport edge in device pixels."
69
+ :underlying number
70
+ :numeric (numeric-bounds :min 1 :max 65535 :integer true)
71
+ :unit (unit-shape :reject true))
72
+
73
+ (value-kind :name viewport-shape
74
+ :description "The viewport `[width height]` in device pixels; absent, the artboard's :size, and the editor's own viewport while the piece has no screen."
75
+ :underlying vector
76
+ :vector (vector-shape :len 2 :element viewport-dim))
77
+
78
+ (value-kind :name pointer-lane
79
+ :description "One canvas-normalised pointer lane in [0, 1]."
80
+ :underlying number
81
+ :numeric (numeric-bounds :min 0 :max 1)
82
+ :unit (unit-shape :reject true))
83
+
84
+ (value-kind :name pointer-table
85
+ :description "A synthetic pointer position, two canvas-normalised lanes."
86
+ :underlying vector
87
+ :vector (vector-shape :len 2 :element pointer-lane))
88
+
89
+ ; Distinct names, not the piece manifest's `path-bare`/`path-quoted`:
90
+ ; the two animader manifests are separate plugins, and a kind name two
91
+ ; of them declare is ambiguous at every referencing site (the eighth
92
+ ; ruling's class, SJON's sixth aggregate walk).
93
+ (value-kind :name replay-bare
94
+ :description "A bare session path."
95
+ :underlying symbol)
96
+ (value-kind :name replay-quoted
97
+ :description "A quoted session path, `05-model.md`'s replay spelling."
98
+ :underlying string
99
+ :string-bounds (string-bounds :min-len 1 :max-len 256))
100
+ (value-kind :name path-kind
101
+ :description "A session path relative to the piece's own file, bare or quoted."
102
+ :underlying union
103
+ :union (union-shape :alternatives [replay-bare replay-quoted]))
104
+
105
+ ; ---- the providers ----
106
+
107
+ (value-kind :name time-symbol
108
+ :description "The host clock (live) or the audio host's clock (audio, required when Audio is live)."
109
+ :underlying symbol
110
+ :members (member-set
111
+ (member :name live :description "The host clock; one paint per host frame, ticks on demand.")
112
+ (member :name audio :description "The audio host plays and masters Time.")))
113
+
114
+ (value-kind :name time-frozen
115
+ :description "One frozen instant."
116
+ :underlying form
117
+ :heads (head-set :names [frozen]))
118
+
119
+ (value-kind :name time-frame-clock
120
+ :description "The export rate's clock."
121
+ :underlying form
122
+ :heads (head-set :names [frame-clock]))
123
+
124
+ (value-kind :name time-scaled
125
+ :description "The host clock scaled."
126
+ :underlying form
127
+ :heads (head-set :names [scaled]))
128
+
129
+ (value-kind :name time-loop
130
+ :description "The host clock wrapped."
131
+ :underlying form
132
+ :heads (head-set :names [loop]))
133
+
134
+ (value-kind :name time-provider
135
+ :description "The Time capability's provider."
136
+ :underlying union
137
+ :union (union-shape :alternatives [time-symbol time-frozen time-frame-clock time-scaled time-loop]))
138
+
139
+ (value-kind :name params-symbol
140
+ :description "The declared defaults, or the session log's adjust records dequantised over each param's range."
141
+ :underlying symbol
142
+ :members (member-set
143
+ (member :name defaults :description "Every param at its :default.")
144
+ (member :name recorded :description "The log's (adjust ...) records, dequantised over each param's range; step 10's half.")))
145
+
146
+ (value-kind :name params-values
147
+ :description "A held table over the defaults."
148
+ :underlying form
149
+ :heads (head-set :names [values]))
150
+
151
+ (value-kind :name params-provider
152
+ :description "The Params capability's provider."
153
+ :underlying union
154
+ :union (union-shape :alternatives [params-symbol params-values]))
155
+
156
+ (value-kind :name input-symbol
157
+ :description "The live DOM writer, or no input at all."
158
+ :underlying symbol
159
+ :members (member-set
160
+ (member :name live :description "The host's live pointer.")
161
+ (member :name none :description "No input; a sessionless piece under none renders as a function of the clock alone.")))
162
+
163
+ (value-kind :name input-replay
164
+ :description "A session document replayed as the input."
165
+ :underlying form
166
+ :heads (head-set :names [replay]))
167
+
168
+ (value-kind :name input-synthetic
169
+ :description "A fixed input table."
170
+ :underlying form
171
+ :heads (head-set :names [synthetic]))
172
+
173
+ (value-kind :name input-provider
174
+ :description "The Input capability's provider."
175
+ :underlying union
176
+ :union (union-shape :alternatives [input-symbol input-replay input-synthetic]))
177
+
178
+ (value-kind :name assets-provider
179
+ :description "The Assets capability's provider."
180
+ :underlying symbol
181
+ :members (member-set
182
+ (member :name project :description "The project's paths.")
183
+ (member :name embedded :description "The exported piece carries them.")))
184
+
185
+ (value-kind :name state-symbol
186
+ :description "Persistent state, stepped once per tick; legal for the editor and the stage only, never a published or replay world. Bare `from-zero` is the zero-warm spelling of the form below, the hole rule applied to the record."
187
+ :underlying symbol
188
+ :members (member-set
189
+ (member :name live :description "Carried across ticks and paints.")
190
+ (member :name from-zero :description "Reset, no pre-roll; `(from-zero)` with :warm 0.")))
191
+
192
+ (value-kind :name state-from-zero
193
+ :description "Reset, then pre-roll."
194
+ :underlying form
195
+ :heads (head-set :names [from-zero]))
196
+
197
+ (value-kind :name state-checkpoint
198
+ :description "Restore a checkpoint, then step."
199
+ :underlying form
200
+ :heads (head-set :names [checkpoint]))
201
+
202
+ (value-kind :name state-provider
203
+ :description "The State capability's provider."
204
+ :underlying union
205
+ :union (union-shape :alternatives [state-symbol state-from-zero state-checkpoint]))
206
+
207
+ (value-kind :name audio-provider
208
+ :description "The Audio capability's provider, both what is read and where sound goes."
209
+ :underlying symbol
210
+ :members (member-set
211
+ (member :name live :description "The audio host plays and masters Time; requires :time audio.")
212
+ (member :name offline :description "Rendered in lockstep with the tick; step 10's half.")
213
+ (member :name muted :description "The graph runs at gain 0, still masters; step 10's half.")
214
+ (member :name none :description "No audio.")))
215
+
216
+ ; ---- the provider forms, spelled as the plans spell them ----
217
+ ;
218
+ ; `06-world.md`'s provider table writes `frozen T`, `frame-clock F`,
219
+ ; `scaled K`, `loop L`, `checkpoint C` and `05-model.md` writes
220
+ ; `(replay "session-04.sjon")`: one positional value each, the value
221
+ ; being the whole meaning. `from-zero` takes `:warm N` as a key (the
222
+ ; table's own spelling) and `synthetic` takes `:pointer` as one.
223
+
224
+ (form :name frozen :positional clock-seconds
225
+ :description "The frozen instant, in seconds from zero; the paint's time, every paint.")
226
+
227
+ (form :name frame-clock :positional frame-rate
228
+ :description "The frame rate clock: paint n at t = n / F exactly.")
229
+
230
+ (form :name scaled :positional clock-scale
231
+ :description "The host clock multiplied by K.")
232
+
233
+ (form :name loop :positional clock-seconds
234
+ :description "The host clock wrapped at L seconds.")
235
+
236
+ (form :name replay :positional path-kind
237
+ :description "A session document replayed as the input; step 10's half, with the event log.")
238
+
239
+ (form :name synthetic
240
+ :description "A fixed input table: one pointer position, no log."
241
+ (key :name pointer :type pointer-table
242
+ :description "[x y] in canvas-normalised units."))
243
+
244
+ (form :name from-zero
245
+ :description "Reset, then pre-roll."
246
+ (key :name warm :type tick-count :optional true :default 0
247
+ :description "Ticks of pre-roll before tick 0."))
248
+
249
+ (form :name checkpoint :positional tick-count
250
+ :description "Restore a checkpoint, then step; step 10's half, with the readback ask.")
251
+
252
+ ; `(values ...)` is open: its keys are param names, the `{...}` of
253
+ ; `06-world.md`'s provider table and `05-model.md`'s poster world
254
+ ; (`(values :density 36000)`). Each kvpair's value is a bare number
255
+ ; the World reader checks itself (an open form's keys are dynamic, so
256
+ ; the tag check is the reader's, `provider_unknown` when it fires).
257
+ (form :name values :open true
258
+ :description "A held table over the defaults, one key per param; the override interposer's own spelling, and the pin row the score reads before it evaluates.")
259
+
260
+ ; ---- the world ----
261
+
262
+ (form :name world
263
+ :description "The record of what one execution supplies: one provider per capability, seven capabilities. The same program under four worlds is the point."
264
+ (key :name name :type world-id
265
+ :description "The world's name; :default-world and :worlds name it in the aggregate spelling.")
266
+ (key :name time :type time-provider :optional true :default live
267
+ :description "The clock.")
268
+ (key :name params :type params-provider :optional true :default defaults
269
+ :description "The param values.")
270
+ (key :name input :type input-provider :optional true :default live
271
+ :description "The input.")
272
+ (key :name viewport :type viewport-shape :optional true
273
+ :description "[width height] in device pixels; absent, the artboard's :size, and the editor's viewport while the piece has no screen.")
274
+ (key :name assets :type assets-provider :optional true :default project
275
+ :description "Where images, fonts and sidecar bytes come from.")
276
+ (key :name state :type state-provider :optional true :default live
277
+ :description "The state provider: live, from-zero with an optional warm pre-roll, or a checkpoint.")
278
+ (key :name audio :type audio-provider :optional true :default none
279
+ :description "The audio seam. `:audio live` requires `:time audio`, and that requirement is the loader's `time_not_audio`.")))
@@ -0,0 +1,16 @@
1
+ (sjon-lsp :version 1
2
+ :bundles [
3
+ (bundle :name program
4
+ :files ["program.sjon"]
5
+ :manifests [".animader/schemas/pngine.sjon"])
6
+ (bundle :name timeline
7
+ :files ["timeline.piece.sjon"]
8
+ :manifests [".animader/schemas/piece.sjon"
9
+ ".animader/schemas/world.sjon"
10
+ ".animader/schemas/session.sjon"
11
+ ".animader/schemas/machine.sjon"
12
+ ".animader/schemas/bridge.sjon"
13
+ ".animader/schemas/tempura.sjon"
14
+ ".animader/schemas/midi.sjon"
15
+ ".animader/schemas/it.sjon"
16
+ ".animader/schemas/pacer.sjon"])])
@@ -32,6 +32,26 @@ Edit `program.sjon` or `timeline.piece.sjon` in any editor. The dev
32
32
  server keeps running until you stop it: press Ctrl-C in its terminal
33
33
  before running other project commands.
34
34
 
35
+ ## Editor schema snapshot
36
+
37
+ This project commits its editor schema snapshot: `sjon-lsp.sjon` plus the
38
+ ten manifests and `metadata.json` under `.animader/schemas/`. The snapshot
39
+ is a copy of the data the `animader` CLI shipped when it created the
40
+ project; creating a project never runs a producer and never fetches a
41
+ schema.
42
+
43
+ Install `sjon-lsp` separately in your editor. This project neither installs
44
+ nor upgrades it, and there is no automatic upgrade or lifetime parity
45
+ guarantee between the snapshot and later Animader, Tempura or PNGine
46
+ releases. To refresh the snapshot deliberately, follow the manual refresh
47
+ procedure in `docs/EDITOR.md`, reviewing the diff before you replace the
48
+ old snapshot.
49
+
50
+ Moving or copying the project preserves that snapshot unchanged; it carries
51
+ no path to the machine that produced it. Upgrading the installed `animader`
52
+ CLI does not upgrade the snapshot and does not prove it matches the newer
53
+ producer. To refresh it, follow the documented manual procedure above.
54
+
35
55
  ## Replacing the soundtrack
36
56
 
37
57
  Move your own audio into this folder as `soundtrack.wav`,
@@ -0,0 +1,48 @@
1
+ # An Animader project
2
+
3
+ This folder was created by `animader new` with the ember starter: four
4
+ kernels, a bake payload and a complete timeline. Two authored files carry
5
+ the piece:
6
+
7
+ - `program.sjon` — the GPU program: the buffers, the ember kernel and the
8
+ passes that run each frame.
9
+ - `timeline.piece.sjon` — the musical timeline: tempo, meter, sections
10
+ and the lanes that animate the program's fields.
11
+
12
+ The generated `soundtrack.wav` is a labeled test tone, not music; move your
13
+ own recognized soundtrack into this folder to replace it.
14
+
15
+ ## Editor schema snapshot
16
+
17
+ This project commits its editor schema snapshot: `sjon-lsp.sjon` plus the
18
+ ten manifests and `metadata.json` under `.animader/schemas/`. The snapshot
19
+ is a copy of the data the `animader` CLI shipped when it created the
20
+ project; creating a project never runs a producer and never fetches a
21
+ schema.
22
+
23
+ Install `sjon-lsp` separately in your editor. This project neither installs
24
+ nor upgrades it, and there is no automatic upgrade or lifetime parity
25
+ guarantee between the snapshot and later Animader, Tempura or PNGine
26
+ releases. To refresh the snapshot deliberately, follow the manual refresh
27
+ procedure in `docs/EDITOR.md`, reviewing the diff before you replace the
28
+ old snapshot.
29
+
30
+ Moving or copying the project preserves that snapshot unchanged; it carries
31
+ no path to the machine that produced it. Upgrading the installed `animader`
32
+ CLI does not upgrade the snapshot and does not prove it matches the newer
33
+ producer. To refresh it, follow the documented manual procedure above.
34
+
35
+ ## The workflow this project is shaped for
36
+
37
+ `animader dev` (play the project while you edit), `animader build`
38
+ (validate and write the generated output) and `animader export --out dist`
39
+ (write a standalone release to a fresh folder) are the commands this
40
+ layout targets. They are provided by the `animader` CLI — run
41
+ `animader --help` to see which commands your version provides.
42
+
43
+ ## Editing
44
+
45
+ Edit `program.sjon` or `timeline.piece.sjon` in any editor. The dev
46
+ server keeps running until you stop it: press Ctrl-C in its terminal
47
+ before running other project commands. This starter ships no ignore file;
48
+ add the generated-output entries your own version control needs.
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "format": "animader-toolchain/1",
3
- "toolchainVersion": "0.1.1",
3
+ "toolchainVersion": "0.2.1",
4
4
  "target": {
5
5
  "os": "darwin",
6
6
  "arch": "arm64"
7
7
  },
8
- "createdAt": "2026-10-31T10:56:09.453Z",
8
+ "createdAt": "2026-11-01T21:03:44.386Z",
9
9
  "producers": {
10
10
  "animader": {
11
- "version": "0.1.1",
12
- "revision": "5db97d095816fc9e78ca65b854b5671573e8f62e"
11
+ "version": "0.2.1",
12
+ "revision": "971945f21579b5efaac7a599a0b08076a09ad066"
13
13
  },
14
14
  "pngine": {
15
15
  "version": "4.1.0",
@@ -28,8 +28,8 @@
28
28
  "path": "animader/animader.wasm",
29
29
  "package": "animader",
30
30
  "spec": "animader/wasm",
31
- "sha256": "03f545be6a9ba313de975bbf3e7a9e8e63b11a95c67a26b626e02d2e0e21d82e",
32
- "bytes": 1175831
31
+ "sha256": "64c8cb998ddb4bebe16c835b42e55bb399eaac8511818914126eb349f3b8082e",
32
+ "bytes": 1177417
33
33
  },
34
34
  {
35
35
  "path": "animader/index.js",
@@ -190,14 +190,14 @@
190
190
  "pngineCli": {
191
191
  "package": "@pngine/darwin-arm64",
192
192
  "file": "bin/pngine",
193
- "sha256": "cf61a9b46fa1d6d1552a67a68ec29378a338c17251d0f2527b8354e146b25445",
194
- "bytes": 4477864
193
+ "sha256": "e34cd5470a14e27b4df5a695c796a996343e5662b03a0fa1a82183f353ec43d7",
194
+ "bytes": 35159528
195
195
  },
196
196
  "pacerCli": {
197
197
  "package": "@mr_hugo/pacer-darwin-arm64",
198
198
  "file": "bin/pacer",
199
- "sha256": "d9d4765b1e88e591958dd4cb8d668828f0ff010fcef59566aaba1237529e04eb",
200
- "bytes": 6216824
199
+ "sha256": "883127a3e9d0a2e3bd1b2cf189d1dd1b182d12dd2b186776a833d0453edca389",
200
+ "bytes": 6235864
201
201
  }
202
202
  },
203
203
  "helpers": {
@@ -208,5 +208,5 @@
208
208
  "bytes": 8540
209
209
  }
210
210
  },
211
- "digest": "3aed6f6a381f705af040739fe045230295dfe87e228a39a2f0447f92916ae0b6"
211
+ "digest": "0bbe20dfbe26ba987b1b0809ff07166e7c7897cded81683ba9f3dbc8fe83fcd3"
212
212
  }