@codazen/harmonica-mcp 3.9.1 → 3.9.3

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 +29 -17
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -24926,7 +24926,7 @@ function formatSimilarityResults(results, sourceId, label) {
24926
24926
  return `No ${label} found for ${sourceId}.`;
24927
24927
  }
24928
24928
  const rows = results.map((r) => {
24929
- const badge = r.projectName ? ` [${r.projectName}]` : "";
24929
+ const badge = r.systemName ? ` [${r.systemName}]` : "";
24930
24930
  return `- **${r.entityId}**${badge} (score: ${r.score.toFixed(3)})
24931
24931
  ${r.snippet}`;
24932
24932
  });
@@ -26331,6 +26331,16 @@ var normalizeSystemId = (raw) => {
26331
26331
  if (!id) return raw;
26332
26332
  return { ...b, systemId: id };
26333
26333
  };
26334
+ var normalizeSystemIdAndTitle = (raw) => {
26335
+ if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return raw;
26336
+ const b = raw;
26337
+ const id = b["systemId"] || b["projectId"];
26338
+ const title = b["systemTitle"] || b["projectTitle"];
26339
+ const result = { ...b };
26340
+ if (id) result["systemId"] = id;
26341
+ if (title) result["systemTitle"] = title;
26342
+ return result;
26343
+ };
26334
26344
  var BeatApiSchema = external_exports.preprocess(
26335
26345
  (raw) => {
26336
26346
  if (typeof raw !== "object" || raw === null) return raw;
@@ -27248,7 +27258,7 @@ var RevisionClaimsResponseSchema = external_exports.object({
27248
27258
  claims: external_exports.array(RevisionClaimSchema)
27249
27259
  }).passthrough();
27250
27260
  var ProposedRevisionSchema = external_exports.preprocess(
27251
- normalizeSystemId,
27261
+ normalizeSystemIdAndTitle,
27252
27262
  external_exports.object({
27253
27263
  revisionId: external_exports.string(),
27254
27264
  title: external_exports.string(),
@@ -27256,7 +27266,7 @@ var ProposedRevisionSchema = external_exports.preprocess(
27256
27266
  beatId: external_exports.string(),
27257
27267
  beatTitle: external_exports.string().optional(),
27258
27268
  systemId: external_exports.string(),
27259
- projectTitle: external_exports.string().optional()
27269
+ systemTitle: external_exports.string().optional()
27260
27270
  }).passthrough()
27261
27271
  );
27262
27272
  var ReleaseIntervalSchema = external_exports.object({
@@ -27265,7 +27275,7 @@ var ReleaseIntervalSchema = external_exports.object({
27265
27275
  isFallback: external_exports.boolean()
27266
27276
  }).passthrough();
27267
27277
  var EligibleBeatVersionForDropSchema = external_exports.preprocess(
27268
- normalizeSystemId,
27278
+ normalizeSystemIdAndTitle,
27269
27279
  external_exports.object({
27270
27280
  beatVersionId: external_exports.string(),
27271
27281
  title: external_exports.string(),
@@ -27273,7 +27283,7 @@ var EligibleBeatVersionForDropSchema = external_exports.preprocess(
27273
27283
  beatId: external_exports.string(),
27274
27284
  beatTitle: external_exports.string().optional(),
27275
27285
  systemId: external_exports.string(),
27276
- projectTitle: external_exports.string().optional(),
27286
+ systemTitle: external_exports.string().optional(),
27277
27287
  createdAt: external_exports.string(),
27278
27288
  updatedAt: external_exports.string(),
27279
27289
  humanAssignee: external_exports.object({ email: external_exports.string(), name: external_exports.string() }).optional(),
@@ -27627,7 +27637,7 @@ function registerNoteTools(server, ctx, client) {
27627
27637
  );
27628
27638
  server.tool(
27629
27639
  "list_org_notes",
27630
- "List Notes at the organization level (cross-cutting constraints, org-wide decisions, and context that applies to all projects). Filterable by type and status. Use offset/limit to paginate.",
27640
+ "List Notes at the organization level (cross-cutting constraints, org-wide decisions, and context that applies to all systems). Filterable by type and status. Use offset/limit to paginate.",
27631
27641
  {
27632
27642
  noteType: external_exports.enum(NOTE_TYPE_VALUES).optional().describe("Filter by note type"),
27633
27643
  status: external_exports.enum(NOTE_STATUS_VALUES).optional().describe("Filter by status"),
@@ -27653,7 +27663,7 @@ function registerNoteTools(server, ctx, client) {
27653
27663
  );
27654
27664
  server.tool(
27655
27665
  "list_movement_notes",
27656
- "List Notes scoped directly to a Movement (commercial SOW container) \u2014 engagement-level knowledge such as SOW constraints, scope boundaries, and commercial decisions. Not aggregated from projects. Filterable by type and status.",
27666
+ "List Notes scoped directly to a Movement (commercial SOW container) \u2014 engagement-level knowledge such as SOW constraints, scope boundaries, and commercial decisions. Not aggregated from systems. Filterable by type and status.",
27657
27667
  {
27658
27668
  movementId: external_exports.string().min(1).describe("The Movement ID"),
27659
27669
  noteType: external_exports.enum(NOTE_TYPE_VALUES).optional().describe("Filter by note type"),
@@ -28753,12 +28763,12 @@ function registerOnboardingTools(server, ctx, client) {
28753
28763
  {
28754
28764
  systemId: external_exports.string().describe("The newly created system ID"),
28755
28765
  systemTitle: external_exports.string().describe("The system title"),
28756
- projectDescription: external_exports.string().optional().describe("Discovery context: pain points, goals, and constraints summary to inform the Beat structure"),
28766
+ systemDescription: external_exports.string().optional().describe("Discovery context: pain points, goals, and constraints summary to inform the Beat structure"),
28757
28767
  analysisJson: external_exports.string().optional().describe("JSON-serialized DiscoveryAnalysis from initiate_teamspace_onboarding. Pass this to produce Beats grounded in the actual discovery data.")
28758
28768
  },
28759
- async ({ systemId, systemTitle, projectDescription, analysisJson }) => {
28769
+ async ({ systemId, systemTitle, systemDescription, analysisJson }) => {
28760
28770
  await assertSystemInOrg(client, systemId, ctx.orgId);
28761
- const result = await client.draftOnboardingBeats(systemId, { systemTitle, projectDescription, analysisJson });
28771
+ const result = await client.draftOnboardingBeats(systemId, { systemTitle, systemDescription, analysisJson });
28762
28772
  if (!result.suggestions || result.suggestions.length === 0) {
28763
28773
  return {
28764
28774
  content: [{ type: "text", text: "Failed to generate Beat suggestions. Try providing more system context." }]
@@ -28835,7 +28845,7 @@ Error: ${msg}`);
28835
28845
  } catch (err) {
28836
28846
  const msg = err instanceof Error ? err.message : String(err);
28837
28847
  lines.push(`
28838
- Projects created: ${createdProjects.length}`);
28848
+ Systems created: ${createdProjects.length}`);
28839
28849
  lines.unshift(`\u26A0\uFE0F Onboarding batch partially created \u2014 stopped at: system "${p.title}"
28840
28850
  Error: ${msg}`);
28841
28851
  return { content: [{ type: "text", text: lines.join("\n") }] };
@@ -28843,7 +28853,7 @@ Error: ${msg}`);
28843
28853
  }
28844
28854
  if (createdProjects.length > 0) {
28845
28855
  lines.push(`
28846
- Projects (${createdProjects.length}):`);
28856
+ Systems (${createdProjects.length}):`);
28847
28857
  for (const p of createdProjects) lines.push(` [${p.systemId}] ${p.title}`);
28848
28858
  }
28849
28859
  const createdNotes = [];
@@ -30930,7 +30940,9 @@ function registerSystemTools(server, ctx, client) {
30930
30940
  return { content: [{ type: "text", text: `System not found: "${systemId}"` }], isError: true };
30931
30941
  }
30932
30942
  if (PROJECT_EMBEDDING_FIELDS.some((f) => f in nonEmpty)) {
30933
- void client.triggerProjectEmbedding(systemId);
30943
+ client.triggerSystemEmbedding(systemId).catch((err) => {
30944
+ console.error("[system-tools] triggerSystemEmbedding failed:", err instanceof Error ? err.message : String(err));
30945
+ });
30934
30946
  }
30935
30947
  const lines = [
30936
30948
  `System updated successfully.`,
@@ -31092,10 +31104,10 @@ function registerTeamspaceTools(server, ctx, client) {
31092
31104
  `Created: ${ts.createdAt}`
31093
31105
  ];
31094
31106
  if (tsProjects.length > 0) {
31095
- lines.push("", `Projects (${tsProjects.length}):`);
31107
+ lines.push("", `Systems (${tsProjects.length}):`);
31096
31108
  for (const p of tsProjects) lines.push(` [${p.systemId}] ${p.title} \u2014 ${p.status ?? "unknown"}`);
31097
31109
  } else {
31098
- lines.push("Projects: (none)");
31110
+ lines.push("Systems: (none)");
31099
31111
  }
31100
31112
  if (ts.ensemble && ts.ensemble.length > 0) {
31101
31113
  lines.push("", "Ensemble:");
@@ -34649,7 +34661,7 @@ function createHttpClient(config2) {
34649
34661
  if (!result) throw new Error(`Beat draft failed: project ${projectId} not found`);
34650
34662
  return result;
34651
34663
  },
34652
- triggerProjectEmbedding: async (projectId) => {
34664
+ triggerSystemEmbedding: async (projectId) => {
34653
34665
  await request("POST", `/api/systems/${encodeURIComponent(projectId)}/embedding`);
34654
34666
  },
34655
34667
  // Notebooks (B-271)
@@ -34912,7 +34924,7 @@ function loadConfig() {
34912
34924
  };
34913
34925
  }
34914
34926
  async function main() {
34915
- console.error(`[harmonica-mcp] v${"3.9.1"} starting\u2026`);
34927
+ console.error(`[harmonica-mcp] v${"3.9.3"} starting\u2026`);
34916
34928
  const config2 = loadConfig();
34917
34929
  const client = createHttpClient({
34918
34930
  apiBaseUrl: config2.apiBaseUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codazen/harmonica-mcp",
3
- "version": "3.9.1",
3
+ "version": "3.9.3",
4
4
  "description": "MCP server for Harmonica — connect any MCP-compatible AI assistant to Harmonica",
5
5
  "license": "MIT",
6
6
  "bin": {