oh-my-opencode-cohub 1.5.2 → 1.5.3

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;AAqIlD,QAAA,MAAM,WAAW,EAAE,MAualB,CAAC;AAEF,eAAO,MAAM,MAAM,QAAc,CAAC;AAClC,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;AAqIlD,QAAA,MAAM,WAAW,EAAE,MA2alB,CAAC;AAEF,eAAO,MAAM,MAAM,QAAc,CAAC;AAClC,eAAe,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -584,21 +584,22 @@ class TaskTracker {
584
584
  lines.push("### Background Job Board");
585
585
  lines.push("SENTINEL: background-job-board-v2");
586
586
  lines.push("Do not poll running jobs. Wait for hook-driven completion, or use cancel_task only for explicit cancellation. Reconcile terminal jobs before final response.");
587
- lines.push("Completed or reconciled sessions are reusable by alias for the same specialist/context.");
588
- lines.push("Timed-out running sessions are recoverable by alias for safe resume after a live busy signal.");
587
+ lines.push("To reuse a completed session, use its Session ID from the table below as task_id (e.g. `ses_xxx`). Passing an alias instead is silently ignored — OpenCode creates a new session instead of reusing.");
589
588
  lines.push("Cancelled or errored sessions are not reusable.");
590
589
  lines.push("");
591
590
  if (activeJobs.length > 0) {
592
591
  lines.push("#### Active / Unreconciled");
593
592
  for (const j of activeJobs) {
594
- lines.push(` - ${j.alias} / ${j.sessionId || "pending"} / ${j.agent} / ${j.status}`);
593
+ lines.push(` - ${j.agent} / ${j.status} / ${j.sessionId || "pending"} / alias=${j.alias}`);
595
594
  }
596
595
  lines.push("");
597
596
  }
598
597
  if (reusableJobs.length > 0) {
599
598
  lines.push("#### Reusable Sessions");
599
+ lines.push(" Session ID | Agent | Alias");
600
+ lines.push(" ---------------------------------------|--------------|-------");
600
601
  for (const j of reusableJobs) {
601
- lines.push(` - ${j.alias} / ${j.sessionId || "n/a"} / ${j.agent} / completed, reusable`);
602
+ lines.push(` \`${j.sessionId}\` | ${j.agent} | _${j.alias}_`);
602
603
  }
603
604
  lines.push("");
604
605
  }
@@ -1738,10 +1739,13 @@ var CoHubPlugin = async (input, options) => {
1738
1739
  const args = output.args ?? {};
1739
1740
  const subagentType = typeof args.subagent_type === "string" ? args.subagent_type : undefined;
1740
1741
  const description = typeof args.description === "string" ? args.description : "";
1742
+ if (typeof args.task_id === "string" && args.task_id !== "" && !args.task_id.startsWith("ses_")) {
1743
+ delete output.args.task_id;
1744
+ }
1741
1745
  tracker.registerBeforeTask(input2.sessionID, {
1742
1746
  description,
1743
1747
  subagent_type: subagentType,
1744
- task_id: typeof args.task_id === "string" ? args.task_id : undefined,
1748
+ task_id: typeof output.args.task_id === "string" && output.args.task_id.startsWith("ses_") ? output.args.task_id : undefined,
1745
1749
  background: typeof args.background === "boolean" ? args.background : undefined
1746
1750
  });
1747
1751
  syncTrackerState(input2.sessionID ?? "");
@@ -1 +1 @@
1
- {"version":3,"file":"tracker.d.ts","sourceRoot":"","sources":["../../src/task-manager/tracker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE/D,qBAAa,WAAW;IACtB,OAAO,CAAC,IAAI,CAAgC;IAC5C,OAAO,CAAC,QAAQ,CAA6B;IAC7C,yCAAyC;IACzC,OAAO,CAAC,uBAAuB,CAAM;IACrC,kDAAkD;IAClD,OAAO,CAAC,oBAAoB,CAAM;IAElC,IAAI,sBAAsB,IAAI,MAAM,CAEnC;IAED,mDAAmD;IACnD,OAAO,CAAC,KAAK;IAOb;;OAEG;IACH,kBAAkB,CAAC,eA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AEnC;IAED,mDAAmD;IACnD,OAAO,CAAC,KAAK;IAOb;;OAEG;IACH,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM;IA8BnE;;;OAGG;IACH,eAAe,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAwBtF;;;OAGG;IACH,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI;IASnE;;OAEG;IACH,YAAY,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IA6CrD;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAOjC;;OAEG;IACH,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IASzC;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAKlC,2BAA2B;IAC3B,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,EAAE;IAUnD,uBAAuB;IACvB,eAAe,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM;IAUhD,kCAAkC;IAClC,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;IASlF,yDAAyD;IACzD,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAYpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode-cohub",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Mr-cjf/oh-my-opencode-cohub.git"