@oh-my-pi/pi-coding-agent 12.7.6 → 12.8.0

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +37 -37
  2. package/README.md +9 -1052
  3. package/package.json +7 -7
  4. package/src/cli/args.ts +1 -0
  5. package/src/cli/update-cli.ts +49 -35
  6. package/src/cli/web-search-cli.ts +3 -2
  7. package/src/commands/web-search.ts +1 -0
  8. package/src/config/model-registry.ts +6 -0
  9. package/src/config/settings-schema.ts +25 -3
  10. package/src/config/settings.ts +1 -0
  11. package/src/extensibility/extensions/wrapper.ts +20 -13
  12. package/src/extensibility/slash-commands.ts +12 -91
  13. package/src/lsp/client.ts +24 -27
  14. package/src/lsp/index.ts +92 -42
  15. package/src/mcp/config-writer.ts +33 -0
  16. package/src/mcp/config.ts +6 -1
  17. package/src/mcp/types.ts +1 -0
  18. package/src/modes/components/custom-editor.ts +8 -5
  19. package/src/modes/components/settings-defs.ts +2 -1
  20. package/src/modes/controllers/command-controller.ts +12 -6
  21. package/src/modes/controllers/input-controller.ts +21 -186
  22. package/src/modes/controllers/mcp-command-controller.ts +60 -3
  23. package/src/modes/interactive-mode.ts +2 -2
  24. package/src/modes/types.ts +1 -1
  25. package/src/sdk.ts +23 -1
  26. package/src/secrets/index.ts +116 -0
  27. package/src/secrets/obfuscator.ts +269 -0
  28. package/src/secrets/regex.ts +21 -0
  29. package/src/session/agent-session.ts +143 -21
  30. package/src/session/compaction/branch-summarization.ts +2 -2
  31. package/src/session/compaction/compaction.ts +10 -3
  32. package/src/session/compaction/utils.ts +25 -1
  33. package/src/slash-commands/builtin-registry.ts +419 -0
  34. package/src/web/scrapers/github.ts +50 -12
  35. package/src/web/search/index.ts +5 -5
  36. package/src/web/search/provider.ts +13 -2
  37. package/src/web/search/providers/brave.ts +165 -0
  38. package/src/web/search/types.ts +1 -1
  39. package/docs/compaction.md +0 -436
  40. package/docs/config-usage.md +0 -176
  41. package/docs/custom-tools.md +0 -585
  42. package/docs/environment-variables.md +0 -257
  43. package/docs/extension-loading.md +0 -106
  44. package/docs/extensions.md +0 -1342
  45. package/docs/fs-scan-cache-architecture.md +0 -50
  46. package/docs/hooks.md +0 -906
  47. package/docs/models.md +0 -234
  48. package/docs/python-repl.md +0 -110
  49. package/docs/rpc.md +0 -1173
  50. package/docs/sdk.md +0 -1039
  51. package/docs/session-tree-plan.md +0 -84
  52. package/docs/session.md +0 -368
  53. package/docs/skills.md +0 -254
  54. package/docs/theme.md +0 -696
  55. package/docs/tree.md +0 -206
  56. package/docs/tui.md +0 -487
package/docs/skills.md DELETED
@@ -1,254 +0,0 @@
1
- > omp can create skills. Ask it to build one for your use case.
2
-
3
- # Skills
4
-
5
- Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks.
6
-
7
- OMP follows the [Agent Skills](https://agentskills.io/specification) SKILL.md format (YAML frontmatter + markdown body) and exposes skills via `skill://` URLs.
8
-
9
- **Example use cases:**
10
- - Web search and content extraction (Brave Search API)
11
- - Browser automation via Chrome DevTools Protocol
12
- - Google Calendar, Gmail, Drive integration
13
- - PDF/DOCX processing and creation
14
- - Speech-to-text transcription
15
- - YouTube transcript extraction
16
-
17
- See [Skill Repositories](#skill-repositories) for ready-to-use skills.
18
-
19
- ## When to Use Skills
20
-
21
- | Need | Solution |
22
- |------|----------|
23
- | Always-needed context (conventions, commands) | AGENTS.md |
24
- | User triggers a specific prompt template | Slash command |
25
- | Additional tool directly callable by the LLM (like read/write/edit/bash) | Custom tool |
26
- | On-demand capability package (workflows, scripts, setup) | Skill |
27
-
28
- Skills are loaded when:
29
- - The agent decides the task matches a skill's description
30
- - The user explicitly asks to use a skill (e.g., "use the pdf skill to extract tables")
31
-
32
- **Good skill examples:**
33
- - Browser automation with helper scripts and CDP workflow
34
- - Google Calendar CLI with setup instructions and usage patterns
35
- - PDF processing with multiple tools and extraction patterns
36
- - Speech-to-text transcription with API setup
37
-
38
- **Not a good fit for skills:**
39
- - "Always use TypeScript strict mode" → put in AGENTS.md
40
- - "Review my code" → make a slash command
41
- - Need user confirmation dialogs or custom TUI rendering → make a custom tool
42
-
43
- ## Skill Structure
44
-
45
- A skill is a directory with a `SKILL.md` file. Everything else is freeform. Example structure:
46
-
47
- ```
48
- my-skill/
49
- ├── SKILL.md # Required: frontmatter + instructions
50
- ├── scripts/ # Helper scripts (bash, python, node)
51
- │ └── process.sh
52
- ├── references/ # Detailed docs loaded on-demand
53
- │ └── api-reference.md
54
- └── assets/ # Templates, images, etc.
55
- └── template.json
56
- ```
57
-
58
- ### SKILL.md Format
59
-
60
- ```markdown
61
- ---
62
- name: my-skill
63
- description: What this skill does and when to use it. Be specific.
64
- ---
65
-
66
- # My Skill
67
-
68
- ## Setup
69
-
70
- Run once before first use:
71
- \`\`\`bash
72
- cd /path/to/skill && npm install
73
- \`\`\`
74
-
75
- ## Usage
76
-
77
- \`\`\`bash
78
- ./scripts/process.sh <input>
79
- \`\`\`
80
-
81
- ## Workflow
82
-
83
- 1. First step
84
- 2. Second step
85
- 3. Third step
86
- ```
87
-
88
- ### Frontmatter Fields
89
-
90
- | Field | Required | Notes |
91
- |-------|----------|-------|
92
- | `name` | No | Defaults to the skill directory name. Use lowercase + hyphens for compatibility. |
93
- | `description` | Yes (OMP/custom), recommended everywhere | Used for skill matching and shown in the system prompt. |
94
-
95
- OMP ignores additional frontmatter fields, but other tooling may use them.
96
-
97
- #### Naming Guidance
98
-
99
- OMP does not enforce naming rules, but skill names must match exactly for `skill://<name>` and `/skill:<name>` lookups. For cross-tool compatibility, keep names lowercase, hyphenated, and aligned with the directory name.
100
-
101
- ### File References
102
-
103
- Use `skill://` URLs to reference files inside a skill directory:
104
-
105
- ```markdown
106
- Read the full skill:
107
- \`\`\`
108
- skill://my-skill
109
- \`\`\`
110
-
111
- Read a reference file:
112
- \`\`\`
113
- skill://my-skill/references/api-reference.md
114
- \`\`\`
115
- ```
116
-
117
- ## Skill Locations
118
-
119
- Skills are discovered from these sources (first match wins on name collisions):
120
-
121
- - OMP user: `~/.omp/agent/skills/<skill>/SKILL.md` (legacy alias: `~/.pi/agent/skills/...`)
122
- - OMP project: `<cwd>/.omp/skills/<skill>/SKILL.md` (legacy alias: `<cwd>/.pi/skills/...`)
123
- - Claude Code: `~/.claude/skills/<skill>/SKILL.md` and `<cwd>/.claude/skills/<skill>/SKILL.md`
124
- - Agents standard: `~/.agents/skills/<skill>/SKILL.md`
125
- - Codex CLI: `~/.codex/skills/<skill>/SKILL.md` and `<cwd>/.codex/skills/<skill>/SKILL.md`
126
- - Custom directories from `skills.customDirectories` (scanned recursively)
127
-
128
- Discovery skips hidden directories and `node_modules`, and respects `.gitignore`, `.ignore`, and `.fdignore` rules.
129
-
130
- ## Configuration
131
-
132
- Global settings live in `~/.omp/agent/config.yml` (migrated from legacy `settings.json`). Project overrides live in `<cwd>/.omp/settings.json` or `<cwd>/.pi/settings.json`.
133
-
134
- ```yaml
135
- skills:
136
- enabled: true
137
- enableSkillCommands: true
138
- enableCodexUser: true
139
- enableClaudeUser: true
140
- enableClaudeProject: true
141
- enablePiUser: true
142
- enablePiProject: true
143
- customDirectories: []
144
- ignoredSkills: []
145
- includeSkills: []
146
- ```
147
-
148
- | Setting | Default | Description |
149
- |---------|---------|-------------|
150
- | `enabled` | `true` | Master toggle for all skills |
151
- | `enableSkillCommands` | `true` | Register `/skill:<name>` commands in interactive mode |
152
- | `enableCodexUser` | `true` | Load from `~/.codex/skills/` |
153
- | `enableClaudeUser` | `true` | Load from `~/.claude/skills/` |
154
- | `enableClaudeProject` | `true` | Load from `<cwd>/.claude/skills/` |
155
- | `enablePiUser` | `true` | Load from `~/.omp/agent/skills/` (or `~/.pi/agent/skills/`) |
156
- | `enablePiProject` | `true` | Load from `<cwd>/.omp/skills/` (or `<cwd>/.pi/skills/`) |
157
- | `customDirectories` | `[]` | Additional directories to scan recursively (use absolute paths) |
158
- | `ignoredSkills` | `[]` | Glob patterns to exclude (e.g., `"deprecated-*"`) |
159
- | `includeSkills` | `[]` | Glob patterns to include (empty = all) |
160
-
161
- **Note:** `ignoredSkills` takes precedence over both `includeSkills` and the `--skills` CLI flag.
162
-
163
- ### CLI Filtering
164
-
165
- Use `--skills` to filter skills for a specific invocation:
166
-
167
- ```bash
168
- # Only load specific skills
169
- omp --skills git,docker
170
-
171
- # Glob patterns
172
- omp --skills "git-*,docker-*"
173
-
174
- # All skills matching a prefix
175
- omp --skills "aws-*"
176
- ```
177
-
178
- This overrides the `includeSkills` setting for the current session.
179
-
180
- ## How Skills Work
181
-
182
- 1. At startup, omp scans enabled skill locations and filters them by settings and CLI flags.
183
- 2. If the `read` tool is available, skill names + descriptions are injected into the system prompt as XML.
184
- 3. When a task matches a skill, the agent loads it with `read skill://<name>` or `skill://<name>/<path>`.
185
- 4. When skills are preloaded (e.g., Task tool with explicit skills), their full contents are inlined under `<preloaded_skills>` and no `read` call is needed.
186
-
187
- This is progressive disclosure: only descriptions are always in context, full instructions load on-demand unless explicitly preloaded.
188
-
189
- ## Warnings
190
-
191
- OMP emits warnings when:
192
-
193
- - A skill directory or file cannot be read
194
- - Two skills share the same name (the first loaded wins; later ones are skipped)
195
-
196
- ## Example: Web Search Skill
197
-
198
- ```
199
- brave-search/
200
- ├── SKILL.md
201
- ├── search.js
202
- └── content.js
203
- ```
204
-
205
- **SKILL.md:**
206
- ```markdown
207
- ---
208
- name: brave-search
209
- description: Web search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content.
210
- ---
211
-
212
- # Brave Search
213
-
214
- ## Setup
215
-
216
- \`\`\`bash
217
- cd /path/to/brave-search && npm install
218
- \`\`\`
219
-
220
- ## Search
221
-
222
- \`\`\`bash
223
- ./search.js "query" # Basic search
224
- ./search.js "query" --content # Include page content
225
- \`\`\`
226
-
227
- ## Extract Page Content
228
-
229
- \`\`\`bash
230
- ./content.js https://example.com
231
- \`\`\`
232
- ```
233
-
234
- ## Skill Repositories
235
-
236
- For inspiration and ready-to-use skills:
237
-
238
- - [Anthropic Skills](https://github.com/anthropics/skills) - Official skills for document processing (docx, pdf, pptx, xlsx), web development, and more
239
- - [Pi Skills](https://github.com/badlogic/pi-skills) - Skills for web search, browser automation, Google APIs, transcription
240
-
241
- ## Disabling Skills
242
-
243
- CLI:
244
- ```bash
245
- omp --no-skills
246
- ```
247
-
248
- Settings:
249
- ```yaml
250
- skills:
251
- enabled: false
252
- ```
253
-
254
- Use the granular `enable*` flags to disable individual sources (e.g., `enableClaudeUser: false` to skip `~/.claude/skills`).