@kendoo.agentdesk/agentdesk 0.9.0 → 0.9.2
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/README.md +4 -4
- package/bin/agentdesk.mjs +1 -1
- package/cli/daemon.mjs +2 -0
- package/cli/orchestrator.mjs +20 -5
- package/cli/team.mjs +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ agentdesk update Update to the latest version
|
|
|
79
79
|
|------|-------------|
|
|
80
80
|
| `--description`, `-d` | Task description or requirements |
|
|
81
81
|
| `--cwd` | Working directory (defaults to current) |
|
|
82
|
-
| `--lite` | Lite mode —
|
|
82
|
+
| `--lite` | Lite mode — all agents share one process (faster, cheaper) |
|
|
83
83
|
|
|
84
84
|
## Configuration
|
|
85
85
|
|
|
@@ -116,7 +116,7 @@ AgentDesk also auto-discovers agents from `.claude/agents/`, `.claude/commands/`
|
|
|
116
116
|
|
|
117
117
|
## How It Works
|
|
118
118
|
|
|
119
|
-
Each agent runs
|
|
119
|
+
Each agent runs in its own Claude process — not one model role-playing multiple personas. This produces genuine disagreements and better output because each agent reasons separately.
|
|
120
120
|
|
|
121
121
|
1. You run `agentdesk team TASK-ID` in your project directory
|
|
122
122
|
2. AgentDesk detects your project type, reads `CLAUDE.md`, and discovers existing agents
|
|
@@ -130,8 +130,8 @@ Each agent runs as its own independent Claude session — not one model role-pla
|
|
|
130
130
|
|
|
131
131
|
| Mode | Command | Description |
|
|
132
132
|
|------|---------|-------------|
|
|
133
|
-
| Full (default) | `agentdesk team -d "..."` | Each agent
|
|
134
|
-
| Lite | `agentdesk team -d "..." --lite` | All agents share one
|
|
133
|
+
| Full (default) | `agentdesk team -d "..."` | Each agent runs in its own process. Better output. |
|
|
134
|
+
| Lite | `agentdesk team -d "..." --lite` | All agents share one process. Faster and cheaper. |
|
|
135
135
|
|
|
136
136
|
## Daemon (Remote Sessions)
|
|
137
137
|
|
package/bin/agentdesk.mjs
CHANGED
|
@@ -65,7 +65,7 @@ if (!command || command === "help" || command === "--help") {
|
|
|
65
65
|
Options:
|
|
66
66
|
--description, -d Task description or requirements
|
|
67
67
|
--cwd Working directory (defaults to current)
|
|
68
|
-
--lite Lite mode —
|
|
68
|
+
--lite Lite mode — all agents share one process (faster, cheaper)
|
|
69
69
|
|
|
70
70
|
How it works:
|
|
71
71
|
With a tracker (Linear, Jira, GitHub Issues):
|
package/cli/daemon.mjs
CHANGED
|
@@ -370,6 +370,8 @@ export async function runDaemon() {
|
|
|
370
370
|
inboxUrl, sessionUrl,
|
|
371
371
|
cwd: project.path,
|
|
372
372
|
mode: mode || "full",
|
|
373
|
+
apiKey,
|
|
374
|
+
serverUrl: agentdeskServer,
|
|
373
375
|
onEvent(event) {
|
|
374
376
|
sendBuffered(sessionId, event);
|
|
375
377
|
// Track file paths for metadata logging
|
package/cli/orchestrator.mjs
CHANGED
|
@@ -14,6 +14,19 @@ const CLI_VERSION = JSON.parse(readFileSync(join(__dirname, "../package.json"),
|
|
|
14
14
|
import { buildAgentPrompt, getAgentTools } from "./agent-prompts.mjs";
|
|
15
15
|
import { detectProject, generateContext } from "./detect.mjs";
|
|
16
16
|
|
|
17
|
+
// Fetch decrypted tracker credentials from server
|
|
18
|
+
async function fetchTrackerCredentials(projectName, apiKey, serverUrl) {
|
|
19
|
+
if (!apiKey || !serverUrl || !projectName) return {};
|
|
20
|
+
try {
|
|
21
|
+
const res = await fetch(`${serverUrl}/api/projects/${projectName}/settings/credentials`, {
|
|
22
|
+
headers: { "x-api-key": apiKey },
|
|
23
|
+
signal: AbortSignal.timeout(5000),
|
|
24
|
+
});
|
|
25
|
+
if (res.ok) return await res.json();
|
|
26
|
+
} catch {}
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
function loadDotEnv(dir) {
|
|
18
31
|
const envPath = join(dir, ".env");
|
|
19
32
|
if (!existsSync(envPath)) return {};
|
|
@@ -37,11 +50,11 @@ function timestamp() {
|
|
|
37
50
|
export async function runOrchestrator({
|
|
38
51
|
taskId, taskLink, description, createTask, tracker, config,
|
|
39
52
|
project, team, teamSections, inboxUrl, sessionUrl, cwd,
|
|
40
|
-
onEvent, mode = "full",
|
|
53
|
+
onEvent, mode = "full", apiKey, serverUrl,
|
|
41
54
|
}) {
|
|
42
55
|
// --- Lite mode: single process, legacy behavior ---
|
|
43
56
|
if (mode === "lite") {
|
|
44
|
-
return runLiteMode({ taskId, taskLink, description, createTask, tracker, config, project, teamSections, inboxUrl, sessionUrl, cwd, onEvent });
|
|
57
|
+
return runLiteMode({ taskId, taskLink, description, createTask, tracker, config, project, teamSections, inboxUrl, sessionUrl, cwd, onEvent, apiKey, serverUrl });
|
|
45
58
|
}
|
|
46
59
|
|
|
47
60
|
// --- Full mode: independent sub-agents ---
|
|
@@ -54,7 +67,8 @@ export async function runOrchestrator({
|
|
|
54
67
|
totalSteps: 0,
|
|
55
68
|
};
|
|
56
69
|
|
|
57
|
-
const
|
|
70
|
+
const trackerCreds = await fetchTrackerCredentials(project?.name, apiKey, serverUrl);
|
|
71
|
+
const env = { ...process.env, ...loadDotEnv(cwd), ...trackerCreds };
|
|
58
72
|
|
|
59
73
|
// Emit event to WebSocket (same protocol as single-process mode)
|
|
60
74
|
function emit(event) {
|
|
@@ -303,8 +317,9 @@ export async function runOrchestrator({
|
|
|
303
317
|
|
|
304
318
|
// --- Lite mode: single Claude process with all agents as personas ---
|
|
305
319
|
|
|
306
|
-
async function runLiteMode({ taskId, taskLink, description, createTask, tracker, config, project, teamSections, inboxUrl, sessionUrl, cwd, onEvent }) {
|
|
307
|
-
const
|
|
320
|
+
async function runLiteMode({ taskId, taskLink, description, createTask, tracker, config, project, teamSections, inboxUrl, sessionUrl, cwd, onEvent, apiKey, serverUrl }) {
|
|
321
|
+
const trackerCreds = await fetchTrackerCredentials(project?.name, apiKey, serverUrl);
|
|
322
|
+
const env = { ...process.env, ...loadDotEnv(cwd), ...trackerCreds };
|
|
308
323
|
const startTime = Date.now();
|
|
309
324
|
let totalInputTokens = 0;
|
|
310
325
|
let totalOutputTokens = 0;
|
package/cli/team.mjs
CHANGED
|
@@ -170,13 +170,15 @@ export async function runTeam(taskId, opts = {}) {
|
|
|
170
170
|
connectWs();
|
|
171
171
|
|
|
172
172
|
const agentMode = lite ? "lite" : "full";
|
|
173
|
-
console.log(`Agents: ${agentMode === "lite" ? "lite (shared)" : "full (independent)"}\n`);
|
|
173
|
+
console.log(`Agents: ${agentMode === "lite" ? "lite (shared process)" : "full (independent process)"}\n`);
|
|
174
174
|
|
|
175
175
|
const result = await runOrchestrator({
|
|
176
176
|
taskId, taskLink, description, createTask, tracker, config,
|
|
177
177
|
project, team, teamSections, inboxUrl, sessionUrl, cwd,
|
|
178
178
|
onEvent: vizSend,
|
|
179
179
|
mode: agentMode,
|
|
180
|
+
apiKey,
|
|
181
|
+
serverUrl: agentdeskServer,
|
|
180
182
|
});
|
|
181
183
|
|
|
182
184
|
console.log(`\n━━━ DONE ━━━`);
|