@kody-ade/kody-engine 0.4.642 → 0.4.643

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 +13 -6
  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.642",
18
+ version: "0.4.643",
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
  repository: {
@@ -4108,7 +4108,7 @@ function capabilityToolDefinitions(opts) {
4108
4108
  description: "Idempotently create, update, close, or reopen one canonical repository Todo for a recurring problem. The Todo family is derived from reportSlug and the stable item id prevents duplicates. Repeating the same state is a no-op; unrelated items in an existing Todo are preserved.",
4109
4109
  inputSchema: {
4110
4110
  slug: z3.string().regex(/^[a-z0-9][a-z0-9_-]{0,63}$/).optional().describe("Deprecated; the canonical Todo slug is reportSlug."),
4111
- itemId: z3.string().regex(/^[a-z0-9][a-z0-9_-]{0,79}$/).optional(),
4111
+ itemId: z3.string().regex(/^[a-z0-9][a-z0-9_-]{0,79}$/),
4112
4112
  title: z3.string().min(1).max(160),
4113
4113
  description: z3.string().max(2e4).optional(),
4114
4114
  status: z3.enum(["open", "resolved"]),
@@ -4119,7 +4119,7 @@ function capabilityToolDefinitions(opts) {
4119
4119
  handler: async (args) => {
4120
4120
  const reportSlug = String(args.reportSlug);
4121
4121
  const slug = reportSlug;
4122
- const itemId = typeof args.itemId === "string" ? args.itemId : "finding";
4122
+ const itemId = String(args.itemId);
4123
4123
  const title = String(args.title).trim();
4124
4124
  const description = typeof args.description === "string" ? args.description.trim() : "";
4125
4125
  const status = args.status === "resolved" ? "resolved" : "open";
@@ -4136,10 +4136,17 @@ function capabilityToolDefinitions(opts) {
4136
4136
  const currentItems = Array.isArray(current.items) ? current.items.filter(
4137
4137
  (item) => Boolean(item && typeof item === "object" && !Array.isArray(item))
4138
4138
  ) : [];
4139
- const previous = currentItems.find((item) => item.id === itemId);
4139
+ const isLegacyFallbackForReport = (item) => {
4140
+ if (itemId === "finding" || item.id !== "finding") return false;
4141
+ const meta = item.meta && typeof item.meta === "object" && !Array.isArray(item.meta) ? item.meta : {};
4142
+ return meta.reportSlug === reportSlug;
4143
+ };
4144
+ const removedLegacyFallback = currentItems.some(isLegacyFallbackForReport);
4145
+ const canonicalItems = currentItems.filter((item) => !isLegacyFallbackForReport(item));
4146
+ const previous = canonicalItems.find((item) => item.id === itemId);
4140
4147
  const previousMeta = previous?.meta && typeof previous.meta === "object" && !Array.isArray(previous.meta) ? previous.meta : {};
4141
4148
  const unchanged = Boolean(
4142
- previous && previous.completed === completed && previous.title === title && String(previous.body ?? "") === evidence && previousMeta.reportSlug === reportSlug
4149
+ previous && !removedLegacyFallback && previous.completed === completed && previous.title === title && String(previous.body ?? "") === evidence && previousMeta.reportSlug === reportSlug
4143
4150
  );
4144
4151
  if (unchanged) {
4145
4152
  return {
@@ -4162,7 +4169,7 @@ function capabilityToolDefinitions(opts) {
4162
4169
  status
4163
4170
  }
4164
4171
  };
4165
- const items = previous ? currentItems.map((item) => item.id === itemId ? nextItem : item) : [...currentItems, nextItem];
4172
+ const items = previous ? canonicalItems.map((item) => item.id === itemId ? nextItem : item) : [...canonicalItems, nextItem];
4166
4173
  const doc = {
4167
4174
  ...current,
4168
4175
  version: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.642",
3
+ "version": "0.4.643",
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
  "repository": {