@agent-native/core 0.212.1 → 0.214.0

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 (107) hide show
  1. package/dist/a2a/anthropic-managed-agents.js +1 -0
  2. package/dist/a2a/caller-auth.js +7 -2
  3. package/dist/a2a/client.d.ts +1 -0
  4. package/dist/a2a/client.js +27 -0
  5. package/dist/a2a/handlers.js +15 -3
  6. package/dist/a2a/organization-identity.d.ts +4 -1
  7. package/dist/a2a/organization-identity.js +3 -1
  8. package/dist/a2a/server.d.ts +6 -5
  9. package/dist/a2a/server.js +79 -6
  10. package/dist/a2a-claims.d.ts +1 -0
  11. package/dist/a2a-claims.js +1 -0
  12. package/dist/agent/actions/manage-provider-key-policy.js +4 -2
  13. package/dist/agent/app-model-defaults.js +2 -10
  14. package/dist/agent/loop-settings.js +2 -10
  15. package/dist/appearance/actions/get-theme-family.d.ts +8 -0
  16. package/dist/appearance/actions/get-theme-family.js +38 -0
  17. package/dist/appearance/actions/set-theme-family.d.ts +7 -0
  18. package/dist/appearance/actions/set-theme-family.js +33 -0
  19. package/dist/appearance/theme-family.d.ts +13 -0
  20. package/dist/appearance/theme-family.js +38 -0
  21. package/dist/audit/actions/export-audit-events.js +1 -0
  22. package/dist/audit/attribution.d.ts +5 -4
  23. package/dist/audit/attribution.js +2 -1
  24. package/dist/audit/index.d.ts +1 -1
  25. package/dist/audit/ocsf.js +1 -0
  26. package/dist/audit/read-scope.js +2 -12
  27. package/dist/audit/record.js +1 -0
  28. package/dist/audit/store.js +12 -3
  29. package/dist/audit/types.d.ts +4 -0
  30. package/dist/automation/index.d.ts +1 -1
  31. package/dist/automations/service.js +3 -10
  32. package/dist/client/org/hooks.d.ts +3 -0
  33. package/dist/client/org/hooks.js +12 -0
  34. package/dist/client/theme-family.d.ts +35 -0
  35. package/dist/client/theme-family.js +223 -0
  36. package/dist/client/theme.d.ts +1 -1
  37. package/dist/client/theme.js +5 -2
  38. package/dist/client/ui/index.d.ts +1 -0
  39. package/dist/client/ui/index.js +1 -0
  40. package/dist/collab/awareness.d.ts +2 -2
  41. package/dist/collab/routes.d.ts +2 -2
  42. package/dist/collab/struct-routes.d.ts +1 -1
  43. package/dist/connections/catalog.d.ts +1 -1
  44. package/dist/connections/catalog.js +7 -1
  45. package/dist/credentials/index.js +18 -2
  46. package/dist/data-widgets/index.d.ts +339 -4
  47. package/dist/data-widgets/index.js +150 -7
  48. package/dist/db/schema-snapshot.generated.js +5 -2
  49. package/dist/feature-flags/a2a-action-route.js +1 -0
  50. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  51. package/dist/file-upload/storage-settings.js +2 -9
  52. package/dist/framework-tools.js +2 -0
  53. package/dist/jobs/actions/manage-recurring-job.d.ts +1 -1
  54. package/dist/jobs/tools.js +2 -12
  55. package/dist/mcp/actions/service-token-access.js +15 -11
  56. package/dist/mcp/credential-issuance.js +9 -2
  57. package/dist/notifications/routes.d.ts +3 -3
  58. package/dist/observability/routes.d.ts +1 -1
  59. package/dist/org/actions.d.ts +1 -1
  60. package/dist/org/actions.js +3 -7
  61. package/dist/org/app-roles.js +10 -1
  62. package/dist/org/context.d.ts +1 -0
  63. package/dist/org/context.js +122 -24
  64. package/dist/org/federation.d.ts +1 -1
  65. package/dist/org/federation.js +2 -2
  66. package/dist/org/handlers.d.ts +4 -0
  67. package/dist/org/handlers.js +140 -44
  68. package/dist/org/index.d.ts +2 -1
  69. package/dist/org/membership.d.ts +6 -4
  70. package/dist/org/membership.js +7 -5
  71. package/dist/org/migrations.js +6 -0
  72. package/dist/org/plugin.d.ts +1 -0
  73. package/dist/org/plugin.js +9 -1
  74. package/dist/org/private-icon-handlers.js +4 -10
  75. package/dist/org/types.d.ts +2 -0
  76. package/dist/org/workspace-app-access.js +62 -14
  77. package/dist/progress/routes.d.ts +1 -1
  78. package/dist/provider-api/actions/custom-provider-registration.d.ts +11 -11
  79. package/dist/provider-api/actions/provider-api.d.ts +11 -11
  80. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  81. package/dist/secrets/routes.d.ts +6 -6
  82. package/dist/server/action-discovery.js +8 -0
  83. package/dist/server/action-routes.d.ts +1 -0
  84. package/dist/server/action-routes.js +13 -1
  85. package/dist/server/agent-chat/context-tools.js +43 -1
  86. package/dist/server/agent-chat/prompt-resources.js +1 -1
  87. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  88. package/dist/server/agent-engine-default-model-route.d.ts +1 -1
  89. package/dist/server/agent-engine-ollama-models-route.d.ts +1 -1
  90. package/dist/server/index.d.ts +1 -0
  91. package/dist/server/index.js +1 -0
  92. package/dist/server/org-admin.js +3 -2
  93. package/dist/server/personal-provider-key-holders.d.ts +1 -1
  94. package/dist/server/personal-provider-key-holders.js +7 -2
  95. package/dist/server/personal-provider-key-policy.d.ts +2 -0
  96. package/dist/server/personal-provider-key-policy.js +21 -5
  97. package/dist/server/request-context.d.ts +2 -0
  98. package/dist/server/request-context.js +7 -0
  99. package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +16 -13
  100. package/dist/triggers/actions/manage-automation.d.ts +4 -4
  101. package/dist/triggers/routes.js +2 -9
  102. package/dist/usage/alerts-store.js +2 -9
  103. package/dist/usage/metrics-store.js +2 -9
  104. package/dist/workspace-connections/actions/list-workspace-user-groups.d.ts +1 -1
  105. package/dist/workspace-connections/groups.js +2 -11
  106. package/package.json +3 -3
  107. package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +16 -13
@@ -1,10 +1,10 @@
1
1
  declare const _default: import("../../action.js").ActionDefinition<Record<string, never>, {
2
- memberEmails: any[];
3
2
  id: string;
4
3
  orgId: string;
5
4
  name: string;
6
5
  createdByEmail: string;
7
6
  createdAt: string;
8
7
  updatedAt: string;
8
+ memberEmails: any[];
9
9
  }[]>;
10
10
  export default _default;
@@ -4,6 +4,7 @@ import { ensureIndexExists, ensureTableExists } from "../db/ddl-guard.js";
4
4
  import { defineStore } from "../db/store-registry.js";
5
5
  import { fromMigrationEntries } from "../db/versioned-store-migrations.js";
6
6
  import { isOrgMember } from "../org/membership.js";
7
+ import { readOrgMemberRole } from "../server/personal-provider-key-policy.js";
7
8
  import { getRequestOrgId, getRequestUserEmail, } from "../server/request-context.js";
8
9
  import { WORKSPACE_CONNECTIONS_MIGRATIONS, WORKSPACE_CONNECTIONS_MIGRATIONS_TABLE, } from "./migrations.js";
9
10
  export function workspaceUserGroupsTable() {
@@ -216,17 +217,7 @@ export async function workspaceUserGroupRole(orgId, userEmail) {
216
217
  if (!normalizedOrgId || !normalizedEmail) {
217
218
  return null;
218
219
  }
219
- const { rows } = await getDbExec().execute({
220
- sql: `SELECT role FROM org_members
221
- WHERE org_id = ? AND LOWER(email) = ?
222
- AND federation_removal_pending_at IS NULL
223
- LIMIT 1`,
224
- args: [normalizedOrgId, normalizedEmail],
225
- });
226
- const role = String(rows[0]?.role ?? "");
227
- return role === "owner" || role === "admin" || role === "member"
228
- ? role
229
- : null;
220
+ return readOrgMemberRole(normalizedOrgId, normalizedEmail);
230
221
  }
231
222
  export async function upsertWorkspaceUserGroup(input) {
232
223
  const requestScope = requireWorkspaceUserGroupScope();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.212.1",
3
+ "version": "0.214.0",
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": {
@@ -727,8 +727,8 @@
727
727
  "yaml": "^2.9.0",
728
728
  "yjs": "^13.6.33",
729
729
  "zod": "^4.3.6",
730
- "@agent-native/agentkit": "^0.212.1",
731
- "@agent-native/recap-cli": "^0.5.80"
730
+ "@agent-native/agentkit": "^0.214.0",
731
+ "@agent-native/recap-cli": "^0.5.83"
732
732
  },
733
733
  "devDependencies": {
734
734
  "@ai-sdk/anthropic": "^3.0.71",
@@ -144,14 +144,17 @@ The framework supports two credential scopes:
144
144
  | Secret | Scope | How it is set |
145
145
  | --- | --- | --- |
146
146
  | `A2A_SECRET` | User identity across a deployment | env var, **never auto-generated** |
147
- | org `a2a_secret` | Organization principal only | auto-generated on org creation; Team page UI |
147
+ | org `a2a_secret` | Organization principal, with optional current-member delegation | auto-generated on org creation; Team page UI |
148
148
 
149
- An org-secret JWT proves only that the caller holds the organization's shared
150
- credential. Its `sub` or email claims are ignored; do not use it to read
149
+ An ordinary org-secret JWT proves only that the caller holds the organization's
150
+ shared credential. Its `sub` or email claims are ignored; do not use it to read
151
151
  person-owned data, claim a user's task, invoke a user-scoped action, or carry a
152
- human approval. Organization-scoped operations can run with this principal.
153
- Use an `A2A_SECRET`-signed user identity for user-owned operations and
154
- approval continuations. MCP applies the same distinction.
152
+ human approval. A separate `agent-native-org-member-delegation` assertion may
153
+ carry the identity of any current receiver-org member to a caller holding that
154
+ shared secret, but only when the receiver's owner enables the setting, the org
155
+ secret differs from `A2A_SECRET`, and the audience and short expiry verify. The
156
+ receiver checks the live roster, and delegated org actions are always capped at
157
+ `member`. MCP requests remain organization-scoped.
155
158
 
156
159
  Organization IDs are local to each app's database. For calls to a peer app,
157
160
  bind the token to the trusted `org_domain` and the peer's canonical audience;
@@ -161,16 +164,16 @@ ID. An ID-only token is valid only when both sides intentionally share the same
161
164
  local organization ID, such as a credential scoped to one local database.
162
165
 
163
166
  The org secret is managed at **Team page → A2A secret** (owner only), where it
164
- can be revealed, copied, regenerated, and pushed to discovered peers. It is a
165
- fallback for organization-scoped calls, not a fallback user identity.
167
+ can be revealed, copied, regenerated, and pushed to discovered peers. Its
168
+ member-identity delegation setting is owner-only and defaults off.
166
169
 
167
170
  `A2A_SECRET` is the deploy-level path. `workspace-deploy` refuses a production
168
171
  workspace deploy without it and prints the generator command. Peers that must
169
- trust user identity assertions need the *same* value on both sides. Keep it
170
- different from every org `a2a_secret`; a shared value cannot distinguish a
171
- user assertion from an organization credential. An org secret equal to
172
- `A2A_SECRET`, or a user token signed only with the org secret, is verified as an
173
- organization principal and reaches the caller as the typed
172
+ trust deployment-secret user assertions need the *same* value on both sides.
173
+ Keep it different from every org `a2a_secret`; a shared value cannot
174
+ distinguish a deployment user assertion from an organization credential. An
175
+ org secret equal to `A2A_SECRET` is verified as an organization principal and
176
+ reaches the caller as the typed
174
177
  `permanent_precondition` error ("no verified user"): an admin/ops fix, never a
175
178
  retry. Mismatched `A2A_SECRET` values are rejected with `401`
176
179
  (`a2a_auth_rejected`).