feat: add TormentNexus extension crate with full Pi extension parity#4086
Open
robertpelloni wants to merge 3 commits into
Open
feat: add TormentNexus extension crate with full Pi extension parity#4086robertpelloni wants to merge 3 commits into
robertpelloni wants to merge 3 commits into
Conversation
Introduces codewhale-extension — a generic runtime extension system for CodeWhale that mirrors the Pi Coding Agent's ExtensionAPI pattern. Extension trait with 12 lifecycle hooks: - SessionStart, BeforeAgentStart, ToolCall, ToolResult - TurnEnd, Input, UserBash, ModelSelect - SessionBeforeCompact, SessionCompact, SessionShutdown Extensions can also register: - MCP servers via mcp_servers() - Slash commands via slash_commands() - Keyboard shortcuts via shortcuts() - Custom tools via tools() Includes ExtensionManager for registration + dispatch, and generic McpServerDef, SlashCommandDef, ShortcutDef, ToolDef types. Also fixes Ctrl+Up/Down keybinding to scroll by 1 line.
…(hooks, tools, commands, shortcuts, L2 memory, RBAC)
|
Thanks @robertpelloni for taking the time to contribute. This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered. Please read |
83 tasks
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
crates/tn-extension— a native Rust extension implementing thecodewhale_extension::Extensiontrait with full parity to the TormentNexus Pi Coding Agent extension for persistent L2 memory, MCP tool discovery, skill registry, code search, RBAC, and context harvesting.Changes
7 files (+387/-1 lines):
New crate:
crates/tn-extension/Cargo.toml— depends oncodewhale-extension,serde_json,reqwest,chrono,async-traitsrc/lib.rs—TormentNexusExtensionimplementing all lifecycle hooksExtension Lifecycle Hooks
http://127.0.0.1:7778/api/memory/addrm -rf,sudo,DROP TABLE, etc.) againstPOST /api/enterprise/authorize@memory:keyinline with L2 content from TN sidecarRegistration via Extension Trait
tn_memory_store,tn_memory_search,tn_memory_vector_search,tn_tool_search,tn_session_search,tn_skill_manage,tn_code_search,tn_context_harvest,tn_scratchpad/tn-store,/tn-search,/tn-status,/tn-plan,/tn-summary,/tn-purgeCtrl+Shift+M(memory search),Ctrl+Shift+T(tool search),Ctrl+Shift+P(system status)tormentnexus.exe mcpwith envTORMENTNEXUS_WORKSPACE_ROOTWiring
crates/tui/Cargo.toml— addedcodewhale-tn-extensiondependencycrates/tui/src/core/engine.rs— registersTormentNexusExtensionintoExtensionManagerat startupCargo.toml(workspace root) — addedcrates/tn-extensionas workspace memberDependencies
reqwest(HTTP client for TN sidecar API)serde_json(JSON serialization for API payloads)chrono(RFC3339 timestamps)async-trait(async trait support for Extension)