Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

feat(exports): expose runThink synthesis via gbrain/think subpath (#3427)

mnemonik-devb6c75d802fe9
diff --git a/package.json b/package.json
index 62002a4df3..da62212c37 100644
--- a/package.json
+++ b/package.json
@@ -23,6 +23,7 @@
"./backoff": "./src/core/backoff.ts",
"./search/hybrid": "./src/core/search/hybrid.ts",
"./search/expansion": "./src/core/search/expansion.ts",
+ "./think": "./src/core/think/index.ts",
"./ai/gateway": "./src/core/ai/gateway.ts",
"./extract": "./src/commands/extract.ts",
"./ingestion": "./src/core/ingestion/index.ts",
diff --git a/scripts/check-exports-count.sh b/scripts/check-exports-count.sh
index a02d1a0155..45cc056ac8 100755
--- a/scripts/check-exports-count.sh
+++ b/scripts/check-exports-count.sh
@@ -19,7 +19,7 @@
set -euo pipefail
-EXPECTED_COUNT=20
+EXPECTED_COUNT=21
# Count top-level keys in the exports object. `node -e` parses JSON
# reliably without needing jq (which isn't in every CI environment).
diff --git a/test/public-exports.test.ts b/test/public-exports.test.ts
index c911de1f7e..a7e701980d 100644
--- a/test/public-exports.test.ts
+++ b/test/public-exports.test.ts
@@ -49,6 +49,7 @@ const EXPECTED_EXPORTS: ExpectedExport[] = [
{ subpath: 'gbrain/backoff', canary: [] },
{ subpath: 'gbrain/search/hybrid', canary: ['hybridSearch', 'rrfFusion'] },
{ subpath: 'gbrain/search/expansion', canary: ['expandQuery'] },
+ { subpath: 'gbrain/think', canary: ['runThink', 'stripGapsSection'] },
{ subpath: 'gbrain/ai/gateway', canary: ['configureGateway', 'embed'] },
{ subpath: 'gbrain/extract', canary: [] },
{ subpath: 'gbrain/ingestion', canary: ['INGESTION_SOURCE_API_VERSION', 'validateIngestionEvent', 'computeContentHash'] },
@@ -68,7 +69,7 @@ describe('public exports — package.json exports map', () => {
// Adding new exports: increment this + add to EXPECTED_EXPORTS below.
// Removing exports: see CLAUDE.md "Removing any of these is a
// breaking change going forward" — bump minor and update this count.
- expect(count).toBe(20);
+ expect(count).toBe(21);
});
test('EXPECTED_EXPORTS list matches the exports map exactly (no drift)', () => {