qlogicagent 2.19.6 → 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.
|
@@ -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 {
|