Problem
Workflow contracts can become orphaned over time — created but never associated with a workflow, or left behind after their workflows are deleted. There is currently no way to bulk-clean these up; operators must delete them one by one.
Proposed Solution
Add a PurgeUnused RPC and CLI command to bulk-delete workflow contracts that have no associated workflows. The existing List already returns workflow_refs per contract, so clients can preview which contracts are unused before purging.
Implementation
Problem
Workflow contracts can become orphaned over time — created but never associated with a workflow, or left behind after their workflows are deleted. There is currently no way to bulk-clean these up; operators must delete them one by one.
Proposed Solution
Add a
PurgeUnusedRPC and CLI command to bulk-delete workflow contracts that have no associated workflows. The existingListalready returnsworkflow_refsper contract, so clients can preview which contracts are unused before purging.Implementation