@plurnk/plurnk-xr 1.0.1 → 1.0.2
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/.env.defaults +1 -1
- package/SPEC.md +7 -8
- package/package.json +2 -2
- package/src/module.js +1 -15
- package/types/module.d.ts +1 -10
package/.env.defaults
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# {§xr-host} {§xr-configuration} @plurnk/plurnk-xr — optional WebXR & spatial-audio peripheral module (`--omit=optional` omits it).
|
|
2
|
-
# Human-readable surface name rendered in document titles
|
|
2
|
+
# Human-readable surface name rendered in document titles (1–80 chars, no control chars).
|
|
3
3
|
PLURNK_XR_APP_NAME="Plurnk XR"
|
|
4
4
|
# Initial Web Audio master gain percentage (0–100) unlocked on entering VR/AR.
|
|
5
5
|
PLURNK_XR_INITIAL_GAIN=35
|
package/SPEC.md
CHANGED
|
@@ -6,16 +6,15 @@
|
|
|
6
6
|
designed for inclusion in `@plurnk/plurnk-service` `optionalDependencies` and
|
|
7
7
|
dynamic discovery via `"plurnk": { "kind": "module", "export": "./module" }`.
|
|
8
8
|
`@plurnk/plurnk-xr/module` exports a zero-argument `DaemonModule` factory that
|
|
9
|
-
claims `mounts: ["/xr"]`, advertises
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
session lifecycle.
|
|
9
|
+
claims `mounts: ["/xr"]`, advertises no UI launcher entries (`surfaces` omitted
|
|
10
|
+
so `@plurnk/plurnk-web` renders no header icon while `/xr/` remains directly
|
|
11
|
+
reachable), and registers `/xr` on the daemon's existing HTTP listener at
|
|
12
|
+
`start()`. It owns no listener, process, database, or session lifecycle.
|
|
14
13
|
|
|
15
14
|
| Installation | Behavior |
|
|
16
15
|
| :--- | :--- |
|
|
17
|
-
| `@plurnk/plurnk-xr` composed | Discovered via `plurnk.kind === "module"
|
|
18
|
-
| Omitted (`npm install --omit=optional`) | Absent from daemon composition; `/xr` remains unclaimed
|
|
16
|
+
| `@plurnk/plurnk-xr` composed | Discovered via `plurnk.kind === "module"` and claims `/xr` and `/xr/*` without advertising UI launcher surfaces, leaving `/` (`@plurnk/plurnk-web`), `/acp`, `/mcp`, and `/notifications` untouched. |
|
|
17
|
+
| Omitted (`npm install --omit=optional`) | Absent from daemon composition; `/xr` remains unclaimed. |
|
|
19
18
|
|
|
20
19
|
## §xr-route-settlement Shutdown admission and route settlement
|
|
21
20
|
|
|
@@ -29,7 +28,7 @@ session lifecycle.
|
|
|
29
28
|
|
|
30
29
|
| Knob | Owner | Contract |
|
|
31
30
|
| :--- | :--- | :--- |
|
|
32
|
-
| `PLURNK_XR_APP_NAME` | `.env.defaults` | Trimmed non-empty string (`1`–`80` characters, no Unicode control characters) stamped on `<title
|
|
31
|
+
| `PLURNK_XR_APP_NAME` | `.env.defaults` | Trimmed non-empty string (`1`–`80` characters, no Unicode control characters) stamped on `<title>` and `<html data-app-name>`. |
|
|
33
32
|
| `PLURNK_XR_INITIAL_GAIN` | `.env.defaults` | Integer percentage `0`–`100` read through `@plurnk/plurnk-meta` `Knob.integer` with no inline fallback, stamped on `<body data-gain>` to initialize Web Audio master gain (`0.0`–`1.0`). |
|
|
34
33
|
| `PLURNK_XR_INITIAL_VISIBILITY` | `.env.defaults` | Case-insensitive enum `on \| passive \| off` read through `Knob.text`, stamped on `<body data-visibility>` and selecting the initial constellation visibility posture when no persisted preference exists. |
|
|
35
34
|
| `PLURNK_XR_CALLOUT_MS` | `.env.defaults` | Integer duration `1000`–`60000` milliseconds read through `Knob.integer`, stamped on `<html data-callout-ms>` to bound transient reply/termination callout lifetime while open review gates remain pinned. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-xr",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Optional Plurnk daemon module providing a passive WebXR and spatial-audio peripheral awareness surface at /xr.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"esbuild": "0.28.2",
|
|
58
58
|
"eslint": "10.16.0",
|
|
59
59
|
"eslint-plugin-no-unsanitized": "4.1.5",
|
|
60
|
-
"globals": "17.
|
|
60
|
+
"globals": "17.15.0",
|
|
61
61
|
"linkedom": "0.18.15",
|
|
62
62
|
"on_the_money": "0.16.0",
|
|
63
63
|
"stylelint": "18.1.0",
|
package/src/module.js
CHANGED
|
@@ -77,9 +77,7 @@ function productionAssets() {
|
|
|
77
77
|
/**
|
|
78
78
|
* {§xr-host} {§xr-route-settlement} {§xr-configuration} {§xr-package}
|
|
79
79
|
* @param {ModuleAssetSource} [assets]
|
|
80
|
-
* @returns {import("@plurnk/plurnk-modules").DaemonModule<unknown, XrModulePort>
|
|
81
|
-
* readonly surfaces: readonly import("../types/module.js").XrHttpModuleSurface[],
|
|
82
|
-
* }}
|
|
80
|
+
* @returns {import("@plurnk/plurnk-modules").DaemonModule<unknown, XrModulePort>}
|
|
83
81
|
*/
|
|
84
82
|
export default function createModule(assets = productionAssets()) {
|
|
85
83
|
/** @type {import("@plurnk/plurnk-modules").ContainedConfiguration[]} */
|
|
@@ -100,17 +98,6 @@ export default function createModule(assets = productionAssets()) {
|
|
|
100
98
|
const calloutMs = contain(() => readCalloutMs());
|
|
101
99
|
const endpoint = contain(() => parseNotificationsEndpoint(process.env.PLURNK_ACP_URL));
|
|
102
100
|
|
|
103
|
-
const surfaces = contained.length === 0 && appName !== null
|
|
104
|
-
? Object.freeze([
|
|
105
|
-
Object.freeze({
|
|
106
|
-
id: "xr",
|
|
107
|
-
path: "/xr/",
|
|
108
|
-
label: appName,
|
|
109
|
-
glyph: "🥽",
|
|
110
|
-
}),
|
|
111
|
-
])
|
|
112
|
-
: Object.freeze([]);
|
|
113
|
-
|
|
114
101
|
let stopped = false;
|
|
115
102
|
/** @type {Set<Promise<void>>} */
|
|
116
103
|
const requests = new Set();
|
|
@@ -118,7 +105,6 @@ export default function createModule(assets = productionAssets()) {
|
|
|
118
105
|
|
|
119
106
|
return {
|
|
120
107
|
mounts: ["/xr"],
|
|
121
|
-
surfaces,
|
|
122
108
|
contained: Object.freeze(contained),
|
|
123
109
|
setup() {},
|
|
124
110
|
async start(seam) {
|
package/types/module.d.ts
CHANGED
|
@@ -10,13 +10,4 @@ export interface XrModulePort {
|
|
|
10
10
|
readonly credentials?: XrCredentialFace | null;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export
|
|
14
|
-
readonly id: string;
|
|
15
|
-
readonly path: string;
|
|
16
|
-
readonly label: string;
|
|
17
|
-
readonly glyph?: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export default function createModule(): DaemonModule<unknown, XrModulePort> & {
|
|
21
|
-
readonly surfaces: readonly XrHttpModuleSurface[];
|
|
22
|
-
};
|
|
13
|
+
export default function createModule(): DaemonModule<unknown, XrModulePort>;
|