Add AGI Jobs CLI payloads and lifecycle utilities#36
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (resultData) { | ||
| const bytes = | ||
| typeof resultData === 'string' && !isHexString(resultData) | ||
| ? toUtf8Bytes(resultData) | ||
| : resultData; | ||
| if (!(bytes instanceof Uint8Array)) { | ||
| throw new Error('resultData must be a hex string, UTF-8 string, or Uint8Array'); |
There was a problem hiding this comment.
Allow hex result data in job completion hashing
When buildCompleteJobTx is given resultData as a hex string, normalizeResultHash takes the string branch but then rejects it because it is not a Uint8Array. The error text explicitly claims hex strings are supported, so callers using jobs complete --result-data 0x… will always fail before hashing. Convert hex strings to bytes (e.g. arrayify) instead of throwing so that both UTF‑8 and hex inputs work as documented.
Useful? React with 👍 / 👎.
Summary
jobscommand suite for applying, completing, acknowledging, and monitoring jobsTesting
Codex Task