+ @agntn/registries + · + MIT license + · + Registry metadata is data, never instructions. +
+ diff --git a/docs/app/components/AppHeaderCTA.vue b/docs/app/components/AppHeaderCTA.vue new file mode 100644 index 0000000..dce89a6 --- /dev/null +++ b/docs/app/components/AppHeaderCTA.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/docs/app/components/AppHeaderLogo.vue b/docs/app/components/AppHeaderLogo.vue new file mode 100644 index 0000000..61beb19 --- /dev/null +++ b/docs/app/components/AppHeaderLogo.vue @@ -0,0 +1,10 @@ + + + + + @agntn/registries + v{{ version }} + + diff --git a/docs/app/components/DocsAsideLeftBody.vue b/docs/app/components/DocsAsideLeftBody.vue new file mode 100644 index 0000000..8a17ecb --- /dev/null +++ b/docs/app/components/DocsAsideLeftBody.vue @@ -0,0 +1,16 @@ + + + ++ {{ headline || "Guide" }} +
+{{ siteName }}
++ {{ description.slice(0, 160) }} +
+registries.agntn.dev
+{{ siteName }}
++ {{ TAGLINE }} +
+registries.agntn.dev
+{{ eyebrow }}
+
+
+ One TypeScript interface over npm, PyPI, crates.io, RubyGems, Packagist and Arch Linux. + Package, versions, dependencies and maintainers come back in the same shape, from a CLI, + a library call, or an AI SDK tool. +
+Package. The panel cycles through
+ {{ samples.length }} packages and swaps each recorded sample for the docs worker's live answer.
+
+ packageTool from the
+ /ai subpath is a Vercel AI SDK
+ tool that needs no wiring. Hand it to a model and it resolves any PURL it is asked about, with the
+ same normalized answer the CLI prints.
+
+ + Pre-1.0. Pin exact versions, and treat registry metadata as data you did not write. +
+
+ await
+ fetchPackageFromPURL("
{{ pkg.description || "No description on the registry." }}
+import { fetchPackageFromPURL } from "@agntn/registries";
+
+const pkg = await fetchPackageFromPURL("{{ sample.purl }} ");
+
+pkg.latestVersion; // "{{ sample.package.latestVersion }} "
+pkg.licenses; // "{{ licenses }} "
+pkg.repository; // "{{ sample.package.repository || "" }} "
+
+// same shape from {{ info?.className ?? sample.ecosystem }} as from every other adapter
+ + tool + packageTool +
+@agntn/registries/ai · Vercel AI SDK
+input
+{
+ "operation": "package",
+ "purl": "{{ sample.purl }} "
+}
+ output
+{
+ "name": "{{ sample.package.name }}",
+ "namespace": "{{ sample.package.namespace }}",
+ "latestVersion": "{{ sample.package.latestVersion }}",
+ "licenses": "{{ sample.package.licenses }}",
+ "repository": "{{ sample.package.repository }}",
+ "keywords": {{ keywords }},
+ …
+}
+
+ $
+ registries versions
{{ sample.versionsTotal }} total
+| version | published | licenses | status |
|---|---|---|---|
| {{ version.number }} | +{{ dateOnly(version.publishedAt) || "none" }} | +{{ version.licenses || "none" }} | +{{ version.status || "ok" }} | +
+ {{ sample.dependenciesTotal }} dependencies at {{ sample.package.latestVersion }} + · + {{ sample.maintainersTotal }} maintainers +
+
+
{{ state.error }}
+
+ {{ state.package.package.description || "No description on the registry." }}
+{{ JSON.stringify(state.package.package.metadata, null, 2) }}
+ {{ pluralize(state.versions.total, "version") }}, newest first
+showing {{ state.versions.versions.length }}
+| version | published | licenses | integrity | status |
|---|---|---|---|---|
| {{ version.number }} | +{{ dateOnly(version.publishedAt) || "none" }} | +{{ version.licenses || "none" }} | +{{ version.integrity ? shortValue(version.integrity, 24) : "none" }} | +{{ version.status || "ok" }} | +
+ {{ pluralize(state.dependencies.dependencies.length, "dependency", "dependencies") }} at + {{ state.dependencies.version }} +
+no version in the PURL, latest used
+This version declares no dependencies.
+{{ scope }} · {{ rows.length }}
+| {{ dependency.name }} | +{{ dependency.requirements || "*" }} | +optional | +
{{ pluralize(state.maintainers.maintainers.length, "maintainer") }}
+The registry lists nobody for this package.
+| name | login | role | link |
|---|---|---|---|
| {{ maintainer.name || maintainer.login || "unknown" }} | +{{ maintainer.login || "none" }} | +{{ maintainer.role }}none | +{{ bareUrl(maintainer.url) }}none | +
{{ eyebrow }}
++ {{ description }} +
+
+
>!h%eRnJCE@0H@8zPWO{S6;+Q~tO! ys&%M}8vUbk;biuXqm;IHO>`Ay}((RTN~n#kP3`ooaEHuRn4B_-5~59$Y>
z^|%Kb3pHU7Fcy3~k!k1{A`C4FB1;jB<1;aEMgx_c~1=_Irj(s#lVo6DANOmqv{$I>rRBrJQVydA}fkNmX
zS57w0i&7;rU;ZzY29!Wr9>$3&3~vIclrf