See Alfresco Community Edition (LGPL v3): https://en.wikipedia.org/wiki/Alfresco_(software)
Specifically, I need something that will fulfill all of the following conditions:
manage multiple versions of documents (say, XML, .doc, .docx that are being translated, proofread, etc., with viewable modification trail, etc.)
have programmable business workflow
be extensible in the sense of being written well enough (code quality) that both core modification is practical and possibly by writing plugins for it
per subject, be written in Python or Haskell (preferable, although not strictly a must)
open source
preferably, have REST API for business processes (say, query if document has been updated; upload a doc; notify a project stakeholder, etc.)
Example usecase scenario
Suppose you have a translation agency. There are project stakeholders, such as Customer, Project Managers, Translators, QA.
A customer should be able to upload and receive documents in limited web interface. PM should be able to see the whole project and split a job (multiple files) among translators. Translator should be able to download & upload edited version. QA should be able to give go ahead/block translated document. Once everything is translated & greenlighted by QA, it should be possible to program the business workflow engine to either notify Customer his order is ready, or, on programmer or even PM modification (configuration) notify PM instead for final approval. Etc.
The business process engine should be programmable to provide for registering for events (such as Translator Jane Doe uploading a document into the project 5), creating them, etc.