⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
fix(security): enforce authorization and harden outbound requests (#2106)
Tin Severa2d1a82c7b7f
diff --git a/.github/dependabot.yml b/.github/dependabot.ymlindex da1de32a8..4d06a28c3 100644--- a/.github/dependabot.yml+++ b/.github/dependabot.yml@@ -1,10 +1,7 @@version: 2updates:- # Single entry at the workspace root. This repo is a pnpm workspace with one- # root pnpm-lock.yaml, so dependabot must run from "/" to discover every- # workspace package AND regenerate the shared lockfile. Targeting individual- # subdirectories bumps each package.json but leaves the root lockfile stale,- # which breaks `pnpm install --frozen-lockfile` in CI.+ # Keep application updates at the workspace root so Dependabot regenerates+ # the shared lockfile together with package manifests.- package-ecosystem: "npm"directory: "/"schedule:@@ -22,6 +19,41 @@ updates:- "minor"- "patch"+ # BrowserStack has an independent workspace and lockfile. Root overrides+ # and dependency updates do not reach this test runner.+ - package-ecosystem: "npm"+ directory: "/tests/e2e"+ schedule:+ interval: "weekly"+ commit-message:+ prefix: "chore(deps)"+ open-pull-requests-limit: 5+ groups:+ browser-test-minor:+ patterns:+ - "*"+ update-types:+ - "minor"+ - "patch"++ - package-ecosystem: "docker"+ directories:+ - "/"+ - "/apps/api"+ - "/apps/web"+ schedule:+ interval: "weekly"+ commit-message:+ prefix: "fix(deps)"+ groups:+ container-minor:+ group-by: dependency-name+ patterns:+ - "*"+ update-types:+ - "minor"+ - "patch"+- package-ecosystem: "github-actions"directory: "/"schedule:diff --git a/.github/workflows/android.yml b/.github/workflows/android.ymlindex ec8d43702..aabb11235 100644--- a/.github/workflows/android.yml+++ b/.github/workflows/android.yml@@ -36,7 +36,7 @@ jobs:- name: Setup Node.jsuses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1cache: pnpm- name: Install dependenciesdiff --git a/.github/workflows/browserstack.yml b/.github/workflows/browserstack.ymlindex 1e5dd9df1..2b60ac79d 100644--- a/.github/workflows/browserstack.yml+++ b/.github/workflows/browserstack.yml@@ -30,7 +30,7 @@ jobs:persist-credentials: false- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- name: Classify BrowserStack changesid: classify@@ -56,6 +56,10 @@ jobs:- run: pnpm --dir tests/e2e install --frozen-lockfile --ignore-scriptsif: steps.classify.outputs.skip_browserstack != 'true'+ - name: Check browser-test dependency security regressions+ if: steps.classify.outputs.skip_browserstack != 'true'+ run: pnpm --dir tests/e2e test:security+- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4if: steps.classify.outputs.skip_browserstack != 'true'- name: Build this revision of Kaneodiff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 76865967b..58b642407 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -29,7 +29,7 @@ jobs:persist-credentials: false- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- id: classifyname: Classify complete pull request diff@@ -54,10 +54,13 @@ jobs:version: 10.32.1- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- run: pnpm --dir tests/e2e install --frozen-lockfile --ignore-scripts+ - name: Check browser-test dependency security regressions+ run: pnpm --dir tests/e2e test:security+- run: pnpm --dir tests/e2e exec playwright install --with-deps chromium- name: Setup Blacksmith Builder@@ -104,7 +107,7 @@ jobs:persist-credentials: false- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- run: npm ci --ignore-scriptsworking-directory: scripts/ui-review-bot@@ -120,7 +123,7 @@ jobs:persist-credentials: false- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- run: npm ci --ignore-scripts --no-audit --no-fundworking-directory: scripts/slop-labeler@@ -144,7 +147,7 @@ jobs:- name: Setup Node.jsuses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1cache: pnpm- id: install@@ -187,7 +190,7 @@ jobs:- name: Setup Node.jsuses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1cache: pnpm- name: Install dependencies@@ -195,7 +198,7 @@ jobs:- name: Test release security controlsrun: |- docker pull nginx:1.29.5-alpine+ docker pull nginx:1.30.6-alpinenode --test scripts/security/*.test.mjs scripts/ci/*.test.mjs scripts/contribution-eligibility/*.test.mjs- name: Run unit tests@@ -219,7 +222,7 @@ jobs:- name: Setup Node.jsuses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1cache: pnpm- name: Install dependencies@@ -269,7 +272,7 @@ jobs:- name: Setup Node.jsuses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1cache: pnpm- name: Install dependencies@@ -307,7 +310,7 @@ jobs:version: 10.32.1- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1cache: pnpm- run: pnpm install --frozen-lockfile --ignore-scripts --filter @kaneo/api...- run: npm ci --ignore-scripts@@ -400,7 +403,7 @@ jobs:version: 10.32.1- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1cache: pnpm- run: pnpm install --frozen-lockfile- name: Start disposable S3 storage@@ -552,7 +555,7 @@ jobs:persist-credentials: false- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- name: Reject failed, cancelled, and unexpected skipped checksenv:diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.ymlindex 9d1b0f0cf..02b3c51e8 100644--- a/.github/workflows/code-review.yml+++ b/.github/workflows/code-review.yml@@ -32,7 +32,7 @@ jobs:persist-credentials: false- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- id: requestenv:@@ -56,7 +56,7 @@ jobs:persist-credentials: false- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- run: npm --prefix scripts/ui-review-bot ci --ignore-scripts- name: Read PR source and review changed behaviordiff --git a/.github/workflows/contribution-eligibility.yml b/.github/workflows/contribution-eligibility.ymlindex 346d90bb3..895550a75 100644--- a/.github/workflows/contribution-eligibility.yml+++ b/.github/workflows/contribution-eligibility.yml@@ -58,7 +58,7 @@ jobs:- name: Set up Node.jsuses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- name: Check open pull requestsdiff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.ymlindex 726c0003e..92d9a3cf0 100644--- a/.github/workflows/deploy-site.yml+++ b/.github/workflows/deploy-site.yml@@ -34,7 +34,7 @@ jobs:- name: Setup Nodeuses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: "24.19.0"+ node-version: "24.22.1"- name: Setup pnpmuses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0diff --git a/.github/workflows/issue-priority.yml b/.github/workflows/issue-priority.ymlindex 7702d743f..0eb6a4520 100644--- a/.github/workflows/issue-priority.yml+++ b/.github/workflows/issue-priority.yml@@ -22,7 +22,7 @@ jobs:- name: Set up Node.jsuses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v4.4.2with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- name: Rank and label issuediff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.ymlindex a19b89a90..1f290653e 100644--- a/.github/workflows/pr-title.yml+++ b/.github/workflows/pr-title.yml@@ -26,7 +26,7 @@ jobs:version: 10.32.1- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1cache: pnpm- run: pnpm install --frozen-lockfile --ignore-scripts --filter kaneo- name: Validate Conventional Commit titlediff --git a/.github/workflows/publish-mcp.yml b/.github/workflows/publish-mcp.ymlindex 8a45e0db5..fba707bb2 100644--- a/.github/workflows/publish-mcp.yml+++ b/.github/workflows/publish-mcp.yml@@ -52,7 +52,7 @@ jobs:- name: Setup Node.jsuses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1# Publish workflows must not read cache content that a pull# request could have poisoned (zizmor cache-poisoning).package-manager-cache: falsediff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex f399ba795..5f8d9670d 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -58,7 +58,7 @@ jobs:- name: Setup Node.jsuses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1cache: pnpm- name: Install dependencies@@ -110,7 +110,7 @@ jobs:persist-credentials: false- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- name: Wait for successful main CI on this exact commitenv:@@ -172,7 +172,7 @@ jobs:- name: Setup Node.jsuses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1cache: pnpm- name: Install dependenciesdiff --git a/.github/workflows/slop-labeler.yml b/.github/workflows/slop-labeler.ymlindex ba043a6b3..8003c86b8 100644--- a/.github/workflows/slop-labeler.yml+++ b/.github/workflows/slop-labeler.yml@@ -38,7 +38,7 @@ jobs:- name: Set up Node.jsuses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- name: Install trusted scanner dependenciesdiff --git a/.github/workflows/ui-review-run.yml b/.github/workflows/ui-review-run.ymlindex eaa6abfa3..e73d3ad94 100644--- a/.github/workflows/ui-review-run.yml+++ b/.github/workflows/ui-review-run.yml@@ -33,7 +33,7 @@ jobs:persist-credentials: false- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- run: npm --prefix scripts/ui-review-bot ci --ignore-scripts- name: Plan scenarios from PR text (no PR code execution)@@ -66,7 +66,7 @@ jobs:persist-credentials: false- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0with:@@ -101,7 +101,7 @@ jobs:persist-credentials: false- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- run: npm --prefix scripts/ui-review-bot ci --ignore-scripts- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2diff --git a/.github/workflows/ui-review.yml b/.github/workflows/ui-review.ymlindex e6fd19c3f..1b794d997 100644--- a/.github/workflows/ui-review.yml+++ b/.github/workflows/ui-review.yml@@ -39,7 +39,7 @@ jobs:persist-credentials: false- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7with:- node-version: 24.19.0+ node-version: 24.22.1package-manager-cache: false- name: Verify command and current repository permissionsid: requestdiff --git a/Dockerfile.kaneo b/Dockerfile.kaneoindex ba92fc40e..a35088e5f 100644--- a/Dockerfile.kaneo+++ b/Dockerfile.kaneo@@ -1,4 +1,4 @@-FROM --platform=$BUILDPLATFORM node:24.19.0-alpine AS api-builder+FROM --platform=$BUILDPLATFORM node:24.22.1-alpine AS api-builderRUN apk add --no-cache python3 make g++ && \corepack enable && \@@ -7,6 +7,7 @@ RUN apk add --no-cache python3 make g++ && \WORKDIR /appCOPY pnpm-workspace.yaml package.json pnpm-lock.yaml vite.config.ts ./+COPY patches ./patchesCOPY packages/typescript-config/package.json ./packages/typescript-config/COPY packages/email/package.json ./packages/email/COPY packages/libs/package.json ./packages/libs/@@ -41,11 +42,12 @@ RUN pnpm run build# Assembles the production node_modules on the BUILD platform (native, no QEMU emulation).# All API runtime deps are pure JavaScript (bcrypt was replaced with bcryptjs), so this# node_modules is architecture-independent and is copied into the runtime stage below.-FROM --platform=$BUILDPLATFORM node:24.19.0-alpine AS api-runtime+FROM --platform=$BUILDPLATFORM node:24.22.1-alpine AS api-runtimeWORKDIR /appCOPY --from=api-builder /app/package.json /app/pnpm-lock.yaml /app/pnpm-workspace.yaml ./+COPY --from=api-builder /app/patches ./patchesCOPY --from=api-builder /app/apps/api/package.json ./apps/api/COPY --from=api-builder /app/packages/typescript-config/package.json ./packages/typescript-config/COPY --from=api-builder /app/packages/libs/package.json ./packages/libs/@@ -66,7 +68,7 @@ COPY --from=api-builder /app/packages/permissions ./packages/permissionsCOPY --from=api-builder /app/packages/importers/dist ./packages/importers/distCOPY --from=api-builder /app/packages/mcp/dist ./packages/mcp/dist-FROM --platform=$BUILDPLATFORM node:24.19.0-alpine AS web-builder+FROM --platform=$BUILDPLATFORM node:24.22.1-alpine AS web-builderRUN apk add --no-cache python3 make g++ && \corepack enable && \@@ -75,6 +77,7 @@ RUN apk add --no-cache python3 make g++ && \WORKDIR /appCOPY pnpm-workspace.yaml pnpm-lock.yaml package.json vite.config.ts ./+COPY patches ./patchesCOPY apps/web/package.json ./apps/web/COPY packages/typescript-config/package.json ./packages/typescript-config/COPY packages/libs/package.json ./packages/libs/@@ -92,9 +95,10 @@ RUN pnpm run buildWORKDIR /app/apps/webRUN pnpm run build && find dist -type f -name '*.map' -delete-FROM node:24.19.0-alpine AS runtime+FROM node:24.22.1-alpine AS runtime-RUN apk add --no-cache nginx=~1.30.4 && \+# Alpine replaces older package patches, so accept later security fixes too.+RUN apk add --no-cache 'nginx>=1.30.6' && \addgroup -g 1001 appuser && \adduser -u 1001 -G appuser -D appuser && \mkdir -p /app /app/apps/api/data /var/lib/kaneo /docker-entrypoint.d && \diff --git a/apps/api/Dockerfile b/apps/api/Dockerfileindex afdcf3b33..35705fff8 100644--- a/apps/api/Dockerfile+++ b/apps/api/Dockerfile@@ -1,5 +1,5 @@# Build stage-FROM --platform=$BUILDPLATFORM node:24.19.0-alpine AS builder+FROM --platform=$BUILDPLATFORM node:24.22.1-alpine AS builder# Install build dependencies in a single layerRUN apk add --no-cache python3 make g++ && \@@ -10,6 +10,7 @@ WORKDIR /app# Copy only package files first for better cachingCOPY pnpm-workspace.yaml package.json pnpm-lock.yaml vite.config.ts ./+COPY patches ./patchesCOPY packages/typescript-config/package.json ./packages/typescript-config/COPY packages/email/package.json ./packages/email/COPY packages/libs/package.json ./packages/libs/@@ -51,13 +52,14 @@ RUN sed -i 's/"extends": "@kaneo\/typescript-config\/base.json"/"extends": "..\/# Production dependencies stage - runs on the BUILD platform (native, no QEMU emulation).# All API runtime deps are pure JavaScript (bcrypt was replaced with bcryptjs), so the# resulting node_modules is architecture-independent and safe to copy into the arm64 runtime.-FROM --platform=$BUILDPLATFORM node:24.19.0-alpine AS prod-deps+FROM --platform=$BUILDPLATFORM node:24.22.1-alpine AS prod-depsRUN corepack enable && corepack prepare [email protected] --activateWORKDIR /appCOPY pnpm-workspace.yaml package.json pnpm-lock.yaml vite.config.ts ./+COPY patches ./patchesCOPY packages/typescript-config/package.json ./packages/typescript-config/COPY packages/libs/package.json ./packages/libs/COPY packages/email/package.json ./packages/email/@@ -70,7 +72,7 @@ RUN sed -i 's/"prepare": "husky"/"prepare": ""/g' package.json && \HUSKY=0 NODE_ENV=production pnpm install --prod --frozen-lockfile --no-optional# Production stage - use specific version tag without SHA256-FROM node:24.19.0-alpine AS runtime+FROM node:24.22.1-alpine AS runtime# Set up user in a single layerRUN addgroup -g 1001 appuser && \diff --git a/apps/api/package.json b/apps/api/package.jsonindex 9fd17ee5c..0a059a5a3 100644--- a/apps/api/package.json+++ b/apps/api/package.json@@ -37,7 +37,7 @@"@kaneo/importers": "workspace:*","@kaneo/mcp": "workspace:*","@kaneo/permissions": "workspace:*",- "@modelcontextprotocol/sdk": "1.32.0",+ "@modelcontextprotocol/sdk": "1.32.2","@modelcontextprotocol/server": "2.3.0","@octokit/webhooks": "^14.2.0","@oslojs/crypto": "^1.0.1",@@ -51,13 +51,13 @@"croner": "^10.0.1","drizzle-kit": "^0.31.11","drizzle-orm": "^0.45.3",- "hono": "^4.13.12",+ "hono": "^4.13.14","ioredis": "^6.0.0","octokit": "^5.0.5","pg": "^8.23.1","undici": "^7.30.1","valibot": "^1.5.0",- "zod": "^4.6.5"+ "zod": "^4.6.7"},"devDependencies": {"@types/node": "^26.6.2",diff --git a/apps/api/src/activity/index.ts b/apps/api/src/activity/index.tsindex d36c27083..d3066df9d 100644--- a/apps/api/src/activity/index.ts+++ b/apps/api/src/activity/index.ts@@ -60,11 +60,14 @@ const getActivitiesRoute = createRoute({summary: "Get task activity",description:"Get a task's activity feed, newest first: comments alongside system events such as status and assignee changes. Set limit to request a bounded preview; omit it for the full feed.",- middleware: [workspaceAccess.fromTaskId()] as const,+ middleware: [+ workspaceAccess.fromTaskId(),+ requireWorkspacePermission({ task: ["read"] }),+ ] as const,request: { params: taskIdParam, query: activitiesQuery },responses: {200: jsonResponse("List of activities for the task", activityListSchema),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Task not found"),},});@@ -134,7 +137,10 @@ const updateCommentRoute = createRoute({tags: ["Activity"],summary: "Update comment",description: "Edit a comment. Only the comment's author may do this.",- middleware: [workspaceAccess.fromActivity("activityId")] as const,+ middleware: [+ workspaceAccess.fromActivity("activityId"),+ requireWorkspacePermission({ task: ["update"] }),+ ] as const,request: {body: {required: true,@@ -144,7 +150,9 @@ const updateCommentRoute = createRoute({responses: {200: jsonResponse("The updated comment", activitySchema),400: errorResponse("Invalid body"),- 403: errorResponse("Not the author, or no access to the project"),+ 403: errorResponse(+ "Not the author, no access to the project, or missing task:update permission",+ ),404: errorResponse("Activity or comment not found"),},});@@ -156,7 +164,10 @@ const deleteCommentRoute = createRoute({tags: ["Activity"],summary: "Delete comment",description: "Delete a comment. Only the comment's author may do this.",- middleware: [workspaceAccess.fromActivity("activityId")] as const,+ middleware: [+ workspaceAccess.fromActivity("activityId"),+ requireWorkspacePermission({ task: ["update"] }),+ ] as const,request: {body: {required: true,@@ -166,7 +177,9 @@ const deleteCommentRoute = createRoute({responses: {200: jsonResponse("The deleted comment", activitySchema),400: errorResponse("Invalid body"),- 403: errorResponse("Not the author, or no access to the project"),+ 403: errorResponse(+ "Not the author, no access to the project, or missing task:update permission",+ ),404: errorResponse("Activity or comment not found"),},});diff --git a/apps/api/src/auth.ts b/apps/api/src/auth.tsindex 0061ec5c9..78f23fc4f 100644--- a/apps/api/src/auth.ts+++ b/apps/api/src/auth.ts@@ -43,6 +43,7 @@ import {} from "./billing/controllers/find-billable-workspaces";import db, { schema } from "./database";import { authDatabaseAdapter } from "./database/auth-adapter";+import { lockedSessionRevocation } from "./utils/locked-session-revocation";import { publishEvent } from "./events";import { applyInvitationProjectAccess } from "./project-access/apply-invitation-project-access";import { resolveInvitationProjectAccess } from "./project-access/resolve-invitation-project-access";@@ -53,6 +54,17 @@ import { handleMemberAdded } from "./workspace-members/handle-member-added";import { handleMemberRemoved } from "./workspace-members/handle-member-removed";import { handleOwnerPromoted } from "./workspace-members/handle-owner-promoted";import { hideInaccessibleInvitationProjects } from "./project-access/hide-inaccessible-invitation-projects";+import { hideInvitationsFromNonInviters } from "./utils/hide-invitations-from-non-inviters";+import { assertOwnerInvitationResendAllowed } from "./utils/assert-owner-invitation-resend-allowed";+import {+ assertNativeAuthApiKeyAllowed,+ nativeAuthApiKey,+} from "./utils/native-auth-api-key";+import {+ assertNativeOrganizationReadAllowed,+ readableNativeOrganizations,+} from "./utils/native-organization-read-access";+import { satisfies } from "./utils/role-permissions";import clearEmailVerificationOnAdminChange from "./user/controllers/clear-email-verification-on-admin-change";import deleteAccountData from "./user/controllers/delete-account-data";import prepareAdminUserRemoval from "./user/controllers/prepare-admin-user-removal";@@ -340,6 +352,7 @@ export const auth = betterAuth({},},plugins: [+ lockedSessionRevocation,...(process.env.DISABLE_GUEST_ACCESS !== "true"? [anonymous({@@ -783,12 +796,43 @@ export const auth = betterAuth({},},hooks: {- before: createAuthMiddleware(async (ctx) => {+ before: createAuthMiddleware(async (ctx): Promise<void> => {+ // Runs before provider hooks can turn a key into its owner's session.+ await assertNativeAuthApiKeyAllowed(ctx);+ let organizationViewer: {+ user: { id: string };+ session: {+ id?: string;+ activeOrganizationId?: unknown;+ activeTeamId?: unknown;+ };+ } | null = null;+ if (ctx.path.startsWith("/organization/")) {+ const key = nativeAuthApiKey(ctx);+ // Resolve real bearer sessions through the provider's bearer hook as+ // well as cookies. The nested /get-session call does not enter here.+ organizationViewer = key+ ? { user: { id: key.userId }, session: {} }+ : await auth.api.getSession({ headers: new Headers(ctx.headers) });+ await assertNativeOrganizationReadAllowed(ctx, organizationViewer);+ }if (ctx.path === "/admin/remove-user") {await prepareAdminUserRemoval(ctx);}if (ctx.path === "/organization/invite-member") {+ if (ctx.body?.resend === true && typeof ctx.body.email === "string") {+ const viewer = organizationViewer;+ const workspaceId =+ ctx.body.organizationId || viewer?.session.activeOrganizationId;+ if (viewer && typeof workspaceId === "string") {+ await assertOwnerInvitationResendAllowed(+ viewer.user.id,+ workspaceId,+ ctx.body.email,+ );+ }+ }// Better Auth swallows email failures in runInBackgroundOrAwait.// Invitation callers need the delivery result, including on resend.ctx.context.runInBackgroundOrAwait = async (promise) => {@@ -929,20 +973,81 @@ export const auth = betterAuth({}}),after: createAuthMiddleware(async (ctx) => {+ if (+ (ctx.path === "/organization/list" ||+ ctx.path === "/organization/list-user-teams") &&+ Array.isArray(ctx.context.returned)+ ) {+ const viewer = await getSessionFromCtx(ctx);+ if (viewer) {+ const organizations = ctx.context.returned as {+ id: string;+ organizationId?: string;+ }[];+ const visible = await readableNativeOrganizations(+ viewer.user.id,+ organizations.map(+ (workspace) => workspace.organizationId ?? workspace.id,+ ),+ );+ organizations.splice(+ 0,+ organizations.length,+ ...organizations.filter((workspace) =>+ visible.has(workspace.organizationId ?? workspace.id),+ ),+ );+ }+ }if (ctx.path === "/organization/list-invitations" ||- ctx.path === "/organization/get-full-organization"+ ctx.path === "/organization/get-full-organization" ||+ ctx.path === "/organization/invite-member") {+ const single = ctx.path === "/organization/invite-member";const viewer = await getSessionFromCtx(ctx);const returned = ctx.context.returned as| { invitations?: unknown }| unknown[]| null;- if (viewer)- await hideInaccessibleInvitationProjects(- viewer.user.id,- Array.isArray(returned) ? returned : returned?.invitations,- );+ const created = returned as {+ id?: unknown;+ organizationId?: unknown;+ role?: unknown;+ } | null;+ const invitations = single+ ? typeof created?.id === "string" &&+ typeof created.organizationId === "string" &&+ typeof created.role === "string"+ ? [created]+ : undefined+ : Array.isArray(returned)+ ? returned+ : returned?.invitations;+ if (viewer) {+ const scope = nativeAuthApiKey(ctx)?.permissions;+ if (+ scope &&+ !satisfies(scope, { invitation: ["create"] }) &&+ Array.isArray(invitations)+ ) {+ invitations.splice(0, invitations.length);+ }+ await hideInvitationsFromNonInviters(viewer.user, invitations);+ // Resending returns the existing invitation's role, which may+ // differ from the role Better Auth authorized in the request.+ if (+ single &&+ Array.isArray(invitations) &&+ invitations.length === 0+ ) {+ throw new APIError("FORBIDDEN", {+ code: "YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE",+ message: "You are not allowed to invite a user with this role",+ });+ }+ await hideInaccessibleInvitationProjects(viewer.user.id, invitations);+ }}if (ctx.path === "/organization/leave") {diff --git a/apps/api/src/column/index.ts b/apps/api/src/column/index.tsindex 1da9fa88a..79b10ced9 100644--- a/apps/api/src/column/index.ts+++ b/apps/api/src/column/index.ts@@ -27,11 +27,14 @@ const getColumnsRoute = createRoute({tags: ["Columns"],summary: "Get columns",description: "Get a project's board columns, ordered by position.",- middleware: [workspaceAccess.fromProject("projectId")] as const,+ middleware: [+ workspaceAccess.fromProject("projectId"),+ requireWorkspacePermission({ project: ["read"] }),+ ] as const,request: { params: projectIdParam },responses: {200: jsonResponse("List of columns ordered by position", columnListSchema),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Project not found"),},});diff --git a/apps/api/src/comment/index.ts b/apps/api/src/comment/index.tsindex eac6a0208..17de694b0 100644--- a/apps/api/src/comment/index.ts+++ b/apps/api/src/comment/index.ts@@ -31,11 +31,14 @@ const getTaskCommentsRoute = createRoute({summary: "Get task comments",description:"Get every comment on a task, oldest first, each with its author's name and avatar.",- middleware: [workspaceAccess.fromTaskId()] as const,+ middleware: [+ workspaceAccess.fromTaskId(),+ requireWorkspacePermission({ task: ["read"] }),+ ] as const,request: { params: taskIdParam },responses: {200: jsonResponse("List of comments for the task", commentListSchema),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Task not found"),},});diff --git a/apps/api/src/database/auth-adapter.ts b/apps/api/src/database/auth-adapter.tsindex 1be25d551..fb6da7345 100644--- a/apps/api/src/database/auth-adapter.ts+++ b/apps/api/src/database/auth-adapter.ts@@ -1,3 +1,4 @@+import { AsyncLocalStorage } from "node:async_hooks";import type { BetterAuthOptions } from "better-auth";import type { DBAdapter } from "better-auth/adapters";import {@@ -5,18 +6,141 @@ import {drizzleAdapter,} from "better-auth/adapters/drizzle";import { APIError } from "better-auth/api";-import { count, sql } from "drizzle-orm";+import { asc, count, eq, inArray, sql } from "drizzle-orm";import {hasInstanceAdminRole,instanceAdminRoleSql,} from "../utils/instance-admin-role";import db, { schema } from ".";+type OtherSessionRevocationAdapter = DBAdapter & {+ revokeOtherUserSessions(+ userId: string,+ currentToken: string,+ remove: (tokens: string[]) => Promise<void>,+ ): Promise<void>;+};++function supportsOtherSessionRevocation(+ adapter: DBAdapter,+): adapter is OtherSessionRevocationAdapter {+ return (+ "revokeOtherUserSessions" in adapter &&+ typeof adapter.revokeOtherUserSessions === "function"+ );+}++export async function revokeOtherUserSessions(+ adapter: DBAdapter,+ userId: string,+ currentToken: string,+ remove: (tokens: string[]) => Promise<void>,+) {+ if (!supportsOtherSessionRevocation(adapter)) {+ throw new Error("Session revocation requires the locking auth adapter");+ }+ await adapter.revokeOtherUserSessions(userId, currentToken, remove);+}+export function authDatabaseAdapter(config: DrizzleAdapterConfig) {- return (options: BetterAuthOptions): DBAdapter => {+ return (options: BetterAuthOptions): OtherSessionRevocationAdapter => {const adapter = drizzleAdapter(db, config)(options);+ const otherSessionRevocation = new AsyncLocalStorage<{+ adapter: DBAdapter;+ where: Parameters<DBAdapter["deleteMany"]>[0]["where"];+ }>();+ async function deleteSessions<T>(+ data: Parameters<DBAdapter["delete"]>[0],+ remove: (transactionAdapter: DBAdapter) => Promise<T>,+ ): Promise<T> {+ return db.transaction(async (tx) => {+ const transactionAdapter = drizzleAdapter(tx, config)(options);+ const sessions = await transactionAdapter.findMany<{ userId: string }>({+ model: "session",+ where: data.where,+ select: ["userId"],+ // The adapter otherwise defaults to 100 rows. Every affected user+ // must participate in the lock, including bulk session revocations.+ limit: Number.MAX_SAFE_INTEGER,+ });+ const userIds = [...new Set(sessions.map((session) => session.userId))];+ if (userIds.length) {+ // MCP redemption takes the same user-before-session lock order.+ // Run DELETE after this lock: a DELETE started before waiting could+ // miss a newly redeemed session in its statement snapshot.+ await tx+ .select({ id: schema.userTable.id })+ .from(schema.userTable)+ .where(inArray(schema.userTable.id, userIds))+ .orderBy(asc(schema.userTable.id))+ .for("update");+ }+ return remove(transactionAdapter);+ });+ }return {...adapter,+ async revokeOtherUserSessions(userId, currentToken, remove) {+ await db.transaction(async (tx) => {+ // Lock even when no other session existed before waiting. MCP code+ // redemption takes this user lock before validating its approver.+ await tx+ .select({ id: schema.userTable.id })+ .from(schema.userTable)+ .where(eq(schema.userTable.id, userId))+ .for("update");+ const transactionAdapter = drizzleAdapter(tx, config)(options);+ const where: Parameters<DBAdapter["deleteMany"]>[0]["where"] = [+ { field: "userId", value: userId },+ { field: "token", value: currentToken, operator: "ne" },+ ];+ const sessions = await transactionAdapter.findMany<{ token: string }>(+ {+ model: "session",+ where,+ select: ["token"],+ limit: Number.MAX_SAFE_INTEGER,+ },+ );+ const scope = { adapter: transactionAdapter, where };+ await otherSessionRevocation.run(scope, async () => {+ // Keep the provider's deletion hooks and secondary-cache cleanup.+ // The token list is only for those effects, never the bulk predicate.+ if (sessions.length) {+ await remove(sessions.map((session) => session.token));+ } else {+ await transactionAdapter.deleteMany({ model: "session", where });+ }+ });+ });+ },+ async findMany<T>(data: Parameters<DBAdapter["findMany"]>[0]) {+ const scope = otherSessionRevocation.getStore();+ if (data.model !== "session" || !scope)+ return adapter.findMany<T>(data);+ return scope.adapter.findMany<T>({+ ...data,+ limit: Number.MAX_SAFE_INTEGER,+ });+ },+ async delete<T>(data: Parameters<DBAdapter["delete"]>[0]) {+ if (data.model !== "session") return adapter.delete<T>(data);+ const scope = otherSessionRevocation.getStore();+ if (scope) return scope.adapter.delete<T>(data);+ return deleteSessions(data, (transactionAdapter) =>+ transactionAdapter.delete<T>(data),+ );+ },+ async deleteMany(data: Parameters<DBAdapter["deleteMany"]>[0]) {+ if (data.model !== "session") return adapter.deleteMany(data);+ const scope = otherSessionRevocation.getStore();+ if (scope) {+ return scope.adapter.deleteMany({ ...data, where: scope.where });+ }+ return deleteSessions(data, (transactionAdapter) =>+ transactionAdapter.deleteMany(data),+ );+ },async update<T>(data: Parameters<DBAdapter["update"]>[0]) {if (data.model !== "user" ||diff --git a/apps/api/src/discord-integration/index.ts b/apps/api/src/discord-integration/index.tsindex b13a11401..7f640f4a3 100644--- a/apps/api/src/discord-integration/index.ts+++ b/apps/api/src/discord-integration/index.ts@@ -92,14 +92,19 @@ const getDiscordIntegrationRoute = createRoute({summary: "Get Discord integration",description:"Get the Discord integration for a project, or null when none is configured.",- middleware: [workspaceAccess.fromProject("projectId")] as const,+ middleware: [+ workspaceAccess.fromProject("projectId"),+ requireWorkspacePermission({ project: ["read"] }),+ ] as const,request: { params: projectIdParam },responses: {200: jsonResponse("Discord integration details, or null",discordIntegrationSchema.nullable(),),- 403: errorResponse("No access to the project"),+ 403: errorResponse(+ "No access to the project, or missing project:read permission",+ ),404: errorResponse("Project not found"),},});diff --git a/apps/api/src/external-link/index.ts b/apps/api/src/external-link/index.tsindex 41791f78f..5b211f053 100644--- a/apps/api/src/external-link/index.ts+++ b/apps/api/src/external-link/index.ts@@ -87,11 +87,14 @@ const getExternalLinksByTaskRoute = createRoute({summary: "Get task external links",description:"Get manually added resource links and links from connected integrations, such as GitHub or Gitea issues.",- middleware: [workspaceAccess.fromTaskId("taskId")] as const,+ middleware: [+ workspaceAccess.fromTaskId("taskId"),+ requireWorkspacePermission({ task: ["read"] }),+ ] as const,request: { params: taskIdParam },responses: {200: jsonResponse("External links for the task", externalLinkListSchema),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Task not found"),},});diff --git a/apps/api/src/generic-webhook-integration/index.ts b/apps/api/src/generic-webhook-integration/index.tsindex 3fb54340c..8273f5d68 100644--- a/apps/api/src/generic-webhook-integration/index.ts+++ b/apps/api/src/generic-webhook-integration/index.ts@@ -85,14 +85,19 @@ const getGenericWebhookIntegrationRoute = createRoute({summary: "Get webhook integration",description:"Get the outgoing webhook integration for a project, or null when none is configured.",- middleware: [workspaceAccess.fromProject("projectId")] as const,+ middleware: [+ workspaceAccess.fromProject("projectId"),+ requireWorkspacePermission({ project: ["read"] }),+ ] as const,request: { params: projectIdParam },responses: {200: jsonResponse("Webhook integration details, or null",genericWebhookIntegrationSchema.nullable(),),- 403: errorResponse("No access to the project"),+ 403: errorResponse(+ "No access to the project, or missing project:read permission",+ ),404: errorResponse("Project not found"),},});diff --git a/apps/api/src/gitea-integration/index.ts b/apps/api/src/gitea-integration/index.tsindex 4b2de6dae..44e079e9d 100644--- a/apps/api/src/gitea-integration/index.ts+++ b/apps/api/src/gitea-integration/index.ts@@ -106,14 +106,19 @@ const getIntegrationRoute = createRoute({summary: "Get Gitea integration",description:"Get the Gitea integration for a project, or null when none is configured. The webhook secret is included only for callers with workspace:manage_settings.",- middleware: [workspaceAccess.fromProject("projectId")] as const,+ middleware: [+ workspaceAccess.fromProject("projectId"),+ requireWorkspacePermission({ project: ["read"] }),+ ] as const,request: { params: projectIdParam },responses: {200: jsonResponse("Gitea integration details, or null",giteaIntegrationSchema.nullable(),),- 403: errorResponse("No access to the project"),+ 403: errorResponse(+ "No access to the project, or missing project:read permission",+ ),404: errorResponse("Project not found"),},});diff --git a/apps/api/src/github-integration/index.ts b/apps/api/src/github-integration/index.tsindex 7068879f5..8c9c215b3 100644--- a/apps/api/src/github-integration/index.ts+++ b/apps/api/src/github-integration/index.ts@@ -123,14 +123,19 @@ const getIntegrationRoute = createRoute({summary: "Get GitHub integration",description:"Get the GitHub integration for a project, or null when none is configured.",- middleware: [workspaceAccess.fromProject("projectId")] as const,+ middleware: [+ workspaceAccess.fromProject("projectId"),+ requireWorkspacePermission({ project: ["read"] }),+ ] as const,request: { params: projectIdParam },responses: {200: jsonResponse("GitHub integration details, or null",githubIntegrationSchema.nullable(),),- 403: errorResponse("No access to the project"),+ 403: errorResponse(+ "No access to the project, or missing project:read permission",+ ),404: errorResponse("Project not found"),},});diff --git a/apps/api/src/gitlab-integration/index.ts b/apps/api/src/gitlab-integration/index.tsindex d55c2898b..204d522fe 100644--- a/apps/api/src/gitlab-integration/index.ts+++ b/apps/api/src/gitlab-integration/index.ts@@ -111,14 +111,19 @@ const getIntegrationRoute = createRoute({summary: "Get GitLab integration",description:"Get the GitLab integration for a project, or null when none is configured. The masked access token and the webhook secret are included only for callers with workspace:manage_settings.",- middleware: [workspaceAccess.fromProject("projectId")] as const,+ middleware: [+ workspaceAccess.fromProject("projectId"),+ requireWorkspacePermission({ project: ["read"] }),+ ] as const,request: { params: projectIdParam },responses: {200: jsonResponse("GitLab integration details, or null",gitlabIntegrationSchema.nullable(),),- 403: errorResponse("No access to the project"),+ 403: errorResponse(+ "No access to the project, or missing project:read permission",+ ),404: errorResponse("Project not found"),},});diff --git a/apps/api/src/index.ts b/apps/api/src/index.tsindex 3e9af3bca..eb668c6bf 100644--- a/apps/api/src/index.ts+++ b/apps/api/src/index.ts@@ -19,6 +19,7 @@ import { HTTPException } from "hono/http-exception";import activity from "./activity";import admin from "./admin";import { auth } from "./auth";+import { forwardAuthRequest } from "./utils/forward-auth-request";import { organizationRoutes } from "./auth-openapi";import billing from "./billing";import calendarFeed, { publicCalendarFeed } from "./calendar-feed";@@ -29,10 +30,7 @@ import customField from "./custom-field";import db, { getDatabase, schema } from "./database";import { apiErrorSchema } from "./errors/api-error-schema";import { httpExceptionResponse } from "./errors/http-exception-response";-import {- notFoundResponse,- withJsonNotFound,-} from "./errors/not-found-response";+import { notFoundResponse } from "./errors/not-found-response";import { withJsonRateLimit } from "./errors/rate-limit-response";import {validationHook,@@ -101,6 +99,8 @@ import { normalizeApiServerUrl } from "./utils/openapi-spec";import { seedDefaultWorkspaceRoles } from "./utils/seed-default-workspace-roles";import { drainSignInEmails } from "./utils/sign-in-email-tasks";import { validateWorkspaceAccess } from "./utils/validate-workspace-access";+import { requireWorkspacePermission } from "./utils/require-workspace-permission";+import { PROJECT_READ_PERMISSIONS } from "./ws/project-read-permissions";import { apiKeyResponseHeaders } from "./utils/rate-limit-headers";import { readApiKeyCheck, verifyApiKey } from "./utils/verify-api-key";import workflowRule from "./workflow-rule";@@ -143,6 +143,7 @@ type ApiVariables = {userEmail: string;apiKey?: ApiKey;apiKeyHeaders?: Record<string, string>;+ workspaceId?: string;};};@@ -483,7 +484,7 @@ export function createApp() {429: apiKeyRateLimited.ref,},}),- async (c) => withJsonRateLimit(await auth.handler(c.req.raw)),+ forwardAuthRequest,);api.openapi(@@ -746,51 +747,11 @@ export function createApp() {},);- api.on(["POST", "GET", "PUT", "PATCH", "DELETE"], "/auth/*", async (c) => {- const authHeader = c.req.header("Authorization");- const apiKeyHeader = c.req.header("x-api-key")?.trim();- const bearerToken = authHeader?.match(/^Bearer\s+(\S+)$/i)?.[1];-- if (bearerToken && !apiKeyHeader) {- const headers = new Headers(c.req.raw.headers);- headers.delete("cookie");- const session = await auth.api.getSession({ headers });-- // Preserve Better Auth bearer session tokens on auth routes.- if (session?.session && session.user) {- return withJsonRateLimit(- await withJsonNotFound(- await auth.handler(new Request(c.req.raw, { headers })),- ),- );- }-- const apiKeyResult = await verifyApiKey(bearerToken, { consume: false });- if (apiKeyResult?.status !== "valid") throw apiKeyRejection(apiKeyResult);-- // Better Auth API key plugin validates from x-api-key by default.- headers.set("x-api-key", bearerToken);-- const response = await withJsonRateLimit(- await withJsonNotFound(- await auth.handler(new Request(c.req.raw, { headers })),- ),- );- c.set(- "apiKeyHeaders",- await apiKeyResponseHeaders(- await readApiKeyCheck(bearerToken),- response,- new Date(),- ),- );- return response;- }-- return withJsonRateLimit(- await withJsonNotFound(await auth.handler(c.req.raw)),- );- });+ api.on(+ ["POST", "GET", "PUT", "PATCH", "DELETE"],+ "/auth/*",+ forwardAuthRequest,+ );api.route("/", mcpRoutes);@@ -939,6 +900,11 @@ export function createApp() {});await assertProjectAccess(userId, projectId);workspaceId = project.workspaceId;+ c.set("workspaceId", workspaceId);+ await requireWorkspacePermission(PROJECT_READ_PERMISSIONS)(+ c,+ async () => {},+ );}const windowId = c.req.query("windowId");@@ -954,6 +920,7 @@ export function createApp() {userId,initiatorId,workspaceId,+ c.get("apiKey")?.id,);}},diff --git a/apps/api/src/label/index.ts b/apps/api/src/label/index.tsindex 4a7bf175a..207ffd4b7 100644--- a/apps/api/src/label/index.ts+++ b/apps/api/src/label/index.ts@@ -35,11 +35,14 @@ const getTaskLabelsRoute = createRoute({tags: ["Labels"],summary: "Get task labels",description: "Get all labels assigned to a specific task",- middleware: [workspaceAccess.fromTaskId()] as const,+ middleware: [+ workspaceAccess.fromTaskId(),+ requireWorkspacePermission({ label: ["read"] }),+ ] as const,request: { params: taskIdParam },responses: {200: jsonResponse("List of labels for the task", labelListSchema),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Task not found"),},});@@ -51,10 +54,14 @@ const getWorkspaceLabelsRoute = createRoute({tags: ["Labels"],summary: "Get workspace labels",description: "Get all labels for a specific workspace",- middleware: [workspaceAccess.fromParam()] as const,+ middleware: [+ workspaceAccess.fromParam(),+ requireWorkspacePermission({ label: ["read"] }),+ ] as const,request: { params: workspaceIdParam },responses: {200: jsonResponse("List of labels in the workspace", labelListSchema),+ 403: errorResponse("Missing read permission"),404: errorResponse("Workspace not found"),},});@@ -92,11 +99,14 @@ const getLabelRoute = createRoute({tags: ["Labels"],summary: "Get label",description: "Get a specific label by ID",- middleware: [workspaceAccess.fromLabel()] as const,+ middleware: [+ workspaceAccess.fromLabel(),+ requireWorkspacePermission({ label: ["read"] }),+ ] as const,request: { params: labelParam },responses: {200: jsonResponse("Label details", labelSchema),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Label not found"),},});diff --git a/apps/api/src/mattermost-integration/index.ts b/apps/api/src/mattermost-integration/index.tsindex 11bed4ba5..d1a3ef5b0 100644--- a/apps/api/src/mattermost-integration/index.ts+++ b/apps/api/src/mattermost-integration/index.ts@@ -90,14 +90,19 @@ const getMattermostIntegrationRoute = createRoute({summary: "Get Mattermost integration",description:"Get the Mattermost integration for a project, or null when none is configured.",- middleware: [workspaceAccess.fromProject("projectId")] as const,+ middleware: [+ workspaceAccess.fromProject("projectId"),+ requireWorkspacePermission({ project: ["read"] }),+ ] as const,request: { params: projectIdParam },responses: {200: jsonResponse("Mattermost integration details, or null",mattermostIntegrationSchema.nullable(),),- 403: errorResponse("No access to the project"),+ 403: errorResponse(+ "No access to the project, or missing project:read permission",+ ),404: errorResponse("Project not found"),},});diff --git a/apps/api/src/mcp/controllers/oauth-consent.ts b/apps/api/src/mcp/controllers/oauth-consent.tsindex 1f08b48ac..293a0669a 100644--- a/apps/api/src/mcp/controllers/oauth-consent.ts+++ b/apps/api/src/mcp/controllers/oauth-consent.ts@@ -135,6 +135,7 @@ export async function decideMcpAuthorizationRequest(params: {{clientId: request.clientId,userId: session.user.id,+ sessionId: session.session.id,codeChallenge: request.codeChallenge,redirectUri: request.redirectUri,},diff --git a/apps/api/src/mcp/oauth.ts b/apps/api/src/mcp/oauth.tsindex b5f36c4d5..6c92451ab 100644--- a/apps/api/src/mcp/oauth.ts+++ b/apps/api/src/mcp/oauth.ts@@ -1,7 +1,9 @@import { createHash, randomUUID } from "node:crypto";import { createId } from "@paralleldrive/cuid2";+import { and, eq, gt } from "drizzle-orm";import db from "../database";-import { sessionTable } from "../database/schema";+import { sessionTable, userTable } from "../database/schema";+import { notBannedCondition } from "../utils/user-ban";import { consumeState, getState, putState } from "./oauth-store";type RegisteredClient = {@@ -14,6 +16,7 @@ type RegisteredClient = {type AuthCode = {clientId: string;userId: string;+ sessionId: string;codeChallenge: string;redirectUri: string;};@@ -118,17 +121,43 @@ export async function exchangeCode(if (stored.redirectUri !== redirectUri) return null;if (!verifyPkce(codeVerifier, stored.codeChallenge)) return null;- const sessionToken = randomUUID();- const expiresIn = 30 * 24 * 60 * 60;-- await db.insert(sessionTable).values({- id: createId(),- token: sessionToken,- userId: stored.userId,- expiresAt: new Date(Date.now() + expiresIn * 1000),- createdAt: new Date(),- updatedAt: new Date(),+ // Session insertion bypasses Better Auth's hooks. Revoking the approving+ // session must also retire its outstanding authorization codes.+ if (!stored.sessionId) return null;+ return db.transaction(async (tx) => {+ // Session deletions in the auth adapter lock this user before their+ // DELETE statement, so revocation cannot miss this transaction's insert.+ const [user] = await tx+ .select({ id: userTable.id })+ .from(userTable)+ .where(and(eq(userTable.id, stored.userId), notBannedCondition()))+ .limit(1)+ .for("update");+ if (!user) return null;+ const [approver] = await tx+ .select({ id: sessionTable.id, expiresAt: sessionTable.expiresAt })+ .from(sessionTable)+ .where(+ and(+ eq(sessionTable.id, stored.sessionId),+ eq(sessionTable.userId, stored.userId),+ gt(sessionTable.expiresAt, new Date()),+ ),+ )+ .limit(1)+ .for("update");+ if (!approver || approver.expiresAt <= new Date()) return null;++ const sessionToken = randomUUID();+ const expiresIn = 30 * 24 * 60 * 60;+ await tx.insert(sessionTable).values({+ id: createId(),+ token: sessionToken,+ userId: stored.userId,+ expiresAt: new Date(Date.now() + expiresIn * 1000),+ createdAt: new Date(),+ updatedAt: new Date(),+ });+ return { accessToken: sessionToken, expiresIn };});-- return { accessToken: sessionToken, expiresIn };}diff --git a/apps/api/src/notification/controllers/clear-notifications.ts b/apps/api/src/notification/controllers/clear-notifications.tsindex 1e7c853e5..a1f828b15 100644--- a/apps/api/src/notification/controllers/clear-notifications.ts+++ b/apps/api/src/notification/controllers/clear-notifications.ts@@ -2,14 +2,23 @@ import { and, eq } from "drizzle-orm";import db from "../../database";import { notificationTable } from "../../database/schema";-import { notificationResourceAccess } from "../resource-access";+import type { PermissionMap } from "../../utils/role-permissions";+import { notificationReadAccess } from "../resource-access";import { notificationWorkspaceFilter } from "../workspace-filter";async function clearNotifications(userId: string,workspaceId?: string,onlyRead = false,+ apiKeyPermissions?: PermissionMap | null,) {+ const access = await notificationReadAccess(+ userId,+ notificationTable.resourceId,+ notificationTable.resourceType,+ apiKeyPermissions,+ workspaceId,+ );await db.delete(notificationTable).where(@@ -17,13 +26,7 @@ async function clearNotifications(eq(notificationTable.userId, userId),onlyRead ? eq(notificationTable.isRead, true) : undefined,notificationWorkspaceFilter(workspaceId),- workspaceId- ? notificationResourceAccess(- userId,- notificationTable.resourceId,- notificationTable.resourceType,- )- : undefined,+ access,),);diff --git a/apps/api/src/notification/controllers/delete-notification.ts b/apps/api/src/notification/controllers/delete-notification.tsindex f4fa829b0..866655567 100644--- a/apps/api/src/notification/controllers/delete-notification.ts+++ b/apps/api/src/notification/controllers/delete-notification.ts@@ -3,20 +3,27 @@ import { HTTPException } from "hono/http-exception";import db from "../../database";import { notificationTable } from "../../database/schema";-import { notificationResourceAccess } from "../resource-access";+import type { PermissionMap } from "../../utils/role-permissions";+import { notificationReadAccess } from "../resource-access";-async function deleteNotification(id: string, userId: string) {+async function deleteNotification(+ id: string,+ userId: string,+ apiKeyPermissions?: PermissionMap | null,+) {+ const access = await notificationReadAccess(+ userId,+ notificationTable.resourceId,+ notificationTable.resourceType,+ apiKeyPermissions,+ );const [deleted] = await db.delete(notificationTable).where(and(eq(notificationTable.id, id),eq(notificationTable.userId, userId),- notificationResourceAccess(- userId,- notificationTable.resourceId,- notificationTable.resourceType,- ),+ access,),).returning({ id: notificationTable.id });diff --git a/apps/api/src/notification/controllers/get-notifications.ts b/apps/api/src/notification/controllers/get-notifications.tsindex 734089890..10c15fb17 100644--- a/apps/api/src/notification/controllers/get-notifications.ts+++ b/apps/api/src/notification/controllers/get-notifications.ts@@ -7,10 +7,22 @@ import {workspaceTable,} from "../../database/schema";-import { notificationResourceAccess } from "../resource-access";+import type { PermissionMap } from "../../utils/role-permissions";+import { notificationReadAccess } from "../resource-access";import { notificationWorkspaceFilter } from "../workspace-filter";-async function getNotifications(userId: string, workspaceId?: string) {+async function getNotifications(+ userId: string,+ workspaceId?: string,+ apiKeyPermissions?: PermissionMap | null,+) {+ const access = await notificationReadAccess(+ userId,+ notificationTable.resourceId,+ notificationTable.resourceType,+ apiKeyPermissions,+ workspaceId,+ );const rows = await db.select({notification: notificationTable,@@ -31,11 +43,7 @@ async function getNotifications(userId: string, workspaceId?: string) {and(eq(notificationTable.userId, userId),notificationWorkspaceFilter(workspaceId),- notificationResourceAccess(- userId,- notificationTable.resourceId,- notificationTable.resourceType,- ),+ access,),).orderBy(desc(notificationTable.createdAt))diff --git a/apps/api/src/notification/controllers/mark-all-notifications-as-read.ts b/apps/api/src/notification/controllers/mark-all-notifications-as-read.tsindex 1f24f9aa1..b358b8c40 100644--- a/apps/api/src/notification/controllers/mark-all-notifications-as-read.ts+++ b/apps/api/src/notification/controllers/mark-all-notifications-as-read.ts@@ -2,13 +2,22 @@ import { and, eq } from "drizzle-orm";import db from "../../database";import { notificationTable } from "../../database/schema";-import { notificationResourceAccess } from "../resource-access";+import type { PermissionMap } from "../../utils/role-permissions";+import { notificationReadAccess } from "../resource-access";import { notificationWorkspaceFilter } from "../workspace-filter";async function markAllNotificationsAsRead(userId: string,workspaceId?: string,+ apiKeyPermissions?: PermissionMap | null,) {+ const access = await notificationReadAccess(+ userId,+ notificationTable.resourceId,+ notificationTable.resourceType,+ apiKeyPermissions,+ workspaceId,+ );await db.update(notificationTable).set({ isRead: true })@@ -16,13 +25,7 @@ async function markAllNotificationsAsRead(and(eq(notificationTable.userId, userId),notificationWorkspaceFilter(workspaceId),- workspaceId- ? notificationResourceAccess(- userId,- notificationTable.resourceId,- notificationTable.resourceType,- )- : undefined,+ access,),);diff --git a/apps/api/src/notification/controllers/set-notification-read.ts b/apps/api/src/notification/controllers/set-notification-read.tsindex 0d143ac10..d5137ca79 100644--- a/apps/api/src/notification/controllers/set-notification-read.ts+++ b/apps/api/src/notification/controllers/set-notification-read.ts@@ -3,13 +3,21 @@ import { HTTPException } from "hono/http-exception";import db from "../../database";import { notificationTable } from "../../database/schema";-import { notificationResourceAccess } from "../resource-access";+import type { PermissionMap } from "../../utils/role-permissions";+import { notificationReadAccess } from "../resource-access";async function setNotificationRead(id: string,userId: string,isRead: boolean,+ apiKeyPermissions?: PermissionMap | null,) {+ const access = await notificationReadAccess(+ userId,+ notificationTable.resourceId,+ notificationTable.resourceType,+ apiKeyPermissions,+ );const [notification] = await db.update(notificationTable).set({ isRead })@@ -17,11 +25,7 @@ async function setNotificationRead(and(eq(notificationTable.id, id),eq(notificationTable.userId, userId),- notificationResourceAccess(- userId,- notificationTable.resourceId,- notificationTable.resourceType,- ),+ access,),).returning();diff --git a/apps/api/src/notification/index.ts b/apps/api/src/notification/index.tsindex 5400ceaeb..dc82430f5 100644--- a/apps/api/src/notification/index.ts+++ b/apps/api/src/notification/index.ts@@ -33,7 +33,7 @@ const listNotificationsRoute = createRoute({summary: "List notifications",request: { query: notificationWorkspaceQuery },description:- "Get up to 50 notifications for the current user, read and unread. Optionally limit them to one workspace before applying the limit.",+ "Get up to 50 notifications for the current user, read and unread. Resource notifications require current read permission and API key scope. Optionally limit them to one workspace before applying the limit.",responses: {200: jsonResponse("List of notifications", notificationListSchema),},@@ -69,7 +69,7 @@ const markAsReadRoute = createRoute({tags: ["Notifications"],summary: "Mark notification read",description:- "Mark one notification as read. Scoped to the current user, so another user's notification is not found.",+ "Mark one notification as read. Only the current user's notifications with current resource read permission and API key scope are accessible.",request: { params: notificationParam },responses: {200: jsonResponse("The updated notification", notificationSchema),@@ -84,7 +84,7 @@ const markAsUnreadRoute = createRoute({tags: ["Notifications"],summary: "Mark notification unread",description:- "Mark one notification as unread again. Scoped to the current user, so another user's notification is not found.",+ "Mark one notification as unread again. Only the current user's notifications with current resource read permission and API key scope are accessible.",request: { params: notificationParam },responses: {200: jsonResponse("The updated notification", notificationSchema),@@ -100,7 +100,7 @@ const markAllAsReadRoute = createRoute({summary: "Mark all read",request: { query: notificationWorkspaceQuery },description:- "Mark notifications for the current user as read, optionally limited to one workspace.",+ "Mark accessible notifications for the current user as read, optionally limited to one workspace. Resource notifications require current read permission and API key scope.",responses: {200: jsonResponse("All notifications marked as read", bulkResultSchema),},@@ -114,7 +114,7 @@ const clearAllRoute = createRoute({summary: "Clear all",request: { query: notificationWorkspaceQuery },description:- "Permanently delete notifications for the current user, optionally limited to one workspace. This cannot be undone.",+ "Permanently delete accessible notifications for the current user, optionally limited to one workspace. Resource notifications require current read permission and API key scope. This cannot be undone.",responses: {200: jsonResponse("All notifications cleared", bulkResultSchema),},@@ -128,7 +128,7 @@ const clearReadRoute = createRoute({summary: "Clear read notifications",request: { query: notificationWorkspaceQuery },description:- "Permanently delete the current user's read notifications, optionally limited to one workspace. Unread notifications are kept. This cannot be undone.",+ "Permanently delete the current user's accessible read notifications, optionally limited to one workspace. Resource notifications require current read permission and API key scope. Unread notifications are kept. This cannot be undone.",responses: {200: jsonResponse("Read notifications cleared", bulkResultSchema),},@@ -141,7 +141,7 @@ const deleteNotificationRoute = createRoute({tags: ["Notifications"],summary: "Delete notification",description:- "Permanently delete one notification. Scoped to the current user, so another user's notification is not found.",+ "Permanently delete one notification. Only the current user's notifications with current resource read permission and API key scope are accessible. Other notifications are not found.",request: { params: notificationParam },responses: {200: jsonResponse("Notification deleted", bulkResultSchema),@@ -152,7 +152,11 @@ const deleteNotificationRoute = createRoute({const notification = apiRouter().openapi(listNotificationsRoute, async (c) =>c.json(- await getNotifications(c.get("userId"), c.req.valid("query").workspaceId),+ await getNotifications(+ c.get("userId"),+ c.req.valid("query").workspaceId,+ c.get("apiKey")?.permissions,+ ),200,),)@@ -180,7 +184,12 @@ const notification = apiRouter()}).openapi(markAsReadRoute, async (c) =>c.json(- await setNotificationRead(c.req.valid("param").id, c.get("userId"), true),+ await setNotificationRead(+ c.req.valid("param").id,+ c.get("userId"),+ true,+ c.get("apiKey")?.permissions,+ ),200,),)@@ -190,6 +199,7 @@ const notification = apiRouter()c.req.valid("param").id,c.get("userId"),false,+ c.get("apiKey")?.permissions,),200,),@@ -199,6 +209,7 @@ const notification = apiRouter()await markAllNotificationsAsRead(c.get("userId"),c.req.valid("query").workspaceId,+ c.get("apiKey")?.permissions,),200,),@@ -208,6 +219,8 @@ const notification = apiRouter()await clearNotifications(c.get("userId"),c.req.valid("query").workspaceId,+ false,+ c.get("apiKey")?.permissions,),200,),@@ -218,13 +231,18 @@ const notification = apiRouter()c.get("userId"),c.req.valid("query").workspaceId,true,+ c.get("apiKey")?.permissions,),200,),).openapi(deleteNotificationRoute, async (c) =>c.json(- await deleteNotification(c.req.valid("param").id, c.get("userId")),+ await deleteNotification(+ c.req.valid("param").id,+ c.get("userId"),+ c.get("apiKey")?.permissions,+ ),200,),);diff --git a/apps/api/src/notification/resource-access.ts b/apps/api/src/notification/resource-access.tsindex 7f06d2d81..f3a23e0f8 100644--- a/apps/api/src/notification/resource-access.ts+++ b/apps/api/src/notification/resource-access.ts@@ -1,7 +1,16 @@-import { and, eq, type SQLWrapper, sql } from "drizzle-orm";+import { and, eq, inArray, type SQLWrapper, sql } from "drizzle-orm";import db from "../database";-import { userTable } from "../database/schema";+import {+ userTable,+ workspaceRoleTable,+ workspaceUserTable,+} from "../database/schema";import { projectAccessCondition } from "../project-access/project-access-condition";+import { hasInstanceAdminRole } from "../utils/instance-admin-role";+import { type PermissionMap, rolesAllow } from "../utils/role-permissions";+import { splitRoles } from "../utils/split-roles";+import { notBannedCondition } from "../utils/user-ban";+import { workspacePermissionGrants } from "../utils/workspace-permission-grants";// Membership, rather than public visibility or global admin privileges, defines// who may be subscribed to private task activity. Use the same predicate when@@ -10,7 +19,17 @@ export function notificationResourceAccess(userId: string,resourceId: string | null | SQLWrapper,resourceType: string | null | SQLWrapper,+ readGrants?: { taskWorkspaceIds: string[]; workspaceIds: string[] },) {+ const taskRead = readGrants+ ? inArray(+ sql`notification_project.workspace_id`,+ readGrants.taskWorkspaceIds,+ )+ : sql`true`;+ const workspaceRead = readGrants+ ? inArray(sql`notification_member.workspace_id`, readGrants.workspaceIds)+ : sql`true`;return sql<boolean>`((${resourceId}::text IS NULL AND ${resourceType}::text IS NULL)OR (${resourceType}::text = 'task' AND EXISTS (@@ -19,33 +38,99 @@ export function notificationResourceAccess(JOIN workspace_member AS notification_member ON notification_member.workspace_id = notification_project.workspace_idWHERE notification_task.id = ${resourceId} AND notification_member.user_id = ${userId}AND ${projectAccessCondition(userId, sql`notification_project.id`)}+ AND ${taskRead}))OR (${resourceType}::text = 'workspace' AND EXISTS (SELECT 1 FROM workspace_member AS notification_memberWHERE notification_member.workspace_id = ${resourceId} AND notification_member.user_id = ${userId}+ AND ${workspaceRead})))`;}+// Apply current role and key grants in SQL before list limits or UPDATE RETURNING.+// One batch covers every involved workspace, regardless of notification count.+export async function notificationReadAccess(+ userId: string,+ resourceId: string | null | SQLWrapper,+ resourceType: string | null | SQLWrapper,+ apiKeyPermissions?: PermissionMap | null,+ workspaceId?: string,+) {+ const grants = await workspacePermissionGrants(userId, {+ apiKeyPermissions,+ workspaceIds: workspaceId ? [workspaceId] : undefined,+ });+ return notificationResourceAccess(userId, resourceId, resourceType, {+ taskWorkspaceIds: grants.workspaceIds.filter((id) =>+ grants.allows(id, { task: ["read"] }),+ ),+ workspaceIds: grants.workspaceIds.filter((id) =>+ grants.allows(id, { workspace: ["read"] }),+ ),+ });+}+export async function canReceiveResourceNotification(userId: string,resourceId?: string | null,resourceType?: string | null,database: Pick<typeof db, "select"> = db,) {- const [user] = await database- .select({ id: userTable.id })+ // Keep creation/delivery authorization to one SELECT, including when the+ // caller injects a transaction. Joining the current resource's role rows+ // avoids adding grant lookups for every recipient or scheduled reminder.+ const workspaceId = sql<string>`CASE+ WHEN ${resourceType ?? null}::text = 'workspace' THEN ${resourceId ?? null}::text+ WHEN ${resourceType ?? null}::text = 'task' THEN (+ SELECT recipient_project.workspace_id FROM task AS recipient_task+ JOIN project AS recipient_project ON recipient_project.id = recipient_task.project_id+ WHERE recipient_task.id = ${resourceId ?? null}+ )+ END`;+ const rows = await database+ .select({+ id: userTable.id,+ instanceRole: userTable.role,+ memberRole: workspaceUserTable.role,+ storedRole: workspaceRoleTable.role,+ permission: workspaceRoleTable.permission,+ }).from(userTable)+ .leftJoin(+ workspaceUserTable,+ and(+ eq(workspaceUserTable.userId, userTable.id),+ eq(workspaceUserTable.workspaceId, workspaceId),+ ),+ )+ .leftJoin(+ workspaceRoleTable,+ eq(workspaceRoleTable.workspaceId, workspaceUserTable.workspaceId),+ ).where(and(eq(userTable.id, userId),+ notBannedCondition(),notificationResourceAccess(userId,resourceId ?? null,resourceType ?? null,),),- )- .limit(1);- return Boolean(user);+ );+ if (!rows.length) return false;+ if (!resourceId && !resourceType) return true;+ if (hasInstanceAdminRole(rows[0]?.instanceRole)) return true;+ const required: PermissionMap =+ resourceType === "task" ? { task: ["read"] } : { workspace: ["read"] };+ return rolesAllow(+ splitRoles(rows[0]?.memberRole),+ rows.flatMap((row) =>+ row.storedRole+ ? [{ role: row.storedRole, permission: row.permission }]+ : [],+ ),+ required,+ );}diff --git a/apps/api/src/plugins/discord/client.ts b/apps/api/src/plugins/discord/client.tsindex 9b86cea7c..7ed61a41d 100644--- a/apps/api/src/plugins/discord/client.ts+++ b/apps/api/src/plugins/discord/client.ts@@ -1,4 +1,5 @@import * as Sentry from "@sentry/node";+import { sendOutboundRequest } from "../../utils/outbound-request";type DiscordEmbedField = {name: string;@@ -22,8 +23,6 @@ type DiscordMessage = {embeds?: DiscordEmbed[];};-const DISCORD_TIMEOUT_MS = 10_000;-export function sanitizeDiscordContent(value: string): string {return value.replace(/@everyone/g, "@\u200beveryone")@@ -39,39 +38,13 @@ export async function postToDiscord(webhookUrl: string,message: DiscordMessage,): Promise<void> {- const controller = new AbortController();- const timeoutId = setTimeout(() => controller.abort(), DISCORD_TIMEOUT_MS);-- try {- Sentry.addBreadcrumb({- category: "integration",- level: "info",- data: { integration: "discord" },- });- const response = await fetch(webhookUrl, {- method: "POST",- headers: {- "Content-Type": "application/json",- },- body: JSON.stringify(message),- signal: controller.signal,- });-- if (!response.ok) {- const errorText = await response.text();- throw new Error(- `Discord webhook request failed (${response.status}): ${errorText}`,- );- }- } catch (error) {- if (error instanceof Error && error.name === "AbortError") {- throw new Error(- `Discord webhook request timed out after ${DISCORD_TIMEOUT_MS}ms`,- );- }-- throw error;- } finally {- clearTimeout(timeoutId);- }+ Sentry.addBreadcrumb({+ category: "integration",+ level: "info",+ data: { integration: "discord" },+ });+ await sendOutboundRequest(webhookUrl, {+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify(message),+ });}diff --git a/apps/api/src/plugins/discord/events.test.ts b/apps/api/src/plugins/discord/events.test.tsnew file mode 100644index 000000000..4c3ae50da--- /dev/null+++ b/apps/api/src/plugins/discord/events.test.ts@@ -0,0 +1,109 @@+import { inspect } from "node:util";+import { afterEach, describe, expect, it, vi } from "vite-plus/test";+import { OutboundRequestError } from "../../utils/outbound-request";+import { handleTaskCreated } from "./events";++const mocks = vi.hoisted(() => ({ select: vi.fn(), post: vi.fn() }));++vi.mock("../../database", () => ({ default: { select: mocks.select } }));+vi.mock("./client", () => ({+ postToDiscord: mocks.post,+ sanitizeDiscordContent: (value: string) => value,+}));++afterEach(() => {+ vi.restoreAllMocks();+ vi.resetAllMocks();+});++function selectChain(rows: unknown[]) {+ const chain = {+ from: () => chain,+ innerJoin: () => chain,+ leftJoin: () => chain,+ where: () => chain,+ limit: async () => rows,+ };+ return chain;+}++const event = {+ taskId: "task",+ projectId: "project",+ userId: "user",+ title: "Task",+ description: null,+ priority: null,+ status: "to-do",+ number: 1,+};++describe("Discord delivery error logging", () => {+ it.each(["unknown", "http"])(+ "omits secret-bearing configuration and %s error details",+ async (kind) => {+ const webhookUrl =+ "https://discord.com/api/webhooks/private-webhook-id/ab-private-token-wxyz?key=private-query";+ const error =+ kind === "http"+ ? new OutboundRequestError("http", 503)+ : new Error(`Failed request to ${webhookUrl}`, {+ cause: new Error("private-cause"),+ });+ // Console formatting includes non-enumerable Error messages and causes.+ // JSON.stringify alone would miss those disclosures.+ error.stack = `private-stack ${webhookUrl}`;+ mocks.post.mockRejectedValueOnce(error);+ mocks.select+ .mockReturnValueOnce(+ selectChain([+ {+ title: "Task",+ number: 1,+ status: "to-do",+ priority: "low",+ columnName: "To do",+ projectName: "Project",+ workspaceId: "workspace",+ projectId: "project",+ },+ ]),+ )+ .mockReturnValueOnce(selectChain([{ name: "User" }]));+ const log = vi.spyOn(console, "error").mockImplementation(() => {});++ await expect(+ handleTaskCreated(event, {+ integrationId: "integration",+ projectId: "project",+ config: { webhookUrl, channelName: webhookUrl },+ }),+ ).resolves.toBeUndefined();++ expect(mocks.post).toHaveBeenCalledWith(+ webhookUrl,+ expect.objectContaining({ content: "New task created: #1 Task" }),+ );+ expect(log).toHaveBeenCalledExactlyOnceWith(+ "sendDiscordMessage postToDiscord failed",+ {+ error:+ kind === "http"+ ? "Outbound request failed: http (HTTP 503)"+ : "Outbound request failed",+ },+ );+ const output = inspect(log.mock.calls, { depth: null });+ for (const secret of [+ "private-webhook-id",+ "private-token",+ "private-query",+ "private-cause",+ "private-stack",+ "wxyz",+ ]) {+ expect(output).not.toContain(secret);+ }+ },+ );+});diff --git a/apps/api/src/plugins/discord/events.ts b/apps/api/src/plugins/discord/events.tsindex fc77da980..38badacde 100644--- a/apps/api/src/plugins/discord/events.ts+++ b/apps/api/src/plugins/discord/events.ts@@ -7,6 +7,7 @@ import {userTable,workspaceTable,} from "../../database/schema";+import { safeOutboundError } from "../../utils/outbound-request";import type {PluginContext,TaskCommentCreatedEvent,@@ -50,19 +51,6 @@ function truncate(value: string, maxLength: number): string {return `${value.slice(0, maxLength - 1)}…`;}-function redactWebhookUrl(value: string): string {- try {- const url = new URL(value);- const parts = url.pathname.split("/").filter(Boolean);- const token = parts.at(-1) ?? "";- const maskedToken =- token.length > 6 ? `${token.slice(0, 2)}…${token.slice(-4)}` : "redacted";- return `${url.origin}/${parts.slice(0, -1).join("/")}/${maskedToken}`;- } catch {- return "redacted";- }-}-async function getDiscordEventData(taskId: string,projectId: string,@@ -185,10 +173,7 @@ async function sendDiscordMessage(});} catch (error) {console.error("sendDiscordMessage postToDiscord failed", {- error,- webhookUrl: redactWebhookUrl(config.webhookUrl),- channelName: config.channelName ?? null,- taskUrl: data.taskUrl,+ error: safeOutboundError(error),});}}diff --git a/apps/api/src/plugins/gitea/utils/gitea-api.ts b/apps/api/src/plugins/gitea/utils/gitea-api.tsindex 8eb0381dc..7b69c216f 100644--- a/apps/api/src/plugins/gitea/utils/gitea-api.ts+++ b/apps/api/src/plugins/gitea/utils/gitea-api.ts@@ -1,4 +1,5 @@import * as Sentry from "@sentry/node";+import { destinationFetch } from "../../../import/destination-fetch";import { assertPublicDestination } from "../../../utils/assert-public-destination";import type { GiteaConfig } from "../config";import { normalizeGiteaBaseUrl } from "../config";@@ -104,7 +105,7 @@ export async function giteaFetch<T>(level: "info",data: { integration: "gitea" },});- const res = await fetch(url, {+ const res = await destinationFetch(url, {...init,signal: controller.signal,// Following redirects would let a public host bounce the request to an@@ -117,6 +118,7 @@ export async function giteaFetch<T>(});if (res.status >= 300 && res.status < 400) {+ void res.body?.cancel().catch(() => {});throw new GiteaApiError(`Gitea request was redirected (HTTP ${res.status})`,res.status,diff --git a/apps/api/src/plugins/gitlab/utils/gitlab-api.ts b/apps/api/src/plugins/gitlab/utils/gitlab-api.tsindex 8c6540d41..d22a31814 100644--- a/apps/api/src/plugins/gitlab/utils/gitlab-api.ts+++ b/apps/api/src/plugins/gitlab/utils/gitlab-api.ts@@ -1,5 +1,6 @@import { setTimeout as delay } from "node:timers/promises";import * as Sentry from "@sentry/node";+import { destinationFetch } from "../../../import/destination-fetch";import { assertPublicDestination } from "../../../utils/assert-public-destination";import type { GitlabConfig, GitlabTokenType } from "../config";import {@@ -145,7 +146,7 @@ export async function gitlabFetch<T>(level: "info",data: { integration: "gitlab" },});- const res = await fetch(url, {+ const res = await destinationFetch(url, {...init,signal: controller.signal,// A redirect could lead past the destination check to an internal host.@@ -157,6 +158,7 @@ export async function gitlabFetch<T>(});if (res.status >= 300 && res.status < 400) {+ void res.body?.cancel().catch(() => {});throw new GitlabApiError(`GitLab request was redirected (HTTP ${res.status})`,res.status,diff --git a/apps/api/src/plugins/mattermost/client.ts b/apps/api/src/plugins/mattermost/client.tsindex d08aad1c2..5054bb986 100644--- a/apps/api/src/plugins/mattermost/client.ts+++ b/apps/api/src/plugins/mattermost/client.ts@@ -1,3 +1,6 @@+import { destinationFetch } from "../../import/destination-fetch";+import { assertPublicWebhookDestination } from "../generic-webhook/config";+export type MattermostAttachment = {color?: string;title?: string;@@ -23,7 +26,7 @@ export async function postToMattermost(const timeoutId = setTimeout(() => controller.abort(), MATTERMOST_TIMEOUT_MS);try {- const response = await fetch(webhookUrl, {+ const response = await destinationFetch(webhookUrl, {method: "POST",headers: {"Content-Type": "application/json",@@ -51,5 +54,3 @@ export async function postToMattermost(clearTimeout(timeoutId);}}--import { assertPublicWebhookDestination } from "../generic-webhook/config";diff --git a/apps/api/src/plugins/slack/client.ts b/apps/api/src/plugins/slack/client.tsindex 27f7534fe..f81166fd8 100644--- a/apps/api/src/plugins/slack/client.ts+++ b/apps/api/src/plugins/slack/client.ts@@ -1,4 +1,5 @@import * as Sentry from "@sentry/node";+import { sendOutboundRequest } from "../../utils/outbound-request";export type SlackTextObject = {type: "mrkdwn" | "plain_text";@@ -21,45 +22,17 @@ export type SlackMessage = {blocks?: SlackBlock[];};-const SLACK_TIMEOUT_MS = 10_000;-export async function postToSlack(webhookUrl: string,message: SlackMessage,): Promise<void> {- const controller = new AbortController();- const timeoutId = setTimeout(() => controller.abort(), SLACK_TIMEOUT_MS);-- try {- Sentry.addBreadcrumb({- category: "integration",- level: "info",- data: { integration: "slack" },- });- const response = await fetch(webhookUrl, {- method: "POST",- headers: {- "Content-Type": "application/json",- },- body: JSON.stringify(message),- signal: controller.signal,- });-- if (!response.ok) {- const errorText = await response.text();- throw new Error(- `Slack webhook request failed (${response.status}): ${errorText}`,- );- }- } catch (error) {- if (error instanceof Error && error.name === "AbortError") {- throw new Error(- `Slack webhook request timed out after ${SLACK_TIMEOUT_MS}ms`,- );- }-- throw error;- } finally {- clearTimeout(timeoutId);- }+ Sentry.addBreadcrumb({+ category: "integration",+ level: "info",+ data: { integration: "slack" },+ });+ await sendOutboundRequest(webhookUrl, {+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify(message),+ });}diff --git a/apps/api/src/project/controllers/public-external-link.test.ts b/apps/api/src/project/controllers/public-external-link.test.tsnew file mode 100644index 000000000..ff49a3587--- /dev/null+++ b/apps/api/src/project/controllers/public-external-link.test.ts@@ -0,0 +1,42 @@+import { describe, expect, it } from "vite-plus/test";+import { publicExternalLink } from "./public-external-link";++const link = {+ id: "link",+ taskId: "task",+ integrationId: "integration",+ resourceType: "pull_request",+ externalId: "42",+ url: "https://example.com/pull/42",+ title: "Linked pull request",+ createdAt: new Date(0),+ updatedAt: new Date(0),+};++describe("public external links", () => {+ it("only exposes display metadata and explicit link fields", () => {+ const metadata = {+ state: "closed",+ merged: true,+ draft: false,+ lastSync: { description: { value: "previous text" } },+ unknownProviderField: "private value",+ };+ const input = { ...link, metadata, future: "private" };+ const result = publicExternalLink(input);+ expect(result).toEqual({+ ...link,+ integrationId: null,+ metadata: { state: "closed", merged: true, draft: false },+ });+ expect(metadata.lastSync.description.value).toBe("previous text");+ });++ it.each([+ null,+ { state: "unknown", merged: "true", draft: { value: true } },+ { lastSync: { title: { value: "previous title" } } },+ ])("drops unknown metadata and invalid display values: %j", (metadata) => {+ expect(publicExternalLink({ ...link, metadata }).metadata).toBeNull();+ });+});diff --git a/apps/api/src/project/controllers/public-external-link.ts b/apps/api/src/project/controllers/public-external-link.tsnew file mode 100644index 000000000..bc6b98afd--- /dev/null+++ b/apps/api/src/project/controllers/public-external-link.ts@@ -0,0 +1,33 @@+import type { externalLinkTable } from "../../database/schema";++type ExternalLink = Omit<typeof externalLinkTable.$inferSelect, "metadata"> & {+ metadata: Record<string, unknown> | null;+};++export function publicExternalLink(link: ExternalLink): ExternalLink {+ const metadata: Record<string, unknown> = {};+ const state = link.metadata?.state;+ if (state === "open" || state === "opened" || state === "closed") {+ metadata.state = state;+ }+ for (const flag of ["merged", "draft"] as const) {+ if (typeof link.metadata?.[flag] === "boolean") {+ metadata[flag] = link.metadata[flag];+ }+ }++ // Sync metadata can retain earlier task contents. Public boards only expose+ // the link's display fields; new database/provider fields stay private.+ return {+ id: link.id,+ taskId: link.taskId,+ integrationId: null,+ resourceType: link.resourceType,+ externalId: link.externalId,+ url: link.url,+ title: link.title,+ metadata: Object.keys(metadata).length ? metadata : null,+ createdAt: link.createdAt,+ updatedAt: link.updatedAt,+ };+}diff --git a/apps/api/src/project/index.ts b/apps/api/src/project/index.tsindex 66f28be24..ef6cd55b2 100644--- a/apps/api/src/project/index.ts+++ b/apps/api/src/project/index.ts@@ -99,11 +99,15 @@ const listProjectsRoute = createRoute({summary: "List projects",description:"List a workspace's projects in sidebar order, each with rollup task statistics. Archived projects are excluded unless includeArchived is set.",- middleware: [workspaceAccess.fromQuery()] as const,+ middleware: [+ workspaceAccess.fromQuery(),+ requireWorkspacePermission({ project: ["read"] }),+ ] as const,request: { query: listProjectsQuery },responses: {200: jsonResponse("List of projects", projectListSchema),400: errorResponse("Workspace ID could not be determined"),+ 403: errorResponse("Missing read permission"),404: errorResponse("Workspace not found"),},});@@ -143,11 +147,14 @@ const getProjectRoute = createRoute({tags: ["Projects"],summary: "Get project",description: "Get a single project by ID.",- middleware: [workspaceAccess.fromProject()] as const,+ middleware: [+ workspaceAccess.fromProject(),+ requireWorkspacePermission({ project: ["read"] }),+ ] as const,request: { params: projectParam },responses: {200: jsonResponse("Project details", projectSchema),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Project not found"),},});@@ -286,7 +293,10 @@ const getProjectBackgroundRoute = createRoute({tags: ["Projects"],summary: "Download project background",description: "Download the current project board background image.",- middleware: [workspaceAccess.fromProject()] as const,+ middleware: [+ workspaceAccess.fromProject(),+ requireWorkspacePermission({ project: ["read"] }),+ ] as const,request: { params: projectParam },responses: {200: {@@ -296,7 +306,7 @@ const getProjectBackgroundRoute = createRoute({},},304: { description: "Not modified" },- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Project or project background not found"),},});diff --git a/apps/api/src/search/controllers/global-search.ts b/apps/api/src/search/controllers/global-search.tsindex 5f83f9e92..117a5cc5f 100644--- a/apps/api/src/search/controllers/global-search.ts+++ b/apps/api/src/search/controllers/global-search.ts@@ -379,6 +379,7 @@ async function globalSearch(params: SearchParams): Promise<{.where(and(inArray(workspaceTable.id, accessibleWorkspaceIds),+ workspaceId ? eq(workspaceTable.id, workspaceId) : undefined,or(ilike(workspaceTable.name, searchPattern),ilike(workspaceTable.description, searchPattern),diff --git a/apps/api/src/search/index.ts b/apps/api/src/search/index.tsindex 33323bcac..1f78b8c8d 100644--- a/apps/api/src/search/index.ts+++ b/apps/api/src/search/index.ts@@ -6,6 +6,7 @@ import {} from "../openapi";import { workspaceAccess } from "../utils/workspace-access-middleware";import globalSearch from "./controllers/global-search";+import { requireSearchPermission } from "./require-search-permission";import { searchResponseSchema } from "./response";import { searchQuery } from "./schema";@@ -17,13 +18,14 @@ const globalSearchRoute = createRoute({summary: "Global search",description:"Search across tasks, projects, workspaces, comments, and activities in one workspace. Results are ranked by relevance and returned as a single flat list, each entry tagged with its `type`.",- middleware: [workspaceAccess.fromQuery()] as const,+ middleware: [workspaceAccess.fromQuery(), requireSearchPermission] as const,request: { query: searchQuery },responses: {200: jsonResponse("Ranked search results", searchResponseSchema),400: errorResponse("Invalid query, or workspace ID could not be determined",),+ 403: errorResponse("Missing read permission for the requested search type"),404: errorResponse("Workspace not found"),},});diff --git a/apps/api/src/search/require-search-permission.ts b/apps/api/src/search/require-search-permission.tsnew file mode 100644index 000000000..322219d1b--- /dev/null+++ b/apps/api/src/search/require-search-permission.ts@@ -0,0 +1,29 @@+import type { Context, Next } from "hono";+import { requireWorkspacePermission } from "../utils/require-workspace-permission";+import type { PermissionMap } from "../utils/role-permissions";++export function requireSearchPermission(c: Context, next: Next) {+ // Route middleware runs before query validation.+ const type = c.req.query("type") ?? "all";+ let permissions: PermissionMap;+ switch (type) {+ case "projects":+ permissions = { project: ["read"] };+ break;+ case "workspaces":+ permissions = { workspace: ["read"] };+ break;+ case "tasks":+ case "comments":+ case "activities":+ permissions = { project: ["read"], task: ["read"] };+ break;+ default:+ permissions = {+ project: ["read"],+ task: ["read"],+ workspace: ["read"],+ };+ }+ return requireWorkspacePermission(permissions)(c, next);+}diff --git a/apps/api/src/slack-integration/index.ts b/apps/api/src/slack-integration/index.tsindex 979b60762..d746e61dc 100644--- a/apps/api/src/slack-integration/index.ts+++ b/apps/api/src/slack-integration/index.ts@@ -90,14 +90,19 @@ const getSlackIntegrationRoute = createRoute({summary: "Get Slack integration",description:"Get the Slack integration for a project, or null when none is configured.",- middleware: [workspaceAccess.fromProject("projectId")] as const,+ middleware: [+ workspaceAccess.fromProject("projectId"),+ requireWorkspacePermission({ project: ["read"] }),+ ] as const,request: { params: projectIdParam },responses: {200: jsonResponse("Slack integration details, or null",slackIntegrationSchema.nullable(),),- 403: errorResponse("No access to the project"),+ 403: errorResponse(+ "No access to the project, or missing project:read permission",+ ),404: errorResponse("Project not found"),},});diff --git a/apps/api/src/task-relation/index.ts b/apps/api/src/task-relation/index.tsindex 4d5e4c0ab..33829a722 100644--- a/apps/api/src/task-relation/index.ts+++ b/apps/api/src/task-relation/index.ts@@ -109,14 +109,17 @@ const getTaskRelationsRoute = createRoute({summary: "Get task relations",description:"Get every relation where the task is the source or the target, each with a summary of both linked tasks. Relations pointing outside the caller's workspace are omitted.",- middleware: [workspaceAccess.fromTaskId("taskId")] as const,+ middleware: [+ workspaceAccess.fromTaskId("taskId"),+ requireWorkspacePermission({ task: ["read"] }),+ ] as const,request: { params: taskIdParam },responses: {200: jsonResponse("Task relations with the linked task summaries",taskRelationWithTasksListSchema,),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Task not found"),},});diff --git a/apps/api/src/task/controllers/get-task-by-ticket-id.ts b/apps/api/src/task/controllers/get-task-by-ticket-id.tsindex 6d257baa7..801ba3702 100644--- a/apps/api/src/task/controllers/get-task-by-ticket-id.ts+++ b/apps/api/src/task/controllers/get-task-by-ticket-id.ts@@ -1,20 +1,15 @@import { and, eq, inArray, sql } from "drizzle-orm";import { HTTPException } from "hono/http-exception";import db from "../../database";-import {- projectTable,- taskTable,- userTable,- workspaceTable,- workspaceUserTable,-} from "../../database/schema";+import { projectTable, taskTable, workspaceTable } from "../../database/schema";import {isSameProjectKey,mayMatchProjectKey,} from "../../project/project-key";import { projectAccessCondition } from "../../project-access/project-access-condition";+import type { PermissionMap } from "../../utils/role-permissions";+import { workspacePermissionGrants } from "../../utils/workspace-permission-grants";import { TICKET_ID_PATTERN } from "../ticket-id";-import { hasInstanceAdminRole } from "../../utils/instance-admin-role";import getTask from "./get-task";export default async function getTaskByTicketId(@@ -25,6 +20,7 @@ export default async function getTaskByTicketId(workspaceSlug,projectId,}: { workspaceId?: string; workspaceSlug?: string; projectId?: string } = {},+ apiKeyPermissions?: PermissionMap | null,) {const match = ticketId.normalize("NFKC").match(TICKET_ID_PATTERN);const projectKey = match?.[1];@@ -38,16 +34,14 @@ export default async function getTaskByTicketId(throw new HTTPException(400, { message: "Invalid task ticket ID" });}- const [user] = await db- .select({ role: userTable.role })- .from(userTable)- .where(eq(userTable.id, userId))- .limit(1);-- const memberWorkspaces = db- .select({ workspaceId: workspaceUserTable.workspaceId })- .from(workspaceUserTable)- .where(eq(workspaceUserTable.userId, userId));+ const grants = await workspacePermissionGrants(userId, {+ apiKeyPermissions,+ workspaceIds: workspaceId ? [workspaceId] : undefined,+ });+ const taskRead = { task: ["read"] };+ const readableWorkspaceIds = grants.workspaceIds.filter((id) =>+ grants.allows(id, taskRead),+ );let slugWorkspaceIds: string[] | undefined;if (workspaceSlug) {@@ -55,12 +49,15 @@ export default async function getTaskByTicketId(.select({ id: workspaceTable.id, slug: workspaceTable.slug }).from(workspaceTable).where(sql`lower(${workspaceTable.slug}) = lower(${workspaceSlug})`);- const exactMatch = slugMatches.find(+ const readableMatches = slugMatches.filter((workspace) =>+ grants.allows(workspace.id, taskRead),+ );+ const exactMatch = readableMatches.find((workspace) => workspace.slug === workspaceSlug,);slugWorkspaceIds = exactMatch? [exactMatch.id]- : slugMatches.map((workspace) => workspace.id);+ : readableMatches.map((workspace) => workspace.id);if (slugWorkspaceIds.length === 0) {throw new HTTPException(404, { message: "Task not found" });}@@ -84,9 +81,9 @@ export default async function getTaskByTicketId(? inArray(projectTable.workspaceId, slugWorkspaceIds): undefined,projectId ? eq(projectTable.id, projectId) : undefined,- hasInstanceAdminRole(user?.role)+ grants.isInstanceAdmin? undefined- : inArray(projectTable.workspaceId, memberWorkspaces),+ : inArray(projectTable.workspaceId, readableWorkspaceIds),projectAccessCondition(userId, projectTable.id),),);@@ -94,6 +91,7 @@ export default async function getTaskByTicketId(const rank = (candidate: { archivedAt: Date | null }) =>candidate.archivedAt?.getTime() ?? Number.POSITIVE_INFINITY;const [matchedTask, nextMatch] = candidates+ .filter((candidate) => grants.allows(candidate.workspaceId, taskRead)).filter((candidate) => isSameProjectKey(candidate.slug, projectKey)).sort((a, b) => (rank(a) === rank(b) ? 0 : rank(a) > rank(b) ? -1 : 1));if (!matchedTask) {diff --git a/apps/api/src/task/controllers/get-tasks.ts b/apps/api/src/task/controllers/get-tasks.tsindex 4f111b55b..38ebf4143 100644--- a/apps/api/src/task/controllers/get-tasks.ts+++ b/apps/api/src/task/controllers/get-tasks.ts@@ -13,6 +13,7 @@ import {} from "drizzle-orm";import { alias } from "drizzle-orm/pg-core";import { HTTPException } from "hono/http-exception";+import { publicExternalLink } from "../../project/controllers/public-external-link";import {columnTable,externalLinkTable,@@ -278,10 +279,13 @@ async function getTasksPage(if (!taskExternalLinksMap.has(externalLink.taskId)) {taskExternalLinksMap.set(externalLink.taskId, []);}- taskExternalLinksMap.get(externalLink.taskId)?.push({+ const link = {...externalLink,metadata: parseMetadata(externalLink.metadata),- });+ };+ taskExternalLinksMap+ .get(externalLink.taskId)+ ?.push(options.publicOnly ? publicExternalLink(link) : link);}const projectColumns = await dbdiff --git a/apps/api/src/task/index.ts b/apps/api/src/task/index.tsindex df97c14e3..6078a035a 100644--- a/apps/api/src/task/index.ts+++ b/apps/api/src/task/index.ts@@ -139,12 +139,15 @@ const listTasksRoute = createRoute({summary: "List tasks",description:"Get a project's board: its columns, each with the tasks in it, plus the archived and planned buckets. Responses always contain at most 100 tasks (50 by default). Continue through pagination.totalPages for the whole board, and for each task page follow relatedPage through pagination.relatedTotalPages for all labels, links and column metadata. Filters and sorting apply before pagination. Descriptions larger than 64 KiB are omitted with descriptionDeferred=true; read the task detail or description pages for full text.",- middleware: [workspaceAccess.fromProject("projectId")] as const,+ middleware: [+ workspaceAccess.fromProject("projectId"),+ requireWorkspacePermission({ project: ["read"], task: ["read"] }),+ ] as const,request: { params: projectIdParam, query: listTasksQuery },responses: {200: jsonResponse("The project board", boardSchema),503: errorResponse("Task list request timed out"),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Project not found"),},});@@ -346,14 +349,17 @@ const getTaskRoute = createRoute({summary: "Get task",description:"Get a single task by ID, with its assignee name. The board view omits descriptions above 64 KiB and includes task and same-project parent subtask progress.",- middleware: [workspaceAccess.fromTask()] as const,+ middleware: [+ workspaceAccess.fromTask(),+ requireWorkspacePermission({ task: ["read"] }),+ ] as const,request: {params: taskParam,query: z.object({ view: z.enum(["detail", "board"]).optional() }),},responses: {200: jsonResponse("Task details", taskWithAssigneeSchema),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Task not found"),},});@@ -365,7 +371,7 @@ const getTaskByTicketIdRoute = createRoute({tags: ["Tasks"],summary: "Get task by ticket ID",description:- "Get a single task by its project key and number, such as KAN-12. A match in an active project takes precedence, then the most recently archived project. If the ticket ID still matches multiple accessible tasks, narrow the lookup to a workspace with workspaceId or workspaceSlug, or to a single project with projectId.",+ "Get a single task by its project key and number, such as KAN-12. Only tasks with current task:read permission and API key scope are considered. A match in an active project takes precedence, then the most recently archived project. If the ticket ID still matches multiple accessible tasks, narrow the lookup to a workspace with workspaceId or workspaceSlug, or to a single project with projectId.",request: { params: ticketIdParam, query: ticketIdQuery },responses: {200: jsonResponse("Task details", taskByTicketIdSchema),@@ -448,11 +454,14 @@ const exportTasksRoute = createRoute({summary: "Export tasks",description:"Export a project's tasks, with their labels, as a JSON document.",- middleware: [workspaceAccess.fromProject("projectId")] as const,+ middleware: [+ workspaceAccess.fromProject("projectId"),+ requireWorkspacePermission({ project: ["read"], task: ["read"] }),+ ] as const,request: { params: projectIdParam },responses: {200: jsonResponse("The exported project and tasks", taskExportSchema),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Project not found"),},});@@ -756,12 +765,15 @@ const descriptionPageRoute = createRoute({path: "/{id}/description",tags: ["Tasks"],summary: "Read a description page",- middleware: [workspaceAccess.fromTaskId("id")] as const,+ middleware: [+ workspaceAccess.fromTaskId("id"),+ requireWorkspacePermission({ task: ["read"] }),+ ] as const,request: { params: taskParam, query: descriptionPageQuery },responses: {200: jsonResponse("Description page", descriptionPageSchema),400: errorResponse("Invalid offset or version"),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Task not found"),409: errorResponse("Description changed; reload from offset zero"),503: errorResponse("Description request timed out"),@@ -773,12 +785,15 @@ const descriptionMatchesRoute = createRoute({path: "/description-matches/{projectId}",tags: ["Tasks"],summary: "Search descriptions omitted from task lists",- middleware: [workspaceAccess.fromProject("projectId")] as const,+ middleware: [+ workspaceAccess.fromProject("projectId"),+ requireWorkspacePermission({ task: ["read"] }),+ ] as const,request: { params: projectIdParam, query: descriptionMatchesQuery },responses: {200: jsonResponse("Matching task IDs", descriptionMatchesSchema),400: errorResponse("Invalid search query or cursor"),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),503: errorResponse("Description search timed out"),404: errorResponse("Project not found"),},@@ -934,7 +949,12 @@ const task = apiRouter<BaseVariables & { workspaceId: string }>().openapi(getTaskByTicketIdRoute, async (c) => {const { ticketId } = c.req.valid("param");return c.json(- await getTaskByTicketId(ticketId, c.get("userId"), c.req.valid("query")),+ await getTaskByTicketId(+ ticketId,+ c.get("userId"),+ c.req.valid("query"),+ c.get("apiKey")?.permissions,+ ),200,);})diff --git a/apps/api/src/telegram-integration/index.ts b/apps/api/src/telegram-integration/index.tsindex c1b5df7fd..8acb14807 100644--- a/apps/api/src/telegram-integration/index.ts+++ b/apps/api/src/telegram-integration/index.ts@@ -58,14 +58,19 @@ const getTelegramIntegrationRoute = createRoute({summary: "Get Telegram integration",description:"Get the Telegram integration for a project, or null when none is configured.",- middleware: [workspaceAccess.fromProject("projectId")] as const,+ middleware: [+ workspaceAccess.fromProject("projectId"),+ requireWorkspacePermission({ project: ["read"] }),+ ] as const,request: { params: projectIdParam },responses: {200: jsonResponse("Telegram integration details, or null",telegramIntegrationSchema.nullable(),),- 403: errorResponse("No access to the project"),+ 403: errorResponse(+ "No access to the project, or missing project:read permission",+ ),404: errorResponse("Project not found"),},});diff --git a/apps/api/src/time-entry/index.ts b/apps/api/src/time-entry/index.tsindex 46c45cdc9..d3cbd0655 100644--- a/apps/api/src/time-entry/index.ts+++ b/apps/api/src/time-entry/index.ts@@ -25,11 +25,14 @@ const getTaskTimeEntriesRoute = createRoute({tags: ["Time Entries"],summary: "Get task time entries",description: "Get every time entry logged against a task.",- middleware: [workspaceAccess.fromTaskId()] as const,+ middleware: [+ workspaceAccess.fromTaskId(),+ requireWorkspacePermission({ task: ["read"] }),+ ] as const,request: { params: taskIdParam },responses: {200: jsonResponse("List of time entries for the task", timeEntryListSchema),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Task not found"),},});@@ -41,11 +44,14 @@ const getTimeEntryRoute = createRoute({tags: ["Time Entries"],summary: "Get time entry",description: "Get a single time entry by ID.",- middleware: [workspaceAccess.fromTimeEntry()] as const,+ middleware: [+ workspaceAccess.fromTimeEntry(),+ requireWorkspacePermission({ task: ["read"] }),+ ] as const,request: { params: timeEntryParam },responses: {200: jsonResponse("Time entry details", timeEntrySchema),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Time entry not found"),},});diff --git a/apps/api/src/utils/assert-owner-invitation-resend-allowed.ts b/apps/api/src/utils/assert-owner-invitation-resend-allowed.tsnew file mode 100644index 000000000..9c13267ea--- /dev/null+++ b/apps/api/src/utils/assert-owner-invitation-resend-allowed.ts@@ -0,0 +1,51 @@+import { APIError } from "better-auth/api";+import { and, eq } from "drizzle-orm";+import db, { schema } from "../database";+import { roleHasWorkspacePermission } from "./require-workspace-permission";+import { splitRoles } from "./split-roles";++export async function assertOwnerInvitationResendAllowed(+ userId: string,+ workspaceId: string,+ email: string,+): Promise<void> {+ const [member] = await db+ .select({ role: schema.workspaceUserTable.role })+ .from(schema.workspaceUserTable)+ .where(+ and(+ eq(schema.workspaceUserTable.userId, userId),+ eq(schema.workspaceUserTable.workspaceId, workspaceId),+ ),+ )+ .limit(1);+ // Let the provider report its normal membership/permission failures.+ if (!member || splitRoles(member.role).includes("owner")) return;+ if (+ !(await roleHasWorkspacePermission(workspaceId, member.role, {+ invitation: ["create"],+ }))+ )+ return;++ const invitations = await db+ .select({ role: schema.invitationTable.role })+ .from(schema.invitationTable)+ .where(+ and(+ eq(schema.invitationTable.workspaceId, workspaceId),+ eq(schema.invitationTable.email, email.toLowerCase()),+ eq(schema.invitationTable.status, "pending"),+ ),+ );+ if (+ invitations.some((invitation) =>+ splitRoles(invitation.role).includes("owner"),+ )+ ) {+ throw new APIError("FORBIDDEN", {+ code: "YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE",+ message: "You are not allowed to invite a user with this role",+ });+ }+}diff --git a/apps/api/src/utils/assert-public-destination.ts b/apps/api/src/utils/assert-public-destination.tsindex 89efaa0b9..b1e8826f7 100644--- a/apps/api/src/utils/assert-public-destination.ts+++ b/apps/api/src/utils/assert-public-destination.ts@@ -38,13 +38,60 @@ function mappedIpv4(ip: string): string | null {}function isDisallowedIpv6(ip: string): boolean {- const normalized = ip.toLowerCase();+ // DNS can return expanded/dotted spellings too. Use one canonical spelling+ // before matching prefixes or extracting IPv4 transition destinations.+ let normalized: string;+ try {+ normalized = new URL(`http://[${ip}]`).hostname.slice(1, -1);+ } catch {+ return true;+ }const mapped = mappedIpv4(normalized);if (mapped) {return isDisallowedIpv4(mapped);}+ const [head, tail] = normalized.split("::");+ const start = head ? head.split(":") : [];+ const end = tail ? tail.split(":") : [];+ const words = [+ ...start,+ ...Array<string>(8 - start.length - end.length).fill("0"),+ ...end,+ ].map((word) => Number.parseInt(word, 16));+ const ipv4 = (high: number, low: number) =>+ `${high >> 8}.${high & 0xff}.${low >> 8}.${low & 0xff}`;+ const embedded = (high: number, low: number) =>+ isDisallowedIpv4(ipv4(high, low));++ // RFC 3056 (6to4), RFC 6052 (NAT64), RFC 4291 (IPv4-compatible),+ // and RFC 4380 (Teredo) can route a global-looking IPv6 address to IPv4.+ if (words[0] === 0x2002) return embedded(words[1]!, words[2]!);+ if (words.slice(0, 6).every((word) => word === 0)) {+ return embedded(words[6]!, words[7]!);+ }+ if (+ words.slice(0, 4).every((word) => word === 0) &&+ words[4] === 0xffff &&+ words[5] === 0+ ) {+ return embedded(words[6]!, words[7]!);+ }+ if (+ words[0] === 0x64 &&+ words[1] === 0xff9b &&+ words.slice(2, 6).every((word) => word === 0)+ ) {+ return embedded(words[6]!, words[7]!);+ }+ if (words[0] === 0x2001 && words[1] === 0) {+ return (+ embedded(words[2]!, words[3]!) ||+ embedded(words[6]! ^ 0xffff, words[7]! ^ 0xffff)+ );+ }+return (normalized === "::" ||normalized === "::1" ||@@ -52,6 +99,8 @@ function isDisallowedIpv6(ip: string): boolean {normalized.startsWith("fe9") ||normalized.startsWith("fea") ||normalized.startsWith("feb") ||+ // RFC 8215 reserves this prefix for network-local translation.+ (words[0] === 0x64 && words[1] === 0xff9b && words[2] === 1) ||normalized.startsWith("fc") ||normalized.startsWith("fd"));@@ -103,11 +152,16 @@ export async function assertPublicDestination(return;}- if (isDisallowedAddress(url.hostname)) {+ const hostname = url.hostname.replace(/^\[|\]$/g, "");+ if (isDisallowedAddress(hostname)) {throw new Error(nonRoutableDestinationMessage(label));}- const addresses = await lookup(url.hostname, { all: true, verbatim: true });+ // Literal addresses do not use the socket's DNS lookup callback. Validate+ // them here, and avoid looking up bracketed IPv6 literals as hostnames.+ if (net.isIP(hostname)) return;++ const addresses = await lookup(hostname, { all: true, verbatim: true });if (addresses.length === 0) {throw new Error(`${label} destination could not be resolved`);}diff --git a/apps/api/src/utils/authenticate-api-request.ts b/apps/api/src/utils/authenticate-api-request.tsindex 4c0310adf..d04902577 100644--- a/apps/api/src/utils/authenticate-api-request.ts+++ b/apps/api/src/utils/authenticate-api-request.ts@@ -140,6 +140,7 @@ export async function authenticateApiRequest(c: Context): Promise<void> {export async function resolveAssetBearerOrCookie(c: Context): Promise<{userId: string;apiKeyId?: string;+ apiKeyPermissions?: Record<string, string[]> | null;}> {const { token, malformed } = parseBearerToken(c.req.header("Authorization"));if (malformed) {@@ -156,6 +157,7 @@ export async function resolveAssetBearerOrCookie(c: Context): Promise<{return {userId: apiKeyResult.key.userId,apiKeyId: apiKeyResult.key.id,+ apiKeyPermissions: apiKeyResult.key.permissions,};}@@ -166,6 +168,7 @@ export async function resolveAssetBearerOrCookie(c: Context): Promise<{return {userId: apiKeyResult.key.userId,apiKeyId: apiKeyResult.key.id,+ apiKeyPermissions: apiKeyResult.key.permissions,};}if (apiKeyResult) {diff --git a/apps/api/src/utils/authorize-asset-access.ts b/apps/api/src/utils/authorize-asset-access.tsindex 84f5f2306..dc27b75b6 100644--- a/apps/api/src/utils/authorize-asset-access.ts+++ b/apps/api/src/utils/authorize-asset-access.ts@@ -3,6 +3,7 @@ import { HTTPException } from "hono/http-exception";import { assertProjectAccess } from "../project-access/assert-project-access";import { resolveAssetBearerOrCookie } from "./authenticate-api-request";import { validateWorkspaceAccess } from "./validate-workspace-access";+import { workspacePermissionGrants } from "./workspace-permission-grants";type AssetAccessTarget = {workspaceId: string;@@ -25,7 +26,8 @@ export async function authorizeAssetAccess(return;}- const { userId, apiKeyId } = await resolveAssetBearerOrCookie(c);+ const { userId, apiKeyId, apiKeyPermissions } =+ await resolveAssetBearerOrCookie(c);await validateWorkspaceAccess(userId, asset.workspaceId, apiKeyId, {notFoundMessage: "Asset not found",});@@ -34,4 +36,15 @@ export async function authorizeAssetAccess(message: "Staged uploads are private to their owner",});await assertProjectAccess(userId, asset.projectId);+ const grants = await workspacePermissionGrants(userId, {+ apiKeyPermissions,+ workspaceIds: [asset.workspaceId],+ });+ // Drafts are the uploader's task-creation preview, before a task exists.+ const permissions = {+ task: [asset.surface.startsWith("draft") ? "create" : "read"],+ };+ if (!grants.allows(asset.workspaceId, permissions)) {+ throw new HTTPException(403, { message: "Insufficient asset permissions" });+ }}diff --git a/apps/api/src/utils/forward-auth-request.ts b/apps/api/src/utils/forward-auth-request.tsnew file mode 100644index 000000000..585d10592--- /dev/null+++ b/apps/api/src/utils/forward-auth-request.ts@@ -0,0 +1,49 @@+import type { Context } from "hono";+import { auth } from "../auth";+import { withJsonNotFound } from "../errors/not-found-response";+import { withJsonRateLimit } from "../errors/rate-limit-response";+import { apiKeyRejection } from "./api-key-rejection";+import { apiKeyResponseHeaders } from "./rate-limit-headers";+import { readApiKeyCheck, verifyApiKey } from "./verify-api-key";++export async function forwardAuthRequest(c: Context): Promise<Response> {+ c.header("Cache-Control", "no-store");+ const headers = new Headers(c.req.raw.headers);+ const bearerToken = headers+ .get("authorization")+ ?.match(/^Bearer\s+(\S+)$/i)?.[1];+ const apiKeyHeader = headers.get("x-api-key")?.trim();+ let bearerKey: string | undefined;+ if (bearerToken && !apiKeyHeader) {+ // Explicit bearer credentials never fall back to a browser's cookie.+ // This also applies to the separately registered native get-session route.+ headers.delete("cookie");+ const verified = await verifyApiKey(bearerToken, { consume: false });+ if (verified?.status === "valid") {+ headers.set("x-api-key", bearerToken);+ headers.delete("authorization");+ bearerKey = bearerToken;+ } else if (verified) {+ throw apiKeyRejection(verified);+ } else {+ const session = await auth.api.getSession({ headers });+ if (!session?.session || !session.user) throw apiKeyRejection(null);+ }+ }+ const response = await withJsonRateLimit(+ await withJsonNotFound(+ await auth.handler(new Request(c.req.raw, { headers })),+ ),+ );+ if (bearerKey) {+ c.set(+ "apiKeyHeaders",+ await apiKeyResponseHeaders(+ await readApiKeyCheck(bearerKey),+ response,+ new Date(),+ ),+ );+ }+ return response;+}diff --git a/apps/api/src/utils/hide-invitations-from-non-inviters.ts b/apps/api/src/utils/hide-invitations-from-non-inviters.tsnew file mode 100644index 000000000..3340876b1--- /dev/null+++ b/apps/api/src/utils/hide-invitations-from-non-inviters.ts@@ -0,0 +1,52 @@+import { and, eq } from "drizzle-orm";+import db, { schema } from "../database";+import { hasInstanceAdminRole } from "./instance-admin-role";+import { roleHasWorkspacePermission } from "./require-workspace-permission";+import { splitRoles } from "./split-roles";++export async function hideInvitationsFromNonInviters(+ viewer: { id: string; role?: string | null },+ invitations: unknown,+): Promise<void> {+ if (!Array.isArray(invitations) || invitations.length === 0) return;+ if (hasInstanceAdminRole(viewer.role)) return;++ // Invitation IDs authorize acceptance on instances without email delivery.+ // Membership alone must not expose those credentials.+ const allowed = new Map<string, { canInvite: boolean; owner: boolean }>();+ for (const invitation of invitations) {+ const workspaceId = invitation?.organizationId;+ if (typeof workspaceId !== "string" || allowed.has(workspaceId)) continue;+ const [member] = await db+ .select({ role: schema.workspaceUserTable.role })+ .from(schema.workspaceUserTable)+ .where(+ and(+ eq(schema.workspaceUserTable.workspaceId, workspaceId),+ eq(schema.workspaceUserTable.userId, viewer.id),+ ),+ )+ .limit(1);+ allowed.set(workspaceId, {+ canInvite: member+ ? await roleHasWorkspacePermission(workspaceId, member.role, {+ invitation: ["create"],+ })+ : false,+ owner: splitRoles(member?.role).includes("owner"),+ });+ }++ const visible = invitations.filter((invitation) => {+ const access = allowed.get(invitation?.organizationId);+ // Better Auth permits any inviter to assign admin/custom roles, but only+ // workspace owners may assign its creator role (owner), including in a+ // multi-role invitation.+ return (+ access?.canInvite &&+ typeof invitation?.role === "string" &&+ (access.owner || !splitRoles(invitation.role).includes("owner"))+ );+ });+ invitations.splice(0, invitations.length, ...visible);+}diff --git a/apps/api/src/utils/locked-session-revocation.ts b/apps/api/src/utils/locked-session-revocation.tsnew file mode 100644index 000000000..ce99dc20e--- /dev/null+++ b/apps/api/src/utils/locked-session-revocation.ts@@ -0,0 +1,24 @@+import { createAuthEndpoint, revokeOtherSessions } from "better-auth/api";+import { revokeOtherUserSessions } from "../database/auth-adapter";++export const lockedSessionRevocation = {+ id: "locked-session-revocation",+ endpoints: {+ // Override by the provider's endpoint key so HTTP and auth.api share the+ // same sensitive-session middleware, metadata and response contract.+ revokeOtherSessions: createAuthEndpoint(+ "/revoke-other-sessions",+ revokeOtherSessions.options,+ async (ctx) => {+ const { user, session } = ctx.context.session;+ await revokeOtherUserSessions(+ ctx.context.adapter,+ user.id,+ session.token,+ (tokens) => ctx.context.internalAdapter.deleteSessions(tokens),+ );+ return ctx.json({ status: true });+ },+ ),+ },+};diff --git a/apps/api/src/utils/native-auth-api-key.ts b/apps/api/src/utils/native-auth-api-key.tsnew file mode 100644index 000000000..2773eee09--- /dev/null+++ b/apps/api/src/utils/native-auth-api-key.ts@@ -0,0 +1,125 @@+import { APIError, getSessionFromCtx } from "better-auth/api";+import { apiKeyDenialHeaders } from "./rate-limit-headers";+import { type PermissionMap, satisfies } from "./role-permissions";+import { verifyApiKey } from "./verify-api-key";++type AuthContext = Parameters<typeof getSessionFromCtx>[0];++// These organization operations are used by the published CLI/mobile clients.+// Everything else (including new provider endpoints) requires a real session.+const organizationScopes: Record<string, PermissionMap> = {+ list: { workspace: ["read"] },+ "get-full-organization": { workspace: ["read"] },+ "list-members": { workspace: ["read"] },+ "get-active-member": { workspace: ["read"] },+ "get-active-member-role": {},+ "has-permission": {},+ "list-roles": { ac: ["read"] },+ "get-role": { ac: ["read"] },+ "create-role": { ac: ["create"] },+ "update-role": { ac: ["update"] },+ "delete-role": { ac: ["delete"] },+ "list-teams": { workspace: ["read"] },+ "list-user-teams": { workspace: ["read"] },+ "list-team-members": { workspace: ["read"] },+ "create-team": { team: ["create"] },+ "update-team": { team: ["update"] },+ "remove-team": { team: ["delete"] },+ "add-team-member": { team: ["update"] },+ "remove-team-member": { team: ["update"] },+ "set-active-team": { workspace: ["read"] },+ "list-invitations": { invitation: ["create"] },+ "invite-member": { invitation: ["create"] },+ "cancel-invitation": { invitation: ["cancel"] },+ "add-member": { member: ["create"] },+ "remove-member": { member: ["delete"] },+ "update-member-role": { member: ["update"] },+ update: { organization: ["update"] },+ delete: { organization: ["delete"] },+ "check-slug": { workspace: ["read"] },+ "set-active": { workspace: ["read"] },+ // Self-membership changes have no provider ACL action. Require explicit+ // workspace management authority from scoped keys; legacy keys retain usage.+ create: { workspace: ["manage_settings"] },+ leave: { workspace: ["manage_settings"] },+ "accept-invitation": { workspace: ["manage_settings"] },+ "reject-invitation": { workspace: ["manage_settings"] },+ "get-invitation": { workspace: ["manage_settings"] },+ "list-user-invitations": { workspace: ["manage_settings"] },+};++type VerifiedKey = Extract<+ Awaited<ReturnType<typeof verifyApiKey>>,+ { status: "valid" }+>["key"];+type Key = Pick<VerifiedKey, "id" | "userId" | "permissions">;++// The provider shares context between its hooks. Retain only verified scope,+// never the raw credential, for response filtering after its virtual session.+type BoundaryContext = AuthContext["context"] & { kaneoApiKey?: Key };++export function nativeAuthApiKey(ctx: AuthContext) {+ return (ctx.context as BoundaryContext).kaneoApiKey;+}++export async function assertNativeAuthApiKeyAllowed(ctx: AuthContext) {+ const credential = ctx.headers?.get("x-api-key");+ if (!credential) return;+ const operation = ctx.path?.startsWith("/organization/")+ ? ctx.path.slice("/organization/".length)+ : undefined;+ const required =+ operation === "get-active-member-role" && ctx.query?.userId+ ? { workspace: ["read"] }+ : operation+ ? organizationScopes[operation]+ : undefined;+ if (ctx.path !== "/get-session" && !required) {+ throw new APIError("FORBIDDEN", {+ code: "SESSION_REQUIRED",+ message: "A user session is required",+ });+ }+ const verified = await verifyApiKey(credential, { consume: false });+ if (verified && verified.status !== "valid") {+ throw new APIError(+ "TOO_MANY_REQUESTS",+ {+ code: "RATE_LIMITED",+ message:+ verified.status === "rate_limited"+ ? "Rate limit exceeded"+ : "API key usage limit exceeded",+ },+ apiKeyDenialHeaders(verified, new Date()),+ );+ }+ if (verified?.status !== "valid") {+ throw new APIError("UNAUTHORIZED", {+ code: "INVALID_API_KEY",+ message: "Invalid API key",+ });+ }+ const scope = verified.key.permissions;+ if (scope && required && !satisfies(scope, required)) {+ throw new APIError("FORBIDDEN", {+ code: "API_KEY_SCOPE",+ message: "Insufficient API key scope",+ });+ }+ if (+ scope &&+ operation === "has-permission" &&+ !satisfies(scope, ctx.body?.permissions ?? ctx.body?.permission ?? {})+ ) {+ throw new APIError("FORBIDDEN", {+ code: "API_KEY_SCOPE",+ message: "Insufficient API key scope",+ });+ }+ (ctx.context as BoundaryContext).kaneoApiKey = {+ id: verified.key.id,+ userId: verified.key.userId,+ permissions: verified.key.permissions,+ };+}diff --git a/apps/api/src/utils/native-organization-read-access.ts b/apps/api/src/utils/native-organization-read-access.tsnew file mode 100644index 000000000..fc55419b0--- /dev/null+++ b/apps/api/src/utils/native-organization-read-access.ts@@ -0,0 +1,154 @@+import { APIError, getSessionFromCtx } from "better-auth/api";+import { and, eq, inArray } from "drizzle-orm";+import db, { schema } from "../database";+import { rolesAllow, type StoredRolePermission } from "./role-permissions";+import { splitRoles } from "./split-roles";++type AuthContext = Parameters<typeof getSessionFromCtx>[0];++export async function readableNativeOrganizations(+ userId: string,+ workspaceIds: string[],+) {+ const ids = [...new Set(workspaceIds)];+ if (ids.length === 0) return new Set<string>();+ const members = await db+ .select({+ workspaceId: schema.workspaceUserTable.workspaceId,+ role: schema.workspaceUserTable.role,+ })+ .from(schema.workspaceUserTable)+ .where(+ and(+ eq(schema.workspaceUserTable.userId, userId),+ inArray(schema.workspaceUserTable.workspaceId, ids),+ ),+ );+ if (members.length === 0) return new Set<string>();+ const memberships = new Map<string, string>();+ for (const member of members) {+ if (!memberships.has(member.workspaceId)) {+ memberships.set(member.workspaceId, member.role);+ }+ }+ const roleNames = [...new Set([...memberships.values()].flatMap(splitRoles))];+ const storedRoles = roleNames.length+ ? await db+ .select({+ workspaceId: schema.workspaceRoleTable.workspaceId,+ role: schema.workspaceRoleTable.role,+ permission: schema.workspaceRoleTable.permission,+ })+ .from(schema.workspaceRoleTable)+ .where(+ and(+ inArray(schema.workspaceRoleTable.workspaceId, [+ ...memberships.keys(),+ ]),+ inArray(schema.workspaceRoleTable.role, roleNames),+ ),+ )+ : [];+ const byWorkspace = new Map<string, StoredRolePermission[]>();+ for (const stored of storedRoles) {+ const roles = byWorkspace.get(stored.workspaceId) ?? [];+ roles.push(stored);+ byWorkspace.set(stored.workspaceId, roles);+ }+ // Native organization routes require membership, even for instance admins.+ return new Set(+ [...memberships]+ .filter(([workspaceId, role]) =>+ rolesAllow(splitRoles(role), byWorkspace.get(workspaceId) ?? [], {+ workspace: ["read"],+ }),+ )+ .map(([workspaceId]) => workspaceId),+ );+}++export async function assertNativeOrganizationReadAllowed(+ ctx: AuthContext,+ viewer: {+ user: { id: string };+ session: {+ id?: string;+ activeOrganizationId?: unknown;+ activeTeamId?: unknown;+ };+ } | null,+) {+ const needsRead =+ [+ "/organization/get-full-organization",+ "/organization/list-members",+ "/organization/get-active-member",+ "/organization/set-active",+ "/organization/list-teams",+ "/organization/list-team-members",+ "/organization/set-active-team",+ ].includes(ctx.path ?? "") ||+ (ctx.path === "/organization/get-active-member-role" && ctx.query?.userId);+ if (!needsRead) return;+ if (!viewer) return; // Provider retains its normal authentication failure.+ // get-active-member ignores query parameters in the provider.+ const input =+ ctx.path === "/organization/get-active-member"+ ? undefined+ : ctx.path === "/organization/set-active" ||+ ctx.path === "/organization/set-active-team"+ ? ctx.body+ : ctx.query;+ if (ctx.path === "/organization/set-active" && input?.organizationId === null)+ return;+ let workspaceId =+ input?.organizationId || viewer.session.activeOrganizationId;+ if (+ ctx.path === "/organization/list-team-members" ||+ ctx.path === "/organization/set-active-team"+ ) {+ if (ctx.path === "/organization/set-active-team" && input?.teamId === null)+ return;+ const teamId = input?.teamId || viewer.session.activeTeamId;+ if (!teamId) return;+ const [team] = await db+ .select({ workspaceId: schema.teamTable.workspaceId })+ .from(schema.teamTable)+ .where(eq(schema.teamTable.id, teamId))+ .limit(1);+ workspaceId = team?.workspaceId;+ if (!workspaceId) return; // Provider reports team-not-found, with no data.+ }+ // Full/member reads give slug precedence over ID; set-active prefers ID.+ if (+ input?.organizationSlug &&+ [+ "/organization/get-full-organization",+ "/organization/list-members",+ "/organization/get-active-member-role",+ "/organization/set-active",+ ].includes(ctx.path ?? "") &&+ (ctx.path !== "/organization/set-active" || !input.organizationId)+ ) {+ const [workspace] = await db+ .select({ id: schema.workspaceTable.id })+ .from(schema.workspaceTable)+ .where(eq(schema.workspaceTable.slug, input.organizationSlug))+ .limit(1);+ workspaceId = workspace?.id;+ }+ // Keep the provider's null/no-active-organization behavior when there is no+ // target. An explicitly supplied missing slug still fails closed.+ if (!workspaceId && !input?.organizationSlug) return;+ if (+ typeof workspaceId !== "string" ||+ !(await readableNativeOrganizations(viewer.user.id, [workspaceId])).has(+ workspaceId,+ )+ ) {+ throw new APIError("FORBIDDEN", {+ code: "MISSING_PERMISSION",+ message: "Workspace read permission is required",+ });+ }+}diff --git a/apps/api/src/utils/outbound-request.ts b/apps/api/src/utils/outbound-request.tsindex 4cbd55349..329166bd3 100644--- a/apps/api/src/utils/outbound-request.ts+++ b/apps/api/src/utils/outbound-request.ts@@ -1,3 +1,5 @@+import { destinationFetch } from "../import/destination-fetch";+import { isBlockedDestinationError } from "../import/blocked-destination-error";import { assertPublicDestination } from "./assert-public-destination";import { withoutOutboundTelemetry } from "./sensitive-outbound";@@ -80,8 +82,11 @@ export async function sendOutboundRequest(}// DNS validation may finish after the deadline. Never start a late request.controller.signal.throwIfAborted();+ // Check the DNS answers used by the socket too, including new connections+ // after a pooled connection closes. A preflight alone permits rebinding.+ const send = options.publicDestination ? destinationFetch : fetch;const response = await withoutOutboundTelemetry(() =>- fetch(url, {+ send(url, {...init,method: "POST",redirect: "error",@@ -99,6 +104,9 @@ export async function sendOutboundRequest(return await Promise.race([request(), deadline]);} catch (error) {if (controller.signal.aborted) throw new OutboundRequestError("timeout");+ if (isBlockedDestinationError(error)) {+ throw new OutboundRequestError("destination");+ }if (error instanceof OutboundRequestError) throw error;throw new OutboundRequestError("network");} finally {diff --git a/apps/api/src/utils/pinned-outbound.test.ts b/apps/api/src/utils/pinned-outbound.test.tsnew file mode 100644index 000000000..eb5a5c8d9--- /dev/null+++ b/apps/api/src/utils/pinned-outbound.test.ts@@ -0,0 +1,140 @@+import { createServer, type Server } from "node:http";+import {+ afterEach,+ beforeEach,+ describe,+ expect,+ it,+ vi,+} from "vite-plus/test";+import { postToGenericWebhook } from "../plugins/generic-webhook/client";+import { giteaFetch } from "../plugins/gitea/utils/gitea-api";+import { gitlabFetch } from "../plugins/gitlab/utils/gitlab-api";+import { postToMattermost } from "../plugins/mattermost/client";+import { assertPublicDestination } from "./assert-public-destination";+import { sendOutboundRequest } from "./outbound-request";++const { preflightLookup, connectLookup } = vi.hoisted(() => ({+ preflightLookup: vi.fn(),+ connectLookup: vi.fn(),+}));+vi.mock("node:dns/promises", () => ({ lookup: preflightLookup }));+vi.mock("node:dns", async (importOriginal) => {+ const actual = await importOriginal<typeof import("node:dns")>();+ return {+ ...actual,+ default: { ...actual, lookup: connectLookup },+ };+});++let server: Server;+let port: number;+let connections: number;+let host: string | undefined;+let requestedPaths: Array<string | undefined>;+beforeEach(async () => {+ vi.stubEnv("KANEO_ALLOW_PRIVATE_WEBHOOK_DESTINATIONS", "");+ preflightLookup+ .mockReset()+ .mockResolvedValue([{ address: "93.184.216.34", family: 4 }]);+ connectLookup+ .mockReset()+ .mockImplementation((_hostname, _options, callback) => {+ callback(null, [{ address: "127.0.0.1", family: 4 }]);+ });+ vi.stubGlobal(+ "fetch",+ vi.fn().mockRejectedValue(new Error("Unexpected fetch")),+ );+ connections = 0;+ host = undefined;+ requestedPaths = [];+ server = createServer((request, response) => {+ host = request.headers.host;+ requestedPaths.push(request.url);+ request.resume();+ if (request.url === "/redirect") {+ response.writeHead(307, { Location: "/target" });+ }+ response.end("{}");+ });+ server.on("connection", () => connections++);+ await new Promise<void>((resolve) => server.listen(0, "127.0.0.1", resolve));+ const address = server.address();+ if (!address || typeof address === "string") throw new Error("Missing port");+ port = address.port;+});+afterEach(async () => {+ server.closeAllConnections();+ await new Promise<void>((resolve) => server.close(() => resolve()));+ vi.unstubAllGlobals();+ vi.unstubAllEnvs();+});++describe("outbound connection destination validation", () => {+ it.each([+ [+ "notification",+ (url: string) =>+ sendOutboundRequest(url, {}, { publicDestination: true }),+ ],+ [+ "generic webhook",+ (url: string) => postToGenericWebhook(url, { title: "Task" }),+ ],+ ["Gitea", (url: string) => giteaFetch(url, "token", "/user")],+ ["GitLab", (url: string) => gitlabFetch(url, "token", "private", "/user")],+ ["Mattermost", (url: string) => postToMattermost(url, { text: "Task" })],+ ] as const)(+ "blocks a private connection answer for %s",+ async (_name, send) => {+ await expect(send(`https://rebind.example:${port}`)).rejects.toThrow();+ expect(preflightLookup).toHaveBeenCalled();+ expect(connectLookup).toHaveBeenCalledWith(+ "rebind.example",+ expect.objectContaining({ all: true }),+ expect.any(Function),+ );+ expect(globalThis.fetch).not.toHaveBeenCalled();+ expect(connections).toBe(0);+ },+ );++ it("preserves the private-service opt-in and original HTTP host", async () => {+ vi.stubEnv("KANEO_ALLOW_PRIVATE_WEBHOOK_DESTINATIONS", "true");+ await sendOutboundRequest(+ `http://internal.example:${port}`,+ { body: "Message" },+ { publicDestination: true },+ );+ expect(host).toBe(`internal.example:${port}`);+ expect(connections).toBe(1);+ expect(globalThis.fetch).not.toHaveBeenCalled();+ });++ it("accepts a public IPv6 literal without a hostname lookup", async () => {+ await expect(+ assertPublicDestination("https://[2606:4700:4700::1111]", "Test"),+ ).resolves.toBeUndefined();+ expect(preflightLookup).not.toHaveBeenCalled();+ });++ it("keeps the fixed-service transport for requests without a custom destination", async () => {+ vi.mocked(globalThis.fetch).mockResolvedValue(new Response(null));+ await sendOutboundRequest("https://api.telegram.org/bot/test", {});+ expect(globalThis.fetch).toHaveBeenCalledOnce();+ expect(connectLookup).not.toHaveBeenCalled();+ });++ it("does not follow redirects through the guarded transport", async () => {+ vi.stubEnv("KANEO_ALLOW_PRIVATE_WEBHOOK_DESTINATIONS", "true");+ await expect(+ sendOutboundRequest(+ `http://redirect.example:${port}/redirect`,+ { body: "Message", headers: { Authorization: "Bearer token" } },+ { publicDestination: true },+ ),+ ).rejects.toMatchObject({ reason: "network" });+ expect(requestedPaths).toEqual(["/redirect"]);+ });+});diff --git a/apps/api/src/utils/verify-api-key.ts b/apps/api/src/utils/verify-api-key.tsindex 82c3fb3d0..0957fdba9 100644--- a/apps/api/src/utils/verify-api-key.ts+++ b/apps/api/src/utils/verify-api-key.ts@@ -13,7 +13,9 @@ async function hashApiKey(key: string): Promise<string> {.replace(/=/g, "");}-function parsePermissions(raw: string | null): Record<string, string[]> | null {+export function parsePermissions(+ raw: string | null,+): Record<string, string[]> | null {if (raw === null) return null;let value: unknown;diff --git a/apps/api/src/utils/workspace-permission-grants.ts b/apps/api/src/utils/workspace-permission-grants.tsnew file mode 100644index 000000000..ab1d6bd7e--- /dev/null+++ b/apps/api/src/utils/workspace-permission-grants.ts@@ -0,0 +1,96 @@+import { and, eq, inArray } from "drizzle-orm";+import db, { schema } from "../database";+import { hasInstanceAdminRole } from "./instance-admin-role";+import {+ type PermissionMap,+ rolesAllow,+ satisfies,+ type StoredRolePermission,+} from "./role-permissions";+import { splitRoles } from "./split-roles";+import { notBannedCondition } from "./user-ban";++// Resolve current grants once for a request spanning multiple workspaces.+// Role rows must stay grouped by workspace: the same role name can differ.+export async function workspacePermissionGrants(+ userId: string,+ {+ apiKeyPermissions,+ workspaceIds,+ }: {+ apiKeyPermissions?: PermissionMap | null;+ workspaceIds?: string[];+ } = {},+) {+ const [users, members] = await Promise.all([+ db+ .select({ role: schema.userTable.role })+ .from(schema.userTable)+ .where(and(eq(schema.userTable.id, userId), notBannedCondition()))+ .limit(1),+ db+ .select({+ workspaceId: schema.workspaceUserTable.workspaceId,+ role: schema.workspaceUserTable.role,+ })+ .from(schema.workspaceUserTable)+ .where(+ and(+ eq(schema.workspaceUserTable.userId, userId),+ workspaceIds+ ? inArray(schema.workspaceUserTable.workspaceId, workspaceIds)+ : undefined,+ ),+ ),+ ]);+ const isInstanceAdmin = hasInstanceAdminRole(users[0]?.role);+ const memberRoles = new Map(+ members.map((member) => [member.workspaceId, splitRoles(member.role)]),+ );+ const memberWorkspaceIds = [...memberRoles.keys()];+ const roleNames = [...new Set([...memberRoles.values()].flat())];+ const stored =+ !isInstanceAdmin && memberWorkspaceIds.length && roleNames.length+ ? await db+ .select({+ workspaceId: schema.workspaceRoleTable.workspaceId,+ role: schema.workspaceRoleTable.role,+ permission: schema.workspaceRoleTable.permission,+ })+ .from(schema.workspaceRoleTable)+ .where(+ and(+ inArray(+ schema.workspaceRoleTable.workspaceId,+ memberWorkspaceIds,+ ),+ inArray(schema.workspaceRoleTable.role, roleNames),+ ),+ )+ : [];+ const storedByWorkspace = new Map<string, StoredRolePermission[]>();+ for (const row of stored) {+ const rows = storedByWorkspace.get(row.workspaceId) ?? [];+ rows.push(row);+ storedByWorkspace.set(row.workspaceId, rows);+ }++ return {+ isInstanceAdmin,+ workspaceIds: memberWorkspaceIds,+ allows(workspaceId: string, permissions: PermissionMap) {+ if (!users.length) return false;+ if (apiKeyPermissions && !satisfies(apiKeyPermissions, permissions)) {+ return false;+ }+ return (+ isInstanceAdmin ||+ rolesAllow(+ memberRoles.get(workspaceId) ?? [],+ storedByWorkspace.get(workspaceId) ?? [],+ permissions,+ )+ );+ },+ };+}diff --git a/apps/api/src/workflow-rule/index.ts b/apps/api/src/workflow-rule/index.tsindex a9a9d2c82..ec508a604 100644--- a/apps/api/src/workflow-rule/index.ts+++ b/apps/api/src/workflow-rule/index.ts@@ -24,11 +24,14 @@ const getWorkflowRulesRoute = createRoute({summary: "Get workflow rules",description:"Get every workflow rule for a project. A rule moves a task to a column when an integration event fires.",- middleware: [workspaceAccess.fromProject("projectId")] as const,+ middleware: [+ workspaceAccess.fromProject("projectId"),+ requireWorkspacePermission({ project: ["read"] }),+ ] as const,request: { params: projectIdParam },responses: {200: jsonResponse("List of workflow rules", workflowRuleListSchema),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Project not found"),},});diff --git a/apps/api/src/workspace/index.ts b/apps/api/src/workspace/index.tsindex 59076c023..4028ae937 100644--- a/apps/api/src/workspace/index.ts+++ b/apps/api/src/workspace/index.ts@@ -75,11 +75,14 @@ const getWorkspaceMembersRoute = createRoute({summary: "Get workspace members",description:"Get all members of a workspace, with their role. Pass projectId to get only the members who can access that project.",- middleware: [workspaceAccess.fromParam("workspaceId")] as const,+ middleware: [+ workspaceAccess.fromParam("workspaceId"),+ requireWorkspacePermission({ workspace: ["read"] }),+ ] as const,request: { params: workspaceIdParam, query: workspaceMembersQuery },responses: {200: jsonResponse("List of workspace members", workspaceMemberListSchema),- 403: errorResponse("No access to the project"),+ 403: errorResponse("No access to the project, or missing read permission"),404: errorResponse("Workspace not found, or project not found in this workspace",),diff --git a/apps/api/src/ws/index.ts b/apps/api/src/ws/index.tsindex 1ebfa1006..3ab112d47 100644--- a/apps/api/src/ws/index.ts+++ b/apps/api/src/ws/index.ts@@ -31,6 +31,7 @@ import type {} from "./broadcast-adapter";import { InMemoryBroadcastAdapter } from "./in-memory-broadcast-adapter";import { RedisBroadcastAdapter } from "./redis-broadcast-adapter";+import { getProjectReadAccess } from "./project-read-access";const INSTANCE_ID = randomUUID();let revocationDelivery: ReturnType<typeof createRevocationDelivery> | undefined;@@ -43,6 +44,7 @@ type ProjectConnection = {userId: string;initiatorId: string;workspaceId: string;+ apiKeyId?: string;};type UserConnection = {@@ -459,15 +461,27 @@ const authorizationLookups = new Map<workspaceId: string | null;members: Set<string>;restricted: Set<string>;+ readers: Set<string>;+ apiKeys: Map<string, string>;} | null>>();function currentBroadcastAccess(projectId: string,- recipients: Array<{ userId: string }>,+ recipients: Array<{ userId: string; apiKeyId?: string }>,authorizationBatch: string,) {const userIds = [...new Set(recipients.map((conn) => conn.userId))].sort();- const key = JSON.stringify([projectId, authorizationBatch, userIds]);+ const apiKeyIds = [+ ...new Set(+ recipients.flatMap((conn) => (conn.apiKeyId ? [conn.apiKeyId] : [])),+ ),+ ].sort();+ const key = JSON.stringify([+ projectId,+ authorizationBatch,+ userIds,+ apiKeyIds,+ ]);let pending = authorizationLookups.get(key);if (!pending) {pending = (async () => {@@ -480,11 +494,16 @@ function currentBroadcastAccess(}let members = new Set<string>();let restricted = new Set<string>();+ let readers = new Set<string>();+ let apiKeys = new Map<string, string>();if (workspaceId) {try {const [rows, permitted] = await Promise.all([db- .select({ userId: workspaceUserTable.userId })+ .select({+ userId: workspaceUserTable.userId,+ role: workspaceUserTable.role,+ }).from(workspaceUserTable).where(and(@@ -498,6 +517,11 @@ function currentBroadcastAccess(restricted = new Set(userIds.filter((userId) => !permitted.has(userId)),);+ ({ readers, apiKeys } = await getProjectReadAccess(+ workspaceId,+ recipients,+ rows,+ ));const nonmembers = userIds.filter((userId) => !members.has(userId));if (nonmembers.length > 0) {const admins = await db@@ -516,7 +540,7 @@ function currentBroadcastAccess(return null;}}- return { workspaceId, members, restricted };+ return { workspaceId, members, restricted, readers, apiKeys };})().finally(() => authorizationLookups.delete(key));authorizationLookups.set(key, pending);}@@ -542,7 +566,7 @@ async function deliverToLocalConnections(authorizationBatch,);if (!access) return;- const { workspaceId, members, restricted } = access;+ const { workspaceId, members, restricted, readers, apiKeys } = access;const payload = JSON.stringify(message);for (const conn of recipients) {// A move may have closed these connections while the lookup was in flight.@@ -554,7 +578,10 @@ async function deliverToLocalConnections(? "Workspace access revoked": restricted.has(conn.userId)? "Project access revoked"- : null;+ : !readers.has(conn.userId) ||+ (conn.apiKeyId && apiKeys.get(conn.apiKeyId) !== conn.userId)+ ? "Read permission revoked"+ : null;if (revoked) {removeConnection(projectId, conn);try {@@ -579,11 +606,18 @@ export function addConnection(userId: string,initiatorId: string,workspaceId: string,+ apiKeyId?: string,) {if (!projectConnections.has(projectId)) {projectConnections.set(projectId, new Set());}- const conn: ProjectConnection = { ws, userId, initiatorId, workspaceId };+ const conn: ProjectConnection = {+ ws,+ userId,+ initiatorId,+ workspaceId,+ ...(apiKeyId ? { apiKeyId } : {}),+ };projectConnections.get(projectId)?.add(conn);return conn;}diff --git a/apps/api/src/ws/project-read-access.ts b/apps/api/src/ws/project-read-access.tsnew file mode 100644index 000000000..32c15e7c5--- /dev/null+++ b/apps/api/src/ws/project-read-access.ts@@ -0,0 +1,95 @@+import { and, eq, gt, inArray, isNull, or } from "drizzle-orm";+import db, { schema } from "../database";+import { hasInstanceAdminRole } from "../utils/instance-admin-role";+import { rolesAllow, satisfies } from "../utils/role-permissions";+import { splitRoles } from "../utils/split-roles";+import { notBannedCondition } from "../utils/user-ban";+import { parsePermissions } from "../utils/verify-api-key";+import { PROJECT_READ_PERMISSIONS } from "./project-read-permissions";++export async function getProjectReadAccess(+ workspaceId: string,+ recipients: Array<{ userId: string; apiKeyId?: string }>,+ members: Array<{ userId: string; role: string }>,+) {+ const readers = new Set<string>();+ const apiKeys = new Map<string, string>();+ const userIds = [...new Set(recipients.map((conn) => conn.userId))];+ if (userIds.length === 0) return { readers, apiKeys };++ const roleNames = [+ ...new Set(members.flatMap((member) => splitRoles(member.role))),+ ];+ const [users, stored] = await Promise.all([+ db+ .select({ id: schema.userTable.id, role: schema.userTable.role })+ .from(schema.userTable)+ .where(and(inArray(schema.userTable.id, userIds), notBannedCondition())),+ roleNames.length+ ? db+ .select({+ role: schema.workspaceRoleTable.role,+ permission: schema.workspaceRoleTable.permission,+ })+ .from(schema.workspaceRoleTable)+ .where(+ and(+ eq(schema.workspaceRoleTable.workspaceId, workspaceId),+ inArray(schema.workspaceRoleTable.role, roleNames),+ ),+ )+ : [],+ ]);+ const membershipRoles = new Map(+ members.map((member) => [member.userId, member.role]),+ );+ for (const user of users) {+ if (+ hasInstanceAdminRole(user.role) ||+ rolesAllow(+ splitRoles(membershipRoles.get(user.id)),+ stored,+ PROJECT_READ_PERMISSIONS,+ )+ ) {+ readers.add(user.id);+ }+ }++ const apiKeyIds = [+ ...new Set(+ recipients.flatMap((conn) => (conn.apiKeyId ? [conn.apiKeyId] : [])),+ ),+ ];+ if (apiKeyIds.length) {+ const keys = await db+ .select({+ id: schema.apikeyTable.id,+ referenceId: schema.apikeyTable.referenceId,+ userId: schema.apikeyTable.userId,+ permissions: schema.apikeyTable.permissions,+ })+ .from(schema.apikeyTable)+ .where(+ and(+ inArray(schema.apikeyTable.id, apiKeyIds),+ eq(schema.apikeyTable.enabled, true),+ or(+ isNull(schema.apikeyTable.expiresAt),+ gt(schema.apikeyTable.expiresAt, new Date()),+ ),+ ),+ );+ for (const key of keys) {+ const permissions = parsePermissions(key.permissions);+ const owner = key.referenceId ?? key.userId;+ if (+ owner &&+ (!permissions || satisfies(permissions, PROJECT_READ_PERMISSIONS))+ ) {+ apiKeys.set(key.id, owner);+ }+ }+ }+ return { readers, apiKeys };+}diff --git a/apps/api/src/ws/project-read-permissions.ts b/apps/api/src/ws/project-read-permissions.tsnew file mode 100644index 000000000..4ea5e9f96--- /dev/null+++ b/apps/api/src/ws/project-read-permissions.ts@@ -0,0 +1,4 @@+export const PROJECT_READ_PERMISSIONS = {+ project: ["read"],+ task: ["read"],+};diff --git a/apps/docs/openapi.json b/apps/docs/openapi.jsonindex e196867dc..ce17fb39d 100644--- a/apps/docs/openapi.json+++ b/apps/docs/openapi.json@@ -8983,6 +8983,16 @@}}},+ "403": {+ "description": "Missing read permission",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ApiError"+ }+ }+ }+ },"404": {"description": "Workspace not found","content": {@@ -9142,7 +9152,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -9391,7 +9401,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -10284,7 +10294,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -10398,7 +10408,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -10661,7 +10671,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -11493,7 +11503,7 @@"Tasks"],"summary": "Get task by ticket ID",- "description": "Get a single task by its project key and number, such as KAN-12. A match in an active project takes precedence, then the most recently archived project. If the ticket ID still matches multiple accessible tasks, narrow the lookup to a workspace with workspaceId or workspaceSlug, or to a single project with projectId.",+ "description": "Get a single task by its project key and number, such as KAN-12. Only tasks with current task:read permission and API key scope are considered. A match in an active project takes precedence, then the most recently archived project. If the ticket ID still matches multiple accessible tasks, narrow the lookup to a workspace with workspaceId or workspaceSlug, or to a single project with projectId.","parameters": [{"schema": {@@ -11650,7 +11660,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -12024,7 +12034,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -13027,7 +13037,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -13576,7 +13586,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -13854,7 +13864,7 @@}},"403": {- "description": "Not the author, or no access to the project",+ "description": "Not the author, no access to the project, or missing task:update permission","content": {"application/json": {"schema": {@@ -13935,7 +13945,7 @@}},"403": {- "description": "Not the author, or no access to the project",+ "description": "Not the author, no access to the project, or missing task:update permission","content": {"application/json": {"schema": {@@ -14003,7 +14013,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -14339,7 +14349,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -14404,7 +14414,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -14671,7 +14681,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -14738,6 +14748,16 @@}}},+ "403": {+ "description": "Missing read permission",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ApiError"+ }+ }+ }+ },"404": {"description": "Workspace not found","content": {@@ -14898,7 +14918,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -15291,7 +15311,7 @@"Notifications"],"summary": "List notifications",- "description": "Get up to 50 notifications for the current user, read and unread. Optionally limit them to one workspace before applying the limit.",+ "description": "Get up to 50 notifications for the current user, read and unread. Resource notifications require current read permission and API key scope. Optionally limit them to one workspace before applying the limit.","parameters": [{"schema": {@@ -15441,7 +15461,7 @@"Notifications"],"summary": "Mark notification read",- "description": "Mark one notification as read. Scoped to the current user, so another user's notification is not found.",+ "description": "Mark one notification as read. Only the current user's notifications with current resource read permission and API key scope are accessible.","parameters": [{"schema": {@@ -15496,7 +15516,7 @@"Notifications"],"summary": "Mark notification unread",- "description": "Mark one notification as unread again. Scoped to the current user, so another user's notification is not found.",+ "description": "Mark one notification as unread again. Only the current user's notifications with current resource read permission and API key scope are accessible.","parameters": [{"schema": {@@ -15551,7 +15571,7 @@"Notifications"],"summary": "Mark all read",- "description": "Mark notifications for the current user as read, optionally limited to one workspace.",+ "description": "Mark accessible notifications for the current user as read, optionally limited to one workspace. Resource notifications require current read permission and API key scope.","parameters": [{"schema": {@@ -15599,7 +15619,7 @@"Notifications"],"summary": "Clear all",- "description": "Permanently delete notifications for the current user, optionally limited to one workspace. This cannot be undone.",+ "description": "Permanently delete accessible notifications for the current user, optionally limited to one workspace. Resource notifications require current read permission and API key scope. This cannot be undone.","parameters": [{"schema": {@@ -15647,7 +15667,7 @@"Notifications"],"summary": "Clear read notifications",- "description": "Permanently delete the current user's read notifications, optionally limited to one workspace. Unread notifications are kept. This cannot be undone.",+ "description": "Permanently delete the current user's accessible read notifications, optionally limited to one workspace. Resource notifications require current read permission and API key scope. Unread notifications are kept. This cannot be undone.","parameters": [{"schema": {@@ -15695,7 +15715,7 @@"Notifications"],"summary": "Delete notification",- "description": "Permanently delete one notification. Scoped to the current user, so another user's notification is not found.",+ "description": "Permanently delete one notification. Only the current user's notifications with current resource read permission and API key scope are accessible. Other notifications are not found.","parameters": [{"schema": {@@ -16185,6 +16205,16 @@}}},+ "403": {+ "description": "Missing read permission for the requested search type",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ApiError"+ }+ }+ }+ },"404": {"description": "Workspace not found","content": {@@ -17304,7 +17334,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing project:read permission","content": {"application/json": {"schema": {@@ -17977,7 +18007,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing project:read permission","content": {"application/json": {"schema": {@@ -18605,7 +18635,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing project:read permission","content": {"application/json": {"schema": {@@ -19036,7 +19066,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing project:read permission","content": {"application/json": {"schema": {@@ -19460,7 +19490,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing project:read permission","content": {"application/json": {"schema": {@@ -19834,7 +19864,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing project:read permission","content": {"application/json": {"schema": {@@ -20208,7 +20238,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing project:read permission","content": {"application/json": {"schema": {@@ -20582,7 +20612,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing project:read permission","content": {"application/json": {"schema": {@@ -20977,7 +21007,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -21313,7 +21343,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -21464,7 +21494,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {@@ -21910,7 +21940,7 @@}},"403": {- "description": "No access to the project",+ "description": "No access to the project, or missing read permission","content": {"application/json": {"schema": {diff --git a/apps/mobile/app.json b/apps/mobile/app.jsonindex 5c63fb32c..479b98d51 100644--- a/apps/mobile/app.json+++ b/apps/mobile/app.json@@ -2,7 +2,7 @@"expo": {"name": "Kaneo","slug": "kaneo",- "version": "0.3.1",+ "version": "0.3.2","orientation": "portrait","icon": "./assets/images/icon.png","scheme": "kaneo",@@ -24,7 +24,7 @@},"android": {"package": "de.usekaneo.kaneo",- "versionCode": 4,+ "versionCode": 5,"adaptiveIcon": {"backgroundColor": "#141414","foregroundImage": "./assets/images/android-icon-foreground.png",diff --git a/apps/web/Dockerfile b/apps/web/Dockerfileindex b22514e5d..73edcecae 100644--- a/apps/web/Dockerfile+++ b/apps/web/Dockerfile@@ -1,6 +1,6 @@# syntax=docker/dockerfile:1# Build stage-FROM --platform=$BUILDPLATFORM node:24.19.0-alpine AS builder+FROM --platform=$BUILDPLATFORM node:24.22.1-alpine AS builder# Sentry org/project are public identifiers (not secrets). The auth token# is the only real secret; it is mounted via `--mount=type=secret` during@@ -19,6 +19,7 @@ WORKDIR /app# Copy package files first for better layer cachingCOPY pnpm-workspace.yaml pnpm-lock.yaml package.json vite.config.ts ./+COPY patches ./patchesCOPY apps/web/package.json ./apps/web/COPY packages/typescript-config/package.json ./packages/typescript-config/COPY packages/libs/package.json ./packages/libs/@@ -48,7 +49,7 @@ RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN,required=false \pnpm run build && find dist -type f -name '*.map' -delete# Production stage with specific version-FROM nginx:1.29.5-alpine AS runtime+FROM nginx:1.30.6-alpine AS runtime# Only runtime storage needs write access, including for an arbitrary UID.RUN addgroup -g 1001 appuser && \diff --git a/apps/web/package.json b/apps/web/package.jsonindex fdbc64e58..1dac531a4 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -79,7 +79,7 @@"file-saver": "^2.0.5","framer-motion": "^13.4.6","highlight.js": "^11.12.0",- "hono": "^4.13.12",+ "hono": "^4.13.14","i18next": "^26.4.2","i18next-resources-to-backend": "^1.2.1","immer": "^11.1.18",@@ -102,7 +102,7 @@"tippy.js": "^6.3.7","turndown": "^7.2.4","turndown-plugin-gfm": "^1.0.2",- "zod": "^4.6.5",+ "zod": "^4.6.7","zustand": "^5.0.15"},"devDependencies": {diff --git a/package.json b/package.jsonindex 31d7ba822..ec3b72c1d 100644--- a/package.json+++ b/package.json@@ -14,6 +14,7 @@"i18n:schema": "node ./scripts/i18n/schema.mjs && vp fmt i18n/schema.json","lint": "vp check","test": "vp run -r test",+ "test:security:dependencies": "node --test scripts/security/dependency-*.test.mjs","test:integration": "vp run -r test:integration","test:e2e": "pnpm --dir tests/e2e test","test:browserstack": "pnpm --dir tests/e2e test:browserstack",@@ -35,6 +36,7 @@"semantic-release": "^25.0.9","tar-fs": ">=3.1.3","typescript": "7.0.2",+ "vite": "catalog:","vite-plus": "catalog:"},"engines": {diff --git a/packages/email/package.json b/packages/email/package.jsonindex 19e2f57ad..cc9fdfb60 100644--- a/packages/email/package.json+++ b/packages/email/package.json@@ -23,7 +23,7 @@"@react-email/components": "1.0.12","@types/node": "^26.6.2","@types/nodemailer": "^8.0.1",- "nodemailer": "^10.1.4",+ "nodemailer": "^10.2.1","react": "^19.3.0","react-dom": "^19.3.0"},diff --git a/packages/mcp/package.json b/packages/mcp/package.jsonindex ebfcc9efb..996ee3a47 100644--- a/packages/mcp/package.json+++ b/packages/mcp/package.json@@ -64,10 +64,10 @@"test:watch": "vp test --config vitest.config.ts"},"dependencies": {- "@modelcontextprotocol/sdk": "1.32.0",+ "@modelcontextprotocol/sdk": "1.32.2","open": "^11.0.4","prompts": "^2.4.2",- "zod": "^4.6.5"+ "zod": "^4.6.7"},"devDependencies": {"@kaneo/typescript-config": "workspace:*",diff --git a/patches/[email protected] b/patches/[email protected]new file mode 100644index 000000000..4e1eb7c64--- /dev/null+++ b/patches/[email protected]@@ -0,0 +1,23 @@+diff --git a/lib/rsa.js b/lib/rsa.js+index a4264822b..430905451 100644+--- a/lib/rsa.js++++ b/lib/rsa.js+@@ -1168,11 +1168,16 @@ pki.setRsaPublicKey = pki.rsa.setPublicKey = function(n, e) {+ parseAllBytes: options._parseAllDigestBytes+ });++- // validate DigestInfo structure and element count++ // validate DigestInfo structure and element counts (outer DigestInfo++ // and nested DigestAlgorithm). asn1.validate ignores extra children,++ // so length must be checked explicitly at each nesting level to++ // prevent low-exponent PKCS#1 v1.5 signature forgery (CVE-2026-85393).+ var capture = {};+ var errors = [];+ if(!asn1.validate(obj, digestInfoValidator, capture, errors) ||+- obj.value.length !== 2) {++ obj.value.length !== 2 ||++ obj.value[0].value.length !==++ (('parameters' in capture) ? 2 : 1)) {+ var error = new Error(+ 'ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 ' ++ 'DigestInfo value.');diff --git a/patches/[email protected] b/patches/[email protected]new file mode 100644index 000000000..2b486f725--- /dev/null+++ b/patches/[email protected]@@ -0,0 +1,279 @@+diff --git a/src/v3/types.ts b/src/v3/types.ts+--- a/src/v3/types.ts++++ b/src/v3/types.ts+@@ -2263,6 +2263,7 @@+ exact: true,+ message: def.exactLength.message,+ });++ if (tooBig) return INVALID;+ status.dirty();+ }+ }+@@ -2291,7 +2292,7 @@+ exact: false,+ message: def.maxLength.message,+ });+- status.dirty();++ return INVALID;+ }+ }++@@ -3723,7 +3724,7 @@+ exact: false,+ message: def.maxSize.message,+ });+- status.dirty();++ return INVALID;+ }+ }++diff --git a/v3/types.js b/v3/types.js+--- a/v3/types.js++++ b/v3/types.js+@@ -1769,6 +1769,7 @@+ exact: true,+ message: def.exactLength.message,+ });++ if (tooBig) return INVALID;+ status.dirty();+ }+ }+@@ -1795,7 +1796,7 @@+ exact: false,+ message: def.maxLength.message,+ });+- status.dirty();++ return INVALID;+ }+ }+ if (ctx.common.async) {+@@ -2814,7 +2815,7 @@+ exact: false,+ message: def.maxSize.message,+ });+- status.dirty();++ return INVALID;+ }+ }+ const valueType = this._def.valueType;+diff --git a/v3/types.cjs b/v3/types.cjs+--- a/v3/types.cjs++++ b/v3/types.cjs+@@ -1790,6 +1790,7 @@+ exact: true,+ message: def.exactLength.message,+ });++ if (tooBig) return parseUtil_js_1.INVALID;+ status.dirty();+ }+ }+@@ -1816,7 +1817,7 @@+ exact: false,+ message: def.maxLength.message,+ });+- status.dirty();++ return parseUtil_js_1.INVALID;+ }+ }+ if (ctx.common.async) {+@@ -2843,7 +2844,7 @@+ exact: false,+ message: def.maxSize.message,+ });+- status.dirty();++ return parseUtil_js_1.INVALID;+ }+ }+ const valueType = this._def.valueType;+diff --git a/src/v4/core/schemas.ts b/src/v4/core/schemas.ts+--- a/src/v4/core/schemas.ts++++ b/src/v4/core/schemas.ts+@@ -1507,6 +1507,36 @@++ export interface $ZodArray<T extends SomeType = $ZodType> extends $ZodType<any, any, $ZodArrayInternals<T>> {}+++// Reject oversized bounded containers before parsing elements, including v4 embedded in zod 3.++function capSize(inst: $ZodType, size: (input: any) => number): void {++ const caps: [number, checks.$ZodCheck<never>][] = [];++ for (const ch of inst._zod.def.checks ?? []) {++ const d = ch._zod.def as any;++ // A preceding check can rewrite the container, so later bounds cannot gate its raw size.++ if (!/_(length|size)$|_equals$/.test(d.check)) break;++ const max = d.maximum ?? d.length ?? d.size;++ if (max >= 0) caps.push([max, ch]);++ }++ if (!caps.length) return;++ // Classic and Mini initialize their base again; install after all initializers.++ inst._zod.deferred ??= [];++ inst._zod.deferred.push(() => {++ const run = inst._zod.run;++ inst._zod.run = (payload, ctx) => {++ const n = size(payload.value);++ for (const [max, ch] of caps) {++ if (n > max && ch._zod.def.when!(payload)) {++ const start = payload.issues.length;++ ch._zod.check(payload as ParsePayload<never>);++ (payload.issues[start] as { continue?: boolean }).continue = false;++ return payload;++ }++ }++ return run(payload, ctx);++ };++ });++}+++ function handleArrayResult(result: ParsePayload<any>, final: ParsePayload<any[]>, index: number) {+ if (result.issues.length) {+ final.issues.push(...util.prefixIssues(index, result.issues));+@@ -1555,6 +1585,7 @@++ return payload; //handleArrayResultsAsync(parseResults, final);+ };++ capSize(inst, (input) => Array.isArray(input) ? input.length : -1);+ });++ //////////////////////////////////////////+@@ -2599,6 +2630,7 @@+ if (proms.length) return Promise.all(proms).then(() => payload);+ return payload;+ };++ capSize(inst, (input) => input instanceof Map ? input.size : -1);+ });++ function handleMapResult(+@@ -2691,6 +2723,7 @@+ if (proms.length) return Promise.all(proms).then(() => payload);+ return payload;+ };++ capSize(inst, (input) => input instanceof Set ? input.size : -1);+ });++ function handleSetResult(result: ParsePayload, final: ParsePayload<Set<any>>) {+diff --git a/v4/core/schemas.js b/v4/core/schemas.js+--- a/v4/core/schemas.js++++ b/v4/core/schemas.js+@@ -613,6 +613,36 @@+ return payload;+ };+ });++// Reject oversized bounded containers before parsing elements, including v4 embedded in zod 3.++function capSize(inst, size) {++ const caps = [];++ for (const ch of inst._zod.def.checks ?? []) {++ const d = ch._zod.def;++ // A preceding check can rewrite the container, so later bounds cannot gate its raw size.++ if (!/_(length|size)$|_equals$/.test(d.check)) break;++ const max = d.maximum ?? d.length ?? d.size;++ if (max >= 0) caps.push([max, ch]);++ }++ if (!caps.length) return;++ // Classic and Mini initialize their base again; install after all initializers.++ inst._zod.deferred ??= [];++ inst._zod.deferred.push(() => {++ const run = inst._zod.run;++ inst._zod.run = (payload, ctx) => {++ const n = size(payload.value);++ for (const [max, ch] of caps) {++ if (n > max && ch._zod.def.when(payload)) {++ const start = payload.issues.length;++ ch._zod.check(payload);++ payload.issues[start].continue = false;++ return payload;++ }++ }++ return run(payload, ctx);++ };++ });++}+++ function handleArrayResult(result, final, index) {+ if (result.issues.length) {+ final.issues.push(...util.prefixIssues(index, result.issues));+@@ -652,6 +682,7 @@+ }+ return payload; //handleArrayResultsAsync(parseResults, final);+ };++ capSize(inst, (input) => Array.isArray(input) ? input.length : -1);+ });+ function handleObjectResult(result, final, key) {+ // if(isOptional)+@@ -1273,6 +1304,7 @@+ return Promise.all(proms).then(() => payload);+ return payload;+ };++ capSize(inst, (input) => input instanceof Map ? input.size : -1);+ });+ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {+ if (keyResult.issues.length) {+@@ -1333,6 +1365,7 @@+ return Promise.all(proms).then(() => payload);+ return payload;+ };++ capSize(inst, (input) => input instanceof Set ? input.size : -1);+ });+ function handleSetResult(result, final) {+ if (result.issues.length) {+diff --git a/v4/core/schemas.cjs b/v4/core/schemas.cjs+--- a/v4/core/schemas.cjs++++ b/v4/core/schemas.cjs+@@ -644,6 +644,36 @@+ return payload;+ };+ });++// Reject oversized bounded containers before parsing elements, including v4 embedded in zod 3.++function capSize(inst, size) {++ const caps = [];++ for (const ch of inst._zod.def.checks ?? []) {++ const d = ch._zod.def;++ // A preceding check can rewrite the container, so later bounds cannot gate its raw size.++ if (!/_(length|size)$|_equals$/.test(d.check)) break;++ const max = d.maximum ?? d.length ?? d.size;++ if (max >= 0) caps.push([max, ch]);++ }++ if (!caps.length) return;++ // Classic and Mini initialize their base again; install after all initializers.++ inst._zod.deferred ??= [];++ inst._zod.deferred.push(() => {++ const run = inst._zod.run;++ inst._zod.run = (payload, ctx) => {++ const n = size(payload.value);++ for (const [max, ch] of caps) {++ if (n > max && ch._zod.def.when(payload)) {++ const start = payload.issues.length;++ ch._zod.check(payload);++ payload.issues[start].continue = false;++ return payload;++ }++ }++ return run(payload, ctx);++ };++ });++}+++ function handleArrayResult(result, final, index) {+ if (result.issues.length) {+ final.issues.push(...util.prefixIssues(index, result.issues));+@@ -683,6 +713,7 @@+ }+ return payload; //handleArrayResultsAsync(parseResults, final);+ };++ capSize(inst, (input) => Array.isArray(input) ? input.length : -1);+ });+ function handleObjectResult(result, final, key) {+ // if(isOptional)+@@ -1304,6 +1335,7 @@+ return Promise.all(proms).then(() => payload);+ return payload;+ };++ capSize(inst, (input) => input instanceof Map ? input.size : -1);+ });+ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {+ if (keyResult.issues.length) {+@@ -1364,6 +1396,7 @@+ return Promise.all(proms).then(() => payload);+ return payload;+ };++ capSize(inst, (input) => input instanceof Set ? input.size : -1);+ });+ function handleSetResult(result, final) {+ if (result.issues.length) {diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 242e6dfb7..8ccc9bde1 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -7,17 +7,17 @@ settings:catalogs:default:'@vitest/coverage-v8':- specifier: 5.0.3- version: 5.0.3+ specifier: 5.0.5+ version: 5.0.5vite:- specifier: npm:@voidzero-dev/[email protected]- version: 1.0.0+ specifier: npm:@voidzero-dev/[email protected]+ version: 1.4.0vite-plus:- specifier: 1.0.0- version: 1.0.0+ specifier: 1.4.0+ version: 1.4.0vitest:- specifier: 5.0.3- version: 5.0.3+ specifier: 5.0.5+ version: 5.0.5overrides:'@isaacs/brace-expansion': 5.0.1@@ -26,9 +26,9 @@ overrides:diff: 8.0.3esbuild: 0.28.1express-rate-limit: 8.2.2- hono: '>=4.13.5'+ hono: '>=4.13.14 <5'lodash: 4.18.1- markdown-it: 14.1.1+ markdown-it: 14.3.3minimatch: 10.2.3rollup: 4.59.0seroval: '>=1.5.3'@@ -37,29 +37,40 @@ overrides:socket.io-parser: '>=4.2.7'picomatch: '>=4.0.4'path-to-regexp: '>=8.4.0'- brace-expansion: '>=5.0.9'+ brace-expansion: '>=5.0.12 <6'yaml: '>=2.8.3'qs: '>=6.16.0'ws: '>=8.20.1'- ip-address: 10.3.1+ ip-address: 10.7.5postcss: '>=8.5.23'sharp: '>=0.35.5'dompurify: '>=3.4.17 <4'handlebars: '>=4.7.10 <5'- engine.io: '>=6.6.7'+ engine.io: '>=6.6.11 <7'valibot: '>=1.4.2'better-auth: 1.6.26'@better-auth/core': 1.6.26undici: '>=7.29.0 <8'js-yaml: '>=4.3.2 <5''@babel/core': '>=7.29.6 <8'- fast-uri: '>=3.1.6 <4'+ fast-uri: '>=3.1.9 <4'mysql2: '>=3.23.1'postcss-selector-parser: '>=7.1.3'deepmerge-ts: '>=8.0.0'nanoid@3: '>=3.3.18 <4'- vite@*: npm:@voidzero-dev/[email protected]- vitest@*: 5.0.3+ body-parser: '>=2.4.0 <3'+ source-map-js: '>=1.2.2 <2'+ katex: 0.18.10+ vite@*: npm:@voidzero-dev/[email protected]+ vitest@*: 5.0.5++patchedDependencies:+ hash: 7af5fa910c9692d7af8fa33df2f5a3d74505f4e7c46a012d0e0137903d01215c+ path: patches/[email protected]+ hash: 961e904f64170e793e7ee7ea99c70d9df6319e1807c59dfc2817051a075cacdd+ path: patches/[email protected]importers:@@ -105,9 +116,12 @@ importers:typescript:specifier: 7.0.2version: 7.0.2+ vite:+ specifier: 'catalog:'+ version: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'vite-plus:specifier: 'catalog:'- version: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])apps/api:dependencies:@@ -119,19 +133,19 @@ importers:version: 3.1144.0'@better-auth/api-key':specifier: 1.6.26- version: 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](5179e506bce74021b870cf0e3de62b8c))([email protected]([email protected]))+ version: 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](4a724e2680f67cd2b168464ae131eba1))([email protected]([email protected]))'@better-auth/drizzle-adapter':specifier: 1.6.26- version: 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](@electric-sql/[email protected])(@opentelemetry/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected])([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected])))+ version: 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](@electric-sql/[email protected])(@opentelemetry/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected])([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected])))'@hono/node-server':specifier: '>=1.19.13'- version: 2.0.12([email protected])+ version: 2.0.12([email protected])'@hono/node-ws':specifier: ^1.3.1'@hono/zod-openapi':specifier: ^1.6.3- version: 1.6.3([email protected])([email protected])+ version: 1.6.3([email protected])([email protected])'@kaneo/email':specifier: workspace:*version: link:../../packages/email@@ -145,8 +159,8 @@ importers:specifier: workspace:*version: link:../../packages/permissions'@modelcontextprotocol/sdk':- specifier: 1.32.0- version: 1.32.0([email protected])+ specifier: 1.32.2+ version: 1.32.2([email protected])'@modelcontextprotocol/server':specifier: 2.3.0version: 2.3.0@@ -173,7 +187,7 @@ importers:version: 3.0.3better-auth:specifier: 1.6.26- version: 1.6.26(5179e506bce74021b870cf0e3de62b8c)+ version: 1.6.26(52d7fe43601f96605a6cdbee2310ae5a)creem:specifier: ^1.13.0version: 1.13.0@@ -187,8 +201,8 @@ importers:specifier: ^0.45.3version: 0.45.3(@electric-sql/[email protected])(@opentelemetry/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected])([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))hono:- specifier: '>=4.13.5'- version: 4.13.8+ specifier: '>=4.13.14 <5'+ version: 4.13.14ioredis:specifier: ^6.0.0version: 6.0.0@@ -205,8 +219,8 @@ importers:specifier: '>=1.4.2'version: 1.4.2([email protected])zod:- specifier: ^4.6.5- version: 4.6.5+ specifier: ^4.6.7+ version: 4.6.7devDependencies:'@types/node':specifier: ^26.6.2@@ -216,7 +230,7 @@ importers:version: 8.23.1'@vitest/coverage-v8':specifier: 'catalog:'- version: 5.0.3([email protected])+ version: 5.0.5(@vitest/[email protected])([email protected])esbuild:specifier: 0.28.1version: 0.28.1@@ -228,10 +242,10 @@ importers:version: 7.0.2vite-plus:specifier: 'catalog:'- version: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])vitest:specifier: 'catalog:'- version: 5.0.3(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 5.0.5(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))apps/mobile:dependencies:@@ -355,10 +369,10 @@ importers:version: 7.0.2vite:specifier: 'catalog:'- version: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ version: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'vite-plus:specifier: 'catalog:'- version: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])apps/site:dependencies:@@ -437,7 +451,7 @@ importers:version: 7.0.2vite-plus:specifier: 'catalog:'- version: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])apps/web:dependencies:@@ -446,7 +460,7 @@ importers:version: 1.8.0(@date-fns/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])'@better-auth/api-key':specifier: 1.6.26- version: 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](5179e506bce74021b870cf0e3de62b8c))([email protected]([email protected]))+ version: 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](4a724e2680f67cd2b168464ae131eba1))([email protected]([email protected]))'@dnd-kit/core':specifier: ^6.3.1@@ -467,7 +481,7 @@ importers:version: 5.3.0'@hookform/resolvers':specifier: ^5.9.1- version: 5.9.1(@sinclair/[email protected])(@standard-schema/[email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected]))([email protected]([email protected]))([email protected])+ version: 5.9.1(@sinclair/[email protected])(@standard-schema/[email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected]))([email protected]([email protected]))([email protected])'@radix-ui/react-accordion':specifier: ^1.2.20version: 1.2.20(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])@@ -530,7 +544,7 @@ importers:version: 5.4.0([email protected])'@tailwindcss/vite':specifier: ^4.3.3- version: 4.3.3(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 4.3.3(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))'@tanstack/react-query':specifier: ^5.103.2version: 5.104.0([email protected])@@ -545,7 +559,7 @@ importers:version: 1.167.2(@tanstack/[email protected]([email protected]([email protected]))([email protected]))(@tanstack/[email protected])([email protected])([email protected]([email protected]))([email protected])'@tanstack/router-plugin':specifier: ^1.168.42- version: 1.168.42(@tanstack/[email protected]([email protected]([email protected]))([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected])+ version: 1.168.42(@tanstack/[email protected]([email protected]([email protected]))([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected])'@tiptap/core':specifier: ^3.31.4version: 3.31.4(@tiptap/[email protected])@@ -608,13 +622,13 @@ importers:version: 2.0.7'@vitejs/plugin-react':specifier: ^6.1.1- version: 6.1.1(@rolldown/[email protected](@babel/[email protected])(@babel/[email protected](@babel/[email protected]))(@babel/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])+ version: 6.1.1(@rolldown/[email protected](@babel/[email protected])(@babel/[email protected](@babel/[email protected]))(@babel/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])babel-plugin-react-compiler:specifier: ^1.0.0version: 1.0.0better-auth:specifier: 1.6.26- version: 1.6.26(5179e506bce74021b870cf0e3de62b8c)+ version: 1.6.26(52d7fe43601f96605a6cdbee2310ae5a)class-variance-authority:specifier: ^0.7.1version: 0.7.1@@ -640,8 +654,8 @@ importers:specifier: ^11.12.0version: 11.12.0hono:- specifier: '>=4.13.5'- version: 4.13.8+ specifier: '>=4.13.14 <5'+ version: 4.13.14i18next:specifier: ^26.4.2version: 26.4.2([email protected])@@ -709,8 +723,8 @@ importers:specifier: ^1.0.2version: 1.0.2zod:- specifier: ^4.6.5- version: 4.6.5+ specifier: ^4.6.7+ version: 4.6.7zustand:specifier: ^5.0.15version: 5.0.15(@types/[email protected])([email protected])([email protected])([email protected]([email protected]))@@ -726,16 +740,16 @@ importers:version: link:../../packages/permissions'@rolldown/plugin-babel':specifier: ^0.2.4- version: 0.2.4(@babel/[email protected])(@babel/[email protected](@babel/[email protected]))(@babel/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])+ version: 0.2.4(@babel/[email protected])(@babel/[email protected](@babel/[email protected]))(@babel/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])'@tailwindcss/postcss':specifier: ^4.3.3version: 4.3.3'@testing-library/jest-dom':specifier: ^7.0.1- version: 7.0.1(@testing-library/[email protected])([email protected])+ version: 7.0.1(@testing-library/[email protected])([email protected])'@testing-library/react':specifier: ^16.3.3- version: 16.3.3(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ version: 16.3.3(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@types/babel__core':specifier: ^7.20.5version: 7.20.5@@ -765,10 +779,10 @@ importers:version: 7.0.2vite:specifier: 'catalog:'- version: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ version: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'vite-plus:specifier: 'catalog:'- version: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])packages/cli:devDependencies:@@ -804,7 +818,7 @@ importers:version: 7.0.2vite-plus:specifier: 'catalog:'- version: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])packages/email:dependencies:@@ -818,8 +832,8 @@ importers:specifier: ^8.0.1version: 8.0.1nodemailer:- specifier: ^10.1.4- version: 10.1.4+ specifier: ^10.2.1+ version: 10.2.1react:specifier: ^19.3.0version: 19.3.0@@ -847,7 +861,7 @@ importers:version: 7.0.2vite-plus:specifier: 'catalog:'- version: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])packages/importers:dependencies:@@ -872,7 +886,7 @@ importers:version: 7.0.2vite-plus:specifier: 'catalog:'- version: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])packages/libs:devDependencies:@@ -889,8 +903,8 @@ importers:specifier: ^19.3.0version: 19.3.0(@types/[email protected])hono:- specifier: '>=4.13.5'- version: 4.13.8+ specifier: '>=4.13.14 <5'+ version: 4.13.14react:specifier: ^19.3.0version: 19.3.0@@ -899,16 +913,16 @@ importers:version: 7.0.2vite:specifier: 'catalog:'- version: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ version: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'vite-plus:specifier: 'catalog:'- version: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])packages/mcp:dependencies:'@modelcontextprotocol/sdk':- specifier: 1.32.0- version: 1.32.0([email protected])+ specifier: 1.32.2+ version: 1.32.2([email protected])open:specifier: ^11.0.4version: 11.0.4@@ -916,8 +930,8 @@ importers:specifier: ^2.4.2version: 2.4.2zod:- specifier: ^4.6.5- version: 4.6.5+ specifier: ^4.6.7+ version: 4.6.7devDependencies:'@kaneo/typescript-config':specifier: workspace:*@@ -936,13 +950,13 @@ importers:version: 7.0.2vite-plus:specifier: 'catalog:'- version: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])packages/permissions:dependencies:better-auth:specifier: 1.6.26- version: 1.6.26(82174e0adfa68d3a2b7174b18293a9e1)+ version: 1.6.26(52d7fe43601f96605a6cdbee2310ae5a)devDependencies:'@kaneo/typescript-config':specifier: workspace:*@@ -952,10 +966,10 @@ importers:version: 7.0.2vite:specifier: 'catalog:'- version: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ version: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'vite-plus:specifier: 'catalog:'- version: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])packages/planka-import:dependencies:@@ -983,7 +997,7 @@ importers:version: 7.0.2vite-plus:specifier: 'catalog:'- version: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])packages/typescript-config: {}@@ -2333,32 +2347,32 @@ packages:resolution: {integrity: sha512-eWpQYr67tqJLeaSUl0Q+TquuYfUdTibpOJlUMV2FfUP7+KqCC5TufnwnlXL6mobZBJbGAYRd7ZvEBDCbLInjhg==}engines: {node: '>=20'}peerDependencies:- hono: '>=4.13.5'+ hono: '>=4.13.14 <5''@hono/[email protected]':resolution: {integrity: sha512-MgP/I06GdvsilDspMk/qmRzpk8LOUStP6jFAbSRi40W09DhoyUn+Mj7eyKICPqeYKybOjVFLVIAQzvu1bfIa7Q==}engines: {node: '>=20'}peerDependencies:- hono: '>=4.13.5'+ hono: '>=4.13.14 <5''@hono/[email protected]':resolution: {integrity: sha512-vo/MwCnpJAVHBkGzWjCJ28wF45fYHAfbPZcH2rodZODHtch2GHA94KtMfusmVycTUtsLAsaNsHhtY6P8X3RQsA==}engines: {node: '>=18.14.1'}peerDependencies:'@hono/node-server': '>=1.19.13'- hono: '>=4.13.5'+ hono: '>=4.13.14 <5''@hono/[email protected]':resolution: {integrity: sha512-VYR82Y60plu8g3pN60OUXMVKpmxh3R04Qs++3DY9vtwZ9/sA/BRY0PcRIR+Z37/3itWtM7pYwT9bKiH9JhqV6Q==}engines: {node: '>=16.0.0'}peerDependencies:- hono: '>=4.13.5'+ hono: '>=4.13.14 <5'zod: ^4.0.0'@hono/[email protected]':resolution: {integrity: sha512-iiv6w0qrIc0arfvCtUqBWsvl4fXjzaTcQcCJTTtCnkawF9HHGE+KjEl0ox3gQJ6rKZEgE3mLExlQCF72M+mNuw==}peerDependencies:- hono: '>=4.13.5'+ hono: '>=4.13.14 <5'zod: ^3.25.0 || ^4.0.0'@hookform/[email protected]':@@ -2699,8 +2713,8 @@ packages:resolution: {integrity: sha512-09BHFaNVBe5pB2AhzCfLj0cqmsKLERvZQ4FblzP90UMGLaXVqdZPByFjURwsUYCmxonUW2yAwgTTvle+8O2/8w==}engines: {node: '>=20'}- '@modelcontextprotocol/[email protected]':- resolution: {integrity: sha512-8BviX/hK4Gd2eL1KdTwm0gfl4d3wdoErW0Jd00h6nomUAtk6IJk5vwQJc6kfWtJTzN5OEV/lgIiJKI8fiDGAlA==}+ '@modelcontextprotocol/[email protected]':+ resolution: {integrity: sha512-SWsVtH/0vULSQStoZ6xxH2K09Li8fXYTMC64ZeogCdpZ3XSi1eCPOByV1OpuJxuI3OcmHhosDWYyii07tpPsLw==}engines: {node: '>=18'}peerDependencies:'@cfworker/json-schema': ^4.1.1@@ -3201,298 +3215,295 @@ packages:cpu: [x64]os: [win32]- '@oxc-project/[email protected]':- resolution: {integrity: sha512-fNuliiqGTseerW2FTbxq6UOQavKL/NvNh9K3peJZZVNi1NbM4Ehscwp3MX9nu+9bfbSfmPUEivF779XQU5exiw==}+ '@oxc-project/[email protected]':+ resolution: {integrity: sha512-VbW9raczGS5ZZ1FMunUBYHe4uV/R684qlQCoMdE3n5JT1PcqQsvmFpMYkF8AD+W04fBLGAq6Tr7YsTk0jjvDBA==}engines: {node: ^20.19.0 || >=22.12.0}'@oxc-project/[email protected]':resolution: {integrity: sha512-u6JZdLBTLotrNC9Vd6vPssINdzcCzleKAH6EJKImQb7GtYvX5keN2dxkoK44stCc4tffE6QQRtZTXVSzsLUlWA==}- '@oxc-project/[email protected]':- resolution: {integrity: sha512-J1yXrIlNDZVzE3ada310xeAw7nH8yCAyLPuUIsjKatFPmfn5bS1oW+cM+QsGOtVWd5nhSpbwZWx/rue+r5Z+PA==}-'@oxc-project/[email protected]':resolution: {integrity: sha512-KYOUGQFlLWR+s4QMV2Q9ko38TZm7EdO87Qm7rvZLqk/webse/cDjtyxKhg/47l0byCbs/k46LT8qc4PKjAikzA==}'@oxc-project/[email protected]':resolution: {integrity: sha512-SeE8JPwW1xs1tHeNycjUtUBdhorRa8o4jlvjwk49R7/Z291i+4DQa7JJIgOm/TaYQZx+QrPQbVJ/9c8dMIZN8Q==}- '@oxfmt/[email protected]':- resolution: {integrity: sha512-Xd7YO4/T2axEj6FTLcj4Why3mTBqFMg+x24xtorT4Lb2+1g82090GH0a/4U1m0pABGYiix2bq1pqkYrmV3f0Sw==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-xxQwrf5EPI5zxvuCTW8r6tzCTjPQ+h6+HqJ0iRKRy2zS1yBllt/xLVjoIyUc+FnR7g0a5g1SZv2yyDYhTItLbA==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm]os: [android]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-x9rlMYyKXdgKdYyUJzGsK1ZV8P4di/J32ipzcS6Jet6p9r9UAh28neXIMtdlSaJJycdi61Z4YkcLKLpk8ueFjg==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-FJW3sATVvrWbV64al8xofCPZj4500Z/1W0ad7Tg1rcCUyh0EMbuSrsf3jsZS7CEbwQ5fQ0mRhmkc129GFgofSQ==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [android]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-IUTUPvrBVYy7POh4stXzRdz4IVC/1QSaviCWoyenSlOhGu0X9j5K07vCTM9biLjAA2Zs31l0Rj5vvRpj9n95wA==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-TfmNKBD30dGyMu9GCLiaw2rt/z7fms9LS+5cKcNOyWst0QgAs8oZs6wPxMbVaaDVE0/PCdCosgWM1vbu6f5NUg==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [darwin]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-vw745q870oTd6J517O24asoX4/E+eK0nxYIFoedSLqgJ+nI5En7+ZS82iZSHZ69zevQrnOXiyHP01dA+t8xD8w==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-5Usf8+DfC4Q3o/MD8FkN47GrI6y0KbhQ4KhZ2HGzMZcXjcW1AeldwbUn51aKih+1TVuJFF9qkNm6X1nzm6NYng==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [darwin]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-NO14EgSM9dFkcg+MfGPxvsKqXYs9LKaxPrOKXpv1R0rLokGGFDcCq6dBMq18dE4wlpFOovX0UZY2uh1P30O7QA==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-eL+1O3gykw1XihbZh2MRAciQvU2988LByrnjhyo/dmNG74X4oZ7XzigRoWPRFLfJCp8hzRkp/LbEhwe7uuT2eA==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [freebsd]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-139OEhHarj9CYoJ/i9gXlPv4KLBGtLj2toseOWYFf09QwlhklaZk+wW3aOvlqoeZtuayvkoSNVWra7WJ21s3VQ==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-Xt0QtO2hJ4stnul8IL4LJGVLyp0xnc6ccN9fZ30yuubv8FWSRYxWwd1Za62KsEqAfmPSazoS/cLSUUJpja6npA==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm]os: [linux]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-GEh2PY3IWTE0M24eNhTduountANSbWyDmMnzFSQE/nGg/bjPugbUgiGuFu+xdqcQSd/HKSwH80/F2yVVD48yhA==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-/4wYQ0gZl4vUR0QoBTGaay73FmQ1GAjUa9z9101TR2xbGNrg4a+grazlR0yzEOe3/E+PJr5BGfj66MMzm/54vg==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm]os: [linux]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-En5i+UJmZSPxuSf47F2Hl5YOzKB0bicQLnGQkeTCMQ35cWLtbrSwACJKfiLqRZrk05DwSnsJkhBRaM3OURtIaA==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-846bKzF+HJd+JkOFh3rxzmYvSq4Cm+GMT+p+mW7S13ZYo6GAAGv8bL8cAOi/XcdeMqxEJDCIMTVQLVBXHMCdig==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [linux]libc: [glibc]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-WWOoV5W9Im3flVwOVrWn/2DUlOF8v5vcCip+kcNuaMpulRCh6nzzt1Su2vcL2F908YJIXNV3HvegbBHuyLwKHg==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-nI5FJwZ4Flo6CBdscpwxymZXxO3m3IErQJX55ZS6h+ObfGXu8FostL85L/RWPFaCLnIVE4/WfLw+2q8XvVEeUA==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [linux]libc: [musl]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-YUouneIqW+5n7aE8xx/zeZ6/utr/KH7oykcGoFyd8Uz8uh591T1oKlnoWA3BsRq/ZR42oY1w4MUYvS/0e/MQOA==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-BoQYKuqUdsKAFAkK6DLBvkdv4+t0hppSm79sB0wIcE2o/eOwNj+6Z3OlKY4q3Eta/tlssP65FaS9vHn8TeF7vQ==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [ppc64]os: [linux]libc: [glibc]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-iEnMf21S5aGVa4hViDGY8sAQ/AHyCu2JPyrQF8P06wtHhSkD1YJBeT4m/KiGewgf7+a5XCYSCRIPcRQa1xwEoQ==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-FSroRrM12+jCdSQklF9aOxsKpI6wFs4ZCo/1cSYG80RWZS6z4LV+l9tXRMT8lDGu+yohIZBwi9M76FzGPFDE2A==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [riscv64]os: [linux]libc: [glibc]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-91Sdniaj20fQzyMeCxMDzTP4c9s4RB8dGQ308xHhDR0n6U7+1Xq7N9klE7mfXq8iV3lRmIGSXi5X23Hn/0XX/g==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-0VLQD0dhGBLY9Ik/w+otMvD81D0YXi4VDwql65macV+O9UzmSWmUr6CKf+dMtysDeC0PnG3y6kBkRO08BJx52g==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [riscv64]os: [linux]libc: [musl]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-uUV30M6E+2TKKGMaKiwfeL4RZrviHXlUxsrYJ/jFBb+1EZy+pnFT+hF73eeWdzh5NqPOAnw0iiMAIqjqiLZPFg==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-6X7BbZNz34+OHM6Oqjf6TRcUyRn6aRcB4VtIDZAF/uQRyeVhg+G2hv6MlMvmnRekVSyTJ/8rG/u8W2dRFW6glg==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [s390x]os: [linux]libc: [glibc]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-ivMcX6kNDPhqtbOaBt/ItFlLlTlXNHLgRuNmxP6Na6UuYXRT10llpJcAPbGeRgjjb3Qzv4jwPp3fB0hui50WNQ==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-4kYIQK53yJXrxwxSzx8H2bojlf6/KezLGYLRXzV9QCCkoiCsvBTCid9Bg83dUPTLPa3g9K0730f6MKDbck1+OA==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [linux]libc: [glibc]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-w+S+fERxYmlZSyZlJK/U292FjyBoH8cCEj21/tYJX6atX5kNSn+HDkhlFQKT2zcMwUW0uAtUL/bOrlwJZwqRdA==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-MfWz4wDREjp/JQDmuxtKieix4FHGa1z5rBvB3betdcPwZvf5fqeQrlCm1mmoyuUVQOh9Pt3M61HwN94kJCxw7Q==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [linux]libc: [musl]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-Zlom1Xkx257R8bk4ZI4zJsrGno2opknz1+5v5baka3nn4FPyvNSdh8JUL4CdN1S1OWRMvJ9UJQ+RfIqGGCUEfA==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-6rmAApkq5s1kbDjvNI6Nl5A+JqQkLORb2sR941pf5HWsrd01WGKyagK/B4vX9+kh1FfvRkNgEu59FHvVk4H8cQ==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [openharmony]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-FQgPW5R17vzt7cgrJ8eG/dqX00o2xHsqFeLfw4xzA9FRHpN/DjFo9YDonvIIXGxiEuS9F/jZPnGO+KHNKuCo4Q==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-+5SpRUnZNGeXTyumHnpHa791tQtt04qZs076WT8eTcGF2OJ631VLnf7S0kQSPuDG+PtJM0phadEB2WAr5n1w9g==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [win32]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-ZfZublNhZ+XBndMiXhkiLlPE+XyGRDa0CweeTL6t1fZypfCh1LTg7e5CvnOeTBunq15MskOcRempumSPGAaCQA==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-1Fg+wYBO3Dsti1QX+/6EYHjeQzLC84tLOAqPu/r7ah3UJlUs9C/DB703Ay9Vcg+8VMzqZA2P5VGhzJraVUD4OQ==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [ia32]os: [win32]- '@oxfmt/[email protected]':- resolution: {integrity: sha512-HlIZEn+WzLQL0DszNzldiRl/DPRCX5R0Vkt6qeUPR1YHwy52hZZo4x6HoTOVmKRP2wUiwPGtKsihNY/f8KRaBg==}+ '@oxfmt/[email protected]':+ resolution: {integrity: sha512-y9jXUgPBm2TZIWbQhMYRRYAQM57+r4fbykgc+j24ICIIZl+pcuoNhnq1CRGm3oFiHnEUnZO00qOtSPGQdJ2ziQ==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [win32]- '@oxlint-tsgolint/[email protected]':- resolution: {integrity: sha512-TgV33rXr6ueXBwvc+0nssUkTBSXHJxv77I8p4RCjDjCnvexHtmoPiudVRDfj3S3puMDdeQdHW6jdUgUPy3nr/w==}+ '@oxlint-tsgolint/[email protected]':+ resolution: {integrity: sha512-uJk3ttju7Lz+Nv8WG4CsLyewoL1qf/Ny8S8OksJ7Bm/F14Tc9gMfW6arM1PCc57IzH/X/I79YsCWTgxX1FKibQ==}cpu: [arm64]os: [darwin]- '@oxlint-tsgolint/[email protected]':- resolution: {integrity: sha512-hY3FMAjIaPDdK3FNxyRXRfHPOFeoBn6dmnLyKZgQ2IbTTD1adXhl6PfCIqHhCPvurigv7nf7mYuWZZ19MmJzmg==}+ '@oxlint-tsgolint/[email protected]':+ resolution: {integrity: sha512-0BFfHTzDxNDFPcu0UZAXT6CyCJHAXM0dZveyDb4KEHa2qF/DSnOKOrmvK/wFuFol9kvijbGM9JfuOsor+zWXRw==}cpu: [x64]os: [darwin]- '@oxlint-tsgolint/[email protected]':- resolution: {integrity: sha512-eAET4JpyfBbg8SO0K74o4R55tEjVC292pIyxGOw2XGf8x/HrPNyxwQ478jMYOM54FIVOHc8sJ6VRHxluy6lucw==}+ '@oxlint-tsgolint/[email protected]':+ resolution: {integrity: sha512-TAehQc+qdRXyDN3nl/r/3/oPrBVrbtrDeGMkFyG6mf+XphpoJ2lAMVFLclyvrVZCw02RbKROjyw8h72XwQQHcw==}cpu: [arm64]os: [linux]- '@oxlint-tsgolint/[email protected]':- resolution: {integrity: sha512-GXdyO/XyqDJ3s/llR/oOktLsYNjZtWSQBy0JMc+/0gsNPvTcseKPhn9c6KcFyWmnr6H4vljYALbujonqSzzEGw==}+ '@oxlint-tsgolint/[email protected]':+ resolution: {integrity: sha512-LPunZvm6ZbWPfHMAyfZf9ci3HHvNEzLejO8zdqO3GoVGoSEHqqufHUD7+OgeatVSaJP7uXDJ2HaNOHIoH7go4Q==}cpu: [x64]os: [linux]- '@oxlint-tsgolint/[email protected]':- resolution: {integrity: sha512-TWauXnPfet0VgpmrstoAK58eJ4gbuwPUuUTQmYQAzE/RG1CpnxXtrKUJULf6lyerPE4KN3gM+DflIA1hOH+38Q==}+ '@oxlint-tsgolint/[email protected]':+ resolution: {integrity: sha512-FVWplzDImWhiuawnIZVETaQecv4GWom6Jv4Fx2xj7hhXXDZ5okEgiw1gTCImHTIQsi2ycC5oSxVwrn69bMh7iw==}cpu: [arm64]os: [win32]- '@oxlint-tsgolint/[email protected]':- resolution: {integrity: sha512-DoRmfe7j8VqNlukp8liRVW45GQDhzRccNenjD/pdzelgtffW47pCMd1xbJLkPaPbKnTwID3onn3VZlL7JbebEA==}+ '@oxlint-tsgolint/[email protected]':+ resolution: {integrity: sha512-7PsxuUx11Ry9DYTWcljTzRbmZY9B6O9fFFfZV+aodQEMy6pfRT3fhoQRv9PtGN/89z1pPz3nFKrsFm6WqNtX7w==}cpu: [x64]os: [win32]- '@oxlint/[email protected]':- resolution: {integrity: sha512-q2KO/Zso9UT+OMn0NF9ywn4E4t0MI3yxiDhNyhsQ7DyQJrC4FhFE4TXOi4bktFnOWXTMds8qZSbpv2XwRaNOBg==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-Pflpba5F3gRAQ12sWglRxvWTHEdAusNDvmi4Y5N1T5SY1AGkM7AixOnET8qkrnLJ/F32qAlNokO6eCknT8tmnw==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm]os: [android]- '@oxlint/[email protected]':- resolution: {integrity: sha512-SxLN3ALjoT9NNdvpjEevGeHvfzTAFrF0NBYB5tzK7/GtCKMze3j1e/m/X2ozqGj2U9hfGG/dg/OG8vpVK4PiDA==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-dYmyD1x7LaPlb79vZWUcpTShk8dI9z1I+IubtqrBxWNJaDhQdPHwcsvg7q5StTU4xWyd9AwPfLaTYFZY8NZgtQ==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [android]- '@oxlint/[email protected]':- resolution: {integrity: sha512-Y/Sup/J4f0f9UGsSd/xyCNTeWL+gepO63GBdEDAfue9nBsnk9zMmnIXx1O6b1V8C90vB5nucYNZ0pbMXAp8zJA==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-Z/oxOPiIqiS7fItRdxaaOEC+6GD3OpGi0IxoR0dMefzQHolsKLzScw2DNcu/5gUPok3tv+G9mslvYB5bo3i0qg==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [darwin]- '@oxlint/[email protected]':- resolution: {integrity: sha512-ApOSNC04ynpDTwvBD+//0wyfODRSbEzvRoKpX8teffmc27z8AockwSNeMXGJXn5KP85eahDgR/2llICWLkzcnw==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-eAjTkHSjAxrdCPJxO6y5sPQL5pYLKb2kvxZz9UU7tXnOZk9I/HLtkvx9S7GHY883k+AmL/eC7mqFt+w7WCwk0w==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [darwin]- '@oxlint/[email protected]':- resolution: {integrity: sha512-bNrVrCOA/kHky3Tu79IXWXe5bhIgLXfUuUEDHlAGOHUk96MkvDZ1ecaQF19rwstrnaqfP1o9nBTqzIr9+ZHkUg==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-0lNCA9Tl1n1FKpqy2/9ckp0kIuSrtJ/l9bMRgaEhOtM7TsOHshFuwOcvW8oA9teXLMOJT61LjEKWiaHDFGxF/w==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [freebsd]- '@oxlint/[email protected]':- resolution: {integrity: sha512-NUrzOJ1s/EqsVvfn2L/1D8Wro2LPIZUbihL8kOJLh5fEdGEN3rdOGUYq3HwnUIL8sjpoP+4N6RaGrgmMJnaMPw==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-OTFEvi9W+JczaZD1Caj17SGCoW8H7TE+fvx0D7ATEWa1Lohn91UMxFQ6r145SiGy/yCxeIwptMys/RAM7gSVSQ==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm]os: [linux]- '@oxlint/[email protected]':- resolution: {integrity: sha512-UJXrAT3E/RWkEqXLIs2ehETja1qfgkPb+5gwLIIS+o/6cf+grHvoOXTa5997a/YNQfcJS0DRBTOfZt95cvOI1g==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-fRxgNHvBLswj6MrhW2uBq5UDhPRQlCbHeq/Nf8yuG9zOxhDsXqX/mi2PX1axgsQxMm88el7HLiJAzglAnflYxw==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm]os: [linux]- '@oxlint/[email protected]':- resolution: {integrity: sha512-lK40QLjI0HxigO7CjDDshEtfYIeiYS0020v5BHFPqN4uuQBQxd2K9LNom2dW15o9F1937quSCRVp4ZsVhdbYdg==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-v9ENzHvwrQoYSWTtviH1pOYc7R9UovDxVofnck50cNmPihRRTcrg5X0UlRbLOZ7IVtxPOlh2hb7kDO+FpE8SfQ==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [linux]libc: [glibc]- '@oxlint/[email protected]':- resolution: {integrity: sha512-c2zbdBwGKreHXwRx3gWBuFGJxLhxgsg6YlZ+3H+RgRusU/UEV9jNwJ3HGYK+nRo0LvBa7mt6Kj86xoVotUo8cw==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-vfffe8mQ484AzVadlUOFpgL+JDwhvs9hrzxTgQP1FVfi4ZEUUYeffXlzC9dFV7Dgnu5s/KrNKvfmG6HxBd/ISQ==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [linux]libc: [musl]- '@oxlint/[email protected]':- resolution: {integrity: sha512-tlt/Hy8lZ97/lCPmCgw/B3k/mwh+BzaIPbPkldZEly7TwLmx0xe2CQcaW2g/rR0dOgS9JNGCZsMEqLhUNMGvaw==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-Buonlp4hVS7RGNP5M7bPpGNQrenyzA2C64JcO/oz9C1c6dGOXJ7VEAnaiAMY7voou0JYyCJdvDVlFQc5DZX3DQ==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [ppc64]os: [linux]libc: [glibc]- '@oxlint/[email protected]':- resolution: {integrity: sha512-3tNR9Xey82X0zKuY1d8hJ6Rc9gwRDurmqGLnQZa5xqOXy8/YyiqFXjAtugkKLY82obOlpK1eSiDRlgcNPuxtIg==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-1eVwJJrJ3lYIPT+cm7BcBBZZXY6IQZP/oyonaruTor/MrVyWOpvnwt1oD5CLdsHg5aVBIxXodQSvt+1gK6ck5w==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [riscv64]os: [linux]libc: [glibc]- '@oxlint/[email protected]':- resolution: {integrity: sha512-wbGRd5PqCcjkJFHhZuZ2OBSUQY9czlQsoA/cQQB9JK/L9mC5MQgGoKAh+xd8QjA5V+0D3j+Qd1lAWn1I8zlelA==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-fRQQsKUGShdEL5Fl9o9uhj3grkZbeXKLv0icQ5tspUCNYSDy8wzzEcP1WC2bKdTQ0rSszbKlO3iiHORxV22DLg==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [riscv64]os: [linux]libc: [musl]- '@oxlint/[email protected]':- resolution: {integrity: sha512-3Sn0kSrE4DPZCWV/8o+n4x3aFZxI9ulMnkYlwCbJ8eUVkwRK2IerohE/A/z3SNbCwoPFOCJmGE5Avrq0rrvdvQ==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-dEtYjIy6+fHcjKklsmtmMkZRhwHr2UbzjmpvuPtQYSeN9awQ2hx5JLms5Wvri+8P/NZtD8v5hfgHALUql+/Ycg==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [s390x]os: [linux]libc: [glibc]- '@oxlint/[email protected]':- resolution: {integrity: sha512-JY2pxxYfB62bAGfejljVCqc44etItehPuAyaeSAdMuEMtwNA00ggMnS66lC1oIhos6oOXUkuU6mZ9bpFh3BqWg==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-hqjwIj5KOYM8Wjef/p7IruNi1iByLhSzbMBk62y22P/E8q7Jj0Pp+DeUTKTRYyZYCDtU1wEGlnWOnttHbyNIww==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [linux]libc: [glibc]- '@oxlint/[email protected]':- resolution: {integrity: sha512-5k74vZ6qJBjBHEOlBk9B/iv68Yu0F1Afw/vvT2ar6OGCqEeXLaSjXz2n/IPCbhLG22UoKoYEJTzpYraRdcp6PA==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-iAQN3e6o9UgUCcdGwqRx/jYcKbG3HK7ur3rH6lTqVcQeNGZ85AeWIg6cgn/edwFQ0ofEZZItMwkzyCVTahnvEA==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [linux]libc: [musl]- '@oxlint/[email protected]':- resolution: {integrity: sha512-GbAl5qt5TCkPLXTaIISZJnugrcBhra6rodcXc9jYt620UtdsTt71NlNmJmm0frxzFpd54x/G+MkitEJA8I/BoA==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-MNxjEByz3N/7Q4qFQuPWvc14TpN9LoD3pECEDsJTZbP/wyB7U+hduUXEl7QAbbgVezFwsb9sWtNUO6XVBndOhg==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [openharmony]- '@oxlint/[email protected]':- resolution: {integrity: sha512-kjmws5MK0et2swk4ND85D7NVQyDHw162i6whtZDLUA/lo6FQyBZDcmMRCMcVZcNrAhIaftVb00x9ChGDOjjNJA==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-xxe+i9wfuFso/VnoL4mfj0UlzE+cfCFiUB06vkXCMyQdgVVmItF5FfAF4tATAktSU6uHruWR+FjqvAT9cHZZzg==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [win32]- '@oxlint/[email protected]':- resolution: {integrity: sha512-eSsIJx9n4yxvOqYTZyPEMyEXRmE60XH7xGAU7i0Qbsn1lf6Za3CWJ9aRd82oSFKXaxhp+sA6/yMJVRIpLpna6A==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-saFy07cO94E664glwgLmKLI40HgTL1PY86y4T6+ud4niX4H0Kdqjcmqmjps7mQNdBytV5guGbXDdyQtRfeLbLA==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [ia32]os: [win32]- '@oxlint/[email protected]':- resolution: {integrity: sha512-pBebIPUpKKhWrhSMWhy8TdAZBewiXnfxmaAGxhzxM1068GagqFaTwgKlU6e+UyJ2sPR+VoHouhXuGJkQjsrDvA==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-hLFJ/o0f/dTJh/EW0vmcbREYSQO9tYgfiAAlsOkiLFiJuRRWvYtFELUXN5o2ijpSo/tlO1n+YlWN58tZwPG18A==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [win32]- '@oxlint/[email protected]':- resolution: {integrity: sha512-S0uyoxakDINJ4DPgqxGlEEvrdSMeQb7Z2lKVjxoY2gwsbZbfg2Xr8Klfeo5ZeraHmmdBCELFUHkSe6KEmBpMvg==}+ '@oxlint/[email protected]':+ resolution: {integrity: sha512-TJBBNl4KIxbxrSk7gsqlz6iM1kxidfyTizEzfWqXvijF2Ou8/Da58GvjemBVmCmaUamwRij+JwsVc0kpBFuqfg==}engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}'@paralleldrive/[email protected]':@@ -5454,8 +5465,8 @@ packages:resolution: {integrity: sha512-uhOeFyxLcU41HzvrxsGpiWdcMbScY1EDgbZ5K7DVRMYInbLYWAC0EA/kx9wXAoSM8q82bUG2hRl8+EAjE6XAbA==}engines: {node: '>=20.19'}- '@testing-library/[email protected]':- resolution: {integrity: sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==}+ '@testing-library/[email protected]':+ resolution: {integrity: sha512-yzr2S9HyAIdhz2/6qHgbs665Q7PKVcDF05vsOlHPxG1mo36gKVesdYVeDLnXgfjJ03CrKRk08knc6+E/9m8v2Q==}engines: {node: '>=18'}'@testing-library/[email protected]':@@ -5463,7 +5474,7 @@ packages:engines: {node: '>=22', npm: '>=6', yarn: '>=1'}peerDependencies:'@testing-library/dom': '>=10 <11'- vitest: 5.0.3+ vitest: 5.0.5peerDependenciesMeta:vitest:optional: true@@ -5917,9 +5928,6 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-N8WXpbE6Wgri7KUSvrmQcqrMllKZ9uxkYWMt+mCSGwNc0Hsw9VQTW7ApqI4XNrx6/SaM2QQJCzMPDEXE058s+Q==}- '@types/[email protected]':- resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==}-'@types/[email protected]':resolution: {integrity: sha512-67MQl+fpWKVTT1NYdnmo3U4sc/xPo/zQBncVnI74qmQa0z/b+1g6iYqNmGCPbxO+zz2aklb08a0oHfegiVd0/w==}@@ -6072,48 +6080,37 @@ packages:oxc-transform-react:optional: true- '@vitest/[email protected]':- resolution: {integrity: sha512-NagNnZD6A8ccl+pycLWX2b/e9YJtH5NuDUyiiadQjptMRuZVBAB9r9I3itdKm6exxtcl+rOTv2rWt6vu5uOm1A==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-ViNg4UlomGSJHtnnr7Txm+55P7/aAMMoS+1WYnWjp5w5tzf7YEUAICcs2sb1uMovEnC8el/8zUfkWZ8+7fPCKA==}peerDependencies:- vitest: 5.0.3+ vitest: 5.0.5- '@vitest/[email protected]':- resolution: {integrity: sha512-s2UroEhP2BZPoen1qrXXTtVqnUcs6y2sxMLGCZ8tZDkH2iM/6tTC2GVTPCgF+oVF3X5M6wC/X2O0MvvoHNmH0Q==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-IDMoZX/iZ8rkilw7weaSgN8tJ7iZ9hUv0wYoKXyiyjWjWFwLSWAY707DcVTgxTYOudWC1E3HA9LYn7kVa9a7uQ==}peerDependencies:- vitest: 5.0.3+ vitest: 5.0.5- '@vitest/[email protected]':- resolution: {integrity: sha512-+klsyz7BvT1vCU28Zkfzms1Ia78XD0V41U3FUtRaa3S+vOr/EXvK1O6BvVD7l1RzEjm6SONR2aybOvDDf9u0mQ==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-4KpkGdIrSqBihx/JyP/e+S+IKB98etg1XDQiLAxksLfcShnwi1VReGeOT9NI43hLHbknosKp/1CCLn9Zgcs8mg==}peerDependencies:- '@vitest/browser': 5.0.3- vitest: 5.0.3+ '@vitest/browser': 5.0.5+ vitest: 5.0.5peerDependenciesMeta:'@vitest/browser':optional: true- '@vitest/[email protected]':- resolution: {integrity: sha512-k3DJZ8LhMBK9NS4SclF1ASD3OgXEWDorbIcPTRDK0/Zae6fRvu+fJRxtFdLfHsa9Y24beCdPnoNZ4LviTNstfA==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-9J/JMwOf9AoJhAywhrn7ScKTL38hsWQP/qPG60OtaAFcQ5OXPwKsxZFlbnuCKmZ61m8/lGgHYnFpdyQZUvG/iA==}engines: {node: '>=22'}- '@vitest/[email protected]':- resolution: {integrity: sha512-1EOLRfsTMnyAr3+kEAsP4o9dhaDlGPpD7H5iLBBeq//YpNB1VIahkPhB+eRp9N2Dkfw8oySROjE3yf9XDeaIkQ==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-gUsfXZJbzPamoIY5TvHFiMMoXESBrUMo+xqaj+rYrWI69+EnvRlYBlP96ZnHPY4vX8kyUpgAnFUCg5wZG/HkDQ==}engines: {node: '>=22'}- '@vitest/[email protected]':- resolution: {integrity: sha512-6K1DoBNAPGvuOcSsGA4D6x+5zEEff/KmOOP3uetT2TrGpVfI+HRHRnJJfKi5ib/g1vx8IYHQD8s0pbJz8WQI7Q==}- peerDependencies:- msw: ^2.4.9- vite: ^6.0.0 || ^7.0.0 || ^8.0.0- peerDependenciesMeta:- msw:- optional: true- vite:- optional: true-- '@vitest/[email protected]':- resolution: {integrity: sha512-T8sWAIbkSyAjkwTcaEc3Iu0o9A27X1/kdXrizhZkGuSKScRQtRzclfAMpOTcGdXCsqxeWlpGy3XjqaW8CpLORg==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==}peerDependencies:- msw: ^2.4.9+ msw: ^2.4.9 || ^3.0.0vite: ^6.0.0 || ^7.0.0 || ^8.0.0peerDependenciesMeta:msw:@@ -6121,33 +6118,33 @@ packages:vite:optional: true- '@vitest/[email protected]':- resolution: {integrity: sha512-6guWwj5d9bguuefTOvJoq387tfpkzSv554YdUEGzjJH2PnnmvzTLQ1UQSuAk5wBFVhf2CUmy/S/palOcb6dmpA==}-- '@vitest/[email protected]':- resolution: {integrity: sha512-aEW4fuQVg1i3fnC781qvwxC5QNptUvb+JjIUfX1WuWJqkjCgpiU8+I89mMcJmxOPLdaGAwEPFFVk02rGKYexvw==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-24sSdIlMA9DVPXnYiB9siwU0bTd887Y9jX3+vabztCSsvHwo7ipvJ/a2L3Rljw8+2rK1f5fCj3h5U9I/Jsqgbw==}- '@vitest/[email protected]':- resolution: {integrity: sha512-rbto/mF/SGERxEgYOek7Xm6B9b+y+mVoo+f4b2LymYO8zM1b7uB5nHuhVMTP2hxdzgxvGiZYGxGIaMvL5y180Q==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-dHyFElWMQy0wFBGrIaPPeUWfJFh+jAUrv46ImIJGd8CADdKV3mlrAu3FyD0wesdxELFCs9M807e040Kba/XKtA==}- '@vitest/[email protected]':- resolution: {integrity: sha512-XhFysQTB8AZ+P4gMi+Lpo99vg2AZi0qKpaB9yXQl37+CaMEAPO3iH/wGVnSyL5MPERiLezpqTVtrR6UZH5GCXg==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==}- '@vitest/[email protected]':- resolution: {integrity: sha512-7PvQu/X9/pQoHYfNLAYL22qsD4/+sx2k7zpUA7XvjW0sc40r3/r0lGZ2fsEyOHMuO8Q1KjiO1QQVjJdnWUy/WQ==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-dCoGUOdgmCaSB2g+WQ/spPCBkytAWdNUkFSXY4z+eYp2d8JEOY8v0uDRaJTG9qf/kTlTVZ4CuYMYMz/f1HS/qQ==}peerDependencies:- vitest: 5.0.3+ vitest: 5.0.5- '@vitest/[email protected]':- resolution: {integrity: sha512-E9+yEA+jsfaoxZcUHFzEqUrQcoNh2EwrPT5efIqkUPUwD5Ua2Li9BRWaYeRwvzvdLgTSVrre8oKNeyrfg7KkdQ==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-/rBu7gzLDQI/SC79Tn98b5DwOgaHU/Gt4I9OVeP3YofzNaYtbImRCOJQmT1S6vOJg9gEIlWC+r3QxKkjuSa1nQ==}- '@voidzero-dev/[email protected]':- resolution: {integrity: sha512-GHCd6d7h3JVojI/yxe/EAHwX5gn+OI7G932VBnYoTiwATLJrvHOs+okx7Ek2LGEJ57NJRENwCFgVYefjwPLfFA==}+ '@voidzero-dev/[email protected]':+ resolution: {integrity: sha512-LTGXCdZ58qJKfuCOmf0hnZOVA64eOgzDQOqYpI+71tPxk/0cGqPQhYDGQQZoEvNLAn1G2Lo4gKadsQdWxb99WQ==}engines: {node: ^20.19.0 || ^22.18.0 || >=24.11.0}peerDependencies:'@arethetypeswrong/core': ^0.18.1'@types/node': ^20.19.0 || >=22.12.0- '@vitejs/devtools': ^0.7.1+ '@typescript/native-preview': '*'+ '@vitejs/devtools': ^0.7.1 || ^0.8.0+ '@volar/typescript': ~2.4.0+ '@vue/language-core': ~3.2.0 || ~3.3.0esbuild: 0.28.1jiti: '>=1.21.0'less: ^4.0.0@@ -6161,14 +6158,21 @@ packages:typescript: ^5.0.0 || ^6.0.0 || ^7.0.0unplugin-unused: '>=0.5.0'unrun: '*'+ vue-tsc: ~3.2.0 || ~3.3.0yaml: '>=2.8.3'peerDependenciesMeta:'@arethetypeswrong/core':optional: true'@types/node':optional: true+ '@typescript/native-preview':+ optional: true'@vitejs/devtools':optional: true+ '@volar/typescript':+ optional: true+ '@vue/language-core':+ optional: trueesbuild:optional: truejiti:@@ -6195,57 +6199,59 @@ packages:optional: trueunrun:optional: true+ vue-tsc:+ optional: trueyaml:optional: true- '@voidzero-dev/[email protected]':- resolution: {integrity: sha512-lR+0rHOCYQTUo4Un0Sy14Xi1NBqoPXRnhsRyc0Joe53fomZ+wPtgErk15tkvWQdSLGNOr8hDDWJKo/kzI0Y37w==}+ '@voidzero-dev/[email protected]':+ resolution: {integrity: sha512-5Ie3vnrFrF5GFU+0VhbLuyoSmnzd8m42BvbLjncMOmAb6D1sEq4g37dlxPiVcJEqITM0t4zFnLkNSF4YAlk0FQ==}engines: {node: '>=20.0.0'}cpu: [arm64]os: [darwin]- '@voidzero-dev/[email protected]':- resolution: {integrity: sha512-MW3YnWpYP6wxvpd5KLFYTdtHTcAVnN0mVoLrmA9KCKWfOzO8nanr8hpuyEIdLMQT3r/7VNKRvgROI0CZZDP9/A==}+ '@voidzero-dev/[email protected]':+ resolution: {integrity: sha512-vaR7F+ix/91EycJYXOQ24Nzw470U12x3L+YLbbtuRwHDMW67fCbhXzcW+otZS8q4eRdIzEcA5svv9P8kcsaRkA==}engines: {node: '>=20.0.0'}cpu: [x64]os: [darwin]- '@voidzero-dev/[email protected]':- resolution: {integrity: sha512-n4onkD4oT+g4jLj9rR37TM4i2IbaYvIiU68p1A/5KrwnIHzbv2maO0BqBYdIRnBy1Mil8pIx9HsT8riWCjZeTw==}+ '@voidzero-dev/[email protected]':+ resolution: {integrity: sha512-58/PZrp+f3Hy6kFVKqbrZVenjo5t012rTOgRSgMoJyOhJjXBHqvORh9lB9GIip9r9maoWN31R1a44obPX9MD7g==}engines: {node: '>=20.0.0'}cpu: [arm64]os: [linux]libc: [glibc]- '@voidzero-dev/[email protected]':- resolution: {integrity: sha512-EZfgINa0FL/eIsLkL3MfQz7+Dc4VDAeIrf1UZDlitt//8NIOqI6nVMPnIFzMZThaIncIose+cVWsEkKLAKMM/A==}+ '@voidzero-dev/[email protected]':+ resolution: {integrity: sha512-Ij08vPrxG1J23wQVm0LtLPrQevv4tos8TirP/jGTpQQmQAgYOpmIfMrx8BF+vOGMncOIo+kKacp4jPVmhctfhg==}engines: {node: '>=20.0.0'}cpu: [arm64]os: [linux]libc: [musl]- '@voidzero-dev/[email protected]':- resolution: {integrity: sha512-R6+/oVLCSEvatOG1utYo0d0I++QPjWuRt2moD21+UUu2mQ8VyZHaaQLgoxrQG9shA9o0RBDmwxhGUXL20Rk1FA==}+ '@voidzero-dev/[email protected]':+ resolution: {integrity: sha512-RbM21Y5cSx5WesaFV/Swo22JRvimjO6NDItoL5wNI6NTa987ck7v19HBmp+V4nkOCFHbMdxwfhyALDw0y06xEA==}engines: {node: '>=20.0.0'}cpu: [x64]os: [linux]libc: [glibc]- '@voidzero-dev/[email protected]':- resolution: {integrity: sha512-B1Ottn22hn9RZ6XIVrWCXAAMfCOQRJ4KWoKbPL4JxC+UgvEiY9kC1ZFPqEAI89zIbW8eLdP3BeT14NQ0h1rtxw==}+ '@voidzero-dev/[email protected]':+ resolution: {integrity: sha512-Q+p+YJztEmqjJoumTmPaBQ/PEx3eFhiNTQTn5+85gkBUiRexkFQ8A86TMFxbKVgrJbiAOltkrJRmVRhRs5Q0sA==}engines: {node: '>=20.0.0'}cpu: [x64]os: [linux]libc: [musl]- '@voidzero-dev/[email protected]':- resolution: {integrity: sha512-XXK6N5xMkGVIcqMaVDjqDh44z0Z00DA8dYn2BWUkFOQflUU1Z3IWt+bPm/1Y7LjkwBWj5qD2zsQY1ANDCeX9QA==}+ '@voidzero-dev/[email protected]':+ resolution: {integrity: sha512-PLGVov8c4/QfveOM/AYjYDlgMCQ0SxCmJp392qBgxaSXP0nEg6yP4hn5UtnhxvluhHEzVkTf2r1Q3LNlZRI7kw==}engines: {node: '>=20.0.0'}cpu: [arm64]os: [win32]- '@voidzero-dev/[email protected]':- resolution: {integrity: sha512-XabdwdAsJ9QqEVSpSOuiiyJjiEwbwOspGahei9svQUGjs7e8MPuj4y/ltBHJZpyCBdZI6fhlc7Xaps9bUtl7Og==}+ '@voidzero-dev/[email protected]':+ resolution: {integrity: sha512-DYG7wDsMLLs2/+8qfeyLScdoMh+aPM4IZanoVPSNt8fMeeXR2GQiiZDKc0qZHKN9+YcdCGK1HLAdMAGSywKvsA==}engines: {node: '>=20.0.0'}cpu: [x64]os: [win32]@@ -6258,164 +6264,74 @@ packages:resolution: {integrity: sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A==}engines: {node: '>=14.6'}- '@yuku-codegen/[email protected]':- resolution: {integrity: sha512-jrOY5WM+AaAqkv51fHP1x28ifto4WgcZVzodLUyMU1jMWn5Sq+VciRdk/n8E0Ey5w4p4cWWE+m5GfXWOYh7Kzw==}- cpu: [arm64]- os: [android]- deprecated: yuku-codegen is pure JavaScript since 0.14-- '@yuku-codegen/[email protected]':- resolution: {integrity: sha512-4O4lkCQIzPZGjiNB1GORSI6hBECbiiSBS/APZXPvNKYH+nhY4uuqv03LNXA+SET3hoBjvr95P5rIhY8KQaQUBA==}- cpu: [arm64]- os: [darwin]- deprecated: yuku-codegen is pure JavaScript since 0.14-- '@yuku-codegen/[email protected]':- resolution: {integrity: sha512-9EvoUO0SEhD6/d8VHdWuPerepPMSR1y84+UEgz8Un1Ope14Oe7xMvePpEQLTLovoIFZ8Zg3iZ8z8E11pZMqC3g==}- cpu: [x64]- os: [darwin]- deprecated: yuku-codegen is pure JavaScript since 0.14-- '@yuku-codegen/[email protected]':- resolution: {integrity: sha512-HqT78WwgHTmp8lwujoUa9CrIortX4DdpuiVC18ZPSGvuuJf4ylpIEI6QrQEM78Zwz3muhAWAOXZ5irdiYY+AyA==}- cpu: [x64]- os: [freebsd]- deprecated: yuku-codegen is pure JavaScript since 0.14-- '@yuku-codegen/[email protected]':- resolution: {integrity: sha512-QJXwIW6Ms3QIawbcBIedmrmXnfdpuAOjZJ/eAABq5XTzWvSxZ7lutu9W5yIHahlaTaFnBo7ikrVMD1szLTpPUw==}- cpu: [arm]- os: [linux]- libc: [glibc]- deprecated: yuku-codegen is pure JavaScript since 0.14-- '@yuku-codegen/[email protected]':- resolution: {integrity: sha512-eHbFy3IHGb+IYarrYwAo0yWSEQV3eAmEn6VrsKA6I1Wy1YPJxWqSJlV69JhqsHtJuJlljUIF3ex0y46yaKIu9w==}- cpu: [arm]- os: [linux]- libc: [musl]- deprecated: yuku-codegen is pure JavaScript since 0.14-- '@yuku-codegen/[email protected]':- resolution: {integrity: sha512-ByoJMbySTaDhjAXSu8q6Lh7HKg3YoesXpcT72aYk0Aiw4PCznmY4ybpLTq0RCvp0RIPhFm/6yECFiGBwyCC1nw==}- cpu: [arm64]- os: [linux]- libc: [glibc]- deprecated: yuku-codegen is pure JavaScript since 0.14-- '@yuku-codegen/[email protected]':- resolution: {integrity: sha512-gD9vfXIoBw1toSxhO9rgmSu/FEfy3PMznJAxVjIuH8DrWEiDKXmJO0pJKfj1Ltbe/TmtWVZR+TjISqeSIGQzMg==}- cpu: [arm64]- os: [linux]- libc: [musl]- deprecated: yuku-codegen is pure JavaScript since 0.14-- '@yuku-codegen/[email protected]':- resolution: {integrity: sha512-BARvdnvqMGjOr5Iel2JH+9H5vAIE0R6H0Z2fsT02xrvmI/1ZXNB8lkuX+ZGevPhZb3zJ9WeC/R8JZstrsUOK5g==}- cpu: [x64]- os: [linux]- libc: [glibc]- deprecated: yuku-codegen is pure JavaScript since 0.14-- '@yuku-codegen/[email protected]':- resolution: {integrity: sha512-x8flcevS1fbb7ESrmpOY/pON4eInSaE/7Ktjqx2udOE2W33BNSZmJuwpyUgo54AoHNqrcaM7szqydyJn5fNvew==}- cpu: [x64]- os: [linux]- libc: [musl]- deprecated: yuku-codegen is pure JavaScript since 0.14-- '@yuku-codegen/[email protected]':- resolution: {integrity: sha512-KOL/rBatWqH4ZpCNoF8ZtSNdOJbAxBJLmk/VeRciepGROPTbPum1A9t67GpFgOU7qrkUWlPJdJ+KHKbvbmOt+w==}- cpu: [arm64]- os: [win32]- deprecated: yuku-codegen is pure JavaScript since 0.14-- '@yuku-codegen/[email protected]':- resolution: {integrity: sha512-FxENahEjWSan59Syh/us/Kf4wNq8qrJLFJ3R2N4Oiwtb6yNdz/rWLNTIoNSssnsp7IoWJdUP6o/Z8ppg7lXMcg==}- cpu: [x64]- os: [win32]- deprecated: yuku-codegen is pure JavaScript since 0.14-- '@yuku-parser/[email protected]':- resolution: {integrity: sha512-A2JCFCSHfnficqYEw4Iujpx7XrkMM3UfFcgJFmYpZSo9zM4nyhmdIIE0FogSduuU60lhM0/UcfuUBXIVNBMlGQ==}+ '@yuku-core/[email protected]':+ resolution: {integrity: sha512-wdL2XmTiZixAOaHk9Z0JJZ8u9Qm8d333Zjpc6gaxXFX+UR5BlsfxZ7a2+2Rm71pamppsPYGUGFq2oVLbh6DISw==}cpu: [arm64]os: [android]- deprecated: yuku-parser runs on yuku-core since 0.14- '@yuku-parser/[email protected]':- resolution: {integrity: sha512-3PiyU+Eare4YuKaQ22N98/yAiROPY5o/NQJHraICzDvk4pgS+m+bgLKOvkGBRn33OnV95Vdv1Mn38b+MQHpULQ==}+ '@yuku-core/[email protected]':+ resolution: {integrity: sha512-7sNJa6XJhyetnTy64jw3NEi4YgUcezHk1G5GH9FSvXAuC8wIlbaOwT9lgq5qo5sspjrZJQlBR1TWflP49uRpMw==}cpu: [arm64]os: [darwin]- deprecated: yuku-parser runs on yuku-core since 0.14- '@yuku-parser/[email protected]':- resolution: {integrity: sha512-blFMAFI7AInI83XaiOF8cIeiRM46Nz9EfpZtZPRLbKxSA9aAr5v8aHYpmfN6NoyXxAv/10pwS4gsAuc1W6fy5Q==}+ '@yuku-core/[email protected]':+ resolution: {integrity: sha512-pTC7dYEc59isdyizc3nsuyFNBu2LU5wMYZ1be6UMr59PY/AJNtO1aBLWV0MgL/z7C1nv/2sX4TNjGgKLoeevJw==}cpu: [x64]os: [darwin]- deprecated: yuku-parser runs on yuku-core since 0.14- '@yuku-parser/[email protected]':- resolution: {integrity: sha512-TsNuL4qsZdO0tHp5GW43Y5fHeLPpPHA675wdcPNTcdq2ZO5AvsQWFFoiDg8CH4oBktfsQ9tdvKhjLnLYwKvp4g==}+ '@yuku-core/[email protected]':+ resolution: {integrity: sha512-xrZjF6XOEwyLOiDIfrwDdRCS6ghxcJeirNC1KivQhVcUwlRonaU79S3/Uiyx3lBylPnT8qKJ3/aMT+H52nGTJQ==}cpu: [x64]os: [freebsd]- deprecated: yuku-parser runs on yuku-core since 0.14- '@yuku-parser/[email protected]':- resolution: {integrity: sha512-b0afYK5gHeV8RdmOcqAlgM8ONsye4cax4DMnIBaoJyPMd1UTGvTbpkqQcPVdhmHlcfcGVGMV1laeVovlr/dscw==}+ '@yuku-core/[email protected]':+ resolution: {integrity: sha512-0OyIH53C0I1CbADHn9FSdCfX5qbpeLwJhmOVhonFJNYheybOnkSJ50qGMfTJIb8y5zrwqvLs7FVBvz6Fk8maZg==}cpu: [arm]os: [linux]libc: [glibc]- deprecated: yuku-parser runs on yuku-core since 0.14- '@yuku-parser/[email protected]':- resolution: {integrity: sha512-fD3lKzl+r6j6n8DwiMY53qnh5DLqD8KJjCp+NbVud54Nnh3Q9Wprqss3YzyMHP3NSJk663Wlg1E1X5qOuFVFig==}+ '@yuku-core/[email protected]':+ resolution: {integrity: sha512-z/iPfkCOCSXE34VXNt0uP1ORSW+4mEa9b5CiJcWZeqZH08g49bFU/jRM2T04f+Wpw5mJ6HIzNBiojxeAbrHjeg==}cpu: [arm]os: [linux]libc: [musl]- deprecated: yuku-parser runs on yuku-core since 0.14- '@yuku-parser/[email protected]':- resolution: {integrity: sha512-aRU/aCphV1MWCl/lvI6NX8LgucHQ68Fx+vz7NBb/5MEr2EuzCxiPOQqeFcMdWh+2AED/p0AvAREch0c+cSnlhA==}+ '@yuku-core/[email protected]':+ resolution: {integrity: sha512-jLNTi+gzaRwBJ+gwhCJ+rDb5dmx/8hEBx93UWd7hjMSqPTL1D1wvVSvXVAldV5kALvju7b0/m51EHEhs4+I1fA==}cpu: [arm64]os: [linux]libc: [glibc]- deprecated: yuku-parser runs on yuku-core since 0.14- '@yuku-parser/[email protected]':- resolution: {integrity: sha512-5+Guro0l8H473YXlEjVNBRLN/IbPbJdnQh1zo0OLt49xxnON+XMJRRaEyTOTfkn9QSRg0+BhEKGR4W9Gu2uZJQ==}+ '@yuku-core/[email protected]':+ resolution: {integrity: sha512-YwyPIdW/rN2Fmv0MTFWi47FaB3F9g+2b+sJISyAw83Yd60RWH4T3Nx6XkAHHVN+uKJNBAd6So7/BVihSiFYvuQ==}cpu: [arm64]os: [linux]libc: [musl]- deprecated: yuku-parser runs on yuku-core since 0.14- '@yuku-parser/[email protected]':- resolution: {integrity: sha512-pwwSyV9q+GlvzSXlsMZBMlgk22L5bud714/vqZCdeUTivzeUVltQzUaf3IQXOGXdpc59JYTeuMCtbGquaAUoCA==}+ '@yuku-core/[email protected]':+ resolution: {integrity: sha512-/vskaAXVX3ESR43FiTdfiYS7z1b9uoQJwVQ/0RgUHgN2sWoAyCZs+aX4CgU7eKGIHTVfp9VFwv+c+2XchYiEtQ==}cpu: [x64]os: [linux]libc: [glibc]- deprecated: yuku-parser runs on yuku-core since 0.14- '@yuku-parser/[email protected]':- resolution: {integrity: sha512-z18j6JN3lBHH8vzN7gG1M8fI0nlgItSfnC9PfbmUbt97iHViKfw2iA2G9fGwRMe5LyPRZBrejIlapbygPbpdaw==}+ '@yuku-core/[email protected]':+ resolution: {integrity: sha512-FuXL5igeSKib9Rye02TdH+D6SQezTyGxIATMu1Qsn/QywrzwpGl35OLpS2C1x5vpGLeVE2XgiLd5mVPFHmIglQ==}cpu: [x64]os: [linux]libc: [musl]- deprecated: yuku-parser runs on yuku-core since 0.14- '@yuku-parser/[email protected]':- resolution: {integrity: sha512-s6Gwttb1dQvtPX6Bgkw+UPC9IO3UBDXc6Zezog8MMgvu3UfJBBB9TQqKBX/2quu0Eyh+lLSAyNlIyyecaagUPg==}+ '@yuku-core/[email protected]':+ resolution: {integrity: sha512-YuJAe7zEKT1Xa7LuHlhGJpPnYQeVtvo0rZvNjJRqkH0hQGOw4C8QeP30Tg5VKGzZfo2x8CjhjEhKt4TmLwfmdg==}cpu: [arm64]os: [win32]- deprecated: yuku-parser runs on yuku-core since 0.14- '@yuku-parser/[email protected]':- resolution: {integrity: sha512-FrERt9YWatY3bJfSUdi4YWY+6iQcyo3MzCC821BxlWM5TFZEHijnpz/bknR79VHlXY/9CvXz8ZlaAGPsTtN3nw==}+ '@yuku-core/[email protected]':+ resolution: {integrity: sha512-o8iY/mXwlRkedp0LNTr4+TEfXTPQwoNZmv6k+1WIAd1ZXEn8xJJTBCtB0osaVvdZo/x/cNmV16UrWrrGpM5Mvw==}cpu: [x64]os: [win32]- deprecated: yuku-parser runs on yuku-core since 0.14- '@yuku-toolchain/[email protected]':- resolution: {integrity: sha512-KiuLNNgX9uNealaWAR+G3/cMXnRk9x4TY2EkYe/KIag+UPdwiA0RRf1hr1WAxzTP8KGzCTkqUdLPvqh32sEO3w==}+ '@yuku-toolchain/[email protected]':+ resolution: {integrity: sha512-tFkNbsP4WXX9UMUC5syJGdK9dPMLK0PPaIuXCcCYH75sZ8MrebfBZ2XvCILRTw8AgLivSSCfDa4R67iYBDa4Kg==}resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}@@ -6708,7 +6624,7 @@ packages:react-dom: ^18.0.0 || ^19.0.0solid-js: ^1.0.0svelte: ^4.0.0 || ^5.0.0- vitest: 5.0.3+ vitest: 5.0.5vue: ^3.0.0peerDependenciesMeta:'@lynx-js/react':@@ -6768,8 +6684,8 @@ packages:resolution: {integrity: sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==}- resolution: {integrity: sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==}+ resolution: {integrity: sha512-Ifk1KcLrxaGt1occQagQNFNNOqRt1LFuehEnHHzB8Z6cRgIxRU1TBaiIsUiCdA+gy5PL7Y1IX31DNKkRmxtXjQ==}engines: {node: '>=18'}@@ -6792,8 +6708,8 @@ packages:resolution: {integrity: sha512-apC2+fspHGI3mMKj+dGevkGo/tCqVB8jMb6i+OX+E29p0Iposz07fABkRIfVUPNd5A5VbuOz1bZbnmkKLYF+wQ==}engines: {node: '>= 5.10.0'}- resolution: {integrity: sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==}+ resolution: {integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==}engines: {node: 20 || >=22}@@ -6864,8 +6780,8 @@ packages:resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}- resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==}+ resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==}engines: {node: '>=18'}@@ -7032,6 +6948,10 @@ packages:resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==}engines: {node: '>=20'}+ resolution: {integrity: sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==}+ engines: {node: '>=22.12.0'}+resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}@@ -7039,10 +6959,6 @@ packages:resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}engines: {node: '>= 10'}- resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==}- engines: {node: '>= 12'}-resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==}@@ -7087,6 +7003,10 @@ packages:resolution: {integrity: sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==}engines: {node: '>=18'}+ resolution: {integrity: sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==}+ engines: {node: '>=18'}+resolution: {integrity: sha512-6gfI3otXK5Ph5DfCOI1dblr+kN3FAm5a97hYoQkqNZxOaYa5WKfXH+AnpsmS+iUH2mgVC2Cg2Qw9m5OKcmNrIg==}engines: {node: '>=18'}@@ -7720,8 +7640,8 @@ packages:resolution: {integrity: sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==}engines: {node: '>=10.0.0'}- resolution: {integrity: sha512-clKkw4C7nJ22mGgoVcCg6V/W/TxdNyIOTr89k2ONZu81qqkddPFDF0LXcbAwhzPD8DjkiRCjzuiO6Y+fkpD4vg==}+ resolution: {integrity: sha512-z34mGpLoY/82ZbkX1LqGMIaf3wjVMPL6gVC681QDqnmzJ26synI8qAE32P+a7UazmpJZ8UGrFIeAavgRfXzYrg==}engines: {node: '>=10.2.0'}@@ -8131,8 +8051,8 @@ packages:resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}engines: {node: '>=8.6.0'}- resolution: {integrity: sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==}+ resolution: {integrity: sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==}resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==}@@ -8424,12 +8344,8 @@ packages:resolution: {integrity: sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg==}engines: {node: '>=12.0.0'}- resolution: {integrity: sha512-CQ46U0ZkAGmbT/4UxdzzGJpacP2IeKgY4a5/tOI9AABbpOMfK739wfDXmv1usCk+3RkKj1hQy4/fjhiwa2xlrA==}- engines: {node: '>=16.9.0'}-- resolution: {integrity: sha512-/Gng7NfoykZl2pjukW5Z6+8Yxm3BPRf86GTbQnt0SbySkvax4fyL4H3HhY1cCpBGmiW9XDRFzRV+CXK2W8QudQ==}+ resolution: {integrity: sha512-yhRLQ21U6qa9Hsu2N7Qcbh8tE+WKEcoErjIo56LeSGiGXGp9sA7UpE86Ui9uexb61KakiGwuHMn2QdV7w6i6kQ==}engines: {node: '>=16.9.0'}@@ -8592,8 +8508,8 @@ packages:resolution: {integrity: sha512-f+Dtubxfpf6KYFq7WVXJoOLn0bk4TJrMrN9SzeE+jrWrCWj7XX3fA6vkryafhADX+GMymRxgDJDOI33COkJc0w==}engines: {node: '>=20.0.0'}- resolution: {integrity: sha512-1e9d3kb97NHJTIJDZW9rKqW2h6+dFa50Dy0fpPSMQp2ADje5gvKsXmdiK6dwY5t76TaTt5+P5N1Y/LoToIxP6g==}+ resolution: {integrity: sha512-t2v0rkILYv9WXmSL7TpAaU3HXgaFYOPUcH3QHgwQ++gpJuH3bqyMy4Fvt/DJCTKwzH3Cf+bAp5W/mFL39KPLzA==}engines: {node: '>= 12'}@@ -8827,8 +8743,8 @@ packages:resolution: {integrity: sha512-Bj8ldGo67FNvj5nNsxGN7frkUcHZWqszNkfBOvfxOM1+WUa5J0PiGaflroTKOjGo2JQhOC1DZUaTv4tGzBaQLQ==}engines: {node: '>=20'}- resolution: {integrity: sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==}+ resolution: {integrity: sha512-/B6p9eY9DX7aHBfpkHdpirDTZ5QH9xTwL9y837PWuzuv41O5jFdqNQwVQEQsimY0/iVNkwBY4+4hMfhQ7d4Dbw==}hasBin: true@@ -9133,8 +9049,8 @@ packages:resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}- resolution: {integrity: sha512-vG+rjFRj1PqdIBozIxAGMjPlOhaVe+GXpbttY/iSK7rGcJRMlwNJO7dcUwmUqkymsFLJiNGI06t4D7Fr7yRC9g==}+ resolution: {integrity: sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ==}resolution: {integrity: sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==}@@ -9146,8 +9062,8 @@ packages:resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==}- resolution: {integrity: sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==}+ resolution: {integrity: sha512-L//tDAkjTjJCU6pBUSBTgs3Kg4InVaZuUZog/b6V12UKhcDQ7S78877ibbCanRExwPuYP1CZD7Gd2dxSy1GXRg==}hasBin: true@@ -9613,8 +9529,8 @@ packages:resolution: {integrity: sha512-BdiKAgbfRlvfMq/XzO/AF9NPmaA8a+YpLAyAFTVFBj3gARrAIfWvNq7Q7NE4se3KgFu0KkrvQMxTS0XVnsGzHg==}engines: {node: '>=18'}- resolution: {integrity: sha512-EsMnOR2oRv4LGnWvHgcVYkkQ4O2j8KO4WTw6l+PHR4sOXo8SAgIraxtEnGDmotjbhv0hDsu3IuDIFZm8iXwO4A==}+ resolution: {integrity: sha512-ZrDNsPFoDMwefNs7sJwrYiEJ/CG4ClJWDZv05iNJsEBWa8GRDry1QJHTJxsuTAY9eDDKjX4k+q3SxslXJOao7w==}engines: {node: '>=20.0.0'}@@ -9759,8 +9675,8 @@ packages:resolution: {integrity: sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A==}engines: {node: '>= 10'}- resolution: {integrity: sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==}+ resolution: {integrity: sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==}engines: {node: '>=12.20.0'}@@ -9836,29 +9752,32 @@ packages:resolution: {integrity: sha512-ov0NzaDCOInknS7mP1cwKdJERt3utPW8ldjtdUXQ8Ty0GEFD08wk422vCUN0d7pST6kqtV7dxoI9w1Zi0l/9TA==}engines: {node: ^20.19.0 || >=22.12.0}- resolution: {integrity: sha512-IsHxZ4y0wQLLMhnrJblBJgZsLDzfULrJnAw5j/QqsTlMa/m3AqsbToi+W71uhBGaqlqq/PbbjvHc09TJwdv3Tw==}+ resolution: {integrity: sha512-G4OP7FgwGYZR5ttRpCOOfJdyRsSyvtn34vSXnjDq6Oqed5Dufg5mB44mank+51nAdHOKuTJ0lj0mksY7L+N61A==}engines: {node: ^20.19.0 || >=22.12.0}hasBin: truepeerDependencies:+ '@astrojs/compiler-rs': ^0.4.0 || ^0.5.0svelte: ^5.0.0vite-plus: '*'peerDependenciesMeta:+ '@astrojs/compiler-rs':+ optional: truesvelte:optional: truevite-plus:optional: true- resolution: {integrity: sha512-VnK4zlqgmgq/7ZcjzCk/WpN8kKFsYGcB85Io9qT3wL4K8Un3RKmJkp793crNETieMusPMKOA4a+Mw2wbteI6TQ==}+ resolution: {integrity: sha512-vQ9WDF3fiZJvRdSDosNOflerOCOpwol6vWzVDxW76RcU19cjTh7engvkHLvmv+tzedR8fAiJUVUGr6IVZdkzXQ==}hasBin: true- resolution: {integrity: sha512-bc26s97nuvPj1ViyPsqmKecVkUWFMEdtayO8MaQ6oiLfs1pj94cQlZZhrh4BPNlr9HQosjhIlwgZKsfcwmcNgg==}+ resolution: {integrity: sha512-a25hkfo61okGPvJz432fRIPoxlKtNnOVy9w4rzrmGgNm4iVTPwpSQlmdqNWnp6p9QyyPVfAZRgnf5XvSBZFk/A==}engines: {node: ^20.19.0 || >=22.12.0}hasBin: truepeerDependencies:- oxlint-tsgolint: '>=7.0.2001'+ oxlint-tsgolint: '>=7.0.2003'vite-plus: '*'peerDependenciesMeta:oxlint-tsgolint:@@ -9988,9 +9907,6 @@ packages:resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==}engines: {node: 18 || 20 || >=22}- resolution: {integrity: sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==}-resolution: {integrity: sha512-kfo5HIFCfEH24bcHSWEFIfrwiCsm/DXR+j1fc0696VIdWkICdAcKH2LxRClvz5HQcG4iCQpb4qBZ7pttGPG/dA==}@@ -10912,10 +10828,6 @@ packages:'@types/react':optional: true- resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}- engines: {node: '>=0.10.0'}-resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==}engines: {node: '>=0.10.0'}@@ -10987,8 +10899,8 @@ packages:resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==}- resolution: {integrity: sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==}+ resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==}resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==}@@ -11191,8 +11103,8 @@ packages:resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==}- resolution: {integrity: sha512-9APumHG7r4yOk4X4WlkmE71aZcv1gvin1czO3OQ1U9iJcFA5Ja/ygyb0vPOVHTthFozUYs8CLoLUlM8grb2lTQ==}+ resolution: {integrity: sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA==}engines: {node: '>=20.0.0'}@@ -11203,12 +11115,12 @@ packages:resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==}engines: {node: '>=12.0.0'}- resolution: {integrity: sha512-9YodfrxS9g9IbFr/KOjE5bAeJ0p61n3bW6mqvy0jtoeKd1kTW1Cxm0oulm6KX2lyM9Gl6WIe8nEbY7LWv5ZJww==}+ resolution: {integrity: sha512-jBrmx4lYmaC9k/mgPbylxs7kBUxHtD8256up+HjLaDFfXScKJQyil+SWXSvhAtT7XHo+yTVlpB81PGmHP8oLSQ==}engines: {node: ^20.0.0 || >=22.0.0}- resolution: {integrity: sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==}+ resolution: {integrity: sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==}engines: {node: '>=14.0.0'}@@ -11554,76 +11466,36 @@ packages:resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==}- resolution: {integrity: sha512-2ezzBWt+AVO+I2F9Cpb2Of0J12Lat35kWZ/FRL2monMnKZuACKfkYAA/nMqdDo1KwB8sWjTKzmD9mRCh1Q1n+g==}+ resolution: {integrity: sha512-bLyUKNFl0XjbHe20FpDM6OuknOb2E4ueoWKCW4n+wMO2+lQtA9tmAjW+Xs0Xe9rg2+tCgY3W13GOgDh2wjwjAQ==}engines: {node: ^22.18.0 || ^24.11.0 || >=26.0.0}hasBin: truepeerDependencies:- '@vitest/browser-playwright': 5.0.1+ '@vitest/browser-playwright': 5.0.5'@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0+ playwright: '*'peerDependenciesMeta:'@vitest/browser-playwright':optional: true'@vitest/browser-webdriverio':optional: true-- resolution: {integrity: sha512-/bvH9E9tmCXRGp2uXY3WbOldqpTwFkbha/8ANaEQ6VkxhH60KyqLwgZq6lG2y+4uT55x9+9eUHMpQ7uGnOCKjA==}- engines: {node: ^20.19.0 || >=22.12.0}- hasBin: true- peerDependencies:- '@types/node': ^20.19.0 || >=22.12.0- '@vitejs/devtools': ^0.7.1- esbuild: 0.28.1- jiti: '>=1.21.0'- less: ^4.0.0- sass: ^1.70.0- sass-embedded: ^1.70.0- stylus: '>=0.54.8'- sugarss: ^5.0.0- terser: ^5.16.0- tsx: ^4.8.1- yaml: '>=2.8.3'- peerDependenciesMeta:- '@types/node':- optional: true- '@vitejs/devtools':- optional: true- esbuild:- optional: true- jiti:- optional: true- less:- optional: true- sass:- optional: true- sass-embedded:- optional: true- stylus:- optional: true- sugarss:- optional: true- terser:- optional: true- tsx:- optional: true- yaml:+ playwright:optional: true- resolution: {integrity: sha512-xMw97S3rjdtj5dkVat7jCsqWBpvchs3RlpQctUqwJD0KkERk40vz2fJ77lDwW/Vzh/pk18eItYAzkodhSes3jQ==}+ resolution: {integrity: sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==}engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0}hasBin: truepeerDependencies:'@edge-runtime/vm': '*''@opentelemetry/api': ^1.9.0'@types/node': ^22.0.0 || >=24.0.0- '@vitest/browser-playwright': 5.0.3- '@vitest/browser-preview': 5.0.3+ '@vitest/browser-playwright': 5.0.5+ '@vitest/browser-preview': 5.0.5'@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0- '@vitest/coverage-istanbul': 5.0.3- '@vitest/coverage-v8': 5.0.3- '@vitest/ui': 5.0.3+ '@vitest/coverage-istanbul': 5.0.5+ '@vitest/coverage-v8': 5.0.5+ '@vitest/ui': 5.0.5happy-dom: '*'jsdom: '*'vite: ^6.4.0 || ^7.0.0 || ^8.0.0@@ -11859,14 +11731,13 @@ packages:resolution: {integrity: sha512-xYqdZFUK/VYazNl/oCDYN+3WloWQwMfZxBoiNt6qNyk+xfOdi598muWE42rNZFp1kNOiqW936q5RhUdnpqElSg==}engines: {node: '>=18'}- resolution: {integrity: sha512-Q8qW8WwQnN5Cm0ZZivdRIfv0sRLTjUq0YumXJkw8CYN1aCdICH9rk4C47/4n6kA5EqDtlj+F608twoTSV2MwdQ==}-- resolution: {integrity: sha512-zGUVyDpSK4b6c9B0yyxi2P0wujn1XZTbG9dCb7d6gyAoP63EMgyLzUwPUvwxPG5jgYqhlI7w+S3oCyapqGr4PA==}+ resolution: {integrity: sha512-kYK9e1XdfirNhkipzW0wmMcSWcVF/CWnuugodfVYRCUwvoBefweL9HzB96OiKEhsx78V5WbUxbJqlizMX869Qg==}+ engines: {node: '>=14.18.0'}- resolution: {integrity: sha512-IBnAdNVMswWbJcM7woPluOudectJzFjJ1N8jVRxP9Uq4CIv5hZdBIcdmtRbFDYF/Ph2j2gVup4YJ4N9mh0jYFA==}+ resolution: {integrity: sha512-XrBh9ZiQK5mJVRxZBAvD6LwRyAYrK3MFtH3+onyuxFL5hFD44EC3QOmIC1FjTj6H2MMwq46/NAI+NZxLZPZgxg==}+ engines: {node: '>=14.18.0'}resolution: {integrity: sha512-KiGErG2J0G82LSpniV0CtIzjlJ10E04j02VOudJsPyPwNZgGnRKQy7I1R7GMyg/QswnE4l7ohSGrQbQbjXPPDA==}@@ -11879,8 +11750,8 @@ packages:resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==}- resolution: {integrity: sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==}+ resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==}resolution: {integrity: sha512-MpSEjRiBkA9crSYeOUH32rJC7SVqAbm0Fqcqge/bUi2PPoLcBWKOsG+C8mevmpr8TwXHBVkChbbJiyvkE+i/3A==}@@ -11949,10 +11820,10 @@ snapshots:is-potential-custom-element-name: 1.0.1lru-cache: 11.5.3- '@asteasolutions/[email protected]([email protected])':+ '@asteasolutions/[email protected]([email protected])':dependencies:openapi3-ts: 4.6.1- zod: 4.6.5+ zod: 4.6.7'@aws-sdk/[email protected]':dependencies:@@ -12751,65 +12622,65 @@ snapshots:'@bcoe/[email protected]': {}- '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](5179e506bce74021b870cf0e3de62b8c))([email protected]([email protected]))':+ '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](4a724e2680f67cd2b168464ae131eba1))([email protected]([email protected]))':dependencies:- '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])+ '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])'@better-auth/utils': 0.4.2- better-auth: 1.6.26(5179e506bce74021b870cf0e3de62b8c)- better-call: 1.3.7([email protected])- zod: 4.6.5+ better-auth: 1.6.26(52d7fe43601f96605a6cdbee2310ae5a)+ better-call: 1.3.7([email protected])+ zod: 4.6.7- '@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])':+ '@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])':dependencies:'@better-auth/utils': 0.4.2'@better-fetch/fetch': 1.3.1'@opentelemetry/semantic-conventions': 1.43.0'@standard-schema/spec': 1.1.0- better-call: 1.3.7([email protected])+ better-call: 1.3.7([email protected])jose: 6.2.8kysely: 0.29.4nanostores: 1.5.4- zod: 4.6.5+ zod: 4.6.7optionalDependencies:'@opentelemetry/api': 1.9.1- '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](@electric-sql/[email protected])(@opentelemetry/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected])([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected])))':+ '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](@electric-sql/[email protected])(@opentelemetry/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected])([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected])))':dependencies:- '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])+ '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])'@better-auth/utils': 0.4.2optionalDependencies:drizzle-orm: 0.45.3(@electric-sql/[email protected])(@opentelemetry/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected])([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))- '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected])':+ '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected])':dependencies:- '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])+ '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])'@better-auth/utils': 0.4.2optionalDependencies:kysely: 0.29.4- '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])':+ '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])':dependencies:- '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])+ '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])'@better-auth/utils': 0.4.2- '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected]([email protected]))':+ '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected]([email protected]))':dependencies:- '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])+ '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])'@better-auth/utils': 0.4.2optionalDependencies:mongodb: 7.1.0([email protected])- '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))':+ '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))':dependencies:- '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])+ '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])'@better-auth/utils': 0.4.2optionalDependencies:'@prisma/client': 7.4.2([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected])prisma: 7.4.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected])- '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])(@better-fetch/[email protected])':+ '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])(@better-fetch/[email protected])':dependencies:- '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])+ '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])'@better-auth/utils': 0.4.2'@better-fetch/fetch': 1.3.1@@ -13231,7 +13102,7 @@ snapshots:glob: 13.0.6lan-network: 0.2.1multitars: 1.0.2- node-forge: 1.4.0+ node-forge: 1.4.0(patch_hash=7af5fa910c9692d7af8fa33df2f5a3d74505f4e7c46a012d0e0137903d01215c)npm-package-arg: 11.0.3ora: 3.4.0picomatch: 4.0.7@@ -13249,7 +13120,7 @@ snapshots:toqr: 0.1.1wrap-ansi: 7.0.0ws: 8.21.3- zod: 3.25.76+ zod: 3.25.76(patch_hash=961e904f64170e793e7ee7ea99c70d9df6319e1807c59dfc2817051a075cacdd)optionalDependencies:expo-router: 58.0.25(4ce06d247dcb9f0dff2e22a3214c37b6)react-native: 0.88.0(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])@@ -13268,7 +13139,7 @@ snapshots:'@expo/[email protected]':dependencies:- node-forge: 1.4.0+ node-forge: 1.4.0(patch_hash=7af5fa910c9692d7af8fa33df2f5a3d74505f4e7c46a012d0e0137903d01215c)'@expo/[email protected]([email protected])':dependencies:@@ -13427,7 +13298,7 @@ snapshots:lightningcss: 1.33.0noxcturnal: 0.1.9picomatch: 4.0.7- postcss: 8.5.30+ postcss: 8.5.31resolve-from: 5.0.0optionalDependencies:expo: 58.0.17(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])@@ -13602,37 +13473,37 @@ snapshots:dependencies:typescript: 7.0.2- '@hono/[email protected]([email protected])':+ '@hono/[email protected]([email protected])':dependencies:- hono: 4.13.8+ hono: 4.13.14- '@hono/[email protected]([email protected])':+ '@hono/[email protected]([email protected])':dependencies:- hono: 4.13.13+ hono: 4.13.14dependencies:- '@hono/node-server': 2.0.12([email protected])- hono: 4.13.8+ '@hono/node-server': 2.0.12([email protected])+ hono: 4.13.14ws: 8.21.0transitivePeerDependencies:- bufferutil- utf-8-validatedependencies:- '@asteasolutions/zod-to-openapi': 9.1.0([email protected])- '@hono/zod-validator': 0.9.1([email protected])([email protected])- hono: 4.13.8+ '@asteasolutions/zod-to-openapi': 9.1.0([email protected])+ '@hono/zod-validator': 0.9.1([email protected])([email protected])+ hono: 4.13.14openapi3-ts: 4.6.1- zod: 4.6.5+ zod: 4.6.7dependencies:- hono: 4.13.8- zod: 4.6.5+ hono: 4.13.14+ zod: 4.6.7- '@hookform/[email protected](@sinclair/[email protected])(@standard-schema/[email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected]))([email protected]([email protected]))([email protected])':+ '@hookform/[email protected](@sinclair/[email protected])(@standard-schema/[email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected]))([email protected]([email protected]))([email protected])':dependencies:'@standard-schema/utils': 0.3.0react-hook-form: 7.89.0(@types/[email protected])([email protected])@@ -13642,7 +13513,7 @@ snapshots:ajv: 8.18.0effect: 4.0.6valibot: 1.5.0([email protected])- zod: 4.6.5+ zod: 4.6.7'@iconify/[email protected]': {}@@ -13867,11 +13738,11 @@ snapshots:'@modelcontextprotocol/[email protected]':dependencies:- zod: 4.6.5+ zod: 4.6.7- '@modelcontextprotocol/[email protected]([email protected])':+ '@modelcontextprotocol/[email protected]([email protected](patch_hash=961e904f64170e793e7ee7ea99c70d9df6319e1807c59dfc2817051a075cacdd))':dependencies:- '@hono/node-server': 2.1.5([email protected])+ '@hono/node-server': 2.1.5([email protected])ajv: 8.18.0ajv-formats: 3.0.1([email protected])content-type: 1.0.5@@ -13881,19 +13752,19 @@ snapshots:eventsource-parser: 3.1.0express: 5.2.1express-rate-limit: 8.2.2([email protected])- hono: 4.13.13+ hono: 4.13.14jose: 6.2.8json-schema-typed: 8.0.2pkce-challenge: 5.0.1raw-body: 3.0.2- zod: 3.25.76- zod-to-json-schema: 3.25.2([email protected])+ zod: 3.25.76(patch_hash=961e904f64170e793e7ee7ea99c70d9df6319e1807c59dfc2817051a075cacdd)+ zod-to-json-schema: 3.25.2([email protected](patch_hash=961e904f64170e793e7ee7ea99c70d9df6319e1807c59dfc2817051a075cacdd))transitivePeerDependencies:- supports-color- '@modelcontextprotocol/[email protected]([email protected])':+ '@modelcontextprotocol/[email protected]([email protected])':dependencies:- '@hono/node-server': 2.1.5([email protected])+ '@hono/node-server': 2.1.5([email protected])ajv: 8.18.0ajv-formats: 3.0.1([email protected])content-type: 1.0.5@@ -13903,20 +13774,20 @@ snapshots:eventsource-parser: 3.1.0express: 5.2.1express-rate-limit: 8.2.2([email protected])- hono: 4.13.13+ hono: 4.13.14jose: 6.2.8json-schema-typed: 8.0.2pkce-challenge: 5.0.1raw-body: 3.0.2- zod: 4.6.5- zod-to-json-schema: 3.25.2([email protected])+ zod: 4.6.7+ zod-to-json-schema: 3.25.2([email protected])transitivePeerDependencies:- supports-color'@modelcontextprotocol/[email protected]':dependencies:'@modelcontextprotocol/core': 2.3.0- zod: 4.6.5+ zod: 4.6.7'@mongodb-js/[email protected]':dependencies:@@ -14292,149 +14163,147 @@ snapshots:'@oxc-parser/[email protected]':optional: true- '@oxc-project/[email protected]': {}+ '@oxc-project/[email protected]': {}'@oxc-project/[email protected]': {}- '@oxc-project/[email protected]': {}-'@oxc-project/[email protected]': {}'@oxc-project/[email protected]': {}- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxfmt/[email protected]':+ '@oxfmt/[email protected]':optional: true- '@oxlint-tsgolint/[email protected]':+ '@oxlint-tsgolint/[email protected]':optional: true- '@oxlint-tsgolint/[email protected]':+ '@oxlint-tsgolint/[email protected]':optional: true- '@oxlint-tsgolint/[email protected]':+ '@oxlint-tsgolint/[email protected]':optional: true- '@oxlint-tsgolint/[email protected]':+ '@oxlint-tsgolint/[email protected]':optional: true- '@oxlint-tsgolint/[email protected]':+ '@oxlint-tsgolint/[email protected]':optional: true- '@oxlint-tsgolint/[email protected]':+ '@oxlint-tsgolint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]':+ '@oxlint/[email protected]':optional: true- '@oxlint/[email protected]': {}+ '@oxlint/[email protected]': {}'@paralleldrive/[email protected]':dependencies:@@ -14490,13 +14359,13 @@ snapshots:'@electric-sql/pglite': 0.3.15'@electric-sql/pglite-socket': 0.0.20(@electric-sql/[email protected])'@electric-sql/pglite-tools': 0.2.20(@electric-sql/[email protected])- '@hono/node-server': 2.1.5([email protected])+ '@hono/node-server': 2.1.5([email protected])'@mrleebo/prisma-ast': 0.13.1'@prisma/get-platform': 7.2.0'@prisma/query-plan-executor': 7.2.0foreground-child: 3.3.1get-port-please: 3.2.0- hono: 4.13.13+ hono: 4.13.14http-status-codes: 2.3.0pathe: 2.0.3proper-lockfile: 4.1.2@@ -15609,7 +15478,9 @@ snapshots:metro-runtime: 0.87.1transitivePeerDependencies:- '@babel/core'+ - bufferutil- supports-color+ - utf-8-validate'@react-native/[email protected]': {}@@ -15687,7 +15558,7 @@ snapshots:'@rolldown/[email protected]':optional: true- '@rolldown/[email protected](@babel/[email protected])(@babel/[email protected](@babel/[email protected]))(@babel/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])':+ '@rolldown/[email protected](@babel/[email protected])(@babel/[email protected](@babel/[email protected]))(@babel/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])':dependencies:'@babel/core': 7.29.7picomatch: 4.0.5@@ -15695,7 +15566,7 @@ snapshots:optionalDependencies:'@babel/plugin-transform-runtime': 7.29.7(@babel/[email protected])'@babel/runtime': 7.29.7- vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])''@rolldown/[email protected]': {}@@ -16296,12 +16167,12 @@ snapshots:postcss: 8.5.25tailwindcss: 4.3.3- '@tailwindcss/[email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':+ '@tailwindcss/[email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':dependencies:'@tailwindcss/node': 4.3.3'@tailwindcss/oxide': 4.3.3tailwindcss: 4.3.3- vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])''@tanstack/[email protected]': {}@@ -16410,11 +16281,11 @@ snapshots:jiti: 2.7.0magic-string: 0.30.21prettier: 3.9.6- zod: 4.6.5+ zod: 4.6.7transitivePeerDependencies:- supports-color- '@tanstack/[email protected](@tanstack/[email protected]([email protected]([email protected]))([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected])':+ '@tanstack/[email protected](@tanstack/[email protected]([email protected]([email protected]))([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected])':dependencies:'@babel/core': 7.29.7'@babel/template': 7.29.7@@ -16423,11 +16294,11 @@ snapshots:'@tanstack/router-generator': 1.167.40'@tanstack/router-utils': 1.162.3chokidar: 5.0.0- unplugin: 3.3.0(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected])- zod: 4.6.5+ unplugin: 3.3.0(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected])+ zod: 4.6.7optionalDependencies:- vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'transitivePeerDependencies:- '@farmfe/core'- '@rspack/core'@@ -16455,7 +16326,7 @@ snapshots:'@tanstack/[email protected]': {}- '@testing-library/[email protected]':+ '@testing-library/[email protected]':dependencies:'@babel/code-frame': 7.29.7'@babel/runtime': 7.29.7@@ -16466,31 +16337,31 @@ snapshots:picocolors: 1.1.1pretty-format: 27.5.1dependencies:'@adobe/css-tools': 4.4.4- '@testing-library/dom': 10.4.1+ '@testing-library/dom': 10.4.2aria-query: 5.3.2css.escape: 1.5.1dom-accessibility-api: 0.6.3picocolors: 1.1.1redent: 3.0.0optionalDependencies:- vitest: 5.0.3(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))+ vitest: 5.0.5(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))- '@testing-library/[email protected](@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@testing-library/[email protected](@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@babel/runtime': 7.29.7- '@testing-library/dom': 10.4.1+ '@testing-library/dom': 10.4.2react: 19.3.0react-dom: 19.3.0([email protected])optionalDependencies:'@types/react': 19.3.0'@types/react-dom': 19.3.0(@types/[email protected])- '@testing-library/[email protected](@testing-library/[email protected])':+ '@testing-library/[email protected](@testing-library/[email protected])':dependencies:- '@testing-library/dom': 10.4.1+ '@testing-library/dom': 10.4.2'@tiptap/[email protected](@tiptap/[email protected])':dependencies:@@ -16975,10 +16846,6 @@ snapshots:'@types/webidl-conversions': 7.0.3optional: true- '@types/[email protected]':- dependencies:- '@types/node': 26.6.3-'@types/[email protected]':dependencies:'@types/node': 26.6.3@@ -17056,37 +16923,37 @@ snapshots:d3-selection: 3.0.0d3-transition: 3.0.1([email protected])- '@vitejs/[email protected](@rolldown/[email protected](@babel/[email protected])(@babel/[email protected](@babel/[email protected]))(@babel/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])':+ '@vitejs/[email protected](@rolldown/[email protected](@babel/[email protected])(@babel/[email protected](@babel/[email protected]))(@babel/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])':dependencies:'@rolldown/pluginutils': 1.0.1- vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'optionalDependencies:- '@rolldown/plugin-babel': 0.2.4(@babel/[email protected])(@babel/[email protected](@babel/[email protected]))(@babel/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])+ '@rolldown/plugin-babel': 0.2.4(@babel/[email protected])(@babel/[email protected](@babel/[email protected]))(@babel/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])babel-plugin-react-compiler: 1.0.0- '@vitest/[email protected]([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])':+ '@vitest/[email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected])':dependencies:- '@testing-library/dom': 10.4.1- '@testing-library/user-event': 14.6.7(@testing-library/[email protected])- '@vitest/browser': 5.0.1([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])- vitest: 5.0.3(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ '@testing-library/dom': 10.4.2+ '@testing-library/user-event': 14.6.7(@testing-library/[email protected])+ '@vitest/browser': 5.0.5(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected])+ vitest: 5.0.5(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))transitivePeerDependencies:- bufferutil- msw- utf-8-validate- vite- '@vitest/[email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected])':+ '@vitest/[email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected])':dependencies:'@blazediff/core': 1.10.0- '@vitest/mocker': 5.0.1(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))- '@vitest/ui': 5.0.1([email protected])- '@vitest/utils': 5.0.1- magic-string: 1.4.2+ '@vitest/mocker': 5.0.5(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))+ '@vitest/ui': 5.0.5([email protected])+ '@vitest/utils': 5.0.5+ magic-string: 1.4.3pngjs: 7.0.0sirv: 3.0.2- tinyrainbow: 3.1.1- vitest: 5.0.3(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ tinyrainbow: 3.2.0+ vitest: 5.0.5(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))ws: 8.21.3transitivePeerDependencies:- bufferutil@@ -17094,131 +16961,82 @@ snapshots:- utf-8-validate- vite- '@vitest/[email protected]([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])':- dependencies:- '@blazediff/core': 1.10.0- '@vitest/mocker': 5.0.1([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))- '@vitest/ui': 5.0.1([email protected])- '@vitest/utils': 5.0.1- magic-string: 1.4.2- pngjs: 7.0.0- sirv: 3.0.2- tinyrainbow: 3.1.1- vitest: 5.0.3(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))- ws: 8.21.3- transitivePeerDependencies:- - bufferutil- - msw- - utf-8-validate- - vite-- '@vitest/[email protected]([email protected])':dependencies:'@bcoe/v8-coverage': 1.0.2- '@vitest/istanbul-lib-coverage': 1.0.1- '@vitest/istanbul-lib-report': 1.0.1+ '@vitest/istanbul-lib-coverage': 1.0.2+ '@vitest/istanbul-lib-report': 1.0.2ast-v8-to-istanbul: 1.0.7magicast: 0.5.5- obug: 2.2.1- std-env: 4.2.0- tinyrainbow: 3.1.1- vitest: 5.0.3(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))-- '@vitest/[email protected]': {}-- '@vitest/[email protected]':- dependencies:- '@vitest/istanbul-lib-coverage': 1.0.1-- '@vitest/[email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))':- dependencies:- '@jridgewell/trace-mapping': 0.3.31- '@vitest/spy': 5.0.1- estree-walker: 3.0.3- magic-string: 1.4.2+ obug: 3.0.0+ std-env: 4.3.0+ tinyrainbow: 3.2.0+ vitest: 5.0.5(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))optionalDependencies:- msw: 2.12.10(@types/[email protected])([email protected])- vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ '@vitest/browser': 5.0.5(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected])- '@vitest/[email protected]([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':- dependencies:- '@jridgewell/trace-mapping': 0.3.31- '@vitest/spy': 5.0.1- estree-walker: 3.0.3- magic-string: 1.4.2- optionalDependencies:- msw: 2.12.10(@types/[email protected])([email protected])- vite: 8.3.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ '@vitest/[email protected]': {}- '@vitest/[email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))':+ '@vitest/[email protected]':dependencies:- '@jridgewell/trace-mapping': 0.3.31- '@vitest/spy': 5.0.3- estree-walker: 3.0.3- magic-string: 1.4.2- optionalDependencies:- msw: 2.12.10(@types/[email protected])([email protected])- vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ '@vitest/istanbul-lib-coverage': 1.0.2- '@vitest/[email protected]([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':+ '@vitest/[email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))':dependencies:'@jridgewell/trace-mapping': 0.3.31- '@vitest/spy': 5.0.3+ '@vitest/spy': 5.0.5estree-walker: 3.0.3- magic-string: 1.4.2+ magic-string: 1.4.3optionalDependencies:msw: 2.12.10(@types/[email protected])([email protected])- vite: 8.3.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'- '@vitest/[email protected]':+ '@vitest/[email protected]':dependencies:- tinyrainbow: 3.1.1+ tinyrainbow: 3.2.0- '@vitest/[email protected]':+ '@vitest/[email protected]':dependencies:- '@vitest/pretty-format': 5.0.1- '@vitest/utils': 5.0.1- magic-string: 1.4.2+ '@vitest/pretty-format': 5.0.5+ '@vitest/utils': 5.0.5+ magic-string: 1.4.3pathe: 2.0.3- '@vitest/[email protected]': {}-- '@vitest/[email protected]': {}+ '@vitest/[email protected]': {}- '@vitest/[email protected]([email protected])':+ '@vitest/[email protected]([email protected])':dependencies:- '@vitest/utils': 5.0.1+ '@vitest/utils': 5.0.5fflate: 0.8.3flatted: 3.4.4pathe: 2.0.3sirv: 3.0.2- tinyrainbow: 3.1.1- vitest: 5.0.3(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ tinyrainbow: 3.2.0+ vitest: 5.0.5(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))- '@vitest/[email protected]':+ '@vitest/[email protected]':dependencies:- '@vitest/pretty-format': 5.0.1+ '@vitest/pretty-format': 5.0.5convert-source-map: 2.0.0- tinyrainbow: 3.1.1+ tinyrainbow: 3.2.0- '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])':+ '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])':dependencies:- '@oxc-project/runtime': 0.151.0- '@oxc-project/types': 0.151.0+ '@oxc-project/runtime': 0.155.0+ '@oxc-project/types': 0.155.0lightningcss: 1.33.0- postcss: 8.5.30- yuku-codegen: 0.9.5- yuku-parser: 0.9.5+ postcss: 8.5.31+ yuku-parser: 0.19.0optionalDependencies:'@types/node': 26.6.3- '@voidzero-dev/vite-plus-darwin-arm64': 1.0.0- '@voidzero-dev/vite-plus-darwin-x64': 1.0.0- '@voidzero-dev/vite-plus-linux-arm64-gnu': 1.0.0- '@voidzero-dev/vite-plus-linux-arm64-musl': 1.0.0- '@voidzero-dev/vite-plus-linux-x64-gnu': 1.0.0- '@voidzero-dev/vite-plus-linux-x64-musl': 1.0.0- '@voidzero-dev/vite-plus-win32-arm64-msvc': 1.0.0- '@voidzero-dev/vite-plus-win32-x64-msvc': 1.0.0+ '@voidzero-dev/vite-plus-darwin-arm64': 1.4.0+ '@voidzero-dev/vite-plus-darwin-x64': 1.4.0+ '@voidzero-dev/vite-plus-linux-arm64-gnu': 1.4.0+ '@voidzero-dev/vite-plus-linux-arm64-musl': 1.4.0+ '@voidzero-dev/vite-plus-linux-x64-gnu': 1.4.0+ '@voidzero-dev/vite-plus-linux-x64-musl': 1.4.0+ '@voidzero-dev/vite-plus-win32-arm64-msvc': 1.4.0+ '@voidzero-dev/vite-plus-win32-x64-msvc': 1.4.0esbuild: 0.28.1fsevents: 2.3.3jiti: 2.7.0@@ -17227,107 +17045,71 @@ snapshots:typescript: 7.0.2yaml: 2.9.0- '@voidzero-dev/[email protected]':+ '@voidzero-dev/[email protected]':optional: true- '@voidzero-dev/[email protected]':+ '@voidzero-dev/[email protected]':optional: true- '@voidzero-dev/[email protected]':+ '@voidzero-dev/[email protected]':optional: true- '@voidzero-dev/[email protected]':+ '@voidzero-dev/[email protected]':optional: true- '@voidzero-dev/[email protected]':+ '@voidzero-dev/[email protected]':optional: true- '@voidzero-dev/[email protected]':+ '@voidzero-dev/[email protected]':optional: true- '@voidzero-dev/[email protected]':+ '@voidzero-dev/[email protected]':optional: true- '@voidzero-dev/[email protected]':+ '@voidzero-dev/[email protected]':optional: true'@xmldom/[email protected]': {}'@xmldom/[email protected]': {}- '@yuku-codegen/[email protected]':- optional: true-- '@yuku-codegen/[email protected]':- optional: true-- '@yuku-codegen/[email protected]':+ '@yuku-core/[email protected]':optional: true- '@yuku-codegen/[email protected]':+ '@yuku-core/[email protected]':optional: true- '@yuku-codegen/[email protected]':+ '@yuku-core/[email protected]':optional: true- '@yuku-codegen/[email protected]':+ '@yuku-core/[email protected]':optional: true- '@yuku-codegen/[email protected]':+ '@yuku-core/[email protected]':optional: true- '@yuku-codegen/[email protected]':+ '@yuku-core/[email protected]':optional: true- '@yuku-codegen/[email protected]':+ '@yuku-core/[email protected]':optional: true- '@yuku-codegen/[email protected]':+ '@yuku-core/[email protected]':optional: true- '@yuku-codegen/[email protected]':+ '@yuku-core/[email protected]':optional: true- '@yuku-codegen/[email protected]':+ '@yuku-core/[email protected]':optional: true- '@yuku-parser/[email protected]':+ '@yuku-core/[email protected]':optional: true- '@yuku-parser/[email protected]':+ '@yuku-core/[email protected]':optional: true- '@yuku-parser/[email protected]':- optional: true-- '@yuku-parser/[email protected]':- optional: true-- '@yuku-parser/[email protected]':- optional: true-- '@yuku-parser/[email protected]':- optional: true-- '@yuku-parser/[email protected]':- optional: true-- '@yuku-parser/[email protected]':- optional: true-- '@yuku-parser/[email protected]':- optional: true-- '@yuku-parser/[email protected]':- optional: true-- '@yuku-parser/[email protected]':- optional: true-- '@yuku-parser/[email protected]':- optional: true-- '@yuku-toolchain/[email protected]': {}+ '@yuku-toolchain/[email protected]': {}dependencies:@@ -17374,7 +17156,7 @@ snapshots:dependencies:fast-deep-equal: 3.1.3- fast-uri: 3.1.8+ fast-uri: 3.1.9json-schema-traverse: 1.0.0require-from-string: 2.0.2@@ -17602,61 +17384,25 @@ snapshots:- [email protected](5179e506bce74021b870cf0e3de62b8c):- dependencies:- '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])- '@better-auth/drizzle-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](@electric-sql/[email protected])(@opentelemetry/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected])([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected])))- '@better-auth/kysely-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected])- '@better-auth/memory-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])- '@better-auth/mongo-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected]([email protected]))- '@better-auth/prisma-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))- '@better-auth/telemetry': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])(@better-fetch/[email protected])- '@better-auth/utils': 0.4.2- '@better-fetch/fetch': 1.3.1- '@noble/ciphers': 2.2.0- '@noble/hashes': 2.2.0- better-call: 1.3.7([email protected])- defu: 6.1.7- jose: 6.2.8- kysely: 0.29.4- nanostores: 1.5.4- zod: 4.6.5- optionalDependencies:- '@prisma/client': 7.4.2([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected])- drizzle-kit: 0.31.11- drizzle-orm: 0.45.3(@electric-sql/[email protected])(@opentelemetry/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected])([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))- mongodb: 7.1.0([email protected])- mysql2: 3.24.4(@types/[email protected])- next: 16.4.2(@babel/[email protected])(@opentelemetry/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])- pg: 8.23.1- prisma: 7.4.2(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected])- react: 19.3.0- react-dom: 19.3.0([email protected])- solid-js: 1.9.15- vitest: 5.0.3(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))- transitivePeerDependencies:- - '@cloudflare/workers-types'- - '@opentelemetry/api'-- [email protected](82174e0adfa68d3a2b7174b18293a9e1):+ [email protected](52d7fe43601f96605a6cdbee2310ae5a):dependencies:- '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])- '@better-auth/drizzle-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](@electric-sql/[email protected])(@opentelemetry/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected])([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected])))- '@better-auth/kysely-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected])- '@better-auth/memory-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])- '@better-auth/mongo-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected]([email protected]))- '@better-auth/prisma-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))- '@better-auth/telemetry': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])(@better-fetch/[email protected])+ '@better-auth/core': 1.6.26(@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])+ '@better-auth/drizzle-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](@electric-sql/[email protected])(@opentelemetry/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected])([email protected])([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected])))+ '@better-auth/kysely-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected])+ '@better-auth/memory-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])+ '@better-auth/mongo-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected]([email protected]))+ '@better-auth/prisma-adapter': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])(@prisma/[email protected]([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected]))([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))+ '@better-auth/telemetry': 1.6.26(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])(@better-fetch/[email protected])'@better-auth/utils': 0.4.2'@better-fetch/fetch': 1.3.1'@noble/ciphers': 2.2.0'@noble/hashes': 2.2.0- better-call: 1.3.7([email protected])+ better-call: 1.3.7([email protected])defu: 6.1.7jose: 6.2.8kysely: 0.29.4nanostores: 1.5.4- zod: 4.6.5+ zod: 4.6.7optionalDependencies:'@prisma/client': 7.4.2([email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])([email protected]))([email protected])drizzle-kit: 0.31.11@@ -17669,19 +17415,19 @@ snapshots:react: 19.3.0react-dom: 19.3.0([email protected])solid-js: 1.9.15- vitest: 5.0.3(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))+ vitest: 5.0.5(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))transitivePeerDependencies:- '@cloudflare/workers-types'- '@opentelemetry/api'dependencies:'@better-auth/utils': 0.4.2'@better-fetch/fetch': 1.3.1rou3: 0.7.12set-cookie-parser: 3.1.2optionalDependencies:- zod: 4.6.5+ zod: 4.6.7dependencies:@@ -17691,10 +17437,10 @@ snapshots:dependencies:bytes: 3.1.2- content-type: 2.0.0+ content-type: 2.1.0debug: 4.4.3http-errors: 2.0.1iconv-lite: 0.7.3@@ -17723,7 +17469,7 @@ snapshots:dependencies:big-integer: 1.6.52dependencies:balanced-match: 4.0.4@@ -17800,7 +17546,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}dependencies:@@ -17965,12 +17711,12 @@ snapshots:+ [email protected]: {}+- [email protected]: {}-dependencies:array-ify: 1.0.0@@ -18034,6 +17780,8 @@ snapshots:+ [email protected]: {}+dependencies:compare-func: 2.0.0@@ -18118,9 +17866,9 @@ snapshots:dependencies:- '@modelcontextprotocol/sdk': 1.32.0([email protected])+ '@modelcontextprotocol/sdk': 1.32.2([email protected])jsonpath-rfc9535: 1.1.0- zod: 4.6.5+ zod: 4.6.7transitivePeerDependencies:- '@cfworker/json-schema'- supports-color@@ -18564,13 +18312,12 @@ snapshots:dependencies:'@types/cors': 2.8.19'@types/node': 26.6.3- '@types/ws': 8.18.1+ '@types/ws': 8.18.2accepts: 1.3.8- base64id: 2.0.0cookie: 0.7.2cors: 2.8.6debug: 4.4.3@@ -19022,12 +18769,12 @@ snapshots:dependencies:express: 5.2.1- ip-address: 10.3.1+ ip-address: 10.7.5dependencies:accepts: 2.0.0- body-parser: 2.3.0+ body-parser: 2.4.0content-disposition: 1.1.0content-type: 1.0.5cookie: 0.7.2@@ -19078,7 +18825,7 @@ snapshots:merge2: 1.4.1micromatch: 4.0.8- [email protected]: {}+ [email protected]: {}dependencies:@@ -19384,9 +19131,7 @@ snapshots:- [email protected]: {}-- [email protected]: {}+ [email protected]: {}@@ -19552,7 +19297,7 @@ snapshots:transitivePeerDependencies:- supports-color- [email protected]: {}+ [email protected]: {}@@ -19745,9 +19490,9 @@ snapshots:dependencies:- commander: 8.3.0+ commander: 15.0.0@@ -19973,7 +19718,7 @@ snapshots:dependencies:'@jridgewell/sourcemap-codec': 1.6.0dependencies:'@jridgewell/sourcemap-codec': 1.6.0@@ -19993,7 +19738,7 @@ snapshots:dependencies:tmpl: 1.0.5dependencies:argparse: 2.0.1entities: 4.5.0@@ -20153,7 +19898,7 @@ snapshots:dayjs: 1.11.21dompurify: 3.4.17es-toolkit: 1.50.0- katex: 0.16.47+ katex: 0.18.10khroma: 2.1.0marked: 16.4.2roughjs: 4.6.6@@ -20497,7 +20242,7 @@ snapshots:dependencies:- brace-expansion: 5.0.9+ brace-expansion: 5.0.12@@ -20606,7 +20351,7 @@ snapshots:'@swc/helpers': 0.5.23baseline-browser-mapping: 2.11.28caniuse-lite: 1.0.30001816- postcss: 8.5.30+ postcss: 8.5.31react: 19.3.0react-dom: 19.3.0([email protected])styled-jsx: 5.1.6(@babel/[email protected])([email protected])@@ -20672,7 +20417,7 @@ snapshots:dependencies:whatwg-url: 5.0.0- [email protected]: {}+ [email protected](patch_hash=7af5fa910c9692d7af8fa33df2f5a3d74505f4e7c46a012d0e0137903d01215c): {}@@ -20680,7 +20425,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}dependencies:@@ -20767,7 +20512,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}dependencies:@@ -20893,63 +20638,63 @@ snapshots:'@oxc-parser/binding-win32-ia32-msvc': 0.143.0'@oxc-parser/binding-win32-x64-msvc': 0.143.0- [email protected]([email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])):+ [email protected]([email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])):dependencies:- tinypool: 2.1.2+ tinypool: 2.2.0optionalDependencies:- '@oxfmt/binding-android-arm-eabi': 0.70.0- '@oxfmt/binding-android-arm64': 0.70.0- '@oxfmt/binding-darwin-arm64': 0.70.0- '@oxfmt/binding-darwin-x64': 0.70.0- '@oxfmt/binding-freebsd-x64': 0.70.0- '@oxfmt/binding-linux-arm-gnueabihf': 0.70.0- '@oxfmt/binding-linux-arm-musleabihf': 0.70.0- '@oxfmt/binding-linux-arm64-gnu': 0.70.0- '@oxfmt/binding-linux-arm64-musl': 0.70.0- '@oxfmt/binding-linux-ppc64-gnu': 0.70.0- '@oxfmt/binding-linux-riscv64-gnu': 0.70.0- '@oxfmt/binding-linux-riscv64-musl': 0.70.0- '@oxfmt/binding-linux-s390x-gnu': 0.70.0- '@oxfmt/binding-linux-x64-gnu': 0.70.0- '@oxfmt/binding-linux-x64-musl': 0.70.0- '@oxfmt/binding-openharmony-arm64': 0.70.0- '@oxfmt/binding-win32-arm64-msvc': 0.70.0- '@oxfmt/binding-win32-ia32-msvc': 0.70.0- '@oxfmt/binding-win32-x64-msvc': 0.70.0- vite-plus: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])-+ '@oxfmt/binding-android-arm-eabi': 0.74.0+ '@oxfmt/binding-android-arm64': 0.74.0+ '@oxfmt/binding-darwin-arm64': 0.74.0+ '@oxfmt/binding-darwin-x64': 0.74.0+ '@oxfmt/binding-freebsd-x64': 0.74.0+ '@oxfmt/binding-linux-arm-gnueabihf': 0.74.0+ '@oxfmt/binding-linux-arm-musleabihf': 0.74.0+ '@oxfmt/binding-linux-arm64-gnu': 0.74.0+ '@oxfmt/binding-linux-arm64-musl': 0.74.0+ '@oxfmt/binding-linux-ppc64-gnu': 0.74.0+ '@oxfmt/binding-linux-riscv64-gnu': 0.74.0+ '@oxfmt/binding-linux-riscv64-musl': 0.74.0+ '@oxfmt/binding-linux-s390x-gnu': 0.74.0+ '@oxfmt/binding-linux-x64-gnu': 0.74.0+ '@oxfmt/binding-linux-x64-musl': 0.74.0+ '@oxfmt/binding-openharmony-arm64': 0.74.0+ '@oxfmt/binding-win32-arm64-msvc': 0.74.0+ '@oxfmt/binding-win32-ia32-msvc': 0.74.0+ '@oxfmt/binding-win32-x64-msvc': 0.74.0+ vite-plus: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+optionalDependencies:- '@oxlint-tsgolint/darwin-arm64': 7.0.2003- '@oxlint-tsgolint/darwin-x64': 7.0.2003- '@oxlint-tsgolint/linux-arm64': 7.0.2003- '@oxlint-tsgolint/linux-x64': 7.0.2003- '@oxlint-tsgolint/win32-arm64': 7.0.2003- '@oxlint-tsgolint/win32-x64': 7.0.2003-- [email protected]([email protected])([email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])):+ '@oxlint-tsgolint/darwin-arm64': 7.0.2004+ '@oxlint-tsgolint/darwin-x64': 7.0.2004+ '@oxlint-tsgolint/linux-arm64': 7.0.2004+ '@oxlint-tsgolint/linux-x64': 7.0.2004+ '@oxlint-tsgolint/win32-arm64': 7.0.2004+ '@oxlint-tsgolint/win32-x64': 7.0.2004++ [email protected]([email protected])([email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])):optionalDependencies:- '@oxlint/binding-android-arm-eabi': 1.85.0- '@oxlint/binding-android-arm64': 1.85.0- '@oxlint/binding-darwin-arm64': 1.85.0- '@oxlint/binding-darwin-x64': 1.85.0- '@oxlint/binding-freebsd-x64': 1.85.0- '@oxlint/binding-linux-arm-gnueabihf': 1.85.0- '@oxlint/binding-linux-arm-musleabihf': 1.85.0- '@oxlint/binding-linux-arm64-gnu': 1.85.0- '@oxlint/binding-linux-arm64-musl': 1.85.0- '@oxlint/binding-linux-ppc64-gnu': 1.85.0- '@oxlint/binding-linux-riscv64-gnu': 1.85.0- '@oxlint/binding-linux-riscv64-musl': 1.85.0- '@oxlint/binding-linux-s390x-gnu': 1.85.0- '@oxlint/binding-linux-x64-gnu': 1.85.0- '@oxlint/binding-linux-x64-musl': 1.85.0- '@oxlint/binding-openharmony-arm64': 1.85.0- '@oxlint/binding-win32-arm64-msvc': 1.85.0- '@oxlint/binding-win32-ia32-msvc': 1.85.0- '@oxlint/binding-win32-x64-msvc': 1.85.0- oxlint-tsgolint: 7.0.2003- vite-plus: 1.0.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])+ '@oxlint/binding-android-arm-eabi': 1.89.0+ '@oxlint/binding-android-arm64': 1.89.0+ '@oxlint/binding-darwin-arm64': 1.89.0+ '@oxlint/binding-darwin-x64': 1.89.0+ '@oxlint/binding-freebsd-x64': 1.89.0+ '@oxlint/binding-linux-arm-gnueabihf': 1.89.0+ '@oxlint/binding-linux-arm-musleabihf': 1.89.0+ '@oxlint/binding-linux-arm64-gnu': 1.89.0+ '@oxlint/binding-linux-arm64-musl': 1.89.0+ '@oxlint/binding-linux-ppc64-gnu': 1.89.0+ '@oxlint/binding-linux-riscv64-gnu': 1.89.0+ '@oxlint/binding-linux-riscv64-musl': 1.89.0+ '@oxlint/binding-linux-s390x-gnu': 1.89.0+ '@oxlint/binding-linux-x64-gnu': 1.89.0+ '@oxlint/binding-linux-x64-musl': 1.89.0+ '@oxlint/binding-openharmony-arm64': 1.89.0+ '@oxlint/binding-win32-arm64-msvc': 1.89.0+ '@oxlint/binding-win32-ia32-msvc': 1.89.0+ '@oxlint/binding-win32-x64-msvc': 1.89.0+ oxlint-tsgolint: 7.0.2004+ vite-plus: 1.4.0(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])@@ -21063,10 +20808,7 @@ snapshots:lru-cache: 11.5.3minipass: 7.1.3- [email protected]: {}-- optional: true+ [email protected]: {}@@ -21166,7 +20908,7 @@ snapshots:dependencies:nanoid: 3.3.19picocolors: 1.1.1- source-map-js: 1.2.1+ source-map-js: 1.2.2dependencies:@@ -21587,7 +21329,7 @@ snapshots:[email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):dependencies:css-to-react-native: 3.2.0- markdown-it: 14.1.1+ markdown-it: 14.3.3prop-types: 15.8.1react: 19.3.0react-native: 0.88.0(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])@@ -21962,7 +21704,7 @@ snapshots:depd: 2.0.0is-promise: 4.0.0parseurl: 1.3.3- path-to-regexp: 8.4.2+ path-to-regexp: 9.0.0transitivePeerDependencies:- supports-color@@ -22116,7 +21858,7 @@ snapshots:'@babel/plugin-transform-typescript': 7.28.6(@babel/[email protected])'@babel/preset-typescript': 7.28.5(@babel/[email protected])'@dotenvx/dotenvx': 1.52.0- '@modelcontextprotocol/sdk': 1.32.0([email protected])+ '@modelcontextprotocol/sdk': 1.32.2([email protected](patch_hash=961e904f64170e793e7ee7ea99c70d9df6319e1807c59dfc2817051a075cacdd))'@types/validate-npm-package-name': 4.0.2browserslist: 4.29.0cn: 0.2.6@@ -22142,8 +21884,8 @@ snapshots:tsconfig-paths: 4.2.0undici: 7.30.1validate-npm-package-name: 7.0.2- zod: 3.25.76- zod-to-json-schema: 3.25.2([email protected])+ zod: 3.25.76(patch_hash=961e904f64170e793e7ee7ea99c70d9df6319e1807c59dfc2817051a075cacdd)+ zod-to-json-schema: 3.25.2([email protected](patch_hash=961e904f64170e793e7ee7ea99c70d9df6319e1807c59dfc2817051a075cacdd))transitivePeerDependencies:- '@cfworker/json-schema'- babel-plugin-macros@@ -22289,7 +22031,7 @@ snapshots:base64id: 2.0.0cors: 2.8.6debug: 4.4.3- engine.io: 6.6.9+ engine.io: 6.6.11socket.io-adapter: 2.5.8socket.io-parser: 4.2.7transitivePeerDependencies:@@ -22299,7 +22041,7 @@ snapshots:dependencies:- ip-address: 10.3.1+ ip-address: 10.7.5smart-buffer: 4.2.0@@ -22331,8 +22073,6 @@ snapshots:optionalDependencies:'@types/react': 19.3.0- [email protected]: {}-@@ -22393,7 +22133,7 @@ snapshots:optional: true- [email protected]: {}+ [email protected]: {}@@ -22619,7 +22359,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}@@ -22628,9 +22368,9 @@ snapshots:fdir: 6.5.0([email protected])picomatch: 4.0.7- [email protected]: {}+ [email protected]: {}- [email protected]: {}+ [email protected]: {}dependencies:@@ -22828,7 +22568,7 @@ snapshots:- [email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected]):+ [email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected]):dependencies:'@jridgewell/remapping': 2.3.5picomatch: 4.0.7@@ -22837,7 +22577,7 @@ snapshots:esbuild: 0.28.1rolldown: 1.2.15rollup: 4.59.0- vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'optional: true@@ -22915,40 +22655,45 @@ snapshots:'@types/unist': 3.0.3vfile-message: 4.0.3- [email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected]):- dependencies:- '@oxc-project/types': 0.151.0- '@oxlint/plugins': 1.79.0- '@vitest/browser': 5.0.1(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected])- '@vitest/browser-preview': 5.0.1([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])- '@vitest/mocker': 5.0.1(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))- '@vitest/pretty-format': 5.0.1- '@vitest/snapshot': 5.0.1- '@vitest/spy': 5.0.1- '@vitest/utils': 5.0.1- oxfmt: 0.70.0([email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected]))- oxlint: 1.85.0([email protected])([email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected]))- oxlint-tsgolint: 7.0.2003- vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'- vitest: 5.0.3(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))+ [email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected]):+ dependencies:+ '@oxc-project/runtime': 0.155.0+ '@oxc-project/types': 0.155.0+ '@oxlint/plugins': 1.89.0+ '@vitest/browser': 5.0.5(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected])+ '@vitest/browser-preview': 5.0.5(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected])+ '@vitest/mocker': 5.0.5(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))+ '@vitest/pretty-format': 5.0.5+ '@vitest/snapshot': 5.0.5+ '@vitest/spy': 5.0.5+ '@vitest/utils': 5.0.5+ oxfmt: 0.74.0([email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected]))+ oxlint: 1.89.0([email protected])([email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected]))+ oxlint-tsgolint: 7.0.2004+ vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ vitest: 5.0.5(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))optionalDependencies:- '@voidzero-dev/vite-plus-darwin-arm64': 1.0.0- '@voidzero-dev/vite-plus-darwin-x64': 1.0.0- '@voidzero-dev/vite-plus-linux-arm64-gnu': 1.0.0- '@voidzero-dev/vite-plus-linux-arm64-musl': 1.0.0- '@voidzero-dev/vite-plus-linux-x64-gnu': 1.0.0- '@voidzero-dev/vite-plus-linux-x64-musl': 1.0.0- '@voidzero-dev/vite-plus-win32-arm64-msvc': 1.0.0- '@voidzero-dev/vite-plus-win32-x64-msvc': 1.0.0+ '@voidzero-dev/vite-plus-darwin-arm64': 1.4.0+ '@voidzero-dev/vite-plus-darwin-x64': 1.4.0+ '@voidzero-dev/vite-plus-linux-arm64-gnu': 1.4.0+ '@voidzero-dev/vite-plus-linux-arm64-musl': 1.4.0+ '@voidzero-dev/vite-plus-linux-x64-gnu': 1.4.0+ '@voidzero-dev/vite-plus-linux-x64-musl': 1.4.0+ '@voidzero-dev/vite-plus-win32-arm64-msvc': 1.4.0+ '@voidzero-dev/vite-plus-win32-x64-msvc': 1.4.0transitivePeerDependencies:- '@arethetypeswrong/core'+ - '@astrojs/compiler-rs'- '@edge-runtime/vm'- '@opentelemetry/api'- '@types/node'+ - '@typescript/native-preview'- '@vitejs/devtools'- '@vitest/coverage-istanbul'- '@vitest/coverage-v8'- '@vitest/ui'+ - '@volar/typescript'+ - '@vue/language-core'- bufferutil- esbuild- happy-dom@@ -22968,70 +22713,31 @@ snapshots:- unplugin-unused- unrun- utf-8-validate+ - vue-tsc- yaml- [email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):- dependencies:- lightningcss: 1.33.0- picomatch: 4.0.7- postcss: 8.5.31- rolldown: 1.2.15- tinyglobby: 0.2.17- optionalDependencies:- '@types/node': 26.6.3- esbuild: 0.28.1- fsevents: 2.3.3- jiti: 2.7.0- terser: 5.51.2- tsx: 4.23.15- yaml: 2.9.0-- [email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected])):+ [email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected](@vitest/[email protected])([email protected]))(@vitest/[email protected]([email protected]))(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected])):dependencies:'@types/chai': 5.2.3- '@vitest/mocker': 5.0.3(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))- chai: 6.2.2+ '@vitest/mocker': 5.0.5(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))+ chai: 6.3.0es-module-lexer: 2.3.2expect-type: 1.4.0- magic-string: 1.4.2- obug: 2.2.1+ magic-string: 1.4.3+ obug: 3.0.0picomatch: 4.0.7- std-env: 4.2.0- tinybench: 6.1.4+ std-env: 4.3.0+ tinybench: 6.2.2tinyexec: 1.3.1tinyglobby: 0.2.17- vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'why-is-node-running: 3.2.1optionalDependencies:'@opentelemetry/api': 1.9.1'@types/node': 26.6.3- '@vitest/browser-preview': 5.0.1([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])- '@vitest/coverage-v8': 5.0.3([email protected])- jsdom: 30.1.1(@noble/[email protected])- transitivePeerDependencies:- - msw-- [email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])):- dependencies:- '@types/chai': 5.2.3- '@vitest/mocker': 5.0.3([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))- chai: 6.2.2- es-module-lexer: 2.3.2- expect-type: 1.4.0- magic-string: 1.4.2- obug: 2.2.1- picomatch: 4.0.7- std-env: 4.2.0- tinybench: 6.1.4- tinyexec: 1.3.1- tinyglobby: 0.2.17- vite: 8.3.1(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])- why-is-node-running: 3.2.1- optionalDependencies:- '@opentelemetry/api': 1.9.1- '@types/node': 26.6.3- '@vitest/browser-preview': 5.0.1([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])- '@vitest/coverage-v8': 5.0.3([email protected])+ '@vitest/browser-preview': 5.0.5(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected](@types/[email protected])([email protected]))([email protected])+ '@vitest/coverage-v8': 5.0.5(@vitest/[email protected])([email protected])+ '@vitest/ui': 5.0.5([email protected])jsdom: 30.1.1(@noble/[email protected])transitivePeerDependencies:- msw@@ -23213,44 +22919,27 @@ snapshots:dependencies:- '@yuku-toolchain/types': 0.9.5-- dependencies:- '@yuku-toolchain/types': 0.9.5- optionalDependencies:- '@yuku-codegen/binding-android-arm64': 0.9.5- '@yuku-codegen/binding-darwin-arm64': 0.9.5- '@yuku-codegen/binding-darwin-x64': 0.9.5- '@yuku-codegen/binding-freebsd-x64': 0.9.5- '@yuku-codegen/binding-linux-arm-gnu': 0.9.5- '@yuku-codegen/binding-linux-arm-musl': 0.9.5- '@yuku-codegen/binding-linux-arm64-gnu': 0.9.5- '@yuku-codegen/binding-linux-arm64-musl': 0.9.5- '@yuku-codegen/binding-linux-x64-gnu': 0.9.5- '@yuku-codegen/binding-linux-x64-musl': 0.9.5- '@yuku-codegen/binding-win32-arm64': 0.9.5- '@yuku-codegen/binding-win32-x64': 0.9.5-- dependencies:- '@yuku-toolchain/types': 0.9.5- yuku-ast: 0.9.5+ '@yuku-toolchain/types': 0.19.0optionalDependencies:- '@yuku-parser/binding-android-arm64': 0.9.5- '@yuku-parser/binding-darwin-arm64': 0.9.5- '@yuku-parser/binding-darwin-x64': 0.9.5- '@yuku-parser/binding-freebsd-x64': 0.9.5- '@yuku-parser/binding-linux-arm-gnu': 0.9.5- '@yuku-parser/binding-linux-arm-musl': 0.9.5- '@yuku-parser/binding-linux-arm64-gnu': 0.9.5- '@yuku-parser/binding-linux-arm64-musl': 0.9.5- '@yuku-parser/binding-linux-x64-gnu': 0.9.5- '@yuku-parser/binding-linux-x64-musl': 0.9.5- '@yuku-parser/binding-win32-arm64': 0.9.5- '@yuku-parser/binding-win32-x64': 0.9.5+ '@yuku-core/binding-android-arm64': 0.19.0+ '@yuku-core/binding-darwin-arm64': 0.19.0+ '@yuku-core/binding-darwin-x64': 0.19.0+ '@yuku-core/binding-freebsd-x64': 0.19.0+ '@yuku-core/binding-linux-arm-gnu': 0.19.0+ '@yuku-core/binding-linux-arm-musl': 0.19.0+ '@yuku-core/binding-linux-arm64-gnu': 0.19.0+ '@yuku-core/binding-linux-arm64-musl': 0.19.0+ '@yuku-core/binding-linux-x64-gnu': 0.19.0+ '@yuku-core/binding-linux-x64-musl': 0.19.0+ '@yuku-core/binding-win32-arm64': 0.19.0+ '@yuku-core/binding-win32-x64': 0.19.0++ dependencies:+ '@yuku-toolchain/types': 0.19.0+ yuku-core: 0.19.0dependencies:@@ -23258,17 +22947,17 @@ snapshots:graphmatch: 1.1.1optional: true+ [email protected]([email protected](patch_hash=961e904f64170e793e7ee7ea99c70d9df6319e1807c59dfc2817051a075cacdd)):dependencies:- zod: 3.25.76+ zod: 3.25.76(patch_hash=961e904f64170e793e7ee7ea99c70d9df6319e1807c59dfc2817051a075cacdd)dependencies:- zod: 4.6.5+ zod: 4.6.7- [email protected]: {}+ [email protected](patch_hash=961e904f64170e793e7ee7ea99c70d9df6319e1807c59dfc2817051a075cacdd): {}- [email protected]: {}+ [email protected]: {}[email protected](@types/[email protected])([email protected])([email protected])([email protected]([email protected])):optionalDependencies:diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex fb814a0ee..bf4df6875 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -8,9 +8,9 @@ overrides:diff: 8.0.3esbuild: 0.28.1express-rate-limit: 8.2.2- hono: ">=4.13.5"+ hono: ">=4.13.14 <5"lodash: 4.18.1- markdown-it: 14.1.1+ markdown-it: 14.3.3minimatch: 10.2.3rollup: 4.59.0seroval: ">=1.5.3"@@ -19,38 +19,46 @@ overrides:socket.io-parser: ">=4.2.7"picomatch: ">=4.0.4"path-to-regexp: ">=8.4.0"- brace-expansion: ">=5.0.9"+ brace-expansion: ">=5.0.12 <6"yaml: ">=2.8.3"qs: ">=6.16.0"ws: ">=8.20.1"- ip-address: 10.3.1+ ip-address: 10.7.5postcss: ">=8.5.23"sharp: ">=0.35.5"dompurify: ">=3.4.17 <4"handlebars: ">=4.7.10 <5"- engine.io: ">=6.6.7"+ engine.io: ">=6.6.11 <7"valibot: ">=1.4.2"better-auth: 1.6.26"@better-auth/core": 1.6.26undici: ">=7.29.0 <8"js-yaml: ">=4.3.2 <5""@babel/core": ">=7.29.6 <8"- fast-uri: ">=3.1.6 <4"+ fast-uri: ">=3.1.9 <4"mysql2: ">=3.23.1"postcss-selector-parser: ">=7.1.3"deepmerge-ts: ">=8.0.0""nanoid@3": ">=3.3.18 <4"+ body-parser: ">=2.4.0 <3"+ source-map-js: ">=1.2.2 <2"+ # 0.18.11 was deprecated for accidental breaking changes; keep Mermaid 11 compatible.+ katex: 0.18.10vite@*: "catalog:"vitest@*: "catalog:"+patchedDependencies:+ # No upstream release yet; preserve the existing Forge and Zod 3 consumer APIs.+ [email protected]: patches/[email protected]+ [email protected]: patches/[email protected]onlyBuiltDependencies:- bcrypt- better-sqlite3- esbuildcatalog:- vite: npm:@voidzero-dev/[email protected]- vitest: 5.0.3- vite-plus: 1.0.0- "@vitest/coverage-v8": 5.0.3+ vite: npm:@voidzero-dev/[email protected]+ vitest: 5.0.5+ vite-plus: 1.4.0+ "@vitest/coverage-v8": 5.0.5peerDependencyRules:allowAny:- vitediff --git a/scripts/ci/README.md b/scripts/ci/README.mdindex 41d7aacbc..0f4ed4aab 100644--- a/scripts/ci/README.md+++ b/scripts/ci/README.md@@ -56,6 +56,61 @@ branch-rule setup are covered in[the contribution guide](../../CONTRIBUTING.md#contribution-eligibility). Runits tests with `node --test scripts/contribution-eligibility/*.test.mjs`.+## Releasing dependency security fixes++Integrate dependency fixes together with their lockfiles. The application and+the BrowserStack runner have separate pnpm workspaces; validate frozen installs+in both. Keep Vite+ and the aliased Vite core on the same release, and commit+dependency patches with the lockfile that references them. Keep the root Vite+alias explicit so automatically installed test-tool peers also use the patched+core. Docker dependency stages must copy those patches before installing.++Use one reviewed security-fix PR, with a conventional `fix(deps):` title so the+automatic release plan includes it. Land that consolidated change before+rebasing remaining dependency PRs; close superseded bot updates and review+unrelated upgrades separately against the new main lockfile.++Before merging, run the dependency regression tests, lint, typechecks, unit+tests, and builds. CI also checks the bundled image against disposable services,+including an upgrade from the previous release. A patched dependency can still+appear in advisory scanners because its upstream version has not changed;+record the advisory, patch, and regression evidence instead of changing package+versions to hide the finding.++The root backports cover Node-forge's nested DigestAlgorithm validation+([GHSA-86w9-cpqp-85rv](https://github.com/advisories/GHSA-86w9-cpqp-85rv),+[upstream fix](https://github.com/digitalbazaar/forge/pull/1152)) and bounded+collection validation in Zod 3, including its embedded Zod 4 exports+([GHSA-mrhx-c7xc-m3w5](https://github.com/advisories/GHSA-mrhx-c7xc-m3w5),+[upstream fix](https://github.com/colinhacks/zod/pull/6652),+[Zod 3 tracking](https://github.com/colinhacks/zod/issues/6653)). Run+`pnpm test:security:dependencies` against the installed dependency graph.+Remove a backport only when its replacement passes the same regression cases.+The BrowserStack cache-policy patch and its removal conditions are documented+in [the test workspace](../../tests/e2e/patches/README.md); run its checks with+`pnpm --dir tests/e2e test:security`.++Publication is a separate step:++1. Merge the reviewed security fixes and wait for successful CI on that exact+ main commit. Preview the manual **Release** workflow with `dry_run` enabled,+ reviewing all changes since the previous app release before choosing a bump.+ Run **Release** on the same reviewed source when ready. It builds versioned+ images before publishing and then promotes their tags and publishes Helm.+2. Publish an MCP update through a separate reviewed version bump in+ `packages/mcp/package.json` and `packages/mcp/server.json`. The MCP workflow+ runs on those main-branch changes; editing its dependency ranges alone does+ not republish an already published version. Verify a packed package in a+ fresh consumer installation, where repository overrides and patches do not+ apply. Check the CLI bundle too if its embedded MCP code changes; CLI version+ bumps have their own publishing workflow.+3. Rebuild and distribute the mobile app to deliver mobile Markdown fixes.+ The **Android APK** workflow produces an artifact, not a store release.+ Apply the normal version/build-number and signing process for each mobile+ distribution target; an updated server image does not update installed apps.++Do not run release dispatches or change package versions just to validate a fix.+## Local runtime checksUse disposable services only. The HTTP helpers refuse non-loopback origins.diff --git a/scripts/security/dependency-katex.test.mjs b/scripts/security/dependency-katex.test.mjsnew file mode 100644index 000000000..dd13abff0--- /dev/null+++ b/scripts/security/dependency-katex.test.mjs@@ -0,0 +1,47 @@+import assert from "node:assert/strict";+import { createRequire } from "node:module";+import { pathToFileURL } from "node:url";+import test from "node:test";++const webRequire = createRequire(+ new URL("../../apps/web/package.json", import.meta.url),+);+const mermaidRequire = createRequire(webRequire.resolve("mermaid"));+const katex = mermaidRequire("katex");++test("Mermaid's KaTeX ignores inherited trust while honoring explicit trust", () => {+ // GHSA-238p-pmpm-9mq7: a polluted options prototype must not enable links.+ const expression = String.raw`\href{https://example.com}{example}`;+ const inheritedOptions = Object.create({ trust: true });+ assert.doesNotMatch(+ katex.renderToString(expression, inheritedOptions),+ /<a\b/,+ );+ assert.match(katex.renderToString(expression, { trust: true }), /<a\b/);+});++test("Mermaid's KaTeX still renders math to HTML and MathML", () => {+ const output = katex.renderToString(String.raw`\sqrt{a^2 + b^2}`, {+ displayMode: true,+ throwOnError: true,+ });+ assert.match(output, /class="katex-display"/);+ assert.match(output, /<math\b/);+ assert.match(output, /class="katex-html"/);+});++test("Mermaid's KaTeX ESM import supports its MathML rendering contract", async () => {+ const { default: esmKatex } = await import(+ new URL("./katex.mjs", pathToFileURL(mermaidRequire.resolve("katex")))+ );+ const output = esmKatex.renderToString(String.raw`\sqrt{a^2 + b^2}`, {+ displayMode: true,+ throwOnError: true,+ output: "mathml",+ });+ assert.match(output, /<math\b/);+ assert.doesNotMatch(output, /class="katex-html"/);+ assert.throws(() =>+ esmKatex.renderToString(String.raw`\notacommand`, { throwOnError: true }),+ );+});diff --git a/scripts/security/dependency-markdown.test.mjs b/scripts/security/dependency-markdown.test.mjsnew file mode 100644index 000000000..05b6cde73--- /dev/null+++ b/scripts/security/dependency-markdown.test.mjs@@ -0,0 +1,41 @@+import assert from "node:assert/strict";+import { createRequire } from "node:module";+import test from "node:test";++const mobileRequire = createRequire(+ new URL("../../apps/mobile/package.json", import.meta.url),+);+const rendererRequire = createRequire(+ mobileRequire.resolve("react-native-markdown-display"),+);+const MarkdownIt = rendererRequire("markdown-it");++test("mobile Markdown keeps the token format consumed by its native renderer", () => {+ const parser = new MarkdownIt({ typographer: true, linkify: true });+ const tokens = parser.parse(+ "# Heading\n\n**bold** [Kaneo](https://kaneo.app)\n\n```ts\nconst n = 1;\n```",+ {},+ );+ assert.equal(tokens[0].type, "heading_open");+ assert.equal(tokens[0].nesting, 1);+ const inline = tokens.find(+ (token) => token.type === "inline" && token.content.startsWith("**bold**"),+ );+ assert.ok(inline.children.some((token) => token.type === "strong_open"));+ const link = inline.children.find((token) => token.type === "link_open");+ assert.deepEqual(link.attrs, [["href", "https://kaneo.app"]]);+ const fence = tokens.find((token) => token.type === "fence");+ assert.equal(fence.info, "ts");+ assert.equal(fence.content, "const n = 1;\n");+});++test("mobile Markdown continues rejecting executable links", () => {+ const parser = new MarkdownIt();+ const tokens = parser.parse("[unsafe](javascript:alert(1))", {});+ assert.ok(+ tokens.every(+ (token) =>+ token.children?.every((child) => child.type !== "link_open") ?? true,+ ),+ );+});diff --git a/scripts/security/dependency-node-forge.test.mjs b/scripts/security/dependency-node-forge.test.mjsnew file mode 100644index 000000000..229be7bf6--- /dev/null+++ b/scripts/security/dependency-node-forge.test.mjs@@ -0,0 +1,71 @@+import assert from "node:assert/strict";+import { generateKeyPairSync } from "node:crypto";+import { createRequire } from "node:module";+import test from "node:test";++const mobileRequire = createRequire(+ new URL("../../apps/mobile/package.json", import.meta.url),+);+const expoRequire = createRequire(mobileRequire.resolve("expo/package.json"));+const cliRequire = createRequire(expoRequire.resolve("@expo/cli/package.json"));+const certificatesRequire = createRequire(+ cliRequire.resolve("@expo/code-signing-certificates"),+);+const forge = certificatesRequire("node-forge");+const { privateKey: nodePrivateKey } = generateKeyPairSync("rsa", {+ modulusLength: 1024,+ publicExponent: 65537,+});+const privateKey = forge.pki.privateKeyFromPem(+ nodePrivateKey.export({ type: "pkcs1", format: "pem" }),+);+const publicKey = forge.pki.setRsaPublicKey(privateKey.n, privateKey.e);+const digest = forge.md.sha256+ .create()+ .update("Kaneo certificate validation regression")+ .digest()+ .getBytes();++function signedDigestInfo(withNull, withExtraElement) {+ const { asn1 } = forge;+ const universal = asn1.Class.UNIVERSAL;+ const algorithm = [+ asn1.create(+ universal,+ asn1.Type.OID,+ false,+ asn1.oidToDer(forge.pki.oids.sha256).getBytes(),+ ),+ ];+ if (withNull)+ algorithm.push(asn1.create(universal, asn1.Type.NULL, false, ""));+ if (withExtraElement)+ algorithm.push(+ asn1.create(universal, asn1.Type.OCTETSTRING, false, "unexpected"),+ );+ const info = asn1.create(universal, asn1.Type.SEQUENCE, true, [+ asn1.create(universal, asn1.Type.SEQUENCE, true, algorithm),+ asn1.create(universal, asn1.Type.OCTETSTRING, false, digest),+ ]);+ // Sign with our own private key so only DigestInfo validation is under test.+ return privateKey.sign(asn1.toDer(info).getBytes(), "NONE");+}++test("Expo's node-forge accepts valid SHA-256 DigestInfo with optional NULL", () => {+ for (const withNull of [false, true]) {+ assert.equal(+ publicKey.verify(digest, signedDigestInfo(withNull, false)),+ true,+ );+ }+});++test("Expo's node-forge rejects unconsumed nested DigestAlgorithm elements", () => {+ // Backport of https://github.com/digitalbazaar/forge/pull/1152.+ for (const withNull of [false, true]) {+ assert.throws(+ () => publicKey.verify(digest, signedDigestInfo(withNull, true)),+ /DigestInfo/,+ );+ }+});diff --git a/scripts/security/dependency-zod.test.mjs b/scripts/security/dependency-zod.test.mjsnew file mode 100644index 000000000..b800891a4--- /dev/null+++ b/scripts/security/dependency-zod.test.mjs@@ -0,0 +1,31 @@+import assert from "node:assert/strict";+import { createRequire } from "node:module";+import test from "node:test";++const mcpRequire = createRequire(+ new URL("../../packages/mcp/package.json", import.meta.url),+);+const { z } = mcpRequire("zod");++test("oversized constrained MCP arrays fail before parsing any element", async () => {+ // GHSA-mrhx-c7xc-m3w5: a size bound must also bound validation work.+ let parsed = 0;+ const element = z.string().refine(() => {+ parsed += 1;+ return true;+ });+ const schema = z.array(element).max(2);+ for (const result of [+ schema.safeParse(["a", "b", "c"]),+ await schema.safeParseAsync(["a", "b", "c"]),+ ]) {+ assert.equal(result.success, false);+ assert.deepEqual(+ result.error.issues.map(({ code }) => code),+ ["too_big"],+ );+ }+ assert.equal(parsed, 0);+ assert.deepEqual(schema.parse(["a", "b"]), ["a", "b"]);+ assert.equal(parsed, 2);+});diff --git a/scripts/security/dependency-zod3.test.mjs b/scripts/security/dependency-zod3.test.mjsnew file mode 100644index 000000000..1f216432d--- /dev/null+++ b/scripts/security/dependency-zod3.test.mjs@@ -0,0 +1,172 @@+import assert from "node:assert/strict";+import { createRequire } from "node:module";+import { pathToFileURL } from "node:url";+import { dirname } from "node:path";+import test from "node:test";+const mobileRequire = createRequire(+ new URL("../../apps/mobile/package.json", import.meta.url),+);+const expoRequire = createRequire(mobileRequire.resolve("expo/package.json"));+const cliRequire = createRequire(expoRequire.resolve("@expo/cli/package.json"));+const dir = dirname(cliRequire.resolve("zod/package.json"));+assert.equal(+ cliRequire("zod/package.json").version,+ "3.25.76",+ "Update this backport test when Expo changes its Zod dependency",+);+// GHSA-mrhx-c7xc-m3w5; upstream v4 fix: colinhacks/zod#6652, v3 tracking: #6653.+const require = createRequire(import.meta.url);+for (const entry of ["index", "v3/index", "v4/index", "v4-mini/index"]) {+ for (const format of ["js", "cjs"]) {+ const z =+ format === "js"+ ? await import(pathToFileURL(`${dir}/${entry}.js`))+ : require(`${dir}/${entry}.cjs`);+ const v3 = entry === "index" || entry === "v3/index";+ const label = `${entry}.${format}`;+ const refined = (fn) =>+ v3 ? z.string().refine(fn) : z.string().check(z.refine(fn));+ const array = (el, bound, exact = false) =>+ v3+ ? exact+ ? z.array(el).length(bound, "cap")+ : z.array(el).max(bound, "cap")+ : z+ .array(el)+ .check(+ exact+ ? z.length(bound, { error: "cap" })+ : z.maxLength(bound, { error: "cap" }),+ );+ const set = (el) =>+ v3+ ? z.set(el).size(2, "cap")+ : z.set(el).check(z.size(2, { error: "cap" }));+ const parse = (schema, value, async = false) =>+ v3+ ? async+ ? schema.safeParseAsync(value)+ : schema.safeParse(value)+ : async+ ? z.safeParseAsync(schema, value)+ : z.safeParse(schema, value);+ test(`${label}: bounded array/set reject before elements or outer refinements, sync and async`, async () => {+ let elements = 0,+ outer = 0;+ const element = refined(() => {+ elements++;+ return true;+ });+ const cases = [+ [array(element, 2), ["a", "b", "c"]],+ [array(element, 2, true), ["a", "b", "c"]],+ [set(element), new Set(["a", "b", "c"])],+ [array(z.string(), 2), Array(10000).fill(0)],+ ];+ for (let [schema, value] of cases) {+ schema = v3+ ? schema.refine(() => {+ outer++;+ return true;+ })+ : schema.check(+ z.refine(() => {+ outer++;+ return true;+ }),+ );+ for (const async of [false, true]) {+ const result = await parse(schema, value, async);+ assert.equal(result.success, false);+ assert.equal(result.error.issues.length, 1);+ assert.equal(result.error.issues[0].code, "too_big");+ assert.equal(result.error.issues[0].message, "cap");+ assert.deepEqual(result.error.issues[0].path, []);+ }+ }+ assert.equal(elements, 0);+ assert.equal(outer, 0);+ assert.deepEqual((await parse(array(element, 2), ["a", "b"])).data, [+ "a",+ "b",+ ]);+ assert.equal(elements, 2);+ });+ test(`${label}: nested paths, invalid types, undersize and unbounded aggregation remain`, () => {+ const result = parse(z.object({ items: array(z.string(), 1) }), {+ items: ["a", "b"],+ });+ assert.deepEqual(result.error.issues[0].path, ["items"]);+ assert.equal(+ parse(array(z.string(), 1), new Set(["a", "b"])).error.issues[0].code,+ "invalid_type",+ );+ const exact = parse(array(z.string(), 2, true), [1]);+ assert.deepEqual(exact.error.issues.map((i) => i.code).sort(), [+ "invalid_type",+ "too_small",+ ]);+ const unbounded = parse(z.array(z.string()), Array(5).fill(0));+ assert.equal(unbounded.error.issues.length, 5);+ const union = z.union([array(z.string(), 1), z.array(z.string())]);+ assert.deepEqual(parse(union, ["a", "b"]).data, ["a", "b"]);+ });+ if (v3) {+ test(`${label}: v3 transforms, preprocess, error maps, and set/map APIs remain`, async () => {+ const schema = z.preprocess(+ (v) => v.slice(0, 2),+ z.array(z.string().transform((v) => v.toUpperCase())).max(2),+ );+ assert.deepEqual(schema.parse(["a", "b", "c"]), ["A", "B"]);+ assert.deepEqual(await schema.parseAsync(["a", "b", "c"]), ["A", "B"]);+ assert.deepEqual(+ z.map(z.string(), z.number()).parse(new Map([["a", 1]])),+ new Map([["a", 1]]),+ );+ const limited = z.array(z.string()).max(1);+ const failure = limited.safeParse(["a", "b"], {+ errorMap: (issue, ctx) => ({+ message: issue.code === "too_big" ? "mapped cap" : ctx.defaultError,+ }),+ });+ assert.equal(failure.error.issues[0].message, "mapped cap");+ assert.equal(failure.error.issues[0].maximum, 1);+ assert.equal(failure.error.issues[0].inclusive, true);+ assert.equal(failure.error.issues[0].exact, false);+ });+ } else {+ test(`${label}: embedded v4 maps and rewriting checks respect bounds/order`, async () => {+ let calls = 0;+ const element = refined(() => {+ calls++;+ return true;+ });+ const schema = z.map(element, element).check(z.maxSize(1));+ for (const async of [false, true]) {+ const result = await parse(+ schema,+ new Map([+ ["a", "b"],+ ["c", "d"],+ ]),+ async,+ );+ assert.deepEqual(+ result.error.issues.map((i) => i.code),+ ["too_big"],+ );+ }+ assert.equal(calls, 0);+ const shrinking = z.array(z.number()).check(+ z.overwrite((v) => v.slice(0, 2)),+ z.maxLength(2),+ );+ assert.deepEqual(parse(shrinking, [1, 2, 3]).data, [1, 2]);+ const conditional = z+ .array(z.string())+ .check(z.maxLength(1, { when: () => false }));+ assert.deepEqual(parse(conditional, ["a", "b"]).data, ["a", "b"]);+ });+ }+ }+}diff --git a/scripts/security/source-maps.test.mjs b/scripts/security/source-maps.test.mjsindex 80ecaea4d..1ac771def 100644--- a/scripts/security/source-maps.test.mjs+++ b/scripts/security/source-maps.test.mjs@@ -55,7 +55,7 @@ for (const config of ["nginx.conf", "nginx.kaneo.conf"]) {`type=bind,source=${fixture},target=/var/lib/kaneo/html`,"--entrypoint","sh",- "nginx:1.29.5-alpine",+ "nginx:1.30.6-alpine","-eu","-c",`diff --git a/scripts/security/web-runtime-env.test.mjs b/scripts/security/web-runtime-env.test.mjsindex f967d55f5..7d0552800 100644--- a/scripts/security/web-runtime-env.test.mjs+++ b/scripts/security/web-runtime-env.test.mjs@@ -17,7 +17,7 @@ import { runInNewContext } from "node:vm";const root = resolve(import.meta.dirname, "../..");// Uses the production standalone-web runtime, without networking or published ports.// Pull this public image explicitly before running the test; never pull implicitly.-const image = "nginx:1.29.5-alpine";+const image = "nginx:1.30.6-alpine";const scenarios = [{name: "ordinary URLs",diff --git a/tests/api-integration/api-key-banned-user.test.ts b/tests/api-integration/api-key-banned-user.test.tsindex 4ec7c9cb8..5a61c0140 100644--- a/tests/api-integration/api-key-banned-user.test.ts+++ b/tests/api-integration/api-key-banned-user.test.ts@@ -157,16 +157,20 @@ describe("API integration: API keys of banned users", () => {expect(response.status).toBe(401);});- it("applies the same rule to a bearer key on other auth routes", async () => {+ it("applies the same rule to a bearer key on native organization routes", async () => {const { app, userId, key } = await mintKey();const headers = { authorization: `Bearer ${key}` };- const active = await app.request("/api/auth/api-key/list", { headers });+ const active = await app.request("/api/auth/organization/list", {+ headers,+ });expect(active.status).toBe(200);await ban(userId);- const banned = await app.request("/api/auth/api-key/list", { headers });+ const banned = await app.request("/api/auth/organization/list", {+ headers,+ });expect(banned.status).toBe(401);});});diff --git a/tests/api-integration/api-key-rate-limit.test.ts b/tests/api-integration/api-key-rate-limit.test.tsindex c5ce196d2..8ed585660 100644--- a/tests/api-integration/api-key-rate-limit.test.ts+++ b/tests/api-integration/api-key-rate-limit.test.ts@@ -170,6 +170,33 @@ describe("API key rate limits", () => {expect(limitHeaders(bearer).retryAfter).not.toBeNull();});+ it.each([+ ["x-api-key", (key: string) => ({ "x-api-key": key })],+ ["a Bearer key", (key: string) => ({ Authorization: `Bearer ${key}` })],+ ])(+ "answers 429 when quota expires between preflight and the native key boundary via %s",+ async (_, headersFor) => {+ const { key, row } = await seedKey({ remaining: 1 });+ const handler = auth.handler;+ vi.spyOn(auth, "handler").mockImplementationOnce(async (request) => {+ await db+ .update(schema.apikeyTable)+ .set({ remaining: 0 })+ .where(eq(schema.apikeyTable.id, row.id));+ return handler(request);+ });+ const { app } = createApp();+ const response = await app.request("/api/auth/get-session", {+ headers: headersFor(key),+ });+ expect(response.status).toBe(429);+ expect(await readErrorBody(response)).toEqual(usageExceeded);+ expect(response.headers.get("retry-after")).toBeNull();+ expect(response.headers.get("cache-control")).toBe("no-store");+ expect((await savedKey(row.id)).requestCount).toBe(0);+ },+ );+it.each([["x-api-key",@@ -269,7 +296,7 @@ describe("API key rate limits", () => {message: "Too many requests. Please try again later.",code: "RATE_LIMITED",});- expect(response.headers.get("cache-control")).toBe("private");+ expect(response.headers.get("cache-control")).toBe("no-store");expect((await savedKey(row.id)).requestCount).toBe(0);},);diff --git a/tests/api-integration/asset-read-permissions.test.ts b/tests/api-integration/asset-read-permissions.test.tsnew file mode 100644index 000000000..836fe78d9--- /dev/null+++ b/tests/api-integration/asset-read-permissions.test.ts@@ -0,0 +1,134 @@+import { randomUUID } from "node:crypto";+import { eq } from "drizzle-orm";+import { beforeEach, describe, expect, it, vi } from "vite-plus/test";+import db, { schema } from "../../apps/api/src/database";+import { createApp } from "../../apps/api/src/index";+import type { PermissionMap } from "../../apps/api/src/utils/role-permissions";+import { resetTestDatabase } from "./helpers/database";+import { createProjectFixture } from "./helpers/fixtures";+import { createReadSurfaceReader } from "./helpers/read-surface-reader";++const { readObject } = vi.hoisted(() => ({+ readObject: vi.fn(async () => ({+ body: new Uint8Array([1, 2, 3]),+ contentType: "image/png",+ contentLength: 3,+ })),+}));+vi.mock("../../apps/api/src/storage/s3", async (original) => ({+ ...(await original<object>()),+ getPrivateObject: readObject,+}));++beforeEach(async () => {+ await resetTestDatabase();+ readObject.mockClear();+});++async function fixture(+ authentication: "api-key" | "custom-role",+ permissions: PermissionMap | null,+) {+ const reader = await createReadSurfaceReader(authentication, permissions);+ const { project } = await createProjectFixture({+ workspaceId: reader.workspace.id,+ });+ const assets = await db+ .insert(schema.assetTable)+ .values(+ ["description", "comment", "draft", "draft-pending"].map((surface) => ({+ workspaceId: reader.workspace.id,+ projectId: project.id,+ objectKey: randomUUID(),+ filename: "private.png",+ mimeType: "image/png",+ size: 3,+ surface,+ createdBy: reader.user.id,+ })),+ )+ .returning();+ return { ...reader, project, assets, ...createApp() };+}++describe("private asset current grants", () => {+ for (const authentication of ["api-key", "custom-role"] as const) {+ it.each<PermissionMap>([+ {},+ { label: ["read"] },+ { project: ["read"] },+ { task: ["read"] },+ { task: ["create"] },+ ])(+ `${authentication} enforces private surface grants %j`,+ async (permissions) => {+ const { app, headers, assets } = await fixture(+ authentication,+ permissions,+ );+ // Both key transports must retain the parsed scope in the asset resolver.+ const transports =+ authentication === "api-key"+ ? [headers, { Authorization: `Bearer ${headers["x-api-key"]}` }]+ : [headers];+ for (const requestHeaders of transports) {+ for (const asset of assets) {+ const required = asset.surface.startsWith("draft")+ ? "create"+ : "read";+ const allowed = permissions.task?.includes(required) ?? false;+ const before = readObject.mock.calls.length;+ const response = await app.request(`/api/asset/${asset.id}`, {+ headers: requestHeaders,+ });+ expect(response.status, asset.surface).toBe(allowed ? 200 : 403);+ expect(readObject.mock.calls.length).toBe(+ before + (allowed ? 1 : 0),+ );+ }+ }+ },+ );+ }++ it("rechecks role demotion for an unscoped legacy key while keeping public descriptions public", async () => {+ const { app, headers, assets, role, project } = await fixture(+ "api-key",+ null,+ );+ const comment = assets.find((asset) => asset.surface === "comment")!;+ const before = await app.request(`/api/asset/${comment.id}`, { headers });+ expect(before.status).toBe(200);+ await db+ .update(schema.workspaceRoleTable)+ .set({ permission: "{}" })+ .where(eq(schema.workspaceRoleTable.id, role.id));+ readObject.mockClear();+ const after = await app.request(`/api/asset/${comment.id}`, { headers });+ expect(after.status).toBe(403);+ expect(readObject).not.toHaveBeenCalled();+ await db+ .update(schema.projectTable)+ .set({ isPublic: true })+ .where(eq(schema.projectTable.id, project.id));+ for (const asset of assets) {+ const response = await app.request(`/api/asset/${asset.id}`, { headers });+ expect(response.status).toBe(asset.surface === "description" ? 200 : 403);+ }+ });++ it("preserves draft ownership even with task:create scope", async () => {+ const { app, headers, assets } = await fixture("api-key", {+ task: ["create"],+ });+ const draft = assets.find((asset) => asset.surface === "draft")!;+ await db+ .update(schema.assetTable)+ .set({ createdBy: null })+ .where(eq(schema.assetTable.id, draft.id));+ readObject.mockClear();+ const response = await app.request(`/api/asset/${draft.id}`, { headers });+ expect(response.status).toBe(403);+ expect(readObject).not.toHaveBeenCalled();+ });+});diff --git a/tests/api-integration/helpers/read-surface-reader.ts b/tests/api-integration/helpers/read-surface-reader.tsnew file mode 100644index 000000000..215833207--- /dev/null+++ b/tests/api-integration/helpers/read-surface-reader.ts@@ -0,0 +1,47 @@+import { createHash, randomUUID } from "node:crypto";+import db, { schema } from "../../../apps/api/src/database";+import type { PermissionMap } from "../../../apps/api/src/utils/role-permissions";+import { mockAnonymousSession, mockAuthenticatedSession } from "./auth";+import { createWorkspaceMember } from "./fixtures";++export async function createReadSurfaceReader(+ authentication: "api-key" | "custom-role",+ permissions: PermissionMap | null,+) {+ const member = await createWorkspaceMember({ role: "limited" });+ const [role] = await db+ .insert(schema.workspaceRoleTable)+ .values({+ workspaceId: member.workspace.id,+ role: "limited",+ permission: JSON.stringify(+ authentication === "custom-role"+ ? permissions+ : {+ task: ["read", "create"],+ project: ["read"],+ workspace: ["read"],+ },+ ),+ })+ .returning();+ const headers: Record<string, string> = {};+ if (authentication === "custom-role") {+ mockAuthenticatedSession(member.user);+ } else {+ mockAnonymousSession();+ const key = `test_${randomUUID()}`;+ await db.insert(schema.apikeyTable).values({+ referenceId: member.user.id,+ userId: member.user.id,+ key: createHash("sha256").update(key).digest("base64url"),+ permissions: permissions === null ? null : JSON.stringify(permissions),+ enabled: true,+ rateLimitEnabled: false,+ createdAt: new Date(),+ updatedAt: new Date(),+ });+ headers["x-api-key"] = key;+ }+ return { ...member, role, headers };+}diff --git a/tests/api-integration/invitation-visibility.test.ts b/tests/api-integration/invitation-visibility.test.tsnew file mode 100644index 000000000..025cbd9bf--- /dev/null+++ b/tests/api-integration/invitation-visibility.test.ts@@ -0,0 +1,302 @@+import { randomUUID } from "node:crypto";+import * as email from "@kaneo/email";+import { eq } from "drizzle-orm";+import {+ afterEach,+ beforeEach,+ describe,+ expect,+ it,+ vi,+} from "vite-plus/test";+import { auth } from "../../apps/api/src/auth";+import db, { schema } from "../../apps/api/src/database";+import { createApp } from "../../apps/api/src/index";+import { signUpWithSession } from "./helpers/auth-session";+import { resetTestDatabase } from "./helpers/database";++beforeEach(resetTestDatabase);+afterEach(() => {+ process.env.DISABLE_REGISTRATION = "false";+});++async function setup(+ role: string,+ permission?: Record<string, string[]>,+ invitationRole = "admin",+) {+ const { app } = createApp();+ const owner = await signUpWithSession(app, {+ email: "[email protected]",+ name: "Owner",+ });+ const viewer = await signUpWithSession(app, {+ email: "[email protected]",+ name: "Viewer",+ });+ const [workspace] = await db+ .insert(schema.workspaceTable)+ .values({ name: "Team", slug: randomUUID(), createdAt: new Date() })+ .returning();+ await db.insert(schema.workspaceUserTable).values([+ {+ workspaceId: workspace.id,+ userId: owner.userId,+ role: "owner",+ joinedAt: new Date(),+ },+ {+ workspaceId: workspace.id,+ userId: viewer.userId,+ role,+ joinedAt: new Date(),+ },+ ]);+ if (permission) {+ await db.insert(schema.workspaceRoleTable).values({+ workspaceId: workspace.id,+ role,+ permission: JSON.stringify(permission),+ createdAt: new Date(),+ });+ }+ const [invitation] = await db+ .insert(schema.invitationTable)+ .values({+ workspaceId: workspace.id,+ inviterId: owner.userId,+ email: "[email protected]",+ role: invitationRole,+ status: "pending",+ expiresAt: new Date(Date.now() + 86_400_000),+ })+ .returning();+ const invitations = async (cookies: string, full: boolean, status = 200) => {+ const path = full ? "get-full-organization" : "list-invitations";+ const response = await app.request(+ `/api/auth/organization/${path}?organizationId=${workspace.id}`,+ { headers: { cookie: cookies } },+ );+ expect(response.status).toBe(status);+ if (status !== 200) return [];+ const body = await response.json();+ return full ? body.invitations : body;+ };+ return { app, owner, viewer, invitation, invitations };+}++describe("workspace invitation visibility", () => {+ it.each(["viewer", "member", "demoted-admin"])(+ "hides invitations from a %s without invitation:create on both endpoints",+ async (role) => {+ const { owner, viewer, invitation, invitations } = await setup(+ role === "demoted-admin" ? "admin" : role,+ role === "demoted-admin" ? {} : undefined,+ );+ for (const full of [false, true]) {+ expect(+ await invitations(+ viewer.cookies,+ full,+ full && role === "demoted-admin" ? 403 : 200,+ ),+ ).toEqual([]);+ expect(await invitations(owner.cookies, full)).toEqual([+ expect.objectContaining({ id: invitation.id }),+ ]);+ }+ },+ );++ it("preserves invitation visibility for a custom inviter role", async () => {+ const { app, viewer, invitation, invitations } = await setup("inviter", {+ invitation: ["create"],+ workspace: ["read"],+ });+ const created = await app.request("/api/auth/organization/invite-member", {+ method: "POST",+ headers: { "content-type": "application/json", cookie: viewer.cookies },+ body: JSON.stringify({+ organizationId: invitation.workspaceId,+ email: "[email protected]",+ role: "admin",+ }),+ });+ expect(created.status).toBe(200);+ const resend = await app.request("/api/auth/organization/invite-member", {+ method: "POST",+ headers: { "content-type": "application/json", cookie: viewer.cookies },+ body: JSON.stringify({+ organizationId: invitation.workspaceId,+ email: "[email protected]",+ role: "admin",+ resend: true,+ }),+ });+ expect(resend.status).toBe(200);+ for (const full of [false, true]) {+ expect(await invitations(viewer.cookies, full)).toEqual(+ expect.arrayContaining([+ expect.objectContaining({ id: invitation.id }),+ ]),+ );+ }+ });++ it.each(["owner", "member,owner"])(+ "hides %s invitation credentials from a custom inviter who cannot assign owner",+ async (role) => {+ const { app, owner, viewer, invitation, invitations } = await setup(+ "inviter",+ { invitation: ["create"], workspace: ["read"] },+ role,+ );+ const send = vi.spyOn(email, "sendWorkspaceInvitationEmail");+ const created = await app.request(+ "/api/auth/organization/invite-member",+ {+ method: "POST",+ headers: {+ "content-type": "application/json",+ cookie: viewer.cookies,+ },+ body: JSON.stringify({+ organizationId: invitation.workspaceId,+ email: "[email protected]",+ role,+ }),+ },+ );+ expect(created.status).toBe(403);+ const resend = await app.request("/api/auth/organization/invite-member", {+ method: "POST",+ headers: { "content-type": "application/json", cookie: viewer.cookies },+ body: JSON.stringify({+ organizationId: invitation.workspaceId,+ email: invitation.email,+ role: "member",+ resend: true,+ }),+ });+ expect(resend.status).toBe(403);+ expect(await resend.text()).not.toContain(invitation.id);+ expect(send).not.toHaveBeenCalled();+ expect(+ await db.query.invitationTable.findFirst({+ where: eq(schema.invitationTable.id, invitation.id),+ }),+ ).toMatchObject({ expiresAt: invitation.expiresAt });+ for (const full of [false, true]) {+ expect(await invitations(viewer.cookies, full)).toEqual([]);+ expect(await invitations(owner.cookies, full)).toEqual([+ expect.objectContaining({ id: invitation.id }),+ ]);+ }+ const ownerResend = await app.request(+ "/api/auth/organization/invite-member",+ {+ method: "POST",+ headers: {+ "content-type": "application/json",+ cookie: owner.cookies,+ },+ body: JSON.stringify({+ organizationId: invitation.workspaceId,+ email: invitation.email,+ role,+ resend: true,+ }),+ },+ );+ expect(ownerResend.status).toBe(200);+ expect(await ownerResend.json()).toMatchObject({ id: invitation.id });+ },+ );++ it.each([+ { bearer: false, role: "owner" },+ { bearer: false, role: "member,owner" },+ { bearer: true, role: "owner" },+ { bearer: true, role: "member,owner" },+ ])(+ "blocks $role resends with an empty workspace ID and an active workspace (bearer=$bearer)",+ async ({ bearer, role }) => {+ const { app, viewer, invitation } = await setup(+ "inviter",+ { invitation: ["create"], workspace: ["read"] },+ role,+ );+ await db+ .update(schema.sessionTable)+ .set({ activeOrganizationId: invitation.workspaceId })+ .where(eq(schema.sessionTable.userId, viewer.userId));+ const session = await auth.api.getSession({+ headers: new Headers({ cookie: viewer.cookies }),+ });+ expect(session).toBeTruthy();+ const send = vi.spyOn(email, "sendWorkspaceInvitationEmail");+ const response = await app.request(+ "/api/auth/organization/invite-member",+ {+ method: "POST",+ headers: {+ "content-type": "application/json",+ ...(bearer+ ? { authorization: `Bearer ${session!.session.token}` }+ : { cookie: viewer.cookies }),+ },+ body: JSON.stringify({+ organizationId: "",+ email: invitation.email,+ role: "member",+ resend: true,+ }),+ },+ );+ expect(response.status).toBe(403);+ expect(await response.text()).not.toContain(invitation.id);+ expect(send).not.toHaveBeenCalled();+ expect(+ await db.query.invitationTable.findFirst({+ where: eq(schema.invitationTable.id, invitation.id),+ }),+ ).toMatchObject({ expiresAt: invitation.expiresAt });+ },+ );++ it.each([false, true])(+ "keeps link-based onboarding available without email delivery (invite-only=%s)",+ async (inviteOnly) => {+ const { app, invitation } = await setup("viewer");+ process.env.DISABLE_REGISTRATION = String(inviteOnly);+ const signup = await app.request("/api/auth/sign-up/email", {+ method: "POST",+ headers: { "content-type": "application/json" },+ body: JSON.stringify({+ email: invitation.email,+ name: "Invitee",+ password: "correct horse battery staple",+ invitationId: invitation.id,+ }),+ });+ expect(signup.status).toBe(200);+ const { token, user } = (await signup.json()) as {+ token: string;+ user: { emailVerified: boolean };+ };+ expect(user.emailVerified).toBe(false);+ const accepted = await app.request(+ "/api/auth/organization/accept-invitation",+ {+ method: "POST",+ headers: {+ "content-type": "application/json",+ authorization: `Bearer ${token}`,+ },+ body: JSON.stringify({ invitationId: invitation.id }),+ },+ );+ expect(accepted.status).toBe(200);+ },+ );+});diff --git a/tests/api-integration/mcp-code-revocation.test.ts b/tests/api-integration/mcp-code-revocation.test.tsnew file mode 100644index 000000000..ff255ef9f--- /dev/null+++ b/tests/api-integration/mcp-code-revocation.test.ts@@ -0,0 +1,306 @@+import { createHash } from "node:crypto";+import { and, eq, ne } from "drizzle-orm";+import { beforeEach, describe, expect, it, vi } from "vite-plus/test";+import { auth } from "../../apps/api/src/auth";+import db, { getDatabasePool, schema } from "../../apps/api/src/database";+import { createApp } from "../../apps/api/src/index";+import mcp from "../../apps/api/src/mcp";+import {+ createAuthorizationRequest,+ registerClient,+} from "../../apps/api/src/mcp/oauth";+import { signUpWithSession } from "./helpers/auth-session";+import { resetTestDatabase } from "./helpers/database";++const redirectUri = "https://client.example/callback";+const verifier = "session-revocation-test-verifier";+const origin = "http://localhost:5173";++beforeEach(resetTestDatabase);++async function approve() {+ const { app } = createApp();+ const user = await signUpWithSession(app, {+ email: "[email protected]",+ name: "MCP User",+ });+ const session = await auth.api.getSession({+ headers: new Headers({ cookie: user.cookies }),+ });+ if (!session) throw new Error("Expected the approving session");+ const client = await registerClient({ redirectUris: [redirectUri] });+ const requestId = await createAuthorizationRequest({+ clientId: client.clientId,+ redirectUri,+ codeChallenge: createHash("sha256").update(verifier).digest("base64url"),+ });+ const decision = await mcp.request(`/mcp/authorize/request/${requestId}`, {+ method: "POST",+ headers: {+ "content-type": "application/json",+ cookie: user.cookies,+ origin,+ },+ body: JSON.stringify({ approved: true }),+ });+ expect(decision.status).toBe(200);+ const { redirect } = (await decision.json()) as { redirect: string };+ const code = new URL(redirect).searchParams.get("code");+ expect(code).toBeTruthy();+ const redeem = () =>+ mcp.request("/mcp/token", {+ method: "POST",+ headers: { "content-type": "application/x-www-form-urlencoded" },+ body: new URLSearchParams({+ grant_type: "authorization_code",+ code: code!,+ client_id: client.clientId,+ redirect_uri: redirectUri,+ code_verifier: verifier,+ }),+ });+ return { app, user, session: session.session, redeem };+}++describe("MCP authorization session lifetime", () => {+ it("redeems a code approved by a live session and authenticates its token", async () => {+ const { app, redeem } = await approve();+ const response = await redeem();+ expect(response.status).toBe(200);+ const token = (await response.json()) as { access_token: string };+ expect(+ (+ await app.request("/api/workspace", {+ headers: { authorization: `Bearer ${token.access_token}` },+ })+ ).status,+ ).toBe(200);+ });++ it.each(["revoked", "expired", "banned"])(+ "refuses a code when its approving session is %s",+ async (state) => {+ const { user, redeem } = await approve();+ if (state === "revoked") {+ await db+ .delete(schema.sessionTable)+ .where(eq(schema.sessionTable.userId, user.userId));+ } else if (state === "expired") {+ await db+ .update(schema.sessionTable)+ .set({ expiresAt: new Date(Date.now() - 60_000) })+ .where(eq(schema.sessionTable.userId, user.userId));+ } else {+ await db+ .update(schema.userTable)+ .set({ banned: true })+ .where(eq(schema.userTable.id, user.userId));+ }+ const before = await db.select().from(schema.sessionTable);+ const response = await redeem();+ expect(response.status).toBe(400);+ expect(await response.json()).toMatchObject({ error: "invalid_grant" });+ expect(await db.select().from(schema.sessionTable)).toHaveLength(+ before.length,+ );+ expect((await redeem()).status).toBe(400);+ },+ );+});++async function waitForBlockedUserLocks(total: number) {+ await vi.waitFor(+ async () => {+ const result = await getDatabasePool().query<{ total: number }>(`+ SELECT count(*)::integer AS total FROM pg_stat_activity+ WHERE datname = current_database()+ AND pid <> pg_backend_pid()+ AND wait_event_type = 'Lock'+ AND query LIKE '%"user"%'+ `);+ expect(result.rows[0].total).toBe(total);+ },+ { timeout: 5_000, interval: 25 },+ );+}++describe("MCP code redemption and concurrent session revocation", () => {+ for (const operation of [+ "revoke-one",+ "revoke-all",+ "revoke-other",+ "ban",+ ] as const) {+ it.each(["redemption", "revocation"] as const)(+ `${operation} serializes when %s is queued first`,+ async (first) => {+ const { app, user, session, redeem } = await approve();+ // B approved the code; A is the independently authenticated caller+ // whose current session revoke-other must preserve.+ const current =+ operation === "revoke-other"+ ? await auth.api.signInEmail({+ body: {+ email: "[email protected]",+ password: "correct horse battery staple",+ },+ })+ : null;+ if (current) expect(current.token).not.toBe(session.token);+ const admin =+ operation === "ban"+ ? await signUpWithSession(app, {+ email: "[email protected]",+ name: "Administrator",+ role: "admin",+ })+ : null;+ const revokePath =+ operation === "ban"+ ? "admin/ban-user"+ : operation === "revoke-all"+ ? "revoke-sessions"+ : operation === "revoke-other"+ ? "revoke-other-sessions"+ : "revoke-session";+ const revoke = () =>+ app.request(`/api/auth/${revokePath}`, {+ method: "POST",+ headers: {+ "content-type": "application/json",+ ...(current+ ? { authorization: `Bearer ${current.token}` }+ : { cookie: admin?.cookies ?? user.cookies }),+ origin,+ },+ body: JSON.stringify(+ operation === "ban"+ ? { userId: user.userId }+ : operation === "revoke-one"+ ? { token: session.token }+ : {},+ ),+ });+ const blocker = await getDatabasePool().connect();+ const pending: Promise<Response>[] = [];+ try {+ await blocker.query("BEGIN");+ await blocker.query(+ 'SELECT id FROM "user" WHERE id = $1 FOR UPDATE',+ [user.userId],+ );+ pending.push(first === "redemption" ? redeem() : revoke());+ await waitForBlockedUserLocks(1);+ pending.push(first === "redemption" ? revoke() : redeem());+ await waitForBlockedUserLocks(2);+ await blocker.query("COMMIT");+ const responses = await Promise.all(pending);+ const redemption = responses[first === "redemption" ? 0 : 1];+ const revocation = responses[first === "redemption" ? 1 : 0];+ expect(revocation.status).toBe(200);+ expect(redemption.status).toBe(first === "redemption" ? 200 : 400);+ const sessions = await db+ .select()+ .from(schema.sessionTable)+ .where(eq(schema.sessionTable.userId, user.userId));+ expect(sessions.some((row) => row.id === session.id)).toBe(false);+ if (operation === "revoke-other") {+ expect(sessions).toEqual([+ expect.objectContaining({ token: current!.token }),+ ]);+ expect(+ (+ await app.request("/api/workspace", {+ headers: { authorization: `Bearer ${current!.token}` },+ })+ ).status,+ ).toBe(200);+ if (redemption.status === 200) {+ const token = (await redemption.json()) as {+ access_token: string;+ };+ expect(+ (+ await app.request("/api/workspace", {+ headers: { authorization: `Bearer ${token.access_token}` },+ })+ ).status,+ ).toBe(401);+ }+ } else if (operation !== "revoke-one") {+ expect(sessions).toHaveLength(0);+ } else if (redemption.status === 200) {+ const token = (await redemption.json()) as { access_token: string };+ expect(+ sessions.some((row) => row.token === token.access_token),+ ).toBe(true);+ }+ } finally {+ await blocker.query("ROLLBACK");+ blocker.release();+ await Promise.allSettled(pending);+ }+ },+ );+ }++ it.each(["cookie", "bearer", "server"] as const)(+ "preserves the current session through %s revoke-other calls, including expired others",+ async (transport) => {+ const { app, user, session } = await approve();+ const unrelated = await signUpWithSession(app, {+ email: "[email protected]",+ name: "Unrelated User",+ });+ const unrelatedSessions = await db+ .select()+ .from(schema.sessionTable)+ .where(eq(schema.sessionTable.userId, unrelated.userId));+ const second = await auth.api.signInEmail({+ body: {+ email: "[email protected]",+ password: "correct horse battery staple",+ },+ });+ await db+ .update(schema.sessionTable)+ .set({ expiresAt: new Date(Date.now() - 60_000) })+ .where(+ and(+ eq(schema.sessionTable.userId, user.userId),+ ne(schema.sessionTable.token, session.token),+ ),+ );+ expect(second.token).not.toBe(session.token);+ const headers = new Headers(+ transport === "bearer"+ ? { authorization: `Bearer ${session.token}` }+ : { cookie: user.cookies },+ );+ if (transport === "server") {+ expect(await auth.api.revokeOtherSessions({ headers })).toEqual({+ status: true,+ });+ } else {+ headers.set("origin", origin);+ const response = await app.request("/api/auth/revoke-other-sessions", {+ method: "POST",+ headers,+ });+ expect(response.status).toBe(200);+ expect(await response.json()).toEqual({ status: true });+ }+ const sessions = await db+ .select()+ .from(schema.sessionTable)+ .where(eq(schema.sessionTable.userId, user.userId));+ expect(sessions).toEqual([expect.objectContaining({ id: session.id })]);+ expect(+ await db+ .select()+ .from(schema.sessionTable)+ .where(eq(schema.sessionTable.userId, unrelated.userId)),+ ).toEqual(unrelatedSessions);+ },+ );+});diff --git a/tests/api-integration/mcp-oauth-shared-state.test.ts b/tests/api-integration/mcp-oauth-shared-state.test.tsindex 9a17d9a9e..c78fc06d2 100644--- a/tests/api-integration/mcp-oauth-shared-state.test.ts+++ b/tests/api-integration/mcp-oauth-shared-state.test.ts@@ -58,9 +58,17 @@ describe("API integration: shared MCP OAuth state", () => {createdAt: new Date(),updatedAt: new Date(),});+ const sessionId = randomUUID();+ await db.insert(schema.sessionTable).values({+ id: sessionId,+ token: randomUUID(),+ userId,+ expiresAt: new Date(Date.now() + 60 * 60 * 1000),+ });const code = await secondReplica.createAuthCode({clientId: client.clientId,userId,+ sessionId,redirectUri,codeChallenge,});diff --git a/tests/api-integration/native-auth-boundary.test.ts b/tests/api-integration/native-auth-boundary.test.tsnew file mode 100644index 000000000..14a51a286--- /dev/null+++ b/tests/api-integration/native-auth-boundary.test.ts@@ -0,0 +1,667 @@+import { randomUUID } from "node:crypto";+import { eq } from "drizzle-orm";+import { beforeEach, describe, expect, it, vi } from "vite-plus/test";+import db, { schema } from "../../apps/api/src/database";+import { createApp } from "../../apps/api/src/index";+import { signUpWithSession } from "./helpers/auth-session";+import { resetTestDatabase } from "./helpers/database";+import { createProjectFixture } from "./helpers/fixtures";++type Permissions = Record<string, string[]>;+type App = ReturnType<typeof createApp>["app"];++// Notification delivery is covered separately. Keep its background handlers+// from racing the database resets in this native authorization suite.+vi.mock("../../apps/api/src/events", async (importOriginal) => ({+ ...(await importOriginal<typeof import("../../apps/api/src/events")>()),+ publishEvent: vi.fn().mockResolvedValue(undefined),+}));++beforeEach(resetTestDatabase);++async function fixture() {+ const { app } = createApp();+ const owner = await signUpWithSession(app, {+ email: "[email protected]",+ name: "Owner",+ role: "user",+ });+ const viewer = await signUpWithSession(app, {+ email: "[email protected]",+ name: "Viewer",+ role: "user",+ });+ const [workspace] = await db+ .insert(schema.workspaceTable)+ .values({+ name: "Private workspace",+ slug: randomUUID(),+ createdAt: new Date(),+ })+ .returning();+ await db.insert(schema.workspaceUserTable).values([+ {+ workspaceId: workspace.id,+ userId: owner.userId,+ role: "owner",+ joinedAt: new Date(),+ },+ {+ workspaceId: workspace.id,+ userId: viewer.userId,+ role: "limited",+ joinedAt: new Date(),+ },+ ]);+ await db.insert(schema.workspaceRoleTable).values({+ workspaceId: workspace.id,+ role: "limited",+ permission: "{}",+ });+ const [invitation] = await db+ .insert(schema.invitationTable)+ .values({+ workspaceId: workspace.id,+ inviterId: owner.userId,+ email: "[email protected]",+ role: "member",+ status: "pending",+ expiresAt: new Date(Date.now() + 86_400_000),+ })+ .returning();+ const sessions = await db.select().from(schema.sessionTable);+ const ownerToken = sessions.find(+ (session) => session.userId === owner.userId,+ )!.token;+ const viewerToken = sessions.find(+ (session) => session.userId === viewer.userId,+ )!.token;+ return { app, owner, viewer, workspace, invitation, ownerToken, viewerToken };+}++async function keyFor(+ app: App,+ cookies: string,+ permissions: Permissions | null,+) {+ const response = await app.request("/api/auth/api-key/create", {+ method: "POST",+ headers: { cookie: cookies, "content-type": "application/json" },+ body: JSON.stringify({ name: "Boundary regression" }),+ });+ expect(response.status).toBe(200);+ const key = (await response.json()) as { id: string; key: string };+ // Permissions are a server-only provider property. Narrow the actual key+ // after normal credential creation rather than mocking provider validation.+ await db+ .update(schema.apikeyTable)+ .set({+ rateLimitEnabled: false,+ ...(permissions !== null+ ? { permissions: JSON.stringify(permissions) }+ : {}),+ })+ .where(eq(schema.apikeyTable.id, key.id));+ return key;+}++function keyHeaders(key: string, bearer: boolean, cookies?: string) {+ return {+ ...(bearer ? { authorization: `bEaReR ${key}` } : { "x-api-key": key }),+ ...(cookies ? { cookie: cookies } : {}),+ "content-type": "application/json",+ };+}++describe("native auth credential boundary", () => {+ it.each([null, { label: ["read"] }] as (Permissions | null)[])(+ "keeps scoped and legacy keys out of account, session and admin management (%j)",+ async (permissions) => {+ const { app, owner, viewer, ownerToken } = await fixture();+ await db+ .update(schema.userTable)+ .set({ role: "admin" })+ .where(eq(schema.userTable.id, owner.userId));+ const key = await keyFor(app, owner.cookies, permissions);+ const sessionIds = (await db.select().from(schema.sessionTable))+ .map((row) => row.id)+ .sort();+ const keyIds = (await db.select().from(schema.apikeyTable))+ .map((row) => row.id)+ .sort();+ const operations = [+ { path: "/api-key/create", body: { name: "Escaped" } },+ { path: "/api-key/list", method: "GET" },+ { path: `/api-key/get?id=${key.id}`, method: "GET" },+ { path: "/api-key/update", body: { keyId: key.id, name: "Changed" } },+ { path: "/api-key/delete", body: { keyId: key.id } },+ { path: "/list-sessions", method: "GET" },+ { path: "/revoke-session", body: { token: ownerToken } },+ { path: "/revoke-sessions", body: {} },+ { path: "/revoke-other-sessions", body: {} },+ { path: "/update-user", body: { name: "Changed" } },+ { path: "/change-email", body: { newEmail: "[email protected]" } },+ {+ path: "/change-password",+ body: {+ currentPassword: "correct horse battery staple",+ newPassword: "another long password",+ },+ },+ { path: "/get-access-token", body: { providerId: "custom" } },+ { path: "/admin/impersonate-user", body: { userId: viewer.userId } },+ {+ path: "/admin/create-user",+ body: {+ email: "[email protected]",+ name: "Created",+ password: "another long password",+ },+ },+ { path: "/admin/remove-user", body: { userId: viewer.userId } },+ { path: "/device/approve", body: { userCode: "ABCD-EFGH" } },+ ];+ for (const bearer of [false, true]) {+ for (const cookies of [undefined, owner.cookies]) {+ for (const operation of operations) {+ const response = await app.request(`/api/auth${operation.path}`, {+ method: operation.method ?? "POST",+ headers: keyHeaders(key.key, bearer, cookies),+ ...(operation.body+ ? { body: JSON.stringify(operation.body) }+ : {}),+ });+ expect(+ response.status,+ `${operation.path}, bearer=${bearer}, cookie=${Boolean(cookies)}`,+ ).toBe(403);+ expect(await response.json()).toMatchObject({+ code: "SESSION_REQUIRED",+ });+ }+ }+ }+ expect(+ (await db.select().from(schema.sessionTable))+ .map((row) => row.id)+ .sort(),+ ).toEqual(sessionIds);+ expect(+ (await db.select().from(schema.apikeyTable))+ .map((row) => row.id)+ .sort(),+ ).toEqual(keyIds);+ expect(+ await db.query.userTable.findFirst({+ where: eq(schema.userTable.id, owner.userId),+ }),+ ).toMatchObject({ name: "Owner" });+ expect(+ await db.query.userTable.findFirst({+ where: eq(schema.userTable.id, viewer.userId),+ }),+ ).toBeDefined();+ },+ );++ it.each([null, { label: ["read"] }] as (Permissions | null)[])(+ "returns only the virtual key session with a valid cookie (%j)",+ async (permissions) => {+ const { app, owner, viewer, ownerToken, viewerToken } = await fixture();+ const key = await keyFor(app, owner.cookies, permissions);+ for (const bearer of [false, true]) {+ const response = await app.request("/api/auth/get-session", {+ headers: keyHeaders(key.key, bearer, viewer.cookies),+ });+ expect(response.status).toBe(200);+ expect(response.headers.get("cache-control")).toBe("no-store");+ const body = await response.json();+ expect(body).toMatchObject({+ user: { id: owner.userId },+ session: { id: key.id, token: key.key },+ });+ expect(JSON.stringify(body)).not.toContain(ownerToken);+ expect(JSON.stringify(body)).not.toContain(viewerToken);+ }+ },+ );++ it("checks the actual slug/active workspace and the key owner's current role", async () => {+ const { app, owner, viewer, workspace, viewerToken } = await fixture();+ const [readable] = await db+ .insert(schema.workspaceTable)+ .values({+ name: "Readable",+ slug: randomUUID(),+ createdAt: new Date(),+ })+ .returning();+ await db.insert(schema.workspaceUserTable).values({+ workspaceId: readable.id,+ userId: viewer.userId,+ role: "owner",+ joinedAt: new Date(),+ });+ await db+ .update(schema.sessionTable)+ .set({ activeOrganizationId: workspace.id })+ .where(eq(schema.sessionTable.userId, viewer.userId));+ for (const operation of ["get-full-organization", "list-members"]) {+ const response = await app.request(+ `/api/auth/organization/${operation}?organizationId=${readable.id}&organizationSlug=${workspace.slug}`,+ {+ headers: { authorization: `Bearer ${viewerToken}` },+ },+ );+ expect(response.status).toBe(403);+ }+ const active = await app.request(+ `/api/auth/organization/get-active-member?organizationId=${readable.id}`,+ {+ headers: { cookie: viewer.cookies },+ },+ );+ expect(active.status).toBe(403);+ for (const permissions of [+ null,+ { workspace: ["read"] },+ ] as (Permissions | null)[]) {+ const key = await keyFor(app, viewer.cookies, permissions);+ const response = await app.request(+ `/api/auth/organization/get-full-organization?organizationId=${workspace.id}`,+ {+ headers: keyHeaders(key.key, true, owner.cookies),+ },+ );+ expect(response.status).toBe(403);+ }+ });++ it("preserves real bearer and cookie credential management and native admin session issuance", async () => {+ const { app, owner, viewer, ownerToken } = await fixture();+ await db+ .update(schema.userTable)+ .set({ role: "admin" })+ .where(eq(schema.userTable.id, owner.userId));+ for (const headers of [+ { cookie: owner.cookies },+ { authorization: `bEaReR ${ownerToken}` },+ ]) {+ const created = await app.request("/api/auth/api-key/create", {+ method: "POST",+ headers: { ...headers, "content-type": "application/json" },+ body: JSON.stringify({ name: "Real session" }),+ });+ expect(created.status).toBe(200);+ const sessions = await app.request("/api/auth/list-sessions", {+ headers,+ });+ expect(sessions.status).toBe(200);+ const impersonation = await app.request(+ "/api/auth/admin/impersonate-user",+ {+ method: "POST",+ headers: { ...headers, "content-type": "application/json" },+ body: JSON.stringify({ userId: viewer.userId }),+ },+ );+ expect(impersonation.status).toBe(200);+ expect(await impersonation.json()).toMatchObject({+ user: { id: viewer.userId },+ });+ }+ });+});++describe("native organization scope and current workspace grants", () => {+ it("batches list grants without bypassing current workspace roles for instance admins", async () => {+ const { app, viewer, workspace } = await fixture();+ await db+ .update(schema.userTable)+ .set({ role: "admin" })+ .where(eq(schema.userTable.id, viewer.userId));+ const [fallback, multi, demoted, nonmember] = await db+ .insert(schema.workspaceTable)+ .values(+ ["Fallback", "Multi", "Demoted", "Nonmember"].map((name) => ({+ name,+ slug: randomUUID(),+ createdAt: new Date(),+ })),+ )+ .returning();+ await db.insert(schema.workspaceUserTable).values([+ {+ workspaceId: fallback.id,+ userId: viewer.userId,+ role: "member",+ joinedAt: new Date(),+ },+ {+ workspaceId: multi.id,+ userId: viewer.userId,+ role: "limited,reader",+ joinedAt: new Date(),+ },+ {+ workspaceId: demoted.id,+ userId: viewer.userId,+ role: "admin",+ joinedAt: new Date(),+ },+ ]);+ await db.insert(schema.workspaceRoleTable).values([+ { workspaceId: multi.id, role: "limited", permission: "{}" },+ {+ workspaceId: multi.id,+ role: "reader",+ permission: JSON.stringify({ workspace: ["read"] }),+ },+ { workspaceId: demoted.id, role: "admin", permission: "{}" },+ ]);+ const list = async () => {+ const response = await app.request("/api/auth/organization/list", {+ headers: { cookie: viewer.cookies },+ });+ expect(response.status).toBe(200);+ return ((await response.json()) as { id: string }[])+ .map((row) => row.id)+ .sort();+ };+ expect(await list()).toEqual([fallback.id, multi.id].sort());+ for (const id of [workspace.id, demoted.id, nonmember.id]) {+ expect(+ (+ await app.request(+ `/api/auth/organization/get-full-organization?organizationId=${id}`,+ {+ headers: { cookie: viewer.cookies },+ },+ )+ ).status,+ ).toBe(403);+ }+ await db+ .update(schema.workspaceRoleTable)+ .set({ permission: "{}" })+ .where(eq(schema.workspaceRoleTable.workspaceId, multi.id));+ expect(await list()).toEqual([fallback.id]);+ });++ it.each([false, true])(+ "denies limited roles through IDs, slugs and active workspace (bearer=%s)",+ async (bearer) => {+ const { app, viewer, viewerToken, workspace } = await fixture();+ const headers = bearer+ ? { authorization: `Bearer ${viewerToken}` }+ : { cookie: viewer.cookies };+ await db+ .update(schema.sessionTable)+ .set({ activeOrganizationId: workspace.id })+ .where(eq(schema.sessionTable.userId, viewer.userId));+ for (const operation of [+ "get-full-organization",+ "list-members",+ "get-active-member",+ ]) {+ for (const query of [+ "",+ `?organizationId=${workspace.id}`,+ `?organizationSlug=${workspace.slug}`,+ ]) {+ const response = await app.request(+ `/api/auth/organization/${operation}${query}`,+ { headers },+ );+ expect(response.status, operation + query).toBe(403);+ }+ }+ const list = await app.request("/api/auth/organization/list", {+ headers,+ });+ expect(list.status).toBe(200);+ expect(await list.json()).toEqual([]);+ for (const suffix of ["capabilities", "project-access/me"]) {+ const discovery = await app.request(+ `/api/workspace/${workspace.id}/${suffix}`,+ { headers },+ );+ expect(discovery.status).toBe(200);+ }+ await db+ .update(schema.workspaceRoleTable)+ .set({ permission: JSON.stringify({ workspace: ["read"] }) })+ .where(eq(schema.workspaceRoleTable.workspaceId, workspace.id));+ const allowed = await app.request(+ `/api/auth/organization/get-full-organization?organizationId=${workspace.id}`,+ { headers },+ );+ expect(allowed.status).toBe(200);+ expect(await allowed.json()).toMatchObject({+ id: workspace.id,+ invitations: [],+ });+ },+ );++ it.each([false, true])(+ "enforces organization key scopes with a valid cookie present (bearer=%s)",+ async (bearer) => {+ const { app, owner, viewer, workspace, invitation } = await fixture();+ const limited = await keyFor(app, owner.cookies, { label: ["read"] });+ const reader = await keyFor(app, owner.cookies, { workspace: ["read"] });+ const inviter = await keyFor(app, owner.cookies, {+ invitation: ["create"],+ });+ const legacy = await keyFor(app, owner.cookies, null);+ for (const cookies of [undefined, viewer.cookies]) {+ for (const operation of [+ "get-full-organization",+ "list-members",+ "list-invitations",+ ]) {+ const response = await app.request(+ `/api/auth/organization/${operation}?organizationId=${workspace.id}`,+ {+ headers: keyHeaders(limited.key, bearer, cookies),+ },+ );+ expect(response.status).toBe(403);+ expect(await response.text()).not.toContain(invitation.id);+ }+ const full = await app.request(+ `/api/auth/organization/get-full-organization?organizationId=${workspace.id}`,+ {+ headers: keyHeaders(reader.key, bearer, cookies),+ },+ );+ expect(full.status).toBe(200);+ expect(await full.json()).toMatchObject({+ id: workspace.id,+ invitations: [],+ });+ const invitations = await app.request(+ `/api/auth/organization/list-invitations?organizationId=${workspace.id}`,+ {+ headers: keyHeaders(inviter.key, bearer, cookies),+ },+ );+ expect(invitations.status).toBe(200);+ expect(await invitations.json()).toEqual([+ expect.objectContaining({ id: invitation.id }),+ ]);+ const legacyFull = await app.request(+ `/api/auth/organization/get-full-organization?organizationId=${workspace.id}`,+ {+ headers: keyHeaders(legacy.key, bearer, cookies),+ },+ );+ expect(legacyFull.status).toBe(200);+ expect(await legacyFull.json()).toMatchObject({+ invitations: [expect.objectContaining({ id: invitation.id })],+ });+ }+ const { project } = await createProjectFixture({+ workspaceId: workspace.id,+ });+ const [task] = await db+ .insert(schema.taskTable)+ .values({+ projectId: project.id,+ title: "Key task",+ number: 1,+ status: "to-do",+ })+ .returning();+ const taskKey = await keyFor(app, owner.cookies, { task: ["read"] });+ expect(+ (+ await app.request(`/api/task/${task.id}`, {+ headers: keyHeaders(taskKey.key, bearer),+ })+ ).status,+ ).toBe(200);+ expect(+ (+ await app.request(`/api/task/${task.id}`, {+ headers: keyHeaders(limited.key, bearer, owner.cookies),+ })+ ).status,+ ).toBe(403);+ },+ );++ it("requires native mutation scopes and retains CLI invitation/update operations", async () => {+ const { app, owner, workspace, invitation } = await fixture();+ const limited = await keyFor(app, owner.cookies, { label: ["read"] });+ const inviter = await keyFor(app, owner.cookies, {+ invitation: ["create"],+ });+ const editor = await keyFor(app, owner.cookies, {+ organization: ["update"],+ });+ const operations = [+ {+ path: "invite-member",+ body: {+ organizationId: workspace.id,+ email: "[email protected]",+ role: "member",+ },+ },+ {+ path: "update",+ body: { organizationId: workspace.id, data: { name: "Updated" } },+ },+ { path: "cancel-invitation", body: { invitationId: invitation.id } },+ {+ path: "update-member-role",+ body: {+ organizationId: workspace.id,+ memberId: "unknown",+ role: "admin",+ },+ },+ { path: "create", body: { name: "Escaped", slug: "escaped" } },+ ] as const;+ for (const operation of operations) {+ const response = await app.request(+ `/api/auth/organization/${operation.path}`,+ {+ method: "POST",+ headers: keyHeaders(limited.key, false, owner.cookies),+ body: JSON.stringify(operation.body),+ },+ );+ expect(response.status).toBe(403);+ }+ for (const [key, operation] of [+ [inviter, operations[0]],+ [editor, operations[1]],+ ] as const) {+ const response = await app.request(+ `/api/auth/organization/${operation.path}`,+ {+ method: "POST",+ headers: keyHeaders(key.key, true, owner.cookies),+ body: JSON.stringify(operation.body),+ },+ );+ expect(response.status).toBe(200);+ }+ const legacy = await keyFor(app, owner.cookies, null);+ const created = await app.request("/api/auth/organization/create", {+ method: "POST",+ headers: keyHeaders(legacy.key, false),+ body: JSON.stringify({+ name: "CLI workspace",+ slug: "cli-workspace",+ keepCurrentActiveOrganization: true,+ }),+ });+ expect(created.status).toBe(200);+ });++ it("keeps stored owner-resend checks for bearer sessions and scoped inviter keys", async () => {+ const {+ app,+ owner,+ viewer,+ viewerToken,+ ownerToken,+ workspace,+ invitation,+ } = await fixture();+ await db+ .update(schema.workspaceRoleTable)+ .set({ permission: JSON.stringify({ invitation: ["create"] }) })+ .where(eq(schema.workspaceRoleTable.workspaceId, workspace.id));+ await db+ .update(schema.invitationTable)+ .set({ role: "member,owner" })+ .where(eq(schema.invitationTable.id, invitation.id));+ const key = await keyFor(app, viewer.cookies, { invitation: ["create"] });+ const body = {+ organizationId: workspace.id,+ email: invitation.email,+ role: "member",+ resend: true,+ };+ for (const headers of [+ {+ authorization: `Bearer ${viewerToken}`,+ "content-type": "application/json",+ },+ keyHeaders(key.key, false, owner.cookies),+ keyHeaders(key.key, true, owner.cookies),+ ]) {+ const response = await app.request(+ "/api/auth/organization/invite-member",+ {+ method: "POST",+ headers,+ body: JSON.stringify(body),+ },+ );+ expect(response.status).toBe(403);+ expect(await response.text()).not.toContain(invitation.id);+ expect(+ await db.query.invitationTable.findFirst({+ where: eq(schema.invitationTable.id, invitation.id),+ }),+ ).toMatchObject({ expiresAt: invitation.expiresAt });+ }+ const ownerResend = await app.request(+ "/api/auth/organization/invite-member",+ {+ method: "POST",+ headers: {+ authorization: `Bearer ${ownerToken}`,+ "content-type": "application/json",+ },+ body: JSON.stringify({ ...body, role: "member,owner" }),+ },+ );+ expect(ownerResend.status).toBe(200);+ });+});diff --git a/tests/api-integration/notification-access.test.ts b/tests/api-integration/notification-access.test.tsindex 96a986626..8dc1cdb36 100644--- a/tests/api-integration/notification-access.test.ts+++ b/tests/api-integration/notification-access.test.ts@@ -11,11 +11,17 @@ import createComment from "../../apps/api/src/activity/controllers/create-commenimport db, { schema } from "../../apps/api/src/database";import { taskReminderSentTable } from "../../apps/api/src/database/schema";import clearNotifications from "../../apps/api/src/notification/controllers/clear-notifications";-import createNotification from "../../apps/api/src/notification/controllers/create-notification";+import createNotification, {+ persistNotification,+} from "../../apps/api/src/notification/controllers/create-notification";import deleteNotification from "../../apps/api/src/notification/controllers/delete-notification";import getNotifications from "../../apps/api/src/notification/controllers/get-notifications";import setNotificationRead from "../../apps/api/src/notification/controllers/set-notification-read";+vi.mock("../../apps/api/src/import/destination-fetch", () => ({+ destinationFetch: (input: string, init?: RequestInit) => fetch(input, init),+}));+const { deliverNotification } = await vi.importActual<typeof import("../../apps/api/src/notification-preferences/delivery")>("../../apps/api/src/notification-preferences/delivery");@@ -266,6 +272,116 @@ describe("notification recipient boundaries", () => {).toEqual([foreign.id]);});+ it.each(["task", "workspace"])(+ "rechecks current %s read permission before creation and personal email/webhook delivery",+ async (resourceType) => {+ const { actor, member, task } = await fixture();+ const [role] = await db+ .insert(schema.workspaceRoleTable)+ .values({+ workspaceId: actor.workspace.id,+ role: "limited",+ permission: JSON.stringify({ task: ["read"], workspace: ["read"] }),+ })+ .returning();+ await db+ .update(schema.workspaceUserTable)+ .set({ role: "limited" })+ .where(+ and(+ eq(schema.workspaceUserTable.userId, member.user.id),+ eq(schema.workspaceUserTable.workspaceId, actor.workspace.id),+ ),+ );+ await db.insert(schema.userNotificationPreferenceTable).values({+ userId: member.user.id,+ emailEnabled: true,+ webhookEnabled: true,+ webhookUrl: "http://127.0.0.1/notifications",+ });+ await db.insert(schema.userNotificationWorkspaceRuleTable).values({+ userId: member.user.id,+ workspaceId: actor.workspace.id,+ isActive: true,+ emailEnabled: true,+ webhookEnabled: true,+ });+ vi.stubEnv("KANEO_ALLOW_PRIVATE_WEBHOOK_DESTINATIONS", "true");+ const fetchMock = vi.fn().mockResolvedValue(new Response(null));+ vi.stubGlobal("fetch", fetchMock);+ const input = {+ userId: member.user.id,+ resourceType,+ resourceId: resourceType === "task" ? task.id : actor.workspace.id,+ type: resourceType === "task" ? "task_comment" : "workspace_created",+ eventData: {+ taskTitle: "Private title",+ workspaceName: "Private workspace",+ },+ };+ const notification = await createNotification(input);+ if (!notification) throw new Error("Expected readable notification");+ await deliverNotification(notification.id);+ expect(sendEmail).toHaveBeenCalledTimes(1);+ expect(fetchMock).toHaveBeenCalledTimes(1);++ await db+ .update(schema.workspaceRoleTable)+ .set({ permission: "{}" })+ .where(eq(schema.workspaceRoleTable.id, role.id));+ await deliverNotification(notification.id);+ expect(sendEmail).toHaveBeenCalledTimes(1);+ expect(fetchMock).toHaveBeenCalledTimes(1);+ expect(await createNotification(input)).toBeNull();+ expect(+ await createNotification({ userId: member.user.id, title: "Personal" }),+ ).toHaveProperty("title", "Personal");+ },+ );++ it("uses injected transaction grants for creation, including uncommitted role revocation", async () => {+ const { actor, member, task } = await fixture();+ const [role] = await db+ .insert(schema.workspaceRoleTable)+ .values({+ workspaceId: actor.workspace.id,+ role: "limited",+ permission: JSON.stringify({ task: ["read"] }),+ })+ .returning();+ await db+ .update(schema.workspaceUserTable)+ .set({ role: "limited" })+ .where(+ and(+ eq(schema.workspaceUserTable.userId, member.user.id),+ eq(schema.workspaceUserTable.workspaceId, actor.workspace.id),+ ),+ );+ await db.transaction(async (tx) => {+ const input = {+ userId: member.user.id,+ resourceType: "task",+ resourceId: task.id,+ };+ expect(await persistNotification(input, tx)).toHaveProperty(+ "resourceId",+ task.id,+ );+ await tx+ .update(schema.workspaceRoleTable)+ .set({ permission: "{}" })+ .where(eq(schema.workspaceRoleTable.id, role.id));+ expect(await persistNotification(input, tx)).toBeNull();+ expect(+ await persistNotification(+ { userId: member.user.id, title: "Personal" },+ tx,+ ),+ ).toHaveProperty("title", "Personal");+ });+ });+it("rejects foreign assignees while preserving valid partial imports", async () => {const { actor, outsider, member, project, task } = await fixture();await expect(diff --git a/tests/api-integration/notification-mutation-permissions.test.ts b/tests/api-integration/notification-mutation-permissions.test.tsnew file mode 100644index 000000000..df25f5b7f--- /dev/null+++ b/tests/api-integration/notification-mutation-permissions.test.ts@@ -0,0 +1,167 @@+import { inArray } from "drizzle-orm";+import { beforeEach, describe, expect, it } from "vite-plus/test";+import db, { schema } from "../../apps/api/src/database";+import { createApp } from "../../apps/api/src/index";+import type { PermissionMap } from "../../apps/api/src/utils/role-permissions";+import { resetTestDatabase } from "./helpers/database";+import {+ createProjectFixture,+ createWorkspaceMember,+} from "./helpers/fixtures";+import { createReadSurfaceReader } from "./helpers/read-surface-reader";++beforeEach(resetTestDatabase);++async function fixture(+ authentication: "api-key" | "custom-role",+ permissions: PermissionMap,+ demote: boolean,+) {+ const reader = await createReadSurfaceReader(authentication, permissions);+ const { project } = await createProjectFixture({+ workspaceId: reader.workspace.id,+ });+ const [task] = await db+ .insert(schema.taskTable)+ .values({ projectId: project.id, title: "Private task" })+ .returning();+ const other = await createWorkspaceMember();+ const notifications = await db+ .insert(schema.notificationTable)+ .values([+ {+ userId: reader.user.id,+ resourceType: "task",+ resourceId: task.id,+ },+ {+ userId: reader.user.id,+ resourceType: "workspace",+ resourceId: reader.workspace.id,+ },+ { userId: reader.user.id },+ { userId: other.user.id },+ {+ userId: other.user.id,+ resourceType: "task",+ resourceId: task.id,+ },+ ])+ .returning();+ if (demote) {+ await db+ .update(schema.workspaceRoleTable)+ .set({ permission: "{}" })+ .where(inArray(schema.workspaceRoleTable.id, [reader.role.id]));+ }+ const currentPermissions: PermissionMap = demote ? {} : permissions;+ const allowed = [+ currentPermissions.task?.includes("read") ?? false,+ currentPermissions.workspace?.includes("read") ?? false,+ true,+ false,+ false,+ ];+ const ids = notifications.map(({ id }) => id);+ const rows = () =>+ db.query.notificationTable.findMany({+ where: inArray(schema.notificationTable.id, ids),+ });+ const reset = async (read: boolean) => {+ await db+ .delete(schema.notificationTable)+ .where(inArray(schema.notificationTable.id, ids));+ await db.insert(schema.notificationTable).values(+ notifications.map((notification, index) => ({+ ...notification,+ // Leave one accessible row unread to distinguish clear-read from clear-all.+ isRead: read && index !== 2,+ })),+ );+ };+ return { ...reader, ...createApp(), notifications, allowed, rows, reset };+}++describe("notification mutation current read grants", () => {+ for (const authentication of ["api-key", "custom-role"] as const) {+ for (const queryWorkspace of [false, true]) {+ it.each<PermissionMap>([+ {},+ { label: ["read"] },+ { task: ["read"] },+ { workspace: ["read"] },+ { task: ["read"], workspace: ["read"] },+ ])(+ `${authentication} filters writes with %j and workspace query ${queryWorkspace}`,+ async (permissions) => {+ await verifyMutations(+ await fixture(authentication, permissions, false),+ queryWorkspace,+ );+ },+ );++ it(`${authentication} rechecks revoked roles with workspace query ${queryWorkspace}`, async () => {+ await verifyMutations(+ await fixture(+ authentication,+ { task: ["read"], workspace: ["read"] },+ true,+ ),+ queryWorkspace,+ );+ });+ }+ }+});++async function verifyMutations(+ context: Awaited<ReturnType<typeof fixture>>,+ queryWorkspace: boolean,+) {+ const { app, headers, workspace, notifications, allowed, rows, reset } =+ context;+ const query = queryWorkspace ? `?workspaceId=${workspace.id}` : "";+ await reset(false);+ const readAll = await app.request(`/api/notification/read-all${query}`, {+ method: "PATCH",+ headers,+ });+ expect(readAll.status).toBe(200);+ const marked = await rows();+ for (const [index, notification] of notifications.entries()) {+ expect(marked.find(({ id }) => id === notification.id)?.isRead).toBe(+ allowed[index],+ );+ }++ for (const operation of ["clear-read", "clear-all"]) {+ await reset(true);+ const response = await app.request(+ `/api/notification/${operation}${query}`,+ { method: "DELETE", headers },+ );+ expect(response.status).toBe(200);+ expect((await rows()).map(({ id }) => id).sort()).toEqual(+ notifications+ .filter(+ (_, index) =>+ !allowed[index] || (operation === "clear-read" && index === 2),+ )+ .map(({ id }) => id)+ .sort(),+ );+ }++ await reset(false);+ for (const [index, notification] of notifications.entries()) {+ const response = await app.request(`/api/notification/${notification.id}`, {+ method: "DELETE",+ headers,+ });+ expect(response.status).toBe(allowed[index] ? 200 : 404);+ expect((await rows()).some(({ id }) => id === notification.id)).toBe(+ !allowed[index],+ );+ }+}diff --git a/tests/api-integration/notification-read-permissions.test.ts b/tests/api-integration/notification-read-permissions.test.tsnew file mode 100644index 000000000..bf326d4d5--- /dev/null+++ b/tests/api-integration/notification-read-permissions.test.ts@@ -0,0 +1,281 @@+import { eq } from "drizzle-orm";+import { beforeEach, describe, expect, it } from "vite-plus/test";+import db, { schema } from "../../apps/api/src/database";+import { createApp } from "../../apps/api/src/index";+import type { PermissionMap } from "../../apps/api/src/utils/role-permissions";+import { resetTestDatabase } from "./helpers/database";+import {+ createProjectFixture,+ createWorkspaceMember,+} from "./helpers/fixtures";+import { createReadSurfaceReader } from "./helpers/read-surface-reader";++beforeEach(resetTestDatabase);++async function fixture(+ authentication: "api-key" | "custom-role",+ permissions: PermissionMap,+) {+ const reader = await createReadSurfaceReader(authentication, permissions);+ const { project } = await createProjectFixture({+ workspaceId: reader.workspace.id,+ });+ const [task] = await db+ .insert(schema.taskTable)+ .values({ projectId: project.id, title: "Private task" })+ .returning();+ const [taskNotification, workspaceNotification, personalNotification] =+ await db+ .insert(schema.notificationTable)+ .values([+ {+ userId: reader.user.id,+ resourceType: "task",+ resourceId: task.id,+ title: "Private title",+ content: "Private comment",+ eventData: {+ taskTitle: task.title,+ commentPreview: "Private preview",+ },+ },+ {+ userId: reader.user.id,+ resourceType: "workspace",+ resourceId: reader.workspace.id,+ eventData: { workspaceName: "Private workspace" },+ },+ { userId: reader.user.id, title: "Personal message" },+ ])+ .returning();+ return {+ ...reader,+ task,+ taskNotification,+ workspaceNotification,+ personalNotification,+ ...createApp(),+ };+}++describe("notification response current read grants", () => {+ for (const authentication of ["api-key", "custom-role"] as const) {+ it.each<PermissionMap>([+ {},+ { label: ["read"] },+ { project: ["read"] },+ { task: ["read"] },+ { workspace: ["read"] },+ { task: ["read"], workspace: ["read"] },+ ])(`${authentication} filters full rows with %j`, async (permissions) => {+ const {+ app,+ headers,+ workspace,+ taskNotification,+ workspaceNotification,+ personalNotification,+ } = await fixture(authentication, permissions);+ const cases = [+ {+ notification: taskNotification,+ allowed: permissions.task?.includes("read") ?? false,+ },+ {+ notification: workspaceNotification,+ allowed: permissions.workspace?.includes("read") ?? false,+ },+ { notification: personalNotification, allowed: true },+ ];+ for (const query of ["", `?workspaceId=${workspace.id}`]) {+ const response = await app.request(`/api/notification${query}`, {+ headers,+ });+ expect(response.status).toBe(200);+ const rows = await response.json();+ expect(rows.map((row: { id: string }) => row.id).sort()).toEqual(+ cases+ .filter(({ allowed }) => allowed)+ .map(({ notification }) => notification.id)+ .sort(),+ );+ if (!permissions.task?.includes("read")) {+ expect(JSON.stringify(rows)).not.toContain("Private preview");+ }+ }+ for (const { notification, allowed } of cases) {+ for (const state of ["read", "unread"]) {+ // Start denied unread from true to catch mutation-before-denial bugs.+ const previous = state === "unread";+ await db+ .update(schema.notificationTable)+ .set({ isRead: previous })+ .where(eq(schema.notificationTable.id, notification.id));+ const response = await app.request(+ `/api/notification/${notification.id}/${state}`,+ { method: "PATCH", headers },+ );+ expect(response.status).toBe(allowed ? 200 : 404);+ if (allowed) {+ expect(await response.json()).toMatchObject({+ id: notification.id,+ isRead: state === "read",+ });+ } else {+ expect(await response.text()).not.toContain("Private");+ expect(+ await db.query.notificationTable.findFirst({+ where: eq(schema.notificationTable.id, notification.id),+ }),+ ).toHaveProperty("isRead", previous);+ }+ }+ }+ });++ it(`${authentication} rechecks historical rows after role demotion`, async () => {+ const {+ app,+ headers,+ role,+ taskNotification,+ workspaceNotification,+ personalNotification,+ } = await fixture(authentication, {+ task: ["read"],+ workspace: ["read"],+ });+ const before = await app.request("/api/notification", { headers });+ expect((await before.json()).length).toBe(3);+ await db+ .update(schema.workspaceRoleTable)+ .set({ permission: "{}" })+ .where(eq(schema.workspaceRoleTable.id, role.id));+ const after = await app.request("/api/notification", { headers });+ expect(await after.json()).toEqual([+ expect.objectContaining({ id: personalNotification.id }),+ ]);+ for (const notification of [taskNotification, workspaceNotification]) {+ for (const state of ["read", "unread"]) {+ const response = await app.request(+ `/api/notification/${notification.id}/${state}`,+ { method: "PATCH", headers },+ );+ expect(response.status).toBe(404);+ expect(await response.text()).not.toContain("Private");+ }+ }+ });+ }++ it("keeps another user's rows private even with the resource read grants", async () => {+ const { app, headers, task, taskNotification } = await fixture("api-key", {+ task: ["read"],+ workspace: ["read"],+ });+ const other = await createWorkspaceMember();+ const foreign = await db+ .insert(schema.notificationTable)+ .values([+ { userId: other.user.id, title: "Other personal message" },+ {+ userId: other.user.id,+ resourceId: task.id,+ resourceType: "task",+ eventData: { commentPreview: "Other private preview" },+ },+ ])+ .returning();+ const response = await app.request("/api/notification", { headers });+ const rows = await response.json();+ expect(rows).toContainEqual(+ expect.objectContaining({ id: taskNotification.id }),+ );+ for (const notification of foreign) {+ expect(rows).not.toContainEqual(+ expect.objectContaining({ id: notification.id }),+ );+ for (const state of ["read", "unread"]) {+ const previous = state === "unread";+ await db+ .update(schema.notificationTable)+ .set({ isRead: previous })+ .where(eq(schema.notificationTable.id, notification.id));+ const result = await app.request(+ `/api/notification/${notification.id}/${state}`,+ { method: "PATCH", headers },+ );+ expect(result.status).toBe(404);+ expect(await result.text()).not.toContain("Other");+ expect(+ await db.query.notificationTable.findFirst({+ where: eq(schema.notificationTable.id, notification.id),+ }),+ ).toHaveProperty("isRead", previous);+ }+ }+ });++ it("filters each workspace before the limit and follows the task's current workspace instead of eventData", async () => {+ const {+ app,+ headers,+ workspace,+ user,+ task,+ taskNotification,+ personalNotification,+ } = await fixture("api-key", { task: ["read"] });+ const other = await createWorkspaceMember();+ await db.insert(schema.workspaceUserTable).values({+ workspaceId: other.workspace.id,+ userId: user.id,+ role: "limited",+ joinedAt: new Date(),+ });+ await db.insert(schema.workspaceRoleTable).values({+ workspaceId: other.workspace.id,+ role: "limited",+ permission: "{}",+ });+ const { project } = await createProjectFixture({+ workspaceId: other.workspace.id,+ });+ const [hiddenTask] = await db+ .insert(schema.taskTable)+ .values({ projectId: project.id, title: "Hidden task", number: 2 })+ .returning();+ await db.insert(schema.notificationTable).values(+ Array.from({ length: 55 }, () => ({+ userId: user.id,+ resourceId: hiddenTask.id,+ resourceType: "task",+ createdAt: new Date(Date.now() + 10_000),+ eventData: { workspaceId: workspace.id, taskTitle: "Hidden title" },+ })),+ );+ const list = async (query = "") =>+ (await app.request(`/api/notification${query}`, { headers })).json();+ expect((await list()).map((row: { id: string }) => row.id).sort()).toEqual(+ [taskNotification.id, personalNotification.id].sort(),+ );+ expect(await list(`?workspaceId=${other.workspace.id}`)).toEqual([+ expect.objectContaining({ id: personalNotification.id }),+ ]);+ await db+ .update(schema.taskTable)+ .set({ projectId: project.id })+ .where(eq(schema.taskTable.id, task.id));+ expect(await list()).toEqual([+ expect.objectContaining({ id: personalNotification.id }),+ ]);+ expect(+ (+ await app.request(`/api/notification/${taskNotification.id}/read`, {+ method: "PATCH",+ headers,+ })+ ).status,+ ).toBe(404);+ });+});diff --git a/tests/api-integration/public-project-metadata.test.ts b/tests/api-integration/public-project-metadata.test.tsnew file mode 100644index 000000000..dc0fbfe15--- /dev/null+++ b/tests/api-integration/public-project-metadata.test.ts@@ -0,0 +1,124 @@+import { eq } from "drizzle-orm";+import { beforeEach, describe, expect, it } from "vite-plus/test";+import db, { schema } from "../../apps/api/src/database";+import { createApp } from "../../apps/api/src/index";+import { withLastSync } from "../../apps/api/src/plugins/gitlab/utils/link-sync";+import getTasks from "../../apps/api/src/task/controllers/get-tasks";+import { mockAnonymousSession, mockAuthenticatedSession } from "./helpers/auth";+import { resetTestDatabase } from "./helpers/database";+import {+ createProjectFixture,+ createWorkspaceMember,+} from "./helpers/fixtures";++beforeEach(resetTestDatabase);++describe("public project link metadata", () => {+ it("redacts internal metadata in all task buckets and related pages", async () => {+ const member = await createWorkspaceMember();+ const outsider = await createWorkspaceMember();+ const { project } = await createProjectFixture({+ workspaceId: member.workspace.id,+ });+ await db+ .update(schema.projectTable)+ .set({ isPublic: true })+ .where(eq(schema.projectTable.id, project.id));+ const [integration] = await db+ .insert(schema.integrationTable)+ .values({ projectId: project.id, type: "gitlab", config: "{}" })+ .returning();+ const metadata = withLastSync(+ withLastSync(+ {+ state: "closed",+ merged: true,+ draft: false,+ internal: "internal-sentinel",+ },+ "title",+ "kaneo",+ "historical-title-sentinel",+ ),+ "description",+ "gitlab",+ "historical-description-sentinel",+ );+ const tasks = await db+ .insert(schema.taskTable)+ .values(+ ["to-do", "planned", "archived"].map((status, index) => ({+ projectId: project.id,+ number: index + 1,+ title: `Current ${status}`,+ description: "Current description",+ status,+ })),+ )+ .returning();+ await db.insert(schema.externalLinkTable).values(+ tasks.flatMap((task) =>+ Array.from({ length: 34 }, (_, index) => ({+ id: `${task.status}-${String(index).padStart(3, "0")}`,+ taskId: task.id,+ integrationId: integration.id,+ resourceType: "pull_request",+ externalId: `${task.number}-${index}`,+ url: `https://example.com/pull/${task.number}-${index}`,+ title: "Linked pull request",+ metadata: JSON.stringify(metadata),+ })),+ ),+ );+ const { app } = createApp();+ for (const signedIn of [false, true]) {+ if (signedIn) mockAuthenticatedSession(outsider.user);+ else mockAnonymousSession();+ const seen = new Set<string>();+ for (const relatedPage of [1, 2]) {+ const response = await app.request(+ `/api/public-project/${project.id}?relatedPage=${relatedPage}`,+ );+ expect(response.status).toBe(200);+ const text = await response.text();+ for (const sentinel of [+ "historical-title-sentinel",+ "historical-description-sentinel",+ "internal-sentinel",+ "lastSync",+ ]) {+ expect(text).not.toContain(sentinel);+ }+ const board = JSON.parse(text);+ const publicTasks = [+ ...board.columns.flatMap(+ (column: { tasks: unknown[] }) => column.tasks,+ ),+ ...board.plannedTasks,+ ...board.archivedTasks,+ ];+ expect(publicTasks).toHaveLength(3);+ for (const task of publicTasks) {+ expect(task.title).toContain("Current");+ expect(task.description).toBe("Current description");+ for (const link of task.externalLinks) {+ expect(link.metadata).toEqual({+ state: "closed",+ merged: true,+ draft: false,+ });+ expect(link.integrationId).toBeNull();+ expect(link.title).toBe("Linked pull request");+ seen.add(link.id);+ }+ }+ }+ expect(seen.size).toBe(102);+ }+ const authenticated = await getTasks(project.id, {}, member.user.id);+ expect(+ authenticated.data.columns.flatMap((column) => column.tasks)[0]+ .externalLinks[0].metadata,+ ).toEqual(metadata);+ });+});diff --git a/tests/api-integration/read-permissions.test.ts b/tests/api-integration/read-permissions.test.tsnew file mode 100644index 000000000..abcb6b77c--- /dev/null+++ b/tests/api-integration/read-permissions.test.ts@@ -0,0 +1,242 @@+import { createHash, randomUUID } from "node:crypto";+import { eq } from "drizzle-orm";+import { beforeEach, describe, expect, it } from "vite-plus/test";+import db, { schema } from "../../apps/api/src/database";+import { createApp } from "../../apps/api/src/index";+import { mockAnonymousSession, mockAuthenticatedSession } from "./helpers/auth";+import { resetTestDatabase } from "./helpers/database";+import {+ createProjectFixture,+ createWorkspaceMember,+} from "./helpers/fixtures";++type Permissions = Record<string, string[]>;+type Authentication = "api-key" | "custom-role";++beforeEach(resetTestDatabase);++async function fixture(+ authentication: Authentication,+ permissions: Permissions,+) {+ const member = await createWorkspaceMember({+ role: authentication === "custom-role" ? "limited" : "admin",+ });+ const { project } = await createProjectFixture({+ workspaceId: member.workspace.id,+ });+ const [task] = await db+ .insert(schema.taskTable)+ .values({+ projectId: project.id,+ title: "Private task",+ description: "Private description",+ number: 1,+ status: "to-do",+ })+ .returning();+ const [label] = await db+ .insert(schema.labelTable)+ .values({+ workspaceId: member.workspace.id,+ taskId: task.id,+ name: "Private label",+ color: "red",+ })+ .returning();+ const [timeEntry] = await db+ .insert(schema.timeEntryTable)+ .values({+ taskId: task.id,+ userId: member.user.id,+ description: "Private time entry",+ startTime: new Date(),+ })+ .returning();+ const [comment] = await db+ .insert(schema.activityTable)+ .values({+ taskId: task.id,+ type: "comment",+ userId: member.user.id,+ content: "Private comment",+ })+ .returning();+ const headers: Record<string, string> = {};+ if (authentication === "custom-role") {+ await db.insert(schema.workspaceRoleTable).values({+ workspaceId: member.workspace.id,+ role: "limited",+ permission: JSON.stringify(permissions),+ });+ mockAuthenticatedSession(member.user);+ } else {+ mockAnonymousSession();+ const key = `test_${randomUUID()}`;+ await db.insert(schema.apikeyTable).values({+ referenceId: member.user.id,+ userId: member.user.id,+ key: createHash("sha256").update(key).digest("base64url"),+ permissions: JSON.stringify(permissions),+ enabled: true,+ // This matrix exercises authorization across more than ten routes.+ rateLimitEnabled: false,+ createdAt: new Date(),+ updatedAt: new Date(),+ });+ headers["x-api-key"] = key;+ }+ const { app } = createApp();+ const workspaceId = member.workspace.id;+ const reads = [+ { path: `/api/task/${task.id}`, resources: ["task"] },+ { path: `/api/task/${task.id}/description`, resources: ["task"] },+ {+ path: `/api/task/description-matches/${project.id}?query=Private`,+ resources: ["task"],+ },+ { path: `/api/task/tasks/${project.id}`, resources: ["project", "task"] },+ { path: `/api/task/export/${project.id}`, resources: ["project", "task"] },+ { path: `/api/project/${project.id}`, resources: ["project"] },+ { path: `/api/project?workspaceId=${workspaceId}`, resources: ["project"] },+ {+ path: `/api/project/${project.id}/background`,+ resources: ["project"],+ allowedStatus: 404,+ },+ { path: `/api/column/${project.id}`, resources: ["project"] },+ { path: `/api/workflow-rule/${project.id}`, resources: ["project"] },+ { path: `/api/activity/${task.id}`, resources: ["task"] },+ { path: `/api/comment/${task.id}`, resources: ["task"] },+ { path: `/api/time-entry/task/${task.id}`, resources: ["task"] },+ { path: `/api/time-entry/${timeEntry.id}`, resources: ["task"] },+ { path: `/api/external-link/task/${task.id}`, resources: ["task"] },+ { path: `/api/task-relation/${task.id}`, resources: ["task"] },+ { path: `/api/label/task/${task.id}`, resources: ["label"] },+ { path: `/api/label/workspace/${workspaceId}`, resources: ["label"] },+ { path: `/api/label/${label.id}`, resources: ["label"] },+ { path: `/api/workspace/${workspaceId}/members`, resources: ["workspace"] },+ ...[+ "github",+ "gitea",+ "gitlab",+ "discord",+ "generic-webhook",+ "mattermost",+ "slack",+ "telegram",+ ].map((provider) => ({+ path: `/api/${provider}-integration/project/${project.id}`,+ resources: ["project"],+ })),+ ...["tasks", "comments", "activities", "projects", "workspaces", "all"].map(+ (type) => ({+ path: `/api/search?workspaceId=${workspaceId}&q=Private&type=${type}`,+ resources:+ type === "projects"+ ? ["project"]+ : type === "workspaces"+ ? ["workspace"]+ : type === "all"+ ? ["project", "task", "workspace"]+ : ["project", "task"],+ }),+ ),+ ];+ return { app, member, comment, headers, reads };+}++describe("workspace read permissions", () => {+ for (const authentication of ["api-key", "custom-role"] as const) {+ it.each<Permissions>([+ {},+ { label: ["read"] },+ { project: ["read"] },+ { task: ["read"] },+ { workspace: ["read"] },+ {+ project: ["read"],+ task: ["read"],+ label: ["read"],+ workspace: ["read"],+ },+ ])(`${authentication} enforces read grants %j`, async (permissions) => {+ const { app, headers, reads, member } = await fixture(+ authentication,+ permissions,+ );+ for (const { path, resources, ...options } of reads) {+ const allowed = resources.every((resource) =>+ permissions[resource]?.includes("read"),+ );+ const response = await app.request(path, { headers });+ expect(response.status, path).toBe(+ allowed ? (options.allowedStatus ?? 200) : 403,+ );+ if (!allowed) {+ const body = await response.json();+ expect(body.code, path).toBe(+ authentication === "api-key"+ ? "API_KEY_SCOPE"+ : "MISSING_PERMISSION",+ );+ }+ }+ for (const suffix of ["capabilities", "project-access/me"]) {+ expect(+ (+ await app.request(+ `/api/workspace/${member.workspace.id}/${suffix}`,+ { headers },+ )+ ).status,+ ).toBe(200);+ }+ });++ it(`${authentication} cannot edit or delete its own comment without task:update through activity aliases`, async () => {+ const { app, headers, comment } = await fixture(authentication, {+ task: ["read"],+ });+ for (const method of ["PUT", "DELETE"]) {+ const response = await app.request("/api/activity/comment", {+ method,+ headers: { ...headers, "content-type": "application/json" },+ body: JSON.stringify({ activityId: comment.id, comment: "Changed" }),+ });+ expect(response.status).toBe(403);+ }+ expect(+ await db.query.activityTable.findFirst({+ where: eq(schema.activityTable.id, comment.id),+ }),+ ).toMatchObject({ content: "Private comment" });+ });+ }++ it("limits workspace search results to the workspace whose permissions were checked", async () => {+ const { app, member, headers } = await fixture("custom-role", {+ workspace: ["read"],+ });+ const other = await createWorkspaceMember({+ workspaceName: "Private other workspace",+ });+ await db.insert(schema.workspaceUserTable).values({+ workspaceId: other.workspace.id,+ userId: member.user.id,+ role: "no-read",+ joinedAt: new Date(),+ });+ await db.insert(schema.workspaceRoleTable).values({+ workspaceId: other.workspace.id,+ role: "no-read",+ permission: "{}",+ });+ const response = await app.request(+ `/api/search?workspaceId=${member.workspace.id}&q=Private&type=workspaces`,+ { headers },+ );+ expect(response.status).toBe(200);+ expect(await response.text()).not.toContain(other.workspace.id);+ });+});diff --git a/tests/api-integration/task-ticket-read-permissions.test.ts b/tests/api-integration/task-ticket-read-permissions.test.tsnew file mode 100644index 000000000..92fc1d9ea--- /dev/null+++ b/tests/api-integration/task-ticket-read-permissions.test.ts@@ -0,0 +1,118 @@+import { eq } from "drizzle-orm";+import { beforeEach, describe, expect, it } from "vite-plus/test";+import db, { schema } from "../../apps/api/src/database";+import { createApp } from "../../apps/api/src/index";+import type { PermissionMap } from "../../apps/api/src/utils/role-permissions";+import { resetTestDatabase } from "./helpers/database";+import {+ createProjectFixture,+ createWorkspaceMember,+} from "./helpers/fixtures";+import { createReadSurfaceReader } from "./helpers/read-surface-reader";++beforeEach(resetTestDatabase);++describe("ticket alias current read grants", () => {+ for (const authentication of ["api-key", "custom-role"] as const) {+ it.each<{ permissions: PermissionMap; allowed: boolean }>([+ { permissions: {}, allowed: false },+ { permissions: { label: ["read"] }, allowed: false },+ { permissions: { project: ["read"] }, allowed: false },+ { permissions: { task: ["read"] }, allowed: true },+ ])(+ `${authentication} filters candidates with $permissions`,+ async ({ permissions, allowed }) => {+ const reader = await createReadSurfaceReader(+ authentication,+ permissions,+ );+ const { project } = await createProjectFixture({+ workspaceId: reader.workspace.id,+ slug: "KAN",+ });+ const [task] = await db+ .insert(schema.taskTable)+ .values({+ projectId: project.id,+ number: 12,+ title: "Private title",+ description: "Private description",+ })+ .returning();+ const { app } = createApp();+ for (const query of [+ "",+ `?workspaceId=${reader.workspace.id}`,+ `?workspaceSlug=${reader.workspace.slug}`,+ `?projectId=${project.id}`,+ ]) {+ const response = await app.request(+ `/api/task/by-ticket-id/KAN-12${query}`,+ { headers: reader.headers },+ );+ expect(response.status, query).toBe(allowed ? 200 : 404);+ if (allowed) {+ expect(await response.json()).toMatchObject({+ id: task.id,+ description: task.description,+ });+ } else {+ expect(await response.text()).not.toContain(task.title);+ }+ }+ },+ );+ }++ it("excludes another workspace's identically named role before ambiguity and active-project ranking", async () => {+ const reader = await createReadSurfaceReader("api-key", { task: ["read"] });+ const other = await createWorkspaceMember();+ await db.insert(schema.workspaceUserTable).values({+ workspaceId: other.workspace.id,+ userId: reader.user.id,+ role: "limited",+ joinedAt: new Date(),+ });+ await db.insert(schema.workspaceRoleTable).values({+ workspaceId: other.workspace.id,+ role: "limited",+ permission: "{}",+ });+ const allowed = await createProjectFixture({+ workspaceId: reader.workspace.id,+ slug: "KAN",+ });+ const hidden = await createProjectFixture({+ workspaceId: other.workspace.id,+ slug: "KAN",+ });+ const [task] = await db+ .insert(schema.taskTable)+ .values({ projectId: allowed.project.id, number: 12, title: "Readable" })+ .returning();+ await db.insert(schema.taskTable).values({+ projectId: hidden.project.id,+ number: 12,+ title: "Hidden",+ });+ const { app } = createApp();+ const lookup = (query = "") =>+ app.request(`/api/task/by-ticket-id/KAN-12${query}`, {+ headers: reader.headers,+ });+ expect(await (await lookup()).json()).toMatchObject({ id: task.id });+ await db+ .update(schema.projectTable)+ .set({ archivedAt: new Date() })+ .where(eq(schema.projectTable.id, allowed.project.id));+ expect(await (await lookup()).json()).toMatchObject({ id: task.id });+ for (const query of [+ `?workspaceId=${other.workspace.id}`,+ `?workspaceSlug=${other.workspace.slug}`,+ `?projectId=${hidden.project.id}`,+ `?workspaceId=${reader.workspace.id}&projectId=${hidden.project.id}`,+ ]) {+ expect((await lookup(query)).status).toBe(404);+ }+ });+});diff --git a/tests/api-integration/websocket-security.test.ts b/tests/api-integration/websocket-security.test.tsindex b8067f463..e2b95794e 100644--- a/tests/api-integration/websocket-security.test.ts+++ b/tests/api-integration/websocket-security.test.ts@@ -16,7 +16,12 @@ import { serve } from "../../apps/api/node_modules/@hono/node-server";import type { NodeWebSocket } from "../../apps/api/node_modules/@hono/node-ws";import { auth } from "../../apps/api/src/auth";import { createApp } from "../../apps/api/src/index";-import { broadcastToUser } from "../../apps/api/src/ws";+import {+ broadcastToProject,+ broadcastToUser,+ initializeWebSocketAdapter,+ shutdownWebSocketAdapter,+} from "../../apps/api/src/ws";import { handleWebSocketMessage } from "../../apps/api/src/ws/security";import { mockAuthenticatedSession } from "./helpers/auth";import { resetTestDatabase } from "./helpers/database";@@ -50,6 +55,7 @@ let server: ReturnType<typeof serve>;let baseUrl: string;let userId: string;let projectId: string;+let workspaceId: string;const sockets: Socket[] = [];async function connect(path: string, headers: Record<string, string>) {const socket = new WebSocket(`${baseUrl}/api/ws/${path}`, { headers });@@ -75,6 +81,7 @@ beforeEach(async () => {vi.stubEnv("CORS_ORIGINS", "https://extra.example.test");const member = await createWorkspaceMember();userId = member.user.id;+ workspaceId = member.workspace.id;const { project } = await createProjectFixture({workspaceId: member.workspace.id,});@@ -98,6 +105,7 @@ beforeEach(async () => {});afterEach(async () => {+ await shutdownWebSocketAdapter();for (const socket of sockets.splice(0)) socket.terminate();if (server)await new Promise<void>((resolve, reject) =>@@ -249,3 +257,126 @@ it("still rejects access to a foreign project with a valid Origin", async () =>expect((await connect(project.id, headers)).status).toBe(404);expect((await connect("missing-project", headers)).status).toBe(404);});++async function createScopedKey(permissions: Record<string, string[]>) {+ const key = `scoped-ws-${userId}`;+ const [row] = await db+ .insert(schema.apikeyTable)+ .values({+ referenceId: userId,+ userId,+ key: createHash("sha256").update(key).digest("base64url"),+ permissions: JSON.stringify(permissions),+ enabled: true,+ createdAt: new Date(),+ updatedAt: new Date(),+ })+ .returning();+ return { key, id: row.id };+}++describe("project WebSocket read authorization", () => {+ for (const authentication of ["api-key", "custom-role"] as const) {+ it.each([+ [{ label: ["read"] }, 403],+ [{ project: ["read"] }, 403],+ [{ task: ["read"] }, 403],+ [{ project: ["read"], task: ["read"] }, 101],+ ] as [Record<string, string[]>, number][])(+ `${authentication} enforces read grants %j at upgrade`,+ async (permissions, expected) => {+ let headers: Record<string, string>;+ if (authentication === "api-key") {+ const { key } = await createScopedKey(permissions);+ headers = { "x-api-key": key };+ } else {+ await db+ .update(schema.workspaceUserTable)+ .set({ role: "limited" })+ .where(eq(schema.workspaceUserTable.userId, userId));+ await db.insert(schema.workspaceRoleTable).values({+ workspaceId,+ role: "limited",+ permission: JSON.stringify(permissions),+ });+ headers = { authorization: "Bearer valid-test-session" };+ }+ expect((await connect(projectId, headers)).status).toBe(expected);+ },+ );+ }++ it.each(["scope", "disabled", "expired", "deleted"])(+ "stops delivery after an API key is %s without revoking the owner's cookie connection",+ async (change) => {+ await initializeWebSocketAdapter();+ const { key, id } = await createScopedKey({+ project: ["read"],+ task: ["read"],+ });+ const keyed = await connect(projectId, { "x-api-key": key });+ const browser = await connect(projectId, {+ cookie: "test-session=valid",+ origin: "http://localhost:5173",+ });+ expect(keyed.status).toBe(101);+ expect(browser.status).toBe(101);+ const leaked = vi.fn();+ keyed.socket.on("message", leaked);+ if (change === "deleted") {+ await db+ .delete(schema.apikeyTable)+ .where(eq(schema.apikeyTable.id, id));+ } else {+ await db+ .update(schema.apikeyTable)+ .set(+ change === "scope"+ ? { permissions: JSON.stringify({ label: ["read"] }) }+ : change === "disabled"+ ? { enabled: false }+ : { expiresAt: new Date(Date.now() - 60_000) },+ )+ .where(eq(schema.apikeyTable.id, id));+ }+ const closed = once(keyed.socket, "close");+ const received = once(browser.socket, "message");+ const update = {+ type: "TASK_UPDATED",+ projectId,+ taskId: "private-task",+ };+ broadcastToProject(projectId, update);+ expect((await closed)[0]).toBe(1008);+ expect(leaked).not.toHaveBeenCalled();+ expect(JSON.parse((await received)[0].toString())).toEqual(update);+ },+ );++ it("stops delivery after a role's read grants are removed", async () => {+ await initializeWebSocketAdapter();+ await db.insert(schema.workspaceRoleTable).values({+ workspaceId,+ role: "member",+ permission: JSON.stringify({ project: ["read"], task: ["read"] }),+ });+ const { socket, status } = await connect(projectId, {+ authorization: "Bearer valid-test-session",+ });+ expect(status).toBe(101);+ const leaked = vi.fn();+ socket.on("message", leaked);+ await db+ .update(schema.workspaceRoleTable)+ .set({ permission: "{}" })+ .where(eq(schema.workspaceRoleTable.workspaceId, workspaceId));+ const closed = once(socket, "close");+ broadcastToProject(projectId, {+ type: "TASK_UPDATED",+ projectId,+ taskId: "private-task",+ });+ expect((await closed)[0]).toBe(1008);+ expect(leaked).not.toHaveBeenCalled();+ });+});diff --git a/tests/api/gitea-integration/verify-gitea-access-fetch.test.ts b/tests/api/gitea-integration/verify-gitea-access-fetch.test.tsindex 69ec586a7..135658d0e 100644--- a/tests/api/gitea-integration/verify-gitea-access-fetch.test.ts+++ b/tests/api/gitea-integration/verify-gitea-access-fetch.test.ts@@ -7,6 +7,10 @@ import {vi,} from "vite-plus/test";+vi.mock("../../../apps/api/src/import/destination-fetch", () => ({+ destinationFetch: (input: string, init?: RequestInit) => fetch(input, init),+}));+const { default: verifyGiteaAccess } =await import("../../../apps/api/src/gitea-integration/controllers/verify-gitea-access");diff --git a/tests/api/mcp-oauth-security.test.ts b/tests/api/mcp-oauth-security.test.tsindex dbdba0473..819c9d555 100644--- a/tests/api/mcp-oauth-security.test.ts+++ b/tests/api/mcp-oauth-security.test.ts@@ -9,7 +9,7 @@ const mocks = vi.hoisted(() => {if (cookie.includes("victim_session=1")) {return {user: { id: "victim-user" },- session: { token: "victim-cookie-token" },+ session: { id: "victim-session", token: "victim-cookie-token" },};}return null;@@ -20,15 +20,33 @@ const mocks = vi.hoisted(() => {return row;}),}));- return { getSession, insert, insertedSessions };+ const select = vi.fn(() => ({+ from: () => ({+ where: () => ({+ limit: () => ({+ for: async () => [+ {+ id: "victim-session",+ expiresAt: new Date(Date.now() + 60_000),+ },+ ],+ }),+ }),+ }),+ }));+ return { getSession, insert, select, insertedSessions };});vi.mock("../../apps/api/src/auth", () => ({auth: { api: { getSession: mocks.getSession } },}));-vi.mock("../../apps/api/src/database", () => ({- default: { insert: mocks.insert },+vi.mock("../../apps/api/src/database", async () => ({+ default: {+ transaction: async (callback: (tx: unknown) => Promise<unknown>) =>+ callback({ insert: mocks.insert, select: mocks.select }),+ },+ schema: await import("../../apps/api/src/database/schema"),}));vi.mock("../../apps/api/src/mcp/tools", () => ({diff --git a/tests/api/notification/resource-access.test.ts b/tests/api/notification/resource-access.test.tsnew file mode 100644index 000000000..1a87247a3--- /dev/null+++ b/tests/api/notification/resource-access.test.ts@@ -0,0 +1,126 @@+import { describe, expect, it, vi } from "vite-plus/test";+import type db from "../../../apps/api/src/database";++const { defaultSelect } = vi.hoisted(() => ({+ defaultSelect: vi.fn(() => {+ throw new Error("Unexpected global database access");+ }),+}));+vi.mock("../../../apps/api/src/database", async () => ({+ default: { select: defaultSelect },+ schema: await import("../../../apps/api/src/database/schema"),+}));++import { canReceiveResourceNotification } from "../../../apps/api/src/notification/resource-access";++type RecipientRow = {+ id: string;+ instanceRole: string;+ memberRole: string | null;+ storedRole: string | null;+ permission: string | null;+};++function injectedDatabase(rows: RecipientRow[]) {+ const query = {+ from: () => query,+ leftJoin: () => query,+ where: async () => rows,+ };+ const select = vi.fn(() => query);+ return {+ select,+ database: { select } as unknown as Pick<typeof db, "select">,+ };+}++const member = {+ id: "user",+ instanceRole: "user",+ memberRole: "limited",+ storedRole: "limited",+};++describe("notification recipient current grants", () => {+ it("batches stored role statements into the injected recipient check", async () => {+ const { database, select } = injectedDatabase([+ { ...member, memberRole: "limited, reader", permission: "{}" },+ {+ ...member,+ memberRole: "limited, reader",+ storedRole: "reader",+ permission: '{"task":["read"]}',+ },+ ]);+ expect(+ await canReceiveResourceNotification("user", "task", "task", database),+ ).toBe(true);+ expect(select).toHaveBeenCalledTimes(1);+ expect(defaultSelect).not.toHaveBeenCalled();+ });++ it.each(["task", "workspace"])(+ "requires the current %s read grant",+ async (resourceType) => {+ for (const permissions of [{}, { label: ["read"] }]) {+ const { database, select } = injectedDatabase([+ { ...member, permission: JSON.stringify(permissions) },+ ]);+ expect(+ await canReceiveResourceNotification(+ "user",+ "resource",+ resourceType,+ database,+ ),+ ).toBe(false);+ expect(select).toHaveBeenCalledTimes(1);+ }+ const { database } = injectedDatabase([+ { ...member, permission: JSON.stringify({ [resourceType]: ["read"] }) },+ ]);+ expect(+ await canReceiveResourceNotification(+ "user",+ "resource",+ resourceType,+ database,+ ),+ ).toBe(true);+ },+ );++ it("preserves built-in fallback and user-only notifications", async () => {+ const fallback = injectedDatabase([+ { ...member, memberRole: "viewer", storedRole: null, permission: null },+ ]);+ expect(+ await canReceiveResourceNotification(+ "user",+ "task",+ "task",+ fallback.database,+ ),+ ).toBe(true);+ const personal = injectedDatabase([+ { ...member, memberRole: null, storedRole: null, permission: null },+ ]);+ expect(+ await canReceiveResourceNotification(+ "user",+ null,+ null,+ personal.database,+ ),+ ).toBe(true);+ const missing = injectedDatabase([]);+ expect(+ await canReceiveResourceNotification(+ "missing",+ null,+ null,+ missing.database,+ ),+ ).toBe(false);+ });+});diff --git a/tests/api/plugins/gitlab/utils/issue-updates.test.ts b/tests/api/plugins/gitlab/utils/issue-updates.test.tsindex d14ac9331..b70c1a1bc 100644--- a/tests/api/plugins/gitlab/utils/issue-updates.test.ts+++ b/tests/api/plugins/gitlab/utils/issue-updates.test.ts@@ -10,6 +10,10 @@ import {import { createGitlabClient } from "../../../../../apps/api/src/plugins/gitlab/utils/gitlab-api";import { updateIssueLabelsGitlab } from "../../../../../apps/api/src/plugins/gitlab/utils/labels";+vi.mock("../../../../../apps/api/src/import/destination-fetch", () => ({+ destinationFetch: (input: string, init?: RequestInit) => fetch(input, init),+}));+vi.mock("node:timers/promises", () => ({ setTimeout: vi.fn(async () => {}) }));vi.mock("../../../../../apps/api/src/utils/assert-public-destination", () => ({assertPublicDestination: vi.fn(async () => {}),diff --git a/tests/api/utils/assert-public-destination.test.ts b/tests/api/utils/assert-public-destination.test.tsindex f92cc1104..7f396b4d3 100644--- a/tests/api/utils/assert-public-destination.test.ts+++ b/tests/api/utils/assert-public-destination.test.ts@@ -34,4 +34,29 @@ describe("isDisallowedAddress", () => {expect(isDisallowedAddress("93.184.216.34")).toBe(false);expect(isDisallowedAddress("example.com")).toBe(false);});++ it.each([+ "0:0:0:0:0:0:0:1",+ "0:0:0:0:0:ffff:7f00:1",+ "2002:c0a8:0101::1",+ "64:ff9b::c0a8:101",+ "64:ff9b::192.168.1.1",+ "::c0a8:101",+ "::ffff:0:c0a8:101",+ "2001:0000:4136:e378:8000:63bf:f5ff:fffe",+ "64:ff9b:1::808:808",+ ])("blocks non-public IPv6 transition destinations: %s", (address) => {+ expect(isDisallowedAddress(address)).toBe(true);+ });++ it.each([+ "2606:4700:4700::1111",+ "2002:0808:0808::1",+ "64:ff9b::808:808",+ "::ffff:808:808",+ "::808:808",+ "2001:0:808:808:0:0:f7f7:f7f7",+ ])("preserves public IPv6 and transition destinations: %s", (address) => {+ expect(isDisallowedAddress(address)).toBe(false);+ });});diff --git a/tests/api/utils/authorize-asset-access.test.ts b/tests/api/utils/authorize-asset-access.test.tsindex dd7d023fa..7c51cd40c 100644--- a/tests/api/utils/authorize-asset-access.test.ts+++ b/tests/api/utils/authorize-asset-access.test.ts@@ -8,9 +8,14 @@ const { state } = vi.hoisted(() => ({validateCalls: [] as { userId: string; workspaceId: string }[],caller: "anonymous" as "anonymous" | "member" | "outsider",restrictedProjects: new Set<string>(),+ canRead: true,},}));+vi.mock("../../../apps/api/src/utils/workspace-permission-grants", () => ({+ workspacePermissionGrants: async () => ({ allows: () => state.canRead }),+}));+vi.mock("../../../apps/api/src/project-access/assert-project-access", () => ({assertProjectAccess: async (_userId: string, projectId: string) => {if (state.restrictedProjects.has(projectId)) {@@ -69,6 +74,7 @@ describe("authorizeAssetAccess", () => {state.validateCalls = [];state.caller = "anonymous";state.restrictedProjects = new Set();+ state.canRead = true;});it("allows an anonymous caller to read an asset of a public project", async () => {@@ -132,6 +138,20 @@ describe("authorizeAssetAccess", () => {{ userId: "user-member", workspaceId: "workspace-1" },]);});+ it("rejects a member whose current read grant has been removed", async () => {+ state.caller = "member";+ state.canRead = false;+ expect(+ await statusOf(+ authorizeAssetAccess(context, {+ workspaceId: "workspace-1",+ projectId: "project-1",+ surface: "comment",+ isPublic: false,+ }),+ ),+ ).toBe(403);+ });it.each(["comment", "unknown"])("keeps %s assets private even in a public project",async (surface) => {diff --git a/tests/api/utils/credential-webhooks.test.ts b/tests/api/utils/credential-webhooks.test.tsnew file mode 100644index 000000000..e0a494613--- /dev/null+++ b/tests/api/utils/credential-webhooks.test.ts@@ -0,0 +1,78 @@+import { afterEach, describe, expect, it, vi } from "vite-plus/test";+import { postToDiscord } from "../../../apps/api/src/plugins/discord/client";+import { postToSlack } from "../../../apps/api/src/plugins/slack/client";+import { isSensitiveOutboundRequest } from "../../../apps/api/src/utils/sensitive-outbound";++afterEach(() => vi.unstubAllGlobals());++const clients = [+ {+ name: "Discord",+ send: (url: string) => postToDiscord(url, { content: "message" }),+ payload: { content: "message" },+ },+ {+ name: "Slack",+ send: (url: string) => postToSlack(url, { text: "message" }),+ payload: { text: "message" },+ },+];++describe.each(clients)(+ "$name credential-bearing delivery",+ ({ send, payload }) => {+ it("sends JSON with telemetry excluded and redirects disabled", async () => {+ const response = new Response("{}", { status: 200 });+ const cancel = vi.spyOn(response.body!, "cancel");+ const fetch = vi.fn(async (_url: unknown, init?: RequestInit) => {+ expect(isSensitiveOutboundRequest()).toBe(true);+ expect(init).toMatchObject({+ method: "POST",+ redirect: "error",+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify(payload),+ });+ return response;+ });+ vi.stubGlobal("fetch", fetch);+ await send("https://service.example/webhooks/SECRET");+ expect(fetch).toHaveBeenCalledOnce();+ expect(cancel).toHaveBeenCalledOnce();+ expect(isSensitiveOutboundRequest()).toBe(false);+ });++ it.each([302, 503])(+ "omits upstream response text for HTTP %s",+ async (status) => {+ const response = new Response("UPSTREAM_SECRET", { status });+ const read = vi.spyOn(response, "text");+ vi.stubGlobal("fetch", vi.fn().mockResolvedValue(response));+ await expect(+ send("https://service.example/webhooks/SECRET"),+ ).rejects.toThrow(`Outbound request failed: http (HTTP ${status})`);+ expect(read).not.toHaveBeenCalled();+ },+ );++ it("discards secret-bearing network errors and their causes", async () => {+ vi.stubGlobal(+ "fetch",+ vi.fn().mockRejectedValue(+ new Error("https://service.example/webhooks/SECRET", {+ cause: new Error("CAUSE_SECRET"),+ }),+ ),+ );+ const error = await send("https://service.example/webhooks/SECRET").catch(+ (failure: unknown) => failure,+ );+ expect(error).toBeInstanceOf(Error);+ expect(error).toHaveProperty(+ "message",+ "Outbound request failed: network",+ );+ expect(error).not.toHaveProperty("cause");+ expect(String(error)).not.toContain("SECRET");+ });+ },+);diff --git a/tests/api/utils/sensitive-outbound.test.ts b/tests/api/utils/sensitive-outbound.test.tsindex 3dbe038f0..80f3f5af6 100644--- a/tests/api/utils/sensitive-outbound.test.ts+++ b/tests/api/utils/sensitive-outbound.test.ts@@ -66,10 +66,14 @@ it("keeps credentials out of actual Sentry events, breadcrumbs and spans while rconst Sentry = await import('@sentry/node');const { sendOutboundRequest } = await import('./src/utils/outbound-request.ts');const { withoutOutboundTelemetry } = await import('./src/utils/sensitive-outbound.ts');+ const { postToDiscord } = await import('./src/plugins/discord/client.ts');+ const { postToSlack } = await import('./src/plugins/slack/client.ts');const http = await import('node:http');const base = process.env.TELEMETRY_TEST_BASE;await Sentry.startSpan({ name: 'notification-test', op: 'test' }, async () => {await sendOutboundRequest(base + '/bot/FETCH_SECRET/sendMessage?token=QUERY_SECRET', { body: 'BODY_SECRET', headers: { Authorization: 'Bearer HEADER_SECRET' } });+ await postToDiscord(base + '/webhooks/DISCORD_SECRET', { content: 'DISCORD_BODY_SECRET' });+ await postToSlack(base + '/services/SLACK_SECRET', { text: 'SLACK_BODY_SECRET' });try { await sendOutboundRequest(base + '/failure/FAILURE_SECRET', {}); }catch (error) { Sentry.captureException(error); }await withoutOutboundTelemetry(() => new Promise((resolve, reject) => {@@ -93,7 +97,7 @@ it("keeps credentials out of actual Sentry events, breadcrumbs and spans while rtimeout: 20000,},);- expect(paths).toHaveLength(4);+ expect(paths).toHaveLength(6);const telemetry = envelopes.join("\n");expect(telemetry).toContain("safe-delivery-probe");expect(telemetry).toContain("ordinary-http-marker");@@ -105,6 +109,10 @@ it("keeps credentials out of actual Sentry events, breadcrumbs and spans while r"HEADER_SECRET","FAILURE_SECRET","HTTP_SECRET",+ "DISCORD_SECRET",+ "DISCORD_BODY_SECRET",+ "SLACK_SECRET",+ "SLACK_BODY_SECRET",])expect(telemetry).not.toContain(secret);} finally {diff --git a/tests/api/utils/workspace-permission-grants.test.ts b/tests/api/utils/workspace-permission-grants.test.tsnew file mode 100644index 000000000..fe1ce785c--- /dev/null+++ b/tests/api/utils/workspace-permission-grants.test.ts@@ -0,0 +1,113 @@+import { beforeEach, describe, expect, it, vi } from "vite-plus/test";++const { state, select } = vi.hoisted(() => {+ const state = { rows: new Map<object, unknown[]>() };+ return {+ state,+ select: vi.fn(() => ({+ from: (table: object) => ({+ where: () => {+ const result = Promise.resolve(state.rows.get(table) ?? []);+ return Object.assign(result, { limit: () => result });+ },+ }),+ })),+ };+});+vi.mock("../../../apps/api/src/database", async () => ({+ default: { select },+ schema: await import("../../../apps/api/src/database/schema"),+}));++import * as schema from "../../../apps/api/src/database/schema";+import { workspacePermissionGrants } from "../../../apps/api/src/utils/workspace-permission-grants";++beforeEach(() => {+ state.rows.clear();+ select.mockClear();+ state.rows.set(schema.userTable, [{ role: "user" }]);+});++describe("batched workspace permission grants", () => {+ it("keeps identically named role grants separate without querying per check", async () => {+ state.rows.set(schema.workspaceUserTable, [+ { workspaceId: "readable", role: "limited" },+ { workspaceId: "hidden", role: "limited" },+ { workspaceId: "fallback", role: "viewer" },+ { workspaceId: "overridden", role: "viewer" },+ { workspaceId: "multiple", role: "limited, reader" },+ ]);+ state.rows.set(schema.workspaceRoleTable, [+ {+ workspaceId: "readable",+ role: "limited",+ permission: '{"task":["read"]}',+ },+ { workspaceId: "hidden", role: "limited", permission: "{}" },+ { workspaceId: "overridden", role: "viewer", permission: "{}" },+ { workspaceId: "multiple", role: "limited", permission: "{}" },+ {+ workspaceId: "multiple",+ role: "reader",+ permission: '{"task":["read"]}',+ },+ ]);+ const grants = await workspacePermissionGrants("user", {+ apiKeyPermissions: null,+ });+ for (let index = 0; index < 100; index++) {+ for (const workspace of ["readable", "fallback", "multiple"]) {+ expect(grants.allows(workspace, { task: ["read"] })).toBe(true);+ }+ for (const workspace of ["hidden", "overridden", "missing"]) {+ expect(grants.allows(workspace, { task: ["read"] })).toBe(false);+ }+ }+ expect(select).toHaveBeenCalledTimes(3);+ });++ it("applies key scope even to an instance administrator", async () => {+ state.rows.set(schema.userTable, [{ role: "admin" }]);+ const grants = await workspacePermissionGrants("user", {+ apiKeyPermissions: { label: ["read"] },+ });+ expect(grants.allows("any-workspace", { task: ["read"] })).toBe(false);+ expect(grants.allows("any-workspace", { label: ["read"] })).toBe(true);+ const emptyScope = await workspacePermissionGrants("user", {+ apiKeyPermissions: {},+ });+ expect(emptyScope.allows("any-workspace", { task: ["read"] })).toBe(false);+ });++ it("reloads role changes for the next request and denies a missing user", async () => {+ state.rows.set(schema.workspaceUserTable, [+ { workspaceId: "workspace", role: "limited" },+ ]);+ state.rows.set(schema.workspaceRoleTable, [+ {+ workspaceId: "workspace",+ role: "limited",+ permission: '{"task":["read"]}',+ },+ ]);+ expect(+ (await workspacePermissionGrants("user")).allows("workspace", {+ task: ["read"],+ }),+ ).toBe(true);+ state.rows.set(schema.workspaceRoleTable, [+ { workspaceId: "workspace", role: "limited", permission: "{}" },+ ]);+ expect(+ (await workspacePermissionGrants("user")).allows("workspace", {+ task: ["read"],+ }),+ ).toBe(false);+ state.rows.set(schema.userTable, []);+ expect(+ (await workspacePermissionGrants("user")).allows("workspace", {+ task: ["read"],+ }),+ ).toBe(false);+ });+});diff --git a/tests/api/ws/broadcast.test.ts b/tests/api/ws/broadcast.test.tsindex 5721f86ab..e1155a0ab 100644--- a/tests/api/ws/broadcast.test.ts+++ b/tests/api/ws/broadcast.test.ts@@ -294,3 +294,17 @@ vi.mock("../../../apps/api/src/database", () => ({}),},}));++vi.mock("../../../apps/api/src/ws/project-read-access", () => ({+ getProjectReadAccess: async (+ _workspaceId: string,+ recipients: Array<{ userId: string; apiKeyId?: string }>,+ ) => ({+ readers: new Set(recipients.map((conn) => conn.userId)),+ apiKeys: new Map(+ recipients.flatMap((conn) =>+ conn.apiKeyId ? [[conn.apiKeyId, conn.userId] as const] : [],+ ),+ ),+ }),+}));diff --git a/tests/api/ws/label-deletion-backpressure.test.ts b/tests/api/ws/label-deletion-backpressure.test.tsindex 14917432d..be7cddc49 100644--- a/tests/api/ws/label-deletion-backpressure.test.ts+++ b/tests/api/ws/label-deletion-backpressure.test.ts@@ -145,3 +145,17 @@ vi.mock("../../../apps/api/src/database", () => ({}),},}));++vi.mock("../../../apps/api/src/ws/project-read-access", () => ({+ getProjectReadAccess: async (+ _workspaceId: string,+ recipients: Array<{ userId: string; apiKeyId?: string }>,+ ) => ({+ readers: new Set(recipients.map((conn) => conn.userId)),+ apiKeys: new Map(+ recipients.flatMap((conn) =>+ conn.apiKeyId ? [[conn.apiKeyId, conn.userId] as const] : [],+ ),+ ),+ }),+}));diff --git a/tests/api/ws/project-move.test.ts b/tests/api/ws/project-move.test.tsindex 26ee49c37..f5f4ee474 100644--- a/tests/api/ws/project-move.test.ts+++ b/tests/api/ws/project-move.test.ts@@ -1,4 +1,5 @@import type { WSContext } from "hono/ws";+import { workspaceUserTable } from "../../../apps/api/src/database/schema";import {afterEach,beforeEach,@@ -46,7 +47,7 @@ vi.mock("../../../apps/api/src/database", () => ({select: (fields: Record<string, unknown>) => ({from: () => ({where: () =>- fields.role+ fields.role && fields.userId !== workspaceUserTable.userId? m.admins(): fields.userId? m.members()@@ -623,3 +624,17 @@ it("revokes all remote subscriptions on a deleted-user Redis message", async ());expect(ws.close).toHaveBeenCalledWith(1008, "User access revoked");});++vi.mock("../../../apps/api/src/ws/project-read-access", () => ({+ getProjectReadAccess: async (+ _workspaceId: string,+ recipients: Array<{ userId: string; apiKeyId?: string }>,+ ) => ({+ readers: new Set(recipients.map((conn) => conn.userId)),+ apiKeys: new Map(+ recipients.flatMap((conn) =>+ conn.apiKeyId ? [[conn.apiKeyId, conn.userId] as const] : [],+ ),+ ),+ }),+}));diff --git a/tests/api/ws/reorder-delivery.test.ts b/tests/api/ws/reorder-delivery.test.tsindex 27b0b2080..d0bb25373 100644--- a/tests/api/ws/reorder-delivery.test.ts+++ b/tests/api/ws/reorder-delivery.test.ts@@ -70,3 +70,17 @@ it.each([1, 2])(}},);++vi.mock("../../../apps/api/src/ws/project-read-access", () => ({+ getProjectReadAccess: async (+ _workspaceId: string,+ recipients: Array<{ userId: string; apiKeyId?: string }>,+ ) => ({+ readers: new Set(recipients.map((conn) => conn.userId)),+ apiKeys: new Map(+ recipients.flatMap((conn) =>+ conn.apiKeyId ? [[conn.apiKeyId, conn.userId] as const] : [],+ ),+ ),+ }),+}));diff --git a/tests/e2e/README.md b/tests/e2e/README.mdindex f2e3b2a70..a37702f08 100644--- a/tests/e2e/README.md+++ b/tests/e2e/README.md@@ -26,6 +26,21 @@ its temporary database is discarded. The stack's project name isReports, failure screenshots, and local Playwright traces are stored in `.cache/e2e/`.BrowserStack disables native Playwright tracing; use its session recordings for cloud runs.+## Dependency security checks++Run the isolated dependency regressions without browsers, Docker, cloud accounts,+or Kaneo services:++```sh+pnpm --dir tests/e2e test:security+```++These tests exercise the installed BrowserStack dependency graph: cache-policy+reuse and revalidation, redirect credential stripping, and FTP listing parsing.+They run separately from Playwright discovery. This workspace carries a local+cache-policy patch and an FTP dependency override; see+[the patch notes](patches/README.md) before updating either dependency.+## BrowserStack AutomateSet `BROWSERSTACK_USERNAME` and `BROWSERSTACK_ACCESS_KEY` in your shell's environmentdiff --git a/tests/e2e/package.json b/tests/e2e/package.jsonindex c55f41daa..33b768377 100644--- a/tests/e2e/package.json+++ b/tests/e2e/package.json@@ -5,10 +5,11 @@"packageManager": "[email protected]","scripts": {"test": "playwright test",- "test:browserstack": "browserstack-node-sdk playwright test"+ "test:browserstack": "browserstack-node-sdk playwright test",+ "test:security": "node --test --test-concurrency=1 security/*.test.mjs"},"devDependencies": {"@playwright/test": "1.62.1",- "browserstack-node-sdk": "1.74.0"+ "browserstack-node-sdk": "1.75.0"}}diff --git a/tests/e2e/patches/README.md b/tests/e2e/patches/README.mdnew file mode 100644index 000000000..1627df7f3--- /dev/null+++ b/tests/e2e/patches/README.md@@ -0,0 +1,47 @@+# BrowserStack dependency hardening++This independent workspace keeps BrowserStack available while protecting its+transitive HTTP clients. Production packages do not consume these dependencies.++## http-cache-semantics 4.3.0++[GHSA-ch52-4w7c-c8xp](https://github.com/advisories/GHSA-ch52-4w7c-c8xp)+lists affected versions through 4.2.0 and no patched version. The official npm+4.3.0 release still permits the reported stale-cookie reuse. A version-only+upgrade therefore does not establish that the behavior is fixed.++The checked-in pnpm patch requires `public` to store shared cookie responses.+Neither `immutable`, `s-maxage`, nor `must-revalidate` enables cookie sharing.+Authorization keeps the library's separate sharing rules. This is a+local hardening policy: RFC 9111 section 7.3 allows caching Set-Cookie responses,+and the upstream maintainer disputes the advisory in+[issue 56](https://github.com/kornelski/http-cache-semantics/issues/56).++The patch checks storage eligibility before reuse, including serialized entries,+and applies response revalidation requirements to `max-stale`,+`stale-while-revalidate`, and `stale-if-error`. It retains fresh responses with+explicit public cookie-sharing permission and private-cache behavior. Revalidation preserves+new response restrictions and cookies from 304 headers; an ineligible or+mismatched response cannot authorize replay of an old body. An invalid 304 now+fails closed and may require an unconditional retry by the caller.++Both installed consumers (got 11/cacheable-request 7 and got 12/cacheable-request+10) receive the same patch. Got disables caching by default, so dependency+presence alone does not establish a reachable shared cache in the BrowserStack+SDK. Tests deliberately enable or exercise cache policies using synthetic data.++Compare future releases against the+[upstream 4.3.0 source](https://github.com/kornelski/http-cache-semantics/blob/b1d4bd682fbab0252985de45219f4e7497c0067c/index.js)+and run `pnpm test:security` before removing or rebasing the patch. Do not remove+it solely because an advisory's version range no longer matches.++## basic-ftp 6.2.3++`get-uri` still declares basic-ftp 5.x, which is affected by the Unix listing+parser denial of service in+[GHSA-c475-qrg2-pj4r](https://github.com/advisories/GHSA-c475-qrg2-pj4r).+The workspace overrides only `get-uri>basic-ftp` to the official 6.2.3 release.+The CommonJS exports and Client methods consumed by get-uri remain available;+the regression test verifies them and processes the pathological listing in a+bounded child process. Remove this override once get-uri requests a fixed+version and the lockfile resolves it without the override.diff --git a/tests/e2e/patches/[email protected] b/tests/e2e/patches/[email protected]new file mode 100644index 000000000..045b244d7--- /dev/null+++ b/tests/e2e/patches/[email protected]@@ -0,0 +1,163 @@+diff --git a/index.js b/index.js+index 56c26025074cbcf218e3ec4d810662da93f8024e..84d5581906268edf44d4f1469be5c276f67f1605 100644+--- a/index.js++++ b/index.js+@@ -278,6 +278,10 @@ module.exports = class CachePolicy {+ !this._rescc['no-store'] &&+ // the "private" response directive does not appear in the response, if the cache is shared, and+ (!this._isShared || !this._rescc.private) &&++ // Local hardening: shared cookie responses require an explicit public directive.++ (!this._isShared ||++ !this._resHeaders['set-cookie'] ||++ this._rescc.public) &&+ // the Authorization header field does not appear in the request, if the cache is shared,+ (!this._isShared ||+ this._noAuthorization ||+@@ -395,8 +399,7 @@ module.exports = class CachePolicy {+ evaluateRequest(req) {+ this._assertRequestHasHeaders(req);++- // In all circumstances, a cache MUST NOT ignore the must-revalidate directive+- if (this._rescc['must-revalidate']) {++ if (!this.storable() || this._rescc['no-cache']) {+ return this._evaluateRequestMissResult(req);+ }++@@ -424,6 +427,9 @@ module.exports = class CachePolicy {+ // the stored response is either:+ // fresh, or allowed to be served stale+ if (this.stale()) {++ if (!this._allowsStale()) {++ return this._evaluateRequestMissResult(req);++ }+ // If a value is present, then the client is willing to accept a response that has+ // exceeded its freshness lifetime by no more than the specified number of seconds+ const allowsStaleWithoutRevalidation = 'max-stale' in requestCC &&+@@ -624,25 +630,11 @@ module.exports = class CachePolicy {+ return 0;+ }++- // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default+- // so this implementation requires explicit opt-in via public header+- if (+- this._isShared &&+- (this._resHeaders['set-cookie'] &&+- !this._rescc.public &&+- !this._rescc.immutable)+- ) {+- return 0;+- }+-+ if (this._resHeaders.vary === '*') {+ return 0;+ }++ if (this._isShared) {+- if (this._rescc['proxy-revalidate']) {+- return 0;+- }+ // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field.+ if (this._rescc['s-maxage']) {+ return toNumberOrZero(this._rescc['s-maxage']);+@@ -702,11 +694,17 @@ module.exports = class CachePolicy {+ return this.maxAge() <= this.age();+ }++- /**+- * @returns {boolean} `true` if `stale-if-error` condition allows use of a stale response.+- */++ // Client stale directives and extensions cannot bypass response reuse restrictions.++ _allowsStale() {++ return this.storable() &&++ !this._rescc['no-cache'] &&++ !this._rescc['must-revalidate'] &&++ !(this._isShared &&++ (this._rescc['proxy-revalidate'] || 's-maxage' in this._rescc));++ }+++ _useStaleIfError() {+- return this.maxAge() + toNumberOrZero(this._rescc['stale-if-error']) > this.age();++ return this._allowsStale() && this.maxAge() + toNumberOrZero(this._rescc['stale-if-error']) > this.age();+ }++ /** See `evaluateRequest()` for a more complete solution+@@ -714,7 +712,7 @@ module.exports = class CachePolicy {+ */+ useStaleWhileRevalidate() {+ const swr = toNumberOrZero(this._rescc['stale-while-revalidate']);+- return swr > 0 && this.maxAge() + swr > this.age();++ return this._allowsStale() && swr > 0 && this.maxAge() + swr > this.age();+ }++ /**+@@ -855,7 +853,28 @@ module.exports = class CachePolicy {+ revalidatedPolicy(request, response) {+ this._assertRequestHasHeaders(request);++- if (this._useStaleIfError() && isErrorResponse(response)) {++ const optionsCopy = {++ shared: this._isShared,++ cacheHeuristic: this._cacheHeuristic,++ immutableMinTimeToLive: this._immutableMinTtl,++ ignoreCargoCult: this._ignoreCargoCult,++ };++++ // Also reject old serialized entries and responses selected for a different request.++ if (!this.storable() || !this._requestMatches(request, true)) {++ if (!response || !response.headers) {++ throw Error('Response headers missing');++ }++ return {++ policy: new this.constructor(request, response, optionsCopy),++ modified: true,++ matches: false,++ };++ }++++ if (!parseCacheControl(request.headers['cache-control'])['no-cache'] &&++ !/no-cache/.test(request.headers.pragma) &&++ this._useStaleIfError() && isErrorResponse(response)) {+ return {+ policy: this,+ modified: false,+@@ -909,32 +928,23 @@ module.exports = class CachePolicy {+ }+ }++- const optionsCopy = {+- shared: this._isShared,+- cacheHeuristic: this._cacheHeuristic,+- immutableMinTimeToLive: this._immutableMinTtl,+- ignoreCargoCult: this._ignoreCargoCult,+- };+-+ if (!matches) {+ return {+ policy: new this.constructor(request, response, optionsCopy),+- // Client receiving 304 without body, even if it's invalid/mismatched has no option+- // but to reuse a cached body. We don't have a good way to tell clients to do+- // error recovery in such case.+- modified: response.status != 304,++ // Consumers use modified to decide whether to replay the old body.++ // An invalid 304 must not authorize replay of an unrelated representation.++ modified: true,+ matches: false,+ };+ }++ // use other header fields provided in the 304 (Not Modified) response to replace all instances+ // of the corresponding header fields in the stored response.+- const headers = {};+- for (const k in this._resHeaders) {+- headers[k] =+- k in response.headers && !excludedFromRevalidationUpdate[k]+- ? response.headers[k]+- : this._resHeaders[k];++ const headers = { ...this._resHeaders };++ for (const k of Object.keys(response.headers)) {++ if (!Object.prototype.hasOwnProperty.call(excludedFromRevalidationUpdate, k)) {++ headers[k] = response.headers[k];++ }+ }++ const newResponse = Object.assign({}, response, {diff --git a/tests/e2e/pnpm-lock.yaml b/tests/e2e/pnpm-lock.yamlindex 860017a58..8c551ed14 100644--- a/tests/e2e/pnpm-lock.yaml+++ b/tests/e2e/pnpm-lock.yaml@@ -4,6 +4,14 @@ settings:autoInstallPeers: trueexcludeLinksFromLockfile: false+overrides:+ get-uri>basic-ftp: 6.2.3++patchedDependencies:+ hash: 10f814373e15493e8a475041e5ecf67775717842648b0879b8c6c26055cfcfe9+ path: patches/[email protected]+importers:.:@@ -12,77 +20,77 @@ importers:specifier: 1.62.1version: 1.62.1browserstack-node-sdk:- specifier: 1.74.0- version: 1.74.0+ specifier: 1.75.0+ version: 1.75.0packages:- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-CGznePoL+1oWCSzqmkvlYMpWQEZohPR3LntjKXXfVH+oh6Kd8d+yHLkjpiAGwPIHAxFe4OAq3aKfRnv/wqWIyA==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-6erto9nK2OZO/woEgmFIaPh5gChgdNd7nL6jgAf8TAXz3/QHC8Pan2TFe9GYp3IxOIKCCGWPylSjtOHKfNzQlw==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-hUTlnyRRGlVdfvJLL3hCEnMm7CmunSzc/lxFVRX8g1fjJTMUVbyQCfhfMhp7dZ7JBftLU6OYresu3Hje4nvkJw==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-Z2PqQqKMDVX56tNZ6ggmjoI5o/8+4+8ArmjLwE5ktYsEzs1BrvklBT1ZzI+s0Vcf3wfPguoEMD7EkMswmEta/A==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-QiaJV4/zDrB4ZY2mfeSXSzSTc36W16sZXcGz+SPFk0CJ26gziO0cS+4LjJUMAbdeeBOvS0k0Aq1cZpfGdUXxSw==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-ruI0AWqcrfL20XDS6SwZIJFPOBZ6N0ADa9nLzWlBhxk1aoUjbUX3JkTR9vEmk7o35XpAHi68ahZ4T6RE2U9XyA==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-rcIpk5kxUqDaaNa6Xk23pQ6ViY7jlqzmfFWCahQcBT97ddXaXYYwzCen9Tz1Jvo6aJft6wDl5bN44/Jw5B4oLA==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-YxmL1Ar7bV9ZkJvtv+lj+MF6le76NnZnbmgySyZuxpZaCv0/1lZ3KxKy6RIj1h9ui2hWnVjZxbmTMeO0y/NrQA==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-nggwJtZ4eeNsUw5IeWBMXsi1ryct5idi0K+/SCRF3kybLubOMaNTb3XCihXpWMiVpyzyPeIrl0zTkzhBH9porA==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-3VHknDRngoebsaqyT1iR75b5cBT2zfEtODK6yYmYltljkK1HEAQLs2FEd1IpWqAeOYdMGaG9wikngWLTufY7RA==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-pNEf/OeyN5X3VmLKlgSO6TqaWmW10CvI3TfwL1XhsuhYjSLT2VDaxFnCPHnOeQXSaFisMX4jNhpETriqN8DOmg==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-aLx9hbCX6mGAyv4ZZd8UagJ4RASHVJw6BFDSIyuKmLkqNL6H47EjBPK6qaJ4B5TDV6mc+vMa0SJFYyo4mkvVQg==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-0AQfDcf99TNmqVKv0owHrw/TQs6i4ZE5t9qmz6NvO53bE/sA/tpXhXL9AAcEP1qHc6Zzjd1UMb69+/9zdhvY3g==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-9bJU6FjRacF4FK/QHf8Dyxhur7B1grRj8C1Yh4IkpoFW2exQflPdCv0VrbemLW9ZctLNle+AE7TETs9KNvuLYg==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-OgPAnfvbGAMWac6yvxJ1ihslrvDpPVwR68D2csospdNCCyPvHk9JLzYKwz48SNiS1T2znDwHauywRKRFfpyYng==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-AG0KID5qhQPzrFkh5b0Cws1Amytvzo0L0Xj6hMgJXEwD6ZXAqninDhSNAWJiN5zU4YVVZnuidnqwPwYJ04IamA==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-IlUEejorGTWKb4/Dm7K5Yw4QxUmXLThLhrvBmzVBqZFTbW72cv9LTcITmo1dsnYriALE4h68mOq4LB99x6sQ7Q==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-pdhKFTXv1zPYhh92MTlp0jVbLWvUEV9v+rziuEkoskGGQ2iJskxHTO38nA8UAbT/N4IM3n8OZJ9rIY5IBO15/A==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-gAQBkBZxUB84d71+pPcI9L+jh2ujhuAVxc/4FgGiWFDjkPBlMKxzd5XDtkSXTFX8Ro7ansnT88+XadasxMeCRw==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-DlxrAB3MnjNLx/da7b89W+3DyJQYso/q7Ns15MsST2IV2nkAYQOYTUCaffNSjgrpMP99Dm2mV2jxzcbyF94ZfA==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-SnlEmQa6SjOgs6iOPLUQl1Eyq4AKiAdPQlkOhFhqNfDtDCwibMGvL6QlkSmf3o6vAUSImzdPCxowT5dfQUZP1A==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-LUo46IqPTJ4xKBsrLuoaxiv/D2GTBCcFDMD1y3jKIqPR/p7Rw14RJFZ0iRWftqZtyLPQX9JMGnSi3mBu4y/pNA==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-lSAoVPvQxX1d8TOM6waKDBQrvvZcm4w6pCldFAsRUffEaXq6lYY0pPyew3KlLu6Xqb74DXI42hGvSsbGBLljlw==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-jfanv1pV0sJFZw6/DPiNjvK7B478god0zOum5yIWo+/+1Gy+CSXWpGBWx+3nBJyDvjcu/2kUMr4ADUp9BHH34Q==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-RDHqPGQWlF6tatA/Tp3rg6oIwtgN9IVderxE+9av2Y93Dfyu+mO1hZ5Bu2jpfZg2rwdNbsssnwM+sLafIczMlQ==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-nKb8qu4QsnpZTq/6JIXc72mzuzfh7BK4sUQkpQznPec2z4W7Ob2xYkcM4i5e1yGTBnbJVeFv/0sf3jcz85hclA==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-lKekx8bLBXSv4O+cslk9Zfnw2XKSkWBs3uWL5QGhH2ZAQfNS7FE0vcSSN2vD/AhxX54ZTywWxR4STThoeOXlBA==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-nvuAZNRrRRVCiARRKsYlQ0VnXiEQiq7vXPH+UA+LSo+kN3Djl9eo/V2r0udkw85PnsNshmv2Em1clld5M3j67w==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-N4wy26MNn31ItGVHYHPrEuCIFY4MBBjC+C5v1lJKqIUSA7OZBdhleCY53zCCrXn27hsk7YNOaTuhQu807S4AfQ==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-iIcQnYLhWuq9qOLQbIWFrxF3PF0svVeZvHnUS4DUnO4zUFmFHIyGyjqrntXG+e/5PUgfavV0pYfDIKHxTzN2LA==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-3W6IUtSxFbH6X7Wb7DzGCV5QiFQsd0g8bOfntpmDxQlzBoKWUMBu/JPQR0DwkE+Hpnxd6db1tXbOwdeHddG6cA==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw==}engines: {node: '>=20.0.0'}- '@aws-sdk/[email protected]':- resolution: {integrity: sha512-zKq4HQum8JwDyEuyfuI4bbiAcU0KxP6qy+9PR/IsR92IyE/DaBAikzAS50tjxip4bqIIANpCcG+Yyj6CVhXupg==}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-ctjVSyCMegrWfXlx6VqzSBFI6UqmQ5ZlnfMhdLIiWmhoH8UAQxSCP5N3OpG7X3k4LnS7ou74C4mt20+bfTW2aQ==}engines: {node: '>=20.0.0'}'@aws/[email protected]':@@ -112,8 +120,8 @@ packages:resolution: {integrity: sha512-XhPssP6gE3adY+AEDq+y3WEz1gsoV1AtKY+oJsrMJAj4G212eLStInXKrLZwE9alxThG+H4ML8rJiqzRKnjBxQ==}engines: {node: '>=18'}- '@grpc/[email protected]':- resolution: {integrity: sha512-7VZM+SVdEcUUqSQeNI3zM8Qs/BhQKZndPo2h5VkYkAM8Iz0wJIa8mKV5ekQGqG8UUsnkQ0NMxIxwkIHYvj0qOw==}+ '@grpc/[email protected]':+ resolution: {integrity: sha512-SgC/B3/VZ8lTyOZ4Cwk6f1skWhmkNAaVfiX90qd5u1rRXGKk1//8FTUEN9GvOUq7rfWIqAYkA3CoyumYVpOS6g==}engines: {node: '>=12.10.0'}'@grpc/[email protected]':@@ -138,14 +146,14 @@ packages:'@js-sdsl/[email protected]':resolution: {integrity: sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==}- '@jsep-plugin/[email protected]':- resolution: {integrity: sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==}+ '@jsep-plugin/[email protected]':+ resolution: {integrity: sha512-nw2Px23Eirx0PFTVoPrb3FEq9Wkmg6vxcDtt38MtBCf1G0tjLCB9cK+3seOXyiw+6+aalgYhvJabQbWwMVKlEQ==}engines: {node: '>= 10.16.0'}peerDependencies:jsep: ^0.4.0||^1.0.0- '@jsep-plugin/[email protected]':- resolution: {integrity: sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==}+ '@jsep-plugin/[email protected]':+ resolution: {integrity: sha512-2Vkbda+XRjK6VTI6Lrh0sNBuMT8mZ51EhqMvO+V2rSdmqjs7NAGssxPZfkL23EFzYfSrvxyd1ZjOdqPQMM50og==}engines: {node: '>= 10.16.0'}peerDependencies:jsep: ^0.4.0||^1.0.0@@ -166,8 +174,8 @@ packages:resolution: {integrity: sha512-XVigKgAcXEerIch3Ufngac07gOH4KnfTDp/xyPujDyjvAZSWfIyIRnojmfbLEs2HnZEnmFFoEMX6ZB4Tk0SO/Q==}engines: {node: '>=14'}- '@percy/[email protected]':- resolution: {integrity: sha512-B30TcM4rkCIXFmJs7a+2f9IBRC2eSqlNbZYND8nPpcsLXk4x027PJoZSFGZ2KI7kPGfNAJC39t785VK0s2ZugQ==}+ '@percy/[email protected]':+ resolution: {integrity: sha512-UhbFtLe+xs6k+FnQO6w4JCBgr7rY8U8suxzKqfZ9fnXizQXfSVQqxkm+F/4oWjSAMN9arDWTVCh5D3PNe5Impw==}engines: {node: '>=14'}'@percy/[email protected]':@@ -240,28 +248,28 @@ packages:resolution: {integrity: sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==}engines: {node: '>=14.16'}- '@smithy/[email protected]':- resolution: {integrity: sha512-CyogUINxvi7C7LDsh8Syo6hVJOT9ckz4rG8dRZfTJ8r91HkMY59PnNooaj7WcHyxEkxPfBAmbgztZU+xTo76lg==}+ '@smithy/[email protected]':+ resolution: {integrity: sha512-oRw0rB9QSUiCZfEs23G5F4Af+b2rQt1lItIICWu5IejFNd+uPM8SWqiKLMpQ6bX1Q7slsLbjuoE2niErFtkVPQ==}engines: {node: '>=18.0.0'}- '@smithy/[email protected]':- resolution: {integrity: sha512-QfuLWAkLzptffFW980AFeHZFdqds2B64rpEd3uJ6lgs3xVn9QegGMUgUcj+4d7dRrAsya3r58ZKpku97WcFb4w==}+ '@smithy/[email protected]':+ resolution: {integrity: sha512-A9uSdn72ozbRUSit0eib0TW7nXuNPlaeM0zcGkJ+nE6tFcSDbnmtwoxbTCFBukVQcszDAyvsd7+rTduPTXpygg==}engines: {node: '>=18.0.0'}- '@smithy/[email protected]':- resolution: {integrity: sha512-4fW86pEUOMbrD5nkbyl/tTvPHHWJFbuB2odl6ps9lWfHoXf9HWh3Q/Smh59qH1g7+c/BSZghX6bbUk4gsiMs8A==}+ '@smithy/[email protected]':+ resolution: {integrity: sha512-ycSJu3tFAQ4v04CBB0agqFMVsSQ1iG3yw+SpgxRqKfaURpQD4CZ8Wn0zPMmSnOuTpTh65Vz+EA0rMrw089wvkA==}engines: {node: '>=18.0.0'}- '@smithy/[email protected]':- resolution: {integrity: sha512-Nmd/Nl35zfYrd+a6OO2cDJb3GPh9bgTjIUhcM+JFfjpp8/osCgboDV5nCT1I01Pv6R13eSKDKLSoVa5ZB6Zsfw==}+ '@smithy/[email protected]':+ resolution: {integrity: sha512-ThMkboGeONWXAelq9FvGsuJC4rOi+qyC4/zhUF58xYpxUg5sQKx2VXZYJmtNjr4dSuBJ1HeJXETQILCz3wOHvw==}engines: {node: '>=18.0.0'}- '@smithy/[email protected]':- resolution: {integrity: sha512-I6KLtq3H0qqSuV9vLglfi8puHqzygzWHOnI4z/Rdoo+q50vvo18vBRdPAvvEtcaKROz7Zn6qnPa14kRfPH6PcQ==}+ '@smithy/[email protected]':+ resolution: {integrity: sha512-tHy0K0VtqNd5Y7Y41h0a0Lhh0L1GzC08dTWg0F7vRJWFtTENg7IZikf3wQkanYIRdb7ngoIPMTmqgUi401fEeQ==}engines: {node: '>=18.0.0'}- '@smithy/[email protected]':- resolution: {integrity: sha512-0JFs3V2y2M9tKW5na/qxe69Zv+uxLMO7QBbhxF/FHu/Gp2NFZAAL9tWl9PU02xxo07pb3G9FTyjNc6D5uZrJIg==}+ '@smithy/[email protected]':+ resolution: {integrity: sha512-r7jh49VJxGerfAcTQA6gXcKc+98zOp/tqRwzYjgOE+iSQsP6cEU1hq2QzbuipmP68QtYdY9wKEhiCQZIzHgZ4Q==}engines: {node: '>=18.0.0'}'@so-ric/[email protected]':@@ -293,11 +301,11 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw==}- '@types/[email protected]':- resolution: {integrity: sha512-zY+5tKxXdhGh1PYI0ac+7juvEu4OI6vWtVVoj5i2m42jxAY1U+zHGt6QCyOFwykdP62sM3MJ9stoYYUw5aCWew==}+ '@types/[email protected]':+ resolution: {integrity: sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==}- '@types/[email protected]':- resolution: {integrity: sha512-Vu4a5UFA9rIIFJ7rB/Vaafh9lrCQszopTCx6KjFboXTGQbPNasehVR5TEiithSDGyd1DEiUByggTZsg8jukeIg==}+ '@types/[email protected]':+ resolution: {integrity: sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==}'@types/[email protected]':resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==}@@ -320,8 +328,8 @@ packages:resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==}engines: {node: '>= 14'}- resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==}+ resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==}resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==}@@ -330,8 +338,8 @@ packages:resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}engines: {node: '>=8'}- resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==}+ resolution: {integrity: sha512-KzTVk2tCWAHtYrvvvaP8bJKJq2pVinhLcGEQdtLIYPbmNGNyYe8QwNaTUYQp2J7/vIsUKt5QCqAfUkYyG9DkOw==}engines: {node: '>=12'}@@ -367,8 +375,8 @@ packages:resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}- resolution: {integrity: sha512-aiqre1Nr0B/6DgE2N5vwTc+2/oQZ4Wh1t4NznYY4E00y8LCt6NqdRv81so00oo27D8MVKTpUa/MwUUtBLXCoDw==}+ resolution: {integrity: sha512-dpfcF9fDNR6++cthXR67iyhgqWy9CBouAvIWhIntzBG6cvK/cnIPiZQjBwi/ZqjjBEDGfoNDtmB0kTjroOJ3pQ==}peerDependencies:react-native-b4a: '*'peerDependenciesMeta:@@ -378,28 +386,28 @@ packages:resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}- resolution: {integrity: sha512-Z0oHEHAFDZkffN8Qc39zNZjQlMDkPJRyyyZieU1VH7u8c5S+qHZ2S8ixdKIAxEjfHO7FJxXmJWgteOghVanIsg==}+ resolution: {integrity: sha512-AIPKioV7/Y/8KfZ3AAhjPJxLLbY49S64Ym5DakZlUg75qQiTgUq9hEJoEwa4eUezPUlXRy/i5NpsKvo9jgKmoA==}peerDependencies:bare-abort-controller: '*'peerDependenciesMeta:bare-abort-controller:optional: true- resolution: {integrity: sha512-y1kC+ffIx/tPLdTE693uNjHfzTfr+ravR5tvWlMXe25nELbkqV400S71qHDwbkAQ1FVEZobB1NFRzFbCCcyBCQ==}- engines: {bare: '>=1.16.0'}+ resolution: {integrity: sha512-MPC2eyrpbk3A873sK4y6rk+Iv4o2enxTjHZ8zH3HO0mjrpm5XjnguY2XmfidIsDV6vnjpbMBKUAJpV0ISD2SsQ==}+ engines: {bare: '>=1.28.0'}peerDependencies:bare-buffer: '*'peerDependenciesMeta:bare-buffer:optional: true- resolution: {integrity: sha512-JprUlveX3QjApC1cTpsUOiscADftCGVWkzitbHsRqv84hzYwYHw2mbluddsq5TvI8mH/8Ov1f4BiMAdcB0oYnQ==}+ resolution: {integrity: sha512-ZyKbsuuqK6Ag0K8pX6V5Txq6XeJRvY+wXucnFGRjiyVYP9YWDpIQugk/b+enRYrEYBJaqLzghRQpXPMR7341Nw==}- resolution: {integrity: sha512-Kc+brLqvEqGkjyfiwJmImAOqLZL7OsoLKuavx+hJjgVV3nLTOjloJyPMFxjUPerGGHrNH0fLU06jjykMLWrERQ==}+ resolution: {integrity: sha512-PcrQ8lVLbiJscNm1Kez+Yp4Gy4AHGcN1lzwjvf5NybWen7VvEgUfyfnXYJ2zNqWnzOfCb1Abq6lH8ti0syQszA==}peerDependencies:bare-abort-controller: '*'bare-buffer: '*'@@ -412,14 +420,14 @@ packages:bare-events:optional: true- resolution: {integrity: sha512-K+y9xF1tN+CdPu4qWwr0QiK1Al07eFPGYK5M2pDXcmHdMdgC/tT/bpmMe1hrmRHaidKLkXrC+cRNYf3XVDUhSQ==}+ resolution: {integrity: sha512-iM9qJCruvpt2rPaLsrumVDru9pogI7PHziHIa9kTNRFt8C8HuSa+kI9kFezK+NvHEFnnz71rKGZ1EAilq/3V/Q==}resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}- resolution: {integrity: sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==}+ resolution: {integrity: sha512-T7GYtQ2eKJUN5YORG7A8u2WfB9JMN0a4/wl3MI64qq2qTRfa3FXzoNq0DDojZDkDyStcL+TkfKsz4JHEZx5kGQ==}engines: {node: '>=10.0.0'}@@ -445,11 +453,11 @@ packages:resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==}- resolution: {integrity: sha512-eiDZ5ZRHV5MiUIFlyK5H7MB0U7xHKDMQx0fPeV8KkobAUXe65mXugaRpd49dkuFhKT7TF84ZACNWE+dVra12iQ==}+ resolution: {integrity: sha512-WExfBqEId4t0pmJqmskrdV26OUXxcWEu3ciEbPV6RWY1ZoiofoV5+vEJT7fNXqghxA7iqDiIorsegPpvuxWdOQ==}- resolution: {integrity: sha512-/qksNxFLdUwSq92QjAi/JWavm0fY3n1hIOyXbTmBYcjC/CofU3O/3yVwdXXTRPk0peMIeaCRVYcPQNABpMgATw==}+ resolution: {integrity: sha512-88sMMaJAU5tkWjxKtTQnOYoWt6NNUgsuEhRraf1Jrm+uYErryZ+s265bgeDfv0GU02g9l3x3AC59aK64jJNmEg==}hasBin: true@@ -764,8 +772,8 @@ packages:resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==}- resolution: {integrity: sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==}+ resolution: {integrity: sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==}resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==}@@ -777,8 +785,8 @@ packages:resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==}- resolution: {integrity: sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==}+ resolution: {integrity: sha512-FNvFGzoMLWmE6Yj9spb/zjd7yiNCHiAW9/Tg9CXrQ8wuu32HtlJOwWO11OJafl5FfY3DxTdQ0vj42zU1kvv5jg==}engines: {node: '>=4.0'}peerDependencies:debug: '*'@@ -888,6 +896,10 @@ packages:resolution: {integrity: sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==}engines: {node: '>=14'}+ resolution: {integrity: sha512-WE9av4wKDZgRjBwgVUabocx8T6/7o3Ca1Fat46FXDhXVAFibzNadedcOXrdgd1Kzmk8tsk/9ZH89Wyf/SqeZ3A==}+ engines: {node: '>=18'}+resolution: {integrity: sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==}@@ -954,8 +966,8 @@ packages:resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==}- resolution: {integrity: sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==}+ resolution: {integrity: sha512-M5t5LlJpS1UHMjvwRQVdFHvPISGeLAxNcrWuJkeGh0KxsqCHZ1O3NXZU/8x7cD0BDcGW8kapxMKTvwlqrNkHkA==}resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}@@ -1002,8 +1014,8 @@ packages:resolution: {integrity: sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==}engines: {node: '>=10'}- resolution: {integrity: sha512-1e9d3kb97NHJTIJDZW9rKqW2h6+dFa50Dy0fpPSMQp2ADje5gvKsXmdiK6dwY5t76TaTt5+P5N1Y/LoToIxP6g==}+ resolution: {integrity: sha512-t2v0rkILYv9WXmSL7TpAaU3HXgaFYOPUcH3QHgwQ++gpJuH3bqyMy4Fvt/DJCTKwzH3Cf+bAp5W/mFL39KPLzA==}engines: {node: '>= 12'}@@ -1062,8 +1074,8 @@ packages:resolution: {integrity: sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==}engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}- resolution: {integrity: sha512-9NiFmJEex0sy2Dk58j2UGBSHgUs2ypF9eZSu4L6vjOX3Dp96Sw1F3uL+H+D1sx02jZZdzUT0HgvCy59CuvXcWw==}+ resolution: {integrity: sha512-7TIg10ZE1x82YediN+lcrPNvGMKge9yFHQD+Qho/b8y2adfugU3AsvvHfxV0fzyFllT6l9xCjf4RWY9g/Z9PJQ==}resolution: {integrity: sha512-5tpfyORs8OQ43alNERbWfYRCtWgykvzYgY46fUhrQi2+kS7N0NuuFYLZ/IrfmVm5muLTndeMublgraXiFRjEPw==}@@ -1074,9 +1086,9 @@ packages:resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==}hasBin: true- resolution: {integrity: sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==}- engines: {node: '>= 10.16.0'}+ resolution: {integrity: sha512-Y8Tr54CX7B5YGAwo7/n8eumidEX3Opx98RyyQVnlHqUaZcPA8uUzL2v1rshr9ypW9Q6hNjfJtg3sL+8kaNE7TA==}+ engines: {node: '>= 20.16.0'}resolution: {integrity: sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==}@@ -1356,8 +1368,8 @@ packages:resolution: {integrity: sha512-LjgDO2zPtoXP2wJpDjZrGdojii1uqO0cnwKoIoUzkfS98HDmbeiGmYiXo3lXeFlq2xvne1QFQhwYXSUCLKtEuA==}engines: {node: '>=12.20'}- resolution: {integrity: sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA==}+ resolution: {integrity: sha512-5Px6J7rfHBAGUhNQ3es4YzcOdBBw0SDcVtThJml4RdnKw4tKs2epA0kPZ+K8X+WiHktT93RHVcQ/3ym5aTCgtg==}engines: {node: '>=0.6'}@@ -1375,8 +1387,8 @@ packages:resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}engines: {node: '>= 6'}- resolution: {integrity: sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==}+ resolution: {integrity: sha512-2jhTTU3Eilp/2DMT71gbcoqC35eQHasMJH0RHkYxwlxIv3+FR6Y5xAFZIwEGLxKkjZYEFlsiMNIdwUqjK2lLHQ==}engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}@@ -1526,8 +1538,8 @@ packages:resolution: {integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==}- resolution: {integrity: sha512-1Yowhzjf0ivGMrTIkY9hav5TxobO9qIVqUE41fiCGMGgc3CLlf4MY+9AHmZqBWgDTue0fY9zWjYFVyf6Diuobw==}+ resolution: {integrity: sha512-zEzXb0s5Cds7tqMH6rhZ05lcJydCWiQPEwiNngVqzsxCc962vLY4Uw+mW7od8kDH258k2Uz/JrOkdIAAhSh9VA==}resolution: {integrity: sha512-8hSYfU+WKLdNcHVXJ0VxRXiPESalzRe7w1l8dg9+/22Ry+iZQUoQuoJ27R30GMD1TiyYINWsIEGY05WrskhSKw==}@@ -1550,8 +1562,8 @@ packages:resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}engines: {node: '>=8'}- resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==}+ resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==}engines: {node: '>=12'}@@ -1580,8 +1592,8 @@ packages:resolution: {integrity: sha512-/hU4AXnIdZu+Gvl1pk0oI5f5HxWsCJRtY2aFaJdk9VvyL48DWU6iU5WAIPG+wIi1YvWA6eTJvIviP/tMAZZNwQ==}- resolution: {integrity: sha512-ojzvCvVaNp6aOTFmG7jaRD0meowIAuPc3cMMhSgKiVWws1GyHbGd/xvnyuRKcKlMpt3qvxx6r0hreCNITP9hIg==}+ resolution: {integrity: sha512-+8NeqHRjQWH9nYlwo2gamAMImZCVzI4UoEgDpWorBt9OEfppiZn+uSkskzQKPWIZyji/C8fpWO7u69G0DX0tbg==}resolution: {integrity: sha512-R1Cg4Vu0UULeDfHL/kjABLaTW++9yD/B6n2g48y5dJ04hsEaxcfmAqbNDzNsbqAYJyIpZafjklLG9YxRu9uzOg==}@@ -1632,8 +1644,8 @@ packages:resolution: {integrity: sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==}- resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==}+ resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==}resolution: {integrity: sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==}@@ -1710,18 +1722,6 @@ packages:utf-8-validate:optional: true- resolution: {integrity: sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==}- engines: {node: '>=10.0.0'}- peerDependencies:- bufferutil: ^4.0.1- utf-8-validate: '>=5.0.2'- peerDependenciesMeta:- bufferutil:- optional: true- utf-8-validate:- optional: true-resolution: {integrity: sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==}engines: {node: '>=12'}@@ -1752,167 +1752,167 @@ packages:snapshots:- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@aws-sdk/core': 3.977.6- '@aws-sdk/types': 3.974.2- '@smithy/core': 3.31.1- '@smithy/types': 4.16.1+ '@aws-sdk/core': 3.978.5+ '@aws-sdk/types': 3.975.0+ '@smithy/core': 3.36.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':- dependencies:- '@aws-sdk/checksums': 3.1000.26- '@aws-sdk/core': 3.977.6- '@aws-sdk/credential-provider-node': 3.972.78- '@aws-sdk/middleware-sdk-s3': 3.972.72- '@aws-sdk/signature-v4-multi-region': 3.996.43- '@aws-sdk/types': 3.974.2- '@smithy/core': 3.31.1- '@smithy/fetch-http-handler': 5.6.13- '@smithy/node-http-handler': 4.9.13- '@smithy/types': 4.16.1+ '@aws-sdk/[email protected]':+ dependencies:+ '@aws-sdk/checksums': 3.1001.5+ '@aws-sdk/core': 3.978.5+ '@aws-sdk/credential-provider-node': 3.972.88+ '@aws-sdk/middleware-sdk-s3': 3.972.81+ '@aws-sdk/signature-v4-multi-region': 3.996.49+ '@aws-sdk/types': 3.975.0+ '@smithy/core': 3.36.2+ '@smithy/fetch-http-handler': 5.8.0+ '@smithy/node-http-handler': 4.12.1+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@aws-sdk/types': 3.974.2- '@aws-sdk/xml-builder': 3.972.37+ '@aws-sdk/types': 3.975.0+ '@aws-sdk/xml-builder': 3.972.41'@aws/lambda-invoke-store': 0.3.0- '@smithy/core': 3.31.1- '@smithy/signature-v4': 5.6.12- '@smithy/types': 4.16.1+ '@smithy/core': 3.36.2+ '@smithy/signature-v4': 5.7.4+ '@smithy/types': 4.19.0bowser: 2.14.1tslib: 2.8.1- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@aws-sdk/core': 3.977.6- '@aws-sdk/types': 3.974.2- '@smithy/core': 3.31.1- '@smithy/types': 4.16.1+ '@aws-sdk/core': 3.978.5+ '@aws-sdk/types': 3.975.0+ '@smithy/core': 3.36.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@aws-sdk/core': 3.977.6- '@aws-sdk/types': 3.974.2- '@smithy/core': 3.31.1- '@smithy/fetch-http-handler': 5.6.13- '@smithy/node-http-handler': 4.9.13- '@smithy/types': 4.16.1+ '@aws-sdk/core': 3.978.5+ '@aws-sdk/types': 3.975.0+ '@smithy/core': 3.36.2+ '@smithy/fetch-http-handler': 5.8.0+ '@smithy/node-http-handler': 4.12.1+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':- dependencies:- '@aws-sdk/core': 3.977.6- '@aws-sdk/credential-provider-env': 3.972.67- '@aws-sdk/credential-provider-http': 3.972.69- '@aws-sdk/credential-provider-login': 3.972.74- '@aws-sdk/credential-provider-process': 3.972.67- '@aws-sdk/credential-provider-sso': 3.973.11- '@aws-sdk/credential-provider-web-identity': 3.972.73- '@aws-sdk/nested-clients': 3.997.41- '@aws-sdk/types': 3.974.2- '@smithy/core': 3.31.1- '@smithy/credential-provider-imds': 4.4.16- '@smithy/types': 4.16.1+ '@aws-sdk/[email protected]':+ dependencies:+ '@aws-sdk/core': 3.978.5+ '@aws-sdk/credential-provider-env': 3.972.76+ '@aws-sdk/credential-provider-http': 3.972.78+ '@aws-sdk/credential-provider-login': 3.972.83+ '@aws-sdk/credential-provider-process': 3.972.76+ '@aws-sdk/credential-provider-sso': 3.973.20+ '@aws-sdk/credential-provider-web-identity': 3.972.82+ '@aws-sdk/nested-clients': 3.997.50+ '@aws-sdk/types': 3.975.0+ '@smithy/core': 3.36.2+ '@smithy/credential-provider-imds': 4.5.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@aws-sdk/core': 3.977.6- '@aws-sdk/nested-clients': 3.997.41- '@aws-sdk/types': 3.974.2- '@smithy/core': 3.31.1- '@smithy/types': 4.16.1+ '@aws-sdk/core': 3.978.5+ '@aws-sdk/nested-clients': 3.997.50+ '@aws-sdk/types': 3.975.0+ '@smithy/core': 3.36.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':- dependencies:- '@aws-sdk/credential-provider-env': 3.972.67- '@aws-sdk/credential-provider-http': 3.972.69- '@aws-sdk/credential-provider-ini': 3.973.12- '@aws-sdk/credential-provider-process': 3.972.67- '@aws-sdk/credential-provider-sso': 3.973.11- '@aws-sdk/credential-provider-web-identity': 3.972.73- '@aws-sdk/types': 3.974.2- '@smithy/core': 3.31.1- '@smithy/credential-provider-imds': 4.4.16- '@smithy/types': 4.16.1+ '@aws-sdk/[email protected]':+ dependencies:+ '@aws-sdk/credential-provider-env': 3.972.76+ '@aws-sdk/credential-provider-http': 3.972.78+ '@aws-sdk/credential-provider-ini': 3.973.21+ '@aws-sdk/credential-provider-process': 3.972.76+ '@aws-sdk/credential-provider-sso': 3.973.20+ '@aws-sdk/credential-provider-web-identity': 3.972.82+ '@aws-sdk/types': 3.975.0+ '@smithy/core': 3.36.2+ '@smithy/credential-provider-imds': 4.5.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@aws-sdk/core': 3.977.6- '@aws-sdk/types': 3.974.2- '@smithy/core': 3.31.1- '@smithy/types': 4.16.1+ '@aws-sdk/core': 3.978.5+ '@aws-sdk/types': 3.975.0+ '@smithy/core': 3.36.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@aws-sdk/core': 3.977.6- '@aws-sdk/nested-clients': 3.997.41- '@aws-sdk/token-providers': 3.1103.0- '@aws-sdk/types': 3.974.2- '@smithy/core': 3.31.1- '@smithy/types': 4.16.1+ '@aws-sdk/core': 3.978.5+ '@aws-sdk/nested-clients': 3.997.50+ '@aws-sdk/token-providers': 3.1155.0+ '@aws-sdk/types': 3.975.0+ '@smithy/core': 3.36.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@aws-sdk/core': 3.977.6- '@aws-sdk/nested-clients': 3.997.41- '@aws-sdk/types': 3.974.2- '@smithy/core': 3.31.1- '@smithy/types': 4.16.1+ '@aws-sdk/core': 3.978.5+ '@aws-sdk/nested-clients': 3.997.50+ '@aws-sdk/types': 3.975.0+ '@smithy/core': 3.36.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@aws-sdk/core': 3.977.6- '@aws-sdk/signature-v4-multi-region': 3.996.43- '@aws-sdk/types': 3.974.2- '@smithy/core': 3.31.1- '@smithy/types': 4.16.1+ '@aws-sdk/core': 3.978.5+ '@aws-sdk/signature-v4-multi-region': 3.996.49+ '@aws-sdk/types': 3.975.0+ '@smithy/core': 3.36.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@aws-sdk/core': 3.977.6- '@aws-sdk/signature-v4-multi-region': 3.996.43- '@aws-sdk/types': 3.974.2- '@smithy/core': 3.31.1- '@smithy/fetch-http-handler': 5.6.13- '@smithy/node-http-handler': 4.9.13- '@smithy/types': 4.16.1+ '@aws-sdk/core': 3.978.5+ '@aws-sdk/signature-v4-multi-region': 3.996.49+ '@aws-sdk/types': 3.975.0+ '@smithy/core': 3.36.2+ '@smithy/fetch-http-handler': 5.8.0+ '@smithy/node-http-handler': 4.12.1+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@aws-sdk/types': 3.974.2- '@smithy/signature-v4': 5.6.12- '@smithy/types': 4.16.1+ '@aws-sdk/types': 3.975.0+ '@smithy/signature-v4': 5.7.4+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@aws-sdk/core': 3.977.6- '@aws-sdk/nested-clients': 3.997.41- '@aws-sdk/types': 3.974.2- '@smithy/core': 3.31.1- '@smithy/types': 4.16.1+ '@aws-sdk/core': 3.978.5+ '@aws-sdk/nested-clients': 3.997.50+ '@aws-sdk/types': 3.975.0+ '@smithy/core': 3.36.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@smithy/types': 4.16.1+ '@smithy/types': 4.19.0tslib: 2.8.1- '@aws-sdk/[email protected]':+ '@aws-sdk/[email protected]':dependencies:- '@smithy/types': 4.16.1+ '@smithy/types': 4.19.0tslib: 2.8.1'@aws/[email protected]': {}@@ -1945,7 +1945,7 @@ snapshots:transitivePeerDependencies:- supports-color- '@grpc/[email protected]':+ '@grpc/[email protected]':dependencies:'@grpc/proto-loader': 0.8.1'@js-sdsl/ordered-map': 4.4.2@@ -1964,9 +1964,9 @@ snapshots:protobufjs: 7.6.6yargs: 17.7.3- '@grpc/[email protected](@grpc/[email protected])':+ '@grpc/[email protected](@grpc/[email protected])':dependencies:- '@grpc/grpc-js': 1.14.5+ '@grpc/grpc-js': 1.14.6'@grpc/proto-loader': 0.7.15protobufjs: 7.6.6@@ -1974,30 +1974,30 @@ snapshots:dependencies:string-width: 5.1.2string-width-cjs: [email protected]- strip-ansi: 7.1.2+ strip-ansi: 7.2.0strip-ansi-cjs: [email protected]wrap-ansi: 8.1.0wrap-ansi-cjs: [email protected]'@js-sdsl/[email protected]': {}- '@jsep-plugin/[email protected]([email protected])':+ '@jsep-plugin/[email protected]([email protected])':dependencies:- jsep: 1.4.0+ jsep: 1.6.0- '@jsep-plugin/[email protected]([email protected])':+ '@jsep-plugin/[email protected]([email protected])':dependencies:- jsep: 1.4.0+ jsep: 1.6.0'@kubernetes/[email protected]':dependencies:'@types/js-yaml': 4.0.9- '@types/node': 24.19.0+ '@types/node': 24.19.2'@types/node-fetch': 2.6.13'@types/stream-buffers': 3.0.8form-data: 4.0.6hpagent: 1.2.0- isomorphic-ws: 5.0.0([email protected])+ isomorphic-ws: 5.0.0([email protected])js-yaml: 4.3.2jsonpath-plus: 10.4.0node-fetch: 2.7.0@@ -2006,7 +2006,7 @@ snapshots:socks-proxy-agent: 8.0.5stream-buffers: 3.0.3tar-fs: 3.1.3- ws: 8.21.3+ ws: 8.21.0transitivePeerDependencies:- bare-abort-controller- bare-buffer@@ -2028,12 +2028,12 @@ snapshots:'@percy/[email protected]':dependencies:- '@percy/sdk-utils': 1.32.11+ '@percy/sdk-utils': 1.32.12tmp: 0.2.7transitivePeerDependencies:- supports-color- '@percy/[email protected]':+ '@percy/[email protected]':dependencies:pac-proxy-agent: 7.2.0transitivePeerDependencies:@@ -2101,36 +2101,36 @@ snapshots:'@sindresorhus/[email protected]': {}- '@smithy/[email protected]':+ '@smithy/[email protected]':dependencies:- '@smithy/types': 4.16.1+ '@smithy/types': 4.19.0tslib: 2.8.1- '@smithy/[email protected]':+ '@smithy/[email protected]':dependencies:- '@smithy/core': 3.31.1- '@smithy/types': 4.16.1+ '@smithy/core': 3.36.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@smithy/[email protected]':+ '@smithy/[email protected]':dependencies:- '@smithy/core': 3.31.1- '@smithy/types': 4.16.1+ '@smithy/core': 3.36.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@smithy/[email protected]':+ '@smithy/[email protected]':dependencies:- '@smithy/core': 3.31.1- '@smithy/types': 4.16.1+ '@smithy/core': 3.36.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@smithy/[email protected]':+ '@smithy/[email protected]':dependencies:- '@smithy/core': 3.31.1- '@smithy/types': 4.16.1+ '@smithy/core': 3.36.2+ '@smithy/types': 4.19.0tslib: 2.8.1- '@smithy/[email protected]':+ '@smithy/[email protected]':dependencies:tslib: 2.8.1@@ -2153,7 +2153,7 @@ snapshots:dependencies:'@types/http-cache-semantics': 4.2.0'@types/keyv': 3.1.4- '@types/node': 26.1.2+ '@types/node': 26.6.5'@types/responselike': 1.0.3'@types/[email protected]': {}@@ -2162,28 +2162,28 @@ snapshots:'@types/[email protected]':dependencies:- '@types/node': 26.1.2+ '@types/node': 26.6.5'@types/[email protected]':dependencies:- '@types/node': 26.1.2+ '@types/node': 24.19.2form-data: 4.0.6- '@types/[email protected]':+ '@types/[email protected]':dependencies:undici-types: 7.24.6- '@types/[email protected]':+ '@types/[email protected]':dependencies:- undici-types: 8.3.0+ undici-types: 8.9.0'@types/[email protected]':dependencies:- '@types/node': 26.1.2+ '@types/node': 26.6.5'@types/[email protected]':dependencies:- '@types/node': 26.1.2+ '@types/node': 24.19.2'@types/[email protected]': {}@@ -2199,10 +2199,10 @@ snapshots:dependencies:fast-deep-equal: 3.1.3- fast-uri: 3.1.8+ fast-uri: 3.1.9json-schema-traverse: 1.0.0require-from-string: 2.0.2@@ -2212,7 +2212,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}dependencies:@@ -2228,16 +2228,16 @@ snapshots:lazystream: 1.0.1lodash: 4.18.1normalize-path: 3.0.0- readable-stream: 4.7.0+ readable-stream: 4.8.0dependencies:archiver-utils: 5.0.2async: 3.2.6buffer-crc32: 1.0.0- readable-stream: 4.7.0+ readable-stream: 4.8.0readdir-glob: 1.1.3- tar-stream: 3.2.0+ tar-stream: 3.2.2zip-stream: 6.0.1transitivePeerDependencies:- bare-abort-controller@@ -2256,42 +2256,42 @@ snapshots:- [email protected]: {}+ [email protected]: {}- [email protected]: {}+ [email protected]: {}dependencies:- bare-events: 2.9.1- bare-path: 3.1.1- bare-stream: 2.13.3([email protected])- bare-url: 2.4.5+ bare-events: 2.9.2+ bare-path: 3.1.2+ bare-stream: 2.13.4([email protected])+ bare-url: 2.5.5fast-fifo: 1.3.2transitivePeerDependencies:- bare-abort-controller- react-native-b4a- [email protected]: {}+ [email protected]: {}dependencies:- b4a: 1.8.1- streamx: 2.28.0+ b4a: 1.9.0+ streamx: 2.28.1teex: 1.0.1optionalDependencies:- bare-events: 2.9.1+ bare-events: 2.9.2transitivePeerDependencies:- react-native-b4adependencies:- bare-path: 3.1.1+ bare-path: 3.1.2- [email protected]: {}+ [email protected]: {}@@ -2318,7 +2318,7 @@ snapshots:dependencies:balanced-match: 1.0.2dependencies:agent-base: 6.0.2https-proxy-agent: 5.0.1@@ -2327,26 +2327,26 @@ snapshots:transitivePeerDependencies:- supports-colordependencies:- '@aws-sdk/client-s3': 3.1106.0+ '@aws-sdk/client-s3': 3.1156.0'@google-cloud/compute': 5.3.0'@google-cloud/container': 6.10.0'@google-cloud/resource-manager': 6.3.0- '@grpc/grpc-js': 1.14.5+ '@grpc/grpc-js': 1.14.6'@grpc/proto-loader': 0.7.15- '@grpc/reflection': 1.0.4(@grpc/[email protected])+ '@grpc/reflection': 1.0.4(@grpc/[email protected])'@kubernetes/client-node': 1.4.0'@percy/appium-app': 2.1.0'@percy/selenium-webdriver': 2.2.8archiver: 7.0.1bluebird: 3.7.2- browserstack-local: 1.5.15+ browserstack-local: 1.5.16chalk: 4.1.2cheerio: 1.0.0-rc.11dotenv: 16.6.1emittery: 0.11.0- follow-redirects: 1.16.0+ follow-redirects: 1.16.1form-data: 4.0.6getos: 3.2.1git-last-commit: 1.0.1@@ -2406,7 +2406,7 @@ snapshots:dependencies:'@types/http-cache-semantics': 4.2.0get-stream: 6.0.1- http-cache-semantics: 4.2.0+ http-cache-semantics: 4.3.0(patch_hash=10f814373e15493e8a475041e5ecf67775717842648b0879b8c6c26055cfcfe9)keyv: 4.5.4mimic-response: 4.0.0normalize-url: 8.1.1@@ -2416,7 +2416,7 @@ snapshots:dependencies:clone-response: 1.0.3get-stream: 5.2.0- http-cache-semantics: 4.2.0+ http-cache-semantics: 4.3.0(patch_hash=10f814373e15493e8a475041e5ecf67775717842648b0879b8c6c26055cfcfe9)keyv: 4.5.4lowercase-keys: 2.0.0normalize-url: 6.1.0@@ -2506,7 +2506,7 @@ snapshots:crc32-stream: 6.0.0is-stream: 2.0.1normalize-path: 3.0.0- readable-stream: 4.7.0+ readable-stream: 4.8.0dependencies:@@ -2528,7 +2528,7 @@ snapshots:dependencies:crc-32: 1.2.2- readable-stream: 4.7.0+ readable-stream: 4.8.0dependencies:@@ -2688,7 +2688,7 @@ snapshots:dependencies:- bare-events: 2.9.1+ bare-events: 2.9.2transitivePeerDependencies:- bare-abort-controller@@ -2712,7 +2712,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}@@ -2723,7 +2723,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}dependencies:@@ -2802,7 +2802,7 @@ snapshots:dependencies:- basic-ftp: 5.3.1+ basic-ftp: 6.2.3data-uri-to-buffer: 6.0.2debug: 4.4.3transitivePeerDependencies:@@ -2853,7 +2853,7 @@ snapshots:ecdsa-sig-formatter: 1.0.11gaxios: 7.3.1gcp-metadata: 8.1.4- google-logging-utils: 1.1.3+ google-logging-utils: 1.2.0gtoken: 8.0.0jws: 4.0.1transitivePeerDependencies:@@ -2861,7 +2861,7 @@ snapshots:dependencies:- '@grpc/grpc-js': 1.14.5+ '@grpc/grpc-js': 1.14.6'@grpc/proto-loader': 0.8.1duplexify: 4.1.3google-auth-library: 10.5.0@@ -2877,6 +2877,8 @@ snapshots:+ [email protected]: {}+@@ -2885,7 +2887,7 @@ snapshots:gaxios: 7.1.3google-auth-library: 10.5.0google-logging-utils: 1.1.3- qs: 6.16.0+ qs: 6.16.1url-template: 2.0.8transitivePeerDependencies:- supports-color@@ -2967,7 +2969,7 @@ snapshots:domutils: 3.2.2entities: 4.5.0- [email protected]: {}+ [email protected](patch_hash=10f814373e15493e8a475041e5ecf67775717842648b0879b8c6c26055cfcfe9): {}dependencies:@@ -3014,7 +3016,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}dependencies:@@ -3045,9 +3047,9 @@ snapshots:dependencies:- ws: 8.21.3+ ws: 8.21.0dependencies:@@ -3057,11 +3059,11 @@ snapshots:dependencies:- '@types/node': 26.1.2+ '@types/node': 26.6.5merge-stream: 2.0.0supports-color: 8.1.1- [email protected]: {}+ [email protected]: {}dependencies:@@ -3072,7 +3074,7 @@ snapshots:dependencies:argparse: 2.0.1- [email protected]: {}+ [email protected]: {}dependencies:@@ -3086,9 +3088,9 @@ snapshots:dependencies:- '@jsep-plugin/assignment': 1.3.0([email protected])- '@jsep-plugin/regex': 1.0.4([email protected])- jsep: 1.4.0+ '@jsep-plugin/assignment': 1.4.0([email protected])+ '@jsep-plugin/regex': 1.1.0([email protected])+ jsep: 1.6.0dependencies:@@ -3235,7 +3237,7 @@ snapshots:dependencies:- jose: 6.2.12+ jose: 6.2.13oauth4webapi: 3.8.8@@ -3326,7 +3328,7 @@ snapshots:'@protobufjs/path': 1.1.2'@protobufjs/pool': 1.1.0'@protobufjs/utf8': 1.1.2- '@types/node': 26.1.2+ '@types/node': 26.6.5long: 5.3.2@@ -3340,7 +3342,7 @@ snapshots:dependencies:escape-goat: 4.0.0dependencies:es-define-property: 1.0.1side-channel: 1.1.1@@ -3370,7 +3372,7 @@ snapshots:string_decoder: 1.3.0util-deprecate: 1.0.2dependencies:abort-controller: 3.0.0buffer: 6.0.3@@ -3514,7 +3516,7 @@ snapshots:dependencies:- ip-address: 10.3.1+ ip-address: 10.7.5smart-buffer: 4.2.0@@ -3532,7 +3534,7 @@ snapshots:dependencies:events-universal: 1.0.1fast-fifo: 1.3.2@@ -3553,7 +3555,7 @@ snapshots:dependencies:eastasianwidth: 0.2.0emoji-regex: 9.2.2- strip-ansi: 7.1.2+ strip-ansi: 7.2.0dependencies:@@ -3567,9 +3569,9 @@ snapshots:dependencies:ansi-regex: 5.0.1dependencies:- ansi-regex: 6.2.2+ ansi-regex: 6.4.0@@ -3587,7 +3589,7 @@ snapshots:dependencies:- ajv: 8.18.0+ ajv: 8.20.0lodash.truncate: 4.4.2slice-ansi: 4.0.0string-width: 4.2.3@@ -3596,21 +3598,21 @@ snapshots:dependencies:pump: 3.0.4- tar-stream: 3.2.0+ tar-stream: 3.2.2optionalDependencies:- bare-fs: 4.7.4- bare-path: 3.1.1+ bare-fs: 4.8.4+ bare-path: 3.1.2transitivePeerDependencies:- bare-abort-controller- bare-buffer- react-native-b4adependencies:- b4a: 1.8.1- bare-fs: 4.7.4+ b4a: 1.9.0+ bare-fs: 4.8.4fast-fifo: 1.3.2- streamx: 2.28.0+ streamx: 2.28.1transitivePeerDependencies:- bare-abort-controller- bare-buffer@@ -3627,14 +3629,14 @@ snapshots:dependencies:- streamx: 2.28.0+ streamx: 2.28.1transitivePeerDependencies:- bare-abort-controller- react-native-b4adependencies:- b4a: 1.8.1+ b4a: 1.9.0transitivePeerDependencies:- react-native-b4a@@ -3662,7 +3664,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}dependencies:@@ -3742,7 +3744,7 @@ snapshots:dependencies:ansi-styles: 6.2.3string-width: 5.1.2- strip-ansi: 7.1.2+ strip-ansi: 7.2.0@@ -3755,8 +3757,6 @@ snapshots:- [email protected]: {}-@@ -3783,4 +3783,4 @@ snapshots:dependencies:archiver-utils: 5.0.2compress-commons: 6.0.2- readable-stream: 4.7.0+ readable-stream: 4.8.0diff --git a/tests/e2e/pnpm-workspace.yaml b/tests/e2e/pnpm-workspace.yamlindex 5c999d8d1..dbd55d307 100644--- a/tests/e2e/pnpm-workspace.yaml+++ b/tests/e2e/pnpm-workspace.yaml@@ -1,3 +1,9 @@# Keep cloud-testing dependencies out of Kaneo's production build graph.packages:- .++# get-uri still requests basic-ftp 5.x; 6.2.3 fixes its listing parser DoS.+overrides:+ "get-uri>basic-ftp": 6.2.3+patchedDependencies:+ [email protected]: patches/[email protected]diff --git a/tests/e2e/security/cache-policy.test.mjs b/tests/e2e/security/cache-policy.test.mjsnew file mode 100644index 000000000..94051afc4--- /dev/null+++ b/tests/e2e/security/cache-policy.test.mjs@@ -0,0 +1,316 @@+import assert from "node:assert/strict";+import { once } from "node:events";+import { createServer } from "node:http";+import { createRequire } from "node:module";+import { setTimeout as delay } from "node:timers/promises";+import { pathToFileURL } from "node:url";+import test from "node:test";++const require = createRequire(import.meta.url);+const sdk = createRequire(+ require.resolve("browserstack-node-sdk/package.json"),+);+const notifier = createRequire(sdk.resolve("update-notifier"));+const latestVersion = createRequire(notifier.resolve("latest-version"));+const packageJson = createRequire(latestVersion.resolve("package-json"));++// Exercise both installed consumers; do not load BrowserStack or its credentials.+for (const [name, consumer] of [+ ["SDK", sdk],+ ["update notifier", packageJson],+]) {+ const got = createRequire(consumer.resolve("got"));+ const cache = createRequire(got.resolve("cacheable-request"));+ const Base = cache("http-cache-semantics");+ let clock = 100_000;+ class Policy extends Base {+ now() {+ return clock;+ }+ }+ const request = (headers = {}) => ({+ url: "https://cache.invalid/account",+ method: "GET",+ headers: { host: "cache.invalid", ...headers },+ });+ const make = (cc, extra = {}, reqExtra = {}, shared = true) => {+ clock = 100_000;+ return new Policy(+ request(reqExtra),+ {+ status: 200,+ headers: { "cache-control": cc, etag: '"same"', ...extra },+ },+ { shared },+ );+ };+ const staleRequest = request({ "cache-control": "max-stale=999999" });+ const cookie = { "set-cookie": "session=synthetic-only; HttpOnly" };++ for (const cc of [+ "max-age=60",+ "immutable, max-age=60",+ "must-revalidate, max-age=60",+ "s-maxage=60",+ ]) {+ test(`${name}: shared cookies require explicit sharing: ${cc}`, () => {+ const policy = make(cc, cookie);+ assert.equal(policy.storable(), false);+ assert.equal(policy.satisfiesWithoutRevalidation(request()), false);+ assert.equal(policy.satisfiesWithoutRevalidation(staleRequest), false);+ });+ }+ for (const cc of ["private, max-age=60", "no-store, max-age=60"]) {+ test(`${name}: max-stale cannot reuse ${cc}`, () => {+ assert.equal(make(cc).satisfiesWithoutRevalidation(staleRequest), false);+ });+ }+ test(`${name}: authorization requires explicit sharing`, () => {+ const policy = make(+ "max-age=60",+ {},+ { authorization: "Bearer synthetic" },+ );+ assert.equal(policy.storable(), false);+ assert.equal(policy.satisfiesWithoutRevalidation(staleRequest), false);+ });++ for (const cc of [+ "no-cache, max-age=60",+ "proxy-revalidate, max-age=1",+ "s-maxage=1",+ "s-maxage=0",+ "must-revalidate, max-age=1",+ ]) {+ test(`${name}: stale requests and extensions cannot bypass ${cc}`, () => {+ const policy = make(+ `${cc}, stale-while-revalidate=60, stale-if-error=60`,+ );+ clock += 2_000;+ assert.equal(policy.satisfiesWithoutRevalidation(staleRequest), false);+ assert.equal(policy.evaluateRequest(request()).response, undefined);+ assert.equal(policy.useStaleWhileRevalidate(), false);+ assert.equal(+ policy.revalidatedPolicy(request(), { status: 500, headers: {} })+ .modified,+ true,+ );+ });+ }+ for (const cc of [+ "public, max-age=60",+ "s-maxage=60",+ "must-revalidate, max-age=60",+ ]) {+ test(`${name}: fresh explicit sharing works: ${cc}`, () => {+ const policy = make(cc, {}, { authorization: "Bearer synthetic" });+ clock += 2_000;+ assert.equal(policy.storable(), true);+ assert.equal(policy.satisfiesWithoutRevalidation(request()), true);+ });+ }+ test(`${name}: public cookie responses remain reusable`, () => {+ assert.equal(+ make("public, max-age=60", cookie).satisfiesWithoutRevalidation(+ request(),+ ),+ true,+ );+ });+ test(+ `${name}: actual HTTP client caches public cookies and refuses implicit cookie sharing`,+ { timeout: 15_000 },+ async (t) => {+ const { default: client } = await import(+ pathToFileURL(consumer.resolve("got")).href+ );+ const counts = new Map();+ const server = createServer((req, res) => {+ const count = (counts.get(req.url) ?? 0) + 1;+ counts.set(req.url, count);+ if (+ req.url === "/revalidate" &&+ req.headers["if-none-match"] === '"security-etag"'+ ) {+ res.writeHead(304, {+ "cache-control": "public, max-age=0",+ etag: '"security-etag"',+ });+ res.end();+ return;+ }+ const cacheControl = {+ "/public": "public, max-age=60",+ "/restricted": "must-revalidate, max-age=60",+ "/immutable": "immutable, max-age=60",+ "/revalidate": "public, max-age=0",+ };+ res.writeHead(200, {+ "cache-control": cacheControl[req.url],+ "set-cookie": "session=synthetic-only; HttpOnly",+ etag: '"security-etag"',+ });+ res.end(String(count));+ });+ t.after(() => {+ server.closeAllConnections();+ return new Promise((resolve) => server.close(resolve));+ });+ server.listen(0, "127.0.0.1");+ await once(server, "listening");+ for (const path of [+ "/public",+ "/restricted",+ "/immutable",+ "/revalidate",+ ]) {+ const url = `http://127.0.0.1:${server.address().port}${path}`;+ const options = {+ cache: new Map(),+ retry: { limit: 0 },+ timeout: { request: 5_000 },+ headers: { connection: "close" },+ };+ assert.equal(await client(url, options).text(), "1");+ const cacheable = path === "/public" || path === "/revalidate";+ if (cacheable) {+ for (+ let attempt = 0;+ options.cache.size === 0 && attempt < 100;+ attempt += 1+ ) {+ await delay(10);+ }+ assert.ok(+ options.cache.size > 0,+ "wait for the asynchronous cache write",+ );+ }+ assert.equal(await client(url, options).text(), cacheable ? "1" : "2");+ assert.equal(counts.get(path), path === "/public" ? 1 : 2);+ }+ },+ );+ test(`${name}: fresh proxy-revalidate response remains reusable`, () => {+ assert.equal(+ make("proxy-revalidate, max-age=60").satisfiesWithoutRevalidation(+ request(),+ ),+ true,+ );+ });+ test(`${name}: private cache retains cookies and ignores shared revalidation directives`, () => {+ const policy = make(+ "private, proxy-revalidate, s-maxage=0, max-age=1",+ cookie,+ {},+ false,+ );+ clock += 2_000;+ assert.equal(policy.satisfiesWithoutRevalidation(staleRequest), true);+ });+ test(`${name}: ordinary stale reuse and extensions remain available`, () => {+ const policy = make(+ "max-age=1, stale-while-revalidate=60, stale-if-error=60",+ );+ clock += 2_000;+ assert.equal(policy.satisfiesWithoutRevalidation(staleRequest), true);+ assert.ok(policy.evaluateRequest(request()).response);+ assert.equal(+ policy.revalidatedPolicy(request(), { status: 500, headers: {} })+ .modified,+ false,+ );+ const noCache = request({ "cache-control": "no-cache" });+ assert.equal(+ policy.revalidatedPolicy(noCache, { status: 500, headers: {} }).modified,+ true,+ );+ });+ test(`${name}: restored cookie entries cannot replay on hits, 304s, or errors`, () => {+ const policy = make(+ "max-age=0, stale-if-error=60, stale-while-revalidate=60",+ cookie,+ );+ // Serialization format is unchanged, including entries retained before the patch.+ const restored = Policy.fromObject(+ JSON.parse(JSON.stringify(policy.toObject())),+ );+ clock += 2_000;+ assert.equal(restored.satisfiesWithoutRevalidation(staleRequest), false);+ assert.equal(restored.evaluateRequest(request()).response, undefined);+ assert.equal(+ restored.revalidationHeaders(request())["if-none-match"],+ undefined,+ );+ for (const response of [+ { status: 304, headers: { etag: '"same"' } },+ { status: 500, headers: {} },+ ]) {+ const result = restored.revalidatedPolicy(request(), response);+ assert.equal(result.matches, false);+ assert.equal(result.modified, true);+ }+ });+ test(`${name}: legitimate no-cache 304 validates only the current reuse`, () => {+ const result = make("no-cache").revalidatedPolicy(request(), {+ status: 304,+ headers: { etag: '"same"' },+ });+ assert.equal(result.modified, false);+ assert.equal(+ result.policy.satisfiesWithoutRevalidation(staleRequest),+ false,+ );+ });+ test(`${name}: 304 preserves newly introduced restrictions and cookies`, () => {+ for (const cc of ["private", "no-store", "no-cache"]) {+ const result = make("max-age=0").revalidatedPolicy(request(), {+ status: 304,+ headers: { etag: '"same"', "cache-control": cc, ...cookie },+ });+ assert.equal(result.policy.storable(), false);+ assert.equal(+ result.policy.responseHeaders()["set-cookie"],+ cookie["set-cookie"],+ );+ }+ // Restriction was absent entirely from the original representation.+ const policy = new Policy(request(), {+ status: 200,+ headers: { etag: '"same"' },+ });+ const result = policy.revalidatedPolicy(request(), {+ status: 304,+ headers: { etag: '"same"', "cache-control": "private" },+ });+ assert.equal(result.policy.storable(), false);+ });+ test(`${name}: revalidation cannot replay a different representation`, () => {+ const policy = make("public, max-age=0");+ const differentUrl = { ...request(), url: "https://cache.invalid/other" };+ assert.equal(+ policy.revalidatedPolicy(differentUrl, {+ status: 304,+ headers: { etag: '"same"' },+ }).modified,+ true,+ );+ assert.equal(+ policy.revalidatedPolicy(request(), {+ status: 304,+ headers: { etag: '"different"' },+ }).modified,+ true,+ );+ const varied = make(+ "public, max-age=60",+ { vary: "cookie" },+ { cookie: "user=alice" },+ );+ assert.equal(+ varied.satisfiesWithoutRevalidation(request({ cookie: "user=bob" })),+ false,+ );+ });+}diff --git a/tests/e2e/security/ftp-listing.test.mjs b/tests/e2e/security/ftp-listing.test.mjsnew file mode 100644index 000000000..0250303bf--- /dev/null+++ b/tests/e2e/security/ftp-listing.test.mjs@@ -0,0 +1,37 @@+import assert from "node:assert/strict";+import { execFile } from "node:child_process";+import { createRequire } from "node:module";+import test from "node:test";+import { promisify } from "node:util";++const require = createRequire(import.meta.url);+const sdk = createRequire(+ require.resolve("browserstack-node-sdk/package.json"),+);+const proxy = createRequire(sdk.resolve("pac-proxy-agent"));+const getUri = createRequire(proxy.resolve("get-uri"));++test("FTP listing parser rejects a pathological line without blocking", async () => {+ // Isolate the CPU-bound regression so a vulnerable regex cannot hang this suite.+ const { stdout } = await promisify(execFile)(+ process.execPath,+ [+ "--input-type=commonjs",+ "--eval",+ `const assert = require("node:assert/strict");+ const { Client, parseList } = require(process.argv[1]);+ for (const method of ["access", "lastMod", "list", "downloadTo", "close"]) {+ assert.equal(typeof Client.prototype[method], "function");+ }+ const malformed = "-rw-r--r-- 1 " + "a ".repeat(256 * 1024) + "!";+ const entries = parseList(malformed + "\\r\\n-rw-r--r-- 1 owner group 42 Jan 1 2020 file.txt\\r\\n");+ assert.equal(entries.length, 1);+ assert.equal(entries[0].name, "file.txt");+ assert.equal(entries[0].size, 42);+ console.log("parsed");`,+ getUri.resolve("basic-ftp"),+ ],+ { timeout: 30_000, env: {} },+ );+ assert.equal(stdout.trim(), "parsed");+});diff --git a/tests/e2e/security/redirects.test.mjs b/tests/e2e/security/redirects.test.mjsnew file mode 100644index 000000000..48e333b0f--- /dev/null+++ b/tests/e2e/security/redirects.test.mjs@@ -0,0 +1,68 @@+import assert from "node:assert/strict";+import { once } from "node:events";+import { createServer } from "node:http";+import { createRequire } from "node:module";+import test from "node:test";++// Resolve BrowserStack's actual dependency, without loading its SDK or credentials.+const require = createRequire(import.meta.url);+const sdkRequire = createRequire(+ require.resolve("browserstack-node-sdk/package.json"),+);+const { http } = sdkRequire("follow-redirects");++for (const arrayHeaders of [false, true]) {+ test(`redirects strip credentials with ${arrayHeaders ? "array" : "object"} headers`, async (t) => {+ const received = [];+ const server = createServer((req, res) => {+ received.push(req.headers);+ if (req.url === "/start") {+ // Both addresses are loopback, but their hostnames cross an origin boundary.+ res.writeHead(302, {+ location: `http://localhost:${server.address().port}/end`,+ });+ }+ res.end("synthetic response");+ });+ server.listen(0, "127.0.0.1");+ t.after(() => new Promise((resolve) => server.close(resolve)));+ await once(server, "listening");++ const headers = {+ Authorization: "Bearer synthetic-only",+ "Proxy-Authorization": "Basic synthetic-only",+ Cookie: "session=synthetic-only",+ "X-Token^Key": "synthetic-caret",+ "X-Token|Key": "synthetic-pipe",+ "X-Public": "preserved",+ };+ await new Promise((resolve, reject) => {+ const request = http.get(+ `http://127.0.0.1:${server.address().port}/start`,+ {+ family: 4,+ headers: arrayHeaders ? Object.entries(headers).flat() : headers,+ sensitiveHeaders: ["X-Token^Key", "X-Token|Key"],+ },+ (response) => {+ response.resume();+ response.on("end", resolve);+ response.on("error", reject);+ },+ );+ request.on("error", reject);+ request.setTimeout(5_000, () =>+ request.destroy(new Error("redirect timed out")),+ );+ });++ assert.equal(received.length, 2);+ for (const name of Object.keys(headers)) {+ assert.equal(received[0][name.toLowerCase()], headers[name]);+ assert.equal(+ received[1][name.toLowerCase()],+ name === "X-Public" ? "preserved" : undefined,+ );+ }+ });+}