@poncho-ai/sdk 1.4.1 → 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.
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +23 -0
- package/dist/index.d.ts +21 -0
- package/package.json +1 -1
- package/src/index.ts +18 -2
- package/.turbo/turbo-lint.log +0 -6
- package/.turbo/turbo-test.log +0 -14
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/sdk@1.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
[34mCLI[39m Target: es2022
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[32mESM[39m [1mdist/index.js [22m[32m11.44 KB[39m
|
|
11
|
-
[32mESM[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m ⚡️ Build success in 21ms
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
|
-
[32mDTS[39m ⚡️ Build success in
|
|
14
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
13
|
+
[32mDTS[39m ⚡️ Build success in 1333ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m22.16 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
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
|
+
|
|
20
|
+
## 1.5.0
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- [`6f0abfd`](https://github.com/cesr/poncho-ai/commit/6f0abfd9f729b545cf293741ee813f705910aaf3) Thanks [@cesr](https://github.com/cesr)! - Add context compaction for long conversations. Automatically summarizes older messages when the context window fills up, keeping conversations going indefinitely. Includes auto-compaction in the run loop, `/compact` command, Web UI divider with expandable summary, and visual history preservation.
|
|
25
|
+
|
|
3
26
|
## 1.4.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -529,6 +529,7 @@ interface Message {
|
|
|
529
529
|
type: "text" | "tools";
|
|
530
530
|
content: string | string[];
|
|
531
531
|
}>;
|
|
532
|
+
isCompactionSummary?: boolean;
|
|
532
533
|
};
|
|
533
534
|
}
|
|
534
535
|
/** Extract the text content from a message, regardless of content format. */
|
|
@@ -569,6 +570,8 @@ interface RunInput {
|
|
|
569
570
|
abortSignal?: AbortSignal;
|
|
570
571
|
/** When set, Latitude telemetry groups all turns in this conversation under a single trace. */
|
|
571
572
|
conversationId?: string;
|
|
573
|
+
/** When true, ignores PONCHO_MAX_DURATION soft deadline (used for background subagent runs). */
|
|
574
|
+
disableSoftDeadline?: boolean;
|
|
572
575
|
}
|
|
573
576
|
interface TokenUsage {
|
|
574
577
|
input: number;
|
|
@@ -582,6 +585,8 @@ interface RunResult {
|
|
|
582
585
|
tokens: TokenUsage;
|
|
583
586
|
duration: number;
|
|
584
587
|
continuation?: boolean;
|
|
588
|
+
/** Full message chain from the harness run (populated when continuation=true). */
|
|
589
|
+
continuationMessages?: Message[];
|
|
585
590
|
maxSteps?: number;
|
|
586
591
|
}
|
|
587
592
|
interface AgentFailure {
|
|
@@ -598,6 +603,7 @@ type AgentEvent = {
|
|
|
598
603
|
type: "run:completed";
|
|
599
604
|
runId: string;
|
|
600
605
|
result: RunResult;
|
|
606
|
+
pendingSubagents?: boolean;
|
|
601
607
|
} | {
|
|
602
608
|
type: "run:cancelled";
|
|
603
609
|
runId: string;
|
|
@@ -701,6 +707,21 @@ type AgentEvent = {
|
|
|
701
707
|
tool: string;
|
|
702
708
|
approvalId: string;
|
|
703
709
|
input?: Record<string, unknown>;
|
|
710
|
+
} | {
|
|
711
|
+
type: "compaction:started";
|
|
712
|
+
estimatedTokens: number;
|
|
713
|
+
} | {
|
|
714
|
+
type: "compaction:completed";
|
|
715
|
+
tokensBefore: number;
|
|
716
|
+
tokensAfter: number;
|
|
717
|
+
messagesBefore: number;
|
|
718
|
+
messagesAfter: number;
|
|
719
|
+
compactedMessages?: Message[];
|
|
720
|
+
} | {
|
|
721
|
+
type: "subagents:pending";
|
|
722
|
+
} | {
|
|
723
|
+
type: "compaction:warning";
|
|
724
|
+
reason: string;
|
|
704
725
|
};
|
|
705
726
|
|
|
706
727
|
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
|
@@ -36,6 +36,7 @@ export interface Message {
|
|
|
36
36
|
step?: number;
|
|
37
37
|
toolActivity?: string[];
|
|
38
38
|
sections?: Array<{ type: "text" | "tools"; content: string | string[] }>;
|
|
39
|
+
isCompactionSummary?: boolean;
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -101,6 +102,8 @@ export interface RunInput {
|
|
|
101
102
|
abortSignal?: AbortSignal;
|
|
102
103
|
/** When set, Latitude telemetry groups all turns in this conversation under a single trace. */
|
|
103
104
|
conversationId?: string;
|
|
105
|
+
/** When true, ignores PONCHO_MAX_DURATION soft deadline (used for background subagent runs). */
|
|
106
|
+
disableSoftDeadline?: boolean;
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
export interface TokenUsage {
|
|
@@ -116,6 +119,8 @@ export interface RunResult {
|
|
|
116
119
|
tokens: TokenUsage;
|
|
117
120
|
duration: number;
|
|
118
121
|
continuation?: boolean;
|
|
122
|
+
/** Full message chain from the harness run (populated when continuation=true). */
|
|
123
|
+
continuationMessages?: Message[];
|
|
119
124
|
maxSteps?: number;
|
|
120
125
|
}
|
|
121
126
|
|
|
@@ -127,7 +132,7 @@ export interface AgentFailure {
|
|
|
127
132
|
|
|
128
133
|
export type AgentEvent =
|
|
129
134
|
| { type: "run:started"; runId: string; agentId: string; contextWindow?: number }
|
|
130
|
-
| { type: "run:completed"; runId: string; result: RunResult }
|
|
135
|
+
| { type: "run:completed"; runId: string; result: RunResult; pendingSubagents?: boolean }
|
|
131
136
|
| { type: "run:cancelled"; runId: string }
|
|
132
137
|
| { type: "run:error"; runId: string; error: AgentFailure }
|
|
133
138
|
| { type: "step:started"; step: number }
|
|
@@ -176,4 +181,15 @@ export type AgentEvent =
|
|
|
176
181
|
tool: string;
|
|
177
182
|
approvalId: string;
|
|
178
183
|
input?: Record<string, unknown>;
|
|
179
|
-
}
|
|
184
|
+
}
|
|
185
|
+
| { type: "compaction:started"; estimatedTokens: number }
|
|
186
|
+
| {
|
|
187
|
+
type: "compaction:completed";
|
|
188
|
+
tokensBefore: number;
|
|
189
|
+
tokensAfter: number;
|
|
190
|
+
messagesBefore: number;
|
|
191
|
+
messagesAfter: number;
|
|
192
|
+
compactedMessages?: Message[];
|
|
193
|
+
}
|
|
194
|
+
| { type: "subagents:pending" }
|
|
195
|
+
| { type: "compaction:warning"; reason: string };
|
package/.turbo/turbo-lint.log
DELETED
package/.turbo/turbo-test.log
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @poncho-ai/sdk@1.1.1 test /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
|
|
3
|
-
> vitest
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[7m[1m[36m RUN [39m[22m[27m [36mv1.6.1[39m [90m/Users/cesar/Dev/latitude/poncho-ai/packages/sdk[39m
|
|
7
|
-
|
|
8
|
-
[32m✓[39m test/sdk.test.ts [2m ([22m[2m1 test[22m[2m)[22m[90m 3[2mms[22m[39m
|
|
9
|
-
|
|
10
|
-
[2m Test Files [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
11
|
-
[2m Tests [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
12
|
-
[2m Start at [22m 17:47:36
|
|
13
|
-
[2m Duration [22m 992ms[2m (transform 343ms, setup 0ms, collect 429ms, tests 3ms, environment 0ms, prepare 129ms)[22m
|
|
14
|
-
|