@bpinhosilva/agent-orchestrator 1.0.0-alpha.26 → 1.0.0-alpha.28
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/CHANGELOG.md +16 -0
- package/README.md +170 -279
- package/dist/cli/index.js +4 -1
- package/dist/config/env.validation.js +1 -1
- package/dist/config/port.defaults.d.ts +3 -0
- package/dist/config/port.defaults.js +9 -0
- package/dist/config/typeorm.d.ts +3 -0
- package/dist/config/typeorm.js +24 -6
- package/dist/database/migration-state.js +16 -6
- package/dist/main.js +3 -2
- package/dist/migrations/{1775260737095-BaselineSchema.d.ts → 1775266979821-InitialSchema.d.ts} +1 -1
- package/dist/migrations/{1775260737095-BaselineSchema.js → 1775266979821-InitialSchema.js} +20 -20
- package/dist/ui/assets/{AgentFleet-kJ8qz6Wt.js → AgentFleet-2bUM5tS8.js} +1 -1
- package/dist/ui/assets/{ConfirmDialog-Djtf7EW0.js → ConfirmDialog-C1bkNgZT.js} +1 -1
- package/dist/ui/assets/{Profile-CVJxC_iQ.js → Profile-GA-ikEkL.js} +1 -1
- package/dist/ui/assets/{ProjectDetail-sdHv2RVb.js → ProjectDetail-U4T3kwT6.js} +1 -1
- package/dist/ui/assets/{Providers-mv6Ki6Ja.js → Providers-Dr8fFIru.js} +1 -1
- package/dist/ui/assets/{Scheduler-DrqCsl1E.js → Scheduler-D1seGplm.js} +1 -1
- package/dist/ui/assets/{TaskDetail-Dl2jSnCq.js → TaskDetail-CEKuDv4W.js} +1 -1
- package/dist/ui/assets/{TaskManager-CVxOPuXy.js → TaskManager-vYV5vdM4.js} +1 -1
- package/dist/ui/assets/{index-B9Ws7qcW.js → index-CVlXsOAm.js} +2 -2
- package/dist/ui/assets/index-CoqfjJsB.css +2 -0
- package/dist/ui/index.html +2 -2
- package/package.json +10 -7
- package/dist/ui/assets/index-B1cyp9Ue.css +0 -1
- package/dist/ui/assets/inter-cyrillic-300-normal-BnqRxXuy.woff2 +0 -0
- package/dist/ui/assets/inter-cyrillic-300-normal-LR1W_oT8.woff +0 -0
- package/dist/ui/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
- package/dist/ui/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
- package/dist/ui/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
- package/dist/ui/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
- package/dist/ui/assets/inter-cyrillic-600-normal-4D_pXhcN.woff +0 -0
- package/dist/ui/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
- package/dist/ui/assets/inter-cyrillic-ext-300-normal-CgCALhwJ.woff2 +0 -0
- package/dist/ui/assets/inter-cyrillic-ext-300-normal-RId2JxDB.woff +0 -0
- package/dist/ui/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
- package/dist/ui/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
- package/dist/ui/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
- package/dist/ui/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
- package/dist/ui/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff +0 -0
- package/dist/ui/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
- package/dist/ui/assets/inter-greek-300-normal-BrhSP0vQ.woff +0 -0
- package/dist/ui/assets/inter-greek-300-normal-DmGD3g_f.woff2 +0 -0
- package/dist/ui/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
- package/dist/ui/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
- package/dist/ui/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
- package/dist/ui/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
- package/dist/ui/assets/inter-greek-600-normal-BZpKdvQh.woff +0 -0
- package/dist/ui/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
- package/dist/ui/assets/inter-greek-ext-300-normal-DLbbeei1.woff +0 -0
- package/dist/ui/assets/inter-greek-ext-300-normal-l2DDyC6M.woff2 +0 -0
- package/dist/ui/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
- package/dist/ui/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
- package/dist/ui/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
- package/dist/ui/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
- package/dist/ui/assets/inter-greek-ext-600-normal-B8X0CLgF.woff +0 -0
- package/dist/ui/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
- package/dist/ui/assets/inter-latin-300-normal-BVlfKGgI.woff2 +0 -0
- package/dist/ui/assets/inter-latin-300-normal-i8F0SvXL.woff +0 -0
- package/dist/ui/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- package/dist/ui/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
- package/dist/ui/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
- package/dist/ui/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
- package/dist/ui/assets/inter-latin-600-normal-CiBQ2DWP.woff +0 -0
- package/dist/ui/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
- package/dist/ui/assets/inter-latin-ext-300-normal-CPgO9Ksf.woff2 +0 -0
- package/dist/ui/assets/inter-latin-ext-300-normal-Dp1L8vcn.woff +0 -0
- package/dist/ui/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
- package/dist/ui/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- package/dist/ui/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
- package/dist/ui/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
- package/dist/ui/assets/inter-latin-ext-600-normal-CIVaiw4L.woff +0 -0
- package/dist/ui/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
- package/dist/ui/assets/inter-vietnamese-300-normal-Bdr24Bqb.woff2 +0 -0
- package/dist/ui/assets/inter-vietnamese-300-normal-DDGmYYdT.woff +0 -0
- package/dist/ui/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
- package/dist/ui/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- package/dist/ui/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
- package/dist/ui/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
- package/dist/ui/assets/inter-vietnamese-600-normal-BuLX-rYi.woff +0 -0
- package/dist/ui/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
- package/dist/ui/assets/manrope-cyrillic-400-normal-BMzJvInZ.woff2 +0 -0
- package/dist/ui/assets/manrope-cyrillic-400-normal-Dvx59UGC.woff +0 -0
- package/dist/ui/assets/manrope-cyrillic-600-normal-DvRl3Mj-.woff2 +0 -0
- package/dist/ui/assets/manrope-cyrillic-600-normal-It4mZcQk.woff +0 -0
- package/dist/ui/assets/manrope-cyrillic-700-normal-7JNVKxyl.woff +0 -0
- package/dist/ui/assets/manrope-cyrillic-700-normal-Dw_fZAg2.woff2 +0 -0
- package/dist/ui/assets/manrope-cyrillic-800-normal-AvdZ5mAV.woff2 +0 -0
- package/dist/ui/assets/manrope-cyrillic-800-normal-BuEMjQU-.woff +0 -0
- package/dist/ui/assets/manrope-greek-400-normal-CM4qok81.woff2 +0 -0
- package/dist/ui/assets/manrope-greek-400-normal-DuX9RsAR.woff +0 -0
- package/dist/ui/assets/manrope-greek-600-normal-BoRV6lzK.woff2 +0 -0
- package/dist/ui/assets/manrope-greek-600-normal-CF2i9ZRY.woff +0 -0
- package/dist/ui/assets/manrope-greek-700-normal-CHUG9PD8.woff2 +0 -0
- package/dist/ui/assets/manrope-greek-700-normal-DyfsrCpP.woff +0 -0
- package/dist/ui/assets/manrope-greek-800-normal-Bw-67qu9.woff +0 -0
- package/dist/ui/assets/manrope-greek-800-normal-CDvU698_.woff2 +0 -0
- package/dist/ui/assets/manrope-latin-400-normal-8tf8FM3T.woff +0 -0
- package/dist/ui/assets/manrope-latin-400-normal-PaqtzbVb.woff2 +0 -0
- package/dist/ui/assets/manrope-latin-600-normal-4f0koTD-.woff2 +0 -0
- package/dist/ui/assets/manrope-latin-600-normal-BqgrALkZ.woff +0 -0
- package/dist/ui/assets/manrope-latin-700-normal-BZp_XxE4.woff2 +0 -0
- package/dist/ui/assets/manrope-latin-700-normal-DGRFkw-m.woff +0 -0
- package/dist/ui/assets/manrope-latin-800-normal-BfWYOv1c.woff2 +0 -0
- package/dist/ui/assets/manrope-latin-800-normal-uHUdIJgA.woff +0 -0
- package/dist/ui/assets/manrope-latin-ext-400-normal-C-X6QNXX.woff +0 -0
- package/dist/ui/assets/manrope-latin-ext-400-normal-CMDvPJRp.woff2 +0 -0
- package/dist/ui/assets/manrope-latin-ext-600-normal-_gBojHdJ.woff2 +0 -0
- package/dist/ui/assets/manrope-latin-ext-600-normal-u5Pl7hTU.woff +0 -0
- package/dist/ui/assets/manrope-latin-ext-700-normal-DYOwVNan.woff2 +0 -0
- package/dist/ui/assets/manrope-latin-ext-700-normal-eVCcYqtJ.woff +0 -0
- package/dist/ui/assets/manrope-latin-ext-800-normal-BQAQsuQc.woff +0 -0
- package/dist/ui/assets/manrope-latin-ext-800-normal-DdFx7KEb.woff2 +0 -0
- package/dist/ui/assets/manrope-vietnamese-400-normal-D7E_mLGF.woff +0 -0
- package/dist/ui/assets/manrope-vietnamese-400-normal-DHb3EETF.woff2 +0 -0
- package/dist/ui/assets/manrope-vietnamese-600-normal-C1J5PCl_.woff2 +0 -0
- package/dist/ui/assets/manrope-vietnamese-600-normal-lA7a_7Ok.woff +0 -0
- package/dist/ui/assets/manrope-vietnamese-700-normal-CUqMx5-1.woff2 +0 -0
- package/dist/ui/assets/manrope-vietnamese-700-normal-pt65Fn2Z.woff +0 -0
- package/dist/ui/assets/manrope-vietnamese-800-normal-ClPWri-A.woff2 +0 -0
- package/dist/ui/assets/manrope-vietnamese-800-normal-bvg7iBCV.woff +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# [1.0.0-alpha.28](https://github.com/bpinhosilva/agent-orchestrator/compare/v1.0.0-alpha.27...v1.0.0-alpha.28) (2026-04-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **migrations:** add initial schema with users, providers, models, agents, projects, tasks ([e08e338](https://github.com/bpinhosilva/agent-orchestrator/commit/e08e3388794e8a556be3584daedd30252a8904fb))
|
|
7
|
+
* **migrations:** db schema ([a0a98b7](https://github.com/bpinhosilva/agent-orchestrator/commit/a0a98b725e09f6d3a9a8fc2305704772195fe2d8))
|
|
8
|
+
|
|
9
|
+
# [1.0.0-alpha.27](https://github.com/bpinhosilva/agent-orchestrator/compare/v1.0.0-alpha.26...v1.0.0-alpha.27) (2026-04-04)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* update default port to 15789 for production, enhance migration handling, and refactor env ([e59ba31](https://github.com/bpinhosilva/agent-orchestrator/commit/e59ba3105c5ce7367281bf3ee637bcc3bc124dcc))
|
|
15
|
+
* update mascot image format and adjust display size in README ([6779313](https://github.com/bpinhosilva/agent-orchestrator/commit/6779313a26a6906ecb47a8819789dc8312f3d6fc))
|
|
16
|
+
|
|
1
17
|
# [1.0.0-alpha.26](https://github.com/bpinhosilva/agent-orchestrator/compare/v1.0.0-alpha.25...v1.0.0-alpha.26) (2026-04-04)
|
|
2
18
|
|
|
3
19
|
|
package/README.md
CHANGED
|
@@ -1,387 +1,278 @@
|
|
|
1
1
|
# Agent Orchestrator
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[](https://socket.dev/npm/package/@bpinhosilva/agent-orchestrator)
|
|
7
|
-
|
|
8
|
-
Agent Orchestrator is an open-source project designed to manage and orchestrate AI agents using both back-end services and front-end applications. It provides an automated agentic execution environment where you can create multiple agent profiles (e.g., Head Agent, Researcher, CMO) and delegate tasks to them through automated workflows.
|
|
9
|
-
|
|
10
|
-
## Features (In Progress & Planned)
|
|
11
|
-
- **Agent Delegation**: Delegate tasks to specialized AI agents.
|
|
12
|
-
- **Multi-Provider Support**: Google Gemini and Anthropic Claude providers.
|
|
13
|
-
- **Job Scheduler**: Create and schedule recurring agentic tasks.
|
|
14
|
-
- **Workflow Engine**: Drag-and-drop workflow builder supporting triggers, agent chaining, and outputs.
|
|
15
|
-
- **Agent Capabilities**: File reading/writing, web search, email capabilities, and image generation.
|
|
16
|
-
- **Role-Based Access Control**: Admin and member roles with project-level membership.
|
|
17
|
-
- **TUI/CLI Tooling**: CLI executables to manage the installation and local agent configuration.
|
|
18
|
-
|
|
19
|
-
## Architecture
|
|
20
|
-
- **Backend Framework**: NestJS 11 + TypeScript 5
|
|
21
|
-
- **Frontend SPA**: React (built separately, served as static files)
|
|
22
|
-
- **Database**: PostgreSQL (production) / SQLite (development)
|
|
23
|
-
- **Testing**: Jest (TDD Approach with Unit & E2E)
|
|
24
|
-
- **Architecture**: 3-Tier (Controller → Service → Repository)
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/bpinhosilva/agent-orchestrator/main/docs/assets/lupy-mascot.webp" alt="Lupy, the Agent Orchestrator mascot" width="500" />
|
|
5
|
+
</p>
|
|
25
6
|
|
|
26
|
-
|
|
27
|
-
- [Node.js](https://nodejs.org/) (v24+)
|
|
28
|
-
- [Docker](https://www.docker.com/) and Docker Compose (optional, for the containerized stack)
|
|
29
|
-
- A [Google Gemini API Key](https://aistudio.google.com/) or [Anthropic API Key](https://console.anthropic.com/)
|
|
7
|
+
<p align="center"><em>Lupy, the project mascot, inspired by Bruno's dog and companion of 10 years.</em></p>
|
|
30
8
|
|
|
31
|
-
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://github.com/bpinhosilva/agent-orchestrator/actions/workflows/ci.yml"><img src="https://github.com/bpinhosilva/agent-orchestrator/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
|
|
11
|
+
<a href="https://github.com/bpinhosilva/agent-orchestrator/actions/workflows/gitleaks.yml"><img src="https://github.com/bpinhosilva/agent-orchestrator/actions/workflows/gitleaks.yml/badge.svg" alt="Gitleaks" /></a>
|
|
12
|
+
<a href="https://socket.dev/npm/package/@bpinhosilva/agent-orchestrator"><img src="https://socket.dev/api/badge/npm/package/@bpinhosilva/agent-orchestrator" alt="Socket Badge" /></a>
|
|
13
|
+
</p>
|
|
32
14
|
|
|
33
|
-
|
|
15
|
+
Agent Orchestrator is an open-source platform for managing AI agents, tasks, and project-scoped automation across multiple model providers. It combines a NestJS API, a React dashboard, a packaged CLI/runtime, and Docker deployment options for both local use and production-style environments.
|
|
34
16
|
|
|
35
|
-
|
|
17
|
+
## Current capabilities
|
|
36
18
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
19
|
+
- Multi-provider agent execution with Google Gemini and Anthropic Claude
|
|
20
|
+
- Agent profiles with provider/model selection
|
|
21
|
+
- Project management with project membership and RBAC
|
|
22
|
+
- Task execution plus recurring scheduling
|
|
23
|
+
- File upload and artifact-backed task workflows
|
|
24
|
+
- Packaged CLI/runtime for setup, run, status, logs, stop, and migrate
|
|
25
|
+
- React dashboard served by the backend or packaged runtime
|
|
41
26
|
|
|
42
|
-
|
|
27
|
+
## Planned direction
|
|
43
28
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
npm rebuild
|
|
48
|
-
npm run build:all
|
|
49
|
-
```
|
|
29
|
+
- Richer workflow orchestration and agent chaining
|
|
30
|
+
- Broader agent tool integrations
|
|
31
|
+
- Expanded runtime and deployment ergonomics
|
|
50
32
|
|
|
51
|
-
|
|
33
|
+
## Architecture at a glance
|
|
52
34
|
|
|
53
|
-
|
|
35
|
+
| Area | Stack |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| Backend | NestJS 11 + TypeScript 5 |
|
|
38
|
+
| Frontend | React SPA |
|
|
39
|
+
| Database | PostgreSQL (production) / SQLite via `better-sqlite3` (local/runtime) |
|
|
40
|
+
| ORM | TypeORM |
|
|
41
|
+
| Auth | JWT access/refresh tokens via httpOnly cookies |
|
|
42
|
+
| Packaging | npm package with bundled backend, CLI, and UI assets |
|
|
54
43
|
|
|
55
|
-
|
|
44
|
+
## Prerequisites
|
|
56
45
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
- [Node.js](https://nodejs.org/) 24 or newer
|
|
47
|
+
- npm
|
|
48
|
+
- [Docker](https://www.docker.com/) and Docker Compose (optional)
|
|
49
|
+
- At least one provider API key to execute agents:
|
|
50
|
+
- [Google Gemini API key](https://aistudio.google.com/)
|
|
51
|
+
- [Anthropic API key](https://console.anthropic.com/)
|
|
60
52
|
|
|
61
|
-
|
|
53
|
+
## Quick start
|
|
62
54
|
|
|
63
|
-
|
|
64
|
-
agent-orchestrator setup \
|
|
65
|
-
--yes \
|
|
66
|
-
--db-type postgres \
|
|
67
|
-
--database-url postgresql://orchestrator:orchestrator_password@localhost:5433/agent_orchestrator \
|
|
68
|
-
--provider gemini \
|
|
69
|
-
--gemini-key your-gemini-api-key \
|
|
70
|
-
--skip-admin-setup
|
|
71
|
-
```
|
|
55
|
+
Choose the path that matches how you want to use the project:
|
|
72
56
|
|
|
73
|
-
**
|
|
57
|
+
- **Packaged CLI/runtime**: quickest way to run the app locally as an installed tool
|
|
58
|
+
- **Source checkout**: best path for development and contributing
|
|
74
59
|
|
|
75
|
-
|
|
60
|
+
### Option A: packaged CLI/runtime
|
|
76
61
|
|
|
77
62
|
```bash
|
|
78
|
-
|
|
79
|
-
|
|
63
|
+
npm install -g @bpinhosilva/agent-orchestrator
|
|
64
|
+
agent-orchestrator setup
|
|
65
|
+
agent-orchestrator run
|
|
66
|
+
agent-orchestrator status
|
|
67
|
+
```
|
|
80
68
|
|
|
81
|
-
|
|
82
|
-
GEMINI_API_KEY="your-gemini-api-key"
|
|
83
|
-
ANTHROPIC_API_KEY="your-anthropic-api-key"
|
|
69
|
+
`setup` can create the runtime `.env`, run migrations, seed an admin user, and prompt you to apply pending migrations after package updates. `run` does not upgrade the database automatically. The default runtime home is `~/.agent-orchestrator`, or `${AGENT_ORCHESTRATOR_HOME}` if you set it explicitly.
|
|
84
70
|
|
|
85
|
-
|
|
86
|
-
PORT=3000 # Server port (default: 3000)
|
|
87
|
-
NODE_ENV=development # development | production | test
|
|
88
|
-
DATABASE_URL= # PostgreSQL connection string (omit for SQLite)
|
|
89
|
-
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000
|
|
90
|
-
SCHEDULER_ENABLED=true # Enable/disable task scheduler CRON
|
|
91
|
-
DB_LOGGING=false # Enable TypeORM query logging
|
|
92
|
-
SERVE_STATIC_UI=true # Set false when the UI is served by a separate container/proxy
|
|
93
|
-
CHECK_PENDING_MIGRATIONS_ON_STARTUP=false
|
|
94
|
-
```
|
|
71
|
+
For deeper CLI usage, see [docs/CLI.md](docs/CLI.md).
|
|
95
72
|
|
|
96
|
-
###
|
|
73
|
+
### Option B: source checkout
|
|
97
74
|
|
|
98
|
-
|
|
75
|
+
```bash
|
|
76
|
+
git clone https://github.com/bpinhosilva/agent-orchestrator.git
|
|
77
|
+
cd agent-orchestrator
|
|
78
|
+
npm install
|
|
79
|
+
npm rebuild
|
|
80
|
+
npm run build:all
|
|
81
|
+
```
|
|
99
82
|
|
|
100
|
-
|
|
83
|
+
> **Note**: The repository uses `ignore-scripts=true` in `.npmrc` for supply-chain hardening. After `npm install`, run `npm rebuild --ignore-scripts=false` so native modules such as `bcrypt` and `better-sqlite3` are actually compiled.
|
|
101
84
|
|
|
102
|
-
|
|
85
|
+
If you want to use the packaged CLI behavior from a source checkout, run the built entrypoint directly:
|
|
103
86
|
|
|
104
87
|
```bash
|
|
105
|
-
|
|
106
|
-
docker compose up -d db
|
|
107
|
-
|
|
108
|
-
# Set the connection string
|
|
109
|
-
export DATABASE_URL="postgresql://orchestrator:orchestrator_password@localhost:5433/agent_orchestrator"
|
|
88
|
+
node dist/cli/index.js --help
|
|
110
89
|
```
|
|
111
90
|
|
|
112
|
-
|
|
91
|
+
## Configure the runtime
|
|
113
92
|
|
|
114
|
-
|
|
115
|
-
# Apply database migrations
|
|
116
|
-
npm run migration:run
|
|
93
|
+
The app loads configuration from:
|
|
117
94
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
```
|
|
95
|
+
- `${AGENT_ORCHESTRATOR_HOME}/.env` when `AGENT_ORCHESTRATOR_HOME` is set
|
|
96
|
+
- `.env` in the project/package root otherwise
|
|
121
97
|
|
|
122
|
-
|
|
98
|
+
Example `.env`:
|
|
123
99
|
|
|
124
100
|
```bash
|
|
125
|
-
#
|
|
126
|
-
|
|
127
|
-
agent-orchestrator status
|
|
128
|
-
agent-orchestrator logs --lines 50
|
|
129
|
-
agent-orchestrator stop
|
|
101
|
+
# Required
|
|
102
|
+
JWT_SECRET="replace-with-a-secret-at-least-32-characters-long"
|
|
130
103
|
|
|
131
|
-
#
|
|
132
|
-
|
|
104
|
+
# Provider keys (optional until you want to execute agents)
|
|
105
|
+
GEMINI_API_KEY=""
|
|
106
|
+
ANTHROPIC_API_KEY=""
|
|
133
107
|
|
|
134
|
-
#
|
|
135
|
-
|
|
108
|
+
# Database
|
|
109
|
+
DB_TYPE=sqlite
|
|
110
|
+
DATABASE_URL=
|
|
136
111
|
|
|
137
|
-
#
|
|
138
|
-
|
|
139
|
-
|
|
112
|
+
# Runtime
|
|
113
|
+
PORT=15789
|
|
114
|
+
NODE_ENV=production
|
|
115
|
+
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000
|
|
116
|
+
SCHEDULER_ENABLED=true
|
|
117
|
+
DB_LOGGING=false
|
|
118
|
+
SERVE_STATIC_UI=true
|
|
119
|
+
CHECK_PENDING_MIGRATIONS_ON_STARTUP=false
|
|
140
120
|
```
|
|
141
121
|
|
|
142
|
-
|
|
122
|
+
## Database setup
|
|
143
123
|
|
|
144
|
-
###
|
|
124
|
+
### SQLite
|
|
145
125
|
|
|
146
|
-
|
|
126
|
+
SQLite is the default local/runtime option when `DATABASE_URL` is not set. The database file lives at:
|
|
147
127
|
|
|
148
|
-
- `
|
|
149
|
-
-
|
|
150
|
-
- `docker-compose-test.yml` — containerized integration stack for migration, CLI, API, and UI checks
|
|
128
|
+
- `local.sqlite` in the project/package root, or
|
|
129
|
+
- `${AGENT_ORCHESTRATOR_HOME}/local.sqlite` when runtime home is set
|
|
151
130
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
JWT_SECRET="at-least-32-characters-long-secret-key"
|
|
156
|
-
POSTGRES_USER=orchestrator
|
|
157
|
-
POSTGRES_PASSWORD=orchestrator_password
|
|
158
|
-
POSTGRES_DB=agent_orchestrator
|
|
159
|
-
POSTGRES_PORT=5433
|
|
160
|
-
POSTGRES_TEST_DB=agent_orchestrator_test
|
|
161
|
-
POSTGRES_TEST_PORT=5434
|
|
162
|
-
GEMINI_API_KEY=
|
|
163
|
-
ANTHROPIC_API_KEY=
|
|
164
|
-
```
|
|
131
|
+
### PostgreSQL
|
|
165
132
|
|
|
166
|
-
|
|
133
|
+
Use PostgreSQL by setting `DATABASE_URL` or `DB_TYPE=postgres`:
|
|
167
134
|
|
|
168
135
|
```bash
|
|
169
|
-
|
|
170
|
-
npm run docker:up
|
|
171
|
-
|
|
172
|
-
# The API will refuse to start until migrations are applied
|
|
173
|
-
docker compose run --rm api dist/cli/index.js migrate --yes
|
|
174
|
-
|
|
175
|
-
# Stop the stack
|
|
176
|
-
npm run docker:down
|
|
136
|
+
export DATABASE_URL="postgresql://orchestrator:orchestrator_password@localhost:5433/agent_orchestrator"
|
|
177
137
|
```
|
|
178
138
|
|
|
179
|
-
|
|
180
|
-
- API: `http://localhost:3000/api/v1`
|
|
181
|
-
|
|
182
|
-
The API container does **not** serve the SPA in Docker mode. The UI is served by **Caddy**, which also proxies `/api/*` traffic to the API container so the browser can use the same origin for UI + API.
|
|
139
|
+
### Initialize the schema
|
|
183
140
|
|
|
184
|
-
|
|
141
|
+
Run migrations before the first app start:
|
|
185
142
|
|
|
186
143
|
```bash
|
|
187
|
-
|
|
144
|
+
npm run migration:run
|
|
188
145
|
```
|
|
189
146
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
#### Development Docker stack
|
|
147
|
+
Create the initial admin user if you want to sign in through the dashboard:
|
|
193
148
|
|
|
194
149
|
```bash
|
|
195
|
-
npm run
|
|
196
|
-
|
|
197
|
-
# Stop the dev stack
|
|
198
|
-
docker compose -f docker-compose.dev.yml down
|
|
150
|
+
npm run seed:admin
|
|
199
151
|
```
|
|
200
152
|
|
|
201
|
-
|
|
202
|
-
- API: `http://localhost:3000/api/v1`
|
|
203
|
-
- PostgreSQL: `localhost:5433`
|
|
153
|
+
If you use the packaged CLI, `agent-orchestrator setup` can perform both steps for you.
|
|
204
154
|
|
|
205
|
-
|
|
155
|
+
## Run the application
|
|
206
156
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
Use the test compose file when you want to exercise migration behavior, CLI commands, API startup, and the UI together:
|
|
157
|
+
### Local development
|
|
210
158
|
|
|
211
159
|
```bash
|
|
212
|
-
|
|
213
|
-
docker compose -f docker-compose-test.yml up -d db
|
|
214
|
-
|
|
215
|
-
# Verify pending migrations block API startup
|
|
216
|
-
docker compose -f docker-compose-test.yml up api
|
|
217
|
-
|
|
218
|
-
# Apply migrations with the packaged CLI runtime
|
|
219
|
-
docker compose -f docker-compose-test.yml run --rm migrate
|
|
220
|
-
|
|
221
|
-
# Then bring up the full app stack
|
|
222
|
-
docker compose -f docker-compose-test.yml up ui api
|
|
223
|
-
|
|
224
|
-
# Run ad hoc CLI checks
|
|
225
|
-
docker compose -f docker-compose-test.yml run --rm cli dist/cli/index.js status
|
|
226
|
-
|
|
227
|
-
# Tear the test stack down
|
|
228
|
-
docker compose -f docker-compose-test.yml down -v
|
|
160
|
+
npm run dev
|
|
229
161
|
```
|
|
230
162
|
|
|
231
|
-
|
|
163
|
+
That starts:
|
|
232
164
|
|
|
233
|
-
-
|
|
234
|
-
-
|
|
235
|
-
-
|
|
236
|
-
-
|
|
237
|
-
|
|
238
|
-
## Database Management
|
|
239
|
-
|
|
240
|
-
The project uses [TypeORM](https://typeorm.io/) migrations to manage schema changes. **Never rely on `synchronize: true`** — it is disabled in all environments.
|
|
165
|
+
- UI dev server: `http://localhost:5173`
|
|
166
|
+
- API: `http://localhost:3000/api/v1`
|
|
167
|
+
- Swagger UI: `http://localhost:3000/api` (non-production only)
|
|
168
|
+
- Health endpoint: `http://localhost:3000/health`
|
|
241
169
|
|
|
242
|
-
|
|
170
|
+
If you only want the API in watch mode:
|
|
243
171
|
|
|
244
172
|
```bash
|
|
245
|
-
|
|
246
|
-
npm run typeorm -- migration:generate src/migrations/DescriptiveName
|
|
247
|
-
|
|
248
|
-
# Apply all pending migrations
|
|
249
|
-
npm run migration:run
|
|
250
|
-
|
|
251
|
-
# Revert the last applied migration
|
|
252
|
-
npm run migration:revert
|
|
253
|
-
|
|
254
|
-
# Drop the entire database schema (use with caution!)
|
|
255
|
-
npm run schema:drop
|
|
173
|
+
npm run start:dev
|
|
256
174
|
```
|
|
257
175
|
|
|
258
|
-
###
|
|
259
|
-
|
|
260
|
-
1. Modify your entity files in `src/`
|
|
261
|
-
2. Generate a migration: `npm run typeorm -- migration:generate src/migrations/YourMigrationName`
|
|
262
|
-
3. Review the generated file in `src/migrations/`
|
|
263
|
-
4. Apply it: `npm run migration:run`
|
|
264
|
-
5. Verify with tests: `npm run test:all`
|
|
265
|
-
|
|
266
|
-
### Seeding
|
|
176
|
+
### Packaged/runtime mode
|
|
267
177
|
|
|
268
178
|
```bash
|
|
269
|
-
|
|
270
|
-
|
|
179
|
+
agent-orchestrator run
|
|
180
|
+
agent-orchestrator status
|
|
181
|
+
agent-orchestrator logs --lines 50
|
|
182
|
+
agent-orchestrator stop
|
|
271
183
|
```
|
|
272
184
|
|
|
273
|
-
|
|
185
|
+
When running the packaged app or a production build with static UI enabled, the dashboard is served from `http://localhost:15789` by default.
|
|
274
186
|
|
|
275
|
-
##
|
|
187
|
+
## Docker
|
|
276
188
|
|
|
277
|
-
|
|
189
|
+
The repository ships three Compose entrypoints:
|
|
278
190
|
|
|
279
|
-
|
|
280
|
-
2. **Migrations**: Run `npm run migration:run` before starting the app
|
|
281
|
-
3. **Environment**:
|
|
282
|
-
- `NODE_ENV=production` — disables Swagger UI and enables secure cookies
|
|
283
|
-
- `JWT_SECRET` — strong secret, minimum 32 characters
|
|
284
|
-
- `ALLOWED_ORIGINS` — comma-separated list of allowed CORS origins (required in production)
|
|
285
|
-
4. **Build**: Run `npm run build` to compile TypeScript and bundle the UI
|
|
286
|
-
5. **Start**: `npm run start:prod` (or `node dist/main.js`)
|
|
191
|
+
All Compose stacks now require the database variables in the project `.env` file: `POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB`, and `POSTGRES_TEST_DB` for the integration stack.
|
|
287
192
|
|
|
288
|
-
|
|
193
|
+
| File | Purpose |
|
|
194
|
+
| --- | --- |
|
|
195
|
+
| `docker-compose.yml` | Production-style stack with PostgreSQL, API, and Caddy-served UI |
|
|
196
|
+
| `docker-compose.dev.yml` | Development stack with API hot reload and Vite UI dev server |
|
|
197
|
+
| `docker-compose.test.yml` | Integration stack for migration, CLI/runtime, API, and UI checks |
|
|
198
|
+
|
|
199
|
+
### Production-style stack
|
|
289
200
|
|
|
290
201
|
```bash
|
|
291
|
-
# Production-like stack
|
|
292
202
|
npm run docker:up
|
|
293
|
-
|
|
294
|
-
# Apply migrations with the packaged runtime inside the API container
|
|
295
203
|
docker compose run --rm api dist/cli/index.js migrate --yes
|
|
296
|
-
|
|
297
|
-
# Stop the stack
|
|
298
|
-
npm run docker:down
|
|
299
204
|
```
|
|
300
205
|
|
|
301
|
-
|
|
206
|
+
Endpoints:
|
|
302
207
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
### Updating an Existing Deployment
|
|
208
|
+
- UI: `https://localhost` or `https://agent-orchestrator.localhost`
|
|
209
|
+
- API: `https://localhost/api/v1` or `https://agent-orchestrator.localhost/api/v1`
|
|
306
210
|
|
|
307
|
-
|
|
308
|
-
2. Install dependencies: `npm ci && npm rebuild`
|
|
309
|
-
3. Build: `npm run build`
|
|
310
|
-
4. Run new migrations: `npm run migration:run`
|
|
311
|
-
5. Restart the application
|
|
211
|
+
In this stack the UI is served by **Caddy**, not by the Nest app. Docker explicitly sets `SERVE_STATIC_UI=false` so the backend only serves the API.
|
|
312
212
|
|
|
313
|
-
|
|
213
|
+
### Development stack
|
|
314
214
|
|
|
315
215
|
```bash
|
|
316
|
-
|
|
317
|
-
npm test
|
|
318
|
-
|
|
319
|
-
# Unit tests in watch mode
|
|
320
|
-
npm run test:watch
|
|
321
|
-
|
|
322
|
-
# E2E tests
|
|
323
|
-
npm run test:e2e
|
|
324
|
-
|
|
325
|
-
# All tests (unit + UI + E2E)
|
|
326
|
-
npm run test:all
|
|
327
|
-
|
|
328
|
-
# Test coverage
|
|
329
|
-
npm run test:cov
|
|
330
|
-
|
|
331
|
-
# Run a single test file
|
|
332
|
-
npm test -- src/auth/auth.service.spec.ts
|
|
333
|
-
|
|
334
|
-
# Run tests matching a name pattern
|
|
335
|
-
npm test -- --testNamePattern="should validate email"
|
|
216
|
+
npm run docker:dev
|
|
336
217
|
```
|
|
337
218
|
|
|
338
|
-
|
|
219
|
+
Endpoints:
|
|
339
220
|
|
|
340
|
-
|
|
221
|
+
- UI: `http://localhost:5173`
|
|
222
|
+
- API: `http://localhost:3000/api/v1`
|
|
223
|
+
- PostgreSQL: `localhost:5433`
|
|
341
224
|
|
|
342
|
-
|
|
343
|
-
- **Role-Based Access Control (RBAC)**: `admin` and `member` roles
|
|
344
|
-
- **Admin**: Full access to all resources
|
|
345
|
-
- **Member**: Access scoped to projects they own or are members of
|
|
346
|
-
- **Project membership**: Many-to-many model with `owner` and `member` roles per project
|
|
347
|
-
- **Rate limiting**: 60 req/min globally, 5 req/min on auth endpoints
|
|
348
|
-
- All routes protected by default — use `@Public()` decorator for public endpoints
|
|
225
|
+
### Integration stack
|
|
349
226
|
|
|
350
|
-
|
|
227
|
+
Use `docker-compose.test.yml` when you want to exercise migration behavior, packaged CLI/runtime flows, API startup, and UI reachability together.
|
|
351
228
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
-
|
|
229
|
+
```bash
|
|
230
|
+
npm run docker:test
|
|
231
|
+
docker compose -f docker-compose.test.yml --profile tools run --rm migrate
|
|
232
|
+
docker compose -f docker-compose.test.yml --profile tools run --rm cli
|
|
233
|
+
```
|
|
356
234
|
|
|
357
|
-
|
|
235
|
+
Endpoints:
|
|
358
236
|
|
|
359
|
-
-
|
|
360
|
-
-
|
|
361
|
-
- Swagger UI disabled in production
|
|
362
|
-
- File upload validation: MIME type allowlist + 10MB size limit
|
|
363
|
-
- Input length limits on all text fields via class-validator
|
|
237
|
+
- UI: `https://localhost:8444` or `https://agent-orchestrator.localhost:8444`
|
|
238
|
+
- API: `https://localhost:8444/api/v1` or `https://agent-orchestrator.localhost:8444/api/v1`
|
|
364
239
|
|
|
365
|
-
##
|
|
240
|
+
## Development workflow
|
|
366
241
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
242
|
+
| Task | Command |
|
|
243
|
+
| --- | --- |
|
|
244
|
+
| Start API + UI | `npm run dev` |
|
|
245
|
+
| Start API only | `npm run start:dev` |
|
|
246
|
+
| Lint API + UI | `npm run lint:all` |
|
|
247
|
+
| Run API + UI + E2E tests | `npm run test:all` |
|
|
248
|
+
| Run coverage | `npm run test:cov` |
|
|
249
|
+
| Run E2E tests | `npm run test:e2e` |
|
|
250
|
+
| Build backend + UI package output | `npm run build:all` |
|
|
251
|
+
| Apply migrations | `npm run migration:run` |
|
|
374
252
|
|
|
375
|
-
##
|
|
253
|
+
## Auth and access model
|
|
376
254
|
|
|
377
|
-
|
|
255
|
+
- Access and refresh tokens are issued by the auth service and transported via **httpOnly cookies**
|
|
256
|
+
- System roles are **`admin`** and **`user`**
|
|
257
|
+
- Project membership roles are **`owner`** and **`member`**
|
|
258
|
+
- Routes are protected by default; use `@Public()` for public endpoints
|
|
259
|
+
- Global throttling defaults to `60/min`, with stricter limits on auth endpoints
|
|
378
260
|
|
|
379
|
-
##
|
|
261
|
+
## Useful docs
|
|
380
262
|
|
|
381
263
|
- [CLI reference](docs/CLI.md)
|
|
382
264
|
- [CI/CD pipeline](docs/CI_CD.md)
|
|
383
265
|
- [Release process](docs/RELEASE.md)
|
|
266
|
+
- [Contributing guide](CONTRIBUTING.md)
|
|
267
|
+
|
|
268
|
+
## Troubleshooting
|
|
269
|
+
|
|
270
|
+
- **Native module errors after install**: run `npm rebuild`
|
|
271
|
+
- **`JWT_SECRET` rejected**: it must be at least 32 characters
|
|
272
|
+
- **Agent execution fails immediately**: confirm `GEMINI_API_KEY` and/or `ANTHROPIC_API_KEY` are set
|
|
273
|
+
- **Schema/startup issues**: run `npm run migration:run`
|
|
274
|
+
- **Need to undo the latest migration**: run `npm run migration:revert`
|
|
384
275
|
|
|
385
276
|
## License
|
|
386
277
|
|
|
387
|
-
See [LICENSE](LICENSE)
|
|
278
|
+
See [LICENSE](LICENSE).
|
package/dist/cli/index.js
CHANGED
|
@@ -54,11 +54,12 @@ const crypto = __importStar(require("crypto"));
|
|
|
54
54
|
const child_process_1 = require("child_process");
|
|
55
55
|
const bcrypt = __importStar(require("bcrypt"));
|
|
56
56
|
const typeorm_1 = require("../config/typeorm");
|
|
57
|
+
const port_defaults_1 = require("../config/port.defaults");
|
|
57
58
|
const migration_state_1 = require("../database/migration-state");
|
|
58
59
|
const avatar_constants_1 = require("../users/avatar.constants");
|
|
59
60
|
const user_entity_1 = require("../users/entities/user.entity");
|
|
60
61
|
let program = new commander_1.Command();
|
|
61
|
-
const DEFAULT_PORT =
|
|
62
|
+
const DEFAULT_PORT = `${port_defaults_1.RUNTIME_DEFAULT_PORT}`;
|
|
62
63
|
const PACKAGE_JSON_PATH = path.join(path.resolve(__dirname, '..', '..'), 'package.json');
|
|
63
64
|
const MAIN_FILE = path.join(path.resolve(__dirname, '..', '..'), 'dist/main.js');
|
|
64
65
|
const UI_INDEX_FILE = path.join(path.resolve(__dirname, '..', '..'), 'dist/ui/index.html');
|
|
@@ -472,6 +473,7 @@ function buildEnvContent(currentEnv, basicConfig, databaseUrl, geminiKey, anthro
|
|
|
472
473
|
PORT: basicConfig.port,
|
|
473
474
|
DB_TYPE: basicConfig.dbType,
|
|
474
475
|
DB_LOGGING: `${basicConfig.dbLogging}`,
|
|
476
|
+
CHECK_PENDING_MIGRATIONS_ON_STARTUP: currentEnv.CHECK_PENDING_MIGRATIONS_ON_STARTUP || 'true',
|
|
475
477
|
JWT_SECRET: jwtSecret,
|
|
476
478
|
};
|
|
477
479
|
if (databaseUrl) {
|
|
@@ -491,6 +493,7 @@ function buildEnvContent(currentEnv, basicConfig, databaseUrl, geminiKey, anthro
|
|
|
491
493
|
'PORT',
|
|
492
494
|
'DB_TYPE',
|
|
493
495
|
'DB_LOGGING',
|
|
496
|
+
'CHECK_PENDING_MIGRATIONS_ON_STARTUP',
|
|
494
497
|
'DATABASE_URL',
|
|
495
498
|
'GEMINI_API_KEY',
|
|
496
499
|
'ANTHROPIC_API_KEY',
|
|
@@ -36,7 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.envValidationSchema = void 0;
|
|
37
37
|
const Joi = __importStar(require("joi"));
|
|
38
38
|
exports.envValidationSchema = Joi.object({
|
|
39
|
-
PORT: Joi.number().
|
|
39
|
+
PORT: Joi.number().port().optional(),
|
|
40
40
|
DATABASE_URL: Joi.string().optional(),
|
|
41
41
|
DB_TYPE: Joi.string().valid('postgres', 'sqlite').optional(),
|
|
42
42
|
JWT_SECRET: Joi.string().min(32).required(),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RUNTIME_DEFAULT_PORT = exports.DEV_DEFAULT_PORT = void 0;
|
|
4
|
+
exports.getDefaultPort = getDefaultPort;
|
|
5
|
+
exports.DEV_DEFAULT_PORT = 3000;
|
|
6
|
+
exports.RUNTIME_DEFAULT_PORT = 15789;
|
|
7
|
+
function getDefaultPort(nodeEnv) {
|
|
8
|
+
return nodeEnv === 'production' ? exports.RUNTIME_DEFAULT_PORT : exports.DEV_DEFAULT_PORT;
|
|
9
|
+
}
|
package/dist/config/typeorm.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { DataSource, DataSourceOptions } from 'typeorm';
|
|
2
2
|
import { ConfigService } from '@nestjs/config';
|
|
3
|
+
export type RuntimeDbType = 'postgres' | 'sqlite';
|
|
4
|
+
export declare function resolveDataSourceType(dbType: RuntimeDbType): 'postgres' | 'better-sqlite3';
|
|
5
|
+
export declare function isSqliteDriver(type: DataSourceOptions['type']): boolean;
|
|
3
6
|
export declare const getTypeOrmConfig: (configService: ConfigService) => DataSourceOptions;
|
|
4
7
|
export declare const createDataSource: () => DataSource;
|
|
5
8
|
declare const _default: DataSource;
|