CDS pluginCDS plugintypeInstalls into a CAP project and extends the runtime. CAP loads it through cds.requires or the plugin hook.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

cap-companion

Serves a playback-only SAP Companion (Help4) workarea from a CAP service, so a Fiori application shows tours and in-app help without Enable Now Manager.

A CAP plugin that serves the SAP Companion help panel from the CAP server itself. Help documents and tours are written as YAML or JSON in a companion/ folder, and the plugin compiles them into the .catalogue and .context responses Help4 asks for; item kinds map onto Help4 macros, with document and hotspot becoming help_tile, video and link becoming link_tile and tourStep becoming guide_click. Playback is all of it: the editor, writes, /multifile and a tracking backend are out of scope in v1. The Help4 runtime is not in the package either, so a licensed complete sap.dfa.help tree has to be supplied and is mounted under /$companion/framework. Those routes reach the plugin only where the application's own routing sends them there, which the README limits to a standalone @sap/approuter or a local cds watch.

Facts

Latestv0.1.0ReleasedLast pushLicenceApache-2.0

Where it sits

Lives in
Provides
In-app guidanceCAPIn-app guidancecapabilityExplaining an application from inside it — guided tours, hotspots and contextual help shown next to the screen a user is on, rather than in a separate manual.
Add-on to
@sap/cds@sap/cdsartifactThe CAP Node.js runtime, which compiles the CDS model, serves the services declared in it, answers generic requests before any handler runs, and loads every cds-plugin.
Serves
Flavors
Node.jsfrom its runtime
Requires
@sap/cds≥ 8.0@sap/cdsartifactThe CAP runtime it installs into: CAP picks the plugin up from node_modules and reads its settings from cds.companion.SAP CompanionSAP Companionoutside the atlasThe Help4 runtime the plugin mounts and serves: the package ships the protocol glue, and a licensed sap.dfa.help tree has to be supplied by the project.
Optional
@sap/approuter@sap/approuterartifactRouting /$companion/** to the CAP backend in a deployed setup, which the plugin states only a standalone approuter can do; a local cds watch needs none.routing

Who is behind it

Sören LeibachSören LeibachPersonMaintains this
In the atlas: maintains 6, contributes to 5, wrote 1
@sleibach
maintainer

Before choosing this

Conditions

LicenceSAP Developer License Agreement 3.2 CAP§ 1, 2, 3A cds-plugin is used with SAP CAP materials, or an artifact is explicitly identified as a CAP plugin or application.
  • § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.
  • § 2 Intellectual Property. The agreement retains SAP's rights in the covered materials and limits making APIs, tools or software available to third parties, while preserving ownership of customer applications subject to SAP's underlying rights.
  • § 3 Artificial Intelligence Training. The agreement prohibits use of the covered materials and customer applications for training artificial-intelligence models or systems.
SAP Developer License Agreement 3.2 CAP →
PracticalFunctional boundary

Not behind a managed approuter: SAP Build Work Zone does not expose the /$companion/** routes, so Companion never reaches CAP, and the README names managed approuter and Work Zone as out of scope for v1. Not where help has to be authored in a browser, since the editor, the producer and writes are absent and content lives in files the plugin compiles.

What it declares

Every artifact

Type
CDS plugin
Origin
Independently maintained
Runtime
Node.js

As a CDS plugin

Declared for
>=8.0
Distributed through
does not say

Connections5

cap-companion connectionscap-companionPROVIDES→ provides1provides stated Serves a playback-only SAP Companion (Help4) workarea from a CAP service: help documents, hotspots, guided tours, What's New and video or link lightboxes, authored as YAML or JSON in a `companion/` folder and compiled into Help4's SEN `.catalogue` and `.context` responses. sleibach/cap-companion README: https://github.com/sleibach/cap-companion sleibach/cap-companion README — Features: https://github.com/sleibach/cap-companionIn-app guidanceNEEDS→ connects to1connects to stated The Help4 runtime in the browser fetches its own assets and the SEN catalogue and context from the plugin's app-relative routes. sleibach/cap-companion README: https://github.com/sleibach/cap-companionSAP Companion→ needs2needs stated The CAP runtime it installs into: CAP picks the plugin up from `node_modules` and reads its settings from `cds.companion`. sleibach/cap-companion README — Requirements: https://github.com/sleibach/cap-companion sleibach/cap-companion README — Install: https://github.com/sleibach/cap-companion@sap/cdsneeds stated The Help4 runtime the plugin mounts and serves: the package ships the protocol glue, and a licensed `sap.dfa.help` tree has to be supplied by the project. sleibach/cap-companion README: https://github.com/sleibach/cap-companion sleibach/cap-companion README — Requirements: https://github.com/sleibach/cap-companionSAP Companion→ optionally needs1optionally needs stated If: the Fiori application is deployed rather than run locally with cds watch Routing `/$companion/**` to the CAP backend in a deployed setup, which the plugin states only a standalone approuter can do; a local `cds watch` needs none. sleibach/cap-companion README: https://github.com/sleibach/cap-companion sleibach/cap-companion README — Fiori launchpad integration: https://github.com/sleibach/cap-companion@sap/approuterif

Install

npm add cap-companion

Derived from the package name. No recipe recorded; the README has the configuration.

Where it sits in your app

Download
Your CAP applicationsleibach/cap-companion README, checked 2026-10-18: “Help4 loads its runtime and SEN catalogue/context from app-relative routes (`/$companion/framework/**`, `/$companion/pub/<workarea>/.catalogue`, `.context`).”inbounddocumentedmay needif the Fiori application isdeployed rather than runlocally with cds watchSAP Companion, systemSAP Companionsystemcap-companion, modulecap-companion@sap/approuter, module@sap/approuter
SAPnot SAP's, or the project's ownstated in the documentunder a condition

README

quoted from sleibach/cap-companion under Apache-2.0, read
sleibach/cap-companion/README.mdOn GitHub

cap-companion

npm

Unofficial open-source CAP plugin that serves a playback-only SAP Companion (Help4) workarea for Fiori applications — guided tours, in-app help documents, hotspots, and video/link lightboxes — without SAP Enable Now Manager, WalkMe, or editor APIs.

Published as cap-companion on npm (0.1.0).

Not SAP-supported. You must supply a licensed complete sap.dfa.help runtime yourself. This package ships only protocol glue and a Bookshop example.

Standalone approuter only. Help4 loads its runtime and SEN catalogue/context from app-relative routes (/$companion/framework/**, /$companion/pub/<workarea>/.catalogue, .context). Those URLs only reach this plugin when you control the HTML5 app’s routing — a standalone @sap/approuter (xs-app.json). Managed approuter behind SAP Build Work Zone does not expose those routes, so Companion never hits CAP. Local cds watch / Bookshop is the same class of setup as standalone.

Features

  • YAML/JSON-authored help and tour content in a companion/ folder
  • Deterministic compilation to Help4 SEN .catalogue and .context responses
  • Static mounting of externally supplied sap.dfa.help under /$companion/framework
  • Optional cds build copy task for production packaging
  • Bookshop + local Fiori launchpad harness via cds-launchpad-plugin

Out of scope (v1): editor/producer, writes, /multifile, SAML Manager, Learning Center, tracking backend, CDS persistence, automatic SAP downloads, managed approuter / SAP Build Work Zone.

Requirements

  • Node.js >= 18
  • @sap/cds >= 8
  • Licensed complete Help4 4.0.28 tree (for browser verification)
  • UI5 1.151.0 when using the Bookshop launchpad harness

sap.dfa.help is not part of the public UI5 CDN (https://ui5.sap.com/.../resources/sap/dfa/help/ returns 404). Companion is a separate SAP product. The shell still loads sap.m / sap.ushell from ui5.sap.com; only Help4 must be served from your app (or another host you license). That is why CAP_COMPANION_FRAMEWORK_PATH exists — it is a self-hosted copy, not a second cloud service.

Install

From npm (package page):

npm install cap-companion

CAP loads cds-plugin.js from node_modules automatically. Enable it in your CAP project package.json:

{
  "dependencies": {
    "cap-companion": "^0.1.0"
  },
  "cds": {
    "companion": {
      "enabled": true,
      "workarea": "myapp",
      "framework": {
        "path": "../licensed/sap-dfa-help"
      }
    }
  }
}

Or point to an absolute runtime:

export CAP_COMPANION_FRAMEWORK_PATH="/path/to/sap/dfa/help"

Content

Place *.yaml or *.json files in companion/ (configurable via cds.companion.contentDir).

schemaVersion: 1
id: books-list-help
type: HELP
title: Books help
locale: en-US
revision: 1
context:
  appUrl: Books-display
  product: CAP_BOOKSHOP
  version: "1.0"
items:
  - id: overview
    kind: document
    title: About the catalog
    contentHtml: "<p>Browse and filter the available books.</p>"
  - id: search
    kind: hotspot
    target: { helpId: books-search }
    title: Search
    contentHtml: "<p>Search by title or author.</p>"

See test/bookshop/companion/ for HELP, TOUR, links, presentation, What's New, callouts, conditions, locale variants, and quiz examples.

Item kinds
kindHelp4 macroNotes
documenthelp_tileOptional target for anchored help
hotspothelp_tileRequires target; supports callout, instantHelp
videolink_tileAlways opens in lightbox with tile_icon: video
linklink_tileGeneric link; lightbox: false opens a new window
tourStepguide_clickOptional screen for multi-screen tours

kind: link compiles to a Help4 link_tile. Set lightbox: true for an iframe lightbox, or lightbox: false to open in a new browser tab. tileIcon accepts Help4 values such as external, pdf, faq, and link.

kind: video remains shorthand for a lightbox link with tile_icon: video.

Presentation

Optional fields on document, hotspot, and tourStep items:

  • bubbleType: info, tip, note, important, action, start, end
  • bubbleSize: s, m, l
  • bubbleOrientation: auto, W, N, S, E
  • bubbleAnimation: default, expand, fade, pulse, scaleup, shake, shrink, wobble
  • bubbleOffset: { left, top } — nudges the bubble relative to its anchor
  • hotspotStyle: CIRCLE, ICON, RECTANGLE, UNDERLINE, TRIANGLE, NUMBERED
  • hotspotSpotlight: true dims the rest of the screen
  • hotspotIconType: help, info, tip, warning, and other Help4 icon types
  • hotspotIconPos: R, Q, or A–P — icon placement on ICON hotspots
  • instantHelp / callout: require target; panel can stay closed for callouts
  • showTitleBar / showArrow: bubble chrome (default true)
  • alignWithText: true aligns the hotspot bubble with control text (help tiles only)
  • tileIcon: Help4 panel icon on documents and hotspots (whatsthisapp, faq, …)
  • showAsButton: render as a panel button instead of a list tile

Help4 disables instant help on CIRCLE hotspots — the compiler forces ICON when needed.

On link and video items:

  • showAsButton: panel button instead of list tile
  • splash / splashOption (once | always): lightbox splash screen (meaningful with lightbox: true)
  • lightboxSizing / lightboxSize: iframe dimensions for lightbox links

Help4 has no tile section headers in the Help panel — use group + groupPrefix: true on the project to prepend "Group · " to captions.

What's New

Set whatsnew: true on a TOUR project (not a third type). The catalogue appUrl is published as <inbound>!whatsnew so Help4's What's New widget can find it.

Conditions

Use when on a project or item:

when:
  urlContains: Books-display
  elementVisible: "[data-help-id='books-go']"
  after: "2020-01-01"
  before: "2030-01-01"
  api:
    demoRole: author

API conditions require the host app to call Help4 ConditionService.setCondition (Bookshop: ?companionRole=author).

Grouping

group sorts tiles in the Help list. Set groupPrefix: true on the project to prepend "Group · " to tile captions.

Localization

Use separate YAML files per locale with distinct id values (.context is keyed by id):

  • books-list-help.yaml → id: books-list-help, locale: en-US
  • books-list-help.de-DE.yaml → id: books-list-help-de, locale: de-DE
Knowledge check (quiz fallback)

Native Enable Now quizzes are not OSH playback macros. Ship a static HTML page under companion/media/ and open it with kind: link, lightbox: true, tileIcon: faq.

Videos

kind: video compiles to a Help4 link_tile opened in a lightbox. Set contentUrl to the media you want Help4 to load:

contentUrlHelp4 behavior
/$companion/media/demo.mp4 (or .webm)Lightbox plays the video file directly
/$companion/media/demo.htmlLightbox iframe — use an HTML page with <video> or embedded content
https://…Same as above when the URL is HTTPS (validated by the content provider)

Bookshop example (companion/books-list-help.yaml):

- id: video
  kind: video
  title: Walkthrough
  contentUrl: "/$companion/media/walkthrough.html"

The HTML page at companion/media/walkthrough.html embeds walkthrough.mp4 from the same folder.

Fiori launchpad integration

Works with a standalone approuter (or local CAP). Map /$companion/** in xs-app.json to the CAP backend. Managed Work Zone routing cannot do that.

  1. Map sap.dfa.help to the plugin framework URL (module path or approuter route).
  2. Register bootstrap plugin sap.dfa.help.utils.adapters.fiori as a RendererExtensions plugin.
  3. Set enableHelp: true on the Fiori2 renderer.
  4. Plugin config: backend: "WPB", dataUrlWPB: "/$companion/wa/<workarea>", playbackTag: "published", editor: false, multifile: false.

The Bookshop harness under test/bookshop demonstrates the full wiring with cds-launchpad-plugin.

HTTP contract

For basePath=/$companion and workarea=bookshop:

RoutePurpose
GET /$companion/pub/bookshop/.catalogue?{encoded-json}Project catalogue
GET /$companion/pub/bookshop/.context?{"id":"..."}Project payload
GET /$companion/framework/**Licensed Help4 static assets
GET /$companion/media/**Optional same-origin media from companion/media/

Query strings are percent-encoded JSON (not key=value pairs).

Security

  • GET/HEAD only on companion routes
  • HTML sanitization by default (cds.companion.html.allowUnsafe: false)
  • Path traversal protection; no directory listing for framework static files
  • auth: inherit (default) — protect routes via approuter/XSUAA in production

Development

From source (contributors). Consumers should npm install cap-companion instead.

git clone https://github.com/sleibach/cap-companion.git
cd cap-companion
npm install
npm test
Release checklist
  • Never commit or publish test/bookshop/.framework-runtime/ or generated gen/companion/framework/; both can contain licensed SAP Companion assets.
  • Publish only the generated stub IconFont whose checksum matches test/bookshop/framework-stubs/wpb/files/icon-font-stub.sha256.

Bookshop locally:

cd test/bookshop
npm run dev:help
# prepares mirror + wpb/i18n|files stubs, then cds watch
# open http://localhost:4004/$launchpad

Diagnose CMP4 activation:

cd test/bookshop
npm run diagnose:cmp4 -- --base http://localhost:4005

Licensed browser gate (optional):

CAP_COMPANION_FRAMEWORK_PATH=/path/to/sap/dfa/help npm run test:browser --workspace=test/bookshop

Troubleshooting

SymptomCheck
Empty cataloguecontext.appUrl must match the Fiori screen id from the .catalogue query
404 contextProject id in YAML matches .context query
Help4 fails to loadPut modulePaths["sap.dfa.help"] in fioriSandboxConfig (not only launchpad.html — UI5 1.151 overwrites the inline config). Confirm Help4.js is requested from /$companion/framework, not ui5.sap.com.
Incomplete frameworkFull runtime needs wpb/i18n, wpb/files, themes — run npm run prepare:framework --workspace=test/bookshop or point CAP_COMPANION_FRAMEWORK_PATH at a licensed tree
Auth errorsStandalone approuter must allow /$companion/** for authenticated users
No help in Work ZoneManaged approuter cannot route /$companion/** to CAP — use standalone deployment

Tested matrix

ComponentVersion
CAP8 / 9
UI51.151.0
Help44.0.28

License

Apache-2.0 — see LICENSE and NOTICE.

Apache-2.0, read

History

Latest

v0.1.0

Other 1

Notes
  • Initial playback-only CAP plugin: YAML content, SEN .catalogue / .context routes, optional static Help4 framework mounting, Bookshop example with cds-launchpad-plugin.
2downloads per week, npm
Weekly downloads for cap-companion26 complete calendar weeks from 2026-04-20 to 2026-10-18; the latest total is 2.20 Apr – 26 Apr: 027 Apr – 3 May: 04 May – 10 May: 011 May – 17 May: 018 May – 24 May: 025 May – 31 May: 01 Jun – 7 Jun: 08 Jun – 14 Jun: 015 Jun – 21 Jun: 022 Jun – 28 Jun: 029 Jun – 5 Jul: 06 Jul – 12 Jul: 013 Jul – 19 Jul: 020 Jul – 26 Jul: 027 Jul – 2 Aug: 03 Aug – 9 Aug: 010 Aug – 16 Aug: 017 Aug – 23 Aug: 024 Aug – 30 Aug: 14631 Aug – 6 Sept: 97 Sept – 13 Sept: 1014 Sept – 20 Sept: 621 Sept – 27 Sept: 428 Sept – 4 Oct: 35 Oct – 11 Oct: 212 Oct – 18 Oct: 2

Details

Sources4
npm registrydiscovered herechecked
npm registry, cap-companionversion, releases, installschecked
github.com/git+https://github.com/sleibach/cap-companion.gittree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
runtimesnode
declared for>=8.0
latestv0.1.0
first release
releases and cadence1
discovered vianpm registry
first seen in the atlas
ecosystem and domaincap, ui-and-frontend-bridge
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:sleibach-cap-companion
JSON
/artifacts/sleibach-cap-companion.json
MCP
Connecting an agent