@tpsdev-ai/flair 0.55.0 → 0.55.2

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/docs/releasing.md CHANGED
@@ -7,8 +7,9 @@ Flair publishes nine workspace packages to npm under `@tpsdev-ai/*`. Releases ar
7
7
  the staged tarballs on npmjs.com with 2FA. Approval makes the version public, but
8
8
  **not `latest`** — a credential-less post-publish canary installs that exact version
9
9
  from the registry and boots it on Linux and macOS. Only a canary PASS prints the
10
- sha256-bound promote command that moves `latest`; the canary runs on the same
11
- definition of "it boots" the rockit ritual uses (`scripts/ci/check-instance-boot.sh`).
10
+ sha256-bound promote commands that move `latest` — one per lockstep package, all
11
+ or none; the canary runs on the same definition of "it boots" the rockit ritual
12
+ uses (`scripts/ci/check-instance-boot.sh`).
12
13
 
13
14
  The staging tag is an **immutable property of the staged package** (`npm help stage`):
14
15
  re-staging the same version under a different tag requires `npm stage reject` first.
@@ -29,7 +30,7 @@ There is no "fix the stage in place" — you reject it and re-cut the next patch
29
30
  │ version + boots it
30
31
  canary PASS ───────┘
31
32
  │
32
- paste the emitted promote line
33
+ paste the emitted promote block
33
34
  ▼
34
35
  latest moves
35
36
  ```
@@ -94,10 +95,11 @@ workflow, which:
94
95
 
95
96
  1. Resolves the version from the tag and validates it as semver.
96
97
  2. Verifies the tagged commit is an ancestor of `main` (a tag can't ship un-merged code).
97
- 3. Verifies all 8 `package.json` files are at that version.
98
+ 3. Verifies every lockstep package's `package.json` is at that version.
98
99
  4. Builds every package.
99
- 5. Runs `npm stage publish` for each package in dependency order (flair-client first),
100
- then `flair-bench` in its own step. Any one of the eight failing fails the release.
100
+ 5. Runs `npm stage publish` for each lockstep package in dependency order
101
+ (flair-client first), then `flair-bench` in its own step. Any lockstep package
102
+ failing to stage fails the release.
101
103
 
102
104
  It authenticates via OIDC — no secrets, and it does **not** create or move any tag (the
103
105
  tag you pushed is the trigger). Watch the run; when it's green, the packages are staged
@@ -130,9 +132,10 @@ npm stage view <stage-id> # inspect one
130
132
  npm stage approve <stage-id> # 2FA prompt; package is made public under `staged`
131
133
  ```
132
134
 
133
- There are eight lockstep-staged packages, so eight approvals (the web UI lists them on
134
- one page). Approve in dependency order if installing immediately — flair-client before
135
- its dependents — though staging does not itself resolve dependencies.
135
+ The lockstep set is nine today (`node scripts/ci/lockstep-packages.mjs` prints the
136
+ list), so that many approvals (the web UI lists them on one page). Approve in dependency
137
+ order if installing immediately — flair-client before its dependents — though staging
138
+ does not itself resolve dependencies.
136
139
 
137
140
  Approval makes each version **public but not `latest`**: a user who runs the bare
138
141
  `npm install -g @tpsdev-ai/flair` still gets the previous `latest` until the promote
@@ -176,18 +179,59 @@ not run must not read as a pass.
176
179
 
177
180
  ### Phase 5 — promote `latest` (or deprecate)
178
181
 
179
- - **On PASS**, the canary emits the complete, sha256-bound promote command. Run it
180
- from a repo checkout on a machine logged into npm:
182
+ The promote is **lockstep**: every package the release staged moves together, or
183
+ none does. `flair` at `latest` 0.55.1 while `flair-client` / `flair-mcp` / the
184
+ plugins sit at 0.54.2 is exactly the mismatch `flair#1383` detects at runtime —
185
+ and 0.55.1's promote had to be assembled by hand, line by line, for this reason.
186
+
187
+ - **On PASS**, the canary emits the complete, sha256-bound promote block as ONE
188
+ snippet to paste once, from a repo checkout on a machine logged into npm. It
189
+ runs in two phases: it verifies EVERY package's published-tarball sha256 first
190
+ (so a registry hiccup mid-paste touches no tag), then runs the `npm dist-tag
191
+ add` lines — `@tpsdev-ai/flair` LAST, so a partial paste never leaves the CLI
192
+ ahead of its client library — then the skew check. Under 2FA each `dist-tag add`
193
+ may prompt for an OTP separately, so capture one code and pass it to all of them
194
+ with `--otp`:
181
195
 
182
196
  ```bash
183
- test "$(node scripts/ci/registry-tarball-sha256.mjs <ver>)" = "<sha256>" && npm dist-tag add @tpsdev-ai/flair@<ver> latest
197
+ set -e
198
+ OTP=123456 # fresh from your authenticator; valid for a short window
199
+
200
+ # 1. Preflight — every published tarball must hash to its recorded sha256.
201
+ test "$(node scripts/ci/registry-tarball-sha256.mjs <ver> @tpsdev-ai/flair-client)" = "<sha>"
202
+ test "$(node scripts/ci/registry-tarball-sha256.mjs <ver> @tpsdev-ai/flair-mcp)" = "<sha>"
203
+ # … one line per lockstep package; @tpsdev-ai/flair last …
204
+ test "$(node scripts/ci/registry-tarball-sha256.mjs <ver> @tpsdev-ai/flair)" = "<sha>"
205
+
206
+ # 2. Promote every lockstep package (`@tpsdev-ai/flair` LAST).
207
+ npm dist-tag add @tpsdev-ai/flair-client@<ver> latest --otp "$OTP"
208
+ npm dist-tag add @tpsdev-ai/flair-mcp@<ver> latest --otp "$OTP"
209
+ # … one line per lockstep package …
210
+ npm dist-tag add @tpsdev-ai/flair@<ver> latest --otp "$OTP"
211
+
212
+ # 3. Confirm the set converged.
213
+ node scripts/ci/registry-latest-skew.mjs <ver>
184
214
  ```
185
215
 
186
- The `test` is the integrity guard: a stale PASS, a re-cut version, or a paste from a
187
- failed run aborts before `latest` moves.
188
- - **On FAIL**, the version stays public but unpromoted. The canary emits the
189
- `npm deprecate` command; run it, then re-cut the next patch. A version is never
190
- refreshed in place.
216
+ The preflight `test` guards integrity: a stale PASS, a re-cut version, or a
217
+ paste from a failed run aborts before `latest` moves. Paste **all** of the block
218
+ or **none** — a partial paste is the skew this phase exists to prevent.
219
+
220
+ The block runs under bash; `scripts/ci/canary-verdict.sh` is bash **3.2**-safe,
221
+ so stock macOS `/bin/bash` runs it (and the emitted block) locally — no newer
222
+ bash required. Anything older than 3.2 fails fast with a clear message.
223
+ - **Confirm the set converged** — the last step, after pasting:
224
+
225
+ ```bash
226
+ node scripts/ci/registry-latest-skew.mjs <ver>
227
+ ```
228
+
229
+ It reads `dist-tags.latest` for every lockstep package and exits non-zero
230
+ naming any that disagree (or that differ from `<ver>`). The canary runs the same
231
+ check BEFORE the verdict, so a pre-existing skew is visible there too.
232
+ - **On FAIL**, the version stays public but unpromoted. The canary emits one
233
+ `npm deprecate` line per package; run them, then re-cut the next patch. A
234
+ version is never refreshed in place.
191
235
 
192
236
  ## One-time setup
193
237
 
@@ -195,7 +239,8 @@ These are configured once and reused for every release.
195
239
 
196
240
  ### npm trusted publisher (per package)
197
241
 
198
- For **each** of the eight packages, on npmjs.com → the package → **Settings → Trusted
242
+ For **each** lockstep package (nine today; `node scripts/ci/lockstep-packages.mjs`
243
+ prints the list), on npmjs.com → the package → **Settings → Trusted
199
244
  Publisher → Add**:
200
245
 
201
246
  | Field | Value |
@@ -211,10 +256,9 @@ Leave `npm publish` **unchecked** under allowed actions. This structurally preve
211
256
  CI/OIDC identity from publishing anything live directly — the only path to live is the
212
257
  human 2FA approval of a staged package.
213
258
 
214
- Packages: `flair-client`, `flair-mcp`, `flair`,
215
- `openclaw-flair`, `pi-flair`, `n8n-nodes-flair`, `langgraph-flair`, `flair-bench`.
216
-
217
- > `flair-tool-descriptors` is private and never published. Since flair#1683 it is a
259
+ Lockstep packages: the list `node scripts/ci/lockstep-packages.mjs` prints (root +
260
+ `packages/*` that are not `private`). `flair-tool-descriptors` is private and never
261
+ published; since flair#1683 it is a
218
262
  > **build-time source**: `scripts/vendor-tool-descriptors.mjs` copies it into each
219
263
  > consumer's own tree at prebuild (`resources/tool-descriptors/` for `flair`,
220
264
  > `packages/flair-mcp/src/tool-descriptors/` for `flair-mcp`) and the consumers
@@ -79,7 +79,7 @@ All configuration lives in `~/.flair/`:
79
79
 
80
80
  ```
81
81
  ~/.flair/
82
- ├── config.yaml # port, host, embedding model
82
+ ├── config.yaml # port, bind host, embedding model
83
83
  ├── data/ # Harper database (RocksDB)
84
84
  ├── keys/ # Ed25519 keypairs per agent (mode 0600)
85
85
  └── backups/ # flair backup output
@@ -87,10 +87,12 @@ All configuration lives in `~/.flair/`:
87
87
 
88
88
  ### Key config options (`~/.flair/config.yaml`)
89
89
 
90
+ Flair's own config file uses **top-level** keys — there is no nested `http:`
91
+ block, and no `http.host` (see [`deployment.md` — Direct network access](deployment.md#direct-network-access) for widening):
92
+
90
93
  ```yaml
91
- http:
92
- port: 19926 # API port (ops port = this - 1)
93
- host: 127.0.0.1 # bind address (0.0.0.0 for remote access)
94
+ port: 19926 # API port (ops port = this - 1)
95
+ httpBind: 127.0.0.1 # HTTP bind host; 0.0.0.0 widens (must include IPv4 loopback)
94
96
 
95
97
  clustering:
96
98
  nodeName: flair
@@ -108,6 +110,7 @@ logging:
108
110
  | `HDB_ADMIN_PASSWORD` | Bootstrap password for the embedded Harper. After first start, the persisted user record is the source of truth. | Set at install time. See [secrets-and-keys.md](secrets-and-keys.md) for rotation. |
109
111
  | `FLAIR_KEY_PASSPHRASE` | Passphrase for AES-256-GCM encryption of federation private-key seeds. | Set explicitly for production federation deployments. |
110
112
  | `FLAIR_URL` | Override the Flair base URL for CLI commands (points to a remote instance). | When connecting from a different machine. |
113
+ | `FLAIR_HTTP_BIND` | HTTP API bind host. Resolution order: `flair init --http-bind` > this variable > top-level `httpBind` in `~/.flair/config.yaml` > `127.0.0.1`. Only `127.0.0.1` or a wildcard (`0.0.0.0` / `::`) is accepted. | When the HTTP API must be reachable off-host; prefer recording it once with `flair init --http-bind 0.0.0.0`. See [deployment.md](deployment.md#direct-network-access). |
111
114
  | `FLAIR_EMBED_THREADS` | CPU threads for in-process embedding. Default is `max(1, availableParallelism() − 1)` — host-aware, one core left for Harper. | Pin a positive integer on a dedicated ingest host, or when the default leaves cores idle / oversubscribed. See [deployment.md](deployment.md#performance-related-environment-variables). |
112
115
  | `FLAIR_EMBED_GPU_LAYERS` | GPU layers to offload. Unset derives Metal (`99`) on Apple Silicon with a usable Metal prebuilt, else CPU (`0`). Stated on `/Health`. | Pin CPU with `0` on a Metal Mac, or force a layer count. See [deployment.md](deployment.md#performance-related-environment-variables). |
113
116
  | `FLAIR_HYBRID_RETRIEVAL` | Hybrid BM25 + vector retrieval (default on). | Set `false` to revert to HNSW-only. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tpsdev-ai/flair",
3
- "version": "0.55.0",
3
+ "version": "0.55.2",
4
4
  "packageManager": "bun@1.3.10",
5
5
  "description": "Identity, memory, and soul for AI agents. Cryptographic identity (Ed25519), semantic memory with local embeddings, and persistent personality — all in a single process.",
6
6
  "type": "module",
@@ -70,6 +70,7 @@
70
70
  "harper-fabric-embeddings": "^0.5.0",
71
71
  "jose": "6.2.2",
72
72
  "js-yaml": "^4.3.2",
73
+ "semver": "^7.8.5",
73
74
  "tar": "^7.5.22",
74
75
  "tweetnacl": "1.0.3"
75
76
  },
@@ -94,6 +95,7 @@
94
95
  "devDependencies": {
95
96
  "@playwright/test": "1.59.1",
96
97
  "@types/node": "24.11.0",
98
+ "@types/semver": "^7.8.0",
97
99
  "@types/tar": "7.0.87",
98
100
  "bun-types": "1.3.11",
99
101
  "typescript": "5.9.3"