pbl_compiler/wwwroot/api/pbl_compiler_export_rules.dspy
2026-09-19 10:00:33 +08:00

18 lines
1.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
# pbl_compiler_export_rules.dspy —— M3b 规则导出契约薄包装(只转发,不写业务)。
# 契约实现pbl_compiler/rules_export_api.py::export_rules_contract
# 挂载init.py CONTRACTS['pbl_compiler_export_rules']RBACscripts/load_path.py
# 入参(全部由客户端透传,禁止硬编码分发字段):
# blueprint_id*, version_no, compiler_version_id, dry_run, skip_gd, skip_scripts,
# base_gd, status, quality_state, world_id, scene_id, strict, known_actions, event_types
debug(f'pbl_compiler_export_rules.dspy: START params_kw={dict(params_kw)}')
try:
_kw = dict(params_kw or {})
_res = await pbl_compiler_export_rules(**_kw)
return json.dumps(_res, ensure_ascii=False, default=str)
except Exception as _e:
debug('pbl_compiler_export_rules.dspy: ERROR ' + str(_e))
return json.dumps({'status': 'error', 'code': 'E_DSPY_EXPORT_RULES',
'message': str(_e), 'data': None},
ensure_ascii=False, default=str)