@xn-intenton-z2a/agentic-lib 7.1.99 → 7.1.101
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
|
@@ -277,7 +277,7 @@ export async function runCopilotTask({
|
|
|
277
277
|
profileName,
|
|
278
278
|
maxRetries = 3,
|
|
279
279
|
}) {
|
|
280
|
-
const profile = profileName || "unknown";
|
|
280
|
+
const profile = profileName || tuning?.profileName || "unknown";
|
|
281
281
|
|
|
282
282
|
// Attempt 0 is the initial call; attempts 1..maxRetries are retries after 429s.
|
|
283
283
|
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
@@ -308,7 +308,7 @@ async function _runCopilotTaskOnce({
|
|
|
308
308
|
tuning,
|
|
309
309
|
profileName,
|
|
310
310
|
}) {
|
|
311
|
-
const profile = profileName || "unknown";
|
|
311
|
+
const profile = profileName || tuning?.profileName || "unknown";
|
|
312
312
|
core.info(
|
|
313
313
|
`[copilot] Creating client (model=${model}, promptLen=${prompt.length}, writablePaths=${writablePaths.length}, tuning=${tuning?.reasoningEffort || "default"}, profile=${profile})`,
|
|
314
314
|
);
|
|
@@ -605,6 +605,31 @@ async function executeMissionComplete(octokit, repo, params, ctx) {
|
|
|
605
605
|
].join("\n");
|
|
606
606
|
writeFileSync("MISSION_COMPLETE.md", signal);
|
|
607
607
|
core.info(`Mission complete signal written: ${reason}`);
|
|
608
|
+
|
|
609
|
+
// Persist MISSION_COMPLETE.md to the repository via Contents API so it survives across runs
|
|
610
|
+
try {
|
|
611
|
+
const contentBase64 = Buffer.from(signal).toString("base64");
|
|
612
|
+
// Check if file already exists (to get its SHA for updates)
|
|
613
|
+
let existingSha;
|
|
614
|
+
try {
|
|
615
|
+
const { data } = await octokit.rest.repos.getContent({ ...repo, path: "MISSION_COMPLETE.md", ref: "main" });
|
|
616
|
+
existingSha = data.sha;
|
|
617
|
+
} catch {
|
|
618
|
+
// File doesn't exist yet — that's fine
|
|
619
|
+
}
|
|
620
|
+
await octokit.rest.repos.createOrUpdateFileContents({
|
|
621
|
+
...repo,
|
|
622
|
+
path: "MISSION_COMPLETE.md",
|
|
623
|
+
message: "mission-complete: " + reason.substring(0, 72),
|
|
624
|
+
content: contentBase64,
|
|
625
|
+
branch: "main",
|
|
626
|
+
...(existingSha ? { sha: existingSha } : {}),
|
|
627
|
+
});
|
|
628
|
+
core.info("MISSION_COMPLETE.md committed to main via Contents API");
|
|
629
|
+
} catch (err) {
|
|
630
|
+
core.warning(`Could not commit MISSION_COMPLETE.md to repo: ${err.message}`);
|
|
631
|
+
}
|
|
632
|
+
|
|
608
633
|
if (process.env.GITHUB_REPOSITORY !== "xn-intenton-z2a/agentic-lib") {
|
|
609
634
|
try {
|
|
610
635
|
await octokit.rest.actions.createWorkflowDispatch({
|
|
@@ -638,6 +663,30 @@ async function executeMissionFailed(octokit, repo, params, ctx) {
|
|
|
638
663
|
].join("\n");
|
|
639
664
|
writeFileSync("MISSION_FAILED.md", signal);
|
|
640
665
|
core.info(`Mission failed signal written: ${reason}`);
|
|
666
|
+
|
|
667
|
+
// Persist MISSION_FAILED.md to the repository via Contents API so it survives across runs
|
|
668
|
+
try {
|
|
669
|
+
const contentBase64 = Buffer.from(signal).toString("base64");
|
|
670
|
+
let existingSha;
|
|
671
|
+
try {
|
|
672
|
+
const { data } = await octokit.rest.repos.getContent({ ...repo, path: "MISSION_FAILED.md", ref: "main" });
|
|
673
|
+
existingSha = data.sha;
|
|
674
|
+
} catch {
|
|
675
|
+
// File doesn't exist yet — that's fine
|
|
676
|
+
}
|
|
677
|
+
await octokit.rest.repos.createOrUpdateFileContents({
|
|
678
|
+
...repo,
|
|
679
|
+
path: "MISSION_FAILED.md",
|
|
680
|
+
message: "mission-failed: " + reason.substring(0, 72),
|
|
681
|
+
content: contentBase64,
|
|
682
|
+
branch: "main",
|
|
683
|
+
...(existingSha ? { sha: existingSha } : {}),
|
|
684
|
+
});
|
|
685
|
+
core.info("MISSION_FAILED.md committed to main via Contents API");
|
|
686
|
+
} catch (err) {
|
|
687
|
+
core.warning(`Could not commit MISSION_FAILED.md to repo: ${err.message}`);
|
|
688
|
+
}
|
|
689
|
+
|
|
641
690
|
if (process.env.GITHUB_REPOSITORY !== "xn-intenton-z2a/agentic-lib") {
|
|
642
691
|
try {
|
|
643
692
|
await octokit.rest.actions.createWorkflowDispatch({
|
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
"author": "",
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@xn-intenton-z2a/agentic-lib": "^7.1.
|
|
20
|
+
"@xn-intenton-z2a/agentic-lib": "^7.1.101"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@playwright/test": "^1.58.0",
|
|
24
24
|
"@vitest/coverage-v8": "^4.0.18",
|
|
25
|
+
"jsdom": "^26.1.0",
|
|
25
26
|
"serve": "^14.2.4",
|
|
26
27
|
"vitest": "^4.0.18"
|
|
27
28
|
},
|