@openacp/cli 2026.403.5 → 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 +12 -16
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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 });
|
|
@@ -18208,7 +18206,7 @@ var init_path_guard = __esm({
|
|
|
18208
18206
|
reason: `Path is outside workspace boundary: ${realPath}`
|
|
18209
18207
|
};
|
|
18210
18208
|
}
|
|
18211
|
-
if (isWithinCwd) {
|
|
18209
|
+
if (isWithinCwd && !isWithinAllowed) {
|
|
18212
18210
|
const relativePath = path43.relative(this.cwd, realPath);
|
|
18213
18211
|
if (relativePath === ".openacpignore") {
|
|
18214
18212
|
return { allowed: true, reason: "" };
|
|
@@ -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);
|
|
@@ -25035,13 +25035,9 @@ async function promptConfiguredAction(label) {
|
|
|
25035
25035
|
);
|
|
25036
25036
|
}
|
|
25037
25037
|
async function configureViaPlugin(channelId, settingsManager) {
|
|
25038
|
-
const pluginMap = {
|
|
25039
|
-
telegram: { importPath: "../../plugins/telegram/index.js", name: "@openacp/telegram" }
|
|
25040
|
-
};
|
|
25041
|
-
const pluginInfo = pluginMap[channelId];
|
|
25042
25038
|
let plugin2;
|
|
25043
|
-
if (
|
|
25044
|
-
const pluginModule = await
|
|
25039
|
+
if (channelId === "telegram") {
|
|
25040
|
+
const pluginModule = await Promise.resolve().then(() => (init_telegram2(), telegram_exports));
|
|
25045
25041
|
plugin2 = pluginModule.default;
|
|
25046
25042
|
} else {
|
|
25047
25043
|
try {
|
|
@@ -26521,9 +26517,9 @@ Stops the running daemon (if any) and starts a new one.
|
|
|
26521
26517
|
const { checkAndPromptUpdate: checkAndPromptUpdate2 } = await Promise.resolve().then(() => (init_version(), version_exports));
|
|
26522
26518
|
await checkAndPromptUpdate2();
|
|
26523
26519
|
const pidPath = getPidPath2(root);
|
|
26524
|
-
console.log("Stopping...");
|
|
26520
|
+
if (!json) console.log("Stopping...");
|
|
26525
26521
|
const stopResult = await stopDaemon2(pidPath, root);
|
|
26526
|
-
if (stopResult.stopped) {
|
|
26522
|
+
if (!json && stopResult.stopped) {
|
|
26527
26523
|
console.log(`Stopped daemon (was PID ${stopResult.pid})`);
|
|
26528
26524
|
}
|
|
26529
26525
|
const cm = new ConfigManager2(path60.join(root, "config.json"));
|