@xn-intenton-z2a/agentic-lib 7.1.54 → 7.1.56
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/{src → .github}/workflows/agentic-lib-bot.yml +39 -14
- package/{src/seeds → .github/workflows}/agentic-lib-init.yml +49 -6
- package/{src → .github}/workflows/agentic-lib-schedule.yml +16 -0
- package/{src/seeds → .github/workflows}/agentic-lib-test.yml +11 -4
- package/{src → .github}/workflows/agentic-lib-workflow.yml +80 -20
- package/agentic-lib.toml +53 -0
- package/bin/agentic-lib.js +32 -28
- package/package.json +4 -2
- package/src/actions/agentic-step/config-loader.js +65 -1
- package/src/actions/agentic-step/copilot.js +12 -4
- package/src/actions/agentic-step/tasks/discussions.js +8 -7
- package/src/actions/agentic-step/tasks/enhance-issue.js +7 -4
- package/src/actions/agentic-step/tasks/fix-code.js +2 -0
- package/src/actions/agentic-step/tasks/maintain-features.js +6 -4
- package/src/actions/agentic-step/tasks/maintain-library.js +3 -1
- package/src/actions/agentic-step/tasks/resolve-issue.js +2 -0
- package/src/actions/agentic-step/tasks/review-issue.js +13 -9
- package/src/actions/agentic-step/tasks/supervise.js +5 -3
- package/src/actions/agentic-step/tasks/transform.js +14 -7
- package/src/actions/commit-if-changed/action.yml +15 -7
- package/src/dist-transform.js +36 -0
- package/src/seeds/zero-SOURCES.md +2 -0
- package/src/seeds/zero-package.json +1 -1
- package/src/seeds/zero-agentic-lib.toml +0 -39
|
@@ -40,15 +40,23 @@ runs:
|
|
|
40
40
|
git commit -m "${{ inputs.commit-message }}"
|
|
41
41
|
REF="${{ inputs.push-ref }}"
|
|
42
42
|
MAX_RETRIES=3
|
|
43
|
+
REMOTE_REF_EXISTS=""
|
|
44
|
+
if [ -n "$REF" ]; then
|
|
45
|
+
git ls-remote --exit-code origin "$REF" > /dev/null 2>&1 && REMOTE_REF_EXISTS="true"
|
|
46
|
+
else
|
|
47
|
+
REMOTE_REF_EXISTS="true"
|
|
48
|
+
fi
|
|
43
49
|
for attempt in $(seq 1 $MAX_RETRIES); do
|
|
44
50
|
if [ -n "$REF" ]; then
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
if [ "$REMOTE_REF_EXISTS" = "true" ]; then
|
|
52
|
+
git pull --rebase origin "$REF" || {
|
|
53
|
+
echo "Rebase conflict on attempt $attempt — aborting rebase and retrying"
|
|
54
|
+
git rebase --abort 2>/dev/null || true
|
|
55
|
+
sleep $((attempt * 2))
|
|
56
|
+
continue
|
|
57
|
+
}
|
|
58
|
+
fi
|
|
59
|
+
git push origin "$REF" && { REMOTE_REF_EXISTS="true"; break; }
|
|
52
60
|
else
|
|
53
61
|
git pull --rebase || {
|
|
54
62
|
echo "Rebase conflict on attempt $attempt — aborting rebase and retrying"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-only
|
|
2
|
+
// Copyright (C) 2025-2026 Polycode Limited
|
|
3
|
+
// src/dist-transform.js — #@dist marker transform for distribution
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Apply #@dist transforms to file content for distribution.
|
|
7
|
+
*
|
|
8
|
+
* Two patterns:
|
|
9
|
+
* 1. Line starts with "#@dist " — uncomment by removing the "#@dist " prefix
|
|
10
|
+
* e.g. "#@dist schedule:" → "schedule:"
|
|
11
|
+
* 2. Line contains " #@dist <value>" suffix — replace the preceding value
|
|
12
|
+
* e.g. 'default: true #@dist false' → 'default: false'
|
|
13
|
+
* e.g. 'mission = "test/MISSION.md" #@dist "MISSION.md"' → 'mission = "MISSION.md"'
|
|
14
|
+
*/
|
|
15
|
+
export function applyDistTransform(content) {
|
|
16
|
+
return content
|
|
17
|
+
.split("\n")
|
|
18
|
+
.map((line) => {
|
|
19
|
+
// Pattern 1: line starts with #@dist — uncomment
|
|
20
|
+
const commentMatch = line.match(/^(\s*)#@dist (.*)$/);
|
|
21
|
+
if (commentMatch) {
|
|
22
|
+
return commentMatch[1] + commentMatch[2];
|
|
23
|
+
}
|
|
24
|
+
// Pattern 2: inline #@dist <replacement> — replace preceding value
|
|
25
|
+
const inlineMatch = line.match(/^(.+?)\s+#@dist\s+(.+)$/); // eslint-disable-line sonarjs/slow-regex
|
|
26
|
+
if (inlineMatch) {
|
|
27
|
+
const before = inlineMatch[1];
|
|
28
|
+
const replacement = inlineMatch[2];
|
|
29
|
+
// Replace the last value token on the line before #@dist
|
|
30
|
+
// Handles: 'key: value' (YAML) and 'key = "value"' (TOML)
|
|
31
|
+
return before.replace(/(:\s*|=\s*)(\S+)\s*$/, `$1${replacement}`); // eslint-disable-line sonarjs/slow-regex
|
|
32
|
+
}
|
|
33
|
+
return line;
|
|
34
|
+
})
|
|
35
|
+
.join("\n");
|
|
36
|
+
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# SPDX-License-Identifier: MIT
|
|
2
|
-
# Copyright (C) 2025-2026 Polycode Limited
|
|
3
|
-
# agentic-lib.toml — Configuration for agentic-lib workflows
|
|
4
|
-
#
|
|
5
|
-
# This file controls how agentic workflows operate on your repository.
|
|
6
|
-
# Place it at the root of your project.
|
|
7
|
-
|
|
8
|
-
[schedule]
|
|
9
|
-
supervisor = "daily" # off | weekly | daily | hourly | continuous
|
|
10
|
-
model = "gpt-5-mini" # gpt-5-mini | claude-sonnet-4 | gpt-4.1
|
|
11
|
-
|
|
12
|
-
[paths]
|
|
13
|
-
mission = "MISSION.md"
|
|
14
|
-
source = "src/lib/"
|
|
15
|
-
tests = "tests/unit/"
|
|
16
|
-
features = "features/"
|
|
17
|
-
library = "library/"
|
|
18
|
-
docs = "docs/"
|
|
19
|
-
examples = "examples/"
|
|
20
|
-
readme = "README.md"
|
|
21
|
-
dependencies = "package.json"
|
|
22
|
-
contributing = "CONTRIBUTING.md"
|
|
23
|
-
library-sources = "SOURCES.md"
|
|
24
|
-
|
|
25
|
-
[execution]
|
|
26
|
-
build = "npm run build"
|
|
27
|
-
test = "npm test"
|
|
28
|
-
start = "npm run start"
|
|
29
|
-
|
|
30
|
-
[limits]
|
|
31
|
-
feature-issues = 5
|
|
32
|
-
maintenance-issues = 1
|
|
33
|
-
attempts-per-branch = 3
|
|
34
|
-
attempts-per-issue = 2
|
|
35
|
-
features-limit = 4
|
|
36
|
-
library-limit = 32
|
|
37
|
-
|
|
38
|
-
[bot]
|
|
39
|
-
log-file = "intentïon.md"
|