@kody-ade/kody-engine 0.4.599 → 0.4.600
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 +20 -13
- 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.600",
|
|
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
|
type: "module",
|
|
@@ -18357,16 +18357,22 @@ function browserOrigin(raw) {
|
|
|
18357
18357
|
}
|
|
18358
18358
|
return parsed.origin;
|
|
18359
18359
|
}
|
|
18360
|
-
async function githubJson(url, token) {
|
|
18361
|
-
const
|
|
18362
|
-
|
|
18363
|
-
|
|
18364
|
-
|
|
18365
|
-
|
|
18366
|
-
|
|
18367
|
-
|
|
18368
|
-
|
|
18369
|
-
|
|
18360
|
+
async function githubJson(url, token, checkName) {
|
|
18361
|
+
const retryDelaysMs2 = [250, 750];
|
|
18362
|
+
for (let attempt = 0; attempt <= retryDelaysMs2.length; attempt += 1) {
|
|
18363
|
+
const response = await fetch(url, {
|
|
18364
|
+
headers: {
|
|
18365
|
+
Accept: "application/vnd.github+json",
|
|
18366
|
+
Authorization: `Bearer ${token}`,
|
|
18367
|
+
"X-GitHub-Api-Version": "2022-11-28"
|
|
18368
|
+
}
|
|
18369
|
+
});
|
|
18370
|
+
if (response.ok) return await response.json();
|
|
18371
|
+
const canRetry = response.status >= 500 && response.status <= 599 && attempt < retryDelaysMs2.length;
|
|
18372
|
+
if (!canRetry) throw new Error(`GitHub ${checkName} check returned ${response.status}`);
|
|
18373
|
+
await new Promise((resolve24) => setTimeout(resolve24, retryDelaysMs2[attempt]));
|
|
18374
|
+
}
|
|
18375
|
+
throw new Error(`GitHub ${checkName} check failed`);
|
|
18370
18376
|
}
|
|
18371
18377
|
function writeKodyStorageState(input) {
|
|
18372
18378
|
const directory = fs48.mkdtempSync(path45.join(os7.tmpdir(), "kody-browser-auth-"));
|
|
@@ -18473,10 +18479,11 @@ async function prepareKodyRepositoryBrowserAuth(ctx, profile, input) {
|
|
|
18473
18479
|
try {
|
|
18474
18480
|
const requested = githubRepositoryParts(repositoryUrl);
|
|
18475
18481
|
const [user, repository] = await Promise.all([
|
|
18476
|
-
githubJson("https://api.github.com/user", credential.value),
|
|
18482
|
+
githubJson("https://api.github.com/user", credential.value, "user"),
|
|
18477
18483
|
githubJson(
|
|
18478
18484
|
`https://api.github.com/repos/${encodeURIComponent(requested.owner)}/${encodeURIComponent(requested.repo)}`,
|
|
18479
|
-
credential.value
|
|
18485
|
+
credential.value,
|
|
18486
|
+
"repository"
|
|
18480
18487
|
)
|
|
18481
18488
|
]);
|
|
18482
18489
|
const [owner, repo] = repository.full_name.split("/");
|
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.600",
|
|
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
|
"type": "module",
|