Skip to content

Add AGI Jobs CLI payloads and lifecycle utilities#36

Open
MontrealAI wants to merge 1 commit into
mainfrom
codex/implement-agi-alpha-node-sprint-tasks-8yxwnp
Open

Add AGI Jobs CLI payloads and lifecycle utilities#36
MontrealAI wants to merge 1 commit into
mainfrom
codex/implement-agi-alpha-node-sprint-tasks-8yxwnp

Conversation

@MontrealAI
Copy link
Copy Markdown
Owner

Summary

  • add a dedicated jobs service for building AGI Jobs transaction payloads and decoding job status responses
  • extend the CLI with an operator-facing jobs command suite for applying, completing, acknowledging, and monitoring jobs
  • update the README to document the new job lifecycle tooling and reinforce AGI Jobs convergence guidance
  • cover the jobs service with Vitest cases to ensure deterministic payload encoding and status decoding

Testing

  • npm run lint
  • npm test

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/services/jobs.js
Comment on lines +52 to +58
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');
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant