@dreb/coding-agent 2.66.3 → 2.68.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 (70) hide show
  1. package/README.md +4 -2
  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 +5 -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/daily-cost-tracker.d.ts +22 -6
  14. package/dist/core/daily-cost-tracker.d.ts.map +1 -1
  15. package/dist/core/daily-cost-tracker.js +117 -47
  16. package/dist/core/daily-cost-tracker.js.map +1 -1
  17. package/dist/core/footer-data-provider.d.ts +10 -2
  18. package/dist/core/footer-data-provider.d.ts.map +1 -1
  19. package/dist/core/footer-data-provider.js +17 -1
  20. package/dist/core/footer-data-provider.js.map +1 -1
  21. package/dist/core/sdk.d.ts.map +1 -1
  22. package/dist/core/sdk.js +2 -1
  23. package/dist/core/sdk.js.map +1 -1
  24. package/dist/core/session-manager.d.ts +32 -4
  25. package/dist/core/session-manager.d.ts.map +1 -1
  26. package/dist/core/session-manager.js +234 -108
  27. package/dist/core/session-manager.js.map +1 -1
  28. package/dist/core/settings-manager.d.ts +4 -0
  29. package/dist/core/settings-manager.d.ts.map +1 -1
  30. package/dist/core/settings-manager.js +4 -0
  31. package/dist/core/settings-manager.js.map +1 -1
  32. package/dist/core/subagent-session-cost-tracker.d.ts +22 -0
  33. package/dist/core/subagent-session-cost-tracker.d.ts.map +1 -0
  34. package/dist/core/subagent-session-cost-tracker.js +94 -0
  35. package/dist/core/subagent-session-cost-tracker.js.map +1 -0
  36. package/dist/core/tools/subagent.d.ts +14 -8
  37. package/dist/core/tools/subagent.d.ts.map +1 -1
  38. package/dist/core/tools/subagent.js +145 -71
  39. package/dist/core/tools/subagent.js.map +1 -1
  40. package/dist/index.d.ts +1 -1
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +1 -1
  43. package/dist/index.js.map +1 -1
  44. package/dist/main.d.ts.map +1 -1
  45. package/dist/main.js +16 -7
  46. package/dist/main.js.map +1 -1
  47. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  48. package/dist/modes/interactive/components/footer.js +8 -2
  49. package/dist/modes/interactive/components/footer.js.map +1 -1
  50. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  51. package/dist/modes/interactive/interactive-mode.js +5 -1
  52. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  53. package/dist/modes/rpc/rpc-client.d.ts +7 -2
  54. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  55. package/dist/modes/rpc/rpc-client.js +3 -2
  56. package/dist/modes/rpc/rpc-client.js.map +1 -1
  57. package/dist/modes/rpc/rpc-mode.d.ts +2 -2
  58. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  59. package/dist/modes/rpc/rpc-mode.js +34 -9
  60. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  61. package/dist/modes/rpc/rpc-types.d.ts +2 -0
  62. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  63. package/dist/modes/rpc/rpc-types.js.map +1 -1
  64. package/docs/dashboard.md +27 -15
  65. package/docs/rpc.md +9 -5
  66. package/docs/session.md +16 -7
  67. package/docs/settings.md +17 -5
  68. package/docs/skills.md +1 -1
  69. package/package.json +1 -1
  70. package/skills/model-routing-guide/SKILL.md +10 -5
@@ -99,7 +99,9 @@ export declare function handleChildJsonlLine(line: string, sinks: ChildLineSinks
99
99
  * present this recurses one level into step-* directories and returns one file
100
100
  * per step in numeric step order.
101
101
  */
102
- export declare function discoverSessionFiles(sessionDir: string, agentName: string): string[];
102
+ export declare function discoverSessionFiles(sessionDir: string, agentName: string, options?: {
103
+ throwOnOperationalError?: boolean;
104
+ }): string[];
103
105
  /**
104
106
  * Find the most recently modified .jsonl file in a session directory.
105
107
  * Returns the full path, or undefined if no session file was written
@@ -216,15 +218,17 @@ export interface BackgroundAgentInfo {
216
218
  arbitrations?: DispatchArbitrationRecord[];
217
219
  }
218
220
  /**
219
- * Best-effort recovery for completed background subagents after a dashboard/RPC
220
- * process resumes an existing parent session. Live background-agent state is an
221
- * in-memory registry, while child sessions are durable JSONL files under the
222
- * subagent sessions directory.
221
+ * Recover completed background subagents after a dashboard/RPC process resumes
222
+ * an existing parent session. Live background-agent state is an in-memory
223
+ * registry, while child sessions are durable JSONL files under the subagent
224
+ * sessions directory.
223
225
  *
224
- * Returns the number of newly registered agents. Expected filesystem and JSONL
225
- * parse failures are skipped; unexpected programming errors are allowed to throw.
226
+ * The first root is authoritative: absence races and malformed JSON are skipped,
227
+ * while operational filesystem failures throw. Later roots are compatibility
228
+ * stores, so their operational filesystem failures are warned and skipped.
229
+ * Returns the number of newly registered agents.
226
230
  */
227
- export declare function rehydrateBackgroundAgentsFromDisk(parentSessionFile: string | undefined, subagentSessionsBase?: string): number;
231
+ export declare function rehydrateBackgroundAgentsFromDisk(parentSessionFile: string | undefined, subagentSessionRoots?: string | readonly string[]): number;
228
232
  /** Get a snapshot of all tracked background agents (running and recently completed). Returns readonly clones. */
229
233
  export declare function getBackgroundAgents(): readonly Readonly<BackgroundAgentInfo>[];
230
234
  /** Get only currently running background agents. Returns readonly clones. */
@@ -241,6 +245,8 @@ export declare function abortBackgroundAgents(): void;
241
245
  /** Remove completed/failed entries older than the given age (ms). Default: 5 minutes. */
242
246
  export declare function pruneBackgroundAgents(maxAgeMs?: number): void;
243
247
  export interface SubagentToolOptions {
248
+ /** Resolved root for new subagent child-session directories. Defaults to the legacy agent root. */
249
+ subagentSessionsDir?: string;
244
250
  /** Called when a background subagent starts. Used by TUI to show status indicators. */
245
251
  onBackgroundStart?: (agentId: string, agentType: string, taskSummary: string, sessionDir?: string) => void;
246
252
  /** Called when a background subagent completes with its result. `cancelled` is true if the user aborted it. */