@taico/taico 0.3.2 → 0.3.3

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.
Files changed (51) hide show
  1. package/README.md +2 -2
  2. package/dist/agents/agent-avatar.library.js +6 -0
  3. package/dist/agents/agent-avatar.library.js.map +1 -1
  4. package/dist/agents/agent-template.catalog.js +23 -3
  5. package/dist/agents/agent-template.catalog.js.map +1 -1
  6. package/dist/app-init/agent/developer.agent.d.ts +2 -0
  7. package/dist/app-init/agent/developer.agent.js +23 -0
  8. package/dist/app-init/agent/developer.agent.js.map +1 -0
  9. package/dist/app-init/agent/lead.agent.d.ts +2 -0
  10. package/dist/app-init/agent/lead.agent.js +23 -0
  11. package/dist/app-init/agent/lead.agent.js.map +1 -0
  12. package/dist/app-init/agent/plan-reviewer.agent.d.ts +2 -0
  13. package/dist/app-init/agent/plan-reviewer.agent.js +24 -0
  14. package/dist/app-init/agent/plan-reviewer.agent.js.map +1 -0
  15. package/dist/app-init/agent/planner.agent.d.ts +2 -0
  16. package/dist/app-init/agent/planner.agent.js +23 -0
  17. package/dist/app-init/agent/planner.agent.js.map +1 -0
  18. package/dist/app-init/agent/taskmaster.agent.d.ts +2 -0
  19. package/dist/app-init/agent/taskmaster.agent.js +23 -0
  20. package/dist/app-init/agent/taskmaster.agent.js.map +1 -0
  21. package/dist/app-init/app-init.runner.js +35 -0
  22. package/dist/app-init/app-init.runner.js.map +1 -1
  23. package/dist/app-init/models/models.d.ts +4 -0
  24. package/dist/app-init/models/models.js +21 -1
  25. package/dist/app-init/models/models.js.map +1 -1
  26. package/dist/app-init/prompts/prompts.d.ts +4 -0
  27. package/dist/app-init/prompts/prompts.js +175 -1
  28. package/dist/app-init/prompts/prompts.js.map +1 -1
  29. package/dist/app.controller.d.ts +9 -1
  30. package/dist/app.controller.js +52 -2
  31. package/dist/app.controller.js.map +1 -1
  32. package/dist/app.controller.spec.js +16 -1
  33. package/dist/app.controller.spec.js.map +1 -1
  34. package/dist/app.module.js +4 -1
  35. package/dist/app.module.js.map +1 -1
  36. package/dist/main.js +10 -0
  37. package/dist/main.js.map +1 -1
  38. package/dist/migrations/1742800000000-RemovePlannerPlanTagTrigger.d.ts +5 -0
  39. package/dist/migrations/1742800000000-RemovePlannerPlanTagTrigger.js +27 -0
  40. package/dist/migrations/1742800000000-RemovePlannerPlanTagTrigger.js.map +1 -0
  41. package/dist/public/assets/{index-DzwOFnwx.js → index-C1ykqErs.js} +1 -1
  42. package/dist/public/index.html +1 -1
  43. package/dist/public/package.json +4 -4
  44. package/dist/server-lifecycle.service.d.ts +14 -0
  45. package/dist/server-lifecycle.service.js +54 -0
  46. package/dist/server-lifecycle.service.js.map +1 -0
  47. package/dist/server-lifecycle.service.spec.d.ts +1 -0
  48. package/dist/server-lifecycle.service.spec.js +63 -0
  49. package/dist/server-lifecycle.service.spec.js.map +1 -0
  50. package/dist/tsconfig.tsbuildinfo +1 -1
  51. package/package.json +5 -5
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HELPER_PROMPT = exports.TAICO_PROMPT = exports.REVIEWER_PROMPT = exports.ASSISTANT_PROMPT = exports.DEV_PROMPT = void 0;
3
+ exports.HELPER_PROMPT = exports.TAICO_PROMPT = exports.LEAD_PROMPT = exports.TASKMASTER_PROMPT = exports.PLAN_REVIEWER_PROMPT = exports.PLANNER_PROMPT = exports.REVIEWER_PROMPT = exports.ASSISTANT_PROMPT = exports.DEV_PROMPT = void 0;
4
4
  exports.DEV_PROMPT = `# Start task
5
5
  Your goal is to pick up a task and work on it, taking it all the way from "not started" to "for review". A task is a unit of work, a commitment.
6
6
  You are in headless mode, and the only way to communicate with the user is through the Tasks MCP server.
@@ -114,6 +114,180 @@ Your goal is to review code changes in a task that is in "for review" status. Yo
114
114
  - [] either approved or requested changes with detailed feedback
115
115
  - [] added a comment to the GitHub PR
116
116
  `;
117
+ exports.PLANNER_PROMPT = `# Start task
118
+ Your goal is to create a plan for a feature / bug fix / project and save it in a context block.
119
+ You will pick up a task and work on it, taking it all the way from "not started" to "for review". A task is a unit of work, a commitment.
120
+ You are in headless mode, and the only way to communicate with the user is through the Tasks MCP server.
121
+
122
+ 1. Pull the task using the Tasks MCP server by ID
123
+ 2. Read the content and comments
124
+ 3. Use the MCP server to add a \`plan\` tag
125
+
126
+ You might be triggered with a fresh task, or as a re-work after receiving feedback on a plan you've already created.
127
+
128
+ # Workflow
129
+
130
+ ### Prep
131
+ 1. You'll start in a workspace that might have a repo cloned
132
+ 2. Put this task in progress
133
+
134
+ ### Clarify
135
+ 3. If the requirement is not clear, ask questions via the input request tool and:
136
+ - put the task back to NOT_STARTED
137
+ - assign it to whomever you asked the question to
138
+
139
+ ### Work
140
+ 4. Do whatever you need to understand the thing you're planning. Feel free to explore the repo and use search tools. You have he \`gh\` cli available. If there's anything you're not clear about, ask the user.
141
+ 5. You are encouraged to work on the plan in a local .md file (never commit or push anything though) so you can do edits.
142
+ 6. When you make decisions, add a comment to this task to document it
143
+ 7. When you find relevant context, add it to this task as a comment (think what would be useful for someone reading this task in the future)
144
+
145
+ ### Finish
146
+ 8. Upload the .md file as a context block (override the existing one if this was a re-work to incorporate feedback)
147
+ 9. Add a comment / artifact to this task with the ID of the block created and make it clear this is where the plan lives (will be read by future consumers)
148
+ 10. Mark the task as \`in review\`
149
+ 11. Assign the task to \`plan-reviewer\`
150
+
151
+ # Planning guidelines
152
+ Your plan will be consumed by a team lead that will break it down into tasks to be implemented. For your plan, please:
153
+ - define test strategy as a foundation, not an afterthought
154
+ - focus on modularity, interfaces and maintainability
155
+ - explain what parts can be done in parallel and any sequencing / dependencies
156
+
157
+ # Checklist
158
+ - [] put the task in progress when starting to work
159
+ - [] upload plan as a context block
160
+ - [] put this task in review when done and assigned it to \`plan-reviewer\``;
161
+ exports.PLAN_REVIEWER_PROMPT = `# Start task
162
+ Your goal is to review a plan that another agent worked on. You'll take it from "in review" to "done if ok, or back to "not started" if it needs changes.
163
+ You will receive a task with a full log of activity. Read it to understand what was the original intent.
164
+
165
+ A task is a unit of work, a commitment.
166
+ You are in headless mode, and the only way to communicate with the user is through the Tasks MCP server.
167
+
168
+ 1. Pull the task using the Tasks MCP server by ID
169
+ 2. Read the content and comments
170
+
171
+ # Workflow
172
+
173
+ ### Preparation
174
+ 1. You'll start in a workspace that might have a repo cloned
175
+ 2. Identify the plan (should be a reference to a context block)
176
+ 3. Pull it and store it locally as a .md file so you can read it multiple times if needed
177
+
178
+ ### Review Process
179
+ 4. Examine if the plan matches the intended original goal of the task
180
+ 5. Review that the actual plan includes:
181
+ - original intent clearly written
182
+ - test strategy
183
+ - good modular architecture
184
+ - look for potential gotchas
185
+
186
+ ### Decisions
187
+ 6. If issues are found, we will send the task back to the planner to improve it. You'll need to:
188
+ - add a \`review ❌\` tag to the task
189
+ - add a detailed comment to the task listing the feedback (this will be actioned)
190
+ - include specific suggestion for fixes
191
+ - assign the task back to the original assignee (usually \`planner\`)
192
+ - put the task back to NOT_STARTED status
193
+ 7. If the plan looks good, LFG!
194
+ - add a \`review ✅\` tag to the task
195
+ - move it to DONE witha. comment saying the plan is approved
196
+ - assign the task back to the original assignee
197
+
198
+ # Checklist:
199
+ - [] fetched and reviewed the context block with a plan
200
+ - [] added a comment to the task with either feedback or approval
201
+ - [] moved the task to either done or not started
202
+ - [] assigned \`review ✅ | ❌\` tag`;
203
+ exports.TASKMASTER_PROMPT = `# Start task
204
+ Your goal is to read a plan for a feature / bug fix / project and create tasks to implement it. You will pick up a task and work on it, taking it all the way from "not started" to "done". A task is a unit of work, a commitment. You are in headless mode, and the only way to communicate with the user is through the Tasks MCP server.
205
+
206
+ 1. Pull the task using the Tasks MCP server by ID
207
+ 2. Read the content and comments
208
+ 3. Use the MCP server to add a plan tag
209
+
210
+ # Workflow
211
+
212
+ ### Prep
213
+ 1. You'll start in a workspace that might have a repo cloned
214
+ 2. Put the task in progress
215
+ 3. Read the plan and decide if it will be implemented in a single task or if it needs to be broken up in series / parallel (graph like)
216
+
217
+ ### Clarify
218
+ 4.If the requirement is not clear, ask a question via the input request tool and:
219
+ - put the task back to NOT_STARTED
220
+ - assign it to whomever you asked the question to
221
+
222
+ ### Work
223
+ 5. Decide which project:xxx tag should be used:
224
+ - list all tags using the MCP tool, focusing on the ones that start with project:
225
+ - if this task has a project tag, use that one
226
+ - if not, look at the task that created the plan to see if that one has a project tag
227
+ - if no project tag is found, ensure you add a link to the repository to work on in the tasks you create (the project resolves to a repo, so if no project is found, just link the repo)
228
+ 6. Create tasks to accomplish the plan. The tasks will be handled by a developer. Developers follow a generic flow starting from main and ending with a pull request. You'll need to provide enough details in the task body for the developers to know what to do. Reference the original scope for context if using multiple tasks.
229
+ 7. Set dependencies. If you're creating multiple tasks, keep in mind that they'll need to be merged one by one. If they're independent, fine. If there's sequencing involved, add dependencies between tasks.
230
+ 8. Ensure all tasks created have the project: tag you found (if any)
231
+ 9. Assign the tasks you created to @developer. The developer will start working on them immediately, so don't assign until dependencies and tags are applied.
232
+ 10. When you make a decision, add a comment to the task to document it
233
+ 11. When you find relevant context, add it to the task as a comment (think what will be useful for someone in the future picking up this task)
234
+
235
+ ### Finish
236
+ 12. Add a comment to the task mentioning how you've broken up the work and referencing all sub tasks you created
237
+ 13. Move this task to "DONE"
238
+
239
+ # Checklist
240
+ - [] put this task in progress when starting to work
241
+ - [] read plan from context
242
+ - [] created implementation task(s)
243
+ - [] marked this task as DONE`;
244
+ exports.LEAD_PROMPT = `# Start task
245
+ Your goal is simple: lead a team to achieve a goal. You'll do so by delegating work to a planner and an implementer. You'll oversee the completion of the project.
246
+ You will pick up a task explaining the task at hand.
247
+ A task is a unit of work, a commitment.
248
+ You are in headless mode, and the only way to communicate with the user is through the Tasks MCP Server.
249
+
250
+ 1. Pull the task using the Tasks MCP server by ID
251
+ 2. Read the content and comments
252
+ 3. Use the MCP server to add a \`plan\` tag
253
+
254
+ # Workflow
255
+
256
+ ### Prep
257
+ 1. You'll start in a workspace that might have a repo cloned
258
+ 2. Put the task in progress
259
+
260
+ ### Clarify
261
+ 3. If the requirement is not clear, ask a question via the input request tool and:
262
+ - put the task back to NOT_STARTED
263
+ - assign it to whomever you asked the question to
264
+
265
+ ### Work
266
+ 4. Decide which \`project:xxx\` tag should be used:
267
+ - list all tags using the MCP tool, focusing on the ones that start with \`project:\`
268
+ - if this task has a project tag, use that one
269
+ - if no project tag is found, ensure you add a link to the repository to work on in the tasks you create
270
+ 5. Create a planning task. This task will be picked up by a planner that will create a plan, and will be reviewed by an independent party. Once the reviewer is happy, the plan will land in a context block and the task will be marked as "done"
271
+ - 5.1 Add enough information for the planner to understand the outcome it needs to achieve
272
+ - 5.2 Add the \`plan\` tag to the task
273
+ - 5.3 Add the \`project:\` tag you found in step 4
274
+ - 5.4 Assign the task to \`@planner\`
275
+ 6. Create a fan-out task. This task will be picked up by a manager that will read the plan and create sub tasks to be worked on.
276
+ - 6.1 Simple description, ask it to read the plan created by the other task you made in step 5 (reference it with ID)
277
+ - 6.2 Add the \`project:\` tag
278
+ - 6.3 Set a dependency on this new task - depends on the planner task
279
+ - 6.4 Assign the task to \`@taskmaster\`
280
+
281
+ Once a task is assigned, it will be picked up immediately. So it's important you add all the relevant tags and dependencies before assigning it.
282
+
283
+ ### Finish
284
+ 7. Add a comment to the task mentioning you created the sub tasks
285
+
286
+ ### Checklist
287
+ - [] put this task in progress when starting to work
288
+ - [] created planning task
289
+ - [] created fan-out task
290
+ - [] marked this task as DONE`;
117
291
  exports.TAICO_PROMPT = `You are Taico.
118
292
  Taico is a task execution platform where humans and AI agents collaborate on work. It provides the primitives for creating tasks, assigning them to people or agents, and orchestrating automated workflows through status and tag triggers.
119
293
 
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/app-init/prompts/prompts.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCzB,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyB/B,CAAC;AAEW,QAAA,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8C9B,CAAC;AAGW,QAAA,YAAY,GAAG;;;;;;;;;;;;CAY3B,CAAC;AAGW,QAAA,aAAa,GAAG;;;;;;;;;;;;;CAa5B,CAAA"}
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/app-init/prompts/prompts.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCzB,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyB/B,CAAC;AAEW,QAAA,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8C9B,CAAC;AAEW,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EA2C8C,CAAC;AAEhE,QAAA,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAyCD,CAAC;AAEvB,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAwCH,CAAC;AAElB,QAAA,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA8CG,CAAC;AAGlB,QAAA,YAAY,GAAG;;;;;;;;;;;;CAY3B,CAAC;AAGW,QAAA,aAAa,GAAG;;;;;;;;;;;;;CAa5B,CAAA"}
@@ -1,6 +1,14 @@
1
1
  import { AppService } from './app.service';
2
+ import { ServerLifecycleService } from './server-lifecycle.service';
2
3
  export declare class AppController {
3
4
  private readonly appService;
4
- constructor(appService: AppService);
5
+ private readonly serverLifecycle;
6
+ constructor(appService: AppService, serverLifecycle: ServerLifecycleService);
5
7
  getHello(): string;
8
+ getLive(): {
9
+ status: 'ok';
10
+ };
11
+ getReady(): {
12
+ status: 'ready';
13
+ };
6
14
  }
@@ -13,14 +13,26 @@ exports.AppController = void 0;
13
13
  const common_1 = require("@nestjs/common");
14
14
  const swagger_1 = require("@nestjs/swagger");
15
15
  const app_service_1 = require("./app.service");
16
+ const server_lifecycle_service_1 = require("./server-lifecycle.service");
16
17
  let AppController = class AppController {
17
18
  appService;
18
- constructor(appService) {
19
+ serverLifecycle;
20
+ constructor(appService, serverLifecycle) {
19
21
  this.appService = appService;
22
+ this.serverLifecycle = serverLifecycle;
20
23
  }
21
24
  getHello() {
22
25
  return this.appService.getHello();
23
26
  }
27
+ getLive() {
28
+ return { status: 'ok' };
29
+ }
30
+ getReady() {
31
+ if (!this.serverLifecycle.isReady()) {
32
+ throw new common_1.ServiceUnavailableException('Server is shutting down');
33
+ }
34
+ return { status: 'ready' };
35
+ }
24
36
  };
25
37
  exports.AppController = AppController;
26
38
  __decorate([
@@ -37,8 +49,46 @@ __decorate([
37
49
  __metadata("design:paramtypes", []),
38
50
  __metadata("design:returntype", String)
39
51
  ], AppController.prototype, "getHello", null);
52
+ __decorate([
53
+ (0, common_1.Get)('/health/live'),
54
+ (0, swagger_1.ApiOperation)({ summary: 'Liveness check endpoint' }),
55
+ (0, swagger_1.ApiOkResponse)({
56
+ description: 'The process is alive',
57
+ schema: {
58
+ type: 'object',
59
+ properties: {
60
+ status: { type: 'string', example: 'ok' },
61
+ },
62
+ required: ['status'],
63
+ },
64
+ }),
65
+ __metadata("design:type", Function),
66
+ __metadata("design:paramtypes", []),
67
+ __metadata("design:returntype", Object)
68
+ ], AppController.prototype, "getLive", null);
69
+ __decorate([
70
+ (0, common_1.Get)('/health/ready'),
71
+ (0, swagger_1.ApiOperation)({ summary: 'Readiness check endpoint' }),
72
+ (0, swagger_1.ApiOkResponse)({
73
+ description: 'The server is ready to accept traffic',
74
+ schema: {
75
+ type: 'object',
76
+ properties: {
77
+ status: { type: 'string', example: 'ready' },
78
+ },
79
+ required: ['status'],
80
+ },
81
+ }),
82
+ (0, swagger_1.ApiServiceUnavailableResponse)({
83
+ description: 'Shutdown has started and the server is not ready',
84
+ }),
85
+ __metadata("design:type", Function),
86
+ __metadata("design:paramtypes", []),
87
+ __metadata("design:returntype", Object)
88
+ ], AppController.prototype, "getReady", null);
40
89
  exports.AppController = AppController = __decorate([
41
90
  (0, common_1.Controller)(),
42
- __metadata("design:paramtypes", [app_service_1.AppService])
91
+ __metadata("design:paramtypes", [app_service_1.AppService,
92
+ server_lifecycle_service_1.ServerLifecycleService])
43
93
  ], AppController);
44
94
  //# sourceMappingURL=app.controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAyD;AACzD,6CAA2E;AAC3E,+CAA2C;AAGpC,IAAM,aAAa,GAAnB,MAAM,aAAa;IACK;IAA7B,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAWvD,QAAQ;QACN,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;CACF,CAAA;AAfY,sCAAa;AAYxB;IATC,IAAA,YAAG,GAAE;IACL,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;IAClD,IAAA,uBAAa,EAAC;QACb,WAAW,EAAE,4BAA4B;QACzC,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,cAAc;SACxB;KACF,CAAC;;;;6CAGD;wBAdU,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAE8B,wBAAU;GADxC,aAAa,CAezB"}
1
+ {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA8E;AAC9E,6CAIyB;AACzB,+CAA2C;AAC3C,yEAAoE;AAG7D,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AC;IACrD,IAAA,uBAAa,EAAC;QACb,WAAW,EAAE,uCAAuC;QACpD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE;aAC7C;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF,CAAC;IACD,IAAA,uCAA6B,EAAC;QAC7B,WAAW,EAAE,kDAAkD;KAChE,CAAC;;;;6CAOD;wBAxDU,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAGoB,wBAAU;QACL,iDAAsB;GAH/C,aAAa,CAyDzB"}
@@ -3,19 +3,34 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const testing_1 = require("@nestjs/testing");
4
4
  const app_controller_1 = require("./app.controller");
5
5
  const app_service_1 = require("./app.service");
6
+ const server_lifecycle_service_1 = require("./server-lifecycle.service");
6
7
  describe('AppController', () => {
7
8
  let appController;
9
+ let serverLifecycle;
8
10
  beforeEach(async () => {
9
11
  const app = await testing_1.Test.createTestingModule({
10
12
  controllers: [app_controller_1.AppController],
11
- providers: [app_service_1.AppService],
13
+ providers: [app_service_1.AppService, server_lifecycle_service_1.ServerLifecycleService],
12
14
  }).compile();
13
15
  appController = app.get(app_controller_1.AppController);
16
+ serverLifecycle = app.get(server_lifecycle_service_1.ServerLifecycleService);
14
17
  });
15
18
  describe('root', () => {
16
19
  it('should return "Hello World!"', () => {
17
20
  expect(appController.getHello()).toBe('Hello World!');
18
21
  });
19
22
  });
23
+ describe('health', () => {
24
+ it('should return live status', () => {
25
+ expect(appController.getLive()).toEqual({ status: 'ok' });
26
+ });
27
+ it('should return ready status before shutdown', () => {
28
+ expect(appController.getReady()).toEqual({ status: 'ready' });
29
+ });
30
+ it('should reject readiness after shutdown starts', () => {
31
+ serverLifecycle.beginShutdown('SIGTERM');
32
+ expect(() => appController.getReady()).toThrow('Server is shutting down');
33
+ });
34
+ });
20
35
  });
21
36
  //# sourceMappingURL=app.controller.spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.controller.spec.js","sourceRoot":"","sources":["../src/app.controller.spec.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AACtD,qDAAiD;AACjD,+CAA2C;AAE3C,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAI,aAA4B,CAAC;IAEjC,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,GAAG,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;YACxD,WAAW,EAAE,CAAC,8BAAa,CAAC;YAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;SACxB,CAAC,CAAC,OAAO,EAAE,CAAC;QAEb,aAAa,GAAG,GAAG,CAAC,GAAG,CAAgB,8BAAa,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;YACtC,MAAM,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"app.controller.spec.js","sourceRoot":"","sources":["../src/app.controller.spec.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AACtD,qDAAiD;AACjD,+CAA2C;AAC3C,yEAAoE;AAEpE,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAI,aAA4B,CAAC;IACjC,IAAI,eAAuC,CAAC;IAE5C,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,GAAG,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;YACxD,WAAW,EAAE,CAAC,8BAAa,CAAC;YAC5B,SAAS,EAAE,CAAC,wBAAU,EAAE,iDAAsB,CAAC;SAChD,CAAC,CAAC,OAAO,EAAE,CAAC;QAEb,aAAa,GAAG,GAAG,CAAC,GAAG,CAAgB,8BAAa,CAAC,CAAC;QACtD,eAAe,GAAG,GAAG,CAAC,GAAG,CAAyB,iDAAsB,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;YACtC,MAAM,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACtB,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;YACnC,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;YACpD,MAAM,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;QAChE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;YACvD,eAAe,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;YAEzC,MAAM,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;QAC5E,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -54,12 +54,14 @@ const _1742400000000_RenameHasSeenWalkthroughToOnboardingDisplayMode_1 = require
54
54
  const _1742500000000_AllowInterruptedExecutionErrorCode_1 = require("./migrations/1742500000000-AllowInterruptedExecutionErrorCode");
55
55
  const _1742600000000_AddExecutionStatsTable_1 = require("./migrations/1742600000000-AddExecutionStatsTable");
56
56
  const _1742700000000_AddWorkerVersionFields_1 = require("./migrations/1742700000000-AddWorkerVersionFields");
57
+ const _1742800000000_RemovePlannerPlanTagTrigger_1 = require("./migrations/1742800000000-RemovePlannerPlanTagTrigger");
57
58
  const secrets_module_1 = require("./secrets/secrets.module");
58
59
  const chat_providers_module_1 = require("./chat-providers/chat-providers.module");
59
60
  const executions_module_1 = require("./executions/executions.module");
60
61
  const global_search_module_1 = require("./global-search/global-search.module");
61
62
  const workers_module_1 = require("./workers/workers.module");
62
63
  const walkthrough_module_1 = require("./walkthrough/walkthrough.module");
64
+ const server_lifecycle_service_1 = require("./server-lifecycle.service");
63
65
  let AppModule = class AppModule {
64
66
  };
65
67
  exports.AppModule = AppModule;
@@ -100,6 +102,7 @@ exports.AppModule = AppModule = __decorate([
100
102
  _1742500000000_AllowInterruptedExecutionErrorCode_1.AllowInterruptedExecutionErrorCode1742500000000,
101
103
  _1742600000000_AddExecutionStatsTable_1.AddExecutionStatsTable1742600000000,
102
104
  _1742700000000_AddWorkerVersionFields_1.AddWorkerVersionFields1742700000000,
105
+ _1742800000000_RemovePlannerPlanTagTrigger_1.RemovePlannerPlanTagTrigger1742800000000,
103
106
  ],
104
107
  }),
105
108
  event_emitter_1.EventEmitterModule.forRoot(),
@@ -125,7 +128,7 @@ exports.AppModule = AppModule = __decorate([
125
128
  walkthrough_module_1.WalkthroughModule,
126
129
  ],
127
130
  controllers: [app_controller_1.AppController],
128
- providers: [app_service_1.AppService],
131
+ providers: [app_service_1.AppService, server_lifecycle_service_1.ServerLifecycleService],
129
132
  })
130
133
  ], AppModule);
131
134
  //# sourceMappingURL=app.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AACjD,+CAA2C;AAC3C,6CAAgD;AAChD,yDAA2D;AAC3D,+CAAkD;AAClD,uDAAm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C;oBACtC,+DAA6B;oBAC7B,yGAAkD;oBAClD,uFAAyC;oBACzC,+FAA6C;oBAC7C,yFAA0C;oBAC1C,yFAA0C;oBAC1C,yEAAkC;oBAClC,2GAAmD;oBACnD,6GAAoD;oBACpD,6EAAoC;oBACpC,2FAA2C;oBAC3C,yEAAkC;oBAClC,6DAA4B;oBAC5B,6HAA4D;oBAC5D,mGAA+C;oBAC/C,2EAAmC;oBACnC,2EAAmC;iBACpC;aACF,CAAC;YACF,kCAAkB,CAAC,OAAO,EAAE;YAC5B,yBAAc,CAAC,OAAO,EAAE;YACxB,wBAAU;YACV,0BAAW;YACX,6CAAoB;YACpB,8BAAa;YACb,uCAAiB;YACjB,yCAAkB;YAClB,uDAAyB;YACzB,kCAAe;YACf,4BAAY;YACZ,mCAAe;YACf,8BAAa;YACb,iDAAsB;YACtB,+BAAa;YACb,8BAAa;YACb,2CAAmB;YACnB,oCAAgB;YAChB,8BAAa;YACb,yCAAkB;YAClB,sCAAiB;SAClB;QACD,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;KACxB,CAAC;GACW,SAAS,CAAI"}
1
+ {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AACjD,+CAA2C;AAC3C,6CAAgD;AAChD,yDAA2D;AAC3D,+CAAkD;AAClD,uDAAmD;AACnD,6DAAyD;AACzD,4EAAuE;AACvE,oGAA+F;AAC/F,mEAA+D;AAC/D,+EAA0E;AAC1E,0DAAsD;AACtD,6DAAyD;AACzD,2FAAsF;AACtF,oDAAgD;AAChD,sEAAiE;AACjE,oDAA4E;AAC5E,gEAA2D;AAC3D,qFAAgF;AAChF,6FAAwF;AACxF,6HAAwH;AACxH,mHAA8G;AAC9G,qIAAgI;AAChI,+IAA0I;AAC1I,uHAAkH;AAClH,+FAA0F;AAC1F,2GAAsG;AACtG,mHAA8G;AA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,CAAC;YACF,kCAAkB,CAAC,OAAO,EAAE;YAC5B,yBAAc,CAAC,OAAO,EAAE;YACxB,wBAAU;YACV,0BAAW;YACX,6CAAoB;YACpB,8BAAa;YACb,uCAAiB;YACjB,yCAAkB;YAClB,uDAAyB;YACzB,kCAAe;YACf,4BAAY;YACZ,mCAAe;YACf,8BAAa;YACb,iDAAsB;YACtB,+BAAa;YACb,8BAAa;YACb,2CAAmB;YACnB,oCAAgB;YAChB,8BAAa;YACb,yCAAkB;YAClB,sCAAiB;SAClB;QACD,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,EAAE,iDAAsB,CAAC;KAChD,CAAC;GACW,SAAS,CAAI"}
package/dist/main.js CHANGED
@@ -14,6 +14,7 @@ const path_1 = require("path");
14
14
  const problem_details_filter_1 = require("./http/problem-details.filter");
15
15
  const cookie_parser_1 = __importDefault(require("cookie-parser"));
16
16
  const env_config_1 = require("./config/env.config");
17
+ const server_lifecycle_service_1 = require("./server-lifecycle.service");
17
18
  const logger = new common_1.Logger('Bootstrap');
18
19
  async function bootstrap() {
19
20
  const args = process.argv.slice(2);
@@ -36,6 +37,11 @@ async function bootstrap() {
36
37
  await generateOpenApi(app);
37
38
  return;
38
39
  }
40
+ const lifecycle = app.get(server_lifecycle_service_1.ServerLifecycleService);
41
+ process.once('SIGTERM', () => lifecycle.beginShutdown('SIGTERM'));
42
+ process.once('SIGINT', () => lifecycle.beginShutdown('SIGINT'));
43
+ app.enableShutdownHooks(['SIGTERM', 'SIGINT']);
44
+ logger.log('Shutdown hooks enabled for SIGTERM and SIGINT');
39
45
  const document = createSwaggerDocument(app);
40
46
  swagger_1.SwaggerModule.setup('api/v1/docs', app, document);
41
47
  app.use('/launch', createLaunchScriptHandler((0, env_config_1.getConfig)().appVersion));
@@ -85,6 +91,10 @@ async function createConfiguredApp(AppModule) {
85
91
  path: '/launch',
86
92
  method: common_1.RequestMethod.ALL,
87
93
  },
94
+ {
95
+ path: '/health/*path',
96
+ method: common_1.RequestMethod.ALL,
97
+ },
88
98
  ],
89
99
  });
90
100
  return app;
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;AACA,4BAA0B;AAC1B,2CAAuE;AACvE,uCAA2C;AAC3C,6CAAyC;AACzC,6CAAiE;AACjE,2BAA+C;AAC/C,+BAA4B;AAC5B,0EAAqE;AAErE,kEAAyC;AACzC,oDAAgD;AAGhD,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,WAAW,CAAC,CAAC;AAEvC,KAAK,UAAU,SAAS;IACtB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5D,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC7C,MAAM,mBAAmB,GAAG,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;IAChE,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAE9C,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,OAAO,CAAC;IACrC,CAAC;IAED,IAAI,IAAI,EAAE,CAAC;QACT,UAAU,EAAE,CAAC;QACb,OAAO;IACT,CAAC;IAED,IAAI,UAAU,IAAI,mBAAmB,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,mBAAmB,CAAC,sBAAS,CAAC,CAAC;IAEjD,IAAI,mBAAmB,EAAE,CAAC;QACxB,MAAM,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,CAAC;AACpB,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;CAUb,CAAC,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,IAAc,EAAE,IAAY;IACjD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;AACjC,CAAC;AAED,SAAS,yBAAyB,CAAC,UAAkB;IACnD,OAAO,CAAC,IAAa,EAAE,GAAa,EAAE,EAAE;QACtC,MAAM,YAAY,GAAG;;;;6CAIoB,UAAU;;;;;;;;;;;;;;;;;yEAiBkB,CAAC;QACtE,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,2BAA2B,CAAC,CAAC;QAC3D,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACzB,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+ export declare class RemovePlannerPlanTagTrigger1742800000000 implements MigrationInterface {
3
+ up(queryRunner: QueryRunner): Promise<void>;
4
+ down(queryRunner: QueryRunner): Promise<void>;
5
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RemovePlannerPlanTagTrigger1742800000000 = void 0;
4
+ class RemovePlannerPlanTagTrigger1742800000000 {
5
+ async up(queryRunner) {
6
+ await queryRunner.query(`
7
+ UPDATE agents
8
+ SET tag_triggers = ''
9
+ WHERE actor_id IN (
10
+ SELECT id FROM actors WHERE slug = 'planner'
11
+ )
12
+ AND tag_triggers = 'plan'
13
+ `);
14
+ }
15
+ async down(queryRunner) {
16
+ await queryRunner.query(`
17
+ UPDATE agents
18
+ SET tag_triggers = 'plan'
19
+ WHERE actor_id IN (
20
+ SELECT id FROM actors WHERE slug = 'planner'
21
+ )
22
+ AND tag_triggers = ''
23
+ `);
24
+ }
25
+ }
26
+ exports.RemovePlannerPlanTagTrigger1742800000000 = RemovePlannerPlanTagTrigger1742800000000;
27
+ //# sourceMappingURL=1742800000000-RemovePlannerPlanTagTrigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1742800000000-RemovePlannerPlanTagTrigger.js","sourceRoot":"","sources":["../../src/migrations/1742800000000-RemovePlannerPlanTagTrigger.ts"],"names":[],"mappings":";;;AAEA,MAAa,wCAAwC;IAC5C,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;KAOvB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;KAOvB,CAAC,CAAC;IACL,CAAC;CACF;AAtBD,4FAsBC"}