qlogicagent 2.20.7 → 2.20.9
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/README.md +1 -1
- package/dist/agent.js +39 -39
- package/dist/cli.js +1 -1
- package/dist/host-contract.js +1 -1
- package/dist/index.js +334 -334
- package/dist/types/agent/memory-recall-injection.d.ts +2 -0
- package/dist/types/agent/tool-loop/loop-helpers.d.ts +1 -1
- package/dist/types/cli/agent-runtime-session-state.d.ts +4 -0
- package/dist/types/contracts/tool-execution-evidence.d.ts +3 -1
- package/dist/types/host-contract/index.d.ts +6 -0
- package/dist/types/runtime/execution/tool-result-storage.d.ts +11 -0
- package/dist/types/skills/mcp/mcp-manager.d.ts +1 -0
- package/package.json +7 -2
|
@@ -20,6 +20,8 @@ export interface RecallMemoriesDeps {
|
|
|
20
20
|
turnId: string;
|
|
21
21
|
/** Last user message (already truncated by the caller). */
|
|
22
22
|
query: string;
|
|
23
|
+
/** Turn lifetime. Aborted recall must not be reported or injected as consumed. */
|
|
24
|
+
signal?: AbortSignal;
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
27
|
* Recall long-term memories for this turn and build the system-message content
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChatMessage, ToolCallExecutionEvidence } from "../types.js";
|
|
2
2
|
export { isEmptyToolResult } from "./tool-result-classification.js";
|
|
3
3
|
export declare const OUTPUT_REQUEST_CONTEXT_PATTERN: RegExp;
|
|
4
|
-
export declare function findLastToolError(messages: unknown[],
|
|
4
|
+
export declare function findLastToolError(messages: unknown[], toolName: string, toolArguments?: string): string | undefined;
|
|
5
5
|
export declare function looksLikeBuildRequest(messages?: readonly ChatMessage[]): boolean;
|
|
6
6
|
export declare function isCapabilityDenial(text: string): boolean;
|
|
7
7
|
export declare function resolveToolLoopBudget(requested?: number, messages?: readonly ChatMessage[]): number;
|
|
@@ -13,7 +13,10 @@ export interface SessionRuntimeState {
|
|
|
13
13
|
hooks: HookRegistry;
|
|
14
14
|
permission: PermissionState;
|
|
15
15
|
}
|
|
16
|
+
export declare const MCP_TOOL_SNAPSHOT_TTL_MS = 30000;
|
|
16
17
|
export declare class AgentRuntimeSessionState {
|
|
18
|
+
private readonly now;
|
|
19
|
+
private readonly mcpToolSnapshotTtlMs;
|
|
17
20
|
private readonly runtimeBySession;
|
|
18
21
|
private readonly permissionLeaseCountBySession;
|
|
19
22
|
private readonly retiredPermissionUnregisterBySession;
|
|
@@ -23,6 +26,7 @@ export declare class AgentRuntimeSessionState {
|
|
|
23
26
|
memoryProvider: MemoryHandlerProvider | null;
|
|
24
27
|
memoryDreamProvider: MemoryDreamRuntimeProvider | null;
|
|
25
28
|
memoryUserId: string;
|
|
29
|
+
constructor(now?: () => number, mcpToolSnapshotTtlMs?: number);
|
|
26
30
|
getPluginSkills(): ReturnType<PluginLoader["getPluginSkills"]>;
|
|
27
31
|
applyBootstrap(sessionId: string, result: AgentRuntimeBootstrapResult): void;
|
|
28
32
|
withPermissionLease<T>(sessionId: string, action: () => Promise<T>): Promise<T>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { FinalAnswerEvidence, ToolCallExecutionEvidence } from "../protocol/wire/notification-payloads.js";
|
|
2
|
+
export declare function isFreshEvidenceToolCall(call: Pick<ToolCallExecutionEvidence, "identity">): boolean;
|
|
3
|
+
export declare function hasSuccessfulFreshToolEvidence(toolCalls: readonly ToolCallExecutionEvidence[]): boolean;
|
|
2
4
|
export declare function classifyToolFailureKind(result: {
|
|
3
5
|
blocked?: boolean;
|
|
4
6
|
blockReason?: string;
|
|
5
7
|
error?: string;
|
|
6
8
|
details?: Record<string, unknown>;
|
|
7
9
|
}): ToolCallExecutionEvidence["failureKind"];
|
|
8
|
-
export declare function buildFinalAnswerEvidence(freshEvidenceRequired: boolean, toolCalls: readonly ToolCallExecutionEvidence[]): FinalAnswerEvidence;
|
|
10
|
+
export declare function buildFinalAnswerEvidence(freshEvidenceRequired: boolean, toolCalls: readonly ToolCallExecutionEvidence[], requiredSuccessfulLogicalToolNames?: readonly string[]): FinalAnswerEvidence;
|
|
@@ -474,6 +474,12 @@ export interface ProfileConfigService {
|
|
|
474
474
|
}>): void;
|
|
475
475
|
resolveForSpawn(agentId: AgentId, session: SessionContext): ResolvedSpawnProfile;
|
|
476
476
|
}
|
|
477
|
+
/**
|
|
478
|
+
* Resident L2 categories are already rendered into the global memory index.
|
|
479
|
+
* Every foreground recall surface must exclude the same groups so automatic
|
|
480
|
+
* injection and explicit memory_search share one authoritative candidate pool.
|
|
481
|
+
*/
|
|
482
|
+
export declare const MEMORY_RESIDENT_TAG_GROUPS: readonly [readonly ["onboarding-v1", "preference"], readonly ["onboarding-v1", "boundary"], readonly ["onboarding-v1", "workspace"], readonly ["onboarding-v1", "identity"]];
|
|
477
483
|
/** [S1 补定] 记忆查询(memory 域;实现 lane 与 memories.db 形状映射)。 */
|
|
478
484
|
export interface MemoryQuery {
|
|
479
485
|
query?: string;
|
|
@@ -61,6 +61,7 @@ type SkillReadinessSet = {
|
|
|
61
61
|
};
|
|
62
62
|
type PendingSkillReadinessSet = SkillReadinessSet & {
|
|
63
63
|
readPaths: Set<string>;
|
|
64
|
+
readCallIds: Set<string>;
|
|
64
65
|
nextSets: SkillReadinessSet[];
|
|
65
66
|
};
|
|
66
67
|
type SkillReadinessActivation = {
|
|
@@ -73,6 +74,15 @@ export type PersistedToolResult = {
|
|
|
73
74
|
preview: string;
|
|
74
75
|
hasMore: boolean;
|
|
75
76
|
};
|
|
77
|
+
export type CompleteToolResultEvidence = {
|
|
78
|
+
schemaVersion: 1;
|
|
79
|
+
complete: true;
|
|
80
|
+
storage: "session-tool-result";
|
|
81
|
+
artifactPath: string;
|
|
82
|
+
contentSha256: string;
|
|
83
|
+
contentBytes: number;
|
|
84
|
+
contentChars: number;
|
|
85
|
+
};
|
|
76
86
|
export declare function createContentReplacementState(): ContentReplacementState;
|
|
77
87
|
export declare function toolResultContextPolicy(details: Record<string, unknown> | undefined): ToolResultContextPolicy;
|
|
78
88
|
export declare function toolResultContextBudget(policy: ToolResultContextPolicy): ToolResultContextBudget;
|
|
@@ -93,6 +103,7 @@ export declare function generatePreview(content: string, maxBytes: number): {
|
|
|
93
103
|
hasMore: boolean;
|
|
94
104
|
};
|
|
95
105
|
export declare function persistToolResult(content: string, toolCallId: string, sessionId: string, projectRoot: string | undefined): Promise<PersistedToolResult | null>;
|
|
106
|
+
export declare function persistCompleteToolResultEvidence(content: string, toolCallId: string, sessionId: string, projectRoot: string | undefined): Promise<CompleteToolResultEvidence | undefined>;
|
|
96
107
|
/**
|
|
97
108
|
* Build a reference message for large tool results (CC buildLargeToolResultMessage parity).
|
|
98
109
|
*/
|
|
@@ -61,6 +61,7 @@ export interface McpManagerConfig {
|
|
|
61
61
|
toolCatalog?: ToolRegistryLike;
|
|
62
62
|
}
|
|
63
63
|
export declare function resolveMcpCallTimeoutMs(value: number | undefined): number;
|
|
64
|
+
export declare function withMcpDeadline<T>(operation: Promise<T>, timeoutMs: number, label: string): Promise<T>;
|
|
64
65
|
/**
|
|
65
66
|
* Run `attempt` up to `options.attempts` times, backing off `baseDelayMs * n`
|
|
66
67
|
* between tries. Returns the first success; rethrows the last error if every
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qlogicagent",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.9",
|
|
4
|
+
"packageManager": "pnpm@10.23.0",
|
|
4
5
|
"description": "XiaozhiClaw Agent CLI — subprocess architecture (JSON-RPC over stdio)",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "dist/index.js",
|
|
@@ -140,6 +141,10 @@
|
|
|
140
141
|
"test:watch": "vitest",
|
|
141
142
|
"benchmark:hermes-superiority": "tsx benchmarks/hermes-superiority/runner.ts",
|
|
142
143
|
"benchmark:product-blackbox": "tsx benchmarks/product-blackbox/runner.ts",
|
|
144
|
+
"benchmark:product-blind-preflight": "tsx benchmarks/product-blackbox/runner.ts blind-preflight",
|
|
145
|
+
"benchmark:product-blind-calibration": "tsx benchmarks/product-blackbox/runner.ts prepare-blind-calibration",
|
|
146
|
+
"benchmark:product-blind-score": "tsx benchmarks/product-blackbox/runner.ts score-blind-calibration",
|
|
147
|
+
"benchmark:capability-state-fixtures": "tsx benchmarks/product-blackbox/run-capability-state-fixtures.ts",
|
|
143
148
|
"lint": "oxlint .",
|
|
144
149
|
"check:encoding-corruption": "node scripts/check-encoding-corruption.mjs",
|
|
145
150
|
"check:mechanical-rules": "node scripts/check-mechanical-rules.mjs",
|
|
@@ -160,7 +165,7 @@
|
|
|
160
165
|
"release": "node scripts/release.mjs"
|
|
161
166
|
},
|
|
162
167
|
"engines": {
|
|
163
|
-
"node": ">=
|
|
168
|
+
"node": ">=24.0.0 <25"
|
|
164
169
|
},
|
|
165
170
|
"dependencies": {
|
|
166
171
|
"@agentclientprotocol/sdk": "^0.25.0",
|