@hearsay-tools/squawk 0.19.0-dev.8776 → 0.19.0-dev.8778
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 +2 -0
- package/dist/boot.js.map +1 -1
- package/dist/built-in-http-routes.d.ts +10 -0
- package/dist/built-in-http-routes.js +41 -0
- package/dist/built-in-http-routes.js.map +1 -0
- package/dist/contract/automation-requests.d.ts +4 -0
- package/dist/core/http-route-registry.d.ts +28 -5
- package/dist/core/http-route-registry.js +37 -9
- package/dist/core/http-route-registry.js.map +1 -1
- package/dist/delegation/routes.d.ts +65 -65
- package/dist/plugin/api.js +3 -1
- 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/automations-routes.d.ts +150 -150
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/plugin-http-routes.d.ts +29 -4
- package/dist/server/plugin-http-routes.js +100 -13
- package/dist/server/plugin-http-routes.js.map +1 -1
- package/dist/server/project-settings-routes.d.ts +107 -107
- package/dist/server/providers-routes.d.ts +7 -7
- package/dist/server/runners-routes.d.ts +10 -10
- package/dist/server/server.d.ts +3248 -6048
- package/dist/server/server.js +39 -59
- package/dist/server/server.js.map +1 -1
- 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
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { httpRoutesSealed, registeredHttpRoutes, } from '../core/http-route-registry.js';
|
|
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.
|
|
@@ -7,19 +8,12 @@ export function pluginManagedBodyLimitPaths(httpRoutes) {
|
|
|
7
8
|
const routes = httpRoutes ?? (httpRoutesSealed() ? registeredHttpRoutes() : []);
|
|
8
9
|
const paths = new Set();
|
|
9
10
|
for (const route of routes) {
|
|
10
|
-
if (route.managesBodyLimit)
|
|
11
|
+
if (!isHttpBundleRoute(route) && route.managesBodyLimit)
|
|
11
12
|
paths.add(route.path);
|
|
12
13
|
}
|
|
13
14
|
return paths;
|
|
14
15
|
}
|
|
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;
|
|
16
|
+
function buildRouteContext(target, input, appBridge) {
|
|
23
17
|
const fetchApp = async (request) => {
|
|
24
18
|
const headers = new Headers(request.headers);
|
|
25
19
|
headers.delete('origin');
|
|
@@ -32,16 +26,109 @@ export function mountPluginHttpRoutes(input) {
|
|
|
32
26
|
...(body !== undefined ? { body } : {}),
|
|
33
27
|
signal: request.signal,
|
|
34
28
|
});
|
|
35
|
-
return
|
|
29
|
+
return target.fetch(internal);
|
|
36
30
|
};
|
|
37
|
-
|
|
31
|
+
return {
|
|
38
32
|
home: input.home,
|
|
39
33
|
version: input.version,
|
|
40
34
|
squawkPort: () => input.squawkPort?.(),
|
|
41
35
|
isHostedMode: input.isHostedMode,
|
|
42
36
|
fetchApp,
|
|
37
|
+
appBridge,
|
|
43
38
|
};
|
|
44
|
-
|
|
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) {
|
|
45
132
|
const handler = (c) => route.handle(c.req.raw, routeContext);
|
|
46
133
|
if (route.method === 'ALL')
|
|
47
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,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,C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,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/E,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAElC,MAAM,YAAY,GAAG,iBAAiB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC5D,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;QAC7B,MAAM,OAAO,GAAG,CAAC,CAAU,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;QACtE,IAAI,KAAK,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"}
|
|
@@ -113,10 +113,42 @@ export declare function createUiStateRoutes(): import("hono/hono-base").HonoBase
|
|
|
113
113
|
"/ui-state": {
|
|
114
114
|
$put: {
|
|
115
115
|
output: {
|
|
116
|
-
|
|
116
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
117
|
+
sidebarLimits?: {
|
|
118
|
+
overall?: number | null | undefined;
|
|
119
|
+
needsYou?: number | null | undefined;
|
|
120
|
+
finished?: number | null | undefined;
|
|
121
|
+
working?: number | null | undefined;
|
|
122
|
+
} | undefined;
|
|
123
|
+
lastTask?: {
|
|
124
|
+
source: "skill" | "workflow";
|
|
125
|
+
ref: string;
|
|
126
|
+
} | null | undefined;
|
|
127
|
+
recentSources?: {
|
|
128
|
+
source: "skill" | "workflow";
|
|
129
|
+
ref: string;
|
|
130
|
+
}[] | undefined;
|
|
131
|
+
lastWorktree?: boolean | undefined;
|
|
132
|
+
lastAutonomous?: boolean | undefined;
|
|
133
|
+
skillUsage?: {
|
|
134
|
+
[x: string]: number;
|
|
135
|
+
} | undefined;
|
|
136
|
+
runsView?: "list" | "table" | undefined;
|
|
137
|
+
githubView?: "issues" | "prs" | undefined;
|
|
138
|
+
appearance?: {
|
|
139
|
+
accent?: "cezarion" | "lime" | "violet" | undefined;
|
|
140
|
+
density?: "comfortable" | "compact" | "ultra" | undefined;
|
|
141
|
+
width?: "narrow" | "wide" | undefined;
|
|
142
|
+
} | undefined;
|
|
143
|
+
promptTemplates?: {
|
|
144
|
+
id: string;
|
|
145
|
+
label: string;
|
|
146
|
+
text: string;
|
|
147
|
+
skills?: string[] | undefined;
|
|
148
|
+
}[] | undefined;
|
|
117
149
|
};
|
|
118
150
|
outputFormat: "json";
|
|
119
|
-
status:
|
|
151
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
120
152
|
input: {
|
|
121
153
|
json: {
|
|
122
154
|
[x: string]: unknown;
|
|
@@ -154,42 +186,10 @@ export declare function createUiStateRoutes(): import("hono/hono-base").HonoBase
|
|
|
154
186
|
};
|
|
155
187
|
} | {
|
|
156
188
|
output: {
|
|
157
|
-
|
|
158
|
-
sidebarLimits?: {
|
|
159
|
-
overall?: number | null | undefined;
|
|
160
|
-
needsYou?: number | null | undefined;
|
|
161
|
-
finished?: number | null | undefined;
|
|
162
|
-
working?: number | null | undefined;
|
|
163
|
-
} | undefined;
|
|
164
|
-
lastTask?: {
|
|
165
|
-
source: "skill" | "workflow";
|
|
166
|
-
ref: string;
|
|
167
|
-
} | null | undefined;
|
|
168
|
-
recentSources?: {
|
|
169
|
-
source: "skill" | "workflow";
|
|
170
|
-
ref: string;
|
|
171
|
-
}[] | undefined;
|
|
172
|
-
lastWorktree?: boolean | undefined;
|
|
173
|
-
lastAutonomous?: boolean | undefined;
|
|
174
|
-
skillUsage?: {
|
|
175
|
-
[x: string]: number;
|
|
176
|
-
} | undefined;
|
|
177
|
-
runsView?: "list" | "table" | undefined;
|
|
178
|
-
githubView?: "issues" | "prs" | undefined;
|
|
179
|
-
appearance?: {
|
|
180
|
-
accent?: "cezarion" | "lime" | "violet" | undefined;
|
|
181
|
-
density?: "comfortable" | "compact" | "ultra" | undefined;
|
|
182
|
-
width?: "narrow" | "wide" | undefined;
|
|
183
|
-
} | undefined;
|
|
184
|
-
promptTemplates?: {
|
|
185
|
-
id: string;
|
|
186
|
-
label: string;
|
|
187
|
-
text: string;
|
|
188
|
-
skills?: string[] | undefined;
|
|
189
|
-
}[] | undefined;
|
|
189
|
+
error: string;
|
|
190
190
|
};
|
|
191
191
|
outputFormat: "json";
|
|
192
|
-
status:
|
|
192
|
+
status: 500;
|
|
193
193
|
input: {
|
|
194
194
|
json: {
|
|
195
195
|
[x: string]: unknown;
|
|
@@ -275,11 +275,10 @@ export declare function createWorkflowsRoutes(): import("hono/hono-base").HonoBa
|
|
|
275
275
|
"/workflows": {
|
|
276
276
|
$post: {
|
|
277
277
|
output: {
|
|
278
|
-
|
|
279
|
-
name: string;
|
|
278
|
+
error: string;
|
|
280
279
|
};
|
|
281
280
|
outputFormat: "json";
|
|
282
|
-
status:
|
|
281
|
+
status: 400;
|
|
283
282
|
input: {
|
|
284
283
|
json: {
|
|
285
284
|
name: string;
|
|
@@ -312,9 +311,10 @@ export declare function createWorkflowsRoutes(): import("hono/hono-base").HonoBa
|
|
|
312
311
|
} | {
|
|
313
312
|
output: {
|
|
314
313
|
error: string;
|
|
314
|
+
exists: true;
|
|
315
315
|
};
|
|
316
316
|
outputFormat: "json";
|
|
317
|
-
status:
|
|
317
|
+
status: 409;
|
|
318
318
|
input: {
|
|
319
319
|
json: {
|
|
320
320
|
name: string;
|
|
@@ -347,10 +347,9 @@ export declare function createWorkflowsRoutes(): import("hono/hono-base").HonoBa
|
|
|
347
347
|
} | {
|
|
348
348
|
output: {
|
|
349
349
|
error: string;
|
|
350
|
-
exists: true;
|
|
351
350
|
};
|
|
352
351
|
outputFormat: "json";
|
|
353
|
-
status:
|
|
352
|
+
status: 500;
|
|
354
353
|
input: {
|
|
355
354
|
json: {
|
|
356
355
|
name: string;
|
|
@@ -382,10 +381,11 @@ export declare function createWorkflowsRoutes(): import("hono/hono-base").HonoBa
|
|
|
382
381
|
};
|
|
383
382
|
} | {
|
|
384
383
|
output: {
|
|
385
|
-
|
|
384
|
+
path: string;
|
|
385
|
+
name: string;
|
|
386
386
|
};
|
|
387
387
|
outputFormat: "json";
|
|
388
|
-
status:
|
|
388
|
+
status: 201;
|
|
389
389
|
input: {
|
|
390
390
|
json: {
|
|
391
391
|
name: string;
|
|
@@ -421,11 +421,10 @@ export declare function createWorkflowsRoutes(): import("hono/hono-base").HonoBa
|
|
|
421
421
|
"/workflows/:name": {
|
|
422
422
|
$delete: {
|
|
423
423
|
output: {
|
|
424
|
-
|
|
425
|
-
path: string;
|
|
424
|
+
error: string;
|
|
426
425
|
};
|
|
427
426
|
outputFormat: "json";
|
|
428
|
-
status:
|
|
427
|
+
status: 400 | 404 | 409 | 500;
|
|
429
428
|
input: {
|
|
430
429
|
param: {
|
|
431
430
|
name: string;
|
|
@@ -433,10 +432,11 @@ export declare function createWorkflowsRoutes(): import("hono/hono-base").HonoBa
|
|
|
433
432
|
};
|
|
434
433
|
} | {
|
|
435
434
|
output: {
|
|
436
|
-
|
|
435
|
+
ok: true;
|
|
436
|
+
path: string;
|
|
437
437
|
};
|
|
438
438
|
outputFormat: "json";
|
|
439
|
-
status:
|
|
439
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
440
440
|
input: {
|
|
441
441
|
param: {
|
|
442
442
|
name: string;
|
|
@@ -504,6 +504,18 @@ export interface PlanRouteDeps {
|
|
|
504
504
|
export declare function createPlanRoutes(deps: PlanRouteDeps): import("hono/hono-base").HonoBase<ProjectApiEnv, {
|
|
505
505
|
"/plan": {
|
|
506
506
|
$post: {
|
|
507
|
+
output: {
|
|
508
|
+
error: string;
|
|
509
|
+
};
|
|
510
|
+
outputFormat: "json";
|
|
511
|
+
status: 400 | 404 | 409;
|
|
512
|
+
input: {
|
|
513
|
+
json: {
|
|
514
|
+
task: string;
|
|
515
|
+
agentProfile?: string | undefined;
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
} | {
|
|
507
519
|
output: {
|
|
508
520
|
name?: string;
|
|
509
521
|
steps: {
|
|
@@ -540,18 +552,6 @@ export declare function createPlanRoutes(deps: PlanRouteDeps): import("hono/hono
|
|
|
540
552
|
agentProfile?: string | undefined;
|
|
541
553
|
};
|
|
542
554
|
};
|
|
543
|
-
} | {
|
|
544
|
-
output: {
|
|
545
|
-
error: string;
|
|
546
|
-
};
|
|
547
|
-
outputFormat: "json";
|
|
548
|
-
status: 400 | 404 | 409;
|
|
549
|
-
input: {
|
|
550
|
-
json: {
|
|
551
|
-
task: string;
|
|
552
|
-
agentProfile?: string | undefined;
|
|
553
|
-
};
|
|
554
|
-
};
|
|
555
555
|
};
|
|
556
556
|
};
|
|
557
557
|
}, "/", "/plan">;
|
|
@@ -599,10 +599,34 @@ export declare function createConfigRoutes(deps: ConfigRouteDeps): import("hono/
|
|
|
599
599
|
"/config": {
|
|
600
600
|
$put: {
|
|
601
601
|
output: {
|
|
602
|
-
|
|
602
|
+
archiveOnMerge: boolean | null;
|
|
603
|
+
effectiveArchiveOnMerge: boolean;
|
|
604
|
+
archiveOnMergeSource: "default" | "environment" | "global" | "project";
|
|
605
|
+
baseBranch: string | null;
|
|
606
|
+
defaultRunner: string;
|
|
607
|
+
systemPrompt: string | null;
|
|
608
|
+
defaultModels: {
|
|
609
|
+
[x: string]: string | undefined;
|
|
610
|
+
};
|
|
611
|
+
modelsLocked: boolean;
|
|
612
|
+
maxParallel: number;
|
|
613
|
+
memoryLimitMb: number | null;
|
|
614
|
+
worktreeRetention: number;
|
|
615
|
+
liveTitleUpdates: boolean | null;
|
|
616
|
+
reviewGate: boolean | null;
|
|
617
|
+
worktreeSetup: {
|
|
618
|
+
commands: string[];
|
|
619
|
+
timeoutSeconds: number;
|
|
620
|
+
} | null;
|
|
621
|
+
worktreeSetupIssue: string | null;
|
|
622
|
+
worktreeTeardown: {
|
|
623
|
+
commands: string[];
|
|
624
|
+
timeoutSeconds: number;
|
|
625
|
+
} | null;
|
|
626
|
+
worktreeTeardownIssue: string | null;
|
|
603
627
|
};
|
|
604
628
|
outputFormat: "json";
|
|
605
|
-
status:
|
|
629
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
606
630
|
input: {
|
|
607
631
|
json: {
|
|
608
632
|
archiveOnMerge?: boolean | null | undefined;
|
|
@@ -630,7 +654,7 @@ export declare function createConfigRoutes(deps: ConfigRouteDeps): import("hono/
|
|
|
630
654
|
error: string;
|
|
631
655
|
};
|
|
632
656
|
outputFormat: "json";
|
|
633
|
-
status:
|
|
657
|
+
status: 409;
|
|
634
658
|
input: {
|
|
635
659
|
json: {
|
|
636
660
|
archiveOnMerge?: boolean | null | undefined;
|
|
@@ -655,34 +679,10 @@ export declare function createConfigRoutes(deps: ConfigRouteDeps): import("hono/
|
|
|
655
679
|
};
|
|
656
680
|
} | {
|
|
657
681
|
output: {
|
|
658
|
-
|
|
659
|
-
effectiveArchiveOnMerge: boolean;
|
|
660
|
-
archiveOnMergeSource: "default" | "environment" | "global" | "project";
|
|
661
|
-
baseBranch: string | null;
|
|
662
|
-
defaultRunner: string;
|
|
663
|
-
systemPrompt: string | null;
|
|
664
|
-
defaultModels: {
|
|
665
|
-
[x: string]: string | undefined;
|
|
666
|
-
};
|
|
667
|
-
modelsLocked: boolean;
|
|
668
|
-
maxParallel: number;
|
|
669
|
-
memoryLimitMb: number | null;
|
|
670
|
-
worktreeRetention: number;
|
|
671
|
-
liveTitleUpdates: boolean | null;
|
|
672
|
-
reviewGate: boolean | null;
|
|
673
|
-
worktreeSetup: {
|
|
674
|
-
commands: string[];
|
|
675
|
-
timeoutSeconds: number;
|
|
676
|
-
} | null;
|
|
677
|
-
worktreeSetupIssue: string | null;
|
|
678
|
-
worktreeTeardown: {
|
|
679
|
-
commands: string[];
|
|
680
|
-
timeoutSeconds: number;
|
|
681
|
-
} | null;
|
|
682
|
-
worktreeTeardownIssue: string | null;
|
|
682
|
+
error: string;
|
|
683
683
|
};
|
|
684
684
|
outputFormat: "json";
|
|
685
|
-
status:
|
|
685
|
+
status: 500;
|
|
686
686
|
input: {
|
|
687
687
|
json: {
|
|
688
688
|
archiveOnMerge?: boolean | null | undefined;
|
|
@@ -796,10 +796,14 @@ export declare function createAgentConfigRoutes(capabilities: ServerCapabilities
|
|
|
796
796
|
"/agent-config/:id": {
|
|
797
797
|
$put: {
|
|
798
798
|
output: {
|
|
799
|
-
|
|
799
|
+
id: string;
|
|
800
|
+
path: string;
|
|
801
|
+
exists: boolean;
|
|
802
|
+
content: string;
|
|
803
|
+
version: string | null;
|
|
800
804
|
};
|
|
801
805
|
outputFormat: "json";
|
|
802
|
-
status:
|
|
806
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
803
807
|
input: {
|
|
804
808
|
json: {
|
|
805
809
|
content: string;
|
|
@@ -812,14 +816,10 @@ export declare function createAgentConfigRoutes(capabilities: ServerCapabilities
|
|
|
812
816
|
};
|
|
813
817
|
} | {
|
|
814
818
|
output: {
|
|
815
|
-
|
|
816
|
-
path: string;
|
|
817
|
-
exists: boolean;
|
|
818
|
-
content: string;
|
|
819
|
-
version: string | null;
|
|
819
|
+
error: string;
|
|
820
820
|
};
|
|
821
821
|
outputFormat: "json";
|
|
822
|
-
status:
|
|
822
|
+
status: 404;
|
|
823
823
|
input: {
|
|
824
824
|
json: {
|
|
825
825
|
content: string;
|
|
@@ -941,12 +941,9 @@ export declare function createAgentWebhooksRoutes(deps: AgentWebhooksRouteDeps):
|
|
|
941
941
|
export declare function createSseRoutes(): import("hono/hono-base").HonoBase<ProjectApiEnv, {
|
|
942
942
|
"/runs/:id/events": {
|
|
943
943
|
$get: {
|
|
944
|
-
output: {
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
};
|
|
948
|
-
outputFormat: "json";
|
|
949
|
-
status: 400;
|
|
944
|
+
output: {};
|
|
945
|
+
outputFormat: string;
|
|
946
|
+
status: import("hono/utils/http-status").StatusCode;
|
|
950
947
|
input: {
|
|
951
948
|
param: {
|
|
952
949
|
id: string;
|
|
@@ -958,9 +955,12 @@ export declare function createSseRoutes(): import("hono/hono-base").HonoBase<Pro
|
|
|
958
955
|
};
|
|
959
956
|
};
|
|
960
957
|
} | {
|
|
961
|
-
output: {
|
|
962
|
-
|
|
963
|
-
|
|
958
|
+
output: {
|
|
959
|
+
error: string;
|
|
960
|
+
code?: "invalid_input" | undefined;
|
|
961
|
+
};
|
|
962
|
+
outputFormat: "json";
|
|
963
|
+
status: 400;
|
|
964
964
|
input: {
|
|
965
965
|
param: {
|
|
966
966
|
id: string;
|
|
@@ -173,7 +173,7 @@ export declare function createProvidersRoutes(deps: ProvidersRouteDeps): import(
|
|
|
173
173
|
error: string;
|
|
174
174
|
};
|
|
175
175
|
outputFormat: "json";
|
|
176
|
-
status:
|
|
176
|
+
status: 400;
|
|
177
177
|
input: {
|
|
178
178
|
json: {
|
|
179
179
|
provider: string;
|
|
@@ -185,7 +185,7 @@ export declare function createProvidersRoutes(deps: ProvidersRouteDeps): import(
|
|
|
185
185
|
error: string;
|
|
186
186
|
};
|
|
187
187
|
outputFormat: "json";
|
|
188
|
-
status:
|
|
188
|
+
status: 409;
|
|
189
189
|
input: {
|
|
190
190
|
json: {
|
|
191
191
|
provider: string;
|
|
@@ -293,7 +293,7 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
|
|
|
293
293
|
error: string;
|
|
294
294
|
};
|
|
295
295
|
outputFormat: "json";
|
|
296
|
-
status:
|
|
296
|
+
status: 400;
|
|
297
297
|
input: {
|
|
298
298
|
json: {
|
|
299
299
|
provider: string;
|
|
@@ -306,7 +306,7 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
|
|
|
306
306
|
error: string;
|
|
307
307
|
};
|
|
308
308
|
outputFormat: "json";
|
|
309
|
-
status:
|
|
309
|
+
status: 409;
|
|
310
310
|
input: {
|
|
311
311
|
json: {
|
|
312
312
|
provider: string;
|
|
@@ -384,7 +384,7 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
|
|
|
384
384
|
error: string;
|
|
385
385
|
};
|
|
386
386
|
outputFormat: "json";
|
|
387
|
-
status:
|
|
387
|
+
status: 400;
|
|
388
388
|
input: {
|
|
389
389
|
param: {
|
|
390
390
|
id: string;
|
|
@@ -400,7 +400,7 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
|
|
|
400
400
|
error: string;
|
|
401
401
|
};
|
|
402
402
|
outputFormat: "json";
|
|
403
|
-
status:
|
|
403
|
+
status: 404;
|
|
404
404
|
input: {
|
|
405
405
|
param: {
|
|
406
406
|
id: string;
|
|
@@ -416,7 +416,7 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
|
|
|
416
416
|
error: string;
|
|
417
417
|
};
|
|
418
418
|
outputFormat: "json";
|
|
419
|
-
status:
|
|
419
|
+
status: 409;
|
|
420
420
|
input: {
|
|
421
421
|
param: {
|
|
422
422
|
id: 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;
|