Skip to content

refactor: split core application modules - #129

Open
Prateep07 wants to merge 1 commit into
nitrocloudofficial:developfrom
Prateep07:refactor/split-core-app
Open

Prateep07 wants to merge 1 commit into
nitrocloudofficial:developfrom
Prateep07:refactor/split-core-app

Conversation

@Prateep07

Copy link
Copy Markdown
Collaborator

Summary

Refactor nitrostack/core/app.py into focused implementation modules while preserving the existing nitrostack.core.app import surface.

Changes

  • Moved server configuration, application metadata helpers, and the mcp_app decorator into app_config.py.
  • Extracted schema normalization and tool input parsing into app_schema.py.
  • Moved request metadata, authentication, trace, header, and correlation helpers into app_context.py.
  • Added app_entries.py for shared tool, resource, and prompt registration records.
  • Split application behavior into modules for registration, protocol handlers, definitions, tool invocation and result conversion, resources and prompts, task handling, and startup.
  • Added app_runtime.py to compose the implementation mixins into McpApplication and provide McpApplicationFactory.
  • Kept app.py as a compatibility facade that re-exports existing imports, including McpApplication, McpApplicationFactory, ServerConfig, mcp_app, and helper names.

Validation

  • All resulting app*.py modules are under 500 lines.
  • Ruff and Python compilation checks pass.
  • Focused application tests pass.
  • Full suite: 1,206 passed, 17 skipped, 4 failed. Remaining failures are in generated project and SDK packaging checks.

closes #120

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant