@nodetool-ai/protocol 0.8.7 → 0.8.8

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.
Files changed (50) hide show
  1. package/dist/.nodetool-build-stamp +1 -1
  2. package/dist/api-schemas/asset-editor-tool-contracts.d.ts +154 -0
  3. package/dist/api-schemas/asset-editor-tool-contracts.d.ts.map +1 -0
  4. package/dist/api-schemas/asset-editor-tool-contracts.js +359 -0
  5. package/dist/api-schemas/asset-editor-tool-contracts.js.map +1 -0
  6. package/dist/api-schemas/document-sharing.d.ts +196 -0
  7. package/dist/api-schemas/document-sharing.d.ts.map +1 -0
  8. package/dist/api-schemas/document-sharing.js +72 -0
  9. package/dist/api-schemas/document-sharing.js.map +1 -0
  10. package/dist/api-schemas/index.d.ts +1 -0
  11. package/dist/api-schemas/index.d.ts.map +1 -1
  12. package/dist/api-schemas/index.js +1 -0
  13. package/dist/api-schemas/index.js.map +1 -1
  14. package/dist/api-schemas/scripts.d.ts +14 -0
  15. package/dist/api-schemas/scripts.d.ts.map +1 -1
  16. package/dist/api-schemas/scripts.js +6 -0
  17. package/dist/api-schemas/scripts.js.map +1 -1
  18. package/dist/api-schemas/timeline-tool-contracts.d.ts +17 -0
  19. package/dist/api-schemas/timeline-tool-contracts.d.ts.map +1 -1
  20. package/dist/api-schemas/timeline-tool-contracts.js +4 -0
  21. package/dist/api-schemas/timeline-tool-contracts.js.map +1 -1
  22. package/dist/api-schemas/timeline-tool-params.d.ts +14 -1
  23. package/dist/api-schemas/timeline-tool-params.d.ts.map +1 -1
  24. package/dist/api-schemas/timeline-tool-params.js +2 -1
  25. package/dist/api-schemas/timeline-tool-params.js.map +1 -1
  26. package/dist/api-schemas/timeline.d.ts +310 -1
  27. package/dist/api-schemas/timeline.d.ts.map +1 -1
  28. package/dist/api-schemas/timeline.js +53 -3
  29. package/dist/api-schemas/timeline.js.map +1 -1
  30. package/dist/api-types.d.ts +9 -8
  31. package/dist/api-types.d.ts.map +1 -1
  32. package/dist/api-types.js.map +1 -1
  33. package/dist/index.d.ts +1 -0
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +1 -0
  36. package/dist/index.js.map +1 -1
  37. package/dist/resource-uri.js +1 -1
  38. package/dist/script-pace.d.ts +2 -0
  39. package/dist/script-pace.d.ts.map +1 -1
  40. package/dist/script-pace.js +12 -0
  41. package/dist/script-pace.js.map +1 -1
  42. package/dist/video-accessories.d.ts +59 -0
  43. package/dist/video-accessories.d.ts.map +1 -0
  44. package/dist/video-accessories.js +125 -0
  45. package/dist/video-accessories.js.map +1 -0
  46. package/dist/ws-commands.d.ts +3 -0
  47. package/dist/ws-commands.d.ts.map +1 -1
  48. package/dist/ws-commands.js +1 -0
  49. package/dist/ws-commands.js.map +1 -1
  50. package/package.json +1 -1
@@ -1 +1 @@
1
- 2026-10-23T10:23:09.790Z
1
+ 2026-10-25T16:17:17.231Z
@@ -0,0 +1,154 @@
1
+ /**
2
+ * The `ui_svg_*` and `ui_audio_*` tool contracts: each tool's name,
3
+ * description and argument shape, read by both hosts that register them. The
4
+ * browser registry (`web/src/lib/tools/builtin/svg.ts`, `audio.ts`) adds the
5
+ * `asset_id` it routes on; the headless eval bridges
6
+ * (`packages/agents/src/evals/surfaces/svg.ts`, `audio.ts`) drive one implicit
7
+ * asset and add nothing.
8
+ *
9
+ * The pure rules both hosts apply before touching a draft live here too, so a
10
+ * call refused in one host is refused in the other with the same sentence:
11
+ * {@link replaceExactlyOnce}, {@link audioRangeFromArgs} and
12
+ * {@link validateAudioEffectParams}. Whether markup parses is each host's own
13
+ * check, because the browser has `DOMParser` and Node does not.
14
+ */
15
+ import { z } from "zod";
16
+ export declare const SVG_TOOL_CONTRACTS: {
17
+ ui_svg_get_state: {
18
+ description: string;
19
+ shape: {};
20
+ };
21
+ ui_svg_set_markup: {
22
+ description: string;
23
+ shape: {
24
+ markup: z.ZodString;
25
+ };
26
+ };
27
+ ui_svg_replace: {
28
+ description: string;
29
+ shape: {
30
+ find: z.ZodString;
31
+ replace: z.ZodString;
32
+ };
33
+ };
34
+ ui_svg_save: {
35
+ description: string;
36
+ shape: {};
37
+ };
38
+ };
39
+ export type SvgToolName = keyof typeof SVG_TOOL_CONTRACTS;
40
+ /**
41
+ * `text` with its one occurrence of `find` replaced. Throws when `find` is
42
+ * missing or occurs more than once, naming what the caller should do.
43
+ */
44
+ export declare function replaceExactlyOnce(text: string, find: string, replace: string): string;
45
+ /** The audio editor's toolbar edits, by the name the agent passes. */
46
+ export declare const AUDIO_EDIT_OPS: readonly ["trim", "delete", "silence", "fade_in", "fade_out", "normalize", "reverse", "gain"];
47
+ export type AudioEditOp = (typeof AUDIO_EDIT_OPS)[number];
48
+ /** A region of the audio, in seconds. */
49
+ export interface AudioToolRange {
50
+ start: number;
51
+ end: number;
52
+ }
53
+ /**
54
+ * The range a call names, or undefined for the whole audio. Throws on half a
55
+ * range or an empty one.
56
+ */
57
+ export declare function audioRangeFromArgs(start?: number, end?: number): AudioToolRange | undefined;
58
+ /** Edits that make no sense over the whole audio. */
59
+ export declare const AUDIO_RANGE_REQUIRED_OPS: readonly AudioEditOp[];
60
+ export declare const AUDIO_TOOL_CONTRACTS: {
61
+ ui_audio_get_state: {
62
+ description: string;
63
+ shape: {};
64
+ };
65
+ ui_audio_edit: {
66
+ description: string;
67
+ shape: {
68
+ start: z.ZodOptional<z.ZodNumber>;
69
+ end: z.ZodOptional<z.ZodNumber>;
70
+ op: z.ZodEnum<{
71
+ delete: "delete";
72
+ fade_in: "fade_in";
73
+ fade_out: "fade_out";
74
+ gain: "gain";
75
+ normalize: "normalize";
76
+ reverse: "reverse";
77
+ silence: "silence";
78
+ trim: "trim";
79
+ }>;
80
+ gain_db: z.ZodOptional<z.ZodNumber>;
81
+ };
82
+ };
83
+ ui_audio_list_effects: {
84
+ description: string;
85
+ shape: {};
86
+ };
87
+ ui_audio_apply_effect: {
88
+ description: string;
89
+ shape: {
90
+ start: z.ZodOptional<z.ZodNumber>;
91
+ end: z.ZodOptional<z.ZodNumber>;
92
+ effect_id: z.ZodString;
93
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
94
+ };
95
+ };
96
+ ui_audio_save: {
97
+ description: string;
98
+ shape: {};
99
+ };
100
+ };
101
+ export type AudioToolName = keyof typeof AUDIO_TOOL_CONTRACTS;
102
+ /** Tools that act on no asset, so neither host adds `asset_id` to them. */
103
+ export declare const AUDIO_ASSETLESS_TOOL_NAMES: readonly AudioToolName[];
104
+ export interface AudioEffectParamSpec {
105
+ key: string;
106
+ label: string;
107
+ min: number;
108
+ max: number;
109
+ step: number;
110
+ defaultValue: number;
111
+ unit: "dB" | "Hz" | "ms" | "s" | "%" | "×" | ":1" | "bits" | "";
112
+ }
113
+ export type AudioEffectGroup = "Tone" | "Dynamics" | "Space" | "Character" | "Time";
114
+ /** What an effect is and takes. The browser editor adds how it renders. */
115
+ export interface AudioEffectSpec {
116
+ id: string;
117
+ label: string;
118
+ group: AudioEffectGroup;
119
+ description: string;
120
+ /** Empty for effects that apply in one click without a dialog. */
121
+ params: AudioEffectParamSpec[];
122
+ /** Output length can differ from the input (speed). */
123
+ changesLength?: boolean;
124
+ }
125
+ /**
126
+ * The editor's effect catalog. `web/src/components/audio_editor/audioEffects.ts`
127
+ * renders each one; its test pins that list to this one.
128
+ */
129
+ export declare const AUDIO_EFFECT_SPECS: readonly AudioEffectSpec[];
130
+ /** The catalog as `ui_audio_list_effects` returns it. */
131
+ export declare const describeAudioEffects: () => {
132
+ id: string;
133
+ name: string;
134
+ group: AudioEffectGroup;
135
+ description: string;
136
+ changesLength: boolean;
137
+ params: {
138
+ key: string;
139
+ label: string;
140
+ min: number;
141
+ max: number;
142
+ default: number;
143
+ unit: "" | "%" | ":1" | "Hz" | "bits" | "dB" | "ms" | "s" | "×";
144
+ }[];
145
+ }[];
146
+ /**
147
+ * The effect `effectId` names, after checking every key of `params` against
148
+ * its parameters and their ranges. Returns the params with defaults filled in.
149
+ */
150
+ export declare function validateAudioEffectParams(effectId: string, params: Record<string, number>): {
151
+ effect: AudioEffectSpec;
152
+ params: Record<string, number>;
153
+ };
154
+ //# sourceMappingURL=asset-editor-tool-contracts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset-editor-tool-contracts.d.ts","sourceRoot":"","sources":["../../src/api-schemas/asset-editor-tool-contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,kBAAkB;;QAE3B,WAAW;QAEX,KAAK;;;QAGL,WAAW;QAEX,KAAK;YACH,MAAM;;;;QAMR,WAAW;QAEX,KAAK;YACH,IAAI;YAIJ,OAAO;;;;QAMT,WAAW;QAEX,KAAK;;CAEiC,CAAC;AAE3C,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAE1D;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,MAAM,CAaR;AAMD,sEAAsE;AACtE,eAAO,MAAM,cAAc,YACzB,MAAM,EACN,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,EACT,MAAM,CACE,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,yCAAyC;AACzC,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAiBD;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,CAAC,EAAE,MAAM,EACd,GAAG,CAAC,EAAE,MAAM,GACX,cAAc,GAAG,SAAS,CAW5B;AAED,qDAAqD;AACrD,eAAO,MAAM,wBAAwB,EAAE,SAAS,WAAW,EAG1D,CAAC;AAEF,eAAO,MAAM,oBAAoB;;Q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E,eAAe,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CA6B7D"}
@@ -0,0 +1,359 @@
1
+ /**
2
+ * The `ui_svg_*` and `ui_audio_*` tool contracts: each tool's name,
3
+ * description and argument shape, read by both hosts that register them. The
4
+ * browser registry (`web/src/lib/tools/builtin/svg.ts`, `audio.ts`) adds the
5
+ * `asset_id` it routes on; the headless eval bridges
6
+ * (`packages/agents/src/evals/surfaces/svg.ts`, `audio.ts`) drive one implicit
7
+ * asset and add nothing.
8
+ *
9
+ * The pure rules both hosts apply before touching a draft live here too, so a
10
+ * call refused in one host is refused in the other with the same sentence:
11
+ * {@link replaceExactlyOnce}, {@link audioRangeFromArgs} and
12
+ * {@link validateAudioEffectParams}. Whether markup parses is each host's own
13
+ * check, because the browser has `DOMParser` and Node does not.
14
+ */
15
+ import { z } from "zod";
16
+ // ---------------------------------------------------------------------------
17
+ // SVG
18
+ // ---------------------------------------------------------------------------
19
+ export const SVG_TOOL_CONTRACTS = {
20
+ ui_svg_get_state: {
21
+ description: "Read the specified SVG: its name, the full draft markup including unsaved edits, whether the draft differs from the saved asset, and any parse issues. Call this before editing.",
22
+ shape: {}
23
+ },
24
+ ui_svg_set_markup: {
25
+ description: "Replace the SVG's draft markup with a complete new document. The preview updates live and the user can undo the change. Markup that does not parse is rejected and the draft stays as it was. For a small change to a large file, use ui_svg_replace.",
26
+ shape: {
27
+ markup: z
28
+ .string()
29
+ .describe("The complete new SVG document, rooted at <svg>.")
30
+ }
31
+ },
32
+ ui_svg_replace: {
33
+ description: "Replace one exact passage of the SVG's draft markup. `find` must occur exactly once; include surrounding attributes to make it unique. The result must still parse. Read the markup with ui_svg_get_state first.",
34
+ shape: {
35
+ find: z
36
+ .string()
37
+ .min(1)
38
+ .describe("Exact text to replace, copied from the markup."),
39
+ replace: z
40
+ .string()
41
+ .describe("Text to put in its place. Empty deletes it.")
42
+ }
43
+ },
44
+ ui_svg_save: {
45
+ description: "Write the SVG's draft markup back to the asset, overwriting the saved file. Call it when the user asks to keep the edits.",
46
+ shape: {}
47
+ }
48
+ };
49
+ /**
50
+ * `text` with its one occurrence of `find` replaced. Throws when `find` is
51
+ * missing or occurs more than once, naming what the caller should do.
52
+ */
53
+ export function replaceExactlyOnce(text, find, replace) {
54
+ const at = text.indexOf(find);
55
+ if (at < 0) {
56
+ throw new Error("`find` does not occur in the markup. Read it again with ui_svg_get_state and copy the passage exactly.");
57
+ }
58
+ if (text.indexOf(find, at + 1) >= 0) {
59
+ throw new Error("`find` occurs more than once. Include more of the surrounding markup so it matches one place.");
60
+ }
61
+ return text.slice(0, at) + replace + text.slice(at + find.length);
62
+ }
63
+ // ---------------------------------------------------------------------------
64
+ // Audio
65
+ // ---------------------------------------------------------------------------
66
+ /** The audio editor's toolbar edits, by the name the agent passes. */
67
+ export const AUDIO_EDIT_OPS = [
68
+ "trim",
69
+ "delete",
70
+ "silence",
71
+ "fade_in",
72
+ "fade_out",
73
+ "normalize",
74
+ "reverse",
75
+ "gain"
76
+ ];
77
+ const rangeShape = {
78
+ start: z
79
+ .number()
80
+ .min(0)
81
+ .optional()
82
+ .describe("Range start in seconds. Pass with `end`; omit both for the whole audio."),
83
+ end: z
84
+ .number()
85
+ .min(0)
86
+ .optional()
87
+ .describe("Range end in seconds. Pass with `start`.")
88
+ };
89
+ /**
90
+ * The range a call names, or undefined for the whole audio. Throws on half a
91
+ * range or an empty one.
92
+ */
93
+ export function audioRangeFromArgs(start, end) {
94
+ if (start === undefined && end === undefined)
95
+ return undefined;
96
+ if (start === undefined || end === undefined) {
97
+ throw new Error("Pass both `start` and `end`, or neither for the whole audio.");
98
+ }
99
+ if (end <= start) {
100
+ throw new Error("`end` must be after `start`.");
101
+ }
102
+ return { start, end };
103
+ }
104
+ /** Edits that make no sense over the whole audio. */
105
+ export const AUDIO_RANGE_REQUIRED_OPS = [
106
+ "trim",
107
+ "delete"
108
+ ];
109
+ export const AUDIO_TOOL_CONTRACTS = {
110
+ ui_audio_get_state: {
111
+ description: "Read the specified audio: name, duration, sample rate, channel count, whether there are unsaved edits, the region the user selected on the waveform, and a peak level (0-1) per window of `peakWindowSeconds`. Use the peaks to find silence (near 0) and loud passages. Call this before editing.",
112
+ shape: {}
113
+ },
114
+ ui_audio_edit: {
115
+ description: "Apply one edit to the audio over a range in seconds, or over the whole audio when the range is omitted. Ops: trim (keep only the range), delete (remove the range and join the rest), silence, fade_in, fade_out, normalize (peak to full scale), reverse, gain (by gain_db). trim and delete need a range. Each edit is one undo step for the user.",
116
+ shape: {
117
+ op: z.enum(AUDIO_EDIT_OPS),
118
+ ...rangeShape,
119
+ gain_db: z
120
+ .number()
121
+ .min(-60)
122
+ .max(24)
123
+ .optional()
124
+ .describe("Gain in decibels for op 'gain'. Positive boosts, negative cuts.")
125
+ }
126
+ },
127
+ ui_audio_list_effects: {
128
+ description: "List the effects ui_audio_apply_effect can run, with each one's parameters: key, range, unit and default.",
129
+ shape: {}
130
+ },
131
+ ui_audio_apply_effect: {
132
+ description: "Run one effect (equalizer, compressor, reverb, echo, speed, and others) over a range in seconds, or the whole audio when the range is omitted. Get the effect ids and parameter keys from ui_audio_list_effects. Omitted parameters use their defaults. Each effect is one undo step for the user.",
133
+ shape: {
134
+ effect_id: z.string().describe("Effect id from ui_audio_list_effects."),
135
+ params: z
136
+ .record(z.string(), z.number())
137
+ .optional()
138
+ .describe("Parameter values keyed by parameter key."),
139
+ ...rangeShape
140
+ }
141
+ },
142
+ ui_audio_save: {
143
+ description: "Write the edited audio back to the asset as WAV, overwriting the saved file. Call it when the user asks to keep the edits.",
144
+ shape: {}
145
+ }
146
+ };
147
+ /** Tools that act on no asset, so neither host adds `asset_id` to them. */
148
+ export const AUDIO_ASSETLESS_TOOL_NAMES = [
149
+ "ui_audio_list_effects"
150
+ ];
151
+ /**
152
+ * The editor's effect catalog. `web/src/components/audio_editor/audioEffects.ts`
153
+ * renders each one; its test pins that list to this one.
154
+ */
155
+ export const AUDIO_EFFECT_SPECS = [
156
+ {
157
+ id: "equalizer",
158
+ label: "Equalizer",
159
+ group: "Tone",
160
+ description: "Boost or cut five frequency bands.",
161
+ params: [
162
+ { key: "low", label: "Low (80 Hz)", min: -18, max: 18, step: 0.5, defaultValue: 0, unit: "dB" },
163
+ { key: "lowMid", label: "Low mid (250 Hz)", min: -18, max: 18, step: 0.5, defaultValue: 0, unit: "dB" },
164
+ { key: "mid", label: "Mid (1 kHz)", min: -18, max: 18, step: 0.5, defaultValue: 0, unit: "dB" },
165
+ { key: "highMid", label: "High mid (4 kHz)", min: -18, max: 18, step: 0.5, defaultValue: 0, unit: "dB" },
166
+ { key: "high", label: "High (12 kHz)", min: -18, max: 18, step: 0.5, defaultValue: 0, unit: "dB" }
167
+ ]
168
+ },
169
+ {
170
+ id: "lowCut",
171
+ label: "Low cut",
172
+ group: "Tone",
173
+ description: "Remove rumble and hum below a frequency (high-pass filter).",
174
+ params: [
175
+ { key: "frequency", label: "Frequency", min: 20, max: 1000, step: 1, defaultValue: 100, unit: "Hz" }
176
+ ]
177
+ },
178
+ {
179
+ id: "highCut",
180
+ label: "High cut",
181
+ group: "Tone",
182
+ description: "Remove hiss and harshness above a frequency (low-pass filter).",
183
+ params: [
184
+ { key: "frequency", label: "Frequency", min: 500, max: 20000, step: 10, defaultValue: 8000, unit: "Hz" }
185
+ ]
186
+ },
187
+ {
188
+ id: "compressor",
189
+ label: "Compressor",
190
+ group: "Dynamics",
191
+ description: "Even out loud and quiet parts.",
192
+ params: [
193
+ { key: "thresholdDb", label: "Threshold", min: -60, max: 0, step: 0.5, defaultValue: -18, unit: "dB" },
194
+ { key: "ratio", label: "Ratio", min: 1, max: 20, step: 0.1, defaultValue: 4, unit: ":1" },
195
+ { key: "kneeDb", label: "Knee", min: 0, max: 24, step: 0.5, defaultValue: 6, unit: "dB" },
196
+ { key: "attackMs", label: "Attack", min: 0, max: 200, step: 0.5, defaultValue: 5, unit: "ms" },
197
+ { key: "releaseMs", label: "Release", min: 10, max: 2000, step: 10, defaultValue: 150, unit: "ms" },
198
+ { key: "makeupDb", label: "Makeup gain", min: 0, max: 24, step: 0.5, defaultValue: 0, unit: "dB" }
199
+ ]
200
+ },
201
+ {
202
+ id: "limiter",
203
+ label: "Limiter",
204
+ group: "Dynamics",
205
+ description: "Stop peaks from going above a ceiling without clipping.",
206
+ params: [
207
+ { key: "inputDb", label: "Input gain", min: 0, max: 24, step: 0.5, defaultValue: 0, unit: "dB" },
208
+ { key: "ceilingDb", label: "Ceiling", min: -24, max: 0, step: 0.1, defaultValue: -1, unit: "dB" },
209
+ { key: "releaseMs", label: "Release", min: 1, max: 1000, step: 1, defaultValue: 80, unit: "ms" }
210
+ ]
211
+ },
212
+ {
213
+ id: "noiseGate",
214
+ label: "Noise gate",
215
+ group: "Dynamics",
216
+ description: "Turn down background noise in the gaps between sounds.",
217
+ params: [
218
+ { key: "thresholdDb", label: "Threshold", min: -80, max: 0, step: 0.5, defaultValue: -40, unit: "dB" },
219
+ { key: "reductionDb", label: "Reduction", min: -80, max: 0, step: 1, defaultValue: -60, unit: "dB" },
220
+ { key: "attackMs", label: "Attack", min: 0, max: 100, step: 0.5, defaultValue: 2, unit: "ms" },
221
+ { key: "holdMs", label: "Hold", min: 0, max: 500, step: 5, defaultValue: 50, unit: "ms" },
222
+ { key: "releaseMs", label: "Release", min: 5, max: 1000, step: 5, defaultValue: 100, unit: "ms" }
223
+ ]
224
+ },
225
+ {
226
+ id: "reverb",
227
+ label: "Reverb",
228
+ group: "Space",
229
+ description: "Place the sound in a room. The tail rings past the selection.",
230
+ params: [
231
+ { key: "decay", label: "Decay", min: 0.2, max: 8, step: 0.1, defaultValue: 2, unit: "s" },
232
+ { key: "preDelayMs", label: "Pre-delay", min: 0, max: 200, step: 1, defaultValue: 20, unit: "ms" },
233
+ { key: "tone", label: "Tone", min: 1000, max: 20000, step: 100, defaultValue: 8000, unit: "Hz" },
234
+ { key: "mix", label: "Mix", min: 0, max: 100, step: 1, defaultValue: 35, unit: "%" }
235
+ ]
236
+ },
237
+ {
238
+ id: "echo",
239
+ label: "Echo",
240
+ group: "Space",
241
+ description: "Repeat the sound with fading copies. Echoes ring past the selection.",
242
+ params: [
243
+ { key: "delayMs", label: "Delay", min: 20, max: 2000, step: 5, defaultValue: 350, unit: "ms" },
244
+ { key: "feedback", label: "Feedback", min: 0, max: 90, step: 1, defaultValue: 40, unit: "%" },
245
+ { key: "mix", label: "Mix", min: 0, max: 100, step: 1, defaultValue: 35, unit: "%" }
246
+ ]
247
+ },
248
+ {
249
+ id: "chorus",
250
+ label: "Chorus",
251
+ group: "Space",
252
+ description: "Thicken the sound with a slowly moving copy of itself.",
253
+ params: [
254
+ { key: "rateHz", label: "Rate", min: 0.1, max: 8, step: 0.1, defaultValue: 1.2, unit: "Hz" },
255
+ { key: "depthMs", label: "Depth", min: 0.5, max: 10, step: 0.1, defaultValue: 3, unit: "ms" },
256
+ { key: "delayMs", label: "Delay", min: 5, max: 40, step: 0.5, defaultValue: 15, unit: "ms" },
257
+ { key: "mix", label: "Mix", min: 0, max: 100, step: 1, defaultValue: 50, unit: "%" }
258
+ ]
259
+ },
260
+ {
261
+ id: "distortion",
262
+ label: "Distortion",
263
+ group: "Character",
264
+ description: "Saturate and clip the signal for grit and warmth.",
265
+ params: [
266
+ { key: "driveDb", label: "Drive", min: 0, max: 40, step: 0.5, defaultValue: 12, unit: "dB" },
267
+ { key: "outputDb", label: "Output", min: -24, max: 6, step: 0.5, defaultValue: -3, unit: "dB" },
268
+ { key: "mix", label: "Mix", min: 0, max: 100, step: 1, defaultValue: 100, unit: "%" }
269
+ ]
270
+ },
271
+ {
272
+ id: "bitcrusher",
273
+ label: "Bitcrusher",
274
+ group: "Character",
275
+ description: "Lo-fi digital grit from fewer bits and a lower sample rate.",
276
+ params: [
277
+ { key: "bits", label: "Bit depth", min: 1, max: 16, step: 1, defaultValue: 8, unit: "bits" },
278
+ { key: "downsample", label: "Downsample", min: 1, max: 32, step: 1, defaultValue: 4, unit: "×" },
279
+ { key: "mix", label: "Mix", min: 0, max: 100, step: 1, defaultValue: 100, unit: "%" }
280
+ ]
281
+ },
282
+ {
283
+ id: "tremolo",
284
+ label: "Tremolo",
285
+ group: "Character",
286
+ description: "Pulse the volume up and down.",
287
+ params: [
288
+ { key: "rateHz", label: "Rate", min: 0.5, max: 20, step: 0.1, defaultValue: 5, unit: "Hz" },
289
+ { key: "depth", label: "Depth", min: 0, max: 100, step: 1, defaultValue: 60, unit: "%" }
290
+ ]
291
+ },
292
+ {
293
+ id: "speed",
294
+ label: "Change speed",
295
+ group: "Time",
296
+ description: "Speed up or slow down. Pitch moves with speed, like tape.",
297
+ params: [
298
+ { key: "rate", label: "Speed", min: 0.25, max: 4, step: 0.01, defaultValue: 1.25, unit: "×" }
299
+ ],
300
+ changesLength: true
301
+ },
302
+ {
303
+ id: "invert",
304
+ label: "Invert",
305
+ group: "Character",
306
+ description: "Flip the waveform's polarity.",
307
+ params: []
308
+ },
309
+ {
310
+ id: "removeDc",
311
+ label: "Remove DC offset",
312
+ group: "Tone",
313
+ description: "Centre a waveform that sits above or below zero.",
314
+ params: []
315
+ }
316
+ ];
317
+ /** The catalog as `ui_audio_list_effects` returns it. */
318
+ export const describeAudioEffects = () => AUDIO_EFFECT_SPECS.map((effect) => ({
319
+ id: effect.id,
320
+ name: effect.label,
321
+ group: effect.group,
322
+ description: effect.description,
323
+ changesLength: effect.changesLength ?? false,
324
+ params: effect.params.map((p) => ({
325
+ key: p.key,
326
+ label: p.label,
327
+ min: p.min,
328
+ max: p.max,
329
+ default: p.defaultValue,
330
+ unit: p.unit
331
+ }))
332
+ }));
333
+ /**
334
+ * The effect `effectId` names, after checking every key of `params` against
335
+ * its parameters and their ranges. Returns the params with defaults filled in.
336
+ */
337
+ export function validateAudioEffectParams(effectId, params) {
338
+ const effect = AUDIO_EFFECT_SPECS.find((spec) => spec.id === effectId);
339
+ if (!effect) {
340
+ throw new Error(`Unknown effect "${effectId}". Call ui_audio_list_effects for the ids.`);
341
+ }
342
+ for (const [key, value] of Object.entries(params)) {
343
+ const spec = effect.params.find((p) => p.key === key);
344
+ if (!spec) {
345
+ throw new Error(`"${effectId}" has no parameter "${key}". Its parameters: ${effect.params.map((p) => p.key).join(", ") || "none"}.`);
346
+ }
347
+ if (!Number.isFinite(value) || value < spec.min || value > spec.max) {
348
+ throw new Error(`"${key}" must be between ${spec.min} and ${spec.max}${spec.unit ? ` ${spec.unit}` : ""}.`);
349
+ }
350
+ }
351
+ return {
352
+ effect,
353
+ params: {
354
+ ...Object.fromEntries(effect.params.map((p) => [p.key, p.defaultValue])),
355
+ ...params
356
+ }
357
+ };
358
+ }
359
+ //# sourceMappingURL=asset-editor-tool-contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset-editor-tool-contracts.js","sourceRoot":"","sources":["../../src/api-schemas/asset-editor-tool-contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,8EAA8E;AAC9E,MAAM;AACN,8EAA8E;AAE9E,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,gBAAgB,EAAE;QAChB,WAAW,EACT,kLAAkL;QACpL,KAAK,EAAE,EAAE;KACV;IACD,iBAAiB,EAAE;QACjB,WAAW,EACT,uPAAuP;QACzP,KAAK,EAAE;YACL,MAAM,EAAE,CAAC;iBACN,MAAM,EAAE;iBACR,QAAQ,CAAC,iDAAiD,CAAC;SAC/D;KACF;IACD,cAAc,EAAE;QACd,WAAW,EACT,kNAAkN;QACpN,KAAK,EAAE;YACL,IAAI,EAAE,CAAC;iBACJ,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,CAAC,gDAAgD,CAAC;YAC7D,OAAO,EAAE,CAAC;iBACP,MAAM,EAAE;iBACR,QAAQ,CAAC,6CAA6C,CAAC;SAC3D;KACF;IACD,WAAW,EAAE;QACX,WAAW,EACT,2HAA2H;QAC7H,KA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