@retaw106/mmc-oc 2.4.0 → 2.5.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.
Files changed (132) hide show
  1. package/dist/{context-c72brxe5.js → context-xx09sh1g.js} +1279 -408
  2. package/dist/features/magic-context/message-index-async.d.ts +6 -2
  3. package/dist/features/magic-context/message-index-async.d.ts.map +1 -1
  4. package/dist/features/magic-context/message-index.d.ts +5 -8
  5. package/dist/features/magic-context/message-index.d.ts.map +1 -1
  6. package/dist/features/magic-context/search.d.ts +5 -1
  7. package/dist/features/magic-context/search.d.ts.map +1 -1
  8. package/dist/features/magic-context/storage-db.d.ts +2 -0
  9. package/dist/features/magic-context/storage-db.d.ts.map +1 -1
  10. package/dist/features/magic-context/storage-host-instruction-retention.d.ts +4 -0
  11. package/dist/features/magic-context/storage-host-instruction-retention.d.ts.map +1 -0
  12. package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
  13. package/dist/features/magic-context/storage-meta-shared.d.ts +2 -2
  14. package/dist/features/magic-context/storage-meta-shared.d.ts.map +1 -1
  15. package/dist/features/magic-context/storage-session-tables.d.ts +9 -1
  16. package/dist/features/magic-context/storage-session-tables.d.ts.map +1 -1
  17. package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
  18. package/dist/hooks/magic-context/auto-search-hint.d.ts +3 -0
  19. package/dist/hooks/magic-context/auto-search-hint.d.ts.map +1 -1
  20. package/dist/hooks/magic-context/auto-search-runner.d.ts.map +1 -1
  21. package/dist/hooks/magic-context/channel2-delivery.d.ts.map +1 -1
  22. package/dist/hooks/magic-context/compartment-runner-historian.d.ts +2 -2
  23. package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -1
  24. package/dist/hooks/magic-context/diagnostic-log-state.d.ts +4 -0
  25. package/dist/hooks/magic-context/diagnostic-log-state.d.ts.map +1 -0
  26. package/dist/hooks/magic-context/emergency-drop.d.ts.map +1 -1
  27. package/dist/hooks/magic-context/file-token-coverage.d.ts +11 -0
  28. package/dist/hooks/magic-context/file-token-coverage.d.ts.map +1 -0
  29. package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
  30. package/dist/hooks/magic-context/host-served-rows.d.ts +10 -0
  31. package/dist/hooks/magic-context/host-served-rows.d.ts.map +1 -1
  32. package/dist/hooks/magic-context/inject-compartments.d.ts +1 -1
  33. package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
  34. package/dist/hooks/magic-context/lkg-recovery-fence.d.ts.map +1 -1
  35. package/dist/hooks/magic-context/lkg-replay.d.ts.map +1 -1
  36. package/dist/hooks/magic-context/lkg-slot.d.ts +1 -1
  37. package/dist/hooks/magic-context/lkg-slot.d.ts.map +1 -1
  38. package/dist/hooks/magic-context/nudge-evaluation-log.d.ts +3 -0
  39. package/dist/hooks/magic-context/nudge-evaluation-log.d.ts.map +1 -0
  40. package/dist/hooks/magic-context/pass-outcome.d.ts +2 -0
  41. package/dist/hooks/magic-context/pass-outcome.d.ts.map +1 -1
  42. package/dist/hooks/magic-context/pending-drop-eligibility.d.ts.map +1 -1
  43. package/dist/hooks/magic-context/protected-tail-boundary.d.ts +2 -0
  44. package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -1
  45. package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
  46. package/dist/hooks/magic-context/recomp-orchestrator.d.ts +3 -3
  47. package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -1
  48. package/dist/hooks/magic-context/system-date-refresh.d.ts +3 -2
  49. package/dist/hooks/magic-context/system-date-refresh.d.ts.map +1 -1
  50. package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
  51. package/dist/hooks/magic-context/system-prompt-sticky-date.d.ts +4 -0
  52. package/dist/hooks/magic-context/system-prompt-sticky-date.d.ts.map +1 -0
  53. package/dist/hooks/magic-context/tag-content-primitives.d.ts +1 -1
  54. package/dist/hooks/magic-context/tag-content-primitives.d.ts.map +1 -1
  55. package/dist/hooks/magic-context/tag-messages.d.ts +15 -2
  56. package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
  57. package/dist/hooks/magic-context/text-complete.d.ts +1 -1
  58. package/dist/hooks/magic-context/text-complete.d.ts.map +1 -1
  59. package/dist/hooks/magic-context/todo-view.d.ts +2 -2
  60. package/dist/hooks/magic-context/tool-drop-target.d.ts +3 -2
  61. package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -1
  62. package/dist/hooks/magic-context/transform-compartment-phase.d.ts +1 -0
  63. package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
  64. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +6 -0
  65. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
  66. package/dist/hooks/magic-context/transform-stage-logger.d.ts +3 -0
  67. package/dist/hooks/magic-context/transform-stage-logger.d.ts.map +1 -1
  68. package/dist/hooks/magic-context/transform.d.ts +4 -2
  69. package/dist/hooks/magic-context/transform.d.ts.map +1 -1
  70. package/dist/{index-kahkxcqw.js → index-0d40b4q8.js} +14740 -14292
  71. package/dist/{index-48e9znrc.js → index-1vxffj5j.js} +75 -22
  72. package/dist/{index-ykq24x1n.js → index-bpjjcdy9.js} +1 -1
  73. package/dist/{index-r7s7d350.js → index-k25thxq7.js} +1 -1
  74. package/dist/{index-27ddyx39.js → index-mjf0p7yq.js} +1 -1
  75. package/dist/{index-dwh99z66.js → index-pte3cfs9.js} +194 -5
  76. package/dist/index.js +2 -2
  77. package/dist/{message-time-backfill-j96x1sab.js → message-time-backfill-g9py24yt.js} +1 -1
  78. package/dist/plugin/subagent-tool-policy.d.ts +4 -0
  79. package/dist/plugin/subagent-tool-policy.d.ts.map +1 -1
  80. package/dist/{read-session-chunk-t8bg6wkz.js → read-session-chunk-eb3fy45y.js} +3 -3
  81. package/dist/{recomp-orchestrator-k760qy1n.js → recomp-orchestrator-mmpy5cb7.js} +6 -6
  82. package/dist/{send-session-notification-njjf3b4s.js → send-session-notification-zpqs213d.js} +3 -3
  83. package/dist/shared/model-suggestion-retry.d.ts +2 -0
  84. package/dist/shared/model-suggestion-retry.d.ts.map +1 -1
  85. package/dist/shared/rpc-discovery-cleanup.d.ts +3 -0
  86. package/dist/shared/rpc-discovery-cleanup.d.ts.map +1 -0
  87. package/dist/shared/rpc-server.d.ts +2 -0
  88. package/dist/shared/rpc-server.d.ts.map +1 -1
  89. package/dist/shared/search-text.d.ts +8 -0
  90. package/dist/shared/search-text.d.ts.map +1 -0
  91. package/dist/shared/sqlite.d.ts +6 -1
  92. package/dist/shared/sqlite.d.ts.map +1 -1
  93. package/dist/shared/storage-file-mutex.d.ts.map +1 -1
  94. package/dist/shared/system-directive.d.ts +2 -0
  95. package/dist/shared/system-directive.d.ts.map +1 -1
  96. package/dist/v2/fold/native-replay.d.ts +11 -2
  97. package/dist/v2/fold/native-replay.d.ts.map +1 -1
  98. package/dist/v2/fold/policy.d.ts.map +1 -1
  99. package/dist/v2/fold/restore.d.ts.map +1 -1
  100. package/dist/v2/hooks/context.d.ts +1 -1
  101. package/dist/v2/hooks/context.d.ts.map +1 -1
  102. package/dist/v2/hooks/generate.d.ts +36 -1
  103. package/dist/v2/hooks/generate.d.ts.map +1 -1
  104. package/dist/v2/hooks/lkg-system.d.ts +35 -4
  105. package/dist/v2/hooks/lkg-system.d.ts.map +1 -1
  106. package/dist/v2/hooks/payload.d.ts +10 -1
  107. package/dist/v2/hooks/payload.d.ts.map +1 -1
  108. package/dist/v2/hooks/store.d.ts +2 -0
  109. package/dist/v2/hooks/store.d.ts.map +1 -1
  110. package/dist/v2/hooks/types.d.ts +12 -0
  111. package/dist/v2/hooks/types.d.ts.map +1 -1
  112. package/dist/v2/server.js +9033 -7461
  113. package/dist/v2/store-reader.d.ts +11 -0
  114. package/dist/v2/store-reader.d.ts.map +1 -1
  115. package/dist/web/main.js +229 -8
  116. package/dist/{wrapup-orchestrator-b2gswatj.js → wrapup-orchestrator-jq589pgr.js} +6 -6
  117. package/package.json +1 -1
  118. package/src/config/latch-permanence-guard.test.ts +4 -0
  119. package/src/shared/model-suggestion-retry.test.ts +52 -0
  120. package/src/shared/model-suggestion-retry.ts +8 -3
  121. package/src/shared/rpc-discovery-cleanup.test.ts +125 -0
  122. package/src/shared/rpc-discovery-cleanup.ts +57 -0
  123. package/src/shared/rpc-server.ts +36 -13
  124. package/src/shared/search-text.test.ts +30 -0
  125. package/src/shared/search-text.ts +62 -0
  126. package/src/shared/sqlite-turn-deadline.test.ts +286 -0
  127. package/src/shared/sqlite.ts +237 -9
  128. package/src/shared/storage-file-mutex.test.ts +51 -2
  129. package/src/shared/storage-file-mutex.ts +11 -1
  130. package/src/shared/system-directive.test.ts +37 -0
  131. package/src/shared/system-directive.ts +19 -1
  132. package/src/shared/tag-transcript.ts +16 -4
@@ -148,6 +148,7 @@ export declare class V2StoreReaderPool {
148
148
  closeWhenIdle(timeoutMs: number): Promise<boolean>;
149
149
  private finishClose;
150
150
  }
151
+ export declare function messageTimesQuery(count: number): string;
151
152
  /** Opens an existing store read-only; missing/corrupt stores propagate errors, never an empty history. */
152
153
  export declare class V2StoreReader {
153
154
  private readonly path;
@@ -184,6 +185,8 @@ export declare class V2StoreReader {
184
185
  */
185
186
  messagePage(sessionID: string, afterOrdinal: number, limit: number, finalWatermark: number, after?: RawMessageOrdinalAnchor): StoreRow[];
186
187
  messageCount(sessionID: string): number;
188
+ /** Count only appended conversational rows, using the host's session/sequence index. */
189
+ messageCountAfterSequence(sessionID: string, after: number, through: number): number;
187
190
  /**
188
191
  * One page of host sessions with the directory each was created in, in
189
192
  * ascending id order after `afterSessionID` (exclusive; null starts at the
@@ -196,6 +199,8 @@ export declare class V2StoreReader {
196
199
  latestMessageTime(sessionID: string): number | undefined;
197
200
  /** Parent links are recorded by the host before a child's first context pass. */
198
201
  isSubagent(sessionID: string): boolean | null;
202
+ /** Authoritative liveness snapshot for background orphan cleanup. */
203
+ sessionIds(): string[];
199
204
  /** Count session_message rows after a sequence. This counts stored rows, not
200
205
  * model messages: it includes idle rows (OpenCode's marker that a run finished)
201
206
  * and compaction rows (checkpoints), and one stored assistant row can render as
@@ -204,6 +209,10 @@ export declare class V2StoreReader {
204
209
  storedRowsAfter(sessionID: string, after: number): number;
205
210
  storedMessageCount(sessionID: string): number;
206
211
  messageById(sessionID: string, id: string): StoreRow | null;
212
+ messageTimes(sessionID: string, ids: readonly string[]): Map<string, {
213
+ created?: number;
214
+ completed?: number;
215
+ }>;
207
216
  messageExistsById(sessionID: string, id: string): boolean;
208
217
  messageOrdinalById(sessionID: string, id: string): number | null;
209
218
  messageIdOrdinals(sessionID: string, fromOrdinal: number, toOrdinal: number): Map<string, number>;
@@ -219,6 +228,8 @@ export declare class V2StoreReader {
219
228
  spanRowStamps(sessionID: string, after: number, through: number): Map<number, string>;
220
229
  /** Conversational rows at or before `throughSeq`, newest first. */
221
230
  rawRowsThrough(sessionID: string, throughSeq: number, limit: number): StoreRow[];
231
+ /** Instruction updates covered by a checkpoint, in host sequence order. */
232
+ instructionRowsThrough(sessionID: string, throughSeq: number): StoreRow[];
222
233
  sequenceForId(sessionID: string, id: string | null | undefined): number | undefined;
223
234
  /** Native synthetics are user-shaped on the wire; their store kind is unambiguous. */
224
235
  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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AC,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));
@@ -4167,6 +4345,12 @@ function closeConnection(connection) {
4167
4345
  counters.readersClosed += 1;
4168
4346
  }
4169
4347
  }
4348
+ function messageTimesQuery(count) {
4349
+ return `SELECT id, COALESCE(time_created, json_extract(data, '$.time.created')) AS created,
4350
+ json_extract(data, '$.time.completed') AS completed
4351
+ FROM session_message WHERE +session_id = ? AND id IN (${Array.from({ length: count }, () => "?").join(",")})`;
4352
+ }
4353
+
4170
4354
  class V2StoreReader {
4171
4355
  path;
4172
4356
  pool;
@@ -4262,6 +4446,12 @@ class V2StoreReader {
4262
4446
  return typeof row?.count === "number" ? row.count : 0;
4263
4447
  });
4264
4448
  }
4449
+ messageCountAfterSequence(sessionID, after, through) {
4450
+ const rawTypes = RAW_MESSAGE_TYPES.map(() => "?").join(", ");
4451
+ const row = this.prepare(`SELECT COUNT(*) AS count FROM session_message
4452
+ WHERE session_id = ? AND seq > ? AND seq <= ? AND type IN (${rawTypes})`).get(sessionID, after, through, ...RAW_MESSAGE_TYPES);
4453
+ return typeof row?.count === "number" ? row.count : 0;
4454
+ }
4265
4455
  sessionDirectoryPage(afterSessionID, limit) {
4266
4456
  const rows = this.prepare(`SELECT id, COALESCE(directory, '') AS directory FROM session_v2
4267
4457
  WHERE id > ? ORDER BY id ASC LIMIT ?`).all(afterSessionID ?? "", limit);
@@ -4277,6 +4467,9 @@ class V2StoreReader {
4277
4467
  return null;
4278
4468
  return typeof row.parent_id === "string" && row.parent_id.length > 0;
4279
4469
  }
4470
+ sessionIds() {
4471
+ return this.prepare("SELECT id FROM session_v2").all().map((row) => row.id);
4472
+ }
4280
4473
  storedRowsAfter(sessionID, after) {
4281
4474
  const row = this.prepare("SELECT COUNT(*) AS count FROM session_message WHERE session_id = ? AND seq > ?").get(sessionID, after);
4282
4475
  return row.count;
@@ -4295,6 +4488,19 @@ class V2StoreReader {
4295
4488
  return row ? decode(row) : null;
4296
4489
  });
4297
4490
  }
4491
+ messageTimes(sessionID, ids) {
4492
+ const times = new Map;
4493
+ for (let offset = 0;offset < ids.length; offset += 500) {
4494
+ const batch = ids.slice(offset, offset + 500);
4495
+ const rows = this.prepare(messageTimesQuery(batch.length)).all(sessionID, ...batch);
4496
+ for (const row of rows)
4497
+ times.set(row.id, {
4498
+ created: typeof row.created === "number" ? row.created : undefined,
4499
+ completed: typeof row.completed === "number" ? row.completed : undefined
4500
+ });
4501
+ }
4502
+ return times;
4503
+ }
4298
4504
  messageExistsById(sessionID, id) {
4299
4505
  return trackDecodeOperation("messageExistsById", () => {
4300
4506
  const rawTypes = RAW_MESSAGE_TYPES.map(() => "?").join(", ");
@@ -4380,6 +4586,14 @@ class V2StoreReader {
4380
4586
  ORDER BY seq DESC LIMIT ?`).all(sessionID, ...RAW_MESSAGE_TYPES, throughSeq, limit).map(decode);
4381
4587
  });
4382
4588
  }
4589
+ instructionRowsThrough(sessionID, throughSeq) {
4590
+ return trackDecodeOperation("instructionRowsThrough", () => {
4591
+ if (!Number.isSafeInteger(throughSeq))
4592
+ throw new Error("Invalid seq upper bound");
4593
+ return this.prepare(`SELECT id, session_id, type, seq, time_created, data FROM session_message
4594
+ WHERE session_id = ? AND type = 'system' AND seq <= ? ORDER BY seq ASC`).all(sessionID, throughSeq).map(decode);
4595
+ });
4596
+ }
4383
4597
  sequenceForId(sessionID, id) {
4384
4598
  if (!id)
4385
4599
  return;
@@ -5322,24 +5536,31 @@ ${data.output?.output ?? ""}`
5322
5536
  const sameModel = sameProvider && previousModel?.id === model.id;
5323
5537
  const reuse = sameModel && data.error === undefined;
5324
5538
  const metadata = (state) => state === undefined ? undefined : { [model.providerID]: state };
5539
+ const reasoningInterrupted = data.content?.some((part) => part.type === "reasoning" && part.time !== undefined && part.time.completed === undefined);
5325
5540
  const content = [];
5326
5541
  const results = [];
5327
5542
  for (const part of data.content ?? []) {
5543
+ let native = "native" in part ? part.native : part.type === "tool" ? part.providerState : part.state;
5544
+ if (part.type === "tool" && part.providerResultState !== null && typeof part.providerResultState === "object" && !Array.isArray(part.providerResultState))
5545
+ native = {
5546
+ ...native !== null && typeof native === "object" && !Array.isArray(native) ? native : {},
5547
+ ...part.providerResultState
5548
+ };
5328
5549
  if (part.type === "text") {
5329
5550
  if (part.text !== "")
5330
5551
  content.push({
5331
5552
  type: "text",
5332
5553
  text: part.text,
5333
- providerMetadata: reuse ? metadata(part.state) : undefined
5554
+ providerMetadata: reuse ? metadata(native) : undefined
5334
5555
  });
5335
5556
  continue;
5336
5557
  }
5337
5558
  if (part.type === "reasoning") {
5338
- if (part.text !== "" || reuse && part.state !== undefined)
5559
+ if (part.text !== "" || reuse && !reasoningInterrupted && native !== undefined)
5339
5560
  content.push({
5340
- type: reuse || data.error === undefined ? "reasoning" : "text",
5561
+ type: data.error === undefined && !reasoningInterrupted ? "reasoning" : "text",
5341
5562
  text: part.text,
5342
- providerMetadata: reuse ? metadata(part.state) : undefined
5563
+ providerMetadata: reuse && !reasoningInterrupted ? metadata(native) : undefined
5343
5564
  });
5344
5565
  continue;
5345
5566
  }
@@ -5358,7 +5579,7 @@ ${data.output?.output ?? ""}`
5358
5579
  name: part.name,
5359
5580
  input,
5360
5581
  providerExecuted: part.executed,
5361
- providerMetadata: toolReuse ? metadata(part.providerState) : undefined
5582
+ providerMetadata: toolReuse ? metadata(native) : undefined
5362
5583
  });
5363
5584
  if (!completed)
5364
5585
  continue;
@@ -5369,7 +5590,7 @@ ${data.output?.output ?? ""}`
5369
5590
  id: part.id,
5370
5591
  name: part.name,
5371
5592
  providerExecuted: part.executed,
5372
- providerMetadata: toolReuse ? metadata(part.providerResultState ?? part.providerState) : sameProvider ? metadata(part.providerResultState) : undefined,
5593
+ providerMetadata: (part.executed === true ? sameProvider : reuse) ? metadata(native) : undefined,
5373
5594
  result: state.status === "error" ? { error: state.error, content: toolContent } : single?.type === "text" ? { type: "text", value: single.text } : { type: "content", value: toolContent },
5374
5595
  ...state.status === "error" ? { resultType: "error" } : {}
5375
5596
  };
@@ -21,11 +21,11 @@ import {
21
21
  getActiveCompartmentRun,
22
22
  markActiveCompartmentRunPublished,
23
23
  registerActiveCompartmentRun
24
- } from "./index-kahkxcqw.js";
25
- import"./index-dwh99z66.js";
24
+ } from "./index-0d40b4q8.js";
25
+ import"./index-pte3cfs9.js";
26
26
  import"./index-x37vg474.js";
27
- import"./index-48e9znrc.js";
28
- import"./index-ykq24x1n.js";
27
+ import"./index-1vxffj5j.js";
28
+ import"./index-bpjjcdy9.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-r7s7d350.js";
36
+ } from "./index-k25thxq7.js";
37
37
  import {
38
38
  setRecompStarting2,
39
39
  setRecompTerminal2
40
- } from "./index-27ddyx39.js";
40
+ } from "./index-mjf0p7yq.js";
41
41
  import"./index-yjv8dpht.js";
42
42
 
43
43
  // src/hooks/magic-context/wrapup-orchestrator.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retaw106/mmc-oc",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "type": "module",
5
5
  "description": "OpenCode plugin for Magic Context — cross-session memory and context management",
6
6
  "main": "dist/index.js",
@@ -157,6 +157,10 @@ const KNOWN_SLOTS: Record<string, KnownSlot> = {
157
157
  classification: "PUBLICATION",
158
158
  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
159
  },
160
+ "packages/pi-plugin/src/pi-append-compaction.ts:loggedIncompatibleHost": {
161
+ classification: "PUBLICATION",
162
+ 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.",
163
+ },
160
164
  "packages/plugin/src/shared/models-dev-cache.ts:apiCache": {
161
165
  classification: "PUBLICATION",
162
166
  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);
@@ -71,6 +71,8 @@ export interface PromptAttemptInfo {
71
71
  export interface PromptRetryOptions {
72
72
  transport?: PromptTransport;
73
73
  timeoutMs?: number;
74
+ /** False for callers whose configured model chain must not accept provider suggestions. Defaults to true. */
75
+ allowModelSuggestions?: boolean;
74
76
  /** External abort signal — cancels the in-flight LLM prompt immediately when aborted */
75
77
  signal?: AbortSignal;
76
78
  /**
@@ -488,6 +490,7 @@ async function attemptOnce(
488
490
  callContext: string,
489
491
  label: string,
490
492
  transport?: PromptTransport,
493
+ allowModelSuggestions = true,
491
494
  ): Promise<void> {
492
495
  // Keep this snapshot separate from the object passed to the client. A
493
496
  // failed prompt facade may rewrite its request body before rejecting; the
@@ -498,9 +501,8 @@ async function attemptOnce(
498
501
  await promptWithTimeout(client, attemptArgs, timeoutMs, signal, transport);
499
502
  return;
500
503
  } catch (error) {
501
- // If non-retryable (abort, overflow, timeout), bubble up immediately.
502
- // Don't even try suggestion retry — caller needs the original error.
503
- if (isNonRetryable(error, signal)) throw error;
504
+ // Surface the original error when suggestions are disabled or cannot help.
505
+ if (isNonRetryable(error, signal) || !allowModelSuggestions) throw error;
504
506
 
505
507
  const suggestion = parseModelSuggestion(error);
506
508
  if (!suggestion || !originalBody.model) {
@@ -576,6 +578,7 @@ export async function promptSyncWithModelSuggestionRetry(
576
578
  callContext,
577
579
  explicitPrimaryLabel,
578
580
  options.transport,
581
+ options.allowModelSuggestions,
579
582
  );
580
583
  return;
581
584
  } catch (error) {
@@ -620,6 +623,7 @@ export async function promptSyncWithModelSuggestionRetry(
620
623
  callContext,
621
624
  label,
622
625
  options.transport,
626
+ options.allowModelSuggestions,
623
627
  );
624
628
  log(
625
629
  `[${callContext}] fallback succeeded with ${label} (attempt ${i + 2}/${fallbacks.length + 1})`,
@@ -665,6 +669,7 @@ async function attemptAndValidate<TOutput, TValidated>(
665
669
  callContext,
666
670
  attempt.label,
667
671
  options.transport,
672
+ options.allowModelSuggestions,
668
673
  );
669
674
  } catch (error) {
670
675
  throw {