Hugs
Hugs are found by name, like agents. A hug is installed when its built dist/ is somewhere cliqd looks.
Where cliqd looks
The first match wins:- The team’s own hugs — any
hugs/<name>/folder next toteam.ymlwhosedist/has ahug.json. Nothing is declared inteam.yml; the phases’hug: { name }say which they use. A sub-team’s phases use the sub-team’s hugs. CLIQ_HUGS_PATH— colon-separated folders, each holding hug folders — else thehugs.pathsetting. Hugs on the path are used in place, not copied: the place for a hug used by several teams.~/.cliqrc/hugs— the built-insformandapproval, installed by cliqd when it starts and replaced on upgrade. It is cliqd’s folder: don’t put your own hugs there.
TEAM_HUG_UNKNOWN) when one of its
phases asks with a hug this daemon can’t find — its own hugs count when the team carries them built, and a Hug gate
needs the built-in approval. Every run is checked again before it starts (hug_unknown), including runs CliqHub
dispatches and each sub-team before its run is set up.
Team hugs
A team hug is ordinary team files: its builtdist/ travels in the team package with team.yml and the role briefs.
Hug files count towards the team package’s limits (10 MB, 1,000 files). The Builder on CliqHub can’t build a hug,
but drafts and forks keep a team’s hugs.
How bundles reach CliqHub
Nothing is registered or uploaded ahead of time:- When a phase asks, cliqd finds the hug and computes its bundle’s hash (
sha256over the files ofdist/). - It opens the Hug on CliqHub with
hug: { name, sha256 }. - If CliqHub hasn’t seen that bundle, it answers
BUNDLE_MISSING, and cliqd opens the Hug again with the bundle’s files. CliqHub accepts it only from a daemon of the Hug’s realm, recomputes the hash and checks the rules. - Every later Hug with the same bundle — from any daemon — sends nothing.
approval Hug on a CliqHub uploads approval’s bundle.
Retention: a bundle is kept while an open Hug, or an answered one from the last 90 days, uses it. A past Hug
whose bundle is gone shows its responses as plain key-values.
The page’s address
CliqHub serves hug pages from a separate content host — on cliqhub.io,content.cliqhub.io — at
/hb/<sha256>/…, in a sandboxed frame on the Hug page (Security). A local cliqd serves
them itself, from the hug’s dist/ on disk.