@poncho-ai/sdk 1.15.0 → 1.15.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.15.0 build /home/runner/work/poncho-ai/poncho-ai/packages/sdk
2
+ > @poncho-ai/sdk@1.15.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 17.24 KB
11
- ESM ⚡️ Build success in 19ms
11
+ ESM ⚡️ Build success in 18ms
12
12
  DTS Build start
13
13
  DTS ⚡️ Build success in 1324ms
14
- DTS dist/index.d.ts 31.27 KB
14
+ DTS dist/index.d.ts 31.79 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @poncho-ai/sdk
2
2
 
3
+ ## 1.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`299f574`](https://github.com/cesr/poncho-ai/commit/299f574a2f2f0d4873f42bbcffdf604e9cc4c29c) Thanks [@cesr](https://github.com/cesr)! - Mark in-flight assistant drafts with `metadata.incomplete = true`.
8
+
9
+ The orchestrator's per-step draft persist (`persistDraft`) and the
10
+ approval/device checkpoint and continuation writes now stamp the trailing
11
+ assistant message `metadata.incomplete = true`; the three terminal writes
12
+ (normal finalize, cancelled, errored) clear it. This lets a consumer that
13
+ reconciles a persisted snapshot against a live event stream (e.g. a
14
+ WebSocket layer) strip the in-flight draft from the authoritative snapshot
15
+ and rebuild that turn from the event log instead — so the snapshot and the
16
+ replayed events never both carry the in-flight turn, eliminating
17
+ reconnect-time duplication. Additive + backwards-compatible: consumers that
18
+ ignore the flag are unaffected.
19
+
3
20
  ## 1.15.0
4
21
 
5
22
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -680,6 +680,14 @@ interface Message {
680
680
  content: string | string[];
681
681
  }>;
682
682
  isCompactionSummary?: boolean;
683
+ /** True while this assistant message is an in-flight DRAFT (the turn
684
+ * hasn't finished). Set by the orchestrator's per-step draft persist and
685
+ * cleared at finalize. Consumers that reconcile a persisted snapshot with
686
+ * a live event stream (e.g. PonchOS's WS layer) strip `incomplete`
687
+ * messages from the snapshot and rebuild the in-flight turn from the
688
+ * event log instead — so the two never both carry it (no reconnect
689
+ * duplication). */
690
+ incomplete?: boolean;
683
691
  };
684
692
  }
685
693
  /** Extract the text content from a message, regardless of content format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poncho-ai/sdk",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "Core types and utilities for building Poncho skills",
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -38,6 +38,14 @@ export interface Message {
38
38
  toolActivity?: string[];
39
39
  sections?: Array<{ type: "text" | "tools"; content: string | string[] }>;
40
40
  isCompactionSummary?: boolean;
41
+ /** True while this assistant message is an in-flight DRAFT (the turn
42
+ * hasn't finished). Set by the orchestrator's per-step draft persist and
43
+ * cleared at finalize. Consumers that reconcile a persisted snapshot with
44
+ * a live event stream (e.g. PonchOS's WS layer) strip `incomplete`
45
+ * messages from the snapshot and rebuild the in-flight turn from the
46
+ * event log instead — so the two never both carry it (no reconnect
47
+ * duplication). */
48
+ incomplete?: boolean;
41
49
  };
42
50
  }
43
51