workerd 1.20260521.1 → 1.20260522.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/bin/workerd +1 -1
- package/install.js +4 -4
- package/lib/main.js +3 -3
- package/package.json +6 -6
- package/worker.mjs +131 -3
package/bin/workerd
CHANGED
|
@@ -122,7 +122,7 @@ by workerd to install the correct binary executable for your current platform.`)
|
|
|
122
122
|
"node_modules",
|
|
123
123
|
".cache",
|
|
124
124
|
"workerd",
|
|
125
|
-
`pnpapi-${pkg.replace("/", "-")}-${"1.
|
|
125
|
+
`pnpapi-${pkg.replace("/", "-")}-${"1.20260522.1"}-${import_path.default.basename(subpath)}`
|
|
126
126
|
);
|
|
127
127
|
if (!import_fs.default.existsSync(binTargetPath)) {
|
|
128
128
|
import_fs.default.mkdirSync(import_path.default.dirname(binTargetPath), { recursive: true });
|
package/install.js
CHANGED
|
@@ -94,10 +94,10 @@ operating system, or missing some shared libraries.`;
|
|
|
94
94
|
console.error(msg);
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
|
-
if (stdout !== `workerd ${"2026-05-
|
|
97
|
+
if (stdout !== `workerd ${"2026-05-22"}`) {
|
|
98
98
|
throw new Error(
|
|
99
99
|
`Expected ${JSON.stringify(
|
|
100
|
-
"2026-05-
|
|
100
|
+
"2026-05-22"
|
|
101
101
|
)} but got ${JSON.stringify(stdout)}`
|
|
102
102
|
);
|
|
103
103
|
}
|
|
@@ -152,7 +152,7 @@ function installUsingNPM(pkg, subpath, binPath) {
|
|
|
152
152
|
try {
|
|
153
153
|
import_fs.default.writeFileSync(import_path2.default.join(installDir, "package.json"), "{}");
|
|
154
154
|
import_child_process.default.execSync(
|
|
155
|
-
`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"1.
|
|
155
|
+
`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"1.20260522.1"}`,
|
|
156
156
|
{ cwd: installDir, stdio: "pipe", env }
|
|
157
157
|
);
|
|
158
158
|
const installedBinPath = import_path2.default.join(
|
|
@@ -197,7 +197,7 @@ function maybeOptimizePackage(binPath) {
|
|
|
197
197
|
}
|
|
198
198
|
async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
|
|
199
199
|
const unscopedPkg = pkg.substring(pkg.indexOf("/") + 1);
|
|
200
|
-
const url = `https://registry.npmjs.org/${pkg}/-/${unscopedPkg}-${"1.
|
|
200
|
+
const url = `https://registry.npmjs.org/${pkg}/-/${unscopedPkg}-${"1.20260522.1"}.tgz`;
|
|
201
201
|
console.error(`[workerd] Trying to download ${JSON.stringify(url)}`);
|
|
202
202
|
try {
|
|
203
203
|
import_fs.default.writeFileSync(
|
package/lib/main.js
CHANGED
|
@@ -136,7 +136,7 @@ by workerd to install the correct binary executable for your current platform.`)
|
|
|
136
136
|
"node_modules",
|
|
137
137
|
".cache",
|
|
138
138
|
"workerd",
|
|
139
|
-
`pnpapi-${pkg.replace("/", "-")}-${"1.
|
|
139
|
+
`pnpapi-${pkg.replace("/", "-")}-${"1.20260522.1"}-${import_path.default.basename(subpath)}`
|
|
140
140
|
);
|
|
141
141
|
if (!import_fs.default.existsSync(binTargetPath)) {
|
|
142
142
|
import_fs.default.mkdirSync(import_path.default.dirname(binTargetPath), { recursive: true });
|
|
@@ -151,8 +151,8 @@ by workerd to install the correct binary executable for your current platform.`)
|
|
|
151
151
|
// npm/lib/node-path.ts
|
|
152
152
|
var { binPath } = generateBinPath();
|
|
153
153
|
var node_path_default = binPath;
|
|
154
|
-
var compatibilityDate = "2026-05-
|
|
155
|
-
var version = "1.
|
|
154
|
+
var compatibilityDate = "2026-05-22";
|
|
155
|
+
var version = "1.20260522.1";
|
|
156
156
|
// Annotate the CommonJS export names for ESM import in node:
|
|
157
157
|
0 && (module.exports = {
|
|
158
158
|
compatibilityDate,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "workerd",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20260522.1",
|
|
4
4
|
"description": "👷 workerd, Cloudflare's JavaScript/Wasm Runtime",
|
|
5
5
|
"repository": "https://github.com/cloudflare/workerd",
|
|
6
6
|
"scripts": {
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"workerd": "bin/workerd"
|
|
15
15
|
},
|
|
16
16
|
"optionalDependencies": {
|
|
17
|
-
"@cloudflare/workerd-darwin-arm64": "1.
|
|
18
|
-
"@cloudflare/workerd-darwin-64": "1.
|
|
19
|
-
"@cloudflare/workerd-linux-arm64": "1.
|
|
20
|
-
"@cloudflare/workerd-linux-64": "1.
|
|
21
|
-
"@cloudflare/workerd-windows-64": "1.
|
|
17
|
+
"@cloudflare/workerd-darwin-arm64": "1.20260522.1",
|
|
18
|
+
"@cloudflare/workerd-darwin-64": "1.20260522.1",
|
|
19
|
+
"@cloudflare/workerd-linux-arm64": "1.20260522.1",
|
|
20
|
+
"@cloudflare/workerd-linux-64": "1.20260522.1",
|
|
21
|
+
"@cloudflare/workerd-windows-64": "1.20260522.1"
|
|
22
22
|
},
|
|
23
23
|
"license": "Apache-2.0"
|
|
24
24
|
}
|
package/worker.mjs
CHANGED
|
@@ -7124,12 +7124,16 @@ export declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_5 {
|
|
|
7124
7124
|
inputs: ChatCompletionsInput;
|
|
7125
7125
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
7126
7126
|
}
|
|
7127
|
+
export declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_6 {
|
|
7128
|
+
inputs: ChatCompletionsBase;
|
|
7129
|
+
postProcessedOutputs: ChatCompletionsOutput;
|
|
7130
|
+
}
|
|
7127
7131
|
export declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
7128
7132
|
inputs: ChatCompletionsInput;
|
|
7129
7133
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
7130
7134
|
}
|
|
7131
7135
|
export declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
|
|
7132
|
-
inputs:
|
|
7136
|
+
inputs: ChatCompletionsBase;
|
|
7133
7137
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
7134
7138
|
}
|
|
7135
7139
|
export interface AiModels {
|
|
@@ -7221,7 +7225,9 @@ export interface AiModels {
|
|
|
7221
7225
|
"@cf/black-forest-labs/flux-2-klein-9b": Base_Ai_Cf_Black_Forest_Labs_Flux_2_Klein_9B;
|
|
7222
7226
|
"@cf/zai-org/glm-4.7-flash": Base_Ai_Cf_Zai_Org_Glm_4_7_Flash;
|
|
7223
7227
|
"@cf/moonshotai/kimi-k2.5": Base_Ai_Cf_Moonshotai_Kimi_K2_5;
|
|
7228
|
+
"@cf/moonshotai/kimi-k2.6": Base_Ai_Cf_Moonshotai_Kimi_K2_6;
|
|
7224
7229
|
"@cf/nvidia/nemotron-3-120b-a12b": Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B;
|
|
7230
|
+
"@cf/google/gemma-4-26b-a4b-it": Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT;
|
|
7225
7231
|
}
|
|
7226
7232
|
export type AiOptions = {
|
|
7227
7233
|
/**
|
|
@@ -10282,15 +10288,32 @@ declare namespace CloudflareWorkersModule {
|
|
|
10282
10288
|
config: WorkflowStepConfig;
|
|
10283
10289
|
};
|
|
10284
10290
|
|
|
10291
|
+
export type WorkflowRollbackContext<T = unknown> = {
|
|
10292
|
+
error: Error;
|
|
10293
|
+
output: T | undefined;
|
|
10294
|
+
stepName: string;
|
|
10295
|
+
};
|
|
10296
|
+
|
|
10297
|
+
export type WorkflowRollbackHandler<T = unknown> = (
|
|
10298
|
+
ctx: WorkflowRollbackContext<T>
|
|
10299
|
+
) => Promise<void>;
|
|
10300
|
+
|
|
10301
|
+
export type WorkflowStepRollbackOptions<T = unknown> = {
|
|
10302
|
+
rollback?: WorkflowRollbackHandler<T>;
|
|
10303
|
+
rollbackConfig?: WorkflowStepConfig;
|
|
10304
|
+
};
|
|
10305
|
+
|
|
10285
10306
|
export abstract class WorkflowStep {
|
|
10286
10307
|
do<T extends Rpc.Serializable<T>>(
|
|
10287
10308
|
name: string,
|
|
10288
|
-
callback: (ctx: WorkflowStepContext) => Promise<T
|
|
10309
|
+
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
10310
|
+
rollbackOptions?: WorkflowStepRollbackOptions<T>
|
|
10289
10311
|
): Promise<T>;
|
|
10290
10312
|
do<T extends Rpc.Serializable<T>>(
|
|
10291
10313
|
name: string,
|
|
10292
10314
|
config: WorkflowStepConfig,
|
|
10293
|
-
callback: (ctx: WorkflowStepContext) => Promise<T
|
|
10315
|
+
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
10316
|
+
rollbackOptions?: WorkflowStepRollbackOptions<T>
|
|
10294
10317
|
): Promise<T>;
|
|
10295
10318
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
10296
10319
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
@@ -11764,6 +11787,111 @@ export type WorkerVersionMetadata = {
|
|
|
11764
11787
|
timestamp: string;
|
|
11765
11788
|
}
|
|
11766
11789
|
|
|
11790
|
+
// ============ Web Search Request Types ============
|
|
11791
|
+
|
|
11792
|
+
/**
|
|
11793
|
+
* Options for a Web Search query.
|
|
11794
|
+
*/
|
|
11795
|
+
export type WebSearchSearchOptions = {
|
|
11796
|
+
/** The search query. */
|
|
11797
|
+
query: string;
|
|
11798
|
+
/**
|
|
11799
|
+
* Maximum number of results to return. Defaults to 10, capped at 20.
|
|
11800
|
+
* The actual count may be lower if fewer matches exist.
|
|
11801
|
+
*/
|
|
11802
|
+
limit?: number;
|
|
11803
|
+
};
|
|
11804
|
+
|
|
11805
|
+
// ============ Web Search Response Types ============
|
|
11806
|
+
|
|
11807
|
+
/**
|
|
11808
|
+
* A single Web Search result.
|
|
11809
|
+
*
|
|
11810
|
+
* Web Search is discovery-only -- results carry catalog metadata about a page
|
|
11811
|
+
* but never the page body. To read a result's content the caller invokes the
|
|
11812
|
+
* global \`fetch()\` API against the result's \`url\`, at which point the
|
|
11813
|
+
* destination's own access controls apply (including Cloudflare Pay-per-Crawl).
|
|
11814
|
+
*/
|
|
11815
|
+
export type WebSearchResult = {
|
|
11816
|
+
/** Canonical URL. */
|
|
11817
|
+
url: string;
|
|
11818
|
+
/** Page title. */
|
|
11819
|
+
title: string;
|
|
11820
|
+
/** Page-level description. May be absent. */
|
|
11821
|
+
description?: string;
|
|
11822
|
+
/**
|
|
11823
|
+
* Last-modified date for the page, when known. Naive (no timezone)
|
|
11824
|
+
* ISO-8601 datetime, e.g. \`"2025-11-30T04:39:48"\`.
|
|
11825
|
+
*/
|
|
11826
|
+
lastModifiedDate?: string;
|
|
11827
|
+
/**
|
|
11828
|
+
* Page meta image URL (typically the \`og:image\`). May be absent.
|
|
11829
|
+
*/
|
|
11830
|
+
imageUrl?: string;
|
|
11831
|
+
/** Optional favicon URL for UI hints. */
|
|
11832
|
+
faviconUrl?: string;
|
|
11833
|
+
};
|
|
11834
|
+
|
|
11835
|
+
/**
|
|
11836
|
+
* Per-response metadata for a Web Search query. Carries operational
|
|
11837
|
+
* fields useful for support and debugging.
|
|
11838
|
+
*/
|
|
11839
|
+
export type WebSearchResponseMetadata = {
|
|
11840
|
+
/** The query that was executed. */
|
|
11841
|
+
query: string;
|
|
11842
|
+
/** Opaque request identifier used for support and debugging. */
|
|
11843
|
+
requestId: string;
|
|
11844
|
+
/** End-to-end latency for this search request, in milliseconds. */
|
|
11845
|
+
latencyMs: number;
|
|
11846
|
+
};
|
|
11847
|
+
|
|
11848
|
+
/**
|
|
11849
|
+
* Response from a Web Search query.
|
|
11850
|
+
*/
|
|
11851
|
+
export type WebSearchSearchResponse = {
|
|
11852
|
+
items: WebSearchResult[];
|
|
11853
|
+
metadata: WebSearchResponseMetadata;
|
|
11854
|
+
};
|
|
11855
|
+
|
|
11856
|
+
// ============ Web Search Binding Class ============
|
|
11857
|
+
|
|
11858
|
+
/**
|
|
11859
|
+
* Cloudflare Web Search binding.
|
|
11860
|
+
*
|
|
11861
|
+
* Discovery-only primitive for agents and Workers. Returns URLs and catalog
|
|
11862
|
+
* metadata for a query; never returns page content or excerpts. To read a
|
|
11863
|
+
* result's body, fetch the URL with the global \`fetch()\` API.
|
|
11864
|
+
*
|
|
11865
|
+
* Declared in wrangler with a single object (there is exactly one corpus, the
|
|
11866
|
+
* public web, so there is no name, namespace, or instance to specify):
|
|
11867
|
+
*
|
|
11868
|
+
* \`\`\`jsonc
|
|
11869
|
+
* { "web_search": { "binding": "WEBSEARCH" } }
|
|
11870
|
+
* \`\`\`
|
|
11871
|
+
*
|
|
11872
|
+
* @example
|
|
11873
|
+
* \`\`\`ts
|
|
11874
|
+
* const { items, metadata } = await env.WEBSEARCH.search({
|
|
11875
|
+
* query: "Cloudflare Workers",
|
|
11876
|
+
* });
|
|
11877
|
+
*
|
|
11878
|
+
* const top = items[0];
|
|
11879
|
+
* console.log(top.url, top.title, metadata.latencyMs);
|
|
11880
|
+
*
|
|
11881
|
+
* // Read content yourself; pay-per-crawl and other publisher
|
|
11882
|
+
* // controls apply at the fetch site, not at search time.
|
|
11883
|
+
* const page = await fetch(top.url);
|
|
11884
|
+
* \`\`\`
|
|
11885
|
+
*/
|
|
11886
|
+
export declare abstract class WebSearch {
|
|
11887
|
+
/**
|
|
11888
|
+
* Run a Web Search query.
|
|
11889
|
+
* @param options Search options. Only \`query\` is required.
|
|
11890
|
+
* @returns The matching results plus per-response metadata.
|
|
11891
|
+
*/
|
|
11892
|
+
search(options: WebSearchSearchOptions): Promise<WebSearchSearchResponse>;
|
|
11893
|
+
}
|
|
11894
|
+
|
|
11767
11895
|
interface DynamicDispatchLimits {
|
|
11768
11896
|
/**
|
|
11769
11897
|
* Limit CPU time in milliseconds.
|