@moldea.ai/adapter-google-genai 1.0.8 → 2.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,12 +8,12 @@ The package implements the official `google-genai` runtime adapter for `@moldea.
8
8
 
9
9
  ## Supported target
10
10
 
11
- Version `1.0.8` supports:
11
+ Version `2.0.1` supports:
12
12
 
13
13
  - Repository Format version `1`
14
- - `@moldea.ai/core >=2.0.2`
14
+ - `@moldea.ai/core ^3.0.0`
15
15
  - TypeScript ESM source
16
- - npm `@google/genai >=2.17.1 <3.0.0`
16
+ - npm `@google/genai >=2.17.1`
17
17
  - a named runtime value import of `GoogleGenAI` and a module-local `const` client
18
18
  - a bound exported runtime-agent function containing direct `client.models.generateContent({ ... })` calls
19
19
  - direct instruction-loader wiring through `config.systemInstruction`
@@ -1,7 +1,7 @@
1
1
  export declare const GOOGLE_GENAI_ADAPTER_ID = "google-genai";
2
2
  export declare const GOOGLE_GENAI_GENERATE_CONTENT_RUNTIME_NAME = "models.generateContent";
3
3
  export declare const GOOGLE_GENAI_SDK_PACKAGE_NAME = "@google/genai";
4
- export declare const GOOGLE_GENAI_SDK_SUPPORTED_RANGE = ">=2.17.1 <3.0.0";
4
+ export declare const GOOGLE_GENAI_SDK_SUPPORTED_RANGE = ">=2.17.1";
5
5
  export declare const GOOGLE_GENAI_SUPPORTED_REPOSITORY_FORMAT_VERSIONS: readonly 1[];
6
6
  export declare const GOOGLE_GENAI_FUNCTION_DECLARATION_LIMIT = 512;
7
7
  export declare const GOOGLE_GENAI_FUNCTION_NAME_LIMIT = 128;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,iBAAiB,CAAC;AACtD,eAAO,MAAM,0CAA0C,2BAA2B,CAAC;AACnF,eAAO,MAAM,6BAA6B,kBAAkB,CAAC;AAC7D,eAAO,MAAM,gCAAgC,oBAAoB,CAAC;AAClE,eAAO,MAAM,iDAAiD,cAEd,CAAC;AAGjD,eAAO,MAAM,uCAAuC,MAAM,CAAC;AAC3D,eAAO,MAAM,gCAAgC,MAAM,CAAC;AACpD,eAAO,MAAM,kCAAkC,QAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,iBAAiB,CAAC;AACtD,eAAO,MAAM,0CAA0C,2BAA2B,CAAC;AACnF,eAAO,MAAM,6BAA6B,kBAAkB,CAAC;AAC7D,eAAO,MAAM,gCAAgC,aAAa,CAAC;AAC3D,eAAO,MAAM,iDAAiD,cAEd,CAAC;AAGjD,eAAO,MAAM,uCAAuC,MAAM,CAAC;AAC3D,eAAO,MAAM,gCAAgC,MAAM,CAAC;AACpD,eAAO,MAAM,kCAAkC,QAAgC,CAAC"}
package/dist/index.js CHANGED
@@ -2,11 +2,12 @@ import { posix } from "node:path";
2
2
  import { intersects, subset, validRange } from "semver";
3
3
  import ts from "typescript";
4
4
  import { parseRepositoryPath } from "@moldea.ai/repository";
5
+ import { readRuntimeAdapterFile } from "@moldea.ai/core/adapter";
5
6
  //#region src/constants/index.ts
6
7
  var GOOGLE_GENAI_ADAPTER_ID = "google-genai";
7
8
  var GOOGLE_GENAI_GENERATE_CONTENT_RUNTIME_NAME = "models.generateContent";
8
9
  var GOOGLE_GENAI_SDK_PACKAGE_NAME = "@google/genai";
9
- var GOOGLE_GENAI_SDK_SUPPORTED_RANGE = ">=2.17.1 <3.0.0";
10
+ var GOOGLE_GENAI_SDK_SUPPORTED_RANGE = ">=2.17.1";
10
11
  var GOOGLE_GENAI_SUPPORTED_REPOSITORY_FORMAT_VERSIONS = Object.freeze([1]);
11
12
  var GOOGLE_GENAI_FUNCTION_NAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_.:-]*$/;
12
13
  //#endregion
@@ -1843,7 +1844,7 @@ var discoverGoogleGenAiPackage = async (repository, sourcePath, signal) => {
1843
1844
  packageName: GOOGLE_GENAI_SDK_PACKAGE_NAME,
1844
1845
  reader: {
1845
1846
  getEntry: (path) => repository.getEntry(parseRepositoryPath(path), repositoryOptions),
1846
- readFile: (path) => repository.readFile(parseRepositoryPath(path), repositoryOptions)
1847
+ readFile: (path) => readRuntimeAdapterFile(repository, parseRepositoryPath(path), repositoryOptions)
1847
1848
  },
1848
1849
  ...signal === void 0 ? {} : { signal },
1849
1850
  sourcePath,
@@ -1873,7 +1874,7 @@ var createGoogleGenAiInspectionSession = (context) => createInspectionSession({
1873
1874
  analyzeSource: analyzeGoogleGenAiSource,
1874
1875
  discoverPackage: (path, signal) => discoverGoogleGenAiPackage(context.repository, path, signal),
1875
1876
  getEntry: (path, signal) => context.repository.getEntry(path, signal === void 0 ? void 0 : { signal }),
1876
- readFile: (path, signal) => context.repository.readFile(path, signal === void 0 ? void 0 : { signal }),
1877
+ readFile: (path, signal) => readRuntimeAdapterFile(context.repository, path, signal === void 0 ? void 0 : { signal }),
1877
1878
  ...context.signal === void 0 ? {} : { signal: context.signal }
1878
1879
  });
1879
1880
  //#endregion
@@ -1942,7 +1943,7 @@ var inspectGoogleGenAi = async (context) => {
1942
1943
  const session = createGoogleGenAiInspectionSession(context);
1943
1944
  const evidence = [];
1944
1945
  const diagnostics = [];
1945
- const agents = [...context.agents].sort((left, right) => compareGoogleGenAiStrings(left.id, right.id));
1946
+ const agents = [context.agent];
1946
1947
  for (const agent of agents) {
1947
1948
  context.signal?.throwIfAborted();
1948
1949
  await inspectAgent(session, agent, evidence, diagnostics);
@@ -1 +1 @@
1
- {"version":3,"file":"inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/inspection.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAqHjC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,sBAAsB,KAC9B,OAAO,CAAC,qBAAqB,CAmB/B,CAAC"}
1
+ {"version":3,"file":"inspection.d.ts","sourceRoot":"","sources":["../../src/inspection/inspection.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAoHjC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,sBAAsB,KAC9B,OAAO,CAAC,qBAAqB,CAiB/B,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { IIndexedAgent, IRuntimeAdapterEvidence } from '@moldea.ai/core';
1
+ import type { IIndexedAgent, IRuntimeAdapterEvidence } from '@moldea.ai/core/adapter';
2
2
  import type { IAdapterDiagnostic } from '@moldea.ai/core/adapter';
3
3
  import type { IGoogleGenAiGenerateContentAnalysis, IGoogleGenAiInspectionSession, IGoogleGenAiSourceAnalysis } from '../contracts/index.js';
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/inspection/relationships.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAIlE,OAAO,KAAK,EACV,mCAAmC,EACnC,6BAA6B,EAC7B,0BAA0B,EAC3B,MAAM,uBAAuB,CAAC;AA2a/B;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B,GAC1C,SAAS,6BAA6B,EACtC,OAAO,aAAa,EACpB,iBAAiB,0BAA0B,EAC3C,iBAAiB,mCAAmC,EACpD,UAAU,uBAAuB,EAAE,EACnC,aAAa,kBAAkB,EAAE,KAChC,OAAO,CAAC,IAAI,CAiBd,CAAC"}
1
+ {"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/inspection/relationships.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAIlE,OAAO,KAAK,EACV,mCAAmC,EACnC,6BAA6B,EAC7B,0BAA0B,EAC3B,MAAM,uBAAuB,CAAC;AA2a/B;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B,GAC1C,SAAS,6BAA6B,EACtC,OAAO,aAAa,EACpB,iBAAiB,0BAA0B,EAC3C,iBAAiB,mCAAmC,EACpD,UAAU,uBAAuB,EAAE,EACnC,aAAa,kBAAkB,EAAE,KAChC,OAAO,CAAC,IAAI,CAiBd,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { IRuntimeAdapterContext } from '@moldea.ai/core/adapter';
1
+ import { type IRuntimeAdapterContext } from '@moldea.ai/core/adapter';
2
2
  import type { IGoogleGenAiInspectionSession } from '../contracts/index.js';
3
3
  /**
4
4
  * Creates one operation-local Google Gen AI inspection session and its deterministic caches.
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/inspection/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAI3E;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,GAC7C,SAAS,sBAAsB,KAC9B,6BASC,CAAC"}
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/inspection/session.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAE9F,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAI3E;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,GAC7C,SAAS,sBAAsB,KAC9B,6BAaC,CAAC"}
@@ -1,4 +1,5 @@
1
- import type { IRepositoryPath, IRepositoryReader } from '@moldea.ai/repository';
1
+ import { type IRuntimeAdapterRepository } from '@moldea.ai/core/adapter';
2
+ import type { IRepositoryPath } from '@moldea.ai/repository';
2
3
  import type { IGoogleGenAiPackageDiscoveryResult } from '../contracts/index.js';
3
4
  /**
4
5
  * Creates nearest-to-root package-manifest candidates for one source path.
@@ -23,5 +24,5 @@ export declare const createPackageManifestCandidatePaths: (sourcePath: IReposito
23
24
  * - RESOURCE_LIMIT_EXCEEDED: A repository reading resource limit was exceeded.
24
25
  * - ABORTED: The repository operation was aborted.
25
26
  */
26
- export declare const discoverGoogleGenAiPackage: (repository: IRepositoryReader, sourcePath: IRepositoryPath, signal?: AbortSignal) => Promise<IGoogleGenAiPackageDiscoveryResult>;
27
+ export declare const discoverGoogleGenAiPackage: (repository: IRuntimeAdapterRepository, sourcePath: IRepositoryPath, signal?: AbortSignal) => Promise<IGoogleGenAiPackageDiscoveryResult>;
27
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/package-discovery/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAOhF,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,uBAAuB,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,GAC9C,YAAY,eAAe,KAC1B,SAAS,eAAe,EACgD,CAAC;AAE5E;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,0BAA0B,GACrC,YAAY,iBAAiB,EAC7B,YAAY,eAAe,EAC3B,SAAS,WAAW,KACnB,OAAO,CAAC,kCAAkC,CA4B5C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/package-discovery/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0B,KAAK,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAO7D,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,uBAAuB,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,GAC9C,YAAY,eAAe,KAC1B,SAAS,eAAe,EACgD,CAAC;AAE5E;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,0BAA0B,GACrC,YAAY,yBAAyB,EACrC,YAAY,eAAe,EAC3B,SAAS,WAAW,KACnB,OAAO,CAAC,kCAAkC,CA6B5C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moldea.ai/adapter-google-genai",
3
- "version": "1.0.8",
3
+ "version": "2.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": {
@@ -33,8 +33,8 @@
33
33
  "node": ">=22.11.0"
34
34
  },
35
35
  "dependencies": {
36
- "@moldea.ai/core": ">=2.0.2",
37
- "@moldea.ai/repository": ">=1.1.1",
36
+ "@moldea.ai/core": "^3.0.0",
37
+ "@moldea.ai/repository": "^2.0.0",
38
38
  "semver": "7.8.5",
39
39
  "typescript": "6.0.3"
40
40
  },