Release v0.15.0
Merged
LC
2mo ago+1424+1424+0123456789012345678901234567890123456789-186-186-012345678901234567890123456789
Release v0.15.0
Bumps version from 0.14.0 to 0.15.0. Promotes dev → main.
Changelog
Added
mthds.protocol.method_files— the catalog serialization of a stored method's source:MethodFile(name+content) and the pairserialize_method_files/parse_method_filesbetween a list of files and the JSON[{ name, content }]string the hosted platform persists for a method's.mthdssource and its custom PipeFuncpython. The empty list serializes to"", the platform's "no source" sentinel, never to"[]"; blank-content entries are dropped in both directions; anything but the named array raisesPipelineRequestError, including the three constants Python'sjsonaccepts andJSON.parserefuses. It mirrors themthdsnpm package'sprotocol/method_files.tsedge for edge — blank is ECMAScript-blank, and the bytes areJSON.stringify's down to both surrogate rules, an unpaired one escaped and an adjacent pair combined into the astral character Python alone can spell two ways — so a Python client reads a stored method's bundle from here rather than re-porting the platform's decoder. Python's own number model is kept out of the way too: integers decode as floats, the twin's single number type, so a literal longer thansys.get_int_max_str_digits()cannot raise a bareValueErrorthrough the typed surface. One divergence from the twin is forced rather than chosen and is documented as such: Python's decoder recurses whereJSON.parseiterates, so a deeply nested source is refused here and accepted there, at a depth that is an interpreter build constant.mthds.protocol.options— the run-source argument surface: predicates that decide which combinations ofpipe_code,mthds_contents, the bundle encodingsfiles/bundle_b64,method_refandmethod_idmay be sent together (assert_exclusive_run_sources,has_bundle_payload,assert_method_ref_pairs_with_nothing), plus the selector normalizationnormalized_selector/run_selector_extensions, which refuses a non-string selector. Nothing in this package calls them, so no client behaviour changes:MthdsAPIClientstill forwards the keys insideextrawithout interpreting them.
Changed
ConceptAbstractnames a concept and nothing more, andStuffAbstractserializesconceptas the ref string (Breaking): the protocol's concept model keepscode,domain_codeand theconcept_refproperty —description,structure_class_nameandrefinesare gone, since a concept's definition belongs to the library the method loads and never travels beside a stuff, and a runtime that needs one of them in memory declares it on its own subclass.StuffAbstractnow carries a field serializer onconcept, so every dump of a stuff emits{"concept": "<domain>.<Code>", "content": …}— the wire form the standard's CLI I/O contract requires — instead of leaving each runner to reduce the object itself. The dependency-contributed crate key<package_address>::<domain>.<Code>is a subclass's to produce, by overridingStuffAbstract.serialize_conceptunder that name: the protocol model holds no declaring package address. The dump is one-way, which is the point rather than an oversight — aStuffAbstract, aWorkingMemoryAbstractor aPipeOutputAbstractcan no longer be validated back from its own dump, since the definition such a parse would need is exactly what no longer travels. A consumer that used to re-validate a dump resolves the concept by ref through the library the method loads, the way the input side already does. Which of the two override points a runtime picks decides what this SDK's own output path emits:DictRunResultExecute.from_pipe_outputreduces a stuff byconcept_ref, so aconcept_refoverride reaches it and aserialize_conceptoverride does not.
Closes L-260918-414e31
🤖 Generated with Claude Code
https://claude.ai/code/session_018GodVX8dbGwhAZGWnuz6M3
Summary by cubic
Releases v0.15.0, promoting dev to main (version 0.14.0 → 0.15.0) with two new protocol modules and a breaking trim of the concept model.
New Features
- Adds
mthds.protocol.method_files—MethodFileplusserialize_method_files/parse_method_files— the catalog serialization of a stored method's source, mirroring themthdsnpm package edge for edge. - Adds
mthds.protocol.options— predicates deciding which run-source combination is legal, plus selector normalization. MthdsAPIClient'sexecuteandstartnow validate run sources through those predicates and raisePipelineRequestErrorfor illegal combinations, where they previously only checked that one source was supplied.
Migration
ConceptAbstractkeeps onlycode,domain_codeandconcept_ref;description,structure_class_nameandrefinesare removed, since a concept's definition belongs to the loaded library rather than traveling beside a stuff.StuffAbstractnow serializesconceptas the"<domain>.<Code>"ref on every dump, so stuffs, working memories and pipe outputs can no longer be validated back from their own dumps — resolve the concept by ref through the loaded library instead.- A dependency-contributed crate key
<package_address>::<domain>.<Code>is a subclass's job, via overridingStuffAbstract.serialize_concept; note thatDictRunResultExecute.from_pipe_outputreduces byconcept_ref, so aconcept_refoverride reaches it but aserialize_conceptoverride does not.
Closes L-260918-414e31.