@quickchatai/quickreview 1.1.0 → 1.3.1
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 +137 -57
- package/bin/qcr.js +1 -1
- package/config.example.toml +60 -14
- package/deploy/ansible/README.md +20 -12
- package/deploy/ansible/inventory.example.ini +1 -1
- package/deploy/collect-secrets.sh +1 -1
- package/deploy/qcr-update.sh +1 -1
- package/dist/extensions/cli/home.js +14 -0
- package/dist/extensions/cli/home.js.map +1 -0
- package/dist/extensions/cli/login-route.js +5 -0
- package/dist/extensions/cli/login-route.js.map +1 -0
- package/dist/extensions/cli/selfimprove.js +18 -0
- package/dist/extensions/cli/selfimprove.js.map +1 -0
- package/dist/extensions/home.js +350 -0
- package/dist/extensions/home.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 +35 -11
- package/dist/extensions/onboarding.js.map +1 -1
- package/dist/extensions/selfimprove.js +49 -0
- package/dist/extensions/selfimprove.js.map +1 -0
- package/dist/extensions/setup-scan.js +23 -592
- package/dist/extensions/setup-scan.js.map +1 -1
- package/dist/extensions/setup.js +2 -47
- package/dist/extensions/setup.js.map +1 -1
- package/dist/src/archive/restore.js +18 -15
- package/dist/src/archive/restore.js.map +1 -1
- package/dist/src/botworker.js +13 -2
- package/dist/src/botworker.js.map +1 -1
- package/dist/src/channelfs.js +3 -26
- package/dist/src/channelfs.js.map +1 -1
- package/dist/src/ciretry.js +2 -1
- package/dist/src/ciretry.js.map +1 -1
- package/dist/src/cli.js +54 -61
- 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 +32 -2
- package/dist/src/config.js.map +1 -1
- package/dist/src/daemon.js +50 -8
- package/dist/src/daemon.js.map +1 -1
- package/dist/src/debuground.js +1 -0
- package/dist/src/debuground.js.map +1 -1
- package/dist/src/debugroundpi.js +6 -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/caserunner-sdk.js +15 -251
- package/dist/src/engine/caserunner-sdk.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/home/adapters.js +349 -0
- package/dist/src/home/adapters.js.map +1 -0
- package/dist/src/home/advanced.js +318 -0
- package/dist/src/home/advanced.js.map +1 -0
- package/dist/src/home/advancedtools.js +57 -0
- package/dist/src/home/advancedtools.js.map +1 -0
- package/dist/src/home/autoreview.js +325 -0
- package/dist/src/home/autoreview.js.map +1 -0
- package/dist/src/home/daemonstatus.js +32 -0
- package/dist/src/home/daemonstatus.js.map +1 -0
- package/dist/src/home/devicelogin.js +61 -0
- package/dist/src/home/devicelogin.js.map +1 -0
- package/dist/src/home/launch.js +202 -0
- package/dist/src/home/launch.js.map +1 -0
- package/dist/src/home/loginowner.js +205 -0
- package/dist/src/home/loginowner.js.map +1 -0
- package/dist/src/home/memory.js +122 -0
- package/dist/src/home/memory.js.map +1 -0
- package/dist/src/home/model.js +811 -0
- package/dist/src/home/model.js.map +1 -0
- package/dist/src/home/panel.js +520 -0
- package/dist/src/home/panel.js.map +1 -0
- package/dist/src/home/ports.js +19 -0
- package/dist/src/home/ports.js.map +1 -0
- package/dist/src/home/review.js +163 -0
- package/dist/src/home/review.js.map +1 -0
- package/dist/src/home/reviews.js +478 -0
- package/dist/src/home/reviews.js.map +1 -0
- package/dist/src/home/setup.js +507 -0
- package/dist/src/home/setup.js.map +1 -0
- package/dist/src/home/setupadapters.js +214 -0
- package/dist/src/home/setupadapters.js.map +1 -0
- package/dist/src/home/setupcard.js +199 -0
- package/dist/src/home/setupcard.js.map +1 -0
- package/dist/src/home/setuptools.js +45 -0
- package/dist/src/home/setuptools.js.map +1 -0
- package/dist/src/home/spend.js +160 -0
- package/dist/src/home/spend.js.map +1 -0
- package/dist/src/home/switches.js +209 -0
- package/dist/src/home/switches.js.map +1 -0
- package/dist/src/home/switchon.js +439 -0
- package/dist/src/home/switchon.js.map +1 -0
- package/dist/src/home/toolnames.js +41 -0
- package/dist/src/home/toolnames.js.map +1 -0
- package/dist/src/home/tune.js +341 -0
- package/dist/src/home/tune.js.map +1 -0
- package/dist/src/home/words.js +7 -0
- package/dist/src/home/words.js.map +1 -0
- package/dist/src/homes.js +14 -0
- package/dist/src/homes.js.map +1 -1
- package/dist/src/install.js +1 -1
- package/dist/src/install.js.map +1 -1
- package/dist/src/ipc/workerspec.js +8 -0
- package/dist/src/ipc/workerspec.js.map +1 -1
- package/dist/src/live/publish.js +1 -1
- package/dist/src/live/publish.js.map +1 -1
- package/dist/src/livecli.js +1 -1
- package/dist/src/livecli.js.map +1 -1
- package/dist/src/loginhint.js +8 -3
- package/dist/src/loginhint.js.map +1 -1
- package/dist/src/loginrefresh/handover.js +121 -0
- package/dist/src/loginrefresh/handover.js.map +1 -0
- package/dist/src/loginrefresh/lock.js +54 -3
- package/dist/src/loginrefresh/lock.js.map +1 -1
- package/dist/src/loginrefresh/pirefresh.js +3 -0
- package/dist/src/loginrefresh/pirefresh.js.map +1 -1
- package/dist/src/loginrefresh/refresher.js +33 -5
- package/dist/src/loginrefresh/refresher.js.map +1 -1
- package/dist/src/loginrefresh/supervisor.js +18 -1
- package/dist/src/loginrefresh/supervisor.js.map +1 -1
- package/dist/src/npmverbs.js +46 -14
- package/dist/src/npmverbs.js.map +1 -1
- package/dist/src/onboard/choices.js +35 -4
- package/dist/src/onboard/choices.js.map +1 -1
- package/dist/src/onboard/engine.js +32 -306
- package/dist/src/onboard/engine.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/bringup.js +3 -2
- package/dist/src/onboard/steps/bringup.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 +120 -39
- 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/loginshare.js +213 -0
- package/dist/src/onboard/steps/loginshare.js.map +1 -0
- package/dist/src/onboard/steps/memory.js +67 -3
- 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/repoconfig.js +72 -0
- package/dist/src/onboard/steps/repoconfig.js.map +1 -0
- 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/piagentdir.js +13 -0
- package/dist/src/piagentdir.js.map +1 -0
- package/dist/src/pilogin.js +31 -16
- package/dist/src/pilogin.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/qcrbin.js +16 -11
- package/dist/src/qcrbin.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/reviewargs.js +122 -0
- package/dist/src/reviewargs.js.map +1 -0
- package/dist/src/reviewcli.js +7 -161
- package/dist/src/reviewcli.js.map +1 -1
- package/dist/src/reviewdetach.js +76 -11
- package/dist/src/reviewdetach.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/scancli.js +39 -691
- package/dist/src/scancli.js.map +1 -1
- package/dist/src/selfimprove.js +66 -0
- package/dist/src/selfimprove.js.map +1 -0
- package/dist/src/setup/adapters.js +5 -223
- package/dist/src/setup/adapters.js.map +1 -1
- package/dist/src/setup/caserunner.js +15 -249
- package/dist/src/setup/caserunner.js.map +1 -1
- package/dist/src/setup/engine.js +32 -341
- package/dist/src/setup/engine.js.map +1 -1
- package/dist/src/setup/facts.js +3 -592
- package/dist/src/setup/facts.js.map +1 -1
- package/dist/src/setup/findings.js +3 -947
- package/dist/src/setup/findings.js.map +1 -1
- package/dist/src/setup/presentation.js +3 -8
- package/dist/src/setup/presentation.js.map +1 -1
- package/dist/src/setup/scan.js +3 -724
- package/dist/src/setup/scan.js.map +1 -1
- package/dist/src/setup/scanbuild.js +9 -92
- package/dist/src/setup/scanbuild.js.map +1 -1
- package/dist/src/setup/scanlease.js +3 -250
- package/dist/src/setup/scanlease.js.map +1 -1
- package/dist/src/setup/scanreport.js +3 -288
- package/dist/src/setup/scanreport.js.map +1 -1
- package/dist/src/setup/scanrun.js +3 -1732
- package/dist/src/setup/scanrun.js.map +1 -1
- package/dist/src/setup/scantree.js +3 -256
- package/dist/src/setup/scantree.js.map +1 -1
- package/dist/src/setup/stage2request.js +3 -258
- package/dist/src/setup/stage2request.js.map +1 -1
- package/dist/src/setup/unitcut.js +3 -436
- package/dist/src/setup/unitcut.js.map +1 -1
- package/dist/src/state.js +2 -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/takeover.js +1 -0
- package/dist/src/takeover.js.map +1 -1
- package/dist/src/takeoverpi.js +15 -1
- 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 +76 -11
- 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/deploytab.js +2 -2
- package/dist/src/tui/deploytab.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 +109 -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/memory.js +3 -16
- package/dist/src/tui/memory.js.map +1 -1
- package/dist/src/tui/memoryurl.js +22 -0
- package/dist/src/tui/memoryurl.js.map +1 -0
- 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 +32 -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 +34 -8
- package/dist/src/wire.js.map +1 -1
- package/dist/src/workerworld.js +11 -1
- package/dist/src/workerworld.js.map +1 -1
- package/docker/README.md +1 -1
- package/docker/companion/entrypoint.sh +20 -1
- package/docker/entrypoint.sh +57 -6
- package/docker-compose.yml +16 -1
- package/extensions/cli/home.ts +14 -0
- package/extensions/cli/login-route.ts +10 -0
- package/extensions/cli/selfimprove.ts +18 -0
- package/extensions/home.ts +484 -0
- package/extensions/login-route.ts +220 -0
- package/extensions/onboarding.ts +41 -11
- package/extensions/selfimprove.ts +65 -0
- package/extensions/setup-scan.ts +79 -766
- package/extensions/setup.ts +14 -70
- package/package.json +6 -4
- package/prompts/onboarding.md +58 -18
- package/schemas/review-result.v1.json +60 -0
- package/scripts/deploy.sh +8 -6
- package/scripts/mint-token.sh +25 -4
- package/scripts/qcr-host.sh +28 -5
- package/scripts/vm-ghcr-login.sh +7 -4
- package/src/archive/restore.ts +18 -21
- package/src/botworker.ts +13 -2
- package/src/channelfs.ts +3 -26
- package/src/ciretry.ts +2 -1
- package/src/cli.ts +59 -67
- package/src/cliops.ts +3 -2
- package/src/commands.ts +28 -2
- package/src/config.ts +62 -4
- package/src/daemon.ts +58 -7
- package/src/debuground.ts +3 -0
- package/src/debugroundpi.ts +12 -1
- package/src/dispatch.ts +5 -4
- package/src/engine/caserunner-sdk.ts +29 -314
- 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/home/adapters.ts +418 -0
- package/src/home/advanced.ts +421 -0
- package/src/home/advancedtools.ts +96 -0
- package/src/home/autoreview.ts +385 -0
- package/src/home/daemonstatus.ts +55 -0
- package/src/home/devicelogin.ts +107 -0
- package/src/home/launch.ts +257 -0
- package/src/home/loginowner.ts +248 -0
- package/src/home/memory.ts +176 -0
- package/src/home/model.ts +965 -0
- package/src/home/panel.ts +666 -0
- package/src/home/ports.ts +338 -0
- package/src/home/review.ts +206 -0
- package/src/home/reviews.ts +565 -0
- package/src/home/setup.ts +689 -0
- package/src/home/setupadapters.ts +217 -0
- package/src/home/setupcard.ts +288 -0
- package/src/home/setuptools.ts +57 -0
- package/src/home/spend.ts +194 -0
- package/src/home/switches.ts +293 -0
- package/src/home/switchon.ts +554 -0
- package/src/home/toolnames.ts +46 -0
- package/src/home/tune.ts +405 -0
- package/src/home/words.ts +8 -0
- package/src/homes.ts +17 -0
- package/src/install.ts +1 -1
- package/src/ipc/workerspec.ts +15 -0
- package/src/live/publish.ts +4 -1
- package/src/livecli.ts +6 -1
- package/src/loginhint.ts +8 -3
- package/src/loginrefresh/handover.ts +138 -0
- package/src/loginrefresh/lock.ts +72 -3
- package/src/loginrefresh/pirefresh.ts +3 -0
- package/src/loginrefresh/refresher.ts +34 -5
- package/src/loginrefresh/supervisor.ts +25 -2
- package/src/npmverbs.ts +55 -13
- package/src/onboard/choices.ts +40 -4
- package/src/onboard/engine.ts +70 -421
- 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/bringup.ts +3 -2
- package/src/onboard/steps/compose.ts +31 -0
- package/src/onboard/steps/configfill.ts +144 -40
- 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/loginshare.ts +258 -0
- package/src/onboard/steps/memory.ts +76 -3
- package/src/onboard/steps/proof.ts +473 -55
- package/src/onboard/steps/repoconfig.ts +85 -0
- 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/piagentdir.ts +12 -0
- package/src/pilogin.ts +32 -16
- package/src/posting-journal.ts +6 -1
- package/src/posting-outbox.ts +10 -2
- package/src/posting-receipt.ts +17 -0
- package/src/qcrbin.ts +16 -11
- package/src/recheck.ts +2 -1
- package/src/reconcile.ts +29 -3
- package/src/reviewargs.ts +119 -0
- package/src/reviewcli.ts +6 -167
- package/src/reviewdetach.ts +107 -13
- package/src/reviewhistory.ts +20 -6
- package/src/reviewnow.ts +76 -0
- package/src/scancli.ts +75 -826
- package/src/selfimprove.ts +90 -0
- package/src/setup/adapters.ts +13 -221
- package/src/setup/caserunner.ts +34 -273
- package/src/setup/engine.ts +62 -496
- package/src/setup/facts.ts +3 -627
- package/src/setup/findings.ts +3 -1264
- package/src/setup/presentation.ts +3 -18
- package/src/setup/scan.ts +3 -1033
- package/src/setup/scanbuild.ts +20 -114
- package/src/setup/scanlease.ts +3 -297
- package/src/setup/scanreport.ts +3 -373
- package/src/setup/scanrun.ts +3 -2268
- package/src/setup/scantree.ts +3 -259
- package/src/setup/stage2request.ts +3 -347
- package/src/setup/unitcut.ts +3 -523
- package/src/state.ts +43 -0
- package/src/statemachine.ts +4 -1
- package/src/takeover.ts +5 -0
- package/src/takeoverpi.ts +16 -2
- 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 +80 -11
- package/src/tui/connect.ts +7 -1
- package/src/tui/deploytab.ts +2 -2
- package/src/tui/filters.ts +7 -3
- package/src/tui/ghread.ts +74 -7
- package/src/tui/index.ts +117 -23
- package/src/tui/memforward.ts +52 -3
- package/src/tui/memory.ts +3 -15
- package/src/tui/memoryurl.ts +22 -0
- 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 +56 -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 +42 -9
- package/src/workerworld.ts +16 -2
- package/dist/src/live/projection.js +0 -450
- package/dist/src/live/projection.js.map +0 -1
- package/dist/src/live/read.js +0 -60
- package/dist/src/live/read.js.map +0 -1
- package/dist/src/onboard/launch.js +0 -83
- package/dist/src/onboard/launch.js.map +0 -1
- package/dist/src/setup/ledger.js +0 -207
- package/dist/src/setup/ledger.js.map +0 -1
- package/dist/src/setup/stage2.js +0 -617
- package/dist/src/setup/stage2.js.map +0 -1
- package/dist/src/setup/textsniff.js +0 -89
- package/dist/src/setup/textsniff.js.map +0 -1
- package/src/live/projection.ts +0 -491
- package/src/live/read.ts +0 -86
- package/src/onboard/launch.ts +0 -115
- package/src/setup/ledger.ts +0 -324
- package/src/setup/stage2.ts +0 -926
- package/src/setup/textsniff.ts +0 -95
package/src/reviewdetach.ts
CHANGED
|
@@ -43,7 +43,8 @@ import {
|
|
|
43
43
|
rmSync,
|
|
44
44
|
writeFileSync,
|
|
45
45
|
} from "node:fs";
|
|
46
|
-
import { basename, dirname, join, resolve } from "node:path";
|
|
46
|
+
import { basename, dirname, extname, join, resolve } from "node:path";
|
|
47
|
+
import { fileURLToPath } from "node:url";
|
|
47
48
|
import { stopLiveSessions } from "@quickchatai/pi-quickreview/src/engine/livesessions.js";
|
|
48
49
|
import {
|
|
49
50
|
HEARTBEAT_FILE,
|
|
@@ -55,9 +56,10 @@ import {
|
|
|
55
56
|
resolveBranch,
|
|
56
57
|
resolveUncommitted,
|
|
57
58
|
} from "@quickchatai/pi-quickreview/src/localreview.js";
|
|
58
|
-
import { latestLiveRound, viewRound } from "
|
|
59
|
+
import { latestLiveRound, viewRound } from "@quickchatai/pi-quickreview/src/live/read.js";
|
|
60
|
+
import { lensActivityLine, lensElapsedMs } from "@quickchatai/pi-quickreview/src/live/lensline.js";
|
|
59
61
|
import { parsePrTarget } from "@quickchatai/pi-quickreview/src/prtarget.js";
|
|
60
|
-
import { parseReviewArgs } from "./
|
|
62
|
+
import { parseReviewArgs } from "./reviewargs.js";
|
|
61
63
|
import {
|
|
62
64
|
REVIEW_SCHEMA_VERSION,
|
|
63
65
|
withSchemaVersion,
|
|
@@ -234,6 +236,9 @@ interface Observed {
|
|
|
234
236
|
dir: string;
|
|
235
237
|
state: RunState;
|
|
236
238
|
exitCode: number | null;
|
|
239
|
+
/** When it ended, ms since the epoch: its exit's or its stop's time (a run
|
|
240
|
+
* recorded before the exit carried one has none). */
|
|
241
|
+
endedAt: number | null;
|
|
237
242
|
result: unknown;
|
|
238
243
|
}
|
|
239
244
|
|
|
@@ -243,8 +248,9 @@ function observe(home: string, runId: string, deps: Liveness): Observed | null {
|
|
|
243
248
|
const dir = join(runsDir(home), runId);
|
|
244
249
|
const run = readJson<RunRecord>(join(dir, "run.json"));
|
|
245
250
|
if (run === null) return null;
|
|
246
|
-
const exit = readJson<{ code: number }>(join(dir, "exit.json"));
|
|
247
|
-
const
|
|
251
|
+
const exit = readJson<{ code: number; at?: number }>(join(dir, "exit.json"));
|
|
252
|
+
const stoppedAt = readJson<{ at?: number }>(join(dir, "stopped.json"));
|
|
253
|
+
const stopped = stoppedAt !== null || existsSync(join(dir, "stopped.json"));
|
|
248
254
|
let state: RunState;
|
|
249
255
|
// A run that was stopped and unwinds records a failing exit of its own on the
|
|
250
256
|
// way out (an aborted turn has no result); `stop` is what ended it, so that
|
|
@@ -268,7 +274,15 @@ function observe(home: string, runId: string, deps: Liveness): Observed | null {
|
|
|
268
274
|
} catch {
|
|
269
275
|
// no output yet
|
|
270
276
|
}
|
|
271
|
-
|
|
277
|
+
const at = (v: unknown): number | null =>
|
|
278
|
+
typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
279
|
+
const endedAt =
|
|
280
|
+
state === "running"
|
|
281
|
+
? null
|
|
282
|
+
: state === "stopped"
|
|
283
|
+
? (at(stoppedAt?.at) ?? at(exit?.at))
|
|
284
|
+
: at(exit?.at);
|
|
285
|
+
return { run, dir, state, exitCode: exit?.code ?? null, endedAt, result };
|
|
272
286
|
}
|
|
273
287
|
|
|
274
288
|
function allRuns(home: string, deps: Liveness): Observed[] {
|
|
@@ -285,7 +299,11 @@ function allRuns(home: string, deps: Liveness): Observed[] {
|
|
|
285
299
|
}
|
|
286
300
|
|
|
287
301
|
/** What a running review is doing, from its LiveEvent log projected to
|
|
288
|
-
* round-progress v2 (src/live/): the same
|
|
302
|
+
* round-progress v2 (packages/pi-plugin/src/live/projection.ts): the same
|
|
303
|
+
* snapshot the bot's supervisor reads. Each lens carries what it is doing as
|
|
304
|
+
* it happens: its tool count, its current tool and the path that tool is on,
|
|
305
|
+
* and its time so far (a running lens's counts on from its start between
|
|
306
|
+
* updates). `line` is the same entry as one line a person reads. */
|
|
289
307
|
interface LiveProgress {
|
|
290
308
|
round: number;
|
|
291
309
|
parent_status: "active" | "settled";
|
|
@@ -298,6 +316,8 @@ interface LiveProgress {
|
|
|
298
316
|
duration_ms: number;
|
|
299
317
|
tool_count: number;
|
|
300
318
|
current_tool?: string;
|
|
319
|
+
current_target?: string;
|
|
320
|
+
line: string;
|
|
301
321
|
}>;
|
|
302
322
|
}
|
|
303
323
|
|
|
@@ -308,7 +328,7 @@ interface Progress {
|
|
|
308
328
|
|
|
309
329
|
/** How far a run got: the lenses its stage record names (written when the round
|
|
310
330
|
* ends) and, while it runs, its live log. */
|
|
311
|
-
function progress(dir: string): Progress | null {
|
|
331
|
+
function progress(dir: string, now: number): Progress | null {
|
|
312
332
|
const work = join(dir, "work");
|
|
313
333
|
let dirs: string[] = [];
|
|
314
334
|
try {
|
|
@@ -342,9 +362,11 @@ function progress(dir: string): Progress | null {
|
|
|
342
362
|
agents: snapshot.agents.map((a) => ({
|
|
343
363
|
agent: a.agent,
|
|
344
364
|
status: a.status,
|
|
345
|
-
duration_ms: a.duration_ms,
|
|
365
|
+
duration_ms: lensElapsedMs(a, now) ?? a.duration_ms,
|
|
346
366
|
tool_count: a.tool_count,
|
|
347
367
|
...(a.current_tool ? { current_tool: a.current_tool } : {}),
|
|
368
|
+
...(a.current_target ? { current_target: a.current_target } : {}),
|
|
369
|
+
line: lensActivityLine(a, { nowMs: now }),
|
|
348
370
|
})),
|
|
349
371
|
};
|
|
350
372
|
}
|
|
@@ -358,9 +380,11 @@ function view(o: Observed, now: number): Record<string, unknown> {
|
|
|
358
380
|
run_id: o.run.run_id,
|
|
359
381
|
state: o.state,
|
|
360
382
|
target: o.run.label,
|
|
361
|
-
|
|
383
|
+
started_at: o.run.started_at,
|
|
384
|
+
...(o.endedAt !== null ? { ended_at: o.endedAt } : {}),
|
|
385
|
+
elapsed_s: Math.max(0, Math.round(((o.endedAt ?? now) - o.run.started_at) / 1000)),
|
|
362
386
|
exit_code: o.exitCode,
|
|
363
|
-
...(o.state === "running" ? { progress: progress(o.dir) } : { result: o.result }),
|
|
387
|
+
...(o.state === "running" ? { progress: progress(o.dir, now) } : { result: o.result }),
|
|
364
388
|
...(o.state === "failed" && o.exitCode === null
|
|
365
389
|
? { errors: [`the review process ended without a result; see ${join(o.dir, "driver.log")}`] }
|
|
366
390
|
: {}),
|
|
@@ -378,6 +402,7 @@ function text(v: Record<string, unknown>): string {
|
|
|
378
402
|
const names = by(s);
|
|
379
403
|
if (names.length > 0) bits.push(`${s}: ${names.join(", ")}`);
|
|
380
404
|
}
|
|
405
|
+
for (const a of p.live.agents) if (a.status === "running") bits.push(` ${a.line}`);
|
|
381
406
|
bits.push(`now: ${p.live.last_activity}`);
|
|
382
407
|
}
|
|
383
408
|
const errs = v["errors"] as string[] | undefined;
|
|
@@ -385,6 +410,24 @@ function text(v: Record<string, unknown>): string {
|
|
|
385
410
|
return bits.join("\n");
|
|
386
411
|
}
|
|
387
412
|
|
|
413
|
+
/** One run as `status --json` reports it, with the review's own arguments. */
|
|
414
|
+
export interface RunView {
|
|
415
|
+
view: Record<string, unknown>;
|
|
416
|
+
argv: readonly string[];
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/** Every run in the registry at `home`, oldest first, each as `status`
|
|
420
|
+
* reports it: what a host re-attaches to after a restart. */
|
|
421
|
+
export function listRunViews(home: string, deps: Liveness): RunView[] {
|
|
422
|
+
return allRuns(home, deps).map((o) => ({ view: view(o, deps.now()), argv: o.run.argv }));
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/** One run as `status` reports it; null when there is no such run. */
|
|
426
|
+
export function runView(home: string, runId: string, deps: Liveness): RunView | null {
|
|
427
|
+
const o = observe(home, runId, deps);
|
|
428
|
+
return o === null ? null : { view: view(o, deps.now()), argv: o.run.argv };
|
|
429
|
+
}
|
|
430
|
+
|
|
388
431
|
/** Run one `start | status | stop`; resolves its exit code. */
|
|
389
432
|
export async function runDetachedVerb(
|
|
390
433
|
verb: "start" | "status" | "stop",
|
|
@@ -652,7 +695,7 @@ export async function runDetachedChild(o: {
|
|
|
652
695
|
proc.off("SIGINT", onSignal);
|
|
653
696
|
proc.off("SIGTERM", onSignal);
|
|
654
697
|
}
|
|
655
|
-
writeFileSync(join(o.dir, "exit.json"), JSON.stringify({ code }));
|
|
698
|
+
writeFileSync(join(o.dir, "exit.json"), JSON.stringify({ code, at: Date.now() }));
|
|
656
699
|
// only this run's own claim: a stop frees the lock for a newer run
|
|
657
700
|
const lock = lockPath(dirname(dirname(o.dir)), o.key);
|
|
658
701
|
if (readJson<{ run_id?: string }>(lock)?.run_id === basename(o.dir))
|
|
@@ -725,10 +768,61 @@ export async function runWatchdog(
|
|
|
725
768
|
}),
|
|
726
769
|
)}\n`,
|
|
727
770
|
);
|
|
728
|
-
writeFileSync(
|
|
771
|
+
writeFileSync(
|
|
772
|
+
join(w.dir, "exit.json"),
|
|
773
|
+
JSON.stringify({ code: WATCHDOG_EXIT_CODE, at: deps.now() }),
|
|
774
|
+
);
|
|
729
775
|
rmSync(lockPath(dirname(dirname(w.dir)), w.key), { force: true });
|
|
730
776
|
return "killed";
|
|
731
777
|
}
|
|
732
778
|
await deps.sleep(deps.pollMs ?? 2_000);
|
|
733
779
|
}
|
|
734
780
|
}
|
|
781
|
+
|
|
782
|
+
/** The CLI entry the detached driver re-runs: `cli` beside this module. Read
|
|
783
|
+
* from where this module is, not from `process.argv[1]`, which is whatever the
|
|
784
|
+
* person launched (a bin symlink, a wrapper, a test runner). */
|
|
785
|
+
export function detachedEntry(metaUrl: string = import.meta.url): string {
|
|
786
|
+
return fileURLToPath(new URL(`./cli${extname(fileURLToPath(metaUrl))}`, metaUrl));
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
/** The process `qcr review start` detaches: this node, this entry, the run's
|
|
790
|
+
* directory and key, the review's own arguments. */
|
|
791
|
+
export function detachedCommand(
|
|
792
|
+
l: { dir: string; key: string; argv: readonly string[] },
|
|
793
|
+
o: { entry?: string; execPath?: string; execArgv?: readonly string[] } = {},
|
|
794
|
+
): { command: string; args: string[] } {
|
|
795
|
+
return {
|
|
796
|
+
command: o.execPath ?? process.execPath,
|
|
797
|
+
args: [
|
|
798
|
+
...(o.execArgv ?? process.execArgv),
|
|
799
|
+
o.entry ?? detachedEntry(),
|
|
800
|
+
"review",
|
|
801
|
+
"--detached-run",
|
|
802
|
+
l.dir,
|
|
803
|
+
l.key,
|
|
804
|
+
...l.argv,
|
|
805
|
+
"--json",
|
|
806
|
+
],
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
/** The watchdog `qcr review start` detaches beside the run: this node, this
|
|
811
|
+
* entry, the run's directory, key and driver pid. */
|
|
812
|
+
export function watchdogCommand(
|
|
813
|
+
w: { dir: string; key: string; pid: number },
|
|
814
|
+
o: { entry?: string; execPath?: string; execArgv?: readonly string[] } = {},
|
|
815
|
+
): { command: string; args: string[] } {
|
|
816
|
+
return {
|
|
817
|
+
command: o.execPath ?? process.execPath,
|
|
818
|
+
args: [
|
|
819
|
+
...(o.execArgv ?? process.execArgv),
|
|
820
|
+
o.entry ?? detachedEntry(),
|
|
821
|
+
"review",
|
|
822
|
+
"--watchdog",
|
|
823
|
+
w.dir,
|
|
824
|
+
w.key,
|
|
825
|
+
String(w.pid),
|
|
826
|
+
],
|
|
827
|
+
};
|
|
828
|
+
}
|
package/src/reviewhistory.ts
CHANGED
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
// Total at the edge: a PR that cannot be read is counted, never fatal; an
|
|
19
19
|
// empty repo — no merged PRs, no rounds, no feedback — is an ordinary, EMPTY
|
|
20
20
|
// digest, not an error.
|
|
21
|
+
import {
|
|
22
|
+
excludeOwnAppQualifier,
|
|
23
|
+
isOwnContent,
|
|
24
|
+
isPersonMode,
|
|
25
|
+
} from "@quickchatai/pi-quickreview/src/identity.js";
|
|
21
26
|
import type { Config } from "./config.js";
|
|
22
27
|
import type { SearchIssueItem } from "./github.js";
|
|
23
28
|
import type { FeedbackSignalRow, RoundRow } from "./state.js";
|
|
@@ -146,7 +151,7 @@ export function mergedPrsQuery(cfg: Config, since: string, until?: string): stri
|
|
|
146
151
|
until === undefined
|
|
147
152
|
? `>=${since.slice(0, 10)}`
|
|
148
153
|
: `${since.slice(0, 10)}..${until.slice(0, 10)}`;
|
|
149
|
-
return `repo:${cfg.github.repo} is:pr is:merged merged:${range}
|
|
154
|
+
return `repo:${cfg.github.repo} is:pr is:merged merged:${range}${excludeOwnAppQualifier(cfg.github)}`;
|
|
150
155
|
}
|
|
151
156
|
|
|
152
157
|
/**
|
|
@@ -173,11 +178,20 @@ function clip(body: string): string {
|
|
|
173
178
|
}
|
|
174
179
|
|
|
175
180
|
/** A human, and not the PR's own author (their replies answer a review; they
|
|
176
|
-
* are not one) nor this App under either spelling.
|
|
177
|
-
*
|
|
178
|
-
|
|
181
|
+
* are not one) nor this App under either spelling. In person mode
|
|
182
|
+
* (`[github] auth = "user"`) the login is the person's: their words are a
|
|
183
|
+
* human's, and only the reviewer's marker-bearing ones are left out.
|
|
184
|
+
* `[feedback]` comments are left out here: they are the feedback half, read
|
|
185
|
+
* from the ledger. */
|
|
186
|
+
function humanReviewer(
|
|
187
|
+
a: HumanReviewAuthor | null,
|
|
188
|
+
pr: PrReviews,
|
|
189
|
+
cfg: Config,
|
|
190
|
+
body: string,
|
|
191
|
+
): string | null {
|
|
179
192
|
if (!a || a.type !== "User" || a.login === "") return null;
|
|
180
193
|
if (a.login === pr.author) return null;
|
|
194
|
+
if (isPersonMode(cfg.github)) return isOwnContent(cfg.github, a.login, body) ? null : a.login;
|
|
181
195
|
if (a.login === cfg.backfill.bot_login || a.login === cfg.backfill.bot_actor) return null;
|
|
182
196
|
return a.login;
|
|
183
197
|
}
|
|
@@ -187,7 +201,7 @@ export function humanCommentsOf(pr: PrReviews, cfg: Config): HumanComment[] {
|
|
|
187
201
|
const out: HumanComment[] = [];
|
|
188
202
|
const keep = (body: string): boolean => body.trim() !== "" && !/^\s*\[feedback\]/i.test(body);
|
|
189
203
|
for (const r of pr.reviews) {
|
|
190
|
-
const reviewer = humanReviewer(r.author, pr, cfg);
|
|
204
|
+
const reviewer = humanReviewer(r.author, pr, cfg, r.body);
|
|
191
205
|
if (reviewer !== null && keep(r.body)) {
|
|
192
206
|
out.push({
|
|
193
207
|
pr: pr.number,
|
|
@@ -200,7 +214,7 @@ export function humanCommentsOf(pr: PrReviews, cfg: Config): HumanComment[] {
|
|
|
200
214
|
});
|
|
201
215
|
}
|
|
202
216
|
for (const c of r.comments) {
|
|
203
|
-
const who = humanReviewer(c.author, pr, cfg);
|
|
217
|
+
const who = humanReviewer(c.author, pr, cfg, c.body);
|
|
204
218
|
if (who === null || !keep(c.body)) continue;
|
|
205
219
|
out.push({
|
|
206
220
|
pr: pr.number,
|
package/src/reviewnow.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// "Review this PR now" — the operator's `review-now` command (src/commands.ts,
|
|
2
|
+
// root-sealed operator channel only).
|
|
3
|
+
//
|
|
4
|
+
// It queues ONE pull request for a human-asked round, the same state-machine
|
|
5
|
+
// event a fresh trigger label produces (`trigger`, source `manual`, so the
|
|
6
|
+
// round's provenance is the person's ask and dispatch reviews it in full),
|
|
7
|
+
// and then pumps dispatch. It makes no GitHub write to ask for the review:
|
|
8
|
+
// the label path stays the way later reviews are requested, and every write
|
|
9
|
+
// the round itself makes still goes through the one MutationGate.
|
|
10
|
+
//
|
|
11
|
+
// The PR is read from GitHub first (one GET), so a closed or merged PR, or a
|
|
12
|
+
// number that is not a PR of the reviewed repo, is refused with its reason
|
|
13
|
+
// instead of being adopted into the state store.
|
|
14
|
+
import type { PrRef } from "./github.js";
|
|
15
|
+
import type { FileOutcome } from "./improvements.js";
|
|
16
|
+
import { applyEvent } from "./statemachine.js";
|
|
17
|
+
import type { StateStore } from "./state.js";
|
|
18
|
+
|
|
19
|
+
export interface ReviewNowDeps {
|
|
20
|
+
store: StateStore;
|
|
21
|
+
/** The PR as GitHub has it (read-only). */
|
|
22
|
+
getPr(n: number): Promise<PrRef>;
|
|
23
|
+
pump(): Promise<void>;
|
|
24
|
+
/** The App's bot login, whose own PRs are never reviewed. Absent on the
|
|
25
|
+
* own-account route, where the "bot" is the person and their own PRs are
|
|
26
|
+
* exactly what they ask to have reviewed. */
|
|
27
|
+
botLogin?: string;
|
|
28
|
+
now?: () => Date;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export async function reviewNow(deps: ReviewNowDeps, pr: number): Promise<FileOutcome> {
|
|
32
|
+
let ref: PrRef;
|
|
33
|
+
try {
|
|
34
|
+
ref = await deps.getPr(pr);
|
|
35
|
+
} catch (err) {
|
|
36
|
+
return {
|
|
37
|
+
ok: false,
|
|
38
|
+
reason: `could not read PR #${pr} from GitHub: ${err instanceof Error ? err.message : String(err)}`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (ref.merged) return { ok: false, reason: `PR #${pr} is merged — there is nothing to review` };
|
|
42
|
+
if (ref.state !== "open") return { ok: false, reason: `PR #${pr} is closed` };
|
|
43
|
+
const local = deps.store.getPr(pr);
|
|
44
|
+
if (local?.paused)
|
|
45
|
+
return { ok: false, reason: `PR #${pr} is paused — resume it first (qcr resume-pr ${pr})` };
|
|
46
|
+
// The worker crash-loop breaker parks a PR after repeated worker failures
|
|
47
|
+
// (a missing model login is the usual first-install cause). Asking for this
|
|
48
|
+
// PR's review is the operator's word that it may run again, exactly as
|
|
49
|
+
// rerun-round's unpark is — without it the new round could never start.
|
|
50
|
+
if (deps.store.clearWorkerBreaker(pr))
|
|
51
|
+
deps.store.logEvent("worker_unparked", pr, { by: "review-now" });
|
|
52
|
+
const result = applyEvent(
|
|
53
|
+
deps.store,
|
|
54
|
+
pr,
|
|
55
|
+
{ type: "trigger", source: "manual" },
|
|
56
|
+
{
|
|
57
|
+
title: ref.title,
|
|
58
|
+
head_sha: ref.head_sha,
|
|
59
|
+
author: ref.author,
|
|
60
|
+
trigger_ts: (deps.now ?? (() => new Date()))().toISOString(),
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
...(deps.botLogin ? { botLogin: deps.botLogin } : {}),
|
|
64
|
+
...(deps.now ? { now: deps.now } : {}),
|
|
65
|
+
reason: "operator:review-now",
|
|
66
|
+
},
|
|
67
|
+
);
|
|
68
|
+
if (result.skipped === "bot-author")
|
|
69
|
+
return {
|
|
70
|
+
ok: false,
|
|
71
|
+
reason: `PR #${pr} is authored by the bot itself — it never reviews its own PRs`,
|
|
72
|
+
};
|
|
73
|
+
await deps.pump();
|
|
74
|
+
const state = deps.store.getPr(pr)?.state ?? result.to;
|
|
75
|
+
return { ok: true, pr, state, head_sha: ref.head_sha };
|
|
76
|
+
}
|