gm-skill 2.0.1332 → 2.0.1333
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/gm-plugkit/package.json +1 -1
- package/gm-plugkit/plugkit-wasm-wrapper.js +23 -1
- package/gm.json +1 -1
- package/package.json +1 -1
package/gm-plugkit/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-plugkit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1333",
|
|
4
4
|
"description": "Bootstrap and daemon-spawn tool for gm plugkit binary. Downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Includes plugkit-wasm-wrapper for WASM-based spool watching.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -2344,7 +2344,29 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
2344
2344
|
}
|
|
2345
2345
|
|
|
2346
2346
|
try {
|
|
2347
|
-
const
|
|
2347
|
+
const rawBuf = fs.readFileSync(filePath);
|
|
2348
|
+
let content;
|
|
2349
|
+
let _detectedEncoding = 'utf-8';
|
|
2350
|
+
if (rawBuf.length >= 2 && rawBuf[0] === 0xFF && rawBuf[1] === 0xFE) {
|
|
2351
|
+
content = rawBuf.slice(2).toString('utf16le');
|
|
2352
|
+
_detectedEncoding = 'utf-16le-bom';
|
|
2353
|
+
} else if (rawBuf.length >= 2 && rawBuf[0] === 0xFE && rawBuf[1] === 0xFF) {
|
|
2354
|
+
const swapped = Buffer.alloc(rawBuf.length - 2);
|
|
2355
|
+
for (let i = 2; i + 1 < rawBuf.length; i += 2) {
|
|
2356
|
+
swapped[i - 2] = rawBuf[i + 1];
|
|
2357
|
+
swapped[i - 1] = rawBuf[i];
|
|
2358
|
+
}
|
|
2359
|
+
content = swapped.toString('utf16le');
|
|
2360
|
+
_detectedEncoding = 'utf-16be-bom';
|
|
2361
|
+
} else if (rawBuf.length >= 3 && rawBuf[0] === 0xEF && rawBuf[1] === 0xBB && rawBuf[2] === 0xBF) {
|
|
2362
|
+
content = rawBuf.slice(3).toString('utf8');
|
|
2363
|
+
_detectedEncoding = 'utf-8-bom';
|
|
2364
|
+
} else {
|
|
2365
|
+
content = rawBuf.toString('utf8');
|
|
2366
|
+
}
|
|
2367
|
+
if (_detectedEncoding !== 'utf-8') {
|
|
2368
|
+
try { logEvent('plugkit', 'spool.body-encoding-recoded', { task: path.basename(filePath, path.extname(filePath)), encoding: _detectedEncoding, bytes: rawBuf.length }); } catch (_) {}
|
|
2369
|
+
}
|
|
2348
2370
|
const relPath = path.relative(inDir, filePath);
|
|
2349
2371
|
const dir = path.dirname(relPath);
|
|
2350
2372
|
const verb = dir === '.' ? path.basename(filePath, path.extname(filePath)) : dir;
|
package/gm.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1333",
|
|
4
4
|
"description": "Canonical universal harness — AI-native software engineering via skill-driven orchestration; bootstraps plugkit for task execution and session isolation. Install in any AI coding agent host.",
|
|
5
5
|
"author": "AnEntrypoint",
|
|
6
6
|
"license": "MIT",
|