internet-court/internet-court-skill / vendored/okx/okx-ai
okx-ai
VerifiedERC-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/watch-wake-scheduling.md
View on GitHub# Auto-timeout wake scheduling (platform-specific payloads)
> Loaded from `watch-core.md` §`kind == decision_request` only when a fresh `decision_request` lands in a **global** session and you need to schedule the 2-minute self-resume wake. Skip entirely for scoped sessions (see the gating note in watch-core.md).
After rendering `userContent`, but **before ending the turn**, schedule a 2-minute **one-shot** wake so the watch loop self-resumes if the user goes idle. Pick the tool by platform (same env vars as `watch-core.md` §Platform compatibility).
> **Terminology**: the handle returned by either tool is called the **wake id** in this skill.
🛑 **Critical for both platforms**: the `prompt` field must be passed **verbatim** as the exact English string below. Do **NOT** localize it, paraphrase it, or rewrite it based on the current `decision_request`'s content (e.g. do not turn it into "请选择服务商" / "回复 1 或 1727"). The wake fires in a fresh turn; the agent reading the wake prompt must see a generic, content-free "re-enter watch" instruction so it routes back into this skill — a contextualized prompt confuses both the scheduler view and the next-turn agent.
- **Claude Code** (`CLAUDECODE=1`):
```
CronCreate(
recurring: false,
cron: "<minute> <hour> <DoM> <Mon> *",
prompt: "Pending decision_request auto-timeout reached. Re-enter watch now: okx-a2a user watch --json"
)
```
Field notes (do **not** inline these into the call):
- `cron`: standard 5-field expression set to **now + 2 minutes in local time**. Example: if now is 14:28 local, use `30 14 <today_DoM> <today_Mon> *`.
Remember the returned **wake id** (it stays in the assistant transcript and is visible in the next turn).
- **Codex** (`CODEX_THREAD_ID` non-empty):
```
codex_app.automation_update(
mode: "create",
kind: "heartbeat",
destination: "thread",
rrule: "DTSTART:<YYYYMMDDTHHMMSS>\nRRULE:FREQ=MINUTELY;COUNT=1",
prompt: "Pending decision_request auto-timeout reached. Re-enter watch now: okx-a2a user watch --json",
status: "ACTIVE"
)
```
Field notes (do **not** inline these into the call):
- `rrule`: iCalendar RRULE syntax — exactly two lines joined by a literal `\n`:
1. `DTSTART:<YYYYMMDDTHHMMSS>` — UTC basic format (e.g. `20260607T143000`) set to **now + 2 minutes in UTC**.
2. `RRULE:FREQ=MINUTELY;COUNT=1` — fires exactly once (the `COUNT=1` guarantees one-shot semantics).
Remember the returned **wake id**.
If the scheduling tool is unavailable (unknown tool / returns an error) → **skip silently** and end the turn. The user can re-trigger watch manually if they ignore the item.
**When the wake fires (user idle 2 min)**: its prompt runs `okx-a2a user watch ...` in a fresh turn, which resumes monitoring for **new** events. The original `decision_request` item is **not** re-surfaced by watch — it was already consumed when it first appeared (watch is destructive read). But because the user never `check`ed it, it remains in the outstanding-decisions queue and can be retrieved on demand via `okx-a2a user outdated-list` (see `references/outdated-list.md`). No extra logic needed here.
**Cancelling the wake** (first step of reply handling, back in watch-core.md §Handling the user reply): best-effort cancel the wake scheduled in the previous turn:
- Claude Code: `CronDelete(<wake id>)`
- Codex: `codex_app.automation_update(mode: "delete", id: <wake id>)`
- If the **wake id** is not visible in the assistant transcript (context compacted) or the cancel call errors → **skip and proceed**. Do NOT search for the wake by name/prompt match. A stale wake firing afterwards is harmless: it just re-enters watch to monitor new events; the already-handled `decision_request` item does **not** reappear in watch (it was consumed on the original return — watch is destructive read).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 472k | Updated | Claude CodeCodex | Verified | Install |
| 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: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| 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 available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |