clawvault 2.5.3 → 2.5.4
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-3FP5BJ42.js → chunk-4QYGFWRM.js} +1 -1
- package/dist/{chunk-M25QVSJM.js → chunk-AXKYDCNN.js} +1 -1
- package/dist/{chunk-CLE2HHNT.js → chunk-IVRIKYFE.js} +18 -11
- package/dist/{chunk-FG6RJMCN.js → chunk-JDLOL2PL.js} +3 -3
- package/dist/{chunk-AY4PGUVL.js → chunk-KL4NAOMO.js} +1 -1
- package/dist/{chunk-O7XHXF7F.js → chunk-MAKNAHAW.js} +4 -4
- package/dist/{chunk-NZ4ZZNSR.js → chunk-THRJVD4L.js} +1 -1
- package/dist/{chunk-4GBPTBFJ.js → chunk-TIGW564L.js} +1 -1
- package/dist/{chunk-LMEMZGUV.js → chunk-W2HNZC22.js} +2 -2
- package/dist/{chunk-GFJ3LIIB.js → chunk-XAVB4GB4.js} +1 -1
- package/dist/cli/index.js +8 -8
- package/dist/commands/context.js +3 -3
- package/dist/commands/doctor.js +3 -3
- package/dist/commands/embed.js +2 -2
- package/dist/commands/setup.js +2 -2
- package/dist/commands/sleep.js +2 -2
- package/dist/commands/status.js +2 -2
- package/dist/commands/tailscale.js +3 -3
- package/dist/commands/wake.js +2 -2
- package/dist/index.js +10 -10
- package/dist/lib/tailscale.js +2 -2
- package/dist/lib/webdav.js +1 -1
- package/package.json +1 -1
|
@@ -9,17 +9,24 @@ var BLOCKED_PATHS = [
|
|
|
9
9
|
"node_modules"
|
|
10
10
|
];
|
|
11
11
|
var SUPPORTED_METHODS = ["GET", "PUT", "DELETE", "MKCOL", "PROPFIND", "OPTIONS", "HEAD", "MOVE", "COPY"];
|
|
12
|
+
function toRequestSegments(requestPath) {
|
|
13
|
+
return requestPath.replace(/\\/g, "/").split("/").filter(Boolean);
|
|
14
|
+
}
|
|
15
|
+
function isWithinRoot(fullPath, rootPath) {
|
|
16
|
+
const resolvedRoot = path.resolve(rootPath);
|
|
17
|
+
const relative2 = path.relative(resolvedRoot, fullPath);
|
|
18
|
+
return !(relative2.startsWith("..") || path.isAbsolute(relative2));
|
|
19
|
+
}
|
|
12
20
|
function isPathSafe(requestPath, rootPath) {
|
|
13
|
-
|
|
21
|
+
const pathParts = toRequestSegments(requestPath);
|
|
22
|
+
if (pathParts.includes("..")) {
|
|
14
23
|
return false;
|
|
15
24
|
}
|
|
16
|
-
const
|
|
17
|
-
const fullPath = path.resolve(rootPath,
|
|
18
|
-
|
|
19
|
-
if (!fullPath.startsWith(resolvedRoot + path.sep) && fullPath !== resolvedRoot) {
|
|
25
|
+
const normalizedRelativePath = path.normalize(pathParts.join(path.sep));
|
|
26
|
+
const fullPath = path.resolve(rootPath, normalizedRelativePath);
|
|
27
|
+
if (!isWithinRoot(fullPath, rootPath)) {
|
|
20
28
|
return false;
|
|
21
29
|
}
|
|
22
|
-
const pathParts = normalizedPath.split(path.sep);
|
|
23
30
|
for (const part of pathParts) {
|
|
24
31
|
if (BLOCKED_PATHS.includes(part)) {
|
|
25
32
|
return false;
|
|
@@ -28,13 +35,13 @@ function isPathSafe(requestPath, rootPath) {
|
|
|
28
35
|
return true;
|
|
29
36
|
}
|
|
30
37
|
function resolveWebDAVPath(requestPath, rootPath) {
|
|
31
|
-
|
|
38
|
+
const pathParts = toRequestSegments(requestPath);
|
|
39
|
+
if (pathParts.includes("..")) {
|
|
32
40
|
return null;
|
|
33
41
|
}
|
|
34
|
-
const
|
|
35
|
-
const fullPath = path.resolve(rootPath,
|
|
36
|
-
|
|
37
|
-
if (!fullPath.startsWith(resolvedRoot + path.sep) && fullPath !== resolvedRoot) {
|
|
42
|
+
const normalizedRelativePath = path.normalize(pathParts.join(path.sep));
|
|
43
|
+
const fullPath = path.resolve(rootPath, normalizedRelativePath);
|
|
44
|
+
if (!isWithinRoot(fullPath, rootPath)) {
|
|
38
45
|
return null;
|
|
39
46
|
}
|
|
40
47
|
return fullPath;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTailscaleCommands
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-THRJVD4L.js";
|
|
4
4
|
import {
|
|
5
5
|
registerObserveCommand
|
|
6
6
|
} from "./chunk-OSMS7QIG.js";
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./chunk-2YDBJS7M.js";
|
|
10
10
|
import {
|
|
11
11
|
registerContextCommand
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XAVB4GB4.js";
|
|
13
13
|
import {
|
|
14
14
|
registerEmbedCommand
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4QYGFWRM.js";
|
|
16
16
|
import {
|
|
17
17
|
registerInjectCommand
|
|
18
18
|
} from "./chunk-GSD4ALSI.js";
|
|
@@ -235,14 +235,14 @@ var SearchEngine = class {
|
|
|
235
235
|
for (const qr of qmdResults) {
|
|
236
236
|
const filePath = this.qmdUriToPath(qr.file);
|
|
237
237
|
const relativePath = this.vaultPath ? path.relative(this.vaultPath, filePath) : filePath;
|
|
238
|
-
const normalizedRelativePath = relativePath.
|
|
238
|
+
const normalizedRelativePath = relativePath.replace(/\\/g, "/");
|
|
239
239
|
if (normalizedRelativePath.startsWith("ledger/archive/") || normalizedRelativePath.includes("/ledger/archive/")) {
|
|
240
240
|
continue;
|
|
241
241
|
}
|
|
242
|
-
const docId =
|
|
243
|
-
let doc = this.documents.get(docId);
|
|
242
|
+
const docId = normalizedRelativePath.replace(/\.md$/, "");
|
|
243
|
+
let doc = this.documents.get(docId) ?? this.documents.get(docId.split("/").join(path.sep));
|
|
244
244
|
const modifiedAt = this.resolveModifiedAt(doc, filePath);
|
|
245
|
-
const parts =
|
|
245
|
+
const parts = normalizedRelativePath.split("/");
|
|
246
246
|
const docCategory = parts.length > 1 ? parts[0] : "root";
|
|
247
247
|
if (category && docCategory !== category) continue;
|
|
248
248
|
if (tags && tags.length > 0 && doc) {
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
ClawVault,
|
|
12
12
|
findVault
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KL4NAOMO.js";
|
|
14
14
|
import {
|
|
15
15
|
hasQmd
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MAKNAHAW.js";
|
|
17
17
|
import {
|
|
18
18
|
loadMemoryGraphIndex
|
|
19
19
|
} from "./chunk-ZZA73MFY.js";
|
package/dist/cli/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerCliCommands
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-JDLOL2PL.js";
|
|
4
|
+
import "../chunk-THRJVD4L.js";
|
|
5
|
+
import "../chunk-TIGW564L.js";
|
|
6
|
+
import "../chunk-IVRIKYFE.js";
|
|
7
7
|
import "../chunk-OSMS7QIG.js";
|
|
8
8
|
import "../chunk-P5EPF6MB.js";
|
|
9
9
|
import "../chunk-2YDBJS7M.js";
|
|
10
10
|
import "../chunk-YOSEUUNB.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-XAVB4GB4.js";
|
|
12
12
|
import "../chunk-IZEY5S74.js";
|
|
13
13
|
import "../chunk-HRLWZGMA.js";
|
|
14
14
|
import "../chunk-S2IG7VNM.js";
|
|
15
15
|
import "../chunk-5GZFTAL7.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-KL4NAOMO.js";
|
|
17
17
|
import "../chunk-FHFUXL6G.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-4QYGFWRM.js";
|
|
19
|
+
import "../chunk-MAKNAHAW.js";
|
|
20
20
|
import "../chunk-GSD4ALSI.js";
|
|
21
21
|
import "../chunk-K3CDT7IH.js";
|
|
22
22
|
import "../chunk-ITPEXLHA.js";
|
package/dist/commands/context.js
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
contextCommand,
|
|
4
4
|
formatContextMarkdown,
|
|
5
5
|
registerContextCommand
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-XAVB4GB4.js";
|
|
7
|
+
import "../chunk-KL4NAOMO.js";
|
|
8
8
|
import "../chunk-FHFUXL6G.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-MAKNAHAW.js";
|
|
10
10
|
import "../chunk-2CDEETQN.js";
|
|
11
11
|
import "../chunk-ZZA73MFY.js";
|
|
12
12
|
import "../chunk-Z2XBWN7A.js";
|
package/dist/commands/doctor.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
doctor
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-W2HNZC22.js";
|
|
4
4
|
import "../chunk-7ZRP733D.js";
|
|
5
5
|
import "../chunk-4VQTUVH7.js";
|
|
6
6
|
import "../chunk-J7ZWCI2C.js";
|
|
@@ -8,9 +8,9 @@ import "../chunk-IZEY5S74.js";
|
|
|
8
8
|
import "../chunk-HRLWZGMA.js";
|
|
9
9
|
import "../chunk-S2IG7VNM.js";
|
|
10
10
|
import "../chunk-5GZFTAL7.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-KL4NAOMO.js";
|
|
12
12
|
import "../chunk-FHFUXL6G.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-MAKNAHAW.js";
|
|
14
14
|
import "../chunk-ITPEXLHA.js";
|
|
15
15
|
import "../chunk-2CDEETQN.js";
|
|
16
16
|
import "../chunk-ZZA73MFY.js";
|
package/dist/commands/embed.js
CHANGED
package/dist/commands/setup.js
CHANGED
package/dist/commands/sleep.js
CHANGED
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
import "../chunk-5GZFTAL7.js";
|
|
11
11
|
import {
|
|
12
12
|
ClawVault
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-KL4NAOMO.js";
|
|
14
14
|
import "../chunk-FHFUXL6G.js";
|
|
15
15
|
import {
|
|
16
16
|
qmdUpdate
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-MAKNAHAW.js";
|
|
18
18
|
import "../chunk-K3CDT7IH.js";
|
|
19
19
|
import "../chunk-ITPEXLHA.js";
|
|
20
20
|
import "../chunk-2CDEETQN.js";
|
package/dist/commands/status.js
CHANGED
|
@@ -13,13 +13,13 @@ import "../chunk-S2IG7VNM.js";
|
|
|
13
13
|
import "../chunk-5GZFTAL7.js";
|
|
14
14
|
import {
|
|
15
15
|
ClawVault
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-KL4NAOMO.js";
|
|
17
17
|
import "../chunk-FHFUXL6G.js";
|
|
18
18
|
import {
|
|
19
19
|
QmdUnavailableError,
|
|
20
20
|
hasQmd,
|
|
21
21
|
withQmdIndexArgs
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-MAKNAHAW.js";
|
|
23
23
|
import "../chunk-ITPEXLHA.js";
|
|
24
24
|
import "../chunk-2CDEETQN.js";
|
|
25
25
|
import {
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
tailscaleServeCommand,
|
|
9
9
|
tailscaleStatusCommand,
|
|
10
10
|
tailscaleSyncCommand
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-THRJVD4L.js";
|
|
12
|
+
import "../chunk-TIGW564L.js";
|
|
13
|
+
import "../chunk-IVRIKYFE.js";
|
|
14
14
|
import "../chunk-MXSSG3QU.js";
|
|
15
15
|
export {
|
|
16
16
|
registerTailscaleCommands,
|
package/dist/commands/wake.js
CHANGED
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
import "../chunk-7ZRP733D.js";
|
|
5
5
|
import {
|
|
6
6
|
ClawVault
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-KL4NAOMO.js";
|
|
8
8
|
import {
|
|
9
9
|
parseObservationMarkdown
|
|
10
10
|
} from "../chunk-FHFUXL6G.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-MAKNAHAW.js";
|
|
12
12
|
import "../chunk-2CDEETQN.js";
|
|
13
13
|
import "../chunk-ZZA73MFY.js";
|
|
14
14
|
import {
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-ZKGY7WTT.js";
|
|
10
10
|
import {
|
|
11
11
|
setupCommand
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AXKYDCNN.js";
|
|
13
13
|
import {
|
|
14
14
|
registerSyncBdCommand,
|
|
15
15
|
syncBdCommand
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-4IV3R2F5.js";
|
|
30
30
|
import {
|
|
31
31
|
doctor
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-W2HNZC22.js";
|
|
33
33
|
import "./chunk-7ZRP733D.js";
|
|
34
34
|
import {
|
|
35
35
|
graphCommand,
|
|
@@ -49,7 +49,7 @@ import "./chunk-4VQTUVH7.js";
|
|
|
49
49
|
import "./chunk-J7ZWCI2C.js";
|
|
50
50
|
import {
|
|
51
51
|
registerCliCommands
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-JDLOL2PL.js";
|
|
53
53
|
import {
|
|
54
54
|
registerTailscaleCommands,
|
|
55
55
|
registerTailscaleDiscoverCommand,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
tailscaleServeCommand,
|
|
61
61
|
tailscaleStatusCommand,
|
|
62
62
|
tailscaleSyncCommand
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-THRJVD4L.js";
|
|
64
64
|
import {
|
|
65
65
|
CLAWVAULT_SERVE_PATH,
|
|
66
66
|
DEFAULT_SERVE_PORT,
|
|
@@ -81,8 +81,8 @@ import {
|
|
|
81
81
|
serveVault,
|
|
82
82
|
stopTailscaleServe,
|
|
83
83
|
syncWithPeer
|
|
84
|
-
} from "./chunk-
|
|
85
|
-
import "./chunk-
|
|
84
|
+
} from "./chunk-TIGW564L.js";
|
|
85
|
+
import "./chunk-IVRIKYFE.js";
|
|
86
86
|
import {
|
|
87
87
|
SessionWatcher,
|
|
88
88
|
observeCommand,
|
|
@@ -106,7 +106,7 @@ import {
|
|
|
106
106
|
normalizeContextProfileInput,
|
|
107
107
|
registerContextCommand,
|
|
108
108
|
resolveContextProfile
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-XAVB4GB4.js";
|
|
110
110
|
import {
|
|
111
111
|
getObserverStaleness,
|
|
112
112
|
getScaledObservationThresholdBytes,
|
|
@@ -132,12 +132,12 @@ import {
|
|
|
132
132
|
ClawVault,
|
|
133
133
|
createVault,
|
|
134
134
|
findVault
|
|
135
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-KL4NAOMO.js";
|
|
136
136
|
import "./chunk-FHFUXL6G.js";
|
|
137
137
|
import {
|
|
138
138
|
embedCommand,
|
|
139
139
|
registerEmbedCommand
|
|
140
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-4QYGFWRM.js";
|
|
141
141
|
import {
|
|
142
142
|
QMD_INSTALL_COMMAND,
|
|
143
143
|
QMD_INSTALL_URL,
|
|
@@ -148,7 +148,7 @@ import {
|
|
|
148
148
|
hasQmd,
|
|
149
149
|
qmdEmbed,
|
|
150
150
|
qmdUpdate
|
|
151
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-MAKNAHAW.js";
|
|
152
152
|
import {
|
|
153
153
|
buildInjectionResult,
|
|
154
154
|
deterministicInjectMatches,
|
package/dist/lib/tailscale.js
CHANGED
|
@@ -21,8 +21,8 @@ import {
|
|
|
21
21
|
serveVault,
|
|
22
22
|
stopTailscaleServe,
|
|
23
23
|
syncWithPeer
|
|
24
|
-
} from "../chunk-
|
|
25
|
-
import "../chunk-
|
|
24
|
+
} from "../chunk-TIGW564L.js";
|
|
25
|
+
import "../chunk-IVRIKYFE.js";
|
|
26
26
|
export {
|
|
27
27
|
CLAWVAULT_SERVE_PATH,
|
|
28
28
|
DEFAULT_SERVE_PORT,
|
package/dist/lib/webdav.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawvault",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.4",
|
|
4
4
|
"description": "Structured memory system for AI agents — typed storage, knowledge graph, context profiles, canvas dashboards, neural graph themes, and Obsidian-native task views. An elephant never forgets. 🐘",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|