@adhdev/daemon-core 0.6.56 → 0.6.58

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 (37) hide show
  1. package/dist/index.d.ts +23 -0
  2. package/dist/index.js +423 -95
  3. package/dist/index.js.map +1 -1
  4. package/package.json +1 -1
  5. package/providers/_builtin/cli/aider-cli/scripts/1.0/parse_output.js +51 -3
  6. package/providers/_builtin/cli/claude-cli/provider.json +18 -6
  7. package/providers/_builtin/cli/claude-cli/scripts/1.0/detect_status.js +68 -16
  8. package/providers/_builtin/cli/claude-cli/scripts/1.0/parse_approval.js +81 -22
  9. package/providers/_builtin/cli/claude-cli/scripts/1.0/parse_output.js +347 -94
  10. package/providers/_builtin/cli/codex-cli/provider.json +2 -0
  11. package/providers/_builtin/cli/codex-cli/scripts/1.0/detect_status.js +44 -10
  12. package/providers/_builtin/cli/codex-cli/scripts/1.0/parse_approval.js +83 -7
  13. package/providers/_builtin/cli/codex-cli/scripts/1.0/parse_output.js +501 -47
  14. package/providers/_builtin/cli/cursor-cli/scripts/1.0/parse_output.js +1 -1
  15. package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/parse_output.js +1 -1
  16. package/providers/_builtin/cli/goose-cli/scripts/1.0/parse_output.js +1 -1
  17. package/providers/_builtin/cli/opencode-cli/scripts/1.0/parse_output.js +1 -1
  18. package/providers/_builtin/ide/vscode/provider.json +5 -1
  19. package/providers/_builtin/ide/vscode/scripts/1.0/focus_editor.js +1 -0
  20. package/providers/_builtin/ide/vscode/scripts/1.0/list_models.js +1 -0
  21. package/providers/_builtin/ide/vscode/scripts/1.0/list_sessions.js +1 -0
  22. package/providers/_builtin/ide/vscode/scripts/1.0/new_session.js +1 -0
  23. package/providers/_builtin/ide/vscode/scripts/1.0/open_panel.js +1 -0
  24. package/providers/_builtin/ide/vscode/scripts/1.0/read_chat.js +1 -0
  25. package/providers/_builtin/ide/vscode/scripts/1.0/resolve_action.js +1 -0
  26. package/providers/_builtin/ide/vscode/scripts/1.0/scripts.js +25 -0
  27. package/providers/_builtin/ide/vscode/scripts/1.0/send_message.js +1 -0
  28. package/providers/_builtin/ide/vscode/scripts/1.0/set_model.js +1 -0
  29. package/providers/_builtin/ide/vscode/scripts/1.0/switch_session.js +1 -0
  30. package/providers/_builtin/registry.json +1 -1
  31. package/src/cli-adapters/provider-cli-adapter.ts +410 -65
  32. package/src/commands/chat-commands.ts +7 -1
  33. package/src/config/chat-history.ts +53 -1
  34. package/src/daemon/dev-server.ts +7 -9
  35. package/src/providers/cli-provider-instance.ts +10 -23
  36. package/src/providers/provider-instance.ts +1 -0
  37. package/src/providers/version-archive.ts +4 -1
package/dist/index.d.ts CHANGED
@@ -18,6 +18,7 @@ interface ActiveChatData {
18
18
  message: string;
19
19
  buttons: string[];
20
20
  } | null;
21
+ terminalHistory?: string;
21
22
  inputContent?: string;
22
23
  }
23
24
  /** Standardized error reasons across all provider categories */
@@ -1653,6 +1654,8 @@ declare class ChatHistoryWriter {
1653
1654
  private lastSeenCounts;
1654
1655
  /** Last seen message hash per agent (deduplication) */
1655
1656
  private lastSeenHashes;
1657
+ /** Last seen append-only terminal transcript per agent */
1658
+ private lastSeenTerminal;
1656
1659
  private rotated;
1657
1660
  /**
1658
1661
  * Append new messages to history
@@ -1667,6 +1670,7 @@ declare class ChatHistoryWriter {
1667
1670
  content: string;
1668
1671
  receivedAt?: number;
1669
1672
  }>, sessionTitle?: string, instanceId?: string): void;
1673
+ appendTerminalHistory(agentType: string, terminalHistory: string, sessionTitle?: string, instanceId?: string): void;
1670
1674
  /** Called when agent session is explicitly changed */
1671
1675
  onSessionChange(agentType: string): void;
1672
1676
  /** Delete history files older than 30 days */
@@ -2563,6 +2567,7 @@ interface CliSessionStatus {
2563
2567
  message: string;
2564
2568
  buttons: string[];
2565
2569
  } | null;
2570
+ terminalHistory?: string;
2566
2571
  }
2567
2572
  /**
2568
2573
  * CLI Script Functions.
@@ -2597,6 +2602,7 @@ interface CliScriptInput {
2597
2602
  rawBuffer: string;
2598
2603
  recentBuffer: string;
2599
2604
  screenText: string;
2605
+ terminalHistory?: string;
2600
2606
  messages: CliChatMessage[];
2601
2607
  partialResponse: string;
2602
2608
  }
@@ -2607,6 +2613,7 @@ interface CliProviderModule {
2607
2613
  binary: string;
2608
2614
  sendDelayMs?: number;
2609
2615
  sendKey?: string;
2616
+ submitStrategy?: 'wait_for_echo' | 'immediate';
2610
2617
  spawn: {
2611
2618
  command: string;
2612
2619
  args: string[];
@@ -2640,6 +2647,7 @@ declare class ProviderCliAdapter implements CliAdapter {
2640
2647
  private provider;
2641
2648
  private ptyProcess;
2642
2649
  private messages;
2650
+ private committedMessages;
2643
2651
  private structuredMessages;
2644
2652
  private currentStatus;
2645
2653
  private onStatusChange;
@@ -2664,6 +2672,11 @@ declare class ProviderCliAdapter implements CliAdapter {
2664
2672
  private settleTimer;
2665
2673
  private settledBuffer;
2666
2674
  private submitPendingUntil;
2675
+ private responseSettleIgnoreUntil;
2676
+ private responseEpoch;
2677
+ private submitRetryTimer;
2678
+ private submitRetryUsed;
2679
+ private submitRetryPromptSnippet;
2667
2680
  private resizeSuppressUntil;
2668
2681
  private statusHistory;
2669
2682
  private cliScripts;
@@ -2673,13 +2686,20 @@ declare class ProviderCliAdapter implements CliAdapter {
2673
2686
  private accumulatedRawBuffer;
2674
2687
  /** Current visible terminal screen snapshot */
2675
2688
  private terminalScreen;
2689
+ /** Rolling append-only terminal transcript built from screen snapshots */
2690
+ private terminalHistory;
2676
2691
  /** Max accumulated buffer size (last 50KB) */
2677
2692
  private static readonly MAX_ACCUMULATED_BUFFER;
2693
+ private currentTurnScope;
2694
+ private syncMessageViews;
2695
+ private sliceFromOffset;
2696
+ private buildParseInput;
2678
2697
  private setStatus;
2679
2698
  private readonly timeouts;
2680
2699
  private readonly approvalKeys;
2681
2700
  private readonly sendDelayMs;
2682
2701
  private readonly sendKey;
2702
+ private readonly submitStrategy;
2683
2703
  constructor(provider: CliProviderModule, workingDir: string, extraArgs?: string[]);
2684
2704
  /** Inject CLI scripts after construction (e.g. when resolved by ProviderLoader) */
2685
2705
  setCliScripts(scripts: CliScripts): void;
@@ -2689,8 +2709,10 @@ declare class ProviderCliAdapter implements CliAdapter {
2689
2709
  spawn(): Promise<void>;
2690
2710
  private handleOutput;
2691
2711
  private scheduleSettle;
2712
+ private armApprovalExitTimeout;
2692
2713
  private evaluateSettled;
2693
2714
  private finishResponse;
2715
+ private commitCurrentTranscript;
2694
2716
  private runDetectStatus;
2695
2717
  private runParseApproval;
2696
2718
  getStatus(): CliSessionStatus;
@@ -2699,6 +2721,7 @@ declare class ProviderCliAdapter implements CliAdapter {
2699
2721
  * Called by command handler / dashboard for rich content rendering.
2700
2722
  */
2701
2723
  getScriptParsedStatus(): any;
2724
+ private parseCurrentTranscript;
2702
2725
  /** Whether this adapter has CLI scripts loaded */
2703
2726
  hasCliScripts(): boolean;
2704
2727
  /**