@triedotdev/mcp 1.0.146 → 1.0.147

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.
@@ -6384,9 +6384,8 @@ var TrieCloudFixTool = class {
6384
6384
  if (!apiKey) return this.setupGuard();
6385
6385
  const config = await loadAutonomyConfig(workDir);
6386
6386
  const forceCloud = args?.forceCloud === true;
6387
- console.log("About to resolve issues...");
6388
- let allIssues = await this.resolveIssues(args?.issueIds);
6389
- if (allIssues.length === 0 && args?.file && args?.issue && args?.fix) {
6387
+ let allIssues = [];
6388
+ if (args?.file && args?.issue && args?.fix) {
6390
6389
  const adHocId = `ad-hoc-${Date.now()}`;
6391
6390
  allIssues = [{
6392
6391
  id: adHocId,
@@ -6401,15 +6400,29 @@ var TrieCloudFixTool = class {
6401
6400
  agent: "user",
6402
6401
  category: args.category
6403
6402
  }];
6404
- console.log(`Created ad-hoc issue ${adHocId} for cloud dispatch`);
6403
+ console.log(`Created ad-hoc issue ${adHocId} for cloud dispatch (single incident mode)`);
6404
+ } else {
6405
+ console.log("About to resolve issues from memory...");
6406
+ allIssues = await this.resolveIssues(args?.issueIds);
6405
6407
  }
6406
6408
  if (allIssues.length === 0) {
6407
6409
  return this.text("No issues to dispatch. Run trie_scan to detect new issues, or check memory with trie_memory action:recent. For ad-hoc fixes, pass file, issue, and fix.");
6408
6410
  }
6411
+ const isAdHocMode = args?.file && args?.issue && args?.fix;
6412
+ if (isAdHocMode) {
6413
+ console.log(`Ad-hoc mode: dispatching single issue (${allIssues[0].file})`);
6414
+ } else {
6415
+ console.log(`Memory mode: loaded ${allIssues.length} issue(s) from memory/scan`);
6416
+ }
6409
6417
  const { results, summary } = triageIssues(allIssues, void 0, void 0, config);
6410
6418
  const lines = [];
6411
6419
  const toDispatch = forceCloud ? allIssues : summary.cloudAgent;
6412
- if (forceCloud) {
6420
+ if (isAdHocMode) {
6421
+ lines.push("FIX ROUTING PLAN (ad-hoc single incident mode)");
6422
+ lines.push("\u2500".repeat(68));
6423
+ lines.push(` ${shortPath2(allIssues[0].file)}:${allIssues[0].line ?? "?"} \u2192 cloud-agent (single incident)`);
6424
+ lines.push("");
6425
+ } else if (forceCloud) {
6413
6426
  lines.push("FIX ROUTING PLAN (forceCloud: bypassing triage)");
6414
6427
  lines.push("\u2500".repeat(68));
6415
6428
  for (const issue of allIssues) {
@@ -6456,7 +6469,11 @@ var TrieCloudFixTool = class {
6456
6469
  }
6457
6470
  }
6458
6471
  await this.saveJobs(workDir, store);
6472
+ const dispatchedCount = toDispatch.length;
6473
+ const jobWord = dispatchedCount === 1 ? "job" : "jobs";
6474
+ const modeDesc = isAdHocMode ? "(single incident mode)" : forceCloud ? "(forceCloud mode)" : "(triaged)";
6459
6475
  lines.push("");
6476
+ lines.push(`\u2713 ${dispatchedCount} cloud agent ${jobWord} dispatched ${modeDesc}`);
6460
6477
  lines.push("Cloud agents are running in isolated VMs. Check back with:");
6461
6478
  lines.push("trie_cloud_fix action:status");
6462
6479
  return this.text(lines.join("\n"));
@@ -7909,7 +7926,7 @@ var CHAT_TOOLS = [
7909
7926
  },
7910
7927
  {
7911
7928
  name: "trie_cloud_fix",
7912
- description: 'Dispatch to Cursor Cloud agents. Default: triage routes issues. When user explicitly says they want cloud (e.g. "fix with cloud agent") \u2014 pass forceCloud:true to honor their choice, do not reject. For ad-hoc (no scan issues): pass file, issue, fix from prior trie_propose_fix. Actions: configure, dispatch, status, artifacts, cancel.',
7929
+ description: 'Dispatch to Cursor Cloud agents. CRITICAL: Ad-hoc mode (file+issue+fix) dispatches ONLY that single issue, ignoring all other issues. Default mode (issueIds) dispatches specified issues from scan results. When user explicitly says they want cloud (e.g. "fix with cloud agent") \u2014 pass forceCloud:true to honor their choice. Actions: configure, dispatch, status, artifacts, cancel.',
7913
7930
  input_schema: {
7914
7931
  type: "object",
7915
7932
  properties: {
@@ -7925,18 +7942,18 @@ var CHAT_TOOLS = [
7925
7942
  issueIds: {
7926
7943
  type: "array",
7927
7944
  items: { type: "string" },
7928
- description: "Issue IDs to dispatch (for action:dispatch). Omit to dispatch all cloud-eligible issues."
7945
+ description: "Issue IDs to dispatch (for action:dispatch). Omit to dispatch all cloud-eligible issues. IGNORED if file+issue+fix are provided (ad-hoc mode)."
7929
7946
  },
7930
7947
  forceCloud: {
7931
7948
  type: "boolean",
7932
- description: "When true, bypass triage and dispatch ALL issues to cloud. Use when user explicitly requests cloud fix."
7949
+ description: "When true, bypass triage and dispatch ALL issues to cloud. Use when user explicitly requests cloud fix. In ad-hoc mode, this is implied."
7933
7950
  },
7934
7951
  file: {
7935
7952
  type: "string",
7936
- description: "For ad-hoc dispatch: file path (use with issue and fix when no scan issues)"
7953
+ description: "For ad-hoc single-incident dispatch: file path. When provided with issue+fix, ONLY this single issue is dispatched (memory issues are ignored)."
7937
7954
  },
7938
- issue: { type: "string", description: "For ad-hoc dispatch: issue description" },
7939
- fix: { type: "string", description: "For ad-hoc dispatch: suggested fix" },
7955
+ issue: { type: "string", description: "For ad-hoc dispatch: issue description (use with file and fix)" },
7956
+ fix: { type: "string", description: "For ad-hoc dispatch: suggested fix (use with file and issue)" },
7940
7957
  line: { type: "number", description: "For ad-hoc dispatch: line number" },
7941
7958
  jobId: {
7942
7959
  type: "string",
@@ -8566,6 +8583,7 @@ var SYSTEM_PROMPT = `You are Trie, a code assistant embedded in a terminal TUI.
8566
8583
  **When user asks to dispatch or fix with Cursor Cloud agent:**
8567
8584
  - Default: Call trie_cloud_fix action:dispatch \u2014 triage runs and routes issues as usual.
8568
8585
  - If user EXPLICITLY says they want cloud (e.g. "fix it with cloud agent", "I want cloud", "use cursor cloud"): add forceCloud:true so triage does not override their choice. Do NOT suggest local fix instead \u2014 honor their request.
8586
+ - CRITICAL: For single incident fixes from trie_tell, use ad-hoc mode (file, issue, fix) to dispatch ONLY that incident. Ad-hoc mode bypasses memory and dispatches only the single specified issue.
8569
8587
  - If there are no scan issues but the conversation has a recent trie_propose_fix: use ad-hoc dispatch with file, issue, fix from that context.
8570
8588
  - If the tool returns "Cloud Agent dispatch requires a Cursor API key", tell the user to configure it.
8571
8589
  - For status: trie_cloud_fix action:status
@@ -8578,6 +8596,7 @@ Examples:
8578
8596
  - User: "search for TODO comments" \u2192 If there's a goal about TODOs, use trie_scan_for_goal_violations. Otherwise explain no such goal exists.
8579
8597
  - User: "fix it with cloud agent" (explicit) \u2192 Call trie_cloud_fix action:dispatch forceCloud:true \u2014 honor their choice, don't suggest local.
8580
8598
  - User: "dispatch to cloud" (generic) \u2192 Call trie_cloud_fix action:dispatch \u2014 triage as usual.
8599
+ - User: "fix this incident with cloud agent [specific incident]" \u2192 Use ad-hoc mode: trie_cloud_fix action:dispatch file:"path" issue:"description" fix:"fix" \u2014 dispatches ONLY that incident.
8581
8600
 
8582
8601
  Answer concisely. Reference specific files, decisions, and patterns when relevant.`;
8583
8602
  function ChatView() {
@@ -9660,4 +9679,4 @@ export {
9660
9679
  GitHubBranchesTool,
9661
9680
  InteractiveDashboard
9662
9681
  };
9663
- //# sourceMappingURL=chunk-US4P265N.js.map
9682
+ //# sourceMappingURL=chunk-2354SRJM.js.map