@appsoftwareltd/etherpk-mcp 0.9.4 → 0.9.5

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/dist/main.js CHANGED
@@ -629,6 +629,21 @@ function assetChunkCount(size) {
629
629
  }
630
630
  var DAY = 864e5;
631
631
  365 * DAY, 30 * DAY, 7 * DAY;
632
+ /** Whether `text` is a short link a Sync Server opens: one of Google's share links. */
633
+ function isShortMapLink(text) {
634
+ let url;
635
+ try {
636
+ url = new URL(text.trim());
637
+ } catch {
638
+ return false;
639
+ }
640
+ if (url.protocol !== "https:" || url.username !== "" || url.password !== "" || url.port !== "") return false;
641
+ const host = url.hostname.toLowerCase();
642
+ if (host === "maps.app.goo.gl") return /^\/[A-Za-z0-9_-]+\/?$/.test(url.pathname);
643
+ if (host === "goo.gl") return /^\/maps\/[A-Za-z0-9_-]+\/?$/.test(url.pathname);
644
+ return false;
645
+ }
646
+ z.strictObject({ url: z.string().trim().max(200).refine(isShortMapLink, "not a short map link") });
632
647
  var latitude = z.number().min(-90).max(90);
633
648
  var longitude = z.number().min(-180).max(180);
634
649
  z.strictObject({
@@ -641,6 +656,14 @@ z.strictObject({
641
656
  /** The reader's language, two letters, for the names of places. */
642
657
  lang: z.string().regex(/^[a-z]{2}$/).optional()
643
658
  });
659
+ z.strictObject({
660
+ point: z.strictObject({
661
+ lat: latitude,
662
+ lon: longitude
663
+ }),
664
+ /** The reader's language, two letters, for the name of the place. */
665
+ lang: z.string().regex(/^[a-z]{2}$/).optional()
666
+ });
644
667
  /** A place's address fields, as Photon names them. Anything else a service sends is dropped. */
645
668
  var placeProperties = z.object({
646
669
  name: z.string().optional(),
@@ -694,7 +717,7 @@ function looksLikeAgentSetupCode(value) {
694
717
  }
695
718
  var package_default = {
696
719
  name: "@appsoftwareltd/etherpk-mcp",
697
- version: "0.9.4",
720
+ version: "0.9.5",
698
721
  license: "Elastic-2.0",
699
722
  description: "EtherPK Headless Client: an MCP server over a synced knowledge graph, run beside the agent on the user's own machine.",
700
723
  type: "module",
@@ -1669,6 +1692,24 @@ function createSyncApi(deps) {
1669
1692
  body: JSON.stringify(request),
1670
1693
  signal
1671
1694
  }),
1695
+ /**
1696
+ * The place nearest a point, to offer a name for a place set down by hand (ADR 0119,
1697
+ * amendment of 2026-10-10). Answered and refused as `searchPlaces` is, with at most one place.
1698
+ */
1699
+ reversePlace: (request, signal) => call("/api/v1/sync/maps/reverse", {
1700
+ method: "POST",
1701
+ body: JSON.stringify(request),
1702
+ signal
1703
+ }),
1704
+ /**
1705
+ * The full link a short map link leads to, which a browser page cannot follow itself (ADR
1706
+ * 0119, amendment of 2026-10-10). Any signed-in account may ask.
1707
+ */
1708
+ openMapLink: (request, signal) => call("/api/v1/sync/maps/link", {
1709
+ method: "POST",
1710
+ body: JSON.stringify(request),
1711
+ signal
1712
+ }),
1672
1713
  createGraph: () => call("/api/v1/sync/graphs", { method: "POST" }),
1673
1714
  listGraphs: () => call("/api/v1/sync/graphs").then((r) => r.graphs),
1674
1715
  /** Graphs plus the owned-storage rollup (one request - same endpoint as listGraphs). */