@hasna/machines 0.0.1

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 (58) hide show
  1. package/README.md +71 -0
  2. package/dist/agent/index.d.ts +3 -0
  3. package/dist/agent/index.d.ts.map +1 -0
  4. package/dist/agent/index.js +11776 -0
  5. package/dist/agent/runtime.d.ts +10 -0
  6. package/dist/agent/runtime.d.ts.map +1 -0
  7. package/dist/cli/index.d.ts +3 -0
  8. package/dist/cli/index.d.ts.map +1 -0
  9. package/dist/cli/index.js +17594 -0
  10. package/dist/commands/apps.d.ts +11 -0
  11. package/dist/commands/apps.d.ts.map +1 -0
  12. package/dist/commands/backup.d.ts +7 -0
  13. package/dist/commands/backup.d.ts.map +1 -0
  14. package/dist/commands/cert.d.ts +7 -0
  15. package/dist/commands/cert.d.ts.map +1 -0
  16. package/dist/commands/diff.d.ts +3 -0
  17. package/dist/commands/diff.d.ts.map +1 -0
  18. package/dist/commands/dns.d.ts +14 -0
  19. package/dist/commands/dns.d.ts.map +1 -0
  20. package/dist/commands/install-claude.d.ts +14 -0
  21. package/dist/commands/install-claude.d.ts.map +1 -0
  22. package/dist/commands/install-tailscale.d.ts +7 -0
  23. package/dist/commands/install-tailscale.d.ts.map +1 -0
  24. package/dist/commands/manifest.d.ts +9 -0
  25. package/dist/commands/manifest.d.ts.map +1 -0
  26. package/dist/commands/notifications.d.ts +12 -0
  27. package/dist/commands/notifications.d.ts.map +1 -0
  28. package/dist/commands/ports.d.ts +13 -0
  29. package/dist/commands/ports.d.ts.map +1 -0
  30. package/dist/commands/serve.d.ts +14 -0
  31. package/dist/commands/serve.d.ts.map +1 -0
  32. package/dist/commands/setup.d.ts +7 -0
  33. package/dist/commands/setup.d.ts.map +1 -0
  34. package/dist/commands/ssh.d.ts +8 -0
  35. package/dist/commands/ssh.d.ts.map +1 -0
  36. package/dist/commands/status.d.ts +3 -0
  37. package/dist/commands/status.d.ts.map +1 -0
  38. package/dist/commands/sync.d.ts +7 -0
  39. package/dist/commands/sync.d.ts.map +1 -0
  40. package/dist/db.d.ts +18 -0
  41. package/dist/db.d.ts.map +1 -0
  42. package/dist/index.d.ts +23 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +30553 -0
  45. package/dist/manifests.d.ts +271 -0
  46. package/dist/manifests.d.ts.map +1 -0
  47. package/dist/mcp/index.d.ts +3 -0
  48. package/dist/mcp/index.d.ts.map +1 -0
  49. package/dist/mcp/index.js +15019 -0
  50. package/dist/mcp/server.d.ts +4 -0
  51. package/dist/mcp/server.d.ts.map +1 -0
  52. package/dist/paths.d.ts +7 -0
  53. package/dist/paths.d.ts.map +1 -0
  54. package/dist/types.d.ts +119 -0
  55. package/dist/types.d.ts.map +1 -0
  56. package/dist/version.d.ts +2 -0
  57. package/dist/version.d.ts.map +1 -0
  58. package/package.json +70 -0
@@ -0,0 +1,11 @@
1
+ import type { ManifestAppSpec, SetupResult } from "../types.js";
2
+ export declare function listApps(machineId?: string): {
3
+ machineId: string;
4
+ apps: ManifestAppSpec[];
5
+ };
6
+ export declare function buildAppsPlan(machineId?: string): SetupResult;
7
+ export declare function runAppsInstall(machineId?: string, options?: {
8
+ apply?: boolean;
9
+ yes?: boolean;
10
+ }): SetupResult;
11
+ //# sourceMappingURL=apps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/commands/apps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,eAAe,EAAE,WAAW,EAAa,MAAM,aAAa,CAAC;AA+C5F,wBAAgB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,eAAe,EAAE,CAAA;CAAE,CAM3F;AAED,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAQ7D;AAED,wBAAgB,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,WAAW,CA0BhH"}
@@ -0,0 +1,7 @@
1
+ import type { SetupResult } from "../types.js";
2
+ export declare function buildBackupPlan(bucket: string, prefix?: string): SetupResult;
3
+ export declare function runBackup(bucket: string, prefix?: string, options?: {
4
+ apply?: boolean;
5
+ yes?: boolean;
6
+ }): SetupResult;
7
+ //# sourceMappingURL=backup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backup.d.ts","sourceRoot":"","sources":["../../src/commands/backup.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAa,MAAM,aAAa,CAAC;AAe1D,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,SAAa,GAAG,WAAW,CAwBhF;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,SAAa,EAAE,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,WAAW,CA0B5H"}
@@ -0,0 +1,7 @@
1
+ import type { SetupResult } from "../types.js";
2
+ export declare function buildCertPlan(domains: string[]): SetupResult;
3
+ export declare function runCertPlan(domains: string[], options?: {
4
+ apply?: boolean;
5
+ yes?: boolean;
6
+ }): SetupResult;
7
+ //# sourceMappingURL=cert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cert.d.ts","sourceRoot":"","sources":["../../src/commands/cert.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAa,MAAM,aAAa,CAAC;AAU1D,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,WAAW,CAgD5D;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,WAAW,CA0B5G"}
@@ -0,0 +1,3 @@
1
+ import type { MachineDiff } from "../types.js";
2
+ export declare function diffMachines(leftMachineId: string, rightMachineId?: string): MachineDiff;
3
+ //# sourceMappingURL=diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/commands/diff.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,aAAa,CAAC;AAUhE,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,WAAW,CAoCxF"}
@@ -0,0 +1,14 @@
1
+ export interface DomainMapping {
2
+ domain: string;
3
+ port: number;
4
+ targetHost: string;
5
+ }
6
+ export declare function addDomainMapping(domain: string, port: number, targetHost?: string): DomainMapping[];
7
+ export declare function listDomainMappings(): DomainMapping[];
8
+ export declare function renderDomainMapping(domain: string): {
9
+ hostsEntry: string;
10
+ caddySnippet: string;
11
+ certPath: string;
12
+ keyPath: string;
13
+ };
14
+ //# sourceMappingURL=dns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dns.d.ts","sourceRoot":"","sources":["../../src/commands/dns.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAmBD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,SAAc,GAAG,aAAa,EAAE,CAKxG;AAED,wBAAgB,kBAAkB,IAAI,aAAa,EAAE,CAEpD;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAYnI"}
@@ -0,0 +1,14 @@
1
+ import type { SetupResult } from "../types.js";
2
+ declare const AI_CLI_PACKAGES: {
3
+ readonly claude: "@anthropic-ai/claude-code";
4
+ readonly codex: "@openai/codex";
5
+ readonly gemini: "@google/gemini-cli";
6
+ };
7
+ export type AiCliTool = keyof typeof AI_CLI_PACKAGES;
8
+ export declare function buildClaudeInstallPlan(machineId?: string, tools?: string[]): SetupResult;
9
+ export declare function runClaudeInstall(machineId?: string, tools?: string[], options?: {
10
+ apply?: boolean;
11
+ yes?: boolean;
12
+ }): SetupResult;
13
+ export {};
14
+ //# sourceMappingURL=install-claude.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-claude.d.ts","sourceRoot":"","sources":["../../src/commands/install-claude.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,WAAW,EAAa,MAAM,aAAa,CAAC;AAE3E,QAAA,MAAM,eAAe;;;;CAIX,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,eAAe,CAAC;AAwBrD,wBAAgB,sBAAsB,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,WAAW,CAQxF;AAED,wBAAgB,gBAAgB,CAC9B,SAAS,CAAC,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,MAAM,EAAE,EAChB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/C,WAAW,CA0Bb"}
@@ -0,0 +1,7 @@
1
+ import type { SetupResult } from "../types.js";
2
+ export declare function buildTailscaleInstallPlan(machineId?: string): SetupResult;
3
+ export declare function runTailscaleInstall(machineId?: string, options?: {
4
+ apply?: boolean;
5
+ yes?: boolean;
6
+ }): SetupResult;
7
+ //# sourceMappingURL=install-tailscale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-tailscale.d.ts","sourceRoot":"","sources":["../../src/commands/install-tailscale.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,WAAW,EAAa,MAAM,aAAa,CAAC;AAoC3E,wBAAgB,yBAAyB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAQzE;AAED,wBAAgB,mBAAmB,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,WAAW,CA0BrH"}
@@ -0,0 +1,9 @@
1
+ import type { FleetManifest, MachineManifest } from "../types.js";
2
+ export declare function manifestInit(): string;
3
+ export declare function manifestList(): FleetManifest;
4
+ export declare function manifestAdd(machine: MachineManifest): FleetManifest;
5
+ export declare function manifestBootstrapCurrentMachine(): FleetManifest;
6
+ export declare function manifestGet(machineId: string): MachineManifest | null;
7
+ export declare function manifestRemove(machineId: string): FleetManifest;
8
+ export declare function manifestValidate(): FleetManifest;
9
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/commands/manifest.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAElE,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,YAAY,IAAI,aAAa,CAE5C;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa,CAOnE;AAED,wBAAgB,+BAA+B,IAAI,aAAa,CAE/D;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAErE;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAQ/D;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAEhD"}
@@ -0,0 +1,12 @@
1
+ import type { NotificationChannel, NotificationConfig, NotificationTestResult } from "../types.js";
2
+ export declare function getDefaultNotificationConfig(): NotificationConfig;
3
+ export declare function readNotificationConfig(path?: string): NotificationConfig;
4
+ export declare function writeNotificationConfig(config: NotificationConfig, path?: string): NotificationConfig;
5
+ export declare function listNotificationChannels(): NotificationConfig;
6
+ export declare function addNotificationChannel(channel: NotificationChannel): NotificationConfig;
7
+ export declare function removeNotificationChannel(channelId: string): NotificationConfig;
8
+ export declare function testNotificationChannel(channelId: string, event?: string, message?: string, options?: {
9
+ apply?: boolean;
10
+ yes?: boolean;
11
+ }): NotificationTestResult;
12
+ //# sourceMappingURL=notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/commands/notifications.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAoBnG,wBAAgB,4BAA4B,IAAI,kBAAkB,CAMjE;AAED,wBAAgB,sBAAsB,CAAC,IAAI,SAAyB,GAAG,kBAAkB,CAMxF;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,EAAE,IAAI,SAAyB,GAAG,kBAAkB,CASrH;AAED,wBAAgB,wBAAwB,IAAI,kBAAkB,CAE7D;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB,CAQvF;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,CAM/E;AAcD,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,KAAK,SAAgB,EACrB,OAAO,SAA+B,EACtC,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/C,sBAAsB,CAqCxB"}
@@ -0,0 +1,13 @@
1
+ export interface ListeningPort {
2
+ protocol: string;
3
+ host: string;
4
+ port: number;
5
+ process?: string;
6
+ }
7
+ export interface PortsResult {
8
+ machineId: string;
9
+ listeners: ListeningPort[];
10
+ }
11
+ export declare function parsePortOutput(output: string, format: "ss" | "lsof"): ListeningPort[];
12
+ export declare function listPorts(machineId?: string): PortsResult;
13
+ //# sourceMappingURL=ports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ports.d.ts","sourceRoot":"","sources":["../../src/commands/ports.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,aAAa,EAAE,CAAC;CAC5B;AA+CD,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,aAAa,EAAE,CAEtF;AAED,wBAAgB,SAAS,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAezD"}
@@ -0,0 +1,14 @@
1
+ export interface ServeOptions {
2
+ host?: string;
3
+ port?: number;
4
+ }
5
+ export interface ServeInfo {
6
+ host: string;
7
+ port: number;
8
+ url: string;
9
+ routes: string[];
10
+ }
11
+ export declare function getServeInfo(options?: ServeOptions): ServeInfo;
12
+ export declare function renderDashboardHtml(): string;
13
+ export declare function startDashboardServer(options?: ServeOptions): ReturnType<typeof Bun.serve>;
14
+ //# sourceMappingURL=serve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAWD,wBAAgB,YAAY,CAAC,OAAO,GAAE,YAAiB,GAAG,SAAS,CASlE;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CA+D5C;AAED,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,YAAiB,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,CA0B7F"}
@@ -0,0 +1,7 @@
1
+ import type { SetupResult } from "../types.js";
2
+ export declare function buildSetupPlan(machineId?: string): SetupResult;
3
+ export declare function runSetup(machineId?: string, options?: {
4
+ apply?: boolean;
5
+ yes?: boolean;
6
+ }): SetupResult;
7
+ //# sourceMappingURL=setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAmB,WAAW,EAAa,MAAM,aAAa,CAAC;AAsE3E,wBAAgB,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAqB9D;AAED,wBAAgB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,WAAW,CAoC1G"}
@@ -0,0 +1,8 @@
1
+ export interface ResolvedSshTarget {
2
+ machineId: string;
3
+ target: string;
4
+ route: "lan" | "tailscale" | "local";
5
+ }
6
+ export declare function resolveSshTarget(machineId: string): ResolvedSshTarget;
7
+ export declare function buildSshCommand(machineId: string, remoteCommand?: string): string;
8
+ //# sourceMappingURL=ssh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssh.d.ts","sourceRoot":"","sources":["../../src/commands/ssh.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,GAAG,WAAW,GAAG,OAAO,CAAC;CACtC;AAmBD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,iBAAiB,CAwBrE;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAGjF"}
@@ -0,0 +1,3 @@
1
+ import type { FleetStatus } from "../types.js";
2
+ export declare function getStatus(): FleetStatus;
3
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,wBAAgB,SAAS,IAAI,WAAW,CA8BvC"}
@@ -0,0 +1,7 @@
1
+ import type { SyncResult } from "../types.js";
2
+ export declare function buildSyncPlan(machineId?: string): SyncResult;
3
+ export declare function runSync(machineId?: string, options?: {
4
+ apply?: boolean;
5
+ yes?: boolean;
6
+ }): SyncResult;
7
+ //# sourceMappingURL=sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAA+B,UAAU,EAAE,MAAM,aAAa,CAAC;AAiF3E,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAwB5D;AAwBD,wBAAgB,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,UAAU,CAyCxG"}
package/dist/db.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ import type { Database } from "bun:sqlite";
2
+ import { SqliteAdapter } from "@hasna/cloud";
3
+ export declare function getAdapter(path?: string): SqliteAdapter;
4
+ export declare function getDb(path?: string): Database;
5
+ export declare function upsertHeartbeat(machineId: string, pid?: number, status?: "online" | "offline"): void;
6
+ export declare function getLocalMachineId(): string;
7
+ export interface StoredHeartbeat {
8
+ machine_id: string;
9
+ pid: number;
10
+ status: string;
11
+ updated_at: string;
12
+ }
13
+ export declare function listHeartbeats(machineId?: string): StoredHeartbeat[];
14
+ export declare function countRuns(table: "setup_runs" | "sync_runs"): number;
15
+ export declare function setHeartbeatStatus(machineId: string, pid: number, status: "online" | "offline"): void;
16
+ export declare function recordSetupRun(machineId: string, status: string, details: unknown): void;
17
+ export declare function recordSyncRun(machineId: string, status: string, actions: unknown): void;
18
+ //# sourceMappingURL=db.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAuC7C,wBAAgB,UAAU,CAAC,IAAI,SAAc,GAAG,aAAa,CAc5D;AAED,wBAAgB,KAAK,CAAC,IAAI,SAAc,GAAG,QAAQ,CAElD;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,SAAc,EAAE,MAAM,GAAE,QAAQ,GAAG,SAAoB,GAAG,IAAI,CASnH;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,EAAE,CAoBpE;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,YAAY,GAAG,WAAW,GAAG,MAAM,CAInE;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,IAAI,CAOrG;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAOxF;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAOvF"}
@@ -0,0 +1,23 @@
1
+ export * from "./types.js";
2
+ export * from "./paths.js";
3
+ export * from "./db.js";
4
+ export * from "./manifests.js";
5
+ export * from "./agent/runtime.js";
6
+ export * from "./commands/backup.js";
7
+ export * from "./commands/apps.js";
8
+ export * from "./commands/cert.js";
9
+ export * from "./commands/dns.js";
10
+ export * from "./commands/manifest.js";
11
+ export * from "./commands/diff.js";
12
+ export * from "./commands/install-claude.js";
13
+ export * from "./commands/install-tailscale.js";
14
+ export * from "./commands/notifications.js";
15
+ export * from "./commands/ports.js";
16
+ export * from "./commands/serve.js";
17
+ export * from "./commands/setup.js";
18
+ export * from "./commands/ssh.js";
19
+ export * from "./commands/sync.js";
20
+ export * from "./commands/status.js";
21
+ export * from "./mcp/server.js";
22
+ export * from "./version.js";
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}