mirror of
https://github.com/vectorize-io/hindsight.git
synced 2026-09-14 19:31:49 +08:00
28760f62d4
Adds `dsh` as a persistent-plugin harness: a native Cordis plugin that binds
DeepSeek Harness's typed lifecycle events to the shared RuntimeCore.
agent/session-start -> seedIfCold (cold check + background seed)
agent/pre-step -> onPrompt (recall) + the injection as a
`{kind:'plugin', form:'recall'}` message
agent/turn-stopping -> onSessionIdle (write-back of the completed exchange)
ctx.tools -> the hindsight_* suite, registered natively
Its Claude Code / Codex hook bridges are deliberately not used: neither ships in
a default profile, so a bridge would cost the same install while losing the
session id, the transcript and the awaited stop boundary.
dsh is the first host where ONE process serves SEVERAL repositories — its Web UI
opens each session in whatever directory the user picks — so the bank, client and
seed are resolved per session workspace and the core is constructed with that
workspace root, which is what binds the tools' git checks to the right repo.
The plugin imports nothing from dsh: host shapes are structurally typed and tool
definitions are built in the registry's own shape, so there is no dsh package for
pnpm to resolve inside a profile and no version to keep in step.
Also here:
- backfill reads dsh session logs. They are a CONCATENATION of zstd frames, and
both of Node's decoders stop after the first one — a plain decompress returns
only the header line — so core/zstd-frames.ts walks the frame structure and
decodes each frame (RFC 8878 §3.1).
- transcript normalization keeps only `source.kind === 'user'` messages: dsh
delivers plugin context (its runtime snapshots, the skill catalog, our own
recalled memory) as user-role messages on the same surface.
- describeError: Node's fetch reports every transport failure as the bare string
"fetch failed" and hides the reason on `cause`, which made an unreachable
apiUrl an investigation instead of a log line.
- vitest pins HINDSIGHT_CONFIG at a path with no file; loadConfig otherwise
resolved the developer's real ~/.hindsight/coding-agent.json, so a machine with
a token configured failed assertions a clean machine passed.
Verified against @deepseek-ai/dsh 0.1.0-rc.6: recall reaches the model, all 8
tools reach the model and dispatch, sessions are retained, and the Docker E2E
(e2e/Dockerfile.dsh, driven through the stub model like the other credential-less
harnesses) runs the whole lifecycle in a container.
19 lines
960 B
YAML
19 lines
960 B
YAML
# DeepSeek Harness profile layer for Hindsight memory.
|
|
#
|
|
# `dsh plugin --profile <name> add @vectorize-io/hindsight-coding-agents` installs this package into
|
|
# the profile and — because package.json declares `dsh.bundle.patch` — appends this file to the
|
|
# profile's ordered bundle list. Nothing else needs editing: the row below mounts on the host plane,
|
|
# where the pre-step/session-start/turn-stopping events and the layered tools registry all reach
|
|
# every session, including the Web surface's per-session agent presets.
|
|
#
|
|
# Memory itself is configured OUTSIDE dsh, in ~/.hindsight/coding-agent.json (server URL, token,
|
|
# bank naming, opt-outs) — the same file every other Hindsight coding-agent harness reads. To turn
|
|
# it off for one profile without uninstalling, patch this row in the profile's own
|
|
# cordis.patch.yml:
|
|
#
|
|
# - id: hindsight
|
|
# disabled: true
|
|
- insert:
|
|
- id: hindsight
|
|
name: "@vectorize-io/hindsight-coding-agents/dsh"
|