@robota-sdk/agent-sdk 3.0.0-beta.47 → 3.0.0-beta.48

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.
@@ -2497,6 +2497,13 @@ var InteractiveSession = class {
2497
2497
  const state = { toolName: event.toolName, firstArg, isRunning: true };
2498
2498
  this.activeTools.push(state);
2499
2499
  this.emit("tool_start", state);
2500
+ this.history.push({
2501
+ id: (0, import_node_crypto.randomUUID)(),
2502
+ timestamp: /* @__PURE__ */ new Date(),
2503
+ category: "event",
2504
+ type: "tool-start",
2505
+ data: { toolName: event.toolName, firstArg, isRunning: true }
2506
+ });
2500
2507
  } else {
2501
2508
  const result = event.denied ? "denied" : event.success === false ? "error" : "success";
2502
2509
  const idx = this.activeTools.findIndex((t) => t.toolName === event.toolName && t.isRunning);
@@ -2505,6 +2512,18 @@ var InteractiveSession = class {
2505
2512
  this.activeTools[idx] = finished;
2506
2513
  this.trimCompletedTools();
2507
2514
  this.emit("tool_end", finished);
2515
+ this.history.push({
2516
+ id: (0, import_node_crypto.randomUUID)(),
2517
+ timestamp: /* @__PURE__ */ new Date(),
2518
+ category: "event",
2519
+ type: "tool-end",
2520
+ data: {
2521
+ toolName: finished.toolName,
2522
+ firstArg: finished.firstArg,
2523
+ isRunning: false,
2524
+ result
2525
+ }
2526
+ });
2508
2527
  }
2509
2528
  }
2510
2529
  }
@@ -2447,6 +2447,13 @@ var InteractiveSession = class {
2447
2447
  const state = { toolName: event.toolName, firstArg, isRunning: true };
2448
2448
  this.activeTools.push(state);
2449
2449
  this.emit("tool_start", state);
2450
+ this.history.push({
2451
+ id: randomUUID(),
2452
+ timestamp: /* @__PURE__ */ new Date(),
2453
+ category: "event",
2454
+ type: "tool-start",
2455
+ data: { toolName: event.toolName, firstArg, isRunning: true }
2456
+ });
2450
2457
  } else {
2451
2458
  const result = event.denied ? "denied" : event.success === false ? "error" : "success";
2452
2459
  const idx = this.activeTools.findIndex((t) => t.toolName === event.toolName && t.isRunning);
@@ -2455,6 +2462,18 @@ var InteractiveSession = class {
2455
2462
  this.activeTools[idx] = finished;
2456
2463
  this.trimCompletedTools();
2457
2464
  this.emit("tool_end", finished);
2465
+ this.history.push({
2466
+ id: randomUUID(),
2467
+ timestamp: /* @__PURE__ */ new Date(),
2468
+ category: "event",
2469
+ type: "tool-end",
2470
+ data: {
2471
+ toolName: finished.toolName,
2472
+ firstArg: finished.firstArg,
2473
+ isRunning: false,
2474
+ result
2475
+ }
2476
+ });
2458
2477
  }
2459
2478
  }
2460
2479
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robota-sdk/agent-sdk",
3
- "version": "3.0.0-beta.47",
3
+ "version": "3.0.0-beta.48",
4
4
  "description": "Programmatic SDK for building AI agents with Robota — provides Session, query(), built-in tools, permissions, hooks, and context loading",
5
5
  "type": "module",
6
6
  "main": "dist/node/index.js",
@@ -24,9 +24,9 @@
24
24
  "dependencies": {
25
25
  "chalk": "^5.3.0",
26
26
  "zod": "^3.24.0",
27
- "@robota-sdk/agent-core": "3.0.0-beta.47",
28
- "@robota-sdk/agent-tools": "3.0.0-beta.47",
29
- "@robota-sdk/agent-sessions": "3.0.0-beta.47"
27
+ "@robota-sdk/agent-core": "3.0.0-beta.48",
28
+ "@robota-sdk/agent-sessions": "3.0.0-beta.48",
29
+ "@robota-sdk/agent-tools": "3.0.0-beta.48"
30
30
  },
31
31
  "devDependencies": {
32
32
  "rimraf": "^5.0.5",