Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ updates:
- '/common/backend/'
- '/agents/agent-mastra/'
- '/agents/agent-voltagent/'
- '/agents//langgraph-deep-agent/'
- '/basic/cdk/'
- '/basic/app/'
- '/mpc/clients/langgraph-mpc-client/'
Expand Down
138 changes: 69 additions & 69 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,72 +42,72 @@ jobs:
- name: lint
run: bun run lint

lint-build-mastra:
strategy:
matrix:
node-version: [22.x]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
check-latest: true

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: |
- recursive: true
args: [--no-frozen-lockfile]
cwd: agents/agent-mastra
- args: [--global, esbuild]
package_json_file: agents/agent-mastra/package.json

- uses: oven-sh/setup-bun@v2

- name: lint
working-directory: agents/agent-mastra
run: bun run lint

- name: build
working-directory: agents/agent-mastra
run: bun run build

lint-build-mastra-mcp-client:
strategy:
matrix:
node-version: [22.x]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
check-latest: true

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: |
- recursive: true
args: [--no-frozen-lockfile]
cwd: mpc/clients/mastra-mcp-client
- args: [--global, esbuild]
package_json_file: mpc/clients/mastra-mcp-client/package.json

- uses: oven-sh/setup-bun@v2

- name: lint
working-directory: mpc/clients/mastra-mcp-client
run: bun run lint

- name: build
working-directory: mpc/clients/mastra-mcp-client
run: bun run build
# lint-build-mastra:
# strategy:
# matrix:
# node-version: [22.x]

# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v5

# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# check-latest: true

# - uses: pnpm/action-setup@v4
# name: Install pnpm
# with:
# run_install: |
# - recursive: true
# args: [--no-frozen-lockfile]
# cwd: agents/agent-mastra
# - args: [--global, esbuild]
# package_json_file: agents/agent-mastra/package.json

# - uses: oven-sh/setup-bun@v2

# - name: lint
# working-directory: agents/agent-mastra
# run: bun run lint

# - name: build
# working-directory: agents/agent-mastra
# run: bun run build

# lint-build-mastra-mcp-client:
# strategy:
# matrix:
# node-version: [22.x]

# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v5

# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# check-latest: true

# - uses: pnpm/action-setup@v4
# name: Install pnpm
# with:
# run_install: |
# - recursive: true
# args: [--no-frozen-lockfile]
# cwd: mpc/clients/mastra-mcp-client
# - args: [--global, esbuild]
# package_json_file: mpc/clients/mastra-mcp-client/package.json

# - uses: oven-sh/setup-bun@v2

# - name: lint
# working-directory: mpc/clients/mastra-mcp-client
# run: bun run lint

# - name: build
# working-directory: mpc/clients/mastra-mcp-client
# run: bun run build
43 changes: 43 additions & 0 deletions .serena/memories/code_style_conventions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Code Style and Conventions

## TypeScript Configuration
- **Module System**: ES modules (`"type": "module"`)
- **Target**: Modern ES versions
- **Strict Mode**: Enabled for type safety

## Linting and Code Quality
- **ESLint**: Used for code linting with TypeScript support
- **Configuration**: Modern ESLint flat config format
- **Plugins**:
- @typescript-eslint for TypeScript-specific rules
- @stylistic/eslint-plugin for code formatting
- eslint-plugin-import for import/export rules
- eslint-plugin-promise for Promise handling
- @vitest/eslint-plugin for test files

## File Organization
- **Source Code**: Located in `src/` directory
- **Entry Point**: `src/index.ts`
- **Configuration Files**: Root level (eslint.config.js, tsconfig.json, etc.)

## Naming Conventions
- **Files**: kebab-case for directories and files
- **Variables/Functions**: camelCase
- **Classes**: PascalCase
- **Constants**: UPPER_SNAKE_CASE
- **Interfaces/Types**: PascalCase with descriptive names

## Import/Export Style
- **Imports**: Use explicit imports with proper paths
- **Exports**: Prefer named exports over default exports
- **Path Resolution**: Use TypeScript path mapping when available

## Error Handling
- **Async/Await**: Preferred over Promises with .then()
- **Try/Catch**: Comprehensive error handling with specific error types
- **Logging**: Console logging for development, structured logging for production

## Documentation
- **README.md**: Each package should have comprehensive documentation
- **Code Comments**: JSDoc style for functions and classes
- **Type Annotations**: Explicit typing preferred over inference where clarity is needed
30 changes: 30 additions & 0 deletions .serena/memories/project_overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Project Overview

## Purpose
llm-ts-example is a collection of TypeScript examples demonstrating various LLM (Large Language Model) implementations and frameworks. The project showcases different approaches to building AI agents and applications using modern TypeScript tooling.

## Tech Stack
- **Language**: TypeScript
- **Package Manager**: pnpm (v10.14.0)
- **Build System**: TypeScript compiler (tsc)
- **Testing**: Vitest
- **Linting**: ESLint with TypeScript support
- **Runtime**: Node.js with tsx for development

## Main Components
The project is organized into several example directories:
- `basic/` - Basic chat implementation with LangChain.js and LangGraph.js
- `rag/` - RAG (Retrieval Augmented Generation) examples
- `agents/` - Various agent implementations including:
- `agent-mastra/` - Mastra framework examples
- `agent-voltagent/` - VoltAgent examples
- `langgraph-deep-agent/` - LangGraph Deep Agent implementation
- `node-llama-cpp/` - Local LLM examples using node-llama-cpp
- `webllm/` - WebLLM examples
- `mpc/` - MPC (Multi-Party Computation) examples
- `common/` - Shared utilities and core components

## Architecture
- Monorepo structure using pnpm workspaces
- Each subdirectory is a separate package with its own dependencies
- Shared common packages for backend and core functionality
78 changes: 78 additions & 0 deletions .serena/memories/suggested_commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Suggested Commands

## Development Commands

### Package Management
```bash
# Install dependencies for all packages
pnpm install

# Install dependencies for specific package
pnpm --filter <package-name> install
```

### Building
```bash
# Build all packages
pnpm build

# Build specific package
pnpm --filter <package-name> build
```

### Linting and Formatting
```bash
# Lint all packages
pnpm lint

# Fix linting issues in all packages
pnpm lint-fix

# Lint specific package
pnpm --filter <package-name> lint
```

### Testing
```bash
# Run tests (in packages that have tests)
pnpm --filter <package-name> test

# Run tests in watch mode
pnpm --filter <package-name> test:watch
```

### Running Examples
```bash
# Run development server (for packages with dev script)
pnpm --filter <package-name> dev

# Run built application
pnpm --filter <package-name> start
```

### Cleaning
```bash
# Clean all packages
pnpm clean

# Clean specific package
pnpm --filter <package-name> clean
```

## System Commands (macOS)
```bash
# File operations
ls -la # List files with details
find . -name # Find files by name
grep -r # Search in files recursively

# Git operations
git status # Check repository status
git add . # Stage all changes
git commit -m # Commit with message
git push # Push to remote

# Process management
ps aux # List running processes
kill -9 <pid> # Force kill process
```
77 changes: 77 additions & 0 deletions .serena/memories/task_completion_checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Task Completion Checklist

## Before Committing Code

### 1. Code Quality Checks
```bash
# Run linting
pnpm lint

# Fix any linting issues
pnpm lint-fix

# Build the project to check for compilation errors
pnpm build
```

### 2. Testing
```bash
# Run tests if available
pnpm --filter <package-name> test

# Ensure all tests pass
```

### 3. Documentation
- [ ] Update README.md if functionality changed
- [ ] Add/update code comments for complex logic
- [ ] Ensure TypeScript types are properly documented

### 4. Dependencies
- [ ] Check if new dependencies are properly added to package.json
- [ ] Ensure version compatibility across packages
- [ ] Update pnpm-lock.yaml if needed

### 5. Git Operations
```bash
# Check status
git status

# Stage changes
git add .

# Commit with descriptive message
git commit -m "feat: add new functionality"

# Push to remote
git push
```

## Specific Checks for LLM Examples

### 1. Environment Variables
- [ ] Ensure .env files are properly configured
- [ ] Check API keys and credentials are not committed
- [ ] Verify environment variable documentation

### 2. Model Configuration
- [ ] Test with different model providers if applicable
- [ ] Verify streaming/non-streaming configurations
- [ ] Check token limits and error handling

### 3. Agent Functionality
- [ ] Test agent responses with various inputs
- [ ] Verify tool integrations work correctly
- [ ] Check error handling for API failures

## Markdown Specific (for README updates)
```bash
# Install markdownlint if not available
npm install -g markdownlint-cli

# Check markdown files
markdownlint README.md

# Fix common issues automatically
markdownlint --fix README.md
```
Loading