@hearsay-tools/squawk 0.19.0-pr4457.8764 → 0.19.0-pr4459.8761
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/boot.js +0 -2
- package/dist/boot.js.map +1 -1
- package/dist/contract/automation-requests.d.ts +0 -4
- package/dist/core/http-route-registry.d.ts +5 -28
- package/dist/core/http-route-registry.js +9 -37
- package/dist/core/http-route-registry.js.map +1 -1
- package/dist/plugin/api.js +1 -3
- package/dist/plugin/api.js.map +1 -1
- package/dist/plugin/index.d.ts +1 -1
- package/dist/plugin/index.js.map +1 -1
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/models-routes.d.ts +12 -12
- package/dist/server/plugin-http-routes.d.ts +4 -29
- package/dist/server/plugin-http-routes.js +13 -100
- package/dist/server/plugin-http-routes.js.map +1 -1
- package/dist/server/providers-routes.d.ts +53 -53
- package/dist/server/repo-routes.d.ts +34 -34
- package/dist/server/runner-install-routes.d.ts +10 -10
- package/dist/server/runs-routes.d.ts +16 -16
- package/dist/server/server.d.ts +5008 -2208
- package/dist/server/server.js +59 -39
- package/dist/server/server.js.map +1 -1
- package/dist/server/workspace-routes.d.ts +84 -84
- package/dist/server/ws.d.ts +0 -6
- package/dist/server/ws.js +0 -41
- package/dist/server/ws.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/{accounts-section-DhS7blSK.js → accounts-section-BRthKtVK.js} +1 -1
- package/web/dist/assets/activity-motion-C_ODf6AY.js +1 -0
- package/web/dist/assets/{activity-route-D2sff_BA.js → activity-route-BMThkdA-.js} +1 -1
- package/web/dist/assets/{agent-config-section-C7SMwOgZ.js → agent-config-section-CC374GHJ.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-CvMgsSLY.js → agent-defaults-section-CE_jEFmE.js} +1 -1
- package/web/dist/assets/{appearance-44RH8bum.js → appearance-uzhjs9G6.js} +1 -1
- package/web/dist/assets/{automations-route-CygHw9Ni.js → automations-route-CkjpG-6x.js} +1 -1
- package/web/dist/assets/{commit-list-Djmz3j1l.js → commit-list-C0aJTXGV.js} +1 -1
- package/web/dist/assets/{diff-ByLut7n4.js → diff-BTSrVfcp.js} +2 -2
- package/web/dist/assets/{diff-controls-BEVRwCau.js → diff-controls-DECobhpB.js} +1 -1
- package/web/dist/assets/{diff-view-kvjafBI7.js → diff-view-D2CtfY9Y.js} +1 -1
- package/web/dist/assets/{file-preview-Ce0Jsxbm.js → file-preview-005mWv3M.js} +1 -1
- package/web/dist/assets/{git-toolbar-Cn1ASnMZ.js → git-toolbar-D7iIXANd.js} +1 -1
- package/web/dist/assets/{github-CxYmUkO9.js → github-Cxgny5E1.js} +1 -1
- package/web/dist/assets/{global-activity-route-ALFcEqug.js → global-activity-route-CEVXYZxL.js} +2 -2
- package/web/dist/assets/{index-BZr8Y74X.js → index-BdRVx4Ho.js} +4 -4
- package/web/dist/assets/index-aA9iNX4o.css +1 -0
- package/web/dist/assets/{markdown-BRNtAZkY.js → markdown-D7K7DSN4.js} +1 -1
- package/web/dist/assets/{notifications-section-C_IsaiyD.js → notifications-section-B9g1rjk4.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-DzajVDzR.js → preview-pane-connected-q0zJGSAP.js} +1 -1
- package/web/dist/assets/{projects-section-Cme2qWcF.js → projects-section-D56BbUfv.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-DVr3aKc-.js → prompt-templates-section-DjmDT6Q7.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-BFeWL9QB.js → remote-settings-notice-BIFsykaZ.js} +1 -1
- package/web/dist/assets/{repo-git-C3YNr0yL.js → repo-git-psji7yEp.js} +1 -1
- package/web/dist/assets/{report-reader-Bm0J3ujk.js → report-reader-dVMLFQ9I.js} +1 -1
- package/web/dist/assets/{reports-CNL2zChD.js → reports-BRv27Z6_.js} +1 -1
- package/web/dist/assets/{resources-section-BymE7-3T.js → resources-section-Bnv4-iwP.js} +1 -1
- package/web/dist/assets/{review-panel-3oSwii0J.js → review-panel-CoyWXGKt.js} +1 -1
- package/web/dist/assets/{run-header-CI49Lba9.js → run-header-BuAw9BuD.js} +1 -1
- package/web/dist/assets/{select-DEqrvCmQ.js → select-D5VcjSPR.js} +1 -1
- package/web/dist/assets/{session-context-section-oK9zU15I.js → session-context-section-D7WppeJb.js} +1 -1
- package/web/dist/assets/{settings-agent-picker-BqRDs5nQ.js → settings-agent-picker-DF56tO6z.js} +1 -1
- package/web/dist/assets/{settings-shell-11SRBczO.js → settings-shell-B46iQLhB.js} +1 -1
- package/web/dist/assets/{sidebar-section-DujeUKJ0.js → sidebar-section-COP2SSZy.js} +1 -1
- package/web/dist/assets/{skills-B6vquPg1.js → skills-DcHx24O9.js} +1 -1
- package/web/dist/assets/{task-changes-t473lMAF.js → task-changes-DOP-3YTU.js} +1 -1
- package/web/dist/assets/{task-commits-CuXxfPY6.js → task-commits-DMhWvctX.js} +1 -1
- package/web/dist/assets/{task-file-scope-DK1biohR.js → task-file-scope-DUstN4SN.js} +1 -1
- package/web/dist/assets/{task-files-C0zhDxod.js → task-files-CJhnvhF0.js} +1 -1
- package/web/dist/assets/{task-github-item-CFU1Rbv0.js → task-github-item-B3oybcjH.js} +1 -1
- package/web/dist/assets/{task-thread-1BQ5lWbM.js → task-thread-nQcsCFTn.js} +1 -1
- package/web/dist/assets/{thread-state-BHI3Jijs.js → thread-state-CnUg3bE-.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-BHAhGcZe.js → use-hand-to-agent-state-DskHUftg.js} +1 -1
- package/web/dist/assets/{workflows-FH3RBKvk.css → workflows-BpuZNAc8.css} +1 -1
- package/web/dist/assets/workflows-BxbqRepu.js +7 -0
- package/web/dist/assets/{workspace-tools-CsrBXG_p.js → workspace-tools-Db1f774f.js} +1 -1
- package/web/dist/assets/{worktrees-section-DvFx6o_A.js → worktrees-section-JsXamoCq.js} +1 -1
- package/web/dist/index.html +2 -2
- package/dist/built-in-http-routes.d.ts +0 -10
- package/dist/built-in-http-routes.js +0 -41
- package/dist/built-in-http-routes.js.map +0 -1
- package/web/dist/assets/activity-motion-aJkLHTxc.js +0 -1
- package/web/dist/assets/index-D9L-uSh4.css +0 -1
- package/web/dist/assets/workflows-BMlXKiaH.js +0 -7
package/dist/boot.js
CHANGED
|
@@ -49,7 +49,6 @@ async function sealRuntime({ pluginsDir, bundledRunnersDir, bundledFeaturesDir,
|
|
|
49
49
|
registerBuiltInCliCommands();
|
|
50
50
|
const { registerBuiltInRunSlots, sealBuiltInRunSlots } = await import('./built-in-run-slots.js');
|
|
51
51
|
const { registerBuiltInLaunchParts, sealBuiltInLaunchParts } = await import('./built-in-launch-parts.js');
|
|
52
|
-
const { registerBuiltInHttpRoutes } = await import('./built-in-http-routes.js');
|
|
53
52
|
const { registerBuiltInStepKinds, sealBuiltInStepKinds } = await import('./workflows/step-kind-registry.js');
|
|
54
53
|
const { registerBuiltInTools, sealBuiltInTools } = await import('./built-in-tools.js');
|
|
55
54
|
const { registerBuiltInWaitKinds, sealBuiltInWaitKinds } = await import('./built-in-wait-kinds.js');
|
|
@@ -59,7 +58,6 @@ async function sealRuntime({ pluginsDir, bundledRunnersDir, bundledFeaturesDir,
|
|
|
59
58
|
const loader = await import('./plugin/loader.js');
|
|
60
59
|
registerBuiltInRunSlots();
|
|
61
60
|
registerBuiltInLaunchParts();
|
|
62
|
-
registerBuiltInHttpRoutes();
|
|
63
61
|
registerBuiltInStepKinds();
|
|
64
62
|
registerBuiltInTools();
|
|
65
63
|
registerBuiltInWaitKinds();
|
package/dist/boot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot.js","sourceRoot":"","sources":["../src/boot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAGpE;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AwB,EAAE,CAAC;IAC3B,MAAM,CAAC,kBAAkB,KAAK,iBAAiB,KAAK,SAAS;QAC3D,CAAC,CAAC,MAAM,CAAC,kBAAkB,EAAE;QAC7B,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACxE,MAAM,CAAC,mBAAmB,KAAK,MAAM,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC/E,IAAI,UAAU,KAAK,SAAS,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACnD,iBAAiB,GAAG,IAAI,CAAC;QACzB,MAAM,MAAM,CAAC,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,UAAU,EAAE,EAAE,CAAC;IACrB,sBAAsB,EAAE,CAAC;IACzB,cAAc,EAAE,CAAC;IACjB,WAAW,EAAE,CAAC;IACd,mBAAmB,EAAE,CAAC;IACtB,sBAAsB,EAAE,CAAC;IACzB,oBAAoB,EAAE,CAAC;IACvB,gBAAgB,EAAE,CAAC;IACnB,oBAAoB,EAAE,CAAC;IACvB,yBAAyB,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -164,7 +164,6 @@ export declare const automationCreateSchema: z.ZodObject<{
|
|
|
164
164
|
}, z.core.$strict>;
|
|
165
165
|
enable: z.ZodOptional<z.ZodBoolean>;
|
|
166
166
|
}, z.core.$strict>;
|
|
167
|
-
export type AutomationCreateRequest = z.input<typeof automationCreateSchema>;
|
|
168
167
|
export declare const automationUpdateSchema: z.ZodObject<{
|
|
169
168
|
name: z.ZodString;
|
|
170
169
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -245,14 +244,12 @@ export declare const automationUpdateSchema: z.ZodObject<{
|
|
|
245
244
|
}, z.core.$strict>;
|
|
246
245
|
expectedRevision: z.ZodNumber;
|
|
247
246
|
}, z.core.$strict>;
|
|
248
|
-
export type AutomationUpdateRequest = z.input<typeof automationUpdateSchema>;
|
|
249
247
|
export declare const automationCheckRequestSchema: z.ZodObject<{
|
|
250
248
|
mode: z.ZodEnum<{
|
|
251
249
|
execute: "execute";
|
|
252
250
|
preview: "preview";
|
|
253
251
|
}>;
|
|
254
252
|
}, z.core.$strict>;
|
|
255
|
-
export type AutomationCheckRequest = z.input<typeof automationCheckRequestSchema>;
|
|
256
253
|
export declare const automationLogQuerySchema: z.ZodObject<{
|
|
257
254
|
automationId: z.ZodOptional<z.ZodString>;
|
|
258
255
|
result: z.ZodOptional<z.ZodEnum<{
|
|
@@ -279,4 +276,3 @@ export declare const automationLogQuerySchema: z.ZodObject<{
|
|
|
279
276
|
cursor: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
280
277
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
281
278
|
}, z.core.$strip>;
|
|
282
|
-
export type AutomationLogQuery = z.output<typeof automationLogQuerySchema>;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Non-RPC HTTP route registry for bundled features and plugins (hearsay-tools/squawk#4402).
|
|
3
|
+
* Follows the register → seal → read lifecycle of `core/registry.ts`. Routes mounted here sit
|
|
4
|
+
* outside `AppType` RPC inference, behind the global `/api/*` request-origin guard and before the
|
|
5
|
+
* SPA catch-all.
|
|
6
6
|
*/
|
|
7
|
-
import type { Hono } from 'hono';
|
|
8
7
|
import type { Home } from '../home/home.ts';
|
|
9
8
|
export declare const HTTP_ROUTE_METHODS: readonly ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'ALL'];
|
|
10
9
|
export type HttpRouteMethod = typeof HTTP_ROUTE_METHODS[number];
|
|
11
|
-
export declare const HTTP_ROUTE_SCOPES: readonly ['project', 'workspace'];
|
|
12
|
-
export type HttpRouteScope = typeof HTTP_ROUTE_SCOPES[number];
|
|
13
10
|
export interface HttpRouteContext {
|
|
14
11
|
readonly home: Home;
|
|
15
12
|
readonly version: string;
|
|
@@ -18,15 +15,7 @@ export interface HttpRouteContext {
|
|
|
18
15
|
/** Invoke the cockpit HTTP app in-process (synthetic loopback Host, no Origin). */
|
|
19
16
|
fetchApp(request: Request): Promise<Response>;
|
|
20
17
|
}
|
|
21
|
-
export interface
|
|
22
|
-
/**
|
|
23
|
-
* Opaque per-app bridge for server-scoped route bundles until server lifecycle hooks
|
|
24
|
-
* (`hearsay-tools/squawk#4442`) replace it with `ServerPluginContext`.
|
|
25
|
-
*/
|
|
26
|
-
readonly appBridge?: unknown;
|
|
27
|
-
}
|
|
28
|
-
export interface HttpHandlerRouteDefinition {
|
|
29
|
-
readonly kind?: 'handler' | undefined;
|
|
18
|
+
export interface HttpRouteDefinition {
|
|
30
19
|
readonly id: string;
|
|
31
20
|
readonly method: HttpRouteMethod;
|
|
32
21
|
/** Must start with `/api/v1/`. */
|
|
@@ -38,18 +27,6 @@ export interface HttpHandlerRouteDefinition {
|
|
|
38
27
|
readonly managesBodyLimit?: boolean | undefined;
|
|
39
28
|
handle(request: Request, context: HttpRouteContext): Response | Promise<Response>;
|
|
40
29
|
}
|
|
41
|
-
export interface HttpBundleRouteDefinition {
|
|
42
|
-
readonly kind: 'bundle';
|
|
43
|
-
readonly id: string;
|
|
44
|
-
readonly scope: HttpRouteScope;
|
|
45
|
-
/**
|
|
46
|
-
* Build the Hono sub-app mounted under `/api/v1/p/:projectId` and `/api/v1` (when `scope` is
|
|
47
|
-
* `'project'`) or under `/api/v1` only (when `scope` is `'workspace'`).
|
|
48
|
-
*/
|
|
49
|
-
createRoutes(context: HttpRouteBundleContext): Hono<any, any, any>;
|
|
50
|
-
}
|
|
51
|
-
export type HttpRouteDefinition = HttpHandlerRouteDefinition | HttpBundleRouteDefinition;
|
|
52
|
-
export declare function isHttpBundleRoute(route: HttpRouteDefinition): route is HttpBundleRouteDefinition;
|
|
53
30
|
/** Throws what `registerHttpRoute` would throw, without writing. */
|
|
54
31
|
export declare function checkHttpRouteRegistration(route: HttpRouteDefinition): void;
|
|
55
32
|
export declare function registerHttpRoute(route: HttpRouteDefinition): void;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { createKeyedRegistry } from './registry.js';
|
|
2
2
|
export const HTTP_ROUTE_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'ALL'];
|
|
3
|
-
export const HTTP_ROUTE_SCOPES = ['project', 'workspace'];
|
|
4
|
-
export function isHttpBundleRoute(route) {
|
|
5
|
-
return route.kind === 'bundle';
|
|
6
|
-
}
|
|
7
3
|
const API_V1_PREFIX = '/api/v1/';
|
|
8
4
|
const routes = createKeyedRegistry({
|
|
9
5
|
name: 'HTTP routes',
|
|
10
6
|
bootHint: 'register every HTTP route, then call sealHttpRoutes() at the runtime boot boundary (boot.ts), or import a testkit that seals it.',
|
|
11
7
|
});
|
|
12
8
|
const claimedPaths = new Map();
|
|
13
|
-
function
|
|
9
|
+
function checkShape(route) {
|
|
10
|
+
if (typeof route !== 'object' || route === null)
|
|
11
|
+
throw new Error('HTTP routes: a route definition must be an object.');
|
|
12
|
+
if (typeof route.id !== 'string' || route.id.length === 0)
|
|
13
|
+
throw new Error(`HTTP routes: invalid id ${JSON.stringify(route.id)}.`);
|
|
14
14
|
if (!HTTP_ROUTE_METHODS.includes(route.method)) {
|
|
15
15
|
throw new Error(`HTTP routes: '${route.id}' has unsupported method ${JSON.stringify(route.method)}.`);
|
|
16
16
|
}
|
|
@@ -23,47 +23,19 @@ function checkHandlerShape(route) {
|
|
|
23
23
|
if (typeof route.handle !== 'function')
|
|
24
24
|
throw new Error(`HTTP routes: '${route.id}' needs a handle function.`);
|
|
25
25
|
}
|
|
26
|
-
function checkBundleShape(route) {
|
|
27
|
-
if (!HTTP_ROUTE_SCOPES.includes(route.scope)) {
|
|
28
|
-
throw new Error(`HTTP routes: '${route.id}' has unsupported scope ${JSON.stringify(route.scope)}.`);
|
|
29
|
-
}
|
|
30
|
-
if (typeof route.createRoutes !== 'function') {
|
|
31
|
-
throw new Error(`HTTP routes: '${route.id}' needs a createRoutes function.`);
|
|
32
|
-
}
|
|
33
|
-
if (route.createRoutes.constructor?.name === 'AsyncFunction') {
|
|
34
|
-
throw new Error(`HTTP routes: '${route.id}' createRoutes must be synchronous.`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
function checkShape(route) {
|
|
38
|
-
if (typeof route !== 'object' || route === null)
|
|
39
|
-
throw new Error('HTTP routes: a route definition must be an object.');
|
|
40
|
-
if (typeof route.id !== 'string' || route.id.length === 0)
|
|
41
|
-
throw new Error(`HTTP routes: invalid id ${JSON.stringify(route.id)}.`);
|
|
42
|
-
if (route.kind === 'bundle') {
|
|
43
|
-
checkBundleShape(route);
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
if (route.kind !== undefined && route.kind !== 'handler') {
|
|
47
|
-
throw new Error(`HTTP routes: '${route.id}' has unsupported kind ${JSON.stringify(route.kind)}.`);
|
|
48
|
-
}
|
|
49
|
-
checkHandlerShape(route);
|
|
50
|
-
}
|
|
51
26
|
/** Throws what `registerHttpRoute` would throw, without writing. */
|
|
52
27
|
export function checkHttpRouteRegistration(route) {
|
|
53
28
|
checkShape(route);
|
|
54
29
|
routes.check(route.id, route);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
throw new Error(`HTTP routes: path '${route.path}' is already registered by '${owner.id}'.`);
|
|
59
|
-
}
|
|
30
|
+
const owner = claimedPaths.get(route.path);
|
|
31
|
+
if (owner !== undefined && owner !== route) {
|
|
32
|
+
throw new Error(`HTTP routes: path '${route.path}' is already registered by '${owner.id}'.`);
|
|
60
33
|
}
|
|
61
34
|
}
|
|
62
35
|
export function registerHttpRoute(route) {
|
|
63
36
|
checkHttpRouteRegistration(route);
|
|
64
37
|
routes.register(route.id, route);
|
|
65
|
-
|
|
66
|
-
claimedPaths.set(route.path, route);
|
|
38
|
+
claimedPaths.set(route.path, route);
|
|
67
39
|
}
|
|
68
40
|
export function sealHttpRoutes() { routes.seal(); }
|
|
69
41
|
/** Whether the registry is sealed. Never throws. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-route-registry.js","sourceRoot":"","sources":["../../src/core/http-route-registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"http-route-registry.js","sourceRoot":"","sources":["../../src/core/http-route-registry.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAC;AAyB5F,MAAM,aAAa,GAAG,UAAU,CAAC;AAEjC,MAAM,MAAM,GAAG,mBAAmB,CAA8B;IAC9D,IAAI,EAAE,aAAa;IACnB,QAAQ,EAAE,kIAAkI;CAC7I,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,IAAI,GAAG,EAA+B,CAAC;AAE5D,SAAS,UAAU,CAAC,KAA0B;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACvH,IAAI,OAAO,KAAK,CAAC,EAAE,KAAK,QAAQ,IAAI,KAAK,CAAC,EAAE,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACnI,IAAI,CAAE,kBAAwC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QACtE,MAAM,IAAI,KAAK,CAAC,iBAAiB,KAAK,CAAC,EAAE,4BAA4B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAA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CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IACjC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,cAAc,KAAW,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAEzD,oDAAoD;AACpD,MAAM,UAAU,gBAAgB,KAAc,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAEzE,gFAAgF;AAChF,MAAM,UAAU,oBAAoB;IAClC,OAAO,MAAM,CAAC,MAAM,EAAE,CAAC;AACzB,CAAC"}
|
package/dist/plugin/api.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { checkAgentToolRegistration, registerAgentTool } from '../ci-wait/tool-registry.js';
|
|
8
8
|
import { checkCliCommandRegistration, registerCliCommand } from '../core/cli-registry.js';
|
|
9
|
-
import { checkHttpRouteRegistration,
|
|
9
|
+
import { checkHttpRouteRegistration, registerHttpRoute } from '../core/http-route-registry.js';
|
|
10
10
|
import { checkLaunchPartRegistration, registerLaunchPart } from '../core/launch-registry.js';
|
|
11
11
|
import { checkRunnerRegistration, registerRunner } from '../core/runner-registry.js';
|
|
12
12
|
import { checkRunLifecycleListenerRegistration, registerRunLifecycleListener } from '../runs/lifecycle-registry.js';
|
|
@@ -77,8 +77,6 @@ function checkSlots(slots) {
|
|
|
77
77
|
function checkStagedHttpPaths(routes) {
|
|
78
78
|
const owners = new Map();
|
|
79
79
|
for (const route of routes) {
|
|
80
|
-
if (isHttpBundleRoute(route))
|
|
81
|
-
continue;
|
|
82
80
|
const owner = owners.get(route.path);
|
|
83
81
|
if (owner && owner !== route)
|
|
84
82
|
throw new Error(`HTTP routes: the plugin registers path '${route.path}' twice.`);
|
package/dist/plugin/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/plugin/api.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B,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
|
package/dist/plugin/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type { AgentToolDefinition, AgentToolResult } from '../ci-wait/tool-regis
|
|
|
8
8
|
export type { WaitKindRow, WaitKindRegistration, WaitLifecycle, WaitInputDescriptor } from '../workflows/run/wait-kind-registry.ts';
|
|
9
9
|
export type { StepKindDefinition, StepKindContext, StepKindOutcome } from '../workflows/step-kind-registry.ts';
|
|
10
10
|
export type { CliCommandDefinition, RootCommandContext, SubcommandRunner } from '../core/cli-registry.ts';
|
|
11
|
-
export type {
|
|
11
|
+
export type { HttpRouteContext, HttpRouteDefinition, HttpRouteMethod } from '../core/http-route-registry.ts';
|
|
12
12
|
export type { RunSlots, DeletionGate, DeletionGateContext, DeletionKind, ReclaimPreparation, ReclaimContext, RemovalCleanup } from '../runs/removal-slots.ts';
|
|
13
13
|
export type { LaunchCockpitAddress, LaunchPartContext, LaunchPartContribution, LaunchPartDefinition } from '../core/launch-registry.ts';
|
|
14
14
|
export type { RunLifecycleHandlers, RunLifecycleHandler, RunLifecycleEvents, RunLifecycleEventType } from '../runs/lifecycle.ts';
|
package/dist/plugin/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAcA,cAAc,iBAAiB,CAAC"}
|
|
@@ -16,6 +16,12 @@ export declare function createLiveRoutes({ resolveProject, serverGeneration, res
|
|
|
16
16
|
output: {
|
|
17
17
|
generation: string;
|
|
18
18
|
results: ({
|
|
19
|
+
projectId: string;
|
|
20
|
+
runId: string;
|
|
21
|
+
type: "error" | "reset";
|
|
22
|
+
status: 400 | 404 | 409 | 413 | 503;
|
|
23
|
+
error: string;
|
|
24
|
+
} | {
|
|
19
25
|
projectId: string;
|
|
20
26
|
runId: string;
|
|
21
27
|
type: "batch";
|
|
@@ -36,12 +42,6 @@ export declare function createLiveRoutes({ resolveProject, serverGeneration, res
|
|
|
36
42
|
cursor: string;
|
|
37
43
|
afterSeq: number;
|
|
38
44
|
hasMore: boolean;
|
|
39
|
-
} | {
|
|
40
|
-
projectId: string;
|
|
41
|
-
runId: string;
|
|
42
|
-
type: "error" | "reset";
|
|
43
|
-
status: 400 | 404 | 409 | 413 | 503;
|
|
44
|
-
error: string;
|
|
45
45
|
})[];
|
|
46
46
|
};
|
|
47
47
|
outputFormat: "json";
|
|
@@ -22,6 +22,18 @@ export declare function createModelsRoutes(options: {
|
|
|
22
22
|
profileId?: string | undefined;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
+
} | {
|
|
26
|
+
output: {
|
|
27
|
+
error: string;
|
|
28
|
+
};
|
|
29
|
+
outputFormat: "json";
|
|
30
|
+
status: 400;
|
|
31
|
+
input: {
|
|
32
|
+
query: {
|
|
33
|
+
runner: string | string[];
|
|
34
|
+
profileId?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
25
37
|
} | {
|
|
26
38
|
output: {
|
|
27
39
|
runner: string;
|
|
@@ -43,18 +55,6 @@ export declare function createModelsRoutes(options: {
|
|
|
43
55
|
profileId?: string | undefined;
|
|
44
56
|
};
|
|
45
57
|
};
|
|
46
|
-
} | {
|
|
47
|
-
output: {
|
|
48
|
-
error: string;
|
|
49
|
-
};
|
|
50
|
-
outputFormat: "json";
|
|
51
|
-
status: 400;
|
|
52
|
-
input: {
|
|
53
|
-
query: {
|
|
54
|
-
runner: string | string[];
|
|
55
|
-
profileId?: string | undefined;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
60
|
}, "/", "/models">;
|
|
@@ -1,46 +1,21 @@
|
|
|
1
1
|
import type { Hono } from 'hono';
|
|
2
2
|
import { type HttpRouteDefinition } from '../core/http-route-registry.ts';
|
|
3
3
|
import type { Home } from '../home/home.ts';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
export interface MountPluginHttpRoutesInput {
|
|
5
|
+
routed: Hono;
|
|
6
6
|
home: Home;
|
|
7
7
|
version: string;
|
|
8
8
|
squawkPort?: (() => number | undefined) | undefined;
|
|
9
9
|
isHostedMode: () => boolean;
|
|
10
10
|
httpRoutes?: readonly HttpRouteDefinition[] | undefined;
|
|
11
11
|
}
|
|
12
|
-
export interface MountPluginRouteBundlesInput extends MountPluginHttpRoutesBaseInput {
|
|
13
|
-
app: Hono;
|
|
14
|
-
v1: Hono<ProjectApiEnv>;
|
|
15
|
-
workspaceV1: Hono;
|
|
16
|
-
v1Prefix: string;
|
|
17
|
-
v1ScopedPrefix: string;
|
|
18
|
-
/** Called for each mounted method+path of a project-scoped route bundle. */
|
|
19
|
-
onProjectRouteMounted?: ((methodAndPath: string) => void) | undefined;
|
|
20
|
-
/** Per-app bridge forwarded to route bundles until S2 introduces `ServerPluginContext`. */
|
|
21
|
-
appBridge?: unknown;
|
|
22
|
-
/** Receives one stderr line per skipped non-bundled bundle that fails to initialize. */
|
|
23
|
-
warn?: ((line: string) => void) | undefined;
|
|
24
|
-
}
|
|
25
|
-
export interface MountPluginHttpHandlersInput extends MountPluginHttpRoutesBaseInput {
|
|
26
|
-
routed: Hono;
|
|
27
|
-
}
|
|
28
12
|
/**
|
|
29
13
|
* Paths whose plugin route enforces its own auth and streaming body limit, so the global 32 MiB
|
|
30
14
|
* `bodyLimit` middleware skips them instead of pre-buffering unauthenticated chunked uploads.
|
|
31
15
|
*/
|
|
32
16
|
export declare function pluginManagedBodyLimitPaths(httpRoutes?: readonly HttpRouteDefinition[]): ReadonlySet<string>;
|
|
33
17
|
/**
|
|
34
|
-
* Mount
|
|
35
|
-
* AFTER those sub-apps fix their `AppType` types and BEFORE `app.route(...)` mounts them.
|
|
36
|
-
* That preserves single-pass project scope resolution (one `resolveProjectScope` per request),
|
|
37
|
-
* enforces unavailable-store and admission guards on every bundle route (including `.all()`),
|
|
38
|
-
* and isolates non-bundled (host) bundle factory failures so a broken host plugin never aborts
|
|
39
|
-
* cockpit startup.
|
|
40
|
-
*/
|
|
41
|
-
export declare function mountPluginRouteBundles(input: MountPluginRouteBundlesInput): void;
|
|
42
|
-
/**
|
|
43
|
-
* Mount single-path plugin HTTP handlers (hearsay-tools/squawk#4402) outside the `AppType` RPC
|
|
18
|
+
* Mount non-RPC plugin HTTP routes (hearsay-tools/squawk#4402) outside the `AppType` RPC
|
|
44
19
|
* chain, after the global `/api/*` request-origin guard and before the SPA catch-all.
|
|
45
20
|
*/
|
|
46
|
-
export declare function mountPluginHttpRoutes(input:
|
|
21
|
+
export declare function mountPluginHttpRoutes(input: MountPluginHttpRoutesInput): void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { httpRoutesSealed,
|
|
2
|
-
import { pluginLoadReport } from '../plugin/loader.js';
|
|
1
|
+
import { httpRoutesSealed, registeredHttpRoutes, } from '../core/http-route-registry.js';
|
|
3
2
|
/**
|
|
4
3
|
* Paths whose plugin route enforces its own auth and streaming body limit, so the global 32 MiB
|
|
5
4
|
* `bodyLimit` middleware skips them instead of pre-buffering unauthenticated chunked uploads.
|
|
@@ -8,12 +7,19 @@ export function pluginManagedBodyLimitPaths(httpRoutes) {
|
|
|
8
7
|
const routes = httpRoutes ?? (httpRoutesSealed() ? registeredHttpRoutes() : []);
|
|
9
8
|
const paths = new Set();
|
|
10
9
|
for (const route of routes) {
|
|
11
|
-
if (
|
|
10
|
+
if (route.managesBodyLimit)
|
|
12
11
|
paths.add(route.path);
|
|
13
12
|
}
|
|
14
13
|
return paths;
|
|
15
14
|
}
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Mount non-RPC plugin HTTP routes (hearsay-tools/squawk#4402) outside the `AppType` RPC
|
|
17
|
+
* chain, after the global `/api/*` request-origin guard and before the SPA catch-all.
|
|
18
|
+
*/
|
|
19
|
+
export function mountPluginHttpRoutes(input) {
|
|
20
|
+
const pluginHttpRoutes = input.httpRoutes ?? (httpRoutesSealed() ? registeredHttpRoutes() : []);
|
|
21
|
+
if (pluginHttpRoutes.length === 0)
|
|
22
|
+
return;
|
|
17
23
|
const fetchApp = async (request) => {
|
|
18
24
|
const headers = new Headers(request.headers);
|
|
19
25
|
headers.delete('origin');
|
|
@@ -26,109 +32,16 @@ function buildRouteContext(target, input, appBridge) {
|
|
|
26
32
|
...(body !== undefined ? { body } : {}),
|
|
27
33
|
signal: request.signal,
|
|
28
34
|
});
|
|
29
|
-
return
|
|
35
|
+
return input.routed.fetch(internal);
|
|
30
36
|
};
|
|
31
|
-
|
|
37
|
+
const routeContext = {
|
|
32
38
|
home: input.home,
|
|
33
39
|
version: input.version,
|
|
34
40
|
squawkPort: () => input.squawkPort?.(),
|
|
35
41
|
isHostedMode: input.isHostedMode,
|
|
36
42
|
fetchApp,
|
|
37
|
-
appBridge,
|
|
38
43
|
};
|
|
39
|
-
|
|
40
|
-
function errorText(error) {
|
|
41
|
-
if (error instanceof Error)
|
|
42
|
-
return error.message;
|
|
43
|
-
try {
|
|
44
|
-
return String(error);
|
|
45
|
-
}
|
|
46
|
-
catch {
|
|
47
|
-
return 'a thrown value with no string form';
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function validateBundleSubApp(route, subApp) {
|
|
51
|
-
if ((typeof subApp === 'object' || typeof subApp === 'function') && subApp !== null && typeof subApp.then === 'function') {
|
|
52
|
-
// Consume any rejection from a JS plugin that returned a Promise/thenable so Node never terminates on unhandledRejection.
|
|
53
|
-
void Promise.resolve(subApp).catch(() => undefined);
|
|
54
|
-
throw new Error(`HTTP route bundle '${route.id}' createRoutes() must be synchronous and return a Hono instance.`);
|
|
55
|
-
}
|
|
56
|
-
if (typeof subApp !== 'object' || subApp === null || !Array.isArray(subApp.routes)) {
|
|
57
|
-
throw new Error(`HTTP route bundle '${route.id}' createRoutes() must return a Hono instance.`);
|
|
58
|
-
}
|
|
59
|
-
const app = subApp;
|
|
60
|
-
for (const entry of app.routes) {
|
|
61
|
-
if (entry.method === 'ALL' && (entry.path === '*' || entry.path === '/*')) {
|
|
62
|
-
throw new Error(`HTTP route bundle '${route.id}' cannot register a root wildcard handler ('${entry.path}').`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return app;
|
|
66
|
-
}
|
|
67
|
-
function bundledHttpRouteIds() {
|
|
68
|
-
const ids = new Set();
|
|
69
|
-
for (const plugin of pluginLoadReport().loaded) {
|
|
70
|
-
if (plugin.source !== 'bundled')
|
|
71
|
-
continue;
|
|
72
|
-
for (const id of plugin.contributions.httpRoutes)
|
|
73
|
-
ids.add(id);
|
|
74
|
-
}
|
|
75
|
-
return ids;
|
|
76
|
-
}
|
|
77
|
-
function joinMountedPath(prefix, path) {
|
|
78
|
-
return path === '/' ? prefix : `${prefix}${path}`;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Mount project-scoped and workspace-scoped plugin route bundles onto `v1` and `workspaceV1`
|
|
82
|
-
* AFTER those sub-apps fix their `AppType` types and BEFORE `app.route(...)` mounts them.
|
|
83
|
-
* That preserves single-pass project scope resolution (one `resolveProjectScope` per request),
|
|
84
|
-
* enforces unavailable-store and admission guards on every bundle route (including `.all()`),
|
|
85
|
-
* and isolates non-bundled (host) bundle factory failures so a broken host plugin never aborts
|
|
86
|
-
* cockpit startup.
|
|
87
|
-
*/
|
|
88
|
-
export function mountPluginRouteBundles(input) {
|
|
89
|
-
const pluginHttpRoutes = input.httpRoutes ?? (httpRoutesSealed() ? registeredHttpRoutes() : []);
|
|
90
|
-
const bundles = pluginHttpRoutes.filter(isHttpBundleRoute);
|
|
91
|
-
if (bundles.length === 0)
|
|
92
|
-
return;
|
|
93
|
-
const routeContext = buildRouteContext(input.app, input, input.appBridge);
|
|
94
|
-
const bundledIds = bundledHttpRouteIds();
|
|
95
|
-
const warn = input.warn ?? ((line) => { process.stderr.write(`${line}\n`); });
|
|
96
|
-
for (const route of bundles) {
|
|
97
|
-
let subApp;
|
|
98
|
-
try {
|
|
99
|
-
subApp = validateBundleSubApp(route, route.createRoutes(routeContext));
|
|
100
|
-
}
|
|
101
|
-
catch (error) {
|
|
102
|
-
if (bundledIds.has(route.id))
|
|
103
|
-
throw error;
|
|
104
|
-
warn(`[hsq] plugin HTTP route bundle "${route.id}" skipped: ${errorText(error)}`);
|
|
105
|
-
continue;
|
|
106
|
-
}
|
|
107
|
-
if (route.scope === 'project') {
|
|
108
|
-
const before = input.v1.routes.length;
|
|
109
|
-
input.v1.route('/', subApp);
|
|
110
|
-
for (const mounted of input.v1.routes.slice(before)) {
|
|
111
|
-
for (const prefix of [input.v1Prefix, input.v1ScopedPrefix]) {
|
|
112
|
-
input.onProjectRouteMounted?.(`${mounted.method} ${joinMountedPath(prefix, mounted.path)}`);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
input.workspaceV1.route('/', subApp);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Mount single-path plugin HTTP handlers (hearsay-tools/squawk#4402) outside the `AppType` RPC
|
|
123
|
-
* chain, after the global `/api/*` request-origin guard and before the SPA catch-all.
|
|
124
|
-
*/
|
|
125
|
-
export function mountPluginHttpRoutes(input) {
|
|
126
|
-
const pluginHttpRoutes = input.httpRoutes ?? (httpRoutesSealed() ? registeredHttpRoutes() : []);
|
|
127
|
-
const handlers = pluginHttpRoutes.filter((route) => !isHttpBundleRoute(route));
|
|
128
|
-
if (handlers.length === 0)
|
|
129
|
-
return;
|
|
130
|
-
const routeContext = buildRouteContext(input.routed, input);
|
|
131
|
-
for (const route of handlers) {
|
|
44
|
+
for (const route of pluginHttpRoutes) {
|
|
132
45
|
const handler = (c) => route.handle(c.req.raw, routeContext);
|
|
133
46
|
if (route.method === 'ALL')
|
|
134
47
|
input.routed.all(route.path, handler);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-http-routes.js","sourceRoot":"","sources":["../../src/server/plugin-http-routes.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"plugin-http-routes.js","sourceRoot":"","sources":["../../src/server/plugin-http-routes.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,oBAAoB,GAGrB,MAAM,gCAAgC,CAAC;AAYxC;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,UAA2C;IACrF,MAAM,MAAM,GAAG,UAAU,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAChF,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,gBAAgB;YAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAiC;IACrE,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAChG,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAE1C,MAAM,QAAQ,GAAG,KAAK,EAAE,OAAgB,EAAqB,EAAE;QAC7D,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACzB,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QACjC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACjC,MAAM,IAAI,GAAG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