decomposer: fix validation failure for Migrate the kab_ingestion domain models, ports, GitHub SCM connector, and SharePoint CMS connector into the repository's app/ package.; Wire the migrated ingestion components into the agent application entry point, card, settings, triggers, governance, publication, and validation layers.; Populate every remaining placeholder file with working application, package, test, dependency, and Kubernetes content.; Verify the migrated agent and completed repository end to end.
Some checks failed
ci / test (push) Failing after 7s
Some checks failed
ci / test (push) Failing after 7s
This commit is contained in:
17
app/agent.py
17
app/agent.py
@@ -1 +1,16 @@
|
||||
"""content-ingestion-agent: create_agent_app wiring + REST route handlers only."""
|
||||
from .card import CARD
|
||||
from .settings import Settings
|
||||
from .connectors.github import GitHubConnector
|
||||
from .connectors.sharepoint import SharePointConnector
|
||||
from .routes import ingest_route
|
||||
from .triggers import register_triggers
|
||||
from .governance import authorize
|
||||
from .publication import publish_document
|
||||
from .validation import validate_document
|
||||
|
||||
def create_agent_app(settings: Settings | None = None) -> dict:
|
||||
config = settings or Settings.from_env()
|
||||
source, publisher = GitHubConnector(config.github_token), SharePointConnector(config.sharepoint_site_url)
|
||||
app = {"card": CARD, "settings": config, "routes": {"/ingest": lambda payload: ingest_route(payload, source)}, "triggers": {}, "governance": authorize, "publication": lambda doc: publish_document(doc, publisher, config), "validation": validate_document}
|
||||
register_triggers(app, app["routes"]["/ingest"])
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user