- new cookbook page adding-a-remote-api (en/zh): the five-step HOW-TO for declaring, failing, registering, consuming, and testing a Remote endpoint. - new Agent Note ctx-remote-failure-vocabulary records this round's decisions and alternatives; the 2026-08-02 and 2026-08-10 notes are rewritten to the shipped facts (RemoteError vocabulary, $host, the retired ApiProxy statements). - package READMEs pick up the new failure-face contracts (typert/protocol, api/gateway, api/remotes, test-support/client-runtime), dsh-util-time gains its README and registry entries, and stale connection/WorkspaceError/legacy-code statements are corrected (ui-settings, ui-settings-models, workspace-controller, docs/subsystems/typert incl. the TypertGatewayErrorCode type-equiv block). - packages/AGENTS.md gains the Remote-failure rule bullet; its doc budget rises 675 -> 714: the bullet is the compressed remainder after relocating detail to the cookbook and the Agent Note.
2.6 KiB
description, kind
| description | kind |
|---|---|
| IANA time-zone validation and canonicalization for maintainers accepting a caller-reported zone at a wire boundary. | package-library |
dsh-util-time
English | 中文
Summary
Zero-dependency zone vocabulary for the wire boundaries that accept a caller's time zone. canonicalClientTimeZone admits UTC or an IANA Area/Location name and answers the platform-canonical spelling of it, so an alias never reaches a durable record: a zone identity is stored on messages and re-derived later by another process, where an alias would not compare equal. The library validates and canonicalizes only — it formats no time and owns no failure vocabulary, because each boundary throws its own domain code.
Table of Contents
Use this package
It is a library, not a service or plugin: no ctx, registers nothing, holds no state.
Call it at the boundary that receives the zone, before the value reaches anything durable. An unusable name answers undefined, and the caller raises its own refusal — session/invalid-time-zone for the Session prompt, subagent/invalid-time-zone for a subagent continuation.
API
import { canonicalClientTimeZone } from '@deepseek-ai/dsh-util-time'
| Export | Role |
|---|---|
canonicalClientTimeZone(value) |
Canonical UTC or IANA Area/Location name for an accepted zone, undefined for a blank, padded, abbreviated, single-segment, or platform-unsupported one. |
Model Experience
Indirectly, through the consumer that records a canonical zone on a durable message, from which dsh-time-context renders the turn's model-visible zone instruction and timestamp.
KV Cache effect
None of its own. The consumer that injects a zone-derived line into a request owns that request's cache behavior.
Known Limitations and Deferred Work
- Alias resolution follows the runtime's ICU data — which name an alias group canonicalizes to is the platform's answer, so two processes on different Node builds can disagree about it.
- Validation only — no formatting, offset arithmetic, DST reasoning, or instant conversion; consumers needing those use
Intldirectly.
Dev Note
Working context for maintainers — click to expand
None.