@agent-native/core 0.231.0 → 0.232.0-nightly-20261118182504

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 (75) hide show
  1. package/dist/a2a/call-hooks.d.ts +135 -0
  2. package/dist/a2a/call-hooks.js +164 -0
  3. package/dist/a2a/client.d.ts +5 -0
  4. package/dist/a2a/client.js +22 -0
  5. package/dist/a2a/foreground-call-scope.d.ts +6 -0
  6. package/dist/a2a/foreground-call-scope.js +26 -0
  7. package/dist/a2a/handlers.js +119 -2
  8. package/dist/a2a/index.d.ts +3 -0
  9. package/dist/a2a/index.js +2 -0
  10. package/dist/a2a/invoke.js +17 -0
  11. package/dist/a2a/server.js +3 -0
  12. package/dist/action.js +3 -1
  13. package/dist/agent/durable-background.d.ts +6 -0
  14. package/dist/agent/durable-background.js +6 -0
  15. package/dist/agent/durable-turn-grant.d.ts +53 -0
  16. package/dist/agent/durable-turn-grant.js +83 -0
  17. package/dist/agent/production-agent.js +54 -2
  18. package/dist/app-config/agent.d.ts +1 -0
  19. package/dist/app-config/agent.js +7 -0
  20. package/dist/app-config/schema.d.ts +1 -0
  21. package/dist/cli/doctor.d.ts +1 -0
  22. package/dist/cli/doctor.js +10 -4
  23. package/dist/cli/skills-content/design-visual-edit-skill.d.ts +1 -1
  24. package/dist/cli/skills-content/design-visual-edit-skill.js +9 -15
  25. package/dist/client/sharing/useShareButtonController.d.ts +5 -0
  26. package/dist/client/sharing/useShareButtonController.js +2 -1
  27. package/dist/client/use-chat-threads.js +3 -0
  28. package/dist/client/use-db-sync.js +22 -0
  29. package/dist/collab/routes.d.ts +1 -1
  30. package/dist/deploy/build.d.ts +4 -1
  31. package/dist/deploy/build.js +25 -15
  32. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  33. package/dist/framework-package-versions.json +7 -7
  34. package/dist/guards/index.d.ts +1 -1
  35. package/dist/guards/index.js +1 -1
  36. package/dist/guards/no-env-credentials.d.ts +15 -1
  37. package/dist/guards/no-env-credentials.js +27 -0
  38. package/dist/integrations/internal-token.d.ts +15 -0
  39. package/dist/integrations/internal-token.js +19 -0
  40. package/dist/mcp/build-server.js +18 -2
  41. package/dist/mcp/index.d.ts +1 -0
  42. package/dist/mcp/index.js +1 -0
  43. package/dist/mcp/turn-grant-admitters.d.ts +61 -0
  44. package/dist/mcp/turn-grant-admitters.js +83 -0
  45. package/dist/mcp/turn-grant-store.d.ts +5 -0
  46. package/dist/mcp/turn-grant-store.js +19 -0
  47. package/dist/org/index.d.ts +2 -2
  48. package/dist/org/workspace-app-access.js +30 -11
  49. package/dist/provider-api/actions/custom-provider-registration.d.ts +16 -16
  50. package/dist/provider-api/actions/provider-api.d.ts +8 -8
  51. package/dist/provider-api/call-gates.d.ts +71 -2
  52. package/dist/provider-api/call-gates.js +157 -3
  53. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  54. package/dist/provider-api/index.d.ts +1 -1
  55. package/dist/provider-api/index.js +1 -1
  56. package/dist/provider-api/interactive-scope.d.ts +2 -1
  57. package/dist/provider-api/interactive-scope.js +17 -4
  58. package/dist/server/agent-chat-plugin.js +9 -2
  59. package/dist/server/agent-run-context.d.ts +1 -1
  60. package/dist/server/agent-run-context.js +34 -3
  61. package/dist/server/entry-server.js +3 -1
  62. package/dist/server/transcribe-voice.d.ts +1 -1
  63. package/dist/shared/build-id.d.ts +14 -0
  64. package/dist/shared/build-id.js +21 -0
  65. package/dist/vite/client.d.ts +16 -0
  66. package/dist/vite/client.js +6 -3
  67. package/dist/vitest-config.js +1 -0
  68. package/dist/workspace-connections/workspace-credential-actions.d.ts +1 -0
  69. package/dist/workspace-connections/workspace-credential-actions.js +1 -0
  70. package/dist/workspace-connections/workspace-credentials.d.ts +4 -0
  71. package/dist/workspace-connections/workspace-credentials.js +40 -4
  72. package/docs/content/template-design-agent.mdx +0 -1
  73. package/docs/content/template-design-developers.mdx +6 -9
  74. package/docs/workspace-credential-drafts.md +28 -0
  75. package/package.json +5 -4
@@ -37,3 +37,24 @@ export function resolveAgentNativeCommitSha(env) {
37
37
  }
38
38
  return "";
39
39
  }
40
+ /**
41
+ * The build id and commit an app's bundles carry. Each value the app sets wins
42
+ * over the build environment; a set value that is blank, or a commit that is
43
+ * not a full SHA, throws instead of silently falling back to the environment.
44
+ */
45
+ export function resolveAgentNativeBuildIdentity(env, override = {}) {
46
+ let buildId = resolveAgentNativeBuildId(env, "development");
47
+ if (override.buildId !== undefined) {
48
+ buildId = override.buildId.trim();
49
+ if (!buildId)
50
+ throw new Error("The app's buildId override is empty.");
51
+ }
52
+ let commitSha = resolveAgentNativeCommitSha(env);
53
+ if (override.commitSha !== undefined) {
54
+ commitSha = override.commitSha.trim().toLowerCase();
55
+ if (!FULL_COMMIT_SHA.test(commitSha)) {
56
+ throw new Error(`The app's commitSha override "${override.commitSha}" is not a full 40-character commit SHA.`);
57
+ }
58
+ }
59
+ return { buildId, commitSha };
60
+ }
@@ -37,6 +37,22 @@ export interface ClientConfigOptions {
37
37
  define?: UserConfig["define"];
38
38
  agentNativeConfig?: AgentNativeConfigInput;
39
39
  clientCompatibilityVersion?: string;
40
+ /**
41
+ * The build id this app's client and server bundles carry, which the served
42
+ * document stamps and the client compares with the server's. Defaults to the
43
+ * build environment's id (`DEPLOY_ID`, `AGENT_NATIVE_BUILD_ID`, ...). Set it
44
+ * when one build process compiles several apps that must report different
45
+ * builds, such as a mount pinned to an earlier release. Workspace deploy's
46
+ * served-build manifest records the build environment's id, so an app it
47
+ * builds leaves this unset; a pipeline that sets it records its own ids.
48
+ */
49
+ buildId?: string;
50
+ /**
51
+ * The full commit SHA this app was built from, named by the served
52
+ * document's `agent-native-build-sha` meta. Defaults to the commit the build
53
+ * environment names.
54
+ */
55
+ commitSha?: string;
40
56
  routeWarmup?: AgentNativeRouteWarmupConfigInput;
41
57
  mcpIntegrations?: McpIntegrationsConfigInput;
42
58
  tailwind?: boolean;
@@ -18,7 +18,7 @@ import { hashDatabaseKey, removeDevActionDiscoveryFile, writeDevActionDiscoveryF
18
18
  import { validateEmbedRequestOrigin } from "../server/embed-request-origin.js";
19
19
  import { resolveEmbedSessionTokenForOrigin } from "../server/embed-session.js";
20
20
  import { getForwardedRequestOriginFromHeaders } from "../server/request-origin.js";
21
- import { resolveAgentNativeBuildId, resolveAgentNativeCommitSha, } from "../shared/build-id.js";
21
+ import { resolveAgentNativeBuildIdentity } from "../shared/build-id.js";
22
22
  import { EMBED_SESSION_COOKIE, EMBED_TOKEN_QUERY_PARAM, MCP_APP_CHAT_BRIDGE_QUERY_PARAM, } from "../shared/embed-auth.js";
23
23
  import { FRAMEWORK_INTERNAL_ROUTE_PREFIX, matchesPathPrefix, normalizeFrameworkRoutePrefix, } from "../shared/framework-route-prefix.js";
24
24
  import { isMcpEmbedCorsOrigin, MCP_EMBED_CORS_ALLOW_HEADERS, MCP_EMBED_STATIC_ASSET_HEADERS, mcpEmbedStaticAssetRouteRules, shouldAllowMcpEmbedCredentials, } from "../shared/mcp-embed-headers.js";
@@ -3987,7 +3987,10 @@ function createAgentNativeConfig(options = {}, command, userConfig = {}, mode =
3987
3987
  const firstRunOnboardingBuildMode = JSON.stringify(firstRunOnboardingMode);
3988
3988
  const harnessBuildMode = JSON.stringify(harnessMode);
3989
3989
  const requiredEnvBuildValue = JSON.stringify(requiredEnv);
3990
- const buildId = resolveAgentNativeBuildId(process.env, "development");
3990
+ const { buildId, commitSha } = resolveAgentNativeBuildIdentity(process.env, {
3991
+ buildId: options.buildId,
3992
+ commitSha: options.commitSha,
3993
+ });
3991
3994
  const packageVersions = resolveAgentNativePackageVersions(cwd);
3992
3995
  const frameworkRoutePrefix = resolvedAppConfig.runtime?.frameworkRoutePrefix ?? "";
3993
3996
  // guard:allow-env-mutation — Vite config phase, set once before the in-process Nitro dev server accepts a request
@@ -4064,7 +4067,7 @@ function createAgentNativeConfig(options = {}, command, userConfig = {}, mode =
4064
4067
  ...(userConfig.define ?? {}),
4065
4068
  ...(options.define ?? {}),
4066
4069
  __AGENT_NATIVE_BUILD_ID__: JSON.stringify(buildId),
4067
- __AGENT_NATIVE_COMMIT_SHA__: JSON.stringify(resolveAgentNativeCommitSha(process.env)),
4070
+ __AGENT_NATIVE_COMMIT_SHA__: JSON.stringify(commitSha),
4068
4071
  __AGENT_NATIVE_LAZY_TOOLKIT_LOCALES__: JSON.stringify(process.env.AGENT_NATIVE_LAZY_TOOLKIT_LOCALES === "1"),
4069
4072
  __AGENT_NATIVE_PACKAGE_VERSIONS__: JSON.stringify(packageVersions),
4070
4073
  __AGENT_NATIVE_CLIENT_COMPATIBILITY_VERSION__: JSON.stringify(options.clientCompatibilityVersion?.trim() || ""),
@@ -41,6 +41,7 @@ const vitestBaseConfig = {
41
41
  // bundle inside a test takes several times longer, and which test crosses
42
42
  // the limit changes from run to run.
43
43
  testTimeout: 30_000,
44
+ hookTimeout: 30_000,
44
45
  },
45
46
  };
46
47
  export default vitestBaseConfig;
@@ -17,6 +17,7 @@ export declare function createWorkspaceCredentialActions(options: WorkspaceCrede
17
17
  update: import("../action.js").ActionDefinition<{
18
18
  connectionId: string;
19
19
  revision: string;
20
+ draft?: boolean | undefined;
20
21
  name?: string | undefined;
21
22
  config?: Record<string, string | number | boolean> | undefined;
22
23
  secretValues?: {
@@ -84,6 +84,7 @@ export function createWorkspaceCredentialActions(options) {
84
84
  schema: identity
85
85
  .extend({
86
86
  revision: z.string().min(1).max(200),
87
+ draft: z.boolean().optional(),
87
88
  name: z.string().trim().min(1).max(200).optional(),
88
89
  config: z
89
90
  .record(z.string(), z.union([
@@ -30,6 +30,9 @@ export interface WorkspaceCredentialServiceOptions {
30
30
  validateCredentials(input: WorkspaceCredentialValidationInput): Promise<void>;
31
31
  /** Trusted server limit, 1..30000 milliseconds. Defaults to 15000. */
32
32
  validationTimeoutMs?: number;
33
+ /** Allow private edits to disable a profile as a draft until validation succeeds.
34
+ * See packages/core/docs/workspace-credential-drafts.md for lifecycle details. */
35
+ allowDraftEdits?: boolean;
33
36
  /** Trusted server integration only. Runs inside native update publication,
34
37
  * before row locks and writes; throwing rolls back the whole update.
35
38
  * Never receives credentials or browser-provided callbacks. */
@@ -68,6 +71,7 @@ export declare function createWorkspaceCredentialService(rawOptions: WorkspaceCr
68
71
  update(raw: {
69
72
  connectionId: string;
70
73
  revision: string;
74
+ draft?: boolean | undefined;
71
75
  name?: string | undefined;
72
76
  config?: Record<string, WorkspaceCredentialConfigValue> | undefined;
73
77
  secretValues?: ReadonlyArray<{
@@ -100,6 +100,7 @@ function refs(p) {
100
100
  function storedConfig(p) {
101
101
  return {
102
102
  ...p.config,
103
+ ...(p.draft ? { workspaceCredentialDraft: true } : {}),
103
104
  workspaceConnectionScope: "workspace",
104
105
  workspaceCredentialProfile: PROFILE,
105
106
  };
@@ -111,6 +112,9 @@ function profileMatches(c, g, appId, orgId, allowArchived = false) {
111
112
  (c.status === "connected" || (allowArchived && c.status === "disabled")) &&
112
113
  c.config.workspaceConnectionScope === "workspace" &&
113
114
  c.config.workspaceCredentialProfile === PROFILE &&
115
+ (c.config.workspaceCredentialDraft === undefined ||
116
+ (c.config.workspaceCredentialDraft === true &&
117
+ c.status === "disabled")) &&
114
118
  c.allowedApps.length === 1 &&
115
119
  c.allowedApps[0] === appId &&
116
120
  c.allowedUsers.length === 0 &&
@@ -203,10 +207,15 @@ export function createWorkspaceCredentialService(rawOptions) {
203
207
  "validateCredentials",
204
208
  "validationTimeoutMs",
205
209
  "beforeUpdateCommit",
210
+ "allowDraftEdits",
206
211
  ]);
207
212
  if (options.beforeUpdateCommit !== undefined &&
208
213
  typeof options.beforeUpdateCommit !== "function")
209
214
  fail("invalid_input");
215
+ if (options.allowDraftEdits !== undefined &&
216
+ typeof options.allowDraftEdits !== "boolean")
217
+ fail("invalid_input");
218
+ const allowDraftEdits = options.allowDraftEdits === true;
210
219
  const beforeUpdateCommit = options.beforeUpdateCommit;
211
220
  const appId = text(options.appId);
212
221
  if (typeof options.validateCredentials !== "function")
@@ -354,7 +363,22 @@ export function createWorkspaceCredentialService(rawOptions) {
354
363
  c.provider !== provider.id ||
355
364
  !profileMatches(c, g, appId, a.orgId, true))
356
365
  fail("conflict");
357
- if (c.status !== "disabled") {
366
+ if (c.config.workspaceCredentialDraft === true) {
367
+ const config = { ...c.config };
368
+ delete config.workspaceCredentialDraft;
369
+ const now = Math.max(Date.now(), Date.parse(c.updatedAt) + 1, Date.parse(g.updatedAt) + 1);
370
+ const row = await tx.execute({
371
+ sql: "UPDATE public.workspace_connections SET config_json = ?, updated_at = ? WHERE id = ? AND org_id = ? AND status = 'disabled'",
372
+ args: [JSON.stringify(config), now, connectionId, a.orgId],
373
+ });
374
+ const grant = await tx.execute({
375
+ sql: "UPDATE public.workspace_connection_grants SET config_json = ?, updated_at = ? WHERE id = ? AND org_id = ?",
376
+ args: [JSON.stringify(config), now, g.id, a.orgId],
377
+ });
378
+ if (row.rowsAffected !== 1 || grant.rowsAffected !== 1)
379
+ fail("storage_failed");
380
+ }
381
+ else if (c.status !== "disabled") {
358
382
  const updated = await tx.execute({
359
383
  sql: "UPDATE public.workspace_connections SET status = 'disabled', updated_at = ? WHERE id = ? AND owner_email = ? AND org_id = ? AND status = 'connected'",
360
384
  args: [Date.now(), connectionId, c.ownerEmail, a.orgId],
@@ -402,12 +426,17 @@ export function createWorkspaceCredentialService(rawOptions) {
402
426
  const input = record(raw, [
403
427
  "connectionId",
404
428
  "revision",
429
+ "draft",
405
430
  "name",
406
431
  "config",
407
432
  "secretValues",
408
433
  ]), a = actor();
409
434
  await authorize(a, true);
410
435
  const connectionId = text(input.connectionId), revision = text(input.revision);
436
+ if (input.draft !== undefined &&
437
+ (typeof input.draft !== "boolean" || !allowDraftEdits))
438
+ fail("invalid_input");
439
+ const requestedDraft = typeof input.draft === "boolean" ? input.draft : undefined;
411
440
  async function snapshot() {
412
441
  await authorize(a, true);
413
442
  const c = await getWorkspaceConnection(connectionId);
@@ -419,13 +448,14 @@ export function createWorkspaceCredentialService(rawOptions) {
419
448
  if (!g ||
420
449
  grants.length !== 1 ||
421
450
  c.provider !== provider.id ||
422
- !profileMatches(c, g, appId, a.orgId))
451
+ !profileMatches(c, g, appId, a.orgId, allowDraftEdits && c.config.workspaceCredentialDraft === true))
423
452
  fail("conflict");
424
453
  if (credentialRevision(c, g) !== revision)
425
454
  fail("conflict");
426
455
  const allowedConfig = new Set([
427
456
  "workspaceConnectionScope",
428
457
  "workspaceCredentialProfile",
458
+ ...(allowDraftEdits ? ["workspaceCredentialDraft"] : []),
429
459
  ...(provider.configurationFields ?? []).map((field) => field.key),
430
460
  ]);
431
461
  if (Object.keys(c.config).some((key) => !allowedConfig.has(key)))
@@ -453,6 +483,9 @@ export function createWorkspaceCredentialService(rawOptions) {
453
483
  }
454
484
  try {
455
485
  const before = await snapshot();
486
+ // An edit that does not say otherwise keeps a draft a draft, so only an
487
+ // explicit `draft: false` can validate and reconnect it.
488
+ const draft = requestedDraft ?? before.c.config.workspaceCredentialDraft === true;
456
489
  const values = new Map(before.secrets.map((secret) => [secret.key, secret.secret]));
457
490
  const seen = new Set();
458
491
  for (const rawSecret of array(input.secretValues ?? [])) {
@@ -474,7 +507,9 @@ export function createWorkspaceCredentialService(rawOptions) {
474
507
  secretValues: [...values].map(([key, secret]) => ({ key, secret })),
475
508
  }, a);
476
509
  p.id = connectionId;
477
- await validatePrepared(p);
510
+ p.draft = draft;
511
+ if (!draft)
512
+ await validatePrepared(p);
478
513
  await authorize(a, true);
479
514
  const db = getDbExec();
480
515
  if (typeof db.transaction !== "function")
@@ -514,9 +549,10 @@ export function createWorkspaceCredentialService(rawOptions) {
514
549
  // the system clock repeats or moves backwards.
515
550
  const now = Math.max(Date.now(), Date.parse(current.c.updatedAt) + 1, Date.parse(current.g.updatedAt) + 1), configJson = JSON.stringify(storedConfig(p)), refsJson = JSON.stringify(refs(p));
516
551
  const row = await tx.execute({
517
- sql: "UPDATE public.workspace_connections SET label = ?, config_json = ?, credential_refs_json = ?, updated_at = ? WHERE id = ? AND org_id = ? AND owner_email = ?",
552
+ sql: "UPDATE public.workspace_connections SET label = ?, status = ?, config_json = ?, credential_refs_json = ?, updated_at = ? WHERE id = ? AND org_id = ? AND owner_email = ?",
518
553
  args: [
519
554
  p.name,
555
+ draft ? "disabled" : "connected",
520
556
  configJson,
521
557
  refsJson,
522
558
  now,
@@ -44,7 +44,6 @@ since nothing was created or edited.
44
44
  - **"Create three landing-page directions for a technical analytics product."** A few genuinely different variants appear to compare and pick from.
45
45
  - **"Make this dashboard denser and easier to scan for an operations team."** The chosen screen updates live.
46
46
  - **"Turn this repeated card into a reusable component."** Future edits to one instance stay separate from the others, unless you ask to update them all.
47
- - **"Add a hover animation to this button."** A motion track is created without opening the Motion dock yourself.
48
47
  - **"Add a wave shader to the hero background."** Applies the effect directly, without going through the Effects menu's picker.
49
48
 
50
49
  ### Check quality
@@ -132,15 +132,12 @@ Every design-specific operation is a TypeScript file in
132
132
  | `go-to-main-component` | Jump to the earliest instance of a component as a reference point |
133
133
  | `open-component-source` | Open a component's source location |
134
134
 
135
- ### Motion and shaders
135
+ ### Shaders
136
136
 
137
- | Action | What it does |
138
- | ------------------------ | ----------------------------------------------------- |
139
- | `get-motion-timeline` | Read an element's motion timeline |
140
- | `apply-motion-edit` | Add or edit a keyframe on a motion timeline |
141
- | `remove-motion-timeline` | Remove a motion timeline |
142
- | `get-shader` | Inspect native definitions and saved effect manifests |
143
- | `edit-native-shader` | Apply, edit, approve, or remove native effects |
137
+ | Action | What it does |
138
+ | -------------------- | ----------------------------------------------------- |
139
+ | `get-shader` | Inspect native definitions and saved effect manifests |
140
+ | `edit-native-shader` | Apply, edit, approve, or remove native effects |
144
141
 
145
142
  Native WebGPU effects use WGSL. Custom authoring uses `edit-native-shader` with `define-definition`, `get-shader` to read the saved `executionHash`, `approve-definition` with that `expectedExecutionHash`, then `apply` with the exact definition ID/version. Each edit requires `designId`, `fileId`, and the current `expectedVersionHash`. Re-read the file hash after each write. CPU schema validation does not compile GPU code, so verify the Design preview. Previously saved GLSL effects remain renderable and removable.
146
143
 
@@ -444,7 +441,7 @@ The table below covers the core ownable resources: designs, files, templates, ve
444
441
 
445
442
  A design project is a shell until it has content: `create-design` makes an empty row (`data: "{}"`), then `generate-design` writes the actual standalone HTML/JSX files. The generated artifact, the editable source, and every export all come from the same HTML, so there is no separate "AI mockup" format to translate. A linked design system supplies tokens and `custom_instructions` that the agent honors on every generation pass.
446
443
 
447
- Seven more tables back features covered elsewhere in this page rather than the core resource model: `design_localhost_connections` and `design_localhost_write_grants` back the [Local app import](/docs/template-design-features#import), `component_index` backs the [Component section of the Design tab](/docs/template-design-features#design-tab), `motion_timeline` backs each element's editable motion timeline (the Motion dock in the editor), `design_state` holds named alternate states, static fixtures, and live-app captures for a design, `design_fusion_edits` backs the fusion edit queue described under [Full App Building](#full-app-building) above, and `design_review_snapshot` caches the accessibility findings and visual diff behind `get-design-review`, described under [Quality](#quality) above.
444
+ Six more tables back features covered elsewhere in this page rather than the core resource model: `design_localhost_connections` and `design_localhost_write_grants` back the [Local app import](/docs/template-design-features#import), `component_index` backs the [Component section of the Design tab](/docs/template-design-features#design-tab), `design_state` holds named alternate states, static fixtures, and live-app captures for a design, `design_fusion_edits` backs the fusion edit queue described under [Full App Building](#full-app-building) above, and `design_review_snapshot` caches the accessibility findings and visual diff behind `get-design-review`, described under [Quality](#quality) above.
448
445
 
449
446
  Persisted review comments and threads (`get-review-feedback`, `resolve-review-thread`, and the rest) are not a Design-specific table at all: they're the shared framework review system from `@agent-native/core/review` (`agent_review_comments` / `agent_review_statuses`), scoped to a design the same way any app can attach it. See [Comments tab](/docs/template-design-features#comments-tab) for the user-facing behavior.
450
447
 
@@ -0,0 +1,28 @@
1
+ # Workspace credential draft edits
2
+
3
+ `createWorkspaceCredentialActions` and `createWorkspaceCredentialService` accept the trusted server option `allowDraftEdits: true`. It is off by default. Enable it only when the app can reopen and activate its own disabled drafts.
4
+
5
+ With the option enabled, pass `draft: true` to `update` with the opened connection revision. The update stores the submitted configuration and credentials without provider validation, atomically marks the profile disabled, and keeps its grant and encrypted credentials. Disabled profiles cannot resolve credentials for app requests. The returned profile has `active: false`; its `workspaceCredentialDraft` config marker identifies it as an editable draft. Archive removes that marker, so an archived connection cannot be activated as a draft.
6
+
7
+ To activate, reopen the draft and pass its current revision with `draft: false`. The service validates the complete credential set before publishing the active status. A validation failure leaves the draft and its revision unchanged. An update that omits `draft` keeps the profile a draft and skips validation; only an explicit `draft: false` activates it. Omitted secret values retain their saved values. Unknown write outcomes require a fresh read rather than an automatic retry.
8
+
9
+ ```ts
10
+ const actions = createWorkspaceCredentialActions({
11
+ appId: "analytics-2",
12
+ provider,
13
+ validateCredentials,
14
+ allowDraftEdits: true,
15
+ });
16
+
17
+ await actions.update.run(
18
+ { connectionId, revision, draft: true, name },
19
+ context,
20
+ );
21
+ // Reopen the profile to get its latest revision before activation.
22
+ await actions.update.run(
23
+ { connectionId, revision: reopenedRevision, draft: false },
24
+ context,
25
+ );
26
+ ```
27
+
28
+ The app must apply its usual manager authorization and provide a form that distinguishes a disabled draft from an archived connection. Do not treat the draft marker as permission to query the provider.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.231.0",
3
+ "version": "0.232.0-nightly-20261118182504",
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": {
@@ -483,6 +483,7 @@
483
483
  "./connections/runtime": "./dist/connections/runtime.js",
484
484
  "./provider-api": "./dist/provider-api/index.js",
485
485
  "./provider-api/runtime": "./dist/provider-api/runtime.js",
486
+ "./provider-api/call-gates": "./dist/provider-api/call-gates.js",
486
487
  "./provider-api/gong": "./dist/provider-api/gong.js",
487
488
  "./provider-api/corpus-jobs": "./dist/provider-api/corpus-jobs.js",
488
489
  "./provider-api/corpus-jobs-store": "./dist/provider-api/corpus-jobs-store.js",
@@ -807,8 +808,8 @@
807
808
  "yaml": "^2.9.0",
808
809
  "yjs": "^13.6.33",
809
810
  "zod": "^4.3.6",
810
- "@agent-native/recap-cli": "^0.5.106",
811
- "@agent-native/agentkit": "^0.231.0"
811
+ "@agent-native/agentkit": "^0.232.0-nightly-20261118182504",
812
+ "@agent-native/recap-cli": "^0.5.106"
812
813
  },
813
814
  "devDependencies": {
814
815
  "@ai-sdk/anthropic": "^3.0.71",
@@ -881,7 +882,7 @@
881
882
  "xlsx": "^0.18.5"
882
883
  },
883
884
  "peerDependencies": {
884
- "@agent-native/core-corpus": ">=0.196.0",
885
+ "@agent-native/core-corpus": "0.232.0-nightly-20261118182504",
885
886
  "@ai-sdk/anthropic": ">=3",
886
887
  "@ai-sdk/cohere": ">=3",
887
888
  "@ai-sdk/google": ">=3",