@open-mercato/cezar 0.9.1 → 0.9.2-pr710.1256
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/LICENSE +21 -0
- package/README.md +157 -32
- package/dist/agent-config/account-identity.d.ts +44 -0
- package/dist/agent-config/account-identity.js +128 -0
- package/dist/agent-config/account-identity.js.map +1 -0
- package/dist/agent-config/catalog.d.ts +9 -1
- package/dist/agent-config/catalog.js +18 -0
- package/dist/agent-config/catalog.js.map +1 -1
- package/dist/agent-config/files.d.ts +1 -1
- package/dist/agent-config/model-settings/claude.d.ts +2 -0
- package/dist/agent-config/model-settings/claude.js +11 -0
- package/dist/agent-config/model-settings/claude.js.map +1 -0
- package/dist/agent-config/model-settings/codex.d.ts +2 -0
- package/dist/agent-config/model-settings/codex.js +16 -0
- package/dist/agent-config/model-settings/codex.js.map +1 -0
- package/dist/agent-config/model-settings/opencode.d.ts +2 -0
- package/dist/agent-config/model-settings/opencode.js +8 -0
- package/dist/agent-config/model-settings/opencode.js.map +1 -0
- package/dist/agent-config/model-settings/pi.d.ts +12 -0
- package/dist/agent-config/model-settings/pi.js +18 -0
- package/dist/agent-config/model-settings/pi.js.map +1 -0
- package/dist/agent-config/model-settings/shared.d.ts +9 -0
- package/dist/agent-config/model-settings/shared.js +93 -0
- package/dist/agent-config/model-settings/shared.js.map +1 -0
- package/dist/agent-config/model-settings/types.d.ts +9 -0
- package/dist/agent-config/model-settings/types.js +2 -0
- package/dist/agent-config/model-settings/types.js.map +1 -0
- package/dist/agent-config/models.d.ts +9 -0
- package/dist/agent-config/models.js +32 -0
- package/dist/agent-config/models.js.map +1 -0
- package/dist/agent-config/service.d.ts +1 -1
- package/dist/agent-config/service.js +4 -4
- package/dist/agent-config/service.js.map +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 +255 -0
- package/dist/automations/types.js +159 -0
- package/dist/automations/types.js.map +1 -0
- package/dist/config.d.ts +19 -112
- package/dist/config.js +48 -5
- package/dist/config.js.map +1 -1
- package/dist/contract/agent-config.d.ts +153 -0
- package/dist/contract/agent-profiles.d.ts +347 -0
- package/dist/contract/automations.d.ts +935 -0
- package/dist/contract/events.d.ts +104 -0
- package/dist/contract/github.d.ts +467 -0
- package/dist/contract/health.d.ts +102 -0
- package/dist/contract/index.d.ts +16 -0
- package/dist/contract/index.js +1830 -0
- package/dist/contract/projects.d.ts +210 -0
- package/dist/contract/repo.d.ts +234 -0
- package/dist/contract/runs.d.ts +1407 -0
- package/dist/contract/skills.d.ts +232 -0
- package/dist/contract/workflows.d.ts +218 -0
- package/dist/contract/workspace.d.ts +577 -0
- package/dist/core/agent-env.d.ts +1 -1
- package/dist/core/agent-env.js +41 -16
- package/dist/core/agent-env.js.map +1 -1
- package/dist/core/agent-model-policy.d.ts +10 -0
- package/dist/core/agent-model-policy.js +36 -0
- package/dist/core/agent-model-policy.js.map +1 -0
- package/dist/core/agent-profiles.d.ts +62 -0
- package/dist/core/agent-profiles.js +90 -0
- package/dist/core/agent-profiles.js.map +1 -0
- package/dist/core/agent-runner.d.ts +49 -7
- package/dist/core/agent-runner.js +48 -3
- 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/backend-detect.d.ts +5 -5
- package/dist/core/backend-detect.js +44 -7
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/core/claude-cli-runner.d.ts +2 -2
- package/dist/core/claude-cli-runner.js +61 -13
- 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 +65 -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 +17 -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 +24 -12
- package/dist/core/model-identity.js +41 -24
- package/dist/core/model-identity.js.map +1 -1
- package/dist/core/model-presets.d.ts +10 -4
- package/dist/core/model-presets.js +52 -9
- package/dist/core/model-presets.js.map +1 -1
- package/dist/core/opencode-model-catalog.d.ts +30 -0
- package/dist/core/opencode-model-catalog.js +126 -0
- package/dist/core/opencode-model-catalog.js.map +1 -0
- 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/pi-runner.d.ts +24 -0
- package/dist/core/pi-runner.js +349 -0
- package/dist/core/pi-runner.js.map +1 -0
- package/dist/core/pi-ui-mapper.d.ts +34 -0
- package/dist/core/pi-ui-mapper.js +270 -0
- package/dist/core/pi-ui-mapper.js.map +1 -0
- package/dist/core/provider-auth.d.ts +154 -0
- package/dist/core/provider-auth.js +509 -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 +14 -0
- package/dist/core/provider-availability.js.map +1 -0
- package/dist/core/runner-factory.d.ts +1 -1
- package/dist/core/runner-factory.js +3 -0
- package/dist/core/runner-factory.js.map +1 -1
- package/dist/core/runner-model-catalog.d.ts +1 -1
- package/dist/core/shell-env.d.ts +28 -0
- package/dist/core/shell-env.js +56 -0
- package/dist/core/shell-env.js.map +1 -0
- package/dist/core/tool-display.d.ts +1 -1
- package/dist/core/ui-events.d.ts +2 -2
- package/dist/core/ui-events.js +1 -1
- package/dist/core/usage-limit.d.ts +42 -0
- package/dist/core/usage-limit.js +209 -0
- package/dist/core/usage-limit.js.map +1 -0
- package/dist/git-diff-base.d.ts +85 -0
- package/dist/git-diff-base.js +180 -0
- package/dist/git-diff-base.js.map +1 -0
- package/dist/git-worktree.d.ts +46 -6
- package/dist/git-worktree.js +46 -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 +66 -8
- package/dist/index.js.map +1 -1
- package/dist/paths.d.ts +69 -6
- package/dist/paths.js +86 -9
- package/dist/paths.js.map +1 -1
- package/dist/planner.d.ts +2 -2
- package/dist/planner.js +7 -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/agent-tmpdir.d.ts +41 -0
- package/dist/runs/agent-tmpdir.js +183 -0
- package/dist/runs/agent-tmpdir.js.map +1 -0
- package/dist/runs/auto-name.d.ts +1 -1
- package/dist/runs/auto-name.js +6 -1
- package/dist/runs/auto-name.js.map +1 -1
- package/dist/runs/event-history.d.ts +50 -0
- package/dist/runs/event-history.js +613 -0
- package/dist/runs/event-history.js.map +1 -0
- package/dist/runs/retention.d.ts +1 -1
- package/dist/runs/run-index.d.ts +19 -0
- package/dist/runs/run-index.js +43 -0
- package/dist/runs/run-index.js.map +1 -0
- package/dist/runs/store.d.ts +209 -344
- package/dist/runs/store.js +298 -39
- 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 +21 -6
- package/dist/server/capabilities.js +27 -1
- 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 +19 -3
- package/dist/server/forge/index.js +28 -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 +10 -8
- package/dist/server/git-changes.js +19 -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/open-in-app.d.ts +2 -1
- package/dist/server/open-in-app.js +3 -1
- package/dist/server/open-in-app.js.map +1 -1
- package/dist/server/open-in-terminal.d.ts +46 -1
- package/dist/server/open-in-terminal.js +72 -13
- package/dist/server/open-in-terminal.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 +56 -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 +12802 -47
- package/dist/server/server.js +2857 -949
- 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/engine.js +5 -18
- package/dist/server-install/engine.js.map +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/steps.js +6 -2
- package/dist/server-install/steps.js.map +1 -1
- 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 +7 -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 +276 -15
- package/dist/workflows/run.js +1261 -159
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/types.d.ts +62 -224
- package/dist/workflows/types.js +25 -2
- package/dist/workflows/types.js.map +1 -1
- package/dist/workspace/agent-accounts.d.ts +153 -0
- package/dist/workspace/agent-accounts.js +304 -0
- package/dist/workspace/agent-accounts.js.map +1 -0
- package/dist/workspace/agent-profiles.d.ts +78 -0
- package/dist/workspace/agent-profiles.js +115 -0
- package/dist/workspace/agent-profiles.js.map +1 -0
- package/dist/workspace/config.d.ts +94 -206
- package/dist/workspace/config.js +226 -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-cli.js +54 -4
- package/dist/workspace/projects-cli.js.map +1 -1
- package/dist/workspace/projects.d.ts +26 -2
- package/dist/workspace/projects.js +42 -3
- package/dist/workspace/projects.js.map +1 -1
- package/dist/workspace/semaphore.d.ts +51 -0
- package/dist/workspace/semaphore.js +53 -3
- package/dist/workspace/semaphore.js.map +1 -1
- package/dist/workspace/ui-state.d.ts +16 -5
- package/dist/workspace/ui-state.js +18 -7
- 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 +59 -1
- package/scripts/mock-pi-rpc.mjs +83 -0
- package/scripts/sync-readme.mjs +20 -0
- package/web/dist/assets/alert-dialog-BVs3QSmP.js +1 -0
- package/web/dist/assets/arrow-down-D7T7XuF6.js +1 -0
- package/web/dist/assets/arrow-left-B1dRFd8y.js +1 -0
- package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
- package/web/dist/assets/centered-state-DdRLYi9u.js +43 -0
- package/web/dist/assets/chevron-right-Dh0t3AL8.js +1 -0
- package/web/dist/assets/{chunk-BO2N2NFS-DtrdTCWa.js → chunk-BO2N2NFS-DE6qKn3r.js} +8 -8
- package/web/dist/assets/circle-check-4FDOlh9u.js +1 -0
- package/web/dist/assets/circle-x-CgTVbqX5.js +1 -0
- package/web/dist/assets/collapsible-BoADzTok.js +1 -0
- package/web/dist/assets/commit-list-BCcCkRbU.js +1 -0
- package/web/dist/assets/compare-variants-B7gTgGqR.js +1 -0
- package/web/dist/assets/{core-DePtBHcl.js → core-BCsw8oQw.js} +1 -1
- package/web/dist/assets/diff-ecfV3-op.js +3 -0
- package/web/dist/assets/diff-stat-C2KGLVnZ.js +1 -0
- package/web/dist/assets/{diff-view-DCeSegKk.js → diff-view-CQtonQ4L.js} +4 -4
- package/web/dist/assets/dropdown-menu-WcGoirf2.js +1 -0
- package/web/dist/assets/editable-title-SqNK-wuI.js +1 -0
- package/web/dist/assets/{ellipsis-vertical-CNnSLn5a.js → ellipsis-vertical-ClTFrwit.js} +1 -1
- package/web/dist/assets/{file-D4GBh1ao.js → file-BU0mWida.js} +1 -1
- package/web/dist/assets/folder-rsgCF0aw.js +1 -0
- package/web/dist/assets/{git-pull-request-DnR8Xh4_.js → git-pull-request-BFhIKb83.js} +1 -1
- package/web/dist/assets/git-toolbar-CF1_tzqz.js +1 -0
- package/web/dist/assets/github-CyjPz-Ks.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-iEzCyEmz.js +1 -0
- package/web/dist/assets/index-BN09RpYY.css +2 -0
- package/web/dist/assets/index-CyG7aE1W.js +7 -0
- package/web/dist/assets/lib-BQXq3kEf.js +1 -0
- package/web/dist/assets/lib-BxQXEXDF.js +1 -0
- package/web/dist/assets/markdown-CNAa22LB.js +2 -0
- package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
- package/web/dist/assets/new-task-form-CWhQZbsX.js +1 -0
- package/web/dist/assets/pill-BO5s2x3N.js +1 -0
- package/web/dist/assets/project-router-Dm4OhAPE.js +1 -0
- package/web/dist/assets/prompt-templates-CP__OCDQ.js +15 -0
- package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
- package/web/dist/assets/{refresh-cw-BT8E96Tm.js → refresh-cw-DyiysCoP.js} +1 -1
- package/web/dist/assets/repo-git-B1WM6N8T.js +1 -0
- package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/web/dist/assets/run-diff-CKx4d9Oo.js +3 -0
- package/web/dist/assets/run-header-DpbfOtNi.js +1 -0
- package/web/dist/assets/{search-x-BDjaMrzG.js → search-x-DRvk-6x4.js} +1 -1
- package/web/dist/assets/skill-empty-hint-D5vsHfMr.js +1 -0
- package/web/dist/assets/skills-BiWfHmCR.js +1 -0
- package/web/dist/assets/skills-XGltyIJ_.js +1 -0
- package/web/dist/assets/sparkles-BugkDxWO.js +1 -0
- package/web/dist/assets/{square-terminal-Ckjjn0vb.js → square-terminal-Drp2h-o8.js} +1 -1
- package/web/dist/assets/tab-link-CiRLRlnY.js +1 -0
- package/web/dist/assets/task-changes-C2hKkEtc.js +1 -0
- package/web/dist/assets/task-commits-CwGs_Opa.js +1 -0
- package/web/dist/assets/task-files-5KUgFzX3.js +2 -0
- package/web/dist/assets/task-thread-B3AFO3SS.js +9 -0
- package/web/dist/assets/textarea-Dn90Eun6.js +1 -0
- package/web/dist/assets/thread-loading-_1hPuk76.js +1 -0
- package/web/dist/assets/{trash-2-DAyZ0VSi.js → trash-2-BKEc5Sp2.js} +1 -1
- package/web/dist/assets/{triangle-alert-Uy8rokUh.js → triangle-alert-BGGPY2C2.js} +1 -1
- package/web/dist/assets/{upload-CDdyPPo_.js → upload-B0AQw-mO.js} +1 -1
- package/web/dist/assets/use-desktop-CegyTp3X.js +1 -0
- package/web/dist/assets/use-submit-shortcut-Mle-9uJp.js +1 -0
- package/web/dist/assets/utils-D9GHDNza.js +64 -0
- package/web/dist/assets/workflows-3PCz57Z6.js +11 -0
- package/web/dist/assets/zoomable-image-DTq7s8CZ.js +1 -0
- package/web/dist/index.html +33 -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
|
@@ -19,12 +19,22 @@
|
|
|
19
19
|
* deliberately constrained to the launch project when `CEZ_SINGLE_PROJECT=1`.
|
|
20
20
|
* Like the other opt-in capabilities, activation is strict: no other spelling
|
|
21
21
|
* enables it.
|
|
22
|
+
*
|
|
23
|
+
* `automations` (spec 2026-07-25-github-automations, #801): GitHub automations
|
|
24
|
+
* are **opt-in** via `CEZ_AUTOMATIONS=1` and off by default. Off, the
|
|
25
|
+
* `Automations` nav item is gone everywhere it is rendered, the
|
|
26
|
+
* `/automations*` endpoints refuse, and the workspace scheduler never polls
|
|
27
|
+
* GitHub — the flag removes the behavior, not only the UI. Activation is
|
|
28
|
+
* strict, like the two capabilities above. Nothing on disk is touched:
|
|
29
|
+
* definitions, receipts and high-watermarks survive the flag being off, so
|
|
30
|
+
* unsetting it and restarting restores the feature wholesale.
|
|
31
|
+
*
|
|
32
|
+
* Usage presentation: token counts and monetary cost stay visible by default.
|
|
33
|
+
* `CEZ_HIDE_TOKEN_USAGE=1` and `CEZ_HIDE_COST=1` hide them independently;
|
|
34
|
+
* legacy `CEZ_HIDE_TOKEN_METRICS=1` remains the master hide-all switch. None
|
|
35
|
+
* changes collection, persistence, events, or API run records.
|
|
22
36
|
*/
|
|
23
|
-
|
|
24
|
-
localHandoff: boolean;
|
|
25
|
-
followups: boolean;
|
|
26
|
-
singleProject: boolean;
|
|
27
|
-
}
|
|
37
|
+
import type { Capabilities } from '../contract/index.js';
|
|
28
38
|
/** Canonical hostname of an authority: port and IPv6 brackets removed, IPv6
|
|
29
39
|
* expanded, zone id and FQDN trailing dot dropped, lowercased.
|
|
30
40
|
* `[::1]:4321` → `0:0:0:0:0:0:0:1`, `localhost.:4321` → `localhost`.
|
|
@@ -46,10 +56,15 @@ export declare function isLoopbackHost(host: string | undefined): boolean;
|
|
|
46
56
|
export declare function isLoopbackHostHeader(host: string | null | undefined): boolean;
|
|
47
57
|
/** `CEZ_REMOTE=1` or a non-loopback bind host ⇒ hosted mode (no local handoff).
|
|
48
58
|
* `CEZ_FOLLOWUPS=1` ⇒ the follow-up inbox exists (#471).
|
|
59
|
+
* `CEZ_AUTOMATIONS=1` ⇒ GitHub automations exist (#801).
|
|
49
60
|
*
|
|
50
61
|
* Read per request — cheap, and tests/ops can flip `CEZ_REMOTE` live. `followups` is honest
|
|
51
62
|
* per request too, but flipping it ON at runtime is only half a switch: the per-dataDir
|
|
52
63
|
* todos watch (step 2.3) is created by an SSE subscription, so connections opened while the
|
|
53
64
|
* flag was off never subscribed and get no live inbox updates until they reconnect. Hence
|
|
54
|
-
* the UI's "set CEZ_FOLLOWUPS=1 and restart cezar" wording — treat it as a boot-time flag.
|
|
65
|
+
* the UI's "set CEZ_FOLLOWUPS=1 and restart cezar" wording — treat it as a boot-time flag.
|
|
66
|
+
*
|
|
67
|
+
* `automations` carries the same caveat and for the same reason: the workspace scheduler is
|
|
68
|
+
* started once, on the server's `listening` event, so flipping the flag on afterwards gates
|
|
69
|
+
* the routes open without ever starting the poller. Boot-time flag, same wording. */
|
|
55
70
|
export declare function resolveCapabilities(env?: NodeJS.ProcessEnv, bindHost?: string): Capabilities;
|
|
@@ -19,6 +19,20 @@
|
|
|
19
19
|
* deliberately constrained to the launch project when `CEZ_SINGLE_PROJECT=1`.
|
|
20
20
|
* Like the other opt-in capabilities, activation is strict: no other spelling
|
|
21
21
|
* enables it.
|
|
22
|
+
*
|
|
23
|
+
* `automations` (spec 2026-07-25-github-automations, #801): GitHub automations
|
|
24
|
+
* are **opt-in** via `CEZ_AUTOMATIONS=1` and off by default. Off, the
|
|
25
|
+
* `Automations` nav item is gone everywhere it is rendered, the
|
|
26
|
+
* `/automations*` endpoints refuse, and the workspace scheduler never polls
|
|
27
|
+
* GitHub — the flag removes the behavior, not only the UI. Activation is
|
|
28
|
+
* strict, like the two capabilities above. Nothing on disk is touched:
|
|
29
|
+
* definitions, receipts and high-watermarks survive the flag being off, so
|
|
30
|
+
* unsetting it and restarting restores the feature wholesale.
|
|
31
|
+
*
|
|
32
|
+
* Usage presentation: token counts and monetary cost stay visible by default.
|
|
33
|
+
* `CEZ_HIDE_TOKEN_USAGE=1` and `CEZ_HIDE_COST=1` hide them independently;
|
|
34
|
+
* legacy `CEZ_HIDE_TOKEN_METRICS=1` remains the master hide-all switch. None
|
|
35
|
+
* changes collection, persistence, events, or API run records.
|
|
22
36
|
*/
|
|
23
37
|
import { followupsEnabled } from '../handoff.js';
|
|
24
38
|
/** Every IPv4 address in 127.0.0.0/8, anchored. Anchoring is load-bearing: a
|
|
@@ -108,19 +122,31 @@ export function isLoopbackHostHeader(host) {
|
|
|
108
122
|
}
|
|
109
123
|
/** `CEZ_REMOTE=1` or a non-loopback bind host ⇒ hosted mode (no local handoff).
|
|
110
124
|
* `CEZ_FOLLOWUPS=1` ⇒ the follow-up inbox exists (#471).
|
|
125
|
+
* `CEZ_AUTOMATIONS=1` ⇒ GitHub automations exist (#801).
|
|
111
126
|
*
|
|
112
127
|
* Read per request — cheap, and tests/ops can flip `CEZ_REMOTE` live. `followups` is honest
|
|
113
128
|
* per request too, but flipping it ON at runtime is only half a switch: the per-dataDir
|
|
114
129
|
* todos watch (step 2.3) is created by an SSE subscription, so connections opened while the
|
|
115
130
|
* flag was off never subscribed and get no live inbox updates until they reconnect. Hence
|
|
116
|
-
* the UI's "set CEZ_FOLLOWUPS=1 and restart cezar" wording — treat it as a boot-time flag.
|
|
131
|
+
* the UI's "set CEZ_FOLLOWUPS=1 and restart cezar" wording — treat it as a boot-time flag.
|
|
132
|
+
*
|
|
133
|
+
* `automations` carries the same caveat and for the same reason: the workspace scheduler is
|
|
134
|
+
* started once, on the server's `listening` event, so flipping the flag on afterwards gates
|
|
135
|
+
* the routes open without ever starting the poller. Boot-time flag, same wording. */
|
|
117
136
|
export function resolveCapabilities(env = process.env, bindHost) {
|
|
137
|
+
const hideAllUsage = env.CEZ_HIDE_TOKEN_METRICS === '1';
|
|
138
|
+
const tokenUsageMetrics = !hideAllUsage && env.CEZ_HIDE_TOKEN_USAGE !== '1';
|
|
139
|
+
const costMetrics = !hideAllUsage && env.CEZ_HIDE_COST !== '1';
|
|
118
140
|
return {
|
|
119
141
|
localHandoff: env.CEZ_REMOTE !== '1' && isLoopbackHost(bindHost),
|
|
120
142
|
// Deliberately not re-derived here: RunManager enforces the same predicate,
|
|
121
143
|
// and two spellings of "is the inbox on" would eventually disagree.
|
|
122
144
|
followups: followupsEnabled(env),
|
|
123
145
|
singleProject: env.CEZ_SINGLE_PROJECT === '1',
|
|
146
|
+
automations: env.CEZ_AUTOMATIONS === '1',
|
|
147
|
+
tokenMetrics: tokenUsageMetrics && costMetrics,
|
|
148
|
+
tokenUsageMetrics,
|
|
149
|
+
costMetrics,
|
|
124
150
|
};
|
|
125
151
|
}
|
|
126
152
|
//# sourceMappingURL=capabilities.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/server/capabilities.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/server/capabilities.ts"],"names":[],"mappings":"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"}
|
|
@@ -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;
|