@kody-ade/kody-engine 0.4.641 → 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.
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.
|
|
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: {
|
|
@@ -3589,6 +3589,7 @@ __export(capabilityMcp_exports, {
|
|
|
3589
3589
|
parseCapabilityTrustMode: () => parseCapabilityTrustMode,
|
|
3590
3590
|
readCheckRuns: () => readCheckRuns,
|
|
3591
3591
|
readThread: () => readThread,
|
|
3592
|
+
readWorkflowRun: () => readWorkflowRun,
|
|
3592
3593
|
selectCapabilityToolDefinitions: () => selectCapabilityToolDefinitions,
|
|
3593
3594
|
startCapability: () => startCapability
|
|
3594
3595
|
});
|
|
@@ -3859,6 +3860,12 @@ function startCapability(workflowFile, name, issue2, repoSlug, ref) {
|
|
|
3859
3860
|
const forwardedIssue = acceptsIssue === false ? void 0 : issue2;
|
|
3860
3861
|
return dispatchWorkflow(workflowFile, name, forwardedIssue, repoSlug, ref);
|
|
3861
3862
|
}
|
|
3863
|
+
function readWorkflowRun(repoSlug, runId) {
|
|
3864
|
+
const run = JSON.parse(
|
|
3865
|
+
gh(["run", "view", String(runId), "--repo", repoSlug, "--json", "status,conclusion,url,createdAt,updatedAt"])
|
|
3866
|
+
);
|
|
3867
|
+
return { runId, ...run };
|
|
3868
|
+
}
|
|
3862
3869
|
function capabilityAcceptsIssue(capability) {
|
|
3863
3870
|
const route = resolveCapabilityAction(capability);
|
|
3864
3871
|
if (!route) return null;
|
|
@@ -4051,6 +4058,17 @@ function capabilityToolDefinitions(opts) {
|
|
|
4051
4058
|
return { content: [{ type: "text", text: text2 }] };
|
|
4052
4059
|
}
|
|
4053
4060
|
};
|
|
4061
|
+
const readWorkflowRunTool = {
|
|
4062
|
+
name: "read_workflow_run",
|
|
4063
|
+
description: "Read the current status and conclusion of an asynchronously started GitHub Actions workflow run.",
|
|
4064
|
+
inputSchema: {
|
|
4065
|
+
runId: z3.number().int().positive()
|
|
4066
|
+
},
|
|
4067
|
+
handler: async (args) => {
|
|
4068
|
+
const result = readWorkflowRun(opts.repoSlug, Number(args.runId));
|
|
4069
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
4070
|
+
}
|
|
4071
|
+
};
|
|
4054
4072
|
const readLatestReportTool = {
|
|
4055
4073
|
name: "read_latest_report",
|
|
4056
4074
|
description: "Read the newest persisted Kody Report for this repository. Optionally restrict to one stable report slug or reports newer than an ISO timestamp. Returns the Report body and metadata; use it as evidence before deciding whether work is needed.",
|
|
@@ -4087,10 +4105,10 @@ function capabilityToolDefinitions(opts) {
|
|
|
4087
4105
|
};
|
|
4088
4106
|
const reconcileTodoTool = {
|
|
4089
4107
|
name: "reconcile_todo",
|
|
4090
|
-
description: "Idempotently create, update, close, or reopen one canonical repository Todo for a recurring problem. The
|
|
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.",
|
|
4091
4109
|
inputSchema: {
|
|
4092
|
-
slug: z3.string().regex(/^[a-z0-9][a-z0-9_-]{0,63}$/),
|
|
4093
|
-
itemId: z3.string().regex(/^[a-z0-9][a-z0-9_-]{0,79}$/)
|
|
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}$/),
|
|
4094
4112
|
title: z3.string().min(1).max(160),
|
|
4095
4113
|
description: z3.string().max(2e4).optional(),
|
|
4096
4114
|
status: z3.enum(["open", "resolved"]),
|
|
@@ -4099,12 +4117,12 @@ function capabilityToolDefinitions(opts) {
|
|
|
4099
4117
|
evidence: z3.string().max(2e4).optional()
|
|
4100
4118
|
},
|
|
4101
4119
|
handler: async (args) => {
|
|
4102
|
-
const
|
|
4103
|
-
const
|
|
4120
|
+
const reportSlug = String(args.reportSlug);
|
|
4121
|
+
const slug = reportSlug;
|
|
4122
|
+
const itemId = String(args.itemId);
|
|
4104
4123
|
const title = String(args.title).trim();
|
|
4105
4124
|
const description = typeof args.description === "string" ? args.description.trim() : "";
|
|
4106
4125
|
const status = args.status === "resolved" ? "resolved" : "open";
|
|
4107
|
-
const reportSlug = String(args.reportSlug);
|
|
4108
4126
|
const reportRunId = typeof args.reportRunId === "string" ? args.reportRunId : void 0;
|
|
4109
4127
|
const evidence = typeof args.evidence === "string" ? args.evidence.trim() : "";
|
|
4110
4128
|
const backend = createStateBackendFromEnv();
|
|
@@ -4118,10 +4136,17 @@ function capabilityToolDefinitions(opts) {
|
|
|
4118
4136
|
const currentItems = Array.isArray(current.items) ? current.items.filter(
|
|
4119
4137
|
(item) => Boolean(item && typeof item === "object" && !Array.isArray(item))
|
|
4120
4138
|
) : [];
|
|
4121
|
-
const
|
|
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);
|
|
4122
4147
|
const previousMeta = previous?.meta && typeof previous.meta === "object" && !Array.isArray(previous.meta) ? previous.meta : {};
|
|
4123
4148
|
const unchanged = Boolean(
|
|
4124
|
-
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
|
|
4125
4150
|
);
|
|
4126
4151
|
if (unchanged) {
|
|
4127
4152
|
return {
|
|
@@ -4144,7 +4169,7 @@ function capabilityToolDefinitions(opts) {
|
|
|
4144
4169
|
status
|
|
4145
4170
|
}
|
|
4146
4171
|
};
|
|
4147
|
-
const items = previous ?
|
|
4172
|
+
const items = previous ? canonicalItems.map((item) => item.id === itemId ? nextItem : item) : [...canonicalItems, nextItem];
|
|
4148
4173
|
const doc = {
|
|
4149
4174
|
...current,
|
|
4150
4175
|
version: 1,
|
|
@@ -4191,6 +4216,7 @@ function capabilityToolDefinitions(opts) {
|
|
|
4191
4216
|
ensureIssueTool,
|
|
4192
4217
|
ensureCommentTool,
|
|
4193
4218
|
startCapabilityTool,
|
|
4219
|
+
readWorkflowRunTool,
|
|
4194
4220
|
readLatestReportTool,
|
|
4195
4221
|
reconcileTodoTool,
|
|
4196
4222
|
...cmsTools
|
|
@@ -4241,6 +4267,7 @@ var init_capabilityMcp = __esm({
|
|
|
4241
4267
|
"ensure_issue",
|
|
4242
4268
|
"ensure_comment",
|
|
4243
4269
|
"start_capability",
|
|
4270
|
+
"read_workflow_run",
|
|
4244
4271
|
"read_latest_report",
|
|
4245
4272
|
"reconcile_todo",
|
|
4246
4273
|
...DASHBOARD_CMS_MCP_TOOL_NAMES
|
|
@@ -16910,7 +16937,7 @@ var init_loadLiveAgent = __esm({
|
|
|
16910
16937
|
}
|
|
16911
16938
|
};
|
|
16912
16939
|
ctx.data.jobStateJson = JSON.stringify(state, null, 2);
|
|
16913
|
-
ctx.data.capabilityTools = ["start_capability", "read_latest_report", "reconcile_todo"];
|
|
16940
|
+
ctx.data.capabilityTools = ["start_capability", "read_workflow_run", "read_latest_report", "reconcile_todo"];
|
|
16914
16941
|
ctx.data.capabilityToolMode = "lock";
|
|
16915
16942
|
profile.claudeCode.enableSubmitTool = true;
|
|
16916
16943
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.4.
|
|
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": {
|