Skip to content

v1.0: Queue/Worker rewrite, workflow engine, docs overhaul#53

Open
noxify wants to merge 67 commits into
mainfrom
refactor
Open

v1.0: Queue/Worker rewrite, workflow engine, docs overhaul#53
noxify wants to merge 67 commits into
mainfrom
refactor

Conversation

@noxify

@noxify noxify commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Complete rewrite for 1.0 with breaking changes across all packages.

Breaking Changes

  • Node 22+
  • Prisma adapter requires prisma 7
  • Queue doesn't processes the jobs anymore, a Worker is required

Core

  • Queue/Worker architecture split (Queue is producer-only, Worker processes jobs)
  • Workflow engine: saga compensation, signals, event triggers, flow producer
  • Job cancellation, dead-letter queue, group FIFO, unique jobs, rate limiting
  • Job steps (step.run(), step.sleep(), step.all()) for durable execution
  • New statuses: cancelled, dead, waiting-children
  • Configurable retry strategies, per-handler concurrency limits

Adapters

  • Rewritten for new QueueAdapter interface (Drizzle, Prisma 7, Kysely)
  • Added retry, runNow, deleteJob, getJobs, getFlows operations

Server

  • GraphQL API (Hono + Yoga + Pothos) with mutations, queries, subscriptions
  • defineConfig / loadConfig for typed configuration

CLI

  • Initial release: status, inspect, cancel, retry, redrive, run-now, delete, clear, flow, serve

Docs

  • Full rewrite with renoun: guides, examples, CLI reference, API reference (auto-generated from source)

Infra

  • Minimum Node.js 22+ (all packages)
  • TypeScript 6.x, ES2024 target
  • Migrated build system to tsdown
  • Slimmed package READMEs to point to docs site

Implements: #43, #42, #41, #17, #16, #20

noxify added 22 commits June 26, 2026 10:01
* use oxlint and oxfmt
* update deps
* update deps
* use pnpm 11.*
BREAKING CHANGE: Complete rewrite of @vorsteh-queue/core.

- Queue is now producer-only (add, cancel, redrive, stats, signal)
- New Worker class (register, start, stop, polling, concurrency)
- Handler signature: (job, { signal, step }) => result
- New statuses: cancelled, dead, waiting-children
- State machine with validated transitions
- TypedEventEmitter on Queue and Worker
- Retry strategies (exponential, linear, fixed, custom)
- Cancellation via AbortSignal
- Dead-letter queue with redrive
- Group FIFO, unique jobs, batch processing
- enqueueAndWait, per-handler rate limiting
- Job Steps with saga compensation
- Signals/waitFor (human-in-the-loop)
- Event triggers (worker.trigger)
- Flow Producer (parent-child trees)
- retry, runNow, deleteJob operations
BREAKING CHANGE: Implements new QueueAdapter interface with full feature support.

- New columns: group_key, unique_key, cancelled_at, cancellation_reason, steps, signals, parent_id, flow_id, children_count, children_completed
- timeout changed from JSONB to INT
- getNextJob with handler filtering and group FIFO (SKIP LOCKED)
- Cancellation, DLQ, unique jobs, flow tree methods
- retry, runNow, deleteJob operations
BREAKING CHANGE: Implements new QueueAdapter interface with full feature support.

- Updated schema and migrations with new columns
- getNextJob with handler filtering and group FIFO (SKIP LOCKED)
- Cancellation, DLQ, unique jobs, flow tree methods
- retry, runNow, deleteJob operations
…rface

BREAKING CHANGE: Requires Prisma 7+ (peerDependency >= 7.0.0).

- Migrated to Prisma 7 (removed url from datasource, added prisma.config.ts)
- Updated schema with new columns
- getNextJob with handler filtering and group FIFO (SKIP LOCKED via raw SQL)
- Cancellation, DLQ, unique jobs, flow tree methods
- retry, runNow, deleteJob operations
- createQueueServer() for standalone deployment
- createQueueMiddleware() for embedding in existing Hono apps
- GraphQL queries: stats, job, deadJobs, size, flowTree
- GraphQL mutations: cancelJob, redriveJob, retryJob, runJobNow, deleteJob, clearJobs
- GraphQL subscriptions: jobStatusChanged, statsUpdated (SSE)
- Auth: token, basic, custom middleware, or disabled
- PubSub for real-time event streaming
- Commands: status, inspect, cancel, retry, redrive, run-now, delete, clear, flow
- Transport: direct adapter or remote GraphQL
- Flow command with ASCII tree visualization
- --json flag for machine-readable output
- Config via VORSTEH_QUEUE_URL and VORSTEH_QUEUE_TOKEN env vars
…nterface

- Updated SharedTestContext for new adapter methods
- Comprehensive test suite: CRUD, status, cancellation, DLQ, groups, unique, batch, cron, timeout, progress
- Upgrade TypeScript target and lib from ES2022 to ES2024 in base and build configs
- Add DOM lib to build.json for browser environment support
- Replace baseUrl/paths alias with rootDir configuration in build.json
- Reorganize package.json fields for consistency (move version before private)
- Ensures tooling aligns with modern JavaScript features and simplifies path resolution
- Upgrade all example tsconfig.json files to ES2024 target and modern module resolution
- Update drizzle-orm from ^0.45.1 to ^0.45.2 across drizzle-based examples
- Reorder package.json fields for consistency (private field moved before description)
- Migrate batch-processing example from Queue batch API to Worker-based pattern
- Add new example projects: flow-producer, graphql-server, group-fifo, rate-limiting, unique-jobs, workflow-saga, workflow-signals
- Rename kysely migration files from snake_case to kebab-case for consistency
- Remove deprecated prisma-client-js example in favor of unified prisma-client structure
- Add prisma.config.ts to prisma examples for explicit configuration
- Format drizzle.config.ts and database connection strings for improved readability
- Update all example implementations to match latest adapter and Worker API
- Add changeset for @vorsteh-queue/adapter-drizzle 1.0 with QueueAdapter interface rewrite and schema changes
- Add changeset for @vorsteh-queue/adapter-kysely 1.0 with QueueAdapter interface rewrite and schema changes
- Add changeset for @vorsteh-queue/adapter-prisma 1.0 with QueueAdapter interface rewrite and schema changes
- Add changeset for @vorsteh-queue/cli initial release with job management commands
- Add changeset for @vorsteh-queue/core 1.0 with Queue/Worker split, job cancellation, DLQ, and job steps
- Add changeset for retry, redrive, and delete operations across all packages
- Add changeset for workflow engine integration
- Format markdown tables in copilot instructions and contributing guide
- Break long TypeScript function signatures across multiple lines for readability
- Reorganize package.json fields for consistent ordering (private, license, author, type)
- Move engines and packageManager to end of package.json
- Rename postinstall script to _postinstall to prevent automatic execution
- Remove prettier dependency from lock file, standardize on oxfmt
- Remove vite-tsconfig-paths dependency from lock file
- Add linter overrides for examples directory to allow console usage and async patterns
- Fix trailing commas and formatting in README.md code examples
- Improve overall code consistency across configuration and documentation
…erver UI

- Replace rolldown.config.ts with tsdown.config.ts across all adapter packages (drizzle, kysely, prisma), core, cli, and server
- Remove tsconfig.build.json files from all packages in favor of unified tsdown configuration
- Migrate cli package: restructure commands with metadata system, add serve command, extract command options
- Simplify adapter package READMEs with concise descriptions and basic installation/setup guidance
- Restructure server package: reorganize API layer, add authentication middleware, introduce UI layer with React components
- Add GraphQL schema, environment type definitions, and Vite configuration for server UI build
- Add shadcn/ui component library integration with components.json
- Create server UI with TanStack Router, GraphQL client, dashboard routes for jobs, flows, and DLQ management
- Update all package.json files to reference new build configuration and dependencies
- Embedded web dashboard UI into server package, served as static assets via Hono
- Simplified authentication: `tokens: string[]`, custom middleware, or `false` (removed basic auth)
- Added `loadConfig()` to load `queue.config.ts` via c12
- Restructured server: `src/api/` (GraphQL schema, auth, pubsub) + `src/ui/` (React SPA)
- Implemented `jobs` and `flows` GraphQL queries (jobs was previously a stub)
- Added `getJobs()` and `getFlows()` to QueueAdapter interface across all adapters
- Updated dashboard UI with overview stats, jobs list (filtered/paginated), job detail, DLQ, flows, and flow DAG visualization
- Migrated VS Code settings from ESLint/Prettier to Oxc for linting and formatting
- Updated repository documentation with package table and simplified feature list
- Removed examples readme and deprecated TypeScript build configuration
- Updated dependencies and lock file
- Add changeset documenting breaking change for Node.js 22 requirement
- Update engine constraint to `node: >=22` in all packages
- Apply to core, adapters (drizzle, kysely, prisma), cli, and server
- Align with current active LTS and enable use of stable native fetch and improved AbortSignal support
- Add comprehensive JSDoc documentation standards for public-facing code
- Document required JSDoc headers for classes, functions, methods, and interfaces
- Specify what should NOT have JSDoc (private helpers, tests, obvious utilities)
- Include JSDoc examples for function registration and interface properties
- Clarify when to use inline comments vs self-documenting code
- Format commands reference table for improved readability and alignment
- Remove duplicate JSDoc guidance from general section to avoid confusion
@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: af3b3eb

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vorsteh-queue-docs Ready Ready Preview, Comment Jul 12, 2026 4:32pm

- Change auth config from `{ type: "token", token: "..." }` to `{ tokens: [...] }` for simpler token management
- Allow GraphiQL UI to load without authentication for browser requests accepting HTML
- Fix dashboard UI path resolution to work correctly in both development and production environments
- Add `path` import from `node:path` for proper path handling
- Resolve UI directory dynamically based on runtime location (src vs dist)
- Update example to reflect new auth configuration format
noxify added 2 commits July 8, 2026 21:49
- Accept both "Bearer <token>" and plain "<token>" token formats
- Remove strict Bearer prefix requirement for flexibility
- Add conditional logic to handle both token formats gracefully
- Improves compatibility with clients that send tokens without Bearer prefix
- Add graphqlEndpoint config option to ServerConfig for remote server support
- Add /api/config endpoint to expose GraphQL endpoint and auth status to dashboard
- Fetch server config on app initialization instead of using localStorage
- Construct absolute GraphQL URLs using window.location.origin when needed
- Remove endpoint input field from login page (now server-configured)
- Remove localStorage persistence for endpoint and token settings
- Update login description to focus on token entry only
- Simplifies deployment by allowing the dashboard to auto-discover the GraphQL endpoint
noxify added 4 commits July 10, 2026 17:35
- Remove all dashboard UI components, routes, and styling from server package
- Delete GraphQL schema file and Vite build configuration
- Remove UI-related dependencies (React, TanStack Router, Tailwind, etc.)
- Simplify build scripts to single tsdown command for API-only compilation
- Update package.json description to reflect API-only focus
- Remove separate tsconfig files for API and UI, consolidate to single config
- Update dev and typecheck scripts to remove UI build steps
- Upgrade tsdown to 0.22.4 and @pothos/core to 4.13.1 across packages
- Upgrade development dependencies (oxlint-plugin-react-doctor, ultracite, lucide-react)
- Server now focuses exclusively on GraphQL API serving, with dashboard managed separately
- Add direct transport mode to communicate with queue adapter without remote server
- Implement doctor command to diagnose configuration and connectivity issues
- Add transport resolution logic to automatically detect direct vs remote mode
- Create error boundary utilities for consistent error handling
- Add GraphQL health check for remote mode connectivity validation
- Restructure transport layer with resolve and with-transport utilities
- Update CLI commands to support both direct and remote transports
- Add comprehensive test coverage for doctor command, transport resolution, and health checks
- Update installation documentation with transport modes and configuration guidance
- Update serve command description to clarify GraphQL-only functionality
- Simplify server package documentation by removing dashboard references
- Add global --url and --token options for remote mode configuration
…tion

- Update CLI installation guide with new queue.config.ts pattern supporting multiple queues
- Add new `queues` command documentation for listing configured queues
- Restructure queue configuration examples to use Queue instances and adapter pattern
- Add project structure guide to getting started documentation
- Reorganize about section in queue documentation
- Add observability documentation covering monitoring and metrics
- Update adapter documentation (Drizzle, Prisma, Kysely) with new configuration patterns
- Migrate all example projects to use queue.config.ts with Queue instances
- Replace example readme.mdx files with queue.config.ts and queues.ts source files
- Add tsconfig.json to examples requiring TypeScript compilation
- Implement queues CLI command with metadata handling and queue resolution
- Add telemetry module to core package for observability support
- Add queue getter methods for improved queue introspection
- Update server schema and configuration for queue management
- Add template list component and templates route for dynamic example documentation
- Update package dependencies and exports across adapter packages
- Standardize CLI options with new --queue flag for queue selection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant