@workglow/google-gemini 0.2.34 → 0.2.36
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/dist/ai/GoogleGeminiProvider.d.ts +15 -20
- package/dist/ai/GoogleGeminiProvider.d.ts.map +1 -1
- package/dist/ai/GoogleGeminiQueuedProvider.d.ts +16 -21
- package/dist/ai/GoogleGeminiQueuedProvider.d.ts.map +1 -1
- package/dist/ai/common/Gemini_Capabilities.d.ts +49 -0
- package/dist/ai/common/Gemini_Capabilities.d.ts.map +1 -0
- package/dist/ai/common/Gemini_CapabilitySets.d.ts +30 -0
- package/dist/ai/common/Gemini_CapabilitySets.d.ts.map +1 -0
- package/dist/ai/common/Gemini_CountTokens.d.ts +1 -1
- package/dist/ai/common/Gemini_CountTokens.d.ts.map +1 -1
- package/dist/ai/common/Gemini_ImageEdit.d.ts +5 -6
- package/dist/ai/common/Gemini_ImageEdit.d.ts.map +1 -1
- package/dist/ai/common/Gemini_ImageGenerate.d.ts +5 -7
- package/dist/ai/common/Gemini_ImageGenerate.d.ts.map +1 -1
- package/dist/ai/common/Gemini_JobRunFns.d.ts +10 -3
- package/dist/ai/common/Gemini_JobRunFns.d.ts.map +1 -1
- package/dist/ai/common/Gemini_ModelInfo.d.ts +1 -1
- package/dist/ai/common/Gemini_ModelInfo.d.ts.map +1 -1
- package/dist/ai/common/Gemini_ModelSchema.d.ts +3 -3
- package/dist/ai/common/Gemini_ModelSearch.d.ts +8 -1
- package/dist/ai/common/Gemini_ModelSearch.d.ts.map +1 -1
- package/dist/ai/common/Gemini_StructuredGeneration.d.ts +9 -3
- package/dist/ai/common/Gemini_StructuredGeneration.d.ts.map +1 -1
- package/dist/ai/common/Gemini_TextEmbedding.d.ts +1 -1
- package/dist/ai/common/Gemini_TextEmbedding.d.ts.map +1 -1
- package/dist/ai/common/Gemini_TextGeneration.d.ts +13 -3
- package/dist/ai/common/Gemini_TextGeneration.d.ts.map +1 -1
- package/dist/ai/common/Gemini_TextRewriter.d.ts +2 -3
- package/dist/ai/common/Gemini_TextRewriter.d.ts.map +1 -1
- package/dist/ai/common/Gemini_TextSummary.d.ts +2 -3
- package/dist/ai/common/Gemini_TextSummary.d.ts.map +1 -1
- package/dist/ai/common/Gemini_ToolCalling.d.ts +2 -3
- package/dist/ai/common/Gemini_ToolCalling.d.ts.map +1 -1
- package/dist/ai/index.d.ts +25 -0
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/registerGeminiWorker.d.ts.map +1 -1
- package/dist/ai/runtime.d.ts.map +1 -1
- package/dist/ai-runtime.d.ts.map +1 -1
- package/dist/ai-runtime.js +490 -542
- package/dist/ai-runtime.js.map +22 -21
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +671 -38
- package/dist/ai.js.map +21 -5
- package/package.json +12 -13
- package/dist/ai/common/Gemini_Chat.d.ts +0 -10
- package/dist/ai/common/Gemini_Chat.d.ts.map +0 -1
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { AiProvider } from "@workglow/ai/worker";
|
|
7
|
-
|
|
7
|
+
import type { Capability, ModelRecord } from "@workglow/ai/worker";
|
|
8
|
+
declare const GoogleGeminiProvider_base: new (promiseRunFns?: readonly import("@workglow/ai").AiProviderRunFnRegistration<any, any, {
|
|
9
|
+
capabilities?: string[] | undefined;
|
|
8
10
|
description?: string | undefined;
|
|
9
11
|
metadata?: {
|
|
10
12
|
[x: string]: unknown;
|
|
@@ -16,9 +18,9 @@ declare const GoogleGeminiProvider_base: new (tasks?: Record<string, import("@wo
|
|
|
16
18
|
embedding_task_type?: "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "SEMANTIC_SIMILARITY" | null | undefined;
|
|
17
19
|
model_name: string;
|
|
18
20
|
};
|
|
19
|
-
tasks?: string[] | undefined;
|
|
20
21
|
title?: string | undefined;
|
|
21
|
-
}
|
|
22
|
+
}>[] | undefined, previewTasks?: Record<string, import("@workglow/ai").AiProviderPreviewRunFn<any, any, {
|
|
23
|
+
capabilities?: string[] | undefined;
|
|
22
24
|
description?: string | undefined;
|
|
23
25
|
metadata?: {
|
|
24
26
|
[x: string]: unknown;
|
|
@@ -30,23 +32,9 @@ declare const GoogleGeminiProvider_base: new (tasks?: Record<string, import("@wo
|
|
|
30
32
|
embedding_task_type?: "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "SEMANTIC_SIMILARITY" | null | undefined;
|
|
31
33
|
model_name: string;
|
|
32
34
|
};
|
|
33
|
-
tasks?: string[] | undefined;
|
|
34
|
-
title?: string | undefined;
|
|
35
|
-
}>> | undefined, previewTasks?: Record<string, import("@workglow/ai").AiProviderPreviewRunFn<any, any, {
|
|
36
|
-
description?: string | undefined;
|
|
37
|
-
metadata?: {
|
|
38
|
-
[x: string]: unknown;
|
|
39
|
-
} | undefined;
|
|
40
|
-
model_id?: string | undefined;
|
|
41
|
-
provider: "GOOGLE_GEMINI";
|
|
42
|
-
provider_config: {
|
|
43
|
-
credential_key?: string | undefined;
|
|
44
|
-
embedding_task_type?: "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "SEMANTIC_SIMILARITY" | null | undefined;
|
|
45
|
-
model_name: string;
|
|
46
|
-
};
|
|
47
|
-
tasks?: string[] | undefined;
|
|
48
35
|
title?: string | undefined;
|
|
49
36
|
}>> | undefined) => AiProvider<{
|
|
37
|
+
capabilities?: string[] | undefined;
|
|
50
38
|
description?: string | undefined;
|
|
51
39
|
metadata?: {
|
|
52
40
|
[x: string]: unknown;
|
|
@@ -58,21 +46,28 @@ declare const GoogleGeminiProvider_base: new (tasks?: Record<string, import("@wo
|
|
|
58
46
|
embedding_task_type?: "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "SEMANTIC_SIMILARITY" | null | undefined;
|
|
59
47
|
model_name: string;
|
|
60
48
|
};
|
|
61
|
-
tasks?: string[] | undefined;
|
|
62
49
|
title?: string | undefined;
|
|
63
50
|
}> & {
|
|
64
51
|
readonly name: string;
|
|
65
52
|
readonly displayName: string;
|
|
66
53
|
readonly isLocal: boolean;
|
|
67
54
|
readonly supportsBrowser: boolean;
|
|
68
|
-
readonly taskTypes: readonly ["CountTokensTask", "ModelInfoTask", "TextGenerationTask", "TextEmbeddingTask", "TextRewriterTask", "TextSummaryTask", "StructuredGenerationTask", "ToolCallingTask", "ModelSearchTask", "ImageGenerateTask", "ImageEditTask"];
|
|
69
55
|
};
|
|
70
56
|
/**
|
|
71
57
|
* Worker-server registration for Google Gemini cloud models. Imports
|
|
72
58
|
* `AiProvider` from `@workglow/ai/worker` so the SDK is only loaded in the
|
|
73
59
|
* worker.
|
|
60
|
+
*
|
|
61
|
+
* The class extends the {@link createCloudProviderClass} mixin (which
|
|
62
|
+
* supplies `name` / `displayName` / `isLocal` / `supportsBrowser`) and adds
|
|
63
|
+
* the Gemini-specific {@link AiProvider.inferCapabilities} and
|
|
64
|
+
* {@link AiProvider.workerRunFnSpecs} overrides.
|
|
74
65
|
*/
|
|
75
66
|
export declare class GoogleGeminiProvider extends GoogleGeminiProvider_base {
|
|
67
|
+
inferCapabilities(model: ModelRecord): readonly Capability[];
|
|
68
|
+
protected workerRunFnSpecs(): readonly {
|
|
69
|
+
serves: readonly Capability[];
|
|
70
|
+
}[];
|
|
76
71
|
}
|
|
77
72
|
export {};
|
|
78
73
|
//# sourceMappingURL=GoogleGeminiProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleGeminiProvider.d.ts","sourceRoot":"","sources":["../../src/ai/GoogleGeminiProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC
|
|
1
|
+
{"version":3,"file":"GoogleGeminiProvider.d.ts","sourceRoot":"","sources":["../../src/ai/GoogleGeminiProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMnE;;;;;;;;;GASG;AACH,qBAAa,oBAAqB,SAAQ,yBAGxC;IACS,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,UAAU,EAAE,CAEpE;IAED,UAAmB,gBAAgB,IAAI,SAAS;QAAE,MAAM,EAAE,SAAS,UAAU,EAAE,CAAA;KAAE,EAAE,CAElF;CACF"}
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { AiProvider } from "@workglow/ai";
|
|
7
|
-
|
|
7
|
+
import type { Capability, ModelRecord } from "@workglow/ai";
|
|
8
|
+
declare const GoogleGeminiQueuedProvider_base: new (promiseRunFns?: readonly import("@workglow/ai").AiProviderRunFnRegistration<any, any, {
|
|
9
|
+
capabilities?: string[] | undefined;
|
|
8
10
|
description?: string | undefined;
|
|
9
11
|
metadata?: {
|
|
10
12
|
[x: string]: unknown;
|
|
@@ -16,9 +18,9 @@ declare const GoogleGeminiQueuedProvider_base: new (tasks?: Record<string, impor
|
|
|
16
18
|
embedding_task_type?: "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "SEMANTIC_SIMILARITY" | null | undefined;
|
|
17
19
|
model_name: string;
|
|
18
20
|
};
|
|
19
|
-
tasks?: string[] | undefined;
|
|
20
21
|
title?: string | undefined;
|
|
21
|
-
}
|
|
22
|
+
}>[] | undefined, previewTasks?: Record<string, import("@workglow/ai").AiProviderPreviewRunFn<any, any, {
|
|
23
|
+
capabilities?: string[] | undefined;
|
|
22
24
|
description?: string | undefined;
|
|
23
25
|
metadata?: {
|
|
24
26
|
[x: string]: unknown;
|
|
@@ -30,23 +32,9 @@ declare const GoogleGeminiQueuedProvider_base: new (tasks?: Record<string, impor
|
|
|
30
32
|
embedding_task_type?: "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "SEMANTIC_SIMILARITY" | null | undefined;
|
|
31
33
|
model_name: string;
|
|
32
34
|
};
|
|
33
|
-
tasks?: string[] | undefined;
|
|
34
|
-
title?: string | undefined;
|
|
35
|
-
}>> | undefined, previewTasks?: Record<string, import("@workglow/ai").AiProviderPreviewRunFn<any, any, {
|
|
36
|
-
description?: string | undefined;
|
|
37
|
-
metadata?: {
|
|
38
|
-
[x: string]: unknown;
|
|
39
|
-
} | undefined;
|
|
40
|
-
model_id?: string | undefined;
|
|
41
|
-
provider: "GOOGLE_GEMINI";
|
|
42
|
-
provider_config: {
|
|
43
|
-
credential_key?: string | undefined;
|
|
44
|
-
embedding_task_type?: "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "SEMANTIC_SIMILARITY" | null | undefined;
|
|
45
|
-
model_name: string;
|
|
46
|
-
};
|
|
47
|
-
tasks?: string[] | undefined;
|
|
48
35
|
title?: string | undefined;
|
|
49
36
|
}>> | undefined) => AiProvider<{
|
|
37
|
+
capabilities?: string[] | undefined;
|
|
50
38
|
description?: string | undefined;
|
|
51
39
|
metadata?: {
|
|
52
40
|
[x: string]: unknown;
|
|
@@ -58,17 +46,24 @@ declare const GoogleGeminiQueuedProvider_base: new (tasks?: Record<string, impor
|
|
|
58
46
|
embedding_task_type?: "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "SEMANTIC_SIMILARITY" | null | undefined;
|
|
59
47
|
model_name: string;
|
|
60
48
|
};
|
|
61
|
-
tasks?: string[] | undefined;
|
|
62
49
|
title?: string | undefined;
|
|
63
50
|
}> & {
|
|
64
51
|
readonly name: string;
|
|
65
52
|
readonly displayName: string;
|
|
66
53
|
readonly isLocal: boolean;
|
|
67
54
|
readonly supportsBrowser: boolean;
|
|
68
|
-
readonly taskTypes: readonly ["CountTokensTask", "ModelInfoTask", "TextGenerationTask", "TextEmbeddingTask", "TextRewriterTask", "TextSummaryTask", "StructuredGenerationTask", "ToolCallingTask", "ModelSearchTask", "ImageGenerateTask", "ImageEditTask"];
|
|
69
55
|
};
|
|
70
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Main-thread registration shell for Google Gemini. Used both for inline mode
|
|
58
|
+
* (constructed with the run-fn registrations array) and worker-backed mode
|
|
59
|
+
* (constructed empty so the base class registers worker proxies). No queue
|
|
60
|
+
* is created — Google Gemini uses {@link DirectExecutionStrategy}.
|
|
61
|
+
*/
|
|
71
62
|
export declare class GoogleGeminiQueuedProvider extends GoogleGeminiQueuedProvider_base {
|
|
63
|
+
inferCapabilities(model: ModelRecord): readonly Capability[];
|
|
64
|
+
protected workerRunFnSpecs(): readonly {
|
|
65
|
+
serves: readonly Capability[];
|
|
66
|
+
}[];
|
|
72
67
|
}
|
|
73
68
|
export {};
|
|
74
69
|
//# sourceMappingURL=GoogleGeminiQueuedProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleGeminiQueuedProvider.d.ts","sourceRoot":"","sources":["../../src/ai/GoogleGeminiQueuedProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"GoogleGeminiQueuedProvider.d.ts","sourceRoot":"","sources":["../../src/ai/GoogleGeminiQueuedProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAM5D;;;;;GAKG;AACH,qBAAa,0BAA2B,SAAQ,+BAM/C;IACU,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,UAAU,EAAE,CAEpE;IAED,UAAmB,gBAAgB,IAAI,SAAS;QAAE,MAAM,EAAE,SAAS,UAAU,EAAE,CAAA;KAAE,EAAE,CAElF;CACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { Capability, ModelRecord } from "@workglow/ai/worker";
|
|
7
|
+
/**
|
|
8
|
+
* Closed list of capability-set specs the Google Gemini provider serves. Derived
|
|
9
|
+
* from {@link GEMINI_CAPABILITY_SETS} — do not edit here. Used by the
|
|
10
|
+
* main-thread provider shells when registering worker-mode proxies (the
|
|
11
|
+
* actual runFns live in {@link GEMINI_RUN_FNS} on the worker side, but the
|
|
12
|
+
* main thread still needs to know which `serves` sets to register so the
|
|
13
|
+
* dispatcher can route requests to the worker proxy).
|
|
14
|
+
*/
|
|
15
|
+
export declare const GEMINI_RUN_FN_SPECS: {
|
|
16
|
+
serves: ["image.editing"] | ["image.generation"] | ["model.count-tokens"] | ["model.info"] | ["model.search"] | ["text.embedding"] | ["text.generation"] | ["text.rewriter"] | ["text.summary"] | ["text.generation", "json-mode"] | ["text.generation", "tool-use"];
|
|
17
|
+
}[];
|
|
18
|
+
export declare function geminiWorkerRunFnSpecs(): readonly {
|
|
19
|
+
readonly serves: readonly Capability[];
|
|
20
|
+
}[];
|
|
21
|
+
/**
|
|
22
|
+
* Shape used by the model-name regexes — `model_id` is required, the rest
|
|
23
|
+
* is loosely-typed metadata only used to opportunistically widen the
|
|
24
|
+
* inferred capability set.
|
|
25
|
+
*/
|
|
26
|
+
type CapabilityHints = Pick<ModelRecord, "model_id" | "provider_config" | "capabilities">;
|
|
27
|
+
/**
|
|
28
|
+
* Heuristic capability inference for a Google Gemini {@link ModelRecord}. Pattern-
|
|
29
|
+
* matches the canonical Gemini model id strings (and the `provider_config.
|
|
30
|
+
* model_name` if present) to a closed set of {@link Capability}s. Falls back
|
|
31
|
+
* to the model's stored `capabilities` array (or a baseline of search +
|
|
32
|
+
* info) when no pattern matches.
|
|
33
|
+
*
|
|
34
|
+
* Main-thread method only — workers do not run capability inference.
|
|
35
|
+
*
|
|
36
|
+
* Coverage map (cross-referenced against `Gemini_ModelSearch.ts` fallback list):
|
|
37
|
+
* - text-embedding-*, embedding-001, gemini-embedding-* → text.embedding + meta-ops
|
|
38
|
+
* - imagen-* → image.generation + meta-ops (Imagen models, no chat)
|
|
39
|
+
* - gemini-*-image-* → image.generation + image.editing + meta-ops
|
|
40
|
+
* - gemini-pro-vision → text.generation + tool-use + json-mode + vision-input + meta-ops
|
|
41
|
+
* - gemini-1.0-pro (no vision suffix) → text.generation + tool-use + json-mode + meta-ops
|
|
42
|
+
* - gemini-pro (legacy) → text.generation + tool-use + json-mode + meta-ops
|
|
43
|
+
* - gemini-1.5-*, gemini-2.0-*, gemini-2.5-*, gemini-3-*, gemini-3.1-* → full set
|
|
44
|
+
* - Unknown id with declared capabilities → return as-is
|
|
45
|
+
* - Unknown id with no caps → baseline meta-ops
|
|
46
|
+
*/
|
|
47
|
+
export declare function inferGeminiCapabilities(model: CapabilityHints): readonly Capability[];
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=Gemini_Capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gemini_Capabilities.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_Capabilities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOnE;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;GAAuD,CAAC;AAExF,wBAAgB,sBAAsB,IAAI,SAAS;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAA;CAAE,EAAE,CAE9F;AAED;;;;GAIG;AACH,KAAK,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,iBAAiB,GAAG,cAAc,CAAC,CAAC;AAE1F;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,UAAU,EAAE,CA0FrF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Single source of truth for Google Gemini's capability sets.
|
|
8
|
+
*
|
|
9
|
+
* Both `GEMINI_RUN_FNS` (the worker-side registration list) and
|
|
10
|
+
* `workerRunFnSpecs()` (the main-thread proxy declaration) derive their
|
|
11
|
+
* `serves` arrays from these named exports. SDK-free so the main thread
|
|
12
|
+
* can import without paying the Gemini client cost.
|
|
13
|
+
*
|
|
14
|
+
* To add a new capability set: declare a new `as const` constant here,
|
|
15
|
+
* then reference it from both `GEMINI_RUN_FNS` and `GEMINI_RUN_FN_SPECS`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const GEMINI_TEXT_GENERATION: ["text.generation"];
|
|
18
|
+
export declare const GEMINI_TOOL_USE: ["text.generation", "tool-use"];
|
|
19
|
+
export declare const GEMINI_JSON_MODE: ["text.generation", "json-mode"];
|
|
20
|
+
export declare const GEMINI_TEXT_REWRITER: ["text.rewriter"];
|
|
21
|
+
export declare const GEMINI_TEXT_SUMMARY: ["text.summary"];
|
|
22
|
+
export declare const GEMINI_TEXT_EMBEDDING: ["text.embedding"];
|
|
23
|
+
export declare const GEMINI_IMAGE_GENERATION: ["image.generation"];
|
|
24
|
+
export declare const GEMINI_IMAGE_EDITING: ["image.editing"];
|
|
25
|
+
export declare const GEMINI_COUNT_TOKENS: ["model.count-tokens"];
|
|
26
|
+
export declare const GEMINI_MODEL_SEARCH: ["model.search"];
|
|
27
|
+
export declare const GEMINI_MODEL_INFO: ["model.info"];
|
|
28
|
+
/** Aggregated list — for `workerRunFnSpecs()` derivation. Order MUST match `GEMINI_RUN_FNS`. */
|
|
29
|
+
export declare const GEMINI_CAPABILITY_SETS: readonly [["text.generation"], ["text.generation", "tool-use"], ["text.generation", "json-mode"], ["text.rewriter"], ["text.summary"], ["text.embedding"], ["image.generation"], ["image.editing"], ["model.count-tokens"], ["model.search"], ["model.info"]];
|
|
30
|
+
//# sourceMappingURL=Gemini_CapabilitySets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gemini_CapabilitySets.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_CapabilitySets.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,qBAAsD,CAAC;AAC1F,eAAO,MAAM,eAAe,iCAAkE,CAAC;AAC/F,eAAO,MAAM,gBAAgB,kCAAmE,CAAC;AACjG,eAAO,MAAM,oBAAoB,mBAAoD,CAAC;AACtF,eAAO,MAAM,mBAAmB,kBAAmD,CAAC;AACpF,eAAO,MAAM,qBAAqB,oBAAqD,CAAC;AACxF,eAAO,MAAM,uBAAuB,sBAAuD,CAAC;AAC5F,eAAO,MAAM,oBAAoB,mBAAoD,CAAC;AACtF,eAAO,MAAM,mBAAmB,wBAAyD,CAAC;AAC1F,eAAO,MAAM,mBAAmB,kBAAmD,CAAC;AACpF,eAAO,MAAM,iBAAiB,gBAAiD,CAAC;AAEhF,gGAAgG;AAChG,eAAO,MAAM,sBAAsB,+PAYzB,CAAC"}
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { AiProviderPreviewRunFn, AiProviderRunFn, CountTokensTaskInput, CountTokensTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { GeminiModelConfig } from "./Gemini_ModelSchema";
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const Gemini_CountTokens_Stream: AiProviderRunFn<CountTokensTaskInput, CountTokensTaskOutput, GeminiModelConfig>;
|
|
9
9
|
export declare const Gemini_CountTokens_Preview: AiProviderPreviewRunFn<CountTokensTaskInput, CountTokensTaskOutput, GeminiModelConfig>;
|
|
10
10
|
//# sourceMappingURL=Gemini_CountTokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gemini_CountTokens.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_CountTokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"Gemini_CountTokens.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_CountTokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,eAAO,MAAM,yBAAyB,EAAE,eAAe,CACrD,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,CAOlB,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,sBAAsB,CAC7D,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,CAGlB,CAAC"}
|
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderRunFn,
|
|
6
|
+
import type { AiProviderRunFn, ImageEditTaskInput, ImageEditTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { GeminiModelConfig } from "./Gemini_ModelSchema";
|
|
8
|
-
/** Non-streaming path. */
|
|
9
|
-
export declare const Gemini_ImageEdit: AiProviderRunFn<ImageEditTaskInput, ImageEditTaskOutput, GeminiModelConfig>;
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
12
|
-
* so we
|
|
9
|
+
* Run-fn for `["image.editing"]`. Gemini does not support partial
|
|
10
|
+
* image streaming, so we execute the full edit, emit one snapshot, then
|
|
11
|
+
* a finish event.
|
|
13
12
|
*/
|
|
14
|
-
export declare const Gemini_ImageEdit_Stream:
|
|
13
|
+
export declare const Gemini_ImageEdit_Stream: AiProviderRunFn<ImageEditTaskInput, ImageEditTaskOutput, GeminiModelConfig>;
|
|
15
14
|
//# sourceMappingURL=Gemini_ImageEdit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gemini_ImageEdit.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_ImageEdit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"Gemini_ImageEdit.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_ImageEdit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EAEpB,MAAM,cAAc,CAAC;AAOtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA2C9D;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,eAAe,CACnD,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,CA+ElB,CAAC"}
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderRunFn,
|
|
6
|
+
import type { AiProviderRunFn, ImageGenerateTaskInput, ImageGenerateTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { GeminiModelConfig } from "./Gemini_ModelSchema";
|
|
8
|
-
/** Non-streaming path. */
|
|
9
|
-
export declare const Gemini_ImageGenerate: AiProviderRunFn<ImageGenerateTaskInput, ImageGenerateTaskOutput, GeminiModelConfig>;
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
9
|
+
* Run-fn for `["image.generation"]`. Gemini does not support partial
|
|
10
|
+
* image streaming, so we execute the full generation, emit one snapshot, then
|
|
11
|
+
* a finish event per the one-shot convention.
|
|
14
12
|
*/
|
|
15
|
-
export declare const Gemini_ImageGenerate_Stream:
|
|
13
|
+
export declare const Gemini_ImageGenerate_Stream: AiProviderRunFn<ImageGenerateTaskInput, ImageGenerateTaskOutput, GeminiModelConfig>;
|
|
16
14
|
//# sourceMappingURL=Gemini_ImageGenerate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gemini_ImageGenerate.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_ImageGenerate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"Gemini_ImageGenerate.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_ImageGenerate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EAExB,MAAM,cAAc,CAAC;AAMtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAgB9D;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAE,eAAe,CACvD,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,CAiElB,CAAC"}
|
|
@@ -3,11 +3,18 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
6
|
+
import type { AiProviderRunFnRegistration, AiProviderPreviewRunFn } from "@workglow/ai";
|
|
7
7
|
import type { GeminiModelConfig } from "./Gemini_ModelSchema";
|
|
8
8
|
export { loadGeminiSDK, getApiKey, getModelName } from "./Gemini_Client";
|
|
9
9
|
export { sanitizeSchemaForGemini } from "./Gemini_Schema";
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Capability-set run-fn registrations for the Google Gemini provider. Order is
|
|
12
|
+
* significant only as a tiebreaker — the dispatcher prefers the smallest
|
|
13
|
+
* `serves` set that is a superset of the task's `requires`, so the bare
|
|
14
|
+
* `["text.generation"]` entry wins for a plain {@link TextGenerationTask} or
|
|
15
|
+
* {@link AiChatTask} while the `["text.generation", "tool-use"]` entry wins
|
|
16
|
+
* for {@link ToolCallingTask}.
|
|
17
|
+
*/
|
|
18
|
+
export declare const GEMINI_RUN_FNS: readonly AiProviderRunFnRegistration<any, any, GeminiModelConfig>[];
|
|
12
19
|
export declare const GEMINI_PREVIEW_TASKS: Record<string, AiProviderPreviewRunFn<any, any, GeminiModelConfig>>;
|
|
13
20
|
//# sourceMappingURL=Gemini_JobRunFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gemini_JobRunFns.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_JobRunFns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Gemini_JobRunFns.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_JobRunFns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,2BAA2B,EAC3B,sBAAsB,EACvB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAe9D,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAc1D;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,2BAA2B,CAE/D,GAAG,EAEH,GAAG,EACH,iBAAiB,CAClB,EAYA,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,MAAM,EAEN,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,iBAAiB,CAAC,CAGpD,CAAC"}
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { AiProviderRunFn, ModelInfoTaskInput, ModelInfoTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { GeminiModelConfig } from "./Gemini_ModelSchema";
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const Gemini_ModelInfo_Stream: AiProviderRunFn<ModelInfoTaskInput, ModelInfoTaskOutput, GeminiModelConfig>;
|
|
9
9
|
//# sourceMappingURL=Gemini_ModelInfo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gemini_ModelInfo.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_ModelInfo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAQ9D,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"Gemini_ModelInfo.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_ModelInfo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAQ9D,eAAO,MAAM,uBAAuB,EAAE,eAAe,CACnD,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,CA6ClB,CAAC"}
|
|
@@ -49,7 +49,7 @@ export declare const GeminiModelRecordSchema: {
|
|
|
49
49
|
readonly model_id: {
|
|
50
50
|
readonly type: "string";
|
|
51
51
|
};
|
|
52
|
-
readonly
|
|
52
|
+
readonly capabilities: {
|
|
53
53
|
readonly type: "array";
|
|
54
54
|
readonly items: {
|
|
55
55
|
readonly type: "string";
|
|
@@ -101,7 +101,7 @@ export declare const GeminiModelRecordSchema: {
|
|
|
101
101
|
readonly additionalProperties: false;
|
|
102
102
|
};
|
|
103
103
|
};
|
|
104
|
-
readonly required: readonly ["model_id", "
|
|
104
|
+
readonly required: readonly ["model_id", "capabilities", "provider", "title", "description", "provider_config", "metadata", "provider", "provider_config"];
|
|
105
105
|
readonly additionalProperties: false;
|
|
106
106
|
};
|
|
107
107
|
export type GeminiModelRecord = FromSchema<typeof GeminiModelRecordSchema>;
|
|
@@ -111,7 +111,7 @@ export declare const GeminiModelConfigSchema: {
|
|
|
111
111
|
readonly model_id: {
|
|
112
112
|
readonly type: "string";
|
|
113
113
|
};
|
|
114
|
-
readonly
|
|
114
|
+
readonly capabilities: {
|
|
115
115
|
readonly type: "array";
|
|
116
116
|
readonly items: {
|
|
117
117
|
readonly type: "string";
|
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { AiProviderRunFn, ModelSearchTaskInput, ModelSearchTaskOutput } from "@workglow/ai";
|
|
7
|
-
|
|
7
|
+
interface GeminiModelEntry {
|
|
8
|
+
readonly label: string;
|
|
9
|
+
readonly value: string;
|
|
10
|
+
readonly capabilities?: readonly string[];
|
|
11
|
+
}
|
|
12
|
+
export declare const GEMINI_FALLBACK_MODELS: readonly GeminiModelEntry[];
|
|
13
|
+
export declare const Gemini_ModelSearch_Stream: AiProviderRunFn<ModelSearchTaskInput, ModelSearchTaskOutput>;
|
|
14
|
+
export {};
|
|
8
15
|
//# sourceMappingURL=Gemini_ModelSearch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gemini_ModelSearch.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_ModelSearch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Gemini_ModelSearch.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_ModelSearch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAItB,UAAU,gBAAgB;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;AAED,eAAO,MAAM,sBAAsB,EAAE,SAAS,gBAAgB,EAiC7D,CAAC;AAwDF,eAAO,MAAM,yBAAyB,EAAE,eAAe,CACrD,oBAAoB,EACpB,qBAAqB,CAiCtB,CAAC"}
|
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderRunFn,
|
|
6
|
+
import type { AiProviderRunFn, StructuredGenerationTaskInput, StructuredGenerationTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { GeminiModelConfig } from "./Gemini_ModelSchema";
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Streaming run-fn for `["text.generation", "json-mode"]`. Gemini uses
|
|
10
|
+
* `responseSchema` + `responseMimeType: "application/json"` to produce
|
|
11
|
+
* structured output. Per the streaming convention exception for json-mode,
|
|
12
|
+
* the `finish` event MUST include the parsed `object` so that
|
|
13
|
+
* `StructuredGenerationTask` can read it without a JSON streaming parser.
|
|
14
|
+
*/
|
|
15
|
+
export declare const Gemini_StructuredGeneration_Stream: AiProviderRunFn<StructuredGenerationTaskInput, StructuredGenerationTaskOutput, GeminiModelConfig>;
|
|
10
16
|
//# sourceMappingURL=Gemini_StructuredGeneration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gemini_StructuredGeneration.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_StructuredGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"Gemini_StructuredGeneration.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_StructuredGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,6BAA6B,EAC7B,8BAA8B,EAC/B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAI9D;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC,EAAE,eAAe,CAC9D,6BAA6B,EAC7B,8BAA8B,EAC9B,iBAAiB,CA4ClB,CAAC"}
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { AiProviderRunFn, TextEmbeddingTaskInput, TextEmbeddingTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { GeminiModelConfig } from "./Gemini_ModelSchema";
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const Gemini_TextEmbedding_Stream: AiProviderRunFn<TextEmbeddingTaskInput, TextEmbeddingTaskOutput, GeminiModelConfig>;
|
|
9
9
|
//# sourceMappingURL=Gemini_TextEmbedding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gemini_TextEmbedding.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_TextEmbedding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"Gemini_TextEmbedding.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_TextEmbedding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,eAAO,MAAM,2BAA2B,EAAE,eAAe,CACvD,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,CA4ClB,CAAC"}
|
|
@@ -3,8 +3,18 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderRunFn,
|
|
6
|
+
import type { AiProviderRunFn, TextGenerationTaskInput, TextGenerationTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { GeminiModelConfig } from "./Gemini_ModelSchema";
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Streaming run-fn for the `["text.generation"]` capability. Used by both
|
|
10
|
+
* {@link TextGenerationTask} (prompt-only input) and {@link AiChatTask}
|
|
11
|
+
* (full conversation history). Yields `text-delta` events on the `text` port
|
|
12
|
+
* and a final empty `finish` event per the streaming convention (consumer
|
|
13
|
+
* accumulates).
|
|
14
|
+
*
|
|
15
|
+
* Discriminates on `Array.isArray(input.messages) && input.messages.length > 0`
|
|
16
|
+
* to choose the chat vs. prompt path — safe because AiChatTask always provides
|
|
17
|
+
* `messages` and TextGenerationTask never does.
|
|
18
|
+
*/
|
|
19
|
+
export declare const Gemini_TextGeneration_Stream: AiProviderRunFn<TextGenerationTaskInput, TextGenerationTaskOutput, GeminiModelConfig>;
|
|
10
20
|
//# sourceMappingURL=Gemini_TextGeneration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gemini_TextGeneration.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_TextGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"Gemini_TextGeneration.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_TextGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAgB9D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,EAAE,eAAe,CACxD,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,CAiElB,CAAC"}
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderRunFn,
|
|
6
|
+
import type { AiProviderRunFn, TextRewriterTaskInput, TextRewriterTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { GeminiModelConfig } from "./Gemini_ModelSchema";
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const Gemini_TextRewriter_Stream: AiProviderStreamFn<TextRewriterTaskInput, TextRewriterTaskOutput, GeminiModelConfig>;
|
|
8
|
+
export declare const Gemini_TextRewriter_Stream: AiProviderRunFn<TextRewriterTaskInput, TextRewriterTaskOutput, GeminiModelConfig>;
|
|
10
9
|
//# sourceMappingURL=Gemini_TextRewriter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gemini_TextRewriter.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_TextRewriter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"Gemini_TextRewriter.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_TextRewriter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,eAAO,MAAM,0BAA0B,EAAE,eAAe,CACtD,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,CAqBlB,CAAC"}
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderRunFn,
|
|
6
|
+
import type { AiProviderRunFn, TextSummaryTaskInput, TextSummaryTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { GeminiModelConfig } from "./Gemini_ModelSchema";
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const Gemini_TextSummary_Stream: AiProviderStreamFn<TextSummaryTaskInput, TextSummaryTaskOutput, GeminiModelConfig>;
|
|
8
|
+
export declare const Gemini_TextSummary_Stream: AiProviderRunFn<TextSummaryTaskInput, TextSummaryTaskOutput, GeminiModelConfig>;
|
|
10
9
|
//# sourceMappingURL=Gemini_TextSummary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gemini_TextSummary.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_TextSummary.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"Gemini_TextSummary.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_TextSummary.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,eAAO,MAAM,yBAAyB,EAAE,eAAe,CACrD,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,CAqBlB,CAAC"}
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { AiProviderRunFn,
|
|
6
|
+
import type { AiProviderRunFn, ChatMessage, ToolCallingTaskInput, ToolCallingTaskOutput } from "@workglow/ai";
|
|
7
7
|
import type { GeminiModelConfig } from "./Gemini_ModelSchema";
|
|
8
8
|
export declare function buildGeminiContents(messages: ReadonlyArray<ChatMessage> | undefined, prompt: unknown): any[];
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const Gemini_ToolCalling_Stream: AiProviderStreamFn<ToolCallingTaskInput, ToolCallingTaskOutput, GeminiModelConfig>;
|
|
9
|
+
export declare const Gemini_ToolCalling_Stream: AiProviderRunFn<ToolCallingTaskInput, ToolCallingTaskOutput, GeminiModelConfig>;
|
|
11
10
|
//# sourceMappingURL=Gemini_ToolCalling.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gemini_ToolCalling.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_ToolCalling.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EACV,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"Gemini_ToolCalling.d.ts","sourceRoot":"","sources":["../../../src/ai/common/Gemini_ToolCalling.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EAEtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAI9D,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,SAAS,EAChD,MAAM,EAAE,OAAO,GACd,GAAG,EAAE,CA4DP;AAwBD,eAAO,MAAM,yBAAyB,EAAE,eAAe,CACrD,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,CAgElB,CAAC"}
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -8,4 +8,29 @@ export * from "./common/Gemini_ImageValidation";
|
|
|
8
8
|
export * from "./common/Gemini_ModelSchema";
|
|
9
9
|
export * from "./common/Gemini_ModelSearch";
|
|
10
10
|
export * from "./registerGemini";
|
|
11
|
+
import { GoogleGeminiQueuedProvider } from "./GoogleGeminiQueuedProvider";
|
|
12
|
+
/**
|
|
13
|
+
* @internal Symbols exported only for use by `@workglow/test`. Not part of the stable public API.
|
|
14
|
+
*/
|
|
15
|
+
export declare const _testOnly: {
|
|
16
|
+
readonly GoogleGeminiQueuedProvider: typeof GoogleGeminiQueuedProvider;
|
|
17
|
+
readonly GEMINI_RUN_FN_SPECS: {
|
|
18
|
+
serves: ["image.editing"] | ["image.generation"] | ["model.count-tokens"] | ["model.info"] | ["model.search"] | ["text.embedding"] | ["text.generation"] | ["text.rewriter"] | ["text.summary"] | ["text.generation", "json-mode"] | ["text.generation", "tool-use"];
|
|
19
|
+
}[];
|
|
20
|
+
readonly GEMINI_RUN_FNS: readonly import("@workglow/ai").AiProviderRunFnRegistration<any, any, {
|
|
21
|
+
capabilities?: string[] | undefined;
|
|
22
|
+
description?: string | undefined;
|
|
23
|
+
metadata?: {
|
|
24
|
+
[x: string]: unknown;
|
|
25
|
+
} | undefined;
|
|
26
|
+
model_id?: string | undefined;
|
|
27
|
+
provider: "GOOGLE_GEMINI";
|
|
28
|
+
provider_config: {
|
|
29
|
+
credential_key?: string | undefined;
|
|
30
|
+
embedding_task_type?: "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "SEMANTIC_SIMILARITY" | null | undefined;
|
|
31
|
+
model_name: string;
|
|
32
|
+
};
|
|
33
|
+
title?: string | undefined;
|
|
34
|
+
}>[];
|
|
35
|
+
};
|
|
11
36
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ai/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AAIjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;CAIZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerGeminiWorker.d.ts","sourceRoot":"","sources":["../../src/ai/registerGeminiWorker.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"registerGeminiWorker.d.ts","sourceRoot":"","sources":["../../src/ai/registerGeminiWorker.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAM1D"}
|
package/dist/ai/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/ai/runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/ai/runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AAGH,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
|
package/dist/ai-runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-runtime.d.ts","sourceRoot":"","sources":["../src/ai-runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"ai-runtime.d.ts","sourceRoot":"","sources":["../src/ai-runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,cAAc,cAAc,CAAC"}
|