2026-08-25 23:47:20 +08:00
---
2026-08-30 02:29:53 +08:00
description: "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."
2026-08-25 23:47:20 +08:00
kind: "package-group"
---
2026-08-30 02:29:53 +08:00
# util/ — shared utilities
2026-06-21 11:04:28 +08:00
2026-07-26 05:03:53 +08:00
English | [中文 ](README.zh.md )
2026-08-25 23:47:20 +08:00
## Summary
2026-08-30 02:29:53 +08:00
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, 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.
2026-08-25 23:47:20 +08:00
## Table of Contents
- [Packages ](#packages )
- [Related documentation ](#related-documentation )
- [Dev Note ](#dev-note )
-----
< a id = "packages" > < / a >
## Packages
Each package provides one primitive; open a package page for how to use it.
2026-06-21 11:04:28 +08:00
| Package | Role |
|---|---|
2026-08-30 02:29:53 +08:00
| [`brand/` ](brand/README.md ) | Nominal string types and their stateless constructor |
2026-08-25 23:47:20 +08:00
| [`crypto/` ](crypto/README.md ) | Mints RFC 9562 v4 UUIDs from the cross-runtime `crypto.getRandomValues` primitive |
2026-08-28 17:36:55 +08:00
| [`deque/` ](deque/README.md ) | Provides amortized constant-time queue operations with bounded vacant storage |
2026-08-30 02:29:53 +08:00
| [`values/` ](values/README.md ) | Validates, snapshots, compares, and freezes lossless JSON-compatible values |
2026-08-25 23:47:20 +08:00
| [`home-paths/` ](home-paths/README.md ) | Resolves the single Harness home and joins shared user-data paths |
| [`launch-environment/` ](launch-environment/README.md ) | Frozen launch environment that remembers which layer supplied each value |
| [`atomic-write/` ](atomic-write/README.md ) | Atomic file replacement and cross-process writer locking |
| [`native-command/` ](native-command/README.md ) | Runs host-native commands directly, never through a shell string |
2026-08-23 22:49:14 +08:00
| [`workspace-path/` ](workspace-path/README.md ) | Provides browser-safe Workspace path and display helpers |
2026-08-25 23:47:20 +08:00
| [`output-retention/` ](output-retention/README.md ) | Bounds model-facing output and reports exact omission metadata |
docs(api): document the converged ctx.remote programming surface
- 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.
2026-08-28 19:32:38 +08:00
| [`time/` ](time/README.md ) | Validates and canonicalizes a caller-reported IANA time zone |
2026-08-25 23:47:20 +08:00
| [`timeout/` ](timeout/README.md ) | Deadline arithmetic, signal fusion, and timeout-versus-cancel classification |
-----
< a id = "related-documentation" > < / a >
## Related documentation
- [Root package map ](../README.md ) — where `util/` sits among all package groups.
- [Generated configuration catalog ](../../docs/config-catalog.md ) — the library-package index this group forms part of.
- [Adding a package cookbook ](../../docs/cookbook/adding-a-package.md ) — how a new shared primitive lands in this group.
< a id = "dev-note" > < / a >
## Dev Note
< details >
< summary > Working context for maintainers — click to expand< / summary >
None.
< / details >