@kody-ade/kody-engine 0.4.241 → 0.4.242

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.
Files changed (2) hide show
  1. package/dist/bin/kody.js +18 -5
  2. 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.241",
18
+ version: "0.4.242",
19
19
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative agentAction profiles.",
20
20
  license: "MIT",
21
21
  type: "module",
@@ -334,9 +334,22 @@ function is404(err) {
334
334
  }
335
335
  function parseStateRepoSlug(slug, field = "stateRepo") {
336
336
  const value = slug.trim();
337
- const parts = value.split("/");
337
+ let repoPath = value;
338
+ if (/^https?:\/\//i.test(value)) {
339
+ let parsed;
340
+ try {
341
+ parsed = new URL(value);
342
+ } catch {
343
+ throw new Error(`kody.config.json: ${field} must be a GitHub repository URL`);
344
+ }
345
+ if (parsed.protocol !== "https:" || parsed.hostname !== "github.com") {
346
+ throw new Error(`kody.config.json: ${field} must be a https://github.com repository URL`);
347
+ }
348
+ repoPath = parsed.pathname.replace(/^\/+|\/+$/g, "").replace(/\.git$/i, "");
349
+ }
350
+ const parts = repoPath.split("/");
338
351
  if (parts.length !== 2 || !parts[0] || !parts[1]) {
339
- throw new Error(`kody.config.json: ${field} must look like "owner/repo"`);
352
+ throw new Error(`kody.config.json: ${field} must be a https://github.com/owner/repo URL`);
340
353
  }
341
354
  for (const part of parts) {
342
355
  if (!/^[A-Za-z0-9_.-]+$/.test(part)) {
@@ -537,7 +550,7 @@ function parseStateConfig(raw, github) {
537
550
  const nested = recordValue(raw.state) ?? {};
538
551
  const repoRaw = typeof raw.stateRepo === "string" ? raw.stateRepo : nested.repo;
539
552
  const pathRaw = typeof raw.statePath === "string" ? raw.statePath : nested.path;
540
- const stateRepo = typeof repoRaw === "string" && repoRaw.trim().length > 0 ? repoRaw.trim() : `${String(github.owner)}/kody-state`;
553
+ const stateRepo = typeof repoRaw === "string" && repoRaw.trim().length > 0 ? repoRaw.trim() : `https://github.com/${String(github.owner)}/kody-state`;
541
554
  parseStateRepoSlug(stateRepo);
542
555
  const statePath2 = typeof pathRaw === "string" && pathRaw.trim().length > 0 ? pathRaw.trim() : String(github.repo);
543
556
  return {
@@ -18232,7 +18245,7 @@ async function loadConfigSafe() {
18232
18245
  quality: { typecheck: "", lint: "", format: "", testUnit: "" },
18233
18246
  git: { defaultBranch: "main" },
18234
18247
  github: { owner: "unknown", repo: "unknown" },
18235
- state: { repo: "unknown/kody-state", path: "unknown" },
18248
+ state: { repo: "https://github.com/unknown/kody-state", path: "unknown" },
18236
18249
  agent: { model: "claude/claude-sonnet-4" }
18237
18250
  };
18238
18251
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.241",
3
+ "version": "0.4.242",
4
4
  "description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative agentAction profiles.",
5
5
  "license": "MIT",
6
6
  "type": "module",