qlogicagent 2.11.6 → 2.11.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Memory CRUD + search handlers extracted from StdioServer.
2
+ * Memory CRUD + search handlers extracted from StdioServer.
3
3
  * Handles: memory.list, memory.read, memory.write, memory.search, memory.delete
4
4
  */
5
5
  import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
@@ -30,15 +30,15 @@ export interface MemoryHandlerHost {
30
30
  sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
31
31
  }
32
32
  export declare function handleMemoryList(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
33
- /** memory.list-files Returns actual topic files from memdir. */
33
+ /** memory.list-files: returns actual topic files from memdir. */
34
34
  export declare function handleMemoryListFiles(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
35
35
  /**
36
- * memory.atlas Returns full L2 vector-memory records (wire-safe, no embedding
36
+ * memory.atlas: returns full L2 vector-memory records (wire-safe, no embedding
37
37
  * blob) plus category roll-ups, for the 3D memory atlas visualization.
38
38
  */
39
39
  export declare function handleMemoryAtlas(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
40
40
  /**
41
- * memory.activity Daily activity counts + highlights over the recent window,
41
+ * memory.activity: daily activity counts + highlights over the recent window,
42
42
  * powering the atlas timeline ticks and the "memory digest" panel.
43
43
  */
44
44
  export declare function handleMemoryActivity(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
@@ -51,11 +51,11 @@ export declare function handleMemorySearch(this: MemoryHandlerHost, msg: AgentRp
51
51
  export declare function handleMemoryDelete(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
52
52
  export declare function handleMemoryUpdate(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
53
53
  /**
54
- * memory.attachment.adopt persist an uploaded素材 into the long-term-memory
54
+ * memory.attachment.adopt: persist an uploaded attachment into the long-term-memory
55
55
  * attachment store from a transient source URL (the gateway's temp MediaStore).
56
56
  * The attachment is an orphan until linked to a memory at consolidate time.
57
57
  */
58
58
  export declare function handleMemoryAttachmentAdopt(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
59
- /** memory.attachment.locate resolve an attachment id to its on-disk path (for serving). */
59
+ /** memory.attachment.locate: resolve an attachment id to its on-disk path (for serving). */
60
60
  export declare function handleMemoryAttachmentLocate(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
61
61
  export {};
@@ -2,9 +2,8 @@
2
2
  * Pet Handler — RPC methods for pet system.
3
3
  *
4
4
  * Methods:
5
- * - pet.hatch: Hatch a new pet (first time) or return existing soul
6
5
  * - pet.interact: Handle user interaction (pat/feed/poke)
7
- * - pet.status: Get current pet soul + stats
6
+ * - pet.status: Get or initialize the shared owner pet soul + stats
8
7
  * - pet.forge: Generate a Petdex asset summary from image/text (P4)
9
8
  */
10
9
  import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
@@ -33,7 +32,6 @@ export interface PetHandlerHost {
33
32
  ensureModelRegistryHydrated?(): Promise<void>;
34
33
  configureTurnMedia?(config: Record<string, unknown> | undefined, turnId: string): void;
35
34
  }
36
- export declare function handlePetHatch(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
37
35
  export declare function handlePetInteract(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
38
36
  export declare function handlePetStatus(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
39
37
  export declare function handlePetPreferencesUpdate(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
@@ -8,6 +8,7 @@ import type { AcpDetector } from "../../runtime/infra/acp-detector.js";
8
8
  import type { AgentConfigStore } from "../../runtime/infra/agent-config-store.js";
9
9
  import { SoloEvaluator } from "../../orchestration/solo-evaluator.js";
10
10
  import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
11
+ export declare const soloProjectMap: Map<string, string>;
11
12
  export interface SoloHandlerHost {
12
13
  soloEvaluator: SoloEvaluator | null;
13
14
  soloProcessManager: AgentProcessManager | null;
@@ -32,5 +32,6 @@ export interface RegisterMemoryToolDeps {
32
32
  memoryProvider: MemoryToolProvider | null;
33
33
  memoryUserId: string;
34
34
  toolCatalog: ToolCatalog;
35
+ sendNotification?: (method: string, params: Record<string, unknown>) => void;
35
36
  }
36
37
  export declare function registerMemoryTool(deps: RegisterMemoryToolDeps): void;
@@ -24,6 +24,7 @@ export interface RuntimeHookBootstrapDeps {
24
24
  transport: LLMTransport;
25
25
  apiKey: string;
26
26
  };
27
+ sendNotification?(method: string, params: Record<string, unknown>): void;
27
28
  }
28
29
  export interface RuntimeHookBootstrapResult {
29
30
  hooks: HookRegistry;
@@ -5,7 +5,6 @@
5
5
  export declare function findGitRoot(cwd: string): Promise<string | null>;
6
6
  /** Create an isolated git worktree. Returns the worktree path. */
7
7
  export declare function createWorktree(gitRoot: string, name: string, baseBranch?: string): Promise<string>;
8
- /** Get a git diff stat from a worktree. */
9
8
  export declare function getWorktreeDiff(worktreePath: string): Promise<string>;
10
9
  /** Remove a git worktree. */
11
10
  export declare function removeWorktree(gitRoot: string, path: string): Promise<void>;
@@ -70,6 +70,11 @@ export declare class SoloEvaluator {
70
70
  * The user chooses which agent in the session performs the evaluation comparison.
71
71
  */
72
72
  triggerEvaluation(soloId: string, evaluatorAgentId: string, evaluatorIndex?: number): Promise<SoloEvaluation>;
73
+ /** Map a spawned member back to its solo run + UI column id (for live delta forwarding). */
74
+ getMemberContext(memberId: string): {
75
+ soloId: string;
76
+ displayId: string;
77
+ } | null;
73
78
  /** Get the current status of a solo session. */
74
79
  getStatus(soloId: string): SoloStatus | null;
75
80
  /** Cancel a running solo session. Kill all agents and clean up worktrees. */
@@ -594,8 +594,6 @@ export interface MemorySearchParams {
594
594
  query: string;
595
595
  /** Max results (default 10). */
596
596
  limit?: number;
597
- /** Filter by userId (defaults to current session user). */
598
- userId?: string;
599
597
  }
600
598
  export interface MemorySearchResult {
601
599
  results: Array<{
@@ -33,8 +33,8 @@ export interface AcpBackendConfig {
33
33
  /** Official-logo key for AgentBrandIcon. */
34
34
  brandId?: string;
35
35
  /** Real-world usage scenario for grouping in the discover UI (not a capability tag). */
36
- category?: "coding" | "writing" | "design" | "creative" | "research";
37
- /** How the agent is driven in-app: "acp" via the ACP adapter, "custom" via a dedicated adapter (e.g. Trae). */
36
+ category?: "coding" | "writing" | "design" | "creative" | "research" | "assistant";
37
+ /** How the agent is driven in-app: "acp" via the ACP adapter, "custom" via a dedicated non-ACP adapter. */
38
38
  integration?: "acp" | "custom";
39
39
  /** Where the injected key comes from: gateway-issued (llmrouter), the user's direct third-party key, or none (OAuth). */
40
40
  keySource?: "llmrouter" | "direct" | "none";
@@ -56,7 +56,6 @@ export interface MemoryCandidateWire {
56
56
  reason?: string;
57
57
  }
58
58
  export interface MemoryTextMutationParams {
59
- userId?: string;
60
59
  text?: string;
61
60
  category?: string;
62
61
  importance?: number;
@@ -583,7 +582,6 @@ export interface GatewayRpcMethodMap {
583
582
  };
584
583
  "memory.atlas": {
585
584
  params: {
586
- userId?: string;
587
585
  pageSize?: number;
588
586
  windowStartAt?: number;
589
587
  windowEndAt?: number;
@@ -650,7 +648,6 @@ export interface GatewayRpcMethodMap {
650
648
  };
651
649
  "memory.activity": {
652
650
  params: {
653
- userId?: string;
654
651
  days?: number;
655
652
  };
656
653
  result: {
@@ -669,7 +666,6 @@ export interface GatewayRpcMethodMap {
669
666
  };
670
667
  "memory.observe": {
671
668
  params: {
672
- userId?: string;
673
669
  text: string;
674
670
  category?: string;
675
671
  importance?: number;
@@ -708,7 +704,6 @@ export interface GatewayRpcMethodMap {
708
704
  };
709
705
  "memory.update": {
710
706
  params: {
711
- userId?: string;
712
707
  id: string;
713
708
  text?: string;
714
709
  category?: string;
@@ -724,7 +719,6 @@ export interface GatewayRpcMethodMap {
724
719
  };
725
720
  "memory.attachment.adopt": {
726
721
  params: {
727
- userId?: string;
728
722
  tempUrl: string;
729
723
  filename?: string;
730
724
  mimeType?: string;
@@ -8,10 +8,10 @@
8
8
  */
9
9
  import type { AcpBackendConfig, AgentDescriptor, AgentConfigStoreData } from "../../protocol/wire/acp-agent-management.js";
10
10
  export declare const ACP_BACKENDS: Record<string, AcpBackendConfig>;
11
- export declare const AGENT_CATALOG_IDS: readonly ["claude", "codex", "gemini", "copilot", "cursor", "qwen", "kimi", "glm", "opencode", "kiro", "qoder", "auggie", "trae"];
12
- /** Merged catalog entry (base ACP/Trae config + grid/install metadata) for one id. */
11
+ export declare const AGENT_CATALOG_IDS: readonly ["claude", "codex", "gemini", "copilot", "cursor", "qwen", "kimi", "glm", "opencode", "kiro", "qoder", "openclaw", "hermes"];
12
+ /** Merged catalog entry (base ACP config + grid/install metadata) for one id. */
13
13
  export declare function getCatalogEntry(id: string): AcpBackendConfig | undefined;
14
- /** Ordered curated catalog: base ACP config (or Trae base) merged with grid/install metadata. */
14
+ /** Ordered curated catalog: base ACP config merged with grid/install metadata. */
15
15
  export declare function getAgentCatalog(): AcpBackendConfig[];
16
16
  export declare function resolveWindowsCopilotLoader(): string | null;
17
17
  export declare function normalizeWindowsAcpCommand(cliPath: string, args: string[]): {
@@ -47,6 +47,14 @@ export interface CatalogKeySources {
47
47
  llmrouterBaseUrl?: string;
48
48
  /** Resolve a provider's direct third-party key for keySource:"direct". */
49
49
  getDirectKey?: (providerId: string) => string | null | undefined;
50
+ /** The host's active text-generation model (deepseek / volcengine / …) to "pass through" to
51
+ * OpenAI-compatible spawned agents (codex/qwen/opencode) that resolve no key of their own — so
52
+ * they run on the configured key+baseUrl+model with zero per-agent credentials. */
53
+ passthroughModel?: {
54
+ apiKey: string;
55
+ baseUrl?: string;
56
+ model?: string;
57
+ };
50
58
  }
51
59
  /**
52
60
  * Resolve the login-free key env for a catalog agent from the unified key sources.
@@ -68,8 +76,6 @@ export declare class AcpDetector {
68
76
  setConfigStore(data: AgentConfigStoreData): void;
69
77
  /** Wire the unified key sources for login-free catalog injection. */
70
78
  setKeySources(sources: CatalogKeySources): void;
71
- /** Login-free key env for a catalog agent (used by non-ACP adapters, e.g. Trae). */
72
- getCatalogKeyEnv(agentId: string): Record<string, string>;
73
79
  /**
74
80
  * Scan for installed ACP agent CLIs.
75
81
  * @param force - Clear cache and re-scan.
@@ -82,6 +88,18 @@ export declare class AcpDetector {
82
88
  private detectBackend;
83
89
  private detectCustomAgent;
84
90
  private hasAgentConfig;
91
+ /**
92
+ * Descriptor for qlogicagent participating in Solo/Product as a self-hosted ACP agent.
93
+ *
94
+ * qlogicagent's own CLI speaks ACP by default (cli/main.ts: ACP server unless --no-acp), so a
95
+ * participant is just another `node <cli.js>` process. The child reads the SAME owner-profile
96
+ * settings.json (model-registry), so it runs with the configured provider (deepseek / volcengine /
97
+ * llmrouter) — that is how the configured model "passes through" to every qlogicagent instance,
98
+ * with no per-agent key. We forward the owner-profile + llmrouter env so the child resolves its
99
+ * model identically to this (host) process. This lets Solo run N independent qlogicagent sessions
100
+ * in parallel (each its own worktree) — the core "多个 qlogicagent = 多会话并行" use case.
101
+ */
102
+ private buildSelfDescriptor;
85
103
  /**
86
104
  * Build an ExternalAgentDescriptor suitable for AgentProcessManager.spawn().
87
105
  * Returns null if the agent is not available.
@@ -79,7 +79,7 @@ export declare class AcpAuthRequiredError extends Error {
79
79
  * message text) and convert it to an {@link AcpAuthRequiredError} whose message tells the user how
80
80
  * to log in (from the agent's own authMethod description). Returns null for any other error.
81
81
  */
82
- export declare function asAuthRequiredError(err: unknown): AcpAuthRequiredError | null;
82
+ export declare function asAuthRequiredError(err: unknown, fallbackAuthMethods?: AcpAuthMethod[]): AcpAuthRequiredError | null;
83
83
  export declare class AcpProtocolAdapter {
84
84
  private conn;
85
85
  private child;
@@ -22,8 +22,8 @@ export declare class AgentConfigStore {
22
22
  removeAgentConfig(agentId: string): Promise<void>;
23
23
  getGatewayUrl(): string | undefined;
24
24
  setGatewayUrl(url: string): Promise<void>;
25
- registerCustomAgent(def: CustomAgentDef): void;
26
- unregisterCustomAgent(agentId: string): void;
25
+ registerCustomAgent(def: CustomAgentDef): Promise<void>;
26
+ unregisterCustomAgent(agentId: string): Promise<void>;
27
27
  getCustomAgents(): Record<string, CustomAgentDef>;
28
28
  /** Save to user-level config. Restricts permissions for sensitive data. */
29
29
  private save;
@@ -15,6 +15,14 @@ export declare function createProject(params: {
15
15
  skipAutoSwitch?: boolean;
16
16
  }): ProjectInfo;
17
17
  export declare function listProjects(): ProjectInfo[];
18
+ /**
19
+ * True when another project (active OR archived) still references this workspaceDir. Solo/Product
20
+ * plan projects deliberately share their host project's workspaceDir — the run executes inside the
21
+ * user's real workspace, isolated per-agent via git worktrees — so deleting one plan project must
22
+ * never rmSync the shared directory: that would wipe the host project and every sibling plan. Pass
23
+ * excludeProjectId to ignore a project that's still in the store at check time.
24
+ */
25
+ export declare function isWorkspaceDirShared(workspaceDir: string, excludeProjectId?: string): boolean;
18
26
  export declare function getActiveProject(): ProjectInfo | null;
19
27
  export declare function getDefaultProject(): ProjectInfo | null;
20
28
  export declare function getProjectById(projectId: string): ProjectInfo | null;
@@ -5,7 +5,7 @@ export declare class PetSoulService {
5
5
  private profileService;
6
6
  constructor(_workspaceDir: string, ownerUserId?: string);
7
7
  load(): PetSoul | null;
8
- hatch(userId: string, generateSoul?: (rarity: string, stats: PetStats) => Promise<{
8
+ ensureSoul(userId: string, generateSoul?: (rarity: string, stats: PetStats) => Promise<{
9
9
  name: string;
10
10
  personality: string;
11
11
  catchphrase: string;
@@ -12,6 +12,7 @@ export interface ToolNameLike {
12
12
  export interface FreshWorkspaceEvidencePolicy {
13
13
  requiresFreshTool: boolean;
14
14
  reason?: "file-read" | "file-mutation" | "memory-mutation" | "media-generation" | "directory-list" | "content-search" | "shell" | "web";
15
+ mediaKind?: "image" | "tts" | "music";
15
16
  allowedToolNames: string[];
16
17
  }
17
18
  export declare function getFreshWorkspaceEvidencePolicy(messages: readonly PromptMessageLike[] | string): FreshWorkspaceEvidencePolicy;
@@ -24,6 +24,9 @@ export interface SessionMetadata {
24
24
  createdAt: string;
25
25
  lastActiveAt: string;
26
26
  model?: string;
27
+ /** Agent that owns this session (e.g. "qlogicagent", "codex"). Locked on the first message so
28
+ * re-entering the session always resumes with the same agent, never falling back to default. */
29
+ agentId?: string;
27
30
  cwd?: string;
28
31
  turnCount: number;
29
32
  messageCount: number;
@@ -56,10 +59,20 @@ export interface PersistedSession {
56
59
  metadata: SessionMetadata;
57
60
  messages: PersistedChatMessage[];
58
61
  }
62
+ export interface MessageDisplayMetadata {
63
+ messageId?: string;
64
+ platform?: string;
65
+ sourceChannel?: string;
66
+ source?: string;
67
+ chatId?: string;
68
+ userId?: string;
69
+ userName?: string;
70
+ }
59
71
  export interface PersistedChatMessage extends ChatMessage {
60
72
  timestamp?: string;
61
73
  turnId?: string;
62
74
  usage?: TokenUsage;
75
+ displayMetadata?: MessageDisplayMetadata;
63
76
  }
64
77
  export interface SessionListEntry {
65
78
  sessionId: string;
@@ -67,6 +80,7 @@ export interface SessionListEntry {
67
80
  lastActiveAt: string;
68
81
  messageCount: number;
69
82
  model?: string;
83
+ agentId?: string;
70
84
  pinnedAt?: string;
71
85
  archivedAt?: string;
72
86
  sealedAt?: string;
@@ -93,6 +107,7 @@ export declare function getSessionMetadata(sessionId: string, projectRoot: strin
93
107
  */
94
108
  export declare function appendMessage(sessionId: string, message: ChatMessage, projectRoot: string, turnId?: string, metadata?: {
95
109
  usage?: TokenUsage;
110
+ displayMetadata?: MessageDisplayMetadata;
96
111
  }): Promise<boolean>;
97
112
  /**
98
113
  * Save session metadata + usage stats atomically (flat structure).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qlogicagent",
3
- "version": "2.11.6",
3
+ "version": "2.11.8",
4
4
  "description": "XiaozhiClaw Agent CLI — subprocess architecture (JSON-RPC over stdio)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,31 +0,0 @@
1
- export interface TraeProc {
2
- stdout?: {
3
- on(ev: "data", cb: (c: Buffer | string) => void): void;
4
- } | null;
5
- stderr?: {
6
- on(ev: "data", cb: (c: Buffer | string) => void): void;
7
- } | null;
8
- on(ev: "close", cb: (code: number | null) => void): void;
9
- on(ev: "error", cb: (e: Error) => void): void;
10
- kill(signal?: string): void;
11
- }
12
- export type TraeSpawn = (command: string, args: string[], opts: {
13
- cwd?: string;
14
- env?: Record<string, string>;
15
- }) => TraeProc;
16
- export interface TraeTurnOptions {
17
- cliCommand?: string;
18
- cwd?: string;
19
- env?: Record<string, string>;
20
- provider?: string;
21
- model?: string;
22
- timeoutMs?: number;
23
- spawnImpl?: TraeSpawn;
24
- }
25
- export interface TraeTurnResult {
26
- ok: boolean;
27
- content: string;
28
- error?: string;
29
- }
30
- /** Run one Trae turn (`trae-cli run "<prompt>"`) and return its captured output. */
31
- export declare function runTraeTurn(prompt: string, opts?: TraeTurnOptions): Promise<TraeTurnResult>;
@@ -1,53 +0,0 @@
1
- import type { PortableTool } from "../portable-tool.js";
2
- export declare const NOTIFY_TOOL_NAME: "notify";
3
- export interface NotifyToolParams {
4
- /** Notification message */
5
- message: string;
6
- /** Optional title/subject */
7
- title?: string;
8
- /** Priority level */
9
- priority?: "low" | "normal" | "high";
10
- /** Target channel override (default: user's primary channel) */
11
- channel?: string;
12
- }
13
- export declare const NOTIFY_TOOL_SCHEMA: {
14
- readonly type: "object";
15
- readonly properties: {
16
- readonly message: {
17
- readonly type: "string";
18
- readonly description: "Notification content to send to the user.";
19
- };
20
- readonly title: {
21
- readonly type: "string";
22
- readonly description: "Optional notification title/subject line.";
23
- };
24
- readonly priority: {
25
- readonly type: "string";
26
- readonly enum: readonly ["low", "normal", "high"];
27
- readonly description: "Notification priority (default: normal). High may trigger sound/vibration.";
28
- };
29
- readonly channel: {
30
- readonly type: "string";
31
- readonly description: "Target delivery channel (e.g. 'wechat', 'feishu', 'discord'). Default: user's primary.";
32
- };
33
- };
34
- readonly required: readonly ["message"];
35
- };
36
- export interface NotifyResult {
37
- delivered: boolean;
38
- channel: string;
39
- error?: string;
40
- }
41
- /**
42
- * Host-provided notification delivery backend.
43
- */
44
- export interface NotifyToolDeps {
45
- /** Send notification to user. Host routes to correct platform. */
46
- sendNotification(params: {
47
- message: string;
48
- title?: string;
49
- priority?: string;
50
- channel?: string;
51
- }): Promise<NotifyResult>;
52
- }
53
- export declare function createNotifyTool(deps: NotifyToolDeps): PortableTool<NotifyToolParams>;