@triedotdev/mcp 1.0.145 → 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.
|
@@ -5537,13 +5537,6 @@ var CursorCloudAgentClient = class {
|
|
|
5537
5537
|
source: {
|
|
5538
5538
|
repository: repoUrl,
|
|
5539
5539
|
ref: branch
|
|
5540
|
-
},
|
|
5541
|
-
metadata: {
|
|
5542
|
-
issueId: issue.id,
|
|
5543
|
-
file: issue.file,
|
|
5544
|
-
line: issue.line,
|
|
5545
|
-
severity: issue.severity,
|
|
5546
|
-
agent: issue.agent
|
|
5547
5540
|
}
|
|
5548
5541
|
};
|
|
5549
5542
|
const res = await this.request("POST", "/agents", body);
|
|
@@ -5656,16 +5649,17 @@ var CursorCloudAgentClient = class {
|
|
|
5656
5649
|
}
|
|
5657
5650
|
};
|
|
5658
5651
|
function mapStatus(raw) {
|
|
5659
|
-
switch (raw) {
|
|
5660
|
-
case "
|
|
5661
|
-
case "
|
|
5652
|
+
switch (raw?.toUpperCase()) {
|
|
5653
|
+
case "PENDING":
|
|
5654
|
+
case "QUEUED":
|
|
5655
|
+
case "CREATING":
|
|
5662
5656
|
return "pending";
|
|
5663
|
-
case "
|
|
5664
|
-
case "
|
|
5657
|
+
case "RUNNING":
|
|
5658
|
+
case "IN_PROGRESS":
|
|
5665
5659
|
return "running";
|
|
5666
|
-
case "
|
|
5667
|
-
case "
|
|
5668
|
-
case "
|
|
5660
|
+
case "COMPLETED":
|
|
5661
|
+
case "SUCCEEDED":
|
|
5662
|
+
case "VERIFIED":
|
|
5669
5663
|
return "completed";
|
|
5670
5664
|
default:
|
|
5671
5665
|
return "failed";
|
|
@@ -6390,9 +6384,8 @@ var TrieCloudFixTool = class {
|
|
|
6390
6384
|
if (!apiKey) return this.setupGuard();
|
|
6391
6385
|
const config = await loadAutonomyConfig(workDir);
|
|
6392
6386
|
const forceCloud = args?.forceCloud === true;
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
if (allIssues.length === 0 && args?.file && args?.issue && args?.fix) {
|
|
6387
|
+
let allIssues = [];
|
|
6388
|
+
if (args?.file && args?.issue && args?.fix) {
|
|
6396
6389
|
const adHocId = `ad-hoc-${Date.now()}`;
|
|
6397
6390
|
allIssues = [{
|
|
6398
6391
|
id: adHocId,
|
|
@@ -6407,15 +6400,29 @@ var TrieCloudFixTool = class {
|
|
|
6407
6400
|
agent: "user",
|
|
6408
6401
|
category: args.category
|
|
6409
6402
|
}];
|
|
6410
|
-
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);
|
|
6411
6407
|
}
|
|
6412
6408
|
if (allIssues.length === 0) {
|
|
6413
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.");
|
|
6414
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
|
+
}
|
|
6415
6417
|
const { results, summary } = triageIssues(allIssues, void 0, void 0, config);
|
|
6416
6418
|
const lines = [];
|
|
6417
6419
|
const toDispatch = forceCloud ? allIssues : summary.cloudAgent;
|
|
6418
|
-
if (
|
|
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) {
|
|
6419
6426
|
lines.push("FIX ROUTING PLAN (forceCloud: bypassing triage)");
|
|
6420
6427
|
lines.push("\u2500".repeat(68));
|
|
6421
6428
|
for (const issue of allIssues) {
|
|
@@ -6462,7 +6469,11 @@ var TrieCloudFixTool = class {
|
|
|
6462
6469
|
}
|
|
6463
6470
|
}
|
|
6464
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)";
|
|
6465
6475
|
lines.push("");
|
|
6476
|
+
lines.push(`\u2713 ${dispatchedCount} cloud agent ${jobWord} dispatched ${modeDesc}`);
|
|
6466
6477
|
lines.push("Cloud agents are running in isolated VMs. Check back with:");
|
|
6467
6478
|
lines.push("trie_cloud_fix action:status");
|
|
6468
6479
|
return this.text(lines.join("\n"));
|
|
@@ -7915,7 +7926,7 @@ var CHAT_TOOLS = [
|
|
|
7915
7926
|
},
|
|
7916
7927
|
{
|
|
7917
7928
|
name: "trie_cloud_fix",
|
|
7918
|
-
description: 'Dispatch to Cursor Cloud agents.
|
|
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.',
|
|
7919
7930
|
input_schema: {
|
|
7920
7931
|
type: "object",
|
|
7921
7932
|
properties: {
|
|
@@ -7931,18 +7942,18 @@ var CHAT_TOOLS = [
|
|
|
7931
7942
|
issueIds: {
|
|
7932
7943
|
type: "array",
|
|
7933
7944
|
items: { type: "string" },
|
|
7934
|
-
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)."
|
|
7935
7946
|
},
|
|
7936
7947
|
forceCloud: {
|
|
7937
7948
|
type: "boolean",
|
|
7938
|
-
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."
|
|
7939
7950
|
},
|
|
7940
7951
|
file: {
|
|
7941
7952
|
type: "string",
|
|
7942
|
-
description: "For ad-hoc dispatch: file path
|
|
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)."
|
|
7943
7954
|
},
|
|
7944
|
-
issue: { type: "string", description: "For ad-hoc dispatch: issue description" },
|
|
7945
|
-
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)" },
|
|
7946
7957
|
line: { type: "number", description: "For ad-hoc dispatch: line number" },
|
|
7947
7958
|
jobId: {
|
|
7948
7959
|
type: "string",
|
|
@@ -8572,6 +8583,7 @@ var SYSTEM_PROMPT = `You are Trie, a code assistant embedded in a terminal TUI.
|
|
|
8572
8583
|
**When user asks to dispatch or fix with Cursor Cloud agent:**
|
|
8573
8584
|
- Default: Call trie_cloud_fix action:dispatch \u2014 triage runs and routes issues as usual.
|
|
8574
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.
|
|
8575
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.
|
|
8576
8588
|
- If the tool returns "Cloud Agent dispatch requires a Cursor API key", tell the user to configure it.
|
|
8577
8589
|
- For status: trie_cloud_fix action:status
|
|
@@ -8584,6 +8596,7 @@ Examples:
|
|
|
8584
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.
|
|
8585
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.
|
|
8586
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.
|
|
8587
8600
|
|
|
8588
8601
|
Answer concisely. Reference specific files, decisions, and patterns when relevant.`;
|
|
8589
8602
|
function ChatView() {
|
|
@@ -9666,4 +9679,4 @@ export {
|
|
|
9666
9679
|
GitHubBranchesTool,
|
|
9667
9680
|
InteractiveDashboard
|
|
9668
9681
|
};
|
|
9669
|
-
//# sourceMappingURL=chunk-
|
|
9682
|
+
//# sourceMappingURL=chunk-2354SRJM.js.map
|