Releases: DeepCitation/deepcitation
Releases · DeepCitation/deepcitation
v0.4.3
Added
DC_NO_BROWSERenv var — setDC_NO_BROWSER=1to suppress browser launch during auth; respected byopenBrowser()and the browser-auth gate. (#432)- AI-agent auth gate —
IS_AI_AGENT(set by Claude Code and similar tools) is now checked incanStartBrowserAuth(); non-interactive environments automatically fall through to the device-code / env-var path with a clearer error message. (#432)
Fixed
- Windows browser-open injection — replaced
cmd.exe /c startwithexplorer.exeto prevent URL&characters from being parsed as shell command separators (CodeQLjs/indirect-command-line-injection). (#431) logoutremoves.envkey automatically —deepcitation auth logoutnow deletes theDEEPCITATION_API_KEYline from.envinstead of printing a manual-edit instruction. (#431)- Review regressions — restored report verdict shell, hardened citation block parsing and markdown rendering, tightened anchor promotion logic, and corrected
prepareCLI output contract. (#433)
Full Changelog: v...v0.4.3
✅ Published to npm registry
v0.4.2
Added
deepcitation lintcommand — pre-flight citation-syntax validator (no network);--jsonoutput witherrors/warningsarrays; 10+ rules covering duplicate IDs, format mismatches, and orphan markers. (#425)deepcitation publishcommand — re-uploads an already-verified HTML +verify-response.jsonpair; useful when auto-publish failed or to change visibility after the fact. (#425)deepcitation slicecommand — extracts a page range from a prepared JSON verification file. (#425)deepcitation textcommand — re-renders a prepared JSON file as plain text (no network). (#425)- Claim card in reports —
markdownToHtmlgains an optionalclaimfield (and--claimCLI flag) that renders a quoted eyebrow card between the title and the meta strip; supports inline markdown. (#426) - MODEL chip in reports —
markdownToHtmlgains an optionalmodelfield rendered as aMODELchip in the meta strip, ordered between ANALYZED and CITATIONS. (#426) ≈approximate-match marker — citation highlights, keyhole strips, and drawer items display≈whenclaimTextdiffers fromsourceMatch; a "claimed as …" annotation surfaces the variance inline. (#428)
Changed
verifyauto-publishes by default — successful runs upload to My Verifications asprivate; opt-out with--no-publish; pass--vis unlistedor--vis publicto widen visibility. (#425)- Per-attachment assets in
verifyoutput —verify-response.jsonnow includes anattachmentsmap (pageImages, originalDownload) alongsideverificationswhen any attachment returned assets. (#430) - CDN blink animation synced with React — CDN now imports
BLINK_*constants from the same source as the React component, fixing a 180 ms vs 120 ms enter-duration discrepancy; implements the full three-stage enter animation with acancelBlink()guard. (#427) - Billing copy — quota-exceeded messages and the dashboard description now reflect subscription tiers (Standard 20/week at $20/mo, Pro unlimited at $200/mo). (#427)
popover.displayedAs→popover.claimedAs— i18n key renamed and copy updated to "claimed as …" across all locales (en, es, fr, vi). (#428)
Fixed
- CDN reposition race —
scheduleRepositiondefers repositioning untilisViewTransitioning()is false, preventing a mid-animation position snap. (#426) - View-transition depth counter —
_transitionDepthis decremented only after both the ghost and content-reveal animations complete, preventing a premature counter reset. (#426) - Popover scroll passthrough — scroll-lock RAF logic replaced with
overscroll-behavior: containinEvidenceTray, simplifying the scroll-containment path. (#428)
Removed
--audienceCLI flag — audience presets removed; all reports use standard defaults (960 px width, tier-2 sections open). (#426)
Full Changelog: v...v0.4.2
✅ Published to npm registry
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