@bpinhosilva/agent-orchestrator 1.0.0-alpha.33 → 1.0.0-alpha.34
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 +10 -0
- package/README.md +8 -0
- package/dist/agents/implementations/claude.agent.js +0 -12
- package/dist/agents/implementations/gemini.agent.js +0 -12
- package/dist/cli/commands/index.js +2 -0
- package/dist/cli/commands/restart.command.js +30 -0
- package/dist/cli/commands/run.command.js +1 -1
- package/dist/cli/commands/status.command.js +1 -1
- package/dist/cli/commands/stop.command.js +1 -1
- package/dist/cli/process-manager.js +22 -0
- package/dist/common/interfaces/artifact.interface.js +2 -0
- package/dist/common/storage-path.helper.js +1 -0
- package/dist/database/migration-sql.utils.js +7 -2
- package/dist/database/migration-state.js +1 -1
- package/dist/main.js +7 -0
- package/dist/migrations/1775487994565-20260406-AddMissingIndexesAndFKActions.js +123 -112
- package/dist/migrations/1775495000000-SetPostgresIdDefaults.js +47 -0
- package/dist/migrations/1775698253996-AddArtifactsToRecurrentTaskExecs.js +95 -0
- package/dist/projects/projects.service.js +2 -0
- package/dist/tasks/comments.service.js +1 -13
- package/dist/tasks/entities/comment.entity.js +1 -1
- package/dist/tasks/entities/recurrent-task-exec.entity.js +6 -1
- package/dist/tasks/recurrent-task-scheduler.service.js +34 -2
- package/dist/tasks/recurrent-tasks.controller.js +16 -0
- package/dist/tasks/recurrent-tasks.service.js +23 -3
- package/dist/ui/assets/AgentFleet-BNgsWY2o.js +1 -0
- package/dist/ui/assets/AttachmentItem-QhT0YOmu.js +1 -0
- package/dist/ui/assets/{ConfirmDialog-DFNE1Ulb.js → ConfirmDialog-CIfNuBst.js} +1 -1
- package/dist/ui/assets/CreateRecurrentTaskModal-k4iA_ECJ.js +1 -0
- package/dist/ui/assets/MarkdownField-DJ12Ejut.js +1 -0
- package/dist/ui/assets/{Profile-CW1w6WHT.js → Profile-CPwg7w-x.js} +1 -1
- package/dist/ui/assets/ProjectDetail-bkd8jRYr.js +1 -0
- package/dist/ui/assets/Providers-CsLkW8rv.js +1 -0
- package/dist/ui/assets/Scheduler-DJ4e83Kr.js +1 -0
- package/dist/ui/assets/{Settings-CrHHDhsq.js → Settings-Dd6mlxMN.js} +1 -1
- package/dist/ui/assets/TaskDetail-DKuMLlM2.js +1 -0
- package/dist/ui/assets/TaskExecutions-BeeSmLar.js +1 -0
- package/dist/ui/assets/TaskManager-DD3ABMx5.js +8 -0
- package/dist/ui/assets/{UserDetail-BWLv8D4I.js → UserDetail-D3EMlcu7.js} +1 -1
- package/dist/ui/assets/{Users-BORCFzN3.js → Users-BmHfRaGc.js} +1 -1
- package/dist/ui/assets/{trending-up-Bh_TRzth.js → database-DC2jO6Si.js} +1 -1
- package/dist/ui/assets/index-uV1e3LjR.css +2 -0
- package/dist/ui/assets/{index-ozQxWpPV.js → index-wA5sKdfn.js} +3 -3
- package/dist/ui/assets/paperclip-6x5JJ7A7.js +1 -0
- package/dist/ui/assets/{taskFormSchemas--j-EqGsF.js → taskFormSchemas-CKu2m51r.js} +1 -1
- package/dist/ui/assets/trending-up-VOBRPers.js +1 -0
- package/dist/ui/index.html +3 -3
- package/dist/uploads/parse-filepath.pipe.js +3 -3
- package/dist/uploads/uploads.controller.js +16 -7
- package/dist/uploads/uploads.module.js +2 -0
- package/package.json +2 -1
- package/dist/agents/agent-emoji.constants.d.ts +0 -5
- package/dist/agents/agents.controller.d.ts +0 -16
- package/dist/agents/agents.module.d.ts +0 -2
- package/dist/agents/agents.service.d.ts +0 -23
- package/dist/agents/default-provider-models.d.ts +0 -11
- package/dist/agents/dto/agent-attributes.dto.d.ts +0 -14
- package/dist/agents/dto/agent-request.dto.d.ts +0 -4
- package/dist/agents/dto/create-agent.dto.d.ts +0 -13
- package/dist/agents/dto/update-agent.dto.d.ts +0 -5
- package/dist/agents/entities/agent.entity.d.ts +0 -18
- package/dist/agents/enums/provider.enum.d.ts +0 -4
- package/dist/agents/implementations/claude.agent.d.ts +0 -28
- package/dist/agents/implementations/gemini.agent.d.ts +0 -31
- package/dist/agents/interfaces/agent.interface.d.ts +0 -16
- package/dist/agents/personality.util.d.ts +0 -8
- package/dist/agents/registry/agent.registry.d.ts +0 -5
- package/dist/app.controller.d.ts +0 -9
- package/dist/app.module.d.ts +0 -2
- package/dist/app.service.d.ts +0 -6
- package/dist/auth/auth.controller.d.ts +0 -24
- package/dist/auth/auth.module.d.ts +0 -2
- package/dist/auth/auth.service.d.ts +0 -41
- package/dist/auth/decorators/current-user.decorator.d.ts +0 -1
- package/dist/auth/decorators/public.decorator.d.ts +0 -2
- package/dist/auth/decorators/roles.decorator.d.ts +0 -3
- package/dist/auth/dto/login.dto.d.ts +0 -4
- package/dist/auth/dto/register.dto.d.ts +0 -8
- package/dist/auth/dto/update-profile.dto.d.ts +0 -9
- package/dist/auth/entities/refresh-token.entity.d.ts +0 -12
- package/dist/auth/guards/jwt-auth.guard.d.ts +0 -9
- package/dist/auth/guards/roles.guard.d.ts +0 -7
- package/dist/auth/strategies/jwt.strategy.d.ts +0 -17
- package/dist/cli/commands/index.d.ts +0 -2
- package/dist/cli/commands/logs.command.d.ts +0 -2
- package/dist/cli/commands/migrate.command.d.ts +0 -2
- package/dist/cli/commands/run.command.d.ts +0 -2
- package/dist/cli/commands/setup.command.d.ts +0 -2
- package/dist/cli/commands/status.command.d.ts +0 -2
- package/dist/cli/commands/stop.command.d.ts +0 -2
- package/dist/cli/constants.d.ts +0 -10
- package/dist/cli/env.d.ts +0 -5
- package/dist/cli/index.d.ts +0 -5
- package/dist/cli/process-manager.d.ts +0 -9
- package/dist/cli/setup/admin.d.ts +0 -7
- package/dist/cli/setup/index.d.ts +0 -2
- package/dist/cli/setup/prompts.d.ts +0 -22
- package/dist/cli/setup/validators.d.ts +0 -5
- package/dist/cli/types.d.ts +0 -98
- package/dist/cli/utils.d.ts +0 -3
- package/dist/common/common.module.d.ts +0 -2
- package/dist/common/entities/artifact.entity.d.ts +0 -7
- package/dist/common/entities/artifact.entity.js +0 -48
- package/dist/common/filesystem-storage.service.d.ts +0 -17
- package/dist/common/filters/http-exception.filter.d.ts +0 -4
- package/dist/common/storage-path.helper.d.ts +0 -21
- package/dist/common/storage.service.d.ts +0 -7
- package/dist/config/env.validation.d.ts +0 -2
- package/dist/config/port.defaults.d.ts +0 -3
- package/dist/config/runtime-paths.d.ts +0 -6
- package/dist/config/typeorm.d.ts +0 -9
- package/dist/database/migration-sql.utils.d.ts +0 -2
- package/dist/database/migration-state.d.ts +0 -10
- package/dist/main.d.ts +0 -1
- package/dist/migrations/1775266979821-InitialSchema.d.ts +0 -7
- package/dist/migrations/1775268200000-SeedDefaultProvidersAndModels.d.ts +0 -8
- package/dist/migrations/1775269500000-BackfillDefaultModelProviderIds.d.ts +0 -9
- package/dist/migrations/1775271000000-AddAgentEmoji.d.ts +0 -6
- package/dist/migrations/1775272000000-CreateSystemSettings.d.ts +0 -5
- package/dist/migrations/1775290000000-AddAgentAttributes.d.ts +0 -6
- package/dist/migrations/1775487994565-20260406-AddMissingIndexesAndFKActions.d.ts +0 -6
- package/dist/models/dto/create-model.dto.d.ts +0 -4
- package/dist/models/dto/update-model.dto.d.ts +0 -5
- package/dist/models/entities/model.entity.d.ts +0 -10
- package/dist/models/models.controller.d.ts +0 -13
- package/dist/models/models.module.d.ts +0 -2
- package/dist/models/models.service.d.ts +0 -14
- package/dist/projects/dto/add-member.dto.d.ts +0 -5
- package/dist/projects/dto/create-project.dto.d.ts +0 -7
- package/dist/projects/dto/update-project.dto.d.ts +0 -6
- package/dist/projects/entities/project-member.entity.d.ts +0 -13
- package/dist/projects/entities/project.entity.d.ts +0 -19
- package/dist/projects/projects.controller.d.ts +0 -17
- package/dist/projects/projects.module.d.ts +0 -2
- package/dist/projects/projects.service.d.ts +0 -22
- package/dist/providers/dto/create-provider.dto.d.ts +0 -4
- package/dist/providers/dto/update-provider.dto.d.ts +0 -5
- package/dist/providers/entities/provider.entity.d.ts +0 -9
- package/dist/providers/providers.controller.d.ts +0 -13
- package/dist/providers/providers.module.d.ts +0 -2
- package/dist/providers/providers.service.d.ts +0 -14
- package/dist/system-settings/dto/update-system-settings.dto.d.ts +0 -16
- package/dist/system-settings/entities/system-settings.entity.d.ts +0 -17
- package/dist/system-settings/system-settings.controller.d.ts +0 -8
- package/dist/system-settings/system-settings.module.d.ts +0 -2
- package/dist/system-settings/system-settings.service.d.ts +0 -10
- package/dist/tasks/comments.controller.d.ts +0 -18
- package/dist/tasks/comments.service.d.ts +0 -22
- package/dist/tasks/dto/create-comment.dto.d.ts +0 -7
- package/dist/tasks/dto/create-recurrent-task.dto.d.ts +0 -10
- package/dist/tasks/dto/create-task.dto.d.ts +0 -9
- package/dist/tasks/dto/update-comment.dto.d.ts +0 -3
- package/dist/tasks/dto/update-recurrent-task.dto.d.ts +0 -5
- package/dist/tasks/dto/update-task.dto.d.ts +0 -5
- package/dist/tasks/entities/comment.entity.d.ts +0 -23
- package/dist/tasks/entities/recurrent-task-exec.entity.d.ts +0 -16
- package/dist/tasks/entities/recurrent-task.entity.d.ts +0 -22
- package/dist/tasks/entities/task.entity.d.ts +0 -31
- package/dist/tasks/recurrent-task-scheduler.service.d.ts +0 -27
- package/dist/tasks/recurrent-tasks.controller.d.ts +0 -15
- package/dist/tasks/recurrent-tasks.service.d.ts +0 -16
- package/dist/tasks/task-scheduler.service.d.ts +0 -35
- package/dist/tasks/tasks.controller.d.ts +0 -27
- package/dist/tasks/tasks.module.d.ts +0 -2
- package/dist/tasks/tasks.service.d.ts +0 -34
- package/dist/ui/assets/AgentFleet-CAPR8X0_.js +0 -1
- package/dist/ui/assets/MarkdownField-Cth9aFTE.js +0 -1
- package/dist/ui/assets/ProjectDetail-CqaebA9k.js +0 -1
- package/dist/ui/assets/Providers-Dnd0Nu5d.js +0 -1
- package/dist/ui/assets/Scheduler-D6X1T24q.js +0 -1
- package/dist/ui/assets/TaskDetail-CBJEpiIF.js +0 -1
- package/dist/ui/assets/TaskManager-DWqHRwWQ.js +0 -8
- package/dist/ui/assets/index-C2UQMCHQ.css +0 -2
- package/dist/ui/assets/sparkles-BYfDbPNH.js +0 -1
- package/dist/uploads/parse-filepath.pipe.d.ts +0 -5
- package/dist/uploads/uploads.controller.d.ts +0 -13
- package/dist/uploads/uploads.module.d.ts +0 -2
- package/dist/users/avatar.constants.d.ts +0 -11
- package/dist/users/dto/create-user.dto.d.ts +0 -8
- package/dist/users/dto/list-users-query.dto.d.ts +0 -5
- package/dist/users/dto/update-user.dto.d.ts +0 -7
- package/dist/users/entities/user.entity.d.ts +0 -15
- package/dist/users/users.controller.d.ts +0 -16
- package/dist/users/users.module.d.ts +0 -2
- package/dist/users/users.service.d.ts +0 -23
- /package/dist/ui/assets/{cn-CA_aDFCn.js → cn-DqKDUEQs.js} +0 -0
- /package/dist/ui/assets/{eye-FxxhkvZm.js → eye-CSLoB6-a.js} +0 -0
- /package/dist/ui/assets/{file-text-BIOLTys3.js → file-text-CRyDRJx0.js} +0 -0
- /package/dist/ui/assets/{layers-B8HRXy0p.js → layers-CpiP5U5p.js} +0 -0
- /package/dist/ui/assets/{loader-circle-DlEV81d2.js → loader-circle-DbVXtlbV.js} +0 -0
- /package/dist/ui/assets/{refresh-cw-DDDq6wp6.js → refresh-cw-BGkg-lCf.js} +0 -0
- /package/dist/ui/assets/{rocket-Cc0CU430.js → rocket-DzN1Mizs.js} +0 -0
- /package/dist/ui/assets/{save-BzJ6U33U.js → save-zLR2Bpx5.js} +0 -0
- /package/dist/ui/assets/{search-BgZtnvG9.js → search-FGpO3s2Z.js} +0 -0
- /package/dist/ui/assets/{send-u-K1dVSf.js → send-DHRDZ09J.js} +0 -0
- /package/dist/ui/assets/{shield-alert-BMQRu-dz.js → shield-alert-DwOWpTph.js} +0 -0
- /package/dist/ui/assets/{shield-check-CbBQS6Ds.js → shield-check-5104WjFF.js} +0 -0
- /package/dist/ui/assets/{tasks-De5SRWOL.js → tasks-RLY66Qjl.js} +0 -0
- /package/dist/ui/assets/{trash-2-DdCnfswe.js → trash-2-BlARVDmE.js} +0 -0
- /package/dist/ui/assets/{user-D04GkTX2.js → user-CCOu6zJa.js} +0 -0
- /package/dist/ui/assets/{user-plus-QYoMM0_m.js → user-plus-CiJgTJ8j.js} +0 -0
- /package/dist/ui/assets/{users-C1voiRNF.js → users-BVNMRlU5.js} +0 -0
- /package/dist/ui/assets/{vendor-forms-8omdf67B.js → vendor-forms-Cl5GroiL.js} +0 -0
- /package/dist/ui/assets/{vendor-motion-g6T1ev3V.js → vendor-motion-B6xhOm18.js} +0 -0
- /package/dist/ui/assets/{zap-DAeeT5Rj.js → zap-kFzU0aZV.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# [1.0.0-alpha.34](https://github.com/bpinhosilva/agent-orchestrator/compare/v1.0.0-alpha.33...v1.0.0-alpha.34) (2026-04-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* enhance file path validation and logging in uploads, add ExecLogModal component ([2d9ca31](https://github.com/bpinhosilva/agent-orchestrator/commit/2d9ca31fd67924958f417d113ec974252858782d))
|
|
7
|
+
* **migrations:** add migration to set default UUIDs for ID columns ([ea9289b](https://github.com/bpinhosilva/agent-orchestrator/commit/ea9289b8623d244737dfb7340a58637c8967edf8))
|
|
8
|
+
* refactor task and comment entities to use Artifact interface for artifacts ([806fde7](https://github.com/bpinhosilva/agent-orchestrator/commit/806fde736b734de0cb3cb9a7a05c5c3eb2d7f171))
|
|
9
|
+
* **ui:** integrate MarkdownField for task description input and enhance TaskExecutions ([d4b91e8](https://github.com/bpinhosilva/agent-orchestrator/commit/d4b91e8b9c392f77a2cab3c0a5bcc641110bced2))
|
|
10
|
+
|
|
1
11
|
# [1.0.0-alpha.33](https://github.com/bpinhosilva/agent-orchestrator/compare/v1.0.0-alpha.32...v1.0.0-alpha.33) (2026-04-06)
|
|
2
12
|
|
|
3
13
|
|
package/README.md
CHANGED
|
@@ -12,6 +12,10 @@
|
|
|
12
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
13
|
</p>
|
|
14
14
|
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="docs/i18n/pt-br/README.md">🇧🇷 Português (Brasil)</a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
15
19
|
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.
|
|
16
20
|
|
|
17
21
|
## Current capabilities
|
|
@@ -63,6 +67,7 @@ Choose the path that matches how you want to use the project:
|
|
|
63
67
|
npm install -g @bpinhosilva/agent-orchestrator
|
|
64
68
|
agent-orchestrator setup
|
|
65
69
|
agent-orchestrator run
|
|
70
|
+
agent-orchestrator restart
|
|
66
71
|
agent-orchestrator status
|
|
67
72
|
```
|
|
68
73
|
|
|
@@ -100,6 +105,7 @@ Example `.env`:
|
|
|
100
105
|
```bash
|
|
101
106
|
# Required
|
|
102
107
|
JWT_SECRET="replace-with-a-secret-at-least-32-characters-long"
|
|
108
|
+
JWT_REFRESH_SECRET="replace-with-another-secret-at-least-32-characters-long"
|
|
103
109
|
|
|
104
110
|
# Provider keys (optional until you want to execute agents)
|
|
105
111
|
GEMINI_API_KEY=""
|
|
@@ -176,9 +182,11 @@ npm run start:dev
|
|
|
176
182
|
### Packaged/runtime mode
|
|
177
183
|
|
|
178
184
|
```bash
|
|
185
|
+
agent-orchestrator setup
|
|
179
186
|
agent-orchestrator run
|
|
180
187
|
agent-orchestrator status
|
|
181
188
|
agent-orchestrator logs --lines 50
|
|
189
|
+
agent-orchestrator restart
|
|
182
190
|
agent-orchestrator stop
|
|
183
191
|
```
|
|
184
192
|
|
|
@@ -131,18 +131,6 @@ let ClaudeAgent = ClaudeAgent_1 = class ClaudeAgent {
|
|
|
131
131
|
void feature;
|
|
132
132
|
return false;
|
|
133
133
|
}
|
|
134
|
-
async performTask(task, project) {
|
|
135
|
-
this.logger.debug(`Performing task: ${task.title} for project: ${project.title}`);
|
|
136
|
-
const prompt = `
|
|
137
|
-
Task: ${task.title}
|
|
138
|
-
Description: ${task.description}
|
|
139
|
-
Project: ${project.title}
|
|
140
|
-
Project Description: ${project.description}
|
|
141
|
-
|
|
142
|
-
Please perform the task and provide the output.
|
|
143
|
-
`;
|
|
144
|
-
return this.processText(prompt);
|
|
145
|
-
}
|
|
146
134
|
};
|
|
147
135
|
exports.ClaudeAgent = ClaudeAgent;
|
|
148
136
|
exports.ClaudeAgent = ClaudeAgent = ClaudeAgent_1 = __decorate([
|
|
@@ -177,18 +177,6 @@ let GeminiAgent = GeminiAgent_1 = class GeminiAgent {
|
|
|
177
177
|
const hasExcludedSuffix = excludedSuffixes.some((s) => modelName.includes(s));
|
|
178
178
|
return hasSupportedPrefix && !hasExcludedSuffix;
|
|
179
179
|
}
|
|
180
|
-
async performTask(task, project) {
|
|
181
|
-
this.logger.debug(`Performing task: ${task.title} for project: ${project.title}`);
|
|
182
|
-
const prompt = `
|
|
183
|
-
Task: ${task.title}
|
|
184
|
-
Description: ${task.description}
|
|
185
|
-
Project: ${project.title}
|
|
186
|
-
Project Description: ${project.description}
|
|
187
|
-
|
|
188
|
-
Please perform the task and provide the output.
|
|
189
|
-
`;
|
|
190
|
-
return this.processText(prompt);
|
|
191
|
-
}
|
|
192
180
|
};
|
|
193
181
|
exports.GeminiAgent = GeminiAgent;
|
|
194
182
|
exports.GeminiAgent = GeminiAgent = GeminiAgent_1 = __decorate([
|
|
@@ -7,10 +7,12 @@ const stop_command_1 = require("./stop.command");
|
|
|
7
7
|
const status_command_1 = require("./status.command");
|
|
8
8
|
const logs_command_1 = require("./logs.command");
|
|
9
9
|
const migrate_command_1 = require("./migrate.command");
|
|
10
|
+
const restart_command_1 = require("./restart.command");
|
|
10
11
|
function registerAllCommands(program) {
|
|
11
12
|
(0, setup_command_1.registerSetupCommand)(program);
|
|
12
13
|
(0, run_command_1.registerRunCommand)(program);
|
|
13
14
|
(0, stop_command_1.registerStopCommand)(program);
|
|
15
|
+
(0, restart_command_1.registerRestartCommand)(program);
|
|
14
16
|
(0, status_command_1.registerStatusCommand)(program);
|
|
15
17
|
(0, logs_command_1.registerLogsCommand)(program);
|
|
16
18
|
(0, migrate_command_1.registerMigrateCommand)(program);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerRestartCommand = registerRestartCommand;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const process_manager_1 = require("../process-manager");
|
|
6
|
+
const run_command_1 = require("./run.command");
|
|
7
|
+
const stop_command_1 = require("./stop.command");
|
|
8
|
+
function registerRestartCommand(program) {
|
|
9
|
+
program
|
|
10
|
+
.command('restart')
|
|
11
|
+
.description('Restart the orchestrator server (smart: stop if running, then start)')
|
|
12
|
+
.action(async () => {
|
|
13
|
+
const running = (0, process_manager_1.findManagedProcess)(); // TODO: pass default args if needed
|
|
14
|
+
if (running) {
|
|
15
|
+
// Stop if running
|
|
16
|
+
await new Promise((resolve) => {
|
|
17
|
+
const stopProgram = new commander_1.Command();
|
|
18
|
+
(0, stop_command_1.registerStopCommand)(stopProgram);
|
|
19
|
+
stopProgram.exitOverride();
|
|
20
|
+
stopProgram.parse(['node', 'cli', 'stop'], { from: 'user' });
|
|
21
|
+
setTimeout(resolve, 2000); // Wait for stop
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
// Start
|
|
25
|
+
const runProgram = new commander_1.Command();
|
|
26
|
+
(0, run_command_1.registerRunCommand)(runProgram);
|
|
27
|
+
runProgram.exitOverride();
|
|
28
|
+
runProgram.parse(['node', 'cli', 'run'], { from: 'user' });
|
|
29
|
+
});
|
|
30
|
+
}
|
|
@@ -50,7 +50,7 @@ function registerRunCommand(program) {
|
|
|
50
50
|
.action(() => {
|
|
51
51
|
try {
|
|
52
52
|
(0, process_manager_1.assertBuildExists)();
|
|
53
|
-
const existingProcess = (0, process_manager_1.findManagedProcess)();
|
|
53
|
+
const existingProcess = (0, process_manager_1.findManagedProcess)(); // TODO: pass default args if needed
|
|
54
54
|
if (existingProcess) {
|
|
55
55
|
console.log(`Orchestrator is already running.\n${(0, process_manager_1.formatProcessSummary)(existingProcess)}`);
|
|
56
56
|
return;
|
|
@@ -8,7 +8,7 @@ function registerStatusCommand(program) {
|
|
|
8
8
|
.description('Show the currently running orchestrator process, if any')
|
|
9
9
|
.action(() => {
|
|
10
10
|
try {
|
|
11
|
-
const runningProcess = (0, process_manager_1.findManagedProcess)();
|
|
11
|
+
const runningProcess = (0, process_manager_1.findManagedProcess)(); // TODO: pass default args if needed
|
|
12
12
|
if (!runningProcess) {
|
|
13
13
|
console.log('Orchestrator is not running.');
|
|
14
14
|
return;
|
|
@@ -8,7 +8,7 @@ function registerStopCommand(program) {
|
|
|
8
8
|
.description('Stop the orchestrator server after verifying the running process identity')
|
|
9
9
|
.action(() => {
|
|
10
10
|
try {
|
|
11
|
-
const runningProcess = (0, process_manager_1.findManagedProcess)();
|
|
11
|
+
const runningProcess = (0, process_manager_1.findManagedProcess)(); // TODO: pass default args if needed
|
|
12
12
|
if (!runningProcess) {
|
|
13
13
|
console.log('Orchestrator is not running.');
|
|
14
14
|
return;
|
|
@@ -49,7 +49,12 @@ const DEFAULT_PORT = '15789';
|
|
|
49
49
|
// ---------------------------------------------------------------------------
|
|
50
50
|
// Internal helpers
|
|
51
51
|
// ---------------------------------------------------------------------------
|
|
52
|
+
const os = __importStar(require("os"));
|
|
52
53
|
function parseProcCmdline(pid, fsDep) {
|
|
54
|
+
if (os.platform() === 'win32') {
|
|
55
|
+
// Windows: not supported, return null
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
53
58
|
try {
|
|
54
59
|
const cmdlinePath = `/proc/${pid}/cmdline`;
|
|
55
60
|
if (!fsDep.existsSync(cmdlinePath)) {
|
|
@@ -63,6 +68,10 @@ function parseProcCmdline(pid, fsDep) {
|
|
|
63
68
|
}
|
|
64
69
|
}
|
|
65
70
|
function readProcCwd(pid, fsDep) {
|
|
71
|
+
if (os.platform() === 'win32') {
|
|
72
|
+
// Windows: not supported, return null
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
66
75
|
try {
|
|
67
76
|
return path.resolve(fsDep.readlinkSync(`/proc/${pid}/cwd`));
|
|
68
77
|
}
|
|
@@ -70,6 +79,7 @@ function readProcCwd(pid, fsDep) {
|
|
|
70
79
|
return null;
|
|
71
80
|
}
|
|
72
81
|
}
|
|
82
|
+
// Removed duplicate findManagedProcess implementation
|
|
73
83
|
function processContainsMainPath(cmdline, expectedMainPath) {
|
|
74
84
|
return cmdline.some((arg) => {
|
|
75
85
|
try {
|
|
@@ -175,6 +185,7 @@ function safeUnlink(fsDep, filePath) {
|
|
|
175
185
|
throw e;
|
|
176
186
|
}
|
|
177
187
|
}
|
|
188
|
+
// Removed duplicate findManagedProcess implementation
|
|
178
189
|
function formatProcessSummary(processInfo, logFile = constants_1.LOG_FILE) {
|
|
179
190
|
return [
|
|
180
191
|
`PID: ${processInfo.pid}`,
|
|
@@ -234,6 +245,17 @@ function assertBuildExists(mainFile = constants_1.MAIN_FILE, uiIndexFile = const
|
|
|
234
245
|
}
|
|
235
246
|
}
|
|
236
247
|
function isManagedProcess(pid, expected, fsDep = realFs) {
|
|
248
|
+
if (os.platform() === 'win32') {
|
|
249
|
+
// On Windows, just check process exists and cwd matches meta
|
|
250
|
+
try {
|
|
251
|
+
process.kill(pid, 0);
|
|
252
|
+
}
|
|
253
|
+
catch {
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
// No reliable way to check cwd/mainPath, so trust PID file
|
|
257
|
+
return true;
|
|
258
|
+
}
|
|
237
259
|
try {
|
|
238
260
|
process.kill(pid, 0);
|
|
239
261
|
}
|
|
@@ -48,6 +48,7 @@ var StorageContext;
|
|
|
48
48
|
StorageContext["TASKS"] = "tasks";
|
|
49
49
|
StorageContext["AGENTS"] = "agents";
|
|
50
50
|
StorageContext["COMMENTS"] = "comments";
|
|
51
|
+
StorageContext["RECURRENT_TASKS"] = "recurrent-tasks";
|
|
51
52
|
})(StorageContext || (exports.StorageContext = StorageContext = {}));
|
|
52
53
|
exports.ALLOWED_MIME_TYPES = new Set([
|
|
53
54
|
'image/png',
|
|
@@ -5,7 +5,12 @@ function normalizeMigrationSqlForDriver(driverType, sql) {
|
|
|
5
5
|
if (driverType !== 'postgres') {
|
|
6
6
|
return sql;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
.
|
|
8
|
+
let normalizedSql = sql
|
|
9
|
+
.replaceAll("(datetime('now'))", 'CURRENT_TIMESTAMP')
|
|
10
|
+
.replaceAll("datetime('now')", 'CURRENT_TIMESTAMP')
|
|
10
11
|
.replace(/\bdatetime\b/g, 'timestamp');
|
|
12
|
+
if (normalizedSql.includes('CREATE TABLE "temporary_')) {
|
|
13
|
+
normalizedSql = normalizedSql.replace(/CONSTRAINT\s+"UQ_[^"]+"\s+UNIQUE/g, 'UNIQUE');
|
|
14
|
+
}
|
|
15
|
+
return normalizedSql;
|
|
11
16
|
}
|
|
@@ -7,7 +7,7 @@ async function getMigrationContext(dataSource) {
|
|
|
7
7
|
const hasPending = await dataSource.showMigrations();
|
|
8
8
|
const tables = await dataSource.query((0, typeorm_1.isSqliteDriver)(dataSource.options.type)
|
|
9
9
|
? "SELECT name FROM sqlite_master WHERE type='table' AND name NOT IN ('migrations', 'sqlite_sequence')"
|
|
10
|
-
: "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_name
|
|
10
|
+
: "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_name NOT IN ('migrations')");
|
|
11
11
|
return {
|
|
12
12
|
hasPending,
|
|
13
13
|
isEmpty: tables.length === 0,
|
package/dist/main.js
CHANGED
|
@@ -24,6 +24,13 @@ async function ensureDatabaseIsReadyForStartup() {
|
|
|
24
24
|
if (!hasPending) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
+
const nodeEnv = process.env.NODE_ENV || 'development';
|
|
28
|
+
if (nodeEnv === 'development') {
|
|
29
|
+
logger.log('Pending migrations detected. Running migrations...');
|
|
30
|
+
await (0, migration_state_1.runMigrations)();
|
|
31
|
+
logger.log('Migrations completed successfully.');
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
27
34
|
throw new Error([
|
|
28
35
|
'Pending database migrations were detected.',
|
|
29
36
|
'Run `agent-orchestrator setup` or `agent-orchestrator migrate --yes` for packaged installs, `npm run migration:run` for local source development, or `docker compose run --rm api dist/cli/index.js migrate --yes` in the Docker stack, then start the server again.',
|