Skip to content

Conversation

@eersnington
Copy link
Contributor

@eersnington eersnington commented Nov 5, 2025

Hey @Schniz, I was wondering if I can introduce changes to the world spec, specifically local world spec to allow users to configure base URL for queue streams.

Here's the reference issue #201 (comment) where a user had --experimental-https flag enabled but could get workflows to start cause the queue requests hard codes "http" as protocol. I think it would massively improve the DX if users can configure the base URL through either a config or Env vars because the current workaround is hacky at best.

The PR is draft and not complete at all ATM (haven't tested too). I want to introduce changes so the following are possible with local world:

  • Call createEmbeddedWorld({}) with no env overrides to use .workflow-data and http://localhost:3000
  • Pin the listener port only: createEmbeddedWorld({ port: 4010 }) -> queue hits http://localhost:4010
  • Ephemeral ports for tests: createEmbeddedWorld({ port: 0 })
  • Supply a full base URL so calls reach a proxy: createEmbeddedWorld({ baseUrl: 'https://example.com/workflow-proxy' }) (path kept, trailing slash trimmed)
  • Or through an Env vars:
WORKFLOW_BASE_URL=https://world.acme.com/workflow
WORKFLOW_EMBEDDED_DATA_DIR=/var/run/workflow
PORT=5000

Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
@changeset-bot
Copy link

changeset-bot bot commented Nov 5, 2025

⚠️ No Changeset found

Latest commit: b7840d6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link
Contributor

vercel bot commented Nov 5, 2025

@eersnington is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@eersnington
Copy link
Contributor Author

eersnington commented Nov 5, 2025

⚠️ No Changeset found

Latest commit: 09a465c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

will add this at the end if Gal approves of this idea or if this will interfere with any other plans of his

Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also added sourceURL which might come in handy for better errors

Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
@eersnington
Copy link
Contributor Author

@workflow/world-local:build
@workflow/core:test
cache miss, executing 083efc37933e9dd9
 @workflow/core@4.0.1-beta.9 test D:\a\workflow\workflow\packages\core
  WORKFLOW_TARGET_WORLD=embedded vitest run src
 'WORKFLOW_TARGET_WORLD' is not recognized as an internal or external command,
operable program or batch file.


 Looks like the Windows unit tests is failing due to windowisms. iirc, you set an env var in windows with "set"

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