@xn-intenton-z2a/agentic-lib 7.2.19 → 7.2.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.
@@ -28,6 +28,10 @@ on:
28
28
  #@dist - edited
29
29
  workflow_call:
30
30
  inputs:
31
+ ref:
32
+ type: string
33
+ required: false
34
+ default: ""
31
35
  discussion-url:
32
36
  type: string
33
37
  required: false
@@ -83,6 +87,7 @@ jobs:
83
87
  steps:
84
88
  - uses: actions/checkout@v6
85
89
  with:
90
+ ref: ${{ inputs.ref || github.sha }}
86
91
  sparse-checkout: ${{ env.configPath }}
87
92
  sparse-checkout-cone-mode: false
88
93
  - name: Normalise params
@@ -111,6 +116,7 @@ jobs:
111
116
  - uses: actions/checkout@v6
112
117
  with:
113
118
  fetch-depth: 0
119
+ ref: ${{ inputs.ref || github.sha }}
114
120
 
115
121
  - uses: actions/setup-node@v6
116
122
  with:
@@ -12,6 +12,10 @@ run-name: "agentic-lib-init ${{ inputs.mode || 'update' }} [${{ github.ref_name
12
12
  on:
13
13
  workflow_call:
14
14
  inputs:
15
+ ref:
16
+ type: string
17
+ required: false
18
+ default: ""
15
19
  mode:
16
20
  type: string
17
21
  required: false
@@ -121,6 +125,7 @@ jobs:
121
125
  update:
122
126
  uses: ./.github/workflows/agentic-lib-update.yml
123
127
  with:
128
+ ref: ${{ inputs.ref }}
124
129
  dry-run: ${{ inputs.dry-run || 'false' }}
125
130
  secrets: inherit
126
131
 
@@ -136,10 +141,12 @@ jobs:
136
141
  steps:
137
142
  - uses: actions/checkout@v6
138
143
  if: inputs.dry-run == 'true' || inputs.dry-run == true
144
+ with:
145
+ ref: ${{ inputs.ref || github.sha }}
139
146
  - uses: actions/checkout@v6
140
147
  if: inputs.dry-run != 'true' && inputs.dry-run != true
141
148
  with:
142
- ref: main
149
+ ref: ${{ inputs.ref || 'main' }}
143
150
  token: ${{ secrets.WORKFLOW_TOKEN }}
144
151
 
145
152
  - uses: actions/setup-node@v6
@@ -13,6 +13,10 @@ run-name: "agentic-lib-schedule -> ${{ inputs.frequency }} (${{ inputs.model }}$
13
13
  on:
14
14
  workflow_call:
15
15
  inputs:
16
+ ref:
17
+ type: string
18
+ required: false
19
+ default: ""
16
20
  frequency:
17
21
  description: "How often the workflow should run"
18
22
  required: true
@@ -80,10 +84,12 @@ jobs:
80
84
  steps:
81
85
  - uses: actions/checkout@v6
82
86
  if: inputs.dry-run == 'true' || inputs.dry-run == true
87
+ with:
88
+ ref: ${{ inputs.ref || github.sha }}
83
89
  - uses: actions/checkout@v6
84
90
  if: inputs.dry-run != 'true' && inputs.dry-run != true
85
91
  with:
86
- ref: main
92
+ ref: ${{ inputs.ref || 'main' }}
87
93
  token: ${{ secrets.WORKFLOW_TOKEN }}
88
94
 
89
95
  - name: Update workflow schedule and model
@@ -40,6 +40,10 @@ on:
40
40
  type: string
41
41
  required: false
42
42
  default: "false"
43
+ ref:
44
+ type: string
45
+ required: false
46
+ default: ""
43
47
  workflow_dispatch:
44
48
  inputs:
45
49
  push-screenshot:
@@ -58,6 +62,8 @@ jobs:
58
62
  runs-on: ubuntu-latest
59
63
  steps:
60
64
  - uses: actions/checkout@v6
65
+ with:
66
+ ref: ${{ inputs.ref || github.sha }}
61
67
 
62
68
  - uses: actions/setup-node@v6
63
69
  with:
@@ -89,6 +95,8 @@ jobs:
89
95
  tests-failed: ${{ steps.result.outputs.tests-failed }}
90
96
  steps:
91
97
  - uses: actions/checkout@v6
98
+ with:
99
+ ref: ${{ inputs.ref || github.sha }}
92
100
 
93
101
  - name: Install dependencies
94
102
  run: npm ci
@@ -182,6 +190,8 @@ jobs:
182
190
  runs-on: ubuntu-latest
183
191
  steps:
184
192
  - uses: actions/checkout@v6
193
+ with:
194
+ ref: ${{ inputs.ref || github.sha }}
185
195
 
186
196
  - name: Install dependencies (non-blocking)
187
197
  id: install-deps
@@ -291,6 +301,8 @@ jobs:
291
301
  container: mcr.microsoft.com/playwright:v1.58.2-noble
292
302
  steps:
293
303
  - uses: actions/checkout@v6
304
+ with:
305
+ ref: ${{ inputs.ref || github.sha }}
294
306
 
295
307
  - name: Install dependencies (non-blocking)
296
308
  id: install-deps
@@ -14,6 +14,10 @@ run-name: "agentic-lib-update [${{ github.ref_name }}]"
14
14
  on:
15
15
  workflow_call:
16
16
  inputs:
17
+ ref:
18
+ type: string
19
+ required: false
20
+ default: ""
17
21
  dry-run:
18
22
  type: string
19
23
  required: false
@@ -36,10 +40,12 @@ jobs:
36
40
  steps:
37
41
  - uses: actions/checkout@v6
38
42
  if: inputs.dry-run == 'true' || inputs.dry-run == true
43
+ with:
44
+ ref: ${{ inputs.ref || github.sha }}
39
45
  - uses: actions/checkout@v6
40
46
  if: inputs.dry-run != 'true' && inputs.dry-run != true
41
47
  with:
42
- ref: main
48
+ ref: ${{ inputs.ref || 'main' }}
43
49
  token: ${{ secrets.WORKFLOW_TOKEN }}
44
50
 
45
51
  - uses: actions/setup-node@v6
@@ -20,6 +20,10 @@ on:
20
20
  #@dist - cron: "0 6 * * 1"
21
21
  workflow_call:
22
22
  inputs:
23
+ ref:
24
+ type: string
25
+ required: false
26
+ default: ""
23
27
  model:
24
28
  type: string
25
29
  required: false
@@ -135,6 +139,7 @@ jobs:
135
139
  steps:
136
140
  - uses: actions/checkout@v6
137
141
  with:
142
+ ref: ${{ inputs.ref || github.sha }}
138
143
  sparse-checkout: ${{ env.configPath }}
139
144
  sparse-checkout-cone-mode: false
140
145
  - name: Normalise params
@@ -256,14 +261,59 @@ jobs:
256
261
  merged-prs: ${{ steps.cleanup.outputs.merged-prs }}
257
262
  closed-prs: ${{ steps.cleanup.outputs.closed-prs }}
258
263
 
259
- # ─── Telemetry: gather repo state for supervisor ───────────────────
260
- telemetry:
264
+ # ─── Behaviour Telemetry: run Playwright tests in container ────────
265
+ behaviour-telemetry:
261
266
  needs: params
262
267
  if: |
263
268
  needs.params.outputs.mode == 'full' || needs.params.outputs.mode == 'dev-only' || needs.params.outputs.mode == 'review-only'
264
269
  runs-on: ubuntu-latest
270
+ container: mcr.microsoft.com/playwright:v1.58.2-noble
271
+ steps:
272
+ - uses: actions/checkout@v6
273
+ with:
274
+ ref: ${{ inputs.ref || github.sha }}
275
+
276
+ - uses: actions/setup-node@v6
277
+ with:
278
+ node-version: 24
279
+
280
+ - name: Install dependencies (non-blocking)
281
+ run: npm ci 2>/dev/null || npm install 2>/dev/null || true
282
+
283
+ - name: Build web assets (non-blocking)
284
+ run: npm run build:web 2>/dev/null || true
285
+
286
+ - name: Run behaviour tests (non-blocking)
287
+ id: behaviour-tests
288
+ if: hashFiles('playwright.config.js') != '' || hashFiles('playwright.config.ts') != ''
289
+ run: |
290
+ set +e
291
+ OUTPUT=$(npm run --if-present test:behaviour 2>&1)
292
+ EXIT_CODE=$?
293
+ echo "exit-code=$EXIT_CODE" | tee -a $GITHUB_OUTPUT
294
+ PASS_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ passed' | head -1 | grep -oP '\d+' || echo "0")
295
+ FAIL_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ failed' | head -1 | grep -oP '\d+' || echo "0")
296
+ echo "pass-count=$PASS_COUNT" | tee -a $GITHUB_OUTPUT
297
+ echo "fail-count=$FAIL_COUNT" | tee -a $GITHUB_OUTPUT
298
+ echo "$OUTPUT"
299
+ exit 0
300
+
301
+ outputs:
302
+ exit-code: ${{ steps.behaviour-tests.outputs.exit-code || '-1' }}
303
+ pass-count: ${{ steps.behaviour-tests.outputs.pass-count || '0' }}
304
+ fail-count: ${{ steps.behaviour-tests.outputs.fail-count || '0' }}
305
+
306
+ # ─── Telemetry: gather repo state for supervisor ───────────────────
307
+ telemetry:
308
+ needs: [params, behaviour-telemetry]
309
+ if: |
310
+ !cancelled() &&
311
+ (needs.params.outputs.mode == 'full' || needs.params.outputs.mode == 'dev-only' || needs.params.outputs.mode == 'review-only')
312
+ runs-on: ubuntu-latest
265
313
  steps:
266
314
  - uses: actions/checkout@v6
315
+ with:
316
+ ref: ${{ inputs.ref || github.sha }}
267
317
 
268
318
  - uses: actions/setup-node@v6
269
319
  with:
@@ -304,24 +354,6 @@ jobs:
304
354
  echo "$OUTPUT"
305
355
  exit 0
306
356
 
307
- - name: Run behaviour tests (non-blocking)
308
- id: behaviour-tests
309
- if: hashFiles('playwright.config.js') != '' || hashFiles('playwright.config.ts') != ''
310
- run: |
311
- set +e
312
- npx playwright install --with-deps chromium 2>/dev/null || true
313
- npm run build:web 2>/dev/null || true
314
- OUTPUT=$(npm run --if-present test:behaviour 2>&1)
315
- EXIT_CODE=$?
316
- echo "exit-code=$EXIT_CODE" | tee -a $GITHUB_OUTPUT
317
- PASS_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ passed' | head -1 | grep -oP '\d+' || echo "0")
318
- FAIL_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ failed' | head -1 | grep -oP '\d+' || echo "0")
319
- echo "pass-count=$PASS_COUNT" | tee -a $GITHUB_OUTPUT
320
- echo "fail-count=$FAIL_COUNT" | tee -a $GITHUB_OUTPUT
321
- echo "$OUTPUT" > /tmp/behaviour-test-output.txt
322
- echo "$OUTPUT"
323
- exit 0
324
-
325
357
  - name: Gather telemetry
326
358
  id: gather
327
359
  uses: actions/github-script@v8
@@ -462,10 +494,6 @@ jobs:
462
494
  const unitOutput = fs.existsSync('/tmp/unit-test-output.txt')
463
495
  ? fs.readFileSync('/tmp/unit-test-output.txt', 'utf8')
464
496
  : '';
465
- const behaviourOutput = fs.existsSync('/tmp/behaviour-test-output.txt')
466
- ? fs.readFileSync('/tmp/behaviour-test-output.txt', 'utf8')
467
- : '';
468
-
469
497
  const telemetry = {
470
498
  issues: issuesSummary,
471
499
  instabilityIssues: instabilityNumbers,
@@ -487,10 +515,9 @@ jobs:
487
515
  output: unitOutput,
488
516
  },
489
517
  behaviour: {
490
- exitCode: parseInt('${{ steps.behaviour-tests.outputs.exit-code }}' || '-1'),
491
- passCount: parseInt('${{ steps.behaviour-tests.outputs.pass-count }}' || '0'),
492
- failCount: parseInt('${{ steps.behaviour-tests.outputs.fail-count }}' || '0'),
493
- output: behaviourOutput,
518
+ exitCode: parseInt('${{ needs.behaviour-telemetry.outputs.exit-code }}' || '-1'),
519
+ passCount: parseInt('${{ needs.behaviour-telemetry.outputs.pass-count }}' || '0'),
520
+ failCount: parseInt('${{ needs.behaviour-telemetry.outputs.fail-count }}' || '0'),
494
521
  },
495
522
  },
496
523
  externalTestResults,
@@ -535,10 +562,13 @@ jobs:
535
562
  needs.params.result == 'success' &&
536
563
  inputs.skipMaintain != 'true' && inputs.skipMaintain != true
537
564
  runs-on: ubuntu-latest
565
+ outputs:
566
+ commit-sha: ${{ steps.get-sha.outputs.sha }}
538
567
  steps:
539
568
  - uses: actions/checkout@v6
540
569
  with:
541
570
  fetch-depth: 0
571
+ ref: ${{ inputs.ref || github.sha }}
542
572
 
543
573
  - name: Fetch log from agentic-lib-logs branch
544
574
  run: |
@@ -642,6 +672,10 @@ jobs:
642
672
  commit-message: "agentic-step: maintain features and library"
643
673
  push-ref: ${{ github.ref_name }}
644
674
 
675
+ - name: Capture commit SHA
676
+ id: get-sha
677
+ run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
678
+
645
679
  - name: Push log to agentic-lib-logs branch
646
680
  if: github.repository != 'xn-intenton-z2a/agentic-lib' && needs.params.outputs.dry-run != 'true'
647
681
  run: bash .github/agentic-lib/scripts/push-to-logs.sh "intentïon.md" "intention.md"
@@ -661,6 +695,7 @@ jobs:
661
695
  - uses: actions/checkout@v6
662
696
  with:
663
697
  fetch-depth: 0
698
+ ref: ${{ needs.maintain.outputs.commit-sha || github.sha }}
664
699
 
665
700
  - name: Fetch log from agentic-lib-logs branch
666
701
  run: |
@@ -711,6 +746,7 @@ jobs:
711
746
  - uses: actions/checkout@v6
712
747
  with:
713
748
  fetch-depth: 0
749
+ ref: ${{ needs.maintain.outputs.commit-sha || github.sha }}
714
750
 
715
751
  - name: Fetch log from agentic-lib-logs branch
716
752
  run: |
@@ -749,7 +785,7 @@ jobs:
749
785
 
750
786
  # ─── Fix stuck PRs with failing checks ─────────────────────────────
751
787
  fix-stuck:
752
- needs: [params, supervisor]
788
+ needs: [params, maintain, supervisor]
753
789
  if: |
754
790
  !cancelled() &&
755
791
  needs.params.outputs.mode == 'full' &&
@@ -759,6 +795,7 @@ jobs:
759
795
  - uses: actions/checkout@v6
760
796
  with:
761
797
  fetch-depth: 0
798
+ ref: ${{ needs.maintain.outputs.commit-sha || github.sha }}
762
799
 
763
800
  - uses: actions/setup-node@v6
764
801
  with:
@@ -767,13 +804,13 @@ jobs:
767
804
  - name: Install project dependencies
768
805
  run: npm ci
769
806
 
770
- - name: Install Playwright (for behaviour tests)
771
- if: hashFiles('playwright.config.js') != '' || hashFiles('playwright.config.ts') != ''
772
- run: npx playwright install --with-deps chromium
773
-
774
- - name: Self-init (agentic-lib dev only)
775
- if: hashFiles('scripts/self-init.sh') != '' && hashFiles('.github/agentic-lib/actions/agentic-step/package.json') == ''
776
- run: bash scripts/self-init.sh
807
+ # - name: Install Playwright (for behaviour tests)
808
+ # if: hashFiles('playwright.config.js') != '' || hashFiles('playwright.config.ts') != ''
809
+ # run: npx playwright install --with-deps chromium
810
+ #
811
+ # - name: Self-init (agentic-lib dev only)
812
+ # if: hashFiles('scripts/self-init.sh') != '' && hashFiles('.github/agentic-lib/actions/agentic-step/package.json') == ''
813
+ # run: bash scripts/self-init.sh
777
814
 
778
815
  - name: Install agentic-step dependencies
779
816
  working-directory: .github/agentic-lib/actions/agentic-step
@@ -1070,7 +1107,7 @@ jobs:
1070
1107
 
1071
1108
  # ─── Review: close resolved issues, enhance with criteria ──────────
1072
1109
  review-features:
1073
- needs: [params, supervisor]
1110
+ needs: [params, maintain, supervisor]
1074
1111
  if: |
1075
1112
  !cancelled() &&
1076
1113
  (needs.params.outputs.mode == 'full' || needs.params.outputs.mode == 'review-only') &&
@@ -1078,6 +1115,8 @@ jobs:
1078
1115
  runs-on: ubuntu-latest
1079
1116
  steps:
1080
1117
  - uses: actions/checkout@v6
1118
+ with:
1119
+ ref: ${{ needs.maintain.outputs.commit-sha || github.sha }}
1081
1120
 
1082
1121
  - uses: actions/setup-node@v6
1083
1122
  with:
@@ -1115,7 +1154,7 @@ jobs:
1115
1154
 
1116
1155
  # ─── Dev: sequential issue resolution ──────────────────────────────
1117
1156
  dev:
1118
- needs: [params, review-features]
1157
+ needs: [params, maintain, review-features]
1119
1158
  if: |
1120
1159
  !cancelled() &&
1121
1160
  (needs.params.outputs.mode == 'full' || needs.params.outputs.mode == 'dev-only') &&
@@ -1126,6 +1165,7 @@ jobs:
1126
1165
  with:
1127
1166
  fetch-depth: 0
1128
1167
  token: ${{ secrets.GITHUB_TOKEN }}
1168
+ ref: ${{ needs.maintain.outputs.commit-sha || github.sha }}
1129
1169
 
1130
1170
  - name: Fetch log from agentic-lib-logs branch
1131
1171
  run: |
@@ -1262,29 +1302,29 @@ jobs:
1262
1302
  echo "tests-passed=true" >> $GITHUB_OUTPUT
1263
1303
  echo "All tests passed"
1264
1304
 
1265
- - name: Run behaviour tests before committing
1266
- id: pre-commit-behaviour-test
1267
- if: steps.issue.outputs.issue-number != '' && steps.pre-commit-test.outputs.tests-passed == 'true' && (hashFiles('playwright.config.js') != '' || hashFiles('playwright.config.ts') != '')
1268
- run: |
1269
- npx playwright install --with-deps chromium 2>/dev/null || true
1270
- npm run build:web 2>/dev/null || true
1271
- set +e
1272
- npm run --if-present test:behaviour 2>&1 | tail -30
1273
- EXIT_CODE=$?
1274
- if [ $EXIT_CODE -ne 0 ]; then
1275
- echo "::warning::Behaviour test attempt 1 failed — retrying"
1276
- sleep 2
1277
- npm run --if-present test:behaviour 2>&1 | tail -30
1278
- EXIT_CODE=$?
1279
- fi
1280
- set -e
1281
- if [ $EXIT_CODE -ne 0 ]; then
1282
- echo "tests-passed=false" >> $GITHUB_OUTPUT
1283
- echo "WARNING: Behaviour tests failed (exit $EXIT_CODE) — skipping commit and PR"
1284
- exit 0
1285
- fi
1286
- echo "tests-passed=true" >> $GITHUB_OUTPUT
1287
- echo "Behaviour tests passed"
1305
+ # - name: Run behaviour tests before committing
1306
+ # id: pre-commit-behaviour-test
1307
+ # if: steps.issue.outputs.issue-number != '' && steps.pre-commit-test.outputs.tests-passed == 'true' && (hashFiles('playwright.config.js') != '' || hashFiles('playwright.config.ts') != '')
1308
+ # run: |
1309
+ # npx playwright install --with-deps chromium 2>/dev/null || true
1310
+ # npm run build:web 2>/dev/null || true
1311
+ # set +e
1312
+ # npm run --if-present test:behaviour 2>&1 | tail -30
1313
+ # EXIT_CODE=$?
1314
+ # if [ $EXIT_CODE -ne 0 ]; then
1315
+ # echo "::warning::Behaviour test attempt 1 failed — retrying"
1316
+ # sleep 2
1317
+ # npm run --if-present test:behaviour 2>&1 | tail -30
1318
+ # EXIT_CODE=$?
1319
+ # fi
1320
+ # set -e
1321
+ # if [ $EXIT_CODE -ne 0 ]; then
1322
+ # echo "tests-passed=false" >> $GITHUB_OUTPUT
1323
+ # echo "WARNING: Behaviour tests failed (exit $EXIT_CODE) — skipping commit and PR"
1324
+ # exit 0
1325
+ # fi
1326
+ # echo "tests-passed=true" >> $GITHUB_OUTPUT
1327
+ # echo "Behaviour tests passed"
1288
1328
 
1289
1329
  - name: Commit and push
1290
1330
  if: github.repository != 'xn-intenton-z2a/agentic-lib' && steps.issue.outputs.issue-number != '' && needs.params.outputs.dry-run != 'true' && steps.pre-commit-test.outputs.tests-passed == 'true' && steps.pre-commit-behaviour-test.outputs.tests-passed != 'false'
@@ -1387,13 +1427,14 @@ jobs:
1387
1427
 
1388
1428
  # ─── Post-merge: stats, schedule, mission check ────────────────────
1389
1429
  post-merge:
1390
- needs: [params, dev, pr-cleanup]
1430
+ needs: [params, maintain, dev, pr-cleanup]
1391
1431
  if: ${{ !cancelled() && needs.params.result == 'success' }}
1392
1432
  runs-on: ubuntu-latest
1393
1433
  steps:
1394
1434
  - uses: actions/checkout@v6
1395
1435
  with:
1396
1436
  fetch-depth: 0
1437
+ ref: ${{ needs.maintain.outputs.commit-sha || github.sha }}
1397
1438
 
1398
1439
  - name: Summary
1399
1440
  run: |
@@ -1410,20 +1451,23 @@ jobs:
1410
1451
 
1411
1452
  # ─── Post-commit validation: call test workflow to verify branch health ───
1412
1453
  post-commit-test:
1413
- needs: [params, dev, fix-stuck, post-merge]
1454
+ needs: [params, maintain, dev, fix-stuck, post-merge]
1414
1455
  if: >-
1415
1456
  !cancelled()
1416
1457
  && needs.params.outputs.dry-run != 'true'
1417
1458
  && needs.params.result == 'success'
1418
1459
  uses: ./.github/workflows/agentic-lib-test.yml
1460
+ with:
1461
+ ref: ${{ needs.maintain.outputs.commit-sha || github.sha }}
1419
1462
  secrets: inherit
1420
1463
 
1421
1464
  # ─── Schedule change (if requested) ────────────────────────────────
1422
1465
  update-schedule:
1423
- needs: [params, dev]
1466
+ needs: [params, maintain, dev]
1424
1467
  if: ${{ !cancelled() && needs.params.outputs.dry-run != 'true' && needs.params.outputs.schedule != '' && needs.params.result == 'success' }}
1425
1468
  uses: ./.github/workflows/agentic-lib-schedule.yml
1426
1469
  with:
1470
+ ref: ${{ needs.maintain.outputs.commit-sha || github.sha }}
1427
1471
  frequency: ${{ needs.params.outputs.schedule }}
1428
1472
  model: ${{ needs.params.outputs.model }}
1429
1473
  profile: ${{ needs.params.outputs.profile }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xn-intenton-z2a/agentic-lib",
3
- "version": "7.2.19",
3
+ "version": "7.2.21",
4
4
  "description": "Agentic-lib Agentic Coding Systems SDK powering automated GitHub workflows.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -17,7 +17,7 @@
17
17
  "author": "",
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
- "@xn-intenton-z2a/agentic-lib": "^7.2.19"
20
+ "@xn-intenton-z2a/agentic-lib": "^7.2.21"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@playwright/test": "^1.58.0",