@codazen/harmonica-mcp 0.25.3 → 0.26.0
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/index.js +24 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24812,7 +24812,7 @@ function registerProjectTools(server, ctx, client) {
|
|
|
24812
24812
|
function registerRevisionLifecycleTools(server, ctx, client) {
|
|
24813
24813
|
server.tool(
|
|
24814
24814
|
"create_revision",
|
|
24815
|
-
"Create a new revision on a Beat. Starts
|
|
24815
|
+
"Create a new revision on a Beat. Starts in `draft` state under the PR workflow (draft \u2192 open \u2192 merged) \u2014 NOT the standard Beat Version lifecycle. Transition to `open` when the PR is ready for review; transition to `merged` when the PR is merged. Environment progression (in_staging, ready_for_production, live) is tracked on the parent Beat Version, not the Revision. Use this to add revisions alongside existing ones \u2014 no idempotency guard.",
|
|
24816
24816
|
{
|
|
24817
24817
|
beatId: external_exports.string().describe("The beat ID to create the revision on"),
|
|
24818
24818
|
title: external_exports.string().describe("Title for this revision"),
|
|
@@ -26452,6 +26452,9 @@ function createHttpClient(config2) {
|
|
|
26452
26452
|
metadata: options.metadata
|
|
26453
26453
|
}
|
|
26454
26454
|
);
|
|
26455
|
+
if (raw === void 0) {
|
|
26456
|
+
return { success: false, error: { code: "REVISION_NOT_FOUND", message: "Revision not found" } };
|
|
26457
|
+
}
|
|
26455
26458
|
return {
|
|
26456
26459
|
success: true,
|
|
26457
26460
|
previousState: raw.transition.previousState,
|
|
@@ -26459,8 +26462,7 @@ function createHttpClient(config2) {
|
|
|
26459
26462
|
};
|
|
26460
26463
|
} catch (err) {
|
|
26461
26464
|
const message = err instanceof Error ? err.message : String(err);
|
|
26462
|
-
|
|
26463
|
-
return { success: false, error: { code, message } };
|
|
26465
|
+
return { success: false, error: { code: "TRANSITION_FAILED", message } };
|
|
26464
26466
|
}
|
|
26465
26467
|
},
|
|
26466
26468
|
reconcileRevisionToState: async (revisionId, targetState, options) => {
|
|
@@ -26952,15 +26954,24 @@ function createHttpClient(config2) {
|
|
|
26952
26954
|
return request("PATCH", `/api/beat-versions/${encodeURIComponent(beatVersionId)}`, updates);
|
|
26953
26955
|
},
|
|
26954
26956
|
transitionBeatVersionStatus: async (beatVersionId, targetState, options) => {
|
|
26955
|
-
|
|
26956
|
-
status
|
|
26957
|
-
|
|
26958
|
-
|
|
26959
|
-
|
|
26960
|
-
|
|
26961
|
-
|
|
26962
|
-
|
|
26963
|
-
|
|
26957
|
+
try {
|
|
26958
|
+
const res = await request("PATCH", `/api/beat-versions/${encodeURIComponent(beatVersionId)}/status`, {
|
|
26959
|
+
status: targetState,
|
|
26960
|
+
reason: options.reason,
|
|
26961
|
+
trigger: options.trigger,
|
|
26962
|
+
actorType: options.actor.type,
|
|
26963
|
+
actorId: options.actor.id,
|
|
26964
|
+
actorName: options.actor.name,
|
|
26965
|
+
metadata: options.metadata
|
|
26966
|
+
});
|
|
26967
|
+
if (res === void 0) {
|
|
26968
|
+
return { success: false, error: { code: "BEAT_VERSION_NOT_FOUND", message: "Beat version not found" } };
|
|
26969
|
+
}
|
|
26970
|
+
return { success: true };
|
|
26971
|
+
} catch (err) {
|
|
26972
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
26973
|
+
return { success: false, error: { code: "TRANSITION_FAILED", message } };
|
|
26974
|
+
}
|
|
26964
26975
|
},
|
|
26965
26976
|
getBeatVersionAvailableTransitions: async (beatVersionId, actorType) => {
|
|
26966
26977
|
const qs = actorType ? `?actorType=${encodeURIComponent(actorType)}` : "";
|
|
@@ -27057,7 +27068,7 @@ function loadConfig() {
|
|
|
27057
27068
|
};
|
|
27058
27069
|
}
|
|
27059
27070
|
async function main() {
|
|
27060
|
-
console.error(`[harmonica-mcp] v${"0.
|
|
27071
|
+
console.error(`[harmonica-mcp] v${"0.26.0"} starting\u2026`);
|
|
27061
27072
|
const config2 = loadConfig();
|
|
27062
27073
|
const client = createHttpClient({
|
|
27063
27074
|
apiBaseUrl: config2.apiBaseUrl,
|