Releases: 514-labs/moosestack
Releases · 514-labs/moosestack
v0.6.140
secondary indexes (#2869) <!-- CURSOR_SUMMARY --> > [!NOTE] > Adds full support to declare, diff, generate, and apply ClickHouse secondary indexes across SDKs/CLI, with SQL parsing, DDL, tests, and docs. > > - **Core/Infra (CLI/OLAP)**: > - Add `TableIndex` and `Table.indexes` with proto (`TableIndex`, `Table.indexes`) wiring and round-trip conversions. > - Detect index diffs and plan `AddTableIndex`/`DropTableIndex` operations; include in DDL ordering and execution. > - Generate `INDEX ...` clauses in `CREATE TABLE`; implement `ALTER TABLE ADD/DROP INDEX` executors. > - Parse indexes from `SHOW CREATE TABLE` via `extract_indexes_from_create_table`; include in `list_tables`. > - Extend errors to surface SQL parse failures. > - **Codegen**: > - TypeScript/Python generators emit `indexes` in table configs. > - **SDKs/Libraries**: > - TS `OlapTable` and Py `OlapConfig` support `indexes`; internal serializers pass through. > - **Tests/E2E**: > - Add `IndexTest` tables in TS/Py templates; verify seven indexes and granularity update; new utils `verifyTableIndexes`. > - **Docs**: > - New OLAP page on indexes and nav entry. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2b6ab302db08d44b65723f582cc52fa1df15b127. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
v0.6.139
get_source Tool (#2848) <!-- CURSOR_SUMMARY --> > [!NOTE] > Adds optional source file metadata to infrastructure components and a new MCP `get_source` tool, and updates diffing to ignore metadata-only changes. > > - **Protocol & Models**: > - Add `SourceLocation` and optional `metadata.source` in protobuf; plumb through `Topic`, `Table`, `ApiEndpoint`, and `FunctionProcess` `to_proto/from_proto`. > - **Diff Behavior**: > - Compare `topics`, `tables`, and `api_endpoints` ignoring `metadata` to prevent redeployments on metadata-only changes. > - **MCP Server & Tools**: > - Add `get_source` tool to return component source file paths; register routing and include in tool list (tests updated from 4 to 5 tools, names verified). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 56c2b9d8b3f02e886163facc0fc2fb8e38bb1ab9. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
v0.6.138
require byof mount path and forbid root mount path (#2871) <!-- CURSOR_SUMMARY --> > [!NOTE] > Require explicit non-root `mountPath`/`mount_path` for WebApps; add stricter validation and update tests/serialization accordingly. > > - **Python (`moose_lib/dmv2/web_app.py`)**: > - Require `WebAppConfig.mount_path` and pass `config` to `WebApp` constructor; remove defaulting to `/`. > - Forbid root `/` and trailing slash; keep reserved-prefix and duplicate-path checks; update `__repr__` to use `config.mount_path`. > - Tests updated to require `mount_path`, reject `/`, and reflect new serialization (no default `/`). > - **TypeScript (`src/dmv2/sdk/webApp.ts`)**: > - Require `WebAppConfig.mountPath` and `config` in constructor. > - Add validations: required, not `/`, no trailing slash, reserved-prefix check; keep duplicate-path and duplicate-name checks. > - Tests updated to always provide `mountPath`, add root-path rejection, and adjust registration/adapter cases accordingly. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 6c157f540c5ffccde5f7174b80e1b117dce2e484. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
v0.6.137
add python webapp sdk layer for byof fastapi (#2868) this does not alter any current implementations. there will be followup PRs to integrate with the python consumption runner. <!-- CURSOR_SUMMARY --> > [!NOTE] > Introduce `WebApp` FastAPI integration with registry support and infrastructure map serialization, plus comprehensive tests. > > - **WebApp SDK**: > - Add `WebApp`, `WebAppConfig`, `WebAppMetadata` in `dmv2/web_app.py` with validation (name uniqueness, mount path rules, reserved paths) and `__repr__`. > - Add helpers in `dmv2/web_app_helpers.py`: `ApiUtil`, `get_moose_utils`, `get_moose_dependency`. > - **Registry**: > - Add `_web_apps` store in `dmv2/_registry.py` and accessors `get_web_apps`, `get_web_app` in `dmv2/registry.py`. > - **Internal Serialization**: > - Extend `internal.py` with `WebAppJson`, `WebAppMetadataJson`; include `web_apps` in `InfrastructureMap` and populate via `to_infra_map()`. > - **Public Exports**: > - Export new WebApp types and registry getters via `dmv2/__init__.py`. > - **Tests**: > - Add `tests/test_web_app.py` covering creation, validation, duplicate checks, config flags, `__repr__`, and serialization to `webApps` in infra map. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 06d425da1fd994b43b7128ef3d8f8a8b631a6a04. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
v0.6.136
feat: bring your own typescript framework for moosestack consumption …
v0.6.135
sanitize variable name for kafka pull (#2863) <!-- CURSOR_SUMMARY --> > [!NOTE] > Centralizes identifier sanitization and updates Kafka pull, TypeScript, and Python codegen to generate valid, consistent names with added tests. > > - **Identifiers (shared)**: > - Add `utilities/identifiers::sanitize_identifier` and export via `utilities`. > - **Kafka Pull (`cli/routines/kafka_pull.rs`)**: > - Use `sanitize_typescript_identifier`, `map_to_python_class_name`, and `map_to_python_snake_identifier` for schema-derived names and stream vars. > - TS stream consts now use `FooBarBazStream`; PY stream vars now use `foo_bar_baz_stream`. > - Remove local `sanitize_pascal_ident`/`sanitize_py_ident` helpers. > - Add tests for dots/hyphens and leading digits. > - **Python Codegen (`framework/python/generate.rs`)**: > - Add `map_to_python_snake_identifier` and `map_to_python_class_name` and use for enums/nested/named tuple/class and table var names. > - Improve field name aliasing with keyword/identifier checks (`sanitize_name`, `is_python_keyword`). > - Adjust tests (assertions/diagnostics). > - **TypeScript Codegen (`framework/typescript/generate.rs`)**: > - Add `sanitize_typescript_identifier` and use for enum/nested type names and table const names. > - Quote property names more robustly; add `is_typescript_keyword`. > - No API shape changes to emitted models except identifier normalization. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 29245b3c808f2bd8a462bdc351129a02ead02fa6. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
v0.6.134
Quickstart example (#2866) This pull request updates the Moose documentation and code samples to reflect a shift from the `Foo` model to a new `Bar` model, introduces documentation for modeling ClickHouse views, and makes supporting changes to metadata and code imports. The primary focus is on improving clarity and providing examples for the new model and view functionality. **Model and Documentation Updates:** * Replaced the `Foo` model with the new `Bar` model in both TypeScript (`app/ingest/models.ts`) and Python (`app/ingest/models.py`), updating field names and types to reflect analyzed text metrics and introducing an enum `Baz` in Python. * Updated infrastructure change output examples in the quickstart docs to reference the new `Bar` table and its fields, replacing previous references to `Foo`. [[1]](diffhunk://#diff-804517bbb2ecd91cd4fc282aaa3dd57e0da90d67b0308764d980ae486b64227bL437-R449) [[2]](diffhunk://#diff-804517bbb2ecd91cd4fc282aaa3dd57e0da90d67b0308764d980ae486b64227bL446-R458) **View Modeling Documentation:** * Added a new documentation page `model-view.mdx` describing how to define and use ClickHouse views with Moose in both TypeScript and Python, including usage examples and best practices. **Supporting Metadata and Imports:** * Added metadata for the new "Modeling Views" documentation page to `_meta.tsx` to ensure proper navigation and titling. * Updated TypeScript imports in `app/views/barAggregated.ts` to include the new `View` class from `@514labs/moose-lib`, supporting the expanded view modeling functionality. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Updates quickstart to use `Bar` schema (replacing `Foo`), adds a new “Modeling Views” doc, updates navigation, and includes a minor TypeScript import tweak. > > - **Docs**: > - **Quickstart**: Replace `Foo` with `Bar` model in `apps/framework-docs/src/pages/moose/getting-started/quickstart.mdx`; update schema fields, Python enum `Baz`, and example infra outputs to reference `Table Bar` and `newField/new_field`. > - **OLAP**: Add `apps/framework-docs/src/pages/moose/olap/model-view.mdx` documenting `View` usage in TypeScript/Python (overview, basic usage, signature). > - **Navigation**: Add `"model-view"` entry to `apps/framework-docs/src/pages/moose/olap/_meta.tsx`. > - **Templates**: > - TypeScript: Import `View` alongside `MaterializedView` in `templates/typescript/app/views/barAggregated.ts`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 15579076b6d216179a1fd40c31585903d96f0673. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
v0.6.133
test non declared type in TS (#2865) the test should be failing before merging main <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces a Drizzle ORM–inferred type/table `NonDeclaredType` in the TS test template, exports it, updates e2e expected schemas, and adds the `drizzle-orm` dependency. > > - **TypeScript test template**: > - Add `ingest/drizzleInfer.ts` defining Drizzle `KafkaCredentials` and inferred type/table `NonDeclaredType` via `OlapTable` (MergeTree, order by `id`). > - Export `./ingest/drizzleInfer` from `app/index.ts`. > - **E2E Schemas**: > - Extend `TYPESCRIPT_TEST_SCHEMAS` with table `NonDeclaredType` (`id String`, `yes Bool`). > - **Dependencies**: > - Add `drizzle-orm` to `templates/typescript-tests/package.json`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 8c3bde8e272babaea1d787f16ae2fb25c6d66565. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
v0.6.132
handle TS types that do not have a declaration (#2864) <!-- CURSOR_SUMMARY --> > [!NOTE] > Make `toColumns` robust when TS properties lack declarations by falling back to `checker.getTypeOfSymbol` and guarding wrapper/default detection with optional chaining. > > - **packages/ts-moose-lib/src/dataModels/typeConvert.ts**: > - **`toColumns`**: > - Handle properties with no declarations by falling back to `checker.getTypeOfSymbol(prop)`. > - Use optional chaining on `node?.type` for `Key`/`JWT` wrapping and default handling. > - Pass `node?.type` to `tsTypeToDataType` to avoid crashes when declarations are absent. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit cfccacca69e6cc5486d5d3873582f9ede0ffcc77. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Copilot <[email protected]>
v0.6.131
add simpleaggregatefunction (#2860) <!-- CURSOR_SUMMARY --> > [!NOTE] > Adds full-stack support for ClickHouse SimpleAggregateFunction with parsing, mapping, SQL generation, codegen, library helpers, docs, tests, and example templates. > > - **OLAP/ClickHouse Core**: > - Add `SimpleAggregateFunction` to `ClickHouseColumnType`, parser, mapper, and SQL generator (stringify + tests). > - Extract `SimpleAggregateFunction` from DB types into column annotations during `list_tables`. > - Update alt client and type parser handling accordingly. > - **Code Generation**: > - TypeScript: detect `simpleAggregationFunction` annotation; import `SimpleAggregated`; emit intersection type `SimpleAggregated<fn, T>`. > - Python: detect `simpleAggregationFunction`; import/use `simple_aggregated('fn', T)`. > - **Libraries**: > - TS: expose `SimpleAggregated` helper; extend type conversion to emit `simpleAggregationFunction`. > - Python: add `simple_aggregated()` helper and `SimpleAggregateFunction` metadata; include in column annotations. > - Add comprehensive tests in both TS and Python for conversions and helpers. > - **Docs**: > - Document `SimpleAggregateFunction` usage for TS/Python with examples. > - **Templates & E2E**: > - Add `SimpleAggTest` tables/models to TS/Python templates and expected schemas. > - **Misc**: > - Tweak CLI prompt message formatting. > - Preserve additional fields in `TypescriptProject` (`package.json`) via serde flatten. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 24ad2c86f7202e5db748201cd1d8b1a7b0d97c65. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->