@ordewell/core 0.8.1 → 0.9.1

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.
@@ -86,14 +86,17 @@ var KNOWN_TOOLS = {
86
86
  local_shell: "bash",
87
87
  // OpenCode
88
88
  list: "list_dir",
89
- fetch: "fetch"
89
+ fetch: "fetch",
90
+ // Ordewell's own research shell (ADR-0026), under every runner's name for it
91
+ runcommand: "bash"
90
92
  };
93
+ var ORDEWELL_TOOL_PREFIX = /^(mcp__ordewell__|ordewell_)/i;
91
94
  var FILE_EDIT_TOOLS = /* @__PURE__ */ new Set(["edit", "write", "multiedit", "notebookedit", "applypatch", "patch", "add", "update", "delete", "filechange"]);
92
95
  function isFileEditTool(name) {
93
96
  return FILE_EDIT_TOOLS.has(name.trim().toLowerCase().replace(/[_-]/g, ""));
94
97
  }
95
98
  function mapAgentTool(name) {
96
- const normalized = name.trim().toLowerCase().replace(/[_-]/g, "");
99
+ const normalized = name.trim().replace(ORDEWELL_TOOL_PREFIX, "").toLowerCase().replace(/[_-]/g, "");
97
100
  const direct = KNOWN_TOOLS[normalized] ?? KNOWN_TOOLS[name.trim().toLowerCase()];
98
101
  if (direct) {
99
102
  return { tool: direct, toolLabel: name };
@@ -1577,7 +1580,7 @@ function summarizeToolCall(tool, argsJson, toolLabel) {
1577
1580
  }
1578
1581
  function classifyOutcome(success, output) {
1579
1582
  if (!success) {
1580
- if (/^Command refused:/.test(output) || /is not available\. You are a read-only research subagent/.test(output)) return "refused";
1583
+ if (/^(Command|Fetch|Web search) refused:/.test(output) || /is not available\. You are a read-only research subagent/.test(output)) return "refused";
1581
1584
  if (/not approved/i.test(output) || /^Access denied:/.test(output) || /needs user approval/i.test(output)) return "denied";
1582
1585
  return "failure";
1583
1586
  }
@@ -2248,4 +2251,4 @@ export {
2248
2251
  pastGateConfirmation,
2249
2252
  newTaskFields
2250
2253
  };
2251
- //# sourceMappingURL=chunk-BLLIBCCS.mjs.map
2254
+ //# sourceMappingURL=chunk-OOZWSUIE.mjs.map