@mast-ai/core 0.5.0 → 0.6.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.
@@ -13,6 +13,12 @@ export interface UrpToolCall {
13
13
  id: string;
14
14
  name: string;
15
15
  arguments: unknown;
16
+ /**
17
+ * Opaque per-call metadata controlled by the server (e.g. Gemini
18
+ * `thoughtSignature`). Round-tripped unchanged on the matching
19
+ * `tool_result` message in the next turn.
20
+ */
21
+ provider_metadata?: unknown;
16
22
  }
17
23
  /** Wire format for a non-streaming URP response. */
18
24
  export interface UrpResponse {
@@ -40,6 +40,7 @@ export class UrpAdapter {
40
40
  id: tc.id,
41
41
  name: tc.name,
42
42
  args: tc.arguments,
43
+ provider_metadata: tc.provider_metadata,
43
44
  }))
44
45
  : [],
45
46
  };
@@ -72,6 +73,7 @@ export class UrpAdapter {
72
73
  id: chunk.tool_call.id,
73
74
  name: chunk.tool_call.name,
74
75
  args: chunk.tool_call.arguments,
76
+ provider_metadata: chunk.tool_call.provider_metadata,
75
77
  },
76
78
  };
77
79
  }
package/dist/runner.js CHANGED
@@ -236,7 +236,13 @@ export class AgentRunner {
236
236
  }
237
237
  resultMessages.push({
238
238
  role: 'user',
239
- content: { type: 'tool_result', id: call.id, name: call.name, result },
239
+ content: {
240
+ type: 'tool_result',
241
+ id: call.id,
242
+ name: call.name,
243
+ result,
244
+ provider_metadata: call.provider_metadata,
245
+ },
240
246
  });
241
247
  }
242
248
  // Assistant tool_calls message must precede tool result messages in history.
package/dist/types.d.ts CHANGED
@@ -9,6 +9,13 @@ export interface ToolCall {
9
9
  id: string;
10
10
  name: string;
11
11
  args: unknown;
12
+ /**
13
+ * Opaque per-call metadata controlled by the adapter / backend
14
+ * (e.g. Gemini `thoughtSignature`). MAST round-trips this value
15
+ * unchanged on the matching `tool_result`; it has no schema and
16
+ * is never inspected by the runner.
17
+ */
18
+ provider_metadata?: unknown;
12
19
  }
13
20
  /**
14
21
  * Discriminated union of possible message content types.
@@ -24,6 +31,8 @@ export type MessageContent = {
24
31
  id: string;
25
32
  name: string;
26
33
  result: unknown;
34
+ /** Copied verbatim from the originating tool call. */
35
+ provider_metadata?: unknown;
27
36
  };
28
37
  /**
29
38
  * A single message in a conversation history.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mast-ai/core",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",