omp-fabric 1.25.25 → 1.25.27
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/CHANGELOG.md +22 -0
- package/dist/chunks/{chunk-7NWMFYD3.js → chunk-5U6HKMJV.js} +42 -11
- package/dist/chunks/chunk-5U6HKMJV.js.map +7 -0
- package/dist/compaction/lcm-runtime.d.ts +2 -0
- package/dist/compaction/lcm-runtime.d.ts.map +1 -1
- package/dist/compaction/lcm-runtime.js +29 -5
- package/dist/compaction/lcm-runtime.js.map +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +88 -57
- package/dist/index.js.map +2 -2
- package/dist/storage/lcm-ledger.d.ts +4 -0
- package/dist/storage/lcm-ledger.d.ts.map +1 -1
- package/dist/ui/core-tool-render.d.ts.map +1 -1
- package/dist/ui/dashboard.js +1 -1
- package/dist/ui/highlight.d.ts.map +1 -1
- package/dist/ui/shiki-languages.d.ts +3 -0
- package/dist/ui/shiki-languages.d.ts.map +1 -0
- package/docs/certification.md +1 -1
- package/package.json +8 -8
- package/dist/chunks/chunk-7NWMFYD3.js.map +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.25.27
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Correction to the 1.25.26 entry: it says its host pins moved from 18.10.1, but the working tree was already on 18.10.4 (shipped in 1.25.25). The range was 18.10.4 to 18.11.0.
|
|
8
|
+
- **Session start no longer blocks on the LCM ledger's size.** `LcmLedger` construction ran `migrateSchema()` and `PRAGMA integrity_check` — both O(file size) — inline, so every `session_start` handler paid them: 5929ms, 9210ms, 17393ms and 22245ms across measured runs against this project's 611MB ledger (the ledger directory holds several 1.5-2.4GB files), inside the host's 30000ms per-handler budget. The host log has the receipts: `Extension handler timed out` for `event: "session_start"`, 17 times on 2026-10-15 alone, including one at 11:12:57 with 1.25.26 already installed. The FTS table and trigger DDL stays synchronous, because it is cheap and `searchRaw` needs those objects to exist; migrations, their backfill and the integrity check moved to `LcmLedger.runStartupChecks()`, which the detached session warmup runs after a macrotask yield. Compaction is unaffected: the compaction hook's `getEngine()` reports `omp` until the runtime is `ready`, so a cold session hands compaction to the host core instead of summarising through an unverified ledger.
|
|
9
|
+
- Same phase marks before and after: `session_start` returned after 5929-22245ms before and 672ms after (compat 155ms, bootstrap 3ms, LCM prepare 513ms, activation 0ms). The deferred migrations and integrity check still cost about 2s on the 611MB ledger, now on a background macrotask outside the handler.
|
|
10
|
+
- `tests/storage/lcm-ledger.test.ts` now drives `runStartupChecks()` explicitly for the five migration cases (orphan quarantine, FTS backfill, fts5-less fallback, index re-sync, purge counts). The contracts are unchanged; only their timing moved.
|
|
11
|
+
|
|
12
|
+
## 1.25.26
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Host pins move from 18.10.1 to 18.11.0 (dependencies pi-agent-core, pi-ai, pi-utils, omptype; dev pi-coding-agent, pi-natives, pi-tui); the declared peer floor stays >=18.4.4. Nothing fabric imports changed: `formatApprovalDetails` lost its optional options parameter and `truncateApprovalDetail`/`ApprovalDetailsOptions` are gone, but fabric calls none of them, the grep per-file caps stay 20/200, and every wrapped tool's truncation contract is unchanged. bun run check green at 254 files / 3256 tests, certify:context 28/28 checks against the new host.
|
|
17
|
+
- Extension startup stops waiting on avoidable work. The Shiki language catalog (measured at 1263ms to import) now loads on demand instead of at module load, and registered-tool capture installs detached from the extension factory, whose body measures 5-10ms either way. Host readyMs did not move measurably at N=8 in either run order (old 6400ms vs new 6900ms; single runs 4.4-12.7s), so this is a tail-risk reduction rather than a speedup: the one sample above the host's 30000ms handler budget (34.3s) happened on the old bundle.
|
|
18
|
+
- `session_start` awaits the LCM runtime before activation and leaves ledger reconcile, sync and sweep detached behind the session epoch. The order is load-bearing: the memory provider samples the LCM context once at activation, so the runtime must exist first.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Compaction is no longer cancelled before the LCM runtime is up: `getEngine()` reported `lcm` with no runtime behind it, and the hook cancels a compaction it cannot summarize. It now reports `omp` (the host's own engine) until the runtime loads. Covered by tests/compaction-cold-start.test.ts.
|
|
23
|
+
- The memory provider is installed with its LCM context present. Covered by tests/lcm-memory-context.test.ts, which fails if the runtime is prepared after activation.
|
|
24
|
+
|
|
3
25
|
## 1.25.25
|
|
4
26
|
|
|
5
27
|
### Changed
|
|
@@ -18,9 +18,21 @@ import {
|
|
|
18
18
|
// src/ui/highlight.ts
|
|
19
19
|
import { readFileSync, statSync } from "node:fs";
|
|
20
20
|
import { basename, extname } from "node:path";
|
|
21
|
-
import { bundledLanguages } from "shiki/langs";
|
|
22
21
|
import { bundledThemesInfo } from "shiki/themes";
|
|
23
22
|
|
|
23
|
+
// src/ui/shiki-languages.ts
|
|
24
|
+
var bundledLanguageIds;
|
|
25
|
+
var loadingLanguageIds;
|
|
26
|
+
var languageIdsLoaded = () => bundledLanguageIds;
|
|
27
|
+
var loadLanguageIds = () => {
|
|
28
|
+
if (bundledLanguageIds) return Promise.resolve(bundledLanguageIds);
|
|
29
|
+
loadingLanguageIds ??= import("shiki/langs").then((module) => {
|
|
30
|
+
bundledLanguageIds = new Set(Object.keys(module.bundledLanguages));
|
|
31
|
+
return bundledLanguageIds;
|
|
32
|
+
});
|
|
33
|
+
return loadingLanguageIds;
|
|
34
|
+
};
|
|
35
|
+
|
|
24
36
|
// src/ui/shiki-theme.ts
|
|
25
37
|
var THEME_IMPORTS = {
|
|
26
38
|
"andromeeda": () => import("@shikijs/themes/andromeeda"),
|
|
@@ -341,18 +353,20 @@ var effectiveShikiThemeIsLight = () => THEME_TYPE.get(currentTheme) === "light";
|
|
|
341
353
|
var observedThemeVariant = () => observedVariant;
|
|
342
354
|
function languageFromPath(filePath) {
|
|
343
355
|
if (!filePath) return void 0;
|
|
356
|
+
const catalog = languageIdsLoaded();
|
|
357
|
+
const supported = (id) => catalog === void 0 || catalog.has(id);
|
|
344
358
|
const name = basename(filePath).toLowerCase();
|
|
345
359
|
if (name.startsWith(".env")) {
|
|
346
360
|
const candidate = "dotenv";
|
|
347
|
-
return candidate
|
|
361
|
+
return supported(candidate) ? candidate : void 0;
|
|
348
362
|
}
|
|
349
363
|
if (name === "dockerfile" || name.startsWith("dockerfile.")) {
|
|
350
|
-
return "dockerfile"
|
|
364
|
+
return supported("dockerfile") ? "dockerfile" : void 0;
|
|
351
365
|
}
|
|
352
366
|
const exact = EXACT_BASENAMES.get(name);
|
|
353
|
-
if (exact && exact
|
|
367
|
+
if (exact && supported(exact)) return exact;
|
|
354
368
|
const byExt = EXTENSION_ALIASES.get(extname(name));
|
|
355
|
-
return byExt && byExt
|
|
369
|
+
return byExt && supported(byExt) ? byExt : void 0;
|
|
356
370
|
}
|
|
357
371
|
function configureHighlighting(themePreferenceValue, syntaxEnabled = true) {
|
|
358
372
|
const preference = themePreferenceValue.trim() || "auto";
|
|
@@ -376,6 +390,7 @@ function configureHighlighting(themePreferenceValue, syntaxEnabled = true) {
|
|
|
376
390
|
resetFileHighlighting();
|
|
377
391
|
return;
|
|
378
392
|
}
|
|
393
|
+
void loadLanguageIds();
|
|
379
394
|
const themeChanged = syncEffectiveTheme(preference, observedVariant);
|
|
380
395
|
if (!themeChanged && !wasEnabled && !highlighter && !initializingTheme) {
|
|
381
396
|
void initHighlighting(currentTheme, syntaxEnabled);
|
|
@@ -388,6 +403,7 @@ async function initHighlighting(theme, syntaxEnabled = true) {
|
|
|
388
403
|
const version = ++initVersion;
|
|
389
404
|
initializingTheme = theme;
|
|
390
405
|
try {
|
|
406
|
+
await loadLanguageIds();
|
|
391
407
|
const { createHighlighter } = await import("shiki");
|
|
392
408
|
const themeObject = await resolveShikiThemeObject(theme);
|
|
393
409
|
if (!themeObject) {
|
|
@@ -527,7 +543,12 @@ function highlightCode(text, lang, invalidate) {
|
|
|
527
543
|
return null;
|
|
528
544
|
}
|
|
529
545
|
const shikiLang = normalizeLanguage(lang);
|
|
530
|
-
|
|
546
|
+
const catalog = languageIdsLoaded();
|
|
547
|
+
if (!catalog) {
|
|
548
|
+
requestInit(invalidate);
|
|
549
|
+
return null;
|
|
550
|
+
}
|
|
551
|
+
if (!catalog.has(shikiLang)) return null;
|
|
531
552
|
const cacheKey = `${currentTheme}\0${shikiLang}\0${text.length}\0${hashString(text)}`;
|
|
532
553
|
const cached = renderCache.get(cacheKey);
|
|
533
554
|
if (cached) {
|
|
@@ -667,7 +688,12 @@ function highlightFileLines(filePath, lang, from, to, invalidate) {
|
|
|
667
688
|
return null;
|
|
668
689
|
}
|
|
669
690
|
const shikiLang = normalizeLanguage(lang);
|
|
670
|
-
|
|
691
|
+
const catalog = languageIdsLoaded();
|
|
692
|
+
if (!catalog) {
|
|
693
|
+
requestInit(invalidate);
|
|
694
|
+
return null;
|
|
695
|
+
}
|
|
696
|
+
if (!catalog.has(shikiLang)) return null;
|
|
671
697
|
if (!loadedLanguages.has(shikiLang)) {
|
|
672
698
|
requestLanguageLoad(shikiLang, invalidate);
|
|
673
699
|
return null;
|
|
@@ -727,7 +753,12 @@ function highlightSourceLines(cacheKey, sourceLines, lang, from, to, invalidate)
|
|
|
727
753
|
return null;
|
|
728
754
|
}
|
|
729
755
|
const shikiLang = normalizeLanguage(lang);
|
|
730
|
-
|
|
756
|
+
const catalog = languageIdsLoaded();
|
|
757
|
+
if (!catalog) {
|
|
758
|
+
requestInit(invalidate);
|
|
759
|
+
return null;
|
|
760
|
+
}
|
|
761
|
+
if (!catalog.has(shikiLang)) return null;
|
|
731
762
|
if (!loadedLanguages.has(shikiLang)) {
|
|
732
763
|
requestLanguageLoad(shikiLang, invalidate);
|
|
733
764
|
return null;
|
|
@@ -941,7 +972,6 @@ var formatToolCallDuration = (startedAt, endedAt) => {
|
|
|
941
972
|
|
|
942
973
|
// src/ui/core-tool-render.ts
|
|
943
974
|
import { diffLines } from "diff";
|
|
944
|
-
import { bundledLanguages as bundledLanguages2 } from "shiki/langs";
|
|
945
975
|
|
|
946
976
|
// src/ui/diff-background.ts
|
|
947
977
|
import { truncateToWidth, visibleWidth } from "@oh-my-pi/pi-tui";
|
|
@@ -2921,7 +2951,8 @@ var resolveLanguage = (filePath, content) => {
|
|
|
2921
2951
|
php: "php"
|
|
2922
2952
|
};
|
|
2923
2953
|
const language = executable ? shebang[executable] : void 0;
|
|
2924
|
-
|
|
2954
|
+
const catalog = languageIdsLoaded();
|
|
2955
|
+
if (language && (catalog === void 0 || catalog.has(language))) return language;
|
|
2925
2956
|
}
|
|
2926
2957
|
if (!content || content.length > CONTENT_LANGUAGE_DETECTION_CHARS) return void 0;
|
|
2927
2958
|
const trimmed = content.trim();
|
|
@@ -5083,4 +5114,4 @@ export {
|
|
|
5083
5114
|
formatJsonAsYaml,
|
|
5084
5115
|
formatFabricValue
|
|
5085
5116
|
};
|
|
5086
|
-
//# sourceMappingURL=chunk-
|
|
5117
|
+
//# sourceMappingURL=chunk-5U6HKMJV.js.map
|