Refine travel reimbursement steward flow

Align planner, runtime rules, and policy assets so travel guidance
matches the updated reimbursement workflow.
This commit is contained in:
caoxiaozhu
2026-06-15 22:55:18 +08:00
parent 792741709a
commit 9f7b8b46a3
85 changed files with 9496 additions and 2555 deletions

View File

@@ -74,7 +74,7 @@ class AgentAssetService(
) -> list[AgentAssetListItem]:
self._ensure_ready()
if asset_type in {None, "", AgentAssetType.RULE.value}:
self.sync_platform_risk_rules_from_library()
self.sync_rule_assets_from_libraries()
assets = self.repository.list(
asset_type=asset_type, status=status, domain=domain, keyword=keyword
)
@@ -94,7 +94,7 @@ class AgentAssetService(
) -> PageResult[AgentAssetListItem]:
self._ensure_ready()
if asset_type in {None, "", AgentAssetType.RULE.value}:
self.sync_platform_risk_rules_from_library()
self.sync_rule_assets_from_libraries()
assets = self.repository.list(
asset_type=asset_type,
status=status,
@@ -552,6 +552,13 @@ class AgentAssetService(
self.db.commit()
return manifest_count
def sync_rule_assets_from_libraries(self) -> int:
foundation = AgentFoundationService(self.db)
synced_count = foundation.sync_finance_rule_assets_from_catalog()
synced_count += foundation.sync_platform_risk_rules_from_library()
self.db.commit()
return synced_count
def _validate_version_payload(
self, asset: AgentAsset, payload: AgentAssetVersionCreate
) -> None: