@kody-ade/kody-engine 0.4.482 → 0.4.483

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 +24 -2
  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.482",
18
+ version: "0.4.483",
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",
@@ -15566,6 +15566,25 @@ var init_loadQaContext = __esm({
15566
15566
  // src/scripts/loadSimpleCapability.ts
15567
15567
  import * as fs43 from "fs";
15568
15568
  import * as path40 from "path";
15569
+ function registerCapabilitySubagents(profile, toolRoot, toolFiles) {
15570
+ const subagentFiles = toolFiles.flatMap((file) => {
15571
+ const match = /^agents\/([a-z][a-z0-9-]{0,63})\.md$/.exec(file);
15572
+ return match ? [{ name: match[1], file }] : [];
15573
+ });
15574
+ if (subagentFiles.length === 0) return;
15575
+ profile.claudeCode.subagents = [
15576
+ .../* @__PURE__ */ new Set([...profile.claudeCode.subagents, ...subagentFiles.map(({ name }) => name)])
15577
+ ];
15578
+ profile.subagentTemplates = {
15579
+ ...profile.subagentTemplates ?? {},
15580
+ ...Object.fromEntries(
15581
+ subagentFiles.map(({ name, file }) => [name, fs43.readFileSync(path40.join(toolRoot, file), "utf-8")])
15582
+ )
15583
+ };
15584
+ if (!profile.claudeCode.tools.includes("Agent")) {
15585
+ profile.claudeCode.tools = [...profile.claudeCode.tools, "Agent"];
15586
+ }
15587
+ }
15569
15588
  function parseInput(supplied) {
15570
15589
  if (typeof supplied !== "string") return supplied;
15571
15590
  try {
@@ -15621,7 +15640,7 @@ var init_loadSimpleCapability = __esm({
15621
15640
  init_capabilityFolders();
15622
15641
  init_definition_paths();
15623
15642
  init_capabilityExecutionEnvironment();
15624
- loadSimpleCapability = async (ctx) => {
15643
+ loadSimpleCapability = async (ctx, profile) => {
15625
15644
  const slug = typeof ctx.args.capability === "string" ? ctx.args.capability.trim() : "";
15626
15645
  if (!/^[a-z][a-z0-9-]*$/.test(slug)) {
15627
15646
  throw new Error("capability-run requires a valid capability slug");
@@ -15641,6 +15660,9 @@ var init_loadSimpleCapability = __esm({
15641
15660
  ctx.data.jobCapability = slug;
15642
15661
  ctx.data.capabilityInput = input;
15643
15662
  ctx.data.capabilityExecution = capability.contract?.execution ?? "agent";
15663
+ if (ctx.data.capabilityExecution === "agent") {
15664
+ registerCapabilitySubagents(profile, toolRoot, toolFiles);
15665
+ }
15644
15666
  if (capability.contract?.execution === "script") {
15645
15667
  ctx.data.capabilityScriptPath = path40.join(capability.dir, "tools", "run.sh");
15646
15668
  ctx.data.capabilitySecretNames = capability.contract.secrets ?? [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.482",
3
+ "version": "0.4.483",
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",