@xn-intenton-z2a/agentic-lib 7.4.57 → 7.4.58
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.
|
@@ -376,6 +376,10 @@ jobs:
|
|
|
376
376
|
git config user.name "${TOKEN_USER}"
|
|
377
377
|
git config user.email "${TOKEN_ID}+${TOKEN_USER}@users.noreply.github.com"
|
|
378
378
|
git add -A
|
|
379
|
+
# Unstage log/screenshot/state files — these live on the agentic-lib-logs branch
|
|
380
|
+
git reset HEAD -- 'intentïon.md' 'SCREENSHOT_INDEX.png' 2>/dev/null || true
|
|
381
|
+
git reset HEAD -- agent-log-*.md 2>/dev/null || true
|
|
382
|
+
git reset HEAD -- agentic-lib-state.toml 2>/dev/null || true
|
|
379
383
|
git diff --cached --quiet && echo "No changes" && exit 0
|
|
380
384
|
VERSION=$(npx @xn-intenton-z2a/agentic-lib version 2>/dev/null || echo "latest")
|
|
381
385
|
# Problem 1 fix: Don't use [skip ci] when workflow files changed.
|
|
@@ -123,6 +123,10 @@ jobs:
|
|
|
123
123
|
git config user.name "${TOKEN_USER}"
|
|
124
124
|
git config user.email "${TOKEN_ID}+${TOKEN_USER}@users.noreply.github.com"
|
|
125
125
|
git add -A
|
|
126
|
+
# Unstage log/screenshot/state files — these live on the agentic-lib-logs branch
|
|
127
|
+
git reset HEAD -- 'intentïon.md' 'SCREENSHOT_INDEX.png' 2>/dev/null || true
|
|
128
|
+
git reset HEAD -- agent-log-*.md 2>/dev/null || true
|
|
129
|
+
git reset HEAD -- agentic-lib-state.toml 2>/dev/null || true
|
|
126
130
|
git diff --cached --quiet && echo "No changes" && exit 0
|
|
127
131
|
VERSION=$(npx @xn-intenton-z2a/agentic-lib version 2>/dev/null || echo "latest")
|
|
128
132
|
git commit -m "update agentic-lib@${VERSION} [skip ci]"
|
|
@@ -281,16 +281,20 @@ jobs:
|
|
|
281
281
|
await github.rest.git.deleteRef({ owner, repo, ref: `heads/${pr.head.ref}` });
|
|
282
282
|
} catch (e) { core.info(`Could not delete branch: ${e.message}`); }
|
|
283
283
|
|
|
284
|
-
//
|
|
284
|
+
// Close associated issues — extract from PR body (Closes #N) and branch name
|
|
285
|
+
const closesMatches = (pr.body || '').matchAll(/(?:Closes|Fixes|Resolves)\s+#(\d+)/gi);
|
|
286
|
+
const issueNums = new Set([...closesMatches].map(m => parseInt(m[1])));
|
|
285
287
|
const branchPrefix = 'agentic-lib-issue-';
|
|
286
288
|
if (pr.head.ref.startsWith(branchPrefix)) {
|
|
287
|
-
const
|
|
288
|
-
if (
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
289
|
+
const branchIssueNum = parseInt(pr.head.ref.replace(branchPrefix, ''));
|
|
290
|
+
if (branchIssueNum) issueNums.add(branchIssueNum);
|
|
291
|
+
}
|
|
292
|
+
for (const issueNum of issueNums) {
|
|
293
|
+
try {
|
|
294
|
+
await github.rest.issues.update({ owner, repo, issue_number: issueNum, state: 'closed' });
|
|
295
|
+
await github.rest.issues.addLabels({ owner, repo, issue_number: issueNum, labels: ['merged'] });
|
|
296
|
+
await github.rest.issues.removeLabel({ owner, repo, issue_number: issueNum, name: 'in-progress' });
|
|
297
|
+
} catch (e) { /* label may not exist */ }
|
|
294
298
|
}
|
|
295
299
|
mergedPRs.push(pr.number);
|
|
296
300
|
} catch (e) {
|
|
@@ -1242,6 +1246,10 @@ jobs:
|
|
|
1242
1246
|
npm install 2>/dev/null || true
|
|
1243
1247
|
|
|
1244
1248
|
git add -A
|
|
1249
|
+
# Unstage log/screenshot/state files — these live on the agentic-lib-logs branch
|
|
1250
|
+
git reset HEAD -- 'intentïon.md' 'SCREENSHOT_INDEX.png' 2>/dev/null || true
|
|
1251
|
+
git reset HEAD -- agent-log-*.md 2>/dev/null || true
|
|
1252
|
+
git reset HEAD -- agentic-lib-state.toml 2>/dev/null || true
|
|
1245
1253
|
if ! git diff --cached --quiet; then
|
|
1246
1254
|
git commit -m "fix-stuck: sync with main (resolve conflicts)"
|
|
1247
1255
|
git push --force-with-lease origin HEAD:"$BRANCH" 2>&1 && RESOLVED=true
|
|
@@ -1360,16 +1368,20 @@ jobs:
|
|
|
1360
1368
|
try {
|
|
1361
1369
|
await github.rest.git.deleteRef({ owner, repo, ref: `heads/${pr.head.ref}` });
|
|
1362
1370
|
} catch (e) { /* branch may already be deleted */ }
|
|
1363
|
-
//
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1371
|
+
// Close associated issues — extract from PR body (Closes #N) and branch name
|
|
1372
|
+
const closesMatches2 = (pr.body || '').matchAll(/(?:Closes|Fixes|Resolves)\s+#(\d+)/gi);
|
|
1373
|
+
const issueNums2 = new Set([...closesMatches2].map(m => parseInt(m[1])));
|
|
1374
|
+
const branchPrefix2 = 'agentic-lib-issue-';
|
|
1375
|
+
if (pr.head.ref.startsWith(branchPrefix2)) {
|
|
1376
|
+
const branchIssueNum = parseInt(pr.head.ref.replace(branchPrefix2, ''));
|
|
1377
|
+
if (branchIssueNum) issueNums2.add(branchIssueNum);
|
|
1378
|
+
}
|
|
1379
|
+
for (const issueNum of issueNums2) {
|
|
1380
|
+
try {
|
|
1381
|
+
await github.rest.issues.update({ owner, repo, issue_number: issueNum, state: 'closed' });
|
|
1382
|
+
await github.rest.issues.addLabels({ owner, repo, issue_number: issueNum, labels: ['merged'] });
|
|
1383
|
+
await github.rest.issues.removeLabel({ owner, repo, issue_number: issueNum, name: 'in-progress' });
|
|
1384
|
+
} catch (e) { /* label may not exist */ }
|
|
1373
1385
|
}
|
|
1374
1386
|
return;
|
|
1375
1387
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -20,12 +20,17 @@ const REPORT_DATA_DIR = "/tmp/report-data";
|
|
|
20
20
|
async function findLatestInitRun(octokit, owner, repo) {
|
|
21
21
|
try {
|
|
22
22
|
const { data } = await octokit.rest.actions.listWorkflowRunsForRepo({
|
|
23
|
-
owner, repo, per_page:
|
|
23
|
+
owner, repo, per_page: 50,
|
|
24
24
|
});
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
// Look for standalone init runs or flow runs (init may be embedded in flow)
|
|
26
|
+
const relevantRuns = data.workflow_runs
|
|
27
|
+
.filter(r => r.name && (r.name.includes("agentic-lib-init") || r.name.includes("agentic-lib-flow")))
|
|
27
28
|
.sort((a, b) => new Date(b.created_at) - new Date(a.created_at));
|
|
28
|
-
|
|
29
|
+
// Prefer the most recent init run; fall back to the most recent flow run
|
|
30
|
+
const initRun = relevantRuns.find(r => r.name.includes("agentic-lib-init"));
|
|
31
|
+
const flowRun = relevantRuns.find(r => r.name.includes("agentic-lib-flow"));
|
|
32
|
+
const bestRun = initRun || flowRun;
|
|
33
|
+
if (bestRun) return bestRun.created_at;
|
|
29
34
|
} catch (err) {
|
|
30
35
|
core.warning(`Could not find init runs: ${err.message}`);
|
|
31
36
|
}
|