oh-pi 0.1.35 → 0.1.37
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/index.js
CHANGED
|
@@ -44,7 +44,6 @@ async function quickFlow(env) {
|
|
|
44
44
|
theme: "dark",
|
|
45
45
|
keybindings: "default",
|
|
46
46
|
extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer", "compact-header", "auto-update"],
|
|
47
|
-
skills: ["quick-setup", "debug-helper", "git-workflow"],
|
|
48
47
|
prompts: ["review", "fix", "explain", "commit", "test"],
|
|
49
48
|
agents: "general-developer",
|
|
50
49
|
thinking: "medium",
|
|
@@ -104,7 +103,6 @@ async function customFlow(env) {
|
|
|
104
103
|
theme,
|
|
105
104
|
keybindings,
|
|
106
105
|
extensions,
|
|
107
|
-
skills: ["quick-setup", "debug-helper", "git-workflow"],
|
|
108
106
|
prompts: ["review", "fix", "explain", "commit", "test", "refactor", "optimize", "security", "document", "pr"],
|
|
109
107
|
agents,
|
|
110
108
|
thinking: "medium",
|
|
@@ -15,7 +15,6 @@ export async function confirmApply(config, env) {
|
|
|
15
15
|
`${t("confirm.thinking")} ${chalk.cyan(config.thinking)}`,
|
|
16
16
|
`${t("confirm.compaction")} ${chalk.cyan(t("confirm.compactionValue", { pct: Math.round((config.compactThreshold ?? 0.75) * 100) }))}`,
|
|
17
17
|
`${t("confirm.extensions")} ${chalk.cyan(config.extensions.join(", ") || t("confirm.none"))}`,
|
|
18
|
-
`${t("confirm.skills")} ${chalk.cyan(config.skills.join(", ") || t("confirm.none"))}`,
|
|
19
18
|
`${t("confirm.prompts")} ${chalk.cyan(t("confirm.promptsValue", { count: config.prompts.length }))}`,
|
|
20
19
|
`${t("confirm.agents")} ${chalk.cyan(config.agents)}`,
|
|
21
20
|
].join("\n");
|
|
@@ -24,7 +23,6 @@ export async function confirmApply(config, env) {
|
|
|
24
23
|
if (env.hasExistingConfig) {
|
|
25
24
|
const diff = [
|
|
26
25
|
`Extensions: ${chalk.dim(countExisting(env, "extensions"))} ${chalk.yellow("→")} ${chalk.green(config.extensions.length)}`,
|
|
27
|
-
`Skills: ${chalk.dim(countExisting(env, "skills"))} ${chalk.yellow("→")} ${chalk.green(config.skills.length)}`,
|
|
28
26
|
`Prompts: ${chalk.dim(countExisting(env, "prompts"))} ${chalk.yellow("→")} ${chalk.green(config.prompts.length)}`,
|
|
29
27
|
].join("\n");
|
|
30
28
|
p.note(diff, t("confirm.changes"));
|
|
@@ -80,7 +78,7 @@ export async function confirmApply(config, env) {
|
|
|
80
78
|
`${chalk.gray("├── ")}AGENTS.md ${chalk.dim(config.agents)}`,
|
|
81
79
|
...(config.extensions.length > 0 ? [`${chalk.gray("├── ")}extensions/ ${chalk.dim(`${config.extensions.length} items`)}`] : []),
|
|
82
80
|
...(config.prompts.length > 0 ? [`${chalk.gray("├── ")}prompts/ ${chalk.dim(`${config.prompts.length} templates`)}`] : []),
|
|
83
|
-
|
|
81
|
+
`${chalk.gray("├── ")}skills/ ${chalk.dim("auto-discovered")}`,
|
|
84
82
|
...(!["dark", "light"].includes(config.theme) ? [`${chalk.gray("└── ")}themes/ ${chalk.dim(config.theme)}`] : []),
|
|
85
83
|
].join("\n");
|
|
86
84
|
p.note(tree, t("confirm.installed"));
|
|
@@ -6,7 +6,6 @@ const PRESETS = {
|
|
|
6
6
|
config: {
|
|
7
7
|
theme: "dark", keybindings: "default", thinking: "medium",
|
|
8
8
|
extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer", "compact-header", "auto-update"],
|
|
9
|
-
skills: ["quick-setup", "debug-helper"],
|
|
10
9
|
prompts: ["review", "fix", "explain", "commit"],
|
|
11
10
|
agents: "general-developer",
|
|
12
11
|
},
|
|
@@ -16,7 +15,6 @@ const PRESETS = {
|
|
|
16
15
|
config: {
|
|
17
16
|
theme: "catppuccin-mocha", keybindings: "default", thinking: "high",
|
|
18
17
|
extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer", "compact-header", "auto-update"],
|
|
19
|
-
skills: ["quick-setup", "debug-helper", "git-workflow"],
|
|
20
18
|
prompts: ["review", "fix", "explain", "commit", "test", "refactor", "optimize", "document", "pr"],
|
|
21
19
|
agents: "fullstack-developer",
|
|
22
20
|
},
|
|
@@ -26,7 +24,6 @@ const PRESETS = {
|
|
|
26
24
|
config: {
|
|
27
25
|
theme: "cyberpunk", keybindings: "default", thinking: "high",
|
|
28
26
|
extensions: ["safe-guard", "custom-footer", "compact-header", "auto-update"],
|
|
29
|
-
skills: ["debug-helper"],
|
|
30
27
|
prompts: ["review", "security", "fix", "explain"],
|
|
31
28
|
agents: "security-researcher",
|
|
32
29
|
},
|
|
@@ -36,7 +33,6 @@ const PRESETS = {
|
|
|
36
33
|
config: {
|
|
37
34
|
theme: "tokyo-night", keybindings: "default", thinking: "medium",
|
|
38
35
|
extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer", "compact-header", "auto-update"],
|
|
39
|
-
skills: ["quick-setup", "debug-helper"],
|
|
40
36
|
prompts: ["review", "fix", "explain", "optimize", "document", "test"],
|
|
41
37
|
agents: "data-ai-engineer",
|
|
42
38
|
},
|
|
@@ -45,7 +41,7 @@ const PRESETS = {
|
|
|
45
41
|
labelKey: "preset.minimal", hintKey: "preset.minimalHint",
|
|
46
42
|
config: {
|
|
47
43
|
theme: "dark", keybindings: "default", thinking: "off",
|
|
48
|
-
extensions: [],
|
|
44
|
+
extensions: [], prompts: [], agents: "general-developer",
|
|
49
45
|
},
|
|
50
46
|
},
|
|
51
47
|
full: {
|
|
@@ -53,7 +49,6 @@ const PRESETS = {
|
|
|
53
49
|
config: {
|
|
54
50
|
theme: "dark", keybindings: "default", thinking: "high",
|
|
55
51
|
extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer", "compact-header", "ant-colony", "auto-update"],
|
|
56
|
-
skills: ["quick-setup", "debug-helper", "git-workflow", "ant-colony"],
|
|
57
52
|
prompts: ["review", "fix", "explain", "commit", "test", "refactor", "optimize", "security", "document", "pr"],
|
|
58
53
|
agents: "colony-operator",
|
|
59
54
|
},
|
package/dist/types.d.ts
CHANGED
package/dist/utils/install.js
CHANGED
|
@@ -159,18 +159,18 @@ export function applyConfig(config) {
|
|
|
159
159
|
}
|
|
160
160
|
catch { /* skip */ }
|
|
161
161
|
}
|
|
162
|
-
// 8. Copy skills
|
|
162
|
+
// 8. Copy skills (auto-discover all from pi-package/skills/)
|
|
163
163
|
const skillDir = join(agentDir, "skills");
|
|
164
164
|
cleanDir(skillDir);
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
165
|
+
const skillsSrcDir = resources.skillsDir();
|
|
166
|
+
try {
|
|
167
|
+
for (const entry of readdirSync(skillsSrcDir, { withFileTypes: true })) {
|
|
168
|
+
if (entry.isDirectory() && existsSync(join(skillsSrcDir, entry.name, "SKILL.md"))) {
|
|
169
|
+
copyDir(join(skillsSrcDir, entry.name), join(skillDir, entry.name));
|
|
170
|
+
}
|
|
171
171
|
}
|
|
172
|
-
catch { /* skip */ }
|
|
173
172
|
}
|
|
173
|
+
catch { /* skills dir not found, skip */ }
|
|
174
174
|
// 9. Copy themes (only custom ones)
|
|
175
175
|
const themeDir = join(agentDir, "themes");
|
|
176
176
|
cleanDir(themeDir);
|
package/dist/utils/resources.js
CHANGED
|
@@ -11,5 +11,6 @@ export const resources = {
|
|
|
11
11
|
extensionFile: (name) => join(RESOURCES, "extensions", `${name}.ts`),
|
|
12
12
|
prompt: (name) => join(RESOURCES, "prompts", `${name}.md`),
|
|
13
13
|
skill: (name) => join(RESOURCES, "skills", name),
|
|
14
|
+
skillsDir: () => join(RESOURCES, "skills"),
|
|
14
15
|
theme: (name) => join(RESOURCES, "themes", `${name}.json`),
|
|
15
16
|
};
|