@hearsay-tools/squawk 0.19.0-pr4457.8756 → 0.19.0-pr4457.8764
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/http-route-registry.js +3 -0
- package/dist/core/http-route-registry.js.map +1 -1
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/plugin-http-routes.d.ts +26 -9
- package/dist/server/plugin-http-routes.js +95 -27
- package/dist/server/plugin-http-routes.js.map +1 -1
- package/dist/server/projects-routes.d.ts +45 -45
- package/dist/server/runners-routes.d.ts +10 -10
- package/dist/server/runs-routes.d.ts +16 -16
- package/dist/server/server.d.ts +1206 -1212
- package/dist/server/server.js +31 -55
- package/dist/server/server.js.map +1 -1
- package/dist/server/workspace-routes.d.ts +84 -84
- package/dist/server/ws.d.ts +6 -0
- package/dist/server/ws.js +41 -0
- package/dist/server/ws.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/{accounts-section-CqJiDoKE.js → accounts-section-DhS7blSK.js} +1 -1
- package/web/dist/assets/activity-motion-aJkLHTxc.js +1 -0
- package/web/dist/assets/{activity-route-DOcAtf9i.js → activity-route-D2sff_BA.js} +1 -1
- package/web/dist/assets/{agent-config-section-B6lCNWlM.js → agent-config-section-C7SMwOgZ.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-DHwkBXuz.js → agent-defaults-section-CvMgsSLY.js} +1 -1
- package/web/dist/assets/{appearance-DEK8ezEQ.js → appearance-44RH8bum.js} +1 -1
- package/web/dist/assets/{automations-route-BXoyFkhx.js → automations-route-CygHw9Ni.js} +1 -1
- package/web/dist/assets/{commit-list-DjhAXNOu.js → commit-list-Djmz3j1l.js} +1 -1
- package/web/dist/assets/{diff-eQ6oM_Ti.js → diff-ByLut7n4.js} +2 -2
- package/web/dist/assets/{diff-controls-CYiGOTLb.js → diff-controls-BEVRwCau.js} +1 -1
- package/web/dist/assets/{diff-view-kgRbXZ06.js → diff-view-kvjafBI7.js} +1 -1
- package/web/dist/assets/{file-preview-D5Mc18GN.js → file-preview-Ce0Jsxbm.js} +1 -1
- package/web/dist/assets/{git-toolbar-BYCPpYE3.js → git-toolbar-Cn1ASnMZ.js} +1 -1
- package/web/dist/assets/{github-B0s8RT3R.js → github-CxYmUkO9.js} +1 -1
- package/web/dist/assets/{global-activity-route-DTNGyGoC.js → global-activity-route-ALFcEqug.js} +2 -2
- package/web/dist/assets/{index-DwDvloUQ.js → index-BZr8Y74X.js} +4 -4
- package/web/dist/assets/{markdown-jbBslIIT.js → markdown-BRNtAZkY.js} +1 -1
- package/web/dist/assets/{notifications-section-C1aUjb3n.js → notifications-section-C_IsaiyD.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-ChoZcfZF.js → preview-pane-connected-DzajVDzR.js} +1 -1
- package/web/dist/assets/{projects-section-Dlz2V18-.js → projects-section-Cme2qWcF.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-KYeZJ5it.js → prompt-templates-section-DVr3aKc-.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-CXNs2m11.js → remote-settings-notice-BFeWL9QB.js} +1 -1
- package/web/dist/assets/{repo-git-xHDvySA0.js → repo-git-C3YNr0yL.js} +1 -1
- package/web/dist/assets/{report-reader-pkkocX-w.js → report-reader-Bm0J3ujk.js} +1 -1
- package/web/dist/assets/{reports-DE76L7r9.js → reports-CNL2zChD.js} +1 -1
- package/web/dist/assets/{resources-section-CsyiFux8.js → resources-section-BymE7-3T.js} +1 -1
- package/web/dist/assets/{review-panel-CLsVpcPr.js → review-panel-3oSwii0J.js} +1 -1
- package/web/dist/assets/{run-header-kGdJVGJm.js → run-header-CI49Lba9.js} +1 -1
- package/web/dist/assets/{select-BH4KzC9I.js → select-DEqrvCmQ.js} +1 -1
- package/web/dist/assets/{session-context-section-CQaaWpJ6.js → session-context-section-oK9zU15I.js} +1 -1
- package/web/dist/assets/{settings-agent-picker-Cv_4wnFI.js → settings-agent-picker-BqRDs5nQ.js} +1 -1
- package/web/dist/assets/{settings-shell-CG6eFmsm.js → settings-shell-11SRBczO.js} +1 -1
- package/web/dist/assets/{sidebar-section-CcO5Q0as.js → sidebar-section-DujeUKJ0.js} +1 -1
- package/web/dist/assets/{skills-C2TtFkX0.js → skills-B6vquPg1.js} +1 -1
- package/web/dist/assets/{task-changes-CS7sYCut.js → task-changes-t473lMAF.js} +1 -1
- package/web/dist/assets/{task-commits-B0HDJ95C.js → task-commits-CuXxfPY6.js} +1 -1
- package/web/dist/assets/{task-file-scope-vwEp2s7o.js → task-file-scope-DK1biohR.js} +1 -1
- package/web/dist/assets/{task-files-kehKktnF.js → task-files-C0zhDxod.js} +1 -1
- package/web/dist/assets/{task-github-item-BNc2Oyvq.js → task-github-item-CFU1Rbv0.js} +1 -1
- package/web/dist/assets/{task-thread-BRpUqs1N.js → task-thread-1BQ5lWbM.js} +1 -1
- package/web/dist/assets/{thread-state-B_UW2DqR.js → thread-state-BHI3Jijs.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-DzPA14Gk.js → use-hand-to-agent-state-BHAhGcZe.js} +1 -1
- package/web/dist/assets/{workflows-CKtzm8xW.js → workflows-BMlXKiaH.js} +1 -1
- package/web/dist/assets/{workspace-tools-Br4fSGhx.js → workspace-tools-CsrBXG_p.js} +1 -1
- package/web/dist/assets/{worktrees-section-TGAZ2n-T.js → worktrees-section-DvFx6o_A.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/dist/assets/activity-motion-BrtMWCAJ.js +0 -1
|
@@ -30,6 +30,9 @@ function checkBundleShape(route) {
|
|
|
30
30
|
if (typeof route.createRoutes !== 'function') {
|
|
31
31
|
throw new Error(`HTTP routes: '${route.id}' needs a createRoutes function.`);
|
|
32
32
|
}
|
|
33
|
+
if (route.createRoutes.constructor?.name === 'AsyncFunction') {
|
|
34
|
+
throw new Error(`HTTP routes: '${route.id}' createRoutes must be synchronous.`);
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
function checkShape(route) {
|
|
35
38
|
if (typeof route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AAK,CAAC;QAAE,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACrE,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"}
|
|
@@ -16,12 +16,6 @@ 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
|
-
} | {
|
|
25
19
|
projectId: string;
|
|
26
20
|
runId: string;
|
|
27
21
|
type: "batch";
|
|
@@ -42,6 +36,12 @@ export declare function createLiveRoutes({ resolveProject, serverGeneration, res
|
|
|
42
36
|
cursor: string;
|
|
43
37
|
afterSeq: number;
|
|
44
38
|
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";
|
|
@@ -1,19 +1,29 @@
|
|
|
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
|
-
|
|
6
|
-
v1Prefix: string;
|
|
7
|
-
v1ScopedPrefix: string;
|
|
4
|
+
import type { ProjectApiEnv } from './server-types.ts';
|
|
5
|
+
export interface MountPluginHttpRoutesBaseInput {
|
|
8
6
|
home: Home;
|
|
9
7
|
version: string;
|
|
10
8
|
squawkPort?: (() => number | undefined) | undefined;
|
|
11
9
|
isHostedMode: () => boolean;
|
|
12
10
|
httpRoutes?: readonly HttpRouteDefinition[] | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface MountPluginRouteBundlesInput extends MountPluginHttpRoutesBaseInput {
|
|
13
|
+
app: Hono;
|
|
14
|
+
v1: Hono<ProjectApiEnv>;
|
|
15
|
+
workspaceV1: Hono;
|
|
16
|
+
v1Prefix: string;
|
|
17
|
+
v1ScopedPrefix: string;
|
|
13
18
|
/** Called for each mounted method+path of a project-scoped route bundle. */
|
|
14
19
|
onProjectRouteMounted?: ((methodAndPath: string) => void) | undefined;
|
|
15
20
|
/** Per-app bridge forwarded to route bundles until S2 introduces `ServerPluginContext`. */
|
|
16
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;
|
|
17
27
|
}
|
|
18
28
|
/**
|
|
19
29
|
* Paths whose plugin route enforces its own auth and streaming body limit, so the global 32 MiB
|
|
@@ -21,9 +31,16 @@ export interface MountPluginHttpRoutesInput {
|
|
|
21
31
|
*/
|
|
22
32
|
export declare function pluginManagedBodyLimitPaths(httpRoutes?: readonly HttpRouteDefinition[]): ReadonlySet<string>;
|
|
23
33
|
/**
|
|
24
|
-
* Mount plugin
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
34
|
+
* Mount project-scoped and workspace-scoped plugin route bundles onto `v1` and `workspaceV1`
|
|
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
|
|
44
|
+
* chain, after the global `/api/*` request-origin guard and before the SPA catch-all.
|
|
28
45
|
*/
|
|
29
|
-
export declare function mountPluginHttpRoutes(input:
|
|
46
|
+
export declare function mountPluginHttpRoutes(input: MountPluginHttpHandlersInput): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { httpRoutesSealed, isHttpBundleRoute, registeredHttpRoutes, } from '../core/http-route-registry.js';
|
|
2
|
+
import { pluginLoadReport } from '../plugin/loader.js';
|
|
2
3
|
/**
|
|
3
4
|
* Paths whose plugin route enforces its own auth and streaming body limit, so the global 32 MiB
|
|
4
5
|
* `bodyLimit` middleware skips them instead of pre-buffering unauthenticated chunked uploads.
|
|
@@ -12,16 +13,7 @@ export function pluginManagedBodyLimitPaths(httpRoutes) {
|
|
|
12
13
|
}
|
|
13
14
|
return paths;
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
* Mount plugin HTTP routes (hearsay-tools/squawk#4402, hearsay-tools/squawk#4441) outside the
|
|
17
|
-
* `AppType` RPC chain, after the global `/api/*` request-origin guard and before the SPA
|
|
18
|
-
* catch-all. Project-scoped bundles mount under both `/api/v1/p/:projectId` and `/api/v1` and
|
|
19
|
-
* inherit the project-scope middleware already attached to those prefixes.
|
|
20
|
-
*/
|
|
21
|
-
export function mountPluginHttpRoutes(input) {
|
|
22
|
-
const pluginHttpRoutes = input.httpRoutes ?? (httpRoutesSealed() ? registeredHttpRoutes() : []);
|
|
23
|
-
if (pluginHttpRoutes.length === 0)
|
|
24
|
-
return;
|
|
16
|
+
function buildRouteContext(target, input, appBridge) {
|
|
25
17
|
const fetchApp = async (request) => {
|
|
26
18
|
const headers = new Headers(request.headers);
|
|
27
19
|
headers.delete('origin');
|
|
@@ -34,33 +26,109 @@ export function mountPluginHttpRoutes(input) {
|
|
|
34
26
|
...(body !== undefined ? { body } : {}),
|
|
35
27
|
signal: request.signal,
|
|
36
28
|
});
|
|
37
|
-
return
|
|
29
|
+
return target.fetch(internal);
|
|
38
30
|
};
|
|
39
|
-
|
|
31
|
+
return {
|
|
40
32
|
home: input.home,
|
|
41
33
|
version: input.version,
|
|
42
34
|
squawkPort: () => input.squawkPort?.(),
|
|
43
35
|
isHostedMode: input.isHostedMode,
|
|
44
36
|
fetchApp,
|
|
45
|
-
appBridge
|
|
37
|
+
appBridge,
|
|
46
38
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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)}`);
|
|
57
113
|
}
|
|
58
114
|
}
|
|
59
|
-
else {
|
|
60
|
-
input.routed.route(input.v1Prefix, subApp);
|
|
61
|
-
}
|
|
62
|
-
continue;
|
|
63
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) {
|
|
64
132
|
const handler = (c) => route.handle(c.req.raw, routeContext);
|
|
65
133
|
if (route.method === 'ALL')
|
|
66
134
|
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,iBAAiB,EACjB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"plugin-http-routes.js","sourceRoot":"","sources":["../../src/server/plugin-http-routes.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,GAIrB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AA6BvD;;;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,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,gBAAgB;YAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAY,EAAE,KAAqC,EAAE,SAAmB;IACjG,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,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CAAC,MAAM,KAAK,KAAK;YAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;;YAC7D,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;AACH,CAAC"}
|
|
@@ -63,6 +63,17 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
63
63
|
} & {
|
|
64
64
|
"/projects": {
|
|
65
65
|
$post: {
|
|
66
|
+
output: {
|
|
67
|
+
error: string;
|
|
68
|
+
};
|
|
69
|
+
outputFormat: "json";
|
|
70
|
+
status: 400 | 500;
|
|
71
|
+
input: {
|
|
72
|
+
json: {
|
|
73
|
+
root: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
} | {
|
|
66
77
|
output: {
|
|
67
78
|
project: {
|
|
68
79
|
id: string;
|
|
@@ -93,10 +104,10 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
93
104
|
agent: boolean;
|
|
94
105
|
}[] | undefined;
|
|
95
106
|
};
|
|
96
|
-
error
|
|
107
|
+
error: string;
|
|
97
108
|
};
|
|
98
109
|
outputFormat: "json";
|
|
99
|
-
status:
|
|
110
|
+
status: 409;
|
|
100
111
|
input: {
|
|
101
112
|
json: {
|
|
102
113
|
root: string;
|
|
@@ -133,21 +144,10 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
133
144
|
agent: boolean;
|
|
134
145
|
}[] | undefined;
|
|
135
146
|
};
|
|
136
|
-
error
|
|
137
|
-
};
|
|
138
|
-
outputFormat: "json";
|
|
139
|
-
status: 409;
|
|
140
|
-
input: {
|
|
141
|
-
json: {
|
|
142
|
-
root: string;
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
} | {
|
|
146
|
-
output: {
|
|
147
|
-
error: string;
|
|
147
|
+
error?: string | undefined;
|
|
148
148
|
};
|
|
149
149
|
outputFormat: "json";
|
|
150
|
-
status:
|
|
150
|
+
status: 200;
|
|
151
151
|
input: {
|
|
152
152
|
json: {
|
|
153
153
|
root: string;
|
|
@@ -306,7 +306,7 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
306
306
|
error: string;
|
|
307
307
|
};
|
|
308
308
|
outputFormat: "json";
|
|
309
|
-
status:
|
|
309
|
+
status: 404;
|
|
310
310
|
input: {
|
|
311
311
|
param: {
|
|
312
312
|
projectId: string;
|
|
@@ -317,7 +317,7 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
317
317
|
error: string;
|
|
318
318
|
};
|
|
319
319
|
outputFormat: "json";
|
|
320
|
-
status:
|
|
320
|
+
status: 400;
|
|
321
321
|
input: {
|
|
322
322
|
param: {
|
|
323
323
|
projectId: string;
|
|
@@ -342,6 +342,27 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
342
342
|
} & {
|
|
343
343
|
"/projects/:projectId/webhooks": {
|
|
344
344
|
$post: {
|
|
345
|
+
output: {
|
|
346
|
+
error: string;
|
|
347
|
+
};
|
|
348
|
+
outputFormat: "json";
|
|
349
|
+
status: 400 | 404 | 409 | 500;
|
|
350
|
+
input: {
|
|
351
|
+
json: {
|
|
352
|
+
name: string;
|
|
353
|
+
description?: string | undefined;
|
|
354
|
+
url: string;
|
|
355
|
+
token?: string | undefined;
|
|
356
|
+
tasks?: boolean | undefined;
|
|
357
|
+
triggers?: ("cancelled" | "done" | "failed" | "needs-you" | "running" | "waiting-ci" | "waiting-other" | "waiting-timer" | "waiting-workers")[] | undefined;
|
|
358
|
+
agent?: boolean | undefined;
|
|
359
|
+
};
|
|
360
|
+
} & {
|
|
361
|
+
param: {
|
|
362
|
+
projectId: string;
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
} | {
|
|
345
366
|
output: {
|
|
346
367
|
project: {
|
|
347
368
|
id: string;
|
|
@@ -400,27 +421,6 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
400
421
|
projectId: string;
|
|
401
422
|
};
|
|
402
423
|
};
|
|
403
|
-
} | {
|
|
404
|
-
output: {
|
|
405
|
-
error: string;
|
|
406
|
-
};
|
|
407
|
-
outputFormat: "json";
|
|
408
|
-
status: 400 | 404 | 409 | 500;
|
|
409
|
-
input: {
|
|
410
|
-
json: {
|
|
411
|
-
name: string;
|
|
412
|
-
description?: string | undefined;
|
|
413
|
-
url: string;
|
|
414
|
-
token?: string | undefined;
|
|
415
|
-
tasks?: boolean | undefined;
|
|
416
|
-
triggers?: ("cancelled" | "done" | "failed" | "needs-you" | "running" | "waiting-ci" | "waiting-other" | "waiting-timer" | "waiting-workers")[] | undefined;
|
|
417
|
-
agent?: boolean | undefined;
|
|
418
|
-
};
|
|
419
|
-
} & {
|
|
420
|
-
param: {
|
|
421
|
-
projectId: string;
|
|
422
|
-
};
|
|
423
|
-
};
|
|
424
424
|
};
|
|
425
425
|
};
|
|
426
426
|
} & {
|
|
@@ -618,10 +618,13 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
618
618
|
};
|
|
619
619
|
} | {
|
|
620
620
|
output: {
|
|
621
|
-
|
|
621
|
+
ok: boolean;
|
|
622
|
+
status?: number | undefined;
|
|
623
|
+
error?: string | undefined;
|
|
624
|
+
dryRun?: boolean | undefined;
|
|
622
625
|
};
|
|
623
626
|
outputFormat: "json";
|
|
624
|
-
status:
|
|
627
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
625
628
|
input: {
|
|
626
629
|
param: {
|
|
627
630
|
projectId: string;
|
|
@@ -630,13 +633,10 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
630
633
|
};
|
|
631
634
|
} | {
|
|
632
635
|
output: {
|
|
633
|
-
|
|
634
|
-
status?: number | undefined;
|
|
635
|
-
error?: string | undefined;
|
|
636
|
-
dryRun?: boolean | undefined;
|
|
636
|
+
error: string;
|
|
637
637
|
};
|
|
638
638
|
outputFormat: "json";
|
|
639
|
-
status:
|
|
639
|
+
status: 404;
|
|
640
640
|
input: {
|
|
641
641
|
param: {
|
|
642
642
|
projectId: string;
|
|
@@ -58,15 +58,11 @@ export declare function createRunnersRoutes(options: {
|
|
|
58
58
|
"/runner-install/:runner": {
|
|
59
59
|
$post: {
|
|
60
60
|
output: {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
latestVersion: string | null;
|
|
64
|
-
updateAvailable: boolean;
|
|
65
|
-
phase: "activating" | "checking" | "downloading" | "extracting" | "failed" | "idle" | "removing" | "verifying";
|
|
66
|
-
error: string | null;
|
|
61
|
+
error: string;
|
|
62
|
+
code?: "invalid_input" | undefined;
|
|
67
63
|
};
|
|
68
64
|
outputFormat: "json";
|
|
69
|
-
status:
|
|
65
|
+
status: 400;
|
|
70
66
|
input: {
|
|
71
67
|
param: {
|
|
72
68
|
runner: string;
|
|
@@ -78,11 +74,15 @@ export declare function createRunnersRoutes(options: {
|
|
|
78
74
|
};
|
|
79
75
|
} | {
|
|
80
76
|
output: {
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
supported: boolean;
|
|
78
|
+
installedVersion: string | null;
|
|
79
|
+
latestVersion: string | null;
|
|
80
|
+
updateAvailable: boolean;
|
|
81
|
+
phase: "activating" | "checking" | "downloading" | "extracting" | "failed" | "idle" | "removing" | "verifying";
|
|
82
|
+
error: string | null;
|
|
83
83
|
};
|
|
84
84
|
outputFormat: "json";
|
|
85
|
-
status:
|
|
85
|
+
status: 202;
|
|
86
86
|
input: {
|
|
87
87
|
param: {
|
|
88
88
|
runner: string;
|
|
@@ -12308,20 +12308,20 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
12308
12308
|
} & {
|
|
12309
12309
|
"/runs/:id/handoff": {
|
|
12310
12310
|
$get: {
|
|
12311
|
-
output:
|
|
12312
|
-
|
|
12313
|
-
|
|
12311
|
+
output: {
|
|
12312
|
+
error: string;
|
|
12313
|
+
};
|
|
12314
|
+
outputFormat: "json";
|
|
12315
|
+
status: 404;
|
|
12314
12316
|
input: {
|
|
12315
12317
|
param: {
|
|
12316
12318
|
id: string;
|
|
12317
12319
|
};
|
|
12318
12320
|
};
|
|
12319
12321
|
} | {
|
|
12320
|
-
output:
|
|
12321
|
-
|
|
12322
|
-
|
|
12323
|
-
outputFormat: "json";
|
|
12324
|
-
status: 404;
|
|
12322
|
+
output: string;
|
|
12323
|
+
outputFormat: "text";
|
|
12324
|
+
status: 200;
|
|
12325
12325
|
input: {
|
|
12326
12326
|
param: {
|
|
12327
12327
|
id: string;
|
|
@@ -12359,20 +12359,20 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
12359
12359
|
} & {
|
|
12360
12360
|
"/runs/:id/diff": {
|
|
12361
12361
|
$get: {
|
|
12362
|
-
output:
|
|
12363
|
-
|
|
12364
|
-
|
|
12362
|
+
output: {
|
|
12363
|
+
error: string;
|
|
12364
|
+
};
|
|
12365
|
+
outputFormat: "json";
|
|
12366
|
+
status: 404 | 409;
|
|
12365
12367
|
input: {
|
|
12366
12368
|
param: {
|
|
12367
12369
|
id: string;
|
|
12368
12370
|
};
|
|
12369
12371
|
};
|
|
12370
12372
|
} | {
|
|
12371
|
-
output:
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
outputFormat: "json";
|
|
12375
|
-
status: 404 | 409;
|
|
12373
|
+
output: string;
|
|
12374
|
+
outputFormat: "text";
|
|
12375
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
12376
12376
|
input: {
|
|
12377
12377
|
param: {
|
|
12378
12378
|
id: string;
|