DSH familySearch GitHub

hook / Classic

hook-dsh-normalize-invisible

Removes invisible characters from model output

0.2.1 hook Classic

Facts

Package
@playform/hook-dsh-normalize-invisible
Version
0.2.1
Kind
hook
Release
Classic
Licence
CC0-1.0
Directory
Classic/packages/hook-dsh-normalize-invisible

What it does

Removes invisible characters from model output.

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

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.
  1. hook-dsh-normalize-quotes activated (reasoning=on, toolArgs=off, logFile=~/.dsh/hook-dsh-normalize-quotes.log)
  2. hook-dsh-normalize-invisible activated (replacement=, reasoning=on, toolArgs=off, logFile=~/.dsh/hook-dsh-normalize-invisible.log)
  3. hook-dsh-package-governor activated (anywhere mode, logFile=~/.dsh/hook-dsh-package-governor.log, updateMode=chain, ncuBin=ncu, exclude=[], policyFile=(discovery))
  4. 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 llm/stream as a waterfall and already has listeners there: llm-replay, session-checkpoint-policy, session-title.

A waterfall listener receives the payload and may return a changed one, so the harness's own listeners can already change what the model reads. This package adds another listener to that list.

Surface

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

The surfaces hook-dsh-normalize-invisible registers
KindNameWhat
listenerllm/streamnormalizes the zero-width/invisible character family live in the transcript (text/reasoning deltas, assembled block-end blocks, tool arguments gated)
listenertools/post-executeoverpass arm, opt-in via scopes.toolResults (prepended, outermost vs the ccr gate)
listeneragent/pre-stepoverpass arm, opt-in via scopes.batch
config/commandnormalize-overpassarms the one-shot batch overpass, flips scopes.toolResults, reports the scopes - the files sweep is declined

Install

The package as the profile adds it.

Install sh
pnpm add @playform/hook-dsh-normalize-invisible

Configuration

Every knob this plugin documents, with its default.

Configuration of hook-dsh-normalize-invisible
FieldTypeDefaultMeaning
logbooleantruewrite the durable ledger file (volatile)
logFilestring~/.dsh/playform/hook-dsh-normalize-invisible.logthe normalize-invisible ledger (volatile)
replacementstring""the transform's only knob - the empty string (removal); hot-editable, the next stream picks it up with no remount (volatile)
normalizeReasoningbooleantruenormalize reasoning deltas and the assembled reasoning block too
normalizeToolArgumentsbooleanfalserewrite the tool-call argumentsDelta and the assembled ToolCallBlock.arguments when on - execution-critical raw JSON, the user's accepted risk
scopesobjectsee belowgates every arm independently; the whole object is volatile
scopes.conversationbooleantruetext-delta text + the assembled text/reasoning blocks
scopes.reasoningbooleantruethe reasoning-delta sub-gate (ANDed with normalizeReasoning)
scopes.toolInputbooleanfalsethe tool-call arguments arm (OR-ed with normalizeToolArguments)
scopes.toolResultsbooleanfalsethe tools/post-execute arm
scopes.filesbooleantrueinert in a stream flavor (present so one patch override drives the whole family)
scopes.batchbooleanfalsethe agent/pre-step arm
toolResultsExemptstring[]read, edit, raw-write, normalize-file, ccr_retrieve, subagent, ask_user_questiona tool result whose exec name is listed passes the tool-results arm by identity (volatile)

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 6 answers at llm/stream, in the order the family registers them.

The family's answers at llm/stream, in the order the behavior map lists them
AnswerEffectPosition
hook-dsh-normalize-dashrewriteneighbour
hook-dsh-normalize-ellipsisrewriteneighbour
hook-dsh-normalize-fullwidthrewriteneighbour
hook-dsh-normalize-invisiblerewritethis package
hook-dsh-normalize-quotesrewriteneighbour
hook-dsh-normalize-spacesrewriteneighbour

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-hook-dsh-normalize-invisible.

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.

Dependencies of hook-dsh-normalize-invisible
PackageRole
@playform/lib-dsh-corefamily
@playform/plugin-dsh-factoryfamily

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 llm/stream waterfall.

arrives ­ U+00AD  Soft hyphen
the reader sees 0 x U+002E  the default replacement
  • text rewritten
  • reasoning rewritten reasoning
  • tool args passed toolArguments

A kind that is off is passed through untouched, by identity.

Its shape machine belongs to Person.

Table

The family's own character table: the code points it maps, the character each one becomes, and the law it obeys.

Invisible

13  code points

The Invisible family: 13 code points, the character each one arrives as, the character it becomes, and its address.
ArrivesMaps toBecomesCode pointName
­removedU+00ADSoft hyphen
​removedU+200BZero-width space
‌removedU+200CZero-width non-joiner
‍removedU+200DZero-width joiner
‎removedU+200ELeft-to-right mark
‏removedU+200FRight-to-left mark
‪removedU+202ALeft-to-right embedding
‫removedU+202BRight-to-left embedding
‬removedU+202CPop directional formatting
‭removedU+202DLeft-to-right override
‮removedU+202ERight-to-left override
⁠removedU+2060Word joiner
removedU+FEFFZero-width no-break space

No context rule: every zero-width, joiner, bidi, and BOM code point is removed, because the replacement default is the empty string; an edit call, a raw-marked call, and a listed tool result pass by identity.

Transform

The worked example its README documents: the code point it names and the replacement it ships.

  1. normalize-invisible U+200B ​ removed zero-width, joiner, bidi, and BOM characters removed

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.

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/hook-dsh-normalize-invisible
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.absent
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.