opencode-manifold 0.4.22 → 0.5.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/README.md CHANGED
@@ -71,10 +71,8 @@ Open Manifold requires:
71
71
 
72
72
  1. **Install** using one of the methods above
73
73
  2. **Run `/manifold-init`** in the opencode TUI to set up agents, skills, and the Manifold directory
74
- 3. **(Optional) Run `/manifold-models`** to configure which models each sub-agent uses
75
- 4. **(Optional) Run `/manifold-update`** to clear plugin cache before updating (requires path configuration)
76
- 5. **Create a plan** — any format (markdown, TODO list, email, meeting notes)
77
- 6. **Point the Lead Dev agent** at your plan file and tell it to execute
74
+ 3. **Create a plan** any format (markdown, TODO list, email, meeting notes)
75
+ 4. **Point the Lead Dev agent** at your plan file and tell it to execute
78
76
 
79
77
  The Lead Dev will:
80
78
  - Extract tasks from your plan
@@ -182,11 +180,14 @@ rm -rf .opencode/agents/ .opencode/skills/ Manifold/
182
180
 
183
181
  ### Assigning models to agents
184
182
 
185
- **Interactive (Recommended):** Run `/manifold-models` in the TUI. You'll be prompted to:
186
- 1. Select a sub-agent (clerk, senior-dev, junior-dev, or debug)
187
- 2. Choose from all available models in your configured providers
183
+ **Using the get-model-path tool:** Say "call the get-model-path tool" to get the current model path (e.g., `google/gemini-3-flash`). Then manually edit the agent's frontmatter:
188
184
 
189
- This updates the agent's frontmatter automatically.
185
+ ```yaml
186
+ ---
187
+ description: Implementation specialist
188
+ model: google/gemini-3-flash
189
+ ---
190
+ ```
190
191
 
191
192
  **Manual:** Add a `model` field to the agent's frontmatter or your `opencode.json`:
192
193
 
@@ -253,7 +254,7 @@ Located at `Manifold/settings.json`:
253
254
  | `clerkRetryEnabled` | true | Clerk gets second pass after Debug fails |
254
255
  | `timeout` | 300 | Max seconds per agent call |
255
256
  | `testCommand` | null | Default test command |
256
- | `updateCachePaths` | `[]` | Paths to clear when running `/manifold-update` (see [Plugin Updates](#plugin-updates)) |
257
+ | `updateCachePaths` | `[]` | Legacy setting, no longer used |
257
258
 
258
259
  ---
259
260
 
@@ -299,57 +300,21 @@ A: The system is designed around the Clerk's ability to research context via sem
299
300
 
300
301
  ## Plugin Updates
301
302
 
302
- Opencode caches plugins to improve startup performance. When a new version of `opencode-manifold` is published, you may need to clear the cache to receive the update.
303
-
304
- ### Using `/manifold-update`
305
-
306
- 1. **Configure cache paths** in `Manifold/settings.json`:
307
- ```json
308
- {
309
- "updateCachePaths": [
310
- "~/.cache/opencode/packages/opencode-manifold@latest",
311
- "~/node_modules/opencode-manifold"
312
- ]
313
- }
314
- ```
315
-
316
- 2. **Run `/manifold-update`** in the TUI
317
- 3. **Confirm** the paths to clear
318
- 4. **Restart opencode** to pull the fresh version
319
-
320
- ### Safety Features
303
+ Opencode caches plugins to improve startup performance. When a new version of `opencode-manifold` is published, clear the cache to receive the update.
321
304
 
322
- The command includes built-in protections:
323
- - **Wildcards blocked:** Paths with `*` are rejected
324
- - **System paths protected:** `/`, `/System`, `/Applications`, home directory, etc. cannot be deleted
325
- - **Project detection:** Directories containing `.git` + `opencode.json` or `package.json` are treated as projects and blocked
326
- - **Explicit confirmation:** You must type "yes" to proceed
327
-
328
- ### Platform-Specific Paths
329
-
330
- **macOS:**
331
- ```json
332
- [
333
- "~/.cache/opencode/packages/opencode-manifold@latest",
334
- "~/node_modules/opencode-manifold"
335
- ]
305
+ ### macOS/Linux
306
+ ```bash
307
+ rm -rf ~/.cache/opencode/packages/opencode-manifold@latest
308
+ # If installed via npm globally:
309
+ rm -rf ~/node_modules/opencode-manifold
336
310
  ```
337
311
 
338
- **Linux:**
339
- ```json
340
- [
341
- "~/.cache/opencode/packages/opencode-manifold@latest"
342
- ]
312
+ ### Windows
313
+ ```cmd
314
+ rmdir /s "%LOCALAPPDATA%\opencode\packages\opencode-manifold@latest"
343
315
  ```
344
316
 
345
- **Windows:**
346
- ```json
347
- [
348
- "%LOCALAPPDATA%/opencode/packages/opencode-manifold@latest"
349
- ]
350
- ```
351
-
352
- If your cache is stored elsewhere, add the full path to `updateCachePaths`. The command is intentionally conservative — it's safer to manually clear cache than to accidentally delete project files.
317
+ Then restart opencode to pull the fresh version.
353
318
 
354
319
  ---
355
320
 
@@ -361,30 +326,28 @@ To remove Open Manifold from a project:
361
326
  rm -rf .opencode/agents/ .opencode/skills/ Manifold/
362
327
  ```
363
328
 
364
- Then remove the manifold-specific keys from `opencode.json` (`agent.manifold`, `permission.clerk`, `permission.senior-dev`, `permission.junior-dev`, `permission.debug`).
329
+ Then remove `"opencode-manifold"` from the `plugin` array in your `opencode.json`.
330
+
331
+ ### Clear Plugin Cache (Optional)
365
332
 
366
- To remove global templates:
333
+ If you want to fully remove cached plugin files:
367
334
 
335
+ **macOS/Linux:**
368
336
  ```bash
369
- rm -rf ~/.config/opencode/manifold/ ~/.config/opencode/commands/manifold-init.md
337
+ rm -rf ~/.cache/opencode/packages/opencode-manifold@latest
370
338
  ```
371
339
 
372
- To fully uninstall the plugin, also remove `"opencode-manifold"` from the `plugin` array in your global or project `opencode.json`.
373
-
374
- ### Complete Clean Uninstall
340
+ **Windows:**
341
+ ```cmd
342
+ rmdir /s "%LOCALAPPDATA%\opencode\packages\opencode-manifold@latest"
343
+ ```
375
344
 
376
- For a full clean reinstall, use `/manifold-update` (see [Plugin Updates](#plugin-updates)) to clear caches, then:
345
+ ### Remove Global Templates
377
346
 
378
347
  ```bash
379
- # Remove project files
380
- rm -rf .opencode/agents/ .opencode/skills/ Manifold/
381
-
382
- # Remove global templates
383
- rm -rf ~/.config/opencode/manifold/ ~/.config/opencode/commands/manifold-init.md
348
+ rm -rf ~/.config/opencode/manifold/
384
349
  ```
385
350
 
386
- Then remove `"opencode-manifold"` from your `opencode.json` plugin array.
387
-
388
351
  ---
389
352
 
390
353
  ---
package/dist/index.js CHANGED
@@ -238,7 +238,7 @@ async function initProject(directory, client) {
238
238
  initialized.push(`Manifold/ (${manifoldCopied.join(", ")})`);
239
239
  }
240
240
  const projectCommandsDir = join(directory, ".opencode", "commands");
241
- const commandsToCopy = ["manifold-models.md", "manifold-update.md"];
241
+ const commandsToCopy = [];
242
242
  const commandsInitialized = [];
243
243
  for (const cmd of commandsToCopy) {
244
244
  const src = join(globalTemplatesDir, "commands", cmd);
@@ -4334,486 +4334,6 @@ ${testResult.result.output}`,
4334
4334
 
4335
4335
  // src/index.ts
4336
4336
  init_get_model_path();
4337
-
4338
- // src/tools/set-subagent-model.ts
4339
- import { readFile as readFile5, writeFile as writeFile5, readdir as readdir3 } from "fs/promises";
4340
- import { existsSync as existsSync6 } from "fs";
4341
- import { join as join6 } from "path";
4342
- import { homedir as homedir2 } from "os";
4343
- var MANIFOLD_AGENTS = ["clerk", "senior-dev", "junior-dev", "debug"];
4344
- async function getManifoldAgents(directory) {
4345
- const agentsDir = join6(directory, ".opencode", "agents");
4346
- if (!existsSync6(agentsDir)) {
4347
- return [];
4348
- }
4349
- const files = await readdir3(agentsDir);
4350
- const agents = [];
4351
- for (const file of files) {
4352
- if (!file.endsWith(".md"))
4353
- continue;
4354
- const name = file.replace(".md", "");
4355
- if (MANIFOLD_AGENTS.includes(name)) {
4356
- agents.push(name);
4357
- }
4358
- }
4359
- return agents;
4360
- }
4361
- async function getAvailableModels(client) {
4362
- try {
4363
- const result = await client.config.providers();
4364
- const providers = result.data?.providers || [];
4365
- const models = [];
4366
- for (const provider of providers) {
4367
- if (provider.models) {
4368
- for (const [modelId, model] of Object.entries(provider.models)) {
4369
- models.push({
4370
- id: `${provider.id}/${modelId}`,
4371
- name: model.name || modelId,
4372
- providerID: provider.id
4373
- });
4374
- }
4375
- }
4376
- }
4377
- return models.sort((a, b) => a.name.localeCompare(b.name));
4378
- } catch (error) {
4379
- await client.app.log({
4380
- body: {
4381
- service: "opencode-manifold",
4382
- level: "error",
4383
- message: `Error fetching models: ${error}`
4384
- }
4385
- });
4386
- return [];
4387
- }
4388
- }
4389
- async function readAgentFile(agentName, directory) {
4390
- const agentPath = join6(directory, ".opencode", "agents", `${agentName}.md`);
4391
- if (!existsSync6(agentPath)) {
4392
- const globalPath = join6(homedir2(), ".config", "opencode", "manifold", "agents", `${agentName}.md`);
4393
- if (existsSync6(globalPath)) {
4394
- const content2 = await readFile5(globalPath, "utf-8");
4395
- const { frontmatter: frontmatter2, body: body2 } = parseFrontmatter(content2);
4396
- return { content: content2, frontmatter: frontmatter2, body: body2 };
4397
- }
4398
- throw new Error(`Agent file not found for ${agentName}`);
4399
- }
4400
- const content = await readFile5(agentPath, "utf-8");
4401
- const { frontmatter, body } = parseFrontmatter(content);
4402
- return { content, frontmatter, body };
4403
- }
4404
- function parseFrontmatter(content) {
4405
- const match = content.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
4406
- if (!match) {
4407
- return { frontmatter: {}, body: content };
4408
- }
4409
- const frontmatterYaml = match[1];
4410
- const body = match[2];
4411
- const frontmatter = jsYaml.load(frontmatterYaml) || {};
4412
- return { frontmatter, body };
4413
- }
4414
- function buildAgentFile(frontmatter, body) {
4415
- const yamlContent = jsYaml.dump(frontmatter, {
4416
- lineWidth: -1,
4417
- noCompatMode: true
4418
- });
4419
- return `---
4420
- ${yamlContent}---
4421
- ${body}`;
4422
- }
4423
- async function updateAgentModel(client, agentName, modelId, directory) {
4424
- const { frontmatter, body } = await readAgentFile(agentName, directory);
4425
- frontmatter.model = modelId;
4426
- const newContent = buildAgentFile(frontmatter, body);
4427
- const agentPath = join6(directory, ".opencode", "agents", `${agentName}.md`);
4428
- await writeFile5(agentPath, newContent);
4429
- await client.app.log({
4430
- body: {
4431
- service: "opencode-manifold",
4432
- level: "info",
4433
- message: `Updated ${agentName} model to ${modelId}`
4434
- }
4435
- });
4436
- }
4437
- async function handleSubModelCommand(client, directory) {
4438
- await client.app.log({
4439
- body: {
4440
- service: "opencode-manifold",
4441
- level: "info",
4442
- message: "Starting /sub-model command"
4443
- }
4444
- });
4445
- const agents = await getManifoldAgents(directory);
4446
- if (agents.length === 0) {
4447
- await client.tui.showToast({
4448
- body: {
4449
- type: "error",
4450
- message: "No Manifold agents found. Run /manifold-init first."
4451
- }
4452
- });
4453
- return;
4454
- }
4455
- const models = await getAvailableModels(client);
4456
- if (models.length === 0) {
4457
- await client.tui.showToast({
4458
- body: {
4459
- type: "error",
4460
- message: "No models available. Configure providers first."
4461
- }
4462
- });
4463
- return;
4464
- }
4465
- const agentList = agents.map((a) => `${a} (sub-agent)`).join(`
4466
- `);
4467
- await client.tui.appendPrompt({
4468
- body: {
4469
- type: "text",
4470
- text: `\uD83D\uDCCB Select a Manifold sub-agent to configure:
4471
-
4472
- ${agentList}`
4473
- }
4474
- });
4475
- await client.tui.publish({
4476
- body: {
4477
- type: "tui.prompt_append",
4478
- data: {
4479
- type: "text",
4480
- text: `
4481
-
4482
- Type the agent name (clerk, senior-dev, junior-dev, or debug): `
4483
- }
4484
- }
4485
- });
4486
- const agentResponse = await client.tui.control.next();
4487
- const selectedAgent = agentResponse.data?.input?.trim().toLowerCase();
4488
- if (!selectedAgent || !MANIFOLD_AGENTS.includes(selectedAgent)) {
4489
- await client.tui.showToast({
4490
- body: {
4491
- type: "error",
4492
- message: `Invalid agent selection. Must be one of: ${MANIFOLD_AGENTS.join(", ")}`
4493
- }
4494
- });
4495
- return;
4496
- }
4497
- if (!agents.includes(selectedAgent)) {
4498
- await client.tui.showToast({
4499
- body: {
4500
- type: "error",
4501
- message: `Agent ${selectedAgent} not found in .opencode/agents/`
4502
- }
4503
- });
4504
- return;
4505
- }
4506
- const currentModel = await readAgentFile(selectedAgent, directory).then((f) => f.frontmatter.model || "not set");
4507
- const modelList = models.map((m, i2) => `${i2 + 1}. ${m.name} (${m.id})`).join(`
4508
- `);
4509
- await client.tui.appendPrompt({
4510
- body: {
4511
- type: "text",
4512
- text: `
4513
- \uD83D\uDCE6 Available models for ${selectedAgent} (current: ${currentModel}):
4514
-
4515
- ${modelList}`
4516
- }
4517
- });
4518
- await client.tui.publish({
4519
- body: {
4520
- type: "tui.prompt_append",
4521
- data: {
4522
- type: "text",
4523
- text: `
4524
-
4525
- Type the model number or full model ID (e.g., anthropic/claude-sonnet-4-20250514): `
4526
- }
4527
- }
4528
- });
4529
- const modelResponse = await client.tui.control.next();
4530
- const selectedModelInput = modelResponse.data?.input?.trim();
4531
- if (!selectedModelInput) {
4532
- await client.tui.showToast({
4533
- body: {
4534
- type: "error",
4535
- message: "No model selected"
4536
- }
4537
- });
4538
- return;
4539
- }
4540
- let selectedModelId;
4541
- const modelIndex = parseInt(selectedModelInput, 10) - 1;
4542
- if (!isNaN(modelIndex) && modelIndex >= 0 && modelIndex < models.length) {
4543
- selectedModelId = models[modelIndex].id;
4544
- } else {
4545
- const found = models.find((m) => m.id.toLowerCase() === selectedModelInput.toLowerCase());
4546
- if (found) {
4547
- selectedModelId = found.id;
4548
- }
4549
- }
4550
- if (!selectedModelId) {
4551
- await client.tui.showToast({
4552
- body: {
4553
- type: "error",
4554
- message: `Invalid model selection: ${selectedModelInput}`
4555
- }
4556
- });
4557
- return;
4558
- }
4559
- await updateAgentModel(client, selectedAgent, selectedModelId, directory);
4560
- await client.tui.showToast({
4561
- body: {
4562
- type: "success",
4563
- message: `✅ Set ${selectedAgent} to ${selectedModelId}`
4564
- }
4565
- });
4566
- await client.tui.appendPrompt({
4567
- body: {
4568
- type: "text",
4569
- text: `
4570
- ✅ Model updated for ${selectedAgent}: ${selectedModelId}
4571
- `
4572
- }
4573
- });
4574
- }
4575
-
4576
- // src/tools/clear-cache.ts
4577
- import { rm } from "fs/promises";
4578
- import { existsSync as existsSync7 } from "fs";
4579
- import { join as join7, isAbsolute } from "path";
4580
- import { homedir as homedir3 } from "os";
4581
- var PROTECTED_PATHS = [
4582
- "/",
4583
- "/System",
4584
- "/Applications",
4585
- "/Users",
4586
- "/etc",
4587
- "/bin",
4588
- "/sbin",
4589
- "/usr"
4590
- ];
4591
- function resolvePath(pathStr) {
4592
- const expanded = pathStr.startsWith("~") ? join7(homedir3(), pathStr.slice(1)) : pathStr;
4593
- return isAbsolute(expanded) ? expanded : join7(process.cwd(), expanded);
4594
- }
4595
- function isPathSafe(pathStr) {
4596
- const normalized = pathStr.toLowerCase();
4597
- if (normalized.includes("*")) {
4598
- return { safe: false, reason: "Wildcards are not allowed for safety" };
4599
- }
4600
- for (const protectedPath of PROTECTED_PATHS) {
4601
- if (normalized === protectedPath.toLowerCase() || normalized.startsWith(protectedPath.toLowerCase() + "/") || normalized.startsWith(protectedPath.toLowerCase() + "\\")) {
4602
- return { safe: false, reason: `Cannot delete protected system path: ${protectedPath}` };
4603
- }
4604
- }
4605
- if (normalized === homedir3().toLowerCase() || normalized.startsWith(homedir3().toLowerCase() + "/") && !normalized.includes("cache") && !normalized.includes("node_modules")) {
4606
- const parts = normalized.replace(homedir3().toLowerCase(), "").split(/[\/\\]/).filter(Boolean);
4607
- if (parts.length === 1) {
4608
- return { safe: false, reason: "Cannot delete directories directly in home folder" };
4609
- }
4610
- }
4611
- return { safe: true };
4612
- }
4613
- async function isProjectDirectory(pathStr) {
4614
- try {
4615
- const hasGit = existsSync7(join7(pathStr, ".git"));
4616
- const hasOpencodeConfig = existsSync7(join7(pathStr, "opencode.json"));
4617
- const hasPackageJson = existsSync7(join7(pathStr, "package.json"));
4618
- if (hasGit && (hasOpencodeConfig || hasPackageJson)) {
4619
- return true;
4620
- }
4621
- const entries = await Promise.all([
4622
- existsSync7(join7(pathStr, ".git")) ? "git" : null,
4623
- existsSync7(join7(pathStr, "opencode.json")) ? "opencode" : null
4624
- ].filter(Boolean));
4625
- return entries.length >= 2;
4626
- } catch {
4627
- return false;
4628
- }
4629
- }
4630
- async function clearCachePaths(paths) {
4631
- const cleared = [];
4632
- const skipped = [];
4633
- const blocked = [];
4634
- for (const pathStr of paths) {
4635
- const resolved = resolvePath(pathStr);
4636
- const safetyCheck = isPathSafe(resolved);
4637
- if (!safetyCheck.safe) {
4638
- blocked.push({ path: resolved, reason: safetyCheck.reason || "Failed safety check" });
4639
- continue;
4640
- }
4641
- if (!existsSync7(resolved)) {
4642
- skipped.push(resolved);
4643
- continue;
4644
- }
4645
- const isProject = await isProjectDirectory(resolved);
4646
- if (isProject) {
4647
- blocked.push({ path: resolved, reason: "Appears to be a project directory (contains .git + config files)" });
4648
- continue;
4649
- }
4650
- try {
4651
- await rm(resolved, { recursive: true, force: true });
4652
- cleared.push(resolved);
4653
- } catch (error) {
4654
- blocked.push({ path: resolved, reason: `Failed to delete: ${error}` });
4655
- }
4656
- }
4657
- return { cleared, skipped, blocked };
4658
- }
4659
- async function handleUpdateCommand(client, directory) {
4660
- await client.app.log({
4661
- body: {
4662
- service: "opencode-manifold",
4663
- level: "info",
4664
- message: "Starting /manifold-update command"
4665
- }
4666
- });
4667
- const settings = await readSettings(directory);
4668
- const configuredPaths = settings.updateCachePaths || [];
4669
- if (configuredPaths.length === 0) {
4670
- const examplePaths = [
4671
- "~/.cache/opencode/packages/opencode-manifold@latest",
4672
- "~/node_modules/opencode-manifold"
4673
- ];
4674
- await client.tui.appendPrompt({
4675
- body: {
4676
- type: "text",
4677
- text: `\uD83D\uDD04 **Manifold Plugin Update**
4678
-
4679
- No cache paths configured in \`Manifold/settings.json\`.
4680
-
4681
- To enable this feature, add cache paths to your settings:
4682
-
4683
- \`\`\`json
4684
- {
4685
- "updateCachePaths": [
4686
- "~/.cache/opencode/packages/opencode-manifold@latest",
4687
- "~/node_modules/opencode-manifold"
4688
- ]
4689
- }
4690
- \`\`\`
4691
-
4692
- **Safety features:**
4693
- • Wildcards are blocked
4694
- • System directories are protected
4695
- • Project directories (with .git + config) are protected
4696
-
4697
- **macOS users:** The paths above are typical cache locations.
4698
- **Linux/Windows users:** Add your opencode cache paths manually.
4699
- `
4700
- }
4701
- });
4702
- await client.tui.showToast({
4703
- body: {
4704
- type: "info",
4705
- message: "Configure updateCachePaths in Manifold/settings.json"
4706
- }
4707
- });
4708
- return;
4709
- }
4710
- const resolvedPaths = configuredPaths.map(resolvePath);
4711
- await client.tui.appendPrompt({
4712
- body: {
4713
- type: "text",
4714
- text: `\uD83D\uDD04 **Manifold Plugin Update**
4715
-
4716
- The following paths will be cleared:
4717
-
4718
- ${resolvedPaths.map((p) => `• ${p}`).join(`
4719
- `)}
4720
-
4721
- ⚠️ **This action is irreversible.** These paths are read from \`Manifold/settings.json\`.
4722
- `
4723
- }
4724
- });
4725
- await client.tui.publish({
4726
- body: {
4727
- type: "tui.prompt_append",
4728
- data: {
4729
- type: "text",
4730
- text: `
4731
-
4732
- Type 'yes' to confirm and clear cache: `
4733
- }
4734
- }
4735
- });
4736
- const response = await client.tui.control.next();
4737
- const answer = response.data?.input?.trim().toLowerCase();
4738
- if (answer !== "yes" && answer !== "y") {
4739
- await client.tui.appendPrompt({
4740
- body: {
4741
- type: "text",
4742
- text: `
4743
- ❌ Cancelled. No cache cleared.
4744
- `
4745
- }
4746
- });
4747
- return;
4748
- }
4749
- const { cleared, skipped, blocked } = await clearCachePaths(configuredPaths);
4750
- let message = `
4751
- `;
4752
- if (cleared.length > 0) {
4753
- message += `✅ **Cleared:**
4754
- ${cleared.map((p) => `• ${p}`).join(`
4755
- `)}
4756
-
4757
- `;
4758
- }
4759
- if (skipped.length > 0) {
4760
- message += `⏭️ **Already clean / skipped:**
4761
- ${skipped.map((p) => `• ${p}`).join(`
4762
- `)}
4763
-
4764
- `;
4765
- }
4766
- if (blocked.length > 0) {
4767
- message += `\uD83D\uDEAB **Blocked (safety check):**
4768
- `;
4769
- for (const item of blocked) {
4770
- message += `• ${item.path}
4771
- Reason: ${item.reason}
4772
- `;
4773
- }
4774
- message += `
4775
- `;
4776
- }
4777
- if (cleared.length > 0) {
4778
- message += `**Next step:** Restart opencode to pull the latest plugin version.
4779
-
4780
- Your project files (.opencode/, Manifold/) are untouched — only the configured cache paths were cleared.
4781
- `;
4782
- } else if (blocked.length > 0) {
4783
- message += `⚠️ No paths were cleared. Review the blocked paths above and adjust your settings if needed.
4784
- `;
4785
- }
4786
- await client.tui.appendPrompt({
4787
- body: {
4788
- type: "text",
4789
- text: message
4790
- }
4791
- });
4792
- if (cleared.length > 0) {
4793
- await client.tui.showToast({
4794
- body: {
4795
- type: "success",
4796
- message: `Cache cleared (${cleared.length} paths). Restart opencode to update.`
4797
- }
4798
- });
4799
- } else if (blocked.length > 0) {
4800
- await client.tui.showToast({
4801
- body: {
4802
- type: "error",
4803
- message: `Cache update blocked (${blocked.length} paths failed safety check)`
4804
- }
4805
- });
4806
- }
4807
- await client.app.log({
4808
- body: {
4809
- service: "opencode-manifold",
4810
- level: "info",
4811
- message: `/manifold-update complete: cleared ${cleared.length}, skipped ${skipped.length}, blocked ${blocked.length}`
4812
- }
4813
- });
4814
- }
4815
-
4816
- // src/index.ts
4817
4337
  var ManifoldPlugin = async (ctx) => {
4818
4338
  setPluginContext(ctx.client);
4819
4339
  setPluginContext2(ctx.client);
@@ -4848,15 +4368,8 @@ var ManifoldPlugin = async (ctx) => {
4848
4368
  }
4849
4369
  ];
4850
4370
  }
4851
- } else if (input.command === "manifold-models") {
4852
- await handleSubModelCommand(ctx.client, ctx.directory);
4853
- output.parts = [{ type: "text", text: "Manifold sub-agent configuration started." }];
4854
- } else if (input.command === "manifold-update") {
4855
- await handleUpdateCommand(ctx.client, ctx.directory);
4856
- output.parts = [{ type: "text", text: "Manifold update process started." }];
4857
4371
  } else if (input.command === "manifold-model-path") {
4858
- const { getModelPath: getModelPath2 } = await Promise.resolve().then(() => (init_get_model_path(), exports_get_model_path));
4859
- const modelPath = await getModelPath2(ctx.client, input.sessionID || undefined);
4372
+ const modelPath = await getModelPath(ctx.client, input.sessionID || undefined);
4860
4373
  output.parts = [{ type: "text", text: modelPath }];
4861
4374
  }
4862
4375
  }