@zenera/neo 1.1.0 → 1.1.3

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/types.js CHANGED
@@ -59,9 +59,10 @@ export function tool(def) {
59
59
  }
60
60
  /**
61
61
  * Resolves selectors against the tools a host provided, in the order written
62
- * and without duplicates. A selector is a tool name, `<group>:*` for every tool
63
- * in a group, or `*` for everything; any of them prefixed with `-` removes
64
- * what it matches from the selection so far.
62
+ * and without duplicates. A selector is a tool name, `<group>:<name>` for the
63
+ * same tool written out in full, `<group>:*` for every tool in a group, or `*`
64
+ * for everything; any of them prefixed with `-` removes what it matches from
65
+ * the selection so far.
65
66
  */
66
67
  export function selectTools(available, selectors, opts) {
67
68
  const chosen = new Map();
@@ -100,6 +101,23 @@ function matchTools(available, selector, opts) {
100
101
  if (exact) {
101
102
  return [exact];
102
103
  }
104
+ // `workspace:read_file` is the same thing as `read_file`: an author who
105
+ // writes `workspace:*` on one line should not be told the qualified form
106
+ // is a typo on the next.
107
+ const colon = selector.lastIndexOf(':');
108
+ if (colon > 0) {
109
+ const group = selector.slice(0, colon);
110
+ const name = selector.slice(colon + 1);
111
+ const qualified = available.find((t) => t.group === group && t.name === name);
112
+ if (qualified) {
113
+ return [qualified];
114
+ }
115
+ const elsewhere = available.find((t) => t.name === name);
116
+ if (elsewhere) {
117
+ throw new Error(`${opts.where}: unknown tool "${selector}" ` +
118
+ `("${name}" is in group "${elsewhere.group ?? 'none'}", not "${group}")`);
119
+ }
120
+ }
103
121
  const known = available.map((t) => t.name).join(', ') || 'none';
104
122
  throw new Error(`${opts.where}: unknown tool "${selector}" ` +
105
123
  (opts.hint ? `(${opts.hint}; known: ${known})` : `(known: ${known})`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenera/neo",
3
- "version": "1.1.0",
3
+ "version": "1.1.3",
4
4
  "description": "A multi-agent runtime for Node.js: agents, models, tools, skills, memory and an append-only trajectory.",
5
5
  "keywords": [
6
6
  "agents",