@codazen/harmonica-mcp 3.9.2 → 3.9.4
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 +48 -9
- 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.
|
|
24929
|
+
const badge = r.systemName ? ` [${r.systemName}]` : "";
|
|
24930
24930
|
return `- **${r.entityId}**${badge} (score: ${r.score.toFixed(3)})
|
|
24931
24931
|
${r.snippet}`;
|
|
24932
24932
|
});
|
|
@@ -26744,6 +26744,43 @@ var NotificationsResponseSchema = external_exports.object({
|
|
|
26744
26744
|
nextCursor: external_exports.string().optional()
|
|
26745
26745
|
}).passthrough();
|
|
26746
26746
|
var UnreadCountResponseSchema = external_exports.object({ count: external_exports.number() }).passthrough();
|
|
26747
|
+
var InboxItemStatusSchema = external_exports.enum([
|
|
26748
|
+
"new",
|
|
26749
|
+
"acknowledged",
|
|
26750
|
+
"needs_agent",
|
|
26751
|
+
"delegated",
|
|
26752
|
+
"answered",
|
|
26753
|
+
"resolved",
|
|
26754
|
+
"expired"
|
|
26755
|
+
]);
|
|
26756
|
+
var InboxItemPrioritySchema = external_exports.enum(["low", "normal", "high", "urgent"]);
|
|
26757
|
+
var InboxSourceChannelSchema = external_exports.enum(["harmonica", "slack", "teams", "email", "api"]);
|
|
26758
|
+
var InboxRequestedBySchema = external_exports.object({
|
|
26759
|
+
actorType: external_exports.enum(["agent", "user", "system"]),
|
|
26760
|
+
actorId: external_exports.string(),
|
|
26761
|
+
actorName: external_exports.string().optional()
|
|
26762
|
+
}).passthrough();
|
|
26763
|
+
var InboxItemSchema = external_exports.object({
|
|
26764
|
+
inboxItemId: external_exports.string(),
|
|
26765
|
+
systemId: external_exports.string(),
|
|
26766
|
+
assigneeId: external_exports.string(),
|
|
26767
|
+
threadId: external_exports.string(),
|
|
26768
|
+
body: external_exports.string(),
|
|
26769
|
+
status: InboxItemStatusSchema,
|
|
26770
|
+
priority: InboxItemPrioritySchema,
|
|
26771
|
+
sourceChannel: InboxSourceChannelSchema,
|
|
26772
|
+
dueAt: external_exports.string().optional(),
|
|
26773
|
+
delegatedSessionId: external_exports.string().optional(),
|
|
26774
|
+
requestedBy: InboxRequestedBySchema,
|
|
26775
|
+
answer: external_exports.string().optional(),
|
|
26776
|
+
createdAt: external_exports.string(),
|
|
26777
|
+
updatedAt: external_exports.string()
|
|
26778
|
+
}).passthrough();
|
|
26779
|
+
var InboxItemsResponseSchema = external_exports.object({
|
|
26780
|
+
items: external_exports.array(InboxItemSchema),
|
|
26781
|
+
hasMore: external_exports.boolean(),
|
|
26782
|
+
nextCursor: external_exports.string().optional()
|
|
26783
|
+
}).passthrough();
|
|
26747
26784
|
var TriageActionSchema = external_exports.preprocess(
|
|
26748
26785
|
normalizeSystemId,
|
|
26749
26786
|
external_exports.object({
|
|
@@ -28694,7 +28731,7 @@ var OnboardingNoteInputSchema = external_exports.object({
|
|
|
28694
28731
|
rationale: external_exports.string().optional(),
|
|
28695
28732
|
confidence: external_exports.number().min(0).max(1).optional()
|
|
28696
28733
|
});
|
|
28697
|
-
var
|
|
28734
|
+
var OnboardingSystemInputSchema = external_exports.object({
|
|
28698
28735
|
title: external_exports.string().min(1).max(300),
|
|
28699
28736
|
description: external_exports.string().max(2e3).optional(),
|
|
28700
28737
|
notes: external_exports.array(OnboardingNoteInputSchema).optional()
|
|
@@ -28763,12 +28800,12 @@ function registerOnboardingTools(server, ctx, client) {
|
|
|
28763
28800
|
{
|
|
28764
28801
|
systemId: external_exports.string().describe("The newly created system ID"),
|
|
28765
28802
|
systemTitle: external_exports.string().describe("The system title"),
|
|
28766
|
-
|
|
28803
|
+
systemDescription: external_exports.string().optional().describe("Discovery context: pain points, goals, and constraints summary to inform the Beat structure"),
|
|
28767
28804
|
analysisJson: external_exports.string().optional().describe("JSON-serialized DiscoveryAnalysis from initiate_teamspace_onboarding. Pass this to produce Beats grounded in the actual discovery data.")
|
|
28768
28805
|
},
|
|
28769
|
-
async ({ systemId, systemTitle,
|
|
28806
|
+
async ({ systemId, systemTitle, systemDescription, analysisJson }) => {
|
|
28770
28807
|
await assertSystemInOrg(client, systemId, ctx.orgId);
|
|
28771
|
-
const result = await client.draftOnboardingBeats(systemId, { systemTitle,
|
|
28808
|
+
const result = await client.draftOnboardingBeats(systemId, { systemTitle, systemDescription, analysisJson });
|
|
28772
28809
|
if (!result.suggestions || result.suggestions.length === 0) {
|
|
28773
28810
|
return {
|
|
28774
28811
|
content: [{ type: "text", text: "Failed to generate Beat suggestions. Try providing more system context." }]
|
|
@@ -28804,7 +28841,7 @@ function registerOnboardingTools(server, ctx, client) {
|
|
|
28804
28841
|
].join(" "),
|
|
28805
28842
|
{
|
|
28806
28843
|
teamspaceName: external_exports.string().min(1).max(200).describe("Teamspace display name"),
|
|
28807
|
-
projects: external_exports.array(
|
|
28844
|
+
projects: external_exports.array(OnboardingSystemInputSchema).min(1).describe("Phase 1 systems to create, each linked to the Teamspace"),
|
|
28808
28845
|
teamspaceNotes: external_exports.array(OnboardingNoteInputSchema).describe("Constraints, assumptions, and context notes at the Teamspace/system level")
|
|
28809
28846
|
},
|
|
28810
28847
|
async ({
|
|
@@ -30940,7 +30977,9 @@ function registerSystemTools(server, ctx, client) {
|
|
|
30940
30977
|
return { content: [{ type: "text", text: `System not found: "${systemId}"` }], isError: true };
|
|
30941
30978
|
}
|
|
30942
30979
|
if (PROJECT_EMBEDDING_FIELDS.some((f) => f in nonEmpty)) {
|
|
30943
|
-
|
|
30980
|
+
client.triggerSystemEmbedding(systemId).catch((err) => {
|
|
30981
|
+
console.error("[system-tools] triggerSystemEmbedding failed:", err instanceof Error ? err.message : String(err));
|
|
30982
|
+
});
|
|
30944
30983
|
}
|
|
30945
30984
|
const lines = [
|
|
30946
30985
|
`System updated successfully.`,
|
|
@@ -34659,7 +34698,7 @@ function createHttpClient(config2) {
|
|
|
34659
34698
|
if (!result) throw new Error(`Beat draft failed: project ${projectId} not found`);
|
|
34660
34699
|
return result;
|
|
34661
34700
|
},
|
|
34662
|
-
|
|
34701
|
+
triggerSystemEmbedding: async (projectId) => {
|
|
34663
34702
|
await request("POST", `/api/systems/${encodeURIComponent(projectId)}/embedding`);
|
|
34664
34703
|
},
|
|
34665
34704
|
// Notebooks (B-271)
|
|
@@ -34922,7 +34961,7 @@ function loadConfig() {
|
|
|
34922
34961
|
};
|
|
34923
34962
|
}
|
|
34924
34963
|
async function main() {
|
|
34925
|
-
console.error(`[harmonica-mcp] v${"3.9.
|
|
34964
|
+
console.error(`[harmonica-mcp] v${"3.9.4"} starting\u2026`);
|
|
34926
34965
|
const config2 = loadConfig();
|
|
34927
34966
|
const client = createHttpClient({
|
|
34928
34967
|
apiBaseUrl: config2.apiBaseUrl,
|