@agent-native/core 0.157.8 → 0.157.10

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 (154) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/actions/purge-first-party-analytics-postgres.ts +26 -8
  3. package/corpus/templates/analytics/scripts/first-party-analytics-postgres-retention-dry-run.sql +261 -0
  4. package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +3 -1
  5. package/corpus/templates/analytics/server/lib/first-party-analytics-purge.ts +75 -31
  6. package/corpus/templates/analytics/server/lib/workspace-feature-flags.ts +4 -1
  7. package/corpus/templates/analytics/server/plugins/db.ts +139 -0
  8. package/corpus/templates/slides/AGENTS.md +14 -10
  9. package/corpus/templates/slides/actions/export-pptx.ts +1311 -121
  10. package/corpus/templates/slides/actions/import-file.ts +28 -1
  11. package/corpus/templates/slides/actions/import-pptx.ts +69 -42
  12. package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +222 -29
  13. package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +71 -0
  14. package/corpus/templates/slides/app/global.css +19 -1
  15. package/corpus/templates/slides/app/lib/export-google-slides-client.ts +44 -5
  16. package/corpus/templates/slides/app/lib/export-pdf-client.ts +13 -6
  17. package/corpus/templates/slides/app/lib/export-pptx-client.ts +601 -30
  18. package/corpus/templates/slides/app/pages/DeckEditor.tsx +18 -1
  19. package/corpus/templates/slides/server/handlers/import/html-converter.ts +1240 -22
  20. package/corpus/templates/slides/server/handlers/import/pdf-fidelity-parser.ts +329 -64
  21. package/corpus/templates/slides/server/handlers/import/pptx-assets.ts +24 -0
  22. package/corpus/templates/slides/server/lib/source-import.ts +10 -1
  23. package/corpus/templates/slides/shared/aspect-ratios.ts +13 -1
  24. package/dist/agent/harness/migrations.d.ts +4 -0
  25. package/dist/agent/harness/migrations.js +60 -0
  26. package/dist/agent/production-agent.d.ts +2 -0
  27. package/dist/agent/production-agent.js +15 -0
  28. package/dist/agent/run-loop-with-resume.d.ts +1 -0
  29. package/dist/agent/run-loop-with-resume.js +44 -12
  30. package/dist/agent/run-migrations.d.ts +8 -0
  31. package/dist/agent/run-migrations.js +61 -0
  32. package/dist/automations/service.d.ts +6 -0
  33. package/dist/automations/service.js +35 -0
  34. package/dist/chat-threads/migrations.d.ts +1 -0
  35. package/dist/chat-threads/migrations.js +1 -0
  36. package/dist/chat-threads/schema-migrations.d.ts +8 -0
  37. package/dist/chat-threads/schema-migrations.js +60 -0
  38. package/dist/cli/code-agent-connector.d.ts +4 -1
  39. package/dist/cli/code-agent-connector.js +154 -23
  40. package/dist/cli/code-agent-executor.js +255 -13
  41. package/dist/cli/code-agent-runs.d.ts +1 -0
  42. package/dist/cli/code-agent-runs.js +2 -1
  43. package/dist/cli/portal-workspace.d.ts +49 -0
  44. package/dist/cli/portal-workspace.js +320 -0
  45. package/dist/client/AssistantChat.d.ts +1 -1
  46. package/dist/client/AssistantChat.js +43 -61
  47. package/dist/client/ConnectBuilderCard.js +33 -5
  48. package/dist/client/agent-chat-adapter.js +4 -0
  49. package/dist/client/analytics-platform.d.ts +2 -0
  50. package/dist/client/analytics-platform.js +12 -0
  51. package/dist/client/analytics.d.ts +3 -0
  52. package/dist/client/analytics.js +10 -1
  53. package/dist/client/chat/index.d.ts +1 -0
  54. package/dist/client/chat/index.js +1 -0
  55. package/dist/client/chat/message-components.d.ts +2 -0
  56. package/dist/client/chat/message-components.js +11 -1
  57. package/dist/client/chat/run-recovery.d.ts +2 -1
  58. package/dist/client/chat/run-recovery.js +2 -2
  59. package/dist/client/chat-first/apps-rail.d.ts +1 -1
  60. package/dist/client/chat-first/apps-rail.js +11 -11
  61. package/dist/client/chat-first/surface-tabs.d.ts +1 -1
  62. package/dist/client/chat-first/surface-tabs.js +38 -36
  63. package/dist/client/chat-first/types.d.ts +5 -0
  64. package/dist/client/chat-first.d.ts +1 -1
  65. package/dist/client/chat-first.js +4 -4
  66. package/dist/client/desktop-local-code-change.d.ts +10 -0
  67. package/dist/client/desktop-local-code-change.js +16 -0
  68. package/dist/client/index.d.ts +1 -0
  69. package/dist/client/index.js +1 -0
  70. package/dist/client/observability/ThumbsFeedback.js +53 -26
  71. package/dist/client/observability/useObservability.d.ts +1 -1
  72. package/dist/client/observability/useObservability.js +6 -3
  73. package/dist/client/terminal/AgentTerminal.d.ts +9 -1
  74. package/dist/client/terminal/AgentTerminal.js +38 -3
  75. package/dist/client/terminal/index.d.ts +1 -1
  76. package/dist/client/terminal/index.js +1 -1
  77. package/dist/client/track.js +9 -1
  78. package/dist/client/use-action.js +3 -0
  79. package/dist/collab/awareness.d.ts +2 -2
  80. package/dist/deploy/build.js +1 -1
  81. package/dist/feature-flags/a2a-action-route.js +4 -2
  82. package/dist/feature-flags/permissions.d.ts +2 -0
  83. package/dist/feature-flags/permissions.js +6 -1
  84. package/dist/ingestion/pptx.d.ts +92 -1
  85. package/dist/ingestion/pptx.js +1180 -115
  86. package/dist/integrations/index.d.ts +3 -3
  87. package/dist/integrations/index.js +2 -2
  88. package/dist/integrations/plugin.js +95 -6
  89. package/dist/integrations/remote-commands-store.d.ts +5 -0
  90. package/dist/integrations/remote-commands-store.js +63 -22
  91. package/dist/integrations/remote-devices-store.d.ts +2 -1
  92. package/dist/integrations/remote-devices-store.js +46 -0
  93. package/dist/integrations/remote-types.d.ts +20 -0
  94. package/dist/jobs/actions/list-recurring-jobs.d.ts +3 -0
  95. package/dist/jobs/actions/list-recurring-jobs.js +5 -1
  96. package/dist/jobs/frontmatter.d.ts +16 -0
  97. package/dist/jobs/frontmatter.js +53 -0
  98. package/dist/jobs/remote-execution.d.ts +42 -0
  99. package/dist/jobs/remote-execution.js +287 -0
  100. package/dist/jobs/scheduler.js +102 -3
  101. package/dist/jobs/tools.js +50 -3
  102. package/dist/localization/core-messages/ar-SA.js +4 -0
  103. package/dist/localization/core-messages/de-DE.js +4 -0
  104. package/dist/localization/core-messages/en-US.d.ts +4 -0
  105. package/dist/localization/core-messages/en-US.js +4 -0
  106. package/dist/localization/core-messages/es-ES.js +4 -0
  107. package/dist/localization/core-messages/fr-FR.js +4 -0
  108. package/dist/localization/core-messages/hi-IN.js +4 -0
  109. package/dist/localization/core-messages/ja-JP.js +4 -0
  110. package/dist/localization/core-messages/ko-KR.js +4 -0
  111. package/dist/localization/core-messages/pt-BR.js +4 -0
  112. package/dist/localization/core-messages/zh-CN.js +4 -0
  113. package/dist/localization/core-messages/zh-TW.js +4 -0
  114. package/dist/localization/core-messages.d.ts +4 -0
  115. package/dist/notifications/routes.d.ts +3 -3
  116. package/dist/observability/feedback.js +40 -16
  117. package/dist/observability/routes.d.ts +6 -6
  118. package/dist/observability/routes.js +15 -3
  119. package/dist/observability/store.js +2 -0
  120. package/dist/observability/traces.js +5 -1
  121. package/dist/provider-api/actions/custom-provider-registration.d.ts +16 -16
  122. package/dist/provider-api/actions/provider-api.d.ts +13 -13
  123. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  124. package/dist/resources/handlers.d.ts +1 -1
  125. package/dist/secrets/routes.d.ts +9 -9
  126. package/dist/server/action-routes.d.ts +7 -5
  127. package/dist/server/action-routes.js +13 -6
  128. package/dist/server/agent-chat-plugin.js +6 -0
  129. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  130. package/dist/server/agent-run-context.d.ts +1 -0
  131. package/dist/server/agent-run-context.js +9 -0
  132. package/dist/server/better-auth-instance.js +4 -0
  133. package/dist/server/core-routes-plugin.js +8 -1
  134. package/dist/server/realtime-voice.js +2 -1
  135. package/dist/server/release-migrations.js +16 -0
  136. package/dist/server/request-context.d.ts +2 -0
  137. package/dist/server/transcribe-voice.d.ts +1 -1
  138. package/dist/shared/analytics-platform.d.ts +6 -0
  139. package/dist/shared/analytics-platform.js +14 -0
  140. package/dist/shared/mcp-embed-headers.d.ts +1 -1
  141. package/dist/shared/mcp-embed-headers.js +1 -1
  142. package/dist/styles/agent-native.css +83 -103
  143. package/dist/terminal/cli-registry.js +5 -0
  144. package/dist/tracking/registry.js +9 -1
  145. package/dist/triggers/actions/list-automations.d.ts +3 -0
  146. package/dist/triggers/actions/list-automations.js +3 -0
  147. package/dist/triggers/actions/manage-automation.d.ts +9 -0
  148. package/dist/triggers/actions/manage-automation.js +14 -2
  149. package/dist/triggers/actions.js +82 -7
  150. package/dist/usage/migrations.d.ts +4 -0
  151. package/dist/usage/migrations.js +45 -0
  152. package/docs/content/template-content-developers.mdx +48 -0
  153. package/docs/content/toolkit-ui.mdx +57 -0
  154. package/package.json +3 -3
@@ -537,9 +537,21 @@ button[title="Open agent sidebar"] {
537
537
  }
538
538
 
539
539
  .fmd-autofit-scale {
540
+ transform-origin: top left;
541
+ }
542
+
543
+ /* Only apply the fit transform once autofit is actually shrinking content
544
+ (see SlideRenderer's `data-fmd-autofit-active`). Any non-"none" `transform`
545
+ value — even the identity transform this rule used to apply unconditionally
546
+ — creates a new containing block for `position: absolute` descendants
547
+ (CSS Transforms spec). Freeform slide objects are authored against the
548
+ full `.fmd-slide` box; an always-on transform here silently re-anchored
549
+ them to this layer's smaller, padding-inset box instead, shifting them
550
+ off-canvas. Scoping the transform to the active-fit state keeps the
551
+ common (no scaling needed) case free of a containing block at all. */
552
+ .fmd-autofit-scale[data-fmd-autofit-active] {
540
553
  transform: translate(var(--fmd-fit-x, 0px), var(--fmd-fit-y, 0px))
541
554
  scale(var(--fmd-fit-scale, 1));
542
- transform-origin: top left;
543
555
  }
544
556
 
545
557
  .fmd-slide > [data-fmd-autofit-content] {
@@ -1084,8 +1096,14 @@ button[title="Open agent sidebar"] {
1084
1096
  font-style: normal;
1085
1097
  }
1086
1098
 
1099
+ /* An imported PPTX `a:srcRect` crop is rendered by oversizing the `<img>` past
1100
+ its `overflow: hidden` box (e.g. `width: 255%; left: -77%`), so both caps
1101
+ have to be lifted, not just the vertical one — `max-width: 100%` alone
1102
+ silently shrank the image back to its box while the negative `left` kept
1103
+ scrolling, leaving the visible crop window off the picture entirely. */
1087
1104
  .slide-content .fmd-slide img {
1088
1105
  border-radius: 0;
1106
+ max-width: none;
1089
1107
  max-height: none;
1090
1108
  margin: 0;
1091
1109
  }
@@ -15,6 +15,40 @@ export type GoogleSlidesExportResult =
15
15
  /** The export action should send the user through Google OAuth first. */
16
16
  | { url: null; requiresConnection: true; reason: string };
17
17
 
18
+ export interface DeckPptxFile {
19
+ blob: Blob;
20
+ filename: string;
21
+ }
22
+
23
+ /**
24
+ * Renders the deck through the vector-capable server exporter — the only path
25
+ * that emits the source file's shapes as real `custGeom` geometry. Its
26
+ * positioned-object guard is rethrown verbatim so the caller can show it
27
+ * instead of quietly handing Google the rasterized browser export.
28
+ */
29
+ export async function fetchDeckPptxFromServer(
30
+ deckId: string,
31
+ fallbackError: string,
32
+ ): Promise<DeckPptxFile> {
33
+ const res = await fetch(`${appBasePath()}/api/exports/pptx`, {
34
+ method: "POST",
35
+ headers: { "Content-Type": "application/json" },
36
+ body: JSON.stringify({ deckId }),
37
+ });
38
+ if (!res.ok) {
39
+ const payload = (await res.json().catch(() => null)) as {
40
+ error?: string;
41
+ message?: string;
42
+ } | null;
43
+ throw new Error(payload?.error || payload?.message || fallbackError);
44
+ }
45
+ const disposition = res.headers.get("content-disposition");
46
+ return {
47
+ blob: await res.blob(),
48
+ filename: disposition?.match(/filename="?([^"]+)"?/i)?.[1] ?? "deck.pptx",
49
+ };
50
+ }
51
+
18
52
  function triggerBlobDownload(blob: Blob, filename: string) {
19
53
  const url = URL.createObjectURL(blob);
20
54
  const a = document.createElement("a");
@@ -37,12 +71,17 @@ export async function exportDeckToGoogleSlides(
37
71
  deckTitle: string,
38
72
  slides: GoogleSlidesExportSlide[],
39
73
  aspectRatio?: AspectRatio,
74
+ /**
75
+ * Overrides the browser exporter. Source-imported decks pass
76
+ * `fetchDeckPptxFromServer`: dom-to-pptx ships no custGeom support, so the
77
+ * browser build would upload PNG rasterizations of the very shapes Google
78
+ * Slides can otherwise keep editable.
79
+ */
80
+ buildPptx?: () => Promise<DeckPptxFile>,
40
81
  ): Promise<GoogleSlidesExportResult> {
41
- const { blob, filename } = await buildDeckPptxBlob(
42
- deckTitle,
43
- slides,
44
- aspectRatio,
45
- );
82
+ const { blob, filename } = await (buildPptx
83
+ ? buildPptx()
84
+ : buildDeckPptxBlob(deckTitle, slides, aspectRatio));
46
85
 
47
86
  const form = new FormData();
48
87
  form.append("file", blob, filename);
@@ -123,12 +123,19 @@ export function findSlideExportSource(
123
123
  }
124
124
 
125
125
  // A given slide can appear multiple times (sidebar thumbnail + active
126
- // editor canvas); pick the one with the largest natural width so we
127
- // capture full-resolution pixels even when the visible copy is scaled
128
- // down via CSS transform.
129
- return candidates.reduce((best, el) =>
130
- el.offsetWidth > best.offsetWidth ? el : best,
131
- );
126
+ // editor canvas). Rank on the *rendered* width, not `offsetWidth`:
127
+ // `offsetWidth` ignores CSS transforms, so a sidebar thumbnail shrunk by
128
+ // `scale()` reports the same 960 as the canvas it mirrors. That tie left
129
+ // the strict `>` below returning `candidates[0]` — document order, i.e.
130
+ // the thumbnail — so exports captured the low-fidelity copy.
131
+ // `getBoundingClientRect().width` sees through the transform and picks the
132
+ // real canvas; `offsetWidth` only breaks a genuine rendered-width tie.
133
+ return candidates.reduce((best, el) => {
134
+ const elWidth = el.getBoundingClientRect().width;
135
+ const bestWidth = best.getBoundingClientRect().width;
136
+ if (elWidth !== bestWidth) return elWidth > bestWidth ? el : best;
137
+ return el.offsetWidth > best.offsetWidth ? el : best;
138
+ });
132
139
  }
133
140
 
134
141
  export async function exportDeckAsPdf(