qlogicagent 2.12.7 → 2.12.8
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/cli.js +258 -258
- package/dist/index.js +257 -257
- package/dist/types/cli/acp-session-host.d.ts +17 -4
- package/dist/types/cli/core-tool-coordinator.d.ts +1 -0
- package/dist/types/cli/core-tools/team-tool-service.d.ts +6 -3
- package/dist/types/cli/stdio-server.d.ts +2 -0
- package/dist/types/runtime/infra/agent-process.d.ts +12 -9
- package/package.json +2 -2
|
@@ -2,14 +2,27 @@ import type { HookRegistry } from "../contracts/hooks.js";
|
|
|
2
2
|
import type { AcpSessionMeta } from "../protocol/wire/index.js";
|
|
3
3
|
import { createMemoryPrefetchState } from "../runtime/hooks/memory-hooks.js";
|
|
4
4
|
import type { SessionState } from "../runtime/session/session-state.js";
|
|
5
|
+
/**
|
|
6
|
+
* LLM config pinned on the session by the host (session/set_config_option /
|
|
7
|
+
* session/set_model / the /model command). This is host-supplied INPUT — distinct
|
|
8
|
+
* from the host's resolved-agent snapshot (stdio-server current*), which is
|
|
9
|
+
* derived state and gets invalidated on every ModelRegistry change. Pinned config
|
|
10
|
+
* must survive registry churn: a spawned team member is provisioned exactly this
|
|
11
|
+
* way, and a background catalog hydration firing between the pin and the first
|
|
12
|
+
* prompt must not wipe it (that wipe was the standalone NO_PROVIDER bug).
|
|
13
|
+
*/
|
|
14
|
+
export interface SessionLlmConfig {
|
|
15
|
+
provider?: string;
|
|
16
|
+
model?: string;
|
|
17
|
+
apiKey?: string;
|
|
18
|
+
baseUrl?: string;
|
|
19
|
+
}
|
|
5
20
|
export interface AcpSessionHost {
|
|
6
21
|
/** Gateway-supplied per-session context (_meta from session/new); inherited by every prompt. */
|
|
7
22
|
acpSessionMeta: AcpSessionMeta | null;
|
|
8
|
-
|
|
9
|
-
|
|
23
|
+
/** Host-pinned per-session LLM config; overlaid into every prompt's turn config. */
|
|
24
|
+
sessionLlmConfig: SessionLlmConfig;
|
|
10
25
|
currentHooks: HookRegistry | null;
|
|
11
|
-
currentModel: string;
|
|
12
|
-
currentProvider: string;
|
|
13
26
|
currentSessionId: string;
|
|
14
27
|
memoryPrefetchState: ReturnType<typeof createMemoryPrefetchState>;
|
|
15
28
|
sessionState: SessionState | null;
|
|
@@ -6,6 +6,7 @@ import type { LLMTransport } from "./provider-core-facade.js";
|
|
|
6
6
|
export interface CliCoreToolHostDeps {
|
|
7
7
|
getAgent(): unknown | null;
|
|
8
8
|
getCurrentTransport(): LLMTransport | null;
|
|
9
|
+
getCurrentProvider(): string;
|
|
9
10
|
getCurrentApiKey(): string;
|
|
10
11
|
getCurrentModel(): string;
|
|
11
12
|
getCurrentBaseUrl(): string;
|
|
@@ -9,11 +9,14 @@ export interface TeamToolServiceHost {
|
|
|
9
9
|
readonly currentSessionId: string;
|
|
10
10
|
readonly verbose: boolean;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* The leader's resolved LLM config, pushed to each spawned member as standing
|
|
13
|
+
* session config (session/set_config_option). Without it a standalone member
|
|
14
|
+
* (no llmrouter directory to hydrate a catalog from) cannot provision a
|
|
15
|
+
* provider, and its first reply turn fails with NO_PROVIDER. Returns null
|
|
16
|
+
* when the leader has no resolved provider yet.
|
|
15
17
|
*/
|
|
16
18
|
getLlmConfig(): {
|
|
19
|
+
provider: string;
|
|
17
20
|
model: string;
|
|
18
21
|
apiKey: string;
|
|
19
22
|
baseUrl?: string;
|
|
@@ -38,6 +38,8 @@ export declare class StdioServer {
|
|
|
38
38
|
private currentModel;
|
|
39
39
|
private currentProvider;
|
|
40
40
|
private currentBaseUrl;
|
|
41
|
+
/** Host-pinned per-session LLM config (session/set_config_option · set_model · /model). */
|
|
42
|
+
private sessionLlmConfig;
|
|
41
43
|
private sessionState;
|
|
42
44
|
private currentMediaApiKeys;
|
|
43
45
|
private taskStore;
|
|
@@ -29,11 +29,20 @@ export interface AgentProcessConfig {
|
|
|
29
29
|
env?: Record<string, string>;
|
|
30
30
|
/** Agent type hint for the child (sets system prompt behavior). */
|
|
31
31
|
agentType?: string;
|
|
32
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Standing LLM config for an internal child. Pushed via session/set_config_option
|
|
34
|
+
* right after session/new so every turn (initial task, send_message replies)
|
|
35
|
+
* resolves provider/model/apiKey explicitly. A standalone child has no llmrouter
|
|
36
|
+
* directory to hydrate a model catalog from — without this push its first turn
|
|
37
|
+
* dies with NO_PROVIDER. provider+apiKey are what the child's turn resolution
|
|
38
|
+
* requires (resolveTextGenerationConfig); model rides along for determinism.
|
|
39
|
+
*/
|
|
40
|
+
provider?: string;
|
|
41
|
+
/** Model for the child's turns (see provider). */
|
|
33
42
|
model?: string;
|
|
34
|
-
/** API key (
|
|
43
|
+
/** API key for the child's turns (see provider). */
|
|
35
44
|
apiKey?: string;
|
|
36
|
-
/** Base URL for LLM API. */
|
|
45
|
+
/** Base URL for the child's LLM API (see provider). */
|
|
37
46
|
baseUrl?: string;
|
|
38
47
|
/** Enable verbose logging in child. */
|
|
39
48
|
verbose?: boolean;
|
|
@@ -159,9 +168,6 @@ export declare class AgentProcessManager {
|
|
|
159
168
|
* Returns the JSON-RPC result (content/usage carried on the response).
|
|
160
169
|
*/
|
|
161
170
|
sendTask(memberId: string, prompt: string, options?: {
|
|
162
|
-
model?: string;
|
|
163
|
-
apiKey?: string;
|
|
164
|
-
baseUrl?: string;
|
|
165
171
|
sessionId?: string;
|
|
166
172
|
timeout?: number;
|
|
167
173
|
}): Promise<unknown>;
|
|
@@ -181,9 +187,6 @@ export declare class AgentProcessManager {
|
|
|
181
187
|
* `pingTimeout`, the task is considered failed.
|
|
182
188
|
*/
|
|
183
189
|
sendTaskAsync(memberId: string, prompt: string, options?: {
|
|
184
|
-
model?: string;
|
|
185
|
-
apiKey?: string;
|
|
186
|
-
baseUrl?: string;
|
|
187
190
|
sessionId?: string;
|
|
188
191
|
/** Total timeout for the task (default: unlimited, 0 = no timeout) */
|
|
189
192
|
timeout?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qlogicagent",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.8",
|
|
4
4
|
"description": "XiaozhiClaw Agent CLI — subprocess architecture (JSON-RPC over stdio)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@agentclientprotocol/sdk": "^0.25.0",
|
|
90
90
|
"@napi-rs/canvas": "0.1.100",
|
|
91
91
|
"@xiaozhiclaw/pet-core": "0.1.1",
|
|
92
|
-
"@xiaozhiclaw/provider-core": "0.1.
|
|
92
|
+
"@xiaozhiclaw/provider-core": "0.1.8",
|
|
93
93
|
"better-sqlite3": "^12.10.0",
|
|
94
94
|
"dotenv": "^17.3.1",
|
|
95
95
|
"ioredis": "^5.11.1",
|