ms-tau-sdk 1.0.0__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.
Files changed (56) hide show
  1. ms_tau_sdk-1.0.0/.gitignore +15 -0
  2. ms_tau_sdk-1.0.0/CHANGELOG.md +22 -0
  3. ms_tau_sdk-1.0.0/PKG-INFO +162 -0
  4. ms_tau_sdk-1.0.0/README.md +134 -0
  5. ms_tau_sdk-1.0.0/pyproject.toml +101 -0
  6. ms_tau_sdk-1.0.0/src/ms_tau_sdk/__init__.py +10 -0
  7. ms_tau_sdk-1.0.0/src/ms_tau_sdk/agents/__init__.py +5 -0
  8. ms_tau_sdk-1.0.0/src/ms_tau_sdk/agents/sessionless.py +25 -0
  9. ms_tau_sdk-1.0.0/src/ms_tau_sdk/agents/snapshot.py +44 -0
  10. ms_tau_sdk-1.0.0/src/ms_tau_sdk/api/__init__.py +1 -0
  11. ms_tau_sdk-1.0.0/src/ms_tau_sdk/api/a2a.py +2246 -0
  12. ms_tau_sdk-1.0.0/src/ms_tau_sdk/api/chat.py +150 -0
  13. ms_tau_sdk-1.0.0/src/ms_tau_sdk/api/dependencies.py +28 -0
  14. ms_tau_sdk-1.0.0/src/ms_tau_sdk/api/health.py +46 -0
  15. ms_tau_sdk-1.0.0/src/ms_tau_sdk/api/models.py +55 -0
  16. ms_tau_sdk-1.0.0/src/ms_tau_sdk/api/responses.py +546 -0
  17. ms_tau_sdk-1.0.0/src/ms_tau_sdk/api/sessions.py +54 -0
  18. ms_tau_sdk-1.0.0/src/ms_tau_sdk/app.py +110 -0
  19. ms_tau_sdk-1.0.0/src/ms_tau_sdk/application.py +57 -0
  20. ms_tau_sdk-1.0.0/src/ms_tau_sdk/backend/__init__.py +1 -0
  21. ms_tau_sdk-1.0.0/src/ms_tau_sdk/backend/auth.py +106 -0
  22. ms_tau_sdk-1.0.0/src/ms_tau_sdk/backend/client.py +808 -0
  23. ms_tau_sdk-1.0.0/src/ms_tau_sdk/backend/mcp.py +306 -0
  24. ms_tau_sdk-1.0.0/src/ms_tau_sdk/backend/models.py +422 -0
  25. ms_tau_sdk-1.0.0/src/ms_tau_sdk/backend/routes.py +93 -0
  26. ms_tau_sdk-1.0.0/src/ms_tau_sdk/cli.py +25 -0
  27. ms_tau_sdk-1.0.0/src/ms_tau_sdk/errors.py +52 -0
  28. ms_tau_sdk-1.0.0/src/ms_tau_sdk/logging.py +727 -0
  29. ms_tau_sdk-1.0.0/src/ms_tau_sdk/protocols/__init__.py +1 -0
  30. ms_tau_sdk-1.0.0/src/ms_tau_sdk/protocols/a2a_message.py +398 -0
  31. ms_tau_sdk-1.0.0/src/ms_tau_sdk/protocols/a2a_roles.py +23 -0
  32. ms_tau_sdk-1.0.0/src/ms_tau_sdk/protocols/assistant_ui.py +218 -0
  33. ms_tau_sdk-1.0.0/src/ms_tau_sdk/protocols/strict_json.py +144 -0
  34. ms_tau_sdk-1.0.0/src/ms_tau_sdk/providers/__init__.py +5 -0
  35. ms_tau_sdk-1.0.0/src/ms_tau_sdk/providers/definitions.py +24 -0
  36. ms_tau_sdk-1.0.0/src/ms_tau_sdk/providers/factory.py +489 -0
  37. ms_tau_sdk-1.0.0/src/ms_tau_sdk/resources/SYSTEM.md +12 -0
  38. ms_tau_sdk-1.0.0/src/ms_tau_sdk/resources/__init__.py +1 -0
  39. ms_tau_sdk-1.0.0/src/ms_tau_sdk/resources/loader.py +17 -0
  40. ms_tau_sdk-1.0.0/src/ms_tau_sdk/resources/prompts/review-code-repository.md +17 -0
  41. ms_tau_sdk-1.0.0/src/ms_tau_sdk/runtime/__init__.py +5 -0
  42. ms_tau_sdk-1.0.0/src/ms_tau_sdk/runtime/events.py +34 -0
  43. ms_tau_sdk-1.0.0/src/ms_tau_sdk/runtime/extensions.py +58 -0
  44. ms_tau_sdk-1.0.0/src/ms_tau_sdk/runtime/failures.py +85 -0
  45. ms_tau_sdk-1.0.0/src/ms_tau_sdk/runtime/manager.py +1189 -0
  46. ms_tau_sdk-1.0.0/src/ms_tau_sdk/runtime/observability.py +429 -0
  47. ms_tau_sdk-1.0.0/src/ms_tau_sdk/runtime/provenance.py +191 -0
  48. ms_tau_sdk-1.0.0/src/ms_tau_sdk/runtime/session.py +99 -0
  49. ms_tau_sdk-1.0.0/src/ms_tau_sdk/runtime/snapshots.py +101 -0
  50. ms_tau_sdk-1.0.0/src/ms_tau_sdk/runtime/task_context.py +52 -0
  51. ms_tau_sdk-1.0.0/src/ms_tau_sdk/sessions/__init__.py +5 -0
  52. ms_tau_sdk-1.0.0/src/ms_tau_sdk/sessions/storage.py +441 -0
  53. ms_tau_sdk-1.0.0/src/ms_tau_sdk/settings.py +242 -0
  54. ms_tau_sdk-1.0.0/src/ms_tau_sdk/tools/__init__.py +1 -0
  55. ms_tau_sdk-1.0.0/src/ms_tau_sdk/tools/mainsequence_mcp.py +306 -0
  56. ms_tau_sdk-1.0.0/src/ms_tau_sdk/tools/task_control.py +128 -0
@@ -0,0 +1,15 @@
1
+ # Python cache and virtualenvs
2
+ __pycache__/
3
+ *.py[cod]
4
+ .venv/
5
+ venv/
6
+
7
+ # Environment files and local secrets
8
+ .env
9
+ .env.*
10
+ !.env.example
11
+ .astro/
12
+ release-dist/
13
+
14
+ # OS files
15
+ .DS_Store
@@ -0,0 +1,22 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0 — 2026-09-16
4
+
5
+ - Established Main Sequence TAU SDK as the `ms-tau-sdk` Python distribution, `ms_tau_sdk`
6
+ namespace, and `ms-tau` process command.
7
+ - Made every process project-workspace-bound and exposed `create_app` plus `TauSDKSettings` as the
8
+ public construction surface.
9
+ - Preserved the existing Main Sequence transports, runtime-credential client, provider hydration,
10
+ durable and sessionless Tau execution, persistence, streaming, A2A, MCP, and lifecycle behavior.
11
+ - Adopted Tau-native project `.tau` configuration and project-owned extensions with no parallel SDK
12
+ prompt configuration or deployment enable flag.
13
+ - Removed container, Compose, Kubernetes, image, overlay, wheelhouse, and optional web/search/video
14
+ tool ownership from this project.
15
+ - Added allowlisted wheel/sdist verification, isolated installed-process checks, release checksums,
16
+ dependency/provenance metadata, build attestation, and PyPI trusted-publishing automation.
17
+ - Declared the reviewed Python API, command, settings, project-configuration, and tested wire
18
+ contracts as the first stable compatibility surface.
19
+ - Removed residual provider-specific image-build and push material from the historical archive.
20
+
21
+ The changelog for the retired deployment project is retained as
22
+ [historical context](./docs/history/astro/CHANGELOG.md).
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.5
2
+ Name: ms-tau-sdk
3
+ Version: 1.0.0
4
+ Summary: Workspace-bound Tau application primitives for Main Sequence projects
5
+ Project-URL: Changelog, https://github.com/mainsequence-sdk/ms-tau-sdk/blob/development/CHANGELOG.md
6
+ Project-URL: Documentation, https://github.com/mainsequence-sdk/ms-tau-sdk/tree/development/docs
7
+ Project-URL: Issues, https://github.com/mainsequence-sdk/ms-tau-sdk/issues
8
+ Project-URL: Repository, https://github.com/mainsequence-sdk/ms-tau-sdk
9
+ Keywords: agents,main-sequence,sdk,tau
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Framework :: FastAPI
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Requires-Python: >=3.13
15
+ Requires-Dist: anyio>=4.10
16
+ Requires-Dist: fastapi>=0.116
17
+ Requires-Dist: httpx>=0.28
18
+ Requires-Dist: jsonschema<5,>=4.25
19
+ Requires-Dist: mcp<2,>=1.27
20
+ Requires-Dist: pydantic-settings>=2.10
21
+ Requires-Dist: pydantic>=2.11
22
+ Requires-Dist: pypdf<7,>=6.0
23
+ Requires-Dist: python-multipart>=0.0.20
24
+ Requires-Dist: structlog<27,>=26.1
25
+ Requires-Dist: tau-ai==0.4.2
26
+ Requires-Dist: uvicorn[standard]>=0.35
27
+ Description-Content-Type: text/markdown
28
+
29
+ <p align="center">
30
+ <a href="https://www.main-sequence.io">
31
+ <img src="https://www.main-sequence.io/images/logos/MS_logo_long_black.png" alt="Main Sequence" width="460">
32
+ </a>
33
+ </p>
34
+
35
+ <h1 align="center">Main Sequence TAU SDK</h1>
36
+
37
+ <p align="center">
38
+ <strong>Run Tau as a workspace-native Main Sequence coding agent.</strong>
39
+ </p>
40
+
41
+ <p align="center">
42
+ <a href="https://pypi.org/project/ms-tau-sdk/"><img src="https://img.shields.io/pypi/v/ms-tau-sdk.svg?logo=pypi&amp;logoColor=white" alt="PyPI version"></a>
43
+ <a href="https://pypi.org/project/ms-tau-sdk/"><img src="https://img.shields.io/pypi/pyversions/ms-tau-sdk.svg" alt="Supported Python versions"></a>
44
+ <a href="https://github.com/mainsequence-sdk/ms-tau-sdk/actions/workflows/quality.yml"><img src="https://github.com/mainsequence-sdk/ms-tau-sdk/actions/workflows/quality.yml/badge.svg?branch=development" alt="Quality checks"></a>
45
+ <a href="https://github.com/mainsequence-sdk/ms-tau-sdk/actions/workflows/publish-to-pipy.yml"><img src="https://github.com/mainsequence-sdk/ms-tau-sdk/actions/workflows/publish-to-pipy.yml/badge.svg" alt="PyPI publication"></a>
46
+ <a href="https://github.com/mainsequence-sdk/ms-tau-sdk/issues"><img src="https://img.shields.io/github/issues/mainsequence-sdk/ms-tau-sdk.svg" alt="Open issues"></a>
47
+ </p>
48
+
49
+ `ms-tau-sdk` packages the Tau runtime integration, Main Sequence authentication and transports,
50
+ and durable agent-session machinery as a normal Python dependency. A project installs the SDK and
51
+ runs it from its own workspace—there is no separate Astro image, executor overlay, or second
52
+ deployment model.
53
+
54
+ | Contract | Value |
55
+ | --- | --- |
56
+ | PyPI distribution | `ms-tau-sdk` |
57
+ | Python package | `ms_tau_sdk` |
58
+ | Command | `ms-tau` |
59
+ | Python entry point | `ms_tau_sdk.app:create_app` |
60
+ | Required Python | 3.13 or newer |
61
+ | Project customization | Standard workspace `.tau/` configuration |
62
+
63
+ ## Quick start
64
+
65
+ Add the SDK to the project that will host the agent:
66
+
67
+ ```bash
68
+ uv add ms-tau-sdk
69
+ ```
70
+
71
+ Provide the runtime credential that Main Sequence assigned to the deployment:
72
+
73
+ ```bash
74
+ export MAINSEQUENCE_BACKEND="https://api.main-sequence.app"
75
+ export MAINSEQUENCE_RUNTIME_CREDENTIAL_ID="<runtime-credential-id>"
76
+ export MAINSEQUENCE_RUNTIME_CREDENTIAL_SECRET="<runtime-credential-secret>"
77
+ ```
78
+
79
+ Start the service from the project workspace:
80
+
81
+ ```bash
82
+ uv run ms-tau
83
+ ```
84
+
85
+ The credential pair is exchanged for short-lived Main Sequence access tokens. Do not commit it or
86
+ place it in `.tau` configuration. For an embedded ASGI deployment, construct the same application
87
+ in Python:
88
+
89
+ ```python
90
+ from ms_tau_sdk import create_app
91
+
92
+ app = create_app()
93
+ ```
94
+
95
+ ## Workspace-owned Tau behavior
96
+
97
+ The consuming repository owns the effective Tau configuration. It can override the packaged Tau
98
+ defaults and install project-specific tools through the normal `.tau/` structure:
99
+
100
+ ```text
101
+ your-project/
102
+ ├── .tau/
103
+ │ ├── SYSTEM.md
104
+ │ ├── settings.json
105
+ │ └── extensions/
106
+ ├── pyproject.toml
107
+ └── uv.lock
108
+ ```
109
+
110
+ Extensions run as project code in the same process and trust boundary as the rest of the
111
+ repository. Optional capabilities such as general web access belong in a project extension; they
112
+ are not bundled into the SDK. Main Sequence transport and protocol behavior remains SDK-owned.
113
+
114
+ ## Included capabilities
115
+
116
+ - FastAPI application construction and lifecycle management
117
+ - runtime-credential exchange and authenticated Main Sequence backend access
118
+ - provider validation and credential hydration
119
+ - durable Tau sessions, leases, restore, persistence, cancellation, eviction, and shutdown
120
+ - sessionless Tau execution
121
+ - chat, responses, SSE, A2A, health, and readiness transports
122
+ - Main Sequence MCP and protocol-required task controls
123
+ - packaged defaults that participate in Tau's normal workspace configuration
124
+
125
+ ## Deployment boundary
126
+
127
+ This repository publishes Python distributions only. It contains no Dockerfile, Compose stack,
128
+ Kubernetes manifest, runtime image, executor bundle, or container-publication pipeline. The
129
+ consuming project owns its dependency lock, deployable artifact, system dependencies, project
130
+ code, prompts, skills, hooks, and extensions.
131
+
132
+ The project identity and migration are defined by
133
+ [ADR 56](./docs/adrs/adr-56-main-sequence-tau-sdk-workspace-bound-library-deployment.md). See the
134
+ [quickstart](./docs/getting-started/quickstart.md), [documentation index](./docs/README.md), and
135
+ [release guide](./docs/reference/releasing.md) for the complete contracts.
136
+
137
+ ## Development
138
+
139
+ The repository uses Python 3.13 and `uv`:
140
+
141
+ ```bash
142
+ uv sync --frozen
143
+ uv run pytest
144
+ uv run ruff check .
145
+ uv run mypy
146
+ ```
147
+
148
+ Releases are immutable and tag-driven. Pushing a tag that exactly matches the package version—for
149
+ example, `v1.0.0`—builds and verifies the wheel and source distribution, then publishes them to
150
+ PyPI through OIDC trusted publishing. No PyPI API token or container registry is involved.
151
+
152
+ ## Built on Tau
153
+
154
+ <p align="center">
155
+ <a href="https://github.com/huggingface/tau">
156
+ <img src="https://raw.githubusercontent.com/huggingface/tau/main/docs/assets/tau-header.svg" alt="Tau" width="760">
157
+ </a>
158
+ </p>
159
+
160
+ Main Sequence TAU SDK integrates the open-source
161
+ [Tau coding agent](https://github.com/huggingface/tau) into the Main Sequence platform while
162
+ preserving Tau's workspace-native configuration and extension model.
@@ -0,0 +1,134 @@
1
+ <p align="center">
2
+ <a href="https://www.main-sequence.io">
3
+ <img src="https://www.main-sequence.io/images/logos/MS_logo_long_black.png" alt="Main Sequence" width="460">
4
+ </a>
5
+ </p>
6
+
7
+ <h1 align="center">Main Sequence TAU SDK</h1>
8
+
9
+ <p align="center">
10
+ <strong>Run Tau as a workspace-native Main Sequence coding agent.</strong>
11
+ </p>
12
+
13
+ <p align="center">
14
+ <a href="https://pypi.org/project/ms-tau-sdk/"><img src="https://img.shields.io/pypi/v/ms-tau-sdk.svg?logo=pypi&amp;logoColor=white" alt="PyPI version"></a>
15
+ <a href="https://pypi.org/project/ms-tau-sdk/"><img src="https://img.shields.io/pypi/pyversions/ms-tau-sdk.svg" alt="Supported Python versions"></a>
16
+ <a href="https://github.com/mainsequence-sdk/ms-tau-sdk/actions/workflows/quality.yml"><img src="https://github.com/mainsequence-sdk/ms-tau-sdk/actions/workflows/quality.yml/badge.svg?branch=development" alt="Quality checks"></a>
17
+ <a href="https://github.com/mainsequence-sdk/ms-tau-sdk/actions/workflows/publish-to-pipy.yml"><img src="https://github.com/mainsequence-sdk/ms-tau-sdk/actions/workflows/publish-to-pipy.yml/badge.svg" alt="PyPI publication"></a>
18
+ <a href="https://github.com/mainsequence-sdk/ms-tau-sdk/issues"><img src="https://img.shields.io/github/issues/mainsequence-sdk/ms-tau-sdk.svg" alt="Open issues"></a>
19
+ </p>
20
+
21
+ `ms-tau-sdk` packages the Tau runtime integration, Main Sequence authentication and transports,
22
+ and durable agent-session machinery as a normal Python dependency. A project installs the SDK and
23
+ runs it from its own workspace—there is no separate Astro image, executor overlay, or second
24
+ deployment model.
25
+
26
+ | Contract | Value |
27
+ | --- | --- |
28
+ | PyPI distribution | `ms-tau-sdk` |
29
+ | Python package | `ms_tau_sdk` |
30
+ | Command | `ms-tau` |
31
+ | Python entry point | `ms_tau_sdk.app:create_app` |
32
+ | Required Python | 3.13 or newer |
33
+ | Project customization | Standard workspace `.tau/` configuration |
34
+
35
+ ## Quick start
36
+
37
+ Add the SDK to the project that will host the agent:
38
+
39
+ ```bash
40
+ uv add ms-tau-sdk
41
+ ```
42
+
43
+ Provide the runtime credential that Main Sequence assigned to the deployment:
44
+
45
+ ```bash
46
+ export MAINSEQUENCE_BACKEND="https://api.main-sequence.app"
47
+ export MAINSEQUENCE_RUNTIME_CREDENTIAL_ID="<runtime-credential-id>"
48
+ export MAINSEQUENCE_RUNTIME_CREDENTIAL_SECRET="<runtime-credential-secret>"
49
+ ```
50
+
51
+ Start the service from the project workspace:
52
+
53
+ ```bash
54
+ uv run ms-tau
55
+ ```
56
+
57
+ The credential pair is exchanged for short-lived Main Sequence access tokens. Do not commit it or
58
+ place it in `.tau` configuration. For an embedded ASGI deployment, construct the same application
59
+ in Python:
60
+
61
+ ```python
62
+ from ms_tau_sdk import create_app
63
+
64
+ app = create_app()
65
+ ```
66
+
67
+ ## Workspace-owned Tau behavior
68
+
69
+ The consuming repository owns the effective Tau configuration. It can override the packaged Tau
70
+ defaults and install project-specific tools through the normal `.tau/` structure:
71
+
72
+ ```text
73
+ your-project/
74
+ ├── .tau/
75
+ │ ├── SYSTEM.md
76
+ │ ├── settings.json
77
+ │ └── extensions/
78
+ ├── pyproject.toml
79
+ └── uv.lock
80
+ ```
81
+
82
+ Extensions run as project code in the same process and trust boundary as the rest of the
83
+ repository. Optional capabilities such as general web access belong in a project extension; they
84
+ are not bundled into the SDK. Main Sequence transport and protocol behavior remains SDK-owned.
85
+
86
+ ## Included capabilities
87
+
88
+ - FastAPI application construction and lifecycle management
89
+ - runtime-credential exchange and authenticated Main Sequence backend access
90
+ - provider validation and credential hydration
91
+ - durable Tau sessions, leases, restore, persistence, cancellation, eviction, and shutdown
92
+ - sessionless Tau execution
93
+ - chat, responses, SSE, A2A, health, and readiness transports
94
+ - Main Sequence MCP and protocol-required task controls
95
+ - packaged defaults that participate in Tau's normal workspace configuration
96
+
97
+ ## Deployment boundary
98
+
99
+ This repository publishes Python distributions only. It contains no Dockerfile, Compose stack,
100
+ Kubernetes manifest, runtime image, executor bundle, or container-publication pipeline. The
101
+ consuming project owns its dependency lock, deployable artifact, system dependencies, project
102
+ code, prompts, skills, hooks, and extensions.
103
+
104
+ The project identity and migration are defined by
105
+ [ADR 56](./docs/adrs/adr-56-main-sequence-tau-sdk-workspace-bound-library-deployment.md). See the
106
+ [quickstart](./docs/getting-started/quickstart.md), [documentation index](./docs/README.md), and
107
+ [release guide](./docs/reference/releasing.md) for the complete contracts.
108
+
109
+ ## Development
110
+
111
+ The repository uses Python 3.13 and `uv`:
112
+
113
+ ```bash
114
+ uv sync --frozen
115
+ uv run pytest
116
+ uv run ruff check .
117
+ uv run mypy
118
+ ```
119
+
120
+ Releases are immutable and tag-driven. Pushing a tag that exactly matches the package version—for
121
+ example, `v1.0.0`—builds and verifies the wheel and source distribution, then publishes them to
122
+ PyPI through OIDC trusted publishing. No PyPI API token or container registry is involved.
123
+
124
+ ## Built on Tau
125
+
126
+ <p align="center">
127
+ <a href="https://github.com/huggingface/tau">
128
+ <img src="https://raw.githubusercontent.com/huggingface/tau/main/docs/assets/tau-header.svg" alt="Tau" width="760">
129
+ </a>
130
+ </p>
131
+
132
+ Main Sequence TAU SDK integrates the open-source
133
+ [Tau coding agent](https://github.com/huggingface/tau) into the Main Sequence platform while
134
+ preserving Tau's workspace-native configuration and extension model.
@@ -0,0 +1,101 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "ms-tau-sdk"
7
+ version = "1.0.0"
8
+ description = "Workspace-bound Tau application primitives for Main Sequence projects"
9
+ readme = "README.md"
10
+ requires-python = ">=3.13"
11
+ keywords = ["agents", "main-sequence", "sdk", "tau"]
12
+ classifiers = [
13
+ "Development Status :: 5 - Production/Stable",
14
+ "Framework :: FastAPI",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.13",
17
+ ]
18
+ dependencies = [
19
+ "anyio>=4.10",
20
+ "fastapi>=0.116",
21
+ "httpx>=0.28",
22
+ "jsonschema>=4.25,<5",
23
+ "mcp>=1.27,<2",
24
+ "pydantic>=2.11",
25
+ "pydantic-settings>=2.10",
26
+ "pypdf>=6.0,<7",
27
+ "python-multipart>=0.0.20",
28
+ "structlog>=26.1,<27",
29
+ "tau-ai==0.4.2",
30
+ "uvicorn[standard]>=0.35",
31
+ ]
32
+
33
+ [project.urls]
34
+ Changelog = "https://github.com/mainsequence-sdk/ms-tau-sdk/blob/development/CHANGELOG.md"
35
+ Documentation = "https://github.com/mainsequence-sdk/ms-tau-sdk/tree/development/docs"
36
+ Issues = "https://github.com/mainsequence-sdk/ms-tau-sdk/issues"
37
+ Repository = "https://github.com/mainsequence-sdk/ms-tau-sdk"
38
+
39
+ [project.scripts]
40
+ ms-tau = "ms_tau_sdk.cli:main"
41
+
42
+ [dependency-groups]
43
+ dev = [
44
+ "mypy>=1.17",
45
+ "pytest>=8.4",
46
+ "pytest-asyncio>=1.1",
47
+ "pytest-cov>=7.1.0",
48
+ "pytest-timeout>=2.4.0",
49
+ "respx>=0.22",
50
+ "ruff>=0.12",
51
+ "types-jsonschema>=4.26.0.20260518",
52
+ ]
53
+
54
+ [tool.hatch.build.targets.wheel]
55
+ packages = ["src/ms_tau_sdk"]
56
+
57
+ [tool.hatch.build.targets.sdist]
58
+ include = [
59
+ "/CHANGELOG.md",
60
+ "/README.md",
61
+ "/pyproject.toml",
62
+ "/src/ms_tau_sdk",
63
+ ]
64
+
65
+ [tool.pytest.ini_options]
66
+ addopts = [
67
+ "--import-mode=importlib",
68
+ "--strict-config",
69
+ "--strict-markers",
70
+ "--timeout=10",
71
+ ]
72
+ asyncio_mode = "auto"
73
+ testpaths = [
74
+ "tests",
75
+ ]
76
+
77
+ [tool.ruff]
78
+ target-version = "py313"
79
+ line-length = 100
80
+
81
+ [tool.ruff.lint]
82
+ select = ["E", "F", "I", "UP", "B", "ASYNC", "RUF"]
83
+
84
+ [tool.ruff.lint.per-file-ignores]
85
+ "tests/**" = ["S101"]
86
+
87
+ [tool.mypy]
88
+ python_version = "3.13"
89
+ strict = true
90
+ files = [
91
+ "src/ms_tau_sdk",
92
+ ]
93
+
94
+ [tool.coverage.run]
95
+ branch = true
96
+ source = ["ms_tau_sdk"]
97
+
98
+ [tool.coverage.report]
99
+ fail_under = 74
100
+ show_missing = true
101
+ skip_covered = true
@@ -0,0 +1,10 @@
1
+ """Public construction surface for Main Sequence TAU SDK."""
2
+
3
+ from importlib.metadata import version
4
+
5
+ __version__: str = version("ms-tau-sdk")
6
+
7
+ from .app import create_app
8
+ from .settings import TauSDKSettings
9
+
10
+ __all__ = ["TauSDKSettings", "__version__", "create_app"]
@@ -0,0 +1,5 @@
1
+ """Agent-scoped runtime contracts."""
2
+
3
+ from .snapshot import AgentExecutionSnapshot
4
+
5
+ __all__ = ["AgentExecutionSnapshot"]
@@ -0,0 +1,25 @@
1
+ """Construction boundary for sessionless Tau harness execution."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from tau_agent.harness import AgentHarness, AgentHarnessConfig
6
+ from tau_agent.provider import ModelProvider
7
+
8
+
9
+ def create_sessionless_harness(
10
+ *,
11
+ provider: ModelProvider,
12
+ model: str,
13
+ system: str,
14
+ max_turns: int,
15
+ ) -> AgentHarness:
16
+ """Create a sessionless harness without persistence or coding tools."""
17
+ return AgentHarness(
18
+ AgentHarnessConfig(
19
+ provider=provider,
20
+ model=model,
21
+ system=system,
22
+ tools=[],
23
+ max_turns=max_turns,
24
+ )
25
+ )
@@ -0,0 +1,44 @@
1
+ """Immutable agent configuration supplied by the deployment control plane."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Literal
6
+
7
+ from pydantic import BaseModel, ConfigDict, Field, field_validator
8
+
9
+
10
+ class AgentExecutionSnapshot(BaseModel):
11
+ """Bounded local configuration for agent-targeted, sessionless execution."""
12
+
13
+ model_config = ConfigDict(extra="forbid")
14
+
15
+ schema_version: Literal[1] = 1
16
+ agent_uid: str = Field(min_length=1)
17
+ name: str = ""
18
+ description: str = ""
19
+ harness: Literal["tau"] = "tau"
20
+ default_provider: str = ""
21
+ default_model: str = ""
22
+ default_thinking: str = ""
23
+ instructions: str = ""
24
+ allowed_input_media_types: tuple[str, ...] = (
25
+ "text/plain",
26
+ "text/markdown",
27
+ "application/json",
28
+ "text/csv",
29
+ )
30
+ sessionless_capabilities: tuple[str, ...] = ()
31
+ max_turns: int = Field(default=1, ge=1, le=16)
32
+
33
+ @field_validator("agent_uid", "default_provider", "default_model", "default_thinking")
34
+ @classmethod
35
+ def strip_identity_and_defaults(cls, value: str) -> str:
36
+ return value.strip()
37
+
38
+ @field_validator("allowed_input_media_types")
39
+ @classmethod
40
+ def normalize_media_types(cls, value: tuple[str, ...]) -> tuple[str, ...]:
41
+ normalized = tuple(dict.fromkeys(item.strip().lower() for item in value if item.strip()))
42
+ if not normalized:
43
+ raise ValueError("allowed_input_media_types must not be empty")
44
+ return normalized
@@ -0,0 +1 @@
1
+ """FastAPI route modules."""