id: mod-no-host-sdk-import
language: tsx
severity: error
message: host-specific runtime SDK import in package src outside adapter seam
note: '{"severity":"high","category":"boundary","resolution":"Keep package src host-agnostic. Move runtime SDK imports to adapter/server seams, or use structural local types. Type-only imports (import type ...) are allowed everywhere."}'
files:
  - '**/packages/*/src/**/*.tsx'
  - '**/.slopgate/fixtures/src/**/*.tsx'
ignores:
  - '**/adapters/**'
  - '**/adapter/**'
  - '**/server/**'
  - '**/*.test.*'
  - '**/*.config.*'
  - '**/pg-harness.ts'
  - '**/engine-*.ts'
  - '**/stripe.ts'
  - '**/resend.ts'
  - '**/postmark.ts'
  - '**/ses.ts'
rule:
  kind: import_statement
  not: { regex: '^import\s+type\b' }
  has:
    field: source
    has:
      kind: string_fragment
      regex: '^(cloudflare:|node:|bun:|@cloudflare/|stripe$|resend$|postmark$|better-auth|@aws-sdk/)'
