@andorra-labs/code 0.1.14 → 0.1.16
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/dist/src/acp-agent.d.ts +54 -0
- package/dist/src/acp-agent.js +991 -0
- package/dist/src/agent-definitions.js +29 -6
- package/dist/src/agent-execution.js +8 -2
- package/dist/src/agent-mcp-catalog.js +2 -0
- package/dist/src/agent-mcp.d.ts +3 -1
- package/dist/src/agent-mcp.js +97 -11
- package/dist/src/andorra/entry.js +21 -3
- package/dist/src/andorra/hosted.d.ts +3 -0
- package/dist/src/andorra/hosted.js +5 -1
- package/dist/src/andorra/notices.d.ts +10 -1
- package/dist/src/andorra/notices.js +25 -2
- package/dist/src/andorra/terminal.d.ts +2 -0
- package/dist/src/andorra/terminal.js +2 -2
- package/dist/src/app-server/protocol.d.ts +9 -2
- package/dist/src/app-server/protocol.js +1 -1
- package/dist/src/app-server/workspace.d.ts +1 -0
- package/dist/src/app-server/workspace.js +141 -10
- package/dist/src/app-server.d.ts +115 -0
- package/dist/src/app-server.js +980 -63
- package/dist/src/auth/AuthManager.js +4 -4
- package/dist/src/auth/deployment.js +2 -2
- package/dist/src/browser-bridge.d.ts +1 -0
- package/dist/src/browser-bridge.js +5 -2
- package/dist/src/browser-external-app.d.ts +27 -0
- package/dist/src/browser-external-app.js +60 -0
- package/dist/src/browser-panel-tool.d.ts +6 -0
- package/dist/src/browser-panel-tool.js +36 -0
- package/dist/src/browser-runner.js +1 -0
- package/dist/src/browser-server.d.ts +5 -0
- package/dist/src/browser-server.js +27 -3
- package/dist/src/browser-ui/style.css +3 -3
- package/dist/src/browser-ui/tokens.css +27 -16
- package/dist/src/browser-view.d.ts +16 -0
- package/dist/src/browser-view.js +60 -2
- package/dist/src/bug-report.d.ts +81 -0
- package/dist/src/bug-report.js +235 -0
- package/dist/src/claude-provider.d.ts +2 -1
- package/dist/src/claude-provider.js +13 -9
- package/dist/src/cli-sign-in.d.ts +3 -1
- package/dist/src/cli-sign-in.js +4 -1
- package/dist/src/cli.js +184 -40
- package/dist/src/codex-errors.js +4 -1
- package/dist/src/coding-tools.js +7 -7
- package/dist/src/command-screens.d.ts +9 -2
- package/dist/src/command-screens.js +166 -97
- package/dist/src/commands.d.ts +3 -2
- package/dist/src/commands.js +1 -0
- package/dist/src/compaction-phrases.d.ts +4 -0
- package/dist/src/compaction-phrases.js +20 -0
- package/dist/src/completion-gates.d.ts +22 -0
- package/dist/src/completion-gates.js +11 -0
- package/dist/src/config.d.ts +5 -0
- package/dist/src/config.js +48 -0
- package/dist/src/context-compaction.js +2 -1
- package/dist/src/decision/DecisionManager.js +3 -2
- package/dist/src/decision/requestPhrases.d.ts +4 -0
- package/dist/src/decision/requestPhrases.js +23 -0
- package/dist/src/github-inbox.d.ts +55 -0
- package/dist/src/github-inbox.js +153 -0
- package/dist/src/google-provider.d.ts +31 -0
- package/dist/src/google-provider.js +153 -0
- package/dist/src/graph-health.js +8 -4
- package/dist/src/graph-manager-chat.js +6 -1
- package/dist/src/graph-provider-portability.js +32 -10
- package/dist/src/graph-quota.d.ts +29 -2
- package/dist/src/graph-quota.js +68 -10
- package/dist/src/graph-runner.js +24 -7
- package/dist/src/graph-server.d.ts +1 -1
- package/dist/src/graph-server.js +9 -7
- package/dist/src/graph-sync.d.ts +1 -0
- package/dist/src/graph-sync.js +93 -34
- package/dist/src/graph-tool.d.ts +2 -0
- package/dist/src/graph-tool.js +2 -2
- package/dist/src/graph-ui/app.js +177 -41
- package/dist/src/graph-ui/controls.css +1 -0
- package/dist/src/graph-ui/edge-router.js +121 -53
- package/dist/src/graph-ui/embed.js +2 -2
- package/dist/src/graph-ui/icons.js +1 -0
- package/dist/src/graph-ui/index.html +1 -1
- package/dist/src/graph-ui/manager.css +1 -1
- package/dist/src/graph-ui/manager.js +2 -2
- package/dist/src/graph-ui/sidebar.js +30 -0
- package/dist/src/graph-ui/studio-canvas.js +26 -13
- package/dist/src/graph-ui/studio.css +15 -7
- package/dist/src/graph-ui/studio.js +11 -4
- package/dist/src/graph-ui/style.css +77 -45
- package/dist/src/graph-ui/theme.js +3 -36
- package/dist/src/graph-ui/tokens.css +27 -19
- package/dist/src/graph-visibility.d.ts +31 -0
- package/dist/src/graph-visibility.js +102 -0
- package/dist/src/graphs.js +4 -3
- package/dist/src/live-model.d.ts +24 -0
- package/dist/src/live-model.js +37 -0
- package/dist/src/managed-sign-in.d.ts +1 -0
- package/dist/src/managed-sign-in.js +13 -0
- package/dist/src/membership-errors.d.ts +2 -0
- package/dist/src/membership-errors.js +5 -1
- package/dist/src/membership.d.ts +23 -1
- package/dist/src/membership.js +48 -6
- package/dist/src/model-health-cache.js +1 -1
- package/dist/src/model-metadata.d.ts +1 -1
- package/dist/src/model-metadata.js +12 -3
- package/dist/src/paged-transcript.d.ts +2 -0
- package/dist/src/paged-transcript.js +16 -0
- package/dist/src/plan-pass.d.ts +59 -0
- package/dist/src/plan-pass.js +165 -0
- package/dist/src/provider-connection.js +17 -0
- package/dist/src/provider-engine.d.ts +5 -0
- package/dist/src/provider-engine.js +6 -3
- package/dist/src/provider-import.js +3 -1
- package/dist/src/provider-settings.js +14 -2
- package/dist/src/providers.d.ts +33 -2
- package/dist/src/providers.js +101 -28
- package/dist/src/pull-request-checks.d.ts +26 -0
- package/dist/src/pull-request-checks.js +56 -0
- package/dist/src/pull-request-conversation.d.ts +134 -0
- package/dist/src/pull-request-conversation.js +221 -0
- package/dist/src/pull-request-create.d.ts +175 -0
- package/dist/src/pull-request-create.js +392 -0
- package/dist/src/pull-request-details.d.ts +242 -0
- package/dist/src/pull-request-details.js +614 -0
- package/dist/src/pull-request-edit.d.ts +23 -0
- package/dist/src/pull-request-edit.js +91 -0
- package/dist/src/pull-request-logs.d.ts +76 -0
- package/dist/src/pull-request-logs.js +172 -0
- package/dist/src/pull-request-merge.d.ts +112 -0
- package/dist/src/pull-request-merge.js +258 -0
- package/dist/src/pull-request-review.d.ts +137 -0
- package/dist/src/pull-request-review.js +401 -0
- package/dist/src/pull-requests.d.ts +43 -2
- package/dist/src/pull-requests.js +112 -21
- package/dist/src/react-runtime.js +58 -9
- package/dist/src/read-document-tool.d.ts +2 -0
- package/dist/src/read-document-tool.js +6 -6
- package/dist/src/remote/engine-pool.js +42 -6
- package/dist/src/run-control.d.ts +10 -0
- package/dist/src/run-control.js +24 -0
- package/dist/src/run-progress.d.ts +10 -0
- package/dist/src/run-progress.js +122 -0
- package/dist/src/run-records.d.ts +2 -2
- package/dist/src/runtime-environment.d.ts +1 -0
- package/dist/src/runtime-environment.js +13 -0
- package/dist/src/runtime.d.ts +5 -1
- package/dist/src/runtime.js +14 -2
- package/dist/src/save-lock.js +14 -7
- package/dist/src/session-title.d.ts +3 -0
- package/dist/src/session-title.js +5 -2
- package/dist/src/sign-in-detection.d.ts +1 -1
- package/dist/src/sign-in-detection.js +10 -3
- package/dist/src/sign-in-offer.js +1 -1
- package/dist/src/skill-commands.js +1 -1
- package/dist/src/skills/bundled/bug-report/SKILL.md +80 -0
- package/dist/src/skills/bundled/graph-manager/SKILL.md +9 -1
- package/dist/src/skills/bundled/graph-manager/errors.md +1 -0
- package/dist/src/skills/bundled/provenance.json +7 -2
- package/dist/src/skills/runtime-skills.js +1 -0
- package/dist/src/subagent-run.js +1 -0
- package/dist/src/telemetry/capture-core.d.ts +17 -0
- package/dist/src/telemetry/capture-core.js +59 -1
- package/dist/src/telemetry/classify.d.ts +3 -1
- package/dist/src/telemetry/classify.js +37 -0
- package/dist/src/telemetry/emitter.d.ts +2 -0
- package/dist/src/telemetry/emitter.js +42 -5
- package/dist/src/telemetry/schema.d.ts +22 -0
- package/dist/src/telemetry/schema.js +68 -1
- package/dist/src/telemetry/surface.d.ts +1 -0
- package/dist/src/telemetry/uploader.d.ts +12 -1
- package/dist/src/telemetry/uploader.js +30 -2
- package/dist/src/terminal-links.d.ts +16 -0
- package/dist/src/terminal-links.js +113 -0
- package/dist/src/terminal-ui.d.ts +8 -1
- package/dist/src/terminal-ui.js +40 -14
- package/dist/src/tool-catalog.js +1 -1
- package/dist/src/trajectory.js +6 -1
- package/dist/src/transcript.d.ts +2 -0
- package/dist/src/transcript.js +10 -3
- package/dist/src/types.d.ts +9 -0
- package/dist/src/usage-analytics.js +18 -10
- package/package.json +2 -1
|
@@ -457,38 +457,169 @@ async function readJournalTail(path, limit) {
|
|
|
457
457
|
if (byte === 0x0a)
|
|
458
458
|
newlines += 1;
|
|
459
459
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
if (position > 0)
|
|
463
|
-
|
|
464
|
-
|
|
460
|
+
let buffer = Buffer.concat(blocks);
|
|
461
|
+
let start = position;
|
|
462
|
+
if (position > 0) {
|
|
463
|
+
// The first line read is only the end of a line that began earlier, so it belongs to the head.
|
|
464
|
+
const cut = buffer.indexOf(0x0a);
|
|
465
|
+
const skip = cut < 0 ? buffer.length : cut + 1;
|
|
466
|
+
buffer = buffer.subarray(skip);
|
|
467
|
+
start += skip;
|
|
468
|
+
}
|
|
469
|
+
return { lines: buffer.toString('utf8').split('\n'), start, truncated: position > 0 || newlines > limit };
|
|
465
470
|
}
|
|
466
471
|
catch (error) {
|
|
467
472
|
if (error.code !== 'ENOENT')
|
|
468
473
|
throw error;
|
|
469
|
-
return { lines: [], truncated: false };
|
|
474
|
+
return { lines: [], start: 0, truncated: false };
|
|
470
475
|
}
|
|
471
476
|
finally {
|
|
472
477
|
await handle?.close().catch(() => { });
|
|
473
478
|
}
|
|
474
479
|
}
|
|
480
|
+
// Events that say which graph nodes and subagents ran. A long run's journal is read from its tail,
|
|
481
|
+
// and without these the desktop's Graph list loses every node and subagent that started before the
|
|
482
|
+
// newest events: a long run's entry node went missing that way.
|
|
483
|
+
const OUTLINE_TYPES = [
|
|
484
|
+
'graph.started', 'graph.node.started', 'graph.node.completed', 'graph.finalization.resumed', 'graph.completed', 'graph.stopped',
|
|
485
|
+
'graph.todos.updated', 'graph.widgets.updated', 'subagent.started', 'subagent.completed', 'subagent.change',
|
|
486
|
+
];
|
|
487
|
+
// Journal lines are written as {"type":"…",…}, so a line is matched on its opening bytes.
|
|
488
|
+
const OUTLINE_PREFIXES = OUTLINE_TYPES.map(type => Buffer.from(`{"type":"${type}"`));
|
|
489
|
+
const OUTLINE_PREFIX_BYTES = Math.max(...OUTLINE_PREFIXES.map(prefix => prefix.length));
|
|
490
|
+
// Only the newest of these matters to a reader, so the outline holds one of each. They are never
|
|
491
|
+
// evicted, so the run's graph.started survives however many events follow it.
|
|
492
|
+
const OUTLINE_LATEST_ONLY = new Set(['graph.started', 'graph.todos.updated', 'graph.widgets.updated']);
|
|
493
|
+
// Bounds on what the outline holds while it is collected. Measured on real journals, the largest
|
|
494
|
+
// outline line was 118 KB and the largest whole outline 229 KB.
|
|
495
|
+
const OUTLINE_MAX_LINE_BYTES = 256 * 1024;
|
|
496
|
+
const OUTLINE_MAX_BYTES = 4 * 1024 * 1024;
|
|
497
|
+
const OUTLINE_MAX_EVENTS = 20_000;
|
|
498
|
+
// The outline type a line opens with, or undefined when it is not an outline event.
|
|
499
|
+
function outlineType(opening) {
|
|
500
|
+
const index = OUTLINE_PREFIXES.findIndex(prefix => opening.length >= prefix.length && opening.subarray(0, prefix.length).equals(prefix));
|
|
501
|
+
return index < 0 ? undefined : OUTLINE_TYPES[index];
|
|
502
|
+
}
|
|
503
|
+
// Holds outline lines in journal order within the bounds above, evicting the oldest first, so
|
|
504
|
+
// peak memory stays bounded however long the journal is.
|
|
505
|
+
class OutlineCollector {
|
|
506
|
+
sequence = 0;
|
|
507
|
+
recent = [];
|
|
508
|
+
first = 0;
|
|
509
|
+
bytes = 0;
|
|
510
|
+
latest = new Map();
|
|
511
|
+
add(type, line, bytes) {
|
|
512
|
+
if (bytes > OUTLINE_MAX_LINE_BYTES)
|
|
513
|
+
return;
|
|
514
|
+
this.sequence += 1;
|
|
515
|
+
if (OUTLINE_LATEST_ONLY.has(type)) {
|
|
516
|
+
this.latest.set(type, { sequence: this.sequence, line });
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
this.recent.push({ sequence: this.sequence, line, bytes });
|
|
520
|
+
this.bytes += bytes;
|
|
521
|
+
while (this.recent.length - this.first > OUTLINE_MAX_EVENTS || this.bytes > OUTLINE_MAX_BYTES) {
|
|
522
|
+
this.bytes -= this.recent[this.first].bytes;
|
|
523
|
+
this.first += 1;
|
|
524
|
+
}
|
|
525
|
+
if (this.first > OUTLINE_MAX_EVENTS) {
|
|
526
|
+
this.recent = this.recent.slice(this.first);
|
|
527
|
+
this.first = 0;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
events() {
|
|
531
|
+
const entries = [...this.recent.slice(this.first), ...this.latest.values()].sort((a, b) => a.sequence - b.sequence);
|
|
532
|
+
const events = [];
|
|
533
|
+
for (const entry of entries) {
|
|
534
|
+
try {
|
|
535
|
+
events.push(JSON.parse(entry.line));
|
|
536
|
+
}
|
|
537
|
+
catch {
|
|
538
|
+
continue;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
return events;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
// Reads the journal bytes before the tail into the collector. Every other line is skipped once its
|
|
545
|
+
// opening bytes are seen, so bulky tool and model output is never decoded or held.
|
|
546
|
+
async function readJournalOutline(path, end, collector) {
|
|
547
|
+
if (end <= 0)
|
|
548
|
+
return;
|
|
549
|
+
let carry = [];
|
|
550
|
+
let carryBytes = 0;
|
|
551
|
+
let type;
|
|
552
|
+
const settle = (head) => {
|
|
553
|
+
if (type !== undefined)
|
|
554
|
+
return;
|
|
555
|
+
const opening = carryBytes > 0 ? Buffer.concat([...carry, head]).subarray(0, OUTLINE_PREFIX_BYTES) : head.subarray(0, OUTLINE_PREFIX_BYTES);
|
|
556
|
+
if (opening.length >= OUTLINE_PREFIX_BYTES)
|
|
557
|
+
type = outlineType(opening) ?? null;
|
|
558
|
+
};
|
|
559
|
+
for await (const chunk of createReadStream(path, { start: 0, end: end - 1, highWaterMark: JOURNAL_TAIL_BLOCK_BYTES })) {
|
|
560
|
+
const block = chunk;
|
|
561
|
+
let from = 0;
|
|
562
|
+
for (let cut = block.indexOf(0x0a, from); cut >= 0; cut = block.indexOf(0x0a, from)) {
|
|
563
|
+
const piece = block.subarray(from, cut);
|
|
564
|
+
settle(piece);
|
|
565
|
+
if (type !== null) {
|
|
566
|
+
const line = carryBytes > 0 ? Buffer.concat([...carry, piece]) : piece;
|
|
567
|
+
const matched = type ?? outlineType(line);
|
|
568
|
+
if (matched !== undefined)
|
|
569
|
+
collector.add(matched, line.toString('utf8'), line.length);
|
|
570
|
+
}
|
|
571
|
+
carry = [];
|
|
572
|
+
carryBytes = 0;
|
|
573
|
+
type = undefined;
|
|
574
|
+
from = cut + 1;
|
|
575
|
+
}
|
|
576
|
+
const rest = block.subarray(from);
|
|
577
|
+
if (rest.length === 0)
|
|
578
|
+
continue;
|
|
579
|
+
settle(rest);
|
|
580
|
+
if (type === null)
|
|
581
|
+
continue;
|
|
582
|
+
carry.push(Buffer.from(rest));
|
|
583
|
+
carryBytes += rest.length;
|
|
584
|
+
if (carryBytes > OUTLINE_MAX_LINE_BYTES) {
|
|
585
|
+
carry = [];
|
|
586
|
+
carryBytes = 0;
|
|
587
|
+
type = null;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
// `events` is the newest part of the journal. When older events were left out, `outline` carries
|
|
592
|
+
// the graph, node and subagent events among them, in journal order, so a reader can still tell
|
|
593
|
+
// which nodes and subagents ran.
|
|
475
594
|
export async function readRun(directory, id) {
|
|
476
595
|
const path = runRecordPath(directory, id, 'json');
|
|
477
596
|
const result = JSON.parse(await readFile(path, 'utf8'));
|
|
478
597
|
const journal = runRecordPath(directory, id, 'jsonl');
|
|
479
|
-
const { lines, truncated } = await readJournalTail(journal, MAX_RUN_EVENTS);
|
|
480
|
-
const
|
|
598
|
+
const { lines, start, truncated } = await readJournalTail(journal, MAX_RUN_EVENTS);
|
|
599
|
+
const parsed = [];
|
|
481
600
|
for (const line of lines) {
|
|
482
601
|
if (!line.trim())
|
|
483
602
|
continue;
|
|
484
603
|
try {
|
|
485
|
-
|
|
604
|
+
parsed.push({ line, event: JSON.parse(line) });
|
|
486
605
|
}
|
|
487
606
|
catch {
|
|
488
607
|
continue;
|
|
489
608
|
}
|
|
490
609
|
}
|
|
491
|
-
|
|
610
|
+
const dropped = parsed.slice(0, Math.max(0, parsed.length - MAX_RUN_EVENTS));
|
|
611
|
+
const events = parsed.slice(dropped.length).map(entry => entry.event);
|
|
612
|
+
if (!truncated)
|
|
613
|
+
return { result, events, truncated };
|
|
614
|
+
const collector = new OutlineCollector();
|
|
615
|
+
await readJournalOutline(journal, start, collector);
|
|
616
|
+
for (const { line } of dropped) {
|
|
617
|
+
const type = outlineType(Buffer.from(line.slice(0, OUTLINE_PREFIX_BYTES)));
|
|
618
|
+
if (type !== undefined)
|
|
619
|
+
collector.add(type, line, Buffer.byteLength(line));
|
|
620
|
+
}
|
|
621
|
+
const outline = collector.events();
|
|
622
|
+
return { result, events, truncated, ...(outline.length > 0 ? { outline } : {}) };
|
|
492
623
|
}
|
|
493
624
|
export async function runRecordFile(directory, id) {
|
|
494
625
|
const path = resolve(runRecordPath(directory, id, 'json'));
|
package/dist/src/app-server.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type { CliSignIn } from './cli-sign-in.js';
|
|
|
9
9
|
import { checkGraphModelHealth } from './graph-health.js';
|
|
10
10
|
import { loadAccessibleGraph } from './membership.js';
|
|
11
11
|
import { type SavedSession } from './sessions.js';
|
|
12
|
+
import { type GitRunner } from './pull-request-create.js';
|
|
12
13
|
import { type GhRunner } from './pull-requests.js';
|
|
13
14
|
import { type Completion, type RunResult } from './runtime.js';
|
|
14
15
|
import { CodeIntelligenceManager } from './code-intelligence/CodeIntelligenceManager.js';
|
|
@@ -39,10 +40,13 @@ export interface AppServerOptions {
|
|
|
39
40
|
managedSignIn?: {
|
|
40
41
|
claude?: ManagedSignInService;
|
|
41
42
|
grok?: ManagedSignInService;
|
|
43
|
+
google?: ManagedSignInService;
|
|
42
44
|
opencode?: OpenCodeSignInService;
|
|
43
45
|
};
|
|
44
46
|
signInProbes?: Partial<SignInProbes>;
|
|
45
47
|
gh?: GhRunner;
|
|
48
|
+
/** The git a task's folder answers to, for opening a pull request from it (tests pass a fake). */
|
|
49
|
+
git?: (folder: string) => GitRunner;
|
|
46
50
|
pullRequestPollMs?: number;
|
|
47
51
|
hostedCheck?: HostedMonitorOptions['check'];
|
|
48
52
|
hostedNow?: () => number;
|
|
@@ -65,17 +69,23 @@ export declare class AppServer {
|
|
|
65
69
|
private readonly anthropicAuth;
|
|
66
70
|
private readonly claudeSignIn;
|
|
67
71
|
private readonly grokSignIn;
|
|
72
|
+
private readonly googleSignIn;
|
|
68
73
|
private readonly openCodeSignIn;
|
|
69
74
|
private readonly signInProbes;
|
|
70
75
|
private readonly detectedSignIns;
|
|
71
76
|
private readonly retireCodexAccount;
|
|
72
77
|
private readonly gh;
|
|
78
|
+
private readonly git;
|
|
73
79
|
private readonly pullRequestWatcher;
|
|
80
|
+
private readonly pullRequestReader;
|
|
74
81
|
private readonly sessionChanges;
|
|
75
82
|
private readonly autoFixWakes;
|
|
83
|
+
/** Wakes the PR tab's Fix with Agent armed: delivered as the person's request, not as a timer. */
|
|
84
|
+
private readonly fixWakes;
|
|
76
85
|
private readonly reviewWaiters;
|
|
77
86
|
private readonly reviewWaitsStarting;
|
|
78
87
|
private readonly graphSync;
|
|
88
|
+
private readonly stopGraphVisibilityWatch;
|
|
79
89
|
private readonly terminals;
|
|
80
90
|
private readonly backgroundTasks;
|
|
81
91
|
private stopBackgroundWatch;
|
|
@@ -272,6 +282,11 @@ export declare class AppServer {
|
|
|
272
282
|
private graphDirectory;
|
|
273
283
|
private currentAccountIsConfirmed;
|
|
274
284
|
private listGraphs;
|
|
285
|
+
/** The caller names the account it read; a change made for an account that is no longer signed in is refused. */
|
|
286
|
+
private visibilitySubject;
|
|
287
|
+
private visibilityPaths;
|
|
288
|
+
private setGraphVisibilityMethod;
|
|
289
|
+
private importGraphVisibilityMethod;
|
|
275
290
|
private exportAgent;
|
|
276
291
|
private getGraph;
|
|
277
292
|
private selectGraph;
|
|
@@ -331,6 +346,106 @@ export declare class AppServer {
|
|
|
331
346
|
private attachPullRequest;
|
|
332
347
|
private updatePullRequest;
|
|
333
348
|
private dismissPullRequest;
|
|
349
|
+
/**
|
|
350
|
+
* The PR tab's read of a task's pull request: branches, author, mergeability, description, commits,
|
|
351
|
+
* checks and reviews, through the account that can read it. Answers come from a short cache (see
|
|
352
|
+
* PullRequestReader); a failed read keeps the last good answer and says why it is not current.
|
|
353
|
+
*/
|
|
354
|
+
private pullRequestDetails;
|
|
355
|
+
private pullRequestFiles;
|
|
356
|
+
private storedPullRequest;
|
|
357
|
+
/**
|
|
358
|
+
* The task's pull request for a write. `url`, when the tab sends it, is the PR the person looked at;
|
|
359
|
+
* a write for a PR the task no longer has is refused rather than applied to its new one.
|
|
360
|
+
*/
|
|
361
|
+
private pullRequestToWrite;
|
|
362
|
+
/** The PR tab's review state: unresolved and resolved threads, which files the person viewed, and who is asked to review. */
|
|
363
|
+
private pullRequestReview;
|
|
364
|
+
/** A write's answer, with the review state read again at once so the tab shows what GitHub now holds. */
|
|
365
|
+
private afterReviewWrite;
|
|
366
|
+
/** Posts a review (comment, approve or request changes) with its line comments, as the account the person confirmed. */
|
|
367
|
+
private submitPullRequestReview;
|
|
368
|
+
/** Replies to a review thread, or resolves or reopens it. */
|
|
369
|
+
private pullRequestThread;
|
|
370
|
+
/** Marks a file viewed or not viewed for the person, as on github.com. Nobody is notified, so the state is not read again. */
|
|
371
|
+
private markPullRequestFileViewed;
|
|
372
|
+
/** Re-runs the failed jobs of GitHub Actions runs behind this PR's failed checks, as read last. */
|
|
373
|
+
private rerunPullRequestChecks;
|
|
374
|
+
/** Asks people to review the PR, or withdraws requests. */
|
|
375
|
+
private requestPullRequestReviewers;
|
|
376
|
+
/** Puts what a merge-side write changed on the stored record at once, so the sidebar and the tab show it; the watcher then confirms it. */
|
|
377
|
+
private recordPullRequestChange;
|
|
378
|
+
/** A merge-side write's answer, with the merge state read again so the tab shows what GitHub now holds. */
|
|
379
|
+
private afterMergeWrite;
|
|
380
|
+
/**
|
|
381
|
+
* Merges the task's PR now, or sets it to merge when ready (GitHub's auto-merge), with the method and
|
|
382
|
+
* commit message the person chose, at the head commit they read. Deleting the head branch afterwards
|
|
383
|
+
* is said separately: the merge has happened even when that fails.
|
|
384
|
+
*/
|
|
385
|
+
private mergeSessionPullRequest;
|
|
386
|
+
/** Brings the PR's branch up to date with its base on GitHub (GitHub's "Update branch"), by a merge commit or a rebase. */
|
|
387
|
+
private updateSessionPullRequestBranch;
|
|
388
|
+
/** Marks a draft ready for review (GitHub then asks its reviewers), or converts the PR back to a draft. */
|
|
389
|
+
private readySessionPullRequest;
|
|
390
|
+
/**
|
|
391
|
+
* What Create Pull Request would open from the task's folder: its branch, commits and repository, the
|
|
392
|
+
* account that can push, and a drafted title and body; or why there is nothing to open (`blocked`).
|
|
393
|
+
*/
|
|
394
|
+
private sessionPullRequestDraft;
|
|
395
|
+
/**
|
|
396
|
+
* Opens a pull request from the task's folder as the account the person confirmed, pushing the branch
|
|
397
|
+
* first when GitHub lacks it, and attaches it to the task (or attaches the one already open for the
|
|
398
|
+
* branch, with `attach`). The watcher then follows it like any other.
|
|
399
|
+
*/
|
|
400
|
+
private createSessionPullRequest;
|
|
401
|
+
/** Where a comment the tab may change sits in the review read: a timeline comment, a review's text, or a comment in a thread. */
|
|
402
|
+
private static commentIn;
|
|
403
|
+
/** Posts a comment on the PR's conversation, or edits or deletes one of the person's comments. */
|
|
404
|
+
private pullRequestComment;
|
|
405
|
+
/** Adds or takes back one of GitHub's reactions on the PR, a comment or a review. Nobody is notified, so it acts at once. */
|
|
406
|
+
private pullRequestReact;
|
|
407
|
+
/**
|
|
408
|
+
* Commits a reviewer's suggestion to the PR's branch on GitHub, as GitHub's "Commit suggestion" does,
|
|
409
|
+
* at the head the person read (GitHub refuses when the file changed since). The task's folder is then
|
|
410
|
+
* brought up to the new commit when it sits on that branch at the old head; otherwise the answer says
|
|
411
|
+
* it is behind.
|
|
412
|
+
*/
|
|
413
|
+
private applyPullRequestSuggestion;
|
|
414
|
+
/**
|
|
415
|
+
* Brings the task's folder up to a commit made on GitHub from the tab, when the folder sits on that
|
|
416
|
+
* branch at the commit before it: a fetch as the confirmed account and a fast-forward, never a merge
|
|
417
|
+
* of anything else. `behind` when it cannot (other commits, or local changes in the way).
|
|
418
|
+
*/
|
|
419
|
+
private catchUpFolder;
|
|
420
|
+
/** An excerpt of a failed GitHub Actions job's log, for a check of this PR's head. */
|
|
421
|
+
private pullRequestCheckLog;
|
|
422
|
+
/**
|
|
423
|
+
* Hands the PR's failed checks to the task's agent ("Fix with Agent"): a prompt naming them and how to
|
|
424
|
+
* read their logs, delivered like a self-wake (into the running turn, or as the next one). The checks
|
|
425
|
+
* come from the engine's own read, never from text the tab sends.
|
|
426
|
+
*/
|
|
427
|
+
private fixPullRequestChecks;
|
|
428
|
+
/** Changes the PR's title, description, labels or assignees, as the account the person confirmed. */
|
|
429
|
+
private editSessionPullRequest;
|
|
430
|
+
/** Closes the PR (with a comment first, when the person wrote one) or reopens it. Its branch stays. */
|
|
431
|
+
private setSessionPullRequestState;
|
|
432
|
+
/** Takes the PR out of its base's merge queue. */
|
|
433
|
+
private dequeueSessionPullRequest;
|
|
434
|
+
/** Attaches a GitHub pull request to a task (Review Requests' "Review in New Task"); the watcher then follows it. */
|
|
435
|
+
private attachSessionPullRequest;
|
|
436
|
+
private reviewRequestsRead;
|
|
437
|
+
/**
|
|
438
|
+
* The open pull requests that ask a signed-in account for its review, each with the task it is attached
|
|
439
|
+
* to, if one. Read at most once a minute (a refresh: every 5 seconds), backed off on a rate limit.
|
|
440
|
+
*/
|
|
441
|
+
private pullRequestReviewRequests;
|
|
442
|
+
/** The open issues of a project folder's GitHub repository (its `origin`), to start a task from one. */
|
|
443
|
+
private listWorkspaceIssues;
|
|
444
|
+
/**
|
|
445
|
+
* Keeps the sidebar's checks mark in step with what the tab just read from GitHub (never a cached
|
|
446
|
+
* answer), and asks the watcher to catch up on a state it has not seen.
|
|
447
|
+
*/
|
|
448
|
+
private syncPullRequestRecord;
|
|
334
449
|
private cancelAutoFixWake;
|
|
335
450
|
private pullRequestControl;
|
|
336
451
|
private wakeForPullRequest;
|