Skip to content

feat(core): add bytesFromHex, the arbitrary-length reverse of bytesToHex - #90

Merged
Mearman merged 1 commit into
mainfrom
feat/bytes-from-hex
Sep 12, 2026
Merged

feat(core): add bytesFromHex, the arbitrary-length reverse of bytesToHex#90
Mearman merged 1 commit into
mainfrom
feat/bytes-from-hex

Conversation

@Mearman

@Mearman Mearman commented Sep 12, 2026

Copy link
Copy Markdown
Member

Needed while building agent-comms' own room.send message-ref support (a reply needs to encode the referenced message's own hex id back into the message-ref's raw bytes) -- bytesToHex has no generic reverse, only deviceIdFromHex, which is fixed to the 32-byte device-id case.

deviceIdFromHex now delegates its own decoding to bytesFromHex rather than duplicating the same hex-pair loop.

A domain needing to decode a message-id, token-id, or other
arbitrary-length bstr back from its hex text form (e.g. constructing
a message-ref for a reply) had no generic reverse of bytesToHex to
reach for -- only deviceIdFromHex, fixed to the 32-byte device-id
case. deviceIdFromHex now delegates its own byte decoding to this
function rather than duplicating the same loop.
@Mearman
Mearman marked this pull request as ready for review September 12, 2026 09:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-12T09:17:39.255380Z e4b332f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Mearman
Mearman merged commit 37a8b85 into main Sep 12, 2026
8 checks passed
@Mearman
Mearman deleted the feat/bytes-from-hex branch September 12, 2026 09:17
Mearman added a commit to ExaDev/agent-comms that referenced this pull request Sep 12, 2026
mesh-store.ts's own room.send fan-out needs bytesFromHex (added
upstream in ExaDev/wire-mesh#90) to encode a reply's referenced
message-id back into the wire's message-ref bytes; 1.0.3 predates
that export.
Mearman added a commit to ExaDev/agent-comms that referenced this pull request Sep 12, 2026
mesh-store.ts's own room.send fan-out needs bytesFromHex (added
upstream in ExaDev/wire-mesh#90) to encode a reply's referenced
message-id back into the wire's message-ref bytes; 1.0.3 predates
that export.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant