@kody-ade/kody-engine 0.4.46 → 0.4.47

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
@@ -3,7 +3,7 @@
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "@kody-ade/kody-engine",
6
- version: "0.4.46",
6
+ version: "0.4.47",
7
7
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
8
8
  license: "MIT",
9
9
  type: "module",
@@ -401,7 +401,7 @@ function classifySubtype(subtype) {
401
401
  return "generic_failed";
402
402
  }
403
403
  var DEFAULT_ALLOWED_TOOLS = ["Bash", "Edit", "Read", "Write", "Glob", "Grep"];
404
- var DEFAULT_TURN_TIMEOUT_MS = 3e5;
404
+ var DEFAULT_TURN_TIMEOUT_MS = 6e5;
405
405
  function resolveTurnTimeoutMs(opts) {
406
406
  if (opts.maxTurnTimeoutMs !== void 0 && opts.maxTurnTimeoutMs !== null) {
407
407
  return opts.maxTurnTimeoutMs > 0 ? opts.maxTurnTimeoutMs : 0;
@@ -1777,6 +1777,7 @@ function parseClaudeCode(p, raw) {
1777
1777
  permissionMode,
1778
1778
  maxTurns: typeof r.maxTurns === "number" ? r.maxTurns : null,
1779
1779
  maxThinkingTokens: typeof r.maxThinkingTokens === "number" ? r.maxThinkingTokens : null,
1780
+ maxTurnTimeoutSec: typeof r.maxTurnTimeoutSec === "number" ? r.maxTurnTimeoutSec : null,
1780
1781
  systemPromptAppend: typeof r.systemPromptAppend === "string" ? r.systemPromptAppend : null,
1781
1782
  tools,
1782
1783
  hooks: Array.isArray(r.hooks) ? r.hooks : [],
@@ -5446,11 +5447,11 @@ var STATUS_ICON = {
5446
5447
  "review-failed": "\u26A0\uFE0F",
5447
5448
  aborted: "\u26A0\uFE0F"
5448
5449
  };
5449
- var finishFlow = async (ctx, _profile, _agentResult, args) => {
5450
+ var finishFlow = async (ctx, profile, _agentResult, args) => {
5450
5451
  const reason = args?.reason ?? "completed";
5451
5452
  const issueNumber = ctx.args.issue;
5452
5453
  const state = ctx.data.taskState;
5453
- const flowName = state?.flow?.name ?? "(unknown flow)";
5454
+ const flowName = state?.flow?.name || profile.name || "(unknown flow)";
5454
5455
  if (state) state.flow = void 0;
5455
5456
  if (!issueNumber) return;
5456
5457
  const label = typeof args?.label === "string" ? args.label : void 0;
@@ -9205,6 +9206,7 @@ async function runExecutable(profileName, input) {
9205
9206
  pluginPaths: pluginPaths.length > 0 ? pluginPaths : void 0,
9206
9207
  maxTurns: profile.claudeCode.maxTurns,
9207
9208
  maxThinkingTokens: profile.claudeCode.maxThinkingTokens,
9209
+ maxTurnTimeoutMs: typeof profile.claudeCode.maxTurnTimeoutSec === "number" ? Math.floor(profile.claudeCode.maxTurnTimeoutSec * 1e3) : void 0,
9208
9210
  systemPromptAppend: profile.claudeCode.systemPromptAppend,
9209
9211
  settingSources: profile.claudeCode.settingSources
9210
9212
  });
@@ -9347,6 +9349,15 @@ function clearStampedLifecycleLabels(profile, ctx) {
9347
9349
  }
9348
9350
  }
9349
9351
  }
9352
+ function getProfileInputsForChild(profileName, _cwd) {
9353
+ try {
9354
+ const profilePath = resolveProfilePath(profileName);
9355
+ if (!fs29.existsSync(profilePath)) return null;
9356
+ return loadProfile(profilePath).inputs;
9357
+ } catch {
9358
+ return null;
9359
+ }
9360
+ }
9350
9361
  function resolveProfilePath(profileName) {
9351
9362
  const found = resolveExecutable(profileName);
9352
9363
  if (found) return found;
@@ -9632,6 +9643,16 @@ async function runContainerLoop(profile, ctx, input) {
9632
9643
  }
9633
9644
  cliArgs = { issue: issueNumber };
9634
9645
  }
9646
+ const childInputs = getProfileInputsForChild(child.exec, input.cwd);
9647
+ if (childInputs) {
9648
+ for (const spec of childInputs) {
9649
+ if (spec.name === "issue" || spec.name === "pr") continue;
9650
+ const parentValue = ctx.args[spec.name];
9651
+ if (parentValue !== void 0 && cliArgs[spec.name] === void 0) {
9652
+ cliArgs[spec.name] = parentValue;
9653
+ }
9654
+ }
9655
+ }
9635
9656
  let childOut;
9636
9657
  const childStartedAt = Date.now();
9637
9658
  try {
@@ -23,6 +23,7 @@
23
23
  "model": "inherit",
24
24
  "permissionMode": "acceptEdits",
25
25
  "maxTurns": null,
26
+ "maxTurnTimeoutSec": 1200,
26
27
  "systemPromptAppend": null,
27
28
  "tools": [
28
29
  "Read",
@@ -22,6 +22,7 @@
22
22
  "model": "inherit",
23
23
  "permissionMode": "acceptEdits",
24
24
  "maxTurns": null,
25
+ "maxTurnTimeoutSec": 1200,
25
26
  "systemPromptAppend": null,
26
27
  "tools": [
27
28
  "Read",
@@ -15,6 +15,7 @@
15
15
  "model": "inherit",
16
16
  "permissionMode": "acceptEdits",
17
17
  "maxTurns": null,
18
+ "maxTurnTimeoutSec": 900,
18
19
  "systemPromptAppend": null,
19
20
  "tools": [
20
21
  "Read",
@@ -15,13 +15,14 @@
15
15
  "flag": "--base",
16
16
  "type": "string",
17
17
  "required": false,
18
- "describe": "Optional base branch override. Must match /^goal-[a-z0-9-]+$/; used by goal-tick so the feature branch forks from the shared goal branch and the PR targets it."
18
+ "describe": "Optional base branch override. Used by goal-tick's stacked-PR dispatch so each task PR forks from the previous task's head ref. Accepts any safe git ref (see resolveBaseOverride in runFlow.ts)."
19
19
  }
20
20
  ],
21
21
  "claudeCode": {
22
22
  "model": "inherit",
23
23
  "permissionMode": "acceptEdits",
24
24
  "maxTurns": null,
25
+ "maxTurnTimeoutSec": 1200,
25
26
  "systemPromptAppend": null,
26
27
  "tools": [
27
28
  "Read",
@@ -153,6 +153,14 @@ export interface ClaudeCodeSpec {
153
153
  maxTurns: number | null
154
154
  /** Extended-thinking token budget. null = SDK default. */
155
155
  maxThinkingTokens: number | null
156
+ /**
157
+ * Watchdog: abort the agent if no SDK message arrives within this many
158
+ * seconds. Per-profile override for the global 600s default. Useful on
159
+ * `run`/`fix` stages where a long test suite can leave the SDK silent
160
+ * longer than the default. Set to 0 or a negative number to disable
161
+ * the watchdog entirely. null/undefined → use the global default.
162
+ */
163
+ maxTurnTimeoutSec?: number | null
156
164
  /** Text appended on top of Claude Code's baseline system prompt. */
157
165
  systemPromptAppend: string | null
158
166
  /** SDK built-in tools this executable is allowed to use (capability pack). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.46",
3
+ "version": "0.4.47",
4
4
  "description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
5
5
  "license": "MIT",
6
6
  "type": "module",