@calypsohq/elephant-mcp-server 1.2.0 → 1.3.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/calypso/AgentChoice.js +40 -0
- package/dist/calypso/AgentResponses.js +12 -5
- package/dist/calypso/AnswerDiagnostics.js +49 -0
- package/dist/calypso/CalypsoApiClient.js +10 -1
- package/dist/presets/PresetInstructions.js +7 -0
- package/dist/tools/AskTool.js +87 -16
- package/dist/tools/CreateBucketTool.js +1 -0
- package/dist/tools/RenameBucketTool.js +2 -1
- package/dist/tools/SearchTool.js +14 -2
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent a connection asks when the caller names none: the team's default
|
|
3
|
+
* agent reading every bucket the team has, decided per question by the API.
|
|
4
|
+
* A bucket created through Elephant is answerable from the next question on,
|
|
5
|
+
* which a stored agent (linked to at most five chosen buckets) cannot promise.
|
|
6
|
+
*/
|
|
7
|
+
export const CONNECTOR_AGENT_ID = "elephant-agent:mcp";
|
|
8
|
+
/**
|
|
9
|
+
* Which agent answers this call, and what to fall back to.
|
|
10
|
+
*
|
|
11
|
+
* A caller that names an agent gets exactly that one, checked against the
|
|
12
|
+
* catalog. A caller that names none gets the connector agent, with the
|
|
13
|
+
* catalog's default behind it for an API that does not know the connector
|
|
14
|
+
* agent yet, so the server can be deployed before or after the API.
|
|
15
|
+
*/
|
|
16
|
+
export class AgentChoice {
|
|
17
|
+
agentId;
|
|
18
|
+
fallbackId;
|
|
19
|
+
constructor(agentId, fallbackId) {
|
|
20
|
+
this.agentId = agentId;
|
|
21
|
+
this.fallbackId = fallbackId;
|
|
22
|
+
}
|
|
23
|
+
static of(catalog, requested) {
|
|
24
|
+
if (String(requested || "").trim()) {
|
|
25
|
+
return new AgentChoice(catalog.resolve(requested), null);
|
|
26
|
+
}
|
|
27
|
+
const fallback = catalog.defaultAgentId;
|
|
28
|
+
return new AgentChoice(CONNECTOR_AGENT_ID, fallback && fallback !== CONNECTOR_AGENT_ID ? fallback : null);
|
|
29
|
+
}
|
|
30
|
+
get isConnector() {
|
|
31
|
+
return this.agentId === CONNECTOR_AGENT_ID;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/** Whether an API error says the agent itself is unknown, not something in the request. */
|
|
35
|
+
export function isUnknownAgent(error) {
|
|
36
|
+
const status = error?.status;
|
|
37
|
+
const message = error instanceof Error ? error.message : String(error ?? "");
|
|
38
|
+
return (status === 404 &&
|
|
39
|
+
/model_not_found|agent_not_found|unknown (rag )?(agent|profile|model)|does not exist/i.test(message));
|
|
40
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import OpenAI from "openai";
|
|
3
3
|
import { AnswerDepth } from "./AnswerDepth.js";
|
|
4
|
+
import { AnswerDiagnostics } from "./AnswerDiagnostics.js";
|
|
4
5
|
import { AnswerSources } from "./AnswerSources.js";
|
|
5
6
|
import { requireApiKey } from "./CalypsoApiConfig.js";
|
|
6
7
|
/**
|
|
@@ -61,6 +62,13 @@ export class AgentResponses {
|
|
|
61
62
|
};
|
|
62
63
|
}
|
|
63
64
|
static metadataFor(question) {
|
|
65
|
+
const aicore = {
|
|
66
|
+
// Named files are retrieved from, not pasted into the prompt whole.
|
|
67
|
+
...(question.fileIds?.length
|
|
68
|
+
? { file_input_strategy: "rag_policy" }
|
|
69
|
+
: {}),
|
|
70
|
+
...(question.buckets?.length ? { buckets: [...question.buckets] } : {}),
|
|
71
|
+
};
|
|
64
72
|
return {
|
|
65
73
|
tool: "mcp",
|
|
66
74
|
agent: question.agentId,
|
|
@@ -68,10 +76,7 @@ export class AgentResponses {
|
|
|
68
76
|
...(question.depth
|
|
69
77
|
? { response_policy: question.depth.responsePolicy }
|
|
70
78
|
: {}),
|
|
71
|
-
|
|
72
|
-
...(question.fileIds?.length
|
|
73
|
-
? { _aicore: { file_input_strategy: "rag_policy" } }
|
|
74
|
-
: {}),
|
|
79
|
+
...(Object.keys(aicore).length ? { _aicore: aicore } : {}),
|
|
75
80
|
};
|
|
76
81
|
}
|
|
77
82
|
/** Folds the event stream into the answer text, its sources and the response id. */
|
|
@@ -80,6 +85,7 @@ export class AgentResponses {
|
|
|
80
85
|
let responseId = null;
|
|
81
86
|
let sources = AnswerSources.none();
|
|
82
87
|
let depth;
|
|
88
|
+
let diagnostics = AnswerDiagnostics.none();
|
|
83
89
|
for await (const event of stream) {
|
|
84
90
|
if (event.type === "response.output_text.delta" &&
|
|
85
91
|
typeof event.delta === "string") {
|
|
@@ -97,8 +103,9 @@ export class AgentResponses {
|
|
|
97
103
|
}
|
|
98
104
|
sources = AnswerSources.fromResponse(event.response);
|
|
99
105
|
depth = AnswerDepth.used(event.response);
|
|
106
|
+
diagnostics = AnswerDiagnostics.fromResponse(event.response);
|
|
100
107
|
}
|
|
101
108
|
}
|
|
102
|
-
return { text, responseId, sources, depth };
|
|
109
|
+
return { text, responseId, sources, depth, diagnostics };
|
|
103
110
|
}
|
|
104
111
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** Retrieval failures a caller can act on, in the words it should act on. */
|
|
2
|
+
const REASONS = {
|
|
3
|
+
attached_source_outside_scope: "A source in `fileIds` is in a bucket the agent named in `model` does not read. Ask again without `model` (Elephant then reads every bucket), or without `fileIds`.",
|
|
4
|
+
bucket_outside_agent_scope: "The agent named in `model` does not read one of the buckets in `buckets`. Ask again without `model` (Elephant then reads every bucket), or name only that agent's buckets.",
|
|
5
|
+
bucket_scope_unsupported: "The agent named in `model` does not read buckets, so it cannot be limited to some. Ask again without `buckets`, or without `model`.",
|
|
6
|
+
bucket_store_indexing_pending: "The buckets to answer from have nothing indexed yet. Files usually finish indexing within a minute; ask again shortly.",
|
|
7
|
+
attached_source_unavailable: "A source in `fileIds` is still being indexed. Ask again in a minute, or without `fileIds`.",
|
|
8
|
+
attached_source_lookup_failed: "Elephant could not check where a source in `fileIds` lives. Ask again.",
|
|
9
|
+
attached_sources_mixed_storage: "The sources in `fileIds` live in different places and could not be read together. Ask about them in separate questions.",
|
|
10
|
+
bucket_store_limit_exceeded: "The agent named in `model` reads more buckets than one question can. Ask again without `model`, or name up to five `buckets`.",
|
|
11
|
+
bucket_cover_unresolved: "Elephant could not work out which buckets hold the sources in `fileIds`. Ask again with fewer of them, or name the `buckets`.",
|
|
12
|
+
};
|
|
13
|
+
export class AnswerDiagnostics {
|
|
14
|
+
failureCode;
|
|
15
|
+
coverage;
|
|
16
|
+
constructor(failureCode, coverage) {
|
|
17
|
+
this.failureCode = failureCode;
|
|
18
|
+
this.coverage = coverage;
|
|
19
|
+
}
|
|
20
|
+
static none() {
|
|
21
|
+
return new AnswerDiagnostics(null, null);
|
|
22
|
+
}
|
|
23
|
+
static fromResponse(response) {
|
|
24
|
+
const aicore = record(record(record(response)?.metadata)?._aicore);
|
|
25
|
+
const code = typeof aicore?.answer_failure_code === "string"
|
|
26
|
+
? aicore.answer_failure_code.trim() || null
|
|
27
|
+
: null;
|
|
28
|
+
const raw = record(aicore?.bucket_coverage);
|
|
29
|
+
const unsearched = strings(raw?.unsearched);
|
|
30
|
+
const coverage = unsearched.length
|
|
31
|
+
? { searched: strings(raw?.searched), unsearched }
|
|
32
|
+
: null;
|
|
33
|
+
return new AnswerDiagnostics(code, coverage);
|
|
34
|
+
}
|
|
35
|
+
/** What to tell the caller instead of the answer text, when retrieval could not run. */
|
|
36
|
+
failureReason() {
|
|
37
|
+
return this.failureCode ? (REASONS[this.failureCode] ?? null) : null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function record(value) {
|
|
41
|
+
return value && typeof value === "object"
|
|
42
|
+
? value
|
|
43
|
+
: null;
|
|
44
|
+
}
|
|
45
|
+
function strings(value) {
|
|
46
|
+
return Array.isArray(value)
|
|
47
|
+
? value.filter((item) => typeof item === "string" && !!item)
|
|
48
|
+
: [];
|
|
49
|
+
}
|
|
@@ -28,7 +28,7 @@ export class CalypsoApiClient {
|
|
|
28
28
|
});
|
|
29
29
|
const body = await readResponseBody(response);
|
|
30
30
|
if (!response.ok) {
|
|
31
|
-
throw new
|
|
31
|
+
throw new CalypsoApiError(response.status, formatApiError(response.status, body));
|
|
32
32
|
}
|
|
33
33
|
return body;
|
|
34
34
|
}
|
|
@@ -42,3 +42,12 @@ export class CalypsoApiClient {
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
/** A non-2xx answer from the Calypso API, with its status kept for callers that branch on it. */
|
|
46
|
+
export class CalypsoApiError extends Error {
|
|
47
|
+
status;
|
|
48
|
+
constructor(status, message) {
|
|
49
|
+
super(message);
|
|
50
|
+
this.status = status;
|
|
51
|
+
this.name = "CalypsoApiError";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
* What it cannot do comes with the way to get it, because the model is the
|
|
8
8
|
* only one who can tell the user.
|
|
9
9
|
*/
|
|
10
|
+
/**
|
|
11
|
+
* Said to every caller, whatever they allowed. A model asked to delete tends
|
|
12
|
+
* to go looking for the thing first; looking is a tool call, and the honest
|
|
13
|
+
* answer needs none.
|
|
14
|
+
*/
|
|
15
|
+
export const NEVER_DELETES = "Elephant never deletes. When the user asks to delete, remove, erase or forget a source or a bucket, do not call any tool, not even to look for it: say that Elephant cannot delete and that sources and buckets are removed in the Elephant console at https://elephant.calypso.so.";
|
|
10
16
|
export const PresetInstructions = {
|
|
11
17
|
compose(about, groups, grant) {
|
|
12
18
|
const held = groups.filter((group) => grant.allows(group));
|
|
@@ -23,6 +29,7 @@ export const PresetInstructions = {
|
|
|
23
29
|
if (held.length === 1 && missing.length === 0) {
|
|
24
30
|
lines.push("It only reads: it cannot add, change or delete knowledge.");
|
|
25
31
|
}
|
|
32
|
+
lines.push(NEVER_DELETES);
|
|
26
33
|
return lines.join(" ");
|
|
27
34
|
},
|
|
28
35
|
};
|
package/dist/tools/AskTool.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { AgentChoice, isUnknownAgent } from "../calypso/AgentChoice.js";
|
|
3
|
+
import { AgentResponses, } from "../calypso/AgentResponses.js";
|
|
3
4
|
import { ANSWER_DEPTHS, AnswerDepth } from "../calypso/AnswerDepth.js";
|
|
4
5
|
import { compactStrings } from "../calypso/coerce.js";
|
|
5
6
|
import { emptyKnowledgeAnswer } from "../hatching/HatchingCopy.js";
|
|
@@ -17,7 +18,13 @@ const inputSchema = {
|
|
|
17
18
|
model: z
|
|
18
19
|
.string()
|
|
19
20
|
.optional()
|
|
20
|
-
.describe("Optional id of one of the team's Calypso agents. Omit to
|
|
21
|
+
.describe("Optional id of one of the team's Calypso agents, when the user names one. Omit it to answer from every bucket the user has, including ones created a moment ago."),
|
|
22
|
+
buckets: z
|
|
23
|
+
.array(z.string().min(1))
|
|
24
|
+
.min(1)
|
|
25
|
+
.max(5)
|
|
26
|
+
.optional()
|
|
27
|
+
.describe("Optional bucket ids or slugs (from elephant-list-buckets), up to 5, to answer only from those. Use it when the user names a folder or topic that matches a bucket; omit it otherwise and Elephant finds the right buckets itself."),
|
|
21
28
|
depth: z
|
|
22
29
|
.enum(ANSWER_DEPTHS)
|
|
23
30
|
.optional()
|
|
@@ -39,7 +46,8 @@ export class AskTool extends ElephantTool {
|
|
|
39
46
|
"Use it when the user asks about their own company, product, policies, documents or anything their team keeps in Calypso.",
|
|
40
47
|
"Always cite the sources the answer returns. If the answer says the knowledge does not cover the question, say so plainly instead of answering from general knowledge.",
|
|
41
48
|
"Each call stands alone: put everything needed to answer, including the subject of a follow-up, in the prompt.",
|
|
42
|
-
"Optional `model` picks one of the team's Calypso agents
|
|
49
|
+
"Without `model`, Elephant answers from every bucket the user has, including one created a moment ago. Optional `model` picks one of the team's Calypso agents instead, which reads only its own buckets. Optional `buckets` limits the answer to up to five named buckets.",
|
|
50
|
+
"When the user has more buckets than one answer reads, Elephant picks the ones with evidence and the reply names any it did not search; ask again with `buckets` to choose them.",
|
|
43
51
|
"Optional `depth` (`fast`, `balanced`, `deep`) sets how much work the answer gets. Choose it from the question, not from habit: `fast` for one stated fact, `balanced` for an explanation or summary, `deep` when several sources must be compared or the answer will be acted on. The reply ends by naming the depth it was answered at.",
|
|
44
52
|
"If an answer is thin, misses part of the question, or says the knowledge does not cover something the user expects to be there, ask once more one depth higher before telling the user it is not covered. Do not repeat a call at the same depth, and do not go above `deep`.",
|
|
45
53
|
"A team's plan may cap depth; when the reply says it was answered at a lower depth than asked, that is the most this team allows, so do not retry higher.",
|
|
@@ -63,27 +71,38 @@ export class AskTool extends ElephantTool {
|
|
|
63
71
|
});
|
|
64
72
|
return { text: emptyKnowledgeAnswer() };
|
|
65
73
|
}
|
|
66
|
-
const
|
|
74
|
+
const choice = AgentChoice.of(agents, args.model);
|
|
67
75
|
const asked = AnswerDepth.named(args.depth);
|
|
68
76
|
const fileIds = compactStrings(args.fileIds);
|
|
77
|
+
const buckets = compactStrings(args.buckets);
|
|
69
78
|
const conversationId = AgentResponses.newConversationId();
|
|
70
|
-
|
|
71
|
-
tool: this.name,
|
|
72
|
-
agent: agentId,
|
|
73
|
-
conversationId,
|
|
74
|
-
fileCount: fileIds?.length ?? 0,
|
|
75
|
-
});
|
|
76
|
-
const answer = await api.agent
|
|
77
|
-
.ask({
|
|
78
|
-
agentId,
|
|
79
|
+
const question = {
|
|
79
80
|
prompt: args.prompt.trim(),
|
|
80
81
|
fileIds,
|
|
81
82
|
conversationId,
|
|
82
83
|
depth: asked,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
buckets,
|
|
85
|
+
};
|
|
86
|
+
await log.event("info", "Asking a Calypso agent.", {
|
|
87
|
+
tool: this.name,
|
|
88
|
+
agent: choice.agentId,
|
|
89
|
+
conversationId,
|
|
90
|
+
fileCount: fileIds?.length ?? 0,
|
|
91
|
+
bucketCount: buckets?.length ?? 0,
|
|
86
92
|
});
|
|
93
|
+
const answer = await AskTool.askWithFallback(api, choice, question, log);
|
|
94
|
+
const agentId = answer.agentId;
|
|
95
|
+
// Retrieval could not run as asked: say why, in words the caller can
|
|
96
|
+
// act on, instead of relaying "not enough information".
|
|
97
|
+
const refusal = answer.diagnostics.failureReason();
|
|
98
|
+
if (refusal) {
|
|
99
|
+
await log.event("info", "Retrieval refused the request.", {
|
|
100
|
+
tool: this.name,
|
|
101
|
+
agent: agentId,
|
|
102
|
+
failureCode: answer.diagnostics.failureCode,
|
|
103
|
+
});
|
|
104
|
+
throw new Error(refusal);
|
|
105
|
+
}
|
|
87
106
|
await log.event("info", "Calypso agent answered.", {
|
|
88
107
|
tool: this.name,
|
|
89
108
|
agent: agentId,
|
|
@@ -101,10 +120,62 @@ export class AskTool extends ElephantTool {
|
|
|
101
120
|
const parts = [
|
|
102
121
|
answer.text,
|
|
103
122
|
sources,
|
|
123
|
+
await AskTool.coverageNote(api, answer),
|
|
104
124
|
AskTool.depthNote(asked, answer.depth),
|
|
105
125
|
];
|
|
106
126
|
return { text: parts.filter(Boolean).join("\n\n") };
|
|
107
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* The connector agent first; the catalog's default when this API does not
|
|
130
|
+
* know it yet. Only an "unknown agent" answer falls back: anything else is
|
|
131
|
+
* the real outcome of the question.
|
|
132
|
+
*/
|
|
133
|
+
static async askWithFallback(api, choice, question, log) {
|
|
134
|
+
try {
|
|
135
|
+
const answer = await api.agent.ask({
|
|
136
|
+
...question,
|
|
137
|
+
agentId: choice.agentId,
|
|
138
|
+
});
|
|
139
|
+
return { ...answer, agentId: choice.agentId };
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
if (!choice.fallbackId || !isUnknownAgent(error)) {
|
|
143
|
+
throw AskTool.readable(error, question.fileIds);
|
|
144
|
+
}
|
|
145
|
+
await log.event("warning", "Connector agent unknown; asked the default.", {
|
|
146
|
+
tool: "elephant-ask",
|
|
147
|
+
agent: choice.fallbackId,
|
|
148
|
+
});
|
|
149
|
+
const answer = await api.agent
|
|
150
|
+
.ask({ ...question, agentId: choice.fallbackId })
|
|
151
|
+
.catch((retryError) => {
|
|
152
|
+
throw AskTool.readable(retryError, question.fileIds);
|
|
153
|
+
});
|
|
154
|
+
return { ...answer, agentId: choice.fallbackId };
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* One line naming the buckets the answer did not read, when there were
|
|
159
|
+
* more than one answer reads. Names come from the bucket list; an id is
|
|
160
|
+
* shown when a name cannot be read.
|
|
161
|
+
*/
|
|
162
|
+
static async coverageNote(api, answer) {
|
|
163
|
+
const coverage = answer.diagnostics.coverage;
|
|
164
|
+
if (!coverage)
|
|
165
|
+
return "";
|
|
166
|
+
const names = new Map();
|
|
167
|
+
try {
|
|
168
|
+
for (const bucket of (await api.buckets.list()).buckets) {
|
|
169
|
+
names.set(bucket.id, bucket.name || bucket.slug || bucket.id);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
catch {
|
|
173
|
+
// Ids are still an honest answer.
|
|
174
|
+
}
|
|
175
|
+
const label = (id) => names.get(id) ?? id;
|
|
176
|
+
const total = coverage.searched.length + coverage.unsearched.length;
|
|
177
|
+
return `Searched ${coverage.searched.length} of ${total} buckets, the ones with the strongest match. Not searched: ${coverage.unsearched.map(label).join(", ")}. Ask again with \`buckets\` to choose.`;
|
|
178
|
+
}
|
|
108
179
|
/**
|
|
109
180
|
* One closing line saying the depth the answer got, so the caller knows
|
|
110
181
|
* what a retry one step higher would buy, and when a plan capped the ask.
|
|
@@ -28,6 +28,7 @@ export class CreateBucketTool extends ElephantTool {
|
|
|
28
28
|
"Creates a new knowledge bucket (a folder of sources) for the team.",
|
|
29
29
|
"",
|
|
30
30
|
"Use it when the user wants to keep a new topic separate before adding files or websites.",
|
|
31
|
+
"A new bucket needs no other setup: elephant-ask and elephant-search answer from it as soon as its files finish indexing.",
|
|
31
32
|
].join("\n");
|
|
32
33
|
inputSchema = inputSchema;
|
|
33
34
|
group = ToolGroup.add;
|
|
@@ -33,7 +33,8 @@ export class RenameBucketTool extends ElephantTool {
|
|
|
33
33
|
group = ToolGroup.organise;
|
|
34
34
|
annotations = {
|
|
35
35
|
readOnlyHint: false,
|
|
36
|
-
|
|
36
|
+
// A rename overwrites the bucket's name and description.
|
|
37
|
+
destructiveHint: true,
|
|
37
38
|
idempotentHint: true,
|
|
38
39
|
openWorldHint: false,
|
|
39
40
|
};
|
package/dist/tools/SearchTool.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { CONNECTOR_AGENT_ID, isUnknownAgent } from "../calypso/AgentChoice.js";
|
|
2
3
|
import { SEARCH_DEPTHS } from "../calypso/AnswerDepth.js";
|
|
3
4
|
import { MAX_EXTRA_QUERIES } from "../calypso/KnowledgeSearch.js";
|
|
4
5
|
import { emptyKnowledgeAnswer } from "../hatching/HatchingCopy.js";
|
|
@@ -9,7 +10,7 @@ const inputSchema = {
|
|
|
9
10
|
agent: z
|
|
10
11
|
.string()
|
|
11
12
|
.optional()
|
|
12
|
-
.describe("Optional id of one of the team's Calypso agents, to search only what that agent can see. Not together with buckets."),
|
|
13
|
+
.describe("Optional id of one of the team's Calypso agents, to search only what that agent can see. Omit it (and `buckets`) to search every bucket the user has. Not together with buckets."),
|
|
13
14
|
buckets: z
|
|
14
15
|
.array(z.string())
|
|
15
16
|
.max(5)
|
|
@@ -65,7 +66,18 @@ export class SearchTool extends ElephantTool {
|
|
|
65
66
|
});
|
|
66
67
|
return { text: emptyKnowledgeAnswer() };
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
+
// Neither an agent nor buckets: every bucket the user has, through the
|
|
70
|
+
// connector agent. An API that does not know it yet searches the default.
|
|
71
|
+
const everywhere = !args.agent?.trim() && !args.buckets?.length;
|
|
72
|
+
const result = everywhere
|
|
73
|
+
? await api.search
|
|
74
|
+
.search({ ...args, agent: CONNECTOR_AGENT_ID })
|
|
75
|
+
.catch((error) => {
|
|
76
|
+
if (!isUnknownAgent(error))
|
|
77
|
+
throw error;
|
|
78
|
+
return api.search.search(args);
|
|
79
|
+
})
|
|
80
|
+
: await api.search.search(args);
|
|
69
81
|
await log.event("info", "Knowledge search completed.", {
|
|
70
82
|
tool: this.name,
|
|
71
83
|
strategy: result.strategy,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@calypsohq/elephant-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Elephant: PDF AI and docs Q&A as an MCP server. Chat with your PDFs, documents and web pages from Claude, ChatGPT and Cursor, with every answer cited.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|