@tpsdev-ai/flair-mcp 0.54.2 → 0.55.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/dist/session-start-hook.js +11 -3
- package/package.json +2 -2
|
@@ -88,6 +88,11 @@ const TIMEOUT_FLOOR_MS = 500;
|
|
|
88
88
|
const TIMEOUT_CEILING_MS = 30_000;
|
|
89
89
|
/** Empty, inert hook output. Printing this is always a safe no-op. */
|
|
90
90
|
const NOOP_OUTPUT = "{}";
|
|
91
|
+
/** Bootstrap / presence channel. Codex's installer sets FLAIR_HOOK_HARNESS;
|
|
92
|
+
* unset keeps the historical Claude Code default (flair#1734). */
|
|
93
|
+
function resolveHookChannel() {
|
|
94
|
+
return process.env.FLAIR_HOOK_HARNESS === "codex" ? "codex" : "claude-code";
|
|
95
|
+
}
|
|
91
96
|
/**
|
|
92
97
|
* Probe mode (flair#1007) — see the module doc. The predicate itself moved to
|
|
93
98
|
* ./env-guard.ts when the continuity capture binary (flair#1257) started
|
|
@@ -177,8 +182,11 @@ export async function runHook(rawInput, makeClient = defaultClientFactory) {
|
|
|
177
182
|
// payload doesn't carry a task description (unlike the MCP `bootstrap`
|
|
178
183
|
// tool call — see index.ts), so this only ever sets `activity`, leaving
|
|
179
184
|
// currentTask exactly whatever it already was.
|
|
180
|
-
const
|
|
181
|
-
|
|
185
|
+
const skipPresence = process.env.FLAIR_HOOK_DELIVERY_PROBE != null
|
|
186
|
+
&& process.env.FLAIR_HOOK_DELIVERY_PROBE !== ""
|
|
187
|
+
&& process.env.FLAIR_HOOK_DELIVERY_PROBE !== "0";
|
|
188
|
+
const presenceDone = !skipPresence && typeof client.request === "function"
|
|
189
|
+
? postPresenceSafe(client, deriveActivity({ channel: resolveHookChannel() }), undefined, resolvePresenceTimeoutMs())
|
|
182
190
|
: Promise.resolve();
|
|
183
191
|
// Continuity resume (flair#1257 slice 2) — the local half (pointer read →
|
|
184
192
|
// mint → rotate → seed capture state) runs unconditionally when applicable;
|
|
@@ -194,7 +202,7 @@ export async function runHook(rawInput, makeClient = defaultClientFactory) {
|
|
|
194
202
|
try {
|
|
195
203
|
const res = await withTimeout(Promise.resolve(client.bootstrap({
|
|
196
204
|
maxTokens: BOOTSTRAP_MAX_TOKENS,
|
|
197
|
-
channel:
|
|
205
|
+
channel: resolveHookChannel(),
|
|
198
206
|
subjects: project ? [project] : undefined,
|
|
199
207
|
})), resolveTimeoutMs());
|
|
200
208
|
context = res && res.context ? String(res.context) : "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tpsdev-ai/flair-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.1",
|
|
4
4
|
"description": "MCP server for Flair — persistent memory for Claude Code, Cursor, and any MCP client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@modelcontextprotocol/sdk": "1.27.1",
|
|
32
|
-
"@tpsdev-ai/flair-client": "0.
|
|
32
|
+
"@tpsdev-ai/flair-client": "0.55.1",
|
|
33
33
|
"zod": "4.3.6"
|
|
34
34
|
},
|
|
35
35
|
"license": "Apache-2.0",
|