Skip to content

fix: recommend authkitProxy and warn about @workos-inc/node peer range - #55

Merged
nicknisi merged 1 commit into
mainfrom
fix/nextjs-authkit-proxy-node-peer
Oct 19, 2026
Merged

nicknisi merged 1 commit into
mainfrom
fix/nextjs-authkit-proxy-node-peer

Conversation

@nicknisi

Copy link
Copy Markdown
Member

Follow-up to #53, from the Opus 5.5 installer evals (workos/cli#265).

  • Next.js: recommend authkitProxy. In authkit-nextjs 4.4, authkitMiddleware is a @deprecated alias of authkitProxy (dist/esm/middleware.js). The skill now names authkitProxy and notes that the alias still works. The eval cases expect authkitProxy.
  • Next.js: warn about the @workos-inc/node peer range. The authkit-nextjs README installs @workos-inc/node unpinned, which now resolves to v11. authkit-nextjs 4.4 peer-depends on ^9 || ^10, so the skill now says to pin it to the peer range. The underlying fix belongs in authkit-nextjs: widen the peer range or update the README.
  • TanStack Start: same warning for its ^10.7.0 peer range. authkitMiddleware stays: it's the current, non-deprecated name in @workos/authkit-tanstack-react-start 0.11.1.

pnpm test: 574 passed. Format is clean.

- nextjs: authkitMiddleware is a deprecated alias of authkitProxy in authkit-nextjs 4.4
- nextjs: the SDK README installs @workos-inc/node unpinned, which pulls v11 outside the ^9 || ^10 peer range
- tanstack-start: peer range is @workos-inc/node ^10.7.0
- eval cases expect authkitProxy
@greptile-apps

greptile-apps Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

Updates AuthKit setup guidance and the related Next.js evaluation cases.

  • Next.js setup recommends authkitProxy for proxy files.
  • The setup guides name compatible @workos-inc/node versions for each framework.

No actionable issues were found. No runtime checks were run.

Reviews (1) · Last reviewed commit: "fix: recommend authkitProxy and warn abo..." · Reviewed by Greptile

@nicknisi
nicknisi merged commit cdd3bd2 into main Oct 19, 2026
4 checks passed
@nicknisi
nicknisi deleted the fix/nextjs-authkit-proxy-node-peer branch October 19, 2026 20:34
nicknisi added a commit to workos/cli that referenced this pull request Oct 21, 2026
Brings workos/skills#55: the Next.js reference recommends authkitProxy and
warns that a bare @workos-inc/node install pulls v11, outside the
authkit-nextjs ^9 || ^10 peer range.
nicknisi added a commit to workos/cli that referenced this pull request Oct 21, 2026
…d run evals through the real installer (#266)

* fix(installer): stop Kotlin, PHP, and Laravel installs aborting on a missing package.json

runAgentInstaller read package.json for every integration, and a missing
file exits the process. Kotlin, PHP, and Laravel go through this runner,
so their installs stopped right after detection with "Could not find
package.json". Only JavaScript integrations read it now.

Vanilla JS checked for a package named "workos", which no plain project
has, so it asked "Vanilla JavaScript does not seem to be installed. Do you
still want to continue?" (default No) and failed outright in CI and
agent mode. It is the fallback for any JS project, so the check is
skipped.

* fix(installer): give the agent Claude Code's system prompt and state its rules

- systemPrompt: Claude Code preset plus installer rules. Omitted, the SDK
  sends an empty system prompt, so the agent never got Claude Code's tool
  guidance (Read/Grep over cat/grep) and learned the Bash allowlist one
  denied command at a time (about 80% of Bash calls were denied).
- Allowlist: read-only git (status/diff/log/show/ls-files/rev-parse),
  `cd <working dir> && <allowed>`, per-tool syntax checks (python -m
  py_compile/venv, ruby -c, php -l, uv venv), and dependency changes
  (remove/uninstall, go get, go mod tidy, composer require). Flags stay
  per tool because the same flag can run code elsewhere (python -c).
- Non-Next.js JS prompts say the setup reference covers what the
  installer handles, so agents stop hunting for it.
- options.onAgentMessage lets evals observe the real integration run.

* test(evals): run the real installer integration and update Next.js fixtures

The eval sent its own prompt ("invoke the workos-authkit-<framework>
skill", a skill that no longer exists) and called runAgent directly, so
it measured a different flow from the installer: agents searched for the
skill, read reference files, and skipped production's validator. It now
calls the integration's run() with installer options, observing messages
through options.onAgentMessage and counting agent:retry corrections. The
opt-in Fizzy fixture keeps its isolated-environment path.

That surfaced two gaps the old path hid: four Next.js fixtures were on
14.2, below the installer's 15.3 minimum (now ^15.3 with React 19;
partial-install moves authkit-nextjs from 0.15 to ^4), and the
Kotlin/PHP/Laravel and vanilla-js aborts fixed in the previous commits.

Eval runs set WORKOS_TELEMETRY=false.

* chore(deps): bump @workos/skills to 0.8.1

Brings workos/skills#55: the Next.js reference recommends authkitProxy and
warns that a bare @workos-inc/node install pulls v11, outside the
authkit-nextjs ^9 || ^10 peer range.

* fix(installer): close cd-prefix bypass and only promise checks the runner performs

- The Bash gate stripped `cd <working dir> &&` by resolving the path, then
  checked only the remainder. `cd "/proj/$(id)/.." && git status` resolved
  to /proj and passed, while Bash still ran `$(id)`. Shell operators are
  now checked on the raw command first, and a cd target must be a plain
  path (no $, backticks, globs, quotes, or spaces) to be stripped.
- The system prompt promised that the installer builds the project and
  returns errors. Only runners with validation do (runAgentInstaller);
  Python, Ruby, Go, Elixir, and .NET don't. The prompt now says which,
  based on whether this run has a retry config.
- The setup-reference note no longer claims the installer runs browser
  checks; agents report sign-in flows as untested.

* refactor(debug): scope installer log files per async context

initLogFile() set one module-level path, so concurrent installer runs in
one process (evals) appended to whichever file was selected last.
runWithLogFile(path, fn) gives a run its own log via AsyncLocalStorage;
single runs keep the session log as before.

* test(evals): fail scenarios when the installer fails and write the installer env

- A blocking installer error (e.g. a Next.js result without /sign-in)
  made AgentExecutor return success: false, but ParallelRunner decided
  pass/fail from the grader alone. Installer failures now fail the
  scenario, with an "Installer completed" check and the error.
- For JS frameworks the eval now calls configureInstallEnvironment, the
  same step the installer runs before the integration, so .env.local
  gets the framework's redirect URI key (NEXT_PUBLIC_WORKOS_REDIRECT_URI
  for Next.js) and client-side prefixed copies.
- Each scenario writes its installer log to
  tests/eval-results/installer-logs/ instead of a shared file.

* fix(installer): treat a timed-out build or typecheck as inconclusive

The post-run quick check gave the build 60s, then killed it and sent the
agent a bare "Build failed" with no output. On a busy machine a Next.js
build passes 60s, so agents got a correction they could not act on and
guessed at changes (in evals, switching middleware to the Node runtime).
A check killed at its limit now logs a warning and does not trigger a
correction. Limits are raised to 60s (typecheck) and 180s (build).

* fix(installer): close quoted-flag bypass for read-only git

The read-only git check tested whitespace-split tokens, but the shell
removes quotes and backslashes before git sees them: `git diff
"--output=/tmp/x"` passed and wrote the file, and a quoted --ext-diff
slipped past its ban. Git commands containing quotes or backslashes are
now denied, so the tokens match what runs. Allowed diff/show/log commands
also run with --no-ext-diff --no-textconv, so no configured external diff
or textconv program executes.

* fix(installer): write credentials for Kotlin, PHP, and Laravel installs

With the package.json abort gone, these installs reached the agent with
no credentials in the project: the installer's environment step skips
non-JS apps, and runAgentInstaller skipped its own write when the caller
supplied credentials. Non-JS integrations on this runner now always get
WORKOS_API_KEY, WORKOS_CLIENT_ID, and WORKOS_REDIRECT_URI in .env (not
.env.local; Laravel has a package.json for Vite), and the prompt names
.env and no longer claims a generated cookie password.

* fix(installer): deny read-only git diff/show/log when helpers can't be disabled

The read-only git check reads the command after removing `2>&1`, but the
--no-ext-diff/--no-textconv rewrite matched the original text, so `git
2>&1 diff` was allowed unrewritten. The rewrite also matched the first
"git diff|show|log" anywhere, so `git 2>&1 diff git log` rewrote the
trailing path arguments instead of the real call. The rewrite is now
anchored to the start of the command, and diff/show/log are denied when
it can't apply, with a message saying to put options after the
subcommand.
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