oh-my-opencode-slim 2.2.1 → 2.2.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.
- package/README.md +2 -1
- package/dist/hooks/phase-reminder/index.d.ts +6 -2
- package/dist/hooks/post-file-tool-nudge/index.d.ts +3 -5
- package/dist/hooks/session-lifecycle.d.ts +0 -1
- package/dist/hooks/types.d.ts +1 -0
- package/dist/index.js +117 -100
- package/dist/utils/background-job-board.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -661,7 +661,7 @@ Use this section as a map: start with installation, then jump to features, confi
|
|
|
661
661
|
<p><sub>Every merged contribution leaves a mark on the realm.</sub></p>
|
|
662
662
|
|
|
663
663
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
664
|
-
[](#contributors-)
|
|
665
665
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
666
666
|
</div>
|
|
667
667
|
|
|
@@ -773,6 +773,7 @@ Use this section as a map: start with installation, then jump to features, confi
|
|
|
773
773
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/umi008"><img src="https://avatars.githubusercontent.com/u/200843810?v=4?s=100" width="100px;" alt="Ulises Millán"/><br /><sub><b>Ulises Millán</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=umi008" title="Code">💻</a></td>
|
|
774
774
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/HighColdHC"><img src="https://avatars.githubusercontent.com/u/35870222?v=4?s=100" width="100px;" alt="HighColdHC"/><br /><sub><b>HighColdHC</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=HighColdHC" title="Code">💻</a></td>
|
|
775
775
|
<td align="center" valign="top" width="16.66%"><a href="https://hardcore.engineer/about"><img src="https://avatars.githubusercontent.com/u/401815?v=4?s=100" width="100px;" alt="Stephan Schielke"/><br /><sub><b>Stephan Schielke</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=stephanschielke" title="Code">💻</a></td>
|
|
776
|
+
<td align="center" valign="top" width="16.66%"><a href="https://github.com/DanMaly"><img src="https://avatars.githubusercontent.com/u/69809112?v=4?s=100" width="100px;" alt="Daniel Maly"/><br /><sub><b>Daniel Maly</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=DanMaly" title="Code">💻</a></td>
|
|
776
777
|
</tr>
|
|
777
778
|
</tbody>
|
|
778
779
|
</table>
|
|
@@ -6,15 +6,19 @@
|
|
|
6
6
|
* of the user's actual turn.
|
|
7
7
|
*/
|
|
8
8
|
import { PHASE_REMINDER } from '../../config/constants';
|
|
9
|
-
import type
|
|
9
|
+
import { type MessagePart } from '../types';
|
|
10
10
|
export { PHASE_REMINDER };
|
|
11
11
|
export declare const PHASE_REMINDER_METADATA_KEY = "oh-my-opencode-slim.phaseReminder";
|
|
12
|
+
export declare function hasPhaseReminder(part: MessagePart): boolean;
|
|
13
|
+
interface PhaseReminderOptions {
|
|
14
|
+
shouldInject?: (sessionID: string) => boolean;
|
|
15
|
+
}
|
|
12
16
|
/**
|
|
13
17
|
* Creates the experimental.chat.messages.transform hook for phase reminder injection.
|
|
14
18
|
* This hook runs right before sending to API, so it doesn't affect UI display.
|
|
15
19
|
* Only injects for the orchestrator agent.
|
|
16
20
|
*/
|
|
17
|
-
export declare function createPhaseReminderHook(
|
|
21
|
+
export declare function createPhaseReminderHook(options?: PhaseReminderOptions): {
|
|
18
22
|
'experimental.chat.messages.transform': (_input: Record<string, never>, output: {
|
|
19
23
|
messages?: unknown;
|
|
20
24
|
}) => Promise<void>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Catches the "inspect/edit files → implement myself" anti-pattern.
|
|
4
4
|
*
|
|
5
5
|
* The reminder is ephemeral: recorded on tool execution, injected via
|
|
6
|
-
*
|
|
6
|
+
* messages.transform, and consumed once. File tool output stays clean.
|
|
7
7
|
*/
|
|
8
8
|
import type { SessionLifecycle } from '../session-lifecycle';
|
|
9
9
|
interface PostFileToolNudgeOptions {
|
|
@@ -16,10 +16,8 @@ export declare function createPostFileToolNudgeHook(options?: PostFileToolNudgeO
|
|
|
16
16
|
sessionID?: string;
|
|
17
17
|
callID?: string;
|
|
18
18
|
}, _output: unknown) => Promise<void>;
|
|
19
|
-
'experimental.chat.
|
|
20
|
-
|
|
21
|
-
}, output: {
|
|
22
|
-
system: string[];
|
|
19
|
+
'experimental.chat.messages.transform': (_input: Record<string, never>, output: {
|
|
20
|
+
messages?: unknown;
|
|
23
21
|
}) => Promise<void>;
|
|
24
22
|
};
|
|
25
23
|
export {};
|
|
@@ -6,6 +6,5 @@ export declare class SessionLifecycle {
|
|
|
6
6
|
markPending(sessionId: string): void;
|
|
7
7
|
/** Atomic — only one caller gets true per markPending call. */
|
|
8
8
|
consumePending(sessionId: string): boolean;
|
|
9
|
-
hasPendingSession(sessionId: string): boolean;
|
|
10
9
|
clearSession(sessionId: string): void;
|
|
11
10
|
}
|
package/dist/hooks/types.d.ts
CHANGED
|
@@ -23,3 +23,4 @@ export type MessageWithParts = {
|
|
|
23
23
|
};
|
|
24
24
|
export declare function isMessageWithParts(message: unknown): message is MessageWithParts;
|
|
25
25
|
export declare function isUserMessageWithParts(message: unknown): message is MessageWithParts;
|
|
26
|
+
export declare function findLatestUserMessage(messages: unknown[]): MessageWithParts | undefined;
|
package/dist/index.js
CHANGED
|
@@ -184,7 +184,7 @@ var init_zip_extractor = __esm(() => {
|
|
|
184
184
|
init_compat();
|
|
185
185
|
});
|
|
186
186
|
|
|
187
|
-
// node_modules/@mozilla/readability/Readability.js
|
|
187
|
+
// node_modules/.pnpm/@mozilla+readability@0.6.0/node_modules/@mozilla/readability/Readability.js
|
|
188
188
|
var require_Readability = __commonJS((exports, module) => {
|
|
189
189
|
function Readability(doc, options) {
|
|
190
190
|
if (options && options.documentElement) {
|
|
@@ -1755,7 +1755,7 @@ var require_Readability = __commonJS((exports, module) => {
|
|
|
1755
1755
|
}
|
|
1756
1756
|
});
|
|
1757
1757
|
|
|
1758
|
-
// node_modules/@mozilla/readability/Readability-readerable.js
|
|
1758
|
+
// node_modules/.pnpm/@mozilla+readability@0.6.0/node_modules/@mozilla/readability/Readability-readerable.js
|
|
1759
1759
|
var require_Readability_readerable = __commonJS((exports, module) => {
|
|
1760
1760
|
var REGEXPS = {
|
|
1761
1761
|
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,
|
|
@@ -1811,7 +1811,7 @@ var require_Readability_readerable = __commonJS((exports, module) => {
|
|
|
1811
1811
|
}
|
|
1812
1812
|
});
|
|
1813
1813
|
|
|
1814
|
-
// node_modules/@mozilla/readability/index.js
|
|
1814
|
+
// node_modules/.pnpm/@mozilla+readability@0.6.0/node_modules/@mozilla/readability/index.js
|
|
1815
1815
|
var require_readability = __commonJS((exports, module) => {
|
|
1816
1816
|
var Readability = require_Readability();
|
|
1817
1817
|
var isProbablyReaderable = require_Readability_readerable();
|
|
@@ -1821,7 +1821,7 @@ var require_readability = __commonJS((exports, module) => {
|
|
|
1821
1821
|
};
|
|
1822
1822
|
});
|
|
1823
1823
|
|
|
1824
|
-
// node_modules/@mixmark-io/domino/lib/Event.js
|
|
1824
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Event.js
|
|
1825
1825
|
var require_Event = __commonJS((exports, module) => {
|
|
1826
1826
|
module.exports = Event;
|
|
1827
1827
|
Event.CAPTURING_PHASE = 1;
|
|
@@ -1878,7 +1878,7 @@ var require_Event = __commonJS((exports, module) => {
|
|
|
1878
1878
|
});
|
|
1879
1879
|
});
|
|
1880
1880
|
|
|
1881
|
-
// node_modules/@mixmark-io/domino/lib/UIEvent.js
|
|
1881
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/UIEvent.js
|
|
1882
1882
|
var require_UIEvent = __commonJS((exports, module) => {
|
|
1883
1883
|
var Event = require_Event();
|
|
1884
1884
|
module.exports = UIEvent;
|
|
@@ -1897,7 +1897,7 @@ var require_UIEvent = __commonJS((exports, module) => {
|
|
|
1897
1897
|
});
|
|
1898
1898
|
});
|
|
1899
1899
|
|
|
1900
|
-
// node_modules/@mixmark-io/domino/lib/MouseEvent.js
|
|
1900
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/MouseEvent.js
|
|
1901
1901
|
var require_MouseEvent = __commonJS((exports, module) => {
|
|
1902
1902
|
var UIEvent = require_UIEvent();
|
|
1903
1903
|
module.exports = MouseEvent;
|
|
@@ -1955,7 +1955,7 @@ var require_MouseEvent = __commonJS((exports, module) => {
|
|
|
1955
1955
|
});
|
|
1956
1956
|
});
|
|
1957
1957
|
|
|
1958
|
-
// node_modules/@mixmark-io/domino/lib/DOMException.js
|
|
1958
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DOMException.js
|
|
1959
1959
|
var require_DOMException = __commonJS((exports, module) => {
|
|
1960
1960
|
module.exports = DOMException;
|
|
1961
1961
|
var INDEX_SIZE_ERR = 1;
|
|
@@ -2079,12 +2079,12 @@ var require_DOMException = __commonJS((exports, module) => {
|
|
|
2079
2079
|
var c;
|
|
2080
2080
|
});
|
|
2081
2081
|
|
|
2082
|
-
// node_modules/@mixmark-io/domino/lib/config.js
|
|
2082
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/config.js
|
|
2083
2083
|
var require_config = __commonJS((exports) => {
|
|
2084
2084
|
exports.isApiWritable = !globalThis.__domino_frozen__;
|
|
2085
2085
|
});
|
|
2086
2086
|
|
|
2087
|
-
// node_modules/@mixmark-io/domino/lib/utils.js
|
|
2087
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/utils.js
|
|
2088
2088
|
var require_utils = __commonJS((exports) => {
|
|
2089
2089
|
var DOMException = require_DOMException();
|
|
2090
2090
|
var ERR = DOMException;
|
|
@@ -2197,7 +2197,7 @@ var require_utils = __commonJS((exports) => {
|
|
|
2197
2197
|
};
|
|
2198
2198
|
});
|
|
2199
2199
|
|
|
2200
|
-
// node_modules/@mixmark-io/domino/lib/EventTarget.js
|
|
2200
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/EventTarget.js
|
|
2201
2201
|
var require_EventTarget = __commonJS((exports, module) => {
|
|
2202
2202
|
var Event = require_Event();
|
|
2203
2203
|
var MouseEvent = require_MouseEvent();
|
|
@@ -2385,7 +2385,7 @@ var require_EventTarget = __commonJS((exports, module) => {
|
|
|
2385
2385
|
};
|
|
2386
2386
|
});
|
|
2387
2387
|
|
|
2388
|
-
// node_modules/@mixmark-io/domino/lib/LinkedList.js
|
|
2388
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/LinkedList.js
|
|
2389
2389
|
var require_LinkedList = __commonJS((exports, module) => {
|
|
2390
2390
|
var utils = require_utils();
|
|
2391
2391
|
var LinkedList = module.exports = {
|
|
@@ -2428,7 +2428,7 @@ var require_LinkedList = __commonJS((exports, module) => {
|
|
|
2428
2428
|
};
|
|
2429
2429
|
});
|
|
2430
2430
|
|
|
2431
|
-
// node_modules/@mixmark-io/domino/lib/NodeUtils.js
|
|
2431
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeUtils.js
|
|
2432
2432
|
var require_NodeUtils = __commonJS((exports, module) => {
|
|
2433
2433
|
module.exports = {
|
|
2434
2434
|
serializeOne,
|
|
@@ -2604,7 +2604,7 @@ var require_NodeUtils = __commonJS((exports, module) => {
|
|
|
2604
2604
|
}
|
|
2605
2605
|
});
|
|
2606
2606
|
|
|
2607
|
-
// node_modules/@mixmark-io/domino/lib/Node.js
|
|
2607
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Node.js
|
|
2608
2608
|
var require_Node = __commonJS((exports, module) => {
|
|
2609
2609
|
module.exports = Node;
|
|
2610
2610
|
var EventTarget = require_EventTarget();
|
|
@@ -3165,7 +3165,7 @@ var require_Node = __commonJS((exports, module) => {
|
|
|
3165
3165
|
});
|
|
3166
3166
|
});
|
|
3167
3167
|
|
|
3168
|
-
// node_modules/@mixmark-io/domino/lib/NodeList.es6.js
|
|
3168
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeList.es6.js
|
|
3169
3169
|
var require_NodeList_es6 = __commonJS((exports, module) => {
|
|
3170
3170
|
module.exports = class NodeList extends Array {
|
|
3171
3171
|
constructor(a) {
|
|
@@ -3182,7 +3182,7 @@ var require_NodeList_es6 = __commonJS((exports, module) => {
|
|
|
3182
3182
|
};
|
|
3183
3183
|
});
|
|
3184
3184
|
|
|
3185
|
-
// node_modules/@mixmark-io/domino/lib/NodeList.es5.js
|
|
3185
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeList.es5.js
|
|
3186
3186
|
var require_NodeList_es5 = __commonJS((exports, module) => {
|
|
3187
3187
|
function item(i) {
|
|
3188
3188
|
return this[i] || null;
|
|
@@ -3196,7 +3196,7 @@ var require_NodeList_es5 = __commonJS((exports, module) => {
|
|
|
3196
3196
|
module.exports = NodeList;
|
|
3197
3197
|
});
|
|
3198
3198
|
|
|
3199
|
-
// node_modules/@mixmark-io/domino/lib/NodeList.js
|
|
3199
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeList.js
|
|
3200
3200
|
var require_NodeList = __commonJS((exports, module) => {
|
|
3201
3201
|
var NodeList;
|
|
3202
3202
|
try {
|
|
@@ -3207,7 +3207,7 @@ var require_NodeList = __commonJS((exports, module) => {
|
|
|
3207
3207
|
module.exports = NodeList;
|
|
3208
3208
|
});
|
|
3209
3209
|
|
|
3210
|
-
// node_modules/@mixmark-io/domino/lib/ContainerNode.js
|
|
3210
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/ContainerNode.js
|
|
3211
3211
|
var require_ContainerNode = __commonJS((exports, module) => {
|
|
3212
3212
|
module.exports = ContainerNode;
|
|
3213
3213
|
var Node = require_Node();
|
|
@@ -3275,7 +3275,7 @@ var require_ContainerNode = __commonJS((exports, module) => {
|
|
|
3275
3275
|
});
|
|
3276
3276
|
});
|
|
3277
3277
|
|
|
3278
|
-
// node_modules/@mixmark-io/domino/lib/xmlnames.js
|
|
3278
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/xmlnames.js
|
|
3279
3279
|
var require_xmlnames = __commonJS((exports) => {
|
|
3280
3280
|
exports.isValidName = isValidName;
|
|
3281
3281
|
exports.isValidQName = isValidQName;
|
|
@@ -3324,7 +3324,7 @@ var require_xmlnames = __commonJS((exports) => {
|
|
|
3324
3324
|
}
|
|
3325
3325
|
});
|
|
3326
3326
|
|
|
3327
|
-
// node_modules/@mixmark-io/domino/lib/attributes.js
|
|
3327
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/attributes.js
|
|
3328
3328
|
var require_attributes = __commonJS((exports) => {
|
|
3329
3329
|
var utils = require_utils();
|
|
3330
3330
|
exports.property = function(attr) {
|
|
@@ -3460,7 +3460,7 @@ var require_attributes = __commonJS((exports) => {
|
|
|
3460
3460
|
};
|
|
3461
3461
|
});
|
|
3462
3462
|
|
|
3463
|
-
// node_modules/@mixmark-io/domino/lib/FilteredElementList.js
|
|
3463
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/FilteredElementList.js
|
|
3464
3464
|
var require_FilteredElementList = __commonJS((exports, module) => {
|
|
3465
3465
|
module.exports = FilteredElementList;
|
|
3466
3466
|
var Node = require_Node();
|
|
@@ -3526,7 +3526,7 @@ var require_FilteredElementList = __commonJS((exports, module) => {
|
|
|
3526
3526
|
});
|
|
3527
3527
|
});
|
|
3528
3528
|
|
|
3529
|
-
// node_modules/@mixmark-io/domino/lib/DOMTokenList.js
|
|
3529
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DOMTokenList.js
|
|
3530
3530
|
var require_DOMTokenList = __commonJS((exports, module) => {
|
|
3531
3531
|
var utils = require_utils();
|
|
3532
3532
|
module.exports = DOMTokenList;
|
|
@@ -3688,7 +3688,7 @@ var require_DOMTokenList = __commonJS((exports, module) => {
|
|
|
3688
3688
|
}
|
|
3689
3689
|
});
|
|
3690
3690
|
|
|
3691
|
-
// node_modules/@mixmark-io/domino/lib/select.js
|
|
3691
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/select.js
|
|
3692
3692
|
var require_select = __commonJS((exports, module) => {
|
|
3693
3693
|
var window2 = Object.create(null, {
|
|
3694
3694
|
location: { get: function() {
|
|
@@ -4431,7 +4431,7 @@ var require_select = __commonJS((exports, module) => {
|
|
|
4431
4431
|
};
|
|
4432
4432
|
});
|
|
4433
4433
|
|
|
4434
|
-
// node_modules/@mixmark-io/domino/lib/ChildNode.js
|
|
4434
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/ChildNode.js
|
|
4435
4435
|
var require_ChildNode = __commonJS((exports, module) => {
|
|
4436
4436
|
var Node = require_Node();
|
|
4437
4437
|
var LinkedList = require_LinkedList();
|
|
@@ -4521,7 +4521,7 @@ var require_ChildNode = __commonJS((exports, module) => {
|
|
|
4521
4521
|
module.exports = ChildNode;
|
|
4522
4522
|
});
|
|
4523
4523
|
|
|
4524
|
-
// node_modules/@mixmark-io/domino/lib/NonDocumentTypeChildNode.js
|
|
4524
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NonDocumentTypeChildNode.js
|
|
4525
4525
|
var require_NonDocumentTypeChildNode = __commonJS((exports, module) => {
|
|
4526
4526
|
var Node = require_Node();
|
|
4527
4527
|
var NonDocumentTypeChildNode = {
|
|
@@ -4547,7 +4547,7 @@ var require_NonDocumentTypeChildNode = __commonJS((exports, module) => {
|
|
|
4547
4547
|
module.exports = NonDocumentTypeChildNode;
|
|
4548
4548
|
});
|
|
4549
4549
|
|
|
4550
|
-
// node_modules/@mixmark-io/domino/lib/NamedNodeMap.js
|
|
4550
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NamedNodeMap.js
|
|
4551
4551
|
var require_NamedNodeMap = __commonJS((exports, module) => {
|
|
4552
4552
|
module.exports = NamedNodeMap;
|
|
4553
4553
|
var utils = require_utils();
|
|
@@ -4584,7 +4584,7 @@ var require_NamedNodeMap = __commonJS((exports, module) => {
|
|
|
4584
4584
|
});
|
|
4585
4585
|
});
|
|
4586
4586
|
|
|
4587
|
-
// node_modules/@mixmark-io/domino/lib/Element.js
|
|
4587
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Element.js
|
|
4588
4588
|
var require_Element = __commonJS((exports, module) => {
|
|
4589
4589
|
module.exports = Element;
|
|
4590
4590
|
var xml = require_xmlnames();
|
|
@@ -5485,7 +5485,7 @@ var require_Element = __commonJS((exports, module) => {
|
|
|
5485
5485
|
}
|
|
5486
5486
|
});
|
|
5487
5487
|
|
|
5488
|
-
// node_modules/@mixmark-io/domino/lib/Leaf.js
|
|
5488
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Leaf.js
|
|
5489
5489
|
var require_Leaf = __commonJS((exports, module) => {
|
|
5490
5490
|
module.exports = Leaf;
|
|
5491
5491
|
var Node = require_Node();
|
|
@@ -5526,7 +5526,7 @@ var require_Leaf = __commonJS((exports, module) => {
|
|
|
5526
5526
|
});
|
|
5527
5527
|
});
|
|
5528
5528
|
|
|
5529
|
-
// node_modules/@mixmark-io/domino/lib/CharacterData.js
|
|
5529
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/CharacterData.js
|
|
5530
5530
|
var require_CharacterData = __commonJS((exports, module) => {
|
|
5531
5531
|
module.exports = CharacterData;
|
|
5532
5532
|
var Leaf = require_Leaf();
|
|
@@ -5583,7 +5583,7 @@ var require_CharacterData = __commonJS((exports, module) => {
|
|
|
5583
5583
|
Object.defineProperties(CharacterData.prototype, NonDocumentTypeChildNode);
|
|
5584
5584
|
});
|
|
5585
5585
|
|
|
5586
|
-
// node_modules/@mixmark-io/domino/lib/Text.js
|
|
5586
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Text.js
|
|
5587
5587
|
var require_Text = __commonJS((exports, module) => {
|
|
5588
5588
|
module.exports = Text;
|
|
5589
5589
|
var utils = require_utils();
|
|
@@ -5653,7 +5653,7 @@ var require_Text = __commonJS((exports, module) => {
|
|
|
5653
5653
|
});
|
|
5654
5654
|
});
|
|
5655
5655
|
|
|
5656
|
-
// node_modules/@mixmark-io/domino/lib/Comment.js
|
|
5656
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Comment.js
|
|
5657
5657
|
var require_Comment = __commonJS((exports, module) => {
|
|
5658
5658
|
module.exports = Comment;
|
|
5659
5659
|
var Node = require_Node();
|
|
@@ -5696,7 +5696,7 @@ var require_Comment = __commonJS((exports, module) => {
|
|
|
5696
5696
|
});
|
|
5697
5697
|
});
|
|
5698
5698
|
|
|
5699
|
-
// node_modules/@mixmark-io/domino/lib/DocumentFragment.js
|
|
5699
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DocumentFragment.js
|
|
5700
5700
|
var require_DocumentFragment = __commonJS((exports, module) => {
|
|
5701
5701
|
module.exports = DocumentFragment;
|
|
5702
5702
|
var Node = require_Node();
|
|
@@ -5753,7 +5753,7 @@ var require_DocumentFragment = __commonJS((exports, module) => {
|
|
|
5753
5753
|
});
|
|
5754
5754
|
});
|
|
5755
5755
|
|
|
5756
|
-
// node_modules/@mixmark-io/domino/lib/ProcessingInstruction.js
|
|
5756
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/ProcessingInstruction.js
|
|
5757
5757
|
var require_ProcessingInstruction = __commonJS((exports, module) => {
|
|
5758
5758
|
module.exports = ProcessingInstruction;
|
|
5759
5759
|
var Node = require_Node();
|
|
@@ -5802,7 +5802,7 @@ var require_ProcessingInstruction = __commonJS((exports, module) => {
|
|
|
5802
5802
|
});
|
|
5803
5803
|
});
|
|
5804
5804
|
|
|
5805
|
-
// node_modules/@mixmark-io/domino/lib/NodeFilter.js
|
|
5805
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeFilter.js
|
|
5806
5806
|
var require_NodeFilter = __commonJS((exports, module) => {
|
|
5807
5807
|
var NodeFilter = {
|
|
5808
5808
|
FILTER_ACCEPT: 1,
|
|
@@ -5825,7 +5825,7 @@ var require_NodeFilter = __commonJS((exports, module) => {
|
|
|
5825
5825
|
module.exports = NodeFilter.constructor = NodeFilter.prototype = NodeFilter;
|
|
5826
5826
|
});
|
|
5827
5827
|
|
|
5828
|
-
// node_modules/@mixmark-io/domino/lib/NodeTraversal.js
|
|
5828
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeTraversal.js
|
|
5829
5829
|
var require_NodeTraversal = __commonJS((exports, module) => {
|
|
5830
5830
|
var NodeTraversal = module.exports = {
|
|
5831
5831
|
nextSkippingChildren,
|
|
@@ -5889,7 +5889,7 @@ var require_NodeTraversal = __commonJS((exports, module) => {
|
|
|
5889
5889
|
}
|
|
5890
5890
|
});
|
|
5891
5891
|
|
|
5892
|
-
// node_modules/@mixmark-io/domino/lib/TreeWalker.js
|
|
5892
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/TreeWalker.js
|
|
5893
5893
|
var require_TreeWalker = __commonJS((exports, module) => {
|
|
5894
5894
|
module.exports = TreeWalker;
|
|
5895
5895
|
var Node = require_Node();
|
|
@@ -6119,7 +6119,7 @@ var require_TreeWalker = __commonJS((exports, module) => {
|
|
|
6119
6119
|
});
|
|
6120
6120
|
});
|
|
6121
6121
|
|
|
6122
|
-
// node_modules/@mixmark-io/domino/lib/NodeIterator.js
|
|
6122
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NodeIterator.js
|
|
6123
6123
|
var require_NodeIterator = __commonJS((exports, module) => {
|
|
6124
6124
|
module.exports = NodeIterator;
|
|
6125
6125
|
var NodeFilter = require_NodeFilter();
|
|
@@ -6260,7 +6260,7 @@ var require_NodeIterator = __commonJS((exports, module) => {
|
|
|
6260
6260
|
});
|
|
6261
6261
|
});
|
|
6262
6262
|
|
|
6263
|
-
// node_modules/@mixmark-io/domino/lib/URL.js
|
|
6263
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/URL.js
|
|
6264
6264
|
var require_URL = __commonJS((exports, module) => {
|
|
6265
6265
|
module.exports = URL4;
|
|
6266
6266
|
function URL4(url) {
|
|
@@ -6433,7 +6433,7 @@ var require_URL = __commonJS((exports, module) => {
|
|
|
6433
6433
|
};
|
|
6434
6434
|
});
|
|
6435
6435
|
|
|
6436
|
-
// node_modules/@mixmark-io/domino/lib/CustomEvent.js
|
|
6436
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/CustomEvent.js
|
|
6437
6437
|
var require_CustomEvent = __commonJS((exports, module) => {
|
|
6438
6438
|
module.exports = CustomEvent;
|
|
6439
6439
|
var Event = require_Event();
|
|
@@ -6445,7 +6445,7 @@ var require_CustomEvent = __commonJS((exports, module) => {
|
|
|
6445
6445
|
});
|
|
6446
6446
|
});
|
|
6447
6447
|
|
|
6448
|
-
// node_modules/@mixmark-io/domino/lib/events.js
|
|
6448
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/events.js
|
|
6449
6449
|
var require_events = __commonJS((exports, module) => {
|
|
6450
6450
|
module.exports = {
|
|
6451
6451
|
Event: require_Event(),
|
|
@@ -6455,7 +6455,7 @@ var require_events = __commonJS((exports, module) => {
|
|
|
6455
6455
|
};
|
|
6456
6456
|
});
|
|
6457
6457
|
|
|
6458
|
-
// node_modules/@mixmark-io/domino/lib/style_parser.js
|
|
6458
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/style_parser.js
|
|
6459
6459
|
var require_style_parser = __commonJS((exports) => {
|
|
6460
6460
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6461
6461
|
exports.hyphenate = exports.parse = undefined;
|
|
@@ -6522,7 +6522,7 @@ var require_style_parser = __commonJS((exports) => {
|
|
|
6522
6522
|
exports.hyphenate = hyphenate;
|
|
6523
6523
|
});
|
|
6524
6524
|
|
|
6525
|
-
// node_modules/@mixmark-io/domino/lib/CSSStyleDeclaration.js
|
|
6525
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/CSSStyleDeclaration.js
|
|
6526
6526
|
var require_CSSStyleDeclaration = __commonJS((exports, module) => {
|
|
6527
6527
|
var { parse } = require_style_parser();
|
|
6528
6528
|
module.exports = function(elt) {
|
|
@@ -6698,7 +6698,7 @@ var require_CSSStyleDeclaration = __commonJS((exports, module) => {
|
|
|
6698
6698
|
});
|
|
6699
6699
|
});
|
|
6700
6700
|
|
|
6701
|
-
// node_modules/@mixmark-io/domino/lib/URLUtils.js
|
|
6701
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/URLUtils.js
|
|
6702
6702
|
var require_URLUtils = __commonJS((exports, module) => {
|
|
6703
6703
|
var URL4 = require_URL();
|
|
6704
6704
|
module.exports = URLUtils;
|
|
@@ -6932,7 +6932,7 @@ var require_URLUtils = __commonJS((exports, module) => {
|
|
|
6932
6932
|
};
|
|
6933
6933
|
});
|
|
6934
6934
|
|
|
6935
|
-
// node_modules/@mixmark-io/domino/lib/defineElement.js
|
|
6935
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/defineElement.js
|
|
6936
6936
|
var require_defineElement = __commonJS((exports, module) => {
|
|
6937
6937
|
var attributes = require_attributes();
|
|
6938
6938
|
var isApiWritable = require_config().isApiWritable;
|
|
@@ -6994,7 +6994,7 @@ var require_defineElement = __commonJS((exports, module) => {
|
|
|
6994
6994
|
}
|
|
6995
6995
|
});
|
|
6996
6996
|
|
|
6997
|
-
// node_modules/@mixmark-io/domino/lib/htmlelts.js
|
|
6997
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/htmlelts.js
|
|
6998
6998
|
var require_htmlelts = __commonJS((exports) => {
|
|
6999
6999
|
var Node = require_Node();
|
|
7000
7000
|
var Element = require_Element();
|
|
@@ -8458,7 +8458,7 @@ var require_htmlelts = __commonJS((exports) => {
|
|
|
8458
8458
|
});
|
|
8459
8459
|
});
|
|
8460
8460
|
|
|
8461
|
-
// node_modules/@mixmark-io/domino/lib/svg.js
|
|
8461
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/svg.js
|
|
8462
8462
|
var require_svg = __commonJS((exports) => {
|
|
8463
8463
|
var Element = require_Element();
|
|
8464
8464
|
var defineElement = require_defineElement();
|
|
@@ -8584,7 +8584,7 @@ var require_svg = __commonJS((exports) => {
|
|
|
8584
8584
|
});
|
|
8585
8585
|
});
|
|
8586
8586
|
|
|
8587
|
-
// node_modules/@mixmark-io/domino/lib/MutationConstants.js
|
|
8587
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/MutationConstants.js
|
|
8588
8588
|
var require_MutationConstants = __commonJS((exports, module) => {
|
|
8589
8589
|
module.exports = {
|
|
8590
8590
|
VALUE: 1,
|
|
@@ -8596,7 +8596,7 @@ var require_MutationConstants = __commonJS((exports, module) => {
|
|
|
8596
8596
|
};
|
|
8597
8597
|
});
|
|
8598
8598
|
|
|
8599
|
-
// node_modules/@mixmark-io/domino/lib/Document.js
|
|
8599
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Document.js
|
|
8600
8600
|
var require_Document = __commonJS((exports, module) => {
|
|
8601
8601
|
module.exports = Document;
|
|
8602
8602
|
var Node = require_Node();
|
|
@@ -9308,7 +9308,7 @@ var require_Document = __commonJS((exports, module) => {
|
|
|
9308
9308
|
};
|
|
9309
9309
|
});
|
|
9310
9310
|
|
|
9311
|
-
// node_modules/@mixmark-io/domino/lib/DocumentType.js
|
|
9311
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DocumentType.js
|
|
9312
9312
|
var require_DocumentType = __commonJS((exports, module) => {
|
|
9313
9313
|
module.exports = DocumentType;
|
|
9314
9314
|
var Node = require_Node();
|
|
@@ -9342,7 +9342,7 @@ var require_DocumentType = __commonJS((exports, module) => {
|
|
|
9342
9342
|
Object.defineProperties(DocumentType.prototype, ChildNode);
|
|
9343
9343
|
});
|
|
9344
9344
|
|
|
9345
|
-
// node_modules/@mixmark-io/domino/lib/HTMLParser.js
|
|
9345
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/HTMLParser.js
|
|
9346
9346
|
var require_HTMLParser = __commonJS((exports, module) => {
|
|
9347
9347
|
module.exports = HTMLParser;
|
|
9348
9348
|
var Document = require_Document();
|
|
@@ -17393,7 +17393,7 @@ var require_HTMLParser = __commonJS((exports, module) => {
|
|
|
17393
17393
|
}
|
|
17394
17394
|
});
|
|
17395
17395
|
|
|
17396
|
-
// node_modules/@mixmark-io/domino/lib/DOMImplementation.js
|
|
17396
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/DOMImplementation.js
|
|
17397
17397
|
var require_DOMImplementation = __commonJS((exports, module) => {
|
|
17398
17398
|
module.exports = DOMImplementation;
|
|
17399
17399
|
var Document = require_Document();
|
|
@@ -17467,7 +17467,7 @@ var require_DOMImplementation = __commonJS((exports, module) => {
|
|
|
17467
17467
|
};
|
|
17468
17468
|
});
|
|
17469
17469
|
|
|
17470
|
-
// node_modules/@mixmark-io/domino/lib/Location.js
|
|
17470
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Location.js
|
|
17471
17471
|
var require_Location = __commonJS((exports, module) => {
|
|
17472
17472
|
var URL4 = require_URL();
|
|
17473
17473
|
var URLUtils = require_URLUtils();
|
|
@@ -17503,7 +17503,7 @@ var require_Location = __commonJS((exports, module) => {
|
|
|
17503
17503
|
});
|
|
17504
17504
|
});
|
|
17505
17505
|
|
|
17506
|
-
// node_modules/@mixmark-io/domino/lib/NavigatorID.js
|
|
17506
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/NavigatorID.js
|
|
17507
17507
|
var require_NavigatorID = __commonJS((exports, module) => {
|
|
17508
17508
|
var NavigatorID = Object.create(null, {
|
|
17509
17509
|
appCodeName: { value: "Mozilla" },
|
|
@@ -17522,7 +17522,7 @@ var require_NavigatorID = __commonJS((exports, module) => {
|
|
|
17522
17522
|
module.exports = NavigatorID;
|
|
17523
17523
|
});
|
|
17524
17524
|
|
|
17525
|
-
// node_modules/@mixmark-io/domino/lib/WindowTimers.js
|
|
17525
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/WindowTimers.js
|
|
17526
17526
|
var require_WindowTimers = __commonJS((exports, module) => {
|
|
17527
17527
|
var WindowTimers = {
|
|
17528
17528
|
setTimeout,
|
|
@@ -17533,7 +17533,7 @@ var require_WindowTimers = __commonJS((exports, module) => {
|
|
|
17533
17533
|
module.exports = WindowTimers;
|
|
17534
17534
|
});
|
|
17535
17535
|
|
|
17536
|
-
// node_modules/@mixmark-io/domino/lib/impl.js
|
|
17536
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/impl.js
|
|
17537
17537
|
var require_impl = __commonJS((exports, module) => {
|
|
17538
17538
|
var utils = require_utils();
|
|
17539
17539
|
exports = module.exports = {
|
|
@@ -17561,7 +17561,7 @@ var require_impl = __commonJS((exports, module) => {
|
|
|
17561
17561
|
utils.merge(exports, require_svg().elements);
|
|
17562
17562
|
});
|
|
17563
17563
|
|
|
17564
|
-
// node_modules/@mixmark-io/domino/lib/Window.js
|
|
17564
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Window.js
|
|
17565
17565
|
var require_Window = __commonJS((exports, module) => {
|
|
17566
17566
|
var DOMImplementation = require_DOMImplementation();
|
|
17567
17567
|
var EventTarget = require_EventTarget();
|
|
@@ -17616,7 +17616,7 @@ var require_Window = __commonJS((exports, module) => {
|
|
|
17616
17616
|
utils.expose(require_impl(), Window);
|
|
17617
17617
|
});
|
|
17618
17618
|
|
|
17619
|
-
// node_modules/@mixmark-io/domino/lib/index.js
|
|
17619
|
+
// node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/index.js
|
|
17620
17620
|
var require_lib = __commonJS((exports) => {
|
|
17621
17621
|
var DOMImplementation = require_DOMImplementation();
|
|
17622
17622
|
var HTMLParser = require_HTMLParser();
|
|
@@ -17666,7 +17666,7 @@ var require_lib = __commonJS((exports) => {
|
|
|
17666
17666
|
exports.impl = impl;
|
|
17667
17667
|
});
|
|
17668
17668
|
|
|
17669
|
-
// node_modules/turndown/lib/turndown.cjs.js
|
|
17669
|
+
// node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.cjs.js
|
|
17670
17670
|
var require_turndown_cjs = __commonJS((exports, module) => {
|
|
17671
17671
|
function extend(destination) {
|
|
17672
17672
|
for (var i = 1;i < arguments.length; i++) {
|
|
@@ -25089,7 +25089,7 @@ class BackgroundJobBoard {
|
|
|
25089
25089
|
const timeouts = job.timeoutCount ?? 0;
|
|
25090
25090
|
return errors >= threshold || timeouts >= threshold;
|
|
25091
25091
|
}
|
|
25092
|
-
formatForPrompt(parentSessionID,
|
|
25092
|
+
formatForPrompt(parentSessionID, _now) {
|
|
25093
25093
|
const active = this.list(parentSessionID).filter((job) => job.state === "running" || job.terminalUnreconciled);
|
|
25094
25094
|
const reusable = this.list(parentSessionID).filter(isReusable);
|
|
25095
25095
|
if (active.length === 0 && reusable.length === 0)
|
|
@@ -25103,7 +25103,7 @@ class BackgroundJobBoard {
|
|
|
25103
25103
|
"Cancelled or errored sessions are not reusable.",
|
|
25104
25104
|
"",
|
|
25105
25105
|
"#### Active / Unreconciled",
|
|
25106
|
-
...active.length > 0 ? active.map(
|
|
25106
|
+
...active.length > 0 ? active.map(formatJob) : ["- none"],
|
|
25107
25107
|
"",
|
|
25108
25108
|
"#### Reusable Sessions",
|
|
25109
25109
|
...reusable.length > 0 ? reusable.map((job) => this.formatReusableJob(job)) : ["- none"]
|
|
@@ -25180,11 +25180,10 @@ function formatContextFiles(files, maxFiles) {
|
|
|
25180
25180
|
function normalizeWhitespace(value) {
|
|
25181
25181
|
return value.replace(/\s+/g, " ").trim();
|
|
25182
25182
|
}
|
|
25183
|
-
function formatJob(job
|
|
25184
|
-
const ageMs = now - job.lastLaunchedAt;
|
|
25183
|
+
function formatJob(job) {
|
|
25185
25184
|
const isResume = job.lastLaunchedAt !== job.launchedAt;
|
|
25186
|
-
const
|
|
25187
|
-
const status = job.terminalUnreconciled ? `${job.state}, unreconciled` : job.statusUncertain ? `${job.state}, status uncertain` : job.timedOut ? `${job.state}, timed out` :
|
|
25185
|
+
const displayState = job.state === "running" && isResume ? "running [resumed]" : job.state;
|
|
25186
|
+
const status = job.terminalUnreconciled ? `${job.state}, unreconciled` : job.statusUncertain ? `${job.state}, status uncertain` : job.timedOut ? `${job.state}, timed out` : displayState;
|
|
25188
25187
|
const lines = [
|
|
25189
25188
|
`- ${promptSafe(job.alias)} / ${promptSafe(job.taskID)} / ${promptSafe(job.agent)} / ${promptSafe(status)}`,
|
|
25190
25189
|
` Objective: ${promptSafe(job.objective || job.description)}`
|
|
@@ -25584,6 +25583,15 @@ function isMessageWithParts(message) {
|
|
|
25584
25583
|
function isUserMessageWithParts(message) {
|
|
25585
25584
|
return isMessageWithParts(message) && message.info.role === "user";
|
|
25586
25585
|
}
|
|
25586
|
+
function findLatestUserMessage(messages) {
|
|
25587
|
+
for (let index = messages.length - 1;index >= 0; index--) {
|
|
25588
|
+
const message = messages[index];
|
|
25589
|
+
if (isUserMessageWithParts(message)) {
|
|
25590
|
+
return message;
|
|
25591
|
+
}
|
|
25592
|
+
}
|
|
25593
|
+
return;
|
|
25594
|
+
}
|
|
25587
25595
|
|
|
25588
25596
|
// src/hooks/filter-available-skills/index.ts
|
|
25589
25597
|
var AVAILABLE_SKILLS_BLOCK_REGEX = /<available_skills>\s*([\s\S]*?)\s*<\/available_skills>/g;
|
|
@@ -26398,33 +26406,19 @@ function createLoopCommandHook() {
|
|
|
26398
26406
|
}
|
|
26399
26407
|
// src/hooks/phase-reminder/index.ts
|
|
26400
26408
|
var PHASE_REMINDER_METADATA_KEY = "oh-my-opencode-slim.phaseReminder";
|
|
26401
|
-
function
|
|
26409
|
+
function hasPhaseReminder(part) {
|
|
26410
|
+
return part.synthetic === true && isRecord2(part.metadata) && part.metadata[PHASE_REMINDER_METADATA_KEY] === true;
|
|
26411
|
+
}
|
|
26412
|
+
function createPhaseReminderHook(options = {}) {
|
|
26402
26413
|
return {
|
|
26403
26414
|
"experimental.chat.messages.transform": async (_input, output) => {
|
|
26404
26415
|
const messages = Array.isArray(output.messages) ? output.messages : [];
|
|
26405
|
-
|
|
26416
|
+
const lastUserMessage = findLatestUserMessage(messages);
|
|
26417
|
+
if (!lastUserMessage) {
|
|
26406
26418
|
return;
|
|
26407
26419
|
}
|
|
26408
|
-
|
|
26409
|
-
|
|
26410
|
-
if (isUserMessageWithParts(messages[i])) {
|
|
26411
|
-
lastUserMessageIndex = i;
|
|
26412
|
-
break;
|
|
26413
|
-
}
|
|
26414
|
-
}
|
|
26415
|
-
if (lastUserMessageIndex === -1) {
|
|
26416
|
-
return;
|
|
26417
|
-
}
|
|
26418
|
-
const lastUserMessage = messages[lastUserMessageIndex];
|
|
26419
|
-
if (!isUserMessageWithParts(lastUserMessage)) {
|
|
26420
|
-
return;
|
|
26421
|
-
}
|
|
26422
|
-
const agent = lastUserMessage.info.agent;
|
|
26423
|
-
if (agent && agent !== "orchestrator") {
|
|
26424
|
-
return;
|
|
26425
|
-
}
|
|
26426
|
-
const sessionId = lastUserMessage?.info?.sessionID;
|
|
26427
|
-
if (sessionId && coordinator?.hasPendingSession(sessionId)) {
|
|
26420
|
+
const { agent, sessionID } = lastUserMessage.info;
|
|
26421
|
+
if (agent !== "orchestrator" || !sessionID || options.shouldInject && !options.shouldInject(sessionID)) {
|
|
26428
26422
|
return;
|
|
26429
26423
|
}
|
|
26430
26424
|
const textPartIndex = lastUserMessage.parts.findIndex((p) => p.type === "text" && p.text !== undefined);
|
|
@@ -26435,7 +26429,7 @@ function createPhaseReminderHook(coordinator) {
|
|
|
26435
26429
|
if (isInternalInitiatorPart(originalPart)) {
|
|
26436
26430
|
return;
|
|
26437
26431
|
}
|
|
26438
|
-
if (lastUserMessage.parts.some(
|
|
26432
|
+
if (lastUserMessage.parts.some(hasPhaseReminder)) {
|
|
26439
26433
|
return;
|
|
26440
26434
|
}
|
|
26441
26435
|
lastUserMessage.parts.push({
|
|
@@ -26460,17 +26454,43 @@ function createPostFileToolNudgeHook(options = {}) {
|
|
|
26460
26454
|
return;
|
|
26461
26455
|
coordinator?.markPending(input.sessionID);
|
|
26462
26456
|
},
|
|
26463
|
-
"experimental.chat.
|
|
26464
|
-
if (!
|
|
26457
|
+
"experimental.chat.messages.transform": async (_input, output) => {
|
|
26458
|
+
if (!coordinator) {
|
|
26465
26459
|
return;
|
|
26466
26460
|
}
|
|
26467
|
-
|
|
26461
|
+
const messages = Array.isArray(output.messages) ? output.messages : [];
|
|
26462
|
+
const eligible = getEligibleMessage(findLatestUserMessage(messages));
|
|
26463
|
+
if (!eligible) {
|
|
26468
26464
|
return;
|
|
26469
26465
|
}
|
|
26470
|
-
|
|
26466
|
+
const { message, sessionID } = eligible;
|
|
26467
|
+
const hasReminder = message.parts.some(hasPhaseReminder);
|
|
26468
|
+
if (options.shouldInject && !options.shouldInject(sessionID)) {
|
|
26469
|
+
return;
|
|
26470
|
+
}
|
|
26471
|
+
if (!coordinator.consumePending(sessionID))
|
|
26472
|
+
return;
|
|
26473
|
+
if (hasReminder)
|
|
26474
|
+
return;
|
|
26475
|
+
message.parts.push({
|
|
26476
|
+
type: "text",
|
|
26477
|
+
synthetic: true,
|
|
26478
|
+
text: PHASE_REMINDER,
|
|
26479
|
+
metadata: { [PHASE_REMINDER_METADATA_KEY]: true }
|
|
26480
|
+
});
|
|
26471
26481
|
}
|
|
26472
26482
|
};
|
|
26473
26483
|
}
|
|
26484
|
+
function getEligibleMessage(message) {
|
|
26485
|
+
if (!isUserMessageWithParts(message) || !message.info.sessionID || message.info.agent !== "orchestrator") {
|
|
26486
|
+
return;
|
|
26487
|
+
}
|
|
26488
|
+
const textPart = message.parts.find((part) => part.type === "text" && part.text !== undefined);
|
|
26489
|
+
if (!textPart || isInternalInitiatorPart(textPart)) {
|
|
26490
|
+
return;
|
|
26491
|
+
}
|
|
26492
|
+
return { message, sessionID: message.info.sessionID };
|
|
26493
|
+
}
|
|
26474
26494
|
// src/hooks/reflect/index.ts
|
|
26475
26495
|
var COMMAND_NAME3 = "reflect";
|
|
26476
26496
|
function activationPrompt3(focus, isSessionMode = false, lastN = 50) {
|
|
@@ -26531,7 +26551,6 @@ function createReflectCommandHook() {
|
|
|
26531
26551
|
class SessionLifecycle {
|
|
26532
26552
|
#cleanupCallbacks = [];
|
|
26533
26553
|
#pendingSessionIds = new Set;
|
|
26534
|
-
#everPendingSessionIds = new Set;
|
|
26535
26554
|
#log;
|
|
26536
26555
|
constructor(log2) {
|
|
26537
26556
|
this.#log = log2;
|
|
@@ -26550,19 +26569,14 @@ class SessionLifecycle {
|
|
|
26550
26569
|
}
|
|
26551
26570
|
markPending(sessionId) {
|
|
26552
26571
|
this.#pendingSessionIds.add(sessionId);
|
|
26553
|
-
this.#everPendingSessionIds.add(sessionId);
|
|
26554
26572
|
}
|
|
26555
26573
|
consumePending(sessionId) {
|
|
26556
26574
|
const had = this.#pendingSessionIds.has(sessionId);
|
|
26557
26575
|
this.#pendingSessionIds.delete(sessionId);
|
|
26558
26576
|
return had;
|
|
26559
26577
|
}
|
|
26560
|
-
hasPendingSession(sessionId) {
|
|
26561
|
-
return this.#everPendingSessionIds.has(sessionId) && !this.#pendingSessionIds.has(sessionId);
|
|
26562
|
-
}
|
|
26563
26578
|
clearSession(sessionId) {
|
|
26564
26579
|
this.#pendingSessionIds.delete(sessionId);
|
|
26565
|
-
this.#everPendingSessionIds.delete(sessionId);
|
|
26566
26580
|
}
|
|
26567
26581
|
}
|
|
26568
26582
|
// src/hooks/task-session-manager/pending-call-tracker.ts
|
|
@@ -39050,10 +39064,13 @@ var OhMyOpenCodeLite = async (ctx) => {
|
|
|
39050
39064
|
}
|
|
39051
39065
|
};
|
|
39052
39066
|
};
|
|
39053
|
-
|
|
39067
|
+
const shouldInjectOrchestratorReminder = (sessionID) => sessionAgentMap.get(sessionID) === "orchestrator";
|
|
39068
|
+
phaseReminder = createPhaseReminderHook({
|
|
39069
|
+
shouldInject: shouldInjectOrchestratorReminder
|
|
39070
|
+
});
|
|
39054
39071
|
filterAvailableSkills = createFilterAvailableSkillsHook(ctx, config);
|
|
39055
39072
|
postFileToolNudge = createPostFileToolNudgeHook({
|
|
39056
|
-
shouldInject:
|
|
39073
|
+
shouldInject: shouldInjectOrchestratorReminder,
|
|
39057
39074
|
coordinator: sessionLifecycle
|
|
39058
39075
|
});
|
|
39059
39076
|
delegateTaskRetry = createDelegateTaskRetryHook(ctx);
|
|
@@ -39458,7 +39475,6 @@ var OhMyOpenCodeLite = async (ctx) => {
|
|
|
39458
39475
|
${output.system[0]}` : "");
|
|
39459
39476
|
}
|
|
39460
39477
|
}
|
|
39461
|
-
await postFileToolNudge["experimental.chat.system.transform"](input, output);
|
|
39462
39478
|
collapseSystemInPlace(output.system);
|
|
39463
39479
|
},
|
|
39464
39480
|
"experimental.chat.messages.transform": async (input, output) => {
|
|
@@ -39484,9 +39500,10 @@ ${output.system[0]}` : "");
|
|
|
39484
39500
|
disabledAgents,
|
|
39485
39501
|
log
|
|
39486
39502
|
});
|
|
39503
|
+
await taskSessionManagerHook["experimental.chat.messages.transform"](input, typedOutput);
|
|
39504
|
+
await postFileToolNudge["experimental.chat.messages.transform"](input, typedOutput);
|
|
39487
39505
|
await phaseReminder["experimental.chat.messages.transform"](input, typedOutput);
|
|
39488
39506
|
await filterAvailableSkills["experimental.chat.messages.transform"](input, typedOutput);
|
|
39489
|
-
await taskSessionManagerHook["experimental.chat.messages.transform"](input, typedOutput);
|
|
39490
39507
|
},
|
|
39491
39508
|
"tool.execute.after": async (input, output) => {
|
|
39492
39509
|
await postFileToolNudgeAfter(input, output);
|
|
@@ -95,7 +95,7 @@ export declare class BackgroundJobBoard implements BackgroundJobStore {
|
|
|
95
95
|
hasRunning(parentSessionID: string): boolean;
|
|
96
96
|
hasTerminalUnreconciled(parentSessionID: string): boolean;
|
|
97
97
|
hasConvergenceSignals(taskID: string, threshold?: number): boolean;
|
|
98
|
-
formatForPrompt(parentSessionID: string,
|
|
98
|
+
formatForPrompt(parentSessionID: string, _now?: number): string | undefined;
|
|
99
99
|
clearParent(parentSessionID: string): void;
|
|
100
100
|
drop(taskID: string): void;
|
|
101
101
|
deferIfRunning(_sessionId: string): boolean;
|
package/package.json
CHANGED