@telora/daemon 0.13.8 → 0.13.10

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.
Files changed (52) hide show
  1. package/build-info.json +2 -2
  2. package/dist/branch-status.d.ts +6 -0
  3. package/dist/branch-status.d.ts.map +1 -1
  4. package/dist/branch-status.js +44 -5
  5. package/dist/branch-status.js.map +1 -1
  6. package/dist/directive-executor.d.ts.map +1 -1
  7. package/dist/directive-executor.js +11 -1
  8. package/dist/directive-executor.js.map +1 -1
  9. package/dist/index.js +0 -0
  10. package/dist/listener-review.d.ts +37 -0
  11. package/dist/listener-review.d.ts.map +1 -0
  12. package/dist/listener-review.js +217 -0
  13. package/dist/listener-review.js.map +1 -0
  14. package/dist/listener.d.ts.map +1 -1
  15. package/dist/listener.js +11 -3
  16. package/dist/listener.js.map +1 -1
  17. package/dist/mcp-resolution.d.ts +8 -3
  18. package/dist/mcp-resolution.d.ts.map +1 -1
  19. package/dist/mcp-resolution.js +11 -3
  20. package/dist/mcp-resolution.js.map +1 -1
  21. package/dist/queries/strategies.d.ts +3 -1
  22. package/dist/queries/strategies.d.ts.map +1 -1
  23. package/dist/queries/strategies.js +4 -1
  24. package/dist/queries/strategies.js.map +1 -1
  25. package/dist/session-lifecycle.d.ts.map +1 -1
  26. package/dist/session-lifecycle.js +17 -4
  27. package/dist/session-lifecycle.js.map +1 -1
  28. package/dist/state-cascade.d.ts +22 -2
  29. package/dist/state-cascade.d.ts.map +1 -1
  30. package/dist/state-cascade.js +103 -2
  31. package/dist/state-cascade.js.map +1 -1
  32. package/dist/strategy-completion.d.ts.map +1 -1
  33. package/dist/strategy-completion.js +2 -2
  34. package/dist/strategy-completion.js.map +1 -1
  35. package/dist/strategy-executor.d.ts.map +1 -1
  36. package/dist/strategy-executor.js +41 -4
  37. package/dist/strategy-executor.js.map +1 -1
  38. package/dist/strategy-teardown.d.ts +24 -0
  39. package/dist/strategy-teardown.d.ts.map +1 -0
  40. package/dist/strategy-teardown.js +158 -0
  41. package/dist/strategy-teardown.js.map +1 -0
  42. package/dist/team-spawner.d.ts.map +1 -1
  43. package/dist/team-spawner.js +4 -3
  44. package/dist/team-spawner.js.map +1 -1
  45. package/dist/unified-shell.d.ts.map +1 -1
  46. package/dist/unified-shell.js +10 -4
  47. package/dist/unified-shell.js.map +1 -1
  48. package/dist/worktree-merge.d.ts +23 -0
  49. package/dist/worktree-merge.d.ts.map +1 -0
  50. package/dist/worktree-merge.js +57 -0
  51. package/dist/worktree-merge.js.map +1 -0
  52. package/package.json +3 -3
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Merge worktree management.
3
+ *
4
+ * The persistent merge worktree is a detached-HEAD worktree at
5
+ * `.telora/merge-worktree/` used by merge operations so the main
6
+ * repo working tree is never touched during merges.
7
+ */
8
+ import { existsSync, mkdirSync, rmSync } from 'node:fs';
9
+ import { join } from 'node:path';
10
+ import { runGitSync } from './git-types.js';
11
+ /**
12
+ * Derive the merge worktree path from config. Deterministic -- no state.
13
+ */
14
+ export function getMergeWorktreePath(config) {
15
+ return join(config.repoPath, '.telora', 'merge-worktree');
16
+ }
17
+ /**
18
+ * Create or validate the persistent merge worktree.
19
+ *
20
+ * Uses a detached HEAD worktree at `.telora/merge-worktree/` so merge
21
+ * functions can checkout any branch without "already checked out" conflicts.
22
+ * The main repo working tree is never touched during merge operations.
23
+ *
24
+ * Called once from initGit() after ensureIntegrationBranch().
25
+ */
26
+ export function ensureMergeWorktree(config) {
27
+ const teloraDir = join(config.repoPath, '.telora');
28
+ const wtPath = getMergeWorktreePath(config);
29
+ // Ensure .telora directory exists
30
+ if (!existsSync(teloraDir)) {
31
+ mkdirSync(teloraDir, { recursive: true });
32
+ }
33
+ if (existsSync(wtPath)) {
34
+ // Validate it's a functioning worktree (has a .git file or directory)
35
+ const gitMarker = join(wtPath, '.git');
36
+ if (existsSync(gitMarker)) {
37
+ console.log(`[merge-worktree] Using existing merge worktree: ${wtPath}`);
38
+ return wtPath;
39
+ }
40
+ // Directory exists but isn't a valid worktree -- prune and recreate
41
+ console.log(`[merge-worktree] Stale merge worktree detected, recreating...`);
42
+ rmSync(wtPath, { recursive: true, force: true });
43
+ runGitSync(['worktree', 'prune'], config.repoPath);
44
+ }
45
+ else {
46
+ // Prune in case git still has a stale entry for this path
47
+ runGitSync(['worktree', 'prune'], config.repoPath);
48
+ }
49
+ // Create detached HEAD worktree (avoids branch conflicts)
50
+ const result = runGitSync(['worktree', 'add', '--detach', wtPath], config.repoPath);
51
+ if (!result.success) {
52
+ throw new Error(`Failed to create merge worktree: ${result.error}`);
53
+ }
54
+ console.log(`[merge-worktree] Created merge worktree: ${wtPath}`);
55
+ return wtPath;
56
+ }
57
+ //# sourceMappingURL=worktree-merge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worktree-merge.js","sourceRoot":"","sources":["../src/worktree-merge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAoB;IACvD,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAoB;IACtD,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACnD,MAAM,MAAM,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAE5C,kCAAkC;IAClC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QACvB,sEAAsE;QACtE,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACvC,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC1B,OAAO,CAAC,GAAG,CAAC,mDAAmD,MAAM,EAAE,CAAC,CAAC;YACzE,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,oEAAoE;QACpE,OAAO,CAAC,GAAG,CAAC,+DAA+D,CAAC,CAAC;QAC7E,MAAM,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACjD,UAAU,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;IACrD,CAAC;SAAM,CAAC;QACN,0DAA0D;QAC1D,UAAU,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;IACrD,CAAC;IAED,0DAA0D;IAC1D,MAAM,MAAM,GAAG,UAAU,CACvB,CAAC,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC,EACvC,MAAM,CAAC,QAAQ,CAChB,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,oCAAoC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,4CAA4C,MAAM,EAAE,CAAC,CAAC;IAClE,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telora/daemon",
3
- "version": "0.13.8",
3
+ "version": "0.13.10",
4
4
  "description": "Agent orchestration daemon for Telora - spawns and manages Claude Code instances",
5
5
  "type": "module",
6
6
  "bin": {
@@ -36,7 +36,7 @@
36
36
  "//testRunner": "Uses Node.js built-in test runner (node:test) via tsx for TypeScript support. The root package uses Vitest; this is a deliberate choice for the daemon package to avoid framework dependencies. See src/__tests__/ for test files.",
37
37
  "dependencies": {
38
38
  "@telora/daemon-core": "^0.2.6",
39
- "@telora/factory": "^0.4.5",
39
+ "@telora/factory": "^0.4.6",
40
40
  "@telora/mcp-products": "^0.21.4",
41
41
  "commander": "^14.0.3",
42
42
  "zod": "^4.3.6"
@@ -72,6 +72,6 @@
72
72
  "author": "Syntelyos",
73
73
  "publishConfig": {
74
74
  "access": "public",
75
- "registry": "https://registry.npmjs.org/"
75
+ "registry": "https://10.1.1.250:3100/api/packages/syntelyos/npm/"
76
76
  }
77
77
  }