@cognistore/mcp-server 1.0.15 → 1.1.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.
Files changed (2) hide show
  1. package/dist/index.js +40 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1311,7 +1311,8 @@ var OllamaEmbeddingClient = class {
1311
1311
  async embed(text2) {
1312
1312
  const body = {
1313
1313
  model: this.model,
1314
- prompt: this.truncateText(text2, this.maxInputChars)
1314
+ prompt: this.truncateText(text2, this.maxInputChars),
1315
+ options: { num_ctx: 8192 }
1315
1316
  };
1316
1317
  const response = await this.fetchWithRetry(`${this.host}/api/embeddings`, {
1317
1318
  method: "POST",
@@ -2241,6 +2242,44 @@ function createServer(sdk) {
2241
2242
  return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }] };
2242
2243
  }
2243
2244
  );
2245
+ server.tool(
2246
+ "listPlans",
2247
+ "List plans with optional status/scope filters. Shows task progress per plan \u2014 use to find abandoned or in-progress plans.",
2248
+ {
2249
+ limit: z2.number().optional().describe("Max plans to return (default: 20)"),
2250
+ status: z2.enum(knowledgeStatusValues).optional().describe("Filter: draft, active, completed, archived"),
2251
+ scope: z2.string().optional().describe('Filter by scope (e.g. "workspace:my-project")')
2252
+ },
2253
+ READ_ONLY,
2254
+ async (params) => {
2255
+ const plans = sdk.listPlans(params.limit ?? 20, params.status, params.scope);
2256
+ const enriched = plans.map((plan) => {
2257
+ const tasks = sdk.listPlanTasks(plan.id);
2258
+ const completedTasks = tasks.filter((t) => t.status === "completed").length;
2259
+ return {
2260
+ id: plan.id,
2261
+ title: plan.title,
2262
+ status: plan.status,
2263
+ scope: plan.scope,
2264
+ taskCount: tasks.length,
2265
+ completedTasks,
2266
+ createdAt: plan.createdAt,
2267
+ updatedAt: plan.updatedAt
2268
+ };
2269
+ });
2270
+ const abandoned = enriched.filter(
2271
+ (p) => (p.status === "draft" || p.status === "active") && p.completedTasks < p.taskCount
2272
+ );
2273
+ const response = {
2274
+ plans: enriched,
2275
+ total: enriched.length
2276
+ };
2277
+ if (abandoned.length > 0) {
2278
+ response.hint = `${abandoned.length} plan(s) have incomplete tasks. Resume them with listPlanTasks(planId).`;
2279
+ }
2280
+ return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }] };
2281
+ }
2282
+ );
2244
2283
  server.resource(
2245
2284
  "knowledge-context",
2246
2285
  new ResourceTemplate("cognistore://context/{scope}", { list: void 0 }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognistore/mcp-server",
3
- "version": "1.0.15",
3
+ "version": "1.1.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "MCP server for CogniStore — integrates with Claude Code and GitHub Copilot",