rivet-design 0.13.4 → 0.14.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.
Files changed (90) hide show
  1. package/dist/agent-variants/SessionStore.d.ts +14 -3
  2. package/dist/agent-variants/SessionStore.d.ts.map +1 -1
  3. package/dist/agent-variants/SessionStore.js +9 -1
  4. package/dist/agent-variants/SessionStore.js.map +1 -1
  5. package/dist/agent-variants/WorkerExecutorService.d.ts +140 -0
  6. package/dist/agent-variants/WorkerExecutorService.d.ts.map +1 -0
  7. package/dist/agent-variants/WorkerExecutorService.js +496 -0
  8. package/dist/agent-variants/WorkerExecutorService.js.map +1 -0
  9. package/dist/agent-variants/WorktreeOrchestrator.d.ts +24 -1
  10. package/dist/agent-variants/WorktreeOrchestrator.d.ts.map +1 -1
  11. package/dist/agent-variants/WorktreeOrchestrator.js +82 -3
  12. package/dist/agent-variants/WorktreeOrchestrator.js.map +1 -1
  13. package/dist/agent-variants/contracts.d.ts +30 -13
  14. package/dist/agent-variants/contracts.d.ts.map +1 -1
  15. package/dist/agent-variants/contracts.js +11 -4
  16. package/dist/agent-variants/contracts.js.map +1 -1
  17. package/dist/agent-variants/directionAuthoring.d.ts +36 -0
  18. package/dist/agent-variants/directionAuthoring.d.ts.map +1 -0
  19. package/dist/agent-variants/directionAuthoring.js +348 -0
  20. package/dist/agent-variants/directionAuthoring.js.map +1 -0
  21. package/dist/agent-variants/runLabel.d.ts +5 -4
  22. package/dist/agent-variants/runLabel.d.ts.map +1 -1
  23. package/dist/agent-variants/runLabel.js +16 -8
  24. package/dist/agent-variants/runLabel.js.map +1 -1
  25. package/dist/agent-variants/videoKeyframes.d.ts +19 -0
  26. package/dist/agent-variants/videoKeyframes.d.ts.map +1 -0
  27. package/dist/agent-variants/videoKeyframes.js +109 -0
  28. package/dist/agent-variants/videoKeyframes.js.map +1 -0
  29. package/dist/agent-variants/workItemBriefing.d.ts +3 -1
  30. package/dist/agent-variants/workItemBriefing.d.ts.map +1 -1
  31. package/dist/agent-variants/workItemBriefing.js +34 -2
  32. package/dist/agent-variants/workItemBriefing.js.map +1 -1
  33. package/dist/cli/commands/mcpServe.d.ts.map +1 -1
  34. package/dist/cli/commands/mcpServe.js +57 -25
  35. package/dist/cli/commands/mcpServe.js.map +1 -1
  36. package/dist/cli/commands/variants.d.ts.map +1 -1
  37. package/dist/cli/commands/variants.js +294 -4
  38. package/dist/cli/commands/variants.js.map +1 -1
  39. package/dist/cli/hostWorkNextAction.d.ts.map +1 -1
  40. package/dist/cli/hostWorkNextAction.js +6 -1
  41. package/dist/cli/hostWorkNextAction.js.map +1 -1
  42. package/dist/cli/router.js +2 -2
  43. package/dist/cli/router.js.map +1 -1
  44. package/dist/hosts/workerDefaults.d.ts +42 -0
  45. package/dist/hosts/workerDefaults.d.ts.map +1 -1
  46. package/dist/hosts/workerDefaults.js +40 -1
  47. package/dist/hosts/workerDefaults.js.map +1 -1
  48. package/dist/mcp/changeBatchClassification.d.ts +2 -0
  49. package/dist/mcp/changeBatchClassification.d.ts.map +1 -1
  50. package/dist/mcp/changeBatchClassification.js +5 -0
  51. package/dist/mcp/changeBatchClassification.js.map +1 -1
  52. package/dist/routes/agentVariants.d.ts.map +1 -1
  53. package/dist/routes/agentVariants.js +34 -2
  54. package/dist/routes/agentVariants.js.map +1 -1
  55. package/dist/routes/emptyStatePage.d.ts +14 -0
  56. package/dist/routes/emptyStatePage.d.ts.map +1 -0
  57. package/dist/routes/emptyStatePage.js +601 -0
  58. package/dist/routes/emptyStatePage.js.map +1 -0
  59. package/dist/routes/static.d.ts.map +1 -1
  60. package/dist/routes/static.js +2 -73
  61. package/dist/routes/static.js.map +1 -1
  62. package/dist/services/VariantGenerationService.d.ts +36 -1
  63. package/dist/services/VariantGenerationService.d.ts.map +1 -1
  64. package/dist/services/VariantGenerationService.js +334 -13
  65. package/dist/services/VariantGenerationService.js.map +1 -1
  66. package/dist/services/VariantRunService.d.ts +8 -0
  67. package/dist/services/VariantRunService.d.ts.map +1 -1
  68. package/dist/services/VariantRunService.js +31 -6
  69. package/dist/services/VariantRunService.js.map +1 -1
  70. package/dist/services/VariantsRuntime.d.ts.map +1 -1
  71. package/dist/services/VariantsRuntime.js +9 -0
  72. package/dist/services/VariantsRuntime.js.map +1 -1
  73. package/dist/types/change-request-types.d.ts +19 -0
  74. package/dist/types/change-request-types.d.ts.map +1 -1
  75. package/dist/utils/skills/claude-skill.d.ts +2 -2
  76. package/dist/utils/skills/claude-skill.d.ts.map +1 -1
  77. package/dist/utils/skills/claude-skill.js +1 -1
  78. package/dist/utils/skills/cli-guidance.d.ts +2 -2
  79. package/dist/utils/skills/cli-guidance.d.ts.map +1 -1
  80. package/dist/utils/skills/cli-guidance.js +11 -8
  81. package/dist/utils/skills/cli-guidance.js.map +1 -1
  82. package/dist/utils/skills/cursor-rules.d.ts +2 -2
  83. package/dist/utils/skills/cursor-rules.d.ts.map +1 -1
  84. package/dist/utils/skills/cursor-rules.js +1 -1
  85. package/package.json +1 -1
  86. package/src/ui/dist/assets/main-CobdEReL.css +1 -0
  87. package/src/ui/dist/assets/main-DJjaeK_0.js +422 -0
  88. package/src/ui/dist/index.html +2 -2
  89. package/src/ui/dist/assets/main-Dyos9I29.css +0 -1
  90. package/src/ui/dist/assets/main-T3U4Gt16.js +0 -419
@@ -0,0 +1,348 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.authorDirections = exports.fallbackDirections = exports.fallbackRunLabel = void 0;
4
+ const child_process_1 = require("child_process");
5
+ const logger_1 = require("../utils/logger");
6
+ const log = (0, logger_1.createLogger)('DirectionAuthoring');
7
+ /**
8
+ * Server-side direction authoring for fresh (zero-to-one) variant runs.
9
+ *
10
+ * Historically the coordinating host agent authored the direction briefs
11
+ * in-conversation before calling `variants start` — 60–160s of wall-clock
12
+ * spent before any worker could spawn, on prose the workers treat only as
13
+ * steering (they view the reference media natively). This module moves that
14
+ * authorship onto the server: one fast vision tool-use call produces the
15
+ * labels, bodies, and steering notes, and a deterministic archetype fallback
16
+ * guarantees the run starts even when the gateway is unreachable.
17
+ *
18
+ * Quality note: reference FIDELITY comes from the implementation worker's
19
+ * model tier (see `workerDefaults.RIVET_WORKER_REFERENCE_CREATE_DEFAULTS`),
20
+ * not from brief prose — the briefs only need distinct, plausible direction
21
+ * concepts, which a fast model produces reliably.
22
+ */
23
+ const DIRECTION_AUTHOR_MODEL = 'claude-haiku-4-5-20251001';
24
+ const DIRECTION_AUTHOR_MAX_TOKENS = 1200;
25
+ const DIRECTION_AUTHOR_TIMEOUT_MS = 25_000;
26
+ const LABEL_MAX_LENGTH = 48;
27
+ const BODY_MAX_LENGTH = 200;
28
+ const NOTES_MAX_LENGTH = 1200;
29
+ const RUN_LABEL_MAX_LENGTH = 40;
30
+ /** Archetype directions used when the gateway cannot author. Ordered so the
31
+ * first N slots always cover the faithful → reinterpreted spectrum. */
32
+ const FALLBACK_ARCHETYPES = [
33
+ { label: 'Faithful', body: 'Faithful recreation of the reference design language' },
34
+ { label: 'Expressive', body: 'Amplify the boldest visual ideas in the request' },
35
+ { label: 'Structural Remix', body: 'Same design system, different layout architecture' },
36
+ { label: 'Editorial', body: 'Typography-led, editorial interpretation' },
37
+ { label: 'Minimal', body: 'Pared-back, spacious, minimal interpretation' },
38
+ ];
39
+ const FALLBACK_NOTES = 'Derive every design decision directly from the visual references and the ' +
40
+ 'request: match palette, typography, spacing, shapes, and energy. Ship every ' +
41
+ 'section and interaction the request names — never a stripped-down subset. ' +
42
+ 'When the request names motion, design and IMPLEMENT a concrete motion spec ' +
43
+ '(trigger, timing, easing, choreography) grounded in what the references show.';
44
+ const clip = (value, max) => value.length <= max ? value : `${value.slice(0, max - 1).trimEnd()}…`;
45
+ /** Deterministic 1–3 word run label from the request text. */
46
+ const fallbackRunLabel = (prompt) => {
47
+ const words = prompt
48
+ .split(/\s+/)
49
+ .map((word) => word.replace(/[^\p{L}\p{N}-]/gu, ''))
50
+ .filter((word) => word.length > 2);
51
+ const label = words.slice(0, 3).join(' ');
52
+ return clip(label || 'Design directions', RUN_LABEL_MAX_LENGTH);
53
+ };
54
+ exports.fallbackRunLabel = fallbackRunLabel;
55
+ const fallbackDirections = (prompt, count) => ({
56
+ briefs: Array.from({ length: count }, (_, index) => {
57
+ const archetype = FALLBACK_ARCHETYPES[index % FALLBACK_ARCHETYPES.length];
58
+ const suffix = index >= FALLBACK_ARCHETYPES.length
59
+ ? ` ${Math.floor(index / FALLBACK_ARCHETYPES.length) + 1}`
60
+ : '';
61
+ return {
62
+ label: `${archetype.label}${suffix}`,
63
+ body: archetype.body,
64
+ notes: FALLBACK_NOTES,
65
+ };
66
+ }),
67
+ runLabel: (0, exports.fallbackRunLabel)(prompt),
68
+ });
69
+ exports.fallbackDirections = fallbackDirections;
70
+ const AUTHOR_DIRECTIONS_TOOL = {
71
+ name: 'author_directions',
72
+ description: 'Record the design directions for this variants run. Every direction ' +
73
+ 'must name a materially different layout or interaction architecture — ' +
74
+ 'never a recolor or a near-duplicate of another direction.',
75
+ strict: true,
76
+ input_schema: {
77
+ type: 'object',
78
+ additionalProperties: false,
79
+ required: ['runLabel', 'directions'],
80
+ properties: {
81
+ runLabel: {
82
+ type: 'string',
83
+ description: '1–3 word summary of the whole batch',
84
+ },
85
+ directions: {
86
+ type: 'array',
87
+ items: {
88
+ type: 'object',
89
+ additionalProperties: false,
90
+ required: ['label', 'body', 'notes'],
91
+ properties: {
92
+ label: {
93
+ type: 'string',
94
+ description: 'Distinct 1–4 word direction title',
95
+ },
96
+ body: {
97
+ type: 'string',
98
+ description: 'At most 12 words naming the layout/interaction direction',
99
+ },
100
+ notes: {
101
+ type: 'string',
102
+ description: 'Steering notes for the implementer. START with "Sections: ' +
103
+ '<5-7 concrete sections this direction ships>." Then concrete ' +
104
+ 'observations from the references (palette hexes, type, ' +
105
+ 'spacing, shapes, energy). When the request involves motion ' +
106
+ 'or interaction, the notes MUST include a concrete motion ' +
107
+ 'spec — trigger (scroll, hover, click), timing, easing, ' +
108
+ 'choreography — that the page implements visibly. For ' +
109
+ 'navigation/header motion, scroll-linked state change ' +
110
+ '(condense, invert, hide-reveal) is the default expectation ' +
111
+ 'unless the request names another trigger. The implementer ' +
112
+ 'views the references natively — steer interpretation, do ' +
113
+ 'not replace looking.',
114
+ },
115
+ },
116
+ },
117
+ },
118
+ },
119
+ },
120
+ };
121
+ const buildAuthorPrompt = (input) => {
122
+ const lines = [
123
+ `Design request:`,
124
+ input.prompt.trim(),
125
+ '',
126
+ `Author exactly ${input.count} genuinely distinct, comparison-ready design directions for this request.`,
127
+ ];
128
+ if (input.images?.length) {
129
+ lines.push('', 'The attached images are the primary design signal (uploaded references, rendered page screenshots, or video keyframes in order). Ground every direction in what they actually show.');
130
+ }
131
+ if (input.referenceNotes?.length) {
132
+ lines.push('', 'Reference evidence:', ...input.referenceNotes.map((note) => `- ${note}`));
133
+ }
134
+ lines.push('', 'Each direction must preserve the full user deliverable (for a landing page: complete page scope, not just a hero). Call the author_directions tool once.');
135
+ return lines.join('\n');
136
+ };
137
+ const sanitizeDirections = (raw, input) => {
138
+ if (!Array.isArray(raw.directions))
139
+ return undefined;
140
+ const seenLabels = new Set();
141
+ const briefs = [];
142
+ for (const entry of raw.directions) {
143
+ if (!entry || typeof entry !== 'object')
144
+ continue;
145
+ const candidate = entry;
146
+ const label = typeof candidate.label === 'string' ? candidate.label.trim() : '';
147
+ const body = typeof candidate.body === 'string' ? candidate.body.trim() : '';
148
+ const notes = typeof candidate.notes === 'string' ? candidate.notes.trim() : '';
149
+ if (!label || !body)
150
+ continue;
151
+ const key = label.toLowerCase();
152
+ if (seenLabels.has(key))
153
+ continue;
154
+ seenLabels.add(key);
155
+ briefs.push({
156
+ label: clip(label, LABEL_MAX_LENGTH),
157
+ body: clip(body, BODY_MAX_LENGTH),
158
+ ...(notes ? { notes: clip(notes, NOTES_MAX_LENGTH) } : {}),
159
+ });
160
+ if (briefs.length === input.count)
161
+ break;
162
+ }
163
+ if (briefs.length === 0)
164
+ return undefined;
165
+ // Pad any shortfall deterministically so the run always gets `count`.
166
+ const fallback = (0, exports.fallbackDirections)(input.prompt, input.count);
167
+ for (const spare of fallback.briefs) {
168
+ if (briefs.length === input.count)
169
+ break;
170
+ if (seenLabels.has(spare.label.toLowerCase()))
171
+ continue;
172
+ briefs.push(spare);
173
+ }
174
+ const runLabel = typeof raw.runLabel === 'string' && raw.runLabel.trim()
175
+ ? clip(raw.runLabel.trim(), RUN_LABEL_MAX_LENGTH)
176
+ : fallback.runLabel;
177
+ return { briefs: briefs.slice(0, input.count), runLabel };
178
+ };
179
+ // Sonnet over haiku: measured 2026-07-16, the haiku pool showed 4x latency
180
+ // variance under concurrent load (12s → 45s+ timeouts) while sonnet held
181
+ // steady; the call is ~250 output tokens so per-token speed barely matters.
182
+ const CLAUDE_AUTHOR_MODEL = 'claude-sonnet-5';
183
+ const CLAUDE_AUTHOR_TIMEOUT_MS = 25_000;
184
+ /** Extract the first balanced JSON object from free text. */
185
+ const extractJsonObject = (text) => {
186
+ const start = text.indexOf('{');
187
+ if (start === -1)
188
+ return undefined;
189
+ for (let end = text.length; end > start; end -= 1) {
190
+ const candidate = text.slice(start, end);
191
+ if (!candidate.trimEnd().endsWith('}'))
192
+ continue;
193
+ try {
194
+ return JSON.parse(candidate);
195
+ }
196
+ catch {
197
+ // keep shrinking
198
+ }
199
+ }
200
+ return undefined;
201
+ };
202
+ /**
203
+ * Author directions with the local `claude` runtime — the same binary (and
204
+ * the same user subscription) the worker executor runs, so this path works
205
+ * wherever the executor works, including machines whose gateway spend limit
206
+ * is exhausted. Reference imagery rides INLINE as image content blocks via
207
+ * `--input-format stream-json`, so the whole call is a single model turn —
208
+ * no temp files, no Read-tool round trip, no turn-count variance.
209
+ */
210
+ const authorViaClaudeRuntime = async (input, options) => {
211
+ const command = options?.command ?? process.env.RIVET_EXECUTOR_COMMAND ?? 'claude';
212
+ const prompt = [
213
+ input.images?.length
214
+ ? 'The attached images are the primary design signal (uploaded references, rendered page screenshots, or video keyframes in order).\n'
215
+ : '',
216
+ buildAuthorPrompt(input),
217
+ '',
218
+ 'Respond with ONLY a compact single-line JSON object of the shape',
219
+ '{"runLabel": "1-3 word batch summary", "directions": [{"label": "1-4 word title", "body": "<=12 word direction", "notes": "<=350 chars. START with: Sections: <5-7 concrete sections this direction ships>. Then concrete steering (palette hexes, type, spacing, energy). When the request names motion or interaction, notes MUST carry a terse motion spec — trigger (scroll/hover/click), timing, easing — the page implements visibly; for nav/header motion default to scroll-linked state change (condense/invert/hide-reveal)."}]}',
220
+ `with exactly ${input.count} directions. Speed matters: no deliberation, no tool use, no prose, no markdown fences.`,
221
+ ]
222
+ .filter(Boolean)
223
+ .join('\n');
224
+ const userMessage = JSON.stringify({
225
+ type: 'user',
226
+ message: {
227
+ role: 'user',
228
+ content: [
229
+ ...(input.images ?? []).map((image) => ({
230
+ type: 'image',
231
+ source: {
232
+ type: 'base64',
233
+ media_type: image.mediaType,
234
+ data: image.data,
235
+ },
236
+ })),
237
+ { type: 'text', text: prompt },
238
+ ],
239
+ },
240
+ });
241
+ const startedAt = Date.now();
242
+ const stdout = await new Promise((resolve, reject) => {
243
+ const child = (0, child_process_1.execFile)(command, [
244
+ '--print',
245
+ '--input-format',
246
+ 'stream-json',
247
+ '--output-format',
248
+ 'stream-json',
249
+ '--verbose',
250
+ '--model',
251
+ CLAUDE_AUTHOR_MODEL,
252
+ '--effort',
253
+ 'low',
254
+ '--dangerously-skip-permissions',
255
+ '--exclude-dynamic-system-prompt-sections',
256
+ ], {
257
+ timeout: options?.timeoutMs ?? CLAUDE_AUTHOR_TIMEOUT_MS,
258
+ maxBuffer: 16 * 1024 * 1024,
259
+ }, (error, out, err) => error
260
+ ? reject(new Error(`${error.message}${err ? ` — stderr: ${String(err).slice(-400)}` : ''}`))
261
+ : resolve(out));
262
+ child.stdin?.write(`${userMessage}\n`);
263
+ child.stdin?.end();
264
+ });
265
+ let resultText = '';
266
+ let childDurationMs;
267
+ for (const line of stdout.split('\n')) {
268
+ const trimmed = line.trim();
269
+ if (!trimmed.startsWith('{'))
270
+ continue;
271
+ try {
272
+ const event = JSON.parse(trimmed);
273
+ if (event.type === 'result') {
274
+ resultText = typeof event.result === 'string' ? event.result : '';
275
+ childDurationMs = event.duration_ms;
276
+ }
277
+ }
278
+ catch {
279
+ // Non-JSON noise on stdout — skip.
280
+ }
281
+ }
282
+ log.info(`claude runtime authored directions in ${Date.now() - startedAt}ms (child duration_ms=${String(childDurationMs)})`);
283
+ const parsed = extractJsonObject(resultText || stdout);
284
+ if (parsed && typeof parsed === 'object') {
285
+ return parsed;
286
+ }
287
+ return undefined;
288
+ };
289
+ /**
290
+ * Author the direction briefs for a fresh run. Ladder: one fast gateway
291
+ * vision call → the local `claude` runtime (subscription-billed, available
292
+ * wherever the executor is) → deterministic archetypes. Never throws — any
293
+ * failure degrades a rung so intake keeps its latency contract.
294
+ */
295
+ const authorDirections = async (gateway, input, options) => {
296
+ const startedAt = Date.now();
297
+ try {
298
+ const raw = await gateway.sendToolUse({
299
+ model: DIRECTION_AUTHOR_MODEL,
300
+ maxTokens: DIRECTION_AUTHOR_MAX_TOKENS,
301
+ temperature: 1,
302
+ system: 'You are the direction planner for Rivet, which builds N parallel ' +
303
+ 'design variants of a web page. You author short, materially ' +
304
+ 'different direction briefs; separate implementers build each one ' +
305
+ 'with the same reference media you see.',
306
+ prompt: buildAuthorPrompt(input),
307
+ tool: AUTHOR_DIRECTIONS_TOOL,
308
+ ...(input.images?.length ? { images: input.images } : {}),
309
+ timeoutMs: options?.timeoutMs ?? DIRECTION_AUTHOR_TIMEOUT_MS,
310
+ });
311
+ const sanitized = sanitizeDirections(raw, input);
312
+ if (sanitized) {
313
+ return {
314
+ ...sanitized,
315
+ source: 'gateway',
316
+ durationMs: Date.now() - startedAt,
317
+ };
318
+ }
319
+ log.warn('gateway direction author returned no usable directions');
320
+ }
321
+ catch (error) {
322
+ log.warn('gateway direction authoring failed — trying claude runtime', error);
323
+ }
324
+ try {
325
+ const raw = await authorViaClaudeRuntime(input, {
326
+ ...(options?.claudeCommand ? { command: options.claudeCommand } : {}),
327
+ });
328
+ const sanitized = raw ? sanitizeDirections(raw, input) : undefined;
329
+ if (sanitized) {
330
+ return {
331
+ ...sanitized,
332
+ source: 'claude_runtime',
333
+ durationMs: Date.now() - startedAt,
334
+ };
335
+ }
336
+ log.warn('claude runtime direction author returned no usable directions');
337
+ }
338
+ catch (error) {
339
+ log.warn('claude runtime direction authoring failed — using archetype fallback', error);
340
+ }
341
+ return {
342
+ ...(0, exports.fallbackDirections)(input.prompt, input.count),
343
+ source: 'fallback',
344
+ durationMs: Date.now() - startedAt,
345
+ };
346
+ };
347
+ exports.authorDirections = authorDirections;
348
+ //# sourceMappingURL=directionAuthoring.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directionAuthoring.js","sourceRoot":"","sources":["../../src/agent-variants/directionAuthoring.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AACzC,4CAA+C;AAO/C,MAAM,GAAG,GAAG,IAAA,qBAAY,EAAC,oBAAoB,CAAC,CAAC;AAE/C;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,sBAAsB,GAAG,2BAA2B,CAAC;AAC3D,MAAM,2BAA2B,GAAG,IAAI,CAAC;AACzC,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAE3C,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAqBhC;wEACwE;AACxE,MAAM,mBAAmB,GAA2C;IAClE,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,sDAAsD,EAAE;IACnF,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,iDAAiD,EAAE;IAChF,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,mDAAmD,EAAE;IACxF,EAAE,KAAK,EAAE,WAAW,E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M,EAAE,KAAK,CAAC,KAAK,CAAC;QAChD,MAAM,EAAE,UAAU;QAClB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;KACnC,CAAC;AACJ,CAAC,CAAC;AA9DW,QAAA,gBAAgB,oBA8D3B"}
@@ -1,8 +1,7 @@
1
1
  /**
2
- * Derive a short "run label" a 1–2 word, plain-English description of the
3
- * INTENT behind the prompt that kicked off a variant run. Every variant in a
4
- * run shares this label; it's what the variant table shows on each row so the
5
- * user can tell which prompt a direction came from.
2
+ * Derive a short run label from the prompt for human-direct starts. Every
3
+ * variant in a run shares this label so the user can tell which prompt a
4
+ * direction came from.
6
5
  *
7
6
  * Deterministic (no LLM): strip a leading command phrase ("make it", "add a",
8
7
  * …), truncate at the first conjunction so only the primary intent survives
@@ -14,5 +13,7 @@
14
13
  * "add a sticky header" → "Sticky Header"
15
14
  * "dark mode" → "Dark Mode"
16
15
  */
16
+ export declare const RUN_LABEL_MAX_LENGTH = 24;
17
+ export declare const RUN_LABEL_MAX_WORDS = 3;
17
18
  export declare function deriveRunLabel(prompt: string): string;
18
19
  //# sourceMappingURL=runLabel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runLabel.d.ts","sourceRoot":"","sources":["../../src/agent-variants/runLabel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAyGH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA2BrD"}
1
+ {"version":3,"file":"runLabel.d.ts","sourceRoot":"","sources":["../../src/agent-variants/runLabel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAmGH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAerC,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA2BrD"}
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  /**
3
- * Derive a short "run label" a 1–2 word, plain-English description of the
4
- * INTENT behind the prompt that kicked off a variant run. Every variant in a
5
- * run shares this label; it's what the variant table shows on each row so the
6
- * user can tell which prompt a direction came from.
3
+ * Derive a short run label from the prompt for human-direct starts. Every
4
+ * variant in a run shares this label so the user can tell which prompt a
5
+ * direction came from.
7
6
  *
8
7
  * Deterministic (no LLM): strip a leading command phrase ("make it", "add a",
9
8
  * …), truncate at the first conjunction so only the primary intent survives
@@ -16,6 +15,7 @@
16
15
  * "dark mode" → "Dark Mode"
17
16
  */
18
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.RUN_LABEL_MAX_WORDS = exports.RUN_LABEL_MAX_LENGTH = void 0;
19
19
  exports.deriveRunLabel = deriveRunLabel;
20
20
  // Leading imperative phrasing that carries no intent — stripped from the front.
21
21
  // Longest-first so "make it" wins over "make".
@@ -111,10 +111,18 @@ const FILLER = new Set([
111
111
  'overall',
112
112
  'all',
113
113
  ]);
114
- const titleCase = (words) => words
115
- .map((w) => (w ? w[0].toUpperCase() + w.slice(1) : w))
116
- .join(' ')
117
- .slice(0, 24);
114
+ exports.RUN_LABEL_MAX_LENGTH = 24;
115
+ exports.RUN_LABEL_MAX_WORDS = 3;
116
+ const titleCase = (words) => {
117
+ const titledWords = words.map((word) => word ? word[0].toUpperCase() + word.slice(1) : word);
118
+ const fittingWords = titledWords.reduce((selected, word) => {
119
+ const candidate = [...selected, word].join(' ');
120
+ return candidate.length <= exports.RUN_LABEL_MAX_LENGTH
121
+ ? [...selected, word]
122
+ : selected;
123
+ }, []);
124
+ return fittingWords.join(' ') || titledWords[0] || '';
125
+ };
118
126
  function deriveRunLabel(prompt) {
119
127
  const raw = (prompt ?? '').trim();
120
128
  if (!raw)
@@ -1 +1 @@
1
- {"version":3,"file":"runLabel.js","sourceRoot":"","sources":["../../src/agent-variants/runLabel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAyGH,wCA2BC;AAlID,gFAAgF;AAChF,+CAA+C;AAC/C,MAAM,gB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OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9C,OAAO,SAAS,CAAC,QAAQ,CAAC,IAAI,UAAU,CAAC;IAC3C,CAAC;IACD,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC"}
1
+ {"version":3,"file":"runLabel.js","sourceRoot":"","sources":["../../src/agent-variants/runLabel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAmHH,wCA2BC;AA5ID,gFAAgF;AAChF,+CAA+C;AAC/C,MAAM,gBAAgB,GAAG;IACvB,cAAc;IACd,cAAc;IACd,cAAc;IACd,SAAS;IACT,UAAU;IACV,MAAM;IACN,SAAS;IACT,UAAU;IACV,MAAM;IACN,SAAS;IACT,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,OAAO;IACP,MAAM;IACN,SAAS;IACT,UAAU;IACV,MAAM;IACN,OAAO;IACP,QAAQ;IACR,KAAK;IACL,UAAU;IACV,WAAW;IACX,QAAQ;IACR,SAAS;IACT,UAAU;IACV,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,cAAc;IACd,UAAU;IACV,aAAa;IACb,SAAS;IACT,cAAc;IACd,UAAU;IACV,WAAW;IACX,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,SAAS;IACT,KAAK;IACL,YAAY;IACZ,QAAQ;CACT,CAAC;AAEF,0EAA0E;AAC1E,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC3B,KAAK;IACL,IAAI;IACJ,KAAK;IACL,MAAM;IACN,MAAM;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QACxB,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9C,OAAO,SAAS,CAAC,QAAQ,CAAC,IAAI,UAAU,CAAC;IAC3C,CAAC;IACD,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,19 @@
1
+ export type KeyframeResult = {
2
+ ok: true;
3
+ framePaths: string[];
4
+ } | {
5
+ ok: false;
6
+ reason: string;
7
+ };
8
+ /**
9
+ * Sample a local reference video into evenly spaced PNG keyframes so vision
10
+ * models (direction authoring) and implementation workers can observe the
11
+ * motion without any host-agent ffmpeg work. Requires `ffmpeg`/`ffprobe` on
12
+ * PATH; any failure is reported, never thrown — reference prep must degrade,
13
+ * not block intake.
14
+ */
15
+ export declare const extractVideoKeyframes: (videoPath: string, options?: {
16
+ frameCount?: number;
17
+ outDir?: string;
18
+ }) => Promise<KeyframeResult>;
19
+ //# sourceMappingURL=videoKeyframes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoKeyframes.d.ts","sourceRoot":"","sources":["../../src/agent-variants/videoKeyframes.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,cAAc,GACtB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,GAClC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAElC;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAChC,WAAW,MAAM,EACjB,UAAU;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KACjD,OAAO,CAAC,cAAc,CAoExB,CAAC"}
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.extractVideoKeyframes = void 0;
37
+ const child_process_1 = require("child_process");
38
+ const fs = __importStar(require("fs"));
39
+ const os = __importStar(require("os"));
40
+ const path = __importStar(require("path"));
41
+ const util_1 = require("util");
42
+ const logger_1 = require("../utils/logger");
43
+ const execFileAsync = (0, util_1.promisify)(child_process_1.execFile);
44
+ const log = (0, logger_1.createLogger)('VideoKeyframes');
45
+ const FFMPEG_TIMEOUT_MS = 30_000;
46
+ const DEFAULT_FRAME_COUNT = 5;
47
+ /**
48
+ * Sample a local reference video into evenly spaced PNG keyframes so vision
49
+ * models (direction authoring) and implementation workers can observe the
50
+ * motion without any host-agent ffmpeg work. Requires `ffmpeg`/`ffprobe` on
51
+ * PATH; any failure is reported, never thrown — reference prep must degrade,
52
+ * not block intake.
53
+ */
54
+ const extractVideoKeyframes = async (videoPath, options) => {
55
+ const frameCount = options?.frameCount ?? DEFAULT_FRAME_COUNT;
56
+ let duration;
57
+ try {
58
+ const probe = await execFileAsync('ffprobe', [
59
+ '-v',
60
+ 'error',
61
+ '-show_entries',
62
+ 'format=duration',
63
+ '-of',
64
+ 'default=noprint_wrappers=1:nokey=1',
65
+ videoPath,
66
+ ], { timeout: FFMPEG_TIMEOUT_MS });
67
+ duration = Number.parseFloat(probe.stdout.trim());
68
+ if (!Number.isFinite(duration) || duration <= 0) {
69
+ return { ok: false, reason: `ffprobe reported no duration for ${videoPath}` };
70
+ }
71
+ }
72
+ catch (error) {
73
+ const message = error instanceof Error ? error.message : String(error);
74
+ return { ok: false, reason: `ffprobe unavailable or failed: ${message}` };
75
+ }
76
+ const outDir = options?.outDir ?? fs.mkdtempSync(path.join(os.tmpdir(), 'rivet-keyframes-'));
77
+ const stamps = Array.from({ length: frameCount }, (_, index) => (duration * (index + 0.5)) / frameCount);
78
+ const framePaths = [];
79
+ try {
80
+ await Promise.all(stamps.map(async (stamp, index) => {
81
+ const framePath = path.join(outDir, `frame-${index + 1}.png`);
82
+ await execFileAsync('ffmpeg', [
83
+ '-ss',
84
+ stamp.toFixed(2),
85
+ '-i',
86
+ videoPath,
87
+ '-frames:v',
88
+ '1',
89
+ '-q:v',
90
+ '3',
91
+ '-y',
92
+ framePath,
93
+ ], { timeout: FFMPEG_TIMEOUT_MS });
94
+ framePaths[index] = framePath;
95
+ }));
96
+ }
97
+ catch (error) {
98
+ const message = error instanceof Error ? error.message : String(error);
99
+ log.warn(`keyframe extraction failed for ${videoPath}`, error);
100
+ return { ok: false, reason: `ffmpeg failed: ${message}` };
101
+ }
102
+ const existing = framePaths.filter((framePath) => framePath && fs.existsSync(framePath));
103
+ if (existing.length === 0) {
104
+ return { ok: false, reason: 'ffmpeg produced no frames' };
105
+ }
106
+ return { ok: true, framePaths: existing };
107
+ };
108
+ exports.extractVideoKeyframes = extractVideoKeyframes;
109
+ //# sourceMappingURL=videoKeyframes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoKeyframes.js","sourceRoot":"","sources":["../../src/agent-variants/videoKeyframes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAyC;AACzC,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAC7B,+BAAiC;AACjC,4CAA+C;AAE/C,MAAM,aAAa,GAAG,IAAA,gBAAS,EAAC,wBAAQ,CAAC,CAAC;AAC1C,MAAM,GAAG,GAAG,IAAA,qBAAY,EAAC,gBAAgB,CAAC,CAAC;AAE3C,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACjC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAM9B;;;;;;GAMG;AACI,MAAM,qBAAqB,GAAG,KAAK,EACxC,SAAiB,EACjB,OAAkD,EACzB,EAAE;IAC3B,MAAM,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,mBAAmB,CAAC;IAC9D,IAAI,QAAgB,CAAC;IACrB,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,aAAa,CAC/B,SAAS,EACT;YACE,IAAI;YACJ,OAAO;YACP,eAAe;YACf,iBAAiB;YACjB,KAAK;YACL,oCAAoC;YACpC,SAAS;SACV,EACD,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAC/B,CAAC;QACF,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,IAAI,CAAC,EAAE,CAAC;YAChD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,oCAAoC,SAAS,EAAE,EAAE,CAAC;QAChF,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;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AY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,GAAG,CAAC,IAAI,CAAC,kCAAkC,SAAS,EAAE,EAAE,KAAK,CAAC,CAAC;QAC/D,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,OAAO,EAAE,EAAE,CAAC;IAC5D,CAAC;IACD,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAChC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CACrD,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,2BAA2B,EAAE,CAAC;IAC5D,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;AAC5C,CAAC,CAAC;AAvEW,QAAA,qBAAqB,yBAuEhC"}
@@ -22,5 +22,7 @@ export declare const workItemBriefingPath: (sessionId: string, workId: string) =
22
22
  export declare const workItemCompleteCommand: (workId: string) => string;
23
23
  /** The ~40-token prompt the coordinator passes to each worker verbatim. */
24
24
  export declare const workItemWorkerPrompt: (sessionId: string, item: HostVariantImplementationWorkItemSnapshot) => string;
25
- export declare const renderWorkItemBriefing: (item: HostVariantImplementationWorkItemSnapshot) => string;
25
+ export declare const renderWorkItemBriefing: (item: HostVariantImplementationWorkItemSnapshot, options?: {
26
+ completion?: "self" | "executor";
27
+ }) => string;
26
28
  //# sourceMappingURL=workItemBriefing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workItemBriefing.d.ts","sourceRoot":"","sources":["../../src/agent-variants/workItemBriefing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yCAAyC,EAAE,MAAM,aAAa,CAAC;AAK7E;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,oBAAoB,GAC/B,WAAW,MAAM,EACjB,QAAQ,MAAM,KACb,MACwE,CAAC;AAE5E,eAAO,MAAM,uBAAuB,GAAI,QAAQ,MAAM,KAAG,MACD,CAAC;AAEzD,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,GAC/B,WAAW,MAAM,EACjB,MAAM,yCAAyC,KAC9C,MAG4E,CAAC;AAuBhF,eAAO,MAAM,sBAAsB,GACjC,MAAM,yCAAyC,KAC9C,MAkDF,CAAC"}
1
+ {"version":3,"file":"workItemBriefing.d.ts","sourceRoot":"","sources":["../../src/agent-variants/workItemBriefing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yCAAyC,EAAE,MAAM,aAAa,CAAC;AAK7E;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,oBAAoB,GAC/B,WAAW,MAAM,EACjB,QAAQ,MAAM,KACb,MACwE,CAAC;AAE5E,eAAO,MAAM,uBAAuB,GAAI,QAAQ,MAAM,KAAG,MACD,CAAC;AAEzD,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,GAC/B,WAAW,MAAM,EACjB,MAAM,yCAAyC,KAC9C,MAG4E,CAAC;AAuBhF,eAAO,MAAM,sBAAsB,GACjC,MAAM,yCAAyC,EAC/C,UAAU;IAAE,UAAU,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,KAC7C,MAiIF,CAAC"}