@poncho-ai/sdk 1.5.0 → 1.6.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.5.0 build /home/runner/work/poncho-ai/poncho-ai/packages/sdk
2
+ > @poncho-ai/sdk@1.6.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 11.44 KB
11
- ESM ⚡️ Build success in 20ms
11
+ ESM ⚡️ Build success in 21ms
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 1333ms
14
+ DTS dist/index.d.ts 22.16 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @poncho-ai/sdk
2
2
 
3
+ ## 1.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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
8
+
9
+ **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`.
10
+
11
+ **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.
12
+
13
+ **Bug fixes**:
14
+ - 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`).
15
+ - Fixed Upstash KV store silently dropping large values by switching from URL-path encoding to request body format for `SET`/`SETEX` commands.
16
+ - Fixed empty assistant content blocks causing Anthropic `text content blocks must be non-empty` errors.
17
+
18
+ **Client**: Added `getConversationStatus()` and `waitForSubagents` option on `sendMessage()`.
19
+
3
20
  ## 1.5.0
4
21
 
5
22
  ### 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,6 +585,8 @@ 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;
587
591
  }
588
592
  interface AgentFailure {
@@ -599,6 +603,7 @@ type AgentEvent = {
599
603
  type: "run:completed";
600
604
  runId: string;
601
605
  result: RunResult;
606
+ pendingSubagents?: boolean;
602
607
  } | {
603
608
  type: "run:cancelled";
604
609
  runId: string;
@@ -712,6 +717,8 @@ type AgentEvent = {
712
717
  messagesBefore: number;
713
718
  messagesAfter: number;
714
719
  compactedMessages?: Message[];
720
+ } | {
721
+ type: "subagents:pending";
715
722
  } | {
716
723
  type: "compaction:warning";
717
724
  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.0",
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,6 +119,8 @@ 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;
121
125
  }
122
126
 
@@ -128,7 +132,7 @@ export interface AgentFailure {
128
132
 
129
133
  export type AgentEvent =
130
134
  | { type: "run:started"; runId: string; agentId: string; contextWindow?: number }
131
- | { type: "run:completed"; runId: string; result: RunResult }
135
+ | { type: "run:completed"; runId: string; result: RunResult; pendingSubagents?: boolean }
132
136
  | { type: "run:cancelled"; runId: string }
133
137
  | { type: "run:error"; runId: string; error: AgentFailure }
134
138
  | { type: "step:started"; step: number }
@@ -187,4 +191,5 @@ export type AgentEvent =
187
191
  messagesAfter: number;
188
192
  compactedMessages?: Message[];
189
193
  }
194
+ | { type: "subagents:pending" }
190
195
  | { type: "compaction:warning"; reason: string };