@codazen/harmonica-mcp 0.28.1 → 0.29.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 +79 -28
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21503,9 +21503,9 @@ function registerBaselineTools(server, ctx, client) {
|
|
|
21503
21503
|
return {
|
|
21504
21504
|
content: [{
|
|
21505
21505
|
type: "text",
|
|
21506
|
-
text: `Project baseline started.
|
|
21506
|
+
text: `Project baseline started. Job ID: ${task.taskId}
|
|
21507
21507
|
|
|
21508
|
-
Poll progress with:
|
|
21508
|
+
Poll progress with: get_job_status({ jobId: "${task.taskId}" })`
|
|
21509
21509
|
}]
|
|
21510
21510
|
};
|
|
21511
21511
|
} catch (err) {
|
|
@@ -21779,7 +21779,7 @@ ${d.rationale}${d.suggestions?.length ? `
|
|
|
21779
21779
|
function registerBeatQualityTools(server, ctx, client) {
|
|
21780
21780
|
server.tool(
|
|
21781
21781
|
"check_beat_quality",
|
|
21782
|
-
"Enqueue a Beat quality check across 6 dimensions (Distinctive, Harmonious, Substantial, Durable, Clear, Strategically Aligned). By default returns a
|
|
21782
|
+
"Enqueue a Beat quality check across 6 dimensions (Distinctive, Harmonious, Substantial, Durable, Clear, Strategically Aligned). By default returns a jobId immediately (fire-and-forget) \u2014 use get_job_status or list_checks to retrieve results. Set wait=true to block until the check completes and receive the scorecard inline. WARNING: wait=true holds the MCP session open for 30\u201360s per check \u2014 for bulk operations (more than one Beat), omit wait and poll get_job_status separately to avoid session exhaustion.",
|
|
21783
21783
|
{
|
|
21784
21784
|
beatId: external_exports.string().describe("The beat ID (e.g., TF-B-001)"),
|
|
21785
21785
|
projectId: external_exports.string().describe("The project ID"),
|
|
@@ -21794,9 +21794,9 @@ function registerBeatQualityTools(server, ctx, client) {
|
|
|
21794
21794
|
content: [{
|
|
21795
21795
|
type: "text",
|
|
21796
21796
|
text: `Quality check enqueued for ${beatId}.
|
|
21797
|
-
|
|
21797
|
+
Job ID: ${taskId}
|
|
21798
21798
|
|
|
21799
|
-
Use
|
|
21799
|
+
Use get_job_status with jobId="${taskId}" to poll for results, or list_checks to retrieve the completed scorecard once done.`
|
|
21800
21800
|
}]
|
|
21801
21801
|
};
|
|
21802
21802
|
}
|
|
@@ -22939,7 +22939,7 @@ function registerCheckTools(server, ctx, client) {
|
|
|
22939
22939
|
`**Check Type:** ${checkType}`,
|
|
22940
22940
|
`**Target:** ${targetId}`,
|
|
22941
22941
|
``,
|
|
22942
|
-
`Poll with \`
|
|
22942
|
+
`Poll with \`get_job_status\` (jobId: \`${task.taskId}\`), then \`list_checks\` to view results.`
|
|
22943
22943
|
].join("\n");
|
|
22944
22944
|
return { content: [{ type: "text", text }] };
|
|
22945
22945
|
} catch (err) {
|
|
@@ -24587,7 +24587,7 @@ ${d.rationale}${d.suggestions?.length ? `
|
|
|
24587
24587
|
function registerPlanQualityTools(server, ctx, client) {
|
|
24588
24588
|
server.tool(
|
|
24589
24589
|
"check_plan_quality",
|
|
24590
|
-
"Enqueue a Revision plan quality check across 6 dimensions (Scoped, Directional, Testable, Traceable, Assignable, Risk-aware). By default returns a
|
|
24590
|
+
"Enqueue a Revision plan quality check across 6 dimensions (Scoped, Directional, Testable, Traceable, Assignable, Risk-aware). By default returns a jobId immediately (fire-and-forget) \u2014 use get_job_status or list_checks to retrieve results. Set wait=true to block until the check completes and receive the scorecard inline. WARNING: wait=true holds the MCP session open for 30\u201360s per check \u2014 for bulk operations (more than one revision), omit wait and poll get_job_status separately to avoid session exhaustion.",
|
|
24591
24591
|
{
|
|
24592
24592
|
revisionId: external_exports.string().describe("The revision or Beat Version ID (e.g., rev-abc123 or bv-abc123)"),
|
|
24593
24593
|
projectId: external_exports.string().describe("The project ID"),
|
|
@@ -24602,9 +24602,9 @@ function registerPlanQualityTools(server, ctx, client) {
|
|
|
24602
24602
|
content: [{
|
|
24603
24603
|
type: "text",
|
|
24604
24604
|
text: `Plan quality check enqueued for ${revisionId}.
|
|
24605
|
-
|
|
24605
|
+
Job ID: ${task.taskId}
|
|
24606
24606
|
|
|
24607
|
-
Use
|
|
24607
|
+
Use get_job_status with jobId="${task.taskId}" to poll for results, or list_checks to retrieve the completed scorecard once done.`
|
|
24608
24608
|
}]
|
|
24609
24609
|
};
|
|
24610
24610
|
}
|
|
@@ -24737,7 +24737,7 @@ function registerPortfolioCoherenceTools(server, ctx, client) {
|
|
|
24737
24737
|
`Portfolio coherence check enqueued for ${projectId}.`,
|
|
24738
24738
|
`Task ID: ${taskId}`,
|
|
24739
24739
|
"",
|
|
24740
|
-
`Use
|
|
24740
|
+
`Use get_job_status with jobId="${taskId}" to poll, or list_checks with projectId="${projectId}" and checkType="portfolio_coherence" to view results.`
|
|
24741
24741
|
].join("\n")
|
|
24742
24742
|
}]
|
|
24743
24743
|
};
|
|
@@ -25938,7 +25938,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
25938
25938
|
);
|
|
25939
25939
|
server.tool(
|
|
25940
25940
|
"draft_coda",
|
|
25941
|
-
"Generate and apply a Coda (description) for a Beat that has a title but no description. Uses project context, sibling Beats, related Notes, and codebase grep to write a resolved expression of the capability. The Coda is applied directly to the Beat, making it eligible for plan_beat_versions once a beat_quality check passes. An activity is logged so the Beat owner can review and edit. Returns a
|
|
25941
|
+
"Generate and apply a Coda (description) for a Beat that has a title but no description. Uses project context, sibling Beats, related Notes, and codebase grep to write a resolved expression of the capability. The Coda is applied directly to the Beat, making it eligible for plan_beat_versions once a beat_quality check passes. An activity is logged so the Beat owner can review and edit. Returns a job ID \u2014 use get_job_status to track progress.",
|
|
25942
25942
|
{
|
|
25943
25943
|
projectId: external_exports.string().describe("The project ID"),
|
|
25944
25944
|
beatId: external_exports.string().describe("The beat ID (must have a title but no description)")
|
|
@@ -25959,7 +25959,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
25959
25959
|
`**Status:** ${task.status}`,
|
|
25960
25960
|
"",
|
|
25961
25961
|
"The agent will gather context and apply a Coda directly to the Beat. An activity will be logged \u2014 review and edit if needed.",
|
|
25962
|
-
"Use `
|
|
25962
|
+
"Use `get_job_status` with the job ID to check progress."
|
|
25963
25963
|
].join("\n")
|
|
25964
25964
|
}]
|
|
25965
25965
|
};
|
|
@@ -25971,7 +25971,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
25971
25971
|
);
|
|
25972
25972
|
server.tool(
|
|
25973
25973
|
"validate_assumptions",
|
|
25974
|
-
"Validate unvalidated assumption Notes against the codebase. Checks if assumptions are confirmed (validated), contradicted (invalidated), or have insufficient evidence (unvalidated). Low-criticality assumptions are auto-resolved; high-criticality are flagged for human review. Returns a
|
|
25974
|
+
"Validate unvalidated assumption Notes against the codebase. Checks if assumptions are confirmed (validated), contradicted (invalidated), or have insufficient evidence (unvalidated). Low-criticality assumptions are auto-resolved; high-criticality are flagged for human review. Returns a job ID \u2014 use get_job_status to track progress.",
|
|
25975
25975
|
{
|
|
25976
25976
|
projectId: external_exports.string().describe("The project ID"),
|
|
25977
25977
|
noteIds: external_exports.array(external_exports.string()).optional().describe("Specific assumption note IDs to validate. If omitted, validates all unvalidated assumptions.")
|
|
@@ -25993,7 +25993,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
25993
25993
|
"",
|
|
25994
25994
|
"The validator will grep the codebase for evidence, then classify each assumption.",
|
|
25995
25995
|
"Low-criticality assumptions are auto-resolved. High-criticality are flagged for your review.",
|
|
25996
|
-
"Use `
|
|
25996
|
+
"Use `get_job_status` with the job ID to check progress."
|
|
25997
25997
|
].join("\n")
|
|
25998
25998
|
}]
|
|
25999
25999
|
};
|
|
@@ -26005,7 +26005,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26005
26005
|
);
|
|
26006
26006
|
server.tool(
|
|
26007
26007
|
"implement_work_item",
|
|
26008
|
-
"Trigger an agent session to implement a workItem Note. The agent explores the codebase, writes code, commits, pushes a branch, and creates a PR. Returns a
|
|
26008
|
+
"Trigger an agent session to implement a workItem Note. The agent explores the codebase, writes code, commits, pushes a branch, and creates a PR. Returns a job ID \u2014 use get_job_status to track progress. Requires agentCapabilities.implementation enabled on the project.",
|
|
26009
26009
|
{
|
|
26010
26010
|
noteId: external_exports.string().describe("The workItem note ID to implement (e.g., N-TF-001)"),
|
|
26011
26011
|
projectId: external_exports.string().describe("The project ID")
|
|
@@ -26028,7 +26028,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26028
26028
|
`**Status:** ${task.status}`,
|
|
26029
26029
|
"",
|
|
26030
26030
|
"The agent will explore the codebase, implement the work item, and create a PR.",
|
|
26031
|
-
"Use `
|
|
26031
|
+
"Use `get_job_status` with the job ID to check progress and see the result (branch, PR URL, tool count, duration)."
|
|
26032
26032
|
].join("\n")
|
|
26033
26033
|
}]
|
|
26034
26034
|
};
|
|
@@ -26040,7 +26040,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26040
26040
|
);
|
|
26041
26041
|
server.tool(
|
|
26042
26042
|
"implement_revision",
|
|
26043
|
-
"Trigger an agent session to implement a Revision. The agent reads the Revision spec and beat-level Notes, writes code, commits, pushes a branch named agent/rev-{id}-{title}, and creates a draft PR with the Revision ID pre-populated in the PR body. Returns a
|
|
26043
|
+
"Trigger an agent session to implement a Revision. The agent reads the Revision spec and beat-level Notes, writes code, commits, pushes a branch named agent/rev-{id}-{title}, and creates a draft PR with the Revision ID pre-populated in the PR body. Returns a job ID \u2014 use get_job_status to track progress. Requires agentCapabilities.implementation enabled on the project.",
|
|
26044
26044
|
{
|
|
26045
26045
|
revisionId: external_exports.string().min(1).describe("The Revision ID to implement (e.g., rev-abc123)"),
|
|
26046
26046
|
projectId: external_exports.string().min(1).describe("The project ID")
|
|
@@ -26063,7 +26063,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26063
26063
|
`**Status:** ${task.status}`,
|
|
26064
26064
|
"",
|
|
26065
26065
|
"The agent will read the Revision spec and beat-level Notes, implement the code, and create a draft PR.",
|
|
26066
|
-
"Use `
|
|
26066
|
+
"Use `get_job_status` with the job ID to check progress and see the result (branch, PR URL, tool count, duration)."
|
|
26067
26067
|
].join("\n")
|
|
26068
26068
|
}]
|
|
26069
26069
|
};
|
|
@@ -26075,7 +26075,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26075
26075
|
);
|
|
26076
26076
|
server.tool(
|
|
26077
26077
|
"validate_work_items",
|
|
26078
|
-
"Validate active workItem Notes against the codebase. Checks if work items are already implemented (resolved), no longer relevant (dismissed), or still needed (active). Active items get a solution plan for the implementation agent. Returns a
|
|
26078
|
+
"Validate active workItem Notes against the codebase. Checks if work items are already implemented (resolved), no longer relevant (dismissed), or still needed (active). Active items get a solution plan for the implementation agent. Returns a job ID \u2014 use get_job_status to track progress.",
|
|
26079
26079
|
{
|
|
26080
26080
|
projectId: external_exports.string().describe("The project ID"),
|
|
26081
26081
|
noteIds: external_exports.array(external_exports.string()).optional().describe("Specific note IDs to validate. If omitted, validates all active work items.")
|
|
@@ -26096,7 +26096,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26096
26096
|
`**Status:** ${task.status}`,
|
|
26097
26097
|
"",
|
|
26098
26098
|
"The validator will grep the codebase for evidence, then classify each item.",
|
|
26099
|
-
"Use `
|
|
26099
|
+
"Use `get_job_status` with the job ID to check progress."
|
|
26100
26100
|
].join("\n")
|
|
26101
26101
|
}]
|
|
26102
26102
|
};
|
|
@@ -26108,7 +26108,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26108
26108
|
);
|
|
26109
26109
|
server.tool(
|
|
26110
26110
|
"plan_revision_batch",
|
|
26111
|
-
"Autonomously generate work items for planning Revisions. If revisionIds are omitted, discovers all planning Revisions with no scoped work items and plans them all. Uses codebase-aware agent sessions when available, LLM-only fallback otherwise. Returns a
|
|
26111
|
+
"Autonomously generate work items for planning Revisions. If revisionIds are omitted, discovers all planning Revisions with no scoped work items and plans them all. Uses codebase-aware agent sessions when available, LLM-only fallback otherwise. Returns a job ID \u2014 use get_job_status to track progress.",
|
|
26112
26112
|
{
|
|
26113
26113
|
projectId: external_exports.string().describe("The project ID"),
|
|
26114
26114
|
revisionIds: external_exports.array(external_exports.string()).optional().describe("Specific revision IDs to plan. If omitted, auto-discovers all unplanned planning revisions.")
|
|
@@ -26129,7 +26129,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26129
26129
|
`**Status:** ${task.status}`,
|
|
26130
26130
|
"",
|
|
26131
26131
|
"The agent will generate work items for each revision. Revisions stay in planning \u2014 review work items before advancing to building.",
|
|
26132
|
-
"Use `
|
|
26132
|
+
"Use `get_job_status` with the job ID to check progress."
|
|
26133
26133
|
].join("\n")
|
|
26134
26134
|
}]
|
|
26135
26135
|
};
|
|
@@ -26141,7 +26141,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26141
26141
|
);
|
|
26142
26142
|
server.tool(
|
|
26143
26143
|
"run_triage",
|
|
26144
|
-
"Run the autonomous triage loop for a project. Analyzes next actions, validates work items against the codebase, auto-executes safe actions (draft_coda, plan_revision_batch, validate_work_items), and escalates items that need human judgment. Requires agentCapabilities.triage enabled on the project. Returns a
|
|
26144
|
+
"Run the autonomous triage loop for a project. Analyzes next actions, validates work items against the codebase, auto-executes safe actions (draft_coda, plan_revision_batch, validate_work_items), and escalates items that need human judgment. Requires agentCapabilities.triage enabled on the project. Returns a job ID \u2014 use get_job_status to track progress.",
|
|
26145
26145
|
{
|
|
26146
26146
|
projectId: external_exports.string().describe("The project ID")
|
|
26147
26147
|
},
|
|
@@ -26161,7 +26161,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26161
26161
|
"",
|
|
26162
26162
|
"The triage engine will analyze next actions, filter by Beat lifecycle eligibility,",
|
|
26163
26163
|
"auto-execute safe tasks, and escalate items needing human input.",
|
|
26164
|
-
"Use `
|
|
26164
|
+
"Use `get_job_status` with the job ID to see the results."
|
|
26165
26165
|
].join("\n")
|
|
26166
26166
|
}]
|
|
26167
26167
|
};
|
|
@@ -26183,7 +26183,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26183
26183
|
"Use this for .docx, .xlsx, .pptx, or .pdf files \u2014 the server parses them automatically.",
|
|
26184
26184
|
"Example: run `base64 < report.docx` to get the base64 string.",
|
|
26185
26185
|
"",
|
|
26186
|
-
"Returns a
|
|
26186
|
+
"Returns a job ID \u2014 use `get_job_status` to track progress."
|
|
26187
26187
|
].join("\n"),
|
|
26188
26188
|
{
|
|
26189
26189
|
projectId: external_exports.string().describe("The project ID"),
|
|
@@ -26206,7 +26206,7 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26206
26206
|
`**Task ID:** ${result.taskId}`,
|
|
26207
26207
|
`**Status:** ${result.status}`,
|
|
26208
26208
|
"",
|
|
26209
|
-
"Use `
|
|
26209
|
+
"Use `get_job_status` with the job ID to check when extraction is complete."
|
|
26210
26210
|
].join("\n")
|
|
26211
26211
|
}]
|
|
26212
26212
|
};
|
|
@@ -26219,7 +26219,58 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26219
26219
|
}
|
|
26220
26220
|
|
|
26221
26221
|
// ../../libs/harmonica-services/src/mcp/tools/index.ts
|
|
26222
|
-
|
|
26222
|
+
var TOOL_PROFILES = Object.freeze({
|
|
26223
|
+
"beat-planning": Object.freeze([
|
|
26224
|
+
registerBeatTools,
|
|
26225
|
+
registerBeatVersionTools,
|
|
26226
|
+
registerNoteTools,
|
|
26227
|
+
registerBeatQualityTools,
|
|
26228
|
+
registerPlanQualityTools,
|
|
26229
|
+
registerBeatPlanningTools,
|
|
26230
|
+
registerCheckTools
|
|
26231
|
+
]),
|
|
26232
|
+
"execution": Object.freeze([
|
|
26233
|
+
registerRevisionLifecycleTools,
|
|
26234
|
+
registerBeatLifecycleTools,
|
|
26235
|
+
registerBeatVersionTools,
|
|
26236
|
+
registerDropTools,
|
|
26237
|
+
registerWorkflowTools,
|
|
26238
|
+
registerCheckTools
|
|
26239
|
+
]),
|
|
26240
|
+
"discovery": Object.freeze([
|
|
26241
|
+
registerEmbeddingTools,
|
|
26242
|
+
registerNextActionsTools,
|
|
26243
|
+
registerBeatTools,
|
|
26244
|
+
registerNoteTools,
|
|
26245
|
+
registerProjectTools,
|
|
26246
|
+
registerAnalysisTools
|
|
26247
|
+
]),
|
|
26248
|
+
"admin": Object.freeze([
|
|
26249
|
+
registerOrganizationTools,
|
|
26250
|
+
registerTeamspaceTools,
|
|
26251
|
+
registerMembershipTools,
|
|
26252
|
+
registerProjectTools,
|
|
26253
|
+
registerProjectLifecycleTools
|
|
26254
|
+
]),
|
|
26255
|
+
"onboarding": Object.freeze([
|
|
26256
|
+
registerOnboardingTools,
|
|
26257
|
+
registerBaselineTools,
|
|
26258
|
+
registerSnapshotTools,
|
|
26259
|
+
registerBeatComposerTools,
|
|
26260
|
+
registerProjectTools
|
|
26261
|
+
])
|
|
26262
|
+
});
|
|
26263
|
+
function registerAllTools(server, ctx, client, profile) {
|
|
26264
|
+
if (profile && profile !== "all") {
|
|
26265
|
+
if (!Object.hasOwn(TOOL_PROFILES, profile)) {
|
|
26266
|
+
const valid = Object.keys(TOOL_PROFILES).join(", ");
|
|
26267
|
+
throw new Error(`Unknown tool profile: "${profile}". Valid profiles: ${valid}`);
|
|
26268
|
+
}
|
|
26269
|
+
for (const register of TOOL_PROFILES[profile]) {
|
|
26270
|
+
register(server, ctx, client);
|
|
26271
|
+
}
|
|
26272
|
+
return;
|
|
26273
|
+
}
|
|
26223
26274
|
registerProjectTools(server, ctx, client);
|
|
26224
26275
|
registerProjectLifecycleTools(server, ctx, client);
|
|
26225
26276
|
registerMembershipTools(server, ctx, client);
|
|
@@ -27406,7 +27457,7 @@ function loadConfig() {
|
|
|
27406
27457
|
};
|
|
27407
27458
|
}
|
|
27408
27459
|
async function main() {
|
|
27409
|
-
console.error(`[harmonica-mcp] v${"0.
|
|
27460
|
+
console.error(`[harmonica-mcp] v${"0.29.0"} starting\u2026`);
|
|
27410
27461
|
const config2 = loadConfig();
|
|
27411
27462
|
const client = createHttpClient({
|
|
27412
27463
|
apiBaseUrl: config2.apiBaseUrl,
|