Skip to content

0.2.0: agent-driven deployment + parity closing (remote index, hygiene, session archive, Hermes scripts) - #1

Merged
Noelune merged 8 commits into
mainfrom
feat/parity-0.2.0
Aug 15, 2026
Merged

0.2.0: agent-driven deployment + parity closing (remote index, hygiene, session archive, Hermes scripts)#1
Noelune merged 8 commits into
mainfrom
feat/parity-0.2.0

Conversation

@Noelune

@Noelune Noelune commented Aug 15, 2026

Copy link
Copy Markdown
Owner

What

  • Agent-driven deployment: docs/AGENT-DEPLOY.md (privacy-clean DSH task book), npm package ships the Python core, setup.py agents deprecated, plugin surfaces deployment guidance.
  • Parity closing vs the reference deployment:
    • memory search --remote real 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 show accepts any canonical note (structured facts).
    • Vault 会话归档/ session archive; integrations/hermes/ runnable scripts (inject_context / daily_cron / archive_session).
  • Bug fixes: promoter --auto no longer dumps everything into 未归类事实.md (classification + source stamp); redact() now masks short credential values (session archives).
  • npm-only install path is self-contained: tarball ships vault-template + integrations/hermes + docs; memory init creates a full vault from the bundled core.

Verification

  • 27/27 core tests pass (incl. new tests for repair, remote, show-arbitrary, redaction, and a strengthened auto-promote test).
  • Isolated third-party walkthrough (fake HOME, real npm tarball install): core round-trip, plugin tools via the real lib/index.js (memory_search/show/submit/status), Hermes scripts, remote server 3-state, Monday-forget branch.
  • Privacy: working tree + full git history grep clean of local identifiers.

CI (core tests + gitleaks) runs on this PR to cover Linux/macOS.

🤖 Generated with Claude Code

Noelune and others added 8 commits August 15, 2026 01:36
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>
@Noelune
Noelune merged commit de40f7c into main Aug 15, 2026
3 checks passed
@Noelune
Noelune deleted the feat/parity-0.2.0 branch August 15, 2026 00:59

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +297 to +299
vault = resolve_vault()
ensure_vault(vault)
if args.remote:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +48 to +49
existing = target.read_text(encoding="utf-8") if target.exists() else ""
atomic_write(target, existing + "\n".join(body))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant