Review docs/api.md and docs/llm_posting_helper.md for accuracy and completeness
Same pass as the SKILL.md review. Fixed factually-wrong content and filled gaps against the current code. docs/api.md: - Capabilities example response was stale: artifact_kinds missing json/csv, raw_supported_for missing json/csv. Corrected to match live output, with a note that the endpoint is the authoritative source. - "Office document conversion is not implemented" is now false - replaced with the accurate scope (.xlsx -> csv only; .docx/.pptx/.xls not). - Source Fields overview table omitted source_prompt entirely; added it, plus a note that source_name/source_id/source_prompt must be strings (400, not coerced) and metadata must be an object. - Kinds table: noted tables now render styled in markdown/html_fragment, and made explicit that html_full is served verbatim with no styling. - MVP constraints: noted the public-share-link exception to "feeds private per user" and clarified PATCH edits metadata only. docs/llm_posting_helper.md: - Added .xlsx upload, --upload-image image embedding, a Source & Theme Flags table (all six source-*/theme flags were undocumented here), and a note that --meta/--meta-json merge and are distinct from tags. - Added a scope note that the helper only creates - update/delete need the API, sharing is feed-UI-only. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
d2d970f33d
commit
c9edac62cf
2 changed files with 54 additions and 8 deletions
|
|
@ -6,6 +6,11 @@ The project also keeps `scripts/daybook_post.py` as a compatibility wrapper.
|
|||
|
||||
The helper is intentionally zero-dependency and uses only Python's standard library. It works on Windows and Linux.
|
||||
|
||||
It only **creates** artifacts. Updating (title/tags/metadata) and deleting
|
||||
require the raw API (`PATCH`/`DELETE /api/artifacts/{id}`, see `docs/api.md`);
|
||||
enabling a public share link is done from the feed UI and has no API or CLI
|
||||
path yet.
|
||||
|
||||
## Configuration
|
||||
|
||||
Set these as real process/shell environment variables — the helper reads
|
||||
|
|
@ -64,6 +69,13 @@ python skills/daybook-posting/scripts/daybook_post.py results.csv
|
|||
python skills/daybook-posting/scripts/daybook_post.py --kind json --title "Run Summary" --content-file summary.json
|
||||
```
|
||||
|
||||
Post an `.xlsx` spreadsheet (converted server-side to a `csv` artifact —
|
||||
active sheet only, saved formula results only, no formatting preserved):
|
||||
|
||||
```bash
|
||||
python skills/daybook-posting/scripts/daybook_post.py balance_sheet.xlsx
|
||||
```
|
||||
|
||||
Render other code as a Markdown fenced block instead (no dedicated `code`
|
||||
kind yet):
|
||||
|
||||
|
|
@ -71,6 +83,14 @@ kind yet):
|
|||
python skills/daybook-posting/scripts/daybook_post.py --file script.py --as-markdown --title "Generated Script"
|
||||
```
|
||||
|
||||
Embed an image inside a markdown/HTML artifact (upload first, then
|
||||
reference the printed URL in your content):
|
||||
|
||||
```bash
|
||||
python skills/daybook-posting/scripts/daybook_post.py --upload-image chart.png
|
||||
# -> prints .../assets/<id>; put that in your markdown, then post normally
|
||||
```
|
||||
|
||||
Dry run:
|
||||
|
||||
```bash
|
||||
|
|
@ -112,6 +132,21 @@ Or pass a JSON object:
|
|||
python skills/daybook-posting/scripts/daybook_post.py --kind markdown --title "Run Summary" --content-file summary.md --meta-json '{"run_id":"run-001"}'
|
||||
```
|
||||
|
||||
`--meta` and `--meta-json` are merged if both are given. Metadata lives in
|
||||
the artifact's `metadata` field, separate from `--tags` (which are for
|
||||
filtering).
|
||||
|
||||
## Source & Theme Flags
|
||||
|
||||
| Flag | Default | Notes |
|
||||
|---|---|---|
|
||||
| `--source` | `DAYBOOK_SOURCE` env, else `agent` | What produced this — an agent-profile, script, or person name. |
|
||||
| `--source-type` | `agent` | One of `agent`, `person`, `system`. |
|
||||
| `--source-name` | The effective `--source` | Human-readable name, e.g. "Hermes Agent". |
|
||||
| `--source-id` | Empty | A stable external ID, if one exists. |
|
||||
| `--source-prompt` | Empty | The prompt/instruction behind the artifact. |
|
||||
| `--theme` | Kind default | `markdown`/`html_fragment` only: `report` (default), `tasks`, or `base`. Other kinds ignore it. |
|
||||
|
||||
## Skill Wrapper
|
||||
|
||||
A thin LLM-facing wrapper lives at:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue