nworks 0.3.3 → 0.5.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.
- package/README.md +69 -2
- package/dist/index.js +703 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +474 -0
- package/dist/mcp.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var __export = (target, all) => {
|
|
|
7
7
|
|
|
8
8
|
// src/index.ts
|
|
9
9
|
import { createRequire } from "module";
|
|
10
|
-
import { Command as
|
|
10
|
+
import { Command as Command11 } from "commander";
|
|
11
11
|
|
|
12
12
|
// src/commands/login.ts
|
|
13
13
|
import { Command } from "commander";
|
|
@@ -1100,9 +1100,456 @@ var downloadCommand = new Command7("download").description("Download a file from
|
|
|
1100
1100
|
});
|
|
1101
1101
|
var driveCommand = new Command7("drive").description("Drive operations (requires User OAuth with file scope)").addCommand(listCommand2).addCommand(uploadCommand).addCommand(downloadCommand);
|
|
1102
1102
|
|
|
1103
|
-
// src/commands/
|
|
1103
|
+
// src/commands/mail.ts
|
|
1104
1104
|
import { Command as Command8 } from "commander";
|
|
1105
1105
|
|
|
1106
|
+
// src/api/mail.ts
|
|
1107
|
+
var BASE_URL4 = "https://www.worksapis.com/v1.0";
|
|
1108
|
+
async function authedFetch2(url2, init, profile) {
|
|
1109
|
+
const token = await getValidUserToken(profile);
|
|
1110
|
+
const headers = new Headers(init.headers);
|
|
1111
|
+
headers.set("Authorization", `Bearer ${token}`);
|
|
1112
|
+
return fetch(url2, { ...init, headers });
|
|
1113
|
+
}
|
|
1114
|
+
async function handleError2(res) {
|
|
1115
|
+
if (res.status === 401) {
|
|
1116
|
+
throw new AuthError("User token expired. Run `nworks login --user --scope mail` again.");
|
|
1117
|
+
}
|
|
1118
|
+
let code = "UNKNOWN";
|
|
1119
|
+
let description = `HTTP ${res.status}`;
|
|
1120
|
+
try {
|
|
1121
|
+
const body = await res.json();
|
|
1122
|
+
code = body.code ?? code;
|
|
1123
|
+
description = body.description ?? description;
|
|
1124
|
+
} catch {
|
|
1125
|
+
}
|
|
1126
|
+
throw new ApiError(code, description, res.status);
|
|
1127
|
+
}
|
|
1128
|
+
async function sendMail(opts) {
|
|
1129
|
+
const userId = opts.userId ?? "me";
|
|
1130
|
+
const profile = opts.profile ?? "default";
|
|
1131
|
+
const url2 = `${BASE_URL4}/users/${userId}/mail`;
|
|
1132
|
+
if (process.env["NWORKS_VERBOSE"] === "1") {
|
|
1133
|
+
console.error(`[nworks] POST ${url2}`);
|
|
1134
|
+
}
|
|
1135
|
+
const body = {
|
|
1136
|
+
to: opts.to,
|
|
1137
|
+
subject: opts.subject
|
|
1138
|
+
};
|
|
1139
|
+
if (opts.body !== void 0) body.body = opts.body;
|
|
1140
|
+
if (opts.cc) body.cc = opts.cc;
|
|
1141
|
+
if (opts.bcc) body.bcc = opts.bcc;
|
|
1142
|
+
if (opts.contentType) body.contentType = opts.contentType;
|
|
1143
|
+
const res = await authedFetch2(
|
|
1144
|
+
url2,
|
|
1145
|
+
{
|
|
1146
|
+
method: "POST",
|
|
1147
|
+
headers: { "Content-Type": "application/json" },
|
|
1148
|
+
body: JSON.stringify(body)
|
|
1149
|
+
},
|
|
1150
|
+
profile
|
|
1151
|
+
);
|
|
1152
|
+
if (res.status === 202) return;
|
|
1153
|
+
if (!res.ok) return handleError2(res);
|
|
1154
|
+
}
|
|
1155
|
+
async function listMails(folderId = 0, userId = "me", count = 30, cursor, isUnread, profile = "default") {
|
|
1156
|
+
const params = new URLSearchParams();
|
|
1157
|
+
params.set("count", String(count));
|
|
1158
|
+
if (cursor) params.set("cursor", cursor);
|
|
1159
|
+
if (isUnread) params.set("isUnread", "true");
|
|
1160
|
+
const url2 = `${BASE_URL4}/users/${userId}/mail/mailfolders/${folderId}/children?${params.toString()}`;
|
|
1161
|
+
if (process.env["NWORKS_VERBOSE"] === "1") {
|
|
1162
|
+
console.error(`[nworks] GET ${url2}`);
|
|
1163
|
+
}
|
|
1164
|
+
const res = await authedFetch2(url2, { method: "GET" }, profile);
|
|
1165
|
+
if (!res.ok) return handleError2(res);
|
|
1166
|
+
const data = await res.json();
|
|
1167
|
+
return {
|
|
1168
|
+
mails: data.mails ?? [],
|
|
1169
|
+
unreadCount: data.unreadCount,
|
|
1170
|
+
folderName: data.folderName,
|
|
1171
|
+
totalCount: data.totalCount,
|
|
1172
|
+
responseMetaData: data.responseMetaData
|
|
1173
|
+
};
|
|
1174
|
+
}
|
|
1175
|
+
async function readMail(mailId, userId = "me", profile = "default") {
|
|
1176
|
+
const url2 = `${BASE_URL4}/users/${userId}/mail/${mailId}`;
|
|
1177
|
+
if (process.env["NWORKS_VERBOSE"] === "1") {
|
|
1178
|
+
console.error(`[nworks] GET ${url2}`);
|
|
1179
|
+
}
|
|
1180
|
+
const res = await authedFetch2(url2, { method: "GET" }, profile);
|
|
1181
|
+
if (!res.ok) return handleError2(res);
|
|
1182
|
+
return await res.json();
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
// src/commands/mail.ts
|
|
1186
|
+
var sendCommand2 = new Command8("send").description("Send a mail (requires User OAuth with mail scope)").requiredOption("--to <emails>", "Recipient email addresses (separate with ;)").requiredOption("--subject <subject>", "Mail subject").option("--body <body>", "Mail body content").option("--cc <emails>", "CC email addresses (separate with ;)").option("--bcc <emails>", "BCC email addresses (separate with ;)").option("--content-type <type>", "Body format: html or text", "html").option("--user <userId>", "Sender user ID (default: me)").option("--profile <name>", "Profile name", "default").option("--json", "JSON output").option("--dry-run", "Print request without sending").action(async (opts) => {
|
|
1187
|
+
try {
|
|
1188
|
+
const sendOpts = {
|
|
1189
|
+
to: opts.to,
|
|
1190
|
+
subject: opts.subject,
|
|
1191
|
+
body: opts.body,
|
|
1192
|
+
cc: opts.cc,
|
|
1193
|
+
bcc: opts.bcc,
|
|
1194
|
+
contentType: opts.contentType,
|
|
1195
|
+
userId: opts.user ?? "me",
|
|
1196
|
+
profile: opts.profile
|
|
1197
|
+
};
|
|
1198
|
+
if (opts.dryRun) {
|
|
1199
|
+
output({ dryRun: true, request: sendOpts }, opts);
|
|
1200
|
+
return;
|
|
1201
|
+
}
|
|
1202
|
+
await sendMail(sendOpts);
|
|
1203
|
+
output({ success: true, message: "Mail sent (async)" }, opts);
|
|
1204
|
+
} catch (err) {
|
|
1205
|
+
const error48 = err;
|
|
1206
|
+
errorOutput({ code: error48.code, message: error48.message }, opts);
|
|
1207
|
+
process.exitCode = 1;
|
|
1208
|
+
}
|
|
1209
|
+
});
|
|
1210
|
+
var listCommand3 = new Command8("list").description("List mails in a folder (requires User OAuth with mail or mail.read scope)").option("--folder <folderId>", "Folder ID (default: 0 = inbox)", "0").option("--count <n>", "Items per page (default: 30)", "30").option("--cursor <cursor>", "Pagination cursor").option("--unread", "Show unread mails only", false).option("--user <userId>", "Target user ID (default: me)").option("--profile <name>", "Profile name", "default").option("--json", "JSON output").action(async (opts) => {
|
|
1211
|
+
try {
|
|
1212
|
+
const result = await listMails(
|
|
1213
|
+
parseInt(opts.folder, 10),
|
|
1214
|
+
opts.user ?? "me",
|
|
1215
|
+
parseInt(opts.count, 10),
|
|
1216
|
+
opts.cursor,
|
|
1217
|
+
opts.unread,
|
|
1218
|
+
opts.profile
|
|
1219
|
+
);
|
|
1220
|
+
const mails = result.mails.map((m) => ({
|
|
1221
|
+
mailId: m.mailId,
|
|
1222
|
+
from: m.from.email,
|
|
1223
|
+
subject: m.subject,
|
|
1224
|
+
date: m.receivedTime,
|
|
1225
|
+
status: m.status,
|
|
1226
|
+
attachments: m.attachCount ?? 0
|
|
1227
|
+
}));
|
|
1228
|
+
output(
|
|
1229
|
+
{
|
|
1230
|
+
mails,
|
|
1231
|
+
count: mails.length,
|
|
1232
|
+
totalCount: result.totalCount,
|
|
1233
|
+
unreadCount: result.unreadCount,
|
|
1234
|
+
folderName: result.folderName,
|
|
1235
|
+
nextCursor: result.responseMetaData?.nextCursor ?? null
|
|
1236
|
+
},
|
|
1237
|
+
opts
|
|
1238
|
+
);
|
|
1239
|
+
} catch (err) {
|
|
1240
|
+
const error48 = err;
|
|
1241
|
+
errorOutput({ code: error48.code, message: error48.message }, opts);
|
|
1242
|
+
process.exitCode = 1;
|
|
1243
|
+
}
|
|
1244
|
+
});
|
|
1245
|
+
var readCommand = new Command8("read").description("Read a specific mail (requires User OAuth with mail or mail.read scope)").requiredOption("--id <mailId>", "Mail ID").option("--user <userId>", "Target user ID (default: me)").option("--profile <name>", "Profile name", "default").option("--json", "JSON output").action(async (opts) => {
|
|
1246
|
+
try {
|
|
1247
|
+
const result = await readMail(
|
|
1248
|
+
parseInt(opts.id, 10),
|
|
1249
|
+
opts.user ?? "me",
|
|
1250
|
+
opts.profile
|
|
1251
|
+
);
|
|
1252
|
+
const mail = result.mail;
|
|
1253
|
+
output(
|
|
1254
|
+
{
|
|
1255
|
+
mailId: mail.mailId,
|
|
1256
|
+
from: mail.from,
|
|
1257
|
+
to: mail.to,
|
|
1258
|
+
cc: mail.cc ?? [],
|
|
1259
|
+
subject: mail.subject,
|
|
1260
|
+
body: mail.body,
|
|
1261
|
+
date: mail.receivedTime,
|
|
1262
|
+
attachments: result.attachments?.map((a) => ({
|
|
1263
|
+
id: a.attachmentId,
|
|
1264
|
+
filename: a.filename,
|
|
1265
|
+
contentType: a.contentType,
|
|
1266
|
+
size: a.size
|
|
1267
|
+
})) ?? []
|
|
1268
|
+
},
|
|
1269
|
+
opts
|
|
1270
|
+
);
|
|
1271
|
+
} catch (err) {
|
|
1272
|
+
const error48 = err;
|
|
1273
|
+
errorOutput({ code: error48.code, message: error48.message }, opts);
|
|
1274
|
+
process.exitCode = 1;
|
|
1275
|
+
}
|
|
1276
|
+
});
|
|
1277
|
+
var mailCommand = new Command8("mail").description("Mail operations (requires User OAuth with mail scope)").addCommand(sendCommand2).addCommand(listCommand3).addCommand(readCommand);
|
|
1278
|
+
|
|
1279
|
+
// src/commands/task.ts
|
|
1280
|
+
import { Command as Command9 } from "commander";
|
|
1281
|
+
|
|
1282
|
+
// src/api/task.ts
|
|
1283
|
+
var BASE_URL5 = "https://www.worksapis.com/v1.0";
|
|
1284
|
+
async function authedFetch3(url2, init, profile) {
|
|
1285
|
+
const token = await getValidUserToken(profile);
|
|
1286
|
+
const headers = new Headers(init.headers);
|
|
1287
|
+
headers.set("Authorization", `Bearer ${token}`);
|
|
1288
|
+
return fetch(url2, { ...init, headers });
|
|
1289
|
+
}
|
|
1290
|
+
async function handleError3(res) {
|
|
1291
|
+
if (res.status === 401) {
|
|
1292
|
+
throw new AuthError("User token expired. Run `nworks login --user --scope task` again.");
|
|
1293
|
+
}
|
|
1294
|
+
let code = "UNKNOWN";
|
|
1295
|
+
let description = `HTTP ${res.status}`;
|
|
1296
|
+
try {
|
|
1297
|
+
const body = await res.json();
|
|
1298
|
+
code = body.code ?? code;
|
|
1299
|
+
description = body.description ?? description;
|
|
1300
|
+
} catch {
|
|
1301
|
+
}
|
|
1302
|
+
throw new ApiError(code, description, res.status);
|
|
1303
|
+
}
|
|
1304
|
+
async function resolveUserId(userId, profile) {
|
|
1305
|
+
if (userId !== "me") return userId;
|
|
1306
|
+
const url2 = `${BASE_URL5}/users/me`;
|
|
1307
|
+
const res = await authedFetch3(url2, { method: "GET" }, profile);
|
|
1308
|
+
if (!res.ok) return handleError3(res);
|
|
1309
|
+
const data = await res.json();
|
|
1310
|
+
if (process.env["NWORKS_VERBOSE"] === "1") {
|
|
1311
|
+
console.error(`[nworks] Resolved "me" \u2192 ${data.userId}`);
|
|
1312
|
+
}
|
|
1313
|
+
return data.userId;
|
|
1314
|
+
}
|
|
1315
|
+
async function listTasks(categoryId = "default", userId = "me", count = 50, cursor, status = "ALL", profile = "default") {
|
|
1316
|
+
const params = new URLSearchParams();
|
|
1317
|
+
params.set("categoryId", categoryId);
|
|
1318
|
+
params.set("count", String(count));
|
|
1319
|
+
params.set("status", status);
|
|
1320
|
+
if (cursor) params.set("cursor", cursor);
|
|
1321
|
+
const url2 = `${BASE_URL5}/users/${userId}/tasks?${params.toString()}`;
|
|
1322
|
+
if (process.env["NWORKS_VERBOSE"] === "1") {
|
|
1323
|
+
console.error(`[nworks] GET ${url2}`);
|
|
1324
|
+
}
|
|
1325
|
+
const res = await authedFetch3(url2, { method: "GET" }, profile);
|
|
1326
|
+
if (!res.ok) return handleError3(res);
|
|
1327
|
+
const data = await res.json();
|
|
1328
|
+
return { tasks: data.tasks ?? [], responseMetaData: data.responseMetaData };
|
|
1329
|
+
}
|
|
1330
|
+
async function createTask(opts) {
|
|
1331
|
+
const userId = opts.userId ?? "me";
|
|
1332
|
+
const profile = opts.profile ?? "default";
|
|
1333
|
+
const resolvedUserId = await resolveUserId(userId, profile);
|
|
1334
|
+
const assignorId = opts.assignorId ?? resolvedUserId;
|
|
1335
|
+
const assigneeIds = opts.assigneeIds ?? [resolvedUserId];
|
|
1336
|
+
const body = {
|
|
1337
|
+
assignorId,
|
|
1338
|
+
assignees: assigneeIds.map((id) => ({ assigneeId: id, status: "TODO" })),
|
|
1339
|
+
title: opts.title,
|
|
1340
|
+
content: opts.content ?? "",
|
|
1341
|
+
completionCondition: "ANY_ONE"
|
|
1342
|
+
};
|
|
1343
|
+
if (opts.dueDate) body.dueDate = opts.dueDate;
|
|
1344
|
+
if (opts.categoryId) body.categoryId = opts.categoryId;
|
|
1345
|
+
const url2 = `${BASE_URL5}/users/${userId}/tasks`;
|
|
1346
|
+
if (process.env["NWORKS_VERBOSE"] === "1") {
|
|
1347
|
+
console.error(`[nworks] POST ${url2}`);
|
|
1348
|
+
console.error(`[nworks] Body: ${JSON.stringify(body, null, 2)}`);
|
|
1349
|
+
}
|
|
1350
|
+
const res = await authedFetch3(
|
|
1351
|
+
url2,
|
|
1352
|
+
{
|
|
1353
|
+
method: "POST",
|
|
1354
|
+
headers: { "Content-Type": "application/json" },
|
|
1355
|
+
body: JSON.stringify(body)
|
|
1356
|
+
},
|
|
1357
|
+
profile
|
|
1358
|
+
);
|
|
1359
|
+
if (res.status === 201) {
|
|
1360
|
+
return await res.json();
|
|
1361
|
+
}
|
|
1362
|
+
if (!res.ok) return handleError3(res);
|
|
1363
|
+
return await res.json();
|
|
1364
|
+
}
|
|
1365
|
+
async function updateTask(opts) {
|
|
1366
|
+
const profile = opts.profile ?? "default";
|
|
1367
|
+
const body = {};
|
|
1368
|
+
if (opts.title !== void 0) body.title = opts.title;
|
|
1369
|
+
if (opts.content !== void 0) body.content = opts.content;
|
|
1370
|
+
if (opts.dueDate !== void 0) body.dueDate = opts.dueDate;
|
|
1371
|
+
const url2 = `${BASE_URL5}/tasks/${opts.taskId}`;
|
|
1372
|
+
if (process.env["NWORKS_VERBOSE"] === "1") {
|
|
1373
|
+
console.error(`[nworks] PATCH ${url2}`);
|
|
1374
|
+
}
|
|
1375
|
+
const res = await authedFetch3(
|
|
1376
|
+
url2,
|
|
1377
|
+
{
|
|
1378
|
+
method: "PATCH",
|
|
1379
|
+
headers: { "Content-Type": "application/json" },
|
|
1380
|
+
body: JSON.stringify(body)
|
|
1381
|
+
},
|
|
1382
|
+
profile
|
|
1383
|
+
);
|
|
1384
|
+
if (!res.ok) return handleError3(res);
|
|
1385
|
+
return await res.json();
|
|
1386
|
+
}
|
|
1387
|
+
async function completeTask(taskId, profile = "default") {
|
|
1388
|
+
const url2 = `${BASE_URL5}/tasks/${taskId}/complete`;
|
|
1389
|
+
if (process.env["NWORKS_VERBOSE"] === "1") {
|
|
1390
|
+
console.error(`[nworks] POST ${url2}`);
|
|
1391
|
+
}
|
|
1392
|
+
const res = await authedFetch3(
|
|
1393
|
+
url2,
|
|
1394
|
+
{ method: "POST" },
|
|
1395
|
+
profile
|
|
1396
|
+
);
|
|
1397
|
+
if (res.status === 204) return;
|
|
1398
|
+
if (!res.ok) return handleError3(res);
|
|
1399
|
+
}
|
|
1400
|
+
async function incompleteTask(taskId, profile = "default") {
|
|
1401
|
+
const url2 = `${BASE_URL5}/tasks/${taskId}/incomplete`;
|
|
1402
|
+
if (process.env["NWORKS_VERBOSE"] === "1") {
|
|
1403
|
+
console.error(`[nworks] POST ${url2}`);
|
|
1404
|
+
}
|
|
1405
|
+
const res = await authedFetch3(
|
|
1406
|
+
url2,
|
|
1407
|
+
{ method: "POST" },
|
|
1408
|
+
profile
|
|
1409
|
+
);
|
|
1410
|
+
if (res.status === 204) return;
|
|
1411
|
+
if (!res.ok) return handleError3(res);
|
|
1412
|
+
}
|
|
1413
|
+
async function deleteTask(taskId, profile = "default") {
|
|
1414
|
+
const url2 = `${BASE_URL5}/tasks/${taskId}`;
|
|
1415
|
+
if (process.env["NWORKS_VERBOSE"] === "1") {
|
|
1416
|
+
console.error(`[nworks] DELETE ${url2}`);
|
|
1417
|
+
}
|
|
1418
|
+
const res = await authedFetch3(
|
|
1419
|
+
url2,
|
|
1420
|
+
{ method: "DELETE" },
|
|
1421
|
+
profile
|
|
1422
|
+
);
|
|
1423
|
+
if (res.status === 204) return;
|
|
1424
|
+
if (!res.ok) return handleError3(res);
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
// src/commands/task.ts
|
|
1428
|
+
var listCommand4 = new Command9("list").description("List tasks (requires User OAuth with task or task.read scope)").option("--category <categoryId>", "Category ID (default: default)", "default").option("--status <status>", "Filter: TODO or ALL (default: ALL)", "ALL").option("--count <n>", "Items per page (default: 50)", "50").option("--cursor <cursor>", "Pagination cursor").option("--user <userId>", "Target user ID (default: me)").option("--profile <name>", "Profile name", "default").option("--json", "JSON output").action(async (opts) => {
|
|
1429
|
+
try {
|
|
1430
|
+
const result = await listTasks(
|
|
1431
|
+
opts.category,
|
|
1432
|
+
opts.user ?? "me",
|
|
1433
|
+
parseInt(opts.count, 10),
|
|
1434
|
+
opts.cursor,
|
|
1435
|
+
opts.status,
|
|
1436
|
+
opts.profile
|
|
1437
|
+
);
|
|
1438
|
+
const tasks = result.tasks.map((t) => ({
|
|
1439
|
+
taskId: t.taskId,
|
|
1440
|
+
title: t.title,
|
|
1441
|
+
status: t.status,
|
|
1442
|
+
dueDate: t.dueDate ?? "",
|
|
1443
|
+
assignor: t.assignorName ?? t.assignorId,
|
|
1444
|
+
created: t.createdTime
|
|
1445
|
+
}));
|
|
1446
|
+
output(
|
|
1447
|
+
{
|
|
1448
|
+
tasks,
|
|
1449
|
+
count: tasks.length,
|
|
1450
|
+
nextCursor: result.responseMetaData?.nextCursor ?? null
|
|
1451
|
+
},
|
|
1452
|
+
opts
|
|
1453
|
+
);
|
|
1454
|
+
} catch (err) {
|
|
1455
|
+
const error48 = err;
|
|
1456
|
+
errorOutput({ code: error48.code, message: error48.message }, opts);
|
|
1457
|
+
process.exitCode = 1;
|
|
1458
|
+
}
|
|
1459
|
+
});
|
|
1460
|
+
var createCommand = new Command9("create").description("Create a task (requires User OAuth with task scope)").requiredOption("--title <title>", "Task title").option("--body <content>", "Task content/description").option("--due <date>", "Due date (YYYY-MM-DD)").option("--category <categoryId>", "Category ID").option("--assignee <userIds>", "Assignee user IDs (comma-separated)").option("--user <userId>", "Creator user ID (default: me)").option("--profile <name>", "Profile name", "default").option("--json", "JSON output").action(async (opts) => {
|
|
1461
|
+
try {
|
|
1462
|
+
const assigneeIds = opts.assignee ? opts.assignee.split(",").map((s) => s.trim()) : void 0;
|
|
1463
|
+
const result = await createTask({
|
|
1464
|
+
title: opts.title,
|
|
1465
|
+
content: opts.body,
|
|
1466
|
+
dueDate: opts.due,
|
|
1467
|
+
categoryId: opts.category,
|
|
1468
|
+
assigneeIds,
|
|
1469
|
+
userId: opts.user ?? "me",
|
|
1470
|
+
profile: opts.profile
|
|
1471
|
+
});
|
|
1472
|
+
output(
|
|
1473
|
+
{
|
|
1474
|
+
success: true,
|
|
1475
|
+
taskId: result.taskId,
|
|
1476
|
+
title: result.title,
|
|
1477
|
+
status: result.status,
|
|
1478
|
+
dueDate: result.dueDate
|
|
1479
|
+
},
|
|
1480
|
+
opts
|
|
1481
|
+
);
|
|
1482
|
+
} catch (err) {
|
|
1483
|
+
const error48 = err;
|
|
1484
|
+
errorOutput({ code: error48.code, message: error48.message }, opts);
|
|
1485
|
+
process.exitCode = 1;
|
|
1486
|
+
}
|
|
1487
|
+
});
|
|
1488
|
+
var updateCommand = new Command9("update").description("Update a task (requires User OAuth with task scope)").requiredOption("--id <taskId>", "Task ID").option("--title <title>", "New title").option("--body <content>", "New content").option("--due <date>", "New due date (YYYY-MM-DD)").option("--status <status>", "Set status: done or todo").option("--profile <name>", "Profile name", "default").option("--json", "JSON output").action(async (opts) => {
|
|
1489
|
+
try {
|
|
1490
|
+
const profile = opts.profile;
|
|
1491
|
+
const taskId = opts.id;
|
|
1492
|
+
const status = opts.status;
|
|
1493
|
+
if (status) {
|
|
1494
|
+
if (status.toLowerCase() === "done") {
|
|
1495
|
+
await completeTask(taskId, profile);
|
|
1496
|
+
} else if (status.toLowerCase() === "todo") {
|
|
1497
|
+
await incompleteTask(taskId, profile);
|
|
1498
|
+
} else {
|
|
1499
|
+
throw new Error("Invalid status. Use 'done' or 'todo'.");
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
const hasFieldUpdate = opts.title || opts.body || opts.due;
|
|
1503
|
+
if (hasFieldUpdate) {
|
|
1504
|
+
const result = await updateTask({
|
|
1505
|
+
taskId,
|
|
1506
|
+
title: opts.title,
|
|
1507
|
+
content: opts.body,
|
|
1508
|
+
dueDate: opts.due,
|
|
1509
|
+
profile
|
|
1510
|
+
});
|
|
1511
|
+
output(
|
|
1512
|
+
{
|
|
1513
|
+
success: true,
|
|
1514
|
+
taskId: result.taskId,
|
|
1515
|
+
title: result.title,
|
|
1516
|
+
status: result.status,
|
|
1517
|
+
dueDate: result.dueDate
|
|
1518
|
+
},
|
|
1519
|
+
opts
|
|
1520
|
+
);
|
|
1521
|
+
} else if (status) {
|
|
1522
|
+
output(
|
|
1523
|
+
{ success: true, taskId, status: status.toLowerCase() === "done" ? "DONE" : "TODO" },
|
|
1524
|
+
opts
|
|
1525
|
+
);
|
|
1526
|
+
} else {
|
|
1527
|
+
throw new Error("Specify at least one of: --title, --body, --due, --status");
|
|
1528
|
+
}
|
|
1529
|
+
} catch (err) {
|
|
1530
|
+
const error48 = err;
|
|
1531
|
+
errorOutput({ code: error48.code, message: error48.message }, opts);
|
|
1532
|
+
process.exitCode = 1;
|
|
1533
|
+
}
|
|
1534
|
+
});
|
|
1535
|
+
var deleteCommand = new Command9("delete").description("Delete a task (requires User OAuth with task scope)").requiredOption("--id <taskId>", "Task ID").option("--profile <name>", "Profile name", "default").option("--json", "JSON output").action(async (opts) => {
|
|
1536
|
+
try {
|
|
1537
|
+
await deleteTask(
|
|
1538
|
+
opts.id,
|
|
1539
|
+
opts.profile
|
|
1540
|
+
);
|
|
1541
|
+
output({ success: true, taskId: opts.id, message: "Task deleted" }, opts);
|
|
1542
|
+
} catch (err) {
|
|
1543
|
+
const error48 = err;
|
|
1544
|
+
errorOutput({ code: error48.code, message: error48.message }, opts);
|
|
1545
|
+
process.exitCode = 1;
|
|
1546
|
+
}
|
|
1547
|
+
});
|
|
1548
|
+
var taskCommand = new Command9("task").description("Task operations (requires User OAuth with task scope)").addCommand(listCommand4).addCommand(createCommand).addCommand(updateCommand).addCommand(deleteCommand);
|
|
1549
|
+
|
|
1550
|
+
// src/commands/mcp-cmd.ts
|
|
1551
|
+
import { Command as Command10 } from "commander";
|
|
1552
|
+
|
|
1106
1553
|
// src/mcp/server.ts
|
|
1107
1554
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
1108
1555
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -15123,6 +15570,256 @@ function registerTools(server) {
|
|
|
15123
15570
|
}
|
|
15124
15571
|
}
|
|
15125
15572
|
);
|
|
15573
|
+
server.tool(
|
|
15574
|
+
"nworks_mail_send",
|
|
15575
|
+
"\uBA54\uC77C\uC744 \uC804\uC1A1\uD569\uB2C8\uB2E4 (User OAuth mail scope \uD544\uC694). \uBE44\uB3D9\uAE30 \uC804\uC1A1\uC73C\uB85C, \uC131\uACF5 \uC2DC 202 \uC751\uB2F5\uC744 \uBC18\uD658\uD569\uB2C8\uB2E4.",
|
|
15576
|
+
{
|
|
15577
|
+
to: external_exports.string().describe("\uC218\uC2E0\uC790 \uC774\uBA54\uC77C (\uC5EC\uB7EC \uBA85\uC740 ; \uB85C \uAD6C\uBD84)"),
|
|
15578
|
+
subject: external_exports.string().describe("\uBA54\uC77C \uC81C\uBAA9"),
|
|
15579
|
+
body: external_exports.string().optional().describe("\uBA54\uC77C \uBCF8\uBB38"),
|
|
15580
|
+
cc: external_exports.string().optional().describe("\uCC38\uC870 \uC774\uBA54\uC77C (\uC5EC\uB7EC \uBA85\uC740 ; \uB85C \uAD6C\uBD84)"),
|
|
15581
|
+
bcc: external_exports.string().optional().describe("\uC228\uC740\uCC38\uC870 \uC774\uBA54\uC77C (\uC5EC\uB7EC \uBA85\uC740 ; \uB85C \uAD6C\uBD84)"),
|
|
15582
|
+
contentType: external_exports.enum(["html", "text"]).optional().describe("\uBCF8\uBB38 \uD615\uC2DD (\uAE30\uBCF8: html)"),
|
|
15583
|
+
userId: external_exports.string().optional().describe("\uBC1C\uC2E0\uC790 ID (\uBBF8\uC9C0\uC815 \uC2DC me)")
|
|
15584
|
+
},
|
|
15585
|
+
async ({ to, subject, body, cc, bcc, contentType, userId }) => {
|
|
15586
|
+
try {
|
|
15587
|
+
await sendMail({
|
|
15588
|
+
to,
|
|
15589
|
+
subject,
|
|
15590
|
+
body,
|
|
15591
|
+
cc,
|
|
15592
|
+
bcc,
|
|
15593
|
+
contentType,
|
|
15594
|
+
userId: userId ?? "me"
|
|
15595
|
+
});
|
|
15596
|
+
return {
|
|
15597
|
+
content: [{ type: "text", text: JSON.stringify({ success: true, message: "Mail sent (async)" }) }]
|
|
15598
|
+
};
|
|
15599
|
+
} catch (err) {
|
|
15600
|
+
const error48 = err;
|
|
15601
|
+
return {
|
|
15602
|
+
content: [{ type: "text", text: `Error: ${error48.message}` }],
|
|
15603
|
+
isError: true
|
|
15604
|
+
};
|
|
15605
|
+
}
|
|
15606
|
+
}
|
|
15607
|
+
);
|
|
15608
|
+
server.tool(
|
|
15609
|
+
"nworks_mail_list",
|
|
15610
|
+
"\uBA54\uC77C\uD568\uC758 \uBA54\uC77C \uBAA9\uB85D\uC744 \uC870\uD68C\uD569\uB2C8\uB2E4 (User OAuth mail \uB610\uB294 mail.read scope \uD544\uC694)",
|
|
15611
|
+
{
|
|
15612
|
+
folderId: external_exports.number().optional().describe("\uBA54\uC77C \uD3F4\uB354 ID (\uAE30\uBCF8: 0 = \uBC1B\uC740\uD3B8\uC9C0\uD568)"),
|
|
15613
|
+
count: external_exports.number().optional().describe("\uD398\uC774\uC9C0\uB2F9 \uD56D\uBAA9 \uC218 (\uAE30\uBCF8: 30, \uCD5C\uB300: 200)"),
|
|
15614
|
+
cursor: external_exports.string().optional().describe("\uD398\uC774\uC9C0\uB124\uC774\uC158 \uCEE4\uC11C"),
|
|
15615
|
+
isUnread: external_exports.boolean().optional().describe("\uC77D\uC9C0 \uC54A\uC740 \uBA54\uC77C\uB9CC \uC870\uD68C"),
|
|
15616
|
+
userId: external_exports.string().optional().describe("\uB300\uC0C1 \uC0AC\uC6A9\uC790 ID (\uBBF8\uC9C0\uC815 \uC2DC me)")
|
|
15617
|
+
},
|
|
15618
|
+
async ({ folderId, count, cursor, isUnread, userId }) => {
|
|
15619
|
+
try {
|
|
15620
|
+
const result = await listMails(
|
|
15621
|
+
folderId ?? 0,
|
|
15622
|
+
userId ?? "me",
|
|
15623
|
+
count ?? 30,
|
|
15624
|
+
cursor,
|
|
15625
|
+
isUnread
|
|
15626
|
+
);
|
|
15627
|
+
const mails = result.mails.map((m) => ({
|
|
15628
|
+
mailId: m.mailId,
|
|
15629
|
+
from: m.from.email,
|
|
15630
|
+
subject: m.subject,
|
|
15631
|
+
date: m.receivedTime,
|
|
15632
|
+
status: m.status,
|
|
15633
|
+
attachments: m.attachCount ?? 0
|
|
15634
|
+
}));
|
|
15635
|
+
return {
|
|
15636
|
+
content: [{ type: "text", text: JSON.stringify({ mails, count: mails.length, totalCount: result.totalCount, unreadCount: result.unreadCount, nextCursor: result.responseMetaData?.nextCursor ?? null }) }]
|
|
15637
|
+
};
|
|
15638
|
+
} catch (err) {
|
|
15639
|
+
const error48 = err;
|
|
15640
|
+
return {
|
|
15641
|
+
content: [{ type: "text", text: `Error: ${error48.message}` }],
|
|
15642
|
+
isError: true
|
|
15643
|
+
};
|
|
15644
|
+
}
|
|
15645
|
+
}
|
|
15646
|
+
);
|
|
15647
|
+
server.tool(
|
|
15648
|
+
"nworks_mail_read",
|
|
15649
|
+
"\uD2B9\uC815 \uBA54\uC77C\uC758 \uC0C1\uC138 \uB0B4\uC6A9\uC744 \uC870\uD68C\uD569\uB2C8\uB2E4 (User OAuth mail \uB610\uB294 mail.read scope \uD544\uC694)",
|
|
15650
|
+
{
|
|
15651
|
+
mailId: external_exports.number().describe("\uBA54\uC77C ID"),
|
|
15652
|
+
userId: external_exports.string().optional().describe("\uB300\uC0C1 \uC0AC\uC6A9\uC790 ID (\uBBF8\uC9C0\uC815 \uC2DC me)")
|
|
15653
|
+
},
|
|
15654
|
+
async ({ mailId, userId }) => {
|
|
15655
|
+
try {
|
|
15656
|
+
const result = await readMail(
|
|
15657
|
+
mailId,
|
|
15658
|
+
userId ?? "me"
|
|
15659
|
+
);
|
|
15660
|
+
const mail = result.mail;
|
|
15661
|
+
return {
|
|
15662
|
+
content: [{ type: "text", text: JSON.stringify({
|
|
15663
|
+
mailId: mail.mailId,
|
|
15664
|
+
from: mail.from,
|
|
15665
|
+
to: mail.to,
|
|
15666
|
+
cc: mail.cc ?? [],
|
|
15667
|
+
subject: mail.subject,
|
|
15668
|
+
body: mail.body,
|
|
15669
|
+
date: mail.receivedTime,
|
|
15670
|
+
attachments: result.attachments?.map((a) => ({
|
|
15671
|
+
id: a.attachmentId,
|
|
15672
|
+
filename: a.filename,
|
|
15673
|
+
contentType: a.contentType,
|
|
15674
|
+
size: a.size
|
|
15675
|
+
})) ?? []
|
|
15676
|
+
}) }]
|
|
15677
|
+
};
|
|
15678
|
+
} catch (err) {
|
|
15679
|
+
const error48 = err;
|
|
15680
|
+
return {
|
|
15681
|
+
content: [{ type: "text", text: `Error: ${error48.message}` }],
|
|
15682
|
+
isError: true
|
|
15683
|
+
};
|
|
15684
|
+
}
|
|
15685
|
+
}
|
|
15686
|
+
);
|
|
15687
|
+
server.tool(
|
|
15688
|
+
"nworks_task_list",
|
|
15689
|
+
"\uD560 \uC77C \uBAA9\uB85D\uC744 \uC870\uD68C\uD569\uB2C8\uB2E4 (User OAuth task \uB610\uB294 task.read scope \uD544\uC694)",
|
|
15690
|
+
{
|
|
15691
|
+
categoryId: external_exports.string().optional().describe("\uCE74\uD14C\uACE0\uB9AC ID (\uAE30\uBCF8: default)"),
|
|
15692
|
+
status: external_exports.enum(["TODO", "ALL"]).optional().describe("\uD544\uD130: TODO \uB610\uB294 ALL (\uAE30\uBCF8: ALL)"),
|
|
15693
|
+
count: external_exports.number().optional().describe("\uD398\uC774\uC9C0\uB2F9 \uD56D\uBAA9 \uC218 (\uAE30\uBCF8: 50, \uCD5C\uB300: 100)"),
|
|
15694
|
+
cursor: external_exports.string().optional().describe("\uD398\uC774\uC9C0\uB124\uC774\uC158 \uCEE4\uC11C"),
|
|
15695
|
+
userId: external_exports.string().optional().describe("\uB300\uC0C1 \uC0AC\uC6A9\uC790 ID (\uBBF8\uC9C0\uC815 \uC2DC me)")
|
|
15696
|
+
},
|
|
15697
|
+
async ({ categoryId, status, count, cursor, userId }) => {
|
|
15698
|
+
try {
|
|
15699
|
+
const result = await listTasks(
|
|
15700
|
+
categoryId ?? "default",
|
|
15701
|
+
userId ?? "me",
|
|
15702
|
+
count ?? 50,
|
|
15703
|
+
cursor,
|
|
15704
|
+
status ?? "ALL"
|
|
15705
|
+
);
|
|
15706
|
+
const tasks = result.tasks.map((t) => ({
|
|
15707
|
+
taskId: t.taskId,
|
|
15708
|
+
title: t.title,
|
|
15709
|
+
status: t.status,
|
|
15710
|
+
dueDate: t.dueDate,
|
|
15711
|
+
assignor: t.assignorName ?? t.assignorId,
|
|
15712
|
+
created: t.createdTime
|
|
15713
|
+
}));
|
|
15714
|
+
return {
|
|
15715
|
+
content: [{ type: "text", text: JSON.stringify({ tasks, count: tasks.length, nextCursor: result.responseMetaData?.nextCursor ?? null }) }]
|
|
15716
|
+
};
|
|
15717
|
+
} catch (err) {
|
|
15718
|
+
const error48 = err;
|
|
15719
|
+
return {
|
|
15720
|
+
content: [{ type: "text", text: `Error: ${error48.message}` }],
|
|
15721
|
+
isError: true
|
|
15722
|
+
};
|
|
15723
|
+
}
|
|
15724
|
+
}
|
|
15725
|
+
);
|
|
15726
|
+
server.tool(
|
|
15727
|
+
"nworks_task_create",
|
|
15728
|
+
"\uD560 \uC77C\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4 (User OAuth task scope \uD544\uC694). \uAE30\uBCF8\uC801\uC73C\uB85C \uC790\uAE30 \uC790\uC2E0\uC5D0\uAC8C \uD560\uB2F9\uB429\uB2C8\uB2E4.",
|
|
15729
|
+
{
|
|
15730
|
+
title: external_exports.string().describe("\uD560 \uC77C \uC81C\uBAA9"),
|
|
15731
|
+
content: external_exports.string().optional().describe("\uD560 \uC77C \uB0B4\uC6A9"),
|
|
15732
|
+
dueDate: external_exports.string().optional().describe("\uB9C8\uAC10\uC77C (YYYY-MM-DD)"),
|
|
15733
|
+
categoryId: external_exports.string().optional().describe("\uCE74\uD14C\uACE0\uB9AC ID"),
|
|
15734
|
+
assigneeIds: external_exports.array(external_exports.string()).optional().describe("\uB2F4\uB2F9\uC790 user ID \uBAA9\uB85D (\uBBF8\uC9C0\uC815 \uC2DC \uC790\uAE30 \uC790\uC2E0)"),
|
|
15735
|
+
userId: external_exports.string().optional().describe("\uC0DD\uC131\uC790 user ID (\uBBF8\uC9C0\uC815 \uC2DC me)")
|
|
15736
|
+
},
|
|
15737
|
+
async ({ title, content, dueDate, categoryId, assigneeIds, userId }) => {
|
|
15738
|
+
try {
|
|
15739
|
+
const result = await createTask({
|
|
15740
|
+
title,
|
|
15741
|
+
content,
|
|
15742
|
+
dueDate,
|
|
15743
|
+
categoryId,
|
|
15744
|
+
assigneeIds,
|
|
15745
|
+
userId: userId ?? "me"
|
|
15746
|
+
});
|
|
15747
|
+
return {
|
|
15748
|
+
content: [{ type: "text", text: JSON.stringify({ success: true, taskId: result.taskId, title: result.title, status: result.status, dueDate: result.dueDate }) }]
|
|
15749
|
+
};
|
|
15750
|
+
} catch (err) {
|
|
15751
|
+
const error48 = err;
|
|
15752
|
+
return {
|
|
15753
|
+
content: [{ type: "text", text: `Error: ${error48.message}` }],
|
|
15754
|
+
isError: true
|
|
15755
|
+
};
|
|
15756
|
+
}
|
|
15757
|
+
}
|
|
15758
|
+
);
|
|
15759
|
+
server.tool(
|
|
15760
|
+
"nworks_task_update",
|
|
15761
|
+
"\uD560 \uC77C\uC744 \uC218\uC815\uD569\uB2C8\uB2E4 (User OAuth task scope \uD544\uC694). \uC0C1\uD0DC \uBCC0\uACBD(done/todo)\uACFC \uD544\uB4DC \uC218\uC815\uC744 \uBAA8\uB450 \uC9C0\uC6D0\uD569\uB2C8\uB2E4.",
|
|
15762
|
+
{
|
|
15763
|
+
taskId: external_exports.string().describe("\uD560 \uC77C ID"),
|
|
15764
|
+
status: external_exports.enum(["done", "todo"]).optional().describe("\uC0C1\uD0DC \uBCC0\uACBD: done \uB610\uB294 todo"),
|
|
15765
|
+
title: external_exports.string().optional().describe("\uC0C8 \uC81C\uBAA9"),
|
|
15766
|
+
content: external_exports.string().optional().describe("\uC0C8 \uB0B4\uC6A9"),
|
|
15767
|
+
dueDate: external_exports.string().optional().describe("\uC0C8 \uB9C8\uAC10\uC77C (YYYY-MM-DD)")
|
|
15768
|
+
},
|
|
15769
|
+
async ({ taskId, status, title, content, dueDate }) => {
|
|
15770
|
+
try {
|
|
15771
|
+
if (status) {
|
|
15772
|
+
if (status === "done") {
|
|
15773
|
+
await completeTask(taskId);
|
|
15774
|
+
} else {
|
|
15775
|
+
await incompleteTask(taskId);
|
|
15776
|
+
}
|
|
15777
|
+
}
|
|
15778
|
+
if (title !== void 0 || content !== void 0 || dueDate !== void 0) {
|
|
15779
|
+
const result = await updateTask({ taskId, title, content, dueDate });
|
|
15780
|
+
return {
|
|
15781
|
+
content: [{ type: "text", text: JSON.stringify({ success: true, taskId: result.taskId, title: result.title, status: result.status, dueDate: result.dueDate }) }]
|
|
15782
|
+
};
|
|
15783
|
+
}
|
|
15784
|
+
if (status) {
|
|
15785
|
+
return {
|
|
15786
|
+
content: [{ type: "text", text: JSON.stringify({ success: true, taskId, status: status === "done" ? "DONE" : "TODO" }) }]
|
|
15787
|
+
};
|
|
15788
|
+
}
|
|
15789
|
+
return {
|
|
15790
|
+
content: [{ type: "text", text: "Error: status, title, content, dueDate \uC911 \uD558\uB098 \uC774\uC0C1\uC744 \uC9C0\uC815\uD558\uC138\uC694." }],
|
|
15791
|
+
isError: true
|
|
15792
|
+
};
|
|
15793
|
+
} catch (err) {
|
|
15794
|
+
const error48 = err;
|
|
15795
|
+
return {
|
|
15796
|
+
content: [{ type: "text", text: `Error: ${error48.message}` }],
|
|
15797
|
+
isError: true
|
|
15798
|
+
};
|
|
15799
|
+
}
|
|
15800
|
+
}
|
|
15801
|
+
);
|
|
15802
|
+
server.tool(
|
|
15803
|
+
"nworks_task_delete",
|
|
15804
|
+
"\uD560 \uC77C\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4 (User OAuth task scope \uD544\uC694)",
|
|
15805
|
+
{
|
|
15806
|
+
taskId: external_exports.string().describe("\uC0AD\uC81C\uD560 \uD560 \uC77C ID")
|
|
15807
|
+
},
|
|
15808
|
+
async ({ taskId }) => {
|
|
15809
|
+
try {
|
|
15810
|
+
await deleteTask(taskId);
|
|
15811
|
+
return {
|
|
15812
|
+
content: [{ type: "text", text: JSON.stringify({ success: true, taskId, message: "Task deleted" }) }]
|
|
15813
|
+
};
|
|
15814
|
+
} catch (err) {
|
|
15815
|
+
const error48 = err;
|
|
15816
|
+
return {
|
|
15817
|
+
content: [{ type: "text", text: `Error: ${error48.message}` }],
|
|
15818
|
+
isError: true
|
|
15819
|
+
};
|
|
15820
|
+
}
|
|
15821
|
+
}
|
|
15822
|
+
);
|
|
15126
15823
|
server.tool(
|
|
15127
15824
|
"nworks_whoami",
|
|
15128
15825
|
"\uD604\uC7AC \uC778\uC99D\uB41C NAVER WORKS \uACC4\uC815 \uC815\uBCF4\uB97C \uD655\uC778\uD569\uB2C8\uB2E4",
|
|
@@ -15164,7 +15861,7 @@ async function startMcpServer() {
|
|
|
15164
15861
|
}
|
|
15165
15862
|
|
|
15166
15863
|
// src/commands/mcp-cmd.ts
|
|
15167
|
-
var mcpCommand = new
|
|
15864
|
+
var mcpCommand = new Command10("mcp").description("Start MCP server (stdio transport)").option("--list-tools", "List available MCP tools").action(async (opts) => {
|
|
15168
15865
|
if (opts.listTools) {
|
|
15169
15866
|
console.log("nworks_message_send \u2014 Send message to user or channel");
|
|
15170
15867
|
console.log("nworks_message_members \u2014 List channel members");
|
|
@@ -15179,7 +15876,7 @@ var mcpCommand = new Command8("mcp").description("Start MCP server (stdio transp
|
|
|
15179
15876
|
// src/index.ts
|
|
15180
15877
|
var require2 = createRequire(import.meta.url);
|
|
15181
15878
|
var { version: version2 } = require2("../package.json");
|
|
15182
|
-
var program = new
|
|
15879
|
+
var program = new Command11().name("nworks").description("NAVER WORKS CLI \u2014 built for humans and AI agents").version(version2).option("--json", "Always output JSON").option("-v, --verbose", "Debug logging").option("--dry-run", "Print request without calling API").option("-p, --profile <name>", "Profile name", "default");
|
|
15183
15880
|
program.addCommand(loginCommand);
|
|
15184
15881
|
program.addCommand(logoutCommand);
|
|
15185
15882
|
program.addCommand(whoamiCommand);
|
|
@@ -15187,6 +15884,8 @@ program.addCommand(messageCommand);
|
|
|
15187
15884
|
program.addCommand(directoryCommand);
|
|
15188
15885
|
program.addCommand(calendarCommand);
|
|
15189
15886
|
program.addCommand(driveCommand);
|
|
15887
|
+
program.addCommand(mailCommand);
|
|
15888
|
+
program.addCommand(taskCommand);
|
|
15190
15889
|
program.addCommand(mcpCommand);
|
|
15191
15890
|
program.parse();
|
|
15192
15891
|
//# sourceMappingURL=index.js.map
|