npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cutos/device-hello

v4.0.2

Published

CUTOS 4.0 Hello Device Capability SDK.

Readme

@cutos/device-hello

Hello Device Capability SDK for CUTOS 4.0 LWA applications.

This package is the consumer-side SDK for the hello Device Capability:

deviceType:    hello
capabilityId:  capability.device.hello
SDK version:   4.0.2
Contract:      0.1.0

The SDK communicates with a compatible CUTOS Runtime Provider such as device-hello-provider.

Install

npm install @cutos/core @cutos/device-hello

Quick start

import { CoreAPI } from "@cutos/core"
import { DeviceCapabilityHello } from "@cutos/device-hello"

await CoreAPI.init("localhost")

const device = new DeviceCapabilityHello()
await device.init()
await device.connect()

const info = await device.readDeviceInfo()
const result = await device.echo({ message: "Hello, CUTOS!" })

console.log(info)
console.log(result)

Standard Device API

DeviceCapabilityHello extends DeviceCapabilityBase and inherits:

await device.init()
await device.connect()
await device.disconnect()
await device.readDeviceInfo()

It also inherits the standard Device event subscriptions:

const offData = device.onData(data => console.log("data", data))
const offStatus = device.onStatus(status => console.log("status", status))
const offError = device.onError(error => console.error("error", error))

// Remove subscriptions when the LWA no longer needs them.
offData()
offStatus()
offError()

Hello extensions

echo

Send a message through the Provider and receive a Promise result:

const result = await device.echo({ message: "Hello, CUTOS!" })

// {
//   message: "Hello, CUTOS!",
//   timeStamp: 1710000000000
// }

simulateData

Ask the example Provider to emit one normal Device data event:

device.onData(data => console.log(data))
await device.simulateData()

simulateStatus

Ask the example Provider to emit a temporary running status and return to online:

device.onStatus(status => console.log(status))
await device.simulateStatus()

simulateError

Ask the example Provider to emit one asynchronous system error:

device.onError(error => console.error(error))
await device.simulateError()

The three simulate*() methods are demonstration extensions. Production Device Capability SDKs replace them with hardware-specific operations.

Cleanup

await device.disconnect()
device.dispose()

Versioning

The SDK, Capability Contract, and Provider have independent lifecycles:

  • SDK npm package: @cutos/device-hello 4.0.2
  • Capability Contract: 0.1.0
  • Example Provider: device-hello-provider 0.1.3

An SDK release may improve packaging, types, or documentation without changing the Capability Contract. A Provider can also release implementation updates while continuing to implement the same Contract.