@contextstream/mcp-server 0.4.73 → 0.4.74
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/index.js +117 -74
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16121,13 +16121,15 @@ var ContextStreamClient = class _ContextStreamClient {
|
|
|
16121
16121
|
for (const item of memory.items) {
|
|
16122
16122
|
const createdAt = item.created_at || "";
|
|
16123
16123
|
if (createdAt > params.since) {
|
|
16124
|
-
const
|
|
16124
|
+
const isDecision = isDecisionResult(item);
|
|
16125
|
+
const isLesson = isLessonResult(item);
|
|
16126
|
+
const type = isDecision ? "decision" : isLesson ? "lesson" : extractEffectiveEventType(item);
|
|
16125
16127
|
items.push({
|
|
16126
16128
|
type,
|
|
16127
16129
|
title: item.title || "Untitled",
|
|
16128
16130
|
created_at: createdAt
|
|
16129
16131
|
});
|
|
16130
|
-
if (
|
|
16132
|
+
if (isDecision) newDecisions++;
|
|
16131
16133
|
else newMemory++;
|
|
16132
16134
|
}
|
|
16133
16135
|
}
|
|
@@ -16573,10 +16575,33 @@ ${context}`;
|
|
|
16573
16575
|
}
|
|
16574
16576
|
/**
|
|
16575
16577
|
* Get high-priority lessons that should be surfaced proactively.
|
|
16576
|
-
* Returns
|
|
16578
|
+
* Returns lessons found via semantic search, with event listing fallback.
|
|
16577
16579
|
*/
|
|
16578
16580
|
async getHighPriorityLessons(params) {
|
|
16579
16581
|
const limit = params.limit || 5;
|
|
16582
|
+
const mapLesson = (item) => {
|
|
16583
|
+
const tags = extractEventTags(item);
|
|
16584
|
+
const severityTag = tags.find((t) => t.startsWith("severity:"));
|
|
16585
|
+
const severity = severityTag?.split(":")[1] || item.metadata?.importance || "medium";
|
|
16586
|
+
const category = tags.find(
|
|
16587
|
+
(t) => [
|
|
16588
|
+
"workflow",
|
|
16589
|
+
"code_quality",
|
|
16590
|
+
"verification",
|
|
16591
|
+
"communication",
|
|
16592
|
+
"project_specific"
|
|
16593
|
+
].includes(t)
|
|
16594
|
+
) || "unknown";
|
|
16595
|
+
const content = item.content || "";
|
|
16596
|
+
const preventionMatch = content.match(/### Prevention\n([\s\S]*?)(?:\n\n|\n\*\*|$)/);
|
|
16597
|
+
const prevention = preventionMatch?.[1]?.trim() || content.slice(0, 1e3);
|
|
16598
|
+
return {
|
|
16599
|
+
title: item.title || "Lesson",
|
|
16600
|
+
severity,
|
|
16601
|
+
category,
|
|
16602
|
+
prevention
|
|
16603
|
+
};
|
|
16604
|
+
};
|
|
16580
16605
|
try {
|
|
16581
16606
|
const searchQuery = params.context_hint ? `${params.context_hint} lesson warning prevention mistake` : "lesson warning prevention mistake critical high";
|
|
16582
16607
|
const searchResult = await this.memorySearch({
|
|
@@ -16584,39 +16609,20 @@ ${context}`;
|
|
|
16584
16609
|
workspace_id: params.workspace_id,
|
|
16585
16610
|
project_id: params.project_id,
|
|
16586
16611
|
limit: limit * 2
|
|
16587
|
-
// Fetch more to filter
|
|
16588
16612
|
});
|
|
16589
|
-
if (
|
|
16590
|
-
|
|
16591
|
-
if (
|
|
16592
|
-
|
|
16593
|
-
|
|
16594
|
-
|
|
16595
|
-
|
|
16596
|
-
|
|
16597
|
-
const tags = extractEventTags(item);
|
|
16598
|
-
const severityTag = tags.find((t) => t.startsWith("severity:"));
|
|
16599
|
-
const severity = severityTag?.split(":")[1] || item.metadata?.importance || "medium";
|
|
16600
|
-
const category = tags.find(
|
|
16601
|
-
(t) => [
|
|
16602
|
-
"workflow",
|
|
16603
|
-
"code_quality",
|
|
16604
|
-
"verification",
|
|
16605
|
-
"communication",
|
|
16606
|
-
"project_specific"
|
|
16607
|
-
].includes(t)
|
|
16608
|
-
) || "unknown";
|
|
16609
|
-
const content = item.content || "";
|
|
16610
|
-
const preventionMatch = content.match(/### Prevention\n([\s\S]*?)(?:\n\n|\n\*\*|$)/);
|
|
16611
|
-
const prevention = preventionMatch?.[1]?.trim() || content.slice(0, 1e3);
|
|
16612
|
-
return {
|
|
16613
|
-
title: item.title || "Lesson",
|
|
16614
|
-
severity,
|
|
16615
|
-
category,
|
|
16616
|
-
prevention
|
|
16617
|
-
};
|
|
16613
|
+
if (searchResult?.results) {
|
|
16614
|
+
const lessons = searchResult.results.filter((item) => isLessonResult(item)).slice(0, limit).map(mapLesson);
|
|
16615
|
+
if (lessons.length > 0) return lessons;
|
|
16616
|
+
}
|
|
16617
|
+
const eventResult = await this.listMemoryEvents({
|
|
16618
|
+
workspace_id: params.workspace_id,
|
|
16619
|
+
event_type: "lesson",
|
|
16620
|
+
limit: limit * 2
|
|
16618
16621
|
});
|
|
16619
|
-
|
|
16622
|
+
if (eventResult?.items) {
|
|
16623
|
+
return eventResult.items.filter((item) => isLessonResult(item)).slice(0, limit).map(mapLesson);
|
|
16624
|
+
}
|
|
16625
|
+
return [];
|
|
16620
16626
|
} catch {
|
|
16621
16627
|
return [];
|
|
16622
16628
|
}
|
|
@@ -18731,6 +18737,24 @@ var HotPathStore = class {
|
|
|
18731
18737
|
var globalHotPathStore = new HotPathStore();
|
|
18732
18738
|
|
|
18733
18739
|
// src/tools.ts
|
|
18740
|
+
function stringOrArray(itemSchema) {
|
|
18741
|
+
return external_exports.union([
|
|
18742
|
+
external_exports.array(itemSchema),
|
|
18743
|
+
external_exports.string().transform((val, ctx) => {
|
|
18744
|
+
try {
|
|
18745
|
+
const parsed = JSON.parse(val);
|
|
18746
|
+
if (!Array.isArray(parsed)) {
|
|
18747
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Expected array or JSON string of array" });
|
|
18748
|
+
return external_exports.NEVER;
|
|
18749
|
+
}
|
|
18750
|
+
return parsed;
|
|
18751
|
+
} catch {
|
|
18752
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Invalid JSON string for array parameter" });
|
|
18753
|
+
return external_exports.NEVER;
|
|
18754
|
+
}
|
|
18755
|
+
})
|
|
18756
|
+
]);
|
|
18757
|
+
}
|
|
18734
18758
|
var execFileAsync = promisify2(execFile);
|
|
18735
18759
|
function parseBoolEnvDefault(raw, fallback) {
|
|
18736
18760
|
if (raw === void 0) return fallback;
|
|
@@ -22100,7 +22124,7 @@ ${formatContent(result)}`
|
|
|
22100
22124
|
).optional().describe("Entries to push (for push)"),
|
|
22101
22125
|
increment_turn: external_exports.boolean().optional().describe("Increment turn counter (for push)"),
|
|
22102
22126
|
force_version_bump: external_exports.boolean().optional().describe("Force version bump even with no new entries (for push)"),
|
|
22103
|
-
ids:
|
|
22127
|
+
ids: stringOrArray(external_exports.string()).optional().describe("Entry IDs to acknowledge (for ack)"),
|
|
22104
22128
|
expected_version: external_exports.number().optional().describe("Expected version for checkpoint verify")
|
|
22105
22129
|
});
|
|
22106
22130
|
const instructionToolDescription = "Session-scoped instruction cache operations. Actions: bootstrap, get, push, ack, clear, stats, checkpoint, verify.";
|
|
@@ -23074,9 +23098,9 @@ Actions:
|
|
|
23074
23098
|
title: external_exports.string().optional().describe("Skill display title"),
|
|
23075
23099
|
description: external_exports.string().optional().describe("Skill description"),
|
|
23076
23100
|
instruction_body: external_exports.string().optional().describe("Markdown instruction text (the prompt)"),
|
|
23077
|
-
trigger_patterns:
|
|
23101
|
+
trigger_patterns: stringOrArray(external_exports.string()).optional().describe("Keywords/phrases for auto-activation"),
|
|
23078
23102
|
trigger_regex: external_exports.string().optional().describe("Optional regex for advanced trigger matching"),
|
|
23079
|
-
categories:
|
|
23103
|
+
categories: stringOrArray(external_exports.string()).optional().describe("Tags for discovery/filtering"),
|
|
23080
23104
|
actions: external_exports.any().optional().describe("Action steps array [{type, tool, params, ...}]"),
|
|
23081
23105
|
params: external_exports.any().optional().describe("Parameters passed to skill execution"),
|
|
23082
23106
|
dry_run: external_exports.boolean().optional().describe("Preview execution without running"),
|
|
@@ -23089,7 +23113,7 @@ Actions:
|
|
|
23089
23113
|
format: external_exports.enum(["auto", "json", "markdown", "skills_md", "cursorrules", "claude_md", "aider", "zip"]).optional().describe("Import/export format"),
|
|
23090
23114
|
source_tool: external_exports.string().optional().describe("Source tool name (for import provenance)"),
|
|
23091
23115
|
source_file: external_exports.string().optional().describe("Source filename (for import provenance)"),
|
|
23092
|
-
skill_ids:
|
|
23116
|
+
skill_ids: stringOrArray(external_exports.string()).optional().describe("Skill IDs for export"),
|
|
23093
23117
|
change_summary: external_exports.string().optional().describe("Summary of changes (for version history)"),
|
|
23094
23118
|
workspace_id: external_exports.string().optional().describe("Workspace ID (UUID)"),
|
|
23095
23119
|
project_id: external_exports.string().optional().describe("Project ID (UUID)"),
|
|
@@ -23250,7 +23274,7 @@ Actions:
|
|
|
23250
23274
|
workspace_id: external_exports.string().uuid().optional(),
|
|
23251
23275
|
project_id: external_exports.string().uuid().optional(),
|
|
23252
23276
|
limit: external_exports.number().optional(),
|
|
23253
|
-
tags:
|
|
23277
|
+
tags: stringOrArray(external_exports.string()).optional().describe("Filter events that contain ALL of these tags"),
|
|
23254
23278
|
event_type: external_exports.string().optional().describe("Filter by event type (e.g. decision, lesson, manual_note)")
|
|
23255
23279
|
})
|
|
23256
23280
|
},
|
|
@@ -23322,7 +23346,7 @@ Actions:
|
|
|
23322
23346
|
workspace_id: external_exports.string().uuid().optional(),
|
|
23323
23347
|
project_id: external_exports.string().uuid().optional(),
|
|
23324
23348
|
limit: external_exports.number().optional(),
|
|
23325
|
-
tags:
|
|
23349
|
+
tags: stringOrArray(external_exports.string()).optional().describe("Filter results that contain ALL of these tags")
|
|
23326
23350
|
})
|
|
23327
23351
|
},
|
|
23328
23352
|
async (input) => {
|
|
@@ -24708,7 +24732,7 @@ Use this to persist decisions, insights, preferences, or important information.`
|
|
|
24708
24732
|
]).describe("Type of context being captured"),
|
|
24709
24733
|
title: external_exports.string().describe("Brief title for the captured context"),
|
|
24710
24734
|
content: external_exports.string().describe("Full content/details to capture"),
|
|
24711
|
-
tags:
|
|
24735
|
+
tags: stringOrArray(external_exports.string()).optional().describe("Tags for categorization"),
|
|
24712
24736
|
importance: external_exports.enum(["low", "medium", "high", "critical"]).optional().describe("Importance level"),
|
|
24713
24737
|
provenance: external_exports.object({
|
|
24714
24738
|
repo: external_exports.string().optional(),
|
|
@@ -25686,7 +25710,7 @@ After compression, the AI can use session_recall to retrieve this context in fut
|
|
|
25686
25710
|
project_id: external_exports.string().uuid().optional(),
|
|
25687
25711
|
title: external_exports.string(),
|
|
25688
25712
|
description: external_exports.string().optional(),
|
|
25689
|
-
goals:
|
|
25713
|
+
goals: stringOrArray(external_exports.string()).optional(),
|
|
25690
25714
|
steps: external_exports.array(
|
|
25691
25715
|
external_exports.object({
|
|
25692
25716
|
id: external_exports.string(),
|
|
@@ -25697,7 +25721,7 @@ After compression, the AI can use session_recall to retrieve this context in fut
|
|
|
25697
25721
|
})
|
|
25698
25722
|
).optional(),
|
|
25699
25723
|
status: external_exports.enum(["draft", "active", "completed", "archived", "abandoned"]).optional(),
|
|
25700
|
-
tags:
|
|
25724
|
+
tags: stringOrArray(external_exports.string()).optional(),
|
|
25701
25725
|
due_at: external_exports.string().optional(),
|
|
25702
25726
|
is_personal: external_exports.boolean().optional()
|
|
25703
25727
|
})
|
|
@@ -25735,7 +25759,7 @@ After compression, the AI can use session_recall to retrieve this context in fut
|
|
|
25735
25759
|
plan_id: external_exports.string().uuid(),
|
|
25736
25760
|
title: external_exports.string().optional(),
|
|
25737
25761
|
description: external_exports.string().optional(),
|
|
25738
|
-
goals:
|
|
25762
|
+
goals: stringOrArray(external_exports.string()).optional(),
|
|
25739
25763
|
status: external_exports.enum(["draft", "active", "completed", "archived", "abandoned"]).optional()
|
|
25740
25764
|
})
|
|
25741
25765
|
},
|
|
@@ -26975,7 +26999,7 @@ Example prompts:
|
|
|
26975
26999
|
workspace_id: external_exports.string().uuid().optional(),
|
|
26976
27000
|
query: external_exports.string().describe("Search query"),
|
|
26977
27001
|
limit: external_exports.number().optional().describe("Maximum results (default: 20)"),
|
|
26978
|
-
sources:
|
|
27002
|
+
sources: stringOrArray(external_exports.string()).optional().describe("Filter by source: github, slack"),
|
|
26979
27003
|
days: external_exports.number().optional().describe("Filter to results within N days"),
|
|
26980
27004
|
sort_by: external_exports.enum(["relevance", "recent", "engagement"]).optional().describe("Sort by: relevance, recent, or engagement")
|
|
26981
27005
|
})
|
|
@@ -27049,7 +27073,7 @@ Example prompts:
|
|
|
27049
27073
|
workspace_id: external_exports.string().uuid().optional(),
|
|
27050
27074
|
knowledge_type: external_exports.enum(["decision", "lesson", "fact", "insight"]).optional().describe("Filter by knowledge type"),
|
|
27051
27075
|
query: external_exports.string().optional().describe("Optional search query to filter knowledge"),
|
|
27052
|
-
sources:
|
|
27076
|
+
sources: stringOrArray(external_exports.string()).optional().describe("Filter by source: github, slack"),
|
|
27053
27077
|
limit: external_exports.number().optional().describe("Maximum items to return (default: 20)")
|
|
27054
27078
|
})
|
|
27055
27079
|
},
|
|
@@ -27214,7 +27238,7 @@ Example: Create a reminder to "Review PR #123" for tomorrow at 10am with high pr
|
|
|
27214
27238
|
content: external_exports.string().describe("Reminder details/description"),
|
|
27215
27239
|
remind_at: external_exports.string().describe('When to remind (ISO 8601 datetime, e.g., "2025-01-15T10:00:00Z")'),
|
|
27216
27240
|
priority: external_exports.enum(["low", "normal", "high", "urgent"]).optional().describe("Priority level (default: normal)"),
|
|
27217
|
-
keywords:
|
|
27241
|
+
keywords: stringOrArray(external_exports.string()).optional().describe("Keywords for contextual surfacing"),
|
|
27218
27242
|
recurrence: external_exports.enum(["daily", "weekly", "monthly"]).optional().describe("Recurrence pattern")
|
|
27219
27243
|
})
|
|
27220
27244
|
},
|
|
@@ -28045,14 +28069,14 @@ Output formats: full (default, includes content), paths (file paths only - 80% t
|
|
|
28045
28069
|
"session_snapshot"
|
|
28046
28070
|
]).optional().describe("Event type for capture"),
|
|
28047
28071
|
importance: external_exports.enum(["low", "medium", "high", "critical"]).optional(),
|
|
28048
|
-
tags:
|
|
28072
|
+
tags: stringOrArray(external_exports.string()).optional(),
|
|
28049
28073
|
// Lesson-specific
|
|
28050
28074
|
category: external_exports.enum(["workflow", "code_quality", "verification", "communication", "project_specific"]).optional(),
|
|
28051
28075
|
trigger: external_exports.string().optional().describe("What caused the problem"),
|
|
28052
28076
|
impact: external_exports.string().optional().describe("What went wrong"),
|
|
28053
28077
|
prevention: external_exports.string().optional().describe("How to prevent in future"),
|
|
28054
28078
|
severity: external_exports.enum(["low", "medium", "high", "critical"]).optional(),
|
|
28055
|
-
keywords:
|
|
28079
|
+
keywords: stringOrArray(external_exports.string()).optional(),
|
|
28056
28080
|
// Other params
|
|
28057
28081
|
since: external_exports.string().optional().describe("ISO timestamp for delta"),
|
|
28058
28082
|
limit: external_exports.number().optional(),
|
|
@@ -28079,7 +28103,7 @@ Output formats: full (default, includes content), paths (file paths only - 80% t
|
|
|
28079
28103
|
// Plan-specific params
|
|
28080
28104
|
plan_id: external_exports.string().uuid().optional().describe("Plan ID for get_plan/update_plan"),
|
|
28081
28105
|
description: external_exports.string().optional().describe("Description for capture_plan"),
|
|
28082
|
-
goals:
|
|
28106
|
+
goals: stringOrArray(external_exports.string()).optional().describe("Goals for capture_plan"),
|
|
28083
28107
|
steps: external_exports.array(
|
|
28084
28108
|
external_exports.object({
|
|
28085
28109
|
id: external_exports.string(),
|
|
@@ -28100,7 +28124,7 @@ Output formats: full (default, includes content), paths (file paths only - 80% t
|
|
|
28100
28124
|
// Suggested rules params
|
|
28101
28125
|
rule_id: external_exports.string().uuid().optional().describe("Suggested rule ID for actions"),
|
|
28102
28126
|
rule_action: external_exports.enum(["accept", "reject", "modify"]).optional().describe("Action to perform on suggested rule"),
|
|
28103
|
-
modified_keywords:
|
|
28127
|
+
modified_keywords: stringOrArray(external_exports.string()).optional().describe("Modified keywords when action is modify"),
|
|
28104
28128
|
modified_instruction: external_exports.string().optional().describe("Modified instruction when action is modify"),
|
|
28105
28129
|
min_confidence: external_exports.number().optional().describe("Minimum confidence threshold for listing rules")
|
|
28106
28130
|
})
|
|
@@ -28201,7 +28225,7 @@ Output formats: full (default, includes content), paths (file paths only - 80% t
|
|
|
28201
28225
|
context_hint: input.query,
|
|
28202
28226
|
limit: input.limit
|
|
28203
28227
|
});
|
|
28204
|
-
let lessons = result?.data?.lessons || result?.lessons || [];
|
|
28228
|
+
let lessons = Array.isArray(result) ? result : result?.data?.lessons || result?.lessons || [];
|
|
28205
28229
|
if (Array.isArray(lessons) && lessons.length > 1) {
|
|
28206
28230
|
const seen = /* @__PURE__ */ new Set();
|
|
28207
28231
|
lessons = lessons.filter((lesson) => {
|
|
@@ -28210,10 +28234,8 @@ Output formats: full (default, includes content), paths (file paths only - 80% t
|
|
|
28210
28234
|
seen.add(key);
|
|
28211
28235
|
return true;
|
|
28212
28236
|
});
|
|
28213
|
-
if (result?.data?.lessons) result.data.lessons = lessons;
|
|
28214
|
-
else if (result?.lessons) result.lessons = lessons;
|
|
28215
28237
|
}
|
|
28216
|
-
const resultWithHint = Array.isArray(lessons) && lessons.length === 0 ? {
|
|
28238
|
+
const resultWithHint = Array.isArray(lessons) && lessons.length === 0 ? { lessons: [], hint: getEmptyStateHint("get_lessons") } : { lessons };
|
|
28217
28239
|
return {
|
|
28218
28240
|
content: [{ type: "text", text: formatContent(resultWithHint) }]
|
|
28219
28241
|
};
|
|
@@ -28364,6 +28386,20 @@ Output formats: full (default, includes content), paths (file paths only - 80% t
|
|
|
28364
28386
|
if (!input.query) {
|
|
28365
28387
|
return errorResult("decision_trace requires: query");
|
|
28366
28388
|
}
|
|
28389
|
+
const doFallback = async () => {
|
|
28390
|
+
const events = await client.listMemoryEvents({
|
|
28391
|
+
workspace_id: workspaceId,
|
|
28392
|
+
project_id: projectId,
|
|
28393
|
+
limit: 50
|
|
28394
|
+
}).catch(() => ({ items: [] }));
|
|
28395
|
+
const decisions = (events?.items || []).filter((item) => isDecisionResult(item));
|
|
28396
|
+
const queryLower = (input.query || "").toLowerCase();
|
|
28397
|
+
const matched = decisions.filter((d) => {
|
|
28398
|
+
const text = `${d.title || ""} ${d.content || ""}`.toLowerCase();
|
|
28399
|
+
return queryLower.split(/\s+/).some((w) => w.length > 2 && text.includes(w));
|
|
28400
|
+
}).slice(0, input.limit || 10);
|
|
28401
|
+
return matched;
|
|
28402
|
+
};
|
|
28367
28403
|
try {
|
|
28368
28404
|
const result = await client.decisionTrace({
|
|
28369
28405
|
workspace_id: workspaceId,
|
|
@@ -28372,23 +28408,30 @@ Output formats: full (default, includes content), paths (file paths only - 80% t
|
|
|
28372
28408
|
include_impact: input.include_impact,
|
|
28373
28409
|
limit: input.limit
|
|
28374
28410
|
});
|
|
28411
|
+
const resultDecisions = result?.decisions || result?.data?.decisions || [];
|
|
28412
|
+
if (Array.isArray(resultDecisions) && resultDecisions.length === 0) {
|
|
28413
|
+
const fallbackDecisions = await doFallback();
|
|
28414
|
+
if (fallbackDecisions.length > 0) {
|
|
28415
|
+
return {
|
|
28416
|
+
content: [{
|
|
28417
|
+
type: "text",
|
|
28418
|
+
text: formatContent({
|
|
28419
|
+
decisions: fallbackDecisions,
|
|
28420
|
+
total: fallbackDecisions.length,
|
|
28421
|
+
fallback_reason: "api_empty_result",
|
|
28422
|
+
hint: "Decision trace used event listing fallback because the API returned no results."
|
|
28423
|
+
})
|
|
28424
|
+
}]
|
|
28425
|
+
};
|
|
28426
|
+
}
|
|
28427
|
+
}
|
|
28375
28428
|
return {
|
|
28376
28429
|
content: [{ type: "text", text: formatContent(result) }]
|
|
28377
28430
|
};
|
|
28378
28431
|
} catch (err) {
|
|
28379
28432
|
const isTimeout = err?.message?.toLowerCase().includes("timeout") || err?.message?.toLowerCase().includes("embedding timed out");
|
|
28380
28433
|
if (!isTimeout) throw err;
|
|
28381
|
-
const
|
|
28382
|
-
workspace_id: workspaceId,
|
|
28383
|
-
project_id: projectId,
|
|
28384
|
-
limit: 50
|
|
28385
|
-
}).catch(() => ({ items: [] }));
|
|
28386
|
-
const decisions = (events?.items || []).filter((item) => isDecisionResult(item));
|
|
28387
|
-
const queryLower = input.query.toLowerCase();
|
|
28388
|
-
const matched = decisions.filter((d) => {
|
|
28389
|
-
const text = `${d.title || ""} ${d.content || ""}`.toLowerCase();
|
|
28390
|
-
return queryLower.split(/\s+/).some((w) => w.length > 2 && text.includes(w));
|
|
28391
|
-
}).slice(0, input.limit || 10);
|
|
28434
|
+
const matched = await doFallback();
|
|
28392
28435
|
return {
|
|
28393
28436
|
content: [{
|
|
28394
28437
|
type: "text",
|
|
@@ -28946,9 +28989,9 @@ Output formats: full (default, includes content), paths (file paths only - 80% t
|
|
|
28946
28989
|
status: external_exports.enum(["pending", "in_progress", "completed", "blocked", "cancelled"]).optional().describe("Backward-compatible alias for task_status in task actions"),
|
|
28947
28990
|
priority: external_exports.enum(["low", "medium", "high", "urgent"]).optional().describe("Task priority"),
|
|
28948
28991
|
order: external_exports.number().optional().describe("Task order within plan"),
|
|
28949
|
-
task_ids:
|
|
28992
|
+
task_ids: stringOrArray(external_exports.string().uuid()).optional().describe("Task IDs for reorder_tasks"),
|
|
28950
28993
|
blocked_reason: external_exports.string().optional().describe("Reason when task is blocked"),
|
|
28951
|
-
tags:
|
|
28994
|
+
tags: stringOrArray(external_exports.string()).optional().describe("Tags for event or task categorization"),
|
|
28952
28995
|
// Batch import params
|
|
28953
28996
|
events: external_exports.array(
|
|
28954
28997
|
external_exports.object({
|
|
@@ -28971,7 +29014,7 @@ Output formats: full (default, includes content), paths (file paths only - 80% t
|
|
|
28971
29014
|
symbol_name: external_exports.string().optional()
|
|
28972
29015
|
})
|
|
28973
29016
|
).optional(),
|
|
28974
|
-
tags:
|
|
29017
|
+
tags: stringOrArray(external_exports.string()).optional(),
|
|
28975
29018
|
occurred_at: external_exports.string().optional().describe("ISO timestamp for when the event occurred")
|
|
28976
29019
|
})
|
|
28977
29020
|
).optional().describe("Array of events for import_batch action"),
|
|
@@ -30685,7 +30728,7 @@ Uncommitted changes: ${changes.diff_stat.summary}
|
|
|
30685
30728
|
// Index settings params (for update)
|
|
30686
30729
|
branch_policy: external_exports.enum(["default_branch_wins", "newest_wins", "feature_branch_wins"]).optional().describe("Which branch takes priority: default_branch_wins (default), newest_wins, feature_branch_wins"),
|
|
30687
30730
|
conflict_resolution: external_exports.enum(["newest_timestamp", "default_branch", "manual"]).optional().describe("How to resolve conflicts: newest_timestamp (default), default_branch, manual"),
|
|
30688
|
-
allowed_machines:
|
|
30731
|
+
allowed_machines: stringOrArray(external_exports.string()).optional().describe("List of allowed machine IDs (empty = all allowed)"),
|
|
30689
30732
|
auto_sync_enabled: external_exports.boolean().optional().describe("Whether to auto-sync from all machines (default: true)"),
|
|
30690
30733
|
max_machines: external_exports.number().optional().describe("Maximum machines allowed to index (0 = unlimited)"),
|
|
30691
30734
|
// Pagination
|
|
@@ -30864,7 +30907,7 @@ Uncommitted changes: ${changes.diff_stat.summary}
|
|
|
30864
30907
|
remind_at: external_exports.string().optional().describe("ISO 8601 datetime"),
|
|
30865
30908
|
priority: external_exports.enum(["low", "normal", "high", "urgent"]).optional(),
|
|
30866
30909
|
recurrence: external_exports.enum(["daily", "weekly", "monthly"]).optional(),
|
|
30867
|
-
keywords:
|
|
30910
|
+
keywords: stringOrArray(external_exports.string()).optional(),
|
|
30868
30911
|
// Snooze params
|
|
30869
30912
|
until: external_exports.string().optional().describe("ISO 8601 datetime"),
|
|
30870
30913
|
// Filter params
|
|
@@ -31608,7 +31651,7 @@ Example workflow:
|
|
|
31608
31651
|
),
|
|
31609
31652
|
fps: external_exports.number().optional().describe("Frames per second for remotion format (default: 30)"),
|
|
31610
31653
|
// Common params
|
|
31611
|
-
tags:
|
|
31654
|
+
tags: stringOrArray(external_exports.string()).optional().describe("Tags to associate with media"),
|
|
31612
31655
|
limit: external_exports.number().optional().describe("Maximum results to return")
|
|
31613
31656
|
})
|
|
31614
31657
|
},
|
|
@@ -32007,7 +32050,7 @@ Content ID: ${input.content_id}`
|
|
|
32007
32050
|
category: external_exports.string().optional(),
|
|
32008
32051
|
// For editor_rules
|
|
32009
32052
|
folder_path: external_exports.string().optional(),
|
|
32010
|
-
editors:
|
|
32053
|
+
editors: stringOrArray(external_exports.string()).optional(),
|
|
32011
32054
|
mode: external_exports.enum(["minimal", "full", "bootstrap"]).optional(),
|
|
32012
32055
|
dry_run: external_exports.boolean().optional(),
|
|
32013
32056
|
workspace_id: external_exports.string().uuid().optional(),
|
|
@@ -32182,7 +32225,7 @@ Remote API actions: list_repos, get_repo, sync_repo, list_pulls, get_pull, get_p
|
|
|
32182
32225
|
title: external_exports.string().optional().describe("Title for create_issue"),
|
|
32183
32226
|
body: external_exports.string().optional().describe("Body content"),
|
|
32184
32227
|
state: external_exports.string().optional().describe("State filter (open/closed)"),
|
|
32185
|
-
labels:
|
|
32228
|
+
labels: stringOrArray(external_exports.string()).optional().describe("Labels for issues"),
|
|
32186
32229
|
per_page: external_exports.number().optional().describe("Results per page"),
|
|
32187
32230
|
page: external_exports.number().optional().describe("Page number"),
|
|
32188
32231
|
event: external_exports.string().optional().describe("Review event (APPROVE/REQUEST_CHANGES/COMMENT)"),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contextstream/mcp-server",
|
|
3
3
|
"mcpName": "io.github.contextstreamio/mcp-server",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.74",
|
|
5
5
|
"description": "ContextStream MCP server - v0.4.x with consolidated domain tools (~11 tools, ~75% token reduction). Code context, memory, search, and AI tools.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|