rootr-cli 0.35.0 → 0.35.1

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.
@@ -10,6 +10,9 @@ import {
10
10
  PUBLIC_ISSUE_FILES_PER_POST,
11
11
  } from '../client.js';
12
12
 
13
+ /** MCP 이슈 목록 기본 페이지 크기 — limit 을 안 주면 이만큼만(서버 상한 200). */
14
+ export const MCP_ISSUE_PAGE = 100;
15
+
13
16
  /**
14
17
  * ISSUE-PUBLIC — 외부 참여(웹게시한 트래커·페이지에 끼운 트래커에 밖의 사람이 무엇을 할 수 있나). 서버 값과 같아야 한다
15
18
  * (issues/issue-schema.ts PUBLIC_PARTICIPATION_MODES).
@@ -83,6 +86,8 @@ export function registerIssueTools(server) {
83
86
  },
84
87
  );
85
88
 
89
+ // ISSUE-PAGING — 에이전트가 limit 을 안 주면 100개씩(창업자 11/3 "낮춰"). 예전처럼 500개를 본문째 받으면 문맥을 크게 먹는다.
90
+ // REST·CLI 의 "안 주면 500" 은 그대로 두고, MCP 도구만 기본 페이지를 정한다.
86
91
  server.registerTool(
87
92
  'rootr_list_issues',
88
93
  {
@@ -90,7 +95,7 @@ export function registerIssueTools(server) {
90
95
  description:
91
96
  'List issues in a Rootr (루터) issue tracker, newest number first, optionally filtered by state (OPEN/CLOSED/ALL), ' +
92
97
  'label id, type id, or a text query. Paged: pass `limit` (1–200) and, for the next page, `cursor` = the previous ' +
93
- 'result\'s `nextCursor` (keep the same filters). Without limit/cursor you get the newest 500. Returns ' +
98
+ 'result\'s `nextCursor` (keep the same filters). Default page size is 100 (newest first). Returns ' +
94
99
  '{ issues, nextCursor, total } — `nextCursor` null means the last page; `total` = all issues matching the filters. ' +
95
100
  'Use rootr_get_issue for full details of one issue.',
96
101
  annotations: { readOnlyHint: true, destructiveHint: false },
@@ -100,7 +105,7 @@ export function registerIssueTools(server) {
100
105
  q: z.string().optional().describe('Free-text search within issues'),
101
106
  label: z.string().optional().describe('Label id to filter by'),
102
107
  type: z.string().optional().describe('Issue type id to filter by'),
103
- limit: z.number().int().min(1).max(200).optional().describe('Page size 1–200 (omit with cursor too = newest 500, as before)'),
108
+ limit: z.number().int().min(1).max(200).optional().describe(`Page size 1–200 (default ${MCP_ISSUE_PAGE})`),
104
109
  cursor: z.string().max(400).optional().describe('`nextCursor` from the previous call, unchanged (same filters) — next page'),
105
110
  },
106
111
  },
@@ -108,7 +113,7 @@ export function registerIssueTools(server) {
108
113
  try {
109
114
  const client = makeClient();
110
115
  trackerId = await resolveNodeId(client, trackerId);
111
- const result = await client.listIssues(trackerId, { state, q, label, type, limit, cursor });
116
+ const result = await client.listIssues(trackerId, { state, q, label, type, limit: limit ?? MCP_ISSUE_PAGE, cursor });
112
117
  return jsonResult(withPageHint(result));
113
118
  } catch (err) {
114
119
  return errorResult(err);
@@ -337,7 +342,7 @@ export function registerIssueTools(server) {
337
342
  '(participation login/anyone), the author name; `labels` = label names (issues having all of them); `state` OPEN|CLOSED; ' +
338
343
  '`sort` newest (default) | oldest | comments. Returns { participation, issues:[{number,title,state,body,labels,createdAt,' +
339
344
  'closedAt,commentCount,author}], truncated?, nextCursor?, total? }. Paged: `limit` (1–200) and `cursor` = the previous ' +
340
- 'result\'s `nextCursor` (same q/state/labels/sort); without them you get up to 500 (truncated tells you there were more). ' +
345
+ 'result\'s `nextCursor` (same q/state/labels/sort). Default page size is 100. ' +
341
346
  'No key needed. For a tracker in YOUR workspace prefer rootr_list_issues (internal fields).',
342
347
  annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: true },
343
348
  inputSchema: {
@@ -348,7 +353,7 @@ export function registerIssueTools(server) {
348
353
  state: z.enum(['OPEN', 'CLOSED', 'ALL']).optional().describe('Default ALL'),
349
354
  labels: z.array(z.string().max(100)).max(20).optional().describe('Label names — issues having all of them'),
350
355
  sort: z.enum(['newest', 'oldest', 'comments']).optional(),
351
- limit: z.number().int().min(1).max(200).optional().describe('Page size 1–200'),
356
+ limit: z.number().int().min(1).max(200).optional().describe(`Page size 1–200 (default ${MCP_ISSUE_PAGE})`),
352
357
  cursor: z.string().max(400).optional().describe('`nextCursor` from the previous call, unchanged (same q/state/labels/sort)'),
353
358
  },
354
359
  },
@@ -357,7 +362,7 @@ export function registerIssueTools(server) {
357
362
  const client = makeClient();
358
363
  const slug = slugOf(url);
359
364
  const pass = password ? await client.unlockPublicNode(slug, password) : undefined;
360
- return jsonResult(withPageHint(await client.searchPublicIssues(slug, { blockId, q, state, labels, sort, pass, limit, cursor })));
365
+ return jsonResult(withPageHint(await client.searchPublicIssues(slug, { blockId, q, state, labels, sort, pass, limit: limit ?? MCP_ISSUE_PAGE, cursor })));
361
366
  } catch (err) {
362
367
  return errorResult(err);
363
368
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rootr-cli",
3
- "version": "0.35.0",
3
+ "version": "0.35.1",
4
4
  "description": "Official Rootr CLI + MCP server — read, write, edit and search Rootr documents from the shell or from an AI agent.",
5
5
  "type": "module",
6
6
  "bin": {