Pular para o conteúdo principal
Z

dsh-sensorium

ztan4706/dsh-sensorium

Ten interoceptive senses for a DSH agent: workspace pulse, time, affect, needs, expression, silence, residue, open loops, body and face — deterministic state that keeps moving on its own.

Instalar

dsh plugin --profile web add github:ztan4706/dsh-sensorium

README

Sensorium

Ten interoceptive senses for an agent that lives in a workspace. One npm package, one patch, ten rows — install once, all ten are there.

Most "personality plugins" are prompts. A prompt never gets tired, never empties while nobody talks to it, and never settles after a busy day. Sensorium is computed state instead: exponential decay, integration over time, signals taken from file mtimes and real conversation. Deterministic, zero model calls. Time passes through it even when the agent is not around.

  • Package: dsh-sensorium
  • Version: 0.1.1
  • License: MIT
  • Author: Bao · E-1021

Install

dsh plugin --profile <your-profile> add dsh-sensorium

From a local checkout (before publishing):

git clone https://github.com/ztan4706/dsh-sensorium.git
dsh plugin --profile <profile> add link:/absolute/path/dsh-sensorium

Or point plugin_manager's install_bundle at the directory. Restart DSH afterwards — plugin modules are cached by URL. All ten rows are inserted into the profile's patch layer in one go.

Configure

All ten senses share one workspace — the project directory you want them to observe. State lands in <workspace>/.dsh/sensory/. Three ways to set it, highest priority first:

  1. Override the rows by id in your own profile patch:

    - id: sensorium-need-tension
      name: dsh-sensorium
      config:
        workspace: "/absolute/path/to/project"
    
  2. Environment variable SENSORIUM_WORKSPACE

  3. Fall back to the host process's process.cwd()

⚠️ The third option is only a fallback. Inside DSH the host's cwd is often the app or profile directory, and state would be written there. Since 0.0.1 the plugin prints a console warning when that happens — set workspace explicitly for real use.

Want only a few of them? Disable the rest by id:

- id: sensorium-face
  disabled: true

The ten

#SenseToolWhat it tracks
01workspace_pulsesense_workspace_pulseHow busy the room is: changes in the last 30 min, quiet minutes, a 24 h sample series
02time_sensesense_time_senseClock, day phase, late-night flag
03affect_coresense_affect_coreValence / arousal / dominance, decaying toward baseline
04need_tensionsense_need_tensionConnection / stimulation / resolution, integrated over time, fed by real dialogue
05expression_biassense_expression_biasTone / initiative / mask
06silence_gatesense_silence_gateWhether to speak at all — silence is a valid output
07residue_tracesense_residue_traceEmotional aftertaste; strong events linger longer
08unresolved_weightsense_unresolved_weightOpen loops that grow heavier with age (the only sense that takes input)
09bodysense_bodyPosture, tail, ears, hands — shown only when something changed
10facesense_faceEyes, brows, mouth, and the one tell that escapes

Read order: outside (01–02) → inside (03–04) → expression (05–06, 09–10) → metabolism (07–08). Each sense writes only its own state file.

How time works

  • It moves on its own. The pulse samples every 2 minutes; needs and affect settle every 5 minutes. Nothing waits to be called.
  • Integrated in slots, not collapsed into one reading. Leave for 15 hours and thirty half-hour slots are actually walked: quiet slots decay, active slots replenish a little.
  • It backfills. On first start with no sample history, file mtimes reconstruct the last 24 hours — a power cut does not erase a day.
  • Real dialogue counts separately. The plugin listens to agent/inbox/claimed; each message from this workspace is recorded and feeds connection and stimulation only. Files changing no longer pretend to be someone talking to you.

Formulas, parameters and two mistakes worth reading: docs/design.md. Plugin-combination risks and a self-check list: docs/compatibility.md.

Self-test

node tests/selftest.mjs      # cross-sense regression: does time actually pass?
node tests/apply-smoke.mjs   # apply all ten like the host does; ten tools must register

Versioning

MAJOR.MINOR.PATCH, starting at 0.0.1.

  • MAJOR: state file format, tool names or config keys change incompatibly.
  • MINOR: new sense, new field, new behavior (backwards compatible).
  • PATCH: bug fix, constant tweak, wording.

During 0.x a MINOR may still break things — the API settles at 1.0. Every release gets a CHANGELOG.md entry and a git tag (v0.0.1).

Listing

  1. npm publish (public package; engines.dsh declares the compatible host range).
  2. Open a PR against awesome-dsh-plugin adding one entry; the DSH plugin market picks it up automatically, usually within a day.
  3. Market cards read description, keywords (including dsh-plugin) and the README.

Limits (honest)

  • activity_level is a proxy for file activity, not conversation; dialogue is tracked separately and only feeds connection and stimulation.
  • Whether a message belongs to "this workspace" depends on the session's cwd; when it cannot be resolved, every message counts.
  • No UI. These are states and tools, not a screen.
  • The constants are chosen, not fitted. Change the numbers at the top of each plugin file to change the tempo.

License

MIT · Bao · E-1021

Plugins relacionados