npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sparkelf/dsh-plugin-backup

v0.2.9-alpha.125

Published

Full-stack Plus user-data Backup plugin with streamed Host archive routes and Settings UI

Downloads

6,732

Readme


description: "为file-backed DSH user data提供streamed authenticated export、validated restore及browser progress。" kind: "package-reference"

@sparkelf/dsh-plugin-backup

English | 中文

概述

该完整Host及Client plugin导出并恢复三种明确的user-data subset:全部、仅配置或仅会话。配置包含active Settings document、credentials、可选.env及anonymous identity;会话包含Session logs、attachments及storage-backed Workspace/projection state。Export、upload和import通过Host temporary files stream并提供bounded NDJSON progress;import会在mutation前验证versioned manifest、scope、paths及expanded byte total。

目录


使用此软件包

Host entry需mount在connection、webServer、settings及workspaceRegistry之后,Client entry需mount在locale及Settings之后。file-backed Settings provider提供settings.documentPath;归档覆盖Harness home,maxUploadBytes默认为2147483648 bytes。

Settings section使用三段segmented control。全部是配置与会话的并集;它不归档generated profiles、releases、logs、Supervisor files、cached packages或其他runtime output。配置只恢复配置文件,不关闭Session/Workspace storage。会话把sessions、attachments及storages一起放进Workspace storage-restore transaction恢复。Archive manifest记录scope与active Settings filename;含配置的archive在import时要求相同Settings filename。

authenticated routes为POST /api/backup.export.prepare?scope=all|configuration|sessions、GET/HEAD /api/backup.export、POST /api/backup.upload及POST /api/backup.import。每条route会在读取request data前应用Connection Host、Origin及browser-authentication policy。Browser cancellation只结算当前route,绝不会终止Harness Host。Token在十分钟后过期并且single-use,HEAD metadata inspection除外。

一旦restore开始写入,关闭page不会中断replacement。Workspace storage会在file replacement期间关闭并在completion前重新打开;Client会先释放completed progress stream reader,再由UI提供一次explicit reload。Client failure保留在Backup section可见状态,不产生browser console error。


模型体验

Backup operations

模型看到什么

没有内容。@sparkelf/dsh-plugin-backup把Backup archives、progress、failures及restored files留在Host storage和Settings UI;该package不注册model-facing tool、prompt section或Session event。

Token 影响

为零。Backup operations不增加model-request tokens。

KV Cache 影响

独立。Export、import、progress及reload不改变model request prefix。

已知限制和延期工作

  • Overwrite without rollback:restore会替换declared scope内的same-name files,保留archive中不存在的files,并且在mutation开始后disk write失败时不创建rollback copy。
  • 只接受当前archive format:scoped archive使用manifest version 2;pre-release version 1 archive会被拒绝,不猜测其scope。

开发备注

该开发备注是maintainer working context;shipped behavior、limits及rationale以以上sections、package code及linked Agent Note为准。

  • Backup Agent Note持有archive、route、restore及progress decisions;src/index.ts和src/client/BackupSection.tsx持有current behavior。
  • 该package不发布./invariant companion,因为WebServer持有route registration,Workspace持有filesystem state;Backup没有对任一relation的independent second observation。