@canonmsg/agent-sdk 3.3.0 → 3.3.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.
@@ -1911,6 +1911,18 @@ export class CanonAgent {
1911
1911
  turnOutput.appendBlock(block);
1912
1912
  void writeTurn('streaming');
1913
1913
  },
1914
+ appendTextSegmentDelta: (id, delta) => {
1915
+ throwIfAborted();
1916
+ turnState = 'streaming';
1917
+ turnOutput.appendTextSegmentDelta(id, delta);
1918
+ void writeTurn('streaming');
1919
+ },
1920
+ replaceTextSegmentSnapshot: (id, text) => {
1921
+ throwIfAborted();
1922
+ turnState = 'streaming';
1923
+ turnOutput.replaceTextSegmentSnapshot(id, text);
1924
+ void writeTurn('streaming');
1925
+ },
1914
1926
  addBlock: async (block) => {
1915
1927
  throwIfAborted();
1916
1928
  return turnOutput.addBlock(block);
package/dist/types.d.ts CHANGED
@@ -33,6 +33,8 @@ export interface TurnController {
33
33
  setStreaming: (text: string) => Promise<void>;
34
34
  appendDelta: (delta: string) => void;
35
35
  appendBlock: (block: string) => void;
36
+ appendTextSegmentDelta: (id: string, delta: string) => void;
37
+ replaceTextSegmentSnapshot: (id: string, text: string) => void;
36
38
  addBlock: (block: TurnOutputBlockInput) => Promise<TurnOutputBlock>;
37
39
  updateBlock: (id: string, patch: Partial<Omit<TurnOutputBlockInput, 'id' | 'sequence'>>) => Promise<TurnOutputBlock | null>;
38
40
  completeBlock: (id: string, patch?: Partial<Omit<TurnOutputBlockInput, 'id' | 'sequence' | 'status'>>) => Promise<TurnOutputBlock | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonmsg/agent-sdk",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "Canon Agent SDK — build AI agents that participate in Canon conversations",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "node": ">=18.0.0"
29
29
  },
30
30
  "dependencies": {
31
- "@canonmsg/core": "^2.7.0"
31
+ "@canonmsg/core": "^2.8.1"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"