Scan your whole stack
Are you using @statewalker/workspace.browser?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.9.0
@statewalker/workspace.browser was last scanned on 29 Nov 2026 at version 0.9.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 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 |
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.
The publisher’s own README, as collected from the registry.
The browser binding for the workspace from @statewalker/workspace.core, built on the File System Access API. It lets the user pick a folder, wraps the directory handle as a FilesApi (BrowserFilesApi from @statewalker/webrun-files-browser), stores the handle in IndexedDB so the same folder reopens after a reload, asks for permission again when the browser has dropped it, and exposes the whole lifecycle as one observable state (WorkspaceShellAdapter). It adds the workspace:reconnect and workspace:disconnect commands and its own handler for workspace:change. No React; @statewalker/workspace.view.react renders it.
workspace.core defines the workspace and a host-neutral workspace:change command, but a browser host needs four things it cannot provide:
platform:pick-directory returns only { files, label }; without the handle there is nothing to persist, and every reload would ask the user to pick again. This package calls the picker itself so it keeps the handle.WorkspaceShellAdapter is that single source.pnpm add @statewalker/workspace.browser
No peer dependencies.
| Import | Contents |
|---|---|
@statewalker/workspace.browser |
WorkspaceShellAdapter, the commands, and (default export) the fragment init. |
@statewalker/workspace.browser/fragment |
Default export initWorkspaceBridge(ctx); returns an async cleanup. |
Browser only (window.showDirectoryPicker, IndexedDB). ESM with .d.ts. The package ships dist/ (built JS and types) and src/ (TypeScript sources).
The workspace in ctx (getWorkspace(ctx) from workspace.core) must have a Commands adapter from @statewalker/shared-commands.
import initWorkspaceBridge from "@statewalker/workspace.browser/fragment";
const cleanup = initWorkspaceBridge(ctx); // starts restoring the stored folder
// on teardown:
await cleanup();
Pick, reconnect and disconnect:
import { Commands } from "@statewalker/shared-commands";
import { getWorkspace } from "@statewalker/workspace.core";
import {
ChangeWorkspaceCommand,
WorkspaceDisconnectCommand,
WorkspaceReconnectCommand,
} from "@statewalker/workspace.browser";
const commands = getWorkspace(ctx).requireAdapter(Commands);
await commands.call(ChangeWorkspaceCommand, {}).promise; // folder picker; call from a user gesture
await commands.call(WorkspaceReconnectCommand, {}).promise; // permission prompt; call from a user gesture
await commands.call(WorkspaceDisconnectCommand, {}).promise; // close and forget the folder
Bind a workspace without a dialog (tests, tools):
import { MemFilesApi } from "@statewalker/webrun-files-mem";
await commands.call(ChangeWorkspaceCommand, { files: new MemFilesApi(), label: "scratch" }).promise;
// shell state is now { status: "ready", label: "scratch" }
Follow the state (WorkspaceShellAdapter extends BaseClass, so onUpdate fires on every change):
import { WorkspaceShellAdapter } from "@statewalker/workspace.browser";
const shell = getWorkspace(ctx).requireAdapter(WorkspaceShellAdapter);
const off = shell.onUpdate(() => {
const s = shell.getState();
switch (s.status) {
case "loading": break; // restore in progress
case "unsupported": break; // s.reason
case "empty": break; // show the folder picker
case "needs-permission": break; // offer "Reconnect s.label"
case "ready": break; // s.label
}
});
init()
|
{ status: "loading" }
| restore
+--------------+-------+-------+------------------+
no showDirectory no stored query = "prompt" query = "granted"
Picker handle | |
| | | adopt handle,
"unsupported" "empty" "needs-permission" open workspace
| |
reconnect (user gesture) "ready"
granted -> adopt -> "ready"
otherwise -> forget -> "empty"
A stored handle whose permission is denied is forgotten (empty). workspace:disconnect from any state closes the workspace, deletes the stored handle and returns to empty.
WorkspaceShellAdapter is a BaseClass with one discriminated union. Command handlers, the onLoad subscription, restore and permission flows live in the internal WorkspaceBridgeManager.setAdapter-ed. initWorkspaceBridge calls workspace.requireAdapter(WorkspaceShellAdapter), which constructs the concrete class once. setAdapter would replace the instance on every repeated init and leave existing subscribers (for example a mounted React tree) on a dead instance.onLoad. It must run before the first open(); the adapter stays loading until it settles.onLoad listener sets ready. Restore, interactive pick and files rebind all end in workspace.open(), and that single listener makes the transition.workspace.close() -> initWorkspace({ workspace, filesApi, label }) -> workspace.open(), so onUnload listeners for the old folder run before the new FilesApi is installed.unsupported with the reason This browser does not support the File System Access API (Chromium-only at the moment).workspace:change and workspace:reconnect must run from a user gesture, otherwise the browser rejects the picker or the permission prompt. The rejection is passed through as the command's error. Cancelling the picker also rejects the command.chat-mini:workspace-handle. There is no history of folders.workspace:change handler. The ./fragment init of workspace.core registers one too, without handle persistence; if a host loads both, both listen for the same command.initWorkspaceBridge(ctx) (default export) - returns () => Promise<void>.WorkspaceShellAdapter (getState()), type WorkspaceShellState.ChangeWorkspaceCommand, ChangeWorkspacePayload, ChangeWorkspaceResult - re-exported from workspace.core.WorkspaceReconnectCommand (workspace:reconnect, WORKSPACE_RECONNECT_COMMAND_KEY), WorkspaceDisconnectCommand (workspace:disconnect, WORKSPACE_DISCONNECT_COMMAND_KEY), WorkspaceVoidPayload, WorkspaceVoidResult.@statewalker/workspace.core - Workspace, getWorkspace, initWorkspace, ChangeWorkspaceCommand.@statewalker/webrun-files, @statewalker/webrun-files-browser - the FilesApi contract and BrowserFilesApi over a directory handle.@statewalker/shared-commands - Commands and the command builder.@statewalker/shared-baseclass - observable base of WorkspaceShellAdapter.@statewalker/shared-registry - groups the listener disposers for cleanup.idb-keyval - minimal IndexedDB get/set/delete for the stored handle.MIT
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.
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).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.