@hearsay-tools/squawk 0.18.0-pr3663.6631 → 0.18.0-pr3666.6633
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/ci-wait/tools.d.ts +4 -4
- package/dist/delegation/routes.d.ts +62 -62
- package/dist/serve-boot.d.ts +2 -1
- package/dist/serve-command.js +15 -25
- package/dist/serve-command.js.map +1 -1
- package/dist/server/activity-routes.d.ts +23 -23
- package/package.json +4 -4
- package/dist/serve-stop.d.ts +0 -41
- package/dist/serve-stop.js +0 -42
- package/dist/serve-stop.js.map +0 -1
package/dist/ci-wait/tools.d.ts
CHANGED
|
@@ -248,10 +248,6 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
248
248
|
}[];
|
|
249
249
|
isError: boolean;
|
|
250
250
|
details: {
|
|
251
|
-
ok: false;
|
|
252
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
253
|
-
message: string;
|
|
254
|
-
} | {
|
|
255
251
|
ok: true;
|
|
256
252
|
task: {
|
|
257
253
|
id: string;
|
|
@@ -263,6 +259,10 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
263
259
|
url?: string | undefined;
|
|
264
260
|
};
|
|
265
261
|
note: string;
|
|
262
|
+
} | {
|
|
263
|
+
ok: false;
|
|
264
|
+
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
265
|
+
message: string;
|
|
266
266
|
};
|
|
267
267
|
}>;
|
|
268
268
|
export declare function invokeScheduledTasksTool(input: unknown): Promise<{
|
|
@@ -27,6 +27,18 @@ export declare function delegationFailure(error: unknown): {
|
|
|
27
27
|
export declare function createDelegationRoutes(service: DelegationService, credentials: CredentialRegistry): import("hono/hono-base").HonoBase<Env, {
|
|
28
28
|
"/list": {
|
|
29
29
|
$get: {
|
|
30
|
+
output: {
|
|
31
|
+
error: string;
|
|
32
|
+
code?: "invalid_input" | undefined;
|
|
33
|
+
};
|
|
34
|
+
outputFormat: "json";
|
|
35
|
+
status: 400;
|
|
36
|
+
input: {
|
|
37
|
+
query: {
|
|
38
|
+
offset?: string | undefined;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
} | {
|
|
30
42
|
output: {
|
|
31
43
|
workers: {
|
|
32
44
|
workerId: string;
|
|
@@ -64,18 +76,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
64
76
|
offset?: string | undefined;
|
|
65
77
|
};
|
|
66
78
|
};
|
|
67
|
-
} | {
|
|
68
|
-
output: {
|
|
69
|
-
error: string;
|
|
70
|
-
code?: "invalid_input" | undefined;
|
|
71
|
-
};
|
|
72
|
-
outputFormat: "json";
|
|
73
|
-
status: 400;
|
|
74
|
-
input: {
|
|
75
|
-
query: {
|
|
76
|
-
offset?: string | undefined;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
} & {
|
|
@@ -613,6 +613,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
613
613
|
} & {
|
|
614
614
|
"/:workerId": {
|
|
615
615
|
$get: {
|
|
616
|
+
output: {
|
|
617
|
+
error: string;
|
|
618
|
+
code?: "invalid_input" | undefined;
|
|
619
|
+
};
|
|
620
|
+
outputFormat: "json";
|
|
621
|
+
status: 400;
|
|
622
|
+
input: {
|
|
623
|
+
param: {
|
|
624
|
+
workerId: string;
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
} | {
|
|
616
628
|
output: {
|
|
617
629
|
workerId: string;
|
|
618
630
|
parentRunId: string;
|
|
@@ -716,7 +728,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
716
728
|
workerId: string;
|
|
717
729
|
};
|
|
718
730
|
};
|
|
719
|
-
}
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
} & {
|
|
734
|
+
"/:workerId/collect": {
|
|
735
|
+
$post: {
|
|
720
736
|
output: {
|
|
721
737
|
error: string;
|
|
722
738
|
code?: "invalid_input" | undefined;
|
|
@@ -727,12 +743,10 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
727
743
|
param: {
|
|
728
744
|
workerId: string;
|
|
729
745
|
};
|
|
746
|
+
} & {
|
|
747
|
+
json: Record<string, never>;
|
|
730
748
|
};
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
} & {
|
|
734
|
-
"/:workerId/collect": {
|
|
735
|
-
$post: {
|
|
749
|
+
} | {
|
|
736
750
|
output: {
|
|
737
751
|
workerId: string;
|
|
738
752
|
parentRunId: string;
|
|
@@ -834,7 +848,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
834
848
|
} & {
|
|
835
849
|
json: Record<string, never>;
|
|
836
850
|
};
|
|
837
|
-
}
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
} & {
|
|
854
|
+
"/:workerId/steer": {
|
|
855
|
+
$post: {
|
|
838
856
|
output: {
|
|
839
857
|
error: string;
|
|
840
858
|
code?: "invalid_input" | undefined;
|
|
@@ -846,13 +864,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
846
864
|
workerId: string;
|
|
847
865
|
};
|
|
848
866
|
} & {
|
|
849
|
-
json:
|
|
867
|
+
json: {
|
|
868
|
+
text: string;
|
|
869
|
+
};
|
|
850
870
|
};
|
|
851
|
-
}
|
|
852
|
-
};
|
|
853
|
-
} & {
|
|
854
|
-
"/:workerId/steer": {
|
|
855
|
-
$post: {
|
|
871
|
+
} | {
|
|
856
872
|
output: {
|
|
857
873
|
workerId: string;
|
|
858
874
|
state: "delivered" | "queued";
|
|
@@ -868,7 +884,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
868
884
|
text: string;
|
|
869
885
|
};
|
|
870
886
|
};
|
|
871
|
-
}
|
|
887
|
+
};
|
|
888
|
+
};
|
|
889
|
+
} & {
|
|
890
|
+
"/:workerId/stop": {
|
|
891
|
+
$post: {
|
|
872
892
|
output: {
|
|
873
893
|
error: string;
|
|
874
894
|
code?: "invalid_input" | undefined;
|
|
@@ -880,15 +900,9 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
880
900
|
workerId: string;
|
|
881
901
|
};
|
|
882
902
|
} & {
|
|
883
|
-
json:
|
|
884
|
-
text: string;
|
|
885
|
-
};
|
|
903
|
+
json: Record<string, never>;
|
|
886
904
|
};
|
|
887
|
-
}
|
|
888
|
-
};
|
|
889
|
-
} & {
|
|
890
|
-
"/:workerId/stop": {
|
|
891
|
-
$post: {
|
|
905
|
+
} | {
|
|
892
906
|
output: {
|
|
893
907
|
workerId: string;
|
|
894
908
|
state: "stopping" | "terminated";
|
|
@@ -902,7 +916,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
902
916
|
} & {
|
|
903
917
|
json: Record<string, never>;
|
|
904
918
|
};
|
|
905
|
-
}
|
|
919
|
+
};
|
|
920
|
+
};
|
|
921
|
+
} & {
|
|
922
|
+
"/:workerId/destroy": {
|
|
923
|
+
$post: {
|
|
906
924
|
output: {
|
|
907
925
|
error: string;
|
|
908
926
|
code?: "invalid_input" | undefined;
|
|
@@ -916,11 +934,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
916
934
|
} & {
|
|
917
935
|
json: Record<string, never>;
|
|
918
936
|
};
|
|
919
|
-
}
|
|
920
|
-
};
|
|
921
|
-
} & {
|
|
922
|
-
"/:workerId/destroy": {
|
|
923
|
-
$post: {
|
|
937
|
+
} | {
|
|
924
938
|
output: {
|
|
925
939
|
workerId: string;
|
|
926
940
|
state: "complete" | "incomplete";
|
|
@@ -943,20 +957,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
943
957
|
} & {
|
|
944
958
|
json: Record<string, never>;
|
|
945
959
|
};
|
|
946
|
-
} | {
|
|
947
|
-
output: {
|
|
948
|
-
error: string;
|
|
949
|
-
code?: "invalid_input" | undefined;
|
|
950
|
-
};
|
|
951
|
-
outputFormat: "json";
|
|
952
|
-
status: 400;
|
|
953
|
-
input: {
|
|
954
|
-
param: {
|
|
955
|
-
workerId: string;
|
|
956
|
-
};
|
|
957
|
-
} & {
|
|
958
|
-
json: Record<string, never>;
|
|
959
|
-
};
|
|
960
960
|
} | {
|
|
961
961
|
output: {
|
|
962
962
|
workerId: string;
|
|
@@ -986,13 +986,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
986
986
|
"/:workerId/diff": {
|
|
987
987
|
$get: {
|
|
988
988
|
output: {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
diff: string;
|
|
992
|
-
truncated: boolean;
|
|
989
|
+
error: string;
|
|
990
|
+
code?: "invalid_input" | undefined;
|
|
993
991
|
};
|
|
994
992
|
outputFormat: "json";
|
|
995
|
-
status:
|
|
993
|
+
status: 400;
|
|
996
994
|
input: {
|
|
997
995
|
param: {
|
|
998
996
|
workerId: string;
|
|
@@ -1000,11 +998,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1000
998
|
};
|
|
1001
999
|
} | {
|
|
1002
1000
|
output: {
|
|
1003
|
-
|
|
1004
|
-
|
|
1001
|
+
workerId: string;
|
|
1002
|
+
baselineSha: string;
|
|
1003
|
+
diff: string;
|
|
1004
|
+
truncated: boolean;
|
|
1005
1005
|
};
|
|
1006
1006
|
outputFormat: "json";
|
|
1007
|
-
status:
|
|
1007
|
+
status: 200;
|
|
1008
1008
|
input: {
|
|
1009
1009
|
param: {
|
|
1010
1010
|
workerId: string;
|
package/dist/serve-boot.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare function reconcileServeWorktrees(repoRoot: string, repo: Awaited<
|
|
|
20
20
|
} | undefined, home: Home): Promise<void>;
|
|
21
21
|
export declare function recoverServeProject(store: RunStore, manager: RunManager, providerRuntimeAuth: ProviderRuntimeAuthObserver, delegation: DelegationController, bootProjectId?: string, recover?: typeof recoverWithProviderRuntimeAuthObservation): Promise<void>;
|
|
22
22
|
export declare function warnServeBind(bindHost: string | undefined, port: number): void;
|
|
23
|
-
|
|
23
|
+
type StoppableServer = Pick<ReturnType<typeof startServer>, 'shutdownForRestart'>;
|
|
24
24
|
/** How long a stop waits for the server's own shutdown. A socket the listener still holds, or a
|
|
25
25
|
* step that hangs, must not keep this process, its store or its agents alive. */
|
|
26
26
|
export declare const STOP_SERVE_BOUND_MS = 5000;
|
|
@@ -39,3 +39,4 @@ export interface StopServeOptions {
|
|
|
39
39
|
*/
|
|
40
40
|
export declare function stopServe(server: StoppableServer, signal?: NodeJS.Signals, opts?: StopServeOptions): Promise<void>;
|
|
41
41
|
export declare function printServeBanner(version: string, repoRoot: string, repo: Awaited<ReturnType<typeof getRepoInfo>>, checks: Awaited<ReturnType<typeof detectEnvironment>>, url: string): void;
|
|
42
|
+
export {};
|
package/dist/serve-command.js
CHANGED
|
@@ -27,7 +27,6 @@ import { CockpitOwnership } from './server/cockpit-ownership.js';
|
|
|
27
27
|
import { recoverProjectMigration } from './project-migration/recovery.js';
|
|
28
28
|
import { moveProjectWhenIdle } from './project-migration/auto.js';
|
|
29
29
|
import { acquireServeListener, onTerminal, ignoreHangupOffTerminal, waitForHealth } from './serve-listener.js';
|
|
30
|
-
import { installServeStop } from './serve-stop.js';
|
|
31
30
|
/** The new scoped package has no binary named after it, so npx needs its `hsq` binary named. */
|
|
32
31
|
function restartCommand(pkgName) {
|
|
33
32
|
const identity = npmPackageIdentity(pkgName);
|
|
@@ -43,20 +42,6 @@ export const defaultServeDeps = {
|
|
|
43
42
|
export async function serveCommand(home, repoRoot, preferredPort, openBrowser, bindHost, deps) {
|
|
44
43
|
const ownership = new deps.CockpitOwnership();
|
|
45
44
|
deps.process.once('exit', () => ownership.releaseAll());
|
|
46
|
-
const stop = installServeStop(deps);
|
|
47
|
-
try {
|
|
48
|
-
await bootServe(home, repoRoot, preferredPort, openBrowser, bindHost, deps, ownership, stop);
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
51
|
-
// A stop closes the store under a boot step; that step's failure is not the boot's.
|
|
52
|
-
if (!stop.stopping)
|
|
53
|
-
throw error;
|
|
54
|
-
}
|
|
55
|
-
// The stop ends the process; returning earlier would let the CLI exit before the agents hear it.
|
|
56
|
-
await stop.stopped;
|
|
57
|
-
}
|
|
58
|
-
async function bootServe(home, repoRoot, preferredPort, openBrowser, bindHost, deps, ownership, stop) {
|
|
59
|
-
const { parts } = stop;
|
|
60
45
|
// An unfinished project migration finishes before anything reads the project; the claim it
|
|
61
46
|
// takes is the one boot keeps. A failure ends the boot with why.
|
|
62
47
|
await deps.recoverProjectMigration(repoRoot, { ownership, keep: true });
|
|
@@ -66,7 +51,6 @@ async function bootServe(home, repoRoot, preferredPort, openBrowser, bindHost, d
|
|
|
66
51
|
// Hold the real listener before workspace writes, recovery or background resources.
|
|
67
52
|
// A probe followed by a later bind would allow another cwd to win in between.
|
|
68
53
|
const listener = await deps.acquireServeListener(preferredPort, bindHost);
|
|
69
|
-
parts.listener = listener;
|
|
70
54
|
const bootProjectId = await deps.initWorkspace(repoRoot, home);
|
|
71
55
|
// ONE workspace semaphore for the whole process (spec 2026-07-20, step 2.5):
|
|
72
56
|
// the boot manager and every lazily-built project context count their runs
|
|
@@ -77,7 +61,6 @@ async function bootServe(home, repoRoot, preferredPort, openBrowser, bindHost, d
|
|
|
77
61
|
// keepLive + recover() (#367): runs that were queued/running/waiting when
|
|
78
62
|
// the previous process exited are re-queued or resumed instead of failed.
|
|
79
63
|
const store = deps.openBootStore(repoRoot);
|
|
80
|
-
parts.store = store;
|
|
81
64
|
// Before recovery (#589): the runs recovery re-queues, resumes or fails are exactly the
|
|
82
65
|
// transitions an opted-in bot is waiting for. Deliveries wait until startServer knows its port.
|
|
83
66
|
const taskWebhooks = new deps.TaskWebhooks({ home });
|
|
@@ -85,7 +68,6 @@ async function bootServe(home, repoRoot, preferredPort, openBrowser, bindHost, d
|
|
|
85
68
|
// ONE preview host for the whole process (#781), like the semaphore: ports are host-global, so
|
|
86
69
|
// `port_held` must see every project's servers. Off unless `CEZ_PREVIEW=1`.
|
|
87
70
|
const previewHost = deps.previewToolEnabled() ? new deps.PreviewHost({ home }) : undefined;
|
|
88
|
-
parts.previewHost = previewHost;
|
|
89
71
|
// The port the cockpit bound, once `startServer` listens; the preview tool refuses it.
|
|
90
72
|
let boundPort;
|
|
91
73
|
const squawkPort = () => boundPort;
|
|
@@ -103,7 +85,6 @@ async function bootServe(home, repoRoot, preferredPort, openBrowser, bindHost, d
|
|
|
103
85
|
sweepBranches: (keep) => void deps.sweepMergedBranches({ root: repoRoot, store, manager, home }, { keep, minIntervalMs: SWEEP_MIN_INTERVAL_MS }),
|
|
104
86
|
});
|
|
105
87
|
const delegation = await deps.DelegationController.start(deps.workerCleanup);
|
|
106
|
-
parts.delegation = delegation;
|
|
107
88
|
delegation.attachProject({ id: bootProjectId ?? 'default', root: repoRoot, store, manager, home });
|
|
108
89
|
const providerAuth = new deps.ProviderAuthService();
|
|
109
90
|
const discovery = deps.createHostDiscovery(repoRoot, providerAuth, home);
|
|
@@ -116,12 +97,7 @@ async function bootServe(home, repoRoot, preferredPort, openBrowser, bindHost, d
|
|
|
116
97
|
const checks = await deps.detectEnvironment();
|
|
117
98
|
const repo = await deps.getRepoInfo(repoRoot);
|
|
118
99
|
await deps.reconcileServeWorktrees(repoRoot, repo, store, manager, previewHost, undefined, home);
|
|
119
|
-
// A stopping boot starts no agent and serves nothing: the stop closes what boot built so far.
|
|
120
|
-
if (stop.stopping)
|
|
121
|
-
return;
|
|
122
100
|
await deps.recoverServeProject(store, manager, providerRuntimeAuth, delegation, bootProjectId);
|
|
123
|
-
if (stop.stopping)
|
|
124
|
-
return;
|
|
125
101
|
// Update discovery (#368) — fire-and-forget; the banner prints whenever the
|
|
126
102
|
// registry answers and /api/v1/health reports it as `latestVersion`.
|
|
127
103
|
const pkgName = deps.readOwnName();
|
|
@@ -156,7 +132,6 @@ async function bootServe(home, repoRoot, preferredPort, openBrowser, bindHost, d
|
|
|
156
132
|
squawkPort,
|
|
157
133
|
toolActivity,
|
|
158
134
|
}, port, listener);
|
|
159
|
-
parts.server = server;
|
|
160
135
|
if (!server.listening)
|
|
161
136
|
await deps.once(server, 'listening');
|
|
162
137
|
const address = server.address();
|
|
@@ -167,6 +142,21 @@ async function bootServe(home, repoRoot, preferredPort, openBrowser, bindHost, d
|
|
|
167
142
|
const url = `http://${boundHost.includes(':') ? `[${boundHost}]` : boundHost}:${boundPort}`;
|
|
168
143
|
ownership.publishUrl(url);
|
|
169
144
|
deps.printServeBanner(version, repoRoot, repo, checks, url);
|
|
145
|
+
// One stop per process: a repeated signal must not start a second teardown over the first.
|
|
146
|
+
let stopping = false;
|
|
147
|
+
const shutdown = (signal) => {
|
|
148
|
+
if (stopping)
|
|
149
|
+
return;
|
|
150
|
+
stopping = true;
|
|
151
|
+
void deps.stopServe(server, signal, { store }).finally(() => deps.process.exit(0));
|
|
152
|
+
};
|
|
153
|
+
deps.process.on('SIGINT', () => shutdown('SIGINT'));
|
|
154
|
+
deps.process.on('SIGTERM', () => shutdown('SIGTERM'));
|
|
155
|
+
if (deps.onTerminal())
|
|
156
|
+
deps.process.on('SIGHUP', () => shutdown('SIGHUP'));
|
|
157
|
+
else
|
|
158
|
+
deps.ignoreHangupOffTerminal();
|
|
159
|
+
deps.watchSupervisor(() => shutdown('SIGTERM'));
|
|
170
160
|
// Open the browser only once the server actually answers, so the first
|
|
171
161
|
// paint is the cockpit and never a connection error.
|
|
172
162
|
if (openBrowser) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve-command.js","sourceRoot":"","sources":["../src/serve-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,E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AS,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IACtD,IAAI,IAAI,CAAC,UAAU,EAAE;QAAE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;;QACtE,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACpC,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhD,uEAAuE;IACvE,qDAAqD;IACrD,IAAI,WAAW,EAAE,CAAC;QAChB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,GAAG,gBAAgB,EAAE,KAAK,CAAC,CAAC;QACxE,IAAI,OAAO;YAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
|
|
@@ -59,6 +59,29 @@ export declare function ciProgressPlugs(demand: ActivityDemand): {
|
|
|
59
59
|
export declare function createActivityRoutes(routeDeps: ActivityRouteDeps): import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, {
|
|
60
60
|
"/workspace/activity": {
|
|
61
61
|
$get: {
|
|
62
|
+
output: {
|
|
63
|
+
error: string;
|
|
64
|
+
code?: "invalid_input" | undefined;
|
|
65
|
+
};
|
|
66
|
+
outputFormat: "json";
|
|
67
|
+
status: 400;
|
|
68
|
+
input: {
|
|
69
|
+
query: {
|
|
70
|
+
project?: string | undefined;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
} | {
|
|
74
|
+
output: {
|
|
75
|
+
error: string;
|
|
76
|
+
};
|
|
77
|
+
outputFormat: "json";
|
|
78
|
+
status: 404 | 409 | 503;
|
|
79
|
+
input: {
|
|
80
|
+
query: {
|
|
81
|
+
project?: string | undefined;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
} | {
|
|
62
85
|
output: {
|
|
63
86
|
generatedAt: string;
|
|
64
87
|
projects: {
|
|
@@ -289,29 +312,6 @@ export declare function createActivityRoutes(routeDeps: ActivityRouteDeps): impo
|
|
|
289
312
|
project?: string | undefined;
|
|
290
313
|
};
|
|
291
314
|
};
|
|
292
|
-
} | {
|
|
293
|
-
output: {
|
|
294
|
-
error: string;
|
|
295
|
-
code?: "invalid_input" | undefined;
|
|
296
|
-
};
|
|
297
|
-
outputFormat: "json";
|
|
298
|
-
status: 400;
|
|
299
|
-
input: {
|
|
300
|
-
query: {
|
|
301
|
-
project?: string | undefined;
|
|
302
|
-
};
|
|
303
|
-
};
|
|
304
|
-
} | {
|
|
305
|
-
output: {
|
|
306
|
-
error: string;
|
|
307
|
-
};
|
|
308
|
-
outputFormat: "json";
|
|
309
|
-
status: 404 | 409 | 503;
|
|
310
|
-
input: {
|
|
311
|
-
query: {
|
|
312
|
-
project?: string | undefined;
|
|
313
|
-
};
|
|
314
|
-
};
|
|
315
315
|
};
|
|
316
316
|
};
|
|
317
317
|
}, "/", "/workspace/activity">;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hearsay-tools/squawk",
|
|
3
|
-
"version": "0.18.0-
|
|
3
|
+
"version": "0.18.0-pr3666.6633",
|
|
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",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@babel/parser": "^8.0.8",
|
|
64
64
|
"@babel/types": "^8.0.8",
|
|
65
|
-
"@open-mercato/cezar-api-client": "0.18.0-
|
|
66
|
-
"@open-mercato/cezar-contract": "0.18.0-
|
|
65
|
+
"@open-mercato/cezar-api-client": "0.18.0-pr3666.6633",
|
|
66
|
+
"@open-mercato/cezar-contract": "0.18.0-pr3666.6633",
|
|
67
67
|
"@types/node": "^24.19.1",
|
|
68
68
|
"@types/ws": "^8.18.1",
|
|
69
69
|
"esbuild": "^0.28.1",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "65609108129e22910b347781b305cbc1c23553bb"
|
|
84
84
|
}
|
package/dist/serve-stop.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { Server } from 'node:http';
|
|
2
|
-
import type { DelegationController } from './delegation/provision.ts';
|
|
3
|
-
import type { PreviewHost } from './preview/host.ts';
|
|
4
|
-
import type { RunStore } from './runs/store.ts';
|
|
5
|
-
import type { StoppableServer, StopServeOptions } from './serve-boot.ts';
|
|
6
|
-
/** What `serve` has built so far. Boot fills each field as the part comes to exist. */
|
|
7
|
-
export interface ServeParts {
|
|
8
|
-
listener?: Pick<Server, 'close' | 'closeAllConnections'>;
|
|
9
|
-
store?: Pick<RunStore, 'close'>;
|
|
10
|
-
delegation?: Pick<DelegationController, 'close'>;
|
|
11
|
-
previewHost?: Pick<PreviewHost, 'close'> | undefined;
|
|
12
|
-
/** Set once `startServer` returned: its own shutdown then stops every part above. */
|
|
13
|
-
server?: StoppableServer;
|
|
14
|
-
}
|
|
15
|
-
export interface ServeStopDeps {
|
|
16
|
-
process: {
|
|
17
|
-
on(event: NodeJS.Signals, listener: () => void): unknown;
|
|
18
|
-
exit(code?: number): unknown;
|
|
19
|
-
};
|
|
20
|
-
stopServe: (server: StoppableServer, signal: NodeJS.Signals, opts: StopServeOptions) => Promise<void>;
|
|
21
|
-
onTerminal: () => boolean;
|
|
22
|
-
ignoreHangupOffTerminal: () => void;
|
|
23
|
-
watchSupervisor: (onLost: () => void) => unknown;
|
|
24
|
-
}
|
|
25
|
-
export interface ServeStop {
|
|
26
|
-
readonly parts: ServeParts;
|
|
27
|
-
/** True once a signal started the stop: boot then starts nothing more. */
|
|
28
|
-
readonly stopping: boolean;
|
|
29
|
-
/** The stop in progress, which ends the process; undefined while none started. */
|
|
30
|
-
readonly stopped: Promise<void> | undefined;
|
|
31
|
-
}
|
|
32
|
-
/** The shutdown of a serve that has not started its server yet: the parts that exist, store last. */
|
|
33
|
-
export declare function partialServe(parts: ServeParts): StoppableServer;
|
|
34
|
-
/**
|
|
35
|
-
* Install serve's stop before the first boot step that can start a process
|
|
36
|
-
* (hearsay-tools/cezarion#991). Recovery resumes agents in their own process groups, so a signal
|
|
37
|
-
* that arrived before this handler ended Squawk by the default action and left those agents
|
|
38
|
-
* running. The stop shuts down what exists at the signal and forwards it to the agent groups
|
|
39
|
-
* last, through `stopServe`. One stop per process: a repeated signal does not start a second one.
|
|
40
|
-
*/
|
|
41
|
-
export declare function installServeStop(deps: ServeStopDeps): ServeStop;
|
package/dist/serve-stop.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/** The shutdown of a serve that has not started its server yet: the parts that exist, store last. */
|
|
2
|
-
export function partialServe(parts) {
|
|
3
|
-
return {
|
|
4
|
-
shutdownForRestart: async () => {
|
|
5
|
-
await parts.previewHost?.close().catch(() => undefined);
|
|
6
|
-
await parts.delegation?.close().catch(() => undefined);
|
|
7
|
-
parts.listener?.close();
|
|
8
|
-
parts.listener?.closeAllConnections();
|
|
9
|
-
parts.store?.close();
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Install serve's stop before the first boot step that can start a process
|
|
15
|
-
* (hearsay-tools/cezarion#991). Recovery resumes agents in their own process groups, so a signal
|
|
16
|
-
* that arrived before this handler ended Squawk by the default action and left those agents
|
|
17
|
-
* running. The stop shuts down what exists at the signal and forwards it to the agent groups
|
|
18
|
-
* last, through `stopServe`. One stop per process: a repeated signal does not start a second one.
|
|
19
|
-
*/
|
|
20
|
-
export function installServeStop(deps) {
|
|
21
|
-
const parts = {};
|
|
22
|
-
let stopped;
|
|
23
|
-
const stop = (signal) => {
|
|
24
|
-
if (stopped)
|
|
25
|
-
return;
|
|
26
|
-
stopped = deps.stopServe(parts.server ?? partialServe(parts), signal, { store: parts.store })
|
|
27
|
-
.finally(() => { deps.process.exit(0); });
|
|
28
|
-
};
|
|
29
|
-
deps.process.on('SIGINT', () => stop('SIGINT'));
|
|
30
|
-
deps.process.on('SIGTERM', () => stop('SIGTERM'));
|
|
31
|
-
if (deps.onTerminal())
|
|
32
|
-
deps.process.on('SIGHUP', () => stop('SIGHUP'));
|
|
33
|
-
else
|
|
34
|
-
deps.ignoreHangupOffTerminal();
|
|
35
|
-
deps.watchSupervisor(() => stop('SIGTERM'));
|
|
36
|
-
return {
|
|
37
|
-
parts,
|
|
38
|
-
get stopping() { return stopped !== undefined; },
|
|
39
|
-
get stopped() { return stopped; },
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=serve-stop.js.map
|
package/dist/serve-stop.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serve-stop.js","sourceRoot":"","sources":["../src/serve-stop.ts"],"names":[],"mappings":"AAgCA,qGAAqG;AACrG,MAAM,UAAU,YAAY,CAAC,KAAiB;IAC5C,OAAO;QACL,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,MAAM,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YACxD,MAAM,KAAK,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YACvD,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC;YACxB,KAAK,CAAC,QAAQ,EAAE,mBAAmB,EAAE,CAAC;YACtC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAmB;IACl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