@pushwoosh/rpc-gateway-ai-assistant 0.1.389 → 0.1.391

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/data.js CHANGED
@@ -47,6 +47,21 @@ export const data = {
47
47
  },
48
48
  "chatId": {
49
49
  "type": "number"
50
+ },
51
+ "session": {
52
+ "type": "pushwoosh.agentrunner.v1.SdkSession"
53
+ }
54
+ }
55
+ },
56
+ "pushwoosh.agentrunner.v1.SdkSession": {
57
+ "type": "I",
58
+ "fields": {
59
+ "sessionId": {
60
+ "type": "string"
61
+ },
62
+ "lines": {
63
+ "type": "string",
64
+ "array": true
50
65
  }
51
66
  }
52
67
  },
@@ -150,6 +165,9 @@ export const data = {
150
165
  },
151
166
  "done": {
152
167
  "type": "pushwoosh.agentrunner.v1.TurnDone"
168
+ },
169
+ "sessionAppend": {
170
+ "type": "pushwoosh.agentrunner.v1.SessionAppend"
153
171
  }
154
172
  },
155
173
  "oneofs": {
@@ -158,7 +176,8 @@ export const data = {
158
176
  "delta",
159
177
  "assistantMessage",
160
178
  "toolCall",
161
- "done"
179
+ "done",
180
+ "sessionAppend"
162
181
  ]
163
182
  }
164
183
  }
@@ -209,6 +228,18 @@ export const data = {
209
228
  }
210
229
  }
211
230
  },
231
+ "pushwoosh.agentrunner.v1.SessionAppend": {
232
+ "type": "I",
233
+ "fields": {
234
+ "sessionId": {
235
+ "type": "string"
236
+ },
237
+ "lines": {
238
+ "type": "string",
239
+ "array": true
240
+ }
241
+ }
242
+ },
212
243
  "pushwoosh.agentrunner.v1.Usage": {
213
244
  "type": "I",
214
245
  "fields": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-ai-assistant",
3
- "version": "0.1.389",
3
+ "version": "0.1.391",
4
4
  "description": "AI Assistant api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -28,6 +28,20 @@ export type StartTurn = {
28
28
  maxTurns: number;
29
29
  /** Correlation only: the runner never reads the chat, it just labels its logs. */
30
30
  chatId: number;
31
+ /**
32
+ * A prior SDK session, when Go has one. Absent means seed from `history`, which stays
33
+ * the fallback for every failure on this path.
34
+ */
35
+ session: SdkSession;
36
+ };
37
+ /**
38
+ * SdkSession is the CLI's own transcript, verbatim and opaque: Go stores the lines and
39
+ * hands them back, the runner is the only side that parses them.
40
+ */
41
+ export type SdkSession = {
42
+ sessionId: string;
43
+ /** JSONL, one entry per line, oldest first */
44
+ lines: string[];
31
45
  };
32
46
  /**
33
47
  * Split because the split is what makes cross-session caching possible: joined into one
@@ -93,7 +107,11 @@ export type TurnEvent_payload_done = {
93
107
  type: 'done';
94
108
  data: TurnDone;
95
109
  };
96
- export type TurnEvent_payload = TurnEvent_payload_delta | TurnEvent_payload_assistantMessage | TurnEvent_payload_toolCall | TurnEvent_payload_done;
110
+ export type TurnEvent_payload_sessionAppend = {
111
+ type: 'sessionAppend';
112
+ data: SessionAppend;
113
+ };
114
+ export type TurnEvent_payload = TurnEvent_payload_delta | TurnEvent_payload_assistantMessage | TurnEvent_payload_toolCall | TurnEvent_payload_done | TurnEvent_payload_sessionAppend;
97
115
  export type TurnEvent = {
98
116
  payload: TurnEvent_payload;
99
117
  };
@@ -117,6 +135,14 @@ export type AssistantMessage = {
117
135
  /** mirrored to Mattermost, never persisted, never streamed */
118
136
  thinking: string;
119
137
  };
138
+ /**
139
+ * SessionAppend carries transcript lines the SDK wrote during this turn, in write order. A
140
+ * session_id Go has not seen replaces the stored session: that is how a fresh session resets it.
141
+ */
142
+ export type SessionAppend = {
143
+ sessionId: string;
144
+ lines: string[];
145
+ };
120
146
  export type Usage = {
121
147
  model: string;
122
148
  inputTokens: number;