@kendoo.agentdesk/agentdesk 0.11.4 → 0.11.5

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/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
 
@@ -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, inboxUrl, 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, inboxUrl, sessionUrl, cwd }) {
13
36
  let prompt = readFileSync(PROMPT_PATH, "utf-8");
14
37
 
15
38
  // Team substitution
@@ -99,6 +122,13 @@ export function buildPrompt({ taskId, taskLink, description, createTask, tracker
99
122
  }));
100
123
  }
101
124
 
125
+ // Project memory
126
+ const memory = loadProjectMemory(cwd);
127
+ prompt += `\n\n${MEMORY_INSTRUCTIONS}`;
128
+ if (memory) {
129
+ prompt += `\n\n### Current memory\n\n${memory}`;
130
+ }
131
+
102
132
  // Append project context and current time
103
133
  const context = generateContext(project);
104
134
  const now = new Date();
@@ -107,7 +137,7 @@ export function buildPrompt({ taskId, taskLink, description, createTask, tracker
107
137
  return `${prompt}\n\n---\n\n## PROJECT CONTEXT\n\n${context}\n\n${timeInfo}`;
108
138
  }
109
139
 
110
- export function buildSoloPrompt({ agentName, taskId, description, tracker, config, project, sessionUrl, childStrategy }) {
140
+ export function buildSoloPrompt({ agentName, taskId, description, tracker, config, project, sessionUrl, childStrategy, cwd }) {
111
141
  const agent = BUILT_IN_AGENTS[agentName];
112
142
  if (!agent) throw new Error(`Unknown agent: ${agentName}`);
113
143
 
@@ -316,6 +346,13 @@ export function buildSoloPrompt({ agentName, taskId, description, tracker, confi
316
346
  lines.push(`## Additional Instructions`, ``, config.instructions, ``);
317
347
  }
318
348
 
349
+ // Project memory
350
+ const memory = loadProjectMemory(cwd);
351
+ lines.push(MEMORY_INSTRUCTIONS);
352
+ if (memory) {
353
+ lines.push(`### Current memory`, ``, memory);
354
+ }
355
+
319
356
  // Add project context
320
357
  const context = generateContext(project);
321
358
  const now = new Date();
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.5",
4
4
  "description": "AI team orchestrator for Claude Code — run collaborative agent sessions from your terminal",
5
5
  "type": "module",
6
6
  "bin": {