qlogicagent 2.20.10 → 2.22.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.
@@ -13,10 +13,8 @@ export interface SessionRuntimeState {
13
13
  hooks: HookRegistry;
14
14
  permission: PermissionState;
15
15
  }
16
- export declare const MCP_TOOL_SNAPSHOT_TTL_MS = 30000;
17
16
  export declare class AgentRuntimeSessionState {
18
17
  private readonly now;
19
- private readonly mcpToolSnapshotTtlMs;
20
18
  private readonly runtimeBySession;
21
19
  private readonly permissionLeaseCountBySession;
22
20
  private readonly retiredPermissionUnregisterBySession;
@@ -26,7 +24,7 @@ export declare class AgentRuntimeSessionState {
26
24
  memoryProvider: MemoryHandlerProvider | null;
27
25
  memoryDreamProvider: MemoryDreamRuntimeProvider | null;
28
26
  memoryUserId: string;
29
- constructor(now?: () => number, mcpToolSnapshotTtlMs?: number);
27
+ constructor(now?: () => number);
30
28
  getPluginSkills(): ReturnType<PluginLoader["getPluginSkills"]>;
31
29
  applyBootstrap(sessionId: string, result: AgentRuntimeBootstrapResult): void;
32
30
  withPermissionLease<T>(sessionId: string, action: () => Promise<T>): Promise<T>;
@@ -20,6 +20,8 @@ export interface SemanticToolCapability {
20
20
  effects?: string[];
21
21
  modalities?: string[];
22
22
  constraints?: string[];
23
+ /** Exact Host Skill ids that the execution state machine must load first. */
24
+ requiredSkills?: string[];
23
25
  }
24
26
  export type ChatMessageRole = "system" | "user" | "assistant" | "tool";
25
27
  export type ContextAnchorCategory = "objective" | "acceptance" | "decision" | "constraint" | "task" | "blocker" | "artifact";
@@ -131,6 +133,17 @@ export interface ToolIdentity {
131
133
  serverId?: string;
132
134
  capabilityId: string;
133
135
  }
136
+ export interface SkillDirectoryEntry {
137
+ id: string;
138
+ description: string;
139
+ version?: string;
140
+ requiredTools?: string[];
141
+ memberCount?: number;
142
+ }
143
+ export interface SkillDirectory {
144
+ schemaVersion: 1;
145
+ entries: SkillDirectoryEntry[];
146
+ }
134
147
  /**
135
148
  * Tool definition — wire format as sent over JSON-RPC.
136
149
  *
@@ -151,6 +164,8 @@ export interface ToolDefinition {
151
164
  displayName?: LocalizedToolText;
152
165
  displayDescription?: LocalizedToolText;
153
166
  semanticCapability?: SemanticToolCapability;
167
+ /** Host-authored, bounded Skill routing index. Full instructions remain behind skill_read. */
168
+ skillDirectory?: SkillDirectory;
154
169
  serialOnly?: boolean;
155
170
  parallelSafe?: boolean;
156
171
  /** Unified permission risk class. */
@@ -7,6 +7,7 @@ export interface CapabilityRouterClient {
7
7
  export interface McpCapabilitySelection {
8
8
  aliases: string[];
9
9
  toolNames: ReadonlySet<string>;
10
+ requiredSkillNames: readonly string[];
10
11
  source: "semantic-directory";
11
12
  evidence: {
12
13
  namespaces: string[];
@@ -26,6 +27,14 @@ export type McpCapabilityRoutingOutcome = {
26
27
  status: "unavailable";
27
28
  reason: string;
28
29
  };
30
+ /**
31
+ * A first-pass semantic abstention is not authoritative. Small routing models
32
+ * can miss an implied connector need even when the live capability directory
33
+ * contains an exact implementation. A second semantic opinion preserves the
34
+ * natural-language contract without adding connector names, keywords, or
35
+ * regular-expression gates.
36
+ */
37
+ export declare function shouldRequestMcpCapabilitySecondOpinion(outcome: McpCapabilityRoutingOutcome): boolean;
29
38
  export interface ResolveMcpCapabilitySelectionInput {
30
39
  userText: string;
31
40
  messages: readonly ChatMessage[];
@@ -129,7 +129,7 @@ export declare class McpManager {
129
129
  private removeRegisteredTool;
130
130
  }
131
131
  export declare function mcpFallbackToolTitle(serverName: string, toolName: string): string;
132
- export declare function mcpPortableToolMetadata(serverName: string, mcpTool: ServerToolInfo): Pick<PortableTool, "name" | "label" | "description" | "semanticCapability" | "searchHint" | "isConcurrencySafe" | "isReadOnly" | "isDestructive" | "riskLevel" | "isEgress" | "egressCarriesData">;
132
+ export declare function mcpPortableToolMetadata(serverName: string, mcpTool: ServerToolInfo): Pick<PortableTool, "name" | "label" | "description" | "semanticCapability" | "skillDirectory" | "searchHint" | "isConcurrencySafe" | "isReadOnly" | "isDestructive" | "riskLevel" | "isEgress" | "egressCarriesData">;
133
133
  /**
134
134
  * MCP bridges may already expose a globally-scoped `{server}__{tool}` name.
135
135
  * Prefixing that name again makes the model-facing function opaque and can push
@@ -69,6 +69,8 @@ export interface PortableTool<TParams = Record<string, unknown>> {
69
69
  description: string;
70
70
  /** Structured semantics used by model-based capability discovery and routing. */
71
71
  semanticCapability?: SemanticToolCapability;
72
+ /** Host-authored, bounded Skill routing index attached only to skill_list. */
73
+ skillDirectory?: import("../protocol/wire/chat-types.js").SkillDirectory;
72
74
  /** JSON Schema object describing the tool's parameters. */
73
75
  parameters: Record<string, unknown>;
74
76
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qlogicagent",
3
- "version": "2.20.10",
3
+ "version": "2.22.1",
4
4
  "packageManager": "pnpm@10.23.0",
5
5
  "description": "XiaozhiClaw Agent CLI — subprocess architecture (JSON-RPC over stdio)",
6
6
  "type": "module",