qlogicagent 2.11.7 → 2.11.9
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 +6 -6
- package/dist/cli.js +259 -259
- package/dist/index.js +258 -258
- package/dist/types/cli/handlers/pet-handler.d.ts +1 -3
- package/dist/types/cli/handlers/solo-handler.d.ts +1 -0
- package/dist/types/cli/media-runtime-facade.d.ts +1 -0
- package/dist/types/cli/tool-result-processor.d.ts +1 -1
- package/dist/types/runtime/infra/agent-config-store.d.ts +2 -2
- package/dist/types/runtime/infra/media-persistence.d.ts +1 -0
- package/dist/types/runtime/infra/project-store.d.ts +8 -0
- package/dist/types/runtime/pet/pet-soul-service.d.ts +1 -1
- package/dist/types/runtime/prompt/fresh-workspace-evidence.d.ts +1 -0
- package/dist/types/runtime/session/session-persistence.d.ts +15 -0
- package/package.json +23 -23
|
@@ -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
|
|
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;
|
|
@@ -14,6 +14,7 @@ export declare function setMediaClientConfig(client: MediaClient | undefined, ap
|
|
|
14
14
|
model: string;
|
|
15
15
|
}>>, onMediaProgress?: (taskId: string, mediaType: string, percent: number, status: string, provider?: string) => void): void;
|
|
16
16
|
export declare function getMediaRuntimeContext(): MediaFileServiceContext;
|
|
17
|
+
export declare function runWithMediaOutputDir<T>(outputDir: string | undefined, fn: () => Promise<T>): Promise<T>;
|
|
17
18
|
export declare function generateMedia(request: MediaRequest): Promise<MediaResult>;
|
|
18
19
|
/**
|
|
19
20
|
* Ensure an image size satisfies the resolved model's minimum resolution.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ToolInvoker } from "../agent/types.js";
|
|
2
|
-
import type
|
|
2
|
+
import { type MediaPersistence } from "../runtime/infra/media-persistence.js";
|
|
3
3
|
import type { PortableToolResult } from "../skills/portable-tool.js";
|
|
4
4
|
type ToolInvokeResult = Awaited<ReturnType<ToolInvoker["invoke"]>>;
|
|
5
5
|
export interface ToolResultProcessorDeps {
|
|
@@ -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
|
-
|
|
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.
|
|
3
|
+
"version": "2.11.9",
|
|
4
4
|
"description": "XiaozhiClaw Agent CLI — subprocess architecture (JSON-RPC over stdio)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -62,26 +62,6 @@
|
|
|
62
62
|
]
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
-
"scripts": {
|
|
66
|
-
"dev": "tsx watch src/index.ts",
|
|
67
|
-
"build": "node scripts/build.mjs",
|
|
68
|
-
"build:tsc": "tsc --noCheck",
|
|
69
|
-
"start": "node dist/cli.js",
|
|
70
|
-
"test": "vitest run",
|
|
71
|
-
"check": "tsc --noEmit && pnpm test && pnpm run check:architecture-boundaries && pnpm run check:provider-core-boundary && pnpm run check:pet-core-boundary && pnpm run check:workspace-hygiene && pnpm run check:package-artifact",
|
|
72
|
-
"test:watch": "vitest",
|
|
73
|
-
"lint": "oxlint .",
|
|
74
|
-
"check:architecture-boundaries": "node scripts/check-architecture-boundaries.mjs",
|
|
75
|
-
"check:provider-core-boundary": "node scripts/check-provider-core-boundary.mjs",
|
|
76
|
-
"check:pet-core-boundary": "node scripts/check-pet-core-boundary.mjs",
|
|
77
|
-
"check:workspace-hygiene": "node scripts/check-workspace-hygiene.mjs",
|
|
78
|
-
"check:workspace-hygiene:strict": "node scripts/check-workspace-hygiene.mjs --strict",
|
|
79
|
-
"check:package-artifact": "npm run build && node scripts/check-package-artifact.mjs",
|
|
80
|
-
"redteam:community-desensitization": "tsx src/runtime/community/community-desensitization-red-team-cli.ts",
|
|
81
|
-
"redteam:community-sandbox": "tsx src/skills/permissions/community-sandbox-red-team-cli.ts",
|
|
82
|
-
"clean:workspace-hygiene": "node scripts/clean-workspace-hygiene.mjs",
|
|
83
|
-
"release": "node scripts/release.mjs"
|
|
84
|
-
},
|
|
85
65
|
"engines": {
|
|
86
66
|
"node": ">=22.0.0"
|
|
87
67
|
},
|
|
@@ -89,7 +69,7 @@
|
|
|
89
69
|
"@agentclientprotocol/sdk": "^0.25.0",
|
|
90
70
|
"@napi-rs/canvas": "0.1.100",
|
|
91
71
|
"@xiaozhiclaw/pet-core": "0.1.0",
|
|
92
|
-
"@xiaozhiclaw/provider-core": "0.1.
|
|
72
|
+
"@xiaozhiclaw/provider-core": "0.1.5",
|
|
93
73
|
"better-sqlite3": "^12.10.0",
|
|
94
74
|
"dotenv": "^17.3.1",
|
|
95
75
|
"nanoid": "^5.1.5",
|
|
@@ -104,5 +84,25 @@
|
|
|
104
84
|
"tsx": "^4.19.0",
|
|
105
85
|
"typescript": "^5.9.0",
|
|
106
86
|
"vitest": "^3.1.0"
|
|
87
|
+
},
|
|
88
|
+
"scripts": {
|
|
89
|
+
"dev": "tsx watch src/index.ts",
|
|
90
|
+
"build": "node scripts/build.mjs",
|
|
91
|
+
"build:tsc": "tsc --noCheck",
|
|
92
|
+
"start": "node dist/cli.js",
|
|
93
|
+
"test": "vitest run",
|
|
94
|
+
"check": "tsc --noEmit && pnpm test && pnpm run check:architecture-boundaries && pnpm run check:provider-core-boundary && pnpm run check:pet-core-boundary && pnpm run check:workspace-hygiene && pnpm run check:package-artifact",
|
|
95
|
+
"test:watch": "vitest",
|
|
96
|
+
"lint": "oxlint .",
|
|
97
|
+
"check:architecture-boundaries": "node scripts/check-architecture-boundaries.mjs",
|
|
98
|
+
"check:provider-core-boundary": "node scripts/check-provider-core-boundary.mjs",
|
|
99
|
+
"check:pet-core-boundary": "node scripts/check-pet-core-boundary.mjs",
|
|
100
|
+
"check:workspace-hygiene": "node scripts/check-workspace-hygiene.mjs",
|
|
101
|
+
"check:workspace-hygiene:strict": "node scripts/check-workspace-hygiene.mjs --strict",
|
|
102
|
+
"check:package-artifact": "npm run build && node scripts/check-package-artifact.mjs",
|
|
103
|
+
"redteam:community-desensitization": "tsx src/runtime/community/community-desensitization-red-team-cli.ts",
|
|
104
|
+
"redteam:community-sandbox": "tsx src/skills/permissions/community-sandbox-red-team-cli.ts",
|
|
105
|
+
"clean:workspace-hygiene": "node scripts/clean-workspace-hygiene.mjs",
|
|
106
|
+
"release": "node scripts/release.mjs"
|
|
107
107
|
}
|
|
108
|
-
}
|
|
108
|
+
}
|