@poncho-ai/sdk 0.2.1 → 0.4.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @poncho-ai/sdk@0.2.1 build /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
2
+ > @poncho-ai/sdk@0.4.0 build /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
3
3
  > tsup src/index.ts --format esm --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,7 +8,7 @@
8
8
  CLI Target: es2022
9
9
  ESM Build start
10
10
  ESM dist/index.js 5.65 KB
11
- ESM ⚡️ Build success in 56ms
11
+ ESM ⚡️ Build success in 69ms
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 1022ms
14
- DTS dist/index.d.ts 11.65 KB
13
+ DTS ⚡️ Build success in 1222ms
14
+ DTS dist/index.d.ts 11.76 KB
package/dist/index.d.ts CHANGED
@@ -297,6 +297,7 @@ interface ToolContext {
297
297
  step: number;
298
298
  workingDir: string;
299
299
  parameters: Record<string, unknown>;
300
+ abortSignal?: AbortSignal;
300
301
  }
301
302
  type ToolHandler<TInput extends Record<string, unknown>, TOutput> = (input: TInput, context: ToolContext) => Promise<TOutput> | TOutput;
302
303
  interface ToolDefinition<TInput extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown> {
@@ -315,6 +316,7 @@ interface RunInput {
315
316
  task: string;
316
317
  parameters?: Record<string, unknown>;
317
318
  messages?: Message[];
319
+ abortSignal?: AbortSignal;
318
320
  }
319
321
  interface TokenUsage {
320
322
  input: number;
@@ -341,6 +343,9 @@ type AgentEvent = {
341
343
  type: "run:completed";
342
344
  runId: string;
343
345
  result: RunResult;
346
+ } | {
347
+ type: "run:cancelled";
348
+ runId: string;
344
349
  } | {
345
350
  type: "run:error";
346
351
  runId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poncho-ai/sdk",
3
- "version": "0.2.1",
3
+ "version": "0.4.0",
4
4
  "description": "Core types and utilities for building Poncho skills",
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -30,6 +30,7 @@ export interface ToolContext {
30
30
  step: number;
31
31
  workingDir: string;
32
32
  parameters: Record<string, unknown>;
33
+ abortSignal?: AbortSignal;
33
34
  }
34
35
 
35
36
  export type ToolHandler<TInput extends Record<string, unknown>, TOutput> = (
@@ -64,6 +65,7 @@ export interface RunInput {
64
65
  task: string;
65
66
  parameters?: Record<string, unknown>;
66
67
  messages?: Message[];
68
+ abortSignal?: AbortSignal;
67
69
  }
68
70
 
69
71
  export interface TokenUsage {
@@ -89,6 +91,7 @@ export interface AgentFailure {
89
91
  export type AgentEvent =
90
92
  | { type: "run:started"; runId: string; agentId: string }
91
93
  | { type: "run:completed"; runId: string; result: RunResult }
94
+ | { type: "run:cancelled"; runId: string }
92
95
  | { type: "run:error"; runId: string; error: AgentFailure }
93
96
  | { type: "step:started"; step: number }
94
97
  | { type: "step:completed"; step: number; duration: number }