Seed the FHIR package cache, with WHO’s published site as a source

Run fhir-harness’s fhir-cache-seed-npm with smart-base’s publisher-site rules (SMART_PUBLISHER_SITE_REPOS), so smart.who.int.* packages can also be read from WHO’s published-site repository, each fetch verified against the tarball’s own package.json. All other sources and checks are the seeder’s.

Skills it satisfies

A skill states the capability; this Tool is one way to exercise it. Each skill’s declared input and output contract follows, where it has one.

ig-publisher-fork

Requirements for an agent working a local experimental fork of the IG Publisher — which repositories, what the AST must carry, what must not change, and the acceptance criteria. Read before forking, and before reporting a fork’s work complete.

Source: fhir-harness/skills/fhir-ig-base/ig-publisher-fork.md.

Also satisfied by: fhir-cache-seed-npm, fhir-package-mirror, ig-ast-export, ig-ast-incremental-build, ig-ast-measure-real-igs, ig-ast-plan.

The skill declares no I/O contract (schemas/skills/ig-publisher-fork/{input,output}.schema.json).

Inputs and outputs

Each port names a shared type by IRI, so two Tools for one skill can be checked for interchangeability.

porttyperequireddescriptionconstraint
insushi-configFilesystemPathSeed what this IG pins: its dependencies: and the core package for its fhirVersion.string · A filesystem path, possibly outside the repository. Not admissible as a command-line argument.
incacheFilesystemPathDefault ~/.fhir/packages, which SUSHI and the IG Publisher read.string · A filesystem path, possibly outside the repository. Not admissible as a command-line argument.
outinstalledCountinteger · A non-negative count — how many of something, or how many to show. Zero is a real answer.
outmissingCountExit 1 when any is missing, each listed with why.integer · A non-negative count — how many of something, or how many to show. Zero is a real answer.

Processes and tasks

Steps this Tool can carry out, because each names a skill it satisfies:

processsteplanevia skill
An IG site, built from the AST on its cache branchBuild the IG with the AST exporterAST refresh (GitHub runner: IG Publisher with the AST exporter)ig-publisher-fork

How it is deployed and reached

  • Command line. From the repository root: bun run fhir-harness/scripts/fhir-cache-seed-npm.ts --site-repo smart.who.int.=WorldHealthOrganization/smart-html@main [--cache <dir>] [--sushi-config <file>] [--mirror <dir|git-url>] [--template-repo <name=owner/repo>] [--missing-out <file>] [--dry-run] [name#version ...].
  • GitHub Actions. 1 workflow line(s) run its command:
workflowline
fhir-harness/.github/workflows/ig-ast-refresh.yml317bun run fhir-harness/scripts/fhir-cache-seed-npm.ts --cache "$HOME/.fhir/packages" --lock "$PACKAGE_LOCK" \\

As an API: its operation in the OpenAPI document and the MCP tool list of its layer.

installnone
runtimebun, npm, git
networkyes

When a host it reaches is refused:

host / errorremedy
github.comnone: WHO’s published-site repository is read from GitHub; with it refused, only npm and --mirror remain.
when to choose it
whenSeeding the cache for a WHO SMART IG where packages.fhir.org is unreachable.
limitsThe site rule only adds a source; the seeder’s trust checks, exact-version rule and missing list are unchanged.
costAs fhir-cache-seed-npm, plus one git ls-remote and one download per smart.who.int.* package.

What it is made of

Linked data

The Tool is published as its own JSON-LD document at its IRI, http://smart.who.int/base/tools/smart-fhir-cache-seed.jsonld, partOf its layer’s document. The node below is the definition this page was drawn from, and is embedded in the page as application/ld+json.

{
  "@context": "http://smart.who.int/base/smart-base.context.jsonld",
  "@id": "http://smart.who.int/base/tools/smart-fhir-cache-seed.jsonld",
  "@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
  "partOf": "http://smart.who.int/base/smart-base.jsonld",
  "name": "smart-fhir-cache-seed",
  "title": "Seed the FHIR package cache, with WHO's published site as a source",
  "description": "Run fhir-harness's `fhir-cache-seed-npm` with smart-base's publisher-site rules (`SMART_PUBLISHER_SITE_REPOS`), so `smart.who.int.*` packages can also be read from WHO's published-site repository, each fetch verified against the tarball's own package.json. All other sources and checks are the seeder's.",
  "install": {
    "none": true
  },
  "invoke": {
    "shell": "bun run fhir-harness/scripts/fhir-cache-seed-npm.ts --site-repo smart.who.int.=WorldHealthOrganization/smart-html@main [--cache <dir>] [--sushi-config <file>] [--mirror <dir|git-url>] [--template-repo <name=owner/repo>] [--missing-out <file>] [--dry-run] [name#version ...]"
  },
  "io": {
    "inputs": [
      {
        "name": "sushi-config",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/FilesystemPath",
        "description": "Seed what this IG pins: its `dependencies:` and the core package for its `fhirVersion`.",
        "required": false
      },
      {
        "name": "cache",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/FilesystemPath",
        "description": "Default `~/.fhir/packages`, which SUSHI and the IG Publisher read.",
        "required": false
      }
    ],
    "outputs": [
      {
        "name": "installed",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Count"
      },
      {
        "name": "missing",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Count",
        "description": "Exit 1 when any is missing, each listed with why."
      }
    ]
  },
  "satisfies": [
    "ig-publisher-fork"
  ],
  "requirements": {
    "runtime": [
      "bun",
      "npm",
      "git"
    ],
    "network": true
  },
  "remedies": [
    {
      "host": "github.com",
      "none": "WHO's published-site repository is read from GitHub; with it refused, only npm and `--mirror` remain."
    }
  ],
  "selection": {
    "when": "Seeding the cache for a WHO SMART IG where packages.fhir.org is unreachable.",
    "limits": "The site rule only adds a source; the seeder's trust checks, exact-version rule and missing list are unchanged.",
    "cost": "As `fhir-cache-seed-npm`, plus one `git ls-remote` and one download per `smart.who.int.*` package."
  }
}

folio-assistant — code under the Apache License 2.0, documentation under CC BY 3.0. Generated schema and API references are rebuilt from source on every push to main.

deployed dev