@hydra-acp/cli 0.1.48 → 0.1.49

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
@@ -9,13 +9,13 @@ declare const ExtensionBody: z.ZodObject<{
9
9
  env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
10
10
  enabled: z.ZodDefault<z.ZodBoolean>;
11
11
  }, "strip", z.ZodTypeAny, {
12
- command: string[];
13
12
  args: string[];
13
+ command: string[];
14
14
  env: Record<string, string>;
15
15
  enabled: boolean;
16
16
  }, {
17
- command?: string[] | undefined;
18
17
  args?: string[] | undefined;
18
+ command?: string[] | undefined;
19
19
  env?: Record<string, string> | undefined;
20
20
  enabled?: boolean | undefined;
21
21
  }>;
@@ -29,13 +29,13 @@ declare const TransformerBody: z.ZodObject<{
29
29
  env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
30
30
  enabled: z.ZodDefault<z.ZodBoolean>;
31
31
  }, "strip", z.ZodTypeAny, {
32
- command: string[];
33
32
  args: string[];
33
+ command: string[];
34
34
  env: Record<string, string>;
35
35
  enabled: boolean;
36
36
  }, {
37
- command?: string[] | undefined;
38
37
  args?: string[] | undefined;
38
+ command?: string[] | undefined;
39
39
  env?: Record<string, string> | undefined;
40
40
  enabled?: boolean | undefined;
41
41
  }>;
@@ -107,13 +107,13 @@ declare const HydraConfig: z.ZodObject<{
107
107
  env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
108
108
  enabled: z.ZodDefault<z.ZodBoolean>;
109
109
  }, "strip", z.ZodTypeAny, {
110
- command: string[];
111
110
  args: string[];
111
+ command: string[];
112
112
  env: Record<string, string>;
113
113
  enabled: boolean;
114
114
  }, {
115
- command?: string[] | undefined;
116
115
  args?: string[] | undefined;
116
+ command?: string[] | undefined;
117
117
  env?: Record<string, string> | undefined;
118
118
  enabled?: boolean | undefined;
119
119
  }>>>;
@@ -123,13 +123,13 @@ declare const HydraConfig: z.ZodObject<{
123
123
  env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
124
124
  enabled: z.ZodDefault<z.ZodBoolean>;
125
125
  }, "strip", z.ZodTypeAny, {
126
- command: string[];
127
126
  args: string[];
127
+ command: string[];
128
128
  env: Record<string, string>;
129
129
  enabled: boolean;
130
130
  }, {
131
- command?: string[] | undefined;
132
131
  args?: string[] | undefined;
132
+ command?: string[] | undefined;
133
133
  env?: Record<string, string> | undefined;
134
134
  enabled?: boolean | undefined;
135
135
  }>>>;
@@ -192,14 +192,14 @@ declare const HydraConfig: z.ZodObject<{
192
192
  publicHost?: string | undefined;
193
193
  };
194
194
  extensions: Record<string, {
195
- command: string[];
196
195
  args: string[];
196
+ command: string[];
197
197
  env: Record<string, string>;
198
198
  enabled: boolean;
199
199
  }>;
200
200
  transformers: Record<string, {
201
- command: string[];
202
201
  args: string[];
202
+ command: string[];
203
203
  env: Record<string, string>;
204
204
  enabled: boolean;
205
205
  }>;
@@ -239,14 +239,14 @@ declare const HydraConfig: z.ZodObject<{
239
239
  publicHost?: string | undefined;
240
240
  } | undefined;
241
241
  extensions?: Record<string, {
242
- command?: string[] | undefined;
243
242
  args?: string[] | undefined;
243
+ command?: string[] | undefined;
244
244
  env?: Record<string, string> | undefined;
245
245
  enabled?: boolean | undefined;
246
246
  }> | undefined;
247
247
  transformers?: Record<string, {
248
- command?: string[] | undefined;
249
248
  args?: string[] | undefined;
249
+ command?: string[] | undefined;
250
250
  env?: Record<string, string> | undefined;
251
251
  enabled?: boolean | undefined;
252
252
  }> | undefined;
@@ -1672,7 +1672,7 @@ declare class JsonRpcConnection {
1672
1672
  onRequest(method: string, handler: RequestHandler): void;
1673
1673
  setDefaultHandler(handler: RequestHandler): void;
1674
1674
  onNotification(method: string, handler: NotificationHandler): void;
1675
- drainBuffered(method: string): void;
1675
+ drainBuffered(method: string): number;
1676
1676
  onClose(handler: (err?: Error) => void): void;
1677
1677
  request<T = unknown>(method: string, params?: unknown): Promise<T>;
1678
1678
  requestWithId<T = unknown>(method: string, params?: unknown): {
@@ -1814,6 +1814,30 @@ interface AdvertisedModel {
1814
1814
  description?: string;
1815
1815
  }
1816
1816
 
1817
+ interface ExtensionCommandSpec {
1818
+ verb: string;
1819
+ argsHint?: string;
1820
+ description?: string;
1821
+ }
1822
+ interface Entry {
1823
+ connection: JsonRpcConnection;
1824
+ commands: ExtensionCommandSpec[];
1825
+ }
1826
+ declare class ExtensionCommandRegistry {
1827
+ private entries;
1828
+ private changeHandlers;
1829
+ register(name: string, connection: JsonRpcConnection, commands: ExtensionCommandSpec[]): void;
1830
+ clear(name: string): void;
1831
+ get(name: string): Entry | undefined;
1832
+ has(name: string): boolean;
1833
+ list(): Array<{
1834
+ name: string;
1835
+ command: ExtensionCommandSpec;
1836
+ }>;
1837
+ onChange(handler: () => void): () => void;
1838
+ private fireChanged;
1839
+ }
1840
+
1817
1841
  interface HistoryEntry {
1818
1842
  method: string;
1819
1843
  params: unknown;
@@ -1911,6 +1935,7 @@ interface SessionInit {
1911
1935
  agentId?: string;
1912
1936
  currentModel?: string;
1913
1937
  }[]>;
1938
+ extensionCommands?: ExtensionCommandRegistry;
1914
1939
  }
1915
1940
  interface CloseOptions {
1916
1941
  deleteRecord?: boolean;
@@ -1959,6 +1984,8 @@ declare class Session {
1959
1984
  private listSessions;
1960
1985
  private logger;
1961
1986
  private transformChain;
1987
+ private extensionCommands;
1988
+ private extensionCommandsUnsub;
1962
1989
  private pendingClaims;
1963
1990
  private agentChangeHandlers;
1964
1991
  private agentAdvertisedCommands;
@@ -2056,6 +2083,7 @@ declare class Session {
2056
2083
  onAgentModelsChange(handler: (models: AdvertisedModel[]) => void): void;
2057
2084
  onModelChange(handler: (model: string) => void): void;
2058
2085
  onModeChange(handler: (mode: string) => void): void;
2086
+ applyModelChange(modelId: string): void;
2059
2087
  applyModeChange(modeId: string): void;
2060
2088
  onUsageChange(handler: (usage: UsageSnapshot) => void): void;
2061
2089
  mergedAvailableCommands(): AdvertisedCommand[];
@@ -2064,6 +2092,8 @@ declare class Session {
2064
2092
  availableModels(): AdvertisedModel[];
2065
2093
  private maybeApplyAgentSessionInfo;
2066
2094
  private handleSlashCommand;
2095
+ private runExtensionCommand;
2096
+ private emitExtensionReply;
2067
2097
  private handleSessionsCommand;
2068
2098
  private handleHelpCommand;
2069
2099
  private handleModelCommand;
@@ -2542,6 +2572,7 @@ interface SessionManagerOptions {
2542
2572
  idleEventTimeoutMs?: number;
2543
2573
  logger?: AgentLogger;
2544
2574
  npmRegistry?: string;
2575
+ extensionCommands?: ExtensionCommandRegistry;
2545
2576
  }
2546
2577
  declare class SessionManager {
2547
2578
  private registry;
@@ -2558,6 +2589,7 @@ declare class SessionManager {
2558
2589
  private metaWriteQueues;
2559
2590
  private logger?;
2560
2591
  private npmRegistry?;
2592
+ private extensionCommands?;
2561
2593
  constructor(registry: Registry, spawner?: AgentSpawner, store?: SessionStore, options?: SessionManagerOptions);
2562
2594
  create(params: CreateSessionParams): Promise<Session>;
2563
2595
  resurrect(params: ResurrectParams): Promise<Session>;