Stage 4: TOML integrations — gemini and tabnine migrated to plugin architecture#2050
Merged
mnriem merged 1 commit intogithub:mainfrom Apr 1, 2026
Merged
Stage 4: TOML integrations — gemini and tabnine migrated to plugin architecture#2050mnriem merged 1 commit intogithub:mainfrom
mnriem merged 1 commit intogithub:mainfrom
Conversation
…chitecture
Add TomlIntegration base class in base.py that mirrors MarkdownIntegration:
- Overrides command_filename() for .toml extension
- Extracts description from YAML frontmatter for top-level TOML key
- Renders prompt body in TOML multiline basic strings with escaped backslashes
- Keeps full processed template (including frontmatter) as prompt body
- Byte-for-byte parity with v0.4.4 release ZIP output
Create integrations/gemini/ and integrations/tabnine/ subpackages:
- Config-only __init__.py subclassing TomlIntegration
- Integration-specific update-context scripts (sh + ps1)
Add TomlIntegrationTests mixin with TOML-specific validations:
- Valid TOML parsing, description/prompt keys, {{args}} placeholder
- Setup/teardown, manifest tracking, install/uninstall round-trips
- CLI auto-promote (--ai) and --integration flag tests
- Complete file inventory tests (sh + ps)
Register both in INTEGRATION_REGISTRY; --ai auto-promote works automatically.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the Gemini CLI and Tabnine CLI integrations (TOML command format) onto the new integration plugin architecture by introducing a TomlIntegration base class, wiring both integrations into the registry, and adding comprehensive TOML-specific integration tests.
Changes:
- Added
TomlIntegrationto generate TOML command files (extract frontmatterdescription, renderpromptas TOML multiline strings, install scripts). - Added new built-in integrations:
GeminiIntegrationandTabnineIntegration, including per-integration update-context wrapper scripts (sh/ps1). - Added a reusable TOML integration test mixin plus per-integration config-only test classes and inventory/round-trip validations.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/integrations/base.py |
Introduces TomlIntegration and TOML rendering/installation logic mirroring MarkdownIntegration. |
src/specify_cli/integrations/__init__.py |
Registers Gemini + Tabnine as built-in integrations. |
src/specify_cli/integrations/gemini/__init__.py |
Adds GeminiIntegration(TomlIntegration) configuration. |
src/specify_cli/integrations/gemini/scripts/update-context.sh |
Adds Gemini wrapper delegating to shared update-agent-context.sh. |
src/specify_cli/integrations/gemini/scripts/update-context.ps1 |
Adds Gemini wrapper delegating to shared update-agent-context.ps1. |
src/specify_cli/integrations/tabnine/__init__.py |
Adds TabnineIntegration(TomlIntegration) configuration. |
src/specify_cli/integrations/tabnine/scripts/update-context.sh |
Adds Tabnine wrapper delegating to shared update-agent-context.sh. |
src/specify_cli/integrations/tabnine/scripts/update-context.ps1 |
Adds Tabnine wrapper delegating to shared update-agent-context.ps1. |
tests/integrations/test_integration_base_toml.py |
Adds TOML integration test mixin (parsing, manifest tracking, install/uninstall, CLI flows, file inventory). |
tests/integrations/test_integration_gemini.py |
Adds config-only test class for Gemini based on TOML mixin. |
tests/integrations/test_integration_tabnine.py |
Adds config-only test class for Tabnine based on TOML mixin. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate the two TOML-format integrations (Gemini CLI and Tabnine CLI) to the plugin architecture, completing Stage 4 of the integration migration plan (#1924).
Changes
TomlIntegrationbase class (integrations/base.py)Mirrors
MarkdownIntegrationclosely — subclasses only need to setkey,config,registrar_config, and optionallycontext_file:command_filename()→.tomlextensiondescriptionfrom YAML frontmatter for the top-level TOML key""") with escaped backslashesIntegration subpackages
integrations/gemini/—GeminiIntegration(TomlIntegration)with update-context scriptsintegrations/tabnine/—TabnineIntegration(TomlIntegration)with update-context scriptsBoth are config-only (~20 lines each), registered in
INTEGRATION_REGISTRY.Tests
TomlIntegrationTestsmixin intest_integration_base_toml.pywith TOML-specific validations:tomllib),description/promptkeys,{{args}}placeholder--ai) and--integrationflag teststest_integration_gemini.pyandtest_integration_tabnine.py— config-only test classesValidation
Relates to
#1924