@hearsay-tools/squawk 0.19.0-pr4579.9094 → 0.19.0-pr4580.9099

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 (37) hide show
  1. package/dist/contract/hosts.d.ts +5 -47
  2. package/dist/contract/index.js +1 -19
  3. package/dist/features/hosts/cli.d.ts +3 -13
  4. package/dist/features/hosts/cli.js +27 -199
  5. package/dist/features/hosts/cli.js.map +1 -1
  6. package/dist/features/hosts/host-server-cli.js +3 -21
  7. package/dist/features/hosts/host-server-cli.js.map +1 -1
  8. package/dist/features/hosts/host-server.d.ts +1 -10
  9. package/dist/features/hosts/host-server.js +0 -74
  10. package/dist/features/hosts/host-server.js.map +1 -1
  11. package/dist/features/hosts/index.d.ts +2 -4
  12. package/dist/features/hosts/index.js +2 -14
  13. package/dist/features/hosts/index.js.map +1 -1
  14. package/dist/features/hosts/registry.d.ts +0 -19
  15. package/dist/features/hosts/registry.js +1 -33
  16. package/dist/features/hosts/registry.js.map +1 -1
  17. package/dist/features/hosts/routes.d.ts +3 -5
  18. package/dist/features/hosts/routes.js +7 -14
  19. package/dist/features/hosts/routes.js.map +1 -1
  20. package/dist/features/webhooks/routes.d.ts +13 -13
  21. package/dist/server/server.d.ts +58 -58
  22. package/package.json +4 -4
  23. package/dist/features/hosts/bootstrap.d.ts +0 -120
  24. package/dist/features/hosts/bootstrap.js +0 -446
  25. package/dist/features/hosts/bootstrap.js.map +0 -1
  26. package/dist/features/hosts/host-actions.d.ts +0 -56
  27. package/dist/features/hosts/host-actions.js +0 -367
  28. package/dist/features/hosts/host-actions.js.map +0 -1
  29. package/dist/features/hosts/ssh.d.ts +0 -85
  30. package/dist/features/hosts/ssh.js +0 -271
  31. package/dist/features/hosts/ssh.js.map +0 -1
  32. package/dist/features/hosts/supervisor.d.ts +0 -191
  33. package/dist/features/hosts/supervisor.js +0 -620
  34. package/dist/features/hosts/supervisor.js.map +0 -1
  35. package/dist/features/hosts/tunnel.d.ts +0 -46
  36. package/dist/features/hosts/tunnel.js +0 -244
  37. package/dist/features/hosts/tunnel.js.map +0 -1
@@ -5042,19 +5042,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
5042
5042
  } & {
5043
5043
  "/repo/commit/:sha": {
5044
5044
  $get: {
5045
- output: string;
5046
- outputFormat: "text";
5047
- status: import("hono/utils/http-status").ContentfulStatusCode;
5048
- input: {
5049
- query: {
5050
- structured?: string | undefined;
5051
- };
5052
- } & {
5053
- param: {
5054
- sha: string;
5055
- };
5056
- };
5057
- } | {
5058
5045
  output: {
5059
5046
  error: string;
5060
5047
  code?: "invalid_input" | undefined;
@@ -5118,6 +5105,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
5118
5105
  sha: string;
5119
5106
  };
5120
5107
  };
5108
+ } | {
5109
+ output: string;
5110
+ outputFormat: "text";
5111
+ status: import("hono/utils/http-status").ContentfulStatusCode;
5112
+ input: {
5113
+ query: {
5114
+ structured?: string | undefined;
5115
+ };
5116
+ } & {
5117
+ param: {
5118
+ sha: string;
5119
+ };
5120
+ };
5121
5121
  };
5122
5122
  };
5123
5123
  } & {
@@ -17606,20 +17606,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
17606
17606
  } & {
17607
17607
  "/runs/:id/handoff": {
17608
17608
  $get: {
17609
- output: string;
17610
- outputFormat: "text";
17611
- status: 200;
17609
+ output: {
17610
+ error: string;
17611
+ };
17612
+ outputFormat: "json";
17613
+ status: 404;
17612
17614
  input: {
17613
17615
  param: {
17614
17616
  id: string;
17615
17617
  };
17616
17618
  };
17617
17619
  } | {
17618
- output: {
17619
- error: string;
17620
- };
17621
- outputFormat: "json";
17622
- status: 404;
17620
+ output: string;
17621
+ outputFormat: "text";
17622
+ status: 200;
17623
17623
  input: {
17624
17624
  param: {
17625
17625
  id: string;
@@ -17657,20 +17657,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
17657
17657
  } & {
17658
17658
  "/runs/:id/diff": {
17659
17659
  $get: {
17660
- output: string;
17661
- outputFormat: "text";
17662
- status: import("hono/utils/http-status").ContentfulStatusCode;
17660
+ output: {
17661
+ error: string;
17662
+ };
17663
+ outputFormat: "json";
17664
+ status: 404 | 409;
17663
17665
  input: {
17664
17666
  param: {
17665
17667
  id: string;
17666
17668
  };
17667
17669
  };
17668
17670
  } | {
17669
- output: {
17670
- error: string;
17671
- };
17672
- outputFormat: "json";
17673
- status: 404 | 409;
17671
+ output: string;
17672
+ outputFormat: "text";
17673
+ status: import("hono/utils/http-status").ContentfulStatusCode;
17674
17674
  input: {
17675
17675
  param: {
17676
17676
  id: string;
@@ -20484,19 +20484,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
20484
20484
  } & {
20485
20485
  "/repo/commit/:sha": {
20486
20486
  $get: {
20487
- output: string;
20488
- outputFormat: "text";
20489
- status: import("hono/utils/http-status").ContentfulStatusCode;
20490
- input: {
20491
- query: {
20492
- structured?: string | undefined;
20493
- };
20494
- } & {
20495
- param: {
20496
- sha: string;
20497
- };
20498
- };
20499
- } | {
20500
20487
  output: {
20501
20488
  error: string;
20502
20489
  code?: "invalid_input" | undefined;
@@ -20560,6 +20547,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
20560
20547
  sha: string;
20561
20548
  };
20562
20549
  };
20550
+ } | {
20551
+ output: string;
20552
+ outputFormat: "text";
20553
+ status: import("hono/utils/http-status").ContentfulStatusCode;
20554
+ input: {
20555
+ query: {
20556
+ structured?: string | undefined;
20557
+ };
20558
+ } & {
20559
+ param: {
20560
+ sha: string;
20561
+ };
20562
+ };
20563
20563
  };
20564
20564
  };
20565
20565
  } & {
@@ -33048,20 +33048,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
33048
33048
  } & {
33049
33049
  "/runs/:id/handoff": {
33050
33050
  $get: {
33051
- output: string;
33052
- outputFormat: "text";
33053
- status: 200;
33051
+ output: {
33052
+ error: string;
33053
+ };
33054
+ outputFormat: "json";
33055
+ status: 404;
33054
33056
  input: {
33055
33057
  param: {
33056
33058
  id: string;
33057
33059
  };
33058
33060
  };
33059
33061
  } | {
33060
- output: {
33061
- error: string;
33062
- };
33063
- outputFormat: "json";
33064
- status: 404;
33062
+ output: string;
33063
+ outputFormat: "text";
33064
+ status: 200;
33065
33065
  input: {
33066
33066
  param: {
33067
33067
  id: string;
@@ -33099,20 +33099,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
33099
33099
  } & {
33100
33100
  "/runs/:id/diff": {
33101
33101
  $get: {
33102
- output: string;
33103
- outputFormat: "text";
33104
- status: import("hono/utils/http-status").ContentfulStatusCode;
33102
+ output: {
33103
+ error: string;
33104
+ };
33105
+ outputFormat: "json";
33106
+ status: 404 | 409;
33105
33107
  input: {
33106
33108
  param: {
33107
33109
  id: string;
33108
33110
  };
33109
33111
  };
33110
33112
  } | {
33111
- output: {
33112
- error: string;
33113
- };
33114
- outputFormat: "json";
33115
- status: 404 | 409;
33113
+ output: string;
33114
+ outputFormat: "text";
33115
+ status: import("hono/utils/http-status").ContentfulStatusCode;
33116
33116
  input: {
33117
33117
  param: {
33118
33118
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hearsay-tools/squawk",
3
- "version": "0.19.0-pr4579.9094",
3
+ "version": "0.19.0-pr4580.9099",
4
4
  "description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -69,8 +69,8 @@
69
69
  "devDependencies": {
70
70
  "@babel/parser": "^8.0.8",
71
71
  "@babel/types": "^8.0.8",
72
- "@open-mercato/cezar-api-client": "0.19.0-pr4579.9094",
73
- "@open-mercato/cezar-contract": "0.19.0-pr4579.9094",
72
+ "@open-mercato/cezar-api-client": "0.19.0-pr4580.9099",
73
+ "@open-mercato/cezar-contract": "0.19.0-pr4580.9099",
74
74
  "@types/node": "^24.19.1",
75
75
  "@types/ws": "^8.18.1",
76
76
  "esbuild": "^0.28.1",
@@ -87,5 +87,5 @@
87
87
  "publishConfig": {
88
88
  "access": "public"
89
89
  },
90
- "gitHead": "f1a9e5e7df8750442454b4dffcee05bb787ab864"
90
+ "gitHead": "dea1b01a2da442e851499b15f150352cc9777622"
91
91
  }
@@ -1,120 +0,0 @@
1
- import type { Writable } from 'node:stream';
2
- import { z } from 'zod';
3
- import { type HostEntry, type HostServerStatusResult, type HostState } from '../../contract/index.js';
4
- import type { Home } from '../../home/home.ts';
5
- import { type SshTransportDeps } from './ssh.ts';
6
- import { type HostTunnel, type TunnelDeps } from './tunnel.ts';
7
- declare const remoteProbeOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8
- ok: z.ZodLiteral<false>;
9
- code: z.ZodLiteral<"missing-node">;
10
- }, z.core.$strip>, z.ZodObject<{
11
- ok: z.ZodLiteral<true>;
12
- nodePath: z.ZodString;
13
- nodeVersion: z.ZodString;
14
- platform: z.ZodString;
15
- dataDir: z.ZodString;
16
- configDir: z.ZodString;
17
- runtimeDir: z.ZodString;
18
- runtimeEntry: z.ZodString;
19
- runtimeInstalled: z.ZodBoolean;
20
- installId: z.ZodNullable<z.ZodString>;
21
- }, z.core.$strip>], "ok">;
22
- export type RemoteHostProbe = Extract<z.infer<typeof remoteProbeOutputSchema>, {
23
- ok: true;
24
- }>;
25
- export interface BootstrapStepRecord {
26
- readonly step: 'probe' | 'install' | 'ensure' | 'tunnel' | 'verify';
27
- readonly status: 'ok' | 'skipped' | 'failed';
28
- readonly detail: string;
29
- }
30
- export interface HostBootstrapDeps extends TunnelDeps {
31
- packageRoot?: string | undefined;
32
- mainVersion?: string | undefined;
33
- requiredNode?: string | undefined;
34
- streamArchive?: ((destination: Writable, packageRoot: string) => Promise<void>) | undefined;
35
- probeTimeoutMs?: number | undefined;
36
- installTimeoutMs?: number | undefined;
37
- ensureTimeoutMs?: number | undefined;
38
- statusTimeoutMs?: number | undefined;
39
- controlTimeoutMs?: number | undefined;
40
- tunnelTimeoutMs?: number | undefined;
41
- }
42
- export interface BootstrapHostResult {
43
- readonly state: HostState;
44
- readonly reason?: string | undefined;
45
- readonly steps: BootstrapStepRecord[];
46
- readonly tunnel?: HostTunnel | undefined;
47
- readonly remotePort?: number | undefined;
48
- readonly remotePid?: number | undefined;
49
- readonly ownership?: 'managed' | 'unmanaged' | undefined;
50
- readonly managedByStarter?: boolean | undefined;
51
- readonly remoteVersion?: string | undefined;
52
- readonly remoteInstallId?: string | undefined;
53
- readonly probe?: RemoteHostProbe | undefined;
54
- }
55
- /** Package version and `engines.node` requirement of the running main Squawk server. */
56
- export declare function readOwnPackageMeta(packageRoot?: string): {
57
- version: string;
58
- requiredNode: string;
59
- };
60
- /** True when `actualVersion` satisfies a minimum Node requirement such as `>=24.21.0`. */
61
- export declare function satisfiesMinNodeVersion(actualVersion: string, requiredRange: string): boolean;
62
- /**
63
- * Operator-facing reason for `identity-changed`: names the exact confirmation sequence
64
- * (`hsq host remove <id>` followed by `hsq host add <sshAlias>`).
65
- */
66
- export declare function formatIdentityChangedReason(entry: Pick<HostEntry, 'id' | 'sshAlias'>, expectedInstallId: string, actualInstallId: string | null | undefined): string;
67
- export declare function readMainInstallId(home: Home): string;
68
- export declare function resolveMeta(deps: HostBootstrapDeps): {
69
- packageRoot: string;
70
- mainVersion: string;
71
- requiredNode: string;
72
- };
73
- export declare function buildHostServerCliCommand(nodePath: string, runtimeEntry: string, args: readonly string[]): string;
74
- /**
75
- * Parse a remote command's JSON object stdout robustly: tolerate shell rc banners or extra lines
76
- * before the JSON by checking the whole trimmed stdout first, then scanning from the last
77
- * non-empty line upward for the last JSON object line, and validating it with `schema`.
78
- */
79
- export declare function parseJsonStdout<T>(stdout: string, schema: z.ZodType<T>, label: string): {
80
- ok: true;
81
- data: T;
82
- } | {
83
- ok: false;
84
- reason: string;
85
- };
86
- /** Step 1: probe Node.js version, remote Squawk home paths, runtime presence, and install id. */
87
- export declare function probeRemoteHost(sshAlias: string, deps?: HostBootstrapDeps, signal?: AbortSignal): Promise<{
88
- ok: true;
89
- probe: RemoteHostProbe;
90
- } | {
91
- ok: false;
92
- state: 'unreachable' | 'needs-node';
93
- reason: string;
94
- }>;
95
- /** Step 2: stream the runtime `.tar.gz` archive to a staged temp folder and activate it atomically. */
96
- export declare function installRemoteRuntime(sshAlias: string, probe: RemoteHostProbe, deps?: HostBootstrapDeps, signal?: AbortSignal): Promise<{
97
- ok: true;
98
- runtimeDir: string;
99
- alreadyInstalled: boolean;
100
- } | {
101
- ok: false;
102
- reason: string;
103
- }>;
104
- /** Run `hsq host-server status --starter-id <id> --json` on the remote machine over SSH. */
105
- export declare function checkRemoteHostStatus(sshAlias: string, runtime: Pick<RemoteHostProbe, 'nodePath' | 'runtimeEntry'>, mainInstallId: string, port: number | undefined, deps?: Pick<HostBootstrapDeps, keyof SshTransportDeps | 'statusTimeoutMs'>, signal?: AbortSignal): Promise<{
106
- ok: true;
107
- status: HostServerStatusResult;
108
- } | {
109
- ok: false;
110
- reason: string;
111
- }>;
112
- /**
113
- * Execute the full 5-step bootstrap (Probe -> Install -> Adopt/Start -> Tunnel -> Verify) for
114
- * host `hostId`. On `connected`, returns an open `tunnel` whose lifecycle the caller owns.
115
- */
116
- export declare function bootstrapHost(home: Home, hostId: string, deps?: HostBootstrapDeps, options?: {
117
- signal?: AbortSignal | undefined;
118
- preProbed?: RemoteHostProbe | undefined;
119
- }): Promise<BootstrapHostResult>;
120
- export {};