@staix/agent-hub 0.44.0 → 0.46.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 +66 -0
- package/README.md +12 -11
- package/docs/adding-an-ai-tool.md +1 -0
- package/docs/agent-notes/adapters.md +35 -6
- package/docs/agent-notes/budget.md +2 -1
- package/docs/agent-notes/daemon.md +5 -1
- package/docs/agent-notes/local-worker.md +1 -1
- package/docs/agent-notes/security-review.md +3 -2
- package/docs/agent-notes/tasks.md +6 -2
- package/docs/agent-notes/tests.md +4 -3
- package/docs/design/adapters.md +20 -2
- package/docs/design/agent-hub-architecture.md +12 -0
- package/docs/design/agent-hub.md +1 -1
- package/docs/design/cli-output.md +2 -0
- package/docs/design/roadmap.md +158 -4
- package/docs/design/supervision.md +21 -1
- package/docs/design/task-board.md +32 -4
- package/docs/dogfood.md +28 -4
- package/docs/events.md +7 -3
- package/docs/influences.md +7 -0
- package/docs/memory.md +4 -4
- package/docs/operations.md +151 -36
- package/docs/quickstart.md +16 -4
- package/docs/research.md +16 -0
- package/docs/roadmap.json +4 -0
- package/docs/roadmap.md +9 -0
- package/docs/sdlc.md +15 -3
- package/docs/security.md +9 -7
- package/docs/smoke.md +1 -1
- package/docs/verification/2026-11-05-hardcoded-values-classification-rules.md +28 -0
- package/docs/verification/2026-11-19-claude-implementer-2.1.328.md +49 -0
- package/docs/verification/2026-11-20-claude-implementer-2.1.329.md +49 -0
- package/docs/verification/2026-11-20-sdlc-metrics-diagnosis.md +7 -0
- package/docs/verification/2026-11-21-0.45.0.md +69 -0
- package/docs/verification/2026-11-22-agy-1.5.14.md +27 -0
- package/docs/verification/2026-11-22-claude-instruction-hook.md +35 -0
- package/docs/verification/2026-11-22-codex-0171-reviewer-isolation.md +47 -0
- package/docs/verification/2026-11-22-instructed-ipc.md +9 -0
- package/docs/verification/2026-11-22-jcode-1.0.3.md +71 -0
- package/docs/verification/2026-11-22-jcode-separate-home.md +14 -0
- package/docs/verification/2026-11-22-qwen-0283-acp.md +28 -0
- package/docs/verification/2026-11-22-qwen-0283-dual-output.md +33 -0
- package/docs/verification/2026-11-22-roadmap-r5-view-receipt.md +63 -0
- package/docs/verification/2026-11-23-0.46.0.md +44 -0
- package/docs/verification/assets/1483-r5-detail-1440-light.png +0 -0
- package/docs/verification/assets/1483-r5-detail-390-light.png +0 -0
- package/docs/verification/assets/1483-r5-view-1440-dark.png +0 -0
- package/docs/verification/assets/1483-r5-view-1440-light.png +0 -0
- package/docs/verification/assets/1483-r5-view-390-dark.png +0 -0
- package/docs/verification/assets/1483-r5-view-390-light.png +0 -0
- package/docs/verification/assets/1483-r5-view-820-dark.png +0 -0
- package/docs/verification/assets/1483-r5-view-820-light.png +0 -0
- package/docs/verified.json +33 -27
- package/package.json +3 -2
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/kimi-hook.js +4743 -4048
- package/plugins/agent-hub/kimi-review-policy-worker.js +5 -5
- package/plugins/agent-hub/server.js +1641 -1265
- package/plugins/agent-hub/skills/ahub/SKILL.md +17 -0
- package/plugins/agent-hub/skills/ahub-manage/SKILL.md +37 -0
- package/plugins/agent-hub/skills/ahub-status/SKILL.md +14 -0
- package/plugins/agent-hub/skills/ahub-use/SKILL.md +12 -0
- package/scripts/check-docs.mjs +9 -1
- package/src/adapters/acp.ts +11 -1
- package/src/adapters/claude-channel.ts +2 -1
- package/src/adapters/compat.ts +15 -14
- package/src/adapters/definitions/builtin-metadata.ts +2 -2
- package/src/adapters/definitions/native-cli-claude-setup.ts +9 -1
- package/src/adapters/definitions/native-cli-doctor.ts +8 -5
- package/src/adapters/definitions/native-cli-jcode-home-init.ts +158 -0
- package/src/adapters/definitions/native-cli-jcode-home.ts +72 -0
- package/src/adapters/definitions/native-cli-jcode-mcp.ts +20 -0
- package/src/adapters/definitions/native-cli-skills.ts +29 -0
- package/src/adapters/definitions/native-context.ts +10 -0
- package/src/adapters/jcode.ts +10 -0
- package/src/adapters/local-worker.ts +3 -2
- package/src/adapters/pi.ts +15 -4
- package/src/cli/claude-profile-hook.ts +40 -3
- package/src/cli/console-state.ts +58 -27
- package/src/cli/console-usage.ts +5 -3
- package/src/cli/console.ts +35 -4
- package/src/cli/help.ts +17 -10
- package/src/cli/identity.ts +4 -2
- package/src/cli/instruction-hook.ts +28 -0
- package/src/cli/jcode-mcp.ts +2 -1
- package/src/cli/main.js +8 -0
- package/src/cli/main.ts +149 -23
- package/src/cli/output-standard.ts +3 -55
- package/src/cli/output.ts +8 -2
- package/src/cli/recovery-package.ts +62 -13
- package/src/cli/roadmap-write.ts +59 -0
- package/src/cli/roadmap.ts +115 -4
- package/src/cli/sdlc-output.ts +4 -0
- package/src/cli/setup-homes.ts +1 -0
- package/src/cli/setup.ts +1 -1
- package/src/cli/skills-install.ts +463 -0
- package/src/cli/task-output.ts +1 -1
- package/src/cli/upgrade-presentation-flags.ts +1 -1
- package/src/cli/upgrade-runtime.ts +10 -6
- package/src/hub/agent-mem-range.ts +43 -0
- package/src/hub/board.ts +144 -5
- package/src/hub/budget-projection.ts +99 -0
- package/src/hub/check-runner.ts +25 -1
- package/src/hub/claude-launch-proof.ts +5 -1
- package/src/hub/conductor.ts +8 -3
- package/src/hub/config-apply.ts +6 -3
- package/src/hub/config-tier.ts +1 -1
- package/src/hub/config-trust.ts +1 -1
- package/src/hub/context-window.ts +1 -1
- package/src/hub/control-client.ts +9 -2
- package/src/hub/cost-governance.ts +11 -7
- package/src/hub/daemon.ts +707 -53
- package/src/hub/dogfood-read.ts +4 -2
- package/src/hub/edit-guard.ts +100 -0
- package/src/hub/events.ts +80 -9
- package/src/hub/execution-budget.ts +29 -8
- package/src/hub/facts.ts +57 -4
- package/src/hub/hub-tools.ts +3 -1
- package/src/hub/inference.ts +1 -1
- package/src/hub/instances.ts +10 -1
- package/src/hub/instructed-exact.ts +95 -0
- package/src/hub/instructed-intent.ts +64 -0
- package/src/hub/instructed-ipc.ts +33 -0
- package/src/hub/instructed-runtime.ts +19 -0
- package/src/hub/instruction-receipt.ts +218 -0
- package/src/hub/lifecycle.ts +6 -1
- package/src/hub/log-rotation.ts +130 -0
- package/src/hub/manager.ts +46 -3
- package/src/hub/memory-profile.ts +137 -21
- package/src/hub/no-writes.ts +1 -0
- package/src/hub/operational-authority.ts +3 -2
- package/src/hub/operational-settings.ts +2 -2
- package/src/hub/recovery-store.ts +49 -21
- package/src/hub/registry.ts +1 -1
- package/src/hub/research-experiments.ts +132 -0
- package/src/hub/research-quality.ts +8 -2
- package/src/hub/research-record.ts +35 -0
- package/src/hub/research.ts +128 -28
- package/src/hub/roadmap-check.ts +65 -0
- package/src/hub/roadmap-decompose.ts +139 -0
- package/src/hub/roadmap-export.ts +27 -0
- package/src/hub/roadmap-sync.ts +97 -0
- package/src/hub/roadmap.ts +59 -1
- package/src/hub/routing.ts +18 -1
- package/src/hub/runtime-capture-prune.ts +2 -1
- package/src/hub/sdlc-branch-ci.ts +128 -0
- package/src/hub/sdlc-merge.ts +6 -3
- package/src/hub/sdlc-metrics.ts +19 -5
- package/src/hub/sdlc.ts +73 -5
- package/src/hub/settings.ts +3 -1
- package/src/hub/snapshots.ts +13 -1
- package/src/hub/startup-event-seeds.ts +21 -15
- package/src/hub/startup-timing.ts +3 -1
- package/src/hub/supervision-proposals.ts +10 -2
- package/src/hub/supervision-rules.ts +26 -3
- package/src/hub/supervision.ts +7 -0
- package/src/hub/task-pr.ts +47 -0
- package/src/hub/task-worktree.ts +18 -11
- package/src/hub/tasks.ts +694 -44
- package/src/hub/ui.ts +6 -2
- package/src/hub/usage-rollup.ts +77 -22
- package/src/local/tools.ts +13 -1
- package/src/memory/client.ts +3 -2
- package/src/pi/extension.ts +15 -3
- package/src/pi/tool-receipts.ts +26 -0
- package/src/ui/index.html +342 -8
- package/src/ui/plugin.ts +6 -2
- package/src/ui/roadmap-model.ts +70 -0
package/src/hub/settings.ts
CHANGED
|
@@ -67,11 +67,13 @@ export const SETTINGS: readonly SettingDef[] = [
|
|
|
67
67
|
...OPERATIONAL_NUMBERS.map(({ defaultValue, unit, inventory, ...def }): SettingDef => def),
|
|
68
68
|
{ key: "tasks.auto_pull", group: "Switches", label: "Auto-pull the top reserved ready card when a planner slot frees", type: "boolean", store: "config", applies: "live", risk: "raises", floor: false, path: ["tasks", "auto_pull"] },
|
|
69
69
|
// #1221 T2: off evaluates nothing, shadow stores bounded proposals with no inbox row or notice, advisory may also show one in the inbox.
|
|
70
|
+
{ key: "edit_governance.arm", group: "Switches", label: "Edit governance arm", type: "enum", values: ["baseline", "route_guard", "occ_guard", "combined_guard"], store: "config", applies: "live", risk: "raises", floor: "baseline", path: ["edit_governance", "arm"] },
|
|
70
71
|
{ key: "supervision.mode", group: "Switches", label: "Supervision proposals: off, shadow (stored, zero-effect) or advisory (also shown in the inbox)", type: "enum", values: ["off", "shadow", "advisory"], store: "config", applies: "live", risk: "raises", floor: "off", path: ["supervision", "mode"] },
|
|
71
72
|
{ key: "tasks.queue_backpressure.max_queued", group: "Routing", label: "Automatic offers: max queued envelopes (0 disables)", type: "integer", min: 0, max: QUEUE_BACKPRESSURE_LIMITS.max_queued, store: "config", applies: "live", risk: "raises", path: ["tasks", "queue_backpressure", "max_queued"] },
|
|
72
73
|
{ key: "tasks.queue_backpressure.max_oldest_s", group: "Routing", label: "Automatic offers: max oldest queued age in seconds (0 disables)", type: "integer", min: 0, max: QUEUE_BACKPRESSURE_LIMITS.max_oldest_s, store: "config", applies: "live", risk: "raises", path: ["tasks", "queue_backpressure", "max_oldest_s"] },
|
|
73
74
|
{ key: "planner", group: "Roles", label: "Planners (task-local selection)", type: "peers", values: PLANNER_PEERS, store: "config", applies: "live", risk: "raises", path: ["planner"] },
|
|
74
75
|
...SETTING_PEERS.map((peer): SettingDef => ({ key: `catalog_roles.${peer}`, group: "Roles", label: `${peer}: catalog guidance`, type: "roles", store: "config", applies: "next use", risk: "safe", path: ["catalog_roles", peer] })),
|
|
76
|
+
{ key: "instructed.mode", group: "Permissions", label: "Instructed mode (person terminal only)", type: "enum", values: ["off", "exact", "intent"], store: "config", applies: "live", risk: "raises", floor: "off", path: ["instructed", "mode"] },
|
|
75
77
|
{ key: "scoped_grants.protect_instructions", group: "Permissions", label: "Ask before writing instruction files", type: "boolean", store: "config", applies: "live", risk: "raises", floor: true, path: ["protect_instruction_files"] },
|
|
76
78
|
...SETTING_PEERS.map((peer): SettingDef => ({ key: `roster.${peer}`, group: "Roster", label: `${peer}: participates`, type: "boolean", store: "config", applies: "live", risk: "raises", floor: false, path: ["roster", peer] })),
|
|
77
79
|
{ key: "action_policy.enabled", group: "Permissions", label: "Always-ask action policy", type: "boolean", store: "config", applies: "live", risk: "raises", floor: true, path: ["action_policy", "enabled"] },
|
|
@@ -105,7 +107,7 @@ export const SETTINGS: readonly SettingDef[] = [
|
|
|
105
107
|
* Never editable from settings, whatever the session: these choose what the hub executes or where secrets and task
|
|
106
108
|
* text go. A key equal to an entry, or below it, is refused by name.
|
|
107
109
|
*/
|
|
108
|
-
export const NEVER_EDITABLE = ["invocation", "kimi_cmd", "qwen_cmd", "jcode_cmd", "jcode_home", "jcode_provider_profile", "codex_bin", "pi.cmd", "checks", "mlx", "omniroute", "memory.worker_url", "local.read_allow", "local.bash_network", "local.network_allow", "bench.enabled", "terminal", "schedules", "folder_triggers", "corpus", "rooms", "instances", "adapters", "adapter_modules", "local.doc_read", "local.web_fetch"] as const;
|
|
110
|
+
export const NEVER_EDITABLE = ["invocation", "kimi_cmd", "qwen_cmd", "jcode_cmd", "jcode_home", "jcode_mcp_allow", "jcode_provider_profile", "codex_bin", "pi.cmd", "checks", "mlx", "omniroute", "memory.worker_url", "local.read_allow", "local.bash_network", "local.network_allow", "bench.enabled", "terminal", "schedules", "folder_triggers", "corpus", "rooms", "instances", "adapters", "adapter_modules", "local.doc_read", "local.web_fetch"] as const;
|
|
109
111
|
|
|
110
112
|
/**
|
|
111
113
|
* The one key `ahub learn accept` writes (#514b): the active profile's review checklist, which replaces as a unit. It is NOT a row of `SETTINGS` and `settingDef` does NOT resolve it, so
|
package/src/hub/snapshots.ts
CHANGED
|
@@ -708,7 +708,7 @@ export class Turns {
|
|
|
708
708
|
// Opened by a starting hub: a turn still open was cut short when the last run stopped. It has no end snapshot, and
|
|
709
709
|
// it may have run until now, so its window ends now (other turns that overlapped it stay unknowable).
|
|
710
710
|
this.db.query("UPDATE turns SET ended = ? WHERE ended IS NULL").run(Date.now());
|
|
711
|
-
//
|
|
711
|
+
// Rows of a task that reached approved or cancelled are pruned by the daemon (#1555 AC6, `pruneTouches`).
|
|
712
712
|
this.db.run("CREATE TABLE IF NOT EXISTS touches (task INTEGER NOT NULL, peer TEXT NOT NULL, path TEXT NOT NULL, at INTEGER NOT NULL, PRIMARY KEY (task, peer, path))");
|
|
713
713
|
this.db.run("CREATE INDEX IF NOT EXISTS touches_path ON touches (path)"); // the PreToolUse hook looks up one path
|
|
714
714
|
this.db.run("CREATE TABLE IF NOT EXISTS turn_workspaces (turn TEXT PRIMARY KEY, root TEXT NOT NULL, start_tree TEXT, end_tree TEXT, changed TEXT NOT NULL DEFAULT '[]')");
|
|
@@ -836,6 +836,18 @@ export class Turns {
|
|
|
836
836
|
if (!tasks.length) return [];
|
|
837
837
|
return this.db.query(`SELECT * FROM touches WHERE task IN (${tasks.map(() => "?").join(",")})`).all(...tasks) as Touch[];
|
|
838
838
|
}
|
|
839
|
+
/** #1555 AC6: a closed task's rows go. Every reader (conflicts, check-path, owner-write evidence) looks at open tasks only, and the counts the metrics read are frozen in history. */
|
|
840
|
+
pruneTouches(tasks: number[]): number {
|
|
841
|
+
if (!tasks.length) return 0;
|
|
842
|
+
let removed = 0;
|
|
843
|
+
this.db.transaction(() => { for (const id of tasks) removed += this.db.query("DELETE FROM touches WHERE task = ?").run(id).changes; })();
|
|
844
|
+
return removed;
|
|
845
|
+
}
|
|
846
|
+
/** Rows of tasks that closed while no hub ran, or before this pass existed: the ids with a row are asked about, and `closed` says which are terminal. */
|
|
847
|
+
pruneClosedTouches(closed: (task: number) => boolean): number {
|
|
848
|
+
const ids = (this.db.query("SELECT DISTINCT task FROM touches").all() as { task: number }[]).map(row => row.task).filter(closed);
|
|
849
|
+
return this.pruneTouches(ids);
|
|
850
|
+
}
|
|
839
851
|
/** Other peers with a turn that was open at some point since `since`: their changes may be in this turn's diff. */
|
|
840
852
|
busySince(peer: string, since: number): string[] {
|
|
841
853
|
return (this.db.query("SELECT DISTINCT peer FROM turns WHERE peer != ? AND (ended IS NULL OR ended >= ?) ORDER BY peer").all(peer, since) as { peer: string }[]).map((r) => r.peer);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { closeSync,
|
|
1
|
+
import { closeSync, openSync, readSync } from "node:fs";
|
|
2
2
|
import { StringDecoder } from "node:string_decoder";
|
|
3
3
|
import { parseEventLine, type StampedEvent } from "./events.ts";
|
|
4
|
+
import { segmentsOf } from "./log-rotation.ts";
|
|
4
5
|
|
|
5
6
|
const STARTUP_EVENT_BUFFER_BYTES = 64 * 1024;
|
|
6
7
|
export interface StartupEventSeeds {
|
|
@@ -16,11 +17,12 @@ export interface StartupEventSeeds {
|
|
|
16
17
|
/** One streaming pass, retaining every accepted row and every historical dedupe key. */
|
|
17
18
|
export function readStartupEventSeeds(file: string, options: { bufferBytes?: number } = {}): StartupEventSeeds {
|
|
18
19
|
const seeds: StartupEventSeeds = { events: [], complete: true, nativeStopsSeen: new Set(), claudeNativeUsageSeen: new Set(), readPasses: 0, readBytes: 0 };
|
|
19
|
-
|
|
20
|
+
const segments = segmentsOf(file); // #1546: rotated segments first, then the live file, so a restart still sees every dedupe key the kept history holds
|
|
21
|
+
if (!segments.length) return seeds;
|
|
20
22
|
// Host-only chunk-boundary test seam, never a line, history or total-byte ceiling.
|
|
21
23
|
const bufferBytes = options.bufferBytes ?? STARTUP_EVENT_BUFFER_BYTES;
|
|
22
24
|
if (!Number.isSafeInteger(bufferBytes) || bufferBytes < 1) throw new Error("startup event buffer must be a positive integer; use the default reader buffer");
|
|
23
|
-
const decoder = new StringDecoder("utf8"), buffer = Buffer.alloc(bufferBytes)
|
|
25
|
+
const decoder = new StringDecoder("utf8"), buffer = Buffer.alloc(bufferBytes);
|
|
24
26
|
let parts: string[] = [];
|
|
25
27
|
const accept = (line: string) => {
|
|
26
28
|
const event = parseEventLine(line);
|
|
@@ -37,17 +39,21 @@ export function readStartupEventSeeds(file: string, options: { bufferBytes?: num
|
|
|
37
39
|
}
|
|
38
40
|
if (start < text.length) parts.push(text.slice(start));
|
|
39
41
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
seeds.readPasses++;
|
|
43
|
+
for (const segment of segments) {
|
|
44
|
+
let fd: number;
|
|
45
|
+
try { fd = openSync(segment.path, "r"); } catch { seeds.complete = false; continue; }
|
|
46
|
+
try {
|
|
47
|
+
for (;;) {
|
|
48
|
+
const bytes = readSync(fd, buffer, 0, buffer.length, null);
|
|
49
|
+
if (!bytes) break;
|
|
50
|
+
seeds.readBytes += bytes;
|
|
51
|
+
consume(decoder.write(buffer.subarray(0, bytes)));
|
|
52
|
+
}
|
|
53
|
+
consume(decoder.end());
|
|
54
|
+
} finally { closeSync(fd); }
|
|
49
55
|
// readEvents also accepts a complete final JSON record without a newline.
|
|
50
|
-
if (parts.length) { seeds.complete = false; accept(parts.join("")); }
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
if (parts.length) { seeds.complete = false; accept(parts.join("")); parts = []; }
|
|
57
|
+
}
|
|
58
|
+
return seeds;
|
|
53
59
|
}
|
|
@@ -3,7 +3,9 @@ export const STARTUP_PHASES = [
|
|
|
3
3
|
"schema", "source", "configuration", "control", "recovery", "journal", "bus", "memory", "model_runtime", "board",
|
|
4
4
|
"task_checks", "task_ports", "task_board", "task_recovery",
|
|
5
5
|
"task_runtime", "native_stop_seed", "budget", "usage_seed", "usage_rollup", "token_runtime", "token_seed",
|
|
6
|
-
"services", "transcript_usage_seed", "ready",
|
|
6
|
+
"services", "transcript_usage_seed", "ready",
|
|
7
|
+
// #1445: the steps between ready and the end of start, each its own boundary; `post_ready` keeps what follows the last of them.
|
|
8
|
+
"post_ready_handoff", "post_ready_queue", "post_ready_watch", "post_ready_reconcile", "post_ready_goals", "post_ready_leases", "post_ready_crash", "post_ready_pi", "post_ready_drift", "post_ready",
|
|
7
9
|
] as const;
|
|
8
10
|
export type StartupPhase = typeof STARTUP_PHASES[number];
|
|
9
11
|
|
|
@@ -243,6 +243,7 @@ export class SupervisionProposals {
|
|
|
243
243
|
async observe(task: number): Promise<SupervisionProposal[]> {
|
|
244
244
|
if (this.ports.isPrivate(task)) return [];
|
|
245
245
|
const facts = await this.ports.facts(task);
|
|
246
|
+
if (this.ports.isPrivate(task)) return [];
|
|
246
247
|
const side = facts.tasks.find((candidate) => candidate.id === task);
|
|
247
248
|
if (!side) return [];
|
|
248
249
|
const at = this.ports.now(), evaluation = evaluateSupervision(facts);
|
|
@@ -252,7 +253,11 @@ export class SupervisionProposals {
|
|
|
252
253
|
const reading = evaluation.observations.filter((observation) => observation.task === task && !observation.limits.truncated);
|
|
253
254
|
if (!clipped) {
|
|
254
255
|
const fresh = new Set(reading.map(proposalKey));
|
|
255
|
-
const
|
|
256
|
+
const covered = new Set(evaluation.evaluated.filter((entry) => entry.task === task).map((entry) => `${entry.rule}:${entry.revision}`));
|
|
257
|
+
const stale = this.store.pendingFor(task).filter((proposal) => {
|
|
258
|
+
const editRule = proposal.rule === "unverified_shell_write" || proposal.rule === "cascading_edit_after_failed_check";
|
|
259
|
+
return !fresh.has(proposal.key) && (!editRule || proposal.revision !== taskRevision(side).revision || covered.has(`${proposal.rule}:${proposal.revision}`));
|
|
260
|
+
}).map((proposal) => proposal.id);
|
|
256
261
|
if (stale.length) this.store.expire(stale, "hub", at);
|
|
257
262
|
}
|
|
258
263
|
const added: SupervisionProposal[] = [];
|
|
@@ -330,7 +335,10 @@ export class SupervisionProposals {
|
|
|
330
335
|
if (taskRevision(side).revision !== proposal.revision) return this.stale(proposal, "the task moved to another revision");
|
|
331
336
|
if (this.ports.generation(proposal.task) !== proposal.generation) return this.stale(proposal, "the native session it was read under was replaced");
|
|
332
337
|
// Recheck the input identity immediately before any effect: the same reading has to still hold now.
|
|
333
|
-
|
|
338
|
+
const reading = evaluateSupervision(facts);
|
|
339
|
+
if ((proposal.rule === "unverified_shell_write" || proposal.rule === "cascading_edit_after_failed_check")
|
|
340
|
+
&& !reading.evaluated.some(entry => entry.task === proposal.task && entry.rule === proposal.rule && entry.revision === proposal.revision)) return { ok: false, error: "edit evidence unavailable; the proposal stays pending" };
|
|
341
|
+
if (!reading.observations.some((observation) => proposalKey(observation) === proposal.key)) return this.stale(proposal, "the reading changed: new input replaced this proposal");
|
|
334
342
|
if (this.ports.held(proposal.task)) return { ok: false, error: "the owner has a needs_review delivery; resolve it before acting on this proposal" };
|
|
335
343
|
// Authority is read again after the await: the board can move while the facts are being read, and a role or a
|
|
336
344
|
// session that went away in that window must not run anything.
|
|
@@ -13,15 +13,18 @@ import type { DeliverableRecord } from "./deliverables.ts";
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
export const SUPERVISION_RULES = ["repeated_failure", "deliverable_invalidated_check", "declared_overlap_without_integration"] as const;
|
|
16
|
-
|
|
16
|
+
/** Additive edit rules are evaluated only when a host supplies edit evidence. */
|
|
17
|
+
export const EDIT_SUPERVISION_RULES = ["unverified_shell_write", "cascading_edit_after_failed_check"] as const;
|
|
18
|
+
export const ALL_SUPERVISION_RULES = [...SUPERVISION_RULES, ...EDIT_SUPERVISION_RULES] as const;
|
|
19
|
+
export type SupervisionRuleId = (typeof ALL_SUPERVISION_RULES)[number];
|
|
17
20
|
/** Bump one rule when its trigger, refs or reason codes change meaning: a stored observation names the version it was made under. */
|
|
18
|
-
export const SUPERVISION_RULE_VERSION: Readonly<Record<SupervisionRuleId, number>> = { repeated_failure: 1, deliverable_invalidated_check: 2, declared_overlap_without_integration: 1 };
|
|
21
|
+
export const SUPERVISION_RULE_VERSION: Readonly<Record<SupervisionRuleId, number>> = { repeated_failure: 1, deliverable_invalidated_check: 2, declared_overlap_without_integration: 1, unverified_shell_write: 1, cascading_edit_after_failed_check: 1 };
|
|
19
22
|
|
|
20
23
|
/** The existing hub operation an observation names. T1 names one; nothing in this module runs it. */
|
|
21
24
|
export const SUPERVISION_ACTIONS = ["escalate", "recheck", "request_integration"] as const;
|
|
22
25
|
export type SupervisionAction = (typeof SUPERVISION_ACTIONS)[number];
|
|
23
26
|
/** Closed reason codes: an observation says why it fired in a token, never in prose. */
|
|
24
|
-
export const SUPERVISION_REASONS = ["repeated_failure", "stale_check", "unintegrated_overlap"] as const;
|
|
27
|
+
export const SUPERVISION_REASONS = ["repeated_failure", "stale_check", "unintegrated_overlap", "unverified_shell_write", "cascading_edit_after_failed_check"] as const;
|
|
25
28
|
export type SupervisionReasonCode = (typeof SUPERVISION_REASONS)[number];
|
|
26
29
|
/** Why a rule could not decide for one task and revision. A gap is not a trigger and never a zero. */
|
|
27
30
|
export const SUPERVISION_GAPS = ["no-history", "no-deliverable-measurement", "history-truncated"] as const;
|
|
@@ -96,10 +99,14 @@ export interface SupervisionEvaluation {
|
|
|
96
99
|
evaluated: EvaluatedRevision[];
|
|
97
100
|
}
|
|
98
101
|
|
|
102
|
+
/** Text-free, in-memory edit evidence bound to an owner revision. */
|
|
103
|
+
export interface EditRevisionFact { task: number; revision: string; unverified: number; cascading: number }
|
|
104
|
+
|
|
99
105
|
export interface SupervisionFacts {
|
|
100
106
|
tasks: readonly TaskRevisionFacts[];
|
|
101
107
|
deliverables?: readonly DeliverableMeasurementFact[];
|
|
102
108
|
overlaps?: readonly DeclaredOverlapFact[];
|
|
109
|
+
edits?: readonly EditRevisionFact[];
|
|
103
110
|
}
|
|
104
111
|
|
|
105
112
|
/** Records one rule reads from one revision. A longer revision is read as a prefix and the observation says `truncated`. */
|
|
@@ -287,6 +294,22 @@ export function evaluateSupervision(facts: SupervisionFacts): SupervisionEvaluat
|
|
|
287
294
|
if (!repeated.length) gaps.push(gapOf("repeated_failure", side.task.id, side.revision, "history-truncated"));
|
|
288
295
|
if (!check.observation && !check.gap) gaps.push(gapOf("deliverable_invalidated_check", side.task.id, side.revision, "history-truncated"));
|
|
289
296
|
}
|
|
297
|
+
for (const edit of facts.edits ?? []) {
|
|
298
|
+
const side = sides.get(edit.task);
|
|
299
|
+
if (!side || isClosedTaskState(side.task.state) || side.revision !== edit.revision) continue;
|
|
300
|
+
const rules = [
|
|
301
|
+
{ rule: "unverified_shell_write" as const, count: edit.unverified },
|
|
302
|
+
{ rule: "cascading_edit_after_failed_check" as const, count: edit.cascading },
|
|
303
|
+
];
|
|
304
|
+
for (const item of rules) {
|
|
305
|
+
if (!Number.isSafeInteger(item.count) || item.count < 0) continue;
|
|
306
|
+
evaluated.push({ rule: item.rule, task: side.task.id, revision: side.revision });
|
|
307
|
+
if (side.limits.truncated) { gaps.push(gapOf(item.rule, side.task.id, side.revision, "history-truncated")); continue; }
|
|
308
|
+
if (item.count < REPEAT_FLOOR) continue;
|
|
309
|
+
observations.push({ rule: item.rule, version: SUPERVISION_RULE_VERSION[item.rule], task: side.task.id, revision: side.revision,
|
|
310
|
+
trigger: item.rule, refs: [], limits: side.limits, action: "recheck", reason: item.rule });
|
|
311
|
+
}
|
|
312
|
+
}
|
|
290
313
|
for (const overlap of facts.overlaps ?? []) {
|
|
291
314
|
const pair = unintegratedOverlap(overlap, sides);
|
|
292
315
|
if (pair.evaluated) evaluated.push(pair.evaluated);
|
package/src/hub/supervision.ts
CHANGED
|
@@ -84,6 +84,13 @@ export class SupervisionFeed {
|
|
|
84
84
|
return this.send(`task:${id}:${milestone}`, bits.join("; "), "status", id);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
/** R4: only ids and the fixed rule number enter the conductor's feed. */
|
|
88
|
+
roadmapFinding(taskId: number, milestone: number | null, rule: number, marker: string): boolean {
|
|
89
|
+
const task = this.d.tasks().find(row => row.id === taskId);
|
|
90
|
+
if (!task || !this.includes(task) || this.d.isPrivate(task) || milestone !== null && (!Number.isSafeInteger(milestone) || milestone < 1) || !Number.isSafeInteger(rule) || rule < 1 || rule > 8 || !/^[a-f0-9]{64}$/.test(marker)) return false;
|
|
91
|
+
return this.send(`roadmap:${marker}`, `roadmap${milestone === null ? "" : ` milestone ${milestone}`}, task ${taskId}: drift rule ${rule}; inspect ahub roadmap check`, "status", taskId);
|
|
92
|
+
}
|
|
93
|
+
|
|
87
94
|
/** Only structured history metadata is read; notes may contain private content. */
|
|
88
95
|
taskChanged(task: Task, entry: HistoryEntry, metadata: SupervisionFields = {}): void {
|
|
89
96
|
const fields: SupervisionFields = { by: entry.by, owner: task.owner, ...(entry.reason ? { reason: entry.reason } : {}), ...metadata };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { SdlcGh } from "./sdlc.ts";
|
|
2
|
+
import { GITHUB_PAGE_SIZE, GITHUB_READ_DEADLINE_MS } from "./github-import.ts";
|
|
3
|
+
|
|
4
|
+
/** Create or recover one PR for a previously pushed, host-verified managed branch. */
|
|
5
|
+
export async function managedTaskPullRequest(input: { repo: string; branch: string; commit: string; task: number; title?: string; issue?: number; current: () => void }, run: SdlcGh): Promise<number> {
|
|
6
|
+
const { repo, branch, commit, task, title, issue, current } = input;
|
|
7
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9-]{0,38}\/[A-Za-z0-9_.-]{1,100}$/.test(repo) || !Number.isSafeInteger(task) || task < 1 || !/^task\/[1-9][0-9]*-[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/.test(branch) || !branch.startsWith(`task/${task}-`) || !/^[a-f0-9]{40}$/.test(commit) || issue !== undefined && (!Number.isSafeInteger(issue) || issue < 1)) throw new Error("managed PR identity is invalid; inspect the task and retry");
|
|
8
|
+
const target = `github.com/${repo}`;
|
|
9
|
+
const deadline = performance.now() + GITHUB_READ_DEADLINE_MS;
|
|
10
|
+
const call: SdlcGh = async (args, timeout, cwd, cap) => {
|
|
11
|
+
current(); const remaining = deadline - performance.now();
|
|
12
|
+
if (remaining <= 0) throw new Error("managed PR operation timed out; inspect GitHub before retrying hub_task_done");
|
|
13
|
+
const result = await run(args, Math.min(timeout ?? remaining, remaining), cwd, cap); current();
|
|
14
|
+
if (performance.now() > deadline) throw new Error("managed PR operation timed out; inspect GitHub before retrying hub_task_done");
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
const lookup = async (): Promise<{ number: number; draft: boolean } | undefined> => {
|
|
18
|
+
const reply = await call(["pr", "list", "--repo", target, "--state", "open", "--head", branch, "--limit", String(GITHUB_PAGE_SIZE), "--json", "number,headRefName,headRefOid,headRepository,isCrossRepository,isDraft,state"], 10_000, undefined, 256 * 1024);
|
|
19
|
+
if (reply.code !== 0) throw new Error("managed PR lookup unavailable; inspect GitHub and retry hub_task_done");
|
|
20
|
+
let rows: unknown; try { rows = JSON.parse(reply.stdout); } catch { throw new Error("managed PR lookup malformed; inspect GitHub and retry hub_task_done"); }
|
|
21
|
+
if (!Array.isArray(rows) || rows.length >= GITHUB_PAGE_SIZE) throw new Error("managed PR lookup incomplete; inspect GitHub and retry hub_task_done");
|
|
22
|
+
if (!rows.length) return undefined;
|
|
23
|
+
if (rows.length !== 1) throw new Error("managed branch has multiple open PRs; inspect GitHub before retrying");
|
|
24
|
+
const row = rows[0];
|
|
25
|
+
const name = (value: unknown) => value && typeof value === "object" && typeof (value as { nameWithOwner?: unknown }).nameWithOwner === "string" ? (value as { nameWithOwner: string }).nameWithOwner.toLowerCase() : undefined;
|
|
26
|
+
if (!Number.isSafeInteger(row?.number) || row.number < 1 || row.state !== "OPEN" || row.headRefName !== branch || row.headRefOid !== commit || typeof row.isDraft !== "boolean" || row.isCrossRepository !== false || name(row.headRepository) !== repo.toLowerCase()) throw new Error("managed PR identity or head is unavailable; inspect GitHub before retrying");
|
|
27
|
+
return { number: row.number, draft: row.isDraft };
|
|
28
|
+
};
|
|
29
|
+
let found = await lookup();
|
|
30
|
+
if (!found) {
|
|
31
|
+
const meta = await call(["api", `repos/${repo}`, "--hostname", "github.com", "--jq", ".default_branch"], 10_000, undefined, 4096);
|
|
32
|
+
const base = meta.stdout.trim();
|
|
33
|
+
if (meta.code !== 0 || !/^[A-Za-z0-9][A-Za-z0-9._/-]{0,199}$/.test(base) || base.includes("..") || base.endsWith("/")) throw new Error("managed PR base branch unavailable; inspect GitHub before retrying");
|
|
34
|
+
const body = [`hub task ${task}`, ...(issue === undefined ? [] : [`Refs #${issue}`])].join("\n\n");
|
|
35
|
+
const created = await call(["pr", "create", "--repo", target, "--head", branch, "--base", base, "--title", title || `hub task ${task}`, "--body", body, "--draft"], 10_000, undefined, 4096);
|
|
36
|
+
if (created.code !== 0) throw new Error("managed PR creation was not confirmed; inspect GitHub before retrying hub_task_done");
|
|
37
|
+
found = await lookup();
|
|
38
|
+
if (!found) throw new Error("managed PR creation was not found; inspect GitHub before retrying hub_task_done");
|
|
39
|
+
}
|
|
40
|
+
if (found.draft) {
|
|
41
|
+
const ready = await call(["pr", "ready", String(found.number), "--repo", target], 10_000, undefined, 4096);
|
|
42
|
+
if (ready.code !== 0) throw new Error("managed PR readiness was not confirmed; inspect GitHub before retrying hub_task_done");
|
|
43
|
+
const verified = await lookup();
|
|
44
|
+
if (!verified || verified.number !== found.number || verified.draft) throw new Error("managed PR readiness or head changed; inspect GitHub before retrying hub_task_done");
|
|
45
|
+
}
|
|
46
|
+
return found.number;
|
|
47
|
+
}
|
package/src/hub/task-worktree.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type { DependencyPreparation } from "../pi/task-dependencies.ts";
|
|
|
13
13
|
/**
|
|
14
14
|
* #1115: a hub-sandboxed peer (Pi, the local worker) cannot run `git worktree add` or commit, because its profile refuses `.git` writes that
|
|
15
15
|
* matter (#270). The hub makes the task worktree for it at the fixed root `.worktrees/<peer>-<task>`, the peer edits files there, and the hub
|
|
16
|
-
* stages, commits and pushes at `hub_task_done
|
|
16
|
+
* stages, commits and pushes at `hub_task_done` or before an isolated check. The sandbox profile is NOT changed. It already lets a sandboxed command write
|
|
17
17
|
* `.git/worktrees/<name>/{HEAD,index}` and `.git/refs/heads` (#864 only closes config, hooks, commondir and packs), so this module never trusts
|
|
18
18
|
* what the peer could have written there: the base commit is recorded at creation, and a hub commit needs the worktree still registered at
|
|
19
19
|
* its path, HEAD still the task branch, and the branch tip still the recorded base (or the hub's own previous commit).
|
|
@@ -31,7 +31,7 @@ export const taskWorktreeBranch = (peer: PeerId, task: number): string => `task/
|
|
|
31
31
|
export interface TaskWorktreeEntry { peer: string; task: number; path: string; branch: string; base: string; /** The hub's own last commit on the branch, once it made one. */ head?: string }
|
|
32
32
|
export type TaskWorktreeAvailability = { ok: true } | { ok: false; reason: string; next: string };
|
|
33
33
|
export type TaskWorktreeResult = { ok: true; path: string; branch: string; base: string; created: boolean } | { ok: false; reason: string };
|
|
34
|
-
export type TaskWorktreeCommit = { ok: true; commit: string; branch: string; pushed: boolean; note?: string } | { ok: false; reason: string; commit?: string };
|
|
34
|
+
export type TaskWorktreeCommit = { ok: true; commit: string; branch: string; pushed: boolean; note?: string } | { ok: false; reason: string; commit?: string; uncertain?: true };
|
|
35
35
|
export interface TaskWorktreeRemoval { removed: boolean; branchDeleted: boolean; kept?: string }
|
|
36
36
|
|
|
37
37
|
export interface TaskWorktreePort {
|
|
@@ -43,7 +43,7 @@ export interface TaskWorktreePort {
|
|
|
43
43
|
prepareDependencies?(input: { peer: PeerId; task: number; current: () => boolean }): Promise<void>;
|
|
44
44
|
preparesDependencies?(peer: PeerId): boolean;
|
|
45
45
|
dependencyState?(peer: PeerId, task: number): DependencyPreparation | undefined;
|
|
46
|
-
commitAndPush(input: { peer: PeerId; task: number; title: string }): Promise<TaskWorktreeCommit>;
|
|
46
|
+
commitAndPush(input: { peer: PeerId; task: number; title: string; current?: () => boolean }): Promise<TaskWorktreeCommit>;
|
|
47
47
|
remove(input: { peer: PeerId; task: number }): TaskWorktreeRemoval;
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -255,16 +255,19 @@ export class TaskWorktrees implements TaskWorktreePort {
|
|
|
255
255
|
return { ok: true, path, branch, base, created: true };
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
/** One hub commit at a time per worktree: a repeated or parallel `hub_task_done` queues behind the first. */
|
|
259
|
-
commitAndPush(input: { peer: PeerId; task: number; title: string }): Promise<TaskWorktreeCommit> {
|
|
258
|
+
/** One hub commit at a time per worktree: a repeated or parallel check or `hub_task_done` queues behind the first. */
|
|
259
|
+
commitAndPush(input: { peer: PeerId; task: number; title: string; current?: () => boolean }): Promise<TaskWorktreeCommit> {
|
|
260
260
|
const next = this.chain.then(() => this.commit(input), () => this.commit(input));
|
|
261
261
|
this.chain = next.catch(() => undefined);
|
|
262
262
|
return next;
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
private async commit(input: { peer: PeerId; task: number; title: string }): Promise<TaskWorktreeCommit> {
|
|
265
|
+
private async commit(input: { peer: PeerId; task: number; title: string; current?: () => boolean }): Promise<TaskWorktreeCommit> {
|
|
266
266
|
const { peer, task } = input;
|
|
267
|
-
const
|
|
267
|
+
const current = () => !input.current || input.current();
|
|
268
|
+
let uncertain = false;
|
|
269
|
+
const fail = (reason: string, commit?: string): TaskWorktreeCommit => ({ ok: false, reason, ...(commit ? { commit } : {}), ...(uncertain ? { uncertain: true as const } : {}) });
|
|
270
|
+
if (!current()) return fail("task authority changed before the worktree commit");
|
|
268
271
|
let records: Record<string, TaskWorktreeEntry>;
|
|
269
272
|
try { records = this.readRecords(); } catch (error) { return fail((error as Error).message); }
|
|
270
273
|
const entry = records[this.key(peer, task)];
|
|
@@ -296,8 +299,9 @@ export class TaskWorktrees implements TaskWorktreePort {
|
|
|
296
299
|
if (raw.status !== 0) return fail("the staged change could not be listed");
|
|
297
300
|
const parts = raw.stdout.split("\0").filter(Boolean), changed: { mode: string; path: string }[] = [];
|
|
298
301
|
for (let i = 0; i + 1 < parts.length; i += 2) { const meta = /^:(\d{6}) (\d{6}) /.exec(parts[i]!); if (!meta) return fail("the staged change has an unreadable entry"); changed.push({ mode: meta[2]!, path: parts[i + 1]! }); }
|
|
302
|
+
if (!current()) return fail("task authority changed before the worktree commit");
|
|
299
303
|
// Nothing new since the hub's own commit: this is a retry after a failed push, so push the commit it already made.
|
|
300
|
-
if (!changed.length && entry.head) return this.push(path, branch, entry.head, peer);
|
|
304
|
+
if (!changed.length && entry.head) return this.push(path, branch, entry.head, peer, current);
|
|
301
305
|
if (!changed.length) return fail(`no changes under ${path}: edit files there, then call hub_task_done again`);
|
|
302
306
|
if (changed.length > MAX_PATHS) return fail(`${changed.length} paths changed, more than the ${MAX_PATHS} the hub commits for a sandboxed peer; split the work into smaller tasks`);
|
|
303
307
|
// 3. The same path policy a person's grant uses: the denylist, the agent and hub write names, and (when the policy is on) the instruction files.
|
|
@@ -305,8 +309,10 @@ export class TaskWorktrees implements TaskWorktreePort {
|
|
|
305
309
|
const refused = changed.filter(c => c.mode === "160000" || isDenied(c.path, deny) || !grantablePath(path, join(path, c.path), c.path, protect));
|
|
306
310
|
if (refused.length) return fail(`the hub will not commit ${refused.length} changed path${refused.length === 1 ? "" : "s"} (${refused.slice(0, 3).map(c => shown(c.path, 60)).join(", ")}): a secret, a git or hub or agent configuration name, a protected instruction file or a submodule. Revert ${refused.length === 1 ? "it" : "them"} in the worktree and call hub_task_done again`);
|
|
307
311
|
this.o.beforeCommit?.();
|
|
312
|
+
if (!current()) return fail("task authority changed before the worktree commit");
|
|
308
313
|
// 4. The commit object is made from the validated tree by the hub (no hook, no signing, no index read), and the branch moves to it only if it still sits at the recorded tip.
|
|
309
314
|
const title = shown(input.title, 200) || `task ${task}`;
|
|
315
|
+
uncertain = true; // Git may have written an object or moved the branch even if a later step fails.
|
|
310
316
|
const made = this.git(["-c", `user.name=${peer}`, "-c", `user.email=${peer}@agent-hub.invalid`, "-c", "commit.gpgSign=false", "commit-tree", tree, "-p", expectedTip, "-m", title, "-m", `Task #${task} by ${peer}. Committed by the hub for a sandboxed peer.`], path), commit = made.stdout.trim();
|
|
311
317
|
if (made.status !== 0 || !SHA.test(commit)) return fail(`git commit-tree failed: ${shown(made.stderr)}`);
|
|
312
318
|
if (this.git(["update-ref", `refs/heads/${branch}`, commit, expectedTip], path).status !== 0) return fail(`${branch} moved while the hub was committing; nothing was kept. Decline the task so the hub clears it`);
|
|
@@ -315,13 +321,14 @@ export class TaskWorktrees implements TaskWorktreePort {
|
|
|
315
321
|
// there is clean and `remove` can tell finished work from uncommitted work. Nothing is ever committed from it.
|
|
316
322
|
this.git(["read-tree", commit], path); this.git(["update-index", "-q", "--refresh"], path);
|
|
317
323
|
try { this.mutate(current => { current[this.key(peer, task)] = { ...(current[this.key(peer, task)] ?? entry), head: commit }; }); } catch { return fail("the commit was made but the hub could not record it; call hub_task_done again", commit); }
|
|
318
|
-
return this.push(path, branch, commit, peer);
|
|
324
|
+
return this.push(path, branch, commit, peer, current);
|
|
319
325
|
} finally { rmSync(index, { force: true }); }
|
|
320
326
|
}
|
|
321
327
|
|
|
322
328
|
/** 5. One explicit refspec for this branch, only to an origin that is this project's repository. */
|
|
323
|
-
private async push(path: string, branch: string, commit: string, _peer: PeerId): Promise<TaskWorktreeCommit> {
|
|
324
|
-
const fail = (reason: string, sha?: string): TaskWorktreeCommit => ({ ok: false, reason, ...(sha ? { commit: sha } : {}) });
|
|
329
|
+
private async push(path: string, branch: string, commit: string, _peer: PeerId, current: () => boolean): Promise<TaskWorktreeCommit> {
|
|
330
|
+
const fail = (reason: string, sha?: string): TaskWorktreeCommit => ({ ok: false, reason, ...(sha ? { commit: sha } : {}), uncertain: true });
|
|
331
|
+
if (!current()) return fail("task authority changed after the worktree commit; the commit was kept", commit);
|
|
325
332
|
if (this.tip(branch) !== commit) return fail(`${branch} no longer points at the hub's commit ${commit.slice(0, 12)}; the hub will not push it. Decline the task so the hub clears it`);
|
|
326
333
|
const urls = [...this.git(["remote", "get-url", "--push", "--all", "origin"], path).stdout.trim().split("\n"), ...this.git(["remote", "get-url", "--all", "origin"], path).stdout.trim().split("\n")].filter(Boolean);
|
|
327
334
|
const verdict = this.o.pushAllowed?.(urls);
|