@poncho-ai/sdk 1.1.1 → 1.3.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.1 build /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
2
+ > @poncho-ai/sdk@1.3.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
@@ -8,7 +8,7 @@
8
8
  CLI Target: es2022
9
9
  ESM Build start
10
10
  ESM dist/index.js 10.17 KB
11
- ESM ⚡️ Build success in 90ms
11
+ ESM ⚡️ Build success in 23ms
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 1295ms
14
- DTS dist/index.d.ts 19.05 KB
13
+ DTS ⚡️ Build success in 1272ms
14
+ DTS dist/index.d.ts 19.74 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @poncho-ai/sdk
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`cd6ccd7`](https://github.com/cesr/poncho-ai/commit/cd6ccd7846e16fbaf17167617666796320ec29ce) Thanks [@cesr](https://github.com/cesr)! - Add MCP custom headers support, tool:generating streaming feedback, and cross-owner subagent recovery
8
+ - **MCP custom headers**: `poncho mcp add --header "Name: value"` and `headers` config field let servers like Arcade receive extra HTTP headers alongside bearer auth.
9
+ - **tool:generating event**: the harness now emits `tool:generating` events when the model begins writing tool-call arguments, so the web UI shows real-time "preparing <tool>" feedback instead of appearing stuck during large tool calls.
10
+ - **Subagent recovery**: `list`/`listSummaries` accept optional `ownerId` so stale-subagent recovery on server restart scans across all owners.
11
+
12
+ ## 1.2.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#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.
17
+
3
18
  ## 1.1.1
4
19
 
5
20
  ### Patch 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> {
@@ -570,6 +571,10 @@ type AgentEvent = {
570
571
  } | {
571
572
  type: "model:response";
572
573
  usage: TokenUsage;
574
+ } | {
575
+ type: "tool:generating";
576
+ tool: string;
577
+ toolCallId: string;
573
578
  } | {
574
579
  type: "tool:started";
575
580
  tool: string;
@@ -579,6 +584,7 @@ type AgentEvent = {
579
584
  tool: string;
580
585
  output: unknown;
581
586
  duration: number;
587
+ outputTokenEstimate?: number;
582
588
  } | {
583
589
  type: "tool:error";
584
590
  tool: string;
@@ -618,6 +624,31 @@ type AgentEvent = {
618
624
  active: boolean;
619
625
  url?: string;
620
626
  interactionAllowed: boolean;
627
+ } | {
628
+ type: "subagent:spawned";
629
+ subagentId: string;
630
+ conversationId: string;
631
+ task: string;
632
+ } | {
633
+ type: "subagent:completed";
634
+ subagentId: string;
635
+ conversationId: string;
636
+ } | {
637
+ type: "subagent:error";
638
+ subagentId: string;
639
+ conversationId: string;
640
+ error: string;
641
+ } | {
642
+ type: "subagent:stopped";
643
+ subagentId: string;
644
+ conversationId: string;
645
+ } | {
646
+ type: "subagent:approval_needed";
647
+ subagentId: string;
648
+ conversationId: string;
649
+ tool: string;
650
+ approvalId: string;
651
+ input?: Record<string, unknown>;
621
652
  };
622
653
 
623
654
  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.1",
3
+ "version": "1.3.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> = (
@@ -134,8 +135,9 @@ export type AgentEvent =
134
135
  | { type: "model:request"; tokens: number }
135
136
  | { type: "model:chunk"; content: string }
136
137
  | { type: "model:response"; usage: TokenUsage }
138
+ | { type: "tool:generating"; tool: string; toolCallId: string }
137
139
  | { type: "tool:started"; tool: string; input: unknown }
138
- | { type: "tool:completed"; tool: string; output: unknown; duration: number }
140
+ | { type: "tool:completed"; tool: string; output: unknown; duration: number; outputTokenEstimate?: number }
139
141
  | { type: "tool:error"; tool: string; error: string; recoverable: boolean }
140
142
  | {
141
143
  type: "tool:approval:required";
@@ -160,4 +162,16 @@ export type AgentEvent =
160
162
  active: boolean;
161
163
  url?: string;
162
164
  interactionAllowed: boolean;
165
+ }
166
+ | { type: "subagent:spawned"; subagentId: string; conversationId: string; task: string }
167
+ | { type: "subagent:completed"; subagentId: string; conversationId: string }
168
+ | { type: "subagent:error"; subagentId: string; conversationId: string; error: string }
169
+ | { type: "subagent:stopped"; subagentId: string; conversationId: string }
170
+ | {
171
+ type: "subagent:approval_needed";
172
+ subagentId: string;
173
+ conversationId: string;
174
+ tool: string;
175
+ approvalId: string;
176
+ input?: Record<string, unknown>;
163
177
  };
@@ -1,6 +0,0 @@
1
-
2
- > @poncho-ai/sdk@0.6.0 lint /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
3
- > eslint src/
4
-
5
- sh: eslint: command not found
6
-  ELIFECYCLE  Command failed.
@@ -1,14 +0,0 @@
1
-
2
- > @poncho-ai/sdk@1.0.3 test /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
3
- > vitest
4
-
5
-
6
-  RUN  v1.6.1 /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
7
-
8
- ✓ test/sdk.test.ts  (1 test) 2ms
9
-
10
-  Test Files  1 passed (1)
11
-  Tests  1 passed (1)
12
-  Start at  12:36:34
13
-  Duration  938ms (transform 227ms, setup 1ms, collect 248ms, tests 2ms, environment 0ms, prepare 139ms)
14
-