Repository navigation
feat(integrations): add typed manifest-driven integrations system - #163
gabrielvfonseca wants to merge 1 commit into
Conversation
- Add IntegrationManifest types + validation in crates/code-integrations (manifest.rs): id/version/display_name/transport/capabilities with JSON Schema input/output validation, events, context_fields, AuthSpec - Add 4 built-in provider manifests (github, linear, posthog, sentry) in providers.rs with BUILTIN_PROVIDER_IDS - Add /v1/integrations routes in code-server (list/get/capabilities/events + 501 invoke stub); built-ins seeded on startup, config manifest with same id overrides a built-in (FRONTAL_CODE_INTEGRATIONS_CONFIG) - Add CLI 'integrations list|show|capabilities|validate' commands with --json support - Add IntegrationClient to Rust SDK and TypeScript SDK (list/get/ capabilities/events/invoke) - Keep deprecated call_* wrappers in mcp/integration.rs functional as adapter layer (tracker_reporting.rs unaffected) - Docs: new docs/INTEGRATIONS.md; updated MCP.md and API_REFERENCES.md Tested: - cargo test -p code-integrations --lib (84 passed) - cargo test -p code-server --lib (142 passed) - cargo test -p cli --bin code (203 passed) - cargo test -p frontal-code-sdk --lib (11 passed) - cargo clippy --all-targets -- -D warnings (clean) - npm run build && npm test in sdks/typescript (43 passed)
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
| private readonly baseUrl: string; | ||
|
|
||
| constructor(baseUrl: string) { | ||
| this.baseUrl = baseUrl.replace(/\/+$/, ""); |
Summary
Builds a pluggable, fully typed, config-driven integrations system for the Frontal Code Server (API, CLI, typed SDK clients), driven by
IntegrationManifestfiles — no hardcoded provider code beyond the MCP transport layer.Changes
crates/code-integrations/src/manifest.rs—IntegrationManifesttypes (the single source of truth, re-exported from crate root) + validation (id/version/display_name/transport/capabilities with JSON Schema input/output validation, events, context_fields,AuthSpec) +ManifestRegistry(BTreeMap-backed, deterministic order,remove()for override semantics). 15 tests.crates/code-integrations/src/providers.rs— 4 built-in provider manifests:github: create_pr, create_issue_comment, create_check_runlinear: create_issue_commentposthog: capture_event, capture_events_batch (both idempotent)sentry: create_issue, create_issue_commentbuiltin_providers()+BUILTIN_PROVIDER_IDSre-exported from crate root. 7 tests.crates/code-server/src/integrations.rs—/v1/integrationscontrol-plane routes (list, get, capabilities, events + 501 invoke stub).IntegrationsStateseeded with built-ins on startup;FRONTAL_CODE_INTEGRATIONS_CONFIGJSON array layered on top, with same-id manifests overriding built-ins.cli/src/integrations.rs—integrations list|show|capabilities|validate(+--json); seeds built-ins, then settings file (mcp.integrations), then env var; same-id overrides.sdks/rust/src/integrations.rs) + TypeScript SDK (sdks/typescript/src/integrations.ts) —IntegrationClient(list/get/capabilities/events/invoke).call_*wrappers inmcp/integration.rskept functional as an adapter layer for one release;tracker_reporting.rsunaffected.docs/INTEGRATIONS.md; updateddocs/MCP.mdanddocs/API_REFERENCES.mdwith the new/v1/integrations*endpoints.Tested
cargo test -p code-integrations --lib— 84 passedcargo test -p code-server --lib— 142 passedcargo test -p cli --bin code— 203 passedcargo test -p frontal-code-sdk --lib— 11 passedcargo clippy -p code-integrations -p code-server -p cli -p frontal-code-sdk --all-targets -- -D warnings— cleannpm run build && npm testin sdks/typescript — 43 passedSummary by CodeRabbit