@hydra-acp/cli 0.1.62 → 0.1.64
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 +440 -33461
- package/dist/index.d.ts +55 -3
- package/dist/index.js +90 -15114
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -65,6 +65,8 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
65
65
|
agentStderrTailBytes: z.ZodDefault<z.ZodNumber>;
|
|
66
66
|
publicHost: z.ZodOptional<z.ZodString>;
|
|
67
67
|
agentSyncIntervalMinutes: z.ZodDefault<z.ZodNumber>;
|
|
68
|
+
sessionGcIntervalMinutes: z.ZodDefault<z.ZodNumber>;
|
|
69
|
+
sessionGcMaxAgeDays: z.ZodDefault<z.ZodNumber>;
|
|
68
70
|
}, "strip", z.ZodTypeAny, {
|
|
69
71
|
host: string;
|
|
70
72
|
port: number;
|
|
@@ -73,6 +75,8 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
73
75
|
sessionHistoryMaxEntries: number;
|
|
74
76
|
agentStderrTailBytes: number;
|
|
75
77
|
agentSyncIntervalMinutes: number;
|
|
78
|
+
sessionGcIntervalMinutes: number;
|
|
79
|
+
sessionGcMaxAgeDays: number;
|
|
76
80
|
tls?: {
|
|
77
81
|
cert: string;
|
|
78
82
|
key: string;
|
|
@@ -91,6 +95,8 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
91
95
|
agentStderrTailBytes?: number | undefined;
|
|
92
96
|
publicHost?: string | undefined;
|
|
93
97
|
agentSyncIntervalMinutes?: number | undefined;
|
|
98
|
+
sessionGcIntervalMinutes?: number | undefined;
|
|
99
|
+
sessionGcMaxAgeDays?: number | undefined;
|
|
94
100
|
}>>;
|
|
95
101
|
registry: z.ZodDefault<z.ZodObject<{
|
|
96
102
|
url: z.ZodDefault<z.ZodString>;
|
|
@@ -137,6 +143,7 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
137
143
|
synopsisModel: z.ZodOptional<z.ZodString>;
|
|
138
144
|
synopsisOnClose: z.ZodDefault<z.ZodBoolean>;
|
|
139
145
|
defaultCwd: z.ZodDefault<z.ZodString>;
|
|
146
|
+
compressToolContent: z.ZodDefault<z.ZodBoolean>;
|
|
140
147
|
sessionListColdLimit: z.ZodDefault<z.ZodNumber>;
|
|
141
148
|
extensions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
142
149
|
command: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -181,6 +188,9 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
181
188
|
progressIndicator: z.ZodDefault<z.ZodBoolean>;
|
|
182
189
|
defaultEnterAction: z.ZodDefault<z.ZodEnum<["enqueue", "amend"]>>;
|
|
183
190
|
showThoughts: z.ZodDefault<z.ZodBoolean>;
|
|
191
|
+
ambiguousWidth: z.ZodDefault<z.ZodEnum<["narrow", "wide"]>>;
|
|
192
|
+
toolContent: z.ZodDefault<z.ZodEnum<["inline", "references"]>>;
|
|
193
|
+
diffContextLines: z.ZodDefault<z.ZodNumber>;
|
|
184
194
|
promptHistoryMaxEntries: z.ZodDefault<z.ZodNumber>;
|
|
185
195
|
maxToolItems: z.ZodDefault<z.ZodNumber>;
|
|
186
196
|
maxPlanItems: z.ZodDefault<z.ZodNumber>;
|
|
@@ -195,6 +205,9 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
195
205
|
progressIndicator: boolean;
|
|
196
206
|
defaultEnterAction: "enqueue" | "amend";
|
|
197
207
|
showThoughts: boolean;
|
|
208
|
+
ambiguousWidth: "narrow" | "wide";
|
|
209
|
+
toolContent: "inline" | "references";
|
|
210
|
+
diffContextLines: number;
|
|
198
211
|
promptHistoryMaxEntries: number;
|
|
199
212
|
maxToolItems: number;
|
|
200
213
|
maxPlanItems: number;
|
|
@@ -209,6 +222,9 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
209
222
|
progressIndicator?: boolean | undefined;
|
|
210
223
|
defaultEnterAction?: "enqueue" | "amend" | undefined;
|
|
211
224
|
showThoughts?: boolean | undefined;
|
|
225
|
+
ambiguousWidth?: "narrow" | "wide" | undefined;
|
|
226
|
+
toolContent?: "inline" | "references" | undefined;
|
|
227
|
+
diffContextLines?: number | undefined;
|
|
212
228
|
promptHistoryMaxEntries?: number | undefined;
|
|
213
229
|
maxToolItems?: number | undefined;
|
|
214
230
|
maxPlanItems?: number | undefined;
|
|
@@ -225,6 +241,9 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
225
241
|
progressIndicator: boolean;
|
|
226
242
|
defaultEnterAction: "enqueue" | "amend";
|
|
227
243
|
showThoughts: boolean;
|
|
244
|
+
ambiguousWidth: "narrow" | "wide";
|
|
245
|
+
toolContent: "inline" | "references";
|
|
246
|
+
diffContextLines: number;
|
|
228
247
|
promptHistoryMaxEntries: number;
|
|
229
248
|
maxToolItems: number;
|
|
230
249
|
maxPlanItems: number;
|
|
@@ -239,6 +258,8 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
239
258
|
sessionHistoryMaxEntries: number;
|
|
240
259
|
agentStderrTailBytes: number;
|
|
241
260
|
agentSyncIntervalMinutes: number;
|
|
261
|
+
sessionGcIntervalMinutes: number;
|
|
262
|
+
sessionGcMaxAgeDays: number;
|
|
242
263
|
tls?: {
|
|
243
264
|
cert: string;
|
|
244
265
|
key: string;
|
|
@@ -276,6 +297,7 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
276
297
|
defaultModels: Record<string, string>;
|
|
277
298
|
synopsisOnClose: boolean;
|
|
278
299
|
defaultCwd: string;
|
|
300
|
+
compressToolContent: boolean;
|
|
279
301
|
sessionListColdLimit: number;
|
|
280
302
|
defaultTransformers: string[];
|
|
281
303
|
synopsisAgent?: string | undefined;
|
|
@@ -291,6 +313,9 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
291
313
|
progressIndicator?: boolean | undefined;
|
|
292
314
|
defaultEnterAction?: "enqueue" | "amend" | undefined;
|
|
293
315
|
showThoughts?: boolean | undefined;
|
|
316
|
+
ambiguousWidth?: "narrow" | "wide" | undefined;
|
|
317
|
+
toolContent?: "inline" | "references" | undefined;
|
|
318
|
+
diffContextLines?: number | undefined;
|
|
294
319
|
promptHistoryMaxEntries?: number | undefined;
|
|
295
320
|
maxToolItems?: number | undefined;
|
|
296
321
|
maxPlanItems?: number | undefined;
|
|
@@ -310,6 +335,8 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
310
335
|
agentStderrTailBytes?: number | undefined;
|
|
311
336
|
publicHost?: string | undefined;
|
|
312
337
|
agentSyncIntervalMinutes?: number | undefined;
|
|
338
|
+
sessionGcIntervalMinutes?: number | undefined;
|
|
339
|
+
sessionGcMaxAgeDays?: number | undefined;
|
|
313
340
|
} | undefined;
|
|
314
341
|
extensions?: Record<string, {
|
|
315
342
|
args?: string[] | undefined;
|
|
@@ -344,6 +371,7 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
344
371
|
synopsisModel?: string | undefined;
|
|
345
372
|
synopsisOnClose?: boolean | undefined;
|
|
346
373
|
defaultCwd?: string | undefined;
|
|
374
|
+
compressToolContent?: boolean | undefined;
|
|
347
375
|
sessionListColdLimit?: number | undefined;
|
|
348
376
|
defaultTransformers?: string[] | undefined;
|
|
349
377
|
npmRegistry?: string | undefined;
|
|
@@ -1896,6 +1924,7 @@ interface AgentInstanceOptions {
|
|
|
1896
1924
|
plan: SpawnPlan;
|
|
1897
1925
|
extraEnv?: Record<string, string>;
|
|
1898
1926
|
stderrTailBytes?: number;
|
|
1927
|
+
killEscalationMs?: number;
|
|
1899
1928
|
logger?: AgentLogger;
|
|
1900
1929
|
}
|
|
1901
1930
|
interface AgentLogger {
|
|
@@ -1912,6 +1941,7 @@ declare class AgentInstance {
|
|
|
1912
1941
|
private killed;
|
|
1913
1942
|
private stderrTail;
|
|
1914
1943
|
private stderrTailBytes;
|
|
1944
|
+
private killEscalationMs;
|
|
1915
1945
|
private logger?;
|
|
1916
1946
|
private fileLog?;
|
|
1917
1947
|
private exitHandlers;
|
|
@@ -1922,6 +1952,8 @@ declare class AgentInstance {
|
|
|
1922
1952
|
onExit(handler: (code: number | null, signal: NodeJS.Signals | null) => void): void;
|
|
1923
1953
|
isAlive(): boolean;
|
|
1924
1954
|
kill(signal?: NodeJS.Signals): Promise<void>;
|
|
1955
|
+
private signalProcessGroup;
|
|
1956
|
+
private waitForExit;
|
|
1925
1957
|
}
|
|
1926
1958
|
|
|
1927
1959
|
interface TokenValidator {
|
|
@@ -2165,7 +2197,9 @@ declare class HistoryStore {
|
|
|
2165
2197
|
append(sessionId: string, entry: HistoryEntry): Promise<void>;
|
|
2166
2198
|
rewrite(sessionId: string, entries: HistoryEntry[]): Promise<void>;
|
|
2167
2199
|
compact(sessionId: string, maxEntries: number): Promise<void>;
|
|
2168
|
-
load(sessionId: string
|
|
2200
|
+
load(sessionId: string, opts?: {
|
|
2201
|
+
tools?: "inline" | "references";
|
|
2202
|
+
}): Promise<HistoryEntry[]>;
|
|
2169
2203
|
flushAll(): Promise<void>;
|
|
2170
2204
|
delete(sessionId: string): Promise<void>;
|
|
2171
2205
|
private enqueue;
|
|
@@ -2367,11 +2401,12 @@ declare class Session {
|
|
|
2367
2401
|
}>;
|
|
2368
2402
|
get turnStartedAt(): number | undefined;
|
|
2369
2403
|
get awaitingInput(): boolean;
|
|
2370
|
-
getHistorySnapshot(): Promise<CachedNotification[]>;
|
|
2404
|
+
getHistorySnapshot(tools?: "inline" | "references"): Promise<CachedNotification[]>;
|
|
2371
2405
|
onBroadcast(handler: (entry: CachedNotification) => void): () => void;
|
|
2372
2406
|
attach(client: AttachedClient, historyPolicy: HistoryPolicy, opts?: {
|
|
2373
2407
|
afterMessageId?: string;
|
|
2374
2408
|
raw?: boolean;
|
|
2409
|
+
toolContent?: "inline" | "references";
|
|
2375
2410
|
}): Promise<{
|
|
2376
2411
|
entries: CachedNotification[];
|
|
2377
2412
|
appliedPolicy: HistoryPolicy;
|
|
@@ -2789,6 +2824,7 @@ declare const Tombstone: z.ZodObject<{
|
|
|
2789
2824
|
cwd: z.ZodOptional<z.ZodString>;
|
|
2790
2825
|
title: z.ZodOptional<z.ZodString>;
|
|
2791
2826
|
reason: z.ZodOptional<z.ZodEnum<["user", "expired"]>>;
|
|
2827
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
2792
2828
|
}, "strip", z.ZodTypeAny, {
|
|
2793
2829
|
version: 1;
|
|
2794
2830
|
upstreamSessionId: string;
|
|
@@ -2796,6 +2832,7 @@ declare const Tombstone: z.ZodObject<{
|
|
|
2796
2832
|
deletedAt: string;
|
|
2797
2833
|
cwd?: string | undefined;
|
|
2798
2834
|
title?: string | undefined;
|
|
2835
|
+
interactive?: boolean | undefined;
|
|
2799
2836
|
reason?: "user" | "expired" | undefined;
|
|
2800
2837
|
upstreamUpdatedAt?: string | undefined;
|
|
2801
2838
|
}, {
|
|
@@ -2805,6 +2842,7 @@ declare const Tombstone: z.ZodObject<{
|
|
|
2805
2842
|
deletedAt: string;
|
|
2806
2843
|
cwd?: string | undefined;
|
|
2807
2844
|
title?: string | undefined;
|
|
2845
|
+
interactive?: boolean | undefined;
|
|
2808
2846
|
reason?: "user" | "expired" | undefined;
|
|
2809
2847
|
upstreamUpdatedAt?: string | undefined;
|
|
2810
2848
|
}>;
|
|
@@ -3018,6 +3056,7 @@ declare const Bundle: z.ZodObject<{
|
|
|
3018
3056
|
params?: unknown;
|
|
3019
3057
|
}>, "many">;
|
|
3020
3058
|
promptHistory: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3059
|
+
toolBlobs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3021
3060
|
}, "strip", z.ZodTypeAny, {
|
|
3022
3061
|
version: 1;
|
|
3023
3062
|
session: {
|
|
@@ -3074,6 +3113,7 @@ declare const Bundle: z.ZodObject<{
|
|
|
3074
3113
|
params?: unknown;
|
|
3075
3114
|
}[];
|
|
3076
3115
|
promptHistory?: string[] | undefined;
|
|
3116
|
+
toolBlobs?: Record<string, string> | undefined;
|
|
3077
3117
|
}, {
|
|
3078
3118
|
version: 1;
|
|
3079
3119
|
session: {
|
|
@@ -3130,6 +3170,7 @@ declare const Bundle: z.ZodObject<{
|
|
|
3130
3170
|
params?: unknown;
|
|
3131
3171
|
}[];
|
|
3132
3172
|
promptHistory?: string[] | undefined;
|
|
3173
|
+
toolBlobs?: Record<string, string> | undefined;
|
|
3133
3174
|
}>;
|
|
3134
3175
|
type Bundle = z.infer<typeof Bundle>;
|
|
3135
3176
|
|
|
@@ -3208,6 +3249,8 @@ declare class SessionManager {
|
|
|
3208
3249
|
private idleEventTimeoutMs;
|
|
3209
3250
|
private sessionHistoryMaxEntries;
|
|
3210
3251
|
private metaWriteQueues;
|
|
3252
|
+
private listCache;
|
|
3253
|
+
private static readonly LIST_CACHE_TTL_MS;
|
|
3211
3254
|
private logger?;
|
|
3212
3255
|
private npmRegistry?;
|
|
3213
3256
|
private extensionCommands?;
|
|
@@ -3228,10 +3271,12 @@ declare class SessionManager {
|
|
|
3228
3271
|
skipped: number;
|
|
3229
3272
|
}>;
|
|
3230
3273
|
private collectAgentSessions;
|
|
3274
|
+
private applySeedModel;
|
|
3231
3275
|
private bootstrapAgent;
|
|
3232
3276
|
private attachManagerHooks;
|
|
3233
3277
|
getHistory(sessionId: string): Promise<HistoryEntry[] | undefined>;
|
|
3234
3278
|
loadHistory(sessionId: string): Promise<HistoryEntry[]>;
|
|
3279
|
+
loadToolBlob(sessionId: string, hash: string): Promise<string | null>;
|
|
3235
3280
|
loadFromDisk(sessionId: string): Promise<ResurrectParams | undefined>;
|
|
3236
3281
|
private clearPendingHistorySync;
|
|
3237
3282
|
private deriveTitleFromHistory;
|
|
@@ -3245,12 +3290,17 @@ declare class SessionManager {
|
|
|
3245
3290
|
cwd?: string;
|
|
3246
3291
|
includeNonInteractive?: boolean;
|
|
3247
3292
|
}): Promise<SessionListEntry[]>;
|
|
3248
|
-
|
|
3293
|
+
private invalidateListCache;
|
|
3294
|
+
private listUncached;
|
|
3295
|
+
exportBundle(sessionId: string, opts?: {
|
|
3296
|
+
tools?: "inline" | "references";
|
|
3297
|
+
}): Promise<{
|
|
3249
3298
|
record: SessionRecord & {
|
|
3250
3299
|
lineageId: string;
|
|
3251
3300
|
};
|
|
3252
3301
|
history: HistoryEntry[];
|
|
3253
3302
|
promptHistory: string[];
|
|
3303
|
+
toolBlobs?: Record<string, string>;
|
|
3254
3304
|
} | undefined>;
|
|
3255
3305
|
importBundle(bundle: Bundle, opts?: {
|
|
3256
3306
|
replace?: boolean;
|
|
@@ -3376,6 +3426,8 @@ declare const paths: {
|
|
|
3376
3426
|
sessionDir: (id: string) => string;
|
|
3377
3427
|
sessionFile: (id: string) => string;
|
|
3378
3428
|
historyFile: (id: string) => string;
|
|
3429
|
+
toolsDir: (id: string) => string;
|
|
3430
|
+
toolBlobFile: (id: string, hash: string) => string;
|
|
3379
3431
|
queueFile: (id: string) => string;
|
|
3380
3432
|
tombstonesDir: () => string;
|
|
3381
3433
|
tombstoneAgentDir: (agentId: string) => string;
|