tuna-agent 0.1.56 → 0.1.57
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/daemon/index.js +13 -0
- package/package.json +1 -1
package/dist/daemon/index.js
CHANGED
|
@@ -181,6 +181,19 @@ export async function startDaemon(config) {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
+
// Register agent folders for rules parsing from server-provided list
|
|
185
|
+
if (Array.isArray(msg.agentFolders) && adapter.type === 'claude-code') {
|
|
186
|
+
const ccAdapter = adapter;
|
|
187
|
+
for (const af of msg.agentFolders) {
|
|
188
|
+
if (af.id && af.folder_path) {
|
|
189
|
+
const folder = af.folder_path.startsWith('~')
|
|
190
|
+
? path.join(os.homedir(), af.folder_path.slice(1))
|
|
191
|
+
: af.folder_path;
|
|
192
|
+
ccAdapter.registerAgentFolder(af.id, folder);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
console.log(`[Daemon] Registered ${msg.agentFolders.length} agent folder(s) for rules sync`);
|
|
196
|
+
}
|
|
184
197
|
// Recover orphaned tasks — pass activeTaskId so API won't fail a task we're still running
|
|
185
198
|
ws.send({ action: 'recover_orphaned_tasks', activeTaskId: currentTaskId ?? undefined });
|
|
186
199
|
break;
|