@astrale-os/adapter-cloudflare 0.5.0-beta.64 → 0.5.0-beta.66

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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.0-beta.66](https://github.com/astrale-os/sdk/compare/adapter-cloudflare-v0.5.0-beta.65...adapter-cloudflare-v0.5.0-beta.66) (2026-08-27)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * The following workspace dependencies were updated
9
+ * dependencies
10
+ * @astrale-os/sdk bumped to 0.5.0-beta.63
11
+
12
+ ## [0.5.0-beta.65](https://github.com/astrale-os/sdk/compare/adapter-cloudflare-v0.5.0-beta.64...adapter-cloudflare-v0.5.0-beta.65) (2026-08-27)
13
+
14
+
15
+ ### Features
16
+
17
+ * **adapter-cloudflare:** configure invocation timeout ([#290](https://github.com/astrale-os/sdk/issues/290)) ([9c4e144](https://github.com/astrale-os/sdk/commit/9c4e144618846e8e1c8d76c432e8d5008285c3b7))
18
+
19
+
20
+ ### Dependencies
21
+
22
+ * The following workspace dependencies were updated
23
+ * dependencies
24
+ * @astrale-os/sdk bumped to 0.5.0-beta.62
25
+
3
26
  ## [0.5.0-beta.64](https://github.com/astrale-os/sdk/compare/adapter-cloudflare-v0.5.0-beta.63...adapter-cloudflare-v0.5.0-beta.64) (2026-08-27)
4
27
 
5
28
 
@@ -0,0 +1,2 @@
1
+ import type { CloudflareParams } from '../../params.js';
2
+ export declare function workerInvocationTimeout(value: CloudflareParams['invocationTimeoutMs']): number | undefined;
@@ -0,0 +1,9 @@
1
+ const MAXIMUM_TIMER_MS = 2_147_483_647;
2
+ export function workerInvocationTimeout(value) {
3
+ if (value === undefined)
4
+ return undefined;
5
+ if (!Number.isSafeInteger(value) || value <= 0 || value > MAXIMUM_TIMER_MS) {
6
+ throw new TypeError('Cloudflare invocationTimeoutMs must be a positive integer within the platform timer range.');
7
+ }
8
+ return value;
9
+ }
@@ -1,4 +1,5 @@
1
1
  export { deploymentAddressing } from './configuration/addressing.js';
2
+ export { workerInvocationTimeout } from './configuration/invocation-timeout.js';
2
3
  export { workerRequestLimit } from './configuration/request-limit.js';
3
4
  export { resolveRouter } from './configuration/router.js';
4
5
  export { workerName } from './configuration/worker-name.js';
@@ -1,4 +1,5 @@
1
1
  export { deploymentAddressing } from './configuration/addressing.js';
2
+ export { workerInvocationTimeout } from './configuration/invocation-timeout.js';
2
3
  export { workerRequestLimit } from './configuration/request-limit.js';
3
4
  export { resolveRouter } from './configuration/router.js';
4
5
  export { workerName } from './configuration/worker-name.js';
@@ -5,6 +5,7 @@ export interface ExecutionCodegenOptions {
5
5
  readonly workerSpecifier?: string;
6
6
  readonly build: Build;
7
7
  readonly maximumRequestBytes?: number;
8
+ readonly invocationTimeoutMs?: number;
8
9
  readonly providerAssignedWorker?: string;
9
10
  readonly router?: {
10
11
  readonly binding: string;
@@ -44,6 +44,7 @@ ${frontend} load: async () => ({
44
44
  resolveEnvironment: runtimeBindings,
45
45
  resolveUrl: (env, requestOrigin) => env.WORKER_URL ?? env.IDENTITY_ISS ?? requestOrigin,
46
46
  ${options.maximumRequestBytes === undefined ? '' : `maximumRequestBytes: ${options.maximumRequestBytes},`}
47
+ ${options.invocationTimeoutMs === undefined ? '' : `invocationTimeoutMs: ${options.invocationTimeoutMs},`}
47
48
  ${options.providerAssignedWorker === undefined ? '' : `providerAssignedWorker: ${JSON.stringify(options.providerAssignedWorker)},`}
48
49
  selfBinding: (env) => env.SELF,${routeSubrequest}
49
50
  })
@@ -4,7 +4,7 @@ import { SIGNING_IDENTITY_BINDING } from '../../identity/binding.js';
4
4
  import { admitWorkerBundle } from '../bundle/admit.js';
5
5
  import { generateExecutionEntry, generateExecutionService } from '../codegen/execution.js';
6
6
  import { generateWranglerConfig } from '../codegen/wrangler.js';
7
- import { workerRequestLimit } from '../configuration.js';
7
+ import { workerInvocationTimeout, workerRequestLimit } from '../configuration.js';
8
8
  import { qualifyWorkerBundle } from '../qualification.js';
9
9
  import { runWranglerBundle } from '../wrangler-cli.js';
10
10
  import { workerModuleSpecifier } from './specifier.js';
@@ -15,12 +15,14 @@ export async function prepareExecution(input) {
15
15
  const runtimeSpecifier = moduleSpecifier(relative(input.directory, runtimePath));
16
16
  const workerSpecifier = workerModuleSpecifier();
17
17
  const maximumRequestBytes = workerRequestLimit(input.params.maximumRequestBytes);
18
+ const invocationTimeoutMs = workerInvocationTimeout(input.params.invocationTimeoutMs);
18
19
  const serviceSource = generateExecutionService({
19
20
  origin: input.context.build.schema.compiled.root.origin,
20
21
  runtimeSpecifier,
21
22
  workerSpecifier,
22
23
  build: input.context.build,
23
24
  ...(maximumRequestBytes === undefined ? {} : { maximumRequestBytes }),
25
+ ...(invocationTimeoutMs === undefined ? {} : { invocationTimeoutMs }),
24
26
  ...(input.configuredIssuer === undefined && input.direct
25
27
  ? { providerAssignedWorker: input.name }
26
28
  : {}),
package/dist/params.d.ts CHANGED
@@ -56,6 +56,12 @@ export interface CloudflareParams {
56
56
  * application traffic; Publication and Bundle delivery have separate limits.
57
57
  */
58
58
  readonly maximumRequestBytes?: number;
59
+ /**
60
+ * Maximum wall-clock lifetime of one invocation, including Workflow steps and
61
+ * returned streams. Defaults to 30 seconds. Increase this for intentionally
62
+ * long provider orchestration while retaining a finite application budget.
63
+ */
64
+ readonly invocationTimeoutMs?: number;
59
65
  /**
60
66
  * Escape hatch: raw wrangler config deep-merged over the generated base. Use
61
67
  * it to declare extra bindings the adapter has no typed field for — KV, R2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/adapter-cloudflare",
3
- "version": "0.5.0-beta.64",
3
+ "version": "0.5.0-beta.66",
4
4
  "description": "Deploy an Astrale application through Cloudflare Workers",
5
5
  "keywords": [
6
6
  "adapter",
@@ -49,7 +49,7 @@
49
49
  "registry": "https://registry.npmjs.org/"
50
50
  },
51
51
  "dependencies": {
52
- "@astrale-os/sdk": "0.5.0-beta.61",
52
+ "@astrale-os/sdk": "0.5.0-beta.63",
53
53
  "@noble/hashes": "2.3.0",
54
54
  "hono": "^4.6.20",
55
55
  "jose": "^6.1.3",