DSH familySearch GitHub

plugin / Classic

plugin-dsh-gitguard

Refuses to touch a dirty tree

0.2.1 plugin Classic

Facts

Package
@playform/plugin-dsh-gitguard
Version
0.2.1
Kind
plugin
Release
Classic
Licence
CC0-1.0
Directory
Classic/packages/plugin-dsh-gitguard

What it does

Refuses to touch a dirty tree.

Read the full description in the README.

Conversation

The turn as a document: the calls every plugin page shares, what this package changes in them, and the order its work happens in.

Conversational

Lane

The same run as time: one row per resource, a bar per span, and the clock every record shares. A wait is drawn as an outline, because nothing is busy.

Session

The tree, the document, and the inspector read one record list. The switch at the top of the document changes the face they read, and the run changes with it.

session 7c41e0a2 | deepseek-v4.1-flash | max | 3 turns | 9 steps | 40 records | simulated

*emit~waterfall=serial>parallel

Add the session view to the trace page. Read the specimens first, then build the lane strip, the tree, the document, and the inspector from one authored run. The family's plugins must be visible on the records they touch, and the page must read the same run with the family off.

Turn 1Read the specimens14 records | 3 steps

Step 12 calls, 265 chars

Step 24 calls, 313 chars

Step 33 calls, 153 chars

Turn 2Write the run13 records | 3 steps

Step 43 calls, 174 chars

Step 52 calls, 258 chars

Step 62 calls, 115 chars

Turn 3Repair the run13 records | 3 steps

Step 72 calls, 143 chars

Step 83 calls, 184 chars

Step 92 calls, 123 chars

The turn

The same 3 calls on every plugin page, so a reader who moves between plugins stays in the same frame.

The 3 calls every plugin page shares, in sequence order
SeqCallOutcome
20bash ls -laok
21write src/index.tsok
22read src/index.tsok

Change

The one line that differs with this package installed, transcribed from its source by the dissection.

  1. Model git add -A reaches the terminal tool
  2. Transcript git guard: refused "git add" (deny-list: git add)

45 character changed, from 33 to  45.

Property
A read-only git policy
Knob
deny, git add by default
Seam
tools/pre-execute

This package ships disabled: the left side of the pair is what the harness does with the package installed but inactive, and enabling it is one line in the profile's bundle patch.

Flow

The order this package's work happens in, with the branch that decides it inline, transcribed from the source; the rule it obeys is the last band of Architecture.

  1. 01
    1. seam tools/pre-execute on the terminal surface
    why

    The dispatch arrives before the command runs.

  2. 02
    branch the working directory matches the exclusion list
    why

    Out of the guard's jurisdiction, silently: next() runs.

  3. 03
    read the command, then split a compound into segments
    why

    The split is on the shell separators, and empty segments are dropped.

  4. 04
    branch no segment is a git command
    why

    The guard judges only git, so next() runs.

  5. 05
    branch strict mode
    why

    Every git command is denied, the read-only checks included.

  6. 06
    branch the subcommand is allow-listed
    why

    The allow list wins over the deny list, so this segment passes.

  7. 07
    deny: the refusal replaces the dispatch, and next() is deliberately not called
  8. 08
    store the ledger: denied <subcommand> (<reason>)
  9. 09
    fail no readable command, or the guard's own error
    why

    next() runs, because the guard never guesses and never breaks a legitimate call.

Harness

The laws the package states, the line it writes when it loads, the seam the harness dispatches with none of the family, and the surface and knobs a run can set.

Default

What the harness does at this package's seam with none of the family installed, so the surface below has something to be a difference from.

No documented seam

The behavior map does not document a seam for this package, so the page cannot show a default to compare against. It is a library, a base, or a package whose work is a tool rather than a listener.

Surface

Every listener, tool, service, and knob the README documents.

The surfaces plugin-dsh-gitguard registers
KindNameWhat
tooltools/pre-executeDENY-LIST intercept on the terminal/exec tool surface is the only registration, and a denial is the pre-execute refusal, never a punish.
toolplugin providesno tool of its own and no service.

Install

The package as the profile adds it.

Install sh
pnpm add @playform/plugin-dsh-gitguard

Configuration

Every knob this plugin documents, with its default.

Configuration of plugin-dsh-gitguard
FieldTypeDefaultMeaning
enabledfalsethe master switch (the IDLE-forever posture)
logtruethe ledger switch (shared cell)
logFile~/.dsh/playform/plugin-dsh-gitguard.logthe ledger
strictfalsethe strict classification mode
policy.*D6 defaultsthe per-action allowlist (see below)

Family

The neighbours at the same seam, the arms beyond it, the twin in the other release tree, and the packages this one needs.

Neighbours

The behavior map documents no seam for this package, so it has no neighbour to name at one.

Arms

The seams its source also registers, beyond the one its README documents.

Twin

The same package in the other release tree, when one exists.

Its twin is ets-plugin-dsh-gitguard.

It registers the same surface under the other runtime, and the two trees differ in the wiring: the Effect tree returns Effect envelopes where this one returns the dispatch envelope.

Dependencies

The packages this one imports, and whether each one is the family's own.

Dependencies of plugin-dsh-gitguard
PackageRole
@playform/lib-dsh-corefamily
@playform/plugin-dsh-factoryfamily

Person

What the person waits for, reads, and never sees.

The person sees the decision once, as the answer the call returns, and never the bytes the check compared or the line it wrote.

Architecture

This plugin's own structure: the shape the portrait gives it, the facts its source documents, and the rule its flow obeys.

Shape

Plugs into the tools/pre-execute waterfall on the terminal surface, and the factory's exclusion match.

The deny-list that makes git read-only in a session, whatever the skills say.

  • A compound command split, and every git subcommand read
  • A mutation denied, and the read-only checks allowed
  • The refusal once, as the pre-execute decision
  • An unreadable command passed, and its own errors failed open

Its shape machine belongs to Person.

Detail

The two lists the guard compares, the order it compares them in, and the lines it leaves.

Refused 23
  • add
  • commit
  • reset
  • push
  • tag
  • rm
  • checkout
  • branch
  • merge
  • stash
  • clean
  • rebase
  • revert
  • cherry-pick
  • mv
  • apply
  • am
  • bisect
  • gc
  • prune
  • worktree
  • submodule
  • notes
Allowed 7
  • status
  • log
  • diff
  • show
  • rev-parse
  • ls-files
  • fetch

 The allow list wins over the deny list, so a subcommand on both lists is allowed and a user can re-allow a denied one explicitly.

Strict Strict mode wins over both: every git command is denied, the read-only checks included.

  1. 01 disabled The guard is off, so the verdict is allow and the cold mount passes everything. enabled=false
  2. 02 not git No segment is a git command, so the verdict is allow: the guard only ever judges git. ls -la
  3. 03 strict Strict mode is on, so the verdict is deny for every git command, the allow list included. strict=true
  4. 04 allow-listed A segment's subcommand is allow-listed, so the verdict is allow, because the allow list wins over the deny list. git status
  5. 05 deny-listed A segment's subcommand is deny-listed, so the verdict is deny, and the reason names the match. deny-list: git add
  6. 06 fallback The subcommand is on neither list, so the verdict is allow. git config
The exact command shapes the guard judges
CommandVerdictWhy
git add -Adenydeny-list: git add
git commit -m xdenydeny-list: git commit
git push --forcedenydeny-list: git push
git reset --harddenydeny-list: git reset
cd repo && git add -Adenya compound is judged by its worst segment
git status; git commit -m xdenythe second segment is denied
GIT_EDITOR=vim git commit -m ydenythe env prefix is skipped before git
git statusallowallow-listed
git --no-pager logallowthe leading flag is skipped
gitallowbare git is not deny-listed
ls -laallownot a git command

One denial writes one ledger line and returns one refusal; the two carry the same subcommand and the same reason.

  1. 01 cold mount gitguard: disabled (enabled=false) ledger
  2. 02 activation gitguard: activated (strict=false, denyPatterns=23, allowPatterns=7) ledger
  3. 03 denial gitguard: denied add (deny-list: git add) ledger
  4. 04 denial gitguard: refused "git add" (deny-list: git add) - git is read-only in this session (the checks-only law). Allowed: git status, log, diff, show, rev-parse, ls-files, fetch. result

Record

The release line, the source, and the files this page was read from.

Release

The versions the package's own changelog records, newest first.

  • 0.3.0
  • 0.2.1

Source

The package as the repository holds it.

Open the package source

Origin

The files this page was built from, and what each one supplies.

The files this page was read from 5
The files behind https://github.com/PlayForm/DeepSeek/tree/Current/Classic/packages/plugin-dsh-gitguard
FileContributedState
package.jsonThe name, the version, the private flag, and the dependencies.read
README.mdThe summary, the surface table, and the configuration table.read
CHANGELOG.mdThe release lines and their versions.read
cordis.patch.ymlActivation: the bundle entry that mounts the plugin.read
Source/Function/Apply.tsThe listeners, their registration order, and the service the flow calls.read
Data
The monorepo, read during the build
Connection
Build-time read; nothing is fetched at runtime
Capture
package.json, README.md, CHANGELOG.md, Source/Function/Apply.ts
Expand provenance source

This page is static. It cannot invoke the plugin, read a ledger, or change a configuration. Every figure comes from those files; a missing README falls back to the manifest's own description, and a package with no surface table shows no surface section.