Skip to content

Releases: tcgbp/dsh-flash-net-mon

v0.3.1

Choose a tag to compare

@tcgbp tcgbp released this 11 Oct 03:16

0.3.0 could not activate at all — this is the release that fixes it.

The audit's persist directory was read as (ctx as any).baseDir. A cordis context is a Proxy that does not answer undefined for undeclared properties — it throws cannot get property "baseDir" without inject — so the read threw out of apply() and DSH reported 1 entry did not activate. The fetch tracer, the connectivity heartbeat and all four HTTP routes went with it.

  • The path now comes from the environment: $DSH_HOME when set (a blank value counts as unset), otherwise ~/.dsh, plus storages/dsh-flash-net-mon/seen-hosts.json — the convention dsh-cost-meter follows. With no data directory the seen-host table simply stays memory-only, as before.
  • Why not @deepseek-ai/dsh-home-paths: that package lives in the harness's own dependency tree, and a static import that cannot resolve fails while modules load, before any fallback can run — the same class of "activation dies over a path" failure this release fixes.
  • Regression test. The unit suite now activates apply() against a context that throws on undeclared property reads exactly as cordis does, then replays both deferred consumers to assert the four routes still register. Reverting the fix makes it fail with the production message verbatim.
  • Because seen-hosts.json survives a restart, new-host is genuinely new again: a host seen before scores 30, not 45 (+15). Both READMEs described the old baseDir behaviour and now document the environment-based resolution.

Install: dsh plugin --profile <profile> add dsh-flash-net-mon

Tarball: dsh-flash-net-mon.tgz (this release), matching docs/tcgbp__dsh-flash-net-mon.yml. Also published to npm as dsh-flash-net-mon@0.3.1.

v0.2.0

Choose a tag to compare

@tcgbp tcgbp released this 08 Oct 15:28

First-contact scoring is quieter, relative targets are handled explicitly, and the endpoints DSH itself calls are trusted.

new-host no longer alerts on its own. The seen-host table is memory-only, so after every restart each host counted as a first contact and scored 30 + 15 = 45 >= netSuspectWarn (40) — every host alerted at least once per session. It is now +5: a plain new connection scores 35 and stays below the threshold. The new-host flag is still recorded, and a first contact that also uploads or is plaintext still alerts (60 / 55).

  • Relative targets. A request whose URL has no host (new URL('/x', ...) in a shim, http://?) was scored as an unknown host named ?, which polluted the frequency counter and could never be whitelisted. It now scores 0 with an explicit relative-url flag, is still recorded, and does not touch the seen-host table.
  • Configured endpoints are auto-trusted. Hosts are derived from settings.describe() — baseURL / base_url / apiBase / api_base / endpoint, at the top level and per model entry — plus DEEPSEEK_BASE_URL, OPENAI_BASE_URL and ANTHROPIC_BASE_URL. Matching is exact (configuring gw.example.com:8443 does not trust sub.gw.example.com), http:// is accepted only for loopback, and nothing is written into the user's whitelist: inferred trust stays distinguishable from a declaration.
  • New route GET /plugins/dsh-flash-net-mon/network-whitelist -> { hosts, builtin, endpoints } (read-only; the POST routes are unchanged).
  • Panel. The whitelist tab gained a "common services" one-click list (15 exact hostnames, no content-hosting domains such as github.io or *.s3.amazonaws.com), a read-only auto-trusted row and a plugin picker built from the log; entry details expand inline instead of covering the config modal; the risk-score explanation states +5.

Tarball: dsh-flash-net-mon.tgz (this release), matching docs/tcgbp__dsh-flash-net-mon.yml. Also published to npm as dsh-flash-net-mon@0.2.0.

dsh-flash-net-mon 0.1.4

Choose a tag to compare

@tcgbp tcgbp released this 08 Oct 14:29

dsh-flash-net-mon 0.1.4 — follows the panel core to dsh-flash

The host panel moved out of the retired single package dock-flash@2.x into the
dsh-flash core package, and the dock-base Workbench integration into the
dock-flash@3.0.0 adapter. This release re-points the host contract:

  • dsh.client.inject now names dsh-flash — a client module graph row's id is its package name, so this is what makes the core's client half load first.
  • the peer dependency is now dsh-flash: >=1.0.0-0 <2.0.0-0.
  • the READMEs and the market entry name the dsh-flash core.

Unchanged on purpose: the dock-flash:* switch ids, the dock-flash settings
namespace (the profile entry id deliberately stayed dock-flash), the
quickControl service and the /plugins/dock-flash/… routes.

This is the network/audit monitor: request auditing with an opt-in heartbeat.
Note: /plugins/dock-flash/health — the heartbeat route — stays exactly as it is; that route belongs to the core's host half.
Tarball: dsh-flash-net-mon.tgz (this release), matching docs/tcgbp__dsh-flash-net-mon.yml.

v0.1.3

Choose a tag to compare

@tcgbp tcgbp released this 06 Oct 15:30

Publishes the corrected repository/homepage metadata and the README install command (now dsh plugin --profile <p> add dsh-flash-net-mon).

v0.1.2

Choose a tag to compare

@tcgbp tcgbp released this 06 Oct 13:48

The dock-flash peer range excluded the entire 2.x line, so npm refused to install this
package next to dock-flash@2.0.2.
Measured with the packed tarballs — exactly what the
registry serves:

npm error code ERESOLVE
npm error Found: dock-flash@2.0.2
npm error Could not resolve dependency:
npm error peer dock-flash@">=1.6.0-0 <2.0.0-0" from dsh-flash-net-mon@0.1.1

The range now carries one branch per tuple whose prereleases must resolve, which is the form
this family states:

">=1.6.0-0 <2.0.0-0 || >=2.0.0-0 <3.0.0-0"

A single >=1.6.0-0 <3.0.0-0 looks equivalent and is not: semver only lets a prerelease satisfy a
comparator set whose matching tuple also carries one, so that spelling rejects 2.0.0-rc.1
(measured with npm's own bundled semver) — which is why the first attempt at this fix was
thrown away.

Both directions are asserted: 2.0.2, 2.0.1 and 2.0.0-rc.1 resolve; 3.0.0-0 and 3.0.0
do not; and the 1.6.0 floor still keeps 1.5.0-rc.1 out. Then verified for real by installing
the packed tarball beside dock-flash@2.0.2 — no ERESOLVE.

This release carries the peer fix only; the settings.describe() crash fix and the non-fatal
apply() guard are in 0.1.3.

v0.1.1

Choose a tag to compare

@tcgbp tcgbp released this 06 Oct 13:21

settings.describe() is not always a promise — and that took the whole plugin out.

settings.describe() was called with .then(...) unconditionally, but that one name has
two implementations: the typert WIRE form returns a Promise, while the DIRECT form —
SettingsController.describe() in @deepseek-ai/dsh-api-settings-controller — is
synchronous and returns the view object itself, and can throw instead
(settings service is absent: mount @deepseek-ai/dsh-settings).

The resulting TypeError: settings.describe(...).then is not a function is raised
synchronously, so it escaped before the .catch at the end of the loader's chain.

This plugin's apply() is async with no internal try/catch, so the throw rejected apply — and a
failed apply fails the Cordis fiber: the plugin never activates and its switch silently never
appears. That is the reported "the plugin was registered and then silently disappeared".

Both call sites now normalize through _describeAsync(), which accepts a Promise, a plain view, or a
throw, so the loader's existing .catch handles it instead of the plugin dying.

Hardening, in the same release. apply() had no internal try/catch, so any throw inside it
rejected the async apply — and a failed apply fails the Cordis fiber: the plugin never activates
and its switch silently never appears. The body is unchanged and now lives in _applyInner; the public
apply reports the failure (apply failed (non-fatal)) and returns, exactly as dock-flash's has always
done.

Patch: no published surface changed.

v0.1.0

Choose a tag to compare

@tcgbp tcgbp released this 04 Oct 03:23

First release of dsh-flash-net-mon, the network monitor and outbound-audit companion for dock-flash.

Host half (dist/index.js) — settings namespace dsh-flash-net-mon and four routes under /plugins/dsh-flash-net-mon/: network-log, network-alerts, network-whitelist, network-plugin-whitelist.

Browser half (lib/client.js, no build step) — a connectivity-heartbeat alert provider, an outbound-audit alert provider and the 网络监控 quick-control switch, with its config modal and audit panel (request stream, alerts, whitelists, risk-score explanation).

The fetch tracer is opt-in (netAuditEnabled, default off) and records metadata only — method, host, path, byte counts, status, duration, TLS, risk score. Request and response bodies are never read and header values are never stored.

Requirements: dock-flash >=1.6.0-0 <2.0.0-0 and @deepseek-ai/cordis (peers); dock-base is optional and only needed in workbench mode.