mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-09 04:02:35 +00:00
Telemetry was the only call site this PR could not cover without changing the SDK transport underneath it, and both ways of doing that cost more than the channel is worth. Routing an `http.Agent` needs Node's `proxyEnv`, added in 22.21 and 24.5 — inside the engines range, so three supported runtimes stayed direct anyway, and the proxy package had to keep a `createNodeHttpAgent` export for a path that only sometimes worked. Replacing the transport with the SDK's `fetch` delegate covered every runtime but has no compression, while the shipped `base` bundle enables gzip and a realistic OTLP batch is 6.4x smaller with it; keeping both meant gzipping at the serializer, which put transport code inside a telemetry plugin. Telemetry is the one outbound channel whose loss costs the user nothing: no tool, model request, or session depends on it, and an export that cannot connect is already dropped silently. A user behind a mandatory proxy is left where they were rather than regressed. `src/index.ts`, `otel.spec.ts`, and `tsconfig.json` return to their state on master; the package keeps only a dev dependency on the proxy library. `egress.spec.ts` inverts: it installs a policy and asserts the fake proxy saw nothing, so an SDK upgrade that moved the exporter onto `fetch` would surface as a failing test rather than silently routing telemetry.
description, kind
| description | kind |
|---|---|
| Package map for shared utilities: atomic file writes, branded ids, deques, JSON values, harness home paths, launch environment, native commands, output retention, time zones, and timeouts. | package-group |
util/ — shared utilities
English | 中文
Summary
The util/ group gives capability packages shared mechanical primitives instead of duplicate implementations. It covers atomic writes, branded ids, deques, lossless JSON values, UUIDs, Harness-home paths, launch environments, outbound proxy policy, native commands, output retention, time-zone canonicalization, and timeout handling. Every root entry here is a library: it registers no product service or event, and the consuming capability retains the business semantics.
Table of Contents
Packages
Each package provides one primitive; open a package page for how to use it.
| Package | Role |
|---|---|
brand/ |
Nominal string types and their stateless constructor |
crypto/ |
Mints RFC 9562 v4 UUIDs from the cross-runtime crypto.getRandomValues primitive |
deque/ |
Provides amortized constant-time queue operations with bounded vacant storage |
values/ |
Validates, snapshots, compares, and freezes lossless JSON-compatible values |
home-paths/ |
Resolves the single Harness home and joins shared user-data paths |
http-proxy/ |
Resolves one outbound proxy policy and installs it for fetch, SDK agents, and spawned children |
launch-environment/ |
Frozen launch environment that remembers which layer supplied each value |
atomic-write/ |
Atomic file replacement and cross-process writer locking |
native-command/ |
Runs host-native commands directly, never through a shell string |
workspace-path/ |
Provides browser-safe Workspace path and display helpers |
output-retention/ |
Bounds model-facing output and reports exact omission metadata |
time/ |
Validates and canonicalizes a caller-reported IANA time zone |
timeout/ |
Deadline arithmetic, signal fusion, and timeout-versus-cancel classification |
Related documentation
- Root package map — where
util/sits among all package groups. - Generated configuration catalog — the library-package index this group forms part of.
- Adding a package cookbook — how a new shared primitive lands in this group.
Dev Note
Working context for maintainers — click to expand
None.