@agent-native/core 0.84.1 → 0.84.3

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 (100) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +15 -0
  3. package/corpus/core/docs/design/durable-agent-runs.md +34 -35
  4. package/corpus/core/package.json +1 -1
  5. package/corpus/core/src/agent/engine/builder-engine.ts +81 -9
  6. package/corpus/core/src/agent/production-agent.ts +9 -2
  7. package/corpus/core/src/agent/run-loop-with-resume.ts +38 -8
  8. package/corpus/core/src/agent/run-manager.ts +8 -7
  9. package/corpus/core/src/agent/thread-data-builder.ts +6 -0
  10. package/corpus/core/src/cli/design-connect.ts +175 -0
  11. package/corpus/core/src/cli/skills.ts +5 -7
  12. package/corpus/core/src/client/AgentPanel.tsx +8 -0
  13. package/corpus/core/src/client/MultiTabAssistantChat.tsx +4 -1
  14. package/corpus/core/src/client/agent-chat-adapter.ts +253 -24
  15. package/corpus/core/src/client/sharing/ShareButton.tsx +70 -21
  16. package/corpus/core/src/client/sse-event-processor.ts +46 -4
  17. package/corpus/core/src/templates/workspace-core/.agents/skills/reliable-mutations/SKILL.md +15 -17
  18. package/corpus/templates/analytics/AGENTS.md +1 -1
  19. package/corpus/templates/design/actions/apply-motion-edit.ts +50 -18
  20. package/corpus/templates/design/actions/get-motion-timeline.ts +4 -14
  21. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +156 -12
  22. package/corpus/templates/design/app/components/design/MotionDock.tsx +2 -3
  23. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +217 -75
  24. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +39 -39
  25. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +558 -37
  26. package/corpus/templates/design/app/components/design/bridge/hit-test.bridge.ts +75 -3
  27. package/corpus/templates/design/app/components/design/types.ts +13 -0
  28. package/corpus/templates/design/app/components/layout/Layout.tsx +1 -0
  29. package/corpus/templates/design/app/i18n/zh-TW.ts +17 -0
  30. package/corpus/templates/design/app/i18n-data.ts +245 -0
  31. package/corpus/templates/design/app/pages/DesignEditor.tsx +890 -252
  32. package/corpus/templates/design/changelog/2026-06-30-agent-chat-now-reports-saved-design-generations-clearly-when.md +6 -0
  33. package/corpus/templates/design/changelog/2026-06-30-apply-styles-now-appears-only-for-localhost-visual-edit-scre.md +6 -0
  34. package/corpus/templates/design/changelog/2026-06-30-copying-or-dragging-screen-elements-onto-the-infinite-canvas.md +6 -0
  35. package/corpus/templates/design/changelog/2026-06-30-design-questions-now-use-tighter-editor-typography-and-contr.md +6 -0
  36. package/corpus/templates/design/changelog/2026-06-30-element-drags-can-be-cancelled-with-escape-before-they-commi.md +6 -0
  37. package/corpus/templates/design/changelog/2026-06-30-pending-visual-style-edits-now-warn-before-you-leave-the-edi.md +6 -0
  38. package/corpus/templates/design/changelog/2026-06-30-share-options-now-make-export-and-agent-handoff-easier-to-no.md +6 -0
  39. package/corpus/templates/design/changelog/2026-06-30-visual-style-drags-stay-live-while-pending-edits-can-be-appl.md +6 -0
  40. package/corpus/templates/design/changelog/2026-07-01-design-chat-no-longer-shows-a-redundant-context-tab-above-the-composer.md +6 -0
  41. package/corpus/templates/design/changelog/2026-07-01-motion-track-creation-no-longer-fails-in-local-editors.md +6 -0
  42. package/corpus/templates/design/changelog/2026-07-01-share-general-access-menu-stays-open-when-choosing-organization.md +6 -0
  43. package/corpus/templates/design/server/plugins/db.ts +10 -0
  44. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  45. package/dist/agent/engine/builder-engine.js +61 -10
  46. package/dist/agent/engine/builder-engine.js.map +1 -1
  47. package/dist/agent/production-agent.d.ts.map +1 -1
  48. package/dist/agent/production-agent.js +9 -2
  49. package/dist/agent/production-agent.js.map +1 -1
  50. package/dist/agent/run-loop-with-resume.d.ts +2 -2
  51. package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
  52. package/dist/agent/run-loop-with-resume.js +31 -8
  53. package/dist/agent/run-loop-with-resume.js.map +1 -1
  54. package/dist/agent/run-manager.d.ts +8 -7
  55. package/dist/agent/run-manager.d.ts.map +1 -1
  56. package/dist/agent/run-manager.js +8 -7
  57. package/dist/agent/run-manager.js.map +1 -1
  58. package/dist/agent/thread-data-builder.d.ts +2 -0
  59. package/dist/agent/thread-data-builder.d.ts.map +1 -1
  60. package/dist/agent/thread-data-builder.js +5 -0
  61. package/dist/agent/thread-data-builder.js.map +1 -1
  62. package/dist/cli/design-connect.d.ts +2 -0
  63. package/dist/cli/design-connect.d.ts.map +1 -1
  64. package/dist/cli/design-connect.js +140 -0
  65. package/dist/cli/design-connect.js.map +1 -1
  66. package/dist/cli/skills.d.ts.map +1 -1
  67. package/dist/cli/skills.js +5 -7
  68. package/dist/cli/skills.js.map +1 -1
  69. package/dist/client/AgentPanel.d.ts +5 -1
  70. package/dist/client/AgentPanel.d.ts.map +1 -1
  71. package/dist/client/AgentPanel.js +4 -4
  72. package/dist/client/AgentPanel.js.map +1 -1
  73. package/dist/client/MultiTabAssistantChat.d.ts +3 -1
  74. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  75. package/dist/client/MultiTabAssistantChat.js +2 -2
  76. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  77. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  78. package/dist/client/agent-chat-adapter.js +216 -22
  79. package/dist/client/agent-chat-adapter.js.map +1 -1
  80. package/dist/client/sharing/ShareButton.d.ts +6 -0
  81. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  82. package/dist/client/sharing/ShareButton.js +25 -11
  83. package/dist/client/sharing/ShareButton.js.map +1 -1
  84. package/dist/client/sse-event-processor.d.ts +18 -1
  85. package/dist/client/sse-event-processor.d.ts.map +1 -1
  86. package/dist/client/sse-event-processor.js +34 -5
  87. package/dist/client/sse-event-processor.js.map +1 -1
  88. package/dist/collab/awareness.d.ts +2 -2
  89. package/dist/collab/awareness.d.ts.map +1 -1
  90. package/dist/collab/routes.d.ts +2 -2
  91. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  92. package/dist/notifications/routes.d.ts +3 -3
  93. package/dist/observability/routes.d.ts +7 -7
  94. package/dist/resources/handlers.d.ts +2 -2
  95. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  96. package/dist/server/transcribe-voice.d.ts +1 -1
  97. package/dist/templates/workspace-core/.agents/skills/reliable-mutations/SKILL.md +15 -17
  98. package/docs/design/durable-agent-runs.md +34 -35
  99. package/package.json +1 -1
  100. package/src/templates/workspace-core/.agents/skills/reliable-mutations/SKILL.md +15 -17
@@ -70,20 +70,20 @@ export function QuestionFlow({
70
70
  : Math.round((answeredCount / guidedQuestions.length) * 100);
71
71
 
72
72
  return (
73
- <div className="flex h-full w-full justify-center overflow-y-auto bg-transparent px-6 py-10 text-foreground sm:px-10 lg:px-14">
74
- <main className="w-full max-w-4xl pb-10">
75
- <div className="mb-9">
76
- <h2 className="text-3xl font-semibold tracking-normal text-foreground sm:text-4xl">
73
+ <div className="flex h-full w-full justify-center overflow-y-auto bg-transparent px-5 py-8 text-[13px] text-foreground sm:px-8 lg:px-10">
74
+ <main className="w-full max-w-[820px] pb-8">
75
+ <div className="mb-6 border-b border-[var(--design-editor-panel-divider-color)] pb-5">
76
+ <h2 className="text-[22px] font-semibold leading-7 tracking-normal text-foreground sm:text-2xl sm:leading-8">
77
77
  {title ?? t("questionFlow.defaultTitle")}
78
78
  </h2>
79
79
  {description ? (
80
- <p className="mt-3 max-w-2xl text-sm leading-6 text-muted-foreground">
80
+ <p className="mt-2 max-w-2xl text-[13px] leading-5 text-muted-foreground">
81
81
  {description}
82
82
  </p>
83
83
  ) : null}
84
84
  </div>
85
85
 
86
- <div className="space-y-10">
86
+ <div className="divide-y divide-[var(--design-editor-panel-divider-color)]">
87
87
  {guidedQuestions.map((question) => (
88
88
  <QuestionCard
89
89
  key={question.id}
@@ -94,13 +94,13 @@ export function QuestionFlow({
94
94
  ))}
95
95
  </div>
96
96
 
97
- <div className="mt-10 flex flex-wrap items-center gap-3">
97
+ <div className="mt-6 flex flex-wrap items-center gap-2 border-t border-[var(--design-editor-panel-divider-color)] pt-4">
98
98
  <Button
99
99
  type="button"
100
100
  size="sm"
101
101
  onClick={() => onSubmit(normalizeGuidedAnswers(answers))}
102
102
  disabled={!allRequiredAnswered}
103
- className="cursor-pointer"
103
+ className="h-8 cursor-pointer rounded-md bg-[var(--design-editor-accent-color)] px-3 text-[12px] text-[var(--design-editor-accent-contrast-color)] shadow-none hover:bg-[var(--design-editor-accent-hover-color)] hover:text-[var(--design-editor-accent-contrast-color)] focus-visible:ring-[var(--design-editor-accent-color)]"
104
104
  >
105
105
  {submitLabel ?? t("questionFlow.continue")}
106
106
  </Button>
@@ -109,7 +109,7 @@ export function QuestionFlow({
109
109
  variant="ghost"
110
110
  size="sm"
111
111
  onClick={onSkip}
112
- className="cursor-pointer"
112
+ className="h-8 cursor-pointer rounded-md px-3 text-[12px] text-muted-foreground hover:bg-[var(--design-editor-layer-hover-color)] hover:text-foreground"
113
113
  >
114
114
  {skipLabel ?? t("questionFlow.skip")}
115
115
  </Button>
@@ -131,13 +131,13 @@ function QuestionCard({
131
131
  const t = useT();
132
132
 
133
133
  return (
134
- <section className="min-w-0">
134
+ <section className="min-w-0 py-5 first:pt-0 last:pb-0">
135
135
  <div className="mb-3">
136
- <h3 className="text-lg font-semibold leading-6 text-foreground">
136
+ <h3 className="text-[13px] font-semibold leading-5 text-foreground">
137
137
  {question.question}
138
138
  </h3>
139
139
  {question.description && (
140
- <p className="mt-1 max-w-2xl text-sm leading-5 text-muted-foreground">
140
+ <p className="mt-1 max-w-2xl text-[12px] leading-5 text-muted-foreground">
141
141
  {question.description}
142
142
  </p>
143
143
  )}
@@ -162,7 +162,7 @@ function QuestionCard({
162
162
  placeholder={
163
163
  question.placeholder ?? t("questionFlow.textPlaceholder")
164
164
  }
165
- className="min-h-[92px] resize-none bg-transparent text-sm shadow-none"
165
+ className="min-h-[88px] resize-none rounded-md border-[var(--design-editor-control-border)] bg-[var(--design-editor-control-bg)] text-[12px] shadow-none placeholder:text-muted-foreground/70 focus-visible:ring-1 focus-visible:ring-[var(--design-editor-accent-color)]"
166
166
  />
167
167
  )}
168
168
  </section>
@@ -287,7 +287,7 @@ function TextOptions({
287
287
  placeholder={
288
288
  question.placeholder ?? t("questionFlow.customPlaceholder")
289
289
  }
290
- className="min-h-[72px] max-w-xl resize-none bg-transparent text-sm shadow-none"
290
+ className="min-h-[72px] max-w-xl resize-none rounded-md border-[var(--design-editor-control-border)] bg-[var(--design-editor-control-bg)] text-[12px] shadow-none placeholder:text-muted-foreground/70 focus-visible:ring-1 focus-visible:ring-[var(--design-editor-accent-color)]"
291
291
  />
292
292
  )}
293
293
  </div>
@@ -314,30 +314,30 @@ function OptionButton({
314
314
  onClick={onClick}
315
315
  aria-pressed={selected}
316
316
  className={cn(
317
- "group inline-flex min-w-0 max-w-full cursor-pointer items-center gap-2 rounded-full border text-start transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
318
- compact ? "px-3 py-2" : "px-4 py-2.5",
317
+ "group inline-flex min-h-8 min-w-0 max-w-full cursor-pointer items-center gap-2 rounded-md border text-start transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--design-editor-accent-color)] focus-visible:ring-offset-0",
318
+ compact ? "px-2.5 py-1.5" : "px-3 py-2",
319
319
  selected
320
- ? "border-foreground bg-foreground text-background"
321
- : "border-border bg-background/35 text-foreground hover:border-muted-foreground hover:bg-background/70",
320
+ ? "border-[var(--design-editor-accent-color)] bg-[var(--design-editor-selection-color)] text-foreground"
321
+ : "border-[var(--design-editor-control-border)] bg-[var(--design-editor-control-bg)] text-foreground hover:bg-[var(--design-editor-panel-raised-bg)]",
322
322
  )}
323
323
  >
324
324
  <span
325
325
  className={cn(
326
- "flex size-4 shrink-0 items-center justify-center border",
327
- multiSelect ? "rounded-sm" : "rounded-full",
326
+ "flex size-3.5 shrink-0 items-center justify-center border",
327
+ multiSelect ? "rounded-[3px]" : "rounded-full",
328
328
  selected
329
- ? "border-background bg-background text-foreground"
330
- : "border-muted-foreground/40 bg-transparent",
329
+ ? "border-[var(--design-editor-accent-color)] bg-[var(--design-editor-accent-color)] text-[var(--design-editor-accent-contrast-color)]"
330
+ : "border-muted-foreground/40 bg-[var(--design-editor-panel-bg)]",
331
331
  )}
332
332
  aria-hidden
333
333
  >
334
334
  {selected && <IconCheck className="size-3" />}
335
335
  </span>
336
336
  <span className="min-w-0 flex-1">
337
- <span className="flex min-w-0 flex-wrap items-center gap-1.5 text-sm font-medium leading-5">
337
+ <span className="flex min-w-0 flex-wrap items-center gap-1.5 text-[12px] font-semibold leading-4">
338
338
  <span className="min-w-0 truncate">{option.label}</span>
339
339
  {option.recommended && (
340
- <span className="rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase text-muted-foreground">
340
+ <span className="rounded bg-[var(--design-editor-panel-raised-bg)] px-1.5 py-0.5 text-[9px] font-semibold uppercase leading-none text-muted-foreground">
341
341
  {t("questionFlow.recommended")}
342
342
  </span>
343
343
  )}
@@ -346,7 +346,7 @@ function OptionButton({
346
346
  <span className="sr-only">{option.description}</span>
347
347
  )}
348
348
  {option.preview && (
349
- <span className="mt-2 block max-h-36 overflow-auto whitespace-pre-wrap rounded-md border border-border/60 bg-background/70 px-2 py-1.5 font-mono !text-[11px] leading-4 text-muted-foreground">
349
+ <span className="mt-2 block max-h-36 overflow-auto whitespace-pre-wrap rounded-md border border-[var(--design-editor-control-border)] bg-[var(--design-editor-panel-bg)] px-2 py-1.5 font-mono !text-[11px] leading-4 text-muted-foreground">
350
350
  {option.preview}
351
351
  </span>
352
352
  )}
@@ -393,21 +393,21 @@ function ColorOptions({
393
393
  onClick={() => toggleOption(option.value)}
394
394
  aria-pressed={selected}
395
395
  className={cn(
396
- "group inline-flex min-w-0 max-w-full cursor-pointer items-center gap-2 rounded-full border px-3 py-2 text-start transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
396
+ "group inline-flex min-h-8 min-w-0 max-w-full cursor-pointer items-center gap-2 rounded-md border px-2.5 py-1.5 text-start transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--design-editor-accent-color)] focus-visible:ring-offset-0",
397
397
  selected
398
- ? "border-foreground bg-foreground text-background"
399
- : "border-border bg-background/35 text-foreground hover:border-muted-foreground hover:bg-background/70",
398
+ ? "border-[var(--design-editor-accent-color)] bg-[var(--design-editor-selection-color)] text-foreground"
399
+ : "border-[var(--design-editor-control-border)] bg-[var(--design-editor-control-bg)] text-foreground hover:bg-[var(--design-editor-panel-raised-bg)]",
400
400
  )}
401
401
  >
402
402
  <span
403
403
  className={cn(
404
- "size-6 shrink-0 rounded-full border border-border",
404
+ "size-5 shrink-0 rounded-full border border-[var(--design-editor-control-border)]",
405
405
  selected &&
406
- "ring-2 ring-background/70 ring-offset-1 ring-offset-foreground",
406
+ "ring-1 ring-[var(--design-editor-accent-color)] ring-offset-1 ring-offset-[var(--design-editor-control-bg)]",
407
407
  )}
408
408
  style={{ backgroundColor: option.color || option.value }}
409
409
  />
410
- <span className="min-w-0 flex-1 truncate text-sm font-medium">
410
+ <span className="min-w-0 flex-1 truncate text-[12px] font-semibold leading-4">
411
411
  {option.label}
412
412
  </span>
413
413
  {selected && <IconPalette className="size-3.5 shrink-0" />}
@@ -438,8 +438,8 @@ function SliderQuestion({
438
438
  // display-only midpoint fallback for the rendered slider position.
439
439
 
440
440
  return (
441
- <div className="max-w-xl px-1 py-2">
442
- <div className="mb-3 flex items-center justify-between text-xs text-muted-foreground">
441
+ <div className="max-w-xl rounded-md border border-[var(--design-editor-control-border)] bg-[var(--design-editor-control-bg)] px-3 py-3">
442
+ <div className="mb-3 flex items-center justify-between text-[11px] text-muted-foreground">
443
443
  <span>{min}</span>
444
444
  <span className="font-medium tabular-nums text-foreground">
445
445
  {current}
@@ -488,14 +488,14 @@ function FileDropZone({
488
488
  className={cn(
489
489
  "flex max-w-xl cursor-pointer flex-col items-center justify-center rounded-md border border-dashed p-5 transition-colors",
490
490
  dragOver
491
- ? "border-primary bg-primary/5"
492
- : "border-border bg-transparent hover:border-muted-foreground/50",
491
+ ? "border-[var(--design-editor-accent-color)] bg-[var(--design-editor-selection-color)]"
492
+ : "border-[var(--design-editor-control-border)] bg-[var(--design-editor-control-bg)] hover:bg-[var(--design-editor-panel-raised-bg)]",
493
493
  )}
494
494
  >
495
495
  <IconUpload className="mb-2 size-5 text-muted-foreground" />
496
- <p className="text-sm text-muted-foreground">
496
+ <p className="text-[12px] text-muted-foreground">
497
497
  {t("questionFlow.dragFiles")}{" "}
498
- <label className="cursor-pointer text-primary hover:underline">
498
+ <label className="cursor-pointer text-[var(--design-editor-accent-color)] hover:underline">
499
499
  {t("questionFlow.browse")}
500
500
  <input
501
501
  type="file"
@@ -516,9 +516,9 @@ function FileDropZone({
516
516
  {files.map((file, index) => (
517
517
  <div
518
518
  key={`${file.name}:${index}`}
519
- className="flex items-center gap-2 rounded-md bg-muted/50 px-2 py-1 text-xs text-muted-foreground"
519
+ className="flex items-center gap-2 rounded-md bg-[var(--design-editor-control-bg)] px-2 py-1 text-[11px] text-muted-foreground"
520
520
  >
521
- <IconCheck className="size-3 text-primary" />
521
+ <IconCheck className="size-3 text-[var(--design-editor-accent-color)]" />
522
522
  <span className="min-w-0 flex-1 truncate">{file.name}</span>
523
523
  <button
524
524
  type="button"