@quickchatai/quickreview 1.1.0 → 1.2.0
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 +35 -19
- package/config.example.toml +41 -9
- package/dist/extensions/cli/login-route.js +5 -0
- package/dist/extensions/cli/login-route.js.map +1 -0
- package/dist/extensions/login-route.js +180 -0
- package/dist/extensions/login-route.js.map +1 -0
- package/dist/extensions/onboarding.js +29 -6
- package/dist/extensions/onboarding.js.map +1 -1
- package/dist/src/ciretry.js +2 -1
- package/dist/src/ciretry.js.map +1 -1
- package/dist/src/cli.js +43 -12
- package/dist/src/cli.js.map +1 -1
- package/dist/src/cliops.js +3 -2
- package/dist/src/cliops.js.map +1 -1
- package/dist/src/commands.js +25 -2
- package/dist/src/commands.js.map +1 -1
- package/dist/src/config.js +16 -2
- package/dist/src/config.js.map +1 -1
- package/dist/src/daemon.js +24 -8
- package/dist/src/daemon.js.map +1 -1
- package/dist/src/debugroundpi.js +5 -1
- package/dist/src/debugroundpi.js.map +1 -1
- package/dist/src/dispatch.js +5 -4
- package/dist/src/dispatch.js.map +1 -1
- package/dist/src/engine/debugpi.js +17 -5
- package/dist/src/engine/debugpi.js.map +1 -1
- package/dist/src/execboundary.js +10 -3
- package/dist/src/execboundary.js.map +1 -1
- package/dist/src/github.js +51 -16
- package/dist/src/github.js.map +1 -1
- package/dist/src/githubtoken.js +346 -0
- package/dist/src/githubtoken.js.map +1 -0
- package/dist/src/loginhint.js +8 -3
- package/dist/src/loginhint.js.map +1 -1
- package/dist/src/loginrefresh/pirefresh.js +3 -0
- package/dist/src/loginrefresh/pirefresh.js.map +1 -1
- package/dist/src/npmverbs.js +4 -2
- package/dist/src/npmverbs.js.map +1 -1
- package/dist/src/onboard/choices.js +29 -1
- package/dist/src/onboard/choices.js.map +1 -1
- package/dist/src/onboard/engine.js +8 -23
- package/dist/src/onboard/engine.js.map +1 -1
- package/dist/src/onboard/launch.js +12 -20
- package/dist/src/onboard/launch.js.map +1 -1
- package/dist/src/onboard/pipin.js +22 -0
- package/dist/src/onboard/pipin.js.map +1 -0
- package/dist/src/onboard/stepforward.js +41 -0
- package/dist/src/onboard/stepforward.js.map +1 -0
- package/dist/src/onboard/steps/appslug.js +4 -1
- package/dist/src/onboard/steps/appslug.js.map +1 -1
- package/dist/src/onboard/steps/compose.js +29 -0
- package/dist/src/onboard/steps/compose.js.map +1 -1
- package/dist/src/onboard/steps/configfill.js +102 -32
- package/dist/src/onboard/steps/configfill.js.map +1 -1
- package/dist/src/onboard/steps/githubaccount.js +595 -0
- package/dist/src/onboard/steps/githubaccount.js.map +1 -0
- package/dist/src/onboard/steps/githubapp.js +65 -7
- package/dist/src/onboard/steps/githubapp.js.map +1 -1
- package/dist/src/onboard/steps/golive.js +2 -0
- package/dist/src/onboard/steps/golive.js.map +1 -1
- package/dist/src/onboard/steps/index.js +11 -0
- package/dist/src/onboard/steps/index.js.map +1 -1
- package/dist/src/onboard/steps/ingress.js +80 -25
- package/dist/src/onboard/steps/ingress.js.map +1 -1
- package/dist/src/onboard/steps/llmauth.js +103 -30
- package/dist/src/onboard/steps/llmauth.js.map +1 -1
- package/dist/src/onboard/steps/memory.js +53 -1
- package/dist/src/onboard/steps/memory.js.map +1 -1
- package/dist/src/onboard/steps/proof.js +366 -56
- package/dist/src/onboard/steps/proof.js.map +1 -1
- package/dist/src/onboard/steps/topology.js +6 -6
- package/dist/src/onboard/steps/topology.js.map +1 -1
- package/dist/src/onboard/steps/transport.js +9 -1
- package/dist/src/onboard/steps/transport.js.map +1 -1
- package/dist/src/onboard/steps/tuiroute.js +102 -0
- package/dist/src/onboard/steps/tuiroute.js.map +1 -0
- package/dist/src/onboard/steps/verifyup.js +17 -1
- package/dist/src/onboard/steps/verifyup.js.map +1 -1
- package/dist/src/onboard/toolnames.js +30 -0
- package/dist/src/onboard/toolnames.js.map +1 -0
- package/dist/src/operatorwrite.js +23 -0
- package/dist/src/operatorwrite.js.map +1 -0
- package/dist/src/outcomes.js +4 -1
- package/dist/src/outcomes.js.map +1 -1
- package/dist/src/posting-journal.js +2 -1
- package/dist/src/posting-journal.js.map +1 -1
- package/dist/src/posting-outbox.js +6 -2
- package/dist/src/posting-outbox.js.map +1 -1
- package/dist/src/posting-receipt.js +14 -1
- package/dist/src/posting-receipt.js.map +1 -1
- package/dist/src/recheck.js +2 -1
- package/dist/src/recheck.js.map +1 -1
- package/dist/src/reconcile.js +22 -2
- package/dist/src/reconcile.js.map +1 -1
- package/dist/src/reviewhistory.js +32 -6
- package/dist/src/reviewhistory.js.map +1 -1
- package/dist/src/reviewnow.js +45 -0
- package/dist/src/reviewnow.js.map +1 -0
- package/dist/src/state.js.map +1 -1
- package/dist/src/statemachine.js +4 -1
- package/dist/src/statemachine.js.map +1 -1
- package/dist/src/takeoverpi.js +13 -0
- package/dist/src/takeoverpi.js.map +1 -1
- package/dist/src/tui/app.js +49 -0
- package/dist/src/tui/app.js.map +1 -1
- package/dist/src/tui/board.js +88 -12
- package/dist/src/tui/board.js.map +1 -1
- package/dist/src/tui/cmdbar.js +4 -1
- package/dist/src/tui/cmdbar.js.map +1 -1
- package/dist/src/tui/companion.js +74 -10
- package/dist/src/tui/companion.js.map +1 -1
- package/dist/src/tui/connect.js +7 -1
- package/dist/src/tui/connect.js.map +1 -1
- package/dist/src/tui/filters.js +5 -2
- package/dist/src/tui/filters.js.map +1 -1
- package/dist/src/tui/ghread.js +61 -5
- package/dist/src/tui/ghread.js.map +1 -1
- package/dist/src/tui/index.js +106 -20
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/memforward.js +39 -2
- package/dist/src/tui/memforward.js.map +1 -1
- package/dist/src/tui/model.js +25 -0
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/prpause.js +7 -0
- package/dist/src/tui/prpause.js.map +1 -1
- package/dist/src/tui/remote.js +7 -1
- package/dist/src/tui/remote.js.map +1 -1
- package/dist/src/tui/route.js +143 -0
- package/dist/src/tui/route.js.map +1 -0
- package/dist/src/tui/setupstate.js +29 -0
- package/dist/src/tui/setupstate.js.map +1 -0
- package/dist/src/tui/sshtriage.js +102 -5
- package/dist/src/tui/sshtriage.js.map +1 -1
- package/dist/src/tui/theme.js +2 -1
- package/dist/src/tui/theme.js.map +1 -1
- package/dist/src/tui/unwedge.js +2 -12
- package/dist/src/tui/unwedge.js.map +1 -1
- package/dist/src/verdicts.js +17 -5
- package/dist/src/verdicts.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/src/webhook.js +12 -1
- package/dist/src/webhook.js.map +1 -1
- package/dist/src/wire.js +28 -6
- package/dist/src/wire.js.map +1 -1
- package/dist/src/workerworld.js +7 -1
- package/dist/src/workerworld.js.map +1 -1
- package/docker/companion/entrypoint.sh +20 -1
- package/docker/entrypoint.sh +17 -0
- package/extensions/cli/login-route.ts +10 -0
- package/extensions/login-route.ts +220 -0
- package/extensions/onboarding.ts +35 -6
- package/package.json +2 -2
- package/prompts/onboarding.md +57 -18
- package/scripts/mint-token.sh +25 -4
- package/src/ciretry.ts +2 -1
- package/src/cli.ts +49 -14
- package/src/cliops.ts +3 -2
- package/src/commands.ts +28 -2
- package/src/config.ts +24 -4
- package/src/daemon.ts +32 -7
- package/src/debugroundpi.ts +11 -1
- package/src/dispatch.ts +5 -4
- package/src/engine/debugpi.ts +17 -5
- package/src/execboundary.ts +16 -4
- package/src/github.ts +57 -15
- package/src/githubtoken.ts +435 -0
- package/src/loginhint.ts +8 -3
- package/src/loginrefresh/pirefresh.ts +3 -0
- package/src/npmverbs.ts +4 -2
- package/src/onboard/choices.ts +34 -1
- package/src/onboard/engine.ts +22 -3
- package/src/onboard/launch.ts +17 -29
- package/src/onboard/pipin.ts +31 -0
- package/src/onboard/stepforward.ts +61 -0
- package/src/onboard/steps/appslug.ts +4 -1
- package/src/onboard/steps/compose.ts +31 -0
- package/src/onboard/steps/configfill.ts +121 -33
- package/src/onboard/steps/githubaccount.ts +716 -0
- package/src/onboard/steps/githubapp.ts +92 -8
- package/src/onboard/steps/golive.ts +2 -0
- package/src/onboard/steps/index.ts +11 -0
- package/src/onboard/steps/ingress.ts +98 -31
- package/src/onboard/steps/llmauth.ts +114 -29
- package/src/onboard/steps/memory.ts +58 -1
- package/src/onboard/steps/proof.ts +473 -55
- package/src/onboard/steps/topology.ts +7 -6
- package/src/onboard/steps/transport.ts +15 -0
- package/src/onboard/steps/tuiroute.ts +119 -0
- package/src/onboard/steps/verifyup.ts +20 -1
- package/src/onboard/toolnames.ts +34 -0
- package/src/operatorwrite.ts +25 -0
- package/src/outcomes.ts +8 -1
- package/src/posting-journal.ts +6 -1
- package/src/posting-outbox.ts +10 -2
- package/src/posting-receipt.ts +17 -0
- package/src/recheck.ts +2 -1
- package/src/reconcile.ts +29 -3
- package/src/reviewhistory.ts +20 -6
- package/src/reviewnow.ts +76 -0
- package/src/state.ts +18 -0
- package/src/statemachine.ts +4 -1
- package/src/takeoverpi.ts +13 -0
- package/src/tui/app.ts +47 -0
- package/src/tui/board.ts +111 -14
- package/src/tui/cmdbar.ts +4 -1
- package/src/tui/companion.ts +78 -10
- package/src/tui/connect.ts +7 -1
- package/src/tui/filters.ts +7 -3
- package/src/tui/ghread.ts +74 -7
- package/src/tui/index.ts +114 -23
- package/src/tui/memforward.ts +52 -3
- package/src/tui/model.ts +36 -2
- package/src/tui/prpause.ts +11 -2
- package/src/tui/remote.ts +9 -1
- package/src/tui/route.ts +173 -0
- package/src/tui/setupstate.ts +52 -0
- package/src/tui/sshtriage.ts +127 -6
- package/src/tui/theme.ts +2 -1
- package/src/tui/unwedge.ts +2 -14
- package/src/verdicts.ts +23 -5
- package/src/version.ts +1 -1
- package/src/webhook.ts +10 -1
- package/src/wire.ts +36 -7
- package/src/workerworld.ts +7 -1
package/README.md
CHANGED
|
@@ -223,9 +223,19 @@ Slack concierge, a local companion session, opt-in escalation notes, and the
|
|
|
223
223
|
|
|
224
224
|
## Quickstart
|
|
225
225
|
|
|
226
|
-
You need **Docker** with Compose v2
|
|
227
|
-
|
|
228
|
-
Windows, run everything inside **WSL2**.
|
|
226
|
+
You need **Docker** with Compose v2, a model login, and either `gh` signed in
|
|
227
|
+
to your own GitHub account or **a GitHub account that can create an App** on
|
|
228
|
+
the repository to review. On Windows, run everything inside **WSL2**.
|
|
229
|
+
|
|
230
|
+
There is a second route that needs no App: `[github] auth = "user"` runs the
|
|
231
|
+
reviewer on **your own GitHub account**. Use it on one box where `gh` is
|
|
232
|
+
already signed in. It is polling-only, with no webhooks and no tunnel. Every
|
|
233
|
+
review it posts is a COMMENT that states its verdict, because an automated
|
|
234
|
+
verdict must never count as your approval and GitHub refuses either on your own
|
|
235
|
+
PR. Your token reaches the daemon only as the 0600 file
|
|
236
|
+
`<secrets dir>/github_token`, which `qcr github-token sync` refreshes from
|
|
237
|
+
`gh`. It never comes from the environment or a command line. On the App route
|
|
238
|
+
no personal access token is used.
|
|
229
239
|
|
|
230
240
|
```sh
|
|
231
241
|
# once: install `qcr`, the host wrapper the image writes (docs/host-wrapper.md);
|
|
@@ -237,28 +247,34 @@ qcr onboard # the whole setup, guided
|
|
|
237
247
|
```
|
|
238
248
|
|
|
239
249
|
`qcr onboard` is a pi agent that walks you through setup using named,
|
|
240
|
-
deterministic tools whose results you see.
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
GitHub App in one click** from a pinned manifest,
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
250
|
+
deterministic tools whose results you see. pi's `/login` opens by itself the
|
|
251
|
+
first time; any OpenAI login works ([docs/llm-setup.md](docs/llm-setup.md)).
|
|
252
|
+
It checks the machine, takes your own GitHub account where `gh` is signed in
|
|
253
|
+
(or **creates your GitHub App in one click** from a pinned manifest, if you
|
|
254
|
+
want a bot identity or webhooks), asks for one repository, defaults to polling,
|
|
255
|
+
mints the memory keys and brings the stack up. Setup ends there, and the TUI
|
|
256
|
+
opens on the board: it lists every open pull request of the repository, and
|
|
257
|
+
**`R` on the one you select reviews it now**, with no label to add, its
|
|
258
|
+
progress on the board and, in dry-run, the review recorded instead of posted.
|
|
259
|
+
Re-run `qcr onboard` to go live once you have read a review. It is resumable,
|
|
260
|
+
and re-running it on a working install is a diagnostic. Every step:
|
|
261
|
+
[docs/onboarding.md](docs/onboarding.md).
|
|
248
262
|
|
|
249
263
|
### Where the reviewer lives
|
|
250
264
|
|
|
251
|
-
- **
|
|
252
|
-
|
|
265
|
+
- **This computer**, in Docker ([docker/README.md](docker/README.md)): the
|
|
266
|
+
pick when the machine is itself an always-on server, such as a cloud VM;
|
|
267
|
+
on a laptop it reviews only while the machine is awake.
|
|
268
|
+
- **A server over ssh**, recommended when your own computer sleeps. Setup
|
|
269
|
+
rides the Ansible deploy
|
|
253
270
|
([deploy/ansible/README.md](deploy/ansible/README.md)); it needs
|
|
254
271
|
passwordless sudo there and `ansible-playbook` on your machine.
|
|
255
|
-
- **This computer**, in Docker, reviewing while the machine is awake
|
|
256
|
-
([docker/README.md](docker/README.md)).
|
|
257
272
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
273
|
+
Polling is the default: the daemon checks GitHub every few minutes and
|
|
274
|
+
exposes nothing, at the cost of trigger latency up to one poll interval and
|
|
275
|
+
quiet author-reply routing and `[feedback]` loop. Webhooks need an HTTPS URL:
|
|
276
|
+
a Cloudflare quick tunnel, ngrok or your own named Cloudflare tunnel, on the
|
|
277
|
+
App route only. The trade-offs are in
|
|
262
278
|
[docker/README.md](docker/README.md).
|
|
263
279
|
|
|
264
280
|
`dry_run = true` stays on until you flip it, through the wizard's go-live
|
package/config.example.toml
CHANGED
|
@@ -27,8 +27,22 @@ timezone = "UTC" # ← FILL: your IANA timezone, e.g
|
|
|
27
27
|
|
|
28
28
|
[github]
|
|
29
29
|
repo = "" # ← FILL (1): the repo to review, "owner/name"
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
# Whose GitHub credential the daemon runs on:
|
|
31
|
+
# "app" (the default; a missing key means "app") — a GitHub App: its
|
|
32
|
+
# installation token, webhooks, APPROVE / REQUEST_CHANGES reviews.
|
|
33
|
+
# "user" — your OWN GitHub account, no App. Polling only: [ingress] shape
|
|
34
|
+
# must be "polling" (config load refuses anything else), no webhooks,
|
|
35
|
+
# no webhook self-heal. Every review posts as a COMMENT whose body
|
|
36
|
+
# states the verdict (an automated verdict never counts as your
|
|
37
|
+
# approval, and GitHub refuses either on your own PR). The token is
|
|
38
|
+
# read from the FILE <secrets dir>/github_token (0600, the token
|
|
39
|
+
# alone), which `qcr github-token sync` writes from your `gh` login;
|
|
40
|
+
# never from the environment or a command line. app_slug may be "";
|
|
41
|
+
# bot_login is your own GitHub login. The App secrets (app_id,
|
|
42
|
+
# app.pem, webhook_secret) are not needed.
|
|
43
|
+
#auth = "app"
|
|
44
|
+
app_slug = "" # ← FILL (2): your GitHub App slug ("" under auth = "user")
|
|
45
|
+
bot_login = "" # ← FILL (3): the App bot login, "<app_slug>[bot]" (your login under auth = "user")
|
|
32
46
|
review_team = "" # ← FILL (4): "org/team" whose review request triggers
|
|
33
47
|
# There is no reviewer knob here. The reviewer never hands a PR back: it always
|
|
34
48
|
# decides on the merits and posts a verdict. If you want a named person told
|
|
@@ -39,7 +53,8 @@ in_progress_label = "AI review in progress"
|
|
|
39
53
|
reviewed_label = "Automatic Review"
|
|
40
54
|
improvement_label = "Bot improvement"
|
|
41
55
|
issue_label = "bot-filed"
|
|
42
|
-
# secrets dir: app_id, app.pem, webhook_secret, tunnel_token
|
|
56
|
+
# secrets dir: app_id, app.pem, webhook_secret, tunnel_token (auth = "user": github_token instead
|
|
57
|
+
# of the first three); optional openai_api_key (pi, API-key
|
|
43
58
|
# route) and openai_embeddings_api_key (only with embedding_provider = "openai" in the openviking table)
|
|
44
59
|
# "" (recommended) = the install's config home, $XDG_CONFIG_HOME/qcr/<install>/secrets (the old
|
|
45
60
|
# ~/.config/quickreview-bot is never read — `qcr install migrate` moves it). A path here wins.
|
|
@@ -81,8 +96,12 @@ port = 8787 # loopback only; your HTTPS ingress
|
|
|
81
96
|
# touches only the App's own configuration, never the reviewed repo. Off by
|
|
82
97
|
# default: with the section absent (or shape = "none") no watcher ever starts —
|
|
83
98
|
# a stable hostname (named tunnel, VM route) needs none of this.
|
|
99
|
+
# shape = "polling" takes no webhooks at all: the daemon's /webhook route
|
|
100
|
+
# refuses every delivery, no webhook_secret is read, and the reconcile poll
|
|
101
|
+
# (poll_interval_s, below) is the only trigger. [github] auth = "user"
|
|
102
|
+
# requires it.
|
|
84
103
|
#[ingress]
|
|
85
|
-
#shape = "tunnel-file" # "none" (default) | "tunnel-file"
|
|
104
|
+
#shape = "tunnel-file" # "none" (default) | "tunnel-file" | "polling"
|
|
86
105
|
#hostname_file = "" # "" ⇒ <root>/state/ingress/hostname
|
|
87
106
|
#debounce_ms = 3000 # settle time after a file change
|
|
88
107
|
#sweep_interval_s = 300 # polling backstop behind fs.watch
|
|
@@ -204,7 +223,9 @@ improvement_pr_deny_prefixes = ["migrations/", "infra/", "ansible/", ".github/wo
|
|
|
204
223
|
[models]
|
|
205
224
|
# default for every role; tiered pass models below
|
|
206
225
|
# Provider prefix is `openai-codex/` — the ChatGPT-OAuth route's provider key
|
|
207
|
-
# in pi's auth.json
|
|
226
|
+
# in pi's auth.json. Any OpenAI login serves it: when pi holds no
|
|
227
|
+
# `openai-codex` login but an `openai` one (pi 1.4's Sign in with ChatGPT, or
|
|
228
|
+
# an OpenAI API key), the same model runs on `openai` (docs/llm-setup.md).
|
|
208
229
|
default = "openai-codex/gpt-6.1-sol"
|
|
209
230
|
conversation = "openai-codex/gpt-6.1-sol"
|
|
210
231
|
# Passes always run at sol-high — single variant, not raisable (already top).
|
|
@@ -261,7 +282,11 @@ small_diff_lines = 150
|
|
|
261
282
|
# memory forward follows this knob too — it reaches the daemon
|
|
262
283
|
# container's loopback memory engine with a plain `docker exec`
|
|
263
284
|
# (the forward script's --local mode) instead of the ssh hop.
|
|
264
|
-
#
|
|
285
|
+
# Onboarding writes this from the recorded topology. Until it has (ssh with an
|
|
286
|
+
# EMPTY ssh_host), the TUI never runs `ssh ""`: on a compose project (the
|
|
287
|
+
# checklist recorded the local topology, or the project .env pins
|
|
288
|
+
# QCR_VERSION) it reads the local stack and says so once; otherwise every
|
|
289
|
+
# surface says "ssh_host is empty — run qcr onboard".
|
|
265
290
|
target = "ssh"
|
|
266
291
|
ssh_host = "" # ← FILL (7): ssh alias of the VM running the container
|
|
267
292
|
# (leave "" when target = "local" — it is unused)
|
|
@@ -270,10 +295,14 @@ memory_container = "" # the container the memory forward relays into
|
|
|
270
295
|
# (OpenViking is the daemon container's child). On a VM running
|
|
271
296
|
# the memory sidecar (the openviking table's endpoint =
|
|
272
297
|
# "remote") set "quickreview-memory"; flip it back with the endpoint.
|
|
273
|
-
remote_state_dir = "/opt/quickreview/state" # host path on ssh; inside the daemon container on local
|
|
298
|
+
remote_state_dir = "/opt/quickreview/state" # host path on ssh; inside the daemon container on local,
|
|
299
|
+
# where this default reads as the release image's /opt/qcr/state
|
|
300
|
+
# (the compose state volume; onboarding writes it for local)
|
|
274
301
|
remote_sandbox_root = "" # "" = read the container's qcr.layout label (release: /opt/qcr, legacy: /opt/quickreview/sandbox);
|
|
275
302
|
# a value here wins and is never probed
|
|
276
|
-
sudo_docker = true # docker on the VM needs sudo (root-owned socket)
|
|
303
|
+
sudo_docker = true # docker on the VM needs sudo (root-owned socket). On local, onboarding
|
|
304
|
+
# writes false, and the TUI drops sudo by itself when this user can open
|
|
305
|
+
# the docker socket (a sudo prompt behind the TUI can only fail)
|
|
277
306
|
poll_interval_s = 3
|
|
278
307
|
stale_after_s = 90 # DATA STALE banner past this written_at age
|
|
279
308
|
# (the daemon rewrites status.json every ~30s)
|
|
@@ -594,7 +623,10 @@ local_embedder_threads = 1
|
|
|
594
623
|
# (COMPANION_DEFAULTS) are the shipped configuration; uncomment to override.
|
|
595
624
|
# enabled = true # `qcr tui` starts it unless --no-companion
|
|
596
625
|
# container_name = "qcr-companion"
|
|
597
|
-
# image = "qcr-companion:release" # the release image (docker/Dockerfile) in companion mode, built from the app root: qcr companion rebuild
|
|
626
|
+
# image = "qcr-companion:release" # the release image (docker/Dockerfile) in companion mode, built from the app root: qcr companion rebuild.
|
|
627
|
+
# # Left unset on a compose box (the project .env pins QCR_VERSION), a first start runs the
|
|
628
|
+
# # already-pulled ghcr.io/quickchatai/quickreview:<QCR_VERSION> instead of building, unless a
|
|
629
|
+
# # local build exists; a ghcr.io/quickchatai/quickreview tag set here is pulled, never built over
|
|
598
630
|
# pihome_volume = "companion-pihome" # its OWN pi auth — never the VM's auth.json
|
|
599
631
|
# session = "companion" # tmux session inside the container
|
|
600
632
|
# model = "openai-codex/gpt-6.1-sol:medium"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login-route.js","sourceRoot":"","sources":["../../../extensions/cli/login-route.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAgB;IAC/C,KAAK,gBAAgB,CAAC,uBAAuB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
// login-route — a pi that has no usable model login says so, and opens pi's
|
|
2
|
+
// own /login; a pi whose model names one OpenAI provider while the person
|
|
3
|
+
// logged in with the other runs the same model on the login that exists.
|
|
4
|
+
//
|
|
5
|
+
// Loaded by every CLI pi Quickreview starts for a person: the onboarding
|
|
6
|
+
// wizard (registered by extensions/onboarding.ts, which opens the login for
|
|
7
|
+
// the person), the companion, a takeover and a debug round (the env shim
|
|
8
|
+
// extensions/cli/login-route.ts, which prefills it). An SDK session needs none
|
|
9
|
+
// of this: PiHost routes its model the same way (packages/pi-plugin/src/engine/pisdk.ts).
|
|
10
|
+
//
|
|
11
|
+
// Three behaviours, each on pi's own API:
|
|
12
|
+
// - Model route. On session_start and before every prompt (the `input`
|
|
13
|
+
// event, which pi runs before it checks the model's credential), a model
|
|
14
|
+
// whose provider has no credential is switched to its OpenAI twin when the
|
|
15
|
+
// twin has one and serves the same id (packages/pi-plugin/src/modelroute.ts).
|
|
16
|
+
// The provider the spec names always wins when its login exists, so an
|
|
17
|
+
// install that works today is untouched. pi.setModel does not persist the
|
|
18
|
+
// switch to settings.
|
|
19
|
+
// - Login hint. When no usable model is left, a widget says exactly what to
|
|
20
|
+
// do, and pi's input line holds `/login`, so one Enter opens pi's login.
|
|
21
|
+
// The widget clears once a model is selected (`model_select`).
|
|
22
|
+
// - Open (the wizard only). pi runs `/login` only from its editor's submit
|
|
23
|
+
// (an extension cannot call the command), and the one public way to reach
|
|
24
|
+
// that submit is an editor component: pi wires its own submit handler
|
|
25
|
+
// onto every editor an extension installs. So the login is opened by
|
|
26
|
+
// installing a stock CustomEditor for an instant, submitting `/login`
|
|
27
|
+
// through the handler pi gave it, and restoring the editor that was there.
|
|
28
|
+
// When that wiring is not found, the prefilled `/login` is the fallback.
|
|
29
|
+
import { CustomEditor, } from "@earendil-works/pi-coding-agent";
|
|
30
|
+
import { routeProvider, twinProvider } from "@quickchatai/pi-quickreview/src/modelroute.js";
|
|
31
|
+
/** The widget key the hint is shown under. */
|
|
32
|
+
export const LOGIN_WIDGET = "qcr-login";
|
|
33
|
+
/** The command the hint prefills and the wizard submits: pi's own login,
|
|
34
|
+
* with every provider it offers. */
|
|
35
|
+
export const LOGIN_COMMAND = "/login";
|
|
36
|
+
/** What the person reads above the input line while no model is usable:
|
|
37
|
+
* which logins work and how to reach them in pi's menu (pi 1.4.0's labels),
|
|
38
|
+
* then how to (re)open the menu. `opened` says whether the menu is on screen. */
|
|
39
|
+
export function loginHintLines(opened) {
|
|
40
|
+
return [
|
|
41
|
+
"Quickreview needs a model login before it can do anything. Any OpenAI login works:",
|
|
42
|
+
' - "Sign in with an account", then "OpenAI" (Sign in with ChatGPT) or "OpenAI Codex (legacy)";',
|
|
43
|
+
' - "Sign in with an API key", then type openai, pick "OpenAI" and paste your key (sk-...).',
|
|
44
|
+
opened
|
|
45
|
+
? `pi's login menu is open below. Closed it? Type ${LOGIN_COMMAND} and press Enter.`
|
|
46
|
+
: `Press Enter to open pi's login menu (${LOGIN_COMMAND} is on the input line).`,
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
/** The config the env describes: QCR_LOGIN_OPEN=submit, else prefill. */
|
|
50
|
+
export function loginRouteConfigFromEnv(env) {
|
|
51
|
+
return { open: env.QCR_LOGIN_OPEN === "submit" ? "submit" : "prefill" };
|
|
52
|
+
}
|
|
53
|
+
function hasCredential(registry, provider) {
|
|
54
|
+
try {
|
|
55
|
+
return registry.getProviderAuthStatus(provider).configured;
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Keep the session's model on a login that exists: the model as it is when its
|
|
63
|
+
* provider has a credential, else its OpenAI twin when that has one.
|
|
64
|
+
*
|
|
65
|
+
* VERIFY-ON-PIN (pi 1.4.0): ModelRegistry.getProviderAuthStatus(p).configured
|
|
66
|
+
* covers a stored login, a stored or runtime key and an environment key, and
|
|
67
|
+
* the extension pi.setModel returns false (switching nothing) for a provider
|
|
68
|
+
* without a credential.
|
|
69
|
+
*/
|
|
70
|
+
export async function routeSessionModel(pi, ctx) {
|
|
71
|
+
const model = ctx.model;
|
|
72
|
+
if (!model)
|
|
73
|
+
return "none";
|
|
74
|
+
const registry = ctx.modelRegistry;
|
|
75
|
+
if (hasCredential(registry, model.provider))
|
|
76
|
+
return "usable";
|
|
77
|
+
if (twinProvider(model.provider) === undefined)
|
|
78
|
+
return "unusable";
|
|
79
|
+
const provider = routeProvider(model.provider, model.id, {
|
|
80
|
+
hasCredential: (p) => hasCredential(registry, p),
|
|
81
|
+
hasModel: (p, id) => registry.find(p, id) !== undefined,
|
|
82
|
+
});
|
|
83
|
+
if (provider === model.provider)
|
|
84
|
+
return "unusable";
|
|
85
|
+
const twin = registry.find(provider, model.id);
|
|
86
|
+
if (twin && (await pi.setModel(twin)))
|
|
87
|
+
return "switched";
|
|
88
|
+
return "unusable";
|
|
89
|
+
}
|
|
90
|
+
/** Does this pi need a login: no usable model, and none pi could pick? */
|
|
91
|
+
export function needsLogin(outcome, registry) {
|
|
92
|
+
if (outcome === "usable" || outcome === "switched")
|
|
93
|
+
return false;
|
|
94
|
+
if (outcome === "unusable")
|
|
95
|
+
return true;
|
|
96
|
+
try {
|
|
97
|
+
return registry.getAvailable().length === 0;
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Submit `text` through pi's own editor submit, as if typed and Entered. pi
|
|
105
|
+
* runs its built-in commands (`/login` among them) only from that handler, and
|
|
106
|
+
* hands it to every editor component an extension installs: so a stock editor
|
|
107
|
+
* is installed, its handler taken, and the previous editor (pi's default, or
|
|
108
|
+
* another extension's) restored before anything renders. Returns false, having
|
|
109
|
+
* submitted nothing, when pi did not wire a handler.
|
|
110
|
+
*
|
|
111
|
+
* VERIFY-ON-PIN (pi 1.4.0, interactive-mode.js setCustomEditorComponent):
|
|
112
|
+
* `newEditor.onSubmit = this.defaultEditor.onSubmit` runs synchronously inside
|
|
113
|
+
* setEditorComponent, and setEditorComponent(undefined) restores the default
|
|
114
|
+
* editor with its text.
|
|
115
|
+
*/
|
|
116
|
+
export function submitThroughEditor(ui, text, makeEditor = (tui, theme, keybindings) => new CustomEditor(tui, theme, keybindings)) {
|
|
117
|
+
let made;
|
|
118
|
+
const previous = ui.getEditorComponent();
|
|
119
|
+
try {
|
|
120
|
+
ui.setEditorComponent((tui, theme, keybindings) => {
|
|
121
|
+
const editor = makeEditor(tui, theme, keybindings);
|
|
122
|
+
made = editor;
|
|
123
|
+
return editor;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
made = undefined;
|
|
128
|
+
}
|
|
129
|
+
const submit = made?.onSubmit;
|
|
130
|
+
ui.setEditorComponent(previous);
|
|
131
|
+
if (typeof submit !== "function")
|
|
132
|
+
return false;
|
|
133
|
+
void Promise.resolve()
|
|
134
|
+
.then(() => submit(text))
|
|
135
|
+
.catch(() => undefined);
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
/** Show the hint and open (or prefill) pi's login. Returns how it was opened. */
|
|
139
|
+
export function openLogin(ui, open) {
|
|
140
|
+
if (open === "submit" && submitThroughEditor(ui, LOGIN_COMMAND)) {
|
|
141
|
+
ui.setWidget(LOGIN_WIDGET, loginHintLines(true), { placement: "aboveEditor" });
|
|
142
|
+
return "submitted";
|
|
143
|
+
}
|
|
144
|
+
ui.setWidget(LOGIN_WIDGET, loginHintLines(false), { placement: "aboveEditor" });
|
|
145
|
+
ui.setEditorText(LOGIN_COMMAND);
|
|
146
|
+
return "prefilled";
|
|
147
|
+
}
|
|
148
|
+
/** Register the model route and the login hint on `pi`. Exported so a host that
|
|
149
|
+
* builds its own onboarding extension (over `toolDefinitions`) gets the same
|
|
150
|
+
* first-run login as `qcr onboard`. */
|
|
151
|
+
export function registerLoginRoute(pi, config) {
|
|
152
|
+
if (typeof pi.on !== "function")
|
|
153
|
+
return;
|
|
154
|
+
let shown = false;
|
|
155
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
156
|
+
const outcome = await routeSessionModel(pi, ctx);
|
|
157
|
+
if (!ctx.hasUI || !needsLogin(outcome, ctx.modelRegistry))
|
|
158
|
+
return;
|
|
159
|
+
shown = true;
|
|
160
|
+
openLogin(ctx.ui, config.open);
|
|
161
|
+
});
|
|
162
|
+
// pi checks the model's credential after this event, so a login made inside
|
|
163
|
+
// the session (its default model stays the spec's provider) is routed here.
|
|
164
|
+
pi.on("input", async (_event, ctx) => {
|
|
165
|
+
await routeSessionModel(pi, ctx);
|
|
166
|
+
return { action: "continue" };
|
|
167
|
+
});
|
|
168
|
+
pi.on("model_select", (_event, ctx) => {
|
|
169
|
+
if (!shown || !ctx.hasUI)
|
|
170
|
+
return;
|
|
171
|
+
shown = false;
|
|
172
|
+
ctx.ui.setWidget(LOGIN_WIDGET, undefined);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/** The factory, for a pi that loads the route by path (its shim) or a host
|
|
176
|
+
* that composes factories. */
|
|
177
|
+
export function createLoginRoute(config) {
|
|
178
|
+
return (pi) => registerLoginRoute(pi, config);
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=login-route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login-route.js","sourceRoot":"","sources":["../../extensions/login-route.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,0EAA0E;AAC1E,yEAAyE;AACzE,EAAE;AACF,yEAAyE;AACzE,4EAA4E;AAC5E,yEAAyE;AACzE,+EAA+E;AAC/E,0FAA0F;AAC1F,EAAE;AACF,0CAA0C;AAC1C,yEAAyE;AACzE,6EAA6E;AAC7E,+EAA+E;AAC/E,kFAAkF;AAClF,2EAA2E;AAC3E,8EAA8E;AAC9E,0BAA0B;AAC1B,8EAA8E;AAC9E,6EAA6E;AAC7E,mEAAmE;AACnE,6EAA6E;AAC7E,8EAA8E;AAC9E,0EAA0E;AAC1E,yEAAyE;AACzE,0EAA0E;AAC1E,+EAA+E;AAC/E,6EAA6E;AAC7E,OAAO,EACL,YAAY,GAKb,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE5F,8CAA8C;AAC9C,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAC;AAExC;oCACoC;AACpC,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC;AAEtC;;iFAEiF;AACjF,MAAM,UAAU,cAAc,CAAC,MAAe;IAC5C,OAAO;QACL,oFAAoF;QACpF,iGAAiG;QACjG,6FAA6F;QAC7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G,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,aAAa,CAAC;YAAE,OAAO;QAClE,KAAK,GAAG,IAAI,CAAC;QACb,SAAS,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IACH,4EAA4E;IAC5E,4EAA4E;IAC5E,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE;QACnC,MAAM,iBAAiB,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QACjC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAChC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,EAAE,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QACpC,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,KAAK;YAAE,OAAO;QACjC,KAAK,GAAG,KAAK,CAAC;QACd,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC;AAED;8BAC8B;AAC9B,MAAM,UAAU,gBAAgB,CAAC,MAAwB;IACvD,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,kBAAkB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -23,7 +23,10 @@ import { join } from "node:path";
|
|
|
23
23
|
import { registerQcrTool, textResult as text, } from "@quickchatai/pi-quickreview/extensions/pi-tool.js";
|
|
24
24
|
import { OnboardingEngine, } from "../src/onboard/engine.js";
|
|
25
25
|
import { defaultSteps } from "../src/onboard/steps/index.js";
|
|
26
|
+
import { openStepMemoryForward } from "../src/onboard/stepforward.js";
|
|
26
27
|
import { locateConfig } from "../src/install.js";
|
|
28
|
+
import { registerLoginRoute } from "./login-route.js";
|
|
29
|
+
import { ONBOARD_FINISH_TOOL, ONBOARD_STATUS_TOOL, onboardStepToolName, } from "../src/onboard/toolnames.js";
|
|
27
30
|
const NO_PARAMS = { type: "object", properties: {} };
|
|
28
31
|
// ---- real adapters ----------------------------------------------------------
|
|
29
32
|
/** The one real adapter assembly. Steps see the host only through this. */
|
|
@@ -52,6 +55,7 @@ export function realAdapters(root) {
|
|
|
52
55
|
// $QCR_CONFIG, else the install's config home (never the checkout's).
|
|
53
56
|
paths: { stateDir: join(root, "state"), configPath: locateConfig().path },
|
|
54
57
|
log: (line) => console.error(line),
|
|
58
|
+
memoryForward: (req) => openStepMemoryForward(req),
|
|
55
59
|
};
|
|
56
60
|
}
|
|
57
61
|
export function buildEngine(root) {
|
|
@@ -63,7 +67,13 @@ export function renderChecks(checks) {
|
|
|
63
67
|
}
|
|
64
68
|
export function renderStatus(lines, reconciled) {
|
|
65
69
|
const rows = lines.map((l) => {
|
|
66
|
-
const mark = l.status === "done"
|
|
70
|
+
const mark = l.status === "done"
|
|
71
|
+
? "[done]"
|
|
72
|
+
: l.status === "disabled"
|
|
73
|
+
? "[skipped]"
|
|
74
|
+
: l.optional
|
|
75
|
+
? "[after setup]"
|
|
76
|
+
: "[ ]";
|
|
67
77
|
return `${mark} ${l.id} — ${l.title}${l.note ? ` (${l.note})` : ""}`;
|
|
68
78
|
});
|
|
69
79
|
const demoted = reconciled.demoted.map((d) => `re-verification demoted ${d.id}: ${d.failures.join("; ")}`);
|
|
@@ -81,7 +91,7 @@ export function renderStatus(lines, reconciled) {
|
|
|
81
91
|
*/
|
|
82
92
|
export function toolDefinitions(engine, shutdown) {
|
|
83
93
|
const stepTools = engine.stepDefs().map((step) => ({
|
|
84
|
-
name:
|
|
94
|
+
name: onboardStepToolName(step.id),
|
|
85
95
|
label: step.title,
|
|
86
96
|
description: `${step.explain} Deterministic: runs the "${step.id}" onboarding step's real checks and returns one ✓/✗ line per check. ` +
|
|
87
97
|
"Safe to re-run; a failed run leaves the step pending.",
|
|
@@ -102,7 +112,7 @@ export function toolDefinitions(engine, shutdown) {
|
|
|
102
112
|
},
|
|
103
113
|
}));
|
|
104
114
|
const status = {
|
|
105
|
-
name:
|
|
115
|
+
name: ONBOARD_STATUS_TOOL,
|
|
106
116
|
label: "Onboarding status",
|
|
107
117
|
description: "The checklist: every step in order with its status. Re-verifies each claimed-done step against reality first " +
|
|
108
118
|
"(the state file is never trusted alone), so call this at the start of every session and after anything changes outside the tools.",
|
|
@@ -114,7 +124,7 @@ export function toolDefinitions(engine, shutdown) {
|
|
|
114
124
|
},
|
|
115
125
|
};
|
|
116
126
|
const finish = {
|
|
117
|
-
name:
|
|
127
|
+
name: ONBOARD_FINISH_TOOL,
|
|
118
128
|
label: "Finish onboarding",
|
|
119
129
|
description: "Re-run EVERY verification. While anything is red this refuses and returns the failures — it never exits on red. " +
|
|
120
130
|
"When all green it marks onboarding complete, writes the companion first-run marker, and shuts this session down; " +
|
|
@@ -125,7 +135,7 @@ export function toolDefinitions(engine, shutdown) {
|
|
|
125
135
|
const result = await engine.finish();
|
|
126
136
|
if (!result.ok) {
|
|
127
137
|
const red = result.results
|
|
128
|
-
.filter((r) => !r.ok)
|
|
138
|
+
.filter((r) => !r.ok && !r.optional)
|
|
129
139
|
.map((r) => `✗ ${r.id}: ${r.failures.join("; ") || "not verified"}`);
|
|
130
140
|
return text(`Not finished — these verifications are red:\n${red.join("\n")}\n` +
|
|
131
141
|
"Fix them (or run the step tools again), then call finish_and_exit once more.");
|
|
@@ -137,7 +147,8 @@ export function toolDefinitions(engine, shutdown) {
|
|
|
137
147
|
setTimeout(() => shutdown(ctx), 250);
|
|
138
148
|
return text(`Every step verified green — onboarding is complete (recorded ${result.completed_at}).\n` +
|
|
139
149
|
`${result.marker_written ? "First-run marker written for the companion greeting." : "First-run marker already present — left untouched."}\n` +
|
|
140
|
-
"This session now shuts down and the TUI opens
|
|
150
|
+
"This session now shuts down and the TUI opens: the board lists the repository's open pull requests — " +
|
|
151
|
+
"select one and press R to review it now (dry-run: nothing is posted).");
|
|
141
152
|
},
|
|
142
153
|
};
|
|
143
154
|
return [...stepTools, status, finish];
|
|
@@ -151,7 +162,19 @@ export function onboardingConfigFromEnv(env, cwd) {
|
|
|
151
162
|
export function createOnboarding(config) {
|
|
152
163
|
return (pi) => registerOnboarding(pi, config);
|
|
153
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* The onboarding session's first-run login: when pi has no usable model
|
|
167
|
+
* login, pi's own /login menu opens with a widget that says which logins work
|
|
168
|
+
* (any OpenAI one), and an OpenAI model whose provider has no login runs on
|
|
169
|
+
* the twin login that exists (extensions/login-route.ts). `qcr onboard`
|
|
170
|
+
* registers it with the tools; a host that builds its own onboarding
|
|
171
|
+
* extension over `toolDefinitions` + `registerQcrTool` calls it too.
|
|
172
|
+
*/
|
|
173
|
+
export function registerOnboardingSession(pi) {
|
|
174
|
+
registerLoginRoute(pi, { open: "submit" });
|
|
175
|
+
}
|
|
154
176
|
function registerOnboarding(pi, config) {
|
|
177
|
+
registerOnboardingSession(pi);
|
|
155
178
|
if (typeof pi.registerTool !== "function") {
|
|
156
179
|
// Degrade loudly, never wedge: pi still starts, the guide can only talk.
|
|
157
180
|
console.error("onboarding: pi.registerTool unavailable — no wizard tools registered; this pi cannot run onboarding.");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding.js","sourceRoot":"","sources":["../../extensions/onboarding.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,+EAA+E;AAC/E,+EAA+E;AAC/E,8EAA8E;AAC9E,yEAAyE;AACzE,uEAAuE;AACvE,EAAE;AACF,4DAA4D;AAC5D,8EAA8E;AAC9E,4EAA4E;AAC5E,8EAA8E;AAC9E,yEAAyE;AACzE,kEAAkE;AAClE,8EAA8E;AAC9E,oDAAoD;AACpD,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,4DAA4D;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAA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C;AAED,SAAS,kBAAkB,CAAC,EAAgB,EAAE,MAAwB;IACpE,yBAAyB,CAAC,EAAE,CAAC,CAAC;IAC9B,IAAI,OAAO,EAAE,CAAC,YAAY,KAAK,UAAU,EAAE,CAAC;QAC1C,yEAAyE;QACzE,OAAO,CAAC,KAAK,CACX,sGAAsG,CACvG,CAAC;QACF,OAAO;IACT,CAAC;IACD,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,CAAC,GAA4C,EAAQ,EAAE;QACtE,MAAM,EAAE,GAAG,GAAG,EAAE,QAAQ,IAAK,EAAgD,CAAC,QAAQ,CAAC;QACvF,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC;YAC7B,sEAAsE;YACtE,wEAAwE;YACxE,KAAK,EAAE,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CACX,6FAA6F,CAC9F,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;IACF,KAAK,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC;QAAE,eAAe,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;AAChF,CAAC"}
|
package/dist/src/ciretry.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// is re-queued when its CI turns green, so its session can decide again.
|
|
5
5
|
//
|
|
6
6
|
// Nothing here triggers, re-runs or cancels CI: the one CI call is a GET.
|
|
7
|
+
import { botAccountLogin } from "@quickchatai/pi-quickreview/src/identity.js";
|
|
7
8
|
import { classifyCi, } from "@quickchatai/pi-quickreview/src/cigate.js";
|
|
8
9
|
import { applyEvent } from "./statemachine.js";
|
|
9
10
|
/**
|
|
@@ -77,7 +78,7 @@ export async function retryWithheldApproval(deps, req) {
|
|
|
77
78
|
if (after)
|
|
78
79
|
return noop(after, state);
|
|
79
80
|
applyEvent(store, req.pr, { type: "trigger", source: "reconcile" }, {}, {
|
|
80
|
-
botLogin: cfg.github
|
|
81
|
+
botLogin: botAccountLogin(cfg.github),
|
|
81
82
|
...(deps.now ? { now: deps.now } : {}),
|
|
82
83
|
reason: "ci-green:withheld-approval-retry",
|
|
83
84
|
});
|
package/dist/src/ciretry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ciretry.js","sourceRoot":"","sources":["../../src/ciretry.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,8FAA8F;AAC9F,6EAA6E;AAC7E,yEAAyE;AACzE,EAAE;AACF,0EAA0E;AAC1E,OAAO,EACL,UAAU,GAGX,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AA2C/C;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,IAAuB,EACvB,GAAyB;IAEzB,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAS,EAAE,GAAE,CAAC,CAAC,CAAC;IACzC,MAAM,IAAI,GAAG,CAAC,MAAuB,EAAE,EAAY,EAAwB,EAAE,CAAC,CAAC;QAC7E,MAAM,EAAE,MAAM;QACd,MAAM;QACN,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtB,CAAC,CAAC;IAEH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,uBAAuB;QAAE,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC;IAEjE,MAAM,IAAI,GAAG,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5C,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC,sBAAsB,CAAC,CAAC;IAC/C,8EAA8E;IAC9E,4EAA4E;IAC5E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