qlogicagent 2.7.0 → 2.9.0
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 +18 -18
- package/dist/cli.js +353 -413
- package/dist/index.js +373 -433
- package/dist/orchestration.js +6 -6
- package/dist/protocol.js +1 -1
- package/dist/types/agent/agent.d.ts +1 -1
- package/dist/types/agent/tool-loop.d.ts +1 -1
- package/dist/types/agent/tunable-defaults.d.ts +4 -0
- package/dist/types/agent/types.d.ts +7 -18
- package/dist/types/cli/handlers/agents-handler.d.ts +19 -0
- package/dist/types/cli/handlers/config-handler.d.ts +17 -0
- package/dist/types/cli/handlers/dream-handler.d.ts +5 -0
- package/dist/types/cli/handlers/files-handler.d.ts +15 -0
- package/dist/types/cli/handlers/media-handler.d.ts +13 -0
- package/dist/types/cli/handlers/memory-handler.d.ts +11 -0
- package/dist/types/cli/handlers/pet-handler.d.ts +21 -0
- package/dist/types/cli/handlers/product-handler.d.ts +32 -0
- package/dist/types/cli/handlers/project-handler.d.ts +19 -0
- package/dist/types/cli/handlers/session-handler.d.ts +38 -0
- package/dist/types/cli/handlers/settings-handler.d.ts +24 -0
- package/dist/types/cli/handlers/skills-handler.d.ts +20 -0
- package/dist/types/cli/handlers/solo-handler.d.ts +15 -0
- package/dist/types/cli/handlers/turn-handler.d.ts +17 -0
- package/dist/types/cli/main.d.ts +2 -2
- package/dist/types/cli/stdio-server.d.ts +64 -106
- package/dist/types/cli/tool-bootstrap.d.ts +4 -3
- package/dist/types/config/config.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/llm/index.d.ts +1 -31
- package/dist/types/orchestration/tool-cascade.d.ts +2 -2
- package/dist/types/protocol/methods.d.ts +153 -5
- package/dist/types/protocol/wire/agent-events.d.ts +2 -2
- package/dist/types/protocol/wire/agent-methods.d.ts +5 -3
- package/dist/types/protocol/wire/gateway-rpc.d.ts +77 -4
- package/dist/types/protocol/wire/index.d.ts +1 -1
- package/dist/types/protocol/wire/notification-payloads.d.ts +72 -1
- package/dist/types/runtime/execution/dream-agent.d.ts +1 -1
- package/dist/types/runtime/execution/forked-agent.d.ts +1 -1
- package/dist/types/runtime/hooks/context-compression.d.ts +1 -1
- package/dist/types/runtime/hooks/memory-hooks.d.ts +1 -1
- package/dist/types/runtime/infra/acp-types.d.ts +4 -0
- package/dist/types/runtime/infra/agent-paths.d.ts +22 -25
- package/dist/types/runtime/infra/agent-process.d.ts +1 -1
- package/dist/types/runtime/infra/builtin-providers.d.ts +36 -0
- package/dist/types/runtime/infra/checkpoint-backend.d.ts +1 -1
- package/dist/types/runtime/infra/index.d.ts +1 -2
- package/dist/types/runtime/infra/key-pool.d.ts +120 -0
- package/dist/types/runtime/infra/media-persistence.d.ts +26 -15
- package/dist/types/runtime/infra/model-registry.d.ts +187 -0
- package/dist/types/runtime/infra/project-instructions-store.d.ts +3 -3
- package/dist/types/runtime/infra/project-store.d.ts +3 -0
- package/dist/types/runtime/infra/token-budget.d.ts +2 -2
- package/dist/types/runtime/infra/worktree-backend.d.ts +1 -1
- package/dist/types/runtime/pet/index.d.ts +8 -0
- package/dist/types/runtime/pet/pet-context-injection.d.ts +8 -0
- package/dist/types/runtime/pet/pet-file-loader.d.ts +62 -0
- package/dist/types/runtime/pet/pet-growth-engine.d.ts +60 -0
- package/dist/types/runtime/pet/pet-reaction-service.d.ts +33 -0
- package/dist/types/runtime/pet/pet-soul-service.d.ts +71 -0
- package/dist/types/runtime/session/group-session-split.d.ts +38 -0
- package/dist/types/runtime/session/index.d.ts +4 -2
- package/dist/types/runtime/session/session-locator.d.ts +24 -0
- package/dist/types/runtime/session/session-memory.d.ts +4 -4
- package/dist/types/runtime/session/session-persistence.d.ts +47 -46
- package/dist/types/runtime/session/session-state.d.ts +3 -5
- package/dist/types/skills/memory/local-memory-provider.d.ts +1 -1
- package/dist/types/skills/memory/local-store.d.ts +3 -2
- package/dist/types/skills/memory/memdir.d.ts +7 -4
- package/dist/types/skills/memory/memory-provider-factory.d.ts +2 -8
- package/dist/types/skills/permissions/denial-audit-log.d.ts +1 -1
- package/dist/types/skills/permissions/permission-classifier.d.ts +1 -1
- package/dist/types/skills/tools/search-tool.d.ts +1 -1
- package/dist/types/skills/tools.d.ts +3 -3
- package/dist/types/transport/acp-event-emitter.d.ts +1 -1
- package/dist/types/transport/acp-server.d.ts +2 -2
- package/package.json +2 -1
- package/dist/types/llm/adapters/aliyun-oss-file-upload-adapter.d.ts +0 -44
- package/dist/types/llm/adapters/gemini-file-upload-adapter.d.ts +0 -26
- package/dist/types/llm/adapters/hub-oss-file-upload-adapter.d.ts +0 -29
- package/dist/types/llm/adapters/index.d.ts +0 -10
- package/dist/types/llm/adapters/openai-file-upload-adapter.d.ts +0 -38
- package/dist/types/llm/adapters/volcengine-file-upload-adapter.d.ts +0 -24
- package/dist/types/llm/builtin-providers.d.ts +0 -10
- package/dist/types/llm/debug-transport.d.ts +0 -12
- package/dist/types/llm/file-upload-service.d.ts +0 -68
- package/dist/types/llm/gemini-schema-utils.d.ts +0 -17
- package/dist/types/llm/llm-client.d.ts +0 -43
- package/dist/types/llm/media-client.d.ts +0 -42
- package/dist/types/llm/media-transport.d.ts +0 -176
- package/dist/types/llm/model-catalog.d.ts +0 -82
- package/dist/types/llm/model-detection.d.ts +0 -22
- package/dist/types/llm/provider-def.d.ts +0 -203
- package/dist/types/llm/provider-registry.d.ts +0 -59
- package/dist/types/llm/provider-tool-api.d.ts +0 -44
- package/dist/types/llm/retry.d.ts +0 -37
- package/dist/types/llm/transport.d.ts +0 -281
- package/dist/types/llm/transports/anthropic-messages.d.ts +0 -65
- package/dist/types/llm/transports/gemini-cache-api.d.ts +0 -86
- package/dist/types/llm/transports/gemini-file-api.d.ts +0 -90
- package/dist/types/llm/transports/gemini-generatecontent.d.ts +0 -56
- package/dist/types/llm/transports/gemini-lyria-realtime.d.ts +0 -117
- package/dist/types/llm/transports/gemini-media.d.ts +0 -53
- package/dist/types/llm/transports/media-resolve.d.ts +0 -50
- package/dist/types/llm/transports/minimax-media.d.ts +0 -55
- package/dist/types/llm/transports/openai-chat.d.ts +0 -81
- package/dist/types/llm/transports/openai-media.d.ts +0 -24
- package/dist/types/llm/transports/openai-responses.d.ts +0 -63
- package/dist/types/llm/transports/qwen-media.d.ts +0 -50
- package/dist/types/llm/transports/realtime-transport.d.ts +0 -183
- package/dist/types/llm/transports/volcengine-grounding.d.ts +0 -58
- package/dist/types/llm/transports/volcengine-media.d.ts +0 -93
- package/dist/types/llm/transports/volcengine-responses.d.ts +0 -64
- package/dist/types/llm/transports/zhipu-media.d.ts +0 -82
- package/dist/types/llm/transports/zhipu-tool-api.d.ts +0 -35
- package/dist/types/runtime/infra/project-plan-store.d.ts +0 -27
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session & Thread handlers — uses SessionLocator for all path resolution.
|
|
3
|
+
*
|
|
4
|
+
* Handles: thread.create, thread.list, session.create, session.resolve,
|
|
5
|
+
* session.list, session.get, session.getMessages, session.update,
|
|
6
|
+
* session.delete, session.deleteAll, session.archive, session.resume,
|
|
7
|
+
* session.getInfo, session.switchProject, session.getState
|
|
8
|
+
*
|
|
9
|
+
* Key invariant: every session operation resolves storage path via projectId,
|
|
10
|
+
* never via the global `currentProjectRoot`. Sessions are immutably bound
|
|
11
|
+
* to a project at creation time.
|
|
12
|
+
*/
|
|
13
|
+
export declare function handleThreadCreate(this: any, msg: any): void;
|
|
14
|
+
export declare function handleThreadList(this: any, msg: any): Promise<void>;
|
|
15
|
+
export declare function handleSessionCreate(this: any, msg: any): Promise<void>;
|
|
16
|
+
export declare function handleSessionResolve(this: any, msg: any): Promise<void>;
|
|
17
|
+
export declare function handleSessionList(this: any, msg: any): Promise<void>;
|
|
18
|
+
export declare function handleSessionGet(this: any, msg: any): Promise<void>;
|
|
19
|
+
export declare function handleSessionGetMessages(this: any, msg: any): Promise<void>;
|
|
20
|
+
export declare function handleSessionUpdate(this: any, msg: any): Promise<void>;
|
|
21
|
+
export declare function handleSessionDelete(this: any, msg: any): Promise<void>;
|
|
22
|
+
export declare function handleSessionDeleteAll(this: any, msg: any): Promise<void>;
|
|
23
|
+
export declare function handleSessionArchive(this: any, msg: any): Promise<void>;
|
|
24
|
+
export declare function handleSessionResume(this: any, msg: any): Promise<void>;
|
|
25
|
+
export declare function handleSessionGetInfo(this: any, msg: any): void;
|
|
26
|
+
export declare function handleSessionSwitchProject(this: any, msg: any): void;
|
|
27
|
+
export declare function handleSessionGetState(this: any, msg: any): void;
|
|
28
|
+
/**
|
|
29
|
+
* `session.focus` — Desktop UI reports which session is currently focused.
|
|
30
|
+
* Agent switches active project/cwd to the session's owning project.
|
|
31
|
+
*/
|
|
32
|
+
export declare function handleSessionFocus(this: any, msg: any): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* `session.moveToProject` — Move a session from one project to another.
|
|
35
|
+
* Physically copies session files, updates metadata.projectId, then removes the source.
|
|
36
|
+
* Emits session:updated notification.
|
|
37
|
+
*/
|
|
38
|
+
export declare function handleSessionMoveToProject(this: any, msg: any): Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings RPC handlers — model management system.
|
|
3
|
+
*
|
|
4
|
+
* All model pool operations go through ModelRegistry (single source of truth).
|
|
5
|
+
* Handles: settings.listSupportedProviders, settings.addKey, settings.removeKey,
|
|
6
|
+
* settings.toggleKey, settings.listModels, settings.setActiveModel,
|
|
7
|
+
* settings.getActiveModel, settings.getOverview, settings.refreshModels
|
|
8
|
+
*/
|
|
9
|
+
import type { AgentRpcRequest } from "../../protocol/wire/agent-rpc.js";
|
|
10
|
+
export declare function handleSettingsListProviders(this: any, msg: AgentRpcRequest): void;
|
|
11
|
+
export declare function handleSettingsAddKey(this: any, msg: AgentRpcRequest): Promise<void>;
|
|
12
|
+
export declare function handleSettingsRemoveKey(this: any, msg: AgentRpcRequest): void;
|
|
13
|
+
export declare function handleSettingsToggleKey(this: any, msg: AgentRpcRequest): void;
|
|
14
|
+
export declare function handleSettingsToggleModel(this: any, msg: AgentRpcRequest): void;
|
|
15
|
+
export declare function handleSettingsListModels(this: any, msg: AgentRpcRequest): void;
|
|
16
|
+
export declare function handleSettingsSetActiveModel(this: any, msg: AgentRpcRequest): void;
|
|
17
|
+
export declare function handleSettingsGetActiveModel(this: any, msg: AgentRpcRequest): void;
|
|
18
|
+
export declare function handleSettingsGetOverview(this: any, msg: AgentRpcRequest): void;
|
|
19
|
+
export declare function handleSettingsRefreshModels(this: any, msg: AgentRpcRequest): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Validate a provider API key by making a minimal /models list request.
|
|
22
|
+
* Does not store the key; just verifies connectivity + auth.
|
|
23
|
+
*/
|
|
24
|
+
export declare function handleSettingsValidateKey(this: any, msg: AgentRpcRequest): Promise<void>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skills management handlers — extracted from StdioServer.
|
|
3
|
+
* Handles: skills.list, skills.activate, skills.deactivate, skills.delete,
|
|
4
|
+
* skills.promote, skills.stats, skills.pin, skills.unpin,
|
|
5
|
+
* skills.curator, skills.lifecycle
|
|
6
|
+
*/
|
|
7
|
+
export declare function extractSkillMeta(skillMdPath: string): {
|
|
8
|
+
version?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function handleSkillsList(this: any, msg: any): void;
|
|
12
|
+
export declare function handleSkillsActivate(this: any, msg: any): void;
|
|
13
|
+
export declare function handleSkillsDeactivate(this: any, msg: any): void;
|
|
14
|
+
export declare function handleSkillsDelete(this: any, msg: any): void;
|
|
15
|
+
export declare function handleSkillsPromote(this: any, msg: any): void;
|
|
16
|
+
export declare function handleSkillsStats(this: any, msg: any): void;
|
|
17
|
+
export declare function handleSkillsPin(this: any, msg: any): void;
|
|
18
|
+
export declare function handleSkillsUnpin(this: any, msg: any): void;
|
|
19
|
+
export declare function handleSkillsCurator(this: any, msg: any): void;
|
|
20
|
+
export declare function handleSkillsLifecycle(this: any, msg: any): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solo mode handlers — extracted from StdioServer.
|
|
3
|
+
* Handles: solo.start, solo.status, solo.cancel, solo.select,
|
|
4
|
+
* solo.list, solo.delete, solo.message, solo.evaluate
|
|
5
|
+
*/
|
|
6
|
+
import { SoloEvaluator } from "../../orchestration/solo-evaluator.js";
|
|
7
|
+
export declare function ensureSoloEvaluator(this: any): SoloEvaluator;
|
|
8
|
+
export declare function handleSoloStart(this: any, msg: any): Promise<void>;
|
|
9
|
+
export declare function handleSoloStatus(this: any, msg: any): Promise<void>;
|
|
10
|
+
export declare function handleSoloCancel(this: any, msg: any): Promise<void>;
|
|
11
|
+
export declare function handleSoloSelect(this: any, msg: any): Promise<void>;
|
|
12
|
+
export declare function handleSoloList(this: any, msg: any): void;
|
|
13
|
+
export declare function handleSoloDelete(this: any, msg: any): Promise<void>;
|
|
14
|
+
export declare function handleSoloMessage(this: any, msg: any): Promise<void>;
|
|
15
|
+
export declare function handleSoloEvaluate(this: any, msg: any): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turn execution handlers — extracted from StdioServer.
|
|
3
|
+
* Handles: thread.turn, agent.abort, tool.approval.response, thread.user_response
|
|
4
|
+
*/
|
|
5
|
+
import type { ChatMessage } from "../../agent/types.js";
|
|
6
|
+
import type { AgentRpcRequest } from "../../protocol/wire/agent-rpc.js";
|
|
7
|
+
import type { LLMTransport } from "@qlogic/provider-core";
|
|
8
|
+
export declare function handleAbort(this: any, msg: AgentRpcRequest): void;
|
|
9
|
+
export declare function handleApprovalResponse(this: any, msg: AgentRpcRequest): void;
|
|
10
|
+
export declare function handleUserResponse(this: any, msg: AgentRpcRequest): void;
|
|
11
|
+
export declare function handleTurn(this: any, msg: AgentRpcRequest): Promise<void>;
|
|
12
|
+
export declare const SUGGESTION_PROMPT: string;
|
|
13
|
+
/**
|
|
14
|
+
* Generate follow-up suggestions after a turn completes.
|
|
15
|
+
* Fire-and-forget — failures are silently logged. Non-blocking.
|
|
16
|
+
*/
|
|
17
|
+
export declare function generateSuggestions(this: any, turnId: string, messages: ChatMessage[], transport: LLMTransport, apiKey: string, model: string): Promise<void>;
|
package/dist/types/cli/main.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* qlogicagent [--verbose] [--acp]
|
|
10
10
|
*
|
|
11
11
|
* Flags:
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* verbose Enable debug logging to stderr
|
|
13
|
+
* acp Enable ACP (Agent-Client Protocol) server alongside legacy protocol
|
|
14
14
|
*/
|
|
15
15
|
export {};
|
|
@@ -17,6 +17,8 @@ export interface StdioServerConfig {
|
|
|
17
17
|
export declare class StdioServer {
|
|
18
18
|
private running;
|
|
19
19
|
private activeTurn;
|
|
20
|
+
/** Resolves when the active turn fully completes (including post-abort flush). */
|
|
21
|
+
private turnDone;
|
|
20
22
|
private verbose;
|
|
21
23
|
private transport;
|
|
22
24
|
private registry;
|
|
@@ -25,8 +27,6 @@ export declare class StdioServer {
|
|
|
25
27
|
private lastLlmConfigKey;
|
|
26
28
|
private currentSessionId;
|
|
27
29
|
private currentTurnId;
|
|
28
|
-
/** Project root for project-local session/memory persistence. */
|
|
29
|
-
private currentProjectRoot;
|
|
30
30
|
private currentHooks;
|
|
31
31
|
private mcpManager;
|
|
32
32
|
private mcpReady;
|
|
@@ -83,6 +83,17 @@ export declare class StdioServer {
|
|
|
83
83
|
/** Idle dream timer — fires after configurable idle period to trigger memory consolidation. */
|
|
84
84
|
private idleDreamTimer;
|
|
85
85
|
constructor(config: StdioServerConfig);
|
|
86
|
+
/**
|
|
87
|
+
* Get the active project workspace directory.
|
|
88
|
+
* Reads from projectStore (single source of truth).
|
|
89
|
+
*/
|
|
90
|
+
private getActiveProjectRoot;
|
|
91
|
+
/**
|
|
92
|
+
* Single entry point for updating the active workdir.
|
|
93
|
+
* Centralizes all side-effects (bootstrap workdir, media persistence, etc.).
|
|
94
|
+
* Uses projectStore as the source of truth — no private field cache.
|
|
95
|
+
*/
|
|
96
|
+
private setActiveWorkdir;
|
|
86
97
|
start(): void;
|
|
87
98
|
stop(): void;
|
|
88
99
|
private readonly methodHandlers;
|
|
@@ -99,118 +110,140 @@ export declare class StdioServer {
|
|
|
99
110
|
* Called from both legacy handleInitialize and ACP acpHandleInitialize.
|
|
100
111
|
*/
|
|
101
112
|
private ensureDefaultProject;
|
|
113
|
+
private ensureDefaultProjectDir;
|
|
102
114
|
/**
|
|
103
115
|
* `thread.create` — create a new thread (session container).
|
|
104
116
|
* Maps threadId → sessionId for the underlying session system.
|
|
105
117
|
*/
|
|
106
|
-
private handleThreadCreate;
|
|
107
118
|
/**
|
|
108
119
|
* `thread.list` — list available threads. Delegates to session listing.
|
|
109
120
|
*/
|
|
110
|
-
|
|
121
|
+
/**
|
|
122
|
+
* Resolve session for an inbound message.
|
|
123
|
+
* For desktop: chatId IS the sessionId — look it up directly.
|
|
124
|
+
* For group: look up by groupKey pattern.
|
|
125
|
+
* If not found, create a new session and return it.
|
|
126
|
+
*/
|
|
111
127
|
private handlePing;
|
|
112
|
-
private handleAbort;
|
|
113
|
-
private handleApprovalResponse;
|
|
114
|
-
private handleUserResponse;
|
|
115
|
-
private handleSessionResume;
|
|
116
|
-
private handleTurn;
|
|
117
128
|
private static readonly SUGGESTION_PROMPT;
|
|
129
|
+
/**
|
|
130
|
+
* Atomically resolve transport + model + apiKey for a given ModelPurpose.
|
|
131
|
+
* If the resolved provider matches `this.currentProvider`, reuses cached transport.
|
|
132
|
+
* Otherwise creates a one-shot client. Returns null if purpose is unresolvable.
|
|
133
|
+
* This ensures side-ops always use fresh model from registry — never stale cache.
|
|
134
|
+
*/
|
|
135
|
+
private resolveClientForPurpose;
|
|
118
136
|
/**
|
|
119
137
|
* Generate follow-up suggestions after a turn completes.
|
|
120
138
|
* Fire-and-forget — failures are silently logged. Non-blocking.
|
|
139
|
+
* CC parity: suggestions use the SAME model as main (prompt cache sharing).
|
|
121
140
|
*/
|
|
122
141
|
private generateSuggestions;
|
|
123
|
-
|
|
142
|
+
/**
|
|
143
|
+
* Create a soul generator function that uses small model LLM.
|
|
144
|
+
* Used by pet.hatch to generate personalized name/personality/catchphrase.
|
|
145
|
+
*/
|
|
146
|
+
createPetSoulGenerator(): ((rarity: string, stats: any) => Promise<{
|
|
147
|
+
name: string;
|
|
148
|
+
personality: string;
|
|
149
|
+
catchphrase: string;
|
|
150
|
+
}>) | undefined;
|
|
151
|
+
/**
|
|
152
|
+
* P4 Forge: Analyze uploaded image via Vision model (design §14.3 step 1).
|
|
153
|
+
*/
|
|
154
|
+
forgeAnalyzeImage(imageBase64: string, hint?: string): Promise<string>;
|
|
155
|
+
/**
|
|
156
|
+
* P4 Forge: Generate a single state SVG via LLM code generation (design §14.3 Option C).
|
|
157
|
+
*/
|
|
158
|
+
forgeGenerateSVG(characterDesc: string, state: string): Promise<string>;
|
|
159
|
+
/**
|
|
160
|
+
* Award XP to pet on events (fire-and-forget).
|
|
161
|
+
*/
|
|
162
|
+
private petAwardXp;
|
|
163
|
+
/** Check if the pet system is active (soul hatched). */
|
|
164
|
+
private isPetActive;
|
|
165
|
+
/** Pending confirm requests — confirmId → resolve callback. */
|
|
166
|
+
private pendingConfirms;
|
|
167
|
+
/**
|
|
168
|
+
* Request user confirmation for a tool call via the pet overlay.
|
|
169
|
+
* Returns true if approved, false if denied or timed out.
|
|
170
|
+
*/
|
|
171
|
+
requestPetConfirm(toolName: string, description: string, risk: "low" | "medium" | "high", timeoutMs?: number): Promise<boolean>;
|
|
172
|
+
private handlePetConfirmResponse;
|
|
173
|
+
/**
|
|
174
|
+
* Generate pet reaction after turn (P3: LLM-enhanced, P0: template fallback).
|
|
175
|
+
*/
|
|
176
|
+
private petReactionAfterTurn;
|
|
124
177
|
private resolveAgent;
|
|
125
178
|
/**
|
|
126
|
-
* Load LLM
|
|
179
|
+
* Load LLM config from ModelRegistry (textGeneration binding).
|
|
127
180
|
* Returns provider/model/apiKey if found, undefined otherwise.
|
|
128
181
|
*/
|
|
129
|
-
private loadSettingsSync;
|
|
130
182
|
/**
|
|
131
183
|
* `session.getInfo` — Return session metadata, filesystem paths, and usage summary.
|
|
132
184
|
* Aligns with Codex/Copilot session introspection capability.
|
|
133
185
|
*/
|
|
134
|
-
private handleSessionGetInfo;
|
|
135
186
|
/**
|
|
136
187
|
* `memory.list` — Enumerate available memory sources (memdir + local sqlite).
|
|
137
188
|
*/
|
|
138
|
-
private handleMemoryList;
|
|
139
189
|
/**
|
|
140
190
|
* `memory.read` — Read memory content from memdir (INDEX.md or topic file).
|
|
141
191
|
*/
|
|
142
|
-
private handleMemoryRead;
|
|
143
192
|
/**
|
|
144
193
|
* `memory.write` — Write memory content to memdir (INDEX.md or topic file).
|
|
145
194
|
*/
|
|
146
|
-
private handleMemoryWrite;
|
|
147
195
|
/**
|
|
148
196
|
* `tools.list` — Return available tool definitions (local + MCP + plugin).
|
|
149
197
|
* Supports optional category filter.
|
|
150
198
|
*/
|
|
151
|
-
private handleToolsList;
|
|
152
199
|
/**
|
|
153
200
|
* `media.listModels` — List available media generation models.
|
|
154
201
|
* Desktop app uses this to populate the model selector per category.
|
|
155
202
|
*/
|
|
156
|
-
private handleMediaListModels;
|
|
157
203
|
/**
|
|
158
204
|
* `media.cancel` — Cancel an in-progress media generation task.
|
|
159
205
|
* Delegates to the provider's native cancellation API (e.g. Volcengine DELETE task).
|
|
160
206
|
*/
|
|
161
|
-
private handleMediaCancel;
|
|
162
207
|
/**
|
|
163
208
|
* `media.status` — Query the status of a media generation task.
|
|
164
209
|
* Returns provider-specific task status (e.g. queuing, running, succeeded, failed).
|
|
165
210
|
*/
|
|
166
|
-
private handleMediaStatus;
|
|
167
211
|
/** Resolve media API key for a provider from the current session config. */
|
|
168
|
-
private resolveMediaApiKey;
|
|
169
212
|
/**
|
|
170
213
|
* `provider.list` — List all available LLM providers grouped by logical family.
|
|
171
214
|
* Returns protocol variants so callers can pick which transport to use.
|
|
172
215
|
*/
|
|
173
|
-
private handleProviderList;
|
|
174
216
|
/**
|
|
175
217
|
* `config.get` — Read current agent runtime configuration.
|
|
176
218
|
* Returns merged user-level + project-level settings.
|
|
177
219
|
*/
|
|
178
|
-
private handleConfigGet;
|
|
179
220
|
/**
|
|
180
221
|
* `config.update` — Update agent runtime configuration (merges into settings.json).
|
|
181
222
|
*/
|
|
182
|
-
private handleConfigUpdate;
|
|
183
223
|
/**
|
|
184
224
|
* `config.tunables` — Return all tunable default values with their current overrides.
|
|
185
225
|
*/
|
|
186
|
-
private handleConfigTunables;
|
|
187
226
|
/**
|
|
188
227
|
* `config.updateTunable` — Write a single tunable override into settings.json.tunables.
|
|
189
228
|
* Params: { key: string, value: number | boolean | string }
|
|
190
229
|
* Only keys that exist in TunableDefaults are accepted (validation).
|
|
191
230
|
*/
|
|
192
|
-
private handleConfigUpdateTunable;
|
|
193
231
|
/**
|
|
194
232
|
* `todos.list` — Query current todo items and summary.
|
|
195
233
|
* Invokes the registered todo tool's list action.
|
|
196
234
|
*/
|
|
197
|
-
private handleTodosList;
|
|
198
235
|
/**
|
|
199
236
|
* `memory.search` — Search memory via local SQLite provider or memdir keyword fallback.
|
|
200
237
|
*/
|
|
201
|
-
private handleMemorySearch;
|
|
202
238
|
/**
|
|
203
239
|
* `memory.delete` — Remove memory entry from memdir (INDEX.md line) or local store (by ID).
|
|
204
240
|
*/
|
|
205
|
-
private handleMemoryDelete;
|
|
206
241
|
/**
|
|
207
242
|
* `tasks.list` — Query running/completed infrastructure tasks.
|
|
208
243
|
*/
|
|
209
|
-
private handleTasksList;
|
|
210
244
|
/**
|
|
211
245
|
* `tasks.cancel` — Cancel a running task by ID.
|
|
212
246
|
*/
|
|
213
|
-
private handleTasksCancel;
|
|
214
247
|
/** Map process handle state → agents.status notification status. */
|
|
215
248
|
private static readonly STATE_TO_STATUS;
|
|
216
249
|
/** Emit an `agents.status` notification when a child process state changes. */
|
|
@@ -224,75 +257,39 @@ export declare class StdioServer {
|
|
|
224
257
|
/** Ensure agent config store is loaded. */
|
|
225
258
|
private ensureAgentConfigStore;
|
|
226
259
|
/** `agents.scan` — Scan for installed ACP agent CLIs. */
|
|
227
|
-
private handleAgentsScan;
|
|
228
260
|
/** `agents.list` — Return cached agent descriptors. */
|
|
229
|
-
private handleAgentsList;
|
|
230
261
|
/** `agents.config` — Register / unregister / update custom agents. */
|
|
231
|
-
private handleAgentsConfig;
|
|
232
262
|
/** `agents.setConfig` — Set per-agent LLM / environment / model ID config. */
|
|
233
|
-
private handleAgentsSetConfig;
|
|
234
263
|
/** `agents.getConfig` — Get per-agent configuration. */
|
|
235
|
-
private handleAgentsGetConfig;
|
|
236
264
|
/** `agents.removeConfig` — Remove per-agent configuration. */
|
|
237
|
-
private handleAgentsRemoveConfig;
|
|
238
265
|
/** `agents.setGateway` — Set global gateway proxy URL. */
|
|
239
|
-
private handleAgentsSetGateway;
|
|
240
|
-
private ensureSoloEvaluator;
|
|
241
266
|
/** `solo.start` — Start a Solo Mode PK session. */
|
|
242
|
-
private handleSoloStart;
|
|
243
267
|
/** `solo.status` — Query solo session status. */
|
|
244
|
-
private handleSoloStatus;
|
|
245
268
|
/** `solo.cancel` — Cancel a running solo session. */
|
|
246
|
-
private handleSoloCancel;
|
|
247
269
|
/** `solo.select` — Select winner and merge worktree. */
|
|
248
|
-
private handleSoloSelect;
|
|
249
|
-
private ensureProductOrchestrator;
|
|
250
270
|
/** Ensure ProductPlanner is initialized. */
|
|
251
|
-
private ensureProductPlanner;
|
|
252
271
|
/** `product.plan` — Start interactive planning with leader agent. */
|
|
253
|
-
private handleProductPlan;
|
|
254
272
|
/** `product.confirm` — User confirms the plan, transition to execution. */
|
|
255
|
-
private handleProductConfirm;
|
|
256
273
|
/** `product.message` — User sends message to leader (multi-turn planning or execution intervention). */
|
|
257
|
-
private handleProductMessage;
|
|
258
274
|
/** `product.create` — Create a new Product Mode session. */
|
|
259
|
-
private handleProductCreate;
|
|
260
275
|
/** `product.resume` — Resume a paused product. */
|
|
261
|
-
private handleProductResume;
|
|
262
276
|
/** `product.pause` — Pause a running product. */
|
|
263
|
-
private handleProductPause;
|
|
264
277
|
/** `product.checkpoint` — Manual checkpoint. */
|
|
265
|
-
private handleProductCheckpoint;
|
|
266
278
|
/** `product.status` — Query product status. */
|
|
267
|
-
private handleProductStatus;
|
|
268
279
|
/** `product.list` — List all products. */
|
|
269
|
-
private handleProductList;
|
|
270
280
|
/** `agents.getGateway` — Get the current global gateway proxy URL. */
|
|
271
|
-
private handleAgentsGetGateway;
|
|
272
281
|
/** `agents.listConfigured` — List agents that have persisted configuration. */
|
|
273
|
-
private handleAgentsListConfigured;
|
|
274
282
|
/** `agents.processes` — List all active child agent processes from solo/product PMs. */
|
|
275
|
-
private handleAgentsProcesses;
|
|
276
283
|
/** `agents.kill` — Kill a child agent process by memberId. */
|
|
277
|
-
private handleAgentsKill;
|
|
278
284
|
/** `agents.getLog` — Read stderr log for a specific agent. */
|
|
279
|
-
private handleAgentsGetLog;
|
|
280
285
|
/** `agents.testConnection` — Spawn an agent with a short timeout to verify connectivity. */
|
|
281
|
-
private handleAgentsTestConnection;
|
|
282
286
|
/** `solo.list` — List all solo sessions. */
|
|
283
|
-
private handleSoloList;
|
|
284
287
|
/** `solo.delete` — Delete a solo session and clean up resources. */
|
|
285
|
-
private handleSoloDelete;
|
|
286
288
|
/** `solo.message` — Send follow-up message to a specific agent in solo session. */
|
|
287
|
-
private handleSoloMessage;
|
|
288
289
|
/** `solo.evaluate` — User-triggered evaluation of solo session results. */
|
|
289
|
-
private handleSoloEvaluate;
|
|
290
290
|
/** `product.delete` — Delete a product session and clean up resources. */
|
|
291
|
-
private handleProductDelete;
|
|
292
291
|
/** `product.cancel` — Cancel a running product. */
|
|
293
|
-
private handleProductCancel;
|
|
294
292
|
/** `product.rollback` — Rollback a product to a checkpoint. */
|
|
295
|
-
private handleProductRollback;
|
|
296
293
|
private sendResponse;
|
|
297
294
|
private sendNotification;
|
|
298
295
|
private writeStdout;
|
|
@@ -345,43 +342,4 @@ export declare class StdioServer {
|
|
|
345
342
|
private acpHandleProductRollback;
|
|
346
343
|
private acpHandleProductSubscribe;
|
|
347
344
|
private acpHandleTeamDelegate;
|
|
348
|
-
private handleProjectCreate;
|
|
349
|
-
private handleProjectList;
|
|
350
|
-
private handleProjectDelete;
|
|
351
|
-
private handleProjectRename;
|
|
352
|
-
private handleProjectArchive;
|
|
353
|
-
private handleProjectUnarchive;
|
|
354
|
-
private handleProjectArchiveByGroup;
|
|
355
|
-
private handleSessionSwitchProject;
|
|
356
|
-
private handleSessionGetState;
|
|
357
|
-
private getProjectInstructionsStore;
|
|
358
|
-
private handleInstructionsList;
|
|
359
|
-
private handleInstructionsRead;
|
|
360
|
-
private handleInstructionsWrite;
|
|
361
|
-
private handleInstructionsDelete;
|
|
362
|
-
private handleSkillsList;
|
|
363
|
-
/** Extract version and description from a SKILL.md frontmatter. */
|
|
364
|
-
private extractSkillMeta;
|
|
365
|
-
private handleSkillsActivate;
|
|
366
|
-
private handleSkillsDeactivate;
|
|
367
|
-
/**
|
|
368
|
-
* `skills.delete` — Permanently remove a skill from project or global scope.
|
|
369
|
-
* Params: { name: string, scope?: "project" | "global" }
|
|
370
|
-
* Default scope: "project"
|
|
371
|
-
*/
|
|
372
|
-
private handleSkillsDelete;
|
|
373
|
-
/**
|
|
374
|
-
* `skills.promote` — Copy a project-level skill to global (user-level).
|
|
375
|
-
* Params: { name: string, keepLocal?: boolean }
|
|
376
|
-
* By default removes the project-level copy after promoting.
|
|
377
|
-
*/
|
|
378
|
-
private handleSkillsPromote;
|
|
379
|
-
private handleSkillsStats;
|
|
380
|
-
private handleSkillsPin;
|
|
381
|
-
private handleSkillsUnpin;
|
|
382
|
-
private handleSkillsCurator;
|
|
383
|
-
private handleSkillsLifecycle;
|
|
384
|
-
private getProjectPlanStore;
|
|
385
|
-
private handlePlansList;
|
|
386
|
-
private handlePlansGet;
|
|
387
345
|
}
|
|
@@ -3,9 +3,9 @@ import { type TaskToolHooks } from "../skills/tools/task-tool.js";
|
|
|
3
3
|
import { type ExecProgress } from "../skills/tools/exec-tool.js";
|
|
4
4
|
import type { AgentLogger } from "../agent/types.js";
|
|
5
5
|
import { type AskUserQuestion } from "../skills/tools/ask-user-tool.js";
|
|
6
|
-
import type { MediaClient } from "
|
|
7
|
-
import type { MediaCapability } from "
|
|
8
|
-
import type { ProviderToolAPI } from "
|
|
6
|
+
import type { MediaClient } from "@qlogic/provider-core";
|
|
7
|
+
import type { MediaCapability } from "@qlogic/provider-core";
|
|
8
|
+
import type { ProviderToolAPI } from "@qlogic/provider-core";
|
|
9
9
|
/** Enable or disable group security mode (blocks sensitive file access). */
|
|
10
10
|
export declare function setGroupSecurityMode(enabled: boolean): void;
|
|
11
11
|
/**
|
|
@@ -14,6 +14,7 @@ export declare function setGroupSecurityMode(enabled: boolean): void;
|
|
|
14
14
|
* falling back to SearXNG. Called from stdio-server per session.
|
|
15
15
|
*/
|
|
16
16
|
export declare function setProviderToolAPI(api: ProviderToolAPI | undefined): void;
|
|
17
|
+
export declare function createProviderToolAPIForSession(providerId: string | undefined, apiKey: string | undefined): ProviderToolAPI | undefined;
|
|
17
18
|
/** Set callback invoked after LLM-driven project switch. */
|
|
18
19
|
export declare function setProjectSwitchCallback(cb: ((project: {
|
|
19
20
|
id: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type { AgentConfig } from "./config/config.js";
|
|
|
10
10
|
export type { Transport } from "./cli/transport.js";
|
|
11
11
|
export { StdioTransport } from "./cli/transport.js";
|
|
12
12
|
export { StdioServer, type StdioServerConfig } from "./cli/stdio-server.js";
|
|
13
|
-
export { ProviderRegistry, createLLMClient, } from "
|
|
14
|
-
export type { LLMTransport, LLMRequest, LLMChunk } from "
|
|
13
|
+
export { ProviderRegistry, createLLMClient, } from "@qlogic/provider-core";
|
|
14
|
+
export type { LLMTransport, LLMRequest, LLMChunk } from "@qlogic/provider-core";
|
|
15
15
|
export { createHookRegistry } from "./runtime/hooks/hook-registry.js";
|
|
16
16
|
export { buildSkillInstruction, } from "./orchestration/index.js";
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* LLM Provider layer — public API surface.
|
|
3
|
-
*
|
|
4
|
-
* Provides: ProviderDef + LLMTransport + ProviderRegistry + LLMClient factory
|
|
5
|
-
*/
|
|
6
|
-
export type { ProviderDef, ModelInfo, TransportType, AuthType, MediaCapability, MediaCapabilities, VideoCapabilities, ImageCapabilities, MusicCapabilities, TtsCapabilities, ThreeDCapabilities, SttCapabilities, EmbeddingCapabilities, VideoUnderstandingCapabilities, ImageUnderstandingCapabilities, VoiceCloneCapabilities, RerankCapabilities, DocumentParsingCapabilities, RealtimeAudioCapabilities, VideoOperation, ImageOperation, MusicOperation, TtsOperation, ThreeDOperation } from "./provider-def.js";
|
|
7
|
-
export type { LLMTransport, LLMRequest, LLMChunk, AccumulatedToolCall, } from "./transport.js";
|
|
8
|
-
export { accumulateToolCalls } from "./transport.js";
|
|
9
|
-
export type { MediaTransport, MediaRequest, MediaResult, MediaType } from "./media-transport.js";
|
|
10
|
-
export { MediaClient, type MediaClientConfig, type ResolvedMediaModel } from "./media-client.js";
|
|
11
|
-
export { ProviderRegistry } from "./provider-registry.js";
|
|
12
|
-
export { BUILTIN_PROVIDERS } from "./builtin-providers.js";
|
|
13
|
-
export { ModelCatalog } from "./model-catalog.js";
|
|
14
|
-
export type { LLMClientConfig, LLMClient } from "./llm-client.js";
|
|
15
|
-
export { createLLMClient } from "./llm-client.js";
|
|
16
|
-
export { OpenAIChatTransport } from "./transports/openai-chat.js";
|
|
17
|
-
export { AnthropicMessagesTransport } from "./transports/anthropic-messages.js";
|
|
18
|
-
export { GeminiGenerateContentTransport } from "./transports/gemini-generatecontent.js";
|
|
19
|
-
export { VolcengineMediaTransport } from "./transports/volcengine-media.js";
|
|
20
|
-
export { OpenAIMediaTransport } from "./transports/openai-media.js";
|
|
21
|
-
export { MiniMaxMediaTransport } from "./transports/minimax-media.js";
|
|
22
|
-
export { GeminiMediaTransport, type GeminiMediaConfig } from "./transports/gemini-media.js";
|
|
23
|
-
export { GeminiLyriaRealtimeSession, generateRealtimeMusic } from "./transports/gemini-lyria-realtime.js";
|
|
24
|
-
export type { WeightedPrompt, MusicGenerationConfig, MusicScale, MusicGenerationMode, LyriaRealtimeConfig, LyriaRealtimeSessionOptions, AudioChunk } from "./transports/gemini-lyria-realtime.js";
|
|
25
|
-
export { RealtimeTransport } from "./transports/realtime-transport.js";
|
|
26
|
-
export type { RealtimeConfig, RealtimeTool, RealtimeEvent, RealtimeUsage } from "./transports/realtime-transport.js";
|
|
27
|
-
export { GeminiCacheAPI } from "./transports/gemini-cache-api.js";
|
|
28
|
-
export type { GeminiCachedContent, GeminiCacheCreateOptions } from "./transports/gemini-cache-api.js";
|
|
29
|
-
export { GeminiFileAPI } from "./transports/gemini-file-api.js";
|
|
30
|
-
export type { GeminiFileInfo } from "./transports/gemini-file-api.js";
|
|
31
|
-
export { isDebugTransportEnabled, createDebugTransport } from "./debug-transport.js";
|
|
1
|
+
export * from "@qlogic/provider-core";
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
*
|
|
24
24
|
* ```ts
|
|
25
25
|
* import { cascadeWebSearch } from "./tool-cascade.js";
|
|
26
|
-
* import { ZhipuToolAPI } from "
|
|
26
|
+
* import { ZhipuToolAPI } from "@qlogic/provider-core/transports/zhipu-tool-api";
|
|
27
27
|
*
|
|
28
28
|
* const providerApi = new ZhipuToolAPI({ baseUrl, apiKey });
|
|
29
29
|
* const cascadedSearch = cascadeWebSearch(providerApi, fallbackSearchFn);
|
|
30
30
|
* const tool = createWebSearchTool({ search: cascadedSearch });
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
import type { ProviderToolAPI } from "
|
|
33
|
+
import type { ProviderToolAPI } from "@qlogic/provider-core";
|
|
34
34
|
import type { WebSearchToolDeps } from "../skills/tools/web-search-tool.js";
|
|
35
35
|
/**
|
|
36
36
|
* Cascade web search: provider-native search → host fallback.
|