@theronap/agnoclast-mcp 0.9.326 → 0.9.327

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/lib/closeout.mjs CHANGED
@@ -499,7 +499,7 @@ const SERVER_BIN = join(dirname(fileURLToPath(import.meta.url)), '..', 'bin', 'c
499
499
  export async function openTools(sessionId, env = process.env, home = homedir()) {
500
500
  const { token } = resolveTokenSource(env, home)
501
501
  if (!token) throw new Error('no Agnoclast token on this machine')
502
- const transport = new StdioClientTransport({ command: process.execPath, args: [SERVER_BIN], env: { ...edgeSafeEnv(env), CORTEX_TOKEN: token, CLAUDE_CODE_SESSION_ID: sessionId, CORTEX_SUMMARIZING: '1' }, stderr: 'ignore' })
502
+ const transport = new StdioClientTransport({ command: process.execPath, args: [SERVER_BIN], env: { ...edgeSafeEnv(env), CORTEX_TOKEN: token, CLAUDE_CODE_SESSION_ID: sessionId, CORTEX_SUMMARIZING: '1', CORTEX_CLIENT_ROLE: 'closeout' }, stderr: 'ignore' })
503
503
  const client = new Client({ name: 'agnoclast-closeout', version: '1' })
504
504
  await client.connect(transport)
505
505
  return {
package/lib/diagnose.mjs CHANGED
@@ -303,8 +303,12 @@ export function setAiAccount(v) { AI_ACCOUNT = v || null }
303
303
  // say so, and be visible as one, not disguise itself as a script.
304
304
  let CLIENT_ID = 'cortex-mcp/unknown'
305
305
  let CLIENT_VERSION = null
306
+ // The background close-out (closeout.mjs) runs this same server AS the closed session, so its calls carry that
307
+ // session's key on purpose (its log attaches there). It says what it is in the client instead: `+closeout`, a semver
308
+ // build suffix, so every `^cortex-mcp/x.y.z` reader still parses it, and /ops leaves it out of people's usage.
309
+ export const closeoutClientSuffix = (env = process.env) => (env.CORTEX_CLIENT_ROLE === 'closeout' ? '+closeout' : '')
306
310
  export function setClientVersion(version) {
307
- CLIENT_ID = `cortex-mcp/${version || 'unknown'}`
311
+ CLIENT_ID = `cortex-mcp/${version || 'unknown'}${closeoutClientSuffix()}`
308
312
  CLIENT_VERSION = version || null
309
313
  }
310
314
  export const clientVersion = () => CLIENT_VERSION
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theronap/agnoclast-mcp",
3
- "version": "0.9.326",
3
+ "version": "0.9.327",
4
4
  "description": "Connect your AI assistant to Cortex — your org's projects, activity, gaps, and directives, scoped to you.",
5
5
  "type": "module",
6
6
  "bin": {