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.
| Tool | smart-fhir-cache-seed |
| IRI | http://smart.who.int/base/tools/smart-fhir-cache-seed.jsonld |
| part of | http://smart.who.int/base/smart-base.jsonld |
| type | https://litlfred.github.io/cat-harness/v0/ns/Tool |
| declared by | smart-base |
| source | smart-base/tools/smart-fhir-cache-seed/smart-fhir-cache-seed.ts |
| invoked | shell |
| qa | qa-reports |
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.
| port | type | required | description | constraint | |
|---|---|---|---|---|---|
| in | sushi-config | FilesystemPath | Seed 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. | |
| in | cache | FilesystemPath | Default ~/.fhir/packages, which SUSHI and the IG Publisher read. | string · A filesystem path, possibly outside the repository. Not admissible as a command-line argument. | |
| out | installed | Count | integer · A non-negative count — how many of something, or how many to show. Zero is a real answer. | ||
| out | missing | Count | Exit 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:
| process | step | lane | via skill |
|---|---|---|---|
| An IG site, built from the AST on its cache branch | Build the IG with the AST exporter | AST 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:
| workflow | line | |
|---|---|---|
fhir-harness/.github/workflows/ig-ast-refresh.yml | 317 | bun 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.
| install | none |
| runtime | bun, npm, git |
| network | yes |
When a host it reaches is refused:
| host / error | remedy |
|---|---|
github.com | none: WHO’s published-site repository is read from GitHub; with it refused, only npm and --mirror remain. |
| when to choose it | |
|---|---|
| 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. |
What it is made of
| role | file | |
|---|---|---|
| definition | smart-base/tools/smart-fhir-cache-seed/smart-fhir-cache-seed.ts | |
| script | fhir-harness/scripts/fhir-cache-seed-npm.ts |
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."
}
}