feat: add experimental agentic ask command - #337
Merged
Conversation
Add a private CLI-only Ask transport with strict response validation, bounded requests, authentication refresh, and safe error handling. Wire the opt-in command, actionable source rendering, smoke coverage, documentation, and release metadata without changing the MCP surface.
Stop interactive progress before rendering answers or diagnostics, and reject source argv that does not match the backend's exact githits@latest code-read or docs-read contract.
Preserve terms-acceptance remediation, strip additive backend response fields without exposing usage, sanitize human errors, and include enabled Ask in the curated experimental help surface.
Keep ordinary 403 status mapping when the optional terms-remediation body cannot be read while preserving request cancellation, and align the experimental Ask help entry.
Keep Markdown tab indentation, refresh stale JWTs after the shared terms gate, and classify successful-response stream resets as retryable connection failures without changing cancellation or size-limit behavior.
Add the explicit declaration type required by bunup when the internal service is bundled into the MCP package.
Add the Ask tool only to the opted-in local stdio MCP inventory. Validate backend-provided MCP source calls, render deterministic text and JSON responses, and preserve shared auth, error, attribution, and cancellation behavior.
Allow the experimental CLI and local MCP Ask surfaces to request original upstream URLs while preserving their native source formats by default. Validate and render the selected response shape deterministically without exposing usage.
Expose backend conversation references as thread IDs in the experimental CLI and local MCP surfaces. Validate continuation inputs, preserve replay IDs on failures, and provide compact conditional follow-up guidance.
Direct local MCP agents to resolve ambiguous or noncanonical targets before starting an Ask thread, while preserving the concise continuation guidance.
Restore the compact first MCP description sentence so deferred tool catalogs expose Ask clearly, while retaining thread and target-resolution guidance in subsequent sentences.
Keep the Agentic Ask selection sentence within the deferred catalog limit and lock the sentence content and length in tests.
Keep public Ask guidance focused on supported usage and avoid exposing backend implementation details. Validate malformed invocations before auto-login and map thread continuation failures through the shared error contracts.
Keep the public-only catalog sentence intact while restoring the experimental marker expected across the local MCP tool suite.
The local MCP policy and inventory already identify experimental tools. Keep Ask guidance focused on usage and test the registration boundary instead of requiring duplicated catalog prose.
Consume the thread-named Ask request, response, and error header directly. Remove the now-unnecessary conversation-to-thread response transforms and update the affected contract fixtures.
skvark
marked this pull request as ready for review
September 3, 2026 12:35
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
POST /askwith strict CLI/MCP/URL response validation, token refresh, a 210-second total deadline, cancellation, bounded response parsing, and safe error/run-ID handlinggithits ask <target> <question> [--source-format cli|url] [--json]and local stdio MCPasksupport behind[experimental] tools = truenpx githits@latest ...commands, local MCP defaults to backend-providedcode_read(...)/docs_read(...)calls, and both accept the URL override@githits/mcppublic exports/client, and githits-remote-mcpVerification
bun run typecheck,bun run lint, changed-file Biome checks, andgit diff --checkpassedbun run buildpassed after formattingbun run plugins:generate/plugins:checkpassed with no generated asset diffbun run smoke:mcppassed all 52 steps: default MCP text sources and URL-format JSON were deterministic, had replay IDs, and JSON omitted usage01a0607d-eb9d-7556-ba8e-ac12bb7c89dd)bun test: 3773 passed; two environment-only failures were the reproducible WindowsEBUSYtemp cleanup race and the eval harness correctly rejecting managedCODEX_HOME/AGENTS.mdbun run validate:packagescannot complete locally because Bun 1.3.9 panics inside bunup on this Windows workspace path. CI remains authoritative for package validation.Boundaries