qlogicagent 2.19.1 → 2.19.2
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-contract.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/host-contract.js +1 -1
- package/dist/host-session-collection-contract.js +1 -0
- package/dist/index.js +478 -505
- package/dist/pet-host.js +8 -8
- package/dist/project-memory-host.js +23 -23
- package/dist/protocol.js +1 -1
- package/dist/types/cli/acp-commands.d.ts +1 -1
- package/dist/types/cli/acp-extended-handlers.d.ts +2 -8
- package/dist/types/cli/acp-extended-host-adapter.d.ts +0 -11
- package/dist/types/cli/acp-session-host.d.ts +2 -0
- package/dist/types/cli/core-tool-coordinator.d.ts +0 -9
- package/dist/types/cli/default-project-bootstrap.d.ts +2 -32
- package/dist/types/cli/handlers/session-handler.d.ts +0 -43
- package/dist/types/cli/handlers/solo-handler.d.ts +3 -14
- package/dist/types/cli/multi-agent-handler-host.d.ts +3 -16
- package/dist/types/cli/product-coordinator.d.ts +3 -14
- package/dist/types/cli/rpc-registry.d.ts +0 -2
- package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +4 -1
- package/dist/types/cli/stdio-server.d.ts +1 -2
- package/dist/types/host-contract/index.d.ts +110 -18
- package/dist/types/host-session-collection-contract.d.ts +61 -0
- package/dist/types/orchestration/agent-instance.d.ts +4 -11
- package/dist/types/orchestration/agent-roster.d.ts +4 -4
- package/dist/types/orchestration/delegate-bridge.d.ts +8 -0
- package/dist/types/orchestration/goal-mode-adapters.d.ts +3 -3
- package/dist/types/orchestration/product-persistence.d.ts +0 -4
- package/dist/types/orchestration/product-planner.d.ts +4 -6
- package/dist/types/orchestration/solo-evaluator.d.ts +2 -5
- package/dist/types/orchestration/testing/delegate-test-bridge.d.ts +2 -1
- package/dist/types/orchestration/testing/host-agent-provider-directory-fixture.d.ts +7 -0
- package/dist/types/orchestration/workflow/qla-executor-host.d.ts +1 -1
- package/dist/types/protocol/agent-contract.d.ts +9 -3
- package/dist/types/protocol/methods.d.ts +20 -38
- package/dist/types/protocol/notifications.d.ts +1 -1
- package/dist/types/protocol/wire/acp-agent-management.d.ts +2 -190
- package/dist/types/protocol/wire/acp-protocol.d.ts +0 -4
- package/dist/types/protocol/wire/agent-methods.d.ts +1 -243
- package/dist/types/protocol/wire/gateway-rpc.d.ts +343 -15
- package/dist/types/protocol/wire/index.d.ts +3 -3
- package/dist/types/protocol/wire/notification-payloads.d.ts +48 -134
- package/dist/types/runtime/infra/host-agent-provider-directory.d.ts +17 -0
- package/dist/types/runtime/infra/project-authority-facade.d.ts +1 -1
- package/dist/types/runtime/infra/project-data-paths.d.ts +2 -1
- package/dist/types/runtime/infra/project-host-authority.d.ts +3 -2
- package/dist/types/runtime/infra/project-store.d.ts +4 -39
- package/dist/types/runtime/session/session-catalog.d.ts +0 -12
- package/dist/types/runtime/session/session-persistence.d.ts +1 -1
- package/dist/types/runtime/session/session-resource-key.d.ts +1 -1
- package/dist/types/runtime/session/session-types.d.ts +0 -23
- package/dist/types/transport/acp-server.d.ts +2 -10
- package/dist/workflow-host.js +10 -10
- package/package.json +8 -1
- package/dist/types/cli/agent-config-coordinator.d.ts +0 -27
- package/dist/types/cli/agent-config-runtime.d.ts +0 -11
- package/dist/types/cli/agent-status-notifier.d.ts +0 -11
- package/dist/types/cli/handlers/agents-handler.d.ts +0 -126
- package/dist/types/cli/handlers/project-handler.d.ts +0 -36
- package/dist/types/cli/project-command-service.d.ts +0 -28
- package/dist/types/orchestration/delegation-coordinator.d.ts +0 -100
- package/dist/types/runtime/infra/acp-detector.d.ts +0 -273
- package/dist/types/runtime/infra/agent-config-store.d.ts +0 -30
- package/dist/types/runtime/infra/agent-install-runner.d.ts +0 -80
- package/dist/types/runtime/infra/external-agent-approvals.d.ts +0 -59
- package/dist/types/runtime/infra/migrate-device-scope.d.ts +0 -49
- package/dist/types/runtime/infra/project-data-gc.d.ts +0 -15
- package/dist/types/runtime/session/native/claude-session-source.d.ts +0 -23
- package/dist/types/runtime/session/native/codex-index.d.ts +0 -21
- package/dist/types/runtime/session/native/codex-session-source.d.ts +0 -31
- package/dist/types/runtime/session/native/cwd-normalize.d.ts +0 -53
- package/dist/types/runtime/session/native/ephemeral-rollout-sweep.d.ts +0 -13
- package/dist/types/runtime/session/native/native-cwd-agents.d.ts +0 -17
- package/dist/types/runtime/session/native/native-session-source.d.ts +0 -89
- package/dist/types/runtime/session/native/native-title.d.ts +0 -1
- package/dist/types/runtime/session/native/register-builtin-sources.d.ts +0 -1
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
*
|
|
11
11
|
* projectId is the PATH-DERIVED key (deriveProjectId(workspaceDir), see agent-paths) — the
|
|
12
12
|
* mainstream model (VS Code / cc-haha): same folder → same id, deterministic, recomputable, no
|
|
13
|
-
* central-registry dependency for the storage key.
|
|
13
|
+
* central-registry dependency for the storage key. Only the Gateway archive-only internal-data
|
|
14
|
+
* transaction may remove projectData/<id>; qlogicagent has no lifecycle deletion authority.
|
|
14
15
|
*/
|
|
15
16
|
export { getProjectDataDirById, getProjectDataRoot } from "./agent-paths.js";
|
|
16
17
|
/** `~/.qlogicagent/projectData/<projectId>/` for a projectId or workspaceDir. */
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import type { HostProjectInfo, HostProjectSnapshotResult } from "../../host-contract/index.js";
|
|
3
3
|
import type { HostProjectClient } from "../../transport/host-project-client.js";
|
|
4
4
|
export declare function configureHostProjectAuthority(resolver: () => HostProjectClient | undefined): void;
|
|
5
|
-
export declare function hasHostProjectAuthority(): boolean;
|
|
6
5
|
export declare function hydrateHostProjectSnapshot(): Promise<void>;
|
|
7
|
-
export declare function readHostProjectSnapshot(): HostProjectSnapshotResult
|
|
6
|
+
export declare function readHostProjectSnapshot(): HostProjectSnapshotResult;
|
|
7
|
+
/** Test-only snapshot injection; production must hydrate through HostProjectClient. */
|
|
8
|
+
export declare function setHostProjectSnapshotForTests(next: HostProjectSnapshotResult): void;
|
|
8
9
|
export declare function createHostProject(params: Parameters<HostProjectClient["create"]>[0]): Promise<HostProjectInfo>;
|
|
9
10
|
export declare function switchHostProject(projectIdOrQuery: string): Promise<HostProjectInfo>;
|
|
10
11
|
export declare function updateHostProject(projectId: string, patch: Parameters<HostProjectClient["update"]>[1]): Promise<HostProjectInfo>;
|
|
@@ -1,48 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Read-only ExtHost-style Project projection.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Direction A: Agent is the source of truth for project state.
|
|
8
|
-
*/
|
|
9
|
-
import type { ProjectInfo, ProjectType } from "../../protocol/methods.js";
|
|
10
|
-
/**
|
|
11
|
-
* Rebuild projects.json from the per-project `project.json` back-refs (the durable truth). Self-heals
|
|
12
|
-
* a lost/corrupted index: any projectData/<id> with a back-ref not present in projects.json is
|
|
13
|
-
* re-added. Called at startup before the default-project bootstrap.
|
|
4
|
+
* Gateway owns the durable registry and every lifecycle mutation. qlogicagent
|
|
5
|
+
* may only read the snapshot hydrated through x/host.request.
|
|
14
6
|
*/
|
|
15
|
-
|
|
16
|
-
export declare function createProject(params: {
|
|
17
|
-
name: string;
|
|
18
|
-
workspaceDir: string;
|
|
19
|
-
type?: ProjectType;
|
|
20
|
-
groupId?: string;
|
|
21
|
-
skipAutoSwitch?: boolean;
|
|
22
|
-
}): ProjectInfo;
|
|
7
|
+
import type { ProjectInfo } from "../../protocol/methods.js";
|
|
23
8
|
export declare function listProjects(): ProjectInfo[];
|
|
24
9
|
export declare function getActiveProject(): ProjectInfo | null;
|
|
25
10
|
export declare function getDefaultProject(): ProjectInfo | null;
|
|
26
11
|
export declare function getProjectById(projectId: string): ProjectInfo | null;
|
|
27
|
-
export declare function updateProject(projectId: string, patch: Partial<Pick<ProjectInfo, "planStatus" | "planAgents" | "planWinnerId" | "leaderSessionId" | "primaryWorkflowId">>): boolean;
|
|
28
|
-
export declare function switchProject(projectId: string): ProjectInfo | null;
|
|
29
|
-
export declare function deleteProject(projectId: string): {
|
|
30
|
-
deleted: boolean;
|
|
31
|
-
switchedTo?: ProjectInfo;
|
|
32
|
-
};
|
|
33
|
-
export declare function getOrCreateDefaultProject(defaultWorkspaceDir: string): ProjectInfo;
|
|
34
|
-
export declare function renameProject(projectId: string, newName: string): ProjectInfo | null;
|
|
35
|
-
export declare function updateProjectWorkspaceDir(projectId: string, newDir: string): boolean;
|
|
36
|
-
export declare function archiveProject(projectId: string): {
|
|
37
|
-
archived: boolean;
|
|
38
|
-
switchedTo?: ProjectInfo;
|
|
39
|
-
};
|
|
40
|
-
export declare function unarchiveProject(projectId: string): ProjectInfo | null;
|
|
41
12
|
export declare function findByGroupId(groupId: string): ProjectInfo | null;
|
|
42
|
-
/**
|
|
43
|
-
* Find the active project whose workspaceDir resolves to `dir` (case-insensitive, path-resolved).
|
|
44
|
-
* Used to gate adoption of externally-supplied working directories (ACP session cwd, turn
|
|
45
|
-
* config.workdir): the active tool workdir must always be a registered project's workspaceDir, so
|
|
46
|
-
* a cwd that maps to no project is ignored rather than silently leaking files outside any project.
|
|
47
|
-
*/
|
|
48
13
|
export declare function findByWorkspaceDir(dir: string): ProjectInfo | null;
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import type { SessionListEntry } from "./session-types.js";
|
|
2
2
|
export declare function listSessions(limit: number | undefined, projectRoot: string): Promise<SessionListEntry[]>;
|
|
3
3
|
export declare function deleteSession(sessionId: string, projectRoot: string): Promise<void>;
|
|
4
|
-
/**
|
|
5
|
-
* Authoritative "already ours" id set for the lazy-migration discovery scan: every session id and
|
|
6
|
-
* bound native id recorded for `agentId` in this project — including ARCHIVED records, which the
|
|
7
|
-
* list pipeline filters out of its window.
|
|
8
|
-
*
|
|
9
|
-
* listSessions' windowed result must NOT be used for discovery dedup: it truncates (limit) and
|
|
10
|
-
* post-filters (archived), so an adopted session pushed out of the window would be "re-discovered"
|
|
11
|
-
* as a second entry — and a resume on that duplicate would fork a second canonical record for the
|
|
12
|
-
* same native conversation. This enumerates metadata.json only (no transcript counting), and
|
|
13
|
-
* callers only pay for it when the scan actually yielded candidates.
|
|
14
|
-
*/
|
|
15
|
-
export declare function collectAdoptedNativeIds(agentId: string, projectRoot: string): Promise<Set<string>>;
|
|
16
4
|
/**
|
|
17
5
|
* ⚠️ Destructive cascade with NO user-visible confirmation: every pruned session goes through
|
|
18
6
|
* deleteSession, which permanently removes its transcript + metadata + checkpoints + uploads.
|
|
@@ -29,6 +29,6 @@ export declare function loadSessionForResume(sessionId: string, projectRoot: str
|
|
|
29
29
|
export declare function saveSessionState(sessionId: string, usageSnapshot: SessionUsageSnapshot, metadata: SessionStateSaveMetadata, projectRoot: string): Promise<void>;
|
|
30
30
|
export declare function updateSessionMetadata(sessionId: string, patch: SessionMetadataPatch, projectRoot: string): Promise<import("./session-types.js").SessionMetadata | null>;
|
|
31
31
|
export { getSessionMetadata, readSessionMetadata };
|
|
32
|
-
export {
|
|
32
|
+
export { deleteSession, listSessions, pruneOldSessions } from "./session-catalog.js";
|
|
33
33
|
export { generateSessionTitle, maybeGenerateTaskSummary, shouldGenerateTaskSummary, } from "./session-summary.js";
|
|
34
34
|
export { SESSION_SCHEMA_VERSION, type MessageDisplayMetadata, type PersistedChatMessage, type PersistedSession, type SessionListEntry, type SessionMetadata, type TaskSummaryDeps, } from "./session-types.js";
|
|
@@ -9,7 +9,7 @@ export interface SessionResource {
|
|
|
9
9
|
agentId: string;
|
|
10
10
|
/** Owning project id (path-derived / opaque; not minted here). */
|
|
11
11
|
projectId: string;
|
|
12
|
-
/** Our-minted session id, stable from creation
|
|
12
|
+
/** Our-minted session id, stable from creation; native identity is held by Gateway Host state. */
|
|
13
13
|
canonicalSessionId: string;
|
|
14
14
|
}
|
|
15
15
|
/** Serialize the canonical session resource to its single opaque key string. */
|
|
@@ -18,25 +18,6 @@ export interface InflightTurnMarker {
|
|
|
18
18
|
/** 该轮是否已执行过有副作用的工具(写文件/发消息/外部 API)。安全档不据此自动续,仅用于 UI"可能重复"提示 + 为智能档铺路。 */
|
|
19
19
|
hadSideEffectTool?: boolean;
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Native (codex/claude) session binding — present only on native sessions, written once the
|
|
23
|
-
* external agent reports its own session id (Y). Our `sessionId` stays the canonical identity;
|
|
24
|
-
* `nativeSessionId` is an ATTRIBUTE used ONLY when talking to the external CLI (ACP session/load),
|
|
25
|
-
* never as a map/pool/list key. `nativeRef` independently locates the external transcript file so
|
|
26
|
-
* content loads (and the binding is recoverable) without relying on `sessionId === nativeSessionId`.
|
|
27
|
-
*/
|
|
28
|
-
export interface NativeBinding {
|
|
29
|
-
/** External agent's own session id (Y) — used only for ACP session/load resume. */
|
|
30
|
-
nativeSessionId: string;
|
|
31
|
-
/** Locator for the external transcript file (loadTranscript + binding-loss fallback). */
|
|
32
|
-
nativeRef: {
|
|
33
|
-
agentId: string;
|
|
34
|
-
kind: "codex" | "claude";
|
|
35
|
-
file: string;
|
|
36
|
-
};
|
|
37
|
-
/** ISO time the binding was established (first turn the external agent reported Y). */
|
|
38
|
-
boundAt: string;
|
|
39
|
-
}
|
|
40
21
|
export interface SessionMetadata {
|
|
41
22
|
schemaVersion?: number;
|
|
42
23
|
sessionId: string;
|
|
@@ -71,8 +52,6 @@ export interface SessionMetadata {
|
|
|
71
52
|
interruptedTurnCount?: number;
|
|
72
53
|
/** 达熔断阈值放弃恢复的时间戳(UI 显示"多次中断已停止自动恢复")。 */
|
|
73
54
|
recoveryAbandonedAt?: string;
|
|
74
|
-
/** native(codex/claude)会话绑定:外部 Y + nativeRef;own 会话恒 undefined。见 {@link NativeBinding}。 */
|
|
75
|
-
nativeBinding?: NativeBinding;
|
|
76
55
|
}
|
|
77
56
|
export interface PersistedSession {
|
|
78
57
|
metadata: SessionMetadata;
|
|
@@ -123,8 +102,6 @@ export interface SessionListEntry {
|
|
|
123
102
|
groupKey?: string;
|
|
124
103
|
previousSessionId?: string;
|
|
125
104
|
carryoverSummary?: string | null;
|
|
126
|
-
/** N4: native (codex/claude) binding, surfaced so session.list can shape source:"native" + nativeRef. */
|
|
127
|
-
nativeBinding?: NativeBinding;
|
|
128
105
|
}
|
|
129
106
|
export interface TaskSummaryDeps {
|
|
130
107
|
transport: import("../ports/index.js").LLMTransport;
|
|
@@ -74,7 +74,6 @@ export interface AcpRequestHandler {
|
|
|
74
74
|
ok: boolean;
|
|
75
75
|
summary?: string;
|
|
76
76
|
}>;
|
|
77
|
-
handleAcpAgentsList(): Promise<unknown>;
|
|
78
77
|
handleAcpSoloStart(params: Record<string, unknown>): Promise<unknown>;
|
|
79
78
|
handleAcpSoloStatus(params: Record<string, unknown>): Promise<unknown>;
|
|
80
79
|
handleAcpSoloSelect(params: Record<string, unknown>): Promise<unknown>;
|
|
@@ -106,9 +105,6 @@ export interface AcpRequestHandler {
|
|
|
106
105
|
handleAcpGoalMessage(params: Record<string, unknown>): Promise<unknown>;
|
|
107
106
|
handleAcpGoalSubscribe(params: Record<string, unknown>): Promise<unknown>;
|
|
108
107
|
handleAcpGoalEvents(params: Record<string, unknown>): Promise<unknown>;
|
|
109
|
-
handleAcpMentionDelegate(params: Record<string, unknown>): Promise<unknown>;
|
|
110
|
-
handleAcpMentionCancel(params: Record<string, unknown>): Promise<unknown>;
|
|
111
|
-
handleAcpMentionList(params: Record<string, unknown>): Promise<unknown>;
|
|
112
108
|
}
|
|
113
109
|
export interface AcpServerConfig {
|
|
114
110
|
verbose?: boolean;
|
|
@@ -148,7 +144,7 @@ export declare class AcpServer {
|
|
|
148
144
|
/**
|
|
149
145
|
* S3a 跨进程 delegate 客户端(泛化本类的 outbound-request 底座;设计 §5.1)。与审批 outboundRequestMap
|
|
150
146
|
* 并存:x/delegate 用 `del-*` rpc id,审批用 `perm-*`,handleResponse 先问 delegate 再落审批,互不干扰。
|
|
151
|
-
*
|
|
147
|
+
* All orchestration stations call this client through the authority-neutral DelegateBridge.
|
|
152
148
|
*/
|
|
153
149
|
private readonly delegateClient;
|
|
154
150
|
/** Coordinator-owned client reference; AcpServer only offers its response-claim seam. */
|
|
@@ -187,11 +183,7 @@ export declare class AcpServer {
|
|
|
187
183
|
supportsHostRequestService(service: HostRequestService): boolean;
|
|
188
184
|
/** Capability snapshot consumed by the coordinator-owned HostRequestClient. */
|
|
189
185
|
get hostRequestCapability(): unknown;
|
|
190
|
-
/**
|
|
191
|
-
* S3a 跨进程 delegate 客户端(leader 侧接缝)。S3c 接线:DelegationCoordinator.delegate() 改为
|
|
192
|
-
* 铸 delegationId → `server.delegate.delegate({delegationId,to,input,session,opts}, sink)` 上行 x/delegate、
|
|
193
|
-
* 消费 x/delegate.update 下行喂规划环/RunStateStore(delegation-coordinator.ts:87 复用点)。本 S3a 只交付+测,不切。
|
|
194
|
-
*/
|
|
186
|
+
/** Cross-process delegate client used by orchestration stations through DelegateBridge. */
|
|
195
187
|
get delegate(): DelegateClient;
|
|
196
188
|
/** Whether a session id has been registered via session/new on this connection. */
|
|
197
189
|
hasSession(sessionId: string): boolean;
|