@pagelines/sdk 1.0.655 → 1.0.656

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.
@@ -2,7 +2,7 @@ import { ComputedRef, Ref } from 'vue';
2
2
  import { AgentConfig, ChatToolActivityData, SettingsObject } from '@pagelines/core';
3
3
  import { PageLinesSDK } from '../sdkClient';
4
4
  import { AgentMode, ChatAttachment, ChatMessage, TextConnectionState, Agent } from './schema';
5
- import { WorkJournalModel, WorkJournalOutcome } from './work-journal';
5
+ import { LiveTurnBlock, WorkJournalModel, WorkJournalOutcome } from './work-journal';
6
6
  import { VoiceRecorderController } from './VoiceRecorderController';
7
7
  /**
8
8
  * Structured error payload surfaced by the chat stream. Matches the
@@ -88,6 +88,8 @@ export declare class AgentChatController extends SettingsObject<AgentChatControl
88
88
  private readonly nowMs;
89
89
  private readonly toolActivityTiming;
90
90
  private readonly lastVisibleProgressAtMs;
91
+ private readonly liveSegments;
92
+ readonly liveStreamMessageId: import('vue').ShallowRef<string | undefined, string | undefined>;
91
93
  private conversationId?;
92
94
  textState: Ref<TextConnectionState>;
93
95
  agentMode: Ref<AgentMode>;
@@ -100,6 +102,12 @@ export declare class AgentChatController extends SettingsObject<AgentChatControl
100
102
  * Task 7 owns `stopped`.
101
103
  */
102
104
  readonly workJournal: ComputedRef<WorkJournalModel | undefined>;
105
+ /**
106
+ * Interleaved live progression (mockup 28c) — only while the turn is
107
+ * running. Terminal outcomes (stopped / failed live) keep the single
108
+ * journal from `workJournal`; the canonical row owns completed endings.
109
+ */
110
+ readonly liveTurnBlocks: ComputedRef<LiveTurnBlock[]>;
103
111
  readonly canUseComposer: ComputedRef<boolean>;
104
112
  readonly canAttachFile: ComputedRef<boolean>;
105
113
  readonly canRecordAudio: ComputedRef<boolean>;
@@ -64,3 +64,38 @@ export declare function buildWorkJournalModel(args: {
64
64
  lastVisibleProgressAtMs?: number;
65
65
  includeFailureNote?: boolean;
66
66
  }): WorkJournalModel;
67
+ /** One ordered slice of a live turn: what the controller observed arrive. */
68
+ export type LiveTurnSegment = {
69
+ kind: 'text';
70
+ content: string;
71
+ } | {
72
+ kind: 'work';
73
+ activityIds: string[];
74
+ };
75
+ /** One rendered block of the interleaved live progression (mockup 28c). */
76
+ export type LiveTurnBlock = {
77
+ kind: 'text';
78
+ content: string;
79
+ } | {
80
+ kind: 'work';
81
+ journal: WorkJournalModel;
82
+ };
83
+ /**
84
+ * Interleaved live-turn projection: each completed work group sits above the
85
+ * text it produced, the next group opens beneath that text, and only the tail
86
+ * block may carry the terminal (spinner / wait ladder). Blocks above the tail
87
+ * are immutable evidence. The Swift twin must mirror this rule.
88
+ *
89
+ * A tail of streaming text renders no loading block while deltas visibly
90
+ * arrive; once the quiet boundary passes, an empty live group supplies the
91
+ * honest Finishing up state at the tail. With no segmentation (restored
92
+ * threads, unsegmented producers) the whole activity set renders as one live
93
+ * group — the pre-progression shape.
94
+ */
95
+ export declare function buildLiveTurnBlocks(args: {
96
+ segments: LiveTurnSegment[];
97
+ activities: ChatToolActivityData[];
98
+ nowMs: number;
99
+ canNotifyOnCompletion: boolean;
100
+ lastVisibleProgressAtMs?: number;
101
+ }): LiveTurnBlock[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagelines/sdk",
3
- "version": "1.0.655",
3
+ "version": "1.0.656",
4
4
  "description": "PageLines SDK for agent management, auth, and billing",
5
5
  "type": "module",
6
6
  "main": "./dist/sdk.js",