pi-vault-mind 0.14.0 → 0.14.2
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 +2 -1
- package/scripts/pi-session-query +54 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-vault-mind",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "Passive Obsidian vault extension for pi. Watches @agent markers, dispatches forked subagents (Miner, Broadcaster, Heavy-Lifter), stores in LanceDB with vector + FTS + graph. Multi-agent 'Drop & Forget' workflow for the pi agent ecosystem.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@biomejs/biome": "^1.9.0",
|
|
74
|
+
"@davidvkimball/obsidian-dev-skills": "^1.3.1",
|
|
74
75
|
"@earendil-works/pi-coding-agent": "^0.79.0",
|
|
75
76
|
"@earendil-works/pi-tui": "^0.79.0",
|
|
76
77
|
"@types/node": "^20.0.0",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# pi-session-query: A wrapper to allow external agents to query pi session history.
|
|
4
|
+
# Usage: ./pi-session-query [flags] "your search query"
|
|
5
|
+
# Flags:
|
|
6
|
+
# --json Return results in JSON format.
|
|
7
|
+
# --limit <num> Number of results to return (default: 5).
|
|
8
|
+
# --exclude <ids> Comma-separated list of session IDs to ignore.
|
|
9
|
+
|
|
10
|
+
FORMAT="Text"
|
|
11
|
+
LIMIT=5
|
|
12
|
+
EXCLUDE=""
|
|
13
|
+
|
|
14
|
+
# Parse flags
|
|
15
|
+
while [[ "$#" -gt 0 ]]; do
|
|
16
|
+
case $1 in
|
|
17
|
+
--json) FORMAT="JSON"; shift ;;
|
|
18
|
+
--limit) LIMIT="$2"; shift 2 ;;
|
|
19
|
+
--exclude) EXCLUDE="$2"; shift 2 ;;
|
|
20
|
+
-*) echo "Unknown option: $1"; exit 1 ;;
|
|
21
|
+
*) QUERY="$1"; shift ;;
|
|
22
|
+
esac
|
|
23
|
+
done
|
|
24
|
+
|
|
25
|
+
if [ -z "$QUERY" ]; then
|
|
26
|
+
echo "Error: No search query provided."
|
|
27
|
+
echo "Usage: $0 [--json] [--limit num] [--exclude ids] \"your search query\""
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Build the prompt based on flags
|
|
32
|
+
PROMPT="Use the session-history skill to search for: '$QUERY'.
|
|
33
|
+
Limit the results to the top $LIMIT most relevant sessions."
|
|
34
|
+
|
|
35
|
+
if [ -n "$EXCLUDE" ]; then
|
|
36
|
+
PROMPT="$PROMPT
|
|
37
|
+
IMPORTANT: Exclude these session IDs from the results: $EXCLUDE."
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
if [ "$FORMAT" == "JSON" ]; then
|
|
41
|
+
PROMPT="$PROMPT
|
|
42
|
+
Return the results ONLY as a valid JSON array of objects.
|
|
43
|
+
Each object must have: \"id\", \"date\", and \"summary\".
|
|
44
|
+
Do not include any markdown formatting, backticks, or conversational text."
|
|
45
|
+
else
|
|
46
|
+
PROMPT="$PROMPT
|
|
47
|
+
Return ONLY a concise list including:
|
|
48
|
+
- Session ID
|
|
49
|
+
- Date
|
|
50
|
+
- A 1-sentence summary of the relevant content.
|
|
51
|
+
Do not include conversational filler or introductory text."
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
pi "$PROMPT"
|