@cortexkit/opencode-magic-context 0.49.55 → 0.49.56
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/{context-vx5gw5h2.js → context-bejy30t5.js} +182 -53
- package/dist/features/magic-context/pi-identity-fold-guards.d.ts +38 -0
- package/dist/features/magic-context/pi-identity-fold-guards.d.ts.map +1 -0
- package/dist/features/magic-context/storage-session-tables.d.ts.map +1 -1
- package/dist/hooks/magic-context/command-handler.d.ts.map +1 -1
- package/dist/{index-a3n2dczz.js → index-12p4j9wa.js} +1 -1
- package/dist/{index-xj5bap1r.js → index-3jeq08jv.js} +1 -1
- package/dist/{index-567xsm72.js → index-3wmp1nb7.js} +3 -3
- package/dist/{index-yamsmkmh.js → index-5483ntzh.js} +2 -2
- package/dist/{index-9n6mdfqy.js → index-ffab4edg.js} +18 -16
- package/dist/{index-eyr425dx.js → index-pxfb7pp8.js} +2 -2
- package/dist/{index-xvtjwhm6.js → index-qfc1kjh4.js} +2 -2
- package/dist/{index-tx8nfw85.js → index-wgbp5zch.js} +9 -0
- package/dist/index.js +11 -11
- package/dist/raw-ordinal-warmup-worker.js +2 -2
- package/dist/{recomp-orchestrator-wbm4kpq9.js → recomp-orchestrator-2tsjqbrm.js} +3 -3
- package/dist/{render-73vrt30h.js → render-fgxbcmnh.js} +1 -1
- package/dist/{search-archive-ew4c3bsw.js → search-archive-0mz3p1g1.js} +2 -2
- package/dist/{transform-postprocess-phase-mt4dcbhd.js → transform-postprocess-phase-64xtx439.js} +3 -3
- package/dist/v2/{context-13er940g.js → context-5hhm89jw.js} +181 -52
- package/dist/v2/hidden-child-native.d.ts +10 -13
- package/dist/v2/hidden-child-native.d.ts.map +1 -1
- package/dist/v2/hidden-child-record.d.ts +2 -0
- package/dist/v2/hidden-child-record.d.ts.map +1 -1
- package/dist/v2/hidden-child-sweep.d.ts +39 -0
- package/dist/v2/hidden-child-sweep.d.ts.map +1 -0
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/raw-ordinal-warmup-worker.js +2 -2
- package/dist/v2/{recomp-orchestrator-cdkfynz4.js → recomp-orchestrator-dzdxrgdt.js} +2 -2
- package/dist/v2/{render-a7j6fqbd.js → render-jfa3hj8z.js} +1 -1
- package/dist/v2/{search-archive-3a36887a.js → search-archive-p4s9q7a3.js} +2 -2
- package/dist/v2/{server-578pc4tf.js → server-8e5m2gre.js} +2 -2
- package/dist/v2/{server-79tbtk5w.js → server-kyfj1090.js} +1 -1
- package/dist/v2/{server-7rmf6a57.js → server-q02z0jq7.js} +9 -0
- package/dist/v2/{server-96g41nad.js → server-z6sxv6n3.js} +1 -1
- package/dist/v2/server.js +2 -2
- package/dist/v2/{v2-archive-reader-jm3d7ccj.js → v2-archive-reader-jpdh0ktt.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-xnqq81c4.js → wrapup-orchestrator-5dfj2mcs.js} +2 -2
- package/dist/{v2-archive-reader-9bbfh131.js → v2-archive-reader-557b5dn3.js} +1 -1
- package/dist/{wrapup-orchestrator-svhee0fn.js → wrapup-orchestrator-21hgybdk.js} +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
checkCompactionMarkerConsistency,
|
|
59
59
|
clearInjectionCache,
|
|
60
60
|
clearNoteNudgeTriggerOnly
|
|
61
|
-
} from "./index-
|
|
61
|
+
} from "./index-3jeq08jv.js";
|
|
62
62
|
import"./index-sd3egckz.js";
|
|
63
63
|
import {
|
|
64
64
|
hasTrustedAbsoluteWall,
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
parameterDescriptionsFor,
|
|
144
144
|
MagicContextRpcServer,
|
|
145
145
|
applyHiddenSubagentTemperature
|
|
146
|
-
} from "./index-
|
|
146
|
+
} from "./index-ffab4edg.js";
|
|
147
147
|
import {
|
|
148
148
|
resolveOpenCodeDbPath,
|
|
149
149
|
openCodeDbPathExists,
|
|
@@ -195,7 +195,7 @@ import {
|
|
|
195
195
|
dropServedRecord,
|
|
196
196
|
registerLkgPersistence,
|
|
197
197
|
dropSlot
|
|
198
|
-
} from "./index-
|
|
198
|
+
} from "./index-wgbp5zch.js";
|
|
199
199
|
import {
|
|
200
200
|
recordSessionProjectIdentity
|
|
201
201
|
} from "./index-qperbvjn.js";
|
|
@@ -317,13 +317,13 @@ import {
|
|
|
317
317
|
armBindingRecoverySafely,
|
|
318
318
|
collectForeignTextParts,
|
|
319
319
|
resetDegradedCacheCount2
|
|
320
|
-
} from "./index-
|
|
320
|
+
} from "./index-pxfb7pp8.js";
|
|
321
321
|
import {
|
|
322
322
|
scheduleClearAndReindex
|
|
323
323
|
} from "./index-b6rdv8re.js";
|
|
324
324
|
import {
|
|
325
325
|
runManagedRecomp2
|
|
326
|
-
} from "./index-
|
|
326
|
+
} from "./index-5483ntzh.js";
|
|
327
327
|
import {
|
|
328
328
|
isValidSemver,
|
|
329
329
|
compareSemverCore
|
|
@@ -331,11 +331,11 @@ import {
|
|
|
331
331
|
import"./index-fmsr7v69.js";
|
|
332
332
|
import {
|
|
333
333
|
runManagedWrapup2
|
|
334
|
-
} from "./index-
|
|
334
|
+
} from "./index-3wmp1nb7.js";
|
|
335
335
|
import"./index-5gqszjq9.js";
|
|
336
336
|
import"./index-52x68mj4.js";
|
|
337
|
-
import"./index-
|
|
338
|
-
import"./index-
|
|
337
|
+
import"./index-qfc1kjh4.js";
|
|
338
|
+
import"./index-12p4j9wa.js";
|
|
339
339
|
import {
|
|
340
340
|
isDreamerRunnable,
|
|
341
341
|
isSmartNoteSurfaceAvailable,
|
|
@@ -8203,7 +8203,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
8203
8203
|
// package.json
|
|
8204
8204
|
var package_default = {
|
|
8205
8205
|
name: "@cortexkit/opencode-magic-context",
|
|
8206
|
-
version: "0.49.
|
|
8206
|
+
version: "0.49.56",
|
|
8207
8207
|
type: "module",
|
|
8208
8208
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
8209
8209
|
main: "dist/index.js",
|
|
@@ -12080,7 +12080,7 @@ async function setup(context) {
|
|
|
12080
12080
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
12081
12081
|
log2(`[magic-context] Magic Context storage is at ${storageDir}, outside the folder Engram backs up (~/.local/share/cortexkit/magic-context). It is not included in CortexKit backups.`);
|
|
12082
12082
|
}
|
|
12083
|
-
const { registerContext } = await import("./context-
|
|
12083
|
+
const { registerContext } = await import("./context-bejy30t5.js");
|
|
12084
12084
|
setHarness2("opencode2");
|
|
12085
12085
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
12086
12086
|
const duties = await registerContext(context);
|
|
@@ -12553,7 +12553,7 @@ var server = async (ctx) => {
|
|
|
12553
12553
|
rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
|
|
12554
12554
|
onStorageBusyRefusal: async (sessionId, message) => {
|
|
12555
12555
|
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-gamjee2f.js"));
|
|
12556
|
-
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-
|
|
12556
|
+
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-64xtx439.js"));
|
|
12557
12557
|
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12558
12558
|
toastDurationMs: 15000
|
|
12559
12559
|
});
|
|
@@ -19,7 +19,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
19
19
|
await main();
|
|
20
20
|
async function main() {
|
|
21
21
|
if (input.v2ArchiveReader) {
|
|
22
|
-
const { serveV2ArchiveReads } = await import("./v2-archive-reader-
|
|
22
|
+
const { serveV2ArchiveReads } = await import("./v2-archive-reader-557b5dn3.js");
|
|
23
23
|
await serveV2ArchiveReads(port, openConnections);
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
@@ -51,7 +51,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
51
51
|
await runMessageFtsRowidMapBackfill(db);
|
|
52
52
|
reply = { kind: "fts-rowid-backfill" };
|
|
53
53
|
} else if (input.searchArchive) {
|
|
54
|
-
const { renderSearchArchive } = await import("./search-archive-
|
|
54
|
+
const { renderSearchArchive } = await import("./search-archive-0mz3p1g1.js");
|
|
55
55
|
const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-04ger9zt.js");
|
|
56
56
|
const archive = input.searchArchive;
|
|
57
57
|
let raw;
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
setRecompTerminal2,
|
|
8
8
|
buildRecompDeps2,
|
|
9
9
|
runManagedRecomp2
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
} from "./index-5483ntzh.js";
|
|
11
|
+
import"./index-3jeq08jv.js";
|
|
12
12
|
import"./index-90z05d0p.js";
|
|
13
13
|
import"./index-sd3egckz.js";
|
|
14
14
|
import"./index-pdh4tdcq.js";
|
|
@@ -16,7 +16,7 @@ import"./index-2vsd5064.js";
|
|
|
16
16
|
import"./index-jjvbk92s.js";
|
|
17
17
|
import"./index-sx1sppd6.js";
|
|
18
18
|
import"./index-4dhv7mqz.js";
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-wgbp5zch.js";
|
|
20
20
|
import"./index-dhdv88e5.js";
|
|
21
21
|
import"./index-h62j8z2r.js";
|
|
22
22
|
import"./index-2amn2s73.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderSearchArchive2,
|
|
3
3
|
renderSearchArchiveOffThread2
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-12p4j9wa.js";
|
|
5
|
+
import"./index-qfc1kjh4.js";
|
|
6
6
|
import"./index-52x68mj4.js";
|
|
7
7
|
import"./index-29ff546v.js";
|
|
8
8
|
import"./index-sk6p6esd.js";
|
package/dist/{transform-postprocess-phase-mt4dcbhd.js → transform-postprocess-phase-64xtx439.js}
RENAMED
|
@@ -19,9 +19,9 @@ import {
|
|
|
19
19
|
finalizeMessageRepresentation2,
|
|
20
20
|
runPostTransformPhase2,
|
|
21
21
|
checkM0MutationDriftAndSignal2
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-pxfb7pp8.js";
|
|
23
23
|
import"./index-b6rdv8re.js";
|
|
24
|
-
import"./index-
|
|
24
|
+
import"./index-3jeq08jv.js";
|
|
25
25
|
import"./index-90z05d0p.js";
|
|
26
26
|
import"./index-sd3egckz.js";
|
|
27
27
|
import"./index-pdh4tdcq.js";
|
|
@@ -29,7 +29,7 @@ import"./index-2vsd5064.js";
|
|
|
29
29
|
import"./index-jjvbk92s.js";
|
|
30
30
|
import"./index-sx1sppd6.js";
|
|
31
31
|
import"./index-4dhv7mqz.js";
|
|
32
|
-
import"./index-
|
|
32
|
+
import"./index-wgbp5zch.js";
|
|
33
33
|
import"./index-dhdv88e5.js";
|
|
34
34
|
import"./index-h62j8z2r.js";
|
|
35
35
|
import"./index-2amn2s73.js";
|
|
@@ -218,7 +218,7 @@ import {
|
|
|
218
218
|
startCompartmentAgent,
|
|
219
219
|
setRecompStarting2,
|
|
220
220
|
setRecompTerminal2
|
|
221
|
-
} from "./server-
|
|
221
|
+
} from "./server-z6sxv6n3.js";
|
|
222
222
|
import {
|
|
223
223
|
resolveHistorianModel2
|
|
224
224
|
} from "./server-5kym00ag.js";
|
|
@@ -793,7 +793,7 @@ import {
|
|
|
793
793
|
saveSourceContent,
|
|
794
794
|
replaceSourceContent,
|
|
795
795
|
getSourceContents
|
|
796
|
-
} from "./server-
|
|
796
|
+
} from "./server-q02z0jq7.js";
|
|
797
797
|
import {
|
|
798
798
|
startBootDeadline,
|
|
799
799
|
getUnconfirmedMigrationHolders,
|
|
@@ -999,10 +999,10 @@ import {
|
|
|
999
999
|
import"./server-52x68mj4.js";
|
|
1000
1000
|
import {
|
|
1001
1001
|
readV2ArchiveOffThread2
|
|
1002
|
-
} from "./server-
|
|
1002
|
+
} from "./server-8e5m2gre.js";
|
|
1003
1003
|
import {
|
|
1004
1004
|
renderSearchArchiveOffThread2
|
|
1005
|
-
} from "./server-
|
|
1005
|
+
} from "./server-kyfj1090.js";
|
|
1006
1006
|
import {
|
|
1007
1007
|
markHostInstructionRow,
|
|
1008
1008
|
hostInstructionRow,
|
|
@@ -26049,7 +26049,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
26049
26049
|
const db = readDatabase();
|
|
26050
26050
|
if (!db)
|
|
26051
26051
|
return { ok: false, error: "db unavailable" };
|
|
26052
|
-
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-
|
|
26052
|
+
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-dzdxrgdt.js"));
|
|
26053
26053
|
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-95p89k7q.js"));
|
|
26054
26054
|
log2(`[rpc] recomp requested for session ${sessionId}`);
|
|
26055
26055
|
if (!args.client && !args.hiddenCompletionExecutor) {
|
|
@@ -26134,7 +26134,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
26134
26134
|
const db = readDatabase();
|
|
26135
26135
|
if (!db)
|
|
26136
26136
|
return { ok: false, error: "db unavailable" };
|
|
26137
|
-
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-
|
|
26137
|
+
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-5dfj2mcs.js"));
|
|
26138
26138
|
const model = liveSessionState.liveModelBySession.get(sessionId);
|
|
26139
26139
|
const contextLimit = model ? resolveContextLimit(model.providerID, model.modelID, { db, sessionID: sessionId }) : 128000;
|
|
26140
26140
|
const ctx = {
|
|
@@ -30072,7 +30072,104 @@ function errorText(value) {
|
|
|
30072
30072
|
}
|
|
30073
30073
|
}
|
|
30074
30074
|
|
|
30075
|
+
// src/v2/hidden-child-sweep.ts
|
|
30076
|
+
var PREFIX = "hidden_child:";
|
|
30077
|
+
var HIDDEN_CHILD_MAX_AGE_MS = 60 * 60 * 1000;
|
|
30078
|
+
var HIDDEN_CHILD_SWEEP_INTERVAL_MS = 30 * 60 * 1000;
|
|
30079
|
+
var HIDDEN_CHILD_DEADLINE_GRACE_MS = 10 * 60 * 1000;
|
|
30080
|
+
var SWEEP_REMOVAL_LIMIT = 50;
|
|
30081
|
+
var SWEEP_BUDGET_MS = 30000;
|
|
30082
|
+
function recordHiddenChild(db, child) {
|
|
30083
|
+
db.prepare("INSERT INTO schema_migrations_meta (key, value) VALUES (?, ?)").run(`${PREFIX}${child.id}`, JSON.stringify(child));
|
|
30084
|
+
}
|
|
30085
|
+
function forgetHiddenChild(db, id) {
|
|
30086
|
+
db.prepare("DELETE FROM schema_migrations_meta WHERE key = ?").run(`${PREFIX}${id}`);
|
|
30087
|
+
}
|
|
30088
|
+
function extendHiddenChildDeadline(db, id, deadlineAt) {
|
|
30089
|
+
db.prepare(`UPDATE schema_migrations_meta
|
|
30090
|
+
SET value = json_set(value, '$.deadline_at', MAX(COALESCE(json_extract(value, '$.deadline_at'), 0), ?))
|
|
30091
|
+
WHERE key = ?`).run(deadlineAt, `${PREFIX}${id}`);
|
|
30092
|
+
}
|
|
30093
|
+
function markHiddenChildRemovalFailed(db, id, failedAt) {
|
|
30094
|
+
db.prepare("UPDATE schema_migrations_meta SET value = json_set(value, '$.failed_at', ?) WHERE key = ?").run(failedAt, `${PREFIX}${id}`);
|
|
30095
|
+
}
|
|
30096
|
+
function createHiddenChildSweeper(remove, log, options = {}) {
|
|
30097
|
+
let stopped = false;
|
|
30098
|
+
let running;
|
|
30099
|
+
return {
|
|
30100
|
+
start(db) {
|
|
30101
|
+
if (stopped || running)
|
|
30102
|
+
return;
|
|
30103
|
+
running = sweepHiddenChildren(db, remove, log, {
|
|
30104
|
+
...options,
|
|
30105
|
+
shouldStop: () => stopped || options.shouldStop?.() === true
|
|
30106
|
+
}).catch((error) => log("[magic-context] hidden-child sweep failed", error)).finally(() => {
|
|
30107
|
+
running = undefined;
|
|
30108
|
+
});
|
|
30109
|
+
},
|
|
30110
|
+
async dispose() {
|
|
30111
|
+
stopped = true;
|
|
30112
|
+
await running;
|
|
30113
|
+
}
|
|
30114
|
+
};
|
|
30115
|
+
}
|
|
30116
|
+
async function sweepHiddenChildren(db, remove, note, options = {}) {
|
|
30117
|
+
const now = options.now ?? Date.now();
|
|
30118
|
+
const clock = options.clock ?? (() => performance.now());
|
|
30119
|
+
const passDeadline = clock() + (options.budgetMs ?? SWEEP_BUDGET_MS);
|
|
30120
|
+
let remaining = options.limit ?? SWEEP_REMOVAL_LIMIT;
|
|
30121
|
+
const rows = db.prepare(`SELECT key, value FROM (
|
|
30122
|
+
SELECT key, value,
|
|
30123
|
+
CASE WHEN json_valid(value) THEN json_extract(value, '$.failed_at') END AS failed_at,
|
|
30124
|
+
CASE WHEN json_valid(value) THEN json_extract(value, '$.created_at') END AS created_at
|
|
30125
|
+
FROM schema_migrations_meta WHERE key GLOB ?
|
|
30126
|
+
)
|
|
30127
|
+
ORDER BY failed_at IS NOT NULL, COALESCE(failed_at, created_at), created_at, key`).all(`${PREFIX}*`);
|
|
30128
|
+
for (const row of rows) {
|
|
30129
|
+
if (remaining <= 0 || clock() >= passDeadline || options.shouldStop?.())
|
|
30130
|
+
break;
|
|
30131
|
+
let timer;
|
|
30132
|
+
try {
|
|
30133
|
+
const child = JSON.parse(row.value);
|
|
30134
|
+
if (!child || typeof child.id !== "string" || row.key !== `${PREFIX}${child.id}` || typeof child.directory !== "string" || !Number.isFinite(child.created_at) || child.deadline_at !== undefined && !Number.isFinite(child.deadline_at))
|
|
30135
|
+
throw new Error(`invalid cleanup record ${row.key}`);
|
|
30136
|
+
const expiresAt = Math.max(child.created_at + (options.maxAgeMs ?? HIDDEN_CHILD_MAX_AGE_MS), child.deadline_at === undefined ? 0 : child.deadline_at + HIDDEN_CHILD_DEADLINE_GRACE_MS);
|
|
30137
|
+
if (now <= expiresAt || options.isLive?.(child.id))
|
|
30138
|
+
continue;
|
|
30139
|
+
remaining--;
|
|
30140
|
+
try {
|
|
30141
|
+
await Promise.race([
|
|
30142
|
+
remove({ sessionID: child.id }),
|
|
30143
|
+
new Promise((_, reject) => {
|
|
30144
|
+
timer = setTimeout(() => reject(new Error("session.remove timed out")), Math.min(options.removalTimeoutMs ?? 5000, Math.max(1, passDeadline - clock())));
|
|
30145
|
+
})
|
|
30146
|
+
]);
|
|
30147
|
+
} catch (error) {
|
|
30148
|
+
if (!isSessionNotFound(error)) {
|
|
30149
|
+
try {
|
|
30150
|
+
markHiddenChildRemovalFailed(db, child.id, now);
|
|
30151
|
+
} catch (markError) {
|
|
30152
|
+
note(`[magic-context] hidden-child sweep could not mark ${row.key} failed: ${String(markError)}`);
|
|
30153
|
+
}
|
|
30154
|
+
throw error;
|
|
30155
|
+
}
|
|
30156
|
+
}
|
|
30157
|
+
forgetHiddenChild(db, child.id);
|
|
30158
|
+
note(`[magic-context] stale hidden child ${child.id} removed`);
|
|
30159
|
+
} catch (error) {
|
|
30160
|
+
note(`[magic-context] hidden-child sweep deferred ${row.key}: ${String(error)}`);
|
|
30161
|
+
} finally {
|
|
30162
|
+
if (timer)
|
|
30163
|
+
clearTimeout(timer);
|
|
30164
|
+
}
|
|
30165
|
+
}
|
|
30166
|
+
}
|
|
30167
|
+
|
|
30075
30168
|
// src/v2/hidden-child-native.ts
|
|
30169
|
+
var liveChildren = new Set;
|
|
30170
|
+
function isLiveHiddenChild(id) {
|
|
30171
|
+
return liveChildren.has(id);
|
|
30172
|
+
}
|
|
30076
30173
|
function nativeSessionRemove(session) {
|
|
30077
30174
|
const remove = session.remove;
|
|
30078
30175
|
if (typeof remove !== "function")
|
|
@@ -30088,7 +30185,6 @@ function isSessionNotFound(error) {
|
|
|
30088
30185
|
const label = [fields.name, fields._tag, fields.message].filter((value) => typeof value === "string").join(" ");
|
|
30089
30186
|
return /not\s*found/i.test(label);
|
|
30090
30187
|
}
|
|
30091
|
-
var parentDroppedNoted = false;
|
|
30092
30188
|
function createNativeHiddenChildren(host, removeSession, options) {
|
|
30093
30189
|
const removing = new Map;
|
|
30094
30190
|
const remove = (child) => {
|
|
@@ -30110,68 +30206,74 @@ function createNativeHiddenChildren(host, removeSession, options) {
|
|
|
30110
30206
|
if (timer)
|
|
30111
30207
|
clearTimeout(timer);
|
|
30112
30208
|
}
|
|
30209
|
+
forgetHiddenChild(options.db, child.id);
|
|
30113
30210
|
options.log(`[magic-context] hidden child ${child.id} removed`);
|
|
30114
30211
|
} catch (error) {
|
|
30115
|
-
if (isSessionNotFound(error))
|
|
30212
|
+
if (isSessionNotFound(error)) {
|
|
30213
|
+
try {
|
|
30214
|
+
forgetHiddenChild(options.db, child.id);
|
|
30215
|
+
} catch (storeError) {
|
|
30216
|
+
options.log(`[magic-context] hidden child ${child.id} record cleanup deferred: ${errorText(storeError)}`);
|
|
30217
|
+
}
|
|
30116
30218
|
return;
|
|
30117
|
-
|
|
30219
|
+
}
|
|
30220
|
+
options.log(`[magic-context] hidden child ${child.id} could not be removed: ${errorText(error)}`);
|
|
30118
30221
|
}
|
|
30119
30222
|
})().finally(() => {
|
|
30120
30223
|
removing.delete(child.id);
|
|
30224
|
+
liveChildren.delete(child.id);
|
|
30121
30225
|
});
|
|
30122
30226
|
removing.set(child.id, done);
|
|
30123
30227
|
return done;
|
|
30124
30228
|
};
|
|
30125
|
-
const noteCreated = (sessionID, role, parentID) => {
|
|
30126
|
-
options.log(`[magic-context] hidden child ${sessionID} created role=${role} parent=${parentID} keep_subagents=${options.keepSubagents}`);
|
|
30127
|
-
};
|
|
30128
|
-
const confirmPlacement = async (sessionID, parentID, role) => {
|
|
30129
|
-
let stored;
|
|
30130
|
-
try {
|
|
30131
|
-
stored = await host.get({ sessionID });
|
|
30132
|
-
} catch (error) {
|
|
30133
|
-
noteCreated(sessionID, role, "unknown");
|
|
30134
|
-
options.log(`[magic-context] could not read back hidden child ${sessionID} to confirm its parent: ${errorText(error)}`);
|
|
30135
|
-
return;
|
|
30136
|
-
}
|
|
30137
|
-
noteCreated(sessionID, role, stored.parentID ?? "none");
|
|
30138
|
-
const directory = stored.location?.directory;
|
|
30139
|
-
if (options.directory !== undefined && directory !== undefined && !sameProjectDirectory(directory, options.directory)) {
|
|
30140
|
-
throw new HiddenCompletionRefusal("hidden_prompt_unrecognized", `hidden child ${sessionID} is bound to ${directory}, not to this instance's ${options.directory}. Reopen the parent session in ${directory}, then run /ctx-recomp so its owning instance can rebuild history.`, true);
|
|
30141
|
-
}
|
|
30142
|
-
if (stored.parentID === parentID || parentDroppedNoted)
|
|
30143
|
-
return;
|
|
30144
|
-
parentDroppedNoted = true;
|
|
30145
|
-
options.log(`[magic-context] this OpenCode 2 host does not keep the parent of hidden-run sessions (asked for ${parentID}, read back ${stored.parentID ?? "none"}); they are created as separate sessions and still removed when each run ends`);
|
|
30146
|
-
};
|
|
30147
30229
|
const create = async (identity, role, model) => {
|
|
30148
|
-
const parentID = identity.parentSessionId;
|
|
30149
30230
|
const input = childCreateInput(identity, role, model);
|
|
30150
|
-
const
|
|
30151
|
-
const created = await host.create(parentID ? { ...parented, parentID } : { ...parented, location });
|
|
30231
|
+
const created = await host.create(input);
|
|
30152
30232
|
if (!created.id)
|
|
30153
30233
|
throw new Error("OpenCode 2 did not return a child session id");
|
|
30234
|
+
const createdAt = Date.now();
|
|
30235
|
+
liveChildren.add(created.id);
|
|
30236
|
+
if (!options.keepSubagents) {
|
|
30237
|
+
try {
|
|
30238
|
+
recordHiddenChild(options.db, {
|
|
30239
|
+
id: created.id,
|
|
30240
|
+
directory: identity.directory,
|
|
30241
|
+
created_at: createdAt,
|
|
30242
|
+
deadline_at: createdAt + identity.timeoutMs
|
|
30243
|
+
});
|
|
30244
|
+
} catch (storeError) {
|
|
30245
|
+
let removed = false;
|
|
30246
|
+
let timer;
|
|
30247
|
+
try {
|
|
30248
|
+
await Promise.race([
|
|
30249
|
+
removeSession({ sessionID: created.id }),
|
|
30250
|
+
new Promise((_, reject) => {
|
|
30251
|
+
timer = setTimeout(() => reject(new Error("session.remove timed out")), options.removalTimeoutMs ?? 5000);
|
|
30252
|
+
})
|
|
30253
|
+
]);
|
|
30254
|
+
removed = true;
|
|
30255
|
+
} catch (error) {
|
|
30256
|
+
removed = isSessionNotFound(error);
|
|
30257
|
+
} finally {
|
|
30258
|
+
if (timer)
|
|
30259
|
+
clearTimeout(timer);
|
|
30260
|
+
liveChildren.delete(created.id);
|
|
30261
|
+
}
|
|
30262
|
+
options.log(`[magic-context] hidden child ${created.id} record failed; removed=${removed}: ${errorText(storeError)}`);
|
|
30263
|
+
throw storeError;
|
|
30264
|
+
}
|
|
30265
|
+
}
|
|
30154
30266
|
options.hook.registerChild(created.id, input.agent);
|
|
30155
|
-
|
|
30267
|
+
options.log(`[magic-context] hidden child ${created.id} created role=${role} keep_subagents=${options.keepSubagents}`);
|
|
30268
|
+
return {
|
|
30156
30269
|
id: created.id,
|
|
30157
30270
|
role,
|
|
30158
30271
|
generation: options.generation,
|
|
30159
30272
|
title: roleTitle(role),
|
|
30160
30273
|
model,
|
|
30161
|
-
created_at:
|
|
30274
|
+
created_at: createdAt,
|
|
30162
30275
|
directory: identity.directory
|
|
30163
30276
|
};
|
|
30164
|
-
if (parentID) {
|
|
30165
|
-
try {
|
|
30166
|
-
await confirmPlacement(created.id, parentID, role);
|
|
30167
|
-
} catch (error) {
|
|
30168
|
-
await remove(child);
|
|
30169
|
-
throw error;
|
|
30170
|
-
}
|
|
30171
|
-
} else {
|
|
30172
|
-
noteCreated(created.id, role, "none");
|
|
30173
|
-
}
|
|
30174
|
-
return child;
|
|
30175
30277
|
};
|
|
30176
30278
|
const kept = (child) => keptUnderRetention(options.keepSubagents, child);
|
|
30177
30279
|
return {
|
|
@@ -30179,6 +30281,7 @@ function createNativeHiddenChildren(host, removeSession, options) {
|
|
|
30179
30281
|
create,
|
|
30180
30282
|
retire(child) {
|
|
30181
30283
|
if (kept(child)) {
|
|
30284
|
+
liveChildren.delete(child.id);
|
|
30182
30285
|
options.log(`[magic-context] hidden child ${child.id} kept (keep_subagents)`);
|
|
30183
30286
|
} else {
|
|
30184
30287
|
remove(child);
|
|
@@ -30190,23 +30293,33 @@ function createNativeHiddenChildren(host, removeSession, options) {
|
|
|
30190
30293
|
return;
|
|
30191
30294
|
}
|
|
30192
30295
|
if (kept(child)) {
|
|
30296
|
+
liveChildren.delete(child.id);
|
|
30193
30297
|
options.log(`[magic-context] hidden child ${child.id} kept (keep_subagents)`);
|
|
30194
30298
|
} else {
|
|
30195
30299
|
await remove(child);
|
|
30196
30300
|
}
|
|
30197
30301
|
},
|
|
30302
|
+
extendDeadline(child, deadlineAt) {
|
|
30303
|
+
if (options.keepSubagents)
|
|
30304
|
+
return;
|
|
30305
|
+
try {
|
|
30306
|
+
extendHiddenChildDeadline(options.db, child.id, deadlineAt);
|
|
30307
|
+
} catch (error) {
|
|
30308
|
+
options.log(`[magic-context] hidden child ${child.id} deadline update deferred: ${errorText(error)}`);
|
|
30309
|
+
}
|
|
30310
|
+
},
|
|
30198
30311
|
updateModel: (child, model) => ({ ...child, model }),
|
|
30199
30312
|
markEverSettled: (child) => ({ ...child, ever_settled: true })
|
|
30200
30313
|
};
|
|
30201
30314
|
}
|
|
30202
30315
|
|
|
30203
30316
|
// src/v2/hidden-child-cleanup.ts
|
|
30204
|
-
var
|
|
30317
|
+
var PREFIX2 = "opencode2_hidden_children:";
|
|
30205
30318
|
var COMPLETE = "opencode2_hidden_children_cleanup_complete";
|
|
30206
30319
|
async function cleanupLegacyHiddenChildren(db, remove, note, options = {}) {
|
|
30207
30320
|
if (db.prepare("SELECT 1 FROM schema_migrations_meta WHERE key = ?").get(COMPLETE))
|
|
30208
30321
|
return;
|
|
30209
|
-
const rows = db.prepare("SELECT key, value FROM schema_migrations_meta WHERE key GLOB ? ORDER BY key LIMIT 25").all(`${
|
|
30322
|
+
const rows = db.prepare("SELECT key, value FROM schema_migrations_meta WHERE key GLOB ? ORDER BY key LIMIT 25").all(`${PREFIX2}*`);
|
|
30210
30323
|
let remaining = options.limit ?? 25;
|
|
30211
30324
|
const now = options.now ?? (() => performance.now());
|
|
30212
30325
|
const deadline = now() + (options.budgetMs ?? 2000);
|
|
@@ -30258,7 +30371,7 @@ async function cleanupLegacyHiddenChildren(db, remove, note, options = {}) {
|
|
|
30258
30371
|
if (Object.keys(record.active ?? {}).length === 0 && (record.retired_children ?? []).length === 0)
|
|
30259
30372
|
db.prepare("DELETE FROM schema_migrations_meta WHERE key = ?").run(row.key);
|
|
30260
30373
|
}
|
|
30261
|
-
if (!db.prepare("SELECT 1 FROM schema_migrations_meta WHERE key GLOB ? LIMIT 1").get(`${
|
|
30374
|
+
if (!db.prepare("SELECT 1 FROM schema_migrations_meta WHERE key GLOB ? LIMIT 1").get(`${PREFIX2}*`))
|
|
30262
30375
|
db.prepare("INSERT OR IGNORE INTO schema_migrations_meta (key, value) VALUES (?, 'true')").run(COMPLETE);
|
|
30263
30376
|
}
|
|
30264
30377
|
|
|
@@ -30656,12 +30769,12 @@ async function createV2HiddenCompletionExecutor(host, options) {
|
|
|
30656
30769
|
if (!removeSession)
|
|
30657
30770
|
throw new Error("Magic Context requires OpenCode 2.0.22 session.remove");
|
|
30658
30771
|
const lifecycle = createNativeHiddenChildren(host, (input) => removeSession.call(host, input), {
|
|
30772
|
+
db: options.db,
|
|
30659
30773
|
hook: options.hook,
|
|
30660
30774
|
generation,
|
|
30661
30775
|
keepSubagents: options.keepSubagents === true,
|
|
30662
30776
|
log: note,
|
|
30663
|
-
removalTimeoutMs: options.removalTimeoutMs
|
|
30664
|
-
directory: options.directory
|
|
30777
|
+
removalTimeoutMs: options.removalTimeoutMs
|
|
30665
30778
|
});
|
|
30666
30779
|
const acquireRole = async (role) => {
|
|
30667
30780
|
const previous = roleTails.get(role) ?? Promise.resolve();
|
|
@@ -30890,6 +31003,7 @@ async function createV2HiddenCompletionExecutor(host, options) {
|
|
|
30890
31003
|
run.attempt = { child: attempt, baseline };
|
|
30891
31004
|
options.hook.registerAttempt(marker, attempt);
|
|
30892
31005
|
const deadline = Date.now() + run.identity.timeoutMs;
|
|
31006
|
+
lifecycle.extendDeadline(run.child, deadline);
|
|
30893
31007
|
const budget = run.budget;
|
|
30894
31008
|
if (budget?.snapshot().finalizeFired) {
|
|
30895
31009
|
throw new DreamTokenBudgetExceeded(run.child.id, budget.snapshot().spent);
|
|
@@ -56718,11 +56832,23 @@ async function registerContext(context) {
|
|
|
56718
56832
|
let db = await probeV2StorageAtBoot(storage);
|
|
56719
56833
|
const storageOpenedAtBoot = db !== undefined;
|
|
56720
56834
|
let legacyCleanupStarted = false;
|
|
56835
|
+
const hiddenChildSweep = createHiddenChildSweeper(nativeRemove, log2, {
|
|
56836
|
+
isLive: isLiveHiddenChild
|
|
56837
|
+
});
|
|
56838
|
+
let hiddenChildSweepTimer;
|
|
56839
|
+
const sweepChildren = (database) => {
|
|
56840
|
+
hiddenChildSweep.start(database);
|
|
56841
|
+
};
|
|
56721
56842
|
const cleanupLegacyOnce = async (database) => {
|
|
56722
56843
|
if (legacyCleanupStarted)
|
|
56723
56844
|
return;
|
|
56724
56845
|
legacyCleanupStarted = true;
|
|
56725
56846
|
await cleanupLegacyHiddenChildren(database, nativeRemove, log2);
|
|
56847
|
+
sweepChildren(database);
|
|
56848
|
+
hiddenChildSweepTimer = inRootAsyncContext2(() => setInterval(() => {
|
|
56849
|
+
sweepChildren(database);
|
|
56850
|
+
}, HIDDEN_CHILD_SWEEP_INTERVAL_MS));
|
|
56851
|
+
hiddenChildSweepTimer.unref?.();
|
|
56726
56852
|
};
|
|
56727
56853
|
if (db && isDatabasePersisted(db))
|
|
56728
56854
|
await cleanupLegacyOnce(db);
|
|
@@ -58331,6 +58457,9 @@ async function registerContext(context) {
|
|
|
58331
58457
|
}, 0));
|
|
58332
58458
|
return {
|
|
58333
58459
|
async dispose() {
|
|
58460
|
+
if (hiddenChildSweepTimer)
|
|
58461
|
+
clearInterval(hiddenChildSweepTimer);
|
|
58462
|
+
await hiddenChildSweep.dispose();
|
|
58334
58463
|
messageTimesCache.clear();
|
|
58335
58464
|
hostFoldIdle?.dispose();
|
|
58336
58465
|
usageController.abort();
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import type { Database } from "../shared/sqlite";
|
|
1
2
|
import { type HiddenChildHost, type HiddenChildLifecycle } from "./hidden-child-record";
|
|
2
3
|
import type { HiddenChildHook } from "./hooks/hidden-child";
|
|
3
4
|
/**
|
|
4
5
|
* The hidden-child lifecycle for OpenCode 2 hosts whose plugin session API has `session.remove`.
|
|
5
|
-
* Every run gets a fresh child
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Every run gets a fresh root child in the run's directory, and the child is removed when the run
|
|
7
|
+
* ends, whether it succeeded or failed. A context.db record survives failed removal or a crash
|
|
8
|
+
* so an age-gated sweep can retry without touching another instance's live run.
|
|
9
|
+
*
|
|
10
|
+
* The child is never given the user's session as its parent: OpenCode 2.3 reports every idle of a
|
|
11
|
+
* parented session to its parent and wakes the parent, so each historian or dreamer run would
|
|
12
|
+
* start a turn in the user's session.
|
|
9
13
|
*/
|
|
10
14
|
type RemoveSession = NonNullable<HiddenChildHost["removeSession"]>;
|
|
15
|
+
export declare function isLiveHiddenChild(id: string): boolean;
|
|
11
16
|
/**
|
|
12
17
|
* The feature gate for this lifecycle: the host's own `session.remove`, bound to its session API,
|
|
13
18
|
* or undefined on hosts that do not expose one to plugins. Hosts are told apart by what they
|
|
@@ -16,21 +21,13 @@ type RemoveSession = NonNullable<HiddenChildHost["removeSession"]>;
|
|
|
16
21
|
export declare function nativeSessionRemove(session: object): RemoveSession | undefined;
|
|
17
22
|
/** True when the host reports that the session is already gone. */
|
|
18
23
|
export declare function isSessionNotFound(error: unknown): boolean;
|
|
19
|
-
/** Clears the once-per-process notice, for tests. */
|
|
20
|
-
export declare function __resetParentDroppedNotice(): void;
|
|
21
24
|
export declare function createNativeHiddenChildren(host: HiddenChildHost, removeSession: RemoveSession, options: {
|
|
25
|
+
db: Database;
|
|
22
26
|
hook: HiddenChildHook;
|
|
23
27
|
generation: string;
|
|
24
28
|
keepSubagents: boolean;
|
|
25
29
|
log: (message: string) => void;
|
|
26
30
|
removalTimeoutMs?: number;
|
|
27
|
-
/**
|
|
28
|
-
* The directory of the plugin instance that owns this lifecycle. OpenCode 2
|
|
29
|
-
* runs a session's hooks in the instance of the session's own location,
|
|
30
|
-
* and a child takes its parent's location, so a child bound to any other
|
|
31
|
-
* directory would be shaped (and guarded) by a different instance.
|
|
32
|
-
*/
|
|
33
|
-
directory?: string;
|
|
34
31
|
}): HiddenChildLifecycle;
|
|
35
32
|
export {};
|
|
36
33
|
//# sourceMappingURL=hidden-child-native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hidden-child-native.d.ts","sourceRoot":"","sources":["../../src/v2/hidden-child-native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hidden-child-native.d.ts","sourceRoot":"","sources":["../../src/v2/hidden-child-native.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAGH,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAM5B,MAAM,uBAAuB,CAAC;AAM/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;;;GASG;AAEH,KAAK,aAAa,GAAG,WAAW,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAAC;AAInE,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAI9E;AAED,mEAAmE;AACnE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQzD;AAED,wBAAgB,0BAA0B,CACtC,IAAI,EAAE,eAAe,EACrB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE;IACL,EAAE,EAAE,QAAQ,CAAC;IACb,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,GACF,oBAAoB,CAoJtB"}
|
|
@@ -124,6 +124,8 @@ export interface HiddenChildLifecycle {
|
|
|
124
124
|
* Resolves once any cleanup this lifecycle does for a finished run is over; never rejects.
|
|
125
125
|
*/
|
|
126
126
|
finish(child: PersistedHiddenChild, retired: boolean): Promise<void>;
|
|
127
|
+
/** A retry can outlive the original timeout; never shorten its durable sweep protection. */
|
|
128
|
+
extendDeadline(child: PersistedHiddenChild, deadlineAt: number): void;
|
|
127
129
|
updateModel(child: PersistedHiddenChild, model: HiddenChildModel): PersistedHiddenChild;
|
|
128
130
|
markEverSettled(child: PersistedHiddenChild): PersistedHiddenChild;
|
|
129
131
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hidden-child-record.d.ts","sourceRoot":"","sources":["../../src/v2/hidden-child-record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,EAIH,KAAK,oBAAoB,EAI5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,8EAA8E;AAE9E,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,SAAS,GAAG,gBAAgB,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,I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