편집자 노트

文件校验

A small, read-only DeepSeek Harness plugin that computes SHA-256 or SHA-512 for a file through the active Harness filesystem provider.

이것은 DeepSeek Harness(DSH) 플러그인입니다. 이 사이트는 GitHub README, 설치 정보, 유지보수 상태, 공개 보안 시그널을 모아 보여줍니다.

업스트림에서 중국어 README를 제공하지 않아 저장소 원본 내용을 표시합니다.

dsh-file-checksum

A small, read-only DeepSeek Harness plugin that computes SHA-256 or SHA-512 for a file through the active Harness filesystem provider.

Unlike text-hashing tools, file_checksum reads the file's raw bytes without placing its contents in the model conversation. It works with the filesystem mounted by the current DSH profile, including compatible remote providers.

Install

Install directly from GitHub into a profile:

dsh plugin --profile web add github:yan9651688/dsh-file-checksum

For reproducible installs, pin a commit:

dsh plugin --profile web add github:yan9651688/dsh-file-checksum#<commit-sha>

Then start that profile as usual:

dsh --profile web --dump-config
dsh --profile web

This repository ships plain ESM JavaScript, so a GitHub install does not need a prepare build or pnpm allowBuilds entry.

Tool

file_checksum accepts:

ParameterRequiredDescription
file_pathyesAbsolute path, or a path relative to the current agent session workspace.
algorithmnosha256 (default) or sha512.
expectednoExpected hexadecimal digest. The tool returns match or mismatch.

Example prompt:

Use file_checksum to verify dist/app.tgz against this SHA-256: <digest>

The canonical result is structured for Native and Code Mode callers:

{
  "path": "/workspace/dist/app.tgz",
  "algorithm": "sha256",
  "digest": "...",
  "bytes": 12345,
  "verification": "match"
}

A checksum mismatch is a successful tool result with verification: "mismatch"; missing, non-regular, oversized, or unreadable files are tool errors.

Configuration

The bundle defaults to a 64 MiB whole-file limit:

- insert:
    - id: file-checksum
      name: dsh-file-checksum
      config:
        maxBytes: 67108864

Override the row in a later profile patch to choose a different positive integer, up to 256 MiB. The limit exists because the current DSH raw-byte filesystem API returns a complete bounded file rather than a byte stream.

Data and safety

  • Reads through ctx.fs; it does not invoke a shell or bypass the active filesystem provider.
  • Reads one regular file and never writes or deletes files.
  • Declares checksum calls exclusive so one Native or Code Mode batch cannot multiply the configured whole-file memory limit.
  • Does not access environment variables, credentials, or the network.
  • Returns the digest, byte count, display path, and verification status; it does not return file contents.
  • Records the successful or missing read through DSH's fs/observed event, matching the built-in file-read behavior.
  • A digest identifies content integrity. It is not encryption and does not make sensitive data safe to share.

Known limitations

  • One file per call; directories and Git tree hashes are not supported.
  • Files larger than maxBytes are rejected rather than streamed or truncated.
  • Separate agents or sessions may still run calls concurrently; each call can buffer up to maxBytes.
  • The plugin is intended for DSH 0.1.0-rc.6 and later compatible 0.1.x releases. DeepSeek Harness is still in developer preview, so breaking upstream changes may require a plugin update.

Development

npm install
npm test
npm pack --dry-run

The tests mount the real Cordis context, tool registry, and local DSH filesystem provider. They cover standard hash vectors, binary bytes, expected-digest comparison, session-relative paths, filesystem observations, error cases, and lifecycle cleanup.

License

MIT

REPOSITORY SIGNALS

보안 및 설치 증거

이 점수는 공개 저장소 메타데이터와 이 사이트에 등록된 설치 증거에만 기반하며, 코드 보안 감사와 다릅니다.

출처 추적 가능

공개 플러그인 카탈로그에서 왔으며, 공개 GitHub 저장소로 연결됩니다.

라이선스

저장소가 MIT 라이선스를 선언했습니다.

유지보수 활동

최근 180일 내 코드 업데이트가 있습니다.

설치 증거

재현 가능한 정확한 설치 메타데이터가 아직 등록되지 않았습니다. 저장소 설명에 따라 직접 확인하세요.

설치 라이프사이클 스크립트

검사한 패키지 메타데이터에 설치 라이프사이클 스크립트가 선언되지 않았습니다.