MetaTables SDK extraction
ADR 0034 moves the MetaTables Python domain out of mainsequence and into an
independent package. Its distribution is mainsequence-metatable; the import
and the command are metatables. The extraction does not reduce unrelated Main
Sequence platform functionality.
Release boundary
SDK 9.0.1 marks the MetaTables extraction as a breaking public API change.
The extraction already shipped in SDK 8.1.26 and 8.1.27 despite being a
breaking change. Those releases do not retain the former MetaTables imports or
commands. 9.0.1 introduces no additional removal; it corrects the release
classification. SDK 8.1.25 contains the former implementation, but its
compatibility with a current backend must be verified before pinning it.
Version 9.0.0 was previously published and yanked. Its distribution filenames
cannot be reused, so this major-version transition starts at 9.0.1.
Install
After a direct package-manager upgrade, refresh the SDK's owned skills and
instructions with the installed checkout's CLI. This requires no login;
update-sdk already includes this refresh:
uv run --offline mainsequence code-repository update-agent-skills --path .
The copy completely replaces .agents/skills/mainsequence/ with the installed
SDK bundle, deleting retired SDK table skills. It does not change
.agents/skills/metatables/ or other libraries' skills. Platform skills use
the separate authenticated update-platform-skills command and namespace;
they are no longer mixed into the SDK-owned folder.
SDK guidance now lives in skills; repository-owned AGENTS.md is left untouched.
uv add mainsequence-metatable
uv run python -m metatables.sdk_compat
uv run metatables copy-metatables-skills --path .
Do not install the PyPI project named metatables: it is unrelated. The second
command checks that the installed SDK is compatible. The third copies the
package's skills into .agents/skills/metatables/.
The SDK no longer installs alembic, sqlalchemy, pandas, numpy,
psycopg2-binary, or tqdm; mainsequence-metatable depends on them. The
local-data extra is removed. Declare duckdb and pyarrow directly if your
code imports them.
Python imports
| Former SDK path | Domain package path |
|---|---|
mainsequence.meta_tables |
metatables |
mainsequence.meta_tables.<module> |
metatables.<module> |
mainsequence.meta_tables.time_index_table_updates.<module> |
metatables.updaters.<module> |
mainsequence.meta_tables.migrations.<module> |
metatables.migrations.<module> |
mainsequence.client.metatables |
metatables.models or public root exports |
The SDK no longer exports MetaTable, TimeIndexMetaTable,
TimeIndexTableUpdate, DataSource, the dtype codec, local DuckDB/SQLite table
interfaces, or MetaTables constants. It does not resolve a MetaTables DataSource
through CodeRepositoryContext, and
CodeRepositoryBranch.get_time_index_table_updates() is no longer an SDK
operation.
Use the installed metatables package, its skills, and its version-matched
documentation for table modeling, queries, DataSources, update execution, and
Alembic migrations. The SDK scaffold keeps one MetaTables skill,
maintenance/metatables_transition, which covers only the move described on
this page.
CLI boundary
The retired CLI surfaces are limited to the table domain:
meta-tableandmeta_tabletime-index-tablecode-repository time-index-table-updatesmigrations, whose implementation was tied to the extracted MetaTables Alembic package
Authentication, users, Agent and AgentSession operations, A2A execution,
CodeRepository lifecycle and local development, jobs and runs, images,
resources and releases, constants, secrets, teams, sharing, SDK utilities,
skills, diagnostics, structured output, and Docker/devcontainer workflows
remain supported by the mainsequence CLI.
Unchanged SDK responsibilities
The extraction does not remove or replace:
Constant.create_constants_if_not_exist()ResourceRelease.wait_for_runtime_access()- AgentSession A2A message and task helpers
- runtime-access and A2A-handle caches used by the CLI
- CodeRepository scaffold installation and update commands
- logging, tracing, diagnostics, or process helpers
Consumers still using the legacy Django TS service can pin the last released
SDK version that contains the former imports while they migrate. Confirm the
compatible metatables version with the domain package release notes before
upgrading production consumers.