HOS AIHOS AI
Draft

The hos command and the SDK

What @hos-ai/cli and @hos-ai/sdk do, which one you need, and what they do not do.

On this page

In short

HOS gives hotel systems one way to say what happened, and rules that every system applies the same way. Two free tools check that a system follows them: the hos command, which needs no code, and the SDK, for developers who build in TypeScript or JavaScript. Both are alphas, like the HOS 0.1 draft they check.

Two tools

The hos command, @hos-ai/cliThe SDK, @hos-ai/sdk
Foranyone who can open a terminaldevelopers who write TypeScript or JavaScript
What it doeschecks files, tests a system in any language, checks a producer, signs manifeststhe same checks inside your code, and helps build facts and adapters
Runsin a terminal, on Windows, macOS and Linuxin Node.js, and in a browser through a bundler
NeedsNode.js 22 or laterNode.js 22 or later

What the hos command does:

  • hos validate checks HOS files and streams against the schemas and rules of HOS 0.1.
  • hos replay plays a stream back and shows what a consumer does with each fact.
  • hos conformance run tests a system that receives HOS facts against the conformance scenarios, whatever language it is written in.
  • hos conformance producer checks what a system publishes against its manifest.
  • hos manifest creates keys, signs a producer's manifest and verifies it.

Both carry the HOS schemas and the conformance scenarios, so they work offline.

Which one do I need?

  • You want to check files, test a system written in any language, or sign a manifest: the hos command. Start with the Quickstart.
  • You write TypeScript or JavaScript, and want the checks inside your code or your tests, or you build a producer: the SDK. Install it.
  • You received a report and want to understand it: Read a HOS report.
  • You are new to HOS: Concepts explains the ideas in plain language.

Where they fit

Producers

A PMS, a housekeeping app, a messaging platform. They publish facts, and a manifest of what they publish.

HOS facts

CloudEvents, one per thing that happened, delivered at least once.

Consumers

A dashboard, an operations app, an AI assistant. They decide what to do with each fact.

Check a producer

hos validate, hos conformance producer, hos manifest; in code, createFactWriter and checkProducer.

Check a consumer

hos conformance run, in any language; in code, the processing rules of the SDK.
Producers publish HOS facts and declare them in a signed manifest; consumers decide what to do with each fact. The hos command and the SDK check both sides.

Systems that publish HOS facts, the producers, such as a PMS or a housekeeping app, send them to systems that receive them, the consumers, such as an operations dashboard. The tools check both sides:

  • a producer: its manifest, the facts it publishes, and what it publishes again when it restarts;
  • a consumer: the dispositions it gives each fact of the conformance scenarios, and optionally how it reads arrivals.

What they do not do

  • They do not certify. Passing the scenarios or the producer checks is a self-check. No HOS certification exists yet. See what a report proves.
  • They do not connect hotel systems. Nothing here receives, stores or forwards live facts between systems, and the packages contain no connector to a real PMS. The Mews, Apaleo and Cloudbeds mappings on this site are unofficial adapters, shown in the demos.
  • They check a draft. HOS 0.1 is a draft: names and fields may still change, and the tools with it.
  • Their arrival reading is an example. The readiness and situations they compute come from a reference projection that is not normative.

Versions

WhatVersionNote
@hos-ai/cli0.1.0-alpha.1The hos command
@hos-ai/sdk0.1.0-alpha.1The SDK, always the same version as the command
HOS0.1.0-draft.2The draft of the specification both implement
Conformance protocolhos-conformance/1How hos talks to the program it tests
Node.js22 or laterWhat both need to run

The command and the SDK are released together, with the same number, 0.1.0-alpha.N until HOS 0.1 is final. Each package's changelog lists the changes: the command, the SDK.

Next steps

  1. Install the tools, or check that Node.js 22 is there.
  2. Follow the Quickstart: ten minutes, no code.
  3. Then the guide for your role, from the list above.