inplan 0.1.24 → 0.1.25
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/bin/cli.js +6 -2
- package/package.json +1 -1
- package/skill/SKILL.md +0 -2
package/bin/cli.js
CHANGED
|
@@ -2058,7 +2058,8 @@ function skillTargets() {
|
|
|
2058
2058
|
{ name: "Codex", root: join9(home, ".codex"), target: join9(home, ".codex", "skills", "inplan", "SKILL.md") }
|
|
2059
2059
|
];
|
|
2060
2060
|
}
|
|
2061
|
-
var SKILL_ALLOW = ["Bash(inplan *)", "Edit(**/*.plan.md)", "
|
|
2061
|
+
var SKILL_ALLOW = ["Bash(inplan *)", "Edit(**/*.plan.md)", "Read(~/.inplan/**)", "Edit(~/.inplan/**)"];
|
|
2062
|
+
var SKILL_ALLOW_OBSOLETE = ["Write(**/*.plan.md)", "Write(~/.inplan/**)"];
|
|
2062
2063
|
var SKILL_DIRS = ["~/.inplan/"];
|
|
2063
2064
|
function grantClaudePermissions(claudeRoot) {
|
|
2064
2065
|
const settingsPath = join9(claudeRoot, "settings.json");
|
|
@@ -2074,9 +2075,12 @@ function grantClaudePermissions(claudeRoot) {
|
|
|
2074
2075
|
}
|
|
2075
2076
|
const rawPerms = settings.permissions;
|
|
2076
2077
|
const perms = rawPerms && typeof rawPerms === "object" && !Array.isArray(rawPerms) ? rawPerms : {};
|
|
2077
|
-
|
|
2078
|
+
let allow = Array.isArray(perms.allow) ? perms.allow : [];
|
|
2078
2079
|
const dirs = Array.isArray(perms.additionalDirectories) ? perms.additionalDirectories : [];
|
|
2079
2080
|
let changed = false;
|
|
2081
|
+
const beforePrune = allow.length;
|
|
2082
|
+
allow = allow.filter((r) => !SKILL_ALLOW_OBSOLETE.includes(r));
|
|
2083
|
+
if (allow.length !== beforePrune) changed = true;
|
|
2080
2084
|
for (const r of SKILL_ALLOW) {
|
|
2081
2085
|
if (!allow.includes(r)) {
|
|
2082
2086
|
allow.push(r);
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED