skillwiki 0.10.111 → 0.10.112
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/{chunk-TDBUJUYH.js → chunk-25OXNFDV.js} +42 -18
- package/dist/{chunk-6OQLBNKR.js → chunk-ABRYBO4T.js} +29 -4
- package/dist/{chunk-OJJBZDPR.js → chunk-APKDTEVV.js} +178 -210
- package/dist/{chunk-5IBLXGLY.js → chunk-CKQPUHM2.js} +2 -2
- package/dist/chunk-DOHWNPAZ.js +60 -0
- package/dist/{chunk-GQWCTJTU.js → chunk-EE7W3GLA.js} +1 -1
- package/dist/{chunk-KWEYA3OE.js → chunk-FCA3RRNF.js} +1 -1
- package/dist/{chunk-MRPJ7X7W.js → chunk-IR2DI4Y5.js} +3 -3
- package/dist/chunk-K3M6OSUW.js +77 -0
- package/dist/{chunk-I6IRJCUJ.js → chunk-KJG2CSYD.js} +2 -2
- package/dist/chunk-LOVLZNLX.js +111 -0
- package/dist/{chunk-HBJLFPQP.js → chunk-Q6EZF37H.js} +8 -8
- package/dist/{chunk-JQV5KNPT.js → chunk-RR6VDWSI.js} +3 -3
- package/dist/{chunk-PYPPG7RF.js → chunk-SKOLE6US.js} +1 -1
- package/dist/{chunk-X5GL2FCU.js → chunk-TKX6PSWZ.js} +1 -1
- package/dist/cli.js +77 -33
- package/dist/{index-projection-2K672CBO.js → index-projection-UNZG5UJZ.js} +5 -5
- package/dist/{journal-QU5IDXQF.js → journal-5IW3TZ5F.js} +3 -3
- package/dist/{managed-write-preflight-GRSHQYKC.js → managed-write-preflight-L7IRQ76C.js} +7 -7
- package/dist/mcp-auth-env-X5MI5IX6.js +25 -0
- package/dist/{migrate-PIB4QA54.js → migrate-RO4BJP5T.js} +6 -5
- package/dist/mirror-H5BTBAON.js +151 -0
- package/dist/runtime-VMFYW2K3.js +20 -0
- package/dist/skillwiki-mcp.js +14 -12
- package/dist/sources-AOYP6ROO.js +10 -0
- package/dist/{watcher-MHG46J3R.js → watcher-MGHQD3UI.js} +20 -110
- package/package.json +1 -1
- package/skills/.claude-plugin/plugin.json +1 -1
- package/skills/.codex-plugin/plugin.json +1 -1
- package/skills/.cursor-plugin/plugin.json +1 -1
- package/skills/package.json +1 -1
- package/skills/skills/using-skillwiki/SKILL.md +1 -1
- package/skills/skills/wiki-init/SKILL.md +3 -0
- package/skills/using-skillwiki/SKILL.md +1 -1
- package/skills/wiki-init/SKILL.md +3 -0
- package/templates/launchd/com.karlchow.skillwiki-mirror-sse.plist +20 -0
- package/dist/chunk-I2J3IJB7.js +0 -54
- package/dist/runtime-GLMI5OCT.js +0 -15
- package/dist/sources-D2MGP246.js +0 -10
- package/dist/{chunk-UIEQIJXP.js → chunk-7POLZOFY.js} +42 -42
package/dist/chunk-I2J3IJB7.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
ExitCode,
|
|
4
|
-
err,
|
|
5
|
-
isBlockedHost,
|
|
6
|
-
ok
|
|
7
|
-
} from "./chunk-UIEQIJXP.js";
|
|
8
|
-
|
|
9
|
-
// src/commands/fetch-guard.ts
|
|
10
|
-
var REDACT_PARAMS = /* @__PURE__ */ new Set(["api_key", "token", "key", "auth", "password", "secret", "access_token"]);
|
|
11
|
-
var PATH_TOKEN_RE = /[A-Fa-f0-9]{32,}|[A-Za-z0-9_\-]{40,}/g;
|
|
12
|
-
function runFetchGuard(input) {
|
|
13
|
-
return Promise.resolve(runFetchGuardSync(input));
|
|
14
|
-
}
|
|
15
|
-
function runFetchGuardSync(input) {
|
|
16
|
-
let u;
|
|
17
|
-
try {
|
|
18
|
-
u = new URL(input.url);
|
|
19
|
-
} catch {
|
|
20
|
-
return { exitCode: ExitCode.MALFORMED_URL, result: err("MALFORMED_URL", { url: input.url }) };
|
|
21
|
-
}
|
|
22
|
-
const sanitized = sanitizeUrl(u);
|
|
23
|
-
if (u.protocol !== "https:") {
|
|
24
|
-
return {
|
|
25
|
-
exitCode: ExitCode.SCHEME_REJECTED,
|
|
26
|
-
result: err("SCHEME_REJECTED", { sanitized_url: sanitized, scheme: u.protocol })
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
if (isBlockedHost(u.hostname)) {
|
|
30
|
-
return {
|
|
31
|
-
exitCode: ExitCode.HOST_BLOCKED,
|
|
32
|
-
result: err("HOST_BLOCKED", { sanitized_url: sanitized, host: u.hostname })
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
return { exitCode: ExitCode.OK, result: ok({ allowed: true, sanitized_url: sanitized, humanHint: `ALLOWED: ${sanitized}` }) };
|
|
36
|
-
}
|
|
37
|
-
function sanitizeUrl(u) {
|
|
38
|
-
const clone = new URL(u.toString());
|
|
39
|
-
if (clone.username || clone.password) {
|
|
40
|
-
clone.username = "";
|
|
41
|
-
clone.password = "";
|
|
42
|
-
}
|
|
43
|
-
for (const k of Array.from(clone.searchParams.keys())) {
|
|
44
|
-
if (REDACT_PARAMS.has(k.toLowerCase())) clone.searchParams.set(k, "REDACTED");
|
|
45
|
-
}
|
|
46
|
-
let s = clone.toString();
|
|
47
|
-
s = s.replace(PATH_TOKEN_RE, "REDACTED");
|
|
48
|
-
return s;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export {
|
|
52
|
-
runFetchGuard,
|
|
53
|
-
runFetchGuardSync
|
|
54
|
-
};
|
package/dist/runtime-GLMI5OCT.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
conditionalCreateProven,
|
|
4
|
-
evidencePath,
|
|
5
|
-
loadClipCredentials,
|
|
6
|
-
validateRuntime
|
|
7
|
-
} from "./chunk-6OQLBNKR.js";
|
|
8
|
-
import "./chunk-PYPPG7RF.js";
|
|
9
|
-
import "./chunk-UIEQIJXP.js";
|
|
10
|
-
export {
|
|
11
|
-
conditionalCreateProven,
|
|
12
|
-
evidencePath,
|
|
13
|
-
loadClipCredentials,
|
|
14
|
-
validateRuntime
|
|
15
|
-
};
|
package/dist/sources-D2MGP246.js
DELETED
|
@@ -73,6 +73,48 @@ function err(error, detail) {
|
|
|
73
73
|
return detail === void 0 ? { ok: false, error } : { ok: false, error, detail };
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
// ../shared/src/blocked-hosts.ts
|
|
77
|
+
var METADATA_HOSTS = /* @__PURE__ */ new Set([
|
|
78
|
+
"metadata.google.internal",
|
|
79
|
+
"metadata"
|
|
80
|
+
]);
|
|
81
|
+
var METADATA_IPS = /* @__PURE__ */ new Set(["169.254.169.254"]);
|
|
82
|
+
function ipv4ToInt(ip) {
|
|
83
|
+
const parts = ip.split(".");
|
|
84
|
+
if (parts.length !== 4) return null;
|
|
85
|
+
let n = 0;
|
|
86
|
+
for (const p of parts) {
|
|
87
|
+
const v = Number(p);
|
|
88
|
+
if (!Number.isInteger(v) || v < 0 || v > 255) return null;
|
|
89
|
+
n = (n << 8) + v;
|
|
90
|
+
}
|
|
91
|
+
return n >>> 0;
|
|
92
|
+
}
|
|
93
|
+
function inRange(ip, baseStr, prefix) {
|
|
94
|
+
const ipN = ipv4ToInt(ip);
|
|
95
|
+
const baseN = ipv4ToInt(baseStr);
|
|
96
|
+
if (ipN === null || baseN === null) return false;
|
|
97
|
+
const mask = prefix === 0 ? 0 : ~0 << 32 - prefix >>> 0;
|
|
98
|
+
return (ipN & mask) === (baseN & mask);
|
|
99
|
+
}
|
|
100
|
+
function ipv4InCidr(ip, base, prefix) {
|
|
101
|
+
return inRange(ip, base, prefix);
|
|
102
|
+
}
|
|
103
|
+
function isBlockedHost(host) {
|
|
104
|
+
const lower = host.toLowerCase();
|
|
105
|
+
if (METADATA_HOSTS.has(lower)) return true;
|
|
106
|
+
if (METADATA_IPS.has(host)) return true;
|
|
107
|
+
if (lower === "::1") return true;
|
|
108
|
+
if (lower.startsWith("fe80:")) return true;
|
|
109
|
+
if (ipv4ToInt(host) === null) return false;
|
|
110
|
+
if (inRange(host, "10.0.0.0", 8)) return true;
|
|
111
|
+
if (inRange(host, "172.16.0.0", 12)) return true;
|
|
112
|
+
if (inRange(host, "192.168.0.0", 16)) return true;
|
|
113
|
+
if (inRange(host, "169.254.0.0", 16)) return true;
|
|
114
|
+
if (inRange(host, "127.0.0.0", 8)) return true;
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
|
|
76
118
|
// ../shared/src/session-kind.ts
|
|
77
119
|
function resolveSessionKind(input = {}) {
|
|
78
120
|
const env = input.env ?? {};
|
|
@@ -531,48 +573,6 @@ function detectSchema(fm) {
|
|
|
531
573
|
return { schema: null };
|
|
532
574
|
}
|
|
533
575
|
|
|
534
|
-
// ../shared/src/blocked-hosts.ts
|
|
535
|
-
var METADATA_HOSTS = /* @__PURE__ */ new Set([
|
|
536
|
-
"metadata.google.internal",
|
|
537
|
-
"metadata"
|
|
538
|
-
]);
|
|
539
|
-
var METADATA_IPS = /* @__PURE__ */ new Set(["169.254.169.254"]);
|
|
540
|
-
function ipv4ToInt(ip) {
|
|
541
|
-
const parts = ip.split(".");
|
|
542
|
-
if (parts.length !== 4) return null;
|
|
543
|
-
let n = 0;
|
|
544
|
-
for (const p of parts) {
|
|
545
|
-
const v = Number(p);
|
|
546
|
-
if (!Number.isInteger(v) || v < 0 || v > 255) return null;
|
|
547
|
-
n = (n << 8) + v;
|
|
548
|
-
}
|
|
549
|
-
return n >>> 0;
|
|
550
|
-
}
|
|
551
|
-
function inRange(ip, baseStr, prefix) {
|
|
552
|
-
const ipN = ipv4ToInt(ip);
|
|
553
|
-
const baseN = ipv4ToInt(baseStr);
|
|
554
|
-
if (ipN === null || baseN === null) return false;
|
|
555
|
-
const mask = prefix === 0 ? 0 : ~0 << 32 - prefix >>> 0;
|
|
556
|
-
return (ipN & mask) === (baseN & mask);
|
|
557
|
-
}
|
|
558
|
-
function ipv4InCidr(ip, base, prefix) {
|
|
559
|
-
return inRange(ip, base, prefix);
|
|
560
|
-
}
|
|
561
|
-
function isBlockedHost(host) {
|
|
562
|
-
const lower = host.toLowerCase();
|
|
563
|
-
if (METADATA_HOSTS.has(lower)) return true;
|
|
564
|
-
if (METADATA_IPS.has(host)) return true;
|
|
565
|
-
if (lower === "::1") return true;
|
|
566
|
-
if (lower.startsWith("fe80:")) return true;
|
|
567
|
-
if (ipv4ToInt(host) === null) return false;
|
|
568
|
-
if (inRange(host, "10.0.0.0", 8)) return true;
|
|
569
|
-
if (inRange(host, "172.16.0.0", 12)) return true;
|
|
570
|
-
if (inRange(host, "192.168.0.0", 16)) return true;
|
|
571
|
-
if (inRange(host, "169.254.0.0", 16)) return true;
|
|
572
|
-
if (inRange(host, "127.0.0.0", 8)) return true;
|
|
573
|
-
return false;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
576
|
// ../shared/src/error-message.ts
|
|
577
577
|
function getErrorMessage(e) {
|
|
578
578
|
return e instanceof Error ? e.message : String(e);
|