Skip to content

fix: register file commands, fix endpoints, harden SSE & region validation#131

Merged
RyanLee-Dev merged 4 commits into
mainfrom
codex/file-cli-fixes
May 11, 2026
Merged

fix: register file commands, fix endpoints, harden SSE & region validation#131
RyanLee-Dev merged 4 commits into
mainfrom
codex/file-cli-fixes

Conversation

@RyanLee-Dev
Copy link
Copy Markdown
Collaborator

Summary

Based on #129, with endpoint fixes verified against real API.

  • Register file upload/list/delete commands in registry (were implemented but inaccessible)
  • Fix file endpoints to match actual API:
    • file list: GET /v1/files/list (was /v1/files → 404)
    • file delete: POST /v1/files/delete with JSON body (was DELETE /v1/files?file_id= → 404)
    • Response uses files array (not data), file_id is numeric
  • Harden SSE stream parser: persist event state across network chunks, handle CRLF
  • Validate --region / MINIMAX_REGION early with clear error message

Test plan

  • bun test — 212 pass
  • bun run lint — clean
  • mmx file list — verified on both global and cn regions
  • mmx file delete --file-id <id> — verified on real API
  • mmx --region mars — rejects with usage error

NianJiuZst and others added 4 commits May 11, 2026 12:12
- file list: GET /v1/files/list (not /v1/files)
- file delete: POST /v1/files/delete with JSON body (not DELETE /v1/files?file_id=)
- file_id is numeric, response has no 'deleted' field
- response uses 'files' array, not 'data'
@RyanLee-Dev RyanLee-Dev merged commit 02fbdfb into main May 11, 2026
2 checks passed
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.

2 participants