The OSINT investigator's workbench. One case, one folder, every tool. Local-first: your media and your investigations never leave your machine.
JavaScript
Add gated media downloads and a responsive proof toolbar (#28)
OsintMeThate077c84f21bf
diff --git a/.gitignore b/.gitignoreindex dad3f52..8a89c8d 100644--- a/.gitignore+++ b/.gitignore@@ -56,3 +56,9 @@ build-bin/# Native binaries downloaded by the release workflowpackaging/vendor/++# Local-only marketing/presentation assets, never pushed+.docs/++# Local-only design/brainstorming notes, never pushed+docs/superpowers/diff --git a/README.md b/README.mdindex 8dada6b..441da87 100644--- a/README.md+++ b/README.md@@ -9,35 +9,35 @@ case is a plain folder that can be reopened, archived or shared.*The name is the French word for azimuth, the compass bearing you sight alongto fix a point on the map.*-## v0.2.1: Scalable case workspace+## v0.2.2: Login-walled downloads| Tool | What it does ||------|--------------|-| **Media Library** | Import local files or download by URL (X, Telegram, TikTok, YouTube, Instagram and more via yt-dlp, with a gallery-dl fallback for image-only posts). Each item gets a clean local file, metadata and a SHA-256. Multi-photo posts open a picker. |-| **Inspect** | A scratch workspace over any photo or video: frame adjustments, editable crop, sharpest-frame capture, hand-made collage with per-piece warp/scale/rotate, and auto-stitch to solve a panorama's layout for you. Nothing enters the case until you save. |-| **Satellite** | Coordinates or a place name become an imagery crop, with select-area capture, map rotation, measurement tools and reference-image overlays. Esri/OSM by default; add a Mapbox or Google key for more basemaps. |+| **Media** | Import local files or download by URL (X, Telegram, TikTok, YouTube, Instagram and more via yt-dlp, with a gallery-dl fallback for image-only posts). Public media is fetched cookie-less; a login-walled post prompts once for a browser session or an exported `cookies.txt`. Each item gets a clean local file, metadata and a SHA-256. Multi-photo posts open a picker. |+| **Reverse Search** | Prepare an image or a video frame for keyless reverse-image services. Nothing uploads on its own. |+| **Inspect** | A scratch workspace over any photo or video: frame adjustments, editable crop, sharpest-frame capture, hand-made collage with per-piece warp/scale/rotate, auto-stitch to solve a panorama's layout, and ELA hints. Nothing enters the case until you save. |+| **Satellite** | Coordinates or a place name become an imagery crop, with select-area capture, map rotation, measurement tools, reference overlays and editable AOI grids for area review. Esri/OSM by default; add a Mapbox or Google key for more basemaps. |+| **Coordinates** | Convert common coordinate formats, copy the result, and open map or geocoding links. || **Geo Proof** | Start a named proof from a reusable house style, select case panels with search, compose them in a grid or free layout, annotate with colored shapes/freehand/text, and export `proof.png` plus a re-editable spec. || **Geo Report** | Turn a proof into a prepared thread for X, Bluesky, or Mastodon: coordinates, plus code, attribution, target-specific character counts, media, and a structured Markdown case note with linked evidence. |+| **Notebook** | Tabbed Markdown notes with local media, linked case evidence, broken-reference markers and a print-ready PDF view. |++Under the hood: reusable proof and thread templates, per-case SQLite with a+bounded catalog, a durable one-worker thumbnail queue, the map-capture browser+extension, and cross-platform binaries with a bundled ffmpeg.Every tool works one-shot (a scratch session, no setup) or inside a case, aplain directory holding the whole investigation.-New in v0.2.1:--- Existing JSON case graphs migrate automatically to per-case SQLite on open.- Media, notes and proofs remain ordinary files, the original graph is retained- as a recoverable backup, and a closed case folder stays portable.-- The case sidebar now loads a bounded catalog, with folders, suggestions and- unfiled work fetched as needed. Video thumbnails use a durable one-worker- queue, so large cases remain responsive.-- Case Notebook adds tabbed Markdown notes with local media, linked evidence,- broken-reference markers and a print-ready PDF view.-- Geo Proof, Geo Report, Inspect and Satellite now have clearer, componentised- canvas workflows. Browser tests exercise real Konva and Leaflet gestures in- Chromium and Firefox.-- Release builds now use the lock for distribution tooling, smoke-test the- launched binary and verify its bundled `ffmpeg` and `ffprobe`. The local- relaunch helper works on Windows, Linux and macOS.+New in v0.2.2:++- Downloads now handle login-walled media. The first attempt is always+ cookie-less; only when a post turns out to need an account does Media offer to+ borrow a signed-in browser's session or an exported `cookies.txt`. The session+ is used for that download, kept 0600 in the workspace, and never leaves the+ machine. Chromium on Windows can't be read, so it points you to the file route.+- The Geo Proof toolbar reflows to fit narrow screens instead of overflowing,+ and remembers the color and stroke width you last drew with.## Install & run@@ -197,7 +197,7 @@ wheel + Windows/Linux/macOS binaries, attaches them to a GitHub release, andpublishes to PyPI. **Don't publish by hand.**```bash-git tag v0.2.1 && git push origin v0.2.1+git tag v0.2.2 && git push origin v0.2.2```One-time setup: register the repo as adiff --git a/docs/SPEC.md b/docs/SPEC.mdindex 6cddaff..961dfb8 100644--- a/docs/SPEC.md+++ b/docs/SPEC.md@@ -107,6 +107,7 @@ proof for publication.| ✅ **Case Notebook** | Edits tabbed Markdown notes with local media, entity links, broken-reference markers and PDF output. || ✅ **Canvas tests** | Exercises Leaflet and Konva interactions in Chromium and Firefox. || ✅ **Storage platform** | Uses per-case SQLite, bounded catalog queries and a durable one-worker job queue. |+| ✅ **Gated downloads** | Fetches login-walled media by borrowing a browser session or cookies.txt, cookie-less by default and prompted only on a wall. |---@@ -146,7 +147,7 @@ app or extension captures; EXIF/GPS import suggestions for place and time.| **Timeline Builder** | Timestamped events from mixed sources aligned on timeline + map. || **Report Builder** | Assemble proofs/maps/timeline/entities/notes into HTML/PDF. |-Toward v4: dependency-aware delete (partly done); downloader cookies;+Toward v4: dependency-aware delete (partly done);archive-on-download and a Wayback CDX snapshot timeline with diff; web-page saveextension; case bundle import/export; editable places table with CSV/GeoJSON;imagery-date change detection; source location pattern-of-life map and timeline;diff --git a/frontend/e2e/proof-canvas.spec.js b/frontend/e2e/proof-canvas.spec.jsindex c6630f7..61deccf 100644--- a/frontend/e2e/proof-canvas.spec.js+++ b/frontend/e2e/proof-canvas.spec.js@@ -16,6 +16,8 @@ test('a real Konva panel remains interactive after click and drag', async ({ pagawait page.mouse.click(x, y);await expect(page.locator('.panel-row')).toHaveClass(/selected/);+ // Layout modes now live in the toolbar's overflow flyout; open it first.+ await page.getByTitle('Layout, tweet crops & repack').click();await page.getByTitle('Free layout: drag panels anywhere').click();// Changing layout intentionally clears selection. The first click above// covers the canvas selection regression; use the deterministic side control@@ -61,3 +63,93 @@ test('draws a real Konva annotation and round-trips undo and redo', async ({ pagawait expect(page.locator('.shape-row')).toHaveCount(1);fixture.expectNoUnexpectedRequests();});++test('a picked colour becomes the default for the next drawn shape', async ({ page }) => {+ const fixture = await installAppFixture(page);+ await openProofWithPanel(page);++ const canvas = page.locator('.konva canvas').first();+ const box = await canvas.boundingBox();+ // Same panel region the plain draw test uses, split into two small boxes.+ const cx = box.x + box.width / 2;+ const cy = box.y + box.height / 2;++ await page.getByTitle('Box (r)').click();++ // First box: drawn with the default colour, then auto-selected.+ await page.mouse.move(cx - 38, cy - 20);+ await page.mouse.down();+ await page.mouse.move(cx - 8, cy + 10, { steps: 6 });+ await page.mouse.up();+ await expect(page.locator('.shape-row')).toHaveCount(1);++ // Pick a new colour while that first box is still selected.+ await page.getByTitle('Annotation colour').click();+ await page.getByLabel('color #40c4ff').click();++ // Second box: should inherit the colour just picked, not the old default.+ await page.mouse.move(cx + 8, cy - 20);+ await page.mouse.down();+ await page.mouse.move(cx + 45, cy + 10, { steps: 6 });+ await page.mouse.up();+ await expect(page.locator('.shape-row')).toHaveCount(2);++ await page.getByRole('button', { name: 'Save', exact: true }).click();+ await expect.poll(() => fixture.proofSaves.length).toBe(1);+ const shapes = fixture.proofSaves[0].spec.shapes;+ expect(shapes[1].color).toBe('#40c4ff');+ fixture.expectNoUnexpectedRequests();+});++test('a picked stroke width becomes the default for the next drawn shape', async ({ page }) => {+ const fixture = await installAppFixture(page);+ await openProofWithPanel(page);++ const canvas = page.locator('.konva canvas').first();+ const box = await canvas.boundingBox();+ const cx = box.x + box.width / 2;+ const cy = box.y + box.height / 2;++ await page.getByTitle('Box (r)').click();++ await page.mouse.move(cx - 38, cy - 20);+ await page.mouse.down();+ await page.mouse.move(cx - 8, cy + 10, { steps: 6 });+ await page.mouse.up();+ await expect(page.locator('.shape-row')).toHaveCount(1);++ // Change the stroke width while the first box is still selected.+ await page.getByTitle('Stroke width', { exact: true }).click();+ await page.locator('.stroke-slider').fill('11');++ await page.mouse.move(cx + 8, cy - 20);+ await page.mouse.down();+ await page.mouse.move(cx + 45, cy + 10, { steps: 6 });+ await page.mouse.up();+ await expect(page.locator('.shape-row')).toHaveCount(2);++ await page.getByRole('button', { name: 'Save', exact: true }).click();+ await expect.poll(() => fixture.proofSaves.length).toBe(1);+ const shapes = fixture.proofSaves[0].spec.shapes;+ expect(shapes[1].strokeWidth).toBe(11);+ fixture.expectNoUnexpectedRequests();+});++test('the layout overflow flyout opens and closes on outside click', async ({ page }) => {+ const fixture = await installAppFixture(page);+ await openProofWithPanel(page);++ const freeBtn = page.getByTitle('Free layout: drag panels anywhere');+ // Collapsed by default: the control is in the DOM but not shown.+ await expect(freeBtn).toBeHidden();++ await page.getByTitle('Layout, tweet crops & repack').click();+ await expect(freeBtn).toBeVisible();++ // A click anywhere outside the flyout dismisses it.+ const canvas = page.locator('.konva canvas').first();+ const box = await canvas.boundingBox();+ await page.mouse.click(box.x + box.width / 2, box.y + box.height / 2);+ await expect(freeBtn).toBeHidden();+ fixture.expectNoUnexpectedRequests();+});diff --git a/frontend/src/tools/MediaLibrary.svelte b/frontend/src/tools/MediaLibrary.svelteindex b09694d..26644d9 100644--- a/frontend/src/tools/MediaLibrary.svelte+++ b/frontend/src/tools/MediaLibrary.svelte@@ -15,8 +15,26 @@let url = $state('');let picker = $state(null); // multi-item picker: {url, items: [{index, title, thumbnail, kind, selected}]}let dragOver = $state(false);- let jobs = $state([]); // active download jobs: {id, url, label, progress}+ let jobs = $state([]); // active download jobs: {id, url, label, progress, index, title}let fileInput;+ let cookieFileInput = $state();+ // cookie affordance, shown only when a download hits a login wall:+ // {url, index, title, platform, guidance, browser, busy}+ let authPrompt = $state(null);++ // browsers yt-dlp can read a session from; the Chromium subset can't be read+ // on Windows (locked/app-bound store) so we steer those to the file fallback+ const COOKIE_BROWSERS = [+ { id: 'firefox', label: 'Firefox' },+ { id: 'chrome', label: 'Chrome' },+ { id: 'edge', label: 'Edge' },+ { id: 'brave', label: 'Brave' },+ { id: 'chromium', label: 'Chromium' },+ { id: 'opera', label: 'Opera' },+ { id: 'safari', label: 'Safari' },+ { id: 'vivaldi', label: 'Vivaldi' },+ ];+ const CHROMIUM_BROWSERS = new Set(['chrome', 'chromium', 'edge', 'brave', 'vivaldi', 'opera']);// --- category facets (auto-derived from kind + source) ---// Overlapping filters (a downloaded video matches both Videos and Downloads);@@ -206,21 +224,55 @@startDownload(target);}- async function startDownload(target, index = null, title = null) {+ async function startDownload(target, index = null, title = null, useCookies = false) {try {const c = await ensureCase();const { job_id } = await api.post(`/api/cases/${c.id}/media/download`, {url: target,index,title,+ use_cookies: useCookies,});- jobs.push({ id: job_id, url: target, label: title || target, progress: {} });+ jobs.push({ id: job_id, url: target, label: title || target, progress: {}, index, title });poll(job_id);} catch (e) {toast(e.message, 'danger');}}+ // A gated link asked for a login. Retry after pointing the downloader at a+ // browser session (saved as the app-wide source) or an exported cookies.txt.+ async function retryWithBrowser() {+ authPrompt.busy = true;+ try {+ await api.put('/api/settings/prefs', {+ download_cookies: { source: 'browser', browser: authPrompt.browser },+ });+ const { url, index, title } = authPrompt;+ authPrompt = null;+ startDownload(url, index, title, true);+ } catch (e) {+ toast(e.message, 'danger');+ authPrompt.busy = false;+ }+ }++ async function retryWithCookieFile(file) {+ if (!file) return;+ authPrompt.busy = true;+ try {+ const form = new FormData();+ form.append('file', file);+ await api.post('/api/settings/cookies-file', form);+ const { url, index, title } = authPrompt;+ authPrompt = null;+ startDownload(url, index, title, true);+ } catch (e) {+ toast(e.message, 'danger');+ authPrompt.busy = false;+ }+ }+function selectAllPicker(value) {picker.items.forEach((i) => (i.selected = value));}@@ -244,7 +296,18 @@return;}jobs = jobs.filter((j) => j.id !== jobId);- if (status.status === 'done' && status.result?.multi) {+ if (status.status === 'done' && status.result?.needs_auth) {+ // login wall — offer a cookie source and retry, nothing downloaded yet+ authPrompt = {+ url: job.url,+ index: job.index ?? null,+ title: job.title ?? null,+ platform: status.result.platform ?? '',+ guidance: status.result.guidance ?? '',+ browser: 'firefox',+ busy: false,+ };+ } else if (status.status === 'done' && status.result?.multi) {// several attachments — nothing was downloaded yet, let the analyst pickpicker = { url: job.url, items: status.result.items.map((i) => ({ ...i, selected: true })) };} else if (status.status === 'done') {@@ -626,6 +689,61 @@</Modal>{/if}+<!-- cookie affordance: shown only when a download hits a login wall. The first+ attempt is always cookie-less, so this never interrupts public media. -->+{#if authPrompt}+ {@const chromiumBlocked =+ authPrompt.guidance === 'windows-chromium' ||+ (authPrompt.platform === 'win32' && CHROMIUM_BROWSERS.has(authPrompt.browser))}+ <Modal title="This link needs a login" onclose={() => (authPrompt = null)} width="480px">+ <p class="auth-hint">+ Works only if you're already signed in to this site in the browser you pick. Azimut borrows+ that session; it never asks for a password.+ </p>++ <div class="auth-source">+ <label class="auth-label" for="cookie-browser">Use cookies from</label>+ <select id="cookie-browser" class="input" bind:value={authPrompt.browser}>+ {#each COOKIE_BROWSERS as b (b.id)}+ <option value={b.id}>{b.label}</option>+ {/each}+ </select>+ <button class="btn btn-primary" disabled={authPrompt.busy || chromiumBlocked} onclick={retryWithBrowser}>+ <Icon name="download" size={14} /> Download signed in+ </button>+ </div>++ {#if chromiumBlocked}+ <p class="auth-note">+ Windows locks Chrome-family cookies, so Azimut can't read them. Quit that browser and pick+ Firefox, or use an exported cookies.txt below.+ </p>+ {/if}++ <div class="auth-divider"><span>or</span></div>++ <input+ type="file"+ accept=".txt"+ hidden+ bind:this={cookieFileInput}+ onchange={(e) => retryWithCookieFile(e.currentTarget.files[0])}+ />+ <button+ class="btn btn-ghost auth-file"+ disabled={authPrompt.busy}+ onclick={() => cookieFileInput.click()}+ >+ <Icon name="upload" size={14} /> Use a cookies.txt file+ </button>++ <div class="modal-actions">+ <div style="flex:1"></div>+ <button class="btn" disabled={authPrompt.busy} onclick={() => (authPrompt = null)}>Cancel</button>+ </div>+ </Modal>+{/if}+<!-- details modal: the same editor body as the case sidebar (provenance,derivation chain, title/notes/folder) so both stay in step -->{#if infoEntityId}@@ -1000,6 +1118,53 @@margin-top: 14px;}+ /* cookie affordance */+ .auth-hint {+ font-size: var(--fs-sm);+ color: var(--text-2);+ margin: 0 0 14px;+ }+ .auth-source {+ display: flex;+ align-items: end;+ gap: 8px;+ }+ .auth-source .input {+ flex: 1;+ }+ .auth-label {+ display: block;+ font-size: var(--fs-sm);+ color: var(--text-2);+ margin-bottom: 4px;+ }+ .auth-note {+ font-size: var(--fs-sm);+ color: var(--warn, var(--text-2));+ margin: 10px 0 0;+ }+ .auth-divider {+ display: flex;+ align-items: center;+ text-align: center;+ color: var(--text-2);+ font-size: var(--fs-sm);+ margin: 14px 0 10px;+ }+ .auth-divider::before,+ .auth-divider::after {+ content: '';+ flex: 1;+ border-top: 1px solid var(--border);+ }+ .auth-divider span {+ padding: 0 10px;+ }+ .auth-file {+ width: 100%;+ justify-content: center;+ }+/* multi-item picker */.picker-hint {font-size: var(--fs-sm);diff --git a/frontend/src/tools/MediaLibrary.test.js b/frontend/src/tools/MediaLibrary.test.jsindex 70ef7fb..f9f1362 100644--- a/frontend/src/tools/MediaLibrary.test.js+++ b/frontend/src/tools/MediaLibrary.test.js@@ -57,3 +57,39 @@ describe('Media Library thumbnail states', () => {expect(source).toContain('/media/thumbnails/regenerate');});});++describe('Media Library gated-download cookie affordance', () => {+ it('keeps the first attempt cookie-less and only opts in on retry', () => {+ // default download path never asks for cookies (local-first)+ expect(source).toContain('async function startDownload(target, index = null, title = null, useCookies = false)');+ expect(source).toContain('use_cookies: useCookies');+ });++ it('surfaces a login wall as the cookie prompt, not a plain error', () => {+ expect(source).toContain("status.status === 'done' && status.result?.needs_auth");+ expect(source).toContain('authPrompt = {');+ expect(source).toContain('platform: status.result.platform');+ expect(source).toContain('guidance: status.result.guidance');+ });++ it('states plainly that it borrows an existing login and never a password', () => {+ expect(source).toContain("already signed in to this site");+ expect(source).toContain('it never asks for a password');+ });++ it('retries with a saved browser source and re-downloads signed in', () => {+ expect(source).toContain("download_cookies: { source: 'browser', browser: authPrompt.browser }");+ expect(source).toContain('startDownload(url, index, title, true)');+ });++ it('offers the cookies.txt file fallback', () => {+ expect(source).toContain("await api.post('/api/settings/cookies-file', form)");+ expect(source).toContain('Use a cookies.txt file');+ });++ it('blocks the browser read for Chromium on Windows and steers to the file', () => {+ expect(source).toContain("authPrompt.guidance === 'windows-chromium'");+ expect(source).toContain("authPrompt.platform === 'win32' && CHROMIUM_BROWSERS.has(authPrompt.browser)");+ expect(source).toContain('disabled={authPrompt.busy || chromiumBlocked}');+ });+});diff --git a/frontend/src/tools/ProofComposer.svelte b/frontend/src/tools/ProofComposer.svelteindex 5571b26..65b4a47 100644--- a/frontend/src/tools/ProofComposer.svelte+++ b/frontend/src/tools/ProofComposer.svelte@@ -1723,8 +1723,10 @@const KIND_ICON = { rect: 'square', ellipse: 'circle', arrow: 'arrow', line: 'line', curve: 'curve', freehand: 'freehand', text: 'text' };const KIND_LABEL = { rect: 'Box', ellipse: 'Ellipse', arrow: 'Arrow', line: 'Line', curve: 'Curve', freehand: 'Freehand', text: 'Text' };- // Color / stroke controls act on the selected shape when there is one- // (live edit), otherwise they set the defaults for the next drawn shape.+ // Color / stroke controls live-edit the selected shape when there is one, and+ // always remember the pick as the default for the next drawn shape — the last+ // colour/width you touched stays your working colour, whether or not something+ // was selected at the time.function setColor(c) {if (selectedShape) {const oldColor = selectedShape.color;@@ -1735,21 +1737,23 @@delete proof.notes[oldColor];}dirty = true;- } else {- color = c;}+ color = c;}function setStroke(w) {+ // Font size is a text-only property, so editing it must not overwrite the+ // stroke-width default used for the next drawn shape.if (selectedShape?.kind === 'text') {selectedShape.fontSize = w;dirty = true;- } else if (selectedShape) {+ return;+ }+ if (selectedShape) {selectedShape.strokeWidth = w;dirty = true;- } else {- strokeW = w;}+ strokeW = w;}// Arrow-key nudge of the selected element, in panel-natural pixels.diff --git a/frontend/src/tools/proof/ProofToolbar.svelte b/frontend/src/tools/proof/ProofToolbar.svelteindex 8e0b210..62723a2 100644--- a/frontend/src/tools/proof/ProofToolbar.svelte+++ b/frontend/src/tools/proof/ProofToolbar.svelte@@ -22,6 +22,91 @@panelCount,applyMagic,} = $props();++ // Colour + size only matter while drawing or when a shape is selected. When+ // the analyst is just panning with Select, they stay hidden so the column+ // packs short enough to fit small screens without spilling controls off the+ // bottom.+ const showContextTools = $derived(tool !== 'select' || !!selectedShape);+ const sizeValue = $derived(+ selectedShape?.kind === 'text'+ ? (selectedShape.fontSize ?? 28)+ : (selectedShape?.strokeWidth ?? strokeW),+ );++ // Flyouts: one open at a time. Content stays in the DOM (hidden via CSS) so+ // it renders on the server and can be tested; opening just reveals it.+ let colorOpen = $state(false);+ let sizeOpen = $state(false);+ let overflowOpen = $state(false);+ // Wrapper refs feed outside-click detection; button refs anchor the flyout.+ let colorEl = $state();+ let sizeEl = $state();+ let overflowEl = $state();+ let colorBtn = $state();+ let sizeBtn = $state();+ let overflowBtn = $state();+ let colorPos = $state({});+ let sizePos = $state({});+ let overflowPos = $state({});++ function toggle(which) {+ colorOpen = which === 'color' ? !colorOpen : false;+ sizeOpen = which === 'size' ? !sizeOpen : false;+ overflowOpen = which === 'overflow' ? !overflowOpen : false;+ }++ // The colour/size buttons vanish when the analyst switches to Select with+ // nothing selected; drop their flyouts so they never reappear stale.+ $effect(() => {+ if (!showContextTools) {+ colorOpen = false;+ sizeOpen = false;+ }+ });++ // Flyouts are position:fixed so the toolbar can scroll (overflow-y) without+ // clipping them. Anchor to the right of the trigger; grow upward when the+ // trigger sits in the lower half of the viewport so the panel stays on-screen.+ function anchor(btn) {+ const r = btn.getBoundingClientRect();+ const left = r.right + 6;+ if (r.top > window.innerHeight / 2) {+ return { left: `${left}px`, bottom: `${window.innerHeight - r.bottom}px` };+ }+ return { left: `${left}px`, top: `${r.top}px` };+ }++ $effect(() => {+ if (colorOpen && colorBtn) colorPos = anchor(colorBtn);+ });+ $effect(() => {+ if (sizeOpen && sizeBtn) sizePos = anchor(sizeBtn);+ });+ $effect(() => {+ if (overflowOpen && overflowBtn) overflowPos = anchor(overflowBtn);+ });++ // Close on outside click (mousedown capture, like Satellite.svelte) or Escape.+ $effect(() => {+ if (!colorOpen && !sizeOpen && !overflowOpen) return;+ const onDown = (e) => {+ if (colorOpen && colorEl && !colorEl.contains(e.target)) colorOpen = false;+ if (sizeOpen && sizeEl && !sizeEl.contains(e.target)) sizeOpen = false;+ if (overflowOpen && overflowEl && !overflowEl.contains(e.target)) overflowOpen = false;+ };+ const onKey = (e) => {+ if (e.key === 'Escape') {+ colorOpen = sizeOpen = overflowOpen = false;+ }+ };+ document.addEventListener('mousedown', onDown, true);+ document.addEventListener('keydown', onKey);+ return () => {+ document.removeEventListener('mousedown', onDown, true);+ document.removeEventListener('keydown', onKey);+ };+ });</script><div class="toolbar">@@ -43,85 +128,155 @@</button>{/each}<div class="tb-sep"></div>- {#each palette as entry (entry)}- <button- class="color-btn"- class:active={activeColor === entry}- style:background={entry}- title="Same color = same feature"- onclick={() => setColor(entry)}- aria-label={`color ${entry}`}- ></button>- {/each}- <label- class="color-btn color-pick"- class:active={!palette.includes(activeColor)}- style:background={activeColor}- title="Custom color"- >- <Icon name="plus" size={12} />- <input- type="color"- value={activeColor}- oninput={(event) => setColor(event.target.value)}- aria-label="custom color"- />- </label>- <div class="tb-sep"></div>- <input- class="stroke-slider"- type="range"- min={selectedShape?.kind === 'text' ? 8 : 1}- max={selectedShape?.kind === 'text' ? 120 : 24}- step="1"- value={selectedShape?.kind === 'text'- ? (selectedShape.fontSize ?? 28)- : (selectedShape?.strokeWidth ?? strokeW)}- oninput={(event) => setStroke(+event.target.value)}- title={selectedShape?.kind === 'text'- ? 'Font size'- : selectedShape- ? 'Stroke width (selected)'- : 'Stroke width'}- />- <div class="tb-sep"></div><button class="tb-btn" title="Fit view (f)" onclick={fit}><Icon name="eye" size={18} /></button>++ {#if showContextTools}+ <div class="tb-sep"></div>++ <!-- Colour: a swatch that opens the palette + custom picker. -->+ <div class="tb-group" bind:this={colorEl}>+ <button+ class="tb-btn"+ class:active={colorOpen}+ title="Annotation colour"+ onclick={() => toggle('color')}+ bind:this={colorBtn}+ >+ <span class="tb-swatch" style:background={activeColor}></span>+ </button>+ <div+ class="flyout flyout-colors"+ class:open={colorOpen}+ style:left={colorPos.left}+ style:top={colorPos.top}+ style:bottom={colorPos.bottom}+ >+ {#each palette as entry (entry)}+ <button+ class="color-btn"+ class:active={activeColor === entry}+ style:background={entry}+ title="Same color = same feature"+ onclick={() => { setColor(entry); colorOpen = false; }}+ aria-label={`color ${entry}`}+ ></button>+ {/each}+ <label+ class="color-btn color-pick"+ class:active={!palette.includes(activeColor)}+ style:background={activeColor}+ title="Custom color"+ >+ <Icon name="plus" size={12} />+ <input+ type="color"+ value={activeColor}+ oninput={(event) => setColor(event.target.value)}+ aria-label="custom color"+ />+ </label>+ </div>+ </div>++ <!-- Size: a horizontal slider for stroke width / font size. -->+ <div class="tb-group" bind:this={sizeEl}>+ <button+ class="tb-btn tb-size"+ class:active={sizeOpen}+ title={selectedShape?.kind === 'text' ? 'Font size' : 'Stroke width'}+ onclick={() => toggle('size')}+ bind:this={sizeBtn}+ >+ <Icon name="sliders" size={18} />+ <span class="tb-size-val">{sizeValue}</span>+ </button>+ <div+ class="flyout flyout-size"+ class:open={sizeOpen}+ style:left={sizePos.left}+ style:top={sizePos.top}+ style:bottom={sizePos.bottom}+ >+ <input+ class="stroke-slider"+ type="range"+ min={selectedShape?.kind === 'text' ? 8 : 1}+ max={selectedShape?.kind === 'text' ? 120 : 24}+ step="1"+ value={selectedShape?.kind === 'text'+ ? (selectedShape.fontSize ?? 28)+ : (selectedShape?.strokeWidth ?? strokeW)}+ oninput={(event) => setStroke(+event.target.value)}+ title={selectedShape?.kind === 'text'+ ? 'Font size'+ : selectedShape+ ? 'Stroke width (selected)'+ : 'Stroke width'}+ />+ </div>+ </div>+ {/if}+<div class="tb-sep"></div>- <button- class="tb-btn"- class:active={layout !== 'free'}- title="Grid layout: panels flow in rows"- onclick={() => setLayoutMode('grid')}- >- <Icon name="grid" size={18} />- </button>- <button- class="tb-btn"- class:active={layout === 'free'}- title="Free layout: drag panels anywhere"- onclick={() => setLayoutMode('free')}- >- <Icon name="layers" size={18} />- </button>- <div class="tb-sep"></div>- {#each Object.keys(tweetGuides) as entry (entry)}++ <!-- Layout, tweet crops and repack live in one overflow flyout. -->+ <div class="tb-group" bind:this={overflowEl}><button- class="tb-btn tb-guide"- class:active={guide === entry}- title={`Preview the ${entry} tweet crop. Everything outside is cut off`}- onclick={() => (guide = guide === entry ? null : entry)}- >{entry}</button>- {/each}- <button- class="tb-btn tb-magic"- title={`Repack panels toward ${guide ?? '16:9'} and reset panel sizes`}- disabled={!panelCount}- onclick={applyMagic}- >- <Icon name="wand" size={18} />- </button>+ class="tb-btn"+ class:active={overflowOpen || layout === 'free' || !!guide}+ title="Layout, tweet crops & repack"+ onclick={() => toggle('overflow')}+ bind:this={overflowBtn}+ >+ <Icon name="grid" size={18} />+ </button>+ <div+ class="flyout flyout-overflow"+ class:open={overflowOpen}+ style:left={overflowPos.left}+ style:top={overflowPos.top}+ style:bottom={overflowPos.bottom}+ >+ <div class="flyout-row">+ <button+ class="tb-btn"+ class:active={layout !== 'free'}+ title="Grid layout: panels flow in rows"+ onclick={() => setLayoutMode('grid')}+ >+ <Icon name="grid" size={18} />+ </button>+ <button+ class="tb-btn"+ class:active={layout === 'free'}+ title="Free layout: drag panels anywhere"+ onclick={() => setLayoutMode('free')}+ >+ <Icon name="layers" size={18} />+ </button>+ </div>+ <div class="flyout-row">+ {#each Object.keys(tweetGuides) as entry (entry)}+ <button+ class="tb-btn tb-guide"+ class:active={guide === entry}+ title={`Preview the ${entry} tweet crop. Everything outside is cut off`}+ onclick={() => (guide = guide === entry ? null : entry)}+ >{entry}</button>+ {/each}+ <button+ class="tb-btn tb-magic"+ title={`Repack panels toward ${guide ?? '16:9'} and reset panel sizes`}+ disabled={!panelCount}+ onclick={applyMagic}+ >+ <Icon name="wand" size={18} />+ </button>+ </div>+ </div>+ </div></div><style>@@ -135,6 +290,8 @@padding: 12px 0;border-right: 1px solid var(--border);background: var(--bg-1);+ overflow-y: auto;+ overflow-x: hidden;}.tb-btn {width: 38px;@@ -144,6 +301,7 @@justify-content: center;border-radius: var(--r-sm);color: var(--text-3);+ flex-shrink: 0;}.tb-btn:hover { color: var(--text-1); background: var(--bg-2); }.tb-btn.active { color: var(--text-1); background: var(--bg-3); }@@ -156,7 +314,48 @@height: 1px;background: var(--border);margin: 4px 0;+ flex-shrink: 0;}+ .tb-size { position: relative; }+ .tb-size-val {+ position: absolute;+ right: 2px;+ bottom: 1px;+ font-size: 9px;+ font-weight: 700;+ line-height: 1;+ color: var(--text-3);+ }+ .tb-swatch {+ width: 20px;+ height: 20px;+ border-radius: 50%;+ box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);+ }++ .tb-group { display: contents; }++ .flyout {+ position: fixed;+ z-index: 60;+ display: none;+ padding: 8px;+ border: 1px solid var(--border);+ border-radius: var(--r-md);+ background: var(--bg-1);+ box-shadow: var(--shadow-2, 0 6px 24px rgba(0, 0, 0, 0.3));+ }+ .flyout.open { display: flex; }+ .flyout-colors {+ flex-wrap: wrap;+ gap: 8px;+ width: 132px;+ align-items: center;+ }+ .flyout-size { align-items: center; }+ .flyout-overflow { flex-direction: column; gap: 6px; }+ .flyout-row { display: flex; gap: 6px; }+.color-btn {width: 22px;height: 22px;@@ -186,9 +385,7 @@cursor: pointer;}.stroke-slider {- width: 80px;- transform: rotate(-90deg);- margin: 34px 0;+ width: 140px;accent-color: var(--accent);}.tb-btn:disabled { opacity: 0.35; cursor: default; }diff --git a/frontend/src/tools/proof/ProofToolbar.test.js b/frontend/src/tools/proof/ProofToolbar.test.jsnew file mode 100644index 0000000..a577645--- /dev/null+++ b/frontend/src/tools/proof/ProofToolbar.test.js@@ -0,0 +1,94 @@+import { describe, expect, it, vi } from 'vitest';+import { render } from 'svelte/server';+import ProofToolbar from './ProofToolbar.svelte';++const DRAW_TOOLS = [+ { id: 'select', icon: 'hand', label: 'Select / move', shortcut: 'v' },+ { id: 'rect', icon: 'square', label: 'Box', shortcut: 'r' },+ { id: 'text', icon: 'text', label: 'Text', shortcut: 't' },+];++function props(overrides = {}) {+ return {+ canUndo: true,+ canRedo: true,+ undo: vi.fn(),+ redo: vi.fn(),+ drawTools: DRAW_TOOLS,+ tool: 'rect',+ palette: ['#ff5252', '#40c4ff'],+ activeColor: '#ff5252',+ selectedShape: null,+ strokeW: 4,+ setColor: vi.fn(),+ setStroke: vi.fn(),+ fit: vi.fn(),+ layout: 'grid',+ setLayoutMode: vi.fn(),+ guide: null,+ tweetGuides: { '16:9': 16 / 9, '4:5': 4 / 5 },+ panelCount: 2,+ applyMagic: vi.fn(),+ ...overrides,+ };+}++describe('ProofToolbar core (always visible)', () => {+ it('shows history, every draw tool and fit regardless of active tool', () => {+ const { body } = render(ProofToolbar, { props: props({ tool: 'select' }) });+ expect(body).toContain('Undo (Ctrl+Z)');+ expect(body).toContain('Redo');+ expect(body).toContain('Box (r)');+ expect(body).toContain('Text (t)');+ expect(body).toContain('Fit view (f)');+ });+});++describe('ProofToolbar context controls (colour + size)', () => {+ it('hides the colour palette and size slider when idle (Select, nothing selected)', () => {+ const { body } = render(ProofToolbar, {+ props: props({ tool: 'select', selectedShape: null }),+ });+ expect(body).not.toContain('aria-label="color #ff5252"');+ expect(body).not.toContain('stroke-slider');+ });++ it('shows the colour palette and size slider while a draw tool is active', () => {+ const { body } = render(ProofToolbar, { props: props({ tool: 'rect' }) });+ expect(body).toContain('aria-label="color #ff5252"');+ expect(body).toContain('aria-label="color #40c4ff"');+ expect(body).toContain('custom color');+ expect(body).toContain('stroke-slider');+ });++ it('shows the colour palette and size slider when a shape is selected under Select', () => {+ const { body } = render(ProofToolbar, {+ props: props({ tool: 'select', selectedShape: { kind: 'rect', strokeWidth: 3 } }),+ });+ expect(body).toContain('aria-label="color #ff5252"');+ expect(body).toContain('stroke-slider');+ });++ it('ranges the size slider for font size when a text shape is selected', () => {+ const { body } = render(ProofToolbar, {+ props: props({ tool: 'select', selectedShape: { kind: 'text', fontSize: 40 } }),+ });+ expect(body).toMatch(/class="stroke-slider[^"]*"[\s\S]*?max="120"/);+ });+});++describe('ProofToolbar document controls (overflow flyout)', () => {+ it('carries layout modes, tweet guides and the magic repack action', () => {+ const { body } = render(ProofToolbar, { props: props() });+ expect(body).toContain('Grid layout: panels flow in rows');+ expect(body).toContain('Free layout: drag panels anywhere');+ expect(body).toContain('>16:9<');+ expect(body).toContain('>4:5<');+ expect(body).toContain('Repack panels');+ });++ it('disables the magic repack when there are no panels', () => {+ const { body } = render(ProofToolbar, { props: props({ panelCount: 0 }) });+ expect(body).toMatch(/title="Repack panels[^"]*"[^>]*disabled/);+ });+});diff --git a/packaging/azimut.spec b/packaging/azimut.specindex 97b1941..92206a8 100644--- a/packaging/azimut.spec+++ b/packaging/azimut.spec@@ -9,6 +9,7 @@# are collected explicitly because they are loaded dynamically and PyInstaller# can't see them.+import sysfrom pathlib import Pathfrom PyInstaller.utils.hooks import collect_data_files, collect_submodules@@ -20,6 +21,18 @@ hiddenimports = (+ collect_submodules("gallery_dl"))+# Linux only: yt-dlp reaches for these lazily to unseal a Chromium-family+# browser's cookies from the Secret Service keyring (gated downloads, see+# engine/media.py + pyproject.toml). They aren't submodules of anything above,+# so PyInstaller can't discover them on its own. macOS uses the `security` CLI+# and Windows uses the cookies.txt fallback, so neither bundles these.+if sys.platform == "linux":+ hiddenimports += (+ collect_submodules("secretstorage")+ + collect_submodules("jeepney")+ + ["cryptography"]+ )+# Grabs azimut/static/** (index.html, assets, favicon) from the installed package.datas = collect_data_files("azimut")@@ -52,8 +65,6 @@ pyz = PYZ(a.pure)# The .exe icon. Windows is the only shipped artifact that embeds one: Linux# binaries can't, and our macOS artifact is a raw binary (not an .app bundle),# so Finder shows no custom icon there either. PyInstaller wants a .ico.-import sys-ico = Path(SPECPATH) / "azimut.ico"icon = str(ico) if sys.platform == "win32" and ico.is_file() else Nonediff --git a/pyproject.toml b/pyproject.tomlindex a54588e..c5218c0 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "hatchling.build"[project]name = "azimut"-version = "0.2.1"+version = "0.2.2"description = "A local OSINT workspace for media, geolocation proofs and case management."readme = "README.md"requires-python = ">=3.11"@@ -42,6 +42,14 @@ dependencies = [# frozen into the binary (engine/scrapers.py)."yt-dlp>=2024.4.9","gallery-dl>=1.27",+ # Linux only: lets yt-dlp read a Chromium-family browser's cookies for gated+ # downloads (engine/media.py) — the cookie values are sealed with the Secret+ # Service keyring there, and this is the client that unseals them. macOS uses+ # the `security` CLI (no dep) and Windows is routed to the cookies.txt+ # fallback, so neither needs it. Pulls in cryptography + jeepney (Linux+ # wheels, no compiler). Without it, Firefox and the cookies.txt fallback+ # still work everywhere; only Chromium-on-Linux would go dark.+ "secretstorage>=3.3,<4; sys_platform == 'linux'",][project.optional-dependencies]diff --git a/src/azimut/api/media.py b/src/azimut/api/media.pyindex 040182b..33afecb 100644--- a/src/azimut/api/media.py+++ b/src/azimut/api/media.py@@ -7,7 +7,7 @@ from typing import Anyfrom fastapi import APIRouter, HTTPException, UploadFilefrom pydantic import BaseModel, HttpUrl-from .. import jobs+from .. import config, jobsfrom ..engine import media as media_enginefrom ..engine import thumbnails as thumbnail_enginefrom ..workspace import Case, CaseError@@ -20,6 +20,9 @@ class DownloadIn(BaseModel):url: HttpUrlindex: int | None = Nonetitle: str | None = None+ # opt-in per call: only a retry after a login wall sets this, so the first+ # (default) attempt stays cookie-less and public media never uses the session+ use_cookies: bool = Falseclass DeleteIn(BaseModel):@@ -102,6 +105,11 @@ def download(case_id: str, body: DownloadIn) -> dict[str, str]:case = get_case(case_id)url = str(body.url)index, title = body.index, body.title+ cookies = (+ media_engine.cookies_from_preference(config.load_settings().get("download_cookies"))+ if body.use_cookies+ else None+ )def work(set_progress):def hook(d):@@ -117,7 +125,9 @@ def download(case_id: str, body: DownloadIn) -> dict[str, str]:elif d.get("status") == "finished":set_progress({"percent": 100, "stage": "processing"})- return media_engine.download_url(case, url, progress_hook=hook, index=index, title=title)+ return media_engine.download_url(+ case, url, progress_hook=hook, index=index, title=title, cookies=cookies+ )job_id = jobs.start("download", work)return {"job_id": job_id}diff --git a/src/azimut/api/settings.py b/src/azimut/api/settings.pyindex 0e1faf9..441f65f 100644--- a/src/azimut/api/settings.py+++ b/src/azimut/api/settings.py@@ -55,6 +55,15 @@ class HomeView(BaseModel):zoom: int = Field(ge=1, le=21)+class DownloadCookiesIn(BaseModel):+ """The login source for gated downloads the user picks in Settings. The+ ``file`` source is set by the cookies-file upload, not here — through this+ field the user only chooses a browser or turns cookies off."""++ source: Literal["none", "browser"]+ browser: str | None = None # required and validated when source == "browser"++class PrefsIn(BaseModel):"""Keyed-provider and display preferences — None leaves a field untouched."""@@ -82,6 +91,8 @@ class PrefsIn(BaseModel):# the user muted with "don't show again"update_check_on_start: bool | None = Noneupdate_dismissed_version: str | None = None+ # login source for gated media downloads (engine/media.py); None leaves it+ download_cookies: DownloadCookiesIn | None = Nonedef _prefs(settings: dict[str, Any]) -> dict[str, Any]:@@ -102,6 +113,7 @@ def _prefs(settings: dict[str, Any]) -> dict[str, Any]:"signature_handle": settings.get("signature_handle", DEFAULT_SIGNATURE_HANDLE),"update_check_on_start": bool(settings.get("update_check_on_start", True)),"update_dismissed_version": settings.get("update_dismissed_version", ""),+ "download_cookies": settings.get("download_cookies", {"source": "none"}),}@@ -121,6 +133,9 @@ def get_settings() -> dict[str, Any]:# whether a logo is on disk — the proof composer's signature control is# dead until one is, so it needs to know without fetching the pixels"signature": config.signature_path().is_file(),+ # whether an exported cookies.txt is on disk — Settings shows the file+ # fallback as present without ever serving the session back out+ "cookies_file": config.cookies_file_path().is_file(),**_prefs(settings),# what the soft block actually measures against: the documented default# per meter, or the user's own figure where they corrected it@@ -157,7 +172,14 @@ def put_prefs(body: PrefsIn) -> dict[str, Any]:raise HTTPException(status_code=422, detail=f"unknown units '{body.units}'")if body.post_target is not None and body.post_target not in config.POST_TARGETS:raise HTTPException(status_code=422, detail=f"unknown post_target '{body.post_target}'")+ if body.download_cookies is not None and body.download_cookies.source == "browser":+ browser = body.download_cookies.browser+ if browser not in config.COOKIE_BROWSERS:+ raise HTTPException(status_code=422, detail=f"unknown browser '{browser}'")settings = config.update_settings(lambda s: _apply_prefs(s, body))+ # a login session on disk is a liability once it isn't the chosen source+ if body.download_cookies is not None:+ config.cookies_file_path().unlink(missing_ok=True)return _prefs(settings)@@ -212,6 +234,13 @@ def _apply_prefs(settings: dict[str, Any], body: PrefsIn) -> None:settings["update_check_on_start"] = bool(body.update_check_on_start)if body.update_dismissed_version is not None:settings["update_dismissed_version"] = body.update_dismissed_version.strip()[:64]+ if body.download_cookies is not None:+ dc = body.download_cookies+ settings["download_cookies"] = (+ {"source": "browser", "browser": dc.browser}+ if dc.source == "browser"+ else {"source": "none"}+ )@router.put("/settings/keys")@@ -516,6 +545,45 @@ def delete_signature() -> dict[str, Any]:return {"signature": False}+# ---- cookies.txt: the fallback login source where reading the browser can't --++# A Netscape cookies.txt is a few KB; this bounds an untrusted upload, it isn't+# a real limit. The browser path needs no file at all.+COOKIES_FILE_MAX_BYTES = 1 * 1024 * 1024++[email protected]("/settings/cookies-file")+async def put_cookies_file(file: UploadFile) -> dict[str, Any]:+ """Store an exported cookies.txt and select it as the download login source.++ The bytes are a live session, so the file is written 0600 beside+ settings.json and never served back out.+ """+ data = await file.read(COOKIES_FILE_MAX_BYTES + 1)+ if len(data) > COOKIES_FILE_MAX_BYTES:+ raise HTTPException(+ status_code=413,+ detail=f"cookies file must be under {COOKIES_FILE_MAX_BYTES // 1024 // 1024} MB",+ )+ path = config.cookies_file_path()+ path.parent.mkdir(parents=True, exist_ok=True)+ path.write_bytes(data)+ config._restrict(path, 0o600)+ settings = config.update_settings(+ lambda s: s.__setitem__("download_cookies", {"source": "file", "file": path.name})+ )+ return _prefs(settings)++[email protected]("/settings/cookies-file")+def delete_cookies_file() -> dict[str, Any]:+ config.cookies_file_path().unlink(missing_ok=True)+ settings = config.update_settings(+ lambda s: s.__setitem__("download_cookies", {"source": "none"})+ )+ return _prefs(settings)++# ---- scrapers: the two dependencies that rot on someone else's schedule -------diff --git a/src/azimut/config.py b/src/azimut/config.pyindex 8b00f7d..da90d1b 100644--- a/src/azimut/config.py+++ b/src/azimut/config.py@@ -110,6 +110,15 @@ DEFAULT_SETTINGS: dict[str, Any] = {# for. The pop-up stays quiet for that exact tag; a newer one shows again."update_check_on_start": True,"update_dismissed_version": "",+ # Login session for gated media downloads (engine/media.py). Applied only+ # when a download hits a login wall — public media is always fetched+ # cookie-less, so this never touches the everyday case. Shapes:+ # - {"source": "none"} — off (default)+ # - {"source": "browser", "browser": name} — read the browser's live cookies+ # (yt-dlp's names: firefox, chrome, chromium, edge, brave, opera, safari, …)+ # - {"source": "file", "file": "cookies.txt"} — a workspace-relative export,+ # the fallback where reading the browser can't work (Chromium on Windows).+ "download_cookies": {"source": "none"},}# Accepted values for the display preferences above — mirror of@@ -189,6 +198,20 @@ def templates_path() -> Path:return workspace_root() / "templates.json"+# Browsers yt-dlp can read a login session from (cookiesfrombrowser). The+# Settings API validates a chosen source against this; engine/media.py handles+# the Chromium subset that can't be read on Windows.+COOKIE_BROWSERS = frozenset(+ {"brave", "chrome", "chromium", "edge", "firefox", "opera", "safari", "vivaldi", "whale"}+)+++def cookies_file_path() -> Path:+ """A user-exported cookies.txt for gated downloads. Holds a live login+ session, so it stays 0600 beside settings.json, never inside a case."""+ return workspace_root() / "cookies.txt"++# Refuse anything larger as a signature: a logo is a small badge on a composite,# and the file is read into memory to be validated and served.SIGNATURE_MAX_BYTES = 2 * 1024 * 1024diff --git a/src/azimut/engine/media.py b/src/azimut/engine/media.pyindex 08e2677..591f3d1 100644--- a/src/azimut/engine/media.py+++ b/src/azimut/engine/media.py@@ -12,6 +12,7 @@ import jsonimport mimetypesimport reimport shutil+import sysimport uuidfrom datetime import datetime, timezonefrom pathlib import Path@@ -19,6 +20,7 @@ from typing import Any, BinaryIOfrom PIL import Image+from .. import configfrom ..workspace import Case, ensure_dirfrom . import ffmpeg as ffmpeg_enginefrom . import links as link_engine@@ -34,6 +36,92 @@ SIDECAR_SUFFIX = ".azimut.json"# item, same as the old noplaylist behavior — no picker with hundreds of rowsMAX_PICKER_ITEMS = 20+# Chromium-family browsers whose cookie store is OS-encrypted and locked while+# the browser runs. On Windows they're also app-bound-encrypted (Chrome 127+),+# so yt-dlp can't read them even when closed — we route those to the cookies.txt+# how-to instead of attempting the read.+_CHROMIUM_BROWSERS = {"chrome", "chromium", "edge", "brave", "vivaldi", "opera", "whale"}++# Substrings that mark a download failure as "you need to be logged in", as+# opposed to a dead link or a network hiccup. Best-effort: a miss just means the+# cookie prompt doesn't appear (no worse than before the feature existed).+_AUTH_FAILURE_PHRASES = (+ "log in",+ "login",+ "sign in",+ "signin",+ "private",+ "authenticat",+ "age-restrict",+ "age restrict",+ "confirm your age",+ "members-only",+ "members only",+ "requires cookies",+ "cookies-from-browser",+ "http error 403",+ "forbidden",+ "nsfw",+ "account",+)+++def _looks_like_auth_failure(message: str) -> bool:+ low = message.lower()+ return any(phrase in low for phrase in _AUTH_FAILURE_PHRASES)+++def _is_gallery_auth_error(exc: BaseException) -> bool:+ """gallery-dl raises typed ``AuthenticationError`` / ``AuthorizationError``+ from ``gallery_dl.exception`` when a link needs a login."""+ return type(exc).__name__ in {"AuthenticationError", "AuthorizationError"}+++def _resolve_cookie_file(file: str) -> Path:+ """A stored cookies.txt is referenced by a workspace-relative path; an+ externally supplied one may be absolute."""+ path = Path(file)+ return path if path.is_absolute() else config.workspace_root() / path+++def _cookie_ydl_opts(cookies: dict[str, Any] | None) -> dict[str, Any]:+ """Translate a cookie source into yt-dlp options. Empty when no source —+ the first attempt is always cookie-less (local-first)."""+ if not cookies:+ return {}+ if cookies.get("browser"):+ return {"cookiesfrombrowser": (cookies["browser"],)}+ if cookies.get("file"):+ return {"cookiefile": str(_resolve_cookie_file(cookies["file"]))}+ return {}+++def cookies_from_preference(pref: dict[str, Any] | None) -> dict[str, Any] | None:+ """Map the stored ``download_cookies`` setting to a ``download_url`` cookie+ argument. ``None`` for the off state (and any incomplete record), so a+ half-configured source never gets half-applied."""+ if not pref:+ return None+ source = pref.get("source")+ if source == "browser" and pref.get("browser"):+ return {"browser": pref["browser"]}+ if source == "file" and pref.get("file"):+ return {"file": pref["file"]}+ return None+++def _apply_gallery_cookies(cookies: dict[str, Any] | None) -> None:+ """Thread a cookie source into gallery-dl via its global config: a browser+ as a ``[name]`` list, a file as a path string."""+ if not cookies:+ return+ import gallery_dl.config as gdl_config++ if cookies.get("browser"):+ gdl_config.set(("extractor",), "cookies", [cookies["browser"]])+ elif cookies.get("file"):+ gdl_config.set(("extractor",), "cookies", str(_resolve_cookie_file(cookies["file"])))+def _now() -> str:return datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")@@ -328,7 +416,12 @@ def _register_gallery_dl_item(def _download_via_gallery_dl(- case: Case, url: str, *, index: int | None = None, title: str | None = None+ case: Case,+ url: str,+ *,+ index: int | None = None,+ title: str | None = None,+ cookies: dict[str, Any] | None = None,) -> dict[str, Any]:"""Fallback for links yt-dlp can't extract at all.@@ -339,6 +432,7 @@ def _download_via_gallery_dl("""import gallery_dl.extractor as gdl_extractor+ _apply_gallery_cookies(cookies)extractor = gdl_extractor.find(url)if extractor is None:raise RuntimeError(f"no extractor (yt-dlp or gallery-dl) recognizes this link: {url}")@@ -413,8 +507,38 @@ def _register_telegram_photo()+def _fallback_or_needs_auth(+ case: Case,+ url: str,+ *,+ index: int | None,+ title: str | None,+ cookies: dict[str, Any] | None,+ yt_auth: bool,+) -> dict[str, Any]:+ """yt-dlp found nothing — try gallery-dl, but turn a login wall into a+ ``needs_auth`` signal instead of an error, so the UI can offer cookies.++ Only on a cookie-less attempt (``cookies is None``): a wall hit *with*+ cookies already supplied is a real failure (bad/expired session), surfaced+ as the underlying error rather than an endless re-prompt.+ """+ try:+ return _download_via_gallery_dl(case, url, index=index, title=title, cookies=cookies)+ except Exception as exc:+ if cookies is None and (yt_auth or _is_gallery_auth_error(exc)):+ return {"needs_auth": True, "platform": sys.platform}+ raise++def download_url(- case: Case, url: str, progress_hook=None, *, index: int | None = None, title: str | None = None+ case: Case,+ url: str,+ progress_hook=None,+ *,+ index: int | None = None,+ title: str | None = None,+ cookies: dict[str, Any] | None = None,) -> dict[str, Any]:"""Resolve and download a URL via yt-dlp. Blocking — run in a worker.@@ -428,9 +552,19 @@ def download_url(Falls back to gallery-dl (see ``_download_via_gallery_dl``) for linksyt-dlp can't extract at all — most commonly image-only posts.++ ``cookies`` is a login session for gated media (``{"browser": name}`` or+ ``{"file": path}``); ``None`` (the default) downloads cookie-less, so public+ media never touches the session. A gated link tried cookie-less comes back+ as ``{"needs_auth": True, ...}`` for the caller to retry with a source. A+ Chromium pick on Windows can't be read (locked/app-bound store), so it+ returns ``{"needs_auth": True, "guidance": "windows-chromium"}`` untried."""import yt_dlp+ if cookies and cookies.get("browser") in _CHROMIUM_BROWSERS and sys.platform == "win32":+ return {"needs_auth": True, "guidance": "windows-chromium"}+media_dir = case.subdir("media")# a unique subdir per call — concurrent downloads (the multi-item picker# fires one per selected item) must not share a scratch dir, or the first@@ -465,19 +599,24 @@ def download_url(ydl_opts["format"] = "best[acodec!=none][vcodec!=none]/best"if progress_hook:ydl_opts["progress_hooks"] = [progress_hook]+ ydl_opts.update(_cookie_ydl_opts(cookies))with yt_dlp.YoutubeDL(ydl_opts) as ydl:+ yt_auth = Falsetry:info = ydl.extract_info(url, download=False)entries = [e for e in (info.get("entries") or []) if e]- except yt_dlp.utils.DownloadError:+ except yt_dlp.utils.DownloadError as exc:+ yt_auth = _looks_like_auth_failure(str(exc))info = Noneentries = []if narrowed:if info is None and not entries:shutil.rmtree(tmp_dir, ignore_errors=True)- return _download_via_gallery_dl(case, url, index=index, title=title)+ return _fallback_or_needs_auth(+ case, url, index=index, title=title, cookies=cookies, yt_auth=yt_auth+ )target_info = entries[0] if entries else infoelse:yt_count = len(entries) if entries else (1 if info is not None else 0)@@ -485,7 +624,9 @@ def download_url(if total == 0:shutil.rmtree(tmp_dir, ignore_errors=True)- return _download_via_gallery_dl(case, url, index=index, title=title)+ return _fallback_or_needs_auth(+ case, url, index=index, title=title, cookies=cookies, yt_auth=yt_auth+ )if index is None and 1 < total <= MAX_PICKER_ITEMS:# several attachments and the caller hasn't picked one yet —diff --git a/tests/test_config.py b/tests/test_config.pyindex d379889..5637110 100644--- a/tests/test_config.py+++ b/tests/test_config.py@@ -47,6 +47,22 @@ def test_load_settings_back_compat_missing_usage_key(monkeypatch, tmp_path):assert loaded["api_keys"] == {"google": "AIza.test"}+def test_default_download_cookies_is_off():+ assert config.DEFAULT_SETTINGS["download_cookies"] == {"source": "none"}+++def test_load_settings_back_compat_missing_download_cookies(monkeypatch, tmp_path):+ """A settings.json predating gated downloads back-fills the default (off),+ so behavior is unchanged until the user opts in."""+ monkeypatch.setenv("AZIMUT_HOME", str(tmp_path))+ config.settings_path().parent.mkdir(parents=True, exist_ok=True)+ config.settings_path().write_text(+ json.dumps({"tile_providers": [], "api_keys": {}}), encoding="utf-8"+ )+ loaded = config.load_settings()+ assert loaded["download_cookies"] == {"source": "none"}++def test_load_settings_missing_file_returns_defaults(monkeypatch, tmp_path):monkeypatch.setenv("AZIMUT_HOME", str(tmp_path))loaded = config.load_settings()diff --git a/tests/test_media_api.py b/tests/test_media_api.pyindex e306b4c..6e5fc5d 100644--- a/tests/test_media_api.py+++ b/tests/test_media_api.py@@ -352,7 +352,7 @@ def test_download_route_surfaces_multi_via_job(client, monkeypatch):monkeypatch.setattr(media_engine,"download_url",- lambda case, url, progress_hook=None, index=None, title=None: {+ lambda case, url, progress_hook=None, index=None, title=None, cookies=None: {"multi": True,"items": media_engine._picker_items(entries),},@@ -414,10 +414,11 @@ def test_download_autofills_title_from_extraction(client, monkeypatch):assert result["item"]["title"] == "Strike footage"-def _install_failing_ydl(monkeypatch):+def _install_failing_ydl(monkeypatch, message="No video could be found in this tweet"):"""A fake yt_dlp module whose extract_info always raises DownloadError —used to exercise the gallery-dl fallback (yt-dlp's extractors are- video-first and hard-fail on e.g. a photo-only tweet)."""+ video-first and hard-fail on e.g. a photo-only tweet). ``message`` lets a+ test choose an auth-shaped vs. a generic failure."""import sysimport types@@ -435,7 +436,7 @@ def _install_failing_ydl(monkeypatch):return Falsedef extract_info(self, url, download=False):- raise DownloadError("No video could be found in this tweet")+ raise DownloadError(message)utils = types.ModuleType("yt_dlp.utils")utils.DownloadError = DownloadError@@ -739,3 +740,239 @@ def test_download_job_bad_url(client):time.sleep(0.1)assert job["status"] == "error"assert job["error"]+++# --- gated downloads: on-demand cookies (v2) ------------------------------+++def test_public_download_never_passes_cookies(client, monkeypatch):+ """Local-first: the first (default) attempt must carry no cookie options at+ all — public media is downloaded without ever touching the browser session,+ even once a cookie source has been saved."""+ from azimut.engine import media as media_engine+ from azimut.workspace import Case++ cid = client.post("/api/cases", json={"name": "NoCookies"}).json()["id"]+ case = Case.open(cid)++ def extract_info(ydl, url, download):+ assert "cookiesfrombrowser" not in ydl.opts+ assert "cookiefile" not in ydl.opts+ return {"id": "abc123", "title": "Public clip"}++ _install_fake_ydl(monkeypatch, extract_info)+ result = media_engine.download_url(case, "https://example.com/watch?v=abc123")+ assert result["item"]["title"] == "Public clip"+++def test_auth_wall_returns_needs_auth(client, monkeypatch):+ """A login-gated link (yt-dlp reports an auth-shaped error, gallery-dl has+ no extractor) must not just error — it returns a needs_auth signal carrying+ the platform so the UI can offer the cookie affordance."""+ import sys++ import gallery_dl.extractor as gdl_extractor++ from azimut.engine import media as media_engine+ from azimut.workspace import Case++ cid = client.post("/api/cases", json={"name": "Gated"}).json()["id"]+ case = Case.open(cid)++ _install_failing_ydl(monkeypatch, "ERROR: Private video. Sign in if you've been granted access")+ monkeypatch.setattr(gdl_extractor, "find", lambda url: None)++ result = media_engine.download_url(case, "https://youtube.com/watch?v=priv")+ assert result == {"needs_auth": True, "platform": sys.platform}+++def test_gallery_auth_error_returns_needs_auth(client, monkeypatch):+ """The image path can hit the wall too: gallery-dl raising its typed+ AuthenticationError must surface needs_auth, not crash the job."""+ import sys++ import gallery_dl.extractor as gdl_extractor++ from azimut.engine import media as media_engine+ from azimut.workspace import Case++ cid = client.post("/api/cases", json={"name": "GatedImg"}).json()["id"]+ case = Case.open(cid)++ class AuthenticationError(Exception):+ pass++ def boom(url):+ raise AuthenticationError("Login required")++ _install_failing_ydl(monkeypatch, "No video could be found")+ monkeypatch.setattr(gdl_extractor, "find", boom)++ result = media_engine.download_url(case, "https://instagram.com/p/priv")+ assert result == {"needs_auth": True, "platform": sys.platform}+++def test_non_auth_failure_does_not_prompt_cookies(client, monkeypatch):+ """A dead link (no auth signal anywhere) keeps today's behavior: a plain+ error, never a cookie prompt the user can do nothing useful with."""+ import gallery_dl.extractor as gdl_extractor++ from azimut.engine import media as media_engine+ from azimut.workspace import Case++ cid = client.post("/api/cases", json={"name": "Dead"}).json()["id"]+ case = Case.open(cid)++ _install_failing_ydl(monkeypatch, "ERROR: Unable to download webpage: HTTP Error 404")+ monkeypatch.setattr(gdl_extractor, "find", lambda url: None)++ try:+ media_engine.download_url(case, "https://example.com/nope")+ raise AssertionError("expected RuntimeError, not a needs_auth prompt")+ except RuntimeError as exc:+ assert "no extractor" in str(exc)+++def test_retry_with_browser_threads_cookiesfrombrowser(client, monkeypatch):+ """Retrying a gated link with a browser cookie source hands yt-dlp+ cookiesfrombrowser=(name,) so it downloads as the logged-in user."""+ from azimut.engine import media as media_engine+ from azimut.workspace import Case++ cid = client.post("/api/cases", json={"name": "CookieBrowser"}).json()["id"]+ case = Case.open(cid)++ def extract_info(ydl, url, download):+ assert ydl.opts["cookiesfrombrowser"] == ("firefox",)+ return {"id": "abc123", "title": "Gated clip"}++ _install_fake_ydl(monkeypatch, extract_info)+ result = media_engine.download_url(+ case, "https://youtube.com/watch?v=priv", cookies={"browser": "firefox"}+ )+ assert result["item"]["title"] == "Gated clip"+++def test_windows_chromium_returns_guidance(client, monkeypatch):+ """On Windows a Chromium cookie DB is locked/app-bound-encrypted, so we do+ not even attempt it: pick Chrome there and the backend returns a guidance+ signal instead of constructing yt-dlp."""+ import sys++ from azimut.engine import media as media_engine+ from azimut.workspace import Case++ cid = client.post("/api/cases", json={"name": "WinChrome"}).json()["id"]+ case = Case.open(cid)++ monkeypatch.setattr(sys, "platform", "win32")+ called = []+ _install_fake_ydl(monkeypatch, lambda ydl, url, download: called.append(1) or {"id": "x"})++ result = media_engine.download_url(+ case, "https://youtube.com/watch?v=priv", cookies={"browser": "chrome"}+ )+ assert result == {"needs_auth": True, "guidance": "windows-chromium"}+ assert called == [], "must not touch yt-dlp for a locked Windows Chromium store"+++def test_cookies_file_threads_absolute_cookiefile(client, monkeypatch):+ """A cookies.txt source hands yt-dlp an absolute cookiefile path (resolved+ against the workspace when relative)."""+ import os++ from azimut.engine import media as media_engine+ from azimut.workspace import Case++ cid = client.post("/api/cases", json={"name": "CookieFile"}).json()["id"]+ case = Case.open(cid)++ def extract_info(ydl, url, download):+ assert os.path.isabs(ydl.opts["cookiefile"])+ assert ydl.opts["cookiefile"].endswith("cookies.txt")+ return {"id": "abc123", "title": "Gated via file"}++ _install_fake_ydl(monkeypatch, extract_info)+ result = media_engine.download_url(+ case, "https://youtube.com/watch?v=priv", cookies={"file": "cookies.txt"}+ )+ assert result["item"]["title"] == "Gated via file"+++def test_apply_gallery_cookies_sets_browser_then_file(monkeypatch):+ """The gallery-dl path threads cookies through gallery_dl.config: a browser+ source as a [name] list, a file source as a path string."""+ import sys+ import types++ from azimut.engine import media as media_engine++ calls = []+ config_mod = types.ModuleType("gallery_dl.config")+ config_mod.set = lambda path, key, value: calls.append((path, key, value))+ gdl = types.ModuleType("gallery_dl")+ gdl.config = config_mod+ monkeypatch.setitem(sys.modules, "gallery_dl", gdl)+ monkeypatch.setitem(sys.modules, "gallery_dl.config", config_mod)++ media_engine._apply_gallery_cookies({"browser": "firefox"})+ assert calls[-1] == (("extractor",), "cookies", ["firefox"])++ media_engine._apply_gallery_cookies({"file": "cookies.txt"})+ path, key, value = calls[-1]+ assert (path, key) == (("extractor",), "cookies")+ assert value.endswith("cookies.txt")++ calls.clear()+ media_engine._apply_gallery_cookies(None)+ assert calls == [], "no cookies → no gallery-dl config mutation"+++def test_cookies_from_preference_maps_each_source():+ from azimut.engine import media as media_engine++ assert media_engine.cookies_from_preference(None) is None+ assert media_engine.cookies_from_preference({"source": "none"}) is None+ assert media_engine.cookies_from_preference({"source": "browser", "browser": "firefox"}) == {+ "browser": "firefox"+ }+ assert media_engine.cookies_from_preference({"source": "file", "file": "cookies.txt"}) == {+ "file": "cookies.txt"+ }+ # an incomplete record is treated as off, never a half-applied source+ assert media_engine.cookies_from_preference({"source": "browser"}) is None+++def test_download_use_cookies_threads_saved_preference(client, monkeypatch):+ """The download route stays cookie-less by default; only ``use_cookies``+ reads the saved preference and hands it to the engine — that's what keeps+ public media off the login session."""+ from azimut.engine import media as media_engine++ cid = client.post("/api/cases", json={"name": "UseCookies"}).json()["id"]+ client.put(+ "/api/settings/prefs",+ json={"download_cookies": {"source": "browser", "browser": "firefox"}},+ )++ seen = []++ def fake_download(case, url, progress_hook=None, *, index=None, title=None, cookies=None):+ seen.append(cookies)+ return {"multi": False, "duplicate": False, "item": {"path": "media/x"}, "entity": {}}++ monkeypatch.setattr(media_engine, "download_url", fake_download)++ for use_cookies, expected in ((False, None), (True, {"browser": "firefox"})):+ job_id = client.post(+ f"/api/cases/{cid}/media/download",+ json={"url": "https://x.test/1", "use_cookies": use_cookies},+ ).json()["job_id"]+ for _ in range(100):+ job = client.get(f"/api/jobs/{job_id}").json()+ if job["status"] != "running":+ break+ time.sleep(0.05)+ assert job["status"] == "done"++ assert seen == [None, {"browser": "firefox"}]diff --git a/tests/test_release_gate.py b/tests/test_release_gate.pyindex 8ace056..2197872 100644--- a/tests/test_release_gate.py+++ b/tests/test_release_gate.py@@ -163,6 +163,25 @@ def test_storage_and_jobs_add_no_new_runtime_dependency():assert banned not in text # no heavyweight queue/DB dependency slipped in+def test_chromium_cookie_decrypt_dependency_ships_on_linux():+ """yt-dlp needs secretstorage to read a Chromium-family browser's cookies on+ Linux (gated downloads). Nothing in src imports it directly — it's used at+ runtime through yt-dlp — so this guards it against an "unused dep" cleanup,+ and pins it Linux-only + bounded so it never touches the Windows/macOS+ binaries or drifts past an untested major."""+ deps = _pyproject()["project"]["dependencies"]+ secret = next((d for d in deps if d.startswith("secretstorage")), None)+ assert secret is not None, "secretstorage must stay declared for Chromium-on-Linux cookies"+ assert "sys_platform == 'linux'" in secret # never installed on Windows/macOS+ assert "<4" in secret # bounded at the next untested major, like every other range++ # the frozen Linux binary must bundle it: yt-dlp imports it lazily, so the+ # PyInstaller spec collects it explicitly (macOS/Windows skip this branch).+ spec = (Path(__file__).resolve().parent.parent / "packaging" / "azimut.spec").read_text()+ assert 'collect_submodules("secretstorage")' in spec+ assert 'sys.platform == "linux"' in spec++def test_case_db_lives_under_the_workspace_root(tmp_workspace):case = Case.create("Where")assert case.path.is_relative_to(workspace.config.workspace_root())diff --git a/tests/test_settings_api.py b/tests/test_settings_api.pyindex 5f5e1ff..2d97c29 100644--- a/tests/test_settings_api.py+++ b/tests/test_settings_api.py@@ -829,6 +829,83 @@ def test_signature_rejects_oversized(client):assert client.get("/api/settings").json()["signature"] is False+# ---- download cookies: the login session gated media needs -------------------+++def test_download_cookies_off_by_default(client):+ body = client.get("/api/settings").json()+ assert body["download_cookies"] == {"source": "none"}+ assert body["cookies_file"] is False+++def test_put_download_cookies_browser(client):+ saved = client.put(+ "/api/settings/prefs",+ json={"download_cookies": {"source": "browser", "browser": "firefox"}},+ ).json()+ assert saved["download_cookies"] == {"source": "browser", "browser": "firefox"}+ assert client.get("/api/settings").json()["download_cookies"] == {+ "source": "browser",+ "browser": "firefox",+ }+++def test_put_download_cookies_rejects_unknown_browser(client):+ body = client.put(+ "/api/settings/prefs",+ json={"download_cookies": {"source": "browser", "browser": "netscape"}},+ )+ assert body.status_code == 422+++def test_cookies_file_upload_sets_file_source_and_is_private(client):+ saved = client.post(+ "/api/settings/cookies-file",+ files={"file": ("cookies.txt", b"# Netscape HTTP Cookie File\n", "text/plain")},+ )+ assert saved.status_code == 200+ assert saved.json()["download_cookies"] == {"source": "file", "file": "cookies.txt"}++ body = client.get("/api/settings").json()+ assert body["cookies_file"] is True+ assert body["download_cookies"]["source"] == "file"++ path = config.cookies_file_path()+ assert path.is_file()+ import os+ import sys++ if sys.platform != "win32": # POSIX perms only+ assert oct(os.stat(path).st_mode & 0o777) == "0o600"+++def test_cookies_file_delete_reverts_to_off(client):+ client.post(+ "/api/settings/cookies-file",+ files={"file": ("cookies.txt", b"# cookies\n", "text/plain")},+ )+ assert client.delete("/api/settings/cookies-file").json()["download_cookies"] == {+ "source": "none"+ }+ assert client.get("/api/settings").json()["cookies_file"] is False+ assert not config.cookies_file_path().exists()+++def test_switching_to_browser_removes_stored_cookies_file(client):+ """A login session on disk is a liability once it isn't the chosen source —+ picking a browser (or turning cookies off) deletes the exported file."""+ client.post(+ "/api/settings/cookies-file",+ files={"file": ("cookies.txt", b"# cookies\n", "text/plain")},+ )+ client.put(+ "/api/settings/prefs",+ json={"download_cookies": {"source": "browser", "browser": "firefox"}},+ )+ assert not config.cookies_file_path().exists()+ assert client.get("/api/settings").json()["cookies_file"] is False++def test_signature_never_lands_in_a_case(client):"""It is workspace-level, like the API keys — a case folder never sees it."""client.post("/api/settings/signature", files={"file": ("logo.png", PNG, "image/png")})diff --git a/uv.lock b/uv.lockindex 83b1626..dd2bff5 100644--- a/uv.lock+++ b/uv.lock@@ -90,7 +90,7 @@ wheels = [[[package]]name = "azimut"-version = "0.2.1"+version = "0.2.2"source = { editable = "." }dependencies = [{ name = "fastapi" },@@ -103,6 +103,7 @@ dependencies = [{ name = "pydantic" },{ name = "python-multipart" },{ name = "requests" },+ { name = "secretstorage", marker = "sys_platform == 'linux'" },{ name = "uvicorn", extra = ["standard"] },{ name = "yt-dlp" },]@@ -141,6 +142,7 @@ requires-dist = [{ name = "python-multipart", specifier = ">=0.0.9,<1.0" },{ name = "requests", specifier = ">=2.31,<3" },{ name = "ruff", marker = "extra == 'dev'", specifier = ">=0.15,<0.16" },+ { name = "secretstorage", marker = "sys_platform == 'linux'", specifier = ">=3.3,<4" },{ name = "uvicorn", extras = ["standard"], specifier = ">=0.30,<1.0" },{ name = "yt-dlp", specifier = ">=2024.4.9" },]@@ -176,6 +178,69 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/ef/2f/c5464532e965badff2f4c4c1a3a83f5697f0d7c407ed0cda44aaa99bb451/certifi-2026.6.17-py3-none-any.whl", hash = "sha256:2227dcbaafe0d2f59279d1762ddddc37783ed4354594f194ffc31d20f41fc3db", size = 133289, upload-time = "2026-06-17T10:31:06.348Z" },]+[[package]]+name = "cffi"+version = "2.1.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "pycparser", marker = "implementation_name != 'PyPy'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/57/5f/ff100cae70ebe9d8df1c01a00e510e45d9adb5c1fdda84791b199141de97/cffi-2.1.0.tar.gz", hash = "sha256:efc1cdd798b1aaf39b4610bba7aad28c9bea9b910f25c784ccf9ec1fa719d1f9", size = 531036, upload-time = "2026-07-06T21:34:30.382Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/65/68/9f3ef890cf3c6ab97bd531c5677f67613d302165d16f8142b2811782a614/cffi-2.1.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:30b65779d598c370374fefabf138d456fd6f3216bfa7bedfab1ba82025b0cd93", size = 211892, upload-time = "2026-07-06T21:32:29.565Z" },+ { url = "https://files.pythonhosted.org/packages/22/d7/1a74539db16d8bfd839ff1515948948efbb162e574650fd3d846896eea95/cffi-2.1.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:88023dfe18799507b73f1dbb0d14326a17465de1bc9c9c7655c22845e9ddc3a2", size = 218793, upload-time = "2026-07-06T21:32:30.951Z" },+ { url = "https://files.pythonhosted.org/packages/ec/d1/9a5b7169499e8e8d8e636de70b97ac7c9447104d2ff1a2cd94790cea5162/cffi-2.1.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:0a96b74cda968eebbad56d973efe5098974f0a9fb323865bf99ea1fd24e3e64c", size = 205737, upload-time = "2026-07-06T21:32:32.216Z" },+ { url = "https://files.pythonhosted.org/packages/ba/b0/e131a9c41f10607926278453d9596163594fe1c4ebc46efe3b5e5b34eb84/cffi-2.1.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:a5781494d4d400a3f47f8f1da94b324f6e6b440a53387774002890a2a2f4b50f", size = 204909, upload-time = "2026-07-06T21:32:33.655Z" },+ { url = "https://files.pythonhosted.org/packages/fb/d2/4398416cd699b35167947c6e22aca52c47e69ad5695073c9f1f2c52e04aa/cffi-2.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:aa7a1b53a2a4452ada2d1b5dade9960b2522f1e61293a811a077439e39029565", size = 217883, upload-time = "2026-07-06T21:32:35.173Z" },+ { url = "https://files.pythonhosted.org/packages/a2/a5/d4fe77b589e5e82d43ebc809bf2e6474afe8e48e32ea050b9357645b6471/cffi-2.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9d8272c0e483b024e1b9ad029821470ed8ec65631dbd90217469da0e7cd89f1c", size = 221251, upload-time = "2026-07-06T21:32:36.527Z" },+ { url = "https://files.pythonhosted.org/packages/22/f0/a2fc43084c0433caf7f461bccc013e28f848d04ee1c5ed7fce71423cf4d9/cffi-2.1.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:7762faa47e8ff7eb80bd261d9a7d8eea2d8baa69de5e95b70c1f338bbe712f02", size = 214250, upload-time = "2026-07-06T21:32:37.852Z" },+ { url = "https://files.pythonhosted.org/packages/04/8c/b925975448cf20634a9fbd5efceb807219db452653648d2897c0989cab2d/cffi-2.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:89095c1968b4ba8285840e131bf2891b09ae137fe2146905acae0354fbce1b5e", size = 219441, upload-time = "2026-07-06T21:32:39.146Z" },+ { url = "https://files.pythonhosted.org/packages/c3/c0/d1ec30ffb370f748f2fb54425972bfef9871e0132e82fb589c46b6676049/cffi-2.1.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:5972433ad71a9e46516584ef60a0fda12d9dc459938d1539c3ddecf9bdc1368d", size = 214815, upload-time = "2026-07-06T21:32:48.557Z" },+ { url = "https://files.pythonhosted.org/packages/1b/dc/5620cf930688be01f2d673804291de757a934c90b946dbdc3d84130c2ea4/cffi-2.1.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b6422532152adf4e59b110cb2808cee7a033800952f5c036b4af047ee43199e7", size = 222429, upload-time = "2026-07-06T21:32:49.848Z" },+ { url = "https://files.pythonhosted.org/packages/4b/a4/77b53abbf7a1e0beb9637edbef2a94d15f9c822f591e85d439ffd91519a6/cffi-2.1.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:46b1c8db8f6122420f32d02fffb924c2fe9bc772d228c7c711748fff56aabb2b", size = 210315, upload-time = "2026-07-06T21:32:51.221Z" },+ { url = "https://files.pythonhosted.org/packages/58/0c/f528df19cc94b675087324d4760d9e6d5bfae97d6217aa4fac43de4f5fcc/cffi-2.1.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9fafc5aa2e2a39aaf7f8cc0c1f044a9b07fca12e558dca53a3cc5c654ad67a7", size = 208859, upload-time = "2026-07-06T21:32:52.512Z" },+ { url = "https://files.pythonhosted.org/packages/62/f2/c9522a81c32132799a1972c39f5c5f8b4c8b9f00488a23feaa6c06f07741/cffi-2.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1e9f50d192a3e525b15a75ab5114e442d83d657b7ec29182a991bc9a88fd3a66", size = 221844, upload-time = "2026-07-06T21:32:53.704Z" },+ { url = "https://files.pythonhosted.org/packages/6e/28/bd53988b9833e8f8ad539d26f4c07a6b3f6bcb1e9e02e7ca038250b3428d/cffi-2.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:98fff996e983a36d3aa2eca83af40c5821202e7e6f32d13ae94e3d2286f10cfe", size = 225287, upload-time = "2026-07-06T21:32:54.907Z" },+ { url = "https://files.pythonhosted.org/packages/79/99/0d0fd37f055224085f42bbb2c022d002e17dde4a97972822327b07d84101/cffi-2.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:379de10ce1ba048b1448599d1b37b24caee16309d1ac98d3982fc997f768700b", size = 223681, upload-time = "2026-07-06T21:32:56.329Z" },+ { url = "https://files.pythonhosted.org/packages/96/88/a996879e2eeccb815f6e3a5967b12a308257412acec882039d386bd2aa7b/cffi-2.1.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:10537b1df4967ca26d21e5072d7d54188354483b91dc75058968d3f0cf13fbda", size = 194331, upload-time = "2026-07-06T21:33:03.697Z" },+ { url = "https://files.pythonhosted.org/packages/58/85/7ae00d5c8dd6266f4e944c3db630f3c5c9a98b61d469c714d848b1d8138a/cffi-2.1.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:a95b05f9baf29b91171b3a8bd2020b028835243e7b0ff6bb23e2a3c228518b1b", size = 196966, upload-time = "2026-07-06T21:33:05.353Z" },+ { url = "https://files.pythonhosted.org/packages/a0/1c/4ed5a0e5bdca6cbc275556de3328dd1b76fd0c11cc13c88fe66d1d8715f2/cffi-2.1.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:63960549e4f8dc41e31accb97b975abaecfc44c03e396c093a6436763c2ea7db", size = 214747, upload-time = "2026-07-06T21:33:09.671Z" },+ { url = "https://files.pythonhosted.org/packages/3a/a6/e879bb68cc23a2bc9ba8f4b7d8019f0c2694bad2ab6c4a3701d429439f58/cffi-2.1.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ff067a8d8d880e7809e4ac88eb009bb848870115317b306666502ccad30b147f", size = 222392, upload-time = "2026-07-06T21:33:10.896Z" },+ { url = "https://files.pythonhosted.org/packages/88/f6/01890cfd63c08f8eb96a8319b0443690197d240a8bd6346048cf7bde9190/cffi-2.1.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:3b926723c13eba9f81d2ef3820d63aeceec3b2d4639906047bf675cb8a7a500d", size = 210285, upload-time = "2026-07-06T21:33:12.251Z" },+ { url = "https://files.pythonhosted.org/packages/a6/cf/2b684132056f438567b61e19d690dd31cd0921ace051e0a458be6074369e/cffi-2.1.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:47ff3a8bfd8cb9da1af7524b965127095055654c177fcfc7578debcb015eecd0", size = 208801, upload-time = "2026-07-06T21:33:13.617Z" },+ { url = "https://files.pythonhosted.org/packages/6f/08/f2e7d62c460faae0926f2d6e423694aa409ced3bc1fe2927a0a6e5f05416/cffi-2.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:799416bae98336e400981ff6e532d67d5c709cfb30afb79865a1315f94b0e224", size = 221808, upload-time = "2026-07-06T21:33:15.466Z" },+ { url = "https://files.pythonhosted.org/packages/38/37/04f54b8e63a02f3d908332c9effbf8c366167c6f733ed8a3d4f79b7e2a1e/cffi-2.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:961be50688f7fba2fa65f63712d3b9b341a22311f5253460ce933f52f0de1c8c", size = 225241, upload-time = "2026-07-06T21:33:16.869Z" },+ { url = "https://files.pythonhosted.org/packages/a9/d6/c72eecca433cd3e681c65ed313ab4835d9d4a379704d0f628a6a05f51c2e/cffi-2.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bf5c6cf48238b0eb4c086978c492ad1cbc22373fc5b2d7353b3a598ce6db887a", size = 223588, upload-time = "2026-07-06T21:33:18.239Z" },+ { url = "https://files.pythonhosted.org/packages/d8/f0/81478e482afa03f6d18dc8f2afb5edc45b3080853b634b5ed91961be0998/cffi-2.1.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:d2117334c3af3bdcb9a88522b844a2bdb5efdc4f71c6c822df55486ae1c3347a", size = 194142, upload-time = "2026-07-06T21:33:23.657Z" },+ { url = "https://files.pythonhosted.org/packages/7d/95/8de304305cd9204974b0ca051b86d307cafca13aa575a0ef1b44d92c0d8c/cffi-2.1.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:702c436735fbe99d59ada02a1f65cfc0d31c0ee8b7290912f8fbc5cd1e4b16c3", size = 196819, upload-time = "2026-07-06T21:33:25.007Z" },+ { url = "https://files.pythonhosted.org/packages/2e/d2/065fcae1c73979fac8e054462478d0ff8a29c40cdc2ed7ea5676a061df53/cffi-2.1.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:276f20fffd7b396e12516ba8edf9509210ac248cbbc5acbc39cd512f9f59ebe6", size = 222353, upload-time = "2026-07-06T21:33:29.178Z" },+ { url = "https://files.pythonhosted.org/packages/ed/a5/e8bbb1ce5b3ac2f53ad6a10bde44318a5a8d99d4f4a000d44a6e39aeb3e4/cffi-2.1.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:7d5980a3433d4b71a5e120f9dd551403d7824e31e2e67124fe2769c404c06913", size = 210051, upload-time = "2026-07-06T21:33:30.534Z" },+ { url = "https://files.pythonhosted.org/packages/28/ed/c127d3ac36e899c965e3361357c3befacd6578c03f40125183e41c3b219e/cffi-2.1.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:6ca4919c6e4f89aa99c42510b42cf54596892c00b3f9077f6bdd1505e24b9c8d", size = 208630, upload-time = "2026-07-06T21:33:31.753Z" },+ { url = "https://files.pythonhosted.org/packages/cc/d7/97d3136f81db489ec8d1d67748c110d6c994268fd7528014aa9f2b085e4e/cffi-2.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d53d10f7da99ae46f7373b9150393e9c5eab9b224909982b43832668de4779f5", size = 221593, upload-time = "2026-07-06T21:33:33.044Z" },+ { url = "https://files.pythonhosted.org/packages/d3/27/93195977168ee63aed233a1a0993a2178798654d1f4bddcdd321d6fd3b21/cffi-2.1.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c351efb95e832a853a29361675f33a7ce53de1a109cd73fd47af0712213aa4ce", size = 225146, upload-time = "2026-07-06T21:33:34.224Z" },+ { url = "https://files.pythonhosted.org/packages/b3/c1/6dbd291ee2ae5a50a034aa057207081f545923bbf15dad4511e985aafff5/cffi-2.1.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:dbf7c7a88e2bac086f06d14577332760bdeecc42bdec8ac4077f6260557d9326", size = 223240, upload-time = "2026-07-06T21:33:35.57Z" },+ { url = "https://files.pythonhosted.org/packages/14/d0/117dcd9209255ad8571fbc8c92ef32593a1d294dcec91ddc4e4db50606f2/cffi-2.1.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:eb4e8997a49aa2c08a3e43c9045d224448b8941d88e7ac163c7d383e560cbf98", size = 223899, upload-time = "2026-07-06T21:33:39.514Z" },+ { url = "https://files.pythonhosted.org/packages/b6/3d/f20f8b886b254e3ad10e15cd4186d3aed49f3e6a35ab37aab9f8f25f7c03/cffi-2.1.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:bf01d8c84cbea96b944c73b22182e6c7c432b3475632b8111dbfdc95ddad6e13", size = 211652, upload-time = "2026-07-06T21:33:40.851Z" },+ { url = "https://files.pythonhosted.org/packages/28/3b/fad54de07260b93ddeef4b96d0131d57ea900675df1d410ae1deee52d7a6/cffi-2.1.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:33eb1ad83ebe8f313e0df035c406227d55a79456704a863fad9842136af5ad7d", size = 210755, upload-time = "2026-07-06T21:33:42.183Z" },+ { url = "https://files.pythonhosted.org/packages/cc/82/3d5c705acb7abbba9bbd7d79b8e62e0f25b6120eb7ae6ac49f1b721722fe/cffi-2.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ac0f1a2d0cfa7eea3f2aaf006ab6e70e8feeb16b75d65b7e5939982ca2f11056", size = 223933, upload-time = "2026-07-06T21:33:43.603Z" },+ { url = "https://files.pythonhosted.org/packages/6c/d0/47e338384ab6b1004241002fa616301020cea4fc95f283506565d252f276/cffi-2.1.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c16914df9fb7f500e440e6875fa23ff5e0b31db01fa9c06af98d59a91f0dc2e4", size = 226749, upload-time = "2026-07-06T21:33:45.046Z" },+ { url = "https://files.pythonhosted.org/packages/70/25/65bd5b58ea4bfdfc15cde02cb5365f89ef8ab8b2adfb8fe5c4bd4233382f/cffi-2.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5ecbd0499275d57506d397eebe1981cee87b47fcd9ef5c22cab7ed7644a39a94", size = 225703, upload-time = "2026-07-06T21:33:46.374Z" },+ { url = "https://files.pythonhosted.org/packages/55/c7/8c8c50cb11c6750051daf12164098a9a6f027ac4356967fd4d800a07f242/cffi-2.1.0-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:2e9dabb9abcb7ad15938c7196ad5c1718a4e6d33cc79b4c0209bdb64c4a54a5c", size = 194121, upload-time = "2026-07-06T21:33:56.109Z" },+ { url = "https://files.pythonhosted.org/packages/99/e2/67680bf19a6b60d2bb7ff83baefa2a4c3d2d7dc0f3277034b802e1fc504c/cffi-2.1.0-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:37f525a7e7e50c017fdebe58b787be310ad59357ae43a053943a6e1a6c526001", size = 196820, upload-time = "2026-07-06T21:33:57.288Z" },+ { url = "https://files.pythonhosted.org/packages/ef/c3/ad299dc38f3583f8d916b299f028af418a9ec98bc695fcbebeae7420691c/cffi-2.1.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:90bec57cf82089383bd06a605b3eb8daebf7e5a668520beaf6e327a83a947699", size = 222342, upload-time = "2026-07-06T21:34:01.814Z" },+ { url = "https://files.pythonhosted.org/packages/eb/d8/df4543cc087245044ed02ef3ad8e0a26619d0075ac7a77a12dc81177851b/cffi-2.1.0-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6274dcb2d15cef48daa73ed1be5a40d501d74dccd0cd6db364776d12cb6ba022", size = 210073, upload-time = "2026-07-06T21:34:03.255Z" },+ { url = "https://files.pythonhosted.org/packages/2c/0e/fac738d73728c6cea2a88a2883dca54892496cbba88a1dc1f2909cb8a6f5/cffi-2.1.0-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:2b71d409cccee78310ab5dec549aed052aaea483346e282c7b02362596e01bb0", size = 208551, upload-time = "2026-07-06T21:34:04.433Z" },+ { url = "https://files.pythonhosted.org/packages/e6/3f/0b04a700dd64f465c93020253a793a82c9b4dff9961f48facd0df945d9b8/cffi-2.1.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7d3538f9c0e50670f4deb93dbb696576e60590369cae2faf7de681e597a8a1f1", size = 221649, upload-time = "2026-07-06T21:34:06.157Z" },+ { url = "https://files.pythonhosted.org/packages/5d/7c/b7379a5704c79eda57ce075869ba70a0368d1c850f803b3c0d078d39dcaf/cffi-2.1.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:8f9ec95b8a043d3dfbc74d9abc6f7baf524dd27a8dc160b0a32ff9cdab650c28", size = 225203, upload-time = "2026-07-06T21:34:07.489Z" },+ { url = "https://files.pythonhosted.org/packages/5a/02/d5e6c43ea85c41bda2a184a3418f195fe7cf602967a8d2b94e085b83deef/cffi-2.1.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:af5e2915d41fe6c961694d7bfdc8562942638200f3ce2765dfb8b745cf997629", size = 223263, upload-time = "2026-07-06T21:34:08.712Z" },+ { url = "https://files.pythonhosted.org/packages/e0/27/1d0b408497e41a74795af122d7b603c418c5fed0171450f899afd04e594f/cffi-2.1.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0520e1f4c35f44e209cbbb421b67eec42e6a157f59444dfb6058874ff3610e5d", size = 223904, upload-time = "2026-07-06T21:34:12.606Z" },+ { url = "https://files.pythonhosted.org/packages/8b/31/e115c985105dd7ffb32444505f18ceb874bb42d992af05d5dced7ecf1980/cffi-2.1.0-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:3681e031db29958a7502f5c0c9d6bbc4c36cb20f7b104086fa642d1799631ff8", size = 211554, upload-time = "2026-07-06T21:34:13.987Z" },+ { url = "https://files.pythonhosted.org/packages/5a/67/9e6e09409336d9e515c58367e7cfcf4f89df06ad25252675595a58eb59d5/cffi-2.1.0-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:762f99479dcb369f60ab9017ad4ab97a36a1dd7c1ee5a3b15db0f4b8659120cd", size = 210795, upload-time = "2026-07-06T21:34:15.972Z" },+ { url = "https://files.pythonhosted.org/packages/19/e5/d3cc82a4a0be7902af279c04181ad038449c096734464a5ae1de3e1401bd/cffi-2.1.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0611e7ebf90573a535ebdc33ae9da222d037853983e13359f580fab781ca017f", size = 223843, upload-time = "2026-07-06T21:34:17.509Z" },+ { url = "https://files.pythonhosted.org/packages/b9/65/b434abc97ce7cecc2c640fde160507c0ecc7e21544b483ba3325d2e2ea17/cffi-2.1.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:86cf8755a791f72c85dc287128cc62d4f24d392e3f1e15837245623f4a33cccc", size = 226773, upload-time = "2026-07-06T21:34:19.05Z" },+ { url = "https://files.pythonhosted.org/packages/b5/9f/d4dc66ca651eb1145a133314cda721abf13cfac3d28c4a0402263ae6ad75/cffi-2.1.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:ba00f661f8ba35d075c937174e27c2c421cec3942fd2e0ea3e66996757c0fdd9", size = 225719, upload-time = "2026-07-06T21:34:20.576Z" },+]+[[package]]name = "charset-normalizer"version = "3.4.9"@@ -271,6 +336,54 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },]+[[package]]+name = "cryptography"+version = "49.0.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "cffi", marker = "platform_python_implementation != 'PyPy'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/1f/99/d1c90d6041656cc6ee229dc99cd67fd0cd5aec3c5f7d72fffc27cc750054/cryptography-49.0.0.tar.gz", hash = "sha256:f89660a348f4f78a92366240a61404e337586ef7f5909a2fef59ca88ef505493", size = 854345, upload-time = "2026-06-12T20:02:30.512Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/09/41/3797cfaf69cae04a13ee78ebd83f0678d9c02b4779d21ce24445326f1a69/cryptography-49.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:36d1709f992593689b45bda411498d62c6e365f2ca00b84657d4dadd24de16db", size = 4692978, upload-time = "2026-06-12T20:01:21.305Z" },+ { url = "https://files.pythonhosted.org/packages/e6/8b/43011f7ebe515a8aa20d61f290a326cd890c2e738e16e59eaff8d9c3a412/cryptography-49.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0e959b578856a3924bc0cbb710fc12c387b9412a951389f3ca61704a9e25f325", size = 4716422, upload-time = "2026-06-12T20:01:48.566Z" },+ { url = "https://files.pythonhosted.org/packages/4a/91/01ce7303a4579e6d3a6abef01bd322848e9ea7a219adcabc5048b9033571/cryptography-49.0.0-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:53ecee2e23f7169b6117e99fc8a944e5e50f79e69758a83b52a00cb98ab2b2d2", size = 4700503, upload-time = "2026-06-12T20:02:47.091Z" },+ { url = "https://files.pythonhosted.org/packages/62/99/a2c95cf8293f07491e9e27c20cc4dcd18176d944e674679adeb1d0173fd6/cryptography-49.0.0-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:2eda353d8a27bcbcaa4cbed18994a74ab4d19a2ca897db188ea269ab9b71419b", size = 5309779, upload-time = "2026-06-12T20:02:08.987Z" },+ { url = "https://files.pythonhosted.org/packages/20/2c/0622f20ff02b2ef32558733443805dc82fd4c275be01b2d19d14676f3a1b/cryptography-49.0.0-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:2afe9051da7ae7bd5905da5a949280c7d2bb75682e188f650a9d0f2756b834c6", size = 4749683, upload-time = "2026-06-12T20:02:03.335Z" },+ { url = "https://files.pythonhosted.org/packages/a3/5b/c5246635d5fd3b64e0d45ae10e99fd32fe9676a79915ccfe5a61ba9af1a5/cryptography-49.0.0-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:0b82e28ee398a386f0807bba7884d30f25218855690f45115831bcce5d90822c", size = 4337874, upload-time = "2026-06-12T20:02:54.323Z" },+ { url = "https://files.pythonhosted.org/packages/6d/88/05563c7fe2e914e87d1a536d06fe83e66b4e1d95cb593e05aea375531da8/cryptography-49.0.0-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:ccac2bfebc306b862133e3bb71f3f6ee8bb525240089b2d952e4144b3a6d5da7", size = 4700283, upload-time = "2026-06-12T20:01:34.822Z" },+ { url = "https://files.pythonhosted.org/packages/c4/b6/d7696e4e890d6ae1469935164c9e5215c557671cb78d6e3f458ccceaa632/cryptography-49.0.0-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:d0527ce944105f257f605a827d6ebead966c752038b6e8656abb9c5edee6fc68", size = 5265844, upload-time = "2026-06-12T20:01:24.09Z" },+ { url = "https://files.pythonhosted.org/packages/a9/3c/f3ad17eecc1a57b0ba236dc01f90e783c51f4a2f35f64777cc4f47a184b2/cryptography-49.0.0-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:cbc77da8c523d5abd028635ba850a6966fcee2c82e2bf65a41d1d8afe0f98be9", size = 4749290, upload-time = "2026-06-12T20:01:30.848Z" },+ { url = "https://files.pythonhosted.org/packages/4f/01/339573cf1023163a400b0b5d16f6d507de413b9f60be6fd1b77feeaf6737/cryptography-49.0.0-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b87e65d263b3e5d3bb92a57e2a6638e2f31110fa7aa890c7b2dbba42248d0a3f", size = 4834612, upload-time = "2026-06-12T20:01:29.246Z" },+ { url = "https://files.pythonhosted.org/packages/71/fd/577302e213a1be9468f92d1afef66fcf1ef83d516819d9992ca547f592bd/cryptography-49.0.0-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:66ec79c3904820572d7e987abdf304281f141d37ad9a489b8e97066e7b9b6459", size = 4980804, upload-time = "2026-06-12T20:01:42.853Z" },+ { url = "https://files.pythonhosted.org/packages/86/12/c48a424f38db03027be9f7ed5c7dc5de9933dbee992865f98b13727a009d/cryptography-49.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:196ecd6a36e4e9aa10270393bb98d8df88fccee0bf1e5128b91ae4eb4375896d", size = 4678835, upload-time = "2026-06-12T20:02:48.743Z" },+ { url = "https://files.pythonhosted.org/packages/68/28/8a3ad4653662c93fc44dc4e5d8fd374c25c42e07b34bbfbadf49cf57a5a8/cryptography-49.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7abcee80084cda3f7691f3eb1ce480d8df49cec637b429aa35986c1de71738aa", size = 4697239, upload-time = "2026-06-12T20:02:56.03Z" },+ { url = "https://files.pythonhosted.org/packages/a8/b2/2193fc74f81aee4f9b62733133b73b5176718932ed8f2e4b03fa040480a6/cryptography-49.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:4ae387c9cb68ea569ca17e490d66d8142b81c3cc814bf179974b7d146e490bbb", size = 4685593, upload-time = "2026-06-12T20:02:50.666Z" },+ { url = "https://files.pythonhosted.org/packages/47/f1/1d3eaa243bfc5de4a187b22aa8c048b3e4980bfbe830ac46e6bac2e66947/cryptography-49.0.0-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:f37d847238971164fdbc68ade6f6574aecc9c0af714190e2083429ff68f4ce9d", size = 5289961, upload-time = "2026-06-12T20:01:46.468Z" },+ { url = "https://files.pythonhosted.org/packages/58/39/2d51306721330c486495853eda1c567880ff036de15a14c4b74f399934af/cryptography-49.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:c2bc30226390d60ea19d9f82b19db005fe0452154a23c1c410c12ea801e43561", size = 4731145, upload-time = "2026-06-12T20:02:16.832Z" },+ { url = "https://files.pythonhosted.org/packages/17/50/983e838c7fd0d87fd8c969bcdd328edaf5f756e38df5281637424c155873/cryptography-49.0.0-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:07cab27cc7b7e0fd28e5e26bb9eeedde5c135c868b46de4a27845abe94af6122", size = 4321719, upload-time = "2026-06-12T20:02:52.611Z" },+ { url = "https://files.pythonhosted.org/packages/a7/f5/8f571d7e27c55bce9f76f026143bcb1e040a4233149ecca0bea5fa5dd5f7/cryptography-49.0.0-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:b20133d204d2bb56ba047642199603876c872026ca53e79c35b83772ab2cc505", size = 4685209, upload-time = "2026-06-12T20:02:07.282Z" },+ { url = "https://files.pythonhosted.org/packages/e7/84/0e27016a6fc5a0886f797018b26aa42f40c09a82332bff77822a451deaaa/cryptography-49.0.0-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:b970c6da94d5bb18629db453d14f2a1300f6bf59b61e9b82377931ef95504866", size = 5246285, upload-time = "2026-06-12T20:01:32.439Z" },+ { url = "https://files.pythonhosted.org/packages/11/2d/5e1fb307cb5931881516b464c98774b3f2c36b5d4bb9a2830253cf553cad/cryptography-49.0.0-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:d8ecde755e2e91bf773fc94e8c9d730cd7f2007004cb492263a794ec3899a1c8", size = 4730441, upload-time = "2026-06-12T20:02:01.469Z" },+ { url = "https://files.pythonhosted.org/packages/e4/c0/bff5a02ee731d207d6a1ed51732549d8c53d2bc8da1d10ec6f2844201d68/cryptography-49.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e3fb64c420688e5319ae25113a354015abbd8dffbfbc41781a1ea66fc7622ac3", size = 4815869, upload-time = "2026-06-12T20:01:36.574Z" },+ { url = "https://files.pythonhosted.org/packages/b9/26/814681d14248d95d73d5c3eea0c39a94eb8302df966f670a2c60de90974b/cryptography-49.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:32703d93296f5c1f4b53349ad3a250c2cae0fdecd3a3dd5d47e616d8d616af27", size = 4960948, upload-time = "2026-06-12T20:02:18.688Z" },+ { url = "https://files.pythonhosted.org/packages/3d/df/40577043ca124e17012f408ddddaeb213b856336ac82ddb3bc915f39e29f/cryptography-49.0.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f78ff2c9ed8dc2d036b0f4d640e22522213d047c1b14e61205a7e55c80a494d4", size = 4692429, upload-time = "2026-06-12T20:01:53.628Z" },+ { url = "https://files.pythonhosted.org/packages/2c/99/2d13299eb3dd27b02dcfaafcc91d6b5cb3329f7cbd6d8f51921acd566c1a/cryptography-49.0.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:35b151772baff2c74cba7fa290ceaff4c3b11c0c881eb93eb5dbc05a7cfbba18", size = 4700968, upload-time = "2026-06-12T20:02:45.383Z" },+ { url = "https://files.pythonhosted.org/packages/a5/4d/9c0cd02f95e2602dd5e563da149ee0830abef3537be8b34dc56281ebe27a/cryptography-49.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:0f21641cf4b30fca7aee061ced0ec7ad7b073518088b7c9969a297c0ae796c69", size = 4697758, upload-time = "2026-06-12T20:01:41.13Z" },+ { url = "https://files.pythonhosted.org/packages/24/01/186c825898477d77e2324d5360fefe622ff1d8d1963ec0554e2cada8ec77/cryptography-49.0.0-cp39-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:9e82dcc8e56052715fb18b2429e3bca4823b1629136a2084fc45a9a5cecb9b64", size = 5298863, upload-time = "2026-06-12T20:02:24.579Z" },+ { url = "https://files.pythonhosted.org/packages/b8/7b/62cbbab75d0659865bf0273790031544a0b16c8072d258f9428dcd8190dc/cryptography-49.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:6f2debedf9ca60cf1d5bd466475638af5130f89965605cd818484d19987d3a21", size = 4735983, upload-time = "2026-06-12T20:01:50.14Z" },+ { url = "https://files.pythonhosted.org/packages/6c/72/3e798c064bc39e471008075d0f9bc9daf77a80879c092e4a8e170c585ed4/cryptography-49.0.0-cp39-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:8c25ceb16df5b9435f3f6a9829204985b0e0cbee3b48aacd432c7d2c850b44d9", size = 4334173, upload-time = "2026-06-12T20:01:44.743Z" },+ { url = "https://files.pythonhosted.org/packages/f0/ee/6fca21d1ac73e06f8bef71940abfd4d2f6472b4bca284d770f32bd4086f6/cryptography-49.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:28d8b15e6275f12c8a207dc309dfa957903c927d08d0cc937ee3f63f200693cc", size = 4697298, upload-time = "2026-06-12T20:02:20.918Z" },+ { url = "https://files.pythonhosted.org/packages/67/d0/a5fcd3515f0bae49a7b6d0413cc1bdccdcc1fc0047037a0d480642cdc5d6/cryptography-49.0.0-cp39-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:6fc361c34fb6aac015ce19435876635e5c6d21db31998b0920f675f131e043b8", size = 5254338, upload-time = "2026-06-12T20:02:22.737Z" },+ { url = "https://files.pythonhosted.org/packages/a0/84/84fe36f19caf857d61cb7fc9c63035a47ffabd84ea12d1d393148efa3615/cryptography-49.0.0-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:2400ef9c9e2299a25614eb1dea3db54a69b1349efd043bfac9c67630d136df36", size = 4735650, upload-time = "2026-06-12T20:02:41.389Z" },+ { url = "https://files.pythonhosted.org/packages/6c/a0/db537264e234f7273a73ec020873d6d6b39dfd8a53db78b550ca8320440e/cryptography-49.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:67e1d20ad9ef3a563c59ef22e7a8a0b8210bd26604369ea4a30a7c66aefe504e", size = 4834820, upload-time = "2026-06-12T20:01:51.847Z" },+ { url = "https://files.pythonhosted.org/packages/93/77/8df9eb486495979bccecd1062e2eaf435250e84437040295b57d09048b0b/cryptography-49.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:42b0684e0e40cf26122427802486f6d93aea593612603a94fbf260c7eb1e9c1b", size = 4967968, upload-time = "2026-06-12T20:02:12.524Z" },+ { url = "https://files.pythonhosted.org/packages/d6/a7/f9dac0ab7f80368c56993a7bf638ef9935f825c91902798481fac0898138/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c83782480a4a9da4d0feb51950131ba32e12e70813848b3343f6e18c28a66838", size = 4676239, upload-time = "2026-06-12T20:02:28.793Z" },+ { url = "https://files.pythonhosted.org/packages/d7/70/2ba3769dd0ae167e2f33dfa9592d45db6ff9a61d62ca1a5b3d1bdd09068f/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:b39efa323140595abd3ecca8529d321ae50f55f3aa3ba9cc81ea56a6011953d5", size = 4715584, upload-time = "2026-06-12T20:01:27.495Z" },+ { url = "https://files.pythonhosted.org/packages/94/64/2923570ac1c0bd3a737aa366ac3abbbbde273042308b8cde95e2364a6e6a/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:b47db11c2c3525083296069b98ac5221907455e989ae0c2e3008bde851921615", size = 4675885, upload-time = "2026-06-12T20:01:55.49Z" },+ { url = "https://files.pythonhosted.org/packages/ab/f8/614dc7e051418cfe53d55173c1e24c6b0085e89996fe90508c2fdf769aef/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:084ef1af862eb07ec46d25f68689f2102a9fc0e05ce7b80f14f5fe51e4eef0f6", size = 4715449, upload-time = "2026-06-12T20:02:05.469Z" },+]+[[package]]name = "fastapi"version = "0.139.0"@@ -441,6 +554,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" },]+[[package]]+name = "jeepney"+version = "0.9.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/7b/6f/357efd7602486741aa73ffc0617fb310a29b588ed0fd69c2399acbb85b0c/jeepney-0.9.0.tar.gz", hash = "sha256:cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732", size = 106758, upload-time = "2025-02-27T18:51:01.684Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/b2/a3/e137168c9c44d18eff0376253da9f1e9234d0239e0ee230d2fee6cea8e55/jeepney-0.9.0-py3-none-any.whl", hash = "sha256:97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683", size = 49010, upload-time = "2025-02-27T18:51:00.104Z" },+]+[[package]]name = "librt"version = "0.13.0"@@ -866,6 +988,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },]+[[package]]+name = "pycparser"+version = "3.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/1b/7d/92392ff7815c21062bea51aa7b87d45576f649f16458d78b7cf94b9ab2e6/pycparser-3.0.tar.gz", hash = "sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29", size = 103492, upload-time = "2026-01-21T14:26:51.89Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl", hash = "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992", size = 48172, upload-time = "2026-01-21T14:26:50.693Z" },+]+[[package]]name = "pydantic"version = "2.13.4"@@ -1192,6 +1323,19 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/57/c9/e69b1ff4c8b69093ef08b8919ab767af0569666865b39c30a8795d88d3c6/ruff-0.15.22-py3-none-win_arm64.whl", hash = "sha256:e1168075b72158510839f250027659cdd78476f40507dd517892304c41318661", size = 11298172, upload-time = "2026-07-16T15:14:10.51Z" },]+[[package]]+name = "secretstorage"+version = "3.5.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "cryptography" },+ { name = "jeepney" },+]+sdist = { url = "https://files.pythonhosted.org/packages/1c/03/e834bcd866f2f8a49a85eaff47340affa3bfa391ee9912a952a1faa68c7b/secretstorage-3.5.0.tar.gz", hash = "sha256:f04b8e4689cbce351744d5537bf6b1329c6fc68f91fa666f60a380edddcd11be", size = 19884, upload-time = "2025-11-23T19:02:53.191Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/b7/46/f5af3402b579fd5e11573ce652019a67074317e18c1935cc0b4ba9b35552/secretstorage-3.5.0-py3-none-any.whl", hash = "sha256:0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137", size = 15554, upload-time = "2025-11-23T19:02:51.545Z" },+]+[[package]]name = "setuptools"version = "83.0.0"