Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
19047fe
get basics working
juliusgeo Mar 31, 2026
fcf81f4
make it work with both workflows and standalone tasks
juliusgeo Apr 1, 2026
69217dc
Merge branch 'main' into claude_mcp_ts
juliusgeo Apr 2, 2026
b527220
get it working for claude
juliusgeo Apr 2, 2026
ac1d279
get it working for both of them
juliusgeo Apr 2, 2026
3ceef0b
update lockfile
juliusgeo Apr 2, 2026
08c4f32
make arg partial and add to package.json
juliusgeo Apr 2, 2026
d8cf10b
fix some lint stuff
juliusgeo Apr 2, 2026
523b61e
fix some things
juliusgeo Apr 2, 2026
106faba
fix openai example
juliusgeo Apr 2, 2026
471ebbb
fix lint
juliusgeo Apr 2, 2026
64e057c
will this fix the issue...
juliusgeo Apr 2, 2026
247f0f5
use pnpm to run tsc
juliusgeo Apr 2, 2026
4e8d493
updating openai version fixes
juliusgeo Apr 6, 2026
3205f7c
refactor into separate files
juliusgeo Apr 6, 2026
a7b6575
move around error catching, etc
juliusgeo Apr 6, 2026
df2b605
merge
juliusgeo Apr 6, 2026
914657e
fix some weird dependency stuff
juliusgeo Apr 6, 2026
f130e26
switch to zod4
juliusgeo Apr 6, 2026
3ed1a07
silence eslintpnpm run eslint:check
juliusgeo Apr 6, 2026
ca15f85
Merge branch 'main' into claude_mcp_ts
juliusgeo Apr 8, 2026
78dd195
Merge branch 'main' into claude_mcp_ts
juliusgeo Apr 28, 2026
2cd106d
support zod 3 and 4
juliusgeo Apr 28, 2026
6d35ae7
address comments
juliusgeo Apr 28, 2026
545581d
fix all imports
juliusgeo Apr 28, 2026
7b4bffc
use zod 4 in lockfile
juliusgeo Apr 28, 2026
de19aeb
fix another issue lol
juliusgeo Apr 28, 2026
7af4715
generate all
juliusgeo Apr 28, 2026
0bd9a37
fix test
juliusgeo Apr 28, 2026
1039e95
fix generated stuff
juliusgeo Apr 28, 2026
6b6bc7f
Merge branch 'main' into claude_mcp_ts
juliusgeo Apr 28, 2026
ebb4e23
bump package.json
juliusgeo Apr 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/sdk-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: pnpm lint:check

- name: Type check
run: npx tsc
run: pnpm exec tsc

test-unit:
runs-on: ubicloud-standard-4
Expand Down
10 changes: 7 additions & 3 deletions examples/typescript/durable/workflow.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { z } from 'zod';
import { z } from 'zod/v4';
import { Or, SleepCondition, UserEventCondition } from '@hatchet-dev/typescript-sdk/v1/conditions';
import { NonDeterminismError } from '@hatchet-dev/typescript-sdk/util/errors/non-determinism-error';
import sleep from '@hatchet-dev/typescript-sdk/util/sleep';
Expand Down Expand Up @@ -254,6 +254,10 @@ const lookbackEventPayloadSchema = z.object({
user_id: z.number(),
});

const twoEventsPayloadSchema = z.object({
order: z.string(),
});

export const waitForEventLookback = hatchet.durableTask({
name: 'wait-for-event-lookback',
executionTimeout: '10m',
Expand Down Expand Up @@ -312,14 +316,14 @@ export const waitForTwoEventsSecondPushedFirst = hatchet.durableTask({
const event1 = await ctx.waitForEvent(
'key1',
undefined,
undefined,
twoEventsPayloadSchema,
input.scope,
LOOKBACK_WINDOW
);
const event2 = await ctx.waitForEvent(
'key2',
undefined,
undefined,
twoEventsPayloadSchema,
input.scope,
LOOKBACK_WINDOW
);
Expand Down
6 changes: 6 additions & 0 deletions examples/typescript/simple/run.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { hatchet } from '../hatchet-client';
import { simple } from './workflow';
import { parent } from './workflow-with-child';
import { simpleWithZod } from './zod';

async function main() {
// > Running a Task
Expand All @@ -15,6 +16,11 @@ async function main() {
}
);

const res3 = await simpleWithZod.run({
Message: 'HeLlO WoRlD',
});
console.log(res3.TransformedMessage);

// 👀 Access the results of the Task
console.log(res.TransformedMessage);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/simple/zod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// > Declaring a Task
import * as z from 'zod';
import * as z from 'zod/v4';
import { hatchet } from '../hatchet-client';

const SimpleInputSchema = z.object({
Expand Down
8 changes: 8 additions & 0 deletions sdks/typescript/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to Hatchet's TypeScript SDK will be documented in this chang
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.22.0] - 2026-04-28

### Added

- Adds `mcpTool` method to Workflow objects for integration with Claude and OpenAI agent SDKs. Requires Zod v4.
- Bumps minimum Zod version to `3.25.0`. Zod schemas provided to the SDK must be Zod 4 schemas, but you can still use Zod 3 in your application
code.

## [1.21.2] - 2026-04-22

### Added
Expand Down
14 changes: 10 additions & 4 deletions sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hatchet-dev/typescript-sdk",
"version": "1.21.2",
"version": "1.22.0",
"description": "Background task orchestration & visibility for developers",
"types": "dist/index.d.ts",
"files": [
Expand Down Expand Up @@ -44,7 +44,6 @@
"license": "MIT",
"devDependencies": {
"@eslint/js": "^10.0.1",
"@tsd/typescript": "^5.9.3",
"@types/jest": "^29.5.14",
"@types/node": "^22.13.14",
"autoprefixer": "^10.4.27",
Expand All @@ -63,6 +62,8 @@
"ts-jest": "^29.4.6",
"ts-node": "^10.9.2",
"ts-proto": "^2.11.4",
"tsconfig-paths": "^4.2.0",
"tsx": "^4.21.0",
"typedoc": "^0.28.17",
"typedoc-plugin-markdown": "^4.10.0",
"typedoc-plugin-no-inherit": "^1.6.1",
Expand All @@ -81,11 +82,16 @@
"qs": "^6.14.2",
"semver": "^7.7.4",
"yaml": "^2.8.2",
"zod": "^3.24.2",
"zod-to-json-schema": "^3.24.1"
"zod-to-json-schema": "^3.24.2"
},
"peerDependencies": {
"zod": "^3.25.0 || ^4.0.0"
},
"optionalDependencies": {
"@anthropic-ai/claude-agent-sdk": "^0.2.87",
"@grpc/grpc-js": "^1.14.3",
"@modelcontextprotocol/sdk": "^1.29.0",
"@openai/agents": "0.8.3",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/core": "^2.0.0",
"@opentelemetry/exporter-trace-otlp-grpc": "^0.215.0",
Expand Down
Loading
Loading