Skip to content

[Feature] Dependency policy: zero-runtime-dependency core (evaluate inlining ts-pattern) #419

Description

@pathosDev

Rationale

Positioning: batteries included, dependencies excluded. The core should carry zero runtime dependencies; everything vendor-specific lives behind optional, lazily imported peerDependencies (the established BrokerActor pattern). After the native-HTTP-backend change (fastify → optional peer), ts-pattern is the last hard dependency.

Scope

  1. Document the policy (CONTRIBUTING + docs page): zero-dep core; integrations only as optional lazy peers; prefer SDK-free implementations over the built-in HttpClient where reasonable (precedent: KubernetesLease speaks to the K8s API without an SDK; WebsocketClientActor uses the native WebSocket).
  2. Evaluate ts-pattern with a small spike + bundle/perf comparison. Options: keep as the single documented exception / inline a vendored micro-matcher / replace internal use with switch + assertNever.

Decision gate: AGENTS.md codifies match() + onXxx delegation as house style, and #235#247 propose more ts-pattern usage — this decision must land before those refactors start. User-facing docs may keep recommending ts-pattern as an app-level dependency either way.

Documentation

  • Policy page (EN + DE); CHANGELOG if the dependency set changes.

Acceptance

  • Policy documented; recorded decision on ts-pattern.
  • dependencies in package.json is empty OR contains only documented exceptions.

Relates

Improvement program M1 (decision) / M3 (execution). Native-HTTP-backend issue; #235#247.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions