feat(cas): add helper method for authenticated citation sources#599
feat(cas): add helper method for authenticated citation sources#599scottcmg wants to merge 5 commits into
Conversation
Review findingsNew inline comments posted this run:
|
Fail-closed origin check, PascalCase telemetry key, typed test param, network/malformed-URL branch tests, and the correct (scope-less) oauth entry per the ECS reference endpoint's org-member policy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Pushed fixes for the review 👇
Skipped the integration test for now — conv-agent has no integration suite at all yet, so a one-off here felt out of place. Can do it as a separate pass if we want to stand that up. |
| @@ -0,0 +1,52 @@ | |||
| import { describe, it, expect } from 'vitest'; | |||
There was a problem hiding this comment.
The test file path does not mirror the src/ structure. Per the architecture docs: "tests/unit/ mirrors src/ structure".
- Source:
src/services/conversational-agent/helpers/citation.ts - Expected test path:
tests/unit/services/conversational-agent/helpers/citation.test.ts - Actual path:
tests/unit/helpers/conversational-agent/citation.test.ts
The file should be moved to match the source tree.
Review findingsNew inline comments posted this run:
|
Make the service JSDoc identical to the ServiceModel and use backtick notation for the param type per convention. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…thod # Conflicts: # src/services/conversational-agent/conversational-agent.ts
Review findingsOne previously-resolved thread was unresolved this run:
|
|



Details
Customers have reported issues with the generated PDF citations that are returned as part of the conversational agent response where clicking the inline citation or the source in the source list returns a 401 in a new tab. This is because these citations require an authorized fetch from ECS to display.
This PR is to add a helper method that customers can use to add support for these citation links so they do not have to be responsible for independently determining the wiring needed for support. It adds some security hardening against (1) inline HTML execution and (2) hijacked download requests sending user credentials to a non-UiPath-origin source.