@codazen/harmonica-mcp 0.26.0 → 0.27.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 +28 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23072,13 +23072,28 @@ var DROP_STATES = ["draft", "scheduled", "in_progress", "released", "rolled_back
23072
23072
  function registerDropTools(server, ctx, client) {
23073
23073
  server.tool(
23074
23074
  "list_drops",
23075
- "List Drops in a Teamspace, optionally filtered by lifecycle state. A Drop is a release container \u2014 different from a Beat (capability) or Revision (work item). Use this to see what releases are planned, in flight, or shipped.",
23075
+ "List Drops in a Teamspace, optionally filtered by lifecycle state and sorted. A Drop is a release container \u2014 different from a Beat (capability) or Revision (work item). Use this to see what releases are planned, in flight, or shipped.",
23076
23076
  {
23077
23077
  teamspaceId: external_exports.string().describe("The teamspace ID"),
23078
- state: external_exports.enum(DROP_STATES).optional().describe("Filter by Drop state: draft, scheduled, in_progress, released, or rolled_back")
23078
+ state: external_exports.enum(DROP_STATES).optional().describe("Filter by a single Drop state (use status for multi-state OR filtering)"),
23079
+ status: external_exports.string().optional().describe('Comma-separated Drop states for OR filtering (e.g. "draft,scheduled"). Takes precedence over state when provided.'),
23080
+ sortBy: external_exports.enum(["id", "targetDate"]).optional().describe("Sort field: id (D-NNN code) or targetDate. Default order is DynamoDB natural (createdAt ascending)."),
23081
+ sortOrder: external_exports.enum(["asc", "desc"]).optional().describe("Sort direction: asc or desc. Drops without a targetDate always sort last when sortBy=targetDate.")
23079
23082
  },
23080
- async ({ teamspaceId, state }) => {
23081
- const drops = await client.listTeamspaceDrops(teamspaceId, state ? { state } : void 0);
23083
+ async ({ teamspaceId, state, status, sortBy, sortOrder }) => {
23084
+ const rawStatusValues = status ? status.split(",").map((s) => s.trim()).filter(Boolean) : void 0;
23085
+ if (rawStatusValues) {
23086
+ const invalid = rawStatusValues.filter((s) => !DROP_STATES.includes(s));
23087
+ if (invalid.length > 0) {
23088
+ return { content: [{ type: "text", text: `Invalid status values: ${invalid.join(", ")}. Must be one of ${DROP_STATES.join(", ")}` }], isError: true };
23089
+ }
23090
+ }
23091
+ const statusValues = rawStatusValues;
23092
+ const hasOptions = state !== void 0 || statusValues !== void 0 || sortBy !== void 0 || sortOrder !== void 0;
23093
+ const drops = await client.listTeamspaceDrops(
23094
+ teamspaceId,
23095
+ hasOptions ? { state, status: statusValues, sortBy, sortOrder } : void 0
23096
+ );
23082
23097
  const text = drops.length === 0 ? "No drops found." : drops.map((d) => {
23083
23098
  const target = d.targetDate ? ` (target ${d.targetDate.slice(0, 10)})` : "";
23084
23099
  return `${d.dropId} [${d.dropCode}] ${d.name} \u2014 ${d.state} \xB7 ${d.revisionCount} rev${d.revisionCount === 1 ? "" : "s"}${target}`;
@@ -23119,6 +23134,7 @@ function registerDropTools(server, ctx, client) {
23119
23134
  d.targetDate ? `Target: ${d.targetDate}` : null,
23120
23135
  d.releasedAt ? `Released: ${d.releasedAt}` : null,
23121
23136
  d.rolledBackAt ? `Rolled back: ${d.rolledBackAt}` : null,
23137
+ `Beat Versions (${(d.beatVersionIds ?? []).length}): ${(d.beatVersionIds ?? []).length === 0 ? "(none)" : (d.beatVersionIds ?? []).join(", ")}`,
23122
23138
  `Revisions (${d.revisionIds.length}): ${d.revisionIds.length === 0 ? "(none)" : d.revisionIds.join(", ")}`,
23123
23139
  `Version: ${d.version}`,
23124
23140
  `Created: ${d.createdAt}`
@@ -26881,8 +26897,13 @@ function createHttpClient(config2) {
26881
26897
  },
26882
26898
  // Drops
26883
26899
  listTeamspaceDrops: async (teamspaceId, options) => {
26884
- const params = options?.state ? `?state=${encodeURIComponent(options.state)}` : "";
26885
- const result = await request("GET", `/api/teamspaces/${encodeURIComponent(teamspaceId)}/drops${params}`);
26900
+ const qs = new URLSearchParams();
26901
+ if (options?.state) qs.set("state", options.state);
26902
+ if (options?.status?.length) qs.set("status", options.status.join(","));
26903
+ if (options?.sortBy) qs.set("sortBy", options.sortBy);
26904
+ if (options?.sortOrder) qs.set("sortOrder", options.sortOrder);
26905
+ const qsStr = qs.toString();
26906
+ const result = await request("GET", `/api/teamspaces/${encodeURIComponent(teamspaceId)}/drops${qsStr ? `?${qsStr}` : ""}`);
26886
26907
  return result?.drops ?? [];
26887
26908
  },
26888
26909
  getDrop: async (dropId) => {
@@ -27068,7 +27089,7 @@ function loadConfig() {
27068
27089
  };
27069
27090
  }
27070
27091
  async function main() {
27071
- console.error(`[harmonica-mcp] v${"0.26.0"} starting\u2026`);
27092
+ console.error(`[harmonica-mcp] v${"0.27.0"} starting\u2026`);
27072
27093
  const config2 = loadConfig();
27073
27094
  const client = createHttpClient({
27074
27095
  apiBaseUrl: config2.apiBaseUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codazen/harmonica-mcp",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "MCP server for Harmonica — connect Claude to your Harmonica projects",
5
5
  "license": "MIT",
6
6
  "bin": {