@xn-intenton-z2a/agentic-lib 7.4.17 → 7.4.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.
|
@@ -652,32 +652,32 @@ jobs:
|
|
|
652
652
|
echo "featuresWritablePaths=${FEATURES}" >> $GITHUB_OUTPUT
|
|
653
653
|
echo "libraryWritablePaths=${LIBRARY};${SOURCES}" >> $GITHUB_OUTPUT
|
|
654
654
|
|
|
655
|
-
- name: Maintain
|
|
656
|
-
id: maintain-
|
|
655
|
+
- name: Maintain library
|
|
656
|
+
id: maintain-library
|
|
657
657
|
if: steps.mission-check.outputs.mission-complete != 'true'
|
|
658
658
|
uses: ./.github/agentic-lib/actions/agentic-step
|
|
659
659
|
env:
|
|
660
660
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
661
661
|
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
|
|
662
662
|
with:
|
|
663
|
-
task: "maintain-
|
|
663
|
+
task: "maintain-library"
|
|
664
664
|
config: ${{ needs.params.outputs.config-path }}
|
|
665
|
-
instructions: ".github/agents/agent-maintain-
|
|
666
|
-
writable-paths: ${{ steps.config.outputs.
|
|
665
|
+
instructions: ".github/agents/agent-maintain-library.md"
|
|
666
|
+
writable-paths: ${{ steps.config.outputs.libraryWritablePaths }}
|
|
667
667
|
model: ${{ needs.params.outputs.model }}
|
|
668
668
|
|
|
669
|
-
- name: Maintain
|
|
670
|
-
id: maintain-
|
|
669
|
+
- name: Maintain features
|
|
670
|
+
id: maintain-features
|
|
671
671
|
if: steps.mission-check.outputs.mission-complete != 'true'
|
|
672
672
|
uses: ./.github/agentic-lib/actions/agentic-step
|
|
673
673
|
env:
|
|
674
674
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
675
675
|
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
|
|
676
676
|
with:
|
|
677
|
-
task: "maintain-
|
|
677
|
+
task: "maintain-features"
|
|
678
678
|
config: ${{ needs.params.outputs.config-path }}
|
|
679
|
-
instructions: ".github/agents/agent-maintain-
|
|
680
|
-
writable-paths: ${{ steps.config.outputs.
|
|
679
|
+
instructions: ".github/agents/agent-maintain-features.md"
|
|
680
|
+
writable-paths: ${{ steps.config.outputs.featuresWritablePaths }}
|
|
681
681
|
model: ${{ needs.params.outputs.model }}
|
|
682
682
|
|
|
683
683
|
- name: Log narrative thread
|
package/package.json
CHANGED
|
@@ -541,8 +541,17 @@ function parseReasoning(content) {
|
|
|
541
541
|
async function executeDispatch(octokit, repo, actionName, params, ctx) {
|
|
542
542
|
const workflowFile = actionName.replace("dispatch:", "") + ".yml";
|
|
543
543
|
const inputs = {};
|
|
544
|
-
if (params["pr-number"]) inputs["pr-number"] = params["pr-number"];
|
|
545
|
-
if (params["issue-number"])
|
|
544
|
+
if (params["pr-number"]) inputs["pr-number"] = String(params["pr-number"]);
|
|
545
|
+
if (params["issue-number"]) {
|
|
546
|
+
const issueNum = String(params["issue-number"]);
|
|
547
|
+
// Guard: reject placeholder issue numbers from LLM (e.g. "<created_issue_number>")
|
|
548
|
+
if (/^\d+$/.test(issueNum)) {
|
|
549
|
+
inputs["issue-number"] = issueNum;
|
|
550
|
+
} else {
|
|
551
|
+
core.warning(`dispatch: ignoring non-numeric issue-number: ${issueNum}`);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
if (params.mode) inputs.mode = String(params.mode);
|
|
546
555
|
|
|
547
556
|
// Pass discussion-url when dispatching the bot
|
|
548
557
|
if (workflowFile === "agentic-lib-bot.yml" && ctx?.activeDiscussionUrl) {
|
|
@@ -735,13 +744,36 @@ async function executeSetSchedule(octokit, repo, frequency) {
|
|
|
735
744
|
}
|
|
736
745
|
|
|
737
746
|
async function executeAction(octokit, repo, action, params, ctx) {
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
if (
|
|
743
|
-
|
|
744
|
-
|
|
747
|
+
// LLMs sometimes inline params in the action string as pipe-delimited key: value pairs
|
|
748
|
+
// e.g. "github:create-issue | title: foo | body: bar" instead of using the params object
|
|
749
|
+
let cleanAction = action;
|
|
750
|
+
let mergedParams = { ...params };
|
|
751
|
+
if (action.includes(" | ")) {
|
|
752
|
+
const parts = action.split(" | ");
|
|
753
|
+
cleanAction = parts[0].trim();
|
|
754
|
+
for (let i = 1; i < parts.length; i++) {
|
|
755
|
+
const colonIdx = parts[i].indexOf(":");
|
|
756
|
+
if (colonIdx > 0) {
|
|
757
|
+
const key = parts[i].substring(0, colonIdx).trim();
|
|
758
|
+
const value = parts[i].substring(colonIdx + 1).trim();
|
|
759
|
+
// Only add to params if not already set (explicit params take precedence)
|
|
760
|
+
if (!(key in mergedParams)) {
|
|
761
|
+
mergedParams[key] = value;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
if (cleanAction !== action) {
|
|
766
|
+
core.info(`Parsed inline params from action string: ${cleanAction} + ${Object.keys(mergedParams).join(", ")}`);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
if (cleanAction.startsWith("dispatch:")) return executeDispatch(octokit, repo, cleanAction, mergedParams, ctx);
|
|
771
|
+
if (cleanAction.startsWith("set-schedule:")) return executeSetSchedule(octokit, repo, cleanAction.replace("set-schedule:", ""));
|
|
772
|
+
if (cleanAction === "nop") return "nop";
|
|
773
|
+
const handler = ACTION_HANDLERS[cleanAction];
|
|
774
|
+
if (handler) return handler(octokit, repo, mergedParams, ctx);
|
|
775
|
+
core.debug(`Ignoring unrecognised action: ${cleanAction}`);
|
|
776
|
+
return `unknown:${cleanAction}`;
|
|
745
777
|
}
|
|
746
778
|
|
|
747
779
|
/**
|