@toon-protocol/client-mcp 0.13.2 → 0.14.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.
@@ -372,19 +372,49 @@ var REPOSITORY_ANNOUNCEMENT_KIND2 = 30617;
372
372
  var PATCH_KIND = 1617;
373
373
  var ISSUE_KIND = 1621;
374
374
 
375
- // ../rig/dist/chunk-JBB7HBQC.js
375
+ // ../rig/dist/chunk-3HRFDH7H.js
376
376
  import { decode as decodeToon } from "@toon-format/toon";
377
377
  var REPOSITORY_STATE_KIND = 30618;
378
378
  var COMMENT_KIND = 1622;
379
- function buildRepoAnnouncement(repoId, name, description) {
379
+ var MAINTAINERS_TAG = "maintainers";
380
+ var HEX64 = /^[0-9a-f]{64}$/;
381
+ function parseMaintainers(tags) {
382
+ const out = [];
383
+ const seen = /* @__PURE__ */ new Set();
384
+ for (const tag of tags) {
385
+ if (tag[0] !== MAINTAINERS_TAG) continue;
386
+ for (const value of tag.slice(1)) {
387
+ const hex = value.toLowerCase();
388
+ if (HEX64.test(hex) && !seen.has(hex)) {
389
+ seen.add(hex);
390
+ out.push(hex);
391
+ }
392
+ }
393
+ }
394
+ return out;
395
+ }
396
+ function buildRepoAnnouncement(repoId, name, description, maintainers = []) {
397
+ const tags = [
398
+ ["d", repoId],
399
+ ["name", name],
400
+ ["description", description]
401
+ ];
402
+ const declared = [];
403
+ const seen = /* @__PURE__ */ new Set();
404
+ for (const value of maintainers) {
405
+ const hex = value.toLowerCase();
406
+ if (HEX64.test(hex) && !seen.has(hex)) {
407
+ seen.add(hex);
408
+ declared.push(hex);
409
+ }
410
+ }
411
+ if (declared.length > 0) {
412
+ tags.push([MAINTAINERS_TAG, ...declared]);
413
+ }
380
414
  return {
381
415
  kind: REPOSITORY_ANNOUNCEMENT_KIND2,
382
416
  content: "",
383
- tags: [
384
- ["d", repoId],
385
- ["name", name],
386
- ["description", description]
387
- ],
417
+ tags,
388
418
  created_at: Math.floor(Date.now() / 1e3)
389
419
  };
390
420
  }
@@ -761,6 +791,7 @@ async function fetchRemoteState(options) {
761
791
  }
762
792
  }
763
793
  }
794
+ const maintainers = announceEvent ? parseMaintainers(announceEvent.tags) : [];
764
795
  const resolveMissing = async (shas) => {
765
796
  const resolved = /* @__PURE__ */ new Map();
766
797
  const missing = [];
@@ -792,6 +823,7 @@ async function fetchRemoteState(options) {
792
823
  name,
793
824
  description,
794
825
  relays,
826
+ maintainers,
795
827
  resolveMissing
796
828
  };
797
829
  }
@@ -799,7 +831,7 @@ async function fetchRemoteState(options) {
799
831
  // ../rig/dist/chunk-X2CZPPDM.js
800
832
  var MAX_OBJECT_SIZE = 95 * 1024;
801
833
 
802
- // ../rig/dist/chunk-PS5QOT62.js
834
+ // ../rig/dist/chunk-W2SDL2PE.js
803
835
  import { execFile, spawn } from "child_process";
804
836
  import { promisify } from "util";
805
837
  import { execFile as execFile2, spawn as spawn2 } from "child_process";
@@ -4328,4 +4360,4 @@ export {
4328
4360
  PublishRejectedError,
4329
4361
  registerRoutes
4330
4362
  };
4331
- //# sourceMappingURL=chunk-BINI3PEC.js.map
4363
+ //# sourceMappingURL=chunk-JCQENRQK.js.map