Download packages/core/src/context/config/schema.ts from SaylorTwift/gemini-cli: direct link, hf CLI and curl.
- Browser
- Download file 1.96 kB
-
https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/core/src/context/config/schema.ts
- Command line
-
hf download hf://SaylorTwift/gemini-cli/packages/core/src/context/config/schema.ts
-
curl -L -o schema.ts https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/core/src/context/config/schema.ts
1.96 kB
| /** | |
| * @license | |
| * Copyright 2026 Google LLC | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| import type { ContextProcessorRegistry } from './registry.js'; | |
| export function getContextManagementConfigSchema( | |
| registry: ContextProcessorRegistry, | |
| ) { | |
| // We use a registry to deeply validate processor overrides. | |
| // We do this by generating a `oneOf` list that matches the `type` discriminator | |
| // to the specific processor `options` schema. | |
| const processorOptionSchemas = registry.getSchemaDefs().map((def) => ({ | |
| type: 'object', | |
| required: ['type', 'options'], | |
| properties: { | |
| type: { const: def.id }, | |
| options: def.schema, | |
| }, | |
| })); | |
| return { | |
| $schema: 'http://json-schema.org/draft-07/schema#', | |
| title: 'ContextManagementConfig', | |
| description: 'The Hyperparameter schema for a Context Profile.', | |
| type: 'object', | |
| properties: { | |
| budget: { | |
| type: 'object', | |
| description: 'Defines the token ceilings and limits for the pipeline.', | |
| required: ['retainedTokens', 'maxTokens'], | |
| properties: { | |
| retainedTokens: { | |
| type: 'number', | |
| description: | |
| 'The ideal token count the pipeline tries to shrink down to.', | |
| }, | |
| maxTokens: { | |
| type: 'number', | |
| description: | |
| 'The absolute maximum token count allowed before synchronous truncation kicks in.', | |
| }, | |
| coalescingThresholdTokens: { | |
| type: 'number', | |
| description: | |
| 'Only trigger background consolidation (snapshots) when at least this many tokens have aged out. Prevents "turn-by-turn" utility model churn.', | |
| }, | |
| }, | |
| }, | |
| processorOptions: { | |
| type: 'object', | |
| description: | |
| 'Named hyperparameter configurations for ContextProcessors and AsyncProcessors.', | |
| additionalProperties: { oneOf: processorOptionSchemas }, | |
| }, | |
| }, | |
| }; | |
| } | |