@kody-ade/kody-engine 0.4.35 → 0.4.37

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 +27 -6
  2. package/package.json +1 -1
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.35",
6
+ version: "0.4.37",
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",
@@ -1101,6 +1101,18 @@ function parseGenericFlags(argv) {
1101
1101
  }
1102
1102
 
1103
1103
  // src/dispatch.ts
1104
+ var POLITE_WORDS = /* @__PURE__ */ new Set([
1105
+ "please",
1106
+ "kindly",
1107
+ "hi",
1108
+ "hey",
1109
+ "hello",
1110
+ "thanks",
1111
+ "thank",
1112
+ "plz",
1113
+ "pls",
1114
+ "yo"
1115
+ ]);
1104
1116
  function autoDispatch(opts) {
1105
1117
  const explicit = opts?.explicit;
1106
1118
  if (explicit?.issueNumber && explicit.issueNumber > 0) {
@@ -1135,7 +1147,8 @@ function autoDispatch(opts) {
1135
1147
  const isPr = !!event.issue?.pull_request;
1136
1148
  if (!targetNum) return null;
1137
1149
  const afterTag = extractAfterTag(body);
1138
- const firstToken = extractSubcommand(afterTag);
1150
+ const firstTokenRaw = extractSubcommand(afterTag);
1151
+ const firstToken = firstTokenRaw && POLITE_WORDS.has(firstTokenRaw) ? null : firstTokenRaw;
1139
1152
  const aliases = opts?.config?.aliases ?? BUILTIN_ALIASES;
1140
1153
  const aliased = firstToken ? aliases[firstToken] ?? firstToken : null;
1141
1154
  let executable = null;
@@ -1151,7 +1164,7 @@ function autoDispatch(opts) {
1151
1164
  );
1152
1165
  }
1153
1166
  }
1154
- if (!executable) {
1167
+ if (!executable && !firstToken) {
1155
1168
  executable = isPr ? opts?.config?.defaultPrExecutable ?? "fix" : opts?.config?.defaultExecutable ?? null;
1156
1169
  }
1157
1170
  if (!executable) {
@@ -1210,9 +1223,12 @@ function autoDispatchTyped(opts) {
1210
1223
  return { kind: "silent", reason: "comment has no associated issue/PR number" };
1211
1224
  }
1212
1225
  const afterTag = extractAfterTag(rawBody.toLowerCase());
1213
- const token = extractSubcommand(afterTag) ?? "";
1226
+ const tokenRaw = extractSubcommand(afterTag) ?? "";
1227
+ if (!tokenRaw || POLITE_WORDS.has(tokenRaw)) {
1228
+ return { kind: "silent", reason: tokenRaw ? `polite-word lead-in '${tokenRaw}', no default executable configured` : "no subcommand token, no default executable configured" };
1229
+ }
1214
1230
  const available = listExecutables().map((e) => e.name).filter((n) => !n.startsWith("goal-") && !n.startsWith("job-")).sort();
1215
- return { kind: "unrecognized", token, target: targetNum, isPr, available };
1231
+ return { kind: "unrecognized", token: tokenRaw, target: targetNum, isPr, available };
1216
1232
  }
1217
1233
  function dispatchScheduledWatches(opts) {
1218
1234
  const now = opts?.now ?? /* @__PURE__ */ new Date();
@@ -10138,6 +10154,11 @@ async function runCi(argv) {
10138
10154
  if (!args.issueNumber && !autoFallback && process.env.GITHUB_EVENT_NAME) {
10139
10155
  const outcome = autoDispatchTyped({ config: earlyConfig });
10140
10156
  if (outcome.kind === "unrecognized") {
10157
+ try {
10158
+ unpackAllSecrets();
10159
+ resolveAuthToken();
10160
+ } catch {
10161
+ }
10141
10162
  const tokenLabel = outcome.token ? `\`${outcome.token}\`` : "an empty subcommand";
10142
10163
  const top = outcome.available.slice(0, 12).join(", ");
10143
10164
  const more = outcome.available.length > 12 ? `, \u2026 (${outcome.available.length - 12} more)` : "";
@@ -10156,7 +10177,7 @@ async function runCi(argv) {
10156
10177
  `);
10157
10178
  }
10158
10179
  process.stdout.write(
10159
- `\u2192 kody: unrecognized subcommand "${outcome.token}" on #${outcome.target} \u2014 feedback comment posted, exiting cleanly
10180
+ `\u2192 kody: unrecognized subcommand "${outcome.token}" on #${outcome.target} \u2014 feedback comment attempt finished, exiting cleanly
10160
10181
  `
10161
10182
  );
10162
10183
  return 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.35",
3
+ "version": "0.4.37",
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",