@kendoo.agentdesk/agentdesk 0.11.4 → 0.11.6

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/cli/daemon.mjs CHANGED
@@ -367,7 +367,6 @@ export async function runDaemon() {
367
367
  const team = resolveTeam(config);
368
368
  const teamSections = generateTeamPrompt(team, { tracker, config });
369
369
 
370
- const inboxUrl = `${agentdeskServer}/api/sessions/${sessionId}/inbox`;
371
370
  const sessionUrl = `${agentdeskServer}/sessions/${sessionId}`;
372
371
 
373
372
  // Run orchestrator
@@ -377,7 +376,7 @@ export async function runDaemon() {
377
376
  createTask: !remoteTaskId && !!prompt && !!tracker,
378
377
  tracker, config,
379
378
  project: detected, team, teamSections,
380
- inboxUrl, sessionUrl,
379
+ sessionUrl,
381
380
  cwd: project.path,
382
381
  apiKey,
383
382
  serverUrl: agentdeskServer,
package/cli/init.mjs CHANGED
@@ -352,6 +352,17 @@ export async function runInit(cwd) {
352
352
  writeFileSync(configPath, JSON.stringify(merged, null, 2) + "\n");
353
353
  console.log(` Saved .agentdesk.json`);
354
354
 
355
+ // Ensure .agentdesk/ is gitignored (local runtime state — memory, cache, etc.)
356
+ const gitignorePath = join(project.dir, ".gitignore");
357
+ try {
358
+ const existing = existsSync(gitignorePath) ? readFileSync(gitignorePath, "utf-8") : "";
359
+ if (!existing.split("\n").some(line => line.trim() === ".agentdesk/" || line.trim() === ".agentdesk")) {
360
+ const nl = existing.endsWith("\n") || !existing ? "" : "\n";
361
+ writeFileSync(gitignorePath, `${existing}${nl}.agentdesk/\n`);
362
+ console.log(` Added .agentdesk/ to .gitignore`);
363
+ }
364
+ } catch {}
365
+
355
366
  // Register in local project index (for daemon discovery)
356
367
  registerLocalProject(finalProjectKey, project.name || finalProjectKey, project.dir);
357
368
 
@@ -46,7 +46,7 @@ function timestamp() {
46
46
 
47
47
  export async function runOrchestrator({
48
48
  taskId, taskLink, description, createTask, tracker, config,
49
- project, team, teamSections, inboxUrl, sessionUrl, cwd,
49
+ project, team, teamSections, sessionUrl, cwd,
50
50
  onEvent, apiKey, serverUrl, soloAgent, childStrategy,
51
51
  }) {
52
52
  const trackerCreds = await fetchTrackerCredentials(project?.name, apiKey, serverUrl);
@@ -64,8 +64,8 @@ export async function runOrchestrator({
64
64
  }
65
65
 
66
66
  const fullPrompt = soloAgent
67
- ? buildSoloPrompt({ agentName: soloAgent, taskId, description, tracker, config, project, sessionUrl, childStrategy })
68
- : buildPrompt({ taskId, taskLink, description, createTask, tracker, config, project, teamSections, inboxUrl, sessionUrl });
67
+ ? buildSoloPrompt({ agentName: soloAgent, taskId, description, tracker, config, project, sessionUrl, childStrategy, cwd })
68
+ : buildPrompt({ taskId, taskLink, description, createTask, tracker, config, project, teamSections, sessionUrl, cwd });
69
69
 
70
70
  emit({
71
71
  type: "session:start",
package/cli/prompt.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  // Shared prompt builder — used by both `agentdesk team` and `agentdesk daemon`
2
2
 
3
- import { readFileSync } from "fs";
4
- import { resolve, dirname } from "path";
3
+ import { readFileSync, existsSync } from "fs";
4
+ import { resolve, dirname, join } from "path";
5
5
  import { fileURLToPath } from "url";
6
6
  import { generateContext } from "./detect.mjs";
7
7
  import { BUILT_IN_AGENTS } from "./agents.mjs";
@@ -9,7 +9,30 @@ import { BUILT_IN_AGENTS } from "./agents.mjs";
9
9
  const __dirname = dirname(fileURLToPath(import.meta.url));
10
10
  const PROMPT_PATH = resolve(__dirname, "../prompts/team.md");
11
11
 
12
- export function buildPrompt({ taskId, taskLink, description, createTask, tracker, config, project, teamSections, inboxUrl, sessionUrl }) {
12
+ function loadProjectMemory(cwd) {
13
+ if (!cwd) return "";
14
+ const memPath = join(cwd, ".agentdesk", "memory.md");
15
+ try {
16
+ if (existsSync(memPath)) return readFileSync(memPath, "utf-8").trim();
17
+ } catch {}
18
+ return "";
19
+ }
20
+
21
+ const MEMORY_INSTRUCTIONS = `
22
+ ## Project Memory
23
+
24
+ The team has a shared memory file at \`.agentdesk/memory.md\` for storing learnings that should persist across sessions. This is LOCAL and gitignored — it never leaves this machine.
25
+
26
+ **When to save**: After discovering something non-obvious that cost time (test setup steps, required seed data, login credentials for test env, workarounds, environment quirks, deployment steps). If you had to figure it out, save it so you don't have to next time.
27
+
28
+ **When NOT to save**: Code patterns, architecture, or anything derivable from the codebase. Don't duplicate what's already in README or CLAUDE.md.
29
+
30
+ **Format**: Use clear markdown sections. Update existing sections rather than appending duplicates. Never store real secrets — reference env vars instead (e.g. \`$TEST_ADMIN_PASSWORD\`).
31
+
32
+ **How**: Use the Edit or Write tool on \`.agentdesk/memory.md\`. Create the file if it doesn't exist.
33
+ `.trim();
34
+
35
+ export function buildPrompt({ taskId, taskLink, description, createTask, tracker, config, project, teamSections, sessionUrl, cwd }) {
13
36
  let prompt = readFileSync(PROMPT_PATH, "utf-8");
14
37
 
15
38
  // Team substitution
@@ -87,7 +110,6 @@ export function buildPrompt({ taskId, taskLink, description, createTask, tracker
87
110
  }
88
111
 
89
112
  // Inject URLs into prompt
90
- prompt = prompt.replace(/\{\{AGENTDESK_INBOX_URL\}\}/g, inboxUrl);
91
113
  prompt = prompt.replace(/\{\{SESSION_URL\}\}/g, sessionUrl);
92
114
 
93
115
  // Merge declared agents from config into project for context generation
@@ -99,6 +121,13 @@ export function buildPrompt({ taskId, taskLink, description, createTask, tracker
99
121
  }));
100
122
  }
101
123
 
124
+ // Project memory
125
+ const memory = loadProjectMemory(cwd);
126
+ prompt += `\n\n${MEMORY_INSTRUCTIONS}`;
127
+ if (memory) {
128
+ prompt += `\n\n### Current memory\n\n${memory}`;
129
+ }
130
+
102
131
  // Append project context and current time
103
132
  const context = generateContext(project);
104
133
  const now = new Date();
@@ -107,7 +136,7 @@ export function buildPrompt({ taskId, taskLink, description, createTask, tracker
107
136
  return `${prompt}\n\n---\n\n## PROJECT CONTEXT\n\n${context}\n\n${timeInfo}`;
108
137
  }
109
138
 
110
- export function buildSoloPrompt({ agentName, taskId, description, tracker, config, project, sessionUrl, childStrategy }) {
139
+ export function buildSoloPrompt({ agentName, taskId, description, tracker, config, project, sessionUrl, childStrategy, cwd }) {
111
140
  const agent = BUILT_IN_AGENTS[agentName];
112
141
  if (!agent) throw new Error(`Unknown agent: ${agentName}`);
113
142
 
@@ -316,6 +345,13 @@ export function buildSoloPrompt({ agentName, taskId, description, tracker, confi
316
345
  lines.push(`## Additional Instructions`, ``, config.instructions, ``);
317
346
  }
318
347
 
348
+ // Project memory
349
+ const memory = loadProjectMemory(cwd);
350
+ lines.push(MEMORY_INSTRUCTIONS);
351
+ if (memory) {
352
+ lines.push(`### Current memory`, ``, memory);
353
+ }
354
+
319
355
  // Add project context
320
356
  const context = generateContext(project);
321
357
  const now = new Date();
package/cli/team.mjs CHANGED
@@ -134,7 +134,6 @@ export async function runTeam(taskId, opts = {}) {
134
134
  // --- AgentDesk WebSocket config ---
135
135
  const AGENTDESK_URL = process.env.AGENTDESK_URL || "wss://agentdesk.live/ws/agent";
136
136
  const sessionId = `${taskId}-${randomUUID().slice(0, 8)}`;
137
- const inboxUrl = `${agentdeskServer}/api/sessions/${sessionId}/inbox`;
138
137
  const sessionUrl = `${agentdeskServer}/sessions/${sessionId}`;
139
138
 
140
139
  let vizWs = null;
@@ -209,7 +208,7 @@ export async function runTeam(taskId, opts = {}) {
209
208
 
210
209
  const result = await runOrchestrator({
211
210
  taskId, taskLink, description, createTask, tracker, config,
212
- project, team, teamSections, inboxUrl, sessionUrl, cwd,
211
+ project, team, teamSections, sessionUrl, cwd,
213
212
  onEvent: vizSend,
214
213
  apiKey,
215
214
  serverUrl: agentdeskServer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kendoo.agentdesk/agentdesk",
3
- "version": "0.11.4",
3
+ "version": "0.11.6",
4
4
  "description": "AI team orchestrator for Claude Code — run collaborative agent sessions from your terminal",
5
5
  "type": "module",
6
6
  "bin": {
package/prompts/team.md CHANGED
@@ -23,14 +23,6 @@ Agents only speak when they have something substantive to contribute. No filler,
23
23
 
24
24
  {{GROUND_RULES}}
25
25
 
26
- ## USER INPUT
27
-
28
- Check for user messages at phase transitions:
29
- ```
30
- curl -s {{AGENTDESK_INBOX_URL}}
31
- ```
32
- If not empty (`[]`), Jane reads the messages and incorporates them — user input takes priority.
33
-
34
26
  ## CODE PRINCIPLES
35
27
 
36
28
  {{CODE_PRINCIPLES}}