@hydra-acp/cli 0.1.90 → 0.1.92
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 +316 -313
- package/dist/index.d.ts +64 -2
- package/dist/index.js +75 -75
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1669,6 +1669,24 @@ declare function planSpawn(agent: RegistryAgent, callerArgs?: string[], options?
|
|
|
1669
1669
|
onInstallProgress?: AgentInstallProgressCallback;
|
|
1670
1670
|
}): Promise<SpawnPlan>;
|
|
1671
1671
|
|
|
1672
|
+
declare const AttentionFlagSchema: z.ZodObject<{
|
|
1673
|
+
source: z.ZodString;
|
|
1674
|
+
reason: z.ZodString;
|
|
1675
|
+
raisedAt: z.ZodNumber;
|
|
1676
|
+
payload: z.ZodUnknown;
|
|
1677
|
+
}, "strip", z.ZodTypeAny, {
|
|
1678
|
+
source: string;
|
|
1679
|
+
reason: string;
|
|
1680
|
+
raisedAt: number;
|
|
1681
|
+
payload?: unknown;
|
|
1682
|
+
}, {
|
|
1683
|
+
source: string;
|
|
1684
|
+
reason: string;
|
|
1685
|
+
raisedAt: number;
|
|
1686
|
+
payload?: unknown;
|
|
1687
|
+
}>;
|
|
1688
|
+
type AttentionFlag = z.infer<typeof AttentionFlagSchema>;
|
|
1689
|
+
|
|
1672
1690
|
type JsonRpcId = string | number;
|
|
1673
1691
|
interface JsonRpcRequest {
|
|
1674
1692
|
jsonrpc: "2.0";
|
|
@@ -2607,6 +2625,22 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
2607
2625
|
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
2608
2626
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
2609
2627
|
forwardedEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2628
|
+
attentionFlags: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2629
|
+
source: z.ZodString;
|
|
2630
|
+
reason: z.ZodString;
|
|
2631
|
+
raisedAt: z.ZodNumber;
|
|
2632
|
+
payload: z.ZodUnknown;
|
|
2633
|
+
}, "strip", z.ZodTypeAny, {
|
|
2634
|
+
source: string;
|
|
2635
|
+
reason: string;
|
|
2636
|
+
raisedAt: number;
|
|
2637
|
+
payload?: unknown;
|
|
2638
|
+
}, {
|
|
2639
|
+
source: string;
|
|
2640
|
+
reason: string;
|
|
2641
|
+
raisedAt: number;
|
|
2642
|
+
payload?: unknown;
|
|
2643
|
+
}>, "many">>>;
|
|
2610
2644
|
createdAt: z.ZodString;
|
|
2611
2645
|
updatedAt: z.ZodString;
|
|
2612
2646
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -2685,6 +2719,12 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
2685
2719
|
}[] | undefined;
|
|
2686
2720
|
pendingHistorySync?: boolean | undefined;
|
|
2687
2721
|
forwardedEnv?: Record<string, string> | undefined;
|
|
2722
|
+
attentionFlags?: {
|
|
2723
|
+
source: string;
|
|
2724
|
+
reason: string;
|
|
2725
|
+
raisedAt: number;
|
|
2726
|
+
payload?: unknown;
|
|
2727
|
+
}[] | undefined;
|
|
2688
2728
|
}, {
|
|
2689
2729
|
sessionId: string;
|
|
2690
2730
|
version: 1;
|
|
@@ -2761,6 +2801,12 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
2761
2801
|
}[] | undefined;
|
|
2762
2802
|
pendingHistorySync?: boolean | undefined;
|
|
2763
2803
|
forwardedEnv?: Record<string, string> | undefined;
|
|
2804
|
+
attentionFlags?: {
|
|
2805
|
+
source: string;
|
|
2806
|
+
reason: string;
|
|
2807
|
+
raisedAt: number;
|
|
2808
|
+
payload?: unknown;
|
|
2809
|
+
}[] | undefined;
|
|
2764
2810
|
}>;
|
|
2765
2811
|
type SessionRecord = z.infer<typeof SessionRecord>;
|
|
2766
2812
|
declare class SessionStore {
|
|
@@ -2876,6 +2922,7 @@ interface SessionInit {
|
|
|
2876
2922
|
}>;
|
|
2877
2923
|
summarizedThroughEntry?: number;
|
|
2878
2924
|
compactionState?: CompactionState;
|
|
2925
|
+
attentionFlags?: AttentionFlag[];
|
|
2879
2926
|
mcpServers?: unknown[];
|
|
2880
2927
|
loadExistingAgentSession?: LoadExistingAgentSession;
|
|
2881
2928
|
clearRollbackBreadcrumbHook?: () => void;
|
|
@@ -2942,7 +2989,10 @@ declare class Session {
|
|
|
2942
2989
|
private appendCount;
|
|
2943
2990
|
private historyMaxEntries;
|
|
2944
2991
|
private compactEvery;
|
|
2945
|
-
private
|
|
2992
|
+
private permissionCallbacks;
|
|
2993
|
+
private attentionFlags;
|
|
2994
|
+
private get hasPermissionFlag();
|
|
2995
|
+
private attentionFlagsChangeHandlers;
|
|
2946
2996
|
private internalPromptCapture;
|
|
2947
2997
|
private idleTimeoutMs;
|
|
2948
2998
|
private idleTimer;
|
|
@@ -3017,6 +3067,7 @@ declare class Session {
|
|
|
3017
3067
|
private _hasOpenToolCall;
|
|
3018
3068
|
getHistorySnapshot(tools?: "inline" | "references"): Promise<CachedNotification[]>;
|
|
3019
3069
|
onBroadcast(handler: (entry: CachedNotification) => void): () => void;
|
|
3070
|
+
broadcastClientUpdate(update: Record<string, unknown>): void;
|
|
3020
3071
|
broadcastCompactionPhase(update: Record<string, unknown>): void;
|
|
3021
3072
|
attach(client: AttachedClient, historyPolicy: HistoryPolicy, opts?: {
|
|
3022
3073
|
afterMessageId?: string;
|
|
@@ -3172,6 +3223,15 @@ declare class Session {
|
|
|
3172
3223
|
private requireStreamBuffer;
|
|
3173
3224
|
private markClosed;
|
|
3174
3225
|
private get lastActivityAt();
|
|
3226
|
+
setAttentionFlag(source: string, reason: string, payload: unknown): void;
|
|
3227
|
+
private _setAttentionFlag;
|
|
3228
|
+
clearAttentionFlag(source: string, reason: string): void;
|
|
3229
|
+
private _clearAttentionFlag;
|
|
3230
|
+
listAttentionFlags(): AttentionFlag[];
|
|
3231
|
+
listAttentionFlagsBySource(source: string): AttentionFlag[];
|
|
3232
|
+
onAttentionFlagsChange(handler: (flags: AttentionFlag[]) => void): void;
|
|
3233
|
+
private fireAttentionFlagsChange;
|
|
3234
|
+
private broadcastAttentionUpdated;
|
|
3175
3235
|
private scheduleIdleCheck;
|
|
3176
3236
|
private armIdleTimer;
|
|
3177
3237
|
private checkIdle;
|
|
@@ -3633,6 +3693,7 @@ interface ResurrectParams {
|
|
|
3633
3693
|
mcpServers?: unknown[];
|
|
3634
3694
|
forwardedEnv?: Record<string, string>;
|
|
3635
3695
|
compactionState?: CompactionState;
|
|
3696
|
+
attentionFlags?: AttentionFlag[];
|
|
3636
3697
|
mintMcpServersForSwap?: (session: Session) => Promise<unknown[]>;
|
|
3637
3698
|
}
|
|
3638
3699
|
type AgentSpawner = (opts: AgentInstanceOptions) => AgentInstance;
|
|
@@ -3759,7 +3820,7 @@ declare class SessionManager {
|
|
|
3759
3820
|
forkedAt: string;
|
|
3760
3821
|
}>;
|
|
3761
3822
|
private writeImportedRecord;
|
|
3762
|
-
deleteRecord(sessionId: string): Promise<boolean>;
|
|
3823
|
+
deleteRecord(sessionId: string, reason?: "user" | "expired"): Promise<boolean>;
|
|
3763
3824
|
hasRecord(sessionId: string): Promise<boolean>;
|
|
3764
3825
|
setPriority(sessionId: string, priority: number | undefined): Promise<boolean>;
|
|
3765
3826
|
private persistPriority;
|
|
@@ -3782,6 +3843,7 @@ declare class SessionManager {
|
|
|
3782
3843
|
getSummarizedThroughEntry(sessionId: string): Promise<number | undefined>;
|
|
3783
3844
|
flushMetaWrites(): Promise<void>;
|
|
3784
3845
|
flushHistoryWrites(): Promise<void>;
|
|
3846
|
+
reconcilePermissionFlags(): Promise<void>;
|
|
3785
3847
|
resumePendingCompactions(): Promise<void>;
|
|
3786
3848
|
resurrectPendingQueues(): Promise<void>;
|
|
3787
3849
|
}
|