fa-mcp-sdk 0.4.110 → 0.4.111

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 CHANGED
@@ -281,7 +281,7 @@ Skill location: `.claude/skills/upgrade-guide/SKILL.md`
281
281
 
282
282
  Claude Code skills (`.claude/skills/*`) can be reused from [OpenAI Codex](https://developers.openai.com/codex/)
283
283
  without duplication. Codex officially reads project Skills from `.agents/skills/` and supports symlinked skill
284
- folders. The bundled `scripts/setup-agent-links.js` creates the symlink (junction on Windows, relative symlink
284
+ folders. The bundled `scripts/claude-2-agents-symlink.js` creates the symlink (junction on Windows, relative symlink
285
285
  on macOS/Linux) so both tools share the same canonical storage in `.claude/skills/`.
286
286
 
287
287
  ```bash
@@ -24,9 +24,9 @@
24
24
  "quality:fix": "npm run lint:fix && npm run format:fix",
25
25
  "lint-fix-build": "oxlint --fix . && oxfmt . && rimraf dist && tsc",
26
26
  "generate-token": "node node_modules/fa-mcp-sdk/dist/core/auth/token-generator/server.js",
27
- "agents:link": "node scripts/setup-agent-links.js setup",
28
- "agents:link:status": "node scripts/setup-agent-links.js status",
29
- "agents:link:remove": "node scripts/setup-agent-links.js remove",
27
+ "agents:link": "node scripts/claude-2-agents-symlink.js setup",
28
+ "agents:link:status": "node scripts/claude-2-agents-symlink.js status",
29
+ "agents:link:remove": "node scripts/claude-2-agents-symlink.js remove",
30
30
  "dead:exports": "ts-prune",
31
31
  "dead:files": "knip",
32
32
  "update-sdk-docs": "node ../scripts/update-sdk.js",
@@ -0,0 +1 @@
1
+ english
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fa-mcp-sdk",
3
3
  "productName": "FA MCP SDK",
4
- "version": "0.4.110",
4
+ "version": "0.4.111",
5
5
  "description": "Core infrastructure and templates for building Model Context Protocol (MCP) servers with TypeScript",
6
6
  "type": "module",
7
7
  "main": "dist/core/index.js",
@@ -45,9 +45,9 @@
45
45
  "template:start": "node dist/template/start.js",
46
46
  "template:stdio": "node dist/template/start.js stdio",
47
47
  "token-gen": "node dist/core/auth/token-generator/server.js",
48
- "agents:link": "node scripts/setup-agent-links.js setup",
49
- "agents:link:status": "node scripts/setup-agent-links.js status",
50
- "agents:link:remove": "node scripts/setup-agent-links.js remove",
48
+ "agents:link": "node scripts/claude-2-agents-symlink.js setup",
49
+ "agents:link:status": "node scripts/claude-2-agents-symlink.js status",
50
+ "agents:link:remove": "node scripts/claude-2-agents-symlink.js remove",
51
51
  "tsoa:spec": "tsoa spec",
52
52
  "check-llm": "node dist/core/agent-tester/check-llm.js",
53
53
  "test:ip-check": "npm run build && node tests/ip-check.test.mjs",
package/scripts/+x.js ADDED
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { existsSync } from 'node:fs';
4
+ import path from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+ import { spawnSync } from 'node:child_process';
7
+
8
+ const scriptDir = path.dirname(fileURLToPath(import.meta.url));
9
+ const gitDir = path.resolve(scriptDir, '..');
10
+
11
+ const files = [
12
+ '../update.cjs',
13
+ 'update-sdk.js',
14
+ 'remove-nul.js',
15
+ 'kill-port.js',
16
+ 'fcp.js',
17
+ 'claude-2-agents-symlink.js',
18
+ '../deploy/pm2reg.sh',
19
+ '../deploy/srv.cjs',
20
+ ];
21
+
22
+ function runGit(args) {
23
+ return spawnSync('git', ['-C', gitDir, ...args], {
24
+ encoding: 'utf8',
25
+ windowsHide: true,
26
+ });
27
+ }
28
+
29
+ function toGitPath(filePath) {
30
+ return path.relative(gitDir, filePath).split(path.sep).join('/');
31
+ }
32
+
33
+ const gitCheck = runGit(['rev-parse', '--is-inside-work-tree']);
34
+
35
+ if (gitCheck.error) {
36
+ console.error(`Cannot run git: ${gitCheck.error.message}`);
37
+ process.exit(1);
38
+ }
39
+
40
+ if (gitCheck.status !== 0 || gitCheck.stdout.trim() !== 'true') {
41
+ console.error(`Folder is not under git: ${gitDir}`);
42
+ process.exit(1);
43
+ }
44
+
45
+ let changed = 0;
46
+ let skipped = 0;
47
+
48
+ for (const relativePath of files) {
49
+ const absolutePath = path.resolve(scriptDir, relativePath);
50
+ const gitPath = toGitPath(absolutePath);
51
+
52
+ if (!existsSync(absolutePath)) {
53
+ console.warn(`skip missing: ${gitPath}`);
54
+ skipped += 1;
55
+ continue;
56
+ }
57
+
58
+ const trackedCheck = runGit(['ls-files', '--error-unmatch', '--', gitPath]);
59
+
60
+ if (trackedCheck.status !== 0) {
61
+ console.warn(`skip untracked: ${gitPath}`);
62
+ skipped += 1;
63
+ continue;
64
+ }
65
+
66
+ const result = runGit(['update-index', '--chmod=+x', '--', gitPath]);
67
+
68
+ if (result.status !== 0) {
69
+ const message = result.stderr.trim() || result.stdout.trim() || `failed to update ${gitPath}`;
70
+ console.error(message);
71
+ process.exit(result.status ?? 1);
72
+ }
73
+
74
+ console.log(`+x ${gitPath}`);
75
+ changed += 1;
76
+ }
77
+
78
+ console.log(`Done. Updated: ${changed}. Skipped: ${skipped}.`);
@@ -142,7 +142,7 @@ const individualScripts = [
142
142
  'kill-port.js',
143
143
  'pre-commit',
144
144
  'remove-nul.js',
145
- 'setup-agent-links.js',
145
+ 'claude-2-agents-symlink.js',
146
146
  'update-sdk.js',
147
147
  ];
148
148