@poncho-ai/sdk 1.1.0 → 1.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.
- package/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +12 -0
- package/dist/index.d.ts +27 -0
- package/package.json +1 -1
- package/src/index.ts +14 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/sdk@1.
|
|
2
|
+
> @poncho-ai/sdk@1.2.0 build /home/runner/work/poncho-ai/poncho-ai/packages/sdk
|
|
3
3
|
> tsup src/index.ts --format esm --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
[32mESM[39m [1mdist/index.js [22m[32m10.17 KB[39m
|
|
11
11
|
[32mESM[39m ⚡️ Build success in 18ms
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
|
-
[32mDTS[39m ⚡️ Build success in
|
|
14
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m19.
|
|
13
|
+
[32mDTS[39m ⚡️ Build success in 1214ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m19.67 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @poncho-ai/sdk
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#16](https://github.com/cesr/poncho-ai/pull/16) [`972577d`](https://github.com/cesr/poncho-ai/commit/972577d255ab43c2c56f3c3464042a8a617b7f9e) Thanks [@cesr](https://github.com/cesr)! - Add subagent support: agents can spawn recursive copies of themselves as independent sub-conversations with blocking tool calls, read-only memory, approval tunneling to the parent thread, and nested sidebar display in the web UI. Also adds ConversationStore.listSummaries() for fast sidebar loading without reading full conversation files from disk.
|
|
8
|
+
|
|
9
|
+
## 1.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Fix browser session reconnection, tab lifecycle management, and web UI panel state handling.
|
|
14
|
+
|
|
3
15
|
## 1.1.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -490,6 +490,7 @@ interface ToolContext {
|
|
|
490
490
|
workingDir: string;
|
|
491
491
|
parameters: Record<string, unknown>;
|
|
492
492
|
abortSignal?: AbortSignal;
|
|
493
|
+
conversationId?: string;
|
|
493
494
|
}
|
|
494
495
|
type ToolHandler<TInput extends Record<string, unknown>, TOutput> = (input: TInput, context: ToolContext) => Promise<TOutput> | TOutput;
|
|
495
496
|
interface ToolDefinition<TInput extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown> {
|
|
@@ -579,6 +580,7 @@ type AgentEvent = {
|
|
|
579
580
|
tool: string;
|
|
580
581
|
output: unknown;
|
|
581
582
|
duration: number;
|
|
583
|
+
outputTokenEstimate?: number;
|
|
582
584
|
} | {
|
|
583
585
|
type: "tool:error";
|
|
584
586
|
tool: string;
|
|
@@ -618,6 +620,31 @@ type AgentEvent = {
|
|
|
618
620
|
active: boolean;
|
|
619
621
|
url?: string;
|
|
620
622
|
interactionAllowed: boolean;
|
|
623
|
+
} | {
|
|
624
|
+
type: "subagent:spawned";
|
|
625
|
+
subagentId: string;
|
|
626
|
+
conversationId: string;
|
|
627
|
+
task: string;
|
|
628
|
+
} | {
|
|
629
|
+
type: "subagent:completed";
|
|
630
|
+
subagentId: string;
|
|
631
|
+
conversationId: string;
|
|
632
|
+
} | {
|
|
633
|
+
type: "subagent:error";
|
|
634
|
+
subagentId: string;
|
|
635
|
+
conversationId: string;
|
|
636
|
+
error: string;
|
|
637
|
+
} | {
|
|
638
|
+
type: "subagent:stopped";
|
|
639
|
+
subagentId: string;
|
|
640
|
+
conversationId: string;
|
|
641
|
+
} | {
|
|
642
|
+
type: "subagent:approval_needed";
|
|
643
|
+
subagentId: string;
|
|
644
|
+
conversationId: string;
|
|
645
|
+
tool: string;
|
|
646
|
+
approvalId: string;
|
|
647
|
+
input?: Record<string, unknown>;
|
|
621
648
|
};
|
|
622
649
|
|
|
623
650
|
export { type AgentEvent, type AgentFailure, type ContentPart, FEATURE_DOMAIN_ORDER, type FeatureDomain, type FileContentPart, type FileInput, type JsonSchema, type Message, ONBOARDING_FIELDS, type OnboardingField, type OnboardingFieldCondition, type OnboardingFieldKind, type OnboardingFieldTarget, type OnboardingOption, type OnboardingScope, type Role, type RunInput, type RunResult, type TextContentPart, type TokenUsage, type ToolContext, type ToolDefinition, type ToolHandler, defineTool, fieldsForScope, getTextContent };
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -55,6 +55,7 @@ export interface ToolContext {
|
|
|
55
55
|
workingDir: string;
|
|
56
56
|
parameters: Record<string, unknown>;
|
|
57
57
|
abortSignal?: AbortSignal;
|
|
58
|
+
conversationId?: string;
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
export type ToolHandler<TInput extends Record<string, unknown>, TOutput> = (
|
|
@@ -135,7 +136,7 @@ export type AgentEvent =
|
|
|
135
136
|
| { type: "model:chunk"; content: string }
|
|
136
137
|
| { type: "model:response"; usage: TokenUsage }
|
|
137
138
|
| { type: "tool:started"; tool: string; input: unknown }
|
|
138
|
-
| { type: "tool:completed"; tool: string; output: unknown; duration: number }
|
|
139
|
+
| { type: "tool:completed"; tool: string; output: unknown; duration: number; outputTokenEstimate?: number }
|
|
139
140
|
| { type: "tool:error"; tool: string; error: string; recoverable: boolean }
|
|
140
141
|
| {
|
|
141
142
|
type: "tool:approval:required";
|
|
@@ -160,4 +161,16 @@ export type AgentEvent =
|
|
|
160
161
|
active: boolean;
|
|
161
162
|
url?: string;
|
|
162
163
|
interactionAllowed: boolean;
|
|
164
|
+
}
|
|
165
|
+
| { type: "subagent:spawned"; subagentId: string; conversationId: string; task: string }
|
|
166
|
+
| { type: "subagent:completed"; subagentId: string; conversationId: string }
|
|
167
|
+
| { type: "subagent:error"; subagentId: string; conversationId: string; error: string }
|
|
168
|
+
| { type: "subagent:stopped"; subagentId: string; conversationId: string }
|
|
169
|
+
| {
|
|
170
|
+
type: "subagent:approval_needed";
|
|
171
|
+
subagentId: string;
|
|
172
|
+
conversationId: string;
|
|
173
|
+
tool: string;
|
|
174
|
+
approvalId: string;
|
|
175
|
+
input?: Record<string, unknown>;
|
|
163
176
|
};
|