@cronicorn/mcp-server 1.18.3 → 1.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -436
- package/dist/docs/api-reference.md +558 -0
- package/dist/docs/core-concepts.md +9 -1
- package/dist/docs/introduction.md +15 -5
- package/dist/docs/mcp-server.md +49 -69
- package/dist/docs/quick-start.md +11 -2
- package/dist/docs/self-hosting.md +10 -1
- package/dist/docs/technical/configuration-and-constraints.md +11 -2
- package/dist/docs/technical/coordinating-multiple-endpoints.md +11 -2
- package/dist/docs/technical/how-ai-adaptation-works.md +122 -385
- package/dist/docs/technical/how-scheduling-works.md +76 -2
- package/dist/docs/technical/reference.md +11 -2
- package/dist/docs/technical/system-architecture.md +57 -189
- package/dist/docs/troubleshooting.md +392 -0
- package/dist/docs/use-cases.md +10 -1
- package/dist/index.js +20 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/docs/competitive-analysis.md +0 -324
- package/dist/docs/developers/README.md +0 -29
- package/dist/docs/developers/authentication.md +0 -121
- package/dist/docs/developers/environment-configuration.md +0 -103
- package/dist/docs/developers/quality-checks.md +0 -68
- package/dist/docs/developers/quick-start.md +0 -87
- package/dist/docs/developers/workspace-structure.md +0 -174
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: developer-quick-start
|
|
3
|
-
title: Developer Quick Start
|
|
4
|
-
description: Set up your Cronicorn development environment with zero configuration
|
|
5
|
-
tags:
|
|
6
|
-
- developer
|
|
7
|
-
- essential
|
|
8
|
-
sidebar_position: 1
|
|
9
|
-
mcp:
|
|
10
|
-
uri: file:///docs/developers/quick-start.md
|
|
11
|
-
mimeType: text/markdown
|
|
12
|
-
priority: 0.9
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# Developer Quick Start
|
|
16
|
-
|
|
17
|
-
Get Cronicorn running locally with **zero configuration**.
|
|
18
|
-
|
|
19
|
-
## Prerequisites
|
|
20
|
-
|
|
21
|
-
- Node.js 24+ and pnpm 10+
|
|
22
|
-
- Docker (for PostgreSQL)
|
|
23
|
-
|
|
24
|
-
## Setup (No .env Required)
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
# 1. Clone and install
|
|
28
|
-
git clone https://github.com/weskerllc/cronicorn.git
|
|
29
|
-
cd cronicorn
|
|
30
|
-
pnpm install
|
|
31
|
-
|
|
32
|
-
# 2. Start database
|
|
33
|
-
pnpm db
|
|
34
|
-
|
|
35
|
-
# 3. Run migrations
|
|
36
|
-
pnpm db:migrate
|
|
37
|
-
|
|
38
|
-
# 4. Seed demo data (OPTIONAL: seeds sample data)
|
|
39
|
-
pnpm db:seed
|
|
40
|
-
|
|
41
|
-
# 5. Start development
|
|
42
|
-
pnpm dev
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
**That's it!** No `.env` file needed for local development.
|
|
46
|
-
|
|
47
|
-
## Login
|
|
48
|
-
|
|
49
|
-
Open http://localhost:5173 and login with:
|
|
50
|
-
|
|
51
|
-
| Field | Value |
|
|
52
|
-
|-------|-------|
|
|
53
|
-
| Email | `admin@example.com` |
|
|
54
|
-
| Password | `devpassword` |
|
|
55
|
-
|
|
56
|
-
> 💡 **For AI Agents**: The app works out of the box with default credentials. No environment variables or configuration required.
|
|
57
|
-
|
|
58
|
-
## Common Commands
|
|
59
|
-
|
|
60
|
-
| Command | Description |
|
|
61
|
-
|---------|-------------|
|
|
62
|
-
| `pnpm dev` | Start all services |
|
|
63
|
-
| `pnpm dev:api` | API server only |
|
|
64
|
-
| `pnpm dev:web` | Web app only |
|
|
65
|
-
| `pnpm db` | Start PostgreSQL |
|
|
66
|
-
| `pnpm db:migrate` | Run migrations |
|
|
67
|
-
| `pnpm db:seed` | Seed demo data |
|
|
68
|
-
| `pnpm db:reset` | Reset database |
|
|
69
|
-
| `pnpm db:generate` | Generate migrations after schema changes |
|
|
70
|
-
| `pnpm studio` | Database browser |
|
|
71
|
-
| `pnpm build` | Production build |
|
|
72
|
-
|
|
73
|
-
## Troubleshooting
|
|
74
|
-
|
|
75
|
-
**Can't login?**
|
|
76
|
-
→ Run `pnpm db:seed` to create the admin user
|
|
77
|
-
|
|
78
|
-
**Module errors?**
|
|
79
|
-
→ `pnpm build:packages`
|
|
80
|
-
|
|
81
|
-
**Database errors?**
|
|
82
|
-
→ Ensure Docker is running, then `pnpm db`
|
|
83
|
-
|
|
84
|
-
## Next Steps
|
|
85
|
-
|
|
86
|
-
- **[Environment Configuration](./environment-configuration.md)** - Customize settings or configure for production
|
|
87
|
-
- **[Authentication](./authentication.md)** - Set up GitHub OAuth or API keys
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: developer-workspace-structure
|
|
3
|
-
title: Workspace Structure
|
|
4
|
-
description: Overview of monorepo workspaces (apps and packages)
|
|
5
|
-
tags:
|
|
6
|
-
- developer
|
|
7
|
-
- architecture
|
|
8
|
-
sidebar_position: 3
|
|
9
|
-
mcp:
|
|
10
|
-
uri: file:///docs/developers/workspace-structure.md
|
|
11
|
-
mimeType: text/markdown
|
|
12
|
-
priority: 0.7
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# Workspace Structure
|
|
16
|
-
|
|
17
|
-
Cronicorn is organized as a pnpm monorepo with 8 apps and 13 packages. This guide helps you quickly locate code for specific features.
|
|
18
|
-
|
|
19
|
-
## Apps (8)
|
|
20
|
-
|
|
21
|
-
Deployable applications and services.
|
|
22
|
-
|
|
23
|
-
### `@cronicorn/api`
|
|
24
|
-
HTTP API server using Hono framework with OpenAPI/Swagger support and Better Auth authentication.
|
|
25
|
-
- **Tech**: Hono, Zod, Better Auth, Drizzle ORM
|
|
26
|
-
- **Port**: Configurable via env
|
|
27
|
-
- **Location**: `apps/api/`
|
|
28
|
-
|
|
29
|
-
### `@cronicorn/web`
|
|
30
|
-
Frontend web application built with React and TanStack Router.
|
|
31
|
-
- **Tech**: React 19, TanStack Router, Vite, Tailwind CSS 4
|
|
32
|
-
- **Dev**: Vite dev server with HMR
|
|
33
|
-
- **Location**: `apps/web/`
|
|
34
|
-
|
|
35
|
-
### `@cronicorn/scheduler-app`
|
|
36
|
-
Background worker that claims and executes scheduled job endpoints.
|
|
37
|
-
- **Tech**: Pino logging, Drizzle ORM, HTTP dispatcher
|
|
38
|
-
- **Purpose**: Main scheduling loop execution
|
|
39
|
-
- **Location**: `apps/scheduler/`
|
|
40
|
-
|
|
41
|
-
### `@cronicorn/ai-planner-app`
|
|
42
|
-
AI-powered worker that optimizes scheduling decisions using OpenAI.
|
|
43
|
-
- **Tech**: Vercel AI SDK, OpenAI provider
|
|
44
|
-
- **Purpose**: Adaptive scheduling intelligence
|
|
45
|
-
- **Location**: `apps/ai-planner/`
|
|
46
|
-
|
|
47
|
-
### `@cronicorn/docs`
|
|
48
|
-
Docusaurus-based documentation website.
|
|
49
|
-
- **Tech**: Docusaurus 3.9.2
|
|
50
|
-
- **Purpose**: Public and developer documentation
|
|
51
|
-
- **Location**: `apps/docs/`
|
|
52
|
-
|
|
53
|
-
### `@cronicorn/mcp-server`
|
|
54
|
-
Model Context Protocol server enabling AI agents to manage cron jobs.
|
|
55
|
-
- **Tech**: MCP SDK
|
|
56
|
-
- **Published**: Yes (public npm package)
|
|
57
|
-
- **Binary**: `cronicorn-mcp`
|
|
58
|
-
- **Location**: `apps/mcp-server/`
|
|
59
|
-
|
|
60
|
-
### `@cronicorn/migrator`
|
|
61
|
-
Database migration runner using Drizzle Kit.
|
|
62
|
-
- **Purpose**: Run migrations on startup or manually
|
|
63
|
-
- **Location**: `apps/migrator/`
|
|
64
|
-
|
|
65
|
-
### `@cronicorn/test-ai`
|
|
66
|
-
Test harness for AI integration experiments.
|
|
67
|
-
- **Purpose**: Development/testing only
|
|
68
|
-
- **Location**: `apps/test-ai/`
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Packages (13)
|
|
73
|
-
|
|
74
|
-
Shared libraries and adapters used by apps.
|
|
75
|
-
|
|
76
|
-
### Adapters (7)
|
|
77
|
-
|
|
78
|
-
Implement domain ports using external libraries/services.
|
|
79
|
-
|
|
80
|
-
#### `@cronicorn/adapter-ai`
|
|
81
|
-
AI SDK integration with mock support (MSW).
|
|
82
|
-
- **Location**: `packages/adapter-ai/`
|
|
83
|
-
|
|
84
|
-
#### `@cronicorn/adapter-cron`
|
|
85
|
-
Cron expression parsing using cron-parser.
|
|
86
|
-
- **Location**: `packages/adapter-cron/`
|
|
87
|
-
|
|
88
|
-
#### `@cronicorn/adapter-drizzle`
|
|
89
|
-
PostgreSQL database adapter with Drizzle ORM schema and repositories.
|
|
90
|
-
- **Location**: `packages/adapter-drizzle/`
|
|
91
|
-
|
|
92
|
-
#### `@cronicorn/adapter-http`
|
|
93
|
-
HTTP request dispatcher for endpoint execution.
|
|
94
|
-
- **Location**: `packages/adapter-http/`
|
|
95
|
-
|
|
96
|
-
#### `@cronicorn/adapter-pino`
|
|
97
|
-
Structured logging with Pino.
|
|
98
|
-
- **Location**: `packages/adapter-pino/`
|
|
99
|
-
|
|
100
|
-
#### `@cronicorn/adapter-stripe`
|
|
101
|
-
Stripe payment integration for subscriptions.
|
|
102
|
-
- **Location**: `packages/adapter-stripe/`
|
|
103
|
-
|
|
104
|
-
#### `@cronicorn/adapter-system-clock`
|
|
105
|
-
System clock implementation for production (vs fake clock for tests).
|
|
106
|
-
- **Location**: `packages/adapter-system-clock/`
|
|
107
|
-
|
|
108
|
-
### Core Domain (3)
|
|
109
|
-
|
|
110
|
-
#### `@cronicorn/domain`
|
|
111
|
-
Pure domain logic: ports, entities, policies, governor, scheduler (no external dependencies except Zod).
|
|
112
|
-
- **Location**: `packages/domain/`
|
|
113
|
-
- **Key**: All business rules live here
|
|
114
|
-
|
|
115
|
-
#### `@cronicorn/services`
|
|
116
|
-
Business logic layer: job management, scheduling services.
|
|
117
|
-
- **Location**: `packages/services/`
|
|
118
|
-
|
|
119
|
-
#### `@cronicorn/api-contracts`
|
|
120
|
-
OpenAPI contracts and Zod schemas for HTTP API routes (shared between API and Web).
|
|
121
|
-
- **Location**: `packages/api-contracts/`
|
|
122
|
-
|
|
123
|
-
### Workers (2)
|
|
124
|
-
|
|
125
|
-
#### `@cronicorn/worker-scheduler`
|
|
126
|
-
Core scheduling worker logic with simulation support.
|
|
127
|
-
- **Script**: `pnpm sim` runs deterministic scenarios
|
|
128
|
-
- **Location**: `packages/worker-scheduler/`
|
|
129
|
-
|
|
130
|
-
#### `@cronicorn/worker-ai-planner`
|
|
131
|
-
AI planner worker logic (orchestrates AI hints and nudges).
|
|
132
|
-
- **Location**: `packages/worker-ai-planner/`
|
|
133
|
-
|
|
134
|
-
### UI (1)
|
|
135
|
-
|
|
136
|
-
#### `@cronicorn/ui-library`
|
|
137
|
-
Shared React component library using shadcn/ui with Radix UI primitives.
|
|
138
|
-
- **Tech**: Tailwind CSS 4, Radix UI, React Hook Form, Recharts
|
|
139
|
-
- **Location**: `packages/ui-library/`
|
|
140
|
-
|
|
141
|
-
### Content (1)
|
|
142
|
-
|
|
143
|
-
#### `@cronicorn/content`
|
|
144
|
-
Centralized content: brand assets, pricing, FAQs, SEO metadata, business copy.
|
|
145
|
-
- **Exports**: Multiple subpaths (brand, pricing, docs, seo, etc.)
|
|
146
|
-
- **Location**: `packages/content/`
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
## Other folders
|
|
151
|
-
|
|
152
|
-
#### `/docs`
|
|
153
|
-
Central docs folder that is used by the docs app and mcp-server
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
## Key Architecture Notes
|
|
157
|
-
|
|
158
|
-
- **Monorepo**: pnpm workspaces with TypeScript project references
|
|
159
|
-
- **Build**: Packages build with `tsc`, apps use `tsx` (dev) or `tsc` (prod)
|
|
160
|
-
- **Env**: Single `.env` file at root, loaded via `dotenv-cli`
|
|
161
|
-
- **Testing**: Vitest with transaction-per-test pattern
|
|
162
|
-
- **Ports & Adapters**: Clean separation between domain and infrastructure
|
|
163
|
-
|
|
164
|
-
## Finding Code
|
|
165
|
-
|
|
166
|
-
| Looking for... | Check... |
|
|
167
|
-
|----------------|----------|
|
|
168
|
-
| API routes | `apps/api/src/routes/` |
|
|
169
|
-
| Database schema | `packages/adapter-drizzle/src/schema/` |
|
|
170
|
-
| Scheduling logic | `packages/domain/src/scheduler.ts` |
|
|
171
|
-
| UI components | `packages/ui-library/src/components/` |
|
|
172
|
-
| AI prompts | `packages/worker-ai-planner/src/` |
|
|
173
|
-
| HTTP dispatcher | `packages/adapter-http/` |
|
|
174
|
-
| Business logic | `packages/services/` |
|