@hydra-acp/cli 0.1.70 → 0.1.72
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/cli.js +314 -378
- package/dist/index.d.ts +42 -33
- package/dist/index.js +59 -59
- package/package.json +1 -1
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
|
-
|
|
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>;
|
|
@@ -1900,6 +1905,7 @@ declare class JsonRpcConnection {
|
|
|
1900
1905
|
private notificationHandlers;
|
|
1901
1906
|
private bufferedNotifications;
|
|
1902
1907
|
private static readonly MAX_BUFFERED_PER_METHOD;
|
|
1908
|
+
private static readonly MAX_BUFFERED_METHODS;
|
|
1903
1909
|
private pending;
|
|
1904
1910
|
private closed;
|
|
1905
1911
|
private closeHandlers;
|
|
@@ -1910,6 +1916,7 @@ declare class JsonRpcConnection {
|
|
|
1910
1916
|
onNotification(method: string, handler: NotificationHandler): void;
|
|
1911
1917
|
drainBuffered(method: string): number;
|
|
1912
1918
|
onClose(handler: (err?: Error) => void): void;
|
|
1919
|
+
isClosed(): boolean;
|
|
1913
1920
|
onOrphanError(handler: (error: {
|
|
1914
1921
|
code?: number;
|
|
1915
1922
|
message: string;
|
|
@@ -2465,7 +2472,7 @@ declare class Session {
|
|
|
2465
2472
|
private doClose;
|
|
2466
2473
|
onClose(handler: (opts: {
|
|
2467
2474
|
deleteRecord: boolean;
|
|
2468
|
-
}) => void): void;
|
|
2475
|
+
}) => void): () => void;
|
|
2469
2476
|
onTitleChange(handler: (title: string) => void): void;
|
|
2470
2477
|
retitle(title: string): Promise<unknown>;
|
|
2471
2478
|
retitleFromAgent(): Promise<unknown>;
|
|
@@ -2737,7 +2744,6 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
2737
2744
|
title?: string | undefined;
|
|
2738
2745
|
agentArgs?: string[] | undefined;
|
|
2739
2746
|
currentModel?: string | undefined;
|
|
2740
|
-
currentMode?: string | undefined;
|
|
2741
2747
|
currentUsage?: {
|
|
2742
2748
|
used?: number | undefined;
|
|
2743
2749
|
size?: number | undefined;
|
|
@@ -2745,7 +2751,6 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
2745
2751
|
costCurrency?: string | undefined;
|
|
2746
2752
|
cumulativeCost?: number | undefined;
|
|
2747
2753
|
} | undefined;
|
|
2748
|
-
interactive?: boolean | undefined;
|
|
2749
2754
|
importedFromMachine?: string | undefined;
|
|
2750
2755
|
importedFromUpstreamSessionId?: string | undefined;
|
|
2751
2756
|
parentSessionId?: string | undefined;
|
|
@@ -2755,7 +2760,9 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
2755
2760
|
name: string;
|
|
2756
2761
|
version?: string | undefined;
|
|
2757
2762
|
} | undefined;
|
|
2763
|
+
interactive?: boolean | undefined;
|
|
2758
2764
|
priority?: number | undefined;
|
|
2765
|
+
currentMode?: string | undefined;
|
|
2759
2766
|
synopsis?: {
|
|
2760
2767
|
outcome?: string | undefined;
|
|
2761
2768
|
goal?: string | undefined;
|
|
@@ -2793,7 +2800,6 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
2793
2800
|
title?: string | undefined;
|
|
2794
2801
|
agentArgs?: string[] | undefined;
|
|
2795
2802
|
currentModel?: string | undefined;
|
|
2796
|
-
currentMode?: string | undefined;
|
|
2797
2803
|
currentUsage?: {
|
|
2798
2804
|
used?: number | undefined;
|
|
2799
2805
|
size?: number | undefined;
|
|
@@ -2801,7 +2807,6 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
2801
2807
|
costCurrency?: string | undefined;
|
|
2802
2808
|
cumulativeCost?: number | undefined;
|
|
2803
2809
|
} | undefined;
|
|
2804
|
-
interactive?: boolean | undefined;
|
|
2805
2810
|
importedFromMachine?: string | undefined;
|
|
2806
2811
|
importedFromUpstreamSessionId?: string | undefined;
|
|
2807
2812
|
parentSessionId?: string | undefined;
|
|
@@ -2811,7 +2816,9 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
2811
2816
|
name: string;
|
|
2812
2817
|
version?: string | undefined;
|
|
2813
2818
|
} | undefined;
|
|
2819
|
+
interactive?: boolean | undefined;
|
|
2814
2820
|
priority?: number | undefined;
|
|
2821
|
+
currentMode?: string | undefined;
|
|
2815
2822
|
synopsis?: {
|
|
2816
2823
|
outcome?: string | undefined;
|
|
2817
2824
|
goal?: string | undefined;
|
|
@@ -3003,7 +3010,6 @@ declare const Bundle: z.ZodObject<{
|
|
|
3003
3010
|
title?: string | undefined;
|
|
3004
3011
|
upstreamSessionId?: string | undefined;
|
|
3005
3012
|
currentModel?: string | undefined;
|
|
3006
|
-
currentMode?: string | undefined;
|
|
3007
3013
|
currentUsage?: {
|
|
3008
3014
|
used?: number | undefined;
|
|
3009
3015
|
size?: number | undefined;
|
|
@@ -3011,12 +3017,13 @@ declare const Bundle: z.ZodObject<{
|
|
|
3011
3017
|
costCurrency?: string | undefined;
|
|
3012
3018
|
cumulativeCost?: number | undefined;
|
|
3013
3019
|
} | undefined;
|
|
3014
|
-
interactive?: boolean | undefined;
|
|
3015
3020
|
originatingClient?: {
|
|
3016
3021
|
name: string;
|
|
3017
3022
|
version?: string | undefined;
|
|
3018
3023
|
} | undefined;
|
|
3024
|
+
interactive?: boolean | undefined;
|
|
3019
3025
|
priority?: number | undefined;
|
|
3026
|
+
currentMode?: string | undefined;
|
|
3020
3027
|
synopsis?: {
|
|
3021
3028
|
outcome?: string | undefined;
|
|
3022
3029
|
goal?: string | undefined;
|
|
@@ -3045,7 +3052,6 @@ declare const Bundle: z.ZodObject<{
|
|
|
3045
3052
|
title?: string | undefined;
|
|
3046
3053
|
upstreamSessionId?: string | undefined;
|
|
3047
3054
|
currentModel?: string | undefined;
|
|
3048
|
-
currentMode?: string | undefined;
|
|
3049
3055
|
currentUsage?: {
|
|
3050
3056
|
used?: number | undefined;
|
|
3051
3057
|
size?: number | undefined;
|
|
@@ -3053,12 +3059,13 @@ declare const Bundle: z.ZodObject<{
|
|
|
3053
3059
|
costCurrency?: string | undefined;
|
|
3054
3060
|
cumulativeCost?: number | undefined;
|
|
3055
3061
|
} | undefined;
|
|
3056
|
-
interactive?: boolean | undefined;
|
|
3057
3062
|
originatingClient?: {
|
|
3058
3063
|
name: string;
|
|
3059
3064
|
version?: string | undefined;
|
|
3060
3065
|
} | undefined;
|
|
3066
|
+
interactive?: boolean | undefined;
|
|
3061
3067
|
priority?: number | undefined;
|
|
3068
|
+
currentMode?: string | undefined;
|
|
3062
3069
|
synopsis?: {
|
|
3063
3070
|
outcome?: string | undefined;
|
|
3064
3071
|
goal?: string | undefined;
|
|
@@ -3105,7 +3112,6 @@ declare const Bundle: z.ZodObject<{
|
|
|
3105
3112
|
title?: string | undefined;
|
|
3106
3113
|
upstreamSessionId?: string | undefined;
|
|
3107
3114
|
currentModel?: string | undefined;
|
|
3108
|
-
currentMode?: string | undefined;
|
|
3109
3115
|
currentUsage?: {
|
|
3110
3116
|
used?: number | undefined;
|
|
3111
3117
|
size?: number | undefined;
|
|
@@ -3113,12 +3119,13 @@ declare const Bundle: z.ZodObject<{
|
|
|
3113
3119
|
costCurrency?: string | undefined;
|
|
3114
3120
|
cumulativeCost?: number | undefined;
|
|
3115
3121
|
} | undefined;
|
|
3116
|
-
interactive?: boolean | undefined;
|
|
3117
3122
|
originatingClient?: {
|
|
3118
3123
|
name: string;
|
|
3119
3124
|
version?: string | undefined;
|
|
3120
3125
|
} | undefined;
|
|
3126
|
+
interactive?: boolean | undefined;
|
|
3121
3127
|
priority?: number | undefined;
|
|
3128
|
+
currentMode?: string | undefined;
|
|
3122
3129
|
synopsis?: {
|
|
3123
3130
|
outcome?: string | undefined;
|
|
3124
3131
|
goal?: string | undefined;
|
|
@@ -3163,7 +3170,6 @@ declare const Bundle: z.ZodObject<{
|
|
|
3163
3170
|
title?: string | undefined;
|
|
3164
3171
|
upstreamSessionId?: string | undefined;
|
|
3165
3172
|
currentModel?: string | undefined;
|
|
3166
|
-
currentMode?: string | undefined;
|
|
3167
3173
|
currentUsage?: {
|
|
3168
3174
|
used?: number | undefined;
|
|
3169
3175
|
size?: number | undefined;
|
|
@@ -3171,12 +3177,13 @@ declare const Bundle: z.ZodObject<{
|
|
|
3171
3177
|
costCurrency?: string | undefined;
|
|
3172
3178
|
cumulativeCost?: number | undefined;
|
|
3173
3179
|
} | undefined;
|
|
3174
|
-
interactive?: boolean | undefined;
|
|
3175
3180
|
originatingClient?: {
|
|
3176
3181
|
name: string;
|
|
3177
3182
|
version?: string | undefined;
|
|
3178
3183
|
} | undefined;
|
|
3184
|
+
interactive?: boolean | undefined;
|
|
3179
3185
|
priority?: number | undefined;
|
|
3186
|
+
currentMode?: string | undefined;
|
|
3180
3187
|
synopsis?: {
|
|
3181
3188
|
outcome?: string | undefined;
|
|
3182
3189
|
goal?: string | undefined;
|
|
@@ -3326,6 +3333,7 @@ declare class SessionManager {
|
|
|
3326
3333
|
resolveCanonicalId(input: string): Promise<string | undefined>;
|
|
3327
3334
|
require(sessionId: string): Session;
|
|
3328
3335
|
liveListEntry(session: Session): SessionListEntry;
|
|
3336
|
+
getOne(sessionId: string): Promise<SessionListEntry | undefined>;
|
|
3329
3337
|
list(filter?: {
|
|
3330
3338
|
cwd?: string;
|
|
3331
3339
|
includeNonInteractive?: boolean;
|
|
@@ -3370,6 +3378,7 @@ declare class SessionManager {
|
|
|
3370
3378
|
private persistSynopsis;
|
|
3371
3379
|
private persistAgentChange;
|
|
3372
3380
|
private persistSnapshot;
|
|
3381
|
+
private mutateRecord;
|
|
3373
3382
|
private enqueueMetaWrite;
|
|
3374
3383
|
closeAll(): Promise<void>;
|
|
3375
3384
|
flushSynopsis(timeoutMs: number): Promise<void>;
|