@poncho-ai/sdk 1.4.1 → 1.5.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.4.1 build /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
2
+ > @poncho-ai/sdk@1.5.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 42ms
11
+ ESM ⚡️ Build success in 20ms
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 922ms
14
- DTS dist/index.d.ts 21.50 KB
13
+ DTS ⚡️ Build success in 1276ms
14
+ DTS dist/index.d.ts 21.84 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @poncho-ai/sdk
2
2
 
3
+ ## 1.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`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.
8
+
3
9
  ## 1.4.1
4
10
 
5
11
  ### 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. */
@@ -701,6 +702,19 @@ type AgentEvent = {
701
702
  tool: string;
702
703
  approvalId: string;
703
704
  input?: Record<string, unknown>;
705
+ } | {
706
+ type: "compaction:started";
707
+ estimatedTokens: number;
708
+ } | {
709
+ type: "compaction:completed";
710
+ tokensBefore: number;
711
+ tokensAfter: number;
712
+ messagesBefore: number;
713
+ messagesAfter: number;
714
+ compactedMessages?: Message[];
715
+ } | {
716
+ type: "compaction:warning";
717
+ reason: string;
704
718
  };
705
719
 
706
720
  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.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "Core types and utilities for building Poncho skills",
5
5
  "repository": {
6
6
  "type": "git",
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
 
@@ -176,4 +177,14 @@ export type AgentEvent =
176
177
  tool: string;
177
178
  approvalId: string;
178
179
  input?: Record<string, unknown>;
179
- };
180
+ }
181
+ | { type: "compaction:started"; estimatedTokens: number }
182
+ | {
183
+ type: "compaction:completed";
184
+ tokensBefore: number;
185
+ tokensAfter: number;
186
+ messagesBefore: number;
187
+ messagesAfter: number;
188
+ compactedMessages?: Message[];
189
+ }
190
+ | { type: "compaction:warning"; reason: string };
@@ -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.1.1 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) 3ms
9
-
10
-  Test Files  1 passed (1)
11
-  Tests  1 passed (1)
12
-  Start at  17:47:36
13
-  Duration  992ms (transform 343ms, setup 0ms, collect 429ms, tests 3ms, environment 0ms, prepare 129ms)
14
-