@agent-native/core 0.237.2 → 0.237.3-nightly-20261203005849

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 (41) hide show
  1. package/dist/cli/builder-import.d.ts +32 -0
  2. package/dist/cli/builder-import.js +270 -0
  3. package/dist/cli/builder-sign-in.d.ts +11 -0
  4. package/dist/cli/builder-sign-in.js +100 -0
  5. package/dist/cli/code-agent-runs.d.ts +7 -0
  6. package/dist/cli/code-agent-runs.js +41 -7
  7. package/dist/cli/index.js +25 -4
  8. package/dist/cli/skills-content/turn-into-app-skill.d.ts +1 -1
  9. package/dist/cli/skills-content/turn-into-app-skill.js +14 -0
  10. package/dist/cli/telemetry-routing.d.ts +5 -0
  11. package/dist/cli/telemetry-routing.js +16 -0
  12. package/dist/client/generation-stream/streaming-frame.d.ts +1 -0
  13. package/dist/client/generation-stream/streaming-frame.js +1 -1
  14. package/dist/client/use-chat-models.js +4 -1
  15. package/dist/framework-package-versions.json +7 -7
  16. package/dist/framework-tools.js +1 -0
  17. package/dist/notifications/actions/archive-notification.d.ts +7 -0
  18. package/dist/notifications/actions/archive-notification.js +29 -0
  19. package/dist/notifications/actions.js +2 -2
  20. package/dist/notifications/routes.d.ts +2 -2
  21. package/dist/onboarding/default-steps.js +9 -30
  22. package/dist/onboarding/types.d.ts +2 -0
  23. package/dist/org/handlers.js +2 -1
  24. package/dist/org/index.d.ts +2 -2
  25. package/dist/org/migrations.d.ts +1 -1
  26. package/dist/provider-api/actions/custom-provider-registration.d.ts +9 -9
  27. package/dist/provider-api/actions/provider-api.d.ts +8 -8
  28. package/dist/resources/handlers.d.ts +3 -3
  29. package/dist/secrets/routes.d.ts +2 -2
  30. package/dist/server/action-discovery.js +4 -0
  31. package/dist/server/agent-engine-api-key-route.d.ts +2 -2
  32. package/dist/server/builder-oauth.d.ts +12 -0
  33. package/dist/server/builder-oauth.js +6 -0
  34. package/dist/server/first-touch-route.d.ts +1 -1
  35. package/dist/templates/default/.agents/skills/notifications/SKILL.md +2 -0
  36. package/dist/templates/workspace-core/.agents/skills/turn-into-app/references/local-run-and-deploy.md +14 -0
  37. package/dist/triggers/actions.js +3 -0
  38. package/docs/content/notifications.mdx +4 -0
  39. package/package.json +3 -3
  40. package/src/templates/default/.agents/skills/notifications/SKILL.md +2 -0
  41. package/src/templates/workspace-core/.agents/skills/turn-into-app/references/local-run-and-deploy.md +14 -0
@@ -320,8 +320,8 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
320
320
  notes?: string | undefined;
321
321
  scope?: "org" | "user" | undefined;
322
322
  }, {
323
+ message?: undefined;
323
324
  id?: undefined;
324
- deleted?: undefined;
325
325
  providers: {
326
326
  id: string;
327
327
  label: string;
@@ -334,30 +334,31 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
334
334
  count: number;
335
335
  provider?: undefined;
336
336
  found?: undefined;
337
+ deleted?: undefined;
337
338
  registered?: undefined;
338
339
  label?: undefined;
339
- message?: undefined;
340
340
  } | {
341
+ message?: undefined;
341
342
  id?: undefined;
342
- deleted?: undefined;
343
343
  count?: undefined;
344
344
  providers?: undefined;
345
345
  found: boolean;
346
346
  provider: import("../custom-registry.js").CustomProviderConfig;
347
+ deleted?: undefined;
347
348
  registered?: undefined;
348
349
  label?: undefined;
349
- message?: undefined;
350
350
  } | {
351
- deleted?: undefined;
351
+ message?: undefined;
352
352
  count?: undefined;
353
353
  providers?: undefined;
354
354
  provider?: undefined;
355
355
  found: boolean;
356
356
  id: string;
357
+ deleted?: undefined;
357
358
  registered?: undefined;
358
359
  label?: undefined;
359
- message?: undefined;
360
360
  } | {
361
+ message?: undefined;
361
362
  count?: undefined;
362
363
  providers?: undefined;
363
364
  provider?: undefined;
@@ -366,13 +367,12 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
366
367
  id: string;
367
368
  registered?: undefined;
368
369
  label?: undefined;
369
- message?: undefined;
370
370
  } | {
371
- deleted?: undefined;
372
371
  count?: undefined;
373
372
  providers?: undefined;
374
373
  provider?: undefined;
375
374
  found?: undefined;
375
+ deleted?: undefined;
376
376
  registered: boolean;
377
377
  id: string;
378
378
  label: string;
@@ -51,8 +51,8 @@ export declare function handleGetResource(event: any): Promise<Response | {
51
51
  revision: string;
52
52
  })>;
53
53
  export declare function handleCreateResource(event: any): Promise<{
54
- details?: undefined;
55
54
  errorCode?: undefined;
55
+ details?: undefined;
56
56
  error: string;
57
57
  } | {
58
58
  error: string;
@@ -62,8 +62,8 @@ export declare function handleCreateResource(event: any): Promise<{
62
62
  revision: string;
63
63
  })>;
64
64
  export declare function handleUpdateResource(event: any): Promise<{
65
- details?: undefined;
66
65
  errorCode?: undefined;
66
+ details?: undefined;
67
67
  error: string;
68
68
  } | {
69
69
  error: string;
@@ -80,8 +80,8 @@ export declare function handleDeleteResource(event: any): Promise<{
80
80
  ok: boolean;
81
81
  }>;
82
82
  export declare function handleUploadResource(event: any): Promise<{
83
- details?: undefined;
84
83
  errorCode?: undefined;
84
+ details?: undefined;
85
85
  error: string;
86
86
  } | {
87
87
  error: string;
@@ -55,8 +55,8 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
55
55
  errorCode: "secret_managed_elsewhere";
56
56
  managedBy: SecretManagedBy;
57
57
  } | {
58
- error: string;
59
58
  errorCode?: undefined;
59
+ error: string;
60
60
  ok?: undefined;
61
61
  status?: undefined;
62
62
  } | {
@@ -65,8 +65,8 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
65
65
  ok?: undefined;
66
66
  status?: undefined;
67
67
  } | {
68
- error?: undefined;
69
68
  errorCode?: undefined;
69
+ error?: undefined;
70
70
  ok: boolean;
71
71
  status: string;
72
72
  } | {
@@ -486,6 +486,10 @@ export function coreActionLoaderEntries() {
486
486
  "save-problem-report",
487
487
  () => import("../problem-report/actions/save-problem-report.js"),
488
488
  ],
489
+ [
490
+ "archive-notification",
491
+ () => import("../notifications/actions/archive-notification.js"),
492
+ ],
489
493
  [
490
494
  "read-problem-report",
491
495
  () => import("../problem-report/actions/read-problem-report.js"),
@@ -54,9 +54,9 @@ export declare function resolveAgentEngineApiKeyWriteTarget(event: H3Event, scop
54
54
  error: string;
55
55
  }>;
56
56
  export declare function createAgentEngineApiKeyHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
57
+ errorCode?: undefined;
57
58
  code?: undefined;
58
59
  error: string;
59
- errorCode?: undefined;
60
60
  } | {
61
61
  code?: undefined;
62
62
  error: string;
@@ -67,8 +67,8 @@ export declare function createAgentEngineApiKeyHandler(): import("h3").EventHand
67
67
  code: ProviderKeyCheckCode;
68
68
  } | {
69
69
  error?: undefined;
70
- code?: undefined;
71
70
  errorCode?: undefined;
71
+ code?: undefined;
72
72
  ok: boolean;
73
73
  key: string;
74
74
  baseUrlKey?: string | undefined;
@@ -62,12 +62,24 @@ export declare function startBuilderOAuthAuthorization(input: {
62
62
  authorizationUrl: string;
63
63
  pending: BuilderOAuthPendingFlow;
64
64
  }>;
65
+ export declare function startBuilderOAuthSignIn(input: {
66
+ redirectUri: string;
67
+ state: string;
68
+ }): Promise<{
69
+ authorizationUrl: string;
70
+ pending: BuilderOAuthPendingFlow;
71
+ }>;
65
72
  export declare function exchangeBuilderOAuthAuthorization(input: {
66
73
  ownerEmail: string;
67
74
  code: string;
68
75
  iss?: string;
69
76
  pending: BuilderOAuthPendingFlow;
70
77
  }): Promise<McpOAuthCredentialBundle>;
78
+ export declare function exchangeBuilderOAuthSignIn(input: {
79
+ code: string;
80
+ iss?: string;
81
+ pending: BuilderOAuthPendingFlow;
82
+ }): Promise<McpOAuthCredentialBundle>;
71
83
  /**
72
84
  * Store a completed grant. An explicit `scope` decides custody outright (the
73
85
  * caller has already authorized it); without one, an owner/admin role writes
@@ -205,6 +205,9 @@ function isBuilderCredential(credentials) {
205
205
  }
206
206
  export async function startBuilderOAuthAuthorization(input) {
207
207
  normalizeOwnerEmail(input.ownerEmail);
208
+ return startBuilderOAuthSignIn(input);
209
+ }
210
+ export async function startBuilderOAuthSignIn(input) {
208
211
  const started = await startMcpOAuthAuthorization({
209
212
  serverUrl: BUILDER_OAUTH_RESOURCE,
210
213
  redirectUrl: input.redirectUri,
@@ -223,6 +226,9 @@ export async function startBuilderOAuthAuthorization(input) {
223
226
  };
224
227
  }
225
228
  export async function exchangeBuilderOAuthAuthorization(input) {
229
+ return exchangeBuilderOAuthSignIn(input);
230
+ }
231
+ export async function exchangeBuilderOAuthSignIn(input) {
226
232
  validateMcpOAuthCallbackIssuer(input.pending.discoveryState, input.iss);
227
233
  const result = await finishMcpOAuthAuthorization({
228
234
  serverUrl: BUILDER_OAUTH_RESOURCE,
@@ -17,9 +17,9 @@ export type FirstTouchSyncResult = {
17
17
  * browser's `an_ft` and `an_lt` again, so Safari keeps them their 30 days.
18
18
  */
19
19
  export declare function createFirstTouchHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
20
+ stored?: undefined;
20
21
  reason?: undefined;
21
22
  error: string;
22
- stored?: undefined;
23
23
  firstTouch?: undefined;
24
24
  } | {
25
25
  error?: undefined;
@@ -81,6 +81,8 @@ Mounted at `/_agent-native/notifications/*` by `core-routes-plugin`, all session
81
81
  - `POST /notifications/read-all`
82
82
  - `DELETE /notifications/:id`
83
83
 
84
+ To dismiss a notification, call the `archive-notification` action with an `id` from `manage-notifications` `action=list`. It archives the row, which is what the notifications menu does. `DELETE` removes the row permanently.
85
+
84
86
  ## UI
85
87
 
86
88
  ```tsx
@@ -153,6 +153,20 @@ say so instead of deploying it.
153
153
  `vercel deploy --prebuilt`. Guide:
154
154
  https://www.agent-native.com/docs/workspace-deployment
155
155
 
156
+ - **Builder, for an app built here:** when the person wants this app on
157
+ Builder, run `npx @agent-native/core@latest builder-import` from the app's
158
+ folder. It opens Builder's sign-in in their browser; tell them to pick the
159
+ space for the app and click Authorize. It then sends the app without its
160
+ `.env` or git-ignored files, revokes the sign-in, and prints the Builder
161
+ project link: report that link. Builder's agent moves the app onto its
162
+ starter, which uses Builder credits, and Publish then appears in the project
163
+ on plans that include hosting. `--dry-run` lists what would be sent. The
164
+ sign-in only finishes in a browser on the machine running the command, so
165
+ from a cloud sandbox use a Builder personal access token with write scope
166
+ instead: set `BUILDER_PERSONAL_ACCESS_TOKEN` in the environment (never on the
167
+ command line or in the report) and pass `--space <space id>`. Without one,
168
+ give the person the command rather than asking them to paste a token.
169
+
156
170
  Missing provider authentication, a production secret, or a hosting decision is
157
171
  a pending step, not a failure to hide: report it and stop short of claiming a
158
172
  deployment.
@@ -237,6 +237,8 @@ async function handleDefine(args, getCurrentUser, appId, context) {
237
237
  : undefined,
238
238
  });
239
239
  await refreshEventSubscriptions();
240
+ const query = new URLSearchParams({ automationId: definition.resourceId });
241
+ const appLocalPath = `/settings/automations?${query}`;
240
242
  return JSON.stringify({
241
243
  created: true,
242
244
  resourceId: definition.resourceId,
@@ -245,6 +247,7 @@ async function handleDefine(args, getCurrentUser, appId, context) {
245
247
  verb: "created",
246
248
  kind: "automation",
247
249
  title: definition.name.slice(0, 180),
250
+ url: appLocalPath,
248
251
  },
249
252
  scope: definition.scope,
250
253
  triggerType: definition.meta.triggerType,
@@ -334,6 +334,8 @@ export function HeaderBar() {
334
334
 
335
335
  Bell icon with unread badge. Clicking opens a dropdown of recent notifications. Uses shadcn semantic tokens, adapts to the host template's light/dark theme.
336
336
 
337
+ For a sidebar menu, pass `variant="sidebar"` for a full-width row with an unread count, plus `collapsed` for the icon-only collapsed sidebar. Dismissing a notification archives it rather than deleting it.
338
+
337
339
  Pass `browserNotifications` to also fire system `new Notification(...)` popups for every new unread item — useful when the user's tab is in the background. The dropdown renders an "Enable" prompt until the user grants permission; duplicates are prevented per-id via the Notification `tag` field.
338
340
 
339
341
  ## Agent tools {#agent-tools}
@@ -345,6 +347,8 @@ A single `manage-notifications` tool is registered in every template. The `actio
345
347
  | `send` | `severity` (required), `title` (required), `body`, `metadataJson`, `channels` | Send a notification to the user's inbox and registered channels |
346
348
  | `list` | `unreadOnly`, `limit` (max 200, default 20) | List recent notifications for context |
347
349
 
350
+ To archive a notification, call the `archive-notification` action with an `id` from `list`. The notifications menu uses the same action when someone dismisses one, and the notification is kept, not deleted.
351
+
348
352
  Automations (see [Automations](/docs/automations)) can call `manage-notifications` with `action=send` in their body — this is the canonical pattern for turning an external event into a user-visible alert.
349
353
 
350
354
  ## Event bus {#event-bus}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.237.2",
3
+ "version": "0.237.3-nightly-20261203005849",
4
4
  "description": "The agentic application framework for building autonomous agents with intuitive UIs",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -836,7 +836,7 @@
836
836
  "yjs": "^13.6.33",
837
837
  "zod": "^4.3.6",
838
838
  "@agent-native/actions": "^0.1.4",
839
- "@agent-native/agentkit": "^0.237.2",
839
+ "@agent-native/agentkit": "^0.237.3-nightly-20261203005849",
840
840
  "@agent-native/recap-cli": "^0.5.115"
841
841
  },
842
842
  "devDependencies": {
@@ -911,7 +911,7 @@
911
911
  "xlsx": "^0.18.5"
912
912
  },
913
913
  "peerDependencies": {
914
- "@agent-native/core-corpus": ">=0.196.0",
914
+ "@agent-native/core-corpus": "0.237.3-nightly-20261203005849",
915
915
  "@ai-sdk/anthropic": ">=3",
916
916
  "@ai-sdk/cohere": ">=3",
917
917
  "@ai-sdk/google": ">=3.0.152",
@@ -81,6 +81,8 @@ Mounted at `/_agent-native/notifications/*` by `core-routes-plugin`, all session
81
81
  - `POST /notifications/read-all`
82
82
  - `DELETE /notifications/:id`
83
83
 
84
+ To dismiss a notification, call the `archive-notification` action with an `id` from `manage-notifications` `action=list`. It archives the row, which is what the notifications menu does. `DELETE` removes the row permanently.
85
+
84
86
  ## UI
85
87
 
86
88
  ```tsx
@@ -153,6 +153,20 @@ say so instead of deploying it.
153
153
  `vercel deploy --prebuilt`. Guide:
154
154
  https://www.agent-native.com/docs/workspace-deployment
155
155
 
156
+ - **Builder, for an app built here:** when the person wants this app on
157
+ Builder, run `npx @agent-native/core@latest builder-import` from the app's
158
+ folder. It opens Builder's sign-in in their browser; tell them to pick the
159
+ space for the app and click Authorize. It then sends the app without its
160
+ `.env` or git-ignored files, revokes the sign-in, and prints the Builder
161
+ project link: report that link. Builder's agent moves the app onto its
162
+ starter, which uses Builder credits, and Publish then appears in the project
163
+ on plans that include hosting. `--dry-run` lists what would be sent. The
164
+ sign-in only finishes in a browser on the machine running the command, so
165
+ from a cloud sandbox use a Builder personal access token with write scope
166
+ instead: set `BUILDER_PERSONAL_ACCESS_TOKEN` in the environment (never on the
167
+ command line or in the report) and pass `--space <space id>`. Without one,
168
+ give the person the command rather than asking them to paste a token.
169
+
156
170
  Missing provider authentication, a production secret, or a hosting decision is
157
171
  a pending step, not a failure to hide: report it and stop short of claiming a
158
172
  deployment.