rootr-cli 0.34.0 → 0.34.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.
- package/bin/rootr.js +3 -3
- package/lib/client.js +3 -2
- package/lib/mcp-tools/issues.js +4 -4
- package/package.json +1 -1
package/bin/rootr.js
CHANGED
|
@@ -93,7 +93,7 @@ const USAGE_KO = `Rootr CLI v${pkg.version}
|
|
|
93
93
|
rootr issue comment <트래커> <#번호> "<댓글>" 이슈에 댓글
|
|
94
94
|
rootr issue submit <공개 주소> --title "<제목>" [--body …] [--file <경로>]… [--name <이름>] [--block <블록 id>] [--password <비번>]
|
|
95
95
|
웹게시한 트래커에 밖에서 이슈 올리기(--name 이면 키 없이 손님으로, 페이지 블록은 --block)
|
|
96
|
-
--file: 그림·pdf·txt·csv·log·docx·xlsx·pptx·zip, 한 파일
|
|
96
|
+
--file: 그림·pdf·txt·csv·log·docx·xlsx·pptx·zip, 한 파일 75MB(손님 25MB)·글 하나에 10개
|
|
97
97
|
rootr issue reply <공개 주소> <#번호> "<댓글>" [--file <경로>]… [--name <이름>] [--block <블록 id>] [--password <비번>] 웹게시한 트래커 이슈에 댓글
|
|
98
98
|
rootr booking show <표> 방문자 일정 등록(예약) 설정 보기
|
|
99
99
|
rootr booking set <표> --on --days 1,2,3,4,5 --hours 10:00-18:00 --duration 30 예약 켜기·규칙
|
|
@@ -249,7 +249,7 @@ usage:
|
|
|
249
249
|
rootr issue comment <tracker> <#number> "<comment>" comment on an issue
|
|
250
250
|
rootr issue submit <public URL> --title "<title>" [--body …] [--file <path>]… [--name <name>] [--block <block id>] [--password <pw>]
|
|
251
251
|
file an issue on a PUBLISHED tracker from outside (--name = as a guest, no key; --block for a tracker on a page)
|
|
252
|
-
--file: images·pdf·txt·csv·log·docx·xlsx·pptx·zip,
|
|
252
|
+
--file: images·pdf·txt·csv·log·docx·xlsx·pptx·zip, 75MB per file (guest 25MB), 10 per issue/comment
|
|
253
253
|
rootr issue reply <public URL> <#number> "<comment>" [--file <path>]… [--name <name>] [--block <block id>] [--password <pw>] comment on an issue of a published tracker
|
|
254
254
|
rootr booking show <table> show visitor booking settings
|
|
255
255
|
rootr booking set <table> --on --days 1,2,3,4,5 --hours 10:00-18:00 --duration 30 turn on + rules
|
|
@@ -2238,7 +2238,7 @@ function publicIssueFilesOf(args) {
|
|
|
2238
2238
|
}
|
|
2239
2239
|
const data = readFileSync(p);
|
|
2240
2240
|
if (data.length > PUBLIC_ISSUE_FILE_MAX_BYTES) {
|
|
2241
|
-
throw new Error(tr(`파일이 너무 큽니다: ${filename} — 한 파일에
|
|
2241
|
+
throw new Error(tr(`파일이 너무 큽니다: ${filename} — 한 파일에 75MB까지`, `File too large: ${filename} — 75MB per file`));
|
|
2242
2242
|
}
|
|
2243
2243
|
return { filename, mimeType, data };
|
|
2244
2244
|
});
|
package/lib/client.js
CHANGED
|
@@ -119,7 +119,8 @@ function hintFor(status, body) {
|
|
|
119
119
|
* ISSUE-PUBLIC-ATTACH — 공개 이슈트래커 첨부의 안전선(서버 issue-public-attachments.ts 와 같은 값). 서버가 다시 판정하지만, 보내기 전에
|
|
120
120
|
* 걸러 큰 파일을 헛되이 싣지 않게 한다.
|
|
121
121
|
*/
|
|
122
|
-
|
|
122
|
+
/** 계정으로 올릴 때의 상한(서버와 같음, 손님은 25MB — 서버가 가른다). */
|
|
123
|
+
export const PUBLIC_ISSUE_FILE_MAX_BYTES = 75 * 1024 * 1024;
|
|
123
124
|
export const PUBLIC_ISSUE_FILES_PER_POST = 10;
|
|
124
125
|
const PUBLIC_ISSUE_MIME = {
|
|
125
126
|
png: 'image/png',
|
|
@@ -1049,7 +1050,7 @@ export class RootrClient {
|
|
|
1049
1050
|
}
|
|
1050
1051
|
|
|
1051
1052
|
/**
|
|
1052
|
-
* ISSUE-PUBLIC-ATTACH — 공개 트래커(또는 페이지 블록)에 새 이슈·댓글용 파일을 올린다(본문 = 바이트).
|
|
1053
|
+
* ISSUE-PUBLIC-ATTACH — 공개 트래커(또는 페이지 블록)에 새 이슈·댓글용 파일을 올린다(본문 = 바이트). 크기(계정 75MB·손님 25MB)·허용 형식은 서버가 판정한다.
|
|
1053
1054
|
* 돌려받은 `markdown` 을 이슈·댓글 본문 끝에 붙여 보낸다(`withPublicAttachments`).
|
|
1054
1055
|
*/
|
|
1055
1056
|
async uploadPublicIssueFile(slug, { blockId, filename, mimeType, data, guestName, pass, asGuest } = {}) {
|
package/lib/mcp-tools/issues.js
CHANGED
|
@@ -264,7 +264,7 @@ export function registerIssueTools(server) {
|
|
|
264
264
|
/**
|
|
265
265
|
* ISSUE-PUBLIC-ATTACH — 공개 이슈·댓글에 붙일 파일. **내용(base64)만** 받는다 — 파일 경로는 받지 않는다: 원격 커넥터는 이 도구를 API 서버
|
|
266
266
|
* 안에서 돌리므로 경로를 읽으면 서버 파일을 남의 공개 트래커로 내보내는 구멍이 된다(rootr-remote-mcp-runs-in-api-process). 로컬에서도
|
|
267
|
-
* 같은 모양이라 원격/로컬을 가를 필요가 없다. 크기 상한은 서버와
|
|
267
|
+
* 같은 모양이라 원격/로컬을 가를 필요가 없다. 크기 상한은 서버와 같다 — 계정 키로 부르면 75MB, 손님이면 25MB, 글 하나에 10개.
|
|
268
268
|
*/
|
|
269
269
|
const PUBLIC_FILES = z
|
|
270
270
|
.array(
|
|
@@ -273,14 +273,14 @@ export function registerIssueTools(server) {
|
|
|
273
273
|
contentBase64: z
|
|
274
274
|
.string()
|
|
275
275
|
.max(Math.ceil(PUBLIC_ISSUE_FILE_MAX_BYTES / 3) * 4 + 4)
|
|
276
|
-
.describe('The file bytes, base64-encoded (≤
|
|
276
|
+
.describe('The file bytes, base64-encoded (≤75MB decoded with an account key; ≤25MB as a guest)'),
|
|
277
277
|
mimeType: z.string().max(120).optional().describe('Optional — guessed from the extension'),
|
|
278
278
|
}),
|
|
279
279
|
)
|
|
280
280
|
.max(PUBLIC_ISSUE_FILES_PER_POST)
|
|
281
281
|
.optional()
|
|
282
282
|
.describe(
|
|
283
|
-
`Files to attach (≤${PUBLIC_ISSUE_FILES_PER_POST}, ≤
|
|
283
|
+
`Files to attach (≤${PUBLIC_ISSUE_FILES_PER_POST}, ≤75MB each with an account key, ≤25MB as a guest): ${PUBLIC_ISSUE_FILE_EXTENSIONS.join(', ')}. ` +
|
|
284
284
|
'Images show inside the text, other files as a download link. svg/html/executables/video are refused, and the file\'s ' +
|
|
285
285
|
'first bytes must match its extension. Content only — no file paths.',
|
|
286
286
|
);
|
|
@@ -291,7 +291,7 @@ export function registerIssueTools(server) {
|
|
|
291
291
|
for (const f of files || []) {
|
|
292
292
|
const data = Buffer.from(f.contentBase64, 'base64');
|
|
293
293
|
if (!data.length) throw new RootrApiError(`빈 파일입니다: ${f.filename}`);
|
|
294
|
-
if (data.length > PUBLIC_ISSUE_FILE_MAX_BYTES) throw new RootrApiError(`파일이 너무 큽니다: ${f.filename} — 한 파일에
|
|
294
|
+
if (data.length > PUBLIC_ISSUE_FILE_MAX_BYTES) throw new RootrApiError(`파일이 너무 큽니다: ${f.filename} — 한 파일에 75MB까지`);
|
|
295
295
|
const mimeType = f.mimeType || publicIssueMimeOf(f.filename);
|
|
296
296
|
if (!mimeType) {
|
|
297
297
|
throw new RootrApiError(`이 형식은 올릴 수 없습니다: ${f.filename}`, { hint: `허용: ${PUBLIC_ISSUE_FILE_EXTENSIONS.join(', ')}` });
|