Hindsight now ships from its maintainer's repo (vectorize-io/hindsight, hindsight-integrations/hermes) through plugin-catalog/hindsight.yaml, so the in-tree copy under plugins/memory/hindsight goes away. Homes that still name `memory.provider: hindsight` are migrated by hermes_cli/memory_provider_migration.py (the `hermes update` hook and the first agent start install the catalog plugin); that path is untouched here. Core-side special cases that only made sense with the bundled copy go with it: the `memory.hindsight` LAZY_DEPS feature, `_provider_pip_dependencies`'s `hindsight-all` expansion in `hermes memory setup` (the plugin's own `_ensure_local_runtime()` installs the embedded runtime now), the compat-manifest pointers of the deleted module, and prose that listed hindsight among the in-tree providers. Generic provider-name lists, the HINDSIGHT_* env hints and the API-key redaction pattern stay — a catalog-installed hindsight still uses them. Revert this commit alone to restore the bundled provider.
35 lines
1.7 KiB
Python
35 lines
1.7 KiB
Python
"""``hermes memory`` subcommand parser."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Callable
|
|
|
|
from hermes_cli.subcommands._shared import add_yes_flag
|
|
|
|
|
|
def build_memory_parser(subparsers, *, cmd_memory: Callable) -> None:
|
|
"""Attach the ``memory`` subcommand to ``subparsers``."""
|
|
memory_parser = subparsers.add_parser(
|
|
"memory", help="Configure external memory provider",
|
|
description="Set up and manage external memory provider plugins.\n\n"
|
|
"Bundled providers: honcho, openviking, mem0, holographic,\n"
|
|
"retaindb, byterover. Catalog providers (e.g. hindsight):\n"
|
|
"hermes plugins install <name>.\n\n"
|
|
"Only one external provider can be active at a time.\n"
|
|
"Built-in memory (MEMORY.md/USER.md) is always active.")
|
|
memory_sub = memory_parser.add_subparsers(dest="memory_command")
|
|
_setup_parser = memory_sub.add_parser(
|
|
"setup", help="Interactive provider selection and configuration")
|
|
_setup_parser.add_argument(
|
|
"provider", nargs="?", default=None,
|
|
help="Provider to configure directly (e.g. honcho), skipping the picker")
|
|
memory_sub.add_parser("status", help="Show current memory provider config")
|
|
memory_sub.add_parser("off", help="Disable external provider (built-in only)")
|
|
_reset_parser = memory_sub.add_parser(
|
|
"reset", help="Erase all built-in memory (MEMORY.md and USER.md)")
|
|
add_yes_flag(_reset_parser)
|
|
_reset_parser.add_argument(
|
|
"--target", choices=["all", "memory", "user"], default="all",
|
|
help="Which store to reset: 'all' (default), 'memory', or 'user'")
|
|
memory_parser.set_defaults(func=cmd_memory)
|