@hearsay-tools/squawk 0.18.0-dev.8362 → 0.18.0-dev.8366
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/controller.d.ts +7 -7
- package/dist/delegation/routes.d.ts +65 -65
- package/dist/plugin/bundled-runners.js +1 -0
- package/dist/plugin/bundled-runners.js.map +1 -1
- package/dist/server/automations-routes.d.ts +150 -150
- package/dist/server/project-settings-routes.d.ts +107 -107
- package/dist/server/provider-sign-in-routes.d.ts +2 -2
- package/dist/server/runner-install-routes.d.ts +10 -10
- package/dist/server/runs-routes.d.ts +276 -276
- package/dist/server/server.d.ts +58 -58
- package/package.json +4 -4
- package/scripts/inline-contract.mjs +32 -9
package/dist/server/server.d.ts
CHANGED
|
@@ -4609,19 +4609,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4609
4609
|
} & {
|
|
4610
4610
|
"/repo/commit/:sha": {
|
|
4611
4611
|
$get: {
|
|
4612
|
-
output: string;
|
|
4613
|
-
outputFormat: "text";
|
|
4614
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4615
|
-
input: {
|
|
4616
|
-
query: {
|
|
4617
|
-
structured?: string | undefined;
|
|
4618
|
-
};
|
|
4619
|
-
} & {
|
|
4620
|
-
param: {
|
|
4621
|
-
sha: string;
|
|
4622
|
-
};
|
|
4623
|
-
};
|
|
4624
|
-
} | {
|
|
4625
4612
|
output: {
|
|
4626
4613
|
error: string;
|
|
4627
4614
|
code?: "invalid_input" | undefined;
|
|
@@ -4685,6 +4672,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4685
4672
|
sha: string;
|
|
4686
4673
|
};
|
|
4687
4674
|
};
|
|
4675
|
+
} | {
|
|
4676
|
+
output: string;
|
|
4677
|
+
outputFormat: "text";
|
|
4678
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4679
|
+
input: {
|
|
4680
|
+
query: {
|
|
4681
|
+
structured?: string | undefined;
|
|
4682
|
+
};
|
|
4683
|
+
} & {
|
|
4684
|
+
param: {
|
|
4685
|
+
sha: string;
|
|
4686
|
+
};
|
|
4687
|
+
};
|
|
4688
4688
|
};
|
|
4689
4689
|
};
|
|
4690
4690
|
} & {
|
|
@@ -19152,20 +19152,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
19152
19152
|
} & {
|
|
19153
19153
|
"/runs/:id/handoff": {
|
|
19154
19154
|
$get: {
|
|
19155
|
-
output:
|
|
19156
|
-
|
|
19157
|
-
|
|
19155
|
+
output: {
|
|
19156
|
+
error: string;
|
|
19157
|
+
};
|
|
19158
|
+
outputFormat: "json";
|
|
19159
|
+
status: 404;
|
|
19158
19160
|
input: {
|
|
19159
19161
|
param: {
|
|
19160
19162
|
id: string;
|
|
19161
19163
|
};
|
|
19162
19164
|
};
|
|
19163
19165
|
} | {
|
|
19164
|
-
output:
|
|
19165
|
-
|
|
19166
|
-
|
|
19167
|
-
outputFormat: "json";
|
|
19168
|
-
status: 404;
|
|
19166
|
+
output: string;
|
|
19167
|
+
outputFormat: "text";
|
|
19168
|
+
status: 200;
|
|
19169
19169
|
input: {
|
|
19170
19170
|
param: {
|
|
19171
19171
|
id: string;
|
|
@@ -19203,20 +19203,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
19203
19203
|
} & {
|
|
19204
19204
|
"/runs/:id/diff": {
|
|
19205
19205
|
$get: {
|
|
19206
|
-
output:
|
|
19207
|
-
|
|
19208
|
-
|
|
19206
|
+
output: {
|
|
19207
|
+
error: string;
|
|
19208
|
+
};
|
|
19209
|
+
outputFormat: "json";
|
|
19210
|
+
status: 404 | 409;
|
|
19209
19211
|
input: {
|
|
19210
19212
|
param: {
|
|
19211
19213
|
id: string;
|
|
19212
19214
|
};
|
|
19213
19215
|
};
|
|
19214
19216
|
} | {
|
|
19215
|
-
output:
|
|
19216
|
-
|
|
19217
|
-
|
|
19218
|
-
outputFormat: "json";
|
|
19219
|
-
status: 404 | 409;
|
|
19217
|
+
output: string;
|
|
19218
|
+
outputFormat: "text";
|
|
19219
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
19220
19220
|
input: {
|
|
19221
19221
|
param: {
|
|
19222
19222
|
id: string;
|
|
@@ -21250,19 +21250,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
21250
21250
|
} & {
|
|
21251
21251
|
"/repo/commit/:sha": {
|
|
21252
21252
|
$get: {
|
|
21253
|
-
output: string;
|
|
21254
|
-
outputFormat: "text";
|
|
21255
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
21256
|
-
input: {
|
|
21257
|
-
query: {
|
|
21258
|
-
structured?: string | undefined;
|
|
21259
|
-
};
|
|
21260
|
-
} & {
|
|
21261
|
-
param: {
|
|
21262
|
-
sha: string;
|
|
21263
|
-
};
|
|
21264
|
-
};
|
|
21265
|
-
} | {
|
|
21266
21253
|
output: {
|
|
21267
21254
|
error: string;
|
|
21268
21255
|
code?: "invalid_input" | undefined;
|
|
@@ -21326,6 +21313,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
21326
21313
|
sha: string;
|
|
21327
21314
|
};
|
|
21328
21315
|
};
|
|
21316
|
+
} | {
|
|
21317
|
+
output: string;
|
|
21318
|
+
outputFormat: "text";
|
|
21319
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
21320
|
+
input: {
|
|
21321
|
+
query: {
|
|
21322
|
+
structured?: string | undefined;
|
|
21323
|
+
};
|
|
21324
|
+
} & {
|
|
21325
|
+
param: {
|
|
21326
|
+
sha: string;
|
|
21327
|
+
};
|
|
21328
|
+
};
|
|
21329
21329
|
};
|
|
21330
21330
|
};
|
|
21331
21331
|
} & {
|
|
@@ -35793,20 +35793,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
35793
35793
|
} & {
|
|
35794
35794
|
"/runs/:id/handoff": {
|
|
35795
35795
|
$get: {
|
|
35796
|
-
output:
|
|
35797
|
-
|
|
35798
|
-
|
|
35796
|
+
output: {
|
|
35797
|
+
error: string;
|
|
35798
|
+
};
|
|
35799
|
+
outputFormat: "json";
|
|
35800
|
+
status: 404;
|
|
35799
35801
|
input: {
|
|
35800
35802
|
param: {
|
|
35801
35803
|
id: string;
|
|
35802
35804
|
};
|
|
35803
35805
|
};
|
|
35804
35806
|
} | {
|
|
35805
|
-
output:
|
|
35806
|
-
|
|
35807
|
-
|
|
35808
|
-
outputFormat: "json";
|
|
35809
|
-
status: 404;
|
|
35807
|
+
output: string;
|
|
35808
|
+
outputFormat: "text";
|
|
35809
|
+
status: 200;
|
|
35810
35810
|
input: {
|
|
35811
35811
|
param: {
|
|
35812
35812
|
id: string;
|
|
@@ -35844,20 +35844,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
35844
35844
|
} & {
|
|
35845
35845
|
"/runs/:id/diff": {
|
|
35846
35846
|
$get: {
|
|
35847
|
-
output:
|
|
35848
|
-
|
|
35849
|
-
|
|
35847
|
+
output: {
|
|
35848
|
+
error: string;
|
|
35849
|
+
};
|
|
35850
|
+
outputFormat: "json";
|
|
35851
|
+
status: 404 | 409;
|
|
35850
35852
|
input: {
|
|
35851
35853
|
param: {
|
|
35852
35854
|
id: string;
|
|
35853
35855
|
};
|
|
35854
35856
|
};
|
|
35855
35857
|
} | {
|
|
35856
|
-
output:
|
|
35857
|
-
|
|
35858
|
-
|
|
35859
|
-
outputFormat: "json";
|
|
35860
|
-
status: 404 | 409;
|
|
35858
|
+
output: string;
|
|
35859
|
+
outputFormat: "text";
|
|
35860
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
35861
35861
|
input: {
|
|
35862
35862
|
param: {
|
|
35863
35863
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hearsay-tools/squawk",
|
|
3
|
-
"version": "0.18.0-dev.
|
|
3
|
+
"version": "0.18.0-dev.8366",
|
|
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",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@babel/parser": "^8.0.8",
|
|
70
70
|
"@babel/types": "^8.0.8",
|
|
71
|
-
"@open-mercato/cezar-api-client": "0.18.0-dev.
|
|
72
|
-
"@open-mercato/cezar-contract": "0.18.0-dev.
|
|
71
|
+
"@open-mercato/cezar-api-client": "0.18.0-dev.8366",
|
|
72
|
+
"@open-mercato/cezar-contract": "0.18.0-dev.8366",
|
|
73
73
|
"@types/node": "^24.19.1",
|
|
74
74
|
"@types/ws": "^8.18.1",
|
|
75
75
|
"esbuild": "^0.28.1",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "db6cd8a0ff318c59122b6cc3b8bb850b4a8252ec"
|
|
90
90
|
}
|
|
@@ -13,6 +13,8 @@ import { createRequire } from 'node:module';
|
|
|
13
13
|
import { existsSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
14
14
|
import { basename, dirname, join, relative, resolve } from 'node:path';
|
|
15
15
|
import { fileURLToPath } from 'node:url';
|
|
16
|
+
import { parse } from '@babel/parser';
|
|
17
|
+
import { traverse } from '@babel/types';
|
|
16
18
|
import { build } from 'esbuild';
|
|
17
19
|
|
|
18
20
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
@@ -44,7 +46,17 @@ scan(dist);
|
|
|
44
46
|
// specifiers (`from`, `import(...)`, side-effect `import`) to the sibling `dist/plugin/<stem>.js`
|
|
45
47
|
// declaration without touching string-literal type constants; `.js` runtime imports stay on the
|
|
46
48
|
// package specifier and resolve through `installPluginResolveHook()`.
|
|
47
|
-
const
|
|
49
|
+
const PLUGIN_PACKAGE = '@hearsay-tools/squawk/plugin';
|
|
50
|
+
const PLUGIN_SPEC = /^@hearsay-tools\/squawk\/plugin(?:\/(runtime|model-settings|managed-cli|pi-rpc))?$/;
|
|
51
|
+
/** The module specifier literals of a declaration file: `from`, side-effect `import` and `import(...)` types. */
|
|
52
|
+
function declarationSpecifiers(text) {
|
|
53
|
+
const found = [];
|
|
54
|
+
traverse(parse(text, { sourceType: 'module', plugins: [['typescript', { dts: true }]] }), (node) => {
|
|
55
|
+
if ((node.type === 'ImportDeclaration' || node.type === 'ExportNamedDeclaration' || node.type === 'ExportAllDeclaration'
|
|
56
|
+
|| node.type === 'TSImportType' || node.type === 'ImportExpression') && node.source?.type === 'StringLiteral') found.push(node.source);
|
|
57
|
+
});
|
|
58
|
+
return found;
|
|
59
|
+
}
|
|
48
60
|
const pluginDir = join(dist, 'plugin');
|
|
49
61
|
function repointPluginDecls() {
|
|
50
62
|
if (!existsSync(join(pluginDir, 'index.d.ts'))) return 0;
|
|
@@ -56,13 +68,19 @@ function repointPluginDecls() {
|
|
|
56
68
|
if (p !== outdir) walk(p);
|
|
57
69
|
} else if (item.name.endsWith('.d.ts')) {
|
|
58
70
|
const text = readFileSync(p, 'utf8');
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
71
|
+
if (!text.includes(PLUGIN_PACKAGE)) continue;
|
|
72
|
+
const targets = declarationSpecifiers(text).flatMap((literal) => {
|
|
73
|
+
const match = PLUGIN_SPEC.exec(literal.value);
|
|
74
|
+
return match ? [{ literal, sub: match[1] }] : [];
|
|
75
|
+
});
|
|
76
|
+
if (targets.length === 0) continue;
|
|
77
|
+
let next = text;
|
|
78
|
+
// Replace from the end, so the offsets of earlier literals stay valid.
|
|
79
|
+
for (const { literal, sub } of targets.reverse()) {
|
|
62
80
|
let rel = relative(dirname(p), join(pluginDir, `${sub ?? 'index'}.js`)).replaceAll('\\', '/');
|
|
63
81
|
if (!rel.startsWith('.')) rel = `./${rel}`;
|
|
64
|
-
|
|
65
|
-
}
|
|
82
|
+
next = `${next.slice(0, literal.start)}'${rel}'${next.slice(literal.end)}`;
|
|
83
|
+
}
|
|
66
84
|
writeFileSync(p, next, 'utf8');
|
|
67
85
|
count++;
|
|
68
86
|
}
|
|
@@ -97,8 +115,12 @@ const bundled = await build({
|
|
|
97
115
|
// root bundle's unrelated exports (hearsay-tools/cezarion#1813).
|
|
98
116
|
const rootExports = new Set(Object.values(bundled.metafile.outputs).flatMap((output) => output.exports));
|
|
99
117
|
for (const file of referrers.filter((name) => name.endsWith('.js'))) {
|
|
100
|
-
|
|
101
|
-
|
|
118
|
+
const wildcards = [];
|
|
119
|
+
traverse(parse(readFileSync(file, 'utf8'), { sourceType: 'module' }), (node) => {
|
|
120
|
+
if (node.type === 'ExportAllDeclaration' && node.source.value.startsWith('@open-mercato/cezar-contract/')) wildcards.push(node.source.value);
|
|
121
|
+
});
|
|
122
|
+
for (const specifier of wildcards) {
|
|
123
|
+
const source = join(contractRoot, 'src', `${specifier.slice('@open-mercato/cezar-contract/'.length)}.ts`);
|
|
102
124
|
const original = await build({
|
|
103
125
|
entryPoints: [source], bundle: true, write: false, metafile: true,
|
|
104
126
|
format: 'esm', platform: 'neutral', external: ['zod'],
|
|
@@ -106,7 +128,7 @@ for (const file of referrers.filter((name) => name.endsWith('.js'))) {
|
|
|
106
128
|
const missing = Object.values(original.metafile.outputs).flatMap((output) => output.exports)
|
|
107
129
|
.filter((name) => !rootExports.has(name));
|
|
108
130
|
if (missing.length) {
|
|
109
|
-
console.error(`inline-contract: ${relative(dist, file)} wildcard re-export of "${
|
|
131
|
+
console.error(`inline-contract: ${relative(dist, file)} wildcard re-export of "${specifier}" loses root exports: ${missing.join(', ')}`);
|
|
110
132
|
process.exit(1);
|
|
111
133
|
}
|
|
112
134
|
}
|
|
@@ -147,6 +169,7 @@ const gaps = importers.length === 0 ? [] : await build({
|
|
|
147
169
|
if (gaps.length > 0) {
|
|
148
170
|
for (const { text, location } of gaps) {
|
|
149
171
|
const where = location ? `${join(basename(dist), location.file)}:${location.line}` : basename(dist);
|
|
172
|
+
// oxlint-disable-next-line cez/regex-module-syntax -- reads esbuild's error message text, not module source.
|
|
150
173
|
const name = /import "([^"]+)"/i.exec(text)?.[1];
|
|
151
174
|
const subpath = /"contract:([^"]+)"/.exec(text)?.[1];
|
|
152
175
|
console.error(name && subpath
|