From f2b537d3dc6d784ac9753070767d6ab9b02c7ef0 Mon Sep 17 00:00:00 2001 From: A2AS Team <250408828+a2as-team@users.noreply.github.com> Date: Mon, 26 Jan 2026 21:10:27 +0400 Subject: [PATCH] Add a2as.yaml --- a2as.yaml | 451 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 451 insertions(+) create mode 100644 a2as.yaml diff --git a/a2as.yaml b/a2as.yaml new file mode 100644 index 0000000..a3e0066 --- /dev/null +++ b/a2as.yaml @@ -0,0 +1,451 @@ +manifest: + version: "0.1.2" + schema: https://a2as.org/cert/schema + subject: + name: agenticfactoria/nldf + source: https://github.com/agenticfactoria/nldf + branch: main + commit: "e8126755" + scope: [shared_order_manager.py, src/config/settings.py, src/product_flow_agent.py, src/utils/mqtt_client.py] + issued: + by: A2AS.org + at: '2026-01-26T16:16:23Z' + signatures: + digest: sha256:3FHkp9neZ2W79kieb-mOgk6ecKUYhfjfgv9c2YMwxVs + key: ed25519:knzaWvMBn3IZC260s7ap12vrKVCy0n-HoBggLPJOXNs + sig: ed25519:_CFHS_EJ6KMqjG-3bSZzIXTXBjDJ7zlwrWOOxEUbJCV3a6CN5H1dYUAbGMx7EAvnsvrVSx3NDCYkiF-NEtCOBQ + +agents: + agent._create_product_flow_agent: + type: factory + models: [model] + params: + function: _create_product_flow_agent + name: ProductFlowAgent_{self.line_id} + instructions: [instructions] + +models: + model: + type: variable + agents: [agent._create_product_flow_agent] + +imports: + Agent: agents.Agent + Any: typing.Any + asyncio: asyncio + BaseModel: pydantic.BaseModel + Callable: typing.Callable + dataclass: dataclasses.dataclass + datetime: datetime.datetime + Dict: typing.Dict + Enum: enum.Enum + field: dataclasses.field + json: json + LineCommander: src.line_commander.LineCommander + List: typing.List + load_dotenv: dotenv.load_dotenv + logging: logging + mqtt: paho.mqtt.client + MQTT_BROKER_HOST: src.config.settings.MQTT_BROKER_HOST + MQTT_BROKER_PORT: src.config.settings.MQTT_BROKER_PORT + MQTTClient: src.utils.mqtt_client.MQTTClient + MQTTListenerManager: src.mqtt_listener_manager.MQTTListenerManager + Optional: typing.Optional + Order: order.Order + OrderManager: order.OrderManager + os: os + ProductFlowAgent: src.product_flow_agent.ProductFlowAgent + re: re + Runner: agents.Runner + Set: typing.Set + SharedOrderManager: shared_order_manager.SharedOrderManager + signal: signal + SQLiteSession: agents.SQLiteSession + sys: sys + threading: threading + timedelta: datetime.timedelta + +functions: + __del__: + type: sync + module: src.product_flow_agent + args: [self] + __init__: + type: sync + module: src.line_commander + args: [self, line_id, max_orders_per_cycle] + __new__: + type: sync + module: shared_order_manager + args: [cls] + _analyze_factory_situation: + type: sync + module: src.product_flow_agent + args: [self, raw_material, stations, agvs, conveyors] + params: + returns: Dict + _create_flow_context: + type: sync + module: src.product_flow_agent + args: [self, factory_state, reactive_event] + params: + returns: str + _create_product_flow_agent: + type: sync + module: src.product_flow_agent + args: [self] + params: + returns: Agent + _create_product_from_item: + type: sync + module: order + args: [self, product_id, product_type_str] + params: + returns: Optional[Product] + _execute_commands: + type: async + module: src.line_commander + args: [self, commands] + _extract_json_from_text: + type: sync + module: src.product_flow_agent + args: [self, text] + params: + returns: str + _generate_agent_commands: + type: async + module: src.line_commander + args: [self, reactive_event] + params: + returns: List[Dict] + _get_available_agvs_info: + type: sync + module: src.product_flow_agent + args: [self, agvs] + params: + returns: str + _get_line_assigned_raw_products: + type: sync + module: src.product_flow_agent + args: [self, all_raw_products] + params: + returns: List[str] + _get_next_assignment_line: + type: sync + module: shared_order_manager + args: [self] + params: + returns: str + _get_p1_p2_next_step: + type: sync + module: order + args: [self] + params: + returns: Optional[str] + _get_p3_next_step: + type: sync + module: order + args: [self] + params: + returns: Optional[str] + _handle_agv_status: + type: sync + module: src.line_commander + args: [self, agv_id, data] + _handle_alerts: + type: sync + module: src.line_commander + args: [self, alert_type, data] + _handle_conveyor_status: + type: sync + module: src.line_commander + args: [self, conveyor_id, data] + _handle_orders: + type: sync + module: src.line_commander + args: [self, order_type, data] + _handle_responses: + type: sync + module: src.line_commander + args: [self, response_type, data] + _handle_station_status: + type: sync + module: src.line_commander + args: [self, station_id, data] + _handle_warehouse_status: + type: sync + module: src.line_commander + args: [self, warehouse_id, data] + _main_decision_cycle: + type: async + module: src.line_commander + args: [self] + _on_connect: + type: sync + module: src.utils.mqtt_client + args: [self, client, userdata, flags, reason_code, properties] + _on_disconnect: + type: sync + module: src.utils.mqtt_client + args: [self, client, userdata, reason_code, properties] + _on_message: + type: sync + module: src.utils.mqtt_client + args: [self, client, userdata, msg] + _parse_agent_output: + type: sync + module: src.product_flow_agent + args: [self, agent_output] + params: + returns: List[Dict] + _process_planned_operations: + type: async + module: src.line_commander + args: [self] + _process_reactive_event: + type: async + module: src.line_commander + args: [self, event] + _publish_agent_message: + type: sync + module: src.product_flow_agent + args: [self, input_context, agent_result] + _queue_decision_event: + type: sync + module: src.line_commander + args: [self, event_type, event_data] + _reactive_decision_processor: + type: async + module: src.line_commander + args: [self] + _register_mqtt_handlers: + type: sync + module: src.line_commander + args: [self] + _select_agv_for_p3_second_processing: + type: sync + module: src.product_flow_agent + args: [self, agvs] + params: + returns: str + _update_ongoing_operations: + type: sync + module: src.product_flow_agent + args: [self, commands] + _validate_command: + type: sync + module: src.product_flow_agent + args: [self, command] + params: + returns: bool + add_processing_step: + type: sync + module: order + args: [self, location, action, timestamp] + add_product: + type: sync + module: order + args: [self, product] + assign_order_to_line: + type: sync + module: order + args: [self, order_id, line_id, product_ids] + assign_product_to_line: + type: sync + module: order + args: [self, product_id, line_id] + cleanup: + type: sync + module: src.product_flow_agent + args: [self] + complete_order_check: + type: sync + module: shared_order_manager + args: [self] + connect: + type: sync + module: src.utils.mqtt_client + args: [self] + create_order_from_payload: + type: sync + module: order + args: [self, payload] + params: + returns: Optional[Order] + disconnect: + type: sync + module: src.utils.mqtt_client + args: [self] + generate_commands_for_available_agvs: + type: async + module: src.product_flow_agent + args: [self, factory_state, reactive_event] + params: + returns: List[Dict] + get_active_orders: + type: sync + module: order + args: [self] + params: + returns: List[Order] + get_completion_rate: + type: sync + module: order + args: [self] + params: + returns: float + get_next_processing_step: + type: sync + module: order + args: [self] + params: + returns: Optional[str] + get_order_statistics: + type: sync + module: order + args: [self] + params: + returns: Dict + get_orders_for_line: + type: sync + module: shared_order_manager + args: [self, line_id] + params: + returns: List[Order] + get_pending_products: + type: sync + module: order + args: [self] + params: + returns: List[Product] + get_products_for_line: + type: sync + module: shared_order_manager + args: [self, line_id] + params: + returns: List + get_products_needing_transport: + type: sync + module: order + args: [self, line_id] + params: + returns: List[Product] + get_statistics: + type: sync + module: shared_order_manager + args: [self] + params: + returns: Dict + get_unassigned_orders: + type: sync + module: order + args: [self] + params: + returns: List[Order] + initialize_line_commanders: + type: async + module: main + args: [self] + is_completed: + type: sync + module: order + args: [self] + params: + returns: bool + is_connected: + type: sync + module: src.utils.mqtt_client + args: [self] + main: + type: async + module: main + monitor_lines: + type: async + module: main + args: [self] + print_startup_banner: + type: sync + module: main + process_order: + type: sync + module: shared_order_manager + args: [self, payload, requesting_line] + params: + returns: Optional[Order] + publish: + type: sync + module: src.utils.mqtt_client + args: [self, topic, payload, qos, retain] + run_factory: + type: async + module: main + args: [self] + setup_signal_handlers: + type: sync + module: main + args: [factory_manager] + shutdown_all_lines: + type: async + module: main + args: [self] + signal_handler: + type: sync + module: main + args: [signum, frame] + start_all_lines: + type: async + module: main + args: [self] + start_command_operations: + type: async + module: src.line_commander + args: [self] + stop: + type: sync + module: src.line_commander + args: [self] + subscribe: + type: sync + module: src.utils.mqtt_client + args: [self, topic, callback, qos] + update_product_status: + type: sync + module: shared_order_manager + args: [self, product_id, new_status, location, agv_id] + +variables: + MAX_ORDERS_PER_CYCLE: + type: env + params: + caller: [os.getenv] + path: [main] + model: + type: env + params: + caller: [os.getenv] + path: [src.product_flow_agent] + MQTT_TOPIC_ROOT: + type: env + params: + caller: [os.getenv] + path: [src.product_flow_agent] + OPENAI_API_KEY: + type: env + params: + caller: [os.getenv] + path: [main] + TOPIC_ROOT: + type: env + params: + caller: [os.getenv] + path: [main] + USER: + type: env + params: + caller: [os.getenv] + path: [main] + USERNAME: + type: env + params: + caller: [os.getenv] + path: [main]