@cortexkit/aft 0.47.0 → 0.47.1
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/dist/index.js +44 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2535,6 +2535,49 @@ function markAnnouncementSeen(storageRoot, harness, currentVersion) {
|
|
|
2535
2535
|
writeFileSync(versionFile, currentVersion);
|
|
2536
2536
|
} catch {}
|
|
2537
2537
|
}
|
|
2538
|
+
function decodeFileUrl(target) {
|
|
2539
|
+
if (!target.startsWith("file:"))
|
|
2540
|
+
return target;
|
|
2541
|
+
const rest = target.slice("file:".length);
|
|
2542
|
+
let pathPart;
|
|
2543
|
+
if (rest.startsWith("//")) {
|
|
2544
|
+
const after = rest.slice(2);
|
|
2545
|
+
const slash = after.indexOf("/");
|
|
2546
|
+
const authority = slash === -1 ? after : after.slice(0, slash);
|
|
2547
|
+
const p = slash === -1 ? "" : after.slice(slash);
|
|
2548
|
+
if (authority === "" || authority === "localhost")
|
|
2549
|
+
pathPart = p;
|
|
2550
|
+
else if (process.platform === "win32")
|
|
2551
|
+
pathPart = `//${authority}${p}`;
|
|
2552
|
+
else
|
|
2553
|
+
return target;
|
|
2554
|
+
} else if (rest.startsWith("/")) {
|
|
2555
|
+
pathPart = rest;
|
|
2556
|
+
} else {
|
|
2557
|
+
return target;
|
|
2558
|
+
}
|
|
2559
|
+
const bytes = [];
|
|
2560
|
+
for (let i = 0;i < pathPart.length; ) {
|
|
2561
|
+
if (pathPart[i] === "%" && i + 2 < pathPart.length) {
|
|
2562
|
+
const hex = pathPart.slice(i + 1, i + 3);
|
|
2563
|
+
if (/^[0-9a-fA-F]{2}$/.test(hex)) {
|
|
2564
|
+
bytes.push(Number.parseInt(hex, 16));
|
|
2565
|
+
i += 3;
|
|
2566
|
+
continue;
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
const cp = pathPart.codePointAt(i);
|
|
2570
|
+
const ch = String.fromCodePoint(cp);
|
|
2571
|
+
for (const b of Buffer.from(ch, "utf8"))
|
|
2572
|
+
bytes.push(b);
|
|
2573
|
+
i += ch.length;
|
|
2574
|
+
}
|
|
2575
|
+
const decoded = Buffer.from(bytes).toString("utf8");
|
|
2576
|
+
if (process.platform === "win32" && /^\/[A-Za-z]:/.test(decoded)) {
|
|
2577
|
+
return decoded.slice(1);
|
|
2578
|
+
}
|
|
2579
|
+
return decoded;
|
|
2580
|
+
}
|
|
2538
2581
|
var init_paths = () => {};
|
|
2539
2582
|
|
|
2540
2583
|
// ../aft-bridge/dist/resolver.js
|
|
@@ -7546,6 +7589,7 @@ __export(exports_dist, {
|
|
|
7546
7589
|
ensureOnnxRuntime: () => ensureOnnxRuntime,
|
|
7547
7590
|
ensureBinary: () => ensureBinary,
|
|
7548
7591
|
downloadBinary: () => downloadBinary,
|
|
7592
|
+
decodeFileUrl: () => decodeFileUrl,
|
|
7549
7593
|
createStatusBarEmitState: () => createStatusBarEmitState,
|
|
7550
7594
|
createAftTransportPool: () => createAftTransportPool,
|
|
7551
7595
|
compressionSavingsPercent: () => compressionSavingsPercent,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Unified CLI for Agent File Tools (AFT) — setup, doctor, and diagnostics across supported agent harnesses (OpenCode, Pi)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@clack/prompts": "^1.6.0",
|
|
27
|
-
"@cortexkit/aft-bridge": "0.47.
|
|
27
|
+
"@cortexkit/aft-bridge": "0.47.1",
|
|
28
28
|
"comment-json": "^4.6.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|