ReviewMergeApi
Class: ReviewMergeApi
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:11
Provides methods for managing review-merge requests in the CodeBolt platform.
Review-merge requests represent code review workflows that gate merging of changes. This API supports the full lifecycle including creation, review, locking, proposed jobs, pheromone tagging, and the final merge operation.
Constructors
Constructor
new ReviewMergeApi(http: HttpClient): ReviewMergeApi;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:12
Parameters
| Parameter | Type |
|---|---|
http | HttpClient |
Returns
ReviewMergeApi
Methods
addLinkedJob()
addLinkedJob(id: string, data: AddLinkedJobRequest): Promise<unknown>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:418
Links an existing job to a review-merge request.
Associates a job with this review so that changes from the job are tracked as part of the review workflow.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the review-merge request |
data | AddLinkedJobRequest | The linked job details including the job ID to associate |
Returns
Promise<unknown>
A promise that resolves when the job has been linked
addPheromone()
addPheromone(id: string, data: AddPheromoneRequest): Promise<unknown>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:224
Adds a pheromone tag to a review-merge request.
Pheromones are metadata signals used for inter-agent communication. Adding a pheromone allows agents to tag reviews with contextual information that other agents can detect.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the review-merge request |
data | AddPheromoneRequest | The pheromone data to attach |
Returns
Promise<unknown>
A promise that resolves when the pheromone has been added
addProposedJob()
addProposedJob(id: string, data: AddProposedJobRequest): Promise<unknown>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:320
Adds a proposed job to a review-merge request.
Proposed jobs are suggested work items that arise from the review process. They must be approved before being converted into actual jobs.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the review-merge request |
data | AddProposedJobRequest | The proposed job details |
Returns
Promise<unknown>
A promise that resolves when the proposed job has been added
addReview()
addReview(id: string, data: AddReviewFeedbackRequest): Promise<unknown>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:385
Adds a review or feedback to a review-merge request.
Submits review feedback (approval, rejection, or comments) from a reviewer. Multiple reviews can be added from different reviewers.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the review-merge request |
data | AddReviewFeedbackRequest | The review feedback payload containing the reviewer's assessment |
Returns
Promise<unknown>
A promise that resolves when the review has been added
Example
await client.reviewMerge.addReview('review-789', {
status: 'approved',
comment: 'LGTM, well structured changes',
});
approveProposedJob()
approveProposedJob(
id: string,
proposedJobId: string,
data?: Record<string, unknown>): Promise<unknown>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:334
Approves a proposed job on a review-merge request.
Marks the proposed job as approved, making it eligible for conversion into an actual job.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the review-merge request |
proposedJobId | string | The unique identifier of the proposed job to approve |
data? | Record<string, unknown> | Optional additional data for the approval |
Returns
Promise<unknown>
A promise that resolves when the proposed job has been approved
approveUnlockRequest()
approveUnlockRequest(
id: string,
unlockRequestId: string,
data?: Record<string, unknown>): Promise<unknown>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:292
Approves an unlock request, releasing the lock on a review-merge request.
The lock holder calls this to grant an unlock request from another agent.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the review-merge request |
unlockRequestId | string | The unique identifier of the unlock request to approve |
data? | Record<string, unknown> | Optional additional data for the approval |
Returns
Promise<unknown>
A promise that resolves when the unlock request has been approved
convertProposedJob()
convertProposedJob(
id: string,
proposedJobId: string,
data?: Record<string, unknown>): Promise<unknown>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:363
Converts an approved proposed job into an actual job.
Takes a previously approved proposed job and creates a real job from it. The proposed job must have been approved before conversion.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the review-merge request |
proposedJobId | string | The unique identifier of the approved proposed job to convert |
data? | Record<string, unknown> | Optional additional data for the conversion |
Returns
Promise<unknown>
A promise that resolves when the proposed job has been converted
create()
create(data: CreateReviewMergeRequest): Promise<ReviewMergeRequest>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:149
Creates a new review-merge request.
Initiates a review workflow for a set of changes. The request will enter the pending state and can be reviewed, locked, and eventually merged.
Parameters
| Parameter | Type | Description |
|---|---|---|
data | CreateReviewMergeRequest | The review-merge request creation payload |
Returns
Promise<ReviewMergeRequest>
A promise that resolves to the newly created ReviewMergeRequest
Example
const review = await client.reviewMerge.create({
title: 'Refactor authentication module',
description: 'Simplifies the auth flow and adds OAuth2 support',
agentId: 'agent-123',
});
createUnlockRequest()
createUnlockRequest(id: string, data: CreateUnlockRequest): Promise<unknown>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:278
Creates an unlock request for a locked review-merge request.
When a review is locked by another agent, this creates a formal request to unlock it. The lock holder can then approve or reject the unlock request.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the locked review-merge request |
data | CreateUnlockRequest | The unlock request payload with reason and requester information |
Returns
Promise<unknown>
A promise that resolves when the unlock request has been created
delete()
delete(id: string): Promise<unknown>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:189
Deletes a review-merge request.
Permanently removes a review-merge request and all associated data. This action cannot be undone.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the review-merge request to delete |
Returns
Promise<unknown>
A promise that resolves when the deletion is complete
get()
get(id: string): Promise<ReviewMergeRequest>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:162
Retrieves a specific review-merge request by its ID.
Fetches the full details of a single review-merge request including its current status, reviews, pheromones, and linked jobs.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the review-merge request |
Returns
Promise<ReviewMergeRequest>
A promise that resolves to the ReviewMergeRequest object
getAll()
getAll(params?: Record<string, unknown>): Promise<ReviewMergeRequest[]>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:127
Retrieves all review-merge requests, optionally filtered by query parameters.
Returns the complete list of review-merge requests. Use the optional params to filter by status, date range, or other criteria supported by the server.
Parameters
| Parameter | Type | Description |
|---|---|---|
params? | Record<string, unknown> | Optional query parameters for filtering the results |
Returns
Promise<ReviewMergeRequest[]>
A promise that resolves to an array of ReviewMergeRequest objects
Example
const all = await client.reviewMerge.getAll({ status: 'approved' });
getByAgent()
getByAgent(agentId: string): Promise<ReviewMergeRequest[]>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:84
Retrieves all review-merge requests associated with a specific agent.
Filters requests by the agent that created or is assigned to them. Useful for building agent-specific review dashboards or tracking an agent's review workload.
Parameters
| Parameter | Type | Description |
|---|---|---|
agentId | string | The unique identifier of the agent to filter by |
Returns
Promise<ReviewMergeRequest[]>
A promise that resolves to an array of ReviewMergeRequest objects for the agent
Example
const agentReviews = await client.reviewMerge.getByAgent('agent-123');
getBySwarm()
getBySwarm(swarmId: string): Promise<ReviewMergeRequest[]>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:97
Retrieves all review-merge requests associated with a specific swarm.
Filters requests by the swarm that generated them. Useful for monitoring review activity within a particular swarm context.
Parameters
| Parameter | Type | Description |
|---|---|---|
swarmId | string | The unique identifier of the swarm to filter by |
Returns
Promise<ReviewMergeRequest[]>
A promise that resolves to an array of ReviewMergeRequest objects for the swarm
getPending()
getPending(): Promise<ReviewMergeRequest[]>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:28
Retrieves all pending review-merge requests.
Returns requests that are awaiting review and have not yet been approved or rejected. Use this to build a review queue or dashboard showing outstanding work.
Returns
Promise<ReviewMergeRequest[]>
A promise that resolves to an array of pending ReviewMergeRequest objects
Example
const pending = await client.reviewMerge.getPending();
console.log(`${pending.length} reviews awaiting action`);
getPheromoneTypes()
getPheromoneTypes(): Promise<string[]>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:109
Retrieves the list of available pheromone types.
Pheromones are tags or signals that can be attached to review requests to communicate metadata to other agents. This returns the set of recognized pheromone type strings.
Returns
Promise<string[]>
A promise that resolves to an array of pheromone type name strings
getReadyToMerge()
getReadyToMerge(): Promise<ReviewMergeRequest[]>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:48
Retrieves all review-merge requests that are approved and ready to merge.
Filters for requests that have passed all review criteria and can be merged immediately. Useful for automated merge pipelines or merge-ready dashboards.
Returns
Promise<ReviewMergeRequest[]>
A promise that resolves to an array of merge-ready ReviewMergeRequest objects
Example
const ready = await client.reviewMerge.getReadyToMerge();
for (const request of ready) {
await client.reviewMerge.merge(request.id);
}
getStatistics()
getStatistics(): Promise<ReviewMergeStatistics>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:66
Retrieves aggregate statistics about review-merge requests.
Returns counts and metrics across all review states, useful for monitoring review throughput and identifying bottlenecks in the review process.
Returns
Promise<ReviewMergeStatistics>
A promise that resolves to a ReviewMergeStatistics object with aggregate data
Example
const stats = await client.reviewMerge.getStatistics();
console.log(`Total: ${stats.total}, Pending: ${stats.pending}`);
lock()
lock(id: string, data?: LockReviewRequest): Promise<unknown>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:251
Locks a review-merge request to prevent concurrent modifications.
Acquiring a lock ensures exclusive access while performing operations on the request. Other agents attempting to modify a locked request will be blocked.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the review-merge request to lock |
data? | LockReviewRequest | Optional lock configuration parameters |
Returns
Promise<unknown>
A promise that resolves when the lock has been acquired
merge()
merge(id: string, data?: MergeReviewRequest): Promise<unknown>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:404
Merges an approved review-merge request.
Executes the final merge operation on a review that has been approved and is ready to merge. This applies the associated changes to the target branch or codebase.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the review-merge request to merge |
data? | MergeReviewRequest | Optional merge configuration parameters |
Returns
Promise<unknown>
A promise that resolves when the merge is complete
Example
await client.reviewMerge.merge('review-789');
rejectProposedJob()
rejectProposedJob(
id: string,
proposedJobId: string,
data?: Record<string, unknown>): Promise<unknown>;
Defined in: CodeBolt/packages/clientsdk/src/api/review-merge.api.ts:348
Rejects a proposed job on a review-merge request.
Marks the proposed job as rejected, preventing it from being converted into an actual job.