[codex] add http chat trigger aliases and docs#221
Merged
Conversation
a127285 to
277a631
Compare
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
This PR addresses issue #218 by making MicroClaw's HTTP entrypoint easier to discover and use as a general-purpose automation trigger.
The runtime already had functional endpoints (
/api/sendand/api/send_stream) that can trigger agent runs from external systems, but users looking for classic chatbot naming (/chat) had no explicit API alias and very little guidance in docs.User impact (before)
External callers (webhooks, scripts, CI jobs) could still trigger the agent, but only if they already knew Web API details and naming conventions.
That made the feature look missing from an automation perspective, which is why the issue framed it as “no general-purpose HTTP trigger”.
Root cause
The gap was primarily discoverability and API ergonomics:
send,send_stream).What changed
POST /api/chat-> same handler asPOST /api/sendPOST /api/chat_stream-> same handler asPOST /api/send_streamtest_chat_alias_matches_send_behaviortest_chat_stream_alias_worksoperator.write)Validation
Ran targeted tests:
cargo test test_chat_alias_matches_send_behavior -- --nocapturecargo test test_chat_stream_alias_works -- --nocapturecargo test test_send_stream_then_stream_done -- --nocaptureAll passed.
Notes
This PR does not change auth/scope behavior and does not introduce a new execution model. It surfaces existing capability with clearer API naming and documentation so external automation is straightforward.