qlogicagent 2.15.5 → 2.15.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.
@@ -22,6 +22,12 @@ export declare function handleSkillsActivate(this: SkillsHandlerHost, msg: Agent
22
22
  export declare function handleSkillsDeactivate(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
23
23
  export declare function handleSkillsDelete(this: SkillsHandlerHost, msg: AgentRpcRequest): Promise<void>;
24
24
  export declare function handleSkillsPromote(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
25
+ /**
26
+ * Per-project opt-out: mute (or un-mute) a globally-installed skill in ONE project so the agent
27
+ * doesn't see it there — cuts context and mis-triggering without uninstalling the skill. The file
28
+ * stays in the global store and stays active in every other project. This is the "本项目技能" toggle.
29
+ */
30
+ export declare function handleSkillsSetProjectDisabled(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
25
31
  export declare function handleSkillsStats(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
26
32
  export declare function handleSkillsPin(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
27
33
  export declare function handleSkillsUnpin(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
@@ -2,10 +2,12 @@ export interface SkillListEntry {
2
2
  id: string;
3
3
  name: string;
4
4
  path: string;
5
- /** Effective in this project: globally-scoped, or enabled via the project manifest. */
5
+ /** Effective in this project: not globally muted and not muted in this project. */
6
6
  active: boolean;
7
- /** Enablement scope (= lifecycle enabledScope). "global" is active everywhere. */
8
- scope: "project" | "global";
7
+ /** Muted everywhere (the plugin card's off switch). */
8
+ globallyDisabled: boolean;
9
+ /** Muted in THIS project only (the project opt-out). */
10
+ projectDisabled: boolean;
9
11
  category: "automation";
10
12
  displayName: {
11
13
  key: string;
@@ -0,0 +1,19 @@
1
+ export interface RmWithRetryOptions {
2
+ /** Retries after the first attempt before giving up. Default 5. */
3
+ retries?: number;
4
+ /** Base backoff in ms; doubles each retry (100, 200, 400, …). Default 100. */
5
+ baseDelayMs?: number;
6
+ /** Removal primitive — injectable so the retry/backoff logic is unit-testable. */
7
+ remove?: (target: string) => void;
8
+ }
9
+ /**
10
+ * Recursively remove a path, retrying with exponential backoff when Windows
11
+ * reports a transient file lock.
12
+ *
13
+ * Cleanup is best-effort: a leaked directory under the OS temp dir is harmless
14
+ * and the OS reaps it, so exhausting the retries warns (loud and visible) instead
15
+ * of throwing — a teardown race must never fail a test that already verified the
16
+ * behaviour under test. A *non-transient* error (e.g. a bad path) is a real bug
17
+ * and is rethrown immediately.
18
+ */
19
+ export declare function rmWithRetry(target: string, options?: RmWithRetryOptions): Promise<void>;
@@ -1620,26 +1620,35 @@ export interface AgentRpcMethodMap extends GatewayRpcMethodMap {
1620
1620
  "skills.delete": {
1621
1621
  params: {
1622
1622
  name: string;
1623
- scope?: "project" | "global";
1624
1623
  };
1625
1624
  result: {
1626
1625
  ok: true;
1627
1626
  deleted: string;
1628
- scope: string;
1629
1627
  signalStatus?: string;
1630
1628
  };
1631
1629
  };
1632
1630
  "skills.promote": {
1633
1631
  params: {
1634
1632
  name: string;
1635
- keepLocal?: boolean;
1636
1633
  };
1637
1634
  result: {
1638
1635
  ok: true;
1639
1636
  promoted: string;
1640
1637
  scope: "global";
1641
1638
  globalPath: string;
1642
- removedFromProject: boolean;
1639
+ };
1640
+ };
1641
+ "skills.setProjectDisabled": {
1642
+ params: {
1643
+ name: string;
1644
+ disabled: boolean;
1645
+ projectId?: string;
1646
+ };
1647
+ result: {
1648
+ ok: true;
1649
+ name: string;
1650
+ disabled: boolean;
1651
+ changed: boolean;
1643
1652
  };
1644
1653
  };
1645
1654
  "skills.stats": {
@@ -438,7 +438,10 @@ export interface GatewayRpcMethodMap {
438
438
  name: string;
439
439
  path: string;
440
440
  active: boolean;
441
- scope: "project" | "global";
441
+ /** Muted everywhere (the plugin card's off switch). */
442
+ globallyDisabled: boolean;
443
+ /** Muted in THIS project only (the per-project opt-out). */
444
+ projectDisabled: boolean;
442
445
  category: CapabilityCategoryWire;
443
446
  displayName: LocalizedTextWire;
444
447
  displayDescription: LocalizedTextWire;
@@ -446,6 +449,7 @@ export interface GatewayRpcMethodMap {
446
449
  fallbackDescription: string;
447
450
  systemGenerated: boolean;
448
451
  version?: string;
452
+ registryVersion?: string;
449
453
  description?: string;
450
454
  }>;
451
455
  };
@@ -66,8 +66,8 @@ export declare function getProjectAgentDir(cwd: string): string;
66
66
  export declare function getProjectWorkflowsDir(cwd: string): string;
67
67
  /** `<cwd>/.qlogicagent/plugins/` */
68
68
  export declare function getProjectPluginsDir(cwd: string): string;
69
- /** `<cwd>/.qlogicagent/skills-enabled.json` — per-project skill enablement manifest. */
70
- export declare function getProjectSkillManifestPath(cwd: string): string;
69
+ /** `<cwd>/.qlogicagent/skills-disabled.json` — per-project skill opt-out (mute) list. */
70
+ export declare function getProjectSkillDisabledPath(cwd: string): string;
71
71
  /** `<cwd>/.qlogicagent/settings.json` */
72
72
  export declare function getProjectSettingsPath(cwd: string): string;
73
73
  /** `<cwd>/.qlogicagent/INSTRUCTIONS.md` */
@@ -1,17 +1,20 @@
1
1
  /**
2
2
  * One-shot migration: fold legacy per-project skill directories
3
- * (`<projectRoot>/.qlogicagent/skills/<name>/`) into the single global store,
4
- * marking them project-scoped and enabling them in the originating project.
3
+ * (`<projectRoot>/.qlogicagent/skills/<name>/`) into the single global store.
5
4
  *
6
- * Idempotent a no-op once the legacy directory is gone, so it is safe to call
7
- * on every project activation. Conflict-safe if a DIFFERENT skill of the same
8
- * name already exists in the store, the legacy copy is LEFT IN PLACE with a loud
9
- * warning and never silently overwritten.
5
+ * Under the opt-out model every skill is global, so a freshly-migrated skill is parked GLOBALLY
6
+ * DISABLED the same default as an agent-learned skill. The user re-enables it deliberately from
7
+ * the plugins page; a once-project-scoped skill must NOT silently light up in every project.
8
+ *
9
+ * Idempotent — a no-op once the legacy directory is gone, so it is safe to call on every project
10
+ * activation. Conflict-safe — if a DIFFERENT skill of the same name already exists in the store, the
11
+ * legacy copy is LEFT IN PLACE with a loud warning and never silently overwritten.
10
12
  */
11
13
  export interface SkillMigrationResult {
14
+ /** Moved into the store fresh (parked globally disabled). */
12
15
  migrated: string[];
13
16
  conflicts: string[];
14
- /** Already present in the store with identical content; legacy copy reconciled. */
17
+ /** Already present in the store with identical content; legacy copy dropped, store entry untouched. */
15
18
  reconciled: string[];
16
19
  }
17
20
  /**
@@ -1,32 +1,20 @@
1
1
  /**
2
- * Project skill enablement manifest — the per-project opt-in list for the
3
- * single-store skill registry.
2
+ * Skill mute registriesunder the single-store model, EVERY skill is global. There is no
3
+ * project-scoped / opt-in concept; instead there are two opt-OUT mute lists:
4
4
  *
5
- * Stored at `<cwd>/.qlogicagent/skills-enabled.json`:
6
- * { "version": 1, "enabled": ["skill-a", "skill-b"] }
5
+ * - owner-level (~/.qlogicagent/profiles/<owner>/skills-disabled.json) — off in EVERY project
6
+ * (the plugin card's on/off switch; also where agent-learned skills land, disabled, until the
7
+ * user reviews and enables them).
8
+ * - per-project (<cwd>/.qlogicagent/skills-disabled.json) — off in THIS project only
9
+ * (the "project skills" opt-out, to cut down which skills an agent sees in a given project).
7
10
  *
8
- * Only project-scoped skills need listing here; globally-scoped skills
9
- * (see skill-lifecycle `enabledScope`) are active everywhere regardless.
11
+ * active(project) = stored skill AND name globally-disabled AND name ∉ project-disabled
10
12
  */
11
- export interface ProjectSkillManifest {
12
- version: 1;
13
- enabled: string[];
14
- }
15
- /** Read the enablement manifest for a project. Returns empty manifest if absent/malformed. */
16
- export declare function readProjectSkillManifest(cwd: string): ProjectSkillManifest;
17
- /** The set of project-scoped skill names enabled in this project. */
18
- export declare function readEnabledSkills(cwd: string): Set<string>;
19
- /** Enable a (project-scoped) skill in this project. Idempotent. Returns true if newly added. */
20
- export declare function enableSkill(cwd: string, name: string): boolean;
21
- /** Disable (un-enable) a skill in this project. Idempotent. Returns true if removed. */
22
- export declare function disableSkill(cwd: string, name: string): boolean;
23
- /** Skills that are project-scoped (active only where a project manifest enables them). */
24
- export declare function readProjectScopedSkills(): Set<string>;
25
- /** Mark a skill project-scoped (learned/created). Idempotent. Returns true if newly added. */
26
- export declare function markProjectScoped(name: string): boolean;
27
- /** Unmark a skill (promote to global). Idempotent. Returns true if removed. */
28
- export declare function unmarkProjectScoped(name: string): boolean;
29
13
  /** Globally muted skills (inactive everywhere). */
30
14
  export declare function readGloballyDisabledSkills(): Set<string>;
31
- /** Mute/unmute a global skill everywhere. Idempotent. Returns true if the registry changed. */
15
+ /** Mute/unmute a skill globally. Idempotent. Returns true if the registry changed. */
32
16
  export declare function setSkillGloballyDisabled(name: string, disabled: boolean): boolean;
17
+ /** Skills muted in this project (inactive here, active elsewhere unless globally muted). */
18
+ export declare function readProjectDisabledSkills(cwd: string): Set<string>;
19
+ /** Mute/unmute a skill in this project. Idempotent. Returns true if the manifest changed. */
20
+ export declare function setProjectSkillDisabled(cwd: string, name: string, disabled: boolean): boolean;
@@ -1,19 +1,15 @@
1
1
  /**
2
- * Skill resolver — single source of truth for "which skills are effective in a
3
- * given project" under the global-single-store + per-project-manifest model.
2
+ * Skill resolver — single source of truth for "which skills are effective in a given project".
4
3
  *
5
- * Storage: ONE global store at getUserSkillsDir(). A skill is project-scoped if
6
- * it appears in the owner-level project-scoped registry (skills-scoped.json);
7
- * otherwise it is global. Project-scoped skills are active only where the
8
- * project manifest (skills-enabled.json) lists them.
4
+ * Storage: ONE global store at getUserSkillsDir(). Every skill is global; two opt-out mute lists
5
+ * decide effectiveness owner-level (off everywhere) and per-project (off in this project). See
6
+ * project-skill-manifest.
9
7
  *
10
- * effective(project) = { store skills NOT marked project-scoped }
11
- * ∪ { project-scoped skills whose name ∈ project manifest }
8
+ * active(project) = stored skill AND name globally-disabled AND name project-disabled
12
9
  *
13
- * All resolution / listing / injection surfaces MUST go through this module so
14
- * precedence and name-collision semantics live in exactly one place. Kept in
15
- * runtime/infra (no skills-layer imports) so both runtime and cli callers may
16
- * use it without crossing the runtime → skills boundary.
10
+ * All resolution / listing / injection surfaces MUST go through this module so precedence lives in
11
+ * exactly one place. Kept in runtime/infra (no skills-layer imports) so both runtime and cli callers
12
+ * may use it without crossing the runtime skills boundary.
17
13
  */
18
14
  export interface ResolvedSkill {
19
15
  name: string;
@@ -21,8 +17,11 @@ export interface ResolvedSkill {
21
17
  filePath: string;
22
18
  /** Absolute path to <store>/<name> */
23
19
  baseDir: string;
24
- enabledScope: "global" | "project";
25
- /** Active in the resolution context: global, or project-enabled via manifest. */
20
+ /** Muted everywhere (the plugin card's off switch / agent-learned-pending-review). */
21
+ globallyDisabled: boolean;
22
+ /** Muted in THIS project's context (the per-project opt-out). */
23
+ projectDisabled: boolean;
24
+ /** Effective here: neither globally nor project muted. */
26
25
  active: boolean;
27
26
  systemGenerated: boolean;
28
27
  description?: string;
@@ -30,12 +29,11 @@ export interface ResolvedSkill {
30
29
  }
31
30
  export declare function isSystemGeneratedSkillName(name: string): boolean;
32
31
  /**
33
- * Resolve all skills in the global store, annotated with enablement scope and
34
- * whether they're active in the given project context.
32
+ * Resolve all skills in the global store, annotated with global/project mute state and whether
33
+ * they're active in the given project context.
35
34
  *
36
- * Returns ALL store skills (active and inactive) so listing surfaces can show
37
- * enable/disable state; callers that only want active skills filter `.active`
38
- * (or use resolveActiveSkills).
35
+ * Returns ALL store skills (active and inactive) so listing surfaces can show enable/disable state;
36
+ * callers that only want active skills filter `.active` (or use resolveActiveSkills).
39
37
  */
40
38
  export declare function resolveSkills(projectRoot?: string): ResolvedSkill[];
41
39
  /** Only the skills active in the given project (for prompt injection / resolution). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qlogicagent",
3
- "version": "2.15.5",
3
+ "version": "2.15.7",
4
4
  "description": "XiaozhiClaw Agent CLI — subprocess architecture (JSON-RPC over stdio)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -66,6 +66,7 @@
66
66
  "dev": "tsx watch src/index.ts",
67
67
  "build": "node scripts/build.mjs",
68
68
  "build:tsc": "tsc --noCheck",
69
+ "build:search-svc": "node scripts/build-search-svc.mjs",
69
70
  "start": "node dist/cli.js",
70
71
  "test": "vitest run",
71
72
  "check": "tsc --noEmit && pnpm test && pnpm run check:architecture-boundaries && pnpm run check:provider-core-boundary && pnpm run check:provider-core-release-sync && pnpm run check:pet-core-boundary && pnpm run check:workspace-hygiene && pnpm run check:package-artifact",