Skip to content

About

Cross-workspace interop Library for DeepSeek Harness: record, index and search files, tools, environments, knowledge and work records across workspaces, with a self-extending file-format library.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

mega-index-map

Chinese documentation: README.zh-CN.md

A cross-workspace Library for DeepSeek Harness. Agents record the objects they meet - files, tools, environments, knowledge, work records - into $DSH_HOME/library, so any conversation can index, search and reuse them.

Every tool says when it is the cheaper answer, because that is what decides whether an agent asks the Library or walks the filesystem: library_query before researching something again, library_detect before looking for a tool or runtime, library_sniff before opening a file to guess its type, and library_index op=audit before walking a directory to see what is in it. For a host that still reaches for the disk, injectPrompt: true (plugin config) prepends a short notice to each session's first user message - replace its wording wholesale with $DSH_HOME/mega-index-prompt.md.

Tools

  • library_record - record an object (change detection routes verify/confirm; a change to the immutable class is refused until the user decides, and is then recorded with confirm: true and a reason, which the log keeps as record-confirm)
  • library_index - three jobs on the index: op=rebuild (default) dedupes/sorts and reports conflicts; op=audit dir=<path> reconciles a directory with the Library read-only, both directions - entries on disk with no record, and records whose path no longer exists (recorded is not the same as addressable); op=index dir=<path> confirm=true registers the missing entries, bounded by depth and an entry ceiling, with the sensitive-content rule applied. A drive root is refused: an indexer that walks a whole disk is the scan this Library exists to replace
  • library_query - search by keyword/type/tags, cursor pagination. A multi-word query is matched term by term and ranked by how many terms each object covers, so several words narrow results instead of requiring that exact phrase; a single word behaves as a plain substring search.
  • library_detect - scan and register this machine's tools/environments. The built-in seed is machine-neutral: a bare command name is resolved from PATH, and a location is written in its owner's own words (%ProgramFiles%, %GOROOT%, %ANDROID_HOME%, ~, ${HOME}), with the newest installed build derived from disk where a location rotates with its version. A tool kept somewhere of your own goes into the per-install candidate pack with add, and propose suggests entries from a directory. A path that does not exist is skipped, and each existing result carries declared: what the file itself states about itself (product/version/vendor, read from its own version resource, statically - the tool is never executed)
  • library_sniff - identify a file by its header bytes (108 signatures), independent of extension
  • library_format - extend this machine's format library: list scan learn add remove deps draft report deliver unseal
  • library_decrypt - read back an isolated sensitive object on request
  • library_export - export to JSON/NDJSON
  • library_encoding - report the host encoding and how to switch to UTF-8
  • library_adb - developer-side Android device operations over ADB

Install

dsh plugin --profile web add github:Nesarf/mega-index-map

Notes

  • The library lives at $DSH_HOME/library (default ~/.dsh/library). Additions learned on this machine live beside it and never override the built-in tables.
  • Work stays local: the plugin performs no network I/O and transmits nothing on its own.
  • Measured cost is linear and small: at 5,000 objects a query takes about 13 ms, a record 19 ms, a rebuild 26 ms (index file around 2.3 MB). Back up or migrate with library_export.
  • Concurrent writers are serialised through a lock file: a lock whose owner died is taken over, and a busy one is waited for for up to two seconds before the write proceeds and says so in the log.
  • This package and the sibling cross-harness build are read-only with respect to each other; nothing here writes outside $DSH_HOME, the OS temp directory or a path the caller passed in, and scripts/check-isolation.mjs enforces both directions (see ISOLATION.md).
  • Three things are held invariant and checked on every push: English/ASCII-only output, Windows/macOS/Linux portability, and UTF-8-safe handling of multi-language text. npm run check runs all of it (ASCII, consistency, portability, isolation), and npm run selfcheck runs the five-stage pass - smoke, traversal, proofread, traversal, smoke - keeping those three axes in view and reporting them per axis.
  • MIT License. See LICENSE.

About

Cross-workspace interop Library for DeepSeek Harness: record, index and search files, tools, environments, knowledge and work records across workspaces, with a self-extending file-format library.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages