Skip to content

typescript SDK, node and ts upgrades - #13

Merged
vandervillain merged 50 commits into
mainfrom
typescript-sdk
Aug 20, 2026
Merged

vandervillain merged 50 commits into
mainfrom
typescript-sdk

Conversation

@vandervillain

@vandervillain vandervillain commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

This branch builds out the TypeScript SDK to feature parity with the Java, Python, and Go SDKs. The remaining differences are intentional and documented in IWF_SDK_FEATURES.md.

What's here

  • Core: workflow/state definitions, the waitUntil/execute lifecycle, commands and command results, and all state-decision types (including conditional close).
  • Persistence: data attributes, all search-attribute types, state locals, event recording, and prefix-based dynamic data attributes/channels.
  • Communication: signal and internal channels, publishing, and channel-size queries.
  • RPC: define, invoke, and the worker-side handler.
  • The full client API (start, stop, describe, reset, signals, search, attributes, timers, RPC, results) with start options like delay, initial attributes, idempotent start, and waiting on specific states to finish.

Parity audit
I audited the whole surface against the Java SDK and closed every gap it found — execute-failure recovery state, per-API persistence loading policies, useMemoForDataAttributes, no-wait "try-get" results, workflowAlreadyStartedOptions / skipUpdateReapply, sending registered search-attribute key-types on RPC, and the runtime validation Java does (single starting state, attribute-type checks, empty-decision rejection, duplicate recordEvent keys, publish-and-wait on one channel, duplicate registration, etc.). Also fixed getSearchAttributeInt precision and the datetime format handling.

Housekeeping

  • Bumped iwf-idl to 1.0.0-121 and regenerated the client; fixed several skeleton bugs (wrong server URL, a misspelled context field, a mapper that dropped commands, a config option that was never stored, and the worker RPC callback path).
  • Moved the build to nodenext + isolatedModules (still CommonJS output, no downstream change).
  • Dependency cleanup: dropped immutable (cleared a prototype-pollution advisory), bumped axios and jest; npm audit is clean.

A few things are deliberately idiomatic for TS: a pluggable ObjectEncoder instead of Class-based typing, a flatter error model with boolean getters, and a single string-named RPC handler instead of Java's functional-interface variants.

@vandervillain
vandervillain marked this pull request as ready for review July 1, 2026 00:07

@longquanzheng longquanzheng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

would be nice to start with adding the CI workflow in github action, like other SDKs. otherwise looks great.

@vandervillain

Copy link
Copy Markdown
Contributor Author

would be nice to start with adding the CI workflow in github action, like other SDKs. otherwise looks great.

@longquanzheng are you referring running integration tests on PR merge? (like https://github.com/indeedeng/iwf-java-sdk/blob/main/.github/workflows/ci-integ-test.yml). I can get those in if so.

We're also building out an internal repo with typescript samples (similar to all the java samples) and verifying 100% parity before merging this PR. We'll probably add a more generic version of those samples for the public space as well.

@longquanzheng

Copy link
Copy Markdown
Contributor

would be nice to start with adding the CI workflow in github action, like other SDKs. otherwise looks great.

@longquanzheng are you referring running integration tests on PR merge? (like https://github.com/indeedeng/iwf-java-sdk/blob/main/.github/workflows/ci-integ-test.yml). I can get those in if so.

We're also building out an internal repo with typescript samples (similar to all the java samples) and verifying 100% parity before merging this PR. We'll probably add a more generic version of those samples for the public space as well.

yes exactly.

vandervillain and others added 24 commits July 28, 2026 10:52
…lowDataAttributes

getAllWorkflowDataAttributes resolved the registry's exactly-declared keys and
sent them as a key filter, so any runtime-named attribute written under a
dataAttributePrefixDef was silently missing from the result. Send no filter
instead, which the iwf server treats as "return everything" — matching Java's
Client.getAllDataAttributes, which passes null keys for exactly this reason.

getAllWorkflowSearchAttributes is intentionally left alone: Java also builds the
full declared key-type list there, since the server needs the types to decode.

Found while porting the Java integration suite (AUTOPLAT-1933), where
PersistenceTest.testPersistenceWorkflow asserts 5 data attributes and the TS
port saw 4.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
include prefix-declared data attributes in getAllWorkflowDataAttributes
… and export workflow already started options
default waitForStateExecutionCompletion stateExecutionNumber to 1
…eOptionsOverrideTest and AnyCommandCombinationTest
AUTOPLAT-1937: add method to get all internal channel command results…
prepare script to temporarily unblock ci
Make Failure Recovery settings consistent with Java SDK
@vandervillain
vandervillain merged commit 4346094 into main Aug 20, 2026
1 check passed
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.

3 participants