glab-agent 0.2.7 → 0.2.9

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": "glab-agent",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "type": "module",
5
5
  "description": "Multi-agent GitLab To-Do watcher with YAML-defined agents, skills, and GitLab registry.",
6
6
  "license": "MIT",
@@ -31,8 +31,9 @@ export interface AgentGitlabConfig {
31
31
 
32
32
  export interface AgentNotifications {
33
33
  webhook_url?: string;
34
- feishu_app_id?: string;
35
- feishu_app_secret?: string;
34
+ /** Feishu app credentials — env var names (values read from .env at runtime) */
35
+ feishu_app_id_env?: string;
36
+ feishu_app_secret_env?: string;
36
37
  /** Email domain for mapping GitLab username → Feishu email (e.g. "taou.com" → "{username}@taou.com") */
37
38
  feishu_email_domain?: string;
38
39
  }
@@ -131,8 +132,8 @@ function parseNotifications(raw: unknown): AgentNotifications {
131
132
  const obj = raw as RawValue;
132
133
  return {
133
134
  webhook_url: typeof obj.webhook_url === "string" ? obj.webhook_url : undefined,
134
- feishu_app_id: typeof obj.feishu_app_id === "string" ? obj.feishu_app_id : undefined,
135
- feishu_app_secret: typeof obj.feishu_app_secret === "string" ? obj.feishu_app_secret : undefined,
135
+ feishu_app_id_env: typeof obj.feishu_app_id_env === "string" ? obj.feishu_app_id_env : undefined,
136
+ feishu_app_secret_env: typeof obj.feishu_app_secret_env === "string" ? obj.feishu_app_secret_env : undefined,
136
137
  feishu_email_domain: typeof obj.feishu_email_domain === "string" ? obj.feishu_email_domain : undefined,
137
138
  };
138
139
  }
@@ -194,7 +195,7 @@ export function parseAgentDefinition(raw: unknown, fileName: string): AgentDefin
194
195
  skills: parseSkills(obj.skills),
195
196
  skill_refs: parseSkillRefs(obj.skills),
196
197
  poll_interval_seconds: asNumber(obj.poll_interval_seconds, 60),
197
- concurrency: asNumber(obj.concurrency, 1),
198
+ concurrency: asNumber(obj.concurrency, 3),
198
199
  timeout_seconds: typeof obj.timeout_seconds === "number" && obj.timeout_seconds > 0
199
200
  ? obj.timeout_seconds
200
201
  : undefined,
@@ -178,6 +178,8 @@ function parseTodo(payload: Payload): GitlabTodoItem | undefined {
178
178
  }
179
179
 
180
180
  const target = payload.target as Payload | undefined;
181
+ const note = payload.note as Payload | undefined;
182
+ const author = payload.author as Payload | undefined;
181
183
 
182
184
  return {
183
185
  id,
@@ -189,7 +191,10 @@ function parseTodo(payload: Payload): GitlabTodoItem | undefined {
189
191
  state: typeof payload.state === "string" ? payload.state : "",
190
192
  targetUrl: typeof payload.target_url === "string" ? payload.target_url : undefined,
191
193
  createdAt: typeof payload.created_at === "string" ? payload.created_at : undefined,
192
- labels: parseLabels(target)
194
+ labels: parseLabels(target),
195
+ noteId: parseInteger(note?.id),
196
+ authorId: parseInteger(author?.id),
197
+ authorUsername: typeof author?.username === "string" ? author.username as string : undefined,
193
198
  };
194
199
  }
195
200
 
@@ -1678,8 +1678,8 @@ export function loadConfigFromAgentDefinition(
1678
1678
  agentDefinition: def,
1679
1679
  skillsDir: agentSkillsDir(agentRepoPath),
1680
1680
  webhookUrl: def.notifications?.webhook_url,
1681
- feishuAppId: def.notifications?.feishu_app_id,
1682
- feishuAppSecret: def.notifications?.feishu_app_secret,
1681
+ feishuAppId: def.notifications?.feishu_app_id_env ? env[def.notifications.feishu_app_id_env]?.trim() : undefined,
1682
+ feishuAppSecret: def.notifications?.feishu_app_secret_env ? env[def.notifications.feishu_app_secret_env]?.trim() : undefined,
1683
1683
  feishuEmailDomain: def.notifications?.feishu_email_domain,
1684
1684
  };
1685
1685
  }