symfonic.migration.defaults¶
defaults ¶
Legacy default parity, as data and one honest composition entry point.
The old FrameworkConfig made fields look like a list of always-running
behaviours. They are not. Some fields are conditional, nightly_nap_cron
is an operator recommendation, and the tool decorator field is a retained
no-op. This module records that distinction beside the observable evidence.
The factory does not turn unresolved rows into a quietly smaller agent. Its default request is the whole legacy claim and it refuses with the individual row ids and their existing issue owners. A caller may explicitly request the verified subset while the other rows are being delivered.
LegacyDefaultRow
dataclass
¶
LegacyDefaultRow(behavior: str, legacy_default: str, activation: str, replacement: str, status: Literal['supported', 'gap', 'inert'], evidence: str, issue: int | None = None)
One claimed legacy default and the current migration result.
evidence is a test or source location that observes the stated result;
issue is required for a gap so absence remains actionable. inert
rows are not omitted: they say why a default-valued field never starts a
behaviour on its own.
LegacyParityRefusal ¶
LegacyParityRefusal(*, unresolved: Sequence[LegacyDefaultRow] = (), missing_dependencies: Sequence[str] = ())
Bases: ConfigurationError
The requested legacy claim cannot truthfully be composed yet.
Source code in src/symfonic/migration/defaults.py
compose_legacy_defaults ¶
compose_legacy_defaults(model_provider: Any, *, store: Any | None = None, scope: Any | None = None, instructions: str | None = None, tools: Sequence[Any] = (), behaviors: Sequence[str] | None = None, conversation: Any | None = None, extractor: Any | None = None, activation: Any | None = None, consolidation: Any | None = None, recent_turns: int = 2, max_model_rounds: int | None = None) -> Agent
Compose the reproducible legacy defaults into a public Agent.
With no behaviors argument this requests the whole legacy-default
claim. It refuses all unresolved rows and every absent dependency in one
error. Pass :data:SUPPORTED_DEFAULT_BEHAVIORS to compose only the
verified subset. This is intentional: a successful call is exactly the
explicit list it was given, never a silently smaller default set.
The required deployment dependencies are named before an Agent is
constructed: an extractor for automatic consolidation, a conversation
source for the two-turn working window, an association source wrapped in
SpreadingActivation, and a consolidation coordinator for quick naps.
Source code in src/symfonic/migration/defaults.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | |