@xn-intenton-z2a/agentic-lib 7.4.3 → 7.4.5

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.
@@ -126,17 +126,20 @@ permissions: write-all
126
126
 
127
127
  jobs:
128
128
  # Step 1: Update agentic-lib and infrastructure (commits to main)
129
+ # Skip tests when purge/reseed will replace all user code anyway
129
130
  update:
130
131
  uses: ./.github/workflows/agentic-lib-update.yml
131
132
  with:
132
133
  ref: ${{ inputs.ref }}
133
134
  dry-run: ${{ inputs.dry-run || 'false' }}
135
+ skip-tests: ${{ inputs.mode == 'reseed' || inputs.mode == 'purge' }}
134
136
  secrets: inherit
135
137
 
136
138
  # Step 2: Reseed/purge and configure (only if mode != update)
139
+ # Use !cancelled() so purge runs even if update's npm test failed
137
140
  init:
138
141
  needs: update
139
- if: inputs.mode == 'reseed' || inputs.mode == 'purge'
142
+ if: "!cancelled() && (inputs.mode == 'reseed' || inputs.mode == 'purge')"
140
143
  runs-on: ubuntu-latest
141
144
  env:
142
145
  INIT_MODE: ${{ inputs.mode }}
@@ -307,7 +310,8 @@ jobs:
307
310
  VERSION=$(npx @xn-intenton-z2a/agentic-lib version 2>/dev/null || echo "latest")
308
311
  git commit -m "init ${INIT_MODE} (agentic-lib@${VERSION}) [skip ci]"
309
312
  for attempt in 1 2 3; do
310
- git push origin main && break
313
+ # Use HEAD:refs/heads/main to handle detached HEAD state
314
+ git push origin HEAD:refs/heads/main && break
311
315
  echo "Push failed (attempt $attempt) — pulling and retrying"
312
316
  git pull --rebase origin main || {
313
317
  echo "Rebase conflict — aborting rebase and retrying"
@@ -237,7 +237,8 @@ jobs:
237
237
  git commit -m "schedule: set to ${FREQUENCY}, model ${MODEL:-gpt-5-mini}"
238
238
  fi
239
239
  for attempt in 1 2 3; do
240
- git push origin main && break
240
+ # Use HEAD:refs/heads/main to handle detached HEAD state
241
+ git push origin HEAD:refs/heads/main && break
241
242
  echo "Push failed (attempt $attempt) — pulling and retrying"
242
243
  git pull --rebase origin main || {
243
244
  echo "Rebase conflict — aborting rebase and retrying"
@@ -22,6 +22,10 @@ on:
22
22
  type: string
23
23
  required: false
24
24
  default: "false"
25
+ skip-tests:
26
+ type: string
27
+ required: false
28
+ default: "false"
25
29
  #@dist schedule:
26
30
  #@dist - cron: "15 6 * * *"
27
31
  workflow_dispatch:
@@ -76,7 +80,9 @@ jobs:
76
80
  if: hashFiles('src/actions/agentic-step/package.json') != ''
77
81
  run: cd src/actions/agentic-step && npm ci
78
82
 
79
- - run: npm test
83
+ - name: Run tests
84
+ if: inputs.skip-tests != 'true'
85
+ run: npm test
80
86
 
81
87
  - name: Commit and push to main [skip ci]
82
88
  if: github.repository != 'xn-intenton-z2a/agentic-lib' && inputs.dry-run != 'true' && inputs.dry-run != true
@@ -92,7 +98,8 @@ jobs:
92
98
  VERSION=$(npx @xn-intenton-z2a/agentic-lib version 2>/dev/null || echo "latest")
93
99
  git commit -m "update agentic-lib@${VERSION} [skip ci]"
94
100
  for attempt in 1 2 3; do
95
- git push origin main && break
101
+ # Use HEAD:refs/heads/main to handle detached HEAD state
102
+ git push origin HEAD:refs/heads/main && break
96
103
  echo "Push failed (attempt $attempt) — pulling and retrying"
97
104
  git pull --rebase origin main || {
98
105
  echo "Rebase conflict — aborting rebase and retrying"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xn-intenton-z2a/agentic-lib",
3
- "version": "7.4.3",
3
+ "version": "7.4.5",
4
4
  "description": "Agentic-lib Agentic Coding Systems SDK powering automated GitHub workflows.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -57,7 +57,10 @@ runs:
57
57
  continue
58
58
  }
59
59
  fi
60
- git push origin "$REF" && { REMOTE_REF_EXISTS="true"; PUSH_SUCCESS="true"; break; }
60
+ # Use HEAD:refs/heads/$REF to handle detached HEAD state
61
+ # (actions/checkout with a SHA puts us in detached HEAD, so
62
+ # "git push origin main" fails with "src refspec main does not match any")
63
+ git push origin "HEAD:refs/heads/$REF" && { REMOTE_REF_EXISTS="true"; PUSH_SUCCESS="true"; break; }
61
64
  else
62
65
  git pull --rebase || {
63
66
  echo "Rebase conflict on attempt $attempt — aborting rebase and retrying"
@@ -17,7 +17,7 @@
17
17
  "author": "",
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
- "@xn-intenton-z2a/agentic-lib": "^7.4.3"
20
+ "@xn-intenton-z2a/agentic-lib": "^7.4.5"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@playwright/test": "^1.58.0",