mainsequence 8.1.25.dev26__tar.gz → 8.1.26__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mainsequence-8.1.26/LICENSE +21 -0
- mainsequence-8.1.26/PKG-INFO +178 -0
- mainsequence-8.1.26/README.md +142 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/agent_scaffold/AGENTS.md +8 -9
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/agent_scaffold/skills/application_surfaces/api_surfaces/SKILL.md +1 -1
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/agent_scaffold/skills/maintenance/bug_auditor/SKILL.md +2 -4
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/agent_scaffold/skills/maintenance/code_repository_maintenance/SKILL.md +28 -13
- mainsequence-8.1.26/agent_scaffold/skills/maintenance/metatables_transition/SKILL.md +83 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/agent_scaffold/skills/platform_operations/access_control_and_sharing/SKILL.md +4 -10
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/agent_scaffold/skills/platform_operations/orchestration_and_releases/SKILL.md +3 -6
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/agent_scaffold/skills/sdk_code_repository_execution/SKILL.md +14 -20
- mainsequence-8.1.26/mainsequence/__init__.py +15 -0
- mainsequence-8.1.26/mainsequence/_request_identity.py +44 -0
- mainsequence-8.1.26/mainsequence/bootstrap.py +94 -0
- mainsequence-8.1.26/mainsequence/cli/__init__.py +1 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/cli/api.py +85 -996
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/cli/cli.py +422 -2072
- mainsequence-8.1.26/mainsequence/cli/config.py +1272 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/cli/doctor.py +58 -7
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/cli/local_ops.py +9 -3
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/cli/ssh_utils.py +4 -12
- mainsequence-8.1.26/mainsequence/cli/ui.py +87 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/client/__init__.py +0 -7
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/client/base.py +1 -7
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/client/models_foundry.py +8 -130
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/client/models_helpers.py +20 -4
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/client/models_user.py +38 -137
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/client/observability.py +4 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/client/utils.py +38 -94
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/client/value_sets.py +1 -1
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/code_repository_context.py +119 -62
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/code_repository_skills.py +28 -11
- mainsequence-8.1.26/mainsequence/instrumentation/__init__.py +12 -0
- mainsequence-8.1.26/mainsequence/server/__init__.py +1 -0
- mainsequence-8.1.26/mainsequence/server/caller_assertions.py +243 -0
- mainsequence-8.1.26/mainsequence/server/fastapi.py +266 -0
- mainsequence-8.1.26/mainsequence.egg-info/PKG-INFO +178 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence.egg-info/SOURCES.txt +14 -60
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence.egg-info/requires.txt +3 -9
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/pyproject.toml +14 -20
- mainsequence-8.1.26/tests/test_auth_bootstrap.py +182 -0
- mainsequence-8.1.26/tests/test_caller_assertions.py +267 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_canonical_api_route_contract.py +0 -28
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_cli.py +1402 -3424
- mainsequence-8.1.26/tests/test_cli_auth_contract.py +424 -0
- mainsequence-8.1.26/tests/test_cli_secure_storage.py +1030 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_client.py +0 -48
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_code_repository_branch_contract.py +0 -18
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_code_repository_runtime_context.py +6 -142
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_code_repository_skills.py +6 -21
- mainsequence-8.1.26/tests/test_dependency_extras.py +59 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_environment_response_contracts.py +0 -13
- mainsequence-8.1.26/tests/test_fastapi_request_identity.py +355 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_filter_normalization.py +63 -533
- mainsequence-8.1.26/tests/test_independent_context.py +305 -0
- mainsequence-8.1.26/tests/test_models_user_request_bound_auth.py +48 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_observability_client.py +2 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_scaffold_skills.py +24 -0
- mainsequence-8.1.26/tests/test_source_ownership.py +14 -0
- mainsequence-8.1.26/tests/test_user_application_facts.py +29 -0
- mainsequence-8.1.25.dev26/LICENSE +0 -40
- mainsequence-8.1.25.dev26/MANIFEST.in +0 -1
- mainsequence-8.1.25.dev26/PKG-INFO +0 -241
- mainsequence-8.1.25.dev26/README.md +0 -199
- mainsequence-8.1.25.dev26/agent_scaffold/skills/data_access/exploration/SKILL.md +0 -239
- mainsequence-8.1.25.dev26/agent_scaffold/skills/data_publishing/meta_table_migrations/SKILL.md +0 -153
- mainsequence-8.1.25.dev26/agent_scaffold/skills/data_publishing/meta_tables/SKILL.md +0 -470
- mainsequence-8.1.25.dev26/agent_scaffold/skills/data_publishing/time_index_table_updates/SKILL.md +0 -551
- mainsequence-8.1.25.dev26/mainsequence/__init__.py +0 -5
- mainsequence-8.1.25.dev26/mainsequence/bootstrap.py +0 -57
- mainsequence-8.1.25.dev26/mainsequence/cli/__init__.py +0 -1
- mainsequence-8.1.25.dev26/mainsequence/cli/config.py +0 -843
- mainsequence-8.1.25.dev26/mainsequence/cli/migrations.py +0 -1001
- mainsequence-8.1.25.dev26/mainsequence/cli/ui.py +0 -141
- mainsequence-8.1.25.dev26/mainsequence/client/data_sources_interfaces/__init__.py +0 -25
- mainsequence-8.1.25.dev26/mainsequence/client/data_sources_interfaces/duckdb.py +0 -1461
- mainsequence-8.1.25.dev26/mainsequence/client/data_sources_interfaces/local_paths.py +0 -14
- mainsequence-8.1.25.dev26/mainsequence/client/data_sources_interfaces/sqlite.py +0 -431
- mainsequence-8.1.25.dev26/mainsequence/client/dtype_codec.py +0 -515
- mainsequence-8.1.25.dev26/mainsequence/client/metatables/__init__.py +0 -27
- mainsequence-8.1.25.dev26/mainsequence/client/metatables/core.py +0 -4881
- mainsequence-8.1.25.dev26/mainsequence/instrumentation/__init__.py +0 -5
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/__init__.py +0 -133
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/__main__.py +0 -0
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/compiled_sql/__init__.py +0 -5
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/compiled_sql/v1.py +0 -166
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/future_registry.py +0 -28
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/hashing.py +0 -173
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/migrations/__init__.py +0 -1668
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/migrations/alembic.py +0 -165
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/migrations/env.py +0 -119
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/migrations/provider.py +0 -25
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/migrations/registry.py +0 -75
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/migrations/scaffold.py +0 -221
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/migrations/templates/__init__.py +0 -1
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/migrations/templates/env.py.mako +0 -8
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/migrations/templates/script.py.mako +0 -28
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/pydantic_metadata.py +0 -99
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/schema_names.py +0 -304
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/sqlalchemy_contracts.py +0 -1771
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/time_index_table_refs.py +0 -303
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/time_index_table_updates/__init__.py +0 -27
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/time_index_table_updates/configuration.py +0 -617
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/time_index_table_updates/dependencies.py +0 -9
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/time_index_table_updates/managers.py +0 -827
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/time_index_table_updates/namespacing.py +0 -52
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/time_index_table_updates/runner.py +0 -858
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/time_index_table_updates/updaters.py +0 -792
- mainsequence-8.1.25.dev26/mainsequence/meta_tables/time_index_table_updates/utils.py +0 -23
- mainsequence-8.1.25.dev26/mainsequence.egg-info/PKG-INFO +0 -241
- mainsequence-8.1.25.dev26/tests/fixtures/time_index_table_update_hash_v2_golden.json +0 -141
- mainsequence-8.1.25.dev26/tests/test_cli_migrations.py +0 -1026
- mainsequence-8.1.25.dev26/tests/test_dependency_extras.py +0 -161
- mainsequence-8.1.25.dev26/tests/test_duckdb_interface_dimensions.py +0 -299
- mainsequence-8.1.25.dev26/tests/test_meta_table_migrations.py +0 -2039
- mainsequence-8.1.25.dev26/tests/test_meta_tables_client_models.py +0 -1840
- mainsequence-8.1.25.dev26/tests/test_meta_tables_sqlalchemy_contracts.py +0 -2201
- mainsequence-8.1.25.dev26/tests/test_models_user_request_bound_auth.py +0 -195
- mainsequence-8.1.25.dev26/tests/test_pod_project_resolution.py +0 -223
- mainsequence-8.1.25.dev26/tests/test_schema_names.py +0 -104
- mainsequence-8.1.25.dev26/tests/test_source_table_configuration.py +0 -221
- mainsequence-8.1.25.dev26/tests/test_sqlite_interface_dimensions.py +0 -295
- mainsequence-8.1.25.dev26/tests/test_time_index_table_access_dimension_audit.py +0 -263
- mainsequence-8.1.25.dev26/tests/test_time_index_table_dimension_queries.py +0 -336
- mainsequence-8.1.25.dev26/tests/test_time_index_table_update_configuration.py +0 -357
- mainsequence-8.1.25.dev26/tests/test_time_index_table_update_configuration_client.py +0 -1128
- mainsequence-8.1.25.dev26/tests/test_time_index_table_update_flow.py +0 -672
- mainsequence-8.1.25.dev26/tests/test_time_index_table_update_hard_cut.py +0 -357
- mainsequence-8.1.25.dev26/tests/test_update_runner_uid_runtime.py +0 -501
- mainsequence-8.1.25.dev26/tests/test_update_statistics.py +0 -251
- mainsequence-8.1.25.dev26/tests/test_update_uid_guards.py +0 -45
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/agent_scaffold/skills/a2a_sdk_execution/SKILL.md +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/__main__.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/cli/browser_auth.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/cli/code_repository_status.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/cli/docker_utils.py +2 -2
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/cli/model_filters.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/cli/pydantic_cli.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/cli/sdk_utils.py +2 -2
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/client/agent_runtime_models.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/client/client.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/client/compute_validation.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/client/exceptions.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/client/github_issues.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/defaults.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/instrumentation/utils.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/logconf.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/repository_identity_security.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/runtime_flags.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence/scaffold_skills.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence.egg-info/dependency_links.txt +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence.egg-info/entry_points.txt +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/mainsequence.egg-info/top_level.txt +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/setup.cfg +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_auth_precedence.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_cli_browser_auth.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_code_repository_documentation_contract.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_dev_release_version.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_environment_resource_context.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_github_issues_client.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_instrumentation.py +0 -0
- /mainsequence-8.1.25.dev26/tests/test_code_repository_batch_jobs_from_file.py → /mainsequence-8.1.26/tests/test_job_client.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_local_ops.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_logconf.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_notification_uid_contract.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_secret_client_model.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_ssh_utils.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_tolerant_response_reading.py +0 -0
- {mainsequence-8.1.25.dev26 → mainsequence-8.1.26}/tests/test_tolerant_value_sets.py +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MainSequence GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mainsequence
|
|
3
|
+
Version: 8.1.26
|
|
4
|
+
Summary: Main Sequence SDK
|
|
5
|
+
Author-email: Main Sequence GmbH <dev@main-sequence.io>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/mainsequence-sdk/mainsequence-sdk
|
|
8
|
+
Project-URL: Issues, https://github.com/mainsequence-sdk/mainsequence-sdk/issues
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.13
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: cachetools
|
|
17
|
+
Requires-Dist: click>=8.3.3
|
|
18
|
+
Requires-Dist: concurrent-log-handler
|
|
19
|
+
Requires-Dist: keyring<26,>=25.7.0
|
|
20
|
+
Requires-Dist: opentelemetry-api
|
|
21
|
+
Requires-Dist: opentelemetry-exporter-otlp
|
|
22
|
+
Requires-Dist: opentelemetry-sdk
|
|
23
|
+
Requires-Dist: packaging>=24.2
|
|
24
|
+
Requires-Dist: protobuf>=6.33.5
|
|
25
|
+
Requires-Dist: psutil
|
|
26
|
+
Requires-Dist: pydantic<3,>=2.11
|
|
27
|
+
Requires-Dist: pygments>=2.20.0
|
|
28
|
+
Requires-Dist: pyyaml
|
|
29
|
+
Requires-Dist: requests>=2.33.0
|
|
30
|
+
Requires-Dist: structlog
|
|
31
|
+
Requires-Dist: typer
|
|
32
|
+
Requires-Dist: urllib3>=2.7.0
|
|
33
|
+
Provides-Extra: server
|
|
34
|
+
Requires-Dist: PyJWT[crypto]<3,>=2.10; extra == "server"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<img src="https://www.main-sequence.io/images/logos/MS_logo_long_black.png" alt="Main Sequence Logo" width="500"/>
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
# Main Sequence Python SDK
|
|
42
|
+
|
|
43
|
+
[](https://mainsequence-sdk.github.io/mainsequence-sdk/)
|
|
44
|
+
[](https://github.com/mainsequence-sdk/mainsequence-sdk/issues)
|
|
45
|
+
[](https://github.com/mainsequence-sdk/mainsequence-sdk/commits/main/)
|
|
46
|
+
[](https://github.com/mainsequence-sdk/mainsequence-sdk/commits/main/)
|
|
47
|
+
|
|
48
|
+
The Main Sequence Python SDK is the client and development toolkit for the Main
|
|
49
|
+
Sequence platform. It provides authentication, typed platform resources,
|
|
50
|
+
CodeRepository development and release operations, Agent and A2A workflows,
|
|
51
|
+
jobs, sharing, observability, logging, tracing, and reusable scaffold tooling.
|
|
52
|
+
|
|
53
|
+
MetaTables is now an independent domain package, installed as
|
|
54
|
+
`mainsequence-metatable` and imported as `metatables`. Table models, time-index
|
|
55
|
+
table updates, SQLAlchemy schemas, local database interfaces, and Alembic
|
|
56
|
+
execution are no longer implemented by this distribution.
|
|
57
|
+
|
|
58
|
+
## Repository Status
|
|
59
|
+
|
|
60
|
+
- Status: actively maintained
|
|
61
|
+
- Open issues: [GitHub Issues](https://github.com/mainsequence-sdk/mainsequence-sdk/issues)
|
|
62
|
+
- Documentation: [Documentation Site](https://mainsequence-sdk.github.io/mainsequence-sdk/)
|
|
63
|
+
- Security policy: [SECURITY.md](SECURITY.md)
|
|
64
|
+
- Release history: [CHANGELOG.md](CHANGELOG.md)
|
|
65
|
+
- Major-version migrations: [Migration guides](docs/migrations/v8-code-repository-ontology.md)
|
|
66
|
+
|
|
67
|
+
## What This Repository Contains
|
|
68
|
+
|
|
69
|
+
Main package areas:
|
|
70
|
+
|
|
71
|
+
- `mainsequence.client`: API client models for users, CodeRepositories, jobs,
|
|
72
|
+
Agents, artifacts, constants, secrets, sharing, releases, and other platform
|
|
73
|
+
resources
|
|
74
|
+
- `mainsequence.cli`: the complete `mainsequence` command-line interface for
|
|
75
|
+
authentication, platform resources, and local CodeRepository operations
|
|
76
|
+
- `mainsequence.instrumentation` and `mainsequence.logconf`: SDK tracing and
|
|
77
|
+
logging integration
|
|
78
|
+
- `mainsequence.server`: optional server-side caller assertion verification
|
|
79
|
+
- `mainsequence.scaffold_skills`: reusable, version-pinned skill copying for
|
|
80
|
+
this SDK and extension libraries
|
|
81
|
+
|
|
82
|
+
Repository areas:
|
|
83
|
+
|
|
84
|
+
- `agent_scaffold/`: version-matched SDK skills and managed `AGENTS.md` content
|
|
85
|
+
- `docs/`: knowledge guides, CLI docs, architecture decisions, and generated
|
|
86
|
+
reference docs
|
|
87
|
+
- `tests/`: offline tests plus explicitly marked live-backend tests
|
|
88
|
+
|
|
89
|
+
## Documentation Map
|
|
90
|
+
|
|
91
|
+
Recommended entry points:
|
|
92
|
+
|
|
93
|
+
- [Documentation home](docs/index.md)
|
|
94
|
+
- [Authentication](docs/knowledge/infrastructure/auth.md)
|
|
95
|
+
- [CLI overview](docs/cli/index.md)
|
|
96
|
+
- [Git source and Environment context](docs/knowledge/infrastructure/context.md)
|
|
97
|
+
- [Constants and Secrets](docs/knowledge/infrastructure/constants_and_secrets.md)
|
|
98
|
+
- [Scheduling Jobs](docs/knowledge/infrastructure/scheduling_jobs.md)
|
|
99
|
+
- [Resource releases](docs/knowledge/infrastructure/resource_releases.md)
|
|
100
|
+
- [Generated API reference](docs/reference/index.md)
|
|
101
|
+
- [MetaTables extraction guide](docs/migrations/metatables-sdk-removal.md)
|
|
102
|
+
- [ADR 0034](docs/adr/0034-extract-metatables-python-package.md)
|
|
103
|
+
|
|
104
|
+
The beginner tutorial is maintained in the separate
|
|
105
|
+
[MainSequence SDK tutorial CodeRepository](https://github.com/mainsequence-projects/mainsequence-sdk-tutorial).
|
|
106
|
+
|
|
107
|
+
## Quick Start
|
|
108
|
+
|
|
109
|
+
Install and authenticate:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pip install mainsequence
|
|
113
|
+
mainsequence login
|
|
114
|
+
mainsequence doctor
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
An already MCP-authenticated coding agent can establish the same persisted CLI
|
|
118
|
+
session with `mainsequence login --mcp`, then call the printed
|
|
119
|
+
`auth.cli_authorize` tool while the command waits. The backend supplies the
|
|
120
|
+
callback URI; tokens return directly to the CLI and are never exposed through
|
|
121
|
+
MCP.
|
|
122
|
+
|
|
123
|
+
Inspect and create CodeRepositories:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
mainsequence code-repository search
|
|
127
|
+
mainsequence code-repository create my-first-repository
|
|
128
|
+
mainsequence code-repository set-up-locally <CODE_REPOSITORY_UID>
|
|
129
|
+
cd my-first-repository
|
|
130
|
+
mainsequence code-repository build-local-venv --path .
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Use `mainsequence --help` and `mainsequence code-repository --help` for the
|
|
134
|
+
installed command surface. The CLI includes Agent and AgentSession,
|
|
135
|
+
CodeRepository, jobs and runs, images, resources and releases, constants,
|
|
136
|
+
secrets, teams, sharing, scaffold, Docker, and local-development commands.
|
|
137
|
+
|
|
138
|
+
## Python Client
|
|
139
|
+
|
|
140
|
+
`mainsequence.client` provides `AuthLoaders`, `MainSequenceClient`, generic
|
|
141
|
+
request and response helpers, and typed platform adapters. The platform owns
|
|
142
|
+
authorization and lifecycle policy. The SDK resolves CodeRepository source
|
|
143
|
+
identity from the current Git checkout when an operation requires that context.
|
|
144
|
+
|
|
145
|
+
Discover deployments with `ResourceRelease.filter(name=...)` or resolve a known
|
|
146
|
+
release UID with `ResourceRelease.get(pk=...)`. For shared deployments owned by
|
|
147
|
+
another repository, use the explicitly scoped `filter_admin` path. See
|
|
148
|
+
[Resource releases](docs/knowledge/infrastructure/resource_releases.md) for
|
|
149
|
+
supported filters and examples.
|
|
150
|
+
|
|
151
|
+
Server integrations can install `mainsequence[server]` for the
|
|
152
|
+
framework-independent [caller assertion verifier](docs/knowledge/server/caller_assertions.md).
|
|
153
|
+
Applications remain responsible for resource authorization and storage
|
|
154
|
+
operations.
|
|
155
|
+
|
|
156
|
+
Install `mainsequence-metatable` and import `metatables` for table-domain work.
|
|
157
|
+
See the [MetaTables migration guide](docs/migrations/metatables-sdk-removal.md)
|
|
158
|
+
for the install step, old and new imports, retired table CLI commands, and the
|
|
159
|
+
legacy SDK option.
|
|
160
|
+
|
|
161
|
+
## Development
|
|
162
|
+
|
|
163
|
+
This repository requires Python 3.13 or newer and uses `pyproject.toml` with a
|
|
164
|
+
development dependency group.
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
uv sync --group dev
|
|
168
|
+
pytest
|
|
169
|
+
ruff check .
|
|
170
|
+
mkdocs build --strict
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Live-backend tests are marked `live` and excluded from a normal test run. Run
|
|
174
|
+
them explicitly with `pytest -m live` when credentials and a target backend are
|
|
175
|
+
available.
|
|
176
|
+
|
|
177
|
+
Package metadata is defined in [pyproject.toml](pyproject.toml). This repository
|
|
178
|
+
is licensed under the MIT License; see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://www.main-sequence.io/images/logos/MS_logo_long_black.png" alt="Main Sequence Logo" width="500"/>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# Main Sequence Python SDK
|
|
6
|
+
|
|
7
|
+
[](https://mainsequence-sdk.github.io/mainsequence-sdk/)
|
|
8
|
+
[](https://github.com/mainsequence-sdk/mainsequence-sdk/issues)
|
|
9
|
+
[](https://github.com/mainsequence-sdk/mainsequence-sdk/commits/main/)
|
|
10
|
+
[](https://github.com/mainsequence-sdk/mainsequence-sdk/commits/main/)
|
|
11
|
+
|
|
12
|
+
The Main Sequence Python SDK is the client and development toolkit for the Main
|
|
13
|
+
Sequence platform. It provides authentication, typed platform resources,
|
|
14
|
+
CodeRepository development and release operations, Agent and A2A workflows,
|
|
15
|
+
jobs, sharing, observability, logging, tracing, and reusable scaffold tooling.
|
|
16
|
+
|
|
17
|
+
MetaTables is now an independent domain package, installed as
|
|
18
|
+
`mainsequence-metatable` and imported as `metatables`. Table models, time-index
|
|
19
|
+
table updates, SQLAlchemy schemas, local database interfaces, and Alembic
|
|
20
|
+
execution are no longer implemented by this distribution.
|
|
21
|
+
|
|
22
|
+
## Repository Status
|
|
23
|
+
|
|
24
|
+
- Status: actively maintained
|
|
25
|
+
- Open issues: [GitHub Issues](https://github.com/mainsequence-sdk/mainsequence-sdk/issues)
|
|
26
|
+
- Documentation: [Documentation Site](https://mainsequence-sdk.github.io/mainsequence-sdk/)
|
|
27
|
+
- Security policy: [SECURITY.md](SECURITY.md)
|
|
28
|
+
- Release history: [CHANGELOG.md](CHANGELOG.md)
|
|
29
|
+
- Major-version migrations: [Migration guides](docs/migrations/v8-code-repository-ontology.md)
|
|
30
|
+
|
|
31
|
+
## What This Repository Contains
|
|
32
|
+
|
|
33
|
+
Main package areas:
|
|
34
|
+
|
|
35
|
+
- `mainsequence.client`: API client models for users, CodeRepositories, jobs,
|
|
36
|
+
Agents, artifacts, constants, secrets, sharing, releases, and other platform
|
|
37
|
+
resources
|
|
38
|
+
- `mainsequence.cli`: the complete `mainsequence` command-line interface for
|
|
39
|
+
authentication, platform resources, and local CodeRepository operations
|
|
40
|
+
- `mainsequence.instrumentation` and `mainsequence.logconf`: SDK tracing and
|
|
41
|
+
logging integration
|
|
42
|
+
- `mainsequence.server`: optional server-side caller assertion verification
|
|
43
|
+
- `mainsequence.scaffold_skills`: reusable, version-pinned skill copying for
|
|
44
|
+
this SDK and extension libraries
|
|
45
|
+
|
|
46
|
+
Repository areas:
|
|
47
|
+
|
|
48
|
+
- `agent_scaffold/`: version-matched SDK skills and managed `AGENTS.md` content
|
|
49
|
+
- `docs/`: knowledge guides, CLI docs, architecture decisions, and generated
|
|
50
|
+
reference docs
|
|
51
|
+
- `tests/`: offline tests plus explicitly marked live-backend tests
|
|
52
|
+
|
|
53
|
+
## Documentation Map
|
|
54
|
+
|
|
55
|
+
Recommended entry points:
|
|
56
|
+
|
|
57
|
+
- [Documentation home](docs/index.md)
|
|
58
|
+
- [Authentication](docs/knowledge/infrastructure/auth.md)
|
|
59
|
+
- [CLI overview](docs/cli/index.md)
|
|
60
|
+
- [Git source and Environment context](docs/knowledge/infrastructure/context.md)
|
|
61
|
+
- [Constants and Secrets](docs/knowledge/infrastructure/constants_and_secrets.md)
|
|
62
|
+
- [Scheduling Jobs](docs/knowledge/infrastructure/scheduling_jobs.md)
|
|
63
|
+
- [Resource releases](docs/knowledge/infrastructure/resource_releases.md)
|
|
64
|
+
- [Generated API reference](docs/reference/index.md)
|
|
65
|
+
- [MetaTables extraction guide](docs/migrations/metatables-sdk-removal.md)
|
|
66
|
+
- [ADR 0034](docs/adr/0034-extract-metatables-python-package.md)
|
|
67
|
+
|
|
68
|
+
The beginner tutorial is maintained in the separate
|
|
69
|
+
[MainSequence SDK tutorial CodeRepository](https://github.com/mainsequence-projects/mainsequence-sdk-tutorial).
|
|
70
|
+
|
|
71
|
+
## Quick Start
|
|
72
|
+
|
|
73
|
+
Install and authenticate:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install mainsequence
|
|
77
|
+
mainsequence login
|
|
78
|
+
mainsequence doctor
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
An already MCP-authenticated coding agent can establish the same persisted CLI
|
|
82
|
+
session with `mainsequence login --mcp`, then call the printed
|
|
83
|
+
`auth.cli_authorize` tool while the command waits. The backend supplies the
|
|
84
|
+
callback URI; tokens return directly to the CLI and are never exposed through
|
|
85
|
+
MCP.
|
|
86
|
+
|
|
87
|
+
Inspect and create CodeRepositories:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
mainsequence code-repository search
|
|
91
|
+
mainsequence code-repository create my-first-repository
|
|
92
|
+
mainsequence code-repository set-up-locally <CODE_REPOSITORY_UID>
|
|
93
|
+
cd my-first-repository
|
|
94
|
+
mainsequence code-repository build-local-venv --path .
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Use `mainsequence --help` and `mainsequence code-repository --help` for the
|
|
98
|
+
installed command surface. The CLI includes Agent and AgentSession,
|
|
99
|
+
CodeRepository, jobs and runs, images, resources and releases, constants,
|
|
100
|
+
secrets, teams, sharing, scaffold, Docker, and local-development commands.
|
|
101
|
+
|
|
102
|
+
## Python Client
|
|
103
|
+
|
|
104
|
+
`mainsequence.client` provides `AuthLoaders`, `MainSequenceClient`, generic
|
|
105
|
+
request and response helpers, and typed platform adapters. The platform owns
|
|
106
|
+
authorization and lifecycle policy. The SDK resolves CodeRepository source
|
|
107
|
+
identity from the current Git checkout when an operation requires that context.
|
|
108
|
+
|
|
109
|
+
Discover deployments with `ResourceRelease.filter(name=...)` or resolve a known
|
|
110
|
+
release UID with `ResourceRelease.get(pk=...)`. For shared deployments owned by
|
|
111
|
+
another repository, use the explicitly scoped `filter_admin` path. See
|
|
112
|
+
[Resource releases](docs/knowledge/infrastructure/resource_releases.md) for
|
|
113
|
+
supported filters and examples.
|
|
114
|
+
|
|
115
|
+
Server integrations can install `mainsequence[server]` for the
|
|
116
|
+
framework-independent [caller assertion verifier](docs/knowledge/server/caller_assertions.md).
|
|
117
|
+
Applications remain responsible for resource authorization and storage
|
|
118
|
+
operations.
|
|
119
|
+
|
|
120
|
+
Install `mainsequence-metatable` and import `metatables` for table-domain work.
|
|
121
|
+
See the [MetaTables migration guide](docs/migrations/metatables-sdk-removal.md)
|
|
122
|
+
for the install step, old and new imports, retired table CLI commands, and the
|
|
123
|
+
legacy SDK option.
|
|
124
|
+
|
|
125
|
+
## Development
|
|
126
|
+
|
|
127
|
+
This repository requires Python 3.13 or newer and uses `pyproject.toml` with a
|
|
128
|
+
development dependency group.
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
uv sync --group dev
|
|
132
|
+
pytest
|
|
133
|
+
ruff check .
|
|
134
|
+
mkdocs build --strict
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Live-backend tests are marked `live` and excluded from a normal test run. Run
|
|
138
|
+
them explicitly with `pytest -m live` when credentials and a target backend are
|
|
139
|
+
available.
|
|
140
|
+
|
|
141
|
+
Package metadata is defined in [pyproject.toml](pyproject.toml). This repository
|
|
142
|
+
is licensed under the MIT License; see [LICENSE](LICENSE).
|
|
@@ -64,14 +64,13 @@ never owns or updates the `ms_tau_sdk` namespace.
|
|
|
64
64
|
`.agents/skills/mainsequence/maintenance/code_repository_maintenance/SKILL.md`
|
|
65
65
|
- Blocker analysis, failure classification, and SDK/platform contract mismatches:
|
|
66
66
|
`.agents/skills/mainsequence/maintenance/bug_auditor/SKILL.md`
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
`.agents/skills/mainsequence/data_publishing/meta_table_migrations/SKILL.md`
|
|
67
|
+
- MetaTable modeling, queries, external registration, table updates, Alembic
|
|
68
|
+
schema changes, and data discovery: use the skills the `metatables` package
|
|
69
|
+
installs under `.agents/skills/metatables/` and its documentation.
|
|
70
|
+
- Code that still imports `mainsequence.meta_tables` or
|
|
71
|
+
`mainsequence.client.metatables`, or calls the retired `mainsequence` table
|
|
72
|
+
and migration commands:
|
|
73
|
+
`.agents/skills/mainsequence/maintenance/metatables_transition/SKILL.md`
|
|
75
74
|
- FastAPI APIs serving the Command Center frontend:
|
|
76
75
|
`.agents/skills/mainsequence/application_surfaces/api_surfaces/SKILL.md`
|
|
77
76
|
- Jobs, schedules, images, resources, releases, and Artifacts:
|
|
@@ -96,7 +95,7 @@ never owns or updates the `ms_tau_sdk` namespace.
|
|
|
96
95
|
not ask users to inject CodeRepositoryBranch or Environment identity.
|
|
97
96
|
- Use the `mainsequence` CLI as the default platform control surface. Prefer
|
|
98
97
|
`--json` when output will be parsed or used as evidence.
|
|
99
|
-
- Use the
|
|
98
|
+
- Use the owning domain package before designing against an unfamiliar domain contract.
|
|
100
99
|
- Keep reusable business logic under `src/` and keep API, job, and other
|
|
101
100
|
integration layers thin.
|
|
102
101
|
- Verify only the platform objects relevant to the requested outcome.
|
|
@@ -88,7 +88,7 @@ Record:
|
|
|
88
88
|
administrative, webhook, external integration, or backend-to-backend
|
|
89
89
|
- the exact contract ID and role for each request or response body
|
|
90
90
|
- route paths, HTTP methods, authentication expectations, and error semantics
|
|
91
|
-
- upstream
|
|
91
|
+
- upstream domain-package, service, or external data dependencies
|
|
92
92
|
- whether the API uses backend transport or a contract-defined direct
|
|
93
93
|
development transport
|
|
94
94
|
|
|
@@ -52,10 +52,8 @@ This skill audits. It does not implement by default.
|
|
|
52
52
|
platform catalog; do not assume its filesystem path
|
|
53
53
|
- bootstrap, routing, and repository structure:
|
|
54
54
|
`.agents/skills/mainsequence/sdk_code_repository_execution/SKILL.md`
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
- MetaTable implementation issues:
|
|
58
|
-
`.agents/skills/mainsequence/data_publishing/meta_tables/SKILL.md`
|
|
55
|
+
- MetaTable and table-update implementation issues: use the installed
|
|
56
|
+
`metatables` package skill that owns the affected contract
|
|
59
57
|
- Command Center FastAPI contract or release issues:
|
|
60
58
|
`.agents/skills/mainsequence/application_surfaces/api_surfaces/SKILL.md`
|
|
61
59
|
- jobs, images, releases, and runtime environment issues:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: mainsequence-code-repository-maintenance
|
|
3
3
|
description: Maintain an existing Main Sequence CodeRepository checkout using the SDK-version-matched CLI. Use for inspecting repository state, building or repairing .venv, refreshing local authentication, performing explicitly requested SDK, skill, or AGENTS.md updates, publishing changes with CodeRepository sync, or diagnosing a partially completed maintenance workflow.
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -22,7 +22,7 @@ Own:
|
|
|
22
22
|
Do not own:
|
|
23
23
|
|
|
24
24
|
- platform ontology or CodeRepository Blueprint design;
|
|
25
|
-
- domain implementation for
|
|
25
|
+
- domain implementation for data packages, APIs, jobs, or releases;
|
|
26
26
|
- backend repository reconciliation;
|
|
27
27
|
- MCP authorization policy, OAuth token storage, or access-token extraction;
|
|
28
28
|
- repository-owned skills outside `.agents/skills/mainsequence/`.
|
|
@@ -91,10 +91,10 @@ mainsequence code-repository build-local-venv --path . --recreate
|
|
|
91
91
|
Treat `.venv` as generated state, never as source code or durable repository
|
|
92
92
|
documentation.
|
|
93
93
|
|
|
94
|
-
## Refresh
|
|
94
|
+
## Refresh Authentication
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
existing authentication lane:
|
|
96
|
+
Authentication belongs to the machine, not to a CodeRepository. Establish the
|
|
97
|
+
CLI session through exactly one existing authentication lane:
|
|
98
98
|
|
|
99
99
|
- When `MAINSEQUENCE_AUTH_MODE=runtime_credential`, run `mainsequence login`.
|
|
100
100
|
The CLI exchanges the injected runtime credential without a browser or a
|
|
@@ -114,24 +114,39 @@ terminal. If `auth.cli_authorize` returns an error, preserve the pending local
|
|
|
114
114
|
workflow output and report that exact error rather than starting multiple
|
|
115
115
|
handoffs blindly.
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
The session is one record per backend in the operating system credential
|
|
118
|
+
store. A login made from any CodeRepository serves every other one on the
|
|
119
|
+
machine, and the SDK reads the saved session when it is imported. No
|
|
120
|
+
CodeRepository holds a copy: `.env` has the backend endpoint and no credential.
|
|
121
|
+
|
|
122
|
+
Renew the saved session and confirm that it works:
|
|
119
123
|
|
|
120
124
|
```bash
|
|
121
|
-
mainsequence
|
|
125
|
+
mainsequence refresh-token
|
|
122
126
|
```
|
|
123
127
|
|
|
128
|
+
The command takes no path, because the session does not belong to a checkout.
|
|
129
|
+
It renews the access token, saves it, and reports the session without printing
|
|
130
|
+
a token value. When the directory it runs in has a `.env` with an access token,
|
|
131
|
+
a refresh token, or a runtime credential left by an earlier version or another
|
|
132
|
+
tool, it removes those entries and reports them by name only; it changes
|
|
133
|
+
nothing else in that file.
|
|
134
|
+
|
|
124
135
|
Require one supported Main Sequence CLI login lane first. Never print,
|
|
125
136
|
inspect, summarize, copy, or return access and refresh token values. Do not
|
|
126
137
|
attempt to extract the calling MCP host's protected bearer token: the handoff
|
|
127
138
|
authorizes a new PKCE grant and the backend returns credentials directly to
|
|
128
139
|
the waiting CLI process.
|
|
129
140
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
141
|
+
Never write a token into `.env` to make a tool work. `mainsequence auth status`
|
|
142
|
+
reports whether a session exists, when it expires, and whether the process
|
|
143
|
+
takes its credentials from its environment or from the saved session; it
|
|
144
|
+
prints no token value. `mainsequence auth token` exists for local tools that
|
|
145
|
+
consume a short-lived access token programmatically. Do not run it to read a
|
|
146
|
+
token into the conversation.
|
|
147
|
+
|
|
148
|
+
The Git checkout supplies source identity; switching branches changes context
|
|
149
|
+
on the next process run without rewriting `.env`.
|
|
135
150
|
|
|
136
151
|
## Update The CodeRepository SDK
|
|
137
152
|
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mainsequence-metatables-transition
|
|
3
|
+
description: "Use when a repository still depends on the MetaTables code that used to ship inside `mainsequence`: imports from `mainsequence.meta_tables` or `mainsequence.client.metatables`, table classes imported from `mainsequence.client`, or the retired `mainsequence meta-table`, `time-index-table`, `code-repository time-index-table-updates`, and `migrations` commands. Covers only the one-time move to the `mainsequence-metatable` package; all MetaTables usage after the move belongs to the skills that package installs."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Move a repository to the `metatables` package
|
|
7
|
+
|
|
8
|
+
MetaTables no longer ships inside `mainsequence`. This skill moves one
|
|
9
|
+
repository's code and dependencies to the package that now owns it, and stops
|
|
10
|
+
there. It does not move tables or catalog records. For table modeling, queries,
|
|
11
|
+
DataSources, updaters, and Alembic migrations, use the skills installed in
|
|
12
|
+
step 2.
|
|
13
|
+
|
|
14
|
+
## 1. Find what the repository uses
|
|
15
|
+
|
|
16
|
+
Search code, scripts, workflow files, and `pyproject.toml` for:
|
|
17
|
+
|
|
18
|
+
- `mainsequence.meta_tables` and `mainsequence.client.metatables`
|
|
19
|
+
- `MetaTable`, `TimeIndexMetaTable`, `TimeIndexTableUpdate`, or `DataSource`
|
|
20
|
+
imported from `mainsequence.client`
|
|
21
|
+
- `mainsequence meta-table`, `mainsequence time-index-table`,
|
|
22
|
+
`mainsequence code-repository time-index-table-updates`, and
|
|
23
|
+
`mainsequence migrations`
|
|
24
|
+
- the `mainsequence[local-data]` extra
|
|
25
|
+
|
|
26
|
+
Report what you found before editing. If nothing matches, there is nothing to
|
|
27
|
+
move.
|
|
28
|
+
|
|
29
|
+
## 2. Install the package and its skills
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
uv add mainsequence-metatable
|
|
33
|
+
uv run python -m metatables.sdk_compat
|
|
34
|
+
uv run metatables copy-metatables-skills --path .
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The distribution is `mainsequence-metatable`; the import and the command are
|
|
38
|
+
`metatables`. Do not install the PyPI project named `metatables`: it is
|
|
39
|
+
unrelated. The compatibility check must pass before you continue. If it fails,
|
|
40
|
+
the installed `mainsequence` is not compatible; upgrading it is an update the
|
|
41
|
+
user has to request.
|
|
42
|
+
|
|
43
|
+
The last command copies the package's skills into `.agents/skills/metatables/`.
|
|
44
|
+
|
|
45
|
+
`mainsequence-metatable` brings back `alembic`, `sqlalchemy`, `pandas`,
|
|
46
|
+
`numpy`, `psycopg2-binary`, and `tqdm`, which the SDK no longer installs. The
|
|
47
|
+
`local-data` extra is gone: remove it, and declare `duckdb` and `pyarrow`
|
|
48
|
+
directly if the repository imports them.
|
|
49
|
+
|
|
50
|
+
## 3. Rewrite imports
|
|
51
|
+
|
|
52
|
+
| Old | New |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| `mainsequence.meta_tables` | `metatables` |
|
|
55
|
+
| `mainsequence.meta_tables.<module>` | `metatables.<module>` |
|
|
56
|
+
| `mainsequence.meta_tables.time_index_table_updates.<module>` | `metatables.updaters.<module>` |
|
|
57
|
+
| `mainsequence.client.metatables`, `mainsequence.client.metatables.core` | `metatables.models` |
|
|
58
|
+
| table classes from `mainsequence.client` | `metatables` |
|
|
59
|
+
|
|
60
|
+
Change module paths only. In an existing Alembic provider, update the provider
|
|
61
|
+
module and `env.py` the same way, and leave applied revision files untouched.
|
|
62
|
+
If a name is missing from `metatables`, report it instead of guessing a
|
|
63
|
+
substitute.
|
|
64
|
+
|
|
65
|
+
`CodeRepositoryBranch.get_time_index_table_updates()` and DataSource resolution
|
|
66
|
+
through `CodeRepositoryContext` have no SDK replacement. The `metatables` skills
|
|
67
|
+
cover what to use instead.
|
|
68
|
+
|
|
69
|
+
## 4. Replace commands
|
|
70
|
+
|
|
71
|
+
The four command groups keep their names: `mainsequence <group> ...` becomes
|
|
72
|
+
`metatables <group> ...`. Confirm each one with `metatables <group> --help`. If
|
|
73
|
+
a subcommand is missing or refuses to run, stop and report it. Do not pin an
|
|
74
|
+
older `mainsequence`, connect to the database directly, or register tables by
|
|
75
|
+
hand to get around it.
|
|
76
|
+
|
|
77
|
+
## 5. Check the result
|
|
78
|
+
|
|
79
|
+
- The search from step 1 returns nothing.
|
|
80
|
+
- The changed modules import and the repository's tests pass.
|
|
81
|
+
- `.agents/skills/metatables/` exists.
|
|
82
|
+
|
|
83
|
+
Then hand over to those skills.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mainsequence-access-control-and-sharing
|
|
3
|
-
description: Use this skill when the task is about RBAC, resource sharing, or access verification in a Main Sequence CodeRepository. This skill owns organization and team access concepts, view and edit semantics, choosing the correct shareable resource boundary, and access checks across CodeRepositories,
|
|
3
|
+
description: Use this skill when the task is about RBAC, resource sharing, or access verification in a Main Sequence CodeRepository. This skill owns organization and team access concepts, view and edit semantics, choosing the correct shareable resource boundary, and access checks across CodeRepositories, constants, secrets, buckets, artifacts, and releases. It does not own job scheduling, domain-package data behavior, or API route design.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Main Sequence Access Control And Sharing
|
|
@@ -26,13 +26,11 @@ This skill is for:
|
|
|
26
26
|
- decide whether a user needs `view` or `edit`
|
|
27
27
|
- identify the correct shareable object boundary:
|
|
28
28
|
- `CodeRepository`
|
|
29
|
-
- `TimeIndexMetaTable`
|
|
30
29
|
- `Constant`
|
|
31
30
|
- `Secret`
|
|
32
31
|
- `Bucket`
|
|
33
32
|
- `Artifact`
|
|
34
33
|
- `ResourceRelease`
|
|
35
|
-
- explain that sharing an updater's published output means sharing its `TimeIndexMetaTable`
|
|
36
34
|
- choose whether configuration belongs in a `Constant` or a `Secret`
|
|
37
35
|
- review CLI sharing flows for existing resources
|
|
38
36
|
- verify access assumptions before claiming a workflow is shareable
|
|
@@ -42,8 +40,7 @@ This skill is for:
|
|
|
42
40
|
This skill must not claim ownership of:
|
|
43
41
|
|
|
44
42
|
- job scheduling or image pinning
|
|
45
|
-
-
|
|
46
|
-
- MetaTable schema design
|
|
43
|
+
- domain-package data production and schema design
|
|
47
44
|
- FastAPI route design
|
|
48
45
|
- application UI design or implementation
|
|
49
46
|
|
|
@@ -51,10 +48,8 @@ This skill must not claim ownership of:
|
|
|
51
48
|
|
|
52
49
|
- jobs, schedules, images, code repository resources, releases, and Artifacts as operational workflows:
|
|
53
50
|
`.agents/skills/mainsequence/platform_operations/orchestration_and_releases/SKILL.md`
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
- MetaTables:
|
|
57
|
-
`.agents/skills/mainsequence/data_publishing/meta_tables/SKILL.md`
|
|
51
|
+
- MetaTables and table updates: use the installed `metatables` package skills
|
|
52
|
+
and documentation
|
|
58
53
|
- Command Center-serving FastAPI providers:
|
|
59
54
|
`.agents/skills/mainsequence/application_surfaces/api_surfaces/SKILL.md`
|
|
60
55
|
This skill only reasons about access to deployed resources such as `ResourceRelease`.
|
|
@@ -108,7 +103,6 @@ Do not speak loosely about sharing "the code" when the operational boundary is a
|
|
|
108
103
|
|
|
109
104
|
Examples:
|
|
110
105
|
|
|
111
|
-
- sharing an updater's published output usually means sharing the `TimeIndexMetaTable`
|
|
112
106
|
- sharing a deployed experience usually means sharing the `ResourceRelease`
|
|
113
107
|
- sharing runtime configuration means sharing the `Constant` or `Secret`
|
|
114
108
|
|
|
@@ -32,18 +32,15 @@ This skill is for:
|
|
|
32
32
|
|
|
33
33
|
This skill must not claim ownership of:
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
- MetaTable schema and row semantics
|
|
35
|
+
- domain-package data production and schema semantics
|
|
37
36
|
- Command Center FastAPI wire contracts
|
|
38
37
|
- RBAC or sharing policy
|
|
39
38
|
- application UI implementation details
|
|
40
39
|
|
|
41
40
|
## Route Adjacent Work
|
|
42
41
|
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
- MetaTables:
|
|
46
|
-
`.agents/skills/mainsequence/data_publishing/meta_tables/SKILL.md`
|
|
42
|
+
- MetaTables, table updates, and table schemas: use the installed `metatables`
|
|
43
|
+
package skills and documentation
|
|
47
44
|
- Command Center FastAPI provider implementation and contract validation:
|
|
48
45
|
`.agents/skills/mainsequence/application_surfaces/api_surfaces/SKILL.md`
|
|
49
46
|
- RBAC and sharing:
|