Skip to content

Conversation

@nicknisi
Copy link
Member

Summary

  • Replace hardcoded Integration enum with auto-discovery registry — each SDK is a self-contained directory under src/integrations/ that's discovered at startup via fs.readdirSync + dynamic import()
  • Add 10 new SDK integrations: SvelteKit, Node.js/Express, Python, Ruby, Go, PHP, PHP-Laravel, Kotlin/Spring Boot, .NET/ASP.NET Core, Elixir/Phoenix
  • Extend eval system with graders, fixtures, and language-aware fixture manager for all new SDKs (33/34 scenarios passing — only dotnet fails due to missing runtime)
  • Make Python, Ruby, and Node skills framework-adaptive (detect Django/Flask, Rails/Sinatra, Express/Fastify and adapt)

Why

The installer only supported 5 JS AuthKit SDKs. WorkOS has 10+ additional SDKs across Python, Ruby, PHP, Go, Kotlin, .NET, and Elixir that developers had to integrate manually. The registry pattern was needed to eliminate shared-file merge conflicts and enable parallel agent-team development.

Notes

  • All new SDKs are marked stability: 'experimental' — graduate to stable after full eval suite coverage
  • Backend SDK skills follow AuthKit quickstart patterns at workos.com/docs/authkit/vanilla/{language}
  • Non-JS integrations use custom run() functions that bypass runAgentInstaller (which has JS-centric assumptions) and call initializeAgent/runAgent directly — a follow-up can make runAgentInstaller language-aware
  • Eval fixtures match the quickstart "before" state for each language
  • The .NET eval requires dotnet SDK installed to run
  • docs/ directory is not committed (local ideation artifacts per CLAUDE.md)

…stry

Introduce a registry pattern that auto-discovers integrations from
src/integrations/*/index.ts at startup, eliminating the need to edit
shared files (constants.ts, config.ts, run-with-core.ts) when adding
new SDK integrations. This enables parallel agent-team development
for the multi-SDK expansion.

Key changes:
- Add src/lib/registry.ts with IntegrationRegistry (auto-discovery via
  fs.readdirSync + dynamic import)
- Add src/lib/language-detection.ts for multi-language project detection
- Migrate 5 existing JS integrations to src/integrations/{name}/
- Replace Integration enum with string type alias
- Expand Bash tool permissions for Python, Ruby, PHP, Go, .NET, Elixir,
  and Kotlin package managers
- Add language, stability, and priority fields to FrameworkConfig
Add support for SvelteKit, Node.js/Express, Python/Django, Ruby/Rails,
Go/Gin, PHP, PHP/Laravel, Kotlin/Spring Boot, .NET/ASP.NET Core, and
Elixir/Phoenix. Each integration includes a FrameworkConfig + skill file
and was implemented in parallel by an agent team with zero merge conflicts.

Non-JS integrations use a custom run() that bypasses the JS-centric
runAgentInstaller and calls initializeAgent/runAgent directly.

Also fixes port-detection crash for unknown integrations by adding
optional chaining with sensible defaults.
Add graders, scenarios, and infrastructure for SvelteKit, Node.js,
Python, Ruby, Go, PHP, PHP-Laravel, Kotlin, .NET, and Elixir evals.

- Language-aware fixture manager (pip, bundle, go mod, composer,
  mix, dotnet restore, gradle)
- Generic checkCommand() in BuildGrader for non-JS validation
- Agent executor uses string-keyed skill names, writes .env for
  non-JS frameworks
- 10 new grader files with framework-specific checks
- 34 total scenarios (24 existing + 10 new)
Minimal project scaffolds matching WorkOS AuthKit quickstart patterns:
- SvelteKit (svelte.config.js, app.html, routes)
- Node.js/Express (server.js, CJS matching quickstart)
- Python/Flask (server.py, requirements.txt)
- Ruby/Sinatra (server.rb, Gemfile)
- Go/Gin (main.go, go.mod)
- PHP (composer.json, public/index.php)
- PHP-Laravel (artisan, routes/web.php, Blade template)
- Kotlin/Spring Boot (build.gradle.kts, Application.kt)
- .NET/ASP.NET Core (Example.csproj, Program.cs)
- Elixir/Phoenix (mix.exs, router.ex, controller)

Each fixture is the "before" state — a working app before WorkOS
is added. The eval system runs the installer agent against these
and grades the result.
Build artifacts shouldn't be in the fixture — they're regenerated
by `pnpm build` during eval runs. Added .gitignore to prevent.
- Node/Python/Ruby: sealed session (loadSealedSession) is now a bonus
  check, not required. Agent reliably adds SDK + auth endpoints (steps
  1-2 of quickstart) but doesn't always complete session handling
  (step 3). Required checks: SDK installed + authorization URL +
  authenticateWithCode.
- SvelteKit: fix package name from @workos-inc/authkit-sveltekit to
  regex /authkit-sveltekit/ (actual package is @workos/authkit-sveltekit).
  Loosen hooks.server.ts and callback route patterns to match workos OR
  authkit references.
- PHP-Laravel: broaden auth check from Controllers/**/*.php to **/*.php
  since agent may put WorkOS code in routes or service providers.
Skills now detect the user's framework and adapt instead of forcing
a specific one:

- Python: Django → Flask → FastAPI → vanilla (install Flask)
- Ruby: Rails → Sinatra → vanilla (install Sinatra)
- Node: Express → Fastify → Hono → Koa → vanilla (install Express)

Each skill has framework-specific integration paths with the right
patterns (e.g., Django uses views.py + urls.py, Flask uses route
decorators, Rails uses controllers + routes.rb, Sinatra uses
inline routes).
yargs .version() with no args reads from cwd's package.json, which
fails when the CLI is invoked via npx (different working directory).
Use getVersion() from settings which reads from the bundled config.
Add Auth0 migration scenarios for 8 backend SDKs (node, python, ruby,
go, php, php-laravel, kotlin, elixir). Each fixture has a working Auth0
integration that the agent must replace with WorkOS AuthKit, testing
code comprehension and migration rather than greenfield generation.

- Relax errorHandling quality rubric so SDK-default delegation scores 3-4
- Add /api/health route to each fixture as a preservation check (bonus)
- Refactor backend graders to required/bonus pattern
- 42 total scenarios (was 34)
Kotlin: pin SDK version (4.18.1), add JVM target guidance, correct API
method names (userManagement not sso, builder pattern)

Go: clarify provider is the string "authkit" (not a constant), add
specific method names (GetAuthorizationURL, AuthenticateWithCode)

Elixir: add prerequisite check for {AppName}Web module with :controller
macro — agent was creating it from scratch without guidance
…ures

Kotlin: Include gradlew + gradle/wrapper/ in both kotlin fixtures so
the grader's `./gradlew build` check doesn't depend on the agent
creating a wrapper. Previously caused flaky failures.

Fixture cleanup: Add maxRetries to rm() and swallow cleanup errors.
The ENOTEMPTY error on tanstack-start temp dirs was turning passing
scenarios into false failures — cleanup is now best-effort.
@nicknisi nicknisi merged commit 0316fe8 into main Feb 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant