Install
openclaw skills install @unifyport/unifyport-node-sdkUse when maintaining or using the UnifyPort Node.js SDK; covers the Device API client, public contract, generated code, errors, retries, and the new API workflow.
openclaw skills install @unifyport/unifyport-node-sdkUse this skill when a task involves any of the following:
@unifyport/sdk-node operation;This is a development and integration skill. Installing it does not expose Device API operations as OpenClaw tools, install an MCP server, or provide credentials.
Choose one mode before taking action:
@unifyport/sdk-node package in an application.When working inside the SDK repository on MCP-only behavior, also use its repository-local
unifyport-mcp skill. That MCP skill is not part of the ClawHub publication boundary.
Confirm Node.js >=22.12.0.
Install the SDK with the package manager already used by the target project. For npm:
npm install @unifyport/sdk-node
Import UnifyPortDeviceClient and public types from the package root.
Read the base URL and API key from the runtime environment. Do not place them in source, generated files, logs, tool inputs, or committed configuration.
Use typed operation methods instead of manually assembling paths, query strings, or authentication headers.
Run the target project's existing tests and type checker after integration.
Minimal configuration:
import { UnifyPortDeviceClient } from "@unifyport/sdk-node";
function requiredEnv(name: string): string {
const value = process.env[name];
if (!value) throw new Error(`Missing required environment variable: ${name}`);
return value;
}
const device = new UnifyPortDeviceClient({
baseUrl: requiredEnv("UNIFYPORT_DEVICE_API_BASE_URL"),
apiKey: requiredEnv("UNIFYPORT_DEVICE_API_KEY")
});
Do not execute a live request merely to validate installation. Prefer type checking and mocked transport tests unless the user explicitly requests a live call and supplies an approved test environment.
Apply this section only when the workspace contains the SDK repository markers AGENTS.md,
contracts/device.openapi.yaml, and the root package.json for unifyport-sdk-node-workspace.
AGENTS.md.docs/architecture.md and docs/security.md. For API changes, also read docs/contract-maintenance.md.rg to confirm the actual operationId, client exports, and existing tests. Do not guess API names.Code generation accepts only one in-repository contract:
contracts/device.openapi.yaml.Update the contract only from approved public API schemas and release notes. Do not infer fields, status codes, authentication, or security rules that public material does not define.
The /v1/accounts/... paths in the contract represent provider account resources within the Device API. Account management, authorization, and runtime operations remain in SDK scope and must not be confused with a separate authentication service.
UnifyPortDeviceClient for the Device API. Its configuration type is DeviceClientConfig, and it authenticates with X-Api-Key.Do not pass an API key or base URL as a normal operation parameter. Passwords, codes, or session payloads required for provider account authorization may be passed only through the corresponding typed operations and must be treated as sensitive input.
uint64-style ID to number unless the contract explicitly guarantees a safe range.contracts/device.openapi.yaml.pnpm contracts:lint.pnpm generate and review the generated diff. Do not edit generated files directly.pnpm generate:check and pnpm check.pnpm public:check to verify public content and release boundaries.204 or a one-time secret.Full verification:
pnpm clawhub:check
pnpm check
pnpm public:check
Run individual checks as needed:
pnpm contracts:lint
pnpm generate:check
pnpm lint
pnpm format:check
pnpm test
pnpm typecheck
pnpm build
pnpm package:check
Lead the delivery note with the outcome, then list the approved public API schema or release notes used, changed files, authentication/retry/MCP classification changes, commands actually run, and uncovered risks. Do not claim that an unexecuted command passed.