@contextstream/mcp-server 0.4.59 → 0.4.60

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 +15 -66
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16560,6 +16560,7 @@ var TASK_HINTS = {
16560
16560
  created: "Task created. Use update_task() to change status.",
16561
16561
  completed: "Task completed. Well done!",
16562
16562
  blocked: "Task blocked. Add blocked_reason for context.",
16563
+ cancelled: "Task cancelled.",
16563
16564
  linked_to_plan: "Task linked to plan. Progress will be tracked."
16564
16565
  };
16565
16566
 
@@ -20388,7 +20389,7 @@ This does semantic search on the first message. You only need context on subsequ
20388
20389
  );
20389
20390
  result.tools_hint = getCoreToolsHint();
20390
20391
  const sessionId = typeof result.session_id === "string" ? result.session_id : void 0;
20391
- result.educational_tip = getSessionInitTip(sessionId);
20392
+ result.educational_tip = getSessionInitTip(sessionId ?? "");
20392
20393
  const shouldRestoreContext = input.is_post_compact ?? RESTORE_CONTEXT_DEFAULT;
20393
20394
  if (shouldRestoreContext) {
20394
20395
  result.is_post_compact = true;
@@ -21101,7 +21102,7 @@ Use this in combination with session_init(is_post_compact=true) for seamless con
21101
21102
  }
21102
21103
  try {
21103
21104
  if (input.snapshot_id) {
21104
- const eventResult = await client.getEvent(input.snapshot_id);
21105
+ const eventResult = await client.getMemoryEvent(input.snapshot_id);
21105
21106
  const event = eventResult?.data || eventResult;
21106
21107
  if (!event || !event.content) {
21107
21108
  return errorResult(
@@ -22192,7 +22193,7 @@ Action: ${cp.suggested_action === "prepare_save" ? "Consider saving important de
22192
22193
  contextCallsSinceLastSave++;
22193
22194
  const now = Date.now();
22194
22195
  const timeSinceLastSave = now - lastAutoSaveTime;
22195
- const pressureLevelIncreased = lastAutoSavePressureLevel === "" && cp.level !== "low" || lastAutoSavePressureLevel === "medium" && (cp.level === "high" || cp.level === "critical") || lastAutoSavePressureLevel === "high" && cp.level === "critical";
22196
+ const pressureLevelIncreased = lastAutoSavePressureLevel === "" || lastAutoSavePressureLevel === "medium" && (cp.level === "high" || cp.level === "critical") || lastAutoSavePressureLevel === "high" && cp.level === "critical";
22196
22197
  const shouldSave = pressureLevelIncreased && timeSinceLastSave > AUTO_SAVE_MIN_INTERVAL_MS || contextCallsSinceLastSave >= AUTO_SAVE_CALL_INTERVAL || timeSinceLastSave > AUTO_SAVE_MIN_INTERVAL_MS * 2.5;
22197
22198
  if (shouldSave) {
22198
22199
  const trigger = pressureLevelIncreased ? "pressure_increase" : contextCallsSinceLastSave >= AUTO_SAVE_CALL_INTERVAL ? "call_count" : "time_interval";
@@ -23830,7 +23831,7 @@ Output formats: full (default, includes content), paths (file paths only - 80% t
23830
23831
  );
23831
23832
  }
23832
23833
  if (input.snapshot_id) {
23833
- const eventResult = await client.getEvent(input.snapshot_id);
23834
+ const eventResult = await client.getMemoryEvent(input.snapshot_id);
23834
23835
  const event = eventResult?.data || eventResult;
23835
23836
  if (!event || !event.content) {
23836
23837
  return errorResult(
@@ -24998,7 +24999,7 @@ ${formatContent(result)}`
24998
24999
  workspace_id: ws.id,
24999
25000
  status: input.todo_status,
25000
25001
  priority: input.todo_priority,
25001
- limit: input.limit ? Math.ceil(input.limit / workspacesForTodos.length) : 10
25002
+ per_page: input.limit ? Math.ceil(input.limit / workspacesForTodos.length) : 10
25002
25003
  });
25003
25004
  const items = todos?.data?.items || todos?.items || [];
25004
25005
  allTodos.push(...items.map((t) => ({ ...t, workspace_name: ws.name })));
@@ -25048,7 +25049,7 @@ ${formatContent(result)}`
25048
25049
  const diagrams = await client.diagramsList({
25049
25050
  workspace_id: ws.id,
25050
25051
  diagram_type: input.diagram_type,
25051
- limit: input.limit ? Math.ceil(input.limit / workspacesForDiagrams.length) : 10
25052
+ per_page: input.limit ? Math.ceil(input.limit / workspacesForDiagrams.length) : 10
25052
25053
  });
25053
25054
  const items = diagrams?.data?.items || diagrams?.items || [];
25054
25055
  allDiagrams.push(...items.map((d) => ({ ...d, workspace_name: ws.name })));
@@ -25090,7 +25091,7 @@ ${formatContent(result)}`
25090
25091
  const docs = await client.docsList({
25091
25092
  workspace_id: ws.id,
25092
25093
  doc_type: input.doc_type,
25093
- limit: input.limit ? Math.ceil(input.limit / workspacesForDocs.length) : 10
25094
+ per_page: input.limit ? Math.ceil(input.limit / workspacesForDocs.length) : 10
25094
25095
  });
25095
25096
  const items = docs?.data?.items || docs?.items || [];
25096
25097
  allDocs.push(...items.map((d) => ({ ...d, workspace_name: ws.name })));
@@ -26359,7 +26360,6 @@ Last edited: ${updatedPage.last_edited_time}`
26359
26360
  try {
26360
26361
  const notionActivity = await client.notionActivity({
26361
26362
  workspace_id: ws.id,
26362
- days,
26363
26363
  limit: perSourceLimit
26364
26364
  });
26365
26365
  const notionItems = notionActivity?.data || notionActivity || [];
@@ -26383,7 +26383,6 @@ Last edited: ${updatedPage.last_edited_time}`
26383
26383
  try {
26384
26384
  const slackActivity = await client.slackActivity({
26385
26385
  workspace_id: ws.id,
26386
- days,
26387
26386
  limit: perSourceLimit
26388
26387
  });
26389
26388
  const slackItems = slackActivity?.data || slackActivity || [];
@@ -26407,7 +26406,6 @@ Last edited: ${updatedPage.last_edited_time}`
26407
26406
  try {
26408
26407
  const githubActivity = await client.githubActivity({
26409
26408
  workspace_id: ws.id,
26410
- days,
26411
26409
  limit: perSourceLimit
26412
26410
  });
26413
26411
  const githubItems = githubActivity?.data || githubActivity || [];
@@ -29208,37 +29206,10 @@ function formatTomlEnvLines(env) {
29208
29206
  }
29209
29207
  function buildSetupEnv(params) {
29210
29208
  const contextPack = params.contextPackEnabled === false ? "false" : "true";
29211
- const progressive = params.toolset === "router" ? "true" : "false";
29212
- const restoreContext = params.restoreContextEnabled === false ? "false" : "true";
29213
- const showTiming = params.showTiming ? "true" : "false";
29214
29209
  return {
29215
29210
  CONTEXTSTREAM_API_URL: params.apiUrl,
29216
29211
  CONTEXTSTREAM_API_KEY: params.apiKey,
29217
- CONTEXTSTREAM_JWT: "",
29218
- CONTEXTSTREAM_ALLOW_HEADER_AUTH: "false",
29219
- CONTEXTSTREAM_WORKSPACE_ID: "",
29220
- CONTEXTSTREAM_PROJECT_ID: "",
29221
- CONTEXTSTREAM_USER_AGENT: `contextstream-mcp/${VERSION}`,
29222
- CONTEXTSTREAM_TOOLSET: "standard",
29223
- CONTEXTSTREAM_TOOL_ALLOWLIST: "",
29224
- CONTEXTSTREAM_AUTO_TOOLSET: "false",
29225
- CONTEXTSTREAM_AUTO_HIDE_INTEGRATIONS: "true",
29226
- CONTEXTSTREAM_SCHEMA_MODE: "full",
29227
- CONTEXTSTREAM_PROGRESSIVE_MODE: progressive,
29228
- CONTEXTSTREAM_ROUTER_MODE: "false",
29229
- CONTEXTSTREAM_OUTPUT_FORMAT: "compact",
29230
- CONTEXTSTREAM_INCLUDE_STRUCTURED_CONTENT: "true",
29231
- CONTEXTSTREAM_SEARCH_LIMIT: "3",
29232
- CONTEXTSTREAM_SEARCH_MAX_CHARS: "400",
29233
- CONTEXTSTREAM_CONSOLIDATED: "true",
29234
- CONTEXTSTREAM_CONTEXT_PACK: contextPack,
29235
- CONTEXTSTREAM_CONTEXT_PACK_ENABLED: contextPack,
29236
- CONTEXTSTREAM_RESTORE_CONTEXT: restoreContext,
29237
- CONTEXTSTREAM_SHOW_TIMING: showTiming,
29238
- CONTEXTSTREAM_PRO_TOOLS: "",
29239
- CONTEXTSTREAM_UPGRADE_URL: "https://contextstream.io/pricing",
29240
- CONTEXTSTREAM_ENABLE_PROMPTS: "true",
29241
- CONTEXTSTREAM_LOG_LEVEL: "normal"
29212
+ CONTEXTSTREAM_CONTEXT_PACK: contextPack
29242
29213
  };
29243
29214
  }
29244
29215
  function buildContextStreamMcpServer(params) {
@@ -29862,11 +29833,7 @@ Code: ${device.user_code}`);
29862
29833
  const planLabel = detectedPlanName ?? "unknown";
29863
29834
  console.log(`
29864
29835
  Detected plan: ${planLabel} (graph: ${graphTierLabel})`);
29865
- const toolset = "consolidated";
29866
- const isPro = detectedPlanName && ["pro", "team", "enterprise"].some((p) => detectedPlanName.toLowerCase().includes(p));
29867
- const contextPackEnabled = isPro;
29868
- const showTiming = false;
29869
- const restoreContextEnabled = true;
29836
+ const contextPackEnabled = !!detectedPlanName && ["pro", "team", "enterprise"].some((p) => detectedPlanName.toLowerCase().includes(p));
29870
29837
  console.log("\nAuto-Update:");
29871
29838
  console.log(" When enabled, ContextStream will automatically update to the latest version");
29872
29839
  console.log(" on new sessions (checks daily). You can disable this if you prefer manual updates.");
@@ -29954,23 +29921,9 @@ Detected plan: ${planLabel} (graph: ${graphTierLabel})`);
29954
29921
  )
29955
29922
  ) || mcpChoiceDefault;
29956
29923
  const mcpScope = mcpChoice === "2" && hasCodex && !hasProjectMcpEditors ? "skip" : mcpChoice === "4" ? "skip" : mcpChoice === "1" ? "global" : mcpChoice === "2" ? "project" : "both";
29957
- const mcpServer = buildContextStreamMcpServer({ apiUrl, apiKey, toolset, contextPackEnabled, showTiming, restoreContextEnabled });
29958
- const mcpServerClaude = buildContextStreamMcpServer({
29959
- apiUrl,
29960
- apiKey,
29961
- toolset,
29962
- contextPackEnabled,
29963
- showTiming,
29964
- restoreContextEnabled
29965
- });
29966
- const vsCodeServer = buildContextStreamVsCodeServer({
29967
- apiUrl,
29968
- apiKey,
29969
- toolset,
29970
- contextPackEnabled,
29971
- showTiming,
29972
- restoreContextEnabled
29973
- });
29924
+ const mcpServer = buildContextStreamMcpServer({ apiUrl, apiKey, contextPackEnabled });
29925
+ const mcpServerClaude = buildContextStreamMcpServer({ apiUrl, apiKey, contextPackEnabled });
29926
+ const vsCodeServer = buildContextStreamVsCodeServer({ apiUrl, apiKey, contextPackEnabled });
29974
29927
  const needsGlobalMcpConfig = mcpScope === "global" || mcpScope === "both" || mcpScope === "project" && hasCodex;
29975
29928
  if (needsGlobalMcpConfig) {
29976
29929
  console.log("\nInstalling global MCP config...");
@@ -29987,10 +29940,7 @@ Detected plan: ${planLabel} (graph: ${graphTierLabel})`);
29987
29940
  const status = await upsertCodexTomlConfig(filePath, {
29988
29941
  apiUrl,
29989
29942
  apiKey,
29990
- toolset,
29991
- contextPackEnabled,
29992
- showTiming,
29993
- restoreContextEnabled
29943
+ contextPackEnabled
29994
29944
  });
29995
29945
  writeActions.push({ kind: "mcp-config", target: filePath, status });
29996
29946
  console.log(`- ${EDITOR_LABELS[editor]}: ${status} ${filePath}`);
@@ -30016,10 +29966,9 @@ Detected plan: ${planLabel} (graph: ${graphTierLabel})`);
30016
29966
  console.log(
30017
29967
  "- Claude Code: global MCP config is best done via `claude mcp add --transport stdio ...` (see docs)."
30018
29968
  );
30019
- const envHint = toolset === "router" ? " --env CONTEXTSTREAM_PROGRESSIVE_MODE=true" : "";
30020
29969
  const packHint = contextPackEnabled === false ? " --env CONTEXTSTREAM_CONTEXT_PACK=false" : " --env CONTEXTSTREAM_CONTEXT_PACK=true";
30021
29970
  console.log(
30022
- ` macOS/Linux: claude mcp add --transport stdio contextstream --scope user --env CONTEXTSTREAM_API_URL=... --env CONTEXTSTREAM_API_KEY=...${envHint}${packHint} -- npx --prefer-online -y @contextstream/mcp-server@latest`
29971
+ ` macOS/Linux: claude mcp add --transport stdio contextstream --scope user --env CONTEXTSTREAM_API_URL=... --env CONTEXTSTREAM_API_KEY=...${packHint} -- npx --prefer-online -y @contextstream/mcp-server@latest`
30023
29972
  );
30024
29973
  console.log(
30025
29974
  " Windows (native): use `cmd /c npx --prefer-online -y @contextstream/mcp-server@latest` after `--` if `npx` is not found."
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.59",
4
+ "version": "0.4.60",
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",