@hydra-acp/cli 0.1.71 → 0.1.73

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/dist/index.d.ts CHANGED
@@ -1564,7 +1564,7 @@ interface JsonRpcNotification {
1564
1564
  }
1565
1565
  interface JsonRpcResponse {
1566
1566
  jsonrpc: "2.0";
1567
- id: JsonRpcId;
1567
+ id: JsonRpcId | null;
1568
1568
  result?: unknown;
1569
1569
  error?: JsonRpcError;
1570
1570
  }
@@ -1574,6 +1574,7 @@ interface JsonRpcError {
1574
1574
  data?: unknown;
1575
1575
  }
1576
1576
  type JsonRpcMessage = JsonRpcRequest | JsonRpcNotification | JsonRpcResponse;
1577
+
1577
1578
  declare const HistoryPolicy: z.ZodEnum<["full", "pending_only", "none", "after_message"]>;
1578
1579
  type HistoryPolicy = z.infer<typeof HistoryPolicy>;
1579
1580
  declare const SessionAttachParams: z.ZodObject<{
@@ -1614,18 +1615,7 @@ declare const SessionAttachParams: z.ZodObject<{
1614
1615
  clientId?: string | undefined;
1615
1616
  }>;
1616
1617
  type SessionAttachParams = z.infer<typeof SessionAttachParams>;
1617
- interface PromptOriginator {
1618
- clientId: string;
1619
- name?: string;
1620
- version?: string;
1621
- }
1622
- interface PromptQueueEntry {
1623
- messageId: string;
1624
- originator: PromptOriginator;
1625
- prompt: unknown[];
1626
- position: number;
1627
- enqueuedAt: number;
1628
- }
1618
+
1629
1619
  declare const SessionDetachParams: z.ZodObject<{
1630
1620
  sessionId: z.ZodString;
1631
1621
  }, "strip", z.ZodTypeAny, {
@@ -1695,10 +1685,10 @@ declare const SessionListEntry: z.ZodObject<{
1695
1685
  sessionId: string;
1696
1686
  cwd: string;
1697
1687
  status: "live" | "cold";
1688
+ updatedAt: string;
1689
+ attachedClients: number;
1698
1690
  busy: boolean;
1699
1691
  awaitingInput: boolean;
1700
- attachedClients: number;
1701
- updatedAt: string;
1702
1692
  title?: string | undefined;
1703
1693
  _meta?: Record<string, unknown> | undefined;
1704
1694
  upstreamSessionId?: string | undefined;
@@ -1710,7 +1700,6 @@ declare const SessionListEntry: z.ZodObject<{
1710
1700
  costAmount?: number | undefined;
1711
1701
  costCurrency?: string | undefined;
1712
1702
  } | undefined;
1713
- interactive?: boolean | undefined;
1714
1703
  importedFromMachine?: string | undefined;
1715
1704
  importedFromUpstreamSessionId?: string | undefined;
1716
1705
  parentSessionId?: string | undefined;
@@ -1720,12 +1709,13 @@ declare const SessionListEntry: z.ZodObject<{
1720
1709
  name: string;
1721
1710
  version?: string | undefined;
1722
1711
  } | undefined;
1712
+ interactive?: boolean | undefined;
1723
1713
  priority?: number | undefined;
1724
1714
  }, {
1725
1715
  sessionId: string;
1726
1716
  cwd: string;
1727
- attachedClients: number;
1728
1717
  updatedAt: string;
1718
+ attachedClients: number;
1729
1719
  status?: "live" | "cold" | undefined;
1730
1720
  title?: string | undefined;
1731
1721
  _meta?: Record<string, unknown> | undefined;
@@ -1738,9 +1728,6 @@ declare const SessionListEntry: z.ZodObject<{
1738
1728
  costAmount?: number | undefined;
1739
1729
  costCurrency?: string | undefined;
1740
1730
  } | undefined;
1741
- interactive?: boolean | undefined;
1742
- busy?: boolean | undefined;
1743
- awaitingInput?: boolean | undefined;
1744
1731
  importedFromMachine?: string | undefined;
1745
1732
  importedFromUpstreamSessionId?: string | undefined;
1746
1733
  parentSessionId?: string | undefined;
@@ -1750,7 +1737,10 @@ declare const SessionListEntry: z.ZodObject<{
1750
1737
  name: string;
1751
1738
  version?: string | undefined;
1752
1739
  } | undefined;
1740
+ interactive?: boolean | undefined;
1753
1741
  priority?: number | undefined;
1742
+ busy?: boolean | undefined;
1743
+ awaitingInput?: boolean | undefined;
1754
1744
  }>;
1755
1745
  type SessionListEntry = z.infer<typeof SessionListEntry>;
1756
1746
  declare const SessionListResult: z.ZodObject<{
@@ -1794,6 +1784,20 @@ declare const SessionListResult: z.ZodObject<{
1794
1784
  nextCursor?: string | undefined;
1795
1785
  }>;
1796
1786
  type SessionListResult = z.infer<typeof SessionListResult>;
1787
+
1788
+ interface PromptOriginator {
1789
+ clientId: string;
1790
+ name?: string;
1791
+ version?: string;
1792
+ }
1793
+ interface PromptQueueEntry {
1794
+ messageId: string;
1795
+ originator: PromptOriginator;
1796
+ prompt: unknown[];
1797
+ position: number;
1798
+ enqueuedAt: number;
1799
+ }
1800
+
1797
1801
  declare const CancelPromptResult: z.ZodObject<{
1798
1802
  cancelled: z.ZodBoolean;
1799
1803
  reason: z.ZodEnum<["ok", "not_found", "already_running"]>;
@@ -1850,6 +1854,7 @@ declare const AmendPromptResult: z.ZodObject<{
1850
1854
  messageId?: string | undefined;
1851
1855
  }>;
1852
1856
  type AmendPromptResult = z.infer<typeof AmendPromptResult>;
1857
+
1853
1858
  interface SessionCapabilities {
1854
1859
  attach?: Record<string, never>;
1855
1860
  list?: Record<string, never>;
@@ -1879,6 +1884,7 @@ interface InitializeResult {
1879
1884
  authMethods?: Array<{
1880
1885
  id: string;
1881
1886
  description: string;
1887
+ type?: "agent" | "terminal";
1882
1888
  }>;
1883
1889
  _meta?: Record<string, unknown>;
1884
1890
  }
@@ -1900,6 +1906,7 @@ declare class JsonRpcConnection {
1900
1906
  private notificationHandlers;
1901
1907
  private bufferedNotifications;
1902
1908
  private static readonly MAX_BUFFERED_PER_METHOD;
1909
+ private static readonly MAX_BUFFERED_METHODS;
1903
1910
  private pending;
1904
1911
  private closed;
1905
1912
  private closeHandlers;
@@ -1910,6 +1917,7 @@ declare class JsonRpcConnection {
1910
1917
  onNotification(method: string, handler: NotificationHandler): void;
1911
1918
  drainBuffered(method: string): number;
1912
1919
  onClose(handler: (err?: Error) => void): void;
1920
+ isClosed(): boolean;
1913
1921
  onOrphanError(handler: (error: {
1914
1922
  code?: number;
1915
1923
  message: string;
@@ -2465,7 +2473,7 @@ declare class Session {
2465
2473
  private doClose;
2466
2474
  onClose(handler: (opts: {
2467
2475
  deleteRecord: boolean;
2468
- }) => void): void;
2476
+ }) => void): () => void;
2469
2477
  onTitleChange(handler: (title: string) => void): void;
2470
2478
  retitle(title: string): Promise<unknown>;
2471
2479
  retitleFromAgent(): Promise<unknown>;
@@ -2737,7 +2745,6 @@ declare const SessionRecord: z.ZodObject<{
2737
2745
  title?: string | undefined;
2738
2746
  agentArgs?: string[] | undefined;
2739
2747
  currentModel?: string | undefined;
2740
- currentMode?: string | undefined;
2741
2748
  currentUsage?: {
2742
2749
  used?: number | undefined;
2743
2750
  size?: number | undefined;
@@ -2745,7 +2752,6 @@ declare const SessionRecord: z.ZodObject<{
2745
2752
  costCurrency?: string | undefined;
2746
2753
  cumulativeCost?: number | undefined;
2747
2754
  } | undefined;
2748
- interactive?: boolean | undefined;
2749
2755
  importedFromMachine?: string | undefined;
2750
2756
  importedFromUpstreamSessionId?: string | undefined;
2751
2757
  parentSessionId?: string | undefined;
@@ -2755,7 +2761,9 @@ declare const SessionRecord: z.ZodObject<{
2755
2761
  name: string;
2756
2762
  version?: string | undefined;
2757
2763
  } | undefined;
2764
+ interactive?: boolean | undefined;
2758
2765
  priority?: number | undefined;
2766
+ currentMode?: string | undefined;
2759
2767
  synopsis?: {
2760
2768
  outcome?: string | undefined;
2761
2769
  goal?: string | undefined;
@@ -2793,7 +2801,6 @@ declare const SessionRecord: z.ZodObject<{
2793
2801
  title?: string | undefined;
2794
2802
  agentArgs?: string[] | undefined;
2795
2803
  currentModel?: string | undefined;
2796
- currentMode?: string | undefined;
2797
2804
  currentUsage?: {
2798
2805
  used?: number | undefined;
2799
2806
  size?: number | undefined;
@@ -2801,7 +2808,6 @@ declare const SessionRecord: z.ZodObject<{
2801
2808
  costCurrency?: string | undefined;
2802
2809
  cumulativeCost?: number | undefined;
2803
2810
  } | undefined;
2804
- interactive?: boolean | undefined;
2805
2811
  importedFromMachine?: string | undefined;
2806
2812
  importedFromUpstreamSessionId?: string | undefined;
2807
2813
  parentSessionId?: string | undefined;
@@ -2811,7 +2817,9 @@ declare const SessionRecord: z.ZodObject<{
2811
2817
  name: string;
2812
2818
  version?: string | undefined;
2813
2819
  } | undefined;
2820
+ interactive?: boolean | undefined;
2814
2821
  priority?: number | undefined;
2822
+ currentMode?: string | undefined;
2815
2823
  synopsis?: {
2816
2824
  outcome?: string | undefined;
2817
2825
  goal?: string | undefined;
@@ -3003,7 +3011,6 @@ declare const Bundle: z.ZodObject<{
3003
3011
  title?: string | undefined;
3004
3012
  upstreamSessionId?: string | undefined;
3005
3013
  currentModel?: string | undefined;
3006
- currentMode?: string | undefined;
3007
3014
  currentUsage?: {
3008
3015
  used?: number | undefined;
3009
3016
  size?: number | undefined;
@@ -3011,12 +3018,13 @@ declare const Bundle: z.ZodObject<{
3011
3018
  costCurrency?: string | undefined;
3012
3019
  cumulativeCost?: number | undefined;
3013
3020
  } | undefined;
3014
- interactive?: boolean | undefined;
3015
3021
  originatingClient?: {
3016
3022
  name: string;
3017
3023
  version?: string | undefined;
3018
3024
  } | undefined;
3025
+ interactive?: boolean | undefined;
3019
3026
  priority?: number | undefined;
3027
+ currentMode?: string | undefined;
3020
3028
  synopsis?: {
3021
3029
  outcome?: string | undefined;
3022
3030
  goal?: string | undefined;
@@ -3045,7 +3053,6 @@ declare const Bundle: z.ZodObject<{
3045
3053
  title?: string | undefined;
3046
3054
  upstreamSessionId?: string | undefined;
3047
3055
  currentModel?: string | undefined;
3048
- currentMode?: string | undefined;
3049
3056
  currentUsage?: {
3050
3057
  used?: number | undefined;
3051
3058
  size?: number | undefined;
@@ -3053,12 +3060,13 @@ declare const Bundle: z.ZodObject<{
3053
3060
  costCurrency?: string | undefined;
3054
3061
  cumulativeCost?: number | undefined;
3055
3062
  } | undefined;
3056
- interactive?: boolean | undefined;
3057
3063
  originatingClient?: {
3058
3064
  name: string;
3059
3065
  version?: string | undefined;
3060
3066
  } | undefined;
3067
+ interactive?: boolean | undefined;
3061
3068
  priority?: number | undefined;
3069
+ currentMode?: string | undefined;
3062
3070
  synopsis?: {
3063
3071
  outcome?: string | undefined;
3064
3072
  goal?: string | undefined;
@@ -3105,7 +3113,6 @@ declare const Bundle: z.ZodObject<{
3105
3113
  title?: string | undefined;
3106
3114
  upstreamSessionId?: string | undefined;
3107
3115
  currentModel?: string | undefined;
3108
- currentMode?: string | undefined;
3109
3116
  currentUsage?: {
3110
3117
  used?: number | undefined;
3111
3118
  size?: number | undefined;
@@ -3113,12 +3120,13 @@ declare const Bundle: z.ZodObject<{
3113
3120
  costCurrency?: string | undefined;
3114
3121
  cumulativeCost?: number | undefined;
3115
3122
  } | undefined;
3116
- interactive?: boolean | undefined;
3117
3123
  originatingClient?: {
3118
3124
  name: string;
3119
3125
  version?: string | undefined;
3120
3126
  } | undefined;
3127
+ interactive?: boolean | undefined;
3121
3128
  priority?: number | undefined;
3129
+ currentMode?: string | undefined;
3122
3130
  synopsis?: {
3123
3131
  outcome?: string | undefined;
3124
3132
  goal?: string | undefined;
@@ -3163,7 +3171,6 @@ declare const Bundle: z.ZodObject<{
3163
3171
  title?: string | undefined;
3164
3172
  upstreamSessionId?: string | undefined;
3165
3173
  currentModel?: string | undefined;
3166
- currentMode?: string | undefined;
3167
3174
  currentUsage?: {
3168
3175
  used?: number | undefined;
3169
3176
  size?: number | undefined;
@@ -3171,12 +3178,13 @@ declare const Bundle: z.ZodObject<{
3171
3178
  costCurrency?: string | undefined;
3172
3179
  cumulativeCost?: number | undefined;
3173
3180
  } | undefined;
3174
- interactive?: boolean | undefined;
3175
3181
  originatingClient?: {
3176
3182
  name: string;
3177
3183
  version?: string | undefined;
3178
3184
  } | undefined;
3185
+ interactive?: boolean | undefined;
3179
3186
  priority?: number | undefined;
3187
+ currentMode?: string | undefined;
3180
3188
  synopsis?: {
3181
3189
  outcome?: string | undefined;
3182
3190
  goal?: string | undefined;
@@ -3326,6 +3334,7 @@ declare class SessionManager {
3326
3334
  resolveCanonicalId(input: string): Promise<string | undefined>;
3327
3335
  require(sessionId: string): Session;
3328
3336
  liveListEntry(session: Session): SessionListEntry;
3337
+ getOne(sessionId: string): Promise<SessionListEntry | undefined>;
3329
3338
  list(filter?: {
3330
3339
  cwd?: string;
3331
3340
  includeNonInteractive?: boolean;
@@ -3370,6 +3379,7 @@ declare class SessionManager {
3370
3379
  private persistSynopsis;
3371
3380
  private persistAgentChange;
3372
3381
  private persistSnapshot;
3382
+ private mutateRecord;
3373
3383
  private enqueueMetaWrite;
3374
3384
  closeAll(): Promise<void>;
3375
3385
  flushSynopsis(timeoutMs: number): Promise<void>;