qlogicagent 2.15.2 → 2.15.4
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 +11 -9
- package/dist/agent.js +16 -10
- package/dist/cli.js +323 -315
- package/dist/index.js +322 -314
- package/dist/types/agent/tool-loop/loop-helpers.d.ts +8 -0
- package/dist/types/cli/handlers/control-handler.d.ts +3 -0
- package/dist/types/cli/stdio-server.d.ts +4 -0
- package/dist/types/cli/tool-registry-adapter.d.ts +0 -1
- package/dist/types/protocol/methods.d.ts +0 -2
- package/dist/types/skills/tools/shell/exec-audit-log.d.ts +24 -0
- package/package.json +1 -1
- package/dist/types/agent/tool-access.d.ts +0 -1
- package/dist/types/agent/tool-loop/single-round.d.ts +0 -2
- package/dist/types/protocol/index.d.ts +0 -7
- package/dist/types/protocol/wire/provider-runtime-io.d.ts +0 -20
- package/dist/types/runtime/execution/index.d.ts +0 -7
- package/dist/types/runtime/hooks/index.d.ts +0 -4
- package/dist/types/runtime/index.d.ts +0 -5
- package/dist/types/runtime/infra/index.d.ts +0 -19
- package/dist/types/runtime/infra/mcp-bridge.d.ts +0 -166
- package/dist/types/runtime/infra/model-id-translator.d.ts +0 -22
- package/dist/types/runtime/infra/secure-storage.d.ts +0 -81
- package/dist/types/runtime/infra/skill-injector.d.ts +0 -59
- package/dist/types/runtime/prompt/index.d.ts +0 -5
- package/dist/types/runtime/sandbox/index.d.ts +0 -2
- package/dist/types/runtime/session/index.d.ts +0 -4
- package/dist/types/skills/index.d.ts +0 -6
- package/dist/types/skills/mcp/index.d.ts +0 -1
- package/dist/types/skills/permissions/index.d.ts +0 -13
- package/dist/types/skills/plugins/index.d.ts +0 -2
- package/dist/types/skills/tools/brief-tool.d.ts +0 -74
- package/dist/types/skills/tools/browser-tool.d.ts +0 -114
- package/dist/types/skills/tools/plan-mode-tool.d.ts +0 -98
- package/dist/types/skills/tools/structured-output-tool.d.ts +0 -116
- package/dist/types/transport/index.d.ts +0 -7
|
@@ -24,4 +24,12 @@ export declare function synthesizeFallbackContent(messages: ChatMessage[], log:
|
|
|
24
24
|
* present, is preferred over this by the caller.
|
|
25
25
|
*/
|
|
26
26
|
export declare function buildRepeatedToolFailureStopContent(messages: ChatMessage[], failedRounds: number): string;
|
|
27
|
+
/**
|
|
28
|
+
* Self-correction nudge for the repeated-tool-failure recovery. Instead of killing the turn after N
|
|
29
|
+
* consecutive all-failed rounds, surface the last command + error and tell the model to consult the
|
|
30
|
+
* tool's own help and stop repeating the failing command — the same Help-First habit the skills ask
|
|
31
|
+
* for. Many CLIs (e.g. OfficeCLI) print a "run <tool> help" hint the model can act on; it just needs
|
|
32
|
+
* the error put in front of it once. Returns null when there is no tool error to correct from.
|
|
33
|
+
*/
|
|
34
|
+
export declare function buildToolFailureCorrectionNudge(messages: ChatMessage[]): ChatMessage | null;
|
|
27
35
|
export declare function summarizeToolInput(rawArgs: string): string | undefined;
|
|
@@ -15,6 +15,9 @@ export interface ControlHandlerHost {
|
|
|
15
15
|
sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
|
|
16
16
|
sendNotification<M extends keyof NotificationMethodMap>(method: M, params: NotificationMethodMap[M]): void;
|
|
17
17
|
ensureDefaultProject(): void;
|
|
18
|
+
/** Actual registered RPC method names (single source of truth = the live registry), so the
|
|
19
|
+
* initialize capability declaration never drifts from what's really handled. */
|
|
20
|
+
getRegisteredMethods(): string[];
|
|
18
21
|
}
|
|
19
22
|
export declare function handleInitialize(this: ControlHandlerHost, msg: AgentRpcRequest): void;
|
|
20
23
|
export declare function handlePing(this: ControlHandlerHost, msg: AgentRpcRequest): void;
|
|
@@ -146,6 +146,10 @@ export declare class StdioServer {
|
|
|
146
146
|
start(): void;
|
|
147
147
|
stop(): Promise<void>;
|
|
148
148
|
private readonly methodHandlers;
|
|
149
|
+
/** Live registry method names — the single source of truth for the initialize capability
|
|
150
|
+
* declaration, so it never drifts from what's actually registered (replaces the
|
|
151
|
+
* previous hand-maintained method list, which had fallen ~100 methods behind). */
|
|
152
|
+
getRegisteredMethods(): string[];
|
|
149
153
|
private handleMessage;
|
|
150
154
|
/**
|
|
151
155
|
* Ensure a default project exists on first start.
|
|
@@ -2,4 +2,3 @@ import { type ToolRegistry } from "../skills/tools.js";
|
|
|
2
2
|
import type { ToolCatalog } from "../runtime/ports/index.js";
|
|
3
3
|
export type { ToolRegistry };
|
|
4
4
|
export declare function createToolCatalogFromRegistry(registry?: ToolRegistry): ToolCatalog;
|
|
5
|
-
export declare function createLegacyToolCatalog(): ToolCatalog;
|
|
@@ -1204,5 +1204,3 @@ export interface RpcMethodMap {
|
|
|
1204
1204
|
}
|
|
1205
1205
|
/** All known RPC method names. */
|
|
1206
1206
|
export type RpcMethod = keyof RpcMethodMap;
|
|
1207
|
-
/** All RPC method names as a runtime array (for capabilities declaration). */
|
|
1208
|
-
export declare const ALL_RPC_METHODS: RpcMethod[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Delete audit files whose mtime is older than this. */
|
|
2
|
+
export declare const EXEC_AUDIT_RETENTION_DAYS = 7;
|
|
3
|
+
/** When the audit dir exceeds this, delete oldest files until back under the cap. */
|
|
4
|
+
export declare const EXEC_AUDIT_MAX_TOTAL_BYTES: number;
|
|
5
|
+
/** Per-field (command / stdout / stderr) cap so one huge dump can't bloat a line. */
|
|
6
|
+
export declare const EXEC_AUDIT_MAX_FIELD_BYTES: number;
|
|
7
|
+
export interface ExecAuditEntry {
|
|
8
|
+
callId: string;
|
|
9
|
+
command: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
exitCode: number;
|
|
12
|
+
interrupted: boolean;
|
|
13
|
+
stdout: string;
|
|
14
|
+
stderr: string;
|
|
15
|
+
durationMs?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function execAuditDir(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Append one exec command + result to today's audit JSONL. Best-effort: never throws.
|
|
20
|
+
* `now` is injectable for tests.
|
|
21
|
+
*/
|
|
22
|
+
export declare function recordExecAudit(entry: ExecAuditEntry, now?: Date): void;
|
|
23
|
+
/** Delete files older than the retention window, then trim oldest-first until under the size cap. */
|
|
24
|
+
export declare function pruneAuditDir(dir: string, now?: Date): void;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../skills/tool-access.js";
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { AgentLogger, ChatMessage, LLMTransport, TurnEvent } from "../types.js";
|
|
2
|
-
export declare function executeSingleLLMRound(turnId: string, model: string, messages: ChatMessage[], apiKey: string, temperature: number | undefined, signal: AbortSignal | undefined, transport: LLMTransport, log: AgentLogger): AsyncGenerator<TurnEvent>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type ProviderRuntimeCredentialMap } from "./provider-runtime-core.js";
|
|
2
|
-
export declare function scrubProviderRuntimeStaticAuthJsonEntries(pathname: string): void;
|
|
3
|
-
type InMemoryAuthStorageBackendLike = {
|
|
4
|
-
withLock<T>(update: (current: string) => {
|
|
5
|
-
result: T;
|
|
6
|
-
next?: string;
|
|
7
|
-
}): T;
|
|
8
|
-
};
|
|
9
|
-
export declare function discoverProviderRuntimeAuthStorage<TAuthStorage>(params: {
|
|
10
|
-
agentDir: string;
|
|
11
|
-
AuthStorageLike: unknown;
|
|
12
|
-
credentials: ProviderRuntimeCredentialMap;
|
|
13
|
-
createBackend?: () => InMemoryAuthStorageBackendLike;
|
|
14
|
-
}): TAuthStorage;
|
|
15
|
-
export declare function createProviderRuntimeModelRegistry<TAuthStorage, TModelRegistry>(params: {
|
|
16
|
-
authStorage: TAuthStorage;
|
|
17
|
-
ModelRegistryLike: new (authStorage: TAuthStorage, modelsPath: string) => TModelRegistry;
|
|
18
|
-
agentDir: string;
|
|
19
|
-
}): TModelRegistry;
|
|
20
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { StreamingToolExecutor } from "./streaming-tool-executor.js";
|
|
2
|
-
export { createContentReplacementState, enforceToolResultBudget, maybePersistLargeToolResult, type ContentReplacementState, type PersistedToolResult, } from "./tool-result-storage.js";
|
|
3
|
-
export { resolveToolEligibility, type ToolEligibilityContext, type ToolEligibilityResult } from "./tool-eligibility.js";
|
|
4
|
-
export { runForkedAgent, type ForkedAgentParams, type CanUseToolFn } from "./forked-agent.js";
|
|
5
|
-
export { runDream, type DreamRunDeps } from "./dream-agent.js";
|
|
6
|
-
export { runDecayCycle, shouldTriggerDecay, markDecayComplete, type DecayCycleDeps, type DecayCycleResult, type DecayConfig } from "./memory-decay.js";
|
|
7
|
-
export { createProgressTracker, updateProgressFromUsage, recordToolUse, getProgressUpdate, type AgentProgress, } from "./progress-tracker.js";
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { createHookRegistry, type RuntimeLogger } from "./hook-registry.js";
|
|
2
|
-
export { registerMemoryHooks, createMemoryPrefetchState, type MemoryHooksDeps, type MemoryPrefetchState, MEMORY_PREFETCH_CONFIG, } from "./memory-hooks.js";
|
|
3
|
-
export { registerContextCompressionHook, compressMessages } from "./context-compression.js";
|
|
4
|
-
export { registerSkillRecallHooks, detectRetrospectiveTrigger, invalidateSkillRecallCache, type SkillRecallHooksDeps, SKILL_RECALL_CONFIG, } from "./skill-recall-hooks.js";
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { AGENT_DOT_DIR, getUserAgentHome, getUserCredentialsPath, getUserPluginsDir, getUserSkillsDir, getUserSettingsPath, getUserCacheDir, getUserDebugLogsDir, getUserPluginCacheDir, getUserMcpConfigPath, getUserMarketplaceConfigPath, getUserWorkflowsDir, getProjectAgentDir, getProjectWorkflowsDir, getProjectPluginsDir, getProjectSkillManifestPath, getProjectSettingsPath, getProjectInstructionsPath, getProjectRulesDir, getGitRootHooksDir, } from "./agent-paths.js";
|
|
2
|
-
export { getBudgetContinuationMessage } from "./token-budget.js";
|
|
3
|
-
export { type SecureStorage, saveApiKey, loadApiKey } from "./secure-storage.js";
|
|
4
|
-
export { ProjectInstructionsStore, type InstructionFile } from "./project-instructions-store.js";
|
|
5
|
-
export { createFileWatcher, FileWatcher } from "./file-watcher.js";
|
|
6
|
-
export { TaskStore } from "./task-runtime.js";
|
|
7
|
-
export { createWorktreeBackend } from "./worktree-backend.js";
|
|
8
|
-
export { registerCleanup, runCleanupFunctions } from "./cleanup-registry.js";
|
|
9
|
-
export { atomicWriteFile, readJsonFile, writeJsonFile, } from "./disk-storage.js";
|
|
10
|
-
export { AcpDetector, ACP_BACKENDS } from "./acp-detector.js";
|
|
11
|
-
export { AcpProtocolAdapter, type TranslatedNotification, type AcpHostRequestHandler } from "./acp-protocol-adapter.js";
|
|
12
|
-
export { AcpUsageTracker, type AccumulatedUsage } from "./acp-usage-tracker.js";
|
|
13
|
-
export { AgentConfigStore } from "./agent-config-store.js";
|
|
14
|
-
export { ModelIdTranslator } from "./model-id-translator.js";
|
|
15
|
-
export { SkillInjector } from "./skill-injector.js";
|
|
16
|
-
export { ACP_FAULT_LEVEL, type AcpFaultLevel, buildLlmEnvForTeammate } from "./agent-process.js";
|
|
17
|
-
export { McpBridge, MCP_BRIDGE_TOOLS } from "./mcp-bridge.js";
|
|
18
|
-
export type { AgentCategory, AgentProtocol, AgentStatus, AcpBackendConfig, AgentDescriptor, ExternalAgentDescriptor, CustomAgentDef, AgentConfig, AgentConfigStoreData, AgentCapabilities, AcpInitializeResult, AcpSessionResult, AcpPromptResponse, AcpPromptResponseUsage, AcpStopReason, AcpUsageUpdatePayload, McpServerConfig, AgentsScanParams, AgentsConfigParams, AgentsSetConfigParams, AgentsGetConfigParams, AgentsRemoveConfigParams, AgentsSetGatewayParams, SoloState, SoloAgentState, SoloAgentResult, SoloEvaluation, SoloStatus, SoloStartParams, SoloIdParams, SoloSelectParams, ProductPhase, ProductInstanceState, ProductTaskStatus, ProductBudget, ProductInstanceDef, ProductTaskDef, ProductCreateParams, ProductIdParams, ProductInstanceStatus, ProductTaskState, ProductStatus, ProductSummary, AgentsGetGatewayResult, AgentsListConfiguredItem, AgentsProcessInfo, AgentsKillParams, AgentsGetLogParams, AgentsGetLogResult, AgentsTestConnectionParams, AgentsTestConnectionResult, SoloDeleteParams, ProductDeleteParams, AgentSource, } from "../../protocol/wire/acp-agent-management.js";
|
|
19
|
-
export type { AgentsStatusNotification, AgentsErrorNotification, SoloProgressNotification, SoloEvaluationNotification, SoloAgentDeltaNotification, ProductTaskStartedNotification, ProductTaskCompletedNotification, ProductTaskFailedNotification, ProductCheckpointedNotification, ProductBudgetWarningNotification, ProductCompletedNotification, } from "../../protocol/notifications.js";
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP Bridge — exports qlogicagent tools as MCP (Model Context Protocol) servers
|
|
3
|
-
* for injection into external ACP agent sessions.
|
|
4
|
-
*
|
|
5
|
-
* When an ACP agent's session is created, we inject MCP servers that expose
|
|
6
|
-
* qlogicagent's native tools (media_generate, memory_*, web_search, etc.)
|
|
7
|
-
* so external agents can call them.
|
|
8
|
-
*
|
|
9
|
-
* Architecture:
|
|
10
|
-
* qlogicagent ─── ACP ───→ external agent
|
|
11
|
-
* └── MCP bridge server ◄── tools/call ── external agent
|
|
12
|
-
*
|
|
13
|
-
* The bridge server runs as a stdio child process. Each external agent
|
|
14
|
-
* session gets its own MCP bridge server instance.
|
|
15
|
-
*/
|
|
16
|
-
import type { McpServerConfig, AgentCapabilities } from "../../protocol/wire/acp-agent-management.js";
|
|
17
|
-
/**
|
|
18
|
-
* Tools exported via MCP bridge.
|
|
19
|
-
* These represent qlogicagent capabilities that external agents can call.
|
|
20
|
-
*/
|
|
21
|
-
export declare const MCP_BRIDGE_TOOLS: readonly [{
|
|
22
|
-
readonly name: "media_generate";
|
|
23
|
-
readonly description: "Generate images or videos using AI models.";
|
|
24
|
-
readonly inputSchema: {
|
|
25
|
-
readonly type: "object";
|
|
26
|
-
readonly properties: {
|
|
27
|
-
readonly prompt: {
|
|
28
|
-
readonly type: "string";
|
|
29
|
-
readonly description: "Generation prompt";
|
|
30
|
-
};
|
|
31
|
-
readonly type: {
|
|
32
|
-
readonly type: "string";
|
|
33
|
-
readonly enum: readonly ["image", "video"];
|
|
34
|
-
readonly description: "Media type";
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
readonly required: readonly ["prompt"];
|
|
38
|
-
};
|
|
39
|
-
}, {
|
|
40
|
-
readonly name: "media_status";
|
|
41
|
-
readonly description: "Check status of an async media generation job.";
|
|
42
|
-
readonly inputSchema: {
|
|
43
|
-
readonly type: "object";
|
|
44
|
-
readonly properties: {
|
|
45
|
-
readonly jobId: {
|
|
46
|
-
readonly type: "string";
|
|
47
|
-
readonly description: "Job ID to check";
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
readonly required: readonly ["jobId"];
|
|
51
|
-
};
|
|
52
|
-
}, {
|
|
53
|
-
readonly name: "memory_read";
|
|
54
|
-
readonly description: "Read from persistent memory.";
|
|
55
|
-
readonly inputSchema: {
|
|
56
|
-
readonly type: "object";
|
|
57
|
-
readonly properties: {
|
|
58
|
-
readonly key: {
|
|
59
|
-
readonly type: "string";
|
|
60
|
-
readonly description: "Memory key to read";
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
readonly required: readonly ["key"];
|
|
64
|
-
};
|
|
65
|
-
}, {
|
|
66
|
-
readonly name: "memory_write";
|
|
67
|
-
readonly description: "Write to persistent memory.";
|
|
68
|
-
readonly inputSchema: {
|
|
69
|
-
readonly type: "object";
|
|
70
|
-
readonly properties: {
|
|
71
|
-
readonly key: {
|
|
72
|
-
readonly type: "string";
|
|
73
|
-
readonly description: "Memory key";
|
|
74
|
-
};
|
|
75
|
-
readonly value: {
|
|
76
|
-
readonly type: "string";
|
|
77
|
-
readonly description: "Value to store";
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
readonly required: readonly ["key", "value"];
|
|
81
|
-
};
|
|
82
|
-
}, {
|
|
83
|
-
readonly name: "memory_search";
|
|
84
|
-
readonly description: "Search persistent memory by query.";
|
|
85
|
-
readonly inputSchema: {
|
|
86
|
-
readonly type: "object";
|
|
87
|
-
readonly properties: {
|
|
88
|
-
readonly query: {
|
|
89
|
-
readonly type: "string";
|
|
90
|
-
readonly description: "Search query";
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
readonly required: readonly ["query"];
|
|
94
|
-
};
|
|
95
|
-
}, {
|
|
96
|
-
readonly name: "web_search";
|
|
97
|
-
readonly description: "Search the web for information.";
|
|
98
|
-
readonly inputSchema: {
|
|
99
|
-
readonly type: "object";
|
|
100
|
-
readonly properties: {
|
|
101
|
-
readonly query: {
|
|
102
|
-
readonly type: "string";
|
|
103
|
-
readonly description: "Search query";
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
readonly required: readonly ["query"];
|
|
107
|
-
};
|
|
108
|
-
}, {
|
|
109
|
-
readonly name: "web_fetch";
|
|
110
|
-
readonly description: "Fetch content from a URL.";
|
|
111
|
-
readonly inputSchema: {
|
|
112
|
-
readonly type: "object";
|
|
113
|
-
readonly properties: {
|
|
114
|
-
readonly url: {
|
|
115
|
-
readonly type: "string";
|
|
116
|
-
readonly description: "URL to fetch";
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
readonly required: readonly ["url"];
|
|
120
|
-
};
|
|
121
|
-
}, {
|
|
122
|
-
readonly name: "team_status";
|
|
123
|
-
readonly description: "Get status of all agent team members.";
|
|
124
|
-
readonly inputSchema: {
|
|
125
|
-
readonly type: "object";
|
|
126
|
-
readonly properties: {};
|
|
127
|
-
};
|
|
128
|
-
}, {
|
|
129
|
-
readonly name: "team_message";
|
|
130
|
-
readonly description: "Send a message to another team member agent.";
|
|
131
|
-
readonly inputSchema: {
|
|
132
|
-
readonly type: "object";
|
|
133
|
-
readonly properties: {
|
|
134
|
-
readonly targetAgentId: {
|
|
135
|
-
readonly type: "string";
|
|
136
|
-
readonly description: "Target agent ID";
|
|
137
|
-
};
|
|
138
|
-
readonly message: {
|
|
139
|
-
readonly type: "string";
|
|
140
|
-
readonly description: "Message to send";
|
|
141
|
-
};
|
|
142
|
-
};
|
|
143
|
-
readonly required: readonly ["targetAgentId", "message"];
|
|
144
|
-
};
|
|
145
|
-
}];
|
|
146
|
-
export declare class McpBridge {
|
|
147
|
-
private bridgeScriptPath;
|
|
148
|
-
constructor(distDir: string);
|
|
149
|
-
/**
|
|
150
|
-
* Check whether an ACP agent supports MCP server injection.
|
|
151
|
-
*/
|
|
152
|
-
canInjectMcp(capabilities?: AgentCapabilities): boolean;
|
|
153
|
-
/**
|
|
154
|
-
* Generate the MCP server config to inject into an ACP session.
|
|
155
|
-
* This config tells the ACP agent how to spawn our MCP bridge server.
|
|
156
|
-
*
|
|
157
|
-
* @param parentRpcPort - Port/path for the bridge to call back to qlogicagent
|
|
158
|
-
* @param sessionId - Current session ID for scoping
|
|
159
|
-
*/
|
|
160
|
-
getMcpServerConfig(parentRpcPort: string, sessionId: string): McpServerConfig;
|
|
161
|
-
/**
|
|
162
|
-
* Get the list of tools that the MCP bridge will expose.
|
|
163
|
-
* Can be used for display or capability checking.
|
|
164
|
-
*/
|
|
165
|
-
getExportedTools(): typeof MCP_BRIDGE_TOOLS;
|
|
166
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model ID Translator — converts qlogicagent internal model IDs
|
|
3
|
-
* to external agent-specific model IDs.
|
|
4
|
-
*
|
|
5
|
-
* Lookup order:
|
|
6
|
-
* 1. Per-agent custom override (from AgentConfig.modelIdMap)
|
|
7
|
-
* 2. Pre-built translation table (covers mainstream agents)
|
|
8
|
-
* 3. Pass-through (unknown IDs forwarded as-is, never blocked)
|
|
9
|
-
*/
|
|
10
|
-
export declare class ModelIdTranslator {
|
|
11
|
-
/**
|
|
12
|
-
* Translate a model ID for a specific agent.
|
|
13
|
-
*
|
|
14
|
-
* @param agentId - Target agent (e.g. "claude", "codex")
|
|
15
|
-
* @param internalModelId - qlogicagent's internal model ID
|
|
16
|
-
* @param customMap - Per-agent override from AgentConfig.modelIdMap
|
|
17
|
-
* @returns The translated model ID (or original if no mapping exists)
|
|
18
|
-
*/
|
|
19
|
-
translate(agentId: string, internalModelId: string, customMap?: Record<string, string>): string;
|
|
20
|
-
/** Get all available mappings for an agent (defaults + custom overlay). */
|
|
21
|
-
getMappings(agentId: string, customMap?: Record<string, string>): Record<string, string>;
|
|
22
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Secure Storage — CC secureStorage parity.
|
|
3
|
-
*
|
|
4
|
-
* Platform-aware credential persistence abstraction:
|
|
5
|
-
* - Interface: get/set/delete with typed data
|
|
6
|
-
* - Implementation: file-based JSON with 0o600 permissions (CC plainTextStorage parity)
|
|
7
|
-
* - macOS Keychain / Windows Credential Manager can be added as plugins
|
|
8
|
-
*
|
|
9
|
-
* Storage layout:
|
|
10
|
-
* ~/.qlogicagent/.credentials.json — API keys, OAuth tokens
|
|
11
|
-
*
|
|
12
|
-
* Reference: claude-code-haha/src/utils/secureStorage/
|
|
13
|
-
*/
|
|
14
|
-
export interface SecureStorageData {
|
|
15
|
-
/** Primary API key (user-set) */
|
|
16
|
-
apiKey?: string;
|
|
17
|
-
/** OAuth tokens (if using OAuth flow) */
|
|
18
|
-
oauth?: {
|
|
19
|
-
accessToken: string;
|
|
20
|
-
refreshToken: string;
|
|
21
|
-
expiresAt: number;
|
|
22
|
-
};
|
|
23
|
-
/** Arbitrary key-value pairs for extensibility */
|
|
24
|
-
[key: string]: unknown;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* CC SecureStorage interface parity.
|
|
28
|
-
*
|
|
29
|
-
* Implementations may use OS keychain, encrypted file, or plain-text file.
|
|
30
|
-
* Callers should not assume any specific storage backend.
|
|
31
|
-
*/
|
|
32
|
-
export interface SecureStorage {
|
|
33
|
-
readonly name: string;
|
|
34
|
-
get(): Promise<SecureStorageData | null>;
|
|
35
|
-
set(data: SecureStorageData): Promise<{
|
|
36
|
-
success: boolean;
|
|
37
|
-
warning?: string;
|
|
38
|
-
}>;
|
|
39
|
-
delete(): Promise<boolean>;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* File-based secure storage with restrictive permissions.
|
|
43
|
-
*
|
|
44
|
-
* On Unix: file created with 0o600 (owner-only read/write).
|
|
45
|
-
* On Windows: ACLs are not set (relies on user profile permissions).
|
|
46
|
-
*
|
|
47
|
-
* This matches CC's plainTextStorage.ts behavior — it's the default
|
|
48
|
-
* on Linux/Windows, and the fallback on macOS.
|
|
49
|
-
*/
|
|
50
|
-
export declare class FileSecureStorage implements SecureStorage {
|
|
51
|
-
readonly name = "file";
|
|
52
|
-
get(): Promise<SecureStorageData | null>;
|
|
53
|
-
set(data: SecureStorageData): Promise<{
|
|
54
|
-
success: boolean;
|
|
55
|
-
warning?: string;
|
|
56
|
-
}>;
|
|
57
|
-
delete(): Promise<boolean>;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Get the platform-appropriate secure storage instance.
|
|
61
|
-
*
|
|
62
|
-
* Currently returns FileSecureStorage on all platforms.
|
|
63
|
-
* macOS Keychain integration can be added by checking platform
|
|
64
|
-
* and returning a KeychainSecureStorage wrapper.
|
|
65
|
-
*/
|
|
66
|
-
export declare function getSecureStorage(): SecureStorage;
|
|
67
|
-
/**
|
|
68
|
-
* Save an API key to secure storage.
|
|
69
|
-
*/
|
|
70
|
-
export declare function saveApiKey(apiKey: string): Promise<{
|
|
71
|
-
success: boolean;
|
|
72
|
-
warning?: string;
|
|
73
|
-
}>;
|
|
74
|
-
/**
|
|
75
|
-
* Load the stored API key (returns null if none saved).
|
|
76
|
-
*/
|
|
77
|
-
export declare function loadApiKey(): Promise<string | null>;
|
|
78
|
-
/**
|
|
79
|
-
* Delete the stored API key.
|
|
80
|
-
*/
|
|
81
|
-
export declare function deleteApiKey(): Promise<boolean>;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Skill Injector — shares qlogicagent skills with external ACP agents.
|
|
3
|
-
*
|
|
4
|
-
* Two injection methods:
|
|
5
|
-
*
|
|
6
|
-
* 1. **Native skill directory sync**: For agents that support a `skillsDirs`
|
|
7
|
-
* convention (e.g. `.claude/skills/`), create symlinks or copies of
|
|
8
|
-
* qlogicagent's optional skills into the agent's native directory.
|
|
9
|
-
*
|
|
10
|
-
* 2. **First-message prompt injection**: For agents without native skill
|
|
11
|
-
* directory support, prepend skill instructions text to the first prompt.
|
|
12
|
-
* Subject to a token budget to prevent context bloat.
|
|
13
|
-
*/
|
|
14
|
-
import type { AgentCapabilities } from "../../protocol/wire/acp-agent-management.js";
|
|
15
|
-
import { SKILL_INJECTION_MAX_CHARS, SKILL_INJECTION_MAX_COUNT } from "../config/tunable-defaults.js";
|
|
16
|
-
export { SKILL_INJECTION_MAX_CHARS, SKILL_INJECTION_MAX_COUNT };
|
|
17
|
-
export declare function isSystemGeneratedSkillName(name: string): boolean;
|
|
18
|
-
export declare class SkillInjector {
|
|
19
|
-
/**
|
|
20
|
-
* Synchronize skills to an agent's native skill directory.
|
|
21
|
-
* Creates symlinks where possible; falls back to file copy.
|
|
22
|
-
*
|
|
23
|
-
* @param targetDir - Agent's native skill directory (e.g. `<cwd>/.claude/skills/`)
|
|
24
|
-
* @param cwd - Project working directory (for project-level skills)
|
|
25
|
-
*/
|
|
26
|
-
syncSkillsToDir(targetDir: string, cwd?: string): void;
|
|
27
|
-
/**
|
|
28
|
-
* Build a skill description block to prepend to the first message
|
|
29
|
-
* for agents that don't support native skill directories.
|
|
30
|
-
*
|
|
31
|
-
* Respects SKILL_INJECTION_MAX_CHARS and SKILL_INJECTION_MAX_COUNT
|
|
32
|
-
* to prevent token bloat.
|
|
33
|
-
*
|
|
34
|
-
* @param cwd - Project working directory (for project-level skills)
|
|
35
|
-
* @returns Markdown text with skill instructions, or empty string if no skills.
|
|
36
|
-
*/
|
|
37
|
-
buildPromptWithSkills(cwd?: string): string;
|
|
38
|
-
/**
|
|
39
|
-
* Determine the injection method for an agent.
|
|
40
|
-
*
|
|
41
|
-
* @param capabilities - Agent's discovered capabilities
|
|
42
|
-
* @returns "native" if agent has skillsDirs, "prompt" otherwise
|
|
43
|
-
*/
|
|
44
|
-
getInjectionMethod(capabilities?: AgentCapabilities): "native" | "prompt";
|
|
45
|
-
/**
|
|
46
|
-
* Apply skills to an agent based on its capabilities.
|
|
47
|
-
*
|
|
48
|
-
* @param capabilities - Agent's discovered capabilities
|
|
49
|
-
* @param cwd - Project working directory
|
|
50
|
-
* @returns Skill prompt text (for "prompt" method) or empty string (for "native" method)
|
|
51
|
-
*/
|
|
52
|
-
applySkills(capabilities?: AgentCapabilities, cwd?: string): string;
|
|
53
|
-
/**
|
|
54
|
-
* Collect all skill file paths from project-level and user-level dirs.
|
|
55
|
-
* Skills are stored as `<dir>/<skillName>/SKILL.md`.
|
|
56
|
-
* Priority: project > global (project listed first for budget-constrained injection).
|
|
57
|
-
*/
|
|
58
|
-
private collectSkillPaths;
|
|
59
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { assembleSystemPrompt, clearSystemPromptSections, systemPromptSection, type SystemPromptSection, } from "./system-prompt-sections.js";
|
|
2
|
-
export { PROMPT_POLICY_REGISTRY, PROMPT_POLICY_VERSION, createPromptPolicyHeader, type PromptPolicyRegistry, type PromptPolicyRegistryEntry, } from "./prompt-policy.js";
|
|
3
|
-
export { getInstructions, buildInstructionsPrompt, resetInstructionCache, } from "./instruction-loader.js";
|
|
4
|
-
export { createEnvironmentContextSection, createTaskGuidanceSection, createToolGuidanceSection, createLanguageSection } from "./environment-context.js";
|
|
5
|
-
export { detectTaskDomain, resolveTaskDomain, type TaskDomain, type DomainResolutionContext } from "./task-domain.js";
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { SessionState, type SessionUsageSnapshot } from "./session-state.js";
|
|
2
|
-
export { SessionLocator } from "./session-locator.js";
|
|
3
|
-
export { appendMessage, saveSessionState, updateSessionMetadata, getSessionMetadata, loadSessionForResume, listSessions, deleteSession, pruneOldSessions, shouldGenerateTaskSummary, maybeGenerateTaskSummary, type SessionMetadata, type PersistedSession, type SessionListEntry, type TaskSummaryDeps, } from "./session-persistence.js";
|
|
4
|
-
export { maybeAutoSplitGroupSession, type GroupSplitResult } from "./group-session-split.js";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type { PortableTool, PortableToolResult, ToolContentBlock, } from "./portable-tool.js";
|
|
2
|
-
export { AGENT_DISALLOWED_TOOLS, CUSTOM_AGENT_DISALLOWED_TOOLS, filterToolsForAgent, } from "./tool-access.js";
|
|
3
|
-
export type { ParsedSkillFrontmatter, WorkspaceSkill, SkillInstallSpec, SkillMetadata, SkillInvocationPolicy, SkillCommandDispatchSpec, SkillCommandSpec, SkillScanSeverity, SkillScanFinding, SkillScanSummary, SkillScanOptions, SkillFsDeps, SkillPathDeps, } from "./skill-system/skill-types.js";
|
|
4
|
-
export { parseFrontmatter, resolveSkillMetadata, resolveSkillInvocationPolicy, resolveSkillKey, } from "./skill-system/skill-frontmatter.js";
|
|
5
|
-
export { scanSource, scanSkillDirectory, hasCriticalFindings, isScannable, } from "./skill-system/skill-guard.js";
|
|
6
|
-
export type { SkillGuardDeps } from "./skill-system/skill-guard.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { McpManager, parseMcpConfig, validateMcpToolWorkspaceBoundary, type McpServerEntry, type McpManagerConfig } from "./mcp-manager.js";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { PermissionRuleEngine, parsePermissionConfig } from "./rule-engine.js";
|
|
2
|
-
export { PermissionChecker } from "./hook-runner.js";
|
|
3
|
-
export type { PermissionCheckerDeps } from "./hook-runner.js";
|
|
4
|
-
export { classifyToolAction, isAutoModeAllowlistedTool, } from "./permission-classifier.js";
|
|
5
|
-
export type { ClassifierLLMCall, ClassifierResult, } from "./permission-classifier.js";
|
|
6
|
-
export { classifyBashCommand } from "./bash-classifier.js";
|
|
7
|
-
export type { BashClassifyResult } from "./bash-classifier.js";
|
|
8
|
-
export { ClassifierCache } from "./classifier-cache.js";
|
|
9
|
-
export type { CachedClassification } from "./classifier-cache.js";
|
|
10
|
-
export { watchSettings, loadInitialSettings } from "./settings-watcher.js";
|
|
11
|
-
export type { SettingsFile, SettingsWatcherDeps } from "./settings-watcher.js";
|
|
12
|
-
export { getGroupSecurityRules, isGroupSensitivePath } from "./group-security-policy.js";
|
|
13
|
-
export type { PermissionMode, PermissionBehavior, PermissionResult, PermissionRuleEntry, PermissionConfig, PermissionDecisionReason, ToolPermissionCheckInput, ApprovalRequest, ApprovalResponse, } from "./types.js";
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
export declare const BRIEF_TOOL_NAME: "send_user_message";
|
|
3
|
-
export type BriefMessageStatus = "normal" | "proactive";
|
|
4
|
-
export interface BriefAttachment {
|
|
5
|
-
/** Absolute or workspace-relative path */
|
|
6
|
-
path: string;
|
|
7
|
-
/** Size in bytes (filled by host) */
|
|
8
|
-
size?: number;
|
|
9
|
-
/** Whether the file is an image */
|
|
10
|
-
isImage?: boolean;
|
|
11
|
-
/** Upload UUID (host may upload for web preview) */
|
|
12
|
-
fileUuid?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface BriefToolParams {
|
|
15
|
-
/** Markdown-formatted message to display to the user */
|
|
16
|
-
message: string;
|
|
17
|
-
/** File attachments to include with the message */
|
|
18
|
-
attachments?: string[];
|
|
19
|
-
/** Message status — 'proactive' for unsolicited updates */
|
|
20
|
-
status?: BriefMessageStatus;
|
|
21
|
-
}
|
|
22
|
-
export declare const BRIEF_TOOL_SCHEMA: {
|
|
23
|
-
readonly type: "object";
|
|
24
|
-
readonly properties: {
|
|
25
|
-
readonly message: {
|
|
26
|
-
readonly type: "string";
|
|
27
|
-
readonly description: string;
|
|
28
|
-
readonly minLength: 1;
|
|
29
|
-
};
|
|
30
|
-
readonly attachments: {
|
|
31
|
-
readonly type: "array";
|
|
32
|
-
readonly description: "Optional file paths to attach (images, documents, etc.).";
|
|
33
|
-
readonly items: {
|
|
34
|
-
readonly type: "string";
|
|
35
|
-
};
|
|
36
|
-
readonly maxItems: 10;
|
|
37
|
-
};
|
|
38
|
-
readonly status: {
|
|
39
|
-
readonly type: "string";
|
|
40
|
-
readonly enum: readonly ["normal", "proactive"];
|
|
41
|
-
readonly description: string;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
readonly required: readonly ["message"];
|
|
45
|
-
};
|
|
46
|
-
export interface BriefDeliveryResult {
|
|
47
|
-
delivered: boolean;
|
|
48
|
-
attachments?: BriefAttachment[];
|
|
49
|
-
sentAt?: string;
|
|
50
|
-
error?: string;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Host-provided message delivery backend.
|
|
54
|
-
*/
|
|
55
|
-
export interface BriefToolDeps {
|
|
56
|
-
/** Deliver the message to the user's UI */
|
|
57
|
-
deliverMessage(params: {
|
|
58
|
-
message: string;
|
|
59
|
-
attachments?: string[];
|
|
60
|
-
status: BriefMessageStatus;
|
|
61
|
-
}): Promise<BriefDeliveryResult>;
|
|
62
|
-
/** Validate and resolve attachment paths. Returns resolved attachments or error. */
|
|
63
|
-
resolveAttachments?(paths: string[]): Promise<BriefAttachment[] | {
|
|
64
|
-
error: string;
|
|
65
|
-
}>;
|
|
66
|
-
}
|
|
67
|
-
/** Check if brief mode is active (host determines this) */
|
|
68
|
-
export interface BriefModeConfig {
|
|
69
|
-
/** Whether the agent is in brief/chat mode */
|
|
70
|
-
isBriefMode: boolean;
|
|
71
|
-
/** Whether the user opted in via UI/CLI */
|
|
72
|
-
userOptIn?: boolean;
|
|
73
|
-
}
|
|
74
|
-
export declare function createBriefTool(deps: BriefToolDeps): PortableTool<BriefToolParams>;
|