Add read-only whid-member agent mode with intent classifier - #84
Open
benrucker wants to merge 1 commit into
Open
Add read-only whid-member agent mode with intent classifier#84benrucker wants to merge 1 commit into
benrucker wants to merge 1 commit into
Conversation
Requested via Discord: expand jermabot’s agent feature to allow usage by non-owner users. Usage should be limited to people in whid. This new entry point counts as a new “mode” in my opinion. This mode of operation follows a more untrusted model: it never results in a PR or any other mutation-type side effects. This mode also has an additional layer in front of its usage: an intent classifier. The intent classifier answers “does the user want a natural-language response from JermaBot?” The agent capabilities are only activated if the answer to that question is “yes.” This avoids accidental invocations, e.g. upon a misspelled command.
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.
Add read-only whid-member agent mode with intent classifier
Extends the JermaBot coding agent so whid Discord server members can ping the bot for conversational/code-question responses, without any mutation side effects.
What changed
agent_config.pyWHID_GUILD_ID = 173840048343482368get_readonly_conversations_root()(envJERMABOT_AGENT_READONLY_DIR, default~/jermabot-agent/readonly-conversations)agent_runner.py_make_path_guardnow accepts anallowed_toolsparameter (defaultAGENT_TOOLS) so the readonly guard enforcesREADONLY_AGENT_TOOLS = ['Read', 'Glob', 'Grep']at the hook layer as well as at the options layerclassify_intent(message_text)— single-turn, no-tool Claude session that returnsTrueonly if the message is a genuine conversational request (not a garbled command); silently returnsFalseon any error_build_readonly_instructions/_build_readonly_options/run_readonly_agent— readonly analogue of the owner pipeline: same streaming/timeout mechanics, no Edit/Write/NotebookEdit tools, no_split_reply, returnsAgentRunResultwith empty title/bodyagent_service.pyReadonlyConversation— lightweight in-memory dataclass (session ID + last-active + lock); no disk persistence since no git state accumulatesReadonlyAgentTaskService— samestart/close/has_conversation/runinterface asAgentTaskService; shares the pristine clone workspace root ascwd(so relative paths resolve naturally), saves image attachments underworkspace_root/_attachments/<key>/, never callspublish_turnagent.pyAgent.__init__/cog_load/cog_unloadwire upreadonly_servicealongsideserviceon_messagesplits into two fully separate branches: owner path (unchanged) and whid-member path (new); both share the_strip_mention/_is_own_threadhelpers_is_whid_member— guild-ID check_handle_readonly_prompt— same Discord mechanics as_handle_prompt(typing indicator, lazy thread creation, chunked sends), minus the PR-link reporting blockBehaviour
Opened by the JermaBot coding agent at the owner's request via Discord.