newmark-agent 0.5.14 → 0.6.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.
Files changed (68) hide show
  1. package/dist/conversation-utility-host.bundle.cjs +4565 -2998
  2. package/dist/conversation-utility-host.js +1 -1
  3. package/dist/core/agent.d.ts +108 -16
  4. package/dist/core/agent.js +698 -195
  5. package/dist/core/agentKernel/agent.d.ts +1 -0
  6. package/dist/core/agentKernel/agent.js +9 -0
  7. package/dist/core/agentKernelDiagnostics.d.ts +4 -6
  8. package/dist/core/agentKernelDiagnostics.js +12 -9
  9. package/dist/core/agentKernelRunner.d.ts +5 -0
  10. package/dist/core/agentKernelRunner.js +250 -107
  11. package/dist/core/autoRouter.js +17 -27
  12. package/dist/core/config.d.ts +2 -0
  13. package/dist/core/config.js +7 -1
  14. package/dist/core/conversationCommandState.d.ts +17 -0
  15. package/dist/core/conversationCommandState.js +140 -0
  16. package/dist/core/conversationKernel.d.ts +25 -4
  17. package/dist/core/conversationKernel.js +360 -89
  18. package/dist/core/conversationListEvent.d.ts +6 -0
  19. package/dist/core/conversationListEvent.js +14 -0
  20. package/dist/core/electronUtilityAgentClient.d.ts +4 -1
  21. package/dist/core/electronUtilityAgentClient.js +4 -4
  22. package/dist/core/electronUtilityRuntimePool.d.ts +8 -2
  23. package/dist/core/electronUtilityRuntimePool.js +11 -5
  24. package/dist/core/installUpdate.js +41 -29
  25. package/dist/core/modelResponseHealth.d.ts +17 -0
  26. package/dist/core/modelResponseHealth.js +193 -0
  27. package/dist/core/providerUsageAccounting.d.ts +47 -0
  28. package/dist/core/providerUsageAccounting.js +71 -0
  29. package/dist/core/requestContextEstimate.d.ts +18 -0
  30. package/dist/core/requestContextEstimate.js +54 -0
  31. package/dist/core/subagent.d.ts +89 -5
  32. package/dist/core/subagent.js +264 -41
  33. package/dist/core/subagentCommunication.d.ts +43 -0
  34. package/dist/core/subagentCommunication.js +167 -0
  35. package/dist/core/types.d.ts +34 -1
  36. package/dist/core/utilityAgentProtocol.d.ts +4 -0
  37. package/dist/core/workEventCoalescer.js +4 -1
  38. package/dist/core/wslAgentClient.d.ts +18 -5
  39. package/dist/core/wslAgentClient.js +79 -27
  40. package/dist/core/wslAgentProtocol.d.ts +7 -0
  41. package/dist/core/wslAgentRuntimePool.d.ts +8 -2
  42. package/dist/core/wslAgentRuntimePool.js +19 -6
  43. package/dist/core/wslRuntimeProcessTree.d.ts +10 -0
  44. package/dist/core/wslRuntimeProcessTree.js +104 -0
  45. package/dist/llm/provider.d.ts +5 -12
  46. package/dist/llm/provider.js +150 -269
  47. package/dist/main.js +582 -356
  48. package/dist/preload.js +3 -3
  49. package/dist/providers/chat-completions.adapter.d.ts +2 -0
  50. package/dist/providers/chat-completions.adapter.js +84 -36
  51. package/dist/providers/provider-adapter.d.ts +2 -0
  52. package/dist/providers/provider-events.d.ts +23 -14
  53. package/dist/providers/provider-events.js +148 -43
  54. package/dist/providers/provider-headers.d.ts +7 -3
  55. package/dist/providers/provider-headers.js +109 -39
  56. package/dist/providers/provider-request-compat.d.ts +6 -0
  57. package/dist/providers/provider-request-compat.js +37 -0
  58. package/dist/providers/responses.adapter.d.ts +2 -0
  59. package/dist/providers/responses.adapter.js +192 -126
  60. package/dist/server.d.ts +9 -2
  61. package/dist/server.js +100 -24
  62. package/dist/tools/index.js +17 -1
  63. package/dist/ui/index.html +2515 -693
  64. package/dist/ui/lucide-sprite.svg +7 -0
  65. package/dist/ui/startup.html +6 -6
  66. package/dist/wsl-agent-host.bundle.cjs +4575 -3006
  67. package/dist/wsl-agent-host.js +9 -4
  68. package/package.json +23 -4
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ResponsesAdapter = void 0;
4
4
  const provider_events_1 = require("./provider-events");
5
5
  const provider_headers_1 = require("./provider-headers");
6
+ const provider_request_compat_1 = require("./provider-request-compat");
6
7
  const chat_messages_1 = require("./chat-messages");
7
8
  /**
8
9
  * OpenAI Responses adapter. Serializes a normalized request to `/responses`
@@ -80,13 +81,9 @@ class ResponsesAdapter {
80
81
  body.tool_choice = 'auto';
81
82
  body.parallel_tool_calls = true;
82
83
  }
83
- const base = request.baseUrl.replace(/\/+$/, '');
84
84
  return {
85
- url: `${base}/responses`,
86
- headers: {
87
- 'Content-Type': 'application/json',
88
- 'Authorization': `Bearer ${request.apiKey}`,
89
- },
85
+ url: (0, provider_request_compat_1.providerEndpoint)(request.baseUrl, '/responses'),
86
+ headers: (0, provider_request_compat_1.providerRequestHeaders)('openai', request.apiKey),
90
87
  body,
91
88
  };
92
89
  }
@@ -116,7 +113,7 @@ class ResponsesAdapter {
116
113
  const contentType = response.headers.get('content-type') || '';
117
114
  if (!/text\/event-stream/i.test(contentType)) {
118
115
  const json = (0, provider_events_1.normalizeResponsesPayload)(await response.json());
119
- yield* this.emitNonStreaming(json);
116
+ yield* this.emitNonStreaming(json, response.headers);
120
117
  return;
121
118
  }
122
119
  const reader = response.body?.getReader();
@@ -125,132 +122,165 @@ class ResponsesAdapter {
125
122
  return;
126
123
  }
127
124
  const decoder = new TextDecoder();
128
- let buffer = '';
125
+ const sse = new provider_events_1.ProviderSseDecoder();
129
126
  const calls = new Map();
127
+ const callAliases = new Map();
128
+ const resolveCall = (payload, item = {}) => {
129
+ const aliases = [];
130
+ const itemId = item.id ?? payload.item_id;
131
+ const callId = item.call_id ?? payload.call_id;
132
+ if (itemId)
133
+ aliases.push(`item:${itemId}`);
134
+ if (callId)
135
+ aliases.push(`call:${callId}`);
136
+ if (payload.output_index !== undefined)
137
+ aliases.push(`index:${payload.output_index}`);
138
+ const key = aliases.map(alias => callAliases.get(alias)).find(value => value !== undefined) ?? `call_${calls.size}`;
139
+ const call = calls.get(key) || { id: String(callId || itemId || ''), name: '', argumentParts: [] };
140
+ if (callId)
141
+ call.id = String(callId);
142
+ if (item.name || payload.name)
143
+ call.name = String(item.name || payload.name);
144
+ calls.set(key, call);
145
+ for (const alias of aliases)
146
+ callAliases.set(alias, key);
147
+ return call;
148
+ };
130
149
  const reasoningSummaries = new Map();
131
150
  let emittedContent = false;
132
151
  let completed = false;
133
152
  let streamError = '';
153
+ let completedResponse;
154
+ let emittedText = '';
134
155
  try {
135
- while (true) {
156
+ stream: while (true) {
136
157
  const { done, value } = await (0, provider_events_1.readProviderStreamChunk)(reader, signal);
137
158
  if (done)
138
159
  break;
139
- buffer += decoder.decode(value, { stream: true }).replace(/\r\n/g, '\n');
140
- const blocks = buffer.split(/\n\n+/);
141
- buffer = blocks.pop() || '';
142
- for (const block of blocks) {
143
- for (const event of (0, provider_events_1.parseProviderSse)(block + '\n\n')) {
144
- if (event.data === '[DONE]')
145
- continue;
146
- let payload;
147
- try {
148
- payload = JSON.parse(event.data);
149
- }
150
- catch {
151
- continue;
152
- }
153
- const eventType = String(event.event || payload.type || '');
154
- if (eventType === 'response.reasoning_summary_text.delta') {
155
- const key = `${String(payload.item_id || '')}:${String(payload.summary_index || 0)}`;
156
- const delta = this.extractText(payload.delta);
157
- if (delta) {
158
- emittedContent = true;
159
- reasoningSummaries.set(key, (reasoningSummaries.get(key) || '') + delta);
160
- yield { type: 'reasoning.summary.delta', delta };
161
- }
162
- continue;
163
- }
164
- if (eventType === 'response.reasoning_summary_text.done') {
165
- const key = `${String(payload.item_id || '')}:${String(payload.summary_index || 0)}`;
166
- const summary = this.extractText(payload.text) || reasoningSummaries.get(key) || '';
167
- reasoningSummaries.delete(key);
168
- if (summary) {
169
- emittedContent = true;
170
- yield { type: 'reasoning.summary.done', summary };
171
- }
172
- continue;
173
- }
174
- if (eventType === 'response.output_text.delta') {
175
- const delta = this.extractText(payload.delta);
176
- if (delta) {
177
- emittedContent = true;
178
- yield { type: 'text.delta', delta };
179
- }
180
- continue;
181
- }
182
- if (eventType === 'response.output_item.added') {
183
- const item = payload.item;
184
- if (item?.type === 'function_call') {
185
- const key = String(item.id || item.call_id || calls.size);
186
- calls.set(key, {
187
- id: String(item.call_id || item.id || key),
188
- name: String(item.name || ''),
189
- argumentParts: item.arguments ? [String(item.arguments)] : [],
190
- emitted: false,
191
- });
192
- }
193
- continue;
160
+ for (const event of sse.push(decoder.decode(value, { stream: true }))) {
161
+ if (event.data === '[DONE]')
162
+ continue;
163
+ let payload;
164
+ try {
165
+ payload = JSON.parse(event.data);
166
+ }
167
+ catch {
168
+ continue;
169
+ }
170
+ const eventType = String(event.event || payload.type || '');
171
+ if (eventType === 'response.reasoning_summary_text.delta') {
172
+ const key = `${String(payload.item_id || '')}:${String(payload.summary_index || 0)}`;
173
+ const delta = this.extractText(payload.delta);
174
+ if (delta) {
175
+ emittedContent = true;
176
+ reasoningSummaries.set(key, (reasoningSummaries.get(key) || '') + delta);
177
+ yield { type: 'reasoning.summary.delta', delta };
194
178
  }
195
- if (eventType === 'response.function_call_arguments.delta') {
196
- const key = String(payload.item_id || payload.call_id || payload.output_index || '');
197
- const call = calls.get(key) || { id: String(payload.call_id || key), name: String(payload.name || ''), argumentParts: [], emitted: false };
198
- const delta = String(payload.delta || '');
199
- if (delta)
200
- call.argumentParts.push(delta);
201
- calls.set(key, call);
202
- yield { type: 'tool_call.arguments.delta', id: call.id, delta };
203
- continue;
179
+ continue;
180
+ }
181
+ if (eventType === 'response.reasoning_summary_text.done') {
182
+ const key = `${String(payload.item_id || '')}:${String(payload.summary_index || 0)}`;
183
+ const summary = this.extractText(payload.text) || reasoningSummaries.get(key) || '';
184
+ reasoningSummaries.delete(key);
185
+ if (summary) {
186
+ emittedContent = true;
187
+ yield { type: 'reasoning.summary.done', summary };
204
188
  }
205
- if (eventType === 'response.output_item.done') {
206
- const item = payload.item;
207
- if (item?.type === 'function_call') {
208
- const key = String(item.id || item.call_id || payload.output_index || '');
209
- const call = calls.get(key) || {
210
- id: String(item.call_id || item.id || key),
211
- name: String(item.name || ''),
212
- argumentParts: item.arguments ? [String(item.arguments)] : [],
213
- emitted: false,
214
- };
215
- call.id = String(item.call_id || call.id);
216
- call.name = String(item.name || call.name);
217
- if (typeof item.arguments === 'string' && item.arguments)
218
- call.argumentParts.push(item.arguments);
219
- if (!call.emitted) {
220
- call.emitted = true;
221
- const argumentsJson = (0, provider_events_1.assembleCompatibleToolArguments)(call.argumentParts);
222
- yield { type: 'tool_call.started', id: call.id, name: call.name };
223
- if (argumentsJson !== '{}') {
224
- yield { type: 'tool_call.arguments.delta', id: call.id, delta: argumentsJson };
225
- }
226
- yield { type: 'tool_call.completed', id: call.id, name: call.name, arguments: argumentsJson };
227
- }
228
- calls.set(key, call);
229
- }
230
- continue;
189
+ continue;
190
+ }
191
+ if (eventType === 'response.output_text.delta') {
192
+ const delta = this.extractText(payload.delta);
193
+ if (delta) {
194
+ emittedContent = true;
195
+ emittedText += delta;
196
+ yield { type: 'text.delta', delta };
231
197
  }
232
- if (eventType === 'response.completed') {
233
- completed = true;
234
- const usage = this.normalizeUsage(payload.response ?? payload);
235
- if (usage)
236
- yield { type: 'usage.updated', usage };
237
- continue;
198
+ continue;
199
+ }
200
+ if (eventType === 'response.output_item.added') {
201
+ const item = payload.item;
202
+ if (item?.type === 'function_call') {
203
+ const call = resolveCall(payload, item);
204
+ if (item.arguments)
205
+ call.argumentParts.push(String(item.arguments));
206
+ call.status = String(item.status || '');
238
207
  }
239
- if (eventType === 'response.failed' || eventType === 'response.incomplete' || eventType === 'error') {
240
- const errorPayload = payload.error || {};
241
- const responseObj = payload.response && typeof payload.response === 'object'
242
- ? payload.response.error
243
- : undefined;
244
- streamError = this.extractText(errorPayload.message)
245
- || this.extractText(responseObj?.message)
246
- || this.extractText(payload.message)
247
- || eventType;
208
+ continue;
209
+ }
210
+ if (eventType === 'response.function_call_arguments.delta') {
211
+ const call = resolveCall(payload);
212
+ const delta = String(payload.delta || '');
213
+ if (delta)
214
+ call.argumentParts.push(delta);
215
+ yield { type: 'tool_call.arguments.delta', id: call.id, delta };
216
+ continue;
217
+ }
218
+ if (eventType === 'response.function_call_arguments.done') {
219
+ const call = resolveCall(payload);
220
+ if (payload.name)
221
+ call.name = String(payload.name);
222
+ if (typeof payload.arguments === 'string')
223
+ call.finalArguments = payload.arguments;
224
+ continue;
225
+ }
226
+ if (eventType === 'response.output_item.done') {
227
+ const item = payload.item;
228
+ if (item?.type === 'function_call') {
229
+ const call = resolveCall(payload, item);
230
+ call.id = String(item.call_id || call.id);
231
+ call.name = String(item.name || call.name);
232
+ if (typeof item.arguments === 'string')
233
+ call.finalArguments = item.arguments;
234
+ call.status = String(item.status || '');
248
235
  }
236
+ continue;
249
237
  }
238
+ if (eventType === 'response.completed') {
239
+ completedResponse = (0, provider_events_1.normalizeResponsesPayload)(payload.response ?? payload);
240
+ streamError = this.completionError(completedResponse, response.headers);
241
+ completed = !streamError;
242
+ const usage = this.normalizeUsage(completedResponse);
243
+ if (usage)
244
+ yield { type: 'usage.updated', usage };
245
+ break stream;
246
+ }
247
+ if (eventType === 'response.failed' || eventType === 'response.incomplete' || eventType === 'error') {
248
+ const usage = this.normalizeUsage(payload.response ?? payload);
249
+ if (usage)
250
+ yield { type: 'usage.updated', usage };
251
+ const errorPayload = payload.error || {};
252
+ const responseObj = payload.response && typeof payload.response === 'object'
253
+ ? payload.response.error
254
+ : undefined;
255
+ streamError = (0, provider_events_1.providerSemanticErrorText)(payload.error || responseObj || payload, this.extractText(errorPayload.message)
256
+ || this.extractText(responseObj?.message)
257
+ || this.extractText(payload.message)
258
+ || eventType, response.headers);
259
+ break stream;
260
+ }
261
+ }
262
+ }
263
+ if (completedResponse && completed) {
264
+ const snapshotText = this.extractResponsesText(completedResponse);
265
+ if (snapshotText && snapshotText.startsWith(emittedText) && snapshotText.length > emittedText.length) {
266
+ yield { type: 'text.delta', delta: snapshotText.slice(emittedText.length) };
267
+ emittedText = snapshotText;
268
+ emittedContent = true;
269
+ }
270
+ for (const raw of Array.isArray(completedResponse.output) ? completedResponse.output : []) {
271
+ const item = raw;
272
+ if (item.type !== 'function_call')
273
+ continue;
274
+ const call = resolveCall({}, item);
275
+ call.id = String(item.call_id || call.id);
276
+ call.name = String(item.name || call.name);
277
+ if (typeof item.arguments === 'string')
278
+ call.finalArguments = item.arguments;
279
+ call.status = String(item.status || '');
250
280
  }
251
281
  }
252
282
  if (streamError) {
253
- yield { type: 'response.failed', error: `[LLM Error] ${streamError}` };
283
+ yield { type: 'response.failed', error: streamError.startsWith('[LLM Error]') ? streamError : `[LLM Error] ${streamError}` };
254
284
  }
255
285
  else if (!completed) {
256
286
  yield { type: 'response.failed', error: '[LLM Error] Responses stream ended before response.completed.' };
@@ -262,21 +292,30 @@ class ResponsesAdapter {
262
292
  // Some compatible Responses providers omit output_item.done but still
263
293
  // complete the response. Preserve that valid tool activity and fold
264
294
  // cumulative argument snapshots before handing it to the kernel.
265
- for (const call of calls.values()) {
266
- if (call.emitted)
267
- continue;
268
- const argumentsJson = (0, provider_events_1.assembleCompatibleToolArguments)(call.argumentParts);
295
+ const completeCalls = [...calls.values()].map(call => ({ ...call,
296
+ argumentsJson: call.finalArguments ?? (0, provider_events_1.assembleCompatibleToolArguments)(call.argumentParts, true) }));
297
+ if (completeCalls.some(call => !call.id || !call.name || call.status === 'incomplete' || !this.validToolArguments(call.argumentsJson))) {
298
+ yield { type: 'response.failed', error: '[LLM Error] Provider returned incomplete or invalid tool-call arguments.' };
299
+ return;
300
+ }
301
+ for (const call of completeCalls) {
269
302
  yield { type: 'tool_call.started', id: call.id, name: call.name };
270
- yield { type: 'tool_call.completed', id: call.id, name: call.name, arguments: argumentsJson };
303
+ yield { type: 'tool_call.completed', id: call.id, name: call.name, arguments: call.argumentsJson };
271
304
  }
272
305
  yield { type: 'response.completed' };
273
306
  }
274
307
  }
275
308
  finally {
309
+ // Completion and consumer return are terminal even if a gateway keeps
310
+ // the HTTP body open. Release the socket as well as the reader lock.
311
+ try {
312
+ await reader.cancel();
313
+ }
314
+ catch { }
276
315
  reader.releaseLock();
277
316
  }
278
317
  }
279
- async *emitNonStreaming(json) {
318
+ async *emitNonStreaming(json, headers) {
280
319
  const usage = this.normalizeUsage(json.usage ?? json.response ?? json);
281
320
  if (usage)
282
321
  yield { type: 'usage.updated', usage };
@@ -289,15 +328,25 @@ class ResponsesAdapter {
289
328
  emitted = true;
290
329
  yield { type: 'text.delta', delta: text };
291
330
  }
292
- for (const itemRaw of Array.isArray(json.output) ? json.output : []) {
331
+ const error = this.completionError(json, headers);
332
+ if (error) {
333
+ yield { type: 'response.failed', error };
334
+ return;
335
+ }
336
+ const completeCalls = (Array.isArray(json.output) ? json.output : []).filter(item => item?.type === 'function_call').map(itemRaw => {
293
337
  const item = itemRaw;
294
- if (item.type !== 'function_call')
295
- continue;
296
- emitted = true;
297
338
  const id = String(item.call_id || item.id || '');
298
339
  const name = String(item.name || '');
340
+ const args = typeof item.arguments === 'string' ? item.arguments : item.arguments ? JSON.stringify(item.arguments) : '';
341
+ return { id, name, args, status: String(item.status || '') };
342
+ });
343
+ if (completeCalls.some(call => !call.id || !call.name || call.status === 'incomplete' || !this.validToolArguments(call.args))) {
344
+ yield { type: 'response.failed', error: '[LLM Error] Provider returned incomplete or invalid tool-call arguments.' };
345
+ return;
346
+ }
347
+ for (const { id, name, args } of completeCalls) {
348
+ emitted = true;
299
349
  yield { type: 'tool_call.started', id, name };
300
- const args = typeof item.arguments === 'string' ? item.arguments : JSON.stringify(item.arguments || {});
301
350
  if (args && args !== '{}')
302
351
  yield { type: 'tool_call.arguments.delta', id, delta: args };
303
352
  yield { type: 'tool_call.completed', id, name, arguments: args };
@@ -311,6 +360,23 @@ class ResponsesAdapter {
311
360
  normalizeUsage(value) {
312
361
  return (0, provider_events_1.normalizeProviderUsage)(value);
313
362
  }
363
+ completionError(json, headers) {
364
+ const status = String(json.status || '');
365
+ if (!json.error && (!status || status === 'completed'))
366
+ return '';
367
+ const error = json.error && typeof json.error === 'object' ? json.error : {};
368
+ const incomplete = json.incomplete_details && typeof json.incomplete_details === 'object' ? json.incomplete_details : {};
369
+ return (0, provider_events_1.providerSemanticErrorText)(error, this.extractText(error.message || json.error) || `Responses response was ${status || 'unsuccessful'}${incomplete.reason ? ': ' + String(incomplete.reason) : '.'}`, headers);
370
+ }
371
+ validToolArguments(value) {
372
+ try {
373
+ const parsed = JSON.parse(value);
374
+ return !!parsed && typeof parsed === 'object' && !Array.isArray(parsed);
375
+ }
376
+ catch {
377
+ return false;
378
+ }
379
+ }
314
380
  normalizeHeaders(headers) {
315
381
  return (0, provider_headers_1.normalizeProviderHeaders)(headers);
316
382
  }
package/dist/server.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Agent, AgentWorkEvent } from './core/agent';
2
2
  import { AutomationManager } from './core/automation';
3
+ import type { AgentPromptMessage } from './core/conversationKernel';
3
4
  export interface HostedMobileServerOptions {
4
5
  agent?: Agent;
5
6
  automation?: AutomationManager | null;
@@ -11,20 +12,26 @@ export interface HostedMobileServerOptions {
11
12
  conversationUiState?: (target: {
12
13
  workspaceId: string;
13
14
  conversationId: string;
15
+ }, options?: {
16
+ window?: number;
17
+ before?: number;
14
18
  }) => Promise<Record<string, unknown>>;
15
19
  /** Mutate Goal/Flow state owned by the GUI runtime pool for one exact target. */
16
20
  conversationUiAction?: (target: {
17
21
  workspaceId: string;
18
22
  conversationId: string;
19
- }, action: 'goal_update' | 'goal_guide' | 'conversation_guide' | 'goal_toggle_pause' | 'goal_clear' | 'flow_pause' | 'flow_resume' | 'flow_guide' | 'conversation_stop' | 'input_mode' | 'queue_enqueue' | 'queue_update' | 'queue_delete' | 'queue_reorder' | 'queue_toggle_pause' | 'queue_guide', value?: string, input?: Record<string, unknown>) => Promise<Record<string, unknown>>;
23
+ }, action: 'goal_update' | 'goal_guide' | 'conversation_guide' | 'goal_toggle_pause' | 'goal_clear' | 'flow_pause' | 'flow_resume' | 'flow_guide' | 'conversation_stop' | 'mode' | 'input_mode' | 'queue_enqueue' | 'queue_update' | 'queue_delete' | 'queue_reorder' | 'queue_toggle_pause' | 'queue_set_pause' | 'queue_guide' | 'conversation_branch_inspect' | 'conversation_branch_activate' | 'conversation_branch_create' | 'conversation_archive', value?: string, input?: Record<string, unknown>) => Promise<Record<string, unknown>>;
20
24
  /** Send through the same GUI runtime pool used by the desktop renderer. */
21
25
  conversationPrompt?: (target: {
22
26
  workspaceId: string;
23
27
  conversationId: string;
24
- }, message: string, options?: {
28
+ }, message: string | AgentPromptMessage, options?: {
25
29
  requestedMode?: string;
26
30
  goalObjective?: string;
27
31
  inputMode?: string;
32
+ clientMessageId?: string;
33
+ flowName?: string;
34
+ flowStart?: number;
28
35
  }) => Promise<Record<string, unknown>>;
29
36
  }
30
37
  export interface HostedMobileServerStatus {