klyro 1.0.16 → 1.0.18
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/agent/anthropic-adapter.js +26 -1
- package/dist/agent/provider-adapter.d.ts +7 -0
- package/dist/agent/provider-adapter.js +26 -1
- package/dist/agent/runtime.d.ts +14 -0
- package/dist/agent/runtime.js +59 -22
- package/dist/chat.js +16 -56
- package/dist/checkpoints/store.d.ts +15 -1
- package/dist/checkpoints/store.js +7 -2
- package/dist/cli/args.d.ts +7 -0
- package/dist/cli/args.js +10 -0
- package/dist/cli/completion.js +0 -3
- package/dist/cli/doctor.d.ts +13 -0
- package/dist/cli/doctor.js +133 -1
- package/dist/cli/errors.js +1 -1
- package/dist/cli/eval.d.ts +32 -0
- package/dist/cli/eval.js +83 -6
- package/dist/cli/markdown.js +1 -1
- package/dist/cli/repl.js +13 -24
- package/dist/cli/run.d.ts +37 -0
- package/dist/cli/run.js +81 -9
- package/dist/cli/update.js +7 -1
- package/dist/context/accounting.js +1 -1
- package/dist/context/klyro-md.d.ts +11 -0
- package/dist/context/klyro-md.js +59 -4
- package/dist/context/level7.d.ts +4 -0
- package/dist/context/level7.js +20 -1
- package/dist/context/project-map.js +14 -13
- package/dist/eval/baseline.d.ts +47 -0
- package/dist/eval/baseline.js +55 -0
- package/dist/eval/harness.d.ts +14 -2
- package/dist/eval/harness.js +42 -4
- package/dist/index.js +57 -3
- package/dist/persistence/store.js +2 -2
- package/dist/policy/approval.js +3 -0
- package/dist/policy/path-guard.d.ts +9 -4
- package/dist/policy/path-guard.js +47 -23
- package/dist/providers/endpoints.js +8 -0
- package/dist/providers/model-info.d.ts +1 -0
- package/dist/providers/model-info.js +19 -0
- package/dist/providers.js +6 -2
- package/dist/renderers/terminal.d.ts +7 -0
- package/dist/renderers/terminal.js +52 -0
- package/dist/repl.d.ts +9 -0
- package/dist/repl.js +24 -5
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.js +1 -0
- package/dist/shared/proxy.d.ts +37 -0
- package/dist/shared/proxy.js +360 -0
- package/dist/tools/agent/task-list.d.ts +1 -1
- package/dist/tools/fs/apply-patch.js +4 -4
- package/dist/tools/fs/edit-file.js +2 -4
- package/dist/tools/fs/list-dir.js +1 -1
- package/dist/tools/fs/multi-edit.js +2 -2
- package/dist/tools/fs/read-file.js +1 -1
- package/dist/tools/fs/write-file.js +2 -2
- package/dist/tools/git/git-blame.d.ts +5 -0
- package/dist/tools/git/git-blame.js +22 -0
- package/dist/tools/git/git-diff.js +3 -20
- package/dist/tools/git/git-log.js +5 -19
- package/dist/tools/git/git-show.d.ts +5 -0
- package/dist/tools/git/git-show.js +22 -0
- package/dist/tools/git/git-status.js +4 -21
- package/dist/tools/git/run-git.d.ts +5 -0
- package/dist/tools/git/run-git.js +18 -0
- package/dist/tools/lsp/diagnostics.js +2 -3
- package/dist/tools/plan/todo-write.d.ts +1 -1
- package/dist/tools/registry.js +4 -0
- package/dist/tools/search/dependencies.d.ts +4 -4
- package/dist/tools/search/dependencies.js +1 -1
- package/dist/tools/search/glob.js +9 -4
- package/dist/tools/search/grep.js +11 -4
- package/dist/tools/search/ignore.d.ts +8 -0
- package/dist/tools/search/ignore.js +49 -0
- package/dist/tools/search/recent-files.js +1 -1
- package/dist/tools/search/search-files.js +11 -4
- package/dist/tools/web/web-fetch.js +2 -1
- package/dist/tools/web/web-search.js +3 -1
- package/dist/tui/app.js +117 -10
- package/dist/tui/app.test.js +65 -4
- package/dist/tui/measure.js +1 -0
- package/dist/tui/mouse.d.ts +7 -5
- package/dist/tui/mouse.js +9 -6
- package/dist/tui/scroll-flow.test.js +0 -1
- package/dist/tui/transcript-commands.d.ts +14 -0
- package/dist/tui/transcript-commands.js +31 -0
- package/dist/util/log.d.ts +19 -10
- package/dist/util/log.js +87 -52
- package/dist/verification/classify.d.ts +1 -1
- package/dist/verification/classify.js +2 -2
- package/dist/verification/engine.js +0 -6
- package/dist/verification/scoped.js +6 -4
- package/package.json +6 -1
|
@@ -16,7 +16,7 @@ export interface RepairContext {
|
|
|
16
16
|
blame: string;
|
|
17
17
|
}
|
|
18
18
|
export declare function gatherRepairContext(cwd: string, failure: Failure | undefined): Promise<RepairContext>;
|
|
19
|
-
export declare function guardRepair(diff: string,
|
|
19
|
+
export declare function guardRepair(diff: string, _editedFiles: string[]): {
|
|
20
20
|
blocked: boolean;
|
|
21
21
|
reason?: string;
|
|
22
22
|
};
|
|
@@ -57,7 +57,7 @@ export async function rerunOnce(cwd, command, timeoutMs = 45_000) {
|
|
|
57
57
|
try {
|
|
58
58
|
child.kill('SIGKILL');
|
|
59
59
|
}
|
|
60
|
-
catch { }
|
|
60
|
+
catch { /* ignore — best-effort kill */ }
|
|
61
61
|
resolve(false);
|
|
62
62
|
} }, timeoutMs);
|
|
63
63
|
child.on('close', (code) => { if (done)
|
|
@@ -123,7 +123,7 @@ function execCaptureArgv(cwd, file, args) {
|
|
|
123
123
|
// Guard: does diff touch assertions or add skips?
|
|
124
124
|
const ASSERT_RE = /(?:expect\s*\(|assert\.|assert\(|should\.|chai\.)/;
|
|
125
125
|
const SKIP_RE = /(?:\.skip\(|\.todo\(|xdescribe\(|xit\(|xtest\(|@pytest\.mark\.skip|pytest\.skip|:\s*skip\b)/i;
|
|
126
|
-
export function guardRepair(diff,
|
|
126
|
+
export function guardRepair(diff, _editedFiles) {
|
|
127
127
|
if (!diff)
|
|
128
128
|
return { blocked: false };
|
|
129
129
|
const addedLines = diff.split('\n').filter((l) => l.startsWith('+') && !l.startsWith('+++'));
|
|
@@ -14,12 +14,6 @@ import { redact } from '../policy/secret-redactor.js';
|
|
|
14
14
|
import { cappedOutput } from '../shared/output-cap.js';
|
|
15
15
|
import { globalBus } from '../events/bus.js';
|
|
16
16
|
const MAX_VERIFY_BYTES = 256 * 1024;
|
|
17
|
-
function appendCapped(current, chunk) {
|
|
18
|
-
if (current.length >= MAX_VERIFY_BYTES)
|
|
19
|
-
return current;
|
|
20
|
-
const next = current + chunk;
|
|
21
|
-
return next.length > MAX_VERIFY_BYTES ? next.slice(0, MAX_VERIFY_BYTES) + '\n... [truncated]' : next;
|
|
22
|
-
}
|
|
23
17
|
// SEC-004: denylist for dangerous patterns in verify commands.
|
|
24
18
|
// Destructive-only: the verify command comes from CLI flags, project config,
|
|
25
19
|
// or auto-detected package scripts (never model-controlled), so shell
|
|
@@ -169,7 +169,9 @@ export async function syntaxCheck(cwd, file) {
|
|
|
169
169
|
if (ext === '.ts' || ext === '.js' || ext === '.mjs' || ext === '.cjs') {
|
|
170
170
|
// Use tsc transpileModule if available, else node --check for js
|
|
171
171
|
try {
|
|
172
|
-
|
|
172
|
+
// Existence/readability probe — the tsc/node check below reports
|
|
173
|
+
// real diagnostics; a missing file fails there, not here.
|
|
174
|
+
fs.readFileSync(full, 'utf-8');
|
|
173
175
|
// minimal check: try to parse via new Function (for js) or just check no obvious syntax error via tsc
|
|
174
176
|
// For now, use tsc --noEmit --skipLibCheck on single file quickly
|
|
175
177
|
if (ext === '.ts') {
|
|
@@ -182,7 +184,7 @@ export async function syntaxCheck(cwd, file) {
|
|
|
182
184
|
try {
|
|
183
185
|
child.kill();
|
|
184
186
|
}
|
|
185
|
-
catch { }
|
|
187
|
+
catch { /* ignore — best-effort kill */ }
|
|
186
188
|
resolve(false);
|
|
187
189
|
} }, 10_000);
|
|
188
190
|
child.on('close', (code) => { if (done)
|
|
@@ -203,7 +205,7 @@ export async function syntaxCheck(cwd, file) {
|
|
|
203
205
|
try {
|
|
204
206
|
child.kill();
|
|
205
207
|
}
|
|
206
|
-
catch { }
|
|
208
|
+
catch { /* ignore — best-effort kill */ }
|
|
207
209
|
resolve(false);
|
|
208
210
|
} }, 5000);
|
|
209
211
|
child.on('close', (code) => { if (done)
|
|
@@ -229,7 +231,7 @@ export async function syntaxCheck(cwd, file) {
|
|
|
229
231
|
try {
|
|
230
232
|
child.kill();
|
|
231
233
|
}
|
|
232
|
-
catch { }
|
|
234
|
+
catch { /* ignore — best-effort kill */ }
|
|
233
235
|
resolve(false);
|
|
234
236
|
} }, 5000);
|
|
235
237
|
child.on('close', (code) => { if (done)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "klyro",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "Klyro — autonomous coding harness CLI that streams from any OpenAI-compatible or Anthropic LLM endpoint.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"dev": "tsx src/index.ts",
|
|
25
25
|
"dev:watch": "tsx watch src/index.ts",
|
|
26
26
|
"typecheck": "tsc --noEmit",
|
|
27
|
+
"lint": "eslint src scripts",
|
|
27
28
|
"test": "vitest run",
|
|
28
29
|
"test:watch": "vitest",
|
|
29
30
|
"prepublishOnly": "npm run typecheck && npm test && npm run build",
|
|
@@ -47,15 +48,19 @@
|
|
|
47
48
|
"commander": "^12.1.0",
|
|
48
49
|
"ink": "^7.1.1",
|
|
49
50
|
"ink-spinner": "^5.0.0",
|
|
51
|
+
"pino": "^10.3.1",
|
|
50
52
|
"react": "^19.2.0",
|
|
51
53
|
"zod": "^4.5.4"
|
|
52
54
|
},
|
|
53
55
|
"devDependencies": {
|
|
56
|
+
"@eslint/js": "^10.0.1",
|
|
54
57
|
"@types/node": "^22.9.0",
|
|
55
58
|
"@types/react": "^19.2.18",
|
|
59
|
+
"eslint": "^10.11.0",
|
|
56
60
|
"ink-testing-library": "^4.0.0",
|
|
57
61
|
"tsx": "^4.23.13",
|
|
58
62
|
"typescript": "^5.5.4",
|
|
63
|
+
"typescript-eslint": "^8.70.1",
|
|
59
64
|
"vitest": "^4.1.11"
|
|
60
65
|
}
|
|
61
66
|
}
|