@meowlynxsea/koi 0.2.18 → 0.2.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meowlynxsea/koi",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "description": "A coding agent built on Pi SDK with TUI + Bun runtime",
5
5
  "module": "src/main.tsx",
6
6
  "type": "module",
@@ -131,7 +131,7 @@ if (existsSync(mainJsPath)) {
131
131
  modified = true;
132
132
  }
133
133
 
134
- // Copy onnxruntime native modules for the current platform
134
+ // Copy native modules for the current platform
135
135
  // Source: parentDir/onnxruntime-node/bin/napi-v3/{os}/{arch}/*
136
136
  // Dest: rootDir/dist/onnx-bin/napi-v3/{os}/{arch}/*
137
137
  const onnxSrcDir = join(parentDir, "onnxruntime-node", "bin", "napi-v3", process.platform, process.arch);
@@ -152,6 +152,29 @@ if (existsSync(mainJsPath)) {
152
152
  console.log(`[DEBUG] onnxruntime source not found: ${onnxSrcDir}`);
153
153
  }
154
154
 
155
+ // Copy clipboard native module
156
+ // Source: parentDir/@mariozechner/clipboard-{platform}/*
157
+ // Dest: rootDir/dist/clipboard.{platform}.node
158
+ const clipboardPattern = `clipboard.${process.platform}-${process.arch}-msvc.node`;
159
+ const clipboardSrcDirs = [
160
+ join(parentDir, "@mariozechner"),
161
+ ];
162
+
163
+ for (const srcBase of clipboardSrcDirs) {
164
+ if (!existsSync(srcBase)) continue;
165
+ const entries = readdirSync(srcBase, { withFileTypes: true });
166
+ for (const entry of entries) {
167
+ if (entry.name.startsWith("clipboard-")) {
168
+ const clipboardSrc = join(srcBase, entry.name, clipboardPattern);
169
+ const clipboardDest = join(rootDir, "dist", clipboardPattern);
170
+ if (existsSync(clipboardSrc) && !existsSync(clipboardDest)) {
171
+ cpSync(clipboardSrc, clipboardDest);
172
+ console.log(`Copied clipboard: ${entry.name}/${clipboardPattern}`);
173
+ }
174
+ }
175
+ }
176
+ }
177
+
155
178
  if (modified) {
156
179
  writeFileSync(mainJsPath, content);
157
180
  console.log("Fixed dynamic imports in main.js for Windows compatibility");