@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @poncho-ai/sdk@1.1.0 build /home/runner/work/poncho-ai/poncho-ai/packages/sdk
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
  CLI Building entry: src/index.ts
@@ -10,5 +10,5 @@
10
10
  ESM dist/index.js 10.17 KB
11
11
  ESM ⚡️ Build success in 18ms
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 1221ms
14
- DTS dist/index.d.ts 19.05 KB
13
+ DTS ⚡️ Build success in 1214ms
14
+ DTS dist/index.d.ts 19.67 KB
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poncho-ai/sdk",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Core types and utilities for building Poncho skills",
5
5
  "repository": {
6
6
  "type": "git",
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
  };