@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xn-intenton-z2a/agentic-lib",
3
- "version": "7.1.66",
3
+ "version": "7.1.67",
4
4
  "description": "Agentic-lib Agentic Coding Systems SDK powering automated GitHub workflows.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -151,6 +151,7 @@ async function run() {
151
151
  promptBudget: result.promptBudget,
152
152
  closingNotes,
153
153
  transformationCost,
154
+ narrative: result.narrative,
154
155
  });
155
156
  }
156
157
 
@@ -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
  }
@@ -99,5 +99,6 @@ export async function resolveIssue(context) {
99
99
  model,
100
100
  commitUrl: null,
101
101
  details: `Generated code for issue #${issueNumber}: ${resultContent.substring(0, 200)}`,
102
+ narrative: (resultContent || "").substring(0, 2000),
102
103
  };
103
104
  }
@@ -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
  };
@@ -16,7 +16,7 @@
16
16
  "author": "",
17
17
  "license": "MIT",
18
18
  "dependencies": {
19
- "@xn-intenton-z2a/agentic-lib": "^7.1.66"
19
+ "@xn-intenton-z2a/agentic-lib": "^7.1.67"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@vitest/coverage-v8": "^4.0.18",