0.2.0: agent-driven deployment + parity closing (remote index, hygiene, session archive, Hermes scripts) - #1
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
- docs/AGENT-DEPLOY.md: privacy-clean DSH deploy task book (generic, no host-specific paths, credentials policy, per-agent specs, verification) - npm package now ships the Python core (corePath + PYTHONPATH injection); the four plugin tools no longer need a pip install on bare npm install - setup.py agents deprecated (agent-driven wiring replaces scripted writes); init now points at the task book instead of the deprecated command - memory_status surfaces the deployment notice on fresh installs Co-Authored-By: Claude <noreply@anthropic.com>
promote() read keys 分类/内容/来源 (the parsed-pending-list shape) but auto_promote passes review()'s raw entries which use doc/fact/source — so --auto wrote every fact to 情境信息/未归类事实.md and lost the source filename. Now both entry shapes are accepted. The existing test_auto_promotes_in_one_step was false-green: its fact text matched a template placeholder line in the rules note, so the assertion passed regardless of where promote wrote. Strengthened it to use a fact that classifies to rules but is not a template line, and to assert the fact lands in rules, stays out of 未归类事实.md, and keeps its source stamp. Co-Authored-By: Claude <noreply@anthropic.com>
…Hermes scripts Core: - memory search --remote: real remote-index client (Bearer token, local fallback with a stderr note when unconfigured/unreachable/rejected) - setup/remote_index_server.py: dependency-free HTTP index server (/health, /search, Bearer token, TLS warning beyond localhost) - promoter --repair-existing: conservative canonical hygiene (exact duplicates + template placeholders) with backup and --dry-run - memory show <doc>: accept any canonical note under 50-Agent-Context (structured-fact notes), traversal-safe - common: SESSION_DIR/session_dir; vault init creates 会话归档/ Integrations: - integrations/hermes/: inject_context.py (pre-turn pack), daily_cron.py (full daily lifecycle with missed-run recovery guidance), archive_session.py (redacted session archive) Plugin: - memory_search gains an optional remote parameter (wired to core --remote) Docs/version: - DEPLOY/SECURITY/README/ARCHITECTURE updated; 0.2.0 everywhere (package.json already 0.2.0 from the deployment redesign; pyproject synced) Co-Authored-By: Claude <noreply@anthropic.com>
docs/AGENT-DEPLOY.md now resolves via HERE so it works both in a git checkout and inside the npm package, instead of a bare relative path that depends on the process cwd. Co-Authored-By: Claude <noreply@anthropic.com>
Re-audit found the npm tarball (the documented primary install path) was missing most of the deploy surface: - package.json files now ships vault-template/, integrations/hermes/ and all docs, so a bare npm install can create a complete vault via the bundled core (memory init), run the Hermes-style scripts, and resolve doc links. - docs/AGENT-DEPLOY.md documents npm-only equivalents of setup.py (memory init / memory status) for installs without a git checkout. - README.zh.md updated to the agent-driven deployment + parity features (was still describing the old copy-paste flow). - plugin memory_show now accepts *.md canonical notes (structured facts), matching the core's memory show. Verified: npm pack -> unpack -> memory init (bundled core) creates the full vault template; 25/25 tests; privacy grep clean. Co-Authored-By: Claude <noreply@anthropic.com>
redact() required >=8 chars after api_key/access_token/auth_token/secret and >=6 for password, so short values like 'api_key: abc123' leaked through session archiving. Lower the value-length gates to 4 chars (submission-time rejection already catches any api_key:/token: line regardless of length). Adds RedactTest in test_common covering short values and non-erasure of plain text. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85d444c124
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| vault = resolve_vault() | ||
| ensure_vault(vault) | ||
| if args.remote: |
There was a problem hiding this comment.
Allow remote search without a local vault
When a client is configured only with UNIFIED_MEMORY_REMOTE_URL/UNIFIED_MEMORY_REMOTE_TOKEN for the new remote-index flow, this ensure_vault check runs before the remote branch and raises if no local vault is initialized, so no HTTP request is attempted. That breaks the advertised multi-device use case of querying the remote index without sharing the vault; move the vault validation into the local-search path and only require it for the fallback.
Useful? React with 👍 / 👎.
| existing = target.read_text(encoding="utf-8") if target.exists() else "" | ||
| atomic_write(target, existing + "\n".join(body)) |
There was a problem hiding this comment.
Serialize session archive appends
When two post-turn hooks archive to the same daily file concurrently, both processes can read the same existing content and then atomic_write their own replacement, causing the later write to drop the other session block. Wrap the read/append/write sequence in the shared file_lock(vault) or otherwise use a locked append so concurrent agent sessions preserve all archive entries.
Useful? React with 👍 / 👎.
What
docs/AGENT-DEPLOY.md(privacy-clean DSH task book), npm package ships the Python core,setup.py agentsdeprecated, plugin surfaces deployment guidance.memory search --remotereal client +setup/remote_index_server.py(dependency-free HTTP index server, Bearer token, local fallback).promoter --repair-existing(canonical hygiene with backup + dry-run).memory showaccepts any canonical note (structured facts).会话归档/session archive;integrations/hermes/runnable scripts (inject_context / daily_cron / archive_session).promoter --autono longer dumps everything into 未归类事实.md (classification + source stamp);redact()now masks short credential values (session archives).memory initcreates a full vault from the bundled core.Verification
lib/index.js(memory_search/show/submit/status), Hermes scripts, remote server 3-state, Monday-forget branch.CI (core tests + gitleaks) runs on this PR to cover Linux/macOS.
🤖 Generated with Claude Code