@inixiative/config 0.5.257 → 0.5.259

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, signet → integrations, infra, 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, api-client) ships first; `agentic` (signet → archive, signet → kcp, signet → integrations, infra, 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
 
@@ -91,7 +91,7 @@ bunx @inixiative/config bounded [--minutes=40] [--memory-gb=12] [--wait-minutes=
91
91
 
92
92
  ### check
93
93
 
94
- `check` is read-only and exits non-zero on drift; run it in CI after a frozen-lockfile install. It verifies toolchain pins (declared once, at the root, pinned exactly: a workspace member declaring one is an error, and `bun.lock` must resolve each only to its pin, with no second copy), toolchain peer ranges (they must admit the pin and no older major; `sync` writes `>=<pin major>.<pin minor>.0`), `"latest"` ranges, `packageManager`/`.bun-version`, legacy `bun.lockb`, a committed (tracked, un-ignored) `bun.lock`, a gitignored `tmp/` (scratch space; `sync` adds `/tmp/*`, which keeps re-included files tracked), required scripts (`typecheck`/`lint`/`test`), the `check` script's shape (it runs `check:all` through `bounded`, see below), lefthook (dep + `lefthook.yml` extending the shared hooks + `prepare` script; git repos only), stub `extends`, presence of this package, and for every `@inixiative/*` dependency (in the root or any workspace member, of either lane) that the declared range admits the blessed version and the lockfile resolves to it (the stale-lockfile class). A package with a candidate (one no hold covers) also accepts the candidate and anything between: a range admitting either passes, and so does a lock from the blessed version up to the candidate. A range that does not admit the blessed version is rewritten to `^<blessed>`, except an exact pin, which stays exact and moves to the blessed version. An npm alias (`"@inixiative/session-archive": "npm:@inixiative/archive@^0.2.1"`) is held to its target's blessed version and rewritten as an alias; `workspace:`, `file:` and `link:` ranges are a repo linking itself and are left alone.
94
+ `check` is read-only and exits non-zero on drift; run it in CI after a frozen-lockfile install. It verifies toolchain pins (declared once, at the root, pinned exactly: a workspace member declaring one is an error, and `bun.lock` must resolve each only to its pin, with no second copy), toolchain peer ranges (they must admit the pin and no older major; `sync` writes `>=<pin major>.<pin minor>.0`), `"latest"` ranges, `packageManager`/`.bun-version`, legacy `bun.lockb`, a committed (tracked, un-ignored) `bun.lock`, a gitignored `tmp/` (scratch space; `sync` adds `/tmp/*`, which keeps re-included files tracked), required scripts (`typecheck`/`lint`/`test`), the `check` script's shape (it runs `check:all` through `bounded`, see below), lefthook (dep + `lefthook.yml` extending the shared hooks + `prepare` script; git repos only), stub `extends`, presence of this package, and for every `@inixiative/*` dependency (in the root or any workspace member, of either lane) that the declared range admits the blessed version and the lockfile resolves to it (the stale-lockfile class). A package with a candidate (one no hold covers) also accepts the candidate and anything between: a range admitting either passes, and so does a lock from the blessed version up to the candidate. A range that does not admit the blessed version is rewritten to `^<blessed>`, except an exact pin, which stays exact and moves to the blessed version. A range that does not admit the blessed version or the candidate and whose floor is above the blessed version is never lowered (the highest floor of an `||` range counts): it names a release the repo already relies on that its lane has not recorded or adopted yet (published outside a train, by the other lane's consumer moving first, or between the blessed version and a candidate), and lowering it would take away code the repo already uses. `check` reports it as an error (`ecosystem-ahead`, "record X on its lane's train") with no fix, and the lane's next train records the release. The one exception is a hold: a range at or above a held version is rewritten down to the blessed one, since pulling consumers off the held line is what the hold is for. An npm alias (`"@inixiative/session-archive": "npm:@inixiative/archive@^0.2.1"`) is held to its target's blessed version and rewritten as an alias; `workspace:`, `file:` and `link:` ranges are a repo linking itself and are left alone.
95
95
 
96
96
  ### bounded
97
97
 
@@ -142,7 +142,7 @@ Per repo, in `scripts/ci/retired-terms/` (the same shape as template's doc-fresh
142
142
 
143
143
  `train` is the release cascade, run from a git checkout of this repo; it refuses to train from a copy that isn't one (a bunx or npm cache). One train at a time per machine: it takes one machine-wide lock, `~/.inixiative/train.lock`, shared by every clone, worktree and lane, and refuses to start while another train holds it, naming the holder and the lock path. The lock is created atomically and records the holder's pid, hostname and process start time. A lock is stale, and taken over, when its process is gone, its pid now belongs to a different process, or the file can't be parsed. A lock from another host is never judged stale; if its train is gone, delete the file. The lock is released on exit and on SIGINT, SIGTERM or SIGHUP. `--dry-run` takes no lock. It walks every lane in order (primitives, then agentic), or only the lane `--lane` names. Origin is the truth: it refuses to run from a config checkout behind origin, and it fast-forwards clean checkouts to origin before working (dirty or diverged repos still skip). It only ships the default branch: a checkout on a feature branch is skipped whole: never re-locked, committed to, or published from.
144
144
 
145
- Lanes stand alone. A lane with a package missing a checkout, or claimed by ambiguous checkouts, does not run; a lane whose own check (not one against candidates, below), commit or publish fails stops there: what it already published stays a candidate, and none of its candidates is blessed that run. Neither holds back the other lane. Within a lane it walks checkouts in dependency order; per checkout it: bumps `@inixiative/*` ranges to the blessed sets with their candidates in place → re-locks → runs the repo's `check` → commits only its own changes (`package.json` files + `bun.lock`) → publishes each lane package whose local version is ahead of npm, in dependency order, and waits until the registry serves it (up to 15 minutes, since npm holds new versions for processing) → records it as a candidate in the BOM.
145
+ Lanes stand alone. A lane with a package missing a checkout, or claimed by ambiguous checkouts, does not run; a lane whose own check (not one against candidates, below), commit or publish fails stops there: what it already published stays a candidate, and none of its candidates is blessed that run. Neither holds back the other lane. Within a lane it walks checkouts in dependency order; per checkout it: bumps `@inixiative/*` ranges to the blessed sets with their candidates in place (never lowering one that is ahead of them, unless a hold covers it; see `check`) → re-locks → runs the repo's `check` → commits only its own changes (`package.json` files + `bun.lock`) → publishes each lane package whose local version is ahead of npm, in dependency order, and waits until the registry serves it (up to 15 minutes, since npm holds new versions for processing) → records it as a candidate in the BOM.
146
146
 
147
147
  Blessing is two-phase, so a dependent that needs work never deadlocks a release:
148
148
 
@@ -172,7 +172,7 @@ Every version at or above `below` is held; versions below it ride the train as u
172
172
  - still publishes when the package's local version is ahead of npm, and is never recorded;
173
173
  - is never rediscovered as a candidate when it is already on npm at the local version;
174
174
  - is never applied or blessed when it is already recorded under `candidates`: no lane checkout or consumer is moved onto it, and it stays where it is;
175
- - is never accepted by `check`, which holds the package to its blessed version and any candidate below the hold.
175
+ - is never accepted by `check`, which holds the package to its blessed version and any candidate below the hold, and rewrites a range at or above the hold down to the blessed version (the only case where a range is lowered).
176
176
 
177
177
  `scan` and the train's summary print each hold with its reason, and name a held candidate as not applied. Lifting a hold is deleting its entry: the next train records the held version found on npm at the local version (or applies the held candidate) and adopts it like any other.
178
178
 
@@ -215,7 +215,7 @@ One agent runs every train: the release conductor, a Foundry schedule on this re
215
215
 
216
216
  Two lanes, each publishing in dependency order, with config last:
217
217
 
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.
218
+ - **primitives:** for example field-map → json-rules → permissions → transitions → rules-builder, plus prisma-map (retiring into field-map), atlas, gloss and api-client (the code for calling an API, no inixiative dependencies; integrations and infra in the agentic lane build on it). Consumers: template, kingdom.
219
219
  - **agentic:** signet, kcp (the Kingdom CLI proxy, on signet), integrations (the public provider catalog, on signet), infra (stateless hosting drivers, no inixiative dependencies), 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; its `init` moves onto infra in INFRA-050).
220
220
 
221
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
@@ -236,11 +236,13 @@ var peerFloor = (pin) => {
236
236
  };
237
237
  var admitsOlderMajor = (range, pin) => {
238
238
  const pinMajor = Number(pin.split(".")[0]);
239
- return range.split("||").some((part) => {
240
- const parsed = parseRange(part.trim());
241
- return !!parsed && Number(parsed.version.split(".")[0]) < pinMajor;
242
- });
239
+ return rangeFloors(range).some((floor) => Number(floor.split(".")[0]) < pinMajor);
243
240
  };
241
+ var rangeFloors = (range) => range.split("||").flatMap((part) => parseRange(part.trim())?.version ?? []);
242
+ var highestFloor = (range) => rangeFloors(range).reduce(
243
+ (top, floor) => !top || compare(floor, top) > 0 ? floor : top,
244
+ void 0
245
+ );
244
246
  var npmAlias = (spec) => {
245
247
  const match = spec.match(/^npm:((?:@[^/@]+\/)?[^@]+)@(.+)$/);
246
248
  return match ? { name: match[1], range: match[2] } : null;
@@ -799,7 +801,18 @@ function inspect(dir2, manifest2, presetOverride) {
799
801
  const okCandidate = candidate ? admits(range, candidate) : false;
800
802
  const ok = okBlessed === true || okCandidate === true ? true : okBlessed;
801
803
  const accepted = candidate === blessed ? `candidate ${candidate}` : `blessed ${blessed}${candidate ? ` or candidate ${candidate}` : ""}`;
802
- if (ok === false) {
804
+ const floor = highestFloor(range);
805
+ const ahead = ok === false && !!floor && compare(floor, blessed) > 0 && !holdOf(manifest2, name, floor);
806
+ if (ahead) {
807
+ findings.push({
808
+ level: "error",
809
+ kind: "ecosystem-ahead",
810
+ name,
811
+ target: name,
812
+ message: `${target.label}${key} ${field} range ${spec} is ahead of ${accepted}; never lowered \u2192 record ${name}@${floor} on its lane's train`
813
+ });
814
+ }
815
+ if (ok === false && !ahead) {
803
816
  const next = /^\d+\.\d+\.\d+(?:-[\w.-]+)?$/.test(range) ? blessed : `^${blessed}`;
804
817
  findings.push({
805
818
  level: "error",
@@ -832,7 +845,7 @@ function inspect(dir2, manifest2, presetOverride) {
832
845
  path: target.path,
833
846
  message: `${target.label}${key} locked at ${locked}, violating declared ${spec} (stale lockfile) \u2192 re-lock`
834
847
  });
835
- } else if (locked && !lockAccepted) {
848
+ } else if (locked && !lockAccepted && !ahead) {
836
849
  staleKeys.add(key);
837
850
  findings.push({
838
851
  level: "error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inixiative/config",
3
- "version": "0.5.257",
3
+ "version": "0.5.259",
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,7 +13,7 @@
13
13
  "@types/bun"
14
14
  ],
15
15
  "ecosystem": {
16
- "@inixiative/config": "0.5.257",
16
+ "@inixiative/config": "0.5.259",
17
17
  "@inixiative/field-map": "0.1.1",
18
18
  "@inixiative/json-rules": "3.16.0",
19
19
  "@inixiative/permissions": "0.25.0",
@@ -21,12 +21,13 @@
21
21
  "@inixiative/rules-builder": "0.35.0",
22
22
  "@inixiative/prisma-map": "0.4.1",
23
23
  "@inixiative/atlas": "0.4.1",
24
- "@inixiative/gloss": "0.1.1"
24
+ "@inixiative/gloss": "0.1.1",
25
+ "@inixiative/api-client": "0.2.8"
25
26
  },
26
27
  "agentic": {
27
28
  "@inixiative/signet": "0.29.0",
28
29
  "@inixiative/integrations": "0.2.1",
29
- "@inixiative/infra": "0.1.1",
30
+ "@inixiative/infra": "0.1.2",
30
31
  "@inixiative/kcp": "0.2.3",
31
32
  "@inixiative/archive": "0.35.2",
32
33
  "@inixiative/agent-session": "0.12.0",
@@ -54,20 +55,16 @@
54
55
  ]
55
56
  }
56
57
  },
57
- "holds": {
58
- "@inixiative/integrations": {
59
- "below": "0.3.0",
60
- "reason": "0.3.0 removes the google and github provider keys; Kingdom's family integrations and template's Provider enum still use them",
61
- "until": "the FEAT-034 build in template and Kingdom (after template #338)",
62
- "owner": "inixiative-fb"
63
- }
64
- },
58
+ "holds": {},
65
59
  "candidates": {
66
60
  "@inixiative/atlas": "0.5.1",
67
- "@inixiative/json-rules": "4.7.0",
61
+ "@inixiative/json-rules": "4.9.0",
68
62
  "@inixiative/agent-session": "0.23.0",
69
63
  "@inixiative/field-map": "0.1.2",
70
64
  "@inixiative/permissions": "0.30.0",
71
- "@inixiative/infra": "0.1.2"
65
+ "@inixiative/integrations": "0.4.2",
66
+ "@inixiative/infra": "0.3.6",
67
+ "@inixiative/rules-builder": "0.36.1",
68
+ "@inixiative/transitions": "0.10.1"
72
69
  }
73
70
  }