qlogicagent 2.19.5 → 2.19.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.js +32 -32
- package/dist/cli.js +1 -1
- package/dist/host-contract.js +1 -1
- package/dist/host-session-collection-contract.js +1 -1
- package/dist/index.js +327 -327
- package/dist/types/agent/tool-loop/loop-helpers.d.ts +0 -1
- package/dist/types/cli/handlers/session-handler.d.ts +6 -32
- package/dist/types/host-session-collection-contract.d.ts +3 -0
- package/dist/types/protocol/wire/gateway-rpc.d.ts +1 -1
- package/package.json +29 -29
- package/dist/types/agent/tool-loop/pseudo-tool-output.d.ts +0 -8
|
@@ -3,7 +3,6 @@ export { isEmptyToolResult } from "./tool-result-classification.js";
|
|
|
3
3
|
export declare const OUTPUT_REQUEST_CONTEXT_PATTERN: RegExp;
|
|
4
4
|
export declare function findLastToolError(messages: unknown[], _toolName: string): string | undefined;
|
|
5
5
|
export declare function looksLikeBuildRequest(messages?: readonly ChatMessage[]): boolean;
|
|
6
|
-
export declare function isBareIntentPreamble(text: string): boolean;
|
|
7
6
|
export declare function isCapabilityDenial(text: string): boolean;
|
|
8
7
|
export declare function resolveToolLoopBudget(requested?: number, messages?: readonly ChatMessage[]): number;
|
|
9
8
|
export declare function countExplicitOutputArtifacts(messages?: readonly ChatMessage[]): number;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Compute-only session handlers.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
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.
|
|
4
|
+
* Gateway owns project/session discovery, metadata, lifecycle and deletion. This
|
|
5
|
+
* file deliberately retains only the three operations that require live agent
|
|
6
|
+
* compute state: thread creation, history hydration for a supervised execution,
|
|
7
|
+
* and a diagnostic snapshot of the current compute session.
|
|
12
8
|
*/
|
|
13
|
-
import { SessionState } from "../../runtime/session/session-state.js";
|
|
14
9
|
import { createMemoryPrefetchState } from "../../runtime/hooks/memory-hooks.js";
|
|
10
|
+
import { SessionState } from "../../runtime/session/session-state.js";
|
|
15
11
|
import { type AgentRpcError, type AgentRpcErrorCode, type AgentRpcRequest } from "../../protocol/wire/index.js";
|
|
16
12
|
import type { SessionHistoryCoordinator } from "../session-history-coordinator.js";
|
|
17
13
|
export interface SessionHandlerHost {
|
|
@@ -29,27 +25,5 @@ export interface SessionHandlerHost {
|
|
|
29
25
|
sendError(id: string | number, code: AgentRpcErrorCode | number, message: string, data?: unknown): void;
|
|
30
26
|
}
|
|
31
27
|
export declare function handleThreadCreate(this: SessionHandlerHost, msg: AgentRpcRequest): void;
|
|
32
|
-
export declare function handleThreadList(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
33
|
-
export declare function handleSessionCreate(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
34
|
-
export declare function handleSessionResolve(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
35
|
-
export declare function handleSessionList(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
36
|
-
export declare function handleSessionGet(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
37
|
-
export declare function handleSessionGetMessages(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
38
|
-
export declare function handleSessionUpdate(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
39
|
-
export declare function handleSessionDelete(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
40
|
-
export declare function handleSessionDeleteAll(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
41
|
-
export declare function handleSessionArchive(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* L2 优雅关闭清标记:清所有 session 残留的 in-flight 标记(== hermes .clean_shutdown 语义)。
|
|
44
|
-
* gateway 优雅退出时在 adapter.dispose() 前调用,据此区分"优雅关闭"与"崩溃"——
|
|
45
|
-
* 启动扫描(L3)看到的残留标记因此一定是崩溃残留,不误报。无参、幂等。
|
|
46
|
-
*/
|
|
47
|
-
export declare function handleSessionMarkCleanShutdown(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
48
28
|
export declare function handleSessionResume(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
49
29
|
export declare function handleSessionGetInfo(this: SessionHandlerHost, msg: AgentRpcRequest): void;
|
|
50
|
-
/**
|
|
51
|
-
* `session.moveToProject` - Move a session from one project to another.
|
|
52
|
-
* Physically copies session files, updates metadata.projectId, then removes the source.
|
|
53
|
-
* Emits session:updated notification.
|
|
54
|
-
*/
|
|
55
|
-
export declare function handleSessionMoveToProject(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import type { AgentId, CanonicalSessionId, NativeSessionRef, ProjectId } from "./host-contract/index.js";
|
|
8
8
|
export type HostSessionTitleSource = "prompt" | "generated" | "user" | "native" | "repaired";
|
|
9
9
|
export type HostSessionLifecycle = "active" | "archived" | "source-missing" | "resume-unavailable";
|
|
10
|
+
export type HostSessionCommand = "host.setPinned" | "host.rename" | "host.setArchived" | "host.deleteRecord";
|
|
10
11
|
export type HostSessionCollectionScope = {
|
|
11
12
|
kind: "project";
|
|
12
13
|
projectId: ProjectId;
|
|
@@ -23,6 +24,8 @@ export interface HostSessionSummary {
|
|
|
23
24
|
titleSource?: HostSessionTitleSource;
|
|
24
25
|
lastActiveAt: string;
|
|
25
26
|
lifecycle: HostSessionLifecycle;
|
|
27
|
+
/** Host-authorized mutation surface. Renderer commands are a projection of this list. */
|
|
28
|
+
availableCommands: HostSessionCommand[];
|
|
26
29
|
nativeRef?: NativeSessionRef;
|
|
27
30
|
}
|
|
28
31
|
export interface HostSessionProviderDiagnostic {
|
|
@@ -41,7 +41,7 @@ export interface AgentProviderCatalogEntryWire {
|
|
|
41
41
|
category: "coding" | "assistant" | "custom";
|
|
42
42
|
order: number;
|
|
43
43
|
featured: boolean;
|
|
44
|
-
installPolicy: "builtin" | "managed-package";
|
|
44
|
+
installPolicy: "builtin" | "managed-package" | "planned";
|
|
45
45
|
distribution: {
|
|
46
46
|
kind: "builtin";
|
|
47
47
|
} | {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qlogicagent",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.7",
|
|
4
4
|
"description": "XiaozhiClaw Agent CLI — subprocess architecture (JSON-RPC over stdio)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -118,33 +118,6 @@
|
|
|
118
118
|
]
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
|
-
"engines": {
|
|
122
|
-
"node": ">=22.0.0"
|
|
123
|
-
},
|
|
124
|
-
"dependencies": {
|
|
125
|
-
"@agentclientprotocol/sdk": "^0.25.0",
|
|
126
|
-
"@napi-rs/canvas": "0.1.100",
|
|
127
|
-
"@xiaozhiclaw/pet-core": "0.1.3",
|
|
128
|
-
"@xiaozhiclaw/provider-core": "^0.1.26",
|
|
129
|
-
"better-sqlite3": "^12.10.0",
|
|
130
|
-
"dotenv": "^17.3.1",
|
|
131
|
-
"ioredis": "^5.11.1",
|
|
132
|
-
"jsonrepair": "^3.14.0",
|
|
133
|
-
"mcporter": "^0.12.0",
|
|
134
|
-
"nanoid": "^5.1.5",
|
|
135
|
-
"pino": "^9.6.0",
|
|
136
|
-
"pino-pretty": "^13.0.0"
|
|
137
|
-
},
|
|
138
|
-
"devDependencies": {
|
|
139
|
-
"@types/better-sqlite3": "^7.6.13",
|
|
140
|
-
"@types/node": "^22.15.0",
|
|
141
|
-
"esbuild": "^0.28.0",
|
|
142
|
-
"javascript-obfuscator": "^5.4.3",
|
|
143
|
-
"oxlint": "1.67.0",
|
|
144
|
-
"tsx": "^4.19.0",
|
|
145
|
-
"typescript": "^5.9.0",
|
|
146
|
-
"vitest": "^3.1.0"
|
|
147
|
-
},
|
|
148
121
|
"scripts": {
|
|
149
122
|
"dev": "tsx watch src/index.ts",
|
|
150
123
|
"build": "node scripts/build.mjs",
|
|
@@ -177,5 +150,32 @@
|
|
|
177
150
|
"redteam:community-desensitization": "tsx src/runtime/community/community-desensitization-red-team-cli.ts",
|
|
178
151
|
"clean:workspace-hygiene": "node scripts/clean-workspace-hygiene.mjs",
|
|
179
152
|
"release": "node scripts/release.mjs"
|
|
153
|
+
},
|
|
154
|
+
"engines": {
|
|
155
|
+
"node": ">=22.0.0"
|
|
156
|
+
},
|
|
157
|
+
"dependencies": {
|
|
158
|
+
"@agentclientprotocol/sdk": "^0.25.0",
|
|
159
|
+
"@napi-rs/canvas": "0.1.100",
|
|
160
|
+
"@xiaozhiclaw/pet-core": "0.1.3",
|
|
161
|
+
"@xiaozhiclaw/provider-core": "^0.1.26",
|
|
162
|
+
"better-sqlite3": "^12.10.0",
|
|
163
|
+
"dotenv": "^17.3.1",
|
|
164
|
+
"ioredis": "^5.11.1",
|
|
165
|
+
"jsonrepair": "^3.14.0",
|
|
166
|
+
"mcporter": "^0.12.0",
|
|
167
|
+
"nanoid": "^5.1.5",
|
|
168
|
+
"pino": "^9.6.0",
|
|
169
|
+
"pino-pretty": "^13.0.0"
|
|
170
|
+
},
|
|
171
|
+
"devDependencies": {
|
|
172
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
173
|
+
"@types/node": "^22.15.0",
|
|
174
|
+
"esbuild": "^0.28.0",
|
|
175
|
+
"javascript-obfuscator": "^5.4.3",
|
|
176
|
+
"oxlint": "1.67.0",
|
|
177
|
+
"tsx": "^4.19.0",
|
|
178
|
+
"typescript": "^5.9.0",
|
|
179
|
+
"vitest": "^3.1.0"
|
|
180
180
|
}
|
|
181
|
-
}
|
|
181
|
+
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface PseudoToolOutputInput {
|
|
2
|
-
text: string;
|
|
3
|
-
enabledToolNames: readonly string[];
|
|
4
|
-
}
|
|
5
|
-
export interface PseudoToolOutputDetection {
|
|
6
|
-
toolName: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function detectPseudoToolOutput(input: PseudoToolOutputInput): PseudoToolOutputDetection | null;
|