mainsequence 9.0.0__tar.gz → 9.0.1.dev30__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-9.0.1.dev30/LICENSE +21 -0
- mainsequence-9.0.1.dev30/PKG-INFO +178 -0
- mainsequence-9.0.1.dev30/README.md +142 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/agent_scaffold/AGENTS.md +8 -9
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/agent_scaffold/skills/a2a_sdk_execution/SKILL.md +7 -5
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/agent_scaffold/skills/application_surfaces/api_surfaces/SKILL.md +82 -23
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/agent_scaffold/skills/maintenance/bug_auditor/SKILL.md +2 -4
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/agent_scaffold/skills/maintenance/code_repository_maintenance/SKILL.md +28 -13
- mainsequence-9.0.1.dev30/agent_scaffold/skills/maintenance/metatables_transition/SKILL.md +83 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/agent_scaffold/skills/platform_operations/access_control_and_sharing/SKILL.md +10 -14
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/agent_scaffold/skills/platform_operations/orchestration_and_releases/SKILL.md +45 -110
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/agent_scaffold/skills/sdk_code_repository_execution/SKILL.md +14 -20
- mainsequence-9.0.1.dev30/mainsequence/__init__.py +15 -0
- mainsequence-9.0.1.dev30/mainsequence/_request_identity.py +44 -0
- mainsequence-9.0.1.dev30/mainsequence/bootstrap.py +94 -0
- mainsequence-9.0.1.dev30/mainsequence/cli/__init__.py +1 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/cli/api.py +118 -1401
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/cli/cli.py +349 -3231
- mainsequence-9.0.1.dev30/mainsequence/cli/config.py +1272 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/cli/doctor.py +58 -7
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/cli/local_ops.py +9 -3
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/cli/ssh_utils.py +4 -12
- mainsequence-9.0.1.dev30/mainsequence/cli/ui.py +87 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/client/__init__.py +0 -7
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/client/agent_runtime_models.py +65 -67
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/client/base.py +20 -8
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/client/github_issues.py +8 -3
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/client/models_foundry.py +18 -278
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/client/models_helpers.py +105 -597
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/client/models_user.py +48 -143
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/client/observability.py +18 -9
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/client/utils.py +38 -94
- mainsequence-9.0.1.dev30/mainsequence/client/value_sets.py +164 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/code_repository_context.py +119 -62
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/code_repository_skills.py +28 -11
- mainsequence-9.0.1.dev30/mainsequence/instrumentation/__init__.py +12 -0
- mainsequence-9.0.1.dev30/mainsequence/server/__init__.py +1 -0
- mainsequence-9.0.1.dev30/mainsequence/server/caller_assertions.py +243 -0
- mainsequence-9.0.1.dev30/mainsequence/server/fastapi.py +266 -0
- mainsequence-9.0.1.dev30/mainsequence.egg-info/PKG-INFO +178 -0
- mainsequence-9.0.1.dev30/mainsequence.egg-info/SOURCES.txt +96 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence.egg-info/requires.txt +3 -9
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/pyproject.toml +28 -17
- mainsequence-9.0.1.dev30/tests/test_auth_bootstrap.py +182 -0
- mainsequence-9.0.1.dev30/tests/test_caller_assertions.py +267 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_canonical_api_route_contract.py +2 -13
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_cli.py +1668 -4691
- mainsequence-9.0.1.dev30/tests/test_cli_auth_contract.py +450 -0
- mainsequence-9.0.1.dev30/tests/test_cli_secure_storage.py +1030 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_client.py +4 -47
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_code_repository_branch_contract.py +20 -24
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_code_repository_documentation_contract.py +103 -4
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_code_repository_runtime_context.py +6 -139
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_code_repository_skills.py +6 -21
- mainsequence-9.0.1.dev30/tests/test_dependency_extras.py +59 -0
- mainsequence-9.0.1.dev30/tests/test_dev_release_version.py +169 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_environment_response_contracts.py +5 -18
- mainsequence-9.0.1.dev30/tests/test_fastapi_request_identity.py +355 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_filter_normalization.py +307 -881
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_github_issues_client.py +54 -91
- mainsequence-9.0.1.dev30/tests/test_independent_context.py +305 -0
- mainsequence-9.0.0/tests/test_code_repository_batch_jobs_from_file.py → mainsequence-9.0.1.dev30/tests/test_job_client.py +27 -18
- mainsequence-9.0.1.dev30/tests/test_models_user_request_bound_auth.py +48 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_observability_client.py +8 -5
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_scaffold_skills.py +24 -0
- mainsequence-9.0.1.dev30/tests/test_source_ownership.py +14 -0
- mainsequence-9.0.1.dev30/tests/test_tolerant_response_reading.py +137 -0
- mainsequence-9.0.1.dev30/tests/test_tolerant_value_sets.py +248 -0
- mainsequence-9.0.1.dev30/tests/test_user_application_facts.py +29 -0
- mainsequence-9.0.0/LICENSE +0 -40
- mainsequence-9.0.0/MANIFEST.in +0 -1
- mainsequence-9.0.0/PKG-INFO +0 -241
- mainsequence-9.0.0/README.md +0 -199
- mainsequence-9.0.0/agent_scaffold/skills/data_access/exploration/SKILL.md +0 -239
- mainsequence-9.0.0/agent_scaffold/skills/data_publishing/meta_table_migrations/SKILL.md +0 -145
- mainsequence-9.0.0/agent_scaffold/skills/data_publishing/meta_tables/SKILL.md +0 -469
- mainsequence-9.0.0/agent_scaffold/skills/data_publishing/time_index_table_updates/SKILL.md +0 -550
- mainsequence-9.0.0/mainsequence/__init__.py +0 -5
- mainsequence-9.0.0/mainsequence/bootstrap.py +0 -57
- mainsequence-9.0.0/mainsequence/cli/__init__.py +0 -1
- mainsequence-9.0.0/mainsequence/cli/config.py +0 -843
- mainsequence-9.0.0/mainsequence/cli/migrations.py +0 -1001
- mainsequence-9.0.0/mainsequence/cli/ui.py +0 -141
- mainsequence-9.0.0/mainsequence/client/data_sources_interfaces/__init__.py +0 -25
- mainsequence-9.0.0/mainsequence/client/data_sources_interfaces/duckdb.py +0 -1461
- mainsequence-9.0.0/mainsequence/client/data_sources_interfaces/local_paths.py +0 -14
- mainsequence-9.0.0/mainsequence/client/data_sources_interfaces/sqlite.py +0 -431
- mainsequence-9.0.0/mainsequence/client/dtype_codec.py +0 -515
- mainsequence-9.0.0/mainsequence/client/metatables/__init__.py +0 -27
- mainsequence-9.0.0/mainsequence/client/metatables/core.py +0 -4905
- mainsequence-9.0.0/mainsequence/instrumentation/__init__.py +0 -5
- mainsequence-9.0.0/mainsequence/meta_tables/__init__.py +0 -133
- mainsequence-9.0.0/mainsequence/meta_tables/__main__.py +0 -0
- mainsequence-9.0.0/mainsequence/meta_tables/compiled_sql/__init__.py +0 -5
- mainsequence-9.0.0/mainsequence/meta_tables/compiled_sql/v1.py +0 -166
- mainsequence-9.0.0/mainsequence/meta_tables/future_registry.py +0 -28
- mainsequence-9.0.0/mainsequence/meta_tables/hashing.py +0 -173
- mainsequence-9.0.0/mainsequence/meta_tables/migrations/__init__.py +0 -1668
- mainsequence-9.0.0/mainsequence/meta_tables/migrations/alembic.py +0 -165
- mainsequence-9.0.0/mainsequence/meta_tables/migrations/env.py +0 -119
- mainsequence-9.0.0/mainsequence/meta_tables/migrations/provider.py +0 -25
- mainsequence-9.0.0/mainsequence/meta_tables/migrations/registry.py +0 -75
- mainsequence-9.0.0/mainsequence/meta_tables/migrations/scaffold.py +0 -221
- mainsequence-9.0.0/mainsequence/meta_tables/migrations/templates/__init__.py +0 -1
- mainsequence-9.0.0/mainsequence/meta_tables/migrations/templates/env.py.mako +0 -8
- mainsequence-9.0.0/mainsequence/meta_tables/migrations/templates/script.py.mako +0 -28
- mainsequence-9.0.0/mainsequence/meta_tables/pydantic_metadata.py +0 -99
- mainsequence-9.0.0/mainsequence/meta_tables/schema_names.py +0 -304
- mainsequence-9.0.0/mainsequence/meta_tables/sqlalchemy_contracts.py +0 -1771
- mainsequence-9.0.0/mainsequence/meta_tables/time_index_table_refs.py +0 -303
- mainsequence-9.0.0/mainsequence/meta_tables/time_index_table_updates/__init__.py +0 -27
- mainsequence-9.0.0/mainsequence/meta_tables/time_index_table_updates/configuration.py +0 -617
- mainsequence-9.0.0/mainsequence/meta_tables/time_index_table_updates/dependencies.py +0 -9
- mainsequence-9.0.0/mainsequence/meta_tables/time_index_table_updates/managers.py +0 -827
- mainsequence-9.0.0/mainsequence/meta_tables/time_index_table_updates/namespacing.py +0 -52
- mainsequence-9.0.0/mainsequence/meta_tables/time_index_table_updates/runner.py +0 -858
- mainsequence-9.0.0/mainsequence/meta_tables/time_index_table_updates/updaters.py +0 -792
- mainsequence-9.0.0/mainsequence/meta_tables/time_index_table_updates/utils.py +0 -23
- mainsequence-9.0.0/mainsequence.egg-info/PKG-INFO +0 -241
- mainsequence-9.0.0/mainsequence.egg-info/SOURCES.txt +0 -138
- mainsequence-9.0.0/tests/fixtures/time_index_table_update_hash_v2_golden.json +0 -141
- mainsequence-9.0.0/tests/test_cli_migrations.py +0 -1026
- mainsequence-9.0.0/tests/test_dependency_extras.py +0 -161
- mainsequence-9.0.0/tests/test_duckdb_interface_dimensions.py +0 -299
- mainsequence-9.0.0/tests/test_meta_table_migrations.py +0 -2039
- mainsequence-9.0.0/tests/test_meta_tables_client_models.py +0 -1796
- mainsequence-9.0.0/tests/test_meta_tables_sqlalchemy_contracts.py +0 -2201
- mainsequence-9.0.0/tests/test_models_user_request_bound_auth.py +0 -195
- mainsequence-9.0.0/tests/test_pod_project_resolution.py +0 -223
- mainsequence-9.0.0/tests/test_schema_names.py +0 -104
- mainsequence-9.0.0/tests/test_source_table_configuration.py +0 -215
- mainsequence-9.0.0/tests/test_sqlite_interface_dimensions.py +0 -295
- mainsequence-9.0.0/tests/test_time_index_table_access_dimension_audit.py +0 -263
- mainsequence-9.0.0/tests/test_time_index_table_dimension_queries.py +0 -336
- mainsequence-9.0.0/tests/test_time_index_table_update_configuration.py +0 -357
- mainsequence-9.0.0/tests/test_time_index_table_update_configuration_client.py +0 -1082
- mainsequence-9.0.0/tests/test_time_index_table_update_flow.py +0 -670
- mainsequence-9.0.0/tests/test_time_index_table_update_hard_cut.py +0 -357
- mainsequence-9.0.0/tests/test_update_runner_uid_runtime.py +0 -501
- mainsequence-9.0.0/tests/test_update_statistics.py +0 -251
- mainsequence-9.0.0/tests/test_update_uid_guards.py +0 -46
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/__main__.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/cli/browser_auth.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/cli/code_repository_status.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/cli/docker_utils.py +2 -2
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/cli/model_filters.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/cli/pydantic_cli.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/cli/sdk_utils.py +2 -2
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/client/client.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/client/compute_validation.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/client/exceptions.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/defaults.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/instrumentation/utils.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/logconf.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/repository_identity_security.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/runtime_flags.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence/scaffold_skills.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence.egg-info/dependency_links.txt +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence.egg-info/entry_points.txt +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/mainsequence.egg-info/top_level.txt +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/setup.cfg +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_auth_precedence.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_cli_browser_auth.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_environment_resource_context.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_instrumentation.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_local_ops.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_logconf.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_notification_uid_contract.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_secret_client_model.py +0 -0
- {mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/tests/test_ssh_utils.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: 9.0.1.dev30
|
|
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.
|
{mainsequence-9.0.0 → mainsequence-9.0.1.dev30}/agent_scaffold/skills/a2a_sdk_execution/SKILL.md
RENAMED
|
@@ -43,14 +43,16 @@ internally and sends a standard A2A message.
|
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
mainsequence agent search "<discoveryPrompt>" \
|
|
46
|
-
--environment-uid "<organizationEnvironmentUid>" \
|
|
47
46
|
--limit 10 \
|
|
48
47
|
--json
|
|
49
48
|
```
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
The SDK resolves the active Git branch once for the process and scopes discovery
|
|
51
|
+
to its Organization Environment. Do not supply a branch or Environment UID.
|
|
52
|
+
An unregistered branch fails only when discovery is attempted.
|
|
53
|
+
For an exact Python lookup, use `Agent.filter(name="SentinelExecutor")` and
|
|
54
|
+
inspect the returned Agent UID and `code_repository_branch_uid`; names are not
|
|
55
|
+
unique routing authority.
|
|
54
56
|
|
|
55
57
|
4. Treat the CLI output as authoritative.
|
|
56
58
|
5. Prefer the highest `combined_score` when present.
|
|
@@ -321,7 +323,7 @@ handle for a different task or conversation.
|
|
|
321
323
|
## Deterministic Execution Path
|
|
322
324
|
|
|
323
325
|
1. Build the discovery prompt.
|
|
324
|
-
2. Run `mainsequence agent search "<discoveryPrompt>" --
|
|
326
|
+
2. Run `mainsequence agent search "<discoveryPrompt>" --limit <n> --json`.
|
|
325
327
|
3. Select the target agent.
|
|
326
328
|
4. Create or resolve the target session with `mainsequence agent session get_or_create`.
|
|
327
329
|
5. Use the returned session `uid`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mainsequence-command-center-fastapi
|
|
3
|
-
description: Build, contract-test, release, and verify a FastAPI code repository resource
|
|
3
|
+
description: Build, contract-test, release, and verify a FastAPI code repository resource serving the Command Center frontend, including applications with public OAuth callback or webhook routes. Use when implementing a Command Center wire contract, declaring exact public ingress, or validating the deployed API.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Command Center FastAPI Release Lifecycle
|
|
@@ -88,11 +88,11 @@ 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
|
|
|
95
|
-
FastAPI
|
|
95
|
+
Authenticated FastAPI routes receive the human caller from the Main Sequence
|
|
96
96
|
platform through injected request state. No SDK authentication setup is
|
|
97
97
|
required in repository code:
|
|
98
98
|
|
|
@@ -111,21 +111,74 @@ def get_me(request: Request) -> dict[str, str | None]:
|
|
|
111
111
|
}
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
authentication headers, or resolve the request user itself. Consume
|
|
114
|
+
Protected route code must not detect local versus deployed execution, parse
|
|
115
|
+
authentication headers, or resolve the request user itself. Consume the
|
|
116
116
|
platform-injected human caller identity:
|
|
117
117
|
|
|
118
118
|
- `request.state.user` contains canonical `uid` and optional `username`
|
|
119
119
|
- `request.state.user_uid` is the canonical public user UUID
|
|
120
120
|
- `request.state.user_id` does not exist
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
release creator, deployment owner, runtime workload
|
|
124
|
-
target. Pass request state explicitly to shared services;
|
|
125
|
-
`User.get_logged_user()` as a FastAPI entry point. Platform-injected identity is
|
|
122
|
+
On a protected route, this identity is the human making the current HTTP
|
|
123
|
+
request. It is not the release creator, deployment owner, runtime workload
|
|
124
|
+
principal, or runtime target. Pass request state explicitly to shared services;
|
|
125
|
+
do not use `User.get_logged_user()` as a FastAPI entry point. Platform-injected identity is
|
|
126
126
|
not resource authorization; use `request.state.user_uid` when applying the
|
|
127
127
|
endpoint's authorization policy.
|
|
128
128
|
|
|
129
|
+
### Public provider callbacks and webhooks
|
|
130
|
+
|
|
131
|
+
An external OAuth redirect or webhook cannot supply a Main Sequence Bearer token.
|
|
132
|
+
For a FastAPI release that needs one, use the platform's exact `public_ingress`
|
|
133
|
+
policy. CORS configuration and an app-declared route alone do not make a path
|
|
134
|
+
public. Ordinary routes remain Bearer authenticated.
|
|
135
|
+
|
|
136
|
+
1. Implement the provider handler in the FastAPI app loaded by the workflow's
|
|
137
|
+
`source_path`. Declare only its exact `GET` or `POST` method and literal
|
|
138
|
+
root-relative path under the `kind: fastapi` resource's
|
|
139
|
+
`spec.public_ingress`. The policy is not inferred from decorators or OpenAPI.
|
|
140
|
+
Do not include query strings, route parameters, wildcards, or a hostname.
|
|
141
|
+
The default empty list exposes no public paths. In a validated workflow
|
|
142
|
+
resource, the declaration has this shape:
|
|
143
|
+
|
|
144
|
+
```yaml
|
|
145
|
+
kind: fastapi
|
|
146
|
+
spec:
|
|
147
|
+
source_path: api/provider/main.py
|
|
148
|
+
public_ingress:
|
|
149
|
+
- method: GET
|
|
150
|
+
path: /integrations/provider/oauth/callback/
|
|
151
|
+
- method: POST
|
|
152
|
+
path: /integrations/provider/webhook/
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
2. Fetch the exact CodeRepositoryBranch's current workflow template; use its
|
|
156
|
+
advertised version and fields. Validate the proposed workflow file through
|
|
157
|
+
the branch's `validate-workflow` action, then commit the handler and workflow
|
|
158
|
+
file and push the intended branch. Do not set the reserved
|
|
159
|
+
`FASTAPI_PUBLIC_INGRESS` environment value yourself.
|
|
160
|
+
3. Follow the repository event and DeploymentRun to a ready active revision.
|
|
161
|
+
A validated file or successful push is not proof of public admission. Read
|
|
162
|
+
`resource_release.get` and confirm the pair appears in both desired
|
|
163
|
+
`public_ingress` and active `effective_public_ingress`. Only then append the
|
|
164
|
+
declared path to the backend-returned `public_url` and register that full
|
|
165
|
+
callback or webhook URI with the provider. Do not construct a hostname.
|
|
166
|
+
4. Send a provider-style request without a Main Sequence Bearer token to the
|
|
167
|
+
exact public pair. Check that an unlisted path or wrong method is denied.
|
|
168
|
+
An admitted request has `request.state.user` and `user_uid` set to `None`
|
|
169
|
+
and `request.state.auth_outcome == "public_ingress"`. The handler must verify
|
|
170
|
+
OAuth state and exchange codes, or verify the webhook signature against the
|
|
171
|
+
original body and reject replays. Public admission supplies no User or
|
|
172
|
+
provider identity. Keep provider secrets and live codes out of workflow YAML,
|
|
173
|
+
logs, and test evidence.
|
|
174
|
+
|
|
175
|
+
An existing release can change its desired policy through the canonical
|
|
176
|
+
`resource_release.update` operation. Adding a pair still requires a later ready
|
|
177
|
+
revision containing the route before it becomes public. Removing a desired pair
|
|
178
|
+
denies it immediately. The platform skill
|
|
179
|
+
`mainsequence://platform/skills/code-repository-workflows` owns the detailed
|
|
180
|
+
automatic deployment procedure and current workflow shape.
|
|
181
|
+
|
|
129
182
|
### 2. Implement the provider
|
|
130
183
|
|
|
131
184
|
Keep Command Center contract-bearing route code focused on transport and
|
|
@@ -187,35 +240,38 @@ Before release, verify local CodeRepository resolution:
|
|
|
187
240
|
mainsequence code-repository current --debug --json
|
|
188
241
|
```
|
|
189
242
|
|
|
190
|
-
|
|
243
|
+
Declare the FastAPI resource in `.mainsequence/workflows/`, validate the
|
|
244
|
+
workflow against the backend template, then move the tested commit through the
|
|
245
|
+
canonical lifecycle:
|
|
191
246
|
|
|
192
247
|
```bash
|
|
193
248
|
mainsequence code-repository sync -m "Release Command Center API"
|
|
194
|
-
mainsequence code-repository images create
|
|
195
249
|
mainsequence code-repository resources list --filter resource_type=fastapi
|
|
196
|
-
mainsequence code-repository resources create_fastapi
|
|
197
250
|
```
|
|
198
251
|
|
|
199
252
|
Verify that:
|
|
200
253
|
|
|
201
254
|
- code-repository sync used the intended Git branch
|
|
202
|
-
- the
|
|
203
|
-
- resource discovery found
|
|
204
|
-
-
|
|
205
|
-
- the
|
|
255
|
+
- the workflow declaration identifies the tested FastAPI source path
|
|
256
|
+
- resource discovery found that path at the exact deployed commit
|
|
257
|
+
- Django resolved and built the exact image for the workflow event
|
|
258
|
+
- the resulting release kind is `fastapi`
|
|
259
|
+
- any declared `public_ingress` pair matches a mounted FastAPI handler
|
|
206
260
|
- compute and spot settings are intentional
|
|
207
261
|
|
|
208
|
-
|
|
209
|
-
frontend contracts are stable
|
|
210
|
-
|
|
262
|
+
Enable automatic deployment in the repository workflow when the route paths,
|
|
263
|
+
resource path, and frontend contracts are stable enough for future repository
|
|
264
|
+
events to promote exact images.
|
|
211
265
|
|
|
212
266
|
### 6. Verify the deployed API
|
|
213
267
|
|
|
214
|
-
Request runtime access for the deployed FastAPI
|
|
215
|
-
Django and wait for Django's ready result. Use the
|
|
216
|
-
|
|
268
|
+
Request runtime access for protected routes on the deployed FastAPI
|
|
269
|
+
`ResourceRelease` through Django and wait for Django's ready result. Use the
|
|
270
|
+
returned access bundle for authenticated checks. For declared public routes,
|
|
271
|
+
use the provider URI without a Main Sequence Bearer token:
|
|
217
272
|
|
|
218
|
-
1. verify authentication
|
|
273
|
+
1. verify protected-route authentication and, when configured, exact
|
|
274
|
+
unauthenticated public-ingress method/path behavior
|
|
219
275
|
2. execute representative contract-bearing requests
|
|
220
276
|
3. validate returned JSON against the same repository-pinned schemas
|
|
221
277
|
4. exercise the consuming Command Center frontend flow
|
|
@@ -235,6 +291,9 @@ Report:
|
|
|
235
291
|
- Git commit, code repository image UID, code repository resource UID, and release identity
|
|
236
292
|
- deployed contract validation and Command Center frontend result
|
|
237
293
|
- whether automatic deployment is enabled and why
|
|
294
|
+
- for public provider routes, the declared method/path pairs, observed
|
|
295
|
+
`effective_public_ingress`, backend-returned provider URI, and unauthenticated
|
|
296
|
+
positive and negative request results
|
|
238
297
|
|
|
239
298
|
The Command Center-facing release is complete only when the frontend consumes
|
|
240
299
|
the deployed contract-bearing responses and they pass the contracts from the
|
|
@@ -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:
|