personal-bot 0.3.0 → 0.3.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.
@@ -6,12 +6,12 @@
6
6
  "plugins": [
7
7
  {
8
8
  "name": "personal-bot",
9
- "version": "0.3.0",
9
+ "version": "0.3.1",
10
10
  "description": "Workspace materials, skills, and cross-harness MCP worker delegation.",
11
11
  "source": {
12
12
  "source": "npm",
13
13
  "package": "personal-bot",
14
- "version": "0.3.0"
14
+ "version": "0.3.1"
15
15
  }
16
16
  }
17
17
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "personal-bot",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Workspace materials, skills, and cross-harness MCP worker delegation.",
5
5
  "skills": [
6
6
  "./resources/skills",
package/README.md CHANGED
@@ -94,7 +94,7 @@ Supports built-in presets (`pi`, `dsh`, `claude`, `antigravity`, `codex`) and ar
94
94
 
95
95
  ## Development
96
96
 
97
- Current release: **0.3.0**. Full development uses Linux/macOS and Node.js 24.9+:
97
+ Current release: **0.3.1**. Full development uses Linux/macOS and Node.js 24.9+:
98
98
 
99
99
  ```bash
100
100
  npm ci --ignore-scripts
package/README.zh-CN.md CHANGED
@@ -94,7 +94,7 @@ pbot mcp
94
94
 
95
95
  ## 开发与验证
96
96
 
97
- 当前版本 **0.3.0**。完整开发使用 Linux/macOS、Node.js 24.9+:
97
+ 当前版本 **0.3.1**。完整开发使用 Linux/macOS、Node.js 24.9+:
98
98
 
99
99
  ```bash
100
100
  npm ci --ignore-scripts
@@ -11,7 +11,7 @@
11
11
  | Claude Code | `/personal-bot:pbot init`(或 `lib/claude.js init`) | `/personal-bot:pbot status` |
12
12
  | Antigravity | `/pbot init`(或 `lib/plugin.js antigravity init`) | `/pbot status` |
13
13
 
14
- `init` 先补建资料目录(`areas/`、`projects/`、`knowledge/`、`providers/`、`scratch/`、`agents/`)和缺失的根 `AGENTS.md`,再将 `.pbot/config.json` 中的 `enabled` 设为 `true`,保留已有资料、宿主自有文件(如 `CLAUDE.md`)及其他未知配置字段;配置文件损坏时先报错而不覆写。
14
+ `init` 先补建资料目录(`areas/`、`projects/`、`knowledge/`、`providers/`、`scratch/`、`agents/`)和缺失的根 `AGENTS.md`,再将 `.pbot/config.json` 中的 `enabled` 设为 `true` 并显式写入 `features`(`prompts`、`skills`、`mcp`,未设置项默认 `true`),保留已有资料、宿主自有文件(如 `CLAUDE.md`)、已设置的 `features` 开关及其他未知配置字段;配置文件损坏时先报错而不覆写。
15
15
 
16
16
  ## 启用、模块开关(`features`)与停用规则
17
17
 
@@ -79,12 +79,14 @@ export async function initializeWorkspaceConfig(root) {
79
79
  const current = await readWorkspaceConfig(root);
80
80
  if (current.error)
81
81
  throw new Error(current.error);
82
- if (current.enabled)
82
+ const hasExplicitFeatures = featureKeys.every(key => typeof current.features?.[key] === "boolean");
83
+ if (current.enabled && hasExplicitFeatures)
83
84
  return;
84
85
  const directory = dirname(current.path);
85
86
  await mkdir(directory, { recursive: true });
86
87
  const value = current.present ? readJsonFile(directory, "config.json", config) : {};
87
- const written = writeJsonFile(directory, "config.json", { ...value, enabled: true }, config, !current.present);
88
+ const features = workspaceFeatures(value.features);
89
+ const written = writeJsonFile(directory, "config.json", { ...value, enabled: true, features }, config, !current.present);
88
90
  if (!written)
89
91
  await initializeWorkspaceConfig(root);
90
92
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "personal-bot-antigravity-plugin",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "private": true
6
6
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "personal-bot",
3
3
  "displayName": "Personal Bot",
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
5
5
  "description": "Workspace materials, skills, and cross-harness MCP worker delegation.",
6
6
  "repository": "https://github.com/realqiyan/personal-bot"
7
7
  }
@@ -79,12 +79,14 @@ export async function initializeWorkspaceConfig(root) {
79
79
  const current = await readWorkspaceConfig(root);
80
80
  if (current.error)
81
81
  throw new Error(current.error);
82
- if (current.enabled)
82
+ const hasExplicitFeatures = featureKeys.every(key => typeof current.features?.[key] === "boolean");
83
+ if (current.enabled && hasExplicitFeatures)
83
84
  return;
84
85
  const directory = dirname(current.path);
85
86
  await mkdir(directory, { recursive: true });
86
87
  const value = current.present ? readJsonFile(directory, "config.json", config) : {};
87
- const written = writeJsonFile(directory, "config.json", { ...value, enabled: true }, config, !current.present);
88
+ const features = workspaceFeatures(value.features);
89
+ const written = writeJsonFile(directory, "config.json", { ...value, enabled: true, features }, config, !current.present);
88
90
  if (!written)
89
91
  await initializeWorkspaceConfig(root);
90
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "personal-bot",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/realqiyan/personal-bot.git"
@@ -81,11 +81,13 @@ export async function readWorkspaceConfig(root: string): Promise<WorkspaceConfig
81
81
  export async function initializeWorkspaceConfig(root: string): Promise<void> {
82
82
  const current = await readWorkspaceConfig(root);
83
83
  if (current.error) throw new Error(current.error);
84
- if (current.enabled) return;
84
+ const hasExplicitFeatures = featureKeys.every(key => typeof current.features?.[key] === "boolean");
85
+ if (current.enabled && hasExplicitFeatures) return;
85
86
  const directory = dirname(current.path);
86
87
  await mkdir(directory, { recursive: true });
87
88
  const value = current.present ? readJsonFile(directory, "config.json", config) : {};
88
- const written = writeJsonFile(directory, "config.json", { ...value, enabled: true }, config, !current.present);
89
+ const features = workspaceFeatures((value as WorkspaceConfig).features);
90
+ const written = writeJsonFile(directory, "config.json", { ...value, enabled: true, features }, config, !current.present);
89
91
  if (!written) await initializeWorkspaceConfig(root);
90
92
  }
91
93