@mainwave/cli 0.3.0 → 0.3.2
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.
|
@@ -81,6 +81,13 @@ const resultObject = (toolResult) => {
|
|
|
81
81
|
return undefined // a plain string result, not JSON
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
// MCP tool-result wrapper: `{content: [{type:'text', text:'<json>'}], isError}`.
|
|
85
|
+
// Codex returns save_issue this way (Claude Code hands the bare array); unwrap
|
|
86
|
+
// to the content array so the issue JSON inside `text` is parsed, not the
|
|
87
|
+
// wrapper — which carries neither `id` nor `url` (MAI-1218).
|
|
88
|
+
if (v && typeof v === 'object' && !Array.isArray(v) && Array.isArray(v.content)) {
|
|
89
|
+
v = v.content
|
|
90
|
+
}
|
|
84
91
|
if (Array.isArray(v)) {
|
|
85
92
|
const text = v.map((b) => (b && typeof b.text === 'string' ? b.text : '')).join('')
|
|
86
93
|
try {
|
package/hooks/matchers.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
3
|
"hook": "linear-ticket-marker.mjs",
|
|
4
|
-
"matcher": "^mcp__.*[Ll]inear.*
|
|
5
|
-
"why": "The server PREFIX
|
|
4
|
+
"matcher": "^mcp__.*[Ll]inear.*_(save|create|update)_issue$",
|
|
5
|
+
"why": "The server PREFIX and the separator both vary. Prefix: this workspace connects Linear as mcp__linear-server__save_issue, the older integration as mcp__linear__save_issue, and Codex exposes it as mcp__codex_apps__linear_save_issue — a SINGLE underscore before save_issue (MAI-1218). So the separator is `.*_` (one-or-more via the greedy `.*`, which absorbs the extra underscore in the __ forms) rather than a literal `__`. create_issue / update_issue are covered defensively in case an integration splits the save; detectOp reads the op off the tool name and falls back to the input's id. Anchored (`$`) because linear-server really does expose create_issue_label — the trailing `_issue$` excludes it."
|
|
6
6
|
},
|
|
7
7
|
{
|
|
8
8
|
"hook": "github-pr-marker.mjs",
|