@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/dist/build-info.json +3 -3
- package/dist/cli.js +191 -83
- package/dist/commands/doctor.js +172 -27
- package/dist/commands/federation.js +44 -57
- package/dist/commands/init.js +64 -62
- package/dist/commands/rem.js +29 -2
- package/dist/commands/upgrade.js +85 -60
- package/dist/doctor-client.js +336 -138
- package/dist/hook-install.js +359 -176
- package/dist/install/clients.js +907 -208
- package/dist/lib/config-critical-section.js +557 -0
- package/dist/lib/doctor-run.js +107 -27
- package/dist/lib/embed-gpu-doctor.js +40 -7
- package/dist/lib/launchd-repair.js +103 -0
- package/dist/lib/owned-pins.js +255 -81
- package/dist/lib/pin-write-guard.js +87 -0
- package/dist/lib/settings-bytes.js +85 -0
- package/dist/lib/upgrade-plain-tree.js +293 -48
- package/dist/lib/upgrade-status.js +164 -0
- package/dist/lib/wiring-spec.js +238 -0
- package/dist/rem/promote-policy.js +102 -0
- package/dist/resources/MemoryReflect.js +10 -0
- package/dist/resources/auto-promote-lib.js +56 -0
- package/dist/resources/health.js +26 -0
- package/dist/resources/memory-reflect-lib.js +199 -6
- package/dist/resources/migrations/progress.js +17 -0
- package/dist/resources/migrations/runner.js +46 -27
- package/dist/resources/migrations/status.js +2 -1
- package/dist/src/rem/promote-policy.js +102 -0
- package/docs/deployment.md +38 -5
- package/docs/federation.md +19 -0
- package/docs/releasing.md +66 -22
- package/docs/standalone-local.md +7 -4
- package/package.json +3 -1
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
|
|
11
|
-
definition of "it boots" the rockit ritual
|
|
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
|
|
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
|
|
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
|
|
100
|
-
then `flair-bench` in its own step. Any
|
|
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
|
-
|
|
134
|
-
one page). Approve in dependency
|
|
135
|
-
|
|
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
|
-
|
|
180
|
-
|
|
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
|
-
|
|
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`
|
|
187
|
-
failed run aborts before `latest` moves.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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**
|
|
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
|
-
|
|
215
|
-
`
|
|
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
|
package/docs/standalone-local.md
CHANGED
|
@@ -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
|
-
|
|
92
|
-
|
|
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.
|
|
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"
|