@rubytech/create-realagent 1.0.609 → 1.0.610

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-realagent",
3
- "version": "1.0.609",
3
+ "version": "1.0.610",
4
4
  "description": "Install Real Agent — Built for agents. By agents.",
5
5
  "bin": {
6
6
  "create-realagent": "./dist/index.js"
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-person.d.ts","sourceRoot":"","sources":["../../src/lib/resolve-person.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,gBAAgB,EAC5B,SAAS,EAAE,MAAM,GAChB,aAAa,CAsBf"}
1
+ {"version":3,"file":"resolve-person.d.ts","sourceRoot":"","sources":["../../src/lib/resolve-person.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,gBAAgB,EAC5B,SAAS,EAAE,MAAM,GAChB,aAAa,CA2Bf"}
@@ -16,8 +16,14 @@ export function resolvePersonMatch(identifier, accountId) {
16
16
  const queryParams = { accountId };
17
17
  let matchClause;
18
18
  if (nodeId) {
19
- matchClause = `MATCH (p:Person) WHERE elementId(p) = $nodeId AND p.accountId = $accountId`;
20
- queryParams.nodeId = nodeId;
19
+ if (nodeId.includes(":")) {
20
+ matchClause = `MATCH (p:Person) WHERE elementId(p) = $nodeId AND p.accountId = $accountId`;
21
+ queryParams.nodeId = nodeId;
22
+ }
23
+ else {
24
+ matchClause = `MATCH (p:Person) WHERE id(p) = $nodeId AND p.accountId = $accountId`;
25
+ queryParams.nodeId = parseInt(nodeId, 10);
26
+ }
21
27
  }
22
28
  else if (email) {
23
29
  matchClause = `MATCH (p:Person {email: $email, accountId: $accountId})`;
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-person.js","sourceRoot":"","sources":["../../src/lib/resolve-person.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAaH,MAAM,UAAU,kBAAkB,CAChC,UAA4B,EAC5B,SAAiB;IAEjB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC;IAEhD,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,WAAW,GAA4B,EAAE,SAAS,EAAE,CAAC;IAE3D,IAAI,WAAmB,CAAC;IACxB,IAAI,MAAM,EAAE,CAAC;QACX,WAAW,GAAG,4EAA4E,CAAC;QAC3F,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;IAC9B,CAAC;SAAM,IAAI,KAAK,EAAE,CAAC;QACjB,WAAW,GAAG,yDAAyD,CAAC;QACxE,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IAC1C,CAAC;SAAM,CAAC;QACN,WAAW,GAAG,iEAAiE,CAAC;QAChF,WAAW,CAAC,SAAS,GAAG,SAAU,CAAC,IAAI,EAAE,CAAC;IAC5C,CAAC;IAED,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;AACtC,CAAC"}
1
+ {"version":3,"file":"resolve-person.js","sourceRoot":"","sources":["../../src/lib/resolve-person.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAaH,MAAM,UAAU,kBAAkB,CAChC,UAA4B,EAC5B,SAAiB;IAEjB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC;IAEhD,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,WAAW,GAA4B,EAAE,SAAS,EAAE,CAAC;IAE3D,IAAI,WAAmB,CAAC;IACxB,IAAI,MAAM,EAAE,CAAC;QACX,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACzB,WAAW,GAAG,4EAA4E,CAAC;YAC3F,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,WAAW,GAAG,qEAAqE,CAAC;YACpF,WAAW,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;SAAM,IAAI,KAAK,EAAE,CAAC;QACjB,WAAW,GAAG,yDAAyD,CAAC;QACxE,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IAC1C,CAAC;SAAM,CAAC;QACN,WAAW,GAAG,iEAAiE,CAAC;QAChF,WAAW,CAAC,SAAS,GAAG,SAAU,CAAC,IAAI,EAAE,CAAC;IAC5C,CAAC;IAED,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;AACtC,CAAC"}
@@ -48,7 +48,7 @@ When using WebSearch directly (not via the researcher specialist), the same disc
48
48
 
49
49
  - Always Read a file before using Edit or overwriting with Write. Writing a new file does not require a prior Read.
50
50
  - Your working directory is `$ACCOUNT_DIR` — your entire filesystem scope. Use Read, Grep, and Glob freely within it for knowledge retrieval, file verification, agent configuration, or any observation. Write and Edit are also scoped here — all agent files (`agents/`, `specialists/`, `account.json`) live in this directory. Never write to `$PLATFORM_ROOT/` or paths outside `$ACCOUNT_DIR`.
51
- - MCP tool schemas are deferred. Before calling any MCP tool for the first time in a session, use ToolSearch to load its schema calling without it produces wrong types and missing required fields. When searching for a tool, use the plugin name from `<specialist-domains>` or the plugin manifest as the search prefix e.g. `+contacts delete` to find `contact-delete` in the contacts plugin. Never search by verb alone (`delete`) — this returns tools from the wrong plugin.
51
+ - MCP tool schemas are deferred. Before calling any MCP tool for the first time in a session, use ToolSearch to load its schema. Delegate to specialists for domain tools listed in `<specialist-domains>` — ToolSearch is only for admin-owned tools or when no specialist tool matches.
52
52
 
53
53
  ## Tool Routing
54
54
 
@@ -182,17 +182,11 @@ Tasks live in the graph — not in files. The tasks plugin manages them.
182
182
 
183
183
  At session start, read `agents/admin/AGENTS.md`. This file lists installed specialists and when to use each. If the file is absent or empty, handle all requests directly.
184
184
 
185
- Every user request that requires a tool call must be routed through the `<specialist-domains>` block in the plugin manifest. This is mandatory and non-negotiable:
186
-
187
- 1. Read the user's intent.
188
- 2. Scan `<specialist-domains>` for a plugin whose tools match that intent. The block lists every tool by name — `contact-delete`, `schedule-event`, `task-create`, etc. Match the user's verb and noun to a tool name listed there.
189
- 3. If a matching tool exists in `<specialist-domains>`:
190
- - **Single-tool call** — use ToolSearch with the plugin name as prefix (e.g. `+contacts delete` not just `delete`) to load the schema, then call the tool directly.
191
- - **Multi-step sequence (3+ tool calls within one domain)** — delegate to the matching specialist using the Agent tool with `subagent_type: "specialists:{name}"`.
192
- 4. If no matching tool exists in `<specialist-domains>` or in the admin-owned plugin entries, only then fall back to `memory-search` or tell the user the capability does not exist.
193
-
194
- Never conclude that a tool does not exist without first checking the `<specialist-domains>` block. The block is the authoritative registry of available tools. A tool listed there is available via ToolSearch regardless of whether the plugin's embed text is loaded.
185
+ The `<specialist-domains>` block lists every specialist-owned tool with a description. This is your primary routing table. When a user request requires action, delegate to the specialist that owns the matching tool. ToolSearch is a last resort use it only when no tool in `<specialist-domains>` or the admin-owned plugin entries matches the intent.
195
186
 
187
+ - **Single-tool call** — delegate to the specialist that owns the tool. The specialist has domain knowledge and will execute correctly.
188
+ - **Multi-step sequence** — delegate to the specialist.
189
+ - **No matching tool in the manifest** — only then use ToolSearch or memory-search.
196
190
  - After a specialist run, synthesise its results into the final response to the user.
197
191
  - Retain all task management. Specialists do not create, update, or complete tasks.
198
192
  - To install or remove specialists, load the specialist management skill via `plugin-read` (find its path in the manifest under `admin`). Keep `agents/admin/AGENTS.md` in sync.
@@ -6814,7 +6814,7 @@ async function buildPluginManifest(enabledPlugins) {
6814
6814
  specialistGroups.set(specialist, existing);
6815
6815
  }
6816
6816
  }
6817
- const specialistToolSummary = /* @__PURE__ */ new Map();
6817
+ const specialistToolDetails = /* @__PURE__ */ new Map();
6818
6818
  let specialistMcpCount = 0;
6819
6819
  for (let i = 0; i < specialistPlugins.length; i++) {
6820
6820
  const { dir, parsed } = specialistPlugins[i];
@@ -6822,25 +6822,28 @@ async function buildPluginManifest(enabledPlugins) {
6822
6822
  if (mcpTools.length > 0) {
6823
6823
  specialistMcpCount++;
6824
6824
  const hiddenSet = new Set(parsed.hidden);
6825
- const toolNames = mcpTools.filter((t) => !hiddenSet.has(t.name)).map((t) => t.name);
6826
- totalTools += toolNames.length;
6827
- if (toolNames.length > 0) {
6825
+ const visibleTools = mcpTools.filter((t) => !hiddenSet.has(t.name));
6826
+ totalTools += visibleTools.length;
6827
+ if (visibleTools.length > 0) {
6828
6828
  const desc = parsed.description ? parsed.description.split(/\.\s/)[0].replace(/\.$/, "") : "";
6829
- specialistToolSummary.set(
6830
- dir,
6831
- desc ? `${desc}: ${toolNames.join(", ")}` : toolNames.join(", ")
6832
- );
6829
+ specialistToolDetails.set(dir, { desc, tools: visibleTools });
6833
6830
  }
6834
6831
  }
6835
6832
  }
6836
6833
  if (specialistGroups.size > 0) {
6837
6834
  lines.push("\n<specialist-domains>");
6838
- lines.push("Specialist subagents own these domains. This block is the authoritative tool registry \u2014 every tool listed here is available. Before concluding a tool does not exist, check this list. Single-tool calls: use ToolSearch with the plugin name as prefix (e.g. `+contacts delete`) to load the schema, then call directly. Multi-step sequences (3+): delegate to the specialist via Agent tool.");
6835
+ lines.push("Specialist subagents own these domains. Match user intent to a tool below, then delegate to the specialist or use ToolSearch to load the schema and call directly. Only fall back to memory-search when no tool here matches.");
6839
6836
  for (const [specialist, plugins] of specialistGroups) {
6840
- lines.push(`${specialist}: ${plugins.join(", ")}`);
6837
+ lines.push(`
6838
+ ${specialist}: ${plugins.join(", ")}`);
6841
6839
  for (const plugin of plugins) {
6842
- const summary = specialistToolSummary.get(plugin);
6843
- if (summary) lines.push(` ${plugin} \u2014 ${summary}`);
6840
+ const details = specialistToolDetails.get(plugin);
6841
+ if (details) {
6842
+ for (const tool of details.tools) {
6843
+ const toolDesc = tool.description ? tool.description.split(/\.\s/)[0].replace(/\.$/, "") : "";
6844
+ lines.push(toolDesc ? ` ${tool.name} \u2014 ${toolDesc}` : ` ${tool.name}`);
6845
+ }
6846
+ }
6844
6847
  }
6845
6848
  }
6846
6849
  lines.push("</specialist-domains>");