@phnx-labs/agents-cli 1.22.126 → 1.23.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/CHANGELOG.md +80 -0
- package/README.md +13 -16
- package/dist/bootstrap.js +4 -3
- package/dist/commands/browser.js +4 -19
- package/dist/commands/computer.d.ts +2 -6
- package/dist/commands/computer.js +12 -18
- package/dist/commands/logs.js +2 -6
- package/dist/commands/menubar.js +28 -1
- package/dist/commands/projects.js +103 -40
- package/dist/commands/sessions.d.ts +0 -11
- package/dist/commands/sessions.js +31 -364
- package/dist/index.js +12 -12
- package/dist/lib/accounting/usage-ingest.js +2 -1
- package/dist/lib/browser-client.d.ts +0 -21
- package/dist/lib/browser-client.js +1 -44
- package/dist/lib/computer/record.d.ts +1 -0
- package/dist/lib/computer/record.js +2 -16
- package/dist/lib/config-keys.d.ts +2 -2
- package/dist/lib/config-keys.js +8 -2
- package/dist/lib/daemon/daemon.js +1 -8
- package/dist/lib/daemon/runner.js +3 -2
- package/dist/lib/daemon-services.d.ts +1 -1
- package/dist/lib/daemon-services.js +0 -5
- package/dist/lib/device-config.d.ts +1 -1
- package/dist/lib/device-config.js +48 -7
- package/dist/lib/feed/tool-activity.d.ts +22 -10
- package/dist/lib/feed/tool-activity.js +161 -32
- package/dist/lib/feed/tools.d.ts +55 -2
- package/dist/lib/feed/tools.js +22 -28
- package/dist/lib/feed/watch.js +4 -3
- package/dist/lib/github/open-prs.d.ts +41 -0
- package/dist/lib/github/open-prs.js +157 -0
- package/dist/lib/github/project-prs.d.ts +20 -1
- package/dist/lib/github/project-prs.js +8 -7
- package/dist/lib/helper-versions.js +1 -1
- package/dist/lib/menubar/install-menubar.d.ts +5 -7
- package/dist/lib/menubar/install-menubar.js +120 -29
- package/dist/lib/menubar/resolve-version.d.ts +1 -0
- package/dist/lib/menubar/resolve-version.js +4 -2
- package/dist/lib/menubar/snapshot.d.ts +2 -0
- package/dist/lib/menubar/snapshot.js +2 -0
- package/dist/lib/menubar/update-state.d.ts +15 -0
- package/dist/lib/menubar/update-state.js +36 -0
- package/dist/lib/owner-notify.d.ts +0 -12
- package/dist/lib/owner-notify.js +1 -10
- package/dist/lib/self-heal/checks/menubar-helper.js +1 -0
- package/dist/lib/session/cloud.d.ts +0 -1
- package/dist/lib/session/cloud.js +0 -5
- package/dist/lib/session/db.d.ts +0 -64
- package/dist/lib/session/db.js +0 -116
- package/dist/lib/session/remote/remote-list.d.ts +2 -36
- package/dist/lib/session/remote/remote-list.js +3 -320
- package/dist/lib/session/tool-index.d.ts +0 -62
- package/dist/lib/session/tool-index.js +1 -537
- package/dist/lib/sessions-client.d.ts +1 -0
- package/dist/lib/sessions-client.js +17 -1
- package/dist/lib/standalone-tools.js +2 -2
- package/dist/lib/stdout.d.ts +1 -0
- package/dist/lib/stdout.js +5 -0
- package/dist/lib/testdata/owner-notify-api.d.ts +0 -13
- package/dist/lib/testdata/owner-notify-api.js +3 -23
- package/package.json +1 -1
- package/dist/commands/browser-sessions-picker.d.ts +0 -9
- package/dist/commands/browser-sessions-picker.js +0 -136
- package/dist/commands/computer-sessions-picker.d.ts +0 -11
- package/dist/commands/computer-sessions-picker.js +0 -90
- package/dist/commands/sessions-tail.d.ts +0 -13
- package/dist/commands/sessions-tail.js +0 -222
- package/dist/lib/browser/native-history.test-fixture.d.ts +0 -12
- package/dist/lib/browser/native-history.test-fixture.js +0 -43
- package/dist/lib/browser/paths.d.ts +0 -9
- package/dist/lib/browser/paths.js +0 -31
- package/dist/lib/browser/record.d.ts +0 -4
- package/dist/lib/browser/record.js +0 -19
- package/dist/lib/browser/sessions-list.d.ts +0 -79
- package/dist/lib/browser/sessions-list.js +0 -415
- package/dist/lib/computer/sessions-list.d.ts +0 -78
- package/dist/lib/computer/sessions-list.js +0 -372
- package/dist/lib/daemon/owner-device-delivery-service.d.ts +0 -10
- package/dist/lib/daemon/owner-device-delivery-service.js +0 -28
|
@@ -22,7 +22,8 @@ import { formatFocusAreas, readFocusAreas } from '../lib/project-focus.js';
|
|
|
22
22
|
import { formatVerdict, scheduleVerdict } from '../lib/project-schedule.js';
|
|
23
23
|
import { buildLinearImportCandidates, validateImportOpts, } from '../lib/project-import.js';
|
|
24
24
|
import { approveProjectPr, buildProjectPrs, commentOnProjectPr, markProjectPrReady, mergeProjectPr, resolveTargetSlugs, setProjectPrAutoMerge, MERGE_METHODS, MERGED_WINDOW_DAYS, } from '../lib/github/project-prs.js';
|
|
25
|
-
import { ghExec } from '../lib/github/pr-mergeable.js';
|
|
25
|
+
import { ghExec, canonicalizeRepo } from '../lib/github/pr-mergeable.js';
|
|
26
|
+
import { buildOpenPrs } from '../lib/github/open-prs.js';
|
|
26
27
|
import { readCiFailure, rerunFailedJobs } from '../lib/github/ci-failure.js';
|
|
27
28
|
import { registerProjectTodoCommands } from './projects-todo.js';
|
|
28
29
|
function ciMark(state) {
|
|
@@ -379,6 +380,8 @@ function prFail(message) {
|
|
|
379
380
|
process.exit(1);
|
|
380
381
|
}
|
|
381
382
|
function prProjectOrExit(name) {
|
|
383
|
+
if (name === undefined)
|
|
384
|
+
return undefined;
|
|
382
385
|
return loadProjectDef(name) ?? prFail(`No project named "${name}". List them: agents projects list`);
|
|
383
386
|
}
|
|
384
387
|
function prNumberOrExit(raw) {
|
|
@@ -417,6 +420,11 @@ function prMethodOrExit(raw) {
|
|
|
417
420
|
return raw;
|
|
418
421
|
}
|
|
419
422
|
async function prRepoOrExit(def, repo) {
|
|
423
|
+
if (!def) {
|
|
424
|
+
if (!/^[\w.-]+\/[\w.-]+$/.test(repo))
|
|
425
|
+
prFail(`--repo expects owner/repo, got "${repo}".`);
|
|
426
|
+
return canonicalizeRepo(repo, ghExec);
|
|
427
|
+
}
|
|
420
428
|
try {
|
|
421
429
|
const [resolved] = await resolveTargetSlugs(def, repo, ghExec);
|
|
422
430
|
return resolved;
|
|
@@ -425,6 +433,31 @@ async function prRepoOrExit(def, repo) {
|
|
|
425
433
|
return prFail(e instanceof Error ? e.message : String(e));
|
|
426
434
|
}
|
|
427
435
|
}
|
|
436
|
+
function printOpenPrs(open) {
|
|
437
|
+
const marks = { review: chalk.yellow('review requested'), failing: chalk.red('failing'), conflicts: chalk.red('conflicts') };
|
|
438
|
+
for (const o of open.owners) {
|
|
439
|
+
if (o.error)
|
|
440
|
+
console.log(`${chalk.bold(o.login)} ${chalk.red(`— search failed: ${o.error}`)}`);
|
|
441
|
+
else if (o.truncated)
|
|
442
|
+
console.log(chalk.yellow(`${o.login}: GitHub search stops at ${o.open} results; some open PRs are not listed.`));
|
|
443
|
+
}
|
|
444
|
+
if (open.reviewRequestedError)
|
|
445
|
+
console.log(chalk.yellow(`Review requests could not be read: ${open.reviewRequestedError}`));
|
|
446
|
+
for (const r of open.repositories) {
|
|
447
|
+
const projects = r.projects.length ? chalk.dim(` ${r.projects.join(', ')}`) : '';
|
|
448
|
+
console.log(`${chalk.bold(r.slug)} ${chalk.dim(`${r.pullRequests.length} open`)}${projects}`);
|
|
449
|
+
for (const pr of r.pullRequests) {
|
|
450
|
+
const draft = pr.isDraft ? chalk.gray(' [draft]') : '';
|
|
451
|
+
const needs = pr.needsMe ? ` ${marks[pr.needsMe]}` : '';
|
|
452
|
+
console.log(` ${ciMark(pr.ciState)} #${pr.number}${draft} ${pr.title} ${chalk.gray(`@${pr.author.login}`)}${needs}`);
|
|
453
|
+
}
|
|
454
|
+
if (r.ciError)
|
|
455
|
+
console.log(chalk.yellow(` Checks or mergeability are incomplete: ${r.ciError}`));
|
|
456
|
+
}
|
|
457
|
+
const total = open.repositories.reduce((n, r) => n + r.pullRequests.length, 0);
|
|
458
|
+
const needs = open.repositories.reduce((n, r) => n + r.pullRequests.filter((pr) => pr.needsMe).length, 0);
|
|
459
|
+
console.log(chalk.dim(`\n${total} open across ${open.repositories.length} repos · ${needs} need you`));
|
|
460
|
+
}
|
|
428
461
|
export function registerProjectsCommands(program) {
|
|
429
462
|
const projects = program
|
|
430
463
|
.command('projects')
|
|
@@ -695,32 +728,44 @@ export function registerProjectsCommands(program) {
|
|
|
695
728
|
});
|
|
696
729
|
const prsCmd = projects
|
|
697
730
|
.command('prs')
|
|
698
|
-
.description('
|
|
731
|
+
.description('Open pull requests: every one across your GitHub account and orgs, or one project\'s (list, the default); act on one (ready, review, comment, merge), or read and re-run failed CI (failure, rerun).');
|
|
699
732
|
const prsListCmd = prsCmd
|
|
700
|
-
.command('list
|
|
701
|
-
.description('Every OPEN pull request across a project\'s attached repos
|
|
733
|
+
.command('list [name]', { isDefault: true })
|
|
734
|
+
.description('Every OPEN pull request across a project\'s attached repos, or with no project across your GitHub account and every org you belong to, with what needs you first.')
|
|
702
735
|
.option('--json', 'Machine-readable output (the AGI Menu contract shape)')
|
|
703
|
-
.option('--repo <owner/repo>', '
|
|
736
|
+
.option('--repo <owner/repo>', 'With a project: restrict to one of its attached repos. Without: the repo of the one PR --number names')
|
|
704
737
|
.option('--number <n>', 'Lazy detail: enrich exactly this PR with checks + reviewDecision (requires --repo)')
|
|
738
|
+
.option('--org <login...>', 'Without a project: read only these GitHub orgs or accounts (default: you and every org you belong to)')
|
|
705
739
|
.action(async (name, opts) => {
|
|
706
|
-
const def = loadProjectDef(name);
|
|
707
|
-
if (!def) {
|
|
708
|
-
console.error(chalk.red(`No project named "${name}". List them: agents projects list`));
|
|
709
|
-
process.exit(1);
|
|
710
|
-
}
|
|
711
740
|
let number;
|
|
712
741
|
if (opts.number !== undefined) {
|
|
713
|
-
if (!opts.repo)
|
|
714
|
-
|
|
715
|
-
|
|
742
|
+
if (!opts.repo)
|
|
743
|
+
prFail('--number names one PR in one repo; pass --repo <owner/repo> with it.');
|
|
744
|
+
number = prNumberOrExit(opts.number);
|
|
745
|
+
}
|
|
746
|
+
if (name === undefined) {
|
|
747
|
+
if (opts.repo !== undefined && number === undefined)
|
|
748
|
+
prFail('Without a project, --repo names the repo of one PR; pass --number with it, or --org to scope the list.');
|
|
749
|
+
if (opts.repo !== undefined && opts.org !== undefined)
|
|
750
|
+
prFail('--org scopes the list; --repo with --number reads one PR. Pass one or the other.');
|
|
751
|
+
let open;
|
|
752
|
+
try {
|
|
753
|
+
open = await buildOpenPrs(listProjectDefs(), { owners: opts.org, repo: opts.repo, number });
|
|
716
754
|
}
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
if (!Number.isSafeInteger(number) || number <= 0) {
|
|
720
|
-
console.error(chalk.red(`--number expects a positive integer, got "${opts.number}".`));
|
|
721
|
-
process.exit(1);
|
|
755
|
+
catch (e) {
|
|
756
|
+
prFail(e instanceof Error ? e.message : String(e));
|
|
722
757
|
}
|
|
758
|
+
if (opts.json)
|
|
759
|
+
console.log(JSON.stringify(open, null, 2));
|
|
760
|
+
else
|
|
761
|
+
printOpenPrs(open);
|
|
762
|
+
if (open.partial)
|
|
763
|
+
process.exit(1);
|
|
764
|
+
return;
|
|
723
765
|
}
|
|
766
|
+
if (opts.org !== undefined)
|
|
767
|
+
prFail('--org reads across orgs; drop the project name to use it.');
|
|
768
|
+
const def = prProjectOrExit(name);
|
|
724
769
|
let envelope;
|
|
725
770
|
try {
|
|
726
771
|
envelope = await buildProjectPrs(def, { repo: opts.repo, number }, undefined, listProjectDefs());
|
|
@@ -772,9 +817,9 @@ export function registerProjectsCommands(program) {
|
|
|
772
817
|
process.exit(1);
|
|
773
818
|
});
|
|
774
819
|
const mergeCmd = prsCmd
|
|
775
|
-
.command('merge
|
|
776
|
-
.description('Merge one open PR
|
|
777
|
-
.requiredOption('--repo <owner/repo>', '
|
|
820
|
+
.command('merge [name]')
|
|
821
|
+
.description('Merge one open PR, pinned to the head SHA you reviewed.')
|
|
822
|
+
.requiredOption('--repo <owner/repo>', 'owner/repo (with a project name, one of its attached repos)')
|
|
778
823
|
.requiredOption('--number <n>', 'The PR number')
|
|
779
824
|
.requiredOption('--sha <head-sha>', 'The head SHA you reviewed; GitHub refuses if the branch moved since')
|
|
780
825
|
.option('--method <method>', `${MERGE_METHODS.join(' | ')} (default: the first the repo allows, in that order)`)
|
|
@@ -804,6 +849,7 @@ export function registerProjectsCommands(program) {
|
|
|
804
849
|
agents projects prs rush --json --repo phnx-labs/agi-cli --number 3646 # read headSha + mergeableState
|
|
805
850
|
agents projects prs merge rush --repo phnx-labs/agi-cli --number 3646 --sha <headSha>
|
|
806
851
|
agents projects prs merge rush --repo phnx-labs/agi-cli --number 3646 --sha <headSha> --method squash --json
|
|
852
|
+
agents projects prs merge --repo muqsitnawaz/agents --number 12 --sha <headSha> # any repo, no project
|
|
807
853
|
`,
|
|
808
854
|
notes: `
|
|
809
855
|
The merge is a single REST call pinned to --sha: if anything was pushed after
|
|
@@ -813,14 +859,16 @@ export function registerProjectsCommands(program) {
|
|
|
813
859
|
computed goes on to the call and GitHub decides. --admin skips that refusal and lets a
|
|
814
860
|
repository admin merge past branch protection where GitHub allows it; it exists
|
|
815
861
|
for a person's explicit confirm (AGI Menu's "Confirm admin merge") and agents
|
|
816
|
-
must never pass it. To land a PR once its checks pass, use prs automerge.
|
|
862
|
+
must never pass it. To land a PR once its checks pass, use prs automerge.
|
|
863
|
+
Every prs verb takes the project name optionally: without it, --repo may be any
|
|
864
|
+
owner/repo you can reach, as the GitHub tab of AGI Menu uses them. A
|
|
817
865
|
refusal exits 1 with GitHub's reason (merged: false in --json).
|
|
818
866
|
`,
|
|
819
867
|
});
|
|
820
868
|
const automergeCmd = prsCmd
|
|
821
|
-
.command('automerge
|
|
869
|
+
.command('automerge [name]')
|
|
822
870
|
.description('Turn GitHub auto-merge on (or off with --off) for one open PR, so it merges itself once its required checks pass.')
|
|
823
|
-
.requiredOption('--repo <owner/repo>', '
|
|
871
|
+
.requiredOption('--repo <owner/repo>', 'owner/repo (with a project name, one of its attached repos)')
|
|
824
872
|
.requiredOption('--number <n>', 'The PR number')
|
|
825
873
|
.option('--sha <head-sha>', 'The head SHA you reviewed (required to turn it on); GitHub refuses if the branch moved since')
|
|
826
874
|
.option('--method <method>', `${MERGE_METHODS.join(' | ')} (default: the first the repo allows, in that order)`)
|
|
@@ -864,9 +912,9 @@ export function registerProjectsCommands(program) {
|
|
|
864
912
|
`,
|
|
865
913
|
});
|
|
866
914
|
const readyCmd = prsCmd
|
|
867
|
-
.command('ready
|
|
868
|
-
.description('Mark one draft PR
|
|
869
|
-
.requiredOption('--repo <owner/repo>', '
|
|
915
|
+
.command('ready [name]')
|
|
916
|
+
.description('Mark one draft PR ready for review.')
|
|
917
|
+
.requiredOption('--repo <owner/repo>', 'owner/repo (with a project name, one of its attached repos)')
|
|
870
918
|
.requiredOption('--number <n>', 'The PR number')
|
|
871
919
|
.option('--sha <head-sha>', 'The head SHA you looked at; refused if the branch moved since')
|
|
872
920
|
.option('--json', 'Machine-readable result')
|
|
@@ -899,9 +947,9 @@ export function registerProjectsCommands(program) {
|
|
|
899
947
|
`,
|
|
900
948
|
});
|
|
901
949
|
const reviewCmd = prsCmd
|
|
902
|
-
.command('review
|
|
903
|
-
.description('Approve one open PR
|
|
904
|
-
.requiredOption('--repo <owner/repo>', '
|
|
950
|
+
.command('review [name]')
|
|
951
|
+
.description('Approve one open PR, pinned to the head SHA you reviewed.')
|
|
952
|
+
.requiredOption('--repo <owner/repo>', 'owner/repo (with a project name, one of its attached repos)')
|
|
905
953
|
.requiredOption('--number <n>', 'The PR number')
|
|
906
954
|
.requiredOption('--sha <head-sha>', 'The head SHA you reviewed; refused if the branch moved since')
|
|
907
955
|
.option('--approve', 'Submit an approving review (the only review this command submits)')
|
|
@@ -938,9 +986,9 @@ export function registerProjectsCommands(program) {
|
|
|
938
986
|
`,
|
|
939
987
|
});
|
|
940
988
|
const commentCmd = prsCmd
|
|
941
|
-
.command('comment
|
|
942
|
-
.description('Post a comment on one open PR
|
|
943
|
-
.requiredOption('--repo <owner/repo>', '
|
|
989
|
+
.command('comment [name]')
|
|
990
|
+
.description('Post a comment on one open PR.')
|
|
991
|
+
.requiredOption('--repo <owner/repo>', 'owner/repo (with a project name, one of its attached repos)')
|
|
944
992
|
.requiredOption('--number <n>', 'The PR number')
|
|
945
993
|
.option('--body <text>', 'The comment text')
|
|
946
994
|
.option('--body-file <path>', 'Read the comment from a file; - reads stdin')
|
|
@@ -971,9 +1019,9 @@ export function registerProjectsCommands(program) {
|
|
|
971
1019
|
`,
|
|
972
1020
|
});
|
|
973
1021
|
const failureCmd = prsCmd
|
|
974
|
-
.command('failure
|
|
1022
|
+
.command('failure [name]')
|
|
975
1023
|
.description('Why one commit\'s CI failed: each failing check with the error lines of its job log.')
|
|
976
|
-
.requiredOption('--repo <owner/repo>', '
|
|
1024
|
+
.requiredOption('--repo <owner/repo>', 'owner/repo (with a project name, one of its attached repos)')
|
|
977
1025
|
.requiredOption('--sha <commit>', 'The commit whose checks failed: a PR head, a merge commit, or the default branch head')
|
|
978
1026
|
.option('--json', 'Machine-readable result')
|
|
979
1027
|
.action(async (name, opts) => {
|
|
@@ -998,7 +1046,7 @@ export function registerProjectsCommands(program) {
|
|
|
998
1046
|
if (check.excerptError)
|
|
999
1047
|
console.log(chalk.yellow(` ${check.excerptError}`));
|
|
1000
1048
|
if (check.runId !== null)
|
|
1001
|
-
console.log(chalk.gray(` re-run: agents projects prs rerun ${name} --repo ${repo} --run-id ${check.runId}`));
|
|
1049
|
+
console.log(chalk.gray(` re-run: agents projects prs rerun ${name ? `${name} ` : ''}--repo ${repo} --run-id ${check.runId}`));
|
|
1002
1050
|
}
|
|
1003
1051
|
}
|
|
1004
1052
|
if (report.error)
|
|
@@ -1021,9 +1069,9 @@ export function registerProjectsCommands(program) {
|
|
|
1021
1069
|
`,
|
|
1022
1070
|
});
|
|
1023
1071
|
const rerunCmd = prsCmd
|
|
1024
|
-
.command('rerun
|
|
1072
|
+
.command('rerun [name]')
|
|
1025
1073
|
.description('Re-run the failed jobs of one GitHub Actions workflow run.')
|
|
1026
|
-
.requiredOption('--repo <owner/repo>', '
|
|
1074
|
+
.requiredOption('--repo <owner/repo>', 'owner/repo (with a project name, one of its attached repos)')
|
|
1027
1075
|
.requiredOption('--run-id <id>', 'The workflow run (runId from prs failure --json)')
|
|
1028
1076
|
.option('--json', 'Machine-readable result')
|
|
1029
1077
|
.action(async (name, opts) => {
|
|
@@ -1056,6 +1104,7 @@ export function registerProjectsCommands(program) {
|
|
|
1056
1104
|
});
|
|
1057
1105
|
setHelpSections(prsCmd, {
|
|
1058
1106
|
examples: `
|
|
1107
|
+
agents projects prs --json # every open PR across your account and orgs, needs-me first
|
|
1059
1108
|
agents projects prs rush --json # every open PR across rush's repos (= prs list rush)
|
|
1060
1109
|
agents projects prs rush --json --repo phnx-labs/agi-cli --number 3646 # one PR, with checks + mergeability
|
|
1061
1110
|
agents projects prs ready rush --repo phnx-labs/agi-cli --number 3646 --sha <headSha>
|
|
@@ -1068,14 +1117,28 @@ export function registerProjectsCommands(program) {
|
|
|
1068
1117
|
});
|
|
1069
1118
|
setHelpSections(prsListCmd, {
|
|
1070
1119
|
examples: `
|
|
1120
|
+
agents projects prs --json # every open PR across your account and every org you belong to
|
|
1121
|
+
agents projects prs --json --org phnx-labs --org muqsitnawaz
|
|
1122
|
+
agents projects prs --json --repo phnx-labs/agi-cli --number 3646 # one PR in any repo, with checks + review + mergeability
|
|
1071
1123
|
agents projects prs rush --json # every open PR across rush's repos
|
|
1072
1124
|
agents projects prs rush --json --repo phnx-labs/agi-cli
|
|
1073
1125
|
agents projects prs rush --json --repo phnx-labs/agi-cli --number 3646 # one PR, with checks + review + mergeability
|
|
1074
1126
|
agents projects prs merge rush --repo phnx-labs/agi-cli --number 3646 --sha <headSha>
|
|
1075
1127
|
`,
|
|
1076
1128
|
notes: `
|
|
1077
|
-
|
|
1078
|
-
|
|
1129
|
+
Without a project, the read covers you and every org you belong to (--org
|
|
1130
|
+
narrows it): one REST search per owner (GitHub caps a search at 1000 results;
|
|
1131
|
+
owners[].truncated says when it was hit), one for review requests from you, then
|
|
1132
|
+
each PR's REST detail and checks, cached like the project read. Each PR carries
|
|
1133
|
+
reviewRequested and needsMe: review (a review is requested from you), failing
|
|
1134
|
+
(yours, CI red) or conflicts (yours, conflicts with its base), else null; each
|
|
1135
|
+
repository's PRs come needs-me first, then most recently updated, and
|
|
1136
|
+
repositories are ordered by their most urgent PR. Each repository names the
|
|
1137
|
+
projects that attach it. With --org, review requests count only inside those
|
|
1138
|
+
owners. A failed owner or review-request search marks the read partial.
|
|
1139
|
+
|
|
1140
|
+
With a project, repos come from its definition's attached repos only (repo +
|
|
1141
|
+
repos[].slug); --repo is refused unless it is one of them.
|
|
1079
1142
|
|
|
1080
1143
|
The list is read from GitHub over REST and paginated in full, drafts included,
|
|
1081
1144
|
with no author filter. checks and reviewDecision are null in the list; --number
|
|
@@ -5,13 +5,10 @@ import { type ActiveSession } from '../lib/session/active.js';
|
|
|
5
5
|
export { activeSessionProjectKey, backfillActiveRowsFromIndex, backfillActiveRowsFromMeta, isRunningLiveSession, serializeActiveSessionsForJson, serializeSessionsJson, type BackfillMeta } from '../lib/session/active.js';
|
|
6
6
|
import { loadLocalActiveSessions } from '../lib/session/session-cache.js';
|
|
7
7
|
import { gatherRemoteList, runOnPeer } from '../lib/session/remote-list.js';
|
|
8
|
-
import { type RemoteAgentsJsonParseResult } from '../lib/remote-agents-json.js';
|
|
9
8
|
import { type RunMeta } from '../lib/scheduling/routines.js';
|
|
10
9
|
import { type PickedSession, type SessionPreviewDigest } from './sessions-picker.js';
|
|
11
10
|
import { type TranscriptRenderOptions } from '../lib/session/presentation.js';
|
|
12
11
|
export { buildFilterOptions, renderSession, renderSessionLog, renderSessionLogJson, resolveViewMode, type TranscriptRenderOptions, } from '../lib/session/presentation.js';
|
|
13
|
-
import { type ComputerRunRow } from '../lib/computer/sessions-list.js';
|
|
14
|
-
import { type ToolSearchEnvelope, type ToolProgramCountEnvelope } from '../lib/session/tool-index.js';
|
|
15
12
|
interface SessionFilterOptions {
|
|
16
13
|
agent?: string;
|
|
17
14
|
version?: string;
|
|
@@ -55,8 +52,6 @@ interface SessionsOptions extends SessionFilterOptions, TranscriptRenderOptions
|
|
|
55
52
|
local?: boolean;
|
|
56
53
|
device?: string[];
|
|
57
54
|
devices?: string[];
|
|
58
|
-
fleet?: boolean;
|
|
59
|
-
count?: boolean;
|
|
60
55
|
claude?: boolean;
|
|
61
56
|
codex?: boolean;
|
|
62
57
|
kimi?: boolean;
|
|
@@ -91,7 +86,6 @@ interface SessionPickerJsonRow extends SessionMeta {
|
|
|
91
86
|
export declare function serializeSessionPickerRows(sessions: SessionMeta[], liveSessions: ActiveSession[], self?: string): SessionPickerJsonRow[];
|
|
92
87
|
export declare function mergeLocalFirst(sessions: SessionMeta[], localMachine: string): SessionMeta[];
|
|
93
88
|
export declare function serializeResolvedSessionsJson(sessions: SessionMeta[]): string;
|
|
94
|
-
export declare function parseRemoteComputerSessionRows(stdout: string, machine: string): RemoteAgentsJsonParseResult<ComputerRunRow>;
|
|
95
89
|
export declare function hasNoBrowserDisqualifyingFlags(options: SessionsOptions, query: string | undefined): boolean;
|
|
96
90
|
export interface RoutineRunGroup {
|
|
97
91
|
runId: string;
|
|
@@ -152,10 +146,6 @@ export declare function renderSessionPreview(query: string, scope: {
|
|
|
152
146
|
revision?: string;
|
|
153
147
|
}): Promise<void>;
|
|
154
148
|
export declare function formatLiveStatusHeadline(live: ActiveSession | undefined, bookmarked?: boolean): string;
|
|
155
|
-
export declare function mergeToolSearchEnvelopes(local: ToolSearchEnvelope, remotes: ToolSearchEnvelope[]): ToolSearchEnvelope;
|
|
156
|
-
export declare function mergeToolProgramCountEnvelopes(local: ToolProgramCountEnvelope, remotes: ToolProgramCountEnvelope[]): ToolProgramCountEnvelope;
|
|
157
|
-
export declare function toolOriginSessions(sessions: SessionMeta[], machine: string, originOnly: boolean): SessionMeta[];
|
|
158
|
-
export declare function toolSearchFleetSortError(sort: string | undefined, spansDevices: boolean): string | undefined;
|
|
159
149
|
export declare function matchesTeam(session: SessionMeta, team: string): boolean;
|
|
160
150
|
export declare function teamBadge(session: SessionMeta): {
|
|
161
151
|
plain: string;
|
|
@@ -259,7 +249,6 @@ export declare function isDefinitiveMatch(session: SessionMeta, selector: string
|
|
|
259
249
|
export declare function selectorAllowsEarlyExit(selector: string): boolean;
|
|
260
250
|
export declare function fleetCandidatesByQuery(rows: SessionMeta[], query: string, trustResolvedRows?: boolean): FleetSessionCandidate[];
|
|
261
251
|
export declare function metadataResolveForwardedArgs(selector: string, scope: Pick<SessionFilterOptions, 'agent' | 'project'>): string[];
|
|
262
|
-
export declare function toolSearchForwardedArgs(argv: string[], hosts: string[]): string[];
|
|
263
252
|
export declare function isUniqueEnoughSelector(selector: string): boolean;
|
|
264
253
|
export declare function metadataResolveOutcome(localMatches: SessionMeta[], remote: {
|
|
265
254
|
sessions: SessionMeta[];
|