@xn-intenton-z2a/agentic-lib 7.2.18 → 7.2.19
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-test.yml +1 -1
- package/.github/workflows/agentic-lib-workflow.yml +16 -16
- package/bin/agentic-lib.js +11 -11
- package/package.json +1 -1
- package/src/actions/commit-if-changed/action.yml +1 -1
- package/src/scripts/push-to-logs.sh +5 -5
- package/src/seeds/zero-.gitignore +1 -1
- package/src/seeds/zero-package.json +1 -1
|
@@ -122,7 +122,7 @@ jobs:
|
|
|
122
122
|
path: SCREENSHOT_INDEX.png
|
|
123
123
|
if-no-files-found: ignore
|
|
124
124
|
|
|
125
|
-
- name: Push screenshot to
|
|
125
|
+
- name: Push screenshot to agentic-lib-logs branch
|
|
126
126
|
if: |
|
|
127
127
|
github.ref == 'refs/heads/main' &&
|
|
128
128
|
github.repository != 'xn-intenton-z2a/agentic-lib' &&
|
|
@@ -428,21 +428,21 @@ jobs:
|
|
|
428
428
|
const missionComplete = fs.existsSync('MISSION_COMPLETE.md');
|
|
429
429
|
const missionFailed = fs.existsSync('MISSION_FAILED.md');
|
|
430
430
|
|
|
431
|
-
// Activity log stats (fetched from
|
|
431
|
+
// Activity log stats (fetched from agentic-lib-logs branch)
|
|
432
432
|
let activityStats = null;
|
|
433
433
|
try {
|
|
434
|
-
// Try
|
|
434
|
+
// Try agentic-lib-logs branch first (new location), fall back to local file (legacy)
|
|
435
435
|
let log = null;
|
|
436
436
|
for (const logFile of ['intenti\u00F6n.md', 'intention.md']) {
|
|
437
437
|
try {
|
|
438
438
|
const { data } = await github.rest.repos.getContent({
|
|
439
|
-
owner, repo, path: logFile, ref: '
|
|
439
|
+
owner, repo, path: logFile, ref: 'agentic-lib-logs',
|
|
440
440
|
});
|
|
441
441
|
log = Buffer.from(data.content, 'base64').toString('utf8');
|
|
442
442
|
break;
|
|
443
443
|
} catch { /* try next */ }
|
|
444
444
|
}
|
|
445
|
-
// Fall back to local file (for repos not yet using
|
|
445
|
+
// Fall back to local file (for repos not yet using agentic-lib-logs branch)
|
|
446
446
|
if (!log) {
|
|
447
447
|
const logPath = fs.existsSync('intenti\u00F6n.md') ? 'intenti\u00F6n.md' : (fs.existsSync('intention.md') ? 'intention.md' : null);
|
|
448
448
|
if (logPath) log = fs.readFileSync(logPath, 'utf8');
|
|
@@ -540,10 +540,10 @@ jobs:
|
|
|
540
540
|
with:
|
|
541
541
|
fetch-depth: 0
|
|
542
542
|
|
|
543
|
-
- name: Fetch log from
|
|
543
|
+
- name: Fetch log from agentic-lib-logs branch
|
|
544
544
|
run: |
|
|
545
545
|
for f in "intentïon.md" "intention.md"; do
|
|
546
|
-
git show "origin
|
|
546
|
+
git show "origin/agentic-lib-logs:${f}" > "$f" 2>/dev/null || true
|
|
547
547
|
done
|
|
548
548
|
|
|
549
549
|
- name: Check mission-complete signal
|
|
@@ -642,7 +642,7 @@ jobs:
|
|
|
642
642
|
commit-message: "agentic-step: maintain features and library"
|
|
643
643
|
push-ref: ${{ github.ref_name }}
|
|
644
644
|
|
|
645
|
-
- name: Push log to
|
|
645
|
+
- name: Push log to agentic-lib-logs branch
|
|
646
646
|
if: github.repository != 'xn-intenton-z2a/agentic-lib' && needs.params.outputs.dry-run != 'true'
|
|
647
647
|
run: bash .github/agentic-lib/scripts/push-to-logs.sh "intentïon.md" "intention.md"
|
|
648
648
|
|
|
@@ -662,10 +662,10 @@ jobs:
|
|
|
662
662
|
with:
|
|
663
663
|
fetch-depth: 0
|
|
664
664
|
|
|
665
|
-
- name: Fetch log from
|
|
665
|
+
- name: Fetch log from agentic-lib-logs branch
|
|
666
666
|
run: |
|
|
667
667
|
for f in "intentïon.md" "intention.md"; do
|
|
668
|
-
git show "origin
|
|
668
|
+
git show "origin/agentic-lib-logs:${f}" > "$f" 2>/dev/null || true
|
|
669
669
|
done
|
|
670
670
|
|
|
671
671
|
- uses: actions/setup-node@v6
|
|
@@ -693,7 +693,7 @@ jobs:
|
|
|
693
693
|
instructions: ".github/agentic-lib/agents/agent-director.md"
|
|
694
694
|
model: ${{ needs.params.outputs.model }}
|
|
695
695
|
|
|
696
|
-
- name: Push log to
|
|
696
|
+
- name: Push log to agentic-lib-logs branch
|
|
697
697
|
if: github.repository != 'xn-intenton-z2a/agentic-lib' && needs.params.outputs.dry-run != 'true'
|
|
698
698
|
run: bash .github/agentic-lib/scripts/push-to-logs.sh "intentïon.md" "intention.md"
|
|
699
699
|
|
|
@@ -712,10 +712,10 @@ jobs:
|
|
|
712
712
|
with:
|
|
713
713
|
fetch-depth: 0
|
|
714
714
|
|
|
715
|
-
- name: Fetch log from
|
|
715
|
+
- name: Fetch log from agentic-lib-logs branch
|
|
716
716
|
run: |
|
|
717
717
|
for f in "intentïon.md" "intention.md"; do
|
|
718
|
-
git show "origin
|
|
718
|
+
git show "origin/agentic-lib-logs:${f}" > "$f" 2>/dev/null || true
|
|
719
719
|
done
|
|
720
720
|
|
|
721
721
|
- uses: actions/setup-node@v6
|
|
@@ -743,7 +743,7 @@ jobs:
|
|
|
743
743
|
instructions: ".github/agentic-lib/agents/agent-supervisor.md"
|
|
744
744
|
model: ${{ needs.params.outputs.model }}
|
|
745
745
|
|
|
746
|
-
- name: Push log to
|
|
746
|
+
- name: Push log to agentic-lib-logs branch
|
|
747
747
|
if: github.repository != 'xn-intenton-z2a/agentic-lib' && needs.params.outputs.dry-run != 'true'
|
|
748
748
|
run: bash .github/agentic-lib/scripts/push-to-logs.sh "intentïon.md" "intention.md"
|
|
749
749
|
|
|
@@ -1127,10 +1127,10 @@ jobs:
|
|
|
1127
1127
|
fetch-depth: 0
|
|
1128
1128
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
1129
1129
|
|
|
1130
|
-
- name: Fetch log from
|
|
1130
|
+
- name: Fetch log from agentic-lib-logs branch
|
|
1131
1131
|
run: |
|
|
1132
1132
|
for f in "intentïon.md" "intention.md"; do
|
|
1133
|
-
git show "origin
|
|
1133
|
+
git show "origin/agentic-lib-logs:${f}" > "$f" 2>/dev/null || true
|
|
1134
1134
|
done
|
|
1135
1135
|
|
|
1136
1136
|
- uses: actions/setup-node@v6
|
|
@@ -1293,7 +1293,7 @@ jobs:
|
|
|
1293
1293
|
commit-message: "agentic-step: transform issue #${{ steps.issue.outputs.issue-number }}"
|
|
1294
1294
|
push-ref: ${{ steps.branch.outputs.branchName }}
|
|
1295
1295
|
|
|
1296
|
-
- name: Push log to
|
|
1296
|
+
- name: Push log to agentic-lib-logs branch
|
|
1297
1297
|
if: github.repository != 'xn-intenton-z2a/agentic-lib' && needs.params.outputs.dry-run != 'true'
|
|
1298
1298
|
run: bash .github/agentic-lib/scripts/push-to-logs.sh "intentïon.md" "intention.md"
|
|
1299
1299
|
|
package/bin/agentic-lib.js
CHANGED
|
@@ -1134,30 +1134,30 @@ function initPurgeGitHub() {
|
|
|
1134
1134
|
console.log(` SKIP: Could not create discussion (${err.message})`);
|
|
1135
1135
|
}
|
|
1136
1136
|
|
|
1137
|
-
// ── Create/reset
|
|
1138
|
-
console.log("\n---
|
|
1137
|
+
// ── Create/reset agentic-lib-logs orphan branch ─────────────────────────────
|
|
1138
|
+
console.log("\n--- agentic-lib-logs branch (activity log + screenshot) ---");
|
|
1139
1139
|
try {
|
|
1140
1140
|
if (!dryRun) {
|
|
1141
|
-
// Delete existing
|
|
1141
|
+
// Delete existing agentic-lib-logs branch if present
|
|
1142
1142
|
try {
|
|
1143
|
-
ghExec(`gh api repos/${repoSlug}/git/refs/heads
|
|
1144
|
-
console.log(" DELETE: existing
|
|
1143
|
+
ghExec(`gh api repos/${repoSlug}/git/refs/heads/agentic-lib-logs -X DELETE`);
|
|
1144
|
+
console.log(" DELETE: existing agentic-lib-logs branch");
|
|
1145
1145
|
} catch { /* branch may not exist */ }
|
|
1146
|
-
// Create orphan
|
|
1146
|
+
// Create orphan agentic-lib-logs branch with an empty commit via the API
|
|
1147
1147
|
// First get the empty tree SHA
|
|
1148
1148
|
const emptyTree = JSON.parse(ghExec(`gh api repos/${repoSlug}/git/trees -X POST -f "tree[0][path]=.gitkeep" -f "tree[0][mode]=100644" -f "tree[0][type]=blob" -f "tree[0][content]="`));
|
|
1149
1149
|
const commitData = JSON.parse(ghExec(
|
|
1150
|
-
`gh api repos/${repoSlug}/git/commits -X POST -f "message=init
|
|
1150
|
+
`gh api repos/${repoSlug}/git/commits -X POST -f "message=init agentic-lib-logs branch" -f "tree=${emptyTree.sha}"`,
|
|
1151
1151
|
));
|
|
1152
|
-
ghExec(`gh api repos/${repoSlug}/git/refs -X POST -f "ref=refs/heads
|
|
1153
|
-
console.log(" CREATE:
|
|
1152
|
+
ghExec(`gh api repos/${repoSlug}/git/refs -X POST -f "ref=refs/heads/agentic-lib-logs" -f "sha=${commitData.sha}"`);
|
|
1153
|
+
console.log(" CREATE: agentic-lib-logs orphan branch");
|
|
1154
1154
|
initChanges++;
|
|
1155
1155
|
} else {
|
|
1156
|
-
console.log(" CREATE:
|
|
1156
|
+
console.log(" CREATE: agentic-lib-logs orphan branch (dry run)");
|
|
1157
1157
|
initChanges++;
|
|
1158
1158
|
}
|
|
1159
1159
|
} catch (err) {
|
|
1160
|
-
console.log(` SKIP: Could not create
|
|
1160
|
+
console.log(` SKIP: Could not create agentic-lib-logs branch (${err.message})`);
|
|
1161
1161
|
}
|
|
1162
1162
|
|
|
1163
1163
|
// ── Enable GitHub Pages ───────────────────────────────────────────
|
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@ runs:
|
|
|
28
28
|
git add -A
|
|
29
29
|
# Unstage workflow files — GITHUB_TOKEN cannot push workflow changes
|
|
30
30
|
git reset HEAD -- '.github/workflows/' 2>/dev/null || true
|
|
31
|
-
# Unstage log/screenshot files — these live on the
|
|
31
|
+
# Unstage log/screenshot files — these live on the agentic-lib-logs branch
|
|
32
32
|
git reset HEAD -- 'intentïon.md' 'intention.md' 'SCREENSHOT_INDEX.png' 2>/dev/null || true
|
|
33
33
|
if git diff --cached --quiet; then
|
|
34
34
|
echo "No changes to commit"
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
# Copyright (C) 2025-2026 Polycode Limited
|
|
4
|
-
# push-to-logs.sh — Push log/screenshot files to the
|
|
4
|
+
# push-to-logs.sh — Push log/screenshot files to the agentic-lib-logs orphan branch.
|
|
5
5
|
#
|
|
6
6
|
# Usage: bash .github/agentic-lib/scripts/push-to-logs.sh [file ...]
|
|
7
7
|
# e.g. bash .github/agentic-lib/scripts/push-to-logs.sh "intentïon.md" SCREENSHOT_INDEX.png
|
|
8
8
|
#
|
|
9
|
-
# Creates the
|
|
9
|
+
# Creates the agentic-lib-logs branch if it doesn't exist. Uses rebase/retry for
|
|
10
10
|
# concurrent pushes (same strategy as commit-if-changed).
|
|
11
11
|
|
|
12
12
|
set -euo pipefail
|
|
13
13
|
|
|
14
|
-
BRANCH="
|
|
14
|
+
BRANCH="agentic-lib-logs"
|
|
15
15
|
MAX_RETRIES=3
|
|
16
16
|
|
|
17
17
|
# Collect files that actually exist in the workspace
|
|
@@ -39,12 +39,12 @@ for f in "${FILES[@]}"; do
|
|
|
39
39
|
cp "$f" "${TMPDIR}/$(basename "$f")"
|
|
40
40
|
done
|
|
41
41
|
|
|
42
|
-
# Fetch the
|
|
42
|
+
# Fetch the agentic-lib-logs branch (may not exist yet)
|
|
43
43
|
REMOTE_EXISTS=""
|
|
44
44
|
git fetch origin "${BRANCH}" 2>/dev/null && REMOTE_EXISTS="true" || true
|
|
45
45
|
|
|
46
46
|
if [ "$REMOTE_EXISTS" = "true" ]; then
|
|
47
|
-
# Check out existing
|
|
47
|
+
# Check out existing agentic-lib-logs branch into a detached worktree-like state
|
|
48
48
|
git checkout "origin/${BRANCH}" -- . 2>/dev/null || true
|
|
49
49
|
git checkout -B "${BRANCH}" "origin/${BRANCH}"
|
|
50
50
|
else
|