sublera-cli 0.0.0-stage → 1.3.0

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +172 -0
  2. package/LICENSE +21 -0
  3. package/README.md +585 -2
  4. package/SECURITY.md +78 -0
  5. package/THIRD_PARTY_NOTICES.md +37 -0
  6. package/dist/agent.d.ts +270 -0
  7. package/dist/agent.js +1867 -0
  8. package/dist/commands.d.ts +76 -0
  9. package/dist/commands.js +841 -0
  10. package/dist/config.d.ts +27 -0
  11. package/dist/config.js +95 -0
  12. package/dist/engine/binaryManager.d.ts +67 -0
  13. package/dist/engine/binaryManager.js +590 -0
  14. package/dist/engine/gguf.d.ts +88 -0
  15. package/dist/engine/gguf.js +458 -0
  16. package/dist/engine/llamaRunner.d.ts +78 -0
  17. package/dist/engine/llamaRunner.js +282 -0
  18. package/dist/engine/modelManager.d.ts +63 -0
  19. package/dist/engine/modelManager.js +510 -0
  20. package/dist/engine/selfCheck.d.ts +34 -0
  21. package/dist/engine/selfCheck.js +108 -0
  22. package/dist/exitCodes.d.ts +20 -0
  23. package/dist/exitCodes.js +20 -0
  24. package/dist/hardware/gpuMonitor.d.ts +32 -0
  25. package/dist/hardware/gpuMonitor.js +378 -0
  26. package/dist/hardware/sleepGuard.d.ts +42 -0
  27. package/dist/hardware/sleepGuard.js +149 -0
  28. package/dist/hardware/types.d.ts +40 -0
  29. package/dist/hardware/types.js +2 -0
  30. package/dist/health.d.ts +17 -0
  31. package/dist/health.js +38 -0
  32. package/dist/index.d.ts +11 -0
  33. package/dist/index.js +268 -0
  34. package/dist/logger.d.ts +53 -0
  35. package/dist/logger.js +201 -0
  36. package/dist/network/proxy.d.ts +58 -0
  37. package/dist/network/proxy.js +328 -0
  38. package/dist/network/streamProxy.d.ts +51 -0
  39. package/dist/network/streamProxy.js +286 -0
  40. package/dist/network/tunnelClient.d.ts +54 -0
  41. package/dist/network/tunnelClient.js +257 -0
  42. package/dist/settings.d.ts +53 -0
  43. package/dist/settings.js +171 -0
  44. package/dist/state.d.ts +52 -0
  45. package/dist/state.js +71 -0
  46. package/dist/storageCommand.d.ts +22 -0
  47. package/dist/storageCommand.js +81 -0
  48. package/dist/types.d.ts +222 -0
  49. package/dist/types.js +43 -0
  50. package/dist/ui/progress.d.ts +29 -0
  51. package/dist/ui/progress.js +82 -0
  52. package/dist/ui/terminalDashboard.d.ts +88 -0
  53. package/dist/ui/terminalDashboard.js +295 -0
  54. package/dist/util/env.d.ts +3 -0
  55. package/dist/util/env.js +6 -0
  56. package/dist/util/exec.d.ts +23 -0
  57. package/dist/util/exec.js +116 -0
  58. package/dist/util/format.d.ts +47 -0
  59. package/dist/util/format.js +125 -0
  60. package/dist/util/fs.d.ts +18 -0
  61. package/dist/util/fs.js +140 -0
  62. package/dist/util/http.d.ts +28 -0
  63. package/dist/util/http.js +128 -0
  64. package/dist/util/instanceLock.d.ts +3 -0
  65. package/dist/util/instanceLock.js +108 -0
  66. package/dist/util/open.d.ts +16 -0
  67. package/dist/util/open.js +65 -0
  68. package/dist/util/storage.d.ts +10 -0
  69. package/dist/util/storage.js +69 -0
  70. package/dist/version.d.ts +15 -0
  71. package/dist/version.js +29 -0
  72. package/package.json +68 -4
@@ -0,0 +1,76 @@
1
+ import { type AgentConfig } from './config.js';
2
+ import type { Logger } from './logger.js';
3
+ import { type AgentMe } from './types.js';
4
+ import { type ResolvedSettings } from './settings.js';
5
+ export type GlobalFlags = {
6
+ server?: string;
7
+ token?: string;
8
+ wsPath?: string;
9
+ json: boolean;
10
+ verbose: boolean;
11
+ color: boolean;
12
+ simulation: boolean;
13
+ fix: boolean;
14
+ force: boolean;
15
+ once: boolean;
16
+ noInstall: boolean;
17
+ help: boolean;
18
+ version: boolean;
19
+ model?: string;
20
+ context?: number;
21
+ slots?: number;
22
+ price?: number;
23
+ priceIn?: number;
24
+ priceOut?: number;
25
+ priceHour?: number;
26
+ gpu?: string;
27
+ vram?: number;
28
+ tokPerSec?: number;
29
+ claim?: string;
30
+ watch: boolean;
31
+ timeoutMs?: number;
32
+ requireChecksum: boolean;
33
+ noBrowser: boolean;
34
+ nonInteractive?: boolean;
35
+ drainTimeoutMs?: number;
36
+ logLevel?: string;
37
+ logFile?: string;
38
+ positionals: string[];
39
+ };
40
+ export declare function verifyHostKey(server: string, token: string): Promise<AgentMe | null>;
41
+ export type DeviceLoginCode = {
42
+ deviceCode: string;
43
+ userCode: string;
44
+ verificationUrl: string;
45
+ verificationUrlComplete?: string;
46
+ expiresAt: number;
47
+ intervalMs?: number;
48
+ };
49
+ /**
50
+ * Links this computer to a web account: the server gives a short code, the person approves it on the
51
+ * website, and the CLI receives its own host key. Returns null when the server has no device login.
52
+ */
53
+ export declare function deviceLogin(server: string, options: {
54
+ name: string;
55
+ onCode: (code: DeviceLoginCode) => void;
56
+ }): Promise<{
57
+ token: string;
58
+ username: string;
59
+ } | null>;
60
+ /** start, host, and jobs connect this computer first when it has no host key, so a new host needs one command. */
61
+ export declare function readyConfig(flags: GlobalFlags, logger: Logger): Promise<AgentConfig>;
62
+ export declare function cmdLogin(flags: GlobalFlags, logger: Logger): Promise<number>;
63
+ export declare function cmdDoctor(flags: GlobalFlags, logger: Logger): Promise<number>;
64
+ export declare function cmdStart(flags: GlobalFlags, logger: Logger): Promise<number>;
65
+ export declare function cmdHost(flags: GlobalFlags, logger: Logger): Promise<number>;
66
+ export declare function cmdJobs(flags: GlobalFlags, logger: Logger): Promise<number>;
67
+ export declare function cmdStatus(flags: GlobalFlags, logger: Logger): Promise<number>;
68
+ /** One `booking` line per live request: id, status, reserved speed, time left. */
69
+ export declare function statusBookingLines(me: Pick<AgentMe, 'activeRequest' | 'activeRequests'>, now?: number): string;
70
+ /**
71
+ * `sublera config` (or `config show`): the settings this agent will actually use and where each one came from.
72
+ * `config path` prints the agent.json path. Secrets are always masked.
73
+ */
74
+ export declare function cmdConfig(flags: GlobalFlags, _logger: Logger, resolved: ResolvedSettings): Promise<number>;
75
+ export declare function cmdLogout(flags: GlobalFlags, logger: Logger): Promise<number>;
76
+ export declare function globalHelp(): string;