Conversation
Thin stdio JSON-RPC adapter over the package's own CLI (runCli in-process); no @modelcontextprotocol/sdk dependency. Single file-path tool resample_ohlcv_file. Fix streaming CSV->CSV output bug (IncrementalWriter now always writes array-shape rows). Update README tagline.
…ohlcv_file - auditOhlcv + AuditReport: single streaming pass validating and describing market-data input (records, time range, base timeframe, ordering, duplicate timestamps, OHLC integrity, bad values, missing bars) - CLI --audit prints a JSON trust report instead of resampling; reuses the same streaming readers for CSV/JSONL/Parquet - MCP audit_ohlcv_file tool delegates to the CLI via --audit (zero extra logic) - Fix double-mapping: readers already apply --map, so auditOhlcv must not re-map except for the parquet string-path branch - Capture CSV header / JSONL shape+schema into the report after streaming - Tests: __tests__/audit.ts (14 new tests)
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.
What
Adds a bundled, zero-dependency MCP server to the package, plus a README tagline update.
MCP server (
ohlc-resample-mcpbin)ohlc-resample-mcpbinary ships inside this same package — installohlc-resampleand get the server for free, no second publish.runCliin-process with injected streams. It has no resampling/parsing/formatting logic of its own, so every future CLI feature (formats, streaming, Parquet,--map) is inherited with zero maintenance.@modelcontextprotocol/sdkdependency — MCP is plain JSON-RPC 2.0 over stdio (initialize,tools/list,tools/call,ping), hand-rolled directly. Runtime deps stay justmri+hyparquet.resample_ohlcv_file:input_path(csv/json/jsonl/ndjson/parquet),base_timeframe,new_timeframe,format,shape, optionalmap(e.g. CCXTtimestamp/amount), optionaloutput_path. File-path-based, so the LLM pays tokens for intent, not payload.Bug fix
shaped.join is not a function:IncrementalWriterrendered object-shaped candles as CSV rows without converting to the 6-tuple shape. CSV rows are now always written in array shape regardless of the requested JSON shape.Tests / docs
dispatchdirectly) — 111 total passing.Why
MCP is the interface for AI agents to drive market-data analysis. The server is agent-facing and file-path-based, and bundling it keeps a single package/release with zero extra maintenance.