@remixhq/core 0.1.31 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CoreConfig } from './config.js';
|
|
2
2
|
import { T as TokenProvider } from './tokenProvider-BWTusyj4.js';
|
|
3
|
-
import { T as TurnUsage } from './contracts-
|
|
3
|
+
import { T as TurnUsage } from './contracts-WCYiMqwB.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
type HistoryImportProvider = "claude_code" | "cursor";
|
|
@@ -997,6 +997,7 @@ type ApiClient = {
|
|
|
997
997
|
title?: string;
|
|
998
998
|
description?: string;
|
|
999
999
|
status?: string;
|
|
1000
|
+
approvalStrategy?: "ai_patch_apply" | "git_merge_auto_resolve" | "git_merge_manual_resolution";
|
|
1000
1001
|
}): Promise<Json>;
|
|
1001
1002
|
createOrganizationInvite(orgId: string, payload: {
|
|
1002
1003
|
email: string;
|
package/dist/collab.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CollabApiClient, a as TurnUsagePayload, b as CollabFinalizeTurnResult, c as CollabRecordingPreflight, d as CollabApproveMode, e as CollabApproveResult, M as MergeRequestQueue,
|
|
2
|
-
export {
|
|
1
|
+
import { C as CollabApiClient, a as TurnUsagePayload, b as CollabFinalizeTurnResult, c as CollabRecordingPreflight, d as CollabApproveMode, e as CollabApprovalStrategy, f as CollabApproveResult, M as MergeRequestQueue, g as MergeRequest, I as InvitationScopeType, h as CollabMember, A as AppProfileInput, J as JsonObject, i as AppDeltaResponse, j as CollabStatus, k as MergeRequestReview } from './contracts-WCYiMqwB.js';
|
|
2
|
+
export { l as AppHeadResponse, m as AppMember, n as AppMemberRole, o as AppReconcileResponse, p as CollabFinalizeTurnAutoSync, q as CollabFinalizeTurnMode, r as CollabPendingFinalizeState, s as CollabPendingFinalizeSummary, t as CollabRecordingPreflightStatus, u as CollabRepoStateKind, v as CollabStatusBlockedReason, w as CollabStatusRecommendedAction, x as CollabTurn, y as MembershipScopeType, z as MergeRequestStatus, B as ModelCall, O as OrganizationMember, D as OrganizationMemberRole, P as ProjectMember, E as ProjectMemberRole, R as ReconcilePreflightResponse, S as ServerToolUsage, F as SyncLocalResponse, G as SyncUpstreamResponse, T as TurnUsage, H as TurnUsageCaptureSource, K as TurnUsageConfidence, L as TurnUsagePreviousPatch } from './contracts-WCYiMqwB.js';
|
|
3
3
|
import { B as BranchBindingMode } from './binding-WiIRI2fl.js';
|
|
4
4
|
|
|
5
5
|
declare function collabFinalizeTurn(params: {
|
|
@@ -149,6 +149,7 @@ declare function collabApprove(params: {
|
|
|
149
149
|
api: CollabApiClient;
|
|
150
150
|
mrId: string;
|
|
151
151
|
mode: CollabApproveMode;
|
|
152
|
+
approvalStrategy?: CollabApprovalStrategy;
|
|
152
153
|
cwd?: string;
|
|
153
154
|
allowBranchMismatch?: boolean;
|
|
154
155
|
}): Promise<CollabApproveResult>;
|
package/dist/collab.js
CHANGED
|
@@ -1425,6 +1425,12 @@ async function pollMergeRequestCompletion(api, mrId, params) {
|
|
|
1425
1425
|
const review = unwrapMergeRequestReview(reviewResp);
|
|
1426
1426
|
const mergeRequest = review.mergeRequest;
|
|
1427
1427
|
if (mergeRequest.status === "merged") return mergeRequest;
|
|
1428
|
+
if (mergeRequest.status === "manual_resolution_required") {
|
|
1429
|
+
throw new RemixError("Merge approval requires manual conflict resolution.", {
|
|
1430
|
+
exitCode: 2,
|
|
1431
|
+
hint: "Merge request ended in status=manual_resolution_required."
|
|
1432
|
+
});
|
|
1433
|
+
}
|
|
1428
1434
|
if (mergeRequest.status === "rejected" || mergeRequest.status === "closed") {
|
|
1429
1435
|
throw new RemixError("Merge approval did not complete successfully.", {
|
|
1430
1436
|
exitCode: 1,
|
|
@@ -3839,6 +3845,10 @@ async function collabSync(params) {
|
|
|
3839
3845
|
|
|
3840
3846
|
// src/application/collab/collabApprove.ts
|
|
3841
3847
|
async function collabApprove(params) {
|
|
3848
|
+
const approvePayload = {
|
|
3849
|
+
status: "approved",
|
|
3850
|
+
...params.approvalStrategy ? { approvalStrategy: params.approvalStrategy } : {}
|
|
3851
|
+
};
|
|
3842
3852
|
const transition = planApproveWorkflowTransition({
|
|
3843
3853
|
mode: params.mode,
|
|
3844
3854
|
hasCwd: Boolean(params.cwd?.trim())
|
|
@@ -3878,7 +3888,7 @@ async function collabApprove(params) {
|
|
|
3878
3888
|
hint: `Run the command from the repository bound to app ${targetAppId}, or use --remote-only.`
|
|
3879
3889
|
});
|
|
3880
3890
|
}
|
|
3881
|
-
const resp2 = await params.api.updateMergeRequest(params.mrId,
|
|
3891
|
+
const resp2 = await params.api.updateMergeRequest(params.mrId, approvePayload);
|
|
3882
3892
|
const approvedMergeRequest2 = unwrapMergeRequest(resp2);
|
|
3883
3893
|
const completedMergeRequest2 = await pollMergeRequestCompletion(params.api, params.mrId, {
|
|
3884
3894
|
targetAppId: targetAppId ?? approvedMergeRequest2.targetAppId
|
|
@@ -3910,7 +3920,7 @@ async function collabApprove(params) {
|
|
|
3910
3920
|
exitCode: 2
|
|
3911
3921
|
});
|
|
3912
3922
|
}
|
|
3913
|
-
const resp = await params.api.updateMergeRequest(params.mrId,
|
|
3923
|
+
const resp = await params.api.updateMergeRequest(params.mrId, approvePayload);
|
|
3914
3924
|
const approvedMergeRequest = unwrapMergeRequest(resp);
|
|
3915
3925
|
const completedMergeRequest = await pollMergeRequestCompletion(params.api, params.mrId, {
|
|
3916
3926
|
targetAppId: approvedMergeRequest.targetAppId
|
|
@@ -66,7 +66,7 @@ type TurnUsagePayload = {
|
|
|
66
66
|
currentTurn: TurnUsage | null;
|
|
67
67
|
previousTurn: TurnUsagePreviousPatch | null;
|
|
68
68
|
};
|
|
69
|
-
type MergeRequestStatus = "open" | "approved" | "rejected" | "merged" | "closed";
|
|
69
|
+
type MergeRequestStatus = "open" | "approved" | "rejected" | "merged" | "closed" | "manual_resolution_required";
|
|
70
70
|
type MergeRequestQueue = "reviewable" | "created_by_me" | "app_reviewable" | "app_outgoing" | "app_related_visible";
|
|
71
71
|
type MergeRequest = {
|
|
72
72
|
id: string;
|
|
@@ -133,6 +133,7 @@ type MergeRequestReview = {
|
|
|
133
133
|
};
|
|
134
134
|
};
|
|
135
135
|
type CollabApproveMode = "remote-only" | "sync-target-repo";
|
|
136
|
+
type CollabApprovalStrategy = "ai_patch_apply" | "git_merge_auto_resolve" | "git_merge_manual_resolution";
|
|
136
137
|
type CollabStatusBlockedReason = "not_git_repo" | "not_bound" | "branch_binding_missing" | "family_ambiguous" | "missing_head" | "detached_head" | "branch_mismatch" | "dirty_worktree" | "baseline_missing" | "metadata_conflict" | "remote_error";
|
|
137
138
|
type CollabRepoStateKind = "idle" | "local_only_changed" | "server_only_changed" | "both_changed" | "external_local_base_changed" | "metadata_conflict" | "binding_problem";
|
|
138
139
|
type CollabPendingFinalizeState = "idle" | "queued" | "processing" | "retry_scheduled" | "awaiting_usage" | "failed";
|
|
@@ -631,6 +632,7 @@ type CollabApiClient = {
|
|
|
631
632
|
title?: string;
|
|
632
633
|
description?: string;
|
|
633
634
|
status?: string;
|
|
635
|
+
approvalStrategy?: CollabApprovalStrategy;
|
|
634
636
|
}): Promise<unknown>;
|
|
635
637
|
createOrganizationInvite(orgId: string, payload: {
|
|
636
638
|
email: string;
|
|
@@ -732,4 +734,4 @@ type CollabApiClient = {
|
|
|
732
734
|
}): Promise<unknown>;
|
|
733
735
|
};
|
|
734
736
|
|
|
735
|
-
export type { AppProfileInput as A,
|
|
737
|
+
export type { AppProfileInput as A, ModelCall as B, CollabApiClient as C, OrganizationMemberRole as D, ProjectMemberRole as E, SyncLocalResponse as F, SyncUpstreamResponse as G, TurnUsageCaptureSource as H, InvitationScopeType as I, JsonObject as J, TurnUsageConfidence as K, TurnUsagePreviousPatch as L, MergeRequestQueue as M, OrganizationMember as O, ProjectMember as P, ReconcilePreflightResponse as R, ServerToolUsage as S, TurnUsage as T, TurnUsagePayload as a, CollabFinalizeTurnResult as b, CollabRecordingPreflight as c, CollabApproveMode as d, CollabApprovalStrategy as e, CollabApproveResult as f, MergeRequest as g, CollabMember as h, AppDeltaResponse as i, CollabStatus as j, MergeRequestReview as k, AppHeadResponse as l, AppMember as m, AppMemberRole as n, AppReconcileResponse as o, CollabFinalizeTurnAutoSync as p, CollabFinalizeTurnMode as q, CollabPendingFinalizeState as r, CollabPendingFinalizeSummary as s, CollabRecordingPreflightStatus as t, CollabRepoStateKind as u, CollabStatusBlockedReason as v, CollabStatusRecommendedAction as w, CollabTurn as x, MembershipScopeType as y, MergeRequestStatus as z };
|
package/dist/history.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ export { S as SessionStore, a as StoredSession, c as createStoredSessionTokenPro
|
|
|
4
4
|
export { createLocalSessionStore, createSupabaseAuthHelpers } from './auth.js';
|
|
5
5
|
export { AgentMemoryItem, AgentMemoryKind, AgentMemorySearchItem, AgentMemorySearchResponse, AgentMemorySummary, AgentMemoryTimelineResponse, ApiClient, AppContext, AppContextAccessPath, AppPreviewExpectedKind, AppPreviewProcessStatus, AppPreviewQuery, AppPreviewResponse, AppReconcileResponse, AppSandboxCommandRun, Bundle, BundlePlatform, BundleStatus, ChangeStepDiffResponse, DetectProjectRuntimeTargetsPayload, ImportProjectRuntimeEnvPayload, InitiateBundleRequest, InvitationRecord, MergeRequest, MergeRequestReview, MergeRequestStatus, ProjectRuntimeEnvMetadata, ProjectRuntimeEnvScope, ProjectRuntimeTargetMetadata, ProjectRuntimeTargetScope, ProjectTrigger, ProjectTriggerPayload, ProjectTriggerScope, ProjectTriggerStep, ProjectTriggerStepPayload, ReconcilePreflightResponse, ResolveProjectRuntimeEnvForLocalPullResponse, RunAppRuntimeTargetPayload, RunAppSandboxCommandPayload, RunAppTriggerEventPayload, RunAppTriggerPayload, RuntimeCommandKind, RuntimeTargetKind, SetProjectRuntimeEnvPayload, SetProjectRuntimeTargetPayload, SyncLocalResponse, SyncUpstreamResponse, TriggerEventMetadata, TriggerEventSource, TriggerIntegrationStatus, TriggerMode, TriggerRun, TriggerStepRun, TriggerStepType, UpdateProjectTriggerPayload, createApiClient } from './api.js';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import './contracts-
|
|
7
|
+
import './contracts-WCYiMqwB.js';
|