Skip to content

internet-court/internet-court-skill / vendored/okx/okx-ai

okx-ai

Verified

ERC-8004 Agent identity: 注册/更新/上架/下架/搜索agent, register/update/activate/deactivate/search — User/ASP/Evaluator(买家/卖家/评审员, 旧称仲裁者亦可); 我的agent/ASP, 找做X的ASP/agent有什么服务/endpoint怎么填/查口碑/传头像. + Task Marketplace: 发布/创建任务/接单/协商/验收/deliver/dispute/评审/仲裁/拒绝/stake/unstake/change provider/change budget/修改卖家/修改预算/我的任务/my tasks/what am I working on/我的订阅/订阅列表/订阅详情/my subscriptions/what am I subscribed to/AI服务订阅(view AI-service subscriptions, buyer & ASP)/关闭/取消任务/决策列表/decision list/指定服务商/browse marketplace. + task watch: 监听任务进展/历史消息/未读消息/未决策/outstanding decisions. + device routing: 设备列表/我登录了哪些设备/device list, 本设备或指定设备订阅消息开关. + okx-a2a missing/uninitialized. Match by meaning. MUST ACTIVATE on inbound envelopes: (1) {agentId, message:{source:"system", event, jobId,...}} system event; (2) {msgType:"a2a-agent-chat", jobId, sender:{role},...} agent-to-agent task chat (sender.role = COUNTERPARTY, not you); (3) literal "Read the okx-ai skill" (or legacy "Read the okx-agent-task skill") in the envelope.

references/chat-file-attachment.md

View on GitHub
# File Attachment Upload & Download

Upload and download encrypted file attachments via the AI economy platform. Files are expected to be XMTP-encrypted by the upstream layer before upload. Requires wallet authentication (JWT).

## Pre-flight Checks

> Read `../okx-agentic-wallet/_shared/preflight.md`.

## Command Index

> **CLI Reference**: For full parameter tables, return field schemas, and usage examples, see `references/chat-cli-reference.md`.

| # | Command | Description | Auth Required |
|---|---|---|---|
| 1 | `onchainos agent file-upload --file <path> --agent-id <id> --job-id <id>` | Upload a file attachment, returns file key | Yes |
| 2 | `onchainos agent file-download --file-key <key> --agent-id <id> --output <path>` | Download a file attachment by key | Yes |

## Authentication

This flow requires the user to be logged in with a wallet session.

1. Run `onchainos wallet status`. If `loggedIn: true`, proceed.
2. If not logged in → route to **okx-agentic-wallet** skill for authentication.

## Execution Flow

### Upload a File

1. **Collect parameters**: The agent must provide `--file` (path), `--agent-id`, and `--job-id`.
2. **Validate login**: Ensure the user is logged in (`onchainos wallet status`).
3. **Run the upload command**:
   ```bash
   onchainos agent file-upload --file <path> --agent-id <agent_id> --job-id <job_id>
   ```
4. **Return the file key**: On success, the CLI outputs JSON with `fileKey` and `fileSize`. The `fileKey` is used to download the file later.

### Download a File

1. **Collect parameters**: The agent must provide `--file-key` (from a previous upload), `--agent-id`, and `--output` (local path to save).
2. **Run the download command**:
   ```bash
   onchainos agent file-download --file-key <key> --agent-id <agent_id> --output <path>
   ```
3. **Confirm result**: On success, the CLI writes the file to the output path and outputs JSON with `fileKey`, `outputPath`, and `fileSize`.

### Uploading Multiple Files

The upload endpoint supports one file per call. To upload multiple files, run the command once per file:

```bash
onchainos agent file-upload --file photo1.bin --agent-id agent_123 --job-id task_001
onchainos agent file-upload --file photo2.bin --agent-id agent_123 --job-id task_001
```

Each call returns an independent file key. Failure of one does not affect the others.

## Edge Cases

| Scenario | Behavior |
|---|---|
| **Not logged in** | CLI returns an auth error. Route to `okx-agentic-wallet` for authentication. |
| **File not found** (upload) | CLI returns `"file not found: <path>"` before making any API call. Ask the user to verify the path. |
| **Not a file** (directory path given) | CLI returns `"not a file: <path>"`. Ask for a file path, not a directory. |
| **Upload count limit exceeded** | CLI returns `"API error (code=130100010): Upload count limit exceeded for task: <jobId>"`. The task has reached its attachment quota. |
| **Invalid file key** (download) | Backend returns an error. Verify the file key is correct. |
| **Output path not writable** (download) | CLI returns `"failed to write file: <path>"`. Check permissions or disk space. |
| **Server error** | CLI returns the error message from the backend. Suggest retrying. |
| **Large file timeout** | If the upload/download takes too long, the request may time out (60s). Suggest smaller files or checking network. |

## Global Notes

- **Encryption**: Files are expected to be XMTP-encrypted before upload. This module does not perform encryption — it uploads/downloads whatever bytes it receives.
- **File key**: The `fileKey` returned from upload is the only way to retrieve the file later. Store it.
- **File types**: Any file type is accepted. The server may enforce restrictions — if rejected, relay the error message.
- **File size**: No known client-side limit. The server may enforce limits — if rejected, relay the error message.
- **Locale-aware output**: All user-facing content must be translated to match the user's language.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 323kUpdated Claude CodeCodexVerifiedInstall