@tipolink/mcp 1.0.0 → 1.0.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/cli.js +38 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +39 -2
- package/dist/init-installer.js +26 -0
- package/dist/mcp-stdio.d.ts +1 -0
- package/dist/mcp-stdio.js +3 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3434,6 +3434,31 @@ var LEGACY_START_MARKER = "<!-- interlink:start -->";
|
|
|
3434
3434
|
var LEGACY_END_MARKER = "<!-- interlink:end -->";
|
|
3435
3435
|
var GUARD_COMMAND = "npx @tipolink/mcp guard --staged --hook-json";
|
|
3436
3436
|
var DEFAULT_CLOUD_API_URL = "https://tipolink.co";
|
|
3437
|
+
var GITIGNORE_TIPOLINK_RE = /^\s*\/?\.tipolink\/?\s*$/;
|
|
3438
|
+
function ensureGitignoreIgnoresTipolink(rootDir, result) {
|
|
3439
|
+
const gitignorePath = path6.join(rootDir, ".gitignore");
|
|
3440
|
+
if (!existsSync3(gitignorePath)) {
|
|
3441
|
+
return;
|
|
3442
|
+
}
|
|
3443
|
+
const existing = readFileSync4(gitignorePath, "utf8");
|
|
3444
|
+
result.files.push(".gitignore");
|
|
3445
|
+
const lines = existing.split(/\r?\n/);
|
|
3446
|
+
if (lines.some((line) => GITIGNORE_TIPOLINK_RE.test(line))) {
|
|
3447
|
+
result.unchanged.push(".gitignore");
|
|
3448
|
+
return;
|
|
3449
|
+
}
|
|
3450
|
+
const eol = existing.includes("\r\n") ? "\r\n" : "\n";
|
|
3451
|
+
let nextContent;
|
|
3452
|
+
if (existing.length === 0) {
|
|
3453
|
+
nextContent = `.tipolink/${eol}`;
|
|
3454
|
+
} else if (existing.endsWith("\n")) {
|
|
3455
|
+
nextContent = `${existing}.tipolink/${eol}`;
|
|
3456
|
+
} else {
|
|
3457
|
+
nextContent = `${existing}${eol}.tipolink/${eol}`;
|
|
3458
|
+
}
|
|
3459
|
+
writeFileSync2(gitignorePath, nextContent, "utf8");
|
|
3460
|
+
result.updated.push(".gitignore");
|
|
3461
|
+
}
|
|
3437
3462
|
function normalizeRemoteMcpUrl(apiUrl) {
|
|
3438
3463
|
const raw = apiUrl?.trim();
|
|
3439
3464
|
if (!raw) {
|
|
@@ -3718,6 +3743,7 @@ function initWorkspaceConfigs(rootDir, options = {}) {
|
|
|
3718
3743
|
),
|
|
3719
3744
|
result
|
|
3720
3745
|
);
|
|
3746
|
+
ensureGitignoreIgnoresTipolink(resolvedRoot, result);
|
|
3721
3747
|
return result;
|
|
3722
3748
|
}
|
|
3723
3749
|
|
|
@@ -3931,6 +3957,7 @@ function scanWorkspaceManifests(rootDir, options = {}) {
|
|
|
3931
3957
|
// src/mcp-stdio.ts
|
|
3932
3958
|
var DEFAULT_CLOUD_API_URL2 = "https://tipolink.co";
|
|
3933
3959
|
var DEFAULT_PORTAL_URL = "https://tipolink.co";
|
|
3960
|
+
var TIPOLINK_MCP_VERSION = "1.0.1";
|
|
3934
3961
|
var VALID_SYMBOL_KINDS = /* @__PURE__ */ new Set([
|
|
3935
3962
|
"function",
|
|
3936
3963
|
"const",
|
|
@@ -4444,7 +4471,7 @@ function createMcpDispatcher(options = {}) {
|
|
|
4444
4471
|
},
|
|
4445
4472
|
serverInfo: {
|
|
4446
4473
|
name: "tipolink-mcp",
|
|
4447
|
-
version:
|
|
4474
|
+
version: TIPOLINK_MCP_VERSION
|
|
4448
4475
|
}
|
|
4449
4476
|
}
|
|
4450
4477
|
};
|
|
@@ -4690,6 +4717,10 @@ function parseCliArgs(argv) {
|
|
|
4690
4717
|
flags.set("help", true);
|
|
4691
4718
|
continue;
|
|
4692
4719
|
}
|
|
4720
|
+
if (token === "-v" || token === "--version") {
|
|
4721
|
+
flags.set("version", true);
|
|
4722
|
+
continue;
|
|
4723
|
+
}
|
|
4693
4724
|
if (token.startsWith("--")) {
|
|
4694
4725
|
const withoutPrefix = token.slice(2);
|
|
4695
4726
|
const eqIdx = withoutPrefix.indexOf("=");
|
|
@@ -4728,7 +4759,7 @@ function hasBoolFlag(flags, name) {
|
|
|
4728
4759
|
}
|
|
4729
4760
|
function usageText() {
|
|
4730
4761
|
return [
|
|
4731
|
-
|
|
4762
|
+
`Tipolink (@tipolink/mcp v${TIPOLINK_MCP_VERSION}) \u2014 Privacy-Safe Cloud Architecture Bridge`,
|
|
4732
4763
|
"",
|
|
4733
4764
|
"Setup (local bridge configuration):",
|
|
4734
4765
|
" tipolink init [--dir <path>] [--api-url <url>] [--api-key <key>]",
|
|
@@ -4881,6 +4912,11 @@ async function runCli(argv = process.argv.slice(2), io = {}) {
|
|
|
4881
4912
|
const stderr = io.stderr ?? ((chunk) => process.stderr.write(chunk));
|
|
4882
4913
|
const defaultCwd = io.cwd ?? process.cwd();
|
|
4883
4914
|
const parsed = parseCliArgs(argv);
|
|
4915
|
+
if (hasBoolFlag(parsed.flags, "version")) {
|
|
4916
|
+
stdout(`${TIPOLINK_MCP_VERSION}
|
|
4917
|
+
`);
|
|
4918
|
+
return 0;
|
|
4919
|
+
}
|
|
4884
4920
|
if (hasBoolFlag(parsed.flags, "help") || parsed.command === "help") {
|
|
4885
4921
|
stdout(`${usageText()}
|
|
4886
4922
|
`);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { deriveWorkspaceId, sanitizeManifest, scanWorkspaceManifests, type ScanWorkspaceOptions, type ScanWorkspaceResult, } from './extractor.js';
|
|
2
2
|
export { initWorkspaceConfigs, type InitWorkspaceOptions, type InitWorkspaceResult, } from './init-installer.js';
|
|
3
|
-
export { DEFAULT_CLOUD_API_URL, DEFAULT_PORTAL_URL, TIPOLINK_MCP_TOOLS, JsonRpcStreamParser, createMcpDispatcher, encodeJsonRpcFrame, executeTipolinkTool, formatSymbolMatchesMarkdown, startStdioMcpServer, type JsonRpcError, type JsonRpcFrameMode, type JsonRpcRequest, type JsonRpcResponse, type McpDispatcher, type McpDispatcherOptions, type McpToolCallResult, type McpToolDefinition, type McpToolTextContent, type ParsedJsonRpcFrame, type StdioMcpServerOptions, } from './mcp-stdio.js';
|
|
3
|
+
export { DEFAULT_CLOUD_API_URL, DEFAULT_PORTAL_URL, TIPOLINK_MCP_TOOLS, TIPOLINK_MCP_VERSION, JsonRpcStreamParser, createMcpDispatcher, encodeJsonRpcFrame, executeTipolinkTool, formatSymbolMatchesMarkdown, startStdioMcpServer, type JsonRpcError, type JsonRpcFrameMode, type JsonRpcRequest, type JsonRpcResponse, type McpDispatcher, type McpDispatcherOptions, type McpToolCallResult, type McpToolDefinition, type McpToolTextContent, type ParsedJsonRpcFrame, type StdioMcpServerOptions, } from './mcp-stdio.js';
|
|
4
4
|
export { runCli, type CliIo } from './cli.js';
|
package/dist/index.js
CHANGED
|
@@ -3631,6 +3631,31 @@ var LEGACY_START_MARKER = "<!-- interlink:start -->";
|
|
|
3631
3631
|
var LEGACY_END_MARKER = "<!-- interlink:end -->";
|
|
3632
3632
|
var GUARD_COMMAND = "npx @tipolink/mcp guard --staged --hook-json";
|
|
3633
3633
|
var DEFAULT_CLOUD_API_URL = "https://tipolink.co";
|
|
3634
|
+
var GITIGNORE_TIPOLINK_RE = /^\s*\/?\.tipolink\/?\s*$/;
|
|
3635
|
+
function ensureGitignoreIgnoresTipolink(rootDir, result) {
|
|
3636
|
+
const gitignorePath = path7.join(rootDir, ".gitignore");
|
|
3637
|
+
if (!existsSync3(gitignorePath)) {
|
|
3638
|
+
return;
|
|
3639
|
+
}
|
|
3640
|
+
const existing = readFileSync5(gitignorePath, "utf8");
|
|
3641
|
+
result.files.push(".gitignore");
|
|
3642
|
+
const lines = existing.split(/\r?\n/);
|
|
3643
|
+
if (lines.some((line) => GITIGNORE_TIPOLINK_RE.test(line))) {
|
|
3644
|
+
result.unchanged.push(".gitignore");
|
|
3645
|
+
return;
|
|
3646
|
+
}
|
|
3647
|
+
const eol = existing.includes("\r\n") ? "\r\n" : "\n";
|
|
3648
|
+
let nextContent;
|
|
3649
|
+
if (existing.length === 0) {
|
|
3650
|
+
nextContent = `.tipolink/${eol}`;
|
|
3651
|
+
} else if (existing.endsWith("\n")) {
|
|
3652
|
+
nextContent = `${existing}.tipolink/${eol}`;
|
|
3653
|
+
} else {
|
|
3654
|
+
nextContent = `${existing}${eol}.tipolink/${eol}`;
|
|
3655
|
+
}
|
|
3656
|
+
writeFileSync2(gitignorePath, nextContent, "utf8");
|
|
3657
|
+
result.updated.push(".gitignore");
|
|
3658
|
+
}
|
|
3634
3659
|
function normalizeRemoteMcpUrl(apiUrl) {
|
|
3635
3660
|
const raw = apiUrl?.trim();
|
|
3636
3661
|
if (!raw) {
|
|
@@ -3915,6 +3940,7 @@ function initWorkspaceConfigs(rootDir, options = {}) {
|
|
|
3915
3940
|
),
|
|
3916
3941
|
result
|
|
3917
3942
|
);
|
|
3943
|
+
ensureGitignoreIgnoresTipolink(resolvedRoot, result);
|
|
3918
3944
|
return result;
|
|
3919
3945
|
}
|
|
3920
3946
|
|
|
@@ -3923,6 +3949,7 @@ import { existsSync as existsSync4, mkdirSync as mkdirSync3, readFileSync as rea
|
|
|
3923
3949
|
import path8 from "node:path";
|
|
3924
3950
|
var DEFAULT_CLOUD_API_URL2 = "https://tipolink.co";
|
|
3925
3951
|
var DEFAULT_PORTAL_URL = "https://tipolink.co";
|
|
3952
|
+
var TIPOLINK_MCP_VERSION = "1.0.1";
|
|
3926
3953
|
var VALID_SYMBOL_KINDS = /* @__PURE__ */ new Set([
|
|
3927
3954
|
"function",
|
|
3928
3955
|
"const",
|
|
@@ -4436,7 +4463,7 @@ function createMcpDispatcher(options = {}) {
|
|
|
4436
4463
|
},
|
|
4437
4464
|
serverInfo: {
|
|
4438
4465
|
name: "tipolink-mcp",
|
|
4439
|
-
version:
|
|
4466
|
+
version: TIPOLINK_MCP_VERSION
|
|
4440
4467
|
}
|
|
4441
4468
|
}
|
|
4442
4469
|
};
|
|
@@ -4686,6 +4713,10 @@ function parseCliArgs(argv) {
|
|
|
4686
4713
|
flags.set("help", true);
|
|
4687
4714
|
continue;
|
|
4688
4715
|
}
|
|
4716
|
+
if (token === "-v" || token === "--version") {
|
|
4717
|
+
flags.set("version", true);
|
|
4718
|
+
continue;
|
|
4719
|
+
}
|
|
4689
4720
|
if (token.startsWith("--")) {
|
|
4690
4721
|
const withoutPrefix = token.slice(2);
|
|
4691
4722
|
const eqIdx = withoutPrefix.indexOf("=");
|
|
@@ -4724,7 +4755,7 @@ function hasBoolFlag(flags, name) {
|
|
|
4724
4755
|
}
|
|
4725
4756
|
function usageText() {
|
|
4726
4757
|
return [
|
|
4727
|
-
|
|
4758
|
+
`Tipolink (@tipolink/mcp v${TIPOLINK_MCP_VERSION}) \u2014 Privacy-Safe Cloud Architecture Bridge`,
|
|
4728
4759
|
"",
|
|
4729
4760
|
"Setup (local bridge configuration):",
|
|
4730
4761
|
" tipolink init [--dir <path>] [--api-url <url>] [--api-key <key>]",
|
|
@@ -4877,6 +4908,11 @@ async function runCli(argv = process.argv.slice(2), io = {}) {
|
|
|
4877
4908
|
const stderr = io.stderr ?? ((chunk) => process.stderr.write(chunk));
|
|
4878
4909
|
const defaultCwd = io.cwd ?? process.cwd();
|
|
4879
4910
|
const parsed = parseCliArgs(argv);
|
|
4911
|
+
if (hasBoolFlag(parsed.flags, "version")) {
|
|
4912
|
+
stdout(`${TIPOLINK_MCP_VERSION}
|
|
4913
|
+
`);
|
|
4914
|
+
return 0;
|
|
4915
|
+
}
|
|
4880
4916
|
if (hasBoolFlag(parsed.flags, "help") || parsed.command === "help") {
|
|
4881
4917
|
stdout(`${usageText()}
|
|
4882
4918
|
`);
|
|
@@ -5089,6 +5125,7 @@ export {
|
|
|
5089
5125
|
DEFAULT_PORTAL_URL,
|
|
5090
5126
|
JsonRpcStreamParser,
|
|
5091
5127
|
TIPOLINK_MCP_TOOLS,
|
|
5128
|
+
TIPOLINK_MCP_VERSION,
|
|
5092
5129
|
createMcpDispatcher,
|
|
5093
5130
|
deriveWorkspaceId,
|
|
5094
5131
|
encodeJsonRpcFrame,
|
package/dist/init-installer.js
CHANGED
|
@@ -7,6 +7,31 @@ var LEGACY_START_MARKER = "<!-- interlink:start -->";
|
|
|
7
7
|
var LEGACY_END_MARKER = "<!-- interlink:end -->";
|
|
8
8
|
var GUARD_COMMAND = "npx @tipolink/mcp guard --staged --hook-json";
|
|
9
9
|
var DEFAULT_CLOUD_API_URL = "https://tipolink.co";
|
|
10
|
+
var GITIGNORE_TIPOLINK_RE = /^\s*\/?\.tipolink\/?\s*$/;
|
|
11
|
+
function ensureGitignoreIgnoresTipolink(rootDir, result) {
|
|
12
|
+
const gitignorePath = path.join(rootDir, ".gitignore");
|
|
13
|
+
if (!existsSync(gitignorePath)) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const existing = readFileSync(gitignorePath, "utf8");
|
|
17
|
+
result.files.push(".gitignore");
|
|
18
|
+
const lines = existing.split(/\r?\n/);
|
|
19
|
+
if (lines.some((line) => GITIGNORE_TIPOLINK_RE.test(line))) {
|
|
20
|
+
result.unchanged.push(".gitignore");
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const eol = existing.includes("\r\n") ? "\r\n" : "\n";
|
|
24
|
+
let nextContent;
|
|
25
|
+
if (existing.length === 0) {
|
|
26
|
+
nextContent = `.tipolink/${eol}`;
|
|
27
|
+
} else if (existing.endsWith("\n")) {
|
|
28
|
+
nextContent = `${existing}.tipolink/${eol}`;
|
|
29
|
+
} else {
|
|
30
|
+
nextContent = `${existing}${eol}.tipolink/${eol}`;
|
|
31
|
+
}
|
|
32
|
+
writeFileSync(gitignorePath, nextContent, "utf8");
|
|
33
|
+
result.updated.push(".gitignore");
|
|
34
|
+
}
|
|
10
35
|
function normalizeRemoteMcpUrl(apiUrl) {
|
|
11
36
|
const raw = apiUrl?.trim();
|
|
12
37
|
if (!raw) {
|
|
@@ -291,6 +316,7 @@ function initWorkspaceConfigs(rootDir, options = {}) {
|
|
|
291
316
|
),
|
|
292
317
|
result
|
|
293
318
|
);
|
|
319
|
+
ensureGitignoreIgnoresTipolink(resolvedRoot, result);
|
|
294
320
|
return result;
|
|
295
321
|
}
|
|
296
322
|
export {
|
package/dist/mcp-stdio.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type SymbolSearchMatch } from '@tipolink/engine';
|
|
2
2
|
export declare const DEFAULT_CLOUD_API_URL = "https://tipolink.co";
|
|
3
3
|
export declare const DEFAULT_PORTAL_URL = "https://tipolink.co";
|
|
4
|
+
export declare const TIPOLINK_MCP_VERSION = "1.0.1";
|
|
4
5
|
export type JsonRpcFrameMode = 'ndjson' | 'content-length';
|
|
5
6
|
export interface JsonRpcRequest {
|
|
6
7
|
jsonrpc?: string;
|
package/dist/mcp-stdio.js
CHANGED
|
@@ -3627,6 +3627,7 @@ function scanWorkspaceManifests(rootDir, options = {}) {
|
|
|
3627
3627
|
// src/mcp-stdio.ts
|
|
3628
3628
|
var DEFAULT_CLOUD_API_URL = "https://tipolink.co";
|
|
3629
3629
|
var DEFAULT_PORTAL_URL = "https://tipolink.co";
|
|
3630
|
+
var TIPOLINK_MCP_VERSION = "1.0.1";
|
|
3630
3631
|
var VALID_SYMBOL_KINDS = /* @__PURE__ */ new Set([
|
|
3631
3632
|
"function",
|
|
3632
3633
|
"const",
|
|
@@ -4140,7 +4141,7 @@ function createMcpDispatcher(options = {}) {
|
|
|
4140
4141
|
},
|
|
4141
4142
|
serverInfo: {
|
|
4142
4143
|
name: "tipolink-mcp",
|
|
4143
|
-
version:
|
|
4144
|
+
version: TIPOLINK_MCP_VERSION
|
|
4144
4145
|
}
|
|
4145
4146
|
}
|
|
4146
4147
|
};
|
|
@@ -4378,6 +4379,7 @@ export {
|
|
|
4378
4379
|
DEFAULT_PORTAL_URL,
|
|
4379
4380
|
JsonRpcStreamParser,
|
|
4380
4381
|
TIPOLINK_MCP_TOOLS,
|
|
4382
|
+
TIPOLINK_MCP_VERSION,
|
|
4381
4383
|
createMcpDispatcher,
|
|
4382
4384
|
encodeJsonRpcFrame,
|
|
4383
4385
|
executeTipolinkTool,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tipolink/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Tipolink Cloud CLI and MCP connector — privacy-safe local structural indexing for TypeScript and JavaScript repositories.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://tipolink.co",
|