@kody-ade/kody-engine 0.4.478 → 0.4.479

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 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.478",
18
+ version: "0.4.479",
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",
@@ -447,6 +447,20 @@ function parseReleaseConfig(raw) {
447
447
  if (!raw || typeof raw !== "object") return void 0;
448
448
  const r = raw;
449
449
  const out = {};
450
+ if (r.version !== void 0) {
451
+ const version = recordValue(r.version);
452
+ const readCommand = typeof version?.readCommand === "string" ? version.readCommand.trim() : "";
453
+ const writeCommand = typeof version?.writeCommand === "string" ? version.writeCommand.trim() : "";
454
+ const files = Array.isArray(version?.files) ? version.files.filter(
455
+ (file) => typeof file === "string" && file.trim().length > 0
456
+ ).map((file) => file.trim()) : [];
457
+ if (!readCommand || !writeCommand || files.length === 0) {
458
+ throw new Error(
459
+ "kody.config.json: release.version requires readCommand, writeCommand, and files"
460
+ );
461
+ }
462
+ out.version = { readCommand, writeCommand, files: [...new Set(files)] };
463
+ }
450
464
  if (Array.isArray(r.versionFiles)) out.versionFiles = r.versionFiles.filter((f) => typeof f === "string");
451
465
  if (typeof r.publishCommand === "string") out.publishCommand = r.publishCommand;
452
466
  if (typeof r.notifyCommand === "string") out.notifyCommand = r.notifyCommand;
@@ -457,24 +471,36 @@ function parseReleaseConfig(raw) {
457
471
  if (typeof r.allowAdminMerge === "boolean") out.allowAdminMerge = r.allowAdminMerge;
458
472
  if (typeof r.releaseBranch === "string") out.releaseBranch = r.releaseBranch;
459
473
  if (typeof r.timeoutMs === "number" && r.timeoutMs > 0) out.timeoutMs = Math.floor(r.timeoutMs);
460
- if (r.validation && typeof r.validation === "object") {
461
- const validation = r.validation;
462
- const workflow = typeof validation.workflow === "string" ? validation.workflow.trim() : "";
463
- if (workflow) {
464
- const inputs = validation.inputs && typeof validation.inputs === "object" ? Object.fromEntries(
465
- Object.entries(
466
- validation.inputs
467
- ).filter(
468
- (entry) => /^[a-z][a-z0-9_]*$/.test(entry[0]) && (typeof entry[1] === "string" || typeof entry[1] === "number" || typeof entry[1] === "boolean")
469
- )
470
- ) : void 0;
471
- out.validation = {
472
- workflow,
473
- ...inputs && Object.keys(inputs).length > 0 ? { inputs } : {}
474
- };
474
+ if (typeof r.productionDeployRequired === "boolean")
475
+ out.productionDeployRequired = r.productionDeployRequired;
476
+ out.validation = parseReleaseWorkflowRequest(r.validation, "validation");
477
+ out.deployment = parseReleaseWorkflowRequest(
478
+ r.deployment,
479
+ "deployment",
480
+ true
481
+ );
482
+ return Object.keys(out).length > 0 ? out : void 0;
483
+ }
484
+ function parseReleaseWorkflowRequest(raw, field, requiredWhenConfigured = false) {
485
+ if (raw === void 0) return void 0;
486
+ const request = recordValue(raw);
487
+ const workflow = typeof request?.workflow === "string" ? request.workflow.trim() : "";
488
+ if (!workflow) {
489
+ if (requiredWhenConfigured) {
490
+ throw new Error(`kody.config.json: release.${field}.workflow is required`);
475
491
  }
492
+ return void 0;
476
493
  }
477
- return Object.keys(out).length > 0 ? out : void 0;
494
+ const rawInputs = recordValue(request?.inputs);
495
+ const inputs = rawInputs ? Object.fromEntries(
496
+ Object.entries(rawInputs).filter(
497
+ (entry) => /^[a-z][a-z0-9_]*$/.test(entry[0]) && (typeof entry[1] === "string" || typeof entry[1] === "number" || typeof entry[1] === "boolean")
498
+ )
499
+ ) : void 0;
500
+ return {
501
+ workflow,
502
+ ...inputs && Object.keys(inputs).length > 0 ? { inputs } : {}
503
+ };
478
504
  }
479
505
  function parseIssueContext(raw) {
480
506
  if (!raw || typeof raw !== "object") return void 0;
File without changes
@@ -140,6 +140,21 @@
140
140
  "type": "object",
141
141
  "additionalProperties": false,
142
142
  "properties": {
143
+ "version": {
144
+ "type": "object",
145
+ "additionalProperties": false,
146
+ "required": ["readCommand", "writeCommand", "files"],
147
+ "properties": {
148
+ "readCommand": { "type": "string", "minLength": 1 },
149
+ "writeCommand": { "type": "string", "minLength": 1 },
150
+ "files": {
151
+ "type": "array",
152
+ "minItems": 1,
153
+ "uniqueItems": true,
154
+ "items": { "type": "string", "minLength": 1 }
155
+ }
156
+ }
157
+ },
143
158
  "versionFiles": {
144
159
  "type": "array",
145
160
  "items": { "type": "string" }
@@ -147,6 +162,9 @@
147
162
  "publishCommand": { "type": "string" },
148
163
  "notifyCommand": { "type": "string" },
149
164
  "e2eCommand": { "type": "string" },
165
+ "productionUrl": { "type": "string" },
166
+ "smokeCommand": { "type": "string" },
167
+ "productionDeployRequired": { "type": "boolean" },
150
168
  "draftRelease": { "type": "boolean" },
151
169
  "releaseBranch": { "type": "string" },
152
170
  "allowAdminMerge": { "type": "boolean" },
@@ -170,6 +188,26 @@
170
188
  }
171
189
  }
172
190
  },
191
+ "deployment": {
192
+ "type": "object",
193
+ "additionalProperties": false,
194
+ "required": ["workflow"],
195
+ "properties": {
196
+ "workflow": {
197
+ "type": "string",
198
+ "minLength": 1
199
+ },
200
+ "inputs": {
201
+ "type": "object",
202
+ "propertyNames": {
203
+ "pattern": "^[a-z][a-z0-9_]*$"
204
+ },
205
+ "additionalProperties": {
206
+ "type": ["string", "number", "boolean"]
207
+ }
208
+ }
209
+ }
210
+ },
173
211
  "timeoutMs": {
174
212
  "type": "integer",
175
213
  "minimum": 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.478",
3
+ "version": "0.4.479",
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",
@@ -12,29 +12,6 @@
12
12
  "templates",
13
13
  "kody.config.schema.json"
14
14
  ],
15
- "scripts": {
16
- "kody:run": "tsx bin/kody.ts",
17
- "serve": "tsx bin/kody.ts serve",
18
- "serve:vscode": "tsx bin/kody.ts serve vscode",
19
- "serve:claude": "tsx bin/kody.ts serve claude",
20
- "clean:dist": "node scripts/clean-dist.cjs",
21
- "build": "pnpm clean:dist && tsup && node scripts/copy-assets.cjs",
22
- "check:modularity": "tsx scripts/check-script-modularity.ts",
23
- "pretest": "pnpm check:modularity",
24
- "test": "vitest run tests/unit tests/int --coverage",
25
- "posttest": "tsx scripts/check-coverage-floor.ts",
26
- "test:smoke": "vitest run tests/smoke --no-coverage",
27
- "test:e2e": "vitest run tests/e2e --no-coverage",
28
- "test:runtime-services": "node --test \"tests/runtime-services/*.test.mjs\"",
29
- "test:all": "vitest run tests --no-coverage",
30
- "typecheck": "tsc --noEmit",
31
- "lint": "biome check",
32
- "lint:fix": "biome check --write",
33
- "format": "biome format --write",
34
- "verify:package": "node scripts/verify-package-tarball.cjs",
35
- "brain:publish": "docker buildx build --platform linux/amd64 -f runner/Dockerfile.brain --build-arg KODY_ENGINE_REF=$(git rev-parse HEAD) -t ghcr.io/${KODY_BRAIN_GHCR_OWNER:-aharonyaircohen}/kody-brain:latest --push runner",
36
- "prepublishOnly": "pnpm typecheck && vitest run tests/unit tests/int --no-coverage && pnpm test:runtime-services && pnpm build && pnpm verify:package"
37
- },
38
15
  "dependencies": {
39
16
  "@actions/cache": "^6.0.0",
40
17
  "@anthropic-ai/claude-agent-sdk": "0.2.119",
@@ -61,5 +38,27 @@
61
38
  "url": "git+https://github.com/aharonyaircohen/kody-engine.git"
62
39
  },
63
40
  "homepage": "https://github.com/aharonyaircohen/kody-engine",
64
- "bugs": "https://github.com/aharonyaircohen/kody-engine/issues"
65
- }
41
+ "bugs": "https://github.com/aharonyaircohen/kody-engine/issues",
42
+ "scripts": {
43
+ "kody:run": "tsx bin/kody.ts",
44
+ "serve": "tsx bin/kody.ts serve",
45
+ "serve:vscode": "tsx bin/kody.ts serve vscode",
46
+ "serve:claude": "tsx bin/kody.ts serve claude",
47
+ "clean:dist": "node scripts/clean-dist.cjs",
48
+ "build": "pnpm clean:dist && tsup && node scripts/copy-assets.cjs",
49
+ "check:modularity": "tsx scripts/check-script-modularity.ts",
50
+ "pretest": "pnpm check:modularity",
51
+ "test": "vitest run tests/unit tests/int --coverage",
52
+ "posttest": "tsx scripts/check-coverage-floor.ts",
53
+ "test:smoke": "vitest run tests/smoke --no-coverage",
54
+ "test:e2e": "vitest run tests/e2e --no-coverage",
55
+ "test:runtime-services": "node --test \"tests/runtime-services/*.test.mjs\"",
56
+ "test:all": "vitest run tests --no-coverage",
57
+ "typecheck": "tsc --noEmit",
58
+ "lint": "biome check",
59
+ "lint:fix": "biome check --write",
60
+ "format": "biome format --write",
61
+ "verify:package": "node scripts/verify-package-tarball.cjs",
62
+ "brain:publish": "docker buildx build --platform linux/amd64 -f runner/Dockerfile.brain --build-arg KODY_ENGINE_REF=$(git rev-parse HEAD) -t ghcr.io/${KODY_BRAIN_GHCR_OWNER:-aharonyaircohen}/kody-brain:latest --push runner"
63
+ }
64
+ }