Skip to content

Releases

v0.4.0

Choose a tag to compare

@mcncl mcncl released this 12 Nov 01:49
29bd9d0

v0.4.0

  • Add optional Scanner.OnReportWithOffsets to locate reports in the original byte stream, including across writes. This lets consumers correlate status changes with surrounding output. Existing callbacks remain unchanged. (#11)

v0.3.1

Choose a tag to compare

@wolfeidau wolfeidau released this 06 Nov 04:43
2633276

v0.3.1

Performance release. No API or behaviour changes.

Changes

  • Stripper returns writes with no OSC sequence unchanged. Writes containing other escape sequences, such as SGR colour codes, no longer take the per-byte path or allocate a copy.

Benchmarks

Apple M4, v0.3.0 → v0.3.1:

Benchmark MB/s allocs/op
Stripper/ansi 1486 → 1942 33 → 4

Full changes: v0.3.0...v0.3.1

v0.3.0

Choose a tag to compare

@wolfeidau wolfeidau released this 23 Oct 03:54
0468c5b

v0.3.0

Moves the Go module to the Buildkite organization following the repository transfer.

Breaking changes

  • The module and import path is now github.com/buildkite/osc7501, replacing github.com/wolfeidau/osc7501. Update imports and run go get github.com/buildkite/osc7501@v0.3.0 followed by go mod tidy.

Unchanged

  • Exported APIs and protocol behavior are unchanged from v0.2.1.
  • No production Go implementation files changed.

Full changes: v0.2.1...v0.3.0

v0.2.1

Choose a tag to compare

@wolfeidau wolfeidau released this 22 Oct 17:14
9d84c78

v0.2.1

Performance release. No API or behaviour changes.

Changes

  • Scanner and Stripper skip plain text. Outside an escape sequence they jump to the next ESC with bytes.IndexByte instead of stepping byte by byte.
  • Parse allocates less. It no longer builds a map or splits the body, and converts values to strings only for known keys.
  • ValidID no longer allocates.
  • Adds benchmarks and a make bench target.

Benchmarks

benchstat, n=10, Apple M4, v0.2.0 → v0.2.1:

Benchmark sec/op allocs/op
Parse/minimal 75.1ns → 25.4ns (−66%) 3 → 1
Parse/full 994ns → 861ns (−13%) 19 → 7
Scanner/reports 162.3µs → 25.5µs (−84%) 896 → 256
Stripper/reports 250.3µs → 29.6µs (−88%) 33 → 33

The "reports" streams are 128 KB of terminal output with 64 reports. Output with frequent SGR colour codes sees smaller gains than plain text.

Full changes: #6

v0.2.0

Choose a tag to compare

@wolfeidau wolfeidau released this 21 Oct 19:05
9f1fdb3

v0.2.0

Aligns Parse with the spec rev 0.4 Limits rule and makes rejections diagnosable.

Breaking changes

  • Parse returns (Report, error) instead of (Report, bool). Replace ok with err == nil. Errors wrap ErrNoState, ErrUnknownState, ErrLimit, ErrInvalidID or ErrInvalidText (test with errors.Is) and name the failing field, e.g. osc7501: limit exceeded: app is 33 bytes, max 32.
  • Reports breaking a limit are discarded whole. Previously accepted, now rejected:
    • keys over 16 bytes
    • app over 32 bytes
    • an invalid or oversized id, app, title or msg followed by a valid duplicate
    • bodies that cannot fit in a 4096-byte sequence

Unchanged

  • Scanner.OnReport fires only for accepted reports; rejected reports are dropped silently.
  • An app with invalid characters (within 32 bytes) is still treated as absent.

Thanks to @dannymidnight for the report in buildkite/terminal-to-html#289.

v0.1.0

Choose a tag to compare

@wolfeidau wolfeidau released this 15 Oct 05:33
3dcae81

v0.1.0

First release. A Go implementation of OSC 7501 program status (spec rev 0.4) with no dependencies outside the standard library.

  • Emit: Reporter with Working, Blocked, Done, Failed, Idle and Clear. An invalid state, id, app or kind returns ErrInvalidReport; title and msg are sanitised and truncated to the protocol limits.
  • Parse: Parse decodes a report body and enforces the spec limits.
  • Scan: Scanner is an io.Writer filter that forwards bytes unchanged and calls OnReport and OnQuery. QueryReply answers a feature query.
  • Strip: Stripper removes reports and queries from text output, including sequences split across writes.

Pre-1.0: breaking changes bump the minor version.

This package was written with the help of an AI coding assistant (Claude Code) and is reviewed and maintained by a human maintainer.