@kody-ade/kody-engine-lite 0.1.140 → 0.1.142
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/README.md +5 -3
- package/dist/bin/cli.js +30 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -125,8 +125,8 @@ Kody auto-starts the LiteLLM proxy. [Full LiteLLM guide →](docs/LITELLM.md)
|
|
|
125
125
|
| `@kody bootstrap` | Regenerate project memory and step files |
|
|
126
126
|
|
|
127
127
|
```bash
|
|
128
|
-
kody-engine-lite init [--force] # Setup repo: workflow + config
|
|
129
|
-
kody-engine-lite bootstrap [--force] # Generate memory + step files + labels
|
|
128
|
+
kody-engine-lite init [--force] # Setup repo: workflow + config + watch
|
|
129
|
+
kody-engine-lite bootstrap [--force] # Generate memory + step files + labels + digest issue
|
|
130
130
|
kody-engine-lite run --issue-number 42 --local --cwd ./project
|
|
131
131
|
kody-engine-lite run --task "Add retry utility" --local
|
|
132
132
|
kody-engine-lite review --pr-number 42 # Standalone PR review
|
|
@@ -134,6 +134,7 @@ kody-engine-lite fix --issue-number 42 --feedback "Use middleware pattern"
|
|
|
134
134
|
kody-engine-lite fix-ci --pr-number 42
|
|
135
135
|
kody-engine-lite resolve --pr-number 42 # Merge + resolve conflicts
|
|
136
136
|
kody-engine-lite rerun --issue-number 42 --from verify
|
|
137
|
+
kody-engine-lite watch [--dry-run] # Run health monitoring locally
|
|
137
138
|
```
|
|
138
139
|
|
|
139
140
|
[Full CLI reference with all flags and options →](docs/CLI.md)
|
|
@@ -151,13 +152,14 @@ kody-engine-lite rerun --issue-number 42 --from verify
|
|
|
151
152
|
- **Decision Memory** — architectural decisions extracted from reviews persist across tasks ([details](docs/FEATURES.md#decision-memory))
|
|
152
153
|
- **Auto-Learning** — extracts coding conventions from each successful run ([details](docs/FEATURES.md#auto-learning-memory))
|
|
153
154
|
- **Retrospective** — analyzes each run, identifies patterns, suggests improvements ([details](docs/FEATURES.md#retrospective-system))
|
|
155
|
+
- **Kody Watch** — periodic health monitoring: pipeline health, security scanning, config validation every 30 min ([setup guide](docs/WATCH.md))
|
|
154
156
|
- **Anthropic-Compatible Models** — route through LiteLLM to use other providers like MiniMax, Gemini, etc. ([setup guide](docs/LITELLM.md) · [model test results](docs/model-compatibility.md))
|
|
155
157
|
|
|
156
158
|
## Documentation
|
|
157
159
|
|
|
158
160
|
**Understand Kody:** [About](docs/ABOUT.md) · [Architecture](docs/ARCHITECTURE.md) · [Tech Stack](docs/TECH-STACK.md) · [Features](docs/FEATURES.md) · [Pipeline](docs/PIPELINE.md) · [Comparison](docs/COMPARISON.md)
|
|
159
161
|
|
|
160
|
-
**Set up & use:** [CLI](docs/CLI.md) · [Configuration](docs/CONFIGURATION.md) · [Bootstrap](docs/BOOTSTRAP.md) · [Tools](docs/TOOLS.md) · [LiteLLM](docs/LITELLM.md)
|
|
162
|
+
**Set up & use:** [CLI](docs/CLI.md) · [Configuration](docs/CONFIGURATION.md) · [Bootstrap](docs/BOOTSTRAP.md) · [Tools](docs/TOOLS.md) · [Watch](docs/WATCH.md) · [LiteLLM](docs/LITELLM.md)
|
|
161
163
|
|
|
162
164
|
**Reference:** [FAQ](docs/FAQ.md) · [Model Compatibility](docs/model-compatibility.md)
|
|
163
165
|
|
package/dist/bin/cli.js
CHANGED
|
@@ -5198,8 +5198,23 @@ async function pollReady(url, timeoutSec) {
|
|
|
5198
5198
|
}
|
|
5199
5199
|
return false;
|
|
5200
5200
|
}
|
|
5201
|
+
async function waitForReady(url, timeoutSec, stdoutMatch) {
|
|
5202
|
+
const deadline = Date.now() + timeoutSec * 1e3;
|
|
5203
|
+
while (Date.now() < deadline) {
|
|
5204
|
+
if (stdoutMatch()) {
|
|
5205
|
+
logger.info(" Dev server stdout matched ready pattern");
|
|
5206
|
+
const httpTimeout = Math.min(15, Math.max(1, Math.floor((deadline - Date.now()) / 1e3)));
|
|
5207
|
+
return pollReady(url, httpTimeout);
|
|
5208
|
+
}
|
|
5209
|
+
await new Promise((r) => setTimeout(r, 500));
|
|
5210
|
+
}
|
|
5211
|
+
return false;
|
|
5212
|
+
}
|
|
5201
5213
|
async function startDevServer(opts) {
|
|
5202
|
-
const timeout = opts.readyTimeout ??
|
|
5214
|
+
const timeout = opts.readyTimeout ?? 60;
|
|
5215
|
+
const patternStr = opts.readyPattern ?? DEFAULT_READY_PATTERN;
|
|
5216
|
+
const pattern = new RegExp(patternStr, "i");
|
|
5217
|
+
const useStdoutDetection = Boolean(opts.readyPattern);
|
|
5203
5218
|
const [cmd, ...args2] = opts.command.split(/\s+/);
|
|
5204
5219
|
let child;
|
|
5205
5220
|
try {
|
|
@@ -5214,7 +5229,13 @@ async function startDevServer(opts) {
|
|
|
5214
5229
|
return { ready: false, url: opts.url, pid: void 0, stop: () => {
|
|
5215
5230
|
} };
|
|
5216
5231
|
}
|
|
5232
|
+
let stdout = "";
|
|
5217
5233
|
let stderr = "";
|
|
5234
|
+
let stdoutMatched = false;
|
|
5235
|
+
child.stdout?.on("data", (chunk) => {
|
|
5236
|
+
stdout += chunk.toString();
|
|
5237
|
+
if (!stdoutMatched && pattern.test(stdout)) stdoutMatched = true;
|
|
5238
|
+
});
|
|
5218
5239
|
child.stderr?.on("data", (chunk) => {
|
|
5219
5240
|
stderr += chunk.toString();
|
|
5220
5241
|
});
|
|
@@ -5223,13 +5244,16 @@ async function startDevServer(opts) {
|
|
|
5223
5244
|
exited = true;
|
|
5224
5245
|
});
|
|
5225
5246
|
child.unref();
|
|
5226
|
-
const ready = await pollReady(opts.url, timeout);
|
|
5247
|
+
const ready = useStdoutDetection ? await waitForReady(opts.url, timeout, () => stdoutMatched) : await pollReady(opts.url, timeout);
|
|
5227
5248
|
if (!ready) {
|
|
5228
5249
|
if (exited) {
|
|
5229
5250
|
logger.warn(` Dev server exited before becoming ready`);
|
|
5230
5251
|
} else {
|
|
5231
5252
|
logger.warn(` Dev server did not respond within ${timeout}s at ${opts.url}`);
|
|
5232
5253
|
}
|
|
5254
|
+
if (stdout) {
|
|
5255
|
+
logger.warn(` Dev server stdout (last 500 chars): ${stdout.slice(-500)}`);
|
|
5256
|
+
}
|
|
5233
5257
|
if (stderr) {
|
|
5234
5258
|
logger.warn(` Dev server stderr (last 500 chars): ${stderr.slice(-500)}`);
|
|
5235
5259
|
}
|
|
@@ -5247,10 +5271,12 @@ async function startDevServer(opts) {
|
|
|
5247
5271
|
};
|
|
5248
5272
|
return { ready, url: opts.url, pid, stop };
|
|
5249
5273
|
}
|
|
5274
|
+
var DEFAULT_READY_PATTERN;
|
|
5250
5275
|
var init_dev_server = __esm({
|
|
5251
5276
|
"src/dev-server.ts"() {
|
|
5252
5277
|
"use strict";
|
|
5253
5278
|
init_logger();
|
|
5279
|
+
DEFAULT_READY_PATTERN = "Ready in|compiled|started server|Local:|localhost:";
|
|
5254
5280
|
}
|
|
5255
5281
|
});
|
|
5256
5282
|
|
|
@@ -5322,7 +5348,8 @@ async function executeAgentStage(ctx, def) {
|
|
|
5322
5348
|
devServerHandle = await startDevServer({
|
|
5323
5349
|
command: ds.command,
|
|
5324
5350
|
url: ds.url,
|
|
5325
|
-
readyTimeout: ds.readyTimeout ??
|
|
5351
|
+
readyTimeout: ds.readyTimeout ?? 60,
|
|
5352
|
+
readyPattern: ds.readyPattern ?? "Ready in|compiled|started server|Local:|localhost:",
|
|
5326
5353
|
envVars
|
|
5327
5354
|
});
|
|
5328
5355
|
if (devServerHandle.ready) {
|