@inixiative/config 0.5.252 → 0.5.254

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/README.md CHANGED
@@ -64,7 +64,7 @@ One version of `@inixiative/config` names one coherent state of the inixiative p
64
64
  }
65
65
  ```
66
66
 
67
- A lane is a release cascade with its own blessed set. `primitives` (field-map, json-rules, permissions, transitions, rules-builder, prisma-map, atlas, gloss) ships first; `agentic` (signet → archive, signet → kcp, agent-session → foundry-core → foundry → foundry-acp) builds on the primitives' blessed set and never the reverse. `check` holds every repo to the union of all lanes, so a repo that mixes both answers to both.
67
+ A lane is a release cascade with its own blessed set. `primitives` (field-map, json-rules, permissions, transitions, rules-builder, prisma-map, atlas, gloss) ships first; `agentic` (signet → archive, signet → kcp, signet → integrations, agent-session → foundry-core → foundry → foundry-acp) builds on the primitives' blessed set and never the reverse. `check` holds every repo to the union of all lanes, so a repo that mixes both answers to both.
68
68
 
69
69
  TypeScript 6.0 notes, discovered by this repo's fixture suite:
70
70
 
@@ -97,7 +97,7 @@ bunx @inixiative/config bounded [--minutes=40] [--memory-gb=12] [--wait-minutes=
97
97
 
98
98
  `bounded -- <command>` runs a repo's full check as the machine's one check at a time, inside a time limit and a memory ceiling. Every repo's `check` script is `inixiative-config bounded -- bun run check:all`, with the repo's own chain in `check:all`; `check` flags a repo whose script is anything else and `sync` rewrites it, moving the old chain to `check:all`; when both scripts already hold a chain, or `check` names `bounded` in another way, `sync` leaves them and the finding says to settle them by hand (limits of its own, `--minutes=`, `--memory-gb=`, `--wait-minutes=`, may sit before the `--`). So the full check is always plain `bun run check`. Never wrap it in `lockf … ~/.foundry/check.lock`, the command sessions used before 2026-11-21: `lockf` would hold the lock `bounded` then waits for, so a `bounded` started under one refuses at once (exit 2) and says to run the check plain. `bun run check:all` is the chain with no lock and no limits: for CI images and for looking at one failure, never for the full check on a shared machine. The `--` is required; everything after it reaches the command untouched.
99
99
 
100
- - **One at a time.** It takes the machine's check lock, `~/.foundry/check.lock`, a flock(2) file taken through `lockf` (`flock` on Linux). The system frees the lock when its holder dies, so a file left behind is never a lock. After five seconds of waiting it says so, and it gives up with exit 75 after `--wait-minutes`. A train's own lock is another file: a train and a check can run together.
100
+ - **One at a time.** It takes the machine's check lock, `~/.foundry/check.lock`, a flock(2) file taken through `lockf` (`flock` on Linux). The system frees the lock when its holder dies, so a file left behind is never a lock. After five seconds of waiting it says so, and it gives up with exit 75 after `--wait-minutes`. A train's own lock is another file, but a train also takes this one, once, before it moves any repo, and holds it until it ends: its repo checks run without waiting again, and other sessions' checks wait for the whole train. Before 2026-11-26 a train took it once per repo and rejoined the queue each time (97 minutes of one run were waiting, three were tests).
101
101
  - **Time limit.** After `--minutes` (default 40, counted from when it holds the lock) the command's whole process group is stopped: SIGTERM, then SIGKILL ten seconds later. Exit 124.
102
102
  - **Memory ceiling.** It adds up the memory of the group, compressed pages included (`top`'s MEM on macOS; RSS from `ps` elsewhere, or when `top` gives nothing in 30 s), and stops the group past `--memory-gb` (default 12). Exit 137. The last line names the bound, the peak and the process holding the most.
103
103
  - **Both limits are read every ten seconds**, so a command can overrun either by up to that long.
@@ -211,9 +211,11 @@ jobs:
211
211
 
212
212
  ## Release flow
213
213
 
214
+ One agent runs every train: the release conductor, a Foundry schedule on this repo. Its charter is [`docs/RELEASE-CONDUCTOR.md`](docs/RELEASE-CONDUCTOR.md). Every other session stops at "merged, row written" in `~/code/inixiative/RELEASE-QUEUE.md` and never runs `train` or merges a PR here.
215
+
214
216
  Two lanes, each publishing in dependency order, with config last:
215
217
 
216
218
  - **primitives:** for example field-map → json-rules → permissions → transitions → rules-builder, plus prisma-map (retiring into field-map), atlas and gloss. Consumers: template, kingdom.
217
- - **agentic:** signet, kcp (the Kingdom CLI proxy, on signet), archive and agent-session, then foundry-core → foundry → foundry-acp (foundry depends on archive), built on the primitives' blessed set. foundry-core, foundry and foundry-acp publish from the foundry monorepo's `packages/core`, `packages/foundry` and `packages/acp`. Consumers: oracle (a private leaf), kingdom.
219
+ - **agentic:** signet, kcp (the Kingdom CLI proxy, on signet), integrations (the public provider catalog, on signet), archive and agent-session, then foundry-core → foundry → foundry-acp (foundry depends on archive), built on the primitives' blessed set. foundry-core, foundry and foundry-acp publish from the foundry monorepo's `packages/core`, `packages/foundry` and `packages/acp`. Consumers: oracle (a private leaf), kingdom, template (for integrations).
218
220
 
219
221
  A release is `train` (or `train --lane=agentic` to leave the primitives alone): bump the package's version on its default branch, then run the train. `train` automates the whole walk, this package and the consumer bumps included. Downstream repos pick up toolchain changes via `sync`.
package/dist/cli.js CHANGED
@@ -1292,6 +1292,35 @@ var runBounded = async (command2, options = {}) => {
1292
1292
  for (const [signal, handler] of stopOnSignal) process.off(signal, handler);
1293
1293
  }
1294
1294
  };
1295
+ var HOLDING_UNTIL_CLOSED = "echo held >&4; exec 4>&-; read _ <&3";
1296
+ var holdCheckLock = async (options = {}) => {
1297
+ const path = options.lockPath ?? checkLockPath();
1298
+ const say = options.say ?? ((line) => console.error(line));
1299
+ mkdirSync2(dirname2(path), { recursive: true });
1300
+ const [file = "", ...args] = underLock(
1301
+ path,
1302
+ Math.ceil(options.waitSeconds ?? DEFAULT_BOUNDS.waitSeconds),
1303
+ ["sh", "-c", HOLDING_UNTIL_CLOSED]
1304
+ );
1305
+ const holder = spawn(file, args, { stdio: ["ignore", "inherit", "inherit", "pipe", "pipe"] });
1306
+ const waiting = setTimeout(
1307
+ () => say(`train: waiting for the machine's check lock (${path})`),
1308
+ 5e3
1309
+ );
1310
+ const held = await new Promise((done) => {
1311
+ holder.stdio[4]?.once("data", () => done(true));
1312
+ holder.on("error", () => done(false));
1313
+ holder.on("exit", () => done(false));
1314
+ });
1315
+ clearTimeout(waiting);
1316
+ if (!held) return false;
1317
+ process.on("exit", () => holder.kill());
1318
+ holder.unref();
1319
+ for (const pipe of [holder.stdio[3], holder.stdio[4]])
1320
+ pipe?.unref?.();
1321
+ process.env[INSIDE_BOUNDED] = String(process.pid);
1322
+ return true;
1323
+ };
1295
1324
  var boundedVerdict = (outcome, bounds) => {
1296
1325
  if (outcome.ended === "exited") return null;
1297
1326
  if (outcome.ended === "not started")
@@ -1788,6 +1817,12 @@ if (command === "train") {
1788
1817
  );
1789
1818
  }
1790
1819
  holdTrainLock(lock.release);
1820
+ if (!process.env[INSIDE_BOUNDED] && !await holdCheckLock()) {
1821
+ console.error(
1822
+ `\u2717 gave up waiting for the machine's check lock (${checkLockPath()}); the train needs it for every repo's check`
1823
+ );
1824
+ process.exit(LOCK_WAIT_EXIT_CODE);
1825
+ }
1791
1826
  }
1792
1827
  git(packageRoot, "fetch", "--quiet");
1793
1828
  if (behindOrigin(packageRoot) > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inixiative/config",
3
- "version": "0.5.252",
3
+ "version": "0.5.254",
4
4
  "description": "Shared toolchain and theme for the inixiative packages: tsconfig/biome/tsup presets, theme CSS, a version manifest (BOM), and a sync/check/train CLI",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/versions.json CHANGED
@@ -13,18 +13,19 @@
13
13
  "@types/bun"
14
14
  ],
15
15
  "ecosystem": {
16
- "@inixiative/config": "0.5.252",
16
+ "@inixiative/config": "0.5.254",
17
17
  "@inixiative/field-map": "0.1.1",
18
18
  "@inixiative/json-rules": "3.16.0",
19
19
  "@inixiative/permissions": "0.25.0",
20
- "@inixiative/transitions": "0.9.0",
21
- "@inixiative/rules-builder": "0.33.0",
20
+ "@inixiative/transitions": "0.10.0",
21
+ "@inixiative/rules-builder": "0.35.0",
22
22
  "@inixiative/prisma-map": "0.4.1",
23
23
  "@inixiative/atlas": "0.4.1",
24
24
  "@inixiative/gloss": "0.1.1"
25
25
  },
26
26
  "agentic": {
27
27
  "@inixiative/signet": "0.25.0",
28
+ "@inixiative/integrations": "0.2.1",
28
29
  "@inixiative/kcp": "0.2.3",
29
30
  "@inixiative/archive": "0.34.0",
30
31
  "@inixiative/agent-session": "0.12.0",
@@ -35,7 +36,8 @@
35
36
  "consumers": {
36
37
  "inixiative/template": {
37
38
  "lanes": [
38
- "primitives"
39
+ "primitives",
40
+ "agentic"
39
41
  ]
40
42
  },
41
43
  "inixiative/kingdom": {
@@ -57,9 +59,7 @@
57
59
  "@inixiative/agent-session": "0.22.3",
58
60
  "@inixiative/field-map": "0.1.2",
59
61
  "@inixiative/archive": "0.35.2",
60
- "@inixiative/permissions": "0.29.0",
61
- "@inixiative/signet": "0.28.0",
62
- "@inixiative/rules-builder": "0.35.0",
63
- "@inixiative/transitions": "0.10.0"
62
+ "@inixiative/permissions": "0.30.0",
63
+ "@inixiative/signet": "0.29.0"
64
64
  }
65
65
  }