@openacp/cli 2026.403.6 → 2026.403.7

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/dist/cli.js CHANGED
@@ -11683,9 +11683,7 @@ async function createSessionDirect(ctx, core, chatId, agentName, workspace, onCo
11683
11683
  message_thread_id: threadId,
11684
11684
  parse_mode: "HTML"
11685
11685
  });
11686
- const session = await core.handleNewSession("telegram", agentName, workspace);
11687
- session.threadId = String(threadId);
11688
- await core.sessionManager.patchRecord(session.id, { platform: { topicId: threadId } });
11686
+ const session = await core.handleNewSession("telegram", agentName, workspace, { threadId: String(threadId) });
11689
11687
  const finalName = `\u{1F504} ${session.agentName} \u2014 New Session`;
11690
11688
  try {
11691
11689
  await ctx.api.editForumTopic(chatId, threadId, { name: finalName });
@@ -19499,8 +19497,9 @@ Additionally, include a [TTS]...[/TTS] block with a spoken-friendly summary of y
19499
19497
  this.queue = new PromptQueue(
19500
19498
  (text6, attachments) => this.processPrompt(text6, attachments),
19501
19499
  (err) => {
19502
- this.fail("Prompt execution failed");
19503
19500
  this.log.error({ err }, "Prompt execution failed");
19501
+ const message = err instanceof Error ? err.message : String(err);
19502
+ this.emit("agent_event", { type: "error", message: `Prompt execution failed: ${message}` });
19504
19503
  }
19505
19504
  );
19506
19505
  this.agentInstance.on("agent_event", (event) => {
@@ -21221,7 +21220,8 @@ var init_session_factory = __esm({
21221
21220
  channelId: params.channelId,
21222
21221
  agentName: params.agentName,
21223
21222
  workingDirectory: params.workingDirectory,
21224
- createThread: params.createThread
21223
+ createThread: params.createThread,
21224
+ threadId: params.threadId
21225
21225
  });
21226
21226
  if (contextResult) {
21227
21227
  session.setContext(contextResult.markdown);
@@ -22738,9 +22738,9 @@ var init_assistant_manager = __esm({
22738
22738
  agentName: this.core.configManager.get().defaultAgent,
22739
22739
  workingDirectory: this.core.configManager.resolveWorkspace(),
22740
22740
  initialName: "Assistant",
22741
- isAssistant: true
22741
+ isAssistant: true,
22742
+ threadId
22742
22743
  });
22743
- session.threadId = threadId;
22744
22744
  this.sessions.set(channelId, session);
22745
22745
  const systemPrompt = this.registry.buildSystemPrompt(channelId);
22746
22746
  this.pendingSystemPrompts.set(channelId, systemPrompt);