agent-nuvira 3.5.6 → 3.5.9

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 (186) hide show
  1. package/.agents/skills/index.json +16 -0
  2. package/.agents/skills/motion/SKILL.md +27 -0
  3. package/README.md +56 -1
  4. package/dist/agents/agents/package-agent.d.ts +22 -0
  5. package/dist/agents/agents/package-agent.d.ts.map +1 -1
  6. package/dist/agents/agents/package-agent.js +92 -4
  7. package/dist/agents/agents/package-agent.js.map +1 -1
  8. package/dist/agents/release-preflight.d.ts +42 -5
  9. package/dist/agents/release-preflight.d.ts.map +1 -1
  10. package/dist/agents/release-preflight.js +82 -5
  11. package/dist/agents/release-preflight.js.map +1 -1
  12. package/dist/cli/chat.d.ts +76 -17
  13. package/dist/cli/chat.d.ts.map +1 -1
  14. package/dist/cli/chat.js +357 -127
  15. package/dist/cli/chat.js.map +1 -1
  16. package/dist/cli/code-map.d.ts +51 -0
  17. package/dist/cli/code-map.d.ts.map +1 -1
  18. package/dist/cli/code-map.js +174 -2
  19. package/dist/cli/code-map.js.map +1 -1
  20. package/dist/cli/credentials.d.ts.map +1 -1
  21. package/dist/cli/credentials.js +4 -1
  22. package/dist/cli/credentials.js.map +1 -1
  23. package/dist/cli/doctor.d.ts +31 -2
  24. package/dist/cli/doctor.d.ts.map +1 -1
  25. package/dist/cli/doctor.js +143 -7
  26. package/dist/cli/doctor.js.map +1 -1
  27. package/dist/cli/execute.js +5 -5
  28. package/dist/cli/execute.js.map +1 -1
  29. package/dist/cli/loop-executor.d.ts.map +1 -1
  30. package/dist/cli/loop-executor.js +80 -14
  31. package/dist/cli/loop-executor.js.map +1 -1
  32. package/dist/cli/parity.d.ts +12 -0
  33. package/dist/cli/parity.d.ts.map +1 -1
  34. package/dist/cli/parity.js +46 -1
  35. package/dist/cli/parity.js.map +1 -1
  36. package/dist/cli/tool-install-prompt.d.ts +2 -7
  37. package/dist/cli/tool-install-prompt.d.ts.map +1 -1
  38. package/dist/cli/tool-install-prompt.js +11 -28
  39. package/dist/cli/tool-install-prompt.js.map +1 -1
  40. package/dist/config/process-env.d.ts.map +1 -1
  41. package/dist/config/process-env.js +2 -2
  42. package/dist/config/process-env.js.map +1 -1
  43. package/dist/config/scratch-workspace.d.ts +134 -0
  44. package/dist/config/scratch-workspace.d.ts.map +1 -0
  45. package/dist/config/scratch-workspace.js +213 -0
  46. package/dist/config/scratch-workspace.js.map +1 -0
  47. package/dist/editing/types.d.ts +23 -1
  48. package/dist/editing/types.d.ts.map +1 -1
  49. package/dist/editing/types.js +51 -7
  50. package/dist/editing/types.js.map +1 -1
  51. package/dist/gateway/adapters.d.ts +24 -0
  52. package/dist/gateway/adapters.d.ts.map +1 -1
  53. package/dist/gateway/adapters.js +12 -0
  54. package/dist/gateway/adapters.js.map +1 -1
  55. package/dist/gateway/oversized-reply.d.ts +39 -0
  56. package/dist/gateway/oversized-reply.d.ts.map +1 -0
  57. package/dist/gateway/oversized-reply.js +54 -0
  58. package/dist/gateway/oversized-reply.js.map +1 -0
  59. package/dist/gateway/registry.d.ts +0 -10
  60. package/dist/gateway/registry.d.ts.map +1 -1
  61. package/dist/gateway/registry.js +148 -4
  62. package/dist/gateway/registry.js.map +1 -1
  63. package/dist/inference/route-resolver.d.ts +39 -0
  64. package/dist/inference/route-resolver.d.ts.map +1 -1
  65. package/dist/inference/route-resolver.js +51 -2
  66. package/dist/inference/route-resolver.js.map +1 -1
  67. package/dist/inference/thinking-replay.d.ts +86 -0
  68. package/dist/inference/thinking-replay.d.ts.map +1 -0
  69. package/dist/inference/thinking-replay.js +110 -0
  70. package/dist/inference/thinking-replay.js.map +1 -0
  71. package/dist/inference/tools.d.ts +9 -0
  72. package/dist/inference/tools.d.ts.map +1 -1
  73. package/dist/inference/tools.js +12 -1
  74. package/dist/inference/tools.js.map +1 -1
  75. package/dist/learning/assessment-protocol.d.ts +120 -0
  76. package/dist/learning/assessment-protocol.d.ts.map +1 -0
  77. package/dist/learning/assessment-protocol.js +236 -0
  78. package/dist/learning/assessment-protocol.js.map +1 -0
  79. package/dist/learning/assessment-turn-context.d.ts +54 -0
  80. package/dist/learning/assessment-turn-context.d.ts.map +1 -0
  81. package/dist/learning/assessment-turn-context.js +71 -0
  82. package/dist/learning/assessment-turn-context.js.map +1 -0
  83. package/dist/learning/exhaustion-report.d.ts +24 -1
  84. package/dist/learning/exhaustion-report.d.ts.map +1 -1
  85. package/dist/learning/exhaustion-report.js +18 -6
  86. package/dist/learning/exhaustion-report.js.map +1 -1
  87. package/dist/learning/perf-probe.d.ts +140 -0
  88. package/dist/learning/perf-probe.d.ts.map +1 -0
  89. package/dist/learning/perf-probe.js +316 -0
  90. package/dist/learning/perf-probe.js.map +1 -0
  91. package/dist/learning/quota-ledger.d.ts +24 -0
  92. package/dist/learning/quota-ledger.d.ts.map +1 -1
  93. package/dist/learning/quota-ledger.js +40 -0
  94. package/dist/learning/quota-ledger.js.map +1 -1
  95. package/dist/learning/runtime-dependencies.d.ts +183 -0
  96. package/dist/learning/runtime-dependencies.d.ts.map +1 -0
  97. package/dist/learning/runtime-dependencies.js +349 -0
  98. package/dist/learning/runtime-dependencies.js.map +1 -0
  99. package/dist/learning/self-check-discovery.d.ts +117 -0
  100. package/dist/learning/self-check-discovery.d.ts.map +1 -0
  101. package/dist/learning/self-check-discovery.js +334 -0
  102. package/dist/learning/self-check-discovery.js.map +1 -0
  103. package/dist/learning/skill-store.d.ts.map +1 -1
  104. package/dist/learning/skill-store.js +6 -5
  105. package/dist/learning/skill-store.js.map +1 -1
  106. package/dist/skills/bundled-skills-phase3.d.ts +14 -0
  107. package/dist/skills/bundled-skills-phase3.d.ts.map +1 -1
  108. package/dist/skills/bundled-skills-phase3.js +50 -0
  109. package/dist/skills/bundled-skills-phase3.js.map +1 -1
  110. package/dist/tools/child-agent-runtime.js +19 -1
  111. package/dist/tools/child-agent-runtime.js.map +1 -1
  112. package/dist/tools/credentials-tool.d.ts.map +1 -1
  113. package/dist/tools/credentials-tool.js +4 -1
  114. package/dist/tools/credentials-tool.js.map +1 -1
  115. package/dist/tools/loop-project-context.d.ts +7 -0
  116. package/dist/tools/loop-project-context.d.ts.map +1 -1
  117. package/dist/tools/loop-project-context.js +44 -0
  118. package/dist/tools/loop-project-context.js.map +1 -1
  119. package/dist/tools/modality/motion-presets.d.ts +62 -0
  120. package/dist/tools/modality/motion-presets.d.ts.map +1 -0
  121. package/dist/tools/modality/motion-presets.js +399 -0
  122. package/dist/tools/modality/motion-presets.js.map +1 -0
  123. package/dist/tools/modality/motion-tool.d.ts +62 -0
  124. package/dist/tools/modality/motion-tool.d.ts.map +1 -0
  125. package/dist/tools/modality/motion-tool.js +220 -0
  126. package/dist/tools/modality/motion-tool.js.map +1 -0
  127. package/dist/tools/modality/motion.d.ts +298 -0
  128. package/dist/tools/modality/motion.d.ts.map +1 -0
  129. package/dist/tools/modality/motion.js +514 -0
  130. package/dist/tools/modality/motion.js.map +1 -0
  131. package/dist/tools/pipeline-tool.d.ts.map +1 -1
  132. package/dist/tools/pipeline-tool.js +19 -1
  133. package/dist/tools/pipeline-tool.js.map +1 -1
  134. package/dist/tools/plan-store.d.ts +90 -6
  135. package/dist/tools/plan-store.d.ts.map +1 -1
  136. package/dist/tools/plan-store.js +140 -13
  137. package/dist/tools/plan-store.js.map +1 -1
  138. package/dist/tools/publish-tool.d.ts.map +1 -1
  139. package/dist/tools/publish-tool.js +9 -0
  140. package/dist/tools/publish-tool.js.map +1 -1
  141. package/dist/tools/registry.d.ts.map +1 -1
  142. package/dist/tools/registry.js +100 -3
  143. package/dist/tools/registry.js.map +1 -1
  144. package/dist/tools/tool-loop.d.ts +17 -0
  145. package/dist/tools/tool-loop.d.ts.map +1 -1
  146. package/dist/tools/tool-loop.js +70 -17
  147. package/dist/tools/tool-loop.js.map +1 -1
  148. package/dist/tools/toolsets.js +2 -2
  149. package/dist/tools/toolsets.js.map +1 -1
  150. package/dist/utils/workspace-need.d.ts +84 -0
  151. package/dist/utils/workspace-need.d.ts.map +1 -0
  152. package/dist/utils/workspace-need.js +227 -0
  153. package/dist/utils/workspace-need.js.map +1 -0
  154. package/dist/web-dashboard/chat-console.d.ts +22 -0
  155. package/dist/web-dashboard/chat-console.d.ts.map +1 -1
  156. package/dist/web-dashboard/chat-console.js +75 -11
  157. package/dist/web-dashboard/chat-console.js.map +1 -1
  158. package/dist/web-dashboard/hub-data.d.ts +9 -1
  159. package/dist/web-dashboard/hub-data.d.ts.map +1 -1
  160. package/dist/web-dashboard/hub-data.js +2 -0
  161. package/dist/web-dashboard/hub-data.js.map +1 -1
  162. package/dist/web-dashboard/project-context.d.ts +1 -1
  163. package/dist/web-dashboard/project-context.d.ts.map +1 -1
  164. package/dist/web-dashboard/project-context.js +13 -1
  165. package/dist/web-dashboard/project-context.js.map +1 -1
  166. package/dist/web-dashboard/server.d.ts +33 -0
  167. package/dist/web-dashboard/server.d.ts.map +1 -1
  168. package/dist/web-dashboard/server.js +229 -24
  169. package/dist/web-dashboard/server.js.map +1 -1
  170. package/dist/web-dashboard/src/types.d.ts +46 -0
  171. package/dist/web-dashboard/src/types.d.ts.map +1 -1
  172. package/dist/web-dashboard/workspace-guard.d.ts +20 -21
  173. package/dist/web-dashboard/workspace-guard.d.ts.map +1 -1
  174. package/dist/web-dashboard/workspace-guard.js +20 -153
  175. package/dist/web-dashboard/workspace-guard.js.map +1 -1
  176. package/dist/web-dashboard/workspace-resolution.d.ts +23 -5
  177. package/dist/web-dashboard/workspace-resolution.d.ts.map +1 -1
  178. package/dist/web-dashboard/workspace-resolution.js +22 -4
  179. package/dist/web-dashboard/workspace-resolution.js.map +1 -1
  180. package/package.json +1 -1
  181. package/src/web-dashboard/public/assets/index-CGYIlLpO.js +236 -0
  182. package/src/web-dashboard/public/assets/index-CGYIlLpO.js.map +1 -0
  183. package/src/web-dashboard/public/assets/{index-DeSsNU94.css → index-CzRU84ET.css} +1 -1
  184. package/src/web-dashboard/public/index.html +2 -2
  185. package/src/web-dashboard/public/assets/index-Do_O67Kv.js +0 -236
  186. package/src/web-dashboard/public/assets/index-Do_O67Kv.js.map +0 -1
@@ -261,6 +261,45 @@ const imageGenSchema = z.object({
261
261
  .optional()
262
262
  .describe('Optional backend override: gemini (Imagen/Nano Banana), openai (DALL-E/gpt-image), stability, comfyui (local), or pollinations (free). Defaults to the first backend whose API key is configured.'),
263
263
  });
264
+ /**
265
+ * Motion tool args — code-authored animation rendered to a video file.
266
+ *
267
+ * Kept deliberately narrow: the SOURCE (html / html_path / preset+data) and the
268
+ * handful of settings that change the output, because a long schema is prompt
269
+ * budget spent on every turn whether or not motion is being rendered.
270
+ */
271
+ const motionRenderSchema = z.object({
272
+ action: z
273
+ .enum(['render', 'revise', 'list', 'presets'])
274
+ .optional()
275
+ .describe("Default 'render'. 'revise' re-renders a previous render (source_id) with edits — deterministic because the stored source is re-rendered, not re-invented; 'list' shows this workspace's renders; 'presets' lists the ready-made scenes."),
276
+ html: z.string().optional().describe('A self-contained HTML animation (no network: inline CSS/JS/SVG). Must be seekable — see the motion skill.'),
277
+ html_path: z.string().optional().describe('Path to an HTML animation file instead of inline html'),
278
+ preset: z
279
+ .enum(['title-card', 'bar-race', 'line-reveal', 'code-walkthrough'])
280
+ .optional()
281
+ .describe('Use a ready-made scene instead of hand-written html: title-card, bar-race, line-reveal (charts from your data), code-walkthrough'),
282
+ params: z.record(z.string(), z.unknown()).optional().describe('Preset parameters: title, subtitle, kicker, accent, background, foreground, unit, decimals'),
283
+ data: z.unknown().optional().describe('Data to animate: JSON (array of numbers, [{label,value}], {series:[…]}) or CSV text'),
284
+ data_path: z.string().optional().describe('Path to a CSV/JSON file to animate (bar-race, line-reveal, code-walkthrough)'),
285
+ source_id: z.string().optional().describe("Render id to revise (from a previous motion_render or action:'list')"),
286
+ title: z.string().optional().describe('Convenience title (merged into preset params)'),
287
+ fps: z.number().int().min(1).max(60).optional().describe('Frames per second (default 30)'),
288
+ duration_ms: z.number().int().min(200).max(600000).optional().describe('Length in ms (default 8000)'),
289
+ width: z.number().int().min(64).max(3840).optional().describe('Frame width (default 1280)'),
290
+ height: z.number().int().min(64).max(2160).optional().describe('Frame height (default 720)'),
291
+ aspect_ratio: z.string().optional().describe("Shape instead of a size, e.g. '16:9', '9:16', '1:1' (720p/1080p by default)"),
292
+ format: z.enum(['mp4', 'gif', 'webm']).optional().describe('Container (default mp4; gif carries no audio)'),
293
+ crf: z.number().int().min(0).max(51).optional().describe('Quality: lower is better (default 20)'),
294
+ narration: z.string().optional().describe('Narration text, synthesized locally (edge-tts/Piper) and muxed onto the video'),
295
+ voice: z.string().optional().describe('TTS voice id for narration'),
296
+ captions: z
297
+ .array(z.object({ from_ms: z.number(), to_ms: z.number(), text: z.string() }))
298
+ .optional()
299
+ .describe('Caption cues, written as a .srt next to the video'),
300
+ burn_captions: z.boolean().optional().describe('Burn the captions into the frames (needs an ffmpeg with libass)'),
301
+ out_name: z.string().optional().describe('Filename prefix for the artifact (defaults to the preset name)'),
302
+ });
264
303
  /** I4 — voice tools: TTS + transcription (optional installs). */
265
304
  const speakSchema = z.object({
266
305
  text: z.string().min(1).describe('The text to speak'),
@@ -880,7 +919,10 @@ registerTool({
880
919
  endsAgentStep: false,
881
920
  run: async (args, ctx) => {
882
921
  const { action, goal, steps, id, status, note } = planTodoSchema.parse(args);
883
- const { defaultPlanStore } = await import('./plan-store.js');
922
+ const { defaultPlanStore, planProvenanceFromActions } = await import('./plan-store.js');
923
+ // R1 — the tool result line that tells the model its claim was recorded as
924
+ // UNVERIFIED rather than as a done step. Empty for every other update.
925
+ let assertedNote = '';
884
926
  const store = ctx.planStore ?? defaultPlanStore();
885
927
  // C4 — a re-declaration of the SAME goal carries the progress of the steps it
886
928
  // re-declares (see PlanStore.create). Disclosed rather than silent: a model
@@ -926,7 +968,26 @@ registerTool({
926
968
  `Create them in ${ctx.cwd}, then mark the step done — a step is not done while its artifact is missing.`);
927
969
  }
928
970
  }
929
- store.update(resolved, status, note);
971
+ // ── R1 — WHAT STOOD BEHIND THIS CLAIM ───────────────────────────────────
972
+ // Marking a step done is a claim about the past, and the defect this closes
973
+ // is measured: a plan table reported `14 failed / 422 passed ✅ done` before
974
+ // any command in the transcript had run. When the loop supplied its action
975
+ // ledger, the claim is recorded AGAINST it — the backing call becomes the
976
+ // step's evidence, and an empty ledger marks the step `asserted`, which
977
+ // renders ⚠️ rather than ✅ from then on.
978
+ //
979
+ // The update is never REFUSED. A step whose proof is a decision rather than
980
+ // an execution is legitimate, and a tool that argues with the model instead
981
+ // of informing the reader would be a worse bug than the one being fixed;
982
+ // what changes is that the claim can no longer LOOK measured. The model is
983
+ // told which way it was recorded, so it can go and produce the evidence.
984
+ const provenance = planProvenanceFromActions(ctx.executedActions);
985
+ store.update(resolved, status, note, provenance);
986
+ if (status === 'done' && provenance.hasLedger && !provenance.evidence) {
987
+ assertedNote =
988
+ `\n⚠️ Step "${resolved}" is recorded as ASSERTED, not verified: no tool call has run in this turn, so nothing backs the claim yet. ` +
989
+ `Run the check that produces the result, then update the step again — or leave it asserted and say so in your answer.`;
990
+ }
930
991
  }
931
992
  else {
932
993
  return 'Error: plan_todo update needs id + status (pending|running|done|blocked).';
@@ -939,7 +1000,7 @@ registerTool({
939
1000
  ctx.emit?.('plan:changed', snapshot);
940
1001
  }
941
1002
  }
942
- return (store.toText ? store.toText() : `Plan updated (${action}).`) + carriedNote;
1003
+ return (store.toText ? store.toText() : `Plan updated (${action}).`) + carriedNote + assertedNote;
943
1004
  },
944
1005
  });
945
1006
  // ─── WS1 (#23) finding tool — a claim, and the verdict the gate computed ────
@@ -2795,6 +2856,42 @@ registerTool({
2795
2856
  }
2796
2857
  }),
2797
2858
  });
2859
+ // Motion — animation authored as code, rendered to a real video file.
2860
+ registerTool({
2861
+ name: 'motion_render',
2862
+ capability: { effectClass: 'local-write', reversible: true },
2863
+ description: 'Render an ANIMATED video from code: a self-contained HTML/CSS/SVG animation (html or html_path) or a ready-made scene (preset + data). Use for animated explainers, animated charts of the user\'s own data, kinetic titles and code walkthroughs — the output is deterministic (frames are captured from the animation timeline, not recorded), so a revise re-renders the stored source. Needs chromium (playwright) and ffmpeg; a missing one is named with its install command. Optional narration is synthesized locally and muxed in; captions are written as .srt. The video is saved to the sandbox motion/ dir and, in a gateway context, sent back to the originating channel.',
2864
+ category: 'workflow',
2865
+ inputSchema: motionRenderSchema,
2866
+ endsAgentStep: false,
2867
+ run: async (args, ctx) => {
2868
+ const parsed = motionRenderSchema.parse(args);
2869
+ const { runMotionTool } = await import('./modality/motion-tool.js');
2870
+ const result = await runMotionTool(parsed, ctx);
2871
+ if (result.media) {
2872
+ // Same artifact path as generate_image/speak: a render is a deliverable, so
2873
+ // the dashboard's Artifacts tab can show (and re-open) it.
2874
+ recordArtifact(ctx?.artifacts, {
2875
+ kind: 'media',
2876
+ title: result.media.title,
2877
+ path: result.media.path,
2878
+ mime: result.media.mime,
2879
+ });
2880
+ if (result.sidecar) {
2881
+ recordArtifact(ctx?.artifacts, {
2882
+ kind: 'file',
2883
+ title: result.sidecar.title,
2884
+ path: result.sidecar.path,
2885
+ mime: result.sidecar.mime,
2886
+ });
2887
+ }
2888
+ const caption = parsed.title ?? parsed.narration ?? undefined;
2889
+ const delivered = await tryAutoDeliver(result.media.path, caption, ctx, 'video');
2890
+ return `${result.text}${delivered}`;
2891
+ }
2892
+ return result.text;
2893
+ },
2894
+ });
2798
2895
  // Voice mode tool
2799
2896
  registerTool({
2800
2897
  name: 'voice_mode',