mcp_analysis 0.2.0
mcp_analysis: ^0.2.0 copied to clipboard
Analysis engine for the MCP ecosystem providing pipeline-based data analysis with pluggable functions, transforms, and multi-source data integration.
0.2.0 - 2026-09-01 #
Added #
- Steps compose:
AnalysisStep.inputnames an earlier step and the result field to read, and the executor builds that step's dataset from it. AnalysisStep.transforms— transforms applied to one step's data, after its input is resolved and before its function runs.- Outputs select a result field:
AnalysisOutputDef.fieldandindexField. Charts and series carry the named values; a chart's axes are labelled by the fields they come from. - All 35 built-in functions with fixed result keys declare them in
AnalysisFunctionInfo.results.descriptive_statskeys its results by column name and declares none. AnalysisInputSource.columnAliasesandmerge(append|join).SourceMergerreplaces the private merge in batch and ad-hoc execution. Joining two sources that share a column name raisessource.column_collision.KvBackedStorage— aStoragePortover the host'sKvStoragePort.SpecManager.getSpecVersion,listSpecVersionsand an optionalversionStorage;AnalysisPortAdapterexposes both.DataSourceRegistry.hasAdapterandregisteredTypes.- The standard builder registers
uploadalongsidesynthetic.
Changed #
- Implements the widened
AnalysisPort(mcp_bundle 0.4.10): every method takes an optionalAnalysisActor, which becomes the engine'sRbacContext;listJobs,cancelJob,deleteSpecandlistFunctionsjoin the port.cancelJobmoves onto the port from the adapter. createSpecrejects spec shapes that 0.1.4 accepted. Each produced an artifact built from nothing:spec.invalid.duplicate_step_key,spec.invalid.unresolved_output_source,spec.invalid.unknown_result_field,spec.invalid.unresolved_step_input,spec.invalid.step_input_order. An output may also read the keys a streaming job emits from its window —windowState,pointCount,lateDropped,overflowDropped(SpecValidator.engineSuppliedResultKeys) — which no step produces.- A chart built with no named field labels its axes
indexandvalue. analysis_options.yamladded; the package isdart analyzeanddart formatclean.mcp_bundlefloor raised to^0.4.10for the analysis contract this release uses. Dev floors:lints ^6.1.0,mockito ^5.8.1,test ^1.31.2.
Fixed #
getArtifacts(jobId:)andgetArtifacts(tags:)filter. Artifacts recordprovenance.jobId, and the store applies every filter itself rather than passing it to the storage as criteria.- An output bound to a step carries that step's results; a metric no longer
reports
0.0for an unresolved binding. - An output bound to a result field the run did not produce yields no
artifact and records
artifact.unproduced_fieldon the job. A conditional field —criticalValuefor one test but not another,bandPowersonly when bands were requested — is declared by the function and so passes validation; building the artifact anyway reported0.0for a number nobody computed. - Two steps calling one function keep both results, keyed by
AnalysisStep.resultKey. - Chart artifacts carry their series.
- Alert artifacts take their severity from the function's result or the
output's
parameters. - Uploaded JSON is parsed with
dart:convert: escape sequences, unicode, nested values and numeric formats are preserved, malformed input raisessource.schema_mismatch, and parsing always terminates. - Uploaded CSV is read per RFC 4180: quoted fields may hold the delimiter, a newline or a doubled quote; CRLF is handled; a column is typed by its first present value.
- API source errors carry the scheme, host and path, the method, and the names of headers and query parameters — not the source configuration, the query string or any userinfo.
- A series or chart indexed by a numeric field keeps its points distinct: the index range is normalized onto the point axis rather than scaled by a fixed multiplier, which merged values less than 0.001 apart.
- Batch and ad-hoc failures record the cause of the error they wrap.
0.1.4 - 2026-07-14 - Standard in-memory builder #
Added #
AnalysisPortAdapter.inMemory()— one-line production engine builder (full catalog +syntheticsource), closing the standard-builder gap the other capability packages already meet.standardBuiltinFunctions()— single source of the built-in catalog.dataSourceRegistrygetter for post-construction adapter registration.
Fixed #
- Summary artifacts now carry the full function-results map as JSON when no 'text' key is present — rich results (fft, lockin, ...) were unreachable through the port artifact surface.
0.1.3 - 2026-07-14 - Filter completion, lock-in, model simulation #
Added #
digital_filter: notch, Butterworth order cascade (2..8), median — filter family completion.lockin— software lock-in amplifier (synchronous demodulation) for weak tone amplitude/phase extraction (36 built-in functions).- Synthetic source model kinds
state_space/transfer_function/rlc(RK4, ZOH input) and Monte Carloensemblepercentile bands — in-core linear system simulation and simulation-based prediction.
0.1.2 - 2026-07-14 - Standard function catalog + streaming semantics + performance #
Added #
- 28 new built-in functions (7 → 35): DSP (fft w/ phase, psd_welch + band powers, spectrogram, cepstrum, harmonics/THD, cross_psd/coherence/FRF, digital_filter, peak_detect, zero_crossing, resample, envelope), timeseries (acf auto-period, cross_correlation, changepoint_cusum, holt_winters, kalman_filter, smoothing w/ Savitzky-Golay derivatives, differencing), statistics (histogram, covariance_matrix, regression, hypothesis_test, pca, lomb_scargle, interpolate), and a built-in domain layer (vibration_indicators w/ ISO 10816 zones, hrv_metrics, eeg_band_powers).
SyntheticSourceAdapter(AnalysisSourceType.synthetic) — seeded signal/Monte-Carlo generator registered as a data source.- Streaming semantics:
WindowKind.tumbling,maxPointsbounded buffer, watermark late-drop,ReorderBuffer(allowedLateness), drop counters in emitted artifacts. descriptive_statsskewness/kurtosis;anomaly_detectmadmethod.- Bench harness (
bench/) with recorded baselines and targets.
Changed #
WindowAggregatoris incremental (Kahan running sums + monotonic deques): add amortized O(1), aggregate O(1) — ~9000x faster at 100K occupancy.- Floors
mcp_bundle ^0.4.8(AnalysisSourceType.synthetic).
0.1.1 - 2026-05-23 - mcp_bundle 0.4.0 cascade #
Changed (cascade) #
mcp_bundlecaret bumped from^0.3.0to^0.4.0. mcp_analysis does not touchUiSection.pagesdirectly, so this release is a caret-only cascade. Consumers should bump to^0.1.1.
0.1.0 - 2026-04-28 - Initial Release #
Added #
- Spec subsystem — validator, parameter resolver, spec manager.
- Artifact subsystem — builder, store, provenance tracker.
- Execution subsystem — execution engine, batch / ad-hoc / stream executors, job manager, retry policy, step logger.
- DataSource subsystem with pluggable adapters for multi-source integration.
- Pluggable analysis functions and transforms.
- Alert evaluation.
- MCP integration via tools.
- Standard port adapter implementing
mcp_bundleanalysis Contract Layer.