Aliases for newer OCI services without toolkit icons (Redis, PostgreSQL)

Diego pointed at examples/output-ashburn-redis-oke and asked: does
Oracle ship a Redis icon for drawio? Answer: NO. Confirmed against
both libraries:
  - kb/diagram/oci-icons.json (OCI Toolkit v24.2)         → 0 hits
  - kb/diagram/oci-pptx-icons-index.json (OCI_Icons.pptx) → 0 hits
Same for OCI Cache, Valkey, OCI PostgreSQL — all are GA after the
toolkit shipped.

Oracle's own reference architecture
``modernize-app-dev-oci-postgresql-redis-opensearch`` works around
this by embedding inline SVG vector data into ``shape=stencil(...)``
cells — there is no reusable named stencil. The closest reusable
match is the generic ``database`` icon (8 cells in oci-icons.json,
the canonical "Database" stencil).

Persistent fixes:

- TYPE_TO_ICON (PPTX) and ICON_TYPE_ALIASES (drawio) both gain
  aliases for ``redis`` / ``oci_cache`` / ``oci_cache_with_redis`` /
  ``cache`` / ``valkey`` / ``postgresql`` / ``postgres`` /
  ``oci_postgresql`` → ``database``. Plus ``opensearch`` →
  ``database_opensearch`` (which exists) on the PPTX side.

- SKILL.md option 2 step 3 documents the convention: when an OCI
  service doesn't have a toolkit icon, use the generic stencil and
  pair with an explicit ``label:`` carrying the real service name
  (e.g. ``label: "OCI Cache (Redis)"``). When Oracle ships a v25+
  toolkit with these icons, update oci-icons.json + the alias tables
  and the next render picks up the real icon automatically.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
root
2026-04-26 00:00:17 -03:00
parent b77a855a3e
commit eef213612c
4 changed files with 32 additions and 0 deletions

View File

@@ -189,6 +189,21 @@ TYPE_TO_ICON = {
"tags": ["tag_namespace"],
"compartment": ["compartment"],
"compartments": ["compartment"],
# Newer OCI services not yet in the OCI Toolkit v24.2 / OCI_Icons.pptx —
# fall back to the generic ``database`` stencil with an explicit
# ``label:`` carrying the real service name. Oracle's own ref archs
# (e.g. modernize-app-dev-oci-postgresql-redis-opensearch) embed
# custom inline SVGs because the toolkit lacks these too — using the
# canonical generic icon is the closest standardized match.
"redis": ["database"],
"oci_cache": ["database"],
"oci_cache_with_redis": ["database"],
"cache": ["database"],
"valkey": ["database"],
"postgresql": ["database"],
"postgres": ["database"],
"oci_postgresql": ["database"],
"opensearch": ["database_opensearch", "database"],
}
ICON_KEYWORD_HINTS = {