@tpsdev-ai/flair 0.44.12 → 0.44.13
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 +1 -1
- package/dist/resources/SemanticSearch.js +7 -10
- package/docs/deploying-on-fabric.md +3 -0
- package/docs/deployment-shapes.md +1 -1
- package/docs/deployment.md +5 -4
- package/docs/hosted-on-fabric.md +2 -0
- package/docs/integrations.md +2 -1
- package/docs/quickstart-fabric.md +106 -0
- package/docs/quickstart.md +2 -0
- package/docs/standalone-local.md +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -347,7 +347,7 @@ flair agent add otherbot --target https://your-server:19926
|
|
|
347
347
|
|
|
348
348
|
### Harper Fabric
|
|
349
349
|
|
|
350
|
-
Managed hosting with multi-region replication and failover.
|
|
350
|
+
Managed hosting with multi-region replication and failover. Need a public URL for Cursor / Grok Bot / cloud agents? Start at **[docs/quickstart-fabric.md](docs/quickstart-fabric.md)**. Federation, pairing, and operator detail: **[docs/deploying-on-fabric.md](docs/deploying-on-fabric.md)**.
|
|
351
351
|
|
|
352
352
|
## Security
|
|
353
353
|
|
|
@@ -126,29 +126,26 @@ export class SemanticSearch extends Resource {
|
|
|
126
126
|
let temporalBoost = 1.0;
|
|
127
127
|
if (q && !sinceDate) {
|
|
128
128
|
const lq = String(q).toLowerCase();
|
|
129
|
+
// flair#1245: a text-derived temporal match must ONLY nudge recency in
|
|
130
|
+
// ranking (temporalBoost, a soft multiplier applied in
|
|
131
|
+
// semantic-retrieval-core.ts) — it must NEVER derive a hard `sinceDate`
|
|
132
|
+
// exclusion. An incidental temporal word in the query TEXT (the #1245
|
|
133
|
+
// canary carried "today" inside a slogan) otherwise silently dropped
|
|
134
|
+
// every candidate older than the window → 0 results. Only the explicit
|
|
135
|
+
// `since` API param (set above, untouched here) still hard-filters.
|
|
129
136
|
if (/\btoday\b|\bthis morning\b|\bthis afternoon\b/.test(lq)) {
|
|
130
|
-
const d = new Date();
|
|
131
|
-
d.setHours(0, 0, 0, 0);
|
|
132
|
-
sinceDate = d;
|
|
133
137
|
temporalBoost = 1.5;
|
|
134
138
|
}
|
|
135
139
|
else if (/\byesterday\b/.test(lq)) {
|
|
136
|
-
const d = new Date();
|
|
137
|
-
d.setDate(d.getDate() - 1);
|
|
138
|
-
d.setHours(0, 0, 0, 0);
|
|
139
|
-
sinceDate = d;
|
|
140
140
|
temporalBoost = 1.3;
|
|
141
141
|
}
|
|
142
142
|
else if (/\bthis week\b|\blast few days\b/.test(lq)) {
|
|
143
|
-
sinceDate = new Date(Date.now() - 7 * 24 * 3600_000);
|
|
144
143
|
temporalBoost = 1.2;
|
|
145
144
|
}
|
|
146
145
|
else if (/\blast week\b/.test(lq)) {
|
|
147
|
-
sinceDate = new Date(Date.now() - 14 * 24 * 3600_000);
|
|
148
146
|
temporalBoost = 1.1;
|
|
149
147
|
}
|
|
150
148
|
else if (/\brecently\b|\blately\b/.test(lq)) {
|
|
151
|
-
sinceDate = new Date(Date.now() - 3 * 24 * 3600_000);
|
|
152
149
|
temporalBoost = 1.3;
|
|
153
150
|
}
|
|
154
151
|
}
|
|
@@ -21,6 +21,9 @@ you already have, [Remote Server](../README.md#remote-server) is simpler and kee
|
|
|
21
21
|
|
|
22
22
|
## Quickstart
|
|
23
23
|
|
|
24
|
+
New user who just needs a reachable `FLAIR_URL` for Cursor / Grok Bot? Start at
|
|
25
|
+
[quickstart-fabric.md](quickstart-fabric.md). This page is the operator path.
|
|
26
|
+
|
|
24
27
|
### 1. Deploy the component
|
|
25
28
|
|
|
26
29
|
```bash
|
|
@@ -5,7 +5,7 @@ Flair runs in one of three shapes. Pick yours and follow only that path.
|
|
|
5
5
|
| You want to... | Shape | Start here |
|
|
6
6
|
|---|---|---|
|
|
7
7
|
| Run Flair on your own machine or VPS. `flair init` installs Harper, creates your agent identity, and you're running. | **Standalone local** | [standalone-local.md](standalone-local.md) |
|
|
8
|
-
| Run Flair on [Harper Fabric](https://www.harperdb.io/) — managed hosting, multi-region replication, no shell on the node. You deploy a component; agents connect over HTTPS. | **Hosted on Fabric** | [hosted-on-fabric.md](hosted-on-fabric.md) |
|
|
8
|
+
| Run Flair on [Harper Fabric](https://www.harperdb.io/) — managed hosting, multi-region replication, no shell on the node. You deploy a component; agents connect over HTTPS. | **Hosted on Fabric** | [quickstart-fabric.md](quickstart-fabric.md) (new-user URL) · [hosted-on-fabric.md](hosted-on-fabric.md) |
|
|
9
9
|
| Load Flair into a Harper instance you already run. In-process calls — no HTTP, no second process, no key to distribute. Over HTTP it is one memory API among many. | **Embedded in a Harper app** | [embedding-in-a-harper-app.md](embedding-in-a-harper-app.md) |
|
|
10
10
|
|
|
11
11
|
---
|
package/docs/deployment.md
CHANGED
|
@@ -116,10 +116,11 @@ Note: embeddings run on CPU in Docker (no Metal acceleration). Performance is ac
|
|
|
116
116
|
|
|
117
117
|
Deploying to a Harper Fabric cluster is a different mechanism from the installs above — `flair deploy` pushes Flair as a cluster component instead of `npm install -g`. To upgrade an already-deployed Fabric instance in place, use `FABRIC_USER=<admin> FABRIC_PASSWORD=<pass> flair upgrade --target <fabric-url>` (or `--fabric-password-file <path>` in place of the env var), not the local upgrade path. Inline `--fabric-user`/`--fabric-password` flags also work but are discouraged — both leak to shell history and `ps`. See [`docs/upgrade.md` — Upgrading a Fabric-deployed instance](upgrade.md#upgrading-a-fabric-deployed-instance) for the full walkthrough, including the automatic post-deploy fleet-convergence sweep.
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
New user who needs a reachable `FLAIR_URL` for Cursor / Grok Bot? Start at
|
|
120
|
+
[`docs/quickstart-fabric.md`](quickstart-fabric.md). For the hosted shape end to
|
|
121
|
+
end — when to choose it, ports and auth against a managed Fabric endpoint, pairing
|
|
122
|
+
local spokes to a hosted hub, and what you can and cannot observe without a shell
|
|
123
|
+
on the node — see [`docs/deploying-on-fabric.md`](deploying-on-fabric.md).
|
|
123
124
|
|
|
124
125
|
---
|
|
125
126
|
|
package/docs/hosted-on-fabric.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Deploy Flair as a component to a [Harper Fabric](https://www.harperdb.io/) instance. You do not run the Harper process yourself: managed hosting, multi-region replication, no shell on the node.
|
|
4
4
|
|
|
5
|
+
Need a public URL for Cursor / Grok Bot / cloud agents? Start at [quickstart-fabric.md](quickstart-fabric.md).
|
|
6
|
+
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
## Deploy
|
package/docs/integrations.md
CHANGED
|
@@ -195,7 +195,8 @@ If it has a custom memory protocol, the adapter pattern is small (~200 lines). L
|
|
|
195
195
|
|
|
196
196
|
## See also
|
|
197
197
|
|
|
198
|
-
- [Quickstart](quickstart.md) — `flair init` to working memory
|
|
198
|
+
- [Quickstart](quickstart.md) — `flair init` to working memory on a laptop
|
|
199
|
+
- [Fabric Quickstart](quickstart-fabric.md) — `flair deploy` to a reachable Harper Fabric URL
|
|
199
200
|
- [Embedding in a Harper app](embedding-in-a-harper-app.md) — run Flair as a component of your own Harper instance and call it in-process
|
|
200
201
|
- [Memory bridges](bridges.md) — import/export Flair ↔ Mem0, ChatGPT, claude-project, markdown, agentic-stack (five bridges shipped)
|
|
201
202
|
- [Federation](federation.md) — pair instances peer-to-peer for cross-machine sync
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Fabric Quick Start
|
|
2
|
+
|
|
3
|
+
From zero to a **reachable** Flair URL — so Cursor, Grok Bot, and cloud agents can actually hit it.
|
|
4
|
+
|
|
5
|
+
Laptop Flair from [`docs/quickstart.md`](quickstart.md) listens on `127.0.0.1:19926`. That loopback origin is not reachable from Grok Bot or Cursor cloud agents. This page is the start path when you need a public HTTPS origin.
|
|
6
|
+
|
|
7
|
+
Fabric is **Harper-hosted**, not a Flair-operated cloud. You deploy Flair as a component onto [Harper Fabric](https://www.harperdb.io/).
|
|
8
|
+
|
|
9
|
+
## 0. Prerequisites
|
|
10
|
+
|
|
11
|
+
**Node.js 22 or newer**, a user-writable npm global prefix (do not install with `sudo` — same rule as the [local Quick Start](quickstart.md#0-prerequisites)), and **a Harper Fabric account** ([harperdb.io](https://www.harperdb.io/)). You need the org name, cluster name, and admin credentials for that account.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
node --version # v22.x.x or newer
|
|
15
|
+
npm i -g @tpsdev-ai/flair
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Lead with environment credentials so they stay out of `ps` and shell history:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
export FABRIC_USER=<admin>
|
|
22
|
+
export FABRIC_PASSWORD=<pass>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Scripting? Use `--fabric-password-file <path>` (mode `0600`) instead of `FABRIC_PASSWORD`. Inline `--fabric-password` works and leaks — do not lead with it.
|
|
26
|
+
|
|
27
|
+
`FABRIC_ORG` / `FABRIC_CLUSTER` can stand in for the flags below. `--fabric-token` is accepted but **fails** — Fabric `deploy_component` is Basic-auth only.
|
|
28
|
+
|
|
29
|
+
## 1. Deploy
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Validate args and package layout without deploying
|
|
33
|
+
flair deploy --fabric-org <org> --fabric-cluster <cluster> --dry-run
|
|
34
|
+
|
|
35
|
+
flair deploy --fabric-org <org> --fabric-cluster <cluster>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The target defaults to `https://<cluster>.<org>.harperfabric.com`. Override with `--target` if your instance URL is different. `flair deploy` writes `FLAIR_PUBLIC_URL` to that same origin so OAuth and A2A discovery do not advertise loopback.
|
|
39
|
+
|
|
40
|
+
## 2. What success looks like
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
→ Deploying flair to https://<cluster>.<org>.harperfabric.com
|
|
44
|
+
|
|
45
|
+
✓ Flair vX.Y.Z deployed and verified serving
|
|
46
|
+
|
|
47
|
+
URL: https://<cluster>.<org>.harperfabric.com
|
|
48
|
+
Project: flair
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
A fleet-verify table follows. That HTTPS origin is your `FLAIR_URL`.
|
|
52
|
+
|
|
53
|
+
Then set an admin password in Fabric Studio (Cluster Settings → Admin). `flair agent add` against a remote instance requires `--admin-pass` — it will not reuse `~/.flair/admin-pass` or `FLAIR_ADMIN_PASS` from your laptop.
|
|
54
|
+
|
|
55
|
+
## 3. Register an agent against the remote instance
|
|
56
|
+
|
|
57
|
+
`flair agent add` takes a positional id and `--target`. There is no `--remote` flag on this command (`--remote` belongs to `flair init`).
|
|
58
|
+
|
|
59
|
+
On Fabric, ops lives on the **same hostname at port 9925**, not the CLI's default "data port − 1" derivation (that would be `:442`, where nothing answers). Pass `--ops-target` explicitly: <!-- docs-freshness-allow: Fabric ops API port, not legacy data port -->
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
export FLAIR_URL=https://<cluster>.<org>.harperfabric.com
|
|
63
|
+
|
|
64
|
+
# Fabric ops is :9925 on the same host, not derived :442. docs-freshness-allow: Fabric ops API
|
|
65
|
+
flair agent add mybot --target "$FLAIR_URL" --ops-target https://<cluster>.<org>.harperfabric.com:9925 --admin-pass <fabric-admin-password>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Keypair written: ~/.flair/keys/mybot.key
|
|
70
|
+
✅ Agent 'mybot' (mybot) registered (ops: https://<cluster>.<org>.harperfabric.com:9925) <!-- docs-freshness-allow: Fabric ops API -->
|
|
71
|
+
Private key: ~/.flair/keys/mybot.key
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The private key stays on **this machine**. The Fabric node stores only the public key.
|
|
75
|
+
|
|
76
|
+
## 4. Point the Cursor plugin at it
|
|
77
|
+
|
|
78
|
+
This is why Fabric is the recommended start for **Grok Bot / Cursor cloud agents**: they cannot see your laptop's `127.0.0.1:19926`.
|
|
79
|
+
|
|
80
|
+
In Cursor: **Plugins → Configure**
|
|
81
|
+
|
|
82
|
+
| Variable | Value |
|
|
83
|
+
|---|---|
|
|
84
|
+
| `FLAIR_URL` | `https://<cluster>.<org>.harperfabric.com` |
|
|
85
|
+
| `FLAIR_AGENT_ID` | `mybot` (the id you just added) |
|
|
86
|
+
|
|
87
|
+
Those are the two plugin schema fields. Local Cursor's `npx` can use the key from step 3 at `~/.flair/keys/mybot.key`. A cloud agent's `npx` runs on a different machine — that VM needs the key (or host-env admin credentials). See [`packages/cursor-flair/README.md`](../packages/cursor-flair/README.md).
|
|
88
|
+
|
|
89
|
+
## 5. Verify
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
flair status --target "$FLAIR_URL"
|
|
93
|
+
FLAIR_URL="$FLAIR_URL" flair memory add --agent mybot "Fabric Quick Start is reachable"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`flair memory add` has no `--target`; it honors `FLAIR_URL`. Then in Cursor:
|
|
97
|
+
|
|
98
|
+
> Load my Flair bootstrap, then store a test memory
|
|
99
|
+
|
|
100
|
+
You should see `bootstrap` return soul + memories, then `memory_store` confirm an id.
|
|
101
|
+
|
|
102
|
+
## What's next
|
|
103
|
+
|
|
104
|
+
Federation, pairing spokes, upgrades (`flair upgrade --target`), ports, and what you can observe without a shell on the node: **[docs/deploying-on-fabric.md](deploying-on-fabric.md)**.
|
|
105
|
+
|
|
106
|
+
Still on a laptop only, no public URL needed: **[docs/quickstart.md](quickstart.md)**.
|
package/docs/quickstart.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
From zero to a persistent agent memory in five minutes.
|
|
4
4
|
|
|
5
|
+
> **Need a reachable URL (Cursor cloud / Grok Bot / another machine)?** This guide is the laptop path — `flair init` binds `127.0.0.1:19926`, which those clients cannot see. Deploy on Harper Fabric instead: **[docs/quickstart-fabric.md](quickstart-fabric.md)**.
|
|
6
|
+
|
|
5
7
|
## 0. Prerequisites
|
|
6
8
|
|
|
7
9
|
**Node.js 22 or newer.** No Docker, no database to install, no API keys — Flair runs in a single process and computes embeddings locally.
|
package/docs/standalone-local.md
CHANGED
|
@@ -235,7 +235,8 @@ Full walkthrough: [federation.md](federation.md).
|
|
|
235
235
|
## See also
|
|
236
236
|
|
|
237
237
|
- [deployment-shapes.md](deployment-shapes.md) — choose your shape
|
|
238
|
-
- [quickstart.md](quickstart.md) — zero to working in 5 minutes
|
|
238
|
+
- [quickstart.md](quickstart.md) — zero to working in 5 minutes (laptop)
|
|
239
|
+
- [quickstart-fabric.md](quickstart-fabric.md) — reachable Harper Fabric URL for Cursor cloud / Grok Bot
|
|
239
240
|
- [upgrade.md](upgrade.md) — full upgrade mechanics (re-embedding, rollback, downgrade)
|
|
240
241
|
- [federation.md](federation.md) — hub-and-spoke sync between instances
|
|
241
242
|
- [troubleshooting.md](troubleshooting.md) — common issues and automated diagnosis
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tpsdev-ai/flair",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.13",
|
|
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",
|