@xn-intenton-z2a/agentic-lib 7.2.14 → 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/.github/workflows/agentic-lib-init.yml +2 -2
- package/.github/workflows/agentic-lib-schedule.yml +2 -2
- package/package.json +1 -1
- package/src/actions/agentic-step/index.js +39 -0
- package/src/seeds/zero-behaviour.test.js +2 -2
- package/src/seeds/zero-package.json +1 -1
- package/src/seeds/zero-playwright.config.js +1 -1
|
@@ -231,6 +231,8 @@ jobs:
|
|
|
231
231
|
script: |
|
|
232
232
|
const fs = require('fs');
|
|
233
233
|
const frequency = '${{ inputs.schedule }}';
|
|
234
|
+
const workflowPath = '.github/workflows/agentic-lib-workflow.yml';
|
|
235
|
+
const tomlPath = 'agentic-lib.toml';
|
|
234
236
|
let model = '${{ inputs.model }}';
|
|
235
237
|
if (!model && fs.existsSync(tomlPath)) {
|
|
236
238
|
const toml = fs.readFileSync(tomlPath, 'utf8');
|
|
@@ -238,8 +240,6 @@ jobs:
|
|
|
238
240
|
if (m) model = m[1];
|
|
239
241
|
}
|
|
240
242
|
if (!model) model = 'gpt-5-mini';
|
|
241
|
-
const workflowPath = '.github/workflows/agentic-lib-workflow.yml';
|
|
242
|
-
const tomlPath = 'agentic-lib.toml';
|
|
243
243
|
|
|
244
244
|
const SCHEDULE_MAP = {
|
|
245
245
|
off: null,
|
|
@@ -92,6 +92,8 @@ jobs:
|
|
|
92
92
|
script: |
|
|
93
93
|
const fs = require('fs');
|
|
94
94
|
const frequency = '${{ inputs.frequency }}';
|
|
95
|
+
const workflowPath = '.github/workflows/agentic-lib-workflow.yml';
|
|
96
|
+
const tomlPath = 'agentic-lib.toml';
|
|
95
97
|
let model = '${{ inputs.model }}';
|
|
96
98
|
if (!model && fs.existsSync(tomlPath)) {
|
|
97
99
|
const toml = fs.readFileSync(tomlPath, 'utf8');
|
|
@@ -100,8 +102,6 @@ jobs:
|
|
|
100
102
|
}
|
|
101
103
|
if (!model) model = 'gpt-5-mini';
|
|
102
104
|
const profile = '${{ inputs.profile }}';
|
|
103
|
-
const workflowPath = '.github/workflows/agentic-lib-workflow.yml';
|
|
104
|
-
const tomlPath = 'agentic-lib.toml';
|
|
105
105
|
|
|
106
106
|
const isMaintenance = frequency === 'maintenance';
|
|
107
107
|
const effectiveFrequency = isMaintenance ? 'weekly' : frequency;
|
package/package.json
CHANGED
|
@@ -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;
|
|
@@ -4,7 +4,7 @@ import { test, expect } from "@playwright/test";
|
|
|
4
4
|
import { getIdentity } from "../../src/lib/main.js";
|
|
5
5
|
|
|
6
6
|
test("homepage returns 200 and renders", async ({ page }) => {
|
|
7
|
-
const response = await page.goto("
|
|
7
|
+
const response = await page.goto("./", { waitUntil: "networkidle" });
|
|
8
8
|
expect(response.status()).toBe(200);
|
|
9
9
|
|
|
10
10
|
await expect(page.locator("#lib-name")).toBeVisible({ timeout: 10000 });
|
|
@@ -16,7 +16,7 @@ test("homepage returns 200 and renders", async ({ page }) => {
|
|
|
16
16
|
|
|
17
17
|
test("page displays the library version from src/lib/main.js", async ({ page }) => {
|
|
18
18
|
const { version } = getIdentity();
|
|
19
|
-
await page.goto("
|
|
19
|
+
await page.goto("./", { waitUntil: "networkidle" });
|
|
20
20
|
const pageVersion = await page.locator("#lib-version").textContent();
|
|
21
21
|
expect(pageVersion).toContain(version);
|
|
22
22
|
});
|