mind-palace-graph 0.3.0

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.
Files changed (51) hide show
  1. package/INSTALL.md +387 -0
  2. package/README.md +602 -0
  3. package/dist/api.d.ts +682 -0
  4. package/dist/api.js +660 -0
  5. package/dist/api.js.map +1 -0
  6. package/dist/cli.d.ts +95 -0
  7. package/dist/cli.js +856 -0
  8. package/dist/cli.js.map +1 -0
  9. package/dist/format.d.ts +16 -0
  10. package/dist/format.js +199 -0
  11. package/dist/format.js.map +1 -0
  12. package/dist/fuzzy.d.ts +45 -0
  13. package/dist/fuzzy.js +150 -0
  14. package/dist/fuzzy.js.map +1 -0
  15. package/dist/index.d.ts +9 -0
  16. package/dist/index.js +528 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/mcp-server.d.ts +24 -0
  19. package/dist/mcp-server.js +187 -0
  20. package/dist/mcp-server.js.map +1 -0
  21. package/dist/mind-palace.d.ts +148 -0
  22. package/dist/mind-palace.js +780 -0
  23. package/dist/mind-palace.js.map +1 -0
  24. package/dist/nodes.d.ts +57 -0
  25. package/dist/nodes.js +220 -0
  26. package/dist/nodes.js.map +1 -0
  27. package/dist/pagination.d.ts +41 -0
  28. package/dist/pagination.js +63 -0
  29. package/dist/pagination.js.map +1 -0
  30. package/dist/palace-format.d.ts +30 -0
  31. package/dist/palace-format.js +146 -0
  32. package/dist/palace-format.js.map +1 -0
  33. package/dist/rg.d.ts +34 -0
  34. package/dist/rg.js +288 -0
  35. package/dist/rg.js.map +1 -0
  36. package/dist/sources.d.ts +87 -0
  37. package/dist/sources.js +457 -0
  38. package/dist/sources.js.map +1 -0
  39. package/dist/tokens.d.ts +35 -0
  40. package/dist/tokens.js +95 -0
  41. package/dist/tokens.js.map +1 -0
  42. package/dist/types.d.ts +236 -0
  43. package/dist/types.js +8 -0
  44. package/dist/types.js.map +1 -0
  45. package/package.json +67 -0
  46. package/skills/mpg-context/SKILL.md +556 -0
  47. package/skills/mpg-context/references/anti-patterns.md +133 -0
  48. package/skills/mpg-context/references/integration.md +123 -0
  49. package/skills/mpg-context/references/mind-palace.md +217 -0
  50. package/skills/mpg-context/references/multi-agent.md +147 -0
  51. package/skills/mpg-context/references/sources.md +120 -0
@@ -0,0 +1,120 @@
1
+ # Sources — what mpg can search
2
+
3
+ mpg can search **four** kinds of sources. Pick the right one for the
4
+ question.
5
+
6
+ | Source | Flag | Use when |
7
+ | :--- | :--- | :--- |
8
+ | Files / dirs / globs | `--in <path>` | Codebase exploration (most common) |
9
+ | Command stdout | `--cmd "<command>"` | Searching `git log`, `npm ls`, build output, etc. |
10
+ | URL body | `--url <url>` | Searching docs pages, API responses |
11
+ | Stdin | `--stdin` (auto when piped) | Ad-hoc pipelines |
12
+
13
+ ## `--in` path syntax
14
+
15
+ `--in` is greedy and accepts every form below:
16
+
17
+ | Form | Meaning |
18
+ | :--- | :--- |
19
+ | `--in path/to/file` | A single file. |
20
+ | `--in path/to/dir` | A directory — recurses into all files. |
21
+ | `--in '**/*.ts'` | A glob. Quote it so the shell doesn't expand first. |
22
+ | `--in src/ test/ docs/` | Multiple paths in one flag. |
23
+ | `--in src/,test/,docs/` | Comma-separated list. |
24
+ | `--in @list.txt` | Read paths from a file (one per line, `#` comments allowed). |
25
+ | `--in @-` | Read paths from stdin (one per line). |
26
+ | `mpg PATTERN path/ ...` | Trailing positionals also work (rg-style). |
27
+
28
+ To pass a path that starts with `-`, prefix it with `./` (so
29
+ `./-weird-name`) or use the `@file` syntax.
30
+
31
+ ## File filtering
32
+
33
+ Layered on top of `--in`:
34
+
35
+ | Flag | What it does |
36
+ | :--- | :--- |
37
+ | `--include <glob>` | Only files matching glob (repeatable). |
38
+ | `--exclude <glob>` | Skip files matching glob (repeatable). |
39
+ | `--type <lang>` | ripgrep file-type filter: `ts`, `rust`, `py`, `go`, etc. |
40
+ | `--hidden` | Include dotfiles and `.dotdirs`. |
41
+ | `--no-ignore` | Don't respect `.gitignore`. |
42
+
43
+ ```bash
44
+ # All TS files except tests
45
+ mpg "TODO" --in src/ --type ts --exclude '*.test.ts'
46
+
47
+ # Include hidden + ignored files
48
+ mpg "API_KEY" --in . --hidden --no-ignore
49
+ ```
50
+
51
+ ## `--cmd` — search command stdout
52
+
53
+ Captures the stdout of a shell command and searches it. Stderr is
54
+ discarded.
55
+
56
+ ```bash
57
+ # Find error lines in the last 100 commits
58
+ mpg "error|fix|bug" --cmd "git log --oneline -100"
59
+
60
+ # Look for deprecation warnings in build output
61
+ mpg "deprecated" --cmd "npm run build"
62
+
63
+ # Combine with stash
64
+ mpg "TODO" --cmd "git log --pretty=%B -200" \
65
+ --mp-stash recent-todos "TODOs from recent commit messages"
66
+ ```
67
+
68
+ Caveats:
69
+ - The command is split on whitespace — no shell features (pipes,
70
+ redirects) inline. If you need them, wrap in `bash -c "..."`.
71
+ - Output is buffered in memory (cap: 64 MB).
72
+ - Sources resolve as `cmd:<command>` in node attribution.
73
+
74
+ ## `--url` — search HTTP body
75
+
76
+ GETs a URL and searches the response body as text.
77
+
78
+ ```bash
79
+ # Search a public docs page
80
+ mpg "rate.limit" -u https://api.example.com/docs
81
+
82
+ # Combine with --format json to feed back into a research agent
83
+ mpg "deprecated" -u https://example.com/changelog --format json
84
+ ```
85
+
86
+ Caveats:
87
+ - Follows redirects.
88
+ - Sends `User-Agent: mpg/0.1`.
89
+ - The full body is downloaded — don't point at gigabyte assets.
90
+ - No JS execution; SPA-rendered pages won't have their dynamic content.
91
+
92
+ ## `--stdin` — pipe content in
93
+
94
+ Auto-detected when stdin is not a TTY. Useful for ad-hoc pipelines.
95
+
96
+ ```bash
97
+ cat README.md | mpg "install"
98
+
99
+ curl -s https://api.example.com/feed | mpg "ERROR" --effort deep
100
+
101
+ kubectl logs my-pod | mpg "panic|fatal" --effort quick
102
+ ```
103
+
104
+ Caveats:
105
+ - Stdin is read once and cached (so both content-from-stdin and path
106
+ list `--in @-` can coexist in one invocation).
107
+ - Sources resolve as `stdin:` in node attribution.
108
+
109
+ ## Combining sources
110
+
111
+ `--in`, `--cmd`, `--url`, `--stdin` can all coexist in a single
112
+ invocation. Each becomes a separate source in the result.
113
+
114
+ ```bash
115
+ # Search the codebase, git log, AND a docs URL in one shot
116
+ mpg "deprecated" \
117
+ --in src/ \
118
+ --cmd "git log --oneline -200" \
119
+ -u https://example.com/changelog
120
+ ```