Sidecars

Guide

Register application actions and knowledge, run guided workflows and preserve confirmation, progress and handoff boundaries.

0.11.2Alpha capabilityDeclared targets: Windows, Androiduk.capp.sidecar.ftue

Integrate with application-owned actions

Guide combines product-authored help, optional onboarding, tours and declared workflows. It can explain how your app works without a model, and can call bounded actions registered by that application when a workflow needs to do something.

Use window.capp.guide; window.capp.ftue remains a compatibility alias. The package ID remains uk.capp.sidecar.ftue and the help document protocol remains capp.ftue-manifest.v1. Do not rename those identifiers simply because the user-facing name is Guide.

Guide owns help and workflow presentation. Your application owns state, validation, permissions and business effects. A workflow completion message, local-model answer or Guide confirmation is not a replacement for the product's own authorisation and postcondition checks.

Before you integrate

Select Guide for the application and target, author a small help document or workflow, then choose the appropriate release/mode. Windows and Android are declared package targets; a public Showcase uses a separately projected user-mode browser composition. Do not infer that every native feature is available in a browser demo.

Use stable data-capp-guide-id attributes on targets instead of layout-dependent selectors. Keep action registration in the active application document; the outer shell and the app frame are not interchangeable owners. An authored workflow must reference a registered action ID and a resolvable target before it can run.

Use Guide and knowledge for authoring, project drafts and immutable user releases. This page describes the application integration. A production user release should contain public product help, not an internal project knowledge dump or authoring endpoints.

Register one bounded action

This complete example fills a search field and reports that narrow postcondition. It does not pretend to execute a search. For a real search, call the application's existing validated search operation inside the handler and return only the result it actually observed.

html
<label for="guide-search">Search this app</label>
<input id="guide-search" data-capp-guide-id="search.query" maxlength="120">
<p id="guide-search-result" role="status"></p>
js
function registerSearchGuide(input, output) {
  if (!input || !output) throw new Error('Search elements are missing');
  const guide = window.capp?.guide;
  if (typeof guide?.registerAction !== 'function') {
    output.textContent = 'Guide is unavailable; the search field still works.';
    return () => {};
  }
  return guide.registerAction({
    id: 'example.search.fill',
    title: 'Fill the search field',
    description: 'Set the query without submitting a search.',
    arguments: { query: { type: 'string', maxLength: 120, required: true } }
  }, async ({ query }) => {
    const clean = String(query ?? '').trim();
    if (!clean || clean.length > 120) throw new Error('Enter a query of 1–120 characters');
    input.value = clean;
    input.dispatchEvent(new Event('input', { bubbles: true }));
    output.textContent = `Search field prepared: ${clean}`;
    return { query: clean, fieldUpdated: input.value === clean };
  });
}
const unregisterSearchGuide = registerSearchGuide(
  document.querySelector('#guide-search'), document.querySelector('#guide-search-result')
);

Call unregisterSearchGuide() when its owning view is permanently removed. Registration itself does not run the handler. Guide's declared workflow controller invokes it; there is no public arbitrary runAction() shortcut.

Keep one owner per action ID. Registering the same ID replaces its handler; dispose the old registration before registering a new one. A stale disposer identifies that ID, not a separately versioned callback.

Action arguments are a small descriptor map, not a complete JSON Schema interpreter. The current normaliser supports declared string, number and boolean arguments, required flags, string length/enumeration and numeric bounds; it ignores undeclared inputs. Strings may be bounded and numbers clamped. Validate product-specific meaning again inside your handler rather than assuming Guide's normalisation proves it is safe to act.

Application API

Methods that cross the shell boundary are asynchronous. Use await for calls such as opening help, starting workflows, target registration and status; a same-document owner may also provide synchronous implementations.

MethodInput/result and scope
registerTarget(target) / registerTargets(targets)Register stable target descriptors for permitted lookup; await registration before a dependent workflow.
registerAction(definition, handler)Register a namespaced app handler; returns its unregister function.
unregisterAction(actionId) / listActions()Remove or inspect currently registered actions, not arbitrary app callbacks.
open() / openHelp()Open the help interface; no workflow effect is implied.
start(experienceId) / startFtue(experienceId)Start the selected authored experience.
listWorkflows()Inspect workflows available in the current authored help.
startWorkflow(id, slots, query, options)Start a declared workflow; controller policy and action checks still apply.
cancelWorkflow() / status()Stop subsequent progression or inspect current workflow state.
registerKnowledgeProvider({search, read, sources})Bind a trusted direct app provider; returns a disposer.
search(input) / read(input) / sources()Read through that provider or available authored help, depending on the host.
reset(experienceId)Reset experience progress, not application business data.

Runtime manifest registration is a build-authority decision, not a universal user-mode API. The package may expose a method while refusing a call under the compiled mode. Do not use runtime registration as a back door to replace a published user release.

Keep a workflow step open until it is complete

An ordinary handler result completes that action invocation. When the product still needs review, another foreground action or a later status check, return a guide property containing validated progress instead of reporting success too early.

Feature-detect guide.supports.actionProgress. For a pending result, the value under guide has this shape:

json
{
  "protocol": "capp.guide-action-progress.v1",
  "complete": false,
  "title": "Review the next item",
  "body": "The application has prepared the item but has not applied it.",
  "label": "Review this item",
  "checkpoint": "example-review-1"
}

Return { guide: { protocol: 'capp.guide-action-progress.v1', complete: true } } only after the app verifies the postcondition. Pending progress can change the current step's title, body and button label; it cannot introduce another route, target or action. Invalid progress fails on that step rather than advancing it. Download the action-progress schema.

The next invocation receives context.checkpoint. It is a bounded opaque string held in the active workflow, not a durable operation record or an authentication token. Back, a replacement workflow or reload requires the application to reconstruct a fresh review from its own state. Bind any real operation, inputs and idempotence rules in the application.

For actions that require a fresh human confirmation, feature-detect guide.supports.userConfirmation and register requiresUserConfirmation: true. Check context.userConfirmed and your own product authority in the handler. A synthetic Test Runner click or automatic/brokered action cannot satisfy Guide's trusted-click requirement. This UI boundary does not protect an app from arbitrary hostile scripts already controlling that same document.

Controller and inference

Guide works with authored help without Local AI. Local AI can provide inference and MCP Context can provide explicit retrieval when selected, configured and available. Opening help does not itself constitute permission to download a model or perform a project operation.

Guided, auto-safe and auto-all modes control progression inside the authored target/action set. They do not give the model a general selector, network or filesystem tool. Pending action checkpoints still wait for a fresh click; a product must keep its own confirmation and permission rules even in an automatic mode.

Set ftueEnabled to false to keep help/workflows while disabling first-run onboarding. Help availability, first-run tours, action execution, speech and authoring mode are separate choices. Speech support depends on the target/provider and follows the same workflow boundaries; do not advertise a privileged OS hotword service.

A trusted knowledge provider supplies search, read and sources together. Register it through the direct app API, preserve its citation/provenance fields and remove it when its owner leaves. The general message bridge is not a grant for remote frames to retrieve private knowledge.

Website handoff and return

With guide.supports.handoff and a usable Links companion, a pending action can include an HTTPS website handoff and explicitly supplied public text. Guide holds the current checkpoint while the user reads the site, copies the supplied value and returns.

A handoff opens once per active workflow step/ID. Returning or closing the tab does not rerun the action and does not prove the external task succeeded. Recheck the postcondition on the next deliberate action. A missing Links capability, unavailable native tabs or a full tab strip skips only the handoff; keep the current app checkpoint and ordinary user-operated copy/link controls useful.

Do not include passwords, private keys, session tokens or private documents in companion text. No handoff reads the clipboard, auto-pastes, clicks a remote page or grants that page the app bridge.

Cancellation and troubleshooting

SymptomCheck and next step
Target cannot be foundCheck the current route and stable target ID after rendering; correct outdated targets in a new authored release.
Action is unavailableRegister it in the current application document before starting its workflow and use the same namespaced ID.
Handler is called with bounded/clamped inputGuide normalises its small descriptor map. Apply domain validation and report the actual result.
Styles unavailableRespect CAPP_GUIDE_STYLES_UNAVAILABLE; verify packaged CSS. Do not disable CSP or show an unstyled overlay.
A pending operation advanced too soonReturn validated incomplete progress until the application verifies completion.
Auto will not perform a confirmed actionExpected for actions requiring a trusted click; do not weaken the requirement to automate a demo.
Cancelled handler later finishesCancellation prevents later workflow progression but does not undo a handler already running. Retain the app's in-flight guard until it settles and reconcile before retrying.
Private knowledge appears in the wrong contextCheck provider ownership, citations and scope; published help and owner/project knowledge are different boundaries.

Configuration reference

These are the selected package's configuration fields. String credential values and installation-specific defaults are never published here. A field's presence does not bypass its runtime policy.

FieldTypeMeaning and constraints
modeselectCompiled Guide mode. Choices: user, admin
manifestJsontextareaGuide manifest · capp.ftue-manifest.v1 JSON
defaultViewselectDefault Guide view. Choices: page, tour, assistant
assistantEnabledcheckboxEnable AI chat
helpEnabledcheckboxEnable Guide help surface
ftueEnabledcheckboxEnable first-time onboarding
autoStartcheckboxStart the first-time tour on first use
showHelpButtoncheckboxShow the floating help button
allowRestartcheckboxAllow users to restart the tour
adminDraftPersistencecheckboxPersist admin drafts on the authoring device
allowRuntimeManifestRegistrationcheckboxAllow the packaged app to register a bounded manifest at runtime
guidedActionscheckboxAllow project-authored Guide actions
controllerModeselectGuide controller mode. Choices: guided, auto-safe, auto-all
intentModeselectGuide intent engine. Choices: rules, ai, hybrid
speechActivationModeselectVoice activation. Choices: off, push-to-talk, wake-phrase
speechWakePhrasetextWake phrase / initiator
speechProviderselectSpeech recogniser. Choices: auto, on-device, system, browser
speechLocaletextSpeech locale
speechPreferOnDevicecheckboxPrefer on-device recognition when available
speechInterimResultscheckboxShow partial speech transcript
speechAutoSubmitcheckboxSubmit final speech transcript immediately
speechWakeRestartMsnumberWake listener restart delay (ms). Bounds: 100 to 3000
speechControllerModeselectVoice command controller mode. Choices: auto-all, auto-safe, guided, inherit
autoPresentationModeselectAuto workflow presentation. Choices: compact, step-through
autoStepDelayMsnumberAuto action presentation delay (ms). Bounds: 250 to 3000
guidedActionTimeoutMsnumberGuide action target timeout (ms). Bounds: 1000 to 15000
maxWorkflowStepsnumberMaximum steps in one guided task. Bounds: 1 to 24
assistantModeselectHelp assistant. Choices: deterministic, local-ai, mcp, mcp-local-ai, auto
personalityNametextDefault help personality name
personalityTonetextDefault help personality tone
personalityPrompttextareaHelp assistant instruction
mcpSourceIdtextOptional MCP documentation source ID
mcpToolNametextOptional MCP documentation tool name
maxHelpContextCharsnumberMaximum help context characters. Bounds: 1000 to 24000
maxAssistantTokensnumberMaximum help answer tokens. Bounds: 64 to 1024
targetResolveTimeoutMsnumberWait for lazy-rendered tour targets (ms). Bounds: 0 to 15000
helpButtonLabeltextUser help button label
adminButtonLabeltextAdmin Guide button label

Agent interfaces

These names are declared by the package for host/Agent integration, not JavaScript methods to invoke directly. The host must register a tool, grant its scope and enforce its approval policy. A manifest declaration alone does not prove availability in every Agent catalogue. Prefer the application API above when integrating your own app.

ToolDeclared riskApproval requirement
app.surface.invoke_declaredhighexplicit
guide.workflows.listlowmode-policy
guide.workflow.runhighexplicit
guide.workflow.statuslowmode-policy
guide.workflow.cancelmediummode-policy

Component changelog

changed0.11.2Permalink

Guide

Awaits application preparation on every explicit workflow launch. Fresh runs and exact saved-record continuations use a shared lifecycle hook, with cancellation and stale Auto protection. Existing transaction approvals and step retries retain their boundaries. Requires an updated owner and freshly compiled application.

Public component note; package availability and installed acceptance are separate.
baseline0.11.1Permalink

Guide

Product-authored help, tours and bounded workflows.

Documentation snapshot, not a historical release date.
View component notes →
↑ ↓ to navigate · Enter to open · Esc to close. Search stays in your browser.