Skip to content

deps: remove LinearSdkClient, ctx.sdk, and @linear/sdk dependency #210

@iamfj

Description

@iamfj

What problem does this solve?

After the transport and resolvers no longer use the SDK, Linearis should remove the leftover wrapper, command context property, tests, docs, and dependency declaration. Otherwise the architecture still exposes ctx.sdk and the production package still installs @linear/sdk.

Proposed solution

Remove the SDK wrapper and dependency completely.

Scope:

  • delete src/client/linear-client.ts
  • remove sdk from CommandContext
  • update resolver call sites from ctx.sdk to ctx.gql
  • update command/common tests that mock or assert SDK usage
  • remove @linear/sdk from package.json and package-lock.json
  • update architecture docs and agent instructions to reflect GraphQL-only resolver/client usage

Likely affected files include:

  • src/common/context.ts
  • src/common/resolve-filters.ts
  • src/commands/issues.ts
  • src/commands/projects.ts
  • src/commands/initiatives/*
  • src/commands/documents.ts
  • src/commands/comments.ts
  • src/commands/attachments.ts
  • src/commands/cycles.ts
  • src/commands/labels.ts
  • src/commands/milestones.ts
  • src/commands/teams.ts
  • resolver and command tests
  • architecture/development docs

Alternatives considered

  • Leave LinearSdkClient as an unused compatibility wrapper: creates dead code and invites new SDK usage.
  • Keep ctx.sdk but point it to GraphQL: confusing naming and weakens the architecture cleanup.

Primary use case

Shell scripting / automation

Additional context

Acceptance criteria:

  • rg "@linear/sdk|LinearSdkClient|ctx\.sdk|client\.sdk" src tests returns no relevant usage.
  • package.json no longer lists @linear/sdk.
  • package-lock.json is updated.
  • Architecture docs no longer state that resolvers use LinearSdkClient by default.
  • Full verification passes:
    • npm run check:ci
    • npx tsc --noEmit
    • npm test
    • npm run build

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P1Highest-priority planned work; should be implemented next

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions