Skip to content

Foundational core library for the ReScript poly ecosystem - shared types, utilities, and abstractions

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.txt
Notifications You must be signed in to change notification settings

hyperpolymath/rescript-poly-core

rescript-poly-core: Foundational Library

1. Overview

rescript-poly-core is the foundational library for the Hyperpolymath ReScript Full Stack ecosystem. It provides core utilities for error handling, async operations, logging, configuration, and MCP (Model Context Protocol) infrastructure.

1.1. Key Features

  • Core Utilities: Extended Result, Async, Logger, and Config modules.

  • MCP Infrastructure: Protocol types, server builder, and tool registration for AI tools.

  • Zero Dependencies: Only requires @rescript/core.

  • Deno Native: Optimized for Deno runtime.

2. Installation

deno add jsr:@hyperpolymath/rescript-poly-core

3. Modules

3.1. Core.Result

Extended Result type for robust error handling:

open PolyCore
let result = Ok(42)->Result.map(x => x * 2)

3.2. Core.Async

Promise utilities with retry, timeout, and concurrency control:

let data = await Async.retry(
  ~config={maxAttempts: 5, initialDelayMs: 1000},
  () => fetchData()
)

3.3. Core.Logger

Structured JSON logging:

let logger = Logger.make(~config={minLevel: Logger.Debug})
logger->Logger.info("Server started")

3.4. MCP.Protocol & MCP.Server

Infrastructure for building AI tools:

let server = Server.make(~name="my-tools")
  ->Server.registerTool({name: "greet", ...}, handleGreet)

5. Usage

Import modules as needed:

open PolyCore
open PolyCore.MCP

6. Project Structure

src/
├── Core/          # Core utilities
├── MCP/           # MCP infrastructure
├── PolyCore.res   # Main entry point
tests/             # Test suite
docs/              # Extended documentation

7. Automation

Use just for build, test, and coverage tasks:

just build
just test
just test:coverage

8. License

This project is licensed under: - AGPL-3.0-or-later - MIT - Palimpsest v0.4

About

Foundational core library for the ReScript poly ecosystem - shared types, utilities, and abstractions

Topics

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.txt

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •