@gethmy/mcp 2.13.1 → 2.13.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.
- package/dist/cli.js +6 -1
- package/dist/index.js +6 -1
- package/dist/lib/api-client.js +6 -1
- package/package.json +1 -1
- package/src/api-client.ts +19 -1
package/dist/cli.js
CHANGED
|
@@ -1928,6 +1928,10 @@ class HarmonyApiClient {
|
|
|
1928
1928
|
qs.set("limit", String(opts.limit));
|
|
1929
1929
|
if (opts?.offset != null)
|
|
1930
1930
|
qs.set("offset", String(opts.offset));
|
|
1931
|
+
if (opts?.order != null)
|
|
1932
|
+
qs.set("order", opts.order);
|
|
1933
|
+
if (opts?.commentType != null)
|
|
1934
|
+
qs.set("comment_type", opts.commentType);
|
|
1931
1935
|
const suffix = qs.toString() ? `?${qs.toString()}` : "";
|
|
1932
1936
|
return this.request("GET", `/cards/${cardId}/comments${suffix}`);
|
|
1933
1937
|
}
|
|
@@ -2293,7 +2297,8 @@ class HarmonyApiClient {
|
|
|
2293
2297
|
});
|
|
2294
2298
|
try {
|
|
2295
2299
|
const { comments } = await this.getComments(options.cardId, {
|
|
2296
|
-
limit: 200
|
|
2300
|
+
limit: 200,
|
|
2301
|
+
order: "desc"
|
|
2297
2302
|
});
|
|
2298
2303
|
if (Array.isArray(comments) && comments.length > 0) {
|
|
2299
2304
|
const section = serializeCommentThread(comments, {
|
package/dist/index.js
CHANGED
|
@@ -1923,6 +1923,10 @@ class HarmonyApiClient {
|
|
|
1923
1923
|
qs.set("limit", String(opts.limit));
|
|
1924
1924
|
if (opts?.offset != null)
|
|
1925
1925
|
qs.set("offset", String(opts.offset));
|
|
1926
|
+
if (opts?.order != null)
|
|
1927
|
+
qs.set("order", opts.order);
|
|
1928
|
+
if (opts?.commentType != null)
|
|
1929
|
+
qs.set("comment_type", opts.commentType);
|
|
1926
1930
|
const suffix = qs.toString() ? `?${qs.toString()}` : "";
|
|
1927
1931
|
return this.request("GET", `/cards/${cardId}/comments${suffix}`);
|
|
1928
1932
|
}
|
|
@@ -2288,7 +2292,8 @@ class HarmonyApiClient {
|
|
|
2288
2292
|
});
|
|
2289
2293
|
try {
|
|
2290
2294
|
const { comments } = await this.getComments(options.cardId, {
|
|
2291
|
-
limit: 200
|
|
2295
|
+
limit: 200,
|
|
2296
|
+
order: "desc"
|
|
2292
2297
|
});
|
|
2293
2298
|
if (Array.isArray(comments) && comments.length > 0) {
|
|
2294
2299
|
const section = serializeCommentThread(comments, {
|
package/dist/lib/api-client.js
CHANGED
|
@@ -1375,6 +1375,10 @@ class HarmonyApiClient {
|
|
|
1375
1375
|
qs.set("limit", String(opts.limit));
|
|
1376
1376
|
if (opts?.offset != null)
|
|
1377
1377
|
qs.set("offset", String(opts.offset));
|
|
1378
|
+
if (opts?.order != null)
|
|
1379
|
+
qs.set("order", opts.order);
|
|
1380
|
+
if (opts?.commentType != null)
|
|
1381
|
+
qs.set("comment_type", opts.commentType);
|
|
1378
1382
|
const suffix = qs.toString() ? `?${qs.toString()}` : "";
|
|
1379
1383
|
return this.request("GET", `/cards/${cardId}/comments${suffix}`);
|
|
1380
1384
|
}
|
|
@@ -1740,7 +1744,8 @@ class HarmonyApiClient {
|
|
|
1740
1744
|
});
|
|
1741
1745
|
try {
|
|
1742
1746
|
const { comments } = await this.getComments(options.cardId, {
|
|
1743
|
-
limit: 200
|
|
1747
|
+
limit: 200,
|
|
1748
|
+
order: "desc"
|
|
1744
1749
|
});
|
|
1745
1750
|
if (Array.isArray(comments) && comments.length > 0) {
|
|
1746
1751
|
const section = serializeCommentThread(comments, {
|
package/package.json
CHANGED
package/src/api-client.ts
CHANGED
|
@@ -857,11 +857,25 @@ export class HarmonyApiClient {
|
|
|
857
857
|
|
|
858
858
|
async getComments(
|
|
859
859
|
cardId: string,
|
|
860
|
-
opts?: {
|
|
860
|
+
opts?: {
|
|
861
|
+
limit?: number;
|
|
862
|
+
offset?: number;
|
|
863
|
+
/**
|
|
864
|
+
* Created-at sort direction. Default server-side is "asc" (oldest first).
|
|
865
|
+
* Pass "desc" so a bounded `limit` window pages the NEWEST comments — what
|
|
866
|
+
* the daemon's handoff and card-context reads need on a chatty card so the
|
|
867
|
+
* most-recent comments aren't paged out (card #531).
|
|
868
|
+
*/
|
|
869
|
+
order?: "asc" | "desc";
|
|
870
|
+
/** Filter to a single `comment_type` (e.g. "decision" for handoffs). */
|
|
871
|
+
commentType?: string;
|
|
872
|
+
},
|
|
861
873
|
): Promise<{ comments: unknown[] }> {
|
|
862
874
|
const qs = new URLSearchParams();
|
|
863
875
|
if (opts?.limit != null) qs.set("limit", String(opts.limit));
|
|
864
876
|
if (opts?.offset != null) qs.set("offset", String(opts.offset));
|
|
877
|
+
if (opts?.order != null) qs.set("order", opts.order);
|
|
878
|
+
if (opts?.commentType != null) qs.set("comment_type", opts.commentType);
|
|
865
879
|
const suffix = qs.toString() ? `?${qs.toString()}` : "";
|
|
866
880
|
return this.request("GET", `/cards/${cardId}/comments${suffix}`);
|
|
867
881
|
}
|
|
@@ -1734,8 +1748,12 @@ export class HarmonyApiClient {
|
|
|
1734
1748
|
// Code, in-app builder) gets the recency-ordered thread + conflict rule.
|
|
1735
1749
|
// Best-effort — never fail prompt generation on a comments fetch error.
|
|
1736
1750
|
try {
|
|
1751
|
+
// Newest-first window so a chatty card (>200 comments) keeps the recent
|
|
1752
|
+
// thread instead of paging out to the oldest comments (#531). The
|
|
1753
|
+
// serializer re-sorts oldest→newest, so the rendered order is unchanged.
|
|
1737
1754
|
const { comments } = await this.getComments(options.cardId, {
|
|
1738
1755
|
limit: 200,
|
|
1756
|
+
order: "desc",
|
|
1739
1757
|
});
|
|
1740
1758
|
if (Array.isArray(comments) && comments.length > 0) {
|
|
1741
1759
|
const section = serializeCommentThread(comments as Comment[], {
|