@retaw106/mmc-oc 2.4.0 → 2.6.0
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-c72brxe5.js → context-cfbjrr0n.js} +1636 -513
- package/dist/features/magic-context/compaction-marker.d.ts +34 -6
- package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
- package/dist/features/magic-context/message-index-async.d.ts +6 -2
- package/dist/features/magic-context/message-index-async.d.ts.map +1 -1
- package/dist/features/magic-context/message-index.d.ts +0 -26
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/search.d.ts +5 -1
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/session-decision-calibration.d.ts.map +1 -1
- package/dist/features/magic-context/session-retention.fixture.d.ts +4 -0
- package/dist/features/magic-context/session-retention.fixture.d.ts.map +1 -0
- package/dist/features/magic-context/storage-db.d.ts +2 -0
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-host-instruction-retention.d.ts +4 -0
- package/dist/features/magic-context/storage-host-instruction-retention.d.ts.map +1 -0
- package/dist/features/magic-context/storage-meta-persisted.d.ts +21 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-shared.d.ts +2 -2
- package/dist/features/magic-context/storage-meta-shared.d.ts.map +1 -1
- package/dist/features/magic-context/storage-native-replay.d.ts +2 -0
- package/dist/features/magic-context/storage-native-replay.d.ts.map +1 -1
- package/dist/features/magic-context/storage-session-tables.d.ts +5 -4
- package/dist/features/magic-context/storage-session-tables.d.ts.map +1 -1
- package/dist/features/magic-context/tool-definition-tokens.d.ts +113 -58
- package/dist/features/magic-context/tool-definition-tokens.d.ts.map +1 -1
- package/dist/features/magic-context/work-metrics.d.ts +5 -3
- package/dist/features/magic-context/work-metrics.d.ts.map +1 -1
- package/dist/hooks/magic-context/apply-operations.d.ts +32 -0
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/ask-answer-notice.d.ts +25 -0
- package/dist/hooks/magic-context/ask-answer-notice.d.ts.map +1 -0
- package/dist/hooks/magic-context/auto-search-hint.d.ts +3 -0
- package/dist/hooks/magic-context/auto-search-hint.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/channel2-delivery.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts +5 -5
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-publication.d.ts +14 -0
- package/dist/hooks/magic-context/compaction-marker-publication.d.ts.map +1 -0
- package/dist/hooks/magic-context/compaction-off-transition.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts +2 -2
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts +11 -0
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
- package/dist/hooks/magic-context/diagnostic-log-state.d.ts +4 -0
- package/dist/hooks/magic-context/diagnostic-log-state.d.ts.map +1 -0
- package/dist/hooks/magic-context/emergency-drop.d.ts.map +1 -1
- package/dist/hooks/magic-context/file-token-coverage.d.ts +11 -0
- package/dist/hooks/magic-context/file-token-coverage.d.ts.map +1 -0
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts +11 -3
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-history-wait.d.ts +16 -0
- package/dist/hooks/magic-context/historian-history-wait.d.ts.map +1 -0
- package/dist/hooks/magic-context/history-boundary-repair.d.ts +1 -1
- package/dist/hooks/magic-context/history-boundary-repair.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/host-served-rows.d.ts +10 -0
- package/dist/hooks/magic-context/host-served-rows.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-measured-request.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts +3 -1
- package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-replay-fit.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-replay.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-slot.d.ts +3 -1
- package/dist/hooks/magic-context/lkg-slot.d.ts.map +1 -1
- package/dist/hooks/magic-context/nudge-evaluation-log.d.ts +3 -0
- package/dist/hooks/magic-context/nudge-evaluation-log.d.ts.map +1 -0
- package/dist/hooks/magic-context/pass-outcome.d.ts +2 -0
- package/dist/hooks/magic-context/pass-outcome.d.ts.map +1 -1
- package/dist/hooks/magic-context/pending-drop-eligibility.d.ts.map +1 -1
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts +2 -0
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-db.d.ts +8 -2
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-raw.d.ts +20 -0
- package/dist/hooks/magic-context/read-session-raw.d.ts.map +1 -1
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts +3 -3
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -1
- package/dist/hooks/magic-context/signed-thinking-fit-snapshot.d.ts +42 -0
- package/dist/hooks/magic-context/signed-thinking-fit-snapshot.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-date-refresh.d.ts +3 -2
- package/dist/hooks/magic-context/system-date-refresh.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-prompt-sticky-date.d.ts +4 -0
- package/dist/hooks/magic-context/system-prompt-sticky-date.d.ts.map +1 -0
- package/dist/hooks/magic-context/tag-content-primitives.d.ts +1 -1
- package/dist/hooks/magic-context/tag-content-primitives.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +17 -2
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/text-complete.d.ts +1 -1
- package/dist/hooks/magic-context/text-complete.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-drop-target.d.ts +3 -2
- package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts +1 -0
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +6 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-stage-logger.d.ts +3 -0
- package/dist/hooks/magic-context/transform-stage-logger.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +4 -2
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-27ddyx39.js → index-1np16gxq.js} +1 -1
- package/dist/{index-ykq24x1n.js → index-8rmt6s4f.js} +78 -32
- package/dist/{index-dwh99z66.js → index-pte3cfs9.js} +194 -5
- package/dist/{index-r7s7d350.js → index-s3ebcy63.js} +1 -1
- package/dist/{index-48e9znrc.js → index-t0zx3tgz.js} +481 -109
- package/dist/{index-kahkxcqw.js → index-xk1dz6q9.js} +870 -315
- package/dist/index.js +2 -2
- package/dist/{message-time-backfill-j96x1sab.js → message-time-backfill-g9py24yt.js} +1 -1
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/plugin/subagent-tool-policy.d.ts +4 -0
- package/dist/plugin/subagent-tool-policy.d.ts.map +1 -1
- package/dist/{read-session-chunk-t8bg6wkz.js → read-session-chunk-2s8x6xps.js} +3 -3
- package/dist/{recomp-orchestrator-k760qy1n.js → recomp-orchestrator-51xyaexp.js} +6 -6
- package/dist/{send-session-notification-njjf3b4s.js → send-session-notification-vdppp5x6.js} +3 -3
- package/dist/shared/model-suggestion-retry.d.ts +2 -0
- package/dist/shared/model-suggestion-retry.d.ts.map +1 -1
- package/dist/shared/rpc-discovery-cleanup.d.ts +3 -0
- package/dist/shared/rpc-discovery-cleanup.d.ts.map +1 -0
- package/dist/shared/rpc-server.d.ts +2 -0
- package/dist/shared/rpc-server.d.ts.map +1 -1
- package/dist/shared/search-text.d.ts +8 -0
- package/dist/shared/search-text.d.ts.map +1 -0
- package/dist/shared/sqlite.d.ts +6 -1
- package/dist/shared/sqlite.d.ts.map +1 -1
- package/dist/shared/storage-file-mutex.d.ts.map +1 -1
- package/dist/shared/system-directive.d.ts +2 -0
- package/dist/shared/system-directive.d.ts.map +1 -1
- package/dist/shared/tag-transcript.d.ts +2 -0
- package/dist/shared/tag-transcript.d.ts.map +1 -1
- package/dist/shared/transcript.d.ts +3 -1
- package/dist/shared/transcript.d.ts.map +1 -1
- package/dist/tools/ctx-memory/tools.d.ts.map +1 -1
- package/dist/tools/ctx-note/tools.d.ts.map +1 -1
- package/dist/tools/parameter-descriptions.d.ts +6 -6
- package/dist/tools/parameter-descriptions.d.ts.map +1 -1
- package/dist/v2/fold/native-replay.d.ts +11 -2
- package/dist/v2/fold/native-replay.d.ts.map +1 -1
- package/dist/v2/fold/policy.d.ts.map +1 -1
- package/dist/v2/fold/restore.d.ts.map +1 -1
- package/dist/v2/hooks/context.d.ts +4 -0
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/generate.d.ts +36 -1
- package/dist/v2/hooks/generate.d.ts.map +1 -1
- package/dist/v2/hooks/lkg-system.d.ts +35 -4
- package/dist/v2/hooks/lkg-system.d.ts.map +1 -1
- package/dist/v2/hooks/payload.d.ts +10 -1
- package/dist/v2/hooks/payload.d.ts.map +1 -1
- package/dist/v2/hooks/store.d.ts +2 -0
- package/dist/v2/hooks/store.d.ts.map +1 -1
- package/dist/v2/hooks/types.d.ts +12 -0
- package/dist/v2/hooks/types.d.ts.map +1 -1
- package/dist/v2/message-times.d.ts +17 -0
- package/dist/v2/message-times.d.ts.map +1 -0
- package/dist/v2/server.js +4692 -2394
- package/dist/v2/store-reader.d.ts +21 -0
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/web/main.js +307 -12
- package/dist/{wrapup-orchestrator-b2gswatj.js → wrapup-orchestrator-g0mww1h4.js} +6 -6
- package/package.json +1 -1
- package/src/config/latch-permanence-guard.test.ts +4 -5
- package/src/shared/model-suggestion-retry.test.ts +52 -0
- package/src/shared/model-suggestion-retry.ts +8 -3
- package/src/shared/prompt-surface-a1-golden.md +6 -7
- package/src/shared/rpc-discovery-cleanup.test.ts +125 -0
- package/src/shared/rpc-discovery-cleanup.ts +57 -0
- package/src/shared/rpc-server.ts +36 -13
- package/src/shared/search-text.test.ts +30 -0
- package/src/shared/search-text.ts +62 -0
- package/src/shared/sqlite-transaction-mode-guard.test.ts +2 -0
- package/src/shared/sqlite-turn-deadline.test.ts +286 -0
- package/src/shared/sqlite.ts +237 -9
- package/src/shared/storage-file-mutex.test.ts +51 -2
- package/src/shared/storage-file-mutex.ts +11 -1
- package/src/shared/system-directive.test.ts +37 -0
- package/src/shared/system-directive.ts +19 -1
- package/src/shared/tag-transcript.ts +63 -8
- package/src/shared/transcript.ts +1 -1
- package/src/shared/write-transaction-attribution.test.ts +1 -6
- package/dist/features/magic-context/message-index-sweep.d.ts +0 -11
- package/dist/features/magic-context/message-index-sweep.d.ts.map +0 -1
|
@@ -148,6 +148,14 @@ export declare class V2StoreReaderPool {
|
|
|
148
148
|
closeWhenIdle(timeoutMs: number): Promise<boolean>;
|
|
149
149
|
private finishClose;
|
|
150
150
|
}
|
|
151
|
+
export declare function messageTimesQuery(count: number, withVersions?: boolean): string;
|
|
152
|
+
export interface V2MessageTimeVersion {
|
|
153
|
+
id: string;
|
|
154
|
+
type: string;
|
|
155
|
+
seq: number;
|
|
156
|
+
created: number | null;
|
|
157
|
+
updated: number | null;
|
|
158
|
+
}
|
|
151
159
|
/** Opens an existing store read-only; missing/corrupt stores propagate errors, never an empty history. */
|
|
152
160
|
export declare class V2StoreReader {
|
|
153
161
|
private readonly path;
|
|
@@ -184,6 +192,8 @@ export declare class V2StoreReader {
|
|
|
184
192
|
*/
|
|
185
193
|
messagePage(sessionID: string, afterOrdinal: number, limit: number, finalWatermark: number, after?: RawMessageOrdinalAnchor): StoreRow[];
|
|
186
194
|
messageCount(sessionID: string): number;
|
|
195
|
+
/** Count only appended conversational rows, using the host's session/sequence index. */
|
|
196
|
+
messageCountAfterSequence(sessionID: string, after: number, through: number): number;
|
|
187
197
|
/**
|
|
188
198
|
* One page of host sessions with the directory each was created in, in
|
|
189
199
|
* ascending id order after `afterSessionID` (exclusive; null starts at the
|
|
@@ -204,6 +214,15 @@ export declare class V2StoreReader {
|
|
|
204
214
|
storedRowsAfter(sessionID: string, after: number): number;
|
|
205
215
|
storedMessageCount(sessionID: string): number;
|
|
206
216
|
messageById(sessionID: string, id: string): StoreRow | null;
|
|
217
|
+
/** Check membership and row revisions without loading or parsing message data. */
|
|
218
|
+
messageTimeVersions(sessionID: string, ids: readonly string[], span?: {
|
|
219
|
+
first: number;
|
|
220
|
+
last: number;
|
|
221
|
+
}): Map<string, V2MessageTimeVersion>;
|
|
222
|
+
messageTimes(sessionID: string, ids: readonly string[], versions?: Map<string, V2MessageTimeVersion>): Map<string, {
|
|
223
|
+
created?: number;
|
|
224
|
+
completed?: number;
|
|
225
|
+
}>;
|
|
207
226
|
messageExistsById(sessionID: string, id: string): boolean;
|
|
208
227
|
messageOrdinalById(sessionID: string, id: string): number | null;
|
|
209
228
|
messageIdOrdinals(sessionID: string, fromOrdinal: number, toOrdinal: number): Map<string, number>;
|
|
@@ -219,6 +238,8 @@ export declare class V2StoreReader {
|
|
|
219
238
|
spanRowStamps(sessionID: string, after: number, through: number): Map<number, string>;
|
|
220
239
|
/** Conversational rows at or before `throughSeq`, newest first. */
|
|
221
240
|
rawRowsThrough(sessionID: string, throughSeq: number, limit: number): StoreRow[];
|
|
241
|
+
/** Instruction updates covered by a checkpoint, in host sequence order. */
|
|
242
|
+
instructionRowsThrough(sessionID: string, throughSeq: number): StoreRow[];
|
|
222
243
|
sequenceForId(sessionID: string, id: string | null | undefined): number | undefined;
|
|
223
244
|
/** Native synthetics are user-shaped on the wire; their store kind is unambiguous. */
|
|
224
245
|
syntheticMessageIDs(sessionID: string): Set<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-reader.d.ts","sourceRoot":"","sources":["../../src/v2/store-reader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAMvF,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,yFAAyF;AACzF,wBAAgB,sBAAsB,CAClC,OAAO,EAAE,MAAM,EACf,GAAG,GAAE,MAAM,CAAC,UAAwB,GACrC,MAAM,CAER;AAED,0EAA0E;AAC1E,wBAAgB,cAAc,CAC1B,QAAQ,EAAE,MAAM,EAChB,OAAO,SAAW,EAClB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACrC,MAAM,CAER;AAGD,MAAM,MAAM,WAAW,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,mBAAmB,GACnB,MAAM,GACN,WAAW,GACX,QAAQ,GACR,OAAO,GACP,OAAO,GACP,WAAW,GACX,YAAY,GACZ,MAAM,CAAC;AAEb,eAAO,MAAM,iBAAiB,yEAOa,CAAC;AAI5C,eAAO,MAAM,mBAAmB,QAkBP,CA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SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,SAAS;IAUrE,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,SAAS;IAU3D,8EAA8E;IAC9E,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,EAAE;IAWrC;;;;OAIG;IACH,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,EAAE;IAItC,OAAO,CAAC,GAAG;CAcd"}
|
package/dist/web/main.js
CHANGED
|
@@ -572,6 +572,174 @@ function topLevelCommaSegments(text) {
|
|
|
572
572
|
segments.push(text.slice(start));
|
|
573
573
|
return segments;
|
|
574
574
|
}
|
|
575
|
+
function literalBusyTimeout(sql) {
|
|
576
|
+
const head = BUSY_TIMEOUT_SETTER.exec(sql);
|
|
577
|
+
if (!head)
|
|
578
|
+
return;
|
|
579
|
+
const match = /^(?:=\s*|\(\s*)(?:'(-?\d+)'|"(-?\d+)"|(-?\d+))\s*\)?\s*;?\s*$/.exec(sql.slice(head[0].length));
|
|
580
|
+
if (!match)
|
|
581
|
+
return;
|
|
582
|
+
const value = Number(match[1] ?? match[2] ?? match[3]);
|
|
583
|
+
return value < 0 ? 0 : value <= 2147483647 ? value : undefined;
|
|
584
|
+
}
|
|
585
|
+
function busyTimeoutStatements(sql) {
|
|
586
|
+
const statements = [];
|
|
587
|
+
let statement = "";
|
|
588
|
+
let quote = "";
|
|
589
|
+
for (let i = 0;i < sql.length; i++) {
|
|
590
|
+
const char = sql[i];
|
|
591
|
+
if (quote) {
|
|
592
|
+
statement += char;
|
|
593
|
+
if (char === quote) {
|
|
594
|
+
if (sql[i + 1] === quote)
|
|
595
|
+
statement += sql[++i];
|
|
596
|
+
else
|
|
597
|
+
quote = "";
|
|
598
|
+
}
|
|
599
|
+
} else if (char === "'" || char === '"' || char === "`" || char === "[") {
|
|
600
|
+
quote = char === "[" ? "]" : char;
|
|
601
|
+
statement += char;
|
|
602
|
+
} else if (char === "-" && sql[i + 1] === "-") {
|
|
603
|
+
while (i + 1 < sql.length && sql[i + 1] !== `
|
|
604
|
+
`)
|
|
605
|
+
i++;
|
|
606
|
+
statement += " ";
|
|
607
|
+
} else if (char === "/" && sql[i + 1] === "*") {
|
|
608
|
+
i += 2;
|
|
609
|
+
while (i < sql.length && !(sql[i] === "*" && sql[i + 1] === "/"))
|
|
610
|
+
i++;
|
|
611
|
+
i++;
|
|
612
|
+
statement += " ";
|
|
613
|
+
} else if (char === ";") {
|
|
614
|
+
statements.push(statement);
|
|
615
|
+
statement = "";
|
|
616
|
+
} else
|
|
617
|
+
statement += char;
|
|
618
|
+
}
|
|
619
|
+
statements.push(statement);
|
|
620
|
+
return statements.filter((part) => part.trim().length > 0);
|
|
621
|
+
}
|
|
622
|
+
function installNativeDeadlineRouting(db) {
|
|
623
|
+
const rawExec = db.exec.bind(db);
|
|
624
|
+
const rawPrepare = db.prepare.bind(db);
|
|
625
|
+
const readTimeout = () => {
|
|
626
|
+
const statement = rawPrepare("PRAGMA busy_timeout");
|
|
627
|
+
try {
|
|
628
|
+
return Object.values(statement.get())[0];
|
|
629
|
+
} finally {
|
|
630
|
+
statement.finalize?.();
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
const timeoutState = { current: readTimeout() };
|
|
634
|
+
busyTimeoutStates.set(db, timeoutState);
|
|
635
|
+
const setBusyTimeout = (timeout) => {
|
|
636
|
+
rawExec(`PRAGMA busy_timeout=${timeout}`);
|
|
637
|
+
timeoutState.current = timeout;
|
|
638
|
+
};
|
|
639
|
+
const withinDeadline = (operation) => {
|
|
640
|
+
const deadline = nativeWaitScope?.getStore();
|
|
641
|
+
if (!deadline?.active || !deadline.remainingMs)
|
|
642
|
+
return operation();
|
|
643
|
+
const remaining = deadline.remainingMs();
|
|
644
|
+
if (remaining === Infinity)
|
|
645
|
+
return operation();
|
|
646
|
+
const previous = timeoutState.current;
|
|
647
|
+
const timeout = Math.min(previous, Math.max(0, Math.floor(remaining)));
|
|
648
|
+
if (timeout === previous)
|
|
649
|
+
return operation();
|
|
650
|
+
setBusyTimeout(timeout);
|
|
651
|
+
try {
|
|
652
|
+
return operation();
|
|
653
|
+
} finally {
|
|
654
|
+
setBusyTimeout(previous);
|
|
655
|
+
}
|
|
656
|
+
};
|
|
657
|
+
Object.defineProperty(db, "exec", {
|
|
658
|
+
configurable: true,
|
|
659
|
+
writable: true,
|
|
660
|
+
value: (sql) => {
|
|
661
|
+
const parts = /\bbusy_timeout\b/i.test(sql) ? busyTimeoutStatements(sql) : [];
|
|
662
|
+
if (parts.length === 1 && BUSY_TIMEOUT_QUERY.test(parts[0]))
|
|
663
|
+
return rawExec(sql);
|
|
664
|
+
const singleSetter = parts.length === 1 && BUSY_TIMEOUT_SETTER.test(parts[0]);
|
|
665
|
+
const setting = singleSetter ? literalBusyTimeout(parts[0]) : undefined;
|
|
666
|
+
if (singleSetter) {
|
|
667
|
+
const result = rawExec(sql);
|
|
668
|
+
timeoutState.current = setting ?? readTimeout();
|
|
669
|
+
return result;
|
|
670
|
+
}
|
|
671
|
+
if (!/\bbusy_timeout\b/i.test(sql))
|
|
672
|
+
return withinDeadline(() => rawExec(sql));
|
|
673
|
+
const setters = parts.filter((part) => BUSY_TIMEOUT_SETTER.test(part));
|
|
674
|
+
return withinDeadline(() => {
|
|
675
|
+
try {
|
|
676
|
+
const result = rawExec(sql);
|
|
677
|
+
if (setters.length)
|
|
678
|
+
timeoutState.current = literalBusyTimeout(setters[setters.length - 1]) ?? readTimeout();
|
|
679
|
+
return result;
|
|
680
|
+
} catch (error) {
|
|
681
|
+
if (setters.length)
|
|
682
|
+
timeoutState.current = readTimeout();
|
|
683
|
+
throw error;
|
|
684
|
+
}
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
const nativePrepare = (sql) => BUSY_TIMEOUT_QUERY.test(sql) || BUSY_TIMEOUT_SETTER.test(sql) ? rawPrepare(sql) : withinDeadline(() => rawPrepare(sql));
|
|
689
|
+
Object.defineProperty(db, "prepare", {
|
|
690
|
+
configurable: true,
|
|
691
|
+
writable: true,
|
|
692
|
+
value: (sql) => {
|
|
693
|
+
const statement = nativePrepare(sql);
|
|
694
|
+
const normalized = /\bbusy_timeout\b/i.test(sql) ? busyTimeoutStatements(sql)[0] ?? sql : sql;
|
|
695
|
+
const setting = literalBusyTimeout(normalized);
|
|
696
|
+
const timeoutSetter = BUSY_TIMEOUT_SETTER.test(normalized);
|
|
697
|
+
const timeoutQuery = BUSY_TIMEOUT_QUERY.test(normalized);
|
|
698
|
+
if (timeoutSetter)
|
|
699
|
+
timeoutState.current = setting ?? readTimeout();
|
|
700
|
+
for (const method of ["run", "get", "all", "values"]) {
|
|
701
|
+
const execute = statement[method]?.bind(statement);
|
|
702
|
+
if (!execute)
|
|
703
|
+
continue;
|
|
704
|
+
Object.defineProperty(statement, method, {
|
|
705
|
+
configurable: true,
|
|
706
|
+
value: (...args) => {
|
|
707
|
+
if (timeoutQuery)
|
|
708
|
+
return execute(...args);
|
|
709
|
+
if (!timeoutSetter)
|
|
710
|
+
return withinDeadline(() => execute(...args));
|
|
711
|
+
const result = execute(...args);
|
|
712
|
+
timeoutState.current = readTimeout();
|
|
713
|
+
return result;
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
if (typeof statement.iterate === "function") {
|
|
718
|
+
const iterate = statement.iterate.bind(statement);
|
|
719
|
+
Object.defineProperty(statement, "iterate", {
|
|
720
|
+
configurable: true,
|
|
721
|
+
value: (...args) => {
|
|
722
|
+
const iterator = !timeoutSetter && !timeoutQuery ? withinDeadline(() => iterate(...args)) : iterate(...args);
|
|
723
|
+
const next = iterator.next.bind(iterator);
|
|
724
|
+
if (timeoutSetter)
|
|
725
|
+
timeoutState.current = readTimeout();
|
|
726
|
+
iterator.next = () => {
|
|
727
|
+
if (timeoutQuery)
|
|
728
|
+
return next();
|
|
729
|
+
if (!timeoutSetter)
|
|
730
|
+
return withinDeadline(next);
|
|
731
|
+
const result = next();
|
|
732
|
+
timeoutState.current = readTimeout();
|
|
733
|
+
return result;
|
|
734
|
+
};
|
|
735
|
+
return iterator;
|
|
736
|
+
}
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
return statement;
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
}
|
|
575
743
|
function installTransactionRouting(db, readonly) {
|
|
576
744
|
const nativeExec = db.exec.bind(db);
|
|
577
745
|
Object.defineProperty(db, "exec", {
|
|
@@ -709,7 +877,7 @@ function wrapRemainingTagWriteForms(statement) {
|
|
|
709
877
|
});
|
|
710
878
|
}
|
|
711
879
|
}
|
|
712
|
-
function trackSqliteConnection(db, filename, options) {
|
|
880
|
+
function trackSqliteConnection(db, filename, options, turnDeadlines = false) {
|
|
713
881
|
const originalClose = db.close.bind(db);
|
|
714
882
|
const sequence = nextSqliteConnectionSequence++;
|
|
715
883
|
const metadata = {
|
|
@@ -717,6 +885,8 @@ function trackSqliteConnection(db, filename, options) {
|
|
|
717
885
|
filename: typeof filename === "string" ? filename : Buffer.isBuffer(filename) ? "<buffer>" : ":memory:",
|
|
718
886
|
readonly: Boolean(options) && typeof options === "object" && (options.readonly === true || options.readOnly === true)
|
|
719
887
|
};
|
|
888
|
+
if (turnDeadlines)
|
|
889
|
+
installNativeDeadlineRouting(db);
|
|
720
890
|
installTransactionRouting(db, metadata.readonly);
|
|
721
891
|
Object.defineProperty(db, "close", {
|
|
722
892
|
configurable: true,
|
|
@@ -769,6 +939,11 @@ function pragmaValue(db, name) {
|
|
|
769
939
|
return row[name] ?? Object.values(row)[0];
|
|
770
940
|
}
|
|
771
941
|
function pragmaNumber(db, name) {
|
|
942
|
+
if (name === "busy_timeout") {
|
|
943
|
+
const state = busyTimeoutStates.get(db);
|
|
944
|
+
if (state)
|
|
945
|
+
return state.current;
|
|
946
|
+
}
|
|
772
947
|
try {
|
|
773
948
|
const value = pragmaValue(db, name);
|
|
774
949
|
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
@@ -957,7 +1132,7 @@ function isInTransaction(db) {
|
|
|
957
1132
|
const candidate = db;
|
|
958
1133
|
return candidate.inTransaction === true || candidate.isTransaction === true;
|
|
959
1134
|
}
|
|
960
|
-
var resourceRoot, reportSlowPrivilegedWrite, sqliteDiagnosticSink, sqliteDiagnosticHost = () => "unknown", bunSpec, nodeSpec, SqliteRuntimeUnavailableError, detectedRuntime, isBun, sqliteModule, DatabaseImpl, trackedSqliteConnections, nextSqliteConnectionSequence = 1, TAG_COLUMNS_OUTSIDE_IDENTITY, tagIdentityWriteGeneration = 0, TrackedDatabase, Database, statementOwners, FIRST_PRUNE_AT = 256, privilegeDepth, transformPassScope, admissionScope, backgroundWriterScope, SqliteAcquisitionBusyError, SHORT_BUSY_TIMEOUT_MS = 25, SLOW_WRITER_LOG_MS = 100, WRITER_TRANSACTION_END, writerAcquisitionScope, openWriterTransactions, indexCoordinationKey, indexCoordinationHeap, indexCoordinationBuffer, indexCoordinationState;
|
|
1135
|
+
var resourceRoot, reportSlowPrivilegedWrite, sqliteDiagnosticSink, sqliteDiagnosticHost = () => "unknown", bunSpec, nodeSpec, SqliteRuntimeUnavailableError, detectedRuntime, isBun, sqliteModule, DatabaseImpl, trackedSqliteConnections, nextSqliteConnectionSequence = 1, TAG_COLUMNS_OUTSIDE_IDENTITY, tagIdentityWriteGeneration = 0, busyTimeoutStates, BUSY_TIMEOUT_QUERY, BUSY_TIMEOUT_SETTER, TrackedDatabase, Database, statementOwners, FIRST_PRUNE_AT = 256, privilegeDepth, nativeWaitScope, transformPassScope, admissionScope, backgroundWriterScope, SqliteAcquisitionBusyError, SHORT_BUSY_TIMEOUT_MS = 25, SLOW_WRITER_LOG_MS = 100, WRITER_TRANSACTION_END, writerAcquisitionScope, openWriterTransactions, indexCoordinationKey, indexCoordinationHeap, indexCoordinationBuffer, indexCoordinationState;
|
|
961
1136
|
var init_sqlite = __esm(async () => {
|
|
962
1137
|
resourceRoot = new AsyncResource("magic-context:root");
|
|
963
1138
|
bunSpec = "bun:" + "sqlite";
|
|
@@ -991,6 +1166,9 @@ var init_sqlite = __esm(async () => {
|
|
|
991
1166
|
"tool_name",
|
|
992
1167
|
"harness"
|
|
993
1168
|
]);
|
|
1169
|
+
busyTimeoutStates = new WeakMap;
|
|
1170
|
+
BUSY_TIMEOUT_QUERY = /^\s*PRAGMA\s+(?:(?:\w+|"[^"]+"|`[^`]+`|\[[^\]]+\])\s*\.\s*)?(?:busy_timeout|"busy_timeout"|`busy_timeout`|\[busy_timeout\])\s*;?\s*$/i;
|
|
1171
|
+
BUSY_TIMEOUT_SETTER = /^\s*PRAGMA\s+(?:(?:\w+|"[^"]+"|`[^`]+`|\[[^\]]+\])\s*\.\s*)?(?:busy_timeout|"busy_timeout"|`busy_timeout`|\[busy_timeout\])\s*(?==|\()/i;
|
|
994
1172
|
TrackedDatabase = new Proxy(DatabaseImpl, {
|
|
995
1173
|
construct(target, args) {
|
|
996
1174
|
const db = inRootAsyncContext(() => Reflect.construct(target, args, target));
|
|
@@ -1181,12 +1359,58 @@ var init_read_session_formatting = __esm(() => {
|
|
|
1181
1359
|
promptTokenCounts = new Map;
|
|
1182
1360
|
PROMPT_TOKEN_COUNT_BYTES = 8 * 1024 * 1024;
|
|
1183
1361
|
});
|
|
1362
|
+
|
|
1363
|
+
// src/shared/bounded-session-map.ts
|
|
1364
|
+
class BoundedSessionMap {
|
|
1365
|
+
maxEntries;
|
|
1366
|
+
store = new Map;
|
|
1367
|
+
constructor(maxEntries) {
|
|
1368
|
+
if (!Number.isFinite(maxEntries) || maxEntries < 1) {
|
|
1369
|
+
throw new Error(`BoundedSessionMap: maxEntries must be >= 1, got ${maxEntries}`);
|
|
1370
|
+
}
|
|
1371
|
+
this.maxEntries = maxEntries;
|
|
1372
|
+
}
|
|
1373
|
+
get(sessionId) {
|
|
1374
|
+
const value = this.store.get(sessionId);
|
|
1375
|
+
if (value === undefined)
|
|
1376
|
+
return;
|
|
1377
|
+
this.store.delete(sessionId);
|
|
1378
|
+
this.store.set(sessionId, value);
|
|
1379
|
+
return value;
|
|
1380
|
+
}
|
|
1381
|
+
peek(sessionId) {
|
|
1382
|
+
return this.store.get(sessionId);
|
|
1383
|
+
}
|
|
1384
|
+
has(sessionId) {
|
|
1385
|
+
return this.store.has(sessionId);
|
|
1386
|
+
}
|
|
1387
|
+
set(sessionId, value) {
|
|
1388
|
+
if (this.store.has(sessionId)) {
|
|
1389
|
+
this.store.delete(sessionId);
|
|
1390
|
+
} else if (this.store.size >= this.maxEntries) {
|
|
1391
|
+
const oldest = this.store.keys().next().value;
|
|
1392
|
+
if (oldest !== undefined)
|
|
1393
|
+
this.store.delete(oldest);
|
|
1394
|
+
}
|
|
1395
|
+
this.store.set(sessionId, value);
|
|
1396
|
+
}
|
|
1397
|
+
delete(sessionId) {
|
|
1398
|
+
return this.store.delete(sessionId);
|
|
1399
|
+
}
|
|
1400
|
+
clear() {
|
|
1401
|
+
this.store.clear();
|
|
1402
|
+
}
|
|
1403
|
+
get size() {
|
|
1404
|
+
return this.store.size;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1184
1407
|
// src/features/magic-context/tool-definition-tokens.ts
|
|
1185
|
-
var
|
|
1408
|
+
var ACTIVITY_WINDOW_MS, routes, sessionFlights;
|
|
1186
1409
|
var init_tool_definition_tokens = __esm(() => {
|
|
1187
1410
|
init_read_session_formatting();
|
|
1188
|
-
|
|
1189
|
-
|
|
1411
|
+
ACTIVITY_WINDOW_MS = 10 * 60000;
|
|
1412
|
+
routes = new Map;
|
|
1413
|
+
sessionFlights = new BoundedSessionMap(1000);
|
|
1190
1414
|
});
|
|
1191
1415
|
|
|
1192
1416
|
// src/shared/opencode-db-path.ts
|
|
@@ -4167,6 +4391,13 @@ function closeConnection(connection) {
|
|
|
4167
4391
|
counters.readersClosed += 1;
|
|
4168
4392
|
}
|
|
4169
4393
|
}
|
|
4394
|
+
function messageTimesQuery(count, withVersions = false) {
|
|
4395
|
+
return `SELECT id, COALESCE(time_created, json_extract(data, '$.time.created')) AS created,
|
|
4396
|
+
json_extract(data, '$.time.completed') AS completed
|
|
4397
|
+
${withVersions ? ", type, seq, time_created AS version_created, time_updated AS version_updated" : ""}
|
|
4398
|
+
FROM session_message WHERE +session_id = ? AND id IN (${Array.from({ length: count }, () => "?").join(",")})`;
|
|
4399
|
+
}
|
|
4400
|
+
|
|
4170
4401
|
class V2StoreReader {
|
|
4171
4402
|
path;
|
|
4172
4403
|
pool;
|
|
@@ -4262,6 +4493,12 @@ class V2StoreReader {
|
|
|
4262
4493
|
return typeof row?.count === "number" ? row.count : 0;
|
|
4263
4494
|
});
|
|
4264
4495
|
}
|
|
4496
|
+
messageCountAfterSequence(sessionID, after, through) {
|
|
4497
|
+
const rawTypes = RAW_MESSAGE_TYPES.map(() => "?").join(", ");
|
|
4498
|
+
const row = this.prepare(`SELECT COUNT(*) AS count FROM session_message
|
|
4499
|
+
WHERE session_id = ? AND seq > ? AND seq <= ? AND type IN (${rawTypes})`).get(sessionID, after, through, ...RAW_MESSAGE_TYPES);
|
|
4500
|
+
return typeof row?.count === "number" ? row.count : 0;
|
|
4501
|
+
}
|
|
4265
4502
|
sessionDirectoryPage(afterSessionID, limit) {
|
|
4266
4503
|
const rows = this.prepare(`SELECT id, COALESCE(directory, '') AS directory FROM session_v2
|
|
4267
4504
|
WHERE id > ? ORDER BY id ASC LIMIT ?`).all(afterSessionID ?? "", limit);
|
|
@@ -4295,6 +4532,49 @@ class V2StoreReader {
|
|
|
4295
4532
|
return row ? decode(row) : null;
|
|
4296
4533
|
});
|
|
4297
4534
|
}
|
|
4535
|
+
messageTimeVersions(sessionID, ids, span) {
|
|
4536
|
+
const versions = new Map;
|
|
4537
|
+
if (ids.length > 0 && span && span.last - span.first < ids.length * 2) {
|
|
4538
|
+
const wanted = new Set(ids);
|
|
4539
|
+
const rows = this.prepare(`SELECT id, type, seq, time_created AS created, time_updated AS updated
|
|
4540
|
+
FROM session_message WHERE session_id = ? AND seq >= ? AND seq <= ?`).all(sessionID, span.first, span.last);
|
|
4541
|
+
for (const row of rows)
|
|
4542
|
+
if (wanted.has(row.id))
|
|
4543
|
+
versions.set(row.id, row);
|
|
4544
|
+
for (const [id, version] of this.messageTimeVersions(sessionID, ids.filter((id) => !versions.has(id))))
|
|
4545
|
+
versions.set(id, version);
|
|
4546
|
+
return versions;
|
|
4547
|
+
}
|
|
4548
|
+
for (let offset = 0;offset < ids.length; offset += 500) {
|
|
4549
|
+
const batch = ids.slice(offset, offset + 500);
|
|
4550
|
+
const rows = this.prepare(`SELECT id, type, seq, time_created AS created, time_updated AS updated
|
|
4551
|
+
FROM session_message WHERE +session_id = ? AND id IN (${batch.map(() => "?").join(",")})`).all(sessionID, ...batch);
|
|
4552
|
+
for (const row of rows)
|
|
4553
|
+
versions.set(row.id, row);
|
|
4554
|
+
}
|
|
4555
|
+
return versions;
|
|
4556
|
+
}
|
|
4557
|
+
messageTimes(sessionID, ids, versions) {
|
|
4558
|
+
const times = new Map;
|
|
4559
|
+
for (let offset = 0;offset < ids.length; offset += 500) {
|
|
4560
|
+
const batch = ids.slice(offset, offset + 500);
|
|
4561
|
+
const rows = this.prepare(messageTimesQuery(batch.length, versions !== undefined)).all(sessionID, ...batch);
|
|
4562
|
+
for (const row of rows) {
|
|
4563
|
+
times.set(row.id, {
|
|
4564
|
+
created: typeof row.created === "number" ? row.created : undefined,
|
|
4565
|
+
completed: typeof row.completed === "number" ? row.completed : undefined
|
|
4566
|
+
});
|
|
4567
|
+
versions?.set(row.id, {
|
|
4568
|
+
id: row.id,
|
|
4569
|
+
type: row.type,
|
|
4570
|
+
seq: row.seq,
|
|
4571
|
+
created: row.version_created,
|
|
4572
|
+
updated: row.version_updated
|
|
4573
|
+
});
|
|
4574
|
+
}
|
|
4575
|
+
}
|
|
4576
|
+
return times;
|
|
4577
|
+
}
|
|
4298
4578
|
messageExistsById(sessionID, id) {
|
|
4299
4579
|
return trackDecodeOperation("messageExistsById", () => {
|
|
4300
4580
|
const rawTypes = RAW_MESSAGE_TYPES.map(() => "?").join(", ");
|
|
@@ -4380,6 +4660,14 @@ class V2StoreReader {
|
|
|
4380
4660
|
ORDER BY seq DESC LIMIT ?`).all(sessionID, ...RAW_MESSAGE_TYPES, throughSeq, limit).map(decode);
|
|
4381
4661
|
});
|
|
4382
4662
|
}
|
|
4663
|
+
instructionRowsThrough(sessionID, throughSeq) {
|
|
4664
|
+
return trackDecodeOperation("instructionRowsThrough", () => {
|
|
4665
|
+
if (!Number.isSafeInteger(throughSeq))
|
|
4666
|
+
throw new Error("Invalid seq upper bound");
|
|
4667
|
+
return this.prepare(`SELECT id, session_id, type, seq, time_created, data FROM session_message
|
|
4668
|
+
WHERE session_id = ? AND type = 'system' AND seq <= ? ORDER BY seq ASC`).all(sessionID, throughSeq).map(decode);
|
|
4669
|
+
});
|
|
4670
|
+
}
|
|
4383
4671
|
sequenceForId(sessionID, id) {
|
|
4384
4672
|
if (!id)
|
|
4385
4673
|
return;
|
|
@@ -5322,24 +5610,31 @@ ${data.output?.output ?? ""}`
|
|
|
5322
5610
|
const sameModel = sameProvider && previousModel?.id === model.id;
|
|
5323
5611
|
const reuse = sameModel && data.error === undefined;
|
|
5324
5612
|
const metadata = (state) => state === undefined ? undefined : { [model.providerID]: state };
|
|
5613
|
+
const reasoningInterrupted = data.content?.some((part) => part.type === "reasoning" && part.time !== undefined && part.time.completed === undefined);
|
|
5325
5614
|
const content = [];
|
|
5326
5615
|
const results = [];
|
|
5327
5616
|
for (const part of data.content ?? []) {
|
|
5617
|
+
let native = "native" in part ? part.native : part.type === "tool" ? part.providerState : part.state;
|
|
5618
|
+
if (part.type === "tool" && part.providerResultState !== null && typeof part.providerResultState === "object" && !Array.isArray(part.providerResultState))
|
|
5619
|
+
native = {
|
|
5620
|
+
...native !== null && typeof native === "object" && !Array.isArray(native) ? native : {},
|
|
5621
|
+
...part.providerResultState
|
|
5622
|
+
};
|
|
5328
5623
|
if (part.type === "text") {
|
|
5329
5624
|
if (part.text !== "")
|
|
5330
5625
|
content.push({
|
|
5331
5626
|
type: "text",
|
|
5332
5627
|
text: part.text,
|
|
5333
|
-
providerMetadata: reuse ? metadata(
|
|
5628
|
+
providerMetadata: reuse ? metadata(native) : undefined
|
|
5334
5629
|
});
|
|
5335
5630
|
continue;
|
|
5336
5631
|
}
|
|
5337
5632
|
if (part.type === "reasoning") {
|
|
5338
|
-
if (part.text !== "" || reuse &&
|
|
5633
|
+
if (part.text !== "" || reuse && !reasoningInterrupted && native !== undefined)
|
|
5339
5634
|
content.push({
|
|
5340
|
-
type:
|
|
5635
|
+
type: data.error === undefined && !reasoningInterrupted ? "reasoning" : "text",
|
|
5341
5636
|
text: part.text,
|
|
5342
|
-
providerMetadata: reuse ? metadata(
|
|
5637
|
+
providerMetadata: reuse && !reasoningInterrupted ? metadata(native) : undefined
|
|
5343
5638
|
});
|
|
5344
5639
|
continue;
|
|
5345
5640
|
}
|
|
@@ -5358,7 +5653,7 @@ ${data.output?.output ?? ""}`
|
|
|
5358
5653
|
name: part.name,
|
|
5359
5654
|
input,
|
|
5360
5655
|
providerExecuted: part.executed,
|
|
5361
|
-
providerMetadata: toolReuse ? metadata(
|
|
5656
|
+
providerMetadata: toolReuse ? metadata(native) : undefined
|
|
5362
5657
|
});
|
|
5363
5658
|
if (!completed)
|
|
5364
5659
|
continue;
|
|
@@ -5369,7 +5664,7 @@ ${data.output?.output ?? ""}`
|
|
|
5369
5664
|
id: part.id,
|
|
5370
5665
|
name: part.name,
|
|
5371
5666
|
providerExecuted: part.executed,
|
|
5372
|
-
providerMetadata:
|
|
5667
|
+
providerMetadata: (part.executed === true ? sameProvider : reuse) ? metadata(native) : undefined,
|
|
5373
5668
|
result: state.status === "error" ? { error: state.error, content: toolContent } : single?.type === "text" ? { type: "text", value: single.text } : { type: "content", value: toolContent },
|
|
5374
5669
|
...state.status === "error" ? { resultType: "error" } : {}
|
|
5375
5670
|
};
|
|
@@ -5422,7 +5717,7 @@ function projectRawMessages(rows, ordinalFor) {
|
|
|
5422
5717
|
const message = {
|
|
5423
5718
|
id: row.id,
|
|
5424
5719
|
ordinal: ordinalFor(row, index),
|
|
5425
|
-
role: row.type === "assistant" ? "assistant" : "user",
|
|
5720
|
+
role: row.type === "assistant" ? "assistant" : row.type === "system" ? "system" : "user",
|
|
5426
5721
|
createdAt: row.time_created ?? row.data.time?.created,
|
|
5427
5722
|
parts: row.type === "assistant" ? (row.data.content ?? []).map((part) => {
|
|
5428
5723
|
if (part.type !== "tool")
|
|
@@ -21,11 +21,11 @@ import {
|
|
|
21
21
|
getActiveCompartmentRun,
|
|
22
22
|
markActiveCompartmentRunPublished,
|
|
23
23
|
registerActiveCompartmentRun
|
|
24
|
-
} from "./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
} from "./index-xk1dz6q9.js";
|
|
25
|
+
import"./index-pte3cfs9.js";
|
|
26
26
|
import"./index-x37vg474.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-t0zx3tgz.js";
|
|
28
|
+
import"./index-8rmt6s4f.js";
|
|
29
29
|
import {
|
|
30
30
|
pushNotification2
|
|
31
31
|
} from "./index-jdxxq8cz.js";
|
|
@@ -33,11 +33,11 @@ import"./index-5ty9rnbx.js";
|
|
|
33
33
|
import"./index-kmbme1v1.js";
|
|
34
34
|
import {
|
|
35
35
|
sendStatusNotification2
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-s3ebcy63.js";
|
|
37
37
|
import {
|
|
38
38
|
setRecompStarting2,
|
|
39
39
|
setRecompTerminal2
|
|
40
|
-
} from "./index-
|
|
40
|
+
} from "./index-1np16gxq.js";
|
|
41
41
|
import"./index-yjv8dpht.js";
|
|
42
42
|
|
|
43
43
|
// src/hooks/magic-context/wrapup-orchestrator.ts
|
package/package.json
CHANGED
|
@@ -62,11 +62,6 @@ const KNOWN_SLOTS: Record<string, KnownSlot> = {
|
|
|
62
62
|
classification: "VERDICT",
|
|
63
63
|
reason: "Saved: getActiveCooldown deletes an expired entry and forces a new git probe after five minutes.",
|
|
64
64
|
},
|
|
65
|
-
"packages/plugin/src/features/magic-context/message-index.ts:MESSAGE_HISTORY_ORPHAN_UNAVAILABLE_REPROBE_MS":
|
|
66
|
-
{
|
|
67
|
-
classification: "VERDICT",
|
|
68
|
-
reason: "Saved: source_unavailable persists a future timestamp, then the normal cooldown arithmetic re-probes after one day.",
|
|
69
|
-
},
|
|
70
65
|
"packages/plugin/src/features/magic-context/storage-meta-session.ts:sessionMetaSelectColumnsCache":
|
|
71
66
|
{
|
|
72
67
|
classification: "VERDICT",
|
|
@@ -157,6 +152,10 @@ const KNOWN_SLOTS: Record<string, KnownSlot> = {
|
|
|
157
152
|
classification: "PUBLICATION",
|
|
158
153
|
reason: "Once-per-process log dedup only (plan 18): the unconfigured-maintenance diagnosis is logged once to avoid per-pass spam. It gates no behavior — buildPiMaintenanceOptions re-evaluates the model chain on every call.",
|
|
159
154
|
},
|
|
155
|
+
"packages/pi-plugin/src/pi-append-compaction.ts:loggedIncompatibleHost": {
|
|
156
|
+
classification: "PUBLICATION",
|
|
157
|
+
reason: "Once-per-process diagnostic dedup only: each adapter call rechecks host arity and getEntry; this flag suppresses only repeated logs, never a compatible binding.",
|
|
158
|
+
},
|
|
160
159
|
"packages/plugin/src/shared/models-dev-cache.ts:apiCache": {
|
|
161
160
|
classification: "PUBLICATION",
|
|
162
161
|
reason: "Publishes last-known-good model metadata, not a failure verdict; refresh writes a later successful value.",
|
|
@@ -38,6 +38,58 @@ function createArgs(model?: { providerID: string; modelID: string }) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
describe("promptSyncWithModelSuggestionRetry", () => {
|
|
41
|
+
for (const validated of [false, true]) {
|
|
42
|
+
for (const allowModelSuggestions of [undefined, true, false]) {
|
|
43
|
+
test(`provider suggestions ${String(allowModelSuggestions)}, validated=${validated}`, async () => {
|
|
44
|
+
const models: string[] = [];
|
|
45
|
+
const prompt = mock(async (args: PromptCall) => {
|
|
46
|
+
const model = args.body.model?.modelID ?? "";
|
|
47
|
+
models.push(model);
|
|
48
|
+
if (model !== "suggested" && model !== "last") {
|
|
49
|
+
throw new Error(
|
|
50
|
+
`model not found: provider/${model}. did you mean: suggested?`,
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
return {};
|
|
54
|
+
});
|
|
55
|
+
const options = {
|
|
56
|
+
allowModelSuggestions,
|
|
57
|
+
fallbackModels: ["provider/fallback", "provider/last"],
|
|
58
|
+
};
|
|
59
|
+
const args = createArgs({ providerID: "provider", modelID: "primary" });
|
|
60
|
+
if (validated) {
|
|
61
|
+
await promptSyncWithValidatedOutputRetry(createClient(prompt), args, {
|
|
62
|
+
...options,
|
|
63
|
+
fetchOutput: async () => "output",
|
|
64
|
+
validateOutput: (output) => output,
|
|
65
|
+
});
|
|
66
|
+
} else {
|
|
67
|
+
await promptSyncWithModelSuggestionRetry(createClient(prompt), args, options);
|
|
68
|
+
}
|
|
69
|
+
expect(models).toEqual(
|
|
70
|
+
allowModelSuggestions === false
|
|
71
|
+
? ["primary", "fallback", "last"]
|
|
72
|
+
: ["primary", "suggested"],
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
test("disabled suggestions preserve the original error without fallbacks", async () => {
|
|
79
|
+
const error = new Error("model not found: provider/primary. did you mean: suggested?");
|
|
80
|
+
const prompt = mock(async () => {
|
|
81
|
+
throw error;
|
|
82
|
+
});
|
|
83
|
+
await expect(
|
|
84
|
+
promptSyncWithModelSuggestionRetry(
|
|
85
|
+
createClient(prompt),
|
|
86
|
+
createArgs({ providerID: "provider", modelID: "primary" }),
|
|
87
|
+
{ allowModelSuggestions: false },
|
|
88
|
+
),
|
|
89
|
+
).rejects.toBe(error);
|
|
90
|
+
expect(prompt).toHaveBeenCalledTimes(1);
|
|
91
|
+
});
|
|
92
|
+
|
|
41
93
|
test("primary succeeds, no fallback iteration", async () => {
|
|
42
94
|
const prompt = mock(async () => ({}));
|
|
43
95
|
const client = createClient(prompt);
|