@codazen/harmonica-mcp 4.2.0 → 4.3.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.
Files changed (2) hide show
  1. package/dist/index.js +18 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -26938,6 +26938,8 @@ var StartSessionRequestBodySchema = external_exports.object({
26938
26938
  systemId: external_exports.string().min(1),
26939
26939
  message: external_exports.string().min(1),
26940
26940
  revisionId: external_exports.string().min(1).optional(),
26941
+ /** Caller's own Session id — nests the new Session under it (B-231). */
26942
+ parentSessionId: external_exports.string().min(1).optional(),
26941
26943
  enableWebSearch: external_exports.boolean().optional()
26942
26944
  });
26943
26945
  var StartSessionResponseSchema = external_exports.object({
@@ -32316,16 +32318,20 @@ ${JSON.stringify(task.result, null, 2)}
32316
32318
  {
32317
32319
  systemId: external_exports.string().min(1).describe("The system ID \u2014 the trusted scope the session is rooted at"),
32318
32320
  message: external_exports.string().min(1).describe("Free-form first message describing what the session should do"),
32319
- revisionId: external_exports.string().min(1).optional().describe("Optional Revision ID (rev-<uuid>). When provided, the Worker routes to the typed implementation session path (prepareRevisionImplementationSession), enabling file hint generation and richer session context. Omit for investigation, planning, or freeform sessions.")
32321
+ revisionId: external_exports.string().min(1).optional().describe("Optional Revision ID (rev-<uuid>). When provided, the Worker routes to the typed implementation session path (prepareRevisionImplementationSession), enabling file hint generation and richer session context. Omit for investigation, planning, or freeform sessions."),
32322
+ parentSessionId: external_exports.string().min(1).optional().describe("Your current Session ID (sess-<uuid>). Pass it when you are kicking off this session as part of your own work \u2014 the new session then nests under yours in the session tree and can report back to you. Omit for a standalone session.")
32320
32323
  },
32321
- async ({ systemId, message, revisionId }) => {
32324
+ async ({ systemId, message, revisionId, parentSessionId }) => {
32322
32325
  try {
32323
32326
  await assertSystemInOrg(client, systemId, ctx.orgId);
32324
32327
  const task = await client.startSession(
32325
32328
  systemId,
32326
32329
  message,
32327
32330
  { name: ctx.user.name, email: ctx.user.email },
32328
- revisionId?.trim() ? { revisionId: revisionId.trim() } : void 0
32331
+ revisionId?.trim() || parentSessionId?.trim() ? {
32332
+ ...revisionId?.trim() && { revisionId: revisionId.trim() },
32333
+ ...parentSessionId?.trim() && { parentSessionId: parentSessionId.trim() }
32334
+ } : void 0
32329
32335
  );
32330
32336
  return {
32331
32337
  content: [{
@@ -33917,10 +33923,17 @@ function createHttpClient(config2) {
33917
33923
  // Agent sessions
33918
33924
  startSession: async (systemId, message, triggeredBy, options) => {
33919
33925
  const trimmedRevisionId = options?.revisionId?.trim();
33926
+ const trimmedParentSessionId = options?.parentSessionId?.trim();
33920
33927
  const result = await request(
33921
33928
  "POST",
33922
33929
  `/api/sessions`,
33923
- { systemId, message, ...triggeredBy && { triggeredBy }, ...trimmedRevisionId && { revisionId: trimmedRevisionId } }
33930
+ {
33931
+ systemId,
33932
+ message,
33933
+ ...triggeredBy && { triggeredBy },
33934
+ ...trimmedRevisionId && { revisionId: trimmedRevisionId },
33935
+ ...trimmedParentSessionId && { parentSessionId: trimmedParentSessionId }
33936
+ }
33924
33937
  );
33925
33938
  if (!result?.taskId) throw new Error("Start session enqueue failed: no taskId returned");
33926
33939
  return { taskId: result.taskId, taskType: "generic_session", status: result.status ?? "pending", systemId, createdAt: (/* @__PURE__ */ new Date()).toISOString() };
@@ -35030,7 +35043,7 @@ function loadConfig() {
35030
35043
  };
35031
35044
  }
35032
35045
  async function main() {
35033
- console.error(`[harmonica-mcp] v${"4.2.0"} starting\u2026`);
35046
+ console.error(`[harmonica-mcp] v${"4.3.0"} starting\u2026`);
35034
35047
  const config2 = loadConfig();
35035
35048
  const client = createHttpClient({
35036
35049
  apiBaseUrl: config2.apiBaseUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codazen/harmonica-mcp",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "description": "MCP server for Harmonica — connect any MCP-compatible AI assistant to Harmonica",
5
5
  "license": "MIT",
6
6
  "bin": {