tycono 0.1.19 → 0.1.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tycono",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "description": "Build an AI company. Watch them work.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -144,6 +144,7 @@ export function createHttpServer(): http.Server {
144
144
 
145
145
  server.timeout = 0;
146
146
  server.requestTimeout = 0;
147
+ server.headersTimeout = 0;
147
148
 
148
149
  return server;
149
150
  }
@@ -1,5 +1,6 @@
1
1
  import { Router, Request, Response, NextFunction } from 'express';
2
- import { readFile } from '../services/file-reader.js';
2
+ import YAML from 'yaml';
3
+ import { readFile, fileExists } from '../services/file-reader.js';
3
4
  import { parseMarkdownTable, extractBoldKeyValues } from '../services/markdown-parser.js';
4
5
 
5
6
  export const companyRouter = Router();
@@ -19,13 +20,27 @@ companyRouter.get('/', (_req: Request, res: Response, next: NextFunction) => {
19
20
  const roleRows = parseMarkdownTable(rolesContent);
20
21
  const roles = roleRows
21
22
  .filter(row => (row.id ?? '').toLowerCase() !== 'ceo')
22
- .map(row => ({
23
- id: row.id ?? '',
24
- name: row.role ?? row.name ?? '',
25
- level: row.level ?? '',
26
- reportsTo: row.reports_to ?? '',
27
- status: row.상태 ?? row.status ?? '',
28
- }));
23
+ .map(row => {
24
+ const id = row.id ?? '';
25
+ let name = row.role ?? row.name ?? '';
26
+
27
+ // role.yaml의 name이 있으면 우선 사용 (커스텀 이름 반영)
28
+ const yamlPath = `roles/${id}/role.yaml`;
29
+ if (id && fileExists(yamlPath)) {
30
+ try {
31
+ const raw = YAML.parse(readFile(yamlPath)) as Record<string, unknown>;
32
+ if (raw.name) name = raw.name as string;
33
+ } catch { /* fallback to roles.md name */ }
34
+ }
35
+
36
+ return {
37
+ id,
38
+ name,
39
+ level: row.level ?? '',
40
+ reportsTo: row.reports_to ?? '',
41
+ status: row.상태 ?? row.status ?? '',
42
+ };
43
+ });
29
44
 
30
45
  const company = {
31
46
  name: companyContent.split('\n').find(l => l.startsWith('# '))?.replace(/^#\s+/, '') ?? '',