@qmediat.io/gemini-code-context-mcp 1.24.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 +110 -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/dispatch.d.ts +68 -0
- package/dist/tools/agentic/dispatch.d.ts.map +1 -0
- package/dist/tools/agentic/dispatch.js +167 -0
- package/dist/tools/agentic/dispatch.js.map +1 -0
- package/dist/tools/agentic/input.d.ts +28 -0
- package/dist/tools/agentic/input.d.ts.map +1 -0
- package/dist/tools/agentic/input.js +66 -0
- package/dist/tools/agentic/input.js.map +1 -0
- package/dist/tools/agentic/instructions.d.ts +46 -0
- package/dist/tools/agentic/instructions.d.ts.map +1 -0
- package/dist/tools/agentic/instructions.js +170 -0
- package/dist/tools/agentic/instructions.js.map +1 -0
- package/dist/tools/agentic/iteration.d.ts +81 -0
- package/dist/tools/agentic/iteration.d.ts.map +1 -0
- package/dist/tools/agentic/iteration.js +317 -0
- package/dist/tools/agentic/iteration.js.map +1 -0
- package/dist/tools/agentic/ledger.d.ts +64 -0
- package/dist/tools/agentic/ledger.d.ts.map +1 -0
- package/dist/tools/agentic/ledger.js +110 -0
- package/dist/tools/agentic/ledger.js.map +1 -0
- package/dist/tools/agentic/loop.d.ts +10 -0
- package/dist/tools/agentic/loop.d.ts.map +1 -0
- package/dist/tools/agentic/loop.js +179 -0
- package/dist/tools/agentic/loop.js.map +1 -0
- package/dist/tools/agentic/no-progress.d.ts +90 -0
- package/dist/tools/agentic/no-progress.d.ts.map +1 -0
- package/dist/tools/agentic/no-progress.js +107 -0
- package/dist/tools/agentic/no-progress.js.map +1 -0
- package/dist/tools/agentic/pass-clock.d.ts +85 -0
- package/dist/tools/agentic/pass-clock.d.ts.map +1 -0
- package/dist/tools/agentic/pass-clock.js +162 -0
- package/dist/tools/agentic/pass-clock.js.map +1 -0
- package/dist/tools/agentic/phase-defaults.d.ts +29 -0
- package/dist/tools/agentic/phase-defaults.d.ts.map +1 -0
- package/dist/tools/agentic/phase-defaults.js +23 -0
- package/dist/tools/agentic/phase-defaults.js.map +1 -0
- package/dist/tools/agentic/rescue.d.ts +69 -0
- package/dist/tools/agentic/rescue.d.ts.map +1 -0
- package/dist/tools/agentic/rescue.js +203 -0
- package/dist/tools/agentic/rescue.js.map +1 -0
- package/dist/tools/agentic/response.d.ts +16 -0
- package/dist/tools/agentic/response.d.ts.map +1 -0
- package/dist/tools/agentic/response.js +25 -0
- package/dist/tools/agentic/response.js.map +1 -0
- package/dist/tools/agentic/results.d.ts +76 -0
- package/dist/tools/agentic/results.d.ts.map +1 -0
- package/dist/tools/agentic/results.js +228 -0
- package/dist/tools/agentic/results.js.map +1 -0
- package/dist/tools/agentic/run.d.ts +130 -0
- package/dist/tools/agentic/run.d.ts.map +1 -0
- package/dist/tools/agentic/run.js +128 -0
- package/dist/tools/agentic/run.js.map +1 -0
- package/dist/tools/agentic/sandbox.d.ts +13 -2
- package/dist/tools/agentic/sandbox.d.ts.map +1 -1
- package/dist/tools/agentic/sandbox.js +127 -111
- package/dist/tools/agentic/sandbox.js.map +1 -1
- package/dist/tools/agentic/workspace-tools.d.ts +30 -27
- package/dist/tools/agentic/workspace-tools.d.ts.map +1 -1
- package/dist/tools/agentic/workspace-tools.js +324 -385
- package/dist/tools/agentic/workspace-tools.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 +33 -0
- package/dist/tools/ask-agentic-fallback.d.ts.map +1 -0
- package/dist/tools/ask-agentic-fallback.js +113 -0
- package/dist/tools/ask-agentic-fallback.js.map +1 -0
- package/dist/tools/ask-agentic.tool.d.ts +11 -44
- package/dist/tools/ask-agentic.tool.d.ts.map +1 -1
- package/dist/tools/ask-agentic.tool.js +139 -1618
- 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 -944
- 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 +376 -514
- 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/abort-timeout.d.ts +43 -5
- package/dist/tools/shared/abort-timeout.d.ts.map +1 -1
- package/dist/tools/shared/abort-timeout.js +111 -102
- package/dist/tools/shared/abort-timeout.js.map +1 -1
- package/dist/tools/shared/call-ledger.d.ts +27 -12
- package/dist/tools/shared/call-ledger.d.ts.map +1 -1
- package/dist/tools/shared/call-ledger.js +57 -39
- package/dist/tools/shared/call-ledger.js.map +1 -1
- package/dist/tools/shared/continuation.d.ts +1 -1
- package/dist/tools/shared/continuation.d.ts.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/question-fields.d.ts +10 -0
- package/dist/tools/shared/question-fields.d.ts.map +1 -0
- package/dist/tools/shared/question-fields.js +13 -0
- package/dist/tools/shared/question-fields.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/settle-call.d.ts +11 -6
- package/dist/tools/shared/settle-call.d.ts.map +1 -1
- package/dist/tools/shared/settle-call.js +14 -10
- package/dist/tools/shared/settle-call.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/throttle.d.ts +7 -0
- package/dist/tools/shared/throttle.d.ts.map +1 -1
- package/dist/tools/shared/throttle.js +18 -0
- package/dist/tools/shared/throttle.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,113 @@ 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
|
+
|
|
29
|
+
## [1.25.0] - 2026-11-17
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- `ask_agentic`: every phase of a pass now has a bound. A phase that could hang forever now ends with `TIMEOUT` after
|
|
34
|
+
its default: 600 s for each request's opening (until its first chunk; a request sent again after a network failure
|
|
35
|
+
gets the whole 600 s, and so does the backoff before it), 600 s for a stream that sends nothing (a `stall`), 120 s
|
|
36
|
+
without progress in an iteration's path resolution and tool batch — the executors report progress at every directory,
|
|
37
|
+
file and read, so a long healthy `grep` batch over a large workspace runs on — and 600 s for each request of the
|
|
38
|
+
forced-finalization pass (`rescueErrorCode: 'TIMEOUT'`). A default applies only where no knob bounds the phase:
|
|
39
|
+
`iterationTimeoutMs` (or `GEMINI_CODE_CONTEXT_AGENTIC_ITERATION_TIMEOUT_MS`) bounds every phase of an iteration,
|
|
40
|
+
`stallMs` (or `GEMINI_CODE_CONTEXT_AGENTIC_STALL_MS`) the gaps of a stream only. The TPM wait keeps the throttle's own
|
|
41
|
+
delay. Before, with neither knob set — and with only `stallMs` for everything but a stream's gaps — such a phase never
|
|
42
|
+
ended and held the pass's daily-budget and TPM reservations.
|
|
43
|
+
- `ask_agentic`: `iterationTimeoutMs` ends a tool batch at the bound, not when the batch returns; no queued tool call
|
|
44
|
+
starts once a bound fired, the executors get the abort signal, and a late result is dropped. A `TIMEOUT` is
|
|
45
|
+
`retryable: false` when tool calls still run 1 s after the bound (`toolCallsRunning` says how many).
|
|
46
|
+
- `ask`'s fallback to `ask_agentic` (`onWorkspaceTooLarge: 'fallback-to-agentic'`) forwards `stallMs` as the loop's
|
|
47
|
+
`stallMs`, no longer as a per-iteration wall clock: a healthy stream or a tool batch longer than `stallMs` answers.
|
|
48
|
+
With only `stallMs` set a pass has no wall clock — a stream that keeps sending ends at the model's output cap, a tool
|
|
49
|
+
batch that keeps reporting progress when its walk ends; a caller who wants a wall clock per iteration sets
|
|
50
|
+
`iterationTimeoutMs` (`timeoutMs` on `ask`).
|
|
51
|
+
`timeoutMs` still becomes `iterationTimeoutMs`. `iterTimeoutSource` is now always `'timeoutMs'` (the values
|
|
52
|
+
`'stallMs'` and `'min(timeoutMs,stallMs)'` are gone), and the result reports the forwarded `stallMs`.
|
|
53
|
+
- `ask_agentic`'s timeout messages no longer say "default disabled"; a bound that fired at its default names the
|
|
54
|
+
default and the knob that sets it.
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
|
|
58
|
+
- `ask_agentic`: a `TIMEOUT` result carries `timeoutPhase` (`tpm-wait`, `opening`, `stream`, `tools`) and
|
|
59
|
+
`timeoutSource` (`iterationTimeoutMs`, `stallMs`, `default`, or `external` — a timeout the SDK raised itself: the
|
|
60
|
+
message quotes it and names no bound of the call); `timeoutKind` keeps its two values (`stall` is a stream's gap
|
|
61
|
+
only). The forced-finalization pass's `AGENTIC_MAX_ITERATIONS` with `rescueErrorCode: 'TIMEOUT'` carries
|
|
62
|
+
`timeoutPhase` (`tpm-wait`, `finalization`) and `timeoutSource` too, and its message names the knob that raises the
|
|
63
|
+
bound. `ask`'s fallback lifts both to the top of its result, beside `timeoutKind`.
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
- `ask_agentic`: a tool batch longer than `stallMs` no longer ends the call as a false `stall`; the stall watchdog
|
|
68
|
+
watches the stream only.
|
|
69
|
+
- `ask_agentic`: a tool batch, or a path resolution at the `maxFilesRead` cap, that never returns no longer hangs the
|
|
70
|
+
call: it ends at `iterationTimeoutMs`, else after 120 s without progress, with the pass booked.
|
|
71
|
+
- `ask`'s fallback to `ask_agentic` uses `ask`'s knobs as `ask` resolved them — per call, else
|
|
72
|
+
`GEMINI_CODE_CONTEXT_ASK_TIMEOUT_MS` / `GEMINI_CODE_CONTEXT_ASK_STALL_MS` (the env vars were ignored) — stops `ask`'s
|
|
73
|
+
own timer at the hand-off, and its timeout messages name `timeoutMs` / `stallMs`, not `iterationTimeoutMs`. Where
|
|
74
|
+
`ask` set no knob of a kind, `GEMINI_CODE_CONTEXT_AGENTIC_ITERATION_TIMEOUT_MS` / `_STALL_MS` still bound the loop,
|
|
75
|
+
and the message names that variable, not an `ask` one that set nothing.
|
|
76
|
+
- `ask_agentic`: a 429 on a loop iteration seeds the throttle's retry hint once, not twice. `ask`, `code` and
|
|
77
|
+
`ask_agentic` seed the hint through one function, once per error.
|
|
78
|
+
- `ask_agentic`: a loop iteration whose response carries no `usageMetadata` is booked and released at its estimate
|
|
79
|
+
(50,000 input tokens), as the forced-finalization pass already was: it used to book 0 USD against the daily budget
|
|
80
|
+
and release its TPM reservation at 0 tokens, so later calls were throttled as if it had sent nothing.
|
|
81
|
+
- `ask_agentic` without a daily budget (`GEMINI_DAILY_BUDGET_USD` unset) writes a usage row for each pass that
|
|
82
|
+
reached the model, as `ask` and `code` do: `status` (`spentTodayUsd`) counted none of its spend.
|
|
83
|
+
- `ask_agentic`: a loop iteration whose model call completed and which then failed — a timeout in its tool batch, a
|
|
84
|
+
response that could not be read — is booked at what it billed; it used to book nothing against the daily budget.
|
|
85
|
+
The error result of a pass booked before it failed (the loop iteration's `TIMEOUT` or `UNKNOWN`, the forced pass's
|
|
86
|
+
`AGENTIC_MAX_ITERATIONS`) carries that pass's `cachedTokens`, `uncachedTokens`, `outputTokens`, `thinkingTokens`
|
|
87
|
+
and `costEstimateUsd`.
|
|
88
|
+
- `ask_agentic`: the message of an iteration `TIMEOUT` whose pass was booked says it is booked at the result's token
|
|
89
|
+
and cost fields; it used to say the request was booked 0 beside those fields.
|
|
90
|
+
- `ask_agentic`: a pass whose usage could not be read (the read threw after its model call completed) is booked at
|
|
91
|
+
its whole reservation — the input estimate plus the reserved output and thinking tokens; it used to be booked at
|
|
92
|
+
the input estimate alone.
|
|
93
|
+
- Docs and timeout messages: whether Google bills a request aborted after its stream opened is not measured; the server
|
|
94
|
+
books it 0, so for such a request the daily budget and the TPM window are not a bound. `docs/cost-model.md` names
|
|
95
|
+
this and the `ask_agentic` iteration's fixed 50,000-token estimate (*What the daily budget does not bound*); the
|
|
96
|
+
phrases "true upper bound" / "true cap" are gone.
|
|
97
|
+
- `ask` and `code`: an answer whose usage row cannot be written (a busy or failing database) is returned, and the
|
|
98
|
+
failed write is logged; the paid answer used to be lost behind an error.
|
|
99
|
+
|
|
100
|
+
### Security
|
|
101
|
+
|
|
102
|
+
- `ask_agentic`: `list_directory`, `find_files` and `grep` no longer show a file on the secret denylist that `read_file`
|
|
103
|
+
refuses — a basename such as `.env`, `.env.local`, `credentials.json`, `secrets.yaml` or `service-account.json`, or a
|
|
104
|
+
name ending in `.pem`, `.key` or another secret extension, in any case. Before, since these tools shipped with
|
|
105
|
+
`ask_agentic`, `list_directory` listed such files with their sizes, `find_files` listed those its source rules admit
|
|
106
|
+
(`credentials.json`, `secrets.json`, `secrets.yaml`, …), and `grep` returned their matching lines. The three tools and
|
|
107
|
+
`read_file` now read one denylist.
|
|
108
|
+
|
|
109
|
+
### Notes
|
|
110
|
+
|
|
111
|
+
- Minor release. `errorCode`, `timeoutKind` and every result field that existed keep their values and meaning. What an
|
|
112
|
+
existing caller can observe: an `ask_agentic` call that hung with no knob set now ends with `TIMEOUT` at a default; a
|
|
113
|
+
`TIMEOUT` can be `retryable: false` (tool calls of the iteration still run); on `ask`'s fallback `stallMs` no longer
|
|
114
|
+
ends a healthy iteration, and `iterTimeoutSource` no longer takes the values `'stallMs'` and
|
|
115
|
+
`'min(timeoutMs,stallMs)'`; `list_directory`, `find_files` and `grep` no longer show a file on the secret denylist.
|
|
116
|
+
|
|
10
117
|
## [1.24.0] - 2026-11-17
|
|
11
118
|
|
|
12
119
|
### Added
|
|
@@ -1868,7 +1975,9 @@ Integration-test-surfaced and review-surfaced fixes landed before the v1.0.0 rel
|
|
|
1868
1975
|
- MIME type simplified to `text/plain` for all files.
|
|
1869
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).
|
|
1870
1977
|
|
|
1871
|
-
[Unreleased]: https://github.com/qmediat/gemini-code-context-mcp/compare/v1.
|
|
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
|
|
1980
|
+
[1.25.0]: https://github.com/qmediat/gemini-code-context-mcp/compare/v1.24.0...v1.25.0
|
|
1872
1981
|
[1.24.0]: https://github.com/qmediat/gemini-code-context-mcp/compare/v1.23.1...v1.24.0
|
|
1873
1982
|
[1.23.1]: https://github.com/qmediat/gemini-code-context-mcp/compare/v1.23.0...v1.23.1
|
|
1874
1983
|
[1.23.0]: https://github.com/qmediat/gemini-code-context-mcp/compare/v1.22.1...v1.23.0
|
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":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