@agent-native/core 0.98.12 → 0.98.13

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.
@@ -1,5 +1,11 @@
1
1
  # @agent-native/core
2
2
 
3
+ ## 0.98.13
4
+
5
+ ### Patch Changes
6
+
7
+ - c61d923: Keep delegated A2A and MCP agent turns explicitly bound to the authenticated owner/org scope and Act execution mode.
8
+
3
9
  ## 0.98.12
4
10
 
5
11
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.98.12",
3
+ "version": "0.98.13",
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": {
@@ -1371,6 +1371,13 @@ export function createAgentChatPlugin(
1371
1371
  availableTools: a2aToolSurface.availableTools,
1372
1372
  messages: a2aMessages,
1373
1373
  actions: a2aActions,
1374
+ // A2A already establishes these values in request context. Pass
1375
+ // them explicitly too so delegated tool execution and template
1376
+ // final-response guards cannot lose the authenticated caller's
1377
+ // scope when a processor hop or alternate runner is involved.
1378
+ ownerEmail: userEmail,
1379
+ orgId: getRequestOrgId() ?? null,
1380
+ executionMode: "act",
1374
1381
  send: (event) => {
1375
1382
  a2aEvents.push(event);
1376
1383
  if (event.type === "tool_start") {
@@ -1640,6 +1647,9 @@ export function createAgentChatPlugin(
1640
1647
  },
1641
1648
  ],
1642
1649
  actions: mcpActions,
1650
+ ownerEmail: getRequestUserEmail(),
1651
+ orgId: getRequestOrgId() ?? null,
1652
+ executionMode: "act",
1643
1653
  send: (event) => {
1644
1654
  accumulatedText = applyAgentTextEventToBuffer(
1645
1655
  accumulatedText,
@@ -15,7 +15,7 @@ export declare function createProgressHandler(): import("h3").EventHandlerWithFe
15
15
  error: string;
16
16
  ok?: undefined;
17
17
  } | {
18
- error?: undefined;
19
18
  ok: boolean;
19
+ error?: undefined;
20
20
  }>>;
21
21
  //# sourceMappingURL=routes.d.ts.map
@@ -49,8 +49,8 @@ export declare function handleUpdateResource(event: any): Promise<import("./stor
49
49
  }>;
50
50
  /** DELETE /_agent-native/resources/:id — delete a resource */
51
51
  export declare function handleDeleteResource(event: any): Promise<{
52
- ok?: undefined;
53
52
  error: string;
53
+ ok?: undefined;
54
54
  } | {
55
55
  error?: undefined;
56
56
  ok: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"agent-chat-plugin.d.ts","sourceRoot":"","sources":["../../src/server/agent-chat-plugin.ts"],"names":[],"mappings":"AAyIA,OAAO,EACL,yBAAyB,EACzB,KAAK,6BAA6B,EACnC,MAAM,+BAA+B,CAAC;AAoCvC,OAAO,EAAE,yBAAyB,EAAE,CAAC;AACrC,YAAY,EAAE,6BAA6B,EAAE,CAAC;AAmB9C,OAAO,EACL,0BAA0B,EAK1B,eAAe,EACf,eAAe,EACf,wBAAwB,EACxB,yBAAyB,EAE1B,MAAM,oCAAoC,CAAC;AAW5C,OAAO,EACL,gCAAgC,EAOjC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,yCAAyC,EAAE,MAAM,qCAAqC,CAAC;AAChG,OAAO,EACL,sBAAsB,EAEvB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAEL,sCAAsC,EACvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAYxE,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,OAAO,EAAE,gCAAgC,EAAE,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,CAAC;AACpC,YAAY,EAAE,sBAAsB,EAAE,CAAC;AACvC,OAAO,EAAE,eAAe,EAA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C;AAC1C,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAEL,sCAAsC,EACvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAYxE,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,OAAO,EAAE,gCAAgC,EAAE,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,CAAC;AACpC,YAAY,EAAE,sBAAsB,EAAE,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,OAAO,EAAE,0BAA0B,EAAE,CAAC;AACtC,OAAO,EAAE,sCAAsC,EAAE,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,OAAO,EAAE,iCAAiC,EAAE,CAAC;AAC7C,OAAO,EAAE,yCAAyC,EAAE,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,uCAAuC,CAC3D,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,OAAO,CAAC,CAUlB;AAaD,wBAAgB,qBAAqB,CACnC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,cAAc,CAi6JhB;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,cAAwC,CAAC;AAE9E,OAAO,EAEL,mBAAmB,EACnB,uBAAuB,EAGxB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -1044,6 +1044,13 @@ export function createAgentChatPlugin(options) {
1044
1044
  availableTools: a2aToolSurface.availableTools,
1045
1045
  messages: a2aMessages,
1046
1046
  actions: a2aActions,
1047
+ // A2A already establishes these values in request context. Pass
1048
+ // them explicitly too so delegated tool execution and template
1049
+ // final-response guards cannot lose the authenticated caller's
1050
+ // scope when a processor hop or alternate runner is involved.
1051
+ ownerEmail: userEmail,
1052
+ orgId: getRequestOrgId() ?? null,
1053
+ executionMode: "act",
1047
1054
  send: (event) => {
1048
1055
  a2aEvents.push(event);
1049
1056
  if (event.type === "tool_start") {
@@ -1266,6 +1273,9 @@ export function createAgentChatPlugin(options) {
1266
1273
  },
1267
1274
  ],
1268
1275
  actions: mcpActions,
1276
+ ownerEmail: getRequestUserEmail(),
1277
+ orgId: getRequestOrgId() ?? null,
1278
+ executionMode: "act",
1269
1279
  send: (event) => {
1270
1280
  accumulatedText = applyAgentTextEventToBuffer(accumulatedText, event);
1271
1281
  },