hanamesh-core: HanaMesh Device Identity and Consent Management Core Plugin

Introduction

When implementing capabilities in DSH that require knowing “who the device is, whether the user consented, and whether the suite components are healthy,” it is often necessary to maintain identity clients, consent/revocation, settings sections, and health checks scattered across multiple locations. HanaMesh consolidates the MOD-02 identity side into an independent npm package hanamesh-core, published by the maintainer yzsnstotz, and categorized as admin-security in the community directory. It integrates into the host as a DSH plugin, providing device identity, consent/revocation, HanaMesh settings sections, suite entries, and health observation; Usage and AppHost need to be installed separately. If components are missing or versions mismatch, there will be clear prompts, but identity and consent remain available.

The following sections describe the positioning, capabilities, installation and enablement, typical usage, and precautions. Facts are subject to the GitHub repository README, package.json, and the bundled documentation.

What is this

hanamesh-core (npm package name hanamesh-core, version 0.3.18 in package.json according to current data) is HanaMesh Core: an implementation of device identity, consent, component health, and suite entries. The directory page description is HanaMesh MOD-02 identity client plugin (plugin-identity).

The host compatibility target is official Desktop/DSH 0.2.x starting from 0.2.0-rc.2 (including 0.2.1-alpha.x). The public DSH peer uses a semver range; the manager checks with includePrerelease=true, but effectively excludes prereleases of the next minor version (<0.3.0-0). Desktop test records can be found in the repository at docs/acceptance/dsh-rc2-compat-20261015.md; declarations do not constitute proof of execution.

Core does not collect events, does not implement application containers or wallet rewards, and does not import Usage/AppHost. Private keys are stored as PKCS8 base64url in the DSH storage-domain JSON and are not output via Core contracts, HTTP, or logs.

Core Functions

Core provides device identity and consent/revocation flows; binding redirects refresh via focus/visibility and do not rely on deep links. Before Core’s first activation, the admin program configures the current loopback/null origins and the sharedIdentityDir within the environment, isolating HOME/DSH_HOME/user data and clearing inherited credentials. Normal profile configuration inputs are detailed in the bundled docs/API.md. Factory legal default values are maintained; device sharing paths are visible in the identity row, and the budget area only displays named values.

Suite and Health Observation

Provides the HanaMesh settings section and suite entries. When a component fails to start, the health row displays whitelisted error codes, identified data domains, reasons, and handling suggestions; read failure reasons wait for up to 250ms, and unknown errors degrade safely. Raw errors, paths, stack traces, or record contents are not stored or displayed. If the data format is incompatible, the documentation suggests backing up first, installing a component version that supports the format, keeping the original data, and re-checking; Core does not migrate data for other components. Before repair, it maintains the repair state and rejects new protected operations; it resumes normal status only after a re-check confirms the component is healthy.

Public Contracts and Exports

Public calls/types and independent deterministic FIXTURE verification vectors are listed in docs/CORE_CONTRACT.md. sign only signs the original Uint8Array; request header signatures are separated from business event signatures.

The main entries in package.json include:

  • Plugin Main Entry: ./lib/dsh.mjs
  • Subpaths: ./contract, ./client, ./suite, etc.
  • CLI: hanamesh-core-contract-suite, hanamesh-core-agent (corresponding to lib/contract-cli.js, lib/agent-cli.js)

Active dependencies @deepseek-ai/dsh-typert-protocol@0.2.1-alpha.2 are declared along with host peers; clean consumers only need to provide the declared host dependencies.

Agent Local Process Interface (Session G, starting from 0.3.5)

node lib/agent-cli.js provides device, consent, signing, registration, binding links, and revocation entries via stdin/stdout JSON without loading DSH. Usage only calls the process protocol and does not import this plugin. The device follows the shared root identity/device.json; agent consent is independent and off by default. state is read-only and does not create directories; any signing/registration waits for consent. After revocation, only fixed DELETE operations for the current device are opened, not arbitrary signing; there is no default online address. Starting from Agent 0.3.6, it signs for explicit consent generations and requires transactional v2 revocation barriers; details can be found in docs/AGENT.md.

Installation and Enablement

The fetched data does not provide a fixed dsh plugin add … command string; please do not construct it yourself based on the repository name. The recommended enablement path is:

  1. Open the plugin page in the SkillHub community directory: https://www.skillhub.cn/plugins/yzsnstotz/hanamesh-core, and install according to the instructions on the page and the current DSH manager (the community directory is an independent site with no official affiliation with DeepSeek/High-Flyer).
  2. Preserve receipts for installation and the actual resolved version/path; declared text is not installation evidence.
  3. Use an isolated DSH_HOME at runtime; the public package does not contain local sibling tgz, development links, or private registry dependencies.

If participating in the build and verification from source (maintainer workflow, not mandatory for regular users), the commands provided in the repository README are:

pnpm install --frozen-lockfile
pnpm build
pnpm test
pnpm check:contracts
pnpm verify:inputs

The build requires Node >=24.13.1 <25, pnpm 10.33.0, TypeScript 5.9.3 (development inputs).

Typical Usage

Inside the DSH Host

After loading as a plugin, configure the profile according to docs/API.md; suite and health status are observed via the UI/logic entries provided by Core. If Usage or AppHost is missing, there will still be prompts, and identity and consent capabilities remain available.

Agent CLI (JSON Process Protocol)

In a built environment, local integration testing or automation can be performed via the agent CLI. Request example (root path and address are explicitly configured by the caller):

node lib/agent-cli.js

stdin example (original text from data):

{"config":{"sharedHome":"<absolute_path>","serverOrigin":null,"websiteOrigin":null},"input":{"operation":"state"}}

A successful return is {result:{…}}; errors are {error:{code}} with exit code 1; private keys are not exported. Process interface details and error codes are in docs/AGENT.md.

The Origin for Server registration POST is serverOrigin; the Server’s trusted Origins must include its own public address.

Contract Verification

pnpm run test:contract

Or use the bin hanamesh-core-contract-suite to run the public contract suite (see docs/CORE_CONTRACT.md).

Applicable Scenarios and Notes

Who is it for

  • Integrators building the HanaMesh suite on DSH 0.2.x who need unified device identity, user consent/revocation, and health observation.
  • Tools or automation that need to be decoupled from Usage and drive identity/consent/signing via the agent process protocol (without directly importing the Core package).

Things to Note

  1. The plugin runs under the current DSH process permissions; before installation, you should review the source code, bundled docs/SECURITY.md, and license yourself. Community inclusion does not represent audit or recommendation.
  2. Core does not migrate data for other components; in case of format incompatibility, follow the documentation to back up, switch to a component version that supports the format, and then re-check health.
  3. Agent/CLI/Unit/Package checks cannot replace real host and owner acceptance; platform evidence in this round of data is macOS arm64 / Node 24.13.1, other platforms are marked as NOT_RUN or have no commitment for support in this round.
  4. Dependencies and peer versions need to align with the host DSH 0.2.x; types and connection public types depend on @deepseek-ai/dsh-typert-protocol@0.2.1-alpha.2.

Conclusion

hanamesh-core consolidates HanaMesh’s device identity, consent/revocation, settings, and health observation into an admin-security oriented DSH Core plugin, decoupled from Usage and AppHost for installation; for local process integration, the hanamesh-core-agent JSON protocol can be used. For further details, see the GitHub repository and bundled docs/API.md, docs/AGENT.md, docs/CORE_CONTRACT.md.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye