188f008715
## Summary 4 improvements, 5 bug fixes. ## Improvements - Add SDK and API client helpers for run bulk actions. ([#4105](https://github.com/triggerdotdev/trigger.dev/pull/4105)) - Large batch payloads now offload to object storage instead of riding inline in the trigger request. `batchTrigger` and `batchTriggerAndWait` (and the by-id and by-task variants) offload any per-item payload over 128KB before sending, the same way single `trigger` and `triggerAndWait` already do, so a big batch no longer blows past the API body limit. ([#4165](https://github.com/triggerdotdev/trigger.dev/pull/4165)) - Removed internal helpers that were only used by the end-of-life v3 self-hosted compute providers. ([#4194](https://github.com/triggerdotdev/trigger.dev/pull/4194)) - Add an `onEvent` callback to `TriggerChatTransport` / `useTriggerChatTransport` that emits typed lifecycle events for sends, stream connects, first chunk, and turn completion. Send-success metrics, time-to-first-token, and "sent but never answered" watchdogs become a few lines of client code. ([#4187](https://github.com/triggerdotdev/trigger.dev/pull/4187)) ```ts onEvent: (event) => { if (event.type === "message-sent") metrics.timing("chat.send_ms", event.durationMs); if (event.type === "first-chunk") metrics.timing("chat.ttft_ms", event.sinceSendMs ?? 0); }, ``` ## Bug fixes - fix(cli): honor the MCP server's `--dev-only` flag ([#4199](https://github.com/triggerdotdev/trigger.dev/pull/4199)) - Fix chat turns that throw (for example from an `onTurnStart` hook) leaking their message listener, which lost or duplicated messages sent during later turns. ([#4176](https://github.com/triggerdotdev/trigger.dev/pull/4176)) - Fix `chat.agent` and `chat.createSession` permanently dropping user messages when several arrived during a single turn: every buffered message is now dispatched as its own turn instead of only the first. ([#4176](https://github.com/triggerdotdev/trigger.dev/pull/4176)) - Fix chat continuation runs replaying already-answered messages: turns delivered while the run was suspended now advance the session.in resume cursor, so a new run picks up exactly where the previous one left off. ([#4176](https://github.com/triggerdotdev/trigger.dev/pull/4176)) - Fix `chat.createSession` swallowing a message sent shortly after stopping a turn: the turn's message listener now detaches when the stream settles, so those messages run as the next turn. ([#4176](https://github.com/triggerdotdev/trigger.dev/pull/4176)) <details> <summary>Raw changeset output</summary> # Releases ## @trigger.dev/build@4.5.2 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.2` ## trigger.dev@4.5.2 ### Patch Changes - fix(cli): honor the MCP server's `--dev-only` flag ([#4199](https://github.com/triggerdotdev/trigger.dev/pull/4199)) - Updated dependencies: - `@trigger.dev/core@4.5.2` - `@trigger.dev/build@4.5.2` - `@trigger.dev/schema-to-json@4.5.2` ## @trigger.dev/core@4.5.2 ### Patch Changes - Add SDK and API client helpers for run bulk actions. ([#4105](https://github.com/triggerdotdev/trigger.dev/pull/4105)) - Large batch payloads now offload to object storage instead of riding inline in the trigger request. `batchTrigger` and `batchTriggerAndWait` (and the by-id and by-task variants) offload any per-item payload over 128KB before sending, the same way single `trigger` and `triggerAndWait` already do, so a big batch no longer blows past the API body limit. ([#4165](https://github.com/triggerdotdev/trigger.dev/pull/4165)) - Removed internal helpers that were only used by the end-of-life v3 self-hosted compute providers. ([#4194](https://github.com/triggerdotdev/trigger.dev/pull/4194)) ## @trigger.dev/python@4.5.2 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.2` - `@trigger.dev/sdk@4.5.2` - `@trigger.dev/build@4.5.2` ## @trigger.dev/react-hooks@4.5.2 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.2` ## @trigger.dev/redis-worker@4.5.2 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.2` ## @trigger.dev/rsc@4.5.2 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.2` ## @trigger.dev/schema-to-json@4.5.2 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.2` ## @trigger.dev/sdk@4.5.2 ### Patch Changes - Add SDK and API client helpers for run bulk actions. ([#4105](https://github.com/triggerdotdev/trigger.dev/pull/4105)) - Fix chat turns that throw (for example from an `onTurnStart` hook) leaking their message listener, which lost or duplicated messages sent during later turns. ([#4176](https://github.com/triggerdotdev/trigger.dev/pull/4176)) - Fix `chat.agent` and `chat.createSession` permanently dropping user messages when several arrived during a single turn: every buffered message is now dispatched as its own turn instead of only the first. ([#4176](https://github.com/triggerdotdev/trigger.dev/pull/4176)) - Fix chat continuation runs replaying already-answered messages: turns delivered while the run was suspended now advance the session.in resume cursor, so a new run picks up exactly where the previous one left off. ([#4176](https://github.com/triggerdotdev/trigger.dev/pull/4176)) - Fix `chat.createSession` swallowing a message sent shortly after stopping a turn: the turn's message listener now detaches when the stream settles, so those messages run as the next turn. ([#4176](https://github.com/triggerdotdev/trigger.dev/pull/4176)) - Add an `onEvent` callback to `TriggerChatTransport` / `useTriggerChatTransport` that emits typed lifecycle events for sends, stream connects, first chunk, and turn completion. Send-success metrics, time-to-first-token, and "sent but never answered" watchdogs become a few lines of client code. ([#4187](https://github.com/triggerdotdev/trigger.dev/pull/4187)) ```ts onEvent: (event) => { if (event.type === "message-sent") metrics.timing("chat.send_ms", event.durationMs); if (event.type === "first-chunk") metrics.timing("chat.ttft_ms", event.sinceSendMs ?? 0); }, ``` - Large batch payloads now offload to object storage instead of riding inline in the trigger request. `batchTrigger` and `batchTriggerAndWait` (and the by-id and by-task variants) offload any per-item payload over 128KB before sending, the same way single `trigger` and `triggerAndWait` already do, so a big batch no longer blows past the API body limit. ([#4165](https://github.com/triggerdotdev/trigger.dev/pull/4165)) - Updated dependencies: - `@trigger.dev/core@4.5.2` ## @trigger.dev/plugins@4.5.2 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.2` </details> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
221 lines
5.9 KiB
JSON
221 lines
5.9 KiB
JSON
{
|
|
"name": "@trigger.dev/sdk",
|
|
"version": "4.5.2",
|
|
"description": "trigger.dev Node.JS SDK",
|
|
"license": "MIT",
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/triggerdotdev/trigger.dev",
|
|
"directory": "packages/trigger-sdk"
|
|
},
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"files": [
|
|
"dist",
|
|
"docs",
|
|
"skills"
|
|
],
|
|
"tshy": {
|
|
"selfLink": false,
|
|
"main": true,
|
|
"module": true,
|
|
"project": "./tsconfig.build.json",
|
|
"exports": {
|
|
"./package.json": "./package.json",
|
|
".": "./src/v3/index.ts",
|
|
"./v3": "./src/v3/index.ts",
|
|
"./ai": "./src/v3/ai.ts",
|
|
"./ai/skills-runtime": "./src/v3/agentSkillsRuntime.ts",
|
|
"./ai/test": "./src/v3/test/index.ts",
|
|
"./chat": "./src/v3/chat.ts",
|
|
"./chat/react": "./src/v3/chat-react.ts",
|
|
"./chat-server": "./src/v3/chat-server.ts"
|
|
},
|
|
"sourceDialects": [
|
|
"@triggerdotdev/source"
|
|
]
|
|
},
|
|
"typesVersions": {
|
|
"*": {
|
|
"v3": [
|
|
"dist/commonjs/v3/index.d.ts"
|
|
],
|
|
"ai": [
|
|
"dist/commonjs/v3/ai.d.ts"
|
|
],
|
|
"ai/skills-runtime": [
|
|
"dist/commonjs/v3/agentSkillsRuntime.d.ts"
|
|
],
|
|
"ai/test": [
|
|
"dist/commonjs/v3/test/index.d.ts"
|
|
],
|
|
"chat": [
|
|
"dist/commonjs/v3/chat.d.ts"
|
|
],
|
|
"chat/react": [
|
|
"dist/commonjs/v3/chat-react.d.ts"
|
|
],
|
|
"chat-server": [
|
|
"dist/commonjs/v3/chat-server.d.ts"
|
|
]
|
|
}
|
|
},
|
|
"scripts": {
|
|
"clean": "rimraf dist docs .tshy .tshy-build .turbo",
|
|
"build": "tshy && pnpm run update-version && pnpm run bundle-docs",
|
|
"bundle-docs": "tsx ../../scripts/bundleSdkDocs.ts",
|
|
"dev": "tshy --watch",
|
|
"typecheck": "tsc --noEmit",
|
|
"typecheck:ai-v7": "tsc --noEmit -p tsconfig.ai-v7.json",
|
|
"test": "vitest",
|
|
"update-version": "tsx ../../scripts/updateVersion.ts",
|
|
"check-exports": "attw --pack ."
|
|
},
|
|
"dependencies": {
|
|
"@opentelemetry/api": "1.9.1",
|
|
"@opentelemetry/semantic-conventions": "1.41.1",
|
|
"@trigger.dev/core": "workspace:4.5.2",
|
|
"chalk": "^5.2.0",
|
|
"cronstrue": "^2.21.0",
|
|
"debug": "^4.3.4",
|
|
"evt": "^2.4.13",
|
|
"slug": "^6.0.0",
|
|
"ulid": "^2.3.0",
|
|
"uncrypto": "^0.1.3",
|
|
"ws": "^8.11.0"
|
|
},
|
|
"devDependencies": {
|
|
"@ai-sdk/provider": "3.0.8",
|
|
"@arethetypeswrong/cli": "^0.15.4",
|
|
"@types/debug": "^4.1.7",
|
|
"@types/react": "^19.2.14",
|
|
"@types/slug": "^5.0.3",
|
|
"@types/ws": "^8.5.3",
|
|
"ai": "^6.0.116",
|
|
"ai-v7": "npm:ai@7.0.0-canary.159",
|
|
"encoding": "^0.1.13",
|
|
"rimraf": "^6.0.1",
|
|
"tshy": "^3.0.2",
|
|
"tsx": "4.17.0",
|
|
"typed-emitter": "^2.1.0",
|
|
"zod": "3.25.76"
|
|
},
|
|
"peerDependencies": {
|
|
"@ai-sdk/otel": ">=1.0.0-0 <2",
|
|
"ai": "^5.0.0 || ^6.0.0 || >=7.0.0-canary <8",
|
|
"react": "^18.0 || ^19.0",
|
|
"zod": "^3.0.0 || ^4.0.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"@ai-sdk/otel": {
|
|
"optional": true
|
|
},
|
|
"ai": {
|
|
"optional": true
|
|
},
|
|
"react": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"engines": {
|
|
"node": ">=18.20.0"
|
|
},
|
|
"exports": {
|
|
"./package.json": "./package.json",
|
|
".": {
|
|
"import": {
|
|
"@triggerdotdev/source": "./src/v3/index.ts",
|
|
"types": "./dist/esm/v3/index.d.ts",
|
|
"default": "./dist/esm/v3/index.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/commonjs/v3/index.d.ts",
|
|
"default": "./dist/commonjs/v3/index.js"
|
|
}
|
|
},
|
|
"./v3": {
|
|
"import": {
|
|
"@triggerdotdev/source": "./src/v3/index.ts",
|
|
"types": "./dist/esm/v3/index.d.ts",
|
|
"default": "./dist/esm/v3/index.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/commonjs/v3/index.d.ts",
|
|
"default": "./dist/commonjs/v3/index.js"
|
|
}
|
|
},
|
|
"./ai": {
|
|
"import": {
|
|
"@triggerdotdev/source": "./src/v3/ai.ts",
|
|
"types": "./dist/esm/v3/ai.d.ts",
|
|
"default": "./dist/esm/v3/ai.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/commonjs/v3/ai.d.ts",
|
|
"default": "./dist/commonjs/v3/ai.js"
|
|
}
|
|
},
|
|
"./ai/skills-runtime": {
|
|
"import": {
|
|
"@triggerdotdev/source": "./src/v3/agentSkillsRuntime.ts",
|
|
"types": "./dist/esm/v3/agentSkillsRuntime.d.ts",
|
|
"default": "./dist/esm/v3/agentSkillsRuntime.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/commonjs/v3/agentSkillsRuntime.d.ts",
|
|
"default": "./dist/commonjs/v3/agentSkillsRuntime.js"
|
|
}
|
|
},
|
|
"./ai/test": {
|
|
"import": {
|
|
"@triggerdotdev/source": "./src/v3/test/index.ts",
|
|
"types": "./dist/esm/v3/test/index.d.ts",
|
|
"default": "./dist/esm/v3/test/index.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/commonjs/v3/test/index.d.ts",
|
|
"default": "./dist/commonjs/v3/test/index.js"
|
|
}
|
|
},
|
|
"./chat": {
|
|
"import": {
|
|
"@triggerdotdev/source": "./src/v3/chat.ts",
|
|
"types": "./dist/esm/v3/chat.d.ts",
|
|
"default": "./dist/esm/v3/chat.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/commonjs/v3/chat.d.ts",
|
|
"default": "./dist/commonjs/v3/chat.js"
|
|
}
|
|
},
|
|
"./chat/react": {
|
|
"import": {
|
|
"@triggerdotdev/source": "./src/v3/chat-react.ts",
|
|
"types": "./dist/esm/v3/chat-react.d.ts",
|
|
"default": "./dist/esm/v3/chat-react.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/commonjs/v3/chat-react.d.ts",
|
|
"default": "./dist/commonjs/v3/chat-react.js"
|
|
}
|
|
},
|
|
"./chat-server": {
|
|
"import": {
|
|
"@triggerdotdev/source": "./src/v3/chat-server.ts",
|
|
"types": "./dist/esm/v3/chat-server.d.ts",
|
|
"default": "./dist/esm/v3/chat-server.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/commonjs/v3/chat-server.d.ts",
|
|
"default": "./dist/commonjs/v3/chat-server.js"
|
|
}
|
|
}
|
|
},
|
|
"main": "./dist/commonjs/v3/index.js",
|
|
"types": "./dist/commonjs/v3/index.d.ts",
|
|
"module": "./dist/esm/v3/index.js"
|
|
}
|