Skip to content

Route all remaining agent/API audioUrl emits through the cached host - #134

Merged
uncleJim21 merged 1 commit into
masterfrom
jc/audio-host-remaining-sites
Aug 1, 2026
Merged

Route all remaining agent/API audioUrl emits through the cached host#134
uncleJim21 merged 1 commit into
masterfrom
jc/audio-host-remaining-sites

Conversation

@uncleJim21

Copy link
Copy Markdown
Owner

Why

Follow-up to #133. That PR rewrote audioUrl → the Cloudflare-cached host
(audio.pullthatupjamie.ai) at the three main playback formatters. But several
other agent/API-facing endpoints still returned the raw DigitalOcean host, and one
doc showed a raw-host audioUrl example — so agents hitting those surfaces (or
copying the doc) would still bypass the cache and bill DO egress.

Changes

Wrap publicAudioUrl() at every remaining agent/API audioUrl emit site so
"just use audioUrl" is always the cached host. The helper is idempotent
(no-ops on already-rewritten URLs, on podcaster-hosted RSS URLs, and on
null/sentinels), so double-wrapping downstream of #133's formatters is safe.

  • routes/jamieExploreRoutes.js — 3D-search / hierarchy API (×2)
  • routes/researchSessions.js — research-session clips
  • services/tape/tapeShared.js — tape results
  • utils/workflowSteps.js (×2) + utils/workflowOutputFormatter.js — agent workflow output
  • agent-tools/neo4jTools.js — graph tool
  • utils/entitlementMiddleware.js — Mongo-mirror clip DTO

Docs / skill:

  • docs/details-apis/HIERARCHY_API.md — the two audioUrl examples now show
    audio.pullthatupjamie.ai instead of the raw cascdr-… host.
  • skills/.../podcast-rra.md — note on the audioUrl field: use it verbatim;
    do not construct audio URLs from feedId/guid or hardcode a CDN host.

Deliberately left as-is

  • llms.txt + openapi.json — already clean (llms.txt points agents at
    /api/search-quotes → the audioUrl field and shows no raw host; openapi's
    audioUrl is a bare format: uri). Note: llms.txt is served from the
    frontend repo, not here.
  • docs/EXTERNAL_VIDEO_PARENT_ID.md cascdr refs — those document the
    video-edit CDN allowlist, not audio playback; changing them would be wrong.
  • RSS-origin emits (LandingPageService, PodcastRssCacheManager) — those set
    audioUrl from the podcaster's own enclosure (itemUrl), not our bucket, so
    there's nothing to rewrite (and the helper would no-op anyway).

Tests

🤖 Generated with Claude Code

Follow-up to #133: extend publicAudioUrl() to every remaining agent/API
audioUrl emit site so "use audioUrl" is always the Cloudflare-cached host,
not the raw DigitalOcean CDN. The helper is idempotent, so wrapping values
that already flowed through #133's formatters is a safe no-op.

- jamieExploreRoutes (3D/hierarchy), researchSessions, tapeShared,
  workflowSteps (x2), workflowOutputFormatter, neo4jTools, entitlementMiddleware
- docs/details-apis/HIERARCHY_API.md: audioUrl examples -> audio.pullthatupjamie.ai
- skills/.../podcast-rra.md: use audioUrl verbatim; don't construct CDN URLs

llms.txt + openapi are already clean; EXTERNAL_VIDEO_PARENT_ID.md cascdr refs
are the video-edit allowlist (left as-is); RSS-origin emits point at podcaster
hosts (nothing to rewrite).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@uncleJim21
uncleJim21 merged commit 569f891 into master Aug 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant