Skip to content

Commit 61b07db

Browse files
committed
merge commit
1 parent b4cb01e commit 61b07db

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

packages/core/src/experimental/tasks/interfaces.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ import type {
2626
* @experimental
2727
*/
2828
export type CreateTaskServerContext = ServerContext & {
29-
task: { store: RequestTaskStore; requestedTtl?: number | null };
29+
task: { store: RequestTaskStore; requestedTtl?: number };
3030
};
3131

3232
/**
3333
* Server context with guaranteed task ID and store for task operations.
3434
* @experimental
3535
*/
3636
export type TaskServerContext = ServerContext & {
37-
task: { id: string; store: RequestTaskStore; requestedTtl?: number | null };
37+
task: { id: string; store: RequestTaskStore; requestedTtl?: number };
3838
};
3939

4040
/**

packages/core/src/shared/taskManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export interface RequestTaskStore {
151151
export type TaskContext = {
152152
id?: string;
153153
store: RequestTaskStore;
154-
requestedTtl?: number | null;
154+
requestedTtl?: number;
155155
};
156156

157157
export type TaskManagerOptions = {

packages/core/src/types/schemas.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ export const CursorSchema = z.string();
3232
*/
3333
export const TaskCreationParamsSchema = z.looseObject({
3434
/**
35-
* Time in milliseconds to keep task results available after completion.
36-
* If `null`, the task has unlimited lifetime until manually cleaned up.
35+
* Requested duration in milliseconds to retain task from creation.
3736
*/
38-
ttl: z.union([z.number(), z.null()]).optional(),
37+
ttl: z.number().optional(),
3938

4039
/**
4140
* Time in milliseconds to wait between task status requests.

0 commit comments

Comments
 (0)