oh-my-opencode-cohub 1.12.1 → 1.12.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"config-io.d.ts","sourceRoot":"","sources":["../../src/cli/config-io.ts"],"names":[],"mappings":"AAkCA,2CAA2C;AAC3C,wBAAgB,yBAAyB,IAAI;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAajF;AAED,sCAAsC;AACtC,wBAAgB,oBAAoB,IAAI;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAa5E;AAOD,mDAAmD;AACnD,wBAAgB,mBAAmB,IAAI;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAuD3E;AA+ED,4DAA4D;AAC5D,wBAAgB,kBAAkB,IAAI;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CA2G1E;AAED,8BAA8B;AAC9B,wBAAgB,cAAc,IAAI;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CA6GzE"}
1
+ {"version":3,"file":"config-io.d.ts","sourceRoot":"","sources":["../../src/cli/config-io.ts"],"names":[],"mappings":"AAkCA,2CAA2C;AAC3C,wBAAgB,yBAAyB,IAAI;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAajF;AAED,sCAAsC;AACtC,wBAAgB,oBAAoB,IAAI;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAa5E;AAOD,mDAAmD;AACnD,wBAAgB,mBAAmB,IAAI;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAgF3E;AA+ED,4DAA4D;AAC5D,wBAAgB,kBAAkB,IAAI;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CA2G1E;AAED,8BAA8B;AAC9B,wBAAgB,cAAc,IAAI;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CA6GzE"}
package/dist/cli/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // package.json
3
- var version = "1.12.1";
3
+ var version = "1.12.2";
4
4
 
5
5
  // src/cli/config-io.ts
6
6
  import * as fs from "node:fs";
@@ -490,21 +490,37 @@ orchestrator 委派时可参考上述原则。不确定时,co-oracle 自身会
490
490
  };
491
491
  let added = 0;
492
492
  let migrated = 0;
493
+ let cleanedModel = 0;
493
494
  for (const [name, agentConfig] of Object.entries(cohubAgents)) {
494
495
  const existing = agents[name];
495
496
  const template = agentConfig;
496
497
  if (!existing) {
497
498
  agents[name] = agentConfig;
498
499
  added++;
499
- } else if (typeof existing.prompt === "string" && existing.prompt.includes("request_plan_approval")) {
500
+ continue;
501
+ }
502
+ let needUpdate = false;
503
+ if (typeof existing.prompt === "string" && existing.prompt.includes("request_plan_approval")) {
500
504
  existing.prompt = template.prompt;
501
505
  delete existing.permission;
502
- migrated++;
503
- } else if (existing.mode !== template.mode) {
506
+ needUpdate = true;
507
+ }
508
+ if (existing.mode !== template.mode) {
504
509
  existing.mode = template.mode;
505
510
  existing.prompt = template.prompt;
506
- migrated++;
511
+ needUpdate = true;
512
+ }
513
+ if ("model" in existing) {
514
+ delete existing.model;
515
+ needUpdate = true;
516
+ cleanedModel++;
507
517
  }
518
+ if ("variant" in existing) {
519
+ delete existing.variant;
520
+ needUpdate = true;
521
+ }
522
+ if (needUpdate)
523
+ migrated++;
508
524
  }
509
525
  if (added > 0 || migrated > 0) {
510
526
  writeJSON(configPath, config);
@@ -513,7 +529,14 @@ orchestrator 委派时可参考上述原则。不确定时,co-oracle 自身会
513
529
  config.default_agent = "co-orchestrator";
514
530
  writeJSON(configPath, config);
515
531
  }
516
- return { success: true, message: `✓ CoHub 代理:新增 ${added} 个,更新 ${migrated} 个${added + migrated === 0 ? "(全部已是最新,跳过)" : ""}` };
532
+ const parts = [];
533
+ if (added > 0)
534
+ parts.push(`新增 ${added} 个`);
535
+ if (migrated > 0)
536
+ parts.push(`更新 ${migrated} 个`);
537
+ if (cleanedModel > 0)
538
+ parts.push(`清理 ${cleanedModel} 个 model/variant 残留`);
539
+ return { success: true, message: `✓ CoHub 代理:${parts.join(",")}${parts.length === 0 ? "(全部已是最新,跳过)" : ""}` };
517
540
  }
518
541
  var COHUB_CONFIG_PATH = path.join(os.homedir(), ".config", "opencode", "oh-my-opencode-cohub.json");
519
542
  var HEAVY_KEYWORDS = ["pro", "preview", "opus", "max", "sonnet", "gpt-5.6"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode-cohub",
3
- "version": "1.12.1",
3
+ "version": "1.12.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Mr-cjf/oh-my-opencode-cohub.git"