@agent-native/core 0.84.9 → 0.84.12

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 (80) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +43 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/agent/run-store.ts +29 -6
  5. package/corpus/core/src/cli/skills.ts +6 -3
  6. package/corpus/core/src/client/agent-chat-adapter.ts +31 -11
  7. package/corpus/core/src/client/require-session.tsx +20 -1
  8. package/corpus/core/src/client/sharing/ShareButton.tsx +9 -3
  9. package/corpus/core/src/collab/storage.ts +40 -5
  10. package/corpus/core/src/server/auth.ts +6 -0
  11. package/corpus/templates/assets/.agents/skills/logo-composite/SKILL.md +7 -6
  12. package/corpus/templates/assets/AGENTS.md +15 -0
  13. package/corpus/templates/assets/actions/_helpers.ts +3 -1
  14. package/corpus/templates/assets/actions/create-generation-preset.ts +12 -1
  15. package/corpus/templates/assets/actions/generate-asset.ts +5 -1
  16. package/corpus/templates/assets/actions/generate-image-batch.ts +6 -1
  17. package/corpus/templates/assets/actions/generate-image.ts +18 -11
  18. package/corpus/templates/assets/actions/open-asset-picker.ts +4 -2
  19. package/corpus/templates/assets/actions/update-generation-preset.ts +16 -3
  20. package/corpus/templates/assets/app/i18n/zh-TW.ts +3 -0
  21. package/corpus/templates/assets/app/i18n-data.ts +30 -0
  22. package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +42 -7
  23. package/corpus/templates/assets/app/routes/library.tsx +4 -2
  24. package/corpus/templates/assets/changelog/2026-07-01-generation-presets-can-now-composite-your-brand-s-canonical-.md +6 -0
  25. package/corpus/templates/assets/changelog/2026-07-01-tagging-a-preset-now-briefs-the-agent-on-that-preset-s-aesth.md +6 -0
  26. package/corpus/templates/assets/server/lib/preset-chat-context.ts +118 -0
  27. package/corpus/templates/assets/server/plugins/agent-chat.ts +5 -0
  28. package/corpus/templates/assets/shared/api.ts +1 -0
  29. package/corpus/templates/design/actions/export-html.ts +4 -2
  30. package/corpus/templates/design/actions/export-pdf.ts +3 -1
  31. package/corpus/templates/design/actions/export-svg.ts +4 -2
  32. package/corpus/templates/design/actions/export-zip.ts +10 -3
  33. package/corpus/templates/design/actions/get-design-snapshot.ts +41 -4
  34. package/corpus/templates/design/actions/present-design-variants.ts +21 -6
  35. package/corpus/templates/design/actions/update-file.ts +68 -17
  36. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +3 -2
  37. package/corpus/templates/design/app/components/design/EditPanel.tsx +35 -3
  38. package/corpus/templates/design/app/components/design/MotionDock.tsx +46 -11
  39. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +80 -30
  40. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +60 -10
  41. package/corpus/templates/design/app/components/design/canvas-primitive-style.ts +2 -0
  42. package/corpus/templates/design/app/components/design/inspector/InspectorAiActions.tsx +4 -0
  43. package/corpus/templates/design/app/hooks/use-question-flow.ts +2 -2
  44. package/corpus/templates/design/app/hooks/useAgentEditRequest.ts +2 -2
  45. package/corpus/templates/design/app/i18n-data.ts +1 -1
  46. package/corpus/templates/design/app/pages/DesignEditor.tsx +493 -109
  47. package/corpus/templates/design/app/pages/VisualEdit.tsx +4 -16
  48. package/corpus/templates/design/changelog/2026-07-01-improved-variant-pick-follow-ups-so-selected-directions-cont.md +6 -0
  49. package/corpus/templates/design/e2e/helpers.ts +2 -2
  50. package/dist/agent/run-store.d.ts.map +1 -1
  51. package/dist/agent/run-store.js +28 -6
  52. package/dist/agent/run-store.js.map +1 -1
  53. package/dist/cli/skills.d.ts.map +1 -1
  54. package/dist/cli/skills.js +6 -3
  55. package/dist/cli/skills.js.map +1 -1
  56. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  57. package/dist/client/agent-chat-adapter.js +26 -11
  58. package/dist/client/agent-chat-adapter.js.map +1 -1
  59. package/dist/client/require-session.d.ts +14 -0
  60. package/dist/client/require-session.d.ts.map +1 -1
  61. package/dist/client/require-session.js +19 -1
  62. package/dist/client/require-session.js.map +1 -1
  63. package/dist/client/sharing/ShareButton.d.ts +4 -2
  64. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  65. package/dist/client/sharing/ShareButton.js +3 -1
  66. package/dist/client/sharing/ShareButton.js.map +1 -1
  67. package/dist/collab/routes.d.ts +1 -1
  68. package/dist/collab/storage.d.ts.map +1 -1
  69. package/dist/collab/storage.js +31 -5
  70. package/dist/collab/storage.js.map +1 -1
  71. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  72. package/dist/notifications/routes.d.ts +2 -2
  73. package/dist/observability/routes.d.ts +6 -6
  74. package/dist/resources/handlers.d.ts +2 -2
  75. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  76. package/dist/server/auth.d.ts.map +1 -1
  77. package/dist/server/auth.js +7 -0
  78. package/dist/server/auth.js.map +1 -1
  79. package/dist/server/transcribe-voice.d.ts +1 -1
  80. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"agent-chat-adapter.d.ts","sourceRoot":"","sources":["../../src/client/agent-chat-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,qBAAqB,CAAC;AAMhF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAkBrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,MAAM,oBAAoB;AAC9B;;;;GAIG;AACD,KAAK;AACP,0EAA0E;GACxE,WAAW,CAAC;AAgqChB;;;;GAIG;AACH;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAC3C,SAAS,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;KAAE,CAAC;IACrD,WAAW,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE;QAAE,OAAO,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,CAAA;KAAE,CAAC;IAC3D,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAED,wBAAgB,sBAAsB,CACpC,OAAO,CAAC,EAAE,6BAA6B,GACtC,gBAAgB,CAq+ClB"}
@@ -535,14 +535,28 @@ function hasContinuationProgress(content) {
535
535
  ? part.text.trim().length > 0
536
536
  : part.result !== undefined);
537
537
  }
538
- function lastCompletedSideEffectTool(content) {
538
+ const COMPLETED_TOOL_TIMEOUT_NAME_RE = /^(add|apply|archive|capture|create|delete|deploy|duplicate|edit|generate|grant|insert|migrate|move|present|publish|remove|rename|reorder|revoke|save|send|set|sync|trash|update|write)(-|$)/;
539
+ const COMPLETED_TOOL_TIMEOUT_NAME_ALLOWLIST = new Set([
540
+ "connect-assets-mcp",
541
+ "import-design-tokens",
542
+ ]);
543
+ function isCompletedToolTimeoutCandidate(part) {
544
+ if (part.completedSideEffect === false)
545
+ return false;
546
+ if (part.completedSideEffect === true)
547
+ return true;
548
+ const toolName = part.toolName.toLowerCase();
549
+ return (COMPLETED_TOOL_TIMEOUT_NAME_ALLOWLIST.has(toolName) ||
550
+ COMPLETED_TOOL_TIMEOUT_NAME_RE.test(toolName));
551
+ }
552
+ function lastCompletedTimeoutCandidateTool(content) {
539
553
  for (let i = content.length - 1; i >= 0; i--) {
540
554
  const part = content[i];
541
555
  if (part.type === "tool-call" &&
542
556
  part.activity !== true &&
543
557
  part.result !== undefined &&
544
558
  part.isError !== true &&
545
- part.completedSideEffect === true) {
559
+ isCompletedToolTimeoutCandidate(part)) {
546
560
  return part;
547
561
  }
548
562
  }
@@ -1468,7 +1482,7 @@ export function createAgentChatAdapter(options) {
1468
1482
  // before tool_start; treating it as progress caused silent retry
1469
1483
  // loops when the LLM timed out while assembling a large tool input.
1470
1484
  const hasInFlightTool = hasInFlightToolCall(visibleContent);
1471
- const completedSideEffectTool = lastCompletedSideEffectTool(content);
1485
+ const completedTool = lastCompletedTimeoutCandidateTool(content);
1472
1486
  // Either real output or an actively-running tool counts as progress
1473
1487
  // for the stalled/empty caps.
1474
1488
  const madeProgress = madeContentProgress || hasInFlightTool;
@@ -1553,20 +1567,21 @@ export function createAgentChatAdapter(options) {
1553
1567
  }
1554
1568
  else {
1555
1569
  totalTransientContinuationAttempts += 1;
1556
- // If a mutating action already completed, do not turn a missing
1557
- // closing sentence into a scary connection failure. Give the model
1558
- // one continuation opportunity (the completed tool itself counts
1559
- // as progress on the first timeout); if the follow-up produces no
1560
- // new content, stop locally with a clear "saved, final note timed
1561
- // out" message.
1562
- if (completedSideEffectTool &&
1570
+ // If a tool already completed, do not turn a missing closing
1571
+ // sentence into a scary connection failure. Give the model one
1572
+ // continuation opportunity (the completed tool itself counts as
1573
+ // progress on the first timeout); if the follow-up produces no new
1574
+ // content, stop locally with a clear completed-tool warning.
1575
+ if (signal.reason === "run_timeout" &&
1576
+ completedTool &&
1563
1577
  !hasInFlightToolCall(content) &&
1578
+ !currentPreparingToolName &&
1564
1579
  !madeContentProgress &&
1565
1580
  !hasInFlightTool) {
1566
1581
  return {
1567
1582
  ok: false,
1568
1583
  resetVisibleContent: false,
1569
- completedToolName: completedSideEffectTool.toolName,
1584
+ completedToolName: completedTool.toolName,
1570
1585
  };
1571
1586
  }
1572
1587
  // Bail when the same write tool is stuck in-flight across too many