@dmsdc-ai/aigentry-deliberation 0.0.32 → 0.0.33
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/index.js +35 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3324,6 +3324,41 @@ server.tool(
|
|
|
3324
3324
|
})
|
|
3325
3325
|
);
|
|
3326
3326
|
|
|
3327
|
+
server.tool(
|
|
3328
|
+
"deliberation_list_remote_sessions",
|
|
3329
|
+
"List all active deliberation sessions on a remote machine (via Tailscale/IP) to find the correct session_id for context injection.",
|
|
3330
|
+
{
|
|
3331
|
+
remote_url: z.string().describe("The Tailscale IP or Host and port (e.g., '100.100.100.5:3847') of the remote machine."),
|
|
3332
|
+
},
|
|
3333
|
+
safeToolHandler("deliberation_list_remote_sessions", async ({ remote_url }) => {
|
|
3334
|
+
try {
|
|
3335
|
+
const baseUrl = remote_url.startsWith("http") ? remote_url : `http://${remote_url}`;
|
|
3336
|
+
const cleanBaseUrl = baseUrl.replace(/\/$/, "");
|
|
3337
|
+
const response = await fetch(`${cleanBaseUrl}/api/sessions`);
|
|
3338
|
+
|
|
3339
|
+
if (!response.ok) {
|
|
3340
|
+
return { content: [{ type: "text", text: `❌ Failed to fetch remote sessions (${response.status})` }] };
|
|
3341
|
+
}
|
|
3342
|
+
|
|
3343
|
+
const sessions = await response.json();
|
|
3344
|
+
if (!Array.isArray(sessions) || sessions.length === 0) {
|
|
3345
|
+
return { content: [{ type: "text", text: `No active deliberation sessions found on ${remote_url}.` }] };
|
|
3346
|
+
}
|
|
3347
|
+
|
|
3348
|
+
let result = `### Active Sessions on ${remote_url}\n\n`;
|
|
3349
|
+
for (const s of sessions) {
|
|
3350
|
+
result += `- **ID:** \`${s.id}\`\n`;
|
|
3351
|
+
result += ` **Topic:** ${s.topic}\n`;
|
|
3352
|
+
result += ` **Status:** ${s.status} (Round ${s.current_round}/${s.max_rounds})\n\n`;
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3355
|
+
return { content: [{ type: "text", text: result }] };
|
|
3356
|
+
} catch (e) {
|
|
3357
|
+
return { content: [{ type: "text", text: `❌ Error connecting to remote machine at ${remote_url}: ${e.message}` }] };
|
|
3358
|
+
}
|
|
3359
|
+
})
|
|
3360
|
+
);
|
|
3361
|
+
|
|
3327
3362
|
server.tool(
|
|
3328
3363
|
"deliberation_inject_context",
|
|
3329
3364
|
"Inject additional context or instructions into a specific active session. (Useful for local or remote context injection via Tailscale)",
|
package/package.json
CHANGED