mirror of
https://github.com/ranxianglei/billion-context.git
synced 2026-12-03 03:36:15 +08:00
`hermes plugins install <repo>/hermes-plugin` never writes bili.json, so the plugin stood inert on any machine without `bili plugin install hermes`. load_sidecar now falls back to a host-managed copy (node_modules/billion-context) and then to the reference lane (#1196): the global dist via `bili` on PATH. Nothing is written, so the one-writer contract is untouched. plugin.yaml declares every tool/hook/middleware register() installs, so the host validates the real surface instead of a stale subset (hermes_cli/plugin_validate.py fails on undeclared, warns on declared-but-unregistered — the imageRescale=off surface is therefore a warning, never a failure). tests/hermes-native.test.ts covers the ladder end to end: sidecar -> node_modules -> PATH -> inert, plus the realpath/.js guard (a shell wrapper named `bili` is not a dist) and a read-only assertion. The no-sidecar scenario is pinned to a node-only PATH so a machine-wide `bili` can no longer decide its outcome. Proven red on the base: bundled/path resolve to null there. Fixes #6699
20 lines
694 B
YAML
20 lines
694 B
YAML
name: billion-context
|
|
version: "0.0.0"
|
|
description: "billion-context ACP context compression for Hermes: native compress/decompress/acp_status tools, self-spawning proxy on an ephemeral port, plugin-mode headers (installed by `bili plugin install hermes`)"
|
|
author: ranxianglei
|
|
provides_tools:
|
|
- compress
|
|
- decompress
|
|
- acp_status
|
|
- acp_cache
|
|
- search_context
|
|
# withheld when imageRescale is off; the host warns on declared-but-unregistered, never fails
|
|
- acp_read_original_image
|
|
provides_hooks:
|
|
- pre_api_request
|
|
provides_middleware:
|
|
- llm_request
|
|
# alias for hosts that predate provides_hooks (plugins_cmd_catalog reads provides_hooks, then hooks)
|
|
hooks:
|
|
- pre_api_request
|