@xn-intenton-z2a/agentic-lib 7.2.15 → 7.2.16

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": "@xn-intenton-z2a/agentic-lib",
3
- "version": "7.2.15",
3
+ "version": "7.2.16",
4
4
  "description": "Agentic-lib Agentic Coding Systems SDK powering automated GitHub workflows.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -304,6 +304,45 @@ async function run() {
304
304
  }
305
305
  } catch (_) { /* API not available */ }
306
306
 
307
+ // Count resolved issues (if not already provided by the task)
308
+ if (result.resolvedCount == null) {
309
+ let resolvedCount = 0;
310
+ try {
311
+ const initTimestamp = config.init?.timestamp;
312
+ const { data: closedIssuesRaw } = await context.octokit.rest.issues.listForRepo({
313
+ ...context.repo, state: "closed", labels: "automated", per_page: 10, sort: "updated", direction: "desc",
314
+ });
315
+ const initEpoch = initTimestamp ? new Date(initTimestamp).getTime() : 0;
316
+ const closedFiltered = closedIssuesRaw.filter((i) =>
317
+ !i.pull_request && (initEpoch <= 0 || new Date(i.created_at).getTime() >= initEpoch)
318
+ );
319
+ for (const ci of closedFiltered) {
320
+ let isResolved = false;
321
+ try {
322
+ const { data: comments } = await context.octokit.rest.issues.listComments({
323
+ ...context.repo, issue_number: ci.number, per_page: 5, sort: "created", direction: "desc",
324
+ });
325
+ if (comments.some((c) => c.body?.includes("Automated Review Result"))) {
326
+ isResolved = true;
327
+ } else {
328
+ const { data: events } = await context.octokit.rest.issues.listEvents({
329
+ ...context.repo, issue_number: ci.number, per_page: 10,
330
+ });
331
+ if (events.some((e) => e.event === "closed" && e.commit_id)) {
332
+ isResolved = true;
333
+ }
334
+ }
335
+ if (!isResolved) {
336
+ const issueLabels = ci.labels.map((l) => (typeof l === "string" ? l : l.name));
337
+ if (issueLabels.includes("merged")) isResolved = true;
338
+ }
339
+ } catch { /* ignore */ }
340
+ if (isResolved) resolvedCount++;
341
+ }
342
+ } catch (_) { /* API not available */ }
343
+ result.resolvedCount = resolvedCount;
344
+ }
345
+
307
346
  const budgetCap = config.transformationBudget || 0;
308
347
  const featCap = config.paths?.features?.limit || 4;
309
348
  const libCap = config.paths?.library?.limit || 32;
@@ -17,7 +17,7 @@
17
17
  "author": "",
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
- "@xn-intenton-z2a/agentic-lib": "^7.2.15"
20
+ "@xn-intenton-z2a/agentic-lib": "^7.2.16"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@playwright/test": "^1.58.0",