@ganglion/xacpx 0.23.0-beta.4 → 0.23.0-beta.5
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/bridge/bridge-main.js +18 -1
- package/dist/cli.js +18 -1
- package/package.json +1 -1
|
@@ -3529,7 +3529,7 @@ function buildToolUseEvent(update, driver) {
|
|
|
3529
3529
|
const content = update.content;
|
|
3530
3530
|
const rawOutput = update.rawOutput ?? claudeToolResponse;
|
|
3531
3531
|
const locations = update.locations;
|
|
3532
|
-
const machineToolName = (isClaudeDriver ? update._meta?.claudeCode?.toolName?.trim() : "") || (driver === "qoder" ? update._meta?.qoder?.toolName?.trim() : "") || (driver === "codex" ? codexMcpMachineToolName(update.rawInput) : "") || (driver === "cursor" ? machineToolNameFromCursorInput(update.rawInput) : "") || undefined;
|
|
3532
|
+
const machineToolName = (isClaudeDriver ? update._meta?.claudeCode?.toolName?.trim() : "") || (driver === "qoder" ? update._meta?.qoder?.toolName?.trim() : "") || (driver === "codex" ? codexMcpMachineToolName(update.rawInput) : "") || (driver === "cursor" ? machineToolNameFromCursorInput(update.rawInput) : "") || (driver === "omp" ? ompXdevMachineToolName(update.rawInput, update.rawOutput) : "") || undefined;
|
|
3533
3533
|
const parentToolCallId = claudeMeta?.parentToolUseId?.trim() || update.parentToolCallId?.trim();
|
|
3534
3534
|
const isSubagent = claudeMeta?.toolName === "Agent" || driver === "qoder" && update._meta?.qoder?.toolName === "Agent" || driver === "kimi" && isKimiSubagentInput(rawInput) || driver === "codex" && isCodexSubagentMeta(update._meta?.codex?.subagent) || driver === "cursor" && isCursorSubagentInput(rawInput, title);
|
|
3535
3535
|
return {
|
|
@@ -3558,6 +3558,23 @@ function codexMcpMachineToolName(rawInput) {
|
|
|
3558
3558
|
return "";
|
|
3559
3559
|
return tool.trim();
|
|
3560
3560
|
}
|
|
3561
|
+
function ompXdevMachineToolName(rawInput, rawOutput) {
|
|
3562
|
+
const details = isRecord2(rawOutput) ? rec2(rawOutput.details) : undefined;
|
|
3563
|
+
const xdev = details ? rec2(details.xdev) : undefined;
|
|
3564
|
+
if (typeof xdev?.tool === "string" && xdev.tool.trim().length > 0) {
|
|
3565
|
+
return xdev.tool.trim();
|
|
3566
|
+
}
|
|
3567
|
+
const path2 = isRecord2(rawInput) && typeof rawInput.path === "string" ? rawInput.path.trim() : "";
|
|
3568
|
+
if (path2.toLowerCase().startsWith("xd://")) {
|
|
3569
|
+
const name = path2.slice(5).split(/[/?#]/)[0] ?? "";
|
|
3570
|
+
if (name.length > 0)
|
|
3571
|
+
return name;
|
|
3572
|
+
}
|
|
3573
|
+
return "";
|
|
3574
|
+
}
|
|
3575
|
+
function rec2(v) {
|
|
3576
|
+
return isRecord2(v) ? v : undefined;
|
|
3577
|
+
}
|
|
3561
3578
|
function machineToolNameFromCursorInput(rawInput) {
|
|
3562
3579
|
if (!isRecord2(rawInput))
|
|
3563
3580
|
return;
|
package/dist/cli.js
CHANGED
|
@@ -56318,7 +56318,7 @@ function buildToolUseEvent(update, driver) {
|
|
|
56318
56318
|
const content = update.content;
|
|
56319
56319
|
const rawOutput = update.rawOutput ?? claudeToolResponse;
|
|
56320
56320
|
const locations = update.locations;
|
|
56321
|
-
const machineToolName = (isClaudeDriver ? update._meta?.claudeCode?.toolName?.trim() : "") || (driver === "qoder" ? update._meta?.qoder?.toolName?.trim() : "") || (driver === "codex" ? codexMcpMachineToolName(update.rawInput) : "") || (driver === "cursor" ? machineToolNameFromCursorInput(update.rawInput) : "") || undefined;
|
|
56321
|
+
const machineToolName = (isClaudeDriver ? update._meta?.claudeCode?.toolName?.trim() : "") || (driver === "qoder" ? update._meta?.qoder?.toolName?.trim() : "") || (driver === "codex" ? codexMcpMachineToolName(update.rawInput) : "") || (driver === "cursor" ? machineToolNameFromCursorInput(update.rawInput) : "") || (driver === "omp" ? ompXdevMachineToolName(update.rawInput, update.rawOutput) : "") || undefined;
|
|
56322
56322
|
const parentToolCallId = claudeMeta?.parentToolUseId?.trim() || update.parentToolCallId?.trim();
|
|
56323
56323
|
const isSubagent = claudeMeta?.toolName === "Agent" || driver === "qoder" && update._meta?.qoder?.toolName === "Agent" || driver === "kimi" && isKimiSubagentInput(rawInput) || driver === "codex" && isCodexSubagentMeta(update._meta?.codex?.subagent) || driver === "cursor" && isCursorSubagentInput(rawInput, title);
|
|
56324
56324
|
return {
|
|
@@ -56347,6 +56347,23 @@ function codexMcpMachineToolName(rawInput) {
|
|
|
56347
56347
|
return "";
|
|
56348
56348
|
return tool.trim();
|
|
56349
56349
|
}
|
|
56350
|
+
function ompXdevMachineToolName(rawInput, rawOutput) {
|
|
56351
|
+
const details = isRecord5(rawOutput) ? rec2(rawOutput.details) : undefined;
|
|
56352
|
+
const xdev = details ? rec2(details.xdev) : undefined;
|
|
56353
|
+
if (typeof xdev?.tool === "string" && xdev.tool.trim().length > 0) {
|
|
56354
|
+
return xdev.tool.trim();
|
|
56355
|
+
}
|
|
56356
|
+
const path14 = isRecord5(rawInput) && typeof rawInput.path === "string" ? rawInput.path.trim() : "";
|
|
56357
|
+
if (path14.toLowerCase().startsWith("xd://")) {
|
|
56358
|
+
const name = path14.slice(5).split(/[/?#]/)[0] ?? "";
|
|
56359
|
+
if (name.length > 0)
|
|
56360
|
+
return name;
|
|
56361
|
+
}
|
|
56362
|
+
return "";
|
|
56363
|
+
}
|
|
56364
|
+
function rec2(v) {
|
|
56365
|
+
return isRecord5(v) ? v : undefined;
|
|
56366
|
+
}
|
|
56350
56367
|
function machineToolNameFromCursorInput(rawInput) {
|
|
56351
56368
|
if (!isRecord5(rawInput))
|
|
56352
56369
|
return;
|