Skip to content

Use Harness SDK in code review example - #7

Merged
danielblignaut merged 16 commits into
mainfrom
codex/use-harness-sdk
Jul 31, 2026
Merged

danielblignaut merged 16 commits into
mainfrom
codex/use-harness-sdk

Conversation

@danielblignaut

@danielblignaut danielblignaut commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • pin the code-review example to the latest Harness SDK main
  • replace local ChatKit, MCP, provider-metadata, path, config, and gRPC adapters with Harness SDK APIs
  • create one configured client in lib/tilde.ts and pass it to ChatKit, MCP, and reverse-proxy integrations
  • delete the duplicated local Tilde adapter implementation
  • add a 285-second request budget and idempotent awaited resource cleanup
  • bound Modal CPU and memory, restrict sandbox egress to Tilde, and restore Modal process configuration
  • reject workspace path traversal, validate Git base refs, and treat repository/tool content as untrusted evidence
  • use shallow explicit-base clones instead of fragile partial-clone promisor state
  • include a complete setup README, portable Tilde state, and developer blog draft

Validation

Distribution gate

Harness SDK package-release PR https://github.com/trytilde/harness-sdk/pull/13 is merged and green. It adds versioned 0.1.0 packages, npm publishing, export validation, and a clean NodeNext tarball-consumer test.

The one-time npm bootstrap is still required. After @tilde/api-client, @tilde/harness-sdk, and @tilde/harness-sdk-vercel-ai-node are published, this PR will replace the private Git dependency and source aliases with ordinary semver dependencies and hosted CI can pass.

@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown

Greptile Summary

The PR replaces the code-review example’s local Tilde adapters with a commit-pinned Harness SDK integration.

  • Creates an explicit Harness client for ChatKit, MCP, reverse-proxy, and provider-metadata operations.
  • Updates conversation conversion and sandbox proxy construction to use SDK APIs.
  • Configures Next.js and TypeScript to consume the SDK’s source packages.
  • Removes the duplicated local adapter implementation and its tests.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code failure identified.

The adapter replacement consistently wires the explicit Harness client through ChatKit, MCP, and sandbox proxy paths, while the source-package aliases and full-commit dependency pin align across the package manifest, lockfile, Next.js, and TypeScript configuration.

Important Files Changed

Filename Overview
code-review-bot/app/api/code-review/route.ts Replaces local ChatKit and MCP adapters with the explicit Harness client, SDK session history, and AI SDK message conversion.
code-review-bot/lib/code-review/sandbox.ts Migrates Modal and Git reverse-proxy setup to Harness SDK APIs while retaining the existing sandbox lifecycle.
code-review-bot/next.config.ts Adds webpack aliases and transpilation configuration for the SDK’s source packages.
code-review-bot/package.json Pins the Harness SDK Git dependency to a full commit and selects webpack for Next.js development and production builds.
code-review-bot/tsconfig.json Adds TypeScript path mappings matching the SDK source-package aliases.

Sequence Diagram

sequenceDiagram
    participant T as Tilde ChatKit
    participant R as Code Review Route
    participant H as Harness SDK
    participant M as MCP Server
    participant S as Modal Sandbox
    participant A as AI Model

    T->>R: Signed code-review request
    R->>H: Load session history
    H-->>R: ChatKit messages
    R->>H: Convert messages for AI SDK
    R->>H: Create MCP client
    H->>M: Connect through configured server
    R->>H: Create reverse-proxy integration
    H->>S: Create sandbox through Modal proxy
    R->>A: Stream review with MCP and sandbox tools
    A-->>R: Review response stream
    R-->>T: ChatKit response
Loading

Reviews (1): Last reviewed commit: "Use Harness SDK in code review example" | Re-trigger Greptile

@danielblignaut
danielblignaut force-pushed the codex/use-harness-sdk branch from 8da1513 to 35af000 Compare July 30, 2026 15:37
@danielblignaut
danielblignaut merged commit dbc7bc0 into main Jul 31, 2026
2 checks passed
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