@co0ontty/wand 4.89.1 → 4.89.2-beta.g9f64cf7

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.
@@ -9,5 +9,10 @@ export declare function getAiTeamsChunk(requestedHash?: string): {
9
9
  content: string;
10
10
  hash: string;
11
11
  };
12
+ /** Content-versioned WebGL runtime, retaining embedded bytes during an in-flight package replacement. */
13
+ export declare function getPlushAvatarChunk(requestedHash?: string): {
14
+ content: string;
15
+ hash: string;
16
+ };
12
17
  /** Blocking, content-versioned device preference bootstrap. */
13
18
  export declare function getThemePreloadAsset(): VersionedWebAsset;
@@ -24,27 +24,30 @@ function readScriptCache() {
24
24
  // Retain the last disk read, or fall back to the embedded copy.
25
25
  }
26
26
  }
27
- function injectRuntimeValues(source, configPath, chunkHash) {
27
+ function injectRuntimeValues(source, configPath, chunkHash, plushHash) {
28
28
  return source
29
29
  // This is a JS string literal, not HTML text. JSON escaping also handles
30
30
  // quotes, backslashes and newlines in nonstandard configuration paths.
31
31
  .replace('"${wandConfigPath}"', JSON.stringify(configPath))
32
- .replace("${aiTeamsChunkSrc}", `/assets/ai-teams.js?v=${chunkHash}`);
32
+ .replace("${aiTeamsChunkSrc}", `/assets/ai-teams.js?v=${chunkHash}`)
33
+ .replace("${plushAvatarChunkSrc}", `/assets/plush-avatar.js?v=${plushHash}`);
33
34
  }
34
35
  export function getScriptAsset(configPath, requestedHash) {
35
36
  readScriptCache();
36
- const chunkHash = getAiTeamsChunk().hash;
37
+ const teamHash = getAiTeamsChunk().hash;
38
+ const plushHash = getPlushAvatarChunk().hash;
39
+ const chunkHash = `${teamHash}:${plushHash}`;
37
40
  if (!_scriptAsset || _scriptAsset.source !== _scriptCache
38
41
  || _scriptAsset.configPath !== configPath || _scriptAsset.chunkHash !== chunkHash) {
39
42
  _scriptAsset = {
40
- ...versionWebAsset(injectRuntimeValues(_scriptCache, configPath, chunkHash)),
43
+ ...versionWebAsset(injectRuntimeValues(_scriptCache, configPath, teamHash, plushHash)),
41
44
  source: _scriptCache, configPath, chunkHash,
42
45
  };
43
46
  }
44
47
  if (requestedHash && requestedHash !== _scriptAsset.hash) {
45
48
  if (!_embeddedScriptAsset || _embeddedScriptAsset.configPath !== configPath) {
46
49
  _embeddedScriptAsset = {
47
- ...versionWebAsset(injectRuntimeValues(EMBEDDED_WEB_ASSETS.scriptsJs, configPath, embeddedAiTeamsChunk.hash)),
50
+ ...versionWebAsset(injectRuntimeValues(EMBEDDED_WEB_ASSETS.scriptsJs, configPath, embeddedAiTeamsChunk.hash, embeddedPlushAvatarChunk.hash)),
48
51
  configPath,
49
52
  };
50
53
  }
@@ -83,6 +86,23 @@ export function getAiTeamsChunk(requestedHash) {
83
86
  return embeddedAiTeamsChunk;
84
87
  return _aiTeamsChunk;
85
88
  }
89
+ const embeddedPlushAvatarChunk = withHash(EMBEDDED_WEB_ASSETS.plushAvatarJs);
90
+ let plushAvatarChunk = embeddedPlushAvatarChunk;
91
+ let plushAvatarChunkKey = "";
92
+ /** Content-versioned WebGL runtime, retaining embedded bytes during an in-flight package replacement. */
93
+ export function getPlushAvatarChunk(requestedHash) {
94
+ const chunkPath = path.join(__dirname, "content", "plush-avatar.js");
95
+ try {
96
+ const stat = fs.statSync(chunkPath);
97
+ const key = `${stat.mtimeMs}:${stat.size}`;
98
+ if (key !== plushAvatarChunkKey) {
99
+ plushAvatarChunk = withHash(fs.readFileSync(chunkPath, "utf-8"));
100
+ plushAvatarChunkKey = key;
101
+ }
102
+ }
103
+ catch { /* Keep the process's last/embedded version during self-update. */ }
104
+ return requestedHash === embeddedPlushAvatarChunk.hash ? embeddedPlushAvatarChunk : plushAvatarChunk;
105
+ }
86
106
  /** Blocking, content-versioned device preference bootstrap. */
87
107
  export function getThemePreloadAsset() {
88
108
  return themePreloadAsset;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@co0ontty/wand",
3
- "version": "4.89.1",
3
+ "version": "4.89.2-beta.g9f64cf7",
4
4
  "description": "A web console for Claude Code, Codex, OpenCode, and other local CLI tools.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -76,6 +76,7 @@
76
76
  "@types/node": "^22.13.14",
77
77
  "@types/react": "^19.2.17",
78
78
  "@types/react-dom": "^19.2.3",
79
+ "@types/three": "0.186.0",
79
80
  "@types/ws": "^8.18.1",
80
81
  "@xterm/addon-fit": "^0.11.0",
81
82
  "@xterm/xterm": "^6.0.0",
@@ -85,6 +86,7 @@
85
86
  "react": "^19.2.7",
86
87
  "react-dom": "^19.2.7",
87
88
  "tailwindcss": "^4.3.3",
89
+ "three": "0.186.1",
88
90
  "tsx": "^4.19.3",
89
91
  "typescript": "^5.8.2"
90
92
  }