# @chkit/plugin-pull ## 0.2.0-beta.16 ### Patch Changes - Updated dependencies: `@chkit/core@0.2.0-beta.16`, `@chkit/clickhouse@0.2.0-beta.16` ## 0.2.0-beta.15 ### Patch Changes - acc8f8c: Column codecs follow ClickHouse's rules and stored forms, and `generate` reports codecs ClickHouse would reject instead of failing the migration partway (#465). After upgrading, `generate` plans a codec change for every `Delta` or `Gorilla` column written without `size`, which chkit used to render as `Delta(1)` or `Gorilla(1)`. - Updated dependencies: `@chkit/core@0.2.0-beta.15`, `@chkit/clickhouse@0.2.0-beta.15` ## 0.2.0-beta.14 ### Patch Changes - Updated dependencies: `@chkit/core@0.2.0-beta.14`, `@chkit/clickhouse@0.2.0-beta.14` ## 0.2.0-beta.13 ### Patch Changes - c523ef2: Comments work end to end (#464). Comments escape backslashes, so ClickHouse stores the exact text (a trailing `\` no longer breaks the statement), and an empty comment is the same as none. A table comment change plans `ALTER TABLE ... MODIFY COMMENT`; a view, materialized view or dictionary comment change is the same `MODIFY COMMENT` instead of a drop and recreate (or `CREATE OR REPLACE DICTIONARY`). A column comment change alone is `COMMENT COLUMN`, and a removed column comment runs `MODIFY COLUMN ... REMOVE COMMENT`, so it no longer stays on the server. `drift` reports a changed table, view, materialized view or dictionary comment as `comment_mismatch`, with both values. `pull` writes the comments of tables, views and materialized views, reads every comment from `system.tables.comment` (decoded by ClickHouse), finds the `AS` and `TO` of a view outside its `COMMENT`, and skips a materialized view with an inner table, and that table, with a warning. The same comments reach `drift` and `pull` when they run through the ObsessionDB console API. - 81dffea: `pull` then `generate` plans nothing, and `drift` reports nothing, on a database chkit migrated (#466). - `pull` keeps every setting the server stores, including `index_granularity`, with a comment on the ones that cannot be altered on an existing table, and leaves out chkit's migration journal (`_chkit_migrations` or `CHKIT_JOURNAL_TABLE`) and the hidden `auto_minmax_index_*` skip indexes ClickHouse creates for the `add_minmax_index_for_*` settings. - A MergeTree table without `index_granularity` is treated as having the server's default, the value ClickHouse stores, so new `CREATE TABLE` statements write `SETTINGS index_granularity = 8192`. Existing projects plan nothing for it. A server with another `` sets it in the new `clickhouse.indexGranularity` config value (default 8192). `drift`, `check`, `migrate` and `pull` stop when the server's default differs from it, with a message that names the value to set. - Setting values compare by value (`4096` and `"4096"`, `2.0` and `2.`, `true` and `1`), exactly, so a change between two large integers is not lost. A literal column default compares by value with the expression pull reads back (`7` and `{ expression: '7' }`, `"it's"` and `'it\'s'`, `1e21` and `1e+21`, newlines and tabs as ClickHouse escapes them), in `generate` and in `drift`. A string escape chkit does not know for certain (`\N`, `\u0041`) compares as text. - A column type compares in the spacing ClickHouse stores (`Decimal(10,2)` and `Decimal(10, 2)`) in `generate` and `drift`; text in quotes compares as written. Skip indexes, projections, constraints and columns compare whatever order their keys are written in. - A change to a setting ClickHouse cannot alter on an existing table (`index_granularity`, `index_granularity_bytes`, the `add_minmax_index_for_*` settings and others) plans `DROP TABLE` and `CREATE TABLE`, like an `ORDER BY` change, instead of an `ALTER` the server rejects. `--cutover` supports such a change: its swap guards now also tell the old table from the new one by these settings, and its first statement checks that the table stores the read-only settings the migration expects before anything is created or copied. - On an ObsessionDB host, the ObsessionDB plugin treats a table without `storage_policy` as `storage_policy: "'s3'"`, the policy ObsessionDB writes into every `Shared` table, in the schema and the snapshot, and `generate` rejects a schema that changes it. A new `onSnapshotLoaded` plugin hook applies a plugin's schema rewrite to the previous snapshot, so a snapshot written before the rewrite plans no change, and dropping `--force-shared-engines` no longer plans a `RESET SETTING storage_policy`. - A dictionary `lifetime` compares in the form ClickHouse stores (`300` and `MIN 0 MAX 300`), and dictionaries compare whatever order their keys are written in. - Updated dependencies: `@chkit/core@0.2.0-beta.13`, `@chkit/clickhouse@0.2.0-beta.13` ## 0.2.0-beta.12 ### Patch Changes - Updated dependencies: `@chkit/core@0.2.0-beta.12`, `@chkit/clickhouse@0.2.0-beta.12` ## 0.2.0-beta.11 ### Patch Changes - 889969d: Make init and built-in command help nonmutating and independent of project configuration, accept global options before the command, typecheck plugin registration and omitted input primary keys, and retain effective primary keys when introspecting tables with implicit keys. Scaffold offline generation without an invented connection target; require explicit credentials for a direct connection. Avoid unsupported replica synchronization queries for a known non-replicated migration journal. Use `--help-plugins` to load configured plugin help without initialization hooks. Preserve an explicitly configured connection target and cluster during offline generation and snapshot rebuilding. Add a TypeScript-first README, explicit credential handling for agents, a complete existing-database adoption walkthrough, and a validated data-preserving structural migration/rollback recipe. Align backfill documentation with the current partition/sort-key planner. - Updated dependencies [889969d] - @chkit/core@0.2.0-beta.11 - @chkit/clickhouse@0.2.0-beta.11 ## 0.2.0-beta.10 ### Patch Changes - cb56b91: Fix `chkit pull` leaving a key tuple wrapped (`orderBy: ["(\`w)x\`, id)"]`instead of`["\`w)x\`", "id"]`) when a key column has a quoted name containing a parenthesis. The pull plugin had its own paren-stripper that ignored quotes; it now uses the shared `stripWrappingParens`from`@chkit/core`. The quote-aware SQL scanners (`splitTopLevelComma`, `stripWrappingParens`, the projection index normalizer, `findTopLevelSQLPattern`, and the create-table column-list finder) now share a single quote skipper, `findQuoteEnd`, so backslash escapes and doubled quotes are handled identically everywhere (#197). Previously `stripWrappingParens` and the projection index normalizer mis-read a string ending in an escaped backslash (`'a\\'`). - 5ddb1d2: `chkit pull` no longer emits ObsessionDB product-metadata tables (`metadata_folder`, `metadata_table_folder`, `metadata_table_tag`) into generated schema files. These are ObsessionDB internals provisioned inside customer databases, not part of the user's schema — emitting them polluted the schema and caused drift against tables the user does not own. They are now excluded before rendering and are not counted as skipped/unsupported objects. - Updated dependencies [cb56b91] - Updated dependencies [76a0579] - Updated dependencies [3c546e8] - @chkit/clickhouse@0.2.0-beta.10 - @chkit/core@0.2.0-beta.10 ## 0.2.0-beta.9 ### Patch Changes - d072fe3: Add a typed form for SQL expression column defaults (#234): `default: { expression: 'now64(3)' }` renders `DEFAULT now64(3)`, and it works with every `defaultKind`: `{ defaultKind: 'MATERIALIZED', default: { expression: 'toDate(ts)' } }` renders `MATERIALIZED toDate(ts)`. Plain strings stay quoted literals (`default: 'pending'` renders `DEFAULT 'pending'`), and the `fn:` prefix keeps working as the legacy spelling of an expression. `snapshot.json` stores both forms as the `fn:` string, trimmed (`fn:now64(3)`), so switching between `{ expression }`, `'fn:now64(3)'` and `'fn: now64(3)'` generates no migration and snapshots stay readable by chkit-py. SQL comments in an expression default are dropped when it is rendered, so a `--` comment no longer swallows the `,`, `COMMENT`, `CODEC` or `;` after it, and `drift` and `check` now ignore every kind of comment in it, including `#`, `//` and nested `/* */` comments. `chkit generate` now rejects a plain string `DEFAULT` or `EPHEMERAL` default that starts with a function call on a column that cannot hold a string. For example, `default: 'now64(3)'` on a `DateTime64(3, 'UTC')` column used to generate `DEFAULT 'now64(3)'` and fail at `chkit migrate` with "default expression and column type are incompatible"; on a `Nullable` number, date, time, UUID or IP address column ClickHouse accepted it and silently stored `NULL`. The new `column_default_looks_like_expression` error names the column and the fix. Columns that hold text (`String` and its aliases, `FixedString`, `Enum`, `LowCardinality(String)`, `Dynamic`, a `Variant` with a string member) are unaffected. `column_expression_required` now also reports an `{ expression }` with no SQL or only comments, and `column_default_invalid` reports a default object without a string `expression`, an expression that keeps the `fn:` prefix, one with an unterminated string, quoted identifier, or block comment that would swallow the rest of the migration, and one with a `#` that starts no comment, which ClickHouse rejects and which at the end of an expression used to comment out the column's `COMMENT` and `CODEC` without an error. The troubleshooting guide shows how to recover a migration that already failed this way. `chkit pull` now writes introspected defaults as `{ expression: "..." }` next to their `defaultKind`, instead of `"fn:..."`; the pulled definitions are unchanged. Upgrade `chkit` together with `@chkit/plugin-pull`: chkit 0.2.0-beta.8 and older render the object form as `DEFAULT [object Object]`. `chkit init` scaffolds the typed form, `ColumnDefinition.default` documents both forms in its type, `renderDefault()` accepts `{ expression }`, and `@chkit/core` exports `parseColumnDefault()` for plugins that read defaults. - 2f53550: Support `MATERIALIZED`, `ALIAS`, and `EPHEMERAL` columns with a new `defaultKind` column field. `default` holds the value or `fn:` expression for every kind, and `EPHEMERAL` may omit it. SQL rendering, `pull`, snapshots, and drift keep the kind; validation reports `column_expression_required` and `column_default_kind_invalid`. - `DEFAULT`/`MATERIALIZED` expression changes emit `MODIFY COLUMN` with a warning that stored values are not rewritten, and removed expressions emit `REMOVE DEFAULT`/`REMOVE MATERIALIZED`. Conversions to or from `ALIAS`/`EPHEMERAL` fail `generate` with `column_kind_change_unsupported`. - Codegen emits `Row` (`SELECT *`), `RowExplicit` (all readable columns), and `RowInsert` (all insertable columns) for these tables; ingest helpers take `RowInsert`. - Inserts into tables with `EPHEMERAL` columns name their columns: generated ingest helpers pass `columns`, which `@chkit/clickhouse` `insert()` and the ObsessionDB remote executor send, and the `@chkit/plugin-ingest` destination does the same. - Automatic backfills omit `MATERIALIZED` and `ALIAS` columns and check live column kinds first: a copy is blocked only when the target has both `EPHEMERAL` and `MATERIALIZED` columns, `mv_replay` by any `EPHEMERAL` column, and a missing target fails with "does not exist or is not visible yet". - `drift` and `check` compare defaults token by token. Write expressions in the canonical form ClickHouse stores, such as `CAST(x, 'String')`, to avoid drift. - Fix string defaults containing backslashes: `C:\temp` now renders as `DEFAULT 'C:\\temp'`. - Updated dependencies [d072fe3] - Updated dependencies [2f53550] - Updated dependencies [98e3667] - Updated dependencies [96a18c6] - Updated dependencies [46cbf88] - Updated dependencies [46cbf88] - Updated dependencies [b59fc83] - Updated dependencies [c49f0a9] - Updated dependencies [672d67e] - @chkit/core@0.2.0-beta.9 - @chkit/clickhouse@0.2.0-beta.9 ## 0.2.0-beta.8 ### Minor Changes - fedbf56: Support Kafka engine tables without MergeTree key clauses, with escaped literal settings, pull round trips, and normalized drift/check comparisons. Preserve the existing setting-string contract for other engines. Reject unsupported Kafka changes before writing migration artifacts and document an explicit, destructive- gated replacement workflow. Handle quoted delimiters and escaped trailing backslashes in introspection and migration statement splitting. - 256ec62: Support ClickHouse `text` indexes in schemas, migrations, pull, and drift. Text indexes require a tokenizer and support preprocessing, postprocessing, phrase search, and dictionary/posting-list options when supported by the server. Granularity is automatic. Preserve whitespace and escapes inside SQL literals, compare parameter order and SQL formatting consistently, and reject unsupported or malformed metadata instead of silently losing settings. Includes Python parity and live adversarial round-trip tests on ClickHouse 26.3 and 26.8. ### Patch Changes - 65c90d6: Add `dictionary()` as a first-class ClickHouse schema primitive, mirroring `materializedView()` across the full lifecycle: DSL authoring, validation, canonicalization, SQL rendering, migration planning/diff, drift, `check`, destructive-op safety, `pull` introspection, and `codegen` typed interfaces. - `dictionary({ database, name, attributes, primaryKey, source, layout, lifetime, range?, settings?, comment? })` — attributes support `default`/`expression` (mutually exclusive), `hierarchical`, `bidirectional` (requires `hierarchical`), `injective`, and `isObjectId`. `range: { min, max }` renders `RANGE(MIN ... MAX ...)` for `RANGE_HASHED`/`COMPLEX_KEY_RANGE_HASHED` layouts, and `settings` renders `SETTINGS(...)`. - ClickHouse has no `ALTER DICTIONARY`, so any structural change plans a single atomic `CREATE OR REPLACE DICTIONARY`. Dropping a dictionary is treated as destructive and blocked without `--allow-destructive`. - Set `renamedFrom` on a dictionary (or pass `--rename-dictionary old_db.old=new_db.new` to `chkit generate`) to rename a dictionary via `RENAME DICTIONARY IF EXISTS ... TO ...` instead of a destructive drop + create. - `chkit pull` introspects live dictionaries (including `RANGE`/`SETTINGS` and all attribute modifiers) into typed schema files, preserving ClickHouse's `[HIDDEN]` password redaction on `SOURCE(...)` credentials. A `SOURCE(...)` password change diffs and migrates like any other field change; `chkit generate` warns when a literal password is about to be written into migration SQL as plain text. `chkit pull` warns in two cases: when an introspected password comes back as `[HIDDEN]` (chkit can't recover the real value, so that dictionary's `source` is excluded from future diffs until it's replaced), and when ClickHouse is configured to reveal real passwords on introspection (`display_secrets_in_show_and_select` + `displaySecretsInShowAndSelect`), since that writes a plain-text credential into the generated schema file with no other indication. All warnings print to the console and are included as a `warnings` array in `--json` output. - `codegen` generates a typed interface (and optional Zod schema) for each dictionary from its `attributes`, always included regardless of `includeViews`. - `ON CLUSTER` mode stamps `ON CLUSTER ` onto every dictionary DDL statement, including `CREATE OR REPLACE DICTIONARY` and `RENAME DICTIONARY`. - 3f1db03: Support index-only projections (`PROJECTION p INDEX (a, b) TYPE basic`) end to end. `ProjectionDefinition` is now a union of the existing `{ name, query }` SELECT form and a new `{ name, index, type }` index-only form, which renders without the wrapping parens that made the SELECT form invalid for it. `chkit pull` previously parsed only the SELECT form and dropped index-only projections on the floor, so a pulled schema silently recreated the table without them; they now round-trip through pull, generate, migrate, and drift. Index expressions are normalized to the exact form ClickHouse stores — a single expression bare (`INDEX a`), several as a tuple (`INDEX (a, b)`), redundant parens peeled at every level, and a space after each argument separator — so `'(a)'` and `'a'`, or `'concat(x,y)'` and `'concat(x, y)'`, describe the same table and no longer read as drift. Two new validation errors guard the new form: `projection_ambiguous_kind` when an entry sets both `query` and `index` (which would otherwise silently discard the SELECT body), and `projection_empty_index` when the index expression is empty (which would otherwise emit invalid DDL). - 8296b8a: Fix two related pull/drift bugs around tables whose `ORDER BY` is declared alongside a projection or a derived primary key. `chkit pull` parsed table-level clauses (`ENGINE`, `ORDER BY`, `PRIMARY KEY`, `PARTITION BY`, `TTL`, `SETTINGS`) by matching the first keyword anywhere in `SHOW CREATE TABLE`. A projection whose `SELECT` body contains `ORDER BY` — or a column-level `TTL` — sits in the column list before those clauses, so the parser matched the inner keyword and swallowed the engine into `orderBy`/`primaryKey`, producing an invalid pulled schema (#190). Table-level clauses are now parsed only from the portion after the column list. `chkit drift` always reported `primary_key_mismatch` for any table whose `PRIMARY KEY` is derived from `ORDER BY`. ClickHouse omits the derived key from `SHOW CREATE TABLE`, but the schema carries it, so the two never matched. Drift now applies the same derivation to the live side, so a derived primary key reads clean while a genuine primary-key difference is still reported (#194). - 4ded781: Route `chkit pull` introspection through the host-provided executor instead of always opening its own ClickHouse connection. When an ObsessionDB service is selected, pull now introspects through the ObsessionDB API (the same executor `generate`/`migrate`/`status` use) rather than silently falling back to `http://localhost:8123` and failing with "connection refused" while printing `using service `. A direct ClickHouse target is unchanged, custom introspectors still open their own raw connection, and a run with no reachable target now errors with an actionable message instead of a misleading localhost fallback. - b501f5d: Extract shared plugin command scaffolding into `@chkit/core`: new `createPluginRunner` (binds a plugin's config-error class once and wraps command `run` handlers in the shared error-to-exit-code envelope) and `withFactoryDefaults` (layers plugin-factory options under parsed data). The backfill, codegen, and pull plugins now use these helpers instead of private copies — no behavior change, but the plugins require the matching `@chkit/core` version. - Updated dependencies [65c90d6] - Updated dependencies [75d15e9] - Updated dependencies [3f1db03] - Updated dependencies [f8238db] - Updated dependencies [fedbf56] - Updated dependencies [5a8d805] - Updated dependencies [8296b8a] - Updated dependencies [b501f5d] - Updated dependencies [256ec62] - @chkit/core@0.2.0-beta.8 - @chkit/clickhouse@0.2.0-beta.8 ## 0.1.2-beta.7 ### Patch Changes - 65c90d6: Add `dictionary()` as a first-class ClickHouse schema primitive, mirroring `materializedView()` across the full lifecycle: DSL authoring, validation, canonicalization, SQL rendering, migration planning/diff, drift, `check`, destructive-op safety, `pull` introspection, and `codegen` typed interfaces. - `dictionary({ database, name, attributes, primaryKey, source, layout, lifetime, range?, settings?, comment? })` — attributes support `default`/`expression` (mutually exclusive), `hierarchical`, `bidirectional` (requires `hierarchical`), `injective`, and `isObjectId`. `range: { min, max }` renders `RANGE(MIN ... MAX ...)` for `RANGE_HASHED`/`COMPLEX_KEY_RANGE_HASHED` layouts, and `settings` renders `SETTINGS(...)`. - ClickHouse has no `ALTER DICTIONARY`, so any structural change plans a single atomic `CREATE OR REPLACE DICTIONARY`. Dropping a dictionary is treated as destructive and blocked without `--allow-destructive`. - Set `renamedFrom` on a dictionary (or pass `--rename-dictionary old_db.old=new_db.new` to `chkit generate`) to rename a dictionary via `RENAME DICTIONARY IF EXISTS ... TO ...` instead of a destructive drop + create. - `chkit pull` introspects live dictionaries (including `RANGE`/`SETTINGS` and all attribute modifiers) into typed schema files, preserving ClickHouse's `[HIDDEN]` password redaction on `SOURCE(...)` credentials. A `SOURCE(...)` password change diffs and migrates like any other field change; `chkit generate` warns when a literal password is about to be written into migration SQL as plain text. `chkit pull` warns in two cases: when an introspected password comes back as `[HIDDEN]` (chkit can't recover the real value, so that dictionary's `source` is excluded from future diffs until it's replaced), and when ClickHouse is configured to reveal real passwords on introspection (`display_secrets_in_show_and_select` + `displaySecretsInShowAndSelect`), since that writes a plain-text credential into the generated schema file with no other indication. All warnings print to the console and are included as a `warnings` array in `--json` output. - `codegen` generates a typed interface (and optional Zod schema) for each dictionary from its `attributes`, always included regardless of `includeViews`. - `ON CLUSTER` mode stamps `ON CLUSTER ` onto every dictionary DDL statement, including `CREATE OR REPLACE DICTIONARY` and `RENAME DICTIONARY`. - 3f1db03: Support index-only projections (`PROJECTION p INDEX (a, b) TYPE basic`) end to end. `ProjectionDefinition` is now a union of the existing `{ name, query }` SELECT form and a new `{ name, index, type }` index-only form, which renders without the wrapping parens that made the SELECT form invalid for it. `chkit pull` previously parsed only the SELECT form and dropped index-only projections on the floor, so a pulled schema silently recreated the table without them; they now round-trip through pull, generate, migrate, and drift. Index expressions are normalized to the exact form ClickHouse stores — a single expression bare (`INDEX a`), several as a tuple (`INDEX (a, b)`), redundant parens peeled at every level, and a space after each argument separator — so `'(a)'` and `'a'`, or `'concat(x,y)'` and `'concat(x, y)'`, describe the same table and no longer read as drift. Two new validation errors guard the new form: `projection_ambiguous_kind` when an entry sets both `query` and `index` (which would otherwise silently discard the SELECT body), and `projection_empty_index` when the index expression is empty (which would otherwise emit invalid DDL). - 8296b8a: Fix two related pull/drift bugs around tables whose `ORDER BY` is declared alongside a projection or a derived primary key. `chkit pull` parsed table-level clauses (`ENGINE`, `ORDER BY`, `PRIMARY KEY`, `PARTITION BY`, `TTL`, `SETTINGS`) by matching the first keyword anywhere in `SHOW CREATE TABLE`. A projection whose `SELECT` body contains `ORDER BY` — or a column-level `TTL` — sits in the column list before those clauses, so the parser matched the inner keyword and swallowed the engine into `orderBy`/`primaryKey`, producing an invalid pulled schema (#190). Table-level clauses are now parsed only from the portion after the column list. `chkit drift` always reported `primary_key_mismatch` for any table whose `PRIMARY KEY` is derived from `ORDER BY`. ClickHouse omits the derived key from `SHOW CREATE TABLE`, but the schema carries it, so the two never matched. Drift now applies the same derivation to the live side, so a derived primary key reads clean while a genuine primary-key difference is still reported (#194). - b501f5d: Extract shared plugin command scaffolding into `@chkit/core`: new `createPluginRunner` (binds a plugin's config-error class once and wraps command `run` handlers in the shared error-to-exit-code envelope) and `withFactoryDefaults` (layers plugin-factory options under parsed data). The backfill, codegen, and pull plugins now use these helpers instead of private copies — no behavior change, but the plugins require the matching `@chkit/core` version. - Updated dependencies [65c90d6] - Updated dependencies [3f1db03] - Updated dependencies [5a8d805] - Updated dependencies [8296b8a] - Updated dependencies [b501f5d] - @chkit/core@0.1.2-beta.7 - @chkit/clickhouse@0.1.2-beta.7 ## 0.1.2-beta.6 ### Patch Changes - 65c90d6: Add `dictionary()` as a first-class ClickHouse schema primitive, mirroring `materializedView()` across the full lifecycle: DSL authoring, validation, canonicalization, SQL rendering, migration planning/diff, drift, `check`, destructive-op safety, `pull` introspection, and `codegen` typed interfaces. - `dictionary({ database, name, attributes, primaryKey, source, layout, lifetime, range?, settings?, comment? })` — attributes support `default`/`expression` (mutually exclusive), `hierarchical`, `bidirectional` (requires `hierarchical`), `injective`, and `isObjectId`. `range: { min, max }` renders `RANGE(MIN ... MAX ...)` for `RANGE_HASHED`/`COMPLEX_KEY_RANGE_HASHED` layouts, and `settings` renders `SETTINGS(...)`. - ClickHouse has no `ALTER DICTIONARY`, so any structural change plans a single atomic `CREATE OR REPLACE DICTIONARY`. Dropping a dictionary is treated as destructive and blocked without `--allow-destructive`. - Set `renamedFrom` on a dictionary (or pass `--rename-dictionary old_db.old=new_db.new` to `chkit generate`) to rename a dictionary via `RENAME DICTIONARY IF EXISTS ... TO ...` instead of a destructive drop + create. - `chkit pull` introspects live dictionaries (including `RANGE`/`SETTINGS` and all attribute modifiers) into typed schema files, preserving ClickHouse's `[HIDDEN]` password redaction on `SOURCE(...)` credentials. A `SOURCE(...)` password change diffs and migrates like any other field change; `chkit generate` warns when a literal password is about to be written into migration SQL as plain text. `chkit pull` warns in two cases: when an introspected password comes back as `[HIDDEN]` (chkit can't recover the real value, so that dictionary's `source` is excluded from future diffs until it's replaced), and when ClickHouse is configured to reveal real passwords on introspection (`display_secrets_in_show_and_select` + `displaySecretsInShowAndSelect`), since that writes a plain-text credential into the generated schema file with no other indication. All warnings print to the console and are included as a `warnings` array in `--json` output. - `codegen` generates a typed interface (and optional Zod schema) for each dictionary from its `attributes`, always included regardless of `includeViews`. - `ON CLUSTER` mode stamps `ON CLUSTER ` onto every dictionary DDL statement, including `CREATE OR REPLACE DICTIONARY` and `RENAME DICTIONARY`. - 3f1db03: Support index-only projections (`PROJECTION p INDEX (a, b) TYPE basic`) end to end. `ProjectionDefinition` is now a union of the existing `{ name, query }` SELECT form and a new `{ name, index, type }` index-only form, which renders without the wrapping parens that made the SELECT form invalid for it. `chkit pull` previously parsed only the SELECT form and dropped index-only projections on the floor, so a pulled schema silently recreated the table without them; they now round-trip through pull, generate, migrate, and drift. Index expressions are normalized to the exact form ClickHouse stores — a single expression bare (`INDEX a`), several as a tuple (`INDEX (a, b)`), redundant parens peeled at every level, and a space after each argument separator — so `'(a)'` and `'a'`, or `'concat(x,y)'` and `'concat(x, y)'`, describe the same table and no longer read as drift. Two new validation errors guard the new form: `projection_ambiguous_kind` when an entry sets both `query` and `index` (which would otherwise silently discard the SELECT body), and `projection_empty_index` when the index expression is empty (which would otherwise emit invalid DDL). - 8296b8a: Fix two related pull/drift bugs around tables whose `ORDER BY` is declared alongside a projection or a derived primary key. `chkit pull` parsed table-level clauses (`ENGINE`, `ORDER BY`, `PRIMARY KEY`, `PARTITION BY`, `TTL`, `SETTINGS`) by matching the first keyword anywhere in `SHOW CREATE TABLE`. A projection whose `SELECT` body contains `ORDER BY` — or a column-level `TTL` — sits in the column list before those clauses, so the parser matched the inner keyword and swallowed the engine into `orderBy`/`primaryKey`, producing an invalid pulled schema (#190). Table-level clauses are now parsed only from the portion after the column list. `chkit drift` always reported `primary_key_mismatch` for any table whose `PRIMARY KEY` is derived from `ORDER BY`. ClickHouse omits the derived key from `SHOW CREATE TABLE`, but the schema carries it, so the two never matched. Drift now applies the same derivation to the live side, so a derived primary key reads clean while a genuine primary-key difference is still reported (#194). - b501f5d: Extract shared plugin command scaffolding into `@chkit/core`: new `createPluginRunner` (binds a plugin's config-error class once and wraps command `run` handlers in the shared error-to-exit-code envelope) and `withFactoryDefaults` (layers plugin-factory options under parsed data). The backfill, codegen, and pull plugins now use these helpers instead of private copies — no behavior change, but the plugins require the matching `@chkit/core` version. - Updated dependencies [65c90d6] - Updated dependencies [3f1db03] - Updated dependencies [5a8d805] - Updated dependencies [8296b8a] - Updated dependencies [b501f5d] - @chkit/core@0.1.2-beta.6 - @chkit/clickhouse@0.1.2-beta.6 ## 0.1.2-beta.5 ### Patch Changes - 3f1db03: Support index-only projections (`PROJECTION p INDEX (a, b) TYPE basic`) end to end. `ProjectionDefinition` is now a union of the existing `{ name, query }` SELECT form and a new `{ name, index, type }` index-only form, which renders without the wrapping parens that made the SELECT form invalid for it. `chkit pull` previously parsed only the SELECT form and dropped index-only projections on the floor, so a pulled schema silently recreated the table without them; they now round-trip through pull, generate, migrate, and drift. Index expressions are normalized to the exact form ClickHouse stores — a single expression bare (`INDEX a`), several as a tuple (`INDEX (a, b)`), redundant parens peeled at every level, and a space after each argument separator — so `'(a)'` and `'a'`, or `'concat(x,y)'` and `'concat(x, y)'`, describe the same table and no longer read as drift. Two new validation errors guard the new form: `projection_ambiguous_kind` when an entry sets both `query` and `index` (which would otherwise silently discard the SELECT body), and `projection_empty_index` when the index expression is empty (which would otherwise emit invalid DDL). - b501f5d: Extract shared plugin command scaffolding into `@chkit/core`: new `createPluginRunner` (binds a plugin's config-error class once and wraps command `run` handlers in the shared error-to-exit-code envelope) and `withFactoryDefaults` (layers plugin-factory options under parsed data). The backfill, codegen, and pull plugins now use these helpers instead of private copies — no behavior change, but the plugins require the matching `@chkit/core` version. - Updated dependencies [3f1db03] - Updated dependencies [5a8d805] - Updated dependencies [b501f5d] - @chkit/clickhouse@0.1.2-beta.5 - @chkit/core@0.1.2-beta.5 ## 0.1.2-beta.4 ### Patch Changes - b501f5d: Extract shared plugin command scaffolding into `@chkit/core`: new `createPluginRunner` (binds a plugin's config-error class once and wraps command `run` handlers in the shared error-to-exit-code envelope) and `withFactoryDefaults` (layers plugin-factory options under parsed data). The backfill, codegen, and pull plugins now use these helpers instead of private copies — no behavior change, but the plugins require the matching `@chkit/core` version. - Updated dependencies [5a8d805] - Updated dependencies [b501f5d] - @chkit/core@0.1.2-beta.4 - @chkit/clickhouse@0.1.2-beta.4 ## 0.1.2-beta.2 ### Patch Changes - b501f5d: Extract shared plugin command scaffolding into `@chkit/core`: new `createPluginRunner` (binds a plugin's config-error class once and wraps command `run` handlers in the shared error-to-exit-code envelope) and `withFactoryDefaults` (layers plugin-factory options under parsed data). The backfill, codegen, and pull plugins now use these helpers instead of private copies — no behavior change, but the plugins require the matching `@chkit/core` version. - Updated dependencies [5a8d805] - Updated dependencies [b501f5d] - @chkit/core@0.1.2-beta.2 - @chkit/clickhouse@0.1.2-beta.2 ## 0.1.2-beta.1 ### Patch Changes - b501f5d: Extract shared plugin command scaffolding into `@chkit/core`: new `createPluginRunner` (binds a plugin's config-error class once and wraps command `run` handlers in the shared error-to-exit-code envelope) and `withFactoryDefaults` (layers plugin-factory options under parsed data). The backfill, codegen, and pull plugins now use these helpers instead of private copies — no behavior change, but the plugins require the matching `@chkit/core` version. - Updated dependencies [5a8d805] - Updated dependencies [b501f5d] - @chkit/core@0.1.2-beta.1 - @chkit/clickhouse@0.1.2-beta.1 ## 0.1.2-beta.0 ### Patch Changes - b501f5d: Extract shared plugin command scaffolding into `@chkit/core`: new `createPluginRunner` (binds a plugin's config-error class once and wraps command `run` handlers in the shared error-to-exit-code envelope) and `withFactoryDefaults` (layers plugin-factory options under parsed data). The backfill, codegen, and pull plugins now use these helpers instead of private copies — no behavior change, but the plugins require the matching `@chkit/core` version. - Updated dependencies [5a8d805] - Updated dependencies [b501f5d] - @chkit/core@0.1.2-beta.0 - @chkit/clickhouse@0.1.2-beta.0 ## 0.1.1 ### Patch Changes - Updated dependencies [6b87e6d] - @chkit/core@0.1.1 - @chkit/clickhouse@0.1.1 ## 0.1.0 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - b0f200d: Add support for per-column compression codecs. Declare a codec directly on a column with a structured discriminated union: ```ts import { codec, table } from "@chkit/core"; const events = table({ database: "analytics", name: "events", columns: [ { name: "id", type: "UInt64" }, { name: "ts", type: "DateTime", codec: { kind: "ZSTD", level: 3 } }, { name: "delta", type: "Int64", codec: [{ kind: "Delta", size: 4 }, { kind: "ZSTD" }], }, { name: "exp", type: "Float32", codec: codec.raw("SomeNewCodec(42)") }, ], engine: "MergeTree()", primaryKey: ["id"], orderBy: ["id"], }); ``` Highlights: - `CREATE TABLE` and `ALTER TABLE ADD/MODIFY COLUMN` emit the `CODEC(...)` clause in the correct position (after `DEFAULT` and `COMMENT`, as required by ClickHouse). - `chkit generate` emits `MODIFY COLUMN ... REMOVE CODEC` when a codec is dropped and no other column fields change; otherwise a single `MODIFY COLUMN` replaces the codec. - `chkit pull` introspects `system.columns.compression_codec` and renders structured codec objects back into the schema file. Unknown codec tokens fall back to `codec.raw(...)` so new ClickHouse codecs still round-trip. - Canonicalization fills ClickHouse defaults (`ZSTD` → level 1, `LZ4HC` → level 9, `Delta`/`DoubleDelta`/`Gorilla` → size 1), so `{kind:'ZSTD'}` and `{kind:'ZSTD', level:1}` compare equal and the diff engine stays stable across pull → plan round-trips. - Validation catches codec chains with more than one general codec, chains that do not end with a general codec, or an empty chain (`codec: []`) — preprocessor alone is accepted since ClickHouse auto-appends the default general codec. - `parseCodec` falls back to `raw` when a known codec token has unexpected extra args (e.g. `ZSTD(3, 1)`), so future ClickHouse codec extensions round-trip cleanly through `chkit pull` instead of silently dropping arguments. - bb62cd0: Route `chkit pull` introspection through the host-provided executor instead of always opening its own ClickHouse connection. When an ObsessionDB service is selected, pull now introspects through the ObsessionDB API (the same executor `generate`/`migrate`/`status` use) rather than silently falling back to `http://localhost:8123` and failing with "connection refused" while printing `using service `. A direct ClickHouse target is unchanged, custom introspectors still open their own raw connection, and a run with no reachable target now errors with an actionable message instead of a misleading localhost fallback. - a77c5b2: Add support for ClickHouse refreshable materialized views (RMVs), GA since ClickHouse 24.10. Define a refreshable MV by adding a `refresh` field to `materializedView()`: ```ts const dailyReport = materializedView({ database: "analytics", name: "daily_report_mv", to: { database: "analytics", name: "daily_report" }, refresh: { every: "1 DAY", offset: "2 HOUR" }, as: "SELECT toDate(ts) AS day, count() AS total FROM analytics.events GROUP BY day", }); ``` Supported fields: `every`, `after`, `offset`, `randomize`, `dependsOn`, `settings`, `append`, `empty`. Highlights: - `chkit generate` emits `ALTER TABLE ... MODIFY REFRESH` for schedule-only changes and `DROP ... SYNC` + `CREATE` for structural changes (added/removed refresh, toggled APPEND). - `chkit pull` parses the REFRESH clause from `system.tables.create_table_query` and ignores the `DEFINER` / `SQL SECURITY` clauses that managed ClickHouse environments auto-inject. - Validation catches: missing/both `every`/`after`, invalid interval formats, non-APPEND RMV pointing at a replicated (`SharedMergeTree` / `Replicated*`) target (ClickHouse rejects this), and `DEPENDS ON` paired with `REFRESH AFTER`. See the [Refreshable materialized views docs](https://chkit.obsessiondb.com/schema/refreshable-views/) for the full reference. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - b0f200d: **Breaking:** Skip indexes now use a structured discriminated union instead of a free-form `typeArgs: string` field. Each index `type` has its own typed fields, which moves argument validation from runtime to the type system. ```ts indexes: [ // before { name: "idx_set", expression: "source", type: "set", typeArgs: "0", granularity: 1, }, // after { name: "idx_set", expression: "source", type: "set", maxRows: 0, granularity: 1, }, ]; ``` ### Migration guide | Old (`typeArgs`) | New (structured) | | ---------------------------------------------- | ----------------------------------------------------------------------------------- | | `type: 'minmax'` | `type: 'minmax'` | | `type: 'set', typeArgs: '0'` | `type: 'set', maxRows: 0` | | `type: 'set', typeArgs: '1000'` | `type: 'set', maxRows: 1000` | | `type: 'bloom_filter'` | `type: 'bloom_filter'` | | `type: 'bloom_filter', typeArgs: '0.01'` | `type: 'bloom_filter', falsePositiveRate: 0.01` | | `type: 'tokenbf_v1', typeArgs: '32768, 3, 0'` | `type: 'tokenbf_v1', sizeBytes: 32768, hashFunctions: 3, randomSeed: 0` | | `type: 'ngrambf_v1', typeArgs: '3, 256, 2, 0'` | `type: 'ngrambf_v1', ngramSize: 3, sizeBytes: 256, hashFunctions: 2, randomSeed: 0` | Highlights: - `set` now requires `maxRows` at the type level — forgetting it is a TypeScript error rather than a runtime validation failure. - `tokenbf_v1` and `ngrambf_v1` have typed `sizeBytes`, `hashFunctions`, `randomSeed` (and `ngramSize` for ngram), so positional argument mistakes are caught at compile time. - `bloom_filter` keeps `falsePositiveRate` optional — omit it to emit a bare `bloom_filter` clause. - `chkit pull` now introspects `system.data_skipping_indices.type_full` and emits the structured fields back into schema files; unknown types still round-trip via the existing path. - The `index_type_missing_args` validation code is removed since it is now a compile-time concern. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [cb09aaa] - Updated dependencies [f4e5a59] - Updated dependencies [0f5f4c6] - Updated dependencies [aecb106] - Updated dependencies [c396fb5] - Updated dependencies [ffdcdb9] - Updated dependencies [1a5caa3] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [95e6dbb] - Updated dependencies [ff1cd31] - Updated dependencies [d9d5038] - Updated dependencies [a94a2a1] - Updated dependencies [17b8a27] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [8d5878a] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [5ee4afc] - Updated dependencies [9a54433] - Updated dependencies [b0f200d] - Updated dependencies [8112b46] - Updated dependencies [a77c5b2] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [72c3fdd] - Updated dependencies [b0f200d] - Updated dependencies [50a34db] - Updated dependencies [45ff0fe] - Updated dependencies [0aa2c28] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0 - @chkit/clickhouse@0.1.0 ## 0.1.0-beta.29 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - b0f200d: Add support for per-column compression codecs. Declare a codec directly on a column with a structured discriminated union: ```ts import { codec, table } from "@chkit/core"; const events = table({ database: "analytics", name: "events", columns: [ { name: "id", type: "UInt64" }, { name: "ts", type: "DateTime", codec: { kind: "ZSTD", level: 3 } }, { name: "delta", type: "Int64", codec: [{ kind: "Delta", size: 4 }, { kind: "ZSTD" }], }, { name: "exp", type: "Float32", codec: codec.raw("SomeNewCodec(42)") }, ], engine: "MergeTree()", primaryKey: ["id"], orderBy: ["id"], }); ``` Highlights: - `CREATE TABLE` and `ALTER TABLE ADD/MODIFY COLUMN` emit the `CODEC(...)` clause in the correct position (after `DEFAULT` and `COMMENT`, as required by ClickHouse). - `chkit generate` emits `MODIFY COLUMN ... REMOVE CODEC` when a codec is dropped and no other column fields change; otherwise a single `MODIFY COLUMN` replaces the codec. - `chkit pull` introspects `system.columns.compression_codec` and renders structured codec objects back into the schema file. Unknown codec tokens fall back to `codec.raw(...)` so new ClickHouse codecs still round-trip. - Canonicalization fills ClickHouse defaults (`ZSTD` → level 1, `LZ4HC` → level 9, `Delta`/`DoubleDelta`/`Gorilla` → size 1), so `{kind:'ZSTD'}` and `{kind:'ZSTD', level:1}` compare equal and the diff engine stays stable across pull → plan round-trips. - Validation catches codec chains with more than one general codec, chains that do not end with a general codec, or an empty chain (`codec: []`) — preprocessor alone is accepted since ClickHouse auto-appends the default general codec. - `parseCodec` falls back to `raw` when a known codec token has unexpected extra args (e.g. `ZSTD(3, 1)`), so future ClickHouse codec extensions round-trip cleanly through `chkit pull` instead of silently dropping arguments. - a77c5b2: Add support for ClickHouse refreshable materialized views (RMVs), GA since ClickHouse 24.10. Define a refreshable MV by adding a `refresh` field to `materializedView()`: ```ts const dailyReport = materializedView({ database: "analytics", name: "daily_report_mv", to: { database: "analytics", name: "daily_report" }, refresh: { every: "1 DAY", offset: "2 HOUR" }, as: "SELECT toDate(ts) AS day, count() AS total FROM analytics.events GROUP BY day", }); ``` Supported fields: `every`, `after`, `offset`, `randomize`, `dependsOn`, `settings`, `append`, `empty`. Highlights: - `chkit generate` emits `ALTER TABLE ... MODIFY REFRESH` for schedule-only changes and `DROP ... SYNC` + `CREATE` for structural changes (added/removed refresh, toggled APPEND). - `chkit pull` parses the REFRESH clause from `system.tables.create_table_query` and ignores the `DEFINER` / `SQL SECURITY` clauses that managed ClickHouse environments auto-inject. - Validation catches: missing/both `every`/`after`, invalid interval formats, non-APPEND RMV pointing at a replicated (`SharedMergeTree` / `Replicated*`) target (ClickHouse rejects this), and `DEPENDS ON` paired with `REFRESH AFTER`. See the [Refreshable materialized views docs](https://chkit.obsessiondb.com/schema/refreshable-views/) for the full reference. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - b0f200d: **Breaking:** Skip indexes now use a structured discriminated union instead of a free-form `typeArgs: string` field. Each index `type` has its own typed fields, which moves argument validation from runtime to the type system. ```ts indexes: [ // before { name: "idx_set", expression: "source", type: "set", typeArgs: "0", granularity: 1, }, // after { name: "idx_set", expression: "source", type: "set", maxRows: 0, granularity: 1, }, ]; ``` ### Migration guide | Old (`typeArgs`) | New (structured) | | ---------------------------------------------- | ----------------------------------------------------------------------------------- | | `type: 'minmax'` | `type: 'minmax'` | | `type: 'set', typeArgs: '0'` | `type: 'set', maxRows: 0` | | `type: 'set', typeArgs: '1000'` | `type: 'set', maxRows: 1000` | | `type: 'bloom_filter'` | `type: 'bloom_filter'` | | `type: 'bloom_filter', typeArgs: '0.01'` | `type: 'bloom_filter', falsePositiveRate: 0.01` | | `type: 'tokenbf_v1', typeArgs: '32768, 3, 0'` | `type: 'tokenbf_v1', sizeBytes: 32768, hashFunctions: 3, randomSeed: 0` | | `type: 'ngrambf_v1', typeArgs: '3, 256, 2, 0'` | `type: 'ngrambf_v1', ngramSize: 3, sizeBytes: 256, hashFunctions: 2, randomSeed: 0` | Highlights: - `set` now requires `maxRows` at the type level — forgetting it is a TypeScript error rather than a runtime validation failure. - `tokenbf_v1` and `ngrambf_v1` have typed `sizeBytes`, `hashFunctions`, `randomSeed` (and `ngramSize` for ngram), so positional argument mistakes are caught at compile time. - `bloom_filter` keeps `falsePositiveRate` optional — omit it to emit a bare `bloom_filter` clause. - `chkit pull` now introspects `system.data_skipping_indices.type_full` and emits the structured fields back into schema files; unknown types still round-trip via the existing path. - The `index_type_missing_args` validation code is removed since it is now a compile-time concern. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [cb09aaa] - Updated dependencies [f4e5a59] - Updated dependencies [0f5f4c6] - Updated dependencies [aecb106] - Updated dependencies [c396fb5] - Updated dependencies [ffdcdb9] - Updated dependencies [1a5caa3] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [95e6dbb] - Updated dependencies [ff1cd31] - Updated dependencies [d9d5038] - Updated dependencies [a94a2a1] - Updated dependencies [17b8a27] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [8d5878a] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [5ee4afc] - Updated dependencies [9a54433] - Updated dependencies [b0f200d] - Updated dependencies [8112b46] - Updated dependencies [a77c5b2] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [72c3fdd] - Updated dependencies [b0f200d] - Updated dependencies [50a34db] - Updated dependencies [45ff0fe] - Updated dependencies [0aa2c28] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0-beta.29 - @chkit/clickhouse@0.1.0-beta.29 ## 0.1.0-beta.28 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - b0f200d: Add support for per-column compression codecs. Declare a codec directly on a column with a structured discriminated union: ```ts import { codec, table } from "@chkit/core"; const events = table({ database: "analytics", name: "events", columns: [ { name: "id", type: "UInt64" }, { name: "ts", type: "DateTime", codec: { kind: "ZSTD", level: 3 } }, { name: "delta", type: "Int64", codec: [{ kind: "Delta", size: 4 }, { kind: "ZSTD" }], }, { name: "exp", type: "Float32", codec: codec.raw("SomeNewCodec(42)") }, ], engine: "MergeTree()", primaryKey: ["id"], orderBy: ["id"], }); ``` Highlights: - `CREATE TABLE` and `ALTER TABLE ADD/MODIFY COLUMN` emit the `CODEC(...)` clause in the correct position (after `DEFAULT` and `COMMENT`, as required by ClickHouse). - `chkit generate` emits `MODIFY COLUMN ... REMOVE CODEC` when a codec is dropped and no other column fields change; otherwise a single `MODIFY COLUMN` replaces the codec. - `chkit pull` introspects `system.columns.compression_codec` and renders structured codec objects back into the schema file. Unknown codec tokens fall back to `codec.raw(...)` so new ClickHouse codecs still round-trip. - Canonicalization fills ClickHouse defaults (`ZSTD` → level 1, `LZ4HC` → level 9, `Delta`/`DoubleDelta`/`Gorilla` → size 1), so `{kind:'ZSTD'}` and `{kind:'ZSTD', level:1}` compare equal and the diff engine stays stable across pull → plan round-trips. - Validation catches codec chains with more than one general codec, chains that do not end with a general codec, or an empty chain (`codec: []`) — preprocessor alone is accepted since ClickHouse auto-appends the default general codec. - `parseCodec` falls back to `raw` when a known codec token has unexpected extra args (e.g. `ZSTD(3, 1)`), so future ClickHouse codec extensions round-trip cleanly through `chkit pull` instead of silently dropping arguments. - a77c5b2: Add support for ClickHouse refreshable materialized views (RMVs), GA since ClickHouse 24.10. Define a refreshable MV by adding a `refresh` field to `materializedView()`: ```ts const dailyReport = materializedView({ database: "analytics", name: "daily_report_mv", to: { database: "analytics", name: "daily_report" }, refresh: { every: "1 DAY", offset: "2 HOUR" }, as: "SELECT toDate(ts) AS day, count() AS total FROM analytics.events GROUP BY day", }); ``` Supported fields: `every`, `after`, `offset`, `randomize`, `dependsOn`, `settings`, `append`, `empty`. Highlights: - `chkit generate` emits `ALTER TABLE ... MODIFY REFRESH` for schedule-only changes and `DROP ... SYNC` + `CREATE` for structural changes (added/removed refresh, toggled APPEND). - `chkit pull` parses the REFRESH clause from `system.tables.create_table_query` and ignores the `DEFINER` / `SQL SECURITY` clauses that managed ClickHouse environments auto-inject. - Validation catches: missing/both `every`/`after`, invalid interval formats, non-APPEND RMV pointing at a replicated (`SharedMergeTree` / `Replicated*`) target (ClickHouse rejects this), and `DEPENDS ON` paired with `REFRESH AFTER`. See the [Refreshable materialized views docs](https://chkit.obsessiondb.com/schema/refreshable-views/) for the full reference. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - b0f200d: **Breaking:** Skip indexes now use a structured discriminated union instead of a free-form `typeArgs: string` field. Each index `type` has its own typed fields, which moves argument validation from runtime to the type system. ```ts indexes: [ // before { name: "idx_set", expression: "source", type: "set", typeArgs: "0", granularity: 1, }, // after { name: "idx_set", expression: "source", type: "set", maxRows: 0, granularity: 1, }, ]; ``` ### Migration guide | Old (`typeArgs`) | New (structured) | | ---------------------------------------------- | ----------------------------------------------------------------------------------- | | `type: 'minmax'` | `type: 'minmax'` | | `type: 'set', typeArgs: '0'` | `type: 'set', maxRows: 0` | | `type: 'set', typeArgs: '1000'` | `type: 'set', maxRows: 1000` | | `type: 'bloom_filter'` | `type: 'bloom_filter'` | | `type: 'bloom_filter', typeArgs: '0.01'` | `type: 'bloom_filter', falsePositiveRate: 0.01` | | `type: 'tokenbf_v1', typeArgs: '32768, 3, 0'` | `type: 'tokenbf_v1', sizeBytes: 32768, hashFunctions: 3, randomSeed: 0` | | `type: 'ngrambf_v1', typeArgs: '3, 256, 2, 0'` | `type: 'ngrambf_v1', ngramSize: 3, sizeBytes: 256, hashFunctions: 2, randomSeed: 0` | Highlights: - `set` now requires `maxRows` at the type level — forgetting it is a TypeScript error rather than a runtime validation failure. - `tokenbf_v1` and `ngrambf_v1` have typed `sizeBytes`, `hashFunctions`, `randomSeed` (and `ngramSize` for ngram), so positional argument mistakes are caught at compile time. - `bloom_filter` keeps `falsePositiveRate` optional — omit it to emit a bare `bloom_filter` clause. - `chkit pull` now introspects `system.data_skipping_indices.type_full` and emits the structured fields back into schema files; unknown types still round-trip via the existing path. - The `index_type_missing_args` validation code is removed since it is now a compile-time concern. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [cb09aaa] - Updated dependencies [0f5f4c6] - Updated dependencies [aecb106] - Updated dependencies [c396fb5] - Updated dependencies [ffdcdb9] - Updated dependencies [1a5caa3] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [95e6dbb] - Updated dependencies [a94a2a1] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [b0f200d] - Updated dependencies [8112b46] - Updated dependencies [a77c5b2] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [b0f200d] - Updated dependencies [50a34db] - Updated dependencies [45ff0fe] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0-beta.28 - @chkit/clickhouse@0.1.0-beta.28 ## 0.1.0-beta.27 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - b0f200d: Add support for per-column compression codecs. Declare a codec directly on a column with a structured discriminated union: ```ts import { codec, table } from "@chkit/core"; const events = table({ database: "analytics", name: "events", columns: [ { name: "id", type: "UInt64" }, { name: "ts", type: "DateTime", codec: { kind: "ZSTD", level: 3 } }, { name: "delta", type: "Int64", codec: [{ kind: "Delta", size: 4 }, { kind: "ZSTD" }], }, { name: "exp", type: "Float32", codec: codec.raw("SomeNewCodec(42)") }, ], engine: "MergeTree()", primaryKey: ["id"], orderBy: ["id"], }); ``` Highlights: - `CREATE TABLE` and `ALTER TABLE ADD/MODIFY COLUMN` emit the `CODEC(...)` clause in the correct position (after `DEFAULT` and `COMMENT`, as required by ClickHouse). - `chkit generate` emits `MODIFY COLUMN ... REMOVE CODEC` when a codec is dropped and no other column fields change; otherwise a single `MODIFY COLUMN` replaces the codec. - `chkit pull` introspects `system.columns.compression_codec` and renders structured codec objects back into the schema file. Unknown codec tokens fall back to `codec.raw(...)` so new ClickHouse codecs still round-trip. - Canonicalization fills ClickHouse defaults (`ZSTD` → level 1, `LZ4HC` → level 9, `Delta`/`DoubleDelta`/`Gorilla` → size 1), so `{kind:'ZSTD'}` and `{kind:'ZSTD', level:1}` compare equal and the diff engine stays stable across pull → plan round-trips. - Validation catches codec chains with more than one general codec, chains that do not end with a general codec, or an empty chain (`codec: []`) — preprocessor alone is accepted since ClickHouse auto-appends the default general codec. - `parseCodec` falls back to `raw` when a known codec token has unexpected extra args (e.g. `ZSTD(3, 1)`), so future ClickHouse codec extensions round-trip cleanly through `chkit pull` instead of silently dropping arguments. - a77c5b2: Add support for ClickHouse refreshable materialized views (RMVs), GA since ClickHouse 24.10. Define a refreshable MV by adding a `refresh` field to `materializedView()`: ```ts const dailyReport = materializedView({ database: "analytics", name: "daily_report_mv", to: { database: "analytics", name: "daily_report" }, refresh: { every: "1 DAY", offset: "2 HOUR" }, as: "SELECT toDate(ts) AS day, count() AS total FROM analytics.events GROUP BY day", }); ``` Supported fields: `every`, `after`, `offset`, `randomize`, `dependsOn`, `settings`, `append`, `empty`. Highlights: - `chkit generate` emits `ALTER TABLE ... MODIFY REFRESH` for schedule-only changes and `DROP ... SYNC` + `CREATE` for structural changes (added/removed refresh, toggled APPEND). - `chkit pull` parses the REFRESH clause from `system.tables.create_table_query` and ignores the `DEFINER` / `SQL SECURITY` clauses that managed ClickHouse environments auto-inject. - Validation catches: missing/both `every`/`after`, invalid interval formats, non-APPEND RMV pointing at a replicated (`SharedMergeTree` / `Replicated*`) target (ClickHouse rejects this), and `DEPENDS ON` paired with `REFRESH AFTER`. See the [Refreshable materialized views docs](https://chkit.obsessiondb.com/schema/refreshable-views/) for the full reference. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - b0f200d: **Breaking:** Skip indexes now use a structured discriminated union instead of a free-form `typeArgs: string` field. Each index `type` has its own typed fields, which moves argument validation from runtime to the type system. ```ts indexes: [ // before { name: "idx_set", expression: "source", type: "set", typeArgs: "0", granularity: 1, }, // after { name: "idx_set", expression: "source", type: "set", maxRows: 0, granularity: 1, }, ]; ``` ### Migration guide | Old (`typeArgs`) | New (structured) | | ---------------------------------------------- | ----------------------------------------------------------------------------------- | | `type: 'minmax'` | `type: 'minmax'` | | `type: 'set', typeArgs: '0'` | `type: 'set', maxRows: 0` | | `type: 'set', typeArgs: '1000'` | `type: 'set', maxRows: 1000` | | `type: 'bloom_filter'` | `type: 'bloom_filter'` | | `type: 'bloom_filter', typeArgs: '0.01'` | `type: 'bloom_filter', falsePositiveRate: 0.01` | | `type: 'tokenbf_v1', typeArgs: '32768, 3, 0'` | `type: 'tokenbf_v1', sizeBytes: 32768, hashFunctions: 3, randomSeed: 0` | | `type: 'ngrambf_v1', typeArgs: '3, 256, 2, 0'` | `type: 'ngrambf_v1', ngramSize: 3, sizeBytes: 256, hashFunctions: 2, randomSeed: 0` | Highlights: - `set` now requires `maxRows` at the type level — forgetting it is a TypeScript error rather than a runtime validation failure. - `tokenbf_v1` and `ngrambf_v1` have typed `sizeBytes`, `hashFunctions`, `randomSeed` (and `ngramSize` for ngram), so positional argument mistakes are caught at compile time. - `bloom_filter` keeps `falsePositiveRate` optional — omit it to emit a bare `bloom_filter` clause. - `chkit pull` now introspects `system.data_skipping_indices.type_full` and emits the structured fields back into schema files; unknown types still round-trip via the existing path. - The `index_type_missing_args` validation code is removed since it is now a compile-time concern. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [cb09aaa] - Updated dependencies [0f5f4c6] - Updated dependencies [aecb106] - Updated dependencies [c396fb5] - Updated dependencies [ffdcdb9] - Updated dependencies [1a5caa3] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [95e6dbb] - Updated dependencies [a94a2a1] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [b0f200d] - Updated dependencies [8112b46] - Updated dependencies [a77c5b2] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [b0f200d] - Updated dependencies [50a34db] - Updated dependencies [45ff0fe] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0-beta.27 - @chkit/clickhouse@0.1.0-beta.27 ## 0.1.0-beta.26 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - b0f200d: Add support for per-column compression codecs. Declare a codec directly on a column with a structured discriminated union: ```ts import { codec, table } from "@chkit/core"; const events = table({ database: "analytics", name: "events", columns: [ { name: "id", type: "UInt64" }, { name: "ts", type: "DateTime", codec: { kind: "ZSTD", level: 3 } }, { name: "delta", type: "Int64", codec: [{ kind: "Delta", size: 4 }, { kind: "ZSTD" }], }, { name: "exp", type: "Float32", codec: codec.raw("SomeNewCodec(42)") }, ], engine: "MergeTree()", primaryKey: ["id"], orderBy: ["id"], }); ``` Highlights: - `CREATE TABLE` and `ALTER TABLE ADD/MODIFY COLUMN` emit the `CODEC(...)` clause in the correct position (after `DEFAULT` and `COMMENT`, as required by ClickHouse). - `chkit generate` emits `MODIFY COLUMN ... REMOVE CODEC` when a codec is dropped and no other column fields change; otherwise a single `MODIFY COLUMN` replaces the codec. - `chkit pull` introspects `system.columns.compression_codec` and renders structured codec objects back into the schema file. Unknown codec tokens fall back to `codec.raw(...)` so new ClickHouse codecs still round-trip. - Canonicalization fills ClickHouse defaults (`ZSTD` → level 1, `LZ4HC` → level 9, `Delta`/`DoubleDelta`/`Gorilla` → size 1), so `{kind:'ZSTD'}` and `{kind:'ZSTD', level:1}` compare equal and the diff engine stays stable across pull → plan round-trips. - Validation catches codec chains with more than one general codec, chains that do not end with a general codec, or an empty chain (`codec: []`) — preprocessor alone is accepted since ClickHouse auto-appends the default general codec. - `parseCodec` falls back to `raw` when a known codec token has unexpected extra args (e.g. `ZSTD(3, 1)`), so future ClickHouse codec extensions round-trip cleanly through `chkit pull` instead of silently dropping arguments. - a77c5b2: Add support for ClickHouse refreshable materialized views (RMVs), GA since ClickHouse 24.10. Define a refreshable MV by adding a `refresh` field to `materializedView()`: ```ts const dailyReport = materializedView({ database: "analytics", name: "daily_report_mv", to: { database: "analytics", name: "daily_report" }, refresh: { every: "1 DAY", offset: "2 HOUR" }, as: "SELECT toDate(ts) AS day, count() AS total FROM analytics.events GROUP BY day", }); ``` Supported fields: `every`, `after`, `offset`, `randomize`, `dependsOn`, `settings`, `append`, `empty`. Highlights: - `chkit generate` emits `ALTER TABLE ... MODIFY REFRESH` for schedule-only changes and `DROP ... SYNC` + `CREATE` for structural changes (added/removed refresh, toggled APPEND). - `chkit pull` parses the REFRESH clause from `system.tables.create_table_query` and ignores the `DEFINER` / `SQL SECURITY` clauses that managed ClickHouse environments auto-inject. - Validation catches: missing/both `every`/`after`, invalid interval formats, non-APPEND RMV pointing at a replicated (`SharedMergeTree` / `Replicated*`) target (ClickHouse rejects this), and `DEPENDS ON` paired with `REFRESH AFTER`. See the [Refreshable materialized views docs](https://chkit.obsessiondb.com/schema/refreshable-views/) for the full reference. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - b0f200d: **Breaking:** Skip indexes now use a structured discriminated union instead of a free-form `typeArgs: string` field. Each index `type` has its own typed fields, which moves argument validation from runtime to the type system. ```ts indexes: [ // before { name: "idx_set", expression: "source", type: "set", typeArgs: "0", granularity: 1, }, // after { name: "idx_set", expression: "source", type: "set", maxRows: 0, granularity: 1, }, ]; ``` ### Migration guide | Old (`typeArgs`) | New (structured) | | ---------------------------------------------- | ----------------------------------------------------------------------------------- | | `type: 'minmax'` | `type: 'minmax'` | | `type: 'set', typeArgs: '0'` | `type: 'set', maxRows: 0` | | `type: 'set', typeArgs: '1000'` | `type: 'set', maxRows: 1000` | | `type: 'bloom_filter'` | `type: 'bloom_filter'` | | `type: 'bloom_filter', typeArgs: '0.01'` | `type: 'bloom_filter', falsePositiveRate: 0.01` | | `type: 'tokenbf_v1', typeArgs: '32768, 3, 0'` | `type: 'tokenbf_v1', sizeBytes: 32768, hashFunctions: 3, randomSeed: 0` | | `type: 'ngrambf_v1', typeArgs: '3, 256, 2, 0'` | `type: 'ngrambf_v1', ngramSize: 3, sizeBytes: 256, hashFunctions: 2, randomSeed: 0` | Highlights: - `set` now requires `maxRows` at the type level — forgetting it is a TypeScript error rather than a runtime validation failure. - `tokenbf_v1` and `ngrambf_v1` have typed `sizeBytes`, `hashFunctions`, `randomSeed` (and `ngramSize` for ngram), so positional argument mistakes are caught at compile time. - `bloom_filter` keeps `falsePositiveRate` optional — omit it to emit a bare `bloom_filter` clause. - `chkit pull` now introspects `system.data_skipping_indices.type_full` and emits the structured fields back into schema files; unknown types still round-trip via the existing path. - The `index_type_missing_args` validation code is removed since it is now a compile-time concern. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [cb09aaa] - Updated dependencies [0f5f4c6] - Updated dependencies [aecb106] - Updated dependencies [c396fb5] - Updated dependencies [ffdcdb9] - Updated dependencies [1a5caa3] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [a94a2a1] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [b0f200d] - Updated dependencies [8112b46] - Updated dependencies [a77c5b2] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [b0f200d] - Updated dependencies [50a34db] - Updated dependencies [45ff0fe] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0-beta.26 - @chkit/clickhouse@0.1.0-beta.26 ## 0.1.0-beta.25 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - b0f200d: Add support for per-column compression codecs. Declare a codec directly on a column with a structured discriminated union: ```ts import { codec, table } from "@chkit/core"; const events = table({ database: "analytics", name: "events", columns: [ { name: "id", type: "UInt64" }, { name: "ts", type: "DateTime", codec: { kind: "ZSTD", level: 3 } }, { name: "delta", type: "Int64", codec: [{ kind: "Delta", size: 4 }, { kind: "ZSTD" }], }, { name: "exp", type: "Float32", codec: codec.raw("SomeNewCodec(42)") }, ], engine: "MergeTree()", primaryKey: ["id"], orderBy: ["id"], }); ``` Highlights: - `CREATE TABLE` and `ALTER TABLE ADD/MODIFY COLUMN` emit the `CODEC(...)` clause in the correct position (after `DEFAULT` and `COMMENT`, as required by ClickHouse). - `chkit generate` emits `MODIFY COLUMN ... REMOVE CODEC` when a codec is dropped and no other column fields change; otherwise a single `MODIFY COLUMN` replaces the codec. - `chkit pull` introspects `system.columns.compression_codec` and renders structured codec objects back into the schema file. Unknown codec tokens fall back to `codec.raw(...)` so new ClickHouse codecs still round-trip. - Canonicalization fills ClickHouse defaults (`ZSTD` → level 1, `LZ4HC` → level 9, `Delta`/`DoubleDelta`/`Gorilla` → size 1), so `{kind:'ZSTD'}` and `{kind:'ZSTD', level:1}` compare equal and the diff engine stays stable across pull → plan round-trips. - Validation catches codec chains with more than one general codec, chains that do not end with a general codec, or an empty chain (`codec: []`) — preprocessor alone is accepted since ClickHouse auto-appends the default general codec. - `parseCodec` falls back to `raw` when a known codec token has unexpected extra args (e.g. `ZSTD(3, 1)`), so future ClickHouse codec extensions round-trip cleanly through `chkit pull` instead of silently dropping arguments. - a77c5b2: Add support for ClickHouse refreshable materialized views (RMVs), GA since ClickHouse 24.10. Define a refreshable MV by adding a `refresh` field to `materializedView()`: ```ts const dailyReport = materializedView({ database: "analytics", name: "daily_report_mv", to: { database: "analytics", name: "daily_report" }, refresh: { every: "1 DAY", offset: "2 HOUR" }, as: "SELECT toDate(ts) AS day, count() AS total FROM analytics.events GROUP BY day", }); ``` Supported fields: `every`, `after`, `offset`, `randomize`, `dependsOn`, `settings`, `append`, `empty`. Highlights: - `chkit generate` emits `ALTER TABLE ... MODIFY REFRESH` for schedule-only changes and `DROP ... SYNC` + `CREATE` for structural changes (added/removed refresh, toggled APPEND). - `chkit pull` parses the REFRESH clause from `system.tables.create_table_query` and ignores the `DEFINER` / `SQL SECURITY` clauses that managed ClickHouse environments auto-inject. - Validation catches: missing/both `every`/`after`, invalid interval formats, non-APPEND RMV pointing at a replicated (`SharedMergeTree` / `Replicated*`) target (ClickHouse rejects this), and `DEPENDS ON` paired with `REFRESH AFTER`. See the [Refreshable materialized views docs](https://chkit.obsessiondb.com/schema/refreshable-views/) for the full reference. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - b0f200d: **Breaking:** Skip indexes now use a structured discriminated union instead of a free-form `typeArgs: string` field. Each index `type` has its own typed fields, which moves argument validation from runtime to the type system. ```ts indexes: [ // before { name: "idx_set", expression: "source", type: "set", typeArgs: "0", granularity: 1, }, // after { name: "idx_set", expression: "source", type: "set", maxRows: 0, granularity: 1, }, ]; ``` ### Migration guide | Old (`typeArgs`) | New (structured) | | ---------------------------------------------- | ----------------------------------------------------------------------------------- | | `type: 'minmax'` | `type: 'minmax'` | | `type: 'set', typeArgs: '0'` | `type: 'set', maxRows: 0` | | `type: 'set', typeArgs: '1000'` | `type: 'set', maxRows: 1000` | | `type: 'bloom_filter'` | `type: 'bloom_filter'` | | `type: 'bloom_filter', typeArgs: '0.01'` | `type: 'bloom_filter', falsePositiveRate: 0.01` | | `type: 'tokenbf_v1', typeArgs: '32768, 3, 0'` | `type: 'tokenbf_v1', sizeBytes: 32768, hashFunctions: 3, randomSeed: 0` | | `type: 'ngrambf_v1', typeArgs: '3, 256, 2, 0'` | `type: 'ngrambf_v1', ngramSize: 3, sizeBytes: 256, hashFunctions: 2, randomSeed: 0` | Highlights: - `set` now requires `maxRows` at the type level — forgetting it is a TypeScript error rather than a runtime validation failure. - `tokenbf_v1` and `ngrambf_v1` have typed `sizeBytes`, `hashFunctions`, `randomSeed` (and `ngramSize` for ngram), so positional argument mistakes are caught at compile time. - `bloom_filter` keeps `falsePositiveRate` optional — omit it to emit a bare `bloom_filter` clause. - `chkit pull` now introspects `system.data_skipping_indices.type_full` and emits the structured fields back into schema files; unknown types still round-trip via the existing path. - The `index_type_missing_args` validation code is removed since it is now a compile-time concern. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [cb09aaa] - Updated dependencies [0f5f4c6] - Updated dependencies [aecb106] - Updated dependencies [c396fb5] - Updated dependencies [ffdcdb9] - Updated dependencies [1a5caa3] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [a94a2a1] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [b0f200d] - Updated dependencies [8112b46] - Updated dependencies [a77c5b2] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [b0f200d] - Updated dependencies [50a34db] - Updated dependencies [45ff0fe] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0-beta.25 - @chkit/clickhouse@0.1.0-beta.25 ## 0.1.0-beta.24 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - b0f200d: Add support for per-column compression codecs. Declare a codec directly on a column with a structured discriminated union: ```ts import { codec, table } from "@chkit/core"; const events = table({ database: "analytics", name: "events", columns: [ { name: "id", type: "UInt64" }, { name: "ts", type: "DateTime", codec: { kind: "ZSTD", level: 3 } }, { name: "delta", type: "Int64", codec: [{ kind: "Delta", size: 4 }, { kind: "ZSTD" }], }, { name: "exp", type: "Float32", codec: codec.raw("SomeNewCodec(42)") }, ], engine: "MergeTree()", primaryKey: ["id"], orderBy: ["id"], }); ``` Highlights: - `CREATE TABLE` and `ALTER TABLE ADD/MODIFY COLUMN` emit the `CODEC(...)` clause in the correct position (after `DEFAULT` and `COMMENT`, as required by ClickHouse). - `chkit generate` emits `MODIFY COLUMN ... REMOVE CODEC` when a codec is dropped and no other column fields change; otherwise a single `MODIFY COLUMN` replaces the codec. - `chkit pull` introspects `system.columns.compression_codec` and renders structured codec objects back into the schema file. Unknown codec tokens fall back to `codec.raw(...)` so new ClickHouse codecs still round-trip. - Canonicalization fills ClickHouse defaults (`ZSTD` → level 1, `LZ4HC` → level 9, `Delta`/`DoubleDelta`/`Gorilla` → size 1), so `{kind:'ZSTD'}` and `{kind:'ZSTD', level:1}` compare equal and the diff engine stays stable across pull → plan round-trips. - Validation catches codec chains with more than one general codec, chains that do not end with a general codec, or an empty chain (`codec: []`) — preprocessor alone is accepted since ClickHouse auto-appends the default general codec. - `parseCodec` falls back to `raw` when a known codec token has unexpected extra args (e.g. `ZSTD(3, 1)`), so future ClickHouse codec extensions round-trip cleanly through `chkit pull` instead of silently dropping arguments. - a77c5b2: Add support for ClickHouse refreshable materialized views (RMVs), GA since ClickHouse 24.10. Define a refreshable MV by adding a `refresh` field to `materializedView()`: ```ts const dailyReport = materializedView({ database: "analytics", name: "daily_report_mv", to: { database: "analytics", name: "daily_report" }, refresh: { every: "1 DAY", offset: "2 HOUR" }, as: "SELECT toDate(ts) AS day, count() AS total FROM analytics.events GROUP BY day", }); ``` Supported fields: `every`, `after`, `offset`, `randomize`, `dependsOn`, `settings`, `append`, `empty`. Highlights: - `chkit generate` emits `ALTER TABLE ... MODIFY REFRESH` for schedule-only changes and `DROP ... SYNC` + `CREATE` for structural changes (added/removed refresh, toggled APPEND). - `chkit pull` parses the REFRESH clause from `system.tables.create_table_query` and ignores the `DEFINER` / `SQL SECURITY` clauses that managed ClickHouse environments auto-inject. - Validation catches: missing/both `every`/`after`, invalid interval formats, non-APPEND RMV pointing at a replicated (`SharedMergeTree` / `Replicated*`) target (ClickHouse rejects this), and `DEPENDS ON` paired with `REFRESH AFTER`. See the [Refreshable materialized views docs](https://chkit.obsessiondb.com/schema/refreshable-views/) for the full reference. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - b0f200d: **Breaking:** Skip indexes now use a structured discriminated union instead of a free-form `typeArgs: string` field. Each index `type` has its own typed fields, which moves argument validation from runtime to the type system. ```ts indexes: [ // before { name: "idx_set", expression: "source", type: "set", typeArgs: "0", granularity: 1, }, // after { name: "idx_set", expression: "source", type: "set", maxRows: 0, granularity: 1, }, ]; ``` ### Migration guide | Old (`typeArgs`) | New (structured) | | ---------------------------------------------- | ----------------------------------------------------------------------------------- | | `type: 'minmax'` | `type: 'minmax'` | | `type: 'set', typeArgs: '0'` | `type: 'set', maxRows: 0` | | `type: 'set', typeArgs: '1000'` | `type: 'set', maxRows: 1000` | | `type: 'bloom_filter'` | `type: 'bloom_filter'` | | `type: 'bloom_filter', typeArgs: '0.01'` | `type: 'bloom_filter', falsePositiveRate: 0.01` | | `type: 'tokenbf_v1', typeArgs: '32768, 3, 0'` | `type: 'tokenbf_v1', sizeBytes: 32768, hashFunctions: 3, randomSeed: 0` | | `type: 'ngrambf_v1', typeArgs: '3, 256, 2, 0'` | `type: 'ngrambf_v1', ngramSize: 3, sizeBytes: 256, hashFunctions: 2, randomSeed: 0` | Highlights: - `set` now requires `maxRows` at the type level — forgetting it is a TypeScript error rather than a runtime validation failure. - `tokenbf_v1` and `ngrambf_v1` have typed `sizeBytes`, `hashFunctions`, `randomSeed` (and `ngramSize` for ngram), so positional argument mistakes are caught at compile time. - `bloom_filter` keeps `falsePositiveRate` optional — omit it to emit a bare `bloom_filter` clause. - `chkit pull` now introspects `system.data_skipping_indices.type_full` and emits the structured fields back into schema files; unknown types still round-trip via the existing path. - The `index_type_missing_args` validation code is removed since it is now a compile-time concern. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [cb09aaa] - Updated dependencies [0f5f4c6] - Updated dependencies [aecb106] - Updated dependencies [c396fb5] - Updated dependencies [ffdcdb9] - Updated dependencies [1a5caa3] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [a94a2a1] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [b0f200d] - Updated dependencies [8112b46] - Updated dependencies [a77c5b2] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [b0f200d] - Updated dependencies [50a34db] - Updated dependencies [45ff0fe] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0-beta.24 - @chkit/clickhouse@0.1.0-beta.24 ## 0.1.0-beta.23 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - b0f200d: Add support for per-column compression codecs. Declare a codec directly on a column with a structured discriminated union: ```ts import { codec, table } from "@chkit/core"; const events = table({ database: "analytics", name: "events", columns: [ { name: "id", type: "UInt64" }, { name: "ts", type: "DateTime", codec: { kind: "ZSTD", level: 3 } }, { name: "delta", type: "Int64", codec: [{ kind: "Delta", size: 4 }, { kind: "ZSTD" }], }, { name: "exp", type: "Float32", codec: codec.raw("SomeNewCodec(42)") }, ], engine: "MergeTree()", primaryKey: ["id"], orderBy: ["id"], }); ``` Highlights: - `CREATE TABLE` and `ALTER TABLE ADD/MODIFY COLUMN` emit the `CODEC(...)` clause in the correct position (after `DEFAULT` and `COMMENT`, as required by ClickHouse). - `chkit generate` emits `MODIFY COLUMN ... REMOVE CODEC` when a codec is dropped and no other column fields change; otherwise a single `MODIFY COLUMN` replaces the codec. - `chkit pull` introspects `system.columns.compression_codec` and renders structured codec objects back into the schema file. Unknown codec tokens fall back to `codec.raw(...)` so new ClickHouse codecs still round-trip. - Canonicalization fills ClickHouse defaults (`ZSTD` → level 1, `LZ4HC` → level 9, `Delta`/`DoubleDelta`/`Gorilla` → size 1), so `{kind:'ZSTD'}` and `{kind:'ZSTD', level:1}` compare equal and the diff engine stays stable across pull → plan round-trips. - Validation catches codec chains with more than one general codec, chains that do not end with a general codec, or an empty chain (`codec: []`) — preprocessor alone is accepted since ClickHouse auto-appends the default general codec. - `parseCodec` falls back to `raw` when a known codec token has unexpected extra args (e.g. `ZSTD(3, 1)`), so future ClickHouse codec extensions round-trip cleanly through `chkit pull` instead of silently dropping arguments. - a77c5b2: Add support for ClickHouse refreshable materialized views (RMVs), GA since ClickHouse 24.10. Define a refreshable MV by adding a `refresh` field to `materializedView()`: ```ts const dailyReport = materializedView({ database: "analytics", name: "daily_report_mv", to: { database: "analytics", name: "daily_report" }, refresh: { every: "1 DAY", offset: "2 HOUR" }, as: "SELECT toDate(ts) AS day, count() AS total FROM analytics.events GROUP BY day", }); ``` Supported fields: `every`, `after`, `offset`, `randomize`, `dependsOn`, `settings`, `append`, `empty`. Highlights: - `chkit generate` emits `ALTER TABLE ... MODIFY REFRESH` for schedule-only changes and `DROP ... SYNC` + `CREATE` for structural changes (added/removed refresh, toggled APPEND). - `chkit pull` parses the REFRESH clause from `system.tables.create_table_query` and ignores the `DEFINER` / `SQL SECURITY` clauses that managed ClickHouse environments auto-inject. - Validation catches: missing/both `every`/`after`, invalid interval formats, non-APPEND RMV pointing at a replicated (`SharedMergeTree` / `Replicated*`) target (ClickHouse rejects this), and `DEPENDS ON` paired with `REFRESH AFTER`. See the [Refreshable materialized views docs](https://chkit.obsessiondb.com/schema/refreshable-views/) for the full reference. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - b0f200d: **Breaking:** Skip indexes now use a structured discriminated union instead of a free-form `typeArgs: string` field. Each index `type` has its own typed fields, which moves argument validation from runtime to the type system. ```ts indexes: [ // before { name: "idx_set", expression: "source", type: "set", typeArgs: "0", granularity: 1, }, // after { name: "idx_set", expression: "source", type: "set", maxRows: 0, granularity: 1, }, ]; ``` ### Migration guide | Old (`typeArgs`) | New (structured) | | ---------------------------------------------- | ----------------------------------------------------------------------------------- | | `type: 'minmax'` | `type: 'minmax'` | | `type: 'set', typeArgs: '0'` | `type: 'set', maxRows: 0` | | `type: 'set', typeArgs: '1000'` | `type: 'set', maxRows: 1000` | | `type: 'bloom_filter'` | `type: 'bloom_filter'` | | `type: 'bloom_filter', typeArgs: '0.01'` | `type: 'bloom_filter', falsePositiveRate: 0.01` | | `type: 'tokenbf_v1', typeArgs: '32768, 3, 0'` | `type: 'tokenbf_v1', sizeBytes: 32768, hashFunctions: 3, randomSeed: 0` | | `type: 'ngrambf_v1', typeArgs: '3, 256, 2, 0'` | `type: 'ngrambf_v1', ngramSize: 3, sizeBytes: 256, hashFunctions: 2, randomSeed: 0` | Highlights: - `set` now requires `maxRows` at the type level — forgetting it is a TypeScript error rather than a runtime validation failure. - `tokenbf_v1` and `ngrambf_v1` have typed `sizeBytes`, `hashFunctions`, `randomSeed` (and `ngramSize` for ngram), so positional argument mistakes are caught at compile time. - `bloom_filter` keeps `falsePositiveRate` optional — omit it to emit a bare `bloom_filter` clause. - `chkit pull` now introspects `system.data_skipping_indices.type_full` and emits the structured fields back into schema files; unknown types still round-trip via the existing path. - The `index_type_missing_args` validation code is removed since it is now a compile-time concern. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [cb09aaa] - Updated dependencies [0f5f4c6] - Updated dependencies [aecb106] - Updated dependencies [c396fb5] - Updated dependencies [ffdcdb9] - Updated dependencies [1a5caa3] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [a94a2a1] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [b0f200d] - Updated dependencies [8112b46] - Updated dependencies [a77c5b2] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [b0f200d] - Updated dependencies [50a34db] - Updated dependencies [45ff0fe] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0-beta.23 - @chkit/clickhouse@0.1.0-beta.23 ## 0.1.0-beta.22 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - b0f200d: Add support for per-column compression codecs. Declare a codec directly on a column with a structured discriminated union: ```ts import { codec, table } from "@chkit/core"; const events = table({ database: "analytics", name: "events", columns: [ { name: "id", type: "UInt64" }, { name: "ts", type: "DateTime", codec: { kind: "ZSTD", level: 3 } }, { name: "delta", type: "Int64", codec: [{ kind: "Delta", size: 4 }, { kind: "ZSTD" }], }, { name: "exp", type: "Float32", codec: codec.raw("SomeNewCodec(42)") }, ], engine: "MergeTree()", primaryKey: ["id"], orderBy: ["id"], }); ``` Highlights: - `CREATE TABLE` and `ALTER TABLE ADD/MODIFY COLUMN` emit the `CODEC(...)` clause in the correct position (after `DEFAULT` and `COMMENT`, as required by ClickHouse). - `chkit generate` emits `MODIFY COLUMN ... REMOVE CODEC` when a codec is dropped and no other column fields change; otherwise a single `MODIFY COLUMN` replaces the codec. - `chkit pull` introspects `system.columns.compression_codec` and renders structured codec objects back into the schema file. Unknown codec tokens fall back to `codec.raw(...)` so new ClickHouse codecs still round-trip. - Canonicalization fills ClickHouse defaults (`ZSTD` → level 1, `LZ4HC` → level 9, `Delta`/`DoubleDelta`/`Gorilla` → size 1), so `{kind:'ZSTD'}` and `{kind:'ZSTD', level:1}` compare equal and the diff engine stays stable across pull → plan round-trips. - Validation catches codec chains with more than one general codec, chains that do not end with a general codec, or an empty chain (`codec: []`) — preprocessor alone is accepted since ClickHouse auto-appends the default general codec. - `parseCodec` falls back to `raw` when a known codec token has unexpected extra args (e.g. `ZSTD(3, 1)`), so future ClickHouse codec extensions round-trip cleanly through `chkit pull` instead of silently dropping arguments. - a77c5b2: Add support for ClickHouse refreshable materialized views (RMVs), GA since ClickHouse 24.10. Define a refreshable MV by adding a `refresh` field to `materializedView()`: ```ts const dailyReport = materializedView({ database: "analytics", name: "daily_report_mv", to: { database: "analytics", name: "daily_report" }, refresh: { every: "1 DAY", offset: "2 HOUR" }, as: "SELECT toDate(ts) AS day, count() AS total FROM analytics.events GROUP BY day", }); ``` Supported fields: `every`, `after`, `offset`, `randomize`, `dependsOn`, `settings`, `append`, `empty`. Highlights: - `chkit generate` emits `ALTER TABLE ... MODIFY REFRESH` for schedule-only changes and `DROP ... SYNC` + `CREATE` for structural changes (added/removed refresh, toggled APPEND). - `chkit pull` parses the REFRESH clause from `system.tables.create_table_query` and ignores the `DEFINER` / `SQL SECURITY` clauses that managed ClickHouse environments auto-inject. - Validation catches: missing/both `every`/`after`, invalid interval formats, non-APPEND RMV pointing at a replicated (`SharedMergeTree` / `Replicated*`) target (ClickHouse rejects this), and `DEPENDS ON` paired with `REFRESH AFTER`. See the [Refreshable materialized views docs](https://chkit.obsessiondb.com/schema/refreshable-views/) for the full reference. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - b0f200d: **Breaking:** Skip indexes now use a structured discriminated union instead of a free-form `typeArgs: string` field. Each index `type` has its own typed fields, which moves argument validation from runtime to the type system. ```ts indexes: [ // before { name: "idx_set", expression: "source", type: "set", typeArgs: "0", granularity: 1, }, // after { name: "idx_set", expression: "source", type: "set", maxRows: 0, granularity: 1, }, ]; ``` ### Migration guide | Old (`typeArgs`) | New (structured) | | ---------------------------------------------- | ----------------------------------------------------------------------------------- | | `type: 'minmax'` | `type: 'minmax'` | | `type: 'set', typeArgs: '0'` | `type: 'set', maxRows: 0` | | `type: 'set', typeArgs: '1000'` | `type: 'set', maxRows: 1000` | | `type: 'bloom_filter'` | `type: 'bloom_filter'` | | `type: 'bloom_filter', typeArgs: '0.01'` | `type: 'bloom_filter', falsePositiveRate: 0.01` | | `type: 'tokenbf_v1', typeArgs: '32768, 3, 0'` | `type: 'tokenbf_v1', sizeBytes: 32768, hashFunctions: 3, randomSeed: 0` | | `type: 'ngrambf_v1', typeArgs: '3, 256, 2, 0'` | `type: 'ngrambf_v1', ngramSize: 3, sizeBytes: 256, hashFunctions: 2, randomSeed: 0` | Highlights: - `set` now requires `maxRows` at the type level — forgetting it is a TypeScript error rather than a runtime validation failure. - `tokenbf_v1` and `ngrambf_v1` have typed `sizeBytes`, `hashFunctions`, `randomSeed` (and `ngramSize` for ngram), so positional argument mistakes are caught at compile time. - `bloom_filter` keeps `falsePositiveRate` optional — omit it to emit a bare `bloom_filter` clause. - `chkit pull` now introspects `system.data_skipping_indices.type_full` and emits the structured fields back into schema files; unknown types still round-trip via the existing path. - The `index_type_missing_args` validation code is removed since it is now a compile-time concern. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [cb09aaa] - Updated dependencies [0f5f4c6] - Updated dependencies [aecb106] - Updated dependencies [c396fb5] - Updated dependencies [ffdcdb9] - Updated dependencies [1a5caa3] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [a94a2a1] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [b0f200d] - Updated dependencies [8112b46] - Updated dependencies [a77c5b2] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [b0f200d] - Updated dependencies [50a34db] - Updated dependencies [45ff0fe] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0-beta.22 - @chkit/clickhouse@0.1.0-beta.22 ## 0.1.0-beta.21 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - b0f200d: Add support for per-column compression codecs. Declare a codec directly on a column with a structured discriminated union: ```ts import { codec, table } from "@chkit/core"; const events = table({ database: "analytics", name: "events", columns: [ { name: "id", type: "UInt64" }, { name: "ts", type: "DateTime", codec: { kind: "ZSTD", level: 3 } }, { name: "delta", type: "Int64", codec: [{ kind: "Delta", size: 4 }, { kind: "ZSTD" }], }, { name: "exp", type: "Float32", codec: codec.raw("SomeNewCodec(42)") }, ], engine: "MergeTree()", primaryKey: ["id"], orderBy: ["id"], }); ``` Highlights: - `CREATE TABLE` and `ALTER TABLE ADD/MODIFY COLUMN` emit the `CODEC(...)` clause in the correct position (after `DEFAULT` and `COMMENT`, as required by ClickHouse). - `chkit generate` emits `MODIFY COLUMN ... REMOVE CODEC` when a codec is dropped and no other column fields change; otherwise a single `MODIFY COLUMN` replaces the codec. - `chkit pull` introspects `system.columns.compression_codec` and renders structured codec objects back into the schema file. Unknown codec tokens fall back to `codec.raw(...)` so new ClickHouse codecs still round-trip. - Canonicalization fills ClickHouse defaults (`ZSTD` → level 1, `LZ4HC` → level 9, `Delta`/`DoubleDelta`/`Gorilla` → size 1), so `{kind:'ZSTD'}` and `{kind:'ZSTD', level:1}` compare equal and the diff engine stays stable across pull → plan round-trips. - Validation catches codec chains with more than one general codec, chains that do not end with a general codec, or an empty chain (`codec: []`) — preprocessor alone is accepted since ClickHouse auto-appends the default general codec. - `parseCodec` falls back to `raw` when a known codec token has unexpected extra args (e.g. `ZSTD(3, 1)`), so future ClickHouse codec extensions round-trip cleanly through `chkit pull` instead of silently dropping arguments. - a77c5b2: Add support for ClickHouse refreshable materialized views (RMVs), GA since ClickHouse 24.10. Define a refreshable MV by adding a `refresh` field to `materializedView()`: ```ts const dailyReport = materializedView({ database: "analytics", name: "daily_report_mv", to: { database: "analytics", name: "daily_report" }, refresh: { every: "1 DAY", offset: "2 HOUR" }, as: "SELECT toDate(ts) AS day, count() AS total FROM analytics.events GROUP BY day", }); ``` Supported fields: `every`, `after`, `offset`, `randomize`, `dependsOn`, `settings`, `append`, `empty`. Highlights: - `chkit generate` emits `ALTER TABLE ... MODIFY REFRESH` for schedule-only changes and `DROP ... SYNC` + `CREATE` for structural changes (added/removed refresh, toggled APPEND). - `chkit pull` parses the REFRESH clause from `system.tables.create_table_query` and ignores the `DEFINER` / `SQL SECURITY` clauses that managed ClickHouse environments auto-inject. - Validation catches: missing/both `every`/`after`, invalid interval formats, non-APPEND RMV pointing at a replicated (`SharedMergeTree` / `Replicated*`) target (ClickHouse rejects this), and `DEPENDS ON` paired with `REFRESH AFTER`. See the [Refreshable materialized views docs](https://chkit.obsessiondb.com/schema/refreshable-views/) for the full reference. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - b0f200d: **Breaking:** Skip indexes now use a structured discriminated union instead of a free-form `typeArgs: string` field. Each index `type` has its own typed fields, which moves argument validation from runtime to the type system. ```ts indexes: [ // before { name: "idx_set", expression: "source", type: "set", typeArgs: "0", granularity: 1, }, // after { name: "idx_set", expression: "source", type: "set", maxRows: 0, granularity: 1, }, ]; ``` ### Migration guide | Old (`typeArgs`) | New (structured) | | ---------------------------------------------- | ----------------------------------------------------------------------------------- | | `type: 'minmax'` | `type: 'minmax'` | | `type: 'set', typeArgs: '0'` | `type: 'set', maxRows: 0` | | `type: 'set', typeArgs: '1000'` | `type: 'set', maxRows: 1000` | | `type: 'bloom_filter'` | `type: 'bloom_filter'` | | `type: 'bloom_filter', typeArgs: '0.01'` | `type: 'bloom_filter', falsePositiveRate: 0.01` | | `type: 'tokenbf_v1', typeArgs: '32768, 3, 0'` | `type: 'tokenbf_v1', sizeBytes: 32768, hashFunctions: 3, randomSeed: 0` | | `type: 'ngrambf_v1', typeArgs: '3, 256, 2, 0'` | `type: 'ngrambf_v1', ngramSize: 3, sizeBytes: 256, hashFunctions: 2, randomSeed: 0` | Highlights: - `set` now requires `maxRows` at the type level — forgetting it is a TypeScript error rather than a runtime validation failure. - `tokenbf_v1` and `ngrambf_v1` have typed `sizeBytes`, `hashFunctions`, `randomSeed` (and `ngramSize` for ngram), so positional argument mistakes are caught at compile time. - `bloom_filter` keeps `falsePositiveRate` optional — omit it to emit a bare `bloom_filter` clause. - `chkit pull` now introspects `system.data_skipping_indices.type_full` and emits the structured fields back into schema files; unknown types still round-trip via the existing path. - The `index_type_missing_args` validation code is removed since it is now a compile-time concern. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [cb09aaa] - Updated dependencies [c396fb5] - Updated dependencies [1a5caa3] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [a94a2a1] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [b0f200d] - Updated dependencies [8112b46] - Updated dependencies [a77c5b2] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [b0f200d] - Updated dependencies [50a34db] - Updated dependencies [45ff0fe] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0-beta.21 - @chkit/clickhouse@0.1.0-beta.21 ## 0.1.0-beta.20 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [cb09aaa] - Updated dependencies [c396fb5] - Updated dependencies [1a5caa3] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [a94a2a1] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [8112b46] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [45ff0fe] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0-beta.20 - @chkit/clickhouse@0.1.0-beta.20 ## 0.1.0-beta.19 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [c396fb5] - Updated dependencies [1a5caa3] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [a94a2a1] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0-beta.19 - @chkit/clickhouse@0.1.0-beta.19 ## 0.1.0-beta.18 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [c396fb5] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [a94a2a1] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0-beta.18 - @chkit/clickhouse@0.1.0-beta.18 ## 0.1.0-beta.17 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [c63c74f] - Updated dependencies [ba60638] - Updated dependencies [6348ef2] - Updated dependencies [a94a2a1] - Updated dependencies [638f75f] - Updated dependencies [a94a2a1] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [949a20c] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [a52a2b2] - @chkit/core@0.1.0-beta.17 - @chkit/clickhouse@0.1.0-beta.17 ## 0.1.0-beta.16 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - cc1125e: Fix parameterized skip index type rendering. ClickHouse requires `set` indexes to have a size argument (e.g., `set(0)` for unlimited). Add optional `typeArgs` field to `SkipIndexDefinition` to support parameterized index types (`set`, `bloom_filter`, `tokenbf_v1`, `ngrambf_v1`) and parse type arguments from introspected schemas. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [ba60638] - Updated dependencies [a94a2a1] - Updated dependencies [a94a2a1] - Updated dependencies [cc1125e] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - Updated dependencies [a52a2b2] - @chkit/clickhouse@0.1.0-beta.16 - @chkit/core@0.1.0-beta.16 ## 0.1.0-beta.15 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [ba60638] - Updated dependencies [a94a2a1] - Updated dependencies [a94a2a1] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - @chkit/clickhouse@0.1.0-beta.15 - @chkit/core@0.1.0-beta.15 ## 0.1.0-beta.14 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [ba60638] - Updated dependencies [a94a2a1] - Updated dependencies [a94a2a1] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [bc0c6b1] - Updated dependencies [9a54433] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - @chkit/clickhouse@0.1.0-beta.14 - @chkit/core@0.1.0-beta.14 ## 0.1.0-beta.13 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [ba60638] - Updated dependencies [a94a2a1] - Updated dependencies [a94a2a1] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [9a54433] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - @chkit/clickhouse@0.1.0-beta.13 - @chkit/core@0.1.0-beta.13 ## 0.1.0-beta.12 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [ba60638] - Updated dependencies [a94a2a1] - Updated dependencies [a94a2a1] - Updated dependencies [1f8ad1b] - Updated dependencies [f719c50] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [9a54433] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - @chkit/clickhouse@0.1.0-beta.12 - @chkit/core@0.1.0-beta.12 ## 0.1.0-beta.11 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - 9a54433: Add CODE_OF_CONDUCT.md and SECURITY.md governance documents, .env.example for development setup, and update package.json metadata for all packages. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [ba60638] - Updated dependencies [a94a2a1] - Updated dependencies [a94a2a1] - Updated dependencies [f719c50] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [9a54433] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - @chkit/clickhouse@0.1.0-beta.11 - @chkit/core@0.1.0-beta.11 ## 0.1.0-beta.10 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [ba60638] - Updated dependencies [a94a2a1] - Updated dependencies [a94a2a1] - Updated dependencies [f719c50] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - @chkit/clickhouse@0.1.0-beta.10 - @chkit/core@0.1.0-beta.10 ## 0.1.0-beta.9 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [ba60638] - Updated dependencies [a94a2a1] - Updated dependencies [a94a2a1] - Updated dependencies [f719c50] - Updated dependencies [a94a2a1] - Updated dependencies [3ab6919] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - @chkit/clickhouse@0.1.0-beta.9 - @chkit/core@0.1.0-beta.9 ## 0.1.0-beta.8 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - a94a2a1: Replace @stricli/core with a custom CLI framework, migrate plugins to declared flags, and refine the plugin API and error handling. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [ba60638] - Updated dependencies [a94a2a1] - Updated dependencies [a94a2a1] - Updated dependencies [f719c50] - Updated dependencies [a94a2a1] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - @chkit/clickhouse@0.1.0-beta.8 - @chkit/core@0.1.0-beta.8 ## 0.1.0-beta.7 ### Patch Changes - ba60638: Add homepage and repository metadata to all packages, and link READMEs to the chkit CLI package and documentation site. - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [ba60638] - Updated dependencies [f719c50] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - @chkit/clickhouse@0.1.0-beta.7 - @chkit/core@0.1.0-beta.7 ## 0.1.0-beta.6 ### Patch Changes - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [f719c50] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - @chkit/clickhouse@0.1.0-beta.6 - @chkit/core@0.1.0-beta.6 ## 0.1.0-beta.5 ### Patch Changes - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [f719c50] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - @chkit/clickhouse@0.1.0-beta.5 - @chkit/core@0.1.0-beta.5 ## 0.1.0-beta.4 ### Patch Changes - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - d983fdf: Rename internals and CLI binary from chkit to chkit. - Updated dependencies [f719c50] - Updated dependencies [a3a09cf] - Updated dependencies [d983fdf] - @chkit/clickhouse@0.1.0-beta.4 - @chkit/core@0.1.0-beta.4 ## 0.1.0-beta.3 ### Patch Changes - a3a09cf: Rename plugin-typegen to plugin-codegen and add ingestion functions. - Updated dependencies [a3a09cf] - @chkit/clickhouse@0.1.0-beta.3 - @chkit/core@0.1.0-beta.3 ## 0.1.0-beta.2 ### Patch Changes - f719c50: Fix workspace:\* dependencies in published packages. Restores manual workspace version resolution before publish due to a bun publish bug (oven-sh/bun#24687) where workspace:\* references are not resolved in the published tarball. - Updated dependencies [f719c50] - @chkit/clickhouse@0.1.0-beta.2 - @chkit/core@0.1.0-beta.2 ## 0.1.0-beta.1 ### Patch Changes - Rename internals and CLI binary from chkit to chkit. - Updated dependencies - @chkit/clickhouse@0.1.0-beta.1 - @chkit/core@0.1.0-beta.1 ## 0.1.0-beta.0 ### Minor Changes - Initial beta release of the chkit ClickHouse schema and migration toolkit. Includes the CLI, core schema planner, codegen, ClickHouse client integration, and plugins for pull, typegen, and backfill. ### Patch Changes - Updated dependencies - @chkit/clickhouse@0.1.0-beta.0 - @chkit/core@0.1.0-beta.0