From dd4952c7cfd2b349d2a9b27caee8a4fb33598a20 Mon Sep 17 00:00:00 2001 From: Matthew Hasselfield Date: Thu, 9 Jul 2026 06:02:31 -0400 Subject: [PATCH 1/5] MockingAgent: support config tree patches; for ACU platform type --- agent/acuagent.yaml | 10 ++++++++++ agent/agent.py | 22 ++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/agent/acuagent.yaml b/agent/acuagent.yaml index ce55a43..99e2e5a 100644 --- a/agent/acuagent.yaml +++ b/agent/acuagent.yaml @@ -205,3 +205,13 @@ tasks: set_boresight: {} stop_and_clear: {} clear_faults: {} + special_action: {} + +modes: + # Pass --mode platformCcat for better LAT-likeness + platformCcat: + _update: + processes: + monitor: + data: + PlatformType: 'ccat' diff --git a/agent/agent.py b/agent/agent.py index 14edc55..d074a39 100644 --- a/agent/agent.py +++ b/agent/agent.py @@ -105,6 +105,8 @@ def add_agent_args(parser_in=None): pgroup.add_argument("--schema-file", help='YAML file with description of operations ' 'to mock') + pgroup.add_argument('--mode', action='append', default=[], + help='Special mode settings to apply (can pass multiple; applied in order)') return parser_in def wrap_starter(instance, name, cfg, start_proc): @@ -115,7 +117,18 @@ def _f(self, session, params): func = _f.__get__(instance, instance.__class__) setattr(instance, proc_name, func) return func - + +def apply_config_patch(schema, patch): + def merge_tree(a, patch): + assert (isinstance(a, dict) and isinstance(patch, dict)) + for k, v in patch.items(): + if isinstance(v, dict) and isinstance(a.get(k), dict): + merge_tree(a[k], v) + else: + a[k] = v + if '_update' in patch: + merge_tree(schema, patch['_update']) + if __name__ == '__main__': txaio.start_logging(level=os.environ.get("LOGLEVEL", "info")) @@ -124,10 +137,15 @@ def _f(self, session, params): args = site_config.parse_args(agent_class='*host*', parser=parser) schema = yaml.safe_load(open(args.schema_file, 'rb')) + for mode in args.mode: + if mode not in schema['modes']: + raise ValueError(f"Requested mode '{mode}' not found in available: {schema['modes']}") + apply_config_patch(schema, schema['modes'][mode]) + args.agent_class = schema['agent_class'] if args.instance_id is None: args.instance_id = schema['instance_id'] - + agent, runner = ocs_agent.init_site_agent(args) mocker = MockingJaygent(agent) From cea8b7fca6aaa7337c4e6f7d52c7cea18f6aae28 Mon Sep 17 00:00:00 2001 From: Matthew Hasselfield Date: Thu, 9 Jul 2026 09:40:33 -0400 Subject: [PATCH 2/5] OpParam has checkbox mode --- src/components/OpParam.vue | 46 ++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/src/components/OpParam.vue b/src/components/OpParam.vue index 303d7e5..6a1541e 100644 --- a/src/components/OpParam.vue +++ b/src/components/OpParam.vue @@ -4,17 +4,46 @@ OpParam ------- This component provides user-editable text fields for an Agent Panel. +These can be used to map values into operation start arguments, or for +other stuff. Note checkbox and ride-along buttons are supported. + +Usage:: + + + + You can apply model value filters -- e.g. use v-model.number. To + force blank values to return null, include:: + + modelValue="blank_to_null" + + To make it a checkbox (which will automatically parse as a bool), + include:: + + :checkbox="true" + + To include both the editable field and a clickable button, pass:: + + button="Button text" + @click-button="do_click()" -->