@codazen/harmonica-mcp 4.1.0 → 4.2.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 +19 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26623,6 +26623,7 @@ var CHECK_TARGET_TYPES = [
|
|
|
26623
26623
|
"revision",
|
|
26624
26624
|
"beat_version",
|
|
26625
26625
|
"project",
|
|
26626
|
+
"system",
|
|
26626
26627
|
"drop",
|
|
26627
26628
|
"organization"
|
|
26628
26629
|
];
|
|
@@ -28168,9 +28169,9 @@ ${trimmed}` : `# ${title}`;
|
|
|
28168
28169
|
}
|
|
28169
28170
|
|
|
28170
28171
|
// ../../libs/harmonica-services/src/mcp/tools/notebook-tools.ts
|
|
28171
|
-
var SCOPE_TYPE_VALUES = ["org", "teamspace", "
|
|
28172
|
+
var SCOPE_TYPE_VALUES = ["org", "teamspace", "system", "account", "project"];
|
|
28172
28173
|
var scopeRefSchema = external_exports.object({
|
|
28173
|
-
scopeType: external_exports.enum(SCOPE_TYPE_VALUES).describe("Scope type \u2014 org, teamspace,
|
|
28174
|
+
scopeType: external_exports.enum(SCOPE_TYPE_VALUES).describe("Scope type \u2014 org, teamspace, system, or account"),
|
|
28174
28175
|
scopeId: external_exports.string().min(1).describe("ID of the scope entity")
|
|
28175
28176
|
});
|
|
28176
28177
|
function formatNotebook(nb) {
|
|
@@ -28395,7 +28396,7 @@ ${formatTree(tree.root)}` }] };
|
|
|
28395
28396
|
if (!scopeProjectId) {
|
|
28396
28397
|
try {
|
|
28397
28398
|
const bindings = await client.getNotebookScopeBindings(notebookId);
|
|
28398
|
-
scopeProjectId = bindings?.find((b) => b.scopeType === "project")?.scopeId;
|
|
28399
|
+
scopeProjectId = bindings?.find((b) => b.scopeType === "system" || b.scopeType === "project")?.scopeId;
|
|
28399
28400
|
} catch {
|
|
28400
28401
|
}
|
|
28401
28402
|
}
|
|
@@ -28561,7 +28562,7 @@ ${formatNotebook(updated)}` }] };
|
|
|
28561
28562
|
);
|
|
28562
28563
|
server.tool(
|
|
28563
28564
|
"set_notebook_scopes",
|
|
28564
|
-
"Replace all scope bindings for a Notebook. Pass an empty array to remove all bindings. Bindable scope types: org, teamspace,
|
|
28565
|
+
"Replace all scope bindings for a Notebook. Pass an empty array to remove all bindings. Bindable scope types: org, teamspace, system. (systemContainer is reserved.)",
|
|
28565
28566
|
{
|
|
28566
28567
|
notebookId: external_exports.string().describe("The Notebook ID"),
|
|
28567
28568
|
scopes: external_exports.array(scopeRefSchema).max(45).describe("New complete set of scope bindings (max 45)")
|
|
@@ -29983,9 +29984,10 @@ Accepts the full PR metadata (number, url, branch, state, optional mergeSha). Fi
|
|
|
29983
29984
|
revisionId: external_exports.string().describe("The Revision ID whose PR to review (e.g., rev-abc123)"),
|
|
29984
29985
|
autoMerge: external_exports.boolean().optional().describe("Merge automatically once converged. Default false \u2192 stop at ready-for-review."),
|
|
29985
29986
|
maxIterations: external_exports.number().int().min(1).max(3).optional().describe("Review rounds (default and hard cap: 3)."),
|
|
29986
|
-
confirm: external_exports.boolean().optional().describe("Set true to start the review. Omitted/false performs a dry-run \u2014 no session, scan, or task is created.")
|
|
29987
|
+
confirm: external_exports.boolean().optional().describe("Set true to start the review. Omitted/false performs a dry-run \u2014 no session, scan, or task is created."),
|
|
29988
|
+
requestingSessionId: external_exports.string().min(1).optional().describe("Your current Session ID (sess-<uuid>). Pass it so the review Session nests under yours and reports its outcome back to you when it finishes \u2014 otherwise you have no way to learn how the review turned out.")
|
|
29987
29989
|
},
|
|
29988
|
-
async ({ revisionId, autoMerge, maxIterations, confirm }) => {
|
|
29990
|
+
async ({ revisionId, autoMerge, maxIterations, confirm, requestingSessionId }) => {
|
|
29989
29991
|
try {
|
|
29990
29992
|
const revision = await client.getRevision(revisionId);
|
|
29991
29993
|
if (!revision) {
|
|
@@ -29996,7 +29998,7 @@ Accepts the full PR metadata (number, url, branch, state, optional mergeSha). Fi
|
|
|
29996
29998
|
if ("refusal" in latitude) {
|
|
29997
29999
|
return { content: [{ type: "text", text: latitude.refusal }], isError: true };
|
|
29998
30000
|
}
|
|
29999
|
-
const result = await client.requestCodeReview({ revisionId, autoMerge, maxIterations, confirm });
|
|
30001
|
+
const result = await client.requestCodeReview({ revisionId, autoMerge, maxIterations, confirm, requestingSessionId });
|
|
30000
30002
|
if (!result.success) {
|
|
30001
30003
|
return { content: [{ type: "text", text: `Failed to request code review (${result.error.code}): ${result.error.message}` }], isError: true };
|
|
30002
30004
|
}
|
|
@@ -30758,13 +30760,17 @@ function assertSnapshotShape(val, sourceHint) {
|
|
|
30758
30760
|
}
|
|
30759
30761
|
|
|
30760
30762
|
// ../../libs/harmonica-services/src/mcp/tools/subscription-tools.ts
|
|
30761
|
-
var ENTITY_TYPES = ["
|
|
30763
|
+
var ENTITY_TYPES = ["system", "beat", "revision"];
|
|
30764
|
+
var entityTypeField = external_exports.preprocess(
|
|
30765
|
+
(v) => v === "project" ? "system" : v,
|
|
30766
|
+
external_exports.enum(ENTITY_TYPES)
|
|
30767
|
+
);
|
|
30762
30768
|
function registerSubscriptionTools(server, ctx, client) {
|
|
30763
30769
|
server.tool(
|
|
30764
30770
|
"subscribe_to_entity",
|
|
30765
|
-
"Follow a
|
|
30771
|
+
"Follow a System, Beat, or Revision to receive notifications when it changes. You are auto-subscribed to things you own \u2014 use this to follow additional entities.",
|
|
30766
30772
|
{
|
|
30767
|
-
entityType:
|
|
30773
|
+
entityType: entityTypeField.describe("Type of entity to follow"),
|
|
30768
30774
|
entityId: external_exports.string().describe("The entity ID (system ID, beat ID, or revision ID)"),
|
|
30769
30775
|
systemId: external_exports.string().describe("The system ID (for access control)")
|
|
30770
30776
|
},
|
|
@@ -30786,9 +30792,9 @@ function registerSubscriptionTools(server, ctx, client) {
|
|
|
30786
30792
|
);
|
|
30787
30793
|
server.tool(
|
|
30788
30794
|
"unsubscribe_from_entity",
|
|
30789
|
-
"Stop following a
|
|
30795
|
+
"Stop following a System, Beat, or Revision. Use durable=true to prevent auto-resubscribe if you are later re-assigned.",
|
|
30790
30796
|
{
|
|
30791
|
-
entityType:
|
|
30797
|
+
entityType: entityTypeField.describe("Type of entity to unfollow"),
|
|
30792
30798
|
entityId: external_exports.string().describe("The entity ID"),
|
|
30793
30799
|
durable: external_exports.boolean().optional().default(false).describe("If true, prevents auto-resubscribe on reassignment")
|
|
30794
30800
|
},
|
|
@@ -35024,7 +35030,7 @@ function loadConfig() {
|
|
|
35024
35030
|
};
|
|
35025
35031
|
}
|
|
35026
35032
|
async function main() {
|
|
35027
|
-
console.error(`[harmonica-mcp] v${"4.
|
|
35033
|
+
console.error(`[harmonica-mcp] v${"4.2.0"} starting\u2026`);
|
|
35028
35034
|
const config2 = loadConfig();
|
|
35029
35035
|
const client = createHttpClient({
|
|
35030
35036
|
apiBaseUrl: config2.apiBaseUrl,
|