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.
hook / Classic
hook-dsh-cargo-governor
Keeps Cargo.toml in order without asking
Facts
- Package
- @playform/hook-dsh-cargo-governor
- Version
- 0.2.1
- Kind
- hook
- Release
- Classic
- Licence
- CC0-1.0
- Directory
- Classic/packages/hook-dsh-cargo-governor
What it does
Keeps Cargo.toml in order without asking.
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.
The turn
The same 3 calls on every plugin page, so a reader who moves between plugins stays in the same frame.
| Seq | Call | Outcome |
|---|---|---|
20 | bash ls -la | ok |
21 | write src/index.ts | ok |
22 | read src/index.ts | ok |
Change
The one line that differs with this package installed, transcribed from its source by the dissection.
- Model serde = "2. 0" with the registry at 2.1
- Transcript serde = "2. 1.0"
27 character changed, from 27 to 4.
- Property
- A dependency floor
- Knob
- pinStyle, caret by default
- Seam
- fs/observed
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.
- 01
- seam fs/observed
why
A tool-layer write lands, carrying its path, its actor, and its version token.
- 02Gate: the basename Cargo.toml, a mutation tool, a present observation, the stash, and the exclusion list
why
The gate writes nothing to the ledger; the module composes its own lines.
- 03fail skipped (excluded) <path>
why
Exclusion-first: the internals of a crate are never governed.
- 04Discover the nearest registry.json, and parse it
why
The walk-up is an auxiliary plain-fs probe; the governed manifest is never read here.
- 05branch No registry.json found, or it is unreadable
why
The chain pass is skipped, and the line says which of the two happened.
- 06Plan the pass: chain, strip, and normalize the dependency sections
why
smol-toml is read only to identify the entries, never to stringify them back.
- 07Rewrite the raw lines, so comments and formatting survive
why
The rewrite is surgical: an internal calculation over the text, not a TOML round trip.
- 08branch The refusal guard: a non-dependency section, an unsupported value shape, or an entry missing from the text
why
Each refusal has its own line, and the rewrite is aborted rather than guessed.
- 09GuardedWrite replaceIfVersion, then re-emit fs/observed with the fresh version
why
The author sees its own bytes; the observation policy's version record is refreshed.
- 10Update stage: cargo upgrade through the subprocess seam, then the verify command
why
The exclusion list is enforced at the CLI level, one flag per crate, and a verifier that cannot run is skipped as non-fatal.
- 11branch The circuit breaker: maxUpdateFailures in a row for one directory
why
The directory pauses, and the line carries the count.
- 12store ~/.dsh/playform/hook-dsh-cargo-governor.log
why
The cargo module's own ledger, separate from the npm governor's.
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.
Activation
The one line this package writes when it loads, as a template and as the strings the source composes from it.
activated (k1=v1, k2=v2, ...)- absent field
- A pair whose value is undefined is skipped, so a flavor with no replacement simply omits the pair.
- bare segment
- A pair with an empty key renders its value alone, which is how the governance trio leads with its flavor word.
- present field
- An empty string is a value, not an absence: the invisible flavor writes replacement= to say it removed the family.
- hook-dsh-normalize-quotes
activated (reasoning=on, toolArgs=off, logFile=~/.dsh/hook-dsh-normalize-quotes.log) - hook-dsh-normalize-invisible
activated (replacement=, reasoning=on, toolArgs=off, logFile=~/.dsh/hook-dsh-normalize-invisible.log) - hook-dsh-package-governor
activated (anywhere mode, logFile=~/.dsh/hook-dsh-package-governor.log, updateMode=chain, ncuBin=ncu, exclude=[], policyFile=(discovery)) - hook-dsh-package-pinner
activated (pinner, logFile=~/.dsh/hook-dsh-package-pinner.log, keep=[@types/*])
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.
The harness dispatches fs/observed as a emit and already has listeners there: fs-observation-policy, skill-filesystem, workspace-files.
An emit listener observes a fact that already happened, so the harness's own listeners can record it and cannot change it. This package records beside them, or acts on the world rather than on the payload.
Surface
Every listener, tool, service, and knob the README documents.
| Kind | Name | What |
|---|---|---|
| listener | fs/observed | The Wire-registered observation listener; basename gate Cargo.toml. |
| listener | fs/observed (refresh) | The observation-policy refresh re-emits the service-issued fresh version. |
| service | RegisterGovern("Cargo.toml", "cargo") | The direct-govern chain-pass entry. |
| service | RegisterGovern("Cargo.toml", "update") | The direct-govern update-stage entry. |
| service | update stage (Dispatch/Run) | The detached, contained continuation (cargo upgrade via ctx.subprocess). |
| config | pin-policy.json | The keep-list sidecar (policyFileName, shared discovery via the factory). |
| config | Schemastery Config schema | The exported Config (shared block + the module's own fields). |
| tool | ledger hook-dsh-cargo-governor.log | The module's own log file - separate from the npm ledgers. |
Install
The package as the profile adds it.
pnpm add @playform/hook-dsh-cargo-governorConfiguration
Every knob this plugin documents, with its default.
| Field | Type | Default | Meaning |
|---|---|---|---|
| log | boolean | true | Ledger enabled - write the durable log file (volatile). |
| logFile | string | ~/.dsh/playform/hook-dsh-cargo-governor.log | The CARGO MODULE's OWN ledger - separate from the package governor's (volatile). |
| updateCooldownMs | number | 3000 | Cooldown between update-stage dispatches, per directory (volatile). |
| mutationTools | string[] | ["write", "edit", "str_replace_editor", "raw-write"] | Actor tool names whose fs/observed events trigger the module (volatile). |
| policyFile | string | "" | Global policy file; empty means discovery (Function/Resolve). |
| exclude | string[] | ["node_modules", ".git", ".dsh", ".pnpm", ".store", "DeepSeek Harness.app"] | Excluded path segments (anywhere mode, exclusion-first). |
| strict | boolean | false | Strict chain pass: strip unknown deps (the whole name = "..." entry) in a governed workspace. |
| maxUpdateFailures | number | 3 | Circuit breaker: consecutive update-stage failures per directory before pause. |
| cargoBin | string | "cargo" | Cargo binary for the update stage (bare name resolved through the subprocess seam's resolveExecutable, or an absolute path). |
| keepFile | string | "" | Global pin-policy.json (the keep-list of the full-version normalization directive); empty means discovery. |
| updateMode | string | "cargo" | Update stage mode: "cargo" (the Rust-side CLI through ctx.subprocess) is the only implemented mode. |
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 lists 9 answers at fs/observed, in the order the family registers them.
| Answer | Effect | Position |
|---|---|---|
| hook-dsh-cargo-governor | rewrite | this package |
| hook-dsh-package-governor | rewrite | neighbour |
| hook-dsh-package-pinner | rewrite | neighbour |
| hook-dsh-workspace-approve | record | neighbour |
| hook-dsh-workspace-audit | record | neighbour |
| hook-dsh-workspace-journal | record | neighbour |
| hook-dsh-workspace-merge | rewrite | neighbour |
| hook-dsh-workspace-monitor | record | neighbour |
| hook-dsh-workspace-observe | record | neighbour |
Arms
The seams its source also registers, beyond the one its README documents.
Its source registers no seam beyond the one its README documents.
Twin
The same package in the other release tree, when one exists.
Its twin is ets-hook-dsh-cargo-governor.
It registers the same listeners in the same order and composes the same ledger strings; the ledger file's name, which carries the package identity, and the factory base import are the only differences.
Dependencies
The packages this one imports, and whether each one is the family's own.
| Package | Role |
|---|---|
| family | |
| family | |
| smol-toml | external |
Person
What the person waits for, reads, and never sees.
The person sees the text after the rewrite and not what it replaced, so the change stays invisible unless the source is read beside the result.
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 fs/observed event through the factory's Wire, the direct-govern entries for Cargo.toml, and the subprocess seam.
The silent governor of every written Cargo.toml.
- Gates on the basename, the actor tool, a present observation, the stash, and the exclusion list
- Rewrites dependency pins surgically, so comments and formatting survive the pass
- Runs cargo upgrade as a detached continuation, with the exclusion list enforced at the CLI
- Pauses a directory at the circuit breaker, and never notifies the author
Its shape machine belongs to Person.
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
- 0.2.0
- 0.1.0
- 0.0.1
Source
The package as the repository holds it.
Origin
The files this page was built from, and what each one supplies.
The files this page was read from 5
| File | Contributed | State |
|---|---|---|
| package.json | The name, the version, the private flag, and the dependencies. | read |
| README.md | The summary, the surface table, and the configuration table. | read |
| CHANGELOG.md | The release lines and their versions. | read |
| cordis.patch.yml | Activation: the bundle entry that mounts the plugin. | read |
| Source/Function/Apply.ts | The 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.