pi-mega-compact 0.4.4 → 0.4.5

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.
@@ -774,9 +774,15 @@ export default function (pi: ExtensionAPI) {
774
774
 
775
775
  /** Write a small ESM runner script that imports and launches the dashboard server. */
776
776
  function writeRunnerScript(): void {
777
- const compiledServer = join(dirname(fileURLToPath(import.meta.url)), "dashboard-server.js");
777
+ // The npm package ships SOURCE only (no dist/), so the launchable entry is
778
+ // the .ts file — not dashboard-server.js (which only exists after a local
779
+ // build). dashboard-server.ts imports only Node built-ins, so it loads under
780
+ // node's --experimental-strip-types without any other compiled code. The
781
+ // child is spawned with that flag (see the spawn below) so the import below
782
+ // resolves from the source install path.
783
+ const sourceServer = join(dirname(fileURLToPath(import.meta.url)), "dashboard-server.ts");
778
784
  const script = [
779
- `import { launchDashboardServer } from ${JSON.stringify(compiledServer)};`,
785
+ `import { launchDashboardServer } from ${JSON.stringify(sourceServer)};`,
780
786
  `launchDashboardServer(${JSON.stringify(currentStateDir)}).catch(err => {`,
781
787
  ` console.error("[mega-compact] dashboard failed:", err);`,
782
788
  ` process.exit(1);`,
@@ -815,7 +821,7 @@ export default function (pi: ExtensionAPI) {
815
821
  ctx.ui.notify("[mega-compact] starting dashboard server…");
816
822
  writeRunnerScript();
817
823
 
818
- const child = spawn(process.execPath, [runnerFile], {
824
+ const child = spawn(process.execPath, ["--experimental-strip-types", runnerFile], {
819
825
  detached: true,
820
826
  stdio: "ignore",
821
827
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-mega-compact",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Layered, local, vector-backed context compressor for pi — supersede/collapse/cluster compaction with deduped inline recall.",
5
5
  "type": "module",
6
6
  "license": "BSD-2-Clause",