my-durable 0.0.95 → 0.0.96

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.
@@ -7,8 +7,8 @@
7
7
  <meta name="referrer" content="no-referrer" />
8
8
  <link rel="icon" type="image/svg+xml" href="/icons/durable-pi.svg" />
9
9
  <title>Durable Pi | Network</title>
10
- <script type="module" crossorigin src="/assets/index-Do9gnLTf.js"></script>
11
- <link rel="stylesheet" crossorigin href="/assets/index-B6uxt0Za.css">
10
+ <script type="module" crossorigin src="/assets/index-D3_FAPEg.js"></script>
11
+ <link rel="stylesheet" crossorigin href="/assets/index-CjRRjp_f.css">
12
12
  </head>
13
13
  <body>
14
14
  <div id="app"></div>
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ const build = __DPI_BUILD__ as string;
2
3
  import { onBeforeUnmount, onMounted, ref } from "vue";
3
4
  import { Database, GitFork, Activity, Info, Plus, X } from "lucide-vue-next";
4
5
  import TopBar from "./components/TopBar.vue";
@@ -133,6 +134,7 @@ onBeforeUnmount(() => {
133
134
  ><span><GitFork :size="18" />Branch any agent</span
134
135
  ><span><Activity :size="18" />Watch from anywhere</span>
135
136
  </div>
137
+ <p class="build-stamp">ui {{ build }}</p>
136
138
  </section>
137
139
  </main>
138
140
 
@@ -0,0 +1,2 @@
1
+ // Build-time constants injected by vite `define` (vite.config.ts).
2
+ declare const __DPI_BUILD__: string;
@@ -3430,3 +3430,11 @@ select:focus {
3430
3430
  padding: 6px 9px;
3431
3431
  }
3432
3432
  }
3433
+
3434
+ .build-stamp {
3435
+ margin: 18px 0 0;
3436
+ font-size: 0.625rem;
3437
+ letter-spacing: 0.08em;
3438
+ color: var(--faint);
3439
+ opacity: 0.7;
3440
+ }
@@ -1,8 +1,12 @@
1
1
  import { defineConfig } from "vite";
2
2
  import vue from "@vitejs/plugin-vue";
3
3
  import { fileURLToPath } from "node:url";
4
+ import { readFileSync } from "node:fs";
4
5
  const sdk = fileURLToPath(new URL("../../../dpi-sdk/src", import.meta.url));
6
+ const version = JSON.parse(readFileSync(fileURLToPath(new URL("../../../../package.json", import.meta.url)), "utf8")).version;
7
+
5
8
  export default defineConfig({
9
+ define: { __DPI_BUILD__: JSON.stringify(version) },
6
10
  root: fileURLToPath(new URL(".", import.meta.url)),
7
11
  plugins: [vue()],
8
12
  resolve: { alias: { "@sdk": sdk } },
@@ -604,7 +604,10 @@ if (args.includes("--dev")) {
604
604
  app.use(
605
605
  express.static(dist, {
606
606
  setHeaders: (res, filePath) => {
607
- if (filePath.endsWith(".html")) res.setHeader("Cache-Control", "no-cache");
607
+ // no-store: in-app webviews (Zalo/Messenger) have been observed
608
+ // serving stale shells across deploys even under no-cache — the
609
+ // document is tiny, it can simply never be stored.
610
+ if (filePath.endsWith(".html")) res.setHeader("Cache-Control", "no-store");
608
611
  },
609
612
  }),
610
613
  );
@@ -627,7 +630,10 @@ if (args.includes("--dev")) {
627
630
  // An /api-shaped path is never a page — not even case-mangled (uniformity
628
631
  // with the device: /API/NETWORK is a 404 miss, not the app shell).
629
632
  if (/^\/api(\/|$)/i.test(req.path)) return void next();
630
- res.setHeader("Cache-Control", "no-cache");
633
+ res.setHeader("Cache-Control", "no-store");
634
+ // ?fresh=1 nukes every cache the browser holds for this origin (one-shot
635
+ // unfreeze for clients stuck on an old shell; harmless otherwise).
636
+ if (req.query.fresh === "1") res.setHeader("Clear-Site-Data", '"cache"');
631
637
  res.sendFile(join(dist, "index.html"));
632
638
  });
633
639
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-durable",
3
- "version": "0.0.95",
3
+ "version": "0.0.96",
4
4
  "description": "Durable Pi — the durable agent network: hub web UI, device backend daemon, TUI admin and the shared SDK, packaged as one runnable monorepo install",
5
5
  "license": "MIT",
6
6
  "repository": {