mise API - v0.0.0
    Preparing search index...

    Module @fnndsc/cumin

    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.

      ____                _
    / ___| _ ___ ____(_)_ __
    | | | | | | '_ \| '_ \| '_ \
    | |__| |_| | | | | | | | | | |
    \____\__,_|_| |_|_| |_|_| |_|

    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:

    1. Connection Management: Handling authentication, token storage, and client initialization.
    2. Context Persistence: Implementing the "Context" engine that remembers the active User, CUBE URL, and Working Directory.
    3. IO & Storage: Providing an abstraction (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).

    • Consumers: Primarily salsa (logic) and chili (CLI state).
    • Environment: Designed for Node.js but architected with interfaces to support browser environments.
    • 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.
      • Includes readBinary for binary file uploads.
      • Includes recursive directory traversal helpers.
    • 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:

    1. Install dependencies:

      npm install
      
    2. Compile:

      npm run build
      

    MIT — part of the ChRIS Project.


    -30-

    BrowserType
    Context
    BrowserStorageProvider
    ChRISComputeResourceGroup
    ChRISConnection
    ChRISConnectionError
    ChrisContext
    ChRISContextSpecError
    ChRISEmbeddedResourceGroup
    ChRISFeed
    ChRISFeedGroup
    ChRISFileBrowser
    ChRISGroupGroup
    ChRISInitializationError
    ChRISinode
    ChrisIO
    ChRISPACSGroup
    ChRISPACSQueryGroup
    ChRISPACSRetrieveGroup
    ChRISPipelineGroup
    ChRISPlugin
    ChRISPluginGroup
    ChRISPluginInstanceGroup
    ChRISPluginMetaGroup
    ChRISPluginMetaPluginGroup
    ChRISResource
    ChRISResourceGroup
    ChRISTagGroup
    ChRISWorkflowGroup
    Client
    ConnectionConfig
    ListCache
    NodeStorageProvider
    ProcCache
    QueryIndex
    Searchable
    SessionConfig
    BoolString
    CacheOptions
    CacheResult
    CacheStats
    ChRISElementsGet
    ChRISEmbeddedResourceGroupParams
    ChrisGroup
    ChrisGroupMember
    ChrisIdentity
    ChRISObjectParams
    ChrisPathNode
    ChrisPluginSummary
    ChrisUser
    ClIarguments
    ComputeResource
    ComputeResourceData
    ConnectionConfigOptions
    ContextSpec
    CubePace
    Dictionary
    DownloadToken
    ElevationCredentials
    Feed
    FeedAccess
    FeedComment
    FeedData
    FeedNote
    FeedRecord
    FeedTag
    FileBrowserFolder
    FilteredResourceData
    FullContext
    InstanceParameterData
    IStorageProvider
    Item
    ItemResource
    LedgerEntry
    LedgerFamily
    LedgerSnapshot
    ListCacheEntrySnapshot
    ListCacheSnapshot
    ListCheckpointRestoreResult
    ListOptions
    ListPage
    ListResource
    LocalAccount
    LoginFailure
    PACSFile
    PACSQueryCreateData
    PACSQueryDecodedResult
    PACSQueryListOptions
    PACSQueryRecord
    PACSQueryStatusReport
    PACSRetrieveRecord
    PACSSeriesFacts
    PACSServer
    PACSServerListOptions
    PageWalkOptions
    PageWalkStep
    PipelineHandle
    PipelineRecord
    PipelineSourceFileData
    PipingDefaultParameterData
    PluginData
    PluginFound
    PluginHandle
    PluginInstance
    PluginInstanceData
    PluginInstanceHandle
    PluginParameterData
    PluginPipingData
    PluginPipingItem
    ProcCacheLifecycle
    ProcCacheSnapshot
    ProcCheckpointRestoreResult
    ProcFeed
    ProcFeedDataFacts
    ProcFeedLoadProgress
    ProcFeedScopeCounts
    ProcFeedSnapshot
    ProcInstance
    ProcJobGroup
    ProcLandedFeed
    ProcLayoutRecord
    ProcPromptProgress
    ProcWarmupProgress
    QueryHits
    QueryIndexEntry
    QueryIndexEntrySnapshot
    QueryIndexRestoreResult
    QueryIndexSnapshot
    QuerySweepResult
    Resource
    ResourceFieldsPerItem
    ResourcesByFields
    RosterFolders
    RuntimeOutput
    SearchableData
    SeriesRetrieveStatus
    SeriesStorageFilter
    SeriesStorageState
    SessionConfigOptions
    SimpleRecord
    SingleContext
    StackMessage
    StudyRetrieveStatus
    TagEntry
    TokenConnectOptions
    TokenConnectOutcome
    URLContext
    UserContext
    UserFile
    WindowedPageWalkOptions
    WorkflowCreateOptions
    WorkflowNodeOverride
    WorkflowResult
    CommandEnvelope
    EnvelopeModel
    EnvelopeStatus
    FeedGrantKind
    LocalAccountAction
    LoginFailureKind
    PluginAdminSource
    ProcCacheChange
    ProcCacheListener
    ProcCacheState
    ProcDataFormat
    ProcLayoutPosition
    ProcPromptState
    ProcRosterSyncKind
    QueryIndexListener
    ResolutionTrace
    Result
    SearchableType
    chrisConnection
    chrisContext
    chrisIO
    connectionConfig
    errorStack
    LEDGER_KEPT
    LIST_CACHE_MAX_ENTRIES
    LIST_CACHE_PLUGIN_INDEX_TTL_MS
    LIST_CACHE_SIGNAL_BACKED_TTL_MS
    LIST_CACHE_SIGNAL_FREE_TTL_MS
    LISTING_INVALIDATION_WINDOW_MS
    PACE_WINDOW
    PACS_SERVERS_KEEP_MS
    PROC_ARRIVAL_TTL_MS
    PROC_FEED_LOAD_FAILURE_TTL_MS
    PROC_LANDED_TTL_MS
    PROC_LAYOUT_ID_MAX
    PROC_LAYOUT_NODES_MAX
    PROC_TERMINAL_STATUSES
    QUERY_INDEX_CHECKPOINT_FLOOR_MS
    QUERY_LOG_PATH
    QUERY_SWEEP_PAGE
    QUERY_SWEEP_PAGE_MAX
    sessionConfig
    STREAM_STALL_MS
    TAG_COLOR_DEFAULT
    TAGS_MAP_TTL_MS
    chrisConnection_init
    chrisContextURL_parse
    ChRISinode_create
    chrisVersion_get
    client_adminPluginUpload
    collectionPage_wrap
    computeResourceNames_parse
    computeResources_getAll
    computeResources_validate
    config_init
    context_split
    currentIdentity_get
    currentUser_get
    dictionary_parseFromCLI
    downloadToken_create
    envelope_error
    envelope_isOk
    envelope_ok
    Err
    errorStack_configure
    errorStack_getAllOfType
    feed_delete
    feed_get
    feed_isActive
    feed_makePrivate
    feed_makePublic
    feed_rename
    feed_resolve
    feed_share
    feedAccess_read
    feedComment_create
    feedComment_delete
    feedComment_update
    feedComments_list
    feedNote_get
    feedNote_update
    feedShare_group
    feedShare_revoke
    feedShares_list
    feedsPage_get
    feedStatus_deriveFromCounts
    feedTag_add
    feedTag_remove
    feedTags_list
    feedTags_readByFeed
    feedTagsMap_forget
    feedTopology_changed
    folderLookup_memoize
    groupMembers_getAll
    groups_getAll
    groupUser_add
    groupUser_remove
    itemData_get
    items_get
    keyPairParams_apply
    keyPairString_parse
    ledger_requestEnd
    ledger_requestStart
    listCache_get
    listCheckpoint_restore
    listCheckpoint_save
    listCheckpoint_watch
    listCheckpointPath_get
    listData_get
    listingInvalidation_flush
    listingInvalidation_reset
    listingsForFeeds_drop
    listingsForFeeds_note
    listingsForRoster_note
    listPages_drain
    listPages_walk
    listPages_walkWindowed
    listParams_buildFromOptions
    localAccount_action
    localAccount_adminAccessEnsure
    localAccount_create
    localAccount_find
    loginFailure_classify
    loginFailure_diagnose
    loginFailure_lines
    objContext_create
    objContext_evict
    Ok
    pace_get
    pace_isPageMethod
    pace_note
    pace_reset
    pacsFile_getBlob
    pacsFile_getText
    pacsQueries_create
    pacsQueries_list
    pacsQuery_get
    pacsQuery_resultDecode
    pacsRetrieve_create
    pacsRetrieve_delete
    pacsRetrieve_statusForQuery
    pacsRetrieves_list
    pacsSeriesFacts_clear
    pacsSeriesFacts_fetch
    pacsSeriesFolder_parse
    pacsServer_resolve
    pacsServers_forget
    pacsServers_list
    path_extractFeedID
    path_extractPluginInstanceID
    path_findLatestDircopy
    path_isInFeed
    pipeline_createWorkflow
    pipeline_forget
    pipeline_get
    pipeline_resolve
    pipelineFile_getByPath
    pipelineFile_getTextByPath
    pipelineMemo_count
    pipelineRecord_keep
    pipelineRecord_recall
    pipelineResource_keep
    pipelineResource_recall
    pipelines_list
    pipelineSourceFiles_drain
    pipelineSourceFilesPage_get
    plugin_find
    plugin_registerDirect
    pluginAdmin_upload
    pluginInstance_get
    pluginInstancesPage_get
    pluginParameters_drain
    pluginsPage_get
    procCache_get
    procCheckpoint_restore
    procCheckpoint_save
    procCheckpoint_watch
    procCheckpointDir_get
    procCheckpointFeed_save
    procCheckpointPath_get
    procCheckpointRoster_save
    procLayout_get
    procLayout_set
    procLayoutHome_set
    procLayoutName_check
    procLayoutPositions_check
    publicFeedsPage_get
    queryCriteria_parse
    queryIndex_get
    queryIndex_note
    queryIndex_sweep
    queryIndexCheckpoint_restore
    queryIndexCheckpoint_save
    queryIndexCheckpoint_watch
    queryIndexCheckpointPath_get
    queryKey_build
    queryRow_convertToEntry
    record_extract
    requestFamily_derive
    requestLedger_reset
    requestLedger_snapshot
    requestLedger_start
    resourceFields_get
    result_isErr
    result_isOk
    retry_untilValue
    runtimeOutput_data
    runtimeOutput_err
    runtimeOutput_set
    series_extractFromStudy
    series_findByUID
    seriesStorage_resolve
    seriesStorage_resolveMany
    status_isTerminal
    stream_watchStalls
    studies_extractFromDecoded
    study_findByUID
    tag_create
    tag_delete
    tag_extractRaw
    tag_extractValue
    tag_rename
    tagMissing_message
    tags_index
    url_probe