{"version":3,"file":"fastkv.cjs","names":["fetchRaw","fetchJsonOrNull","Context","Layer"],"sources":["../../../src/services/registry/fastkv.ts"],"sourcesContent":["import { Context, Layer } from \"effect\";\n\nexport type NetworkId = \"mainnet\" | \"testnet\";\n\ninterface FastKvEntry {\n  value: unknown;\n}\n\ninterface FastKvListResponse {\n  entries?: Array<FastKvEntry | null>;\n}\n\nimport { fetchJsonOrNull, fetchRaw } from \"../../utils/http-client\";\n\nfunction getNetworkIdForAccount(accountId: string): NetworkId {\n  return accountId.endsWith(\".testnet\") ? \"testnet\" : \"mainnet\";\n}\n\nconst FASTKV_TESTNET_URL = \"https://kv.test.fastnear.com\";\nconst FASTKV_MAINNET_URL = \"https://kv.main.fastnear.com\";\nconst REGISTRY_NAMESPACE_TESTNET = \"dev.allthethings.testnet\";\nconst REGISTRY_NAMESPACE_MAINNET = \"dev.everything.near\";\n\nexport function getFastKvBaseUrlForNetwork(network: NetworkId): string {\n  return network === \"testnet\" ? FASTKV_TESTNET_URL : FASTKV_MAINNET_URL;\n}\n\nfunction getFastKvBaseUrlForAccount(accountId: string): string {\n  return getNetworkIdForAccount(accountId) === \"testnet\"\n    ? getFastKvBaseUrlForNetwork(\"testnet\")\n    : getFastKvBaseUrlForNetwork(\"mainnet\");\n}\n\nexport function buildRegistryConfigUrl(\n  accountId: string,\n  gatewayId: string,\n  registry?: string,\n): string {\n  const baseUrl = getFastKvBaseUrlForAccount(accountId);\n  const namespace = getRegistryNamespaceForAccount(accountId, registry);\n  const key = encodeURIComponent(getRegistryConfigKey(accountId, gatewayId));\n  return `${baseUrl}/v0/latest/${encodeURIComponent(namespace)}/${encodeURIComponent(accountId)}/${key}`;\n}\n\nexport function buildRegistryConfigUrlForNetwork(\n  network: NetworkId,\n  accountId: string,\n  gatewayId: string,\n  registry?: string,\n): string {\n  const baseUrl = getFastKvBaseUrlForNetwork(network);\n  const namespace = getRegistryNamespaceForNetwork(network, registry);\n  const key = encodeURIComponent(getRegistryConfigKey(accountId, gatewayId));\n  return `${baseUrl}/v0/latest/${encodeURIComponent(namespace)}/${encodeURIComponent(accountId)}/${key}`;\n}\n\nexport function getRegistryNamespaceForAccount(accountId: string, registry?: string): string {\n  return registry ?? getRegistryNamespaceForNetwork(getNetworkIdForAccount(accountId));\n}\n\nexport function getRegistryNamespaceForNetwork(network: NetworkId, registry?: string): string {\n  if (registry) return registry;\n  return network === \"testnet\" ? REGISTRY_NAMESPACE_TESTNET : REGISTRY_NAMESPACE_MAINNET;\n}\n\nfunction getRegistryConfigKey(\n  accountId: string,\n  gatewayId: string,\n  pathSegments: string[] = [],\n): string {\n  const suffix =\n    pathSegments.length > 0\n      ? `/${pathSegments.map((segment) => encodeURIComponent(segment)).join(\"/\")}`\n      : \"\";\n  return `apps/${accountId}/${gatewayId}${suffix}/bos.config.json`;\n}\n\nexport function parseBosUrl(bosUrl: string): {\n  accountId: string;\n  gatewayId: string;\n  pathSegments: string[];\n} {\n  const strippedUrl = bosUrl.split(\"#\")[0]!;\n  const match = strippedUrl.match(/^bos:\\/\\/([^/]+)\\/(.+)$/);\n  if (!match?.[1] || !match[2]) {\n    throw new Error(`Invalid BOS URL: ${bosUrl}`);\n  }\n\n  const pathSegments = match[2]\n    .split(\"/\")\n    .filter(Boolean)\n    .map((segment) => decodeURIComponent(segment));\n  if (pathSegments.length === 0) {\n    throw new Error(`Invalid BOS URL: ${bosUrl}`);\n  }\n\n  const [gatewayId, ...pathSegmentsTail] = pathSegments;\n  if (!gatewayId) {\n    throw new Error(`Invalid BOS URL: ${bosUrl}`);\n  }\n\n  return {\n    accountId: match[1],\n    gatewayId,\n    pathSegments: pathSegmentsTail,\n  };\n}\n\nexport async function fetchBosConfigFromFastKv<T>(bosUrl: string, registry?: string): Promise<T> {\n  const { accountId, gatewayId, pathSegments } = parseBosUrl(bosUrl);\n  const key = encodeURIComponent(getRegistryConfigKey(accountId, gatewayId, pathSegments));\n  const payload = await fetchJson<FastKvListResponse>(\n    `${getFastKvBaseUrlForAccount(accountId)}/v0/latest/${encodeURIComponent(getRegistryNamespaceForAccount(accountId, registry))}/${encodeURIComponent(accountId)}/${key}`,\n  );\n  return parseFastKvConfigValue<T>(payload, bosUrl);\n}\n\n/**\n * Read an arbitrary registry key under `apps/<account>/<gateway>/` — the\n * well-known-slot seam (ADR 0034's `platform.json` lives beside the config).\n * Absent key (404) → null; a network failure throws so callers can distinguish\n * \"the slot is empty\" from \"the slot is unreachable\" (a swallowed error here\n * would silently tighten a compat floor).\n */\nexport async function fetchRegistryKey<T>(\n  accountId: string,\n  gatewayId: string,\n  keyPath: string,\n  registry?: string,\n): Promise<T | null> {\n  const key = encodeURIComponent(`apps/${accountId}/${gatewayId}/${keyPath}`);\n  const payload = await fetchJson<FastKvListResponse>(\n    `${getFastKvBaseUrlForAccount(accountId)}/v0/latest/${encodeURIComponent(getRegistryNamespaceForAccount(accountId, registry))}/${encodeURIComponent(accountId)}/${key}`,\n  );\n  const value = payload?.entries?.find(Boolean)?.value;\n  if (!value) return null;\n  if (typeof value === \"string\") return JSON.parse(value) as T;\n  return value as T;\n}\n\n/** Tolerant variant of {@link fetchRegistryKey} — any failure collapses to null. */\nexport async function fetchRegistryKeyOrNull<T>(\n  accountId: string,\n  gatewayId: string,\n  keyPath: string,\n  registry?: string,\n): Promise<T | null> {\n  try {\n    return await fetchRegistryKey<T>(accountId, gatewayId, keyPath, registry);\n  } catch {\n    return null;\n  }\n}\n\n/** Read a published config from an already-built registry URL\n * (`buildRegistryConfigUrlForNetwork`). Unlike {@link fetchBosConfigFromFastKv}\n * this takes the URL directly, so the read key is exactly the one the publish\n * writes, and a network failure is reported as such instead of collapsing\n * into \"No config found\" (fetchJsonOrNull swallows errors into null). */\nexport async function fetchPublishedConfigFromFastKv<T>(url: string): Promise<T> {\n  const response = await fetchRaw(url, { headers: { accept: \"application/json\" } });\n  if (!response.ok) {\n    if (response.status === 404) {\n      throw new Error(`No config found for ${url}`);\n    }\n    throw new Error(`HTTP ${response.status} fetching ${url}`);\n  }\n  const payload = (await response.json()) as FastKvListResponse | null;\n  return parseFastKvConfigValue<T>(payload, url);\n}\n\nexport function parseFastKvConfigValue<T>(payload: FastKvListResponse | null, label: string): T {\n  const value = payload?.entries?.find(Boolean)?.value;\n  if (!value) {\n    throw new Error(`No config found for ${label}`);\n  }\n  if (typeof value === \"string\") {\n    return JSON.parse(value) as T;\n  }\n  if (typeof value !== \"object\") {\n    throw new Error(`Invalid config value for ${label}`);\n  }\n  return value as T;\n}\n\nexport interface ConfigHistoryEntry {\n  blockHeight: number;\n  blockTimestampNs: string;\n  txHash?: string;\n  value: unknown;\n}\n\ninterface FastKvHistoryEntry {\n  block_height?: number;\n  block_timestamp?: string | number;\n  tx_hash?: string;\n  value?: unknown;\n}\n\ninterface FastKvHistoryResponse {\n  entries?: Array<FastKvHistoryEntry | null>;\n}\n\nconst FASTKV_HISTORY_MAX_LIMIT = 200;\n\n/**\n * Publish history for the registry config key (atomic-deploys 11): the\n * exact-key variant of FastData's history endpoint, newest-first. The API\n * caps a page at 200 rows; a config key's write history fits well inside\n * that, so a single request is the whole story (the limit param is clamped).\n */\nexport async function fetchConfigHistory(opts: {\n  accountId: string;\n  gatewayId: string;\n  registry?: string;\n  limit?: number;\n}): Promise<ConfigHistoryEntry[]> {\n  const key = encodeURIComponent(getRegistryConfigKey(opts.accountId, opts.gatewayId));\n  const limit = Math.max(1, Math.min(opts.limit ?? 20, FASTKV_HISTORY_MAX_LIMIT));\n  const url = `${getFastKvBaseUrlForAccount(opts.accountId)}/v0/history/${encodeURIComponent(getRegistryNamespaceForAccount(opts.accountId, opts.registry))}/${encodeURIComponent(opts.accountId)}/${key}?limit=${limit}`;\n  const payload = await fetchJson<FastKvHistoryResponse>(url);\n  const entries = (payload?.entries ?? []).filter(Boolean) as FastKvHistoryEntry[];\n\n  return entries\n    .map((entry) => ({\n      blockHeight: entry.block_height ?? 0,\n      blockTimestampNs: String(entry.block_timestamp ?? \"\"),\n      ...(entry.tx_hash ? { txHash: entry.tx_hash } : {}),\n      value:\n        typeof entry.value === \"string\" && entry.value.length > 0\n          ? (JSON.parse(entry.value) as unknown)\n          : entry.value,\n    }))\n    .sort((a, b) => b.blockHeight - a.blockHeight);\n}\n\nexport interface DeployManifestEntry {\n  key: string;\n  blockHeight: number;\n  blockTimestampNs: string;\n  value: unknown;\n}\n\n/**\n * The per-deploy audit trail (atomic-deploys 03/12): every publish writes\n * `apps/<account>/<gateway>/manifests/<ts>.json` atomically with the pointer\n * swap — this lists that key family newest-first via the history-by-prefix\n * endpoint.\n */\nexport async function fetchDeployManifests(opts: {\n  accountId: string;\n  gatewayId: string;\n  registry?: string;\n  limit?: number;\n}): Promise<DeployManifestEntry[]> {\n  const keyPrefix = encodeURIComponent(\n    `${getRegistryConfigKey(opts.accountId, opts.gatewayId).replace(/bos\\.config\\.json$/, \"\")}manifests/`,\n  );\n  const url = `${getFastKvBaseUrlForAccount(opts.accountId)}/v0/history/${encodeURIComponent(getRegistryNamespaceForAccount(opts.accountId, opts.registry))}/${encodeURIComponent(opts.accountId)}`;\n  const payload = await fetchJson<FastKvHistoryResponse>(url, {\n    method: \"POST\",\n    body: JSON.stringify({\n      key_prefix: decodeURIComponent(keyPrefix),\n      asc: false,\n      limit: Math.max(1, Math.min(opts.limit ?? 20, FASTKV_HISTORY_MAX_LIMIT)),\n    }),\n  });\n  const entries = (payload?.entries ?? []).filter(Boolean) as Array<\n    FastKvHistoryEntry & { key?: string }\n  >;\n\n  return entries\n    .map((entry) => ({\n      key: entry.key ?? \"\",\n      blockHeight: entry.block_height ?? 0,\n      blockTimestampNs: String(entry.block_timestamp ?? \"\"),\n      value:\n        typeof entry.value === \"string\" && entry.value.length > 0\n          ? (JSON.parse(entry.value) as unknown)\n          : entry.value,\n    }))\n    .sort((a, b) => b.blockHeight - a.blockHeight);\n}\n\nexport interface PluginManifest {\n  schemaVersion: number;\n  kind: string;\n  plugin: { name: string; version: string };\n  runtime: { remoteEntry: string };\n  contract: {\n    kind: string;\n    types: { path: string; exportName: string; typeName: string; sha256: string };\n  };\n  additionalExports?: Array<{ path: string; exports: string[]; sha256: string }>;\n}\n\nexport async function fetchRemotePluginManifest(cdnUrl: string): Promise<PluginManifest | null> {\n  const baseUrl = cdnUrl.replace(/\\/$/, \"\");\n  return fetchJsonOrNull<PluginManifest>(`${baseUrl}/plugin.manifest.json`, { retries: 2 });\n}\n\nasync function fetchJson<T>(url: string, init?: RequestInit): Promise<T | null> {\n  const headers: Record<string, string> = {\n    accept: \"application/json\",\n    \"content-type\": \"application/json\",\n    ...(init?.headers as Record<string, string> | undefined),\n  };\n  return fetchJsonOrNull<T>(url, {\n    method: init?.method,\n    headers,\n    body: init?.body ?? undefined,\n    retries: 3,\n  });\n}\n\n/**\n * The FastKV registry as a Context.Service (#425): reads (config, published\n * config, history, deploy manifests) and the bos:// URL algebra behind one\n * tag. The registry WRITE is a signing concern — it rides the signer\n * services (#423), not this tag. Callers may keep using the plain\n * functions — the module is the implementation; the tag is the seam.\n */\nexport class FastKVRegistryService extends Context.Service<\n  FastKVRegistryService,\n  {\n    fetchBosConfigFromFastKv: typeof fetchBosConfigFromFastKv;\n    fetchPublishedConfigFromFastKv: typeof fetchPublishedConfigFromFastKv;\n    fetchConfigHistory: typeof fetchConfigHistory;\n    fetchDeployManifests: typeof fetchDeployManifests;\n  }\n>()(\"everything-dev/registry/fastkv\") {\n  static readonly Live = Layer.succeed(\n    this,\n    this.of({\n      fetchBosConfigFromFastKv,\n      fetchPublishedConfigFromFastKv,\n      fetchConfigHistory,\n      fetchDeployManifests,\n    }),\n  );\n}\n"],"mappings":";;;;;AAcA,SAAS,uBAAuB,WAA8B;CAC5D,OAAO,UAAU,SAAS,UAAU,IAAI,YAAY;AACtD;AAEA,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,MAAM,6BAA6B;AACnC,MAAM,6BAA6B;AAEnC,SAAgB,2BAA2B,SAA4B;CACrE,OAAO,YAAY,YAAY,qBAAqB;AACtD;AAEA,SAAS,2BAA2B,WAA2B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