opencode-immune 1.0.10 → 1.0.11
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/dist/plugin.js +11 -0
- package/package.json +1 -1
package/dist/plugin.js
CHANGED
|
@@ -960,6 +960,17 @@ function createMultiCycleHandler(state) {
|
|
|
960
960
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
961
961
|
async function server(input) {
|
|
962
962
|
const state = createState(input);
|
|
963
|
+
// Eagerly load recovery context at plugin init so it's available
|
|
964
|
+
// for the very first system.transform call (before chat.params fires).
|
|
965
|
+
const markerActive = await isUltraworkMarkerActive(state);
|
|
966
|
+
if (markerActive) {
|
|
967
|
+
const recovery = await parseTasksFile(state.input.directory);
|
|
968
|
+
if (recovery && recovery.phase !== "ARCHIVE: DONE") {
|
|
969
|
+
state.recoveryContext = recovery;
|
|
970
|
+
console.log(`[opencode-immune] Plugin init: ultrawork marker active, recovery context loaded: ` +
|
|
971
|
+
`task="${recovery.task}", level=${recovery.level}, phase=${recovery.phase}`);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
963
974
|
console.log(`[opencode-immune] Plugin initialized. Directory: ${input.directory}`);
|
|
964
975
|
// Compose tool.execute.after handlers:
|
|
965
976
|
// Todo Enforcer (counter) + Ralph Loop (edit error) + Comment Checker
|