Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@statewalker/platform.core

Latest version: v0.9.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: mkotelnikov
0 Stars
0 Forks
6 Versions
1.1K Downloads
TypeScript Repo language

Scan summary

@statewalker/platform.core was last scanned on 29 Nov 2026 at version 0.9.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 6 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 0.9.0.
  • Downloads: 1,109 downloads.

Versions

6 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.9.0 LATEST 29 Nov 2026 No rules fired
0.8.0 16 Nov 2026 No rules fired
0.6.0 13 Nov 2026 No rules fired
0.7.0 13 Nov 2026 Not shown
0.5.2 6 Oct 2026 Not shown

No rules fired in 0.9.0

Findings

Findings for v0.9.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.9.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@statewalker/platform.core

What it is

The contract for host capabilities: pick a directory or files, download, copy to the clipboard, read and write durable preferences, and keep application state in the URL. Each capability is a command declaration for the workspace's Commands bus (@statewalker/shared-commands). This package declares them; @statewalker/platform.browser and @statewalker/platform.node answer them.

Why it exists

Fragments need to ask the host for things like "let the user choose a folder" without knowing whether they run in a browser tab, a Node test or another shell. Putting the typed contract here, with no host code, lets a fragment call PickDirectoryCommand the same way everywhere, and lets tests register fake handlers. The package touches no window, document or other browser global, so it runs unchanged in Node.

How to use

pnpm add @statewalker/platform.core
  1. Make sure a host implementation is active (for example @statewalker/platform.browser as a manifest root).
  2. Get the bus with getCommands(ctx).
  3. Call a declaration: getCommands(ctx).call(Declaration, payload).promise.
Declaration Key Payload -> result
PickDirectoryCommand platform:pick-directory { title? } -> { files: FilesApi; label }
PickFileCommand platform:pick-file { title?, accept?, multiple? } -> { blobs: Blob[]; names: string[] }
DownloadToFilesCommand platform:download-to-files { url, files, path, resume?, onProgress?, signal? } -> { bytes }
CopyToClipboardCommand platform:copy-to-clipboard { text } -> void
DownloadBlobCommand platform:download-blob { blob, filename } -> void
PreferenceGetCommand platform:preference-get { key } -> { value }
PreferenceSetCommand platform:preference-set { key, value } -> void

Each key is also exported as a constant (PICK_DIRECTORY_COMMAND_KEY, PICK_FILE_COMMAND_KEY, DOWNLOAD_TO_FILES_COMMAND_KEY, COPY_TO_CLIPBOARD_COMMAND_KEY, DOWNLOAD_BLOB_COMMAND_KEY, PREFERENCE_GET_COMMAND_KEY, PREFERENCE_SET_COMMAND_KEY), with payload and result types named after the command (PickDirectoryPayload, PickDirectoryResult, ..., DownloadProgress). FilesApi is from @statewalker/webrun-files.

Examples

Ask for a directory and handle cancellation:

import { getCommands, isUserCancelled, PickDirectoryCommand } from "@statewalker/platform.core";

try {
  const { files, label } = await getCommands(ctx).call(PickDirectoryCommand, {
    title: "Select workspace",
  }).promise;
} catch (error) {
  if (!isUserCancelled(error)) throw error;
}

Store a preference:

import { getCommands, PreferenceGetCommand, PreferenceSetCommand } from "@statewalker/platform.core";

const commands = getCommands(ctx);
await commands.call(PreferenceSetCommand, { key: "theme", value: "dark" }).promise;
const { value } = await commands.call(PreferenceGetCommand, { key: "theme" }).promise;

Download into a FilesApi with progress:

import { DownloadToFilesCommand, getCommands } from "@statewalker/platform.core";

const controller = new AbortController();
const { bytes } = await getCommands(ctx).call(DownloadToFilesCommand, {
  url: "https://example.com/model.bin",
  files,
  path: "/models/model.bin",
  resume: true,
  onProgress: ({ loaded, total }) => console.log(loaded, total),
  signal: controller.signal,
}).promise;

Keep state in the URL:

import { getUrlStateView, type UrlSerializer } from "@statewalker/platform.core";

const serializer: UrlSerializer = {
  serialize: (state) => ({ ...state, query: { ...state.query, session: activeSessionId } }),
  deserialize: (state) => switchToSession(state.query.session),
};

const view = getUrlStateView(ctx);
const unregister = view.register(serializer);
view.sync(); // the host binding writes view.buildState() to the URL

Signal cancellation from a handler:

import { UserCancelledError } from "@statewalker/platform.core";

command.reject(new UserCancelledError());

Internals

A call with no handler fails at once

Every declaration uses the async dispatch policy of @statewalker/shared-commands: when no handler is registered at call time, the call rejects immediately with CommandError with kind: "no-handlers" (commandKey names the command). A handler registered later does not pick up earlier calls. This happens on a host that does not implement a command (for example the pickers or the clipboard under @statewalker/platform.node), or when the call is made before the host fragment has started: start the platform fragment before the fragments that call it, and catch the error where the host may lack the command. A handler that takes the call without settling it (a listener that only observes) still leaves it pending.

Cancellation is a type, not a string

UserCancelledError (name === "UserCancelledError") and isUserCancelled(error) let callers tell "the user closed the dialog" from a real failure with one instanceof check, instead of matching AbortError names or messages.

The bus and the URL view are per workspace or per context

getCommands(ctx) returns getWorkspace(ctx).requireAdapter(Commands) from @statewalker/workspace.core, created on first use, so all fragments under one workspace share one bus. setCommands and removeCommands are kept only so old start-up code compiles; they do nothing except log [platform-api] setCommands is deprecated and a no-op: ....

getUrlStateView(ctx) (with setUrlStateView and removeUrlStateView) stores a Navigation instance (also exported as UrlStateView) under the context key model:url-state. Navigation extends BaseClass from @statewalker/shared-baseclass; sync() notifies onUpdate listeners, buildState() folds all serializers over { path: "", query: {} }, and applyUrl(state) feeds an incoming URL state to every serializer. One #syncing flag blocks re-entry, so a write to the URL never triggers a read back into the model in the same turn, and the reverse.

Dependencies

@statewalker/shared-commands (command declarations and bus), @statewalker/workspace.core (the workspace that owns the bus), @statewalker/shared-adapters and @statewalker/shared-baseclass (the URL view adapter and its observable base), @statewalker/webrun-files (the FilesApi type in payloads).

License

MIT

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @statewalker/platform.core

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Frame 2085668439 (1)
Group 1261154229