@dreb/coding-agent 2.66.2 → 2.67.0

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 (47) hide show
  1. package/README.md +3 -1
  2. package/dist/cli/args.d.ts.map +1 -1
  3. package/dist/cli/args.js +1 -1
  4. package/dist/cli/args.js.map +1 -1
  5. package/dist/config.d.ts +12 -2
  6. package/dist/config.d.ts.map +1 -1
  7. package/dist/config.js +27 -4
  8. package/dist/config.js.map +1 -1
  9. package/dist/core/agent-session.d.ts +4 -0
  10. package/dist/core/agent-session.d.ts.map +1 -1
  11. package/dist/core/agent-session.js +16 -1
  12. package/dist/core/agent-session.js.map +1 -1
  13. package/dist/core/sdk.d.ts.map +1 -1
  14. package/dist/core/sdk.js +2 -1
  15. package/dist/core/sdk.js.map +1 -1
  16. package/dist/core/session-manager.d.ts +18 -4
  17. package/dist/core/session-manager.d.ts.map +1 -1
  18. package/dist/core/session-manager.js +54 -22
  19. package/dist/core/session-manager.js.map +1 -1
  20. package/dist/core/settings-manager.d.ts +4 -0
  21. package/dist/core/settings-manager.d.ts.map +1 -1
  22. package/dist/core/settings-manager.js +4 -0
  23. package/dist/core/settings-manager.js.map +1 -1
  24. package/dist/core/tools/subagent.d.ts +14 -8
  25. package/dist/core/tools/subagent.d.ts.map +1 -1
  26. package/dist/core/tools/subagent.js +145 -71
  27. package/dist/core/tools/subagent.js.map +1 -1
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/main.d.ts.map +1 -1
  33. package/dist/main.js +16 -7
  34. package/dist/main.js.map +1 -1
  35. package/dist/modes/rpc/rpc-mode.d.ts +2 -2
  36. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  37. package/dist/modes/rpc/rpc-mode.js +7 -5
  38. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  39. package/docs/dashboard.md +6 -0
  40. package/docs/mach6.md +1 -1
  41. package/docs/rpc.md +3 -3
  42. package/docs/session.md +16 -7
  43. package/docs/settings.md +17 -5
  44. package/docs/skills.md +1 -1
  45. package/package.json +1 -1
  46. package/skills/mach6-issue/SKILL.md +5 -2
  47. package/skills/model-routing-guide/SKILL.md +10 -5
@@ -16,7 +16,7 @@ import { copyFileSync, existsSync, mkdirSync, realpathSync, writeFileSync } from
16
16
  import { tmpdir } from "node:os";
17
17
  import { basename, dirname, join, resolve } from "node:path";
18
18
  import { isContextOverflow, isOutputLimitExhaustion, modelsAreEqual, resetApiProviders, supportsMax, supportsXhigh, } from "@dreb/ai";
19
- import { getDocsPath } from "../config.js";
19
+ import { getDocsPath, getSubagentSessionsDir } from "../config.js";
20
20
  import { theme } from "../modes/interactive/theme/theme.js";
21
21
  import { sleep } from "../utils/sleep.js";
22
22
  import { executeBash as executeBashCommand, executeBashWithOperations } from "./bash-executor.js";
@@ -81,6 +81,10 @@ export class AgentSession {
81
81
  agent;
82
82
  sessionManager;
83
83
  settingsManager;
84
+ /** Root used for all new subagent child-session writes in this session. */
85
+ subagentSessionsDir;
86
+ /** Ordered restart-discovery roots: configured write root first, then legacy when different. */
87
+ subagentSessionDiscoveryRoots;
84
88
  _scopedModels;
85
89
  // Event subscription state
86
90
  _unsubscribeAgent;
@@ -193,6 +197,16 @@ export class AgentSession {
193
197
  this._resourceLoader = config.resourceLoader;
194
198
  this._customTools = config.customTools ?? [];
195
199
  this._cwd = config.cwd;
200
+ const legacySubagentSessionsDir = getSubagentSessionsDir();
201
+ this.subagentSessionsDir = getSubagentSessionsDir(this.settingsManager.getGlobalSubagentSessionDir(), this._cwd);
202
+ const comparableSubagentRoot = (path) => {
203
+ const resolved = resolve(path);
204
+ return process.platform === "win32" ? resolved.toLowerCase() : resolved;
205
+ };
206
+ this.subagentSessionDiscoveryRoots =
207
+ comparableSubagentRoot(this.subagentSessionsDir) === comparableSubagentRoot(legacySubagentSessionsDir)
208
+ ? [this.subagentSessionsDir]
209
+ : [this.subagentSessionsDir, legacySubagentSessionsDir];
196
210
  this._modelRegistry = config.modelRegistry;
197
211
  this._extensionRunnerRef = config.extensionRunnerRef;
198
212
  this._initialActiveToolNames = config.initialActiveToolNames;
@@ -2831,6 +2845,7 @@ export class AgentSession {
2831
2845
  },
2832
2846
  },
2833
2847
  subagent: {
2848
+ subagentSessionsDir: this.subagentSessionsDir,
2834
2849
  parentProvider: () => this.model?.provider,
2835
2850
  parentModel: () => this.model?.id,
2836
2851
  parentSessionFile: () => this.sessionFile,