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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/docs/guides/workspace-configuration.md +1 -1
- package/lib/antigravity-plugin/lib/services/workspace/workspace-config.js +4 -2
- package/lib/antigravity-plugin/package.json +1 -1
- package/lib/antigravity-plugin/plugin.json +1 -1
- package/lib/services/workspace/workspace-config.js +4 -2
- package/package.json +1 -1
- package/src/services/workspace/workspace-config.ts +4 -2
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"plugins": [
|
|
7
7
|
{
|
|
8
8
|
"name": "personal-bot",
|
|
9
|
-
"version": "0.3.
|
|
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.
|
|
14
|
+
"version": "0.3.1"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
]
|
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.
|
|
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
|
@@ -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
|
|
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
|
-
|
|
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
|
|
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
|
}
|
|
@@ -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
|
-
|
|
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
|
|
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
|
@@ -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
|
-
|
|
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
|
|
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
|
|