@agent-native/core 0.84.18 → 0.84.21

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 (157) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +21 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/a2a/caller-auth.ts +37 -8
  5. package/corpus/core/src/a2a/client.ts +178 -67
  6. package/corpus/core/src/agent/production-agent.ts +19 -3
  7. package/corpus/core/src/agent/run-store.ts +180 -13
  8. package/corpus/core/src/agent/types.ts +1 -1
  9. package/corpus/core/src/cli/pr-visual-recap-workflow.ts +1 -1
  10. package/corpus/core/src/cli/recap.ts +43 -34
  11. package/corpus/core/src/client/AssistantChat.tsx +49 -0
  12. package/corpus/core/src/client/PoweredByBadge.tsx +70 -17
  13. package/corpus/core/src/client/active-run-state.ts +30 -0
  14. package/corpus/core/src/client/agent-chat-adapter.ts +5 -1
  15. package/corpus/core/src/client/extensions/EmbeddedExtension.tsx +41 -3
  16. package/corpus/core/src/client/extensions/ExtensionViewer.tsx +133 -0
  17. package/corpus/core/src/client/extensions/ExtensionsSidebarSection.tsx +2 -2
  18. package/corpus/core/src/client/i18n.tsx +10 -5
  19. package/corpus/core/src/client/sse-event-processor.ts +147 -5
  20. package/corpus/core/src/extensions/html-shell.ts +17 -3
  21. package/corpus/core/src/extensions/theme.ts +39 -0
  22. package/corpus/core/src/file-upload/builder.ts +35 -14
  23. package/corpus/core/src/file-upload/types.ts +3 -0
  24. package/corpus/core/src/integrations/a2a-continuation-processor.ts +49 -24
  25. package/corpus/core/src/mcp/builtin-tools.ts +3 -0
  26. package/corpus/core/src/mcp/org-directory.ts +66 -20
  27. package/corpus/core/src/scripts/call-agent.ts +7 -2
  28. package/corpus/templates/analytics/actions/provider-api-request.ts +8 -1
  29. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +2 -1
  30. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +91 -33
  31. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +161 -12
  32. package/corpus/templates/analytics/changelog/2026-07-01-session-replays-load-large-production-recordings-from-scoped.md +6 -0
  33. package/corpus/templates/calendar/app/pages/BookingPage.tsx +14 -8
  34. package/corpus/templates/calendar/changelog/2026-07-01-meeting-invite-pages-have-cleaner-branding-a-black-dark-mo.md +6 -0
  35. package/corpus/templates/clips/actions/create-recording.ts +7 -2
  36. package/corpus/templates/clips/actions/finalize-recording.ts +11 -0
  37. package/corpus/templates/clips/actions/get-recording-player-data.ts +4 -2
  38. package/corpus/templates/clips/actions/import-loom-recording.ts +1 -0
  39. package/corpus/templates/clips/actions/lib/loom-video.ts +16 -0
  40. package/corpus/templates/clips/app/components/player/scrubber.tsx +2 -2
  41. package/corpus/templates/clips/app/components/recorder/countdown-overlay.tsx +4 -3
  42. package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +39 -12
  43. package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +65 -1
  44. package/corpus/templates/clips/app/components/recorder/recording-toolbar.tsx +1 -22
  45. package/corpus/templates/clips/app/routes/record.tsx +48 -8
  46. package/corpus/templates/clips/changelog/2026-07-01-chrome-recording-uploads-now-serialize-chunks-to-avoid-resum.md +6 -0
  47. package/corpus/templates/clips/changelog/2026-07-01-clip-uploads-and-loom-imports-finish-sooner-by-skipping-the-.md +6 -0
  48. package/corpus/templates/clips/changelog/2026-07-01-clip-uploads-and-playback-recover-more-reliably-from-storage.md +6 -0
  49. package/corpus/templates/clips/changelog/2026-07-01-desktop-recording-avoids-unsupported-browser-tab-capture.md +6 -0
  50. package/corpus/templates/clips/changelog/2026-07-01-embedded-player-progress-is-easier-to-see-on-dark-videos.md +6 -0
  51. package/corpus/templates/clips/changelog/2026-07-01-loom-imports-show-clear-guidance-when-loom-does-not-provide-a-downloadable-video.md +6 -0
  52. package/corpus/templates/clips/changelog/2026-07-01-preserve-in-flight-streaming-uploads-when-the-streaming-kill.md +6 -0
  53. package/corpus/templates/clips/changelog/2026-07-01-recording-controls-are-cleaner-and-the-countdown-uses-shadow.md +6 -0
  54. package/corpus/templates/clips/changelog/2026-07-01-recordings-now-recover-when-final-upload-status-gets-lost.md +6 -0
  55. package/corpus/templates/clips/chrome-extension/public/manifest.json +1 -1
  56. package/corpus/templates/clips/chrome-extension/src/finalize-recovery.ts +7 -224
  57. package/corpus/templates/clips/chrome-extension/src/offscreen.ts +94 -29
  58. package/corpus/templates/clips/desktop/src/lib/recorder.ts +87 -5
  59. package/corpus/templates/clips/server/lib/streaming-upload-mode.ts +7 -0
  60. package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +14 -1
  61. package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/status.get.ts +4 -1
  62. package/corpus/templates/clips/server/routes/api/video/[recordingId].get.ts +96 -1
  63. package/corpus/templates/clips/shared/finalize-recovery.ts +242 -0
  64. package/corpus/templates/design/changelog/2026-07-01-design-recovers-sooner-when-an-agent-gets-stuck-preparing-a-.md +6 -0
  65. package/corpus/templates/plan/app/global.css +1 -1
  66. package/dist/a2a/caller-auth.d.ts +1 -0
  67. package/dist/a2a/caller-auth.d.ts.map +1 -1
  68. package/dist/a2a/caller-auth.js +34 -8
  69. package/dist/a2a/caller-auth.js.map +1 -1
  70. package/dist/a2a/client.d.ts +4 -0
  71. package/dist/a2a/client.d.ts.map +1 -1
  72. package/dist/a2a/client.js +148 -58
  73. package/dist/a2a/client.js.map +1 -1
  74. package/dist/agent/production-agent.d.ts.map +1 -1
  75. package/dist/agent/production-agent.js +19 -4
  76. package/dist/agent/production-agent.js.map +1 -1
  77. package/dist/agent/run-store.d.ts +19 -6
  78. package/dist/agent/run-store.d.ts.map +1 -1
  79. package/dist/agent/run-store.js +163 -13
  80. package/dist/agent/run-store.js.map +1 -1
  81. package/dist/agent/types.d.ts +1 -0
  82. package/dist/agent/types.d.ts.map +1 -1
  83. package/dist/agent/types.js.map +1 -1
  84. package/dist/cli/pr-visual-recap-workflow.d.ts +1 -1
  85. package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
  86. package/dist/cli/pr-visual-recap-workflow.js +1 -1
  87. package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
  88. package/dist/cli/recap.d.ts +3 -3
  89. package/dist/cli/recap.d.ts.map +1 -1
  90. package/dist/cli/recap.js +41 -34
  91. package/dist/cli/recap.js.map +1 -1
  92. package/dist/client/AssistantChat.d.ts +2 -0
  93. package/dist/client/AssistantChat.d.ts.map +1 -1
  94. package/dist/client/AssistantChat.js +36 -2
  95. package/dist/client/AssistantChat.js.map +1 -1
  96. package/dist/client/PoweredByBadge.d.ts +9 -3
  97. package/dist/client/PoweredByBadge.d.ts.map +1 -1
  98. package/dist/client/PoweredByBadge.js +47 -15
  99. package/dist/client/PoweredByBadge.js.map +1 -1
  100. package/dist/client/active-run-state.d.ts +3 -0
  101. package/dist/client/active-run-state.d.ts.map +1 -1
  102. package/dist/client/active-run-state.js +24 -0
  103. package/dist/client/active-run-state.js.map +1 -1
  104. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  105. package/dist/client/agent-chat-adapter.js +5 -1
  106. package/dist/client/agent-chat-adapter.js.map +1 -1
  107. package/dist/client/extensions/EmbeddedExtension.d.ts.map +1 -1
  108. package/dist/client/extensions/EmbeddedExtension.js +32 -3
  109. package/dist/client/extensions/EmbeddedExtension.js.map +1 -1
  110. package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
  111. package/dist/client/extensions/ExtensionViewer.js +59 -2
  112. package/dist/client/extensions/ExtensionViewer.js.map +1 -1
  113. package/dist/client/extensions/ExtensionsSidebarSection.js +2 -2
  114. package/dist/client/extensions/ExtensionsSidebarSection.js.map +1 -1
  115. package/dist/client/i18n.d.ts +1 -1
  116. package/dist/client/i18n.d.ts.map +1 -1
  117. package/dist/client/i18n.js +6 -2
  118. package/dist/client/i18n.js.map +1 -1
  119. package/dist/client/sse-event-processor.d.ts +2 -0
  120. package/dist/client/sse-event-processor.d.ts.map +1 -1
  121. package/dist/client/sse-event-processor.js +121 -5
  122. package/dist/client/sse-event-processor.js.map +1 -1
  123. package/dist/collab/awareness.d.ts +2 -2
  124. package/dist/collab/awareness.d.ts.map +1 -1
  125. package/dist/collab/routes.d.ts +1 -1
  126. package/dist/extensions/html-shell.d.ts.map +1 -1
  127. package/dist/extensions/html-shell.js +17 -3
  128. package/dist/extensions/html-shell.js.map +1 -1
  129. package/dist/extensions/theme.d.ts +9 -0
  130. package/dist/extensions/theme.d.ts.map +1 -1
  131. package/dist/extensions/theme.js +38 -0
  132. package/dist/extensions/theme.js.map +1 -1
  133. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  134. package/dist/file-upload/builder.d.ts.map +1 -1
  135. package/dist/file-upload/builder.js +22 -8
  136. package/dist/file-upload/builder.js.map +1 -1
  137. package/dist/file-upload/types.d.ts +5 -1
  138. package/dist/file-upload/types.d.ts.map +1 -1
  139. package/dist/file-upload/types.js.map +1 -1
  140. package/dist/integrations/a2a-continuation-processor.js +43 -18
  141. package/dist/integrations/a2a-continuation-processor.js.map +1 -1
  142. package/dist/mcp/builtin-tools.d.ts.map +1 -1
  143. package/dist/mcp/builtin-tools.js +3 -0
  144. package/dist/mcp/builtin-tools.js.map +1 -1
  145. package/dist/mcp/org-directory.d.ts.map +1 -1
  146. package/dist/mcp/org-directory.js +58 -20
  147. package/dist/mcp/org-directory.js.map +1 -1
  148. package/dist/notifications/routes.d.ts +3 -3
  149. package/dist/observability/routes.d.ts +6 -6
  150. package/dist/progress/routes.d.ts +1 -1
  151. package/dist/resources/handlers.d.ts +3 -3
  152. package/dist/scripts/call-agent.d.ts.map +1 -1
  153. package/dist/scripts/call-agent.js +2 -2
  154. package/dist/scripts/call-agent.js.map +1 -1
  155. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  156. package/dist/server/transcribe-voice.d.ts +1 -1
  157. package/package.json +1 -1
@@ -1,8 +1,14 @@
1
1
  export interface PoweredByBadgeProps {
2
2
  position?: "bottom-right" | "bottom-left";
3
+ /** Plain shows the logo only with no surrounding badge chrome. */
4
+ variant?: "badge" | "plain";
5
+ /** When true, positioning is handled by the parent container. */
6
+ embedded?: boolean;
3
7
  }
4
8
  export interface OpenSourceBadgeProps {
5
9
  position?: "bottom-left" | "bottom-right";
10
+ /** When true, positioning is handled by the parent container. */
11
+ embedded?: boolean;
6
12
  }
7
13
  /**
8
14
  * Small branding badge: "Built with [Agent Native logo]"
@@ -13,11 +19,11 @@ export interface OpenSourceBadgeProps {
13
19
  * - Respects prefers-color-scheme
14
20
  * - Can be hidden via HIDE_BRANDING=true env var (for white-label)
15
21
  */
16
- export declare function PoweredByBadge({ position, }: PoweredByBadgeProps): import("react").JSX.Element | null;
22
+ export declare function PoweredByBadge({ position, variant, embedded, }: PoweredByBadgeProps): import("react").JSX.Element | null;
17
23
  /**
18
- * Small GitHub badge: "100% free and open source"
24
+ * Small GitHub badge: "Free and open source"
19
25
  *
20
26
  * Intended to pair with PoweredByBadge on public pages.
21
27
  */
22
- export declare function OpenSourceBadge({ position, }: OpenSourceBadgeProps): import("react").JSX.Element | null;
28
+ export declare function OpenSourceBadge({ position, embedded, }: OpenSourceBadgeProps): import("react").JSX.Element | null;
23
29
  //# sourceMappingURL=PoweredByBadge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PoweredByBadge.d.ts","sourceRoot":"","sources":["../../src/client/PoweredByBadge.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,aAAa,GAAG,cAAc,CAAC;CAC3C;AA+BD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAyB,GAC1B,EAAE,mBAAmB,sCAwGrB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAwB,GACzB,EAAE,oBAAoB,sCAuEtB"}
1
+ {"version":3,"file":"PoweredByBadge.d.ts","sourceRoot":"","sources":["../../src/client/PoweredByBadge.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC;IAC1C,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC5B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,aAAa,GAAG,cAAc,CAAC;IAC1C,iEAAiE;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA+BD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAyB,EACzB,OAAiB,EACjB,QAAgB,GACjB,EAAE,mBAAmB,sCAiIrB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAwB,EACxB,QAAgB,GACjB,EAAE,oBAAoB,sCAyFtB"}
@@ -1,6 +1,7 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { IconBrandGithub } from "@tabler/icons-react";
3
3
  import { appPath } from "./api-path.js";
4
+ import { cn } from "./utils.js";
4
5
  const containerStyle = (position) => ({
5
6
  position: "fixed",
6
7
  bottom: 16,
@@ -34,7 +35,7 @@ const darkQuery = "(prefers-color-scheme: dark)";
34
35
  * - Respects prefers-color-scheme
35
36
  * - Can be hidden via HIDE_BRANDING=true env var (for white-label)
36
37
  */
37
- export function PoweredByBadge({ position = "bottom-right", }) {
38
+ export function PoweredByBadge({ position = "bottom-right", variant = "badge", embedded = false, }) {
38
39
  // Allow hiding via env var
39
40
  const hidden = import.meta.env
40
41
  ?.VITE_HIDE_BRANDING === "true";
@@ -42,10 +43,11 @@ export function PoweredByBadge({ position = "bottom-right", }) {
42
43
  return null;
43
44
  const logoOnLight = appPath("/agent-native-logo-light.svg");
44
45
  const logoOnDark = appPath("/agent-native-logo-dark.svg");
46
+ const isPlain = variant === "plain";
45
47
  return (_jsxs(_Fragment, { children: [_jsx("style", { children: `
46
48
  .an-powered-logo {
47
49
  display: block;
48
- height: 14px;
50
+ height: ${isPlain ? "16.2px" : "14px"};
49
51
  width: auto;
50
52
  flex: none;
51
53
  }
@@ -53,14 +55,25 @@ export function PoweredByBadge({ position = "bottom-right", }) {
53
55
  display: none;
54
56
  }
55
57
  @media (max-width: 640px) {
56
- .an-powered-badge {
58
+ .an-powered-badge:not(.an-powered-badge-embedded) {
57
59
  position: static !important;
58
60
  margin: 0.75rem auto 0 !important;
59
61
  width: max-content;
60
62
  max-width: calc(100vw - 2rem);
61
63
  }
62
64
  }
63
- .dark .an-powered-badge {
65
+ .an-powered-badge-plain {
66
+ background: transparent !important;
67
+ border-color: transparent !important;
68
+ backdrop-filter: none !important;
69
+ -webkit-backdrop-filter: none !important;
70
+ padding: 0 !important;
71
+ opacity: 1 !important;
72
+ }
73
+ .an-powered-badge-plain:hover {
74
+ opacity: 0.82 !important;
75
+ }
76
+ .dark .an-powered-badge:not(.an-powered-badge-plain) {
64
77
  background: rgba(255, 255, 255, 0.06) !important;
65
78
  border-color: rgba(255, 255, 255, 0.08) !important;
66
79
  color: rgba(215, 215, 215, 0.94) !important;
@@ -72,7 +85,7 @@ export function PoweredByBadge({ position = "bottom-right", }) {
72
85
  display: block;
73
86
  }
74
87
  @media ${darkQuery} {
75
- .an-powered-badge {
88
+ .an-powered-badge:not(.an-powered-badge-plain) {
76
89
  background: rgba(255, 255, 255, 0.06) !important;
77
90
  border-color: rgba(255, 255, 255, 0.08) !important;
78
91
  color: rgba(215, 215, 215, 0.94) !important;
@@ -84,7 +97,7 @@ export function PoweredByBadge({ position = "bottom-right", }) {
84
97
  display: block;
85
98
  }
86
99
  }
87
- .light .an-powered-badge {
100
+ .light .an-powered-badge:not(.an-powered-badge-plain) {
88
101
  background: rgba(0, 0, 0, 0.05) !important;
89
102
  border-color: rgba(0, 0, 0, 0.06) !important;
90
103
  color: rgba(95, 95, 95, 0.95) !important;
@@ -95,29 +108,36 @@ export function PoweredByBadge({ position = "bottom-right", }) {
95
108
  .light .an-powered-logo-dark {
96
109
  display: none;
97
110
  }
98
- .an-powered-badge:hover {
111
+ .an-powered-badge:not(.an-powered-badge-plain):hover {
99
112
  opacity: 1 !important;
100
113
  color: rgba(70, 70, 70, 1) !important;
101
114
  }
102
115
  @media ${darkQuery} {
103
- .an-powered-badge:hover {
116
+ .an-powered-badge:not(.an-powered-badge-plain):hover {
104
117
  color: rgba(238, 238, 238, 1) !important;
105
118
  }
106
119
  }
107
- .dark .an-powered-badge:hover {
120
+ .dark .an-powered-badge:not(.an-powered-badge-plain):hover {
108
121
  color: rgba(238, 238, 238, 1) !important;
109
122
  }
110
- .light .an-powered-badge:hover {
123
+ .light .an-powered-badge:not(.an-powered-badge-plain):hover {
111
124
  color: rgba(70, 70, 70, 1) !important;
112
125
  }
113
- ` }), _jsxs("a", { href: "https://agent-native.com", target: "_blank", rel: "noopener noreferrer", className: "an-powered-badge", style: containerStyle(position), "aria-label": "Built with Agent Native", children: [_jsx("span", { children: "Built with" }), _jsx("img", { src: logoOnLight, alt: "Agent Native", className: "an-powered-logo an-powered-logo-light" }), _jsx("img", { src: logoOnDark, alt: "Agent Native", className: "an-powered-logo an-powered-logo-dark" })] })] }));
126
+ ` }), _jsxs("a", { href: "https://agent-native.com", target: "_blank", rel: "noopener noreferrer", className: cn("an-powered-badge", isPlain && "an-powered-badge-plain", embedded && "an-powered-badge-embedded"), style: embedded
127
+ ? {
128
+ display: "inline-flex",
129
+ alignItems: "center",
130
+ textDecoration: "none",
131
+ transition: "opacity 0.2s",
132
+ }
133
+ : containerStyle(position), "aria-label": "Built with Agent Native", children: [!isPlain && _jsx("span", { children: "Built with" }), _jsx("img", { src: logoOnLight, alt: "Agent Native", className: "an-powered-logo an-powered-logo-light" }), _jsx("img", { src: logoOnDark, alt: "Agent Native", className: "an-powered-logo an-powered-logo-dark" })] })] }));
114
134
  }
115
135
  /**
116
- * Small GitHub badge: "100% free and open source"
136
+ * Small GitHub badge: "Free and open source"
117
137
  *
118
138
  * Intended to pair with PoweredByBadge on public pages.
119
139
  */
120
- export function OpenSourceBadge({ position = "bottom-left", }) {
140
+ export function OpenSourceBadge({ position = "bottom-left", embedded = false, }) {
121
141
  const hidden = import.meta.env
122
142
  ?.VITE_HIDE_BRANDING === "true";
123
143
  if (hidden)
@@ -138,7 +158,7 @@ export function OpenSourceBadge({ position = "bottom-left", }) {
138
158
  opacity: 0.95 !important;
139
159
  }
140
160
  @media (max-width: 640px) {
141
- .an-open-source-badge {
161
+ .an-open-source-badge:not(.an-open-source-badge-embedded) {
142
162
  position: static !important;
143
163
  margin: 1rem auto 0 !important;
144
164
  width: max-content;
@@ -171,6 +191,18 @@ export function OpenSourceBadge({ position = "bottom-left", }) {
171
191
  .light .an-open-source-badge:hover {
172
192
  color: #33C4FF !important;
173
193
  }
174
- ` }), _jsxs("a", { href: "https://github.com/BuilderIO/agent-native", target: "_blank", rel: "noopener noreferrer", className: "an-open-source-badge", style: containerStyle(position), children: [_jsx(IconBrandGithub, { "aria-hidden": "true", stroke: 1.8 }), _jsx("span", { children: "100% free and open source" })] })] }));
194
+ ` }), _jsxs("a", { href: "https://github.com/BuilderIO/agent-native", target: "_blank", rel: "noopener noreferrer", className: cn("an-open-source-badge", embedded && "an-open-source-badge-embedded"), style: embedded
195
+ ? {
196
+ display: "flex",
197
+ alignItems: "center",
198
+ gap: 6,
199
+ fontSize: 12,
200
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
201
+ fontWeight: 600,
202
+ lineHeight: 1,
203
+ textDecoration: "none",
204
+ transition: "opacity 0.2s, color 0.2s",
205
+ }
206
+ : containerStyle(position), children: [_jsx(IconBrandGithub, { "aria-hidden": "true", stroke: 1.8 }), _jsx("span", { children: "Free and open source" })] })] }));
175
207
  }
176
208
  //# sourceMappingURL=PoweredByBadge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PoweredByBadge.js","sourceRoot":"","sources":["../../src/client/PoweredByBadge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAUxC,MAAM,cAAc,GAAG,CACrB,QAAwC,EACzB,EAAE,CAAC,CAAC;IACnB,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,EAAE;IACV,GAAG,CAAC,QAAQ,KAAK,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAC/D,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,GAAG,EAAE,CAAC;IACN,OAAO,EAAE,UAAU;IACnB,YAAY,EAAE,CAAC;IACf,QAAQ,EAAE,EAAE;IACZ,UAAU,EACR,mEAAmE;IACrE,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,CAAC;IACb,KAAK,EAAE,wBAAwB;IAC/B,UAAU,EAAE,qBAAqB;IACjC,cAAc,EAAE,WAAW;IAC3B,oBAAoB,EAAE,WAAW;IACjC,MAAM,EAAE,+BAA+B;IACvC,cAAc,EAAE,MAAM;IACtB,UAAU,EAAE,0BAA0B;IACtC,OAAO,EAAE,IAAI;CACd,CAAC,CAAC;AAEH,MAAM,SAAS,GAAG,8BAA8B,CAAC;AAEjD;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,QAAQ,GAAG,cAAc,GACL;IACpB,2BAA2B;IAC3B,MAAM,MAAM,GACT,OAAO,IAAI,CAAC,GAA0C;QACrD,EAAE,kBAAkB,KAAK,MAAM,CAAC;IAEpC,IAAI,MAAM;QAAE,OAAO,IAAI,CAAC;IAExB,MAAM,WAAW,GAAG,O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import { IconBrandGithub } from \"@tabler/icons-react\";\nimport type { CSSProperties } from \"react\";\n\nimport { appPath } from \"./api-path.js\";\n\nexport interface PoweredByBadgeProps {\n position?: \"bottom-right\" | \"bottom-left\";\n}\n\nexport interface OpenSourceBadgeProps {\n position?: \"bottom-left\" | \"bottom-right\";\n}\n\nconst containerStyle = (\n position: \"bottom-right\" | \"bottom-left\",\n): CSSProperties => ({\n position: \"fixed\",\n bottom: 16,\n ...(position === \"bottom-right\" ? { right: 16 } : { left: 16 }),\n zIndex: 50,\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n padding: \"6px 12px\",\n borderRadius: 8,\n fontSize: 12,\n fontFamily:\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n fontWeight: 500,\n lineHeight: 1,\n color: \"rgba(95, 95, 95, 0.95)\",\n background: \"rgba(0, 0, 0, 0.05)\",\n backdropFilter: \"blur(8px)\",\n WebkitBackdropFilter: \"blur(8px)\",\n border: \"1px solid rgba(0, 0, 0, 0.06)\",\n textDecoration: \"none\",\n transition: \"opacity 0.2s, color 0.2s\",\n opacity: 0.82,\n});\n\nconst darkQuery = \"(prefers-color-scheme: dark)\";\n\n/**\n * Small branding badge: \"Built with [Agent Native logo]\"\n *\n * - Fixed position in the corner\n * - Subtle, semi-transparent\n * - Links to https://agent-native.com\n * - Respects prefers-color-scheme\n * - Can be hidden via HIDE_BRANDING=true env var (for white-label)\n */\nexport function PoweredByBadge({\n position = \"bottom-right\",\n}: PoweredByBadgeProps) {\n // Allow hiding via env var\n const hidden =\n (import.meta.env as Record<string, string | undefined>)\n ?.VITE_HIDE_BRANDING === \"true\";\n\n if (hidden) return null;\n\n const logoOnLight = appPath(\"/agent-native-logo-light.svg\");\n const logoOnDark = appPath(\"/agent-native-logo-dark.svg\");\n\n return (\n <>\n <style>{`\n .an-powered-logo {\n display: block;\n height: 14px;\n width: auto;\n flex: none;\n }\n .an-powered-logo-dark {\n display: none;\n }\n @media (max-width: 640px) {\n .an-powered-badge {\n position: static !important;\n margin: 0.75rem auto 0 !important;\n width: max-content;\n max-width: calc(100vw - 2rem);\n }\n }\n .dark .an-powered-badge {\n background: rgba(255, 255, 255, 0.06) !important;\n border-color: rgba(255, 255, 255, 0.08) !important;\n color: rgba(215, 215, 215, 0.94) !important;\n }\n .dark .an-powered-logo-light {\n display: none;\n }\n .dark .an-powered-logo-dark {\n display: block;\n }\n @media ${darkQuery} {\n .an-powered-badge {\n background: rgba(255, 255, 255, 0.06) !important;\n border-color: rgba(255, 255, 255, 0.08) !important;\n color: rgba(215, 215, 215, 0.94) !important;\n }\n .an-powered-logo-light {\n display: none;\n }\n .an-powered-logo-dark {\n display: block;\n }\n }\n .light .an-powered-badge {\n background: rgba(0, 0, 0, 0.05) !important;\n border-color: rgba(0, 0, 0, 0.06) !important;\n color: rgba(95, 95, 95, 0.95) !important;\n }\n .light .an-powered-logo-light {\n display: block;\n }\n .light .an-powered-logo-dark {\n display: none;\n }\n .an-powered-badge:hover {\n opacity: 1 !important;\n color: rgba(70, 70, 70, 1) !important;\n }\n @media ${darkQuery} {\n .an-powered-badge:hover {\n color: rgba(238, 238, 238, 1) !important;\n }\n }\n .dark .an-powered-badge:hover {\n color: rgba(238, 238, 238, 1) !important;\n }\n .light .an-powered-badge:hover {\n color: rgba(70, 70, 70, 1) !important;\n }\n `}</style>\n <a\n href=\"https://agent-native.com\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"an-powered-badge\"\n style={containerStyle(position)}\n aria-label=\"Built with Agent Native\"\n >\n <span>Built with</span>\n <img\n src={logoOnLight}\n alt=\"Agent Native\"\n className=\"an-powered-logo an-powered-logo-light\"\n />\n <img\n src={logoOnDark}\n alt=\"Agent Native\"\n className=\"an-powered-logo an-powered-logo-dark\"\n />\n </a>\n </>\n );\n}\n\n/**\n * Small GitHub badge: \"100% free and open source\"\n *\n * Intended to pair with PoweredByBadge on public pages.\n */\nexport function OpenSourceBadge({\n position = \"bottom-left\",\n}: OpenSourceBadgeProps) {\n const hidden =\n (import.meta.env as Record<string, string | undefined>)\n ?.VITE_HIDE_BRANDING === \"true\";\n\n if (hidden) return null;\n\n return (\n <>\n <style>{`\n .an-open-source-badge svg {\n width: 15px;\n height: 15px;\n flex: none;\n }\n .an-open-source-badge {\n background: transparent !important;\n border-color: transparent !important;\n backdrop-filter: none !important;\n -webkit-backdrop-filter: none !important;\n color: #00B5FF !important;\n font-weight: 600 !important;\n opacity: 0.95 !important;\n }\n @media (max-width: 640px) {\n .an-open-source-badge {\n position: static !important;\n margin: 1rem auto 0 !important;\n width: max-content;\n max-width: calc(100vw - 2rem);\n }\n }\n .dark .an-open-source-badge {\n color: #00B5FF !important;\n }\n @media ${darkQuery} {\n .an-open-source-badge {\n color: #00B5FF !important;\n }\n }\n .light .an-open-source-badge {\n color: #00B5FF !important;\n }\n .an-open-source-badge:hover {\n opacity: 1 !important;\n color: #33C4FF !important;\n }\n @media ${darkQuery} {\n .an-open-source-badge:hover {\n color: #33C4FF !important;\n }\n }\n .dark .an-open-source-badge:hover {\n color: #33C4FF !important;\n }\n .light .an-open-source-badge:hover {\n color: #33C4FF !important;\n }\n `}</style>\n <a\n href=\"https://github.com/BuilderIO/agent-native\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"an-open-source-badge\"\n style={containerStyle(position)}\n >\n <IconBrandGithub aria-hidden=\"true\" stroke={1.8} />\n <span>100% free and open source</span>\n </a>\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"PoweredByBadge.js","sourceRoot":"","sources":["../../src/client/PoweredByBadge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAgBhC,MAAM,cAAc,GAAG,CACrB,QAAwC,EACzB,EAAE,CAAC,CAAC;IACnB,QAAQ,EAAE,OAAO;IACj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EACD,KAAK,EACH,QAAQ;oBACN,CAAC,CAAC;wBACE,OAAO,EAAE,MAAM;wBACf,UAAU,EAAE,QAAQ;wBACpB,GAAG,EAAE,CAAC;wBACN,QAAQ,EAAE,EAAE;wBACZ,UAAU,EACR,mEAAmE;wBACrE,UAAU,EAAE,GAAG;wBACf,UAAU,EAAE,CAAC;wBACb,cAAc,EAAE,MAAM;wBACtB,UAAU,EAAE,0BAA0B;qBACvC;oBACH,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,aAG9B,KAAC,eAAe,mBAAa,MAAM,EAAC,MAAM,EAAE,GAAG,GAAI,EACnD,kDAAiC,IAC/B,IACH,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { IconBrandGithub } from \"@tabler/icons-react\";\nimport type { CSSProperties } from \"react\";\n\nimport { appPath } from \"./api-path.js\";\nimport { cn } from \"./utils.js\";\n\nexport interface PoweredByBadgeProps {\n position?: \"bottom-right\" | \"bottom-left\";\n /** Plain shows the logo only with no surrounding badge chrome. */\n variant?: \"badge\" | \"plain\";\n /** When true, positioning is handled by the parent container. */\n embedded?: boolean;\n}\n\nexport interface OpenSourceBadgeProps {\n position?: \"bottom-left\" | \"bottom-right\";\n /** When true, positioning is handled by the parent container. */\n embedded?: boolean;\n}\n\nconst containerStyle = (\n position: \"bottom-right\" | \"bottom-left\",\n): CSSProperties => ({\n position: \"fixed\",\n bottom: 16,\n ...(position === \"bottom-right\" ? { right: 16 } : { left: 16 }),\n zIndex: 50,\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n padding: \"6px 12px\",\n borderRadius: 8,\n fontSize: 12,\n fontFamily:\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n fontWeight: 500,\n lineHeight: 1,\n color: \"rgba(95, 95, 95, 0.95)\",\n background: \"rgba(0, 0, 0, 0.05)\",\n backdropFilter: \"blur(8px)\",\n WebkitBackdropFilter: \"blur(8px)\",\n border: \"1px solid rgba(0, 0, 0, 0.06)\",\n textDecoration: \"none\",\n transition: \"opacity 0.2s, color 0.2s\",\n opacity: 0.82,\n});\n\nconst darkQuery = \"(prefers-color-scheme: dark)\";\n\n/**\n * Small branding badge: \"Built with [Agent Native logo]\"\n *\n * - Fixed position in the corner\n * - Subtle, semi-transparent\n * - Links to https://agent-native.com\n * - Respects prefers-color-scheme\n * - Can be hidden via HIDE_BRANDING=true env var (for white-label)\n */\nexport function PoweredByBadge({\n position = \"bottom-right\",\n variant = \"badge\",\n embedded = false,\n}: PoweredByBadgeProps) {\n // Allow hiding via env var\n const hidden =\n (import.meta.env as Record<string, string | undefined>)\n ?.VITE_HIDE_BRANDING === \"true\";\n\n if (hidden) return null;\n\n const logoOnLight = appPath(\"/agent-native-logo-light.svg\");\n const logoOnDark = appPath(\"/agent-native-logo-dark.svg\");\n const isPlain = variant === \"plain\";\n\n return (\n <>\n <style>{`\n .an-powered-logo {\n display: block;\n height: ${isPlain ? \"16.2px\" : \"14px\"};\n width: auto;\n flex: none;\n }\n .an-powered-logo-dark {\n display: none;\n }\n @media (max-width: 640px) {\n .an-powered-badge:not(.an-powered-badge-embedded) {\n position: static !important;\n margin: 0.75rem auto 0 !important;\n width: max-content;\n max-width: calc(100vw - 2rem);\n }\n }\n .an-powered-badge-plain {\n background: transparent !important;\n border-color: transparent !important;\n backdrop-filter: none !important;\n -webkit-backdrop-filter: none !important;\n padding: 0 !important;\n opacity: 1 !important;\n }\n .an-powered-badge-plain:hover {\n opacity: 0.82 !important;\n }\n .dark .an-powered-badge:not(.an-powered-badge-plain) {\n background: rgba(255, 255, 255, 0.06) !important;\n border-color: rgba(255, 255, 255, 0.08) !important;\n color: rgba(215, 215, 215, 0.94) !important;\n }\n .dark .an-powered-logo-light {\n display: none;\n }\n .dark .an-powered-logo-dark {\n display: block;\n }\n @media ${darkQuery} {\n .an-powered-badge:not(.an-powered-badge-plain) {\n background: rgba(255, 255, 255, 0.06) !important;\n border-color: rgba(255, 255, 255, 0.08) !important;\n color: rgba(215, 215, 215, 0.94) !important;\n }\n .an-powered-logo-light {\n display: none;\n }\n .an-powered-logo-dark {\n display: block;\n }\n }\n .light .an-powered-badge:not(.an-powered-badge-plain) {\n background: rgba(0, 0, 0, 0.05) !important;\n border-color: rgba(0, 0, 0, 0.06) !important;\n color: rgba(95, 95, 95, 0.95) !important;\n }\n .light .an-powered-logo-light {\n display: block;\n }\n .light .an-powered-logo-dark {\n display: none;\n }\n .an-powered-badge:not(.an-powered-badge-plain):hover {\n opacity: 1 !important;\n color: rgba(70, 70, 70, 1) !important;\n }\n @media ${darkQuery} {\n .an-powered-badge:not(.an-powered-badge-plain):hover {\n color: rgba(238, 238, 238, 1) !important;\n }\n }\n .dark .an-powered-badge:not(.an-powered-badge-plain):hover {\n color: rgba(238, 238, 238, 1) !important;\n }\n .light .an-powered-badge:not(.an-powered-badge-plain):hover {\n color: rgba(70, 70, 70, 1) !important;\n }\n `}</style>\n <a\n href=\"https://agent-native.com\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n \"an-powered-badge\",\n isPlain && \"an-powered-badge-plain\",\n embedded && \"an-powered-badge-embedded\",\n )}\n style={\n embedded\n ? {\n display: \"inline-flex\",\n alignItems: \"center\",\n textDecoration: \"none\",\n transition: \"opacity 0.2s\",\n }\n : containerStyle(position)\n }\n aria-label=\"Built with Agent Native\"\n >\n {!isPlain && <span>Built with</span>}\n <img\n src={logoOnLight}\n alt=\"Agent Native\"\n className=\"an-powered-logo an-powered-logo-light\"\n />\n <img\n src={logoOnDark}\n alt=\"Agent Native\"\n className=\"an-powered-logo an-powered-logo-dark\"\n />\n </a>\n </>\n );\n}\n\n/**\n * Small GitHub badge: \"Free and open source\"\n *\n * Intended to pair with PoweredByBadge on public pages.\n */\nexport function OpenSourceBadge({\n position = \"bottom-left\",\n embedded = false,\n}: OpenSourceBadgeProps) {\n const hidden =\n (import.meta.env as Record<string, string | undefined>)\n ?.VITE_HIDE_BRANDING === \"true\";\n\n if (hidden) return null;\n\n return (\n <>\n <style>{`\n .an-open-source-badge svg {\n width: 15px;\n height: 15px;\n flex: none;\n }\n .an-open-source-badge {\n background: transparent !important;\n border-color: transparent !important;\n backdrop-filter: none !important;\n -webkit-backdrop-filter: none !important;\n color: #00B5FF !important;\n font-weight: 600 !important;\n opacity: 0.95 !important;\n }\n @media (max-width: 640px) {\n .an-open-source-badge:not(.an-open-source-badge-embedded) {\n position: static !important;\n margin: 1rem auto 0 !important;\n width: max-content;\n max-width: calc(100vw - 2rem);\n }\n }\n .dark .an-open-source-badge {\n color: #00B5FF !important;\n }\n @media ${darkQuery} {\n .an-open-source-badge {\n color: #00B5FF !important;\n }\n }\n .light .an-open-source-badge {\n color: #00B5FF !important;\n }\n .an-open-source-badge:hover {\n opacity: 1 !important;\n color: #33C4FF !important;\n }\n @media ${darkQuery} {\n .an-open-source-badge:hover {\n color: #33C4FF !important;\n }\n }\n .dark .an-open-source-badge:hover {\n color: #33C4FF !important;\n }\n .light .an-open-source-badge:hover {\n color: #33C4FF !important;\n }\n `}</style>\n <a\n href=\"https://github.com/BuilderIO/agent-native\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n \"an-open-source-badge\",\n embedded && \"an-open-source-badge-embedded\",\n )}\n style={\n embedded\n ? {\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n fontSize: 12,\n fontFamily:\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n fontWeight: 600,\n lineHeight: 1,\n textDecoration: \"none\",\n transition: \"opacity 0.2s, color 0.2s\",\n }\n : containerStyle(position)\n }\n >\n <IconBrandGithub aria-hidden=\"true\" stroke={1.8} />\n <span>Free and open source</span>\n </a>\n </>\n );\n}\n"]}
@@ -2,10 +2,13 @@ export interface ActiveRunState {
2
2
  threadId: string;
3
3
  runId: string;
4
4
  lastSeq: number;
5
+ activityTool?: string | null;
5
6
  }
6
7
  export declare function setActiveRun(state: ActiveRunState): void;
7
8
  export declare function getActiveRun(): ActiveRunState | null;
8
9
  export declare function updateActiveRunSeq(seq: number): void;
10
+ export declare function updateActiveRunActivity(toolName: string | null | undefined): void;
11
+ export declare function getActiveRunActivityTool(threadId: string, runId: string): string | null;
9
12
  export declare function clearActiveRun(): void;
10
13
  /** Resume reconnect SSE after the last seen event (0 = replay from the start). */
11
14
  export declare function resolveReconnectAfterSeq(threadId: string, runId: string): number;
@@ -1 +1 @@
1
- {"version":3,"file":"active-run-state.d.ts","sourceRoot":"","sources":["../../src/client/active-run-state.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAIxD;AAED,wBAAgB,YAAY,IAAI,cAAc,GAAG,IAAI,CAQpD;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAMpD;AAED,wBAAgB,cAAc,IAAI,IAAI,CAIrC;AAED,kFAAkF;AAClF,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ,MAAM,CAUR"}
1
+ {"version":3,"file":"active-run-state.d.ts","sourceRoot":"","sources":["../../src/client/active-run-state.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAQD,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAIxD;AAED,wBAAgB,YAAY,IAAI,cAAc,GAAG,IAAI,CAQpD;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAMpD;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAClC,IAAI,CAUN;AAED,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,IAAI,CAIf;AAED,wBAAgB,cAAc,IAAI,IAAI,CAIrC;AAED,kFAAkF;AAClF,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ,MAAM,CAUR"}
@@ -1,4 +1,10 @@
1
1
  const STORAGE_KEY = "agent-chat-active-run";
2
+ function normalizeActivityTool(toolName) {
3
+ if (typeof toolName !== "string")
4
+ return null;
5
+ const tool = toolName.trim();
6
+ return tool || null;
7
+ }
2
8
  export function setActiveRun(state) {
3
9
  try {
4
10
  sessionStorage.setItem(STORAGE_KEY, JSON.stringify(state));
@@ -23,6 +29,24 @@ export function updateActiveRunSeq(seq) {
23
29
  setActiveRun(state);
24
30
  }
25
31
  }
32
+ export function updateActiveRunActivity(toolName) {
33
+ const state = getActiveRun();
34
+ if (!state)
35
+ return;
36
+ const activityTool = normalizeActivityTool(toolName);
37
+ if (activityTool) {
38
+ setActiveRun({ ...state, activityTool });
39
+ return;
40
+ }
41
+ const { activityTool: _activityTool, ...nextState } = state;
42
+ setActiveRun(nextState);
43
+ }
44
+ export function getActiveRunActivityTool(threadId, runId) {
45
+ const stored = getActiveRun();
46
+ if (stored?.threadId !== threadId || stored.runId !== runId)
47
+ return null;
48
+ return normalizeActivityTool(stored.activityTool);
49
+ }
26
50
  export function clearActiveRun() {
27
51
  try {
28
52
  sessionStorage.removeItem(STORAGE_KEY);
@@ -1 +1 @@
1
- {"version":3,"file":"active-run-state.js","sourceRoot":"","sources":["../../src/client/active-run-state.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAQ5C,MAAM,UAAU,YAAY,CAAC,KAAqB;IAChD,IAAI,CAAC;QACH,cAAc,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7D,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAChD,IAAI,CAAC,GAAG;YAAE,OAAO,IAAI,CAAC;QACtB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,MAAM,KAAK,GAAG,YAAY,EAAE,CAAC;IAC7B,IAAI,KAAK,EAAE,CAAC;QACV,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;QACpB,YAAY,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,IAAI,CAAC;QACH,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;AACZ,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,wBAAwB,CACtC,QAAgB,EAChB,KAAa;IAEb,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,IACE,MAAM,EAAE,QAAQ,KAAK,QAAQ;QAC7B,MAAM,EAAE,KAAK,KAAK,KAAK;QACvB,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,EAC/B,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC","sourcesContent":["const STORAGE_KEY = \"agent-chat-active-run\";\n\nexport interface ActiveRunState {\n threadId: string;\n runId: string;\n lastSeq: number;\n}\n\nexport function setActiveRun(state: ActiveRunState): void {\n try {\n sessionStorage.setItem(STORAGE_KEY, JSON.stringify(state));\n } catch {}\n}\n\nexport function getActiveRun(): ActiveRunState | null {\n try {\n const raw = sessionStorage.getItem(STORAGE_KEY);\n if (!raw) return null;\n return JSON.parse(raw);\n } catch {\n return null;\n }\n}\n\nexport function updateActiveRunSeq(seq: number): void {\n const state = getActiveRun();\n if (state) {\n state.lastSeq = seq;\n setActiveRun(state);\n }\n}\n\nexport function clearActiveRun(): void {\n try {\n sessionStorage.removeItem(STORAGE_KEY);\n } catch {}\n}\n\n/** Resume reconnect SSE after the last seen event (0 = replay from the start). */\nexport function resolveReconnectAfterSeq(\n threadId: string,\n runId: string,\n): number {\n const stored = getActiveRun();\n if (\n stored?.threadId === threadId &&\n stored?.runId === runId &&\n Number.isFinite(stored.lastSeq)\n ) {\n return stored.lastSeq + 1;\n }\n return 0;\n}\n"]}
1
+ {"version":3,"file":"active-run-state.js","sourceRoot":"","sources":["../../src/client/active-run-state.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAS5C,SAAS,qBAAqB,CAAC,QAAiB;IAC9C,IAAI,OAAO,QAAQ,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC9C,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC7B,OAAO,IAAI,IAAI,IAAI,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAqB;IAChD,IAAI,CAAC;QACH,cAAc,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7D,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAChD,IAAI,CAAC,GAAG;YAAE,OAAO,IAAI,CAAC;QACtB,OAAO,IAAI,CAAC,KAAK,CAAC,GAA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AE,CAAC;IAC9B,IACE,MAAM,EAAE,QAAQ,KAAK,QAAQ;QAC7B,MAAM,EAAE,KAAK,KAAK,KAAK;QACvB,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,EAC/B,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC","sourcesContent":["const STORAGE_KEY = \"agent-chat-active-run\";\n\nexport interface ActiveRunState {\n threadId: string;\n runId: string;\n lastSeq: number;\n activityTool?: string | null;\n}\n\nfunction normalizeActivityTool(toolName: unknown): string | null {\n if (typeof toolName !== \"string\") return null;\n const tool = toolName.trim();\n return tool || null;\n}\n\nexport function setActiveRun(state: ActiveRunState): void {\n try {\n sessionStorage.setItem(STORAGE_KEY, JSON.stringify(state));\n } catch {}\n}\n\nexport function getActiveRun(): ActiveRunState | null {\n try {\n const raw = sessionStorage.getItem(STORAGE_KEY);\n if (!raw) return null;\n return JSON.parse(raw);\n } catch {\n return null;\n }\n}\n\nexport function updateActiveRunSeq(seq: number): void {\n const state = getActiveRun();\n if (state) {\n state.lastSeq = seq;\n setActiveRun(state);\n }\n}\n\nexport function updateActiveRunActivity(\n toolName: string | null | undefined,\n): void {\n const state = getActiveRun();\n if (!state) return;\n const activityTool = normalizeActivityTool(toolName);\n if (activityTool) {\n setActiveRun({ ...state, activityTool });\n return;\n }\n const { activityTool: _activityTool, ...nextState } = state;\n setActiveRun(nextState);\n}\n\nexport function getActiveRunActivityTool(\n threadId: string,\n runId: string,\n): string | null {\n const stored = getActiveRun();\n if (stored?.threadId !== threadId || stored.runId !== runId) return null;\n return normalizeActivityTool(stored.activityTool);\n}\n\nexport function clearActiveRun(): void {\n try {\n sessionStorage.removeItem(STORAGE_KEY);\n } catch {}\n}\n\n/** Resume reconnect SSE after the last seen event (0 = replay from the start). */\nexport function resolveReconnectAfterSeq(\n threadId: string,\n runId: string,\n): number {\n const stored = getActiveRun();\n if (\n stored?.threadId === threadId &&\n stored?.runId === runId &&\n Number.isFinite(stored.lastSeq)\n ) {\n return stored.lastSeq + 1;\n }\n return 0;\n}\n"]}
@@ -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;AAksChB;;;;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,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAC5C,SAAS,CAAC,EAAE;QAAE,OAAO,EAAE,eAAe,GAAG,SAAS,CAAA;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,CA6/ClB"}
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;AAssChB;;;;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,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAC5C,SAAS,CAAC,EAAE;QAAE,OAAO,EAAE,eAAe,GAAG,SAAS,CAAA;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,CA6/ClB"}
@@ -731,6 +731,8 @@ function incrementalActionGuidance(tool) {
731
731
  case "generate-design":
732
732
  case "update-design":
733
733
  return 'if an existing design file or snapshot is already in history, especially after a Design variant pick, stop retrying `generate-design`: call `get-design-snapshot` for the selected file, then call `edit-design` once on that same `fileId` (`mode: "replace-file"` for a compact full-file replacement, or search/replace for smaller edits). Use `generate-design` only for a brand-new compact first file when no target file exists yet';
734
+ case "edit-design":
735
+ return "retry with a smaller `edit-design` payload: prefer a handful of exact search/replace edits against the already-snapshotted file, and avoid `replacementContent` for a huge full-file rewrite. If a selected variant needs expansion, upgrade the highest-value visible sections first, save once, and summarize any remaining refinements";
734
736
  case "present-design-variants":
735
737
  return 'call `present-design-variants` with concise labels, descriptions, accent colors, and feature bullets; omit large `content` HTML when needed so the action can render compact representative screens. After the user picks a direction, delete unchosen screens, snapshot the selected `fileId`, and refine that same file with `edit-design` (`mode: "replace-file"` for placeholder expansion). Do not call `generate-design` after the variant pick';
736
738
  case "create-visual-plan":
@@ -764,7 +766,9 @@ function autoContinueMessage(signal) {
764
766
  // is the classic trigger for the repetition/cutoff loop. Nudge the model
765
767
  // toward a compact first version it can actually finish in a single run, then
766
768
  // incremental refinements — never re-streaming the same oversized payload.
767
- const cutoffPreparingAction = signal.reason === "run_timeout" || signal.reason === "stream_ended";
769
+ const cutoffPreparingAction = signal.reason === "run_timeout" ||
770
+ signal.reason === "stream_ended" ||
771
+ signal.reason === "no_progress";
768
772
  let actionInputNote = "";
769
773
  if (cutoffPreparingAction && tool) {
770
774
  const guidance = incrementalActionGuidance(tool);