@codazen/harmonica-mcp 0.32.0 → 1.0.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 +18 -18
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -26286,16 +26286,16 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26286
26286
|
}
|
|
26287
26287
|
);
|
|
26288
26288
|
server.tool(
|
|
26289
|
-
"
|
|
26290
|
-
|
|
26289
|
+
"start_session",
|
|
26290
|
+
'Start an agent session from a free-form message \u2014 like opening a Claude Code conversation pointed at your project. The message is the only instruction: describe what you want ("investigate why login fails", "implement revision rev-abc123", "what does the auth flow do?") and the agent resolves any entity references itself and does whatever the work needs \u2014 investigate and report findings, or change code and open a PR. A findings-only result with no PR is a valid outcome. Returns a job ID \u2014 use get_job_status to track progress. Requires agent sessions enabled on the project.',
|
|
26291
26291
|
{
|
|
26292
|
-
|
|
26293
|
-
|
|
26292
|
+
projectId: external_exports.string().min(1).describe("The project ID \u2014 the trusted scope the session is rooted at"),
|
|
26293
|
+
message: external_exports.string().min(1).describe("Free-form first message describing what the session should do")
|
|
26294
26294
|
},
|
|
26295
|
-
async ({
|
|
26295
|
+
async ({ projectId, message }) => {
|
|
26296
26296
|
try {
|
|
26297
26297
|
await assertProjectInOrg(client, projectId, ctx.orgId);
|
|
26298
|
-
const task = await client.
|
|
26298
|
+
const task = await client.startSession(projectId, message, {
|
|
26299
26299
|
name: ctx.user.name,
|
|
26300
26300
|
email: ctx.user.email
|
|
26301
26301
|
});
|
|
@@ -26303,20 +26303,20 @@ ${JSON.stringify(task.result, null, 2)}
|
|
|
26303
26303
|
content: [{
|
|
26304
26304
|
type: "text",
|
|
26305
26305
|
text: [
|
|
26306
|
-
"
|
|
26306
|
+
"Agent session queued.",
|
|
26307
26307
|
"",
|
|
26308
|
-
`**
|
|
26308
|
+
`**Project:** ${projectId}`,
|
|
26309
26309
|
`**Task ID:** ${task.taskId}`,
|
|
26310
26310
|
`**Status:** ${task.status}`,
|
|
26311
26311
|
"",
|
|
26312
|
-
"The agent
|
|
26313
|
-
"Use `get_job_status` with the job ID to check progress and see
|
|
26312
|
+
"The agent runs as a single thread: it resolves any entity references in your message and produces whatever the work needs \u2014 findings, file changes, and/or a PR.",
|
|
26313
|
+
"Use `get_job_status` with the job ID to check progress and see what it produced."
|
|
26314
26314
|
].join("\n")
|
|
26315
26315
|
}]
|
|
26316
26316
|
};
|
|
26317
26317
|
} catch (err) {
|
|
26318
|
-
const
|
|
26319
|
-
return { content: [{ type: "text", text: `Failed to start
|
|
26318
|
+
const errMessage = err instanceof Error ? err.message : String(err);
|
|
26319
|
+
return { content: [{ type: "text", text: `Failed to start session: ${errMessage}` }], isError: true };
|
|
26320
26320
|
}
|
|
26321
26321
|
}
|
|
26322
26322
|
);
|
|
@@ -27416,14 +27416,14 @@ function createHttpClient(config2) {
|
|
|
27416
27416
|
return pollTaskResult(enqueued.taskId);
|
|
27417
27417
|
},
|
|
27418
27418
|
// Agent sessions
|
|
27419
|
-
|
|
27419
|
+
startSession: async (projectId, message, triggeredBy) => {
|
|
27420
27420
|
const result = await request(
|
|
27421
27421
|
"POST",
|
|
27422
|
-
`/api/
|
|
27423
|
-
triggeredBy
|
|
27422
|
+
`/api/sessions`,
|
|
27423
|
+
{ projectId, message, ...triggeredBy && { triggeredBy } }
|
|
27424
27424
|
);
|
|
27425
|
-
if (!result?.taskId) throw new Error("
|
|
27426
|
-
return { taskId: result.taskId, taskType: "
|
|
27425
|
+
if (!result?.taskId) throw new Error("Start session enqueue failed: no taskId returned");
|
|
27426
|
+
return { taskId: result.taskId, taskType: "generic_session", status: result.status ?? "pending", projectId, createdAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
27427
27427
|
},
|
|
27428
27428
|
planRevisionBatch: async (projectId, revisionIds) => {
|
|
27429
27429
|
const result = await request(
|
|
@@ -27859,7 +27859,7 @@ function loadConfig() {
|
|
|
27859
27859
|
};
|
|
27860
27860
|
}
|
|
27861
27861
|
async function main() {
|
|
27862
|
-
console.error(`[harmonica-mcp] v${"0.
|
|
27862
|
+
console.error(`[harmonica-mcp] v${"1.0.0"} starting\u2026`);
|
|
27863
27863
|
const config2 = loadConfig();
|
|
27864
27864
|
const client = createHttpClient({
|
|
27865
27865
|
apiBaseUrl: config2.apiBaseUrl,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codazen/harmonica-mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MCP server for Harmonica — connect
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP server for Harmonica — connect any MCP-compatible AI assistant to Harmonica",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
7
7
|
"harmonica-mcp": "./dist/index.js"
|