@soulcraft/brainy 3.28.0 → 3.29.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [3.29.0](https://github.com/soulcraftlabs/brainy/compare/v3.28.0...v3.29.0) (2025-10-09)
6
+
7
+
8
+ ### 🐛 Bug Fixes
9
+
10
+ * enable GCS native storage with Application Default Credentials ([1e77ecd](https://github.com/soulcraftlabs/brainy/commit/1e77ecd145d3dea46e04ca5ecc6692b41e569c1e))
11
+
5
12
  ### [3.28.0](https://github.com/soulcraftlabs/brainy/compare/v3.27.1...v3.28.0) (2025-10-08)
6
13
 
7
14
  - feat: add unified import system with auto-detection and dual storage (a06e877)
package/dist/brainy.js CHANGED
@@ -2274,8 +2274,24 @@ export class Brainy {
2274
2274
  */
2275
2275
  normalizeConfig(config) {
2276
2276
  // Validate storage configuration
2277
- if (config?.storage?.type && !['auto', 'memory', 'filesystem', 'opfs', 'remote', 's3', 'r2', 'gcs'].includes(config.storage.type)) {
2278
- throw new Error(`Invalid storage type: ${config.storage.type}. Must be one of: auto, memory, filesystem, opfs, remote, s3, r2, gcs`);
2277
+ if (config?.storage?.type && !['auto', 'memory', 'filesystem', 'opfs', 'remote', 's3', 'r2', 'gcs', 'gcs-native'].includes(config.storage.type)) {
2278
+ throw new Error(`Invalid storage type: ${config.storage.type}. Must be one of: auto, memory, filesystem, opfs, remote, s3, r2, gcs, gcs-native`);
2279
+ }
2280
+ // Validate storage type/config pairing (catch common mismatches)
2281
+ if (config?.storage) {
2282
+ const storage = config.storage;
2283
+ // Check for gcs/gcsNativeStorage mismatch
2284
+ if (storage.type === 'gcs' && storage.gcsNativeStorage) {
2285
+ throw new Error(`Storage type/config mismatch: type 'gcs' requires 'gcsStorage' config object (S3-compatible). ` +
2286
+ `You provided 'gcsNativeStorage' which requires type 'gcs-native'. ` +
2287
+ `Either change type to 'gcs-native' or use 'gcsStorage' instead of 'gcsNativeStorage'.`);
2288
+ }
2289
+ // Check for gcs-native/gcsStorage mismatch
2290
+ if (storage.type === 'gcs-native' && storage.gcsStorage) {
2291
+ throw new Error(`Storage type/config mismatch: type 'gcs-native' requires 'gcsNativeStorage' config object. ` +
2292
+ `You provided 'gcsStorage' which requires type 'gcs' (S3-compatible). ` +
2293
+ `Either change type to 'gcs' or use 'gcsNativeStorage' instead of 'gcsStorage'.`);
2294
+ }
2279
2295
  }
2280
2296
  // Validate model configuration
2281
2297
  if (config?.model?.type && !['fast', 'accurate', 'custom'].includes(config.model.type)) {
@@ -11,6 +11,7 @@ export declare enum StorageType {
11
11
  OPFS = "opfs",
12
12
  S3 = "s3",
13
13
  GCS = "gcs",
14
+ GCS_NATIVE = "gcs-native",
14
15
  R2 = "r2"
15
16
  }
16
17
  /**
@@ -22,7 +23,7 @@ export declare enum StoragePreset {
22
23
  DISK = "disk",
23
24
  CLOUD = "cloud"
24
25
  }
25
- export type StorageTypeString = 'memory' | 'filesystem' | 'opfs' | 's3' | 'gcs' | 'r2';
26
+ export type StorageTypeString = 'memory' | 'filesystem' | 'opfs' | 's3' | 'gcs' | 'r2' | 'gcs-native';
26
27
  export type StoragePresetString = 'auto' | 'memory' | 'disk' | 'cloud';
27
28
  export interface StorageConfigResult {
28
29
  type: StorageType | StorageTypeString;
@@ -13,6 +13,7 @@ export var StorageType;
13
13
  StorageType["OPFS"] = "opfs";
14
14
  StorageType["S3"] = "s3";
15
15
  StorageType["GCS"] = "gcs";
16
+ StorageType["GCS_NATIVE"] = "gcs-native";
16
17
  StorageType["R2"] = "r2";
17
18
  })(StorageType || (StorageType = {}));
18
19
  /**
@@ -170,14 +171,14 @@ async function detectCloudStorage() {
170
171
  }
171
172
  };
172
173
  }
173
- // Google Cloud Storage Detection
174
+ // Google Cloud Storage Detection (Native SDK with ADC)
174
175
  if (hasGCPConfig()) {
175
176
  return {
176
- type: StorageType.GCS,
177
+ type: StorageType.GCS_NATIVE,
177
178
  config: {
178
- gcsStorage: {
179
+ gcsNativeStorage: {
179
180
  bucketName: process.env.GCS_BUCKET || process.env.GOOGLE_STORAGE_BUCKET || 'brainy-data',
180
- // Credentials will be picked up by GCP SDK automatically
181
+ // Application Default Credentials will be picked up automatically
181
182
  }
182
183
  }
183
184
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soulcraft/brainy",
3
- "version": "3.28.0",
3
+ "version": "3.29.0",
4
4
  "description": "Universal Knowledge Protocol™ - World's first Triple Intelligence database unifying vector, graph, and document search in one API. 31 nouns × 40 verbs for infinite expressiveness.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",