@hydra-acp/cli 0.1.94 → 0.1.96
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 +311 -308
- package/dist/index.d.ts +43 -8
- package/dist/index.js +79 -77
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2614,6 +2614,7 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
2614
2614
|
description?: string | undefined;
|
|
2615
2615
|
}>, "many">>;
|
|
2616
2616
|
pendingHistorySync: z.ZodOptional<z.ZodBoolean>;
|
|
2617
|
+
pendingAgentSwap: z.ZodOptional<z.ZodString>;
|
|
2617
2618
|
parentSessionId: z.ZodOptional<z.ZodString>;
|
|
2618
2619
|
forkedFromSessionId: z.ZodOptional<z.ZodString>;
|
|
2619
2620
|
forkedFromMessageId: z.ZodOptional<z.ZodString>;
|
|
@@ -2725,6 +2726,7 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
2725
2726
|
description?: string | undefined;
|
|
2726
2727
|
}[] | undefined;
|
|
2727
2728
|
pendingHistorySync?: boolean | undefined;
|
|
2729
|
+
pendingAgentSwap?: string | undefined;
|
|
2728
2730
|
forwardedEnv?: Record<string, string> | undefined;
|
|
2729
2731
|
attentionFlags?: {
|
|
2730
2732
|
source: string;
|
|
@@ -2808,6 +2810,7 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
2808
2810
|
description?: string | undefined;
|
|
2809
2811
|
}[] | undefined;
|
|
2810
2812
|
pendingHistorySync?: boolean | undefined;
|
|
2813
|
+
pendingAgentSwap?: string | undefined;
|
|
2811
2814
|
forwardedEnv?: Record<string, string> | undefined;
|
|
2812
2815
|
attentionFlags?: {
|
|
2813
2816
|
source: string;
|
|
@@ -2900,8 +2903,11 @@ interface SessionInit {
|
|
|
2900
2903
|
agentModels?: AdvertisedModel[];
|
|
2901
2904
|
firstPromptSeeded?: boolean;
|
|
2902
2905
|
scheduleSynopsis?: () => void;
|
|
2903
|
-
scheduleCompaction?: (
|
|
2906
|
+
scheduleCompaction?: (opts?: {
|
|
2907
|
+
targetAgentId?: string;
|
|
2908
|
+
}) => void;
|
|
2904
2909
|
getCompactionState?: () => Promise<CompactionState | undefined>;
|
|
2910
|
+
getPendingAgentSwap?: () => Promise<string | undefined>;
|
|
2905
2911
|
createdAt?: number;
|
|
2906
2912
|
transformChain?: TransformerRef[];
|
|
2907
2913
|
idleEventTimeoutMs?: number;
|
|
@@ -2983,11 +2989,13 @@ declare class Session {
|
|
|
2983
2989
|
private closed;
|
|
2984
2990
|
private closing;
|
|
2985
2991
|
private closeInFlight;
|
|
2992
|
+
private deleteRecordIntent;
|
|
2986
2993
|
private closeHandlers;
|
|
2987
2994
|
private titleHandlers;
|
|
2988
2995
|
private scheduleSynopsisHook?;
|
|
2989
2996
|
private scheduleCompactionHook?;
|
|
2990
2997
|
private getCompactionStateHook?;
|
|
2998
|
+
private getPendingAgentSwapHook?;
|
|
2991
2999
|
private _liveCompactionPhase;
|
|
2992
3000
|
private broadcastHandlers;
|
|
2993
3001
|
private lastCancelAt;
|
|
@@ -3006,8 +3014,8 @@ declare class Session {
|
|
|
3006
3014
|
private internalPromptCapture;
|
|
3007
3015
|
private idleTimeoutMs;
|
|
3008
3016
|
private idleTimer;
|
|
3009
|
-
private idleEventTimer;
|
|
3010
3017
|
private idleEventTimeoutMs;
|
|
3018
|
+
private idleHandlers;
|
|
3011
3019
|
private lastRecordedAt;
|
|
3012
3020
|
private spawnReplacementAgent;
|
|
3013
3021
|
private mintMcpServersForSwap;
|
|
@@ -3023,6 +3031,9 @@ declare class Session {
|
|
|
3023
3031
|
private extensionCommands;
|
|
3024
3032
|
private extensionCommandsUnsub;
|
|
3025
3033
|
private pendingClaims;
|
|
3034
|
+
private toolCompletionSeen;
|
|
3035
|
+
private toolCallKind;
|
|
3036
|
+
private filesEditedSeen;
|
|
3026
3037
|
private agentChangeHandlers;
|
|
3027
3038
|
private agentAdvertisedCommands;
|
|
3028
3039
|
private agentAdvertisedModes;
|
|
@@ -3064,11 +3075,13 @@ declare class Session {
|
|
|
3064
3075
|
get turnStartedAt(): number | undefined;
|
|
3065
3076
|
get awaitingInput(): boolean;
|
|
3066
3077
|
isQuiescedForSwap(): Promise<boolean>;
|
|
3078
|
+
isQuiescedSync(): boolean;
|
|
3067
3079
|
swapUpstream(opts: {
|
|
3068
3080
|
artifact: SessionSynopsis;
|
|
3069
3081
|
title?: string;
|
|
3070
3082
|
tailK: number;
|
|
3071
3083
|
summarizedThroughEntry?: number;
|
|
3084
|
+
newAgentId?: string;
|
|
3072
3085
|
}): Promise<void>;
|
|
3073
3086
|
rollbackToUpstream(opts: {
|
|
3074
3087
|
previousUpstreamSessionId: string;
|
|
@@ -3115,9 +3128,17 @@ declare class Session {
|
|
|
3115
3128
|
cancel(clientId: string): Promise<void>;
|
|
3116
3129
|
addTransformer(ref: TransformerRef): void;
|
|
3117
3130
|
forwardRequest(method: string, params: unknown, originatedBy?: Set<string>, startIdx?: number, tailKind?: "request" | "notification"): Promise<unknown>;
|
|
3131
|
+
runAgentRequestChain(method: string, params: unknown, originatedBy?: Set<string>, startIdx?: number): Promise<{
|
|
3132
|
+
shortCircuit: false;
|
|
3133
|
+
envelope: unknown;
|
|
3134
|
+
} | {
|
|
3135
|
+
shortCircuit: true;
|
|
3136
|
+
payload: unknown;
|
|
3137
|
+
}>;
|
|
3118
3138
|
dischargeClaim(token: string, result: unknown): boolean;
|
|
3119
3139
|
keepAliveClaim(token: string, estimatedRemainingMs?: number): boolean;
|
|
3120
3140
|
emitToChain(emitterName: string, method: string, envelope: unknown): Promise<unknown>;
|
|
3141
|
+
emitToQueue(emitterName: string, envelope: unknown): Promise<unknown>;
|
|
3121
3142
|
private rewriteForAgent;
|
|
3122
3143
|
close(opts?: CloseOptions): Promise<void>;
|
|
3123
3144
|
private doClose;
|
|
@@ -3174,6 +3195,7 @@ declare class Session {
|
|
|
3174
3195
|
setAgent(newAgentId: string): Promise<unknown>;
|
|
3175
3196
|
private runAgentCommand;
|
|
3176
3197
|
private runAgentCommandInline;
|
|
3198
|
+
private runAgentStatusCommandInline;
|
|
3177
3199
|
private runKillCommand;
|
|
3178
3200
|
private runRestartCommand;
|
|
3179
3201
|
private runRestartCommandInline;
|
|
@@ -3190,6 +3212,7 @@ declare class Session {
|
|
|
3190
3212
|
seedFromImport(): Promise<void>;
|
|
3191
3213
|
seedFromFork(synopsis: SessionSynopsis): Promise<void>;
|
|
3192
3214
|
private broadcastAgentSwitch;
|
|
3215
|
+
broadcastPendingAgentSwap(targetAgentId: string | null): void;
|
|
3193
3216
|
hasStreamBuffer(): boolean;
|
|
3194
3217
|
get streamPath(): string | undefined;
|
|
3195
3218
|
openStream(opts: {
|
|
@@ -3247,8 +3270,14 @@ declare class Session {
|
|
|
3247
3270
|
private armIdleTimer;
|
|
3248
3271
|
private checkIdle;
|
|
3249
3272
|
private cancelIdleTimer;
|
|
3250
|
-
|
|
3251
|
-
|
|
3273
|
+
onIdle(fn: (s: Session) => void, opts?: {
|
|
3274
|
+
once?: boolean;
|
|
3275
|
+
debounceMs?: number;
|
|
3276
|
+
}): () => void;
|
|
3277
|
+
onceIdle(fn: (s: Session) => void): () => void;
|
|
3278
|
+
private dispatchIdle;
|
|
3279
|
+
private disposeIdleHandlers;
|
|
3280
|
+
private maybeEmitToolEdges;
|
|
3252
3281
|
private notifyChain;
|
|
3253
3282
|
private rewriteForClient;
|
|
3254
3283
|
private recordAndBroadcast;
|
|
@@ -3756,12 +3785,14 @@ declare class SessionManager {
|
|
|
3756
3785
|
private defaultCwd;
|
|
3757
3786
|
private synopsisCoordinator;
|
|
3758
3787
|
private pendingDeletions;
|
|
3759
|
-
private
|
|
3788
|
+
private pendingSwapDisposers;
|
|
3760
3789
|
private rollbackLocks;
|
|
3761
3790
|
private compactionTailK;
|
|
3762
3791
|
private agentCatalog;
|
|
3763
3792
|
constructor(registry: Registry, spawner?: AgentSpawner, store?: SessionStore, options?: SessionManagerOptions);
|
|
3764
|
-
private
|
|
3793
|
+
private dispatchSynthesisSwap;
|
|
3794
|
+
private onIdleAttemptSwap;
|
|
3795
|
+
private performSynthesisSwap;
|
|
3765
3796
|
private refreshAgentCatalog;
|
|
3766
3797
|
create(params: CreateSessionParams): Promise<Session>;
|
|
3767
3798
|
resurrect(params: ResurrectParams): Promise<Session>;
|
|
@@ -3851,16 +3882,20 @@ declare class SessionManager {
|
|
|
3851
3882
|
flushSynopsis(timeoutMs: number): Promise<void>;
|
|
3852
3883
|
shutdownSynopsis(): Promise<void>;
|
|
3853
3884
|
scheduleSynopsis(sessionId: string): void;
|
|
3854
|
-
scheduleCompaction(sessionId: string
|
|
3885
|
+
scheduleCompaction(sessionId: string, opts?: {
|
|
3886
|
+
targetAgentId?: string;
|
|
3887
|
+
}): void;
|
|
3855
3888
|
getCompactionInFlight(): boolean;
|
|
3889
|
+
getPendingAgentSwap(sessionId: string): Promise<string | undefined>;
|
|
3856
3890
|
getCompactionState(sessionId: string): Promise<CompactionState | undefined>;
|
|
3857
3891
|
getRollbackBreadcrumb(sessionId: string): Promise<RollbackBreadcrumb | undefined>;
|
|
3858
|
-
private
|
|
3892
|
+
private emitSwapPhase;
|
|
3859
3893
|
getSummarizedThroughEntry(sessionId: string): Promise<number | undefined>;
|
|
3860
3894
|
flushMetaWrites(): Promise<void>;
|
|
3861
3895
|
flushHistoryWrites(): Promise<void>;
|
|
3862
3896
|
reconcilePermissionFlags(): Promise<void>;
|
|
3863
3897
|
resumePendingCompactions(): Promise<void>;
|
|
3898
|
+
resumePendingAgentSwaps(): Promise<void>;
|
|
3864
3899
|
resurrectPendingQueues(): Promise<void>;
|
|
3865
3900
|
}
|
|
3866
3901
|
|