@rotifer/mcp-server 0.16.1 → 0.18.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/README.md +1 -1
- package/dist/call-outcome.d.ts +19 -0
- package/dist/call-outcome.js +27 -0
- package/dist/call-outcome.js.map +1 -0
- package/dist/channel.d.ts +39 -0
- package/dist/channel.js +72 -0
- package/dist/channel.js.map +1 -0
- package/dist/cloud.d.ts +46 -21
- package/dist/cloud.js +110 -65
- package/dist/cloud.js.map +1 -1
- package/dist/local.d.ts +14 -0
- package/dist/local.js +39 -4
- package/dist/local.js.map +1 -1
- package/dist/server.js +45 -16
- package/dist/server.js.map +1 -1
- package/dist/telemetry/config.d.ts +40 -0
- package/dist/telemetry/config.js +128 -0
- package/dist/telemetry/config.js.map +1 -0
- package/dist/telemetry/consent.d.ts +28 -0
- package/dist/telemetry/consent.js +40 -0
- package/dist/telemetry/consent.js.map +1 -0
- package/dist/telemetry/heartbeat.d.ts +11 -0
- package/dist/telemetry/heartbeat.js +90 -0
- package/dist/telemetry/heartbeat.js.map +1 -0
- package/dist/tools.d.ts +15 -8
- package/dist/tools.js +41 -18
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one environment-variable check both telemetry paths share.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors rotifer-playground's src/telemetry/consent.ts exactly — same
|
|
5
|
+
* logic, independently implemented because these are two separate npm
|
|
6
|
+
* packages that cannot import each other's source. If this file and that one
|
|
7
|
+
* ever diverge, fix both; a user who sets ROTIFER_TELEMETRY=0 expects it to
|
|
8
|
+
* mean "off" from whichever binary they happen to be running.
|
|
9
|
+
*
|
|
10
|
+
* ADR-329's decision is explicit: "ROTIFER_TELEMETRY=0 同时关闭匿名信号与
|
|
11
|
+
* 登录上报——「关掉」意味着全部,与 316 的语义一致." Before this module
|
|
12
|
+
* existed, ROTIFER_TELEMETRY was checked in exactly one place here
|
|
13
|
+
* (cloud.ts's telemetryOptedOut, for the signed-in invocation/download
|
|
14
|
+
* reports). Adding the anonymous heartbeat with its own copy of that check
|
|
15
|
+
* would have been the easy path and the wrong one.
|
|
16
|
+
*
|
|
17
|
+
* DO_NOT_TRACK is the cross-tool convention (https://consoledonottrack.com/)
|
|
18
|
+
* and is new here — it outranks ROTIFER_TELEMETRY because it is a stance the
|
|
19
|
+
* user took before ever hearing of this project.
|
|
20
|
+
*/
|
|
21
|
+
export function telemetryOptedOutByEnv(env = process.env) {
|
|
22
|
+
const dnt = (env.DO_NOT_TRACK || "").trim().toLowerCase();
|
|
23
|
+
if (dnt !== "" && dnt !== "0" && dnt !== "false")
|
|
24
|
+
return true;
|
|
25
|
+
const flag = (env.ROTIFER_TELEMETRY || "").trim().toLowerCase();
|
|
26
|
+
return flag === "0" || flag === "false" || flag === "off";
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* True when the environment explicitly asked for telemetry (as opposed to
|
|
30
|
+
* "unset, so whatever the default is"). An explicit ROTIFER_TELEMETRY=1
|
|
31
|
+
* should win even over a stored "disabled" choice — a per-shell override
|
|
32
|
+
* should not require first running a separate command to change stored state.
|
|
33
|
+
*/
|
|
34
|
+
export function telemetryExplicitlyOnByEnv(env = process.env) {
|
|
35
|
+
if (telemetryOptedOutByEnv(env))
|
|
36
|
+
return false;
|
|
37
|
+
const flag = (env.ROTIFER_TELEMETRY || "").trim().toLowerCase();
|
|
38
|
+
return flag !== "" && flag !== "0" && flag !== "false" && flag !== "off";
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=consent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent.js","sourceRoot":"","sources":["../../src/telemetry/consent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAyB,OAAO,CAAC,GAAG;IACzE,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC1D,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,OAAO;QAAE,OAAO,IAAI,CAAC;IAE9D,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAChE,OAAO,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,KAAK,CAAC;AAC5D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAyB,OAAO,CAAC,GAAG;IAC7E,IAAI,sBAAsB,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9C,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAChE,OAAO,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,KAAK,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reports one Gene invocation's worth of activity for this machine, today,
|
|
3
|
+
* on the given channel. Fire-and-forget; every failure mode is silence.
|
|
4
|
+
*
|
|
5
|
+
* Returns the first-run notice text exactly once — the first time a report
|
|
6
|
+
* for this machine is actually about to leave the process, never before (a
|
|
7
|
+
* machine whose heartbeat is off, by env or stored choice, must never be
|
|
8
|
+
* told "we're about to collect data" for data that in fact never leaves it)
|
|
9
|
+
* — and null every other time, including every call after the first.
|
|
10
|
+
*/
|
|
11
|
+
export declare function recordHeartbeat(channel: string): string | null;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Anonymous usage heartbeat (ADR-329).
|
|
3
|
+
*
|
|
4
|
+
* Answers a narrower question than the signed-in invocation report: not "who
|
|
5
|
+
* called what", just "did this machine run something today, and through
|
|
6
|
+
* which channel". No identity, on by default, and it costs nothing to lose
|
|
7
|
+
* one — this is not §33.4 input, so unlike logGeneInvocation's report this
|
|
8
|
+
* file tracks no in-flight requests for anything to await. A dropped
|
|
9
|
+
* heartbeat is not a hole in an audited ledger, it is one machine's "active
|
|
10
|
+
* today" signal that will show up again tomorrow if the machine is still in
|
|
11
|
+
* use.
|
|
12
|
+
*
|
|
13
|
+
* The one thing genuinely different from playground's version of this file:
|
|
14
|
+
* the first-run notice cannot go to stderr here. stderr is where CLI users
|
|
15
|
+
* look and exactly where MCP hosts do not — nobody reads a long-lived MCP
|
|
16
|
+
* server's stderr stream in normal use. So recordHeartbeat() *returns* the
|
|
17
|
+
* notice text instead of printing it, and the caller (server.ts) folds it
|
|
18
|
+
* into the tool response the user's client will actually render.
|
|
19
|
+
*/
|
|
20
|
+
import { loadCloudConfig } from "../cloud.js";
|
|
21
|
+
import { getPackageVersion } from "../version.js";
|
|
22
|
+
import { loadOrInitHeartbeatConfig, resolveHeartbeatDecision, heartbeatDecisionEnabled, markFirstRunNoticeShown, } from "./config.js";
|
|
23
|
+
const FIRST_RUN_NOTICE = "Anonymous usage heartbeat is on by default — no code, no identity, just " +
|
|
24
|
+
'"this machine ran something today". Set ROTIFER_TELEMETRY=0 or DO_NOT_TRACK=1 ' +
|
|
25
|
+
"to disable. Details: https://rotifer.dev/telemetry";
|
|
26
|
+
/**
|
|
27
|
+
* Reports one Gene invocation's worth of activity for this machine, today,
|
|
28
|
+
* on the given channel. Fire-and-forget; every failure mode is silence.
|
|
29
|
+
*
|
|
30
|
+
* Returns the first-run notice text exactly once — the first time a report
|
|
31
|
+
* for this machine is actually about to leave the process, never before (a
|
|
32
|
+
* machine whose heartbeat is off, by env or stored choice, must never be
|
|
33
|
+
* told "we're about to collect data" for data that in fact never leaves it)
|
|
34
|
+
* — and null every other time, including every call after the first.
|
|
35
|
+
*/
|
|
36
|
+
export function recordHeartbeat(channel) {
|
|
37
|
+
// The whole body is one try/catch, deliberately wider than the network
|
|
38
|
+
// call — loadOrInitHeartbeatConfig()/markFirstRunNoticeShown() write to
|
|
39
|
+
// ~/.rotifer/telemetry.json, and a tool call failing because this
|
|
40
|
+
// fire-and-forget signal couldn't touch the filesystem would be a much
|
|
41
|
+
// worse trade than just not sending a heartbeat this once.
|
|
42
|
+
try {
|
|
43
|
+
const config = loadOrInitHeartbeatConfig();
|
|
44
|
+
const decision = resolveHeartbeatDecision(config);
|
|
45
|
+
if (!heartbeatDecisionEnabled(decision))
|
|
46
|
+
return null;
|
|
47
|
+
// Persisted synchronously, before the fetch below, so a crash mid-request
|
|
48
|
+
// can never cause the notice to be owed again on the next call.
|
|
49
|
+
let notice = null;
|
|
50
|
+
if (!config.first_run_notice_shown) {
|
|
51
|
+
notice = FIRST_RUN_NOTICE;
|
|
52
|
+
markFirstRunNoticeShown(config);
|
|
53
|
+
}
|
|
54
|
+
const cloudConfig = loadCloudConfig();
|
|
55
|
+
const url = `${cloudConfig.endpoint.replace(/\/+$/, "")}/rest/v1/rpc/record_heartbeat`;
|
|
56
|
+
// No Authorization header: record_heartbeat is anon-callable by design
|
|
57
|
+
// (playground migration 20260830010000) — that grant is the entire point
|
|
58
|
+
// of ADR-329. Sending credentials here would be pointless (the RPC does
|
|
59
|
+
// not use them) and would defeat the "no identity" promise for a caller
|
|
60
|
+
// who happens to be signed in but hasn't opted into the invocation report.
|
|
61
|
+
fetch(url, {
|
|
62
|
+
method: "POST",
|
|
63
|
+
headers: { "Content-Type": "application/json", apikey: cloudConfig.anonKey },
|
|
64
|
+
body: JSON.stringify({
|
|
65
|
+
p_machine_id: config.machine_id,
|
|
66
|
+
p_channel: channel,
|
|
67
|
+
p_client_version: getPackageVersion(),
|
|
68
|
+
p_invocation_delta: 1,
|
|
69
|
+
}),
|
|
70
|
+
})
|
|
71
|
+
.then((res) => {
|
|
72
|
+
if (!res.ok && process.env.ROTIFER_DEBUG) {
|
|
73
|
+
process.stderr.write(`[rotifer] record_heartbeat failed (${res.status})\n`);
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
.catch((err) => {
|
|
77
|
+
if (process.env.ROTIFER_DEBUG) {
|
|
78
|
+
process.stderr.write(`[rotifer] record_heartbeat error: ${err?.message ?? err}\n`);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
return notice;
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
if (process.env.ROTIFER_DEBUG) {
|
|
85
|
+
process.stderr.write(`[rotifer] record_heartbeat setup error: ${err?.message ?? err}\n`);
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=heartbeat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heartbeat.js","sourceRoot":"","sources":["../../src/telemetry/heartbeat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,MAAM,gBAAgB,GACpB,0EAA0E;IAC1E,gFAAgF;IAChF,oDAAoD,CAAC;AAEvD;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,uEAAuE;IACvE,wEAAwE;IACxE,kEAAkE;IAClE,uEAAuE;IACvE,2DAA2D;IAC3D,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,yBAAyB,EAAE,CAAC;QAC3C,MAAM,QAAQ,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC;YAAE,OAAO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AAC,CAAC;QAEL,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;YAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,2CAA4C,GAAa,EAAE,OAAO,IAAI,GAAG,IAAI,CAAC,CAAC;QACtG,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type RestoreResult, type SnapshotMeta } from "./snapshots.js";
|
|
2
|
-
import { type
|
|
2
|
+
import { type ShellResult } from "./local.js";
|
|
3
|
+
import { type Gene, type GeneListResult, type ArenaRankingsResult, type GeneStats, type LeaderboardEntry, type DeveloperProfile, type InstallResult, type GeneVersionEntry, type McpStatsResult, type GeneReputationResult, type MyReputationResult, type DomainSuggestion } from "./cloud.js";
|
|
3
4
|
export declare function searchGenes(args: {
|
|
4
5
|
query?: string;
|
|
5
6
|
domain?: string;
|
|
@@ -76,14 +77,20 @@ export interface LogoutResult {
|
|
|
76
77
|
message: string;
|
|
77
78
|
}
|
|
78
79
|
export declare function logout(): LogoutResult;
|
|
80
|
+
/**
|
|
81
|
+
* Measure a local Gene and submit the measurement to the Arena.
|
|
82
|
+
*
|
|
83
|
+
* Until now this took five numbers from whoever called it and posted them as
|
|
84
|
+
* fitness. Nothing ran; an assistant could name any score it liked and the
|
|
85
|
+
* leaderboard would carry it (ADR-319 D3). The numbers now come from running
|
|
86
|
+
* the Gene, which is why this takes a `gene_name` and not a `gene_id`: a score
|
|
87
|
+
* can only be produced for a Gene that is here to be run.
|
|
88
|
+
*/
|
|
79
89
|
export declare function submitToArena(args: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
latency_score: number;
|
|
85
|
-
resource_efficiency: number;
|
|
86
|
-
}): Promise<ArenaSubmitResult>;
|
|
90
|
+
gene_name?: string;
|
|
91
|
+
project_root?: string;
|
|
92
|
+
[key: string]: unknown;
|
|
93
|
+
}): ShellResult;
|
|
87
94
|
export declare function installGeneFromCloud(args: {
|
|
88
95
|
gene_id: string;
|
|
89
96
|
project_root?: string;
|
package/dist/tools.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { listSnapshots, restoreGene } from "./snapshots.js";
|
|
2
|
-
import { resolveGenesDir, resolveProjectRoot } from "./local.js";
|
|
3
|
-
import { listGenes, getGene, getGeneByContentHash, getArenaRankings, getGeneStatsRpc, getReputationLeaderboard, getDeveloperProfile,
|
|
2
|
+
import { resolveGenesDir, resolveProjectRoot, arenaSubmit } from "./local.js";
|
|
3
|
+
import { listGenes, getGene, getGeneByContentHash, getArenaRankings, getGeneStatsRpc, getReputationLeaderboard, getDeveloperProfile, installGene, listGeneVersions as listGeneVersionsCloud, getMcpStats as getMcpStatsCloud, getGeneReputation as getGeneReputationCloud, getMyReputation as getMyReputationCloud, suggestDomain as suggestDomainCloud, loadCloudConfig, } from "./cloud.js";
|
|
4
4
|
import { loadCredentials, saveCredentials, clearCredentials, generateCodeVerifier, generateCodeChallenge, startOAuthCallbackServer, } from "./auth.js";
|
|
5
5
|
import { openBrowser } from "./open-browser.js";
|
|
6
6
|
import { validateGeneName } from "./validate-gene-name.js";
|
|
@@ -166,23 +166,46 @@ export function logout() {
|
|
|
166
166
|
clearCredentials();
|
|
167
167
|
return { success: true, message: `Logged out (was: ${existing.user.username} via ${existing.provider}).` };
|
|
168
168
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
/**
|
|
170
|
+
* Scores this tool used to accept from its caller. It no longer does — but a
|
|
171
|
+
* caller holding an older tool description will still send them, and a bare
|
|
172
|
+
* schema rejection would not tell it why. Named here so the refusal can.
|
|
173
|
+
*/
|
|
174
|
+
const CALLER_SUPPLIED_SCORES = [
|
|
175
|
+
"fitness_value",
|
|
176
|
+
"safety_score",
|
|
177
|
+
"success_rate",
|
|
178
|
+
"latency_score",
|
|
179
|
+
"resource_efficiency",
|
|
180
|
+
];
|
|
181
|
+
/**
|
|
182
|
+
* Measure a local Gene and submit the measurement to the Arena.
|
|
183
|
+
*
|
|
184
|
+
* Until now this took five numbers from whoever called it and posted them as
|
|
185
|
+
* fitness. Nothing ran; an assistant could name any score it liked and the
|
|
186
|
+
* leaderboard would carry it (ADR-319 D3). The numbers now come from running
|
|
187
|
+
* the Gene, which is why this takes a `gene_name` and not a `gene_id`: a score
|
|
188
|
+
* can only be produced for a Gene that is here to be run.
|
|
189
|
+
*/
|
|
190
|
+
export function submitToArena(args) {
|
|
191
|
+
const declared = CALLER_SUPPLIED_SCORES.filter((f) => args[f] !== undefined);
|
|
192
|
+
if (declared.length > 0) {
|
|
193
|
+
throw new Error(`arena_submit no longer accepts scores from the caller (received: ${declared.join(", ")}). ` +
|
|
194
|
+
"A fitness score is a measurement, not a claim: it is now produced by running the Gene in " +
|
|
195
|
+
"the sandbox, and the per-run evidence behind it is published alongside the score so anyone " +
|
|
196
|
+
"can recompute it. Call arena_submit with { gene_name } instead — list_local_genes shows " +
|
|
197
|
+
"what is available locally, install_gene fetches one that is not.");
|
|
173
198
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
resource_efficiency: validateScore("resource_efficiency", args.resource_efficiency),
|
|
185
|
-
});
|
|
199
|
+
if (!args.gene_name) {
|
|
200
|
+
if (typeof args.gene_id === "string" && args.gene_id) {
|
|
201
|
+
throw new Error("arena_submit takes gene_name, not gene_id. The score comes from running the Gene, so it can " +
|
|
202
|
+
"only be produced for one that exists locally: run install_gene with that gene_id first, then " +
|
|
203
|
+
"call arena_submit with the name it was installed under.");
|
|
204
|
+
}
|
|
205
|
+
throw new Error("gene_name is required. Use list_local_genes to see locally installed Genes.");
|
|
206
|
+
}
|
|
207
|
+
validateGeneName(args.gene_name);
|
|
208
|
+
return arenaSubmit({ gene_name: args.gene_name, project_root: args.project_root });
|
|
186
209
|
}
|
|
187
210
|
export async function installGeneFromCloud(args) {
|
|
188
211
|
if (!args.gene_id)
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAyC,MAAM,gBAAgB,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAyC,MAAM,gBAAgB,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,WAAW,EAAoB,MAAM,YAAY,CAAC;AAChG,OAAO,EACL,SAAS,EACT,OAAO,EACP,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,wBAAwB,EACxB,mBAAmB,EACnB,WAAW,EACX,gBAAgB,IAAI,qBAAqB,EACzC,WAAW,IAAI,gBAAgB,EAC/B,iBAAiB,IAAI,sBAAsB,EAC3C,eAAe,IAAI,oBAAoB,EACvC,aAAa,IAAI,kBAAkB,EACnC,eAAe,GAahB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,UAAU,GAA2B;IACzC,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF,MAAM,CAAC,KA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K,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACnC,MAAM,EAAE,CAAC,CAAC,EAAE;QACZ,QAAQ,EAAE,CAAC,CAAC,IAAI;QAChB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,eAAe,EAAE,CAAC,CAAC,eAAe;QAClC,SAAS,EAAE,CAAC,CAAC,SAAS;KACvB,CAAC,CAAC,CAAC;IAEJ,MAAM,MAAM,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC,IAAI,CACjC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,CAAC,CAC9D,CAAC;IACF,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAEvB,OAAO;QACL,UAAU;QACV,cAAc,EAAE,IAAI;YAClB,CAAC,CAAC,gCAAgC,IAAI,CAAC,QAAQ,4BAA4B,IAAI,CAAC,eAAe,IAAI,KAAK,gFAAgF;YACxL,CAAC,CAAC,uCAAuC;KAC5C,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rotifer/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"mcpName": "io.github.rotifer-protocol/mcp-server",
|
|
5
5
|
"description": "Rotifer MCP Server — AI agents search, compare, and rank Genes (modular AI skills) from a living ecosystem of 50+ capabilities. Zero config.",
|
|
6
6
|
"type": "module",
|