oh-my-opencode-cohub 1.0.13 → 1.0.14

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":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAqClD,wBAAwB;AACxB,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAalD,CAAC;AAwEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,wrBAA+B,CAAC;AAEhE,QAAA,MAAM,WAAW,EAAE,MA2MlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAqClD,wBAAwB;AACxB,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAalD,CAAC;AAwEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,wrBAA+B,CAAC;AAEhE,QAAA,MAAM,WAAW,EAAE,MAqNlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -730,17 +730,22 @@ var CoHubPlugin = async (input, options) => {
730
730
  }
731
731
  }
732
732
  syncAgentConfig();
733
+ const agentConfigs = {};
734
+ for (const agent of agents) {
735
+ agentConfigs[agent.name] = {
736
+ ...agent.config,
737
+ name: agent.name,
738
+ description: agent.description
739
+ };
740
+ }
733
741
  return {
734
742
  name: "oh-my-opencode-cohub",
743
+ agent: agentConfigs,
735
744
  config: async (cfg) => {
736
745
  const c = cfg;
737
746
  c.agent ??= {};
738
- for (const agent of agents) {
739
- c.agent[agent.name] = {
740
- ...agent.config,
741
- name: agent.name,
742
- description: agent.description
743
- };
747
+ for (const [name, config] of Object.entries(agentConfigs)) {
748
+ c.agent[name] = config;
744
749
  }
745
750
  try {
746
751
  fs2.writeFileSync(path2.join(STATE_DIR, "config-hook-ran.json"), JSON.stringify({ ran: true, count: agents.length }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode-cohub",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "OpenCode 中文智能体编排插件 CoHub - 纯调度模式 / 全中文提示词 / 规范分析代理 / 方案制定代理 / 独立运行",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",