@toon-protocol/client-mcp 0.13.2 → 0.14.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.
@@ -16,7 +16,7 @@ import {
16
16
  isEventExpired,
17
17
  parseIlpPeerInfo,
18
18
  readConfigFile
19
- } from "./chunk-UXCFHAUC.js";
19
+ } from "./chunk-P7YF72JB.js";
20
20
  import {
21
21
  __require
22
22
  } from "./chunk-F22GNSF6.js";
@@ -367,24 +367,57 @@ var STATUS_APPLIED_KIND = 1631;
367
367
  var STATUS_CLOSED_KIND = 1632;
368
368
  var STATUS_DRAFT_KIND = 1633;
369
369
 
370
+ // ../rig/dist/chunk-X2CZPPDM.js
371
+ var MAX_OBJECT_SIZE = 95 * 1024;
372
+
370
373
  // ../../node_modules/.pnpm/@toon-protocol+core@2.0.1_typescript@5.9.3/node_modules/@toon-protocol/core/dist/nip34/index.js
371
374
  var REPOSITORY_ANNOUNCEMENT_KIND2 = 30617;
372
375
  var PATCH_KIND = 1617;
373
376
  var ISSUE_KIND = 1621;
374
377
 
375
- // ../rig/dist/chunk-JBB7HBQC.js
378
+ // ../rig/dist/chunk-3HRFDH7H.js
376
379
  import { decode as decodeToon } from "@toon-format/toon";
377
380
  var REPOSITORY_STATE_KIND = 30618;
378
381
  var COMMENT_KIND = 1622;
379
- function buildRepoAnnouncement(repoId, name, description) {
382
+ var MAINTAINERS_TAG = "maintainers";
383
+ var HEX64 = /^[0-9a-f]{64}$/;
384
+ function parseMaintainers(tags) {
385
+ const out = [];
386
+ const seen = /* @__PURE__ */ new Set();
387
+ for (const tag of tags) {
388
+ if (tag[0] !== MAINTAINERS_TAG) continue;
389
+ for (const value of tag.slice(1)) {
390
+ const hex = value.toLowerCase();
391
+ if (HEX64.test(hex) && !seen.has(hex)) {
392
+ seen.add(hex);
393
+ out.push(hex);
394
+ }
395
+ }
396
+ }
397
+ return out;
398
+ }
399
+ function buildRepoAnnouncement(repoId, name, description, maintainers = []) {
400
+ const tags = [
401
+ ["d", repoId],
402
+ ["name", name],
403
+ ["description", description]
404
+ ];
405
+ const declared = [];
406
+ const seen = /* @__PURE__ */ new Set();
407
+ for (const value of maintainers) {
408
+ const hex = value.toLowerCase();
409
+ if (HEX64.test(hex) && !seen.has(hex)) {
410
+ seen.add(hex);
411
+ declared.push(hex);
412
+ }
413
+ }
414
+ if (declared.length > 0) {
415
+ tags.push([MAINTAINERS_TAG, ...declared]);
416
+ }
380
417
  return {
381
418
  kind: REPOSITORY_ANNOUNCEMENT_KIND2,
382
419
  content: "",
383
- tags: [
384
- ["d", repoId],
385
- ["name", name],
386
- ["description", description]
387
- ],
420
+ tags,
388
421
  created_at: Math.floor(Date.now() / 1e3)
389
422
  };
390
423
  }
@@ -761,6 +794,7 @@ async function fetchRemoteState(options) {
761
794
  }
762
795
  }
763
796
  }
797
+ const maintainers = announceEvent ? parseMaintainers(announceEvent.tags) : [];
764
798
  const resolveMissing = async (shas) => {
765
799
  const resolved = /* @__PURE__ */ new Map();
766
800
  const missing = [];
@@ -792,14 +826,12 @@ async function fetchRemoteState(options) {
792
826
  name,
793
827
  description,
794
828
  relays,
829
+ maintainers,
795
830
  resolveMissing
796
831
  };
797
832
  }
798
833
 
799
- // ../rig/dist/chunk-X2CZPPDM.js
800
- var MAX_OBJECT_SIZE = 95 * 1024;
801
-
802
- // ../rig/dist/chunk-PS5QOT62.js
834
+ // ../rig/dist/chunk-PTXKCR5R.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-XAPHWDHP.js.map