@codazen/harmonica-mcp 3.7.1 → 3.7.2
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 +126 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25905,6 +25905,126 @@ function formatTriageActions(actions) {
|
|
|
25905
25905
|
// ../../libs/harmonica-services/src/mcp/tools/note-element-tools.ts
|
|
25906
25906
|
var import_crypto3 = require("crypto");
|
|
25907
25907
|
|
|
25908
|
+
// ../../libs/harmonica-schemas/src/azure-marketplace.ts
|
|
25909
|
+
var AzureMarketplaceSubscriptionSchema = external_exports.object({
|
|
25910
|
+
id: external_exports.string(),
|
|
25911
|
+
publisherId: external_exports.string().optional(),
|
|
25912
|
+
offerId: external_exports.string().optional(),
|
|
25913
|
+
name: external_exports.string().optional(),
|
|
25914
|
+
saasSubscriptionStatus: external_exports.string().optional(),
|
|
25915
|
+
planId: external_exports.string().optional(),
|
|
25916
|
+
quantity: external_exports.number().optional(),
|
|
25917
|
+
beneficiary: external_exports.object({
|
|
25918
|
+
emailId: external_exports.string().optional(),
|
|
25919
|
+
objectId: external_exports.string().optional(),
|
|
25920
|
+
tenantId: external_exports.string().optional()
|
|
25921
|
+
}).optional(),
|
|
25922
|
+
purchaser: external_exports.object({
|
|
25923
|
+
emailId: external_exports.string().optional(),
|
|
25924
|
+
objectId: external_exports.string().optional(),
|
|
25925
|
+
tenantId: external_exports.string().optional()
|
|
25926
|
+
}).optional()
|
|
25927
|
+
});
|
|
25928
|
+
var AzureSubscribedSchema = external_exports.object({
|
|
25929
|
+
action: external_exports.literal("Subscribe"),
|
|
25930
|
+
// Non-blank, not merely non-empty. A bare z.string() accepts "", which would
|
|
25931
|
+
// derive the slug "az-" — 3 chars, trailing dash, invalid under the repository
|
|
25932
|
+
// slug invariant. And .min(1) alone still admits " ", which normalizes to
|
|
25933
|
+
// nothing and falls through to the hash fallback, quietly provisioning an org
|
|
25934
|
+
// under a hashed slug for input that is plainly garbage. Reject it at the
|
|
25935
|
+
// boundary instead.
|
|
25936
|
+
subscriptionId: external_exports.string().min(1).refine((v) => v.trim().length > 0, {
|
|
25937
|
+
message: "subscriptionId must not be blank"
|
|
25938
|
+
}),
|
|
25939
|
+
offerId: external_exports.string(),
|
|
25940
|
+
planId: external_exports.string(),
|
|
25941
|
+
quantity: external_exports.number().optional(),
|
|
25942
|
+
timeStamp: external_exports.string(),
|
|
25943
|
+
operationId: external_exports.string(),
|
|
25944
|
+
subscription: AzureMarketplaceSubscriptionSchema
|
|
25945
|
+
});
|
|
25946
|
+
var AzureUnsubscribedSchema = external_exports.object({
|
|
25947
|
+
action: external_exports.literal("Unsubscribe"),
|
|
25948
|
+
// Non-blank, not merely non-empty. A bare z.string() accepts "", which would
|
|
25949
|
+
// derive the slug "az-" — 3 chars, trailing dash, invalid under the repository
|
|
25950
|
+
// slug invariant. And .min(1) alone still admits " ", which normalizes to
|
|
25951
|
+
// nothing and falls through to the hash fallback, quietly provisioning an org
|
|
25952
|
+
// under a hashed slug for input that is plainly garbage. Reject it at the
|
|
25953
|
+
// boundary instead.
|
|
25954
|
+
subscriptionId: external_exports.string().min(1).refine((v) => v.trim().length > 0, {
|
|
25955
|
+
message: "subscriptionId must not be blank"
|
|
25956
|
+
}),
|
|
25957
|
+
offerId: external_exports.string(),
|
|
25958
|
+
planId: external_exports.string(),
|
|
25959
|
+
timeStamp: external_exports.string(),
|
|
25960
|
+
operationId: external_exports.string(),
|
|
25961
|
+
subscription: AzureMarketplaceSubscriptionSchema
|
|
25962
|
+
});
|
|
25963
|
+
var AzureChangePlanSchema = external_exports.object({
|
|
25964
|
+
action: external_exports.literal("ChangePlan"),
|
|
25965
|
+
// Non-blank, not merely non-empty. A bare z.string() accepts "", which would
|
|
25966
|
+
// derive the slug "az-" — 3 chars, trailing dash, invalid under the repository
|
|
25967
|
+
// slug invariant. And .min(1) alone still admits " ", which normalizes to
|
|
25968
|
+
// nothing and falls through to the hash fallback, quietly provisioning an org
|
|
25969
|
+
// under a hashed slug for input that is plainly garbage. Reject it at the
|
|
25970
|
+
// boundary instead.
|
|
25971
|
+
subscriptionId: external_exports.string().min(1).refine((v) => v.trim().length > 0, {
|
|
25972
|
+
message: "subscriptionId must not be blank"
|
|
25973
|
+
}),
|
|
25974
|
+
offerId: external_exports.string(),
|
|
25975
|
+
planId: external_exports.string(),
|
|
25976
|
+
timeStamp: external_exports.string(),
|
|
25977
|
+
operationId: external_exports.string(),
|
|
25978
|
+
subscription: AzureMarketplaceSubscriptionSchema
|
|
25979
|
+
});
|
|
25980
|
+
var AzureSuspendSchema = external_exports.object({
|
|
25981
|
+
action: external_exports.literal("Suspend"),
|
|
25982
|
+
// Non-blank, not merely non-empty. A bare z.string() accepts "", which would
|
|
25983
|
+
// derive the slug "az-" — 3 chars, trailing dash, invalid under the repository
|
|
25984
|
+
// slug invariant. And .min(1) alone still admits " ", which normalizes to
|
|
25985
|
+
// nothing and falls through to the hash fallback, quietly provisioning an org
|
|
25986
|
+
// under a hashed slug for input that is plainly garbage. Reject it at the
|
|
25987
|
+
// boundary instead.
|
|
25988
|
+
subscriptionId: external_exports.string().min(1).refine((v) => v.trim().length > 0, {
|
|
25989
|
+
message: "subscriptionId must not be blank"
|
|
25990
|
+
}),
|
|
25991
|
+
offerId: external_exports.string(),
|
|
25992
|
+
planId: external_exports.string(),
|
|
25993
|
+
timeStamp: external_exports.string(),
|
|
25994
|
+
operationId: external_exports.string(),
|
|
25995
|
+
subscription: AzureMarketplaceSubscriptionSchema
|
|
25996
|
+
});
|
|
25997
|
+
var AzureReinstateSchema = external_exports.object({
|
|
25998
|
+
action: external_exports.literal("Reinstate"),
|
|
25999
|
+
// Non-blank, not merely non-empty. A bare z.string() accepts "", which would
|
|
26000
|
+
// derive the slug "az-" — 3 chars, trailing dash, invalid under the repository
|
|
26001
|
+
// slug invariant. And .min(1) alone still admits " ", which normalizes to
|
|
26002
|
+
// nothing and falls through to the hash fallback, quietly provisioning an org
|
|
26003
|
+
// under a hashed slug for input that is plainly garbage. Reject it at the
|
|
26004
|
+
// boundary instead.
|
|
26005
|
+
subscriptionId: external_exports.string().min(1).refine((v) => v.trim().length > 0, {
|
|
26006
|
+
message: "subscriptionId must not be blank"
|
|
26007
|
+
}),
|
|
26008
|
+
offerId: external_exports.string(),
|
|
26009
|
+
planId: external_exports.string(),
|
|
26010
|
+
timeStamp: external_exports.string(),
|
|
26011
|
+
operationId: external_exports.string(),
|
|
26012
|
+
subscription: AzureMarketplaceSubscriptionSchema
|
|
26013
|
+
});
|
|
26014
|
+
var AzureMarketplaceWebhookEventSchema = external_exports.discriminatedUnion("action", [
|
|
26015
|
+
AzureSubscribedSchema,
|
|
26016
|
+
AzureUnsubscribedSchema,
|
|
26017
|
+
AzureChangePlanSchema,
|
|
26018
|
+
AzureSuspendSchema,
|
|
26019
|
+
AzureReinstateSchema
|
|
26020
|
+
]);
|
|
26021
|
+
var AZURE_MARKETPLACE_WEBHOOK_ACTIONS = AzureMarketplaceWebhookEventSchema.options.map(
|
|
26022
|
+
(o) => o.shape.action.value
|
|
26023
|
+
);
|
|
26024
|
+
var AzureMarketplaceActivateBodySchema = external_exports.object({
|
|
26025
|
+
token: external_exports.string().min(1)
|
|
26026
|
+
});
|
|
26027
|
+
|
|
25908
26028
|
// ../../libs/harmonica-schemas/src/compose-beat-versions.ts
|
|
25909
26029
|
var BeatVersionDraftSchema = external_exports.object({
|
|
25910
26030
|
title: external_exports.string().min(1).max(300),
|
|
@@ -29449,10 +29569,13 @@ function registerRevisionLifecycleTools(server, ctx, client) {
|
|
|
29449
29569
|
return { content: [{ type: "text", text: `Beat Version not found: "${beatVersionId}"` }], isError: true };
|
|
29450
29570
|
}
|
|
29451
29571
|
const bvSystemId = bv.systemId ?? bv.projectId;
|
|
29452
|
-
|
|
29453
|
-
if (!bvSystemId || !revSystemId) {
|
|
29572
|
+
if (!bvSystemId) {
|
|
29454
29573
|
return { content: [{ type: "text", text: `Beat Version "${beatVersionId}" has no system identifier \u2014 record may be corrupt.` }], isError: true };
|
|
29455
29574
|
}
|
|
29575
|
+
const revSystemId = revision.systemId ?? revision.projectId;
|
|
29576
|
+
if (!revSystemId) {
|
|
29577
|
+
return { content: [{ type: "text", text: `Revision "${revisionId}" has no system identifier \u2014 record may be corrupt.` }], isError: true };
|
|
29578
|
+
}
|
|
29456
29579
|
if (bv.beatId !== revision.beatId || bvSystemId !== revSystemId) {
|
|
29457
29580
|
return { content: [{ type: "text", text: `Beat Version "${beatVersionId}" belongs to a different Beat.` }], isError: true };
|
|
29458
29581
|
}
|
|
@@ -34194,7 +34317,7 @@ function loadConfig() {
|
|
|
34194
34317
|
};
|
|
34195
34318
|
}
|
|
34196
34319
|
async function main() {
|
|
34197
|
-
console.error(`[harmonica-mcp] v${"3.7.
|
|
34320
|
+
console.error(`[harmonica-mcp] v${"3.7.2"} starting\u2026`);
|
|
34198
34321
|
const config2 = loadConfig();
|
|
34199
34322
|
const client = createHttpClient({
|
|
34200
34323
|
apiBaseUrl: config2.apiBaseUrl,
|