instruments
instruments
¶
Instrument management commands — mzt instruments list|check.
These commands let users discover available instruments, check their readiness, and diagnose configuration issues. They build on the InstrumentProfileLoader and InstrumentRegistry — YAML profiles loaded from built-in, organization, and venue directories.
The music metaphor: these commands are the instrument workshop's front
desk. list shows what's on the rack. check picks one up and
plays a test note.
Classes¶
ResolvedRow
¶
Bases: TypedDict
One sheet's binding as mzt instruments resolve reports it.
LiveCall
¶
Bases: TypedDict
One real prompt through the conductor's backend factory.
LiveReport
¶
Bases: TypedDict
mzt instruments check --live / mzt doctor --live result.
Functions:¶
show_classes
¶
Show effective chains, their layers, and local availability.
Source code in src/marianne/cli/commands/instruments.py
check_classes
¶
Refuse broken layers and configured chains with no available entry.
Source code in src/marianne/cli/commands/instruments.py
show_tier_classes
¶
show_tier_classes(catalog_dir=Option(None, '--catalog', help="Catalog v2 directory (default: the checkout's plugins submodule)."), write_proposal=Option(None, '--write-proposal', help='Write a classes-file fragment you can merge by hand. Never the user layer.'), force=Option(False, '--force', help='Replace an existing proposal file.'), json_output=Option(False, '--json'))
Print the frontier/balanced/light chains this machine resolves from the catalog.
Read-only: this never writes ~/.marianne/classes.yaml (your ordering is
yours). --write-proposal PATH writes a fragment for you to merge.
Source code in src/marianne/cli/commands/instruments.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | |
write_classes
¶
write_classes(dry_run=Option(False, '--dry-run'), force=Option(False, '--force'), if_absent=Option(False, '--if-absent'))
Generate a user map from shipped profiles available on this machine.
Source code in src/marianne/cli/commands/instruments.py
convert_catalog
¶
convert_catalog(source=Argument(..., help='v1 instrument-catalog.yaml to read.'), out_dir=Argument(..., help='Directory to write the v2 family files and index.yaml.'))
Convert a v1 instrument catalog to the v2 directory (one YAML per family).
Source code in src/marianne/cli/commands/instruments.py
check_catalog
¶
Validate a v2 catalog directory against the schema.
Source code in src/marianne/cli/commands/instruments.py
instruments_callback
¶
Show instrument overview if no subcommand given.
Source code in src/marianne/cli/commands/instruments.py
list_instruments
¶
List all available instruments and their readiness status.
Source code in src/marianne/cli/commands/instruments.py
resolve_score
¶
resolve_score(score=Argument(..., help='Score YAML to resolve'), json_output=Option(False, '--json', help='Output as JSON'))
Show, per sheet, the profile and model each instrument binding resolves to.
Reads the score the way the conductor does at admission — score aliases, capability classes from this machine's class map, per-sheet and instrument_map pins — and prints one row per sheet: the alias (or class) the sheet was bound through, the profile it resolved to, the model, and the fallback chain. This is what a score's diversity claim actually configures; the prose says what the author meant.
Source code in src/marianne/cli/commands/instruments.py
check_instrument
¶
check_instrument(name=Argument(help='Instrument name to check'), json_output=Option(False, '--json', help='Output as JSON'), live=Option(False, '--live', help='Run one real prompt through the same backend the conductor uses (and one schema-mode prompt when the profile declares json_schema_flag). Proves the profile against the installed CLI, not just its schema. Spends one or two model calls.'), model=Option(None, '--model', help="Model for --live (default: the profile's default_model)"), timeout=Option(180.0, '--timeout', help='Seconds per --live call', min=5.0), record=Option(None, '--record', help="With --live: write each call's raw stdout, stderr and exit code plus the CLI version to DIR/<instrument>/ as a parser fixture (GH #472: tests should read what the CLI actually prints)"))
Check readiness and configuration of a specific instrument.
Source code in src/marianne/cli/commands/instruments.py
live_failure
¶
(mode, reason) of the first failed call, or None when the probe passed.
Source code in src/marianne/cli/commands/instruments.py
live_probe
¶
Exercise profile against the installed instrument, end to end.
The probe builds the backend through the conductor's own factory and classifies each result with the baton's own classifier, so what it reports is what a sheet would see: success, the error bucket the chain would act on, the wall time, and (in schema mode) whether the validated object came back. A profile can pass schema validation and still fail every dispatch: a flag the installed CLI rejects, an output shape the parser does not read, a provider that is not configured. This is the check that catches those.
Source code in src/marianne/cli/commands/instruments.py
684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 | |
prices_command
¶
prices_command(json_output=Option(False, '--json', help='Output as JSON'), write=Option(False, '--write', help="Rewrite the drifted price fields on the BUILTIN profiles (the files under the installed package). User (~/.marianne/instruments/) and venue (.marianne/instruments/) profiles are reported and left alone: they are the composer's. Commit the result like any other builtin change."), offline=Option(False, '--offline', help='Do not fetch; compare against the last saved snapshot (see --snapshot).'), snapshot=Option(None, '--snapshot', help='Path of a models.dev api.json to compare against instead of fetching (default cache: ~/.marianne/cache/models.dev.api.json, written on every fetch).'), show_all=Option(False, '--all', help='Also list rows that match, are absent from models.dev, or are unmapped.'))
Compare every profile's model prices with models.dev; --write updates the builtins.
Marianne prices a sheet from the profile's models rows; they drift as
providers reprice. models.dev (MIT, bot-synced) carries input, output,
cache-read and cache-write prices per model. Exit 0 when nothing drifts,
1 when a row drifts and was not written, 2 when the snapshot cannot be had.
Source code in src/marianne/cli/commands/instruments.py
972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | |