@agent-native/core 0.160.1 → 0.161.1

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 (101) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/actions/bigquery.ts +57 -0
  3. package/corpus/templates/analytics/actions/restore-analysis-revision.ts +5 -2
  4. package/corpus/templates/analytics/actions/restore-dashboard-revision.ts +5 -2
  5. package/corpus/templates/analytics/app/components/analysis/AnalysisHistoryPanel.tsx +14 -3
  6. package/corpus/templates/analytics/app/components/dashboard/DashboardHistoryPanel.tsx +14 -3
  7. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +3 -0
  8. package/corpus/templates/analytics/app/hooks/use-analysis-revisions.ts +1 -0
  9. package/corpus/templates/analytics/app/hooks/use-dashboard-revisions.ts +16 -1
  10. package/corpus/templates/analytics/app/lib/use-auto-focus-select.ts +19 -0
  11. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +0 -1
  12. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/dashboard-sync.ts +14 -0
  13. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +19 -0
  14. package/corpus/templates/analytics/changelog/2026-08-17-fixed-dashboard-editing-focus-history-recovery-panel-setup-f.md +6 -0
  15. package/corpus/templates/calendar/actions/create-event.ts +7 -3
  16. package/corpus/templates/calendar/actions/manage-event-draft.ts +8 -0
  17. package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +64 -0
  18. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +5 -1
  19. package/corpus/templates/calendar/app/hooks/use-events.ts +1 -0
  20. package/corpus/templates/calendar/changelog/2026-08-17-booking-links-now-respect-each-required-host-s-saved-availab.md +6 -0
  21. package/corpus/templates/calendar/server/lib/booking-host-availability.ts +76 -0
  22. package/corpus/templates/calendar/server/lib/google-calendar.ts +2 -0
  23. package/corpus/templates/calendar/shared/api.ts +1 -1
  24. package/corpus/templates/clips/app/components/player/signed-out-share-actions.tsx +47 -0
  25. package/corpus/templates/clips/app/components/player/transcript-panel.tsx +3 -1
  26. package/corpus/templates/clips/app/routes/share.$shareId.tsx +27 -19
  27. package/corpus/templates/clips/changelog/2026-08-17-shared-clips-sign-in-comment-no-audio.md +6 -0
  28. package/corpus/templates/clips/server/routes/api/public-recording.get.ts +6 -5
  29. package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +13 -0
  30. package/corpus/templates/content/AGENTS.md +2 -0
  31. package/corpus/templates/content/actions/_blocks-field-identity.ts +17 -0
  32. package/corpus/templates/content/actions/_database-block-actions.ts +958 -0
  33. package/corpus/templates/content/actions/_database-row-mutation.ts +7 -7
  34. package/corpus/templates/content/actions/list-content-database-blocks.ts +31 -0
  35. package/corpus/templates/content/actions/mutate-content-database-block.ts +49 -0
  36. package/corpus/templates/content/changelog/2026-08-10-agents-can-safely-insert-update-upsert-delete-and-reorder-on.md +6 -0
  37. package/corpus/templates/content/docs/product/capabilities/content.object.block.md +6 -2
  38. package/corpus/templates/content/docs/product/capabilities/content.object.blocks-field.md +2 -1
  39. package/corpus/templates/content/parity/matrix.md +30 -30
  40. package/corpus/templates/content/parity/matrix.ts +4 -1
  41. package/corpus/templates/content/shared/blocks-field-identity.ts +114 -37
  42. package/corpus/templates/content/shared/database-block-actions.ts +82 -0
  43. package/corpus/templates/content/shared/database-block-mutations.ts +366 -0
  44. package/corpus/templates/content/shared/nfm.ts +3 -2
  45. package/corpus/templates/mail/.agents/skills/email-drafts/SKILL.md +24 -0
  46. package/corpus/templates/mail/actions/get-mail-settings.ts +1 -1
  47. package/corpus/templates/mail/actions/update-mail-settings.ts +7 -3
  48. package/corpus/templates/mail/app/i18n/en-US.ts +3 -1
  49. package/corpus/templates/mail/app/pages/SettingsPage.tsx +63 -0
  50. package/corpus/templates/mail/changelog/2026-08-17-gmail-signatures-now-preserve-images-and-support-paste-or-up.md +6 -0
  51. package/corpus/templates/mail/changelog/2026-08-17-mail-now-updates-durable-drafting-preferences-without-openin.md +6 -0
  52. package/corpus/templates/mail/server/plugins/agent-chat.ts +19 -0
  53. package/corpus/templates/mail/shared/gmail-signature.ts +14 -2
  54. package/corpus/templates/mail/shared/signature.ts +1 -10
  55. package/corpus/templates/slides/actions/generate-slides-ai.ts +2 -0
  56. package/corpus/templates/slides/actions/patch-deck.ts +1 -1
  57. package/corpus/templates/slides/app/components/ThemeToggle.tsx +1 -0
  58. package/corpus/templates/slides/app/components/editor/SlideThumbnailContextMenu.tsx +59 -0
  59. package/corpus/templates/slides/app/global.css +1 -0
  60. package/corpus/templates/slides/app/lib/normalize-slide-padding.ts +40 -11
  61. package/corpus/templates/slides/changelog/2026-08-17-stable-layout-and-slide-editing.md +6 -0
  62. package/corpus/templates/slides/shared/deck-title.ts +12 -4
  63. package/dist/agent/engine/builder-engine.js +6 -1
  64. package/dist/agent/engine/error-detail.d.ts +17 -0
  65. package/dist/agent/engine/error-detail.js +27 -0
  66. package/dist/agent/production-agent.js +23 -5
  67. package/dist/agent/thread-data-builder.js +5 -0
  68. package/dist/agent/tool-approval-migrations.d.ts +1 -0
  69. package/dist/agent/tool-approval-migrations.js +10 -0
  70. package/dist/agent/tool-approval-store.d.ts +12 -0
  71. package/dist/agent/tool-approval-store.js +46 -1
  72. package/dist/agent/types.d.ts +3 -1
  73. package/dist/client/AssistantChat.js +3 -1
  74. package/dist/client/error-format.js +15 -0
  75. package/dist/client/sse-event-processor.js +4 -0
  76. package/dist/collab/struct-routes.d.ts +1 -1
  77. package/dist/localization/core-messages/ar-SA.js +2 -0
  78. package/dist/localization/core-messages/de-DE.js +2 -0
  79. package/dist/localization/core-messages/en-US.d.ts +2 -0
  80. package/dist/localization/core-messages/en-US.js +2 -0
  81. package/dist/localization/core-messages/es-ES.js +2 -0
  82. package/dist/localization/core-messages/fr-FR.js +2 -0
  83. package/dist/localization/core-messages/hi-IN.js +2 -0
  84. package/dist/localization/core-messages/ja-JP.js +2 -0
  85. package/dist/localization/core-messages/ko-KR.js +2 -0
  86. package/dist/localization/core-messages/pt-BR.js +2 -0
  87. package/dist/localization/core-messages/zh-CN.js +2 -0
  88. package/dist/localization/core-messages/zh-TW.js +2 -0
  89. package/dist/localization/core-messages.d.ts +2 -0
  90. package/dist/observability/routes.d.ts +5 -5
  91. package/dist/resources/handlers.d.ts +1 -1
  92. package/dist/scripts/resources/read.js +4 -4
  93. package/dist/scripts/resources/save-memory.js +15 -2
  94. package/dist/scripts/resources/write.js +3 -3
  95. package/dist/secrets/routes.d.ts +9 -9
  96. package/dist/server/agent-chat/script-entries.d.ts +1 -0
  97. package/dist/server/agent-chat/script-entries.js +8 -0
  98. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  99. package/dist/server/transcribe-voice.d.ts +1 -1
  100. package/docs/content/onboarding.mdx +13 -2
  101. package/package.json +3 -3
@@ -34,37 +34,37 @@ export declare function createListSecretsHandler(): import("h3").EventHandlerWit
34
34
  /** POST /_agent-native/secrets/:key — write a secret. */
35
35
  export declare function createWriteSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
36
36
  error: string;
37
- ok?: undefined;
38
37
  status?: undefined;
38
+ ok?: undefined;
39
39
  } | {
40
- error?: undefined;
41
40
  ok: boolean;
42
41
  status: string;
42
+ error?: undefined;
43
43
  } | {
44
- ok?: undefined;
45
44
  error: string;
46
45
  removed?: undefined;
46
+ ok?: undefined;
47
47
  } | {
48
- error?: undefined;
49
48
  ok: boolean;
50
49
  removed: boolean;
50
+ error?: undefined;
51
51
  }>>;
52
52
  /**
53
53
  * POST /_agent-native/secrets/:key/test — validate an optional candidate value
54
54
  * or the current stored value without changing anything.
55
55
  */
56
56
  export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
57
- ok?: undefined;
58
57
  error: string;
59
58
  note?: undefined;
59
+ ok?: undefined;
60
60
  } | {
61
- error?: undefined;
62
61
  ok: boolean;
63
62
  note?: undefined;
64
- } | {
65
63
  error?: undefined;
64
+ } | {
66
65
  ok: boolean;
67
66
  note: string;
67
+ error?: undefined;
68
68
  } | {
69
69
  note?: undefined;
70
70
  ok: boolean;
@@ -95,11 +95,11 @@ export interface AdHocSecretPayload {
95
95
  export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
96
96
  error: string;
97
97
  } | {
98
- error?: undefined;
99
98
  ok: boolean;
100
99
  key: string;
101
- } | {
102
100
  error?: undefined;
101
+ } | {
103
102
  ok: boolean;
104
103
  removed: boolean;
104
+ error?: undefined;
105
105
  }>>;
@@ -23,6 +23,7 @@ export declare function createDocsScriptEntries(): Promise<Record<string, Action
23
23
  * Creates resource ScriptEntries available in both prod and dev modes.
24
24
  */
25
25
  export declare function shouldDefaultResourceWriteToWorkspace(path: string): boolean;
26
+ export declare function shouldDefaultResourceWriteToShared(path: string): boolean;
26
27
  export declare function createResourceScriptEntries(): Promise<Record<string, ActionEntry>>;
27
28
  /**
28
29
  * Creates a unified chat-history ActionEntry that dispatches to search, open,
@@ -287,6 +287,9 @@ export function shouldDefaultResourceWriteToWorkspace(path) {
287
287
  normalized.startsWith("agents/") ||
288
288
  normalized.startsWith("remote-agents/"));
289
289
  }
290
+ export function shouldDefaultResourceWriteToShared(path) {
291
+ return path.replace(/^\/+/, "") === "LEARNINGS.md";
292
+ }
290
293
  export async function createResourceScriptEntries() {
291
294
  try {
292
295
  const [list, read, effective, write, del, saveMem, delMem, store] = await Promise.all([
@@ -407,6 +410,11 @@ export async function createResourceScriptEntries() {
407
410
  rest.content === null)
408
411
  return "Error: path and content are required for write";
409
412
  rest.createdBy = "agent";
413
+ rest.scope =
414
+ rest.scope ??
415
+ (shouldDefaultResourceWriteToShared(String(rest.path))
416
+ ? "shared"
417
+ : undefined);
410
418
  rest.visibility =
411
419
  rest.visibility ??
412
420
  (shouldDefaultResourceWriteToWorkspace(String(rest.path))
@@ -27,10 +27,10 @@ export declare function resolveAgentEngineApiKeyWriteTarget(event: H3Event, scop
27
27
  export declare function createAgentEngineApiKeyHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
28
28
  error: any;
29
29
  } | {
30
- error?: undefined;
31
30
  ok: boolean;
32
31
  key: string;
33
32
  baseUrlKey?: string;
34
33
  scope: AgentEngineApiKeyScope;
34
+ error?: undefined;
35
35
  }>>;
36
36
  export {};
@@ -20,6 +20,6 @@ export declare function createTranscribeVoiceHandler(): import("h3").EventHandle
20
20
  error: string;
21
21
  text?: undefined;
22
22
  } | {
23
- text: string;
24
23
  error?: undefined;
24
+ text: string;
25
25
  }>>;
@@ -212,6 +212,10 @@ You can check connection readiness in your `isComplete` callback using the conne
212
212
 
213
213
  ```ts filename="server/plugins/my-onboarding.ts"
214
214
  import { listWorkspaceConnectionProviderCatalogForApp } from "@agent-native/core/workspace-connections";
215
+ import {
216
+ getRequestOrgId,
217
+ getRequestUserEmail,
218
+ } from "@agent-native/core/server";
215
219
 
216
220
  // Inside registerOnboardingStep:
217
221
  isComplete: async () => {
@@ -230,8 +234,15 @@ isComplete: async () => {
230
234
  return true;
231
235
  }
232
236
 
233
- // Fall back to local environment variable check
234
- return !!process.env.GMAIL_REFRESH_TOKEN;
237
+ // If there is no reusable connection, check the caller-scoped credential
238
+ // store - never a deployment environment variable.
239
+ const { resolveCredential } = await import("@agent-native/core/credentials");
240
+ return Boolean(
241
+ await resolveCredential("GMAIL_REFRESH_TOKEN", {
242
+ userEmail: getRequestUserEmail(),
243
+ orgId: getRequestOrgId(),
244
+ }),
245
+ );
235
246
  };
236
247
  ```
237
248
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.160.1",
3
+ "version": "0.161.1",
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": {
@@ -427,8 +427,8 @@
427
427
  "y-protocols": "^1.0.7",
428
428
  "yjs": "^13.6.31",
429
429
  "zod": "^4.3.6",
430
- "@agent-native/toolkit": "^0.16.4",
431
- "@agent-native/recap-cli": "0.5.4"
430
+ "@agent-native/recap-cli": "0.5.4",
431
+ "@agent-native/toolkit": "^0.16.4"
432
432
  },
433
433
  "devDependencies": {
434
434
  "@ai-sdk/anthropic": "^3.0.71",