Publier une hotline

VérifiéPrudence

Transformez un programme local en hotline appelable en écrivant un worker, déclarant son contrat, l'enregistrant et vérifiant qu'il est réellement appelable.

Spar Skills Guide Bot
DevOpsIntermédiaire
18/08/2026
Claude CodeCodex
#hotline#worker-contract#json-schema#service-publishing#delegated-execution

Recommandé pour

Synthèse automatique

Guide la publication d'un programme local comme « hotline » appelable sur un réseau d'exécution déléguée : écrire le worker, déclarer son contrat JSON, soumettre à revue, obtenir l'approbation et vérifier qu'un agent peut réellement l'appeler.

Points forts

  • Donne le squelette exact d'un worker process-adapter (mode `--contract`, lecture d'une tâche JSON sur stdin, résultat sur stdout) avec un exemple exécutable
  • Détaille les deux portes de validation et leurs codes d'erreur (`HOTLINE_INPUT_GUIDANCE_REQUIRED`, `CONTRACT_HOTLINE_INCOMPLETE`) pour corriger avant de soumettre
  • Explique le format d'erreur `{status: "error", error: {code, message, retryable}}` et l'usage de `retryable: false` pour les échecs permanents
  • Rappelle les pièges silencieux du contrat : descriptions obligatoires par champ, exemples validés contre leur schéma, limites déclarées

Limites

  • Le document s'interrompt en cours de liste sur les champs obligatoires du contrat, la fin des règles d'approbation n'est pas fournie
  • Suppose connus les outils de la plateforme (`submit-review`, enregistrement, approbation) dont les commandes ne sont pas détaillées
  • Ne couvre que le worker process-adapter ; les autres types d'adaptateurs ne sont pas décrits
Quand l'utiliser

À utiliser quand on veut exposer un script, un CLI ou un service comme hotline appelable, ou diagnostiquer une hotline publiée que les agents n'arrivent pas à appeler.

Quand l'éviter

À éviter si l'objectif est un simple déploiement d'API sans passer par le réseau d'exécution déléguée et son contrat déclaré.

Analyse de sécurité

Prudence
Score qualité92/100

The skill does not instruct destructive or exfiltration actions, but it does rely on shell and network commands to deploy and register a hotline, which constitutes use of powerful tools for a legitimate purpose and warrants caution.

Points d'attention
  • •Includes shell commands (delexec-ops, curl) that register a service and interact with remote/local network endpoints, despite declaring no allowed tools.
  • •Commands write configuration under DELEXEC_HOME and submit data to a platform; a malicious or mistaken execution could publish unintended content or incur costs.
Comment cette analyse est faite

Exemples

Publish a script as a hotline
I have a small Python script that extracts tables from PDFs. Turn it into a hotline worker with a proper --contract mode and JSON contract, then submit it for review.
Fix a hotline agents can't call
My hotline got published but callers keep failing on it — help me check whether every input field has a real description and whether my examples validate against my schemas.
Add a hotline to a responder device
Register a new hotline on my responder device that takes a URL and returns a one-paragraph summary, with not_recommended_for and limitations filled in.

name: publish-hotline description: Turn a local program into a callable hotline on the delegated-execution network — write the worker, declare its contract, register, submit, approve, and verify it is genuinely callable. Use when someone wants to expose a script, CLI, model or service as a hotline, add a hotline to a responder device, or when a hotline was published but an agent cannot call it correctly.

Publishing a hotline

A hotline is a local program plus a contract: what it takes, what it returns, what it is not for, how long it needs, and what it costs. The program is the easy half. Everything that goes wrong goes wrong in the contract, and it goes wrong quietly — the hotline publishes, the catalogue looks fine, and a caller finds out only when a call fails.

The one rule everything else follows

The contract follows the worker. The worker declares it; nothing else is a source of truth. The platform used to fill in missing schemas from a template and once described a PDF parser to the public as a text summariser. It does not guess any more — it says contract_declared: false instead — so a worker that declares nothing publishes nothing usable.

1. Write the worker

A process-adapter worker is a program that:

  • prints its contract as JSON to stdout when run with --contract, then exits 0
  • otherwise reads one JSON task on stdin and writes one JSON result to stdout
const CONTRACT = {
  contract_version: 1,                    // ← the positive signal; see the trap below
  input_schema:  { type: "object", required: ["text"], additionalProperties: false,
                   properties: { text: { type: "string", minLength: 1,
                     // Every input field needs one. A field a caller cannot fill
                     // in from the contract alone is a field nobody can call.
                     description: "The passage to shorten. Paste the whole thing." } } },
  output_schema: { type: "object", required: ["summary"], additionalProperties: false,
                   properties: { summary: { type: "string" } } },
  input_examples:  [{ title: "A request",  input:  { text: "..." } }],
  output_examples: [{ title: "Its result", output: { summary: "..." } }],
  not_recommended_for: ["what this is the wrong tool for"],
  limitations: ["what it cannot do even when used correctly"],
  service_tier: "quick"                   // quick | standard | deep
};

if (process.argv.includes("--contract")) {
  process.stdout.write(JSON.stringify(CONTRACT));
  process.exit(0);
}

let raw = "";
process.stdin.on("data", (c) => (raw += c));
process.stdin.on("end", () => {
  const task = JSON.parse(raw);
  const text = String(task?.input?.text ?? "");
  process.stdout.write(JSON.stringify({
    status: "ok",
    output: { summary: text.slice(0, 100) },
    usage: { tokens_in: text.length, tokens_out: 0 }
  }));
});

Failures are { status: "error", error: { code, message, retryable } }. Say retryable: false when retrying cannot help — a caller that retries a permanent failure learns nothing and pays twice in time.

2. What the publication gate will refuse

There are two gates, and the first one is on your own machine.

submit-review refuses locally with HOTLINE_INPUT_GUIDANCE_REQUIRED, naming the fields, unless every property in input_schema.properties carries a caller-facing description. Reusing the phrasing the old guessing template wrote — "source text", "optional task context", "instruction for the hotline" — is refused as well: those exact strings are on a denylist, because they are what the machine used to say when nobody had said anything.

Then approval fails with CONTRACT_HOTLINE_INCOMPLETE and an itemised list unless the declaration has:

  • both input_schema and output_schema
  • at least one worked example in each direction, and each example must pass the schema it claims to illustrate
  • not_recommended_for or limitations — a hotline with no stated limits is one that will be blamed for everything it was never meant to do

3. Register, submit, approve

DELEXEC_HOME=~/.delexec-<device> delexec-ops add-hotline \
  --type process --hotline-id my.thing.v1 \
  --cmd "node /abs/path/to/worker.mjs" \
  --fixed-price-cents 20 --currency PTS      # omit both for a free hotline

DELEXEC_HOME=~/.delexec-<device> delexec-ops submit-review --hotline-id my.thing.v1

Then the operator approves two things — in the console, or with a reason via:

POST /v2/admin/hotlines/:hotline_id/approve
POST /v2/admin/responders/:responder_id/approve     # a new device is pending too

Approving the hotline is what freezes version 1 and its content digest. But the catalogue publishes an entry only when its responder is routable as well, so a first device that approves only the hotline gets catalog_visibility: "hidden" and a /v2/hotlines/:id that 404s — approved, frozen, and invisible.

4. Verify it is actually callable

Publishing is not the same as being callable. Check all three:

# the device's own view of what the platform is missing
DELEXEC_HOME=~/.delexec-<device> delexec-ops responder contract-check

# what the platform actually published (no credential needed)
curl -s <platform-api>/v2/hotlines/my.thing.v1 | jq '{input_schema, not_recommended_for, service_tier, execution_budget_s, pricing_hint}'

# what an AGENT sees — the surface that matters
curl -s http://127.0.0.1:8091/skills/caller/hotlines/my.thing.v1 | jq '{contract_source, local_only, pricing_hint}'

contract_source must be platform_catalog. If it is a local draft, the agent is reading something the network never published.

<platform-api> is whatever the device has in platform.base_url, prefix included — https://callanything.xyz/platform in production, and the bare http://127.0.0.1:8080 on a local stack, where platform-api is exposed directly. Get it wrong on production and the edge answers 200 with the brand site's HTML, so a check that only reads the status code passes while reading a web page. And a 404 from the right prefix usually means the wrong id: the published MinerU hotline is local.mineru.pdf.parse.v1, not mineru.pdf.parse.v1.

contract-check is only as good as the version installed. Before 0.1.23 it compared six fields — the two schemas, the two example sets, not_recommended_for, limitations — leaving service terms and attachment declarations outside its comparison entirely, and it compared them by serialization, so the platform's own key order read as drift on every field while all of them were identical. Against the production device it called the MinerU hotline drifted on all six and told the operator to re-register a declaration that was already correct. From 0.1.23 it compares by value and includes the service terms and both attachment declarations, so in_sync means what it says. Check delexec-ops --version before trusting either answer.

Service terms are compared only where the worker declared one: silence is a request for the platform's default, not a disagreement with it.

Then make one real call and check the platform's own verdict — not the responder's claim about itself:

GET /v1/admin/requests/:id → state.delivery_integrity.value == "verified"

verified means the output was checked against the contract this call pinned and everything was checkable. unchecked means something could not be judged — read reason, it names what.

Do not read delexec-ops call-hotline's own exit as that verdict. While the device is running its caller controller polls the relay inbox every 250 ms, and the CLI's own pull then finds an empty inbox and blocks until it prints a bare [delexec-ops] timeout — on calls the platform recorded as delivered and verified a second after they were placed. The call worked; the command narrating it did not. Take the request id and ask the platform.

The traps

Each of these shipped to production at least once.

Silence must be distinguishable from an answer. A worker that does not implement --contract still prints something parseable when asked. That is why contract_version exists: it is the positive signal. Without it the client mistakes noise for a declaration.

Output files need contract_role. If output_attachments.file_roles says a role is required, each result artifact must carry contract_role: "<that role>". Result artifacts otherwise carry no role at all, and the delivery is graded unchecked rather than verified — silently weaker, not failed. Note this is a different vocabulary from an artifact descriptor's role (input/output/evidence, which is the direction bytes travel).

Document hotlines must declare input_attachments. It is the sentence that tells a caller a file is required and how to send it. A hotline that needs a PDF and does not say so is uncallable by anyone who reads only the contract — which is every agent.

A registration draft outranks the worker that made it. add-hotline writes ~/.delexec-<device>/hotline-registration-drafts/<id>.registration.json from the worker's declaration once, and every later add-hotline for the same id reuses that file instead of re-reading the worker. So the ordinary repair loop — the gate names a missing field, you fix the worker, you re-register — fails with the identical error, and nothing says why. Delete the draft to make the worker authoritative again:

DELEXEC_HOME=~/.delexec-<device> delexec-ops remove-hotline --hotline-id my.thing.v1
DELEXEC_HOME=~/.delexec-<device> delexec-ops add-hotline   --hotline-id my.thing.v1 ...

remove-hotline deletes the draft with the entry; add-hotline alone never refreshes it. Check show-draft, not the worker, when a gate error will not go away.

service_tier sets two clocks, not one. The tier drives the acceptance window (quick 24h / standard 72h / deep 7d) and the execution budget (5m / 30m / 4h), and every clock in the system derives from that number, so a real ML load on a cold model needs execution_budget_s declared explicitly. Out-of-bounds values are refused, not clamped: a budget quietly moved is a promise quietly changed.

Anything before 0.1.23 does not send them. The CLI read all three off the worker into the contract profile and then dropped them before the draft, so a worker declaring quick published as standard — a 1800 s budget and a 72 h window nobody chose — and editing the draft by hand did not help either, though draft_meta.editable lists the fields. It is not hypothetical: the production local.echo.priced.v1 is published that way now, on a hotline where the acceptance window is what governs when money settles. Repairing one is a re-registration and a fresh approval, because the corrected declaration moves the digest. Read the published service_tier and execution_budget_s back from the catalogue after every approval on any older client.

A priced hotline needs consent that names the listing. The caller must send billing.max_charge_cents, and the consent must also name pricing_hint_version and trust_tier_seen — agreeing to "20 PTS" without saying which listing said 20 is not agreement to anything checkable. The platform refuses otherwise.

None of that is exercised by the local stack. BILLING_ENFORCEMENT is unset in repos/platform/deploy/platform/.env, so a fixed-price hotline called locally settles as none with the reason "这次调用没有计费" and the caller is never charged. A green local run says the call works, not that the price does. Use tools/paid-call-e2e.mjs, which brings up its own Postgres with enforcement on.

Resubmission: the digest decides. A resubmission whose declaration hashes to the published version keeps its approval. Anything that moves the digest — including a changed display name — re-enters review, correctly. Silence about a field carries it forward rather than clearing it.

Never run a test suite while a device is running. The supervisor binds fixed ports (8079/8081/8090/8091/8092). On 2026-08-10 a test run reconfigured a production device through one: five fixture hotlines written in and the real hotline downgraded to local_only. The CLI now refuses on a DELEXEC_HOME mismatch, but that guard does not cover tests talking HTTP to 8091 directly. Stop the device first, every time.

Stopping it is manual. There is no delexec-ops stop — start has no opposite — and pnpm run dev:local:down does not do it either: dev:local:up lets bootstrap start the real device, then starts its own supervisor and relay on the same ports, where they die of EADDRINUSE, and it is those dead pids that down records and later kills. It removes the platform containers and leaves a fully live device orphaned on every port. Check with lsof -nP -iTCP -sTCP:LISTEN | grep 807 and kill the supervisor pid yourself; its children go with it.

Where the truth actually lives

This file goes stale; those do not.

  • publication gate and contract validation — repos/protocol/packages/contracts/src/hotline-contract.js
  • what a frozen version contains — HOTLINE_VERSION_CONTRACT_FIELDS in repos/protocol/packages/contracts/src/call-state.js
  • tier defaults and bounds — repos/protocol/docs/current/spec/defaults-v0.1.md §6.1–6.3
  • the client-side gate and what actually reaches the platform — validateHotlineRegistrationDraft, buildHotlineRegistrationDraft and buildHotlineOnboardingBody in repos/client/apps/ops/src/config.js
  • the service-term fields the platform will store — SERVICE_TERM_FIELDS in repos/platform/apps/platform-api/src/server.js
  • a real worker, end to end — repos/client/apps/ops/src/mineru-hotline-worker.js
  • the whole path exercised — tools/agent-callability-e2e.mjs

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/publishing-a-hotline-msy76aso/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/publishing-a-hotline-msy76aso' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/publishing-a-hotline-msy76aso/download' --output '.skill-downloads/publishing-a-hotline-msy76aso/SKILL.md.part' && mv '.skill-downloads/publishing-a-hotline-msy76aso/SKILL.md.part' '.skill-downloads/publishing-a-hotline-msy76aso/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/publishing-a-hotline-msy76aso/SKILL.md' && test -s '.skill-downloads/publishing-a-hotline-msy76aso/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/publish-hotline' && cp -R '.skill-downloads/publishing-a-hotline-msy76aso' '.claude/skills/publish-hotline'

Codex
test -f '.skill-downloads/publishing-a-hotline-msy76aso/SKILL.md' && test -s '.skill-downloads/publishing-a-hotline-msy76aso/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/publish-hotline' && cp -R '.skill-downloads/publishing-a-hotline-msy76aso' '.agents/skills/publish-hotline'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/publishing-a-hotline-msy76aso'

openskills read 'publishing-a-hotline-msy76aso'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/publishing-a-hotline-msy76aso/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires