Commit Graph

287 Commits

Author SHA1 Message Date
github-actions[bot] 5cf0950342 Version Packages (#388)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
flags@4.1.0 @vercel/prepare-flags-definitions@0.3.0 @vercel/flags-core@1.5.0 @flags-sdk/vercel@1.4.0
2026-06-05 10:27:31 +02:00
Dominik Ferber 201f9d5988 Add bulk evaluation (#385)
* [flags] avoid re-imports

Avoid re-importing next/headers since it adds unnecessary microtask queue overhead

* [flags] avoid iife microtask queue overhead

* [flags] skip awaits where possible

* [flags] allow bulk eval

* wip

* add bulk mode to playground

* first try of bulk eval

* add bulk evaluation to adapters

* reuse

* simplify

* versions

* rm outdated changeset

* rm outdated changeset

* revert playground

* revert playground flags

* rm logs

* reuse cache of resolved flags for bulk

* simplify

* changesets

* support bulk([]) and bulk({})

* flagKey → key

* allow any type in expectPermutations

* avoid unnecessary mapping

* fix changeset

* validate package.json fields

* update package.json fields

* keep covariant

* adjust adapter types

* Merge bulk into evaluate (#392)

* merge bulk into evaluate

* add pages router compatibility

* better types

* add array test

* add test

* changesets

* use type import

* fix import

* extract readOverrides

* fix import of reportValue

* tracing

* skip bulkDecide for overwritten flags

* update changesets

* [changesets] onlyUpdatePeerDependentsWhenOutOfRange

* add type guard

* adjust changeset
2026-06-05 08:14:29 +00:00
Luis Meyer 7b5ea9a808 Reapply OIDC (#390)
* Reapply "Add oidc support (#374)" (#389)

This reverts commit 357ca676c6.

* bump oidc package

* review

* comments
2026-06-04 16:37:03 +02:00
Luis Meyer 357ca676c6 Revert "Add oidc support (#374)" (#389)
This reverts commit 72d36511d0.
2026-05-28 10:16:43 +03:00
Luis Meyer 72d36511d0 Add oidc support (#374)
* Add oidc support

* changeset

* update tests

* update def script

* fix provider data

* update changeset

* fix createVercelAdapter

* comments

* error
2026-05-28 08:59:00 +02:00
Dominik Ferber bd31a462a6 Add package.json metadata & validation script (#387)
* validate package.json fields

* update package.json fields
2026-05-25 15:49:46 +03:00
Andy 8c1a5f3517 Add minimumReleaseAge to pnpm-workspace.yaml (#386) 2026-05-20 20:32:20 +02:00
Dominik Ferber 4d90e912a4 [flags-core] perf improvements (#382)
* [flags-core] perf improvements

* add changeset
2026-05-18 13:20:13 +03:00
Vincent Derks bd4d01a9b2 vercel-flags-core: jitter ingest retries and batch-wait window (#371)
Replace the deterministic 100/200ms retry schedule with full-jitter exponential
backoff, jitter MAX_BATCH_WAIT_MS by ±20% to desynchronize concurrent flushes,
and log when a flush exhausts all retries.

Helpers extracted to utils/backoff.ts so they can be reused.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 15:57:15 +02:00
Luis Meyer b20d13b091 Fix snapshot release action (#375) 2026-05-05 11:06:45 +02:00
Dominik Ferber 9d425ebba0 set up trusted publisher and sign commits (#370) 2026-05-04 16:06:54 +02:00
Dominik Ferber 8e26cd8e40 update guidance (#369) 2026-04-24 16:40:22 +03:00
Dominik Ferber 93ead52914 add redirects (#368)
* add redirects

* fix
2026-04-22 07:07:16 +03:00
christopherkindl 44ba55f7ce Precompute install-audience flag for the hero switcher (#366)
* Precompute install-audience flag for the hero switcher

The home hero's "For humans / For agents" tab was tracked in React
state, so every reload snapped back to the default tab and broke the
"page is static without layout shift" promise. Model it as a
precomputed flag like the other hero flags:

- Add `installAudienceFlag` (`'humans' | 'agents'`, cookie key
  `install-audience`, default `'agents'`) and include it in
  `rootFlags` so `generatePermutations` covers both variants
- Read the flag on the server and publish it via `FlagValues`
- New `InstallCommand` client wrapper renders `CommandPromptRoot`
  with the server value and, on click, writes the cookie + calls
  `router.refresh()` (optimistic override pattern mirroring
  `FlagToggle`)

Result: the proxy's `precompute(rootFlags)` reads the cookie, rewrites
to the matching `[code]`, and SSR renders the correct tab from the
start — reloads stay on the user's choice with no client-only state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Update layout.tsx

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 07:32:54 +03:00
christopherkindl 97c8060917 [docs] Sync docs with @vercel/geistdocs 1.2.0 + 1.2.1 (#364)
* Sync docs template with @vercel/geistdocs 1.2.0 + 1.2.1

Pulls in template updates via `@vercel/geistdocs@1.2.1 update --sync`:

- 1.2.0: new NavbarLogo (oss product switcher variant), geist theme
  tokens + icons, updated docs layout, MobileDocsBar, redesigned navbar
  and mobile menu
- 1.2.1: CommandPrompt UI component, IconCheck / IconCopy fallback
  icons, supporting CSS tokens and @utility rules (material-small,
  text-label-13, text-label-14-mono, text-label-16-mono,
  --ds-shadow-border-small light/dark)

Home page intentionally left untouched because flags-sdk uses a custom
home/[code] routing structure. package.json left untouched to preserve
workspace/catalog references and app-specific deps (flags,
@vercel/toolbar, newer Next).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Cap footer max-w and use LogoFlagsSdk in navbar

- Cap the footer inner row at max-w-[1448px] so it aligns with the
  navbar on very wide screens
- Render the Flags SDK wordmark (LogoFlagsSdk) directly in the navbar
  via the oss NavbarLogo trigger; drop the duplicate entry from the
  product switcher dropdown

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Use bg-background-200 for docs container

Matches the navbar background so docs pages (principles, frameworks,
providers, etc.) no longer sit on a lighter surface than the header.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Use CommandPrompt humans/agents switcher in hero CTA

Replaces the Get Started button + CopySnippet in the home hero with
the CommandPrompt switcher. Triggers and surface are aligned to the
left via `items-start` on the root so they line up with the hero
heading instead of being centered.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Use full npm install command in hero CommandPrompt

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Default hero CommandPrompt to the agents tab

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Bump navbar Flags SDK logo to height 22

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Use MobileDocsBar for docs mobile navigation

Disables the default Fumadocs TOC popover and renders the
MobileDocsBar (sidebar trigger + TOC sheet) above the docs title,
matching the geistdocs template.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Override fumadocs primary at :root so prose links render gray-1000

Matches the workflow docs tweak — broadens the fd-primary override
from #nd-toc to :root so in-content links pick up the design-system
foreground color instead of the default blue.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Use new --ds-shadow-menu on hero "Try the Flags SDK" card

- Update --ds-shadow-menu to the 4-layer geist menu shadow
- Apply it to the flags-toggle card via `shadow-(--ds-shadow-menu)`;
  drop the stock `shadow-md` and redundant border

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Use LogoFlagsSdk as the app Logo; add AI SDK to product switcher

- Replace the inline triangle SVG + "Flags SDK" text in geistdocs.tsx
  with `<LogoFlagsSdk height={22} />`, so navbar & template consumers
  get the real wordmark
- Revert navbar.tsx to import `Logo` from `@/geistdocs` (single source
  of truth) — the direct LogoFlagsSdk import is no longer needed
- Add `LogoAiSdk` to OSS_PRODUCT_LINKS at the top of the list
  (`ai-sdk.dev`)
- Give LogoAiSdk the same `color` prop pattern as the other SDK logos
- Formatter cleanup in app/[lang]/layout.tsx

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Restore FrameworkSwitcher and theme the Next.js icon

- Re-mount <FrameworkSwitcher /> at the top of the desktop sidebar and
  the mobile Sheet (lost during the 1.2.x template sync)
- Rewrite the Next.js icon to mirror LogoIconNextSvg from
  @vercel/geistcn-assets: circle uses currentColor + text-gray-1000 so
  it auto-inverts per theme; gradient stops for the "N" use
  var(--ds-background-100) so the highlight stays readable in light
  and dark

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Docs: active nav state, geist shadow, restored framework icon + TOC offset

- DesktopMenu: mark nav items active when pathname falls under the
  item's section (match on first three path segments, ignore locale
  prefix); add `data-[active]:text-gray-1000` to the selector
- CodeBlock: restore the `#next` / `#svelte` title-suffix parser so
  framework icons render in code block headers again
- FrameworkSwitcher: apply `--ds-shadow-menu` to the popover content
- geistdocs.css: push `#nd-toc` over with `md:pl-8`

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 19:18:06 +02:00
Andy f4b2ec29f0 Update axios to 1.15.0 via lockfile (CVE-2026-40175) (#363) 2026-04-15 23:46:22 +02:00
github-actions[bot] 2e932e6c62 Version Packages (#361)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@vercel/flags-core@1.4.0 @flags-sdk/vercel@1.3.0
2026-04-14 17:29:53 +03:00
Dominik Ferber 754646db25 adapt changeset (#362) 2026-04-14 17:28:55 +03:00
Dominik Ferber 80dcdada34 [vercel flags] add progressive rollouts to sdk (#360)
* [vercel flags] add progressive rollouts

* fix slots

* add changeset
2026-04-14 16:55:57 +03:00
github-actions[bot] 1ac83900c8 Version Packages (#357)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
flags@4.0.6
2026-04-03 14:32:42 +03:00
Dominik Ferber c08f3e5614 [flags/next] perf improvements (#356)
* [flags] avoid re-imports

Avoid re-importing next/headers since it adds unnecessary microtask queue overhead

* [flags] avoid iife microtask queue overhead

* [flags] skip awaits where possible

* add undefined to headersModulePromise type
2026-04-03 11:24:31 +00:00
Rich Haines 4d2f7cc56e Send siteId as label on feedback GitHub issues (#353) 2026-04-02 10:59:01 +03:00
Rich Haines eafa640057 Add AI agent detection and automatic markdown rewrites (#351)
* Add AI agent detection and automatic markdown rewrites

When AI agents (Claude, ChatGPT, Cursor, etc.) request docs pages,
the proxy now detects them and transparently rewrites to the markdown
route — matching the geistdocs template default.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix: Missing `detectionMethod` property in `TrackMdRequestParams` type causes TypeScript compilation error and build failure.

This commit fixes the issue reported at apps/docs/lib/geistdocs/md-tracking.ts:24

**Bug explanation:**

The `trackMdRequest` function in `apps/docs/lib/geistdocs/md-tracking.ts` destructures `detectionMethod` from its parameter (line 24) and includes it in the JSON body sent to the tracking endpoint (line 38). However, the `TrackMdRequestParams` type definition (lines 6-12) does not include `detectionMethod` as a property.

In `apps/docs/proxy.ts` (line 82-87), `trackMdRequest` is called with `detectionMethod: agentResult.method` when an AI agent is detected, where `agentResult.method` is of type `DetectionMethod | null` from `@/lib/ai-agent-detection`.

This causes an exact TypeScript compilation error confirmed in the build logs:
```
./lib/geistdocs/md-tracking.ts:24:3
Type error: Property 'detectionMethod' does not exist on type 'TrackMdRequestParams'.
```

This error causes the entire `docs` build to fail (`next build` exits with code 1).

**Fix explanation:**

Added `detectionMethod?: DetectionMethod | null` as an optional property to the `TrackMdRequestParams` type, and added the corresponding `import type { DetectionMethod } from "@/lib/ai-agent-detection"` import at the top of the file. The property is optional (`?`) because most call sites (for `.md` URL tracking, `llms.txt` tracking, and header-negotiated tracking) don't pass a `detectionMethod` — only the agent-rewrite tracking path does. The `| null` union matches the `DetectionResult.method` type from `ai-agent-detection.ts`.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: molebox <hello@richardhaines.dev>

* format

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>
2026-03-29 02:19:37 +00:00
Vincent Derks b66ce3e34a Fixed getProviderData import in skill (#352) 2026-03-27 14:26:25 -07:00
Dominik Ferber 9142790975 only build publishable packages during release process (#348)
* clean up

* fix release process
@vercel/flags-core@1.3.1 @flags-sdk/vercel@1.2.1 @vercel/prepare-flags-definitions@0.2.1
2026-03-21 21:17:04 +02:00
Swarnava Sengupta 279d96ddaa fix(ci): add FLAGS env to release workflow (#347)
The playground app requires the FLAGS environment variable during build. This was already configured in release-snapshot.yaml but missing from the main release workflow, causing build failures.
2026-03-21 20:54:46 +02:00
github-actions[bot] 14ef3fa940 Version Packages (#346)
* Version Packages

* blank commit

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Swarnava Sengupta <swarnava.sengupta@vercel.com>
2026-03-21 23:38:24 +05:30
Swarnava Sengupta b755ffecdf fix: SDK key detection to avoid false positives with third-party identifiers (#345)
The SDK key validation now uses a regex (/^vf_(?:server|client)_/) to require
the format vf_server_* or vf_client_* instead of accepting any string starting
with vf_. This prevents false positives with third-party service identifiers
that happen to start with vf_ (e.g., Stripe identity flow IDs like
vf_1PyHgVLpWuMxVFx...).

Adds isValidSdkKey() helper function and updates parseSdkKeyFromFlagsConnectionString()
to use the stricter validation. Updates all tests to use valid SDK key formats.
2026-03-21 17:39:00 +00:00
github-actions[bot] 471e0048b6 Version Packages (#342)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-20 21:19:04 +02:00
Dominik Ferber ffcc1cd4fc fix changelog (#344) 2026-03-20 19:56:27 +02:00
Dominik Ferber 6bdbe3f89a ignore playground in changesets (#343) 2026-03-20 13:27:11 +00:00
Dominik Ferber 44460570d4 [vercel/flags-core] allow json flags (#335)
* rm unused import

* [vercel-flags] allow json flags

* add flags-playground

* wip

* clean up type

* reword changeset

* rm examples/flags-playground
2026-03-20 14:03:53 +02:00
Dominik Ferber 84e38d47aa adds an playground app we can use during development (#341)
* add flags-playground

* clarify

* move

* update lockfile
2026-03-20 11:45:27 +01:00
github-actions[bot] a3b536b504 Version Packages (#340)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@vercel/flags-core@1.2.1 @flags-sdk/vercel@1.1.1
2026-03-19 16:21:12 +02:00
Dominik Ferber b81963dc14 fix (#339) 2026-03-19 16:18:59 +02:00
Vincent Derks c63be2d147 Added check to check skills size (#338)
* Added check to check skills size

* Change glob -> readdirSync

* Shorten description length

* Added check for name, compatibility and body

* Added back some parts that were removed to avoid regressions

* More cleanup

* Feedback: Used grey-matter for frontmatter parsing

* Added pnpm setup and install deps in Skills Quality job

* Refine triggers
2026-03-19 09:36:31 +00:00
github-actions[bot] b199f2083c Version Packages (#333)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@flags-sdk/vercel@1.1.0 @vercel/flags-core@1.2.0
2026-03-18 15:50:13 +02:00
Dominik Ferber 64619d7c66 @vercel/flags-core: allow specifying entities type when creating clients (#334)
* changeset

* adapt
2026-03-13 11:09:21 +02:00
Dominik Ferber 4a5f56a8c7 skip sending config reads (#330)
* skip sending config read for dev and custom envs

* add changeset

* clean up

* wip
2026-03-13 08:16:47 +01:00
github-actions[bot] 0af37593bd Version Packages (#331)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
flags@4.0.5 @vercel/flags-core@1.1.1 @flags-sdk/vercel@1.0.3
2026-03-12 21:53:04 +02:00
Dominik Ferber c9934fda03 [@vercel/flags-core] drop dependency on flags pkg (#332) 2026-03-12 21:24:11 +02:00
nadav dd1396e461 Guard missing Vercel Flags runtime helpers (#326)
* Guard request-context flag reporting

* Preserve request-context hook binding

* Guard core request-context reporting

* Guard missing bundled flag definitions

---------

Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>
2026-03-12 16:38:18 +02:00
Vincent Derks e4d76a9621 Instruct agent to adjust to package-manager (#329) 2026-03-11 17:50:17 +01:00
Vincent Derks bc2ed6387d Add nextjs vercel toolbar instructions (aligned with sveltekit) (#328) 2026-03-11 17:36:41 +01:00
Vincent Derks f302da3b28 Refer to vercel-cli skill for flag manipulation (#327)
* Refer to vercel-cli skill for flag manipulation

* Added set command to examples

* Apply suggestion from @chriswdmr

Co-authored-by: Chris <7249920+chriswdmr@users.noreply.github.com>

---------

Co-authored-by: Chris <7249920+chriswdmr@users.noreply.github.com>
2026-03-11 15:50:07 +00:00
Vincent Derks ca61af1c2a Make skill contain more instructions as opposed to being just a general guide (#324) 2026-03-10 17:41:26 +01:00
Anthony Shew 8b5af40701 chore: Upgrade turbo version (#323) 2026-03-10 15:51:39 +02:00
Vincent Derks 49a19fbcda Add CLI reference to quickstart guide (#322) 2026-03-10 14:04:19 +01:00
Dominik Ferber 9ed47ff40f add VERCEL_ENV to turbo config (#321) 2026-03-10 13:19:20 +02:00
Dominik Ferber 12386f5edf Add BLOB_READ_WRITE_TOKEN to turbo.json globalPassThroughEnv (#319)
Make the Vercel Blob read/write token available to all Turborepo tasks.

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-10 11:32:41 +02:00