@poncho-ai/sdk 1.5.0 → 1.6.1

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.5.0 build /home/runner/work/poncho-ai/poncho-ai/packages/sdk
2
+ > @poncho-ai/sdk@1.6.1 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 11.44 KB
11
- ESM ⚡️ Build success in 20ms
11
+ ESM ⚡️ Build success in 17ms
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 1276ms
14
- DTS dist/index.d.ts 21.84 KB
13
+ DTS ⚡️ Build success in 1248ms
14
+ DTS dist/index.d.ts 22.39 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @poncho-ai/sdk
2
2
 
3
+ ## 1.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4d50ad9`](https://github.com/cesr/poncho-ai/commit/4d50ad970886c9d3635ec36a407514c91ce6a71a) Thanks [@cesr](https://github.com/cesr)! - Improve callback-run reliability and streaming across subagent workflows, including safer concurrent approval handling and parent callback retriggers.
8
+
9
+ Add context window/token reporting through run completion events, improve cron/web UI rendering and approval streaming behavior, and harden built-in web search retry/throttle behavior.
10
+
11
+ ## 1.6.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#42](https://github.com/cesr/poncho-ai/pull/42) [`e58a984`](https://github.com/cesr/poncho-ai/commit/e58a984efaa673b649318102bbf735fb4c2f9172) Thanks [@cesr](https://github.com/cesr)! - Add continuation model and fire-and-forget subagents
16
+
17
+ **Continuation model**: Agents no longer send a synthetic `"Continue"` user message between steps. Instead, the harness injects a transient signal when needed, and the full internal message chain is preserved across continuations so the LLM never loses context. `RunInput` gains `disableSoftDeadline` and `RunResult` gains `continuationMessages`.
18
+
19
+ **Fire-and-forget subagents**: Subagents now run asynchronously in the background. `spawn_subagent` returns immediately with a subagent ID; results are delivered back to the parent conversation as a callback once the subagent completes. Subagents cannot spawn their own subagents. The web UI shows results in a collapsible disclosure and reconnects the live event stream automatically when the parent agent resumes.
20
+
21
+ **Bug fixes**:
22
+ - Fixed a race condition where concurrent runs on the same harness instance could assign a subagent or browser tab to the wrong parent conversation (shared `_currentRunConversationId` field replaced with per-run `ToolContext.conversationId`).
23
+ - Fixed Upstash KV store silently dropping large values by switching from URL-path encoding to request body format for `SET`/`SETEX` commands.
24
+ - Fixed empty assistant content blocks causing Anthropic `text content blocks must be non-empty` errors.
25
+
26
+ **Client**: Added `getConversationStatus()` and `waitForSubagents` option on `sendMessage()`.
27
+
3
28
  ## 1.5.0
4
29
 
5
30
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -570,6 +570,8 @@ interface RunInput {
570
570
  abortSignal?: AbortSignal;
571
571
  /** When set, Latitude telemetry groups all turns in this conversation under a single trace. */
572
572
  conversationId?: string;
573
+ /** When true, ignores PONCHO_MAX_DURATION soft deadline (used for background subagent runs). */
574
+ disableSoftDeadline?: boolean;
573
575
  }
574
576
  interface TokenUsage {
575
577
  input: number;
@@ -583,7 +585,13 @@ interface RunResult {
583
585
  tokens: TokenUsage;
584
586
  duration: number;
585
587
  continuation?: boolean;
588
+ /** Full message chain from the harness run (populated when continuation=true). */
589
+ continuationMessages?: Message[];
586
590
  maxSteps?: number;
591
+ /** Estimated current context usage in tokens at end of run (last model input + tool output estimates, reset on compaction). */
592
+ contextTokens?: number;
593
+ /** Model context window size in tokens. */
594
+ contextWindow?: number;
587
595
  }
588
596
  interface AgentFailure {
589
597
  code: string;
@@ -599,6 +607,7 @@ type AgentEvent = {
599
607
  type: "run:completed";
600
608
  runId: string;
601
609
  result: RunResult;
610
+ pendingSubagents?: boolean;
602
611
  } | {
603
612
  type: "run:cancelled";
604
613
  runId: string;
@@ -712,6 +721,8 @@ type AgentEvent = {
712
721
  messagesBefore: number;
713
722
  messagesAfter: number;
714
723
  compactedMessages?: Message[];
724
+ } | {
725
+ type: "subagents:pending";
715
726
  } | {
716
727
  type: "compaction:warning";
717
728
  reason: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poncho-ai/sdk",
3
- "version": "1.5.0",
3
+ "version": "1.6.1",
4
4
  "description": "Core types and utilities for building Poncho skills",
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -102,6 +102,8 @@ export interface RunInput {
102
102
  abortSignal?: AbortSignal;
103
103
  /** When set, Latitude telemetry groups all turns in this conversation under a single trace. */
104
104
  conversationId?: string;
105
+ /** When true, ignores PONCHO_MAX_DURATION soft deadline (used for background subagent runs). */
106
+ disableSoftDeadline?: boolean;
105
107
  }
106
108
 
107
109
  export interface TokenUsage {
@@ -117,7 +119,13 @@ export interface RunResult {
117
119
  tokens: TokenUsage;
118
120
  duration: number;
119
121
  continuation?: boolean;
122
+ /** Full message chain from the harness run (populated when continuation=true). */
123
+ continuationMessages?: Message[];
120
124
  maxSteps?: number;
125
+ /** Estimated current context usage in tokens at end of run (last model input + tool output estimates, reset on compaction). */
126
+ contextTokens?: number;
127
+ /** Model context window size in tokens. */
128
+ contextWindow?: number;
121
129
  }
122
130
 
123
131
  export interface AgentFailure {
@@ -128,7 +136,7 @@ export interface AgentFailure {
128
136
 
129
137
  export type AgentEvent =
130
138
  | { type: "run:started"; runId: string; agentId: string; contextWindow?: number }
131
- | { type: "run:completed"; runId: string; result: RunResult }
139
+ | { type: "run:completed"; runId: string; result: RunResult; pendingSubagents?: boolean }
132
140
  | { type: "run:cancelled"; runId: string }
133
141
  | { type: "run:error"; runId: string; error: AgentFailure }
134
142
  | { type: "step:started"; step: number }
@@ -187,4 +195,5 @@ export type AgentEvent =
187
195
  messagesAfter: number;
188
196
  compactedMessages?: Message[];
189
197
  }
198
+ | { type: "subagents:pending" }
190
199
  | { type: "compaction:warning"; reason: string };