qlogicagent 2.23.13 → 2.24.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.
- package/dist/agent.js +32 -32
- package/dist/cli.js +7 -7
- package/dist/index.js +84 -84
- package/dist/types/agent/tool-loop.d.ts +2 -0
- package/dist/types/agent/types.d.ts +6 -0
- package/dist/types/cli/acp-session-handlers.d.ts +1 -0
- package/dist/types/cli/stdio-acp-request-host.d.ts +2 -1
- package/dist/types/cli/stdio-server.d.ts +2 -0
- package/dist/types/cli/turn-core.d.ts +2 -0
- package/package.json +1 -1
|
@@ -74,6 +74,8 @@ export interface ToolLoopParams {
|
|
|
74
74
|
refreshTools?: () => ToolDefinition[];
|
|
75
75
|
/** Exact tool names whose full schemas must be activated by tool_schema_load. */
|
|
76
76
|
deferredToolNames?: readonly string[];
|
|
77
|
+
/** Session-owned record of deferred schemas previously loaded by Agent selection. */
|
|
78
|
+
loadedDeferredToolNames?: Set<string>;
|
|
77
79
|
/**
|
|
78
80
|
* Drain user guidance queued MID-TURN (队列"运行中引导"). Called at the top of
|
|
79
81
|
* every loop round; each returned string is appended as a user message before
|
|
@@ -99,6 +99,12 @@ export interface TurnRequest {
|
|
|
99
99
|
availableTools?: ToolDefinition[];
|
|
100
100
|
/** Exact tool names whose full parameter schemas are loaded only after Agent selection. */
|
|
101
101
|
deferredToolNames?: string[];
|
|
102
|
+
/**
|
|
103
|
+
* Session-owned names whose deferred schemas the Agent already selected and loaded.
|
|
104
|
+
* The loop reconciles this set against the current authoritative tool snapshot and
|
|
105
|
+
* adds newly loaded names; it never stores schema content or capability authority.
|
|
106
|
+
*/
|
|
107
|
+
loadedDeferredToolNames?: Set<string>;
|
|
102
108
|
tools: ToolDefinition[];
|
|
103
109
|
/**
|
|
104
110
|
* Live tool-manifest rebuild, consulted each loop iteration (turnCount > 1).
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AcpSessionHost } from "./acp-session-host.js";
|
|
2
2
|
import { type AcpInitializeParams, type AcpInitializeResult, type AcpSessionCloseParams, type AcpSessionLoadParams, type AcpSessionMeta, type AcpSessionNewParams, type AcpSessionNewResult, type AcpSessionPromptParams, type AcpSessionPromptResult, type AcpSessionSetConfigParams, type AcpSessionSetConfigResult } from "../protocol/wire/index.js";
|
|
3
|
+
export declare const ACP_TURN_HEARTBEAT_INTERVAL_MS = 10000;
|
|
3
4
|
export type { AcpSessionHost };
|
|
4
5
|
/**
|
|
5
6
|
* Resolve the _meta a prompt must inherit: prefer the meta registered for THIS session (session/new)
|
|
@@ -12,6 +12,7 @@ export type StdioAcpRequestHostSource = Pick<CliAcpRequestHandlerHost, "activeTu
|
|
|
12
12
|
currentModel: string | undefined;
|
|
13
13
|
lastAssistantMessageForExtract: string | undefined;
|
|
14
14
|
lastUserMessageForAutoExtract: string | undefined;
|
|
15
|
+
loadedDeferredToolNames: Set<string>;
|
|
15
16
|
mcpReady: Promise<void>;
|
|
16
17
|
memdir: unknown;
|
|
17
18
|
pendingAskUser: unknown;
|
|
@@ -36,5 +37,5 @@ export type StdioAcpRequestHostSource = Pick<CliAcpRequestHandlerHost, "activeTu
|
|
|
36
37
|
};
|
|
37
38
|
/** Host members the shared turn pipeline reads/writes — keep in sync with
|
|
38
39
|
* `grep -oE "this\.[a-zA-Z]+" src/cli/handlers/turn-handler.ts | sort -u`. */
|
|
39
|
-
export declare const TURN_PIPELINE_HOST_MEMBERS: readonly ["activeTurn", "turnDone", "beginForegroundTurn", "beginTurnRequest", "currentHooks", "currentModel", "currentTurnId", "isTurnRequestCurrent", "drainPendingTaskNotifications", "endForegroundTurn", "getAcpPermissionSession", "getHostRequestClient", "getActiveProjectRoot", "lastAssistantMessageForExtract", "lastUserMessageForAutoExtract", "log", "mcpReady", "memdir", "pendingAskUser", "permissionChecker", "projectMemoryStoreFactory", "resolveAgent", "resolveClientForPurpose", "scheduleBackgroundMemoryWork", "sendNotification", "sendResponse", "sessionHistory", "sessionState", "setActiveWorkdir", "taskDistillation", "toolCatalog"];
|
|
40
|
+
export declare const TURN_PIPELINE_HOST_MEMBERS: readonly ["activeTurn", "turnDone", "beginForegroundTurn", "beginTurnRequest", "currentHooks", "currentModel", "currentTurnId", "isTurnRequestCurrent", "drainPendingTaskNotifications", "endForegroundTurn", "getAcpPermissionSession", "getHostRequestClient", "getActiveProjectRoot", "lastAssistantMessageForExtract", "lastUserMessageForAutoExtract", "loadedDeferredToolNames", "log", "mcpReady", "memdir", "pendingAskUser", "permissionChecker", "projectMemoryStoreFactory", "resolveAgent", "resolveClientForPurpose", "scheduleBackgroundMemoryWork", "sendNotification", "sendResponse", "sessionHistory", "sessionState", "setActiveWorkdir", "taskDistillation", "toolCatalog"];
|
|
40
41
|
export declare function createStdioAcpRequestHandlerHost(host: StdioAcpRequestHostSource): CliAcpRequestHandlerHost;
|
|
@@ -75,6 +75,7 @@ export declare class StdioServer {
|
|
|
75
75
|
* Public: the turn pipeline writes it through the ACP host adapter. */
|
|
76
76
|
private connectionLastAssistantMessageForExtract;
|
|
77
77
|
private connectionPendingTurnGuidance;
|
|
78
|
+
private readonly connectionLoadedDeferredToolNames;
|
|
78
79
|
private connectionRequestGeneration;
|
|
79
80
|
/** Foreground reservations begin before async routing, closing the idle-timer race. */
|
|
80
81
|
private foregroundTurnCount;
|
|
@@ -169,6 +170,7 @@ export declare class StdioServer {
|
|
|
169
170
|
*/
|
|
170
171
|
get pendingTurnGuidance(): string[];
|
|
171
172
|
set pendingTurnGuidance(v: string[]);
|
|
173
|
+
get loadedDeferredToolNames(): Set<string>;
|
|
172
174
|
/** LH-10: an explicit cancel of a session stops the background tasks that
|
|
173
175
|
* session launched — the forked agent + the exec processes it spawned —
|
|
174
176
|
* instead of leaving them running as zombies. Keyed by session id, which is
|
|
@@ -15,6 +15,8 @@ export interface TurnCoreRequest {
|
|
|
15
15
|
availableTools?: ToolDefinition[];
|
|
16
16
|
/** Exact capability names whose full schemas are loaded only after Agent selection. */
|
|
17
17
|
deferredToolNames?: string[];
|
|
18
|
+
/** Session-owned names already loaded by Agent selection on an earlier turn. */
|
|
19
|
+
loadedDeferredToolNames?: Set<string>;
|
|
18
20
|
tools: ToolDefinition[];
|
|
19
21
|
/** Live tool-manifest rebuild for same-turn activation (forwarded to the loop). */
|
|
20
22
|
refreshTools?: () => ToolDefinition[];
|