____ _
/ ___| _ ___ ____(_)_ __
| | | | | | '_ \| '_ \| '_ \
| |__| |_| | | | | | | | | | |
\____\__,_|_| |_|_| |_|_| |_|
Cumin Underpins Management Infrastructure Needs
cumin is the infrastructure and state management layer of the ChRIS interface ecosystem. It is a backend library that handles the "dirty work" of connecting to ChRIS, managing authentication tokens, and persisting user sessions.
npm install @fnndsc/cumin
Requires Node.js ≥ 20.12. Ships with TypeScript type definitions.
import { ChRISConnection, ChrisContext, ChrisIO } from "@fnndsc/cumin";
// The context engine remembers the active user, CUBE URL, and working directory
const context = new ChrisContext();
await context.init();
const cubeURL: string | null = await context.ChRISURL_get();
See Core Features for the full API surface.
cumin abstracts the ChRIS REST API into a stateful, object-oriented environment. It is responsible for:
IStorageProvider) for filesystem access, enabling support for both Node.js (via fs) and other environments.In the "Sandwich Model" architecture, cumin is the bottom layer (just above the raw API client).
salsa (logic) and chili (CLI state).ChrisContext: The state machine for multi-tenant, multi-backend sessions.ChRISConnection: Wrapper for the low-level API client.IStorageProvider: Abstraction interface for reading/writing config and data.
readBinary for binary file uploads.ChrisIO: High-level IO operations, including recursive directory uploading (uploadLocalPath).ChRISResource.resources_getAll(): Generic pagination handler.ListCache (listCache_get()): Session-scoped directory listing cache for the VFS.ProcCache (procCache_get()): Session-scoped job monitoring DAG with versioned, identity-scoped daemon checkpoints. Restored topology remains usable while CUBE reconciliation runs; terminal status persists and active status refreshes on read. Powers the /proc/jobs/ VFS provider in salsa.To build the cumin library from source:
Install dependencies:
npm install
Compile:
npm run build
MIT — part of the ChRIS Project.
-30-
File
Cumin Package Main Entry Point.
This file serves as the main entry point and export aggregator for the Cumin infrastructure library. It exports error stacks, config utilities, PACs handlers, connections, file browsers, and result Monads for downstream consumption by Salsa, Chili, and Chell.