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.
Files changed (92) hide show
  1. package/dist/agent/anthropic-adapter.js +26 -1
  2. package/dist/agent/provider-adapter.d.ts +7 -0
  3. package/dist/agent/provider-adapter.js +26 -1
  4. package/dist/agent/runtime.d.ts +14 -0
  5. package/dist/agent/runtime.js +59 -22
  6. package/dist/chat.js +16 -56
  7. package/dist/checkpoints/store.d.ts +15 -1
  8. package/dist/checkpoints/store.js +7 -2
  9. package/dist/cli/args.d.ts +7 -0
  10. package/dist/cli/args.js +10 -0
  11. package/dist/cli/completion.js +0 -3
  12. package/dist/cli/doctor.d.ts +13 -0
  13. package/dist/cli/doctor.js +133 -1
  14. package/dist/cli/errors.js +1 -1
  15. package/dist/cli/eval.d.ts +32 -0
  16. package/dist/cli/eval.js +83 -6
  17. package/dist/cli/markdown.js +1 -1
  18. package/dist/cli/repl.js +13 -24
  19. package/dist/cli/run.d.ts +37 -0
  20. package/dist/cli/run.js +81 -9
  21. package/dist/cli/update.js +7 -1
  22. package/dist/context/accounting.js +1 -1
  23. package/dist/context/klyro-md.d.ts +11 -0
  24. package/dist/context/klyro-md.js +59 -4
  25. package/dist/context/level7.d.ts +4 -0
  26. package/dist/context/level7.js +20 -1
  27. package/dist/context/project-map.js +14 -13
  28. package/dist/eval/baseline.d.ts +47 -0
  29. package/dist/eval/baseline.js +55 -0
  30. package/dist/eval/harness.d.ts +14 -2
  31. package/dist/eval/harness.js +42 -4
  32. package/dist/index.js +57 -3
  33. package/dist/persistence/store.js +2 -2
  34. package/dist/policy/approval.js +3 -0
  35. package/dist/policy/path-guard.d.ts +9 -4
  36. package/dist/policy/path-guard.js +47 -23
  37. package/dist/providers/endpoints.js +8 -0
  38. package/dist/providers/model-info.d.ts +1 -0
  39. package/dist/providers/model-info.js +19 -0
  40. package/dist/providers.js +6 -2
  41. package/dist/renderers/terminal.d.ts +7 -0
  42. package/dist/renderers/terminal.js +52 -0
  43. package/dist/repl.d.ts +9 -0
  44. package/dist/repl.js +24 -5
  45. package/dist/shared/index.d.ts +1 -0
  46. package/dist/shared/index.js +1 -0
  47. package/dist/shared/proxy.d.ts +37 -0
  48. package/dist/shared/proxy.js +360 -0
  49. package/dist/tools/agent/task-list.d.ts +1 -1
  50. package/dist/tools/fs/apply-patch.js +4 -4
  51. package/dist/tools/fs/edit-file.js +2 -4
  52. package/dist/tools/fs/list-dir.js +1 -1
  53. package/dist/tools/fs/multi-edit.js +2 -2
  54. package/dist/tools/fs/read-file.js +1 -1
  55. package/dist/tools/fs/write-file.js +2 -2
  56. package/dist/tools/git/git-blame.d.ts +5 -0
  57. package/dist/tools/git/git-blame.js +22 -0
  58. package/dist/tools/git/git-diff.js +3 -20
  59. package/dist/tools/git/git-log.js +5 -19
  60. package/dist/tools/git/git-show.d.ts +5 -0
  61. package/dist/tools/git/git-show.js +22 -0
  62. package/dist/tools/git/git-status.js +4 -21
  63. package/dist/tools/git/run-git.d.ts +5 -0
  64. package/dist/tools/git/run-git.js +18 -0
  65. package/dist/tools/lsp/diagnostics.js +2 -3
  66. package/dist/tools/plan/todo-write.d.ts +1 -1
  67. package/dist/tools/registry.js +4 -0
  68. package/dist/tools/search/dependencies.d.ts +4 -4
  69. package/dist/tools/search/dependencies.js +1 -1
  70. package/dist/tools/search/glob.js +9 -4
  71. package/dist/tools/search/grep.js +11 -4
  72. package/dist/tools/search/ignore.d.ts +8 -0
  73. package/dist/tools/search/ignore.js +49 -0
  74. package/dist/tools/search/recent-files.js +1 -1
  75. package/dist/tools/search/search-files.js +11 -4
  76. package/dist/tools/web/web-fetch.js +2 -1
  77. package/dist/tools/web/web-search.js +3 -1
  78. package/dist/tui/app.js +117 -10
  79. package/dist/tui/app.test.js +65 -4
  80. package/dist/tui/measure.js +1 -0
  81. package/dist/tui/mouse.d.ts +7 -5
  82. package/dist/tui/mouse.js +9 -6
  83. package/dist/tui/scroll-flow.test.js +0 -1
  84. package/dist/tui/transcript-commands.d.ts +14 -0
  85. package/dist/tui/transcript-commands.js +31 -0
  86. package/dist/util/log.d.ts +19 -10
  87. package/dist/util/log.js +87 -52
  88. package/dist/verification/classify.d.ts +1 -1
  89. package/dist/verification/classify.js +2 -2
  90. package/dist/verification/engine.js +0 -6
  91. package/dist/verification/scoped.js +6 -4
  92. 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, editedFiles: 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, editedFiles) {
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
- const content = fs.readFileSync(full, 'utf-8');
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.16",
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
  }