Add structured Discord attachments
This commit is contained in:
@@ -4,3 +4,25 @@ You have a `send_message` tool that sends a message immediately while you are st
|
||||
Use it to acknowledge a request before starting longer work.
|
||||
|
||||
When working as a sub-agent or teammate, only use `send_message` if the main agent explicitly asked you to.
|
||||
|
||||
## Image attachments
|
||||
|
||||
When a locally generated image or screenshot should appear in Discord, return an EJClaw structured output with `attachments` instead of only writing the file path in prose:
|
||||
|
||||
```json
|
||||
{
|
||||
"ejclaw": {
|
||||
"visibility": "public",
|
||||
"text": "스크린샷을 첨부했습니다.",
|
||||
"attachments": [
|
||||
{
|
||||
"path": "/absolute/path/screenshot.png",
|
||||
"name": "screenshot.png",
|
||||
"mime": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Use absolute local paths only, and do not repeat the same path in the visible text. Supported attachment formats are raster image files: PNG, JPEG, GIF, WebP, and BMP. SVG is not accepted.
|
||||
|
||||
@@ -28,9 +28,36 @@ Your output is sent directly to the Discord group.
|
||||
- Do not use generic recurring task registration from Codex
|
||||
- If the user wants a reminder or other non-CI recurring task, tell them to ask Claude/클코 to schedule it
|
||||
|
||||
## Image attachments
|
||||
|
||||
When you need to show a locally generated image, screenshot, or other raster output in Discord, do not rely on a raw file path in prose. Emit an EJClaw structured output with `attachments`.
|
||||
|
||||
```json
|
||||
{
|
||||
"ejclaw": {
|
||||
"visibility": "public",
|
||||
"text": "이미지를 생성했습니다.",
|
||||
"verdict": "done",
|
||||
"attachments": [
|
||||
{
|
||||
"path": "/absolute/path/image.png",
|
||||
"name": "image.png",
|
||||
"mime": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `attachments.path` must be an absolute local path; URLs and relative paths are ignored
|
||||
- Do not repeat the same file path in the visible text
|
||||
- Supported attachment formats are raster image files: PNG, JPEG, GIF, WebP, and BMP. SVG is not accepted.
|
||||
- Use this for generated images and e2e screenshots; the Discord channel validates and uploads the file
|
||||
|
||||
## CI 감시 (watch_ci)
|
||||
|
||||
GitHub Actions run 감시는 structured 필드를 우선 사용:
|
||||
|
||||
- ci_provider: "github", ci_repo: "owner/repo", ci_run_id: run ID
|
||||
- 이 조합 → host-driven fast path (LLM 토큰 소모 없음, 15초 polling)
|
||||
- structured 필드 없이 generic 등록 시 매 tick LLM 실행됨
|
||||
|
||||
@@ -20,9 +20,36 @@ Do not use markdown headings in chat replies. Keep messages clean and readable f
|
||||
|
||||
The group folder may contain a `conversations/` directory with searchable history from earlier sessions. Use it when you need prior context.
|
||||
|
||||
## Image attachments
|
||||
|
||||
For locally generated images or e2e screenshots that should appear in Discord, prefer EJClaw structured attachments over prose paths:
|
||||
|
||||
```json
|
||||
{
|
||||
"ejclaw": {
|
||||
"visibility": "public",
|
||||
"text": "스크린샷을 첨부했습니다.",
|
||||
"verdict": "done",
|
||||
"attachments": [
|
||||
{
|
||||
"path": "/absolute/path/screenshot.png",
|
||||
"name": "screenshot.png",
|
||||
"mime": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- Use absolute local paths only
|
||||
- Do not duplicate the same path in the visible text
|
||||
- Supported attachment formats are raster image files: PNG, JPEG, GIF, WebP, and BMP. SVG is not accepted.
|
||||
- The channel harness validates and uploads attachments; plain prose paths are not reliable
|
||||
|
||||
## CI monitoring (watch_ci)
|
||||
|
||||
GitHub Actions run monitoring uses structured fields first:
|
||||
|
||||
- ci_provider: "github", ci_repo: "owner/repo", ci_run_id: run ID
|
||||
- This combination → host-driven fast path (no LLM token cost, 15s polling)
|
||||
- Without structured fields → generic path, each tick runs LLM
|
||||
|
||||
Reference in New Issue
Block a user