@poncho-ai/sdk 0.3.0 → 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.
- package/.turbo/turbo-build.log +4 -4
- package/dist/index.d.ts +5 -0
- package/package.json +1 -1
- package/src/index.ts +3 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/sdk@0.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
[34mCLI[39m Target: es2022
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[32mESM[39m [1mdist/index.js [22m[32m5.65 KB[39m
|
|
11
|
-
[32mESM[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m ⚡️ Build success in 69ms
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
|
-
[32mDTS[39m ⚡️ Build success in
|
|
14
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m11.
|
|
13
|
+
[32mDTS[39m ⚡️ Build success in 1222ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m11.76 KB[39m
|
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
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 }
|