@inixiative/config 0.5.42 → 0.5.44

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
@@ -52,7 +52,7 @@ One version of `@inixiative/config` names one coherent ecosystem state:
52
52
  }
53
53
  ```
54
54
 
55
- A lane is a release cascade with its own blessed set. `primitives` (json-rules, permissions, transitions, rules-builder, prisma-map, atlas, gloss, archive) ships first; `agentic` (agent-session → foundry-core → foundry) 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.
55
+ A lane is a release cascade with its own blessed set. `primitives` (json-rules, permissions, transitions, rules-builder, prisma-map, atlas, gloss) ships first; `agentic` (archive, agent-session → foundry-core → foundry) 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.
56
56
 
57
57
  TypeScript 6.0 notes, discovered by this repo's fixture suite:
58
58
 
@@ -66,8 +66,11 @@ bunx @inixiative/config check [dir] [--preset=base|node|react]
66
66
  bunx @inixiative/config sync [dir] [--preset=...] [--force] [--no-install]
67
67
  bunx @inixiative/config scan [root] [--lane=primitives|agentic]
68
68
  bunx @inixiative/config train [root] [--lane=primitives|agentic] [--push]
69
+ bunx @inixiative/config ports [project]
69
70
  ```
70
71
 
72
+ `ports` prints each project's local ports from `ports.json` (also exported as `@inixiative/config/ports.json`). A project's port for a service is the service's usual default plus 100 times the project's block, so no two projects collide and none sits on a default: Archive (block 7) serves HTTP on 4700 with Postgres on 6132; Kingdom (block 2) has web 3200, API 8200, Postgres 5632, Redis 6579. Reserved ports (macOS AirPlay on 5000 and 7000) are never assigned. Give a new project the next free block, and a new kind of service its usual default; the tests fail on any collision.
73
+
71
74
  `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 (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`, required scripts (`check`/`typecheck`/`lint`/`test`), lefthook (dep + `lefthook.yml` extending the shared hooks + `prepare` script; git repos only), stub `extends`, presence of this package, and for every ecosystem dependency — in the root or any workspace member, of either lane — that the declared range admits the blessed version and the lockfile actually resolves to it (the stale-lockfile class). 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.
72
75
 
73
76
  `sync` applies every fix (deleting member toolchain entries and their stale member links), re-locks via `bun install` (`--force` when a second toolchain copy survives), and runs `bun update` on stale ecosystem entries in the directory that declares them. It refuses to run on a dirty working tree without `--force`. The react preset is inferred from a `react` dependency; override with `--preset`. Missing scripts are filled with defaults; existing script bodies are never touched.
@@ -105,7 +108,7 @@ jobs:
105
108
 
106
109
  Two lanes, each publishing in dependency order, with config last:
107
110
 
108
- - **primitives** — for example json-rules → permissions → transitions → rules-builder, plus prisma-map, atlas, gloss and archive (a standalone MIT package). Consumers: template, kingdom.
109
- - **agentic** — agent-session → foundry-core → foundry, built on the primitives' blessed set. foundry-core and foundry publish from the foundry monorepo's `packages/core` and `packages/foundry`. Consumers: oracle (a private leaf), kingdom.
111
+ - **primitives** — for example json-rules → permissions → transitions → rules-builder, plus prisma-map, atlas and gloss. Consumers: template, kingdom.
112
+ - **agentic** — archive and agent-session, then foundry-core → foundry (foundry depends on archive), built on the primitives' blessed set. foundry-core and foundry publish from the foundry monorepo's `packages/core` and `packages/foundry`. Consumers: oracle (a private leaf), kingdom.
110
113
 
111
114
  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 PRs included. Downstream repos pick up toolchain changes via `sync`.
package/dist/cli.js CHANGED
@@ -789,6 +789,48 @@ function inspect(dir2, manifest2, presetOverride) {
789
789
  };
790
790
  }
791
791
 
792
+ // ports.json
793
+ var ports_default = {
794
+ $comment: "Local port registry. A project's port for a service is the service's default plus 100 times the project's block, so projects never collide and none uses a default. Add a project at the next free block; add a service with its usual default.",
795
+ blockSize: 100,
796
+ reserved: {
797
+ "5000": "macOS AirPlay Receiver",
798
+ "7000": "macOS AirPlay Receiver"
799
+ },
800
+ services: {
801
+ web: 3e3,
802
+ admin: 3001,
803
+ superadmin: 3002,
804
+ http: 4e3,
805
+ postgres: 5432,
806
+ redis: 6379,
807
+ api: 8e3,
808
+ muninn: 8475,
809
+ muninnUi: 8476,
810
+ minio: 9e3,
811
+ minioConsole: 9001
812
+ },
813
+ projects: {
814
+ template: 1,
815
+ kingdom: 2,
816
+ tribe: 3,
817
+ zealot: 4,
818
+ foundry: 5,
819
+ oracle: 6,
820
+ archive: 7
821
+ }
822
+ };
823
+
824
+ // src/ports.ts
825
+ var projects = Object.keys(ports_default.projects);
826
+ var services = Object.keys(ports_default.services);
827
+ function portsFor(project) {
828
+ const offset = ports_default.projects[project] * ports_default.blockSize;
829
+ return Object.fromEntries(
830
+ services.map((service) => [service, ports_default.services[service] + offset])
831
+ );
832
+ }
833
+
792
834
  // src/cli.ts
793
835
  var args = process.argv.slice(2);
794
836
  var command = args[0];
@@ -799,10 +841,19 @@ var positional = args.slice(1).filter((arg) => !arg.startsWith("--"));
799
841
  var dir = resolve(positional[0] ?? ".");
800
842
  var usage = () => {
801
843
  console.log(
802
- "Usage: inixiative-config <check|sync|scan|train> [dir] [--preset=base|node|react] [--lane=primitives|agentic] [--force] [--no-install] [--push]"
844
+ "Usage: inixiative-config <check|sync|scan|train> [dir] [--preset=base|node|react] [--lane=primitives|agentic] [--force] [--no-install] [--push]\n inixiative-config ports [project]"
803
845
  );
804
846
  process.exit(2);
805
847
  };
848
+ if (command === "ports") {
849
+ const project = positional[0];
850
+ if (project !== void 0 && !projects.includes(project)) usage();
851
+ for (const name of project ? [project] : projects)
852
+ console.log(
853
+ `${name}: ${Object.entries(portsFor(name)).map(([service, port]) => `${service}=${port}`).join(" ")}`
854
+ );
855
+ process.exit(0);
856
+ }
806
857
  if (!["check", "sync", "scan", "train"].includes(command)) usage();
807
858
  if (presetFlag && !["base", "node", "react"].includes(presetFlag)) usage();
808
859
  if (laneFlag !== void 0 && !isLane(laneFlag)) usage();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inixiative/config",
3
- "version": "0.5.42",
3
+ "version": "0.5.44",
4
4
  "description": "Shared toolchain for the inixiative ecosystem: tsconfig/biome/tsup presets, a version manifest (BOM), and a sync/check CLI",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -21,7 +21,8 @@
21
21
  "biome",
22
22
  "lefthook",
23
23
  "versions.json",
24
- "README.md"
24
+ "README.md",
25
+ "ports.json"
25
26
  ],
26
27
  "exports": {
27
28
  "./versions.json": "./versions.json",
@@ -34,7 +35,8 @@
34
35
  "./tsup": {
35
36
  "types": "./dist/tsup.d.ts",
36
37
  "import": "./dist/tsup.js"
37
- }
38
+ },
39
+ "./ports.json": "./ports.json"
38
40
  },
39
41
  "scripts": {
40
42
  "prepare": "lefthook install",
package/ports.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "$comment": "Local port registry. A project's port for a service is the service's default plus 100 times the project's block, so projects never collide and none uses a default. Add a project at the next free block; add a service with its usual default.",
3
+ "blockSize": 100,
4
+ "reserved": {
5
+ "5000": "macOS AirPlay Receiver",
6
+ "7000": "macOS AirPlay Receiver"
7
+ },
8
+ "services": {
9
+ "web": 3000,
10
+ "admin": 3001,
11
+ "superadmin": 3002,
12
+ "http": 4000,
13
+ "postgres": 5432,
14
+ "redis": 6379,
15
+ "api": 8000,
16
+ "muninn": 8475,
17
+ "muninnUi": 8476,
18
+ "minio": 9000,
19
+ "minioConsole": 9001
20
+ },
21
+ "projects": {
22
+ "template": 1,
23
+ "kingdom": 2,
24
+ "tribe": 3,
25
+ "zealot": 4,
26
+ "foundry": 5,
27
+ "oracle": 6,
28
+ "archive": 7
29
+ }
30
+ }
package/versions.json CHANGED
@@ -13,17 +13,17 @@
13
13
  "@types/bun"
14
14
  ],
15
15
  "ecosystem": {
16
- "@inixiative/config": "0.5.42",
17
- "@inixiative/json-rules": "2.25.0",
18
- "@inixiative/permissions": "0.3.2",
16
+ "@inixiative/config": "0.5.44",
17
+ "@inixiative/json-rules": "2.26.0",
18
+ "@inixiative/permissions": "0.3.3",
19
19
  "@inixiative/transitions": "0.1.0",
20
20
  "@inixiative/rules-builder": "0.28.0",
21
21
  "@inixiative/prisma-map": "0.2.0",
22
22
  "@inixiative/atlas": "0.1.1",
23
- "@inixiative/gloss": "0.0.4",
24
- "@inixiative/archive": "0.5.1"
23
+ "@inixiative/gloss": "0.0.4"
25
24
  },
26
25
  "agentic": {
26
+ "@inixiative/archive": "0.6.0",
27
27
  "@inixiative/agent-session": "0.3.1",
28
28
  "@inixiative/foundry-core": "0.2.0",
29
29
  "@inixiative/foundry": "0.2.0"