@hydra-acp/cli 0.1.91 → 0.1.93

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
@@ -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";
@@ -1800,6 +1818,7 @@ declare const SessionListEntry: z.ZodObject<{
1800
1818
  busy: z.ZodDefault<z.ZodBoolean>;
1801
1819
  awaitingInput: z.ZodDefault<z.ZodBoolean>;
1802
1820
  compactionState: z.ZodOptional<z.ZodAny>;
1821
+ forkSynthesisState: z.ZodOptional<z.ZodEnum<["running", "failed"]>>;
1803
1822
  _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1804
1823
  }, "strip", z.ZodTypeAny, {
1805
1824
  sessionId: string;
@@ -1832,6 +1851,7 @@ declare const SessionListEntry: z.ZodObject<{
1832
1851
  interactive?: boolean | undefined;
1833
1852
  priority?: number | undefined;
1834
1853
  compactionState?: any;
1854
+ forkSynthesisState?: "running" | "failed" | undefined;
1835
1855
  }, {
1836
1856
  sessionId: string;
1837
1857
  cwd: string;
@@ -1863,6 +1883,7 @@ declare const SessionListEntry: z.ZodObject<{
1863
1883
  busy?: boolean | undefined;
1864
1884
  awaitingInput?: boolean | undefined;
1865
1885
  compactionState?: any;
1886
+ forkSynthesisState?: "running" | "failed" | undefined;
1866
1887
  }>;
1867
1888
  type SessionListEntry = z.infer<typeof SessionListEntry>;
1868
1889
  declare const SessionListResult: z.ZodObject<{
@@ -2000,6 +2021,7 @@ interface AuthMethod {
2000
2021
  id: string;
2001
2022
  description: string;
2002
2023
  type?: "agent" | "terminal";
2024
+ args?: string[];
2003
2025
  name?: string;
2004
2026
  _meta?: Record<string, unknown>;
2005
2027
  }
@@ -2594,6 +2616,7 @@ declare const SessionRecord: z.ZodObject<{
2594
2616
  parentSessionId: z.ZodOptional<z.ZodString>;
2595
2617
  forkedFromSessionId: z.ZodOptional<z.ZodString>;
2596
2618
  forkedFromMessageId: z.ZodOptional<z.ZodString>;
2619
+ forkSynthesisState: z.ZodOptional<z.ZodEnum<["running", "failed"]>>;
2597
2620
  originatingClient: z.ZodOptional<z.ZodObject<{
2598
2621
  name: z.ZodString;
2599
2622
  version: z.ZodOptional<z.ZodString>;
@@ -2607,6 +2630,22 @@ declare const SessionRecord: z.ZodObject<{
2607
2630
  interactive: z.ZodOptional<z.ZodBoolean>;
2608
2631
  priority: z.ZodOptional<z.ZodNumber>;
2609
2632
  forwardedEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2633
+ attentionFlags: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
2634
+ source: z.ZodString;
2635
+ reason: z.ZodString;
2636
+ raisedAt: z.ZodNumber;
2637
+ payload: z.ZodUnknown;
2638
+ }, "strip", z.ZodTypeAny, {
2639
+ source: string;
2640
+ reason: string;
2641
+ raisedAt: number;
2642
+ payload?: unknown;
2643
+ }, {
2644
+ source: string;
2645
+ reason: string;
2646
+ raisedAt: number;
2647
+ payload?: unknown;
2648
+ }>, "many">>>;
2610
2649
  createdAt: z.ZodString;
2611
2650
  updatedAt: z.ZodString;
2612
2651
  }, "strip", z.ZodTypeAny, {
@@ -2661,6 +2700,7 @@ declare const SessionRecord: z.ZodObject<{
2661
2700
  upstreamSessionId: string;
2662
2701
  } | undefined;
2663
2702
  } | undefined;
2703
+ forkSynthesisState?: "running" | "failed" | undefined;
2664
2704
  currentMode?: string | undefined;
2665
2705
  lineageId?: string | undefined;
2666
2706
  importedFromSessionId?: string | undefined;
@@ -2685,6 +2725,12 @@ declare const SessionRecord: z.ZodObject<{
2685
2725
  }[] | undefined;
2686
2726
  pendingHistorySync?: boolean | undefined;
2687
2727
  forwardedEnv?: Record<string, string> | undefined;
2728
+ attentionFlags?: {
2729
+ source: string;
2730
+ reason: string;
2731
+ raisedAt: number;
2732
+ payload?: unknown;
2733
+ }[] | undefined;
2688
2734
  }, {
2689
2735
  sessionId: string;
2690
2736
  version: 1;
@@ -2737,6 +2783,7 @@ declare const SessionRecord: z.ZodObject<{
2737
2783
  upstreamSessionId: string;
2738
2784
  } | undefined;
2739
2785
  } | undefined;
2786
+ forkSynthesisState?: "running" | "failed" | undefined;
2740
2787
  currentMode?: string | undefined;
2741
2788
  lineageId?: string | undefined;
2742
2789
  importedFromSessionId?: string | undefined;
@@ -2761,6 +2808,12 @@ declare const SessionRecord: z.ZodObject<{
2761
2808
  }[] | undefined;
2762
2809
  pendingHistorySync?: boolean | undefined;
2763
2810
  forwardedEnv?: Record<string, string> | undefined;
2811
+ attentionFlags?: {
2812
+ source: string;
2813
+ reason: string;
2814
+ raisedAt: number;
2815
+ payload?: unknown;
2816
+ }[] | undefined;
2764
2817
  }>;
2765
2818
  type SessionRecord = z.infer<typeof SessionRecord>;
2766
2819
  declare class SessionStore {
@@ -2854,6 +2907,7 @@ interface SessionInit {
2854
2907
  parentSessionId?: string;
2855
2908
  forkedFromSessionId?: string;
2856
2909
  forkedFromMessageId?: string;
2910
+ forkSynthesisState?: "running" | "failed";
2857
2911
  originatingClient?: {
2858
2912
  name: string;
2859
2913
  version?: string;
@@ -2876,6 +2930,7 @@ interface SessionInit {
2876
2930
  }>;
2877
2931
  summarizedThroughEntry?: number;
2878
2932
  compactionState?: CompactionState;
2933
+ attentionFlags?: AttentionFlag[];
2879
2934
  mcpServers?: unknown[];
2880
2935
  loadExistingAgentSession?: LoadExistingAgentSession;
2881
2936
  clearRollbackBreadcrumbHook?: () => void;
@@ -2897,6 +2952,7 @@ declare class Session {
2897
2952
  readonly parentSessionId: string | undefined;
2898
2953
  readonly forkedFromSessionId: string | undefined;
2899
2954
  readonly forkedFromMessageId: string | undefined;
2955
+ forkSynthesisState: "running" | "failed" | undefined;
2900
2956
  readonly originatingClient: {
2901
2957
  name: string;
2902
2958
  version?: string;
@@ -2942,7 +2998,10 @@ declare class Session {
2942
2998
  private appendCount;
2943
2999
  private historyMaxEntries;
2944
3000
  private compactEvery;
2945
- private inFlightPermissions;
3001
+ private permissionCallbacks;
3002
+ private attentionFlags;
3003
+ private get hasPermissionFlag();
3004
+ private attentionFlagsChangeHandlers;
2946
3005
  private internalPromptCapture;
2947
3006
  private idleTimeoutMs;
2948
3007
  private idleTimer;
@@ -3017,6 +3076,7 @@ declare class Session {
3017
3076
  private _hasOpenToolCall;
3018
3077
  getHistorySnapshot(tools?: "inline" | "references"): Promise<CachedNotification[]>;
3019
3078
  onBroadcast(handler: (entry: CachedNotification) => void): () => void;
3079
+ broadcastClientUpdate(update: Record<string, unknown>): void;
3020
3080
  broadcastCompactionPhase(update: Record<string, unknown>): void;
3021
3081
  attach(client: AttachedClient, historyPolicy: HistoryPolicy, opts?: {
3022
3082
  afterMessageId?: string;
@@ -3127,6 +3187,7 @@ declare class Session {
3127
3187
  private respawnAgent;
3128
3188
  private buildSwitchTranscript;
3129
3189
  seedFromImport(): Promise<void>;
3190
+ seedFromFork(synopsis: SessionSynopsis): Promise<void>;
3130
3191
  private broadcastAgentSwitch;
3131
3192
  hasStreamBuffer(): boolean;
3132
3193
  get streamPath(): string | undefined;
@@ -3172,6 +3233,15 @@ declare class Session {
3172
3233
  private requireStreamBuffer;
3173
3234
  private markClosed;
3174
3235
  private get lastActivityAt();
3236
+ setAttentionFlag(source: string, reason: string, payload: unknown): void;
3237
+ private _setAttentionFlag;
3238
+ clearAttentionFlag(source: string, reason: string): void;
3239
+ private _clearAttentionFlag;
3240
+ listAttentionFlags(): AttentionFlag[];
3241
+ listAttentionFlagsBySource(source: string): AttentionFlag[];
3242
+ onAttentionFlagsChange(handler: (flags: AttentionFlag[]) => void): void;
3243
+ private fireAttentionFlagsChange;
3244
+ private broadcastAttentionUpdated;
3175
3245
  private scheduleIdleCheck;
3176
3246
  private armIdleTimer;
3177
3247
  private checkIdle;
@@ -3630,9 +3700,11 @@ interface ResurrectParams {
3630
3700
  priority?: number;
3631
3701
  forkedFromSessionId?: string;
3632
3702
  forkedFromMessageId?: string;
3703
+ forkSynthesisState?: "running" | "failed";
3633
3704
  mcpServers?: unknown[];
3634
3705
  forwardedEnv?: Record<string, string>;
3635
3706
  compactionState?: CompactionState;
3707
+ attentionFlags?: AttentionFlag[];
3636
3708
  mintMcpServersForSwap?: (session: Session) => Promise<unknown[]>;
3637
3709
  }
3638
3710
  type AgentSpawner = (opts: AgentInstanceOptions) => AgentInstance;
@@ -3682,6 +3754,7 @@ declare class SessionManager {
3682
3754
  private extensionCommands?;
3683
3755
  private defaultCwd;
3684
3756
  private synopsisCoordinator;
3757
+ private pendingDeletions;
3685
3758
  private compactionDeferrals;
3686
3759
  private rollbackLocks;
3687
3760
  private compactionTailK;
@@ -3753,13 +3826,16 @@ declare class SessionManager {
3753
3826
  cwd?: string;
3754
3827
  agentId?: string;
3755
3828
  title?: string;
3829
+ mode?: "verbatim" | "synthesis";
3756
3830
  }): Promise<{
3757
3831
  sessionId: string;
3758
3832
  forkedFromSessionId: string;
3759
3833
  forkedAt: string;
3760
3834
  }>;
3761
3835
  private writeImportedRecord;
3762
- deleteRecord(sessionId: string): Promise<boolean>;
3836
+ deleteRecord(sessionId: string, reason?: "user" | "expired"): Promise<boolean>;
3837
+ waitForDeletion(sessionId: string): Promise<void>;
3838
+ isTombstoned(agentId: string, upstreamSessionId: string): Promise<boolean>;
3763
3839
  hasRecord(sessionId: string): Promise<boolean>;
3764
3840
  setPriority(sessionId: string, priority: number | undefined): Promise<boolean>;
3765
3841
  private persistPriority;
@@ -3782,6 +3858,7 @@ declare class SessionManager {
3782
3858
  getSummarizedThroughEntry(sessionId: string): Promise<number | undefined>;
3783
3859
  flushMetaWrites(): Promise<void>;
3784
3860
  flushHistoryWrites(): Promise<void>;
3861
+ reconcilePermissionFlags(): Promise<void>;
3785
3862
  resumePendingCompactions(): Promise<void>;
3786
3863
  resurrectPendingQueues(): Promise<void>;
3787
3864
  }