@volter/twin-openrouter 0.1.1 → 0.1.3

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.
@@ -10,11 +10,11 @@
10
10
  // clock and an honorable `readOnly` for free — the hand-rolled dispatch this replaced used
11
11
  // `new Date()` and ignored `readOnly` (the airtable §9 round-two finding 13 drift, verbatim).
12
12
  import { readFile } from 'node:fs/promises';
13
- import { bundleClient, fileResponse } from '@volter/world-core';
13
+ import { bundleClient, fileResponse, filePathOf } from '@volter/world-core';
14
14
  import { serveHttp } from '@volter/world-core';
15
15
  import { createOpenRouterTwinFetch } from "./openrouter-server.js";
16
- const CLIENT_ENTRY = () => new URL('../client/openrouter-mirror.tsx', import.meta.url).pathname; // lazy: workerd rejects top-level relative URL from import.meta.url (bundled via pack index)
17
- const CLIENT_CSS = () => new URL('../client/openrouter-mirror.css', import.meta.url).pathname; // lazy: workerd rejects top-level relative URL from import.meta.url (bundled via pack index)
16
+ const CLIENT_ENTRY = () => filePathOf(new URL('../client/openrouter-mirror.tsx', import.meta.url)); // lazy: workerd rejects top-level relative URL from import.meta.url (bundled via pack index)
17
+ const CLIENT_CSS = () => filePathOf(new URL('../client/openrouter-mirror.css', import.meta.url)); // lazy: workerd rejects top-level relative URL from import.meta.url (bundled via pack index)
18
18
  const APP_SHELL = `<!doctype html>
19
19
  <html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
20
20
  <base href="/"><title>OpenRouter (twin)</title><link rel="stylesheet" href="assets/styles.css"></head>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/twin-openrouter",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Local OpenRouter twin — a faithful, stateful local OpenRouter API your OpenAI-compatible SDK talks to unmodified. Chat completions and streaming return deterministic labeled stubs, generation stats and key/credits/model surfaces are local. Built on @volter/world-core.",
5
5
  "keywords": [
6
6
  "twin",
@@ -53,10 +53,10 @@
53
53
  "react-dom": "^19.2.7"
54
54
  },
55
55
  "peerDependencies": {
56
- "@volter/world-core": "2.0.1"
56
+ "@volter/world-core": "2.0.3"
57
57
  },
58
58
  "devDependencies": {
59
- "@volter/world-core": "2.0.1",
59
+ "@volter/world-core": "2.0.3",
60
60
  "@volter/world-tooling": "0.1.0",
61
61
  "openai": "^6.16.0",
62
62
  "@types/bun": "^1.2.20",
@@ -10,12 +10,12 @@
10
10
  // clock and an honorable `readOnly` for free — the hand-rolled dispatch this replaced used
11
11
  // `new Date()` and ignored `readOnly` (the airtable §9 round-two finding 13 drift, verbatim).
12
12
  import { readFile } from 'node:fs/promises';
13
- import { bundleClient, fileResponse } from '@volter/world-core';
13
+ import { bundleClient, fileResponse, filePathOf } from '@volter/world-core';
14
14
  import { serveHttp } from '@volter/world-core';
15
15
  import { createOpenRouterTwinFetch } from './openrouter-server.ts';
16
16
 
17
- const CLIENT_ENTRY = () => new URL('../client/openrouter-mirror.tsx', import.meta.url).pathname; // lazy: workerd rejects top-level relative URL from import.meta.url (bundled via pack index)
18
- const CLIENT_CSS = () => new URL('../client/openrouter-mirror.css', import.meta.url).pathname; // lazy: workerd rejects top-level relative URL from import.meta.url (bundled via pack index)
17
+ const CLIENT_ENTRY = () => filePathOf(new URL('../client/openrouter-mirror.tsx', import.meta.url)); // lazy: workerd rejects top-level relative URL from import.meta.url (bundled via pack index)
18
+ const CLIENT_CSS = () => filePathOf(new URL('../client/openrouter-mirror.css', import.meta.url)); // lazy: workerd rejects top-level relative URL from import.meta.url (bundled via pack index)
19
19
 
20
20
  const APP_SHELL = `<!doctype html>
21
21
  <html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">