@openvole/paw-sdk 3.1.0 → 3.2.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 (2) hide show
  1. package/dist/index.d.ts +24 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -2,6 +2,18 @@ import { ZodSchema } from 'zod';
2
2
  export { z } from 'zod';
3
3
 
4
4
  /** Agent context passed to hooks and the Brain */
5
+ /** Per-call context the host may pass to an in-process tool. Mirrors core's ToolContext. */
6
+ interface PawToolContext {
7
+ project?: {
8
+ id: string;
9
+ name: string;
10
+ kind: string;
11
+ /** Absolute external root, or undefined for a self-contained project. */
12
+ root?: string;
13
+ /** Absolute path of the project's own folder in the workspace. */
14
+ dir: string;
15
+ };
16
+ }
5
17
  interface AgentContext {
6
18
  taskId: string;
7
19
  messages: AgentMessage[];
@@ -39,6 +51,13 @@ interface ActiveSkill {
39
51
  }
40
52
  /** Result of a tool execution */
41
53
  interface ActionResult {
54
+ /**
55
+ * The conversation this result belongs to, when the run is a turn in one. Absent for a run
56
+ * with no conversation (a heartbeat, a task started from the board) — a paw recording results
57
+ * should skip those rather than fall back to a remembered "current session", which answers
58
+ * for whichever task bootstrapped last. Added in core 4.17.0; undefined on older cores.
59
+ */
60
+ sessionId?: string;
42
61
  toolName: string;
43
62
  pawName: string;
44
63
  success: boolean;
@@ -73,7 +92,11 @@ interface ToolDefinition {
73
92
  name: string;
74
93
  description: string;
75
94
  parameters: ZodSchema;
76
- execute: (params: unknown) => Promise<unknown>;
95
+ /**
96
+ * `ctx` is passed only to tools running in the host process. Over the IPC boundary a paw
97
+ * receives params alone, so treat it as absent unless your paw is in-process.
98
+ */
99
+ execute: (params: unknown, ctx?: PawToolContext) => Promise<unknown>;
77
100
  }
78
101
  /** Bootstrap hook — called once when a task starts */
79
102
  type BootstrapHook = (context: AgentContext) => Promise<AgentContext>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openvole/paw-sdk",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "SDK for building OpenVole Paws — tool providers for the agent loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",