@tpsdev-ai/flair 0.52.0 → 0.54.1
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 +4 -1
- package/dist/build-info.json +3 -3
- package/dist/cli.js +1914 -15328
- package/dist/commands/agent.js +453 -0
- package/dist/commands/attention.js +121 -0
- package/dist/commands/backup.js +115 -0
- package/dist/commands/bootstrap.js +91 -0
- package/dist/commands/bridge.js +608 -0
- package/dist/commands/deploy.js +180 -0
- package/dist/commands/doctor.js +1654 -0
- package/dist/commands/export.js +110 -0
- package/dist/commands/federation.js +1575 -0
- package/dist/commands/fleet.js +73 -0
- package/dist/commands/grant.js +109 -0
- package/dist/commands/hook.js +193 -0
- package/dist/commands/idp.js +193 -0
- package/dist/commands/import.js +134 -0
- package/dist/commands/init.js +1203 -0
- package/dist/commands/inspect.js +45 -0
- package/dist/commands/keys.js +187 -0
- package/dist/commands/mcp.js +707 -0
- package/dist/commands/memory.js +501 -0
- package/dist/commands/migrate-harness-memory.js +270 -0
- package/dist/commands/orgevent.js +138 -0
- package/dist/commands/presence.js +76 -0
- package/dist/commands/principal.js +338 -0
- package/dist/commands/quality.js +1164 -0
- package/dist/commands/reembed.js +296 -0
- package/dist/commands/relationship.js +76 -0
- package/dist/commands/rem.js +1048 -0
- package/dist/commands/restore.js +130 -0
- package/dist/commands/search.js +244 -0
- package/dist/commands/service.js +315 -0
- package/dist/commands/session.js +184 -0
- package/dist/commands/soul.js +155 -0
- package/dist/commands/status.js +914 -0
- package/dist/commands/test.js +93 -0
- package/dist/commands/uninstall.js +143 -0
- package/dist/commands/upgrade.js +1592 -0
- package/dist/commands/workspace.js +114 -0
- package/dist/deploy.js +24 -0
- package/dist/fabric-npm-install.js +87 -0
- package/dist/federation-verify.js +498 -0
- package/dist/fleet-verify.js +144 -21
- package/dist/install/clients.js +167 -0
- package/dist/lib/auth-resolve.js +76 -1
- package/dist/lib/daemon-liveness.js +131 -2
- package/dist/lib/doctor-config-path.js +61 -0
- package/dist/lib/doctor-federation-driver.js +189 -0
- package/dist/lib/doctor-run.js +40 -0
- package/dist/lib/entity-vocab-cli.js +3 -3
- package/dist/lib/federation-pair-identity.js +47 -0
- package/dist/lib/launchd-repair.js +199 -0
- package/dist/lib/ops-api-bind.js +115 -0
- package/dist/lib/owned-pins.js +219 -0
- package/dist/lib/stabilize-mqtt-network.js +123 -0
- package/dist/lib/uninstall-purge.js +218 -0
- package/dist/rem/restore.js +8 -10
- package/dist/resources/AgentReadPosition.js +74 -0
- package/dist/resources/Federation.js +8 -2
- package/dist/resources/Memory.js +4 -3
- package/dist/resources/MemoryBootstrap.js +41 -25
- package/dist/resources/MemoryCandidate.js +5 -6
- package/dist/resources/OrgEventCatchup.js +126 -47
- package/dist/resources/agent-read-position-lib.js +83 -0
- package/dist/resources/agent-read-position.js +120 -0
- package/dist/resources/embeddings-boot.js +32 -0
- package/dist/resources/federation-peer-liveness.js +73 -0
- package/dist/resources/health.js +68 -19
- package/dist/resources/mcp-tools.js +43 -279
- package/dist/resources/memory-visibility.js +3 -3
- package/dist/resources/migration-boot.js +59 -18
- package/dist/resources/migrations/embedding-stamp.js +20 -1
- package/dist/resources/migrations/recheck.js +43 -0
- package/dist/resources/migrations/runner.js +6 -1
- package/dist/resources/migrations/stamp-outstanding.js +171 -0
- package/dist/resources/migrations/visibility-backfill.js +2 -2
- package/dist/resources/org-event-catchup-lib.js +47 -0
- package/dist/resources/record-owner-guard.js +1 -0
- package/dist/stamp-migration-verify.js +163 -0
- package/dist/stamp-outstanding.js +144 -0
- package/docs/api-reference.md +4 -2
- package/docs/deploying-on-fabric.md +11 -10
- package/docs/deployment.md +3 -1
- package/docs/federation.md +19 -0
- package/docs/hosted-on-fabric.md +3 -3
- package/docs/quickstart.md +2 -1
- package/docs/releasing.md +15 -7
- package/docs/spoke-bringup.md +10 -5
- package/docs/standalone-local.md +3 -1
- package/docs/upgrade.md +25 -6
- package/node_modules/@tpsdev-ai/flair-tool-descriptors/LICENSE +19 -0
- package/node_modules/@tpsdev-ai/flair-tool-descriptors/README.md +22 -0
- package/node_modules/@tpsdev-ai/flair-tool-descriptors/dist/index.d.ts +70 -0
- package/node_modules/@tpsdev-ai/flair-tool-descriptors/dist/index.js +665 -0
- package/node_modules/@tpsdev-ai/flair-tool-descriptors/package.json +46 -0
- package/package.json +9 -4
- package/schemas/agent.graphql +15 -0
- package/templates/launchd/start-flair-with-admin-pass.sh +73 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tpsdev-ai/flair-tool-descriptors",
|
|
3
|
+
"version": "0.54.1",
|
|
4
|
+
"description": "Transport-agnostic MCP tool descriptors for Flair — name, description, inputSchema, output shape. No Harper, no FlairClient.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc --noCheck",
|
|
21
|
+
"test": "bun test",
|
|
22
|
+
"prepublishOnly": "npm run build"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=18"
|
|
29
|
+
},
|
|
30
|
+
"license": "Apache-2.0",
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/tpsdev-ai/flair.git",
|
|
34
|
+
"directory": "packages/flair-tool-descriptors"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://tps.dev/#flair",
|
|
37
|
+
"keywords": [
|
|
38
|
+
"flair",
|
|
39
|
+
"mcp",
|
|
40
|
+
"tools",
|
|
41
|
+
"descriptors"
|
|
42
|
+
],
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"typescript": "5.9.3"
|
|
45
|
+
}
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tpsdev-ai/flair",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.1",
|
|
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",
|
|
@@ -46,9 +46,10 @@
|
|
|
46
46
|
],
|
|
47
47
|
"scripts": {
|
|
48
48
|
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
49
|
-
"prebuild": "npm run clean",
|
|
49
|
+
"prebuild": "npm run clean && cd packages/flair-tool-descriptors && npm run build",
|
|
50
50
|
"build": "tsc -p tsconfig.json --noCheck && node scripts/write-build-info.mjs",
|
|
51
51
|
"build:cli": "tsc -p tsconfig.cli.json --noCheck && node scripts/write-build-info.mjs",
|
|
52
|
+
"prepack": "node scripts/materialize-bundled-descriptors.mjs",
|
|
52
53
|
"prepublishOnly": "npm run build && npm run build:cli",
|
|
53
54
|
"test": "bun run test:unit",
|
|
54
55
|
"test:unit": "bun scripts/test-unit.ts",
|
|
@@ -71,8 +72,12 @@
|
|
|
71
72
|
"jose": "6.2.2",
|
|
72
73
|
"js-yaml": "^4.3.2",
|
|
73
74
|
"tar": "^7.5.22",
|
|
74
|
-
"tweetnacl": "1.0.3"
|
|
75
|
+
"tweetnacl": "1.0.3",
|
|
76
|
+
"@tpsdev-ai/flair-tool-descriptors": "0.54.1"
|
|
75
77
|
},
|
|
78
|
+
"bundleDependencies": [
|
|
79
|
+
"@tpsdev-ai/flair-tool-descriptors"
|
|
80
|
+
],
|
|
76
81
|
"overrides": {
|
|
77
82
|
"react-native-fs": "npm:empty-npm-package@1.0.0",
|
|
78
83
|
"brace-expansion": "^5.0.9",
|
|
@@ -80,7 +85,7 @@
|
|
|
80
85
|
"fast-uri": "^4.1.3",
|
|
81
86
|
"hono": "^4.13.5",
|
|
82
87
|
"js-yaml": "^4.3.2",
|
|
83
|
-
"adm-zip": "^0.6.
|
|
88
|
+
"adm-zip": "^0.6.1",
|
|
84
89
|
"@opentelemetry/core": "^2.8.0",
|
|
85
90
|
"uuid": "^11.1.1",
|
|
86
91
|
"tar": "^7.5.22",
|
package/schemas/agent.graphql
CHANGED
|
@@ -76,3 +76,18 @@ type Integration @table(database: "flair") @export {
|
|
|
76
76
|
createdAt: String!
|
|
77
77
|
updatedAt: String
|
|
78
78
|
}
|
|
79
|
+
|
|
80
|
+
# Per-agent read-position (watermark) — durable catch-up cursor (flair#931).
|
|
81
|
+
# A monotonic position per (agent, stream), not a wall-clock `since`. Reused
|
|
82
|
+
# by OrgEventCatchup today and the light-comms board later (#1583); the stream
|
|
83
|
+
# name is the only table-specific part. Not @export: agents use
|
|
84
|
+
# /AgentReadPosition and /OrgEventCatchup, never raw-table REST. Owner-scoped
|
|
85
|
+
# (each agent reads/advances only its own). Advance-on-ack, never silently
|
|
86
|
+
# truncated. See resources/agent-read-position-lib.ts.
|
|
87
|
+
type AgentReadPosition @table(database: "flair") {
|
|
88
|
+
id: ID @primaryKey # `${agentId}:${stream}`
|
|
89
|
+
agentId: String! @indexed
|
|
90
|
+
stream: String! @indexed # e.g. "org-event"
|
|
91
|
+
position: String! # opaque total-order watermark; lexicographic compare
|
|
92
|
+
updatedAt: String!
|
|
93
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# start-flair-with-admin-pass.sh — product-owned launchd launcher (flair#1573).
|
|
3
|
+
#
|
|
4
|
+
# Reads the Flair admin password from a 0600 file and execs Harper
|
|
5
|
+
# NON-INTERACTIVELY. The secret never appears in the launchd plist: it enters
|
|
6
|
+
# the process environment here, from the file, at start time. This is the
|
|
7
|
+
# product shape of the no-inline-secret pattern — the plist's ProgramArguments
|
|
8
|
+
# point at this launcher instead of embedding HDB_ADMIN_PASSWORD.
|
|
9
|
+
#
|
|
10
|
+
# Usage: start-flair-with-admin-pass.sh <admin-pass-file> <node> <harper-bin>
|
|
11
|
+
#
|
|
12
|
+
# admin-pass-file path to the 0600 file holding the admin password
|
|
13
|
+
# node the node binary to exec
|
|
14
|
+
# harper-bin Harper's entrypoint (harper.js)
|
|
15
|
+
#
|
|
16
|
+
# HDB_ADMIN_USERNAME is already in the launchd environment (it is not a
|
|
17
|
+
# secret); only the password is read from the file here. HOME, PATH and the
|
|
18
|
+
# Harper config (HARPER_SET_CONFIG / ROOTPATH / FLAIR_MODELS_DIR) are also
|
|
19
|
+
# supplied by the plist's EnvironmentVariables, so Harper boots without ever
|
|
20
|
+
# hitting its interactive readline prompt under launchd's minimal env.
|
|
21
|
+
|
|
22
|
+
set -eu
|
|
23
|
+
|
|
24
|
+
ADMIN_PASS_FILE="$1"
|
|
25
|
+
NODE="$2"
|
|
26
|
+
HARPER_BIN="$3"
|
|
27
|
+
|
|
28
|
+
if [ ! -f "$ADMIN_PASS_FILE" ]; then
|
|
29
|
+
echo "start-flair-with-admin-pass: admin-pass file not found: $ADMIN_PASS_FILE" >&2
|
|
30
|
+
exit 1
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
if [ ! -r "$ADMIN_PASS_FILE" ]; then
|
|
34
|
+
echo "start-flair-with-admin-pass: admin-pass file not readable: $ADMIN_PASS_FILE" >&2
|
|
35
|
+
exit 1
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
# Re-verify owner-only (0600) at READ time, not just at `flair init` write
|
|
39
|
+
# time. A file that drifted to 0644 after init (umask change, backup tool,
|
|
40
|
+
# tar restore) would leak the secret to any reader on the host. Mirrors
|
|
41
|
+
# readSecretFileSecure (src/lib/auth-resolve.ts), which refuses any group/other
|
|
42
|
+
# permission bit. `stat -f %Lp` is macOS (the launchd host); `stat -c %a` is
|
|
43
|
+
# Linux (the unit-test host). The two syntaxes are mutually exclusive, so
|
|
44
|
+
# branch on the OS rather than chaining with `||` — on Linux `stat -f %Lp`
|
|
45
|
+
# prints filesystem info to stdout *and* exits non-zero, which would pollute
|
|
46
|
+
# the captured mode. Fail CLOSED: an unreadable mode (empty) refuses rather
|
|
47
|
+
# than proceeding on a guess.
|
|
48
|
+
case "$(uname -s)" in
|
|
49
|
+
Darwin) MODE="$(stat -f %Lp "$ADMIN_PASS_FILE" 2>/dev/null)" ;;
|
|
50
|
+
*) MODE="$(stat -c %a "$ADMIN_PASS_FILE" 2>/dev/null)" ;;
|
|
51
|
+
esac
|
|
52
|
+
case "$MODE" in
|
|
53
|
+
*00) : ;;
|
|
54
|
+
*)
|
|
55
|
+
echo "start-flair-with-admin-pass: admin-pass file permissions '${MODE:-unknown}' are too open (expected 600): $ADMIN_PASS_FILE" >&2
|
|
56
|
+
exit 1
|
|
57
|
+
;;
|
|
58
|
+
esac
|
|
59
|
+
|
|
60
|
+
# Read the secret. Command substitution strips a trailing newline, which is
|
|
61
|
+
# what `flair init` writes (base64url + "\n"); the value itself is preserved
|
|
62
|
+
# verbatim by the double quotes.
|
|
63
|
+
ADMIN_PASS="$(cat "$ADMIN_PASS_FILE")"
|
|
64
|
+
if [ -z "$ADMIN_PASS" ]; then
|
|
65
|
+
echo "start-flair-with-admin-pass: admin-pass file is empty: $ADMIN_PASS_FILE" >&2
|
|
66
|
+
exit 1
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
export HDB_ADMIN_PASSWORD="$ADMIN_PASS"
|
|
70
|
+
|
|
71
|
+
# exec (not spawn) so launchd tracks Harper itself — the job's PID is Harper's
|
|
72
|
+
# PID, and KeepAlive restarts the real service rather than a dead launcher.
|
|
73
|
+
exec "$NODE" "$HARPER_BIN" run .
|