release: Mnemazine

Local-first memory system: raw material in, finished notes out. Synthesis on write.

This release brings a guided install that explains itself and ends with a live demo
pass, eleven fixes to the knowledge pipeline found by running it against a real
archive of 216 sources, and a documentation pass in the project's own voice.
This commit is contained in:
Зарубин Филипп
2026-08-25 00:38:03 +03:00
parent 17fd8fef5f
commit 4c8213eacd
203 changed files with 24055 additions and 960 deletions
+49 -4
View File
@@ -9,16 +9,61 @@ while IFS= read -r -d '' file; do node --check "$file"; done < <(find scripts te
npm run selftest:security
npm audit --audit-level=moderate
npm run public-check
if [ "${MNEMAZINE_AUDIT_SKIP_PUBLIC_RELEASE:-0}" = "1" ]; then
echo "audit:local public-release scan skipped; run npm run public-check before public release"
else
npm run public-check
fi
if rg -n --glob '!node_modules/**' --glob '!.git/**' --glob '!.mnemazine/**' --glob '!scripts/mnemazine-audit-local.sh' 'StrictHostKeyChecking=(no|accept-new)|root@[a-z0-9][A-Za-z0-9._-]*|(^|[^A-Za-z0-9_])--dangerously-skip-permissions([^A-Za-z0-9_]|$)|https?://[^/[:space:]'\''"]+@' .; then
echo "audit:local failed: dangerous flag or credential URL pattern found." >&2
# Pick a scanner. Prefer ripgrep; fall back to POSIX grep -E so the scan still
# runs on machines without rg. A missing scanner must HARD-FAIL, never silently
# pass — same rule as check-public-release.sh:18-26. Without this: `rg` absent
# returns 127 inside the `if`, `set -euo pipefail` does NOT fire in that context,
# the body is skipped, and the script printed "audit:local passed" WITHOUT scanning.
if command -v rg >/dev/null 2>&1; then
SCANNER=rg
elif command -v grep >/dev/null 2>&1; then
SCANNER=grep
else
echo "audit:local errored: neither 'rg' nor 'grep' is available to scan." >&2
exit 1
fi
if rg -n "fetch\\([^\\n]*(169\\.254\\.169\\.254|metadata\\.google|metadata\\.azure)" scripts webapp; then
DANGEROUS_PATTERN='StrictHostKeyChecking=(no|accept-new)|root@[a-z0-9][A-Za-z0-9._-]*|(^|[^A-Za-z0-9_])--dangerously-skip-permissions([^A-Za-z0-9_]|$)|https?://[^/[:space:]'\''"]+@'
# `.*` (not `[^\n]*`): both scanners are line-based, so this matches identically,
# and it avoids grep-ERE reading `[^\n]` as the class "not backslash or n".
METADATA_PATTERN='fetch\(.*(169\.254\.169\.254|metadata\.google|metadata\.azure)'
scan_dangerous() {
if [ "$SCANNER" = rg ]; then
rg -n --glob '!node_modules/**' --glob '!.git/**' --glob '!.mnemazine/**' --glob '!scripts/mnemazine-audit-local.sh' "$DANGEROUS_PATTERN" .
else
grep -rEn --exclude-dir=node_modules --exclude-dir=.git --exclude-dir=.mnemazine --exclude=mnemazine-audit-local.sh "$DANGEROUS_PATTERN" .
fi
}
status=0; scan_dangerous || status=$?
if [ "$status" -eq 0 ]; then
echo "audit:local failed: dangerous flag or credential URL pattern found." >&2
exit 1
elif [ "$status" -ge 2 ]; then
echo "audit:local errored: scanner '$SCANNER' failed (exit $status) on dangerous-pattern scan." >&2
exit 1
fi
scan_metadata() {
if [ "$SCANNER" = rg ]; then
rg -n "$METADATA_PATTERN" scripts webapp
else
grep -rEn "$METADATA_PATTERN" scripts webapp
fi
}
status=0; scan_metadata || status=$?
if [ "$status" -eq 0 ]; then
echo "audit:local failed: metadata/private fetch pattern found." >&2
exit 1
elif [ "$status" -ge 2 ]; then
echo "audit:local errored: scanner '$SCANNER' failed (exit $status) on metadata scan." >&2
exit 1
fi
echo "audit:local passed"