
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
@hiro-ui/sdk
Advanced tools
Initializes the SDK and provides config details from HIRO Desktop. initSdk also provides a ready callback and a state object.
const config = {}; // Optional default config
initSdk(config).then(
({
config: { } // Config values provided by SDK
ready, // Callback, once your application is ready
state, // Stored application state
}: InitSdkResult) => {
// SDK is initialized and ready to use
}
);
Closes the application within HIRO Desktop
close();
Callback to SDK for unauthorized Token
unauthorized();
Sync application state back to HIRO Desktop
const state = {}; // Application state object
saveState(state);
Open a different application, with parameters, from within your application.
const appParameters = {}; // Parameters for the new application
runApp(appId, appParameters);
interface SdkConfig {
authUrl?: string;
graphUrl?: string;
redirectUrl?: string;
clientId?: string;
roles?: string[];
}
interface LoadedConfig {
graphUrl?: string;
token?: string;
}
interface DesktopUser {
_id: string;
accountId: string;
email: string;
id: string;
name: string;
roles: string[];
}
interface DesktopConfig {
user: DesktopUser;
org: {
id: string;
name: string;
};
token: string;
graphUrl: string;
shared: {
[key: string]: any;
};
options?: {
[key: string]: any;
};
}
InitSdkResult TypeScript Interface
interface InitSdkResult<S = {}> {
ready: () => void;
state: S;
config: DesktopConfig;
}
import React from 'react';
import ReactDOM from 'react-dom';
import YourReactApp from './YourReactApp';
import {
SdkConfig, // SdkConfig TypeScript Interface
InitSdkResult, // InitSdkResult TypeScript Interface
initSdk, // Initializes the SDK
unauthorized, // Callback to SDK for unauthorized Token
} from '@hiro-ui/sdk';
import Client, { Token } from '@hiro-graph/client';
// Default config for Development
const config: SdkConfig = {
clientId: process.env.HIRO_CLIENT_ID,
graphUrl: process.env.HIRO_GRAPH_URL,
authUrl: process.env.HIRO_AUTH_URL,
redirectUrl: process.env.HIRO_REDIRECT_URL,
scopeId: process.env.HIRO_SCOPE_ID,
};
// Initializes the SDK with Default config
initSdk(config).then(
({
config: { user, graphUrl, token, shared, scopeId, options },
ready, // Callback, once your application is ready
state, // Stored application state
}: InitSdkResult) => {
// SDK is initialized and ready to use
const myToken = new Token({
onInvalidate: () => {
// Handle unauthorized Token
unauthorized();
return Promise.resolve();
},
getToken: () => Promise.resolve(token),
});
// Get Graph Client with SKD Configs
const graphClient = new Client({
endpoint: graphUrl,
token: myToken,
});
ReactDOM.render(
<YourReactApp />,
document.getElementById('app'),
ready, //ready callback for SDK
);
},
);
FAQs
HIRO Applications SDK.
We found that @hiro-ui/sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.