oh-my-opencode-slim 2.0.0-beta.8 → 2.0.0-beta.9

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
@@ -48,10 +48,10 @@ bunx oh-my-opencode-slim@latest install
48
48
  ### V2 Background-Orchestration Beta
49
49
 
50
50
  V2 changes the orchestrator from the default execution worker into a scheduler:
51
- it plans work, dispatches specialists as background tasks, polls their status,
52
- then reconciles results before continuing. This requires OpenCode's native
53
- background subagent support, so beta users must start OpenCode with the
54
- experimental flag enabled.
51
+ it plans work, dispatches specialists as background tasks, receives completion
52
+ events from OpenCode or checks status only when needed, then reconciles results
53
+ before continuing. This requires OpenCode's native background subagent support,
54
+ so beta users must start OpenCode with the experimental flag enabled.
55
55
 
56
56
  ```bash
57
57
  bunx oh-my-opencode-slim@beta install
package/dist/cli/index.js CHANGED
@@ -1,22 +1,6 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
3
  import { createRequire } from "node:module";
4
- var __create = Object.create;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __defProp = Object.defineProperty;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __toESM = (mod, isNodeMode, target) => {
10
- target = mod != null ? __create(__getProtoOf(mod)) : {};
11
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
12
- for (let key of __getOwnPropNames(mod))
13
- if (!__hasOwnProp.call(to, key))
14
- __defProp(to, key, {
15
- get: () => mod[key],
16
- enumerable: true
17
- });
18
- return to;
19
- };
20
4
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
21
5
 
22
6
  // src/cli/doctor.ts
@@ -20,7 +20,7 @@ export declare const DEFAULT_TIMEOUT_MS: number;
20
20
  export declare const MAX_POLL_TIME_MS: number;
21
21
  export declare const FALLBACK_FAILOVER_TIMEOUT_MS = 15000;
22
22
  export declare const DEFAULT_MAX_SUBAGENT_DEPTH = 3;
23
- export declare const PHASE_REMINDER_TEXT = "!IMPORTANT! Scheduler workflow: plan lanes/dependencies \u2192 dispatch background specialists \u2192 track task IDs \u2192 poll task_status \u2192 reconcile terminal results \u2192 verify. Do not consume running-job output or advance dependent work. !END!";
23
+ export declare const PHASE_REMINDER_TEXT = "!IMPORTANT! Scheduler workflow: plan lanes/dependencies \u2192 dispatch background specialists \u2192 track task IDs \u2192 wait for hook-driven completion or use task_status only when needed \u2192 reconcile terminal results \u2192 verify. Do not consume running-job output or advance dependent work. !END!";
24
24
  export declare const TMUX_SPAWN_DELAY_MS = 500;
25
25
  export declare const COUNCILLOR_STAGGER_MS = 250;
26
26
  export declare const STABLE_POLLS_THRESHOLD = 3;
@@ -1,4 +1,4 @@
1
- export declare const PHASE_REMINDER = "<internal_reminder>!IMPORTANT! Scheduler workflow: plan lanes/dependencies \u2192 dispatch background specialists \u2192 track task IDs \u2192 poll task_status \u2192 reconcile terminal results \u2192 verify. Do not consume running-job output or advance dependent work. !END!</internal_reminder>";
1
+ export declare const PHASE_REMINDER = "<internal_reminder>!IMPORTANT! Scheduler workflow: plan lanes/dependencies \u2192 dispatch background specialists \u2192 track task IDs \u2192 wait for hook-driven completion or use task_status only when needed \u2192 reconcile terminal results \u2192 verify. Do not consume running-job output or advance dependent work. !END!</internal_reminder>";
2
2
  interface MessageInfo {
3
3
  role: string;
4
4
  agent?: string;
package/dist/index.js CHANGED
@@ -4,21 +4,35 @@ var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ function __accessProp(key) {
8
+ return this[key];
9
+ }
10
+ var __toESMCache_node;
11
+ var __toESMCache_esm;
7
12
  var __toESM = (mod, isNodeMode, target) => {
13
+ var canCache = mod != null && typeof mod === "object";
14
+ if (canCache) {
15
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
+ var cached = cache.get(mod);
17
+ if (cached)
18
+ return cached;
19
+ }
8
20
  target = mod != null ? __create(__getProtoOf(mod)) : {};
9
21
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
10
22
  for (let key of __getOwnPropNames(mod))
11
23
  if (!__hasOwnProp.call(to, key))
12
24
  __defProp(to, key, {
13
- get: () => mod[key],
25
+ get: __accessProp.bind(mod, key),
14
26
  enumerable: true
15
27
  });
28
+ if (canCache)
29
+ cache.set(mod, to);
16
30
  return to;
17
31
  };
18
32
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
19
33
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
20
34
 
21
- // node_modules/@mozilla/readability/Readability.js
35
+ // node_modules/.pnpm/@mozilla+readability@0.6.0/node_modules/@mozilla/readability/Readability.js
22
36
  var require_Readability = __commonJS((exports, module) => {
23
37
  function Readability(doc, options) {
24
38
  if (options && options.documentElement) {
@@ -1589,7 +1603,7 @@ var require_Readability = __commonJS((exports, module) => {
1589
1603
  }
1590
1604
  });
1591
1605
 
1592
- // node_modules/@mozilla/readability/Readability-readerable.js
1606
+ // node_modules/.pnpm/@mozilla+readability@0.6.0/node_modules/@mozilla/readability/Readability-readerable.js
1593
1607
  var require_Readability_readerable = __commonJS((exports, module) => {
1594
1608
  var REGEXPS = {
1595
1609
  unlikelyCandidates: /-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,
@@ -1645,7 +1659,7 @@ var require_Readability_readerable = __commonJS((exports, module) => {
1645
1659
  }
1646
1660
  });
1647
1661
 
1648
- // node_modules/@mozilla/readability/index.js
1662
+ // node_modules/.pnpm/@mozilla+readability@0.6.0/node_modules/@mozilla/readability/index.js
1649
1663
  var require_readability = __commonJS((exports, module) => {
1650
1664
  var Readability = require_Readability();
1651
1665
  var isProbablyReaderable = require_Readability_readerable();
@@ -1655,7 +1669,7 @@ var require_readability = __commonJS((exports, module) => {
1655
1669
  };
1656
1670
  });
1657
1671
 
1658
- // node_modules/@mixmark-io/domino/lib/Event.js
1672
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Event.js
1659
1673
  var require_Event = __commonJS((exports, module) => {
1660
1674
  module.exports = Event;
1661
1675
  Event.CAPTURING_PHASE = 1;
@@ -1712,7 +1726,7 @@ var require_Event = __commonJS((exports, module) => {
1712
1726
  });
1713
1727
  });
1714
1728
 
1715
- // node_modules/@mixmark-io/domino/lib/UIEvent.js
1729
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/UIEvent.js
1716
1730
  var require_UIEvent = __commonJS((exports, module) => {
1717
1731
  var Event = require_Event();
1718
1732
  module.exports = UIEvent;
@@ -1731,7 +1745,7 @@ var require_UIEvent = __commonJS((exports, module) => {
1731
1745
  });
1732
1746
  });
1733
1747
 
1734
- // node_modules/@mixmark-io/domino/lib/MouseEvent.js
1748
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/MouseEvent.js
1735
1749
  var require_MouseEvent = __commonJS((exports, module) => {
1736
1750
  var UIEvent = require_UIEvent();
1737
1751
  module.exports = MouseEvent;
@@ -1789,7 +1803,7 @@ var require_MouseEvent = __commonJS((exports, module) => {
1789
1803
  });
1790
1804
  });
1791
1805
 
1792
- // node_modules/@mixmark-io/domino/lib/DOMException.js
1806
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DOMException.js
1793
1807
  var require_DOMException = __commonJS((exports, module) => {
1794
1808
  module.exports = DOMException;
1795
1809
  var INDEX_SIZE_ERR = 1;
@@ -1913,12 +1927,12 @@ var require_DOMException = __commonJS((exports, module) => {
1913
1927
  var c;
1914
1928
  });
1915
1929
 
1916
- // node_modules/@mixmark-io/domino/lib/config.js
1930
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/config.js
1917
1931
  var require_config = __commonJS((exports) => {
1918
1932
  exports.isApiWritable = !globalThis.__domino_frozen__;
1919
1933
  });
1920
1934
 
1921
- // node_modules/@mixmark-io/domino/lib/utils.js
1935
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/utils.js
1922
1936
  var require_utils = __commonJS((exports) => {
1923
1937
  var DOMException = require_DOMException();
1924
1938
  var ERR = DOMException;
@@ -2031,7 +2045,7 @@ var require_utils = __commonJS((exports) => {
2031
2045
  };
2032
2046
  });
2033
2047
 
2034
- // node_modules/@mixmark-io/domino/lib/EventTarget.js
2048
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/EventTarget.js
2035
2049
  var require_EventTarget = __commonJS((exports, module) => {
2036
2050
  var Event = require_Event();
2037
2051
  var MouseEvent = require_MouseEvent();
@@ -2219,7 +2233,7 @@ var require_EventTarget = __commonJS((exports, module) => {
2219
2233
  };
2220
2234
  });
2221
2235
 
2222
- // node_modules/@mixmark-io/domino/lib/LinkedList.js
2236
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/LinkedList.js
2223
2237
  var require_LinkedList = __commonJS((exports, module) => {
2224
2238
  var utils = require_utils();
2225
2239
  var LinkedList = module.exports = {
@@ -2262,7 +2276,7 @@ var require_LinkedList = __commonJS((exports, module) => {
2262
2276
  };
2263
2277
  });
2264
2278
 
2265
- // node_modules/@mixmark-io/domino/lib/NodeUtils.js
2279
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeUtils.js
2266
2280
  var require_NodeUtils = __commonJS((exports, module) => {
2267
2281
  module.exports = {
2268
2282
  serializeOne,
@@ -2438,7 +2452,7 @@ var require_NodeUtils = __commonJS((exports, module) => {
2438
2452
  }
2439
2453
  });
2440
2454
 
2441
- // node_modules/@mixmark-io/domino/lib/Node.js
2455
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Node.js
2442
2456
  var require_Node = __commonJS((exports, module) => {
2443
2457
  module.exports = Node;
2444
2458
  var EventTarget = require_EventTarget();
@@ -2999,7 +3013,7 @@ var require_Node = __commonJS((exports, module) => {
2999
3013
  });
3000
3014
  });
3001
3015
 
3002
- // node_modules/@mixmark-io/domino/lib/NodeList.es6.js
3016
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeList.es6.js
3003
3017
  var require_NodeList_es6 = __commonJS((exports, module) => {
3004
3018
  module.exports = class NodeList extends Array {
3005
3019
  constructor(a) {
@@ -3016,7 +3030,7 @@ var require_NodeList_es6 = __commonJS((exports, module) => {
3016
3030
  };
3017
3031
  });
3018
3032
 
3019
- // node_modules/@mixmark-io/domino/lib/NodeList.es5.js
3033
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeList.es5.js
3020
3034
  var require_NodeList_es5 = __commonJS((exports, module) => {
3021
3035
  function item(i) {
3022
3036
  return this[i] || null;
@@ -3030,7 +3044,7 @@ var require_NodeList_es5 = __commonJS((exports, module) => {
3030
3044
  module.exports = NodeList;
3031
3045
  });
3032
3046
 
3033
- // node_modules/@mixmark-io/domino/lib/NodeList.js
3047
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeList.js
3034
3048
  var require_NodeList = __commonJS((exports, module) => {
3035
3049
  var NodeList;
3036
3050
  try {
@@ -3041,7 +3055,7 @@ var require_NodeList = __commonJS((exports, module) => {
3041
3055
  module.exports = NodeList;
3042
3056
  });
3043
3057
 
3044
- // node_modules/@mixmark-io/domino/lib/ContainerNode.js
3058
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/ContainerNode.js
3045
3059
  var require_ContainerNode = __commonJS((exports, module) => {
3046
3060
  module.exports = ContainerNode;
3047
3061
  var Node = require_Node();
@@ -3109,7 +3123,7 @@ var require_ContainerNode = __commonJS((exports, module) => {
3109
3123
  });
3110
3124
  });
3111
3125
 
3112
- // node_modules/@mixmark-io/domino/lib/xmlnames.js
3126
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/xmlnames.js
3113
3127
  var require_xmlnames = __commonJS((exports) => {
3114
3128
  exports.isValidName = isValidName;
3115
3129
  exports.isValidQName = isValidQName;
@@ -3158,7 +3172,7 @@ var require_xmlnames = __commonJS((exports) => {
3158
3172
  }
3159
3173
  });
3160
3174
 
3161
- // node_modules/@mixmark-io/domino/lib/attributes.js
3175
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/attributes.js
3162
3176
  var require_attributes = __commonJS((exports) => {
3163
3177
  var utils = require_utils();
3164
3178
  exports.property = function(attr) {
@@ -3294,7 +3308,7 @@ var require_attributes = __commonJS((exports) => {
3294
3308
  };
3295
3309
  });
3296
3310
 
3297
- // node_modules/@mixmark-io/domino/lib/FilteredElementList.js
3311
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/FilteredElementList.js
3298
3312
  var require_FilteredElementList = __commonJS((exports, module) => {
3299
3313
  module.exports = FilteredElementList;
3300
3314
  var Node = require_Node();
@@ -3360,7 +3374,7 @@ var require_FilteredElementList = __commonJS((exports, module) => {
3360
3374
  });
3361
3375
  });
3362
3376
 
3363
- // node_modules/@mixmark-io/domino/lib/DOMTokenList.js
3377
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DOMTokenList.js
3364
3378
  var require_DOMTokenList = __commonJS((exports, module) => {
3365
3379
  var utils = require_utils();
3366
3380
  module.exports = DOMTokenList;
@@ -3522,7 +3536,7 @@ var require_DOMTokenList = __commonJS((exports, module) => {
3522
3536
  }
3523
3537
  });
3524
3538
 
3525
- // node_modules/@mixmark-io/domino/lib/select.js
3539
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/select.js
3526
3540
  var require_select = __commonJS((exports, module) => {
3527
3541
  var window2 = Object.create(null, {
3528
3542
  location: { get: function() {
@@ -4265,7 +4279,7 @@ var require_select = __commonJS((exports, module) => {
4265
4279
  };
4266
4280
  });
4267
4281
 
4268
- // node_modules/@mixmark-io/domino/lib/ChildNode.js
4282
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/ChildNode.js
4269
4283
  var require_ChildNode = __commonJS((exports, module) => {
4270
4284
  var Node = require_Node();
4271
4285
  var LinkedList = require_LinkedList();
@@ -4355,7 +4369,7 @@ var require_ChildNode = __commonJS((exports, module) => {
4355
4369
  module.exports = ChildNode;
4356
4370
  });
4357
4371
 
4358
- // node_modules/@mixmark-io/domino/lib/NonDocumentTypeChildNode.js
4372
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NonDocumentTypeChildNode.js
4359
4373
  var require_NonDocumentTypeChildNode = __commonJS((exports, module) => {
4360
4374
  var Node = require_Node();
4361
4375
  var NonDocumentTypeChildNode = {
@@ -4381,7 +4395,7 @@ var require_NonDocumentTypeChildNode = __commonJS((exports, module) => {
4381
4395
  module.exports = NonDocumentTypeChildNode;
4382
4396
  });
4383
4397
 
4384
- // node_modules/@mixmark-io/domino/lib/NamedNodeMap.js
4398
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NamedNodeMap.js
4385
4399
  var require_NamedNodeMap = __commonJS((exports, module) => {
4386
4400
  module.exports = NamedNodeMap;
4387
4401
  var utils = require_utils();
@@ -4418,7 +4432,7 @@ var require_NamedNodeMap = __commonJS((exports, module) => {
4418
4432
  });
4419
4433
  });
4420
4434
 
4421
- // node_modules/@mixmark-io/domino/lib/Element.js
4435
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Element.js
4422
4436
  var require_Element = __commonJS((exports, module) => {
4423
4437
  module.exports = Element;
4424
4438
  var xml = require_xmlnames();
@@ -5319,7 +5333,7 @@ var require_Element = __commonJS((exports, module) => {
5319
5333
  }
5320
5334
  });
5321
5335
 
5322
- // node_modules/@mixmark-io/domino/lib/Leaf.js
5336
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Leaf.js
5323
5337
  var require_Leaf = __commonJS((exports, module) => {
5324
5338
  module.exports = Leaf;
5325
5339
  var Node = require_Node();
@@ -5360,7 +5374,7 @@ var require_Leaf = __commonJS((exports, module) => {
5360
5374
  });
5361
5375
  });
5362
5376
 
5363
- // node_modules/@mixmark-io/domino/lib/CharacterData.js
5377
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/CharacterData.js
5364
5378
  var require_CharacterData = __commonJS((exports, module) => {
5365
5379
  module.exports = CharacterData;
5366
5380
  var Leaf = require_Leaf();
@@ -5417,7 +5431,7 @@ var require_CharacterData = __commonJS((exports, module) => {
5417
5431
  Object.defineProperties(CharacterData.prototype, NonDocumentTypeChildNode);
5418
5432
  });
5419
5433
 
5420
- // node_modules/@mixmark-io/domino/lib/Text.js
5434
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Text.js
5421
5435
  var require_Text = __commonJS((exports, module) => {
5422
5436
  module.exports = Text;
5423
5437
  var utils = require_utils();
@@ -5487,7 +5501,7 @@ var require_Text = __commonJS((exports, module) => {
5487
5501
  });
5488
5502
  });
5489
5503
 
5490
- // node_modules/@mixmark-io/domino/lib/Comment.js
5504
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Comment.js
5491
5505
  var require_Comment = __commonJS((exports, module) => {
5492
5506
  module.exports = Comment;
5493
5507
  var Node = require_Node();
@@ -5530,7 +5544,7 @@ var require_Comment = __commonJS((exports, module) => {
5530
5544
  });
5531
5545
  });
5532
5546
 
5533
- // node_modules/@mixmark-io/domino/lib/DocumentFragment.js
5547
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DocumentFragment.js
5534
5548
  var require_DocumentFragment = __commonJS((exports, module) => {
5535
5549
  module.exports = DocumentFragment;
5536
5550
  var Node = require_Node();
@@ -5587,7 +5601,7 @@ var require_DocumentFragment = __commonJS((exports, module) => {
5587
5601
  });
5588
5602
  });
5589
5603
 
5590
- // node_modules/@mixmark-io/domino/lib/ProcessingInstruction.js
5604
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/ProcessingInstruction.js
5591
5605
  var require_ProcessingInstruction = __commonJS((exports, module) => {
5592
5606
  module.exports = ProcessingInstruction;
5593
5607
  var Node = require_Node();
@@ -5636,7 +5650,7 @@ var require_ProcessingInstruction = __commonJS((exports, module) => {
5636
5650
  });
5637
5651
  });
5638
5652
 
5639
- // node_modules/@mixmark-io/domino/lib/NodeFilter.js
5653
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeFilter.js
5640
5654
  var require_NodeFilter = __commonJS((exports, module) => {
5641
5655
  var NodeFilter = {
5642
5656
  FILTER_ACCEPT: 1,
@@ -5659,7 +5673,7 @@ var require_NodeFilter = __commonJS((exports, module) => {
5659
5673
  module.exports = NodeFilter.constructor = NodeFilter.prototype = NodeFilter;
5660
5674
  });
5661
5675
 
5662
- // node_modules/@mixmark-io/domino/lib/NodeTraversal.js
5676
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeTraversal.js
5663
5677
  var require_NodeTraversal = __commonJS((exports, module) => {
5664
5678
  var NodeTraversal = module.exports = {
5665
5679
  nextSkippingChildren,
@@ -5723,7 +5737,7 @@ var require_NodeTraversal = __commonJS((exports, module) => {
5723
5737
  }
5724
5738
  });
5725
5739
 
5726
- // node_modules/@mixmark-io/domino/lib/TreeWalker.js
5740
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/TreeWalker.js
5727
5741
  var require_TreeWalker = __commonJS((exports, module) => {
5728
5742
  module.exports = TreeWalker;
5729
5743
  var Node = require_Node();
@@ -5953,7 +5967,7 @@ var require_TreeWalker = __commonJS((exports, module) => {
5953
5967
  });
5954
5968
  });
5955
5969
 
5956
- // node_modules/@mixmark-io/domino/lib/NodeIterator.js
5970
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeIterator.js
5957
5971
  var require_NodeIterator = __commonJS((exports, module) => {
5958
5972
  module.exports = NodeIterator;
5959
5973
  var NodeFilter = require_NodeFilter();
@@ -6094,7 +6108,7 @@ var require_NodeIterator = __commonJS((exports, module) => {
6094
6108
  });
6095
6109
  });
6096
6110
 
6097
- // node_modules/@mixmark-io/domino/lib/URL.js
6111
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/URL.js
6098
6112
  var require_URL = __commonJS((exports, module) => {
6099
6113
  module.exports = URL4;
6100
6114
  function URL4(url) {
@@ -6267,7 +6281,7 @@ var require_URL = __commonJS((exports, module) => {
6267
6281
  };
6268
6282
  });
6269
6283
 
6270
- // node_modules/@mixmark-io/domino/lib/CustomEvent.js
6284
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/CustomEvent.js
6271
6285
  var require_CustomEvent = __commonJS((exports, module) => {
6272
6286
  module.exports = CustomEvent;
6273
6287
  var Event = require_Event();
@@ -6279,7 +6293,7 @@ var require_CustomEvent = __commonJS((exports, module) => {
6279
6293
  });
6280
6294
  });
6281
6295
 
6282
- // node_modules/@mixmark-io/domino/lib/events.js
6296
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/events.js
6283
6297
  var require_events = __commonJS((exports, module) => {
6284
6298
  module.exports = {
6285
6299
  Event: require_Event(),
@@ -6289,7 +6303,7 @@ var require_events = __commonJS((exports, module) => {
6289
6303
  };
6290
6304
  });
6291
6305
 
6292
- // node_modules/@mixmark-io/domino/lib/style_parser.js
6306
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/style_parser.js
6293
6307
  var require_style_parser = __commonJS((exports) => {
6294
6308
  Object.defineProperty(exports, "__esModule", { value: true });
6295
6309
  exports.hyphenate = exports.parse = undefined;
@@ -6356,7 +6370,7 @@ var require_style_parser = __commonJS((exports) => {
6356
6370
  exports.hyphenate = hyphenate;
6357
6371
  });
6358
6372
 
6359
- // node_modules/@mixmark-io/domino/lib/CSSStyleDeclaration.js
6373
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/CSSStyleDeclaration.js
6360
6374
  var require_CSSStyleDeclaration = __commonJS((exports, module) => {
6361
6375
  var { parse } = require_style_parser();
6362
6376
  module.exports = function(elt) {
@@ -6532,7 +6546,7 @@ var require_CSSStyleDeclaration = __commonJS((exports, module) => {
6532
6546
  });
6533
6547
  });
6534
6548
 
6535
- // node_modules/@mixmark-io/domino/lib/URLUtils.js
6549
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/URLUtils.js
6536
6550
  var require_URLUtils = __commonJS((exports, module) => {
6537
6551
  var URL4 = require_URL();
6538
6552
  module.exports = URLUtils;
@@ -6766,7 +6780,7 @@ var require_URLUtils = __commonJS((exports, module) => {
6766
6780
  };
6767
6781
  });
6768
6782
 
6769
- // node_modules/@mixmark-io/domino/lib/defineElement.js
6783
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/defineElement.js
6770
6784
  var require_defineElement = __commonJS((exports, module) => {
6771
6785
  var attributes = require_attributes();
6772
6786
  var isApiWritable = require_config().isApiWritable;
@@ -6828,7 +6842,7 @@ var require_defineElement = __commonJS((exports, module) => {
6828
6842
  }
6829
6843
  });
6830
6844
 
6831
- // node_modules/@mixmark-io/domino/lib/htmlelts.js
6845
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/htmlelts.js
6832
6846
  var require_htmlelts = __commonJS((exports) => {
6833
6847
  var Node = require_Node();
6834
6848
  var Element = require_Element();
@@ -6901,7 +6915,7 @@ var require_htmlelts = __commonJS((exports) => {
6901
6915
  var HTMLElement = exports.HTMLElement = define({
6902
6916
  superclass: Element,
6903
6917
  name: "HTMLElement",
6904
- ctor: function HTMLElement(doc, localName, prefix2) {
6918
+ ctor: function HTMLElement2(doc, localName, prefix2) {
6905
6919
  Element.call(this, doc, localName, utils.NAMESPACE.HTML, prefix2);
6906
6920
  },
6907
6921
  props: {
@@ -7038,7 +7052,7 @@ var require_htmlelts = __commonJS((exports) => {
7038
7052
  });
7039
7053
  var HTMLUnknownElement = define({
7040
7054
  name: "HTMLUnknownElement",
7041
- ctor: function HTMLUnknownElement(doc, localName, prefix2) {
7055
+ ctor: function HTMLUnknownElement2(doc, localName, prefix2) {
7042
7056
  HTMLElement.call(this, doc, localName, prefix2);
7043
7057
  }
7044
7058
  });
@@ -7253,7 +7267,7 @@ var require_htmlelts = __commonJS((exports) => {
7253
7267
  define({
7254
7268
  tag: "form",
7255
7269
  name: "HTMLFormElement",
7256
- ctor: function HTMLFormElement(doc, localName, prefix2) {
7270
+ ctor: function HTMLFormElement2(doc, localName, prefix2) {
7257
7271
  HTMLElement.call(this, doc, localName, prefix2);
7258
7272
  },
7259
7273
  attributes: {
@@ -8292,7 +8306,7 @@ var require_htmlelts = __commonJS((exports) => {
8292
8306
  });
8293
8307
  });
8294
8308
 
8295
- // node_modules/@mixmark-io/domino/lib/svg.js
8309
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/svg.js
8296
8310
  var require_svg = __commonJS((exports) => {
8297
8311
  var Element = require_Element();
8298
8312
  var defineElement = require_defineElement();
@@ -8310,7 +8324,7 @@ var require_svg = __commonJS((exports) => {
8310
8324
  var SVGElement = define({
8311
8325
  superclass: Element,
8312
8326
  name: "SVGElement",
8313
- ctor: function SVGElement(doc, localName, prefix2) {
8327
+ ctor: function SVGElement2(doc, localName, prefix2) {
8314
8328
  Element.call(this, doc, localName, utils.NAMESPACE.SVG, prefix2);
8315
8329
  },
8316
8330
  props: {
@@ -8418,7 +8432,7 @@ var require_svg = __commonJS((exports) => {
8418
8432
  });
8419
8433
  });
8420
8434
 
8421
- // node_modules/@mixmark-io/domino/lib/MutationConstants.js
8435
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/MutationConstants.js
8422
8436
  var require_MutationConstants = __commonJS((exports, module) => {
8423
8437
  module.exports = {
8424
8438
  VALUE: 1,
@@ -8430,7 +8444,7 @@ var require_MutationConstants = __commonJS((exports, module) => {
8430
8444
  };
8431
8445
  });
8432
8446
 
8433
- // node_modules/@mixmark-io/domino/lib/Document.js
8447
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Document.js
8434
8448
  var require_Document = __commonJS((exports, module) => {
8435
8449
  module.exports = Document;
8436
8450
  var Node = require_Node();
@@ -8729,7 +8743,7 @@ var require_Document = __commonJS((exports, module) => {
8729
8743
  contentType: { get: function contentType() {
8730
8744
  return this._contentType;
8731
8745
  } },
8732
- URL: { get: function URL() {
8746
+ URL: { get: function URL5() {
8733
8747
  return this._address;
8734
8748
  } },
8735
8749
  domain: { get: utils.nyi, set: utils.nyi },
@@ -9142,7 +9156,7 @@ var require_Document = __commonJS((exports, module) => {
9142
9156
  };
9143
9157
  });
9144
9158
 
9145
- // node_modules/@mixmark-io/domino/lib/DocumentType.js
9159
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DocumentType.js
9146
9160
  var require_DocumentType = __commonJS((exports, module) => {
9147
9161
  module.exports = DocumentType;
9148
9162
  var Node = require_Node();
@@ -9176,7 +9190,7 @@ var require_DocumentType = __commonJS((exports, module) => {
9176
9190
  Object.defineProperties(DocumentType.prototype, ChildNode);
9177
9191
  });
9178
9192
 
9179
- // node_modules/@mixmark-io/domino/lib/HTMLParser.js
9193
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/HTMLParser.js
9180
9194
  var require_HTMLParser = __commonJS((exports, module) => {
9181
9195
  module.exports = HTMLParser;
9182
9196
  var Document = require_Document();
@@ -12567,7 +12581,7 @@ var require_HTMLParser = __commonJS((exports, module) => {
12567
12581
  parser(EOF);
12568
12582
  doc.modclock = 1;
12569
12583
  }
12570
- var insertToken = htmlparser.insertToken = function insertToken(t, value, arg3, arg4) {
12584
+ var insertToken = htmlparser.insertToken = function insertToken2(t, value, arg3, arg4) {
12571
12585
  flushText();
12572
12586
  var current = stack.top;
12573
12587
  if (!current || current.namespaceURI === NAMESPACE.HTML) {
@@ -17227,7 +17241,7 @@ var require_HTMLParser = __commonJS((exports, module) => {
17227
17241
  }
17228
17242
  });
17229
17243
 
17230
- // node_modules/@mixmark-io/domino/lib/DOMImplementation.js
17244
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DOMImplementation.js
17231
17245
  var require_DOMImplementation = __commonJS((exports, module) => {
17232
17246
  module.exports = DOMImplementation;
17233
17247
  var Document = require_Document();
@@ -17301,7 +17315,7 @@ var require_DOMImplementation = __commonJS((exports, module) => {
17301
17315
  };
17302
17316
  });
17303
17317
 
17304
- // node_modules/@mixmark-io/domino/lib/Location.js
17318
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Location.js
17305
17319
  var require_Location = __commonJS((exports, module) => {
17306
17320
  var URL4 = require_URL();
17307
17321
  var URLUtils = require_URLUtils();
@@ -17337,7 +17351,7 @@ var require_Location = __commonJS((exports, module) => {
17337
17351
  });
17338
17352
  });
17339
17353
 
17340
- // node_modules/@mixmark-io/domino/lib/NavigatorID.js
17354
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NavigatorID.js
17341
17355
  var require_NavigatorID = __commonJS((exports, module) => {
17342
17356
  var NavigatorID = Object.create(null, {
17343
17357
  appCodeName: { value: "Mozilla" },
@@ -17356,7 +17370,7 @@ var require_NavigatorID = __commonJS((exports, module) => {
17356
17370
  module.exports = NavigatorID;
17357
17371
  });
17358
17372
 
17359
- // node_modules/@mixmark-io/domino/lib/WindowTimers.js
17373
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/WindowTimers.js
17360
17374
  var require_WindowTimers = __commonJS((exports, module) => {
17361
17375
  var WindowTimers = {
17362
17376
  setTimeout,
@@ -17367,7 +17381,7 @@ var require_WindowTimers = __commonJS((exports, module) => {
17367
17381
  module.exports = WindowTimers;
17368
17382
  });
17369
17383
 
17370
- // node_modules/@mixmark-io/domino/lib/impl.js
17384
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/impl.js
17371
17385
  var require_impl = __commonJS((exports, module) => {
17372
17386
  var utils = require_utils();
17373
17387
  exports = module.exports = {
@@ -17395,7 +17409,7 @@ var require_impl = __commonJS((exports, module) => {
17395
17409
  utils.merge(exports, require_svg().elements);
17396
17410
  });
17397
17411
 
17398
- // node_modules/@mixmark-io/domino/lib/Window.js
17412
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Window.js
17399
17413
  var require_Window = __commonJS((exports, module) => {
17400
17414
  var DOMImplementation = require_DOMImplementation();
17401
17415
  var EventTarget = require_EventTarget();
@@ -17450,7 +17464,7 @@ var require_Window = __commonJS((exports, module) => {
17450
17464
  utils.expose(require_impl(), Window);
17451
17465
  });
17452
17466
 
17453
- // node_modules/@mixmark-io/domino/lib/index.js
17467
+ // node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/index.js
17454
17468
  var require_lib = __commonJS((exports) => {
17455
17469
  var DOMImplementation = require_DOMImplementation();
17456
17470
  var HTMLParser = require_HTMLParser();
@@ -17500,7 +17514,7 @@ var require_lib = __commonJS((exports) => {
17500
17514
  exports.impl = impl;
17501
17515
  });
17502
17516
 
17503
- // node_modules/turndown/lib/turndown.cjs.js
17517
+ // node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.cjs.js
17504
17518
  var require_turndown_cjs = __commonJS((exports, module) => {
17505
17519
  function extend(destination) {
17506
17520
  for (var i = 1;i < arguments.length; i++) {
@@ -18294,7 +18308,7 @@ var POLL_INTERVAL_BACKGROUND_MS = 2000;
18294
18308
  var DEFAULT_TIMEOUT_MS = 2 * 60 * 1000;
18295
18309
  var MAX_POLL_TIME_MS = 5 * 60 * 1000;
18296
18310
  var DEFAULT_MAX_SUBAGENT_DEPTH = 3;
18297
- var PHASE_REMINDER_TEXT = `!IMPORTANT! Scheduler workflow: plan lanes/dependencies → dispatch background specialists → track task IDs → poll task_status → reconcile terminal results → verify. Do not consume running-job output or advance dependent work. !END!`;
18311
+ var PHASE_REMINDER_TEXT = `!IMPORTANT! Scheduler workflow: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion or use task_status only when needed → reconcile terminal results → verify. Do not consume running-job output or advance dependent work. !END!`;
18298
18312
  var TMUX_SPAWN_DELAY_MS = 500;
18299
18313
  var COUNCILLOR_STAGGER_MS = 250;
18300
18314
  var DEFAULT_DISABLED_AGENTS = ["observer"];
@@ -19075,7 +19089,7 @@ Review available agents and lane rules.
19075
19089
  - Brief user on delegation goal before each call
19076
19090
  - For trivial conversational answers or tiny mechanical edits, direct execution is allowed when scheduling overhead would clearly dominate
19077
19091
  - Record task IDs, state, and advisory ownership/dependency labels
19078
- - Poll/wait for terminal results with \`task_status(wait: true, timeout_ms: ...)\`
19092
+ - Do not immediately wait after spawning independent background tasks unless the next step truly depends on their result
19079
19093
  - Reconcile results, resolve conflicts, and gate dependent lanes
19080
19094
 
19081
19095
  **File operations rules:**
@@ -19101,11 +19115,25 @@ Balance: respect dependencies, avoid parallelizing what must be sequential, and
19101
19115
  - Delegated specialists should be launched as background tasks whenever work can run independently: use \`task(..., background: true)\`.
19102
19116
  - A dispatch returns a task/session ID immediately; it does not mean completion.
19103
19117
  - Track each task ID with specialist, objective, state, and any advisory ownership/dependency labels from the dispatch plan.
19104
- - Continue orchestration while tasks run: planning, scheduling independent lanes, preparing synthesis, and asking needed user questions.
19105
- - Poll or wait with \`task_status(wait: true, timeout_ms: ...)\` before consuming outputs or starting dependent work.
19118
+ - Background completion is event/hook-driven: when a background task finishes, OpenCode injects a follow-up message with the terminal result.
19119
+ - Continue orchestration while tasks run only when useful: planning, scheduling independent lanes, preparing synthesis, or asking needed user questions.
19120
+ - If no useful independent work remains, stop after a brief status response; do not call \`task_status\` just to wait. OpenCode will resume you when the background completion event arrives.
19121
+ - Use \`task_status(wait: true, timeout_ms: ...)\` only when you actively need a result before a dependent step or final response and no completion event has arrived yet.
19106
19122
  - Parallel background tasks are allowed only when their write scopes do not conflict.
19107
19123
  - Final response requires relevant tasks to be terminal and reconciled.
19108
19124
 
19125
+ ### Background Job Discipline
19126
+ - Every background task owns its declared lane until terminal.
19127
+ - Do not duplicate, undermine, or race a running lane.
19128
+ - After dispatch, classify the next step:
19129
+ 1. independent: continue,
19130
+ 2. dependent: wait/poll,
19131
+ 3. no useful independent work: stop and let hook-driven completion resume.
19132
+ - Before editing files or spawning another writer, compare against running job scopes.
19133
+ - Use \`cancel_task\` only when the user asks, or when a running lane is obsolete, wrong, or conflicts with a safer replacement plan.
19134
+ - Cancellation is not rollback: if cancelling a writer, inspect and reconcile partial file changes before launching a replacement lane.
19135
+ - Never finalize work that depends on unresolved background jobs.
19136
+
19109
19137
  ### Session Reuse
19110
19138
  - Smartly reuse an available specialist session - context reuse saves time and tokens
19111
19139
  - When too much unrelated, and really needed, start a fresh session with the specialist
@@ -19733,6 +19761,7 @@ ${customAppendPrompt}`;
19733
19761
 
19734
19762
  // src/agents/index.ts
19735
19763
  var COUNCIL_TOOL_ALLOWED_AGENTS = new Set(["council"]);
19764
+ var CANCEL_TASK_ALLOWED_AGENTS = new Set(["orchestrator"]);
19736
19765
  var SAFE_AGENT_ALIAS_RE = /^[a-z][a-z0-9_-]*$/i;
19737
19766
  function normalizeDisplayName(displayName) {
19738
19767
  const trimmed = displayName.trim();
@@ -19809,10 +19838,12 @@ function applyDefaultPermissions(agent, configuredSkills) {
19809
19838
  const skillPermissions = getSkillPermissionsForAgent(agent.name, configuredSkills);
19810
19839
  const questionPerm = existing.question === "deny" ? "deny" : "allow";
19811
19840
  const councilSessionPerm = COUNCIL_TOOL_ALLOWED_AGENTS.has(agent.name) ? existing.council_session ?? "allow" : "deny";
19841
+ const cancelTaskPerm = CANCEL_TASK_ALLOWED_AGENTS.has(agent.name) ? existing.cancel_task ?? "allow" : "deny";
19812
19842
  agent.config.permission = {
19813
19843
  ...existing,
19814
19844
  question: questionPerm,
19815
19845
  council_session: councilSessionPerm,
19846
+ cancel_task: cancelTaskPerm,
19816
19847
  skill: {
19817
19848
  ...typeof existing.skill === "object" ? existing.skill : {},
19818
19849
  ...skillPermissions
@@ -22737,7 +22768,7 @@ class BackgroundJobBoard {
22737
22768
  const existing = this.jobs.get(input.taskID);
22738
22769
  if (!existing)
22739
22770
  return;
22740
- if (existing.state === "reconciled") {
22771
+ if (existing.state === "reconciled" || existing.state === "cancelled" && input.state !== "cancelled" || TERMINAL_STATES.has(existing.state) && input.state === "running") {
22741
22772
  return existing;
22742
22773
  }
22743
22774
  const now = input.now ?? Date.now();
@@ -22781,9 +22812,34 @@ class BackgroundJobBoard {
22781
22812
  this.jobs.set(taskID, updated);
22782
22813
  return updated;
22783
22814
  }
22815
+ markCancelled(taskID, reason, now = Date.now()) {
22816
+ const existing = this.jobs.get(taskID);
22817
+ if (!existing)
22818
+ return;
22819
+ if (existing.state === "reconciled")
22820
+ return existing;
22821
+ if (TERMINAL_STATES.has(existing.state))
22822
+ return existing;
22823
+ const summary = normalizeCancelReason(reason);
22824
+ const updated = {
22825
+ ...existing,
22826
+ state: "cancelled",
22827
+ timedOut: false,
22828
+ terminalUnreconciled: true,
22829
+ updatedAt: now,
22830
+ completedAt: existing.completedAt ?? now,
22831
+ resultSummary: summary
22832
+ };
22833
+ this.jobs.set(taskID, updated);
22834
+ return updated;
22835
+ }
22784
22836
  get(taskID) {
22785
22837
  return this.jobs.get(taskID);
22786
22838
  }
22839
+ resolve(parentSessionID, taskIDOrAlias) {
22840
+ const value = taskIDOrAlias.trim();
22841
+ return this.list(parentSessionID).find((job) => job.taskID === value || job.alias === value);
22842
+ }
22787
22843
  list(parentSessionID) {
22788
22844
  const jobs = [...this.jobs.values()];
22789
22845
  const filtered = parentSessionID ? jobs.filter((job) => job.parentSessionID === parentSessionID) : jobs;
@@ -22844,6 +22900,10 @@ function singleLine(value) {
22844
22900
  return normalized;
22845
22901
  return `${normalized.slice(0, 157)}...`;
22846
22902
  }
22903
+ function normalizeCancelReason(reason) {
22904
+ const normalized = reason?.replace(/\s+/g, " ").trim();
22905
+ return normalized ? `cancelled: ${normalized}` : "cancelled";
22906
+ }
22847
22907
  // src/utils/internal-initiator.ts
22848
22908
  var SLIM_INTERNAL_INITIATOR_MARKER = "<!-- SLIM_INTERNAL_INITIATOR -->";
22849
22909
  function isRecord(value) {
@@ -30762,11 +30822,96 @@ var ast_grep_replace = tool2({
30762
30822
  }
30763
30823
  }
30764
30824
  });
30765
- // src/tools/council.ts
30825
+ // src/tools/cancel-task.ts
30766
30826
  import {
30767
30827
  tool as tool3
30768
30828
  } from "@opencode-ai/plugin";
30769
30829
  var z4 = tool3.schema;
30830
+ function createCancelTaskTool(options) {
30831
+ const cancel_task = tool3({
30832
+ description: `Cancel a tracked background specialist task.
30833
+
30834
+ Use only for obsolete, wrong, conflicting, or user-requested cancellation. Accepts either the native task_id/session ID or the parent-scoped alias shown in the Background Job Board. Cancellation is not rollback: if cancelling a writer, inspect and reconcile partial file changes before replacing the lane.`,
30835
+ args: {
30836
+ task_id: z4.string().describe("Tracked background task ID or Background Job Board alias"),
30837
+ reason: z4.string().optional().describe("Short cancellation reason")
30838
+ },
30839
+ async execute(args, toolContext) {
30840
+ const parentSessionID = toolContext?.sessionID;
30841
+ if (!parentSessionID)
30842
+ throw new Error("cancel_task requires sessionID");
30843
+ if (toolContext.agent && toolContext.agent !== "orchestrator") {
30844
+ throw new Error("cancel_task can only be used by orchestrator");
30845
+ }
30846
+ if (!options.shouldManageSession(parentSessionID)) {
30847
+ throw new Error("cancel_task can only be used in orchestrator sessions");
30848
+ }
30849
+ const requested = args.task_id.trim();
30850
+ if (!requested)
30851
+ throw new Error("cancel_task requires task_id");
30852
+ const job = options.backgroundJobBoard.resolve(parentSessionID, requested);
30853
+ if (!job) {
30854
+ return [
30855
+ `task_id: ${requested}`,
30856
+ "state: unknown",
30857
+ "",
30858
+ "<task_error>",
30859
+ "unknown or unowned background task",
30860
+ "</task_error>"
30861
+ ].join(`
30862
+ `);
30863
+ }
30864
+ if (job.state !== "running") {
30865
+ return [
30866
+ `task_id: ${job.taskID}`,
30867
+ `state: ${job.state}`,
30868
+ "",
30869
+ "<task_result>",
30870
+ `not cancelled: task is already ${job.state}`,
30871
+ "</task_result>"
30872
+ ].join(`
30873
+ `);
30874
+ }
30875
+ try {
30876
+ await abortSessionWithTimeout(options.client, job.taskID, options.abortTimeoutMs ?? 1e4);
30877
+ } catch (error) {
30878
+ const timedOut = error instanceof OperationTimeoutError;
30879
+ if (timedOut) {
30880
+ options.backgroundJobBoard.updateStatus({
30881
+ taskID: job.taskID,
30882
+ state: "error",
30883
+ resultSummary: error instanceof Error ? error.message : "cancel request timed out"
30884
+ });
30885
+ }
30886
+ return [
30887
+ `task_id: ${job.taskID}`,
30888
+ `state: ${timedOut ? "error" : "cancel_error"}`,
30889
+ "",
30890
+ "<task_error>",
30891
+ error instanceof Error ? error.message : String(error),
30892
+ "</task_error>"
30893
+ ].join(`
30894
+ `);
30895
+ }
30896
+ const cancelled = options.backgroundJobBoard.markCancelled(job.taskID, args.reason);
30897
+ return [
30898
+ `task_id: ${job.taskID}`,
30899
+ `state: ${cancelled?.state ?? "cancelled"}`,
30900
+ "",
30901
+ "<task_error>",
30902
+ cancelled?.resultSummary ?? "cancelled",
30903
+ "</task_error>"
30904
+ ].join(`
30905
+ `);
30906
+ }
30907
+ });
30908
+ return { cancel_task };
30909
+ }
30910
+ // src/tools/council.ts
30911
+ import {
30912
+ tool as tool4
30913
+ } from "@opencode-ai/plugin";
30914
+ var z5 = tool4.schema;
30770
30915
  function formatModelComposition(councillorResults) {
30771
30916
  return councillorResults.map((cr) => {
30772
30917
  const shortModel = shortModelLabel(cr.model);
@@ -30774,15 +30919,15 @@ function formatModelComposition(councillorResults) {
30774
30919
  }).join(", ");
30775
30920
  }
30776
30921
  function createCouncilTool(_ctx, councilManager) {
30777
- const council_session = tool3({
30922
+ const council_session = tool4({
30778
30923
  description: `Launch a multi-LLM council session for consensus-based analysis.
30779
30924
 
30780
30925
  Sends the prompt to multiple models (councillors) in parallel and returns their formatted responses for you to synthesize.
30781
30926
 
30782
30927
  Returns the councillor responses with a summary footer.`,
30783
30928
  args: {
30784
- prompt: z4.string().describe("The prompt to send to all councillors"),
30785
- preset: z4.string().optional().describe('Council preset to use (default: "default"). Must match a preset in the council config.')
30929
+ prompt: z5.string().describe("The prompt to send to all councillors"),
30930
+ preset: z5.string().optional().describe('Council preset to use (default: "default"). Must match a preset in the council config.')
30786
30931
  },
30787
30932
  async execute(args, toolContext) {
30788
30933
  if (!toolContext || typeof toolContext !== "object" || !("sessionID" in toolContext)) {
@@ -31093,7 +31238,7 @@ var WEBFETCH_DESCRIPTION = "Fetch a URL with better extraction for static/docs p
31093
31238
  import os6 from "node:os";
31094
31239
  import path18 from "node:path";
31095
31240
  import {
31096
- tool as tool4
31241
+ tool as tool5
31097
31242
  } from "@opencode-ai/plugin";
31098
31243
 
31099
31244
  // src/tools/smartfetch/binary.ts
@@ -31136,21 +31281,21 @@ async function saveBinary(binaryDir, data, contentType, filename) {
31136
31281
  throw new Error("Unable to allocate unique filename for binary content");
31137
31282
  }
31138
31283
 
31139
- // node_modules/lru-cache/dist/esm/node/index.min.js
31140
- import { tracingChannel as j, channel as I } from "node:diagnostics_channel";
31141
- var S = I("lru-cache:metrics");
31142
- var W = j("lru-cache");
31284
+ // node_modules/.pnpm/lru-cache@11.3.6/node_modules/lru-cache/dist/esm/node/index.min.js
31285
+ import { tracingChannel as I, channel as G } from "node:diagnostics_channel";
31286
+ var S = G("lru-cache:metrics");
31287
+ var W = I("lru-cache");
31288
+ var C = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
31143
31289
  var D = () => S.hasSubscribers || W.hasSubscribers;
31144
- var G = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
31145
- var M = new Set;
31146
- var C = typeof process == "object" && process ? process : {};
31290
+ var U = new Set;
31291
+ var L = typeof process == "object" && process ? process : {};
31147
31292
  var P = (u, e, t, i) => {
31148
- typeof C.emitWarning == "function" ? C.emitWarning(u, e, t, i) : console.error(`[${t}] ${e}: ${u}`);
31293
+ typeof L.emitWarning == "function" ? L.emitWarning(u, e, t, i) : console.error(`[${t}] ${e}: ${u}`);
31149
31294
  };
31150
- var H = (u) => !M.has(u);
31151
- var $ = Symbol("type");
31295
+ var H = (u) => !U.has(u);
31296
+ var X = Symbol("type");
31152
31297
  var F = (u) => !!u && u === Math.floor(u) && u > 0 && isFinite(u);
31153
- var U = (u) => F(u) ? u <= Math.pow(2, 8) ? Uint8Array : u <= Math.pow(2, 16) ? Uint16Array : u <= Math.pow(2, 32) ? Uint32Array : u <= Number.MAX_SAFE_INTEGER ? O : null : null;
31298
+ var j = (u) => F(u) ? u <= Math.pow(2, 8) ? Uint8Array : u <= Math.pow(2, 16) ? Uint16Array : u <= Math.pow(2, 32) ? Uint32Array : u <= Number.MAX_SAFE_INTEGER ? O : null : null;
31154
31299
  var O = class extends Array {
31155
31300
  constructor(e) {
31156
31301
  super(e), this.fill(0);
@@ -31161,7 +31306,7 @@ var R = class u {
31161
31306
  length;
31162
31307
  static #o = false;
31163
31308
  static create(e) {
31164
- let t = U(e);
31309
+ let t = j(e);
31165
31310
  if (!t)
31166
31311
  return [];
31167
31312
  u.#o = true;
@@ -31180,11 +31325,11 @@ var R = class u {
31180
31325
  return this.heap[--this.length];
31181
31326
  }
31182
31327
  };
31183
- var L = class u2 {
31328
+ var M = class u2 {
31184
31329
  #o;
31185
31330
  #u;
31186
31331
  #w;
31187
- #D;
31332
+ #x;
31188
31333
  #S;
31189
31334
  #M;
31190
31335
  #U;
@@ -31255,18 +31400,18 @@ var L = class u2 {
31255
31400
  return this.#w;
31256
31401
  }
31257
31402
  get onInsert() {
31258
- return this.#D;
31403
+ return this.#x;
31259
31404
  }
31260
31405
  get disposeAfter() {
31261
31406
  return this.#S;
31262
31407
  }
31263
31408
  constructor(e) {
31264
- let { max: t = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: o, updateAgeOnHas: r, allowStale: h, dispose: l, onInsert: c, disposeAfter: f, noDisposeOnSet: g, noUpdateTTL: p, maxSize: T = 0, maxEntrySize: w = 0, sizeCalculation: y, fetchMethod: a, memoMethod: m, noDeleteOnFetchRejection: _, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: d, allowStaleOnFetchAbort: A, ignoreFetchAbort: z5, perf: x } = e;
31409
+ let { max: t = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: o, updateAgeOnHas: r, allowStale: h, dispose: l, onInsert: c, disposeAfter: f, noDisposeOnSet: g, noUpdateTTL: p, maxSize: T = 0, maxEntrySize: w = 0, sizeCalculation: y, fetchMethod: a, memoMethod: m, noDeleteOnFetchRejection: _, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: d, allowStaleOnFetchAbort: A, ignoreFetchAbort: z6, perf: x } = e;
31265
31410
  if (x !== undefined && typeof x?.now != "function")
31266
31411
  throw new TypeError("perf option must have a now() method if specified");
31267
- if (this.#m = x ?? G, t !== 0 && !F(t))
31412
+ if (this.#m = x ?? C, t !== 0 && !F(t))
31268
31413
  throw new TypeError("max option must be a nonnegative integer");
31269
- let v = t ? U(t) : Array;
31414
+ let v = t ? j(t) : Array;
31270
31415
  if (!v)
31271
31416
  throw new Error("invalid max value: " + t);
31272
31417
  if (this.#o = t, this.#u = T, this.maxEntrySize = w || this.#u, this.sizeCalculation = y, this.sizeCalculation) {
@@ -31279,7 +31424,7 @@ var L = class u2 {
31279
31424
  throw new TypeError("memoMethod must be a function if defined");
31280
31425
  if (this.#U = m, a !== undefined && typeof a != "function")
31281
31426
  throw new TypeError("fetchMethod must be a function if specified");
31282
- if (this.#M = a, this.#W = !!a, this.#s = new Map, this.#i = Array.from({ length: t }).fill(undefined), this.#t = Array.from({ length: t }).fill(undefined), this.#a = new v(t), this.#c = new v(t), this.#l = 0, this.#h = 0, this.#y = R.create(t), this.#n = 0, this.#b = 0, typeof l == "function" && (this.#w = l), typeof c == "function" && (this.#D = c), typeof f == "function" ? (this.#S = f, this.#r = []) : (this.#S = undefined, this.#r = undefined), this.#T = !!this.#w, this.#j = !!this.#D, this.#f = !!this.#S, this.noDisposeOnSet = !!g, this.noUpdateTTL = !!p, this.noDeleteOnFetchRejection = !!_, this.allowStaleOnFetchRejection = !!d, this.allowStaleOnFetchAbort = !!A, this.ignoreFetchAbort = !!z5, this.maxEntrySize !== 0) {
31427
+ if (this.#M = a, this.#W = !!a, this.#s = new Map, this.#i = Array.from({ length: t }).fill(undefined), this.#t = Array.from({ length: t }).fill(undefined), this.#a = new v(t), this.#c = new v(t), this.#l = 0, this.#h = 0, this.#y = R.create(t), this.#n = 0, this.#b = 0, typeof l == "function" && (this.#w = l), typeof c == "function" && (this.#x = c), typeof f == "function" ? (this.#S = f, this.#r = []) : (this.#S = undefined, this.#r = undefined), this.#T = !!this.#w, this.#j = !!this.#x, this.#f = !!this.#S, this.noDisposeOnSet = !!g, this.noUpdateTTL = !!p, this.noDeleteOnFetchRejection = !!_, this.allowStaleOnFetchRejection = !!d, this.allowStaleOnFetchAbort = !!A, this.ignoreFetchAbort = !!z6, this.maxEntrySize !== 0) {
31283
31428
  if (this.#u !== 0 && !F(this.#u))
31284
31429
  throw new TypeError("maxSize must be a positive integer if specified");
31285
31430
  if (!F(this.maxEntrySize))
@@ -31295,7 +31440,7 @@ var L = class u2 {
31295
31440
  throw new TypeError("At least one of max, maxSize, or ttl is required");
31296
31441
  if (!this.ttlAutopurge && !this.#o && !this.#u) {
31297
31442
  let E = "LRU_CACHE_UNBOUNDED";
31298
- H(E) && (M.add(E), P("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", E, u2));
31443
+ H(E) && (U.add(E), P("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", E, u2));
31299
31444
  }
31300
31445
  }
31301
31446
  getRemainingTTL(e) {
@@ -31307,7 +31452,7 @@ var L = class u2 {
31307
31452
  let i = this.ttlAutopurge ? Array.from({ length: this.#o }) : undefined;
31308
31453
  this.#g = i, this.#N = (r, h, l = this.#m.now()) => {
31309
31454
  t[r] = h !== 0 ? l : 0, e[r] = h, s(r, h);
31310
- }, this.#x = (r) => {
31455
+ }, this.#D = (r) => {
31311
31456
  t[r] = e[r] !== 0 ? this.#m.now() : 0, s(r, e[r]);
31312
31457
  };
31313
31458
  let s = this.ttlAutopurge ? (r, h) => {
@@ -31351,7 +31496,7 @@ var L = class u2 {
31351
31496
  return !!l && !!h && (n || o()) - h > l;
31352
31497
  };
31353
31498
  }
31354
- #x = () => {};
31499
+ #D = () => {};
31355
31500
  #E = () => {};
31356
31501
  #N = () => {};
31357
31502
  #p = () => false;
@@ -31517,7 +31662,7 @@ var L = class u2 {
31517
31662
  return this.#v(e, "set"), h && (h.set = "miss", h.maxEntrySizeExceeded = true), this;
31518
31663
  let f = this.#n === 0 ? undefined : this.#s.get(e);
31519
31664
  if (f === undefined)
31520
- f = this.#n === 0 ? this.#h : this.#y.length !== 0 ? this.#y.pop() : this.#n === this.#o ? this.#G(false) : this.#n, this.#i[f] = e, this.#t[f] = t, this.#s.set(e, f), this.#a[this.#h] = f, this.#c[f] = this.#h, this.#h = f, this.#n++, this.#I(f, c, h), h && (h.set = "add"), l = false, this.#j && this.#D?.(t, e, "add");
31665
+ f = this.#n === 0 ? this.#h : this.#y.length !== 0 ? this.#y.pop() : this.#n === this.#o ? this.#G(false) : this.#n, this.#i[f] = e, this.#t[f] = t, this.#s.set(e, f), this.#a[this.#h] = f, this.#c[f] = this.#h, this.#h = f, this.#n++, this.#I(f, c, h), h && (h.set = "add"), l = false, this.#j && this.#x?.(t, e, "add");
31521
31666
  else {
31522
31667
  this.#L(f);
31523
31668
  let g = this.#t[f];
@@ -31581,7 +31726,7 @@ var L = class u2 {
31581
31726
  if (this.#p(n))
31582
31727
  s && (s.has = "stale", this.#E(s, n));
31583
31728
  else
31584
- return i && this.#x(n), s && (s.has = "hit", this.#E(s, n)), true;
31729
+ return i && this.#D(n), s && (s.has = "hit", this.#E(s, n)), true;
31585
31730
  } else
31586
31731
  s && (s.has = "miss");
31587
31732
  return false;
@@ -31639,7 +31784,7 @@ var L = class u2 {
31639
31784
  let i = W.hasSubscribers, { status: s = D() ? {} : undefined } = t;
31640
31785
  t.status = s, s && t.context && (s.context = t.context);
31641
31786
  let n = this.#B(e, t);
31642
- return s && D() && i && (s.trace = true, W.tracePromise(() => n, s).catch(() => {})), n;
31787
+ return s && i && (s.trace = true, W.tracePromise(() => n, s).catch(() => {})), n;
31643
31788
  }
31644
31789
  async#B(e, t = {}) {
31645
31790
  let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: r = this.noDisposeOnSet, size: h = 0, sizeCalculation: l = this.sizeCalculation, noUpdateTTL: c = this.noUpdateTTL, noDeleteOnFetchRejection: f = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: g = this.allowStaleOnFetchRejection, ignoreFetchAbort: p = this.ignoreFetchAbort, allowStaleOnFetchAbort: T = this.allowStaleOnFetchAbort, context: w, forceRefresh: y = false, status: a, signal: m } = t;
@@ -31658,16 +31803,16 @@ var L = class u2 {
31658
31803
  }
31659
31804
  let A = this.#p(b);
31660
31805
  if (!y && !A)
31661
- return a && (a.fetch = "hit"), this.#L(b), s && this.#x(b), a && this.#E(a, b), d;
31662
- let z5 = this.#P(e, b, _, w), v = z5.__staleWhileFetching !== undefined && i;
31663
- return a && (a.fetch = A ? "stale" : "refresh", v && A && (a.returnedStale = true)), v ? z5.__staleWhileFetching : z5.__returned = z5;
31806
+ return a && (a.fetch = "hit"), this.#L(b), s && this.#D(b), a && this.#E(a, b), d;
31807
+ let z6 = this.#P(e, b, _, w), v = z6.__staleWhileFetching !== undefined && i;
31808
+ return a && (a.fetch = A ? "stale" : "refresh", v && A && (a.returnedStale = true)), v ? z6.__staleWhileFetching : z6.__returned = z6;
31664
31809
  }
31665
31810
  }
31666
31811
  forceFetch(e, t = {}) {
31667
31812
  let i = W.hasSubscribers, { status: s = D() ? {} : undefined } = t;
31668
31813
  t.status = s, s && t.context && (s.context = t.context);
31669
31814
  let n = this.#K(e, t);
31670
- return s && D() && i && (s.trace = true, W.tracePromise(() => n, s).catch(() => {})), n;
31815
+ return s && i && (s.trace = true, W.tracePromise(() => n, s).catch(() => {})), n;
31671
31816
  }
31672
31817
  async#K(e, t = {}) {
31673
31818
  let i = await this.#B(e, t);
@@ -31706,7 +31851,7 @@ var L = class u2 {
31706
31851
  return;
31707
31852
  }
31708
31853
  let h = this.#t[r], l = this.#e(h);
31709
- return o && this.#E(o, r), this.#p(r) ? l ? (o && (o.get = "stale-fetching"), i && h.__staleWhileFetching !== undefined ? (o && (o.returnedStale = true), h.__staleWhileFetching) : undefined) : (n || this.#v(e, "expire"), o && (o.get = "stale"), i ? (o && (o.returnedStale = true), h) : undefined) : (o && (o.get = l ? "fetching" : "hit"), this.#L(r), s && this.#x(r), l ? h.__staleWhileFetching : h);
31854
+ return o && this.#E(o, r), this.#p(r) ? l ? (o && (o.get = "stale-fetching"), i && h.__staleWhileFetching !== undefined ? (o && (o.returnedStale = true), h.__staleWhileFetching) : undefined) : (n || this.#v(e, "expire"), o && (o.get = "stale"), i ? (o && (o.returnedStale = true), h) : undefined) : (o && (o.get = l ? "fetching" : "hit"), this.#L(r), s && this.#D(r), l ? h.__staleWhileFetching : h);
31710
31855
  }
31711
31856
  #$(e, t) {
31712
31857
  this.#c[t] = e, this.#a[e] = t;
@@ -32611,7 +32756,7 @@ async function probeLlmsText(url, timeoutMs, signal, fallbackOrigin) {
32611
32756
  }
32612
32757
 
32613
32758
  // src/tools/smartfetch/cache.ts
32614
- var CACHE = new L({
32759
+ var CACHE = new M({
32615
32760
  maxSize: 50 * 1024 * 1024,
32616
32761
  ttl: 15 * 60 * 1000,
32617
32762
  sizeCalculation: (value) => {
@@ -32875,20 +33020,20 @@ async function runSecondaryModelWithFallback(client, directory, models, prompt,
32875
33020
  }
32876
33021
 
32877
33022
  // src/tools/smartfetch/tool.ts
32878
- var z5 = tool4.schema;
33023
+ var z6 = tool5.schema;
32879
33024
  function createWebfetchTool(pluginCtx, options = {}) {
32880
33025
  const binaryDir = options.binaryDir || path18.join(os6.tmpdir(), "opencode-smartfetch");
32881
- return tool4({
33026
+ return tool5({
32882
33027
  description: WEBFETCH_DESCRIPTION,
32883
33028
  args: {
32884
- url: z5.httpUrl(),
32885
- format: z5.enum(["text", "markdown", "html"]).default("markdown"),
32886
- timeout: z5.number().positive().max(MAX_TIMEOUT_SECONDS).optional().describe("Timeout in seconds, max 120."),
32887
- prompt: z5.string().optional().describe("Optional extraction task to run on the fetched content using a cheap secondary model."),
32888
- extract_main: z5.boolean().default(true),
32889
- prefer_llms_txt: z5.enum(["auto", "always", "never"]).default("auto"),
32890
- include_metadata: z5.boolean().default(true),
32891
- save_binary: z5.boolean().default(false).describe("Save binary payload to disk when it fits within the active download limit.")
33029
+ url: z6.httpUrl(),
33030
+ format: z6.enum(["text", "markdown", "html"]).default("markdown"),
33031
+ timeout: z6.number().positive().max(MAX_TIMEOUT_SECONDS).optional().describe("Timeout in seconds, max 120."),
33032
+ prompt: z6.string().optional().describe("Optional extraction task to run on the fetched content using a cheap secondary model."),
33033
+ extract_main: z6.boolean().default(true),
33034
+ prefer_llms_txt: z6.enum(["auto", "always", "never"]).default("auto"),
33035
+ include_metadata: z6.boolean().default(true),
33036
+ save_binary: z6.boolean().default(false).describe("Save binary payload to disk when it fits within the active download limit.")
32892
33037
  },
32893
33038
  async execute(args, ctx) {
32894
33039
  const secondaryModels = await readSecondaryModelFromConfig(ctx.directory || pluginCtx.directory);
@@ -33478,6 +33623,7 @@ var OhMyOpenCodeLite = async (ctx) => {
33478
33623
  let presetManager;
33479
33624
  let divoomManager;
33480
33625
  let councilTools;
33626
+ let cancelTaskTools;
33481
33627
  let webfetch;
33482
33628
  let rewriteDisplayNameMentions;
33483
33629
  let toolCount = 0;
@@ -33579,7 +33725,12 @@ var OhMyOpenCodeLite = async (ctx) => {
33579
33725
  interviewManager = createInterviewManager(ctx, config);
33580
33726
  presetManager = createPresetManager(ctx, config);
33581
33727
  divoomManager = createDivoomManager(config.divoom);
33582
- toolCount = Object.keys(councilTools).length + Object.keys(todoContinuationHook.tool).length + 1 + 2;
33728
+ cancelTaskTools = createCancelTaskTool({
33729
+ client: ctx.client,
33730
+ backgroundJobBoard,
33731
+ shouldManageSession: (sessionID) => sessionAgentMap.get(sessionID) === "orchestrator"
33732
+ });
33733
+ toolCount = Object.keys(councilTools).length + Object.keys(cancelTaskTools).length + Object.keys(todoContinuationHook.tool).length + 1 + 2;
33583
33734
  } catch (err) {
33584
33735
  log("[plugin] FATAL: init failed", String(err));
33585
33736
  await appLog(ctx, "error", `INIT FAILED: ${String(err)}. Report at github.com/alvinunreal/oh-my-opencode-slim/issues/310`);
@@ -33621,6 +33772,7 @@ var OhMyOpenCodeLite = async (ctx) => {
33621
33772
  agent: agents,
33622
33773
  tool: {
33623
33774
  ...councilTools,
33775
+ ...cancelTaskTools,
33624
33776
  webfetch,
33625
33777
  ...todoContinuationHook.tool,
33626
33778
  ast_grep_search,
@@ -0,0 +1,10 @@
1
+ import { type PluginInput, type ToolDefinition } from '@opencode-ai/plugin';
2
+ import type { BackgroundJobBoard } from '../utils/background-job-board';
3
+ interface CancelTaskToolOptions {
4
+ client: PluginInput['client'];
5
+ backgroundJobBoard: BackgroundJobBoard;
6
+ shouldManageSession: (sessionID: string) => boolean;
7
+ abortTimeoutMs?: number;
8
+ }
9
+ export declare function createCancelTaskTool(options: CancelTaskToolOptions): Record<string, ToolDefinition>;
10
+ export {};
@@ -1,4 +1,5 @@
1
1
  export { ast_grep_replace, ast_grep_search } from './ast-grep';
2
+ export { createCancelTaskTool } from './cancel-task';
2
3
  export { createCouncilTool } from './council';
3
4
  export type { PresetManager } from './preset-manager';
4
5
  export { createPresetManager } from './preset-manager';
package/dist/tui.js CHANGED
@@ -4,15 +4,29 @@ var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ function __accessProp(key) {
8
+ return this[key];
9
+ }
10
+ var __toESMCache_node;
11
+ var __toESMCache_esm;
7
12
  var __toESM = (mod, isNodeMode, target) => {
13
+ var canCache = mod != null && typeof mod === "object";
14
+ if (canCache) {
15
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
+ var cached = cache.get(mod);
17
+ if (cached)
18
+ return cached;
19
+ }
8
20
  target = mod != null ? __create(__getProtoOf(mod)) : {};
9
21
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
10
22
  for (let key of __getOwnPropNames(mod))
11
23
  if (!__hasOwnProp.call(to, key))
12
24
  __defProp(to, key, {
13
- get: () => mod[key],
25
+ get: __accessProp.bind(mod, key),
14
26
  enumerable: true
15
27
  });
28
+ if (canCache)
29
+ cache.set(mod, to);
16
30
  return to;
17
31
  };
18
32
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
@@ -54,7 +68,7 @@ var POLL_INTERVAL_BACKGROUND_MS = 2000;
54
68
  var DEFAULT_TIMEOUT_MS = 2 * 60 * 1000;
55
69
  var MAX_POLL_TIME_MS = 5 * 60 * 1000;
56
70
  var DEFAULT_MAX_SUBAGENT_DEPTH = 3;
57
- var PHASE_REMINDER_TEXT = `!IMPORTANT! Scheduler workflow: plan lanes/dependencies → dispatch background specialists → track task IDs → poll task_status → reconcile terminal results → verify. Do not consume running-job output or advance dependent work. !END!`;
71
+ var PHASE_REMINDER_TEXT = `!IMPORTANT! Scheduler workflow: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion or use task_status only when needed → reconcile terminal results → verify. Do not consume running-job output or advance dependent work. !END!`;
58
72
  var TMUX_SPAWN_DELAY_MS = 500;
59
73
  var COUNCILLOR_STAGGER_MS = 250;
60
74
  var DEFAULT_DISABLED_AGENTS = ["observer"];
@@ -38,7 +38,9 @@ export declare class BackgroundJobBoard {
38
38
  updateStatus(input: BackgroundJobStatusInput): BackgroundJobRecord | undefined;
39
39
  updateFromStatusOutput(output: string): BackgroundJobRecord | undefined;
40
40
  markReconciled(taskID: string, now?: number): BackgroundJobRecord | undefined;
41
+ markCancelled(taskID: string, reason?: string, now?: number): BackgroundJobRecord | undefined;
41
42
  get(taskID: string): BackgroundJobRecord | undefined;
43
+ resolve(parentSessionID: string, taskIDOrAlias: string): BackgroundJobRecord | undefined;
42
44
  list(parentSessionID?: string): BackgroundJobRecord[];
43
45
  hasRunning(parentSessionID: string): boolean;
44
46
  hasTerminalUnreconciled(parentSessionID: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode-slim",
3
- "version": "2.0.0-beta.8",
3
+ "version": "2.0.0-beta.9",
4
4
  "description": "Lightweight agent orchestration plugin for OpenCode - a slimmed-down fork of oh-my-opencode",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",