@icebreakers/monorepo-templates 1.0.8 → 1.0.10
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/assets/.github/workflows/release.yml +0 -4
- package/assets/package.json +6 -6
- package/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{prepare-CtCifHGT.mjs → prepare-B_OwUnAH.mjs} +12 -0
- package/package.json +5 -5
- package/templates/cli/package.json +1 -1
- package/templates/client/package.json +6 -6
- package/templates/client/worker-configuration.d.ts +129 -14
- package/templates/server/package.json +3 -3
- package/templates/server/worker-configuration.d.ts +129 -14
- package/templates/vitepress/package.json +3 -3
- package/templates/vue-lib/package.json +3 -3
|
@@ -40,8 +40,6 @@ jobs:
|
|
|
40
40
|
- name: Install Dependencies
|
|
41
41
|
run: pnpm i
|
|
42
42
|
|
|
43
|
-
- name: Build Release Tooling
|
|
44
|
-
run: pnpm run tooling:build
|
|
45
43
|
|
|
46
44
|
- name: Create Release Pull Request or Publish to npm
|
|
47
45
|
id: changesets
|
|
@@ -82,8 +80,6 @@ jobs:
|
|
|
82
80
|
- name: Install Dependencies
|
|
83
81
|
run: pnpm i
|
|
84
82
|
|
|
85
|
-
- name: Build Release Tooling
|
|
86
|
-
run: pnpm run tooling:build
|
|
87
83
|
|
|
88
84
|
- name: Configure Git
|
|
89
85
|
run: |
|
package/assets/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
|
-
"packageManager": "pnpm@10.
|
|
6
|
+
"packageManager": "pnpm@10.34.1",
|
|
7
7
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@changesets/cli": "^2.31.0",
|
|
54
|
-
"@commitlint/cli": "^21.0.
|
|
54
|
+
"@commitlint/cli": "^21.0.2",
|
|
55
55
|
"@icebreakers/changelog-github": "^1.0.2",
|
|
56
56
|
"@icebreakers/monorepo": "workspace:*",
|
|
57
57
|
"@types/node": "^25.9.1",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"cross-env": "^10.1.0",
|
|
62
62
|
"defu": "^6.1.7",
|
|
63
63
|
"es-toolkit": "^1.47.0",
|
|
64
|
-
"eslint": "^10.4.
|
|
64
|
+
"eslint": "^10.4.1",
|
|
65
65
|
"husky": "^9.1.7",
|
|
66
|
-
"lint-staged": "^17.0.
|
|
66
|
+
"lint-staged": "^17.0.6",
|
|
67
67
|
"only-allow": "^1.2.2",
|
|
68
68
|
"pathe": "^2.0.3",
|
|
69
69
|
"pkg-types": "^2.3.1",
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
"stylelint": "^17.12.0",
|
|
72
72
|
"tailwindcss": "^4.3.0",
|
|
73
73
|
"tsd": "^0.33.0",
|
|
74
|
-
"tsdown": "0.22.
|
|
74
|
+
"tsdown": "0.22.1",
|
|
75
75
|
"tslib": "^2.8.1",
|
|
76
76
|
"tsx": "^4.22.3",
|
|
77
|
-
"turbo": "^2.9.
|
|
77
|
+
"turbo": "^2.9.16",
|
|
78
78
|
"type-fest": "^5.6.0",
|
|
79
79
|
"typescript": "^6.0.3",
|
|
80
80
|
"vitest": "~4.1.7",
|
package/dist/cli.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as toPublishGitignorePath, c as assetsDir, d as templatesDir, f as assetTargets$1, i as isGitignoreFile, l as packageDir, n as createTemplateCopyFilter, o as toWorkspaceGitignorePath, p as getAssetTargets$1, r as shouldSkipTemplatePath, s as templateChoices$1, t as prepareAssets, u as skeletonDir } from "./prepare-
|
|
1
|
+
import { a as toPublishGitignorePath, c as assetsDir, d as templatesDir, f as assetTargets$1, i as isGitignoreFile, l as packageDir, n as createTemplateCopyFilter, o as toWorkspaceGitignorePath, p as getAssetTargets$1, r as shouldSkipTemplatePath, s as templateChoices$1, t as prepareAssets, u as skeletonDir } from "./prepare-B_OwUnAH.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs, { access, open, rm } from "node:fs/promises";
|
|
4
4
|
import exec from "nanoexec";
|
|
@@ -282,6 +282,17 @@ async function writePublishedToolingConfigs() {
|
|
|
282
282
|
if (await pathExists(targetPath)) await fs.writeFile(targetPath, content);
|
|
283
283
|
}));
|
|
284
284
|
}
|
|
285
|
+
async function removeSourceRepoReleaseToolingBuildStep() {
|
|
286
|
+
const releaseWorkflowPath = path$1.join(assetsDir, ".github/workflows/release.yml");
|
|
287
|
+
if (!await pathExists(releaseWorkflowPath)) return;
|
|
288
|
+
const content = await fs.readFile(releaseWorkflowPath, "utf8");
|
|
289
|
+
const nextContent = content.replaceAll([
|
|
290
|
+
"",
|
|
291
|
+
" - name: Build Release Tooling",
|
|
292
|
+
" run: pnpm run tooling:build"
|
|
293
|
+
].join("\n"), "");
|
|
294
|
+
if (nextContent !== content) await fs.writeFile(releaseWorkflowPath, nextContent, "utf8");
|
|
295
|
+
}
|
|
285
296
|
async function copyTemplates(repoRoot, overwriteExisting) {
|
|
286
297
|
for (const template of templateChoices) {
|
|
287
298
|
const from = path$1.join(repoRoot, "templates", template.source);
|
|
@@ -300,6 +311,7 @@ async function prepareAssets(options = {}) {
|
|
|
300
311
|
await resetDir(templatesDir, overwriteExisting);
|
|
301
312
|
await copyAssets(repoRoot, overwriteExisting);
|
|
302
313
|
await writePublishedToolingConfigs();
|
|
314
|
+
await removeSourceRepoReleaseToolingBuildStep();
|
|
303
315
|
await copyTemplates(repoRoot, overwriteExisting);
|
|
304
316
|
}
|
|
305
317
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/monorepo-templates",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.10",
|
|
5
5
|
"description": "Template assets for icebreaker monorepo scaffolding",
|
|
6
6
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"node": ">=18.0.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@inquirer/checkbox": "^5.2.
|
|
47
|
-
"@inquirer/input": "^5.1.
|
|
48
|
-
"@inquirer/select": "^5.2.
|
|
49
|
-
"commander": "^
|
|
46
|
+
"@inquirer/checkbox": "^5.2.1",
|
|
47
|
+
"@inquirer/input": "^5.1.1",
|
|
48
|
+
"@inquirer/select": "^5.2.1",
|
|
49
|
+
"commander": "^15.0.0",
|
|
50
50
|
"nanoexec": "^1.1.0"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.1",
|
|
5
5
|
"private": true,
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite --host",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"pinia": "^3.0.4",
|
|
26
26
|
"tailwind-merge": "^3.6.0",
|
|
27
27
|
"tailwind-variants": "^3.2.2",
|
|
28
|
-
"vue": "^3.5.
|
|
28
|
+
"vue": "^3.5.35",
|
|
29
29
|
"vue-i18n": "^11.4.4",
|
|
30
|
-
"vue-router": "^5.0
|
|
30
|
+
"vue-router": "^5.1.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@cloudflare/vite-plugin": "^1.
|
|
33
|
+
"@cloudflare/vite-plugin": "^1.39.0",
|
|
34
34
|
"@hono/node-server": "^2.0.4",
|
|
35
35
|
"@hono/trpc-server": "^0.4.2",
|
|
36
36
|
"@tailwindcss/vite": "^4.3.0",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"vite": "^8.0.14",
|
|
46
46
|
"vite-plugin-vue-devtools": "^8.1.2",
|
|
47
47
|
"vite-tsconfig-paths": "^6.1.1",
|
|
48
|
-
"vue-tsc": "3.3.
|
|
49
|
-
"wrangler": "^4.
|
|
48
|
+
"vue-tsc": "3.3.3",
|
|
49
|
+
"wrangler": "^4.95.0",
|
|
50
50
|
"zod": "^4.4.3"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
// Generated by Wrangler by running `wrangler types` (hash: bf05258867cf7490d4c96f4ea30bd0ef)
|
|
3
|
-
// Runtime types generated with workerd@1.
|
|
3
|
+
// Runtime types generated with workerd@1.20260526.1 2025-10-16 nodejs_compat
|
|
4
4
|
interface __BaseEnv_Env {
|
|
5
5
|
}
|
|
6
6
|
declare namespace Cloudflare {
|
|
@@ -4826,9 +4826,6 @@ type ChatCompletionChoice = {
|
|
|
4826
4826
|
finish_reason: "stop" | "length" | "tool_calls" | "content_filter" | "function_call";
|
|
4827
4827
|
logprobs: ChatCompletionLogprobs | null;
|
|
4828
4828
|
};
|
|
4829
|
-
type ChatCompletionsPromptInput = {
|
|
4830
|
-
prompt: string;
|
|
4831
|
-
} & ChatCompletionsCommonOptions;
|
|
4832
4829
|
type ChatCompletionsMessagesInput = {
|
|
4833
4830
|
messages: Array<ChatCompletionMessageParam>;
|
|
4834
4831
|
} & ChatCompletionsCommonOptions;
|
|
@@ -8758,11 +8755,11 @@ declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
|
8758
8755
|
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
8759
8756
|
}
|
|
8760
8757
|
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
8761
|
-
inputs: XOR<ResponsesInput,
|
|
8758
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
8762
8759
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
8763
8760
|
}
|
|
8764
8761
|
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
8765
|
-
inputs: XOR<ResponsesInput,
|
|
8762
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
8766
8763
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
8767
8764
|
}
|
|
8768
8765
|
interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
@@ -9738,6 +9735,10 @@ declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_5 {
|
|
|
9738
9735
|
inputs: ChatCompletionsInput;
|
|
9739
9736
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
9740
9737
|
}
|
|
9738
|
+
declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_6 {
|
|
9739
|
+
inputs: ChatCompletionsInput;
|
|
9740
|
+
postProcessedOutputs: ChatCompletionsOutput;
|
|
9741
|
+
}
|
|
9741
9742
|
declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
9742
9743
|
inputs: ChatCompletionsInput;
|
|
9743
9744
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
@@ -9835,7 +9836,9 @@ interface AiModels {
|
|
|
9835
9836
|
"@cf/black-forest-labs/flux-2-klein-9b": Base_Ai_Cf_Black_Forest_Labs_Flux_2_Klein_9B;
|
|
9836
9837
|
"@cf/zai-org/glm-4.7-flash": Base_Ai_Cf_Zai_Org_Glm_4_7_Flash;
|
|
9837
9838
|
"@cf/moonshotai/kimi-k2.5": Base_Ai_Cf_Moonshotai_Kimi_K2_5;
|
|
9839
|
+
"@cf/moonshotai/kimi-k2.6": Base_Ai_Cf_Moonshotai_Kimi_K2_6;
|
|
9838
9840
|
"@cf/nvidia/nemotron-3-120b-a12b": Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B;
|
|
9841
|
+
"@cf/google/gemma-4-26b-a4b-it": Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT;
|
|
9839
9842
|
}
|
|
9840
9843
|
type AiOptions = {
|
|
9841
9844
|
/**
|
|
@@ -9888,10 +9891,8 @@ type AiModelsSearchObject = {
|
|
|
9888
9891
|
value: string;
|
|
9889
9892
|
}[];
|
|
9890
9893
|
};
|
|
9891
|
-
type ChatCompletionsBase =
|
|
9892
|
-
type ChatCompletionsInput =
|
|
9893
|
-
requests: ChatCompletionsBase[];
|
|
9894
|
-
}>;
|
|
9894
|
+
type ChatCompletionsBase = ChatCompletionsMessagesInput;
|
|
9895
|
+
type ChatCompletionsInput = ChatCompletionsMessagesInput;
|
|
9895
9896
|
interface InferenceUpstreamError extends Error {
|
|
9896
9897
|
}
|
|
9897
9898
|
interface AiInternalError extends Error {
|
|
@@ -9936,8 +9937,15 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
9936
9937
|
}, options?: AiOptions): Promise<ReadableStream>;
|
|
9937
9938
|
// Normal (default) - known model
|
|
9938
9939
|
run<Name extends keyof AiModelList>(model: Name, inputs: AiModelList[Name]['inputs'], options?: AiOptions): Promise<AiModelList[Name]['postProcessedOutputs']>;
|
|
9939
|
-
// Unknown model (
|
|
9940
|
-
|
|
9940
|
+
// Unknown model (fallback).
|
|
9941
|
+
//
|
|
9942
|
+
// The `Exclude<..., keyof AiModelList>` constraint forces TypeScript to
|
|
9943
|
+
// route any model name that is a literal key of `AiModelList` to one of
|
|
9944
|
+
// the known-model overloads above (so input/output mismatches surface as
|
|
9945
|
+
// type errors rather than silently falling back to `Record<string, unknown>`).
|
|
9946
|
+
// Names that aren't in `AiModelList` — e.g. third-party gateway models
|
|
9947
|
+
// like `"google/nano-banana"` — still hit this overload.
|
|
9948
|
+
run<Model extends string>(model: Model extends keyof AiModelList ? never : Model, inputs: Record<string, unknown>, options?: AiOptions): Promise<Record<string, unknown>>;
|
|
9941
9949
|
models(params?: AiModelsSearchParams): Promise<AiModelsSearchObject[]>;
|
|
9942
9950
|
toMarkdown(): ToMarkdownService;
|
|
9943
9951
|
toMarkdown(files: MarkdownDocument[], options?: ConversionRequestOptions): Promise<ConversionResponse[]>;
|
|
@@ -12200,9 +12208,19 @@ declare namespace CloudflareWorkersModule {
|
|
|
12200
12208
|
attempt: number;
|
|
12201
12209
|
config: WorkflowStepConfig;
|
|
12202
12210
|
};
|
|
12211
|
+
export type WorkflowRollbackContext<T = unknown> = {
|
|
12212
|
+
error: Error;
|
|
12213
|
+
output: T | undefined;
|
|
12214
|
+
stepName: string;
|
|
12215
|
+
};
|
|
12216
|
+
export type WorkflowRollbackHandler<T = unknown> = (ctx: WorkflowRollbackContext<T>) => Promise<void>;
|
|
12217
|
+
export type WorkflowStepRollbackOptions<T = unknown> = {
|
|
12218
|
+
rollback?: WorkflowRollbackHandler<T>;
|
|
12219
|
+
rollbackConfig?: WorkflowStepConfig;
|
|
12220
|
+
};
|
|
12203
12221
|
export abstract class WorkflowStep {
|
|
12204
|
-
do<T extends Rpc.Serializable<T>>(name: string, callback: (ctx: WorkflowStepContext) => Promise<T>): Promise<T>;
|
|
12205
|
-
do<T extends Rpc.Serializable<T>>(name: string, config: WorkflowStepConfig, callback: (ctx: WorkflowStepContext) => Promise<T>): Promise<T>;
|
|
12222
|
+
do<T extends Rpc.Serializable<T>>(name: string, callback: (ctx: WorkflowStepContext) => Promise<T>, rollbackOptions?: WorkflowStepRollbackOptions<T>): Promise<T>;
|
|
12223
|
+
do<T extends Rpc.Serializable<T>>(name: string, config: WorkflowStepConfig, callback: (ctx: WorkflowStepContext) => Promise<T>, rollbackOptions?: WorkflowStepRollbackOptions<T>): Promise<T>;
|
|
12206
12224
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
12207
12225
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
12208
12226
|
waitForEvent<T extends Rpc.Serializable<T>>(name: string, options: {
|
|
@@ -13468,6 +13486,103 @@ type WorkerVersionMetadata = {
|
|
|
13468
13486
|
/** The timestamp of when the Worker Version was uploaded */
|
|
13469
13487
|
timestamp: string;
|
|
13470
13488
|
};
|
|
13489
|
+
// ============ Web Search Request Types ============
|
|
13490
|
+
/**
|
|
13491
|
+
* Options for a Web Search query.
|
|
13492
|
+
*/
|
|
13493
|
+
type WebSearchSearchOptions = {
|
|
13494
|
+
/** The search query. */
|
|
13495
|
+
query: string;
|
|
13496
|
+
/**
|
|
13497
|
+
* Maximum number of results to return. Defaults to 10, capped at 20.
|
|
13498
|
+
* The actual count may be lower if fewer matches exist.
|
|
13499
|
+
*/
|
|
13500
|
+
limit?: number;
|
|
13501
|
+
};
|
|
13502
|
+
// ============ Web Search Response Types ============
|
|
13503
|
+
/**
|
|
13504
|
+
* A single Web Search result.
|
|
13505
|
+
*
|
|
13506
|
+
* Web Search is discovery-only -- results carry catalog metadata about a page
|
|
13507
|
+
* but never the page body. To read a result's content the caller invokes the
|
|
13508
|
+
* global `fetch()` API against the result's `url`, at which point the
|
|
13509
|
+
* destination's own access controls apply (including Cloudflare Pay-per-Crawl).
|
|
13510
|
+
*/
|
|
13511
|
+
type WebSearchResult = {
|
|
13512
|
+
/** Canonical URL. */
|
|
13513
|
+
url: string;
|
|
13514
|
+
/** Page title. */
|
|
13515
|
+
title: string;
|
|
13516
|
+
/** Page-level description. May be absent. */
|
|
13517
|
+
description?: string;
|
|
13518
|
+
/**
|
|
13519
|
+
* Last-modified date for the page, when known. Naive (no timezone)
|
|
13520
|
+
* ISO-8601 datetime, e.g. `"2025-11-30T04:39:48"`.
|
|
13521
|
+
*/
|
|
13522
|
+
lastModifiedDate?: string;
|
|
13523
|
+
/**
|
|
13524
|
+
* Page meta image URL (typically the `og:image`). May be absent.
|
|
13525
|
+
*/
|
|
13526
|
+
imageUrl?: string;
|
|
13527
|
+
/** Optional favicon URL for UI hints. */
|
|
13528
|
+
faviconUrl?: string;
|
|
13529
|
+
};
|
|
13530
|
+
/**
|
|
13531
|
+
* Per-response metadata for a Web Search query. Carries operational
|
|
13532
|
+
* fields useful for support and debugging.
|
|
13533
|
+
*/
|
|
13534
|
+
type WebSearchResponseMetadata = {
|
|
13535
|
+
/** The query that was executed. */
|
|
13536
|
+
query: string;
|
|
13537
|
+
/** Opaque request identifier used for support and debugging. */
|
|
13538
|
+
requestId: string;
|
|
13539
|
+
/** End-to-end latency for this search request, in milliseconds. */
|
|
13540
|
+
latencyMs: number;
|
|
13541
|
+
};
|
|
13542
|
+
/**
|
|
13543
|
+
* Response from a Web Search query.
|
|
13544
|
+
*/
|
|
13545
|
+
type WebSearchSearchResponse = {
|
|
13546
|
+
items: WebSearchResult[];
|
|
13547
|
+
metadata: WebSearchResponseMetadata;
|
|
13548
|
+
};
|
|
13549
|
+
// ============ Web Search Binding Class ============
|
|
13550
|
+
/**
|
|
13551
|
+
* Cloudflare Web Search binding.
|
|
13552
|
+
*
|
|
13553
|
+
* Discovery-only primitive for agents and Workers. Returns URLs and catalog
|
|
13554
|
+
* metadata for a query; never returns page content or excerpts. To read a
|
|
13555
|
+
* result's body, fetch the URL with the global `fetch()` API.
|
|
13556
|
+
*
|
|
13557
|
+
* Declared in wrangler with a single object (there is exactly one corpus, the
|
|
13558
|
+
* public web, so there is no name, namespace, or instance to specify):
|
|
13559
|
+
*
|
|
13560
|
+
* ```jsonc
|
|
13561
|
+
* { "web_search": { "binding": "WEBSEARCH" } }
|
|
13562
|
+
* ```
|
|
13563
|
+
*
|
|
13564
|
+
* @example
|
|
13565
|
+
* ```ts
|
|
13566
|
+
* const { items, metadata } = await env.WEBSEARCH.search({
|
|
13567
|
+
* query: "Cloudflare Workers",
|
|
13568
|
+
* });
|
|
13569
|
+
*
|
|
13570
|
+
* const top = items[0];
|
|
13571
|
+
* console.log(top.url, top.title, metadata.latencyMs);
|
|
13572
|
+
*
|
|
13573
|
+
* // Read content yourself; pay-per-crawl and other publisher
|
|
13574
|
+
* // controls apply at the fetch site, not at search time.
|
|
13575
|
+
* const page = await fetch(top.url);
|
|
13576
|
+
* ```
|
|
13577
|
+
*/
|
|
13578
|
+
declare abstract class WebSearch {
|
|
13579
|
+
/**
|
|
13580
|
+
* Run a Web Search query.
|
|
13581
|
+
* @param options Search options. Only `query` is required.
|
|
13582
|
+
* @returns The matching results plus per-response metadata.
|
|
13583
|
+
*/
|
|
13584
|
+
search(options: WebSearchSearchOptions): Promise<WebSearchSearchResponse>;
|
|
13585
|
+
}
|
|
13471
13586
|
interface DynamicDispatchLimits {
|
|
13472
13587
|
/**
|
|
13473
13588
|
* Limit CPU time in milliseconds.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.1",
|
|
5
5
|
"description": "tsdown build package template",
|
|
6
6
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@hono/node-server": "^2.0.4",
|
|
58
58
|
"consola": "^3.4.2",
|
|
59
59
|
"hono": "^4.12.23",
|
|
60
|
-
"tsdown": "0.22.
|
|
61
|
-
"wrangler": "^4.
|
|
60
|
+
"tsdown": "0.22.1",
|
|
61
|
+
"wrangler": "^4.95.0",
|
|
62
62
|
"zod": "^4.4.3"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
// Generated by Wrangler by running `wrangler types` (hash: 047568eb9ed6843cb5540fa33180da01)
|
|
3
|
-
// Runtime types generated with workerd@1.
|
|
3
|
+
// Runtime types generated with workerd@1.20260526.1 2025-10-16 nodejs_compat
|
|
4
4
|
interface __BaseEnv_Env {
|
|
5
5
|
}
|
|
6
6
|
declare namespace Cloudflare {
|
|
@@ -4826,9 +4826,6 @@ type ChatCompletionChoice = {
|
|
|
4826
4826
|
finish_reason: "stop" | "length" | "tool_calls" | "content_filter" | "function_call";
|
|
4827
4827
|
logprobs: ChatCompletionLogprobs | null;
|
|
4828
4828
|
};
|
|
4829
|
-
type ChatCompletionsPromptInput = {
|
|
4830
|
-
prompt: string;
|
|
4831
|
-
} & ChatCompletionsCommonOptions;
|
|
4832
4829
|
type ChatCompletionsMessagesInput = {
|
|
4833
4830
|
messages: Array<ChatCompletionMessageParam>;
|
|
4834
4831
|
} & ChatCompletionsCommonOptions;
|
|
@@ -8758,11 +8755,11 @@ declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
|
8758
8755
|
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
8759
8756
|
}
|
|
8760
8757
|
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
8761
|
-
inputs: XOR<ResponsesInput,
|
|
8758
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
8762
8759
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
8763
8760
|
}
|
|
8764
8761
|
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
8765
|
-
inputs: XOR<ResponsesInput,
|
|
8762
|
+
inputs: XOR<ResponsesInput, ChatCompletionsMessagesInput>;
|
|
8766
8763
|
postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
|
|
8767
8764
|
}
|
|
8768
8765
|
interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
@@ -9738,6 +9735,10 @@ declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_5 {
|
|
|
9738
9735
|
inputs: ChatCompletionsInput;
|
|
9739
9736
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
9740
9737
|
}
|
|
9738
|
+
declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_6 {
|
|
9739
|
+
inputs: ChatCompletionsInput;
|
|
9740
|
+
postProcessedOutputs: ChatCompletionsOutput;
|
|
9741
|
+
}
|
|
9741
9742
|
declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
|
|
9742
9743
|
inputs: ChatCompletionsInput;
|
|
9743
9744
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
@@ -9835,7 +9836,9 @@ interface AiModels {
|
|
|
9835
9836
|
"@cf/black-forest-labs/flux-2-klein-9b": Base_Ai_Cf_Black_Forest_Labs_Flux_2_Klein_9B;
|
|
9836
9837
|
"@cf/zai-org/glm-4.7-flash": Base_Ai_Cf_Zai_Org_Glm_4_7_Flash;
|
|
9837
9838
|
"@cf/moonshotai/kimi-k2.5": Base_Ai_Cf_Moonshotai_Kimi_K2_5;
|
|
9839
|
+
"@cf/moonshotai/kimi-k2.6": Base_Ai_Cf_Moonshotai_Kimi_K2_6;
|
|
9838
9840
|
"@cf/nvidia/nemotron-3-120b-a12b": Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B;
|
|
9841
|
+
"@cf/google/gemma-4-26b-a4b-it": Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT;
|
|
9839
9842
|
}
|
|
9840
9843
|
type AiOptions = {
|
|
9841
9844
|
/**
|
|
@@ -9888,10 +9891,8 @@ type AiModelsSearchObject = {
|
|
|
9888
9891
|
value: string;
|
|
9889
9892
|
}[];
|
|
9890
9893
|
};
|
|
9891
|
-
type ChatCompletionsBase =
|
|
9892
|
-
type ChatCompletionsInput =
|
|
9893
|
-
requests: ChatCompletionsBase[];
|
|
9894
|
-
}>;
|
|
9894
|
+
type ChatCompletionsBase = ChatCompletionsMessagesInput;
|
|
9895
|
+
type ChatCompletionsInput = ChatCompletionsMessagesInput;
|
|
9895
9896
|
interface InferenceUpstreamError extends Error {
|
|
9896
9897
|
}
|
|
9897
9898
|
interface AiInternalError extends Error {
|
|
@@ -9936,8 +9937,15 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
9936
9937
|
}, options?: AiOptions): Promise<ReadableStream>;
|
|
9937
9938
|
// Normal (default) - known model
|
|
9938
9939
|
run<Name extends keyof AiModelList>(model: Name, inputs: AiModelList[Name]['inputs'], options?: AiOptions): Promise<AiModelList[Name]['postProcessedOutputs']>;
|
|
9939
|
-
// Unknown model (
|
|
9940
|
-
|
|
9940
|
+
// Unknown model (fallback).
|
|
9941
|
+
//
|
|
9942
|
+
// The `Exclude<..., keyof AiModelList>` constraint forces TypeScript to
|
|
9943
|
+
// route any model name that is a literal key of `AiModelList` to one of
|
|
9944
|
+
// the known-model overloads above (so input/output mismatches surface as
|
|
9945
|
+
// type errors rather than silently falling back to `Record<string, unknown>`).
|
|
9946
|
+
// Names that aren't in `AiModelList` — e.g. third-party gateway models
|
|
9947
|
+
// like `"google/nano-banana"` — still hit this overload.
|
|
9948
|
+
run<Model extends string>(model: Model extends keyof AiModelList ? never : Model, inputs: Record<string, unknown>, options?: AiOptions): Promise<Record<string, unknown>>;
|
|
9941
9949
|
models(params?: AiModelsSearchParams): Promise<AiModelsSearchObject[]>;
|
|
9942
9950
|
toMarkdown(): ToMarkdownService;
|
|
9943
9951
|
toMarkdown(files: MarkdownDocument[], options?: ConversionRequestOptions): Promise<ConversionResponse[]>;
|
|
@@ -12200,9 +12208,19 @@ declare namespace CloudflareWorkersModule {
|
|
|
12200
12208
|
attempt: number;
|
|
12201
12209
|
config: WorkflowStepConfig;
|
|
12202
12210
|
};
|
|
12211
|
+
export type WorkflowRollbackContext<T = unknown> = {
|
|
12212
|
+
error: Error;
|
|
12213
|
+
output: T | undefined;
|
|
12214
|
+
stepName: string;
|
|
12215
|
+
};
|
|
12216
|
+
export type WorkflowRollbackHandler<T = unknown> = (ctx: WorkflowRollbackContext<T>) => Promise<void>;
|
|
12217
|
+
export type WorkflowStepRollbackOptions<T = unknown> = {
|
|
12218
|
+
rollback?: WorkflowRollbackHandler<T>;
|
|
12219
|
+
rollbackConfig?: WorkflowStepConfig;
|
|
12220
|
+
};
|
|
12203
12221
|
export abstract class WorkflowStep {
|
|
12204
|
-
do<T extends Rpc.Serializable<T>>(name: string, callback: (ctx: WorkflowStepContext) => Promise<T>): Promise<T>;
|
|
12205
|
-
do<T extends Rpc.Serializable<T>>(name: string, config: WorkflowStepConfig, callback: (ctx: WorkflowStepContext) => Promise<T>): Promise<T>;
|
|
12222
|
+
do<T extends Rpc.Serializable<T>>(name: string, callback: (ctx: WorkflowStepContext) => Promise<T>, rollbackOptions?: WorkflowStepRollbackOptions<T>): Promise<T>;
|
|
12223
|
+
do<T extends Rpc.Serializable<T>>(name: string, config: WorkflowStepConfig, callback: (ctx: WorkflowStepContext) => Promise<T>, rollbackOptions?: WorkflowStepRollbackOptions<T>): Promise<T>;
|
|
12206
12224
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
12207
12225
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
12208
12226
|
waitForEvent<T extends Rpc.Serializable<T>>(name: string, options: {
|
|
@@ -13468,6 +13486,103 @@ type WorkerVersionMetadata = {
|
|
|
13468
13486
|
/** The timestamp of when the Worker Version was uploaded */
|
|
13469
13487
|
timestamp: string;
|
|
13470
13488
|
};
|
|
13489
|
+
// ============ Web Search Request Types ============
|
|
13490
|
+
/**
|
|
13491
|
+
* Options for a Web Search query.
|
|
13492
|
+
*/
|
|
13493
|
+
type WebSearchSearchOptions = {
|
|
13494
|
+
/** The search query. */
|
|
13495
|
+
query: string;
|
|
13496
|
+
/**
|
|
13497
|
+
* Maximum number of results to return. Defaults to 10, capped at 20.
|
|
13498
|
+
* The actual count may be lower if fewer matches exist.
|
|
13499
|
+
*/
|
|
13500
|
+
limit?: number;
|
|
13501
|
+
};
|
|
13502
|
+
// ============ Web Search Response Types ============
|
|
13503
|
+
/**
|
|
13504
|
+
* A single Web Search result.
|
|
13505
|
+
*
|
|
13506
|
+
* Web Search is discovery-only -- results carry catalog metadata about a page
|
|
13507
|
+
* but never the page body. To read a result's content the caller invokes the
|
|
13508
|
+
* global `fetch()` API against the result's `url`, at which point the
|
|
13509
|
+
* destination's own access controls apply (including Cloudflare Pay-per-Crawl).
|
|
13510
|
+
*/
|
|
13511
|
+
type WebSearchResult = {
|
|
13512
|
+
/** Canonical URL. */
|
|
13513
|
+
url: string;
|
|
13514
|
+
/** Page title. */
|
|
13515
|
+
title: string;
|
|
13516
|
+
/** Page-level description. May be absent. */
|
|
13517
|
+
description?: string;
|
|
13518
|
+
/**
|
|
13519
|
+
* Last-modified date for the page, when known. Naive (no timezone)
|
|
13520
|
+
* ISO-8601 datetime, e.g. `"2025-11-30T04:39:48"`.
|
|
13521
|
+
*/
|
|
13522
|
+
lastModifiedDate?: string;
|
|
13523
|
+
/**
|
|
13524
|
+
* Page meta image URL (typically the `og:image`). May be absent.
|
|
13525
|
+
*/
|
|
13526
|
+
imageUrl?: string;
|
|
13527
|
+
/** Optional favicon URL for UI hints. */
|
|
13528
|
+
faviconUrl?: string;
|
|
13529
|
+
};
|
|
13530
|
+
/**
|
|
13531
|
+
* Per-response metadata for a Web Search query. Carries operational
|
|
13532
|
+
* fields useful for support and debugging.
|
|
13533
|
+
*/
|
|
13534
|
+
type WebSearchResponseMetadata = {
|
|
13535
|
+
/** The query that was executed. */
|
|
13536
|
+
query: string;
|
|
13537
|
+
/** Opaque request identifier used for support and debugging. */
|
|
13538
|
+
requestId: string;
|
|
13539
|
+
/** End-to-end latency for this search request, in milliseconds. */
|
|
13540
|
+
latencyMs: number;
|
|
13541
|
+
};
|
|
13542
|
+
/**
|
|
13543
|
+
* Response from a Web Search query.
|
|
13544
|
+
*/
|
|
13545
|
+
type WebSearchSearchResponse = {
|
|
13546
|
+
items: WebSearchResult[];
|
|
13547
|
+
metadata: WebSearchResponseMetadata;
|
|
13548
|
+
};
|
|
13549
|
+
// ============ Web Search Binding Class ============
|
|
13550
|
+
/**
|
|
13551
|
+
* Cloudflare Web Search binding.
|
|
13552
|
+
*
|
|
13553
|
+
* Discovery-only primitive for agents and Workers. Returns URLs and catalog
|
|
13554
|
+
* metadata for a query; never returns page content or excerpts. To read a
|
|
13555
|
+
* result's body, fetch the URL with the global `fetch()` API.
|
|
13556
|
+
*
|
|
13557
|
+
* Declared in wrangler with a single object (there is exactly one corpus, the
|
|
13558
|
+
* public web, so there is no name, namespace, or instance to specify):
|
|
13559
|
+
*
|
|
13560
|
+
* ```jsonc
|
|
13561
|
+
* { "web_search": { "binding": "WEBSEARCH" } }
|
|
13562
|
+
* ```
|
|
13563
|
+
*
|
|
13564
|
+
* @example
|
|
13565
|
+
* ```ts
|
|
13566
|
+
* const { items, metadata } = await env.WEBSEARCH.search({
|
|
13567
|
+
* query: "Cloudflare Workers",
|
|
13568
|
+
* });
|
|
13569
|
+
*
|
|
13570
|
+
* const top = items[0];
|
|
13571
|
+
* console.log(top.url, top.title, metadata.latencyMs);
|
|
13572
|
+
*
|
|
13573
|
+
* // Read content yourself; pay-per-crawl and other publisher
|
|
13574
|
+
* // controls apply at the fetch site, not at search time.
|
|
13575
|
+
* const page = await fetch(top.url);
|
|
13576
|
+
* ```
|
|
13577
|
+
*/
|
|
13578
|
+
declare abstract class WebSearch {
|
|
13579
|
+
/**
|
|
13580
|
+
* Run a Web Search query.
|
|
13581
|
+
* @param options Search options. Only `query` is required.
|
|
13582
|
+
* @returns The matching results plus per-response metadata.
|
|
13583
|
+
*/
|
|
13584
|
+
search(options: WebSearchSearchOptions): Promise<WebSearchSearchResponse>;
|
|
13585
|
+
}
|
|
13471
13586
|
interface DynamicDispatchLimits {
|
|
13472
13587
|
/**
|
|
13473
13588
|
* Limit CPU time in milliseconds.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/website",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.1",
|
|
5
5
|
"description": "https://repo.icebreaker.top source code",
|
|
6
6
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
7
7
|
"homepage": "https://repo.icebreaker.top",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"typecheck": "tsc -p tsconfig.json"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"vue": "^3.5.
|
|
26
|
+
"vue": "^3.5.35"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@braintree/sanitize-url": "^7.1.2",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"mermaid": "^11.15.0",
|
|
36
36
|
"tailwindcss": "^4.3.0",
|
|
37
37
|
"vitepress": "^1.6.4",
|
|
38
|
-
"vitepress-plugin-llms": "^1.13.
|
|
38
|
+
"vitepress-plugin-llms": "^1.13.1",
|
|
39
39
|
"vitepress-plugin-mermaid": "^2.0.17"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/vue-lib-template",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"description": "vue lib vite lib mode template",
|
|
6
6
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
7
7
|
"license": "ISC",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"jsdom": "^29.1.1",
|
|
56
56
|
"vite": "^8.0.14",
|
|
57
57
|
"vite-plugin-dts": "^5.0.1",
|
|
58
|
-
"vue": "^3.5.
|
|
59
|
-
"vue-tsc": "^3.3.
|
|
58
|
+
"vue": "^3.5.35",
|
|
59
|
+
"vue-tsc": "^3.3.3"
|
|
60
60
|
}
|
|
61
61
|
}
|