Website brand extraction
BRAND_EXTRACTION_PROVIDER defaults to framelane, the existing heuristic.
Setting it to tastelabs submits the customer’s URL with exactly five sections:
profile, colors, typography, assets and actions. Brand imagery and PDF extraction
are not requested. The existing event drainer polls the provider independently of
page reads. It handles partial/409 results, backs off from 5 to 30 seconds, and
fails after 30 minutes. A submit failure falls back to the heuristic; poll failures
never create another submission.
The paid task reservation is committed before its sole provider POST. Retrying
the same kit while its task runs returns that task. An interrupted submit whose
outcome is unknown times out; it is never automatically submitted again. This is
necessary because the provider does not document idempotent submission.
Completed results for the same canonical URL can be reused for 24 hours inside
the same workspace, including another kit. A reuse exposes the original task
ID, whose task result still names its original kit. The destination kit receives
the stored mapped result once; reusing the same task on the same kit never reapplies
it. Manual overrides and removed colors survive extraction. No result is shared
between workspaces.
The monthly quota counts TasteLabs submission attempts from task rows, including
failed submits that fall back to the heuristic. Defaults are free 3, pro 50,
enterprise unlimited. BRAND_EXTRACTION_QUOTA_BY_PLAN accepts a JSON object;
null means unlimited. Quota admission is serialized on the workspace row. Reads
and 24-hour reuse consume no quota. Workspace usage returns brand_extractions
and brand_extractions_limit for the current UTC calendar month, regardless of
the render-usage period argument.
Configuration and release gates
TASTELABS_API_KEY: separate staging/production keys, only in local environment or deployment secrets.TASTELABS_BASE_URL: defaults to the officialhttps://api.tastelabs.com.TASTELABS_STORAGE_HOSTS: JSON array of exact provider storage hostnames verified from the staging captures. Empty rejects remote suggestions. Do not broadly allow all public URLs or wildcard storage domains.BRAND_EXTRACTION_PROVIDER: keepframelanein production until the signed embedding Order described by the plan is filed indocs/decisions.
scripts/capture_tastelabs_fixture.py is the explicit single-submit capture
path; scripts/check_tastelabs_spec.py compares the reviewed upstream OpenAPI with
the vendored baseline without consuming extraction credits.
Logo suggestions expose authenticated API proxy paths, never provider markup.
Inline SVG is sanitized by an element/attribute allowlist. Remote images require
HTTPS, exact allowed host, public DNS pinned for the connection, bounded redirects,
time and bytes, and a supported image signature. Every redirect repeats the host
and DNS checks. The response uses sandbox CSP, nosniff and private/no-store.
The console displays a blob image, then copies a user-selected logo through its
normal upload path. SVG is rasterized preserving aspect ratio by the console.
Official sources: submission lifecycle,
design-system shape, and
OpenAPI.
