@hearsay-tools/squawk 0.19.0-pr4482.8837 → 0.19.0-pr4484.8849
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/ci-wait/controller.d.ts +7 -7
- package/dist/contract/index.d.ts +1 -0
- package/dist/contract/index.js +33 -7
- package/dist/contract/pull-request-urls.d.ts +20 -0
- package/dist/contract/runs.d.ts +10 -1
- package/dist/core/backend-detect.d.ts +1 -0
- package/dist/core/backend-detect.js +1 -1
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/delegation/routes.d.ts +4 -4
- package/dist/delegation/transport.d.ts +69 -69
- package/dist/runs/pull-requests.d.ts +10 -0
- package/dist/runs/pull-requests.js +30 -19
- package/dist/runs/pull-requests.js.map +1 -1
- package/dist/runs/run-archive.d.ts +1 -0
- package/dist/runs/run-archive.js +14 -4
- package/dist/runs/run-archive.js.map +1 -1
- package/dist/runs/run-decode.d.ts +74 -72
- package/dist/runs/run-exits.d.ts +6 -0
- package/dist/runs/run-references.d.ts +1 -0
- package/dist/runs/run-references.js +7 -6
- package/dist/runs/run-references.js.map +1 -1
- package/dist/runs/store-open.d.ts +7 -1
- package/dist/runs/store-open.js +8 -2
- package/dist/runs/store-open.js.map +1 -1
- package/dist/runs/task-markers.js +1 -1
- package/dist/runs/task-markers.js.map +1 -1
- package/dist/runs/task-refs.d.ts +14 -7
- package/dist/runs/task-refs.js +32 -18
- package/dist/runs/task-refs.js.map +1 -1
- package/dist/server/activity-routes.d.ts +23 -23
- package/dist/server/completion-actions.js +3 -3
- package/dist/server/completion-actions.js.map +1 -1
- package/dist/server/forge/github-mutations.js +4 -2
- package/dist/server/forge/github-mutations.js.map +1 -1
- package/dist/server/forge/github-shared.js +4 -0
- package/dist/server/forge/github-shared.js.map +1 -1
- package/dist/server/project-settings-routes.d.ts +107 -107
- package/dist/server/providers-routes.d.ts +57 -57
- 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 +702 -693
- package/dist/server/server.d.ts +1366 -1348
- package/dist/server/workspace-routes.d.ts +84 -84
- package/dist/workflows/continuation-admission.d.ts +1 -0
- package/dist/workflows/run/wait-engine.d.ts +73 -72
- package/package.json +4 -4
- package/web/dist/assets/accounts-section-BeOGiodx.js +1 -0
- package/web/dist/assets/{activity-motion-BKEnbaU3.js → activity-motion-BraTC90V.js} +1 -1
- package/web/dist/assets/{activity-route-BktC7K27.js → activity-route-BxxLXnNb.js} +1 -1
- package/web/dist/assets/agent-config-section-iEj2kh_m.js +7 -0
- package/web/dist/assets/{agent-defaults-section-Bja_7urR.js → agent-defaults-section-CV2XEvs5.js} +1 -1
- package/web/dist/assets/{appearance-DCnUfFut.js → appearance-DEmDeQ3l.js} +1 -1
- package/web/dist/assets/{archive-on-merge-field-B0qWUHNs.js → archive-on-merge-field-BkwRlcuT.js} +1 -1
- package/web/dist/assets/attention-ILOaW2-t.js +1 -0
- package/web/dist/assets/automations-route-OZkTyuRX.js +2 -0
- package/web/dist/assets/{commit-list-BWK9da82.js → commit-list-PAtV8gyX.js} +1 -1
- package/web/dist/assets/{diff-BVH_RWBz.js → diff-DQk0ICL-.js} +2 -2
- package/web/dist/assets/{diff-controls-DuDm8Ywc.js → diff-controls-Dd5I6mOy.js} +1 -1
- package/web/dist/assets/{diff-view-CGSmQHjf.js → diff-view-B3e1YF2x.js} +1 -1
- package/web/dist/assets/discard-changes-dialog-BoWRfvhX.js +1 -0
- package/web/dist/assets/{file-preview-dLUnWpCG.js → file-preview-ifi0Ad8c.js} +1 -1
- package/web/dist/assets/{folder-browser-sASDxPXD.js → folder-browser-B_jJl4is.js} +1 -1
- package/web/dist/assets/{git-toolbar-C7waT1AJ.js → git-toolbar-D6uMb1LN.js} +1 -1
- package/web/dist/assets/{github-BkLTCoB7.js → github-A5MyAvjo.js} +1 -1
- package/web/dist/assets/{global-activity-route-CXm2vmR-.js → global-activity-route-BkuMl-UC.js} +1 -1
- package/web/dist/assets/index-9mlyFHVt.css +1 -0
- package/web/dist/assets/index-VBdx5s7U.js +21 -0
- package/web/dist/assets/{label-DF0V6WoC.js → label-DMC9mkYa.js} +1 -1
- package/web/dist/assets/{markdown-BODUip-p.js → markdown-CsP_OLyU.js} +1 -1
- package/web/dist/assets/{notifications-section-BoMwLKQj.js → notifications-section-KQJtCs-m.js} +1 -1
- package/web/dist/assets/{open-in-menu-D9VOIWhI.js → open-in-menu-VhRao_Jk.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-BncD5HPr.js → preview-pane-connected-VjTQEceM.js} +3 -3
- package/web/dist/assets/{project-location-BKXBQJPm.js → project-location-DATkk1gA.js} +1 -1
- package/web/dist/assets/{project-router-p_FJwg-L.js → project-router-B9FTk0rB.js} +1 -1
- package/web/dist/assets/{projects-section-C2mLLBLO.js → projects-section-BhabP8vd.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-CwWAsTg5.js → prompt-templates-section-AYpiCjmf.js} +1 -1
- package/web/dist/assets/{queries-C0l1puJe.js → queries-hzlF788B.js} +1 -1
- package/web/dist/assets/{reference-chip--9aRttZG.js → reference-chip-Dgo5aKeb.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-B9h38exH.js → remote-settings-notice-C3iWEGmH.js} +1 -1
- package/web/dist/assets/repo-git-C01PFB-E.js +1 -0
- package/web/dist/assets/{report-reader-B7knRXaW.js → report-reader-nz3V3Lz7.js} +1 -1
- package/web/dist/assets/{report-selection-DQsrMoxl.js → report-selection-C-2DJb8L.js} +1 -1
- package/web/dist/assets/{reports-Dpn_dl7x.js → reports-DtZK4jOB.js} +1 -1
- package/web/dist/assets/{resources-section-BTRVTMVx.js → resources-section-BRzB_Bhb.js} +1 -1
- package/web/dist/assets/review-panel-DHJjHeaB.js +11 -0
- package/web/dist/assets/{run-detail-refresh-DyeLywhA.js → run-detail-refresh-Ye2jcT7n.js} +1 -1
- package/web/dist/assets/run-header-CSijv-YH.js +2 -0
- package/web/dist/assets/{select-B_nJiiFA.js → select-DlNVtWqZ.js} +1 -1
- package/web/dist/assets/{session-context-section-CaYkntsJ.js → session-context-section-Dv1cDixc.js} +2 -2
- package/web/dist/assets/{settings-agent-picker-Dl49O0Uz.js → settings-agent-picker-MdqbXV9H.js} +1 -1
- package/web/dist/assets/settings-shell-CjvGzEXE.js +1 -0
- package/web/dist/assets/{sidebar-section-bs9nIVDs.js → sidebar-section-DZuA4Izw.js} +1 -1
- package/web/dist/assets/{skills-B9orSgbp.js → skills-t0jRn0UI.js} +1 -1
- package/web/dist/assets/{tab-link-9ky9_HfJ.js → tab-link-BlZX-nKP.js} +1 -1
- package/web/dist/assets/{task-changes-CXTuG2Cn.js → task-changes-BNpDXPcl.js} +1 -1
- package/web/dist/assets/{task-commits-B2u2A-CY.js → task-commits-DPP79bjM.js} +1 -1
- package/web/dist/assets/{task-file-scope-Xr7UxjvR.js → task-file-scope-BpAU1GLy.js} +1 -1
- package/web/dist/assets/{task-files-BJnVrRlr.js → task-files-CcXwu4EQ.js} +1 -1
- package/web/dist/assets/task-github-item-DMFboxqX.js +1 -0
- package/web/dist/assets/{task-groups-DDxVSOHs.js → task-groups-DD46syqv.js} +1 -1
- package/web/dist/assets/task-thread-CoRkm48o.js +2 -0
- package/web/dist/assets/tasks-table-D17JLOhe.js +1 -0
- package/web/dist/assets/thread-state-BNR1qG2X.js +4 -0
- package/web/dist/assets/toaster-fWyfEGWF.js +4 -0
- package/web/dist/assets/{use-hand-to-agent-state-BCjGdF1N.js → use-hand-to-agent-state-BFEdVZQu.js} +1 -1
- package/web/dist/assets/workflows-D9I4QGot.js +7 -0
- package/web/dist/assets/{workspace-tools-CW9ltpbo.js → workspace-tools-Jy35o1XD.js} +1 -1
- package/web/dist/assets/{worktrees-section-DleqD_YR.js → worktrees-section-DjWQgjF3.js} +4 -4
- package/web/dist/index.html +14 -14
- package/web/dist/assets/accounts-section-COJzKqsN.js +0 -1
- package/web/dist/assets/agent-config-section-CUbXvXBE.js +0 -7
- package/web/dist/assets/attention-D3JmzDQv.js +0 -1
- package/web/dist/assets/automations-route-BUrEq0VH.js +0 -2
- package/web/dist/assets/index-CDd7AdAu.js +0 -21
- package/web/dist/assets/index-DNgBNd8o.css +0 -1
- package/web/dist/assets/repo-git-CgQA2pWS.js +0 -1
- package/web/dist/assets/review-panel-CuPvmcQp.js +0 -11
- package/web/dist/assets/run-header-UEj20eIu.js +0 -2
- package/web/dist/assets/settings-shell-DZOsC9Iv.js +0 -1
- package/web/dist/assets/task-github-item-DiU77rbk.js +0 -1
- package/web/dist/assets/task-thread-CWZI9Pb7.js +0 -2
- package/web/dist/assets/tasks-table-aF1_yUcS.js +0 -1
- package/web/dist/assets/thread-state-Bfa3qy5W.js +0 -4
- package/web/dist/assets/toaster-BYPWDBoi.js +0 -4
- package/web/dist/assets/workflows-Crhe2aKn.js +0 -7
|
@@ -121,9 +121,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
121
121
|
} & {
|
|
122
122
|
"/api/v1/tools/:name": {
|
|
123
123
|
$post: {
|
|
124
|
-
output:
|
|
124
|
+
output: {
|
|
125
|
+
code: string;
|
|
126
|
+
message: string;
|
|
127
|
+
};
|
|
125
128
|
outputFormat: "json";
|
|
126
|
-
status:
|
|
129
|
+
status: 401;
|
|
127
130
|
input: {
|
|
128
131
|
json: unknown;
|
|
129
132
|
} & {
|
|
@@ -146,12 +149,9 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
146
149
|
};
|
|
147
150
|
};
|
|
148
151
|
} | {
|
|
149
|
-
output:
|
|
150
|
-
code: string;
|
|
151
|
-
message: string;
|
|
152
|
-
};
|
|
152
|
+
output: never;
|
|
153
153
|
outputFormat: "json";
|
|
154
|
-
status:
|
|
154
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
155
155
|
input: {
|
|
156
156
|
json: unknown;
|
|
157
157
|
} & {
|
package/dist/contract/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export * from './scheduled-tasks.ts';
|
|
|
37
37
|
export * from './preview.ts';
|
|
38
38
|
export * from './conversations.ts';
|
|
39
39
|
export * from './ci-wait.ts';
|
|
40
|
+
export * from './pull-request-urls.ts';
|
|
40
41
|
export * from './waits.ts';
|
|
41
42
|
export * from './wait-tools.ts';
|
|
42
43
|
export * from './run-predicates.ts';
|
package/dist/contract/index.js
CHANGED
|
@@ -1449,6 +1449,24 @@ function runWorkflowLabel(run) {
|
|
|
1449
1449
|
var ARCHIVED_RUNS_PAGE_DEFAULT = 50;
|
|
1450
1450
|
var ARCHIVED_RUNS_PAGE_MAX = 200;
|
|
1451
1451
|
|
|
1452
|
+
// ../contract/src/pull-request-urls.ts
|
|
1453
|
+
var DEFAULT_PULL_REQUEST_HOST = "github.com";
|
|
1454
|
+
var PULL_REQUEST_URL = /^(https?):\/\/([a-z0-9](?:[a-z0-9.-]*[a-z0-9])?)(?::([0-9]+))?\/([a-z0-9_.-]+)\/([a-z0-9_.-]+)\/pulls?\/([1-9][0-9]*)\/?(?:[?#][^\s]*)?$/i;
|
|
1455
|
+
function pullRequestUrlParts(value) {
|
|
1456
|
+
const match = PULL_REQUEST_URL.exec(value);
|
|
1457
|
+
if (!match) return void 0;
|
|
1458
|
+
const [, scheme, hostname, port2, owner, repo, digits] = match;
|
|
1459
|
+
const host = hostname.toLowerCase();
|
|
1460
|
+
const number = Number(digits);
|
|
1461
|
+
if (host === DEFAULT_PULL_REQUEST_HOST ? port2 !== void 0 : scheme.toLowerCase() !== "https" || port2 !== void 0 && !serverPort(port2)) return void 0;
|
|
1462
|
+
if ([owner, repo].some((segment) => segment === "." || segment === "..") || !Number.isSafeInteger(number)) return void 0;
|
|
1463
|
+
return { host: port2 === void 0 ? host : `${host}:${port2}`, owner, repo, number };
|
|
1464
|
+
}
|
|
1465
|
+
function serverPort(port2) {
|
|
1466
|
+
const value = Number(port2);
|
|
1467
|
+
return /^[1-9][0-9]*$/.test(port2) && value <= 65535 && value !== 443;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1452
1470
|
// ../contract/src/queued-messages.ts
|
|
1453
1471
|
import { z as z19 } from "zod";
|
|
1454
1472
|
var queuedMessageSchema = z19.object({
|
|
@@ -1514,11 +1532,11 @@ function utf8Bytes(value) {
|
|
|
1514
1532
|
// ../contract/src/ci-wait.ts
|
|
1515
1533
|
var CI_WAIT_LIMITATION = "Passing reported checks does not prove that every expected workflow has appeared or that the PR is merge-ready. This observation is not merge approval.";
|
|
1516
1534
|
var CI_WAIT_RECEIPT_INSTRUCTION = "End your turn to wait for CI; no marker is needed. " + CI_WAIT_LIMITATION;
|
|
1517
|
-
var prPattern = /^https:\/\/
|
|
1518
|
-
var ciPrUrlSchema = z20.string().max(2048).regex(prPattern).refine(
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1535
|
+
var prPattern = /^https:\/\/[a-zA-Z0-9](?:[a-zA-Z0-9.-]*[a-zA-Z0-9])?(?::[0-9]+)?\/[a-zA-Z0-9_-]+\/[a-zA-Z0-9_.-]+\/pulls?\/[1-9][0-9]*$/;
|
|
1536
|
+
var ciPrUrlSchema = z20.string().max(2048).regex(prPattern).refine(
|
|
1537
|
+
(value) => pullRequestUrlParts(value) !== void 0,
|
|
1538
|
+
"Expected an HTTPS PR URL with a positive integer PR number"
|
|
1539
|
+
);
|
|
1522
1540
|
var prWaitUntilSchema = z20.enum(["checks", "merge", "merge_or_blocked"]);
|
|
1523
1541
|
var prWaitChecksSchema = z20.enum(["required", "all"]);
|
|
1524
1542
|
var ciWaitRequestSchema = z20.object({
|
|
@@ -2080,6 +2098,7 @@ function nextLineIndex(text, index) {
|
|
|
2080
2098
|
|
|
2081
2099
|
// ../contract/src/runs.ts
|
|
2082
2100
|
var archivePullRequestIdentitySchema = z23.object({
|
|
2101
|
+
host: z23.string().min(1).optional(),
|
|
2083
2102
|
owner: z23.string().min(1),
|
|
2084
2103
|
repo: z23.string().min(1),
|
|
2085
2104
|
number: z23.number().int().positive()
|
|
@@ -2169,11 +2188,16 @@ var runWorktreeSetupSchema = z23.object({
|
|
|
2169
2188
|
/** One line: "`npm ci` exited 1", "`npm ci` timed out after 900s", "invalid config: …". */
|
|
2170
2189
|
error: z23.string().optional()
|
|
2171
2190
|
});
|
|
2191
|
+
var SAVED_GITHUB_PULL_REQUEST_URL = /^https?:\/\/github\.com\/[a-z0-9_.-]+\/[a-z0-9_.-]+\/pull\/(\d+)\/?(?:[?#][^\s]*)?$/i;
|
|
2192
|
+
function recordUrlNumber(url) {
|
|
2193
|
+
const saved = SAVED_GITHUB_PULL_REQUEST_URL.exec(url);
|
|
2194
|
+
return pullRequestUrlParts(url)?.number ?? (saved ? Number(saved[1]) : void 0);
|
|
2195
|
+
}
|
|
2172
2196
|
var runPullRequestSchema = z23.object({
|
|
2173
2197
|
number: z23.number().int().positive().lt(1e7),
|
|
2174
|
-
url: z23.string().
|
|
2198
|
+
url: z23.string().refine((url) => recordUrlNumber(url) !== void 0, { message: "Expected a PR URL" }).optional(),
|
|
2175
2199
|
source: z23.enum(["declared", "created"])
|
|
2176
|
-
}).refine((entry) => entry.url === void 0 ||
|
|
2200
|
+
}).refine((entry) => entry.url === void 0 || recordUrlNumber(entry.url) === entry.number, { message: "PR URL and number must agree" });
|
|
2177
2201
|
var workflowCursorSchema = z23.object({ stepId: z23.string(), mode: z23.enum(["resume", "start"]) });
|
|
2178
2202
|
var doneAcceptedSchema = z23.object({
|
|
2179
2203
|
session: z23.string(),
|
|
@@ -6429,6 +6453,7 @@ export {
|
|
|
6429
6453
|
CONVERSATION_PAGE_MESSAGES,
|
|
6430
6454
|
DEFAULT_AGENT_ACCOUNT_ID,
|
|
6431
6455
|
DEFAULT_CONVERSATION_REQUEST_SECONDS,
|
|
6456
|
+
DEFAULT_PULL_REQUEST_HOST,
|
|
6432
6457
|
DEFAULT_WEBHOOK_TRIGGERS,
|
|
6433
6458
|
EFFORT_LEVELS,
|
|
6434
6459
|
FILE_ATTACHMENT_MEDIA_TYPES,
|
|
@@ -6899,6 +6924,7 @@ export {
|
|
|
6899
6924
|
providerStatusSchema,
|
|
6900
6925
|
providersRequiredByWorkflow,
|
|
6901
6926
|
publishedArtifactSchema,
|
|
6927
|
+
pullRequestUrlParts,
|
|
6902
6928
|
queryRunnerSchema,
|
|
6903
6929
|
queryValue,
|
|
6904
6930
|
queuedMessagePatchSchema,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PR web URLs on any forge host (hearsay-tools/squawk#4472). Node-free: the run record, the PR
|
|
3
|
+
* wait request and the service's PR identity parser (`runs/pull-requests.ts`) share this grammar.
|
|
4
|
+
*/
|
|
5
|
+
/** The host a PR URL or identity names when it names none. */
|
|
6
|
+
export declare const DEFAULT_PULL_REQUEST_HOST = "github.com";
|
|
7
|
+
/** The parts of a PR web URL (decision 7 of `.ai/specs/2026-11-28-forge-plugin-seam.md`). */
|
|
8
|
+
export interface PullRequestUrlParts {
|
|
9
|
+
host: string;
|
|
10
|
+
owner: string;
|
|
11
|
+
repo: string;
|
|
12
|
+
number: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* `https://<host>/<owner>/<repo>/pull/N` or `.../pulls/N`, with an optional trailing slash,
|
|
16
|
+
* query or fragment. The host keeps a non-default port (`git.example.com:3000`); an explicit
|
|
17
|
+
* `:443` is refused. `github.com` takes no port and also `http`, as saved records hold it. A
|
|
18
|
+
* GitLab `/-/merge_requests/N` path is refused. Host is lowercase; owner and repo keep their case.
|
|
19
|
+
*/
|
|
20
|
+
export declare function pullRequestUrlParts(value: string): PullRequestUrlParts | undefined;
|
package/dist/contract/runs.d.ts
CHANGED
|
@@ -19,14 +19,19 @@ export { runStatusSchema, type RunStatus, stepStatusSchema, type StepStatus, ste
|
|
|
19
19
|
* keys. The client narrows on which key is present, and the DTO's flattened shape allowed
|
|
20
20
|
* `{}` — a payload the route cannot produce.
|
|
21
21
|
*/
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Canonical PR authority retained with an automatic archive receipt. A missing `host` means
|
|
24
|
+
* `github.com`, so identities saved before hosts existed read unchanged (hearsay-tools/squawk#4472).
|
|
25
|
+
*/
|
|
23
26
|
export declare const archivePullRequestIdentitySchema: z.ZodObject<{
|
|
27
|
+
host: z.ZodOptional<z.ZodString>;
|
|
24
28
|
owner: z.ZodString;
|
|
25
29
|
repo: z.ZodString;
|
|
26
30
|
number: z.ZodNumber;
|
|
27
31
|
}, z.core.$strip>;
|
|
28
32
|
export type ArchivePullRequestIdentity = z.infer<typeof archivePullRequestIdentitySchema>;
|
|
29
33
|
export declare const mergedPullRequestSchema: z.ZodObject<{
|
|
34
|
+
host: z.ZodOptional<z.ZodString>;
|
|
30
35
|
owner: z.ZodString;
|
|
31
36
|
repo: z.ZodString;
|
|
32
37
|
number: z.ZodNumber;
|
|
@@ -38,6 +43,7 @@ export declare const autoArchiveReceiptSchema: z.ZodObject<{
|
|
|
38
43
|
archivedAt: z.ZodString;
|
|
39
44
|
fingerprint: z.ZodString;
|
|
40
45
|
pullRequests: z.ZodArray<z.ZodObject<{
|
|
46
|
+
host: z.ZodOptional<z.ZodString>;
|
|
41
47
|
owner: z.ZodString;
|
|
42
48
|
repo: z.ZodString;
|
|
43
49
|
number: z.ZodNumber;
|
|
@@ -2139,6 +2145,7 @@ export declare const runRecordSchema: z.ZodObject<{
|
|
|
2139
2145
|
archivedAt: z.ZodString;
|
|
2140
2146
|
fingerprint: z.ZodString;
|
|
2141
2147
|
pullRequests: z.ZodArray<z.ZodObject<{
|
|
2148
|
+
host: z.ZodOptional<z.ZodString>;
|
|
2142
2149
|
owner: z.ZodString;
|
|
2143
2150
|
repo: z.ZodString;
|
|
2144
2151
|
number: z.ZodNumber;
|
|
@@ -4204,6 +4211,7 @@ export declare const apiRunSchema: z.ZodObject<{
|
|
|
4204
4211
|
archivedAt: z.ZodString;
|
|
4205
4212
|
fingerprint: z.ZodString;
|
|
4206
4213
|
pullRequests: z.ZodArray<z.ZodObject<{
|
|
4214
|
+
host: z.ZodOptional<z.ZodString>;
|
|
4207
4215
|
owner: z.ZodString;
|
|
4208
4216
|
repo: z.ZodString;
|
|
4209
4217
|
number: z.ZodNumber;
|
|
@@ -7070,6 +7078,7 @@ export declare const createRunResponseSchema: z.ZodObject<{
|
|
|
7070
7078
|
archivedAt: z.ZodString;
|
|
7071
7079
|
fingerprint: z.ZodString;
|
|
7072
7080
|
pullRequests: z.ZodArray<z.ZodObject<{
|
|
7081
|
+
host: z.ZodOptional<z.ZodString>;
|
|
7073
7082
|
owner: z.ZodString;
|
|
7074
7083
|
repo: z.ZodString;
|
|
7075
7084
|
number: z.ZodNumber;
|
|
@@ -27,5 +27,6 @@ export declare function environmentStamp(env?: NodeJS.ProcessEnv): Promise<strin
|
|
|
27
27
|
* the PATH name, a `--version` call, and the definition's hints.
|
|
28
28
|
*/
|
|
29
29
|
export declare function probeRunner(name: string, detection: RunnerDetection): Promise<BackendCheck>;
|
|
30
|
+
export declare function probeGh(): Promise<BackendCheck>;
|
|
30
31
|
/** The host's GitHub token: logged-in `gh` first, `GITHUB_TOKEN` fallback. */
|
|
31
32
|
export declare function readHostGithubToken(): Promise<string | null>;
|
|
@@ -111,7 +111,7 @@ export async function probeRunner(name, detection) {
|
|
|
111
111
|
return { name, available: false, hint: detection.missingHint };
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
async function probeGh() {
|
|
114
|
+
export async function probeGh() {
|
|
115
115
|
try {
|
|
116
116
|
const { stdout } = await exec('gh', ['auth', 'token'], { timeout: 10_000 });
|
|
117
117
|
return { name: 'gh', available: stdout.trim().length > 0, version: 'authenticated' };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-detect.js","sourceRoot":"","sources":["../../src/core/backend-detect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,UA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AM,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5E,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,8BAA8B;IAChC,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC;AAClD,CAAC"}
|
|
@@ -247,13 +247,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
247
247
|
status: 200;
|
|
248
248
|
input: {
|
|
249
249
|
json: {
|
|
250
|
-
workerIds: string[];
|
|
251
|
-
timeoutSeconds?: number | undefined;
|
|
252
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
253
|
-
} | {
|
|
254
250
|
requestIds: string[];
|
|
255
251
|
mode?: "all" | "any" | "one" | undefined;
|
|
256
252
|
timeoutSeconds?: number | undefined;
|
|
253
|
+
} | {
|
|
254
|
+
workerIds: string[];
|
|
255
|
+
timeoutSeconds?: number | undefined;
|
|
256
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
257
257
|
} | {
|
|
258
258
|
peerIds: string[];
|
|
259
259
|
timeoutSeconds?: number | undefined;
|
|
@@ -2,6 +2,18 @@ import type { DelegationRoutes } from './routes.ts';
|
|
|
2
2
|
export declare function createDelegationApp(routes: DelegationRoutes): import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
3
3
|
"/list": {
|
|
4
4
|
$get: {
|
|
5
|
+
output: {
|
|
6
|
+
error: string;
|
|
7
|
+
code?: "invalid_input" | undefined;
|
|
8
|
+
};
|
|
9
|
+
outputFormat: "json";
|
|
10
|
+
status: 400;
|
|
11
|
+
input: {
|
|
12
|
+
query: {
|
|
13
|
+
offset?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
} | {
|
|
5
17
|
output: {
|
|
6
18
|
workers: {
|
|
7
19
|
workerId: string;
|
|
@@ -54,18 +66,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
54
66
|
offset?: string | undefined;
|
|
55
67
|
};
|
|
56
68
|
};
|
|
57
|
-
} | {
|
|
58
|
-
output: {
|
|
59
|
-
error: string;
|
|
60
|
-
code?: "invalid_input" | undefined;
|
|
61
|
-
};
|
|
62
|
-
outputFormat: "json";
|
|
63
|
-
status: 400;
|
|
64
|
-
input: {
|
|
65
|
-
query: {
|
|
66
|
-
offset?: string | undefined;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
71
|
} & {
|
|
@@ -222,13 +222,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
222
222
|
status: 200;
|
|
223
223
|
input: {
|
|
224
224
|
json: {
|
|
225
|
-
requestIds: string[];
|
|
226
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
227
|
-
timeoutSeconds?: number | undefined;
|
|
228
|
-
} | {
|
|
229
225
|
workerIds: string[];
|
|
230
226
|
timeoutSeconds?: number | undefined;
|
|
231
227
|
mode?: "all" | "any" | "one" | undefined;
|
|
228
|
+
} | {
|
|
229
|
+
requestIds: string[];
|
|
230
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
231
|
+
timeoutSeconds?: number | undefined;
|
|
232
232
|
} | {
|
|
233
233
|
peerIds: string[];
|
|
234
234
|
timeoutSeconds?: number | undefined;
|
|
@@ -652,6 +652,18 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
652
652
|
} & {
|
|
653
653
|
"/:workerId": {
|
|
654
654
|
$get: {
|
|
655
|
+
output: {
|
|
656
|
+
error: string;
|
|
657
|
+
code?: "invalid_input" | undefined;
|
|
658
|
+
};
|
|
659
|
+
outputFormat: "json";
|
|
660
|
+
status: 400;
|
|
661
|
+
input: {
|
|
662
|
+
param: {
|
|
663
|
+
workerId: string;
|
|
664
|
+
};
|
|
665
|
+
};
|
|
666
|
+
} | {
|
|
655
667
|
output: {
|
|
656
668
|
workerId: string;
|
|
657
669
|
settled: boolean;
|
|
@@ -776,7 +788,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
776
788
|
workerId: string;
|
|
777
789
|
};
|
|
778
790
|
};
|
|
779
|
-
}
|
|
791
|
+
};
|
|
792
|
+
};
|
|
793
|
+
} & {
|
|
794
|
+
"/:workerId/collect": {
|
|
795
|
+
$post: {
|
|
780
796
|
output: {
|
|
781
797
|
error: string;
|
|
782
798
|
code?: "invalid_input" | undefined;
|
|
@@ -787,12 +803,10 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
787
803
|
param: {
|
|
788
804
|
workerId: string;
|
|
789
805
|
};
|
|
806
|
+
} & {
|
|
807
|
+
json: Record<string, never>;
|
|
790
808
|
};
|
|
791
|
-
}
|
|
792
|
-
};
|
|
793
|
-
} & {
|
|
794
|
-
"/:workerId/collect": {
|
|
795
|
-
$post: {
|
|
809
|
+
} | {
|
|
796
810
|
output: {
|
|
797
811
|
workerId: string;
|
|
798
812
|
parentRunId: string;
|
|
@@ -915,7 +929,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
915
929
|
} & {
|
|
916
930
|
json: Record<string, never>;
|
|
917
931
|
};
|
|
918
|
-
}
|
|
932
|
+
};
|
|
933
|
+
};
|
|
934
|
+
} & {
|
|
935
|
+
"/:workerId/steer": {
|
|
936
|
+
$post: {
|
|
919
937
|
output: {
|
|
920
938
|
error: string;
|
|
921
939
|
code?: "invalid_input" | undefined;
|
|
@@ -927,13 +945,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
927
945
|
workerId: string;
|
|
928
946
|
};
|
|
929
947
|
} & {
|
|
930
|
-
json:
|
|
948
|
+
json: {
|
|
949
|
+
text: string;
|
|
950
|
+
};
|
|
931
951
|
};
|
|
932
|
-
}
|
|
933
|
-
};
|
|
934
|
-
} & {
|
|
935
|
-
"/:workerId/steer": {
|
|
936
|
-
$post: {
|
|
952
|
+
} | {
|
|
937
953
|
output: {
|
|
938
954
|
workerId: string;
|
|
939
955
|
state: "delivered" | "queued";
|
|
@@ -949,7 +965,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
949
965
|
text: string;
|
|
950
966
|
};
|
|
951
967
|
};
|
|
952
|
-
}
|
|
968
|
+
};
|
|
969
|
+
};
|
|
970
|
+
} & {
|
|
971
|
+
"/:workerId/stop": {
|
|
972
|
+
$post: {
|
|
953
973
|
output: {
|
|
954
974
|
error: string;
|
|
955
975
|
code?: "invalid_input" | undefined;
|
|
@@ -961,15 +981,9 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
961
981
|
workerId: string;
|
|
962
982
|
};
|
|
963
983
|
} & {
|
|
964
|
-
json:
|
|
965
|
-
text: string;
|
|
966
|
-
};
|
|
984
|
+
json: Record<string, never>;
|
|
967
985
|
};
|
|
968
|
-
}
|
|
969
|
-
};
|
|
970
|
-
} & {
|
|
971
|
-
"/:workerId/stop": {
|
|
972
|
-
$post: {
|
|
986
|
+
} | {
|
|
973
987
|
output: {
|
|
974
988
|
workerId: string;
|
|
975
989
|
state: "stopping" | "terminated";
|
|
@@ -983,7 +997,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
983
997
|
} & {
|
|
984
998
|
json: Record<string, never>;
|
|
985
999
|
};
|
|
986
|
-
}
|
|
1000
|
+
};
|
|
1001
|
+
};
|
|
1002
|
+
} & {
|
|
1003
|
+
"/:workerId/destroy": {
|
|
1004
|
+
$post: {
|
|
987
1005
|
output: {
|
|
988
1006
|
error: string;
|
|
989
1007
|
code?: "invalid_input" | undefined;
|
|
@@ -995,13 +1013,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
995
1013
|
workerId: string;
|
|
996
1014
|
};
|
|
997
1015
|
} & {
|
|
998
|
-
json:
|
|
1016
|
+
json: {
|
|
1017
|
+
discardWork?: true | undefined;
|
|
1018
|
+
};
|
|
999
1019
|
};
|
|
1000
|
-
}
|
|
1001
|
-
};
|
|
1002
|
-
} & {
|
|
1003
|
-
"/:workerId/destroy": {
|
|
1004
|
-
$post: {
|
|
1020
|
+
} | {
|
|
1005
1021
|
output: {
|
|
1006
1022
|
workerId: string;
|
|
1007
1023
|
state: "complete" | "incomplete";
|
|
@@ -1030,22 +1046,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
1030
1046
|
discardWork?: true | undefined;
|
|
1031
1047
|
};
|
|
1032
1048
|
};
|
|
1033
|
-
} | {
|
|
1034
|
-
output: {
|
|
1035
|
-
error: string;
|
|
1036
|
-
code?: "invalid_input" | undefined;
|
|
1037
|
-
};
|
|
1038
|
-
outputFormat: "json";
|
|
1039
|
-
status: 400;
|
|
1040
|
-
input: {
|
|
1041
|
-
param: {
|
|
1042
|
-
workerId: string;
|
|
1043
|
-
};
|
|
1044
|
-
} & {
|
|
1045
|
-
json: {
|
|
1046
|
-
discardWork?: true | undefined;
|
|
1047
|
-
};
|
|
1048
|
-
};
|
|
1049
1049
|
} | {
|
|
1050
1050
|
output: {
|
|
1051
1051
|
workerId: string;
|
|
@@ -1081,13 +1081,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
1081
1081
|
"/:workerId/diff": {
|
|
1082
1082
|
$get: {
|
|
1083
1083
|
output: {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
diff: string;
|
|
1087
|
-
truncated: boolean;
|
|
1084
|
+
error: string;
|
|
1085
|
+
code?: "invalid_input" | undefined;
|
|
1088
1086
|
};
|
|
1089
1087
|
outputFormat: "json";
|
|
1090
|
-
status:
|
|
1088
|
+
status: 400;
|
|
1091
1089
|
input: {
|
|
1092
1090
|
param: {
|
|
1093
1091
|
workerId: string;
|
|
@@ -1095,11 +1093,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
1095
1093
|
};
|
|
1096
1094
|
} | {
|
|
1097
1095
|
output: {
|
|
1098
|
-
|
|
1099
|
-
|
|
1096
|
+
workerId: string;
|
|
1097
|
+
baselineSha: string;
|
|
1098
|
+
diff: string;
|
|
1099
|
+
truncated: boolean;
|
|
1100
1100
|
};
|
|
1101
1101
|
outputFormat: "json";
|
|
1102
|
-
status:
|
|
1102
|
+
status: 200;
|
|
1103
1103
|
input: {
|
|
1104
1104
|
param: {
|
|
1105
1105
|
workerId: string;
|
|
@@ -11,4 +11,14 @@ export declare function archivePullRequests(family: readonly {
|
|
|
11
11
|
referencedPullRequestUrl?: string | undefined;
|
|
12
12
|
prNumber?: number | undefined;
|
|
13
13
|
}[], repoBase?: string): ArchivePullRequestIdentity[] | undefined;
|
|
14
|
+
/** `owner/repo#n` on `github.com`, as keys saved before other hosts read; `host/owner/repo#n` elsewhere. */
|
|
14
15
|
export declare function pullRequestKey(identity: ArchivePullRequestIdentity): string;
|
|
16
|
+
/** The identity's host; an identity without one names `github.com`. */
|
|
17
|
+
export declare function pullRequestHost(identity: Pick<ArchivePullRequestIdentity, 'host'>): string;
|
|
18
|
+
export declare function sameRepository(a: ArchivePullRequestIdentity, b: ArchivePullRequestIdentity): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The PR identity a web URL names, on any host (`pullRequestUrlParts`), or undefined. Owner and
|
|
21
|
+
* repo are lowercase. A `github.com` identity has no `host`, so it equals the identity saved
|
|
22
|
+
* before other hosts existed.
|
|
23
|
+
*/
|
|
24
|
+
export declare function parsePullRequestUrl(value: string): ArchivePullRequestIdentity | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { runPullRequestSchema } from '../contract/index.js';
|
|
2
|
+
import { DEFAULT_PULL_REQUEST_HOST, pullRequestUrlParts } from '../contract/index.js';
|
|
2
3
|
/** Compare repository identities rather than URL formatting or reference numbers alone. */
|
|
3
4
|
function repository(url) {
|
|
4
5
|
const parsed = new URL(url);
|
|
5
|
-
return `${parsed.
|
|
6
|
+
return `${parsed.host}${parsed.pathname.split('/').slice(0, 3).join('/')}`.toLowerCase();
|
|
6
7
|
}
|
|
7
8
|
/** Stable, immutable union. Numeric declarations belong to the project only when it is known. */
|
|
8
9
|
export function mergePullRequests(current, incoming, repoBase) {
|
|
@@ -30,12 +31,12 @@ export function ownPullRequestNumbers(run, repoBase) {
|
|
|
30
31
|
const legacyUrls = [run.pullRequestUrl, run.referencedPullRequestUrl].filter((url) => url !== undefined);
|
|
31
32
|
const entries = [...(run.pullRequests ?? [])];
|
|
32
33
|
for (const url of legacyUrls) {
|
|
33
|
-
const number =
|
|
34
|
-
if (
|
|
34
|
+
const number = parsePullRequestUrl(url)?.number;
|
|
35
|
+
if (number !== undefined)
|
|
35
36
|
entries.push({ number, url, source: 'created' });
|
|
36
37
|
}
|
|
37
38
|
for (const number of [run.prNumber, run.markerRefs?.pr]) {
|
|
38
|
-
if (number === undefined || legacyUrls.some(url =>
|
|
39
|
+
if (number === undefined || legacyUrls.some(url => parsePullRequestUrl(url)?.number === number))
|
|
39
40
|
continue;
|
|
40
41
|
entries.push({ number, source: 'declared' });
|
|
41
42
|
}
|
|
@@ -52,7 +53,7 @@ export function ownPullRequestNumbers(run, repoBase) {
|
|
|
52
53
|
}
|
|
53
54
|
/** Fail closed over the COMPLETE collection, including unresolved or malformed members. */
|
|
54
55
|
export function archivePullRequests(family, repoBase) {
|
|
55
|
-
const own = repoBase ?
|
|
56
|
+
const own = repoBase ? parsePullRequestUrl(`${repoBase.replace(/\/$/, '')}/pull/1`) : undefined;
|
|
56
57
|
const result = new Map();
|
|
57
58
|
for (const run of family) {
|
|
58
59
|
if (run.pullRequests !== undefined) {
|
|
@@ -63,34 +64,44 @@ export function archivePullRequests(family, repoBase) {
|
|
|
63
64
|
if (!parsed.success)
|
|
64
65
|
return undefined;
|
|
65
66
|
const entry = parsed.data;
|
|
66
|
-
const identity = entry.url ?
|
|
67
|
+
const identity = entry.url ? parsePullRequestUrl(entry.url) : own ? { ...own, number: entry.number } : undefined;
|
|
67
68
|
if (!identity || identity.number !== entry.number)
|
|
68
69
|
return undefined;
|
|
69
70
|
result.set(pullRequestKey(identity), identity);
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
else if (run.pullRequestUrl !== undefined) {
|
|
73
|
-
const identity =
|
|
74
|
-
if (!identity || !own || identity
|
|
74
|
+
const identity = parsePullRequestUrl(run.pullRequestUrl);
|
|
75
|
+
if (!identity || !own || !sameRepository(identity, own))
|
|
75
76
|
return undefined;
|
|
76
77
|
result.set(pullRequestKey(identity), identity);
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
return result.size ? [...result].sort(([a], [b]) => a.localeCompare(b)).map(([, identity]) => identity) : undefined;
|
|
80
81
|
}
|
|
82
|
+
/** `owner/repo#n` on `github.com`, as keys saved before other hosts read; `host/owner/repo#n` elsewhere. */
|
|
81
83
|
export function pullRequestKey(identity) {
|
|
82
|
-
|
|
84
|
+
const host = pullRequestHost(identity);
|
|
85
|
+
const repository = `${identity.owner.toLowerCase()}/${identity.repo.toLowerCase()}#${identity.number}`;
|
|
86
|
+
return host === DEFAULT_PULL_REQUEST_HOST ? repository : `${host}/${repository}`;
|
|
83
87
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
/** The identity's host; an identity without one names `github.com`. */
|
|
89
|
+
export function pullRequestHost(identity) {
|
|
90
|
+
return identity.host?.toLowerCase() ?? DEFAULT_PULL_REQUEST_HOST;
|
|
91
|
+
}
|
|
92
|
+
export function sameRepository(a, b) {
|
|
93
|
+
return pullRequestHost(a) === pullRequestHost(b) && a.owner.toLowerCase() === b.owner.toLowerCase() && a.repo.toLowerCase() === b.repo.toLowerCase();
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The PR identity a web URL names, on any host (`pullRequestUrlParts`), or undefined. Owner and
|
|
97
|
+
* repo are lowercase. A `github.com` identity has no `host`, so it equals the identity saved
|
|
98
|
+
* before other hosts existed.
|
|
99
|
+
*/
|
|
100
|
+
export function parsePullRequestUrl(value) {
|
|
101
|
+
const parts = pullRequestUrlParts(value);
|
|
102
|
+
if (!parts)
|
|
93
103
|
return undefined;
|
|
94
|
-
}
|
|
104
|
+
const identity = { owner: parts.owner.toLowerCase(), repo: parts.repo.toLowerCase(), number: parts.number };
|
|
105
|
+
return parts.host === DEFAULT_PULL_REQUEST_HOST ? identity : { host: parts.host, ...identity };
|
|
95
106
|
}
|
|
96
107
|
//# sourceMappingURL=pull-requests.js.map
|