Document container-visible photo paths
This commit is contained in:
@@ -14,9 +14,11 @@ Use exactly one directive line per image, outside code fences:
|
||||
`<!-- telegram-photo {"path":"<absolute-local-image-path>","caption":"<optional caption>"} -->`
|
||||
|
||||
Rules:
|
||||
- Replace `<absolute-local-image-path>` with an absolute path that exists in the current workspace or another location visible to the bot process.
|
||||
- Replace `<absolute-local-image-path>` with an absolute path that the bot container can read.
|
||||
- The source image may live anywhere on the host, but the bot runs in Docker; before emitting the directive, make sure the image is inside a workspace under the configured playground base directory or another path explicitly mounted into the bot container.
|
||||
- If the image is outside container-visible paths, copy it into an appropriate workspace-local location first, then use the copied file's absolute path in the directive.
|
||||
- Do not hardcode machine-specific directories, user names, repository paths, or sample filenames in this skill.
|
||||
- Supported extensions are `.jpg`, `.jpeg`, `.png`, `.webp`, and `.gif`.
|
||||
- `caption` is optional and should be short; omit the `caption` field when no caption is needed.
|
||||
- Do not use external Telegram tool calls for this.
|
||||
- If no usable image path is known, ask for the path or explain what local file is needed.
|
||||
- If no usable container-visible image path is known, ask for the path or explain what local file is needed.
|
||||
|
||||
@@ -9,6 +9,9 @@ HOST_UPLOAD_DIR=
|
||||
HOST_CODEX_HOME=
|
||||
CODEX_STATE_DB=
|
||||
|
||||
# Playground root is mounted at the same absolute path so workspace-local files are visible to the bot.
|
||||
HOST_PLAYGROUND_DIR=
|
||||
|
||||
# Host-side SQLite directory mounted to /data in the container.
|
||||
DB_DIR=./data
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Docker Compose runs only the Go Telegram bot. Codex runs on the host through `co
|
||||
|
||||
## Setup
|
||||
|
||||
1. Copy `.env.example` to `.env` and set `TELEGRAM_BOT_TOKEN`, `HOST_CODEX_SOCKET`, and `HOST_UPLOAD_DIR`.
|
||||
1. Copy `.env.example` to `.env` and set `TELEGRAM_BOT_TOKEN`, `HOST_CODEX_SOCKET`, `HOST_CODEX_RUN_DIR`, `HOST_UPLOAD_DIR`, `HOST_CODEX_HOME`, and `HOST_PLAYGROUND_DIR`.
|
||||
2. Start the host Codex app-server:
|
||||
|
||||
```sh
|
||||
@@ -46,4 +46,5 @@ Plain text continues the active Codex thread and creates one if needed. Telegram
|
||||
|
||||
- `HOST_UPLOAD_DIR` must be the same absolute path inside the bot container and on the host so host Codex can read staged files.
|
||||
- `HOST_CODEX_SOCKET` must point to the host app-server socket. `HOST_CODEX_RUN_DIR` is mounted into the bot container at the same absolute path so socket recreation is visible without rebuilding.
|
||||
- `HOST_PLAYGROUND_DIR` should point to the shared playground/workspace root mounted at the same absolute path, so assistant photo directives can reference workspace-local image files that the bot container can read.
|
||||
- Use long polling for the MVP; webhooks are not required.
|
||||
|
||||
@@ -24,3 +24,4 @@ services:
|
||||
- ${HOST_CODEX_RUN_DIR:?set HOST_CODEX_RUN_DIR}:${HOST_CODEX_RUN_DIR:?set HOST_CODEX_RUN_DIR}
|
||||
- ${HOST_UPLOAD_DIR:?set HOST_UPLOAD_DIR}:${HOST_UPLOAD_DIR:?set HOST_UPLOAD_DIR}
|
||||
- ${HOST_CODEX_HOME:?set HOST_CODEX_HOME}:${HOST_CODEX_HOME:?set HOST_CODEX_HOME}
|
||||
- ${HOST_PLAYGROUND_DIR:?set HOST_PLAYGROUND_DIR}:${HOST_PLAYGROUND_DIR:?set HOST_PLAYGROUND_DIR}
|
||||
|
||||
Reference in New Issue
Block a user