Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

license-declaration

Declare your WarmHub repo's license as a traversable graph fact — the WarmHub equivalent of a LICENSE file at the repo root. Seed-only component; no handlers, no credentials, no subscriptions.

Shipped alongside warmhub-data/global.reference.licenses, the canonical substrate: every SPDX license as a License/<SPDX-ID> thing with full text, term stances (commercial use, share-alike, …), scope suitability (software vs data vs content), and supersession chains.

Install

wh component install warmhub-data/license-declaration --repo <org>/<repo>

This creates two shapes and seeds one thing:

  • LicenseSubject + seeded LicenseSubject/repo — "the contents of this repo as a licensable work"
  • LicenseDeclaration — the declaration shape (empty until you declare)

Declare your license

Write the well-known LicenseDeclaration/repo assertion about the seeded subject:

wh commit submit --repo <org>/<repo> -m "declare repo license" --ops '[
  {
    "operation": "add", "kind": "assertion",
    "name": "LicenseDeclaration/repo",
    "about": "LicenseSubject/repo",
    "data": {
      "spdxIdRaw": "CC-BY-SA-4.0",
      "licenseWref": "wh:warmhub-data/global.reference.licenses/License/CC-BY-SA-4.0",
      "appliesTo": "data",
      "declaredBy": "<you>"
    }
  }
]'

Conventions:

  • LicenseDeclaration/repo is reserved for the repo-scope declaration — tools resolve it blindly, like /LICENSE in a git repo. Use other names for scoped declarations (per-dataset, docs-vs-data), each about its own LicenseSubject.
  • licenseWref must be a resolved wref into the substrate (look your id up first: wh thing view 'License/<SPDX-ID>' --repo warmhub-data/global.reference.licenses). If your id isn't there, or you have a compound expression (MIT OR Apache-2.0), leave licenseWref unset and carry spdxIdRaw/spdxExpression only.
  • Mirror the license into your repo description and README for human readers; the declaration is the machine truth.

What you get

  • Reverse lookup: the substrate can answer "everything declaring license X" via wh thing refs License/X --inbound — your declaration participates automatically because licenseWref is wref-typed.
  • Answers behind the wref: full text for LICENSE files, "does this require share-alike?", "is it suitable for data?", "is there a newer version?" — all one hop from your declaration.
  • Doctor: wh component doctor warmhub-data/license-declaration --repo <org>/<repo> verifies shapes + the seeded subject.

Design notes

Schema is deliberately minimal and platform-donation-shaped: this component incubates a convention proposed to become platform-native repo metadata (a peer of Readme/Agents — see warmhub/warmhub-app#7668). Component-installed declarations will remain valid verbatim if/when that lands.

Legal notice

The substrate (warmhub-data/global.reference.licenses) is a verbatim pass-through of cited third-party sources; WarmHub does not interpret license text and none of this is legal advice. Verify any classification, flag, or quote at the assertion's sourceUrl and against the license text itself before relying on it.

About

WarmHub component: declare your repo's license as a traversable graph fact, linked to the canonical SPDX substrate in warmhub-data/global.reference.licenses. The WarmHub equivalent of a root LICENSE file.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors