qlogicagent 2.14.10 → 2.15.1
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 +1 -1
- package/dist/cli.js +347 -335
- package/dist/index.js +346 -334
- package/dist/types/cli/handlers/pinned-skill-context.d.ts +1 -0
- package/dist/types/protocol/wire/acp-protocol.d.ts +3 -0
- package/dist/types/runtime/infra/agent-paths.d.ts +17 -0
- package/dist/types/runtime/infra/project-data-gc.d.ts +5 -3
- package/dist/types/runtime/infra/project-data-paths.d.ts +4 -10
- package/dist/types/runtime/infra/project-store.d.ts +6 -14
- package/package.json +2 -2
- package/dist/types/cli/mcp-plugin-bootstrap.d.ts +0 -2
- package/dist/types/cli/tool-bootstrap-providers.d.ts +0 -3
- package/dist/types/skills/memory/categories.d.ts +0 -1
- package/dist/types/skills/memory/find-relevant-memories.d.ts +0 -1
- package/dist/types/skills/memory/implicit-extraction.d.ts +0 -1
- package/dist/types/skills/memory/recall-category-filter.d.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function buildPinnedSkillContext(activeSkills: unknown, log?: (m: string) => void): string;
|
|
@@ -114,6 +114,9 @@ export interface AcpSessionMeta {
|
|
|
114
114
|
/** Runtime turn-config tweaks applied via session/set_config_option. */
|
|
115
115
|
temperature?: number;
|
|
116
116
|
maxRounds?: number;
|
|
117
|
+
/** Skills the user explicitly pinned for this turn (scope:name or name). The turn pipeline
|
|
118
|
+
* force-loads each one's SKILL.md, identically to the `skill` tool's invoke (cc-parity). */
|
|
119
|
+
activeSkills?: string[];
|
|
117
120
|
}
|
|
118
121
|
export interface AcpSessionNewParams {
|
|
119
122
|
/** Working directory for the session (standard ACP field from host). */
|
|
@@ -7,12 +7,29 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/** Dot-directory name used for both user-level and project-level storage. */
|
|
9
9
|
export declare const AGENT_DOT_DIR = ".qlogicagent";
|
|
10
|
+
/**
|
|
11
|
+
* Derive a project's stable id from its workspaceDir — the mainstream path-derived model
|
|
12
|
+
* (VS Code / Claude Code / cc-haha): same folder → same id, deterministic, recomputable, no random
|
|
13
|
+
* UUID and no central-registry dependency. A short SHA-256 prefix of the resolved, lowercased path
|
|
14
|
+
* keeps the id length-safe on Windows (260-char path limit) while staying collision-free in
|
|
15
|
+
* practice. NOTE: deliberately NO ctime salt (VS Code salts single-folder ids so recreating a folder
|
|
16
|
+
* yields fresh state — a footgun for us; we want a recreated/rebound folder to map back to its data).
|
|
17
|
+
* This is a leaf helper (crypto + path only) so project-store and project-data-paths can both import
|
|
18
|
+
* it without a dependency cycle.
|
|
19
|
+
*/
|
|
20
|
+
export declare function deriveProjectId(workspaceDir: string): string;
|
|
10
21
|
/** `~/.qlogicagent/` (or QLOGICAGENT_HOME override) */
|
|
11
22
|
export declare function getUserAgentHome(): string;
|
|
12
23
|
export declare function resolveActiveOwnerUserId(): string;
|
|
13
24
|
export declare function encodeOwnerProfileSegment(ownerUserId: string): string;
|
|
14
25
|
export declare function getOwnerProfileDir(ownerUserId?: string): string;
|
|
15
26
|
export declare function getProfileMemoryDir(ownerUserId?: string): string;
|
|
27
|
+
/** Dir name for our per-project companion data (sessions/checkpoints/uploads). */
|
|
28
|
+
export declare const PROJECT_DATA_DIRNAME = "projectData";
|
|
29
|
+
/** Root of the projectData tree for the current owner. */
|
|
30
|
+
export declare function getProjectDataRoot(): string;
|
|
31
|
+
/** `profiles/<owner>/projectData/<projectId>/` (projectId is the path-derived key). */
|
|
32
|
+
export declare function getProjectDataDirById(projectId: string): string;
|
|
16
33
|
/**
|
|
17
34
|
* Ensure the user agent home directory exists and is writable.
|
|
18
35
|
* Returns the path if accessible, throws with a friendly message otherwise.
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Project Data GC — best-effort startup reclamation of the companion-data tree, mirroring VS Code's
|
|
3
|
-
* UnusedWorkspaceStorageDataCleaner
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* UnusedWorkspaceStorageDataCleaner. A projectData/<id> dir is KEPT when it's either in projects.json
|
|
4
|
+
* OR carries a `project.json` back-ref (the durable truth — rebuildIndexFromBackrefs runs first and
|
|
5
|
+
* re-indexes it). Only a dir with NEITHER (truly corrupt/orphaned — crashed mid-create) is reclaimed.
|
|
6
|
+
* This makes the registry non-load-bearing for recovery: a lost projects.json never causes data loss.
|
|
7
|
+
* Also prunes stale deletion tombstones. NEVER touches live projects' data or the user's workspace.
|
|
6
8
|
*/
|
|
7
9
|
export declare function gcOrphanProjectData(): void;
|
|
@@ -7,19 +7,13 @@
|
|
|
7
7
|
*
|
|
8
8
|
* ~/.qlogicagent/profiles/<owner>/projectData/<projectId>/{sessions,checkpoints,uploads}/
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* This module is the ONE place that imports project-store for the workspaceDir→projectId reverse
|
|
15
|
-
* lookup; the low-level agent-paths stays dependency-free (no project-store cycle).
|
|
10
|
+
* projectId is the PATH-DERIVED key (deriveProjectId(workspaceDir), see agent-paths) — the
|
|
11
|
+
* mainstream model (VS Code / cc-haha): same folder → same id, deterministic, recomputable, no
|
|
12
|
+
* central-registry dependency for the storage key. Deleting a project = `rm` projectData/<id>/.
|
|
16
13
|
*/
|
|
14
|
+
export { getProjectDataDirById, getProjectDataRoot } from "./agent-paths.js";
|
|
17
15
|
/** `~/.qlogicagent/profiles/<owner>/projectData/<projectId>/` (key = projectId or workspaceDir). */
|
|
18
16
|
export declare function getProjectDataDir(key: string): string;
|
|
19
|
-
/** Direct projectData dir for a known projectId (no reverse lookup) — used by project delete/GC. */
|
|
20
|
-
export declare function getProjectDataDirById(projectId: string): string;
|
|
21
|
-
/** Root of the project-data tree for the current owner (for orphan GC). */
|
|
22
|
-
export declare function getProjectDataRoot(): string;
|
|
23
17
|
/** `projectData/<id>/sessions/` */
|
|
24
18
|
export declare function getProjectDataSessionsRoot(key: string): string;
|
|
25
19
|
/** `projectData/<id>/checkpoints/` or `.../checkpoints/<sessionId>` */
|
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
* Direction A: Agent is the source of truth for project state.
|
|
8
8
|
*/
|
|
9
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.
|
|
14
|
+
*/
|
|
15
|
+
export declare function rebuildIndexFromBackrefs(): void;
|
|
10
16
|
export declare function createProject(params: {
|
|
11
17
|
name: string;
|
|
12
18
|
workspaceDir: string;
|
|
@@ -15,14 +21,6 @@ export declare function createProject(params: {
|
|
|
15
21
|
skipAutoSwitch?: boolean;
|
|
16
22
|
}): ProjectInfo;
|
|
17
23
|
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;
|
|
26
24
|
export declare function getActiveProject(): ProjectInfo | null;
|
|
27
25
|
export declare function getDefaultProject(): ProjectInfo | null;
|
|
28
26
|
export declare function getProjectById(projectId: string): ProjectInfo | null;
|
|
@@ -48,12 +46,6 @@ export declare function findByGroupId(groupId: string): ProjectInfo | null;
|
|
|
48
46
|
* a cwd that maps to no project is ignored rather than silently leaking files outside any project.
|
|
49
47
|
*/
|
|
50
48
|
export declare function findByWorkspaceDir(dir: string): ProjectInfo | null;
|
|
51
|
-
/**
|
|
52
|
-
* Reverse-lookup a workspaceDir to its owning projectId across ALL projects (active + archived).
|
|
53
|
-
* Used for projectData storage keying so a session/checkpoint dir resolves correctly even for an
|
|
54
|
-
* archived project (findByWorkspaceDir matches active-only and would miss it).
|
|
55
|
-
*/
|
|
56
|
-
export declare function findProjectIdByWorkspaceDirAnyStatus(dir: string): string | undefined;
|
|
57
49
|
export declare function archiveByGroupId(groupId: string): {
|
|
58
50
|
archived: boolean;
|
|
59
51
|
projectId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qlogicagent",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.1",
|
|
4
4
|
"description": "XiaozhiClaw Agent CLI — subprocess architecture (JSON-RPC over stdio)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@agentclientprotocol/sdk": "^0.25.0",
|
|
91
91
|
"@napi-rs/canvas": "0.1.100",
|
|
92
92
|
"@xiaozhiclaw/pet-core": "0.1.2",
|
|
93
|
-
"@xiaozhiclaw/provider-core": "^0.1.
|
|
93
|
+
"@xiaozhiclaw/provider-core": "^0.1.19",
|
|
94
94
|
"better-sqlite3": "^12.10.0",
|
|
95
95
|
"dotenv": "^17.3.1",
|
|
96
96
|
"ioredis": "^5.11.1",
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { RuntimeToolContract, ToolBootstrapProvider, ToolBootstrapProviderContext, ToolRegistrationModuleKind } from "../runtime/ports/index.js";
|
|
2
|
-
export declare function runToolBootstrapProviders(providers: readonly ToolBootstrapProvider[], context: ToolBootstrapProviderContext): RuntimeToolContract[];
|
|
3
|
-
export declare function createToolBootstrapProvider(id: string, register: ToolBootstrapProvider["register"], kind?: ToolRegistrationModuleKind): ToolBootstrapProvider;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { QMemoryCategory } from "../../runtime/memory/categories.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../runtime/memory/find-relevant-memories.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../runtime/memory/implicit-extraction.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../runtime/memory/recall-category-filter.js";
|