geneseed 5.1.1 → 5.2.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 +25 -0
- package/SHIPPED.md +1 -1
- package/adapters/opencode/README.md +4 -3
- package/adapters/opencode/plugins/geneseed-context.js +26 -19
- package/adapters/opencode/plugins/geneseed-guard.js +112 -7
- package/bin/geneseed-cli.mjs +3 -0
- package/docs/concepts/exclusions.md +1 -1
- package/docs/concepts/host-matrix.md +1 -1
- package/docs/guides/setup-doctrines.md +1 -1
- package/docs/understand/enforced-vs-asked.md +1 -1
- package/harness.config.json +1 -1
- package/js/README.md +6 -4
- package/js/build/args.mjs +7 -1
- package/js/build/bundle.mjs +122 -23
- package/js/build/driver.mjs +32 -12
- package/js/build/emit-claude.mjs +2 -1
- package/js/build/emit-common.mjs +2 -2
- package/js/build/emit-opencode.mjs +22 -10
- package/js/build/export.mjs +431 -0
- package/js/build/generate.mjs +3 -0
- package/js/build/source.mjs +6 -1
- package/js/cli-table.json +99 -0
- package/js/hosts/hooks-done.mjs +8 -2
- package/js/hosts/hooks.mjs +105 -4
- package/js/hosts/hosts.mjs +2 -4
- package/js/hosts/installs.mjs +28 -0
- package/js/hosts/loss.mjs +19 -2
- package/js/hosts/native.mjs +30 -2
- package/js/hosts/owned.mjs +55 -1
- package/js/hosts/ownership-gate.mjs +5 -5
- package/js/hosts/settings.mjs +83 -33
- package/js/lib/managed-block.mjs +74 -0
- package/js/maintain/uninstall.mjs +57 -14
- package/js/web/actions.mjs +3 -0
- package/js/web/api.mjs +4 -1
- package/package.json +1 -1
- package/web/dist/assets/{Activity-CpkBwpu7.js → Activity-DlQ30znB.js} +1 -1
- package/web/dist/assets/{ActivityDetail-DTPziZWM.js → ActivityDetail-CG0mn5fW.js} +1 -1
- package/web/dist/assets/{Bonsai-hiG_gGNU.js → Bonsai-DSwUbavu.js} +1 -1
- package/web/dist/assets/{CopyButton-DUIUfNp6.js → CopyButton-BzRQz7k2.js} +1 -1
- package/web/dist/assets/{Dashboard-Dnw6EyX7.js → Dashboard-Ce3UOsxJ.js} +2 -2
- package/web/dist/assets/{Docs-BEET_l16.js → Docs-CisVnYqv.js} +1 -1
- package/web/dist/assets/{Factories-D6KXkfWw.js → Factories-Dq5oW4CU.js} +1 -1
- package/web/dist/assets/{GreenhouseView-BKxy5apE.js → GreenhouseView-y9WAfcc_.js} +1 -1
- package/web/dist/assets/Installs-m4GElwFW.js +3 -0
- package/web/dist/assets/{JournalView-ChFitHjo.js → JournalView-DeBLRNGc.js} +1 -1
- package/web/dist/assets/{Kits-CcR-OlwQ.js → Kits-DJYVAnyE.js} +1 -1
- package/web/dist/assets/{Laws-B1s5idOg.js → Laws-CNpc_8ZV.js} +1 -1
- package/web/dist/assets/{LibRows-BZgdbI1l.js → LibRows-RO5bvXth.js} +1 -1
- package/web/dist/assets/{Library-x6TkkEVF.js → Library-Dg0ScciC.js} +1 -1
- package/web/dist/assets/{Loops-BH93KKxn.js → Loops-CjEdo-NG.js} +1 -1
- package/web/dist/assets/{OperatorHudView-BO0aIKPL.js → OperatorHudView-2ujVMjq1.js} +1 -1
- package/web/dist/assets/{Personal-CE_0Vhh0.js → Personal-D0yS7ahT.js} +1 -1
- package/web/dist/assets/{Settings-CbpZvVN_.js → Settings-DEN0U8QI.js} +1 -1
- package/web/dist/assets/{Tabs-C2oW7oEj.js → Tabs-But5R6_r.js} +1 -1
- package/web/dist/assets/{index-BQwOmbor.js → index-Ck42AbRX.js} +2 -2
- package/web/dist/assets/{index-CuIop_pO.css → index-PG_ukkh6.css} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/assets/Installs-CnFVlVD0.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,31 @@ label. For the capability ↔ spec map, see [SHIPPED.md](SHIPPED.md).
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [5.2.0] — 2026-11-10
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- **OpenCode: a gate whose rule you switch off is removed from `opencode.json`.** The install manifest now records the `permission.bash` entries Geneseed itself added (`bash_gates`). A rebuild with the process pack off, with *Consent Before Push* excluded or with `--no-deletion-gate` removes the recorded entries that still read as Geneseed wrote them. An entry that was already in the file, or that you changed, stays and is named in the warning. A commented `opencode.jsonc` is still never rewritten: the build names the entries to remove.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- **`geneseed export --out <folder> [--profile <file>]`** writes the skills, the agents and the constitution as catalogue entities for a shared library that is not a Geneseed install: one folder each, with `SKILL.md` or `AGENT.md` (frontmatter `name` and `description` only) and a `metadata.yaml` (type, owner, maintainer, version, status, compatible tools, licence and origin of a credited port, `requires`). A reference to another exported entity takes its exported name and becomes a requirement; a skill's side files move under `references/`; the constitution is one `laws` entity that every citing entity requires, written as one file per category (`ontology.md`, `laws.md`, `doctrines-<pack>.md`) behind a `LAWS.md` index. The profile, a JSON file, carries the library's own values (name prefix, owner, maintainer, folder names, `only`/`exclude`); a git checkout's `export.profile.json` is the default, `--profile none` ignores it, and the npm package does not carry it. One way: `src/` stays the source. Vendored folder skills and aliases are not exported, and are named.
|
|
18
|
+
- **`geneseed build --force`** takes Geneseed's copy of every file it ships, for that one build. It replaces a shipped file you edited and a file of yours at a shipped name, removes a retired file you edited, and removes retired skills an older build left in a bundle. Every file is named. A skill or agent under a name Geneseed does not ship is never touched, nor are memory, the notebook, your rules or your profile. To keep your own file at a shipped name for good, use `--exclude-skills`.
|
|
19
|
+
- **The console says when an install holds files a rebuild keeps.** Each emit records them (`kept` in the manifest, `kept` and `stale` in a bundle's `.geneseed-srcdirs.json`), `/api/installs` returns them as `leftovers`, and the install's panel lists them with a **Replace with Geneseed's copies…** button that runs the forced rebuild behind a confirm naming each file.
|
|
20
|
+
- **`geneseed build --prune-gates`**, for an install made before this release, which has the gates and no record. For that one build it removes every such entry still set as Geneseed writes it; an entry you changed stays. No rebuild replays it. Take the install's `rebuild` command from `geneseed status --json` and add the flag.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
- **OpenCode: the change report is posted once, however many projects are open.** One `opencode serve` loads the guard plugin once per opened project and every instance hears every session, so a rule or memory change was reported once per project: four projects, four identical messages. The instances now share a marker per change, and the first to claim it reports.
|
|
24
|
+
- **A destructive command hidden behind an escaped quote or a line continuation is read as what it is.** `echo 'it'\''s done' && rm -rf /` and `rm -rf \⏎ /` passed every gate, because the gates' lexers treat a backslash as an ordinary character. Every Bash gate, on Claude, Bob and OpenCode, now reads one normalised form of the command (`shellReading`): continuations joined, an escaped quote or separator made inert. PowerShell commands keep their backslashes.
|
|
25
|
+
- **The loss gate no longer looks in the wrong folder after `popd` or a `cd` inside `( … )`.** The directory is unknown from there on, so a relative removal asks.
|
|
26
|
+
- **Consent Before Push asks for a commit or a push, not for the words.** `git log | grep push`, `cat .git/hooks/pre-commit.sample`, `git stash push` and `git diff -- docs/commit-style.md` no longer ask. The ask stands unless every segment is a program that only reads or `git` with a read verb.
|
|
27
|
+
- **The done gate no longer accepts `npm test; echo "exit: $?"`,** a check run in the background (`npm test &`), or one behind `||`.
|
|
28
|
+
- **The managed block is found the same way by every reader.** The hook-side readers and the OpenCode plugins still matched a marker anywhere in a line after the writer stopped doing so; one module now defines it.
|
|
29
|
+
- `tests/mutate.mjs` requires a mode and refuses anything else (`--help` used to start the matrix, which edits product files), and restores a file an interrupted run left mutated.
|
|
30
|
+
- **An OpenCode project install no longer deletes the user's own `agents/`, `skills/`, `laws/` or `AGENT.md` at the repository root.** The bundle now records each file it writes (in `.geneseed-srcdirs.json`) and owns only those: a file already there is kept and named in a warning, a rebuild prunes only recorded files, and uninstall removes only recorded files. Before, the second emit wiped those folders and uninstall deleted them whole. A bundle built by an older version has no record: the next build overwrites what it ships, removes nothing, starts the record, and names any retired skill it left behind (`--force` removes those).
|
|
31
|
+
- **`geneseed uninstall` on an OpenCode project no longer deletes `.opencode/` on a retry.** A file of the user's under `.opencode/` made the first pass report INCOMPLETE with the manifest already removed, and the retry it advised then removed the whole folder. The uninstall now completes in one pass and leaves the user's files, and the whole-folder removal kept for pre-manifest installs runs only where the root still carries a bundle marker.
|
|
32
|
+
- **The managed block in `CLAUDE.md` / `AGENTS.md` is found by whole-line markers.** A sentence that mentioned `<!-- BEGIN GENESEED -->` was taken for the block's start, and the next emit silently deleted everything from that sentence to the real block.
|
|
33
|
+
- **Editing a shipped `SKILL.md` no longer makes the next emit delete that skill's side files and licence files.**
|
|
34
|
+
- `tests/unit/sandbox.test.mjs` no longer fails when run as root.
|
|
35
|
+
|
|
11
36
|
## [5.1.1] — 2026-11-10
|
|
12
37
|
|
|
13
38
|
### Added
|
package/SHIPPED.md
CHANGED
|
@@ -20,7 +20,7 @@ historical references, not files distributed with the repo.
|
|
|
20
20
|
> **On version numbers.** [`harness.config.json`](harness.config.json)'s `version` is a
|
|
21
21
|
> human-readable label only. The canonical identity of an installed harness is the
|
|
22
22
|
> **source fingerprint** stamped in `.geneseed-version` (see `geneseed version`), not the
|
|
23
|
-
> string. Current label: **5.
|
|
23
|
+
> string. Current label: **5.2.0**.
|
|
24
24
|
|
|
25
25
|
## Capabilities
|
|
26
26
|
|
|
@@ -412,9 +412,10 @@ behaviour** — nothing changes the machine's current agent/model unless you opt
|
|
|
412
412
|
agent never records or shares code unprompted, on any branch). Build with
|
|
413
413
|
`--doctrines` leaving `process` out and those two entries are simply not written.
|
|
414
414
|
The whole block is added only when you have no `permission` key; an existing policy is
|
|
415
|
-
reconciled key by key — Geneseed adds back what a returning pack wants and
|
|
416
|
-
|
|
417
|
-
rebuild leaves a `git commit*` you
|
|
415
|
+
reconciled key by key — Geneseed adds back what a returning pack wants and removes
|
|
416
|
+
**only what the manifest records it adding** (`bash_gates`) and that still reads as it
|
|
417
|
+
wrote it. A pack-off rebuild leaves a `git commit*` you typed, or one from an install made
|
|
418
|
+
before 5.2.0, in place and reports it; `--prune-gates` on one build removes the latter. Routine local work
|
|
418
419
|
(edits, builds, tests) is unaffected; to allow frictionless commits/pushes, set
|
|
419
420
|
`"git commit*"` / `"git push*"` to `"allow"` in your own `permission.bash` map. (Note:
|
|
420
421
|
OpenCode lets a user pick "always allow" for the session, which makes the gate
|
|
@@ -1192,7 +1192,8 @@ async function doneLine(dir, judged = true) {
|
|
|
1192
1192
|
const OWN_MANIFESTS = new Set(["package.json", "pom.xml", "pyproject.toml", "go.mod", "Cargo.toml",
|
|
1193
1193
|
"composer.json", "Gemfile"])
|
|
1194
1194
|
const isOwnManifest = (n) => OWN_MANIFESTS.has(n) || n.startsWith("build.gradle") || n.endsWith(".csproj")
|
|
1195
|
-
|
|
1195
|
+
// Whole-line markers: js/lib/managed-block.mjs BLOCK_RE_SOURCE, by value (a plugin imports nothing).
|
|
1196
|
+
const OWN_BLOCK_RE = /^<!-- BEGIN GENESEED -->[ \t]*\r?\n[\s\S]*?^<!-- END GENESEED -->[ \t]*\r?$/gm
|
|
1196
1197
|
const OWN_SECTION_RE = /^## Ownership[ \t]*\r?$/m
|
|
1197
1198
|
const OWN_DECLINED_RE = /^Setup:[ \t]*declined[ \t]+(\d{4}-\d{2}-\d{2})[ \t]*\r?$/m
|
|
1198
1199
|
let ownershipGateOffOnce = null
|
|
@@ -1230,30 +1231,36 @@ async function runtimeFloorLine(dir) {
|
|
|
1230
1231
|
}
|
|
1231
1232
|
|
|
1232
1233
|
function runsUnpiped(command, line) {
|
|
1233
|
-
const cmd = String(command).replace(/[ \t]+/g,
|
|
1234
|
+
const cmd = String(command).replace(/[ \t]+/g, ' ');
|
|
1234
1235
|
for (let i = cmd.indexOf(line); i !== -1; i = cmd.indexOf(line, i + 1)) {
|
|
1235
|
-
const next = cmd[i + line.length]
|
|
1236
|
-
if (next !== undefined && !/[\s;&|]/.test(next)) continue
|
|
1237
|
-
const head = cmd.slice(0, i)
|
|
1238
|
-
|
|
1239
|
-
|
|
1236
|
+
const next = cmd[i + line.length];
|
|
1237
|
+
if (next !== undefined && !/[\s;&|]/.test(next)) continue;
|
|
1238
|
+
const head = cmd.slice(0, i);
|
|
1239
|
+
// Not after `||`: `true || npm test` never runs the check.
|
|
1240
|
+
if (!/(^|&&|(?<!\|)\|(?!\|)|;|\n) ?$/.test(head.replace(/\|\| ?$/, '\u0000'))) continue;
|
|
1241
|
+
let quote = '', esc = false;
|
|
1240
1242
|
for (const ch of head) {
|
|
1241
|
-
if (esc) esc = false
|
|
1242
|
-
else if (ch ===
|
|
1243
|
-
else if (quote) { if (ch === quote) quote =
|
|
1244
|
-
else if (ch === '"' || ch === "'") quote = ch
|
|
1243
|
+
if (esc) esc = false;
|
|
1244
|
+
else if (ch === '\\' && quote !== "'") esc = true;
|
|
1245
|
+
else if (quote) { if (ch === quote) quote = ''; }
|
|
1246
|
+
else if (ch === '"' || ch === "'") quote = ch;
|
|
1245
1247
|
}
|
|
1246
|
-
if (quote) continue
|
|
1247
|
-
const rest = cmd.slice(i + line.length)
|
|
1248
|
-
let piped = false
|
|
1248
|
+
if (quote) continue;
|
|
1249
|
+
const rest = cmd.slice(i + line.length);
|
|
1250
|
+
let piped = false;
|
|
1249
1251
|
for (let j = 0; j < rest.length; j += 1) {
|
|
1250
|
-
const two = rest.slice(j, j + 2)
|
|
1251
|
-
if (two ===
|
|
1252
|
-
if (rest[j] ===
|
|
1252
|
+
const two = rest.slice(j, j + 2);
|
|
1253
|
+
if (two === '&&' || two === '||' || rest[j] === ';' || rest[j] === '\n') break;
|
|
1254
|
+
if (rest[j] === '|') { piped = true; break; }
|
|
1253
1255
|
}
|
|
1254
|
-
|
|
1256
|
+
// MASKED when the line's exit status is not the check's: a `||` after it; behind `;` or a
|
|
1257
|
+
// newline, a command that always succeeds (`true`, `:`, `exit`, and `echo`/`printf`, as in
|
|
1258
|
+
// the common `npm test; echo "exit: $?"`, which exits 0 on a red suite); or a trailing lone
|
|
1259
|
+
// `&`, which backgrounds the check. A real next command is not a mask, and `&&` keeps the status.
|
|
1260
|
+
const masked = /\|\||[;\n] ?(?:true|:|exit(?: 0)?|(?:echo|printf)(?: [^;&|\n]*)?)(?= ?(?:$|[;&|\n]))|(?<!&)& ?$/.test(rest);
|
|
1261
|
+
if (!piped && !masked) return true;
|
|
1255
1262
|
}
|
|
1256
|
-
return false
|
|
1263
|
+
return false;
|
|
1257
1264
|
}
|
|
1258
1265
|
|
|
1259
1266
|
// The twin of hooks-done.mjs's `groupPasses`: a form runs unpiped, and no flag in `refuse`
|
|
@@ -52,11 +52,12 @@
|
|
|
52
52
|
// upgrade path there is still a session-level `permission` ruleset set by the loop launcher
|
|
53
53
|
// when it creates the loop session (`session.create` accepts one).
|
|
54
54
|
|
|
55
|
-
import { promises as fs, realpathSync, existsSync, readFileSync, readdirSync, readlinkSync, statSync, lstatSync, writeFileSync } from "node:fs"
|
|
55
|
+
import { promises as fs, realpathSync, existsSync, readFileSync, readdirSync, readlinkSync, statSync, lstatSync, writeFileSync, mkdirSync, unlinkSync } from "node:fs"
|
|
56
56
|
import { spawnSync } from "node:child_process"
|
|
57
57
|
import * as path from "node:path"
|
|
58
58
|
import { fileURLToPath } from "node:url"
|
|
59
|
-
import { homedir } from "node:os"
|
|
59
|
+
import { homedir, tmpdir } from "node:os"
|
|
60
|
+
import { createHash } from "node:crypto"
|
|
60
61
|
|
|
61
62
|
const PLUGIN_DIR = path.dirname(fileURLToPath(import.meta.url))
|
|
62
63
|
|
|
@@ -891,7 +892,16 @@ function lossReason(segments, cwd, { always = true, split } = {}) {
|
|
|
891
892
|
/** The first loss among `segs`, run from `start`; a substitution body is judged as a command. */
|
|
892
893
|
const judge = (segs, start, depth = 0) => {
|
|
893
894
|
let dir = start;
|
|
894
|
-
|
|
895
|
+
// A `cd` inside `( … )` ends with the subshell, and `popd` goes back somewhere this reader
|
|
896
|
+
// never recorded. Both used to leave `dir` where the `cd` put it, so a removal after them
|
|
897
|
+
// was looked for in the wrong folder, found absent, and passed. Now the directory is
|
|
898
|
+
// unknown from there on, which asks for a relative path.
|
|
899
|
+
let nest = 0;
|
|
900
|
+
let cdInside = false;
|
|
901
|
+
for (const [n, raw] of segs.map(stripStructure).entries()) {
|
|
902
|
+
const bare = segs[n].filter((t) => !/^["']/.test(t));
|
|
903
|
+
const opens = bare.filter((t) => /^\(/.test(t)).length;
|
|
904
|
+
const closes = bare.filter((t) => /\)$/.test(t) && !/\$\(/.test(t)).length;
|
|
895
905
|
const text = raw.join(' ');
|
|
896
906
|
const named = LOSS_CANDIDATE_RE.test(text);
|
|
897
907
|
for (const body of named ? substitutions(text) : []) {
|
|
@@ -907,12 +917,19 @@ function lossReason(segments, cwd, { always = true, split } = {}) {
|
|
|
907
917
|
w = /^\w+=/.test(w[0]) ? w.slice(1) : pastWrapper(wrapper, w.slice(1));
|
|
908
918
|
if (!w && named) unverified(`\`${wrapper}\` takes a flag the gate does not know`);
|
|
909
919
|
}
|
|
910
|
-
|
|
920
|
+
const leave = () => {
|
|
921
|
+
nest = Math.max(0, nest + opens - closes);
|
|
922
|
+
if (nest === 0 && cdInside) { dir = null; cdInside = false; }
|
|
923
|
+
};
|
|
924
|
+
if (!w || !w.length) { leave(); continue; }
|
|
911
925
|
const prog = progOf(w[0]);
|
|
912
926
|
const args = w.slice(1);
|
|
927
|
+
if (prog === 'popd' || prog === 'pop-location') { dir = null; leave(); continue; }
|
|
913
928
|
if (CD_PROGS.has(prog)) {
|
|
914
929
|
const target = args.find((a) => !a.startsWith('-') && !/^\/d$/i.test(a));
|
|
915
930
|
try { dir = target && target !== '-' ? resolveIn(dir, target) : null; } catch { dir = null; }
|
|
931
|
+
if (nest + opens > 0) cdInside = true;
|
|
932
|
+
leave();
|
|
916
933
|
continue;
|
|
917
934
|
}
|
|
918
935
|
let verdict = null;
|
|
@@ -927,6 +944,7 @@ function lossReason(segments, cwd, { always = true, split } = {}) {
|
|
|
927
944
|
unverified(`\`${w[0].replace(OPAQUE, '')}\` is not a program the gate reads, and a removal follows it`);
|
|
928
945
|
}
|
|
929
946
|
if (verdict) return verdict;
|
|
947
|
+
leave();
|
|
930
948
|
}
|
|
931
949
|
return null;
|
|
932
950
|
};
|
|
@@ -1768,6 +1786,27 @@ const storeLine = (files) => {
|
|
|
1768
1786
|
return `Geneseed change report: ${files.length} rule or memory file${files.length === 1 ? "" : "s"} ` +
|
|
1769
1787
|
`changed outside this session's approved writes (another session, or a decision of yours in the web console, may have made it): ${shown}${more}. This detects a change; it prevented nothing.`
|
|
1770
1788
|
}
|
|
1789
|
+
// ONE REPORT PER CHANGE, however many plugin instances saw it. One `opencode serve` loads this
|
|
1790
|
+
// plugin once per opened project, and every instance hears every session's turn edges. Each kept
|
|
1791
|
+
// its own baseline of the same machine-wide stores, found the same change at the same turn end,
|
|
1792
|
+
// and posted its own message: four projects open, four identical reports (2026-11-10). The
|
|
1793
|
+
// instances share no memory, so the first to create the marker for (session, files, their new
|
|
1794
|
+
// stamps) reports and the rest stay silent. A file, because that is the one thing instances of
|
|
1795
|
+
// one process and separate OpenCode processes both see. A marker it cannot write does not
|
|
1796
|
+
// silence a report: saying it twice is the smaller fault. Markers older than a day are swept.
|
|
1797
|
+
const REPORT_MARKS = path.join(tmpdir(), "geneseed-change-reports")
|
|
1798
|
+
function claimReport(sid, files, now) {
|
|
1799
|
+
const key = createHash("sha1").update([sid, ...files.map((f) => `${f}=${now[f] ?? "gone"}`)].join("\n")).digest("hex")
|
|
1800
|
+
try {
|
|
1801
|
+
mkdirSync(REPORT_MARKS, { recursive: true })
|
|
1802
|
+
for (const name of readdirSync(REPORT_MARKS)) {
|
|
1803
|
+
const p = path.join(REPORT_MARKS, name)
|
|
1804
|
+
try { if (Date.now() - statSync(p).mtimeMs > 86400000) unlinkSync(p) } catch { /* another instance swept it */ }
|
|
1805
|
+
}
|
|
1806
|
+
writeFileSync(path.join(REPORT_MARKS, key), "", { flag: "wx" })
|
|
1807
|
+
return true
|
|
1808
|
+
} catch (err) { return err?.code !== "EEXIST" }
|
|
1809
|
+
}
|
|
1771
1810
|
function noteForStatus(files) {
|
|
1772
1811
|
try {
|
|
1773
1812
|
if (existsSync(machineDir())) writeFileSync(path.join(machineDir(), ".store-report.json"), JSON.stringify({ at: new Date().toISOString(), host: "opencode", files }))
|
|
@@ -1908,7 +1947,8 @@ function gateConfig(p) {
|
|
|
1908
1947
|
// when neither the file nor the patch holds the opening delimiter, since a line patch cannot form one.
|
|
1909
1948
|
const CARRIER_BEGIN = "<!-- BEGIN GENESEED -->"
|
|
1910
1949
|
const CARRIER_REPLAY_CAP = 1024 * 1024
|
|
1911
|
-
|
|
1950
|
+
// Whole-line markers: js/lib/managed-block.mjs BLOCK_RE_SOURCE, by value (a plugin imports nothing).
|
|
1951
|
+
const carrierBlockOf = (text) => /^<!-- BEGIN GENESEED -->[ \t]*\r?\n[\s\S]*?^<!-- END GENESEED -->[ \t]*\r?$/m.exec(text)?.[0] ?? ""
|
|
1912
1952
|
function carrierName(file) {
|
|
1913
1953
|
const s = String(file)
|
|
1914
1954
|
const at = Math.max(s.lastIndexOf("/"), s.lastIndexOf("\\")) + 1
|
|
@@ -2174,6 +2214,68 @@ function shellWriteTargets(command, cwd, ps = false) {
|
|
|
2174
2214
|
}
|
|
2175
2215
|
return [...found];
|
|
2176
2216
|
}
|
|
2217
|
+
/**
|
|
2218
|
+
* THE ONE READING OF A COMMAND every gate below is handed. The lexers here are non-POSIX on
|
|
2219
|
+
* purpose (`SCAN_TOKEN_RE`: a backslash is never an escape, so PowerShell's `"C:\"` closes), and
|
|
2220
|
+
* that is wrong for the shell most commands run in. In bash:
|
|
2221
|
+
* - a backslash-newline joins two lines, so `rm -rf \⏎ /` is one command. Read as two, the
|
|
2222
|
+
* operand landed in a segment with no program and every gate passed it;
|
|
2223
|
+
* - `\'` and `\"` outside single quotes are a literal quote, not a delimiter. Read as one, the
|
|
2224
|
+
* everyday `'it'\''s'` left the quote state inverted and hid the rest of the line as data,
|
|
2225
|
+
* `&& rm -rf /` included.
|
|
2226
|
+
* So for a bash-like shell the continuation is joined and an escaped quote or separator is
|
|
2227
|
+
* replaced by `_`, which is inert to every lexer and keeps every other character where it was.
|
|
2228
|
+
* For PowerShell only its own continuation, a backtick-newline, is joined, and nothing else
|
|
2229
|
+
* changes: there the backslash is a path separator.
|
|
2230
|
+
*
|
|
2231
|
+
* `shell` is what the caller knows: `'bash'` (Claude's `Bash` tool, Git Bash on Windows too),
|
|
2232
|
+
* `'powershell'`, or null. Unknown is read as bash unless the platform is Windows or a
|
|
2233
|
+
* `Verb-Noun` word says PowerShell.
|
|
2234
|
+
*/
|
|
2235
|
+
function shellReading(command, shell = null) {
|
|
2236
|
+
const bashLike = shell === 'bash'
|
|
2237
|
+
|| (shell !== 'powershell' && process.platform !== 'win32' && !PS_CUE_RE.test(command));
|
|
2238
|
+
if (!bashLike) return command.replace(/`\r?\n/g, '');
|
|
2239
|
+
if (!command.includes('\\')) return command;
|
|
2240
|
+
let out = '';
|
|
2241
|
+
let quote = '';
|
|
2242
|
+
const tags = []; // heredocs opened on this line: `[stripTabs, tag]`
|
|
2243
|
+
for (let i = 0; i < command.length; i += 1) {
|
|
2244
|
+
const ch = command[i];
|
|
2245
|
+
const next = command[i + 1];
|
|
2246
|
+
// A heredoc body is copied as it is: under a quoted tag a backslash is literal, and the
|
|
2247
|
+
// gates read a body as data or, for `bash <<EOF`, as the command it is.
|
|
2248
|
+
if (!quote && ch === '<' && next === '<' && command[i + 2] !== '<' && command[i - 1] !== '<') {
|
|
2249
|
+
const m = /^<<(-?)[ \t]*(["']?)([A-Za-z_]\w*)\2/.exec(command.slice(i));
|
|
2250
|
+
if (m) { tags.push([m[1], m[3]]); out += m[0]; i += m[0].length - 1; continue; }
|
|
2251
|
+
}
|
|
2252
|
+
if (!quote && ch === '\n' && tags.length) {
|
|
2253
|
+
out += ch;
|
|
2254
|
+
while (tags.length) {
|
|
2255
|
+
const end = command.indexOf('\n', i + 1);
|
|
2256
|
+
const line = command.slice(i + 1, end < 0 ? command.length : end);
|
|
2257
|
+
out += line + (end < 0 ? '' : '\n');
|
|
2258
|
+
i = end < 0 ? command.length : end;
|
|
2259
|
+
const bare = line.replace(/\r$/, '');
|
|
2260
|
+
if ((tags[0][0] ? bare.replace(/^\t+/, '') : bare) === tags[0][1]) tags.shift();
|
|
2261
|
+
if (end < 0) break;
|
|
2262
|
+
}
|
|
2263
|
+
continue;
|
|
2264
|
+
}
|
|
2265
|
+
if (ch === '\\' && quote !== "'" && next !== undefined) {
|
|
2266
|
+
const eol = next === '\n' ? 1 : (next === '\r' && command[i + 2] === '\n' ? 2 : 0);
|
|
2267
|
+
if (eol) { i += eol; continue; }
|
|
2268
|
+
// In double quotes only `\"` matters to a lexer; outside, a quote or a separator does.
|
|
2269
|
+
out += ch + ((quote ? next === '"' : /["';|&]/.test(next)) ? '_' : next);
|
|
2270
|
+
i += 1;
|
|
2271
|
+
continue;
|
|
2272
|
+
}
|
|
2273
|
+
if (quote) { if (ch === quote) quote = ''; } else if (ch === '"' || ch === "'") quote = ch;
|
|
2274
|
+
out += ch;
|
|
2275
|
+
}
|
|
2276
|
+
return out;
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2177
2279
|
// ---- shell-write twin: END
|
|
2178
2280
|
|
|
2179
2281
|
// A segment that is only a redirect: `> f`, or `A=1 > f`. V2's shell tool asserts only when its parser
|
|
@@ -2193,7 +2295,7 @@ const OWNERSHIP_SEEN = new Set()
|
|
|
2193
2295
|
const OWNERSHIP_MANIFESTS = new Set(["package.json", "pom.xml", "pyproject.toml", "go.mod", "Cargo.toml",
|
|
2194
2296
|
"composer.json", "Gemfile"])
|
|
2195
2297
|
const isManifest = (n) => OWNERSHIP_MANIFESTS.has(n) || n.startsWith("build.gradle") || n.endsWith(".csproj")
|
|
2196
|
-
const MANAGED_BLOCK_RE =
|
|
2298
|
+
const MANAGED_BLOCK_RE = /^<!-- BEGIN GENESEED -->[ \t]*\r?\n[\s\S]*?^<!-- END GENESEED -->[ \t]*\r?$/gm
|
|
2197
2299
|
const OWNERSHIP_SECTION_RE = /^## Ownership[ \t]*\r?$/m
|
|
2198
2300
|
const OWNERSHIP_TAIL = "Opt out per repo: `## Ownership` with `mode: off` in the root `AGENTS.md`; per " +
|
|
2199
2301
|
"install: rebuild with `--no-ownership-gate`. Offer the full documentation " +
|
|
@@ -2370,6 +2472,7 @@ export const GeneseedGuard = async (ctx) => {
|
|
|
2370
2472
|
const own = ownWrites()
|
|
2371
2473
|
const files = changed.filter((f) => own[f] !== (now[f] ?? "gone"))
|
|
2372
2474
|
if (!files.length) return
|
|
2475
|
+
if (!claimReport(sid, files, now)) return
|
|
2373
2476
|
const line = storeLine(files)
|
|
2374
2477
|
log(line)
|
|
2375
2478
|
noteForStatus(files)
|
|
@@ -2515,7 +2618,9 @@ export const GeneseedGuard = async (ctx) => {
|
|
|
2515
2618
|
if (hasAny(tool, SHELL_TOOLS)) {
|
|
2516
2619
|
// OpenCode's bash tool may run in `workdir`, resolved against the session directory.
|
|
2517
2620
|
const wd = typeof args.workdir === "string" && args.workdir ? path.resolve(cwd, args.workdir) : cwd
|
|
2518
|
-
|
|
2621
|
+
// One reading for every check below: continuations joined, escaped quotes inert (`shellReading`).
|
|
2622
|
+
const picked = pickCommand(args)
|
|
2623
|
+
const c = typeof picked === "string" && picked ? shellReading(picked, /powershell|pwsh/i.test(tool) ? "powershell" : null) : picked
|
|
2519
2624
|
const cut = (t) => scanSegments(t).map((seg) => seg.match(SCAN_TOKEN_RE) || [])
|
|
2520
2625
|
if (c && (SHELL_BLOCK_RE.some((re) => re.test(c)) || catastrophic(c, cut))) { await deny(refused("catastrophic", { name: c }), "law-4"); return }
|
|
2521
2626
|
const scan = c && !ROOT_SCAN_OFF && rootScan(c)
|
package/bin/geneseed-cli.mjs
CHANGED
|
@@ -146,6 +146,9 @@ const VERBS = {
|
|
|
146
146
|
// The factory engine, the loop engine one level up: native like `loop`, gated absolutely by
|
|
147
147
|
// tests/unit/factory_cli.test.mjs.
|
|
148
148
|
factory: () => import('../js/factory/cli.mjs').then((m) => m.cmdFactory),
|
|
149
|
+
// Native too: a render for a library that is not an install. Its absolute gate is
|
|
150
|
+
// tests/unit/export.test.mjs.
|
|
151
|
+
export: () => import('../js/build/export.mjs').then((m) => m.cmdExport),
|
|
149
152
|
// A fifth native verb, and a port rather than an invention: the AI Harness Scorecard
|
|
150
153
|
// (upstream Python, pinned in the module's docblock). There is no recorded cell — its absolute gate is
|
|
151
154
|
// tests/unit/scorecard.test.mjs. Lazy like every row: the 31 checks load only when asked.
|
|
@@ -95,7 +95,7 @@ What stops asking, per host: the real-loss check of `git-gate` (Claude Code, Ope
|
|
|
95
95
|
Limits:
|
|
96
96
|
- **OpenCode reads the switch at start.** The guard plugin reads `Deletion gate:` from the install's `AGENT.md` once, when OpenCode loads it: restart OpenCode after flipping it.
|
|
97
97
|
- **A global install beside a project install.** On Claude Code and OpenClaude the global `git-gate` stands down for a project install, so the project's switch decides. Bob's `tool-gate` and the OpenCode guard do not stand down: an armed global install still refuses real loss inside a project whose own install is off.
|
|
98
|
-
- **An
|
|
98
|
+
- **An older `opencode.json` keeps its Law IV keys.** Switching off removes the `permission.bash` entries the manifest records Geneseed adding (`bash_gates`, since 5.2.0). An install made before that has no record, so the build warns that it keeps them and they keep asking. Run the build once with `--prune-gates` to remove those still set as Geneseed writes them, or delete them by hand. An entry you changed always stays, and a commented `opencode.jsonc` is never rewritten: the build names the entries to remove.
|
|
99
99
|
- **An older hook shim silences the whole gate.** The flag is new. While the machine's shared hook shim still points at an older checkout, that checkout refuses the flag and the gate verb lets every call through on a disarmed install — on Claude Code and OpenClaude the root-scan and consent checks too, on Bob also *Sealed Secrets* and *External Gate*. Update the checkout the shim points at (`geneseed rebuild-all`) before switching the gate off.
|
|
100
100
|
|
|
101
101
|
### Law I secrets gate and Law III done gate — on or off
|
|
@@ -38,6 +38,6 @@ Every [host](hosts.md) gets the same content. This table is what each one lets G
|
|
|
38
38
|
|
|
39
39
|
The **consent before commit and push** row depends on a choice you make at build time. It enforces the rule *Consent Before Push*, which belongs to the **process** doctrine pack ([Rules](rules.md)). Build without that pack, or exclude that one rule, and the commit/push question goes away — but the gate itself stays: on Claude Code and OpenClaude the `git-gate` hook is still wired (with `--no-consent`), so destructive git is still caught. The standing-rule row is conditional the same way: it enforces *Persist Insight*, also in the process pack, and excluding it (or the pack) drops that hook on every host ([Exclusions](exclusions.md)). Everything else in the table is always on.
|
|
40
40
|
|
|
41
|
-
One OpenCode asymmetry: Geneseed shares `opencode.json` with you
|
|
41
|
+
One OpenCode asymmetry: Geneseed shares `opencode.json` with you, so it removes only what it recorded writing. The manifest lists the `permission.bash` gates it added (`bash_gates`), and a rebuild without the process pack, or with `--no-deletion-gate`, takes back those that still read as it wrote them. An entry that was already there, one you changed, and every gate on an install made before 5.2.0 (which has no record) stays and is named in a warning; `--prune-gates` on one build removes the last kind. A `permission.skill` deny works the same way, and uninstall takes those back too; uninstall leaves the `permission.bash` gates.
|
|
42
42
|
|
|
43
43
|
In plain terms: [Enforced vs. asked](../understand/enforced-vs-asked.md).
|
|
@@ -32,7 +32,7 @@ The packs always load in the same order (craft, rigor, ops, process, comms), wha
|
|
|
32
32
|
**Dropping `process` changes what the machine does, not only what the agent reads.** The *Consent Before Push* rule in that pack is enforced at the tool boundary as well as in the prose:
|
|
33
33
|
|
|
34
34
|
- On Claude Code and OpenClaude, the git hook stays wired but stops asking before a commit or push.
|
|
35
|
-
- On OpenCode, a fresh install no longer gets the `git commit*` and `git push*` ask entries in `opencode.json`. On an existing install, entries
|
|
35
|
+
- On OpenCode, a fresh install no longer gets the `git commit*` and `git push*` ask entries in `opencode.json`. On an existing install, the entries Geneseed recorded adding are removed. Entries you typed, and those on an install made before 5.2.0, are left in place and reported; build once with `--prune-gates` to remove the second kind.
|
|
36
36
|
|
|
37
37
|
The refusals of destructive git and `rm -rf` belong to the always-on Rules, not to the pack, so they stay in every build. See [Enforced vs. asked](../understand/enforced-vs-asked.md).
|
|
38
38
|
|
|
@@ -44,7 +44,7 @@ On OpenCode, two mechanisms enforce rules:
|
|
|
44
44
|
- **OpenCode's own permission prompt**, which Geneseed configures in `opencode.json`. It asks you before `git reflog expire`, `git gc --prune` and a force-push or delete of `main`/`master`, and, when the **process** pack is on, before every commit and push.
|
|
45
45
|
- **The guard plugin**, which blocks outright: writes to key and credential files (`id_rsa`, `*.pem`, `.ssh/`, `.npmrc`…), catastrophic commands (`rm -rf /`, `rm -rf ~`, formatting or overwriting a disk), every other real data loss (the same state-aware decisions as the hook), a recursive scan of a whole filesystem (`find /`, `du -sh /`, `Get-ChildItem C:\ -Recurse`), and any change inside a folder your wiki marks `protected`. It also refuses the first write to `user-rules.md` or memory once. Re-issue the write and it goes through. And in an application repo with no `## Ownership` section in its root `AGENTS.md`, it refuses the session's first write once, so the agent proposes the [ownership](../concepts/ownership.md) setup (off with `mode: off`, a personal `Setup: declined <YYYY-MM-DD>` line in `.geneseed/ownership.md`, or `--no-ownership-gate`).
|
|
46
46
|
|
|
47
|
-
The guard only warns on `.env` edits. It checks credentials by **file path**, not by content, so a key pasted into an ordinary source file is not caught here. One caveat about the process pack:
|
|
47
|
+
The guard only warns on `.env` edits. It checks credentials by **file path**, not by content, so a key pasted into an ordinary source file is not caught here. One caveat about the process pack: a rebuild without the pack removes the `git commit*` entry only when Geneseed recorded adding it. An entry you typed, or one from an install made before 5.2.0, stays and is reported; `--prune-gates` removes the second kind.
|
|
48
48
|
|
|
49
49
|
<!--/harness-->
|
|
50
50
|
|
package/harness.config.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
"_comment": "version is a human-readable release label only; the canonical identity of an installed harness is the source fingerprint stamped in .geneseed-version (see `harness version`), not this string.",
|
|
3
3
|
"theme": "neutral",
|
|
4
4
|
"product": "Geneseed",
|
|
5
|
-
"version": "5.
|
|
5
|
+
"version": "5.2.0"
|
|
6
6
|
}
|
package/js/README.md
CHANGED
|
@@ -61,7 +61,7 @@ as a per-host install at project or global scope.
|
|
|
61
61
|
|---|---|
|
|
62
62
|
| `source.mjs` | Where the SOURCE is: `ROOT`/`SRC`/`THEMES`/`CONFIG`, `PACK_ORDER`, the rule canon (stable ids → positional numbers, citations → names), the cfg object |
|
|
63
63
|
| `render.mjs` | The pure text pipeline: theme load, `INCLUDE` inlining, CATALOG blocks, `{{TOKENS}}`, dest paths |
|
|
64
|
-
| `bundle.mjs` | `build` — render a theme into a bundle dir, plus the source-completeness refusal. Sits UNDER both emits |
|
|
64
|
+
| `bundle.mjs` | `build` — render a theme into a bundle dir, claim-on-create per file (an existing file it did not write is the user's), plus the source-completeness refusal. Sits UNDER both emits |
|
|
65
65
|
| `emit-claude.mjs` | The Claude/Bob/OpenClaude emit — the render half plus the settings + CLAUDE.md managed-block wire |
|
|
66
66
|
| `emit-opencode.mjs` | The OpenCode emits — a project's `.opencode/` and the global config dir. Deliberate twin of the above |
|
|
67
67
|
| `emit-common.mjs` | Constants, tree walkers, and the three writers BOTH global emits share. Decides no host |
|
|
@@ -74,6 +74,7 @@ as a per-host install at project or global scope.
|
|
|
74
74
|
| `args.mjs` | The generator's flag surface: `harness.config.json` defaults, the `--emit`/`--theme`/`--footprint` parse tables and choices, `-h`, and `die` (a throw, so `rebuild-all` survives one bad install) |
|
|
75
75
|
| `generate.mjs` | CLI verbs `build`, `prompt`, `theme`, `rebuild-all` — the thin face over `driver.mjs` |
|
|
76
76
|
| `catalog.mjs` | `geneseed catalog` — prints the shipped roster. Classifies nothing itself |
|
|
77
|
+
| `export.mjs` | `geneseed export` — skills, agents and the constitution as catalogue entities for a shared library (`SKILL.md`/`AGENT.md` + `metadata.yaml`), shaped by a profile kept outside the repo. One way, claim-on-create, not an install |
|
|
77
78
|
| `themes.mjs` | Maintainer-only `--sync-themes`: inserts `_TEMPLATE.json`'s missing keys into the committed themes |
|
|
78
79
|
|
|
79
80
|
**Before editing:** `render.mjs` writes nothing, and its output is what every emit target
|
|
@@ -109,12 +110,12 @@ user co-owns, and the hook verbs those emitted configs then run.
|
|
|
109
110
|
| `loss.mjs` | Law IV calibrated to real loss: `lossReason` decides whether a command would really lose data (protected branch, unpushed branch, dirty tree, stash, reflog, files git cannot restore) and fails closed. The gate path's one `git` spawn, reached only after `LOSS_CANDIDATE_RE` matched. Twin: the OpenCode guard plugin |
|
|
110
111
|
| `settings.mjs` | Merges into user-owned `settings.json`/`opencode.json` (one `loadJsonObject` reader for all of them) and the managed blocks |
|
|
111
112
|
| `shim.mjs` | The machine-wide hook shim: its path, body, liveness (`shimDead`, read on every CLI run), `hookPrefix`/`hookRunnerEntry`; and the web console's login launcher (`autostartState`/`autostartInstall`/`autostartRemove`). Kept cheap to import |
|
|
112
|
-
| `native.mjs` | Capability specs → host-native subagents and skills. The impure half of the emit |
|
|
113
|
+
| `native.mjs` | Capability specs → host-native subagents and skills. The impure half of the emit. `claimer`: claim-on-create, what an emit kept (`claim.kept`), and `--force` |
|
|
113
114
|
| `opencode.mjs` | OpenCode-only extras: colour themes, primary agent, `/commands`, plugins, overrides stub |
|
|
114
|
-
| `installs.mjs` | Detects deployed installs and reads back their theme, footprint, posture, mode and loop trust preset |
|
|
115
|
+
| `installs.mjs` | Detects deployed installs and reads back their theme, footprint, posture, mode and loop trust preset; `leftoversOf`, the files an install keeps that are not Geneseed's copy, read off the emit's record for the console |
|
|
115
116
|
| `mcp.mjs` | Reads each host's MCP config (`mcpServers`, or OpenCode's `mcp`) and where it lives — read-only since 2026-10: the user edits the file, Geneseed only shows it |
|
|
116
117
|
| `link.mjs` | `geneseed link`/`unlink` — the PATH shim, and the only Windows USER-Path registry edit |
|
|
117
|
-
| `owned.mjs` | Manifest rel -> path on disk decisions: `ownedWithin`, the containment boundary `uninstall.mjs` and the driver's prune both go through before acting on an `owned` list entry |
|
|
118
|
+
| `owned.mjs` | Manifest rel -> path on disk decisions: `ownedWithin`, the containment boundary `uninstall.mjs` and the driver's prune both go through before acting on an `owned` list entry; and `bundleFiles`, the list a bundle keeps of the files it wrote (in `.geneseed-srcdirs.json`), which the build's prune and the OpenCode project uninstall remove by |
|
|
118
119
|
|
|
119
120
|
**Before editing:** `hooks*.mjs` **are the hook path** — the verdict travels as JSON on stdout and
|
|
120
121
|
every arm exits 0, so one stray printed byte turns a blocking gate silently permissive, and anything
|
|
@@ -169,6 +170,7 @@ into files users have committed, so change the test that states it in the same c
|
|
|
169
170
|
| `udiff.mjs` | `geneseed diff`'s own difflib clone — the alignment IS the printed hunks — plus `splitLines` |
|
|
170
171
|
| `proc.mjs` | One constant: the `windowsHide` flag every spawn in `js/` must reuse |
|
|
171
172
|
| `prompt.mjs` | The line-mode stdin readers — `ask`, `promptLine`, `confirm`, `askChoice` — read a byte at a time so they stop where Enter stops. Shared by `setup`, `uninstall` and `web` without dragging in the wizard |
|
|
173
|
+
| `managed-block.mjs` | Where the `<!-- BEGIN/END GENESEED -->` block is in a co-owned file: whole-line markers, the first END with the last BEGIN above it. One definition for the writer (`settings.mjs`) and the hook-side readers; no imports, so the hook path may load it. The OpenCode plugins carry `BLOCK_RE_SOURCE` by value |
|
|
172
174
|
| `machine-dir.mjs` | `machineDir()`, `sharedPaths()`, `readDefaultInstall()` and `WIKI_NAMES`: the one home of `$XDG_CONFIG_HOME/geneseed`, the names beneath it, the reader of the chosen default install, and the wiki manifest's names. Spawn-free, so the hook and driver may import it |
|
|
173
175
|
| `node-floor.mjs` | The first import of all three binaries: below Node 22.7, one sentence on stderr and exit 1 (0 in the hook) instead of a stack trace |
|
|
174
176
|
|
package/js/build/args.mjs
CHANGED
|
@@ -112,6 +112,12 @@ const FLAGS = {
|
|
|
112
112
|
// deliberately: a rebuild elides a flag when armed, so a config default could disarm an armed
|
|
113
113
|
// install on its next upgrade.
|
|
114
114
|
...Object.fromEntries(GATE_SWITCHES.map((g) => [g.flag, g.arg])),
|
|
115
|
+
// One-shot, so no marker and no rebuild replays it: take back the OpenCode `permission.bash`
|
|
116
|
+
// gates whose rule is off, on an install older than the `bash_gates` record.
|
|
117
|
+
'--prune-gates': 'pruneGates',
|
|
118
|
+
// One build's instruction, never recorded: Geneseed's copy replaces a file the user edited
|
|
119
|
+
// or put at a name Geneseed ships. `claimer` (js/hosts/native.mjs) holds the rule.
|
|
120
|
+
'--force': 'force',
|
|
115
121
|
'-v': 'verbose', '--verbose': 'verbose',
|
|
116
122
|
};
|
|
117
123
|
|
|
@@ -368,7 +374,7 @@ export function parseArgs(argv, defaults) {
|
|
|
368
374
|
kits: defaults.kits ?? [],
|
|
369
375
|
sharedTier: 'off',
|
|
370
376
|
out: 'Harness', emit: 'files', footprint: 'lean', root: null,
|
|
371
|
-
syncThemes: false, validateOnly: false, verbose: false,
|
|
377
|
+
syncThemes: false, validateOnly: false, verbose: false, pruneGates: false, force: false,
|
|
372
378
|
...Object.fromEntries(GATE_SWITCHES.map((g) => [g.arg, false])),
|
|
373
379
|
};
|
|
374
380
|
const { tokens } = nodeParseArgs({
|