@open-mercato/cezar 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -11
- package/dist/agent-config/catalog.d.ts +1 -1
- package/dist/agent-config/files.d.ts +1 -1
- package/dist/agent-config/service.d.ts +1 -1
- package/dist/agent-config/validate.d.ts +1 -1
- package/dist/automations/coordinator.d.ts +26 -0
- package/dist/automations/coordinator.js +66 -0
- package/dist/automations/coordinator.js.map +1 -0
- package/dist/automations/github-poller.d.ts +74 -0
- package/dist/automations/github-poller.js +234 -0
- package/dist/automations/github-poller.js.map +1 -0
- package/dist/automations/scheduler.d.ts +42 -0
- package/dist/automations/scheduler.js +192 -0
- package/dist/automations/scheduler.js.map +1 -0
- package/dist/automations/store.d.ts +65 -0
- package/dist/automations/store.js +298 -0
- package/dist/automations/store.js.map +1 -0
- package/dist/automations/task-template.d.ts +18 -0
- package/dist/automations/task-template.js +95 -0
- package/dist/automations/task-template.js.map +1 -0
- package/dist/automations/types.d.ts +251 -0
- package/dist/automations/types.js +158 -0
- package/dist/automations/types.js.map +1 -0
- package/dist/config.d.ts +9 -111
- package/dist/contract/agent-config.d.ts +151 -0
- package/dist/contract/automations.d.ts +911 -0
- package/dist/contract/events.d.ts +45 -0
- package/dist/contract/github.d.ts +467 -0
- package/dist/contract/health.d.ts +96 -0
- package/dist/contract/index.d.ts +15 -0
- package/dist/contract/index.js +1421 -0
- package/dist/contract/projects.d.ts +182 -0
- package/dist/contract/repo.d.ts +234 -0
- package/dist/contract/runs.d.ts +1226 -0
- package/dist/contract/skills.d.ts +225 -0
- package/dist/contract/workflows.d.ts +212 -0
- package/dist/contract/workspace.d.ts +442 -0
- package/dist/core/agent-env.d.ts +1 -1
- package/dist/core/agent-runner.d.ts +12 -1
- package/dist/core/agent-runner.js +13 -0
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/ask.d.ts +45 -124
- package/dist/core/ask.js +103 -13
- package/dist/core/ask.js.map +1 -1
- package/dist/core/claude-cli-runner.d.ts +2 -2
- package/dist/core/claude-cli-runner.js +52 -9
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/claude-ui-mapper.d.ts +1 -1
- package/dist/core/codex-app-server-runner.d.ts +1 -1
- package/dist/core/codex-app-server-runner.js +55 -3
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/codex-app-server-transport.d.ts +6 -1
- package/dist/core/codex-app-server-transport.js +12 -3
- package/dist/core/codex-app-server-transport.js.map +1 -1
- package/dist/core/codex-model-catalog.d.ts +1 -1
- package/dist/core/codex-ui-mapper.d.ts +5 -1
- package/dist/core/codex-ui-mapper.js +74 -17
- package/dist/core/codex-ui-mapper.js.map +1 -1
- package/dist/core/model-identity.d.ts +1 -1
- package/dist/core/model-presets.d.ts +2 -2
- package/dist/core/model-presets.js +1 -1
- package/dist/core/opencode-server-runner.d.ts +2 -2
- package/dist/core/opencode-ui-mapper.d.ts +4 -1
- package/dist/core/opencode-ui-mapper.js +45 -7
- package/dist/core/opencode-ui-mapper.js.map +1 -1
- package/dist/core/provider-auth.d.ts +62 -0
- package/dist/core/provider-auth.js +290 -0
- package/dist/core/provider-auth.js.map +1 -0
- package/dist/core/provider-availability.d.ts +3 -0
- package/dist/core/provider-availability.js +13 -0
- package/dist/core/provider-availability.js.map +1 -0
- package/dist/core/runner-factory.d.ts +1 -1
- package/dist/core/runner-model-catalog.d.ts +1 -1
- package/dist/core/tool-display.d.ts +1 -1
- package/dist/core/ui-events.d.ts +1 -1
- package/dist/core/ui-events.js +1 -1
- package/dist/git-diff-base.d.ts +60 -0
- package/dist/git-diff-base.js +54 -0
- package/dist/git-diff-base.js.map +1 -0
- package/dist/git-worktree.d.ts +37 -6
- package/dist/git-worktree.js +39 -9
- package/dist/git-worktree.js.map +1 -1
- package/dist/handoff.d.ts +2 -2
- package/dist/handoff.js +1 -1
- package/dist/index.js +65 -8
- package/dist/index.js.map +1 -1
- package/dist/paths.d.ts +16 -1
- package/dist/paths.js +24 -1
- package/dist/paths.js.map +1 -1
- package/dist/planner.d.ts +2 -2
- package/dist/planner.js +1 -1
- package/dist/planner.js.map +1 -1
- package/dist/release/manifests.d.ts +81 -0
- package/dist/release/manifests.js +74 -0
- package/dist/release/manifests.js.map +1 -0
- package/dist/release/snapshot.d.ts +9 -23
- package/dist/release/snapshot.js +9 -22
- package/dist/release/snapshot.js.map +1 -1
- package/dist/release/stable.d.ts +15 -29
- package/dist/release/stable.js +14 -27
- package/dist/release/stable.js.map +1 -1
- package/dist/runs/auto-name.d.ts +1 -1
- package/dist/runs/retention.d.ts +1 -1
- package/dist/runs/store.d.ts +142 -336
- package/dist/runs/store.js +136 -9
- package/dist/runs/store.js.map +1 -1
- package/dist/runs/ui-event-sink.d.ts +1 -1
- package/dist/server/app-type.d.ts +21 -0
- package/dist/server/app-type.js +2 -0
- package/dist/server/app-type.js.map +1 -0
- package/dist/server/capabilities.d.ts +6 -5
- package/dist/server/capabilities.js +11 -0
- package/dist/server/capabilities.js.map +1 -1
- package/dist/server/forge/github.d.ts +58 -151
- package/dist/server/forge/github.js +530 -6
- package/dist/server/forge/github.js.map +1 -1
- package/dist/server/forge/index.d.ts +10 -3
- package/dist/server/forge/index.js +14 -1
- package/dist/server/forge/index.js.map +1 -1
- package/dist/server/forge/types.d.ts +86 -1
- package/dist/server/git-changes.d.ts +8 -8
- package/dist/server/git-changes.js +14 -17
- package/dist/server/git-changes.js.map +1 -1
- package/dist/server/git.d.ts +2 -0
- package/dist/server/git.js +9 -0
- package/dist/server/git.js.map +1 -1
- package/dist/server/github.d.ts +3 -3
- package/dist/server/github.js +1 -1
- package/dist/server/github.js.map +1 -1
- package/dist/server/pr.d.ts +2 -2
- package/dist/server/project-context.d.ts +20 -3
- package/dist/server/project-context.js +30 -1
- package/dist/server/project-context.js.map +1 -1
- package/dist/server/provider-action-gate.d.ts +8 -0
- package/dist/server/provider-action-gate.js +54 -0
- package/dist/server/provider-action-gate.js.map +1 -0
- package/dist/server/provider-auth-runtime.d.ts +21 -0
- package/dist/server/provider-auth-runtime.js +66 -0
- package/dist/server/provider-auth-runtime.js.map +1 -0
- package/dist/server/server.d.ts +11142 -47
- package/dist/server/server.js +1714 -806
- package/dist/server/server.js.map +1 -1
- package/dist/server/validators.d.ts +97 -0
- package/dist/server/validators.js +86 -0
- package/dist/server/validators.js.map +1 -0
- package/dist/server/ws.d.ts +2 -2
- package/dist/server/ws.js +2 -2
- package/dist/server/ws.js.map +1 -1
- package/dist/server-install/engine.d.ts +1 -1
- package/dist/server-install/platforms/macosx-ngrok.d.ts +1 -1
- package/dist/server-install/platforms/ubuntu-vps.d.ts +16 -1
- package/dist/server-install/platforms/ubuntu-vps.js +83 -1
- package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
- package/dist/server-install/state.d.ts +1 -1
- package/dist/server-install/steps.d.ts +2 -2
- package/dist/server-install/strategies.d.ts +1 -1
- package/dist/server-install/types.d.ts +38 -424
- package/dist/server-install/ui.d.ts +1 -1
- package/dist/skills-banner.d.ts +7 -6
- package/dist/skills-banner.js +7 -6
- package/dist/skills-banner.js.map +1 -1
- package/dist/skills-remote.d.ts +2 -2
- package/dist/skills-update.d.ts +88 -0
- package/dist/skills-update.js +392 -0
- package/dist/skills-update.js.map +1 -0
- package/dist/skills.d.ts +2 -0
- package/dist/skills.js +3 -2
- package/dist/skills.js.map +1 -1
- package/dist/todos.d.ts +2 -28
- package/dist/todos.js +1 -1
- package/dist/ui-state.d.ts +16 -2
- package/dist/ui-state.js +14 -1
- package/dist/ui-state.js.map +1 -1
- package/dist/workflows/load.d.ts +1 -1
- package/dist/workflows/run.d.ts +53 -12
- package/dist/workflows/run.js +436 -64
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/types.d.ts +59 -224
- package/dist/workflows/types.js +14 -0
- package/dist/workflows/types.js.map +1 -1
- package/dist/workspace/config.d.ts +68 -206
- package/dist/workspace/config.js +145 -14
- package/dist/workspace/config.js.map +1 -1
- package/dist/workspace/migrations.d.ts +1 -1
- package/dist/workspace/migrations.js +19 -4
- package/dist/workspace/migrations.js.map +1 -1
- package/dist/workspace/projects.d.ts +8 -2
- package/dist/workspace/projects.js +9 -3
- package/dist/workspace/projects.js.map +1 -1
- package/dist/workspace/semaphore.d.ts +6 -0
- package/dist/workspace/semaphore.js +14 -1
- package/dist/workspace/semaphore.js.map +1 -1
- package/dist/workspace/ui-state.d.ts +13 -3
- package/dist/workspace/ui-state.js +15 -5
- package/dist/workspace/ui-state.js.map +1 -1
- package/package.json +17 -39
- package/scripts/inline-contract.mjs +112 -0
- package/scripts/mock-claude.mjs +39 -1
- package/scripts/sync-readme.mjs +20 -0
- package/web/dist/assets/alert-dialog-ghffK6g9.js +1 -0
- package/web/dist/assets/arrow-down-Cz8qb71e.js +1 -0
- package/web/dist/assets/arrow-left-wcYKQXI_.js +1 -0
- package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
- package/web/dist/assets/centered-state-ZtnFHA-n.js +43 -0
- package/web/dist/assets/chevron-right-G4caF2QV.js +1 -0
- package/web/dist/assets/{chunk-BO2N2NFS-DtrdTCWa.js → chunk-BO2N2NFS-DE6qKn3r.js} +8 -8
- package/web/dist/assets/circle-check--KvBxXWp.js +1 -0
- package/web/dist/assets/circle-x-C3EFZ3xf.js +1 -0
- package/web/dist/assets/collapsible-B0JVzd0B.js +1 -0
- package/web/dist/assets/commit-list-wm6DPHNs.js +1 -0
- package/web/dist/assets/compare-variants-DbdP4Y5T.js +1 -0
- package/web/dist/assets/{core-DePtBHcl.js → core-BCsw8oQw.js} +1 -1
- package/web/dist/assets/diff-Bizc96qe.js +3 -0
- package/web/dist/assets/diff-stat-Dyfg3ltF.js +1 -0
- package/web/dist/assets/{diff-view-DCeSegKk.js → diff-view-CG8ek6tC.js} +4 -4
- package/web/dist/assets/dropdown-menu-C1Dlf35P.js +1 -0
- package/web/dist/assets/editable-title-5rC_QRBZ.js +1 -0
- package/web/dist/assets/{ellipsis-vertical-CNnSLn5a.js → ellipsis-vertical-DpGTRqC2.js} +1 -1
- package/web/dist/assets/{file-D4GBh1ao.js → file-DlUGpUlb.js} +1 -1
- package/web/dist/assets/folder-BAY6Vddy.js +1 -0
- package/web/dist/assets/{git-pull-request-DnR8Xh4_.js → git-pull-request-agOG0iGM.js} +1 -1
- package/web/dist/assets/git-toolbar-DGiNMmtY.js +1 -0
- package/web/dist/assets/github-Vp7lxYGQ.js +1 -0
- package/web/dist/assets/highlighted-body-OFNGDK62-BL-MfFgl.js +1 -0
- package/web/dist/assets/highlighter-CdHqIwFr.js +3 -0
- package/web/dist/assets/image-preview-BWGk5fPX.js +1 -0
- package/web/dist/assets/index-DSxyJpuK.css +2 -0
- package/web/dist/assets/index-DiawI6RX.js +6 -0
- package/web/dist/assets/lib-BQXq3kEf.js +1 -0
- package/web/dist/assets/lib-BxQXEXDF.js +1 -0
- package/web/dist/assets/markdown-BGBOGCA_.js +2 -0
- package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
- package/web/dist/assets/new-task-form-BpAw_Dks.js +1 -0
- package/web/dist/assets/pill-Dvs-P0xy.js +1 -0
- package/web/dist/assets/project-router-Cx8NPoqn.js +1 -0
- package/web/dist/assets/prompt-templates-CSBYBR1I.js +15 -0
- package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
- package/web/dist/assets/{refresh-cw-BT8E96Tm.js → refresh-cw-BoGdAykg.js} +1 -1
- package/web/dist/assets/repo-git-PmX-BNMo.js +1 -0
- package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/web/dist/assets/run-diff-EcOkf3ti.js +3 -0
- package/web/dist/assets/run-header-BGiv6_qX.js +1 -0
- package/web/dist/assets/{search-x-BDjaMrzG.js → search-x-X3EpVhgs.js} +1 -1
- package/web/dist/assets/skill-empty-hint-CZLALx6l.js +1 -0
- package/web/dist/assets/skills-BiWfHmCR.js +1 -0
- package/web/dist/assets/skills-CC91ouGH.js +1 -0
- package/web/dist/assets/sparkles-Dt4q7pbG.js +1 -0
- package/web/dist/assets/{square-terminal-Ckjjn0vb.js → square-terminal-hwBL8XsC.js} +1 -1
- package/web/dist/assets/tab-link-DIlR5T07.js +1 -0
- package/web/dist/assets/task-changes-XkHDxzQA.js +1 -0
- package/web/dist/assets/task-commits-BTTA5k5T.js +1 -0
- package/web/dist/assets/task-files-Da8_4C9g.js +2 -0
- package/web/dist/assets/task-thread-DoNXUsHr.js +9 -0
- package/web/dist/assets/textarea-CUdokhkv.js +1 -0
- package/web/dist/assets/thread-loading-B8q8ukXJ.js +1 -0
- package/web/dist/assets/{trash-2-DAyZ0VSi.js → trash-2-DhVIdWv8.js} +1 -1
- package/web/dist/assets/{triangle-alert-Uy8rokUh.js → triangle-alert-XYT0DGCI.js} +1 -1
- package/web/dist/assets/{upload-CDdyPPo_.js → upload-BKjN59-1.js} +1 -1
- package/web/dist/assets/use-desktop-Bf5LS_P4.js +1 -0
- package/web/dist/assets/use-submit-shortcut-CzVyoAMd.js +1 -0
- package/web/dist/assets/utils-DsLuRXwV.js +64 -0
- package/web/dist/assets/workflows-o2QU_pvU.js +11 -0
- package/web/dist/assets/zoomable-image-7WyUiaVD.js +1 -0
- package/web/dist/index.html +32 -13
- package/scripts/dev.mjs +0 -74
- package/scripts/release-snapshot.mjs +0 -130
- package/scripts/release.mjs +0 -119
- package/web/dist/assets/arrow-left-CnSdp92h.js +0 -1
- package/web/dist/assets/bundle-mjs-BegPhL5c.js +0 -1
- package/web/dist/assets/centered-state-DOsTcJZF.js +0 -43
- package/web/dist/assets/commit-list-BrxBEzRK.js +0 -1
- package/web/dist/assets/compare-variants-Bv2c9ORF.js +0 -1
- package/web/dist/assets/dist-B6XQOhgM.js +0 -1
- package/web/dist/assets/git-toolbar-pIC1ubPM.js +0 -1
- package/web/dist/assets/github-DTTSG0ht.js +0 -1
- package/web/dist/assets/highlighted-body-OFNGDK62-BuFJwunK.js +0 -1
- package/web/dist/assets/image-preview-DEhW0TFz.js +0 -1
- package/web/dist/assets/index-Cijmlz7q.js +0 -30
- package/web/dist/assets/index-DzroxqBG.css +0 -2
- package/web/dist/assets/lib-DPEZDBUN.js +0 -1
- package/web/dist/assets/lib-uHpeUPzK.js +0 -1
- package/web/dist/assets/mermaid-GHXKKRXX-CN2zQue0.js +0 -1
- package/web/dist/assets/open-mercato-toBr6SOa.svg +0 -11
- package/web/dist/assets/project-router-BMx4e8m-.js +0 -1
- package/web/dist/assets/repo-git-BusYfa3t.js +0 -1
- package/web/dist/assets/run-diff-wOJ3odA-.js +0 -3
- package/web/dist/assets/run-header-Cg5incil.js +0 -1
- package/web/dist/assets/skill-empty-hint-DTUSp6Vl.js +0 -1
- package/web/dist/assets/skills-PpP2owbM.js +0 -1
- package/web/dist/assets/tab-link-F3uQrdm2.js +0 -1
- package/web/dist/assets/task-changes-iD9kS79I.js +0 -1
- package/web/dist/assets/task-commits-COkLaUri.js +0 -1
- package/web/dist/assets/task-files-Ckttz7XH.js +0 -2
- package/web/dist/assets/task-thread-CQD91VPt.js +0 -9
- package/web/dist/assets/textarea-Bj_LCreg.js +0 -1
- package/web/dist/assets/use-desktop-DUh0STzq.js +0 -3
- package/web/dist/assets/utils-B8s5qIcK.js +0 -1
- package/web/dist/assets/workflows-BFk8C0co.js +0 -11
- package/web/dist/assets/zoomable-image-PEDOqyLQ.js +0 -1
- /package/web/{open-mercato.svg → dist/open-mercato.svg} +0 -0
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { DraftPrInput, DraftPrOutcome, ForgeAvailability, ForgeComment, ForgeCommentsData, ForgeDriver, ForgeItem, ForgeTimelineEvent, ForgeTimelineEventKind } from './types.
|
|
2
|
+
import type { DraftPrInput, DraftPrOutcome, ForgeAvailability, ForgeComment, ForgeCommentsData, ForgeDriver, ForgeItem, ForgePrMergeState, ForgePrDiffResult, ForgeTimelineEvent, ForgeTimelineEventKind } from './types.ts';
|
|
3
|
+
export declare const GH_PR_DIFF_FILE_CAP = 300;
|
|
4
|
+
export declare const GH_PR_PATCH_CAP: number;
|
|
5
|
+
export declare const GH_PR_DIFF_JSON_CAP: number;
|
|
6
|
+
export declare class GithubPrNotFoundError extends Error {
|
|
7
|
+
}
|
|
8
|
+
export type PrFilesPageRunner = (page: number) => Promise<string>;
|
|
9
|
+
/** Fetch no more than the three GitHub pages represented by the public 300-file response cap. */
|
|
10
|
+
export declare function fetchPrFilePages(runPage: PrFilesPageRunner): Promise<unknown[]>;
|
|
11
|
+
export declare function fetchGithubPrDiff(repoRoot: string, number: number, refresh?: boolean): Promise<ForgePrDiffResult>;
|
|
3
12
|
/** One GitHub issue or pull request, flattened for the cockpit's GitHub tab. */
|
|
4
13
|
export type GithubItem = ForgeItem;
|
|
5
14
|
export interface GithubData {
|
|
@@ -19,28 +28,12 @@ export declare const ghCheckRunSchema: z.ZodObject<{
|
|
|
19
28
|
state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
29
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
30
|
conclusion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
-
},
|
|
23
|
-
state?: string | null | undefined;
|
|
24
|
-
status?: string | null | undefined;
|
|
25
|
-
conclusion?: string | null | undefined;
|
|
26
|
-
}, {
|
|
27
|
-
state?: string | null | undefined;
|
|
28
|
-
status?: string | null | undefined;
|
|
29
|
-
conclusion?: string | null | undefined;
|
|
30
|
-
}>;
|
|
31
|
+
}, z.core.$strip>;
|
|
31
32
|
declare const ghStatusCheckRollup: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
32
33
|
state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
34
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
35
|
conclusion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
35
|
-
},
|
|
36
|
-
state?: string | null | undefined;
|
|
37
|
-
status?: string | null | undefined;
|
|
38
|
-
conclusion?: string | null | undefined;
|
|
39
|
-
}, {
|
|
40
|
-
state?: string | null | undefined;
|
|
41
|
-
status?: string | null | undefined;
|
|
42
|
-
conclusion?: string | null | undefined;
|
|
43
|
-
}>, "many">>>;
|
|
36
|
+
}, z.core.$strip>>>>;
|
|
44
37
|
/** Exported for unit tests (#400) — collapses a zod-validated `statusCheckRollup` array down to
|
|
45
38
|
* the single enum the GitHub tab (list rows + detail badge) renders. */
|
|
46
39
|
export declare function rollupToChecks(rollup: z.infer<typeof ghStatusCheckRollup>): GithubItem['checks'];
|
|
@@ -104,13 +97,7 @@ export declare const ghTimelineEventSchema: z.ZodObject<{
|
|
|
104
97
|
actor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
105
98
|
login: z.ZodString;
|
|
106
99
|
avatar_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
107
|
-
},
|
|
108
|
-
login: string;
|
|
109
|
-
avatar_url?: string | null | undefined;
|
|
110
|
-
}, {
|
|
111
|
-
login: string;
|
|
112
|
-
avatar_url?: string | null | undefined;
|
|
113
|
-
}>>>;
|
|
100
|
+
}, z.core.$strip>>>;
|
|
114
101
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
102
|
html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
103
|
sha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -118,145 +105,27 @@ export declare const ghTimelineEventSchema: z.ZodObject<{
|
|
|
118
105
|
author: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
119
106
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
107
|
date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
121
|
-
},
|
|
122
|
-
name?: string | null | undefined;
|
|
123
|
-
date?: string | null | undefined;
|
|
124
|
-
}, {
|
|
125
|
-
name?: string | null | undefined;
|
|
126
|
-
date?: string | null | undefined;
|
|
127
|
-
}>>>;
|
|
108
|
+
}, z.core.$strip>>>;
|
|
128
109
|
label: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
129
110
|
name: z.ZodString;
|
|
130
111
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
131
|
-
},
|
|
132
|
-
name: string;
|
|
133
|
-
color?: string | null | undefined;
|
|
134
|
-
}, {
|
|
135
|
-
name: string;
|
|
136
|
-
color?: string | null | undefined;
|
|
137
|
-
}>>>;
|
|
112
|
+
}, z.core.$strip>>>;
|
|
138
113
|
assignee: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
139
114
|
login: z.ZodString;
|
|
140
|
-
},
|
|
141
|
-
login: string;
|
|
142
|
-
}, {
|
|
143
|
-
login: string;
|
|
144
|
-
}>>>;
|
|
115
|
+
}, z.core.$strip>>>;
|
|
145
116
|
rename: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
146
117
|
from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
147
118
|
to: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
148
|
-
},
|
|
149
|
-
from?: string | null | undefined;
|
|
150
|
-
to?: string | null | undefined;
|
|
151
|
-
}, {
|
|
152
|
-
from?: string | null | undefined;
|
|
153
|
-
to?: string | null | undefined;
|
|
154
|
-
}>>>;
|
|
119
|
+
}, z.core.$strip>>>;
|
|
155
120
|
source: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
156
121
|
issue: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
157
122
|
number: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
158
123
|
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
124
|
html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
160
125
|
pull_request: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
html_url?: string | null | undefined;
|
|
165
|
-
pull_request?: unknown;
|
|
166
|
-
}, {
|
|
167
|
-
number?: number | null | undefined;
|
|
168
|
-
title?: string | null | undefined;
|
|
169
|
-
html_url?: string | null | undefined;
|
|
170
|
-
pull_request?: unknown;
|
|
171
|
-
}>>>;
|
|
172
|
-
}, "strip", z.ZodTypeAny, {
|
|
173
|
-
issue?: {
|
|
174
|
-
number?: number | null | undefined;
|
|
175
|
-
title?: string | null | undefined;
|
|
176
|
-
html_url?: string | null | undefined;
|
|
177
|
-
pull_request?: unknown;
|
|
178
|
-
} | null | undefined;
|
|
179
|
-
}, {
|
|
180
|
-
issue?: {
|
|
181
|
-
number?: number | null | undefined;
|
|
182
|
-
title?: string | null | undefined;
|
|
183
|
-
html_url?: string | null | undefined;
|
|
184
|
-
pull_request?: unknown;
|
|
185
|
-
} | null | undefined;
|
|
186
|
-
}>>>;
|
|
187
|
-
}, "strip", z.ZodTypeAny, {
|
|
188
|
-
event: string;
|
|
189
|
-
id?: number | null | undefined;
|
|
190
|
-
node_id?: string | null | undefined;
|
|
191
|
-
created_at?: string | null | undefined;
|
|
192
|
-
actor?: {
|
|
193
|
-
login: string;
|
|
194
|
-
avatar_url?: string | null | undefined;
|
|
195
|
-
} | null | undefined;
|
|
196
|
-
url?: string | null | undefined;
|
|
197
|
-
html_url?: string | null | undefined;
|
|
198
|
-
sha?: string | null | undefined;
|
|
199
|
-
message?: string | null | undefined;
|
|
200
|
-
author?: {
|
|
201
|
-
name?: string | null | undefined;
|
|
202
|
-
date?: string | null | undefined;
|
|
203
|
-
} | null | undefined;
|
|
204
|
-
label?: {
|
|
205
|
-
name: string;
|
|
206
|
-
color?: string | null | undefined;
|
|
207
|
-
} | null | undefined;
|
|
208
|
-
assignee?: {
|
|
209
|
-
login: string;
|
|
210
|
-
} | null | undefined;
|
|
211
|
-
rename?: {
|
|
212
|
-
from?: string | null | undefined;
|
|
213
|
-
to?: string | null | undefined;
|
|
214
|
-
} | null | undefined;
|
|
215
|
-
source?: {
|
|
216
|
-
issue?: {
|
|
217
|
-
number?: number | null | undefined;
|
|
218
|
-
title?: string | null | undefined;
|
|
219
|
-
html_url?: string | null | undefined;
|
|
220
|
-
pull_request?: unknown;
|
|
221
|
-
} | null | undefined;
|
|
222
|
-
} | null | undefined;
|
|
223
|
-
}, {
|
|
224
|
-
event: string;
|
|
225
|
-
id?: number | null | undefined;
|
|
226
|
-
node_id?: string | null | undefined;
|
|
227
|
-
created_at?: string | null | undefined;
|
|
228
|
-
actor?: {
|
|
229
|
-
login: string;
|
|
230
|
-
avatar_url?: string | null | undefined;
|
|
231
|
-
} | null | undefined;
|
|
232
|
-
url?: string | null | undefined;
|
|
233
|
-
html_url?: string | null | undefined;
|
|
234
|
-
sha?: string | null | undefined;
|
|
235
|
-
message?: string | null | undefined;
|
|
236
|
-
author?: {
|
|
237
|
-
name?: string | null | undefined;
|
|
238
|
-
date?: string | null | undefined;
|
|
239
|
-
} | null | undefined;
|
|
240
|
-
label?: {
|
|
241
|
-
name: string;
|
|
242
|
-
color?: string | null | undefined;
|
|
243
|
-
} | null | undefined;
|
|
244
|
-
assignee?: {
|
|
245
|
-
login: string;
|
|
246
|
-
} | null | undefined;
|
|
247
|
-
rename?: {
|
|
248
|
-
from?: string | null | undefined;
|
|
249
|
-
to?: string | null | undefined;
|
|
250
|
-
} | null | undefined;
|
|
251
|
-
source?: {
|
|
252
|
-
issue?: {
|
|
253
|
-
number?: number | null | undefined;
|
|
254
|
-
title?: string | null | undefined;
|
|
255
|
-
html_url?: string | null | undefined;
|
|
256
|
-
pull_request?: unknown;
|
|
257
|
-
} | null | undefined;
|
|
258
|
-
} | null | undefined;
|
|
259
|
-
}>;
|
|
126
|
+
}, z.core.$strip>>>;
|
|
127
|
+
}, z.core.$strip>>>;
|
|
128
|
+
}, z.core.$strip>;
|
|
260
129
|
/** First 200 thread entries, then `truncated`; each body sliced to 8 000 chars (same cap as
|
|
261
130
|
* item bodies). */
|
|
262
131
|
export declare const THREAD_ENTRY_CAP = 200;
|
|
@@ -349,6 +218,38 @@ export declare const COMMIT_CHECKS_CHUNK = 50;
|
|
|
349
218
|
* `runGraphql` is injected so this is testable without shelling out.
|
|
350
219
|
*/
|
|
351
220
|
export declare function fetchCommitChecks(runGraphql: GraphqlRunner, owner: string, name: string, shas: string[], chunkSize?: number): Promise<Record<string, ForgeTimelineEvent['checks']>>;
|
|
221
|
+
/** The single enum a PR row's checks glyph renders (never `undefined` on the wire). */
|
|
222
|
+
export type ChecksGlyph = 'passing' | 'failing' | 'pending' | null;
|
|
223
|
+
export type GithubChecksData = {
|
|
224
|
+
available: true;
|
|
225
|
+
checks: Record<number, ChecksGlyph>;
|
|
226
|
+
} | {
|
|
227
|
+
available: false;
|
|
228
|
+
reason: string;
|
|
229
|
+
};
|
|
230
|
+
/** PR numbers per checks query. Aliases resolve independently (a failed chunk costs only its own
|
|
231
|
+
* glyphs); bounded so an unbounded number list can't blow the query size limit. Also the route's
|
|
232
|
+
* hard cap on how many PRs one request may ask about. */
|
|
233
|
+
export declare const GH_CHECKS_MAX = 100;
|
|
234
|
+
/**
|
|
235
|
+
* Rolled-up CI state per PR number, as a `number → glyph` map.
|
|
236
|
+
*
|
|
237
|
+
* Batched and aliased so a 100-PR window costs one subprocess, not a hundred. Each alias resolves
|
|
238
|
+
* independently and an unknown number comes back `null` (alias resolved null → left absent), so
|
|
239
|
+
* partial results degrade cleanly. Degrades to an empty map on any failure — exactly as
|
|
240
|
+
* `fetchCommitChecks` does. Exported for tests; `runGraphql` is injected so this is testable
|
|
241
|
+
* without shelling out.
|
|
242
|
+
*/
|
|
243
|
+
export declare function fetchPrChecks(runGraphql: GraphqlRunner, owner: string, name: string, numbers: number[], chunkSize?: number): Promise<Record<number, ChecksGlyph>>;
|
|
244
|
+
/** Test hook — the per-PR checks cache would otherwise leak state across cases in one process. */
|
|
245
|
+
export declare function __clearChecksCacheForTests(): void;
|
|
246
|
+
/**
|
|
247
|
+
* Lazy checks glyphs for the given PR numbers (route-facing). Resolves the repo handle once,
|
|
248
|
+
* serves fresh cache entries, queries only the misses, and degrades to `{ available: false,
|
|
249
|
+
* reason }` when `gh` or the handle is unavailable — never a throw, never a 5xx (plan rule 7).
|
|
250
|
+
* Numbers are de-duplicated, validated, and capped at `GH_CHECKS_MAX`.
|
|
251
|
+
*/
|
|
252
|
+
export declare function fetchGithubChecks(repoRoot: string, numbers: number[]): Promise<GithubChecksData>;
|
|
352
253
|
/**
|
|
353
254
|
* The conversation thread for one issue/PR, lazily. `{owner}`/`{repo}` in the gh api paths are
|
|
354
255
|
* filled from the worktree's remote by gh itself, so no extra handle lookup. Everything degrades:
|
|
@@ -380,6 +281,12 @@ export declare function buildPrBody(handoffText: string, task: string): string;
|
|
|
380
281
|
* dropping `forge.available` and blinking the sidebar item out until the background probe warmed.
|
|
381
282
|
*/
|
|
382
283
|
export declare function detectGithubCached(repoRoot: string): ForgeAvailability | null;
|
|
284
|
+
export declare function normalizeMergeState(raw: unknown, policyRaw: unknown, requirements?: {
|
|
285
|
+
readable: boolean;
|
|
286
|
+
requiredChecks: string[];
|
|
287
|
+
}): ForgePrMergeState;
|
|
288
|
+
export declare function evictGithubProjectCaches(repoRoot: string): void;
|
|
289
|
+
export declare function mergePreflightAllowed(current: ForgePrMergeState, overrideRules?: boolean): boolean;
|
|
383
290
|
/** owner/repo parsed out of the origin remote — feeds `viewUrl`. */
|
|
384
291
|
export interface GithubRepoRef {
|
|
385
292
|
owner: string;
|