Skip to content

Latest commit

 

History

History
93 lines (70 loc) · 3.73 KB

CONTRIBUTING.md

File metadata and controls

93 lines (70 loc) · 3.73 KB

Contributing to memoryblock

First off, thank you for considering contributing to memoryblock! It's people like you that make the open-source community such an amazing place to learn, inspire, and create.

We welcome contributions of all kinds: bug fixes, new features, documentation improvements, or even just typo fixes.

⚡ Quick Links

🛠️ Development Setup

The memoryblock workspace is organized as a monorepo and utilizes Bun for running directly from source and pnpm for package management.

Prerequisites

  • Node.js: Version 18.x or higher.
  • pnpm: Version 10.x or higher.
  • Bun: Version 1.0.0 or higher (needed for script execution).

1. Fork and Clone

  1. Fork the repository to your GitHub account.
  2. Then clone your fork locally:
    git clone https://github.com/YOUR_USERNAME/memoryblock.git
    cd memoryblock

2. Initialize and Prep Environment

We provide a setup script that cleans previous builds, installs dependencies, lints, and verifies the build integrity for you:

pnpm dev:prep

3. Using the Local CLI (mblk)

During development, you don't need to link the package. You can execute the local dev build directly using the monorepo-bound script:

# General CLI Command structure
pnpm mblk <command>

# Examples:
pnpm mblk start
pnpm mblk create
pnpm mblk create agent

This runs the script using Bun referencing your local edits in real time!

📂 Project Structure

memoryblock is structured for modularity to keep resources separated and lightweight:

packages/
  ├── memoryblock/      # CLI orchestrator and `mblk` command wrapper
  ├── core/             # Engine runtime, Memory Manger, Monitor loop
  ├── types/            # Shared TypeScript definitions and Zod schemas
  ├── daemon/           # Background process spawner and lifecycle host
  ├── adapters/         # LLM models (OpenAI, Gemini, Anthropic, Bedrock)
  ├── channels/         # Communication channels (Telegram, CLI, Web)
  ├── plugins/          # Extension plugins (installer, agents, web-search)
  ├── tools/            # Core sandbox schemas and OS tool execution
  ├── api/              # HTTP API routing server
  ├── locale/           # Translation and formatting core
  └── web/              # User Interface static files / Dashboard
scripts/                # Clean setup, verification and maintenance logic

🚀 Submitting a Pull Request

  1. Create a Branch: Always create a new branch for your changes.
    • feat/my-new-feature
    • fix/bug-description
  2. Make Changes: Write clear, concise code.
  3. Validate locally:
    • Run pnpm dev:verify to run failsafe checks.
    • Run pnpm dev:lint to ensure consistency.
  4. Commit: We prefer Conventional Commits.
    • feat: add webhooks dashboard
    • fix: resolve api token sync error
  5. Push & Open PR: Push your branch and open a Pull Request against the main branch.

🎨 Style Guidelines

  • Linting: Please ensure your code follows the workspace standard. Run pnpm dev:lint:fix to fix any issues.
  • Compatibility: MemoryBlock aims to be highly resource-efficient. Avoid adding bulky dependencies.

🤝 Community

Please note that this project is released with a Contributor Code of Conduct. By participating you agree to abide by its terms.