Releases: DeepCitation/deepcitation
Releases · DeepCitation/deepcitation
v0.4.1
Performance
- ~45% main-entry bundle reduction —
DeepCitationClientand all prompt helpers are no longer bundled intodeepcitation(the main entry). Import fromdeepcitation/clientanddeepcitation/promptsdirectly; the main entry now covers only core parsing/verification. (#420)
Fixed
getCitationKeyfield aliases — resolves old-CLI field names (anchorText,fullPhrase) so citations produced by older CLI versions are keyed correctly without manual migration. (#419)
Removed ⚠️ Breaking CLI changes
deepcitation citeremoved — usedeepcitation verify --html <file>instead.deepcitation env(top-level) removed — usedeepcitation auth envinstead.deepcitation showcaseremoved (internal dev tool, no public API contract).
✅ Published to npm registry
v0.4.0
Added
reviewUrl()SDK method — new client method withReviewUrlOptionsandReviewUrlResponsetypes; full typed error coverage includingValidationErrorfor HTTP 200 +status:errorbodies. (#415)- Page-collapse reverse animation —
startEvidencePageCollapseTransitionanimates spotlight → keyhole strip with a two-phase pre/post-flushSynccapture and a fast-tap guard against dual-ghost/orphaned-scrim race conditions. (#413) - Mouse drag support for drawer — desktop users can drag the drawer handle to close; mouse listeners register on
documentonly during active drag withpreventDefaultblocking text selection. (#412) - New React exports —
getStatusFromVerification,getStatusLabel,DefaultPopoverContent(withPopoverContentProps/PopoverViewStatetypes), andSnippetZoneexported for custom popover wrappers and Remotion stills. (#412) denseAnnotatePage()— annotates un-tagged page text with dense sequential<line id="N">tags for lineId-based anchor lookup; exported fromcite.ts. Must not be applied to pages with existing sparse OCR tags.TimeoutErrorclass — structured error withphase(one ofproxy_connect | tls_handshake | response_headers | response_idle | request_overall),elapsedMs,proxyUrl, andtargetfields. Exported fromsrc/cli/proxy.ts. (#411)- Structured CLI error output —
formatNetworkErrorrecognizesTimeoutErrorand emits a human-readable block with phase explanation, redacted proxy URL, and "Do NOT" guidance, followed by a__DC_ERROR__ {...}JSON marker line so agent-driven callers can short-circuit their recovery loop (retryable: false,recoverable: false). (#411) CliAuthPageagent-relay polish — hides the "copy key / copy command" toggle in agent-relay mode (isManual && !cliWasListening), forcing the full command format so agents receive actionable context instead of a baresk-dc-…. (#411)- Per-step timing and
metrics.json— example scripts record upload/llm/verify step durations and write a summary file (provider, model, date, source, timing, citation counts/pct) to the cache dir after each run. (#416)
Changed
sourceContext/sourceMatchrename —fullPhrase→sourceContextandanchorText→sourceMatchacross the full codebase, types, i18n strings, and docs. LLMs emitting old field names are handled via backward-compat alias resolution innormalizeCitationInput. (#412)- Drawer UX — URL/snippet zones in expanded view, claim-vs-source variance annotation, page badges before status icons, always-render fiber-stability pattern for evidence slots (display:none toggle), active/inactive indicator dot styling. (#412)
- Page-expand ghost — pure translate animation (no scale); clip-path iris convergence (0.42→0.88 progress) trims keyhole padding; border-radius morph from keyhole corners to 0 px at landing; new
EASE_GHOST_EXPANDeasing. (#413) - Per-phase transport timeouts —
createProxyFetchenforcesproxy_connect/tls_handshake/response_headers/response_idle/request_overalltimers (5 s / 10 s / 60 s / 30 s / 90 s), each overridable viaDC_PROXY_*_MSenv vars. Prevents indefinite hangs when a proxy accepts but then stalls. (#411) - FormData multipart rides the CONNECT tunnel —
createProxyFetchserializesFormDatainline viaencodeMultipartover the hand-rolled TLS tunnel;sendViaUndiciProxyandconvertFormDatadeleted as dead code, eliminating theundiciruntime dependency from all proxy paths. (#411) tsconfigmoduleResolution: bundler— migrates from deprecatednode/node10tobundler, silencing TS5101/TS5107 errors that become hard failures in TypeScript 6.0. (#416)
Fixed
- Popover scrolls with page — portals into the Radix ScrollArea viewport (or nearest scrollable ancestor); with
position:absoluteinside the scroll container the popover sits in document space and scrolls away naturally. (#417) - Ghost scale-up for miss/not_found — page-expand ghost for citations without annotations now uses source keyhole dimensions (pure translate, scale=1.0) instead of full viewport rect, eliminating the aggressive "keyhole filling the screen" effect. (#417)
prepareUrlsilent error swallowing — HTTP 200 responses withstatus:errorin the JSON body now throwValidationErrorwith the server-supplied message instead of silently passing a poisoned response to callers. (#415)- Date-only timezone shift —
YYYY-MM-DDstrings are now parsed as local noon (T12:00:00) instead of UTC midnight, preventing off-by-one day display in UTC− timezones. (#415) review_extract.pyfalse positives — list-itemPLACEMENT, bold-textPLACEMENT, and smart-quoteNOT_SUBSTRINGfalse positives fixed; file-handle resource leak and greedy fallback regex also corrected. (#415)- Parsing truncation after start delimiter —
parseCitationDatanow returnssuccess:truewith empty citations when input ends immediately after<<<CITATION_DATA>>>(token-limit cutoff), as distinct from a genuinely empty block (start + end delimiter with nothing between). - Cowork
verifyhang —createCoworkFetchno longer routes throughundici.EnvHttpProxyAgent, which hung indefinitely on JSON POSTs throughlocalhost:3128in Claude Cowork. Now delegates tocreateProxyFetch(built on Node built-ins only) with deterministic per-phase timeouts. (#411)
✅ Published to npm registry
v0.3.11
Added
verifyIterative()SDK method — LLM-agnostic retry loop: verifies citations, invokes anonAttemptCompletecallback so consumers can amend and re-verify up tomaxAttempts. IncludesLlmSearchAttempt,LlmAmendmenttypes andcomputeAmendments()diff utility. (#404)- Amendment timeline UI —
AmendmentRowin the search narrative shows field-level diffs and false-positive rejections between LLM retry passes. Rendered as dashed-border markers inVerificationLog. i18n added for en/es/fr/vi. (#404) deepTextPagesByAttachmentId— replacesdeepTextPages/deepTextPromptPortionwith a per-attachment page array keyed byattachmentId, eliminating ambiguity in multi-attachment workflows. (#403)mergeCLI command — merges citation JSON files from parallel-section workflows into a single output. (#403)- Body-marker auto-cite —
deepcitation verify --markdownauto-generates citations fromcite:Nmarkers in the body when no citations file is provided. Supportscite:N "anchor text"for explicit anchor control. (#403) AttachmentAssetstype —pageImages,originalDownload,convertedDownloadhoisted from per-citation objects to a top-levelattachmentsmap onVerifyCitationsResponse, eliminating per-citation duplication.normalizeVerifyResponse()handles backward-compat with legacy server responses. (#405)- Interactive HTML reports in examples —
fixture-to-html.tsconverts offline fixtures to full interactive HTML reports;verify-html.tsPlaywright tests validate citation span rendering and popover initialization. (#405) - Update checker — CLI checks for new versions with a 24-hour throttle and prints a notice to stderr when an update is available. (#406)
- Unified
authcommand — newdeepcitation authtriggers the browser login flow automatically; includes--textfallback for non-browser environments andIS_AI_AGENTdetection for agent-aware auth messages. (#407) - Favicon fallback chain —
useFaviconSrchook withStackedFaviconcomponent; retries image loads on 404 during pending CDN renders. (#406) - Download progress indicator — animated percentage counter with
aria-live="polite"announcements at 25% buckets. i18n strings added for en/es/fr/vi. (#406) computeBracketTarget— tight bounding hull for anchor text highlights. (#406)
Changed
- Drawer UX — document icon for non-URL sources, status indicator converts to collapse caret on hover/focus, auto-scroll on expand and page-badge click, status border moved to expanded content area,
CompactSingleCitationRowremoved. (#404) StackedStatusIcons— drawer header verification indicators consolidated into a single row; gainsactiveIndex,size,gap, andonPageprops. (#403)- CDN popover — switches to
position:fixedwhen expanded-page height exceeds 80% of viewport, preventing scroll-away. ResetslastCoordson mode switch to avoid stale coordinate comparisons. (#407) - Keyhole image — simplified to natural-size rendering via
AnchorTextFocusedImage; keyhole strips usealignX: "start"to show the anchor's left edge immediately. (#407, #404) anchor_textrules — hard 4-word maximum enforced; paraphrased anchor text is promoted todisplay_labelautomatically during hydration. (#407)- CLI output co-location — URL source map enriches citations with
verifiedUrl/verifiedDomainmetadata for popover rendering. (#404) SKIP_DTSbuild toggle — setSKIP_DTS=trueto skip declaration generation during iterative development. (#405)
Fixed
- U+2060 word joiner — inserted between anchor text and superscript/indicator in all
CitationContentDisplayvariants, preventing mid-citation line breaks. (#403) - Body scroll lock in drawer — prevents double scrollbar when drawer is open. (#403)
- CDN popover coordinate reset —
lastCoordscleared when switching betweenposition:fixedandposition:absolutemodes. (#407) pagesvariable scope — was block-scoped inside anifbranch and referenced outside, causing a compile error. (#407)- Jump-to-top on expand — fixed scroll jump during
side=topexpand transitions. (#407) - Stale-closure interval fix — download progress interval now always reads current state. (#406)
safeTest()for untrusted inputs — replaces raw inline regex ondownloadUrland label values incommands.tsto prevent ReDoS. (#406, #403)- Git Bash TTY detection — fixed false non-TTY detection in Git Bash on Windows. (#407)
Full Changelog: v...v0.3.11
✅ Published to npm registry
v0.3.10
Added
- Rich report header meta strip — report HTML shell now renders a
SOURCE · ANALYZED · AUDIENCE · CITATIONS · PAGESmeta strip using BEMdc-metaclasses, replacing the single.metaparagraph. (#402) - Brand logo SVG in report footer — square caps,
crispEdgesrendering per branding guidelines. (#402) - Cowork notice banner — informational banner injected into both plain and report HTML shells when running in Cowork mode. (#402)
Changed
undicifor Cowork proxy — Cowork fetch now usesundiciEnvHttpProxyAgentinstead ofglobalThis.fetch, resolving proxy CONNECT failures in corporate network environments.createClientis now async;undiciis externalized in the tsup bundle. (#402)- Report table style — no fill, heavier separators, blue hover row highlight. (#402)
- Report link color —
#3B82F6→#0284C7; background#FDFBF7→#F8FAFC. (#402)
Fixed
- Proxy error propagation —
sendViaUndiciProxyouter catch narrowed to import-only errors; real network errors (DNS, TLS, proxy-auth) now propagate instead of silently retrying withglobalThis.fetch. Falls back toEnvHttpProxyAgentwith a console warning whenProxyAgentconstruction fails. (#402)
✅ Published to npm registry
v0.3.9
What's Changed
- feat(cli): cowork proxy fix + rich report header meta strip by @bensonwong in #402
Full Changelog: v0.3.8...v0.3.9
✅ Published to npm registry
v0.3.8
Added
[anchor](cite:N)citation syntax — LLMs can now wrap the key phrase directly in markdown-link citation syntax, eliminating positional ambiguity of the legacy[N]suffix format. All parsing, rendering, and HTML conversion functions support both formats simultaneously. Old[N]format remains fully supported for backward compatibility.
Fixed
verifiedFullPhrasepreservation — strategy-result phrases are now kept intact socomputeKeySpanHighlightdraws the correct highlight span instead of falling back to a partial match.- CLI auth copy — em dash removed from
manual_donemessage; now uses a plain hyphen for terminal compatibility. - CLI auth i18n — locale strings for the CLI authentication flow are now consistently applied across all copy variants.
✅ Published to npm registry
v0.3.6
Added
display_labelfield onCitationData— compact keyd, aliasdisplayLabel; overridesanchor_textas the clickable trigger text. CLI injectsdata-dc-display-labelattribute into verified HTML output. (#398)- Per-group drawer page badges — multi-source drawers now show page badge strips inline with each source group header instead of one merged strip in the drawer header. (#398)
- CLI all-not-found diagnostics — when all citations are not-found, prints actionable hints (common format issues,
page_idformat, staleattachmentId). (#398) customPopoverActionsprop — newPopoverActioninterface threaded fromCitationComponent→DefaultPopoverContent→SourceContextHeader/PopoverFallbackView. Each action renders as an icon-only button with reveal-on-hover.labeldoubles asaria-labeland React key. (#397)- Phrase trimming —
trimPhraseToAnchorWindow()intextCleanup.ts: trimsfullPhraseto a ±150-char context window when significantly longer thananchorText. Applied inHighlightedPhrase,LookingForSection, andPopoverFallbackView. (#397) - Jest test suites — ~1980 tests across four new CLI suites (
cliUnit,cliCommands,cliAuthScenarios,cliIntegration).npm testnow uses Jest withforceExit. (#397) resolveAuth()helper — single source of truth for API key resolution (env var →.envfiles →credentials.json) used by all CLI commands viarequireAuth(). (#395)- Cowork (cloud) support — credentials stored in project-relative
.deepcitation/; non-TTYloginprovides Cowork-specific setup instructions; proxy CONNECT errors suggestNO_PROXYworkaround. (#395) - Auth key source reporting —
statusandwhoamishow where the key was loaded from;logoutgives source-aware removal instructions. (#395)
Changed
- CLI output co-location — verified HTML outputs now default to the same directory as the input file instead of CWD.
injectstrips-annotated/-draftsuffixes from the output filename. (#398) - CLI refactor —
cli.tsshrunk from ~1260 → 127 lines by extracting command logic tosrc/cli/commands.ts, proxy utilities tosrc/cli/proxy.ts, and pure helpers tosrc/cli/cliUtils.ts. (#397) - Anchor text validation thresholds — loosened from hard limits (40 chars / 4 words) to soft readability suggestions (60 chars / 6 words). (#395)
IS_COWORKcentralised — extracted toauth.tsas single source of truth (was duplicated). (#395)
Fixed
- CDN popover positioning —
position:staticportal targets no longer cause offset miscalculation (e.g. centredbodywithmargin:auto). Added viewport Y-axis clamping for tall expanded popovers. (#398) - Punctuation-only anchor handling —
wrapCitationMarkersemits an emptydata-citespan instead of wrapping garbage text; validation warnings added for punctuation-only and sub-3-char anchors. (#398) - Login process hang —
process.stdin.destroy()called after browser OAuth completes so the process exits cleanly. (#397) - Billing URL — corrected from
/api#billingto/billingin CLI help text. (#397) - Double
printFreeTierWelcome()— no longer called twice on terminal-paste login. (#395) - Unhandled rejection on
login()— properly handled. (#395)
Removed
USAGE_WARN_PCT/USAGE_CRITICAL_PCTexports — these constants were inadvertent public exports; canonical definitions remain inpackages/shared.warnUsagecallback and itsonUsageUpdatewiring removed fromcreateClient().src/billing.tsdeleted. (#396)
Full Changelog: v...v0.3.6
✅ Published to npm registry
v0.3.5
What's Changed
- feat: --markdown verify mode, viewBoxOriginY CropBox fix, and get command by @bensonwong in #391
- ci: bump the github-actions group with 5 updates by @dependabot[bot] in #389
- fix: popover absolute positioning, anchor highlight guard, DC_LOGIN_URL validation by @bensonwong in #392
- feat: auto display labels, billing, login UX, and popover scroll fixes by @bensonwong in #394
Full Changelog: v0.3.4...v0.3.5
✅ Published to npm registry
v0.3.4
Added
- CDN drawer integration — citation drawer support in CDN popover API with
[data-dc-drawer-trigger]binding,showDrawer/hideDrawermethods, and auto-refresh onupdate()(#387) - Citation data validation —
validateCitationDataanddetectExtractionArtifactsutilities catch common PDF/HTML text-extraction issues (collapsed spaces, broken hyphens, ligature loss, table fragments) before they reach the API (#387) content_word_matchsearch method — newSearchMethodvariant with i18n support for all locales (#386)truncateMiddleutility — exported middle-truncation function for long strings (API keys, hashes, URLs) (#388)- DeepCitation branding on status labels — verified/partial-match/not-found UI labels now prefixed with "DeepCitation" for product attribution (#388)
- CDN
data-citation-keyresolution — human-readabledata-citation-keyattributes resolved to hashed keys at runtime via key-map (#386) - CLI
--indicatorflag — choose icon, dot, or none forinjectandverify-htmlcommands (#387) - Snippet text normalization —
normalizeSnippetTextfixes collapsed spaces and quote boundaries in verification API snippets (#387) - Imprecise location note — EvidenceTray shows "Exact location not specified" when a verified citation lacks page/line IDs (#387)
Changed
isImpreciseLocationmoved to Verification type — pre-computed by the verification engine instead of re-derived in UI (#388)- Citation chip text — removed hardcoded max-width truncation; chips now flow naturally with
min-w-0flex overflow (#388)
Fixed
- WSL2 auth callback — login callback server conditionally binds to
0.0.0.0whenWSL_DISTRO_NAMEis set, so Windows browsers can reach it (#386) - CDN double-processing guard —
data-citation-keyresolution skips elements already processed by legacydata-citeloop (#386) - CDN
stripExistingInjection— extracted toreportUtils.ts; tightened regex to requirewindow.DeepCitationPopover=assignment (#387) - ReDoS guard —
validateRegexInputadded todetectExtractionArtifacts(#387)
✅ Published to npm registry
v0.3.2
What's new in v0.3.2
CLI enhancements
verify --html— parse citation markers directly from HTML inputnormalizecommand — normalize citation text via the CLI, with proxy support--proxyflag — route API requests through a proxy serverlogin/keygen— interactive authentication with token persistence
formatting module (replaces markdown)
The deepcitation/markdown entry point has been renamed to deepcitation/formatting with a new indicators.ts module for citation status indicators.
- import { ... } from "deepcitation/markdown";
+ import { ... } from "deepcitation/formatting";Build fixes
- CDN bundle now builds after tsup to prevent
clean: truefrom deleting it - Fixed TypeScript declaration file generation for new entry points
Removed
The following renderers have been removed in favor of the formatting module and terminalRenderer:
renderMarkdown,githubRenderer,htmlRenderer,slackRenderer(and their test suites)buildProofUrl,buildProofUrls,buildSnippetImageUrlproof URL utilities- Internal docs (
brand-iteration-considerations.html,plan-universal-renderers.md)
Install
npm install deepcitation@0.3.2Full Changelog: v0.3.1...v0.3.2
✅ Published to npm registry