runwork 0.17.1 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,11 +1,11 @@
1
- Copyright (c) 2025-2026 Runwork All rights reserved.
1
+ Copyright (c) 2025-2026 Runwork, Inc. All rights reserved.
2
2
 
3
3
  This software and associated documentation files (the "Software") are the
4
- proprietary and confidential property of Runwork
4
+ proprietary and confidential property of Runwork, Inc.
5
5
 
6
6
  No part of the Software may be copied, modified, distributed, sublicensed,
7
7
  sold, or otherwise made available to any third party without the prior
8
- written consent of Runwork
8
+ written consent of Runwork, Inc.
9
9
 
10
10
  You may use the Software solely as a tool to interact with the Runwork
11
11
  platform in accordance with the Runwork Terms of Service.
@@ -44,6 +44,15 @@ export interface JobResult {
44
44
  /** Additional result data (varies by job) */
45
45
  [key: string]: unknown;
46
46
  }
47
+ /**
48
+ * Wire-safe schedule definition: what crosses the RPC boundary into
49
+ * SchedulerDO. Deliberately excludes the handler function; over DO RPC a
50
+ * function arrives as a callback stub, and invoking a stubbed handler
51
+ * serializes JobContext back to the calling isolate, where env bindings (R2
52
+ * buckets, DO namespaces) cannot be serialized (AGENTCLI-6). Handlers are
53
+ * bound inside the DO from its own isolate's module registry.
54
+ */
55
+ export type ScheduledJobDefinition = Omit<ScheduledJob, 'handler'> & Partial<Pick<ScheduledJob, 'handler'>>;
47
56
  export interface JobLogger {
48
57
  info(message: string, data?: Record<string, unknown>): void;
49
58
  warn(message: string, data?: Record<string, unknown>): void;
@@ -134,7 +143,7 @@ export declare class SchedulerDO extends DurableObject<Env> {
134
143
  * Initialize the job scheduler with job definitions.
135
144
  * Can be called again after HMR to sync new/changed job definitions.
136
145
  */
137
- initializeJobScheduler(jobs: ScheduledJob[]): Promise<void>;
146
+ initializeJobScheduler(jobs: ScheduledJobDefinition[]): Promise<void>;
138
147
  /**
139
148
  * Handle alarm - execute due jobs
140
149
  */