@hearsay-tools/squawk 0.18.0-dev.6454 → 0.18.0-dev.6468
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/README.md +3 -3
- 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/home/identity.d.ts +0 -2
- package/dist/home/identity.js +2 -2
- package/dist/home/identity.js.map +1 -1
- package/dist/server/forge/github-merge-state.d.ts +1 -1
- package/dist/server/forge/github-merge-state.js +4 -9
- package/dist/server/forge/github-merge-state.js.map +1 -1
- 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.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.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) ----
|