@feigi/fleet-ctl 3.137.5 → 3.138.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/agents/fleet-finisher.agent.md +8 -8
- package/agents/fleet-fix-applier.agent.md +1 -1
- package/agents/fleet-merge-bot.agent.md +1 -1
- package/agents/fleet-recipe-deriver.agent.md +5 -5
- package/agents/fleet-review-runner.agent.md +1 -1
- package/commands/review-and-fix.md +11 -11
- package/commands/run-merge-bot.md +9 -9
- package/package.json +1 -1
- package/scripts/claim-ticket.sh +1 -1
- package/scripts/controller-alarm.mjs +1 -1
- package/scripts/evict-mark.mjs +1 -1
- package/scripts/finisher-audit.mjs +1 -1
- package/scripts/finisher-label.mjs +1 -1
- package/scripts/finisher-tree.mjs +1 -1
- package/scripts/fleet-provenance +9 -52
- package/scripts/fleet-run +5 -10
- package/scripts/fleet-tick.mjs +3 -3
- package/scripts/instruments.sh +3 -4
- package/scripts/ledger.mjs +1 -1
- package/scripts/main-checkout.mjs +1 -1
- package/scripts/phase0-receipt.mjs +1 -1
- package/scripts/preflight.mjs +0 -1
- package/scripts/recipe-check.mjs +1 -1
- package/scripts/repo-root.mjs +1 -1
- package/scripts/report-schema.mjs +1 -1
- package/scripts/review-core.mjs +6 -6
- package/scripts/review-eval.mjs +1 -1
- package/scripts/ticketless.mjs +1 -1
- package/skills/next-ticket/SKILL.md +8 -8
- package/skills/run-team/SKILL.md +22 -34
- package/skills/run-team/briefs/finisher.md +2 -2
- package/skills/run-team/briefs/fix-applier.md +9 -9
- package/skills/run-team/briefs/implementer.md +3 -3
- package/skills/run-team/briefs/merge-bot.md +2 -2
- package/skills/run-team/references/ci-and-staleness.md +1 -1
- package/skills/run-team/references/ci-watcher.md +1 -1
- package/skills/run-team/references/close-out.md +5 -5
- package/skills/run-team/references/failure-handling.md +2 -2
- package/skills/run-team/references/finisher.md +2 -2
- package/skills/run-team/references/instruments.md +1 -1
- package/skills/run-team/references/isolation.md +3 -3
- package/skills/run-team/references/ledger.md +1 -1
- package/skills/run-team/references/member-lifecycle.md +1 -1
- package/skills/run-team/references/phase-0.md +20 -20
- package/skills/run-team/references/pull.md +18 -10
- package/skills/run-team/references/reaping.md +13 -1
- package/skills/run-team/references/reviewers.md +9 -1
- package/skills/run-team/references/tick-rows.md +2 -2
- package/skills/sizing-a-ticket/SKILL.md +1 -1
- package/scripts/fleet-bootstrap +0 -140
package/scripts/fleet-bootstrap
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// The Resolver's one-time bootstrap. Places a copy
|
|
3
|
-
// of `fleet-run` at `~/.fleet/bin/fleet-run` — the one artefact this repo
|
|
4
|
-
// owns OUTSIDE the plugin, because the Resolver cannot resolve itself and no
|
|
5
|
-
// per-session mechanism can carry it (nothing survives between harness
|
|
6
|
-
// Bash-tool calls). Idempotent: re-running reports "unchanged" once the
|
|
7
|
-
// placed copy already matches.
|
|
8
|
-
//
|
|
9
|
-
// SOURCE, and the one licensed exception. Every other script's rule is
|
|
10
|
-
// "only installed scripts run" — never a source checkout.
|
|
11
|
-
// This script's source is always ITS OWN sibling `fleet-run`, i.e. whatever
|
|
12
|
-
// directory this file itself is running from. Two shapes exist for that:
|
|
13
|
-
// - run as an INSTALLED script (this file's own directory IS a registry
|
|
14
|
-
// installPath's scripts/ — the steady state, e.g. invoked as
|
|
15
|
-
// `fleet-run fleet-bootstrap` once a Resolver already exists), or
|
|
16
|
-
// - run DIRECTLY FROM A CHECKOUT (this file's own directory is not any
|
|
17
|
-
// registered installPath) — the state the world is actually in the
|
|
18
|
-
// first time this ever runs, since no install anywhere yet carries
|
|
19
|
-
// `scripts/fleet-run`. This exception is licensed exactly once, loudly.
|
|
20
|
-
// This file cannot tell those apart by calling git (that would be exactly
|
|
21
|
-
// the self-location-derives-a-repo pattern every other script is barred from); it
|
|
22
|
-
// tells them apart by comparing its own directory's PARENT against the
|
|
23
|
-
// registries' recorded installPath strings — a plain string compare, no git
|
|
24
|
-
// involved, so it never anchors a git root to its own location.
|
|
25
|
-
"use strict";
|
|
26
|
-
|
|
27
|
-
const fs = require("node:fs");
|
|
28
|
-
const path = require("node:path");
|
|
29
|
-
const os = require("node:os");
|
|
30
|
-
const crypto = require("node:crypto");
|
|
31
|
-
|
|
32
|
-
const NAME = "fleet-bootstrap";
|
|
33
|
-
|
|
34
|
-
function die(message) {
|
|
35
|
-
process.stderr.write(`${NAME}: ${message}\n`);
|
|
36
|
-
process.exit(2);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// The Install root, same resolution point as scripts/fleet-run:
|
|
40
|
-
// the realpath of `~/.omp/plugins/node_modules/@feigi/fleet-ctl`. Absent or
|
|
41
|
-
// dangling answers null, which the caller reports as "omp: not installed".
|
|
42
|
-
function readInstallPath(packagePath) {
|
|
43
|
-
try {
|
|
44
|
-
return fs.realpathSync(packagePath);
|
|
45
|
-
} catch {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function sha256(buf) {
|
|
51
|
-
return crypto.createHash("sha256").update(buf).digest("hex");
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function main() {
|
|
55
|
-
const argv = process.argv.slice(2);
|
|
56
|
-
const fromCheckoutFlag = argv.includes("--from-checkout");
|
|
57
|
-
|
|
58
|
-
const ownDir = __dirname;
|
|
59
|
-
const source = path.join(ownDir, "fleet-run");
|
|
60
|
-
|
|
61
|
-
let sourceBuf;
|
|
62
|
-
try {
|
|
63
|
-
sourceBuf = fs.readFileSync(source);
|
|
64
|
-
} catch (e) {
|
|
65
|
-
die(`cannot read ${source} — bootstrap copies fleet-run from its OWN directory and found nothing there (${e.code || e.message})`);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const home = os.homedir();
|
|
69
|
-
const PLUGIN_KEY = "@feigi/fleet-ctl"; // the plugin's package name, and its node_modules package dir.
|
|
70
|
-
const ompInstall = readInstallPath(path.join(home, ".omp", "plugins", "node_modules", PLUGIN_KEY));
|
|
71
|
-
// Both sides are realpaths — readInstallPath() already resolved the install,
|
|
72
|
-
// and this file's own directory exists, so its parent resolves too — so a
|
|
73
|
-
// path reached through a symlink (macOS /tmp → /private/tmp) compares equal.
|
|
74
|
-
const parent = fs.realpathSync(path.dirname(ownDir));
|
|
75
|
-
const runningFromInstall = parent === ompInstall;
|
|
76
|
-
|
|
77
|
-
const target = path.join(home, ".fleet", "bin", "fleet-run");
|
|
78
|
-
|
|
79
|
-
// The exception is opt-in, not merely announced: a stray checkout run
|
|
80
|
-
// (a wrong branch, a stale worktree) must not silently overwrite the one
|
|
81
|
-
// artefact outside the plugin. Every steady-state invocation — through
|
|
82
|
-
// the Resolver, once it exists — runs from an install and never needs
|
|
83
|
-
// this flag at all.
|
|
84
|
-
if (!runningFromInstall && !fromCheckoutFlag) {
|
|
85
|
-
die(
|
|
86
|
-
`refusing to place ${target} from ${ownDir}, which is not omp's resolved install root (looked at `
|
|
87
|
-
+ `${ompInstall ? `omp: ${ompInstall}` : "omp: not installed"}) — re-run with --from-checkout to take `
|
|
88
|
-
+ "the one-time bootstrap exception explicitly",
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (!runningFromInstall) {
|
|
93
|
-
process.stderr.write(
|
|
94
|
-
`${NAME}: BOOTSTRAP EXCEPTION — running from a source checkout (${ownDir}), not omp's resolved `
|
|
95
|
-
+ "install root (looked at "
|
|
96
|
-
+ `${ompInstall ? `omp: ${ompInstall}` : "omp: not installed"}). `
|
|
97
|
-
+ "This is licensed ONCE, as the Resolver's own bootstrap, because no install anywhere yet carries "
|
|
98
|
-
+ "scripts/fleet-run for an install-root-driven copy to come from. Every other fleet script must run through "
|
|
99
|
-
+ "the Resolver once it exists.\n",
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
104
|
-
|
|
105
|
-
let existingBuf = null;
|
|
106
|
-
try {
|
|
107
|
-
existingBuf = fs.readFileSync(target);
|
|
108
|
-
} catch {
|
|
109
|
-
existingBuf = null;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const changed = existingBuf === null || !existingBuf.equals(sourceBuf);
|
|
113
|
-
if (changed) {
|
|
114
|
-
fs.writeFileSync(target, sourceBuf);
|
|
115
|
-
}
|
|
116
|
-
fs.chmodSync(target, 0o755);
|
|
117
|
-
|
|
118
|
-
const sourceHash = sha256(sourceBuf);
|
|
119
|
-
if (existingBuf === null) {
|
|
120
|
-
process.stdout.write(`${NAME}: wrote ${target} (new, sha256 ${sourceHash})\n`);
|
|
121
|
-
} else if (changed) {
|
|
122
|
-
process.stdout.write(`${NAME}: wrote ${target} (changed: sha256 ${sha256(existingBuf)} -> ${sourceHash})\n`);
|
|
123
|
-
} else {
|
|
124
|
-
process.stdout.write(`${NAME}: unchanged — ${target} already matches ${source} (sha256 ${sourceHash})\n`);
|
|
125
|
-
}
|
|
126
|
-
process.stdout.write(`${NAME}: source ${source}\n`);
|
|
127
|
-
|
|
128
|
-
const pathDirs = (process.env.PATH || "").split(path.delimiter);
|
|
129
|
-
const binDir = path.dirname(target);
|
|
130
|
-
if (pathDirs.includes(binDir)) {
|
|
131
|
-
process.stdout.write(`${NAME}: PATH already includes ${binDir}\n`);
|
|
132
|
-
} else {
|
|
133
|
-
process.stdout.write(
|
|
134
|
-
`${NAME}: PATH does not include ${binDir} — add it yourself if you want to run "fleet-run" bare `
|
|
135
|
-
+ `(e.g. add \`export PATH="${binDir}:$PATH"\` to your shell rc); this script edits no rc file\n`,
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
main();
|