@hearsay-tools/squawk 0.19.0-pr4427.8675 → 0.19.0-pr4429.8683
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/automations/tools.d.ts +8 -8
- package/dist/delegation/transport.d.ts +79 -79
- package/dist/preview/chromium.d.ts +3 -2
- package/dist/preview/chromium.js +5 -1
- package/dist/preview/chromium.js.map +1 -1
- package/dist/runs/transcript-facts-queue.d.ts +9 -1
- package/dist/runs/transcript-facts-queue.js +25 -10
- package/dist/runs/transcript-facts-queue.js.map +1 -1
- package/dist/runs/transcript-facts-sidecar.d.ts +22 -0
- package/dist/runs/transcript-facts-sidecar.js +59 -0
- package/dist/runs/transcript-facts-sidecar.js.map +1 -0
- package/dist/runs/transcript-facts-worker.d.ts +5 -2
- package/dist/runs/transcript-facts-worker.js +8 -5
- package/dist/runs/transcript-facts-worker.js.map +1 -1
- package/dist/runs/transcript-facts.d.ts +4 -0
- package/dist/runs/transcript-facts.js +36 -16
- package/dist/runs/transcript-facts.js.map +1 -1
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/projects-routes.d.ts +45 -45
- package/dist/server/repo-routes.d.ts +13 -13
- package/dist/server/server.d.ts +64 -64
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/package.json +4 -4
- package/scripts/measure-transcript-facts-health.mjs +10 -5
- package/scripts/transcript-facts-timing.mjs +10 -0
package/dist/server/server.d.ts
CHANGED
|
@@ -3065,12 +3065,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
3065
3065
|
output: {
|
|
3066
3066
|
generation: string;
|
|
3067
3067
|
results: ({
|
|
3068
|
-
projectId: string;
|
|
3069
|
-
runId: string;
|
|
3070
|
-
type: "error" | "reset";
|
|
3071
|
-
status: 400 | 404 | 409 | 413 | 503;
|
|
3072
|
-
error: string;
|
|
3073
|
-
} | {
|
|
3074
3068
|
projectId: string;
|
|
3075
3069
|
runId: string;
|
|
3076
3070
|
type: "batch";
|
|
@@ -3091,6 +3085,12 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
3091
3085
|
cursor: string;
|
|
3092
3086
|
afterSeq: number;
|
|
3093
3087
|
hasMore: boolean;
|
|
3088
|
+
} | {
|
|
3089
|
+
projectId: string;
|
|
3090
|
+
runId: string;
|
|
3091
|
+
type: "error" | "reset";
|
|
3092
|
+
status: 400 | 404 | 409 | 413 | 503;
|
|
3093
|
+
error: string;
|
|
3094
3094
|
})[];
|
|
3095
3095
|
};
|
|
3096
3096
|
outputFormat: "json";
|
|
@@ -4720,19 +4720,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4720
4720
|
} & {
|
|
4721
4721
|
"/repo/commit/:sha": {
|
|
4722
4722
|
$get: {
|
|
4723
|
-
output: string;
|
|
4724
|
-
outputFormat: "text";
|
|
4725
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4726
|
-
input: {
|
|
4727
|
-
query: {
|
|
4728
|
-
structured?: string | undefined;
|
|
4729
|
-
};
|
|
4730
|
-
} & {
|
|
4731
|
-
param: {
|
|
4732
|
-
sha: string;
|
|
4733
|
-
};
|
|
4734
|
-
};
|
|
4735
|
-
} | {
|
|
4736
4723
|
output: {
|
|
4737
4724
|
error: string;
|
|
4738
4725
|
code?: "invalid_input" | undefined;
|
|
@@ -4796,6 +4783,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4796
4783
|
sha: string;
|
|
4797
4784
|
};
|
|
4798
4785
|
};
|
|
4786
|
+
} | {
|
|
4787
|
+
output: string;
|
|
4788
|
+
outputFormat: "text";
|
|
4789
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4790
|
+
input: {
|
|
4791
|
+
query: {
|
|
4792
|
+
structured?: string | undefined;
|
|
4793
|
+
};
|
|
4794
|
+
} & {
|
|
4795
|
+
param: {
|
|
4796
|
+
sha: string;
|
|
4797
|
+
};
|
|
4798
|
+
};
|
|
4799
4799
|
};
|
|
4800
4800
|
};
|
|
4801
4801
|
} & {
|
|
@@ -19290,20 +19290,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
19290
19290
|
} & {
|
|
19291
19291
|
"/runs/:id/handoff": {
|
|
19292
19292
|
$get: {
|
|
19293
|
-
output:
|
|
19294
|
-
|
|
19295
|
-
|
|
19293
|
+
output: {
|
|
19294
|
+
error: string;
|
|
19295
|
+
};
|
|
19296
|
+
outputFormat: "json";
|
|
19297
|
+
status: 404;
|
|
19296
19298
|
input: {
|
|
19297
19299
|
param: {
|
|
19298
19300
|
id: string;
|
|
19299
19301
|
};
|
|
19300
19302
|
};
|
|
19301
19303
|
} | {
|
|
19302
|
-
output:
|
|
19303
|
-
|
|
19304
|
-
|
|
19305
|
-
outputFormat: "json";
|
|
19306
|
-
status: 404;
|
|
19304
|
+
output: string;
|
|
19305
|
+
outputFormat: "text";
|
|
19306
|
+
status: 200;
|
|
19307
19307
|
input: {
|
|
19308
19308
|
param: {
|
|
19309
19309
|
id: string;
|
|
@@ -19341,20 +19341,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
19341
19341
|
} & {
|
|
19342
19342
|
"/runs/:id/diff": {
|
|
19343
19343
|
$get: {
|
|
19344
|
-
output:
|
|
19345
|
-
|
|
19346
|
-
|
|
19344
|
+
output: {
|
|
19345
|
+
error: string;
|
|
19346
|
+
};
|
|
19347
|
+
outputFormat: "json";
|
|
19348
|
+
status: 404 | 409;
|
|
19347
19349
|
input: {
|
|
19348
19350
|
param: {
|
|
19349
19351
|
id: string;
|
|
19350
19352
|
};
|
|
19351
19353
|
};
|
|
19352
19354
|
} | {
|
|
19353
|
-
output:
|
|
19354
|
-
|
|
19355
|
-
|
|
19356
|
-
outputFormat: "json";
|
|
19357
|
-
status: 404 | 409;
|
|
19355
|
+
output: string;
|
|
19356
|
+
outputFormat: "text";
|
|
19357
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
19358
19358
|
input: {
|
|
19359
19359
|
param: {
|
|
19360
19360
|
id: string;
|
|
@@ -21489,19 +21489,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
21489
21489
|
} & {
|
|
21490
21490
|
"/repo/commit/:sha": {
|
|
21491
21491
|
$get: {
|
|
21492
|
-
output: string;
|
|
21493
|
-
outputFormat: "text";
|
|
21494
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
21495
|
-
input: {
|
|
21496
|
-
query: {
|
|
21497
|
-
structured?: string | undefined;
|
|
21498
|
-
};
|
|
21499
|
-
} & {
|
|
21500
|
-
param: {
|
|
21501
|
-
sha: string;
|
|
21502
|
-
};
|
|
21503
|
-
};
|
|
21504
|
-
} | {
|
|
21505
21492
|
output: {
|
|
21506
21493
|
error: string;
|
|
21507
21494
|
code?: "invalid_input" | undefined;
|
|
@@ -21565,6 +21552,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
21565
21552
|
sha: string;
|
|
21566
21553
|
};
|
|
21567
21554
|
};
|
|
21555
|
+
} | {
|
|
21556
|
+
output: string;
|
|
21557
|
+
outputFormat: "text";
|
|
21558
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
21559
|
+
input: {
|
|
21560
|
+
query: {
|
|
21561
|
+
structured?: string | undefined;
|
|
21562
|
+
};
|
|
21563
|
+
} & {
|
|
21564
|
+
param: {
|
|
21565
|
+
sha: string;
|
|
21566
|
+
};
|
|
21567
|
+
};
|
|
21568
21568
|
};
|
|
21569
21569
|
};
|
|
21570
21570
|
} & {
|
|
@@ -36059,20 +36059,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
36059
36059
|
} & {
|
|
36060
36060
|
"/runs/:id/handoff": {
|
|
36061
36061
|
$get: {
|
|
36062
|
-
output:
|
|
36063
|
-
|
|
36064
|
-
|
|
36062
|
+
output: {
|
|
36063
|
+
error: string;
|
|
36064
|
+
};
|
|
36065
|
+
outputFormat: "json";
|
|
36066
|
+
status: 404;
|
|
36065
36067
|
input: {
|
|
36066
36068
|
param: {
|
|
36067
36069
|
id: string;
|
|
36068
36070
|
};
|
|
36069
36071
|
};
|
|
36070
36072
|
} | {
|
|
36071
|
-
output:
|
|
36072
|
-
|
|
36073
|
-
|
|
36074
|
-
outputFormat: "json";
|
|
36075
|
-
status: 404;
|
|
36073
|
+
output: string;
|
|
36074
|
+
outputFormat: "text";
|
|
36075
|
+
status: 200;
|
|
36076
36076
|
input: {
|
|
36077
36077
|
param: {
|
|
36078
36078
|
id: string;
|
|
@@ -36110,20 +36110,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
36110
36110
|
} & {
|
|
36111
36111
|
"/runs/:id/diff": {
|
|
36112
36112
|
$get: {
|
|
36113
|
-
output:
|
|
36114
|
-
|
|
36115
|
-
|
|
36113
|
+
output: {
|
|
36114
|
+
error: string;
|
|
36115
|
+
};
|
|
36116
|
+
outputFormat: "json";
|
|
36117
|
+
status: 404 | 409;
|
|
36116
36118
|
input: {
|
|
36117
36119
|
param: {
|
|
36118
36120
|
id: string;
|
|
36119
36121
|
};
|
|
36120
36122
|
};
|
|
36121
36123
|
} | {
|
|
36122
|
-
output:
|
|
36123
|
-
|
|
36124
|
-
|
|
36125
|
-
outputFormat: "json";
|
|
36126
|
-
status: 404 | 409;
|
|
36124
|
+
output: string;
|
|
36125
|
+
outputFormat: "text";
|
|
36126
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
36127
36127
|
input: {
|
|
36128
36128
|
param: {
|
|
36129
36129
|
id: string;
|
|
@@ -7,12 +7,6 @@ export declare function createWorkspaceLiveRoutes(live: Parameters<typeof create
|
|
|
7
7
|
output: {
|
|
8
8
|
generation: string;
|
|
9
9
|
results: ({
|
|
10
|
-
projectId: string;
|
|
11
|
-
runId: string;
|
|
12
|
-
type: "error" | "reset";
|
|
13
|
-
status: 400 | 404 | 409 | 413 | 503;
|
|
14
|
-
error: string;
|
|
15
|
-
} | {
|
|
16
10
|
projectId: string;
|
|
17
11
|
runId: string;
|
|
18
12
|
type: "batch";
|
|
@@ -33,6 +27,12 @@ export declare function createWorkspaceLiveRoutes(live: Parameters<typeof create
|
|
|
33
27
|
cursor: string;
|
|
34
28
|
afterSeq: number;
|
|
35
29
|
hasMore: boolean;
|
|
30
|
+
} | {
|
|
31
|
+
projectId: string;
|
|
32
|
+
runId: string;
|
|
33
|
+
type: "error" | "reset";
|
|
34
|
+
status: 400 | 404 | 409 | 413 | 503;
|
|
35
|
+
error: string;
|
|
36
36
|
})[];
|
|
37
37
|
};
|
|
38
38
|
outputFormat: "json";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hearsay-tools/squawk",
|
|
3
|
-
"version": "0.19.0-
|
|
3
|
+
"version": "0.19.0-pr4429.8683",
|
|
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-
|
|
73
|
-
"@open-mercato/cezar-contract": "0.19.0-
|
|
72
|
+
"@open-mercato/cezar-api-client": "0.19.0-pr4429.8683",
|
|
73
|
+
"@open-mercato/cezar-contract": "0.19.0-pr4429.8683",
|
|
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": "
|
|
90
|
+
"gitHead": "2a643f3c151b7ac6a5c22a5a067b7637dc1f3d71"
|
|
91
91
|
}
|
|
@@ -9,9 +9,10 @@ import { tmpdir } from 'node:os';
|
|
|
9
9
|
import { join } from 'node:path';
|
|
10
10
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
11
11
|
import { PerformanceObserver } from 'node:perf_hooks';
|
|
12
|
-
import { timingSnapshot, timingDelta, blockingBudget, prepareOpenTiming, hookCalls, callsWithin, startThreadWatch, summarizeWaits } from './transcript-facts-timing.mjs';
|
|
12
|
+
import { timingSnapshot, timingDelta, blockingBudget, prepareOpenTiming, hookCalls, callsWithin, startThreadWatch, summarizeWaits, attachWaitsOverBudget } from './transcript-facts-timing.mjs';
|
|
13
13
|
import { seedColdHistories, verifyFacts } from './transcript-facts-fixture.mjs';
|
|
14
14
|
|
|
15
|
+
const BUDGET_MS = 50;
|
|
15
16
|
const root = mkdtempSync(join(process.platform === 'win32' ? tmpdir() : '/tmp', 'cez-facts-health-'));
|
|
16
17
|
// The experiment has no external peers, credentials, background updater, or real home.
|
|
17
18
|
for (const key of Object.keys(process.env)) if (/^(CEZ|HSQ)_/.test(key)) delete process.env[key];
|
|
@@ -96,6 +97,8 @@ try {
|
|
|
96
97
|
gcObserver = new PerformanceObserver(list => { for (const entry of list.getEntries()) gcPauses.push(entry); });
|
|
97
98
|
gcObserver.observe({ entryTypes: ['gc'] });
|
|
98
99
|
threadWatch = await startThreadWatch();
|
|
100
|
+
// Watch every sample: any one over the budget names what the main thread waited in.
|
|
101
|
+
threadWatch?.watch(true);
|
|
99
102
|
const start = performance.now();
|
|
100
103
|
let end;
|
|
101
104
|
let warming;
|
|
@@ -108,7 +111,6 @@ try {
|
|
|
108
111
|
const measurementStart = pauseStart ?? timingSnapshot();
|
|
109
112
|
const plannedMs = pauseStart ? pauseMs : 0;
|
|
110
113
|
const requestStart = performance.now();
|
|
111
|
-
if (!store) threadWatch?.watch(true);
|
|
112
114
|
const pendingResponse = fetch(endpoint, { signal: AbortSignal.timeout(2_000) });
|
|
113
115
|
// The first request includes synchronous project-open work too.
|
|
114
116
|
if (!store) {
|
|
@@ -121,19 +123,22 @@ try {
|
|
|
121
123
|
const requestEnd = performance.now();
|
|
122
124
|
// Include EVERY request begun while cold warm-up was active, even one ending after it.
|
|
123
125
|
const measurement = timingDelta(measurementStart, timingSnapshot());
|
|
124
|
-
threadWatch?.watch(false);
|
|
125
126
|
samples.push({ fromMs: measurementStart.at - start, startMs: requestStart - start, endMs: requestEnd - start,
|
|
126
127
|
latencyMs: requestEnd - requestStart, plannedMs, ...measurement, ...blockingBudget(measurement) });
|
|
127
128
|
if (end !== undefined) break;
|
|
128
129
|
pauseStart = timingSnapshot();
|
|
129
130
|
await delay(pauseMs);
|
|
130
131
|
}
|
|
132
|
+
threadWatch?.watch(false);
|
|
131
133
|
await warming;
|
|
132
134
|
unhookCalls();
|
|
133
|
-
const
|
|
135
|
+
const waits = (await threadWatch?.stop()) ?? [];
|
|
134
136
|
threadWatch = undefined;
|
|
137
|
+
const firstFrom = start + samples[0].fromMs;
|
|
138
|
+
const firstSampleWaits = waits.filter(entry => entry.at >= firstFrom && entry.at < firstFrom + samples[0].elapsedMs);
|
|
135
139
|
for (const entry of gcObserver.takeRecords()) gcPauses.push(entry);
|
|
136
140
|
gcObserver.disconnect();
|
|
141
|
+
attachWaitsOverBudget(samples, waits, BUDGET_MS, sample => [start + sample.fromMs, start + sample.fromMs + sample.elapsedMs]);
|
|
137
142
|
for (const sample of samples) {
|
|
138
143
|
const from = start + sample.fromMs;
|
|
139
144
|
const to = from + sample.elapsedMs;
|
|
@@ -161,7 +166,7 @@ try {
|
|
|
161
166
|
console.log(JSON.stringify(result));
|
|
162
167
|
// Exclude run-queue delay and loop idle time: a response that waits on the thread pool, a worker
|
|
163
168
|
// or the kernel is latency (kept in maxLatencyMs), not main-thread blocking. Synchronous work counts.
|
|
164
|
-
assert.ok(result.maxBlockingMs <
|
|
169
|
+
assert.ok(result.maxBlockingMs < BUDGET_MS, `max health blocking ${result.maxBlockingMs.toFixed(3)}ms must be <${BUDGET_MS}ms`);
|
|
165
170
|
} finally {
|
|
166
171
|
clearTimeout(watchdog);
|
|
167
172
|
unhookCalls?.();
|
|
@@ -165,6 +165,16 @@ export function summarizeWaits(seen) {
|
|
|
165
165
|
return counts;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
+
/** Name the waits of every sample whose blocking reached the budget, not only the first one.
|
|
169
|
+
* `window(sample)` gives the sample's [from, to) on the performance.now() clock. */
|
|
170
|
+
export function attachWaitsOverBudget(samples, seen, budgetMs, window) {
|
|
171
|
+
for (const sample of samples) {
|
|
172
|
+
if (sample.blockingMs < budgetMs) continue;
|
|
173
|
+
const [from, to] = window(sample);
|
|
174
|
+
sample.waits = summarizeWaits(seen.filter(entry => entry.at >= from && entry.at < to));
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
168
178
|
/** Instrument only the synchronous open call. Imports and hook setup are outside its budget.
|
|
169
179
|
* These diagnostic wrappers restore every method even when open throws. */
|
|
170
180
|
export async function prepareOpenTiming(runtime) {
|