qlogicagent 2.19.7 → 2.19.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/README.md +16 -5
- package/dist/cli.js +1 -1
- package/dist/host-contract.js +1 -1
- package/dist/index.js +335 -334
- package/dist/protocol.js +1 -1
- package/dist/skills/mcp/astraclaw-native-mcp-server.js +3 -3
- package/dist/types/cli/acp-session-host.d.ts +4 -0
- package/dist/types/cli/agent-runtime-bootstrap.d.ts +3 -0
- package/dist/types/cli/agent-runtime-session-state.d.ts +12 -4
- package/dist/types/cli/industrial-runtime-archive.d.ts +14 -0
- package/dist/types/cli/industrial-runtime-store.d.ts +29 -0
- package/dist/types/cli/mcp-bootstrap.d.ts +11 -1
- package/dist/types/cli/resolved-agent-cache.d.ts +7 -0
- package/dist/types/cli/runtime-dependency-catalog.d.ts +35 -5
- package/dist/types/cli/stdio-acp-request-host.d.ts +2 -2
- package/dist/types/cli/stdio-agent-session-bootstrap.d.ts +4 -1
- package/dist/types/cli/stdio-server.d.ts +6 -1
- package/dist/types/cli/tool-bootstrap-core-registration.d.ts +1 -0
- package/dist/types/cli/tool-registry-adapter.d.ts +9 -1
- package/dist/types/cli/windows-authenticode.d.ts +18 -0
- package/dist/types/host-contract/index.d.ts +2 -6
- package/dist/types/protocol/wire/acp-protocol.d.ts +6 -5
- package/dist/types/runtime/community/community-consent-client.d.ts +3 -0
- package/dist/types/runtime/community/ranged-download.d.ts +6 -0
- package/dist/types/runtime/infra/industrial-runtime-session-server.d.ts +15 -0
- package/dist/types/runtime/infra/llmrouter-access-token.d.ts +13 -0
- package/dist/types/skills/tools/exec-tool.d.ts +4 -2
- package/dist/types/skills/tools/shell/shell-exec.d.ts +3 -0
- package/dist/types/skills/tools/shell/subprocess-env.d.ts +1 -1
- package/dist/types/test-support/project-store-fixture.d.ts +11 -0
- package/package.json +8 -2
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { 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
|
+
/**
|
|
6
|
+
* Creates an empty catalog behind the legacy registry adapter boundary.
|
|
7
|
+
*
|
|
8
|
+
* Runtime/session owners must not depend on the legacy registry implementation merely to obtain
|
|
9
|
+
* isolated storage. Keeping construction here makes ToolCatalog the only contract visible above
|
|
10
|
+
* this adapter and leaves the registry removable in a later cleanup.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createIsolatedToolCatalog(): ToolCatalog;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type AuthenticodeExecFile = (file: string, args: string[], options: {
|
|
2
|
+
encoding: "utf8";
|
|
3
|
+
timeout: number;
|
|
4
|
+
maxBuffer: number;
|
|
5
|
+
windowsHide: boolean;
|
|
6
|
+
}, callback: (error: Error | null, stdout: string, stderr: string) => void) => unknown;
|
|
7
|
+
export interface AuthenticodeFile {
|
|
8
|
+
absolutePath: string;
|
|
9
|
+
relativePath: string;
|
|
10
|
+
}
|
|
11
|
+
export interface VerifyAuthenticodeInput {
|
|
12
|
+
files: AuthenticodeFile[];
|
|
13
|
+
execFileFn?: AuthenticodeExecFile;
|
|
14
|
+
platform?: string;
|
|
15
|
+
arch?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function assertIndustrialRuntimePlatform(platform?: string, arch?: string): void;
|
|
18
|
+
export declare function verifyWindowsAuthenticodeFiles(input: VerifyAuthenticodeInput): Promise<void>;
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
* 标注 [S1 补定] 的辅助类型是 freeze 引用但未给定义的最小结构,属 S1 评审点,
|
|
12
12
|
* 其字段以 freeze 正文/recon 注释为据;实现 lane 负责与现状 store 形状做映射。
|
|
13
13
|
*/
|
|
14
|
+
import { type ModelPurpose } from "@xiaozhiclaw/model-access";
|
|
14
15
|
import type { NativeTranscript } from "../host-session-collection-contract.js";
|
|
16
|
+
export { MODEL_PURPOSES, type ModelPurpose } from "@xiaozhiclaw/model-access";
|
|
15
17
|
export type { HostSessionCollectionDelta, HostSessionCollectionScope, HostSessionCollectionSnapshot, HostSessionLifecycle, HostSessionProviderDiagnostic, HostSessionSummary, HostSessionTitleSource, NativeTranscript, NativeTranscriptMessage, } from "../host-session-collection-contract.js";
|
|
16
18
|
export { isHostSessionCollectionDelta, isHostSessionCollectionSnapshot, isNativeTranscript, } from "../host-session-collection-contract.js";
|
|
17
19
|
export * from "./provider-profile.js";
|
|
@@ -21,12 +23,6 @@ export type AgentId = string;
|
|
|
21
23
|
export type ProjectId = string;
|
|
22
24
|
/** 会话稳定身份(创建即恒定,session-identity-alignment-spec)。 */
|
|
23
25
|
export type CanonicalSessionId = string;
|
|
24
|
-
/**
|
|
25
|
-
* Gateway-resolved model purposes. This is the single vocabulary shared by
|
|
26
|
-
* profile materialization and the agent-side model registry.
|
|
27
|
-
*/
|
|
28
|
-
export declare const MODEL_PURPOSES: readonly ["textGeneration", "smallModel", "stt", "tts", "imageGeneration", "imageUnderstanding", "videoGeneration", "videoUnderstanding", "threeDGeneration", "embedding", "voiceClone", "musicGeneration", "realtimeAudio", "realtimeVideo"];
|
|
29
|
-
export type ModelPurpose = (typeof MODEL_PURPOSES)[number];
|
|
30
26
|
/** 能力实例种类。 */
|
|
31
27
|
export type MemberKind = "chat" | "product-leader" | "product-worker" | "goal-leader" | "solo-racer" | "workflow-node";
|
|
32
28
|
/**
|
|
@@ -144,7 +144,8 @@ export interface AcpSessionMeta {
|
|
|
144
144
|
/** Skills the user explicitly pinned for this turn (scope:name or name). The turn pipeline
|
|
145
145
|
* force-loads each one's SKILL.md, identically to the `skill_view` tool (cc-parity). */
|
|
146
146
|
activeSkills?: string[];
|
|
147
|
-
/**
|
|
147
|
+
/** Internal materialization of the standard session/new|load `mcpServers` field.
|
|
148
|
+
* Hosts MUST NOT send this through `_meta`. */
|
|
148
149
|
mcpServers?: Record<string, unknown>;
|
|
149
150
|
}
|
|
150
151
|
export interface AcpSessionNewParams {
|
|
@@ -168,7 +169,7 @@ export interface AcpSessionNewParams {
|
|
|
168
169
|
resumeSessionId?: string;
|
|
169
170
|
forkSession?: boolean;
|
|
170
171
|
/** Per-session context supplement (no standard ACP home). Inherited by every session/prompt. */
|
|
171
|
-
_meta?: AcpSessionMeta
|
|
172
|
+
_meta?: Omit<AcpSessionMeta, "mcpServers">;
|
|
172
173
|
}
|
|
173
174
|
export interface AcpSessionLoadParams {
|
|
174
175
|
sessionId: string;
|
|
@@ -177,7 +178,7 @@ export interface AcpSessionLoadParams {
|
|
|
177
178
|
/** MCP servers re-injected by the host when resuming the session. */
|
|
178
179
|
mcpServers?: AcpSessionNewParams["mcpServers"];
|
|
179
180
|
/** Per-session context supplement restored by the host. */
|
|
180
|
-
_meta?: AcpSessionMeta
|
|
181
|
+
_meta?: Omit<AcpSessionMeta, "mcpServers">;
|
|
181
182
|
}
|
|
182
183
|
/** A selectable permission mode advertised to the host (standard ACP). */
|
|
183
184
|
export interface AcpMode {
|
|
@@ -199,8 +200,8 @@ export interface AcpSessionPromptParams {
|
|
|
199
200
|
sessionId: string;
|
|
200
201
|
/** User prompt content blocks (standard ACP field). */
|
|
201
202
|
prompt: AcpContentBlock[];
|
|
202
|
-
/** Per-turn context overrides (permissions/reasoning
|
|
203
|
-
_meta?: AcpSessionMeta
|
|
203
|
+
/** Per-turn context overrides (permissions/reasoning/...), merged over session _meta. */
|
|
204
|
+
_meta?: Omit<AcpSessionMeta, "mcpServers">;
|
|
204
205
|
}
|
|
205
206
|
export interface AcpSessionPromptResult {
|
|
206
207
|
/** Stop reason (required by ACP standard). */
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { ConfigPort } from "../ports/index.js";
|
|
2
2
|
export interface CommunityRuntimeResolution {
|
|
3
3
|
id: string;
|
|
4
|
+
platform: string;
|
|
4
5
|
version: string;
|
|
5
6
|
downloadUrl: string;
|
|
6
7
|
/** sha256 hex digest — verified client-side before placing the binary. */
|
|
7
8
|
checksum: string;
|
|
8
9
|
sizeBytes: number;
|
|
10
|
+
format: "executable" | "zip" | "tar.gz";
|
|
11
|
+
entrypoint?: string;
|
|
9
12
|
}
|
|
10
13
|
export type CommunityInstallRiskTier = "R0" | "R1" | "R2" | "R3";
|
|
11
14
|
export type CommunityInstallSourceTier = "official" | "community";
|
|
@@ -12,4 +12,10 @@ export interface RangedDownloadTarget {
|
|
|
12
12
|
sizeBytes: number;
|
|
13
13
|
checksum: string;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Stream a checksum-verified package directly into a caller-owned exclusive
|
|
17
|
+
* staging path. Industrial ZIPs use this path so neither the response nor the
|
|
18
|
+
* completed archive is materialized as a second full-size Buffer.
|
|
19
|
+
*/
|
|
20
|
+
export declare function downloadVerifiedToFile(fetchFn: typeof fetch, target: RangedDownloadTarget, label: string, destination: string, timeoutMs?: number): Promise<string>;
|
|
15
21
|
export declare function rangedDownloadVerified(fetchFn: typeof fetch, target: RangedDownloadTarget, label: string): Promise<Buffer>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface IndustrialRuntimeChildEnv {
|
|
2
|
+
XIAOZHICLAW_RUNTIME_SESSION_URL: string;
|
|
3
|
+
XIAOZHICLAW_RUNTIME_SESSION_BEARER: string;
|
|
4
|
+
}
|
|
5
|
+
type ProbeSession = (signal: AbortSignal) => Promise<Response>;
|
|
6
|
+
export interface IndustrialRuntimeSessionServerForTest {
|
|
7
|
+
childEnv: IndustrialRuntimeChildEnv;
|
|
8
|
+
stop(): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare function industrialRuntimeSessionChildEnv(): Promise<IndustrialRuntimeChildEnv | undefined>;
|
|
11
|
+
export declare function stopIndustrialRuntimeSessionServer(): Promise<void>;
|
|
12
|
+
export declare function __createIndustrialRuntimeSessionServerForTest(options: {
|
|
13
|
+
probeSession: ProbeSession;
|
|
14
|
+
}): Promise<IndustrialRuntimeSessionServerForTest>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type LlmrouterFetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
2
|
+
export interface LlmrouterFetchOptions {
|
|
3
|
+
fetchFn?: LlmrouterFetch;
|
|
4
|
+
init?: RequestInit;
|
|
5
|
+
signal?: AbortSignal;
|
|
6
|
+
}
|
|
7
|
+
export interface LlmrouterFetchResult {
|
|
8
|
+
response: Response;
|
|
9
|
+
refreshedToken: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function isJwtExpiredOrNearExpiry(token: string | undefined, skewSeconds?: number): boolean;
|
|
12
|
+
export declare function refreshLlmrouterAccessToken(baseUrl: string, options?: Pick<LlmrouterFetchOptions, "fetchFn" | "signal">): Promise<boolean>;
|
|
13
|
+
export declare function fetchWithLlmrouterAccess(path: string, options?: LlmrouterFetchOptions): Promise<LlmrouterFetchResult>;
|
|
@@ -61,7 +61,7 @@ export interface ExecProgress {
|
|
|
61
61
|
taskId?: string;
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* Minimal host
|
|
64
|
+
* Minimal host dependencies for permission checks and late-bound authority reads.
|
|
65
65
|
* The tool owns everything else (spawn, lifecycle, output).
|
|
66
66
|
*
|
|
67
67
|
* This replaces the old ExecToolDeps which required the host to
|
|
@@ -80,6 +80,8 @@ export interface ExecToolHost {
|
|
|
80
80
|
* Returns undefined to disable the OS sandbox (degrade to prompt-only).
|
|
81
81
|
*/
|
|
82
82
|
resolveSandbox?(): SandboxConfig | undefined;
|
|
83
|
+
/** Resolve active private runtime PATH entries at command execution time. */
|
|
84
|
+
resolveRuntimePathEntries?(): Promise<string[]>;
|
|
83
85
|
/**
|
|
84
86
|
* Interpret a non-zero exit code.
|
|
85
87
|
* E.g. 127 → "command not found", 137 → "killed by SIGKILL".
|
|
@@ -111,7 +113,7 @@ export declare const ASSISTANT_BLOCKING_BUDGET_MS = 15000;
|
|
|
111
113
|
/**
|
|
112
114
|
* Create the exec tool with direct process ownership (cc architecture).
|
|
113
115
|
*
|
|
114
|
-
* @param host Minimal host interface
|
|
116
|
+
* @param host Minimal host interface for permission checks and authority reads.
|
|
115
117
|
* Pass `{}` for unrestricted mode (tests only).
|
|
116
118
|
*/
|
|
117
119
|
export declare function createExecTool(host?: ExecToolHost): PortableTool<ExecToolParams>;
|
|
@@ -21,6 +21,8 @@ export interface ExecOptions {
|
|
|
21
21
|
cwd?: string;
|
|
22
22
|
/** Sandbox context injected by the host; absent = no OS sandbox (degrade). */
|
|
23
23
|
sandbox?: SandboxConfig;
|
|
24
|
+
/** Late-bound CLI authority for active private runtime PATH entries. */
|
|
25
|
+
resolveRuntimePathEntries?: () => Promise<string[]>;
|
|
24
26
|
}
|
|
25
27
|
/**
|
|
26
28
|
* Set the shell provider for this session.
|
|
@@ -49,6 +51,7 @@ export declare function getActiveShellInfo(): {
|
|
|
49
51
|
psEdition?: "5.1" | "7+";
|
|
50
52
|
isGitBashOnWindows?: boolean;
|
|
51
53
|
} | undefined;
|
|
54
|
+
export declare function buildShellExecEnvironment(envOverrides: NodeJS.ProcessEnv, resolveRuntimePathEntries?: () => Promise<string[]>): Promise<NodeJS.ProcessEnv>;
|
|
52
55
|
/**
|
|
53
56
|
* Execute a shell command using the configured provider.
|
|
54
57
|
* Creates a new child process for each invocation.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HostProjectInfo, HostProjectType } from "../host-contract/index.js";
|
|
2
|
+
export * from "../runtime/infra/project-store.js";
|
|
3
|
+
export declare function resetProjectStore(): void;
|
|
4
|
+
export declare function createProject(params: {
|
|
5
|
+
name: string;
|
|
6
|
+
workspaceDir: string;
|
|
7
|
+
type?: HostProjectType;
|
|
8
|
+
groupId?: string;
|
|
9
|
+
skipAutoSwitch?: boolean;
|
|
10
|
+
}): HostProjectInfo;
|
|
11
|
+
export declare function switchProject(projectId: string): HostProjectInfo | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qlogicagent",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.8",
|
|
4
4
|
"description": "XiaozhiClaw Agent CLI — subprocess architecture (JSON-RPC over stdio)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -72,6 +72,9 @@
|
|
|
72
72
|
"files": [
|
|
73
73
|
"dist/"
|
|
74
74
|
],
|
|
75
|
+
"publishConfig": {
|
|
76
|
+
"access": "public"
|
|
77
|
+
},
|
|
75
78
|
"typesVersions": {
|
|
76
79
|
"*": {
|
|
77
80
|
"protocol": [
|
|
@@ -157,6 +160,7 @@
|
|
|
157
160
|
"dependencies": {
|
|
158
161
|
"@agentclientprotocol/sdk": "^0.25.0",
|
|
159
162
|
"@napi-rs/canvas": "0.1.100",
|
|
163
|
+
"@xiaozhiclaw/model-access": "file:vendor\\xiaozhiclaw-model-access-0.1.0.tgz",
|
|
160
164
|
"@xiaozhiclaw/pet-core": "0.1.3",
|
|
161
165
|
"@xiaozhiclaw/provider-core": "^0.1.26",
|
|
162
166
|
"better-sqlite3": "^12.10.0",
|
|
@@ -166,11 +170,13 @@
|
|
|
166
170
|
"mcporter": "^0.12.0",
|
|
167
171
|
"nanoid": "^5.1.5",
|
|
168
172
|
"pino": "^9.6.0",
|
|
169
|
-
"pino-pretty": "^13.0.0"
|
|
173
|
+
"pino-pretty": "^13.0.0",
|
|
174
|
+
"yauzl": "3.4.0"
|
|
170
175
|
},
|
|
171
176
|
"devDependencies": {
|
|
172
177
|
"@types/better-sqlite3": "^7.6.13",
|
|
173
178
|
"@types/node": "^22.15.0",
|
|
179
|
+
"@types/yauzl": "3.4.0",
|
|
174
180
|
"esbuild": "^0.28.0",
|
|
175
181
|
"javascript-obfuscator": "^5.4.3",
|
|
176
182
|
"oxlint": "1.67.0",
|