@hearsay-tools/squawk 0.18.0-pr4136.7972.2 → 0.18.0-pr4138.7995
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/core/runner-definition.d.ts +0 -8
- package/dist/core/runner-definition.js.map +1 -1
- package/dist/core/skill-path-scope.js +1 -1
- package/dist/core/skill-path-scope.js.map +1 -1
- package/dist/core/skill-probe.d.ts +6 -1
- package/dist/core/skill-probe.js +10 -4
- package/dist/core/skill-probe.js.map +1 -1
- package/dist/delegation/routes.d.ts +65 -65
- package/dist/paths.d.ts +1 -0
- package/dist/paths.js +1 -1
- package/dist/paths.js.map +1 -1
- package/dist/preview/browser-launch.js +5 -1
- package/dist/preview/browser-launch.js.map +1 -1
- package/dist/preview/cdp-proxy.js +1 -1
- package/dist/preview/cdp-proxy.js.map +1 -1
- package/dist/preview/cdp.d.ts +4 -2
- package/dist/preview/cdp.js +43 -4
- package/dist/preview/cdp.js.map +1 -1
- package/dist/preview/chromium.js +4 -0
- package/dist/preview/chromium.js.map +1 -1
- package/dist/preview/host.js +13 -7
- package/dist/preview/host.js.map +1 -1
- package/dist/preview/session.js +13 -7
- package/dist/preview/session.js.map +1 -1
- package/dist/runners/antigravity/account-home.d.ts +2 -1
- package/dist/runners/antigravity/account-home.js +17 -3
- package/dist/runners/antigravity/account-home.js.map +1 -1
- package/dist/runners/antigravity/antigravity-skill-catalog.d.ts +8 -3
- package/dist/runners/antigravity/antigravity-skill-catalog.js +169 -43
- package/dist/runners/antigravity/antigravity-skill-catalog.js.map +1 -1
- package/dist/runners/antigravity/definition.js +0 -1
- package/dist/runners/antigravity/definition.js.map +1 -1
- package/dist/runs/run-claims-topic.d.ts +4 -0
- package/dist/runs/run-claims-topic.js +11 -1
- package/dist/runs/run-claims-topic.js.map +1 -1
- package/dist/runs/store.js +1 -0
- package/dist/runs/store.js.map +1 -1
- package/dist/server/models-routes.d.ts +13 -13
- package/dist/server/server.d.ts +1551 -1551
- package/package.json +4 -4
- package/scripts/measure-transcript-facts-health.mjs +12 -3
- package/scripts/measure-transcript-facts-lag.mjs +12 -3
- package/scripts/mock-acp.mjs +9 -2
- package/scripts/mock-skill-data/antigravity.mjs +66 -0
- package/scripts/mock-skill-fixtures.mjs +10 -0
- package/scripts/transcript-facts-timing.mjs +32 -0
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-pr4138.7995",
|
|
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",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@babel/parser": "^8.0.8",
|
|
65
65
|
"@babel/types": "^8.0.8",
|
|
66
|
-
"@open-mercato/cezar-api-client": "0.18.0-
|
|
67
|
-
"@open-mercato/cezar-contract": "0.18.0-
|
|
66
|
+
"@open-mercato/cezar-api-client": "0.18.0-pr4138.7995",
|
|
67
|
+
"@open-mercato/cezar-contract": "0.18.0-pr4138.7995",
|
|
68
68
|
"@types/node": "^24.19.1",
|
|
69
69
|
"@types/ws": "^8.18.1",
|
|
70
70
|
"esbuild": "^0.28.1",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "bf01960a574355b875d594d4201a9819410c361d"
|
|
85
85
|
}
|
|
@@ -8,7 +8,7 @@ import { mkdtempSync, readdirSync, rmSync } from 'node:fs';
|
|
|
8
8
|
import { tmpdir } from 'node:os';
|
|
9
9
|
import { join } from 'node:path';
|
|
10
10
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
11
|
-
import { timingSnapshot, timingDelta, blockingBudget } from './transcript-facts-timing.mjs';
|
|
11
|
+
import { timingSnapshot, timingDelta, blockingBudget, prepareOpenTiming } from './transcript-facts-timing.mjs';
|
|
12
12
|
import { seedColdHistories, verifyFacts } from './transcript-facts-fixture.mjs';
|
|
13
13
|
|
|
14
14
|
const root = mkdtempSync(join(process.platform === 'win32' ? tmpdir() : '/tmp', 'cez-facts-health-'));
|
|
@@ -17,6 +17,8 @@ for (const key of Object.keys(process.env)) if (/^(CEZ|HSQ)_/.test(key)) delete
|
|
|
17
17
|
process.env.HSQ_HOME = process.env.CEZ_HOME = join(root, 'home');
|
|
18
18
|
process.env.HSQ_DRY_RUN = process.env.CEZ_DRY_RUN = '1';
|
|
19
19
|
const runtime = { url: new URL('../dist/', import.meta.url), ext: 'js' };
|
|
20
|
+
const timedOpen = await prepareOpenTiming(runtime);
|
|
21
|
+
let openTiming;
|
|
20
22
|
let dataDir;
|
|
21
23
|
let store;
|
|
22
24
|
let bootStore;
|
|
@@ -75,7 +77,7 @@ try {
|
|
|
75
77
|
const pendingResponse = fetch(endpoint, { signal: AbortSignal.timeout(2_000) });
|
|
76
78
|
// The first request includes synchronous project-open work too.
|
|
77
79
|
if (!store) {
|
|
78
|
-
store = RunStore
|
|
80
|
+
({ store, timing: openTiming } = timedOpen(RunStore, dataDir));
|
|
79
81
|
warming = store.transcriptFacts.factsWarmIdle().then(() => { end = performance.now(); });
|
|
80
82
|
}
|
|
81
83
|
const response = await pendingResponse;
|
|
@@ -93,7 +95,14 @@ try {
|
|
|
93
95
|
await warming;
|
|
94
96
|
assert.ok(samples.length > 0, 'health requests must overlap cold warming');
|
|
95
97
|
assert.ok(samples.every(sample => sample.fromMs < end - start && sample.endMs > 0));
|
|
96
|
-
|
|
98
|
+
// Keep first-open and repeated-open costs separate. Reopening must not rescan clean history.
|
|
99
|
+
const reopenTimings = Array.from({ length: 3 }, () => {
|
|
100
|
+
const reopened = timedOpen(RunStore, dataDir);
|
|
101
|
+
const closeStart = timingSnapshot();
|
|
102
|
+
reopened.store.close();
|
|
103
|
+
return { ...reopened.timing, closeTiming: timingDelta(closeStart, timingSnapshot()) };
|
|
104
|
+
});
|
|
105
|
+
const result = { kind: 'transcript-facts-http-health', openTiming, reopenTimings, runtime: runtime.url.href,
|
|
97
106
|
endpoint: '/api/v1/health', scenario: 'already-listening server during cold project open', primingLatencyMs,
|
|
98
107
|
...verifyFacts(dataDir, fixtures, store), durationMs: end - start,
|
|
99
108
|
maxBlockingMs: Math.max(...samples.map(sample => sample.blockingMs)),
|
|
@@ -10,12 +10,14 @@ import { tmpdir } from 'node:os';
|
|
|
10
10
|
import { join } from 'node:path';
|
|
11
11
|
import { pathToFileURL } from 'node:url';
|
|
12
12
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
13
|
-
import { timingSnapshot, timingDelta, blockingBudget } from './transcript-facts-timing.mjs';
|
|
13
|
+
import { timingSnapshot, timingDelta, blockingBudget, prepareOpenTiming } from './transcript-facts-timing.mjs';
|
|
14
14
|
import { seedColdHistories, verifyFacts } from './transcript-facts-fixture.mjs';
|
|
15
15
|
|
|
16
16
|
const runtime = { url: process.argv[2] ? pathToFileURL(process.argv[2] + '/') : new URL('../src/', import.meta.url), ext: process.argv[3] ?? (process.argv[2] ? 'js' : 'ts') };
|
|
17
17
|
const { RunStore } = await import(new URL('runs/store.' + runtime.ext, runtime.url));
|
|
18
18
|
const dir = mkdtempSync(join(tmpdir(), 'cez-facts-lag-'));
|
|
19
|
+
const timedOpen = await prepareOpenTiming(runtime);
|
|
20
|
+
let openTiming;
|
|
19
21
|
let store;
|
|
20
22
|
let timer;
|
|
21
23
|
try {
|
|
@@ -34,13 +36,20 @@ try {
|
|
|
34
36
|
// Establish a real interval before starting; retain the first tick after completion too.
|
|
35
37
|
await delay(periodMs * 2);
|
|
36
38
|
const start = performance.now();
|
|
37
|
-
store = RunStore
|
|
39
|
+
({ store, timing: openTiming } = timedOpen(RunStore, dir));
|
|
38
40
|
await store.transcriptFacts.factsWarmIdle();
|
|
39
41
|
const end = performance.now();
|
|
40
42
|
while (!ticks.some(tick => tick.at > end)) await delay(periodMs);
|
|
41
43
|
clearInterval(timer);
|
|
42
44
|
const overlapping = ticks.filter(tick => tick.at >= start && tick.at <= end);
|
|
43
|
-
|
|
45
|
+
// Keep first-open and repeated-open costs separate. Reopening must not rescan clean history.
|
|
46
|
+
const reopenTimings = Array.from({ length: 3 }, () => {
|
|
47
|
+
const reopened = timedOpen(RunStore, dir);
|
|
48
|
+
const closeStart = timingSnapshot();
|
|
49
|
+
reopened.store.close();
|
|
50
|
+
return { ...reopened.timing, closeTiming: timingDelta(closeStart, timingSnapshot()) };
|
|
51
|
+
});
|
|
52
|
+
const result = { kind: 'transcript-facts-lag', openTiming, reopenTimings, runtime: runtime.url.href, periodMs,
|
|
44
53
|
...verifyFacts(dir, fixtures, store), durationMs: end - start, ticks: ticks.length,
|
|
45
54
|
beforeTicks: ticks.filter(tick => tick.at < start).length,
|
|
46
55
|
trailingTicks: ticks.filter(tick => tick.at > end).length,
|
package/scripts/mock-acp.mjs
CHANGED
|
@@ -14,6 +14,7 @@ import { waitForRelease } from './mock-lifecycle.mjs';
|
|
|
14
14
|
import { answerNudge } from './mock-nudge.mjs';
|
|
15
15
|
import { PI_FAILURES } from './mock-provider-failures.mjs';
|
|
16
16
|
import { knownSession, saveSession } from './mock-acp-sessions.mjs';
|
|
17
|
+
import { SKILL_TOKEN } from './mock-skill-trigger.mjs';
|
|
17
18
|
|
|
18
19
|
// The Antigravity CLI's identity: a bare version and a help text that lists its acp command.
|
|
19
20
|
if (process.argv.includes('--version')) { console.log('1.5.14'); process.exit(0); }
|
|
@@ -23,6 +24,12 @@ if (process.argv.includes('--login')) {
|
|
|
23
24
|
const { mockLogin } = await import('./mock-acp-login.mjs');
|
|
24
25
|
process.exit(await mockLogin(flag('--gemini-dir')));
|
|
25
26
|
}
|
|
27
|
+
if (process.argv.includes('--print=/skills')) {
|
|
28
|
+
const { mockSkillList } = await import('./mock-skill-list.mjs');
|
|
29
|
+
console.log(JSON.stringify(mockSkillList('antigravity')));
|
|
30
|
+
console.log(JSON.stringify({ event: 'result', result: { conversation_id: '', status: 'SUCCESS', response: '' } }));
|
|
31
|
+
process.exit(0);
|
|
32
|
+
}
|
|
26
33
|
let antigravity = false;
|
|
27
34
|
const { failureControl, delivery } = await loadControls({ failure: ['provider', 'unread'], delivery: ['reject', 'hold-ack', 'hold-response'] });
|
|
28
35
|
const write = frame => process.stdout.write(`${JSON.stringify({ jsonrpc: '2.0', ...frame })}\n`);
|
|
@@ -162,7 +169,7 @@ function authenticate(frame) {
|
|
|
162
169
|
}
|
|
163
170
|
function echoSteers(turn) {
|
|
164
171
|
if (turn.cancelled) return;
|
|
165
|
-
for (const text of steers.splice(0)) content('agent_message_chunk', text.startsWith('/probe-') ?
|
|
172
|
+
for (const text of steers.splice(0)) content('agent_message_chunk', text.startsWith('/probe-') ? `${SKILL_TOKEN} ${text}` : `saw: ${text}`);
|
|
166
173
|
}
|
|
167
174
|
async function runtimeProbe(text, turn) {
|
|
168
175
|
if (text === 'mock:acp-mcp-name-limit') {
|
|
@@ -220,7 +227,7 @@ async function runPrompt(text, turn) {
|
|
|
220
227
|
content('agent_message_chunk', `Answer received: ${text.trim()}${await context.lifecycle(['cezar_done', {}])}`); return;
|
|
221
228
|
}
|
|
222
229
|
if (/mock:(?:acp-permission|acp-ask|approval|permission-default)/.test(text)) return permissionPrompt(text, turn);
|
|
223
|
-
if (text.startsWith('/probe-')) { content('agent_message_chunk',
|
|
230
|
+
if (text.startsWith('/probe-')) { content('agent_message_chunk', `${SKILL_TOKEN} ${text}`); return; }
|
|
224
231
|
if (process.env.CEZ_MOCK_CI_PR) await probeCiTool('acp', sessionParams);
|
|
225
232
|
const scenario = scenarioFor(text, context);
|
|
226
233
|
const wire = encoder(turn);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Native captures for the antigravity mock, equal to runners/antigravity/__fixtures__/skill-list.json and skill-trigger.json.
|
|
2
|
+
// skillList: metadata excerpts, no skill bodies. skillTrigger: the minimal native frames of one skill turn.
|
|
3
|
+
export const skillList = {
|
|
4
|
+
"event": "command_result",
|
|
5
|
+
"command": {
|
|
6
|
+
"name": "skills",
|
|
7
|
+
"data": {
|
|
8
|
+
"skills": [
|
|
9
|
+
{
|
|
10
|
+
"name": "agy-customizations",
|
|
11
|
+
"description": "Comprehensive guide and reference for the Antigravity Customization System. Use to explain how customizations work, their loading priority, discovery mechanisms, and to guide the creation of skills, rules, plugins, hooks, and MCP servers.",
|
|
12
|
+
"path": "/home/probe/.gemini/antigravity-cli/builtin/skills/agy-customizations/SKILL.md",
|
|
13
|
+
"builtin": true,
|
|
14
|
+
"model_invocable": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "apptension-review:code-review",
|
|
18
|
+
"description": "Methodical code review of a changeset.",
|
|
19
|
+
"path": "/home/probe/.gemini/config/plugins/apptension-review/skills/code-review/SKILL.md",
|
|
20
|
+
"plugin": "apptension-review",
|
|
21
|
+
"builtin": false,
|
|
22
|
+
"model_invocable": true
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "probe-project",
|
|
26
|
+
"description": "Project probe skill.",
|
|
27
|
+
"path": "/tmp/skill-list-probe/repo/.agents/skills/probe-project/SKILL.md",
|
|
28
|
+
"builtin": false,
|
|
29
|
+
"model_invocable": true
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "probe-user",
|
|
33
|
+
"description": "User probe skill.",
|
|
34
|
+
"path": "/home/probe/.gemini/config/skills/probe-user/SKILL.md",
|
|
35
|
+
"builtin": false,
|
|
36
|
+
"model_invocable": true
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const skillRead = {
|
|
44
|
+
toolCallId: 'call_598714134544840670',
|
|
45
|
+
name: 'read_file',
|
|
46
|
+
args: { Path: '/probe/repo/.agents/skills/probe-project/SKILL.md' },
|
|
47
|
+
kind: 'read',
|
|
48
|
+
title: 'File .agents/skills/probe-project/SKILL.md',
|
|
49
|
+
locations: [{ path: '/probe/repo/.agents/skills/probe-project/SKILL.md' }],
|
|
50
|
+
rawInput: { Path: '/probe/repo/.agents/skills/probe-project/SKILL.md' },
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const sessionUpdate = update => ({
|
|
54
|
+
from: 'agent',
|
|
55
|
+
frame: {
|
|
56
|
+
jsonrpc: '2.0',
|
|
57
|
+
method: 'session/update',
|
|
58
|
+
params: { sessionId: '89c39b17-7545-4378-80be-0b3b92ead252', update },
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export const skillTrigger = [
|
|
63
|
+
sessionUpdate({ sessionUpdate: 'tool_call', ...skillRead, status: 'in_progress' }),
|
|
64
|
+
sessionUpdate({ sessionUpdate: 'tool_call_update', ...skillRead, status: 'completed' }),
|
|
65
|
+
sessionUpdate({ sessionUpdate: 'agent_message_chunk', content: { type: 'text', text: 'TRIGGER-FIXTURE' } }),
|
|
66
|
+
];
|
|
@@ -36,6 +36,16 @@ export function skillListFixtures(skills, problems = []) {
|
|
|
36
36
|
}));
|
|
37
37
|
replies.omp.warnings = problems.map(problem => ({ message: problem.message,
|
|
38
38
|
...(problem.path ? { skillPath: problem.path } : {}) }));
|
|
39
|
+
replies.antigravity.command.data.skills = skills.map(skill => ({
|
|
40
|
+
name: skill.id ?? skill.name,
|
|
41
|
+
description: skill.description ?? '',
|
|
42
|
+
path: skill.path ?? (skill.scope === 'user'
|
|
43
|
+
? `/home/probe/.gemini/config/skills/${skill.id ?? skill.name}/SKILL.md`
|
|
44
|
+
: fixturePath(skill)),
|
|
45
|
+
...(skill.plugin ? { plugin: skill.plugin } : {}),
|
|
46
|
+
builtin: skill.scope === 'system',
|
|
47
|
+
model_invocable: true,
|
|
48
|
+
}));
|
|
39
49
|
return replies;
|
|
40
50
|
}
|
|
41
51
|
|
|
@@ -40,3 +40,35 @@ export function blockingBudget(sample, periodMs = 0) {
|
|
|
40
40
|
: Math.max(0, sample.elapsedMs - periodMs - sample.queueWaitMs);
|
|
41
41
|
return { mode, blockingMs: Math.max(0, periodMs > 0 ? Math.max(sample.mainThreadCpuMs, blockingMs) : blockingMs) };
|
|
42
42
|
}
|
|
43
|
+
|
|
44
|
+
/** Instrument only the synchronous open call. Imports and hook setup are outside its budget.
|
|
45
|
+
* These diagnostic wrappers restore every method even when open throws. */
|
|
46
|
+
export async function prepareOpenTiming(runtime) {
|
|
47
|
+
const [{ RunDatabase }, { RunClaimsTopic }, { RunTranscriptFacts }, { ExitEvents }] = await Promise.all([
|
|
48
|
+
import(new URL('runs/run-database.' + runtime.ext, runtime.url)),
|
|
49
|
+
import(new URL('runs/run-claims-topic.' + runtime.ext, runtime.url)),
|
|
50
|
+
import(new URL('runs/transcript-facts-topic.' + runtime.ext, runtime.url)),
|
|
51
|
+
import(new URL('runs/exit-events.' + runtime.ext, runtime.url)),
|
|
52
|
+
]);
|
|
53
|
+
return (RunStore, dataDir) => {
|
|
54
|
+
const phases = [];
|
|
55
|
+
const hooks = [[RunDatabase, 'open'], [RunDatabase.prototype, 'listWhere'],
|
|
56
|
+
[RunClaimsTopic.prototype, 'loadHeldRows'], [RunTranscriptFacts.prototype, 'warmTranscriptFacts'],
|
|
57
|
+
[ExitEvents.prototype, 'writeLoaded']];
|
|
58
|
+
const restore = hooks.map(([target, name]) => {
|
|
59
|
+
const original = target[name];
|
|
60
|
+
target[name] = function (...args) {
|
|
61
|
+
const start = timingSnapshot();
|
|
62
|
+
try { return original.apply(this, args); }
|
|
63
|
+
finally { phases.push({ phase: name, ...(name === 'listWhere' ? { sql: args[0] } : {}),
|
|
64
|
+
...timingDelta(start, timingSnapshot()) }); }
|
|
65
|
+
};
|
|
66
|
+
return () => { target[name] = original; };
|
|
67
|
+
});
|
|
68
|
+
const start = timingSnapshot();
|
|
69
|
+
try {
|
|
70
|
+
const store = RunStore.open(dataDir);
|
|
71
|
+
return { store, timing: { ...timingDelta(start, timingSnapshot()), phases } };
|
|
72
|
+
} finally { for (const undo of restore) undo(); }
|
|
73
|
+
};
|
|
74
|
+
}
|