onlymcp 0.16.4 → 0.19.0
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/LICENSE +33 -17
- package/README.md +7 -1
- package/dist/bin/cli.js +46 -564
- package/dist/bin/mcp.js +45 -66
- package/package.json +6 -10
- package/dist/apiBaseUrl.d.ts +0 -12
- package/dist/apiBaseUrl.js +0 -28
- package/dist/apiBaseUrl.js.map +0 -1
- package/dist/apiClient.d.ts +0 -296
- package/dist/apiClient.js +0 -224
- package/dist/apiClient.js.map +0 -1
- package/dist/auth/deviceLogin.d.ts +0 -5
- package/dist/auth/deviceLogin.js +0 -40
- package/dist/auth/deviceLogin.js.map +0 -1
- package/dist/auth/keyring.d.ts +0 -5
- package/dist/auth/keyring.js +0 -28
- package/dist/auth/keyring.js.map +0 -1
- package/dist/bin/cli.d.ts +0 -2
- package/dist/bin/cli.js.map +0 -1
- package/dist/bin/mcp.d.ts +0 -2
- package/dist/bin/mcp.js.map +0 -1
- package/dist/cache.d.ts +0 -7
- package/dist/cache.js +0 -32
- package/dist/cache.js.map +0 -1
- package/dist/deviceId.d.ts +0 -2
- package/dist/deviceId.js +0 -97
- package/dist/deviceId.js.map +0 -1
- package/dist/export/unpack.d.ts +0 -33
- package/dist/export/unpack.js +0 -54
- package/dist/export/unpack.js.map +0 -1
- package/dist/identity.d.ts +0 -29
- package/dist/identity.js +0 -116
- package/dist/identity.js.map +0 -1
- package/dist/import/collect.d.ts +0 -25
- package/dist/import/collect.js +0 -101
- package/dist/import/collect.js.map +0 -1
- package/dist/import/frontmatter.d.ts +0 -44
- package/dist/import/frontmatter.js +0 -93
- package/dist/import/frontmatter.js.map +0 -1
- package/dist/import/plan.d.ts +0 -74
- package/dist/import/plan.js +0 -190
- package/dist/import/plan.js.map +0 -1
- package/dist/import/prune.d.ts +0 -46
- package/dist/import/prune.js +0 -61
- package/dist/import/prune.js.map +0 -1
- package/dist/import/secrets.d.ts +0 -7
- package/dist/import/secrets.js +0 -77
- package/dist/import/secrets.js.map +0 -1
- package/dist/import/upload.d.ts +0 -21
- package/dist/import/upload.js +0 -99
- package/dist/import/upload.js.map +0 -1
- package/dist/install.d.ts +0 -81
- package/dist/install.js +0 -168
- package/dist/install.js.map +0 -1
- package/dist/instructions.d.ts +0 -4
- package/dist/instructions.js +0 -67
- package/dist/instructions.js.map +0 -1
- package/dist/memoryPath.d.ts +0 -1
- package/dist/memoryPath.js +0 -13
- package/dist/memoryPath.js.map +0 -1
- package/dist/memorySync.d.ts +0 -28
- package/dist/memorySync.js +0 -56
- package/dist/memorySync.js.map +0 -1
- package/dist/paths.d.ts +0 -16
- package/dist/paths.js +0 -58
- package/dist/paths.js.map +0 -1
- package/dist/registry/caveats.d.ts +0 -17
- package/dist/registry/caveats.js +0 -74
- package/dist/registry/caveats.js.map +0 -1
- package/dist/registry/clients.d.ts +0 -17
- package/dist/registry/clients.js +0 -402
- package/dist/registry/clients.js.map +0 -1
- package/dist/registry/index.d.ts +0 -6
- package/dist/registry/index.js +0 -7
- package/dist/registry/index.js.map +0 -1
- package/dist/registry/serverInfo.d.ts +0 -25
- package/dist/registry/serverInfo.js +0 -33
- package/dist/registry/serverInfo.js.map +0 -1
- package/dist/registry/servers.d.ts +0 -58
- package/dist/registry/servers.js +0 -259
- package/dist/registry/servers.js.map +0 -1
- package/dist/registry/toolHints.d.ts +0 -29
- package/dist/registry/toolHints.js +0 -41
- package/dist/registry/toolHints.js.map +0 -1
- package/dist/registry/types.d.ts +0 -71
- package/dist/registry/types.js +0 -6
- package/dist/registry/types.js.map +0 -1
- package/dist/skillFilePath.d.ts +0 -1
- package/dist/skillFilePath.js +0 -29
- package/dist/skillFilePath.js.map +0 -1
- package/dist/stubs.d.ts +0 -7
- package/dist/stubs.js +0 -159
- package/dist/stubs.js.map +0 -1
- package/dist/tools/connections.d.ts +0 -154
- package/dist/tools/connections.js +0 -164
- package/dist/tools/connections.js.map +0 -1
- package/dist/tools/getAgentDefinition.d.ts +0 -26
- package/dist/tools/getAgentDefinition.js +0 -29
- package/dist/tools/getAgentDefinition.js.map +0 -1
- package/dist/tools/getSkill.d.ts +0 -26
- package/dist/tools/getSkill.js +0 -26
- package/dist/tools/getSkill.js.map +0 -1
- package/dist/tools/getSkillFile.d.ts +0 -27
- package/dist/tools/getSkillFile.js +0 -39
- package/dist/tools/getSkillFile.js.map +0 -1
- package/dist/tools/index.d.ts +0 -263
- package/dist/tools/index.js +0 -69
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/lists.d.ts +0 -38
- package/dist/tools/lists.js +0 -39
- package/dist/tools/lists.js.map +0 -1
- package/dist/tools/memoryGraph.d.ts +0 -69
- package/dist/tools/memoryGraph.js +0 -128
- package/dist/tools/memoryGraph.js.map +0 -1
- package/dist/tools/memoryRead.d.ts +0 -25
- package/dist/tools/memoryRead.js +0 -33
- package/dist/tools/memoryRead.js.map +0 -1
- package/dist/tools/memoryWrite.d.ts +0 -27
- package/dist/tools/memoryWrite.js +0 -34
- package/dist/tools/memoryWrite.js.map +0 -1
- package/dist/tools/write.d.ts +0 -166
- package/dist/tools/write.js +0 -193
- package/dist/tools/write.js.map +0 -1
package/dist/install.js
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { dirname, join } from 'node:path';
|
|
3
|
-
import { CLIENTS, findClient } from './registry/index.js';
|
|
4
|
-
/** The npm package that ships both `onlymcp` and `onlymcp-mcp`. */
|
|
5
|
-
export const PACKAGE = 'onlymcp';
|
|
6
|
-
// Started through npx, never as a bare `onlymcp-mcp` binary name: the home
|
|
7
|
-
// page advertises `npx onlymcp install`, and npx runs a package once without
|
|
8
|
-
// leaving anything on the PATH. A bare `onlymcp-mcp` entry would be written
|
|
9
|
-
// successfully and only fail the next time the client starts, which is the
|
|
10
|
-
// worst moment to find out. `-p onlymcp` is required because the binary
|
|
11
|
-
// name differs from the package name; without it npx looks for a package
|
|
12
|
-
// literally called `onlymcp-mcp`, which does not exist.
|
|
13
|
-
//
|
|
14
|
-
// Deliberately unpinned: the server talks to a cloud API that keeps moving,
|
|
15
|
-
// and must not freeze on a version nobody touches again afterwards.
|
|
16
|
-
const COMMAND = 'npx';
|
|
17
|
-
const ARGS = ['-y', '-p', PACKAGE, 'onlymcp-mcp'];
|
|
18
|
-
/**
|
|
19
|
-
* The one line `onlymcp install --client claude-code` prints. Claude Code hides
|
|
20
|
-
* the claude.ai connector when a remote entry with the same URL exists, but a
|
|
21
|
-
* stdio entry never hides it, and the OnlyMCP plugin's entry has a name of its
|
|
22
|
-
* own: next to either of them the local process lists every tool twice. It
|
|
23
|
-
* only replaces an "onlymcp" entry the user added to ~/.claude.json.
|
|
24
|
-
*/
|
|
25
|
-
export const CLAUDE_CODE_NOTE = 'With the claude.ai connector synced into Claude Code, or the OnlyMCP plugin installed, you need nothing else. This local process is only for skill files on disk: it replaces the remote "onlymcp" entry in ~/.claude.json, and next to the connector or the plugin it would list every tool twice.';
|
|
26
|
-
// TOML basic strings treat a backslash as an escape. A Windows home path
|
|
27
|
-
// would produce a broken file without this, and so would a quote in the path.
|
|
28
|
-
function tomlString(value) {
|
|
29
|
-
return `"${value.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`;
|
|
30
|
-
}
|
|
31
|
-
function jsonSnippet(env) {
|
|
32
|
-
const server = env ? { command: COMMAND, args: ARGS, env } : { command: COMMAND, args: ARGS };
|
|
33
|
-
return JSON.stringify({ mcpServers: { onlymcp: server } }, null, 2);
|
|
34
|
-
}
|
|
35
|
-
function tomlSnippet(env) {
|
|
36
|
-
const lines = [
|
|
37
|
-
'[mcp_servers.onlymcp]',
|
|
38
|
-
`command = ${tomlString(COMMAND)}`,
|
|
39
|
-
`args = [${ARGS.map(tomlString).join(', ')}]`,
|
|
40
|
-
];
|
|
41
|
-
// An inline table instead of a separate [mcp_servers.onlymcp.env] section:
|
|
42
|
-
// the snippet gets appended to an existing file, and a second section
|
|
43
|
-
// would pull in whatever gets appended after it.
|
|
44
|
-
for (const [k, v] of Object.entries(env ?? {})) {
|
|
45
|
-
lines.push(`env = { ${k} = ${tomlString(v)} }`);
|
|
46
|
-
}
|
|
47
|
-
return `${lines.join('\n')}\n`;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Old CLI spellings, kept so instructions written before the registry
|
|
51
|
-
* existed keep working. `codex` needs no alias: it was always spelled the
|
|
52
|
-
* same as the registry's client id. `gemini` was the short form of the retired
|
|
53
|
-
* Gemini client and now means its successor, Antigravity; the long form,
|
|
54
|
-
* `gemini-cli`, is an alias in the registry itself (`ClientRecord.aliases`).
|
|
55
|
-
*/
|
|
56
|
-
const ALIASES = { claude: 'claude-code', gemini: 'antigravity' };
|
|
57
|
-
function installableClients() {
|
|
58
|
-
return CLIENTS.filter((c) => c.install !== null);
|
|
59
|
-
}
|
|
60
|
-
const INSTALLABLE_IDS = new Set(installableClients().map((c) => c.id));
|
|
61
|
-
/** Resolves an alias or a registry id to a registry id; undefined if neither. */
|
|
62
|
-
export function resolveClientId(id) {
|
|
63
|
-
const resolved = ALIASES[id] ?? findClient(id)?.id;
|
|
64
|
-
return resolved && INSTALLABLE_IDS.has(resolved) ? resolved : undefined;
|
|
65
|
-
}
|
|
66
|
-
function resolveHome(path, home) {
|
|
67
|
-
return path.startsWith('~/') ? join(home, path.slice(2)) : path;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Every client the registry can write a config for, resolved against `home`.
|
|
71
|
-
*
|
|
72
|
-
* `home` is a parameter and not `homedir()` so every test runs against a
|
|
73
|
-
* throwaway directory: the guardrail from spec §13 sits in the type itself,
|
|
74
|
-
* not merely in intent.
|
|
75
|
-
*/
|
|
76
|
-
export function installTargets(home) {
|
|
77
|
-
return installableClients().map((c) => {
|
|
78
|
-
const configPath = resolveHome(c.install.configPath, home);
|
|
79
|
-
const stubDir = c.install.stubDir ? resolveHome(c.install.stubDir, home) : null;
|
|
80
|
-
// `stubDir` is always `<root>/skills` (see paths.ts, `stubDirs()`): the
|
|
81
|
-
// env var the server reads carries the root, because `writeStubs`
|
|
82
|
-
// appends `skills/` itself. Pointing it at the skills dir directly wrote
|
|
83
|
-
// into `<root>/skills/skills`.
|
|
84
|
-
const stubRoot = stubDir ? dirname(stubDir) : null;
|
|
85
|
-
const snippet = c.install.format === 'toml'
|
|
86
|
-
? tomlSnippet(stubRoot ? { ONLYMCP_STUB_DIRS: stubRoot } : undefined)
|
|
87
|
-
: jsonSnippet();
|
|
88
|
-
return { id: c.id, name: c.name, configPath, format: c.install.format, stubDir, stubRoot, snippet };
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Merges one MCP server entry into an existing JSON config, without
|
|
93
|
-
* touching anything else already in the file.
|
|
94
|
-
*
|
|
95
|
-
* `writeFileSync` alone would replace the whole file (e.g. `~/.claude.json`
|
|
96
|
-
* or `~/.gemini/config/mcp_config.json`), throwing away every other setting stored
|
|
97
|
-
* there. An existing but broken file is never silently overwritten either:
|
|
98
|
-
* better an error than quiet data loss.
|
|
99
|
-
*/
|
|
100
|
-
export function mergeJsonServer(path, key, value) {
|
|
101
|
-
let existing = {};
|
|
102
|
-
if (existsSync(path)) {
|
|
103
|
-
const raw = readFileSync(path, 'utf8').trim();
|
|
104
|
-
if (raw) {
|
|
105
|
-
try {
|
|
106
|
-
existing = JSON.parse(raw);
|
|
107
|
-
}
|
|
108
|
-
catch {
|
|
109
|
-
throw new Error(`${path} contains invalid JSON. Nothing written.`);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
const mcpServers = existing.mcpServers ?? {};
|
|
114
|
-
existing.mcpServers = { ...mcpServers, [key]: value };
|
|
115
|
-
writeFileSync(path, `${JSON.stringify(existing, null, 2)}\n`, 'utf8');
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Appends the TOML snippet, unless it is already there.
|
|
119
|
-
*
|
|
120
|
-
* Appended, not replaced: a second run would otherwise add a second
|
|
121
|
-
* `[mcp_servers.onlymcp]` table, and two identical tables make the file
|
|
122
|
-
* invalid for most TOML parsers.
|
|
123
|
-
*/
|
|
124
|
-
export function appendTomlServer(path, snippet) {
|
|
125
|
-
const already = existsSync(path) && readFileSync(path, 'utf8').includes('[mcp_servers.onlymcp]');
|
|
126
|
-
if (already)
|
|
127
|
-
return 'already-present';
|
|
128
|
-
appendFileSync(path, `\n${snippet}`);
|
|
129
|
-
return 'written';
|
|
130
|
-
}
|
|
131
|
-
/** Pure given the filesystem: same inputs, same decision, every time. */
|
|
132
|
-
export function planInstall(home, opts) {
|
|
133
|
-
const targets = installTargets(home);
|
|
134
|
-
if (opts.all) {
|
|
135
|
-
if (opts.client)
|
|
136
|
-
return { kind: 'conflicting-options' };
|
|
137
|
-
const present = targets.filter((t) => existsSync(t.configPath));
|
|
138
|
-
const skipped = targets.filter((t) => !existsSync(t.configPath));
|
|
139
|
-
if (present.length === 0)
|
|
140
|
-
return { kind: 'none-present-for-all', targets };
|
|
141
|
-
return { kind: 'all', present, skipped };
|
|
142
|
-
}
|
|
143
|
-
if (!opts.client)
|
|
144
|
-
return { kind: 'missing-client', targets };
|
|
145
|
-
const id = resolveClientId(opts.client);
|
|
146
|
-
const target = id ? targets.find((x) => x.id === id) : undefined;
|
|
147
|
-
if (!target)
|
|
148
|
-
return { kind: 'unknown-client', targets };
|
|
149
|
-
return { kind: 'single', target };
|
|
150
|
-
}
|
|
151
|
-
/** Writes one target's snippet into its config file, creating directories as needed. */
|
|
152
|
-
export function writeInstallTarget(target) {
|
|
153
|
-
mkdirSync(dirname(target.configPath), { recursive: true });
|
|
154
|
-
const result = target.format === 'toml'
|
|
155
|
-
? appendTomlServer(target.configPath, target.snippet)
|
|
156
|
-
: (() => {
|
|
157
|
-
const parsed = JSON.parse(target.snippet);
|
|
158
|
-
const entry = Object.entries(parsed.mcpServers)[0];
|
|
159
|
-
if (!entry)
|
|
160
|
-
throw new Error(`${target.name}: empty mcpServers snippet.`);
|
|
161
|
-
mergeJsonServer(target.configPath, entry[0], entry[1]);
|
|
162
|
-
return 'written';
|
|
163
|
-
})();
|
|
164
|
-
if (target.stubDir)
|
|
165
|
-
mkdirSync(target.stubDir, { recursive: true });
|
|
166
|
-
return result;
|
|
167
|
-
}
|
|
168
|
-
//# sourceMappingURL=install.js.map
|
package/dist/install.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7F,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG1D,mEAAmE;AACnE,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AAEjC,2EAA2E;AAC3E,6EAA6E;AAC7E,4EAA4E;AAC5E,2EAA2E;AAC3E,wEAAwE;AACxE,yEAAyE;AACzE,wDAAwD;AACxD,EAAE;AACF,4EAA4E;AAC5E,oEAAoE;AACpE,MAAM,OAAO,GAAG,KAAK,CAAC;AACtB,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAC3B,qSAAqS,CAAC;AAExS,yEAAyE;AACzE,8EAA8E;AAC9E,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;AAClE,CAAC;AAED,SAAS,WAAW,CAAC,GAA4B;IAC/C,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,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AAE,CAAC;IACxD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AACpC,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,kBAAkB,CAAC,MAAqB;IACtD,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,MAAM,MAAM,GACV,MAAM,CAAC,MAAM,KAAK,MAAM;QACtB,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC;QACrD,CAAC,CAAC,CAAC,GAAG,EAAE;YACJ,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAA4C,CAAC;YACrF,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACnD,IAAI,CAAC,KAAK;gBAAE,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,6BAA6B,CAAC,CAAC;YACzE,eAAe,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACvD,OAAO,SAAkB,CAAC;QAC5B,CAAC,CAAC,EAAE,CAAC;IACX,IAAI,MAAM,CAAC,OAAO;QAAE,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/instructions.d.ts
DELETED
package/dist/instructions.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
// Harte Grenze aus dem Spike vom 21.08.2026 (Memory
|
|
2
|
-
// sol-mcp-instructions-cloud-skills-spike): Claude Code schneidet das
|
|
3
|
-
// instructions-Feld bei rund 2000 Zeichen STUMM ab, ohne Warnung und ohne
|
|
4
|
-
// Fehler. 1800 ist der Sicherheitsabstand. Codex zeigt das Feld nicht im
|
|
5
|
-
// Kontext, nutzt es aber, und seine Doku verlangt selbsttragende erste 512
|
|
6
|
-
// Zeichen. Beides zusammen ergibt: Anleitung nach vorn, Namensliste nach
|
|
7
|
-
// hinten. Wird abgeschnitten, geht die Liste verloren, nie die Anleitung.
|
|
8
|
-
export const INSTRUCTIONS_BUDGET = 1800;
|
|
9
|
-
const PREAMBLE = [
|
|
10
|
-
"OnlyMCP holds this user's skills, agents and memory in the cloud, identical",
|
|
11
|
-
'on every machine. The names below are names only, not content: call',
|
|
12
|
-
'get_skill(name) to load a skill before following it, and',
|
|
13
|
-
'get_agent_definition(name) for an agent. Call list_skills or list_agents for',
|
|
14
|
-
'anything not named here. Memory is live: memory_read(path) and',
|
|
15
|
-
'memory_write(path, content). All of it is writable, not just readable:',
|
|
16
|
-
'skill_write, agent_write and the matching *_delete tools; connection_create',
|
|
17
|
-
'adds another MCP server to this account.',
|
|
18
|
-
// The same sentence as the hosted server's (packages/api/src/mcp/instructions.ts): two wordings would be two habits.
|
|
19
|
-
'Link with [[name]] or typed: [[skill:name]], [[agent:name]], [[mcp:slug]], [[memory:path]].',
|
|
20
|
-
].join(' ');
|
|
21
|
-
/**
|
|
22
|
-
* Der BrainVault-Ablauf in drei Saetzen (Spec 7), wortgleich mit dem der
|
|
23
|
-
* gehosteten Oberflaeche (packages/api/src/mcp/instructions.ts). Zwei
|
|
24
|
-
* Fassungen desselben Satzes waeren zwei Gewohnheiten.
|
|
25
|
-
*
|
|
26
|
-
* Je Konto abschaltbar: wer OnlyMCP als reinen Skill-Speicher benutzt, will
|
|
27
|
-
* keinen Ablauf und will die Zeichen fuer Namen zurueck.
|
|
28
|
-
*/
|
|
29
|
-
const BRAINVAULT = [
|
|
30
|
-
'Memory is a vault, not a scratch file: read MEMORY.md first, it is the index.',
|
|
31
|
-
'After finishing a task, write one solutions/sol-*.md for what was not obvious',
|
|
32
|
-
'and one entry in history/YYYY-MM-DD.md. Link related files with [[name]];',
|
|
33
|
-
"memory_links(path) says which of a file's links point nowhere yet.",
|
|
34
|
-
].join(' ');
|
|
35
|
-
function section(label, tool, names, used) {
|
|
36
|
-
if (names.length === 0)
|
|
37
|
-
return '';
|
|
38
|
-
const kept = [];
|
|
39
|
-
for (const name of names) {
|
|
40
|
-
const rest = names.length - kept.length - 1;
|
|
41
|
-
const tail = rest > 0 ? ` (+${rest} more, call ${tool})` : '';
|
|
42
|
-
const line = `\n\n${label}: ${[...kept, name].join(', ')}${tail}`;
|
|
43
|
-
if (used + line.length > INSTRUCTIONS_BUDGET)
|
|
44
|
-
break;
|
|
45
|
-
kept.push(name);
|
|
46
|
-
}
|
|
47
|
-
if (kept.length === 0)
|
|
48
|
-
return `\n\n${label}: call ${tool}`;
|
|
49
|
-
const rest = names.length - kept.length;
|
|
50
|
-
const tail = rest > 0 ? ` (+${rest} more, call ${tool})` : '';
|
|
51
|
-
return `\n\n${label}: ${kept.join(', ')}${tail}`;
|
|
52
|
-
}
|
|
53
|
-
export function buildInstructions(skills, agents, opts = {}) {
|
|
54
|
-
// Vor den Namenslisten und nach der Anleitung: abgeschnitten wird der
|
|
55
|
-
// Schluss, also steht vorn, was ueberleben muss - und ein halb angekommener
|
|
56
|
-
// Ablauf ist schlimmer als gar keiner.
|
|
57
|
-
let out = opts.brainvault === false ? PREAMBLE : `${PREAMBLE} ${BRAINVAULT}`;
|
|
58
|
-
// Platz fuer die Agents-Zeile zuruecklegen, BEVOR die Skills ihn aufbrauchen.
|
|
59
|
-
// Ohne diese Reserve frisst eine lange Skill-Liste das ganze Budget, die
|
|
60
|
-
// Agents-Zeile wird trotzdem angehaengt, und das Feld ueberschreitet 1800.
|
|
61
|
-
// Beim Nachrechnen mit je 400 Namen waren es 1817 Zeichen, mit Reserve 1800.
|
|
62
|
-
const reserve = agents.length > 0 ? '\n\nAgents: call list_agents'.length : 0;
|
|
63
|
-
out += section('Skills', 'list_skills', skills, out.length + reserve);
|
|
64
|
-
out += section('Agents', 'list_agents', agents, out.length);
|
|
65
|
-
return out;
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=instructions.js.map
|
package/dist/instructions.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,sEAAsE;AACtE,0EAA0E;AAC1E,yEAAyE;AACzE,2EAA2E;AAC3E,yEAAyE;AACzE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAExC,MAAM,QAAQ,GAAG;IACf,6EAA6E;IAC7E,qEAAqE;IACrE,0DAA0D;IAC1D,8EAA8E;IAC9E,gEAAgE;IAChE,wEAAwE;IACxE,6EAA6E;IAC7E,0CAA0C;IAC1C,qHAAqH;IACrH,6FAA6F;CAC9F,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ;;;;;;;GAOG;AACH,MAAM,UAAU,GAAG;IACjB,+EAA+E;IAC/E,+EAA+E;IAC/E,2EAA2E;IAC3E,oEAAoE;CACrE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,SAAS,OAAO,CAAC,KAAa,EAAE,IAAY,EAAE,KAAe,EAAE,IAAY;IACzE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAClC,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5C,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,eAAe,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,GAAG,OAAO,KAAK,KAAK,CAAC,GAAG,IAAI,E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IAC5D,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/memoryPath.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isSafeMemoryPath(path: string): boolean;
|
package/dist/memoryPath.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Client-seitige Kopie der Server-Regel (packages/api/src/http/names.ts,
|
|
2
|
-
// memoryPath). Ohne diese Pruefung baut apiClient.ts den Pfad nur segmentweise
|
|
3
|
-
// per encodeURIComponent zusammen, und encodeURIComponent laesst ".." als
|
|
4
|
-
// literale zwei Punkte durch. Bei einem falsch konfigurierten oder
|
|
5
|
-
// kompromittierten ONLYMCP_API_URL koennte ein Traversal-Segment so bis zur
|
|
6
|
-
// Anfrage durchrutschen, bevor der Server ihn (server-seitig, aber eben erst
|
|
7
|
-
// dort) ablehnt. Client und Server pruefen deshalb beide, unabhaengig
|
|
8
|
-
// voneinander.
|
|
9
|
-
const MEMORY_PATH = /^[a-z0-9][a-z0-9._-]*(\/[a-z0-9][a-z0-9._-]*)*\.md$/i;
|
|
10
|
-
export function isSafeMemoryPath(path) {
|
|
11
|
-
return MEMORY_PATH.test(path) && !path.split('/').includes('..');
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=memoryPath.js.map
|
package/dist/memoryPath.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memoryPath.js","sourceRoot":"","sources":["../src/memoryPath.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,+EAA+E;AAC/E,0EAA0E;AAC1E,mEAAmE;AACnE,4EAA4E;AAC5E,6EAA6E;AAC7E,sEAAsE;AACtE,eAAe;AACf,MAAM,WAAW,GAAG,sDAAsD,CAAC;AAE3E,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACnE,CAAC"}
|
package/dist/memorySync.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { ApiClient } from './apiClient.js';
|
|
2
|
-
export type MemorySyncResult = {
|
|
3
|
-
written: number;
|
|
4
|
-
/** Paths the server sent that this command refused to turn into a file. */
|
|
5
|
-
refused: string[];
|
|
6
|
-
/** A team file whose path a personal file already took. */
|
|
7
|
-
collisions: string[];
|
|
8
|
-
failures: {
|
|
9
|
-
what: string;
|
|
10
|
-
code: string;
|
|
11
|
-
}[];
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Write every memory file this account can read into one directory, folder
|
|
15
|
-
* structure included (package 03 task 12, spec 8.5).
|
|
16
|
-
*
|
|
17
|
-
* Two independent checks stand between a path from the server and a write on
|
|
18
|
-
* the disk, and they are not redundant: `isSafeMemoryPath` is the rule the
|
|
19
|
-
* server enforces on the way in, and the prefix check below is the one that
|
|
20
|
-
* holds even if that rule is ever loosened, if a path arrives from a wrongly
|
|
21
|
-
* configured ONLYMCP_API_URL, or if `resolve` and the regexp disagree about
|
|
22
|
-
* some encoding. Nothing outside `dir` is ever written.
|
|
23
|
-
*
|
|
24
|
-
* Archived rows are included on purpose. The archive is exactly the state in
|
|
25
|
-
* which somebody wants their notes back on their own disk, and spec 8a calls
|
|
26
|
-
* leaving them out a shortcoming, not a feature.
|
|
27
|
-
*/
|
|
28
|
-
export declare function syncMemoryToDisk(api: ApiClient, dir: string): Promise<MemorySyncResult>;
|
package/dist/memorySync.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { mkdir, writeFile } from 'node:fs/promises';
|
|
2
|
-
import { dirname, resolve, sep } from 'node:path';
|
|
3
|
-
import { isSafeMemoryPath } from './memoryPath.js';
|
|
4
|
-
/**
|
|
5
|
-
* Write every memory file this account can read into one directory, folder
|
|
6
|
-
* structure included (package 03 task 12, spec 8.5).
|
|
7
|
-
*
|
|
8
|
-
* Two independent checks stand between a path from the server and a write on
|
|
9
|
-
* the disk, and they are not redundant: `isSafeMemoryPath` is the rule the
|
|
10
|
-
* server enforces on the way in, and the prefix check below is the one that
|
|
11
|
-
* holds even if that rule is ever loosened, if a path arrives from a wrongly
|
|
12
|
-
* configured ONLYMCP_API_URL, or if `resolve` and the regexp disagree about
|
|
13
|
-
* some encoding. Nothing outside `dir` is ever written.
|
|
14
|
-
*
|
|
15
|
-
* Archived rows are included on purpose. The archive is exactly the state in
|
|
16
|
-
* which somebody wants their notes back on their own disk, and spec 8a calls
|
|
17
|
-
* leaving them out a shortcoming, not a feature.
|
|
18
|
-
*/
|
|
19
|
-
export async function syncMemoryToDisk(api, dir) {
|
|
20
|
-
const base = resolve(dir);
|
|
21
|
-
await mkdir(base, { recursive: true });
|
|
22
|
-
const result = { written: 0, refused: [], collisions: [], failures: [] };
|
|
23
|
-
const { files } = await api.listMemory();
|
|
24
|
-
// Personal first, so a path claimed by both scopes belongs to the file this
|
|
25
|
-
// account owns. The team file is then reported rather than quietly dropped;
|
|
26
|
-
// a directory per scope is the export's job (task 12a), not this one's.
|
|
27
|
-
const ordered = [...files].sort((a, b) => a.scope === b.scope ? a.path.localeCompare(b.path) : a.scope === 'personal' ? -1 : 1);
|
|
28
|
-
const taken = new Set();
|
|
29
|
-
for (const f of ordered) {
|
|
30
|
-
if (!isSafeMemoryPath(f.path)) {
|
|
31
|
-
result.refused.push(f.path);
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
const dest = resolve(base, ...f.path.split('/'));
|
|
35
|
-
if (!dest.startsWith(base + sep)) {
|
|
36
|
-
result.refused.push(f.path);
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
if (taken.has(dest)) {
|
|
40
|
-
result.collisions.push(f.path);
|
|
41
|
-
continue;
|
|
42
|
-
}
|
|
43
|
-
try {
|
|
44
|
-
const file = await api.readMemory(f.path);
|
|
45
|
-
await mkdir(dirname(dest), { recursive: true });
|
|
46
|
-
await writeFile(dest, file.content, 'utf8');
|
|
47
|
-
taken.add(dest);
|
|
48
|
-
result.written += 1;
|
|
49
|
-
}
|
|
50
|
-
catch (e) {
|
|
51
|
-
result.failures.push({ what: f.path, code: e instanceof Error ? e.message : String(e) });
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return result;
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=memorySync.js.map
|
package/dist/memorySync.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memorySync.js","sourceRoot":"","sources":["../src/memorySync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAWnD;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,GAAc,EAAE,GAAW;IAChE,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1B,MAAM,KAAK,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEvC,MAAM,MAAM,GAAqB,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IAC3F,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,GAAG,CAAC,UAAU,EAAE,CAAC;IAEzC,4EAA4E;IAC5E,4EAA4E;IAC5E,wEAAwE;IACxE,MAAM,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACvC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC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AO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC3F,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/paths.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** The stable id of this machine for the devices list (deviceId.ts). Not in the cache folder: `logout` clears that. */
|
|
2
|
-
export declare function deviceIdFile(): string;
|
|
3
|
-
export declare function cacheDir(): string;
|
|
4
|
-
/**
|
|
5
|
-
* Die Ordner, in die Stubs geschrieben werden.
|
|
6
|
-
*
|
|
7
|
-
* Zurueck kommt jeweils die WURZEL eines Clients, nicht sein `skills`-Ordner:
|
|
8
|
-
* writeStubs legt darunter `skills/` und `agents/` an, weil beide Scanner
|
|
9
|
-
* nebeneinander stehen. Bis Aufgabe 12 gab ONLYMCP_STUB_DIRS `~/.codex/skills`
|
|
10
|
-
* zurueck und die Stubs landeten in `~/.codex/skills/skills` - also an einer
|
|
11
|
-
* Stelle, die Codex nie liest.
|
|
12
|
-
*
|
|
13
|
-
* Mehrzahl, weil mehrere Clients gleichzeitig auf demselben Geraet laufen
|
|
14
|
-
* koennen und jeder einen anderen Ordner scannt.
|
|
15
|
-
*/
|
|
16
|
-
export declare function stubDirs(): string[];
|
package/dist/paths.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { existsSync } from 'node:fs';
|
|
2
|
-
import { homedir } from 'node:os';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
// ONLYMCP_HOME wird an zwei Stellen unterschiedlich gelesen, und das ist
|
|
5
|
-
// Absicht: hier unten als Ersatz fuer ~/.claude/onlymcp (der eigene Ordner
|
|
6
|
-
// dieses Werkzeugs), in clientHome() als Ersatz fuer das Heimatverzeichnis
|
|
7
|
-
// (so wie install.ts es liest). Ein Test setzt die Variable auf einen
|
|
8
|
-
// Wegwerf-Ordner und trifft damit beides, ohne je ein echtes ~/.claude
|
|
9
|
-
// anzufassen.
|
|
10
|
-
function base() {
|
|
11
|
-
return process.env.ONLYMCP_HOME ?? join(homedir(), '.claude', 'onlymcp');
|
|
12
|
-
}
|
|
13
|
-
function clientHome() {
|
|
14
|
-
return process.env.ONLYMCP_HOME ?? homedir();
|
|
15
|
-
}
|
|
16
|
-
/** The stable id of this machine for the devices list (deviceId.ts). Not in the cache folder: `logout` clears that. */
|
|
17
|
-
export function deviceIdFile() {
|
|
18
|
-
return join(base(), 'device-id');
|
|
19
|
-
}
|
|
20
|
-
export function cacheDir() {
|
|
21
|
-
return join(base(), 'cache');
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Die Ordner, in die Stubs geschrieben werden.
|
|
25
|
-
*
|
|
26
|
-
* Zurueck kommt jeweils die WURZEL eines Clients, nicht sein `skills`-Ordner:
|
|
27
|
-
* writeStubs legt darunter `skills/` und `agents/` an, weil beide Scanner
|
|
28
|
-
* nebeneinander stehen. Bis Aufgabe 12 gab ONLYMCP_STUB_DIRS `~/.codex/skills`
|
|
29
|
-
* zurueck und die Stubs landeten in `~/.codex/skills/skills` - also an einer
|
|
30
|
-
* Stelle, die Codex nie liest.
|
|
31
|
-
*
|
|
32
|
-
* Mehrzahl, weil mehrere Clients gleichzeitig auf demselben Geraet laufen
|
|
33
|
-
* koennen und jeder einen anderen Ordner scannt.
|
|
34
|
-
*/
|
|
35
|
-
export function stubDirs() {
|
|
36
|
-
const dirs = [];
|
|
37
|
-
// Claude Code setzt CLAUDE_PLUGIN_ROOT, wenn es den MCP-Server aus dem
|
|
38
|
-
// Plugin heraus startet. Dort liegen Stubs an einer Stelle, die der Skill-
|
|
39
|
-
// und Agent-Scanner ohnehin liest.
|
|
40
|
-
if (process.env.CLAUDE_PLUGIN_ROOT)
|
|
41
|
-
dirs.push(process.env.CLAUDE_PLUGIN_ROOT);
|
|
42
|
-
// Alle uebrigen Clients mit eigenem Scanner, gesetzt von `onlymcp install`.
|
|
43
|
-
// Mehrere durch Doppelpunkt getrennt wie PATH: ein Client mehr ist ein
|
|
44
|
-
// Eintrag mehr, keine Codeaenderung.
|
|
45
|
-
for (const d of (process.env.ONLYMCP_STUB_DIRS ?? '').split(':')) {
|
|
46
|
-
if (d)
|
|
47
|
-
dirs.push(d);
|
|
48
|
-
}
|
|
49
|
-
// Was ohne jede Konfiguration da ist. Geprueft, nicht angelegt: wer kein
|
|
50
|
-
// Codex installiert hat, soll durch `onlymcp sync` kein ~/.codex bekommen.
|
|
51
|
-
for (const d of [join(clientHome(), '.claude'), join(clientHome(), '.codex')]) {
|
|
52
|
-
if (existsSync(d) && !dirs.includes(d))
|
|
53
|
-
dirs.push(d);
|
|
54
|
-
}
|
|
55
|
-
// Letzter Rueckfall fuer CLI und Tests ohne jeden Client-Kontext.
|
|
56
|
-
return dirs.length > 0 ? dirs : [join(base(), 'plugin')];
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=paths.js.map
|
package/dist/paths.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,yEAAyE;AACzE,2EAA2E;AAC3E,2EAA2E;AAC3E,sEAAsE;AACtE,uEAAuE;AACvE,cAAc;AACd,SAAS,IAAI;IACX,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAC3E,CAAC;AAED,SAAS,UAAU;IACj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,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The caveat sentences, in the four languages the product carries.
|
|
3
|
-
*
|
|
4
|
-
* A caveat is a client fact like the command next to it, and two places state
|
|
5
|
-
* it: the Connect view of the dashboard and the generated client sections of
|
|
6
|
-
* the public documentation (packages/api/src/docs/generated.ts). Each kept its
|
|
7
|
-
* own copy until packages 07 and 09 met, and 17 of the 24 sentences already
|
|
8
|
-
* differed. `ClientRecord.caveats` names an entry by its key.
|
|
9
|
-
*/
|
|
10
|
-
export type CaveatLanguage = 'en' | 'de' | 'fr' | 'it';
|
|
11
|
-
export declare const CAVEATS: Record<string, Record<CaveatLanguage, string>>;
|
|
12
|
-
/**
|
|
13
|
-
* The sentence for one key. An unknown language reads English, and an unknown
|
|
14
|
-
* key comes back as it is, so a typo shows on the first read instead of
|
|
15
|
-
* vanishing.
|
|
16
|
-
*/
|
|
17
|
-
export declare function caveatText(key: string, language: string): string;
|
package/dist/registry/caveats.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export const CAVEATS = {
|
|
2
|
-
'clients.caveat.chatgptDeveloperMode': {
|
|
3
|
-
en: 'Custom MCP connectors live in ChatGPT’s developer mode on the web, and need a paid plan.',
|
|
4
|
-
de: 'Eigene MCP-Connectors gibt es in ChatGPT nur im Entwicklermodus im Web, und sie brauchen ein bezahltes Abo.',
|
|
5
|
-
fr: 'Les connecteurs MCP personnalisés se trouvent dans le mode développeur de ChatGPT sur le web et demandent un abonnement payant.',
|
|
6
|
-
it: 'I connettori MCP personalizzati si trovano nella modalità sviluppatore di ChatGPT sul web e richiedono un piano a pagamento.',
|
|
7
|
-
},
|
|
8
|
-
'clients.caveat.geminiAppSpark': {
|
|
9
|
-
en: 'Custom apps work in Gemini Spark workflows and for quick actions in chat. They need a personal Google account, and you have to be 18 or over and in the US.',
|
|
10
|
-
de: 'Eigene Apps funktionieren in Gemini-Spark-Workflows und für schnelle Aktionen im Chat. Dafür brauchst du ein privates Google-Konto, musst mindestens 18 Jahre alt sein und dich in den USA befinden.',
|
|
11
|
-
fr: 'Les applications personnalisées fonctionnent dans les workflows Gemini Spark et pour des actions rapides dans le chat. Il te faut un compte Google personnel, et tu dois avoir 18 ans ou plus et te trouver aux États-Unis.',
|
|
12
|
-
it: 'Le app personalizzate funzionano nei flussi di lavoro di Gemini Spark e per azioni rapide in chat. Ti serve un account Google personale, e devi avere almeno 18 anni e trovarti negli Stati Uniti.',
|
|
13
|
-
},
|
|
14
|
-
'clients.caveat.grokConnectors': {
|
|
15
|
-
en: 'In Grok, open grok.com/connectors, choose New Connector, then Custom, paste the endpoint above as the server URL and sign in when asked. Custom connectors need a paid plan.',
|
|
16
|
-
de: 'In Grok öffnest du grok.com/connectors, wählst New Connector und dann Custom, fügst den Endpoint von oben als Server-URL ein und meldest dich an, wenn du dazu aufgefordert wirst. Eigene Connectors brauchen ein bezahltes Abo.',
|
|
17
|
-
fr: 'Dans Grok, ouvre grok.com/connectors, choisis New Connector puis Custom, colle l’endpoint ci-dessus comme URL du serveur et connecte-toi quand on te le demande. Les connecteurs personnalisés demandent un abonnement payant.',
|
|
18
|
-
it: 'In Grok apri grok.com/connectors, scegli New Connector e poi Custom, incolla l’endpoint qui sopra come URL del server e accedi quando richiesto. I connettori personalizzati richiedono un piano a pagamento.',
|
|
19
|
-
},
|
|
20
|
-
'clients.caveat.grokBusinessAdmin': {
|
|
21
|
-
en: 'On Business and Enterprise plans an admin has to add the connector in console.x.ai first.',
|
|
22
|
-
de: 'Bei Business- und Enterprise-Abos muss zuerst die Administration den Connector in console.x.ai hinzufügen.',
|
|
23
|
-
fr: 'Avec les abonnements Business et Enterprise, un administrateur doit d’abord ajouter le connecteur dans console.x.ai.',
|
|
24
|
-
it: 'Con i piani Business ed Enterprise, un amministratore deve prima aggiungere il connettore in console.x.ai.',
|
|
25
|
-
},
|
|
26
|
-
'clients.caveat.gitlabDuoUserFile': {
|
|
27
|
-
en: 'The path above is the user file for JetBrains IDEs and the GitLab Duo CLI (on Windows: %APPDATA%\\GitLab\\duo\\mcp.json). In VS Code and VSCodium, run “GitLab MCP: Open User Settings (JSON)” to open it. A file at .gitlab/duo/mcp.json in a workspace works too. VS Code needs the GitLab extension in version 6.35.6 or later.',
|
|
28
|
-
de: 'Der Pfad oben ist die Benutzerdatei für JetBrains-IDEs und die GitLab-Duo-CLI (unter Windows: %APPDATA%\\GitLab\\duo\\mcp.json). In VS Code und VSCodium öffnest du sie mit dem Befehl «GitLab MCP: Open User Settings (JSON)». Eine Datei unter .gitlab/duo/mcp.json in einem Workspace funktioniert ebenfalls. VS Code braucht die GitLab-Erweiterung ab Version 6.35.6.',
|
|
29
|
-
fr: 'Le chemin ci-dessus est le fichier utilisateur pour les IDE JetBrains et la CLI GitLab Duo (sous Windows : %APPDATA%\\GitLab\\duo\\mcp.json). Dans VS Code et VSCodium, exécute « GitLab MCP: Open User Settings (JSON) » pour l’ouvrir. Un fichier .gitlab/duo/mcp.json dans un espace de travail fonctionne aussi. VS Code demande l’extension GitLab en version 6.35.6 ou plus récente.',
|
|
30
|
-
it: 'Il percorso qui sopra è il file utente per gli IDE JetBrains e la CLI di GitLab Duo (su Windows: %APPDATA%\\GitLab\\duo\\mcp.json). In VS Code e VSCodium esegui «GitLab MCP: Open User Settings (JSON)» per aprirlo. Funziona anche un file .gitlab/duo/mcp.json in un workspace. VS Code richiede l’estensione GitLab dalla versione 6.35.6 in poi.',
|
|
31
|
-
},
|
|
32
|
-
'clients.caveat.claudeCodeConnectorSynced': {
|
|
33
|
-
en: 'If the claude.ai connector is synced into Claude Code, nothing else is needed.',
|
|
34
|
-
de: 'Ist der claude.ai-Connector in Claude Code synchronisiert, brauchst du nichts weiter.',
|
|
35
|
-
fr: 'Si le connecteur claude.ai est synchronisé dans Claude Code, tu n’as besoin de rien d’autre.',
|
|
36
|
-
it: 'Se il connettore claude.ai è sincronizzato in Claude Code, non ti serve altro.',
|
|
37
|
-
},
|
|
38
|
-
'clients.caveat.claudeHeaderBeta': {
|
|
39
|
-
en: 'Claude connects through OAuth. Static headers exist only in a limited beta.',
|
|
40
|
-
de: 'Claude verbindet sich über OAuth. Feste Header gibt es nur in einer beschränkten Beta.',
|
|
41
|
-
fr: 'Claude se connecte via OAuth. Les en-têtes fixes n’existent que dans une bêta limitée.',
|
|
42
|
-
it: 'Claude si connette tramite OAuth. Gli header statici esistono solo in una beta limitata.',
|
|
43
|
-
},
|
|
44
|
-
'clients.caveat.copilotPolicy': {
|
|
45
|
-
en: 'Business and Enterprise tenants must enable the MCP policy first.',
|
|
46
|
-
de: 'In Business- und Enterprise-Organisationen muss zuerst die MCP-Richtlinie eingeschaltet werden.',
|
|
47
|
-
fr: 'Les organisations Business et Enterprise doivent d’abord activer la stratégie MCP.',
|
|
48
|
-
it: 'Nelle organizzazioni Business ed Enterprise va prima attivata la policy MCP.',
|
|
49
|
-
},
|
|
50
|
-
'clients.caveat.windsurfAllowlist': {
|
|
51
|
-
en: 'An admin allowlist can block servers that are not listed.',
|
|
52
|
-
de: 'Eine Freigabeliste der Administration kann Server sperren, die nicht darauf stehen.',
|
|
53
|
-
fr: 'Une liste d’autorisation définie par un administrateur peut bloquer les serveurs qui n’y figurent pas.',
|
|
54
|
-
it: 'Una lista di autorizzazione dell’amministratore può bloccare i server che non vi compaiono.',
|
|
55
|
-
},
|
|
56
|
-
'clients.caveat.codexTokenEnv': {
|
|
57
|
-
en: 'Codex reads ONLYMCP_TOKEN from the environment every time it starts. Put the export line in your shell profile, not just the current terminal session.',
|
|
58
|
-
de: 'Codex liest ONLYMCP_TOKEN bei jedem Start aus der Umgebung. Schreib die export-Zeile in dein Shell-Profil, nicht nur in die aktuelle Terminal-Sitzung.',
|
|
59
|
-
fr: 'Codex lit ONLYMCP_TOKEN dans l’environnement à chaque démarrage. Mets la ligne export dans le profil de ton shell, pas seulement dans la session de terminal en cours.',
|
|
60
|
-
it: 'Codex legge ONLYMCP_TOKEN dall’ambiente a ogni avvio. Metti la riga export nel profilo della tua shell, non solo nella sessione di terminale attuale.',
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* The sentence for one key. An unknown language reads English, and an unknown
|
|
65
|
-
* key comes back as it is, so a typo shows on the first read instead of
|
|
66
|
-
* vanishing.
|
|
67
|
-
*/
|
|
68
|
-
export function caveatText(key, language) {
|
|
69
|
-
const entry = CAVEATS[key];
|
|
70
|
-
if (!entry)
|
|
71
|
-
return key;
|
|
72
|
-
return entry[language.slice(0, 2)] ?? entry.en ?? key;
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=caveats.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"caveats.js","sourceRoot":"","sources":["../../src/registry/caveats.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,OAAO,GAAmD;IACrE,qCAAqC,EAAE;QACrC,EAAE,EAAE,0FAA0F;QAC9F,EAAE,EAAE,6GAA6G;QACjH,EAAE,EAAE,iIAAiI;QACrI,EAAE,EAAE,8HAA8H;KACnI;IACD,+BAA+B,EAAE;QAC/B,EAAE,EAAE,6JAA6J;QACjK,EAAE,EAAE,sMAAsM;QAC1M,EAAE,EAAE,6NAA6N;QACjO,EAAE,EAAE,oMAAoM;KACzM;IACD,+BAA+B,EAAE;QAC/B,EAAE,EAAE,8KAA8K;QAClL,EAAE,EAAE,kOAAkO;QACtO,EAAE,EAAE,gOAAgO;QACpO,EAAE,EAAE,+MAA+M;KACpN;IACD,kCAAkC,EAAE;QAClC,EAAE,EAAE,2FAA2F;QAC/F,EAAE,EAAE,4GAA4G;QAChH,EAAE,EAAE,sHAAsH;QAC1H,EAAE,EAAE,4GAA4G;KACjH;IACD,kCAAkC,EAAE;QAClC,EAAE,EAAE,oUAAoU;QACxU,EAAE,EAAE,4WAA4W;QAChX,EAAE,EAAE,4XAA4X;QAChY,EAAE,EAAE,uVAAuV;KAC5V;IACD,0CAA0C,EAAE;QAC1C,EAAE,EAAE,gFAAgF;QACpF,EAAE,EAAE,uFAAuF;QAC3F,EAAE,EAAE,8FAA8F;QAClG,EAAE,EAAE,gFAAgF;KACrF;IACD,iCAAiC,EAAE;QACjC,EAAE,EAAE,6EAA6E;QACjF,EAAE,EAAE,wFAAwF;QAC5F,EAAE,EAAE,wFAAwF;QAC5F,EAAE,EAAE,0FAA0F;KAC/F;IACD,8BAA8B,EAAE;QAC9B,EAAE,EAAE,mEAAmE;QACvE,EAAE,EAAE,iGAAiG;QACrG,EAAE,EAAE,oFAAoF;QACxF,EAAE,EAAE,8EAA8E;KACnF;IACD,kCAAkC,EAAE;QAClC,EAAE,EAAE,2DAA2D;QAC/D,EAAE,EAAE,qFAAqF;QACzF,EAAE,EAAE,wGAAwG;QAC5G,EAAE,EAAE,6FAA6F;KAClG;IACD,8BAA8B,EAAE;QAC9B,EAAE,EAAE,wJAAwJ;QAC5J,EAAE,EAAE,wJAAwJ;QAC5J,EAAE,EAAE,wKAAwK;QAC5K,EAAE,EAAE,uJAAuJ;KAC5J;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW,EAAE,QAAgB;IACtD,MAAM,KAAK,GAAuC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/D,IAAI,CAAC,KAAK;QAAE,OAAO,GAAG,CAAC;IACvB,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,EAAE,IAAI,GAAG,CAAC;AACxD,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ClientId, ClientRecord, RemoteContext, Snippet } from './types.js';
|
|
2
|
-
export declare const CLIENTS: readonly ClientRecord[];
|
|
3
|
-
export declare function clientById(id: ClientId): ClientRecord | undefined;
|
|
4
|
-
/**
|
|
5
|
-
* A client by its id or by one of its retired aliases (`gemini-cli` is Antigravity), or undefined. For input that
|
|
6
|
-
* comes from outside, such as an address, where an old spelling must keep working. Code that holds a `ClientId`
|
|
7
|
-
* uses `clientById`.
|
|
8
|
-
*/
|
|
9
|
-
export declare function findClient(idOrAlias: string): ClientRecord | undefined;
|
|
10
|
-
export declare function remoteSnippets(id: ClientId, ctx: RemoteContext): Snippet[] | null;
|
|
11
|
-
/**
|
|
12
|
-
* The local-install command for a client `npx onlymcp install` can set up,
|
|
13
|
-
* or null for every other one. Spec 07 §3.4: always with `npx`, always with
|
|
14
|
-
* `--client`, because the CLI without `--client` only lists the targets and
|
|
15
|
-
* exits 2.
|
|
16
|
-
*/
|
|
17
|
-
export declare function installCommand(id: ClientId): string | null;
|