mas-lab-ctl 0.2.0__py3-none-any.whl

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 (251) hide show
  1. mas/ctl/__init__.py +11 -0
  2. mas/ctl/_schemas/checkpoint.schema.yaml +105 -0
  3. mas/ctl/_schemas/component-registry.yaml +48 -0
  4. mas/ctl/_schemas/config.schema.yaml +262 -0
  5. mas/ctl/_schemas/contracts-registry.yaml +104 -0
  6. mas/ctl/_schemas/controller-openapi.json +5259 -0
  7. mas/ctl/_schemas/deployment.example.yaml +24 -0
  8. mas/ctl/_schemas/deployment.local-inproc.example.yaml +28 -0
  9. mas/ctl/_schemas/deployment.schema.yaml +110 -0
  10. mas/ctl/_schemas/effective-bind.example.yaml +45 -0
  11. mas/ctl/_schemas/effective-bind.schema.yaml +43 -0
  12. mas/ctl/_schemas/evaluation-envelope.schema.yaml +56 -0
  13. mas/ctl/_schemas/examples/checkpoint-axis.yaml +22 -0
  14. mas/ctl/_schemas/examples/checkpoint-v2.json +22 -0
  15. mas/ctl/_schemas/examples/datasets/mmlu-pro-jsonl.yaml +18 -0
  16. mas/ctl/_schemas/examples/datasets/mmlu-pro-slice.jsonl +2 -0
  17. mas/ctl/_schemas/examples/datasets/mmlu-pro.yaml +22 -0
  18. mas/ctl/_schemas/examples/experiments/design-schedule.yaml +34 -0
  19. mas/ctl/_schemas/examples/infra/mcp-localhost.yaml +13 -0
  20. mas/ctl/_schemas/examples/infra/override-stack.yaml +37 -0
  21. mas/ctl/_schemas/examples/overlays/live-llm.yaml +15 -0
  22. mas/ctl/_schemas/examples/overlays/llm-reasoning.yaml +18 -0
  23. mas/ctl/_schemas/examples/overlays/llm-sampling.yaml +26 -0
  24. mas/ctl/_schemas/examples/overlays/observability-native.yaml +13 -0
  25. mas/ctl/_schemas/examples/subagent-agent.yaml +18 -0
  26. mas/ctl/_schemas/examples/subagent-reviewer.yaml +9 -0
  27. mas/ctl/_schemas/examples/tools/annotated.tool.yaml +66 -0
  28. mas/ctl/_schemas/lab/artefacts/metrics.schema.json +114 -0
  29. mas/ctl/_schemas/lab/artefacts/run_info.schema.json +67 -0
  30. mas/ctl/_schemas/lab/dataset.schema.yaml +222 -0
  31. mas/ctl/_schemas/lab/experiment.schema.yaml +988 -0
  32. mas/ctl/_schemas/lab/fragments/memory-seed-entry.schema.yaml +26 -0
  33. mas/ctl/_schemas/lab/fragments/message.schema.yaml +16 -0
  34. mas/ctl/_schemas/lab/fragments/ref.schema.yaml +25 -0
  35. mas/ctl/_schemas/lab/fragments/tool-fixture-mapping.schema.yaml +46 -0
  36. mas/ctl/_schemas/lab/lab-config.schema.yaml +282 -0
  37. mas/ctl/_schemas/lab/lab.schema.yaml +65 -0
  38. mas/ctl/_schemas/lab/pipeline-manifest.schema.json +116 -0
  39. mas/ctl/_schemas/lab/pipeline.schema.yaml +230 -0
  40. mas/ctl/_schemas/lab/run-input.schema.yaml +155 -0
  41. mas/ctl/_schemas/library.schema.yaml +183 -0
  42. mas/ctl/_schemas/memory-seed.example.yaml +11 -0
  43. mas/ctl/_schemas/memory-seed.schema.yaml +28 -0
  44. mas/ctl/_schemas/placement-plan.example.yaml +42 -0
  45. mas/ctl/_schemas/placement-plan.schema.yaml +88 -0
  46. mas/ctl/_schemas/plugins/comm-layer.schema.yaml +44 -0
  47. mas/ctl/_schemas/runtime/agent.schema.yaml +1021 -0
  48. mas/ctl/_schemas/runtime/flavour.schema.yaml +186 -0
  49. mas/ctl/_schemas/runtime/fragments/agent-patch.schema.yaml +41 -0
  50. mas/ctl/_schemas/runtime/fragments/chunk-meta.schema.yaml +40 -0
  51. mas/ctl/_schemas/runtime/fragments/context-chunk.schema.yaml +44 -0
  52. mas/ctl/_schemas/runtime/fragments/context-manager-assembly-params.schema.yaml +53 -0
  53. mas/ctl/_schemas/runtime/fragments/context-manager-params.schema.yaml +14 -0
  54. mas/ctl/_schemas/runtime/fragments/context-manager-sliding-window-params.schema.yaml +20 -0
  55. mas/ctl/_schemas/runtime/fragments/context-manager-sliding-window-strategy.schema.yaml +21 -0
  56. mas/ctl/_schemas/runtime/fragments/context-manager-stack-params.schema.yaml +19 -0
  57. mas/ctl/_schemas/runtime/fragments/context-manager-stack-strategy.schema.yaml +14 -0
  58. mas/ctl/_schemas/runtime/fragments/context-manager-strategy-params.schema.yaml +13 -0
  59. mas/ctl/_schemas/runtime/fragments/context-manager-summarising-params.schema.yaml +21 -0
  60. mas/ctl/_schemas/runtime/fragments/context-manager-summarising-strategy.schema.yaml +78 -0
  61. mas/ctl/_schemas/runtime/fragments/context-sources-binding.schema.yaml +117 -0
  62. mas/ctl/_schemas/runtime/fragments/control-binding.schema.yaml +69 -0
  63. mas/ctl/_schemas/runtime/fragments/design-pattern-config.schema.yaml +41 -0
  64. mas/ctl/_schemas/runtime/fragments/execution-binding.schema.yaml +58 -0
  65. mas/ctl/_schemas/runtime/fragments/failure-class.schema.yaml +14 -0
  66. mas/ctl/_schemas/runtime/fragments/governance-binding.schema.yaml +24 -0
  67. mas/ctl/_schemas/runtime/fragments/infra-entry.schema.yaml +57 -0
  68. mas/ctl/_schemas/runtime/fragments/infra-fault-inject-params.schema.yaml +32 -0
  69. mas/ctl/_schemas/runtime/fragments/infra-llm-cache-params.schema.yaml +44 -0
  70. mas/ctl/_schemas/runtime/fragments/infra-llm-scheduler-params.schema.yaml +38 -0
  71. mas/ctl/_schemas/runtime/fragments/infra-middleware-inline.schema.yaml +35 -0
  72. mas/ctl/_schemas/runtime/fragments/infra-middleware-params-by-id.schema.yaml +36 -0
  73. mas/ctl/_schemas/runtime/fragments/infra-middleware-params.schema.yaml +12 -0
  74. mas/ctl/_schemas/runtime/fragments/infra-tool-binding.schema.yaml +23 -0
  75. mas/ctl/_schemas/runtime/fragments/infra-tool-server.schema.yaml +117 -0
  76. mas/ctl/_schemas/runtime/fragments/llm-binding.schema.yaml +78 -0
  77. mas/ctl/_schemas/runtime/fragments/llm-model-entry.schema.yaml +105 -0
  78. mas/ctl/_schemas/runtime/fragments/llm-reasoning.schema.yaml +56 -0
  79. mas/ctl/_schemas/runtime/fragments/llm-sampling.schema.yaml +106 -0
  80. mas/ctl/_schemas/runtime/fragments/llm-truncation.schema.yaml +48 -0
  81. mas/ctl/_schemas/runtime/fragments/memory-backend-params.schema.yaml +21 -0
  82. mas/ctl/_schemas/runtime/fragments/memory-seed-entry.schema.yaml +20 -0
  83. mas/ctl/_schemas/runtime/fragments/observability-binding.schema.yaml +83 -0
  84. mas/ctl/_schemas/runtime/fragments/overlay-agent-patch.schema.yaml +129 -0
  85. mas/ctl/_schemas/runtime/fragments/overlay-collection-ops-context.schema.yaml +60 -0
  86. mas/ctl/_schemas/runtime/fragments/overlay-collection-ops-control.schema.yaml +22 -0
  87. mas/ctl/_schemas/runtime/fragments/overlay-collection-ops-governance.schema.yaml +26 -0
  88. mas/ctl/_schemas/runtime/fragments/overlay-collection-ops-memory-seed.schema.yaml +28 -0
  89. mas/ctl/_schemas/runtime/fragments/overlay-collection-ops-models.schema.yaml +37 -0
  90. mas/ctl/_schemas/runtime/fragments/overlay-collection-ops-object-merge.schema.yaml +22 -0
  91. mas/ctl/_schemas/runtime/fragments/overlay-collection-ops-observability.schema.yaml +74 -0
  92. mas/ctl/_schemas/runtime/fragments/overlay-collection-ops-string.schema.yaml +33 -0
  93. mas/ctl/_schemas/runtime/fragments/overlay-collection-ops-tool.schema.yaml +110 -0
  94. mas/ctl/_schemas/runtime/fragments/overlay-flavour-patch.schema.yaml +44 -0
  95. mas/ctl/_schemas/runtime/fragments/overlay-infra-patch.schema.yaml +64 -0
  96. mas/ctl/_schemas/runtime/fragments/overlay-mas-patch.schema.yaml +107 -0
  97. mas/ctl/_schemas/runtime/fragments/policy-rule.schema.yaml +57 -0
  98. mas/ctl/_schemas/runtime/fragments/retry-policy.schema.yaml +40 -0
  99. mas/ctl/_schemas/runtime/fragments/runtime-engine.schema.yaml +48 -0
  100. mas/ctl/_schemas/runtime/fragments/workflow-edge.schema.yaml +17 -0
  101. mas/ctl/_schemas/runtime/fragments/workflow-node.schema.yaml +36 -0
  102. mas/ctl/_schemas/runtime/infra.schema.yaml +443 -0
  103. mas/ctl/_schemas/runtime/llm-model-catalog.schema.yaml +122 -0
  104. mas/ctl/_schemas/runtime/mas.schema.yaml +336 -0
  105. mas/ctl/_schemas/runtime/overlay.schema.yaml +169 -0
  106. mas/ctl/_schemas/runtime/prompt_bundle.schema.yaml +97 -0
  107. mas/ctl/_schemas/runtime/tool.schema.yaml +285 -0
  108. mas/ctl/_schemas/runtime/tool_bundle.schema.yaml +159 -0
  109. mas/ctl/_schemas/runtime/workflow.schema.yaml +109 -0
  110. mas/ctl/_schemas/runtime-profile.example.yaml +15 -0
  111. mas/ctl/_schemas/runtime-profile.schema.yaml +40 -0
  112. mas/ctl/adapters/__init__.py +24 -0
  113. mas/ctl/adapters/checkpoint.py +102 -0
  114. mas/ctl/adapters/hitl_terminal.py +33 -0
  115. mas/ctl/adapters/memory_seed.py +107 -0
  116. mas/ctl/adapters/obs/__init__.py +15 -0
  117. mas/ctl/adapters/obs/config.py +24 -0
  118. mas/ctl/adapters/obs/context.py +16 -0
  119. mas/ctl/adapters/obs/factory.py +8 -0
  120. mas/ctl/adapters/obs/pipeline.py +8 -0
  121. mas/ctl/adapters/obs/session.py +31 -0
  122. mas/ctl/benchmark/__init__.py +9 -0
  123. mas/ctl/benchmark/runner.py +727 -0
  124. mas/ctl/benchmark/runner_dispatch.py +33 -0
  125. mas/ctl/cli/__init__.py +7 -0
  126. mas/ctl/cli/bind_flags.py +100 -0
  127. mas/ctl/cli/commands/__init__.py +3 -0
  128. mas/ctl/cli/commands/bundles.py +33 -0
  129. mas/ctl/cli/commands/chat.py +563 -0
  130. mas/ctl/cli/commands/checkpoint.py +84 -0
  131. mas/ctl/cli/commands/compile.py +107 -0
  132. mas/ctl/cli/commands/compose.py +132 -0
  133. mas/ctl/cli/commands/control.py +334 -0
  134. mas/ctl/cli/commands/plugin.py +160 -0
  135. mas/ctl/cli/commands/registry.py +47 -0
  136. mas/ctl/cli/commands/run_mas.py +158 -0
  137. mas/ctl/cli/commands/serve.py +156 -0
  138. mas/ctl/cli/commands/tui.py +193 -0
  139. mas/ctl/cli/commands/validate.py +121 -0
  140. mas/ctl/cli/commands/workspace.py +134 -0
  141. mas/ctl/cli/help_text.py +56 -0
  142. mas/ctl/cli/main.py +67 -0
  143. mas/ctl/cli/obs_flags.py +145 -0
  144. mas/ctl/cli/runtime_flags.py +13 -0
  145. mas/ctl/cli/trace_flags.py +179 -0
  146. mas/ctl/compile.py +531 -0
  147. mas/ctl/compose/__init__.py +59 -0
  148. mas/ctl/compose/adapters/langgraph.py +77 -0
  149. mas/ctl/compose/backends/__init__.py +3 -0
  150. mas/ctl/compose/backends/mas_runtime_py.py +122 -0
  151. mas/ctl/compose/framework_registry.py +84 -0
  152. mas/ctl/compose/kernel_registry.py +83 -0
  153. mas/ctl/compose/models.py +98 -0
  154. mas/ctl/compose/pattern_registry.py +72 -0
  155. mas/ctl/compose/pipeline.py +161 -0
  156. mas/ctl/compose/placement_registry.py +78 -0
  157. mas/ctl/compose/placement_validate.py +32 -0
  158. mas/ctl/compose/runner.py +239 -0
  159. mas/ctl/deployment/__init__.py +27 -0
  160. mas/ctl/deployment/load.py +141 -0
  161. mas/ctl/deployment/runtime_id.py +37 -0
  162. mas/ctl/env.py +112 -0
  163. mas/ctl/executor/__init__.py +7 -0
  164. mas/ctl/executor/engine_tool_context.py +229 -0
  165. mas/ctl/executor/mas_session.py +751 -0
  166. mas/ctl/executor/run_mas.py +216 -0
  167. mas/ctl/executor/spawn_ledger.py +91 -0
  168. mas/ctl/executor/subagent_spawner.py +195 -0
  169. mas/ctl/infra/__init__.py +14 -0
  170. mas/ctl/infra/env_resolve.py +80 -0
  171. mas/ctl/infra/models.py +213 -0
  172. mas/ctl/infra/pipeline_chain.py +74 -0
  173. mas/ctl/infra/resolve.py +798 -0
  174. mas/ctl/infra/show.py +219 -0
  175. mas/ctl/libraries/bundles.py +68 -0
  176. mas/ctl/logging_setup.py +64 -0
  177. mas/ctl/manifest/__init__.py +19 -0
  178. mas/ctl/manifest/mas_agent_merge.py +384 -0
  179. mas/ctl/manifest/spec_bindings.py +379 -0
  180. mas/ctl/overlay/__init__.py +33 -0
  181. mas/ctl/overlay/canvas.py +543 -0
  182. mas/ctl/overlay/merge.py +1326 -0
  183. mas/ctl/overlay/normalize.py +83 -0
  184. mas/ctl/overrides/__init__.py +29 -0
  185. mas/ctl/overrides/apply.py +375 -0
  186. mas/ctl/overrides/bind.py +140 -0
  187. mas/ctl/overrides/model.py +91 -0
  188. mas/ctl/overrides/parser.py +186 -0
  189. mas/ctl/overrides/schema.py +484 -0
  190. mas/ctl/overrides/shortcuts.py +12 -0
  191. mas/ctl/paths.py +195 -0
  192. mas/ctl/placement/bus/__init__.py +8 -0
  193. mas/ctl/placement/bus/adapter.py +21 -0
  194. mas/ctl/placement/bus/inproc.py +52 -0
  195. mas/ctl/placement/bus/protocol.py +32 -0
  196. mas/ctl/placement/docker.py +19 -0
  197. mas/ctl/placement/k8s.py +19 -0
  198. mas/ctl/placement/protocol.py +28 -0
  199. mas/ctl/plugins/registry.py +28 -0
  200. mas/ctl/plugins/registry.yaml +5 -0
  201. mas/ctl/registry/__init__.py +29 -0
  202. mas/ctl/registry/catalog.py +178 -0
  203. mas/ctl/registry/introspect.py +111 -0
  204. mas/ctl/run_progress.py +72 -0
  205. mas/ctl/runtime_cli.py +177 -0
  206. mas/ctl/session/__init__.py +21 -0
  207. mas/ctl/session/bootstrap.py +596 -0
  208. mas/ctl/session/control.py +840 -0
  209. mas/ctl/session/control_dir.py +53 -0
  210. mas/ctl/session/control_host.py +90 -0
  211. mas/ctl/session/controller.py +790 -0
  212. mas/ctl/session/display_user_io_contract.py +37 -0
  213. mas/ctl/session/engine_factory.py +447 -0
  214. mas/ctl/session/exchange_log.py +374 -0
  215. mas/ctl/session/exposure.py +346 -0
  216. mas/ctl/session/flavour.py +96 -0
  217. mas/ctl/session/hitl_config.py +53 -0
  218. mas/ctl/session/hitl_prompt.py +62 -0
  219. mas/ctl/session/infra_resolve.py +59 -0
  220. mas/ctl/session/ingress_governance_loader.py +28 -0
  221. mas/ctl/session/interactive_hitl_contract.py +66 -0
  222. mas/ctl/session/mailbox.py +77 -0
  223. mas/ctl/session/manager.py +322 -0
  224. mas/ctl/session/manifest_config.py +165 -0
  225. mas/ctl/session/observability.py +294 -0
  226. mas/ctl/session/observability_loader.py +8 -0
  227. mas/ctl/session/operator_console.py +157 -0
  228. mas/ctl/session/params_sidecar.py +23 -0
  229. mas/ctl/session/protocol_hints.py +48 -0
  230. mas/ctl/session/session_flags.py +52 -0
  231. mas/ctl/session/turn_queue.py +223 -0
  232. mas/ctl/ui/__init__.py +8 -0
  233. mas/ctl/ui/curses_app.py +266 -0
  234. mas/ctl/ui/display.py +25 -0
  235. mas/ctl/ui/stdout.py +103 -0
  236. mas/ctl/ui/turn_result.py +57 -0
  237. mas/ctl/validate/__init__.py +29 -0
  238. mas/ctl/validate/deprecations.py +212 -0
  239. mas/ctl/validate/identity.py +158 -0
  240. mas/ctl/validate/providers.py +132 -0
  241. mas/ctl/validate/refs.py +162 -0
  242. mas/ctl/validate/schema_errors.py +76 -0
  243. mas/ctl/validate/schemas.py +254 -0
  244. mas/ctl/validate/separation.py +220 -0
  245. mas/ctl/validate/validator.py +421 -0
  246. mas/ctl/workspace/__init__.py +19 -0
  247. mas/ctl/workspace/config.py +333 -0
  248. mas_lab_ctl-0.2.0.dist-info/METADATA +180 -0
  249. mas_lab_ctl-0.2.0.dist-info/RECORD +251 -0
  250. mas_lab_ctl-0.2.0.dist-info/WHEEL +4 -0
  251. mas_lab_ctl-0.2.0.dist-info/entry_points.txt +2 -0
mas/ctl/__init__.py ADDED
@@ -0,0 +1,11 @@
1
+ # Copyright (c) 2026 Cisco Systems, Inc. and its affiliates
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ """MAS ctl — compose, placement, session UI, protocol adapters (not the Mealy kernel)."""
4
+
5
+ from mas.ctl.session.controller import ConversationConfig, SessionController, TurnResult
6
+
7
+ __all__ = [
8
+ "ConversationConfig",
9
+ "SessionController",
10
+ "TurnResult",
11
+ ]
@@ -0,0 +1,105 @@
1
+ # Copyright (c) 2026 Cisco Systems, Inc. and its affiliates
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ # Session checkpoint — kernel-only v1 or self-contained session v2.
4
+ $schema: http://json-schema.org/draft-07/schema#
5
+ title: SessionCheckpoint
6
+ oneOf:
7
+ - type: object
8
+ required: [version, kernel]
9
+ additionalProperties: false
10
+ properties:
11
+ version: { type: integer, const: 1 }
12
+ label: { type: string }
13
+ turn: { type: integer, minimum: 0 }
14
+ kernel:
15
+ $ref: "#/definitions/kernel"
16
+ memory_seeds:
17
+ type: array
18
+ items:
19
+ type: object
20
+ required: [key, content]
21
+ additionalProperties: false
22
+ properties:
23
+ key: { type: string }
24
+ content: { type: string }
25
+ runtime_profile:
26
+ type: object
27
+ additionalProperties: true
28
+ description: Optional design_pattern defaults and gov profile to restore with kernel
29
+ - type: object
30
+ required: [version, label, turn, lineage, kernel, working_memory, manifest]
31
+ additionalProperties: false
32
+ properties:
33
+ version: { type: integer, const: 2 }
34
+ label: { type: string }
35
+ turn: { type: integer, minimum: 0 }
36
+ backtrack_count: { type: integer, minimum: 0 }
37
+ spec_revision: { type: integer, minimum: 0 }
38
+ related:
39
+ type: array
40
+ description: Fingerprints for related-state adapters; bytes stay in the adapter.
41
+ items:
42
+ type: object
43
+ additionalProperties: false
44
+ properties:
45
+ plugin: { type: string }
46
+ fingerprint: { type: string }
47
+ locator: { type: string }
48
+ adapter: { type: string }
49
+ lineage:
50
+ type: object
51
+ required: [session_id, parent_session_id, forked_from_checkpoint, root_session_id, created_at]
52
+ additionalProperties: false
53
+ properties:
54
+ session_id: { type: string, minLength: 1 }
55
+ parent_session_id: { type: [string, "null"] }
56
+ forked_from_checkpoint: { type: [string, "null"] }
57
+ root_session_id: { type: [string, "null"] }
58
+ created_at: { type: string, format: date-time }
59
+ kernel:
60
+ $ref: "#/definitions/kernel"
61
+ working_memory:
62
+ type: array
63
+ items:
64
+ type: object
65
+ required: [agent_id, turn_history, committed_messages, conversation_chunks]
66
+ additionalProperties: false
67
+ properties:
68
+ agent_id: { type: string, minLength: 1 }
69
+ turn_history:
70
+ type: array
71
+ items:
72
+ type: array
73
+ minItems: 2
74
+ maxItems: 2
75
+ items: { type: string }
76
+ committed_messages:
77
+ type: array
78
+ items: { type: object, additionalProperties: true }
79
+ conversation_chunks: { type: [object, "null"], additionalProperties: true }
80
+ working_messages:
81
+ type: array
82
+ items: { type: object, additionalProperties: true }
83
+ open_tool_call_id: { type: string }
84
+ synced_tool_result_cids:
85
+ type: array
86
+ items: { type: integer }
87
+ manifest:
88
+ type: object
89
+ required: [content, content_hash]
90
+ additionalProperties: false
91
+ properties:
92
+ content: { type: object, additionalProperties: true }
93
+ content_hash: { type: string, pattern: "^[a-f0-9]{64}$" }
94
+ memory_seeds:
95
+ type: array
96
+ items: { type: object, additionalProperties: true }
97
+ runtime_profile:
98
+ type: object
99
+ additionalProperties: true
100
+ definitions:
101
+ kernel:
102
+ type: object
103
+ description: RuntimeKernel.snapshot() — Q_product and run ledger
104
+ required: [q, run]
105
+ additionalProperties: true
@@ -0,0 +1,48 @@
1
+ # Copyright (c) 2026 Cisco Systems, Inc. and its affiliates
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ # Component registry — authoritative IDs for ctl/runtime adapters.
4
+ # Deployment.spec.runtime_id, placement strategy, and framework adapter MUST use these ids.
5
+ apiVersion: mas/v1
6
+ kind: ComponentRegistry
7
+ metadata:
8
+ name: mas-lab-components
9
+ spec:
10
+ runtimes:
11
+ - id: mas-runtime-py
12
+ layer: ctl.runtime
13
+ module: mas.ctl.compose.backends.mas_runtime_py.MasRuntimePyKernelBackend
14
+ description: Python Mealy kernel (provable product, local-inproc)
15
+
16
+ placement:
17
+ - id: local-inproc
18
+ layer: ctl.placement
19
+ module: mas.ctl.compose.placement_registry.LocalInprocBackend
20
+ description: In-process comm bus (OSS-supported)
21
+ status: available
22
+ - id: local-multiprocess
23
+ layer: ctl.placement
24
+ module: null
25
+ status: planned
26
+ description: Planned — not in this OSS release
27
+ - id: docker
28
+ layer: ctl.placement
29
+ module: mas.ctl.placement.docker.DockerBackend
30
+ status: planned
31
+ description: Planned — not in this OSS release
32
+ - id: kubernetes
33
+ layer: ctl.placement
34
+ module: mas.ctl.placement.k8s.K8sBackend
35
+ status: planned
36
+ description: Planned — not in this OSS release
37
+
38
+ framework:
39
+ - id: native
40
+ layer: ctl.framework
41
+ module: mas.ctl.compose.framework_registry.NativeFrameworkAdapter
42
+ - id: langgraph
43
+ layer: ctl.framework
44
+ module: mas.ctl.compose.framework_registry.LangGraphFrameworkAdapter
45
+ - id: crewai
46
+ layer: ctl.framework
47
+ module: null
48
+ status: planned
@@ -0,0 +1,262 @@
1
+ # Copyright (c) 2026 Cisco Systems, Inc. and its affiliates
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ $schema: "http://json-schema.org/draft-07/schema#"
4
+ $id: "mas.config/config/v1"
5
+ title: "config.yaml"
6
+ description: >
7
+ Project workspace configuration discovered by walking up from the current
8
+ directory (or from MAS_WORKSPACE_ROOT). Secrets belong in the file named by
9
+ mas_ctl.env (default .env) — never in this YAML.
10
+
11
+ type: object
12
+ additionalProperties: false
13
+ properties:
14
+ mas_ctl:
15
+ type: object
16
+ additionalProperties: false
17
+ description: Defaults for mas-ctl chat / run-mas / validate.
18
+ properties:
19
+ flavour:
20
+ type: string
21
+ default: local
22
+ description: >-
23
+ Flavour name (library-standard bundle, e.g. local). Resolved to
24
+ flavours/<name>.yaml under the workspace or installed library.
25
+ env:
26
+ type: string
27
+ default: .env
28
+ description: Gitignored secrets file relative to workspace root.
29
+ deployment:
30
+ type: string
31
+ description: Optional deployment manifest path (relative to workspace).
32
+ runtime_id:
33
+ type: string
34
+ description: Kernel/runtime id override.
35
+ runtime_profile:
36
+ type: string
37
+ description: Path to runtime-profile manifest (relative to workspace).
38
+ cache:
39
+ type: string
40
+ enum: [read-only]
41
+ description: >-
42
+ Default cache mode for mas-ctl chat / serve. `read-only` answers from the recorded
43
+ answers only (no LLM call, no cache write, no API key), like `--cache-read-only`.
44
+ Omit it to call the model on a cache miss.
45
+ trace:
46
+ description: >-
47
+ Human exchange log on stderr for mas-ctl chat / run-mas. `summary`
48
+ (or `true`) is the usable default: headers + timestamps, untruncated
49
+ AGENT→USER. `full` dumps payloads. `off` (or `false`) disables.
50
+ Color is never implied; set trace_color or pass --trace-color.
51
+ Machine data is events.jsonl / mas-lab telemetry, not this log.
52
+ oneOf:
53
+ - type: boolean
54
+ - type: string
55
+ enum: [off, summary, full]
56
+ default: off
57
+ trace_timestamps:
58
+ type: boolean
59
+ default: true
60
+ description: UTC + elapsed on each exchange (on by default when tracing).
61
+ trace_color:
62
+ type: boolean
63
+ default: false
64
+ description: ANSI color on the exchange log. Never the CLI default.
65
+ trace_engine:
66
+ type: boolean
67
+ default: false
68
+ description: Include raw InvokeEngineIo / EngineIoReturn JSON.
69
+ archive:
70
+ type: object
71
+ additionalProperties: false
72
+ description: >
73
+ Conversation archive (full session log). Complementary to traces/.
74
+ Off by default so experiments at scale do not fill the disk.
75
+ Enable only for reverse debugging / shallow checkpoints.
76
+ properties:
77
+ enabled:
78
+ type: boolean
79
+ default: false
80
+ description: >
81
+ Persist every archive chunk under traces/<dir_name> when an
82
+ events file is set. false keeps the archive in RAM only and
83
+ forces deep checkpoints.
84
+ dir_name:
85
+ type: string
86
+ default: archive
87
+ description: Folder name colocated with events.jsonl (traces/archive).
88
+ memory_watermark_bytes:
89
+ type: integer
90
+ minimum: 0
91
+ default: 67108864
92
+ description: >
93
+ RAM cache cap after chunks are on disk. Folded leaves drop
94
+ from memory past this watermark. 0 = keep every payload in RAM.
95
+
96
+ mas_lab:
97
+ type: object
98
+ additionalProperties: false
99
+ description: Defaults for mas-lab benchmark and demo commands.
100
+ properties:
101
+ flavour:
102
+ type: string
103
+ default: local
104
+ benchmark_flavour:
105
+ type: string
106
+ description: Flavour used when running benchmark experiments.
107
+ benchmark:
108
+ type: object
109
+ additionalProperties: false
110
+ description: Defaults for ``mas-lab benchmark run`` stale-output handling.
111
+ properties:
112
+ clean_stale_outputs:
113
+ type: boolean
114
+ default: false
115
+ description: >-
116
+ When true, remove benchmark output folders for scenarios no longer
117
+ declared in experiment.yaml before each run.
118
+ clean_stale_trace_cache:
119
+ type: boolean
120
+ default: true
121
+ description: >-
122
+ When cleaning stale benchmark outputs, also remove trace-cache
123
+ entries (data/cache/traces/<hash>/) whose reference count reaches zero.
124
+ labs_search_paths:
125
+ oneOf:
126
+ - type: string
127
+ - type: array
128
+ items:
129
+ type: string
130
+ description: >-
131
+ Directories scanned for ``*.lab`` folders (relative to the config file,
132
+ or absolute). An entry may itself be a ``*.lab`` directory. When this
133
+ key is present (including an empty list) it is the exclusive lab
134
+ catalog. When omitted, installed packages and cwd-walk stay additive.
135
+ Separate from ``paths.labs_dir`` (benchmark output). New labs are
136
+ created under the first entry.
137
+
138
+ plugins:
139
+ description: >-
140
+ Workspace plugins (gdb, checkpoint stores). Off unless listed. The init
141
+ template comments every catalog URN; uncomment ``plugins:`` and a line
142
+ to enable it. Labs may
143
+ enable the same URNs as ``lab.enable_plugins``. Specs that already name
144
+ a plugin keep their own config.
145
+ oneOf:
146
+ - type: array
147
+ items:
148
+ type: string
149
+ minLength: 1
150
+ - type: object
151
+ additionalProperties:
152
+ type: boolean
153
+
154
+ infra_refs:
155
+ oneOf:
156
+ - type: string
157
+ - type: array
158
+ items:
159
+ type: string
160
+ description: >-
161
+ Infra bundle refs merged left-to-right (e.g. standard:openai,
162
+ standard:llm-proxy, or a workspace-relative LLMProxy path). Override at
163
+ runtime with env var MAS_INFRA_REFS (comma- or space-separated) without
164
+ editing this file; CLI --infra-ref still wins.
165
+
166
+ runtime_refs:
167
+ oneOf:
168
+ - type: string
169
+ - type: array
170
+ items:
171
+ type: string
172
+ description: >-
173
+ RuntimeEngine manifest refs merged left-to-right (e.g.
174
+ standard:runtime-default or a workspace-relative path under runtime/).
175
+ Omit entirely to use package defaults only. Override with env var
176
+ MAS_RUNTIME_REFS (comma- or space-separated).
177
+
178
+ middleware:
179
+ oneOf:
180
+ - type: string
181
+ - type: array
182
+ items:
183
+ type: string
184
+ description: >
185
+ Infra middleware bundle refs merged after infra_refs.
186
+ infra_interceptors is a read-only alias; mixing both is an error.
187
+
188
+ infra_interceptors:
189
+ oneOf:
190
+ - type: string
191
+ - type: array
192
+ items:
193
+ type: string
194
+ description: Read-only alias of middleware.
195
+
196
+ manifest_libraries:
197
+ description: >-
198
+ Extra library **search folders** for this workspace. Same scan as
199
+ ``lab.libraries`` and ``MAS_LIBRARY_PATHS``: each path is a library
200
+ root, or a parent of sibling library folders. ``library.yaml`` in
201
+ those folders fills the catalog. Names come from the found
202
+ directory stem. A legacy name→path map is flattened to its path
203
+ values; it is not an alias table.
204
+ oneOf:
205
+ - type: array
206
+ items:
207
+ type: string
208
+ minLength: 1
209
+ - type: object
210
+ additionalProperties:
211
+ type: string
212
+
213
+ aliases:
214
+ type: object
215
+ additionalProperties:
216
+ type: string
217
+ description: >-
218
+ Alias overrides for runtime plugin lookup. Keys are human-friendly names
219
+ or legacy aliases; values are canonical plugin URNs such as
220
+ mas.dp.react.
221
+
222
+ defaults:
223
+ type: object
224
+ additionalProperties: false
225
+ description: >-
226
+ Overrides merged over the runtime's built-in defaults.yaml (per key,
227
+ workspace value wins). See runtime/docs/agent-defaults.md.
228
+ properties:
229
+ model:
230
+ type: string
231
+ description: Fill-in LLM id for remaining Agent/MAS/experiment `any` after experiment.models (not written into committed specs).
232
+ design_pattern:
233
+ type: string
234
+ description: Default plugin id for spec.design_pattern when manifests omit one.
235
+ context_manager:
236
+ type: string
237
+ description: Default plugin id for spec.context_manager when manifests omit one.
238
+ assembler:
239
+ type: string
240
+ description: Default plugin id for spec.assembler when manifests omit one.
241
+
242
+ paths:
243
+ type: object
244
+ additionalProperties: false
245
+ description: >-
246
+ Optional path overrides (otherwise $XDG_CONFIG_HOME/mas/config.yaml paths
247
+ or MAS_* env vars; see docs/user-config.md).
248
+ properties:
249
+ labs_dir:
250
+ type: string
251
+ description: Default root for benchmark run output (metadata.yaml, results.csv).
252
+ cache_dir:
253
+ type: string
254
+ runs_dir:
255
+ type: string
256
+ archive_dir:
257
+ type: string
258
+ description: >
259
+ Folder for the conversation archive after mas_ctl.archive.enabled
260
+ is true. Setting this path does not turn persist on. Absolute
261
+ paths win. Relative paths resolve from the app root. Not an
262
+ agent spec field.
@@ -0,0 +1,104 @@
1
+ # Copyright (c) 2026 Cisco Systems, Inc. and its affiliates
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ # v2 plugin contract registry — maps contract IDs to TLA machines and Python modules.
4
+ # Authority: docs/design/plugin-contracts.md
5
+ apiVersion: mas/v1
6
+ kind: ContractRegistry
7
+ metadata:
8
+ name: mas-lab-contracts
9
+ spec:
10
+ contracts:
11
+ - id: DesignPatternPlugin
12
+ alias: [MealyPlugin, DesignPatternContract, M_dp]
13
+ tla: DesignPatternScheduler.tla
14
+ module: mas.runtime.machines.design_pattern.protocol
15
+ ingress: [USER_INPUT_RECEIVED, CTX_ASSEMBLY_COMPLETE, ENGINE_IO_RETURN, HITL_RESOLVE]
16
+ egress: [REQUEST_CTX_ASSEMBLY, INVOKE_ENGINE_IO, EMIT_CLIENT_RESPONSE, EMIT_HITL_REQUEST]
17
+ implementations:
18
+ - react@v1
19
+ - cot@v1
20
+ - single_pass@v1
21
+
22
+ - id: EngineContract
23
+ alias: [M_model, M_tool, execution_engine]
24
+ tla: EngineEnvironment.tla
25
+ module: mas.runtime.engine.protocol
26
+ ingress: [InvokeEngineIo via driver]
27
+ egress: [EngineIoReturn]
28
+ implementations:
29
+ - SimulatedEngine
30
+ - LiveLlmEngine
31
+
32
+ - id: CtxAssembler
33
+ alias: [CtxAssemblerContract, M_ctx]
34
+ tla: ContextMachine.tla
35
+ module: mas.runtime.boundary.context.protocol
36
+ ingress: [RequestCtxAssembly]
37
+ egress: [CtxAssemblyComplete]
38
+ implementations:
39
+ - AutoCtxAssembler
40
+
41
+ - id: HitlResponder
42
+ alias: [M_gov_hitl]
43
+ tla: Governance.tla
44
+ module: mas.runtime.boundary.hitl.responders
45
+ ingress: [EmitHitlRequest]
46
+ egress: [HitlResolve]
47
+ implementations:
48
+ - AutoApproveResponder
49
+
50
+ - id: ObservabilitySink
51
+ alias: [M_obs]
52
+ tla: Observability.tla
53
+ module: mas.runtime.boundary.obs.protocol
54
+ implementations:
55
+ - ObservabilityOperator
56
+
57
+ - id: EnvelopeProduct
58
+ alias: [M_envelope, execute_contract_call]
59
+ tla: EnvelopeProduct.tla
60
+ tla_root: external-formal-repo/tla/specs
61
+ note: Formal TLA specs — maintained outside this OSS release
62
+ module: mas.runtime.kernel.envelope
63
+ ingress: [observability_post_execute, contract_end, governance_validate]
64
+ egress: [obs_wrap_gov_authorize, governance_authorize, contract_start, observability_pre_execute]
65
+ note: Profile flags EnableGov / EnableObs collapse σ schedule
66
+
67
+ - id: EventEmitter
68
+ alias: [obs_terminating_protocol]
69
+ module: mas.library.standard.lib.observability.emit
70
+ note: Terminating protocol — JSONL file or stderr
71
+ implementations:
72
+ - JsonlFileEmitter
73
+ - StdoutJsonlEmitter
74
+
75
+ - id: ObservabilityExportPlugin
76
+ module: mas.library.standard.plugins.observability
77
+ mode: read
78
+ note: Manifest-declared export plugins (native, otel, ioa_observe)
79
+ implementations:
80
+ - NativeObservabilityPlugin
81
+ - OtelObservabilityPlugin
82
+
83
+ - id: LLMProvider
84
+ alias: [ModelAccess, llm_provider]
85
+ module: mas.runtime.registry.llm_provider_protocol
86
+ note: Wire-protocol plugins for chat completions. Cache wraps a routed protocol; offline CI uses llm_cache replay.
87
+ implementations:
88
+ - OpenAILLMProvider
89
+ - CacheLLMProvider
90
+
91
+ - id: EventTransform
92
+ module: mas.library.standard.lib.observability.native.transform
93
+ note: Pure native projection (OTel via MasOtelConverter, not transform hack)
94
+ implementations:
95
+ - NativeObservabilityTransform
96
+ - BoundaryPassthroughTransform
97
+
98
+ v1_migration:
99
+ ToolContract: EngineContract.TOOL_CALL
100
+ ModelContract: EngineContract.LLM_CALL
101
+ PromptContract: CtxAssembler
102
+ MemoryContract: EngineContract.MEMORY_OP
103
+ DPContract: DesignPatternPlugin
104
+ SurfaceAdapter: mas.ctl.ui.ConversationDisplay