hex/docs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dax 2ac5e4b582
annotate: agent tools for captures (labs) (#2220)
* Annotate: agent tools that read a capture from the CLI

Adds Labs › Agent tools for captures (off by default, every OS, Annotate
group, labs.annotate_agent_tools) behind four new `hex annotate` commands
that run in the CLI process rather than over the control socket, so they
work with Hex closed and only read files and decode the bundle's video:

- `inspect [<capture>] [--marks] [--json]` prints summary.md, one line per
  mark (or No marks), scrawl.json pretty, or the marks as JSON.
- `zoom [<capture>] (--at <M:SS|secs|phrase> | --mark <n|id> [--frame N])
  [--span secs] [--frames N] [--full]` writes a dense sheet around a moment
  or a mark into <bundle>/zoom/ and prints its path, each cell's time, and
  what was said; a mark prints the mark's line first.
- `frames [<capture>] --from <M:SS|secs> --to <M:SS|secs> [--fps 4]` writes
  one PNG per frame and prints each path.
- `skill` prints the new skills/hex-annotate guide, installed with
  `npx skills add anomalyco/hex --skill hex-annotate`.

They reuse the engine's own primitives (zoom, agent_context, handoff,
sketch) and capture_host::library's bundle resolution, and leave everything
outside <bundle>/zoom/ alone. While the lab is off they refuse naming
`hex labs on annotate-agent-tools`; a build without the capture engine
answers unsupported like the other annotate commands.

Also adds the settings key to the registry, translations for the card, the
skill docs, docs/cli.md, the capture and labs feature maps, the maps'
checks and proof limits, and the four labs goldens the new card moves.

* Annotate agent tools: review fixes

- frames loads the bundle, clamps --to to its durationMs, and refuses a range
  over 240 frames with `invalid` (the count is (to - from) * fps / 1000 + 1),
  so one call can't write a whole recording; the cap is in the skill and both
  docs, and checked_range is tested at the cap, the clamp, and a start past
  the end.
- The hex-annotate skill no longer claims an Install action, says only
  inspect/zoom/frames take a bundle (skill takes none), shows a --mark run
  printing the mark line first with real curly-quoted Said lines, says frames
  falls back to frames/ keyframes without a video, and states the 240 cap.
- The Labs row takes the same Annotate policy lock as Copy a capture as one
  file.
- The capture() doc comment says the four agent reads run in the CLI process
  on every OS.
- crates/router parse_clock_ms multiplies and adds with checked arithmetic, so
  absurd minutes read as no time instead of overflowing; tested.

* Annotate agent tools: Annotate lock and clock bounds

- An organization's DisableAnnotate lock now covers the agent tools lab:
  labs_lock maps it to Lock::Annotate, switches(Lock::Annotate) includes its
  switch, and the gate reads off under the lock through a policy-parameterized
  annotate_agent_tools_under (the same shape as voice_prompt_under). The new
  policy test proves the managed card, setting_lock, the gate under a forced
  lock, enforce turning it off, and keep_saved leaving the saved switch alone.
- parse_clock_ms refuses NaN, infinities, negatives, and values at or past
  u64's range in both the M:SS and bare-seconds branches (seconds_ms), with
  the new 0:1e300, 1e300, 0:NaN, inf, and 0:-1 cases.
- docs/cli.md and the capture map note that frames extracts with ffmpeg from
  PATH when one is installed, as the engine already does.

* Annotate agent tools: count frames as the engine's decoder does

`frames` capped a range by (to - from) * fps / 1000 + 1, but the engine's
own decoder steps inclusively by max(1000 / fps, 1) ms, which asks for more
frames when fps doesn't divide 1000: 240 fps steps 4 ms, so 999 ms is 250
frames, not 240, and the cap let it through.

`checked_range` now counts frame_count's larger of the two formulas, so the
240-frame cap holds whichever decoder runs. The test adds 0-999 ms at
240 fps (refused: 250 frames) and 0-959 ms at 240 fps (allowed: exactly 240
frames, 231 at the rate), and the capture map states both counts.
2026-11-21 13:59:43 -05:00
..
features annotate: agent tools for captures (labs) (#2220) 2026-11-21 13:59:43 -05:00
images docs: describe speech models and features in readme (#1869) 2026-11-15 18:27:36 -05:00
plans reload personal config when imported .js files change (#1856) 2026-11-15 10:46:47 -05:00
releases docs(release): correct the 3.4.0 notes and add upgrade steps for Windows and Hyprland (t1510) (#1672) 2026-11-10 18:14:30 -08:00
research Add agent marker and drop internal references (#702) 2026-10-31 18:30:32 -07:00
specs add fluid speech pro to the speech model catalog (#2007) 2026-11-19 15:19:06 -05:00
cli.md annotate: agent tools for captures (labs) (#2220) 2026-11-21 13:59:43 -05:00
design-system.md fix(hud): keep the dictation and meeting overlays dark (#1834) 2026-11-16 00:22:48 -08:00
downloads.md ci: read release secrets from aws secrets manager (#1606) 2026-11-09 15:18:26 -05:00
linux.md make the labs card copy plain (#1929) 2026-11-16 22:32:02 -05:00
nix.md docs: nix install is linux only (#1582) 2026-11-09 05:11:35 -05:00
opencode-compatibility.md prefer a wsl opencode service when the lab is on (#2112) 2026-11-20 19:14:28 -05:00
perf.md docs(perf): strobe prints times in microseconds (#1718) 2026-11-12 05:43:43 -06:00
README.md docs: nix install is linux only (#1582) 2026-11-09 05:11:35 -05:00
releasing.md windows: sign the setup engine so smart app control can run setup (#1987) 2026-11-19 02:38:03 -05:00
streams.md feat(meetings): graduate meeting labs into normal behaviour and Meetings settings (#1821) 2026-11-16 00:51:48 -08:00
test-builds.md windows: sign the setup engine so smart app control can run setup (#1987) 2026-11-19 02:38:03 -05:00
transcript-cli.md labs: fold yearly stats into dictation stats (#1976) 2026-11-18 12:22:38 -05:00
windows-signing.md windows: sign the setup engine so smart app control can run setup (#1987) 2026-11-19 02:38:03 -05:00
windows.md prefer a wsl opencode service when the lab is on (#2112) 2026-11-20 19:14:28 -05:00

Project Documentation

Start with the document for your task. Plans and archived prototypes do not override shipped behavior.

User Guides

  • ../README.md: install and use Hex on macOS, Windows, and Linux.
  • windows.md: Windows x64 and ARM64 beta requirements, installation, and source builds.
  • linux.md: Linux X11 and native Wayland beta requirements and installation.
  • nix.md: Nix packaging for Linux, development, and per-user autostart.
  • ../ios/README.md: build and test the iOS prototype.
  • ../sdk/typescript/README.md: use the public TypeScript transcription SDK with an explicitly supplied native helper.

Engineering Reference

  • ../AGENTS.md: architecture, invariants, development commands, and diagnostics. This is the implementation authority.
  • ../ROADMAP.md: prioritized product and engineering work.
  • design-system.md: Rune + rune-kit + OpenCode theme components, Hex pieces, copy rules, and --snap scene verification.
  • features/README.md: existing user-facing capabilities, entry points, available verification, and gaps; detailed dictation and recovery maps.
  • perf.md: strobe benchmarks, the cases that drive the window through its accessibility tree, and how a benchmarked copy of Hex stays isolated.
  • downloads.md: public download paths, R2 custom domains, GitHub release mirrors, and network recovery.
  • opencode-compatibility.md: audited OpenCode V2 source and CLI baseline, integration contract, and validation limits.
  • plans/personal-commands.md: shipped personal command contract and remaining lifecycle work.
  • plans/quickjs.md: why and how configs run in embedded QuickJS instead of Bun, with size and latency measurements.
  • specs/local-transcription-service.md: implemented macOS local-service protocol and lifecycle guarantees.

Architecture Decisions And Active Plans

When a plan disagrees with AGENTS.md about shipped behavior, update the plan.

Research And Archives

Releases

releases/ contains version-specific release notes and drafts. ../release-notes/ contains legacy inputs from versions 2.0.0 through 2.0.9. Published notes and the SDK changelog describe their release, not current behavior; preserve them as historical records. A draft note is not evidence that its release has been published.