@compilr-dev/sdk 0.10.4 → 0.10.6

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/agent.js CHANGED
@@ -454,6 +454,12 @@ class CompilrAgentImpl {
454
454
  getUsage() {
455
455
  return { ...this.totalUsage };
456
456
  }
457
+ getModel() {
458
+ return this.agent.getModel();
459
+ }
460
+ setModel(modelId) {
461
+ this.agent.setModel(modelId);
462
+ }
457
463
  unwrap() {
458
464
  return this.agent;
459
465
  }
package/dist/config.d.ts CHANGED
@@ -316,6 +316,10 @@ export interface CompilrAgent {
316
316
  clearHistory(): this;
317
317
  /** Get token usage info */
318
318
  getUsage(): UsageInfo;
319
+ /** Get the current model ID */
320
+ getModel(): string;
321
+ /** Change the model for subsequent LLM calls (same provider only) */
322
+ setModel(modelId: string): void;
319
323
  /** Get the underlying Agent instance */
320
324
  unwrap(): unknown;
321
325
  /** Abort the current run */
@@ -129,22 +129,103 @@ Research projects have: /outline, /literature-review, /methodology, /abstract.
129
129
  Business projects have: /business-vision, /market-analysis, /financial-model, /pitch.
130
130
 
131
131
  Skills can be combined with your own instructions: type /design then add context.`,
132
+ },
133
+ {
134
+ id: 'custom-skills',
135
+ title: 'Custom Skills — Create Your Own Slash Commands',
136
+ keywords: [
137
+ 'custom skill',
138
+ 'user skill',
139
+ 'project skill',
140
+ '/skill',
141
+ 'SKILL.md',
142
+ 'fork',
143
+ 'bind',
144
+ 'slash command',
145
+ 'create skill',
146
+ ],
147
+ content: `You can create custom skills that become slash commands (e.g., /my-template).
148
+
149
+ **What is a custom skill?**
150
+ A folder with a SKILL.md file containing YAML frontmatter (name, description) and a markdown body (the prompt the agent receives). Follows the Anthropic Agent Skills format.
151
+
152
+ **Two scopes:**
153
+ - **User scope** (~/.compilr-dev/skills/) — personal, works across all projects
154
+ - **Project scope** (<project>/.compilr/skills/) — shared via version control
155
+
156
+ **CLI:** Use the /skill overlay to create, edit, fork, bind, enable/disable, delete, and rename skills. Press n to create, e to edit (fullscreen editor), f to fork an SDK skill, b to manage bindings.
157
+
158
+ **Desktop:** The Agents panel has a Skills section showing custom skills. Click the maximize button to open the SkillsView tab with full management (create, fork, bind/unbind, enable/disable, delete). Click a skill name to view/edit in the code editor.
159
+
160
+ **Forking SDK skills:**
161
+ You cannot override built-in skills directly. Instead, fork them: this creates a copy with your changes. Then bind a slash command to your fork (e.g., /design → design-acme). The capability bundle still loads based on the command name.
162
+
163
+ **Bindings:**
164
+ Bindings remap slash commands to custom skills. Example: bind /design to your forked design-acme skill. When you type /design, it uses your custom prompt instead of the SDK version. Use the Bindings tab/section to manage them.
165
+
166
+ **Validation:**
167
+ Skills with issues (short description, empty body, name mismatch) show a ⚠ warning. Fix them in the editor — validation runs automatically on save.
168
+
169
+ **Custom skills appear in:**
170
+ - Slash command autocomplete (/ in chat)
171
+ - Help menu (/help in CLI)
172
+ - Slash command picker (/ button in Desktop)`,
132
173
  },
133
174
  // ── Models & Providers ──────────────────────────────────────────────────
134
175
  {
135
176
  id: 'models',
136
- title: 'Models and Providers',
137
- keywords: ['model', 'provider', 'claude', 'openai', 'gemini', 'ollama', 'llm'],
177
+ title: 'Models, Providers, and Model Switching',
178
+ keywords: [
179
+ 'model',
180
+ 'provider',
181
+ 'claude',
182
+ 'openai',
183
+ 'gemini',
184
+ 'ollama',
185
+ 'llm',
186
+ 'switch model',
187
+ 'change model',
188
+ 'hot swap',
189
+ 'tier',
190
+ 'fast',
191
+ 'balanced',
192
+ 'powerful',
193
+ 'settings model',
194
+ 'agent model',
195
+ 'per-agent model',
196
+ ],
138
197
  content: `Compilr Dev supports multiple LLM providers:
139
198
 
140
- - Claude (Anthropic) — Claude Opus, Sonnet, Haiku
199
+ - Claude (Anthropic) — Opus (powerful), Sonnet (balanced), Haiku (fast)
141
200
  - OpenAI — GPT-4o, GPT-4o-mini
142
201
  - Gemini (Google) — Gemini 2.5 Pro, Flash
143
202
  - Ollama — Local models (llama, codellama, etc.)
144
203
  - Together, Groq, Fireworks, Perplexity, OpenRouter
145
204
 
146
205
  Each provider requires an API key (except Ollama which runs locally).
147
- Models are organized by tier: premium, balanced, fast.`,
206
+
207
+ **Model tiers:**
208
+ - **Fast** — quick responses, lower cost (Haiku, GPT-4o-mini, Flash)
209
+ - **Balanced** — best mix of speed and capability, the default (Sonnet, GPT-4o)
210
+ - **Powerful** — best reasoning for complex tasks (Opus)
211
+
212
+ **Settings model vs agent model — important distinction:**
213
+ - The model in Settings is a **template for new agents**. Changing it does NOT affect existing agents. It only determines which model new agents get when you create them.
214
+ - Each agent has its **own model**. You can change an agent's model independently without affecting other agents.
215
+
216
+ **How to change an agent's model:**
217
+ - **Desktop:** Click the model name in the status bar (bottom right) to open the model picker for the active chat's agent. You can also change models from the Agents panel.
218
+ - **CLI:** Use /model to change the active agent's model.
219
+
220
+ **Same provider only (Level 1):** You can switch between models within the same provider (e.g., Claude Sonnet → Claude Opus). Switching providers (e.g., Claude → Gemini) is not yet supported.
221
+
222
+ **When to switch models:**
223
+ - Use a **powerful** model (Opus) for complex architecture decisions, debugging hard problems, or writing nuanced content
224
+ - Use the **balanced** model (Sonnet) for everyday coding, planning, and general tasks
225
+ - Use a **fast** model (Haiku) for quick questions, simple edits, or when cost matters
226
+ - Switch back after the hard task is done — no need to stay on the expensive model
227
+
228
+ **Cost awareness:** switching from Haiku to Opus mid-conversation can significantly increase cost. The model tier is shown in the status bar and agent cards so you always know what you're using.`,
148
229
  },
149
230
  // ── Context & Memory ────────────────────────────────────────────────────
150
231
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/sdk",
3
- "version": "0.10.4",
3
+ "version": "0.10.6",
4
4
  "description": "Universal agent runtime for building AI-powered applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -56,7 +56,7 @@
56
56
  "node": ">=20.0.0"
57
57
  },
58
58
  "dependencies": {
59
- "@compilr-dev/agents": "^0.5.7",
59
+ "@compilr-dev/agents": "^0.5.8",
60
60
  "@compilr-dev/logger": "^0.1.0",
61
61
  "@compilr-dev/sdk": "^0.10.2",
62
62
  "ajv": "^6.14.0",