miriad-viz 0.3.2 → 0.3.4
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.
|
@@ -414,8 +414,8 @@ Extracting PR details from ${repo}...`);
|
|
|
414
414
|
sender: msg.sender,
|
|
415
415
|
mentions: extractMentions(msg.content, msg.sender, agentSet)
|
|
416
416
|
}));
|
|
417
|
-
writeJSON(dataDir, "messages.json", lightMessages);
|
|
418
|
-
outputs.push("messages.json");
|
|
417
|
+
writeJSON(dataDir, "messages-viz.json", lightMessages);
|
|
418
|
+
outputs.push("messages-viz.json");
|
|
419
419
|
} else {
|
|
420
420
|
console.log("\nSkipping chat extraction (no input provided)");
|
|
421
421
|
console.log(" To extract: use Miriad MCP get_messages, save as JSON");
|
package/dist-cli/index.js
CHANGED
|
@@ -406,13 +406,20 @@ function computeNext(progress, existingFiles, logTails, flags = {}, dataSummary,
|
|
|
406
406
|
completedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
407
407
|
outputs: config.outputFiles
|
|
408
408
|
};
|
|
409
|
-
output.push("", "\u2713 Curation files found.
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
409
|
+
output.push("", "\u2713 Curation files found.");
|
|
410
|
+
output.push("");
|
|
411
|
+
output.push(" \u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E");
|
|
412
|
+
output.push(" \u2502 \u26D4 CREATIVE STOP \u2014 DO NOT PROCEED AUTOMATICALLY \u2502");
|
|
413
|
+
output.push(" \u2502 \u2502");
|
|
414
|
+
output.push(" \u2502 Present your curation to the human: \u2502");
|
|
415
|
+
output.push(" \u2502 1. Summarize the narrative arc and phases \u2502");
|
|
416
|
+
output.push(" \u2502 2. List the quotes you selected and why \u2502");
|
|
417
|
+
output.push(" \u2502 3. Show the timeline output (npx miriad-viz timeline)\u2502");
|
|
418
|
+
output.push(" \u2502 4. Ask for feedback and iterate if needed \u2502");
|
|
419
|
+
output.push(" \u2502 \u2502");
|
|
420
|
+
output.push(" \u2502 Only run `npx miriad-viz next` after human approval. \u2502");
|
|
421
|
+
output.push(" \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F");
|
|
422
|
+
return { action: "creative_stop", step, progress, output };
|
|
416
423
|
}
|
|
417
424
|
output.push("", "\u270F\uFE0F Curation in progress");
|
|
418
425
|
output.push(...curationContext());
|
|
@@ -444,6 +451,12 @@ function computeNext(progress, existingFiles, logTails, flags = {}, dataSummary,
|
|
|
444
451
|
output.push(` ${line}`);
|
|
445
452
|
}
|
|
446
453
|
}
|
|
454
|
+
if (config.creative) {
|
|
455
|
+
output.push("");
|
|
456
|
+
output.push(" \u26D4 CREATIVE STOP \u2014 Present results to the human and wait for approval.");
|
|
457
|
+
output.push(" Only run `npx miriad-viz next` after human approves.");
|
|
458
|
+
return { action: "creative_stop", step, progress, output };
|
|
459
|
+
}
|
|
447
460
|
output.push(
|
|
448
461
|
"",
|
|
449
462
|
"\u{1F4E2} REPORT: Tell the human what just completed and the key results BEFORE running the next command."
|
|
@@ -525,6 +538,8 @@ function computeNext(progress, existingFiles, logTails, flags = {}, dataSummary,
|
|
|
525
538
|
output.push(` "Your human asked for [arc]. Here's what the data shows..."`);
|
|
526
539
|
output.push("");
|
|
527
540
|
output.push(" Phase B \u2014 Mine the data (mechanical):");
|
|
541
|
+
output.push(" Full messages are in data/messages.json (can be very large).");
|
|
542
|
+
output.push(" Search with grep/jq for quotes.");
|
|
528
543
|
output.push(" Search by each focus agent to understand their arc.");
|
|
529
544
|
output.push(' Search for emotional keywords: "fixed", "broken", "wtf",');
|
|
530
545
|
output.push(' "sorry", "actually", "wrong", all-caps, 3+ exclamation marks.');
|
|
@@ -1016,7 +1031,7 @@ async function runNext(flags) {
|
|
|
1016
1031
|
break;
|
|
1017
1032
|
}
|
|
1018
1033
|
case "transform": {
|
|
1019
|
-
const { runTransform } = await import("./transform-
|
|
1034
|
+
const { runTransform } = await import("./transform-PQYWROS2.js");
|
|
1020
1035
|
const padding = {};
|
|
1021
1036
|
if (nextFlags["pad-start"]) padding.padStartMs = Number(nextFlags["pad-start"]) * 1e3;
|
|
1022
1037
|
if (nextFlags["pad-end"]) padding.padEndMs = Number(nextFlags["pad-end"]) * 1e3;
|
|
@@ -1053,7 +1068,7 @@ async function main() {
|
|
|
1053
1068
|
}
|
|
1054
1069
|
case "extract": {
|
|
1055
1070
|
const { projectDir, progress } = requireProject();
|
|
1056
|
-
const { runExtract } = await import("./extract-
|
|
1071
|
+
const { runExtract } = await import("./extract-ER32ZVS5.js");
|
|
1057
1072
|
await runExtract({
|
|
1058
1073
|
projectDir,
|
|
1059
1074
|
progress,
|
|
@@ -1074,7 +1089,7 @@ async function main() {
|
|
|
1074
1089
|
case "transform": {
|
|
1075
1090
|
const { projectDir, progress } = requireProject();
|
|
1076
1091
|
const { parseDuration } = await import("./parse-duration-NVLCEFAF.js");
|
|
1077
|
-
const { runTransform } = await import("./transform-
|
|
1092
|
+
const { runTransform } = await import("./transform-PQYWROS2.js");
|
|
1078
1093
|
const padding = {};
|
|
1079
1094
|
if (typeof flags["pad-start"] === "string") {
|
|
1080
1095
|
padding.padStartMs = parseDuration(flags["pad-start"]);
|
|
@@ -1100,7 +1115,7 @@ async function main() {
|
|
|
1100
1115
|
}
|
|
1101
1116
|
case "timeline": {
|
|
1102
1117
|
const { projectDir, progress } = requireProject();
|
|
1103
|
-
const { runTimeline } = await import("./timeline-
|
|
1118
|
+
const { runTimeline } = await import("./timeline-7O4LOYMP.js");
|
|
1104
1119
|
const exitCode = runTimeline(projectDir, progress);
|
|
1105
1120
|
if (exitCode !== 0) process.exitCode = exitCode;
|
|
1106
1121
|
break;
|
|
@@ -202,6 +202,26 @@ function validateCurationFiles(input) {
|
|
|
202
202
|
warnings.push(`Gap at end: no content after ${(last * 100).toFixed(0)}% of timeline.`);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
+
for (const n of narration) {
|
|
206
|
+
const endPct = n.normalizedTime + pillWindow;
|
|
207
|
+
if (endPct > 1) {
|
|
208
|
+
const startStr = (n.normalizedTime * 100).toFixed(1);
|
|
209
|
+
const endStr = (endPct * 100).toFixed(1);
|
|
210
|
+
warnings.push(
|
|
211
|
+
`Overflow: narration at ${startStr}% extends to ${endStr}% (past end of timeline). Move it earlier or shorten the pill window.`
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
for (const q of quotes) {
|
|
216
|
+
const endPct = q.normalizedTime + pillWindow;
|
|
217
|
+
if (endPct > 1) {
|
|
218
|
+
const startStr = (q.normalizedTime * 100).toFixed(1);
|
|
219
|
+
const endStr = (endPct * 100).toFixed(1);
|
|
220
|
+
warnings.push(
|
|
221
|
+
`Overflow: @${q.author} quote at ${startStr}% extends to ${endStr}% (past end of timeline). Move it earlier.`
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
205
225
|
return {
|
|
206
226
|
valid: errors.length === 0,
|
|
207
227
|
errors,
|
|
@@ -252,12 +272,16 @@ function printTimeline(input) {
|
|
|
252
272
|
lines.push(` \u26A0\uFE0F GAP: ${gapStart}%-${gapEnd}% \u2014 no narration or quotes`);
|
|
253
273
|
}
|
|
254
274
|
const pct = (pos * 100).toFixed(1);
|
|
275
|
+
const endNorm = pos + pillWindow;
|
|
255
276
|
if (event.type === "narration") {
|
|
256
|
-
const endPct = (
|
|
277
|
+
const endPct = (endNorm * 100).toFixed(1);
|
|
257
278
|
lines.push(`${pct.padStart(5)}%-${endPct.padStart(5)}% [narration] ${event.label}`);
|
|
258
279
|
} else {
|
|
259
280
|
lines.push(`${pct.padStart(5)}% ${event.label}`);
|
|
260
281
|
}
|
|
282
|
+
if (endNorm > 1) {
|
|
283
|
+
lines.push(` \u26A0\uFE0F OVERFLOW: extends to ${(endNorm * 100).toFixed(1)}% \u2014 past end of timeline`);
|
|
284
|
+
}
|
|
261
285
|
lastEnd = pos + pillWindow;
|
|
262
286
|
}
|
|
263
287
|
if (events.length > 0 && 1 - lastEnd > GAP_THRESHOLD) {
|
|
@@ -471,7 +471,7 @@ These are produced by the curate step. Run 'npx miriad-viz curate' first.`
|
|
|
471
471
|
"No chat data \u2014 communication lines will be empty"
|
|
472
472
|
);
|
|
473
473
|
const messages = loadOptional(
|
|
474
|
-
"messages.json",
|
|
474
|
+
"messages-viz.json",
|
|
475
475
|
[],
|
|
476
476
|
"No messages data \u2014 comm lines and particles will rely on timeline events"
|
|
477
477
|
);
|