@moldea.ai/adapter-google-genai 3.0.0 → 3.0.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/README.md CHANGED
@@ -8,7 +8,7 @@ The package implements the official `google-genai` runtime adapter for `@moldea.
8
8
 
9
9
  ## Supported target
10
10
 
11
- Version `3.0.0` supports:
11
+ Version `3.0.1` supports:
12
12
 
13
13
  - Repository Format version `1`
14
14
  - `@moldea.ai/core ^4.0.0`
@@ -60,3 +60,12 @@ pnpm --filter @moldea.ai/adapter-google-genai build
60
60
  ```
61
61
 
62
62
  Tests are colocated with their owning modules. Canonical conformance fixtures live under `/fixtures/adapter-google-genai`.
63
+
64
+ ## Documentation
65
+
66
+ These guides are included in the installed package. Open only the page relevant to your task.
67
+
68
+ - [Package overview](docs/index.md)
69
+ - [Verified target](docs/verified-target.md)
70
+ - [Evidence and diagnostics](docs/evidence-and-diagnostics.md)
71
+ - [Limitations](docs/limitations.md)
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: Evidence and diagnostics
3
+ description: Evidence kinds, stable diagnostics, conservative ambiguity, and cascade suppression.
4
+ order: 20
5
+ ---
6
+
7
+ # Evidence and diagnostics
8
+
9
+ The target may emit `runtime-package`, `language`, `runtime-pattern`, `instruction-loader`, `tool-registration`, and `schema` evidence. Records identify only safe scalar metadata and logical source references.
10
+
11
+ ## Diagnostic catalog
12
+
13
+ | Code | Stable message |
14
+ | -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
15
+ | `GOOGLE_GENAI_PACKAGE_MANIFEST_INVALID` | The owning package manifest is invalid for Google Gen AI dependency detection. |
16
+ | `GOOGLE_GENAI_SDK_VERSION_UNSUPPORTED` | The observed Google Gen AI SDK dependency range is disjoint from the supported range. |
17
+ | `GOOGLE_GENAI_SOURCE_TEXT_INVALID` | The referenced Google Gen AI source file is not valid normalized text. |
18
+ | `GOOGLE_GENAI_SOURCE_SYNTAX_INVALID` | The referenced Google Gen AI source file contains invalid TypeScript syntax. |
19
+ | `GOOGLE_GENAI_RUNTIME_AGENT_SYMBOL_NOT_FOUND` | The declared runtime-agent symbol was not found. |
20
+ | `GOOGLE_GENAI_INSTRUCTION_LOADER_SYMBOL_NOT_FOUND` | The declared instruction-loader symbol was not found. |
21
+ | `GOOGLE_GENAI_TOOL_REGISTRATION_SYMBOL_NOT_FOUND` | The declared tool-registration symbol was not found. |
22
+ | `GOOGLE_GENAI_TOOL_INPUT_SCHEMA_SYMBOL_NOT_FOUND` | The declared tool input-schema symbol was not found. |
23
+ | `GOOGLE_GENAI_INSTRUCTION_LOADER_NOT_WIRED` | The declared instruction loader is not wired to the detected Google Gen AI generate-content configuration. |
24
+ | `GOOGLE_GENAI_TOOL_REGISTRATION_NOT_WIRED` | The declared tool registration is not wired to the detected Google Gen AI function-declaration collection. |
25
+ | `GOOGLE_GENAI_TOOL_NAME_MISMATCH` | The declared tool name does not match the detected Google Gen AI function name. |
26
+ | `GOOGLE_GENAI_TOOL_NAME_INVALID` | The detected Google Gen AI function name violates the supported SDK declaration limit. |
27
+ | `GOOGLE_GENAI_TOOL_INPUT_SCHEMA_NOT_WIRED` | The declared tool input schema is not wired to the detected function declaration's parameters JSON schema. |
28
+ | `GOOGLE_GENAI_FUNCTION_DECLARATION_LIMIT_EXCEEDED` | The detected Google Gen AI function-declaration collection exceeds the supported SDK declaration limit. |
29
+
30
+ Invalid text or syntax suppresses derived symbol and relationship diagnostics for that source. Missing symbols suppress their derived wiring diagnostics. Unsupported or dynamic requests, configurations, collections, containers, registrations, or schema values suppress negative relationship diagnostics when they could contain the declared relationship. Independently proved package, name, and collection-limit diagnostics remain observable.
package/docs/index.md ADDED
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: Google Gen AI runtime adapter
3
+ navigationTitle: Overview
4
+ description: Deterministic evidence and diagnostics for the verified direct Google Gen AI models.generateContent target.
5
+ order: 0
6
+ ---
7
+
8
+ # Google Gen AI runtime adapter
9
+
10
+ `@moldea.ai/adapter-google-genai` implements the official `google-genai` runtime adapter for Core. It statically inspects explicitly bound TypeScript source through Core's source-neutral repository reader.
11
+
12
+ ```typescript
13
+ import { googleGenAiAdapter } from '@moldea.ai/adapter-google-genai';
14
+ import { createCore } from '@moldea.ai/core';
15
+
16
+ const core = createCore({ adapters: [googleGenAiAdapter] });
17
+ ```
18
+
19
+ The package is available with one technical target covering TypeScript ESM using direct `models.generateContent` calls with npm `@google/genai >=2.17.1`, Repository Format version `1`, and Core `^4.0.0`.
20
+
21
+ The adapter never imports or calls the Google Gen AI SDK, executes no repository code, requires no credentials, and makes no network request. Its only public export is the immutable `googleGenAiAdapter` singleton.
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: Boundaries and limitations
3
+ description: Unsupported APIs, source forms, provider behavior, and the deterministic security boundary.
4
+ order: 30
5
+ ---
6
+
7
+ # Boundaries and limitations
8
+
9
+ The current target does not claim support for:
10
+
11
+ - JavaScript, Python, CommonJS, or non-ESM source
12
+ - legacy `@google/generative-ai`
13
+ - `generateContentStream`, chats, live sessions, or the Interactions API
14
+ - callable tools, MCP conversion, automatic function execution, or provider/server tool relationships
15
+ - configuration or clients returned by factories
16
+ - arbitrary compiler resolution, path aliases, package exports, directory indexes, or re-export graphs
17
+ - alternative `FunctionDeclaration.parameters` schemas
18
+ - response-schema, tool-output-schema, or agent input/output-schema evidence
19
+ - backend, project, location, API version, authentication mode, model, contents, response, retry, or transport validation
20
+
21
+ Package detection uses nearest manifests rather than lockfiles or installed modules. Static dependency ranges are observations, not proof of an installed build. Each invocation sees one declared agent and bounded logical repository operations, not a complete agent collection or project body index. The adapter never executes source, reads host files or environment variables, initializes tools, or contacts Google services.
@@ -0,0 +1,28 @@
1
+ ---
2
+ title: Verified target
3
+ description: Exact package, language, generate-content, instruction, function-declaration, schema, and provider-limit behavior.
4
+ order: 10
5
+ ---
6
+
7
+ # Verified target
8
+
9
+ The canonical Runtime Compatibility Matrix defines technical target `typescript-models-generate-content-2`.
10
+
11
+ ## Runtime boundary
12
+
13
+ - TypeScript ESM `.ts`, `.tsx`, and `.mts` files
14
+ - named runtime value imports of `GoogleGenAI` from `@google/genai`
15
+ - the nearest owning manifest declaring `@google/genai >=2.17.1`
16
+ - a module-local `const` client constructed directly with `new GoogleGenAI(...)`
17
+ - a directly exported runtime-agent function containing exact non-computed `client.models.generateContent({ ... })` calls
18
+ - one exact object-literal request argument
19
+
20
+ `config` is resolved only as a direct object literal. `systemInstruction` and `tools` are classified independently inside it. Positive evidence is existential across supported calls; a negative wiring diagnostic requires every candidate to prove the relationship absent with no dynamic or unsupported candidate that could contain it.
21
+
22
+ ## Function declarations
23
+
24
+ The tool path is `config.tools[].functionDeclarations[]`. Inline literals and immutable module-local `const` arrays and objects are supported. Arrays with holes or spreads, mutation, aliases, escapes, dynamic candidates, computed properties, and unknown container fields keep the affected relationship unresolved.
25
+
26
+ A supported declaration has a static `name`, optional static `description`, optional `parametersJsonSchema`, and optional uninterpreted `behavior`, `response`, and `responseJsonSchema`. The alternative `parameters` field is unsupported. Only a directly exported bound `const` object can establish manifest tool-registration and schema evidence; inline and unexported declarations still participate in closure and count checks.
27
+
28
+ Names must match `^[A-Za-z_][A-Za-z0-9_.:-]*$` and contain 1–128 Unicode scalar values. Every closed `functionDeclarations` collection permits at most 512 occurrences.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moldea.ai/adapter-google-genai",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Deterministic runtime evidence and diagnostics for direct Google Gen AI SDK integrations.",
5
5
  "homepage": "https://github.com/moldea-ai/packages/tree/main/projects/adapter-google-genai#readme",
6
6
  "bugs": {
@@ -18,6 +18,7 @@
18
18
  "files": [
19
19
  "cover.png",
20
20
  "dist",
21
+ "docs",
21
22
  "LICENSE",
22
23
  "README.md"
23
24
  ],