@agent-native/core 0.128.1 → 0.128.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 (84) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +12 -0
  3. package/corpus/core/package.json +2 -1
  4. package/corpus/core/src/server/email-template.ts +33 -0
  5. package/corpus/templates/chat/_gitignore +2 -0
  6. package/corpus/templates/clips/AGENTS.md +6 -1
  7. package/corpus/templates/clips/actions/complete-transactional-email-summary.ts +56 -0
  8. package/corpus/templates/clips/actions/import-loom-recording.ts +258 -76
  9. package/corpus/templates/clips/actions/lib/direct-video.ts +96 -0
  10. package/corpus/templates/clips/actions/lib/loom-import-job.ts +53 -2
  11. package/corpus/templates/clips/actions/lib/loom-video.ts +2 -62
  12. package/corpus/templates/clips/actions/lib/video-download-limits.ts +62 -0
  13. package/corpus/templates/clips/actions/list-transactional-email-ai-requests.ts +249 -0
  14. package/corpus/templates/clips/app/components/library/library-grid.tsx +65 -0
  15. package/corpus/templates/clips/app/components/library/library-layout.tsx +55 -0
  16. package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +28 -126
  17. package/corpus/templates/clips/app/global.css +23 -0
  18. package/corpus/templates/clips/app/hooks/use-transactional-email-bridge.ts +98 -0
  19. package/corpus/templates/clips/app/i18n/en-US.ts +20 -0
  20. package/corpus/templates/clips/app/routes/_app.tsx +2 -0
  21. package/corpus/templates/clips/app/routes/import.tsx +396 -0
  22. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +8 -6
  23. package/corpus/templates/clips/app/routes/record.tsx +13 -71
  24. package/corpus/templates/clips/changelog/2026-07-25-two-clip-emails-now-include-a-concise-summary-generated-secu.md +6 -0
  25. package/corpus/templates/clips/data/clips-transactional-emails/config.json +3 -0
  26. package/corpus/templates/clips/server/jobs/transactional-emails.ts +1034 -0
  27. package/corpus/templates/clips/server/lib/transactional-email-store.ts +865 -0
  28. package/corpus/templates/clips/server/lib/transactional-email-templates.ts +270 -0
  29. package/corpus/templates/clips/server/plugins/calendar-jobs.ts +2 -0
  30. package/corpus/templates/clips/server/routes/api/view-event.post.ts +59 -2
  31. package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +8 -2
  32. package/corpus/templates/content/AGENTS.md +8 -0
  33. package/corpus/templates/content/actions/_content-database-personal-view.ts +28 -3
  34. package/corpus/templates/content/actions/_property-utils.ts +32 -2
  35. package/corpus/templates/content/actions/configure-document-property.ts +12 -2
  36. package/corpus/templates/content/actions/delete-document-property.ts +13 -3
  37. package/corpus/templates/content/actions/duplicate-document-property.ts +13 -3
  38. package/corpus/templates/content/actions/list-content-spaces.ts +5 -2
  39. package/corpus/templates/content/actions/list-document-properties.ts +12 -3
  40. package/corpus/templates/content/actions/move-database-item.ts +74 -55
  41. package/corpus/templates/content/actions/reorder-document-property.ts +20 -4
  42. package/corpus/templates/content/actions/set-document-property.ts +10 -1
  43. package/corpus/templates/content/actions/update-content-database-personal-view.ts +7 -0
  44. package/corpus/templates/content/app/components/editor/DocumentBlockFields.tsx +31 -21
  45. package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +30 -3
  46. package/corpus/templates/content/app/components/editor/DocumentInfoPanel.tsx +8 -1
  47. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +72 -20
  48. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +79 -10
  49. package/corpus/templates/content/app/components/editor/database/TimelineView.tsx +8 -1
  50. package/corpus/templates/content/app/components/editor/database/settings.tsx +6 -0
  51. package/corpus/templates/content/app/components/editor/database/sidebar.tsx +246 -26
  52. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +491 -197
  53. package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +3 -3
  54. package/corpus/templates/content/app/components/sidebar/sidebar-reorder.tsx +409 -0
  55. package/corpus/templates/content/app/hooks/use-content-database.ts +117 -3
  56. package/corpus/templates/content/app/hooks/use-content-spaces.ts +1 -0
  57. package/corpus/templates/content/app/hooks/use-document-properties.ts +62 -18
  58. package/corpus/templates/content/app/hooks/use-documents.ts +13 -5
  59. package/corpus/templates/content/app/i18n-data.ts +261 -3
  60. package/corpus/templates/content/app/routes/_app.page.$id.tsx +9 -2
  61. package/corpus/templates/content/changelog/2026-07-24-database-page-properties-keep-their-context.md +6 -0
  62. package/corpus/templates/content/changelog/2026-07-26-sidebar-references-can-now-be-personally-reordered.md +6 -0
  63. package/corpus/templates/content/docs/solutions/2026-07-24-database-property-context-switch-diagnosis.md +249 -0
  64. package/corpus/templates/content/docs/solutions/content-sidebar-order-shape.md +389 -0
  65. package/corpus/templates/content/shared/api.ts +28 -0
  66. package/corpus/toolkit/CHANGELOG.md +6 -0
  67. package/corpus/toolkit/package.json +1 -1
  68. package/corpus/toolkit/src/editor/DragHandle.ts +63 -9
  69. package/dist/collab/struct-routes.d.ts +1 -1
  70. package/dist/server/email-template.d.ts +7 -0
  71. package/dist/server/email-template.d.ts.map +1 -1
  72. package/dist/server/email-template.js +24 -0
  73. package/dist/server/email-template.js.map +1 -1
  74. package/dist/server/realtime-token.d.ts +1 -1
  75. package/dist/templates/chat/_gitignore +2 -0
  76. package/package.json +3 -2
  77. package/src/server/email-template.ts +33 -0
  78. package/src/templates/chat/_gitignore +2 -0
  79. package/corpus/core/src/cli/sync-builder-starter-manifest.ts +0 -631
  80. package/dist/cli/sync-builder-starter-manifest.d.ts +0 -79
  81. package/dist/cli/sync-builder-starter-manifest.d.ts.map +0 -1
  82. package/dist/cli/sync-builder-starter-manifest.js +0 -426
  83. package/dist/cli/sync-builder-starter-manifest.js.map +0 -1
  84. package/src/cli/sync-builder-starter-manifest.ts +0 -631
package/corpus/README.md CHANGED
@@ -28,6 +28,6 @@ rg -n "defineAction|useActionQuery" node_modules/@agent-native/core/corpus
28
28
 
29
29
  ## Generated Counts
30
30
 
31
- - core files: 1625
31
+ - core files: 1624
32
32
  - toolkit files: 160
33
- - template files: 6837
33
+ - template files: 6853
@@ -1,5 +1,17 @@
1
1
  # @agent-native/core
2
2
 
3
+ ## 0.128.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 4a59320: Switch the builder-agent-native-starter sync to the vendor-branch model: a new `push-starter-template` workflow materializes the post-processed `templates/chat` and pushes it to the starter's `template` branch (which the starter git-merges into `main`). Removes the obsolete dispatch workflow and the `sync-builder-starter-manifest` CLI (the `merge`/`generate`/`paths` allowlist sync), superseded by `agent-native template materialize` + git-native merge.
8
+
9
+ ## 0.128.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 363d36f: Add organization logo support to the shared email template, safe sender display-name overrides, and a server-side user profile export for transactional emails.
14
+
3
15
  ## 0.128.1
4
16
 
5
17
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.128.1",
3
+ "version": "0.128.3",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -164,6 +164,7 @@
164
164
  "./application-state": "./dist/application-state/index.js",
165
165
  "./settings": "./dist/settings/index.js",
166
166
  "./user-profile": "./dist/user-profile/index.js",
167
+ "./user-profile/server": "./dist/user-profile/store.js",
167
168
  "./feature-flags": "./dist/feature-flags/index.js",
168
169
  "./feature-flags/registry": "./dist/feature-flags/registry.js",
169
170
  "./feature-flags/actions/get-feature-flags": "./dist/feature-flags/actions/get-feature-flags.js",
@@ -27,6 +27,12 @@ export interface EmailCta {
27
27
  url: string;
28
28
  }
29
29
 
30
+ export interface EmailLinkBlock {
31
+ intro: string;
32
+ url: string;
33
+ placement?: "before-cta" | "after-cta";
34
+ }
35
+
30
36
  export interface RenderEmailArgs {
31
37
  /** Short preview text shown by email clients next to the subject. */
32
38
  preheader?: string;
@@ -36,6 +42,8 @@ export interface RenderEmailArgs {
36
42
  paragraphs: string[];
37
43
  /** Primary call-to-action rendered as a real button. */
38
44
  cta?: EmailCta;
45
+ /** A treated, copyable URL shown before or after the CTA. */
46
+ linkBlock?: EmailLinkBlock;
39
47
  /**
40
48
  * Optional trusted HTML injected above the CTA — e.g. a template-owned video
41
49
  * thumbnail with a play badge. Injected verbatim, so only pass markup built
@@ -127,6 +135,19 @@ export function renderEmail(args: RenderEmailArgs): RenderedEmail {
127
135
  )
128
136
  .join("");
129
137
 
138
+ const linkBlockHtml = args.linkBlock
139
+ ? `
140
+ <p style="margin:24px 0 12px 0; font-size:15px; line-height:1.6; color:#d4d4d8;">${escapeHtml(args.linkBlock.intro)}</p>
141
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="margin:0; border:1px solid #3f3f46; border-radius:10px; background:#0a0a0c;">
142
+ <tr>
143
+ <td style="padding:14px 16px;">
144
+ <a href="${escapeAttr(args.linkBlock.url)}" style="display:block; color:#d4d4d8; font-family:'SFMono-Regular', Consolas, 'Liberation Mono', monospace; font-size:13px; line-height:1.5; text-decoration:none; word-break:break-all; overflow-wrap:anywhere;">${escapeHtml(args.linkBlock.url)}</a>
145
+ </td>
146
+ </tr>
147
+ </table>
148
+ `
149
+ : "";
150
+
130
151
  const ctaHtml = args.cta
131
152
  ? `
132
153
  <table role="presentation" cellpadding="0" cellspacing="0" border="0" style="margin:24px 0 0 0;">
@@ -187,7 +208,9 @@ export function renderEmail(args: RenderEmailArgs): RenderedEmail {
187
208
  </h1>
188
209
  ${paragraphsHtml}
189
210
  ${heroHtml}
211
+ ${args.linkBlock?.placement !== "after-cta" ? linkBlockHtml : ""}
190
212
  ${ctaHtml}
213
+ ${args.linkBlock?.placement === "after-cta" ? linkBlockHtml : ""}
191
214
  ${footerHtml}
192
215
  </td>
193
216
  </tr>
@@ -205,10 +228,20 @@ export function renderEmail(args: RenderEmailArgs): RenderedEmail {
205
228
  textLines.push(stripTags(p));
206
229
  textLines.push("");
207
230
  }
231
+ if (args.linkBlock && args.linkBlock.placement !== "after-cta") {
232
+ textLines.push(args.linkBlock.intro);
233
+ textLines.push(args.linkBlock.url);
234
+ textLines.push("");
235
+ }
208
236
  if (args.cta) {
209
237
  textLines.push(`${args.cta.label}: ${args.cta.url}`);
210
238
  textLines.push("");
211
239
  }
240
+ if (args.linkBlock?.placement === "after-cta") {
241
+ textLines.push(args.linkBlock.intro);
242
+ textLines.push(args.linkBlock.url);
243
+ textLines.push("");
244
+ }
212
245
  if (args.footer) {
213
246
  textLines.push(args.footer);
214
247
  }
@@ -13,6 +13,8 @@ build/
13
13
  dist
14
14
  dist-ssr
15
15
  .output/
16
+ .netlify/
17
+ .deploy-tmp/
16
18
  *.local
17
19
 
18
20
  # Editor directories and files
@@ -44,6 +44,11 @@ Read the matching skill before deeper work in that area:
44
44
  activation. Navigate the user to the recording view instead of a server action.
45
45
  - Native transcript first; cloud transcription is fallback-only. Never hide a
46
46
  usable native transcript behind failed metadata work.
47
+ - Use `import-loom-recording` for Loom or direct MP4/WebM URLs. Loom media and
48
+ public transcripts import in the background; direct videos need
49
+ `request-transcript` afterward.
50
+ - Internal transactional-email actions claim bounded two-Clip summary work and
51
+ complete it with one plain-text sentence after reviewing both context packets.
47
52
  - The `view-screen` transcript is a bounded preview: when `previewTruncated` is
48
53
  true it may end mid-sentence and says nothing about where transcription
49
54
  ended. Call `get-recording-player-data` before judging completeness or
@@ -82,7 +87,7 @@ Read the matching skill before deeper work in that area:
82
87
  | `list-recordings`, `search-recordings` | Library, trash, `--view=shared` |
83
88
  | `get-recording-player-data` | Full transcript, chapters, diagnostics |
84
89
  | `create-recording`, `finalize-recording` | Create row; finish upload |
85
- | `import-loom-recording` | Import a Loom share/embed URL |
90
+ | `import-loom-recording` | Import Loom or direct MP4/WebM URL |
86
91
  | `update-recording` | Title, password, expiry, visibility |
87
92
  | `move-recording` | Move `id` or `ids` to a folder or root |
88
93
  | `archive-`, `trash-`, `restore-recording` | Lifecycle |
@@ -0,0 +1,56 @@
1
+ import { defineAction } from "@agent-native/core/action";
2
+ import { z } from "zod";
3
+
4
+ import { getCurrentOwnerEmail } from "../server/lib/recordings.js";
5
+ import { transactionalEmailStore } from "../server/lib/transactional-email-store.js";
6
+
7
+ export const MAX_TRANSACTIONAL_EMAIL_SUMMARY_LENGTH = 320;
8
+
9
+ export function normalizeTransactionalEmailSummary(value: string): string {
10
+ return value.replace(/\s+/g, " ").trim();
11
+ }
12
+
13
+ export function validateTransactionalEmailSummary(value: string): string {
14
+ const summary = normalizeTransactionalEmailSummary(value);
15
+ if (!summary) throw new Error("Summary must be one nonempty sentence.");
16
+ if (summary.length > MAX_TRANSACTIONAL_EMAIL_SUMMARY_LENGTH) {
17
+ throw new Error(
18
+ `Summary must be at most ${MAX_TRANSACTIONAL_EMAIL_SUMMARY_LENGTH} characters.`,
19
+ );
20
+ }
21
+ if (/[<>]/.test(summary)) {
22
+ throw new Error("Summary must be plain text without HTML.");
23
+ }
24
+ const sentenceEndings = summary.match(/[.!?](?=\s|$)/g) ?? [];
25
+ if (sentenceEndings.length !== 1 || !/[.!?]$/.test(summary)) {
26
+ throw new Error("Summary must be exactly one sentence.");
27
+ }
28
+ return summary;
29
+ }
30
+
31
+ export default defineAction({
32
+ description:
33
+ "Complete only the claimed two-Clip transactional email summary workflow.",
34
+ schema: z.object({
35
+ jobId: z.string().trim().min(1),
36
+ summary: z.string().max(2_000),
37
+ }),
38
+ run: async ({ jobId, summary }) => {
39
+ const claimantEmail = getCurrentOwnerEmail().trim().toLowerCase();
40
+ const normalizedSummary = validateTransactionalEmailSummary(summary);
41
+ const completed = await transactionalEmailStore.completeClaimedAi(
42
+ jobId,
43
+ claimantEmail,
44
+ normalizedSummary,
45
+ );
46
+ if (!completed) {
47
+ throw new Error("This transactional email AI claim is unavailable.");
48
+ }
49
+ return {
50
+ jobId: completed.logicalKey,
51
+ logicalKey: completed.logicalKey,
52
+ state: completed.state,
53
+ generatedSummary: completed.generatedSummary,
54
+ };
55
+ },
56
+ });