qlogicagent 2.22.5 → 2.22.6

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.
@@ -1,10 +1,21 @@
1
- import { type ServerToolInfo } from "mcporter";
1
+ import { type Runtime, type ServerToolInfo } from "mcporter";
2
2
  import type { PortableTool, PortableToolResult } from "../portable-tool.js";
3
3
  interface ToolRegistryLike {
4
4
  addTools(tools: PortableTool[]): void;
5
5
  getToolNames(): string[];
6
6
  removeTool(name: string): boolean;
7
7
  }
8
+ export type McpServerToolInfo = ServerToolInfo & {
9
+ readonly title?: string;
10
+ readonly _meta?: Record<string, unknown>;
11
+ readonly annotations?: {
12
+ readonly title?: string;
13
+ readonly readOnlyHint?: boolean;
14
+ readonly destructiveHint?: boolean;
15
+ readonly idempotentHint?: boolean;
16
+ readonly openWorldHint?: boolean;
17
+ };
18
+ };
8
19
  export interface McpServerEntry {
9
20
  /** Server display name */
10
21
  name: string;
@@ -62,6 +73,17 @@ export interface McpManagerConfig {
62
73
  }
63
74
  export declare function resolveMcpCallTimeoutMs(value: number | undefined): number;
64
75
  export declare function withMcpDeadline<T>(operation: Promise<T>, timeoutMs: number, label: string): Promise<T>;
76
+ /**
77
+ * Read the authoritative MCP tools/list payload from mcporter's public
78
+ * connection boundary. mcporter's convenience listTools() intentionally
79
+ * projects a smaller CLI-oriented shape and currently drops standard MCP
80
+ * fields such as `_meta`, `title`, and `annotations`. Those fields carry Host
81
+ * capability contracts, so the Agent must preserve the protocol payload
82
+ * instead of depending on a package-manager patch in each consumer.
83
+ */
84
+ export declare function listMcpToolsPreservingProtocolMetadata(runtime: Runtime, serverName: string, options: {
85
+ disableOAuth: boolean;
86
+ }): Promise<McpServerToolInfo[]>;
65
87
  /**
66
88
  * Run `attempt` up to `options.attempts` times, backing off `baseDelayMs * n`
67
89
  * between tries. Returns the first success; rethrows the last error if every
@@ -129,7 +151,7 @@ export declare class McpManager {
129
151
  private removeRegisteredTool;
130
152
  }
131
153
  export declare function mcpFallbackToolTitle(serverName: string, toolName: string): string;
132
- export declare function mcpPortableToolMetadata(serverName: string, mcpTool: ServerToolInfo): Pick<PortableTool, "name" | "label" | "description" | "semanticCapability" | "skillDirectory" | "searchHint" | "isConcurrencySafe" | "isReadOnly" | "isDestructive" | "riskLevel" | "isEgress" | "egressCarriesData">;
154
+ export declare function mcpPortableToolMetadata(serverName: string, mcpTool: McpServerToolInfo): Pick<PortableTool, "name" | "label" | "description" | "semanticCapability" | "skillDirectory" | "searchHint" | "isConcurrencySafe" | "isReadOnly" | "isDestructive" | "riskLevel" | "isEgress" | "egressCarriesData">;
133
155
  /**
134
156
  * MCP bridges may already expose a globally-scoped `{server}__{tool}` name.
135
157
  * Prefixing that name again makes the model-facing function opaque and can push
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qlogicagent",
3
- "version": "2.22.5",
3
+ "version": "2.22.6",
4
4
  "packageManager": "pnpm@10.23.0",
5
5
  "description": "XiaozhiClaw Agent CLI — subprocess architecture (JSON-RPC over stdio)",
6
6
  "type": "module",
@@ -176,7 +176,7 @@
176
176
  "dotenv": "^17.3.1",
177
177
  "ioredis": "^5.11.1",
178
178
  "jsonrepair": "^3.14.0",
179
- "mcporter": "^0.12.0",
179
+ "mcporter": "0.12.3",
180
180
  "nanoid": "^5.1.5",
181
181
  "pino": "^9.6.0",
182
182
  "pino-pretty": "^13.0.0",