@qmediat.io/gemini-code-context-mcp 1.25.0 → 1.25.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/CHANGELOG.md +21 -1
- package/README.md +1 -1
- package/dist/cache/cache-manager.d.ts +23 -34
- package/dist/cache/cache-manager.d.ts.map +1 -1
- package/dist/cache/cache-manager.js +324 -272
- package/dist/cache/cache-manager.js.map +1 -1
- package/dist/cache/caching-mode.d.ts +5 -3
- package/dist/cache/caching-mode.d.ts.map +1 -1
- package/dist/cache/caching-mode.js +6 -4
- package/dist/cache/caching-mode.js.map +1 -1
- package/dist/cache/ttl-watcher.d.ts.map +1 -1
- package/dist/cache/ttl-watcher.js +7 -1
- package/dist/cache/ttl-watcher.js.map +1 -1
- package/dist/cache/ttl.d.ts +8 -0
- package/dist/cache/ttl.d.ts.map +1 -0
- package/dist/cache/ttl.js +10 -0
- package/dist/cache/ttl.js.map +1 -0
- package/dist/manifest/db.d.ts.map +1 -1
- package/dist/manifest/db.js +2 -1
- package/dist/manifest/db.js.map +1 -1
- package/dist/tools/agentic/run.d.ts.map +1 -1
- package/dist/tools/agentic/run.js +3 -6
- package/dist/tools/agentic/run.js.map +1 -1
- package/dist/tools/ask/answer.d.ts +9 -0
- package/dist/tools/ask/answer.d.ts.map +1 -0
- package/dist/tools/ask/answer.js +28 -0
- package/dist/tools/ask/answer.js.map +1 -0
- package/dist/tools/ask/attachments.d.ts +25 -0
- package/dist/tools/ask/attachments.d.ts.map +1 -0
- package/dist/tools/ask/attachments.js +85 -0
- package/dist/tools/ask/attachments.js.map +1 -0
- package/dist/tools/ask/call.d.ts +61 -0
- package/dist/tools/ask/call.d.ts.map +1 -0
- package/dist/tools/ask/call.js +6 -0
- package/dist/tools/ask/call.js.map +1 -0
- package/dist/tools/ask/guard.d.ts +24 -0
- package/dist/tools/ask/guard.d.ts.map +1 -0
- package/dist/tools/ask/guard.js +79 -0
- package/dist/tools/ask/guard.js.map +1 -0
- package/dist/tools/ask/input.d.ts +45 -0
- package/dist/tools/ask/input.d.ts.map +1 -0
- package/dist/tools/ask/input.js +93 -0
- package/dist/tools/ask/input.js.map +1 -0
- package/dist/tools/ask/instruction.d.ts +8 -0
- package/dist/tools/ask/instruction.d.ts.map +1 -0
- package/dist/tools/ask/instruction.js +13 -0
- package/dist/tools/ask/instruction.js.map +1 -0
- package/dist/tools/ask/request.d.ts +14 -0
- package/dist/tools/ask/request.d.ts.map +1 -0
- package/dist/tools/ask/request.js +38 -0
- package/dist/tools/ask/request.js.map +1 -0
- package/dist/tools/ask/results.d.ts +23 -0
- package/dist/tools/ask/results.d.ts.map +1 -0
- package/dist/tools/ask/results.js +107 -0
- package/dist/tools/ask/results.js.map +1 -0
- package/dist/tools/ask/setup.d.ts +22 -0
- package/dist/tools/ask/setup.d.ts.map +1 -0
- package/dist/tools/ask/setup.js +57 -0
- package/dist/tools/ask/setup.js.map +1 -0
- package/dist/tools/ask/sizing.d.ts +10 -0
- package/dist/tools/ask/sizing.d.ts.map +1 -0
- package/dist/tools/ask/sizing.js +33 -0
- package/dist/tools/ask/sizing.js.map +1 -0
- package/dist/tools/ask/thinking.d.ts +54 -0
- package/dist/tools/ask/thinking.d.ts.map +1 -0
- package/dist/tools/ask/thinking.js +69 -0
- package/dist/tools/ask/thinking.js.map +1 -0
- package/dist/tools/ask-agentic-fallback.d.ts +1 -1
- package/dist/tools/ask-agentic-fallback.d.ts.map +1 -1
- package/dist/tools/ask-agentic.tool.d.ts.map +1 -1
- package/dist/tools/ask-agentic.tool.js +4 -10
- package/dist/tools/ask-agentic.tool.js.map +1 -1
- package/dist/tools/ask.tool.d.ts +3 -41
- package/dist/tools/ask.tool.d.ts.map +1 -1
- package/dist/tools/ask.tool.js +46 -795
- package/dist/tools/ask.tool.js.map +1 -1
- package/dist/tools/code.tool.d.ts.map +1 -1
- package/dist/tools/code.tool.js +375 -502
- package/dist/tools/code.tool.js.map +1 -1
- package/dist/tools/reindex.tool.d.ts.map +1 -1
- package/dist/tools/reindex.tool.js +19 -22
- package/dist/tools/reindex.tool.js.map +1 -1
- package/dist/tools/shared/eager-answer.d.ts +78 -0
- package/dist/tools/shared/eager-answer.d.ts.map +1 -0
- package/dist/tools/shared/eager-answer.js +130 -0
- package/dist/tools/shared/eager-answer.js.map +1 -0
- package/dist/tools/shared/eager-call.d.ts +114 -0
- package/dist/tools/shared/eager-call.d.ts.map +1 -0
- package/dist/tools/shared/eager-call.js +95 -0
- package/dist/tools/shared/eager-call.js.map +1 -0
- package/dist/tools/shared/eager-steps.d.ts +114 -0
- package/dist/tools/shared/eager-steps.d.ts.map +1 -0
- package/dist/tools/shared/eager-steps.js +152 -0
- package/dist/tools/shared/eager-steps.js.map +1 -0
- package/dist/tools/shared/service-tier.d.ts +9 -0
- package/dist/tools/shared/service-tier.d.ts.map +1 -1
- package/dist/tools/shared/service-tier.js +15 -0
- package/dist/tools/shared/service-tier.js.map +1 -1
- package/dist/tools/shared/thinking.d.ts +9 -0
- package/dist/tools/shared/thinking.d.ts.map +1 -1
- package/dist/tools/shared/thinking.js +10 -0
- package/dist/tools/shared/thinking.js.map +1 -1
- package/dist/tools/shared/workspace-refusal.d.ts +13 -0
- package/dist/tools/shared/workspace-refusal.d.ts.map +1 -0
- package/dist/tools/shared/workspace-refusal.js +23 -0
- package/dist/tools/shared/workspace-refusal.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.25.1] - 2026-11-18
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- `ask` and `code` with `cachingMode: 'explicit'`: when Gemini created a Context Cache without a name, the question went
|
|
15
|
+
with neither the cache nor the workspace files; the files now go inline, as after any failed cache build, and the
|
|
16
|
+
warning says a cache without a usable name may stay billed on Google's side until its TTL. A cache id an earlier
|
|
17
|
+
release stored empty reads as none: the next rebuild no longer sends a delete for an empty name.
|
|
18
|
+
- `ask` and `code` with `cachingMode: 'explicit'`: with `GEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS` below 60, the Context
|
|
19
|
+
Cache was created for 60 s but recorded as expiring at the shorter TTL, so the next call rebuilt a cache that was
|
|
20
|
+
still alive; the recorded expiry is now the TTL the cache was created with, and the TTL watcher refreshes the cache
|
|
21
|
+
with that TTL too.
|
|
22
|
+
- `ask` and `code` with `cachingMode: 'explicit'`: when the Context Cache was created but recording it in the manifest
|
|
23
|
+
failed, the cache stayed on Google's side, billed until its TTL, and the warning said the cache build had failed; the
|
|
24
|
+
new cache is now deleted, the warning names the manifest write, the response's `cachingModeNote` says the cache
|
|
25
|
+
could not be built or recorded, and the files go inline as before.
|
|
26
|
+
- `ask` and `code` with `cachingMode: 'explicit'`: when rebuilding the Context Cache failed, the previous cache stayed on
|
|
27
|
+
Google's side, unreachable and billed until its TTL; it is now deleted, as after a successful rebuild.
|
|
28
|
+
|
|
10
29
|
## [1.25.0] - 2026-11-17
|
|
11
30
|
|
|
12
31
|
### Changed
|
|
@@ -1956,7 +1975,8 @@ Integration-test-surfaced and review-surfaced fixes landed before the v1.0.0 rel
|
|
|
1956
1975
|
- MIME type simplified to `text/plain` for all files.
|
|
1957
1976
|
- Unit test coverage gaps for cache-manager / files-uploader / ttl-watcher / profile-loader / parseEdits tracked in [`docs/FOLLOW-UP-PRS.md`](docs/FOLLOW-UP-PRS.md).
|
|
1958
1977
|
|
|
1959
|
-
[Unreleased]: https://github.com/qmediat/gemini-code-context-mcp/compare/v1.25.
|
|
1978
|
+
[Unreleased]: https://github.com/qmediat/gemini-code-context-mcp/compare/v1.25.1...HEAD
|
|
1979
|
+
[1.25.1]: https://github.com/qmediat/gemini-code-context-mcp/compare/v1.25.0...v1.25.1
|
|
1960
1980
|
[1.25.0]: https://github.com/qmediat/gemini-code-context-mcp/compare/v1.24.0...v1.25.0
|
|
1961
1981
|
[1.24.0]: https://github.com/qmediat/gemini-code-context-mcp/compare/v1.23.1...v1.24.0
|
|
1962
1982
|
[1.23.1]: https://github.com/qmediat/gemini-code-context-mcp/compare/v1.23.0...v1.23.1
|
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Build / reuse / invalidate Gemini Context Caches keyed by workspace state.
|
|
3
3
|
*
|
|
4
4
|
* Cache key = `(workspaceRoot, filesHash, model, systemPromptHash)`. When any
|
|
5
|
-
* component changes, we rebuild.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* component changes, we rebuild. Concurrent calls with the same whole call
|
|
6
|
+
* fingerprint (`inFlightKey`: the cache key plus the caching options) coalesce
|
|
7
|
+
* onto one in-process build, so only one cache is created for them.
|
|
8
8
|
*
|
|
9
9
|
* Inline fallback path: for small workspaces or `noCache:true`, we skip the
|
|
10
10
|
* Files API upload entirely and embed file text inline. This avoids unnecessary
|
|
@@ -62,41 +62,30 @@ export interface BuildOptions {
|
|
|
62
62
|
emitter: ProgressEmitter;
|
|
63
63
|
allowCaching: boolean;
|
|
64
64
|
/**
|
|
65
|
-
* Optional abort signal
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* in-flight tasks settle).
|
|
73
|
-
*
|
|
74
|
-
* Pre-v1.12.1 the upload phase ignored aborts entirely — the signal
|
|
75
|
-
* was only threaded into `generateContent`, so a 30s `timeoutMs`
|
|
76
|
-
* against a workspace whose upload took 90s would burn 60s of
|
|
77
|
-
* bandwidth before the abort took effect at `generateContent`-call
|
|
78
|
-
* time. The fix bounds the worst case to "in-flight pool size × max
|
|
79
|
-
* upload duration" instead of "total file count × max upload duration".
|
|
65
|
+
* Optional abort signal. When fired, the upload pool stops QUEUEING new
|
|
66
|
+
* per-file work and the post-pool abort check throws `signal.reason` so the
|
|
67
|
+
* caller's `timeoutMs` budget surfaces as a proper TIMEOUT errorCode.
|
|
68
|
+
* Already-flying `client.files.upload` calls complete on their own — the SDK
|
|
69
|
+
* doesn't expose abort plumbing on `files.upload` — so the time an abort
|
|
70
|
+
* waits is bounded by "in-flight pool size × max upload duration", never by
|
|
71
|
+
* "total file count × max upload duration".
|
|
80
72
|
*/
|
|
81
73
|
signal?: AbortSignal;
|
|
82
74
|
/**
|
|
83
|
-
* Caching mode
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* caching for Gemini 2.5+/3 models.
|
|
75
|
+
* Caching mode. Controls whether `prepareContext` builds an explicit Gemini
|
|
76
|
+
* Context Cache (`caches.create`) or falls through to the inline path and
|
|
77
|
+
* relies on Gemini's automatic implicit caching for Gemini 2.5+/3 models.
|
|
87
78
|
*
|
|
88
|
-
* - `'explicit'
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* - `'implicit'
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* v1.12.x default; flip planned for v1.14.0 pending dogfood
|
|
99
|
-
* telemetry).
|
|
79
|
+
* - `'explicit'`: build + reuse a Context Cache for the workspace. Hard
|
|
80
|
+
* ~75 % discount on cached input. Pays 60–180 s `caches.create` cost on
|
|
81
|
+
* file change.
|
|
82
|
+
* - `'implicit'`: skip `caches.create` entirely; send file content inline
|
|
83
|
+
* every call. Gemini's automatic implicit caching applies a discount when
|
|
84
|
+
* the prefix matches across calls (4 096-token minimum, no guarantee). No
|
|
85
|
+
* rebuild wait on file change. **Best fit for review→edit→review
|
|
86
|
+
* workflows** where files change between queries.
|
|
87
|
+
* - `undefined`: behaves as `'explicit'`; the tools pass the mode they
|
|
88
|
+
* resolved from the call and the configuration.
|
|
100
89
|
*/
|
|
101
90
|
cachingMode?: 'explicit' | 'implicit';
|
|
102
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache-manager.d.ts","sourceRoot":"","sources":["../../src/cache/cache-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAQ,MAAM,eAAe,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,aAAa,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,KAAK,YAAY,EAAwB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"cache-manager.d.ts","sourceRoot":"","sources":["../../src/cache/cache-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAQ,MAAM,eAAe,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,aAAa,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,KAAK,YAAY,EAAwB,MAAM,qBAAqB,CAAC;AAG9E,MAAM,WAAW,eAAe;IAC9B,gFAAgF;IAChF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;;;OAKG;IACH,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,UAAU,EAAE,OAAO,CAAC;CACrB;AAED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