@tacitai/mcp-server 0.8.1 → 0.8.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.
@@ -65,6 +65,8 @@ export declare function run(command: string, args: string[], opts?: {
65
65
  timeoutMs?: number;
66
66
  }): Promise<RunResult>;
67
67
  export declare function findOnPath(command: string, env?: NodeJS.ProcessEnv): string | null;
68
+ /** True when a resolved path lives inside an npx ephemeral install (`~/.npm/_npx/`). */
69
+ export declare function isNpxEphemeral(resolved: string): boolean;
68
70
  export type RegisterStatus = 'added' | 'already' | 'foreign' | 'no-claude' | 'failed';
69
71
  export interface RegisterResult {
70
72
  status: RegisterStatus;
@@ -146,6 +146,11 @@ export function findOnPath(command, env = process.env) {
146
146
  }
147
147
  return null;
148
148
  }
149
+ /** True when a resolved path lives inside an npx ephemeral install (`~/.npm/_npx/`). */
150
+ export function isNpxEphemeral(resolved) {
151
+ const sep = path.sep;
152
+ return resolved.includes(`${sep}_npx${sep}`) || resolved.includes('/_npx/');
153
+ }
149
154
  function brief(r) {
150
155
  return (r.stderr || r.stdout || `exit ${String(r.code)}`).trim().split('\n').slice(-2).join(' ').slice(0, 300);
151
156
  }
@@ -294,10 +299,6 @@ export async function scanLegacyEntries(folders, cwd) {
294
299
  continue;
295
300
  for (const [name, e] of Object.entries(servers(json['mcpServers'])))
296
301
  push(toLegacy('user', folder, folder.configFile, name, e));
297
- for (const [projectPath, p] of Object.entries(servers(json['projects']))) {
298
- for (const [name, e] of Object.entries(servers(p?.['mcpServers'])))
299
- push(toLegacy('local', folder, folder.configFile, name, e, projectPath));
300
- }
301
302
  }
302
303
  const home = os.homedir();
303
304
  const active = folders[0] ?? folderFor(null);
package/dist/setup.js CHANGED
@@ -17,7 +17,7 @@
17
17
  import * as os from 'node:os';
18
18
  import * as readline from 'node:readline';
19
19
  import { TacitClient, TacitApiError } from './client.js';
20
- import { ENTRY_NAME, PACKAGE_NAME, activeConfigFolder, findOnPath, genericEntryJson, listConfigFolders, registerUserEntry, removeUserEntry, run, scanLegacyEntries, userEntryState, } from './claude-config.js';
20
+ import { ENTRY_NAME, PACKAGE_NAME, activeConfigFolder, findOnPath, isNpxEphemeral, genericEntryJson, listConfigFolders, registerUserEntry, removeUserEntry, run, scanLegacyEntries, userEntryState, } from './claude-config.js';
21
21
  import { ProfileError, getDefault, getDeviceLabel, isUsableProfileName, pickProfileSlug, setDefault, tryReadProfile, writeProfile, } from './profile-store.js';
22
22
  import { PromptError, promptHidden } from './prompt.js';
23
23
  import { SignInError, signIn } from './signin.js';
@@ -338,8 +338,9 @@ export async function runSetup(argv, deps = {}) {
338
338
  }
339
339
  else
340
340
  mode = (await io.choose('How should TACIT load in Claude Code?', ['Every session', 'Only when I start Claude Code with the tacit command'], 0)) === 1 ? 'on-demand' : 'always';
341
- // 6. install the tacit command
342
- if (findOnPath('tacit', env) === null) {
341
+ // 6. install the tacit command (npx ephemeral copies don't survive the session)
342
+ const tacitOnPath = findOnPath('tacit', env);
343
+ if (tacitOnPath === null || isNpxEphemeral(tacitOnPath)) {
343
344
  const wanted = o.install === 'yes' || (o.install === 'ask' && io.isTTY && (await io.confirm('Install the tacit command? (Y/n) ', true)));
344
345
  if (wanted) {
345
346
  if (!(await installCli(env, out, err)))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tacitai/mcp-server",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "stdio MCP server wrapping Tacit /api/v1 REST/SSE API",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -42,8 +42,5 @@
42
42
  "@types/semver": "^7.5.0",
43
43
  "typescript": "^5.4.0",
44
44
  "vitest": "^4.1.7"
45
- },
46
- "publishConfig": {
47
- "access": "public"
48
45
  }
49
46
  }