Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

fix: restore markdown rendering in stream, notify user on scheduled task execution, add full temp scope for scheduled tasks

Salman Qureshicebc9afd5587
diff --git a/src/channels/cli.ts b/src/channels/cli.ts
index c8616bc4..db20cf7f 100644
--- a/src/channels/cli.ts
+++ b/src/channels/cli.ts
@@ -200,23 +200,24 @@ export class CLIChannel extends BaseChannel {
this.stopSpinner();
if (!this.turnHeaderPrinted) {
this.turnHeaderPrinted = true;
- console.log('');
- console.log(agentName(this.agentName, ''));
- console.log('');
+ process.stdout.write(chalk.dim(` ${this.agentName} is thinking...\r`));
}
- process.stdout.write(chunk);
full += chunk;
}
this.streamActive = false;
if (!full.trim()) {
+ process.stdout.write('\x1b[2K\r');
console.log('');
this.endOutput();
return full;
}
- console.log('');
- console.log('');
+ process.stdout.write('\x1b[2K\r');
+ const block = this.formatBlock(this.agentName, '', full);
+ for (const line of block) {
+ console.log(line);
+ }
this.endOutput();
return full;
diff --git a/src/core/agent.ts b/src/core/agent.ts
index c3947bd0..3ba37383 100644
--- a/src/core/agent.ts
+++ b/src/core/agent.ts
@@ -234,6 +234,7 @@ export class Agent {
const isScheduled = msg.senderId === 'system' && msg.channelType !== 'internal';
if (isInternal || isScheduled) {
this.capabilities.permissions.setAutoApproveAll(true);
+ this.capabilities.permissions.addTempScope('/', true, true);
}
try {
@@ -695,6 +696,18 @@ Always specify owner and repo parameters on GitHub tools. The user's GitHub user
private async handleScheduledTask(manifest: ScheduledTaskManifest): Promise<void> {
logger.info({ task: manifest.id, channel: manifest.sourceChannelType }, 'Processing scheduled task');
try {
+ const channel = manifest.sourceChannelType
+ ? this.channels.get(manifest.sourceChannelType as ChannelType)
+ : this.channels.getNotificationChannel();
+
+ if (channel && manifest.sourceChannelType !== 'internal') {
+ const skillInfo = manifest.skillName ? ` (${manifest.skillName})` : '';
+ await channel.send(
+ ` Scheduled task started${skillInfo}: ${manifest.description}\nAll actions auto-approved for this run.`,
+ manifest.sourceChannelId,
+ ).catch(() => {});
+ }
+
let prompt = manifest.prompt || '';
if (manifest.skillName) {
const skillHint = `Invoke the skill "${manifest.skillName}" using the use_skill tool and follow its instructions.`;