Repository navigation
feat(theia): add Eclipse Theia AI target - #4004
Merged
Merged
Conversation
Add a `theia` target for Eclipse Theia AI (the AI layer of the Theia IDE and Theia-based products): - rules: workspace-root AGENTS.md only; non-root rules fold into it - commands: `.prompts/<name>.prompttemplate` with `isCommand: true`, `commandName` and `commandDescription`; import reads only command templates, and `.prompts/` is never swept or gitignored - subagents: `.agents/agents/<id>/agent.md` with the `name`, `description` and `defaultLLM` frontmatter Theia requires - skills: `.agents/skills/` (project) and `~/.theia/skills/` (global) - mcp: `ai-features.mcp.mcpServers` merged into `.theia/settings.json`, keeping other preferences, comments and Theia-managed server keys Closes #3732 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
- Skills reuse AgentsSkillsSkill so the shared .agents/skills file is identical to the agentsskills output in either target order, and the global scope writes ~/.agents/skills/, which every Theia product reads - Skip agent.md files missing required keys on import with a warning - Import Theia-specific MCP servers into the theia.mcpServers block so tokens never reach other targets - Document that --delete removes UI-created custom agents Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…eia-target # Conflicts: # src/generated/docs-content.ts
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
Adds a
theiatarget for Eclipse Theia AI, the AI layer of the Theia IDE and of products built on the Theia platform. Every surface was checked against the Theia AI docs and the Theia source (packages/ai-core,packages/ai-mcp,packages/corepreferences) on 2026-11-26.AGENTS.md(root only, non-root rules folded in).prompts/<name>.prompttemplate.agents/agents/<id>/agent.md.agents/skills/<name>/SKILL.md~/.agents/skills/<name>/SKILL.mdai-features.mcp.mcpServersin.theia/settings.jsonChanges
src/constants/theia-paths.ts, andTheiaRule/TheiaCommand/TheiaSubagent/TheiaSkill/TheiaMcpwith unit tests, registered in each processor, the target tuples andtool-display.ts.isImportablehook on the command factory lets import skip files in the commands directory that are not commands (.prompts/also holds plain prompt fragments). Theprompttemplateextension was added to the commandmeta.extensionunion..theia/settings.jsonis declared in the shared-config gateway (jsonc, fail closed on parse errors and non-object roots;mcpownsai-features.mcp.mcpServers) and listed inSHARED_USER_MANAGED_CONFIG_PATHS(not gitignored, never created just to hold nothing).theia.mcpServerstool-scoped blocks are accepted..agents/agents/*.mdfiles of other targets left alone) and MCP merge/import (hand-written preference, comment andregistryMetadatakept).docs/reference/file-formats.mdfor every feature; README / supported-tools tables regenerated;docs-content.tsregenerated; cspell words.Design decisions
AGENTS.md(noCLAUDE.mdfallback, no nested files), so the target mirrorscortexcode(SingleRootFileRule,collisionPolicy: "fold", project only).commandNamedefaults to the file name andcommandDescriptionto the canonicaldescription; thetheia:section (e.g.commandArgumentHint,commandAgents) wins over generated keys. Because.prompts/holds hand-written prompt fragments and agent prompt overrides, the target usescommittedOutput(no--deletesweep, not gitignored) likelettacode's.commands/, and import reads onlyisCommand: truetemplates. A template whose frontmatter does not parse is treated as a non-command (Theia does the same) instead of failing the import. A customWorkspaceTemplateDirectoriesvalue is not followed.agent.mdwhosename,descriptionordefaultLLMis not a string, sodescriptionfalls back to""anddefaultLLMtodefault/universal(Theia's own "Add Custom Agent" default) unlesstheia.defaultLLMis set; import keepsdefaultLLMonly when it differs.theia.idis dropped because Theia skips an agent whoseiddiffers from its folder. Anagent.mdmissing a required key is skipped with a warning on import (skipInvalidImportFiles).--deleteremoves.agents/agents/<id>/agent.mdfolders no rulesync subagent accounts for, including agents created in Theia's UI (documented: import first). The*/agent.mdpattern and theagentsmd/Antigravity*.mdpattern in the same.agents/agents/root never match each other's files.TheiaSkillextendsAgentsSkillsSkillunchanged, so the shared.agents/skills/file (license/compatibility/metadata/allowed-tools and theagentsskillsopt-ins included) is identical to theagentsskillsoutput whichever target runs last (e2e covers both orders); there is notheia:skill section. The inherited Agent Skills checks warn about what Theia's loader skips (name not kebab-case or not matching the directory, description > 1024 chars). Global writes~/.agents/skills/: the product-specific folder (~/.theia/skills/for the platform,~/.theia-ide/skills/for the Theia IDE) differs per product, while~/.agents/skills/is read by all of them.url→serverUrl,headers→headers(in the preference schema and the MCP dialog); non-canonical keys (autostart,deferLoading,oauth,serverAuthToken,serverAuthTokenHeader, ...) pass through.disabled: trueservers are skipped with a warning (no disable switch). The generated map replacesai-features.mcp.mcpServers, but on a server that already exists every key Theia does not document as user configuration (e.g. the AI registry'sregistryMetadata, or a key a newer Theia adds) is kept. Every other preference and comment in.theia/settings.jsonis kept; the file is never deleted. On import, a server with any Theia-specific key (serverAuthToken,oauth,autostart, ...) goes whole into the tool-scopedtheia.mcpServersblock, so credentials never reach other targets; plain servers go to the sharedmcpServers. The triage plan suggested extractingAuthorization: Bearerheaders intoserverAuthToken; passingheadersthrough is lossless and simpler, so that mapping was not added.Skipped items
.prompts/agents/and.prompts/skills/alternates: one canonical location is written (.agents/...), which Theia prefers for new agents.Closes #3732
🤖 Generated with Claude Code
https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4