@hydra-acp/cli 0.1.25 → 0.1.26

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
@@ -200,6 +200,50 @@ declare function loadConfig(): Promise<HydraConfig>;
200
200
  declare function writeConfig(config: HydraConfig): Promise<void>;
201
201
  declare function defaultConfig(): HydraConfig;
202
202
 
203
+ type BinaryInstallProgress = {
204
+ phase: "download_start";
205
+ agentId: string;
206
+ version: string;
207
+ totalBytes: number;
208
+ } | {
209
+ phase: "download_progress";
210
+ agentId: string;
211
+ version: string;
212
+ receivedBytes: number;
213
+ totalBytes: number;
214
+ } | {
215
+ phase: "download_done";
216
+ agentId: string;
217
+ version: string;
218
+ receivedBytes: number;
219
+ totalBytes: number;
220
+ } | {
221
+ phase: "extract";
222
+ agentId: string;
223
+ version: string;
224
+ } | {
225
+ phase: "installed";
226
+ agentId: string;
227
+ version: string;
228
+ };
229
+
230
+ type NpmInstallProgress = {
231
+ phase: "install_start";
232
+ agentId: string;
233
+ version: string;
234
+ packageSpec: string;
235
+ } | {
236
+ phase: "installed";
237
+ agentId: string;
238
+ version: string;
239
+ };
240
+
241
+ type AgentInstallProgress = ({
242
+ source: "binary";
243
+ } & BinaryInstallProgress) | ({
244
+ source: "npm";
245
+ } & NpmInstallProgress);
246
+ type AgentInstallProgressCallback = (event: AgentInstallProgress) => void;
203
247
  declare const RegistryAgent: z.ZodObject<{
204
248
  id: z.ZodString;
205
249
  name: z.ZodString;
@@ -1232,6 +1276,7 @@ interface SpawnPlan {
1232
1276
  }
1233
1277
  declare function planSpawn(agent: RegistryAgent, callerArgs?: string[], options?: {
1234
1278
  npmRegistry?: string;
1279
+ onInstallProgress?: AgentInstallProgressCallback;
1235
1280
  }): Promise<SpawnPlan>;
1236
1281
 
1237
1282
  type JsonRpcId = string | number;
@@ -1689,6 +1734,11 @@ interface AdvertisedMode {
1689
1734
  name?: string;
1690
1735
  description?: string;
1691
1736
  }
1737
+ interface AdvertisedModel {
1738
+ modelId: string;
1739
+ name?: string;
1740
+ description?: string;
1741
+ }
1692
1742
 
1693
1743
  interface HistoryEntry {
1694
1744
  method: string;
@@ -1770,6 +1820,7 @@ interface SessionInit {
1770
1820
  currentUsage?: UsageSnapshot;
1771
1821
  agentCommands?: AdvertisedCommand[];
1772
1822
  agentModes?: AdvertisedMode[];
1823
+ agentModels?: AdvertisedModel[];
1773
1824
  firstPromptSeeded?: boolean;
1774
1825
  createdAt?: number;
1775
1826
  }
@@ -1817,8 +1868,10 @@ declare class Session {
1817
1868
  private agentChangeHandlers;
1818
1869
  private agentAdvertisedCommands;
1819
1870
  private agentAdvertisedModes;
1871
+ private agentAdvertisedModels;
1820
1872
  private agentCommandsHandlers;
1821
1873
  private agentModesHandlers;
1874
+ private agentModelsHandlers;
1822
1875
  private modelHandlers;
1823
1876
  private modeHandlers;
1824
1877
  private usageHandlers;
@@ -1827,6 +1880,7 @@ declare class Session {
1827
1880
  constructor(init: SessionInit);
1828
1881
  private broadcastMergedCommands;
1829
1882
  private broadcastAvailableModes;
1883
+ private broadcastAvailableModels;
1830
1884
  private wireAgent;
1831
1885
  onAgentChange(handler: (info: {
1832
1886
  agentId: string;
@@ -1879,21 +1933,27 @@ declare class Session {
1879
1933
  deleteRecord: boolean;
1880
1934
  }) => void): void;
1881
1935
  onTitleChange(handler: (title: string) => void): void;
1936
+ retitle(title: string): Promise<unknown>;
1937
+ retitleFromAgent(): Promise<unknown>;
1882
1938
  private setTitle;
1883
1939
  private maybeSeedTitleFromPrompt;
1884
1940
  private maybeApplyAgentModel;
1941
+ private maybeApplyAgentConfigOption;
1885
1942
  private maybeApplyAgentMode;
1886
1943
  private maybeApplyAgentUsage;
1887
1944
  private setAgentAdvertisedCommands;
1888
1945
  private setAgentAdvertisedModes;
1946
+ private setAgentAdvertisedModels;
1889
1947
  onAgentCommandsChange(handler: (commands: AdvertisedCommand[]) => void): void;
1890
1948
  onAgentModesChange(handler: (modes: AdvertisedMode[]) => void): void;
1949
+ onAgentModelsChange(handler: (models: AdvertisedModel[]) => void): void;
1891
1950
  onModelChange(handler: (model: string) => void): void;
1892
1951
  onModeChange(handler: (mode: string) => void): void;
1893
1952
  onUsageChange(handler: (usage: UsageSnapshot) => void): void;
1894
1953
  mergedAvailableCommands(): AdvertisedCommand[];
1895
1954
  agentOnlyAdvertisedCommands(): AdvertisedCommand[];
1896
1955
  availableModes(): AdvertisedMode[];
1956
+ availableModels(): AdvertisedModel[];
1897
1957
  private maybeApplyAgentSessionInfo;
1898
1958
  private handleSlashCommand;
1899
1959
  private runTitleCommand;
@@ -1975,6 +2035,19 @@ declare const SessionRecord: z.ZodObject<{
1975
2035
  name?: string | undefined;
1976
2036
  description?: string | undefined;
1977
2037
  }>, "many">>;
2038
+ agentModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
2039
+ modelId: z.ZodString;
2040
+ name: z.ZodOptional<z.ZodString>;
2041
+ description: z.ZodOptional<z.ZodString>;
2042
+ }, "strip", z.ZodTypeAny, {
2043
+ modelId: string;
2044
+ name?: string | undefined;
2045
+ description?: string | undefined;
2046
+ }, {
2047
+ modelId: string;
2048
+ name?: string | undefined;
2049
+ description?: string | undefined;
2050
+ }>, "many">>;
1978
2051
  createdAt: z.ZodString;
1979
2052
  updatedAt: z.ZodString;
1980
2053
  }, "strip", z.ZodTypeAny, {
@@ -2008,6 +2081,11 @@ declare const SessionRecord: z.ZodObject<{
2008
2081
  name?: string | undefined;
2009
2082
  description?: string | undefined;
2010
2083
  }[] | undefined;
2084
+ agentModels?: {
2085
+ modelId: string;
2086
+ name?: string | undefined;
2087
+ description?: string | undefined;
2088
+ }[] | undefined;
2011
2089
  }, {
2012
2090
  version: 1;
2013
2091
  cwd: string;
@@ -2039,6 +2117,11 @@ declare const SessionRecord: z.ZodObject<{
2039
2117
  name?: string | undefined;
2040
2118
  description?: string | undefined;
2041
2119
  }[] | undefined;
2120
+ agentModels?: {
2121
+ modelId: string;
2122
+ name?: string | undefined;
2123
+ description?: string | undefined;
2124
+ }[] | undefined;
2042
2125
  }>;
2043
2126
  type SessionRecord = z.infer<typeof SessionRecord>;
2044
2127
  declare class SessionStore {
@@ -2269,6 +2352,7 @@ interface CreateSessionParams {
2269
2352
  title?: string;
2270
2353
  agentArgs?: string[];
2271
2354
  model?: string;
2355
+ onInstallProgress?: AgentInstallProgressCallback;
2272
2356
  }
2273
2357
  interface ResurrectParams {
2274
2358
  hydraSessionId: string;
@@ -2277,11 +2361,13 @@ interface ResurrectParams {
2277
2361
  cwd: string;
2278
2362
  title?: string;
2279
2363
  agentArgs?: string[];
2364
+ onInstallProgress?: AgentInstallProgressCallback;
2280
2365
  currentModel?: string;
2281
2366
  currentMode?: string;
2282
2367
  currentUsage?: UsageSnapshot;
2283
2368
  agentCommands?: AdvertisedCommand[];
2284
2369
  agentModes?: AdvertisedMode[];
2370
+ agentModels?: AdvertisedModel[];
2285
2371
  createdAt?: string;
2286
2372
  }
2287
2373
  type AgentSpawner = (opts: AgentInstanceOptions) => AgentInstance;
@@ -2341,6 +2427,7 @@ declare class SessionManager {
2341
2427
  private writeImportedRecord;
2342
2428
  deleteRecord(sessionId: string): Promise<boolean>;
2343
2429
  hasRecord(sessionId: string): Promise<boolean>;
2430
+ setTitle(sessionId: string, title: string): Promise<boolean>;
2344
2431
  private persistTitle;
2345
2432
  private persistAgentChange;
2346
2433
  private persistSnapshot;