@hua-labs/tap 0.2.5 → 0.2.6

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.
@@ -21730,9 +21730,14 @@ mcp.setRequestHandler(ListToolsRequestSchema, async () => ({
21730
21730
  description: "Markdown message content."
21731
21731
  },
21732
21732
  cc: {
21733
- type: "array",
21734
- items: { type: "string" },
21735
- description: "Optional CC recipients. Each receives a copy of the message."
21733
+ description: "Optional CC recipients. Each receives a copy of the message. Pass a single string or an array of strings.",
21734
+ oneOf: [
21735
+ { type: "string" },
21736
+ {
21737
+ type: "array",
21738
+ items: { type: "string" }
21739
+ }
21740
+ ]
21736
21741
  }
21737
21742
  },
21738
21743
  required: ["to", "subject", "content"]
@@ -22039,7 +22044,13 @@ Recent active names: ${activeList}`;
22039
22044
  return { content: [{ type: "text", text }] };
22040
22045
  }
22041
22046
  if (req.params.name === "tap_reply") {
22042
- const { to, subject, content, cc } = req.params.arguments;
22047
+ const {
22048
+ to,
22049
+ subject,
22050
+ content,
22051
+ cc: rawCc
22052
+ } = req.params.arguments;
22053
+ const cc = rawCc == null ? void 0 : Array.isArray(rawCc) ? rawCc : [rawCc];
22043
22054
  const broadcastNames = /* @__PURE__ */ new Set(["\uC804\uCCB4", "all"]);
22044
22055
  const recipientWarnings = [];
22045
22056
  const store = loadHeartbeats();
@@ -22354,7 +22365,10 @@ ${content}`,
22354
22365
  if (!commsDir) {
22355
22366
  return {
22356
22367
  content: [
22357
- { type: "text", text: "TAP_COMMS_DIR not set. Cannot load onboarding docs." }
22368
+ {
22369
+ type: "text",
22370
+ text: "TAP_COMMS_DIR not set. Cannot load onboarding docs."
22371
+ }
22358
22372
  ]
22359
22373
  };
22360
22374
  }
@@ -22378,12 +22392,17 @@ ${content}`,
22378
22392
  if (!existsSync6(onboardingDir)) {
22379
22393
  return {
22380
22394
  content: [
22381
- { type: "text", text: "No onboarding directory found at " + onboardingDir }
22395
+ {
22396
+ type: "text",
22397
+ text: "No onboarding directory found at " + onboardingDir
22398
+ }
22382
22399
  ]
22383
22400
  };
22384
22401
  }
22385
22402
  const docs = [];
22386
- const allFiles = readdirSync5(onboardingDir).filter((f) => f.endsWith(".md"));
22403
+ const allFiles = readdirSync5(onboardingDir).filter(
22404
+ (f) => f.endsWith(".md")
22405
+ );
22387
22406
  const files = [
22388
22407
  ...allFiles.filter((f) => f === "welcome.md"),
22389
22408
  ...allFiles.filter((f) => f !== "welcome.md").sort()
@@ -22402,23 +22421,23 @@ ${content}`);
22402
22421
  }
22403
22422
  if (docs.length === 0) {
22404
22423
  return {
22405
- content: [
22406
- { type: "text", text: "Onboarding directory is empty." }
22407
- ]
22424
+ content: [{ type: "text", text: "Onboarding directory is empty." }]
22408
22425
  };
22409
22426
  }
22410
22427
  if (markerPath && !alreadyOnboarded) {
22411
22428
  try {
22412
22429
  markerStore[agentId] = { onboardedAt: (/* @__PURE__ */ new Date()).toISOString() };
22413
- writeFileSync2(markerPath, JSON.stringify(markerStore, null, 2), "utf-8");
22430
+ writeFileSync2(
22431
+ markerPath,
22432
+ JSON.stringify(markerStore, null, 2),
22433
+ "utf-8"
22434
+ );
22414
22435
  } catch {
22415
22436
  }
22416
22437
  }
22417
22438
  const prefix = alreadyOnboarded ? "(You have already been onboarded. Showing docs again for reference.)\n\n" : "";
22418
22439
  return {
22419
- content: [
22420
- { type: "text", text: prefix + docs.join("\n\n---\n\n") }
22421
- ]
22440
+ content: [{ type: "text", text: prefix + docs.join("\n\n---\n\n") }]
22422
22441
  };
22423
22442
  }
22424
22443
  throw new Error(`unknown tool: ${req.params.name}`);