@xn-intenton-z2a/agentic-lib 7.1.66 → 7.1.67
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/package.json +1 -1
- package/src/actions/agentic-step/index.js +1 -0
- package/src/actions/agentic-step/logging.js +6 -0
- package/src/actions/agentic-step/tasks/fix-code.js +4 -2
- package/src/actions/agentic-step/tasks/resolve-issue.js +1 -0
- package/src/actions/agentic-step/tasks/transform.js +1 -0
- package/src/seeds/zero-package.json +1 -1
package/package.json
CHANGED
|
@@ -34,6 +34,7 @@ import * as core from "@actions/core";
|
|
|
34
34
|
* @param {Array} [options.promptBudget] - Prompt budget entries { section, size, files, notes }
|
|
35
35
|
* @param {string} [options.closingNotes] - Auto-generated limit concern notes
|
|
36
36
|
* @param {number} [options.transformationCost] - Transformation cost for this entry (0 or 1)
|
|
37
|
+
* @param {string} [options.narrative] - LLM-generated narrative description of the change
|
|
37
38
|
*/
|
|
38
39
|
export function logActivity({
|
|
39
40
|
filepath,
|
|
@@ -57,6 +58,7 @@ export function logActivity({
|
|
|
57
58
|
promptBudget,
|
|
58
59
|
closingNotes,
|
|
59
60
|
transformationCost,
|
|
61
|
+
narrative,
|
|
60
62
|
}) {
|
|
61
63
|
const dir = dirname(filepath);
|
|
62
64
|
if (!existsSync(dir)) {
|
|
@@ -110,6 +112,10 @@ export function logActivity({
|
|
|
110
112
|
parts.push("", "### Closing Notes");
|
|
111
113
|
parts.push(closingNotes);
|
|
112
114
|
}
|
|
115
|
+
if (narrative) {
|
|
116
|
+
parts.push("", "### Narrative");
|
|
117
|
+
parts.push(narrative);
|
|
118
|
+
}
|
|
113
119
|
if (details) {
|
|
114
120
|
parts.push("");
|
|
115
121
|
parts.push(details);
|
|
@@ -98,7 +98,7 @@ async function resolveConflicts({ config, pr, prNumber, instructions, model, wri
|
|
|
98
98
|
].join("\n");
|
|
99
99
|
|
|
100
100
|
const t = config.tuning || {};
|
|
101
|
-
const { tokensUsed, inputTokens, outputTokens, cost } = await runCopilotTask({
|
|
101
|
+
const { tokensUsed, inputTokens, outputTokens, cost, content: resultContent } = await runCopilotTask({
|
|
102
102
|
model,
|
|
103
103
|
systemMessage: `You are resolving git merge conflicts on PR #${prNumber}. Write resolved versions of each conflicted file, removing all conflict markers. Preserve the PR's feature intent while incorporating main's updates.`,
|
|
104
104
|
prompt,
|
|
@@ -116,6 +116,7 @@ async function resolveConflicts({ config, pr, prNumber, instructions, model, wri
|
|
|
116
116
|
cost,
|
|
117
117
|
model,
|
|
118
118
|
details: `Resolved ${conflicts.length} conflicted file(s) on PR #${prNumber}`,
|
|
119
|
+
narrative: (resultContent || "").substring(0, 2000),
|
|
119
120
|
};
|
|
120
121
|
}
|
|
121
122
|
|
|
@@ -186,7 +187,7 @@ export async function fixCode(context) {
|
|
|
186
187
|
].join("\n");
|
|
187
188
|
|
|
188
189
|
const t = config.tuning || {};
|
|
189
|
-
const { tokensUsed, inputTokens, outputTokens, cost } = await runCopilotTask({
|
|
190
|
+
const { tokensUsed, inputTokens, outputTokens, cost, content: resultContent } = await runCopilotTask({
|
|
190
191
|
model,
|
|
191
192
|
systemMessage: `You are an autonomous coding agent fixing failing tests on PR #${prNumber}. Make minimal, targeted changes to fix the test failures.`,
|
|
192
193
|
prompt,
|
|
@@ -204,5 +205,6 @@ export async function fixCode(context) {
|
|
|
204
205
|
cost,
|
|
205
206
|
model,
|
|
206
207
|
details: `Applied fix for ${failedChecks.length} failing check(s) on PR #${prNumber}`,
|
|
208
|
+
narrative: (resultContent || "").substring(0, 2000),
|
|
207
209
|
};
|
|
208
210
|
}
|
|
@@ -183,6 +183,7 @@ export async function transform(context) {
|
|
|
183
183
|
cost,
|
|
184
184
|
model,
|
|
185
185
|
details: resultContent.substring(0, 500),
|
|
186
|
+
narrative: (resultContent || "").substring(0, 2000),
|
|
186
187
|
promptBudget,
|
|
187
188
|
contextNotes: `Transformed with ${sourceFiles.length} source files (mtime-sorted, cleaned), ${features.length} features, ${openIssues.length} issues (${rawIssues.length - openIssues.length} stale filtered).`,
|
|
188
189
|
};
|