DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-session-scope

x

dsh-session-scope

Manifest valid

Per-session workspace scoping for DeepSeek Harness — expose only selected directories to agents with focused and isolated enforcement.

UI (client)hasBundlePatch

[!IMPORTANT] This repository is archived and read-only. The plugin moved into the xarleyn/dsh-plugins monorepo and is published as @yadsh/dsh-session-scope (source: plugins/dsh-session-scope). The legacy unscoped dsh-session-scope package is superseded by @yadsh/dsh-session-scope.


dsh-session-scope

[!IMPORTANT] This repository has been archived.

Development of this plugin has moved to the xarleyn/dsh-plugins monorepo, which is now the canonical home for the project.

Please use the new repository for:

  • new releases and updates;
  • bug reports and feature requests;
  • pull requests and further development.

This repository is kept read-only for historical purposes.

An independent per-session workspace visibility layer for DeepSeek Harness. A session keeps its original workspace and cwd while exposing only explicitly selected workspace directories to the agent.

The central policy rule is:

Permission != Scope

Permission controls effects (read-only, workspace-write, or danger-full-access). Session scope independently controls which part of the workspace is visible (full, focused, or Linux isolated).

Development status

0.5.0 implements the specification through Phase 4. It currently contains:

  • a TypeScript port of the reusable upstream directory picker, path safety, filesystem fence, and sandbox integration;
  • a strict TypeScript session-scope domain model;
  • the durable session-scope/set snapshot and last-write-wins fold;
  • full, focused, and isolated state vocabulary;
  • canonical root validation, nested-root collapse, navigation ancestors, and stable error codes;
  • typed host operations (getScope, setScope, listScopeDirectory, and getScopeCapabilities) plus the /scope command and session-scope projection;
  • pure visibility rules for content vs. navigation paths, filtered directory listings, and scoped glob/grep/search roots;
  • runtime filesystem enforcement carried per session with AsyncLocalStorage, including text and bounded byte reads, plus a monotonic final guard for known path-aware tools;
  • broad glob/grep composition across selected content roots, including fail-closed handling for an omitted path and output path revalidation;
  • model-facing scope context that exposes accessible roots without naming hidden siblings;
  • an independent Scope composer chip and tree picker, separated from the ordinary permission selector;
  • Linux isolated process confinement through DSH's existing bubblewrap provider for one-shot bash and persistent PTY creation;
  • an empty workspace overlay with only selected roots rebound, permission-aware read-only/writable mounts, and a post-mount working directory;
  • functional backend capability detection plus fail-closed handling for unknown runner profiles, partial enforcement, unsupported platforms, and danger-full-access;
  • a process lifecycle fence that prevents scope changes while foreground or background shell jobs and persistent terminals retain an old mount view;
  • scoped pre-step filesystem context for workspace instructions and project skill discovery, while user/OS paths outside the workspace retain ordinary DSH policy;
  • fail-closed LSP calls under selected scope because the current upstream LSP provider indexes the whole session workspace;
  • fork inheritance through the durable seed plus fail-closed subagent initialization before child publication, including nested and resumed children;
  • compatibility folding for legacy workspace-scope/selection sessions;
  • Vitest coverage for the ported primitives and new scope state.

Focused scope covers DSH filesystem services and known path-aware tools, but does not confine arbitrary shell processes. Isolated scope additionally confines DSH's supported bash and PTY launch paths when the Linux provider selects a fully enforcing, recognized bubblewrap profile. It is unavailable on other backends and cannot currently be combined with danger-full-access; these combinations fail closed instead of silently degrading to Focused.

Installation

npm install dsh-session-scope

The package ships the DSH bundle patch as cordis.patch.yml and exposes its server and web-client entry points through the package exports map. Node.js 20 or newer is required.

Development

npm install
npm run check

CI runs the TypeScript build, Vitest suite, package-contract checks, and a packed-plugin composition smoke test against the DSH releases listed in compatibility.json on Linux, macOS, and Windows.

TypeScript sources live in src/; npm run build emits distributable ES modules, source maps, and declarations into lib/. Tests run with Vitest.

Prior art and attribution

The initial directory picker, path canonicalization, filesystem fencing, and sandbox integration were adapted from dsh-workspace-scope-selection by jiangr100, used under the MIT License. The original copyright notice is preserved in LICENSE.

Compatibility

DSH 0.2.1-alpha.2: failedDSH 0.1.7-rc.1: failedDSH 0.1.7-rc.2: failed

Versions

Latest versionPublishedSize
0.5.0——

Comments

Loading…

Similar plugins

dsh-herdr

by wenhao4126

Expose Herdr workspaces, panes, and coding agents as DeepSeek Harness tools.

Development & InfrastructureManifest valid

★ 0

BSD-3-Clause

TypeScript

Aug 26, 2026

dsh plugin --profile web add @dsh-external/dsh-herdr-toolkit

Mirrors other coding agents' sessions into DeepSeek Harness as continuable tasks, one workspace per application.

Terminal & ClientsSessions & MessagesManifest valid

★ 0

dsh plugin --profile web add @local/agent-sync

by ESROAMER

Delegate tasks from Codex to desktop-visible DeepSeek Harness agents, with scoped credentials, persistent sessions and a reusable skill.

Workflow & AutomationSecurity & AuditTools & CapabilitiesManifest valid

★ 1

MIT

JavaScript

Oct 6, 2026

dsh plugin --profile web add @esroamer/codex-dsh-collab

by manny333

Session-scoped checklists for DeepSeek Harness — the agent tracks work as a tree, the model always sees a compact digest, and a read-only sidebar tab mirrors it.

Sessions & MessagesManifest valid

★ 0

MIT

TypeScript

Oct 22, 2026

dsh plugin --profile web add dsh-checklists

by CharlotteN7

Stops a DeepSeek Harness agent from reading your credential files and pasting secrets into tool calls

Manifest valid

★ 0

MIT

TypeScript

Sep 29, 2026

dsh plugin --profile web add dsh-dlp

by sweet-boby

DSH plugin for per-session working directories: keep parallel agent sessions from overwriting each other.

Manifest valid

★ 0

MIT

JavaScript

Sep 23, 2026

dsh plugin --profile web add dsh-session-isolation