@hearsay-tools/squawk 0.18.0-pr3580.6456 → 0.18.0-pr3582.6463
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/contract/events.d.ts +4 -4
- package/dist/contract/health.d.ts +2 -3
- package/dist/contract/index.js +1 -1
- package/dist/contract/workspace.d.ts +1 -1
- package/dist/delegation/transport.d.ts +62 -62
- package/dist/server/activity-routes.d.ts +23 -23
- package/dist/server/forge/github.d.ts +1 -2
- package/dist/server/forge/github.js +3 -4
- package/dist/server/forge/github.js.map +1 -1
- package/dist/server/forge/types.d.ts +2 -2
- package/dist/server/git-changes.d.ts +1 -1
- package/dist/server/run-checkout.js +2 -2
- package/dist/server/run-checkout.js.map +1 -1
- package/dist/server/server.d.ts +58 -58
- package/dist/server/server.js +11 -13
- package/dist/server/server.js.map +1 -1
- package/dist/server/validators.js +1 -1
- package/dist/server-install/types.d.ts +3 -3
- package/dist/server-install/types.js +3 -3
- package/dist/ui-state.d.ts +3 -3
- package/dist/ui-state.js +3 -3
- package/dist/voice/routes.d.ts +19 -19
- package/dist/workspace/ui-state.js +1 -1
- package/dist/workspace/ui-state.js.map +1 -1
- package/package.json +4 -4
package/dist/server/server.d.ts
CHANGED
|
@@ -4894,6 +4894,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4894
4894
|
} & {
|
|
4895
4895
|
"/repo/commit/:sha": {
|
|
4896
4896
|
$get: {
|
|
4897
|
+
output: string;
|
|
4898
|
+
outputFormat: "text";
|
|
4899
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4900
|
+
input: {
|
|
4901
|
+
query: {
|
|
4902
|
+
structured?: string | undefined;
|
|
4903
|
+
};
|
|
4904
|
+
} & {
|
|
4905
|
+
param: {
|
|
4906
|
+
sha: string;
|
|
4907
|
+
};
|
|
4908
|
+
};
|
|
4909
|
+
} | {
|
|
4897
4910
|
output: {
|
|
4898
4911
|
error: string;
|
|
4899
4912
|
code?: "invalid_input" | undefined;
|
|
@@ -4957,19 +4970,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4957
4970
|
sha: string;
|
|
4958
4971
|
};
|
|
4959
4972
|
};
|
|
4960
|
-
} | {
|
|
4961
|
-
output: string;
|
|
4962
|
-
outputFormat: "text";
|
|
4963
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4964
|
-
input: {
|
|
4965
|
-
query: {
|
|
4966
|
-
structured?: string | undefined;
|
|
4967
|
-
};
|
|
4968
|
-
} & {
|
|
4969
|
-
param: {
|
|
4970
|
-
sha: string;
|
|
4971
|
-
};
|
|
4972
|
-
};
|
|
4973
4973
|
};
|
|
4974
4974
|
};
|
|
4975
4975
|
} & {
|
|
@@ -18307,20 +18307,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
18307
18307
|
} & {
|
|
18308
18308
|
"/runs/:id/handoff": {
|
|
18309
18309
|
$get: {
|
|
18310
|
-
output:
|
|
18311
|
-
|
|
18312
|
-
|
|
18313
|
-
outputFormat: "json";
|
|
18314
|
-
status: 404;
|
|
18310
|
+
output: string;
|
|
18311
|
+
outputFormat: "text";
|
|
18312
|
+
status: 200;
|
|
18315
18313
|
input: {
|
|
18316
18314
|
param: {
|
|
18317
18315
|
id: string;
|
|
18318
18316
|
};
|
|
18319
18317
|
};
|
|
18320
18318
|
} | {
|
|
18321
|
-
output:
|
|
18322
|
-
|
|
18323
|
-
|
|
18319
|
+
output: {
|
|
18320
|
+
error: string;
|
|
18321
|
+
};
|
|
18322
|
+
outputFormat: "json";
|
|
18323
|
+
status: 404;
|
|
18324
18324
|
input: {
|
|
18325
18325
|
param: {
|
|
18326
18326
|
id: string;
|
|
@@ -18358,20 +18358,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
18358
18358
|
} & {
|
|
18359
18359
|
"/runs/:id/diff": {
|
|
18360
18360
|
$get: {
|
|
18361
|
-
output:
|
|
18362
|
-
|
|
18363
|
-
|
|
18364
|
-
outputFormat: "json";
|
|
18365
|
-
status: 404 | 409;
|
|
18361
|
+
output: string;
|
|
18362
|
+
outputFormat: "text";
|
|
18363
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
18366
18364
|
input: {
|
|
18367
18365
|
param: {
|
|
18368
18366
|
id: string;
|
|
18369
18367
|
};
|
|
18370
18368
|
};
|
|
18371
18369
|
} | {
|
|
18372
|
-
output:
|
|
18373
|
-
|
|
18374
|
-
|
|
18370
|
+
output: {
|
|
18371
|
+
error: string;
|
|
18372
|
+
};
|
|
18373
|
+
outputFormat: "json";
|
|
18374
|
+
status: 404 | 409;
|
|
18375
18375
|
input: {
|
|
18376
18376
|
param: {
|
|
18377
18377
|
id: string;
|
|
@@ -20772,6 +20772,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
20772
20772
|
} & {
|
|
20773
20773
|
"/repo/commit/:sha": {
|
|
20774
20774
|
$get: {
|
|
20775
|
+
output: string;
|
|
20776
|
+
outputFormat: "text";
|
|
20777
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
20778
|
+
input: {
|
|
20779
|
+
query: {
|
|
20780
|
+
structured?: string | undefined;
|
|
20781
|
+
};
|
|
20782
|
+
} & {
|
|
20783
|
+
param: {
|
|
20784
|
+
sha: string;
|
|
20785
|
+
};
|
|
20786
|
+
};
|
|
20787
|
+
} | {
|
|
20775
20788
|
output: {
|
|
20776
20789
|
error: string;
|
|
20777
20790
|
code?: "invalid_input" | undefined;
|
|
@@ -20835,19 +20848,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
20835
20848
|
sha: string;
|
|
20836
20849
|
};
|
|
20837
20850
|
};
|
|
20838
|
-
} | {
|
|
20839
|
-
output: string;
|
|
20840
|
-
outputFormat: "text";
|
|
20841
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
20842
|
-
input: {
|
|
20843
|
-
query: {
|
|
20844
|
-
structured?: string | undefined;
|
|
20845
|
-
};
|
|
20846
|
-
} & {
|
|
20847
|
-
param: {
|
|
20848
|
-
sha: string;
|
|
20849
|
-
};
|
|
20850
|
-
};
|
|
20851
20851
|
};
|
|
20852
20852
|
};
|
|
20853
20853
|
} & {
|
|
@@ -34185,20 +34185,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
34185
34185
|
} & {
|
|
34186
34186
|
"/runs/:id/handoff": {
|
|
34187
34187
|
$get: {
|
|
34188
|
-
output:
|
|
34189
|
-
|
|
34190
|
-
|
|
34191
|
-
outputFormat: "json";
|
|
34192
|
-
status: 404;
|
|
34188
|
+
output: string;
|
|
34189
|
+
outputFormat: "text";
|
|
34190
|
+
status: 200;
|
|
34193
34191
|
input: {
|
|
34194
34192
|
param: {
|
|
34195
34193
|
id: string;
|
|
34196
34194
|
};
|
|
34197
34195
|
};
|
|
34198
34196
|
} | {
|
|
34199
|
-
output:
|
|
34200
|
-
|
|
34201
|
-
|
|
34197
|
+
output: {
|
|
34198
|
+
error: string;
|
|
34199
|
+
};
|
|
34200
|
+
outputFormat: "json";
|
|
34201
|
+
status: 404;
|
|
34202
34202
|
input: {
|
|
34203
34203
|
param: {
|
|
34204
34204
|
id: string;
|
|
@@ -34236,20 +34236,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
34236
34236
|
} & {
|
|
34237
34237
|
"/runs/:id/diff": {
|
|
34238
34238
|
$get: {
|
|
34239
|
-
output:
|
|
34240
|
-
|
|
34241
|
-
|
|
34242
|
-
outputFormat: "json";
|
|
34243
|
-
status: 404 | 409;
|
|
34239
|
+
output: string;
|
|
34240
|
+
outputFormat: "text";
|
|
34241
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
34244
34242
|
input: {
|
|
34245
34243
|
param: {
|
|
34246
34244
|
id: string;
|
|
34247
34245
|
};
|
|
34248
34246
|
};
|
|
34249
34247
|
} | {
|
|
34250
|
-
output:
|
|
34251
|
-
|
|
34252
|
-
|
|
34248
|
+
output: {
|
|
34249
|
+
error: string;
|
|
34250
|
+
};
|
|
34251
|
+
outputFormat: "json";
|
|
34252
|
+
status: 404 | 409;
|
|
34253
34253
|
input: {
|
|
34254
34254
|
param: {
|
|
34255
34255
|
id: string;
|
package/dist/server/server.js
CHANGED
|
@@ -309,7 +309,7 @@ function negotiate(accept, offers) {
|
|
|
309
309
|
return best?.offer ?? null;
|
|
310
310
|
}
|
|
311
311
|
/** What `GET /repo/commit/:sha` offers, DEFAULT FIRST: the legacy `text/plain` blob is what a
|
|
312
|
-
* request with no opinion has always received
|
|
312
|
+
* request with no opinion has always received, so it also wins an Accept tie. */
|
|
313
313
|
const COMMIT_FORMATS = ['text/plain', 'application/json'];
|
|
314
314
|
/** What `GET /runs/:id/files` offers, DEFAULT FIRST. `image/*` rather than a concrete type: which
|
|
315
315
|
* image type the bytes are is only known once the path resolves, and the raw branch refuses
|
|
@@ -699,8 +699,7 @@ export function createApp(deps) {
|
|
|
699
699
|
healthConfig(bootRoot, deps.home),
|
|
700
700
|
workspaceSummary(),
|
|
701
701
|
]);
|
|
702
|
-
//
|
|
703
|
-
// externally-depended-on JSON in the app (BACKWARD_COMPATIBILITY.md).
|
|
702
|
+
// Callers outside the cockpit read this JSON.
|
|
704
703
|
const forge = resolveProjectForge(repo);
|
|
705
704
|
const caps = capabilities();
|
|
706
705
|
return {
|
|
@@ -712,8 +711,8 @@ export function createApp(deps) {
|
|
|
712
711
|
...(update?.latest !== undefined ? { latestVersion: update.latest } : {}),
|
|
713
712
|
// Health is CORS-open and, in hosted mode, reachable off the loopback —
|
|
714
713
|
// so any site/host that reads it would learn the developer's absolute
|
|
715
|
-
// checkout path and username (#431). Local mode keeps the full path
|
|
716
|
-
//
|
|
714
|
+
// checkout path and username (#431). Local mode keeps the full path;
|
|
715
|
+
// hosted/remote mode trims it to a basename.
|
|
717
716
|
// The field is always present and a string, but under CEZ_REMOTE it is
|
|
718
717
|
// no longer an absolute path. A hosted cockpit's paths are on a machine
|
|
719
718
|
// the reader does not have anyway.
|
|
@@ -752,8 +751,7 @@ export function createApp(deps) {
|
|
|
752
751
|
// the same number — but the normal state of a background `hsq serve` is NO
|
|
753
752
|
// subscriber, and then nothing refreshes the cache at all: the next `GET
|
|
754
753
|
// /api/health`, an hour later, would answer with the boot pre-warm's payload
|
|
755
|
-
// and only the request AFTER it would see the truth.
|
|
756
|
-
// bookmarklet contract (BACKWARD_COMPATIBILITY.md) and `repo.branch` going stale is
|
|
754
|
+
// and only the request AFTER it would see the truth. `repo.branch` going stale there is
|
|
757
755
|
// literally #369, so past this age correctness beats the latency win and the
|
|
758
756
|
// read waits for the compute. `refreshHealth` dedupes, so waiting costs one.
|
|
759
757
|
const HEALTH_MAX_STALE_MS = 60_000;
|
|
@@ -2301,7 +2299,7 @@ export function createApp(deps) {
|
|
|
2301
2299
|
.use('/ui-state', bodyLimit({ maxSize: UI_STATE_BODY_LIMIT }))
|
|
2302
2300
|
.put('/ui-state', jsonZodValidator(uiStateBody), async (c) => {
|
|
2303
2301
|
const { root: repoRoot, dataDir } = c.get('project');
|
|
2304
|
-
// `.passthrough()` keeps unknown prefs
|
|
2302
|
+
// `.passthrough()` keeps unknown prefs, but a
|
|
2305
2303
|
// single request may not stuff an unbounded key set (#429) — the shared
|
|
2306
2304
|
// schema+cap half of both ui-state routes lives in `uiStateBody`.
|
|
2307
2305
|
const parsed = { data: c.req.valid('json') };
|
|
@@ -3379,8 +3377,8 @@ export function createApp(deps) {
|
|
|
3379
3377
|
if (wantsRaw) {
|
|
3380
3378
|
const mime = imageMimeType(result.path);
|
|
3381
3379
|
if (mime === null || result.tooLarge) {
|
|
3382
|
-
// `?raw=1` ASKED for bytes, so it hears why it cannot have them
|
|
3383
|
-
//
|
|
3380
|
+
// `?raw=1` ASKED for bytes, so it hears why it cannot have them (a 409 with the
|
|
3381
|
+
// reason). An `Accept` is only a preference, so a
|
|
3384
3382
|
// resource with no image representation falls THROUGH to the JSON answer below rather
|
|
3385
3383
|
// than turning a browser's navigation to a text file into an error.
|
|
3386
3384
|
if (query.raw !== undefined) {
|
|
@@ -4007,8 +4005,8 @@ export function createApp(deps) {
|
|
|
4007
4005
|
// One commit's message + stat + patch — the Repo view expands it inline.
|
|
4008
4006
|
// `?structured=1` is the ADDITIVE sibling (R5 Step 1.7): the new repo view's commit-diff
|
|
4009
4007
|
// shape `{sha, subject, author, when, files, stat}` with 409 + reason on failure. The
|
|
4010
|
-
// legacy text answer below is
|
|
4011
|
-
//
|
|
4008
|
+
// legacy text answer below is what the route returns without the flag, in-band failure
|
|
4009
|
+
// sentences included.
|
|
4012
4010
|
//
|
|
4013
4011
|
// `Accept: application/json` reaches the same structured answer without the flag, and
|
|
4014
4012
|
// `Accept: text/plain` asks for the blob; the flag still wins whenever it is present, and a
|
|
@@ -4206,7 +4204,7 @@ export function createApp(deps) {
|
|
|
4206
4204
|
// ---- assemble the chained families --------------------------------------
|
|
4207
4205
|
// Every chained family is registered ONCE and mounted into the versioned table. There is no
|
|
4208
4206
|
// second, unversioned spelling: `/api/*` was removed once the whole API was reachable under
|
|
4209
|
-
// `/api/v1
|
|
4207
|
+
// `/api/v1`. One surface means one thing to keep working, and
|
|
4210
4208
|
// it is the one the typed client describes.
|
|
4211
4209
|
//
|
|
4212
4210
|
// ---- chained family: voice mode (project-scoped, gated on CEZ_VOICE) ----
|