@kody-ade/kody-engine 0.4.645 → 0.4.646
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/dist/bin/kody.js +41 -16
- package/package.json +1 -1
package/dist/bin/kody.js
CHANGED
|
@@ -15,7 +15,7 @@ var init_package = __esm({
|
|
|
15
15
|
"package.json"() {
|
|
16
16
|
package_default = {
|
|
17
17
|
name: "@kody-ade/kody-engine",
|
|
18
|
-
version: "0.4.
|
|
18
|
+
version: "0.4.646",
|
|
19
19
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
|
|
20
20
|
license: "MIT",
|
|
21
21
|
repository: {
|
|
@@ -19556,6 +19556,18 @@ function appendPrompt(ctx, section) {
|
|
|
19556
19556
|
const prompt = typeof ctx.data.prompt === "string" ? ctx.data.prompt.trim() : "";
|
|
19557
19557
|
ctx.data.prompt = [prompt, section.trim()].filter(Boolean).join("\n\n");
|
|
19558
19558
|
}
|
|
19559
|
+
function capabilityTargetUrl(ctx) {
|
|
19560
|
+
const input = ctx.data.capabilityInput && typeof ctx.data.capabilityInput === "object" && !Array.isArray(ctx.data.capabilityInput) ? ctx.data.capabilityInput : {};
|
|
19561
|
+
return typeof input.url === "string" ? input.url : typeof input.targetUrl === "string" ? input.targetUrl : typeof input.previewUrl === "string" ? input.previewUrl : "";
|
|
19562
|
+
}
|
|
19563
|
+
async function isolatedAuthAttempt(ctx, attempt) {
|
|
19564
|
+
const previous = ctx.data.qaAuthBlock;
|
|
19565
|
+
ctx.data.qaAuthBlock = "";
|
|
19566
|
+
const ready = await attempt();
|
|
19567
|
+
const message = String(ctx.data.qaAuthBlock ?? "").trim();
|
|
19568
|
+
ctx.data.qaAuthBlock = previous;
|
|
19569
|
+
return { ready, message };
|
|
19570
|
+
}
|
|
19559
19571
|
var PLAYWRIGHT_SERVER, prepareSimpleCapabilityRuntime;
|
|
19560
19572
|
var init_prepareSimpleCapabilityRuntime = __esm({
|
|
19561
19573
|
"src/scripts/prepareSimpleCapabilityRuntime.ts"() {
|
|
@@ -19574,21 +19586,29 @@ var init_prepareSimpleCapabilityRuntime = __esm({
|
|
|
19574
19586
|
throw new Error("Capability requires the Dashboard user browser session and cannot run in CI");
|
|
19575
19587
|
}
|
|
19576
19588
|
configureBrowser(ctx, profile, requirements);
|
|
19589
|
+
const targetUrl = capabilityTargetUrl(ctx);
|
|
19590
|
+
const authAttempts = [];
|
|
19577
19591
|
if (requirements.qaCredentials) {
|
|
19578
19592
|
await loadQaContext(ctx, profile);
|
|
19579
|
-
const
|
|
19580
|
-
const
|
|
19581
|
-
|
|
19582
|
-
|
|
19583
|
-
|
|
19593
|
+
const missingCredentialsMessage = String(ctx.data.qaAuthBlock ?? "").trim();
|
|
19594
|
+
const emailAuth = await isolatedAuthAttempt(
|
|
19595
|
+
ctx,
|
|
19596
|
+
() => prepareEmailPasswordBrowserAuth(ctx, profile, {
|
|
19597
|
+
login: String(ctx.data.qaLogin ?? ""),
|
|
19598
|
+
targetUrl
|
|
19599
|
+
})
|
|
19600
|
+
);
|
|
19601
|
+
authAttempts.push({
|
|
19602
|
+
ready: emailAuth.ready,
|
|
19603
|
+
message: emailAuth.message || missingCredentialsMessage
|
|
19584
19604
|
});
|
|
19585
|
-
if (requirements.qaAccountCredentials?.length) {
|
|
19605
|
+
if (emailAuth.ready && requirements.qaAccountCredentials?.length) {
|
|
19586
19606
|
await prepareAccountCredentials(ctx, profile, {
|
|
19587
19607
|
names: requirements.qaAccountCredentials,
|
|
19588
19608
|
targetUrl
|
|
19589
19609
|
});
|
|
19590
19610
|
}
|
|
19591
|
-
if (requirements.qaAccountModelSettings) {
|
|
19611
|
+
if (emailAuth.ready && requirements.qaAccountModelSettings) {
|
|
19592
19612
|
await prepareAccountModelSettings(ctx, profile, {
|
|
19593
19613
|
settings: requirements.qaAccountModelSettings,
|
|
19594
19614
|
targetUrl
|
|
@@ -19596,16 +19616,21 @@ var init_prepareSimpleCapabilityRuntime = __esm({
|
|
|
19596
19616
|
}
|
|
19597
19617
|
}
|
|
19598
19618
|
if (requirements.githubTestToken) {
|
|
19599
|
-
|
|
19600
|
-
|
|
19601
|
-
|
|
19602
|
-
|
|
19603
|
-
|
|
19604
|
-
|
|
19605
|
-
|
|
19606
|
-
|
|
19619
|
+
authAttempts.push(
|
|
19620
|
+
await isolatedAuthAttempt(
|
|
19621
|
+
ctx,
|
|
19622
|
+
() => prepareKodyRepositoryBrowserAuth(ctx, profile, {
|
|
19623
|
+
repositoryUrl: `https://github.com/${ctx.config.github.owner}/${ctx.config.github.repo}`,
|
|
19624
|
+
credentialKey: "E2E_GITHUB_TOKEN",
|
|
19625
|
+
methodName: "Kody repository QA login",
|
|
19626
|
+
targetUrl
|
|
19627
|
+
})
|
|
19628
|
+
)
|
|
19629
|
+
);
|
|
19607
19630
|
}
|
|
19608
19631
|
if (requirements.qaCredentials || requirements.githubTestToken) {
|
|
19632
|
+
const successful = authAttempts.filter(({ ready }) => ready);
|
|
19633
|
+
ctx.data.qaAuthBlock = (successful.length ? successful : authAttempts).map(({ message }) => message).filter(Boolean).join("\n\n");
|
|
19609
19634
|
appendPrompt(
|
|
19610
19635
|
ctx,
|
|
19611
19636
|
[
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.646",
|
|
4
4
|
"description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|